1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="565999b7-007b-5832-9cb2-391ede08d8fe")}catch(e){}}(); 3(self.webpackChunkmighty_web_console=self.webpackChunkmighty_web_console||[]).push([[252],{31438:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AppPrivate:()=>QX});var i=n(68870),o=n(763),a=n(72791),r=n(6907),l=n(79271),s=n(72225),d=n(97893),c=n(22522),u=n(44841),p=n(80184);const h=e=>{let{children:t}=e;const n=(0,u.v9)((e=>e.auth.user)),i=(0,l.TH)(),o=(0,d.hu)();return n&&!o?(0,p.jsx)(p.Fragment,{children:t}):(0,p.jsx)(l.l_,{to:{pathname:(0,c.LT)(c._j.userSettings),state:{fromLocation:i}}})};var m=n(53767),g=n(47047),v=n(20890),C=n(24518),x=n(13400),f=n(91523),b=n(83398),y=n(70662);const j=e=>{document.documentElement.style.setProperty("--top-banner-offset","".concat(e,"px"))},Z=e=>{let{visible:t,backgroundColor:n,sx:o,children:r,dataTestId:l}=e;const s=(0,a.useRef)(null),d=(0,a.useCallback)((()=>{s.current&&j(s.current.offsetHeight)}),[]);return(0,a.useLayoutEffect)((()=>{const e=s.current;if(!t||!e)return void j(0);d();const n=new ResizeObserver(d);return n.observe(e),()=>{n.disconnect(),j(0)}}),[t,d]),t?(0,p.jsx)(i.Z,{ref:s,...l&&{"data-testid":l},sx:{position:"fixed",top:0,left:0,right:0,zIndex:1201,backgroundColor:n,paddingX:3,paddingY:1.5,...o},children:r}):null};var w=n(93875),E=n(93635),S=n(52759);const D=e=>{const{documents:t,fetched:n}=(0,E.D)(S.F.UserOrganizationPrivileges,{enabled:e});return{admins:(0,a.useMemo)((()=>(0,o.map)((0,o.filter)(t,(e=>e.privileges.billing&&!!e.userProfile.email)),(e=>({name:e.userProfile.name,email:e.userProfile.email})))),[t]),fetched:n}};var M=n(15819),k=n(78505);let I,A;!function(e){e.DEVICE="device",e.ADD_ON="add_on",e.UNKNOWN="unknown"}(I||(I={})),function(e){e.ROOMS="rooms"}(A||(A={}));const R=e=>(0,o.filter)(e,(e=>e.kind===I.DEVICE&&0!==e.unitAmount)),T=e=>{var t;return null!==(t=e.isCatalogPrice)&&void 0!==t?t:e.isStandardPrice},P=(e,t)=>{if(!e||0===e.length)return!1;if(null!==t&&void 0!==t&&t.customContract)return!1;const n=R(e),i=1===n.length?n[0]:void 0;return!!(i&&T(i)&&(e=>{const t=R(e)[0];return!!t&&(0,o.every)(e,(e=>e.period===t.period&&e.intervalCount===t.intervalCount))})(e))&&(0,o.every)((0,o.filter)(e,(e=>e.kind===I.ADD_ON)),T)},L=(e,t,n,i)=>{if(t===A.ROOMS)return((e,t,n)=>!(!P(e,n)||!e)&&t===k.QV.Premium&&!(0,o.some)(e,(e=>e.sku===A.ROOMS)))(e,n,i)},N=Date.parse("2026-10-01T19:00:00.000Z"),U=()=>{const e=(0,d.mU)(),t=(0,d.kV)(),n=(0,d.GB)();if(Date.now()>=N)return!0;if(!P(null===e||void 0===e?void 0:e.items,t))return!0;if(n)return!1;const i=null===e||void 0===e?void 0:e.currentPeriodEnd;return!!i&&(0,M.Mn)(i).valueOf()>N},F=()=>{const e=(0,d.mU)();return(0,o.some)(null===e||void 0===e?void 0:e.items,(e=>e.sku===A.ROOMS))};var O=n(25745);const _=()=>{const e=F(),t=(0,d.kV)();return!!e||(0,O.xT)(t.featureFlags,t.featureFlagOverrides,new Date)};var z=n(82277);const B={adminLine1:"Rooms is now out of Beta!",adminLine2:"Add it to your subscription to keep access",userLine1:"Rooms is now out of Beta!",userLine2:"Add it to your subscription to keep access",ctaLabel:"Add Rooms"},W={adminLine1:"Your free access to Rooms ends on ".concat(O.Hc,"."),adminLine2:"Add Rooms to your subscription to maintain access.",userLine1:"Your free access to Rooms ends on ".concat(O.Hc,"."),userLine2:"Contact an organization administrator to add Rooms to your subscription.",ctaLabel:"Add Rooms"},V="Reach out to your reseller to add Rooms to your subscription, or contact us for assistance:",G={adminLine1:"Your free access to Rooms ends on ".concat(O.Hc,"."),adminLine2:V,userLine1:"Your free access to Rooms ends on ".concat(O.Hc,"."),userLine2:V,ctaLabel:""},H="Reach out to your provider to add Rooms to your subscription, or contact us for assistance:",q={adminLine1:"Your free access to Rooms ends on ".concat(O.Hc,"."),adminLine2:H,userLine1:"Your free access to Rooms ends on ".concat(O.Hc,"."),userLine2:H,ctaLabel:""},Y=()=>{var e,t,n;const i=null===(e=(0,z.T)("featureFlags"))||void 0===e?void 0:e.roomsPricingAnnouncement;return{enabled:!(null===i||void 0===i||!i.enabled),suppressedBillingEmails:null!==(t=null===i||void 0===i?void 0:i.suppressedBillingEmails)&&void 0!==t?t:[],suppressedOrganizationIds:null!==(n=null===i||void 0===i?void 0:i.suppressedOrganizationIds)&&void 0!==n?n:[],sitewide:{...B,...null===i||void 0===i?void 0:i.sitewide},roomsTab:{...W,...null===i||void 0===i?void 0:i.roomsTab},roomsTabResold:{...G,...null===i||void 0===i?void 0:i.roomsTabResold},roomsTabIsv:{...q,...null===i||void 0===i?void 0:i.roomsTabIsv},salesContactUrl:(null===i||void 0===i?void 0:i.salesContactUrl)||"mailto:".concat("[email protected]")}},K=()=>{const{enabled:e}=Y(),t=_(),n=U(),{privileges:i,buildOrganizationPath:r}=(0,w.P)(),l=(0,d.U5)(),s=(0,d.Yt)(),c=(0,d.GB)(),u=!!i.billing,p=(()=>{var e;const{suppressedBillingEmails:t,suppressedOrganizationIds:n}=Y(),{organization:i}=(0,d.mP)(),a=(0,o.toLower)(null!==(e=null===i||void 0===i?void 0:i.billingEmail)&&void 0!==e?e:"");return!(null===i||void 0===i||!i.isIsv)||(0,o.includes)(n,null===i||void 0===i?void 0:i.id)||!!a&&(0,o.includes)((0,o.map)(t,o.toLower),a)})(),{documents:h,fetched:m}=(0,E.D)(S.F.Rooms,{enabled:e}),{admins:g,fetched:v}=D(e&&!u),C=!(0,o.isEmpty)(h),x=e&&n&&!t&&!c&&l&&s,f=x&&m&&(u||v),b=(0,a.useMemo)((()=>f&&!u?g:[]),[f,u,g]);return{eligible:x,show:f,hasBillingPrivilege:u,hasCreatedRoom:C,isIsv:p,admins:b,subscriptionPath:r((e=>e.settings.subscription)),roomsPath:r((e=>e.rooms))}};var X=n(68429);var Q=n(25828),J=n(80169);const $=(0,a.memo)((()=>{const{eligible:e,show:t,hasBillingPrivilege:n,hasCreatedRoom:i,subscriptionPath:o}=K(),{sitewide:r}=Y(),{dismissed:l,dismiss:s}=(()=>{const{authUser:e}=(0,X.Eu)(),t=(n=e.uid,"".concat("roomsPricingBannerDismissed",":").concat(n));var n;const[i,o]=(0,a.useState)((()=>"true"===localStorage.getItem(t)));return{dismissed:i,dismiss:(0,a.useCallback)((()=>{localStorage.setItem(t,"true"),o(!0)}),[t])}})(),d=t&&!l,c=e&&!l&&!t,u=d||c;(0,a.useEffect)((()=>{d&&(0,b.ec)("Rooms Pricing Announcement Shown",{surface:"sitewide",hasBillingPrivilege:n,hasCreatedRoom:i})}),[d,n,i]);const h=(0,a.useCallback)((()=>{(0,b.ec)("Rooms Pricing Announcement Dismissed",{surface:"sitewide",hasBillingPrivilege:n,hasCreatedRoom:i}),s()}),[s,n,i]),j=(0,a.useCallback)((()=>{(0,b.ec)("Rooms Pricing Announcement Clicked",{surface:"sitewide",hasBillingPrivilege:n,hasCreatedRoom:i})}),[n,i]);return(0,p.jsx)(Z,{dataTestId:"roomsPricingBanner",visible:u,backgroundColor:y.DG.purple[50],children:(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",justifyContent:"center",spacing:2,sx:{position:"relative"},children:c?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(g.Z,{variant:"circular",width:20,height:20}),(0,p.jsx)(g.Z,{variant:"text",width:430,height:20}),(0,p.jsx)(g.Z,{variant:"rounded",width:96,height:30})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Q.Z,{fontSize:"small",color:"primary"}),(0,p.jsxs)(v.Z,{variant:"body2",children:[n?r.adminLine1:r.userLine1," ",n?r.adminLine2:r.userLine2]}),n&&(0,p.jsx)(C.Z,{component:f.rU,to:o,size:"small",variant:"contained",onClick:j,"data-testid":"roomsPricingBanner_cta",children:r.ctaLabel}),(0,p.jsx)(x.Z,{size:"small",onClick:h,"aria-label":"Dismiss","data-testid":"roomsPricingBanner_dismiss",sx:{position:"absolute",right:0},children:(0,p.jsx)(J.Z,{fontSize:"small"})})]})})})}));$.displayName="UIRoomsPricingBanner";var ee=n(20068),te=n(76998),ne=n.n(te),ie=n(82692),oe=n(97647);const ae=e=>
3{let{value:t,disabled:n,noPadding:o=!1,showValue:a=!1,inline:r=!1,children:l}=e;const{notify:s}=(0,ie.o)(),d=o?{}:{paddingX:.5,marginX:-.5,paddingBottom:.25,marginBottom:-.25};return n?(0,p.jsx)(p.Fragment,{children:l}):(0,p.jsx)(ee.Z,{title:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(oe.Z,{sx:{fontSize:"1.2em"}}),(0,p.jsx)("span",{children:a?t:"Copy to clipboard"})]}),placement:"bottom-start",followCursor:!0,children:(0,p.jsx)(i.Z,{component:r?"span":"div",display:r?"inline-block":void 0,onClick:e=>{e.preventDefault(),e.stopPropagation(),ne()(null!==t&&void 0!==t?t:"",{format:"text/plain",onCopy:()=>{s({severity:"info",message:"Copied to clipboard"})}})},borderRadius:1,sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},...d,children:l})})};var re=n(93044),le=n(13365);const se=e=>{let{user:t,size:n="md",AvatarProps:i}=e;const r=(0,a.useMemo)((()=>{if((0,o.isNumber)(n))return n;switch(n){case"lg":return 50;case"md":default:return 40;case"sm":return 30;case"xs":return 20}}),[n]),l=(e=>{if(!e)return"-";const t=e.trim().split(/\s+/).filter((e=>e.length>0));return 0===t.length?"-":1===t.length?t[0].substring(0,2).toUpperCase():(t[0][0]+t[1][0]).toUpperCase()})((null===t||void 0===t?void 0:t.name)||""),s=(0,le.AO)(t),d=(0,le.oD)(t);return(0,p.jsx)(re.Z,{variant:"circular",style:{width:r,height:r,backgroundColor:d,color:s,fontSize:.5*r,fontWeight:600},...i,children:l})},de=(0,a.memo)((e=>{let{name:t,email:n}=e;const i=((e,t)=>{var n;const i=(0,o.trim)(e);return i?/\s/.test(i)&&null!==(n=(0,o.head)((0,o.split)(i,/\s+/)))&&void 0!==n?n:i:t})(t,n),r=(0,a.useMemo)((()=>({id:n,name:i,email:n,claimed:!0})),[n,i]);return(0,p.jsx)(ae,{value:n,noPadding:!0,showValue:!0,children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{cursor:"pointer",borderRadius:10,paddingRight:1.5,paddingLeft:.25,paddingY:.25,"&:hover":{backgroundColor:"action.hover"}},children:[(0,p.jsx)(se,{user:r,size:"xs"}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"text.primary",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:140},children:i})]})})}));de.displayName="UIBillingAdminChip";const ce=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="https://dashboard.stripe.com";return t&&(n+="/test"),n+="/customers/".concat(e),n},ue=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();return"open"===e.status&&(!e.dueDate||(0,M.Mn)(t).isAfter((0,M.Mn)(e.dueDate)))};var pe=n(65700);var he=n(2406),me=n(48235);const ge=new Intl.NumberFormat,ve=e=>ge.format(e),Ce=(e,t)=>{const n=Math.max(e,0)/1024/1024/1024,i=(null!==t&&void 0!==t?t:n<10&&n>0)?1:0,a=(0,o.round)(n,i),r=1===i&&a%1===0;return"".concat(a).concat(r?".0":"")},xe=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"}),fe=e=>xe.format(e/100),be=(0,a.memo)((()=>{const{showBanner:e,isFreeTrialEnded:t,isUnpaidSubscription:n,unpaidInvoices:i,billingAdmins:r,canViewSubscriptionPage:l}=(()=>{const e=(0,d.Yt)(),t=(0,d.GB)(),n=(0,d.mU)(),{privileges:i,buildOrganizationPath:r}=(0,w.P)(),l=!e&&!t,s=i.billing,c="unpaid"===(null===n||void 0===n?void 0:n.status),{documents:u,fetched:p}=(0,E.D)(S.F.Invoices,{enabled:s}),h=(0,d.P3)(),m=s?!n&&((0,o.isEmpty)(u)||(0,o.every)(u,(e=>!0===e.isTrial))):h,g=(0,a.useMemo)((()=>{if(!s||!c)return{count:0,total:0};const e=(0,o.filter)(u,(e=>ue(e)));return{count:e.length,total:e.reduce(((e,t)=>e+t.total),0)}}),[s,c,u]),{documents:v,fetched:C}=(0,E.D)(S.F.UserOrganizationPrivileges),x=s?p:C,f=(0,a.useMemo)((()=>!l||s?[]:(0,o.map)((0,o.filter)(v,(e=>e.role===pe.Z.Owner&&!!e.userProfile.email)),(e=>({name:e.userProfile.name,email:e.userProfile.email})))),[l,s,v]);return{showBanner:l&&x,isFreeTrialEnded:m,isUnpaidSubscription:c,unpaidInvoices:g,billingAdmins:f,canViewSubscriptionPage:s,subscriptionPath:r((e=>e.settings.subscription))}})(),{bannerBackgroundColor:s,headlineText:c,subtitleText:u,testId:h}=(0,a.useMemo)((()=>{if(l&&n&&i.count>0){const e=1===i.count?"1 unpaid invoice":"".concat(i.count," unpaid invoices"),t=i.total>0?" ".concat(i.count>1?"totaling":"of"," ").concat(fe(i.total)):"";
3return{bannerBackgroundColor:y.DG.error[50],headlineText:"You have ".concat(e).concat(t,"."),subtitleText:" Pay your invoice".concat(i.count>1?"s":""," under Subscription > Invoices to continue using ManageXR."),testId:"subscriptionBanner_unpaidInvoices"}}return l&&t?{bannerBackgroundColor:y.DG.purple[50],headlineText:"Your free trial has ended.",subtitleText:" Start a subscription to continue using ManageXR.",testId:"subscriptionBanner_freeTrialEnded"}:l?{bannerBackgroundColor:y.DG.white,headlineText:"Your subscription has ended.",subtitleText:" Start a subscription to continue using ManageXR.",testId:"subscriptionBanner_subscriptionEnded"}:{bannerBackgroundColor:y.DG.white,headlineText:"This org doesn't have an active ManageXR subscription.",subtitleText:" To regain access, ask your admin.",testId:"subscriptionBanner_subscriptionEnded"}}),[l,t,n,i]);return(0,p.jsx)(Z,{dataTestId:h,visible:e,backgroundColor:s,children:(0,p.jsxs)(m.Z,{alignItems:"center",children:[(0,p.jsx)(m.Z,{alignItems:"center",justifyContent:"center",direction:"row",children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[t&&l?(0,p.jsx)(he.Z,{fontSize:"small",color:"primary"}):(0,p.jsx)(me.Z,{fontSize:"small",color:l&&n&&i.count>0?"error":"warning"}),(0,p.jsxs)(v.Z,{variant:"body2",children:[c,u]})]})}),!l&&r.length>0&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,sx:{backgroundColor:"background.paper",borderRadius:.5,paddingX:2,paddingY:.5},children:[(0,p.jsx)(v.Z,{variant:"caption",sx:{color:"text.secondary"},children:"Admins:"}),(0,o.map)(r,(e=>(0,p.jsx)(de,{name:e.name,email:e.email},e.email)))]})]})})}));be.displayName="UISubscriptionExpiredBanner";var ye=n(82352);const je=e=>{let{children:t}=e;const n=(0,l.TH)(),i=(0,d.Yt)(),{buildOrganizationPath:o,organizationId:a,privileges:r,userRoleId:s}=(0,w.P)(),u=(0,ye.L)()!==a,h=r.billing?o((e=>e.settings.subscription)):s&&!r.organization?o((e=>e.settings.organization)):o((e=>e.settings.users)),m=[(0,c.LT)(c._j.userSettings.account),o((e=>e.settings.subscription)),...s?r.organization?[o((e=>e.settings.users))]:[]:[o((e=>e.settings.users))]];return i||m.includes(n.pathname)||u?(0,p.jsx)(p.Fragment,{children:t}):(0,p.jsx)(l.l_,{to:h})};var Ze=n(29823),we=n(22885),Ee=n(81131),Se=n(40786),De=n(13967),Me=n(10703),ke=n(81918),Ie=n(94721),Ae=n(54164),Re=n(72681),Te=n(55360);const Pe=()=>{var e;const t=(0,X.bo)(),n=(0,u.I0)(),o=(0,l.TH)(),{organization:r}=(0,d.mP)(),[s,h]=(0,a.useState)(!1),[g,C]=(0,a.useState)({organization:!0,configuration:!0,device:!0,effective:!0}),f=!!(0,l.LX)(o.pathname,{path:c._j.organization.configurations.configuration.__path}),b=!!(0,l.LX)(o.pathname,{path:c._j.organization.devices.device.__path}),y=(0,a.useMemo)((()=>{var e;const t=(0,l.LX)(o.pathname,{path:c._j.organization.configurations.configuration.__path});return null===t||void 0===t||null===(e=t.params)||void 0===e?void 0:e.configurationId}),[o.pathname]),j=(0,a.useMemo)((()=>{var e;const t=(0,l.LX)(o.pathname,{path:c._j.organization.devices.device.__path});return null===t||void 0===t||null===(e=t.params)||void 0===e?void 0:e.deviceId}),[o.pathname]),Z=(0,z.l)(S.F.Configurations,f&&y?y:void 0),w=(0,z.l)(S.F.Devices,b&&j?j:void 0),E=(0,z.l)(S.F.Configurations,b&&null!==w&&void 0!==w&&null!==(e=w.deviceGroupRef)&&void 0!==e&&e.id?w.deviceGroupRef.id:void 0),D=(0,a.useMemo)((()=>{const e=[],t=e=>e.filter((e=>!e.startsWith("_"))),n=t((i=r,i.featureFlags||[]).map((e=>String(e))));var i;e.push({title:"Organization Feature Flags",flags:n});const o=f?Z:E;if(f||b){const n=o?t((e=>e.featureFlags||[])(o)):[];e.push({title:"Configuration Feature Flags",flags:n})}if(b){const n=w?t((e=>e.featureFlags||[])(w)):[];e.push({title:"Device Feature Flags",flags:n})}if(f||b){const n=t((0,Re.f)(r.featureFlags,null===o||void 0===o?void 0:o.featureFlags,null===w||void 0===w?void 0:w.featureFlags,r.featureFlagOverrides,null===o||void 0===o?void 0:o.featureFlagOverrides,null===w||void 0===w?void 0:w.featureFlagOverrides));e.push({title:"Effective Feature Flags",flags:n})}return e}),[r,f,Z,E,b,w]),M=(0,De.Z)(),{notify:k}=(0,ie.o)(),[I,A]=(0,a.useState)(null),R=(0,a.useRef)(!1),T=(0,a.useRef)({x:0,y:0}),P=(0,a.useRef)(null);if((0,a.useEffect)((()=>{const e=e=>{R.current&&A({x:e.clientX-T.current.x,y:e.clientY-T.current.y})},t=()=>{R.current=!1};return document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t)}}),[]),(0,a.useEffect)((()=>{const e=e=>{if(P.current){const t=P.current.getBoundingClientRect();if(e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>
3=t.top&&e.clientY<=t.bottom){e.preventDefault(),e.stopPropagation();const t=P.current.querySelector("[data-scroll-content]");t&&(t.scrollTop+=e.deltaY)}}};return document.addEventListener("wheel",e,{passive:!1}),()=>{document.removeEventListener("wheel",e)}}),[]),!t)return null;const L=(0,p.jsxs)(Me.Z,{ref:P,elevation:8,sx:{position:"fixed",top:I?I.y:80,left:I?I.x:void 0,right:I?void 0:20,width:s?"auto":400,height:s?"auto":void 0,maxHeight:s?"auto":"calc(100vh - 100px)",zIndex:M.zIndex.modal+1,backgroundColor:M.palette.grey[800],border:"1px solid ".concat(M.palette.grey[600]),borderRadius:2,overflow:"hidden",pointerEvents:"auto"},children:[(0,p.jsxs)(i.Z,{onMouseDown:e=>{var t;if(0!==e.button)return;R.current=!0;const n=null===(t=e.currentTarget.closest(".MuiPaper-root"))||void 0===t?void 0:t.getBoundingClientRect();n&&(T.current={x:e.clientX-n.left,y:e.clientY-n.top})},sx:{display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:M.palette.grey[700],padding:"8px 12px",borderBottom:"1px solid ".concat(M.palette.grey[600]),cursor:"move",userSelect:"none"},children:[(0,p.jsx)(v.Z,{variant:"subtitle1",sx:{color:"white",fontSize:"0.9rem"},children:"Feature Flags"}),(0,p.jsxs)(i.Z,{sx:{display:"flex",gap:.5},children:[(0,p.jsx)(x.Z,{size:"small",onClick:()=>{h(!s)},sx:{color:"white",padding:"4px"},children:(0,p.jsx)(Se.Z,{fontSize:"small"})}),(0,p.jsx)(x.Z,{size:"small",onClick:()=>{n(Te.dV.actions.appFeatureFlagOverlayToggled())},sx:{color:"white",padding:"4px"},children:(0,p.jsx)(Ze.Z,{fontSize:"small"})})]})]}),!s&&(0,p.jsx)(i.Z,{"data-scroll-content":!0,sx:{padding:2,maxHeight:"calc(100vh - 160px)",overflowY:"auto",overflowX:"hidden",pointerEvents:"auto","&:hover":{pointerEvents:"auto"},...M.mixins.verticalScroll},children:(0,p.jsx)(m.Z,{spacing:2,children:D.map(((e,t)=>{const n="Organization Feature Flags"===(o=e.title)?"organization":"Configuration Feature Flags"===o?"configuration":"Effective Feature Flags"===o?"effective":"device";var o;const a=g[n],r=0===e.flags.length;return(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:a?1:0},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",sx:{color:"white"},children:e.title}),(0,p.jsx)(x.Z,{size:"small",onClick:()=>{return e=n,void C((t=>({...t,[e]:!t[e]})));var e},sx:{color:"white",padding:"2px"},children:a?(0,p.jsx)(we.Z,{fontSize:"small"}):(0,p.jsx)(Ee.Z,{fontSize:"small"})})]}),a&&(0,p.jsx)(p.Fragment,{children:r?(0,p.jsxs)(v.Z,{variant:"body2",sx:{color:M.palette.grey[400],fontStyle:"italic",fontSize:"0.75rem"},children:["No ",n," feature flags detected."]}):(0,p.jsx)(m.Z,{spacing:1,children:e.flags.map((e=>(0,p.jsx)(ee.Z,{title:"Click to copy",placement:"left",children:(0,p.jsx)(ke.Z,{label:e,size:"small",onClick:()=>{return t=e,void ne()(t,{format:"text/plain",onCopy:()=>{k({severity:"info",message:"Copied to clipboard"})}});var t},sx:{backgroundColor:M.palette.success.main,color:"white",fontSize:"0.75rem",alignSelf:"flex-start",cursor:"copy","&:hover":{backgroundColor:M.palette.success.dark}}})},e)))})}),t<D.length-1&&(0,p.jsx)(Ie.Z,{sx:{mt:2,borderColor:M.palette.grey[600]}})]},e.title)}))})})]});return(0,Ae.createPortal)(L,document.body)};var Le=n(82373),Ne=n(82943),Ue=n(77135),Fe=n(90743);const Oe=()=>(0,Fe.pv)({method:"post",path:"device-usage"}),_e=()=>(0,Fe.pv)({method:"post",path:"device-usage/batch"});var ze=n(74092),Be=n(9478);const We=(0,a.createContext)(void 0),Ve=()=>{const e=(0,a.useContext)(We);if(!e)throw new Error("useAnalyticsContext() called outside of an AnalyticsProvider");return e},Ge=e=>{let{children:t}=e;const{approvedConfigurationIds:n,configurationsFullAccess:i,userRoleId:r}=(0,w.P)(),[l,s]=(0,a.useState)(Date.now()),d=(0,a.useCallback)((()=>{s(Date.now())}),[]);(0,a.useEffect)((()=>{d()}),[n,i,r,d]);const c=(0,Le.ye)("enableAnalyticsBatchRequests"),u=(0,Le.ye)("enableAnalyticsClientCache"),{request:h,pending:m}=Oe(),{requestAsync:g,pending:v}=_e(),C=(0,a.useRef)([]),x=(0,a.useRef)(),f=(0,a.useCallback)((async()=>{x.current=void 0;const e=C.current;C.current=[];const t=e.filter((e=>{var t,n;return null===(t=e.controller)||void 0===t||!t.signal.aborted||(null===(n=e.onFinally)||void 0===n||n.call(e),!1)}));0!==t.length&&await Promise.all((0,o.chunk)(t,100).map((async e=>{let t,n;try{t=await g({data:{charts:e.map(((e,t)=>({...e.dto,key:String(t)})))}})}catch(i){n=i}(0,Ae.unstable_batchedUpdates)((()=>{e.forEach(((e,o)=>{var a,r;if(null!==(a=e.controller)&&void 0!==a&&a.signal.aborted)null===(r=e.onFinally)||void 0===r||r.call(e);else try{if(n)throw n;const i=t.results[String(o)];var l,s;if("ok"!==(null===i||void 0===i?void 0:i.status))throw new Error(null!==(l=null===i||void 0===i?void 0:i.message)&&void 0!==l?l:"Chart request failed");null===(s=e.onSuccess)||void 0===s||s.call(e,i.data)}catch(i){var d;null===(d=e.onError)||void 0===d||d.call(e,i)}finally{var c;null===(c=e.onFinally)||void 0===c||c.call(e)}}))}))})))}),[g]),b=(0,a.useCallback)((async function(){let{data:e,controller:t,onSuccess:n,onError:i,onFinally:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e&&(C.current.push({dto:e,controller:t,onSuccess:n,onError:i,onFinally:o}),x.current||(x.current=setTimeout(f,50)))}),[f]);(0,a.useEffect)((()=>()=>clearTimeout(x.current)),[]);const{request:y,pending:j}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"device-usage/charts",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.AnalyticsCharts,id:t.id,set:t}}})),[])),Z=(0,a.useCallback)((async()=>{await y({data:{groupType:"app",title:"New Chart",type:"bar",unit:"seconds",filters:{}},successMessage:"Chart added",errorMessage:"Error adding chart"})}),[y]),{request:E,pending:D}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"device-usage/charts/:analyticsChartId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.AnalyticsCharts,id:null===t||void 0===t?void 0:t.analyticsChartId,update:n}}})),[])),M=(0,a.useCallback)((async(e,t)=>{await E({params:{analyticsChartId:e},data:t})}),[E]),{request:k,pending:I}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"device-usage/charts/:analyticsChartId",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.AnalyticsCharts,id:null===t||void 0===t?void 0:t.analyticsChartId,remove:!0}}})),[])),A=(0,a.useCallback)((async e=>{await k({params:{analyticsChartId:e},successMessage:"Chart deleted",errorMessage:"Error deleting chart"})}),[k]),{request:R,pending:T}=(0,Fe.pv)({method:"post",path:"device-events/csv"}),P=(0,a.useCallback)((async e=>{await R({data:e,successMessage:"Analytics data will be sent to ".concat(e.email,". For organizations with many devices, delivery may take several minutes."),successAutoHide:!1,errorMessage:"Failed to generate CSV request"})}),[R]),L=He(),N=qe();return(0,p.jsx)(We.Provider,{value:(0,a.useMemo)((()=>({analyticsChartRefreshTime:l,refreshAnalyticsCharts:d,apiFetchAnalyticsChartDataRequest:c?b:h,fetchAnalyticsChartPending:m||v,analyticsBatchRequestsEnabled:c,analyticsClientCacheEnabled:u,analyticsFilterLists:N,createAnalyticsChart:Z,createAnalyticsChartPending:j,updateAnalyticsChart:M,updateAnalyticsChartPending:D,deleteAnalyticsChart:A,deleteAnalyticsChartPending:I,downloadAnalyticsCsv:P,downloadAnalyticsCsvPending:T})),[l,N,c,u,Z,j,A,I,P,T,b,d,h,m,v,M,D]),children:L&&t})},He=()=>{const e=(0,u.I0)(),t=(0,u.v9)((e=>e.ui.analytics)),n=(0,M.SZ)(t.dateRange);return(0,a.useEffect)((()=>{n||e(Te.dV.actions.analyticsDurationChanged({duration:Te.J5.analytics.duration}))}),[e,n]),n},qe=()=>{const{organizationId:e,approvedConfigurationIds:t,configurationsFullAccess:n}=(0,w.P)(),i=(0,z.l)(S.F.AnalyticsFilters,e),r=(0,z.l)(S.F.Misc,"anal
3yticsSystemApps");return(0,a.useMemo)((()=>{var e;if(!i)return;const a=new Set(null!==(e=null===r||void 0===r?void 0:r.packageNames)&&void 0!==e?e:[]),l={app:[],configuration:[],device:[],tag:[],model:[]};for(const[r,s]of(0,o.entries)(i.filters)){const e=l[r];let i=!1,d=!1;for(const[l,c]of(0,o.entries)(s))("configuration"!==r||n||t.includes(l))&&("app"===r?a.has(l)?i||(e.push({id:"System",title:"System"}),i=!0):l.startsWith(Be.vc.configuration.launcherPackageNamePrefix)?d||(e.push({id:"ManageXR Home Screen",title:"ManageXR Home Screen"}),d=!0):e.push({id:l,title:c}):e.push({id:l,title:c}));e.sort(ze.IG)}return l}),[i,r,t,n])},Ye=()=>{const{organizationId:e}=(0,w.P)(),t=(0,a.useRef)(),[n,i]=(0,a.useState)([]),[o,r]=(0,a.useState)(!1),[l,s]=(0,a.useState)(!1);(0,a.useEffect)((()=>{t.current=void 0,i([]),s(!1)}),[e]);return{devices:n,pending:o,loaded:l,ensureDevicesLoaded:(0,a.useCallback)((async()=>{if(void 0!==t.current)return t.current;t.current=[],r(!0);try{const n=await(0,Fe.Y4)({organizationId:e},{$where:{},$orderBy:{}});return t.current=n,i(n),n}finally{r(!1),s(!0)}}),[e])}},Ke=(e,t,n)=>null!==t&&void 0!==t?t:n.get(e),Xe=(e,t)=>e.map((e=>({...e,iconUrl:Ke(e.id,e.iconUrl,t)}))),Qe=()=>{const e=(0,u.v9)((e=>e.firestore.data.apps.data));return(0,a.useMemo)((()=>(e=>{const t=new Map;for(const i of e){var n;i.iconUrl&&(t.set(i.id,i.iconUrl),t.set(i.packageName,i.iconUrl),null!==(n=i.instantAppRef)&&void 0!==n&&n.id&&t.set(i.instantAppRef.id,i.iconUrl))}return t})((0,o.values)(e))),[e])},Je=()=>(0,Le.ye)("enableAnalyticsOverview"),$e=()=>(0,Le.ye)("enableSingleDeviceAnalytics"),et=e=>{let{overviewFilters:t,includeSystemApps:n,systemAppIds:i}=e;const a=t.app;return(0,o.isEmpty)(a)?{filters:(0,o.omit)(t,"app"),includeSystemApps:n}:n?{filters:{...t,app:(0,o.uniq)([...a,...i])},includeSystemApps:!0}:{filters:t,includeSystemApps:!1}},tt=new Set((0,o.map)(Be.vc.analytics.systemAppExclusions,(e=>e.toLowerCase()))),nt=(e,t)=>!tt.has(e.toLowerCase())&&(!!(0,o.includes)(Be.vc.analytics.systemAppExactNames,t)||(0,o.some)(Be.vc.analytics.systemAppPatterns,(n=>e.toLowerCase().includes(n.toLowerCase())||t.toLowerCase().includes(n.toLowerCase())))),it=e=>{const t=new Map;for(const o of null!==(n=null===e||void 0===e?void 0:e.data)&&void 0!==n?n:[]){var n;for(const[e,n]of Object.entries(o)){var i;"period"===e||"number"!==typeof n||n<=0||t.set(e,(null!==(i=t.get(e))&&void 0!==i?i:0)+n)}}return t},ot=e=>{const t=new Map;for(const i of null!==(n=null===e||void 0===e?void 0:e.groups)&&void 0!==n?n:[]){var n;void 0!==i.lastUsed&&t.set(i.id,i.lastUsed)}return t},at=(e,t)=>
3{var n,i;return(0,o.uniqBy)([...null!==(n=null===e||void 0===e?void 0:e.groups)&&void 0!==n?n:[],...null!==(i=null===t||void 0===t?void 0:t.groups)&&void 0!==i?i:[]],"id")},rt=(e,t)=>(0!==e.seconds||0!==e.sessions)&&(!t||!nt(e.id,e.title)),lt=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e&&!t)return[];const{filterSystemApps:i=!1}=n,a=it(e),r=it(t),l=ot(t),s=(0,o.filter)((0,o.map)(at(e,t),(e=>{var t,n;const i=null!==(t=a.get(e.id))&&void 0!==t?t:0,o=null!==(n=r.get(e.id))&&void 0!==n?n:0;return{id:e.id,title:e.title,iconUrl:e.iconUrl,seconds:i,sessions:o,avgSessionSeconds:o>0?i/o:0,lastUsedDate:l.get(e.id)}})),(e=>rt(e,i)));return s},st=(e,t)=>(0,o.map)((0,o.filter)(lt(e,t,{filterSystemApps:!1}),(e=>nt(e.id,e.title))),"id"),dt=(e,t)=>(0,o.map)(lt(e,t,{filterSystemApps:!0}),(e=>{let{id:t,title:n}=e;return{id:t,title:n}})).sort(ze.IG),ct={appSeconds:{groupType:"app",unit:"seconds",periodKind:"single"},prevAppSeconds:{groupType:"app",unit:"seconds",periodKind:"prevSingle"},deviceCount:{groupType:"model",unit:"devices",periodKind:"single"},prevDeviceCount:{groupType:"model",unit:"devices",periodKind:"prevSingle"},appSessions:{groupType:"app",unit:"sessions",periodKind:"single",granularity:"day"},prevAppSessions:{groupType:"app",unit:"sessions",periodKind:"prevSingle",granularity:"day"},configSeconds:{groupType:"configuration",unit:"seconds",periodKind:"single"},configSessions:{groupType:"configuration",unit:"sessions",periodKind:"single",granularity:"day"},tagSeconds:{groupType:"tag",unit:"seconds",periodKind:"single"},tagSessions:{groupType:"tag",unit:"sessions",periodKind:"single",granularity:"day"},modelSeconds:{groupType:"model",unit:"seconds",periodKind:"single"},modelSessions:{groupType:"model",unit:"sessions",periodKind:"single",granularity:"day"},trendSeconds:{groupType:"model",unit:"seconds",periodKind:"single",granularity:"auto"},prevTrendSeconds:{groupType:"model",unit:"seconds",periodKind:"prevSingle",granularity:"auto"},heatmapSeconds:{groupType:"model",unit:"seconds",periodKind:"single",granularity:"hourOfWeek"},deviceSeconds:{groupType:"device",unit:"seconds",periodKind:"single"},prevDeviceSeconds:{groupType:"device",unit:"seconds",periodKind:"prevSingle"},deviceSessions:{groupType:"device",unit:"sessions",periodKind:"single",granularity:"day"},prevDeviceSessions:{groupType:"device",unit:"sessions",periodKind:"prevSingle",granularity:"day"}},ut=["deviceSeconds","prevDeviceSeconds","deviceSessions","prevDeviceSessions"],pt=["appSeconds","appSessions"],ht=["configSeconds","configSessions"],mt=e=>[...ut,..."configuration"===e?ht:pt],gt=["appSeconds","prevAppSeconds","appSessions","prevAppSessions","trendSeconds","prevTrendSeconds","heatmapSeconds"],vt={appSeconds:{groupType:"app",unit:"seconds",periodKind:"single"},appSessions:{groupType:"app",unit:"sessions",periodKind:"single",granularity:"day"},prevAppSeconds:{groupType:"app",unit:"seconds",periodKind:"prevSingle"},prevAppSessions:{groupType:"app",unit:"sessions",periodKind:"prevSingle",granularity:"day"}},Ct=e=>(0,o.sum)((0,o.values)((0,o.omit)(e,"period"))),xt=e=>{var t,n,i,a;const r=Object.fromEntries((0,o.map)((0,o.sortBy)(Object.entries(null!==(t=e.filters)&&void 0!==t?t:{}),(e=>{let[t]=e;return t})),(e=>{let[t,n]=e;return[t,[...null!==n&&void 0!==n?n:[]].sort()]})));return JSON.stringify({groupType:e.groupType,unit:e.unit,includeSystemApps:null!==(n=e.includeSystemApps)&&void 0!==n&&n,filters:r,periods:e.periods,granularity:null!==(i=e.granularity)&&void 0!==i?i:null,timezone:null!==(a=e.timezone)&&void 0!==a?a:null})},ft=(e,t)=>{const n=e=>new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"});return"Compared to previous period (".concat(n(e)," \u2013 ").concat(n(t-1),")")},bt=e=>{let t=Math.floor(e/3600),n=Math.round(e%3600/60);return 60===n&&(t+=1,n=0),t>0&&n>0?"".concat(ve(t),"h ").concat(n,"m"):t>0?"".concat(ve(t),"h"):n>0?"".concat(n,"m"):"0m"},yt=(e,t)=>{if(0===t&&0===e)return"0m";const n=bt(e);return"0m"===n?"< 1m":n},jt=e=>"".concat(ve(Math.ceil(e/3600)),"h"),Zt=(e,t)=>{if(0===t)return 0===e?{percentChange:0,direction:"flat"}:void 0;const n=(e-t)/t*100,i=Math.round(Math.abs(n));return 0===i?{percentChange:0,direction:"flat"}:{percentChange:i,direction:n>0?"up":"down"}},wt=(e,t)=>
3t?(e.startTime+e.endTime)/2:e.startTime,Et=(e,t)=>{if(!e)return[];const n=(0,o.map)(e.data,(e=>({date:wt(e.period,t),seconds:Ct(e)})));return(0,o.sortBy)(n,(e=>e.date))},St=(e,t)=>(0,o.orderBy)(lt(e,t),["seconds"],["desc"]),Dt=Date.UTC(2023,0,1),Mt=864e5,kt=(e,t)=>"".concat(e,"-").concat(t),It=e=>{if(!e)return[];const t=new Map;(0,o.forEach)(e.data,(e=>{var n;const i=e.period.startTime-Dt;if(i<0||i>=6048e5)return;const o=Math.floor(i/Mt),a=Math.floor(i%Mt/144e5),r=kt(o,a);t.set(r,(null!==(n=t.get(r))&&void 0!==n?n:0)+Ct(e))}));const n=[];for(let i=0;i<7;i+=1)for(let e=0;e<6;e+=1){const o=t.get(kt(i,e));void 0!==o&&n.push({dayIndex:i,blockIndex:e,seconds:o})}return n},At=e=>e?(0,o.sum)((0,o.map)(e.data,Ct)):0,Rt=e=>{if(!e)return 0;const t=new Map((0,o.map)(e.groups,(e=>[e.id,e])));let n=0;for(const i of e.data)for(const[e,a]of(0,o.entries)(i)){if("period"===e||"number"!==typeof a)continue;const i=t.get(e);i&&nt(i.id,i.title)||(n+=a)}return n},Tt=Rt,Pt=Rt,Lt=e=>e?(0,o.sum)((0,o.map)(e.data,Ct)):0,Nt=(e,t)=>t>0?e/t:0,Ut=e=>{const t=new Map;for(const a of null!==(n=null===e||void 0===e?void 0:e.data)&&void 0!==n?n:[]){var n;for(const[e,n]of(0,o.entries)(a)){var i;"period"!==e&&"number"===typeof n&&t.set(e,(null!==(i=t.get(e))&&void 0!==i?i:0)+n)}}return t},Ft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return;const{includeSystemApps:n=!1}=t,i=new Map((0,o.map)(e.groups,(e=>[e.id,e]))),a=Ut(e);let r;return a.forEach(((e,t)=>{if(e<=0)return;const o=i.get(t);var a;!n&&o&&nt(o.id,o.title)||(!r||e>r.seconds)&&(r={id:t,title:null!==(a=null===o||void 0===o?void 0:o.title)&&void 0!==a?a:t,iconUrl:null===o||void 0===o?void 0:o.iconUrl,
3seconds:e})})),r},Ot=(e,t)=>{var n;return null!==(n=Ut(e).get(t))&&void 0!==n?n:0},_t=e=>{let{deviceId:t,deviceSeconds:n,prevDeviceSeconds:i,deviceSessions:o,prevDeviceSessions:a,appSeconds:r,prevAppSeconds:l,includeSystemApps:s=!1}=e;const d=Ot(n,t),c=Ot(i,t),u=Ot(o,t),p=Ot(a,t),h=Nt(d,u),m=Nt(c,p),g=Ft(r,{includeSystemApps:s}),v=g?Ot(l,g.id):0;return{totalSeconds:d,activeDevices:0,sessionCount:u,avgSessionSeconds:h,topApp:g,trends:{totalUsage:Zt(d,c),sessions:Zt(u,p),avgSession:Zt(h,m),topApp:g?Zt(g.seconds,v):void 0}}},zt=e=>{let{configurationId:t,configSeconds:n,configSessions:i}=e;const o=Ot(n,t),a=Ot(i,t);return{totalSeconds:o,activeDevices:0,sessionCount:a,avgSessionSeconds:Nt(o,a),topApp:void 0,trends:{}}},Bt=e=>{let{appSeconds:t,prevAppSeconds:n,deviceCount:i,prevDeviceCount:o,appSessions:a,prevAppSessions:r,includeSystemApps:l=!1}=e;const s=l?At:Tt,d=l?At:Pt,c=s(t),u=s(n),p=Lt(i),h=Lt(o),m=d(a),g=d(r),v=Nt(c,m),C=Nt(u,g),x=Ft(t,{includeSystemApps:l}),f=x?Ot(n,x.id):0;return{totalSeconds:c,activeDevices:p,sessionCount:m,avgSessionSeconds:v,topApp:x,trends:{totalUsage:Zt(c,u),activeDevices:Zt(p,h),sessions:Zt(m,g),avgSession:Zt(v,C),topApp:x?Zt(x.seconds,f):void 0}}},Wt=(e,t)=>{if(e>=t)return{};const n=t-e;return{single:[{startTime:e,endTime:t}],prevSingle:[{startTime:Math.max(0,e-n),endTime:e}]}};var Vt=n(92810);const Gt=e=>{let{concurrency:t,maxSize:n}=e;const i=[],a={},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const i=(0,o.size)(a)+1>t,r=!!n&&((0,o.size)(a)>0&&(0,o.sumBy)((0,o.values)(a),"size")+e>n);return!i&&!r},l=()=>{const e=(0,o.findIndex)(i,(e=>{let{size:t}=e;return r(t)})),t=(0,o.pullAt)(i,e)[0];null===t||void 0===t||t.start()};return{add:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=0,order:o=Number.MAX_SAFE_INTEGER}=t;return new Promise(((t,s)=>{const d=async()=>{const i=(0,Vt.Z)();a[i]={size:n};try{const n=await e();t(n)}catch(o){s(o)}delete a[i],l()};r(n)?d():(i.push({size:n,order:o,start:d}),i.sort(((e,t)=>e.order-t.order)))}))}}},Ht=new Map,qt=(e,t,n,i)=>"".concat(e,"::").concat(t,"::").concat(n,"::").concat(i),Yt=(e,t,n)=>qt("charts",e,t,xt(n)),Kt=e=>{const t=Ht.get(e);if(void 0!==t){if(!(Date.now()-t.storedAt>216e5))return Ht.delete(e),Ht.set(e,t),t.data;Ht.delete(e)}},Xt=(e,t)=>{for(Ht.has(e)&&Ht.delete(e),Ht.set(e,{data:t,storedAt:Date.now()});Ht.size>50;){const e=Ht.keys().next().value;if(void 0===e)break;Ht.delete(e)}},Qt=Gt({concurrency:5}),Jt=e=>{let{enabled:t,filters:n,includeSystemApps:i,refreshKey:r,organizationId:l,rangePeriods:s,querySpecs:d=ct,clientCacheEnabled:c=!1}=e;const{requestAsync:u}=Oe(),{requestAsync:p}=_e(),h=(0,Le.ye)("enableAnalyticsBatchRequests"),[m,g]=(0,a.useState)({batchSignature:"",results:{}}),[v,C]=(0,a.useState)(!1),x=(0,a.useRef)(l),f=(0,a.useMemo)((()=>((e,t,n,i)=>{const o=new Map,a=[];for(const[l,s]of Object.entries(e)){var r;const e=null!==(r=t[s.periodKind])&&void 0!==r?r:[];if(0===e.length){a.push(l);continue}const d={periods:e,groupType:s.groupType,unit:s.unit,filters:n,includeSystemApps:i,...s.granularity?{granularity:s.granularity,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}:{}},c=xt(d),u=o.get(c);u?u.keys.push(l):o.set(c,{fingerprint:c,request:d,keys:[l]})}return{fetchGroups:Array.from(o.values()),idleKeys:a}})(d,s,n,i)),[d,n,i,s]),b=(0,a.useMemo)((()=>(e=>[...(0,o.map)(e.fetchGroups,"fingerprint").sort(),...e.idleKeys.slice().sort()].join("\0"))(f)),[f]),y=(0,a.useMemo)((()=>"".concat(b,"\0").concat(l,"\0").concat(r)),[l,b,r]);(0,a.useEffect)((()=>{const e=x.current!==l;if(x.current=l,g((t=>({batchSignature:y,results:c&&!e?t.results:{}}))),!t||0===f.fetchGroups.length)return void C(!1);const n=new AbortController,i=e=>qt("overview",l,r,e.fingerprint);let o=f.fetchGroups;if(c){const t=[];o=[];for(const e of f.fetchGroups){const n=Kt(i(e));n?t.push({keys:e.keys,data:n}):o.push(e)}g((n=>{if(n.batchSignature!==y)return n;const i=e?{}:{...n.results};for(const e of t)for(const t of e.keys)i[t]={data:e.data,status:"success"};return{...n,results:i}}))}if(0===o.length)return C(!1),()=>n.abort();C(c);const a=(e,t)=>{g((n=>{if(n.batchSignature!==y)return n;const i={...n.results};for(const o of e)i[o]=t;return{...n,results:i}}))},s=e=>{g((t=>{if(t.batchSignature!==y)return t;const n={...t.results};for(const i of e){const e=t.results[i];n[i]=void 0!==(null===e||void 0===e?void 0:e.data)?e:{data:void 0,status:"error"}}return{...t,results:n}}))},d=async()=>{await Promise.all(o.map((e=>Qt.add((async()=>
3{if(!n.signal.aborted)try{const t=await u({data:e.request,controller:n,shouldLogError:()=>!1});if(n.signal.aborted)return;a(e.keys,{data:t,status:"success"}),c&&t&&Xt(i(e),t)}catch(t){if(n.signal.aborted||(e=>e instanceof Error&&"CanceledError"===e.name)(t))return;c?s(e.keys):a(e.keys,{data:void 0,status:"error"})}}))))),n.signal.aborted||C(!1)};return h?(async()=>{const e=o.map(((e,t)=>({...e.request,key:String(t)})));let t,r;try{t=await p({data:{charts:e}})}catch(l){r=l}n.signal.aborted||(0,Ae.unstable_batchedUpdates)((()=>{o.forEach(((e,n)=>{var o;const l=r||null===(o=t)||void 0===o?void 0:o.results[String(n)];"ok"===(null===l||void 0===l?void 0:l.status)?(a(e.keys,{data:l.data,status:"success"}),c&&Xt(i(e),l.data)):c?s(e.keys):a(e.keys,{data:void 0,status:"error"})})),C(!1)}))})():d(),()=>n.abort()}),[h,y,c,t,u,p,l,f,r]);return{results:(0,a.useMemo)((()=>{if(!t)return{};const e=m.batchSignature===y?m.results:{},n={};for(const t of f.idleKeys)n[t]={data:void 0,status:"idle"};for(const t of f.fetchGroups)for(const o of t.keys){var i;n[o]=null!==(i=e[o])&&void 0!==i?i:{data:void 0,status:"loading"}}return n}),[y,m,t,f]),refreshing:v}},$t=(e,t)=>({loaded:(0,o.every)(t,(t=>{var n,i;return"success"===(i=null===(n=e[t])||void 0===n?void 0:n.status)||"error"===i||"idle"===i})),error:(0,o.some)(t,(t=>{var n;return"error"===(null===(n=e[t])||void 0===n?void 0:n.status)}))}),en=(e,t,n,i)=>{var o,a;return{status:$t(e,[t,n]),rows:lt(null===(o=e[t])||void 0===o?void 0:o.data,null===(a=e[n])||void 0===a?void 0:a.data,{filterSystemApps:null===i||void 0===i?void 0:i.filterSystemApps})}},tn=(e,t,n)=>{const i=e[t];if(null===i||void 0===i||!i.length)return e;const a=(0,o.filter)(i,(e=>n.has(e)));return a.length===i.length?e:(0,o.isEmpty)(a)?(0,o.omit)(e,t):{...e,[t]:a}},nn=(e,t,n)=>(0,o.isEmpty)(n)?(0,o.omit)(e,t):{...e,[t]:n},on=864e5,an=["appSeconds","prevAppSeconds"],rn=["deviceSeconds"],ln=["deviceCount","prevDeviceCount"],sn=["appSessions","prevAppSessions"],dn=["deviceSessions"],cn=["modelSeconds","modelSessions"],un=["trendSeconds","prevTrendSeconds"],pn=["heatmapSeconds"],hn={},mn=["deviceSeconds","deviceSessions","prevDeviceSeconds","prevDeviceSessions"],gn=function(){var e,t,n,i,r,l,s,d,c,p,h,m,g,v,C,x,f,b,y,j,Z,E,S,D,k,I,A;let R=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mode:T="org",deviceId:P}=R,L="device"===T,N=Je(),U=$e(),{organizationId:F}=(0,w.P)(),{analyticsChartRefreshTime:O,analyticsClientCacheEnabled:_,analyticsFilterLists:z}=Ve(),B=(0,u.v9)((e=>e.ui.analytics.duration)),W=(0,u.v9)((e=>e.ui.analytics.dateRange)),[V,G]=(0,a.useState)(!1),[H,q]=(0,a.useState)("fleet"),[Y,K]=(0,a.useState)({}),X=Qe(),{devices:Q,ensureDevicesLoaded:J}=Ye(),$=U&&!L?null===(e=Y.device)||void 0===e?void 0:e[0]:void 0,ee=U&&(L||Boolean($)),te=null!==P&&void 0!==P?P:$,ne=(0,a.useMemo)((()=>{var e;if(!te)return;const t=(0,o.find)(Q,(e=>e.id===te));return null===t||void 0===t||null===(e=t.deviceGroupRefPath)||void 0===e?void 0:e.split("/")[1]}),[Q,te]);(0,a.useEffect)((()=>{ee&&te&&J()}),[te,J,ee]),(0,a.useEffect)((()=>{q("fleet")}),[te]);const ie=(0,a.useMemo)((()=>te?{device:[te]}:{}),[te]),oe=(0,a.useMemo)((()=>ee?(0,o.pick)(ct,gt):U?ct:(0,o.omit)(ct,mn)),[ee,U]),ae=(0,a.useMemo)((()=>(0,o.pick)(ct,mt(H))),[H]),re=(0,a.useMemo)((()=>"configuration"===H&&ne?{configuration:[ne]}:hn),[H,ne]),le=(0,a.useMemo)((()=>JSON.stringify((0,o.omit)(Y,"app"))),[Y]),se=(0,a.useMemo)((()=>{const e=JSON.parse(le);return(0,o.isEmpty)(e)?hn:e}),[le]),[de,ce]=(0,a.useMemo)((()=>(0,M.HF)(B,W)),[W,B]),ue=ce-de<=on,pe=(0,a.useMemo)((()=>Wt(de,ce)),[ce,de]),{results:he}=Jt({enabled:N&&!ee,filters:se,includeSystemApps:!0,refreshKey:O,organizationId:F,rangePeriods:pe,querySpecs:vt}),me=(0,a.useMemo)((()=>{var e,t,n,i;return(0,o.uniq)([...st(null===(e=he.appSeconds)||void 0===e?void 0:e.data,null===(t=he.appSessions)||void 0===t?void 0:t.data),...st(null===(n=he.prevAppSeconds)||void 0===n?void 0:n.data,null===(i=he.prevAppSessions)||void 0===i?void 0:i.data)])}),[null===(t=he.appSeconds)||void 0===t?void 0:t.data,null===(n=he.appSessions)||void 0===n?void 0:n.data,null===(i=he.prevAppSeconds)||void 0===i?void 0:i.data,null===(r=he.prevAppSessions)||void 0===r?void 0:r.data]),ge=(0,a.useMemo)((()=>ee?{filters:ie,includeSystemApps:V}:et({overviewFilters:Y,includeSystemApps:V,systemAppIds:me})),[ie,V,ee,Y,me]),{results:ve,refreshing:Ce}=Jt({enabled:N,filters:ge.filters,includeSystemApps:ge.includeSystemApps,refreshKey:O,organizationId:F,rangePerio
3ds:pe,clientCacheEnabled:_,querySpecs:oe}),{results:xe}=Jt({enabled:N&&U&&ee&&Boolean(te)&&("fleet"===H||Boolean(ne)),filters:re,includeSystemApps:!1,refreshKey:O,organizationId:F,rangePeriods:pe,querySpecs:ae}),fe=(0,a.useMemo)((()=>$t(ee?xe:ve,ee?rn:an)),[xe,ee,ve]),be=(0,a.useMemo)((()=>$t(ve,ln)),[ve]),ye=(0,a.useMemo)((()=>$t(ee?xe:ve,ee?dn:sn)),[xe,ee,ve]),je=(0,a.useMemo)((()=>"configuration"===H?ht:pt),[H]),Ze=(0,a.useMemo)((()=>$t(xe,je)),[je,xe]),we=(0,a.useMemo)((()=>{var e,t,n,i;if(ee)return"configuration"===H&&ne?zt({configurationId:ne,configSeconds:null===(n=xe.configSeconds)||void 0===n?void 0:n.data,configSessions:null===(i=xe.configSessions)||void 0===i?void 0:i.data}):Bt({appSeconds:null===(e=xe.appSeconds)||void 0===e?void 0:e.data,appSessions:null===(t=xe.appSessions)||void 0===t?void 0:t.data,includeSystemApps:!1})}),[H,null===(l=xe.appSeconds)||void 0===l?void 0:l.data,null===(s=xe.appSessions)||void 0===s?void 0:s.data,null===(d=xe.configSeconds)||void 0===d?void 0:d.data,null===(c=xe.configSessions)||void 0===c?void 0:c.data,ee,ne]),Ee=(0,a.useMemo)((()=>{var e,t,n,i,o,a,r,l,s,d,c,u;const p=ee&&te?_t({deviceId:te,deviceSeconds:null===(e=xe.deviceSeconds)||void 0===e?void 0:e.data,prevDeviceSeconds:null===(t=xe.prevDeviceSeconds)||void 0===t?void 0:t.data,deviceSessions:null===(n=xe.deviceSessions)||void 0===n?void 0:n.data,prevDeviceSessions:null===(i=xe.prevDeviceSessions)||void 0===i?void 0:i.data,appSeconds:null===(o=ve.appSeconds)||void 0===o?void 0:o.data,prevAppSeconds:null===(a=ve.prevAppSeconds)||void 0===a?void 0:a.data,includeSystemApps:ge.includeSystemApps}):Bt({appSeconds:null===(r=ve.appSeconds)||void 0===r?void 0:r.data,prevAppSeconds:null===(l=ve.prevAppSeconds)||void 0===l?void 0:l.data,deviceCount:null===(s=ve.deviceCount)||void 0===s?void 0:s.data,prevDeviceCount:null===(d=ve.prevDeviceCount)||void 0===d?void 0:d.data,appSessions:null===(c=ve.appSessions)||void 0===c?void 0:c.data,prevAppSessions:null===(u=ve.prevAppSessions)||void 0===u?void 0:u.data,includeSystemApps:ge.includeSystemApps});return p.topApp?{...p,topApp:{...p.topApp,iconUrl:Ke(p.topApp.id,p.topApp.iconUrl,X)}}:p}),[X,te,null===(p=xe.deviceSeconds)||void 0===p?void 0:p.data,null===(h=xe.deviceSessions)||void 0===h?void 0:h.data,null===(m=xe.prevDeviceSeconds)||void 0===m?void 0:m.data,null===(g=xe.prevDeviceSessions)||void 0===g?void 0:g.data,ge.includeSystemApps,ee,null===(v=ve.appSeconds)||void 0===v?void 0:v.data,null===(C=ve.appSessions)||void 0===C?void 0:C.data,null===(x=ve.deviceCount)||void 0===x?void 0:x.data,null===(f=ve.prevAppSeconds)||void 0===f?void 0:f.data,null===(b=ve.prevAppSessions)||void 0===b?void 0:b.data,null===(y=ve.prevDeviceCount)||void 0===y?void 0:y.data]),Se=(0,a.useMemo)((()=>en(ve,"appSeconds","appSessions",{filterSystemApps:!ge.includeSystemApps})),[ge.includeSystemApps,ve]),De=(0,a.useMemo)((()=>Xe(Se.rows,X)),[X,Se.rows]),Me=(0,a.useMemo)((()=>en(xe,"deviceSeconds","deviceSessions")),[xe]),ke=(0,a.useMemo)((()=>en(ve,"deviceSeconds","deviceSessions")),[ve]),Ie=(0,a.useMemo)((()=>en(ve,"configSeconds","configSessions")),[ve]),Ae=(0,a.useMemo)((()=>en(ve,"tagSeconds","tagSessions")),[ve]),Re=(0,a.useMemo)((()=>en(he,"appSeconds","appSessions")),[he]),Te=(0,a.useRef)([]),Pe=(0,a.useMemo)((()=>{var e,t;if(!Re.status.loaded)return Te.current;const n=dt(null===(e=he.appSeconds)||void 0===e?void 0:e.data,null===(t=he.appSessions)||void 0===t?void 0:t.data);return Te.current=n,n}),[null===(j=he.appSeconds)||void 0===j?void 0:j.data,null===(Z=he.appSessions)||void 0===Z?void 0:Z.data,Re.status.loaded]);(0,a.useEffect)((()=>{if(ee||!Re.status.loaded)return;const e=new Set((0,o.map)(Pe,"id"));K((t=>{const n=t.app;if(null===n||void 0===n||!n.length)return t;const i=(0,o.filter)(n,(t=>e.has(t)));return i.length===n.length?t:(0,o.isEmpty)(i)?(0,o.omit)(t,"app"):{...t,app:i}}))}),[ee,Pe,Re.status.loaded]),(0,a.useEffect)((()=>{if(ee||!z)return;const e=new Set((0,o.map)(z.tag,"id")),t=new Set((0,o.map)(z.configuration,"id")),n=new Set((0,o.map)(z.model,"id"));K((i=>tn(tn(tn(i,"tag",e),"configuration",t),"model",n)))}),[z,ee]);const Le=(0,a.useMemo)((()=>$t(ve,cn)),[ve]),Ne=(0,a.useMemo)((()=>$t(ve,un)),[ve]),Ue=Ae.rows,Fe=(0,a.useMemo)((()=>{var e,t;return St(null===(e=ve.modelSeconds)||void 0===e?void 0:e.data,null===(t=ve.modelSessions)||void 0===t?void 0:t.data)}),[null===(E=ve.modelSeconds)||void 0===E?void 0:E.data,null===(S=ve.modelSessions)||void 0===S?void 0:S.data]),Oe=(0,a.useMemo)((()=>{var e;return Et(null===(e=ve.trendSeconds)||void 0===e?void 0:e.data,ue)}),[ue,null===(D=ve.trendSeconds)||void 0===D?void 0:D.data]),_e=(0,a.useMemo)((()=>{var e;return Et(null===(e=ve.prevTrendSeconds)||void 0===e?void 0:e.data,ue)}),[ue,null===(k=ve.prevTrendSeconds)||void 0===k?void 0:k.data]),ze=(0,a.useMemo)((()=>$t(ve,pn)),[ve]),Be=(0,a.useMemo)((()=>{var e;return It(null===(e=ve.heatmapSeconds)||void 0===e?void 0:e.data)}),[null===(I=ve.heatmapSeconds)||void 0===I?void 0:I.data]),We=(0,a.useCallback)((e=>{G(e)}),[]),Ge=(0,a.useCallback)((e=>{q(e)}
3),[]),He=(0,a.useMemo)((()=>({setOverviewAppFilter:e=>K((t=>nn(t,"app",e))),setOverviewConfigurationFilter:e=>K((t=>nn(t,"configuration",e))),setOverviewTagFilter:e=>K((t=>nn(t,"tag",e))),setOverviewModelFilter:e=>K((t=>nn(t,"model",e))),setOverviewDeviceFilter:e=>K((t=>e?{...t,device:[e]}:(0,o.omit)(t,"device")))})),[]);return(0,a.useMemo)((()=>{var e,t,n,i;const o=null===(e=pe.prevSingle)||void 0===e?void 0:e[0];return{periodStartMillis:de,prevPeriodStartMillis:null!==(t=null===o||void 0===o?void 0:o.startTime)&&void 0!==t?t:0,prevPeriodEndMillis:null!==(n=null===o||void 0===o?void 0:o.endTime)&&void 0!==n?n:0,isSingleDay:ue,metrics:Ee,totalUsageLoaded:fe.loaded,totalUsageError:fe.error,activeDevicesLoaded:!!ee||be.loaded,activeDevicesError:!ee&&be.error,sessionsLoaded:ye.loaded,sessionsError:ye.error,engagementByApp:Se.status.loaded?De:[],engagementLoaded:Se.status.loaded,engagementByDevice:ee?Me.status.loaded?Me.rows:[]:ke.status.loaded?ke.rows:[],deviceEngagementLoaded:ee?Me.status.loaded:ke.status.loaded,engagementByConfig:ee?[]:Ie.status.loaded?Ie.rows:[],configEngagementLoaded:!!ee||Ie.status.loaded,engagementByTag:ee?[]:Ae.status.loaded?Ue:[],tagEngagementLoaded:!!ee||Ae.status.loaded,engagementByModel:ee?[]:Le.loaded?Fe:[],modelLoaded:!!ee||Le.loaded,dailyUsage:Ne.loaded?Oe:[],prevDailyUsage:Ne.loaded?_e:[],dailyUsageLoaded:Ne.loaded,dailyUsageError:Ne.error,heatmapCells:ze.loaded?Be:[],heatmapLoaded:ze.loaded,heatmapError:ze.error,refreshing:!!Ce,includeSystemApps:V,setIncludeSystemApps:We,overviewFilters:L?ie:Y,...He,usedAppsInPeriod:ee?[]:Pe,usedAppsLoaded:!!ee||Re.status.loaded,orgMetrics:we,orgKpiLoaded:!ee||Ze.loaded,orgKpiError:!!ee&&Ze.error,orgAppSeconds:ee?null===(i=xe.appSeconds)||void 0===i?void 0:i.data:void 0,compareScope:H,setCompareScope:Ge}}),[be.error,be.loaded,Ie.status.loaded,Ie.rows,Oe,Ne.error,Ne.loaded,ie,Me.status.loaded,Me.rows,ke.status.loaded,ke.rows,Se.status.loaded,De,Fe,Ue,H,Ge,We,Be,ze.error,ze.loaded,V,ee,L,ue,Le.loaded,He,Y,_e,Ae.status.loaded,Ee,null===(A=xe.appSeconds)||void 0===A?void 0:A.data,Ze.error,Ze.loaded,we,pe,Ce,ye.error,ye.loaded,de,fe.error,fe.loaded,Pe,Re.status.loaded])},vn=(0,a.createContext)(void 0),Cn=e=>{var t;const n=!e.totalUsageLoaded||!e.sessionsLoaded||!e.engagementLoaded||!e.dailyUsageLoaded||!e.heatmapLoaded,i=e.totalUsageLoaded&&e.totalUsageError||e.sessionsLoaded&&e.sessionsError||e.dailyUsageLoaded&&e.dailyUsageError||e.heatmapLoaded&&e.heatmapError;return{deviceId:null===(t=e.overviewFilters.device)||void 0===t?void 0:t[0],periodStartMillis:e.periodStartMillis,prevPeriodStartMillis:e.prevPeriodStartMillis,prevPeriodEndMillis:e.prevPeriodEndMillis,isSingleDay:e.isSingleDay,metrics:e.metrics,orgMetrics:e.orgMetrics,org
3KpiLoaded:e.orgKpiLoaded,orgKpiError:e.orgKpiError,orgAppSeconds:e.orgAppSeconds,totalUsageLoaded:e.totalUsageLoaded,totalUsageError:e.totalUsageError,sessionsLoaded:e.sessionsLoaded,sessionsError:e.sessionsError,engagementByApp:e.engagementByApp,engagementLoaded:e.engagementLoaded,engagementByDevice:e.engagementByDevice,deviceEngagementLoaded:e.deviceEngagementLoaded,dailyUsage:e.dailyUsage,prevDailyUsage:e.prevDailyUsage,dailyUsageLoaded:e.dailyUsageLoaded,dailyUsageError:e.dailyUsageError,heatmapCells:e.heatmapCells,heatmapLoaded:e.heatmapLoaded,heatmapError:e.heatmapError,includeSystemApps:e.includeSystemApps,setIncludeSystemApps:e.setIncludeSystemApps,compareScope:e.compareScope,setCompareScope:e.setCompareScope,isLoading:n,hasError:i}},xn=e=>{let{children:t,value:n}=e;return(0,p.jsx)(vn.Provider,{value:n,children:t})},fn=e=>{let{children:t,deviceId:n}=e;const i=gn({mode:"device",deviceId:n}),o=(0,a.useMemo)((()=>Cn(i)),[i]);return(0,p.jsx)(xn,{value:o,children:t})},bn=()=>{const e=(0,a.useContext)(vn);if(!e)throw new Error("useDeviceAnalyticsContext() called outside of a DeviceAnalyticsProvider");return e},yn=()=>(0,a.useContext)(vn),jn=(0,a.createContext)(void 0),Zn=e=>{var t;let{children:n}=e;const i=gn(),o=$e()&&(null===(t=i.overviewFilters.device)||void 0===t?void 0:t[0]),r=(0,a.useMemo)((()=>o?Cn(i):void 0),[o,i]);return(0,p.jsx)(jn.Provider,{value:i,children:(0,p.jsx)(xn,{value:r,children:n})})},wn=()=>{const e=(0,a.useContext)(jn);if(!e)throw new Error("useAnalyticsOverviewContext() called outside of an AnalyticsOverviewProvider");return e},En=()=>(0,a.useContext)(jn);var Sn=n(83449),Dn=n(82851),Mn=n(49983),kn=n(5574),In=n(65661),An=n(39157),Rn=n(57482),Tn=n(51691),Pn=n(97123),Ln=n(48550);const Nn=(0,a.memo)((e=>{let{confirmationText:t,message:n,TextFieldProps:i,onConfirmationValidChange:o}=e;const[r,l]=(0,a.useState)(""),s=(0,a.useMemo)((()=>t===r),[r,t]);return(0,a.useEffect)((()=>{o&&o(s)}),[s,o]),(0,p.jsxs)(m.Z,{spacing:1,children:[n&&(0,p.jsx)(v.Z,{variant:"body2",color:"grey.700",children:n}),(0,p.jsx)(Ln.Z,{...i,placeholder:t,value:r,onChange:e=>l(e.target.value),fullWidth:!0,error:!s,autoFocus:!0,sx:null===i||void 0===i?void 0:i.sx,"data-testid":"confirmationInput"})]})}));var Un=n(89150);const Fn=(0,a.memo)((e=>{let{open:t,onClose:n,onConfirm:r,title:l="Delete",pending:s,message:d,content:c,confirmLabel:u="Delete",cancelLabel:h="Cancel",canDelete:m=!0,ConfirmationInputProps:g,disabled:v,maxWidth:f="xs"}=e;const[b,y]=(0,a.useState)(!g);return(0,p.jsxs)(kn.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:f,children:[(0,p.jsxs)(In.Z,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l,(0,p.jsx)(x.Z,{onClick:n,size:"small",disabled:s,children:(0,p.jsx)(J.Z,{})})]}),(0,p.jsx)(An.Z,{children:s?(0,p.jsx)(Rn.Z,{variant:"indeterminate"}):(0,p.jsxs)(p.Fragment,{children:[d&&(0,o.castArray)(d).map(((e,t)=>(0,p.jsx)(Tn.Z,{sx:{whiteSpace:"pre-wrap"},children:e},t))),c&&(0,p.jsx)(i.Z,{paddingBottom:g?2:0,children:c}),g&&(0,p.jsx)(Nn,{...g,onConfirmationValidChange:y})]})}),(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{disabled:s,onClick:n,variant:m?"text":"contained",children:m?h:"Ok"}),m&&(0,p.jsx)(Un.U,{color:"error",disabled:s||!b||v,onClick:()=>{b&&r()},variant:"contained","data-testid":"deleteDialog_submit",children:u})]})]})}));var On=n(99233),_n=n(68385),zn=n(61967);const Bn=e=>{var t;const[n,i]=(0,a.useState)(!1),[o,r]=(0,a.useState)(),[l,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{l||(i(!1),r(void 0))}),[l]),c=(0,a.useCallback)((e=>{r(e),i(!0)}),[]),u=e.onConfirm,p=(0,a.useCallback)((async()=>{o&&(s(!0),await u(o),i(!1),s(!1),r(void 0))}),[o,u]),h=e.getTitle,m=null!==(t=e.title)&&void 0!==t?t:h&&o?h(o):"",g=e.getMessage,v=(0,a.useMemo)((()=>{var t;return null!==(t=e.message)&&void 0!==t?t:g&&o?g(o):""}),[o,e.message,g]),C=e.getConfirmationInputProps,x=(0,a.useMemo)((()=>{var t;return null!==(t=e.ConfirmationInputProps)&&void 0!==t?t:C&&o?C(o):void 0}),[o,e.ConfirmationInputProps,C]),f=e.getContent,b=(0,a.useMemo)((()=>{var t;return null!==(t=e.content)&&void 0!==t?t:f&&o?f(o):null}),[o,e.content,f]),y=e.getCanDelete,j=(0,a.useMemo)((()=>y&&o?y(o):e.canDelete),[e.canDelete,o,y]);return(0,a.useMemo)((()=>({trigger:c,data:o,props:{open:n,onClose:d,onConfirm:p,title:m,pending:l,message:v,content:b,canDelete:j,confirmLabel:e.confirmLabel,cancelLabel:e.cancelLabel,ConfirmationInputProps:x,disabled:e.disabled}})),[c,o,n,d,p,m,l,v,b,j,e.confirmLabel,e.cancelLabel,x,e.disabled])};var Wn=n(68087);
3const Vn=n.p+"static/media/analyticsBannerBackground.7f49e3f5ae45b981ff4b28745e25dc3a.svg";var Gn=n(47283),Hn=n(95080),qn=n(56125),Yn=n(43896),Kn=n(50533),Xn=n(82853),Qn=n(10662),Jn=n(96808),$n=n(99259);const ei=e=>(0,p.jsx)($n.Z,{...e,viewBox:"-16 -16 120 120",children:(0,p.jsx)("path",{d:"m0,12.402,35.687-4.8602,0.0156,34.423-35.67,0.20313zm35.67,33.529,0.0277,34.453-35.67-4.9041-0.002-29.78zm4.3261-39.025,47.318-6.906,0,41.527-47.318,0.37565zm47.329,39.349-0.0111,41.34-47.318-6.6784-0.0663-34.739z"})}),ti=e=>"/downloadDeviceSetupTool?os=".concat(e),ni=e=>{let{buttonVariant:t,buttonWidth:n,hideLabel:i,analyticsLocation:o}=e;const a=[{href:ti("mac"),text:"Mac",startIcon:(0,p.jsx)(Qn.Z,{})},{href:ti("win"),text:"Windows",startIcon:(0,p.jsx)(ei,{})}];return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,justifyContent:"space-between",children:[!i&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,p.jsx)(Jn.Z,{sx:{color:y.DG.purple[400],fontSize:30}}),(0,p.jsx)(v.Z,{variant:"body1",color:"primary",children:"Device Setup Tool"})]}),(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:a.map((e=>(0,p.jsx)(Kn.Z,{variant:"body1",href:e.href,target:"_blank",sx:{textDecoration:"none"},underline:"none",onClick:()=>{return t=e.text,void(0,b.ec)("Device Setup Tool Download Clicked",{version:t,source:o});var t},children:(0,p.jsx)(C.Z,{variant:null!==t&&void 0!==t?t:"outlined",color:"primary",sx:{borderColor:y.DG.purple[200],width:null!==n&&void 0!==n?n:200},startIcon:e.startIcon,children:e.text})},e.href)))})]})};var ii=n(90493),oi=n(76278),ai=n(11034);const ri=e=>{let{open:t,onClose:n,scroll:r,maxWidth:l,tabs:s,sidebarBottomContent:d,tabsTitle:c,customDialogWidth:u,contentHeight:h,organizationId:g,userId:C}=e;const[x,f]=(0,a.useState)(0);(0,a.useEffect)((()=>{f(0)}),[t]),(0,a.useEffect)((()=>{f((e=>Math.min(e,s.length-1)))}),[s.length]);const y=(0,a.useMemo)((()=>{var e;const t=null===(e=s[x])||void 0===e?void 0:e.content;if(t)return{...t,onClose:n}}),[n,x,s]),j=(0,a.useCallback)(((e,t)=>{if(e===x)return;f(e);const n=window.location.pathname.replace(/\/$/,"");(0,b.A_)("".concat(n,"/").concat((0,o.kebabCase)(t)),g,C)}),[g,x,C]),Z=u?{sx:{maxWidth:u,width:"100%"}}:void 0;return(0,p.jsx)(kn.Z,{open:t,onClose:n,scroll:r,maxWidth:l,fullWidth:!0,PaperProps:Z,children:(0,p.jsxs)(m.Z,{direction:"row",height:1,overflow:"hidden",children:[(0,p.jsxs)(m.Z,{padding:2.5,width:270,flexShrink:0,spacing:2,overflow:"auto",children:[(0,p.jsxs)(ii.Z,{disablePadding:!0,children:[c&&(0,p.jsx)(oi.Z,{disabled:!0,children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"textPrimary",children:c})},c),(0,o.map)(s,((e,t)=>{let{label:n}=e;return(0,p.jsx)(oi.Z,{onClick:()=>j(t,n),selected:t===x,children:n},n)}))]}),(0,p.jsx)(i.Z,{flexGrow:1}),d]}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(Ie.Z,{orientation:"vertical"})}),(0,p.jsx)(i.Z,{flexGrow:1,overflow:"auto",sx:{overflowX:"auto"},children:y&&(0,p.jsx)(ai.i,{...y,contentHeight:h})})]})})};ri.displayName="UIDialogWithSidebarTabs";var li=n(88380),si=n(887),di=n(21888);const ci=(0,a.memo)((e=>{let{url:t,helpText:n,iconColor:o,useDiv:a,linkText:r}=e;const l=(0,p.jsx)(si.Z,{style:{fontSize:16,transform:"translateY(2px)",color:null!==o&&void 0!==o?o:y.DG.grey[800]}});return(0,p.jsx)(ee.Z,{disableInteractive:!1,title:(0,p.jsx)(m.Z,{children:(0,p.jsxs)(v.Z,{color:"text.secondary",variant:"body2",children:[(0,p.jsxs)("span",{children:[n," "]}),r?(0,p.jsx)(li.Q,{href:t,children:r}):(0,p.jsx)(li.Q,{href:t,children:"Learn\xa0More"})]})}),placement:"right",componentsProps:{tooltip:{sx:{bgcolor:"white",border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)"}}},children:a?(0,p.jsx)(i.Z,{onClick:e=>{e.stopPropagation(),e.preventDefault(),(0,di.UU)(t)},sx:{cursor:"pointer"},children:l}):(0,p.jsx)(Kn.Z,{href:t,target:"_blank",rel:"noreferrer noopener",children:l})})}));ci.displayName="UIHelpCenterLinkIcon";var ui=n(62151),pi=n(83134),hi=n.n(pi),mi=n(19938);const gi=(0,a.memo)((e=>{let{url:t,YoutubePlayerProps:n,width:i,videoTitle:o}=e;return(0,p.jsx)(hi(),{width:i,url:t,controls:!0,playIcon:(0,p.jsx)(mi.Z,{}),...n,onPlay:()=>(0,b.ec)("Video Played",{title:o,url:t})})}));var vi=n(21923),Ci=n(53416),xi=n(54898),fi=n(37355),bi=n(46055),yi=n(37032);const ji=()=>(0,p.jsxs)(m.Z,{spacing:1,sx:{backgroundColor:y.DG.grey[50],padding:2},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Need to buy devices?"}),(0,p.jsx)(v.Z,{variant:"body2",children:"Get connected to a trusted reseller in your region."}),(0,p.jsx)(C.Z,{variant:"outlined",onClick:()=>{(0,di.UU)("https://managexr.chilipiper.com/round-robin/in-product-onboarding-request-of-default-router-meeting")},startIcon:(0,p.jsx)(yi.Z,{sx:{color:y.DG.grey[800],"&.MuiSvgIcon-root":{fontSize:16},marginRight:-.25,marginTop:-.25}}),sx:{backgroundColor:y.DG.white,textTransform:"none",borderColor:y.DG.grey[300],color:y.DG.purple[700],"&:hover":{borderColor:y.DG.grey[300],backgroundColor:y.DG.grey[50]}},children:"Schedule meeting"})]});var Zi=n(13239),wi=n(66108);const Ei=e=>{let{filename:t,data:n,buttonText:i,buttonProps:o,onDownloaded:a}=e;return(0,p.jsx)(C.Z,{variant:"contained",startIcon:(0,p.jsx)(wi.Z,{}),onClick:()=>
3{if(!n)return;const e=JSON.stringify(n);(0,di.KG)({name:"".concat(t,".json"),type:"application/json",content:e}),null===a||void 0===a||a()},...o,children:null!==i&&void 0!==i?i:"Download as JSON"})};var Si=n(221);let Di,Mi;!function(e){e.QFB="QFB"}(Di||(Di={})),function(e){e.DefaultConfiguration="DEFAULT_CONFIGURATION",e.RegistrationCode="REGISTRATION_CODE"}(Mi||(Mi={}));const ki={[Mi.DefaultConfiguration]:"Default Configuration",[Mi.RegistrationCode]:"Configuration Code"},Ii=()=>{const{documents:e,fetched:t}=(0,E.D)(S.F.OrganizationEnrollmentConfigs);return(0,a.useMemo)((()=>{const n=e.filter((e=>e.type===Di.QFB));if(n.length>1){const e="Wrong number of QFB profiles found for a single organization: ".concat(n.length);(0,Si.yR)(new Error(e),{name:e})}return{enrollmentConfig:n[0],fetched:t}}),[e,t])},Ai={color:y.DG.white,textTransform:"none",backgroundColor:y.DG.purple[700],"&:hover":{backgroundColor:y.DG.purple[800]},"&.Mui-disabled":{color:y.DG.white,backgroundColor:y.DG.purple[700],opacity:.38}},Ri=()=>{var e;const{organization:t}=(0,d.mP)(),{configurationsFullAccess:n}=(0,w.P)(),{enrollmentConfig:o,fetched:a}=Ii(),r=null===(e=(0,z.T)("qfbJsonTemplate"))||void 0===e?void 0:e.template;if(!r)return null;if(!a)return(0,p.jsx)(i.Z,{display:"flex",justifyContent:"center",paddingY:1,children:(0,p.jsx)(Zi.Z,{size:24})});const l=JSON.stringify(r),s=JSON.parse(l.replace("{{enrollmentToken}}",(null===o||void 0===o?void 0:o.enrollmentToken)||"")),c=(new Date).toISOString().split("T")[0],u="meta-enrollment-token-".concat(t.name,"-").concat(c);return a&&!o&&!n?(0,p.jsx)(ee.Z,{title:(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",sx:{maxWidth:360},children:"You don't have access to download the organization enrollment token because you can't see the default enrollment configuration. Ask an admin if you need this file."}),placement:"top",componentsProps:{tooltip:{sx:{bgcolor:"background.paper",border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)"}}},children:(0,p.jsx)("span",{children:(0,p.jsx)(Ei,{buttonProps:{variant:"outlined",size:"large",disabled:!0,sx:Ai},buttonText:"Download Organization Enrollment Token",filename:u,data:s})})}):(0,p.jsx)(Ei,{buttonProps:{variant:"outlined",size:"large",sx:Ai},buttonText:"Download Organization Enrollment Token",filename:u,data:s})},Ti=()=>(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"enrollment-configs/:enrollmentConfigId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.OrganizationEnrollmentConfigs,id:null===t||void 0===t?void 0:t.enrollmentConfigId,update:n}}})),[]));var Pi=n(94454);const Li=(0,a.memo)((e=>{let{confirmationText:t,checkboxProps:n,onConfirmationValidChange:i}=e;const[o,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{i&&i(o)}),[o,i]),(0,p.jsxs)(m.Z,{spacing:1,direction:"row",alignItems:"flex-start",children:[(0,p.jsx)(Pi.Z,{...n,checked:o,onChange:()=>r(!o),autoFocus:!0,sx:{marginTop:-1.375,marginLeft:-1.5}}),t&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",onClick:()=>r(!o),children:t})]})}));var Ni=n(50303),Ui=n(52890),Fi=n(49974),Oi=n(7648),_i=n(61419),zi=n(40825);const Bi=(0,a.memo)((e=>{let{options:t,value:n,onChange:i,privilege:a,height:r,width:l,direction:s="row",wrap:d=!1}=e;return(0,p.jsx)(Oi.Z,{value:n,onChange:(e,t)=>
3i(t),children:(0,p.jsx)(zi.W,{privilege:a,children:(0,p.jsx)(m.Z,{direction:s,spacing:d?void 0:2,sx:d?{flexWrap:"wrap",gap:2}:void 0,children:(0,o.map)(t,(e=>(0,p.jsx)(Wi,{value:n,option:e,height:r,width:l,onChange:i},e.value)))})})})})),Wi=(0,a.memo)((e=>{let{value:t,option:n,height:o,width:r,onChange:l}=e;const s=(0,a.useMemo)((()=>t===n.value),[n.value,t]);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",spacing:.5,padding:1,paddingRight:1,sx:{cursor:n.disabled?"not-allowed":"auto",height:o,width:r,position:"relative",borderWidth:2,borderStyle:"solid",borderColor:s?y.DG.grey[300]:y.DG.grey[100],borderRadius:"6px","&:hover":{cursor:n.disabled?"not-allowed":"pointer"}},onClick:()=>!n.disabled&&l(n.value),children:[(0,p.jsx)(_i.Z,{checked:s,onChange:()=>l(n.value),value:n.value,disabled:n.disabled}),(0,p.jsxs)(m.Z,{paddingY:1.375,flexGrow:1,sx:{alignSelf:"stretch"},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:s?"text.primary":"text.secondary",children:n.label}),n.subtitle&&(0,p.jsx)(v.Z,{paddingTop:1,variant:"body2",color:s?"text.primary":"text.secondary",children:n.subtitle}),n.children&&(0,p.jsx)(i.Z,{paddingTop:2,sx:{flex:1,display:"flex",flexDirection:"column"},children:n.children})]})]})}));var Vi=n(40318);const Gi=e=>{let{isPending:t,savedText:n="Saved"}=e;return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:t?(0,p.jsx)(Zi.Z,{size:20}):(0,p.jsxs)(i.Z,{display:"flex",alignItems:"center",children:[(0,p.jsx)(Vi.Z,{sx:{fontSize:20,color:"success.main"}}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:n})]})})};var Hi=n(23786),qi=n(97464),Yi=n(51351);const Ki=e=>{var t,n,r,l,s,d;let{value:c,options:u,onChange:h,privilege:g,startIcon:C,inputProps:x,InputLabelProps:f,SelectProps:b,fullWidth:j,constrainItemWidth:Z=!1,stickyOptions:w,maxMenuHeight:E,warning:S=!1,warningText:D,testId:M,...k}=e;const I=(0,De.Z)(),A=(0,a.useMemo)((()=>new Set((0,o.map)(u,(e=>e.disabled?e.value:null)))),[u]),[R,T]=(0,a.useState)(0),{ref:P}=(0,Yi.y)((0,a.useCallback)((e=>{T(e.contentRect.width)}),[])),L=(0,a.useCallback)((e=>(0,o.isString)(e)?Z?(0,p.jsx)(Ui.G,{noWrap:!0,fontSize:"inherit",title:e}):(0,p.jsx)(v.Z,{noWrap:!0,fontSize:"inherit",children:e}):e),[Z]);return(0,p.jsx)(zi.W,{privilege:g,placement:"right-start",children:(0,p.jsxs)(i.Z,{minWidth:e=>e.spacing(16),display:"flex",position:"relative",width:j?1:"auto",ref:P,children:[(0,p.jsxs)(Ln.Z,{...k,helperText:S&&null!==D&&void 0!==D?D:k.helperText,inputProps:{...x,sx:{...null===x||void 0===x?void 0:x.sx,...Xi(c)?{color:"text.secondary"}:{},...C?{paddingLeft:6}:{}}},InputLabelProps:{...f,sx:{...null===f||void 0===f?void 0:f.sx,whiteSpace:"nowrap",pointerEvents:"none"}},SelectProps:{renderValue:e=>{var t,n;const i=null!==(t=(0,o.find)(w,(t=>t.value===e)))&&void 0!==t?t:(0,o.find)(u,(t=>t.value===e));return null!==(n=null===i||void 0===i?void 0:i.selectLabel)&&void 0!==n?n:null===i||void 0===i?void 0:i.label},...b,...(w||E)&&{MenuProps:{...null===b||void 0===b?void 0:b.MenuProps,...w&&{MenuListProps:{...null===b||void 0===b||null===(t=b.MenuProps)||void 0===t?void 0:t.MenuListProps,sx:{overscrollBehavior:"none",paddingTop:0,...null===b||void 0===b||null===(n=b.MenuProps)||void 0===n||null===(r=n.MenuListProps)||void 0===r?void 0:r.sx}}},...E&&{PaperProps:{...null===b||void 0===b||null===(l=b.MenuProps)||void 0===l?void 0:l.PaperProps,sx:{maxHeight:E,...y.WF,...null===b||void 0===b||null===(s=b.MenuProps)||void 0===s||null===(d=s.PaperProps)||void 0===d?void 0:d.sx}}}}}},value:c,onChange:e=>{const t=e.target.value;A.has(t)||h(t)},select:!0,margin:"none",fullWidth:!0,error:k.error||S,sx:e=>({...k.sx,...S&&!k.error?{"& .Mui-error":{color:e.palette.warning.dark,fieldset:{borderColor:"".concat(e.palette.warning.dark," !important")},"div.MuiInputBase-input":{color:"text.primary"}}}:{}}),"data-testid":M,children:[w&&(0,o.map)(w,(e=>{let{label:t,value:n,disabled:o}=e;return(0,p.jsx)(i.Z,{component:"li",onClick:()=>!o&&h(n),sx:{position:"sticky",top:0,zIndex:1,bgcolor:"background.paper",paddingX:2,paddingY:.75,cursor:o?"default":"pointer","&:hover":{bgcolor:o?"background.paper":"grey.100"}},children:L(t)},n)})),(0,o.map)(u,((e,t)=>
3{let{label:n,value:i,Icon:o,disabled:a,tooltip:r}=e;if("section_header"===i)return(0,p.jsx)(Hi.Z,{sx:{...I.typography.subtitle2,color:"primary.main","&.Mui-disabled":{opacity:1}},value:i,disabled:!0,children:L(n)},t);const l=(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,...Z&&{width:1,maxWidth:R},children:[o&&(0,p.jsx)(o,{color:"inherit",sx:{fontSize:"1.1rem",transform:"translateY(3px)"}}),L(n)]});return a&&r?(0,p.jsx)(Hi.Z,{sx:{cursor:"default",opacity:I.palette.action.disabledOpacity,"& > *":{overflow:"hidden"}},value:i,children:(0,p.jsx)(ee.Z,{title:r,followCursor:!0,placement:"top",children:l})},i):(0,p.jsx)(Hi.Z,{sx:Xi(i)?{color:"text.secondary"}:{"& > *":{overflow:"hidden"}},value:i,disabled:a,children:l},i)}))]}),C&&(0,p.jsx)(C,{sx:{color:"text.secondary",position:"absolute",top:e=>e.spacing(1.1),left:e=>e.spacing(1.5),pointerEvents:"none"}})]})})};function Xi(e){return e===qi.ki.None||e===qi.ki.Unmanaged||0===e}const Qi=(0,a.memo)(Ki),Ji=e=>{const{document:t,save:n,validate:i=(()=>!0),allowSaveWithoutChanges:r=!1}=e,[l,s]=(0,a.useState)({}),[d,c]=(0,a.useState)(!1),u=(0,a.useCallback)((e=>{const n={...l,...e};(0,o.forEach)(n,((e,i)=>{(0,o.isEqual)(e,t[i])&&delete n[i]})),s(n)}),[t,l]),p=(0,a.useCallback)((e=>{u(e),c(!0)}),[u]),h=(0,a.useCallback)((e=>{s(e?t=>(0,o.omit)(t,e):{})}),[]),m=(0,a.useMemo)((()=>({...t,...l})),[l,t]),g=!(0,o.isEmpty)(l),v=(0,a.useMemo)((()=>i(m)),[i,m]),[C,x]=(0,a.useState)(!1);(0,a.useEffect)((()=>{h()}),[t.id,h]);const f=(0,a.useCallback)((async()=>{if((g||r)&&v&&!C){x(!0);try{const e=await n({changes:l,withChanges:m});return x(!1),h(),e}catch(e){throw x(!1),e}}}),[r,l,v,h,g,n,C,m]);return(0,a.useEffect)((()=>{d&&(c(!1),f())}),[d,f]),(0,a.useMemo)((()=>({addChanges:u,addChangesAndSave:p,clearChanges:h,changes:l,withChanges:m,hasChanges:g,changesValid:v,saveChanges:f,saveChangesPending:C})),[u,p,h,l,m,g,v,f,C])};var $i=n(12350);const eo=[pe.Z.Viewer,pe.Z.Developer,pe.Z.Manager,pe.Z.Admin,pe.Z.Owner],to=()=>{const{documents:e}=(0,E.D)(S.F.UserOrganizationPrivileges),{documents:t}=(0,E.D)(S.F.UserRoles),n=(0,a.useMemo)((()=>{const n=(0,o.countBy)(e,"role"),i=(0,o.countBy)(e,"userRoleId");return[...(0,o.map)(eo,(e=>{var t;return{id:e,name:(0,o.capitalize)(e),usersAssigned:null!==(t=n[e])&&void 0!==t?t:0,isSystem:!0,privileges:Be.vc.organizationUsers.privilegesForRole[e],configurationsFullAccess:!0,approvedConfigurationIds:[]}})),...(0,o.map)(t,(e=>{var t,n,o;return{id:e.id,name:e.name,usersAssigned:null!==(t=i[e.id])&&void 0!==t?t:0,isSystem:!1,privileges:e.privileges,configurationsFullAccess:null===(n=e.configurationsFullAccess)||void 0===n||n,approvedConfigurationIds:null!==(o=e.approvedConfigurationIds)&&void 0!==o?o:[]}})).sort(ze.gt)]}),[e,t]),i=(0,a.useMemo)((()=>(0,o.keyBy)(n,"id")),[n]),r=(0,a.useCallback)((e=>{var t,n;return e.userRoleId&&null!==(t=null===(n=i[e.userRoleId])||void 0===n?void 0:n.name)&&void 0!==t?t:(0,o.capitalize)(e.role)}),[i]);return{userPrivileges:e,roles:n,rolesById:i,getRoleName:r}},no=e=>"".concat(bi.to[(0,$i.eH)(e)]," Mode"),io=e=>{let{autoSelectConfigurationId:t}=e;const{enrollmentConfig:n,fetched:o}=Ii(),{configurationsFullAccess:a}=(0,w.P)();return o?n?(0,p.jsx)(uo,{enrollmentConfig:n,autoSelectConfigurationId:t}):a?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Enrollment configuration is not set up for this organization."}):(0,p.jsx)(co,{}):(0,p.jsx)(i.Z,{display:"flex",justifyContent:"center",paddingY:2,children:(0,p.jsx)(Zi.Z,{size:24})})},oo=e=>{let{open:t,pendingConfigId:n,onConfirm:i,onCancel:r}=e;const{documents:l}=(0,E.D)(S.F.Configurations,{sort:ze.gt}),s=(0,Le.ye)("enableCustomUserRoles"),{rolesById:d,userPrivileges:c}=to(),u=(0,a.useMemo)((()=>(0,o.find)(l,(e=>e.id===n))),[l,n]),h=u?no(u.deviceExperienceMode):void 0,m=(0,a.useMemo)((()=>s&&n?(0,o.filter)(c,(e=>{if(!e.userRoleId)return!1;const t=d[e.userRoleId];return!!t&&(!t.configurationsFullAccess&&!t.approvedConfigurationIds.includes(n))})).length:0),[s,n,d,c]);return(0,p.jsxs)(Ni.Y,{open:t,onClose:r,onSubmit:i,title:"Set default enrollment configuration?",submitText:"Save",canSubmit:!!u,hideConfirmation:0===m,renderConfirmationComponent:m>0?e=>{let{onConfirmationValidChange:t}=e;return(0,p.jsx)(Li,{confirmationText:"I understand that some users won't be able to see newly enrolled devices",onConfirmationValidChange:t})}:void 0,children:[(0,p.jsxs)(v.Z,{variant:"body1",color:"text.secondary",children:["All Meta Quest devices that enroll in this organization will automatically be assigned to ",(0,p.jsx)("strong",{children:null===u||void 0===u?void 0:u.name})," in"," ",(0,p.jsx)("strong",{children:h}),"."]}),(0,p.jsxs)(li.Q,{href:Be.pB.step1LinkToSharedModesInfoDoc,children:["Learn more about Meta ",h]}),m>
30&&(0,p.jsx)(ui.Q,{severity:"warning",withBackground:!0,children:(0,p.jsxs)(v.Z,{variant:"body2",color:"text.primary",children:[(0,p.jsxs)("strong",{children:[m," user",1===m?"":"s"]})," ","in this organization ",1===m?"does":"do"," not have access to ",(0,p.jsx)("strong",{children:null===u||void 0===u?void 0:u.name}),". If they enroll a Meta device, it will be assigned to this configuration but won't be visible to them until an admin with access moves it to a configuration they can view."]})})]})},ao=(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",sx:{maxWidth:360},children:"You don't have access to the configuration that is set as the default. This means that if you register a device to this organization, you won't be able to see the device. If you need to register devices, ask an admin to change this setting."}),ro="restricted",lo={placement:"bottom",componentsProps:{tooltip:{sx:{bgcolor:"background.paper",border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)"}}}},so=(0,a.memo)((()=>(0,p.jsx)(ee.Z,{title:ao,...lo,children:(0,p.jsx)(i.Z,{component:"span",display:"block",sx:{width:"90%"},children:(0,p.jsx)(Qi,{sx:{width:"100%"},value:ro,constrainItemWidth:!0,options:[{value:ro,label:"Restricted Configuration"}],label:"Configuration",onChange:()=>{},disabled:!0})})})));so.displayName="RestrictedDefaultEnrollmentConfigurationLabel";const co=()=>(0,p.jsx)(m.Z,{sx:{width:"100%"},children:(0,p.jsx)(so,{})}),uo=e=>{let{enrollmentConfig:t,autoSelectConfigurationId:n}=e;const{documents:r,fetched:l}=(0,E.D)(S.F.Configurations,{sort:ze.gt}),{request:s}=Ti(),d=(0,a.useCallback)((async e=>{let{withChanges:n}=e;await s({params:{enrollmentConfigId:t.id},data:(0,o.pick)(n,["method","configurationId"]),errorMessage:"Failed to save changes"})}),[t.id,s]),{addChangesAndSave:c,withChanges:u,saveChangesPending:h}=Ji({document:t,save:d}),g=(0,a.useRef)(!1);(0,a.useEffect)((()=>{if(g.current||!n)return;if(!l)return;if(!(0,o.some)(r,(e=>e.id===n)))return;g.current=!0;t.method===Mi.DefaultConfiguration&&t.configurationId===n||c({method:Mi.DefaultConfiguration,configurationId:n})}),[n,r,l,t,c]);const C=u.configurationId,[x,f]=(0,a.useState)(!1),[b,y]=(0,a.useState)(null),j=(0,a.useCallback)((async()=>{b&&(c({method:Mi.DefaultConfiguration,configurationId:b}),f(!1),y(null))}),[c,b]),Z=(0,a.useCallback)((()=>{f(!1),y(null)}),[]),w=(0,a.useCallback)((e=>{const t=e;t!==u.method&&(t===Mi.RegistrationCode?c({method:Mi.RegistrationCode}):C&&c({method:Mi.DefaultConfiguration,configurationId:C}))}),[c,C,u.method]),D=(0,a.useCallback)((e=>{y(e),f(!0)}),[]),M=(0,a.useMemo)((()=>u.method===Mi.DefaultConfiguration&&!!C&&l&&!(0,o.some)(r,(e=>e.id===C))),[r,l,C,u.method]),k=(0,a.useMemo)((()=>(0,o.map)(r,(e=>{const t=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ui.G,{noWrap:!0,title:e.name}),(0,p.jsx)(Fi._,{tooltipContent:(0,p.jsxs)(v.Z,{variant:"body2",color:"text.primary",children:["Devices enrolled via Meta Horizon use Meta device modes: Shared Mode or Individual Mode. It is important to apply the correct mode at enrollment time."," ",(0,p.jsx)(li.Q,{href:Be.pB.step1LinkToSharedModesInfoDoc,children:"Learn More"})]}),TooltipProps:{disableInteractive:!1},children:(0,p.jsx)(v.Z,{color:"text.secondary",variant:"overline",children:no(e.deviceExperienceMode)})})]});return{value:e.id,label:t,selectLabel:(0,p.jsx)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:t})}}))),[r]),I=(0,a.useMemo)((()=>(0,p.jsx)(Gi,{isPending:h})),[h]),A=(0,a.useMemo)((()=>[{value:Mi.DefaultConfiguration,label:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsxs)(v.Z,{variant:"inherit",children:["Default Configuration"," ",(0,p.jsx)(i.Z,{component:"span",color:"text.secondary",children:"(Recommended)"})]}),u.method===Mi.DefaultConfiguration&&I]}),subtitle:"Automatically apply a default configuration during enrollment.",children:M?(0,p.jsx)(so,{}):(0,p.jsx)(Qi,{sx:{width:"90%"},value:C,constrainItemWidth:!0,options:k,label:"Configuration",onChange:D,privilege:"configurations",disabled:u.method!==Mi.DefaultConfiguration||h}
3),disabled:h},{value:Mi.RegistrationCode,label:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{variant:"inherit",children:"Configuration Code"}),u.method===Mi.RegistrationCode&&I]}),subtitle:"Enter a Configuration Code in-headset to assign a configuration at enrollment time. Find the code on each configuration.",disabled:h}]),[k,D,M,h,I,C,u.method]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Bi,{options:A,value:u.method,onChange:w,privilege:"configurations",direction:"column"}),(0,p.jsx)(oo,{open:x,pendingConfigId:b,onConfirm:j,onCancel:Z})]})};var po=n(85523),ho=n(9955),mo=n(63466),go=n(56448),vo=n(60255),Co=n(8253),xo=n(6365);const fo={downloadUrl:"",versionName:"",loading:!1,error:!1,permanentReason:null},bo=e=>{var t;switch(null===(t=(0,Fe.tf)(e))||void 0===t?void 0:t.code){case Fe.Xt.QrProvisioningBuildNotPublished:return"notPublished";case Fe.Xt.QrProvisioningUnsupportedPackage:return"misconfigured";default:return null}},yo=e=>{const{requestAsync:t}=(0,Fe.ji)({method:"get",path:"apks/qr-provisioning/:packageName/download-url"}),[n,i]=(0,a.useState)(fo),o=(0,a.useRef)(),r=null===e||void 0===e?void 0:e.downloadUrlOverride,l=null===e||void 0===e?void 0:e.packageName,s=!!e,d=(0,a.useCallback)((()=>{var e;if(null===(e=o.current)||void 0===e||e.abort(),o.current=void 0,!s)return i(fo);if(r)return i({...fo,downloadUrl:r});if(!l)return i({...fo,error:!0,permanentReason:"misconfigured"});const n=new AbortController;o.current=n,i({...fo,loading:!0}),t({params:{packageName:l},controller:n,shouldLogError:e=>!(e=>null!==bo(e))(e)}).then((e=>{var t;n.signal.aborted||i({downloadUrl:e.downloadUrl,versionName:null!==(t=e.versionName)&&void 0!==t?t:"",loading:!1,error:!1,permanentReason:null})})).catch((e=>{n.signal.aborted||i({...fo,error:!0,permanentReason:bo(e)})}))}),[s,r,l,t]);return(0,a.useEffect)((()=>(d(),()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.abort()})),[d]),{...n,retry:d}},jo=["enrollmentToken","registrationCode","downloadUrl"],Zo=new RegExp("\\{\\{(".concat(jo.join("|"),")\\}\\}"),"g"),wo=/\{\{[^}]*\}\}/g,Eo=(e,t)=>{if((0,o.isString)(e))for(const i of null!==(n=e.match(wo))&&void 0!==n?n:[]){var n;t.includes(i)||t.push(i)}else Array.isArray(e)?e.forEach((e=>Eo(e,t))):(0,o.isPlainObject)(e)&&Object.values(e).forEach((e=>Eo(e,t)))},So=(e,t)=>(0,o.isString)(e)?e.replace(Zo,((e,n)=>t[n])):Array.isArray(e)?e.map((e=>So(e,t))):(0,o.isPlainObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{let[n,i]=e;return[n,So(i,t)]}))):e,Do=e=>{var t;let{template:n,enrollmentToken:i,configurations:o,configurationId:a,downloadUrl:r,wifi:l}=e;return((e,t,n)=>{const{enrollmentToken:i,registrationCode:o,downloadUrl:a}=t;if(!e||!i||!o||!a)return null;const r=[];Eo(e,r);const l=jo.map((e=>"{{".concat(e,"}}")));if(l.some((e=>!r.includes(e))))return null;if(r.some((e=>!l.includes(e))))return null;const s=Object.fromEntries(Object.entries(e).map((e=>{let[t,n]=e;return[t,So(n,{enrollmentToken:i,registrationCode:o,downloadUrl:a})]})));return null!==n&&void 0!==n&&n.ssid&&(s["android.app.extra.PROVISIONING_WIFI_SSID"]=n.ssid,s["android.app.extra.PROVISIONING_WIFI_SECURITY_TYPE"]=n.password?"WPA":"NONE",n.password&&(s["android.app.extra.PROVISIONING_WIFI_PASSWORD"]=n.password)),s})(n,{enrollmentToken:i,registrationCode:null===(t=o.find((e=>e.id===a)))||void 0===t?void 0:t.registrationCode,downloadUrl:r},l)};var Mo=n(20741);const ko="Pico Neo 3 / Neo 3 Eye",Io="Pico 4 / 4 Ultra Enterprise / G3 / Swan",Ao=(e,t)=>{switch(e){case bi.p6.Pico:return"neo3"===t?"pico2":"nohome";case bi.p6.Samsung:case bi.p6.HTC:case"OTHER":return"vr";case bi.p6.DPVR:return;default:return e}};var Ro=n(49388);const To=240,Po=()=>{const e=Math.min(window.innerWidth-96,window.innerHeight-360);return Math.round(Math.max(240,Math.min(900,e)))},Lo=()=>(0,p.jsx)(m.Z,{alignItems:"center",justifyContent:"center",sx:{width:To,height:To},children:(0,p.jsx)(Zi.Z,{size:24})}),No=(0,a.memo)((e=>{let{data:t,size:n,onRenderFailedChange:i}=e;const o=(0,a.useRef)(null),[r,l]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const e=o.current;e&&Mo.toCanvas(e,t,{width:2*n,margin:2,errorCorrectionLevel:"L",color:{dar
3k:y.DG.black,light:y.DG.white}},(o=>{if(o)return l(t),null===i||void 0===i||i(!0),void(0,Si.yR)(o,{name:"QR enrollment render error"});l(null),null===i||void 0===i||i(!1),e.style.width="".concat(n,"px"),e.style.height="".concat(n,"px")}))}),[t,n,i]),r===t?(0,p.jsx)(m.Z,{alignItems:"center",justifyContent:"center",sx:{width:n,height:n},children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",textAlign:"center",children:"Could not generate a QR code for this configuration."})}):(0,p.jsx)("canvas",{ref:o,style:{display:"block",width:"".concat(n,"px"),height:"".concat(n,"px")}})}));No.displayName="QrCanvas";const Uo=(0,a.memo)((e=>{let{data:t,vendor:n,configurationName:i}=e;const{notify:o}=(0,ie.o)(),[r,l]=(0,a.useState)(!1),[s,d]=(0,a.useState)(!1),c=(e=>{const[t,n]=(0,a.useState)(Po);return(0,a.useEffect)((()=>{if(!e)return;n(Po());let t=0;const i=()=>{cancelAnimationFrame(t),t=requestAnimationFrame((()=>n(Po())))};return window.addEventListener("resize",i),()=>{cancelAnimationFrame(t),window.removeEventListener("resize",i)}}),[e]),t})(r),u=(0,a.useCallback)((()=>l(!0)),[]),h=(0,a.useCallback)((()=>l(!1)),[]),g=(0,a.useCallback)((async()=>{try{const e=await Mo.toDataURL(t,{width:1e3,margin:2,errorCorrectionLevel:"L",color:{dark:y.DG.black,light:y.DG.white}});(0,di.Sv)(e,((e,t)=>{const n=(null!==t&&void 0!==t?t:"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return n?"qr-enrollment-".concat(e,"-").concat(n,".png"):"qr-enrollment-".concat(e,".png")})(n,i))}catch(e){o({severity:"error",message:"Failed to download QR code"}),(0,Si.yR)(e,{name:"QR enrollment download error"})}}),[t,n,i,o]);return(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1,children:[s?(0,p.jsx)(No,{data:t,size:To,onRenderFailedChange:d}):(0,p.jsx)(Hn.Z,{onClick:u,"aria-label":"Enlarge the enrollment QR code for scanning",sx:{padding:.75,borderRadius:2,border:"1px solid",borderColor:"grey.300",display:"inline-flex","&:hover":{borderColor:"grey.400"}},children:(0,p.jsx)(No,{data:t,size:To,onRenderFailedChange:d})}),!s&&(0,p.jsx)(C.Z,{size:"small",startIcon:(0,p.jsx)(wi.Z,{}),onClick:g,children:"Download QR code"}),(0,p.jsx)(Ro.Q,{open:r,onClose:h,maxWidth:!1,customDialogWidth:c+96,title:"Scan this QR code",leftActions:(0,p.jsx)(C.Z,{startIcon:(0,p.jsx)(wi.Z,{}),onClick:g,children:"Download QR code"}),rightActions:(0,p.jsx)(C.Z,{onClick:h,children:"Close"}),children:(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1.5,children:[(0,p.jsx)(No,{data:t,size:c}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",textAlign:"center",children:["Keep the whole code inside the headset's view, with space around it, and hold steady. If it will not read, step back rather than closer.",i?" Enrolls into ".concat(i,"."):""]})]})})]})}));Uo.displayName="EnrollmentQRCanvas";const Fo={[bi.p6.Pico]:["Power on the factory reset or out-of-the-box device and complete initial setup","Connect to Wi-Fi when prompted, unless it is embedded in the QR code below",'In the "Quick Setup For Your PICO Business Headset" screen, select Quick Setup',"Select Scan QR Code","Scan this QR code with the headset, keeping the whole code inside the view",'In the "Let\'s set up your work device" screen, select Accept & Continue','In the "This device isn\'t private" screen, select Next',"Setup restarts once enrollment finishes. Continue through it, and select Continue rather than Quick Setup"],[bi.p6.Samsung]:["Factory reset the device, or power on a new one, and begin initial setup","On the Welcome screen, press the main button on the headset 6 times to trigger Enterprise Mode","Confirm the Enterprise Mode notification","Continue through setup until the QR code screen appears","Scan this QR code with the device camera","Connect to Wi-Fi when prompted, unless it is embedded in the QR code below","Wait for the Admin App to download and install","Grant any permissions the enrollment screen asks for, then return to it"],[bi.p6.HTC]:["Factory reset or power on the device for the first time","Put on the headset and press the headset button 3 times in succession to enable QR code scanning",'Click "Download QR code", then dis
3play or print it at least 15 x 15 cm before scanning',"Scan this QR code on the computer screen using the headset (15 to 20 cm distance, QR code at least 15 x 15 cm)","Follow the onscreen instructions to complete enrollment"],OTHER:["Factory reset the device, or power on a new one","On the welcome screen, tap the same spot 6 times to start QR enrollment","Continue through setup until the QR code screen appears","Scan this QR code with the device camera"]},Oo=['Click "Download QR code" and save the file to a USB-C flash drive, directly on the drive and not inside a folder. The Neo 3 cannot scan QR codes, so it reads this file instead',"Plug the drive into the headset, then power on the factory reset or out-of-the-box device and complete initial setup","Connect to Wi-Fi when prompted",'In the "Quick Setup For Your PICO Business Headset" screen, select Quick Setup',"Open Local Storage, go to the flash drive, and select the QR code file","Follow the onscreen instructions to complete enrollment"],_o=(e,t)=>"mxr-qr-enrollment-config-".concat(e,"-").concat(t),zo={notPublished:"The Admin App isn't published for this device type yet.",misconfigured:"QR enrollment is not set up for this device type. Contact [email protected].",transient:"Could not resolve the admin app download URL."},Bo=[{value:"neo3",label:ko},{value:"pico4",label:Io}],Wo=(0,a.memo)((e=>{var t;let{vendor:n}=e;const{organization:r}=(0,d.mP)(),{enrollmentConfig:l,fetched:s}=Ii(),c=(0,z.T)("qrProvisioningTemplate"),u=(0,xo.ty)(S.F.Public,"qrProvisioningTemplate"),{documents:h,fetched:g}=(0,E.D)(S.F.Configurations,{sort:ze.gt}),[f,b]=(0,a.useState)("pico4"),[j,Z]=(0,a.useState)((()=>{var e;return null!==(e=localStorage.getItem(_o(r.id,n)))&&void 0!==e?e:""})),[w,D]=(0,a.useState)(!1),[M,k]=(0,a.useState)(""),[I,A]=(0,a.useState)(""),[R,T]=(0,a.useState)(!1),P=(0,a.useMemo)((()=>{var e;return null===(e=h.find((e=>e.id===j)))||void 0===e?void 0:e.name}),[h,j]),L=n===bi.p6.Pico&&"neo3"===f,N=L?Oo:Fo[n],U=Ao(n,f),F=U?null===c||void 0===c||null===(t=c.profiles)||void 0===t?void 0:t[U]:void 0,{downloadUrl:O,versionName:_,loading:B,error:W,permanentReason:V,retry:G}=yo(F),H=(0,a.useCallback)((e=>{Z(e),localStorage.setItem(_o(r.id,n),e)}),[r.id,n]),q=(0,a.useCallback)((()=>{T((e=>!e))}),[]);(0,a.useEffect)((()=>{var e;if(!g)return;if(h.some((e=>e.id===j)))return;const t=null===l||void 0===l?void 0:l.configurationId,n=null!==(e=h.find((e=>e.id===t)))&&void 0!==e?e:h[0];n&&H(n.id)}),[g,h,j,l,H]);const Y=(0,a.useMemo)((()=>h.map((e=>({value:e.id,label:e.name})))),[h]),K=w&&!L,X=K&&!M.trim(),Q=!!M.trim()&&M.trim()!==M,J=(0,a.useMemo)((()=>{const e=Do({template:null===F||void 0===F?void 0:F.template,enrollmentToken:null===l||void 0===l?void 0:l.enrollmentToken,configurations:h,configurationId:j,downloadUrl:O,wifi:X?void 0:K?{ssid:M,password:I||void 0}:void 0});return e?JSON.stringify(e):""}),[X,F,l,h,j,O,K,M,I]),$=!J&&!B&&!W&&!!F&&h.some((e=>e.id===j))&&!(null===l||void 0===l||!l.enrollmentToken);(0,a.useEffect)((()=>{$&&(0,Si.yR)(new Error("QR provisioning template did not produce a payload"),{name:"QR enrollment template invalid",contexts:{qrEnrollment:{profileKey:U,configurationId:j}}})}),[$,U,j]);const ee=(0,a.useMemo)((()=>{const e=Do({template:null===F||void 0===F?void 0:F.template,enrollmentToken:null===l||void 0===l?void 0:l.enrollmentToken,configurations:h,configurationId:j,downloadUrl:O});return e?(e=>{if(!e)return null;try{const{version:t}=Mo.create(e,{errorCorrectionLevel:"L"});return 17+4*t}catch{return null}})(JSON.stringify(e)):null}),[F,l,h,j,O]),te=ee&&ee>93?ee:null;(0,a.useEffect)((()=>{te&&(0,Si.yR)(new Error("QR provisioning template composes to ".concat(te," modules, above the ").concat(93," a headset reads reliably")),{name:"QR enrollment payload oversized",contexts:{qrEnrollment:{profileKey:U,modules:te,limit:93}}})}),[te,U]);const ne=(0,a.useMemo)((()=>0===Y.length?"This organization has no configurations to enroll into.":"Select a configuration to generate a QR code."),[Y.length]);return s&&g&&u?null!==l&&void 0!==l&&l.enrollmentToken?F?(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",spacing:3,children:[(0,p.jsxs)(m.Z,{spacing:1,sx:{flex:1},children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Enrollment Steps"}),(0,p.jsx)(m.Z,{spacing:.5,children:(0,o.map)(N,((e,t)=>(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"flex-start",children:[(0,p.jsx)(v.Z,{variant:"caption",sx:{minWidth:18,height:18,borderRadius:"50%",backgroundColor:y.DG.grey[200],color:y.DG.grey[700],display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,fontSize:"0.65rem",flexShrink:0,marginTop:"2px"},children:t+1}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:e})]},e)))}),L&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Already use ADB? Instead of a flash drive, run adb push <file name>.png /sdcard/Download/ and select the file from the Download folder in Local Storage."})]}),(B||!W&&!!J)&&(0,p.jsx)(i.Z,{sx:{flexShrink:0},children:B?(0,p.jsx)(Lo,{}):(0,p.jsxs)(m.Z,{alignItems:"center",spacing:.5,children:[(0,p.jsx)(Uo,{data:J,vendor:n,configurationName:P}),X&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"No Wi-Fi included yet"}),!!_&&(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:["Admin App ",_]})]})})]}
3),!B&&W&&(0,p.jsx)(ui.Q,{severity:"error",withBackground:!0,children:(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"body2",children:zo[null!==V&&void 0!==V?V:"transient"]}),!V&&(0,p.jsx)(C.Z,{size:"small",onClick:G,children:"Retry"})]})}),!B&&!W&&!J&&$&&(0,p.jsx)(ui.Q,{severity:"error",withBackground:!0,children:(0,p.jsx)(v.Z,{variant:"body2",children:"QR enrollment is not set up correctly for this device type. Contact [email protected]."})}),!B&&!W&&!J&&!$&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:ne}),n===bi.p6.Pico&&(0,p.jsx)(Qi,{fullWidth:!0,size:"small",label:"Device model",value:f,options:Bo,onChange:b}),(0,p.jsx)(Qi,{fullWidth:!0,size:"small",label:"Configuration",value:j,options:Y,onChange:H}),!L&&(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(po.Z,{control:(0,p.jsx)(ho.Z,{size:"small",checked:w,onChange:(e,t)=>D(t)}),label:(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(go.Z,{sx:{fontSize:16}}),(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Include Wi-Fi network"})]})}),w&&(0,p.jsxs)(m.Z,{spacing:1.5,sx:{paddingLeft:1},children:[(0,p.jsx)(Ln.Z,{fullWidth:!0,size:"small",label:"Network name (SSID)",value:M,onChange:e=>k(e.target.value),autoComplete:"off",helperText:X?"Enter a network name to include Wi-Fi in the QR code":Q?"This network name starts or ends with a space. Network names are matched exactly, so remove it unless the space is intentional.":void 0}),(0,p.jsx)(Ln.Z,{fullWidth:!0,size:"small",label:"Wi-Fi password",type:R?"text":"password",value:I,onChange:e=>A(e.target.value),autoComplete:"new-password",InputProps:{endAdornment:(0,p.jsx)(mo.Z,{position:"end",children:(0,p.jsx)(x.Z,{size:"small",edge:"end","aria-label":R?"Hide Wi-Fi password":"Show Wi-Fi password",onClick:q,children:R?(0,p.jsx)(vo.Z,{fontSize:"small"}):(0,p.jsx)(Co.Z,{fontSize:"small"})})})},helperText:"Leave blank only for open networks \u2014 the device will join without a password. The password is embedded in the QR code (not stored in ManageXR). Enterprise networks (802.1X) are not supported."})]})]})]}):(0,p.jsx)(ui.Q,{severity:"warning",withBackground:!0,children:(0,p.jsx)(v.Z,{variant:"body2",children:"QR code enrollment is not available for this device type yet."})}):(0,p.jsx)(ui.Q,{severity:"warning",withBackground:!0,children:(0,p.jsx)(v.Z,{variant:"body2",children:"Enrollment configuration is not set up for this organization. QR code enrollment requires an enrollment token."})}):(0,p.jsx)(i.Z,{display:"flex",justifyContent:"center",paddingY:4,children:(0,p.jsx)(Zi.Z,{size:24})})}));Wo.displayName="DeviceQRCodeEnrollment";const Vo=e=>{let{selected:t,onClick:n,title:i,caption:o}=e;return(0,p.jsxs)(Hn.Z,{onClick:n,"aria-pressed":t,sx:{paddingX:2,paddingY:1,borderRadius:1.5,border:"2px solid",borderColor:t?"primary.main":y.DG.grey[200],flex:1,flexDirection:"column",textAlign:"center",transition:"border-color 0.15s","&:hover":{borderColor:t?"primary.main":y.DG.grey[400]},"&.Mui-focusVisible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}},children:[i,(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:o})]})},Go=e=>{let{analyticsLocation:t,helpVideoUrl:n,showSupportedDevices:i,vendor:o}=e;const r=(0,d.P)("ENABLE_QR_CODE_ENROLLMENT"),[l,s]=(0,a.useState)("dst"),c=(0,p.jsxs)(p.Fragment,{children:[i&&(0,p.jsxs)(v.Z,{variant:"body2",children:["ManageXR supports most Android-based mobile devices, including XR headsets, tablets, and phones. See our list of"," ",(0,p.jsx)(li.Q,{href:Be.IW.supportedDevices,children:"officially supported devices"})," ","for details."]}),(0,p.jsxs)(v.Z,{variant:"body2",children:["To add devices, use the ManageXR Device Setup Tool. See the"," ",(0,p.jsx)(li.Q,{href:Be.IW.registerDevicesWithDeviceSetupTool,children:"device setup guide"})," ","for more information."]}),(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1,children:[(0,p.jsx)(v.Z,{variant:"overline",color:"text.secondary",children:"Download Device Setup Tool"}),(0,p.jsx)(ni,{buttonVariant:"contained",buttonWidth:150,analyticsLocation:t,hideLabel:!0})]}),n&&(0,p.jsx)(gi,{url:n,width:600})]});return r&&void 0!==Ao(o,"pico4")?(0,p.jsxs)(m.Z,{spacing:3,paddingRight:4,maxWidth:700,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Vo,{selected:"dst"===l,onClick:()=>s("dst"),title:(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Device Setup Tool"}),caption:"USB or sideload"}),(0,p.jsx)(Vo,{selected:"qr"===l,onClick:()=>s("qr"),title:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"center",spacing:.5,children:[(0,p.jsx)(vi.Z,{fontSize:"small"}),(0,p.jsx)(v.Z,{variant:"subtitle2",children:"QR Code"}),(0,p.jsx)(ke.Z,{label:"NEW",size:"small",color:"primary",sx:{height:18,fontSize:"0.55rem",fontWeight:700}})]}),caption:"Scan after factory reset"})]}),(0,p.jsx)(Ie.Z,{}),"dst"===l?(0,p.jsx)(m.Z,{spacing:4,children:c}):(0,p.jsx)(Wo,{vendor:o})]}):(0,p.jsx)(m.Z,{spacing:4,paddingRight:4,maxWidth:700,children:c})},Ho=()=>{const{dashboardStats:e}=(0,Xn.w)(),t=(0,a.useMemo)((()=>{var t;return(null!==(t=null===e||void 0===e?void 0:e.deviceEnrollmentCounts[bi.HL.QFB])&&void 0!==t?t:0)>0}),[e]),[n,o]=(0,a.useState)(!0);(0,a.useEffect)((()=>{t&&o(!1)}),[t]);
3const[r,l]=a.useState("text"),[s,d]=a.useState("text");return(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:"Step 1: Adjust enrollment settings"}),(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"Enrollment Configuration Assignment"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Every device on ManageXR is managed by a configuration. Choose how a configuration is assigned to your devices during enrollment."})]}),(0,p.jsx)(i.Z,{paddingLeft:3,paddingRight:3,paddingBottom:2,children:(0,p.jsx)(io,{})})]}),(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(m.Z,{direction:"column",spacing:2,children:(0,p.jsxs)(v.Z,{variant:"subtitle1",color:"text.primary",sx:{display:"inline",paddingRight:8},children:["Step 2: Create a third-party MDM enrollment for ManageXR in your Meta Horizon Admin Center"," ",t&&(0,p.jsx)(v.Z,{component:"span",variant:"body2",color:"text.secondary",children:"If you already did this step, you can skip it"})]})}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(qn.Z,{in:n,children:(0,p.jsxs)(m.Z,{spacing:2,direction:"column",children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"To create a third-party MDM enrollment for ManageXR in your Meta Horizon managed services Admin Center, you'll need your Organization Enrollment Token"}),(0,p.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",padding:1},children:(0,p.jsx)(Ri,{})}),(0,p.jsxs)(Sn.ZP,{value:r,children:[(0,p.jsx)(i.Z,{children:(0,p.jsxs)(Gn.Z,{onChange:(e,t)=>
3{l(t)},sx:{width:"100%",display:"flex"},children:[(0,p.jsx)(Yn.Z,{label:"Instructions",value:"text",sx:{textTransform:"none",flex:1}}),(0,p.jsx)(Yn.Z,{icon:(0,p.jsx)(Ci.Z,{}),iconPosition:"start",label:"Video Tutorial",value:"video",sx:{textTransform:"none",flex:1}})]})}),(0,p.jsx)(Dn.Z,{value:"text",sx:{padding:0},children:(0,p.jsx)(m.Z,{spacing:2,paddingLeft:2,children:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["1. Download your ",(0,p.jsx)("b",{children:"Organization Enrollment Token"})," ","above"]}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["2. Go to your"," ",(0,p.jsx)(li.Q,{href:Be.pB.metaHorizonLink,children:"Meta Horizon Admin Center"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"3. Go to Devices"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"4. Go to Third-party MDMs"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"5. Create new third-party MDM enrollment"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"6. Select ManageXR"}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["7. Upload your ",(0,p.jsx)("b",{children:"Organization Enrollment Token"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"8. Save as Default Enrollment method (recommended)"})]})})}),(0,p.jsx)(Dn.Z,{value:"video",children:(0,p.jsx)(m.Z,{spacing:2,paddingLeft:2,children:(0,p.jsx)("video",{src:"https://storage.googleapis.com/mighty-platform-dev/public/Create%20a%20third-party%20MDM%20enrollment%20for%20ManageXR%20on%20Meta%20Horizon.mp4",height:"100%",width:"100%",controls:!0,autoPlay:!0,loop:!0})})})]}),(0,p.jsx)(i.Z,{})]})}),t&&(0,p.jsx)(Kn.Z,{variant:"body2",onClick:()=>{o((e=>!e))},sx:{textDecoration:"none",cursor:"pointer"},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:["".concat(n?"Hide":"Show"," full instructions"),n?(0,p.jsx)(xi.Z,{fontSize:"inherit"}):(0,p.jsx)(fi.Z,{fontSize:"inherit"})]})})]})]}),(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:"Step 3: Enroll your devices"}),(0,p.jsxs)(Sn.ZP,{value:s,children:[(0,p.jsx)(i.Z,{children:(0,p.jsxs)(Gn.Z,{onChange:(e,t)=>
3{d(t)},sx:{width:"100%",display:"flex"},children:[(0,p.jsx)(Yn.Z,{label:"Instructions",value:"text",sx:{textTransform:"none",flex:1}}),(0,p.jsx)(Yn.Z,{icon:(0,p.jsx)(Ci.Z,{}),iconPosition:"start",label:"Video Tutorial",value:"video",sx:{textTransform:"none",flex:1}})]})}),(0,p.jsx)(Dn.Z,{value:"text",sx:{padding:0},children:(0,p.jsxs)(m.Z,{spacing:2,paddingLeft:2,children:[(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["1. Go to your"," ",(0,p.jsx)(li.Q,{href:Be.pB.metaHorizonLink,children:"Meta Horizon Admin Center"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"2. Navigate to Managed Devices"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"3. Click Enroll Devices"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"4. Select your ManageXR enrollment"}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["5. Grab your ",(0,p.jsx)("b",{children:"new or factory reset"})," ",(0,p.jsx)(ci,{helpText:"You must use a brand new or factory reset Meta Quest device. MDM enrollment happens during the initial out of box experience, so it is not possible to enroll Quest devices in an MDM from the consumer Meta Universal Menus. Learn how to factory reset a Quest device here:",url:Be.IW.factoryResetButtons})," ","Quest device"]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"6. Start going through the out of box experience in-headset"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"7. Enter the temporary device code you see in-headset in the Meta Horizon Admin Center"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"8. Proceed through the in-headset steps to complete ManageXR enrollment"})]}),(0,p.jsx)(ui.Q,{severity:"info",withBackground:!0,children:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Tip! End-User or BYOD Enrollment"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Set ManageXR as your Default Enrollment in your Meta Horizon Admin Center to allow users to enroll devices from"," ",(0,p.jsx)(li.Q,{href:"https://work.meta.com/device",children:"work.meta.com/device"}),". This allows end-users to enroll devices without full admin access to the Meta Horizon Admin Center."]}),(0,p.jsx)(li.Q,{variant:"body2",href:Be.pB.step3EndUserSetupInstructionsDevicePage,children:"Learn More"})]})})]})}),(0,p.jsx)(Dn.Z,{value:"video",sx:{padding:0},children:(0,p.jsx)(m.Z,{spacing:2,paddingLeft:2,children:(0,p.jsx)("video",{src:"https://storage.googleapis.com/mighty-platform-dev/public/Enrolling%20devices.mp4",height:"100%",width:"100%",controls:!0,autoPlay:!0,loop:!0})})})]})]})]})},qo=(0,a.memo)((e=>{let{open:t,onClose:n,analyticsLocation:i}=e;const{organizationId:o,user:a}=(0,w.P)(),r=(0,d.P)("ENABLE_QR_CODE_ENROLLMENT");return(0,p.jsx)(ri,{organizationId:o,userId:a.id,scroll:"paper",contentHeight:700,customDialogWidth:970,tabs:[{label:"Meta",content:{title:(0,p.jsx)(m.Z,{direction:"row",children:(0,p.jsxs)(v.Z,{variant:"h6",color:"text.secondary",sx:{display:"inline"},children:["Enroll Meta Quest Devices",(0,p.jsxs)(v.Z,{component:"span",variant:"body2",color:"text.secondary",children:[" ","through Meta Horizon managed services"]})]})}),children:(0,p.jsx)(Ho,{})}},{label:"Pico",content:{title:"Enroll Pico Devices",children:(0,p.jsx)(Go,{helpVideoUrl:"https://youtu.be/paw4H0EK09o",analyticsLocation:i,vendor:bi.p6.Pico},"pico")}},...r?[{label:"Galaxy XR",content:{title:"Enroll Galaxy XR Devices",children:(0,p.jsx)(Go,{analyticsLocation:i,vendor:bi.p6.Samsung},"galaxy")}}]:[],{label:"HTC",content:{title:"Enroll HTC Devices",children:(0,p.jsx)(Go,{helpVideoUrl:"https://youtu.be/FkGaT-THQ8M",analyticsLocation:i,vendor:bi.p6.HTC},"htc")}},{label:"DPVR",content:{title:"Enroll DPVR Devices",children:(0,p.jsx)(Go,{analyticsLocation:i,vendor:bi.p6.DPVR},"dpvr")}},{label:"Other Devices",content:{title:"Enroll Other Devices",children:(0,p.jsx)(Go,{analyticsLocation:i,showSupportedDevices:!0,vendor:"OTHER"},"other")}}],tabsTitle:"Add new devices",open:t,onClose:n,sidebarBottomContent:(0,p.jsx)(ji,{})})})),Yo=e=>e||Be.vc.vrContent.defaultIconUrl,Ko=(0,a.memo)((e=>{let{iconUrl:t,sx:n,...o}=e;const r=Be.vc.vrContent.defaultIconUrl,[l,s]=(0,a.useState)((()=>Yo(t))),d=(0,a.useRef)(null);return(0,a.useEffect)((()=>{s(Yo(t))}),[t]),(0,a.useEffect)((()=>{const e=d.current;if(!e)return;const t=()=>{s((e=>e===r?e:r))};return e.addEventListener("error",t),e.complete&&0===e.naturalWi
3dth&&t(),()=>e.removeEventListener("error",t)}),[r]),(0,p.jsx)(re.Z,{...o,sx:n,children:(0,p.jsx)(i.Z,{ref:d,alt:"",component:"img",src:l,sx:{height:"100%",objectFit:"cover",width:"100%"}})})}));Ko.displayName="UIContentIconAvatar";const Xo=(0,a.memo)((e=>{let{trend:t,loading:n,trendTooltip:i}=e;if(n)return(0,p.jsx)(g.Z,{variant:"text",width:100,height:14,"data-testid":"analytics-kpi-trend-loading-skeleton"});if(!t)return null;const{indicator:o,bgcolor:a,color:r}=(e=>"flat"===e.direction?{indicator:"-",bgcolor:"grey.50",color:"grey.600"}:"up"===e.direction?{indicator:"\u2191",bgcolor:y.DG.success[50],color:"success.dark"}:e.percentChange<=10?{indicator:"\u2193",bgcolor:"grey.50",color:"grey.600"}:{indicator:"\u2193",bgcolor:y.DG.warning[50],color:"warning.dark"})(t),l="flat"===t.direction?"No change":"".concat(o," ").concat(t.percentChange,"%"),s=(0,p.jsx)(ke.Z,{size:"small",label:l,sx:{height:22,fontSize:11,fontWeight:400,bgcolor:a,color:r}});return i?(0,p.jsx)(ee.Z,{title:i,placement:"top",children:s}):s}));Xo.displayName="AnalyticsKpiTrendLabel";const Qo={flex:1,minWidth:0,boxShadow:"0 1px 4px rgba(0,0,0,0.06)",borderRadius:2,position:"relative"},Jo={flex:1,minWidth:0,boxShadow:"none",borderRadius:2,bgcolor:"background.paper"},$o={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",lineHeight:1.3},ea={...$o,minHeight:"3.9rem"},ta={width:24,height:24,display:"inline-flex",verticalAlign:"middle",marginRight:.75},na={minHeight:"1.66em"},ia=(0,a.memo)((e=>{let{variant:t="overview"}=e;return(0,p.jsx)(Me.Z,{variant:"device"===t?"elevation":"outlined",elevation:"device"===t?0:void 0,sx:"device"===t?Jo:Qo,children:(0,p.jsxs)(m.Z,{padding:2,spacing:1,children:[(0,p.jsx)(g.Z,{variant:"text",width:80,height:16}),(0,p.jsx)(g.Z,{variant:"text",width:"60%",height:36,"data-testid":"analytics-kpi-value-loading-skeleton"}),(0,p.jsx)(g.Z,{variant:"text",width:100,height:14})]})})}));ia.displayName="AnalyticsKpiCardSkeleton";const oa=(0,a.memo)((e=>{var t,n;let{title:o,value:r,valueTooltip:l,subtitle:s,trend:d,iconUrl:c,showIcon:u,loading:h,error:g,empty:C,refreshing:x,variant:f="overview",prevPeriodStartMillis:b,prevPeriodEndMillis:y}=e;const j=En(),Z=null!==(t=null!==b&&void 0!==b?b:null===j||void 0===j?void 0:j.prevPeriodStartMillis)&&void 0!==t?t:0,w=null!==(n=null!==y&&void 0!==y?y:null===j||void 0===j?void 0:j.prevPeriodEndMillis)&&void 0!==n?n:0,[E,S]=(0,a.useState)(!1),[D,M]=(0,a.useState)(),{ref:k}=(0,Yi.y)((0,a.useCallback)((e=>{M(e.contentRect.width)}),[])),I=(0,a.useMemo)((()=>ft(Z,w)),[w,Z]);if((0,a.useLayoutEffect)((()=>{const e=k.current;if(!e)return;const t=parseFloat(getComputedStyle(e).lineHeight)||e.offsetHeight;S(e.scrollHeight>1.5*t)}),[r,g,C,D,k]),h)return(0,p.jsx)(ia,{variant:f});const A=g?"Unavailable":C?"\u2014":r,R=l&&A?(0,p.jsx)(ee.Z,{title:l,enterDelay:1e3,children:(0,p.jsx)("span",{children:A})}):A;return(0,p.jsxs)(Me.Z,{variant:"device"===f?"elevation":"outlined",elevation:"device"===f?0:void 0,sx:"device"===f?Jo:Qo,children:[x&&(0,p.jsx)(i.Z,{sx:{position:"absolute",top:8,right:8,zIndex:1},children:(0,p.jsx)(Zi.Z,{size:16})}),(0,p.jsxs)(m.Z,{padding:2,spacing:.5,height:1,sx:{opacity:x?.5:1,transition:"opacity 150ms ease"},children:[(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"overline",color:"text.secondary",fontWeight:600,children:o}),(0,p.jsxs)(v.Z,{ref:k,variant:u||E?"h4":"h3",fontWeight:700,color:g||C?"text.secondary":"text.primary",sx:u?ea:$o,children:[u&&(0,p.jsx)(Ko,{variant:"rounded",iconUrl:c,sx:ta}),R]})]}),(0,p.jsxs)(m.Z,{alignItems:"flex-start",spacing:.5,marginTop:"auto",children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:na,children:s}),(0,p.jsx)(Xo,{trend:d,trendTooltip:d?I:void 0})]})]})]})}));oa.displayName="AnalyticsKpiCard";const aa=(0,a.memo)((()=>{const{organization:e}=(0,d.mP)(),{metrics:t,activeDevicesLoaded:n,activeDevicesError:i,refreshing:o}=wn(),a=n&&i;return(0,p.jsx)(oa,{title:"Active Devices",value:ve(t.activeDevices),subtitle:a?void 0:"of ".concat(ve(e.numActiveDevices)," enrolled"),trend:a?void 0:t.trends.activeDevices,loading:!n,error:a,refreshing:o})}));aa.displayName="AnalyticsActiveDevicesKpiCard";const ra=()=>{const e=yn(),t=En(),n=null!==e&&void 0!==e?e:t;if(!n)throw new Error("useAnalyticsScopedOverviewData() called outside of an analytics provider");return n};var la=n(80720),sa=n(36996),da=n(48080),ca=n(49484),ua=n(79907),pa=n(38940);const ha="Ranked by total usage",ma=1.5,ga=["sessions","avgSessionSeconds","lastUsedDate"],va={"&:hover":{bgcolor:"grey.50"}},Ca=(0,a.memo)((e=>{let{children:t,"data-testid":n,gridSx:o,hoverable:a=!0,href:r,linkLabel:l,rowSx:s,showRowDividers:d=!0}=e;
3const c={...o,...r?{color:"inherit",cursor:"pointer",textDecoration:"none"}:void 0,...a?va:void 0,...s};return(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(i.Z,{alignItems:"center","aria-label":r?l:void 0,component:r?f.rU:"div","data-testid":n,paddingBottom:ma,paddingTop:ma,sx:c,to:r,children:t}),d&&(0,p.jsx)(Ie.Z,{})]})}));Ca.displayName="AnalyticsEngagementTableRowLayout";const xa=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300;const[t,n]=(0,a.useState)(!1),[i,o]=(0,a.useState)(""),r=(0,zn.c)(i,e),[l,s]=(0,a.useState)(""),d=(0,a.useRef)(!1);(0,a.useEffect)((()=>{s(r.trim().toLowerCase())}),[r]);const c=(0,a.useCallback)((()=>{n((e=>(e||(d.current=!0),e&&(o(""),s("")),!e)))}),[]),u=(0,a.useCallback)((()=>!!d.current&&(d.current=!1,!0)),[]),p=(0,a.useCallback)((e=>{o(e.target.value)}),[]),h=(0,a.useCallback)((()=>{i?o(""):c()}),[c,i]);return{consumePendingSearchFocus:u,globalFilter:l,handleSearchClearClick:h,handleSearchInputChange:p,handleSearchToggle:c,searchExpanded:t,searchInputValue:i}},fa=(0,a.memo)((e=>{let{loadingTestId:t="analytics-engagement-table-loading"}=e;return(0,p.jsx)(m.Z,{"data-testid":t,spacing:0,paddingX:2,paddingBottom:2,children:(0,o.map)((0,o.range)(3),(e=>(0,p.jsx)(g.Z,{variant:"rectangular",height:48,sx:{marginBottom:e<2?1:0}},e)))})}));fa.displayName="AnalyticsEngagementTableSkeleton";const ba=(0,a.memo)((e=>{let{clearTestId:t="engagement-search-clear",consumePendingSearchFocus:n,expanded:i,inputTestId:o="searchInput",onClearClick:r,onInputChange:l,onToggle:s,placeholder:d,value:c}=e;const u=(0,a.useRef)(null),h=(0,a.useRef)(null),g=(0,a.useRef)(!1),v=(0,a.useRef)(i),C=(0,a.useRef)(s),f=(0,a.useRef)(c);v.current=i,C.current=s,f.current=c,(0,a.useLayoutEffect)((()=>{var e;i&&n()&&(null===(e=h.current)||void 0===e||e.focus())}),[n,i]),(0,a.useEffect)((()=>()=>{v.current&&!f.current.trim()&&C.current()}),[]);const b=(0,a.useCallback)((()=>{!i||c.trim()||g.current||(g.current=!0,s(),window.setTimeout((()=>{g.current=!1}),0))}),[i,s,c]),y=(0,a.useCallback)((()=>{b()}),[b]),j=(0,a.useCallback)((e=>{const t=e.relatedTarget;window.setTimeout((()=>{var e;const n=null!==t&&void 0!==t?t:document.activeElement;n&&null!==(e=u.current)&&void 0!==e&&e.contains(n)||b()}),0)}),[b]);return(0,p.jsx)(ca.Z,{onClickAway:y,children:(0,p.jsxs)(m.Z,{ref:u,alignItems:"center",direction:"row",spacing:1,children:[i&&(0,p.jsx)(Ln.Z,{inputRef:h,inputProps:{"data-testid":o},onBlur:j,onChange:l,placeholder:d,size:"small",sx:{width:200},value:c,InputProps:{startAdornment:(0,p.jsx)(mo.Z,{position:"start",children:(0,p.jsx)(ua.Z,{sx:{color:"grey.500",fontSize:18}})}),endAdornment:(0,p.jsx)(mo.Z,{position:"end",children:(0,p.jsx)(x.Z,{"data-testid":t,onClick:r,size:"small",children:(0,p.jsx)(pa.Z,{sx:{fontSize:16}})})})}}),!i&&(0,p.jsx)(x.Z,{"aria-label":"Search table",onClick:s,size:"small",children:(0,p.jsx)(ua.Z,{sx:{fontSize:18}})})]})})}));ba.displayName="AnalyticsEngagementTableSearch";const ya=(0,a.memo)((e=>{let{children:t,consumePendingSearchFocus:n,emptyLabel:o,expanded:a,hasMore:r,hasRows:l,hasVisibleRows:s,loading:d,loadingTestId:c,onExpandToggle:u,onSearchClearClick:h,onSearchInputChange:g,onSearchToggle:x,searchClearTestId:f,searchExpanded:b,searchInputTestId:y,searchInputValue:j,searchPlaceholder:Z,showShadow:w=!0,subtitle:E,tableContent:S,title:D,viewAllLabel:M,visibleRowCount:k}=e;return(0,p.jsx)(Me.Z,{variant:"outlined",sx:{boxShadow:w?"0 1px 4px rgba(0,0,0,0.06)":"none",borderRadius:2,width:1},children:(0,p.jsxs)(m.Z,{padding:2,spacing:1.5,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,children:[(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(v.Z,{fontWeight:600,variant:"subtitle1",children:D}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:E})]}),l&&!d&&(0,p.jsx)(ba,{clearTestId:f,consumePendingSearchFocus:n,expanded:b,inputTestId:y,onClearClick:h,onInputChange:g,onToggle:x,placeholder:Z,value:j})]}),d?(0,p.jsx)(fa,{loadingTestId:c}):l&&s?(0,p.jsxs)(i.Z,{children:[S,(0,p.jsx)(i.Z,{sx:a?{maxHeight:480,overflowY:"auto"}:void 0,children:t})]}):(0,p.jsx)(m.Z,{alignItems:"center",justifyContent:"center",minHeight:120,children:(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:o})}),r&&(0,p.jsx)(C.Z,{onClick:u,size:"small",sx:{alignSelf:"center",textTransform:"none"},children:a?"Show less":"View all ".concat(k," ").concat(M)})]})})}));ya.displayName="AnalyticsEngagementTableLayout";const ja=["title"],Za={display:"grid",gap:2,gridTemplateColumns:"1.5fr 1fr 80px 125px 110px",paddingX:1},wa=e=>e.column.getIsSorted()||e.column.getFirstSortDir(),Ea=e=>{var t,n;let{showRowDividers:a=!0,table:r}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.Z,{paddingBottom:ma,paddingTop:1,sx:Za,children:(0,o.map)(null!==(t=null===(n=r.getHeaderGroups()[0])||void 0===n?void 0:n.headers)&&void 0!==t?t:[],(e=>{const t=(0,o.includes)(ga,e.id),n=!!e.column.getIsSorted();return(0,p.jsx)(la.Z,{active:n,"data-testid":"engagement-header-".concat(e.id),direction:wa(e),onClick:e.column.getToggleSortingHandler(),sx:{color:n?"primary.main":"text.secondary",cursor:"pointer",fontSize:e=>e.typography.caption.fontSize,fontWeight:600,justifyContent:t?"flex-end":"flex-start",letterSpacing:.5,textTransform:"uppercase",userSelect:"none",whiteSpace:"nowrap",width:1,"&:hover":{color:"primary.dark"},"&.Mui-active":{color:"primary.main"},"&.Mui-active:hover":{color:"primary.dark"},"& .MuiTableSortLabel-icon":{fontSize:e=>e.typography.caption.fontSize,opacity:n?1:void 0}},children:(0,sa.ie)(e.column.columnDef.header,e.getContext())},e.id)}))}),a&&(0,p.jsx)(Ie.Z,{})]})};Ea.displayName="AnalyticsEngagementTableHeader";const Sa=(0,a.memo)((e=>{let{seconds:t,maxSeconds:n,averageSeconds:o,sessions:a}=e;const r=n>0?t/n*100:0,l=void 0!==o&&n>0?o/n*100:void 0,s=void 0!==o&&o>0&&void 0!==l;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,minWidth:0,children:[(0,p.jsx)(v.Z,{sx:{minWidth:64,whiteSpace:"nowrap"},variant:"body2",children:yt(t,a)}),(0,p.jsxs)(i.Z,{sx:{backgroundColor:"grey.300",borderRadius:1,flex:1,height:6,minWidth:0,overflow:s?"visible":"hidden",position:"relative"},children:[(0,p.jsx)(i.Z,{sx:{backgroundColor:"primary.main",borderRadius:1,height:1,transition:"width 0.4s ease-out",width:"".concat(r,"%")}}),s&&(0,p.jsx)(ee.Z,{arrow:!0,placement:"top",title:"Average: ".concat(yt(o)),children:(0,p.jsx)(i.Z,{"data-testid":"engagement-usage-average-line",onClick:e=>{e.preventDefault(),e.stopPropagation()},sx:{alignItems:"center",cursor:"default",display:"flex",height:20,justifyContent:"center",left:"".concat(l,"%"),position:"absolute",top:"50%",transform:"translate(-50%, -50%)",width:8,zIndex:1},children:(0,p.jsx)(i.Z,{sx:{bgcolor:"grey.500",height:20,width:"2px",borderRadius:1}})})})]})]})}));Sa.displayName="AnalyticsEngagementUsageCell";const Da=(0,a.memo)((e=>{let{title:t,href:n}=e;return n?(0,p.jsx)(Kn.Z,{component:f.rU,sx:{color:"text.primary",fontWeight:600,minWidth:0,textDecoration:"none","&:hover":{color:"primary.main"}},title:t,to:n,children:(0,p.jsx)(v.Z,{fontWeight:"inherit",noWrap:!0,variant:"body2",children:t})}):(0,p.jsx)(v.Z,{fontWeight:600,noWrap:!0,title:t,variant:"body2",children:t})}));Da.displayName="AnalyticsEngagementRowTitle";const Ma=(0,a.memo)((e=>{let{maxSeconds:t,row:n,showRowDividers:i=!0,showValueIcon:o}=e;return(0,p.jsxs)(Ca,{"data-testid":"engagement-row-".concat(n.id),gridSx:Za,showRowDividers:i,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",minWidth:0,children:[o&&(0,p.jsx)(Ko,{variant:"rounded",iconUrl:n.iconUrl,
3sx:{flexShrink:0,height:31,width:31}}),(0,p.jsx)(Da,{title:n.title})]}),(0,p.jsx)(Sa,{maxSeconds:t,seconds:n.seconds,sessions:n.sessions}),(0,p.jsx)(v.Z,{textAlign:"right",variant:"body2",children:ve(n.sessions)}),(0,p.jsx)(v.Z,{color:"text.secondary",textAlign:"right",variant:"body2",children:n.sessions>0?yt(n.avgSessionSeconds):"\u2014"}),(0,p.jsx)(v.Z,{color:"text.secondary",noWrap:!0,textAlign:"right",variant:"body2",children:n.lastUsedDate?(0,M.lN)(n.lastUsedDate):"\u2014"})]})}));Ma.displayName="AnalyticsEngagementTableRow";const ka=(0,da.Cl)(),Ia=(0,a.memo)((e=>{let{title:t,subtitle:n=ha,rows:i,valueColumnLabel:r,viewAllNoun:l,loading:s,showValueIcon:d,showShadow:c=!0,searchFields:u=ja,searchPlaceholder:h,emptyMessage:m="No usage data",filteredEmptyMessage:g="No matching results"}=e;const{consumePendingSearchFocus:v,globalFilter:C,handleSearchClearClick:x,handleSearchInputChange:f,handleSearchToggle:b,searchExpanded:y,searchInputValue:j}=xa(),[Z,w]=(0,a.useState)(!1),[E,S]=(0,a.useState)([{id:"seconds",desc:!0}]),D=null!==l&&void 0!==l?l:"".concat(r.toLowerCase(),"s"),M=null!==h&&void 0!==h?h:"Search ".concat(D,"..."),k=(0,a.useCallback)((()=>{w((e=>!e))}),[]),I=(0,a.useMemo)((()=>{const e=C.trim().toLowerCase();return e?(0,o.filter)(i,(t=>Aa(t,e,u))):i}),[C,i,u]),A=(0,a.useMemo)((()=>{var e;return null!==(e=(0,o.max)((0,o.map)(i,"seconds")))&&void 0!==e?e:0}),[i]),R=(0,a.useMemo)((()=>[ka.accessor("title",{id:"title",header:r,sortingFn:ze.WP}),ka.accessor("seconds",{id:"seconds",header:"Usage"}),ka.accessor("sessions",{id:"sessions",header:"Sessions"}),ka.accessor("avgSessionSeconds",{id:"avgSessionSeconds",header:"Avg Duration"}),ka.accessor("lastUsedDate",{id:"lastUsedDate",header:"Last Used",sortingFn:(e,t)=>{var n,i;return(null!==(n=e.original.lastUsedDate)&&void 0!==n?n:0)-(null!==(i=t.original.lastUsedDate)&&void 0!==i?i:0)}})]),[r]),T=(0,sa.b7)({columns:R,data:I,enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)(),onSortingChange:S,state:{sorting:E}}),P=T.getRowModel().rows,L=Z?P:P.slice(0,5),N=P.length>5,U=i.length>0,F=P.length>0,O=C?g:m,_=c;return(0,p.jsx)(ya,{consumePendingSearchFocus:v,emptyLabel:O,expanded:Z,hasMore:N,hasRows:U,hasVisibleRows:F,loading:!!s,onExpandToggle:k,onSearchClearClick:x,onSearchInputChange:f,onSearchToggle:b,searchExpanded:y,searchInputValue:j,searchPlaceholder:M,showShadow:c,subtitle:n,title:t,viewAllLabel:D,visibleRowCount:P.length,tableContent:(0,p.jsx)(Ea,{showRowDividers:_,table:T}),children:(0,o.map)(L,(e=>(0,p.jsx)(Ma,{maxSeconds:A,row:e.original,showRowDividers:_,showValueIcon:d},e.id)))})}));Ia.displayName="AnalyticsEngagementTable";const Aa=(e,t,n)=>{const i=t.trim().toLowerCase();return!i||(0,o.some)(n,(t=>(0,o.includes)(e[t].toLowerCase(),i)))},Ra=(0,a.memo)((e=>{let{showShadow:t=!0}=e;const{engagementByApp:n,engagementLoaded:i}=ra();return(0,p.jsx)(Ia,{emptyMessage:"No app usage data",loading:!i,rows:n,searchPlaceholder:"Search apps...",showShadow:t,showValueIcon:!0,title:"App Engagement",valueColumnLabel:"App",viewAllNoun:"apps"})}));Ra.displayName="AnalyticsAppEngagementTable";const Ta=(0,a.memo)((()=>{const{metrics:e,totalUsageLoaded:t,totalUsageError:n,sessionsLoaded:i,sessionsError:o,refreshing:a}=wn(),r=t&&i,l=r&&(n||o);return(0,p.jsx)(oa,{title:"Avg Session",value:bt(e.avgSessionSeconds),subtitle:l?void 0:"across ".concat(ve(e.sessionCount)," sessions"),trend:l?void 0:e.trends.avgSession,loading:!r,error:l,refreshing:a})}));Ta.displayName="AnalyticsAvgSessionKpiCard";const Pa=(0,a.memo)((()=>{const{engagementByConfig:e,configEngagementLoaded:t}=wn();return(0,p.jsx)(Ia,{emptyMessage:"No configuration usage data",loading:!t,rows:e,searchPlaceholder:"Search configurations...",title:"Usage by Configuration",valueColumnLabel:"Configuration",viewAllNoun:"configurations"})}));Pa.displayName="AnalyticsConfigEngagementTable";var La=n(61003);const Na=()=>(0,u.v9)((e=>e.device.editingDeviceId)),Ua=e=>(0,u.v9)((t=>{var n;const i=t.device.editingDeviceId;if(!i)return;const o=null!==(n=t.device.editingDevice)&&void 0!==n?n:t.firestore.data[S.F.Devices].data[i];return o?e(o):void 0})),Fa=e=>{const t=Ua((e=>e.deviceGroupRef.id));return(0,u.v9)((n=>{if(!t)return;const i=n.firestore.data[S.F.Configurations].data[t];return i?e(i):void 0}))},Oa=e=>(t,n)=>{const i=n(),{device:{editingDevice:a,editingDeviceId:r},auth:{privileges:l}}=i;if(!r||null===l||void 0===l||!l.privileges.devices)return;if(!a){const e=i.firestore.data[S.F.Devices].data[r];if(!e)return;t(La.i7.actions.deviceChangesStarted({sourceDevice:e}))}t(e);const s=n(),d=s.device.editingDevice,c=s.firestore.data[S.F.Devices].data[r];(0,o.isEqual)(d,c)&&t(La.i7.actions.deviceChangesCleared())},_a=e=>{const t={};for(const n of e)t[n.id]=n.name,n.serial&&(t[n.serial]=n.name);return t},za=[],Ba=(e,t)=>{const n=t[0];if(!n)return e;const i=!1===n.desc?"asc":"desc";return"title"===n.id?(0,o.orderBy)(e,[e=>e.title.toLowerCase()],[i]):"lastUsedDate"===n.id?(0,o.orderBy)(e,[e=>{var t;return null!==(t=e.lastUsedDate)&&void 0!==t?t:0}],[i]):(0,o.orderBy)(e,[n.id],[i])},Wa=e=>{let{descSortedRows:t,expanded:n,highlightDeviceId:i,metricRanksById:a,sortDescending:r,sortedRows:l}=e;const s=l.length,d=e=>{var t;return{type:"row",rank:null!==(t=a.get(e.id))&&void 0!==t?t:0,row:e}};if(n||s<=5)return(0,o.map)(l,d);const c=i?a.get(i):void 0;if(!i||!c)return(0,o.map)(l.slice(0,5),d);if(c<=5){const e=new Set((0,o.map)(t.slice(0,5),(e=>e.id)));return(0,o.compact)((0,o.map)(l,(t=>e.has(t.id)?d(t):void 0)))}const u=((e,t,n)=>t<=5?(0,o.map)((0,o.range)(1,t+1),(e=>({type:"row",rank:e}))):e<=5?(0,o.map)((0,o.range)(1,6),(e=>({type:"row",rank:e}))):n?e===t?[{type:"row",rank:1},{type:"row",rank:2},{type:"row",rank:3},{type:"ellipsis"},{type:"row",rank:t}]:[{type:"row",rank:1},{type:"ellipsis"},{type:"row",rank:e-1},{type:"row",rank:e},...e<t?[{type:"row",rank:e+1}]:[]]:e===t?[{type:"row",rank:t},{type:"row",rank:t-1},{type:"row",rank:t-2},{type:"ellipsis"},{type:"row",rank:1}]:e===t-1?[{type:"row",rank:t},{type:"ellipsis"},{type:"row",rank:e},{type:"row",rank:e-1},{type:"row",rank:e-2}]:[{type:"row",rank:t},{type:"ellipsis"},{type:"row",rank:e+1},{type:"row",rank:e},{type:"row",rank:e-1}])(c,s,r);return((e,t)=>(0,o.compact)((0,o.map)(e,(e=>{if("ellipsis"===e.type)return{type:"ellipsis"};const n=t[e.rank-1];return n?{type:"row",rank:e.rank,row:n}:void 0}))))(u,t)},Va={display:"grid",gap:2,gridTemplateColumns:"40px 1.5fr 1fr 80px 125px 110px",paddingX:1},Ga=e=>e.column.getIsSorted()||e.column.getFirstSortDir(),Ha=e=>{var t,n;let{showRowDividers:a=!0,table:r}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.Z,{paddingBottom:ma,paddingTop:1,sx:Va,children:(0,o.map)(null!==(t=null===(n=r.getHeaderGroups()[0])||void 0===n?void 0:n.headers)&&void 0!==t?t:[],(e=>{const t="title"===e.id,n=(0,o.includes)(ga,e.id),i=!!e.column.getIsSorted(),a=(0,sa.ie)(e.column.columnDef.header,e.getContext());return t?(0,p.jsx)(v.Z,{"data-testid":"device-engagement-header-".concat(e.id),sx:{color:"text.secondary",cursor:"default",fontSize:e=>e.typography.caption.fontSize,fontWeight:600,gridColumn:"1 / 3",letterSpacing:.5,textTransform:"uppercase",userSelect:"none",whiteSpace:"nowrap",width:1},variant:"caption",children:a},e.id):(0,p.jsx)(la.Z,{active:i,"data-testid":"device-engagement-header-".concat(e.id),direction:Ga(e),onClick:e.column.getToggleSortingHandler(),sx:{color:i?"primary.main":"text.secondary",cursor:"pointer",fontSize:e=>e.typography.caption.fontSize,fontWeight:600,justifyContent:n?"flex-end":"flex-start",letterSpacing:.5,textTransform:"uppercase",userSelect:"none",whiteSpace:"nowrap",width:1,"&:hover":{color:"primary.dark"},"&.Mui-active":{color:"primary.main"},"&.Mui-active:hover":{color:"primary.dark"},"& .MuiTableSortLabel-icon":{fontSize:e=>e.typography.caption.fontSize,opacity:i?1:void 0}},children:a},e.id)}))}),a&&(0,p.jsx)(Ie.Z,{})]})};Ha.displayName="AnalyticsDeviceEngagementTableHeader";const qa=(0,a.memo)((e=>{let{averageSeconds:t,deviceAnalyticsPath:n,isHighlighted:i,maxSeconds:o,rank:a,row:r,showRowDividers:l=!0}=e;return(0,p.jsxs)(Ca,{"data-testid":"device-engagement-row-".concat(r.id),gridSx:Va,href:n,linkLabel:r.title,showRowDividers:l,rowSx:i?{backgroundColor:y.DG.purple[50],"&:hover":{backgroundColor:y.DG.purple[50]}}:void 0,children:[(0,p.jsx)(v.Z,{textAlign:"center",variant:"body2",children:a}),(0,p.jsx)(Da,{title:r.title}),(0,p.jsx)(Sa,{averageSeconds:t,maxSeconds:o,seconds:r.seconds,sessions:r.sessions}),(0,p.jsx)(v.Z,{textAlign:"right",variant:"body2",children:r.sessions}),(0,p.jsx)(v.Z,{color:"text.secondary",textAlign:"right",variant:"body2",children:r.sessions>0?yt(r.avgSessionSeconds):"\u2014"}),(0,p.jsx)(v.Z,{color:"text.secondary",noWrap:!0,textAlign:"right",variant:"body2",children:r.lastUsedDate?(0,M.lN)(r.lastUsedDate):"\u2014"})]})}));qa.displayName="AnalyticsDeviceEngagementTableRow";const Ya=(0,a.memo)((e=>{let{showRowDividers:t=!0}=e;return(0,p.jsx)(Ca,{"data-testid":"device-engagement-ellipsis-row",gridSx:Va,hoverable:!1,showRowDividers:t,children:(0,p.jsx)(v.Z,{color:"text.secondary",textAlign:"center",variant:"body2",children:"\u2026"})})}));Ya.displayName="AnalyticsDeviceEngagementEllipsisRow";const Ka=(0,da.Cl)(),Xa=(0,a.memo)((e=>{var t,n,i,r,l,s,d;let{showShadow:c=!0}=e;const{buildOrganizationPath:h}=(0,w.P)(),m=Na(),g=yn(),v=En(),C=null!==(t=null!==(n=null===g||void 0===g?void 0:g.engagementByDevice)&&void 0!==n?n:null===v||void 0===v?void 0:v.engagementByDevice)&&void 0!==t?t:za,x=null!==(i=null!==(r=null===g||void 0===g?void 0:g.deviceEngagementLoaded)&&void 0!==r?r:null===v||void 0===v?void 0:v.deviceEngagementLoaded)&&void 0!==i&&i,f=null===g||void 0===g?void 0:g.deviceId,b=null!==m&&void 0!==m?m:f,y=(0,u.v9)((e=>e.device.queryResult)),j=(0,a.useMemo)((()=>((e,t,n)=>{var i;if(!t||(0,o.some)(e,{id:t}))return e;const a=_a(n);return[...e,{avgSessionSeconds:0,id:t,seconds:0,sessions:0,title:null!==(i=a[t])&&void 0!==i?i:t}]})(((e,t)=>{const n=_a(t);return(0,o.map)(e,(e=>{var t;return{...e,title:null!==(t=n[e.id])&&void 0!==t?t:e.title}}
3))})(C,y),b,y)),[y,C,b]),{consumePendingSearchFocus:Z,globalFilter:E,handleSearchClearClick:S,handleSearchInputChange:D,handleSearchToggle:M,searchExpanded:k,searchInputValue:I}=xa(),[A,R]=(0,a.useState)(!1),[T,P]=(0,a.useState)([{id:"seconds",desc:!0}]),L=(0,a.useCallback)((()=>{R((e=>!e))}),[]),N=(0,a.useMemo)((()=>{const e=E.trim().toLowerCase();return e?(0,o.filter)(j,(t=>Aa(t,e,["title"]))):j}),[j,E]),U=(0,a.useMemo)((()=>Ba(N,T)),[N,T]),F=(0,a.useMemo)((()=>[Ka.accessor("title",{id:"title",header:"Device",enableSorting:!1}),Ka.accessor("seconds",{id:"seconds",header:"Usage",sortDescFirst:!0}),Ka.accessor("sessions",{id:"sessions",header:"Sessions",sortDescFirst:!0}),Ka.accessor("avgSessionSeconds",{id:"avgSessionSeconds",header:"Avg Duration",sortDescFirst:!0}),Ka.accessor("lastUsedDate",{id:"lastUsedDate",header:"Last Used",sortDescFirst:!0,sortingFn:(e,t)=>{var n,i;return(null!==(n=e.original.lastUsedDate)&&void 0!==n?n:0)-(null!==(i=t.original.lastUsedDate)&&void 0!==i?i:0)}})]),[]),O=(0,sa.b7)({columns:F,data:U,enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),manualSorting:!0,onSortingChange:P,state:{sorting:T}}),_=(0,a.useMemo)((()=>{var e;return null!==(e=(0,o.max)((0,o.map)(j,"seconds")))&&void 0!==e?e:0}),[j]),z=(0,a.useMemo)((()=>{var e;return null!==(e=(0,o.mean)((0,o.map)(j,"seconds")))&&void 0!==e?e:0}),[j]),B=!1!==(null===(l=T[0])||void 0===l?void 0:l.desc),W=(0,a.useMemo)((()=>{var e,t;return Ba(N,[{id:null!==(e=null===(t=T[0])||void 0===t?void 0:t.id)&&void 0!==e?e:"seconds",desc:!0}])}),[N,T]),V=(0,a.useMemo)((()=>(e=>{const t=new Map;return e.forEach(((e,n)=>{t.set(e.id,n+1)})),t})(W)),[W]),G=(0,a.useMemo)((()=>Wa({descSortedRows:W,expanded:A,highlightDeviceId:b,metricRanksById:V,sortDescending:B,sortedRows:U})),[W,A,b,V,B,U]),H=U.length>5,q=j.length>0,Y=U.length>0,K="configuration"===(null!==(s=null!==(d=null===g||void 0===g?void 0:g.compareScope)&&void 0!==d?d:null===v||void 0===v?void 0:v.compareScope)&&void 0!==s?s:"fleet")?"Configuration Comparison":"Fleet Comparison",X=E?"No matching results":"No device usage data",Q=(e=>{var t;const n=null===(t=e[0])||void 0===t?void 0:t.id;return"sessions"===n?"Ranked by total number of sessions":"avgSessionSeconds"===n?"Ranked by avg duration":"lastUsedDate"===n?"Ranked by last used date":"Ranked by total usage"})(T),J=c,$=(0,a.useCallback)((e=>h((e=>e.devices.device.analytics),{deviceId:e})),[h]);return(0,p.jsx)(ya,{consumePendingSearchFocus:Z,emptyLabel:X,expanded:A,hasMore:H,hasRows:q,hasVisibleRows:Y,loading:!x,loadingTestId:"analytics-device-engagement-table-loading",onExpandToggle:L,onSearchClearClick:S,onSearchInputChange:D,onSearchToggle:M,searchClearTestId:"device-engagement-search-clear",searchExpanded:k,searchInputTestId:"device-engagement-search-input",searchInputValue:I,searchPlaceholder:"Search devices...",showShadow:c,subtitle:Q,title:K,viewAllLabel:"devices",visibleRowCount:U.length,tableContent:(0,p.jsx)(Ha,{showRowDividers:J,table:O}),children:(0,o.map)(G,(e=>{if("ellipsis"===e.type)return(0,p.jsx)(Ya,{showRowDividers:J},"device-engagement-ellipsis");const{rank:t,row:n}=e;return(0,p.jsx)(qa,{averageSeconds:z,deviceAnalyticsPath:$(n.id),isHighlighted:n.id===b,maxSeconds:_,rank:t,row:n,showRowDividers:J},n.id)}))})}));Xa.displayName="AnalyticsDeviceEngagementTable";const Qa=(e,t,n,i,o)=>{if(!e&&t&&!n&&i)return o(i)},Ja={totalUsage:{title:"Total Usage",getValue:e=>jt(e.totalSeconds),getSubtitle:(e,t,n,i)=>Qa(t,e.orgKpiLoaded,e.orgKpiError,i,(e=>"of all ".concat(jt(e.totalSeconds)))),getTrend:e=>e.trends.totalUsage,isLoaded:e=>e.totalUsageLoaded,hasError:e=>e.totalUsageLoaded&&e.totalUsageError},sessions:{title:"Sessions",getValue:e=>String(e.sessionCount),getSubtitle:(e,t,n,i)=>Qa(t,e.orgKpiLoaded,e.orgKpiError,i,(e=>"of all ".concat(e.sessionCount," sessions"))),getTrend:e=>e.trends.sessions,isLoaded:e=>e.sessionsLoaded,hasError:e=>e.sessionsLoaded&&e.sessionsError},avgSession:{title:"Avg Session",getValue:e=>bt(e.avgSessionSeconds),getSubtitle:(e,t,n,i)=>Qa(t,e.orgKpiLoaded,e.orgKpiError,i,(e=>"of ".concat(bt(e.avgSessionSeconds)," average"))),getTrend:e=>e.trends.avgSession,isLoaded:e=>e.totalUsageLoaded&&e.sessionsLoaded,hasError:e=>e.totalUsageLoaded&&e.sessionsLoaded&&(e.totalUsageError||e.sessionsError)},topApp:{title:"Top App",getValue:e=>{var t;
3return null===(t=e.topApp)||void 0===t?void 0:t.title},getSubtitle:(e,t,n)=>t||!n.topApp?void 0:bt(n.topApp.seconds),getTrend:e=>e.trends.topApp,isLoaded:e=>e.totalUsageLoaded,hasError:e=>e.totalUsageLoaded&&e.totalUsageError,showIcon:(e,t)=>Boolean(e.topApp)&&!t,getIconUrl:e=>{var t;return null===(t=e.topApp)||void 0===t?void 0:t.iconUrl},getValueTooltip:(e,t)=>e.topApp&&!t?e.topApp.title:void 0,isEmpty:(e,t)=>e.totalUsageLoaded&&!t&&!e.metrics.topApp}},$a=(0,a.memo)((e=>{var t,n,i,o;let{config:r}=e;const l=bn(),{metrics:s,orgMetrics:d,prevPeriodEndMillis:c,prevPeriodStartMillis:u}=l,h=r.hasError(l),m=r.isLoaded(l),g=(0,a.useMemo)((()=>{if(r.getSubtitle)return r.getSubtitle(l,h,s,d)}),[r,l,h,s,d]);return(0,p.jsx)(oa,{title:r.title,value:r.getValue(s),valueTooltip:null===(t=r.getValueTooltip)||void 0===t?void 0:t.call(r,s,h),subtitle:g,iconUrl:null===(n=r.getIconUrl)||void 0===n?void 0:n.call(r,s),showIcon:null===(i=r.showIcon)||void 0===i?void 0:i.call(r,s,h),trend:h?void 0:r.getTrend(s),loading:!m,error:h,empty:null===(o=r.isEmpty)||void 0===o?void 0:o.call(r,l,h),variant:"device",prevPeriodStartMillis:u,prevPeriodEndMillis:c})}));$a.displayName="AnalyticsDeviceKpiCard";const er=(0,a.memo)((()=>(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)($a,{config:Ja.totalUsage}),(0,p.jsx)($a,{config:Ja.sessions}),(0,p.jsx)($a,{config:Ja.avgSession}),(0,p.jsx)($a,{config:Ja.topApp})]})));er.displayName="AnalyticsKpiDeviceCards";var tr=n(74031),nr=n(4744),ir=n(55856),or=n(40863),ar=n(42355),rr=n(67743),lr=n(73674),sr=n(48589),dr=n(93343),cr=n(14694),ur=n(86407),pr=n(12506),hr=n(89120),mr=n(71565),gr=n(97892),vr=n.n(gr);const Cr="0 1px 4px rgba(0,0,0,0.06)",xr=140,fr=230,br=(0,a.memo)((e=>{let{contentHeight:t,contentTestId:n,titleWidth:i=xr,subtitleWidth:o=fr,showShadow:a=!0}=e;return(0,p.jsx)(Me.Z,{variant:"outlined",sx:{boxShadow:a?Cr:"none",borderRadius:2},children:(0,p.jsxs)(m.Z,{padding:2,spacing:2,children:[(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(g.Z,{variant:"text",width:i,height:24}),(0,p.jsx)(g.Z,{variant:"text",width:o,height:16})]}),(0,p.jsx)(g.Z,{"data-testid":n,height:t,variant:"rectangular"})]})})}));br.displayName="AnalyticsChartSkeleton";const yr="Total usage over time in this period",jr={top:8,bottom:24,left:48,right:32},Zr=(e,t)=>t?vr()(e).format("MMM D, ha"):vr()(e).format("MMM D, YYYY"),wr=(0,a.memo)((e=>{let{data:t,width:n,height:i,isSingleDay:r,containerRef:l,onMouseMove:s,onMouseLeave:d,hoveredIndex:c}=e;const u=(0,De.Z)(),h=jr,m=Math.max(n-h.left-h.right,0),g=Math.max(i-h.top-h.bottom,0),v=(0,a.useMemo)((()=>{var e;return Math.max(null!==(e=(0,o.max)((0,o.map)(t,(e=>{var t;return Math.max(e.seconds,null!==(t=e.comparisonSeconds)&&void 0!==t?t:0)}))))&&void 0!==e?e:0,120)}),[t]),C=(e=>e>=7200?"hours":"minutes")(v),x=(e=>"hours"===e?1/3600:1/60)(C),f=(0,a.useMemo)((()=>{const e=t[0].date,n=t[t.length-1].date,i=r?72e5:432e5,o=1===t.length||e===n;return(0,sr.Z)({domain:o?[e-i,n+i]:[e,n],range:[0,m]})}),[t,m,r]),b=(0,a.useMemo)((()=>(0,dr.Z)({domain:[0,v*x],range:[g,0],nice:!0})),[g,v,x]),y=(0,a.useCallback)((e=>{const n=(0,or.Z)(e);if(!n)return;const i=f.invert(n.x-h.left),o=((e,t)=>{let n=0,i=Math.abs(e[0].date-t);for(let o=1;o<e.length;o+=1){const a=Math.abs(e[o].date-t);a<i&&(i=a,n=o)}return n})(t,i.getTime());s(o,e)}),[t,h.left,s,f]);return(0,p.jsx)("svg",{ref:l,height:i,width:n,onMouseLeave:d,onMouseMove:y,children:(0,p.jsxs)(rr.Z,{left:h.left,top:h.top,children:[(0,p.jsx)(ar.Z,{height:g,numTicks:3,scale:b,stroke:u.palette.divider,strokeOpacity:.45,width:m}),(0,p.jsx)(cr.Z,{curve:ir.Z,data:t,fill:u.palette.primary.main,fillOpacity:.12,x:e=>f(e.date),y:e=>b(e.seconds*x),yScale:b}),(0,o.some)(t,(e=>void 0!==e.comparisonSeconds))&&(0,p.jsx)(ur.Z,{curve:ir.Z,data:t,stroke:u.palette.text.secondary,strokeDasharray:"2 4",strokeOpacity:.45,strokeWidth:1,x:e=>f(e.date),y:e=>{var t;return b((null!==(t=e.comparisonSeconds)&&void 0!==t?t:0)*x)}}),(0,p.jsx)(ur.Z,{curve:ir.Z,data:t,stroke:u.palette.primary.main,strokeWidth:2,x:e=>f(e.date),y:e=>b(e.seconds*x)}),void 0!==c&&t[c]&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("line",{stroke:u.palette.divider,strokeDasharray:"4 4",x1:f(t[c].date),x2:f(t[c].date),y1:0,y2:g}),(0,p.jsx)("circle",{cx:f(t[c].date),cy:b(t[c].seconds*x),fill:u.palette.primary.main,r:4}),void 0!==t[c].comparisonSeconds&&(0,p.jsx)("circle",{cx:f(t[c].date),cy:b(t[c].comparisonSeconds*x),fill:u.palette.text.secondary,r:4})]}),(0,p.jsx)(tr.Z,{hideAxisLine:!0,hideTicks:!0,numTicks:3,scale:b,stroke:u.palette.text.secondary,tickFormat:e=>((e,t)=>"".concat(Math.round(e),"hours"===t?"h":"m"))(Number(e),C),tickLabelProps:()=>({fill:u.palette.text.secondary,fontSize:11,textAnchor:"end",dx:-4})}),(0,p.jsx)(nr.Z,{hideAxisLine:!0,hideTicks:!0,numTicks:Math.min(t.length,6),scale:f,stroke:u.palette.text.secondary,tickFormat:e=>((e,t)=>t?vr()(e).format("ha"):vr()(e).format("MMM D"))(Number(e),r),tickLabelProps:()=>({fill:u.palette.text.secondary,fontSize:11,textAnchor:"middle"}),top:g})]})})}));wr.displayName="AnalyticsTrendChartSvg";const Er=(0,a.memo)((e=>{var t;let{title:n="Usage Trend",subtitle:r=yr,data:l,comparisonData:s,comparisonPeriodLabel:d,loading:c,error:u,isSingleDay:h=!1,showShadow:g=!0}=e;const C=(0,De.Z)(),{hideTooltip:x,showTooltip:f,tooltipData:b,tooltipLeft:y,tooltipOpen:j,tooltipTop:Z}=(0,pr.Z)(),{TooltipInPortal:w,containerRef:E}=(0,hr.Z)({scroll:!0}),[S,D]=(0,a.useState)(),k=(0,a.useMemo)((()=>(0,o.map)(l,((e,t)=>
3{var n;return{...e,comparisonSeconds:null===s||void 0===s||null===(n=s[t])||void 0===n?void 0:n.seconds}}))),[s,l]),I=(0,a.useMemo)((()=>Math.max(0,...(0,o.map)(k,(e=>{var t;return Math.max(e.seconds,null!==(t=e.comparisonSeconds)&&void 0!==t?t:0)})))),[k]),A=(null!==(t=null===s||void 0===s?void 0:s.length)&&void 0!==t?t:0)>0,R=I>0,T=(0,a.useCallback)(((e,t)=>{const n=(0,or.Z)(t);f({tooltipData:e,tooltipLeft:null===n||void 0===n?void 0:n.x,tooltipTop:null===n||void 0===n?void 0:n.y}),D(e)}),[f]),P=(0,a.useCallback)((()=>{x(),D(void 0)}),[x]);if(c)return(0,p.jsx)(br,{contentHeight:280,contentTestId:"analytics-trend-chart-loading-skeleton",showShadow:g});const L=u?"Unavailable":"No usage data available",N=j&&void 0!==b?k[b]:void 0;return(0,p.jsx)(Me.Z,{variant:"outlined",sx:{boxShadow:g?Cr:"none",borderRadius:2,height:"100%",display:"flex",flexDirection:"column"},children:(0,p.jsxs)(m.Z,{flex:1,padding:2,spacing:1.5,children:[(0,p.jsxs)(m.Z,{spacing:.75,children:[(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(v.Z,{fontWeight:600,variant:"subtitle1",children:n}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:r})]}),A&&R&&!u&&(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",spacing:2,children:[(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",spacing:.75,children:[(0,p.jsx)(i.Z,{sx:{width:16,height:2,borderRadius:1,bgcolor:"primary.main"}}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:"Current period"})]}),(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",spacing:.75,children:[(0,p.jsx)(i.Z,{"aria-hidden":!0,component:"svg",height:8,sx:{color:"text.secondary",display:"block",opacity:.45},viewBox:"0 0 16 8",width:16,children:(0,p.jsx)("line",{stroke:"currentColor",strokeDasharray:"2 4",strokeWidth:1,x1:0,x2:16,y1:4,y2:4})}),(0,p.jsx)(ee.Z,{disableHoverListener:!d,title:null!==d&&void 0!==d?d:"",children:(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:"Previous period"})})]})]})]}),!R||u?(0,p.jsx)(m.Z,{alignItems:"center","data-testid":"analytics-trend-chart-empty",justifyContent:"center",minHeight:280,children:(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:L})}):(0,p.jsxs)(i.Z,{position:"relative",children:[(0,p.jsx)(lr.Z,{style:{height:280},children:e=>{let{height:t,width:n}=e;return(0,p.jsx)(wr,{containerRef:E,data:k,height:t,hoveredIndex:S,isSingleDay:h,onMouseLeave:P,onMouseMove:T,width:n})}}),j&&N&&(0,p.jsx)(w,{left:y,style:{...mr.j,background:C.palette.background.paper,border:"1px solid ".concat(C.palette.divider),borderRadius:C.shape.borderRadius,boxShadow:Cr,padding:C.spacing(1)},top:Z,children:(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:Zr(N.date,h)}),(0,p.jsx)(v.Z,{variant:"subtitle2",children:(0,M.YU)(N.seconds)}),void 0!==N.comparisonSeconds&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:null!==d&&void 0!==d?d:"Previous period"}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:bt(N.comparisonSeconds)})]})]})})]})]})})}));Er.displayName="AnalyticsTrendChart";const Sr=(0,a.memo)((e=>{let{showShadow:t=!0}=e;const{dailyUsage:n,prevDailyUsage:i,dailyUsageLoaded:o,dailyUsageError:r,isSingleDay:l,prevPeriodStartMillis:s,prevPeriodEndMillis:d}=ra(),c=o&&r,u=(0,a.useMemo)((()=>ft(s,d)),[d,s]);return(0,p.jsx)(Er,{comparisonData:i,comparisonPeriodLabel:u,data:n,error:c,isSingleDay:l,loading:!o,showShadow:t})}));Sr.displayName="AnalyticsUsageTrendChart";var Dr=n(12065);const Mr=[{shortLabel:"Sun",name:"Sunday"},{shortLabel:"Mon",name:"Monday"},{shortLabel:"Tue",name:"Tuesday"},{shortLabel:"Wed",name:"Wednesday"},{shortLabel:"Thu",name:"Thursday"},{shortLabel:"Fri",name:"Friday"},{shortLabel:"Sat",name:"Saturday"}],kr=[{shortLabel:"12a",rangeLabel:"12:00 AM \u2013 4:00 AM"},{shortLabel:"4a",rangeLabel:"4:00 AM \u2013 8:00 AM"},{shortLabel:"8a",rangeLabel:"8:00 AM \u2013 12:00 PM"},{shortLabel:"12p",rangeLabel:"12:00 PM \u2013 4:00 PM"},{shortLabel:"4p",rangeLabel:"4:00 PM \u2013 8:00 PM"},{shortLabel:"8p",rangeLabel:"8:00 PM \u2013 12:00 AM"}],Ir=e=>.16+.84*Math.max(0,Math.min(e,1)),Ar=Mr.length,Rr=kr.length,Tr=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;return(0,o.map)((0,o.range)(e),(t=>Number(Ir(e<=1?1:t/(e-1)).toFixed(2))))}(),Pr="What time of day are devices used the most",Lr="No usage data available",Nr=(e,t)=>
3"".concat(e,"-").concat(t),Ur=(0,a.memo)((e=>{let{dayIndex:t,blockIndex:n,seconds:o,maxSeconds:a}=e;const r=Mr[t],l=kr[n],s=((e,t)=>t<=0||e<=0?0:Ir(e/t))(o,a),d="".concat(r.name,", ").concat(l.rangeLabel," \xb7 ").concat(bt(o));return(0,p.jsx)(ee.Z,{arrow:!0,title:d,children:(0,p.jsx)(i.Z,{"aria-label":d,sx:{minHeight:28,borderRadius:1,border:1,borderColor:"transparent",bgcolor:s>0?e=>(0,Dr.Fq)(e.palette.primary.main,s):"grey.100","&:hover":{borderColor:"divider"}}})})}));Ur.displayName="HeatmapGridCell";const Fr=32*Ar,Or=(0,a.memo)((e=>{let{title:t="Weekly Usage",subtitle:n=Pr,cells:r,loading:l,error:s,emptyMessage:d=Lr,showShadow:c=!0}=e;const u=(0,a.useMemo)((()=>{const e=new Map;return(0,o.forEach)(r,(t=>{let{dayIndex:n,blockIndex:i,seconds:o}=t;e.set(Nr(n,i),o)})),e}),[r]),h=(0,a.useMemo)((()=>{var e;return null!==(e=(0,o.max)((0,o.map)(r,"seconds")))&&void 0!==e?e:0}),[r]);if(l)return(0,p.jsx)(br,{contentHeight:Fr,contentTestId:"analytics-heatmap-grid-loading-skeleton",showShadow:c});const g=h>0;return(0,p.jsx)(Me.Z,{variant:"outlined",sx:{boxShadow:c?Cr:"none",borderRadius:2,height:"100%",display:"flex",flexDirection:"column"},children:(0,p.jsxs)(m.Z,{flex:1,padding:2,spacing:2.5,children:[(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(v.Z,{fontWeight:600,variant:"subtitle1",children:t}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:n})]}),!g||s?(0,p.jsx)(m.Z,{alignItems:"center","data-testid":"analytics-heatmap-grid-empty",flex:1,justifyContent:"center",minHeight:32*Ar,children:(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:s?"Unavailable":d})}):(0,p.jsxs)(m.Z,{flex:1,spacing:1.5,children:[(0,p.jsxs)(i.Z,{sx:{display:"grid",flex:1,gridTemplateColumns:"".concat(40,"px repeat(").concat(Ar,", 1fr)"),gridTemplateRows:"repeat(".concat(Rr,", minmax(").concat(28,"px, 1fr)) auto"),columnGap:.5,rowGap:.5,alignItems:"stretch"},children:[(0,o.map)(kr,((e,t)=>(0,p.jsxs)(a.Fragment,{children:[(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",sx:{textAlign:"right",paddingRight:1,alignSelf:"center"},children:e.shortLabel}),(0,o.map)(Mr,((e,n)=>{var i;return(0,p.jsx)(Ur,{blockIndex:t,dayIndex:n,maxSeconds:h,seconds:null!==(i=u.get(Nr(n,t)))&&void 0!==i?i:0},Nr(n,t))}))]},e.shortLabel))),(0,p.jsx)(i.Z,{}),(0,o.map)(Mr,(e=>(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",sx:{textAlign:"center"},children:e.shortLabel},e.shortLabel)))]}),(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",justifyContent:"flex-end",spacing:.75,children:[(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:"Less"}),(0,p.jsx)(m.Z,{direction:"row",spacing:.5,children:(0,o.map)(Tr,(e=>(0,p.jsx)(i.Z,{sx:{width:12,height:12,borderRadius:.5,border:1,borderColor:"divider",bgcolor:t=>(0,Dr.Fq)(t.palette.primary.main,e)}},e)))}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:"More"})]})]})]})})}));Or.displayName="AnalyticsHeatmapGrid";const _r=(0,a.memo)((e=>{let{showShadow:t=!0}=e;const{heatmapCells:n,heatmapLoaded:i,heatmapError:o}=ra(),a=i&&o;return(0,p.jsx)(Or,{cells:n,error:a,loading:!i,showShadow:t})}));_r.displayName="AnalyticsWeeklyUsageHeatmap";const zr=(0,a.memo)((e=>{let{spacing:t}=e;return(0,p.jsx)(i.Z,{paddingBottom:t,paddingTop:t,children:(0,p.jsx)(Ie.Z,{})})}));zr.displayName="AnalyticsSectionDivider";const Br=(0,a.memo)((e=>{let{sectionDividerSpacing:t,showSectionDividers:n=!0}=e;const{isLoading:o,hasError:a}=bn(),r=null!==t&&void 0!==t?t:2;return(0,p.jsxs)(m.Z,{flex:1,spacing:n?0:2,children:[(0,p.jsx)(er,{}),n&&(0,p.jsx)(zr,{spacing:r}),(0,p.jsx)(Ra,{showShadow:!1}),n&&(0,p.jsx)(zr,{spacing:r}),(0,p.jsx)(Xa,{showShadow:!1}),n&&(0,p.jsx)(zr,{spacing:r}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(i.Z,{flex:1,minWidth:0,children:(0,p.jsx)(Sr,{showShadow:!1})}),(0,p.jsx)(i.Z,{flex:1,minWidth:0,children:(0,p.jsx)(_r,{showShadow:!1})})]}),o&&(0,p.jsxs)(m.Z,{paddingX:14,paddingTop:10,spacing:2,children:[(0,p.jsx)(Rn.Z,{}),(0,p.jsx)(v.Z,{variant:"body2",textAlign:"center",children:"Loading Analytics..."})]}),!o&&a&&(0,p.jsx)(m.Z,{paddingX:14,paddingTop:10,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",textAlign:"center",children:"Analytics data is unavailable. Please try again later."})})]})}));Br.displayName="AnalyticsDeviceOverviewContent";var Wr=n(21181),Vr=n(5854);const Gr=new Set(["Quest 3S","SM-I610"]),Hr=(0,a.memo)((e=>{let{model:t,sx:n}=e;const o=(0,Vr.UC)(t.id),a=t.title||(0,Vr.ao)(t.id),r=Gr.has(t.id)||o===Wr.zu?"75%":"95%";return(0,p.jsxs)(m.Z,{alignItems:"center",sx:n,children:[(0,p.jsx)(i.Z,{sx:{width:"80%",height:100,display:"flex",alignItems:"center",justifyContent:"center"},children:o?(0,p.jsx)(i.Z,{alt:a,component:"img",src:o,sx:{maxWidth:r,maxHeight:r,objectFit:"contain"}}):(0,p.jsx)(v.Z,{color:"text.secondary",variant:"caption",children:a})}),(0,p.jsxs)(m.Z,{alignItems:"center",spacing:.25,sx:{marginTop:-.5,width:"100%"},children:[(0,p.jsx)(v.Z,{fontWeight:600,noWrap:!0,sx:{maxWidth:"100%"},variant:"body2",children:a}),(0,p.jsx)(v.Z,{fontWeight:700,variant:"h6",children:yt(t.seconds)}),(0,p.jsxs)(v.Z,{color:"text.secondary",variant:"caption",children:[ve(t.sessions)," session",1===t.sessions?"":"s"]})]})]})}));Hr.displayName="AnalyticsModelUsageCell";const qr="0 1px 4px rgba(0,0,0,0.06)",Yr=(0,a.memo)((()=>(0,p.jsx)(Me.Z,{variant:"outlined",sx:{boxShadow:qr,borderRadius:3},children:(0,p.jsxs)(m.Z,{padding:2,spacing:1.5,children:[(0,p.jsx)(g.Z,{variant:"text",width:140,height:24}),(0,p.jsx)(g.Z,{variant:"text",width:200,height:16}),(0,p.jsx)(g.Z,{"data-testid":"analytics-model-usage-chart-loading-skeleton",height:140,variant:"rectangular"})]})})));Yr.displayName="AnalyticsModelUsageChartSkeleton";const Kr=(0,a.memo)((()=>{const{organization:e}=(0,d.mP)(),{engagementByModel:t,modelLoaded:n}=wn(),[r,l]=(0,a.useState)(!1),s=(0,a.useCallback)((()=>l((e=>!e))),[]);if(!n)return(0,p.jsx)(Yr,{});const c=e.numActiveDevices>0,u=r?t:(0,o.slice)(t,0,5),h=t.length>5,g=c?"No data available for this period":"No model usage data yet";return(0,p.jsx)(Me.Z,{variant:"outlined",sx:{boxShadow:qr,borderRadius:3},children:(0,p.jsxs)(m.Z,{padding:2,spacing:1.5,children:[(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{fontWeight:600,variant:"subtitle1",children:"Usage by Model"}),(0,p.jsxs)(v.Z,{color:"text.secondary",variant:"caption",children:["Device model",1===u.length?"":"s"," by total usage"]})]}),0===t.length?(0,p.jsx)(m.Z,{alignItems:"center","data-testid":"analytics-model-usage-chart-empty",justifyContent:"center",minHeight:140,paddingY:2,children:(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:g})}):(0,p.jsx)(i.Z,{sx:{columnGap:2,display:r?"grid":"flex",flexDirection:r?void 0:"row",flexWrap:r?void 0:"wrap",gap:r?void 0:2,gridTemplateColumns:r?"repeat(".concat(5,", minmax(0, 1fr))"):void 0,justifyContent:r?void 0:"center",rowGap:3},children:(0,o.map)(u,(e=>(0,p.jsx)(Hr,{model:e,sx:{flex:r?void 0:"1 0 0",minWidth:0}},e.id)))}),h&&(0,p.jsx)(C.Z,{onClick:s,size:"small",sx:{alignSelf:"center",textTransform:"none"},children:r?"Show less":"View all ".concat(t.length," models")})]})})}));Kr.displayName="AnalyticsModelUsageChart";var Xr=n(68610),Qr=n(83152),Jr=n(91469);const $r=(0,a.memo)((e=>{let{chipRef:t,open:n,disabled:o,label:a,placeholder:r,chips:l,onToggle:s,onChipDelete:d}=e;return(0,p.jsxs)(i.Z,{ref:t,onClick:s,sx:{position:"relative",border:1,borderColor:n?"primary.main":"grey.400",borderRadius:1,minHeight:56,cursor:o?"default":"pointer",opacity:o?.5:1,...n&&{boxShadow:e=>"inset 0 0 0 1px ".concat(e.palette.primary.main)},"&:hover":o?{}:{borderColor:n?"primary.main":"text.primary"}},children:[a&&(0,p.jsx)(v.Z,{variant:"body2",sx:{position:"absolute",top:-9,left:10,paddingX:.5,backgroundColor:"white",color:n?"primary.main":"text.secondary",fontSize:"0.75rem",lineHeight:1.2,zIndex:1},children:a}),(0,p.jsx)(i.Z,{sx:{padding:"13.5px 14px",paddingRight:5,maxHeight:97,overflowY:"auto",display:"flex",flexWrap:"wrap",gap:.5,alignItems:"center",...y.WF},children:l.length>0?l.map((e=>(0,p.jsx)(ke.Z,{label:e.title,size:"small",variant:e.isAll?"filled":"outlined",color:e.warning&&!e.isAll?"warning":"default",onDelete:o?void 0:t=>{t.stopPropagation(),d(e.id)},sx:e.isAll?{color:y.DG.white,paddingY:2,"& .MuiChip-deleteIcon":{color:y.DG.grey[400],"&:hover":{color:y.DG.white}},bgcolor:y.DG.purple[600],borderRadius:1}:{borderRadius:4,paddingY:1.5}},e.id))):(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",children:null!==r&&void 0!==r?r:"Select options"})}),(0,p.jsx)(i.Z,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:"text.secondary"},children:(0,p.jsx)(fi.Z,{fontSize:"small",sx:{transition:"transform 0.2s",transform:n?"rotate(180deg)":void 0}})})]})}));
3$r.displayName="SelectedChipsDisplay";const el=(e,t)=>({backgroundColor:e?y.DG.purple[500]:"white",borderColor:e?y.DG.purple[500]:"grey.400",color:e?y.DG.white:"text.primary",paddingY:2,paddingX:.5,maxWidth:"300px",borderRadius:4,cursor:t?"default":"pointer",opacity:t?.5:1,"& .MuiChip-label":{fontWeight:e?500:400,maxWidth:"250px"},"& .MuiChip-deleteIcon":{color:e?y.DG.grey[400]:"text.secondary","&:hover":e?{color:y.DG.white}:{}},...!t&&{"&:hover, &.MuiChip-clickable:hover, &.MuiChip-outlined:hover":{backgroundColor:e?y.DG.purple[600]:"white !important",borderColor:e?y.DG.purple[600]:"text.primary",color:e?y.DG.white:"text.primary","& .MuiChip-deleteIcon":{color:e?y.DG.grey[400]:"text.secondary"}}},"&:active":{boxShadow:"none"}}),tl=(0,a.memo)((e=>{let{chipRef:t,label:n,tooltip:i="",hasSelection:o,disabled:a=!1,onOpen:r,onClear:l}=e;return(0,p.jsx)(ee.Z,{title:i,placement:"top",enterDelay:500,enterNextDelay:500,children:(0,p.jsx)(ke.Z,{ref:t,size:"small",label:n,variant:o?"filled":"outlined",clickable:!a,onClick:a?void 0:r,onDelete:a?void 0:o?l:r,deleteIcon:o?(0,p.jsx)(Jr.Z,{}):(0,p.jsx)(fi.Z,{}),sx:el(o,a)})})}));tl.displayName="SummaryChip";const nl=e=>"header"===e.variant,il={overflow:"hidden"},ol={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},al=e=>{let{title:t,children:n}=e;const[i,o]=(0,a.useState)(!1),r=(0,a.useRef)(null),l=(0,a.useCallback)((()=>{if(r.current){const e=r.current.scrollWidth>r.current.clientWidth;o(e)}}),[]);return(0,p.jsx)(ee.Z,{title:t,placement:"left",enterDelay:500,enterNextDelay:500,disableHoverListener:!i,children:a.cloneElement(n,{ref:r,onMouseEnter:l})})};al.displayName="ConditionalTooltip";const rl=(0,a.memo)((e=>{let{searchQuery:t,onSearchChange:n}=e;return(0,p.jsx)(i.Z,{sx:{backgroundColor:"white",paddingX:2,flexShrink:0},children:(0,p.jsx)(Ln.Z,{size:"small",placeholder:"Search...",variant:"standard",value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation())},InputProps:{startAdornment:(0,p.jsx)(mo.Z,{position:"start",children:(0,p.jsx)(ua.Z,{})})},sx:{paddingY:1,"& .MuiInput-underline:before":{borderBottomColor:"grey.300"},"& .MuiInput-underline:hover:not(.Mui-disabled):before":{borderBottomColor:"grey.300",borderBottomWidth:"1px"},"& .MuiInput-underline:after":{borderBottomColor:"grey.500"}},fullWidth:!0,onClick:e=>e.stopPropagation(),autoFocus:!0})})}));rl.displayName="DropdownSearchField";const ll=(0,a.memo)((e=>{let{option:t,isSelected:n,onToggle:i,style:o,disabled:a=!1,footer:r=!1}=e;return(0,p.jsx)(Hi.Z,{disabled:a,onClick:()=>{a||i(t.id)},onMouseDown:e=>{r&&e.preventDefault()},style:o,sx:{...il,alignItems:"center",paddingY:.5,paddingLeft:1,...r&&{borderTop:1,borderColor:"grey.300",flexShrink:0,paddingY:1.5}},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{width:"100%"},children:[(0,p.jsx)(Pi.Z,{checked:n,disabled:a,disableRipple:!0,inputProps:{"aria-label":t.title},onChange:()=>{a||i(t.id)},onClick:e=>e.stopPropagation(),size:"small",sx:{paddingLeft:0,paddingRight:1,paddingY:0,flexShrink:0},tabIndex:-1}),(0,p.jsxs)(m.Z,{sx:{flexGrow:1,minWidth:0},children:[(0,p.jsx)(al,{title:t.title,children:(0,p.jsx)(v.Z,{variant:"subtitle2",sx:{...ol,fontWeight:600},children:t.title})}),t.subtitle&&(0,p.jsx)(al,{title:t.subtitle,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:ol,children:t.subtitle})})]})]})})}));ll.displayName="ChecklistMenuItem";const sl=(0,a.memo)((e=>{let{option:t,onToggle:n,style:i}=e;return(0,p.jsx)(Hi.Z,{onClick:()=>n(t.id),style:i,sx:{...il,paddingY:.5},children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{width:"100%",overflow:"hidden"},children:[(0,p.jsx)(al,{title:t.title,children:(0,p.jsx)(v.Z,{variant:"body1",sx:{...ol,flexGrow:1,fontWeight:400},children:t.title})}),t.subtitle&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{flexShrink:0,marginLeft:1},children:t.subtitle})]})})}));sl.displayName="OptionMenuItem";const dl=(0,a.memo)((e=>{let{option:t,onToggle:n}=e;return(0,p.jsx)(Hi.Z,{onClick:()=>n(t.id),sx:{...il,paddingY:2,borderBottom:"1px solid",borderColor:"grey.300"},children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{width:"100%",overflow:"hidden"},children:[(0,p.jsx)(v.Z,{variant:"body1",sx:{fontWeight:500},children:t.title}),t.subtitle&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{flexShrink:0,marginLeft:1},children:t.subtitle})]})})}));dl.displayName="AllOptionHeader";const cl=(0,a.memo)((e=>{let{title:t,style:n}=e;
3return(0,p.jsx)(Hi.Z,{style:n,sx:{...il,cursor:"default",paddingY:1,pointerEvents:"none"},children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary.main",children:t})})}));cl.displayName="HeaderMenuItem";var ul=n(39585);const pl=e=>{var t;let{label:n,plural:r,placeholder:l,values:s=[],options:d,onChange:c,sx:u,checklist:h=!1,shouldShowIndividualChips:g=!1,allOption:v,disabled:C=!1,hideSearch:x=!1,warningValues:f,footer:b}=e;const[j,Z]=(0,a.useState)(!1),[w,E]=(0,a.useState)(""),[S,D]=(0,a.useState)(d),[M,k]=(0,a.useState)(d),I=(0,a.useRef)(null),A=(0,a.useRef)(null),R=(0,a.useMemo)((()=>d.some(nl)),[d]),T=(0,a.useMemo)((()=>{const e=new Set(s),t={};return M.forEach((n=>{nl(n)||(t[n.id]={title:n.title,selected:e.has(n.id)})})),t}),[M,s]),P=(0,a.useRef)(j);(0,a.useEffect)((()=>{const e=j&&!P.current;if(P.current=j,e){k(d);const e=new Set(s),t=[],n=[];d.forEach((i=>{nl(i)||(e.has(i.id)?t.push(i):n.push(i))})),D(R?d:[...t,...n]),E("")}}),[R,j,d,s]);const L=(0,a.useCallback)((()=>{C||Z((e=>!e))}),[C]),N=(0,a.useCallback)((e=>{if(v&&e===v.id)return void c(s.includes(v.id)?[]:[v.id]);const t=v?s.filter((e=>e!==v.id)):s,n=t.includes(e)?t.filter((t=>t!==e)):[...t,e];c(n)}),[s,c,v]),U=(0,a.useMemo)((()=>{const e=w.trim().toLowerCase();if(!e)return(e=>{if(!g)return e;const t=new Set(s);return e.filter((e=>nl(e)||!t.has(e.id)))})(S);if(!R)return S.filter((t=>!nl(t)&&t.title.toLowerCase().includes(e)));const t=[];let n;for(const i of S){if(nl(i)){n=i;continue}const o=i;g&&s.includes(o.id)||o.title.toLowerCase().includes(e)&&(n&&(t.push(n),n=void 0),t.push(o))}return t}),[R,S,w,g,s]),F=(0,a.useCallback)((e=>{let{index:t}=e;const n=U[t];return!n||nl(n)?36:h&&n.subtitle?52:36}),[h,U]),O=(0,a.useMemo)((()=>{const e=(0,o.sumBy)(U,(e=>nl(e)?36:h&&e.subtitle?52:36));return Math.min(e,400)}),[h,U]);(0,a.useEffect)((()=>{var e,t;j&&(null===(e=A.current)||void 0===e||e.recomputeRowHeights(),null===(t=A.current)||void 0===t||t.forceUpdateGrid())}),[j,s,U,T]);const _=s.length>0,z=(0,a.useMemo)((()=>_?"".concat(s.length," ").concat((0,ul.n8)(s.length,n,r)):null!==l&&void 0!==l?l:n),[_,l,n,r,s.length]),B=(0,a.useMemo)((()=>_?s.map((e=>{var t;return null===(t=T[e])||void 0===t?void 0:t.title})).filter(Boolean).join(", "):""),[_,s,T]),W=(0,a.useCallback)((e=>{e.stopPropagation(),c([])}),[c]),V=(0,a.useMemo)((()=>new Set(null!==f&&void 0!==f?f:[])),[f]),G=(0,a.useMemo)((()=>s.map((e=>{var t,n;return{id:e,title:(null===v||void 0===v?void 0:v.id)===e?v.title:null!==(t=null===(n=T[e])||void 0===n?void 0:n.title)&&void 0!==t?t:e,isAll:(null===v||void 0===v?void 0:v.id)===e,warning:V.has(e)}}))),[s,v,T,V]),H=(0,a.useCallback)((e=>{var t,n;let{index:i,key:o,style:a}=e;const r=U[i];return r?nl(r)?(0,p.jsx)(cl,{style:a,title:r.title},o):h?(0,p.jsx)(ll,{style:a,option:r,isSelected:null!==(t=null===(n=T[r.id])||void 0===n?void 0:n.selected)&&void 0!==t&&t,onToggle:N},o):(0,p.jsx)(sl,{style:a,option:r,onToggle:N},o):null}),[U,h,T,N]);return(0,p.jsxs)(m.Z,{sx:{...u,...g&&{width:"100%"}},children:[g?(0,p.jsx)($r,{chipRef:I,open:j,disabled:C,label:n,placeholder:l,chips:G,onToggle:L,onChipDelete:N}):(0,p.jsx)(tl,{chipRef:I,disabled:C,label:z,tooltip:B,hasSelection:_,onOpen:L,onClear:W}),(0,p.jsx)(Xr.Z,{open:j,anchorEl:I.current,placement:"bottom-start",style:{zIndex:1300,width:g?null===(t=I.current)||void 0===t?void 0:t.offsetWidth:void 0},children:(0,p.jsx)(ca.Z,{onClickAway:()=>Z(!1),children:(0,p.jsxs)(Me.Z,{sx:{marginTop:.5,width:g?"100%":280,border:1,borderColor:"grey.400",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:e=>"0px 0px 20px 5px ".concat((0,Dr.Fq)(e.palette.common.black,.15)),borderRadius:"8px"},children:[!x&&(0,p.jsx)(rl,{searchQuery:w,onSearchChange:E}),v&&(0,p.jsx)(dl,{option:v,onToggle:N}),(0,p.jsx)(i.Z,{sx:{flexGrow:1,paddingY:"0 !important",height:O,"& .ReactVirtualized__List":y.WF},children:(0,p.jsx)(Qr.qj,{children:e=>{let{width:t,height:n}=e;return(0,p.jsx)(Qr.aV,{ref:A,width:t,height:n,rowCount:U.length,rowHeight:F,rowRenderer:H})}})}),b]})})})]})};pl.displayName="UIStyledMultiSelect";const hl=e=>{const t=new Map;for(const i of e){var n;t.set(i.title,(null!==(n=t.get(i.title))&&void 0!==n?n:0)+1)}return(0,o.map)(e,(e=>{var n;return{id:e.id,title:e.title,subtitle:(null!==(n=t.get(e.title))&&void 0!==n?n:0)>1?e.id:void 0}}))},ml=(0,a.memo)((()=>{const{includeSystemApps:e,setIncludeSystemApps:t}=wn(),n=(0,a.useCallback)((n=>{t(!e)}),[e,t]),i=(0,a.useMemo)((()=>({id:"include-system-apps",title:"Show system apps"})),[]);return(0,p.jsx)(ll,{option:i,isSelected:e,footer:!0,onToggle:n})}
3));ml.displayName="AnalyticsOverviewSystemAppsFooter";const gl=(0,a.memo)((()=>{const{overviewFilters:e,setOverviewAppFilter:t,usedAppsInPeriod:n,usedAppsLoaded:i}=wn(),o=(0,a.useRef)(!1);i&&(o.current=!0);const r=(0,a.useMemo)((()=>hl(n)),[n]),l=(0,a.useCallback)((e=>{t(e)}),[t]),s=(0,a.useMemo)((()=>(0,p.jsx)(ml,{})),[]);return(0,p.jsx)(pl,{checklist:!0,disabled:!o.current,footer:s,label:"app",onChange:l,options:r,placeholder:"App",sx:{alignSelf:"flex-start"},values:e.app})}));gl.displayName="AnalyticsOverviewAppFilter";const vl=[{id:"fleet",title:"Compare to fleet"},{id:"configuration",title:"Compare to configuration"}],Cl=(0,a.memo)((()=>{var e,t,n,r,l,s;const d=yn(),c=En(),[u,h]=(0,a.useState)(!1),g=(0,a.useRef)(null),C=null!==(e=null===d||void 0===d?void 0:d.compareScope)&&void 0!==e?e:null===c||void 0===c?void 0:c.compareScope,x=null!==(t=null===d||void 0===d?void 0:d.setCompareScope)&&void 0!==t?t:null===c||void 0===c?void 0:c.setCompareScope,f=null!==(n=null===d||void 0===d?void 0:d.deviceId)&&void 0!==n?n:null===c||void 0===c||null===(r=c.overviewFilters.device)||void 0===r?void 0:r[0],b=null!==(l=null===(s=(0,o.find)(vl,{id:C}))||void 0===s?void 0:s.title)&&void 0!==l?l:"Compare to fleet",j=(0,a.useCallback)((()=>{h((e=>!e))}),[]),Z=(0,a.useCallback)((()=>{h(!1)}),[]),w=(0,a.useCallback)((e=>{null===x||void 0===x||x(e),h(!1)}),[x]);return C&&x&&f?(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(tl,{chipRef:g,hasSelection:!1,label:b,onClear:j,onOpen:j}),(0,p.jsx)(Xr.Z,{anchorEl:g.current,open:u,placement:"bottom-start",style:{zIndex:1300},children:(0,p.jsx)(ca.Z,{onClickAway:Z,children:(0,p.jsx)(Me.Z,{sx:{marginTop:.5,width:280,border:1,borderColor:"grey.400",display:"flex",flexDirection:"column",boxShadow:e=>"0px 0px 20px 5px ".concat((0,Dr.Fq)(e.palette.common.black,.15)),borderRadius:"8px"},children:(0,p.jsx)(i.Z,{paddingY:"0 !important",children:(0,o.map)(vl,(e=>{const t=C===e.id;return(0,p.jsx)(Hi.Z,{selected:t,onClick:()=>w(e.id),sx:{paddingY:1,minHeight:40,"&.Mui-selected":{backgroundColor:y.DG.purple[100],color:y.DG.primary[300],"&:hover":{backgroundColor:y.DG.purple[100]}}},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{width:"100%"},children:[(0,p.jsx)(v.Z,{variant:"body2",children:e.title}),t&&(0,p.jsx)(Vi.Z,{fontSize:"small",color:"primary",sx:{marginLeft:1}})]})},e.id)}))})})})})]}):null}));Cl.displayName="AnalyticsOverviewCompareSelector";const xl=(0,a.memo)((()=>{const{analyticsFilterLists:e}=Ve(),{overviewFilters:t,setOverviewConfigurationFilter:n}=wn(),i=(0,a.useMemo)((()=>{var t;return hl(null!==(t=null===e||void 0===e?void 0:e.configuration)&&void 0!==t?t:[])}),[null===e||void 0===e?void 0:e.configuration]),o=(0,a.useCallback)((e=>{n(e)}),[n]);return(0,p.jsx)(pl,{checklist:!0,disabled:!e,label:"configuration",onChange:o,options:i,placeholder:"Configuration",sx:{alignSelf:"flex-start"},values:t.configuration})}));xl.displayName="AnalyticsOverviewConfigurationFilter";var fl=n(45484),bl=n(60482);const yl={paddingX:2,paddingY:1.25,width:"100%"},jl=(e,t)=>(0,ul.d2)(e,t.trim(),(e=>(0,p.jsx)(v.Z,{variant:"inherit",component:"span",sx:{fontWeight:"bold"},children:e})),{caseInsensitive:!0}),Zl=(0,a.memo)((e=>{var t,n;let{devices:r,devicesPending:l=!1,devicesLoaded:s=!0,value:d,onChange:c,placeholder:u="Search for a device",disabled:h=!1,fullWidth:g=!1,sx:C,inputTestId:x="deviceSingleSelectSearchInput",onLoadDevices:f}=e;const[b,j]=(0,a.useState)(""),[Z,w]=(0,a.useState)(!1),[E,S]=(0,a.useState)(!1),[D,M]=(0,a.useState)(0),[k,I]=(0,a.useState)(),A=(0,a.useRef)(null),R=(0,a.useRef)(null),T=(0,a.useRef)(),P=(0,a.useMemo)((()=>d?(0,o.find)(r,{id:d}):void 0),[r,d]),L=Boolean(P&&(!b||d)),N=(0,a.useMemo)((()=>((e,t)=>{const n=t.trim();if(!n)return[];const i=n.toLowerCase();return e.filter((e=>((e,t)=>e.name.toLowerCase().includes(t)||e.serial.toLowerCase().includes(t)||e.id.toLowerCase().includes(t))(e,i)))})(r,b)),[r,b]);(0,a.useEffect)((()=>{M(0)}),[N]),(0,a.useEffect)((()=>()=>{void 0!==T.current&&window.clearTimeout(T.current)}),[]),(0,a.useEffect)((()=>{d&&!l&&s&&((0,o.find)(r,{id:d})||c(void 0))}),[r,s,l,c,d]),(0,a.useEffect)((()=>{!d||l||P||null===f||void 0===f||f()}),[l,f,P,d]);const U=(0,a.useCallback)((()=>{null===f||void 0===f||f()}),[f]),F=(0,a.useCallback)((()=>{void 0!==T.current&&(window.clearTimeout(T.current),T.current=void 0)}),[]),O=(0,a.useCallback)((()=>{w(!1),S(!1)}),[]),_=(0,a.useCallback)((()=>{j("")}),[]),z=(0,a.useCallback)((()=>{_(),O()}),[_,O]),B=(0,a.useCallback)((function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{highlightChip:i=!0,keepFocus:o=!0}=n;F(),c(e),_(),w(!1),S(i),o?window.setTimeout((()=>{var e;null===(e=A.current)||void 0===e||e.focus()}),0):null===(t=A.current)||void 0===t||t.blur()}),[F,_,c]),W=(0,a.useCallback)((()=>{U(),L&&S(!0)}),[L,U]),V=(0,a.useCallback)((e=>{var t;L&&(U(),e.preventDefault(),null===(t=A.current)||void 0===t||t.focus(),S(!0))}),[L,U]),G=(0,a.useCallback)((e=>{const t=e.target.value;U(),d&&(c(void 0),S(!1)),j(t),w(!!t.trim())}),[c,U,d]),H=(0,a.useCallback)((e=>{if(L&&1===e.key.length&&!e.ctrlKey&&!e.metaKey&&!e.altKey)return U(),e.preventDefault(),c(void 0),S(!1),j(e.key),void w(!0);if("Escape"===e.key)return _(),void O();if("Enter"===e.key&&b.trim()&&N.length>0)return e.preventDefault(),void B(N[D].id,{highlightChip:!1,keepFocus:!1});if("Backspace"===e.key){if(E&&d)return e.preventDefault(),c(void 0),void S(!1);if(!b&&d)return e.preventDefault(),void S(!0)}return b.trim()&&0!==N.length?"ArrowDown"===e.key||"Tab"===e.key?(e.preventDefault(),w(!0),void M((e=>Math.min(e+1,N.length-1)))):"ArrowUp"===e.key?(e.preventDefault(),w(!0),void M((e=>Math.max(e-1,0)))):void 0:void 0}),[_,O,b,N,D,E,L,c,U,B,d]),q=(0,a.useCallback)((e=>{B(e)}),[B]),Y=(0,a.useCallback)((()=>{F(),T.current=window.setTimeout((()=>{T.current=void 0,_(),O()}),0)}),[F,_,O]),K=b.trim(),X="".concat(x,"-listbox"),Q=Z&&!!K&&N.length>0,J=Z&&!!K&&l&&0===N.length,$=Z&&!!K&&!l&&0===N.length,ee=Q||J||$,te=null===(t=N[D])||void 0===t?void 0:t.id,ne=te?"".concat(x,"-option-").concat(te):void 0;(0,a.useLayoutEffect)((()=>{ee&&R.current&&I(g?R.current.clientWidth:450)}),[g,ee]);const ie=(0,a.useMemo)((()=>({zIndex:1300,width:null!==k&&void 0!==k?k:g?void 0:450})),[k,g]),oe=(0,a.useMemo)((()=>({...ie,maxWidth:450})),[ie]);return(0,p.jsx)(ca.Z,{onClickAway:z,children:(0,p.jsxs)(m.Z,{ref:R,sx:[{width:g?"100%":void 0,alignItems:"flex-start"},...Array.isArray(C)?C:[C]],children:[(0,p.jsx)(Ln.Z,{inputRef:A,autoComplete:"off",size:"small",fullWidth:g,placeholder:P?void 0:u,value:L?"":b,disabled:h,onChange:G,onF
3ocus:W,onBlur:Y,onKeyDown:H,onMouseDown:V,inputProps:{"data-testid":x,readOnly:L,role:"combobox","aria-expanded":ee,"aria-controls":ee?X:void 0,"aria-activedescendant":Q&&ne?ne:void 0,"aria-autocomplete":"list","aria-busy":l||void 0},InputProps:{startAdornment:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(bl.T,{pending:l&&!!b.trim()}),d&&(0,p.jsx)(mo.Z,{position:"start",sx:{flex:"1 1 auto",marginRight:.5,maxWidth:"100%",minWidth:0},children:(0,p.jsx)(ke.Z,{label:null!==(n=null===P||void 0===P?void 0:P.name)&&void 0!==n?n:d,size:"small","data-testid":"deviceSingleSelectSearchChip",sx:{borderRadius:9999,height:36,maxWidth:"100%",backgroundColor:y.DG.purple[100],"&.MuiChip-filledDefault":{backgroundColor:y.DG.purple[100]},"& .MuiChip-label":{display:"block",overflow:"hidden",textOverflow:"ellipsis"},border:"1px solid",borderColor:E?"primary.main":"transparent"}})})]})},sx:{width:g?"100%":300,".MuiInputBase-root":{minHeight:44,flexWrap:"nowrap",overflow:"hidden"},"& .MuiInputBase-input":L?{width:0,minWidth:0,padding:0,caretColor:"transparent",cursor:"default"}:void 0}}),Q&&(0,p.jsx)(Xr.Z,{open:!0,anchorEl:R.current,placement:"bottom-start",sx:ie,disablePortal:!0,children:(0,p.jsx)(Me.Z,{sx:{overflow:"auto",border:1,borderColor:"grey.400",borderRadius:"8px",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.1)",marginTop:1,width:"100%",maxHeight:400},children:(0,p.jsx)(ii.Z,{disablePadding:!0,id:X,role:"listbox","aria-label":"Devices","data-testid":"deviceSingleSelectSearchList",sx:{paddingY:.5},children:N.map(((e,t)=>{const n=((e,t)=>{const n=t.trim();if(!n)return;const i=n.toLowerCase();return e.serial.toLowerCase().includes(i)?e.serial:void 0})(e,b);return(0,p.jsx)(fl.ZP,{disablePadding:!0,children:(0,p.jsx)(oi.Z,{id:"".concat(x,"-option-").concat(e.id),role:"option","aria-selected":t===D,selected:t===D,onClick:()=>q(e.id),onMouseEnter:()=>M(t),onMouseDown:e=>{e.preventDefault()},"data-testid":"deviceSingleSelectSearchOption-".concat(e.id),sx:(i=!!n,{paddingX:2,paddingY:i?.75:1.25,color:"text.primary","&:hover":{bgcolor:"grey.50",color:"text.primary"},"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary","&:hover":{bgcolor:"grey.100",color:"text.primary"}}}),children:(0,p.jsxs)(m.Z,{spacing:n?.5:0,sx:{width:"100%",overflow:"hidden"},children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:jl(e.name,b)}),n&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:jl(n,b)})]})})},e.id);var i}))})})}),J&&(0,p.jsx)(Xr.Z,{open:!0,anchorEl:R.current,placement:"bottom-start",sx:ie,disablePortal:!0,children:(0,p.jsx)(Me.Z,{sx:{border:1,borderColor:"grey.400",borderRadius:"8px",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.1)",marginTop:1,width:"100%",padding:2},children:(0,p.jsx)(v.Z,{id:X,role:"listbox","aria-label":"Devices",sx:{paddingY:.5},children:(0,p.jsx)(fl.ZP,{disablePadding:!0,children:(0,p.jsx)(i.Z,{sx:yl,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"deviceSingleSelectSearchLoadingState",children:"Loading devices..."})})})})})}),$&&(0,p.jsx)(Xr.Z,{open:!0,anchorEl:R.current,placement:"bottom-start",sx:oe,disablePortal:!0,children:(0,p.jsx)(Me.Z,{sx:{border:1,borderColor:"grey.400",borderRadius:"8px",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.1)",marginTop:1,width:"100%",padding:2},children:(0,p.jsx)(v.Z,{id:X,role:"listbox","aria-label":"Devices",sx:{paddingY:.5},children:(0,p.jsx)(fl.ZP,{disablePadding:!0,children:(0,p.jsx)(i.Z,{sx:yl,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"deviceSingleSelectSearchEmptyState",children:"No devices match your search"})})})})})})]})})}));Zl.displayName="UIDeviceSingleSelectSearch";const wl=(0,a.memo)((()=>{var e;const{overviewFilters:t,setOverviewDeviceFilter:n}=wn(),{devices:i,pending:o,loaded:a,ensureDevicesLoaded:r}=Ye();return(0,p.jsx)(Zl,{devices:i,devicesLoaded:a,devicesPending:o,fullWidth:!0,onChange:n,onLoadDevices:r,value:null===(e=t.device)||void 0===e?void 0:e[0]})}));wl.displayName="AnalyticsOverviewDeviceFilter";const El=["Meta","Pico",bi.p6.Anker,bi.p6.DPVR,bi.p6.HTC,bi.p6.Lenovo,bi.p6.MagicLeap,bi.p6.Samsung,bi.p6.XREAL],Sl=e=>{const t=(0,Vr.sd)(e);return t?t===bi.p6.Oculus?"Meta":t:"Other"},Dl=e=>{const t=El.indexOf(e);return-1===t?El.length:t},Ml=(e,t)=>{const n=Dl(e.manufacturer)-Dl(t.manufacturer);return 0!==n?n:"Unknown"===e.modelName?1:"Unknown"===t.modelName?-1:e.modelName.localeCompare(t.modelName)},kl=(0,a.memo)((e=>{let{modelItems:t,values:n,onChange:i,disabled:r=!1,label:l="model",placeholder:s="Device model",sx:d}=e;const c=(0,a.useMemo)((()=>{return e=t,(0,o.chain)(e).groupBy("title").map(((e,t)=>({modelName:t,relatedModels:(0,o.map)(e,"id"),manufacturer:Sl(e[0].id)}))).sort(Ml).value();var e}),[t]),u=(0,a.useMemo)((()=>(e=>{const t=[];let n;for(const i of e)i.manufacturer!==n&&(t.push({variant:"header",title:i.manufacturer}),n=i.manufacturer),t.push({id:i.modelName,title:i.modelName});return t})(c)),[c]),h=(0,a.useMemo)((()=>{return e=null!==n&&void 0!==n?n:[],c.filter((t=>t.relatedModels.every((t=>e.includes(t))))).map((e=>e.modelName));var e}),[c,n]),m=(0,a.useCallback)((e=>{i(((e,t)=>{const n=new Set;for(const i of e){const e=t.find((e=>e.modelName===i||e.relatedModels.includes(i)));
3e?e.relatedModels.forEach((e=>n.add(e))):n.add(i)}return Array.from(n)})(e,c))}),[c,i]);return(0,p.jsx)(pl,{checklist:!0,disabled:r,label:l,onChange:m,options:u,placeholder:s,sx:d,values:h})}));kl.displayName="UIDeviceModelMultiSelect";const Il=(0,a.memo)((()=>{var e;const{analyticsFilterLists:t}=Ve(),{overviewFilters:n,setOverviewModelFilter:i}=wn();return(0,p.jsx)(kl,{disabled:!t,modelItems:null!==(e=null===t||void 0===t?void 0:t.model)&&void 0!==e?e:[],onChange:i,sx:{alignSelf:"flex-start"},values:n.model})}));Il.displayName="AnalyticsOverviewModelFilter";const Al=(0,a.memo)((()=>{const{analyticsFilterLists:e}=Ve(),{overviewFilters:t,setOverviewTagFilter:n}=wn(),i=(0,a.useMemo)((()=>{var t;return hl(null!==(t=null===e||void 0===e?void 0:e.tag)&&void 0!==t?t:[])}),[null===e||void 0===e?void 0:e.tag]),o=(0,a.useCallback)((e=>{n(e)}),[n]);return(0,p.jsx)(pl,{checklist:!0,disabled:!e,label:"tag",onChange:o,options:i,placeholder:"Tag",sx:{alignSelf:"flex-start"},values:t.tag})}));Al.displayName="AnalyticsOverviewTagFilter";const Rl=(0,a.memo)((()=>{const{metrics:e,sessionsLoaded:t,sessionsError:n,activeDevicesLoaded:i,activeDevicesError:o,refreshing:r}=wn(),{activeDevices:l,sessionCount:s,trends:d}=e,c=t&&n,u=i&&!o,h=(0,a.useMemo)((()=>{if(!(c||s<=0)&&u)return"".concat(ve(l)," device").concat(1===l?"":"s"," active")}),[l,u,c,s]);return(0,p.jsx)(oa,{title:"Sessions",value:ve(s),subtitle:h,trend:c?void 0:d.sessions,loading:!t,error:c,refreshing:r})}));Rl.displayName="AnalyticsSessionsKpiCard";const Tl=(0,a.memo)((()=>{const{engagementByTag:e,tagEngagementLoaded:t}=wn();return(0,p.jsx)(Ia,{emptyMessage:"No tag usage data",loading:!t,rows:e,searchPlaceholder:"Search tags...",title:"Usage by Tag",valueColumnLabel:"Tag",viewAllNoun:"tags"})}));Tl.displayName="AnalyticsTagEngagementTable";const Pl=(0,a.memo)((()=>{const{metrics:e,totalUsageLoaded:t,totalUsageError:n,refreshing:i}=wn(),o=t&&n,a=e.topApp;return(0,p.jsx)(oa,{title:"Top App",value:null===a||void 0===a?void 0:a.title,valueTooltip:a&&!o?a.title:void 0,subtitle:o||!a?void 0:bt(a.seconds),iconUrl:null===a||void 0===a?void 0:a.iconUrl,
3showIcon:Boolean(a)&&!o,trend:o?void 0:e.trends.topApp,loading:!t,error:o,empty:t&&!o&&!a,refreshing:i})}));Pl.displayName="AnalyticsTopAppKpiCard";const Ll=(0,a.memo)((()=>{const{metrics:e,totalUsageLoaded:t,totalUsageError:n,refreshing:i}=wn(),o=t&&n;return(0,p.jsx)(oa,{title:"Total Usage",value:jt(e.totalSeconds),subtitle:o?void 0:bt(e.totalSeconds),trend:o?void 0:e.trends.totalUsage,loading:!t,error:o,refreshing:i})}));Ll.displayName="AnalyticsTotalUsageKpiCard";const Nl=(0,a.memo)((()=>{var e;const{overviewFilters:t}=wn(),n=$e(),o=n?null===(e=t.device)||void 0===e?void 0:e[0]:void 0;return(0,p.jsxs)(m.Z,{spacing:2,children:[n&&(0,p.jsx)(wl,{}),o?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",spacing:2,children:(0,p.jsx)(i.Z,{alignSelf:"flex-start",children:(0,p.jsx)(Cl,{})})}),(0,p.jsx)(Br,{showSectionDividers:!1})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",spacing:1,children:[(0,p.jsx)(gl,{}),(0,p.jsx)(xl,{}),(0,p.jsx)(Al,{}),(0,p.jsx)(Il,{})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(Ll,{}),(0,p.jsx)(aa,{}),(0,p.jsx)(Rl,{}),(0,p.jsx)(Ta,{}),(0,p.jsx)(Pl,{})]}),(0,p.jsx)(Ra,{}),n&&(0,p.jsx)(Xa,{}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(i.Z,{flex:1,minWidth:0,children:(0,p.jsx)(Sr,{})}),(0,p.jsx)(i.Z,{flex:1,minWidth:0,children:(0,p.jsx)(_r,{})})]}),(0,p.jsx)(Pa,{}),(0,p.jsx)(Tl,{}),(0,p.jsx)(Kr,{})]})]})}));Nl.displayName="AnalyticsOverviewTab";var Ul=n(8386),Fl=n(62295),Ol=n(63761),_l=n(84318),zl=n(49596),Bl=n(83512),Wl=n(57514),Vl=n(27700),Gl=n(84220),Hl=n(41755);const ql=["#9483EA","#F8A181","#D36666","#A5D4EF","#67B874","#F0B96B","#527CD1","#ECACDE","#939296"],Yl=ql.length,Kl=Gt({concurrency:1}),Xl="function"===typeof requestAnimationFrame?e=>requestAnimationFrame((()=>e())):e=>setTimeout(e,16);let Ql=[],Jl=!1;const $l=()=>{Jl=!1;Ql.splice(0,2).forEach((e=>e())),Ql.length>0&&es()},es=()=>{Jl||(Jl=!0,Xl($l))},ts=e=>{const[t,n]=(0,a.useState)(!1),[i,o]=(0,a.useState)(e);return e!==i&&(o(e),n(!1)),(0,a.useEffect)((()=>{var e;if(!t)return e=()=>n(!0),Ql.push(e),es(),()=>{Ql=Ql.filter((t=>t!==e))}}),[t]),t};var ns=n(69986),is=n(34605),os=n(498),as=n(89021),rs=n(26560),ls=n(26098),ss=n.n(ls);const ds=e=>{const{width:t,height:n,analyticsChart:i,chartData:r,selectedId:l}=e,s=(0,De.Z)(),d=a.useMemo((()=>({top:s.spacingInt(1),bottom:s.spacingInt(3),left:s.spacingInt(6),right:s.spacingInt(4)})),[s]),c=a.useMemo((()=>l?[l]:(0,o.map)(r.groups,"id")),[r.groups,l]),u=a.useMemo((()=>Math.max("bar"===i.type?Math.max(...(0,o.map)(r.data,(e=>(0,o.sum)((0,o.values)((0,o.pick)(e,c)))))):Math.max(...(0,o.map)(r.data,(e=>Math.max(...(0,o.values)((0,o.pick)(e,c)))))),"devices"===i.unit?2:120)),[i.type,i.unit,r.data,c]),p="devices"===i.unit?"devices":u>=7200?"hours":"minutes",h="devices"===p?1:"hours"===p?1/3600:1/60,m=a.useMemo((()=>({data:(0,o.map)(r.data,(e=>({period:e.period,...(0,o.mapValues)((0,o.pick)(e,c),(e=>e*h))}))),groups:(0,o.filter)(r.groups,(e=>(0,o.includes)(c,e.id)))})),[r.data,r.groups,c,h]),g=a.useMemo((()=>(0,dr.Z)({domain:[0,u*h],range:[n-d.bottom,d.top],nice:!0})),[n,d.bottom,d.top,u,h]);return{xScale:a.useMemo((()=>(0,sr.Z)({domain:[(0,o.first)(r.data).period.startTime,(0,o.last)(r.data).period.endTime],range:[d.left,t-d.right]})),[r.data,d.left,d.right,t]),yScale:g,scaledChartData:m,displayUnit:p,margin:d}},cs=e=>{let{width:t,height:n,xScale:i,yScale:o,displayUnit:a,margin:r}=e;const l=(0,De.Z)(),s=i.ticks(5),d=o.ticks(3).filter((e=>Number.isInteger(e)));return(0,p.jsxs)(rr.Z,{style:{pointerEvents:"none"},children:[(0,p.jsx)(ar.Z,{height:n-r.top-r.bottom,width:t-r.left-r.right,top:r.top,left:r.left,offset:-r.top,tickValues:d,scale:o,stroke:l.palette.grey[400]}),(0,p.jsx)(tr.Z,{left:r.left,scale:o,tickValues:d,tickFormat:e=>{const t=e.valueOf(),n=ss()(t).format("0a");return"".concat(n).concat("devices"===a?"":"hours"===a?" hr":" min")},hideZero:!0}),(0,p.jsx)(nr.Z,{top:n-r.bottom,scale:i,tickValues:s,tickFormat:e=>i.tickFormat(s.length)(new Date(e.valueOf()))})]})},us=e=>{let{analyticsChart:t,chartData:n,width:i,height:a,colorScale:r,containerRef:l,hoveredId:s,hoveredIndex:d,selectedId:c,onClick:u=(()=>{}),onMouseMove:h=(()=>{}),onMouseLeave:m=(()=>{})}=e;const{xScale:g,yScale:v,scaledChartData:C,displayUnit:x,margin:f}=ds({width:i,height:a,analyticsChart:t,chartData:n,selectedId:c}),b=(0,ns.Z)({domain:(0,o.map)(C.data,(e=>e.period.startTime)),range:[f.left,i-f.right],padding:.1});return(0,p.jsxs)("svg",{ref:l,style:{position:"absolute"},width:i,height:a,children:[(0,p.jsx)(cs,{width:i,height:a,xScale:g,yScale:v,displayUnit:x,margin:f}),(0,p.jsx)(rr.Z,{top:0,children:(0,p.jsx)(is.Z,{data:C.data,keys:(0,o.map)(C.groups,"id"),x:e=>e.period.startTime,xScale:b,yScale:v,color:r,children:e=>(0,o.map)(e,(e=>(0,o.map)(e.bars,(t=>(0,p.jsx)("rect",{x:t.x,y:t.y,height:Math.max(0,t.height),width:t.width,fill:t.color,filter:s!==t.key||d!==t.index&&void 0!==d||c?void 0:"brightness(0.9)",cursor:"pointer",onMouseMove:e=>{h({id:t.key,index:t.index,event:e})},onMouseLeave:()=>{m()},onClick:()=>{u(t.key)}},"".concat(e.index,"-").concat(t.index))))))})})]})}
3,ps=e=>{let{analyticsChart:t,chartData:n,width:i,height:r,colorScale:l,containerRef:s,hoveredId:d,hoveredIndex:c,selectedId:u,onClick:h=(()=>{}),onMouseMove:m=(()=>{}),onMouseLeave:g=(()=>{})}=e;const{xScale:v,yScale:C,scaledChartData:x,displayUnit:f,margin:b}=ds({width:i,height:r,analyticsChart:t,chartData:n,selectedId:u}),y=a.useMemo((()=>(0,o.reduce)(x.data,((e,t,n)=>(0,o.mergeWith)(e,((e,t)=>{const n=(e.period.startTime+e.period.endTime)/2;return(0,o.chain)(e).omit("period").reduce(((e,i,o)=>({...e,[o]:[{displayTime:n,value:i,index:t}]})),{}).value()})(t,n),((e,t)=>{if((0,o.isArray)(e))return[...e,...t]}))),{})),[x.data]),j=a.useMemo((()=>(0,rs.Z)({x:e=>v(e.displayTime),y:e=>C(e.value),width:i,height:r})((0,o.chain)(y).mapValues(((e,t)=>(0,o.map)(e,((e,n)=>({...e,index:n,groupId:t}))))).values().flatten().value())),[i,r,v,C,y]);return(0,p.jsxs)("svg",{ref:s,style:{position:"absolute",cursor:d?"pointer":"auto"},width:i,height:r,onMouseMove:e=>{const t=(0,or.Z)(e.currentTarget,e);if(!t)return;const n=j.find(t.x,t.y,50);n?m({id:n.data.groupId,index:n.data.index,event:e}):g()},onMouseLeave:g,onClick:()=>{d&&h(d)},children:[(0,p.jsx)(cs,{width:i,height:r,xScale:v,yScale:C,displayUnit:f,margin:b}),(0,p.jsxs)(rr.Z,{top:0,children:[(0,o.map)(y,((e,t)=>(0,p.jsxs)(a.Fragment,{children:[(0,o.map)(e,((e,n)=>d===t&&c===n?null:(0,p.jsx)(os.Z,{cx:v(e.displayTime),cy:C(e.value),r:3,fill:l(t),fillOpacity:.75},"".concat(t,"-").concat(n)))),(0,p.jsx)(ur.Z,{curve:ir.Z,data:e,x:e=>v(e.displayTime),y:e=>C(e.value),stroke:l(t),strokeWidth:4,strokeOpacity:.75})]},t))),d&&(0,o.isNumber)(c)&&(0,p.jsx)(os.Z,{cx:v(y[d][c].displayTime),cy:C(y[d][c].value),r:5,fill:l(d),fillOpacity:1})]})]})},hs=e=>{var t;let{analyticsChart:n,chartData:i,width:a,height:r,colorScale:l,containerRef:s,hoveredId:d,selectedId:c,onClick:u=(()=>{}),onMouseMove:h=(()=>{}),onMouseLeave:g=(()=>{})}=e;const C=(0,De.Z)(),x=C.spacingInt(1),f=C.spacingInt(1),b=C.spacingInt(1),y=C.spacingInt(1),j=a-b-y,Z=r-x-f,w=Math.min(j,Z)/2,E=w-C.spacingInt(5),S=j/2+y,D=Z/2+x,{groups:k,data:I}=i,A=(0,o.map)(c?(0,o.filter)(k,{id:c}):k,(e=>({...e,value:I[0][e.id]}))),R=(0,o.sum)((0,o.map)(A,"value")),T="devices"===n.unit&&"app"===n.groupType;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("svg",{ref:s,style:{position:"absolute"},width:a,height:r,children:(0,p.jsx)(rr.Z,{width:j,height:Z,top:D,left:S,children:(0,p.jsx)(as.Z,{data:A,pieValue:e=>e.value,pieSortValues:()=>0,outerRadius:w,innerRadius:E,children:e=>{let{arcs:t,path:n}=e;return(0,o.map)(t,(e=>{var t;return(0,p.jsx)("g",{children:(0,p.jsx)("path",{d:null!==(t=n(e))&&void 0!==t?t:void 0,fill:l(e.data.id),filter:d!==e.data.id||c?void 0:"brightness(0.9)",cursor:"pointer",onMouseMove:t=>{h({id:e.data.id,index:0,event:t})},onMouseLeave:()=>{g()},onClick:()=>{u(e.data.id)}})},e.data.id)}))}})})}),(!T||0===R)&&(0,p.jsxs)(m.Z,{position:"absolute",top:"50%",left:"50%",alignItems:"center",style:{transform:"translate(-50%, -50%)"},children:[(0,p.jsx)(v.Z,{width:2*E-C.spacingInt(3),textAlign:"center",variant:"body2",color:"textSecondary",children:c?null===(t=(0,o.find)(k,{id:c}))||void 0===t?void 0:t.title:"Total"}),(0,p.jsx)(v.Z,{width:2*E-C.spacingInt(3),textAlign:"center",variant:"subtitle2",children:"seconds"===n.unit?(0,M.YU)(R):"".concat(R," Device").concat(1===R?"":"s")})]})]})},ms=a.memo((e=>{let{analyticsChart:t,...n}=e;switch(t.type){case"bar":return(0,p.jsx)(us,{analyticsChart:t,...n});case"line":return(0,p.jsx)(ps,{analyticsChart:t,...n});case"pie":return(0,p.jsx)(hs,{analyticsChart:t,...n})}})),gs=e=>{let{group:t,type:n,color:o}=e;const a="configuration"===n?Wl.Z:"tag"===n?Vl.Z:"app"===n?Bl.Z:(0,Vr.Xj)(t.id);return(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[(0,p.jsx)(i.Z,{width:20,height:20,borderRadius:1,bgcolor:"grey.100",textAlign:"center",paddingTop:"1px",children:t.iconUrl?(0,p.jsx)(re.Z,{variant:"rounded",style:{width:18,height:18,borderStyle:"solid",borderWidth:3,borderColor:o},src:t.iconUrl}):(0,p.jsx)(a,{sx:{fontSize:18,color:o}})}),(0,p.jsx)(v.Z,{variant:"body2",children:t.title})]})},vs=a.memo((e=>{let{groupType:t,groups:n,colorScale:i,selectedId:a,onClick:r=(()=>{}),onMouseEnter:l=(()=>{}),onMouseLeave:s=(()=>{})}=e;return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",flexWrap:"wrap",children:(0,o.map)(n,(e=>(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:1,padding:.5,margin:.5,onClick:()=>r(e.id),borderRadius:1,sx:{cursor:"pointer",backgroundColor:a===e.id?"grey.100":void 0,borderWidth:1,borderStyle:"solid",borderColor:a===e.id?"primary.main":"transparent",userSelect:"none","&:hover":{backgroundColor:"grey.100"}},onMouseEnter:()=>l(e.id),onMouseLeave:()=>s(e.id),children:(0,p.jsx)(gs,{type:t,color:i(e.id),group:e})},e.id)))})})),Cs=a.memo((e=>{let{color:t,total:n,period:i,value:o,group:a,analyticsChart:r}=e;const l="devices"===r.unit&&"app"===r.groupType||r.groupType===qi.ki.None;return(0,p.jsx)(Me.Z,{sx:{minWidth:120},children:(0,p.jsxs)(m.Z,{padding:1,spacing:.5,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[r.groupType!==qi.ki.None&&a&&(0,p.jsx)(gs,{type:r.groupType,color:t,group:a}),(0,p.jsx)(v.Z,{variant:"subtitle2",children:"seconds"===r.unit?(0,M.YU)(o):"".concat(o," device").concat(1===o?"":"s")})]}),n&&!l&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"textSecondary",children:"Total"}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"textSecondary",children:"seconds"===r.unit?(0,M.YU)(n):"".concat(n," device").concat(1===n?"":"s")})]}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(v.Z,{variant:"body2",color:"textSecondary",children:(0,M.RU)(i.startTime,i.endTime)})]})})})),xs=a.memo((e=>{let{analyticsChart:t,rerenderTime:n,index:r}=e;const{chartData:l,chartDataError:s,refreshing:d}=((e,t)=>{const{organizationId:n}=(0,w.P)(),[i,r]=(0,a.useState)(),[l,s]=(0,a.useState)(!1),[d,c]=(0,a.useState)(!1),{analyticsChartRefreshTime:p,apiFetchAnalyticsChartDataRequest:h,analyticsBatchRequestsEnabled:m,analyticsClientCacheEnabled:g}=Ve(),v=(0,a.useRef)();(0,a.useEffect)((()=>{v.current=i}),[i]);const C=(0,a.useRef)(n),x=(0,u.v9)((e=>e.ui.analytics.duration)),f=(0,u.v9)((e=>
3e.ui.analytics.dateRange)),[b,y]=(0,a.useState)(e.filters);(0,a.useEffect)((()=>{y((t=>(0,o.isEqual)(e.filters,t)?t:e.filters))}),[e.filters]);const j=(0,a.useMemo)((()=>{const[t,n]=(0,M.HF)(x,f);return{periods:[{startTime:t,endTime:n}],unit:e.unit,groupType:e.groupType,filters:b,includeSystemApps:e.includeSystemApps,..."pie"===e.type?{}:{granularity:"auto",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}}}),[e.groupType,e.includeSystemApps,e.type,e.unit,f,x,b]);(0,a.useEffect)((()=>{const e=C.current!==n;if(C.current=n,s(!1),!g)return void r(void 0);const t=Kt(Yt(n,p,j));t?(r(t),c(!1)):(e&&r(void 0),c(j.periods.length>0))}),[g,j,p,n]);const Z=(0,zn.c)(j,500),E=(0,a.useCallback)(((e,i)=>{const a=()=>h({data:e,controller:i,onSuccess:t=>{const i=t.groups.length>Yl,a=i?Yl-1:Yl,l=(0,o.chain)(t.groups).map((e=>({groupId:e.id,total:(0,o.reduce)(t.data,((t,n)=>{var i;return t+(null!==(i=n[e.id])&&void 0!==i?i:0)}),0)}))).sortBy("total").reverse().map((e=>{let{groupId:t}=e;return t})).value(),d=l.slice(0,a),u=l.slice(a),h={groups:[...(0,o.map)(d,(e=>(0,o.find)(t.groups,{id:e}))),...i?[{id:"other",title:"Other"}]:[]],data:(0,o.map)(t.data,(e=>({...(0,o.pick)(e,d),period:e.period,...i?{other:(0,o.chain)(e).pick(u).values().sum().value()}:{}})))};g&&Xt(Yt(n,p,e),h),s(!1),r(h),c(!1)},...m?{onError:()=>{g&&v.current?s(!1):(r(void 0),s(!0)),c(!1)}}:{}});m?a():Kl.add(a,{order:t})}),[m,g,p,h,t,n]);return(0,a.useEffect)((()=>{if(0===Z.periods.length)return;if(g){const e=Kt(Yt(n,p,Z));if(e)return r(e),s(!1),void c(!1);c(!0)}const e=new AbortController;return E(Z,e),()=>e.abort()}),[p,g,Z,E,n]),{chartData:i,chartDataError:l,refreshing:d}})(t,r),c=d&&!!l,h=ts(l),g=a.useMemo((()=>(0,Hl.Z)({domain:(0,o.map)(null===l||void 0===l?void 0:l.groups,"id"),range:ql})),[null===l||void 0===l?void 0:l.groups]),[C,x]=a.useState(!1);a.useEffect((()=>{x(!0);const e=window.setTimeout((()=>{x(!1)}),0);return()=>{window.clearTimeout(e)}}),[n]);const[f,b]=a.useState(),[y,j]=a.useState(),[Z,E]=a.useState();a.useEffect((()=>{b(void 0),j(void 0),E(void 0)}),[l]);const S=a.useCallback((e=>{b((t=>t===e?void 0:e))}),[]),{tooltipOpen:D,tooltipLeft:k,tooltipTop:I,tooltipData:A,hideTooltip:R,showTooltip:T}=(0,pr.Z)(),{containerRef:P,TooltipInPortal:L}=(0,hr.Z)({scroll:!0}),N=a.useCallback((e=>{const{id:t,index:n,event:i}=e,o=(0,or.Z)(i);T({tooltipData:{id:t,index:n},tooltipTop:null===o||void 0===o?void 0:o.y,tooltipLeft:null===o||void 0===o?void 0:o.x}),j(t),E(n)}),[T]),U=a.useCallback((()=>{R(),j(void 0),E(void 0)}),[R]),F=a.useCallback((e=>{j(e),E(void 0)}),[]),O=a.useCallback((e=>{j((t=>t===e?void 0:t))}),[]);return(0,p.jsxs)(i.Z,{sx:{position:"relative"},children:[c&&(0,p.jsx)(i.Z,{sx:{position:"absolute",top:8,right:8,zIndex:2,display:"flex"},children:(0,p.jsx)(Zi.Z,{size:18})}),(0,p.jsxs)(m.Z,{spacing:1,sx:{opacity:c?.5:1,transition:"opacity 150ms ease",pointerEvents:c?"none":"auto"},children:[(0,p.jsxs)(i.Z,{sx:{height:280,position:"relative"},children:[s&&(0,p.jsx)(m.Z,{height:1,alignItems:"center",justifyContent:"center",children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Failed to load chart data"})}),!s&&(!l||l.data.length>0&&(!h||C))&&(0,p.jsx)(m.Z,{height:1,padding:1,alignItems:"center",justifyContent:"center",children:(0,p.jsx)(Zi.Z,{})}),l&&0===l.data.length&&(0,p.jsx)(m.Z,{height:1,alignItems:"center",justifyContent:"center",children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"No data available"})}),l&&l.data.length>0&&h&&!C&&(0,p.jsx)(lr.Z,{style:{height:280},children:e=>{let{width:n,height:i}=e;return(0,p.jsxs)("div",{style:{position:"relative",height:i},children:[(0,p.jsx)(ms,{analyticsChart:t,chartData:l,width:n,height:i,containerRef:P,colorScale:g,hoveredId:y,hoveredIndex:Z,selectedId:f,onClick:S,onMouseMove:N,onMouseLeave:U}),D&&A&&(0,p.jsx)(L,{top:I,left:k,style:{...mr.j,padding:0,background:"none"},children:(0,p.jsx)(Cs,{value:l.data[A.index][A.id],total:f||"bar"!==t.type?void 0:(0,o.chain)(l.data[A.index]).omit("period").values().sum().value(),color:g(A.id),period:l.data[A.index].period,analyticsChart:t,group:(0,o.find)(l.groups,{id:A.id})})})]})}})]}),t.groupType!==qi.ki.None&&l&&l.data.length>0&&(0,p.jsx)(i.Z,{children:(0,p.jsx)(vs,{groups:l.groups,groupType:t.groupType,colorScale:g,selectedId:f,onClick:S,onMouseEnter:F,onMouseLeave:O})})]})]})}));var fs=n(68096),bs=n(30829),ys=n(58406),js=n(77196);const Zs=(0,a.memo)((e=>{let{sortedSelected:t,selectedMap:n,getChipColor:r,truncatedRowTestId:l}=e;const[s,d]=(0,a.useState)(0),{ref:c}=(0,Yi.y)((0,a.useCallback)((e=>{d(e.contentRect.width)}),[])),u=(0,a.useRef)(null),h=(0,a.useRef)(null),[g,C]=(0,a.useState)((()=>t.length));(0,a.useLayoutEffect)((()=>
3{if(0===t.length)return;const e=c.current,n=u.current;if(!e||!n)return;const i=e.getBoundingClientRect().width;if(i<=0)return;const a=Array.from(n.children).map((e=>e.getBoundingClientRect().width));if(0===a.length)return;const r=(e=>{const{chipWidthsPx:t,containerWidthPx:n,measureOverflowLabelPx:i}=e,a=t.length;if(0===a||n<=0)return 0;for(let r=a;r>=0;r--){const e=a-r,l=e>0?i(e)+4:0;if((0,o.sum)((0,o.slice)(t,0,r))+(r>0?4*(r-1):0)+l<=n)return r}return 0})({chipWidthsPx:a,containerWidthPx:i,measureOverflowLabelPx:e=>{const t=h.current;return t?(t.textContent="+".concat(e," others"),t.getBoundingClientRect().width):9999}});C((e=>e===r?e:r))}),[c,s,t]);const x=(0,a.useCallback)(((e,t)=>{var i;const o=null===r||void 0===r?void 0:r(e);return(0,p.jsx)(ke.Z,{label:null===(i=n[e])||void 0===i?void 0:i.title,size:"small",sx:{flexShrink:0,pointerEvents:"none"},variant:"filled",...void 0!==o?{color:o}:{}},"".concat(t,"-").concat(e))}),[r,n]),f=(0,o.slice)(t,0,g),b=(0,o.slice)(t,g);return(0,p.jsxs)(m.Z,{ref:c,direction:"row",alignItems:"center",spacing:.5,sx:{position:"relative",width:1,minWidth:0,overflow:"hidden"},children:[(0,p.jsx)(m.Z,{direction:"row",spacing:.5,...void 0!==l?{"data-testid":l}:{},sx:{flexShrink:1,minWidth:0,overflow:"hidden"},children:(0,o.map)(f,(e=>x(e,"visible")))}),b.length>0?(0,p.jsx)(ee.Z,{placement:"bottom-start",title:(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",gap:.5,padding:.5,bgcolor:"background.paper",maxWidth:"75vw",children:(0,o.map)(b,(e=>x(e,"overflow-tip")))}),componentsProps:{tooltip:{sx:{backgroundColor:"transparent"}}},children:(0,p.jsxs)(v.Z,{color:"text.secondary",variant:"caption",sx:{cursor:"default",flexShrink:0,fontWeight:y.$4,paddingLeft:.5,whiteSpace:"nowrap"},children:["+",b.length," others"]})}):null,(0,p.jsx)(i.Z,{ref:u,"aria-hidden":!0,sx:{position:"absolute",left:-15e3,top:0,display:"flex",flexDirection:"row",flexWrap:"nowrap",gap:.5,visibility:"hidden",pointerEvents:"none"},children:(0,o.map)(t,(e=>x(e,"measure")))}),(0,p.jsx)(v.Z,{ref:h,component:"span",variant:"caption","aria-hidden":!0,sx:{position:"absolute",left:-15e3,top:0,visibility:"hidden",whiteSpace:"nowrap",color:"text.secondary",fontWeight:y.$4,paddingTop:.25}})]})}));Zs.displayName="UIMultiSelectTruncatedSelectedValues";const ws=e=>{let{label:t,placeholder:n,values:r=[],options:l,onChange:s,renderSelectedValues:d,getChipColor:c,sx:u,checklist:h=!1,hideClear:g=!1,openBelow:C=!1,disabled:f=!1,truncateSelectedChipsOverflow:b=!1,truncatedSelectedChipsTestId:y}=e;const j=(0,a.useMemo)((()=>(0,Vt.Z)()),[]),Z=(0,a.useMemo)((()=>(0,o.chain)(l).map((e=>{if(!e.variant||"default"===e.variant)return[e.id,{title:e.title,selected:(0,o.some)(r,(t=>t===e.id))}]})).compact().fromPairs().value()),[l,r]),w=(0,a.useCallback)((e=>(0,o.sortBy)(e,(e=>(0,o.findIndex)(l,{id:e})))),[l]),E=(0,a.useCallback)((e=>{if(d)return d(e);if((0,o.isEmpty)(e))return(0,p.jsx)(v.Z,{color:"text.disabled",paddingY:.25,children:null!==n&&void 0!==n?n:"None Selected"});const t=w(e);return b?(0,p.jsx)(Zs,{getChipColor:c,selectedMap:Z,sortedSelected:t,truncatedRowTestId:y}):(0,p.jsx)(i.Z,{sx:{paddingTop:.5,display:"flex",flexWrap:"wrap",gap:.5},children:(0,o.map)(t,(e=>{var t;const n=null===c||void 0===c?void 0:c(e);return(0,p.jsx)(ke.Z,{size:"small",label:null===(t=Z[e])||void 0===t?void 0:t.title,variant:"filled",...void 0!==n?{color:n}:{}},e)}))})}),[c,n,Z,w,d,b,y]),S=(0,a.useCallback)((e=>{const t={pointerEvents:"none",cursor:"default"};return"header"===e.variant?(0,p.jsx)(Hi.Z,{sx:t,children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary.main",children:e.title})},e.title):"text"===e.variant?(0,p.jsx)(Hi.Z,{sx:t,children:e.title},e.title):h?(0,p.jsx)(Hi.Z,{value:e.id,children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,children:[(0,p.jsx)(Pi.Z,{checked:null===(n=Z[e.id])||void 0===n?void 0:n.selected,sx:{paddingLeft:0,paddingRight:1,paddingY:.5},size:"small"}),e.title]})},e.id):(0,p.jsx)(Hi.Z,{value:e.id,children:e.title},e.id);var n}),[h,Z]),D=(0,a.useRef)(null);return(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,sx:u,alignItems:"flex-start",children:[(0,p.jsxs)(fs.Z,{sx:{flexGrow:1},children:[(0,p.jsx)(bs.Z,{id:j,children:t}),(0,p.jsx)(ys.Z,{labelId:j,multiple:!0,ref:D,disabled:f,value:r,onChange:e=>{const t=e.target.value;s("string"===typeof t?t.split(","):t)}
3,input:(0,p.jsx)(js.Z,{label:t}),displayEmpty:!0,renderValue:E,MenuProps:{...C?{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},anchorEl:D.current}:{},PaperProps:{sx:{borderRadius:2}}},children:(0,o.map)(l,S)})]}),g?null:(0,p.jsx)(i.Z,{paddingTop:1,children:(0,p.jsx)(ee.Z,{title:(0,o.isEmpty)(r)?"":"Clear",placement:"top",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{size:"small",disabled:f||(0,o.isEmpty)(r),onClick:()=>s([]),children:(0,p.jsx)(pa.Z,{})})})})})]})};ws.displayName="UIMultiSelect";const Es=(0,a.memo)((e=>{let{filters:t,onChange:n}=e;const{analyticsFilterLists:i}=Ve();return(0,p.jsx)(m.Z,{paddingX:1,spacing:2,children:i?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Include only these items:"}),(0,o.map)([[{type:"app",label:"Apps"},{type:"configuration",label:"Configurations"}],[{type:"tag",label:"Tags"},{type:"model",label:"Device Models"}]],((e,a)=>(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",gap:2,children:(0,o.map)(e,(e=>(0,p.jsx)(ws,{label:e.label,placeholder:"All",options:i[e.type],values:t[e.type],onChange:t=>n(e.type,t),sx:{flexBasis:240,flexGrow:1}},e.type)))},a)))]}):(0,p.jsx)(Rn.Z,{})})}));var Ss;!function(e){e.Full="full",e.Partial="partial",e.None="none"}(Ss||(Ss={}));const Ds=a.memo((e=>{var t,n;let{analyticsChart:r,onDeleteClick:l,index:s}=e;const{notify:d}=(0,ie.o)(),{privileges:c,approvedConfigurationIds:u,configurationsFullAccess:h}=(0,w.P)(),{updateAnalyticsChart:g}=Ve(),x=(0,a.useMemo)((()=>{var e;return null!==(e=r.filters.configuration)&&void 0!==e?e:[]}),[r.filters.configuration]),[f,b]=(0,a.useMemo)((()=>h?[x,[]]:(0,o.partition)(x,(e=>u.includes(e)))),[x,u,h]),y=(0,a.useMemo)((()=>h?Ss.Full:x.length?0===f.length?Ss.None:b.length>0?Ss.Partial:Ss.Full:Ss.Partial),[h,x.length,f.length,b.length]),j=a.useCallback((e=>!!e.title),[]),Z=a.useCallback((e=>{let{changes:t}=e;return g(r.id,t)}),[r.id,g]),{addChanges:E,clearChanges:S,withChanges:D,hasChanges:M,changesValid:k,saveChanges:I,saveChangesPending:A}=Ji({document:r,validate:j,save:Z}),R=(0,a.useMemo)((()=>{if(h)return D;const e=D.filters.configuration;if(null===e||void 0===e||!e.length)return D;const t=(0,o.filter)(e,(e=>u.includes(e)));return t.length===e.length?D:{...D,filters:{...D.filters,configuration:t}}}),[D,u,h]),[T,P]=a.useState(0);a.useEffect((()=>{P(Date.now())}),[M]);const[L,N]=a.useState(!1),U=a.useCallback(((e,t)=>{const n="configuration"===e&&b.length?[...t,...b]:t;E({filters:(0,o.isEmpty)(n)?(0,o.omit)(D.filters,[e]):{...D.filters,[e]:n}})}),[E,b,D.filters]);return y===Ss.None?(0,p.jsx)(Me.Z,{children:(0,p.jsxs)(m.Z,{padding:1,spacing:1,children:[(0,p.jsx)(v.Z,{marginLeft:1,variant:"subtitle1",fontWeight:"medium",children:r.title}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",paddingX:1,paddingBottom:1,children:"You don't have access to view this chart's data."})]})}):(0,p.jsx)(Me.Z,{sx:{contentVisibility:"auto",containIntrinsicSize:"auto 390px"},children:(0,p.jsxs)(m.Z,{padding:1,spacing:1,children:[L?(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,justifyContent:"space-between",alignItems:"flex-start",children:[(0,p.jsx)(Ul.z,{error:!D.title,placeholder:"Name",sx:{marginTop:1,marginLeft:1},label:"Title",value:D.title,onChange:e=>E({title:e.target.value})}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(C.Z,{onClick:()=>{S(),N(!1)},size:"small",color:"inherit",children:"Cancel"}),(0,p.jsx)(Un.U,{onClick:async()=>{try{await I(),N(!1),d({severity:"success",message:"Chart saved"})}catch(t){var e;const n=(0,Fe.tf)(t);d({severity:"error",message:null!==(e=null===n||void 0===n?void 0:n.message)&&void 0!==e?e:"Failed to save chart"}),n||(0,Si.yR)(t,{name:"save analytics chart"})}},size:"small",variant:M?"contained":"text",submitting:A,disabled:!M||!k,children:"Save"})]})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,padding:1,children:[(0,p.jsx)(Qi,{label:"Chart Type",value:D.type,options:[{value:"bar",label:"Bar",Icon:Ol.Z},{value:"line",label:"Line",Icon:_l.Z},{value:"pie",label:"Pie",Icon:zl.Z}],onChange:e=>E({type:e})}),(0,p.jsx)(Qi,{label:"Unit",value:D.unit,options:[{value:"seconds",label:"Time",Icon:he.Z},{value:"devices",label:"Devices",Icon:Fl.u}],onChange:e=>E({unit:e})}),(0,p.jsx)(Qi,{label:"Group By",value:null!==(t=D.groupType)&&void 0!==t?t:qi.ki.None,options:[{value:"app",label:"App",Icon:Bl.Z},{value:"configuration",label:"Configuration",Icon:Wl.Z},{value:"tag",label:"Tags",Icon:Vl.Z},{value:"model",label:"Device Model",Icon:Fl.u},{value:qi.ki.None,label:"None"}],onChange:e=>E({groupType:e})})]}),(0,p.jsx)(Es,{filters:R.filters,onChange:U}),y===Ss.Partial&&(0,p.jsx)(ui.Q,{severity:"info",singleRow:!0,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Some configurations are excluded based on your permissions."})}),(0,p.jsx)(po.Z,{control:(0,p.jsx)(Pi.Z,{size:"small"}),label:"Include system apps".concat((0,o.isEmpty)(D.filters.app)?"":" (overridden by apps filter)"),checked:null!==(n=D.includeSystemApps)&&void 0!==n&&n,disabled:!(0,o.isEmpty)(D.filters.app),onChange:()=>E({includeSystemApps:!D.includeSystemApps})}),(0,p.jsx)(i.Z,{padding:1,children:(0,p.jsx)(C.Z,{color:"error",variant:"outlined",onClick:()=>l(r),startIcon:(0,p.jsx)(Gl.Z,{}),size:"small",children:"Delete Chart"})}),(0,p.jsx)(Ie.Z,{})]}):(0,p.jsxs)(m.Z,{direction:"row",spacing:1,justifyContent:"space-between",alignItems:"flex-start",children:[(0,p.jsx)(v.Z,{marginLeft:1,variant:"subtitle1",fontWeight:"medium",children:r.title}),c.devices&&(0,p.jsx)(C.Z,{onClick:()=>{N(!0)},size:"small",children:"Edit"})]}),y===Ss.Partial&&!L&&(0,p.jsx)(ui.Q,{severity:"info",singleRow:!0,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Some configurations are excluded based on your permissions."})}),(0,p.jsx)(xs,{analyticsChart:R,rerenderTime:T,index:s})]})})}));var Ms=n(93118),ks=n(23176),Is=n(31976),As=n(57064),Rs=n(49900),Ts=n(44649),Ps=n(92373);const Ls=e=>{var t,n;return!(null===(t=e[0])||void 0===t||!t.isValid()||null===(n=e[1])||void 0===n||!n.isValid())},Ns=(0,a.memo)((e=>{let{duration:t,dateRange:n,onDateRangeChange:o,onDurationChange:r,durationOptions:l=[{value:"custom",label:"Custom"}],maxRangeDays:s}=e;const[d,c]=n,[u,h]=(0,a.useState)(null),m=Boolean(u),[g,x]=(0,a.useState)(!1),f=(0,a.useRef)(null),b=(0,a.useMemo)((()=>[vr()(d),vr()(c-1)]),[d,c]),[y,j]=(0,a.useState)(b);(0,a.useEffect)((()=>{j(b)}),[b]);const Z=(0,a.useCallback)((e=>{h(e.currentTarget),x(!1)}),[]),w=(0,a.useCallback)((()=>{h(null),x(!1),j(b)}),[b]),E=(0,a.useCallback)((e=>{if("custom"===e)return j(b),x(!0),void r("custom");r(e),h(null),x(!1)}),[r,b]),S=(0,a.useCallback)((e=>{j(e),Ls(e)&&o&&o(e)}),[o]),D=(0,a.useCallback)((e=>{var t;const n=e.relatedTarget;n&&null!==(t=f.current)&&void 0!==t&&t.contains(n)||j((e=>Ls(e)?e:b))}),[b]),k=(0,a.useMemo)((()=>s&&y[0]?y[0].add(s,"day"):void 0),[s,y]),I=(0,a.useMemo)((()=>l.filter((e=>"custom"!==e.value))),[l]),A=(0,a.useMemo)((()=>{const e=(0,M.ax)(d),t=(0,M.ax)(c-1);return"".concat(e," - ").concat(t)}),[d,c]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.Z,{variant:"outlined",color:"primary",onClick:Z,startIcon:(0,p.jsx)(Ps.Z,{}),"aria-label":"Date range","aria-haspopup":"true",sx:{textTransform:"none",whiteSpace:"nowrap"},children:A}),(0,p.jsxs)(Is.Z,{anchorEl:u,open:m,onClose:w,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{minWidth:220,marginTop:1,borderRadius:2}},children:[I.map((e=>(0,p.jsxs)(Hi.Z,{onClick:()=>E(e.value),selected:t===e.value,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(yi.Z,{fontSize:"small"})}),(0,p.jsx)(Rs.Z,{children:(0,p.jsx)(v.Z,{variant:"body2",children:e.label})}),t===e.value&&(0,p.jsx)(Vi.Z,{fontSize:"small",color:"primary",sx:{marginLeft:1}})]},e.value))),(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(Hi.Z,{onClick:()=>E("custom"),selected:"custom"===t,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Ps.Z,{fontSize:"small"})}),(0,p.jsx)(Rs.Z,{children:(0,p.jsx)(v.Z,{variant:"body2",children:"Custom"})}),"custom"===t&&(0,p.jsx)(Vi.Z,{fontSize:"small",color:"primary",sx:{marginLeft:1}})]}),g&&(0,p.jsx)(i.Z,{ref:f,paddingX:2,paddingY:1,children:(0,p.jsx)(Ts.D,{value:y,onChange:S,maxDate:k,slots:{fieldSeparator:()=>(0,p.jsx)(v.Z,{variant:"body2",children:"to"})}
3,slotProps:{fieldRoot:{spacing:1},textField:{sx:{width:120},size:"small",onBlur:D}}})})]})]})}));Ns.displayName="AnalyticsDurationSelect";const Us=e=>{let{enableTabs:t,activeTab:n,onTabChange:o,duration:a,dateRange:r,onDurationChange:l,onDateRangeChange:s,durationOptions:d,onExportClick:c,exportPending:u,onAddChartClick:h,addChartPending:g,showAddChart:C,onRefreshClick:x,refreshPending:f,showRefresh:b}=e;const y=!t||"overview"!==n;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,paddingTop:t?1:0,paddingBottom:0,children:[t&&n&&o&&(0,p.jsxs)(Gn.Z,{onChange:o,sx:{minHeight:0},children:[(0,p.jsx)(Yn.Z,{value:"overview",sx:{width:140,minHeight:0,paddingY:1},label:(0,p.jsx)(v.Z,{variant:"button",textTransform:"none",children:"Overview"})}),(0,p.jsx)(Yn.Z,{value:"charts",sx:{width:140,minHeight:0,paddingY:1},label:(0,p.jsx)(v.Z,{variant:"button",textTransform:"none",children:"Your Charts"})})]}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(Ns,{duration:a,dateRange:r,onDurationChange:l,onDateRangeChange:s,durationOptions:d}),y&&(0,p.jsx)(Un.U,{variant:"outlined",onClick:c,submitting:u,sx:{textTransform:"none"},icon:(0,p.jsx)(Ms.Z,{}),children:"Export"}),y&&C&&(0,p.jsx)(Un.U,{onClick:h,icon:(0,p.jsx)(Wn.Z,{}),sx:{textTransform:"none"},submitting:g,children:"Add chart"}),b&&x&&(0,p.jsx)(Un.U,{icon:(0,p.jsx)(ks.Z,{}),onClick:x,submitting:f,children:"Refresh"})]})},Fs=(0,a.memo)((e=>{let{open:t,onClose:n,onSubmit:o}=e;const[r,l]=(0,a.useState)("7 d"),[s,d]=(0,a.useState)((0,M.o2)("7 d")),[c,u]=(0,a.useState)(void 0),h=(0,a.useCallback)((e=>{u(void 0),l(e);const t=(0,M.o2)(e);d(t)}),[l,d]),g=(0,a.useMemo)((()=>[{value:"1 d",label:"Today"},{value:"7 d",label:"Last 7 days"},{value:"30 d",label:"Last 30 days"},{value:"custom",label:"Custom"}]),[]);return(0,p.jsxs)(kn.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"xs",children:[(0,p.jsx)(In.Z,{children:"Download Analytics Data"}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{height:110,spacing:1.25,children:[(0,p.jsx)(m.Z,{direction:"row",paddingTop:1,children:(0,p.jsx)(Ns,{duration:r,dateRange:s,onDurationChange:h,onDateRangeChange:e=>{l("custom");const t=e[0].startOf("day").valueOf(),n=e[1].add(1,"day").startOf("day").valueOf();if(t>n)return;u(n-t>31536e7?"Date range cannot exceed 10 years":void 0),d([t,n])},durationOptions:g,maxRangeDays:3650})}),c&&(0,p.jsx)(ui.Q,{children:c})]})}),(0,p.jsxs)(Pn.Z,{sx:{paddingY:2.5,paddingX:3},children:[(0,p.jsx)(C.Z,{onClick:n,children:"Cancel"}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(Un.U,{variant:"contained",color:"primary",onClick:()=>o(s[0],s[1]),disabled:void 0!==c,children:"Next"})]})]})}));var Os=n(37638),_s=n(2192);const zs=(0,a.memo)((e=>{let{open:t,onClose:n,onSubmit:o,submitting:r=!1}=e;const l=Os.lX.currentUser,s=(null===l||void 0===l?void 0:l.email)||"",[d,c]=(0,a.useState)(!1),u=(0,a.useCallback)((()=>{o(s,d)}),[s,d,o]),h=(0,a.useCallback)((()=>{n()}),[n]);return(0,p.jsxs)(kn.Z,{open:t,onClose:h,fullWidth:!0,maxWidth:"sm",children:[(0,p.jsx)(In.Z,{children:"Download Analytics Data"}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2.5,children:[(0,p.jsx)(Tn.Z,{children:"Your analytics data will be prepared and sent to your email. For organizations with many devices, delivery may take several minutes."}),(0,p.jsx)(i.Z,{sx:{backgroundColor:"action.hover",borderRadius:1,padding:2},children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(_s.Z,{sx:{color:"text.secondary",fontSize:20}}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["An email will be sent to ",s," when the CSV file is ready to download."]})]})}),(0,p.jsx)(po.Z,{control:(0,p.jsx)(Pi.Z,{checked:d,onChange:(e,t)=>
3c(t)}),label:"Include system apps"})]})}),(0,p.jsxs)(Pn.Z,{sx:{paddingY:2.5,paddingX:3},children:[(0,p.jsx)(C.Z,{onClick:h,disabled:r,children:"Cancel"}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(Un.U,{variant:"contained",color:"primary",onClick:u,disabled:!s.trim(),submitting:r,children:"Send Email"})]})]})})),Bs=()=>{const e=(0,u.I0)(),{privileges:t}=(0,w.P)(),n=Je(),{refreshAnalyticsCharts:i,fetchAnalyticsChartPending:r,createAnalyticsChart:l,createAnalyticsChartPending:s,deleteAnalyticsChart:c,downloadAnalyticsCsv:h,downloadAnalyticsCsvPending:g}=Ve(),C=(0,_n.S)({xs:1,sm:2,lg:3}),[x,f]=(0,a.useState)("overview"),[b,j]=(0,a.useState)(!1),[Z,D]=(0,a.useState)(!1),[k,I]=(0,a.useState)([0,0]),{organization:A}=(0,d.mP)(),R=(0,u.v9)((e=>e.ui.analytics.duration)),T=(0,u.v9)((e=>e.ui.analytics.dateRange)),P=(0,a.useMemo)((()=>(0,M.HF)(R,T)),[R,T]),{documents:L}=(0,E.D)(S.F.AnalyticsCharts,{sort:(0,a.useCallback)(((e,t)=>{var n,i;return(null!==(n=e.createdAt)&&void 0!==n?n:0)-(null!==(i=t.createdAt)&&void 0!==i?i:0)}),[])}),N=(0,a.useCallback)(((e,t)=>f(t)),[]),U=async()=>{await l()},F=(0,a.useCallback)((async e=>{await c(e.id)}),[c]),O=Bn({title:"Delete Chart",onConfirm:F,getMessage:e=>"Are you sure you want to delete ".concat(e.title,"?")}),_=(0,a.useCallback)((()=>{j(!0)}),[]),z=(0,a.useCallback)((()=>{j(!1)}),[]),B=(0,a.useCallback)(((e,t)=>{I([e,t]),j(!1),D(!0)}),[]),W=(0,a.useCallback)((()=>{D(!1)}),[]),V=(0,a.useCallback)((async(e,t)=>{const[n,i]=k,o={startTime:n,endTime:i,email:e,includeSystemApps:t};await h(o),D(!1)}),[h,k]),G=(0,a.useCallback)((t=>{e(Te.dV.actions.analyticsDurationChanged({duration:t}))}),[e]),H=(0,a.useMemo)((()=>[{value:"1 d",label:"Today"},{value:"7 d",label:"Last 7 days"},{value:"30 d",label:"Last 30 days"},{value:"91 d",label:"Last 90 days"},{value:"custom",label:"Custom"}]),[]),q=(0,zn.c)(r,500)||r,Y={enableTabs:n,duration:R,dateRange:P,onDurationChange:G,onDateRangeChange:t=>{var n,i;const o=[null===(n=t[0])||void 0===n?void 0:n.startOf("day").valueOf(),null===(i=t[1])||void 0===i?void 0:i.add(1,"day").startOf("day").valueOf()];(0,M.SZ)(o)&&e(Te.dV.actions.analyticsDateRangeChanged({dateRange:o}))},durationOptions:H,onExportClick:_,exportPending:g,onAddChartClick:n?async()=>{await l(),f("charts")}:U,addChartPending:s,showAddChart:!!t.devices,onRefreshClick:()=>{i()},refreshPending:q,showRefresh:!n},K=(0,p.jsxs)(p.Fragment,{children:[(0,o.isEmpty)(L)&&(0,p.jsxs)(m.Z,{alignItems:"center",spacing:2,paddingTop:4,children:[(0,p.jsx)(v.Z,{color:"text.secondary",children:"Get started by adding a chart"}),t.devices&&(0,p.jsx)(Un.U,{onClick:U,icon:(0,p.jsx)(Wn.Z,{}),submitting:s,children:"Add chart"})]}),(0,p.jsx)(m.Z,{direction:"row",spacing:1,width:1,children:(0,o.map)((0,o.range)(C),(e=>(0,p.jsx)(m.Z,{spacing:1,width:1,children:(0,o.map)(L,((t,n)=>n%C===e?(0,p.jsx)(Ds,{analyticsChart:t,onDeleteClick:O.trigger,index:n},t.id):null))},e)))})]});return(0,p.jsxs)(Mn.C,{toolbarBreadcrumbs:[{title:"Monitor",navCategory:!0},{title:"Analytics"}],children:[(0,p.jsxs)(m.Z,{paddingX:7,paddingY:2.5,spacing:2,children:[0===A.numActiveDevices&&(0,p.jsx)(On.e,{backgroundSx:{background:"url(".concat(Vn,")"),backgroundColor:y.DG.white,backgroundPosition:"max(480px, 100%) center",backgroundSize:"auto 206px",backgroundRepeat:"no-repeat",aspectRatio:5,marginY:3},ctaMessage:"Add a device to track analytics",title:"Monitor usage with analytics",subtitle:"Create your own graphs to gain insights on device and content usage",dialog:(0,p.jsx)(qo,{analyticsLocation:"Onboarding - Analytics",open:!1,onClose:()=>{}})}),n?(0,p.jsxs)(Sn.ZP,{value:x,children:[(0,p.jsx)(Us,{...Y,activeTab:x,onTabChange:N}),(0,p.jsx)(Dn.Z,{value:"overview",sx:{paddingX:0,paddingTop:1},children:(0,p.jsx)(Nl,{})}),(0,p.jsx)(Dn.Z,{value:"charts",sx:{paddingX:0,paddingTop:1},children:K})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Us,{...Y}),K]}),t.devices&&(0,p.jsx)(Fn,{...O.props})]}),(0,p.jsx)(Fs,{open:b,onClose:z,onSubmit:B}),(0,p.jsx)(zs,{open:Z,onClose:W,onSubmit:V,submitting:g})]})},Ws=()=>{const e=Je();let t=(0,p.jsx)(Bs,{});return e&&(t=(0,p.jsx)(Zn,{children:t})),(0,p.jsx)(Ge,{children:t})};var Vs=n(48620);let Gs;
3!function(e){e.MenuBackground="menuBackground",e.MenuText="menuText",e.ButtonPrimary="buttonPrimary",e.ButtonPrimaryText="buttonPrimaryText",e.ButtonSecondary="buttonSecondary",e.ButtonSecondaryText="buttonSecondaryText",e.Input="input",e.InputText="inputText",e.Alert="alert",e.Success="success"}(Gs||(Gs={}));const Hs={menuBackground:"Menu Background",menuText:"Menu Text",buttonPrimary:"Button Primary",buttonPrimaryText:"Button Primary Text",buttonSecondary:"Button Secondary",buttonSecondaryText:"Button Secondary Text",input:"Input",inputText:"Input Text",alert:"Alert",success:"Success"},qs=e=>{var t,n;const i=null===e||void 0===e||null===(t=e.customLauncherSettings)||void 0===t?void 0:t.colorThemeRef,a=null===e||void 0===e||null===(n=e.customLauncherSettings)||void 0===n?void 0:n.customColors,{documents:r}=(0,E.jV)(S.F.HomeScreenColorThemes),l=Be.vc.configuration.defaultColorTheme;if(a)return{id:"custom",colors:a,name:"Custom"};var s;return null!==(s=(0,o.find)(r,{id:null===i||void 0===i?void 0:i.id}))&&void 0!==s?s:l};var Ys=n(34353);const Ks=()=>(0,u.v9)((e=>e.configuration.editingConfigurationId)),Xs=e=>(0,u.v9)((t=>{var n;const i=t.configuration.editingConfigurationId;if(!i)return;const o=null!==(n=t.configuration.editingConfiguration)&&void 0!==n?n:t.firestore.data[S.F.Configurations].data[i];return o?e(o):void 0})),Qs=()=>{const e=Xs((e=>e.wifiNetworkRefs)),{documents:t}=(0,E.D)(S.F.WifiNetworks);return(0,a.useMemo)((()=>(0,o.chain)(e).map((e=>{var n,i;return null!==(n=null===(i=(0,o.find)(t,{id:e.id}))||void 0===i?void 0:i.ssid)&&void 0!==n?n:e.id})).countBy(o.identity).pickBy((e=>e>
31)).keys().value()),[e,t])},Js=e=>(t,n)=>{const i=n(),{configuration:{editingConfiguration:a,editingConfigurationId:r},auth:{privileges:l}}=i;if(!r||null===l||void 0===l||!l.privileges.configurations)return;if(!a){const e=i.firestore.data[S.F.Configurations].data[r];if(!e)return;t(Ys.U.actions.changesStarted({sourceConfiguration:e}))}t(e);const s=n().configuration.editingConfiguration,d=i.firestore.data[S.F.Configurations].data[r];(0,o.isEqual)(s,d)&&t(Ys.U.actions.changesCleared())};var $s=n(81202);const ed=e=>{const{queryCounts:t,updateQueryCount:n}=(0,$s.g)();if((0,a.useEffect)((()=>{e&&!(0,o.isEmpty)(e.query)&&n(e)}),[n,e]),e)return t[e.id]};var td=n(49631),nd=n(13669);const id=()=>{const{configurationsFullAccess:e,approvedConfigurationIds:t}=(0,w.P)();return(0,a.useMemo)((()=>{if(e)return;const n=null!==t&&void 0!==t?t:[],i=n.map((e=>(0,Os.qb)(S.F.Configurations,e)));return{configurationIds:n,configRefs:i}}),[e,t])},od=e=>{const t=(e=>{const{organizationId:t}=(0,w.P)(),n=id();return(0,a.useMemo)((()=>{if(n&&!(0,o.includes)(n.configurationIds,e))return;const i=S.F.DeviceWebConsoleSettings,a=(0,Os.N$)(i),r=(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,t)),l=(0,td.ar)("deviceGroupRef","==",(0,Os.qb)(S.F.Configurations,e)),s=(0,td.ar)("isQfbDevice","==",!0);return{id:(0,nd.tc)({collection:i,organizationId:t,configurationId:e,filter:"isQfbDevice"}),query:(0,td.IO)(a,r,l,s)}}),[e,n,t])})(e),n=ed(t);return!!t&&(void 0!==n?n>0:void 0)},ad=(0,a.createContext)(void 0),rd=e=>{let{children:t}=e;const{configurationId:n}=(0,l.UO)(),i=(0,xo.ky)(S.F.Configurations,n),r=Xs((e=>e.approvedApps)),s=(0,E.Ev)(S.F.Apps,(0,a.useMemo)((()=>(0,o.map)(r,"id")),[r]),{sort:ze.gA}),d=Xs((e=>e.approvedVideos)),c=(0,E.Ev)(S.F.Videos,(0,a.useMemo)((()=>(0,o.map)(d,"id")),[d]),{sort:ze.gA}),u=(0,a.useMemo)((()=>{var e;const t=null!==(e=null===i||void 0===i?void 0:i.approvedApps)&&void 0!==e?e:[];return(0,o.intersectionBy)(s,t,"id")}),[null===i||void 0===i?void 0:i.approvedApps,s]),h=(0,a.useMemo)((()=>(0,o.differenceBy)(s,u,"id")),[s,u]),m=(0,Vs.LL)(u)+(0,Vs.LL)(h,null===i||void 0===i?void 0:i.deviceCount),g=m>0,v=(0,o.some)(h,(e=>(0,Vs.Gn)(null===i||void 0===i?void 0:i.deviceCount,e))),C=!!Xs((e=>{var t;const n=null===(t=e.customLauncherSettings)||void 0===t?void 0:t.customColors;return!n||(0,o.every)((0,o.keys)(n),(e=>{const t=(0,o.get)(n,e);return!!t&&(e===Gs.MenuBackground?(0,ul.gP)(t):(0,ul.Uq)(t))}))})),[x]=[/^\d{4,8}$/,"The PIN must be between 4 and 8 digits"],f=!!Xs((e=>{var t,n;const i=null!==(t=null===(n=e.customLauncherSettings)||void 0===n?void 0:n.adminPin)&&void 0!==t?t:Be.vc.configuration.defaultLauncherAdminPin;return x.test(i)})),b=od(n);return(0,p.jsx)(ad.Provider,{value:{approvedApps:s,approvedVideos:c,appDeviceLimitExceeded:g,numAppsExceedingDeviceLimit:m,stagedApprovedAppExceedsDeviceLimit:v,customColorsValid:C,hasQfbDevices:b,pinValid:f},children:t})},ld=()=>{const e=(0,a.useContext)(ad);if((0,o.isUndefined)(e))throw new Error("useEditingConfigurationContext() must be used in a EditingConfigurationProvider");return e},sd=e=>{let{routeTabs:t,hiddenRoutes:n=[]}=e;const i=[...t,...n];return(0,p.jsxs)(l.rs,{children:[(0,o.map)(i,(e=>{let{path:t,component:n}=e;return(0,p.jsx)(l.AW,{exact:!0,path:t,children:n},t)})),i[0]&&(0,p.jsx)(l.AW,{children:(0,p.jsx)(l.l_,{to:i[0].path})})]})},dd=e=>{let{hasChanges:t,path:n}=e;const i=(0,l.TH)(),o=null!==n&&void 0!==n?n:i.pathname;return(0,p.jsx)(l.NL,{when:t,message:e=>!!e.pathname.startsWith(o)||"You have unsaved changes. Are you sure you want to leave?"})};var cd=n(14036),ud=n(36790);const pd=e=>{(0,a.useLayoutEffect)((()=>{let t;const n=()=>{e(),i()},i=()=>{t=requestAnimationFrame(n)};return i(),()=>{cancelAnimationFrame(t)}}),[e])},hd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{side:t="left",elementWidth:n=0}=e,[i,o]=(0,a.useState)(0),r=(0,a.useRef)();return pd((0,a.useCallback)((()=>{const e=r.current;e&&o(e.offsetLeft+("right"===t?e.offsetWidth-n:0)-window.scrollX)}),[n,t])),{fixedLeft:i,containerRef:r}},md=(0,a.createContext)(null),gd=2,vd=e=>{var t;let{sidebarContent:n,fixedSidebarContent:r,fixedSidebarContentHeight:l=0,sidebarSide:s="left",sidebarWidths:d={xs:300,lg:400},noSidebarGutter:c=!1,noSidebarPadding:u=!1,noContentPadding:h=!1,noBottomPadding:g=!1,noContentMaxWidth:v=!1,contentMaxWidth:C=1200,minContentWidth:x,layoutBackgroun
3dColor:f,sidebarBackgroundColor:b,contentBackgroundColor:y,noSidebarBackground:j=!1,noContentBackground:Z=!1,onContentPaperClick:w=(()=>{}),children:E}=e;const{deviceStreamToolbarVerticalOffset:S,contentAreaHeight:D}=(0,ud.MS)(),M=(0,_n.S)(d),k=(e,t,n)=>e?"unset":null!==t&&void 0!==t?t:n,I=(0,a.useRef)(null),[A,R]=(0,a.useState)(null),T=(0,a.useCallback)((e=>{I.current=e,R(e)}),[]),P=(e=>{const[t,n]=(0,a.useState)();return pd((0,a.useCallback)((()=>{const t=e.current;t&&n(t.getBoundingClientRect())}),[e])),t})(I),L=(e=>{const[t,n]=(0,a.useState)(!1);return(0,a.useLayoutEffect)((()=>{const t=e.current;if(!t)return;const i=()=>{n(t.scrollHeight>t.clientHeight)};i();const o=new ResizeObserver(i);o.observe(t);const a=new MutationObserver(i);return a.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),()=>{o.disconnect(),a.disconnect()}}),[e]),t})(I),N=(null!==(t=null===P||void 0===P?void 0:P.y)&&void 0!==t?t:ud.iU)+S,{fixedLeft:U,containerRef:F}=hd({side:s,elementWidth:M}),{elementRef:O,containerRef:_,offsetX:z}=(()=>{const[e,t]=(0,a.useState)(0),[n,i]=(0,a.useState)(),{ref:r}=(0,Yi.y)((0,a.useCallback)((e=>i(e.contentRect.width)),[])),[l,s]=(0,a.useState)(),{ref:d}=(0,Yi.y)((0,a.useCallback)((e=>s(e.contentRect.width)),[])),c=(0,a.useCallback)((()=>{if(!l||!n||!r.current||!d.current)return;const e=r.current.getBoundingClientRect();if(e.width===l)return void t(0);const i=d.current.getBoundingClientRect(),a=i.x,s=a+i.width,c=getComputedStyle(d.current),u=parseInt(c.paddingLeft,10),p=parseInt(c.paddingRight,10),h=a+u,m=s-p;t((t=>{const n=e.x-t,i=n+e.width,a=n,r=window.innerWidth-i,l=Math.round((r-a)/2),s=n-h,d=m-i;return(0,o.clamp)(l,-s,d)}))}),[d,l,r,n]);return(0,a.useLayoutEffect)(c,[c]),{elementRef:r,containerRef:d,offsetX:e}})();return(0,p.jsxs)(m.Z,{direction:"left"===s?"row":"row-reverse",alignItems:"flex-start",ref:F,sx:{backgroundColor:f},children:[(0,p.jsxs)(Me.Z,{ref:T,sx:{overflowY:"auto",overscrollBehavior:"contain",flexShrink:0,height:"calc(100vh - ".concat(N,"px)"),width:M,position:"fixed",left:U,paddingTop:"".concat(l,"px"),paddingBottom:"".concat(ud.mO,"px"),marginTop:"-".concat(ud.mO,"px"),backgroundColor:k(j,b,f)},children:[(0,p.jsx)(i.Z,{bgcolor:null!==f&&void 0!==f?f:"background.default",height:ud.mO,sx:r?{position:"fixed",width:M,zIndex:2,marginTop:"-".concat(l,"px")}:{}}),r&&(0,p.jsx)(Me.Z,{sx:{position:"fixed",zIndex:2,width:L?"calc(".concat(M,"px - var(--scrollbarWidth))"):M,paddingX:2,paddingTop:2,marginTop:"-".concat(l-ud.mO,"px")},children:r}),(0,p.jsx)(i.Z,{sx:{position:"relative",minHeight:"calc(100% - ".concat(ud.mO,"px)"),padding:u?0:gd,paddingBottom:ud.A8},children:(0,p.jsx)(md.Provider,{value:A,children:n})})]}),(0,p.jsx)(Me.Z,{ref:_,sx:{["margin".concat((0,cd.Z)(s))]:"".concat(M+(c?0:ud.mO),"px"),paddingTop:h?0:3,paddingBottom:(g?0:ud.A8)+(h?0:3),paddingX:h?0:4,minHeight:"calc(".concat(D,")"),flexGrow:1,overflowY:"hidden",backgroundColor:k(Z,y,f)},onClick:e=>{e.target===_.current&&w()},children:(0,p.jsx)(i.Z,{ref:O,maxWidth:v?void 0:C,minWidth:x,sx:{marginLeft:"".concat(z,"px")},children:E})})]})};var Cd=n(41946);const xd=(e,t,n)=>{const i=(0,l.k6)(),{organizationId:r}=(0,w.P)(),s=(0,ye.L)(),d=(0,z.l)(e,t),c=(0,xo.JG)(e,t),u=(0,o.get)(d,["organizationRef","id"]);(0,a.useEffect)((()=>{r===s&&(null!==c&&void 0!==c&&c.unauthorized||null!==c&&void 0!==c&&c.loaded&&!d||u&&u!==r)&&i.replace(n)}),[d,u,i,null===c||void 0===c?void 0:c.loaded,null===c||void 0===c?void 0:c.subscribed,null===c||void 0===c?void 0:c.unauthorized,r,n,s])};var fd=n(21993);const bd=(0,a.memo)((e=>{let{hasChanges:t,saveDisabled:n,savePending:i,onSaveClick:o,onUndoAllClick:a,sidebar:r=!1,reverse:l=!1,undoText:s="Undo all",forceEnableUndoButton:d=!1,undoColor:c="inherit"}=e;return(0,p.jsxs)(m.Z,{direction:l?"row-reverse":"row",spacing:.5,justifyContent:l?"flex-start":"flex-end",padding:r?1:0,paddingTop:0,children:[(0,p.jsx)(C.Z,{size:"small",variant:t?"contained":"text",color:"primary",onClick:()=>o(),disabled:!t||n||i,startIcon:i?(0,p.jsx)(Zi.Z,{color:"inherit",size:"1rem"}):t?(0,p.jsx)(fd.Z,{fontSize:"inherit"}):null,"data-testid":"editDocument_save",children:i?"Saving changes":"Save changes"}),(0,p.jsx)(C.Z,{size:"small",color:c,onClick:()=>a(),disabled:!d&&(!t||i),"data-testid":"editDocument_undo",children:s})]})}));bd.displayName="UIEditDocumentButtons";var yd=n(79931);const jd=(0,a.memo)((e=>{let{onOpen:t,onClose:n,menuItems:o,placement:r="right",width:l=250,paperSx:s}=e;const[d,c]=(0,a.useState)(null),u=Boolean(d),h=()=>{null===n||void 0===n||n(),c(null)};return(0,p.jsxs)(i.Z,{onClick:e=>e.stopPropagation(),children:[(0,p.jsx)(ee.Z,{title:"More options",placement:r,children:(0,p.jsx)(x.Z,{size:"small",onClick:e=>{null===t||void 0===t||t(e),e.preventDefault(),e.stopPropagation(),c(e.currentTarget)},children:(0,p.jsx)(yd.Z,{})})}),(0,p.jsx)(Is.Z,{id:"more-menu",anchorEl:d,open:u,onClose:h,onClick:h,disableScrollLock:!0,MenuListProps:{sx:{width:l}},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{sx:{borderRadius:"8px",...s}},sx:{"& .MuiListItemText-primary":{...y.cp.subtitle2}},children:o})]})}));jd.displayName="UIMoreMenu";const Zd=e=>{let{icon:t,label:n,onClick:i,to:o,disabled:a,tooltip:r,sx:l}=e;const s=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(As.Z,{children:t}),(0,p.jsx)(Rs.Z,{children:n})]}),d={paddingX:2,paddingY:1,...l},c=()=>o?(0,p.jsx)(Hi.Z,{component:f.rU,to:o,sx:d,disabled:a,children:s}):(0,p.jsx)(Hi.Z,{onClick:i,sx:d,disabled:a,children:s});return r?(0,p.jsx)(ee.Z,{title:r,placement:"right",children:(0,p.jsx)("span",{children:c()})}):c()};Zd.displayName="UISidebarMenuItem";const wd=(0,a.memo)((e=>{let{dense:t=!0,routeTabs:n}=e;const i=(0,l.k6)(),r=(0,l.TH)(),s=(0,a.useCallback)((e=>{i.replace(e)}),[i]);return(0,p.jsx)(ii.Z,{dense:t,children:(0,o.map)(n,(e=>{let{path:t,label:n,icon:i}=e;return(0,p.jsxs)(fl.ZP,{button:!0,selected:t===r.pathname,onClick:()=>s(t),sx:{paddingY:.28},"data-testid":"sidebarNav_item",children:[(0,p.jsx)(Rs.Z,{primary:n}),i]},t)}))})}));var Ed=n(90456),Sd=n(33537),Dd=n(70242),Md=n(74512),kd=n(74130);const Id=()=>{const{documents:e}=(0,E.jV)(S.F.InstantApps),{documents:t}
3=(0,E.D)(S.F.Apps,{filter:(0,a.useCallback)((e=>!!e.instantAppRef),[])}),n=(0,Le.S5)();return(0,a.useMemo)((()=>n?{}:(0,o.chain)(t).groupBy("instantAppRef.id").mapValues(((t,n)=>({apps:t,instantApp:(0,o.find)(e,{id:n})}))).value()),[n,t,e])};var Ad=n(82773);const Rd=e=>{let{name:t,selectedDeviceModelNames:n,estimatedSizeBytes:i,maxSizeBytes:o,sx:a}=e;const r=Math.min(i/o*100,100),l=i>o;return(0,p.jsxs)(m.Z,{sx:[{flex:.9,paddingY:1.5},...Array.isArray(a)?a:a?[a]:[]],children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"end",children:[(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,minWidth:0,children:(0,p.jsxs)(m.Z,{sx:{minWidth:{xs:325,md:400}},children:[(0,p.jsx)(Ui.G,{title:t,variant:"body2",useTooltip:!0}),(0,p.jsx)(Ui.G,{title:n.length>0?n.join(", "):"No devices",variant:"caption",color:"text.secondary",useTooltip:!0})]})}),(0,p.jsx)(ee.Z,{title:"Maximum package size: ".concat((0,Ad.Z)(o),". Larger packages take longer to transfer via USB."),children:(0,p.jsxs)(v.Z,{variant:"caption",sx:{cursor:"default"},children:[(0,Ad.Z)(i)," / ",(0,Ad.Z)(o)]})})]}),(0,p.jsx)(Rn.Z,{variant:"determinate",value:r,color:l?"error":"primary",sx:{height:8,borderRadius:1,...!l&&{backgroundColor:y.DG.purple[100]}}}),l&&(0,p.jsxs)(v.Z,{variant:"caption",color:"error",children:["Package size exceeds the ",(0,Ad.Z)(o)," limit. Remove content to continue."]})]})};Rd.displayName="UsbUpdatePackageSizeBar";var Td=n(27694);const Pd=(0,a.memo)((e=>{let{privilege:t,uiPrivilegeTooltipProps:n,...i}=e;return(0,p.jsx)(zi.W,{privilege:t,...n,children:(0,p.jsx)(po.Z,{...i})})}));var Ld=n(67960);const Nd=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"0 0 287.56 191",children:[(0,p.jsxs)("defs",{children:[(0,p.jsxs)("linearGradient",{id:"Grad_Logo1",x1:"61",y1:"117",x2:"259",y2:"127",gradientUnits:"userSpaceOnUse",children:[(0,p.jsx)("stop",{style:{stopColor:"#0064e1"},offset:"0"}),(0,p.jsx)("stop",{style:{stopColor:"#0064e1"},offset:"0.4"}),(0,p.jsx)("stop",{style:{stopColor:"#0073ee"},offset:"0.83"}),(0,p.jsx)("stop",{style:{stopColor:"#0082fb"},offset:"1"})]}),(0,p.jsxs)("linearGradient",{id:"Grad_Logo2",x1:"45",y1:"139",x2:"45",y2:"66",gradientUnits:"userSpaceOnUse",children:[(0,p.jsx)("stop",{style:{stopColor:"#0082fb"},offset:"0"}),(0,p.jsx)("stop",{style:{stopColor:"#0064e0"},offset:"1"})]})]}),(0,p.jsx)("path",{id:"Logo0",style:{fill:"#0081fb"},d:"m31.06,125.96c0,10.98 2.41,19.41 5.56,24.51 4.13,6.68 10.29,9.51 16.57,9.51 8.1,0 15.51-2.01 29.79-21.76 11.44-15.83 24.92-38.05 33.99-51.98l15.36-23.6c10.67-16.39 23.02-34.61 37.18-46.96 11.56-10.08 24.03-15.68 36.58-15.68 21.07,0 41.14,12.21 56.5,35.11 16.81,25.08 24.97,56.67 24.97,89.27 0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75l0-31.02c17.63,0 22.03-16.2 22.03-34.74 0-26.42-6.16-55.74-19.73-76.69-9.63-14.86-22.11-23.94-35.84-23.94-14.85,0-26.8,11.2-40.23,31.17-7.14,10.61-14.47,23.54-22.7,38.13l-9.06,16.05c-18.2,32.27-22.81,39.62-31.91,51.75-15.95,21.24-29.57,29.29-47.5,29.29-21.27,0-34.72-9.21-43.05-23.09-6.8-11.31-10.14-26.15-10.14-43.06z"}),(0,p.jsx)("path",{id:"Logo1",style:{fill:"url(#Grad_Logo1)"},d:"m24.49,37.3c14.24-21.95 34.79-37.3 58.36-37.3 13.65,0 27.22,4.04 41.39,15.61 15.5,12.65 32.02,33.48 52.63,67.81l7.39,12.32c17.84,29.72 27.99,45.01 33.93,52.22 7.64,9.26 12.99,12.02 19.94,12.02 17.63,0 22.03-16.2 22.03-34.74l27.4-.86c0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75-12.8,0-24.14-2.78-36.68-14.61-9.64-9.08-20.91-25.21-29.58-39.71l-25.79-43.08c-12.94-21.62-24.81-37.74-31.68-45.04-7.39-7.85-16.89-17.33-32.05-17.33-12.27,0-22.69,8.61-31.41,21.78z"}),(0,p.jsx)("path",{id:"Logo2",style:{fill:"url(#Grad_Logo2)"},d:"m82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78-12.33,18.61-19.88,46.33-19.88,72.95 0,10.98 2.41,19.41 5.56,24.51l-26.48,17.44c-6.8-11.31-10.14-26.15-10.14-43.06 0-30.75 8.44-62.8 24.49-87.55 14.24-21.95 34.79-37.3 58.36-37.3z"})]});var Ud=n(14227);const Fd=e=>{let{app:t}=e;return(0,Vs.rU)(t)?(0,p.jsx)(ee.Z,{title:"Instant App",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(m.Z,{justifyContent:"center",children:(0,p.jsx)(Ud.Z,{sx:{color:Ld.Li,fontSize:"1.2em"}})})}):(0,Vs.HB)(t)?(0,p.jsx)(ee.Z,{title:"Meta Horizon Managed Store App",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(m.Z,{justifyContent:"center",children:(0,p.jsx)(Nd,{sx:{fontSize:"1.2em"}})})}):null};Fd.displayName="UIAppTypeIndicator";var Od=n(77041);const _d=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 24 24",children:(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 3C4.9 3 4.01 3.81 4.01 4.8L4.00708 9H20V8.4L14 3H6ZM4 19.2L4.00083 18H20V19.2C20 20.19 19.1 21 18 21H5.99C4.89 21 4 20.19 4 19.2ZM4 15.1428C4 16.0914 4.76571 16.8571 5.71427 16.8571H5.71443H6.85711H6.85727C7.80584 16.8571 8.57154 16.0914 8.57154 15.1428V11.7143C8.57154 10.7657 7.80584 10 6.85727 10H6.85711H5.71443H5.71427C4.76571 10 4 10.7657 4 11.7143V15.1428ZM6.85711 15.1428H5.71427V11.7143H6.85711V15.1428ZM14.2858 12.2857C14.2858 12.8562 13.7163 13.4266 13.1458 13.4285C13.7163 13.4304 14.2858 14.0009 14.2858 14.5714V15.7142C14.2858 16.2856 13.7144 16.8571 13.143 16.8571H11.4287H9.71442V13.4285H9.71439V10H13.1429C13.7143 10 14.2858 10.5714 14.2858 11.1428V12.2857ZM11.4287 12.6429H12.5716V11.1429H11.4287V12.6429ZM11.4288 15.6683H12.5716V13.9183H11.4288V15.6683ZM18.8597 13.4285C19.4302 13.4266 19.9997 12.8561 19.9997 12.2857V11.1428C19.9997 10.5714 19.4283 10 18.8568 10H15.4283V13.4285H15.4284V16.8571H17.1426H18.8569C19.4283 16.8571 19.9998 16.2856 19.9998 15.7142V14.5714C19.9998 14.0009 19.4302 13.4304 18.8597 13.4285ZM18.2855 12.6429H17.1426V11.1429H18.2855V12.6429ZM18.2856 15.6683H17.1427V13.9183H18.2856V15.6683Z",fill:"currentColor"})});var zd=n(29794);const Bd={androidObb:"Android OBB",androidData:"Android Data",skipStreamingPrompt:"Skip Streaming Prompt"},Wd={androidObb:[bi.Q6.OculusQuest2,bi.Q6.OculusQuest3,bi.Q6.OculusQuestPro],androidData:[bi.Q6.OculusQuest2,bi.Q6.OculusQuest3,bi.Q6.OculusQuestPro],skipStreamingPrompt:Object.values(bi.Q6)},Vd={androidObb:"11",androidData:"11",skipStreamingPrompt:"0"},Gd={androidObb:Be.IW.androidObbPermission,androidData:Be.IW.androidDataPermission,skipStreamingPrompt:Be.IW.skipStreamingPromptPermission},Hd="Learn how to grant permissions",qd="Learn how to migrate your files out of Android/data",Yd="Learn how to skip the streaming prompt",Kd={androidObb:{title:"Android OBB Permissions may be required",body:"Devices using Android 12, including Meta Quest devices on firmware v51+, must grant a one-time Android OBB permission before ManageXR can update OBBs or files in Android/obb.",severity:"warning",helpCenterAction:
3Hd,helpCenterLink:Gd.androidObb},androidData:{title:"Files in Android/data will not be deployed",body:"Meta Quest devices on firmware v63+ do not allow MDMs like ManageXR or other third parties to deploy files to Android/data. Any files you've added to subfolders of Android/data will not be deployed. Devices from all manufacturers operating on Android 13 (or later) are subject to this restriction.",severity:"error",helpCenterAction:qd,helpCenterLink:Gd.androidData},skipStreamingPrompt:{title:"Prompt will always be required when screen streaming",body:"Devices without proper permission will still require a prompt when trying to stream the device screen. If the proper permission is granted, the device will not require a prompt to be accepted in headset when a streaming request is made depending on configuration settings.",severity:"info",helpCenterAction:Yd,helpCenterLink:Gd.skipStreamingPrompt}},Xd={androidObb:{title:"Missing Android OBB Permissions",body:"This device may require Android Obb Permissions to sync with its configuration.",severity:"warning",helpCenterAction:Hd,helpCenterLink:Gd.androidObb},androidData:{title:"Files in Android/data will not be deployed",body:"This device cannot download files to Android/data. Meta Quest devices on firmware v63+ and devices from other manufacturers running Android 13+ do not allow MDMs like ManageXR or other third parties to deploy files to Android/data.",severity:"error",helpCenterAction:qd,helpCenterLink:Gd.androidData},skipStreamingPrompt:{title:Kd.skipStreamingPrompt.title,body:"This device requires a prompt when trying to stream the device screen. If the proper permission is granted, the device will not require a prompt to be accepted in headset when a streaming request is made depending on configuration settings.",severity:"info",helpCenterAction:Yd,helpCenterLink:Gd.skipStreamingPrompt}},Qd={title:"Upcoming end support for deploying files to Android/data",body:"Devices running Android 13 (or later) and Meta Quest devices on firmware v63+ no longer permit MDMs like ManageXR or other third parties to deploy files to Android/data. To ensure uninterrupted file deployment across all modern devices, cho
3ose an alternate file location.",severity:"info",helpCenterLink:Be.IW.androidDataPermission,helpCenterAction:qd},Jd={androidObb:"Android/obb",androidData:"Android/data"},$d=(e,t)=>!!e&&(0,o.some)(Wd[t],(t=>!!e.deviceModelCounts[t])),ec=(e,t)=>!!e&&(0,o.some)(e,(e=>"androidObb"===t&&!(0,o.isEmpty)(e.obbUrls)||tc(e.fileRefs,t))),tc=(e,t)=>{if(!e)return!1;const n=new RegExp("^/".concat(Jd[t],"(/|$)"),"i");return(0,o.some)(e,((e,t)=>!(0,o.isEmpty)(e)&&n.test(t)))},nc=(e,t)=>!!e&&(0,o.includes)(Wd[t],e),ic=(e,t)=>!!e&&(0,Vs.Wp)(e,Vd[t])>=0,oc=e=>{let{app:t,hideVersionLabel:n=!1,hideReleaseChannel:r=!1,tooltip:l=!1,typographyVariant:s="body2",showTypeIcon:d=!1,showV:c=!1,color:u="text.primary"}=e;const{versionName:h,versionLabel:g,releaseChannelName:C,versionCode:x,obbUrls:f,fileRefs:b,title:y}=t,j=(0,a.useMemo)((()=>{const e=[];C&&!r&&e.push("".concat(C,":")),(0,o.isNumber)(x)&&e.push("".concat(x)),h&&e.push("(".concat(h,")"));const t=e.join(" ");return 0===t.length?y:t}),[C,r,x,h,y]),Z=g&&(!n||l),w=!(0,o.isEmpty)(f)||tc(b,"androidObb"),E=(0,Od.l7)(b),S=!!t.instantAppRef;return(0,p.jsxs)(m.Z,{direction:"row",overflow:"hidden",gap:.5,alignItems:"center",flexWrap:l?"wrap":"nowrap",sx:l?void 0:{minWidth:0,width:1},children:[d&&S&&(0,p.jsx)(rc,{tooltipLabel:"Linked to Instant App Release Channel",Icon:Ud.Z,size:"1.5em",tooltip:l,typographyVariant:s,color:u}),(0,p.jsxs)(v.Z,{color:l?"white":u,overflow:"hidden",variant:l?"body2":s,noWrap:!l,textOverflow:"ellipsis",sx:l?void 0:{flex:"1 1 auto",minWidth:0},children:[!l&&c&&(0,p.jsx)(i.Z,{component:"span",color:"text.secondary",children:"v.\xa0"}),j]}),Z&&(0,p.jsx)(ac,{tooltip:l,typographyVariant:s,color:u,versionLabel:g}),(w||E)&&(0,p.jsxs)(m.Z,{direction:"row",spacing:l?.5:0,children:[w&&(0,p.jsx)(rc,{Icon:_d,size:"1.5em",tooltip:l,tooltipLabel:"Has OBB",typographyVariant:s,color:u}),E&&(0,p.jsx)(rc,{Icon:zd.Z,size:"1.3em",tooltip:l,tooltipLabel:(0,Od.gM)(b),typographyVariant:s,color:u})]})]})},ac=e=>{let{tooltip:t,typographyVariant:n,color:i,versionLabel:o}=e;return(0,p.jsx)(ke.Z,{size:"small",sx:{height:"unset",minWidth:24,maxWidth:"max-content",pointerEvents:"none",...t?{backgroundColor:y.DG.grey[300],color:y.DG.grey[900]}:{backgroundColor:y.DG.grey[300],color:y.DG.grey[900],fontSize:y.cp[n].fontSize,flex:"0 1 auto"},"& .MuiChip-label":{lineHeight:"1.5em",paddingX:1,...t?{whiteSpace:"normal"}:{fontSize:"0.9em",whiteSpace:"nowrap",textOverflow:"ellipsis"}}},label:o})},rc=e=>{let{Icon:t,size:n,tooltip:i,tooltipLabel:o,typographyVariant:a,color:r}=e;const l=(0,p.jsxs)(v.Z,{component:"span",position:"relative",color:i?y.DG.grey[200]:r,variant:i?"body2":a,width:n,flexShrink:0,flexGrow:0,children:["\xa0",(0,p.jsx)(t,{sx:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",fontSize:n,opacity:i?1:.85}})]});return i?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[l,(0,p.jsx)(v.Z,{variant:"caption",fontWeight:y.$4,children:o})]}):l},lc=(0,a.memo)((e=>{let{app:t,hideReleaseChannel:n=!0}=e;const{versionText:o,versionLabel:r}=(0,a.useMemo)((()=>(0,Vs.e3)(t,{hideReleaseChannel:n})),[t,n]);return(0,p.jsxs)(i.Z,{component:"span",sx:{alignItems:"center",display:"inline-flex",gap:.5,maxWidth:"100%",minWidth:0,overflow:"hidden"},children:[(0,p.jsx)(v.Z,{component:"span",noWrap:!0,variant:"body2",sx:{flex:"1 1 auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:o}),r?(0,p.jsx)(ac,{color:"text.primary",tooltip:!1,typographyVariant:"body2",versionLabel:r}):null]})}));lc.displayName="UIAppVersionSelectValue";const sc=(0,a.memo)((e=>{let{sx:t,app:n,tooltipHeader:o,disableTooltip:a=!1,...r}=e;const l=(0,p.jsx)(oc,{...r,app:n});if(a)return(0,p.jsx)(i.Z,{overflow:"hidden",component:"span",sx:t,children:l});const s=n.id&&(0,Vs.n$)(n)?"External apps will use the version installed on a device":o?(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:y.DG.grey[200],children:o}),(0,p.jsx)(oc,{...r,app:n,tooltip:!0})]}):(0,p.jsx)(oc,{...r,app:n,tooltip:!0});return(0,p.jsx)(ee.Z,{enterDelay:400,enterNextDelay:400,followCursor:!0,placement:"bottom-start",title:s,children:(0,p.jsx)(i.Z,{overflow:"hidden",component:"span",sx:t,children:l})})}));var dc=n(14608),cc=n(6058);const uc=(0,da.Cl)(),pc=e=>{let{apps:t,selectedAppIds:n,setSelectedAppIds:r,selectedDeviceModelIds:l}=e;const s=(0,E.D)(S.F.Files),d=((e,t)=>{const{documents:n}=(0,E.jV)(S.F.InstantApps);return(0,a.useMemo)((()=>{const i={};if(0===t.length)return i;for(const r of e){var a;if("instant"!==(0,Vs.oN)(r)||!r.instantAppRef)continue;const e=n.find((e=>e.id===r.instantAppRef.id));if(null===e||void 0===e||!e.deviceModelToReleaseChannelId)continue;const l=null===(a=r.releaseChannelRef)||void 0===a?void 0:a.id,s=l?(0,o.toPairs)(e.deviceModelToReleaseChannelId).filter((e=>{let[,t]=e;return t===l})).map((e=>{let[t]=e;return t})):[],d=t.filter((e=>!s.includes(e)));if(d.length>0){const e=Array.from(new Set(d.map((e=>(0,Vr.ao)(e))))),t=Array.from(new Set(s.map((e=>(0,Vr.ao)(e)))));i[r.id]="Incompatible with: ".concat(e.join(", "),". Go back to the previous step and remove these device models.\n\nCompatible with: ").concat(t.join(", "))}}return i}),[e,t,n])})(t,l),c=(0,a.useMemo)((()=>Object.fromEntries(n.map((e=>[e,!0])))),[n]),u=(0,a.useCallback)((e=>{n.includes(e)?r(n.filter((t=>t!==e))):r([...n,e])}),[n,r]),h=(0,a.useMemo)((()=>[uc.display({id:"checkbox",size:40,header:()=>{const e=t.filter((e=>!d[e.id])),i=e.length>0&&e.every((e=>c[e.id])),o=e.some((e=>c[e.id]));return(0,p.jsx)(Pi.Z,{checked:i,indeterminate:o&&!i,sx:{padding:0},onChange:()=>{if(i)r([]);else{const e=t.filter((e=>!d[e.id])).map((e=>e.id));r([...n,...e.filter((e=>!n.includes(e)))])}}})},cell:e=>{let{row:t}=e;const n=d[t.original.id],o=(0,p.jsx)(Pi.Z,{checked:!!c[t.original.id],disabled:!!n,sx:{padding:0},onChange:()=>u(t.original.id)});return n?(0,p.jsx)(ee.Z,{title:(0,p.jsx)(i.Z,{sx:{whiteSpace:"pre-line"},children:n}),children:(0,p.jsx)(i.Z,{component:"span",children:o})}):o}}),uc.accessor("title",{header:"App",cell:e=>{const t=!!d[e.row.original.id];return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{minWidth:0,opacity:t?.4:1},children:[(0,p.jsx)(Fd,{app:e.row.original}),(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:e.getValue()})]})},size:200}),uc.display({id:"version",header:"Version",cell:e=>{let{row:t}=e;return(0,p.jsx)(i.Z,{sx:{opacity:d[t.original.id]?.4:1},children:(0,p.jsx)(sc,{app:t.original,typographyVariant:"body2"})})},size:200}),uc.accessor((e=>(0,Vs.bW)(e,s.documentsById)),{header:"Size",cell:e=>{const t=e.row.original,n=e.getValue(),i=!!d[t.id];return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{minWidth:0,opacity:i?.4:1},children:[(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:void 0===n?"Size pending":n>0?(0,Ad.Z)(n):"--"}),void 0===n&&(0,p.jsx)(ee.Z,{title:"This app contains bundled files shared from another organization, so the total size of this app will be calculated during generation.",children:(0,p.jsx)(cc.Z,{sx:{fontSize:16,color:"text.secondary",flexShrink:0}})})]})},size:100}
3)]),[t,c,r,n,u,s.documentsById,d]),g=(0,sa.b7)({columns:h,data:t,initialState:{sorting:[{id:"title",desc:!1}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),C=40*g.getRowModel().rows.length;return(0,p.jsx)(dc.A,{table:g,rowHeight:40,height:C,emptyMessage:t.length>0?"No apps selected":"No valid apps on configuration",flexColumnIds:"title"})};let hc;pc.displayName="UsbUpdateAppsTable",function(e){e._360="_360",e._180="_180",e._2D="_2D"}(hc||(hc={}));const mc={_360:"360",_180:"180",_2D:"2D"};let gc;!function(e){e.NONE="NONE",e.EQUIRECTANGULAR="EQUIRECTANGULAR",e.CUBEMAP="CUBEMAP"}(gc||(gc={}));const vc={NONE:"None",EQUIRECTANGULAR:"Equirectangular",CUBEMAP:"Cubemap"};let Cc;!function(e){e.MONO="MONO",e.STEREO="STEREO"}(Cc||(Cc={}));const xc={MONO:"Mono",STEREO:"Stereo"};let fc;!function(e){e.NONE="NONE",e.TOP_BOTTOM="TOP_BOTTOM",e.LEFT_RIGHT="LEFT_RIGHT"}(fc||(fc={}));const bc={NONE:"None",TOP_BOTTOM:"Top/Bottom",LEFT_RIGHT:"Left/Right"},yc=(0,da.Cl)(),jc=e=>{let{videos:t,selectedVideoIds:n,setSelectedVideoIds:i}=e;const r=(0,a.useMemo)((()=>Object.fromEntries(n.map((e=>[e,!0])))),[n]),l=(0,a.useCallback)((e=>{n.includes(e)?i(n.filter((t=>t!==e))):i([...n,e])}),[n,i]),s=(0,a.useMemo)((()=>[yc.display({id:"checkbox",size:40,header:()=>{const e=t.length>0&&t.every((e=>r[e.id])),n=t.some((e=>r[e.id]));return(0,p.jsx)(Pi.Z,{checked:e,indeterminate:n&&!e,sx:{padding:0},onChange:()=>{i(e?[]:(0,o.map)(t,"id"))}})},cell:e=>{let{row:t}=e;return(0,p.jsx)(Pi.Z,{checked:!!r[t.original.id],sx:{padding:0},onChange:()=>l(t.original.id)})}}),yc.accessor("title",{header:"Video",cell:e=>(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:e.getValue()}),size:200}),yc.accessor("type",{header:"Type",cell:e=>(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:mc[e.getValue()]}),size:80}),yc.accessor("size",{header:"Size",cell:e=>{const t=e.getValue();return(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:t?(0,Ad.Z)(t):"--"})},size:100})]),[t,r,i,l]),d=(0,sa.b7)({columns:s,data:t,initialState:{sorting:[{id:"title",desc:!1}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),c=40*d.getRowModel().rows.length;return(0,p.jsx)(dc.A,{table:d,rowHeight:40,height:c,emptyMessage:t.length>0?"No videos selected":"No videos on configuration",flexColumnIds:"title"})};jc.displayName="UsbUpdateVideosTable";const Zc=e=>{let{configurations:t,configuration:n,onConfigurationChange:i,validConfigurationApps:o,selectedAppIds:a,setSelectedAppIds:r,selectedDeviceModelIds:l,configurationVideos:s,selectedVideoIds:d,setSelectedVideoIds:c,includeFiles:u,toggleIncludeFiles:h,configurationFilesCount:g,totalFilesSize:C}=e;return(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsxs)(m.Z,{marginBottom:1,spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Configuration & Content"}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["Select the apps, videos, and files to include in the package. This update will not remove existing content on devices."," ",(0,p.jsx)(li.Q,{href:Be.IW.offlineUpdates,children:"Learn\xa0More"})]})]}),(0,p.jsx)(Td.s,{options:t,value:n,onChange:i,label:"Configuration",getOptionLabel:e=>e.name,renderIcon:()=>(0,p.jsx)(Wl.Z,{color:"action",sx:{fontSize:"1.5rem"}}),renderLabel:e=>{var t;return(0,p.jsx)(Ui.G,{title:null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"",variant:"body2",useTooltip:!0})},testIdPrefix:"usbUpdateCreate_configurationSelect"}),o.length>0&&(0,p.jsxs)(m.Z,{spacing:1,paddingX:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Apps"}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"External and Meta App Store apps are not available for USB updates"})]}),(0,p.jsx)(pc,{apps:o,selectedAppIds:a,setSelectedAppIds:r,selectedDeviceModelIds:l})]}),s.length>0&&(0,p.jsxs)(m.Z,{spacing:1,paddingX:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Videos"}),(0,p.jsx)(jc,{videos:s,selectedVideoIds:d,setSelectedVideoIds:c})]}),g>0&&(0,p.jsxs)(m.Z,{spacing:1,paddingX:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Files"}),(0,p.jsx)(Pd,{checked:u,onChange:h,control:(0,p.jsx)(Pi.Z,{}),label:"Include All Files (".concat(g," files, ").concat((0,Ad.Z)(C),")")})]})]})};function wc(e){return e.uploadedDate?1e3*e.uploadedDate.seconds+e.uploadedDate.nanoseconds/1e6:0}function Ec(e){const t=new Map;for(const o of e){const e=t.get(o.version);(!e||(i=o,(n=e).hiddenByDefault&&!i.hiddenByDefault||(n.hiddenByDefault||!i.hiddenByDefault)&&wc(i)>wc(n)))&&t.set(o.version,o)}var n,i;return Array.from(t.values())}Zc.displayName="UsbUpdateStepContent";var Sc=n(59062);const Dc=()=>{const e=(0,d.LC)(Sc.X.HIDE_PUI_VERSION),t=(0,d.LC)(Sc.X.SHOW_FIRMWARE_VERSION),n=(0,d.LC)(Sc.X.HIDE_DPVR_VERSION),i=!(0,d.P)(Sc.X.SHOW_DPVR_FIRMWARE_VERSION_HARVARD_MEDTECH),r=!(0,d.P)(Sc.X.SHOW_DPVR_FIRMWARE_VERSION_LUMINOPIA),l=(0,a.useMemo)((()=>function(e){const{hiddenPuiVersions:t=[],hiddenDpvrVersions:n=[]}=e,i=new Map;return(0,o.concat)(n,t).forEach((e=>{const[t,n]=e.split(":");var o;t&&n&&(i.has(t)?null===(o=i.get(t))||void 0===o||o.add(n):i.set(t,new Set([n])
3))})),i}({hiddenPuiVersions:e,hiddenDpvrVersions:n})),[e,n]),s=(0,a.useMemo)((()=>function(e){const{shownFirmwareVersions:t=[]}=e,n=new Map;return t.forEach((e=>{const[t,i]=e.split(":");var o;t&&i&&(n.has(t)?null===(o=n.get(t))||void 0===o||o.add(i):n.set(t,new Set([i])))})),n}({shownFirmwareVersions:t})),[t]);return(0,a.useMemo)((()=>({isDeviceFirmwareVersionHiddenByFeatureFlags:(e,t)=>{if(i&&(e===bi.Q6.DPVRP2||e===bi.Q6.DPVRP1Pro)&&t.version.endsWith("-HARVARD"))return!0;if(r&&(e===bi.Q6.DPVRP2||e===bi.Q6.DPVRP1Pro)&&t.version.endsWith("-LUMINOPIA"))return!0;if(t.hiddenByDefault){const n=s.get(e);return null===n||void 0===n||!n.has(t.version)}const n=l.get(e);return!!n&&n.has(t.version)}})),[i,r,l,s])},Mc=e=>{let{model:t,deviceSystemVersions:n,firmwareVersionId:i,onChange:r,disabled:l}=e;const{isDeviceFirmwareVersionHiddenByFeatureFlags:s}=Dc(),d=(0,a.useMemo)((()=>Ec((0,o.filter)(n,(e=>!s(t,e)&&e.model===t))).sort(((e,t)=>(0,Vs.Wp)(t.version,e.version)))),[n,s,t]),c=(0,a.useMemo)((()=>[{value:"",label:"None"},...(0,o.map)(d,(e=>({value:e.id,label:e.version})))]),[d]),u=(0,a.useCallback)((e=>{var t;if(!e||""===e)return"None";const n=d.find((t=>t.id===e));return null!==(t=null===n||void 0===n?void 0:n.version)&&void 0!==t?t:"None"}),[d]);return(0,p.jsx)(Qi,{value:null!==i&&void 0!==i?i:"",options:c,label:"".concat((0,Vr.ao)(t)," Firmware Version"),onChange:e=>{r(""===e?void 0:e)},fullWidth:!0,disabled:l,SelectProps:{renderValue:u}})};Mc.displayName="UsbUpdateFirmwareVersion";const kc=e=>{let{firmwarePairings:t,onAddPairing:n,onRemovePairing:o,onPairingModelChange:r,onPairingFirmwareChange:l,eligibleModels:s,deviceSystemVersions:d}=e;const c=t.length>0,u=(0,a.useCallback)((e=>{o(e)}),[o]),h=(0,a.useCallback)(((e,t)=>{r(e,t.target.value)}),[r]),g=(0,a.useCallback)(((e,t)=>{l(e,t)}),[l]);return(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsxs)(m.Z,{sx:{minHeight:150},children:[(0,p.jsxs)(m.Z,{spacing:.5,marginBottom:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Firmware"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{marginBottom:1},children:"Optionally include device firmware. Only available for Pico and DPVR devices."})]}),0===s.length?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",marginTop:1,children:"No firmware-eligible devices selected in Step 1."}):(0,p.jsxs)(m.Z,{spacing:2,children:[c&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{flex:1,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Device"}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{width:200,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Firmware"}),(0,p.jsx)(i.Z,{sx:{width:32}})]}),t.map((e=>{const n=new Set(t.filter((t=>t.id!==e.id&&t.modelId)).map((e=>e.modelId))),o=s.filter((e=>!n.has(e.modelId)));return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(Ln.Z,{select:!0,size:"small",fullWidth:!0,value:e.modelId,label:"Device",onChange:t=>h(e.id,t),sx:{flex:1},children:o.map((e=>(0,p.jsx)(Hi.Z,{value:e.modelId,children:e.modelName},e.modelId)))}),(0,p.jsx)(i.Z,{sx:{width:200},children:(0,p.jsx)(Mc,{model:e.modelId,deviceSystemVersions:d,firmwareVersionId:e.firmwareVersionId||void 0,onChange:t=>g(e.id,t),disabled:!e.modelId})}),(0,p.jsx)(x.Z,{size:"small",onClick:()=>u(e.id),sx:{width:32},children:(0,p.jsx)(J.Z,{fontSize:"small"})})]},e.id)}))]}),t.length<s.length&&(0,p.jsx)(C.Z,{variant:"outlined",size:"small",onClick:n,sx:{alignSelf:"flex-start",marginTop:1},children:"+ Add Firmware"})]})]})})};kc.displayName="UsbUpdateStepFirmware";var Ic=n(84648);const Ac=e=>{let{name:t,onNameChange:n,selectedDeviceModelIds:i,onDeviceModelsChange:o,groupedModels:r}=e;const[l,s]=(0,a.useState)(!1),d=(0,a.useCallback)((e=>{n(e.target.value.slice(0,100))}),[n]),c=(0,a.useMemo)((()=>r.filter((e=>e.relatedModels.every((e=>i.includes(e)))))),[r,i]),u=(0,a.useCallback)(((e,t)=>{const n=t.flatMap((e=>e.relatedModels));o(n)}),[o]),h=(0,a.useCallback)((e=>{const t=new Set(e.relatedModels),n=i.filter((e=>!t.has(e)));o(n)}),[i,o]);return(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsxs)(m.Z,{spacing:.5,sx:{marginBottom:1},children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Package Info"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Name your package and select the target device models."})]}),(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsx)(Ln.Z,{label:"Name",required:!0,autoFocus:!0,fullWidth:!0,placeholder:"e.g. Q2 Update \u2014 Pico Fleet",value:t,onChange:d,onBlur:()=>s(!0),error:l&&!t.trim(),helperText:l&&!t.trim()?"Name is required":"".concat(t.length,"/").concat(100),inputProps:{maxLength:100},size:"small"}),(0,p.jsx)(Ic.Z,{multiple:!0,disableCloseOnSelect:!0,disableClearable:!0,size:"small",options:r,getOptionLabel:e=>e.modelName,groupBy:e=>e.manufacturer,value:c,isOptionEqualToValue:(e,t)=>
3e.modelName===t.modelName,onChange:u,renderInput:e=>(0,p.jsx)(Ln.Z,{...e,label:"Device Models",placeholder:0===c.length?"Select device models...":void 0}),renderTags:(e,t)=>e.map(((e,n)=>(0,a.createElement)(ke.Z,{...t({index:n}),key:e.modelName,label:e.modelName,size:"small",variant:"filled",onDelete:()=>h(e)}))),renderOption:(e,t,n)=>{let{selected:i}=n;return(0,a.createElement)("li",{...e,key:t.modelName},(0,p.jsx)(Pi.Z,{checked:i,sx:{padding:0,marginRight:1}}),t.modelName)}})]})]})};Ac.displayName="UsbUpdateStepInfo";const Rc=["Package Info","Config & Content","Firmware"],Tc=["Meta","Pico",bi.p6.Anker,bi.p6.DPVR,bi.p6.HTC,bi.p6.Lenovo,bi.p6.MagicLeap,bi.p6.Samsung,bi.p6.XREAL],Pc=e=>{var t;let{open:n,onClose:i,sourceConfigurationId:r,onSuccess:l}=e;const s=null!==(t=(0,d.kV)().customUsbUpdateSize)&&void 0!==t?t:5e10,{dashboardStats:c}=(0,Xn.w)(),u=(0,E.D)(S.F.Configurations),h=(0,a.useMemo)((()=>[...u.documents].sort(((e,t)=>e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:"base"})))),[u.documents]),g=(0,E.D)(S.F.Apps),f=(0,E.D)(S.F.Files),b=(0,E.D)(S.F.Videos),{documents:y}=(0,E.jV)(S.F.DeviceSystemVersions),j=Id(),[Z,w]=(0,a.useState)(0),[D,M]=(0,a.useState)(0),[k,I]=(0,a.useState)([]),A=(0,a.useRef)("");(0,a.useEffect)((()=>{n&&(A.current="",w(0),M(0),I([]),N({name:"",configurationId:r,selectedAppIds:[],selectedVideoIds:[],includeFiles:!1,selectedDeviceModelIds:[],includeAdminApp:!0,firmwareByModelId:{},estimatedSizeBytes:0}),P(r))}),[n,r,A]);const R=(0,a.useMemo)((()=>(0,o.chain)(null===c||void 0===c?void 0:c.deviceModelCounts).toPairs().map((e=>{let[t,n]=e;return{modelName:(0,Vr.ao)(t),count:n,model:t}})).groupBy("modelName").map(((e,t)=>{const n=(0,Vr.sd)(e[0].model);return{modelName:t,relatedModels:(0,o.map)(e,"model"),manufacturer:n===bi.p6.Oculus?"Meta":null!==n&&void 0!==n?n:"Other"}})).sort(((e,t)=>{const n=Tc.indexOf(e.manufacturer),i=Tc.indexOf(t.manufacturer),o=-1===n?Tc.length:n,a=-1===i?Tc.length:i;return o!==a?o-a:"Unknown"===e.modelName?1:"Unknown"===t.modelName?-1:e.modelName.localeCompare(t.modelName)})).value()),[c]),[T,P]=(0,a.useState)(r),[L,N]=(0,a.useState)({name:"",configurationId:T,selectedAppIds:[],selectedVideoIds:[],includeFiles:!1,selectedDeviceModelIds:[],includeAdminApp:!0,firmwareByModelId:{},estimatedSizeBytes:0}),U=u.documentsById[T],F=(0,a.useMemo)((()=>(0,o.chain)(j).pickBy(((e,t)=>(0,o.some)(null===U||void 0===U?void 0:U.approvedInstantApps,{id:t}))).flatMap((e=>{let{apps:t}=e;return t})).value()),[null===U||void 0===U?void 0:U.approvedInstantApps,j]),O=(0,a.useMemo)((()=>(0,o.compact)([...(0,o.map)(null===U||void 0===U?void 0:U.approvedApps,(e=>g.documentsById[e.id])),...F]).filter((e=>{const t=(0,Vs.oN)(e);return"meta_horizon_store_managed"!==t&&"external"!==t}))),[null===U||void 0===U?void 0:U.approvedApps,g.documentsById,F]),_=(0,a.useMemo)((()=>(0,o.compact)((0,o.map)(null===U||void 0===U?void 0:U.approvedVideos,(e=>b.documentsById[e.id])))),[null===U||void 0===U?void 0:U.approvedVideos,b.documentsById]),z=(0,a.useMemo)((()=>(0,o.compact)((0,o.flatten)((0,o.values)(null===U||void 0===U?void 0:U.fileRefs)).map((e=>f.documentsById[e.id])))),[null===U||void 0===U?void 0:U.fileRefs,f.documentsById]),B=(0,a.useMemo)((()=>(0,o.sumBy)(z,"size")),[z]);(e=>{let{configurationId:t,validConfigurationApps:n,configurationVideos:i,configurationHasFiles:r,selectedDeviceModelIds:l,selectedAppIds:s,appsById:d,setDto:c,prevConfigIdRef:u}=e;const p=Id();(0,a.useEffect)((()=>{if(t===u.current)return;u.current=t;const e=new Set,a=[];for(const t of n){if("instant"!==(0,Vs.oN)(t)){a.push(t.id);continue}if(e.has(t.packageName))continue;e.add(t.packageName);const i=n.filter((e=>"instant"===(0,Vs.oN)(e)&&e.packageName===t.packageName)).find((e=>{var t;if(!e.instantAppRef||!e.releaseChannelRef)return!1;const n=null===(t=p[e.instantAppRef.id])||void 0===t?void 0:t.instantApp;if(null===n||void 0===n||!n.deviceModelToReleaseChannelId)return!1;const i=(0,o.toPairs)(n.deviceModelToReleaseChannelId).filter((t=>{let[,n]=t;return n===e.releaseChannelRef.id})).map((e=>{let[t]=e;return t}));return l.every((e=>i.includes(e)))}));i&&a.push(i.id)}c((e=>({...e,configurationId:t,selectedAppIds:a,selectedVideoIds:(0,o.map)(i,"id"),includeFiles:r})))}),[t,n,i,r,l,p,c,u]),(0,a.useEffect)((()=>
3{if(0===l.length)return;const e=s.filter((e=>{var t,i;const a=null!==(t=d[e])&&void 0!==t?t:n.find((t=>t.id===e));if(!a||"instant"!==(0,Vs.oN)(a)||!a.instantAppRef||!a.releaseChannelRef)return!1;const r=null===(i=p[a.instantAppRef.id])||void 0===i?void 0:i.instantApp;if(null===r||void 0===r||!r.deviceModelToReleaseChannelId)return!1;const s=(0,o.toPairs)(r.deviceModelToReleaseChannelId).filter((e=>{let[,t]=e;return t===a.releaseChannelRef.id})).map((e=>{let[t]=e;return t}));return!l.every((e=>s.includes(e)))}));if(e.length>0){const t=new Set(e);c((e=>({...e,selectedAppIds:e.selectedAppIds.filter((e=>!t.has(e)))})))}}),[l,s,d,n,p,c])})({configurationId:T,validConfigurationApps:O,configurationVideos:_,configurationHasFiles:z.length>0,selectedDeviceModelIds:L.selectedDeviceModelIds,selectedAppIds:L.selectedAppIds,appsById:g.documentsById,setDto:N,prevConfigIdRef:A});const W=(0,a.useMemo)((()=>{let e=(0,o.sumBy)(L.selectedAppIds,(e=>{var t;const n=g.documentsById[e];return n&&null!==(t=(0,Vs.bW)(n,f.documentsById))&&void 0!==t?t:0}))+(0,o.sumBy)(L.selectedVideoIds,(e=>{var t,n;return null!==(t=null===(n=b.documentsById[e])||void 0===n?void 0:n.size)&&void 0!==t?t:0}))+4*k.filter((e=>e.modelId&&e.firmwareVersionId)).length*1024*1024*1024;return L.includeFiles&&(e+=B),e}),[L.selectedAppIds,L.selectedVideoIds,L.includeFiles,B,g.documentsById,f.documentsById,b.documentsById,k]);(0,a.useEffect)((()=>{N((e=>({...e,estimatedSizeBytes:W})))}),[W]);const V=W>s,G=(0,a.useCallback)((e=>{N((t=>({...t,selectedAppIds:e})))}),[]),H=(0,a.useCallback)((e=>{N((t=>({...t,selectedVideoIds:e})))}),[]),q=(0,a.useCallback)((()=>{N((e=>({...e,includeFiles:!e.includeFiles})))}),[]),Y=(0,a.useCallback)((e=>{N((t=>({...t,name:e})))}),[]),K=(0,a.useCallback)((e=>{N((t=>({...t,selectedDeviceModelIds:e})))}),[]),X=(0,a.useMemo)((()=>new Set(y.filter((e=>!e.hiddenByDefault)).map((e=>e.model)))),[y]),Q=(0,a.useMemo)((()=>L.selectedDeviceModelIds.filter((e=>(bi.Rd.has(e)||bi.Dr.has(e))&&X.has(e))).map((e=>({modelId:e,modelName:(0,Vr.ao)(e)})))),[L.selectedDeviceModelIds,X]);(0,a.useEffect)((()=>{I((e=>e.filter((e=>!e.modelId||L.selectedDeviceModelIds.includes(e.modelId)))))}),[L.selectedDeviceModelIds]);const $=(0,a.useCallback)((()=>{I((e=>[...e,{id:Math.random().toString(36).slice(2),modelId:"",firmwareVersionId:""}]))}),[]),ee=(0,a.useCallback)((e=>{I((t=>t.filter((t=>t.id!==e))))}),[]),te=(0,a.useCallback)(((e,t)=>{I((n=>n.map((n=>n.id===e?{...n,modelId:t,firmwareVersionId:""}:n))))}),[]),ne=(0,a.useCallback)(((e,t)=>{I((n=>n.map((n=>n.id===e?{...n,firmwareVersionId:null!==t&&void 0!==t?t:""}:n))))}),[]),oe=(0,a.useMemo)((()=>Array.from(new Set(L.selectedDeviceModelIds.map(Vr.ao)))),[L.selectedDeviceModelIds]),ae=L.name.trim().length>0&&L.selectedDeviceModelIds.length>0,re=(0,a.useCallback)((()=>{w((e=>{const t=Math.min(e+1,2);return M((e=>Math.max(e,t))),t}))}),[]),le=(0,a.useCallback)((()=>{w((e=>Math.max(e-1,0)))}),[]),se=(0,a.useCallback)((e=>{e<=D&&w(e)}),[D]),{notify:de}=(0,ie.o)(),{requestAsync:ce,pending:ue}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"usb-updates"})),[])),pe=(0,a.useCallback)((async()=>{const e={};for(const i of k)i.modelId&&i.firmwareVersionId&&(e[i.modelId]=i.firmwareVersionId);const t={...L,name:L.name.trim(),firmwareByModelId:e};try{await ce({data:t}),de({severity:"success",message:"USB update package generation started"}),null===l||void 0===l||l(),i()}catch(s){var n,o,a,r;const e=(0,Fe.tf)(s),t=(0,Fe.IZ)(s)&&null!==(n=s.response)&&void 0!==n&&null!==(o=n.data)&&void 0!==o&&o.message?s.response.data.message:void 0;de({severity:"error",message:null!==(a=null!==(r=null===e||void 0===e?void 0:e.message)&&void 0!==r?r:t)&&void 0!==a?a:"Failed to start USB update package generation"})}}),[ce,L,k,de,i,l]);return(0,p.jsxs)(kn.Z,{open:n,onClose:i,maxWidth:"md",fullWidth:!0,scroll:"paper",PaperProps:{sx:{height:700}},children:[(0,p.jsxs)(m.Z,{direction:"row",paddingX:3,paddingTop:2.5,justifyContent:"space-between",alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:2,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{variant:"h6",children:"Generate USB Upd
3ate Package"}),(0,p.jsx)(Dd.Z,{activeStep:Z,sx:{paddingBottom:1},children:Rc.map(((e,t)=>(0,p.jsx)(Md.Z,{children:(0,p.jsx)(kd.Z,{onClick:()=>se(t),disabled:t>D,children:e})},e)))})]}),(0,p.jsx)(x.Z,{onClick:i,size:"small",children:(0,p.jsx)(J.Z,{})})]}),(0,p.jsxs)(An.Z,{children:[0===Z&&(0,p.jsx)(Ac,{name:L.name,onNameChange:Y,selectedDeviceModelIds:L.selectedDeviceModelIds,onDeviceModelsChange:K,groupedModels:R}),1===Z&&(0,p.jsx)(Zc,{configurations:h,configuration:U,onConfigurationChange:(e,t)=>P(t.id),validConfigurationApps:O,selectedAppIds:L.selectedAppIds,setSelectedAppIds:G,selectedDeviceModelIds:L.selectedDeviceModelIds,configurationVideos:_,selectedVideoIds:L.selectedVideoIds,setSelectedVideoIds:H,includeFiles:L.includeFiles,toggleIncludeFiles:q,configurationFilesCount:z.length,totalFilesSize:B}),2===Z&&(0,p.jsx)(kc,{firmwarePairings:k,onAddPairing:$,onRemovePairing:ee,onPairingModelChange:te,onPairingFirmwareChange:ne,eligibleModels:Q,deviceSystemVersions:y})]}),(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(Pn.Z,{sx:{paddingX:3,paddingBottom:2,flexDirection:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"stretch",sm:"center"},gap:1},children:[(0,p.jsx)(Rd,{name:L.name,selectedDeviceModelNames:oe,estimatedSizeBytes:W,maxSizeBytes:s,sx:{visibility:Z>0?"visible":"hidden"}}),(0,p.jsx)(m.Z,{direction:"row",spacing:1,sx:{minWidth:{xs:"auto",sm:250},justifyContent:"flex-end",flexShrink:0},children:0===Z?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.Z,{onClick:i,children:"Cancel"}),(0,p.jsx)(C.Z,{variant:"contained",onClick:re,disabled:!ae,children:"Next"})]}):1===Z?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.Z,{onClick:le,children:"Back"}),(0,p.jsx)(C.Z,{variant:"contained",onClick:re,children:"Next"})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.Z,{onClick:le,children:"Back"}),(0,p.jsx)(Un.U,{variant:"contained",onClick:pe,submitting:ue,disabled:V||!ae,children:"Generate package"})]})})]})]})};let Lc,Nc;Pc.displayName="UsbUpdateCreateDialog",function(e){e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High"}(Lc||(Lc={})),function(e){e.QUEUED="QUEUED",e.PROCESSING="PROCESSING",e.ERROR="ERROR",e.COMPLETE="COMPLETE",e.ABORTED="ABORTED"}(Nc||(Nc={}));const Uc=()=>(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"How to format as FAT32"}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"Windows"}),(0,p.jsx)(v.Z,{variant:"body2",children:"Right-click the drive in File Explorer \u2192 Format \u2192 select FAT32. For drives over 32GB, use a tool like Rufus."})]}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"macOS"}),(0,p.jsx)(v.Z,{variant:"body2",children:"Open Disk Utility \u2192 select the drive \u2192 Erase \u2192 choose MS-DOS (FAT)."})]}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"Linux"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Run"," ",(0,p.jsx)(i.Z,{component:"code",sx:{fontFamily:"monospace",fontSize:"0.8rem",bgcolor:"grey.700",paddingX:.5,borderRadius:.5},children:"sudo mkfs.vfat /dev/sdX"})]})]})]}),Fc=()=>{const e=(0,a.useRef)(null),[t,n]=(0,a.useState)(null),o=(0,a.useRef)(null),r=(0,a.useRef)(null),l=(0,a.useCallback)((e=>{var t,i;const a=e.relatedTarget,l=null===(t=o.current)||void 0===t?void 0:t.contains(a),s=null===(i=r.current)||void 0===i?void 0:i.contains(a);l||s||n(null)}),[]);return(0,p.jsxs)(m.Z,{spacing:2.5,ref:e,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Your USB update package is ready!"}),(0,p.jsxs)(i.Z,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,padding:"16px 20px",bgcolor:"grey.50"},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Next Steps"}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.8},children:["1. Download the package",(0,p.jsx)("br",{}),"2. Ensure your USB-C thumbdrive is formatted as"," ",(0,p.jsx)(i.Z,{component:"span",ref:r,onMouseEnter:e=>n(e.currentTarget),onMouseLeave:l,sx:{borderBottom:"1px dashed",cursor:"help"},children:"FAT32"}),(0,p.jsx)("br",{}),"3. Unzip the package and drag the folder to the root of the thumbdrive",(0,p.jsx)("br",{}),"4. Plug the thumbdrive into your headset to update it"]}),(0,p.jsx)(Xr.Z,{open:!!t,anchorEl:t,placement:"bottom-start",container:e.current,popperOptions:{strategy:"fixed"}
3,sx:{zIndex:e=>e.zIndex.tooltip},children:(0,p.jsx)(Me.Z,{ref:o,onMouseLeave:l,elevation:8,sx:{padding:2,maxWidth:360,borderRadius:1,bgcolor:"grey.800",color:"common.white",userSelect:"text",WebkitUserSelect:"text",cursor:"text"},children:(0,p.jsx)(Uc,{})})}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",sx:{marginTop:1.5},children:["For detailed instructions, see the"," ",(0,p.jsx)(li.Q,{href:Be.IW.offlineUpdates,children:"Offline Updates guide"}),"."]})]})]})};Fc.displayName="UsbUpdateReadyContent";const Oc=()=>(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"How to format as FAT32"}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"Windows"}),(0,p.jsx)(v.Z,{variant:"body2",children:"Right-click the drive in File Explorer \u2192 Format \u2192 select FAT32. For drives over 32GB, use a tool like Rufus."})]}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"macOS"}),(0,p.jsx)(v.Z,{variant:"body2",children:"Open Disk Utility \u2192 select the drive \u2192 Erase \u2192 choose MS-DOS (FAT)."})]}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,children:"Linux"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Run"," ",(0,p.jsx)(i.Z,{component:"code",sx:{fontFamily:"monospace",fontSize:"0.8rem",bgcolor:"rgba(255,255,255,0.12)",paddingX:.5,borderRadius:.5},children:"sudo mkfs.vfat /dev/sdX"})]})]})]}),_c=e=>{let{showUsbUpdatesLink:t=!0}=e;const{buildOrganizationPath:n}=(0,w.P)();return(0,p.jsxs)(m.Z,{spacing:2.5,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:t?(0,p.jsxs)(p.Fragment,{children:["We'll email you when it's ready. You can also download it from the"," ",(0,p.jsx)(Kn.Z,{href:n((e=>e.configurations)),target:"_blank",rel:"noopener noreferrer",children:"USB Updates page"}),"."]}):"We'll email you when it's ready. You can download it from this page once it's complete."}),(0,p.jsxs)(i.Z,{sx:{border:"1px solid",borderColor:"divider",borderRadius:1.5,padding:"16px 20px",bgcolor:"grey.50"},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Next steps"}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",sx:{lineHeight:1.8},children:["1. Wait for the package generation to complete",(0,p.jsx)("br",{}),"2. Download the package from your email or the platform",(0,p.jsx)("br",{}),"3. Ensure your USB-C thumbdrive is formatted as"," ",(0,p.jsx)(ee.Z,{title:(0,p.jsx)(Oc,{}),placement:"bottom",children:(0,p.jsx)("span",{style:{borderBottom:"1px dashed",cursor:"help"},children:"FAT32"})}),(0,p.jsx)("br",{}),"4. Load the package onto the thumbdrive",(0,p.jsx)("br",{}),"5. Plug the thumbdrive into your headset to update it"]}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",sx:{marginTop:1.5},children:["For detailed instructions, see the"," ",(0,p.jsx)(li.Q,{href:Be.IW.offlineUpdates,children:"Offline Updates guide"}),"."]})]})]})};_c.displayName="UsbUpdateSuccessContent";const zc=e=>{let{open:t,onClose:n,showUsbUpdatesLink:i,job:o}=e;const r=(null===o||void 0===o?void 0:o.status)===Nc.COMPLETE,l=!(null===o||void 0===o||!o.downloadUrl),s=(0,a.useCallback)((()=>{null!==o&&void 0!==o&&o.downloadUrl&&(0,di.Sv)(o.downloadUrl,"usb-update-package-".concat(o.name,".zip"))}),[null===o||void 0===o?void 0:o.downloadUrl,null===o||void 0===o?void 0:o.name]),d=r?[(0,p.jsx)(C.Z,{variant:"outlined",onClick:n,children:"Close"},"close"),(0,p.jsx)(C.Z,{variant:"contained",onClick:s,disabled:!l,children:"Download USB package"},"download")]:[(0,p.jsx)(C.Z,{variant:"contained",onClick:n,children:"Close"},"done")];return(0,p.jsx)(Ro.Q,{title:r?"Download your USB update package":"Your USB package is on the way!",open:t,onClose:n,maxWidth:"sm",scroll:"paper",rightActions:d,children:r?(0,p.jsx)(Fc,{}):(0,p.jsx)(_c,{showUsbUpdatesLink:i})})};zc.displayName="UsbUpdateStatusDialog";const Bc="Your user role does not have permission to create new configurations",Wc="Your user role does not have permission to duplicate configurations";var Vc=n(20704);const Gc=e=>{let{warningText:t,confirmationText:n,linkHref:i,onConfirmationValidChange:o}=e;return(0,p.jsx)(m.Z,{spacing:1,children:(0,p.jsx)(ui.Q,{severity:"warning",withBackgroun
3d:!0,children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"body2",color:"text.primary",children:[t," ",i&&(0,p.jsx)(li.Q,{href:i,children:"Learn More"})]}),(0,p.jsx)(Li,{confirmationText:n,onConfirmationValidChange:o})]})})})},Hc=e=>{let{newDeviceMode:t,...n}=e;const i=t===bi.Zb.INDIVIDUAL?"Confirm Change to Individual Mode":"Confirm Change to Shared Mode",o=(0,a.useCallback)((e=>{let{onConfirmationValidChange:n}=e;const i=t===bi.Zb.INDIVIDUAL?"Switching to Individual Mode requires a Factory Reset":"Switching to a restricted kiosk experience will put devices into Shared Mode",o=t===bi.Zb.INDIVIDUAL?"I understand that applying this change will factory reset all Meta devices (enrolled via Meta Horizon) on this configuration. I will need to re-enroll them to use this configuration.":"I understand that I will not be able to switch Meta devices (enrolled via Meta Horizon) back to Individual Mode without factory resetting and re-enrolling them.",a=Be.IW.qfbDeviceModes;return(0,p.jsx)(Gc,{onConfirmationValidChange:n,warningText:i,confirmationText:o,linkHref:a})}),[t]),r="Confirm Mode Change".concat(t===bi.Zb.INDIVIDUAL?" And Factory Reset":"");return t?(0,p.jsx)(Ni.Y,{...n,title:i,maxWidth:"xs",submitText:r,renderConfirmationComponent:o}):null};Hc.displayName="ConfigurationDialogConfirmQfbModeChange";const qc=e=>{let{open:t,onClose:n,configurationId:i}=e;const r=(0,u.I0)(),s=(0,l.k6)(),{notifyThunkResult:d}=(0,ie.o)(),{organizationId:c,buildOrganizationPath:h}=(0,w.P)(),g=(0,xo.ky)(S.F.Configurations,i),[v,C]=(0,a.useState)(""),[x,f]=(0,a.useState)(!1);(0,a.useEffect)((()=>{null!==g&&void 0!==g&&g.name&&t&&(C("".concat(g.name," copy")),f(!1))}),[null===g||void 0===g?void 0:g.name,t]);const b=(0,u.v9)((e=>e.configurationList.duplicatePending)),y=async e=>{if(e&&e.preventDefault(),!v.trim())return void f(!0);const t=await r((0,Vc.d1)({organizationId:c,configurationId:i,name:v}));d({result:t,success:{message:"Configuration duplicated"},error:{message:"Error duplicating configuration"}}),"fulfilled"===t.meta.requestStatus&&(0,o.isObject)(t.payload)&&(n(),s.push(h((e=>e.configurations.configuration),{configurationId:t.payload.id})))};return(0,p.jsx)(Ro.Q,{title:"Duplicate Configuration",open:t,onClose:n,maxWidth:"xs",rightActions:[(0,p.jsx)(Un.U,{submitting:b,disabled:!v.trim()||b,onClick:y,children:"Duplicate"})],children:(0,p.jsx)("form",{onSubmit:y,noValidate:!0,autoComplete:"off",children:(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsx)(Ln.Z,{label:"Configuration Name",value:v,onChange:e=>{C(e.target.value),f(!e.target.value)},disabled:b,error:x,helperText:x?"Name is required":"",fullWidth:!0,autoFocus:!0,required:!0})})})})},Yc=()=>{const{organizationId:e}=(0,w.P)(),t=(0,u.v9)((e=>e.device.query));return(0,a.useCallback)((n=>{const{query:i={},addDeviceDialogOpen:a=!1}=n,r=(0,o.assign)({},(0,o.pick)(t,["sortKey","sortAscending"]),{refreshTime:Date.now()},i),{sortKey:l,sortAscending:s,searchValue:d,models:u,configurationIds:p,tagIds:h,filterIds:m,refreshTime:g}=r;return(0,c.LT)(c._j.organization.devices,{organizationId:e},{add:(0,o.toNumber)(a),sort:l,sortAsc:(0,o.toNumber)(s),...g?{time:g}:null,...d?{search:d}:null,...(0,o.isEmpty)(u)?null:{models:(0,o.map)(u,encodeURIComponent).join(",")},...(0,o.isEmpty)(p)?null:{configurations:(0,o.map)(p,encodeURIComponent).join(",")},...(0,o.isEmpty)(h)?null:{tags:(0,o.map)(h,encodeURIComponent).join(",")},...(0,o.isEmpty)(m)?null:{filters:(0,o.map)(m,encodeURIComponent).join(",")}})}),[t,e])};var Kc=n(66934);const Xc=f.rU,Qc=(0,Kc.ZP)(f.rU)((e=>{let{theme:t}=e;return{...t.mixins.linkStyleReset,display:"contents"}})),Jc=e=>{let{pathToQFBInfo:t}=e;return(0,p.jsxs)(v.Z,{variant:"body1",color:"text.primary",children:["This configuration is your Default Enrollment Configuration for Meta Quest devices enrolled through Meta Horizon for Work. To delete it, set a different default configuration."," ",(0,p.jsx)(Kn.Z,{component:Xc,to:t,children:"Meta Enrollment Settings"})]})},$c=(e,t)=>{var n;const i=null===(n=null===t||void 0===t?void 0:t.canCreateOrDuplicate)||void 0===n||n,{documents:o}
3=(0,E.D)(S.F.OrganizationEnrollmentConfigs),r=(e=>(0,a.useMemo)((()=>e.filter((e=>e.type===Di.QFB&&e.method===Mi.DefaultConfiguration)).map((e=>e.configurationId))),[e]))(o),l=Yc(),s=(0,a.useCallback)((e=>!r.includes(e.id)),[r]),d=(0,a.useCallback)((e=>r.includes(e.id)?(0,p.jsx)(Jc,{pathToQFBInfo:l({addDeviceDialogOpen:!0})}):i?"Delete the configuration ".concat(e.name,"?"):"Your user role does not have permission to recreate this configuration. Are you sure you want to delete ".concat(e.name,"?")),[l,i,r]),c=(0,a.useCallback)((e=>{if(!i&&!r.includes(e.id))return{confirmationText:e.name,TextFieldProps:{helperText:"Type the configuration name to confirm and delete",label:"Configuration Name"}}}),[i,r]);return Bn({getCanDelete:s,onConfirm:e,title:"Delete Configuration",getContent:d,getConfirmationInputProps:c})},eu=(0,a.memo)((()=>(0,p.jsx)(ui.Q,{severity:"warning",fullWidth:!0,withBackground:!0,iconProps:{sx:{fontSize:"14px"}},singleRow:!0,children:(0,p.jsx)(v.Z,{variant:"caption",color:"textSecondary",children:"Pending changes require mode change"})}))),tu=(0,a.memo)((e=>{let{label:t,value:n,sx:i,size:o="small",labelProps:a,valueProps:r}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,sx:i,children:[(0,p.jsx)(v.Z,{whiteSpace:"nowrap",variant:"small"===o?"caption":"body2",color:"textSecondary",...a,children:t}),(0,p.jsx)(v.Z,{whiteSpace:"nowrap",variant:"small"===o?"subtitle2":"subtitle1",component:"span",fontWeight:"medium",noWrap:!0,...r,children:n})]})})),nu=y.DG.grey[300],iu={current:{main:y.DG.purple[300],hover:y.DG.purple[400]},added:{main:y.DG.primary[100],hover:y.DG.primary[300]},exceeded:{main:y.DG.error[200],hover:y.DG.error[300]}},ou=e=>{let{deviceLimit:t,currentDeployments:n,currentTooltip:i,addedDeployments:o,addedTooltip:a}=e;const r=n+o,l=n>t,s=r>t,d=Math.max(t,r);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,paddingBottom:1,children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Device Limit"}),(0,p.jsxs)(m.Z,{direction:"row",bgcolor:nu,flexGrow:1,height:5,spacing:.125,children:[(0,p.jsx)(au,{type:"current",value:n,maxValue:d,exceeded:l,tooltip:i}),(0,p.jsx)(au,{type:"added",value:o,maxValue:d,exceeded:s,tooltip:a})]}),(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:[r," / ",t]})]})},au=e=>{let{type:t,value:n,maxValue:a,exceeded:r,tooltip:l=""}=e;if(!n)return null;const s=r?iu.exceeded:iu[t],d=(0,o.round)(n/a*100),c="".concat(d,"%"),u="added"===t?"+".concat(n):n;return(0,p.jsx)(ee.Z,{title:l,placement:"top",children:(0,p.jsx)(i.Z,{sx:{flexBasis:c,position:"relative",cursor:"pointer",backgroundColor:s.main,"& .UIDeviceLimitProgressBar-displayOnHover":{opacity:0}
3,"&:hover":{backgroundColor:s.hover,"& .UIDeviceLimitProgressBar-displayOnHover":{opacity:1}}},children:(0,p.jsx)(v.Z,{className:"current"===t?"UIDeviceLimitProgressBar-displayOnHover":void 0,variant:"caption",sx:{position:"absolute",top:0,left:0,width:1,paddingTop:.75,color:"text.secondary",textAlign:"center",whiteSpace:"nowrap"},children:u})})})};ou.displayName="UIDeviceLimitProgressBar";const ru=e=>{let{configuration:t,app:n}=e;if(!t)return null;const{id:i,deviceCount:a}=t,{deviceLimit:r,configurationDeployments:l}=n;if(void 0===a||void 0===r)return null;const s=(0,o.has)(l,i),d=s?0:a,c=(0,o.sum)((0,o.values)(l)),u=c+d,h=c>r,m=u>r,g=e=>"".concat(e," of the ").concat((0,ul.sr)(r,"device")," this app can be deployed to"),v=(0,o.size)(l),C=s?"configuration":"other configuration";let x="".concat((0,ul.sr)(v,C)," ").concat(1===v?"uses":"use"," ").concat(g(c),".");h&&(x+=" This app's device limit has been exceeded.");const f=m?"This app will exceed its device limit by ".concat((0,ul.sr)(u-r,"device"),". Remove devices from this configuration if you want to add this app to this configuration."):"This configuration will use ".concat(g(a),".");return(0,p.jsx)(ou,{deviceLimit:r,currentDeployments:c,currentTooltip:x,addedDeployments:d,addedTooltip:f})};ru.displayName="ConfigurationAppDeviceLimitProgressBar";const lu=e=>{let{configuration:t,isListItem:n=!1}=e;const i=(0,a.useRef)(null),r=(0,a.useMemo)((()=>(0,o.map)(null===t||void 0===t?void 0:t.approvedApps,"id")),[null===t||void 0===t?void 0:t.approvedApps]),l=(0,E.Ev)(S.F.Apps,r,{filter:(0,a.useCallback)((e=>(0,o.isNumber)(e.deviceLimit)),[])}),s=(0,a.useMemo)((()=>(0,o.chain)(l).map((e=>{const t=(0,o.sum)((0,o.values)(e.configurationDeployments));return e.deviceLimit-t})).filter((e=>!(0,o.isNil)(e))).min().value()),[l]),d="".concat((0,ul.sr)(l.length,"Shared App")," on this configuration"," ","\n ").concat(1===l.length?"has":"have"," a device limit set\n by the sharing organization(s)"),c=s>0?"Based on your current usage and limits, you can apply this configuration to ".concat((0,ul.sr)(s,"more device"),"."):0===s?"Based on your current usage and limits, you can't apply this configuration to any more devices right now.":"Device limit exceeded. Please reduce the number of devices using any over-deployed apps.";return(0,o.isEmpty)(l)?null:(0,p.jsx)(ee.Z,{title:(0,p.jsxs)(m.Z,{padding:1,spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:d}),(0,p.jsx)(v.Z,{variant:"body2",children:c}),(0,o.map)(l,(e=>(0,p.jsx)(su,{configuration:t,app:e},e.id)))]}),componentsProps:{tooltip:{sx:{bgcolor:"white",color:"text.primary",border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)",maxWidth:400}}},placement:"bottom-start",disableInteractive:!1,children:(0,p.jsxs)(m.Z,{ref:i,direction:"row",spacing:1,alignItems:"baseline",sx:{cursor:"pointer"},children:[(0,p.jsx)(Fl.u,{sx:{color:n&&s<0?"error.main":"text.secondary",fontSize:"1rem",transform:"translateY(4px)"}}),(0,p.jsx)(tu,{label:"Device-Limited Apps",value:l.length})]})})},su=e=>{let{configuration:t,app:n}=e;return(0,p.jsx)(m.Z,{children:(0,p.jsxs)(v.Z,{variant:"body2",children:[n.title," ",(0,p.jsxs)(i.Z,{component:"span",color:"text.secondary",children:["- ",n.releaseChannelName]}),(0,p.jsx)(ru,{configuration:t,app:n})]})})};lu.displayName="ConfigurationDeviceLimitedAppsCounter";const du=(0,a.memo)((e=>{var t;let{configurationId:n}=e;const i=Yc(),o=null!==(t=Xs((e=>e.deviceCount)))&&void 0!==t?t:0,a=o>0?i({query:{configurationIds:[n]}}):void 0;return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:a?(0,p.jsx)(Kn.Z,{component:f.rU,to:a,style:{textDecoration:"none"},children:(0,p.jsx)(tu,{label:"Devices",value:String(o),sx:{"&:hover":{backgroundColor:"action.hover"},borderRadius:1,px:.5,marginX:-.5,paddingBottom:.25,marginBottom:-.25},valueProps:{color:"primary"}})}):(0,p.jsx)(tu,{label:"Devices",value:String(o),valueProps:{color:"primary"}})})})),cu=e=>{let{open:t,onClose:n}=e;return(0,p.jsx)(kn.Z,{open:t,maxWidth:"xs",children:(0,p.jsxs)(An.Z,{children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Unexpected Device Limit Error"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"There was an error saving this configuration due to device limits being reached. Please check the device limits for the apps on this configuration and try again."})]}),(0,p.jsx)(m.Z,{width:1,justifyContent:"flex-end",children:(0,p.jsx)(C.Z,{variant:"contained",onClick:n,sx:{alignSelf:"flex-end",textTransform:"none"},children:"Okay"})})]})})};
3cu.displayName="ConfigurationDialogDeviceLimitError";const uu=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"0 0 11 11",children:[(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.51744 4.28488C3.51744 3.18952 4.40464 2.30233 5.5 2.30233C6.59536 2.30233 7.48256 3.18952 7.48256 4.28488C7.48256 5.38025 6.59536 6.26744 5.5 6.26744C4.40464 6.26744 3.51744 5.38025 3.51744 4.28488ZM6.54084 4.28488C6.54084 3.70994 6.07494 3.24404 5.5 3.24404C4.92506 3.24404 4.45916 3.70994 4.45916 4.28488C4.45916 4.85983 4.92506 5.32573 5.5 5.32573C6.07494 5.32573 6.54084 4.85983 6.54084 4.28488Z",fill:"currentColor"}),(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 5.5C11 8.53757 8.53757 11 5.5 11C2.46243 11 0 8.53757 0 5.5C0 2.46243 2.46243 0 5.5 0C8.53757 0 11 2.46243 11 5.5ZM8.5234 8.97311C7.71451 9.67786 6.65709 10.1047 5.5 10.1047C4.34291 10.1047 3.28549 9.67786 2.4766 8.97311V8.74564C2.4766 8.42843 4.02795 7.7048 5.5 7.7048C6.97205 7.7048 8.5234 8.42843 8.5234 8.74564V8.97311ZM9.26786 8.14756C8.63076 7.2265 6.60542 6.76308 5.5 6.76308C4.39458 6.76308 2.36924 7.2265 1.73214 8.14756C1.20493 7.39864 0.895349 6.48547 0.895349 5.5C0.895349 2.95692 2.95692 0.895349 5.5 0.895349C8.04308 0.895349 10.1047 2.95692 10.1047 5.5C10.1047 6.48547 9.79507 7.39864 9.26786 8.14756Z",fill:"currentColor"})]}),pu=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"0 0 15 15",children:[(0,p.jsx)("path",{d:"M7.6875 8.21121C7.6875 7.10382 8.55453 6.2069 9.625 6.2069C10.6955 6.2069 11.5625 7.10382 11.5625 8.21121C11.5625 9.31859 10.6955 10.2155 9.625 10.2155C8.55453 10.2155 7.6875 9.31859 7.6875 8.21121Z",fill:"currentColor"}),(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 9.43965C15 12.5105 12.5935 15 9.625 15C6.65647 15 4.25 12.5105 4.25 9.43965C4.25 6.36876 6.65647 3.87931 9.625 3.87931C12.5935 3.87931 15 6.36876 15 9.43965ZM5.94277 12.1163C6.56539 11.1851 8.5447 10.7166 9.625 10.7166C10.7053 10.7166 12.6846 11.1851 13.3072 12.1163C13.8225 11.3591 14.125 10.4359 14.125 9.43965C14.125 6.86867 12.1103 4.78448 9.625 4.78448C7.13972 4.78448 5.125 6.86867 5.125 9.43965C5.125 10.4359 5.42754 11.3591 5.94277 12.1163Z",fill:"currentColor"}),(0,p.jsx)("path",{d:"M9.34614 3.36879C8.5885 1.90268 7.09436 0.905172 5.375 0.905172C2.88972 0.905172 0.875 2.98936 0.875 5.56034C0.875 7.54536 2.076 9.24019 3.76731 9.90963C3.79276 10.2539 3.84592 10.5901 3.92451 10.9159C1.66059 10.2611 0 8.11131 0 5.56034C0 2.48945 2.40647 0 5.375 0C7.60495 0 9.51773 1.40479 10.3315 3.40556C10.0999 3.37685 9.86411 3.36207 9.625 3.36207C9.53152 3.36207 9.43855 3.36433 9.34614 3.36879Z",fill:"currentColor"})]}),hu=e=>{let{label:t,status:n,TooltipProps:o,verboseLabel:a,startIcon:r,variant:l="outlined",iconOnly:s=!1}=e;if(s&&r){const e=(0,p.jsx)(i.Z,{component:"span",sx:{display:"inline-flex",alignItems:"center"},children:r});return o?(0,p.jsx)(ee.Z,{...o,children:e}):e}const d="filled"===l?{backgroundColor:y.DG.grey[100],border:"1px solid ".concat(y.DG.grey[100]),color:"text.primary"}:{backgroundColor:y.DG.white,border:"1px solid ".concat(y.DG.grey[400]),color:"text.secondary"},c=(0,p.jsx)(ke.Z,{size:"small",sx:{height:"unset",borderRadius:1,"& .MuiChip-label":{lineHeight:"1.5em",paddingX:.4},...d},label:(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[r,(0,p.jsxs)(v.Z,{variant:"caption",children:[t,a&&" Mode"," ",n]})]})});return o?(0,p.jsx)(ee.Z,{...o,children:c}):c},mu=e=>{let{qfbDeviceMode:t,placement:n="configuration",iconOnly:i=!1}=e;return t?(0,p.jsx)(hu,{label:bi.to[t],verboseLabel:!0,variant:"filled",startIcon:t===bi.Zb.SHARED?(0,p.jsx)(pu,{sx:{fontSize:i?16:12}}):(0,p.jsx)(uu,{sx:{fontSize:i?16:12}}),iconOnly:i,TooltipProps:{title:(0,p.jsxs)(v.Z,{variant:"caption",children:["This ",n," uses ",bi.to[t]," Mode."," ",t===bi.Zb.SHARED?"Meta's Shared Mode is required to use a restricted kiosk device experience like Custom Home or Kiosk App":"Meta's Individual Mode is required to use the Default Device Menus"," ","on Quest devices enrolled via Meta Horizon. Visit our documentation to learn more about Meta device modes."," ",(0,p.jsx)(li.Q,{variant:"caption",href:Be.IW.qfbDeviceModes,sx:{color:"white",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"Learn More"})]}),placement:"left",disableInteractive:!1}}):null},gu=(0,a.memo)((e=>{let{qfbDeviceMode:t}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,children:[(0,p.jsx)(v.Z,{whiteSpace:"nowrap",variant:"caption",color:"textSecondary",children:"Mode"}),(0,p.jsx)(v.Z,{whiteSpace:"nowrap",variant:"subtitle2",component:"span",fontWeight:"medium",noWrap:!0,children:(0,p.jsx)(mu,{qfbDeviceMode:t})})]})})),vu=(0,a.memo)((e=>{let{registrationCode:t,hideLabel:n=!1}=e;return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:(0,p.jsx)(ae,{value:null!==t&&void 0!==t?t:"",children:n?(0,p.jsx)(v.Z,{color:"primary",variant:"subtitle2",children:t}):(0,p.jsx)(tu,{label:"Configuration Code",value:t,valueProps:{color:"primary"}})})})})),Cu=(0,a.memo)((e=>{var t;let{routeTabs:n}=e;const r=(0,u.I0)(),{notifyThunkResult:l}=(0,ie.o)(),{organizationId:s,privileges:d,buildOrganizationPath:c,configurationsFullAccess:h}=(0,w.P)(),g=d.configurations&&h,v=(0,X.h5)(),{stagedApprovedAppExceedsDeviceLimit:C,customColorsValid:x,hasQfbDevices:f,pinValid:b}=ld(),y=(0,u.v9)((e=>e.configuration.updateOpPending)),j=(0,u.v9)((e=>!!e.configuration.editingConfiguration)),Z=Ks(),E=(0,xo.ky)(S.F.Configurations,Z),D=null!==(t=Xs((e=>e.name)))&&void 0!==t?t:"",M=Xs((e=>e.deviceExperienceMode)),k=Xs((e=>e.registrationCode)),I=(0,Le.c)(),A=Qs(),R=!!D&&(0,o.isEmpty)(A)&&x&&!C&&b,[T,P]=(0,a.useState)(void 0),[L,N]=(0,a.useState)(!1),[U,F]=(0,a.useState)(!1),[O,_]=(0,a.useState)(!1),z=(0,a.useCallback)((()=>{F(!1),_(!0)}),[]);(0,a.useEffect)((()=>{(null===T||void 0===T?void 0:T.configurationId)!==Z&&P(void 0)}),[Z,null===T||void 0===T?void 0:T.configurationId]);const B=(0,a.useCallback)((async()=>
3{if(!Z)return;const e=await r((0,Ys.q)());"rejected"===e.meta.requestStatus&&e.payload===Fe.Xt.DeviceLimitExceeded?P({configurationId:Z}):l({result:e,success:{message:"Configuration saved"},error:{message:"Error saving configuration",action:{title:"Retry",onClick:B}}})}),[Z,r,l]),W=(0,$i.eH)(null===E||void 0===E?void 0:E.deviceExperienceMode),V=(0,$i.eH)(M),G=f&&W!==V,[H,q]=(0,a.useState)(!1),Y=(0,a.useCallback)((async()=>{G?q(!0):B()}),[G,B]),K=(0,a.useCallback)((async()=>{await B(),q(!1)}),[B]),Q=(0,a.useCallback)((()=>{r(Ys.U.actions.changesCleared())}),[r]),J=(0,a.useCallback)((async()=>{if(!Z)return;const e=await r((0,Vc.Xc)({organizationId:s,configurationId:Z}));l({result:e,success:{message:"Configuration deleted"},error:{message:"Error deleting configuration"}})}),[Z,r,l,s]),$=$c(J,{canCreateOrDuplicate:g}),ee=d.configurations||v;return(0,p.jsxs)(m.Z,{spacing:1,children:[ee&&(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",padding:1,paddingTop:0,children:[(0,p.jsx)(jd,{menuItems:[(0,p.jsx)(Zd,{icon:(0,p.jsx)(he.Z,{}),label:"View History",to:Z?c((e=>e.configurations.configuration.history),{configurationId:Z}):"#"},"configuration-view-history"),...d.configurations?[(0,p.jsx)(Zd,{icon:(0,p.jsx)(Ed.Z,{}),label:"Duplicate Configuration",onClick:()=>N(!0),disabled:!g,tooltip:g?void 0:Wc},"configuration-duplicate"),...I?[]:[(0,p.jsx)(Zd,{icon:(0,p.jsx)(Sd.Z,{}),label:"Create USB Update",onClick:()=>F(!0)},"configuration-usb-update")],(0,p.jsx)(Ie.Z,{sx:{marginY:1}},"divider"),(0,p.jsx)(Zd,{icon:(0,p.jsx)(Gl.Z,{}),label:"Delete Configuration",onClick:()=>{E&&$.trigger(E)}},"configuration-delete")]:[]]}),d.configurations&&(0,p.jsx)(bd,{hasChanges:j,saveDisabled:!R,savePending:y,onSaveClick:Y,onUndoAllClick:Q,sidebar:!0})]}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",padding:1,spacing:1,children:[(0,p.jsx)(Wl.Z,{color:"action"}),(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(Ul.z,{label:"Name",value:D,onChange:e=>{r(Js(Ys.U.actions.nameChanged({name:e.target.value})))},error:!D,fullWidth:!0,privilege:"configurations","data-testid":"configuration_nameInput"})})]}),(0,p.jsxs)(m.Z,{paddingRight:1,paddingLeft:2,spacing:.5,children:[Z&&(0,p.jsx)(du,{configurationId:Z}),f&&(0,p.jsx)(gu,{qfbDeviceMode:W}),G&&(0,p.jsx)(eu,{}),(0,p.jsx)(vu,{registrationCode:k}),(0,p.jsx)(lu,{configuration:E})]}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(wd,{routeTabs:n}),(0,p.jsx)(Fn,{...$.props}),Z&&(0,p.jsx)(qc,{open:L,onClose:()=>N(!1),configurationId:Z}),(0,p.jsx)(Hc,{newDeviceMode:V,open:H,onClose:()=>q(!1),onSubmit:K}),(0,p.jsx)(cu,{open:!!T,onClose:()=>P(void 0)}),Z&&(0,p.jsx)(Pc,{open:U,onClose:()=>F(!1),sourceConfigurationId:Z,onSuccess:z}),(0,p.jsx)(zc,{open:O,onClose:()=>_(!1),showUsbUpdatesLink:!0})]})})),xu=a.memo((e=>{let{value:t,onChange:n,sx:o,TextFieldProps:r,inputTestId:l="searchInput"}=e;const s=(0,a.useRef)(null);return(0,p.jsxs)(i.Z,{position:"relative",sx:o,children:[(0,p.jsx)(Ln.Z,{...r,InputProps:{...null===r||void 0===r?void 0:r.InputProps,sx:t?{paddingRight:3}:{}},inputRef:s,fullWidth:!0,value:t,onChange:e=>n(e.target.value),"data-testid":l}),!!t&&(0,p.jsx)(x.Z,{sx:{position:"absolute",top:5,right:6},onClick:()=>{var e;n(""),null===(e=s.current)||void 0===e||e.focus()},children:(0,p.jsx)(pa.Z,{})})]})})),fu=(0,a.memo)((e=>{let{label:t,value:n,size:i="small",disabled:o=!1,onToggle:a=(()=>{}),sx:r,testId:l}=e;return(0,p.jsx)(po.Z,{sx:{...r,"& .MuiFormControlLabel-label":{...y.cp.buttonSmall,whiteSpace:"nowrap"}},label:t,checked:n,onChange:a,disabled:o,control:(0,p.jsx)(ho.Z,{size:i}),"data-testid":l})}));var bu=n(96739),yu=n(50710);const ju=e=>{let{column1Title:t,column2Title:n,renderColumn1:i,renderColumn2:o}=e;const a={flexBasis:0,flexGrow:1,spacing:2};return(0,p.jsxs)(m.Z,{direction:"row",minWidth:650,children:[(0,p.jsxs)(m.Z,{...a,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"primary",textAlign:"center",children:t}),i()]}),(0,p.jsxs)(m.Z,{flexShrink:0,paddingTop:.5,paddingX:1,alignItems:"center",spacing:2,overflow:"hidden",children:[(0,p.jsx)(yu.Z,{color:"action"}),(0,p.jsx)(Ie.Z,{orientation:"vertical"})]}),(0,p.jsxs)(m.Z,{...a,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"primary",textAlign:"center",children:n}),o()]})]})};var Zu=n(58695);const wu=e=>{const t=window.scrollX,n=window.scrollY;e(),requestAnimationFrame((()=>{window.scrollTo(t,n)}))},Eu=(e,t)=>{const n=(0,a.useRef)([]);(0,a.useEffect)((()=>{const i=t.map((e=>e.id)),o=n.current;o.length>0&&((e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])))(o,i)||(n.current=i,e.current&&((e,t,n)=>
3{0!==t.length&&(n.length===t.length?n.forEach(((n,i)=>{t[i]!==n&&e(i)})):wu((()=>e())))})(e.current,o,i))}),[e,t])},Su=e=>{let{allValues:t,selectedIds:n,renderListItemContent:r,onAdd:l,onRemove:s,showListItemDivider:d=(()=>!1),privilege:c,selectedTitle:u="Selected",selectedEmptyMessage:h="None selected",otherTitle:g="Other",otherEmptyMessage:C="None",selectLabel:f="Select",maxColumnWidth:b,testIdPrefix:y="transferList",rowHeightInvalidationKey:j}=e;const Z=(0,a.useMemo)((()=>(0,o.filter)(t,(e=>(0,o.includes)(n,e.id)))),[t,n]),w=(0,a.useMemo)((()=>(0,o.without)(t,...Z)),[t,Z]),E=(0,a.useCallback)((e=>{l(e)}),[l]),S=(0,a.useCallback)((e=>{s(e)}),[s]),D=(0,a.useRef)(),M=(0,a.useRef)();Eu(D,Z),Eu(M,w),(0,a.useEffect)((()=>{wu((()=>{var e,t;null===(e=D.current)||void 0===e||e.call(D),null===(t=M.current)||void 0===t||t.call(M)}))}),[j]);const k=(0,a.useCallback)((e=>{let{key:t,index:n,style:o,registerChild:a}=e;const l=Z[n];return l?(0,p.jsx)("div",{style:o,ref:a,children:(0,p.jsxs)(fl.ZP,{divider:d(!0),"data-testid":"".concat(y,"_selectedItem"),sx:{paddingRight:0},children:[(0,p.jsx)(i.Z,{sx:{minWidth:0,flexGrow:1,display:"flex",alignItems:"center",overflow:"hidden"},children:(0,p.jsx)(i.Z,{sx:{minWidth:0,flexGrow:1,display:"flex",alignItems:"center",overflow:"hidden"},children:r(l,!0)})}),(0,p.jsx)(i.Z,{flexShrink:0,alignSelf:"flex-start",marginLeft:1,marginTop:.5,children:(0,p.jsx)(zi.W,{privilege:c,children:(0,p.jsx)(x.Z,{size:"large",color:"error",onClick:()=>S(l),sx:{color:"text.secondary","&:hover":{color:"error.main"}},children:(0,p.jsx)(bu.Z,{color:"inherit"})})})})]})},t):null}),[S,c,r,Z,d,y]),I=(0,a.useCallback)((e=>{let{key:t,index:n,style:o,registerChild:a}=e;const l=w[n];return l?(0,p.jsx)("div",{style:o,ref:a,children:(0,p.jsx)(zi.W,{privilege:c,disableAutoSize:!0,children:(0,p.jsxs)(oi.Z,{onClick:()=>E(l),sx:{position:"relative","&:hover .UITransferList-approveLabel":{visibility:"visible"}},divider:d(!1),"data-testid":"".concat(y,"_unselectedItem"),children:[r(l,!1),(0,p.jsx)(i.Z,{className:"UITransferList-approveLabel",sx:{position:"absolute",right:0,top:0,bottom:0,background:"linear-gradient(270deg, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 100%)",pointerEvents:"none",visibility:"hidden"},children:(0,p.jsx)(m.Z,{justifyContent:"center",alignItems:"center",padding:2,paddingLeft:10,height:1,sx:{background:e=>"linear-gradient(270deg, ".concat(e.palette.action.hover," 50%, rgba(0, 0, 0, 0) 100%)")},children:(0,p.jsx)(v.Z,{variant:"body2",color:"primary",children:f})})})]})})},t):null}),[E,w,c,r,f,d,y]);return(0,p.jsx)(ju,{column1Title:u,column2Title:g,renderColumn1:()=>(0,o.isEmpty)(Z)?(0,p.jsx)(v.Z,{paddingY:3,color:"text.secondary",textAlign:"center",children:h}):(0,p.jsx)(i.Z,{sx:{maxWidth:b},children:(0,p.jsx)(Zu.Z,{height:"window",rowCount:Z.length,renderRow:k,remeasureRowHeightsRef:D})}),renderColumn2:()=>(0,o.isEmpty)(w)?(0,p.jsx)(v.Z,{paddingY:3,color:"text.secondary",textAlign:"center",children:C}):(0,p.jsx)(i.Z,{sx:{maxWidth:b},children:(0,p.jsx)(Zu.Z,{height:"window",rowCount:w.length,renderRow:I,remeasureRowHeightsRef:M})})})},Du=(e,t)=>!!e&&(tc(e.fileRefs,"androidObb")||ec(t,"androidObb"));var Mu=n(13544);const ku=e=>{let{severity:t}=e;return(0,p.jsx)(ui.Q,{withBackground:!0,severity:t,children:(0,p.jsxs)(v.Z,{variant:"body2",children:["Some files bundled with this app cannot be installed on Meta Quest devices running firmware v63+ and devices using Android 12+."," ",(0,p.jsxs)(Kn.Z,{href:Be.IW.androidDataPermission,target:"_blank",rel:"noopener noreferrer",color:"info.main",children:["Click here to learn more about this restriction"," ",(0,p.jsx)(Mu.Z,{sx:{fontSize:"1em",verticalAlign:"middle"}})]})]})})};var Iu=n(64053);const Au=e=>{let{children:t}=e;return(0,p.jsx)(ui.Q,{withBackground:!0,Icon:Iu.Z,iconProps:{color:"secondary"},children:(0,p.jsx)(v.Z,{variant:"subtitle1",children:t})})};var Ru=n(20653);const Tu=e=>{var t;let{appVersions:n,singleApp:i,iconSx:a}=e;const r=(0,o.filter)(n,(e=>void 0!==e.deviceLimit));if((0,o.isEmpty)(r))return null;const l=(0,Vs.LL)(r),s=l>0?"error.main":"text.secondary",d=function(e){const{numAppsWithDeviceLimit:t,numAppsExceedingDeviceLimit:n,singleAppDeviceLimit:i}=e;if(void 0===i)return n>0?"Device limit exceeded for ".concat((0,ul.sr)(n,"version")):"".concat((0,ul.sr)(t,"version")," ").concat((0,ul._C)(t)," a device limit");if(n)return"Device limit has been exceeded for this app";return"This version has a device limit of ".concat(i)}({numAppsWithDeviceLimit:r.length,numAppsExceedingDeviceLimit:l,singleAppDeviceLimit:i?null===(t=r[0])||void 0===t?void 0:t.deviceLimit:void 0});return(0,p.jsx)(ee.Z,{title:d,followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(m.Z,{children:(0,p.jsx)(Fl.u,{sx:{fontSize:"1rem",...a,color:s}})})})};Tu.displayName="UISharedAppDeviceLimitIndicator";const Pu=e=>{if(!e.expirationTimestamp)return"";const t=(0,M.ax)(e.expirationTimestamp);return(0,Vs.Wk)(e)?"expiring soon on ".concat(t):(0,Vs.IR)(e)?"expired on ".concat(t):"expires on ".concat(t)},Lu=e=>{let{appVersions:t,sx:n,fontSize:i}=e;const r=(0,a.useMemo)((()=>
3{if((0,o.every)(t,(e=>!e.expirationTimestamp)))return null;if(1===t.length)return(0,o.upperFirst)(Pu(t[0]));{const e=(0,o.chain)(t).groupBy(Pu).toPairs().sortBy((e=>{let[,[t]]=e;return t?t.expirationTimestamp?(0,Vs.IR)(t)?1e3*t.expirationTimestamp:t.expirationTimestamp:Number.MAX_SAFE_INTEGER:0})).value();return(0,p.jsx)(m.Z,{children:(0,o.map)(e,(e=>{let[t,n]=e;return(0,p.jsxs)("span",{children:[(0,ul.sr)(n.length,"version")," ",t||"".concat(1===n.length?"has":"have"," no expiration date")]},t)}))})}}),[t]),l=(0,a.useMemo)((()=>(0,o.some)(t,Vs.Wk)?"secondary.main":"text.secondary"),[t]);return null===r?null:(0,p.jsx)(ee.Z,{title:r,followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(Iu.Z,{fontSize:i,sx:{fontSize:i?void 0:"1rem",...n,color:l}})})};Lu.displayName="UISharedAppExpirationIndicator";const Nu=e=>{let{appVersions:t,showUploadProgress:n=!1,singleApp:i=!1}=e;const{organizationId:a}=(0,w.P)(),r=null===t||void 0===t?void 0:t[0],l=(0,u.v9)((e=>{var t;return n&&r&&(0,Vs.Vi)(r)?null===(t=e.vrContent.appUploads[a])||void 0===t?void 0:t[r.packageName]:void 0}));if(!r)return null;const s=r.description||r.packageName,d=(0,o.every)(t,Vs.IR);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:r.iconUrl,variant:"rounded",sx:{opacity:d?.5:void 0}})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{minWidth:0},children:[(0,p.jsx)(Lu,{appVersions:t,sx:{marginBottom:.25}}),(0,p.jsx)(Tu,{appVersions:t,singleApp:i}),(0,p.jsx)(Ui.G,{title:r.title,variant:"body1"})]}),secondary:l?(0,p.jsx)(Rn.Z,{variant:l.documentPending?"indeterminate":"determinate",value:l.uploadProgress.percentComplete,sx:{marginY:1}}):(0,p.jsxs)(Ui.G,{title:s,variant:"body2",children:[d&&"Expired \u2022 ",s]})})]})};Nu.displayName="UIAppListItemContent";const Uu=e=>{let{instantApp:t}=e;const n=(0,o.chain)(t.categories).sortBy().join(", ").value();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:t.iconUrl,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(ee.Z,{title:"Instant App",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(Ud.Z,{sx:{color:Ld.Li}})}),(0,p.jsx)(Ui.G,{title:t.title,variant:"body1"})]}),secondary:(0,p.jsx)(Ui.G,{title:n||" ",variant:"body2"})})]})};Uu.displayName="UIInstantAppListItemContent";const Fu=e=>{let{app:t}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:t.iconUrl,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(ee.Z,{title:"Meta Horizon Store App",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(m.Z,{justifyItems:"flex-end",children:(0,p.jsx)(Nd,{fontSize:"small"})})}),(0,p.jsx)(Ui.G,{title:t.title,variant:"body1"})]}),secondary:t.orgMetaHorizonManagedAppId?void 0:(0,p.jsx)(Ui.G,{title:t.versionName||" ",variant:"body2"})})]})};Fu.displayName="UIMHMSAppListItemContent";const Ou=(0,a.memo)((e=>{let{title:t,icon:n,placement:i="top"}=e;return(0,p.jsx)(ee.Z,{title:t,placement:i,children:(0,p.jsx)(n,{sx:{fontSize:"1rem",cursor:"pointer"},color:"inherit"})})})),_u=(0,a.memo)((e=>{var t;let{item:n,appVersions:i=[],approved:r=!1,advanced:l=!1}=e;const s=(0,u.I0)(),d=Ks(),c=(0,xo.ky)(S.F.Configurations,d),h="app"===n.documentType,g="instantApp"===n.documentType,C="mhmsApp"===n.documentType,x=h&&(0,Vs.n$)(n),f=(0,a.useMemo)((()=>[{title:"Release Channels",filter:e=>!!e.releaseChannelRef&&!0!==e.isShared},{title:"Shared",filter:e=>!!e.isShared},{title:"External",filter:e=>(0,Vs.n$)(e)}]),[]),b=(0,a.useMemo)((()=>(0,o.filter)(i,(e=>(0,o.every)(f,(t=>!t.filter(e)))))),[i,f]),y=(0,a.useMemo)((()=>{const e=(0,o.chain)(f).map((e=>[{label:e.title,value:"section_header"},...(0,o.map)((0,o.filter)(i,e.filter),(e=>({value:e.id,label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,overflow:"hidden",children:[(0,p.jsx)(Lu,{appVersions:[e]}),(0,p.jsx)(Tu,{appVersions:[e],singleApp:!0,iconSx:{marginTop:.25}}),(0,p.jsx)(sc,{app:e,showTypeIcon:!0})]})})))])).filter((e=>e.length>
31)).flatten().value();return(0,o.isEmpty)(b)||e.push({label:"Versions",value:"section_header"},...(0,o.map)(b,(e=>({value:e.id,label:(0,p.jsx)(sc,{app:e,showTypeIcon:!0})})))),e}),[i,f,b]),j=!!Xs((e=>(0,o.find)(e.forcedAppRefs,{id:n.id}))),Z=null!==(t=Xs((e=>{var t,i;return null===(t=e.appProperties)||void 0===t||null===(i=t[h||C?n.packageName:n.id])||void 0===i?void 0:i.autoGrantPermissions})))&&void 0!==t&&t,w=g?(0,p.jsx)(Uu,{instantApp:n}):C?(0,p.jsx)(Fu,{app:n}):(0,p.jsx)(Nu,{appVersions:r?[n]:i,singleApp:!0});return r?(0,p.jsxs)(m.Z,{flexGrow:1,minWidth:0,spacing:1,children:[(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",minWidth:0,children:w}),g||C?null:x&&1===i.length?(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"External apps will use the version installed on a device"}):(0,p.jsx)(Qi,{label:"Version",value:n.id,options:y,privilege:"configurations",sx:{marginBottom:l?.5:1},SelectProps:{renderValue:()=>(0,p.jsx)(sc,{app:n,showTypeIcon:!0})},onChange:e=>{"instantApp"!==n.documentType&&s(Js(Ys.U.actions.appVersionChanged({currentAppId:n.id,newAppId:e})))},testId:"configurationApps_versionSelect"}),(h||C)&&(0,p.jsx)(ru,{configuration:c,app:n}),l&&!x&&(0,p.jsxs)(m.Z,{direction:"row",children:[!C&&(0,p.jsx)(Pd,{checked:j,control:(0,p.jsx)(Pi.Z,{size:"small",onChange:()=>{s(Js(Ys.U.actions.appForceToggled({appId:n.id,type:n.documentType})))}}),label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"textSecondary",whiteSpace:"nowrap",children:"Force Install"}),(0,p.jsx)(Ou,{title:"Uninstall app before installing a new version. Only enable this if you want to roll back an app version or clear app preferences between updates.",icon:si.Z})]}),privilege:"configurations","data-testid":"configurationApps_forceInstall"}),(0,p.jsx)(Pd,{checked:Z,control:(0,p.jsx)(Pi.Z,{size:"small",onChange:()=>{let e=h||C?n.packageName:n.id;s(Js(Ys.U.actions.appAutoGrantPermissionsToggled({packageNameOrId:e})))}}),label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"textSecondary",whiteSpace:"nowrap",children:"Automatically Grant Permissions"}),(0,p.jsx)(Ou,{title:"Automatically grant any device permissions (storage, microphone, etc.) that the app requests",icon:si.Z})]}),privilege:"configurations"})]})]}):(0,p.jsx)(m.Z,{flexGrow:1,direction:"row",alignItems:"center",minWidth:200,children:w})}));_u.displayName="ConfigurationAppListItemContent";var zu=n(18247);const Bu=(0,a.memo)((e=>{let{onConfiguration:t,count:n,onGoToDevices:o}=e;const a=1===n,r="".concat(n," ").concat(a?"device":"devices"),l=t?"using this configuration":"in this organization",{ref:s,width:d}=(0,zu.m)(),c="".concat(r," ").concat(l," must accept an in-headset permission prompt to use this app. Hover to learn more."),u=t?"".concat(r," using this configuration ").concat(a?"has":"have"," not accepted this permission and will not be able to install the OBB file attached to this app."):"".concat(r," in this organization ").concat(a?"has":"have"," not accepted this permission. If you apply this configuration to ").concat(a?"that device":"those devices",", ").concat(a?"it":"they"," will not be able to install the OBB file attached to this app."),h=(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",children:"Devices on Android 12+ must grant a one-time permission in-headset before ManageXR can install OBB files."}),(0,p.jsx)(v.Z,{variant:"body2",children:u}),(0,p.jsx)(v.Z,{variant:"body2",children:"You can configure when users are prompted to accept the permission in the Device Settings tab in the sidebar of this page, or click this alert to see the list of affected devices."})]}),g=t?"error":"warning";return(0,p.jsx)(ee.Z,{title:h,placement:"bottom-start",componentsProps:{tooltip:{sx:{maxWidth:"none",width:d}}},children:(0,p.jsx)(i.Z,{ref:s,onClick:o,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o())},role:"button",tabIndex:0,"aria-label":"See affected devices","data-testid":"configurationObbPermissionSaveChip",sx:{cursor:"pointer"}
3,children:(0,p.jsx)(ui.Q,{withBackground:!0,severity:g,children:(0,p.jsx)(v.Z,{variant:"body2",children:c})})})})}));Bu.displayName="ConfigurationObbPermissionSaveChipView";const Wu=()=>{var e,t,n,r;const s=(0,u.I0)(),{confirm:c,notify:h}=(0,ie.o)(),{buildOrganizationPath:g}=(0,w.P)(),{appDeviceLimitExceeded:C,approvedApps:x,numAppsExceedingDeviceLimit:j}=ld(),Z=(0,d.P)("DISABLE_ANDROID_PERMISSION_WARNINGS"),D=(0,d.P)("FORCE_HIDE_DISCOVER_XR"),[M,k]=(0,a.useState)(""),I=Id(),{documents:A}=(0,E.D)(S.F.Apps),{documents:R}=(0,E.h)(S.F.Apps,{filter:(0,a.useCallback)((e=>!e.instantAppRef),[])}),T=(0,u.v9)((e=>e.ui.configuration.advancedApp)),{approvedApps:P,approvedInstantApps:L,kioskAppRef:N,tutorialAppRef:U,firstTimeUseAppRef:F}=Xs((e=>e))||{},O=(0,Le.ye)("enableTutorialModeRevamp")?U:F,_=(0,a.useMemo)((()=>(0,o.chain)(I).pickBy(((e,t)=>(0,o.some)(L,{id:t}))).flatMap((e=>{let{apps:t}=e;return t})).value()),[L,I]),z=(0,a.useMemo)((()=>[...x,..._]),[x,_]),B=Ks(),W=(e=>{const t=(0,u.I0)(),n=(0,l.k6)(),{buildOrganizationPath:i}=(0,w.P)();return(0,a.useCallback)((()=>{t(La.i7.actions.filtersCleared()),t(La.i7.actions.filterSelected({filterId:e})),n.push(i((e=>e.devices)))}),[i,t,e,n])})("missingAndroidObbPermission"),V=(0,u.v9)((e=>e.configuration.editingConfiguration)),G=(0,xo.ky)(S.F.Configurations,B),H=(0,a.useMemo)((()=>(0,o.map)(null===G||void 0===G?void 0:G.approvedApps,"id")),[null===G||void 0===G?void 0:G.approvedApps]),q=(0,E.Ev)(S.F.Apps,H),Y=null!==(e=Xs((e=>e.deviceCount)))&&void 0!==e?e:0,K=!Z&&Du(null!==V&&void 0!==V?V:G,z),X=!Z&&((e,t,n,i)=>Du(n,i)&&!Du(e,t))(G,q,V,z),Q=(e=>{const{organizationId:t}=(0,w.P)(),[n,i]=(0,a.useState)(void 0);return(0,a.useEffect)((()=>{if(!e||!t)return void i(void 0);let n=!1;return(0,Fe.Y4)({organizationId:t},{$where:{$and:[{model:{$in:Wd.androidObb}},{statusHasAndroidObbPermission:{$ne:!0}},{$or:[{factoryResetStatus:{$isNull:!0}},{factoryResetStatus:"QUEUED"}]}]},$orderBy:{}}).then((e=>{n||i(e)})).catch((()=>{n||i(void 0)})),()=>{n=!0}}),[e,t]),n})(K),J=(0,a.useMemo)((()=>Q&&B?((e,t)=>{const[n,i]=(0,o.partition)(e,(e=>{var n;return(0,o.last)(null===(n=e.deviceGroupRefPath)||void 0===n?void 0:n.split("/"))===t}));return{onConfigurationCount:n.length,orgCount:i.length}})(Q,B):void 0),[Q,B]),$=null!==(t=null===J||void 0===J?void 0:J.onConfigurationCount)&&void 0!==t?t:0,ee=null!==(n=null===J||void 0===J?void 0:J.orgCount)&&void 0!==n?n:0,te=K&&$>0,ne=te||K&&!te&&ee>0&&(X||0===Y),oe=te,ae=te?$:ee,re=(e=>{const{organizationId:t}=(0,w.P)(),[n,i]=(0,a.useState)(void 0);return(0,a.useEffect)((()=>{if(!e||!t)return void i(void 0);let n=!1;return(0,Fe.Y4)({organizationId:t},{$where:{$and:[{model:{$in:Wd.androidData}},{$or:[{factoryResetStatus:{$isNull:!0}},{factoryResetStatus:"QUEUED"}]}]},$orderBy:{}}).then((e=>{n||i(e)})).catch((()=>{n||i(void 0)})),()=>{n=!0}}),[e,t]),n})(!Z&&ec(z,"androidData")),le=(0,a.useMemo)((()=>re&&B?(0,o.filter)(re,(e=>{var t;return(0,o.last)(null===(t=e.deviceGroupRefPath)||void 0===t?void 0:t.split("/"))===B})).length:0),[re,B]),se=(null!==(r=null===re||void 0===re?void 0:re.length)&&void 0!==r?r:0)-le,de=!(void 0!==re)||le>0||0===Y&&se>0?"error":"warning",ce=(0,a.useMemo)((()=>(0,o.chain)([...A,...R]).filter((e=>!e.instantAppRef&&!(0,Vs.HB)(e))).groupBy("packageName").toPairs().map((e=>{let[t,n]=e;return[t,(0,o.reverse)(n.sort(Vs.r6))]})).fromPairs().value()),[R,A]),ue=(0,a.useCallback)((e=>"instantApp"===e.documentType?[]:ce[e.packageName]||[]),[ce]),pe=(0,a.useCallback)((e=>{if(!M)return!0;const t=[e.title,e.packageName],n=M.toLocaleLowerCase();return(0,o.some)(t,(e=>e.toLocaleLowerCase().includes(n)))}),[M]),he=(0,a.useCallback)((e=>{var t;if(!M)return!0;const n=(null===(t=I[e.id])||void 0===t?void 0:t.apps)||[];return(0,o.some)(n,pe)}),[pe,M,I]),me=(0,a.useCallback)((e=>{var t;return null!==(t=(0,o.find)(e,(e=>e.instantAppRef?(0,o.some)(L,{id:e.instantAppRef.id}):(0,o.some)(P,{id:e.id}))))&&void 0!==t?t:e[0]}),[P,L]),ge=(0,a.useMemo)((()=>[...(0,o.chain)(I).map("instantApp").filter(he).map((e=>{var t;return{...e,iconUrl:null!==(t=e.appIconUrl)&&void 0!==t?t:e.iconUrl,documentType:"instantApp"}}
3)).value(),...(0,o.chain)([...A,...R]).filter(Vs.HB).filter(pe).map((e=>({...e,documentType:"mhmsApp"}))).value(),...(0,o.chain)(ce).values().map(me).filter(pe).map((e=>({...e,documentType:"app"}))).value()].sort(((e,t)=>(0,ze.DN)(e.title,t.title)))),[ce,pe,me,R,he,A,I]),ve=(0,a.useMemo)((()=>(0,o.chain)([...P||[],...L||[]]).map("id").value()),[P,L]),Ce=(0,a.useCallback)((e=>(0,o.chain)([...x,..._]).filter((t=>t.packageName===e)).map("title").uniq().value()),[x,_]),xe=(0,a.useCallback)((e=>{const t=[];var n;"instantApp"===e.documentType?t.push(...(0,o.map)(null===(n=I[e.id])||void 0===n?void 0:n.apps,"packageName")):"app"!==e.documentType&&"mhmsApp"!==e.documentType||t.push(e.packageName);const i=(0,o.chain)(t).map(Ce).flatten().uniq().value();return!!(0,o.isEmpty)(i)||(h({message:"The following approved ".concat((0,ul.n8)(i.length,"app")," shares the same package name: ").concat(i.join(", ")),severity:"warning"}),!1)}),[Ce,h,I]),fe=(0,a.useCallback)((e=>{if(!xe(e))return;const t="app"===e.documentType||"mhmsApp"===e.documentType?e.packageName:e.id;s(Js(Ys.U.actions.appApproved({appId:e.id,type:e.documentType,packageNameOrId:t})))}),[s,xe]),be=(0,a.useCallback)((e=>{const t=[],n=e.id,i="app"===e.documentType||"mhmsApp"===e.documentType?e.packageName:e.id,o=()=>{s(Js(Ys.U.actions.appUnapproved({appId:n,type:e.documentType,packageNameOrId:i})))};N&&n===N.id&&t.push("This is your Kiosk App. If you remove it, Kiosk Mode will be disabled until you choose a new app."),O&&n===O.id&&t.push("This is your Tutorial App. If you remove it, Tutorial Mode will be disabled until you choose a new app."),t.length?c({message:t,onConfirm:o}):o()}),[c,s,O,N]),ye=(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(xu,{value:M,onChange:k,TextFieldProps:{placeholder:"Filter by title or package name"},inputTestId:"configurationApps_search"})}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(fu,{label:"Advanced",value:T,onToggle:()=>{s(Te.dV.actions.configurationAdvancedAppToggled())},testId:"configurationApps_advanced"})})]}),je=D?(0,p.jsxs)(v.Z,{children:["No apps yet."," ",(0,p.jsx)(Kn.Z,{component:f.rU,to:g((e=>e.vrContent.create)),color:y.DG.info[200],children:"Add an app to your library"})]}):(0,p.jsxs)(v.Z,{children:["Upload an app to your VR Content library or check out the"," ",(0,p.jsx)(Kn.Z,{component:f.rU,to:g((e=>e.marketplace.instantApps)),onClick:()=>(0,b.ec)("Discover XR CTA Clicked"),color:y.DG.info[200],children:"available Instant Apps"})]}),Ze=(0,o.filter)(x,Vs.Wk).length,we=Ze?(0,p.jsxs)(Au,{children:[(0,ul.sr)(Ze,"App")," on this Configuration"," ",1===Ze?"expires":"expire"," soon"]}):null,Ee=(0,o.filter)(x,Vs.IR).length,Se=Ee?(0,p.jsxs)(Au,{children:[(0,ul.sr)(Ee,"App")," on this Configuration"," ",1===Ee?"has":"have"," expired"]}):null,De=C?(0,p.jsx)(ui.Q,{severity:"error",withBackground:!0,Icon:Fl.u,iconProps:{color:"error",sx:{marginTop:"1px"}},children:(0,p.jsxs)(v.Z,{variant:"body1",children:["Device limit exceeded for"," ",(0,ul.sr)(j,"shared app")]})}):null;return(0,p.jsxs)(m.Z,{spacing:2,children:[we,Se,De,ye,(0,p.jsx)(Su,{allValues:ge,selectedIds:ve,renderListItemContent:(e,t)=>(0,p.jsxs)(i.Z,{sx:{minWidth:0,flexGrow:1,maxWidth:440},children:[(0,p.jsx)(_u,{item:e,appVersions:ue(e),approved:t,advanced:T}),t&&("app"===e.documentType||"mhmsApp"===e.documentType)&&ec([e],"androidObb")&&ne&&(0,p.jsx)(i.Z,{sx:{marginTop:.25,marginBottom:1},children:(0,p.jsx)(Bu,{onConfiguration:oe,count:ae,onGoToDevices:W})}),t&&("app"===e.documentType||"mhmsApp"===e.documentType)&&!Z&&tc(e.fileRefs,"androidData")&&(0,p.jsx)(i.Z,{sx:{marginTop:.25,marginBottom:1},children:(0,p.jsx)(ku,{severity:de})})]}),onAdd:fe,onRemove:be,showListItemDivider:e=>e,selectedTitle:"Deployed Apps",selectedEmptyMessage:"There are no deployed Apps",otherTitle:"App Library",otherEmptyMessage:je,selectLabel:"Deploy",privilege:"configurations",maxColumnWidth:yf/2,testIdPrefix:"configurationApps",rowHeightInvalidationKey:"".concat(T,"|").concat(ae,"|").concat(oe,"|").concat(ne)})]})};let Vu;!function(e){e.USER_EVENT="USER_EVENT",e.DEVICE_EVENT="DEVICE_EVENT"}(Vu||(Vu={}));const Gu=["LAUNCH_APP","PLAY_VIDEO","PAUSE_VIDEO","RESUME_VIDEO","LAUNCH_WEB_URL","RESTART","POWER_OFF","PLAY_SOUND"],Hu=["GET_LOGS","FACTORY_RESET_V2"],qu="The device already started this command, so it could not be canceled.",Yu={CHECK_IN:"Sync",DISABLE_KIOSK:"Disable Kiosk",ENABLE_KIOSK:"Enable Kiosk",GET_LOGS:"Get Logs",LAUNCH_APP:"Launch App",LAUNCH_INSTANT_APP:"Launch Instant App",RESET_FIRST_TIME_USE:"XRHealth: Reset Device",RESTART:"Restart",POWER_OFF:"Power Off",UNINSTALL_APP:"Uninstall App",CLEAR_APP_USER_DATA:"Clear App Data",ENABLE_TUTORIAL_MODE:"Enable Tutorial Mode",DISABLE_TUTORIAL_MODE:"Disable Tutorial Mode",CHANGE_ORGANIZATION:"Change Organization",DELETE_DEVICE:"Delete",FACTORY_RESET_V2:"Factory Reset",CANCEL_FACTORY_RESET:"Cancel Factory Reset",MIGRATE_TO_QFB:"Migrate to MHMS",CANCEL_MIGRATE_TO_QFB:"Cancel Migration to MHMS",PAUSE_UPDATES:"Pause Configuration Updates",RESUME_UPDATES:"Resume Configuration Updates",DELETE_FILES:"Delete Files",PLAY_VIDEO:"Play Video",PAUSE_VIDEO:"Pause Video",RESUME_VIDEO:"Resume Video",LAUNCH_VR_CONTENT:"Launch VR Content",LAUNCH_WEB_URL:"Launch WebXR Link",LOCK:"Lock",UNLOCK:"Unlock",LOCK_SCREEN:"Lock",LAUNCH_REMOTE_STREAM:"Start Stream",PLAY_SOUND:"Play Sound",VALIDATE_FILE_INTEGRITY:"Validate File Integrity",CLEAR_DOWNLOAD_CACHE:"Clear Download Cache",CLEAR_MAS_APP_CACHE:"Clear Meta App Store Cache",CLEAR_DEFERRED_INSTALL_CACHE:"Clear Deferred Install Cache",CLEAR_INSTALL_FAILURE_CACHE:"Clear Install Failure Cache",CLEAR_PATCH_CACHE:"Clear Patch Cache",CLEAR_ALL_DOWNLOAD_STATE:"Clear All Download State",RUN_NETWORK_TEST:"Run network test",REMOVE_WIFI_NETWORK:"Remove Wi-Fi Network",SET_VOLUME:"Adjust Volume",SET_BRIGHTNESS:"Adjust Brightness"},Ku=e=>{let{action:t,multipleDevices:n,useDisabledVariant:i,tutorialModeRevamp:o}=e;const a=n?"these devices":"this device",r=n?"s":"",l=n?"their":"its",s=n?"they":"it",d=n?"are":"is",c="Devices enrolled via ".concat(bi.RZ," cannot use this command. To change the device experience, go to your Configuration."),u=n?"one or more of the selected devices":"this device",p="The configuration for ".concat(u," does not have a Tutorial App set."),h=o?"Tutorial Mode launches your designated Tutorial App every time a device boots. Users can exit the tutorial by pressing the home button.":"Tutorial Mode launches your designated Tutorial app on boot. Devices exit Tutorial Mode when a user exits the tutorial app.";return{CHANGE_ORGANIZATION:"Move ".concat(a," to a different organization."),CHECK_IN:"Sync ".concat(a," with the latest configuration."),RESTART:"Restart ".concat(a,"."),POWER_OFF:i?"Not supported on ".concat(u,". Power off is supported on Meta devices enrolled via Meta Horizon managed services with firmware v77 and above, and Pico devices with PUI firmware v5 and above."):"Power off ".concat(a),DISABLE_KIOSK:i?c:"".concat(n?"":"Kiosk / ManageXR Home Screen mode is enabled. ","When Kiosk mode is disabled, you can access the default device menu."),ENABLE_KIOSK:i?c:"".concat(n?"":"Kiosk / ManageXR Home Screen mode is disabled. ","When Kiosk mode is enabled, you cannot access the default device menu."),DISABLE_TUTORIAL_MODE:i?p:"".concat(n?"":"Tutorial Mode is enabled. ").concat(h),ENABLE_TUTORIAL_MODE:i?p:"".concat(n?"":"Tutorial Mode is disabled. ").concat(h),FACTORY_RESET_V2:"Factory reset your device to delete all apps, files, and settings, including ManageXR and free its device license. To continue managing the device after a factory reset, you need to re-register it.",CANCEL_FACTORY_RESET:"Cancel the factory reset command queued on the device. The device will no longer delete all apps, files, and settings, including ManageXR.",MIGRATE_TO_QFB:"Migrate ".concat(a," to Meta Horizon managed services."),GET_LOGS:"Get logs.",LAUNCH_APP:"Select and launch an app on ".concat(a,"."),PAUSE_UPDATES:"Stop updates that sync ".concat(a," with ").concat(l," configuration").concat(r,"."),RESUME_UPDATES:"Resume updates that sync ".concat(a," with ").concat(l," configuration").concat(r,"."),DELETE_FILES:"Delete files from ".concat(a,"."),RESET_FIRST_TIME_USE:"Reset ".concat(a,"."),UNINSTALL_APP:"",CLEAR_APP_USER_DATA:"",DELET
3E_DEVICE:"Remove ".concat(a," from ManageXR"),PLAY_VIDEO:"Select and launch a video on ".concat(a),PAUSE_VIDEO:"Select and pause a video on ".concat(a),RESUME_VIDEO:"Resume a video on ".concat(a),LAUNCH_VR_CONTENT:"Select an App, Video, or WebXR Link to launch on ".concat(a),LAUNCH_WEB_URL:"Select a WebXR Link to launch on ".concat(a),LOCK:"Lock device".concat(r," and require user to enter the configured passcode."),UNLOCK:"Unlock device".concat(r," if ").concat(s," ").concat(d," locked with a passcode."),LOCK_SCREEN:"Immediately lock device".concat(r,"; the user must re-enter ").concat(l," passcode to resume."),LAUNCH_INSTANT_APP:"Select and launch an Instant App on ".concat(a),PLAY_SOUND:"Play sound on ".concat(a,". Volume will temporarily increase while sound plays. Do not send while a user is in-headset."),VALIDATE_FILE_INTEGRITY:"Check that all installed files have the same contents as when they were installed. This will delete corrupted or modified files and redownload them on sync.",CLEAR_DOWNLOAD_CACHE:"Resets download progress and deletes temporary download files on ".concat(a,"."),CLEAR_MAS_APP_CACHE:"Clears the Meta App Store vendor app cache on ".concat(a,"."),CLEAR_DEFERRED_INSTALL_CACHE:"Clears cached APK files waiting for deferred install on ".concat(a,"."),CLEAR_INSTALL_FAILURE_CACHE:"Clears all cached install failure records on ".concat(a,", allowing apps to retry installation."),CLEAR_PATCH_CACHE:"Clears the managed file cache and download URLs on ".concat(a,", forcing a fresh re-download of patched content."),CLEAR_ALL_DOWNLOAD_STATE:"Nuclear option: clears all download and install state on ".concat(a,", forcing a complete re-sync without a factory reset."),RUN_NETWORK_TEST:"Run the on-device network test on ".concat(a," and report the results to the console."),REMOVE_WIFI_NETWORK:"Forget a saved Wi-Fi network",SET_VOLUME:"Set the volume on ".concat(a),SET_BRIGHTNESS:"Set the brightness on ".concat(a),LAUNCH_REMOTE_STREAM:i?"Your organization administrators have disabled device streaming.":"Start screen streaming for ".concat(a)}[t]};let Xu;!function(e){e.CHECK_IN="Synced With Server",e.HANDLED_COMMAND="Command Handled",e.HMD_ON_USER="HMD On User",e.HMD_OFF_USER="HMD Off User",e.HMD_SHUTDOWN="HMD Shutdown",e.APP_FINISHED_PLAY="App Finished Play",e.SESSION_APP_PLAY="SessionAppPlay",e.NEW_FOREGROUND_APP="App In Foreground",e.INSTALLED_APP="App Installed",e.UNINSTALLED_APP="App Uninstalled",e.INSTALLED_FILE="File Installed",e.UNINSTALLED_FILE="File Uninstalled",e.INSTALLED_VIDEO="Video Installed",e.UNINSTALLED_VIDEO="Video Uninstalled",e.LOCKED="Device Locked",e.UNLOCKED="Device Unlocked",e.STARTED_USB_UPDATE="USB Update Started",e.COMPLETED_USB_UPDATE="USB Update Complete",e.PARTIALLY_COMPLETED_USB_UPDATE="USB Update Parti
3ally Complete",e.FAILED_USB_UPDATE="USB Update Failed",e.SUBSCRIPTION_ENFORCED="Subscription Enforced",e.SUBSCRIPTION_REACTIVATED="Subscription Reactivated"}(Xu||(Xu={}));const Qu={[Xu.CHECK_IN]:{eventType:"Sync",eventTypeColor:"success.main",targetType:"with Configuration",getTargetName:e=>{var t;return null!==(t=e.configurationName)&&void 0!==t?t:""}},[Xu.HANDLED_COMMAND]:{eventType:"Handle",eventTypeColor:"success.main",targetType:"Command",getTargetName:e=>Yu[(0,o.get)(e.eventProperties,"action")]},[Xu.HMD_ON_USER]:{eventType:"Headset",eventTypeColor:"text.secondary",targetType:"Put On"},[Xu.HMD_OFF_USER]:{eventType:"Headset",eventTypeColor:"text.secondary",targetType:"Taken Off"},[Xu.HMD_SHUTDOWN]:{eventType:"Headset",eventTypeColor:"text.secondary",targetType:"Shut Down"},[Xu.APP_FINISHED_PLAY]:{eventType:"Close",eventTypeColor:"warning.main",targetType:"App",getTargetName:e=>{var t,n;return(null===(t=e.eventProperties)||void 0===t?void 0:t.title)||(null===(n=e.eventProperties)||void 0===n?void 0:n.packageName)}},[Xu.SESSION_APP_PLAY]:{eventType:"Close",eventTypeColor:"warning.main",targetType:"App",getTargetName:e=>{var t,n;return(null===(t=e.eventProperties)||void 0===t?void 0:t.title)||(null===(n=e.eventProperties)||void 0===n?void 0:n.packageName)}},[Xu.NEW_FOREGROUND_APP]:{eventType:"Open",eventTypeColor:"info.main",targetType:"App",getTargetName:e=>{var t,n;return(null===(t=e.eventProperties)||void 0===t?void 0:t.title)||(null===(n=e.eventProperties)||void 0===n?void 0:n.packageName)}},[Xu.INSTALLED_APP]:{eventType:"Install",eventTypeColor:"success.main",targetType:"App",getTargetName:e=>{var t,n;return(null===(t=e.eventProperties)||void 0===t?void 0:t.title)||(null===(n=e.eventProperties)||void 0===n?void 0:n.packageName)}},[Xu.UNINSTALLED_APP]:{eventType:"Uninstall",eventTypeColor:"error.main",targetType:"App",getTargetName:e=>{var t,n;return(null===(t=e.eventProperties)||void 0===t?void 0:t.title)||(null===(n=e.eventProperties)||void 0===n?void 0:n.packageName)}},[Xu.INSTALLED_FILE]:{eventType:"Install",eventTypeColor:"success.main",targetType:"File",getTargetName:e=>{var t;return null===(t=e.eventProperties)||void 0===t?void 0:t.name}},[Xu.UNINSTALLED_FILE]:{eventType:"Uninstall",eventTypeColor:"error.main",targetType:"File",getTargetName:e=>{var t;return null===(t=e.eventProperties)||void 0===t?void 0:t.name}},[Xu.INSTALLED_VIDEO]:{eventType:"Install",eventTypeColor:"success.main",targetType:"Video",getTargetName:e=>{var t;return null===(t=e.eventProperties)||void 0===t?void 0:t.name}},[Xu.UNINSTALLED_VIDEO]:{eventType:"Uninstall",eventTypeColor:"error.main",targetType:"Video",getTargetName:e=>{var t;return null===(t=e.eventProperties)||void 0===t?void 0:t.name}},[Xu.STARTED_USB_UPDATE]:{eventType:"Start",eventTypeColor:"info.main",targetType:"USB Update"},[Xu.COMPLETED_USB_UPDATE]:{eventType:"Install",eventTypeColor:"success.main",targetType:"USB Update"},[Xu.PARTIALLY_COMPLETED_USB_UPDATE]:{eventType:"Partially Install",eventTypeColor:"warning.main",targetType:"USB Update",getTargetName:e=>{const t=(0,o.get)(e.eventProperties,"failureCount");return(0,o.isNumber)(t)?"".concat(t," item(s) failed"):void 0}},[Xu.FAILED_USB_UPDATE]:{eventType:"Fail",eventTypeColor:"error.main",targetType:"USB Update"}},Ju=e=>{var t;let{event:n}=e;const i=Qu[n.name];return(0,p.jsx)(m.Z,{direction:"row",alignItems:"baseline",width:1,children:i?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.Z,{component:"span",variant:"button",color:i.eventTypeColor,whiteSpace:"nowrap",children:[i.eventType,"\xa0"]}),i.targetType&&(0,p.jsxs)(v.Z,{component:"span",variant:"body2",color:"text.secondary",whiteSpace:"nowrap",children:[i.targetType,"\xa0"]}),i.getTargetName&&(0,p.jsx)(Ui.G,{variant:"body2",fontWeight:"medium",title:null!==(t=i.getTargetName(n))&&void 0!==t?t:""})]}):(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",whiteSpace:"nowrap",children:n.name})})},$u=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 60 40",children:(0,p.jsxs)("g",{children:[(0,p.jsx)("path",{d:"M50.2947 24.8788L50.6223 24.6867V24.3093C50.6496 21.0637 50.5063 17.7907 50.4858 14.5383C47.9537 16.0136 45.7833 17.3035 43.8792 18.4151C39.2313 21.1118 36.1191 22.7174 33.0274 23.2251C34.8633 22.3949 36.1396 20.5422 36.1396 18.3877C36.1396 16.1782 34.795 14.2844 32.884 13.4885C39.088 10.7301 56.6624 0.108282 57.1334 -0.0769825C58.5939 -0.660222 60.1773 0.410194 60.1978 1.99523C60.1978 2.00896 60.1978 2.02268 60.1978 2.0364C60.2114 3.58027 60.1705 5.131 60.1364 6.67487C60.0886 8.85687 60.0545 11.032 60.0545 13.214C60.0545 15.396 60.0886 17.578 60.1364 19.7532C60.1705 21.297 60.2114 22.8478 60.1978 24.3985C60.1841 26.0933 60.1295 28.193 59.2628 29.7025C58.396 31.2052 56.6146 32.3031 55.1609 33.1677C53.8369 33.9499 52.4787 34.6909 51.1342 35.432C49.23 36.4818 47.3394 37.5454 45.4557 38.6364C43.5788 39.7274 41.7156 40.8458 39.8592 41.978C38.6375 42.7191 37.4227 43.4738 36.1805 44.1874C36.1805 28.2822 37.9619 32.1933 50.2947 24.8788Z"}),(0,p.jsx)("path",{d:"M11.7056 24.8815L11.378 24.6894V24.3121C11.3507 21.067 11.494 17.7944 11.5145 14.5425C14.0466 16.0175 16.217 17.3073 18.1211 18.4188C22.769 21.115 25.8812 22.7204 28.9729 23.228
31C27.137 22.398 25.8607 20.5456 25.8607 18.3913C25.8607 16.1822 27.2053 14.2886 29.1163 13.4928C22.9123 10.7348 5.33786 0.114501 4.86694 -0.0775975C3.40638 -0.660754 1.82297 0.416371 1.8025 1.99433C1.8025 2.00805 1.8025 2.02177 1.8025 2.03549C1.78885 3.57914 1.8298 5.12965 1.86392 6.6733C1.9117 8.855 1.94582 11.0298 1.94582 13.2115C1.94582 15.3932 1.9117 17.5749 1.86392 19.7497C1.83662 21.3071 1.78885 22.8576 1.8025 24.4013C1.81615 26.0959 1.87075 28.1952 2.73753 29.7046C3.60431 31.2071 5.38564 32.3048 6.83937 33.1692C8.16342 33.9513 9.5216 34.6923 10.8661 35.4332C12.7703 36.4829 14.6609 37.5463 16.5446 38.6372C18.4214 39.728 20.2847 40.8463 22.1411 41.9783C23.3628 42.7193 24.5776 43.4739 25.8198 44.1874C25.8129 28.2844 24.0316 32.195 11.7056 24.8815Z"})]})});var ep=n(7797),tp=n(55652);const np=e=>{let{name:t,subtitle:n,Icon:i}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,width:1,children:[(0,p.jsx)(i,{}),(0,p.jsxs)(m.Z,{flexGrow:1,children:[(0,p.jsx)(Ui.G,{variant:"body2",title:t}),(0,p.jsx)(Ui.G,{variant:"caption",title:n,color:"text.secondary"})]})]})},ip=e=>{let{event:t}=e;const n=(0,xo.ky)(S.F.UserOrganizationPrivileges,t.fromApiCall?void 0:"".concat(t.userId,":").concat(t.organizationId)),i=(0,xo.ky)(S.F.ApiKeys,t.fromApiCall?t.userId:void 0),o=(()=>{var e,o;return"SYSTEM"===t.userId?"ManageXR":"ENROLLMENT_CONFIG"===t.targetId?"Meta":t.isSuperAdmin?"ManageXR Admin":t.fromApiCall?null!==(e=null===i||void 0===i?void 0:i.name)&&void 0!==e?e:"[API Key Deleted]":t.userEmail?null!==(o=null===n||void 0===n?void 0:n.userProfile.name)&&void 0!==o?o:"[User Deleted]":bi.Gt})(),a=(e=>{var n;return"SYSTEM"===t.userId?"[email protected]":"ENROLLMENT_CONFIG"===t.targetId?"Horizon Managed Services":t.fromApiCall?null!==(n=null===i||void 0===i?void 0:i.apiKeyId)&&void 0!==n?n:"Unknown ID":t.userEmail||e!==bi.Gt?t.userEmail?t.userEmail:"Unknown Email":"Configuration Code"})(o),r="SYSTEM"===t.userId?$u:t.fromApiCall?ep.Z:tp.Z;return(0,p.jsx)(np,{name:o,subtitle:a,Icon:r})},op=e=>{var t;let{event:n}=e;const i=(0,Vr.Xj)(n.model);return(0,p.jsx)(np,{name:null!==(t=n.deviceName)&&void 0!==t?t:n.deviceSerial,subtitle:(0,Vr.ao)(n.model),Icon:i})};let ap;!function(e){e.Create="create",e.Update="update",e.Delete="delete"}(ap||(ap={}));const rp={create:"success.main",update:"warning.main",delete:"error.main",send:"info.main",end:"error.main"},lp=e=>{var t,n;let{event:i}=e,a=i.eventType,r=null!==(t=S.N[i.targetType])&&void 0!==t?t:i.targetType,l=i.targetName;if(i.eventType===ap.Create&&i.targetType===S.F.UserOrganizationPrivileges)l=(0,o.get)(i.afterDiff,["userProfile","email"]);else if(i.eventType===ap.Delete&&i.targetType===S.F.UserOrganizationPrivileges)l=(0,o.get)(i.beforeDiff,["userProfile","email"]);else if(i.eventType===ap.Delete&&i.targetType===S.F.RealtimeConnections)a="end";else if(i.eventType===ap.Create&&i.targetType===S.F.DeviceCommands){a="send";const e=(0,o.get)(i.afterDiff,"action");let t="";if((0,o.get)(i.afterDiff,"data.forceSync"))t="Force Sync";else if(e){const n=Yu[e];t=null!==n&&void 0!==n?n:e}else t="Unknown";l="".concat(i.targetName,": ").concat(t)}else if(i.targetType===S.F.Jobs){var s;"USB_PACKAGE"===(null!==(s=(0,o.get)(i.afterDiff,"jobType"))&&void 0!==s?s:(0,o.get)(i.beforeDiff,"jobType"))&&(r="USB Update Package")}return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",width:1,children:[(0,p.jsxs)(v.Z,{variant:"button",color:rp[a],whiteSpace:"nowrap",children:[(0,o.capitalize)(a),"\xa0"]}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",whiteSpace:"nowrap",children:[r,"\xa0"]}),(0,p.jsx)(Ui.G,{variant:"body2",fontWeight:"medium",title:null!==(n=l)&&void 0!==n?n:""})]})},sp={[Xu.INSTALLED_APP]:{data:[{path:"eventProperties.packageName",label:"Package Name"},{path:"configurationName",label:"Configuration"}]},[Xu.UNINSTALLED_APP]:{data:[{path:"eventProperties.packageName",label:"Package Name"}]},[Xu.INSTALLED_FILE]:{data:[{path:"configurationName",label:"Configuration"}]},[Xu.INSTALLED_VIDEO]:{data:[{path:"configurationName",label:"Configuration"}]},[Xu.PARTIALLY_COMPLETED_USB_UPDATE]:{data:[{path:"eventProperties.failureSummary",label:"Did not install"}]},[Xu.FAILED_USB_UPDATE]:{data:[{path:"eventProperties.errorMessage",label:"Error"}]}},dp=e=>{var t;let{event:n}=e;const{data:i}=null!==(t=sp[n.name])&&void 0!==t?t:{};return(0,p.jsx)(m.Z,{padding:1,width:1,children:i?(0,o.map)(i,(e=>{let{path:t,label:i}=e;const a=(0,o.get)(n,t);return(0,o.isString)(a)?(0,p.jsxs)(v.Z,{children:[(0,p.jsxs)(v.Z,{component:"span",variant:"subtitle2",color:"text.secondary",children:[i,":\xa0"]}),(0,p.jsx)(v.Z,{component:"span",variant:"body2",children:a})]},t):null})):(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"No additional data"})})};var cp=n(16674),up=n.n(cp),pp=n(26518),hp=n(82990),mp=n(87094),gp=n(26881),vp=n(87081),Cp=n(3203);const xp="MMM D, YYYY",fp=(e,t)=>t?"Expired":void 0===e?"None":(0,M.Mn)(e).format(xp),bp=(e,t)=>{if(t||void 0===e)return"";const n=(0,M.Mn)(e);return"This app will expire around ".concat(n.format("ha")," on ").concat(n.format(xp))},yp=e=>void 0===e?"-":"after ".concat((0,ul.sr)((0,M.Qp)(e),"day")),jp=e=>void 0===e?"":"This app will expire ".concat((0,M.Qp)(e)," days after an organization redeems this share code");var Zp=n(43649),wp=n(51735);const Ep=(e,t)=>(0,o.chain)((0,o.castArray)(null!==t&&void 0!==t?t:e)).filter(o.isString).value(),Sp=e=>{let{beforeValue:t=[],afterValue:n=[]}=e;const a=e=>{const t={};return e.forEach((e=>{t[e.key]=e.value})),t},r=a(t),l=a(n),s=(0,o.keys)(r),d=(0,o.keys)(l),c=[...(0,o.difference)(d,s),...(0,o.intersection)(s,d).filter((e=>r[e]!==l[e]))];return(0,p.jsx)(m.Z,{spacing:.5,children:c.map((e=>{var t;const n="usbdebugging"===e||"softwareupdate"===e,a=(null===(t=vp.Ul[e])||void 0===t?void 0:t.t
3itle)||e,s=!(!n||!(0,o.isUndefined)(r[e]))||r[e],d=l[e],c=e=>e?"Pin Protected":"Not Pin Protected";return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1.5,children:[(0,p.jsx)(i.Z,{width:190,flexShrink:0,children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"grey.700",children:a})}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)("span",{children:c(s)}),(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"}),(0,p.jsx)("span",{children:c(d)})]})]},e)}))})},Dp=e=>{let{value:t,label:n,requiredPrivilege:i,sx:o}=e;const[r,l]=(0,a.useState)(!1),{hasRequiredPrivilege:s}=(0,w.P)();return(0,p.jsx)(zi.W,{privilege:i,action:"view",children:(0,p.jsx)(C.Z,{onClick:()=>{l(!r)},disabled:!s(i),sx:{textTransform:"none",...o},children:r?t:"Click to view ".concat(n)})})};Dp.displayName="UIPrivilegeClickToViewButton";const Mp={[S.F.Apps]:["title","versionCode","versionName","versionLabel"],[S.F.InstantApps]:"title",[S.F.Certificates]:"name",[S.F.Configurations]:"name",[S.F.DeviceSystemVersions]:"version",[S.F.Files]:"name",[S.F.Tags]:"name",[S.F.HomeScreenColorThemes]:"name",[S.F.Organizations]:"name",[S.F.PaymentMethods]:["brand","last4"],[S.F.ReleaseChannels]:"name",[S.F.Videos]:"title",[S.F.WebXRApps]:"title",[S.F.WifiNetworks]:["ssid","nickname"]},kp=(0,Kc.ZP)("span")((e=>{let{theme:t}=e;return{color:t.palette.text.disabled}})),Ip=e=>e?"Yes":"No",Ap=(e,t)=>((e,t,n)=>{const i=Ep(e,t);if(0!==i.length)return i.map(n).join(", ")})(e,t,Vr.ao),Rp=e=>{let{label:t,divider:n=!1}=e;return(0,p.jsxs)(p.Fragment,{children:[t,n&&(0,p.jsx)(kp,{sx:{paddingX:.5},children:"|"})]})},Tp=e=>{let{path:t,divider:n,capitalizeLabels:i=!1}=e;const[a,r]=(0,o.split)(t,"/"),l=(0,xo.ky)(a,r),s=(0,xo.JG)(a,r),d=(0,o.chain)(Mp[a]).castArray().map((e=>(0,o.get)(l,e))).compact().map(i?o.capitalize:o.identity).join(" ").value()||(null!==s&&void 0!==s&&s.unauthorized?"[Unauthorized]":null!==s&&void 0!==s&&s.loaded&&!l?a===S.F.Certificates?"Deleted Certificate (ID: ".concat(r,")"):"[Deleted]":"[Unknown]");return(0,p.jsx)(Rp,{label:d,divider:n})},Pp=e=>{let{path:t,divider:n}=e;const{configurationsFullAccess:i,approvedConfigurationIds:a}=(0,w.P)(),[,r]=(0,o.split)(t,"/");return i||(0,o.includes)(null!==a&&void 0!==a?a:[],r)?(0,p.jsx)(Tp,{path:t,divider:n}):(0,p.jsx)(Rp,{label:"A configuration you do not have access to",divider:n})},Lp=e=>{let{path:t,divider:n}=e;const{hasOrganizationAccess:i}=(0,w.P)(),[,a]=(0,o.split)(t,"/");return a&&!i(a)?(0,p.jsx)(Rp,{label:"An organization you do not have access to",divider:n}):(0,p.jsx)(Tp,{path:t,divider:n})},Np=e=>{var t,n;let{packageName:i,divider:a}=e;const r=null!==(t=null===(n=(0,u.v9)((e=>(0,o.find)(e.firestore.data.apps.data,{packageName:i}))))||void 0===n?void 0:n.title)&&void 0!==t?t:"[Deleted]";return(0,p.jsx)(Rp,{label:r,divider:a})},Up=e=>{let{refs:t}=e;return(0,o.isEmpty)(t)?(0,p.jsx)(kp,{children:"None"}):(0,p.jsx)(p.Fragment,{children:(0,o.map)(t,((e,n)=>(0,p.jsx)(Tp,{path:e.path,divider:n<(0,o.size)(t)-1},e.path)))})},Fp=e=>{let{url:t}=e;return t?(0,p.jsx)(Kn.Z,{href:t,target:"_blank",rel:"noopener noreferrer",children:"View Image"}):(0,p.jsx)(kp,{children:"None"})},Op=e=>{let{keyValueArray:t,renderValue:n,renderKey:i}=e;return(0,o.isEmpty)(t)?(0,p.jsx)(kp,{children:"None"}):(0,p.jsx)(m.Z,{spacing:.5,children:(0,o.map)(t,(e=>{let{key:t,value:o}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",flexWrap:"wrap",spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",whiteSpace:"nowrap",children:[i?i(t):t,":"]}),(0,p.jsx)("span",{children:n?n(o):"".concat(o)})]},t)}))})},_p=e=>{let{keyTypeLabel:t,beforeValue:n,afterValue:i}=e;const a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,o.differenceBy)(t,e,"key").length,i=(0,o.differenceBy)(e,t,"key").length,a=(0,o.intersectionWith)(e,t,((e,t)=>e.key===t.key&&!(0,o.isEqual)(e.value,t.value))).length;return{addedCount:n,updatedCount:a,removedCount:i}}(n,i);return(0,p.jsxs)(m.Z,{children:[!!a.addedCount&&(0,p.jsxs)("span",{children:["Added for ",(0,ul.sr)(a.addedCount,t)]}),!!a.updatedCount&&(0,p.jsxs)("span",{children:["Updated for ",(0,ul.sr)(a.updatedCount,t)]}),!!a.removedCount&&(0,p.jsxs)("span",{children:["Removed for ",(0,ul.sr)(a.removedCount,t)]})]})},zp=e=>{let{beforeValue:t,afterValue:n,beforeDiff:i,renderBeforeAfter:a,isArray:r=!1}=e;const l=null===i||void 0===i?void 0:i.removedCertificateName;return(r?l&&!(0,o.isEmpty)(t)&&(0,o.isEmpty)(n):l&&t&&!n)?(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",alignItems:"center",gap:1,children:[(0,p.jsx)("span",{children:l}),(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"}),(0,p.jsx)(kp,{children:"None"})]}):(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",alignItems:"center",gap:1,children:[a(t),(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"}),a(n)]})},Bp=e=>{let{value:t,renderValue:n,renderUndefined:i=!1}=e;return(0,p.jsx)("span",{children:!n||!i&&(0,o.isUndefined)(t)?JSON.stringify(t)||(0,p.jsx)(kp,{children:"None"}):n(t)})},Wp={title:{label:"Title"},description:{label:"Description"},categories:{label:"Categories",renderValue:e=>(0,o.isEmpty)(e)?(0,p.jsx)(kp,{children:"None"}):(0,o.map)(e,((t,n)=>(0,p.jsx)(Rp,{label:t,divider:n<(0,o.size)(e)-1})))},iconUrl:{label:"Icon",renderValue:e=>(0,p.jsx)(Fp,{url:e})}},Vp=e=>{let{overridesArray:t,renderKey:n}=e;return(0,p.jsx)(Op,{keyValueArray:(0,o.filter)(t,(e=>{let{value:t}=e;return!(0,o.isEmpty)(t)})),renderValue:e=>(0,p.jsx)("div",{children:(0,o.map)(e,((e,t)=>
3{const n=Wp[t];if(!n)return null;const{label:i,renderValue:o,renderUndefined:a}=n;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",color:"grey.700",children:[i,":"]}),(0,p.jsx)(Bp,{value:e,renderValue:o,renderUndefined:a})]},t)}))}),renderKey:n})},Gp=e=>{let{value:t}=e;const n=(0,o.isObject)(t)?t.path:void 0;return n?(0,p.jsxs)(i.Z,{sx:{minWidth:100},children:[(0,p.jsx)(Tp,{path:n})," "]}):(0,p.jsx)(i.Z,{sx:{minWidth:100},children:vp.bL[null!==t&&void 0!==t?t:vp.AP.BlockFirmwareUpdates]})},Hp=[bi.Q6.PicoNeo2,bi.Q6.PicoNeo3,bi.Q6.PicoG24K,bi.Q6.PicoG3,bi.Q6.Pico4,bi.Q6.Pico4UltraEnterprise],qp=e=>{var t;let{beforeValue:n,afterValue:i}=e;return n=null!==(t=n)&&void 0!==t?t:Array(null===i||void 0===i?void 0:i.length).fill(void 0),i||void 0===n||Hp.forEach((e=>{var t;(0,o.some)(n,{key:e})||(null===(t=n)||void 0===t||t.push({key:e,value:vp.AP.BlockFirmwareUpdates}))})),(0,p.jsx)(m.Z,{children:(0,o.zip)(n,i).map((e=>{let[t,n]=e;const i=(null===t||void 0===t?void 0:t.key)||(null===n||void 0===n?void 0:n.key),o=null===t||void 0===t?void 0:t.value,a=null===n||void 0===n?void 0:n.value;return(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",fontWeight:"bold",sx:{minWidth:78},children:i+":"}),(0,p.jsx)(Gp,{value:o}),n&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"})," ",(0,p.jsx)(Gp,{value:a})]})]},i)}))})},Yp=e=>{let{beforeValue:t,afterValue:n}=e;const o={},a={};for(const{key:i,value:p}of null!==t&&void 0!==t?t:[])o[i]=p;for(const{key:i,value:p}of null!==n&&void 0!==n?n:[])a[i]=p;const r=e=>{if(void 0!==e)return vr()().startOf("day").add(e,"minute").format("hh:mm A")},l=r(o.start),s=r(o.end),d=r(a.start),c=r(a.end),u=!l&&!s,h=!!d||!!c,g=u&&h,v=!u&&!h,C=(e,t,n)=>(0,p.jsxs)(p.Fragment,{children:[n&&(0,p.jsx)("span",{children:"No schedule"}),e&&(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(i.Z,{width:41,children:"Start: "}),(0,p.jsx)("span",{children:e})]}),t&&(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(i.Z,{width:41,children:"End: "}),(0,p.jsx)("span",{children:t})]})]});return(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(m.Z,{minWidth:120,children:C(l,s,g)}),(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"}),(0,p.jsx)(m.Z,{children:C(d,c,v)})]})},Kp=e=>{let{beforeValue:t,afterValue:n}=e;const a={},r={};for(const{key:i,value:o}of null!==t&&void 0!==t?t:[])a[i]=o;for(const{key:i,value:o}of null!==n&&void 0!==n?n:[])r[i]=o;const l=(0,wp.wS)(a),s=(0,wp.wS)(r);return(0,p.jsx)(m.Z,{spacing:.5,children:(0,o.zip)(l,s).map((e=>{var t,n,a;let[r,l]=e;const s=null!==(t=null===r||void 0===r?void 0:r.weekDay)&&void 0!==t?t:null===l||void 0===l?void 0:l.weekDay,d=null===r||void 0===r?void 0:r.window,c=null===l||void 0===l?void 0:l.window;if(!d&&!c)return null;const u=(e,t)=>{if((0,o.isUndefined)(e))return;const n=e[t];if((0,o.isUndefined)(n))return;const i=Zp.iz[n];return(0,o.isUndefined)(i)?void 0:(0,o.endsWith)(i,"+1")?{label:i.slice(0,-2),nextDay:!0}:{label:i,nextDay:!1}},h=u(d,"start"),g=u(d,"end"),v=u(c,"start"),C=u(c,"end"),x=!h&&!!v||!g&&!!C,f=!v&&!!h||!C&&!!g,b=(e,t,n,o)=>(0,p.jsxs)(p.Fragment,{children:[o&&(0,p.jsx)("span",{children:"No updates"}),e&&(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(i.Z,{width:41,children:"Start: "}),(0,p.jsx)("span",{children:e})]}),t&&(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(i.Z,{width:41,children:"End: "}),(0,p.jsxs)(i.Z,{position:"relative",children:[t,n&&(0,p.jsx)(i.Z,{position:"absolute",top:-4,right:-9.5,sx:{transform:"scale(0.8)"},children:(0,p.jsx)("sup",{children:"+1"})})]})]})]});return(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(i.Z,{width:95,flexShrink:0,children:(0,o.capitalize)(s)+":"}),(0,p.jsx)(m.Z,{minWidth:120,children:b(null===h||void 0===h?void 0:h.label,null===g||void 0===g?void 0:g.label,null!==(n=null===g||void 0===g?void 0:g.nextDay)&&void 0!==n&&n,x)}),l&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"}),(0,p.jsx)(m.Z,{children:b(null===v||void 0===v?void 0:v.label,null===C||void 0===C?void 0:C.label,null!==(a=null===g||void 0===g?void 0:g.nextDay)&&void 0!==a&&a,f)})]})]},s)}))})},Xp=new Set((0,o.values)(pe.Z)),Qp={[S.F.AnalyticsCharts]:{propertyRenderingRules:{title:{label:"Title"},type:{label:"Chart Type",renderValue:o.capitalize},unit:{label:"Unit",renderValue:o.capitalize},groupType:{label:"Group By",renderValue:o.capitalize},"filters.app":{label:"Apps",renderValue:e=>(0,o.isEmpty)(e)?"None":(0,p.jsx)(p.Fragment,{children:(0,o.map)(e,((t,n)=>(0,p.jsx)(Np,{packageName:t,divider:n<(0,o.size)(e)-1},t)))})},"filters.configuration":{label:"Configurations",renderValue:e=>(0,o.isEmpty)(e)?"None":(0,p.jsx)(p.Fragment,{children:(0,o.map)(e,((t,n)=>(0,p.jsx)(Pp,{path:(0,mp.Tg)(S.F.Configurations,t).path,divider:n<(0,o.size)(e)-1},t)))})},"filters.group":{label:"Groups",renderValue:e=>(0,o.isEmpty)(e)?"None":(0,p.jsx)(Up,{refs:(0,o.map)(e,(e=>(0,mp.Tg)(S.F.Groups,e)))})},"filters.model":{label:"Models",renderValue:e=>(0,o.isEmpty)(e)?"None":(0,p.jsx)(p.Fragment,{children:(0,o.map)(e,((t,n)=>(0,p.jsx)(Rp,{label:t,divider:n<(0,o.size)(e)-1},t)))})},"filters.tag":{label:"Tags",renderValue:e=>(0,o.isEmpty)(e)?"None":(0,p.jsx)(Up,{refs:(0,o.map)(e,(e=>(0,mp.Tg)(S.F.Tags,e)))})},includeSystemApps:{label:"Include System Apps",renderValue:Ip}}},[S.F.ApiKeys]:{propertyRenderingRules:{name:{label:"Name"},apiKeyId:{label:"ID"}}},[S.F.Certificates]:{propertyRenderingRules:{name:{label:"Nickname"},description:{label:"Description"}}},[S.F.Apps]:{dictionaryProperties:["fileRefs"],propertyRenderingRules:{...Wp,packageName:{label:"Package Name"},latestVersion:{label:"Version Code"},versionName:{label:"Version Name"},versionLabel:{label:"Version Label",renderValue:e=>(0,o.isString)(e)?e:(0,p.jsx)(kp,{children:"None"})},fileRefs:{label:"Bundled Files",renderValue:e=>(0,p.jsx)(Op,{keyValueArray:e,renderValue:e=>(0,p.jsx)("span",{children:(0,p.jsx)(Up,{refs:e})})})},deviceLimit:{label:"Device Limit",renderValue:e=>(0,ul.sr)(e,"device")},expirationBehavior:{label:"Expiration Behavior",renderValue:e=>gp.qi[e]},expirationTimestamp:{label:"Expiration Date",renderValue:e=>fp(e)}}},[S.F.Configurations]:{dictionaryProperties:["fileRefs","appProperties","customLauncherSettings.appOverrides","customLauncherSettings.videoOverrides","customLauncherSettings.webXRAppOverrides","customLauncherSettings.hiddenSettings","customLauncherSettings.customColors","targetDeviceSystemVersions","updateWindows","oculusFirmwareUpdateWindowValues","adminPinProtectedSettings"],propertyRenderingRules:{name:{label:"Name"},registrationCode:{label:"Configuration Code"},approvedApps:{label:"Deployed Apps",renderValue:e=>(0,p.jsx)(Up,{refs:e})},approvedInstantApps:{label:"Deployed Instant Apps",renderValue:e=>(0,p.jsx)(Up,{refs:e})},forcedAppRefs:{label:"Force Install Apps",renderValue:e=>(0,p.jsx)(Up,{refs:e})},appProperties:{label:"App Advanced Settings",renderValue:e=>(0,p.jsx)(Op,{keyValueArray:e,renderValue:e=>(0,o.isBoolean)(e.autoGrantPermissions)?(0,p.jsxs)("span",{children:["Automatically Grant Permissions:"," ",Ip(e.autoGrantPermissions)]}):null,renderKey:e=>(0,p.jsx)(Np,{packageName:e})})},approvedVideos:{label:"Deployed Videos",renderValue:e=>(0,p.jsx)(Up,{refs:e})},approvedWebXRApps:{label:"Deployed WebXR Links",renderValue:e=>(0,p.jsx)(Up,{refs:e})},fileRefs:{label:"Deployed Files",renderValue:e=>(0,p.jsx)(Op,{keyValueArray:e,renderValue:e=>(0,p.jsx)("span",{children:(0,p.jsx)(Up,{refs:e})})})},wifiNetworkRefs:{label:"Deployed Wi-Fi Networks",renderValue:e=>(0,p.jsx)(Up,{refs:e})},"kioskAppRef.path":{label:"Kiosk App",renderValue:e=>(0,p.jsx)(Tp,{path:e})},"kioskVideoRef.path":{label:"Kiosk Video",renderValue:e=>(0,p.jsx)(Tp,{path:e})},enableKioskShortcutMenu:{label:"Shortcut Menu",renderValue:e=>e?"Enabled":"Disabled",renderUndefined:!0},customLauncherEnabled:{label:"ManageXR Home Screen",renderValue:e=>e?"Enabled":"Disabled"},deviceExperienceMode:{label:"Device Experience Mode",renderValue:e=>vp.qu[null!==e&&void 0!==e?e:vp.w_.Default],renderUndefined:!0},kioskModeStrictness:{label:"Kiosk Mode Strictness",renderValue:e=>vp.Vn[null!==e&&void 0!==e?e:vp.IF.DEFAULT],renderUndefined:!0},useLegacyHomeScreen:{label:"Use Legacy Home Screen",renderValue:Ip},customLauncherOrder:{label:"Home Screen Order",renderValue:e=>(0,p.jsx)(Up,{refs:e})},hiddenAppRefs:{label:"Hidden VR Content",renderValue:e=>(0,p.jsx)(Up,{refs:e})},"customLauncherSettings.appOverrides":{label:"App Overrides",renderValue:e=>(0,p.jsx)(Vp,{overridesArray:e,renderKey:e=>(0,p.jsx)(Np,{packageName:e})})},"customLauncherSettings.videoOverrides":{label:"Video Overrides",renderValue:e=>(0,p.jsx)(Vp,{overridesArray:e,renderKey:e=>(0,p.jsx)(Tp,{path:(0,mp.Tg)(S.F.Videos,e).path})})},"customLauncherSettings.webXRAppOverrides":{label:"WebXR Link Overrides",renderValue:e=>(0,p.jsx)(Vp,{overridesArray:e,renderKey:e=>(0,p.jsx)(Tp,{path:(0,mp.Tg)(S.F.WebXRApps,e).path})})},"customLauncherSettings.hiddenSettings":{label:"Home Screen Hidden Settings",renderValue:e=>(0,o.isEmpty)(e)?(0,p.jsx)(kp,{children:"None"}):(0,o.map)(e,((t,n)=>{let{key:i}=t;return(0,p.jsx)(Rp,{label:vp.ZO[i],divider:n<(0,o.size)(e)-1},i)}))},"customLauncherSettings.adminPin":{label:"Admin PIN"},"customLauncherSettings.displayLanguage":{label:"Display Language",renderValue:e=>vp.Yw[e]},"customLauncherSettings.topLogoUrl":{label:"Home Screen Top Logo",renderValue:e=>(0,p.jsx)(Fp,{url:e})},"customLauncherSettings.bottomLogoUrl":{label:"Home Screen Bottom Logo",renderValue:e=>(0,p.jsx)(Fp,{url:e})},"customLauncherSettings.backgroundUrl":{label:"Home Screen Backgroun
3d",renderValue:e=>(0,p.jsx)(Fp,{url:e})},"customLauncherSettings.shortcutMenuBackgroundUrl":{label:"Shortcut Menu Background",renderValue:e=>e===vp.v4.SyncWithBackgroundUrl?"Synced with Home Screen Background":(0,p.jsx)(Fp,{url:e})},"customLauncherSettings.colorThemeRef.path":{label:"Home Screen Color Theme",renderValue:e=>(0,p.jsx)(Tp,{path:e})},"customLauncherSettings.customColors":{label:"Home Screen Custom Colors",renderValue:e=>(0,p.jsx)(Op,{renderKey:e=>Hs[e],keyValueArray:e})},"customLauncherSettings.disableShortcutMenu":{label:"Shortcut Menu",renderValue:e=>e?"Disabled":"Enabled",renderUndefined:!0},"customLauncherSettings.autoCenterUI":{label:"Auto-center Menu",renderValue:e=>e?"Disabled":"Enabled",renderUndefined:!0},"customLauncherSettings.orderedCategories":{label:"Category Order",renderValue:e=>(0,o.isEmpty)(e)?(0,p.jsx)(kp,{children:"None"}):(0,o.map)(e,((t,n)=>(0,p.jsx)(Rp,{label:t,divider:n<(0,o.size)(e)-1},t)))},"customLauncherSettings.backgroundSettings.forcePassthrough":{label:"Force Passthrough",renderValue:e=>e?"Enabled":"Disabled",renderUndefined:!0},"customLauncherSettings.backgroundSettings.backgroundStereoPacking":{label:"Background Stereoscopic Packing",renderValue:e=>e&&e!==vp.U.NONE?e===vp.U.TOP_BOTTOM?"Top / Bottom":"Left / Right":"None",renderUndefined:!0},"customLauncherSettings.backgroundSettings.shortcutMenuBackgroundStereoPacking":{label:"Shortcut Menu Background Stereoscopic Packing",renderValue:e=>e&&e!==vp.U.NONE?e===vp.U.TOP_BOTTOM?"Top / Bottom":"Left / Right":"None",renderUndefined:!0},"customLauncherSettings.backgroundSettings.backgroundRotation":{label:"Background Rotation",renderValue:e=>void 0!==e?"".concat(e,"\xb0"):"None",renderUndefined:!0},"customLauncherSettings.backgroundSettings.shortcutMenuBackgroundRotation":{label:"Shortcut Menu Background Rotation",renderValue:e=>void 0!==e?"".concat(e,"\xb0"):"None",renderUndefined:!0},"customLauncherSettings.backgroundSettings.environmentAudioVolume":{label:"Environment Audio Volume",renderValue:e=>void 0===e?"None":0===e?"Audio Off":e<=30?"Low":e<=100?"Normal":"".concat(e,"%"),renderUndefined:!0},"customLauncherSettings.backgroundSettings.environmentFileId":{label:"Environment File",renderValue:e=>e?(0,p.jsx)(Tp,{path:(0,mp.Tg)(S.F.Files,e).path}):"None",renderUndefined:!0},"kioskVideoSettings.loopKioskVideo":{label:"Loop Video",renderValue:e=>e?"On":"Off",renderUndefined:!0},"kioskVideoSettings.restartVideoAfterHmdOff":{label:"Reset Video After HMD Off",renderValue:e=>e?"On":"Off",renderUndefined:!0},"kioskVideoSettings.restartVideoAfterHmdOffDelay":{label:"Reset Video After HMD Off Delay",renderValue:e=>e+" seconds"},"androidDeviceGlobalSettings.adb_enabled":{label:"USB Debugging",renderValue:e=>"1"===e?"Enabled":"0"===e?"Disabled":"Unmanaged"},"androidUserRestrictions.no_usb_file_transfer":{label:"Disable USB File Transfer",renderValue:Ip},skipStreamingPermissionPrompt:{label:"Require Streaming Permission Prompt",renderValue:e=>void 0===e||!0===e?"No":"Yes",renderUndefined:!0},"androidUserRestrictions.no_factory_reset":{label:"Disable User Factory Reset",renderValue:Ip},android12ObbPermissionsMode:{label:"".concat(Bd.androidObb," Permission Notification"),renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.fK;return(0,vp.do)(e)}},localeLanguageTag:{label:"Pico System Language",renderValue:e=>{var t,n;return null!==(t=null===(n=(0,o.find)(vp.SH,(t=>"".concat(t.language,"-").concat(t.country)===e)))||void 0===n?void 0:n.label)&&void 0!==t?t:"Unmanaged"}},metaLocaleLanguageTag:{label:"Meta System Language",renderValue:e=>{var t,n;return null!==(t=null===(n=(0,o.find)(vp.tt,(t=>"".concat(t.language,"-").concat(t.country)===e)))||void 0===n?void 0:n.label)&&void 0!==t?t:"Unmanaged"}},timeZoneSetting:{label:"Time Zone",renderUndefined:!0,renderValue:e=>{if("AUTO"===e)return"Auto";const t=(0,o.find)(Be.vc.common.timezones,{id:e});if(!t)return"Unmanaged";return(0,M.ob)(t.id).startsWith("UTC")?"".concat(t.name," (UTC)"):t.name}},travelMode:{label:"Travel Mode",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.qo.UNMANAGED;return vp.$x[e]}},picoPerformanceMode:{label:"Performance Mode",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"UNMANAGED";return vp.Q2[e]}},picoTrackingMode:{label:"Movement Tracking",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"UNMANAGED";return vp.Ux[e]}},picoGuardianMode:{label:"Play Boundary",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"UNMANAGED";return vp.vU[e]}}
3,picoFastBoundarySetting:{label:vp.yn.QuickBoundarySetup,renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.qD.UNMANAGED;return vp.iR[e]}},picoGlobalAntiDispersionSetting:{label:vp.yn.GlobalAntiDispersion,renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.qD.UNMANAGED;return vp.iR[e]}},picoEyeProtectionModeSetting:{label:vp.yn.EyeProtectionMode,renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.qD.UNMANAGED;return vp.iR[e]}},picoScreenCaptureDisabled:{label:"Screen Capture and Casting",renderValue:e=>e?"Disabled":"Allowed"},screenCaptureDisabled:{label:"Screen Capture",renderValue:e=>e?"Disabled":"Allowed"},cameraDisabled:{label:"Camera",renderValue:e=>e?"Disabled":"Allowed"},autoTimeEnabled:{label:"Automatic Time",renderValue:e=>e?"Enforced":"Unmanaged"},autoTimeZoneEnabled:{label:"Automatic Time Zone",renderValue:e=>e?"Enforced":"Unmanaged"},blockUnknownSources:{label:"Block Unknown Sources",renderUndefined:!0,renderValue:e=>null===e||void 0===e||e?"Enforced":"Off"},blockDebuggingFeatures:{label:"Block Debugging Features",renderValue:e=>e?"Enforced":"Off"},verifyAppsEnabled:{label:"Verify Apps / Play Protect",renderUndefined:!0,renderValue:e=>null===e||void 0===e||e?"Enforced":"Off"},deviceSecurityChallengeComplexity:{label:"Passcode Complexity",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.$r.NONE;return vp.C2[e]}},maxFailedPasswordsForWipe:{label:"Wipe After Failed Attempts",renderValue:e=>"".concat(null!==e&&void 0!==e?e:0)},requiredStrongAuthTimeoutMs:{label:"Require Strong Auth Timeout",renderValue:e=>"".concat(null!==e&&void 0!==e?e:0," ms")},eyeTrackingFPS:{label:"Eye Tracking FPS",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.Fu.UNMANAGED;return vp.qs[e]}},sleepDelay:{label:"Sleep Delay",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.zW.UNMANAGED;return vp.Ez[e]}},screenOffDelay:{label:"Screen Off Delay",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.xj.UNMANAGED;return vp.J1[e]}},devicePasscode:{label:"Device Passcode",renderValue:e=>(0,p.jsx)(Dp,{label:"passcode",value:e,requiredPrivilege:"configurations"})},proximitySensorMode:{label:vp.pf,renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.v5;return vp.k9[e]},renderUndefined:!0},oculusFirmwareUpdatePolicy:{label:"Meta Device Firmware Update Policy",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp.AP.PostponeFirmwareUpdates;return vp.bL[e]}},legacyOculusFirmwareUpdatePolicy:{label:"Legacy Meta Device Firmware Update Policy",renderValue:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:vp._v;return vp.bL[e]}},targetDeviceSystemVersions:{label:"Pico Device Firmware",renderDiff:(e,t)=>(0,p.jsx)(qp,{beforeValue:e,afterValue:t})},systemUpdateType:{label:"Target Firmware Install Process",renderValue:e=>e?vp.rP[e]:"None"},"firstTimeUseAppRef.path":{label:"Tutorial App",renderValue:e=>(0,p.jsx)(Tp,{path:e})},"tutorialAppRef.path":{label:"Tutorial App",renderValue:e=>(0,p.jsx)(Tp,{path:e})},updateWindows:{label:"Content Update Schedule",renderDiff:(e,t)=>(0,p.jsx)(Kp,{beforeValue:e,afterValue:t})},oculusFirmwareUpdateWindowValues:{label:"Meta Firmware Update Window",renderDiff:(e,t)=>(0,p.jsx)(Yp,{beforeValue:e,afterValue:t})},legacyOculusFirmwareUpdateWindowValues:{label:"Legacy Meta Firmware Update Window",renderDiff:(e,t)=>(0,p.jsx)(Yp,{beforeValue:e,afterValue:t})},onlyDownloadContentDuringUpdateWindow:{label:"Updates Scheduled",renderValue:e=>e?"Scheduled":"Any time, any day"},onlyDownloadContentWhenCharging:{label:"Update Requirements",renderValue:e=>e?"Plugged in":"None"},...(0,o.chain)(vp.Hd).keyBy((e=>"".concat("disabledQfbSettings",".").concat(e))).mapValues((e=>{var t;return{label:null===(t=vp.fu[e])||void 0===t?void 0:t.title,renderUndefined:!0,renderValue:e=>e?"Disabled":"Enabled"}})).value(),sessionPasscodeComplexity:{label:"Session Passcode Complexity",renderUndefined:!0,renderValue:e=>vp.Go[null!==e&&void 0!==e?e:vp.wW]},sessionIntroWakeControllers:{label:"Session Intro Wake Controllers",renderUndefined:!0,renderValue:e=>(0,o.capitalize)(null!==e&&void 0!==e?e:vp.DJ)},sessionIntroAdjustDeviceFit:{label:"Session Intro Adjust Device Fit",renderUndefined:!0,renderValue:e=>(0,o.capitalize)(null!==e&&void 0!==e?e:vp.DJ)},enableHandTrackingByDefault:{label:"Enable Hand Tracking By Default",renderUndefined:!0,renderValue:e=>!0===e?"Enabled":"Disabled"},sessionInactivityTimeoutEnabled:{label:(0,o.startCase)(vp.j.sessionInactivityTimeoutEnabled),renderUndefined:!0,renderValue:e=>!0===e||void 0===e?"Disabled":"Enabled"},sessionInactivityTimeout:{label:vp.GD,renderUndefined:!0,renderValue:e=>"".concat(null!==e&&void 0!==e?e:vp.O4," minutes")},stationaryBoundaryByDefault:{label:"Set up boundary",renderUndefined:!0,renderValue:e=>!0===e||void 0===e?"Disabled":"Enabled"},adminPinProtectedSettings:{label:"Admin PIN Protected Settings",renderDiff:(e,t)=>(0,p.jsx)(Sp,{beforeValue:e,afterValue:t})}}},[S.F.Devices]:{propertyRenderingRules:{name:{label:"Name"},serial:{label:"Serial"},mac:{label:"MAC Address",renderValue:Vr.wo},model:{label:"Model",renderValue:e=>(0,Vr.ao)(e)},notes:{label:"Notes"},"organizationRef.path":{label:"Organization",renderValue:e=>(0,p.jsx)(Lp,{path:e})},"deviceGroupRef.path":{label:"Configuration",renderValue:e=>(0,p.jsx)(Pp,{path:e})},"groupRef.path":{label:"Group",renderValue:e=>(0,p.jsx)(Tp,{path:e})},tagRefs:{label:"Tags",renderValue:e=>(0,p.jsx)(Up,{refs:e})},pauseUpdates:{label:"Device Updates Paused",renderValue:Ip}}},[S.F.DeviceCommands]:{propertyRenderingRules:{"data.packageName":{label:"Package Name"}}},[S.F.Files]:{propertyRenderingRules:{name:{label:"Name"},description:{label:"Description"},type:{label:"Type",renderValue:e=>(0,pp.extension)(e)||"unknown"},size:{label:"Size",renderValue:e=>(0,Ad.Z)(e)}}},[S.F.Groups]:{propertyRenderingRules:{name:{label:"Name"}}},[S.F.OrganizationEnrollmentConfigs]:{propertyRenderingRules:{method:{label:"Method",renderValue:e=>ki[e]},configurationId:{label:"Configuration",renderValue:e=>(0,p.jsx)(Pp,{path:(0,mp.Tg)(S.F.Configurations,e).path})}}},[S.F.Organizations]:{propertyRenderingRules:{name:{label:"Name"},imageUrl:{label:"Profile Image",renderValue:e=>(0,p.jsx)(Fp,{url:e})},numActiveDevices:{label:"Active Devices"},numSubscriptionDeviceLicenses:{label:"Device Licenses"},billingEmail:{label:"Billing Email"},"defaultPaymentMethodRef.path":{label:"Default Payment Method",renderValue:e=>(0,p.jsx)(Tp,{path:e,capitalizeLabels:!0})}}},[S.F.PaymentMethods]:{propertyRenderingRules:{brand:{label:"Card Type",renderValue:o.capitalize},last4:{label:"Last 4"},expirationMonth:{label:"Expiration Month"},expirationYear:{label:"Expiration Year"}}},[S.F.ReleaseChannels]:{dictionaryProperties:["sharedOrganizations","sharedOrganizationExpirationSettings","sharedOrganizationDeviceLimitSettings"],propertyRenderingRules:{name:{label:"Name"},"targetRef.path":{label:"App Version",renderValue:e=>(0,p.jsx)(Tp,{path:e})},deviceModelsAdded:{label:"Device Models Added",renderDiff:(e,t)=>Ap(e,t)},deviceModelsRemoved:{label:"Device Models Removed",renderDiff:(e,t)=>Ap(e,t)},sharedOrganizations:{label:"Shared Organizations",renderValue:e=>(0,o.isEmpty)(e)?(0,p.jsx)(kp,{children:"None"}):(0,o.chain)(e).map(((t,n)=>{var i;let{key:a,value:r}=t;const l=null!==(i=r.name)&&void 0!==i?i:"[Unknown]";return(0,p.jsx)(Rp,{label:l,divider:n<(0,o.size)(e)-1},a)}
3)).value()},sharedOrganizationExpirationSettings:{label:"Expiration Date",renderDiff:(e,t)=>(0,p.jsx)(_p,{keyTypeLabel:"organization",beforeValue:e,afterValue:t})},sharedOrganizationDeviceLimitSettings:{label:"Device Limit",renderDiff:(e,t)=>(0,p.jsx)(_p,{keyTypeLabel:"organization",beforeValue:e,afterValue:t})}}},[S.F.ReleaseChannelShareCodes]:{propertyRenderingRules:{"releaseChannelRef.path":{label:"Release Channel",renderValue:e=>(0,p.jsx)(Tp,{path:e})},persistent:{label:"Multi-Use",renderValue:Ip},deviceLimit:{label:"Device Limit",renderValue:e=>(0,o.isNumber)(e)?(0,ul.sr)(e,"device"):(0,p.jsx)(kp,{children:"None"})},expirationBehavior:{label:"Expiration Behavior",renderValue:e=>gp.qi[e]},expirationTimestamp:{label:"Expiration Date",renderValue:e=>{if(!(0,o.isNumber)(e))return(0,p.jsx)(kp,{children:"None"});return e<16992576e5?yp(e):fp(e)}}}},[S.F.Subscriptions]:{propertyRenderingRules:{status:{label:"Status",renderValue:o.capitalize},tier:{label:"Tier",renderValue:o.capitalize},quantity:{label:"Devices"},period:{label:"Billing Period",renderValue:o.capitalize},"price.totalPerPeriod":{label:"Total per Billing Period",renderValue:fe}}},[S.F.SubscriptionSchedules]:{propertyRenderingRules:{quantity:{label:"Devices"},period:{label:"Billing Period",renderValue:o.capitalize},tier:{label:"Tier",renderValue:o.capitalize}}},[S.F.Tags]:{propertyRenderingRules:{name:{label:"Name"}}},[S.F.UserRoles]:{propertyRenderingRules:{name:{label:"Name"},"privileges.content":{label:"Content Privilege",renderValue:Ip},"privileges.devices":{label:"Devices Privilege",renderValue:Ip},"privileges.configurations":{label:"Configurations Privilege",renderValue:Ip},"privileges.organization":{label:"Organization Privilege",renderValue:Ip},"privileges.billing":{label:"Billing Privilege",renderValue:Ip},configurationsFullAccess:{label:"Full Configuration Access",renderValue:Ip},approvedConfigurationIds:{label:"Approved Configurations",renderDiff:(e,t,n,i)=>{const a=(e,t)=>t?"All Configurations":(0,o.isEmpty)(e)?(0,p.jsx)(kp,{children:"None"}):(0,p.jsx)(p.Fragment,{children:(0,o.map)(e,((t,n)=>(0,p.jsx)(Pp,{path:(0,mp.Tg)(S.F.Configurations,t).path,divider:n<(0,o.size)(e)-1},t)))}),r=(0,o.get)(n,"configurationsFullAccess"),l=(0,o.get)(i,"configurationsFullAccess");return(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",alignItems:"center",gap:1,children:[!(0,o.isUndefined)(e)&&a(e,r),!(0,o.isUndefined)(e)&&!(0,o.isUndefined)(t)&&(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"}),!(0,o.isUndefined)(t)&&a(t,l)]})}}}},[S.F.UserOrganizationPrivileges]:{propertyRenderingRules:{"userProfile.name":{label:"Name"},"userProfile.email":{label:"Email"},role:{label:"Role",renderValue:e=>Xp.has(e)?(0,o.capitalize)(e):e},"privileges.billing":{label:"Billing Privilege",renderValue:Ip},"privileges.content":{label:"Content Privilege",renderValue:Ip},"privileges.devices":{label:"Devices Privilege",renderValue:Ip},"privileges.organization":{label:"Organization Privilege",renderValue:Ip},"privileges.configurations":{label:"Configurations Privilege",renderValue:Ip}}},[S.F.Videos]:{propertyRenderingRules:{...Wp,type:{label:"Video Type",renderValue:e=>mc[e]},mapping:{label:"Mapping",renderValue:e=>vc[e]},display:{label:"Display",renderValue:e=>xc[e]},packing:{label:"Packing",renderValue:e=>bc[e]}}},[S.F.WebXRApps]:{propertyRenderingRules:{...Wp,url:{label:"URL"}}},[S.F.WifiNetworks]:{propertyRenderingRules:{nickname:{label:"Nickname"},ssid:{label:"SSID"},hidden:{label:"Hidden Network",renderValue:Ip},type:{label:"Network Type",renderValue:e=>Cp.hH[e]},eapMethod:{label:"EAP Method"},phase2Method:{label:"Phase 2 Authentication"},hasPassword:{label:"Has Password",renderValue:Ip},domain:{label:"Domain"},identity:{label:"Identity"},anonymousIdentity:{label:"Anonymous Identity"},hasCaCertificatePem:{label:"Has CA Certificate",renderValue:Ip},hasUserCertificatePem:{label:"Has User Certificate",renderValue:Ip},radiusCACertificateRefs:{label:"RADIUS Certificates",renderValue:e=>(0,p.jsx)(Up,{refs:e}),renderDiff:(e,t,n)=>(0,p.jsx)(zp,{beforeValue:e,afterValue:t,beforeDiff:n,renderBeforeAfter:e=>(0,p.jsx)(Up,{refs:e}),isArray:!0})},installedCACertificateRefs:{label:"Content Filtering Certificates",renderValue:e=>(0,p.jsx)(Up,{refs:e}),renderDiff:(e,t,n)=>(0,p.jsx)(zp,{beforeValue:e,afterValue:t,beforeDiff:n,renderBeforeAfter:e=>(0,p.jsx)(Up,{refs:e}),isArray:!0})},userCertificateRefs:{label:"AUTH Certificates",renderValue:e=>(0,p.jsx)(Up,{refs:e}),renderDiff:(e,t,n)=>(0,p.jsx)(zp,{beforeValue:e,afterValue:t,beforeDiff:n,renderBeforeAfter:e=>(0,p.jsx)(Up,{refs:e}),isArray:!0})},proxySettingType:{label:"Proxy Type"},proxyHost:{label:"Proxy Host"},proxyPort:{label:"Proxy Port"},proxyHostExclusionList:{label:"Proxy Host Exclusions",renderValue:e=>(0,o.isEmpty)(e)?"[None]":(0,o.join)(e,", ")},proxyPacUrl:{label:"Proxy PAC Url"}}}},Jp=(e,t)=>{var n;const i=null!==(n=(0,o.cloneDeep)(e))&&void 0!==n?n:{};return(0,o.forEach)(t,(e=>{const t=(0,o.get)(i,e);if((0,o.isObject)(t)){const n=(0,o.map)(t,((e,t)=>
3({key:t,value:e})));(0,o.set)(i,e,n)}})),up()(i,{safe:!0})},$p=e=>{let{event:t}=e;const{beforeDiff:n,afterDiff:r,targetType:l,eventType:s}=t,d=(0,a.useMemo)((()=>{var e;const{propertyRenderingRules:t={},dictionaryProperties:i}=null!==(e=Qp[l])&&void 0!==e?e:{},a=Jp(n,i),s=Jp(r,i),d={};return(0,o.forEach)(a,((e,t)=>(0,o.set)(d,[t,"beforeValue"],e))),(0,o.forEach)(s,((e,t)=>(0,o.set)(d,[t,"afterValue"],e))),(0,o.chain)(t).map(((e,t)=>d[t]?{...d[t],...e,property:t}:void 0)).compact().filter((e=>{let{property:t,beforeValue:n,afterValue:i}=e;return"deviceModelsAdded"!==t&&"deviceModelsRemoved"!==t||!(0,o.isEmpty)(Ep(n,i))})).value()}),[r,n,l]);return(0,p.jsxs)(m.Z,{padding:1,spacing:.75,width:1,children:[(0,o.isEmpty)(d)&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"No additional data"}),(0,o.map)(d,(e=>{const{label:t,renderValue:o,renderUndefined:a,renderDiff:l,property:d,beforeValue:c,afterValue:u}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1.5,children:[(0,p.jsx)(i.Z,{width:190,flexShrink:0,children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"grey.700",children:t})}),(0,p.jsx)(v.Z,{component:"span",variant:"body2",sx:{overflowWrap:"anywhere"},children:l?l(c,u,n,r):(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",alignItems:"center",gap:1,children:[s!==ap.Create&&(0,p.jsx)(Bp,{value:c,renderValue:o,renderUndefined:a}),s===ap.Update&&(0,p.jsx)(hp.Z,{fontSize:"small",color:"primary"}),s!==ap.Delete&&(0,p.jsx)(Bp,{value:u,renderValue:o,renderUndefined:a})]})})]},d)}))]})};var eh=n(15259),th=n(81735),nh=n(42809);const ih=(0,da.Cl)(),oh=(0,a.memo)((e=>{let{events:t,fetchNextEvents:n,fetchingEvents:r,fetchedAllEvents:l,query:s,height:d,renderTable:c,legacyTableHeaderProps:u}=e;const h=(0,a.useRef)(null),[g,v]=(0,a.useState)((0,o.fill)(Array(t.length),!1)),[C,x]=(0,a.useState)(!1),f=(0,a.useCallback)((()=>{v((0,o.fill)(Array(t.length),!1)),x((e=>!e))}),[t.length]),b=(0,a.useMemo)((()=>[ih.display({header:2===s.auditLogTypes.length?"User/Device":s.auditLogTypes.includes(Vu.DEVICE_EVENT)?"Device":"User",id:"name",cell:e=>{const t=e.row.original;return t.auditLogType===Vu.DEVICE_EVENT?(0,p.jsx)(op,{event:t}):(0,p.jsx)(ip,{event:t})},size:230}),ih.display({header:()=>(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",gap:3,children:[(0,p.jsx)("span",{children:"Event"}),(0,p.jsx)(fu,{label:"Expand All",value:C,onToggle:f,sx:{color:"text.secondary"}})]}),id:"event",cell:e=>{const t=e.row.original;return t.auditLogType===Vu.DEVICE_EVENT?(0,p.jsx)(Ju,{event:t}):(0,p.jsx)(lp,{event:t})},size:200}),ih.display({header:"Time",id:"time",cell:e=>{const t=e.row.original.timestamp,n=(new Date).getFullYear(),i=new Date(t).getFullYear()<n;return(0,M.i$)(t,"MMM D, ".concat(i?"YYYY":""," h:mma"))},size:150})]),[C,s.auditLogTypes,f]),y=(0,sa.b7)({columns:b,data:t,getCoreRowModel:(0,da.sC)()}),j=(0,a.useCallback)((e=>{const t=e%2===0;return{eventIndex:Math.floor(e/2),isEventRow:t}}),[]),Z=(0,a.useCallback)((e=>{let{stopIndex:i}=e;const{eventIndex:o}=j(i);!r&&!l&&t.length-o<=25&&n()}),[t.length,n,l,r,j]),w=(0,a.useRef)((e=>{}));(0,a.useEffect)((()=>{w.current()}),[C]);const[E,S]=(0,a.useState)(-1);(0,a.useEffect)((()=>{-1!==E&&(w.current(E+1),S(-1))}),[E]);const D=(0,a.useCallback)((e=>{const{eventIndex:t,isEventRow:n}=j(e);!C&&n&&(v((e=>[...(0,o.slice)(e,0,t),!e[t],...(0,o.slice)(e,t+1)])),S(e))}),[C,j]);(0,a.useEffect)((()=>{v((e=>[...(0,o.slice)(e,0,t.length),...(0,o.fill)(Array(Math.max(t.length-e.length,0)),!1)]))}),[t]);const k="event",I=(0,a.useCallback)((e=>{let{key:t,index:n,style:o,registerChild:a}=e;const{eventIndex:r,isEventRow:l}=j(n),s=y.getRowModel().rows[r];if(!s)return null;const d=C&&r%2===1?"grey.100":void 0;return l?(0,p.jsx)(th.J,{style:o,ref:a,row:s,flexColumnIds:k,hover:!C,selected:g[r],onClick:()=>D(n),sx:{cursor:C?void 0:"pointer","& > .MuiTableCell-root":{borderBottom:"unset"},backgroundColor:d}},t):(0,p.jsx)(i.Z,{style:o,ref:a,borderBottom:e=>"1px solid ".concat(e.palette.divider),paddingX:1,sx:{backgroundColor:d},children:(0,p.jsx)(qn.Z,{in:C||g[r],timeout:0,unmountOnExit:!0,sx:{width:1},children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(i.Z,{width:e=>e.iconFontSizeInt("medium")}),s.original.auditLogType===Vu.DEVICE_EVENT?(0,p.jsx)(dp,{event:s.original}):(0,p.jsx)($p,{event:s.original})]})})},t)}),[j,y,C,g,D]),A=(0,p.jsx)(eh.K,{table:y,flexColumnIds:k,...u}),R=(0,p.jsx)(nh.g,{useLegacyTableRows:!0,table:y,height:d,loading:r,rowCount:2*t.length,renderRow:I,nativeListProps:{ref:h,onRowsRendered:Z,scrollToAlignment:"start"},remeasureRowHeightsRef:w,emptyMessage:"No matching events"});return c?c({tableHeader:A,tableBody:R}):(0,p.jsxs)(i.Z,{children:[A,R]})}));var ah=n(77477);const rh=e=>{let{filter:t,onFilterChange:n,filterPlaceholder:r,filterHidden:l,endTime:s,onEndTimeChange:d,fetchingEvents:c,onRefreshClick:u}=e;const[h,g]=(0,a.useState)(t),v=(0,zn.c)((0,o.trim)(h),Be.vc.common.searchFilterTimeoutMs);(0,a.useEffect)((()=>{n(v)}),[v,n]),(0,a.useEffect)((()=>{g(t)}),[t]),(0,a.useEffect)((()=>{l&&g("")}),[l]);const[C,f]=(0,a.useState)(vr()(s)),[b,y]=(0,a.useState)(null),j=(0,a.useRef)(null);(0,a.useEffect)((()=>{const e=null===C||void 0===C?void 0:C.valueOf();e&&d((0,M.us)(e).toISOString())}),[C,d]);const Z=(0,a.useCallback)((e=>{const t=j.current;if(!t)return;const n=((e,t)=>{const n=document.createElement("canvas").getContext("2d");return n?(n.font=t,n.measureText(e).width):0})(t.value,getComputedStyle(t).font),i=parseFloat(getComputedStyle(t).paddingLeft)||0;e.nativeEvent.offsetX>n+i&&(e.preventDefault(),t.focus(),y("year"))}),[]);return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",flexGrow:1,children:[l?(0,p.jsx)(i.Z,{flexGrow:1}):(0,p.jsx)(xu,{value:h,onChange:g,sx:{flexGrow:1},TextFieldProps:{placeholder:r}}),(0,p.jsx)(ah.M,{value:C,onChange:f,label:"Jump to...",disableFuture:!0,disabled:c,selectedSections:b,onSelectedSectionsChange:y,slotProps:{textField:{inputRef:j,sx:{maxWidth:170},inputProps:{onMouseDown:Z}}}}),u&&(0,p.jsx)(ee.Z,{title:"Refresh",children:(0,p.jsx)(x.Z,{onClick:u,disabled:c,
3color:"primary",children:(0,p.jsx)(ks.Z,{})})})]})};var lh=n(30366);const sh=e=>{var t,n;let{headerContent:o,sx:r,headerGutter:l=!1,headerBackgroundSize:s=0,extraHeaderBackgroundWidth:d=0,headerBackgroundColor:c="background.paper",noHeaderBackground:u=!1,children:h}=e;const{fixedLeft:m,containerRef:g}=hd(),v=(0,a.useRef)(),C="".concat((null!==(t=null===(n=v.current)||void 0===n?void 0:n.scrollHeight)&&void 0!==t?t:0)+(l?ud.mO:0),"px"),[x,f]=(0,a.useState)(),{ref:b}=(0,Yi.y)((0,a.useCallback)((e=>{f(e.contentRect.width)}),[]));return(0,p.jsxs)(i.Z,{marginTop:-s,ref:(0,lh.l)([g,b]),sx:r,visibility:x?void 0:"hidden",children:[(0,p.jsx)(i.Z,{position:"fixed",left:0,width:1,top:"calc(".concat(ud.iU,"px + ").concat(ud.GY,")"),height:ud.mO,bgcolor:"background.default",zIndex:e=>e.zIndex.appBar-1}),(0,p.jsx)(i.Z,{ref:v,position:"fixed",left:m,width:e=>x?x+e.spacingInt(2*d):void 0,marginLeft:-d,paddingX:d,paddingTop:s,bgcolor:u?void 0:c,zIndex:e=>e.zIndex.appBar-1,children:o}),(0,p.jsx)(i.Z,{paddingTop:C,children:h})]})},dh=e=>{let{auditLogTypes:t,deviceEventsParams:n,userEventsParams:i,endTime:r}=e;const{privileges:l,organizationId:s,userRoleId:d,configurationsFullAccess:c,approvedConfigurationIds:u}=(0,w.P)(),[p,h]=(0,a.useState)([]),[m,g]=(0,a.useState)(!1),v=(0,a.useRef)(!1),[C,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)(),[y,j]=(0,a.useState)(),Z=(0,X.bo)()||l.content,E=(0,a.useMemo)((()=>{const e=(0,M.WN)(r,null===f||void 0===f?void 0:f.timestamp,null===y||void 0===y?void 0:y.timestamp);return{count:50,lastSeenUserEventId:null===f||void 0===f?void 0:f.id,lastSeenDeviceEventUUID:null===y||void 0===y?void 0:y.eventUUID,endTime:e,auditLogTypes:t,deviceEventsParams:n,userEventsParams:i}}),[t,n,r,f,y,i]),S=(0,a.useCallback)((e=>{v.current=e,g(e)}),[]),D=(0,a.useCallback)((()=>{!Z||v.current||C||(S(!0),(0,Fe.Ll)({organizationId:s},E).then((e=>{if((0,o.isEmpty)(e))x(!0);else{h((t=>[...t,...e]));const[t,n]=[(0,o.findLast)(e,(e=>e.auditLogType===Vu.USER_EVENT)),(0,o.findLast)(e,(e=>e.auditLogType===Vu.DEVICE_EVENT))];t&&b(t),n&&j(n)}})).catch((e=>{x(!0),(0,Si.yR)(e,{name:"query audit log error"})})).finally((()=>{S(!1)})))}),[Z,C,S,s,E]),k=(0,a.useCallback)((()=>{h([]),b(void 0),j(void 0),x(!1),S(!1)}),[S]);return(0,a.useEffect)((()=>{k()}),[t,n,i,r,k,d,c,u]),(0,a.useEffect)((()=>{p.length||C||v.current||D()}),[p.length,D,C]),{events:p,fetchNextEvents:D,fetchingEvents:m,fetchedAllEvents:C,refreshEvents:k,query:E}},ch=()=>{const e=Ks(),[t,n]=(0,a.useState)(""),[o,r]=(0,a.useState)((0,M.us)().toISOString()),l=(0,a.useMemo)((()=>({auditLogTypes:[Vu.USER_EVENT],userEventsParams:{userEmail:t?(0,ul.kp)(t):void 0,userId:t?(0,ul.kp)(t):void 0,targetTypes:[S.F.Configurations],targetIds:e?[e]:void 0},endTime:o})),[e,o,t]),s=dh(l);return(0,p.jsx)(oh,{...s,events:s.events,height:"window",renderTable:e=>{let{tableHeader:a,tableBody:l}=e;return(0,p.jsx)(sh,{sx:{minWidth:600},headerBackgroundSize:3,headerContent:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{spacing:2,marginBottom:4.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:y.DG.purple[600],children:"Configuration History"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",children:"View changes that users have made to this configuration over time."})]}),(0,p.jsx)(i.Z,{paddingBottom:2,children:(0,p.jsx)(rh,{filter:t,onFilterChange:n,filterPlaceholder:"Filter user events by email or API key ID",endTime:o,onEndTimeChange:r,onRefreshClick:s.refreshEvents,fetchingEvents:s.fetchingEvents})}),a]}),children:(0,p.jsx)(m.Z,{children:l})})}})};var uh=n(7961);const ph=e=>{let{featureName:t="this feature",children:n,withLockIcon:o,actionIsDowngrade:a,iconSX:r}=e;return(0,d.U5)()||a?(0,p.jsx)(p.Fragment,{children:n}):(0,p.jsx)(ee.Z,{title:"Upgrade to Premium to use ".concat(t),followCursor:!0,placement:"right",children:(0,p.jsx)(i.Z,{component:"span",sx:{cursor:"not-allowed",filter:"opacity(50%)","& > *":{pointerEvents:"none"}},children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[o&&(0,p.jsx)(uh.Z,{sx:{color:"grey.500",...r}}),n]})})})};var hh=n(4322),mh=n(68135);const gh=()=>{const e=(0,u.I0)(),{hasRequiredPrivilege:t}=(0,w.P)(),[n,r]=(0,a.useState)(!1),[l,s]=(0,a.useState)(null),d=()=>{r(!1),s(null)};return(0,p.jsxs)(i.Z,{width:189,children:[(0,p.jsx)(ph,{featureName:"templates",children:(0,p.jsx)(zi.W,{privilege:"configurations",action:"set templates",children:(0,p.jsx)(C.Z,{variant:"contained",fullWidth:!0,sx:e=>({boxShadow:2,"&:hover":{boxShadow:2},height:34,textTransform:"none",paddingRight:0,backgroundColor:n?e.palette.primary.dark:e.palette.primary.main}),onClick:e=>{s(e.currentTarget),r(!0)},endIcon:(0,p.jsx)(m.Z,{width:52,height:34,alignItems:"center",justifyContent:"center",sx:{transform:"translateX(4px)",backgroundColor:"primary.dark",borderTopRightRadius:4,borderBottomRightRadius:4},children:(0,p.jsx)(mh.Z,{fontSize:"small"})}),children:"Apply template"})})}),(0,p.jsx)(Is.Z,{anchorEl:l,open:n,onClose:d,children:(0,o.map)(Zp.Qo,(n=>(0,p.jsx)(Hi.Z,{onClick:()=>(n=>{t("configurations")&&(e(Js(Ys.U.actions.updateWindowsTemplateSet({templateId:n}))),d())})(n),children:Zp.rf[n]},n)))})]})};gh.displayName="ConfigurationContentUpdateScheduleTemplatePicker";
3const vh=e=>{let{previousUpdateWindow:t,weekDay:n}=e;const i=(0,u.I0)(),{hasRequiredPrivilege:o}=(0,w.P)();if(n===vp.VR.MONDAY)return null;return(0,p.jsx)(ph,{featureName:"update schedules",children:(0,p.jsx)(zi.W,{action:"copy update schedule",children:(0,p.jsx)(Kn.Z,{onClick:()=>{o("configurations")&&i(t?Ys.U.actions.updateWindowsTimeChanged({weekDay:n,start:t.start,end:t.end}):Ys.U.actions.updateWindowsWeekDayCleared({weekDay:n}))},variant:"body2",sx:{color:"info.main"},children:"Copy from above"})})})};vh.displayName="ConfigurationContentUpdateScheduleCopyFromAbove";const Ch=(0,a.memo)((e=>{let{options:t,value:n,onChange:r}=e;const[l,s]=(0,a.useState)(n),d=(0,De.Z)(),c=e=>{const t=r(e);s(t)},u=e=>{const{value:t,inputRef:n}=e,i=!!n&&document.activeElement===n.current,o=t===(0,wp.sS)(t);let a=t;const r=t.endsWith("+1");return r&&o&&!i&&(a=a.replace("+1","")),{valueToRender:a,isNextDay:r,isNormalized:o,isFocused:i}};return(0,p.jsx)(ph,{featureName:"update schedules",children:(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsx)(i.Z,{width:121,children:(0,p.jsx)(Ic.Z,{multiple:!1,disableClearable:!0,freeSolo:!0,options:t,value:n,inputValue:l,fullWidth:!0,onChange:(e,t)=>
3{c(t)},onBlur:e=>{const t=(0,o.get)(e,["target","value"]);(0,o.isString)(t)&&c(t)},onInputChange:(e,t)=>(e=>{s(e)})(t),renderOption:(e,t)=>{const{valueToRender:n,isNextDay:o}=u({value:t});return(0,p.jsx)(i.Z,{...e,component:"li",children:(0,p.jsxs)(v.Z,{color:"text.primary",whiteSpace:"nowrap",children:[n,o&&(0,p.jsx)("sup",{children:"+1"})]})})},renderInput:e=>{const t=e.inputProps.value,n=(0,o.get)(e,["inputProps","ref"]),{valueToRender:i,isNextDay:a,isNormalized:r,isFocused:l}=u({value:t,inputRef:n});return(0,p.jsx)(Ln.Z,{...e,variant:"outlined",inputProps:{...e.inputProps,value:i},InputProps:{...e.InputProps,endAdornment:(()=>{if(l||!a||!r)return;const e=(0,ul.Cq)(d,i,"body1"),t=e?121-e-26:7===i.length?28:26;return(0,p.jsx)(v.Z,{sx:{transform:"scale(0.75)",position:"absolute",top:3,right:t,pointerEvents:"none"},children:(0,p.jsx)("sup",{children:"+1"})})})(),sx:{height:40,color:"text.secondary",position:"relative"}}})}})})})})}));Ch.displayName="ConfigurationContentUpdateSchedulePicker";const xh=()=>{const e=(0,u.I0)(),t=Xs((e=>e.updateWindows)),{hasRequiredPrivilege:n}=(0,w.P)(),r=(0,a.useCallback)((t=>{if(!n("configurations"))return;const i=t.startValue?(0,wp.Wx)(t.startValue):void 0,o=t.endValue?(0,wp.Wx)(t.endValue):void 0;e(Js(Ys.U.actions.updateWindowsTimeChanged({weekDay:t.weekDay,start:i,end:o})))}),[e,n]),l=(0,a.useCallback)((e=>{if(!t)return;const{previousUpdateWindow:n}=(0,wp.bW)(t,e);return n.window}),[t]);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,o.map)(vp.VR,(n=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(i.Z,{width:105,children:(0,p.jsx)(v.Z,{sx:{...y.cp.inputText},children:Zp.do[n]})}),!t||(0,o.isEmpty)(t[n])?(0,p.jsx)(fh,{onAddWindowClicked:()=>{(t=>{e(Js(Ys.U.actions.updateWindowsWeekDayWindowAdded({weekDay:t})))})(n)}}):(0,p.jsx)(bh,{weekDay:n,updateWindows:t,onChange:r}),(0,p.jsx)(i.Z,{marginLeft:3,width:112,children:(0,p.jsx)(vh,{weekDay:n,previousUpdateWindow:l(n)})})]},n))),(0,p.jsx)(i.Z,{children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",marginTop:.5,children:"*In device local timezone"})})]})},fh=e=>{let{onAddWindowClicked:t}=e;return(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,height:40,children:[(0,p.jsx)(m.Z,{width:258,justifyContent:"center",children:(0,p.jsx)(v.Z,{color:"text.secondary",children:"No updates"})}),(0,p.jsx)(m.Z,{justifyContent:"center",children:(0,p.jsx)(ph,{featureName:"update schedules",children:(0,p.jsx)(zi.W,{privilege:"configurations",action:"add an update schedule",children:(0,p.jsx)(x.Z,{onClick:t,children:(0,p.jsx)(Wn.Z,{fontSize:"small",sx:{color:"action.active"}})})})})})]})},bh=e=>{let{weekDay:t,updateWindows:n,onChange:r}=e;const l=(0,u.I0)(),{hasRequiredPrivilege:s}=(0,w.P)(),d=(0,a.useCallback)(((e,t,i)=>{if(!s("configurations"))return i;const a=(0,wp.sS)(i);if((0,wp.eu)(a))return r({weekDay:e,["".concat(t,"Value")]:a}),a;const l=(0,o.get)(n,[e,t]);if(!(0,o.isNumber)(l))return i;const d=Zp.iz[l];return d||i}),[s,n,r]),c=(0,a.useCallback)(((e,t)=>{const i=(0,o.get)(n,[e,t]);if(!(0,o.isNumber)(i))return"12:00 AM";const a=(0,o.get)(Zp.iz,[i]);return a||"12:00 AM"}),[n]),h=(e,t)=>{var i;return"start"===t?Zp.EU.START:(0,wp.ak)(null===n||void 0===n||null===(i=n[e])||void 0===i?void 0:i.start)?Zp.EU.END_EXTENDED:Zp.EU.END};return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(i.Z,{children:(0,p.jsx)(Ch,{onChange:e=>d(t,"start",e),value:c(t,"start"),options:h(t,"start")})}),(0,p.jsx)(i.Z,{width:16,textAlign:"center",children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"-"})}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(Ch,{onChange:e=>d(t,"end",e),value:c(t,"end"),options:h(t,"end")})}),(0,p.jsx)(i.Z,{marginLeft:1.5,children:(0,p.jsx)(ph,{featureName:"update schedules",children:(0,p.jsx)(zi.W,{privilege:"configurations",action:"clear an update schedule",children:(0,p.jsx)(x.Z,{onClick:()=>(e=>{s("configurations")&&l(Js(Ys.U.actions.updateWindowsWeekDayCleared({weekDay:e})))})(t),children:(0,p.jsx)(pa.Z,{fontSize:"small"})})})})})]})};xh.displayName="ConfigurationContentUpdateScheduleUpdateWindows",bh.displayName="UpdateWindowSelectors",fh.displayName="NoUpdatesSelector";const yh="small",jh=()=>{var e,t;const n=(0,u.I0)(),{hasRequiredPrivilege:o}=(0,w.P)(),a=(0,De.Z)(),r=null!==(e=Xs((e=>e.onlyDownloadContentWhenCharging)))&&void 0!==e&&e,l=null!==(t=Xs((e=>e.onlyDownloadContentDuringUpdateWindow)))&&void 0!==t&&t,s=e=>e?"primary.main":"grey.600";return(0,p.jsxs)(m.Z,{minWidth:380,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",paddingRight:4,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(hh.Z,{sx:{color:s(r),transform:"rotate(90deg)"}}),(0,p.jsx)(v.Z,{variant:"body1",color:"text.primary",children:"Plugged in"})]}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-start",alignItems:"center",width:170,spacing:1,children:[(0,p.jsx)(ph,{actionIsDowngrade:r,children:(0,p.jsx)(zi.W,{privilege:"configurations",disableAutoSize:!0,children:(0,p.jsx)(ho.Z,{checked:r,onChange:()=>{o("configurations")&&n(Js(Ys.U.actions.onlyDownloadContentWhenChargingToggled()))}})})}),(0,p.jsx)(v.Z,{variant:"body1",color:"text.primary",children:"Require"})]})]}),(0,p.jsx)(Ie.Z,{sx:{marginY:2}}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",paddingRight:4,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(yi.Z,{sx:{color:s(l)},fontSize:yh}),(0,p.jsx)(v.Z,{variant:"body1",color:"text.primary",children:l?"Scheduled":"Any time, any day"})]}),(0,p.jsx)(i.Z,{width:170,children:(0,p.jsx)(ph,{featureName:"update schedules",actionIsDowngrade:l,children:(0,p.jsx)(zi.W,{privilege:"configurations",action:"change update schedule",children:(0,p.jsx)(C.Z,{variant:l?"outlined":"contained",onClick:()=>{n(Js(Ys.U.actions.updateWindowsToggled()))},fullWidth:!0,sx:{textTransform:"none"},children:l?"Remove schedule":"Set schedule"})})})})]}),l&&(0,p.jsxs)(m.Z,{marginTop:4,marginBottom:3,spacing:2.75,marginLeft:"".concat(a.spacingInt(1)+a.iconFontSizeInt(yh),"px"),children:[(0,p.jsx)(gh,{}),(0,p.jsx)(xh,{})]})]})};jh.displayName="ConfigurationContentUpdateScheduleTable";const Zh=()=>(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{spacing:2,marginBottom:4.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:y.DG.purple[600],children:"Content Update Schedule"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",children:"Restrict when devices can update apps, videos, files, and Pico firmware. By default, online devices update immediately."})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",marginBottom:2,children:"Only download and install c
3ontent when..."}),(0,p.jsx)(jh,{})]});Zh.displayName="ConfigurationTabContentUpdateSchedule";var wh=n(92392),Eh=n(23484),Sh=n(96405),Dh=n(79836),Mh=n(56890),kh=n(35855),Ih=n(53994),Ah=n(53382),Rh=n(85667);const Th=[{name:"Meta Quest",infoTooltip:"Meta devices must be in Shared Mode",customHome:!0,kioskApp:!0,kioskVideo:!0},{name:"Pico",customHome:!0,kioskApp:!0,kioskVideo:!0},{name:"Vive",customHome:!0,kioskApp:!0,kioskVideo:!0},{name:"DPVR",customHome:!0,kioskApp:!0,kioskVideo:!0},{name:"Lenovo",customHome:!0,kioskApp:!0,kioskVideo:!0},{name:"Magic Leap",customHome:!1,kioskApp:!0,kioskVideo:!1},{name:"RealWear",customHome:!1,kioskApp:!0,kioskVideo:!1},{name:"Vuzix",customHome:!1,kioskApp:!0,kioskVideo:!1},{name:"Android Phones & Tablets",customHome:!1,kioskApp:"light",kioskVideo:!1}],Ph={fontSize:11,fontWeight:600,color:y.DG.primary[200],backgroundColor:y.DG.purple[50],border:"1.5px solid ".concat(y.DG.purple[300]),borderRadius:"16px",paddingX:1.5,paddingY:.5,letterSpacing:"0.5px"},Lh=e=>"light"===e?(0,p.jsx)(i.Z,{component:"span",sx:Ph,children:"LIGHT"}):e?(0,p.jsx)(Rh.Z,{sx:{fontSize:20,color:y.DG.primary[200]}}):(0,p.jsx)(J.Z,{sx:{fontSize:20,color:y.DG.grey[400]}}),Nh={border:"1px solid",borderColor:"divider",borderRadius:1,tableLayout:"fixed","& .MuiTableCell-root":{display:"table-cell",verticalAlign:"middle"}},Uh={fontWeight:700,fontSize:12,letterSpacing:"0.6px",textTransform:"uppercase",color:y.DG.grey[900],paddingY:1.25,borderBottom:"1px solid ".concat(y.DG.grey[300]),borderRight:"1px solid ".concat(y.DG.grey[200]),"&:last-child":{borderRight:"none"}},Fh={fontSize:15,fontWeight:600,paddingY:1.5,borderRight:"1px solid ".concat(y.DG.grey[200]),"&:last-child":{borderRight:"none"}},Oh=(0,a.memo)((e=>{let{rows:t,headers:n=["Device","Custom Home","Kiosk App","Kiosk Video"],deviceColWidth:i="35%",headerSx:a=Uh,bodySx:r=Fh,showTooltips:l=!1,noWrapDevice:s=!1}=e;return(0,p.jsxs)(Dh.Z,{size:"small",sx:Nh,children:[(0,p.jsxs)("colgroup",{children:[(0,p.jsx)("col",{style:{width:i}}),(0,p.jsx)("col",{}),(0,p.jsx)("col",{}),(0,p.jsx)("col",{})]}),(0,p.jsx)(Mh.Z,{children:(0,p.jsx)(kh.Z,{sx:{backgroundColor:y.DG.grey[50]},children:(0,o.map)(n,((e,t)=>(0,p.jsx)(Ih.Z,{sx:a,align:t>0?"center":void 0,children:e},e)))})}),(0,p.jsx)(Ah.Z,{children:(0,o.map)(t,(e=>{var t,n;const i=null!==(t=e.devices)&&void 0!==t?t:e.name;return(0,p.jsxs)(kh.Z,{children:[(0,p.jsx)(Ih.Z,{sx:{...r,...s&&{whiteSpace:"nowrap"}},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,children:[(0,p.jsx)("span",{children:i}),l&&e.infoTooltip&&(0,p.jsx)(ee.Z,{title:e.infoTooltip,children:(0,p.jsx)(cc.Z,{sx:{fontSize:16,color:y.DG.grey[400],cursor:"help"}})})]})}),(0,p.jsx)(Ih.Z,{align:"center",sx:r,children:Lh(e.customHome)}),(0,p.jsx)(Ih.Z,{align:"center",sx:r,children:Lh(e.kioskApp)}),(0,p.jsx)(Ih.Z,{align:"center",sx:r,children:Lh(e.kioskVideo)})]},null!==(n=e.devices)&&void 0!==n?n:e.name)}))})]})}));Oh.displayName="DeviceSupportTable";const _h=(0,a.memo)((e=>{let{open:t,onClose:n}=e;return(0,p.jsx)(Ro.Q,{title:"Restricted Kiosk device support",open:t,onClose:n,maxWidth:"sm",customDialogWidth:680,leftActions:[(0,p.jsx)(li.Q,{href:Be.IW.supportedDevices,sx:{fontWeight:600},children:"Supported devices"},"supported-devices")],rightActions:[(0,p.jsx)(C.Z,{variant:"contained",onClick:n,disableElevation:!0,children:"Got it"},"got-it")],children:(0,p.jsxs)(m.Z,{spacing:2.5,children:[(0,p.jsx)(Oh,{rows:Th,showTooltips:!0,noWrapDevice:!0}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{fontWeight:700},children:"Important notes:"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"\u2022 Unsupported devices will automatically use Default Device Menus instead"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"\u2022 Android phones and tablets will launch Kiosk Apps on startup, but users can still exit them"}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["\u2022 Meta devices must be in"," ",(0,p.jsx)(li.Q,{href:Be.IW.qfbDeviceModes,sx:{fontWeight:600},children:"Shared Mode"})]})]})]})})}));_h.displayName="UIDeviceExperienceSupportDialog";const zh=(0,o.map)((0,o.values)((0,o.groupBy)(Th,(e=>"".concat(e.customHome,"|").concat(e.kioskApp,"|").concat(e.kioskVideo)))),(e=>({...e[0],devices:(0,o.map)(e,"name").join(", ")}
3))),Bh={...Uh,fontSize:10,paddingY:.75,paddingX:.75},Wh={...Fh,paddingY:.75,paddingX:.75,fontSize:11},Vh=(0,a.memo)((()=>(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"caption",sx:{fontWeight:600,fontSize:12,color:y.DG.grey[700]},children:"Open full device support table \u203a"}),(0,p.jsx)(Oh,{rows:zh,headers:["Device","Home","App","Video"],deviceColWidth:"40%",headerSx:Bh,bodySx:Wh})]})));Vh.displayName="DeviceSupportCompactTable";var Gh=n(2199);const Hh=e=>{var t,n,o,a;let{option:r,handleChange:l,selected:s,height:d,width:c,compact:u}=e;const h=r.disabled?y.DG.grey[500]:s===r.value?y.DG.white:y.DG.purple[700],g=s===r.value?y.DG.purple[700]:"transparent",x=s===r.value?y.DG.purple[700]:y.DG.grey[50],f=(null!==(t=r.paddingOverride)&&void 0!==t?t:r.label)?"12px 8px 8px 8px":"8px",b=u?{width:100,fontSize:13,maxWidth:100}:void 0;return(0,p.jsx)(ee.Z,{title:r.disabled&&null!==(n=r.disabledTooltip)&&void 0!==n?n:"",followCursor:!0,placement:"right",children:(0,p.jsx)(i.Z,{sx:{cursor:r.disabled?"not-allowed":"auto"},children:(0,p.jsx)(C.Z,{sx:{backgroundColor:g,color:h,height:d,width:c,"&:hover":{backgroundColor:x,border:"1px solid ".concat(y.DG.grey[500])},border:"1px solid ".concat(y.DG.grey[400]),borderRadius:"4px"},disabled:r.disabled,onClick:e=>(e=>{e.stopPropagation(),l(r.value)})(e),children:(0,p.jsxs)(m.Z,{gap:null!==(o=r.spacing)&&void 0!==o?o:1.5,sx:{padding:f,marginTop:0},alignItems:"center",children:[(0,p.jsx)(i.Z,{sx:{borderWidth:"2px",borderColor:y.DG.grey[300],borderStyle:null!==(a=r.borderStyle)&&void 0!==a?a:"solid",borderRadius:"4px"},children:r.imageBox}),r.label&&(0,p.jsx)(v.Z,{variant:"body2",sx:{textTransform:"none",color:h,maxWidth:c-16,wordWrap:"break-word",textWrap:"wrap",...b},children:r.label})]})})})},r.value)},qh=e=>{let{onChange:t,options:n,value:i,height:r,width:l,compact:s=!1}=e;const d=null!==r&&void 0!==r?r:100,c=null!==l&&void 0!==l?l:150,u=(0,a.useCallback)((e=>{t(e)}),[t]),h=s?1:2;return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",children:(0,p.jsx)(Gh.Z,{variant:"text",sx:{alignItems:"center"},children:(0,p.jsx)(m.Z,{direction:"row",spacing:h,children:(0,o.map)(n,(e=>(0,p.jsx)(Hh,{option:e,handleChange:u,selected:i,height:d,width:c,compact:s},e.value)))})})})},Yh=e=>{let{onOpenDialog:t,dialogOpen:n}=e;const[o,r]=(0,a.useState)(!1),l=(0,a.useCallback)((e=>{e.stopPropagation(),r(!1),t()}),[t]),s=(0,a.useCallback)((e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),r(!1),t())}),[t]);return(0,p.jsx)(i.Z,{sx:{borderTop:"1px solid ".concat(y.DG.grey[200]),paddingTop:1,marginTop:"auto"},children:(0,p.jsx)(ee.Z,{open:o&&!n,onOpen:()=>!n&&r(!0),onClose:()=>r(!1),title:(0,p.jsx)(Vh,{}),disableInteractive:!1,placement:"bottom-start",componentsProps:{tooltip:{onClick:l,sx:{bgcolor:y.DG.white,border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)",maxWidth:440,padding:1.5,cursor:"pointer"}}},PopperProps:{modifiers:[{name:"offset",options:{offset:[-6,-36]}}]},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",tabIndex:0,role:"button","aria-label":"View compatible devices",onClick:l,onKeyDown:s,sx:{cursor:"pointer",color:y.DG.grey[800],borderRadius:.5,"&:hover":{color:y.DG.purple[700]},"&:focus-visible":{outline:"2px solid ".concat(y.DG.purple[700]),outlineOffset:2}},children:[(0,p.jsx)(v.Z,{variant:"caption",color:"inherit",children:"Compatible devices only"}),(0,p.jsx)(si.Z,{sx:{fontSize:16,color:"inherit",marginLeft:.5}})]})})})},Kh=()=>(0,p.jsx)(i.Z,{sx:{borderTop:"1px solid ".concat(y.DG.grey[200]),paddingTop:1,marginTop:"auto"},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"caption",color:"textSecondary",children:"Supported on all devices (Quest requires Individual Mode)\xa0"}),(0,p.jsx)(ci,{helpText:"Meta devices enrolled via Meta Horizon managed services require Individual Mode to use Default Device Menus. Meta device modes (Shared Mode and Individual Mode) have different settings and restrictions.",url:Be.IW.qfbDeviceModes})]})}),Xh=(0,a.memo)((e=>{let{deviceExperienceMode:t,approvedAppRefs:n,approvedVideoRefs:i,approvedInstantAppRefs:r,title:l,demo:s=!1,handleDeviceExperienceModeChange:c}=e;const u=(0,d.Vp)(),[h,g]=(0,a.useState)(!1),C=(0,o.isEmpty)(n)&&(0,o.isEmpty)(r)||s&&t!==vp.w_.Kiosk,x=(0,o.isEmpty)(i)||s&&t!==vp.w_.KioskVideo,f=s&&t!==vp.w_.HomeScreen||
3!(0,k.WP)(u,k.QV.Premium),b=s&&t!==vp.w_.Default,y=(0,a.useCallback)((e=>{c&&(e===bi.Zb.INDIVIDUAL?c(vp.w_.Default):e===bi.Zb.SHARED&&t===vp.w_.Default&&(f?C?x||c(vp.w_.KioskVideo):c(vp.w_.Kiosk):c(vp.w_.HomeScreen)))}),[t,f,C,x,c]),j=(0,a.useCallback)((()=>{g(!0)}),[]),Z=(0,a.useCallback)((()=>{g(!1)}),[]),w=(0,a.useMemo)((()=>{const e={borderStyle:"none",spacing:0,paddingOverride:"12px 0px 8px"};return[{value:vp.w_.HomeScreen,label:"Custom Home",imageBox:(0,p.jsx)(wh.Z,{}),disabled:f,disabledTooltip:"Upgrade to Premium to use this feature",...e},{value:vp.w_.Kiosk,label:"Kiosk App",imageBox:(0,p.jsx)(Eh.Z,{}),disabled:C,disabledTooltip:"Lock devices into a single application. To use Kiosk App, first add an app to your configuration",...e},{value:vp.w_.KioskVideo,label:"Kiosk Video",imageBox:(0,p.jsx)(Sh.Z,{}),disabled:x,disabledTooltip:"Lock devices into a single video. To use Kiosk Video, first add a video to your configuration",...e}]}),[f,C,x]),E=(0,a.useMemo)((()=>[{value:bi.Zb.SHARED,label:"Restricted Kiosk",disabled:C&&x&&f,children:(0,p.jsxs)(m.Z,{spacing:2,sx:{flex:1},children:[(0,p.jsx)(qh,{width:108,height:60,options:w,value:t,onChange:e=>{c&&c(e)},compact:!0}),(0,p.jsx)(Yh,{onOpenDialog:j,dialogOpen:h})]})},{value:bi.Zb.INDIVIDUAL,label:"Default Device Menus",subtitle:"Use the native menus that come with your devices out of the box",disabled:b,children:(0,p.jsx)(Kh,{})}]),[t,b,f,C,x,c,j,w,h]);return(0,p.jsxs)(m.Z,{sx:s?{pointerEvents:"none"}:void 0,children:[l&&(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",sx:{marginBottom:2},children:l}),(0,p.jsx)(Bi,{options:E,value:(0,$i.eH)(t),onChange:e=>y(e),privilege:"configurations",width:420}),(0,p.jsx)(_h,{open:h,onClose:Z})]})}));Xh.displayName="UIDeviceExperienceToolbar";const Qh=e=>{if(e&&e!==vp.U.NONE)return e===vp.U.LEFT_RIGHT?"horizontal":e===vp.U.TOP_BOTTOM?"vertical":void 0},Jh=e=>e&&e!==vp.U.NONE?"fill":"cover";let $h;!function(e){e.mxrBungalow="MXR_BUNGALOW"}($h||($h={}));const em={[$h.mxrBungalow]:"mxr-bungalow.mxrus"},tm={[$h.mxrBungalow]:"mxr_env_preview.jpg"},nm={[$h.mxrBungalow]:"ManageXR Default 3D Environment"},im=$h.mxrBungalow,om=e=>{const t=(0,z.T)("defaultEnvironmentFileVersions"),n=null===t||void 0===t?void 0:t.MXR_BUNGALOW,{documents:i}=(0,E.jV)(S.F.DefaultEnvironmentFiles,{filter:(0,a.useCallback)((t=>!(0,o.isUndefined)(e)&&(e===im&&(t.environmentId===e&&t.versionCode===n))),[e,n])});if((0,o.isEmpty)(i))return;const r=(0,o.map)(i,(e=>e.url))[0];return r?r.replace(em[im],tm[im]):void 0};var am=n(78973),rm=n(48136),lm=n(16788);const sm=e=>{var t,n,i;const r=(0,E.Ev)(S.F.Apps,(0,a.useMemo)((()=>(0,o.map)(null===e||void 0===e?void 0:e.approvedApps,"id")),[null===e||void 0===e?void 0:e.approvedApps])),l=(0,E.Ev)(S.F.WebXRApps,(0,a.useMemo)((()=>(0,o.map)(null===e||void 0===e?void 0:e.approvedWebXRApps,"id")),[null===e||void 0===e?void 0:e.approvedWebXRApps])),s=(0,E.Ev)(S.F.Videos,(0,a.useMemo)((()=>(0,o.map)(null===e||void 0===e?void 0:e.approvedVideos,"id")),[null===e||void 0===e?void 0:e.approvedVideos])),d=(0,E.Ev)(S.F.InstantApps,(0,a.useMemo)((()=>(0,o.map)(null===e||void 0===e?void 0:e.approvedInstantApps,"id")),[null===e||void 0===e?void 0:e.approvedInstantApps])),c=Id(),u=null===e||void 0===e||null===(t=e.customLauncherSettings)||void 0===t?void 0:t.appOverrides,p=null===e||void 0===e||null===(n=e.customLauncherSettings)||void 0===n?void 0:n.webXRAppOverrides,h=null===e||void 0===e||null===(i=e.customLauncherSettings)||void 0===i?void 0:i.videoOverrides;return(0,a.useMemo)((()=>[...(0,o.map)(r,(e=>({...e,ref:(0,mp.Tg)(S.F.Apps,e.id),overrides:null===u||void 0===u?void 0:u[e.packageName],overridesKey:"appOverrides",overrideId:e.packageName,iconUrlStorageId:e.packageName,contentTypeLabel:"App",sharedAppHasExpired:(0,Vs.IR)(e)}))),...(0,o.map)(d,(e=>{var t,n,i;return{...e,categories:null===(t=c[e.id])||void 0===t||null===(n=t.apps[0])||void 0===n?void 0:n.categories,iconUrl:null!==(i=e.appIconUrl)&&void 0!==i?i:e.iconUrl,ref:(0,mp.Tg)(S.F.InstantApps,e.id),overrides:null===u||void 0===u?void 0:u[e.id],overridesKey:"appOverrides",overrideId:e.id,iconUrlStorageId:"instantApps.".concat(e.id),contentTypeLabel:"Ap
3p"}})),...(0,o.map)(l,(e=>({...e,ref:(0,mp.Tg)(S.F.WebXRApps,e.id),overrides:null===p||void 0===p?void 0:p[e.id],overridesKey:"webXRAppOverrides",overrideId:e.id,iconUrlStorageId:"webXRApps.".concat(e.id),contentTypeLabel:"WebXR Link"}))),...(0,o.map)(s,(e=>({...e,ref:(0,mp.Tg)(S.F.Videos,e.id),overrides:null===h||void 0===h?void 0:h[e.id],overridesKey:"videoOverrides",overrideId:e.id,iconUrlStorageId:"videos.".concat(e.id),contentTypeLabel:"Video"})))]),[u,r,d,s,l,h,p,c])},dm=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{excludeHidden:n=!1,visibleAndOrdered:i=!1}=t,{approvedApps:a,approvedInstantApps:r,approvedWebXRApps:l,approvedVideos:s,customLauncherSettings:d,hiddenAppRefs:c}=e||{},p=null===d||void 0===d?void 0:d.orderedCategories,h=(0,u.v9)((e=>{if(i&&void 0!==p)return p;const t=(0,o.chain)(a).filter((e=>!n||!(0,o.find)(c,e))).map((t=>{var n,i,o;const a=e.firestore.data.apps.data[t.id];if(!a)return[];const r=null===d||void 0===d||null===(n=d.appOverrides)||void 0===n||null===(i=n[a.packageName])||void 0===i?void 0:i.categories;return null!==(o=null!==r&&void 0!==r?r:a.categories)&&void 0!==o?o:[]})).flatten().value(),u=(0,o.chain)(r).filter((e=>!n||!(0,o.find)(c,e))).map((t=>{var n,i,a;const r=(0,o.find)(e.firestore.data.apps.data,(e=>!!e.instantAppRef&&e.instantAppRef.id===t.id));if(!r)return[];const l=null===d||void 0===d||null===(n=d.appOverrides)||void 0===n||null===(i=n[r.instantAppRef.id])||void 0===i?void 0:i.categories;return null!==(a=null!==l&&void 0!==l?l:r.categories)&&void 0!==a?a:[]})).flatten().value(),h=(0,o.chain)(l).filter((e=>!n||!(0,o.find)(c,e))).map((t=>{var n,i,o;const a=e.firestore.data.webXRApps.data[t.id];if(!a)return[];const r=null===d||void 0===d||null===(n=d.webXRAppOverrides)||void 0===n||null===(i=n[a.id])||void 0===i?void 0:i.categories;return null!==(o=null!==r&&void 0!==r?r:a.categories)&&void 0!==o?o:[]})).flatten().value(),m=(0,o.chain)(s).filter((e=>!n||!(0,o.find)(c,e))).map((t=>{var n,i,o;const a=e.firestore.data.videos.data[t.id];if(!a)return[];const r=null===d||void 0===d||null===(n=d.videoOverrides)||void 0===n||null===(i=n[a.id])||void 0===i?void 0:i.categories;return null!==(o=null!==r&&void 0!==r?r:a.categories)&&void 0!==o?o:[]})).flatten().value();return(0,o.chain)([t,u,h,m]).flatten().uniq().sort(((e,t)=>
3i?(0,ze.bL)(e,t):e.localeCompare(t))).value()}));return h};var cm=n(87287),um=n.n(cm);const pm=e=>{const[,,t]=um().hex.hsv(e);return{color:t<25?"#ffffff":"#000000",opacity:t<25?.25:.1}},hm=(e,t)=>{const[n,i,o]=um().hex.rgb(e);return"rgba(".concat(n,", ").concat(i,", ").concat(o,", ").concat(t,")")};var mm=n(18356),gm=n.n(mm),vm=n(62070);const Cm=12,xm=(0,a.memo)((e=>{var t,n,o,r,l,s,d,c,u,h,g,C,x,f,b,y,j,Z;let{colors:E,contentWithOverrides:S,draggedId:D,index:M,onDragStart:k,onDragHover:I,onDragEnd:A,width:R,textContainerHeight:T,customLauncherSettings:P,disableDrag:L=!1}=e;const{privileges:N}=(0,w.P)(),U=null===(t=null===P||void 0===P||null===(n=P.librarySettings)||void 0===n||null===(o=n.cardSettings)||void 0===o?void 0:o.showTitle)||void 0===t||t,F=null===(r=null===P||void 0===P||null===(l=P.librarySettings)||void 0===l||null===(s=l.cardSettings)||void 0===s?void 0:s.showContentType)||void 0===r||r,O=null!==(d=null===P||void 0===P||null===(c=P.librarySettings)||void 0===c||null===(u=c.cardSettings)||void 0===u?void 0:u.cardStyle)&&void 0!==d?d:vp.FW,_=null!==(h=null===P||void 0===P||null===(g=P.librarySettings)||void 0===g||null===(C=g.cardSettings)||void 0===C?void 0:C.horizontalTextAlignment)&&void 0!==h?h:vp.o9,z=(0,$i.kP)(_),B=_.toLowerCase(),W=O===vp.In.NO_PADDING&&(F||U)?4:0,V=R-24-2*W,G=(0,a.useRef)(null),H=O===vp.In.PADDING?R:R-24,q=R+T-(O===vp.In.PADDING?0:Cm)-(O===vp.In.PADDING||U||F?0:Cm),Y=O===vp.In.PADDING?"".concat(Cm,"px"):U||F?"0 0 ".concat(Cm,"px"):"0px",K=O===vp.In.PADDING?0:"".concat(Cm,"px ").concat(Cm,"px 0"),X=R-24,{dragRef:Q,dropRef:J,isDragging:$}=(0,lm.RB)({id:S.ref.path,index:M,dndType:"content",draggedId:D,onDragStart:k,onDragHover:I,onDragEnd:A});(0,a.useLayoutEffect)((()=>{G.current&&gm()(G.current,{clamp:2})}),[U,$]);const ee=N.configurations&&!L,te=S.sharedAppHasExpired?(0,Dr.$n)(E.input,.15):E.input,ne=O===vp.In.NO_BACKGROUND?"#00000000":te,ie=S.sharedAppHasExpired?.6:1;return(0,p.jsx)(i.Z,{ref:ee?J:void 0,width:H,height:q,margin:K,children:(0,p.jsx)(i.Z,{ref:ee?Q:void 0,width:1,height:1,borderRadius:1,overflow:"hidden",position:"relative",padding:Y,bgcolor:$?void 0:ne,border:$?"3px dashed ".concat(te):void 0,sx:{cursor:$?"grabbing":ee?"grab":"auto","& .displayOnHover":{display:"none"},"&:hover .displayOnHover":{display:"unset"}},children:!$&&(0,p.jsxs)(m.Z,{spacing:.5,color:E.inputText,height:1,children:[(0,p.jsxs)(i.Z,{sx:{position:"relative",width:X,height:X,flexShrink:0},children:[(0,p.jsx)(i.Z,{component:"img",src:null!==(x=null===(f=S.overrides)||void 0===f?void 0:f.iconUrl)&&void 0!==x?x:S.iconUrl,sx:{position:"absolute",top:0,left:0,width:1,height:1,objectFit:"contain",opacity:ie}}),S.sharedAppHasExpired&&(0,p.jsxs)(m.Z,{spacing:.25,sx:{position:"absolute",bottom:e=>e.spacing(1),left:"50%",transform:"translateX(-50%)",alignItems:"center",color:E.menuText,backgroundColor:(0,Dr.Fq)(E.menuBackground,ie),borderRadius:2.5,paddingX:1.3,paddingY:.5},children:[(0,p.jsx)(vm.Z,{color:"inherit",sx:{fontSize:"0.9rem"}}),(0,p.jsx)(v.Z,{color:"inherit",variant:"caption",fontSize:"0.675rem",lineHeight:1.2,children:"Expired"})]})]}),(0,p.jsxs)(m.Z,{paddingX:"".concat(W,"px"),spacing:.5,height:T,alignItems:z,children:[U&&(0,p.jsx)(v.Z,{ref:G,title:null!==(b=null===(y=S.overrides)||void 0===y?void 0:y.title)&&void 0!==b?b:S.title,variant:"body2",fontSize:"0.75rem",textAlign:B,lineHeight:1.2,maxWidth:V,flexGrow:1,sx:{opacity:ie,wordBreak:"break-word"},children:null!==(j=null===(Z=S.overrides)||void 0===Z?void 0:Z.title)&&void 0!==j?j:S.title}),F&&(0,p.jsx)(v.Z,{variant:"caption",fontSize:"0.675rem",textAlign:B,lineHeight:1.2,maxWidth:V,sx:{opacity:ie},children:S.contentTypeLabel})]})]})})})})),fm={1:{cardPercent:.4,spacingPercent:.05},2:{cardPercent:.38,spacingPercent:.05},3:{cardPercent:.26,spacingPercent:.03},4:{cardPercent:.2,spacingPercent:.02},5:{cardPercent:.175,spacingPercent:.01}},bm=e=>{var t,n,r,l,s,d,c,u,h,g,x,f,b,y,j,Z,w,E,S,D,M,k;let{configuration:I,colors:A,onAppMoved:R,disableDrag:T=!1}=e;const P=(0,De.Z)(),{approvedApps:L,approvedWebXRApps:N,approvedVideos:U,approvedInstantApps:F,hiddenAppRefs:O,customLauncherOrder:_,customLauncherSettings:z}=I,B=null!==(t=null===z||void 0===z||null===(n=z.librarySettings)||void 0===n||null===(r=n.panelSettings)||void 0===r?void 0:r.categoriesPosition)&&void 0!==t?t:vp.Bb,W=null!==(l=null===z||void 0===z||null===(s=z.librarySettings)||void 0===s||null===(d=s.gridSettings)||void 0===d?void 0:d.cardsPerRow)&&void 0!==l?l:vp.x,V=null!==(c=null===z||void 0===z||null===(u=z.librarySettings)||void 0===u||null===(h=u.gridSettings)||void 0===h?void 0:h.horizontalAlignment)&&void 0!==c?c:vp.t0,G=null!==(g=null===z||void 0===z||null===(x=z.librarySettings)||void 0===x||null===(f=x.gridSettings)||void 0===f?void 0:f.verticalAlignment)&&void 0!==g?g:vp.u8,H=null===(b=null===z||void 0===z||null===(y=z.librarySettings)||void 0===y||null===(j=y.cardSettings)||void 0===j?void 0:j.showContentType)||void 0===b||b,q=null===(Z=null===z||void 0===z||null===(w=z.librarySettings)||void 0===w||null===(E=w.cardSettings)||void 0===E?void 0:E.showTitle)||void 0===Z||Z,Y=sm(I),K=dm(I,{visibleAndOrdered:!0}
3),[X,Q]=(0,a.useState)([]);(0,a.useEffect)((()=>{!(0,o.isEmpty)(_)&&_?Q(_):Q((0,o.differenceBy)([...null!==L&&void 0!==L?L:[],...null!==F&&void 0!==F?F:[],...null!==U&&void 0!==U?U:[],...null!==N&&void 0!==N?N:[]],null!==O&&void 0!==O?O:[],"path"))}),[L,U,N,_,O,F]);const[J,$]=(0,a.useState)();(0,a.useEffect)((()=>{$((e=>(0,o.includes)(K,e)?e:void 0))}),[K]);const ee=(0,a.useMemo)((()=>(0,o.chain)(X).map((e=>{var t,n;const i=(0,o.find)(Y,(t=>t.ref.path===e.path));return!J||(0,o.includes)(null!==(t=null===i||void 0===i||null===(n=i.overrides)||void 0===n?void 0:n.categories)&&void 0!==t?t:null===i||void 0===i?void 0:i.categories,J)?i:void 0})).compact().value()),[Y,X,J]),te=(0,a.useMemo)((()=>ee.length%W),[W,ee.length]),{draggedId:ne,onDragStart:ie,onDragHover:oe,onDragEnd:ae}=(0,lm.gq)({order:X,getId:e=>e.path,setOrder:Q,onReorder:e=>null===R||void 0===R?void 0:R(e)}),[,re]=(0,am.L)({accept:["content"]}),le=700/1.56,se=(0,a.useMemo)((()=>le-(B===vp.lg.TOP?60:0)),[B,le]),de=(0,a.useMemo)((()=>700-(B===vp.lg.LEFT?165:0)),[B]),ce=pm((0,ul.B$)(A.menuBackground)),ue=hm(ce.color,ce.opacity),pe=(0,p.jsx)(p.Fragment,{children:(0,o.map)([void 0,...K],(e=>(0,p.jsx)(C.Z,{color:"inherit",onClick:()=>$(e),sx:{paddingX:2,minWidth:B===vp.lg.TOP?"unset":"150px",maxWidth:B===vp.lg.TOP?"unset":"150px",textTransform:"none",justifyContent:"flex-start",borderRadius:3,backgroundColor:J===e?ue:"none","&:hover":{backgroundColor:J===e?ue:"none"}},children:(0,p.jsx)(i.Z,{sx:{overflow:"hidden",textOverflow:"ellipsis",width:"100%",textAlign:"left"},children:(0,o.isUndefined)(e)?(0,o.isEmpty)(K)?"Library":"All":e})},void 0===e?"__library_all_filter__":"__category__".concat(e))))}),he={boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)",position:"relative",zIndex:1,alignItems:"center",bgcolor:A.menuBackground,color:A.menuText},me=(0,p.jsx)(m.Z,{direction:"row",paddingTop:1.5,paddingBottom:1.5,paddingX:4,sx:P.mixins.horizontalScroll,width:"100%",height:60,...he,children:pe}),ge=(0,p.jsx)(m.Z,{direction:"column",paddingY:2,sx:P.mixins.verticalScroll,height:le,width:165,...he,children:pe}),ve=Math.floor((null!==(S=null===(D=fm[W])||void 0===D?void 0:D.spacingPercent)&&void 0!==S?S:0)*de),Ce=Math.floor((null!==(M=null===(k=fm[W])||void 0===k?void 0:k.cardPercent)&&void 0!==M?M:0)*de),xe=(q?30:0)+(H?20:0),fe=(de-Ce*W-ve*(W-1))/2,be=(0,a.useMemo)((()=>{const e=se-40,t=Ce+xe;return Math.floor(e/(t+1.5*ve))}),[xe,se,ve,Ce]),ye=ee.length-W*be<=0&&G===vp.s1.CENTER,je=ee.length,Ze=te,{leadingCols:we,trailingCols:Ee}=((e,t,n)=>{if(0===t)return{leadingCols:0,trailingCols:0};const i=e-t;if(n===vp.T.LEFT)return{leadingCols:0,trailingCols:i};if(n===vp.T.RIGHT)return{leadingCols:i,trailingCols:0};const o=Math.floor(i/2);return{leadingCols:o,trailingCols:i-o}})(W,Ze,V),Se=Ze>0?je-Ze:je,Me=Ze>0?Math.floor((je-Ze)/W)+1:0,ke=1.5*ve/2,Ie=Ce+xe+2*ke;return(0,p.jsx)(i.Z,{borderRadius:4,overflow:"hidden",width:700,children:(0,p.jsxs)(m.Z,{direction:B===vp.lg.LEFT?"row":"column",children:[B===vp.lg.TOP?me:B===vp.lg.LEFT?ge:"",(0,p.jsxs)(i.Z,{ref:re,bgcolor:A.menuBackground,width:de,height:se,paddingBottom:0,sx:P.mixins.verticalScroll,paddingX:"".concat(fe,"px"),paddingY:"".concat(ye?0:20,"px"),alignContent:ye?"center":"flex-start",children:[(0,p.jsxs)(i.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(".concat(W,", ").concat(Ce,"px)"),columnGap:"".concat(ve,"px"),rowGap:0},children:[(0,o.map)(ee,((e,t)=>{const{gridRow:n,gridColumn:o}=((e,t,n,i,o)=>{if(0===i)return{gridRow:Math.floor(e/n)+1,gridColumn:"".concat(e%n+1," / span 1")};const a=t-i;if(e<a)return{gridRow:Math.floor(e/n)+1,gridColumn:"".concat(e%n+1," / span 1")};const r=e-a;return{gridRow:Math.floor(a/n)+1,gridColumn:"".concat(o+r+1," / span 1")}})(t,je,W,Ze,we),a=ye||t>=W?ke:0,r=Ze>0&&t>=Se&&0===a?ke:0;return(0,p.jsx)(i.Z,{sx:{gridRow:n,gridColumn:o,paddingTop:"".concat(a+r,"px"),paddingBottom:"".concat(ke,"px")},children:(0,p.jsx)(xm,{colors:A,contentWithOverrides:e,draggedId:ne,index:t,onDragHover:oe,onDragStart:ie,onDragEnd:ae,disableDrag:T||!!J,width:Ce,textContainerHeight:xe,customLauncherSettings:z})},e.ref.path)})),Ze>0&&(V===vp.T.CENTER||V===vp.T.RIGHT)&&we>0&&(0,p.jsx)(rm.G,{accept:["content"],onHover:()=>oe(ee.length-te),sx:{gridRow:Me,gridColumn:"1 / span ".concat(we),minHeight:Ie,alignSelf:"stretch"}},"home-preview-last-row-leading-drop"),Ze>0&&(V===vp.T.CENTER||V===vp.T.LEFT)&&Ee>0&&(0,p.jsx)(rm.G,{accept:["content"],onHover:()=>oe(-1),sx:{gridRow:Me,gridColumn:"".concat(we+Ze+1," / span ").concat(Ee),minHeight:Ie,alignSelf:"stretch"}},"home-preview-last-row-trailing-drop")]}),(0,p.jsx)(v.Z,{color:A.menuText,display:(0,o.isEmpty)(ee)?"initial":"none",children:"No visible content"})]})]})})},ym=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 -2 18 20",children:(0,p.jsx)("path",{d:"M2 14.9H0V13.1H2V14.9ZM5.2 13.2H3.2V15H5.2V13.2ZM8.4 13.2H6.4V15H8.4V13.2ZM9.5 3.1H3.5L5.4 1.2L4.2 0L0.2 4L4.2 8L5.4 6.8L3.5 4.9H9.5C11.8 4.9 13.7 6.8 13.7 9.1C13.7 11.4 11.8 13.3 9.5 13.3V15.1C12.8 15.1 15.4 12.5 15.4 9.2C15.4 5.9 12.8 3.1 9.5 3.1Z"})}),jm=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 18 20",children:(0,p.jsx)("path",{d:"M9.90005 11.6H11.7V15.8C11.7 16.3 11.3 16.7 10.8 16.7H6.00005V18.6C6.00005 19.1 5.40005 19.5 4.90005 19.2L0.600049 16.7C0.400049 16.6 0.300049 16.3 0.300049 16.1V15.9V1.9V1.6C0.300049 1.1 0.700048 0.699997 1.20005 0.699997H10.8C11.3 0.699997 11.7 1.1 11.7 1.6V5.8H9.90005V2.5H3.30005L5.60005 3.9C5.80005 4 5.90005 4.3 5.90005 4.5V14.9H9.80005V11.6H9.90005ZM14.3 5.3L13.1 6.5L14.4 7.8H7.80005V9.6H14.4L13.1 10.9L14.3 12.1L17.7001 8.7L14.3 5.3Z"})}),Zm=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 18 20",children:(0,p.jsx)("path",{d:"M13.1 4.7L11.9 6C13.1 7.1 13.8 8.7 13.8 10.4C13.8 13.6 11.2 16.3 7.9 16.3C4.6 16.3 2
313.7 2 10.4C2 7.3 4.4 4.7 7.5 4.5L6.1 6L7.3 7.2L10.9 3.6L7.4 0L6.2 1.2L7.8 2.8C3.7 3 0.5 6.3 0.5 10.4C0.5 14.6 3.9 18 8.1 18C12.3 18 15.7 14.6 15.7 10.4C15.6 8.2 14.7 6.2 13.1 4.7Z"})}),wm=(0,a.memo)((e=>{var t,n,a,r,l,s;let{configuration:d,colors:c}=e;const u=e=>{let{label:t,Icon:n,iconPlacement:i="start"}=e;return(0,p.jsxs)(m.Z,{paddingX:3,paddingY:2.5,direction:"start"===i?"row":"row-reverse",alignItems:"center",justifyContent:"start"===i?"flex-start":"space-between",spacing:2,bgcolor:c.input,color:c.inputText,borderRadius:1,children:[(0,p.jsx)(n,{color:"inherit"}),(0,p.jsx)(v.Z,{variant:"body2",color:c.inputText,children:t})]})},h=sm(d),g=null!==(t=d.kioskAppRef&&(0,o.find)(h,(e=>{var t;return e.ref.path===(null===(t=d.kioskAppRef)||void 0===t?void 0:t.path)})))&&void 0!==t?t:h[0],C=null!==(n=d.kioskVideoRef&&(0,o.find)(h,(e=>{var t;return e.ref.path===(null===(t=d.kioskVideoRef)||void 0===t?void 0:t.path)})))&&void 0!==n?n:h[0],x=d.deviceExperienceMode===vp.w_.Kiosk?g:d.deviceExperienceMode===vp.w_.KioskVideo?C:h[0],f=null!==(a=null!==(r=null===x||void 0===x||null===(l=x.overrides)||void 0===l?void 0:l.iconUrl)&&void 0!==r?r:null===x||void 0===x?void 0:x.iconUrl)&&void 0!==a?a:Be.vc.vrContent.defaultIconUrl,b=null!==(s=null===x||void 0===x?void 0:x.contentTypeLabel)&&void 0!==s?s:"App";return(0,p.jsxs)(m.Z,{spacing:1,paddingTop:8,paddingBottom:13.0625,children:[(0,p.jsxs)(m.Z,{direction:"row",padding:2,bgcolor:c.menuBackground,borderRadius:2,spacing:1.5,children:[(0,p.jsx)(i.Z,{height:140,width:140,overflow:"hidden",children:(0,p.jsx)("img",{src:f,alt:"",width:"100%",height:"100%"})}),(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(u,{label:"Resume ".concat(b),Icon:ym}),(0,p.jsx)(u,{label:"Restart ".concat(b),Icon:Zm})]})]}),d.deviceExperienceMode===vp.w_.HomeScreen&&(0,p.jsx)(i.Z,{padding:2,bgcolor:c.menuBackground,borderRadius:2,children:(0,p.jsx)(u,{label:"Quit and Go Home",Icon:jm,iconPlacement:"end"})})]})})),Em=e=>(0,p.jsx)($n.Z,{...e,viewBox:"4 4 24 24",children:(0,p.jsx)("path",{d:"M12.3,12.2c0-2,1.6-3.7,3.7-3.7c2,0,3.7,1.6,3.7,3.7c0,2-1.6,3.7-3.7,3.7C14,15.9,12.3,14.3,12.3,12.2z M23.4,21.9 c-0.7-3.4-3.8-6-7.4-6c-2.4,0-4.5,1.1-5.9,2.8c0.4,0.2,0.7,0.6,0.7,1c0.7-0.3,1.4,0,1.8,0.6l0.8,1.3c0.4,0.6,0.2,1.4-0.4,1.8h9.1 C22.9,23.5,23.6,22.7,23.4,21.9z M12.1,22.4l-0.9,0.7c0,0.3,0,0.5,0,0.8l0.9,0.7l-0.8,1.3l-1.1-0.5c-0.2,0.2-0.5,0.3-0.7,0.4L9.4,27 H7.9l-0.1-1.2c-0.1,0-0.3-0.1-0.4-0.2c-0.1-0.1-0.2-0.2-0.3-0.2L6,25.9l-0.8-1.3l0.9-0.7c0-0.3-0.1-0.6,0-0.8l-0.9-0.7L6,21.1 l1.1,0.5c0.2-0.2,0.5-0.3,0.7-0.4l0.1-1.2h1.5l0.1,1.2c0.1,0,0.3,0.1,0.4,0.2c0.1,0.1,0.2,0.2,0.3,0.2l1.1-0.5L12.1,22.4z M9.8,23.5 c0-0.6-0.5-1.1-1.1-1.1c-0.6,0-1.1,0.5-1.1,1.1c0,0.6,0.5,1.1,1.1,1.1C9.3,24.6,9.8,24.1,9.8,23.5z"})}),Sm=e=>(0,p.jsx)($n.Z,{...e,viewBox:"-32 -30 600 600",children:(0,p.jsx)("path",{strokeWidth:"2",d:"m192 451-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v1l-1 1v1l1 1h2l1 1h1l1 1h2l1 1h1l1 1h2l1 1h2l1 1h2l1 1h2l1 1h2l1 1h2l1 1h3l1 1h2l1 1h3l1 1h3l1 1h4l1 1h4l1 1h4l1 1h5l1 1h7l1 1h8l1 1h43l1-1h9l1-1h6l1-1h5l1-1h5l1-1h4l1-1h3l1-1h3l1-1h3l1-1h3l1-1h2l1-1h3l1-1h2l1-1h2l1-1h2l1-1h1l1-1h2l1-1h2l1-1h1l1-1h2l1-1h1l1-1h1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1h-2l-1 1h-1l-1 1h-2l-1 1h-1l-1 1h-2l-1 1h-2l-1 1h-2l-1 1h-2l-1 1h-2l-1 1h-3l-1 1h-3l-1 1h-3l-1 1h-4l-1 1h-5l-1 1h-6l-1 1h-9l-1 1h-27l-1-1h-9l-1-1h-6l-1-1h-5l-1-1h-4l-1-1h-3l-1-1h-3l-1-1h-2l-1-1h-3l-1-1h-2l-1-1h-2l-1-1h-2l-1-1h-2l-1-1h-1l-1-1h-2l-1-1h-1l-1-1Zm273-158v3l-1 1v5l-1 1v5l-1 1v4l-1 1v3l-1 1v3l-1 1v2l-1 1v3l-1 1v2l-1 1v2l-1 1v2l-1 1v1l-1 1v2l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v1l-1 1v1l-2 2v1l-1 1v1l-1 1v1l-2 2v1l-1 1v1l-2 2v1l-2 2v1l-2 2v1l-3 3v1l-3 3v1l-4 4v1l-6 6v1l-12 12h-1l-7 7h-1l-4 4h-1l-2 2 1 1v1l3 3v1l3 3v1l3 3v1l3 3v1l3 3v1l3 3v1l3 3v1l3 3v1l3 3v1l2 2v1l3 3v1l3 3v1l3 3h1l1-1h1l3-3h1l5-5h1l7-7h1l16-16v-1l7-7v-1l5-5v-1l3-3v-1l3-3v-1l3-3v-1l2-2v-1l2-2v-1l2-2v-1l2-2v-1l1-1v-1l2-2v-1l1-1v-1l1-1v-1l2-2v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-2l1-1v-1l1-1v-2l1-1v-2l1-1v-2l1-1v-2l1-1v-2l1-1v-3l1-1v-2l1-1v-3l1-1v-3l1-1v-4l1-1v-3l1-1v-5l1-1v-5l1-1v-6l1-1v-3h-5l-1-1h-8l-1-1h-8l-1-1h-8l-1-1h-7l-1-1h-8l-1-1h-8l-1-1Zm-391 0-1 1h-7l-1 1h-8l-1 1h-7l-1 1h-8l-1 1h-7l-1 1h-8l-1 1h-7l-1 1h-4v7l1 1v5l1 1v5l1 1v4l1 1v3l1 1v4l1 1v2l1 1v3l1 1v3l1 1v2l1 1v2l1 1v2l1 1v2l1 1v2l1 1v1l1 1v2l1 1v2l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v1l1 1v1l2 2v1l1 1v1l1 1v1l1 1v1l2 2v1l1 1v1l2 2v1l1 1v1l2 2v1l2 2v1l2 2v1l3 3v1l2 2v1l3 3v1l4 4v1l5 5v1l10 10v1l6 6h1l10 10h1l5 5h1l4 4h1l3 3h1l1-1v-1l3-3v-1l3-3v-1l3-3v-1l3-3v-1l3-3v-1l3-3v-1l2-2v-1l3-3v-1l3-3v-1l3-3v-1l3-3v-1l3-3v-1l2-2v-1l1-1h-1l-3-3h-1l-5-5h-1l-22-22v-1l-5-5v-1l-3-3v-1l-3-3v-1l-2-2v-1l-2-2v-1l-2-2v-1l-1-1v-1l-2-2v-1l-1-1v-1l-1-1v-1l-2-2v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-2l-1-1v-2l-1-1v-3l-1-1v-2l-1-1v-3l-1-1v-3l-1-1v-3l-1-1v-4l-1-1v-5l-1-1v-6Zm38-232-2 2h-1l-3 3h-1l-5 5h-1l-9 9h-1l-9 9v1l-9 9v1l-5 5v1l-4 4v1l-3 3v1l-3 3v1l-2 2v1l-2 2v1l-2 2v1l-2 2v1l-1 1v1l-2 2v1l-1 1v1l-2 2v1l-1 1v1l-1 1v1l-1 1v1l-2 2v1l-1 1v1l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v1l-1 1v2l-1 1v1l-1 1v1l-1 1v2l-1 1v2l-1 1v1l-1 1v2l-1 1v2l-1 1v2l-1 1v2l-1 1v2l-1 1v3l-1 1v3l-1 1v2l-1 1v4l-1 1v3l-1 1v4l-1 1v5l-1 1v5l-1 1v6l-1 1v1h6l1 1h8l1 1h8l1 1h8l1 1h8l1 1h7l1 1h8l1 1h5l1-1v-6l1-1v-5l1-1v-4l1-1v-4l1-1v-3l1-1v-2l1-1v-3l1-1v-2l1-1v-2l1-1v-2l1-1v-2l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l1-1v-1l2-2v-1l1-1v-1l1-1v-1l2-2v-1l2-2v-1l2-2v-1l2-2v-1l3-3v-1l3-3v-1l4-4v-1l10-10v-1l3-3h1l10-10h1l4-4h1l3-3v-1l-2-2v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1l-3-3v-1Zm313-1v1l-3 3v1l-3 3v1l-3 3v1l-3 3v1l-3 3v1l-2 2v1l-3 3v1l-3 3v1l-3 3v1l-3 3v1l-3 3v1l-3 3v1l-2 2v1l-1 1v1l1 1h1l4 4h1l6 6h1l15 15v1l6 6v1l4 4v1l3 3v1l2 2v1l2 2v1l2 2v1l2 2v1l1 1v1l2 2v1l1 1v1l1 1v1l1 1v1l2 2v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v1l1 1v2l1 1v1l1 1v2l1 1v1l1 1v2l1 1v2l1 1v2l1 1v3l1 1v2l1 1v3l1 1v3l1 1v4l1 1v5l1 1v5l1 1v2h8l1-1h7l1-1h8l1-1h7l1-1h8l1-1h7l1-1h8l1-1h5v-3l-1-1v-6l-1-1v-5l-1-1v-4l-1-1v-4l-1-1v-3l-1-1v-3l-1-1v-3l-1-1v-2l-1-1v-3l-1-1v-2l-1-1v-2l-1-1v-2l-1-1v-2l-1-1v-2l-1-1v-1l-1-1v-2l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-2l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-1-1v-1l-2-2v-1l-1-1v-1l-2-2v-1l-1-1v-1l-2-2v-1l-2-2v-1l-2-2v-1l-2-2v-1l-3-3v-1l-2-2v-1l-4-4v-1l-4-4v-1l-7-7v-1l-18-18h-1l-7-7h-1l-4-4h-1l-3-3h-1l-2-2ZM247 9l-1 1h-8l-1 1h-7l-1 1h-5l-1 1h-4l-1 1h-4l-1 1h-3l-1 1h-3l-1 1h-3l-1 1h-3l-1 1h-2l-1 1h-2l-1 1h-3l-1 1h-2l-1 1h-1l-1 1h-2l-1 1h-2l-1 1h-2l-1 1h-1l-1 1h-1l-1 1h-2l-1 1h-1v1l1 1v1l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1l1 1v1l1 1v2l1 1v1l1 1v1h2l1-1h1l1-1h2l1-1h1l1-1h2l1-1h2l1-1h2l1-1h2l1-1h2l1-1h3l1-1h3l1-1h3l1-1h4l1-1h5l1-1h5l1-1h9l1-1h29l1 1h9l1 1h6l1 1h4l1 1h4l1 1h4l1 1h3l1 1h2l1 1h3l1 1h2l1 1h2l1 1h2l1 1h1l1 1h2l1 1h1l1 1h2l1 1 1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l1-1v-1l1-1v-2l1-1v-1l-1-1h-1l-1-1h-2l-1-1h-1l-1-1h-2l-1-1h-2l-1-1h-1l-1-1h-2l-1-1h-2l-1-1h-2l-1-1h-3l-1-1h-2l-1-1h-3l-1-1h-2l-1-1h-4l-1-1h-3l-1-1h-4l-1-1h-4l-1-1h-5l-1-1h-6l-1-1h-9l-1-1Z"})}),Dm=e=>(0,p.jsx)($n.Z,{...e,viewBox:"-20 10 550 530",children:(0,p.jsxs)("g",{transform:"translate(0,482) scale(0.1,-0.1)",children:[(0,p.jsx)("path",{d:"M2490 4583 l0 -220 114 -6 c1031 -59 1853 -882 1913 -1914 l6 -113 220 0 220 0 -6 133 c-36 723 -401 1404 -992 1847 -386 289 -871 465 -1342 487 l-133 6 0 -220z"}),(0,p.jsx)("path",{d:"M2490 3684 l0 -220 109 -12 c544 -61 952 -469 1013 -1013 l12 -109 220 0 219 0 -7 102 c-25 379 -184 727 -460 1004 -277 276 -625 435 -1004 460 l-102 7 0 -219z"}),(0,p.jsx)("path",{d:"M895 3289 c-469 -49 -836 -423 -885 -900 -13 -134 -13 -1344 0 -1478 43 -414 321 -752 713 -865 139 -40 267 -48 767
3-44 486 4 483 4 563 56 20 14 118 125 218 248 99 123 192 233 206 244 29 23 88 27 128 8 14 -6 109 -114 211 -239 101 -126 199 -240 217 -253 81 -62 72 -61 552 -64 482 -4 614 4 750 43 327 95 585 352 679 677 39 135 46 252 46 764 l0 474 -506 0 c-478 0 -506 -1 -499 -17 39 -93 48 -128 52 -204 4 -52 1 -108 -7 -140 -55 -239 -282 -407 -521 -385 -341 31 -545 367 -416 685 l24 60 -391 3 -391 3 -60 30 c-78 39 -154 116 -191 190 l-29 60 -3 528 -3 527 -572 -1 c-315 -1 -608 -5 -652 -10z m736 -1113 c152 -53 269 -175 313 -325 25 -84 21 -221 -8 -302 -53 -152 -175 -269 -325 -313 -84 -25 -221 -21 -302 8 -152 53 -269 175 -313 325 -25 84 -21 221 8 302 52 149 169 263 316 310 84 27 227 25 311 -5z"}),(0,p.jsx)("path",{d:"M2490 2665 l0 -335 335 0 335 0 0 25 c0 54 -33 183 -64 250 -70 150 -173 254 -321 325 -74 36 -200 70 -260 70 l-25 0 0 -335z"})]})}),Mm=e=>(0,p.jsx)($n.Z,{...e,viewBox:"4 4 24 24",children:(0,p.jsx)("path",{d:"M24.4,19.4l-0.9,0.4c-0.1-0.1-0.2-0.1-0.3-0.2c-0.1-0.1-0.2-0.1-0.3-0.1l-0.1-1h-1.3l-0.1,1c-0.2,0.1-0.4,0.2-0.6,0.3 l-0.9-0.4l-0.6,1.1l0.8,0.6c0,0.2,0,0.5,0,0.7l-0.8,0.6l0.6,1.1l0.9-0.4c0.1,0.1,0.2,0.1,0.3,0.2c0.1,0.1,0.2,0.1,0.3,0.1l0.1,1h1.3 l0.1-1c0.2-0.1,0.4-0.2,0.6-0.3l0.9,0.4l0.6-1.1l-0.8-0.6c0-0.2,0-0.5,0-0.7l0.8-0.6L24.4,19.4z M22.2,22.4c-0.5,0-0.9-0.4-0.9-0.9 s0.4-0.9,0.9-0.9c0.5,0,0.9,0.4,0.9,0.9S22.7,22.4,22.2,22.4z M16.9,20c0.7-2.6,3.2-4.3,5.9-4c1.6,0.2,3,1,3.9,2.3l0.8-0.3l-0.4,2.8 L24.9,19l0.8-0.3c-0.7-1-1.8-1.6-3.1-1.7c-2.2-0.3-4.2,1.1-4.8,3.2L16.9,20z M26.5,22.7l1,0.3c-0.7,2.4-2.8,4-5.3,4 c-0.2,0-0.4,0-0.6,0c-1.6-0.2-3-1-3.9-2.3l-0.8,0.3l0.4-2.8l2.2,1.7l-0.8,0.3c0.7,1,1.8,1.6,3,1.7C23.9,26.2,25.9,24.8,26.5,22.7z M18.2,9.8c0-2.3-2.9-4.1-6.5-4.1C8,5.8,5.2,7.5,5.2,9.8c0,1.2,0.8,2.2,2,3c0.9,0.5,1.5,1.5,1.5,2.5l0.4,9.1 c0.1,1.4,1.2,2.5,2.6,2.5c1.4,0,2.6-1.1,2.7-2.5l0.4-9.1c0-1,0.6-2,1.5-2.5C17.5,12,18.2,11,18.2,9.8z M11.7,18.5 c-1.1,0-2.1-0.9-2.1-2.1s0.9-2.1,2.1-2.1c1.1,0,2.1,0.9,2.1,2.1S12.8,18.5,11.7,18.5z M11.7,11.9c-2.6,0-4.5-1.1-4.5-2.1 c0-1,1.9-2.1,4.5-2.1s4.5,1.1,4.5,2.1C16.3,10.8,14.3,11.9,11.7,11.9z M12.6,16.4c0,0.5-0.4,0.9-0.9,0.9c-0.5,0-0.9-0.4-0.9-0.9 s0.4-0.9,0.9-0.9C12.2,15.5,12.6,15.9,12.6,16.4z"})}),km=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"35 45 55 40",children:[(0,p.jsx)("path",{d:"M48.5 67.5C53.4659 67.5 57.6626 70.0097 59.4404 73.5C57.6626 76.9903 53.4659 79.5 48.5 79.5C43.5339 79.5 39.3363 76.9906 37.5586 73.5C39.3363 70.0094 43.5339 67.5 48.5 67.5ZM48.5 68.667C45.4303 68.667 42.7725 70.7482 42.7725 73.5C42.7725 76.2518 45.4303 78.333 48.5 78.333C51.5697 78.333 54.2275 76.2518 54.2275 73.5C54.2275 70.7482 51.5697 68.667 48.5 68.667ZM48.5 71.4004C50.0512 71.4004 51.1367 72.4212 51.1367 73.5C51.1367 74.5788 50.0512 75.5996 48.5 75.5996C46.9488 75.5996 45.8633 74.5788 45.8633 73.5C45.8633 72.4212 46.9488 71.4004 48.5 71.4004Z"}),(0,p.jsx)("path",{d:"M79.5 67.5C84.4659 67.5 88.6626 70.0097 90.4404 73.5C88.6626 76.9903 84.4659 79.5 79.5 79.5C74.5339 79.5 70.3363 76.9906 68.5586 73.5C70.3363 70.0094 74.5339 67.5 79.5 67.5ZM79.5 68.667C76.4303 68.667 73.7725 70.7482 73.7725 73.5C73.7725 76.2518 76.4303 78.333 79.5 78.333C82.5697 78.333 85.2275 76.2518 85.2275 73.5C85.2275 70.7482 82.5697 68.667 79.5 68.667ZM79.5 71.4004C81.0512 71.4004 82.1367 72.4212 82.1367 73.5C82.1367 74.5788 81.0512 75.5996 79.5 75.5996C77.9488 75.5996 76.8633 74.5788 76.8633 73.5C76.8633 72.4212 77.9488 71.4004 79.5 71.4004Z"}),(0,p.jsx)("path",{d:"M45 53H83",stroke:"currentColor",strokeWidth:"4"}),(0,p.jsx)("path",{d:"M45.4392 58.9427L38.1831 54.0273C37.6083 53.6379 37.5955 52.7955 38.1583 52.3888L45.4143 47.1458C46.0756 46.6679 47 47.1404 47 47.9563L47 58.1147C47 58.9168 46.1032 59.3925 45.4392 58.9427Z"}),(0,p.jsx)("path",{d:"M82.5608 47.0573L89.8169 51.9727C90.3917 52.3621 90.4045 53.2045 89.8417 53.6112L82.5857 58.8542C81.9244 59.3321 81 58.8596 81 58.0437L81 47.8853C81 47.0832 81.8968 46.6075 82.5608 47.0573Z"})]}),Im=e=>(0,p.jsx)($n.Z,{...e,viewBox:"4 4 24 24",children:(0,p.jsx)("path",{d:"M17,20.5c0.6,0.6,0.6,1.5,0,2.1c-0.6,0.6-1.5,0.6-2.1,0l0,0c-0.6-0.6-0.6-1.5,0-2.1l0,0C15.5,19.9,16.5,19.9,17,20.5z M25.8,12.8C23,10.3,19.5,9,16,9s-7,1.3-9.8,3.8c-0.3,0.3-0.3,0.7,0,1l1.1,1.1c0.3,0.3,0.7,0.3,1,0c2.2-2,5-3,7.8-3 c2.8,0,5.6,1,7.8,3c0.3,0.3,0.7,0.3,1,0l1.1-1.1C26.1,13.5,26.1,13,25.8,12.8z M16,14.8c-2,0-4,0.7-5.6,2c-0.3,0.3-0.4,0.7-0.1,1 l1.1,1.1c0.2,0.2,0.6,0.3,0.9,0.1c1.1-0.9,2.4-1.3,3.7-1.3s2.6,0.4,3.7,1.3c0.3,0.2,0.7,0.2,0.9-0.1l1.1-1.1c0.3-0.3,0.3-0.8-0.1-1 C20,15.5,18,14.8,16,14.8z"})}),Am=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"0 0 24 24",children:[(0,p.jsx)("path",{fill:"currentColor",d:"M24.047 5.536c0 .49 0 .98-.019 1.495-.445 1.068-1.373 1.505-2.072 2.235.019.057.042.13.061.203a6.53 6.53 0 0 1 .29 2.885c-.14 1.115-.515 2.136-1.162 3.016-.51.698-1.101 1.286-1.81 1.708-.698.422-1.438.745-2.24.781-.614.026-1.237.063-1.842-.015-.694-.089-1.345-.38-1.969-.735-.06-.03-.182-.01-.234.037-.37.385-.727.786-1.092 1.172-.619.65-1.238 1.307-1.866 1.948a64.719 64.719 0 0 1-1.87 1.838c-.919.865-1.927 1.542-3.113 1.844-.028.01-.046.073-.07.104-.53 0-1.06 0-1.608-.02-.042-.042-.06-.074-.084-.084-.31-.151-.638-.26-.924-.453-.539-.36-.946-.886-1.336-1.438a5.795 5.795 0 0 1-.9-1.958c-.023-.099-.093-.188-.14-.281 0-.688 0-1.375.019-2.094.098-.318.168-.615.257-.901.225-.781.54-1.52.924-2.219.736-1.333 1.467-2.672 2.208
3-4a31.525 31.525 0 0 1 2.793-4.161c.694-.87 1.42-1.709 2.302-2.35.567-.41 1.158-.77 1.842-.775 3.727-.01 7.453-.01 11.185.005.304 0 .628.099.918.23.736.338 1.177 1 1.44 1.832.018.058.074.105.112.151m-6.099 9.646c.638-.323 1.2-.76 1.613-1.4.572-.886.787-1.881.567-3.058-1.833 1.443-3.642 2.849-5.292 4.542.417.12.83.213 1.242.26.633.068 1.242-.088 1.87-.344Zm0 0"}),(0,p.jsx)("path",{fill:"currentColor",d:"M18.553.052c.028.037.024.089.042.104.474.474.347.854.094 1.308-.36.65-.91.968-1.589.979-.422.005-.848.01-1.27 0-.84-.026-1.5-.506-1.8-1.422-.075-.23.042-.625.234-.807a.432.432 0 0 0 .103-.141c1.378-.02 2.77-.02 4.186-.02Zm0 0"})]}),Rm=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"2 2 44 44",children:[(0,p.jsx)("path",{d:"M6 25.3272C6 21.3697 7.21393 18.2897 9.09139 16.2112C10.9659 14.1361 13.5523 13 16.4353 13H32.5647C35.4477 13 38.0341 14.1361 39.9086 16.2112C41.7861 18.2897 43 21.3697 43 25.3272V27.9926C43 32.3074 41.573 34.8581 39.4961 35.9523C38.5924 36.4284 37.2902 36.6784 35.8301 36.6237C34.3811 36.5693 32.8599 36.2171 31.5528 35.5768L30.4929 35.0575C28.6091 34.1347 26.5792 33.6562 24.5236 33.6562C22.4719 33.6562 20.3944 34.133 18.5071 35.0575L17.4472 35.5768C14.6501 36.9471 11.599 37.3601 9.59747 36.0083C8.4406 35.227 7.55897 34.2722 6.957 33.0211C6.35031 31.7601 6 30.1401 6 27.9926V25.3272Z",stroke:"currentColor",strokeWidth:"2",fill:"none"}),(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.4193 16.0004L16.9999 16L17.001 16.0025C12.5676 16.0966 9 20.0862 9 24.994V26.7926C9 29.8341 9.7615 31.7074 11.5 33C12.9004 34.0412 15.8954 32.9317 17.9571 31.9767L18.7136 31.6263C19.9629 31.0476 22.5674 30.6596 23.9227 30.6596H24.9159C26.2712 30.6596 28.8757 31.0476 30.125 31.6263L30.8815 31.9767C32.9433 32.9317 35.9382 34.0412 37.3386 33C39.0771 31.7074 39.8386 29.8341 39.8386 26.7926V24.994C39.8386 20.0862 36.271 16.0966 31.8376 16.0025L31.8387 16L24.4193 16.0004Z",fill:"currentColor",stroke:"none"})]}),Tm=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"3 3 18 18 ",children:[(0,p.jsx)("path",{d:"M8.708 7.705c-.01-.441.08-.84.326-1.196.215-.31.51-.503.878-.573.184-.035.373-.058.56-.059 1.047-.005 2.095-.003 3.143-.002.328 0 .656.021.95.182.445.243.736.612.81 1.118.039.264.028.535.034.803.005.215.101.317.32.317h2.317c.446.002.776.222 1.017.578.131.196.187.42.187.663-.004 2.549-.002 5.097-.003 7.646 0 .268-.106.493-.271.705-.17.22-.397.338-.644.426a1.033 1.033 0 0 1-.34.047c-3.937.002-7.873.003-11.809 0-.357-.001-.692-.105-.951-.365a1.153 1.153 0 0 1-.358-.818c-.006-2.583-.009-5.166.002-7.75.002-.43.245-.756.619-.97a1.26 1.26 0 0 1 .659-.165c.728.008 1.456-.002 2.184.006.255.002.404-.117.372-.372-.009-.068-.002-.137-.002-.22m-.413 3.793a3.928 3.928 0 0 0-.293 1.423c-.004.155.005.312.03.465.054.319.086.648.191.95a3.99 3.99 0 0 0 1.133 1.711 3.999 3.999 0 0 0 2.786 1.02c.404-.008.796-.07 1.175-.188a3.71 3.71 0 0 0 1.225-.651 4.1 4.1 0 0 0 1.07-1.26c.22-.41.373-.846.457-1.31a3.67 3.67 0 0 0 .012-1.203 4.349 4.349 0 0 0-.585-1.607 3.74 3.74 0 0 0-1.434-1.367 4.368 4.368 0 0 0-1.827-.517 3.951 3.951 0 0 0-1.115.089c-.422.09-.805.272-1.171.495-.44.267-.818.607-1.117 1.02-.205.284-.359.604-.537.93m9.003-1.582V9.71c.002-.263-.311-.593-.603-.556-.414.052-.665.238-.635.724.017.285.344.572.622.54.296-.034.517-.177.616-.502z"}),(0,p.jsx)("path",{d:"M12.417 15.586c-.344.018-.676.028-.998-.06-.706-.194-1.264-.579-1.632-1.23-.285-.505-.363-1.05-.303-1.603.098-.904.572-1.579 1.387-1.992a2.73 2.73 0 0 1 .899-.257c.503-.066.978.018 1.424.232.573.276.992.712 1.246 1.307.161.377.226.764.2 1.166-.036.544-.204 1.04-.55 1.474-.39.489-.895.778-1.492.924a3.457 3.457 0 0 1-.18.04z"})]});var Pm=n(62610);const Lm=e=>{let{colors:t,children:n}=e;return(0,p.jsx)(m.Z,{bgcolor:(0,ul.B$)(t.menuBackground),color:t.menuText,borderRadius:6,direction:"row",padding:0,alignItems:"center",overflow:"hidden",spacing:.5,children:n})},Nm=e=>{let{colors:t,hiddenSettings:n}=e;const i=vr()().format("h:mm A"),o=i.slice(0,-3),a=i.slice(-2),r=t.menuText,l=pm((0,ul.B$)(t.menuBackground)),s=hm(l.color,l.opacity);return(0,p.jsx)(Lm,{colors:t,children:(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsxs)(m.Z,{paddingX:2,spacing:.5,justifyContent:"center",marginTop:-.5,minHeight:60,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"flex-end",children:[(0,p.jsx)(v.Z,{variant:"h6",fontWeight:"regular",lineHeight:1.2,children:o}),(0,p.jsx)(v.Z,{variant:"body2",fontWeight:"regular",lineHeight:1.34,children:a})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"flex-end",children:[(0,p.jsx)(Um,{fillColor:r,emptyColor:s}),(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,margin:0,children:[(0,p.jsx)(Om,{width:4,fillColor:r,emptyColor:s}),(0,p.jsx)(Om,{width:8,fillColor:r,emptyColor:s,isRight:!0})]})]})]}),!n.passthrough&&(0,p.jsx)(_m,{Icon:Rm,colors:t})]})})},Um=e=>{let{fillColor:t,emptyColor:n}=e;return(0,p.jsxs)(m.Z,{spacing:0,direction:"row",alignItems:"center",justifyContent:"center",children:[(0,p.jsx)(i.Z,{bgcolor:n,width:28,height:15,sx:{borderRadius:"4px"},children:(0,p.jsx)(i.Z,{bgcolor:t,width:24,height:15,sx:{borderRadius:"4px 0 0 4px",marginRight:1}})}
3),(0,p.jsx)(i.Z,{bgcolor:n,width:2,height:5,sx:{borderRadius:"0 1px 1px 0"}})]})},Fm=e=>{let{width:t,emptyColor:n,fillColor:o,isRight:a}=e;return(0,p.jsx)(i.Z,{bgcolor:n,width:8,height:2,sx:{borderRadius:"1px",position:"relative",overflow:"hidden",[a?"left":"right"]:"5px"},children:(0,p.jsx)(i.Z,{bgcolor:o,width:t,height:2,sx:{borderRadius:"0 0 1px 1px",position:"absolute",bottom:0}})})},Om=e=>{let{width:t,fillColor:n,emptyColor:i,isRight:o}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-end",marginLeft:0,children:[o&&(0,p.jsx)(Fm,{width:t,fillColor:n,emptyColor:i,isRight:!0}),(0,p.jsx)(Am,{sx:{fontSize:"medium",transform:o?"scaleX(-1)":""}}),!o&&(0,p.jsx)(Fm,{width:t,fillColor:n,emptyColor:i})]})},_m=e=>{let{Icon:t,colors:n}=e;const o=pm((0,ul.B$)(n.menuBackground));return(0,p.jsxs)(m.Z,{position:"relative",overflow:"hidden",alignItems:"center",justifyContent:"center",bgcolor:"transparent",width:60,height:60,fontSize:30,children:[(0,p.jsx)(t,{fontSize:"inherit",sx:{zIndex:1}}),(0,p.jsx)(i.Z,{sx:{position:"absolute",top:0,bottom:0,left:0,right:0,zIndex:1,"&:hover":{backgroundColor:o.color,opacity:o.opacity}}})]})},zm=(0,a.memo)((e=>{let{colors:t,hiddenSettings:n}=e;return(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(Nm,{colors:t,hiddenSettings:n}),(0,p.jsxs)(Lm,{colors:t,children:[!n.wifi&&(0,p.jsx)(_m,{Icon:Im,colors:t}),!n.guardian&&(0,p.jsx)(_m,{Icon:Sm,colors:t}),!n.cast&&(0,p.jsx)(_m,{Icon:Dm,colors:t}),!n.bluetooth&&(0,p.jsx)(_m,{Icon:Pm.Z,colors:t}),!n.controller&&(0,p.jsx)(_m,{Icon:Mm,colors:t}),!n.screenRecording&&(0,p.jsx)(_m,{Icon:Tm,colors:t}),!n.ipdAdjustment&&(0,p.jsx)(_m,{Icon:km,colors:t}),!n.adminSettings&&(0,p.jsx)(_m,{Icon:Em,colors:t})]})]})}));var Bm=n(22051),Wm=n.n(Bm);const Vm=(0,a.memo)((e=>{let{imageUrl:t,showDownloadProgress:n=!1,imageFit:o="contain",coverScale:r=1,dimmed:l=!1,cropHalfAxis:s,sx:d}=e;const c=(0,a.useRef)(null),u=(0,a.useRef)(new Image),[h,m]=(0,a.useState)(!1),[g,{width:v,height:C}]=Wm()(),x=(0,zn.c)(v,500),f=(0,zn.c)(C,500),b=()=>{const e=c.current;if(!e)return;const t=e.getContext("2d");return t?(t.clearRect(0,0,e.width,e.height),t):void 0};return(0,a.useLayoutEffect)((()=>{b(),t&&(n&&m(!0),u.current.onload=()=>{n&&m(!1);const e=u.current,t="horizontal"===s?e.width/2:e.width,i="vertical"===s?e.height/2:e.height;if(!c.current||!x||!f)return;const a=c.current,d=window.devicePixelRatio;a.width=x*d,a.height=f*d;const p=b();if(!p)return;let h,g,v,C,y,j,Z,w;const E=t/i>a.width/a.height?"wider":"taller";"cover"===o?(y=0,j=0,Z=a.width,w=a.height,"wider"===E?(C=i*r,v=Z/w*C,g=(i-C)/2,h=(t-v)/2):(v=t*r,C=w/Z*v,h=(t-v)/2,g=(i-C)/2)):"fill"===o?(y=0,j=0,Z=a.width,w=a.height,v=t*r,C=i*r,h=(t-v)/2,g=(i-C)/2):(h=0,g=0,v=t,C=i,"wider"===E?(y=0,Z=a.width,w=i/t*Z,j=(a.height-w)/2):(j=0,w=a.height,Z=t/i*w,y=(a.width-Z)/2)),p.drawImage(e,h,g,v,C,y,j,Z,w),l&&(p.fillStyle="rgba(0, 0, 0, 0.2)",p.fillRect(0,0,a.width,a.height))},u.current.src=t)}),[r,l,o,t,f,x,n,s]),(0,p.jsxs)(i.Z,{sx:{position:"relative",...d},children:[g,(0,p.jsx)(i.Z,{component:"canvas",ref:c,sx:{position:"absolute",top:0,left:0,width:1,height:1,borderRadius:1}}),n&&h&&(0,p.jsx)(Rn.Z,{color:"primary",sx:{position:"absolute",top:0,left:0,right:0}})]})})),Gm=()=>(0,p.jsx)(v.Z,{padding:{lg:2,md:.5},sx:{borderRadius:1,backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(1px)",pointerEvents:"none",color:y.DG.black,mixBlendMode:"screen",...qm},variant:"subtitle1",children:"PASSTHROUGH"}),Hm=()=>(0,p.jsx)(v.Z,{padding:{lg:2,md:.5},sx:{borderRadius:1,background:"linear-gradient(rgba(255, 255, 255, 0.35) 20%)",backdropFilter:"blur(1px)",pointerEvents:"none",color:y.DG.black,...qm},variant:"subtitle1",children:"CUSTOM 3D ENV"}),qm={position:"absolute",top:0,left:0,width:"100%",height:"100%"},Ym=(0,a.memo)((e=>{var t,n,r,l,s,d,c;const{configuration:u,onAppMoved:h,disable:g=!1,mode:v="homeScreen"}=e,{topLogoUrl:C,backgroundUrl:x,shortcutMenuBackgroundUrl:f,bottomLogoUrl:b,hiddenSettings:y,backgroundSettings:j}=u.customLauncherSettings||{},Z=Be.vc.configuration.defaultLauncherBackgroundUrl,w="shortcutMenu"===v?f:x,E=w===vp.v4.SyncWithBackgroun
3dUrl,S=(0,o.has)(e,"environmentFileIdOverride")?e.environmentFileIdOverride:null===(t=u.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.environmentFileId,D=om(S),M=(0,a.useMemo)((()=>null!==j&&void 0!==j&&j.forcePassthrough?Be.vc.configuration.passthroughLauncherBackgroundUrl:S?null!==D&&void 0!==D?D:Be.vc.configuration.exampleCustomEnvironmentFileUrl:E?null!==x&&void 0!==x?x:Z:null!==w&&void 0!==w?w:Z),[null===j||void 0===j?void 0:j.forcePassthrough,x,Z,S,D,E,w]),k=!S||null!==j&&void 0!==j&&j.forcePassthrough?.44:1,I=null===(r=u.customLauncherSettings)||void 0===r||null===(l=r.backgroundSettings)||void 0===l?void 0:l.backgroundStereoPacking,A=null===(s=u.customLauncherSettings)||void 0===s||null===(d=s.backgroundSettings)||void 0===d?void 0:d.shortcutMenuBackgroundStereoPacking,R=E||"homeScreen"===v?I:A,T=Qh(R),P=Jh(R),L=qs(u),N=S&&!(null!==j&&void 0!==j&&j.forcePassthrough)&&!(D===M);return(0,p.jsxs)(m.Z,{position:"relative",alignItems:"center",paddingX:3,paddingY:4,borderRadius:1,bgcolor:"grey.800",children:[(0,p.jsx)(Vm,{imageUrl:M,imageFit:P,coverScale:k,showDownloadProgress:!0,cropHalfAxis:T,sx:qm}),(null===j||void 0===j?void 0:j.forcePassthrough)&&(0,p.jsx)(Gm,{}),N&&(0,p.jsx)(Hm,{}),"homeScreen"===v&&C&&(0,p.jsx)(i.Z,{width:240,height:80,position:"relative",children:(0,p.jsx)("img",{alt:"",src:C,width:"100%",height:"100%",style:{objectFit:"contain",objectPosition:"center"}})}),"homeScreen"===v&&(0,p.jsx)(i.Z,{position:"relative",paddingX:5,children:(0,p.jsx)(bm,{configuration:u,colors:L.colors,onAppMoved:h,disableDrag:g})}),"shortcutMenu"===v&&(0,p.jsx)(i.Z,{position:"relative",children:(0,p.jsx)(wm,{configuration:u,colors:L.colors})}),(0,p.jsx)(i.Z,{position:"relative",marginTop:2,children:(0,p.jsx)(zm,{colors:L.colors,hiddenSettings:{...null!==y&&void 0!==y?y:{},screenRecording:(null===(c=u.disabledQfbSettings)||void 0===c?void 0:c.SCREEN_CAPTURE_ENABLED)||(null===y||void 0===y?void 0:y.screenRecording)}})}),b&&(0,p.jsx)(i.Z,{position:"relative",width:120,height:60,marginTop:2,children:b&&(0,p.jsx)("img",{alt:"",src:b,width:"100%",height:"100%",style:{objectFit:"contain",objectPosition:"center"}})})]})}));var Km=n(3746);const Xm=e=>{let{mode:t,disabled:n=!1,handleChange:o,previewMode:a}=e;const r=n?y.DG.grey[500]:a===t?y.DG.primary[100]:y.DG.grey[800];return(0,p.jsx)(ee.Z,{title:n?"Shortcut menu is OFF. Go to Menu Settings to turn it on.":"",followCursor:!0,placement:"right",children:(0,p.jsx)(i.Z,{sx:{cursor:n?"not-allowed":"auto"},children:(0,p.jsx)(C.Z,{sx:{"&.MuiButtonGroup-grouped:not(:last-of-type)":{border:"none"},"&:hover":{backgroundColor:"transparent"}},disabled:n,onClick:()=>o(t),children:(0,p.jsx)(v.Z,{variant:"caption",sx:{textTransform:"none",color:r},children:"homeScreen"===t?"Home":"Shortcut"})})})},t)},Qm=e=>{var t;let{configuration:n,previewMode:o,onPreviewModeToggleChanged:r}=e;const l=n.deviceExperienceMode,s=l===vp.w_.Kiosk,d=!(null===(t=n.customLauncherSettings)||void 0===t||!t.disableShortcutMenu);return(0,a.useEffect)((()=>{d&&"shortcutMenu"===o&&l!==vp.w_.Kiosk&&r("homeScreen")}),[o,d,l,r]),l===vp.w_.Kiosk||l===vp.w_.KioskVideo?(0,p.jsx)(i.Z,{sx:{height:30}}):(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:{md:"right",xs:"flex-start"},children:[(0,p.jsx)(Km.Z,{sx:{color:y.DG.grey[500],fontSize:16}}),(0,p.jsxs)(Gh.Z,{variant:"text",sx:{alignItems:"center"},children:[(0,p.jsx)(Xm,{mode:"homeScreen",disabled:s,handleChange:r,previewMode:o}),(0,p.jsx)(i.Z,{sx:{borderRight:"1.3px solid ".concat(y.DG.grey[800]),height:10,background:"none"}}),(0,p.jsx)(Xm,{mode:"shortcutMenu",disabled:d,handleChange:r,previewMode:o})]})]})},Jm=()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.disabledQfbSettings)))&&void 0!==e?e:{},i=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.metaOemSettingToggled({setting:e})))}),[t]);return(0,p.jsxs)(m.Z,{padding:3,paddingTop:0,spacing:3,children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",color:"primary",children:[bi.RZ," Individual Mode Settings"]}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Only applies to Meta devices enrolled via ",bi.RZ," managed services"]})]}),(0,p.jsx)(m.Z,{spacing:2.5,children:(0,o.map)(vp.Hd,(e=>{const{title:t,subtitle:o}=vp.fu[e],a=!n[e];return(0,p.jsx)(zi.W,{privilege:"configurations",disableAutoSize:!0,children:(0,p.jsxs)(m.Z,{direction:"row",gap:1,onClick:()=>i(e),paddingLeft:2,sx:{cursor:"pointer"},children:[(0,p.jsx)(fu,{value:a,label:"",size:"medium",onToggle:()=>{i(e)},sx:{color:"primary.main",pointerEvents:"none"}}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{children:t}),(0,p.jsx)(v.Z,{variant:"body2",color:"action.active",children:o})]})]},e)})}))})]})};Jm.displayName="ConfigurationDefaultDeviceMenu";var $m=n(71572),eg=n(87486),tg=n(25530),ng=n(21172);const ig=e=>{let{title:t,subtitle:n,children:i,useDivider:o,fullWidthContent:a,privilege:r}=e;return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{paddingTop:4,direction:"row",flexWrap:"wrap",children:[(0,p.jsxs)(m.Z,{width:250,paddingBottom:2,spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:t}),n&&("string"===typeof n?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:n}):n)]}),(0,p.jsx)(m.Z,{width:560,flexGrow:a?1:0,children:(0,p.jsx)(zi.W,{privilege:r,children:i})})]}),o&&(0,p.jsx)(Ie.Z,{sx:{paddingTop:3}})]})};ig.displayName="ConfigurationDeviceExperienceSettingsSection";const og=()=>{var e,t;const n=(0,u.I0)(),i=null!==(e=Xs((e=>null===e||void 0===e?void 0:e.sessionInactivityTimeout)))&&void 0!==e?e:vp.O4,o=null!==(t=Xs((e=>null===e||void 0===e?void 0:e.sessionInactivityTimeoutEnabled)))&&void 0!==t?t:vp.C,r=(0,a.useCallback)((e=>{n(Js(Ys.U.actions.sessionInactivityTimeoutChanged({sessionInactivityTimeout:e})))}),[n]);return(0,p.jsx)(Qi,{label:"Inactivity Timeout",value:i,options:ag,onChange:r,privilege:"configurations",warning:!o,warningText:"Does not apply when using session passcodes, except on Meta firmware v85+ where passcodes are not supported"})},ag=(0,o.map)(vp.Jp,(e=>({label:"".concat(e," minutes"),value:e})));og.displayName="ConfigurationSessionInactivityTimeoutSelect";const rg=[{value:vp.fh.LOW,labelSubtitle:"Passcode must contain at least 4 digits"},{value:vp.fh.MEDIUM,labelSubtitle:"Passcode must contain at least 4 digits AND have no repeating or ordered sequences"},{value:vp.fh.HIGH,labelSubtitle:"Passcode must contain at least 8 digits AND have no repeating or ordered sequences"}],lg=(0,o.map)(rg,(e=>{let{value:t,labelSubtitle:n}=e;return{value:t,label:(0,p.jsxs)(m.Z,{sx:{whiteSpace:"normal"},children:[(0,p.jsx)(v.Z,{color:"text.primary",children:vp.Go[t]}),(0,p.jsx)(v.Z,{color:"text.secondary",children:n})]})}})),sg=e=>{var t,n,a,r,l,s;let{useDividers:d=!0}=e;const c=(0,Le.ye)("enableStationaryBoundaryByDefault"),h=(0,Le.ye)("enableSessionInactivityTimeout"),g=(0,Le.ye)("enableEnableHandTrackingByDefault"),C=(0,Le.ye)("enableAdminPinProtectedSettings"),x=(0,u.I0)(),f=null!==(t=Xs((e=>e.sessionIntroWakeControllers)))&&void 0!==t?t:vp.DJ,b=f!==vp.rc.DISABLED,y=null!==(n=Xs((e=>e.sessionIntroAdjustDeviceFit)))&&void 0!==n?n:vp.DJ,j=y!==vp.rc.DISABLED,Z=null!==(a=Xs((e=>e.enableHandTrackingByDefault)))&&void 0!==a?a:vp.kF,w=null!==(r=Xs((e=>e.sessionInactivityTimeoutEnabled)))&&void 0!==r?r:vp.C,E=null!==(l=Xs((e=>e.sessionPasscodeComplexity)))&&void 0!==l?l:vp.wW,S=e=>e===vp.rc.DISABLED?vp.rc.UNMANAGED:vp.rc.DISABLED,D=e=>{x(Js(Ys.U.actions.sessionPasscodeComplexityChanged({sessionPasscodeComplexity:e})))},M=!Xs((e=>{var t;return null!==(t=null===e||void 0===e?void 0:e.stationaryBoundaryByDefault)&&void 0!==t?t:vp.Lt})),k=null!==(s=Xs((e=>e.adminPinProtectedSettings)))&&void 0!==s?s:{},I={wifi:go.Z,guardian:Sm,usbdebugging:Sd.Z,travelmode:$m.Z,softwareupdate:eg.Z,time:he.Z,virtualkeyboard:tg.Z};return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",color:"primary",children:[bi.RZ," Shared Mode Settings"]}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Only applies to Meta devices enrolled via ",bi.RZ," managed services"]})]}),d?(0,p.jsx)(Ie.Z,{sx:{paddingTop:3}}):(0,p.jsx)(i.Z,{sx:{paddingTop:3}}),!h&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ig,{title:"Session Passcode Complexity",children:(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(Qi,{label:"Passcode Complexity",value:E,options:lg,onChange:D,privilege:"configurations",fullWidth:!0,SelectProps:{renderValue:e=>(0,o.get)(vp.Go,e,"Unknown")},constrainItemWidth:!0}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["When a user starts a new session, they set a new passcode in-headset. To maintain the current session, enter the same passcode."," "]})]})}),(0,p.jsx)(Ie.Z,{sx:{paddingTop:3}})]}),(0,p.jsx)(ig,{title:"Session Intro Steps",subtitle:"Shown at the beginning of each new user session",children:(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(Pd,{label:(0,p.jsxs)(m.Z,{sx:{transform:"translateY(9px)"},spacing:1,children:[(0,p.jsx)(v.Z,{color:"text.primary",children:vp.j.sessionIntroWakeControllers}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Ask the user to confirm controllers are connected. Cannot be enabled when hand tracking is on"})]}),privilege:"configurations",control:(0,p.jsx)(ho.Z,{}),checked:b,onChange:()=>{const e=S(f);x(Js(Ys.U.actions.sessionIntroWakeControllersSet({setting:e}
3))),e!==vp.rc.DISABLED&&Z&&x(Js(Ys.U.actions.enableHandTrackingByDefaultToggled()))}}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(Pd,{label:(0,p.jsxs)(m.Z,{sx:{transform:"translateY(9px)"},spacing:1,children:[(0,p.jsx)(v.Z,{color:"text.primary",children:vp.j.sessionIntroAdjustDeviceFit}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Guide the user through fitting the device properly"})]}),privilege:"configurations",control:(0,p.jsx)(ho.Z,{}),checked:j,onChange:()=>{x(Js(Ys.U.actions.sessionIntroAdjustDeviceFitSet({setting:S(y)})))}}),g&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(Pd,{label:(0,p.jsxs)(m.Z,{sx:{transform:"translateY(9px)"},spacing:1,children:[(0,p.jsx)(v.Z,{color:"text.primary",children:vp.j.enableHandTrackingByDefault}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Automatically turn on hand tracking and show a short hand tracking tutorial. Cannot be enabled when wake controllers is on"}),(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:["Not supported on Quest 2. You can enable hand tracking on Quest 2 manually in-headset."," ",(0,p.jsx)(li.Q,{variant:"caption",href:Be.IW.metaHandTrackingQuest2,children:"Learn More"})]})]}),privilege:"configurations",control:(0,p.jsx)(ho.Z,{}),checked:Z,onChange:()=>{const e=!Z;x(Js(Ys.U.actions.enableHandTrackingByDefaultToggled())),e&&b&&x(Js(Ys.U.actions.sessionIntroWakeControllersSet({setting:vp.rc.DISABLED})))}})]}),h&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(Pd,{label:(0,p.jsxs)(m.Z,{sx:{transform:"translateY(9px)"},spacing:1,children:[(0,p.jsx)(v.Z,{color:"text.primary",children:vp.j.sessionInactivityTimeoutEnabled}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Require users to set a passcode to resume a session. Not supported on Meta firmware v85 and later\u2014on those devices, the inactivity timeout below will apply instead."})]}),privilege:"configurations",control:(0,p.jsx)(ho.Z,{}),checked:!1===w,onChange:()=>{x(Js(Ys.U.actions.sessionInactivityTimeoutEnabledToggled()))}}),!1===w&&(0,p.jsx)(i.Z,{paddingLeft:"58px",paddingTop:.5,children:(0,p.jsx)(Qi,{label:"Passcode Complexity",value:E,options:lg,onChange:D,privilege:"configurations",fullWidth:!0,SelectProps:{renderValue:e=>(0,o.get)(vp.Go,e,"Unknown")},constrainItemWidth:!0})})]}),c&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(Pd,{label:(0,p.jsxs)(m.Z,{sx:{transform:"translateY(9px)"},spacing:1,children:[(0,p.jsx)(v.Z,{color:"text.primary",children:vp.j.stationaryBoundaryByDefault}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"When off, a stationary boundary is set by default."})]}),privilege:"configurations",control:(0,p.jsx)(ho.Z,{}),checked:M,onChange:()=>{x(Js(Ys.U.actions.sessionStationaryBoundaryByDefaultEnabledToggled()))}})]}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(ee.Z,{title:"Meta requires all new users in-headset to review its safety recommendations, terms of service, and privacy policy",placement:"left",children:(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(ng.Z,{sx:{width:58,color:"text.secondary"}}),(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{color:"text.primary",children:vp.j.sessionIntroSafetyAndPolicies}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Review Meta's safety recommendations and accept terms of service"})]})]})})]})}),h&&(0,p.jsxs)(p.Fragment,{children:[d?(0,p.jsx)(Ie.Z,{sx:{paddingTop:3}}):(0,p.jsx)(i.Z,{sx:{paddingTop:3}}),(0,p.jsx)(ig,{title:"Inactive Session Behavior",children:(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(og,{}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Behavior after timeout reached"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Inactive sessions pause or automatically end, depending on the device's Meta firmware version."," ",(0,p.jsx)(li.Q,{variant:"body2",href:Be.IW.metaSharedModeSessionManagementReturnToSession,children:"Learn More"})]})]})]})})]}),d?(0,p.jsx)(Ie.Z,{sx:{paddingTop:3}}):(0,p.jsx)(i.Z,{sx:{paddingTop:3}}),(0,p.jsx)(ig,{title:"Ending the Session",children:(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(v.Z,{variant:"body2",children:"To end a session, users must explicitly press End Session in-headset on most Meta firmware versions."}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Once the session ends, local data is wiped and the user must go through the Session Intro Steps again to begin a new session."," ",(0,p.jsx)(li.Q,{variant:"body2",href:Be.IW.metaSharedModeSessionManagementEndSession,children:"Learn More"})]})]})}),C&&(0,p.jsxs)(p.Fragment,{children:[d?(0,p.jsx)(Ie.Z,{sx:{paddingTop:3}}):(0,p.jsx)(i.Z,{sx:{paddingTop:3}}),(0,p.jsx)(ig,{title:"Admin PIN Protected Settings",subtitle:(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",sx:{maxWidth:200},children:["Native settings are available by default in the Meta Shared Mode menus."," ",(0,p.jsx)(Fi._,{tooltipText:"Users can access these settings in Shared Mode by pressing the Meta button on a controller and navigating to settings",TooltipProps:{placement:"bottom"},children:(0,p.jsx)(cc.Z,{sx:{width:16,height:16,color:"text.secondary",verticalAlign:"middle"}})}),(0,p.jsx)("br",{}),(0,p.jsx)("br",{}),"Restrict access to certain settings by requiring"," ",(0,p.jsx)(li.Q,{variant:"body2",href:"https://help.managexr.com/en/articles/9102170-home-screen-admin-settings",children:"Admin PIN"})," ","to edit."]}),children:(0,p.jsx)(m.Z,{spacing:0,children:vp.cE.map(((e,t)=>{var n;const{title:o,subtitle:a}
3=vp.Ul[e],r="softwareupdate"===e||"usbdebugging"===e,l=null!==(n=k[e])&&void 0!==n?n:r,s=I[e],d="wifi"===e||"guardian"===e?(0,p.jsxs)(p.Fragment,{children:[a," ",(0,p.jsx)(li.Q,{variant:"body2",href:Be.IW.toolbarOptions,children:"toolbar shortcut"})]}):a;return(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(i.Z,{sx:{paddingY:3},children:(0,p.jsx)(Pd,{label:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{color:"text.primary",sx:{display:"flex",alignItems:"center",gap:1},children:[(0,p.jsx)(s,{sx:{width:24,height:24,color:"text.secondary"}}),o]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:d})]}),privilege:"configurations",control:(0,p.jsx)(ho.Z,{sx:{transform:"wifi"===e||"guardian"===e?"translateY(-24px)":"translateY(-14px)"}}),checked:l,onChange:()=>(e=>{x(Js(Ys.U.actions.adminPinProtectedSettingToggled({setting:e})))})(e)})}),t<vp.cE.length-1&&(0,p.jsx)(Ie.Z,{})]},e)}))})})]})]})};sg.displayName="ConfigurationDeviceExperienceTabMeta";var dg=n(89007),cg=n(15473),ug=n(34257);const pg=e=>{let{label:t,value:n,onChange:r,privilege:l,disabled:s=!1,useAlpha:d=!1}=e;const c=a.useRef(null),[u,h]=a.useState(!1),[g,v]=a.useState(""),[C,x]=a.useState(0),f=(0,a.useCallback)((()=>{const e=(0,ul._$)(n);v(e.hex),x(e.alpha)}),[n]);(0,a.useEffect)((()=>{f()}),[f]);const b=(0,a.useCallback)((e=>!isNaN(e)&&e>=0&&e<=100),[]);return(0,p.jsx)(zi.W,{privilege:l,children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-end",spacing:1,children:[(0,p.jsx)(i.Z,{ref:c,width:40,height:40,borderRadius:1,bgcolor:n,onClick:()=>{s||h(!0)},sx:{border:"1px solid",borderColor:"grey.400",cursor:s?void 0:"pointer","&:hover":{borderColor:s?void 0:"grey.900"}}}),(0,p.jsx)(cg.ZP,{open:u,anchorEl:c.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},onClose:()=>h(!1),children:(0,p.jsx)(ug.AI,{color:n,onChange:e=>{if(s)return;const t=d&&(0,o.isNumber)(e.rgb.a)?Math.round(100*e.rgb.a):100;x(t);const n=e.hex.toUpperCase();v(n);const i=d?(0,ul.Ae)(n,t):n;r(i)},disableAlpha:!d})}),(0,p.jsx)(Ln.Z,{label:t,value:(0,o.replace)(g,"#",""),onChange:e=>(e=>{if(s)return;const t="#".concat(e.toUpperCase());if(v(t),!(0,ul.Uq)(t))return;const n=d?(0,ul.Ae)(t,C):t;r(n)})(e.target.value),InputProps:{startAdornment:"#",endAdornment:(0,p.jsx)(mo.Z,{position:"end",children:d&&(0,p.jsx)(Ln.Z,{value:isNaN(C)?"":C,onChange:e=>(e=>{if(s)return;const t=Math.round(parseInt(e));x(t),b(t)&&(0,ul.Uq)(g)&&r((0,ul.Ae)(g,t))})(e.target.value),disabled:s,onBlur:()=>{b(C)||f()},inputProps:{inputMode:"numeric"},InputProps:{endAdornment:(0,p.jsx)(mo.Z,{position:"end",children:"%"})},sx:{minWidth:40,"& .MuiOutlinedInput-root":{backgroundColor:"transparent",padding:0,color:y.DG.grey[800]},"& .MuiOutlinedInput-input":{textAlign:"right",paddingLeft:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputLabel-root":{color:"transparent"},"& .MuiInputAdornment-root":{marginLeft:0}}})})},placeholder:"FFFFFF",error:!(0,ul.Uq)(g)||!b(C),helperText:(0,ul.Uq)(g)?b(C)?"":"Please enter an opacity between 0 and 100":"Please enter a valid 6-digit hex",sx:{width:200},disabled:s,onBlur:()=>{(0,ul.Uq)(g)||f()}})]})})},hg=()=>{const e=(0,u.I0)(),{documents:t}=(0,E.jV)(S.F.HomeScreenColorThemes,{sort:(0,a.useCallback)(((e,t)=>"default"===e.id?-1:e.name.localeCompare(t.name)),[])}),n=(()=>{const e=Xs((e=>e));return qs(e)})(),i=(0,a.useCallback)((t=>{e(Js("custom"===t?Ys.U.actions.homeScreenCustomColorsSet({customColors:{...n.colors}}):Ys.U.actions.homeScreenColorThemeSet({colorThemeId:t})))}),[e,n.colors]),r=(0,a.useCallback)(((t,i)=>{e(Js(Ys.U.actions.homeScreenCustomColorsSet({customColors:{...n.colors,[t]:i}})))}),[n.colors,e]);return(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(ig,{title:"Select a Theme",useDivider:!0,children:(0,p.jsx)(Qi,{label:"Color Theme",value:n.id,options:[...(0,o.map)(t,(e=>({value:e.id,label:e.name}))),{label:"Custom",value:"custom"}],onChange:i,privilege:"configurations"})}),(0,p.jsx)(ig,{title:"Customize Theme",children:(0,p.jsx)(m.Z,{spacing:4,children:(0,o.map)((0,o.chunk)((0,o.values)(Gs),2),(e=>{let[t,i]=e;return(0,p.jsxs)(m.Z,{direction:"row",spacing:4,children:[(0,p.jsx)(pg,{label:Hs[t],value:n.colors[t],onChange:e=>
3r(t,e),privilege:"configurations",useAlpha:t===Gs.MenuBackground},t),(0,p.jsx)(pg,{label:Hs[i],value:n.colors[i],onChange:e=>r(i,e),privilege:"configurations",useAlpha:i===Gs.MenuBackground},i)]},"".concat(t).concat(i))}))})})]})},mg=e=>(0,p.jsx)($n.Z,{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,p.jsx)("g",{id:"360",children:(0,p.jsx)("path",{id:"Vector",d:"M12 7C6.48 7 2 9.24 2 12C2 14.24 4.94 16.13 9 16.77V20L13 16L9 12V14.73C5.85 14.17 4 12.83 4 12C4 10.94 7.04 9 12 9C16.96 9 20 10.94 20 12C20 12.73 18.54 13.89 16 14.53V16.58C19.53 15.81 22 14.05 22 12C22 9.24 17.52 7 12 7Z",fill:"#BEBFC6"})})}),gg=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 24 24",fill:"none",children:(0,p.jsxs)("g",{transform:"translate(-5.57, 0) scale(0.21429)",children:[(0,p.jsx)("path",{d:"M61.4756 21.0479L75.1816 22.2959C76.2114 22.3898 76.9998 23.2531 77 24.2871V60.7051C77 61.4223 76.6166 62.081 76.002 62.4365L75.876 62.5029L67.3018 66.6807C66.9742 66.8402 66.61 66.9071 66.249 66.875L66.0947 66.8545L51.6689 64.4336C50.7058 64.2719 50.0002 63.4385 50 62.4619V25.75C50 24.9167 50.5156 24.1771 51.2832 23.8828L51.4404 23.8301L60.7344 21.1191C60.9146 21.0666 61.101 21.0396 61.2881 21.0391L61.4756 21.0479Z",fill:"#F7F7F8",stroke:"#E4E5E7",strokeWidth:"2"}),(0,p.jsx)("path",{d:"M105.78 39.5254C106.39 39.2966 107.071 39.3802 107.605 39.7432L107.71 39.8193L114.228 44.8887C114.715 45.2675 115 45.8498 115 46.4668V62.1016C115 63.1118 114.25 63.9521 113.269 64.084L113.069 64.1006L90.0693 64.8936C88.9384 64.9326 88 64.0261 88 62.8945V47.5791L88.0059 47.4238C88.0615 46.7052 88.5011 46.0711 89.1543 45.7666L89.2979 45.7061L105.78 39.5254Z",fill:"#F7F7F8",stroke:"#E4E5E7",strokeWidth:"2"}),(0,p.jsx)("path",{d:"M65 67C65 67.5523 65.4477 68 66 68C66.5523 68 67 67.5523 67 67L65 67ZM65 27L65 67L67 67L67 27L65 27Z",fill:"#E4E5E7"}),(0,p.jsx)("path",{d:"M66.0487 27.6433C66.5978 27.7031 67.0913 27.3064 67.151 26.7574C67.2108 26.2083 66.8141 25.7148 66.2651 25.6551L66.0487 27.6433ZM50.8918 25.9941L66.0487 27.6433L66.2651 25.6551L51.1082 24.0059L50.8918 25.9941Z",fill:"#E4E5E7"}),(0,p.jsx)("path",{d:"M76.6207 24.4759C77.1485 24.3135 77.4448 23.7539 77.2824 23.2261C77.1199 22.6982 76.5604 22.4019 76.0325 22.5644L76.6207 24.4759ZM66.4513 27.6049L76.6207 24.4759L76.0325 22.5644L65.8631 25.6934L66.4513 27.6049Z",fill:"#E4E5E7"}),(0,p.jsx)("path",{d:"M115.037 46.9993C115.589 46.9789 116.02 46.5149 115.999 45.963C115.979 45.4111 115.515 44.9802 114.963 45.0007L115.037 46.9993ZM88.037 47.9993L115.037 46.9993L114.963 45.0007L87.963 46.0007L88.037 47.9993Z",fill:"#E4E5E7"})]})});var vg=n(92391),Cg=n(18590),xg=n(53689),fg=n(61134),bg=n(42531);const yg=(0,a.memo)((e=>{let{value:t,onSubmit:n,onBlur:r=(()=>{}),textFieldProps:l,registerOptions:s,externalValue:d,externalValueKey:c,sx:u}=e;const h=(0,a.useRef)(),m=(0,a.useRef)(t),{register:g,handleSubmit:v,formState:C,setValue:x}=(0,fg.cI)({defaultValues:{value:t}});(0,a.useEffect)((()=>{void 0!==d&&x("value",d)}),[d,c,x]);const f=v((e=>{let{value:t}=e;if(t!==m.current){const e=n(t);if(e)return e.finally((()=>{r()}));r()}else r()}));(0,a.useLayoutEffect)((()=>{C.isSubmitted&&C.errors.value&&r()}),[C.errors.value,C.isSubmitted,r]);const{ref:b,...y}=g("value",{...null!==s&&void 0!==s?s:{},onBlur:f}),j={variant:"standard",margin:"none",inputRef:b,autoFocus:!0,fullWidth:!0,onKeyDown:e=>{var t;(0,bg.$)(e)&&(x("value",m.current),null===(t=h.current)||void 0===t||t.blur())},error:!!C.errors.value,disabled:C.isSubmitting,...y},Z=(0,o.merge)(j,l);return(0,p.jsxs)(i.Z,{component:"form",onSubmit:f,noValidate:!0,autoComplete:"off",sx:u,children:[(0,p.jsx)(Ln.Z,{...Z}),(0,p.jsx)("button",{type:"submit",hidden:!0})]})}));var jg=n(7195);let Zg;!function(e){e.GLTF="GLTF",e.GLB="GLB",e.MXRUS="MXRUS"}(Zg||(Zg={}));const wg=()=>{const e=(0,Le.ye)("enableSupportingGlbAndGltfEnvironments");return t=>{const n=t.toLocaleLowerCase().split(".").pop();if("mxrus"===n)return Zg.MXRUS;if(e)switch(n){case"gltf":return Zg.GLTF;case"glb":return Zg.GLB;default:return null}return null}};var Eg=n(65532),Sg=n(74569),Dg=n.n(Sg);const Mg={"image/png":[".png"],"image/jpeg":[".jpeg",".jpg"]},kg=e=>"apps/".concat(e),Ig=e=>{const t="".concat(Date.now(),"_").concat(e.name);return"environmentFiles/".concat(t)},Ag=e=>{var t;const n=null===(t=Mg[e.type])||void 0===t?void 0:t[0];if(n)return"icon_".concat(Date.now()).concat(n)},Rg=(e,t)=>
3{const n=Ag(t);if(n)return"".concat(kg(e),"/icons/").concat(n)},Tg=e=>"configurations/".concat(e),Pg=(e,t,n)=>{var i;const a=null===(i=Mg[t.type])||void 0===i?void 0:i[0];if(!a)return;const r="".concat((0,o.replace)(n,"Url",""),"_").concat(Date.now()).concat(a);return"".concat(Tg(e),"/").concat(r)},Lg=Gt({concurrency:3,maxSize:1073741824}),Ng=async e=>{const{organizationId:t,file:n,filePath:i,isPublic:a=!1,abortController:r,onComplete:l,onError:s,onProgress:d=(()=>{})}=e;try{d({queued:!0,percentComplete:0,secondsRemaining:Number.POSITIVE_INFINITY});const e=await Lg.add((async()=>{const{uploadUrl:e,storageUrl:o,contentType:a}=await(0,Fe.hd)({organizationId:t},{filePath:i,contentType:n.type}),l=Date.now();return await Dg().request({method:"put",url:e,data:n,headers:{"content-type":a},onUploadProgress:e=>{const t=e.loaded/e.total*100,n=(Date.now()-l)/1e3,i=e.loaded/n,o=e.total-e.loaded,a=Math.round(o/i);d({percentComplete:t,secondsRemaining:a})},signal:null===r||void 0===r?void 0:r.signal}),o}),{size:n.size});if(a){const{downloadUrl:n}=await(0,Fe.Wj)({organizationId:t},{storageUrl:e,persistent:!0});l({publicDownloadUrl:n,storageUrl:e})}else l({storageUrl:e})}catch(c){Dg().isCancel(c)?l():((0,Si.yR)(c,{name:"file upload error",contexts:{file:{...(0,o.pick)(n,["type","size","name"]),filePath:i},response:{status:(0,o.get)(c,"response.status"),data:(0,o.get)(c,"response.data")}}}),s((0,o.pick)(c,["code","message","name","stack"])))}},Ug=e=>new Promise(((t,n)=>{Ng({...e,onComplete:t,onError:n})})),Fg=(0,a.memo)((e=>{let{helperText:t,header:n,sx:a}=e;return(0,p.jsxs)(i.Z,{sx:{pointerEvents:"none",paddingY:1,paddingX:1.5,borderRadius:1,"& ul":{margin:0,padding:0,paddingLeft:1.5},...a},children:[n&&(0,p.jsx)(v.Z,{variant:"subtitle2",noWrap:!0,children:n}),(0,o.isString)(t)&&(0,p.jsx)(v.Z,{variant:"caption",children:t}),(0,o.isArray)(t)&&(0,p.jsx)("ul",{children:t.map(((e,t)=>(0,p.jsx)(v.Z,{variant:"caption",component:"li",minWidth:140,children:e},t)))})]})})),Og="-8px",_g="helper-text",zg=e=>{let{label:t,helperText:n,hasFile:o,previewComponent:r,accept:l=Mg,onFileUploaded:s,getFilePath:d,validate:c=(async()=>{}),onClear:u,openFileDialogRef:h,privilege:m,disabled:g=!1,modified:v=!1,circle:C=!1,isPublicFileUpload:f=!1,onFileSelected:b,externalUploadMode:j=!1,externalUploadProgress:Z,hasError:E=!1,onInteract:S}=e;const{privileges:D}=(0,w.P)(),M=(!m||D[m])&&!g,k={position:"absolute",top:0,left:0,width:1,height:1},{uploadProgress:I,dropzone:A}=(e=>{const{onFileUploaded:t,getFilePath:n,accept:i,validate:o=(async()=>{}),dropzoneOptions:r={},isPublic:l}=e,{organizationId:s}=(0,w.P)(),{notify:d}=(0,ie.o)(),[c,u]=(0,a.useState)(),p=(0,a.useRef)();return{uploadProgress:c,dropzone:(0,Eg.uI)({accept:i,multiple:!1,onDropAccepted:async e=>{var i;const a=e[0];if(!a)return;const r=await o(a);if(r)return void d({severity:"error",message:r});const c=n(a);c&&(null===(i=p.current)||void 0===i||i.abort(),p.current=new AbortController,await Ng({organizationId:s,file:a,filePath:c,isPublic:l,abortController:p.current,onComplete:e=>{u(void 0),e&&t(e)},onError:()=>{u(void 0),d({severity:"error",message:"Failed to upload file"})},onProgress:e=>u(e)}))},...r})}})({onFileUploaded:s||(()=>{}),getFilePath:d,validate:c,accept:l,isPublic:f}),R=(0,Eg.uI)({accept:l,multiple:!1,noClick:!!S,onDropAccepted:e=>{const t=e[0];S?S(t):t&&b&&b(t)},onDropRejected:e=>{var t;const n=null===(t=e[0])||void 0===t?void 0:t.file;S?S(n):n&&b&&b(n)}}),T=(0,a.useCallback)((e=>{S&&(e.preventDefault(),e.stopPropagation(),S())}),[S]),P=j?R:A,L=j?Z:I;h&&(h.current=P.open);const N=C?"50%":"4px",U=M?S?P.getRootProps({onClick:T}):P.getRootProps():{};return(0,p.jsxs)(i.Z,{sx:{borderRadius:N,position:"relative",width:1,height:1,color:"common.white",cursor:M?"pointer":"inherit",backgroundColor:r?"unset":y.DG.grey[700],["&:hover .".concat(_g)]:{display:g?"none":"block"}},children:[(0,p.jsxs)(i.Z,{...U,sx:{...k,overflow:"hidden",borderRadius:N,outline:"none","&:hover .dropzoneBorderOnHover":{borderColor:E?"error.main":y.DG.primary[100]}},children:[M&&(0,p.jsx)("input",{...P.getInputProps()}),(0,p.jsx)(i.Z,{sx:k,children:r}),(0,p.jsx)(i.Z,{className:_g,sx:{...k,display:o||g?"none":"block",backgroundColor:r?"rgba(0, 0, 0, 0.6)":y.DG.grey[700],color:"white"},children:(0,p.jsx)(Fg,{helperText:n,header:t,sx:{color:"white"}})}),M&&(0,p.jsx)(i.Z,{className:"dropzoneBorderOnHover",sx:{...k,borderRadius:N,pointerEvents:"none",borderWidth:3,borderStyle:"dashed",borderColor:E?"error.main":v?"warning.light":P.isDragAccept?"primary.light":"grey.400"}})]}),(o||E)&&u&&M&&(0,p.jsx)(x.Z,{"aria-label":"Clear ".concat(null!==t&&void 0!==t?t:"Image"),sx:{position:"absolute",top:C?0:e=>e.spacing(1),right:C?0:e=>e.spacing(1),backgroundColor:"grey.700"},color:"inherit",onClick:u,children:(0,p.jsx)(J.Z,{fontSize:"inherit"})}),(0,p.jsx)(i.Z,{sx:{...k,pointerEvents:"none",zIndex:2},children:L&&(C?(0,p.jsx)(Zi.Z,{color:"primary",variant:null!==L&&void 0!==L&&L.queued?"indeterminate":"determinate",value:null===L||void 0===L?void 0:L.percentComplete,size:"calc(100% + 16px)",sx:{"& circle":{strokeWidth:.8},position:"absolute",top:Og,left:Og}}):(0,p.jsx)(Rn.Z,{color:"primary",variant:null!==L&&void 0!==L&&L.queued?"indeterminate":"determinate",value:null===L||void 0===L?void 0:L.percentComplete}))})]})},Bg=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 61 60",children:(0,p.jsx)("path",{d:"M49.5625 16.8L32.7875 7.26C31.3845 6.45 29.6155 6.45 28.2125 7.26L11.4375 16.8C10.0345 17.61 9.15 19.08 9.15 20.7V39.75C9.15 41.37 10.0345 42.84 11.4375 43.65L28.2125 53.19C29.6155 54 31.3845 54 32.7875 53.19L49.5625 43.65C50.9655 42.84 51.85 41.37 51.85 39.75V20.7C51.85 19.08 50.9655 17.61 49.5625 16.8ZM15.25 38.88V25.
302L27.45 31.98V45.81L15.25 38.88ZM30.5 26.79L18.3 19.83L30.5 12.9L42.7 19.83L30.5 26.79ZM33.55 45.81V31.98L45.75 25.02V38.88L33.55 45.81ZM15.25 0H4.575C2.0435 0 0 2.01 0 4.5V15H6.1V6H15.25V0ZM45.75 0H56.425C58.9565 0 61 2.01 61 4.5V15H54.9V6H45.75V0ZM15.25 60H4.575C2.0435 60 0 57.99 0 55.5V45H6.1V54H15.25V60ZM45.75 60H56.425C58.9565 60 61 57.99 61 55.5V45H54.9V54H45.75V60Z",fill:"currentColor"})}),Wg=()=>(0,p.jsx)(i.Z,{sx:{height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(to bottom, ".concat(y.DG.grey[100],", ").concat(y.DG.grey[300],")")},children:(0,p.jsxs)(m.Z,{alignItems:"center",justifyContent:"center",gap:1,sx:{height:"100%"},children:[(0,p.jsx)(Bg,{sx:{height:60,width:60,color:y.DG.grey[400]}}),(0,p.jsx)(v.Z,{variant:"h5",color:"textSecondary",children:"Preview not available for this file"})]})}),Vg=225,Gg=450,Hg=(0,a.forwardRef)(((e,t)=>{let{label:n="Environment File",helperText:o,onClear:r,onFileSelected:l,hasFile:s=!1,previewImageUrl:d,showPreviewUnavailable:c=!1,hasError:u=!1,fileTypeError:h,uploadProgress:g,isUploading:C,onInteract:x,dropzoneWidth:f=Gg,dropzoneHeight:b=Vg,showClearButton:y=!0}=e;const j=(0,Le.ye)("enableSupportingGlbAndGltfEnvironments"),Z=(0,a.useMemo)((()=>{const e={"application/octet-stream":[".mxrus"]};return j?{...e,"model/gltf+json":[".gltf"],"model/gltf-binary":[".glb"]}:e}),[j]),w=(0,a.useMemo)((()=>j?["GLTF, GLB, or MXRUS files","30MB or less recommended"]:["MXRUS files","30MB or less recommended"]),[j]);(0,a.useImperativeHandle)(t,(()=>({open:()=>{}})),[]);const E=(0,a.useRef)((()=>{}));(0,a.useImperativeHandle)(t,(()=>({open:()=>{var e;null===(e=E.current)||void 0===e||e.call(E)}})),[]);const S=(0,a.useMemo)((()=>c?(0,p.jsx)(Wg,{}):d?(0,p.jsx)(i.Z,{sx:{width:"100%",height:"100%",backgroundImage:"url(".concat(d,")"),backgroundPosition:"center",backgroundSize:"cover",backgroundRepeat:"no-repeat"}}):void 0),[d,c]);return(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsxs)(i.Z,{width:f,height:b,position:"relative",children:[(0,p.jsx)(zg,{label:n,helperText:o||w,hasFile:s,accept:Z,getFilePath:Ig,disabled:C,onClear:y&&(c||u)&&!C?r:void 0,privilege:"configurations",externalUploadMode:!0,onFileSelected:l,externalUploadProgress:g,hasError:u,previewComponent:S,openFileDialogRef:E,onInteract:x}),(0,p.jsx)(v.Z,{variant:"caption",color:h?"error.main":"textSecondary",children:h||""})]})})}));var qg=n(59434),Yg=n(39548);const Kg=e=>{let{open:t,onClose:n,onSuccess:i,onError:o,environmentFileDropzoneProps:r}=e;const l=(0,u.I0)(),{organizationId:s}=(0,w.P)(),{notify:d}=(0,ie.o)(),c=(0,Le.ye)("enableSupportingGlbAndGltfEnvironments"),h=wg(),{selectedFile:g}=r||{},[x,f]=(0,a.useState)(""),[b,y]=(0,a.useState)();(0,a.useEffect)((()=>{f(g?g.name:"")}),[g]);const j=(0,qg.v9)((e=>{var t,n;return b&&s?null===(t=e.environmentFiles.environmentFileUploads[s])||void 0===t||null===(n=t[b])||void 0===n?void 0:n.uploadProgress:null})),Z=!!b&&!!j,E=(0,a.useCallback)((async()=>{if(!g)return;const e={name:x||g.name,fileType:h(g.name),size:g.size,organizationId:s};var t;l((t={formData:e,environmentFile:g,organizationId:s,onStart:e=>{y(e)},onSuccess:e=>{d({severity:"success",message:'Environment file "'.concat(e.name,'" uploaded successfully!')}),y(void 0),null===i||void 0===i||i(e),n()},onError:e=>{var t;const n=(0,Fe.tf)(e);d({severity:"error",message:null!==(t=null===n||void 0===n?void 0:n.message)&&void 0!==t?t:"Error creating environment file"}),y(void 0),null===o||void 0===o||o(e)}},async(e,n)=>{const{organizationId:i,formData:o,environmentFile:a,onStart:r,onSuccess:l,onError:s}=t,d=Ig(a),c=(0,Vt.Z)();try{e(Yg.q.actions.environmentFileUploadStarted({organizationId:i,uploadId:c,formData:o})),r&&r(c);const t=await Ug({organizationId:i,file:a,filePath:d,onProgress:t=>{e(Yg.q.actions.environmentFileUploadProgress({organizationId:i,uploadId:c,uploadProgress:t}))}});if(!t)return;const{storageUrl:n}=t;e(Yg.q.actions.environmentFileUploadDocumentPending({organizationId:i,uploadId:c}));const s=await(0,Fe.Eh)({organizationId:i},{...o,url:n});e(Yg.q.actions.environmentFileUploadComplete({organizationId:i,uploadId:c,environmentFileId:s.id})),l&&l(s)}catch(u){(0,Si.yR)(u,{name:"create environment file error",contexts:{requestData:{...o,filePath:d}}}),s&&s(u)}}))}),[g,s,l,d,i,o,n,x,h]),S=(0,a.useCallback)((()=>{Z||n()}),[Z,n]),D=(0,a.useCallback)((()=>c?"Upload an existing 3D file or use our Unity plug-in to quickly exp
3ort an .mxrus environment.":"Upload an .mxrus environment file or use our Unity plug-in to quickly export an .mxrus environment."),[c]);return(0,p.jsxs)(kn.Z,{open:t,onClose:S,maxWidth:"xs",fullWidth:!0,children:[(0,p.jsx)(In.Z,{children:(0,p.jsx)(v.Z,{variant:"h6",children:"Upload a 3D Environment"})}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:5,sx:{marginTop:1},children:[(0,p.jsxs)(v.Z,{variant:"body2",children:[D()," ",(0,p.jsxs)(Kn.Z,{href:Be.IW.installUnityPlugin,target:"_blank",rel:"noopener noreferrer",sx:{display:"inline-flex",flexDirection:"row",alignItems:"center"},children:[(0,p.jsx)("span",{children:"Install our Unity Plug-in"}),"\xa0",(0,p.jsx)(Mu.Z,{sx:{fontSize:"1em",transform:"translateY(-1px)"}})]})]}),(0,p.jsx)(Hg,{uploadProgress:j,isUploading:Z,dropzoneWidth:400,dropzoneHeight:150,showClearButton:!1,...r}),(0,p.jsx)(Ln.Z,{label:"Nickname this asset",value:x,onChange:e=>f(e.target.value),disabled:!g||Z,fullWidth:!0,size:"small",placeholder:"Nickname",sx:{paddingBottom:4}})]})}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(Pn.Z,{sx:{padding:3},children:(0,p.jsx)(C.Z,{variant:"contained",onClick:E,disabled:Z||!g||(null===r||void 0===r?void 0:r.hasError),children:(0,p.jsx)(v.Z,{variant:"body2",children:Z?"Uploading...":"Upload Custom"})})})]})},Xg=()=>{const e=(0,u.I0)(),{organizationId:t}=(0,w.P)(),{notify:n}=(0,ie.o)(),r=wg(),l=(0,Le.ye)("enableSupportingGlbAndGltfEnvironments"),[s,d]=(0,a.useState)(),[c,h]=(0,a.useState)(),[g,f]=(0,a.useState)(),[b,y]=(0,a.useState)(null),{documents:j}=(0,E.D)(S.F.EnvironmentFiles),{documents:Z}=(0,E.D)(S.F.Configurations),{defaultOptions:D,customOptions:M}=(0,a.useMemo)((()=>({defaultOptions:[{id:$h.mxrBungalow,name:nm[$h.mxrBungalow]}],customOptions:j.map((e=>({id:e.id,name:e.name||"Unnamed Environment File"}))).sort(((e,t)=>e.name.localeCompare(t.name)))})),[j]),k=om($h.mxrBungalow),I=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.environmentFileId}));(0,a.useEffect)((()=>{const e=[...D,...M],t=e.find((e=>e.id===I));d(t||e[0])}),[I,D,M]),(0,a.useEffect)((()=>{f(void 0)}),[I]);const A=g?void 0:I,R=A===$h.mxrBungalow,T=(0,z.l)(S.F.EnvironmentFiles,A),P=om(null!==A&&void 0!==A?A:void 0),L=(0,a.useRef)(),[N,U]=(0,a.useState)(!1),[F,O]=(0,a.useState)(!1),_=(0,a.useMemo)((()=>{if(g){const e=null===r(g.name);return{hasFile:!0,hasError:e,fileTypeError:e?l?"Invalid file type. Use one of the supported file types .mxrus, .glb, or .gltf":"Invalid file type. Use .mxrus files only":void 0,previewUrl:void 0,showPreviewUnavailable:!e,fileName:g.name}}return T||R?{hasFile:!0,hasError:!1,fileTypeError:void 0,previewUrl:R?P:void 0,showPreviewUnavailable:!R,fileName:(null===T||void 0===T?void 0:T.name)||"Default Environment"}:{hasFile:!1,hasError:!1,fileTypeError:void 0,previewUrl:void 0,showPreviewUnavailable:!1,fileName:void 0}}),[g,T,R,P,r,l]),B=(0,a.useCallback)((t=>{U(!1),e(Js(Ys.U.actions.homeScreenEnvironmentFileIdSet({environmentFileId:t.id})))}),[e]),W=(0,a.useCallback)((t=>{e(Js(Ys.U.actions.homeScreenEnvironmentFileIdSet({environmentFileId:t.id})))}),[e]),V=(0,a.useCallback)((()=>{e(Js(Ys.U.actions.homeScreenEnvironmentFileIdSet({environmentFileId:$h.mxrBungalow}))),f(void 0)}),[e]),G=(0,a.useCallback)((()=>{U(!1),O(!0)}),[]),H=(0,a.useCallback)((e=>{e&&f(e),O(!0)}),[]),q=(0,a.useCallback)((()=>{O(!1),f(void 0)}),[]),Y=(0,a.useCallback)(((e,t)=>{t.stopPropagation(),t.preventDefault(),y(e),h(void 0)}),[]),K=(0,a.useCallback)((async(e,i)=>{if(i.trim())try{await(0,Fe._d)({organizationId:t,environmentFileId:e},{name:i.trim()}),n({severity:"success",message:"Environment file name updated"}),y(null)}catch(a){var o;const e=(0,Fe.tf)(a);n({severity:"error",message:null!==(o=null===e||void 0===e?void 0:e.message)&&void 0!==o?o:"Error updating environment file name"}),y(null)}else y(null)}),[t,n]),X=(0,a.useCallback)((()=>{y(null)}),[]),Q=(0,a.useCallback)((async e=>{try{await(0,Fe.iA)({organizationId:t,environmentFileId:e.id}),n({severity:"success",message:"Environment file deleted"})}catch(o){var i;const e=(0,Fe.tf)(o);n({severity:"error",message:null!==(i=null===e||void 0===e?void 0:e.message)&&void 0!==i?i:"Error deleting environment file"})}}),[t,n]),J=(0,a.useCallback)((e=>{const t=Z.filter((t=>{var n,i;return(null===(n=t.customLauncherSettings)||void 0===n||null===(i=n.backgroundSettings)||void 0===i?void 0:i.environmentFileId)===e.id}));return 0===t.length?'Are you sure you want to delete "'.concat(e.name,'"?'):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.Z,{variant:"body2",color:"textSecondary",paragraph:!0,children:[t.length," configuration",1===t.length?" is":"s are"," currently using this environment file. If you delete it, those configuration",1===t.length?" will":"s will"," be updated to use the default environment file."]}),(0,p.jsxs)(v.Z,{variant:"body2",children:['Are you sure you want to delete "',e.name,'"?']})]})}),[Z]),$=Bn({onConfirm:Q,title:"Delete Environment File",getContent:J}),ee=(0,a.useCallback)((e=>{const t=b===e.id,n=D.some((t=>
3t.id===e.id));return(0,p.jsxs)(oi.Z,{selected:(null===s||void 0===s?void 0:s.id)===e.id,onMouseEnter:()=>{t||h(e)},onMouseLeave:()=>{t||h((t=>(null===t||void 0===t?void 0:t.id)===e.id?void 0:t))},onClick:()=>{t||B(e)},sx:{pl:3},children:[(0,p.jsx)(Rs.Z,{children:t?(0,p.jsx)(yg,{value:e.name,onSubmit:t=>K(e.id,t),onBlur:X,sx:{width:1},textFieldProps:{inputProps:{style:{fontSize:"1rem"}}},registerOptions:{required:"Name is required",validate:e=>e.trim().length>0||"Name cannot be empty"}}):(0,p.jsx)(v.Z,{variant:"body1",color:"textPrimary",children:e.name})}),!n&&!t&&(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[(0,p.jsx)(x.Z,{size:"small",onClick:t=>Y(e.id,t),children:(0,p.jsx)(jg.Z,{fontSize:"small"})}),(0,p.jsx)(x.Z,{size:"small",onClick:t=>{t.stopPropagation(),t.preventDefault(),$.trigger(j.find((t=>t.id===e.id)))},children:(0,p.jsx)(Gl.Z,{fontSize:"small"})})]})]},e.id)}),[b,D,null===s||void 0===s?void 0:s.id,X,B,K,Y,$,j]);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(fs.Z,{children:[(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsx)(ys.Z,{value:"",ref:L,size:"small",onOpen:()=>{U(!0)},open:N,displayEmpty:!0,renderValue:()=>(null===s||void 0===s?void 0:s.name)||"Select Environment File",MenuProps:{sx:{display:"none"}}})}),(0,p.jsx)(cg.ZP,{open:N,onClose:()=>{U(!1),h(void 0)},anchorEl:L.current,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(i.Z,{width:450,height:225,margin:1,position:"relative",borderRadius:1,overflow:"hidden",sx:{backgroundColor:"grey.100"},children:(0,o.map)([...D,...M],(e=>{var t;const n=(null!==(t=null===c||void 0===c?void 0:c.id)&&void 0!==t?t:null===s||void 0===s?void 0:s.id)===e.id,o=D.some((t=>t.id===e.id))?k:void 0;return(0,p.jsx)(i.Z,{sx:{position:"absolute",top:0,left:0,width:1,height:1,visibility:n?"visible":"hidden",display:"flex",alignItems:"center",justifyContent:"center"},children:o?(0,p.jsx)(Vm,{imageUrl:o,imageFit:"cover",coverScale:1,sx:{width:1,height:1}}):(0,p.jsx)(Wg,{})},e.id)}))}),(0,p.jsx)(Ie.Z,{orientation:"vertical",flexItem:!0}),(0,p.jsx)(i.Z,{sx:{minWidth:200,maxHeight:400,overflow:"hidden"},children:(0,p.jsxs)(ii.Z,{dense:!0,sx:{maxHeight:400,overflow:"auto"},children:[(0,p.jsx)(oi.Z,{disabled:!0,children:(0,p.jsx)(Rs.Z,{children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"textSecondary",children:"Defaults"})})}),(0,o.map)(D,(e=>ee(e))),(0,p.jsx)(oi.Z,{disabled:!0,children:(0,p.jsx)(Rs.Z,{children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"textSecondary",children:"Custom"})})}),(0,p.jsx)(oi.Z,{onClick:G,sx:{pl:3},children:(0,p.jsx)(Rs.Z,{children:(0,p.jsx)(C.Z,{variant:"text",size:"small",sx:{textTransform:"none",p:0,minWidth:"auto"},children:(0,p.jsx)(v.Z,{variant:"body1",color:"textPrimary",children:"+ Upload"})})})}),(0,o.map)(M,(e=>ee(e)))]})})]})})]}),(0,p.jsx)(i.Z,{width:450,height:225,children:(0,p.jsx)(Hg,{onInteract:H,onClear:R?void 0:V,onFileSelected:f,selectedFile:g,hasFile:_.hasFile&&!_.hasError,previewImageUrl:_.previewUrl,showPreviewUnavailable:_.showPreviewUnavailable,hasError:_.hasError,fileTypeError:_.fileTypeError})}),(0,p.jsx)(Kg,{open:F,onClose:q,onSuccess:W,environmentFileDropzoneProps:{selectedFile:g,onFileSelected:f,onClear:g?V:void 0,hasFile:g&&!_.hasError,showPreviewUnavailable:!!g&&_.showPreviewUnavailable,hasError:_.hasError,fileTypeError:_.fileTypeError}}),(0,p.jsx)(Fn,{...$.props})]})},Qg=(e,t)=>(0,o.isUndefined)(t)?(0,o.endsWith)(e,"mp4")?".mp4":".mkv":"."+t,Jg={height:"100%",width:"100%"},$g=e=>{let{imageUrl:t,defaultImageUrl:n,onImageUploaded:o,validateDimensions:r=(()=>{}),useLargeImageRenderer:l=!1,LargeImageRendererProps:s,imageFit:d="contain",...c}=e;const u=(0,a.useCallback)((e=>{e.publicDownloadUrl&&o(e.publicDownloadUrl)}),[o]),h=(0,a.useMemo)((()=>{if(null!==t&&void 0!==t?t:n)return l?(0,p.jsx)(Vm,{...s,imageUrl:null!==t&&void 0!==t?t:n,sx:Jg}):(0,p.jsx)(i.Z,{sx:{backgroundImage:"url(".concat(null!==t&&void 0!==t?t:n,")"),backgroundPosition:"center",backgroundSize:d,backgroundRepeat:"no-repeat",...Jg}})}),[l,s,t,n,d]);return(0,p.jsx)(zg,{...c,hasFile:!!t,onFileUploaded:u,validate:async e=>{const{width:t,height:n}=await(e=>new Promise((t=>{const n=new Image,i=URL.createObjectURL(e);n.onload=()=>{const{width:e,height:i}=n;t({width:e,height:i}),URL.revokeObjectURL(n.src)},n.src=i})))(e);return r(t,n)},isPublicFileUpload:!0,previewComponent:h})};var ev=n(10889);const tv=e=>{let{value:t,onChange:n,onBlur:i=(()=>{}),min:o=0,max:a=Number.MAX_SAFE_INTEGER,step:r,inputProps:l={}}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,children:[(0,p.jsx)(ev.ZP,{value:"number"===typeof t?t:o,onChange:(e,t)=>
3{n(t)},min:o,max:a,step:r,"aria-labelledby":"input-slider"}),(0,p.jsx)(Ln.Z,{variant:"outlined",value:isNaN(t)?"":t,onChange:e=>{const t=parseInt(e.target.value,10);n(t)},size:"small",onBlur:i,inputProps:{inputMode:"numeric"},error:t<o||t>a||isNaN(t),sx:{maxWidth:"100px"},...l})]})},nv=e=>{let{backgroundRotation:t,onChange:n}=e;const[i,o]=(0,a.useState)(t),r=(0,a.useCallback)((()=>{o(t)}),[t]);(0,a.useEffect)((()=>{r()}),[r]);const l=(0,a.useCallback)((e=>e>=0&&e<360&&Number.isInteger(e)&&!isNaN(e)),[]);return(0,p.jsx)(m.Z,{spacing:3,children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(m.Z,{gap:1,flexDirection:"row",alignItems:"baseline",children:(0,p.jsx)(v.Z,{variant:"body2",color:y.DG.purple[700],children:"Rotate Background"})}),(0,p.jsx)(tv,{value:null!==i&&void 0!==i?i:0,onChange:e=>(e=>{o(e),l(e)&&n(e)})(e),onBlur:()=>{l(i)||r()},min:0,max:359,inputProps:{InputProps:{endAdornment:(0,p.jsx)(mo.Z,{position:"end",color:y.DG.purple[700],sx:{backgroundColor:"transparent"},children:"\xb0"})}}})]})})},iv=(0,a.memo)((e=>{let{options:t,value:n,onChange:i,privilege:r}=e;const l=(0,d.Vp)(),{privileges:s}=(0,w.P)(),c=!r||s[r],u=(0,a.useCallback)((e=>e.premiumFeature&&!(0,k.WP)(l,k.QV.Premium)),[l]),h=(0,a.useCallback)((e=>{var t;return c?e.disabled?null!==(t=e.disabledTooltip)&&void 0!==t?t:"":u(e)?"Upgrade to Premium to use this feature":"":"".concat((0,o.capitalize)(r)," privilege required to edit")}),[u,c,r]);return(0,p.jsx)(Oi.Z,{value:n,onChange:(e,t)=>
3i(t),children:(0,p.jsx)(m.Z,{direction:"row",spacing:1,children:(0,o.map)(t,((e,t)=>(0,p.jsx)(ee.Z,{title:h(e),followCursor:!0,placement:"right",children:(0,p.jsx)("span",{children:(0,p.jsx)(po.Z,{value:e.value,control:(0,p.jsx)(_i.Z,{}),label:e.label,disabled:e.disabled})})},t)))})})}));let ov;!function(e){e.MONOSCOPIC="monoscopic",e.STEREOSCOPIC="stereoscopic"}(ov||(ov={}));const av=e=>{let{packing:t,onChange:n}=e;const i=(0,a.useMemo)((()=>t===vp.U.NONE?ov.MONOSCOPIC:ov.STEREOSCOPIC),[t]);return(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(m.Z,{gap:1,flexDirection:"row",alignItems:"baseline",children:(0,p.jsx)(v.Z,{variant:"body2",color:y.DG.purple[700],children:"Background Image Display Type"})}),(0,p.jsx)(iv,{options:[{value:ov.MONOSCOPIC,label:"Monoscopic (most common)"},{value:ov.STEREOSCOPIC,label:"Stereoscopic"}],value:i,onChange:e=>{e===ov.MONOSCOPIC?n(vp.U.NONE):n(vp.U.TOP_BOTTOM)}})]}),i===ov.STEREOSCOPIC&&(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(m.Z,{gap:1,flexDirection:"row",alignItems:"baseline",children:(0,p.jsx)(v.Z,{variant:"body2",color:y.DG.purple[700],children:"Stereoscopic Packing"})}),(0,p.jsx)(iv,{options:[{value:vp.U.TOP_BOTTOM,label:"Top / Bottom"},{value:vp.U.LEFT_RIGHT,label:"Left / Right"}],value:t,onChange:n})]})]})},rv=(0,a.memo)((e=>{var t,n,r,l,s;let{label:d,imageKey:c}=e;const h=(0,u.I0)(),g=Ks(),v=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t[c]})),C=(0,Le.ye)("enableBackgroundImageRotation"),x=Be.vc.configuration.defaultLauncherBackgroundUrl,f=null!==(t=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.backgroundUrl})))&&void 0!==t?t:x,b="shortcutMenuBackgroundUrl"===c&&v===vp.v4.SyncWithBackgroundUrl,y=null!==(n=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.backgroundRotation})))&&void 0!==n?n:0,j=null!==(r=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.shortcutMenuBackgroundRotation})))&&void 0!==r?r:0,Z="shortcutMenuBackgroundUrl"===c?j:y,w=null!==(l=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.backgroundStereoPacking})))&&void 0!==l?l:vp.$Q,D=null!==(s=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.shortcutMenuBackgroundStereoPacking})))&&void 0!==s?s:vp.$Q,M="shortcutMenuBackgroundUrl"===c?D:w,k=b?f:x,{documents:I}=(0,E.jV)(S.F.HomeScreenBackgroundImages,{sort:ze.gt}),A=(0,a.useMemo)((()=>!!v&&v!==vp.v4.SyncWithBackgroundUrl&&!(0,o.find)(I,{imageUrl:v})),[I,v]),R=(0,a.useMemo)((()=>({id:"custom",name:"Custom",imageUrl:A&&v?v:x,previewUrl:A&&v?v:x})),[x,A,v]),T=(0,a.useMemo)((()=>({id:"synced",name:"Sync with Home Screen",imageUrl:vp.v4.SyncWithBackgroundUrl,previewUrl:f})),[f]),P=(0,a.useMemo)((()=>"shortcutMenuBackgroundUrl"===c?[...I,T,R]:[...I,R]),[I,R,c,T]),[L,N]=(0,a.useState)(R),[U,F]=(0,a.useState)();(0,a.useEffect)((()=>{var e;N(null!==(e=(0,o.find)(P,{imageUrl:v}))&&void 0!==e?e:R)}),[I,R,v,T,P]);const O=(0,a.useCallback)((e=>g?Pg(g,e,c):void 0),[g,c]),_=(0,a.useCallback)((e=>{h(Js(Ys.U.actions.launcherImageUrlSet({imageKey:c,url:e,isCustomUploadedBackgroundImage:!0})))}),[h,c]),z=(0,a.useCallback)(((e,t)=>{if(e>16384||t>8192)return"Image dimensions (".concat(e," x ").concat(t,") exceed the maximum allowed size of ").concat(16384," x ").concat(8192,". Please use an image with smaller dimensions.")}),[]),B=(0,a.useRef)((()=>{})),W=(0,a.useCallback)((()=>{const e="shortcutMenuBackgroundUrl"===c?vp.v4.SyncWithBackgroundUrl:null;h(Js(Ys.U.actions.launcherImageUrlSet({imageKey:c,url:e})))}),[h,c]),V=(0,a.useRef)(),[G,H]=(0,a.useState)(!1),q=b?w:M,Y=Qh(q),K=Jh(q);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(fs.Z,{children:[(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsx)(ys.Z,{value:"",ref:V,size:"small",onOpen:()=>{H(!0)},open:G,displayEmpty:!0,renderValue:()=>
3L.name,MenuProps:{sx:{display:"none"}}})}),(0,p.jsx)(cg.ZP,{open:G,onClose:()=>{H(!1),F(void 0)},anchorEl:V.current,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(i.Z,{width:450,height:225,margin:1,position:"relative",borderRadius:1,overflow:"hidden",children:(0,o.map)(P,(e=>{var t,n;return e.id===R.id||e.id===T.id?(0,p.jsx)(Vm,{imageUrl:e.previewUrl,imageFit:"cover",coverScale:.44,cropHalfAxis:Y,sx:{position:"absolute",top:0,left:0,width:1,height:1,visibility:(null!==(t=null===U||void 0===U?void 0:U.id)&&void 0!==t?t:L.id)===e.id?"visible":"hidden"}},e.id):(0,p.jsx)("img",{src:e.previewUrl,alt:e.name,width:"100%",height:"100%",style:{position:"absolute",visibility:(null!==(n=null===U||void 0===U?void 0:U.id)&&void 0!==n?n:L.id)===e.id?"visible":"hidden"}},e.id)}))}),(0,p.jsx)(Ie.Z,{orientation:"vertical",flexItem:!0}),(0,p.jsx)(ii.Z,{dense:!0,children:(0,o.map)(P,(e=>(0,p.jsx)(oi.Z,{selected:L.id===e.id,onMouseEnter:()=>F(e),onMouseLeave:()=>F((t=>(null===t||void 0===t?void 0:t.id)===e.id?void 0:t)),onClick:()=>(e=>{H(!1),e.id===R.id?(B.current(),A||h(Js(Ys.U.actions.launcherImageUrlSet({imageKey:c,url:null})))):h(Js(Ys.U.actions.launcherImageUrlSet({imageKey:c,url:e.imageUrl})))})(e),children:(0,p.jsx)(Rs.Z,{children:e.name})},e.id)))})]})})]}),(0,p.jsx)(i.Z,{width:450,height:225,children:(0,p.jsx)($g,{label:d,helperText:["JPEG or PNG","4096 x 2048 recommended"],imageUrl:b?null:v,defaultImageUrl:k,onImageUploaded:_,validateDimensions:z,getFilePath:O,onClear:W,privilege:"configurations",openFileDialogRef:B,useLargeImageRenderer:!0,LargeImageRendererProps:{imageFit:K,coverScale:.44,showDownloadProgress:!0,cropHalfAxis:Y}})}),A&&C&&!b&&(0,p.jsx)(nv,{backgroundRotation:Z,onChange:e=>{h(Js("shortcutMenuBackgroundUrl"===c?Ys.U.actions.homeScreenShortcutMenuBackgroundRotationSet({shortcutMenuBackgroundRotation:e}):Ys.U.actions.homeScreenBackgroundRotationSet({backgroundRotation:e})))}}),A&&(0,p.jsx)(av,{packing:M,onChange:e=>{h(Js("shortcutMenuBackgroundUrl"!==c?Ys.U.actions.homeScreenBackgroundStereoPackingSet({backgroundStereoPacking:e}):Ys.U.actions.homeScreenShortcutMenuBackgroundStereoPackingSet({shortcutMenuBackgroundStereoPacking:e})))}})]})})),lv=e=>{let{imageKey:t}=e;const n=(0,u.I0)(),i=Ks(),o=Xs((e=>e.customLauncherSettings&&e.customLauncherSettings[t])),r=(0,a.useCallback)((e=>i?Pg(i,e,t):void 0),[i,t]),l=(0,a.useCallback)((e=>{n(Js(Ys.U.actions.launcherImageUrlSet({imageKey:t,url:e})))}),[n,t]),s=(0,a.useCallback)((()=>{n(Js(Ys.U.actions.launcherImageUrlSet({imageKey:t,url:null})))}),[n,t]),[d,c]="topLogoUrl"===t?[300,100]:[200,100],h="".concat(d," x ").concat(c," recommended"),m=(0,a.useCallback)(((e,t)=>{const[n,i]=[3*d,3*c];if(e>n||t>i)return"Image dimensions must be less than ".concat(n," x ").concat(i)}),[c,d]);return(0,p.jsx)($g,{imageUrl:o,label:"".concat("topLogoUrl"===t?"Top":"Bottom"," Logo"),helperText:["JPEG or PNG",h],onImageUploaded:l,getFilePath:r,onClear:s,validateDimensions:m,privilege:"configurations"})};lv.displayName="ConfigurationLogo";const sv=e=>{let{title:t,children:n,height:o,width:a,titleVariant:r="body2",caption:l}=e;return(0,p.jsx)(zi.W,{privilege:pe.e.Configurations,children:(0,p.jsx)(i.Z,{width:450,children:(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsxs)(m.Z,{gap:1,flexDirection:"row",alignItems:"baseline",children:["string"===typeof t?(0,p.jsx)(v.Z,{variant:r,color:y.DG.purple[700],children:t}):t,(0,p.jsx)(v.Z,{variant:"caption",color:"textSecondary",children:l})]}),(0,p.jsx)(i.Z,{width:a,height:o,children:n})]})})})};var dv;!function(e){e.Environment3d="environment3dBackground",e.Immersive="immersiveBackground",e.ForcePassthrough="forcePassthrough"}(dv||(dv={}));const cv=()=>{const e=(0,u.I0)(),t=(0,Le.ye)("show3DEnvironmentOption"),n=(0,Le.ye)("enableCustomEnvironmentFileUpload"),o=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.forcePassthrough})),r=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.environmentFileId})),[l,s]=(0,a.useState)(null);(0,a.useEffect)((()=>{r&&r!==l&&s(r)}),[r,l]);const d={value:dv.Environment3d,label:"3D Environment",disabled:!1,borderStyle:"none",imageBox:(0,p.jsx)(i.Z,{width:112,height:70,alignContent:"center",sx:{padding:0,marginTop:"-20px"},children:(0,p.jsx)(gg,{sx:{fontSize:112}})})},c={value:dv.Immersive,label:"360 Image",disabled:!1,imageBox:(0,p.jsx)(i.Z,{width:110,height:50,alignContent:"center",sx:{backgroundColor:y.DG.grey[100],padding:1.5},children:(0,p.jsx)(mg,{})})},h={value:dv.ForcePassthrough,label:"Passthrough",disabled:!1,imageBox:(0,p.jsx)(i.Z,{width:110,height:50}),borderStyle:"dashed"},g=t?[d,c,h]:[c,h],C=o?dv.ForcePassthrough:r?dv.Environment3d:dv.Immersive,x=C===dv.Environment3d&&!n;return(0,p.jsxs)(m.Z,{spacing:2,position:"relative",children:[(0,p.jsx)(qh,{options:g,value:C,onChange:t=>{if(t===dv.Environment3d){const t=l||$h.mxrBungalow;e(Js(Ys.U.actions.homeScreenEnvironmentFileIdSet({environmentFileId:t})))}else t===dv.Immersive?(r&&s(r),e(Js(Ys.U.actions.homeScreenForcePassthroughSet({forcePassthrough:!1}))),e(Js(Ys.U.actions.homeScreenEnvironmentFileIdSet({environmentFileId:null})))):t===dv.ForcePassthrough&&(r&&s(r),e(Js(Ys.U.actions.homeScreenForcePassthroughSet({forcePassthrough:!0}))))},height:112,width:164}),(0,p.jsx)(v.Z,{variant:"body2",color:"textSecondary",sx:{opacity:x?1:0,position:"absolute",left:0,top:112},children:"Use the ManageXR 3D Bungalow as your VR home environment."}),(0,p.jsx)(v.Z,{variant:"body2",color:"textSecondary",sx:{opacity:o?1:0},children:"Passthrough to view menus in mixed reality is supported on Pico 4 Enterprise, Pico 4 Ultra Enterprise, and Meta Quest devices. Other devices will use the backgrounds below."})]})},uv=()=>{var e;const t=(0,u.I0)(),n=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.environmentAudioVolume})),i=(e,t)=>({value:e.toString(),label:(0,vp.VN)(e),borderStyle:"none",imageBox:(0,p.jsx)(t,{sx:{fontSize:24}})}),o=[i(vp.nM.NO_VOLUME,vg.Z),i(vp.nM.LOW_VOLUME,Cg.Z),i(vp.nM.NORMAL_VOLUME,xg.Z)];return(0,p.jsx)(qh,{options:o,value:null!==(e=null===n||void 0===n?void 0:n.toString())&&void 0!==e?e:vp.sP.toString(),onChange:e=>{const n=parseInt(e,10);t(Js(Ys.U.actions.homeScreenEnvironmentAudioVolumeSet({environmentAudioVolume:n})))},compact:!0,height:88,width:88})},pv=()=>{var e;const t=null!==(e=Xs((e=>e.deviceExperienceMode)))&&void 0!==e?e:vp.w_.Default,n=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.disableShortcutMenu})),o=!!Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.environmentFileId})),a=(0,Le.ye)("enableCustomEnvironmentFileUpload"),r=(0,Le.ye)("enableEnvironmentAudioVolume"),[l,s]=t===vp.w_.HomeScreen?["Home Screen Backgroun
3d","backgroundUrl"]:["Shortcut Menu Background","shortcutMenuBackgroundUrl"];return(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(ig,{title:"Brand",useDivider:!0,children:(0,p.jsxs)(m.Z,{spacing:3,children:[t===vp.w_.HomeScreen&&(0,p.jsx)(sv,{title:"Top Logo",titleVariant:"body2",children:(0,p.jsx)(i.Z,{width:300,height:100,children:(0,p.jsx)(lv,{imageKey:"topLogoUrl"})})}),(0,p.jsx)(sv,{title:"Bottom Logo",titleVariant:"body2",children:(0,p.jsx)(i.Z,{width:200,height:100,children:(0,p.jsx)(lv,{imageKey:"bottomLogoUrl"})})})]})}),(0,p.jsxs)(ig,{title:"Background",fullWidthContent:!0,children:[(0,p.jsx)(zi.W,{privilege:pe.e.Configurations,children:(0,p.jsx)(cv,{})}),o&&a&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{sx:{paddingTop:2,marginLeft:-1,marginBottom:5}}),(0,p.jsx)(sv,{title:"Home Screen Environment",titleVariant:"subtitle1",children:(0,p.jsx)(Xg,{})}),r&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{sx:{paddingTop:2,marginLeft:-1,marginBottom:5}}),(0,p.jsx)(sv,{title:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:y.DG.purple[700],children:"Audio Volume"}),(0,p.jsx)(Ou,{icon:cc.Z,title:"Adjust the ambient audio that plays in the background of the 3D environment.",placement:"right"})]}),titleVariant:"subtitle1",children:(0,p.jsx)(uv,{})})]})]}),!o&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{sx:{paddingTop:2,marginLeft:-1}}),(0,p.jsxs)(m.Z,{spacing:3,marginTop:5,children:[(0,p.jsx)(sv,{title:l,titleVariant:"subtitle1",children:(0,p.jsx)(rv,{label:l,imageKey:s})}),t===vp.w_.HomeScreen&&(0,p.jsx)(sv,{title:"Shortcut Menu Background",titleVariant:"subtitle1",caption:n?"Shortcut Menu is OFF":void 0,children:(0,p.jsx)(rv,{label:"Shortcut Menu Background",imageKey:"shortcutMenuBackgroundUrl"})})]})]})]})]})};var hv=n(88141),mv=n(31098);const gv=e=>{let{value:t,onChange:n,onBlur:i=(()=>{}),min:o=0,max:a=Number.MAX_SAFE_INTEGER,step:r=1,inputProps:l={}}=e;const s=t<=o,d=t>=a;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,children:[(0,p.jsx)(x.Z,{onClick:()=>{const e=t-r;e>=o&&n(e)},disabled:s,sx:{cursor:s?"auto":"point"},children:(0,p.jsx)(mv.Z,{fontSize:"small",sx:{color:s?y.DG.grey[400]:y.DG.grey[800]}})}),(0,p.jsx)(Ln.Z,{variant:"outlined",value:isNaN(t)?"":t,onChange:e=>{const t=parseInt(e.target.value,10);n(t)},onBlur:i,inputProps:{inputMode:"numeric"},error:t<o||t>a||isNaN(t),sx:{maxWidth:"100px"},...l}),(0,p.jsx)(x.Z,{onClick:()=>{const e=t+r;e<=a&&n(e)},disabled:d,sx:{cursor:d?"auto":"pointer"},children:(0,p.jsx)(hv.Z,{fontSize:"small",sx:{color:d?y.DG.grey[400]:y.DG.grey[800]}})})]})},vv=()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.gridSettings)||void 0===i?void 0:i.cardsPerRow})))&&void 0!==e?e:vp.x,[i,o]=a.useState(n),r=(0,a.useCallback)((()=>{o(n)}),[n]);(0,a.useEffect)((()=>{r()}),[r]);const l=(0,a.useCallback)((e=>e>=1&&e<=5&&Number.isInteger(e)&&!isNaN(e)),[]);return(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(gv,{value:i,onChange:e=>(e=>{o(e),l(e)&&t(Js(Ys.U.actions.homeScreenCardsPerRowSet({cardsPerRow:e})))})(e),onBlur:()=>{l(i)||r()},min:1,max:5}),!l(i)&&(0,p.jsx)(v.Z,{variant:"caption",color:"error",sx:{marginTop:"40px",marginLeft:"42px"},position:"absolute",children:"Between 1 and 5"})]})},Cv=68,xv="solid ".concat(y.DG.grey[500]," ").concat(2,"px"),fv=e=>{let{width:t}=e;return(0,p.jsx)(i.Z,{height:5,width:t,sx:{backgroundColor:y.DG.grey[300],border:"none"}})},bv=e=>{let{cardStyle:t}=e;const n={[vp.In.NO_BACKGROUND]:Cv,[vp.In.NO_PADDING]:64,[vp.In.PADDING]:54}[t],o=t===vp.In.PADDING?41:48,a=t!==vp.In.NO_PADDING?"".concat(4,"px"):"".concat(2,"px ").concat(2,"px 0px 0px"),r=t!==vp.In.PADDING?xv:"none",l=t===vp.In.NO_BACKGROUND?xv:"none";return(0,p.jsx)(i.Z,{width:n,height:o,sx:{backgroundColor:y.DG.grey[300],border:l,borderBottom:r,borderRadius:a,marginBottom:"1px"}})},yv=e=>{let{cardStyle:t,children:n}=e;if(t===vp.In.NO_BACKGROUND){const e=69;return(0,p.jsx)(i.Z,{width:Cv,height:e,sx:{marginTop:"14px",border:"none",objectFit:"contain",backgroundColor:"transparent"},children:n})}return(0,p.jsx)(i.Z,{width:Cv,height:76,sx:{border:xv,objectFit:"contain",backgroundColor:y.DG.grey[100],borderRadius:"".concat(4,"px")},children:n})},jv=e=>{let{cardStyle:t}=e;const n=t===vp.In.NO_BACKGROUND?Cv:54;return(0,p.jsx)(yv,{cardStyle:t,children:(0,p.jsxs)(m.Z,{gap:.5,alignItems:"center",paddingTop:t===vp.In.PADDING?"".concat(5,"px"):0,children:[(0,p.jsx)(bv,{c
3ardStyle:t}),(0,p.jsx)(fv,{width:n}),(0,p.jsx)(fv,{width:n})]})})},Zv=()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.cardSettings)||void 0===i?void 0:i.cardStyle})))&&void 0!==e?e:vp.FW,i=(0,a.useMemo)((()=>(0,o.map)([vp.In.PADDING,vp.In.NO_PADDING,vp.In.NO_BACKGROUND],(e=>({value:e,label:vp.vk[e],imageBox:(0,p.jsx)(jv,{cardStyle:e}),borderStyle:"none"})))),[]);return(0,p.jsx)(qh,{options:i,value:n,onChange:e=>(e=>{t(Js(Ys.U.actions.homeScreenCardStyleSet({cardStyle:e})))})(e),height:160,width:160})},wv=e=>{let{width:t,bgColor:n}=e;return(0,p.jsx)(i.Z,{height:2,width:t,sx:{backgroundColor:n,border:"none"}})},Ev=e=>{let{textAlignment:t,color:n}=e;const o=(0,$i.kP)(t);return(0,p.jsx)(i.Z,{children:(0,p.jsxs)(m.Z,{gap:.5,alignItems:o,children:[(0,p.jsx)(wv,{width:43,bgColor:n}),(0,p.jsx)(wv,{width:23,bgColor:n}),(0,p.jsx)(wv,{width:36,bgColor:n})]})})},Sv=()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.cardSettings)||void 0===i?void 0:i.horizontalTextAlignment})))&&void 0!==e?e:vp.o9,i=(0,a.useMemo)((()=>(0,o.map)([vp.mP.LEFT,vp.mP.CENTER,vp.mP.RIGHT],(e=>{const t=e===n;return{value:e,imageBox:(0,p.jsx)(Ev,{textAlignment:e,color:t?y.DG.white:y.DG.grey[800]}),borderStyle:"none"}}))),[n]);return(0,p.jsxs)(m.Z,{gap:1,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Text Alignment"}),(0,p.jsx)(qh,{options:i,value:n,onChange:e=>(e=>{t(Js(Ys.U.actions.homeScreenHorizontalTextAlignmentSet({horizontalTextAlignment:e})))})(e),height:38,width:76,compact:!0})]})};var Dv=n(55860);const Mv=()=>{const e=(0,u.I0)(),t=(0,Le.ye)("enableAutoCenterUiToggle"),n=!!Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.autoCenterUI}));return t?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(Pd,{label:"Auto-center Menu",checked:n,onChange:()=>{e(Js(Ys.U.actions.autoCenterUiToggled()))},control:(0,p.jsx)(ho.Z,{size:"small"}),privilege:"configurations"}),(0,p.jsx)(Fi._,{tooltipText:"Automatically centers the menu in the user's field of view while in-headset. When OFF, the menu remains fixed in place, regardless of head movement.",children:(0,p.jsx)(Dv.Z,{sx:{fontSize:18,color:"text.secondary",cursor:"pointer"}})})]}):null};Mv.displayName="ConfigurationSettingAutoCenterUi";const kv=e=>{let{color:t}=e;return(0,p.jsx)(i.Z,{height:15,width:15,sx:{backgroundColor:t,borderRadius:.5}})},Iv=e=>{let{horizontalAlignment:t,color:n}=e;return(0,p.jsx)(i.Z,{width:53,height:40,children:(0,p.jsxs)(m.Z,{justifyContent:(e=>e===vp.T.LEFT?"flex-start":e===vp.T.CENTER?"center":e===vp.T.RIGHT?"flex-end":void 0)(t),flexWrap:"wrap",direction:"row",gap:.5,children:[(0,p.jsx)(kv,{color:n}),(0,p.jsx)(kv,{color:n}),(0,p.jsx)(kv,{color:n}),(0,p.jsx)(kv,{color:n})]})})},Av=e=>{let{verticalAlignment:t,color:n}=e;return(0,p.jsx)(i.Z,{width:60,height:35,alignContent:(o=t,o===vp.s1.TOP?"flex-start":o===vp.s1.CENTER?"center":void 0),sx:{paddingTop:.5,paddingBottom:.5},children:(0,p.jsxs)(m.Z,{justifyContent:"center",flexWrap:"wrap",direction:"row",gap:.3,children:[(0,p.jsx)(kv,{color:n}),(0,p.jsx)(kv,{color:n}),(0,p.jsx)(kv,{color:n})]})});var o},Rv=110,Tv=()=>(0,p.jsx)(i.Z,{width:20,height:2,sx:{backgroundColor:y.DG.grey[400]}}),Pv=e=>{let{children:t}=e;return(0,p.jsx)(i.Z,{width:Rv,height:80,alignContent:"center",sx:{backgroundColor:y.DG.grey[100],borderRadius:.5},children:t})},Lv={value:vp.lg.TOP,label:vp.in[vp.lg.TOP],imageBox:(0,p.jsx)(Pv,{children:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(i.Z,{width:Rv,height:16,alignContent:"center",sx:{borderBottom:"solid ".concat(y.DG.grey[400]," 2px")},children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"center",gap:1,children:[(0,p.jsx)(Tv,{}),(0,p.jsx)(Tv,{}),(0,p.jsx)(Tv,{}),(0,p.jsx)(Tv,{})]})}),(0,p.jsx)(i.Z,{width:Rv,height:64,alignContent:"center",children:(0,p.jsx)(v.Z,{variant:"body2",sx:{color:y.DG.grey[700],textTransform:"none"},children:"Cards"})})]})}),spacing:1,borderStyle:"solid"},Nv={value:vp.lg.LEFT,label:vp.in[vp.lg.LEFT],imageBox:(0,p.jsx)(Pv,{children:(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(i.Z,{width:36,height:80,sx:{borderRight:"solid ".concat(y.DG.grey[400]," 2px")},children:(0,p.jsxs)(m.Z,{direction:"column",alignContent:"flex-end",paddingTop:2,paddingLeft:.75,gap:.75,height:"100%",children:[(0,p.jsx)(Tv,{}),(0,p.jsx)(Tv,{}),(0,p.jsx)(Tv,{}),(0,p.jsx)(Tv,{})]})}),(0,p.jsx)(i.Z,{width:74,height:80,alignContent:"center",children:(0,p.jsx)(v.Z,{variant:"body2",sx:{color:y.DG.grey[700],textTransform:"none"},children:"Cards"})})]})}),spacing:1,borderStyle:"solid"},Uv={value:vp.lg.NONE,label:vp.in[vp.lg.NONE],imageBox:(0,p.jsx)(Pv,{children:(0,p.jsx)(v.Z,{variant:"body2",sx:{color:y.DG.grey[700],textTransform:"none"},children:"Cards"})}),spacing:1,borderStyle:"solid"},Fv=()=>{var e,t,n,i,r,l;const s=(0,u.I0)(),d=(0,Le.ye)("enableHomeScreenLeftCategoriesPanel"),c=(0,a.useMemo)((()=>
3d?[Lv,Nv,Uv]:[Lv,Uv]),[d]),h=null!==(e=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.panelSettings)||void 0===i?void 0:i.categoriesPosition})))&&void 0!==e?e:vp.Bb,g=null!==(t=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.gridSettings)||void 0===i?void 0:i.horizontalAlignment})))&&void 0!==t?t:vp.t0,v=null!==(n=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.gridSettings)||void 0===i?void 0:i.verticalAlignment})))&&void 0!==n?n:vp.u8,C=null===(i=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.cardSettings)||void 0===i?void 0:i.showTitle})))||void 0===i||i,x=null===(r=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.cardSettings)||void 0===i?void 0:i.showContentType})))||void 0===r||r,f=null!==(l=Xs((e=>{var t,n,i;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.librarySettings)||void 0===n||null===(i=n.gridSettings)||void 0===i?void 0:i.cardsPerRow})))&&void 0!==l?l:vp.x,b=(0,a.useMemo)((()=>1===f?vp.T.CENTER:g),[f,g]),j=(0,a.useMemo)((()=>(0,o.map)([vp.T.LEFT,vp.T.CENTER,vp.T.RIGHT],(e=>{const t=b===e,n=(e===vp.T.LEFT||e===vp.T.RIGHT)&&1===f;return{value:e,label:vp.mt[e],imageBox:(0,p.jsx)(Iv,{horizontalAlignment:e,color:t?y.DG.grey[100]:y.DG.grey[400]}),spacing:1,borderStyle:"none",disabled:n,disabledTooltip:n?"Content is center aligned when there is only 1 card per row":void 0}}))),[f,b]),Z=(0,a.useMemo)((()=>(0,o.map)([vp.s1.TOP,vp.s1.CENTER],(e=>{const t=v===e||e===vp.u8&&(0,o.isUndefined)(v);return{value:e,label:vp.q_[e],imageBox:(0,p.jsx)(Av,{verticalAlignment:e,color:t?y.DG.grey[100]:y.DG.grey[400]}),spacing:1,borderStyle:"solid"}}))),[v]);return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(ig,{title:"Menu Layout",privilege:pe.e.Configurations,useDivider:!0,children:[(0,p.jsx)(qh,{options:c,value:h,onChange:e=>(e=>{s(Js(Ys.U.actions.homeScreenCategoriesPositionSet({categoriesPosition:e})))})(e),height:160,width:160}),(0,p.jsxs)(m.Z,{spacing:2,sx:{paddingBottom:1},children:[(0,p.jsx)(Ie.Z,{sx:{marginTop:2}}),(0,p.jsx)(Mv,{})]})]}),(0,p.jsx)(ig,{title:"Customize Card",fullWidthContent:!0,privilege:pe.e.Configurations,useDivider:!0,children:(0,p.jsxs)(m.Z,{spacing:2,sx:{paddingBottom:1},children:[(0,p.jsx)(Zv,{}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(po.Z,{label:"Show Title",checked:C,onChange:()=>{s(Js(Ys.U.actions.homeScreenCardSettingsShowTitleSet({showTitle:!C})))},control:(0,p.jsx)(ho.Z,{size:"small"})}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(po.Z,{label:"Show Content Type",checked:x,onChange:()=>{s(Js(Ys.U.actions.homeScreenCardSettingsShowContentTypeSet({showContentType:!x})))},control:(0,p.jsx)(ho.Z,{size:"small"})}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(Sv,{}),(0,p.jsx)(Ie.Z,{})]})}),(0,p.jsx)(ig,{title:"Cards per row",privilege:pe.e.Configurations,children:(0,p.jsx)(vv,{})}),(0,p.jsx)(ig,{title:"Horizontal Alignment",privilege:pe.e.Configurations,children:(0,p.jsx)(qh,{options:j,value:b,onChange:e=>(e=>{s(Js(Ys.U.actions.homeScreenHorizontalAlignmentSet({horizontalAlignment:e})))})(e),height:85,width:85,compact:!0})}),(0,p.jsx)(ig,{title:"Vertical Alignment",privilege:pe.e.Configurations,children:(0,p.jsx)(qh,{options:Z,value:v,onChange:e=>(e=>{s(Js(Ys.U.actions.homeScreenVerticalAlignmentSet({verticalAlignment:e})))})(e),height:85,width:85,compact:!0})})]})},Ov={[vp.w_.HomeScreen]:"Show a quick settings menu on app pause. Press the Home Button on your controller to access the Shortcut Menu from the current App.",[vp.w_.Kiosk]:"Press the Home Button on your controller to access the Shortcut Menu from the Kiosk App. Press again to return to App.",[vp.w_.Default]:"",[vp.w_.KioskVideo]:"Allow users to exit a video and access a quick settings menu"},_v=(0,a.memo)((e=>{let{enabled:t,deviceExperienceMode:n,onToggle:i=(()=>{}),demo:o=!1}=e;const a="Shortcut Menu ".concat(t?"On":"Off"),r=Ov[n];return(0,p.jsx)(ph,{featureName:"Shortcut Menu",withLockIcon:!0,iconSX:{alignSelf:"center"},children:(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsx)(m.Z,{direction:"row",children:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(m.Z,{direction:"row",children:(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",spacing:1,sx:{cursor:o?void 0:"pointer"},onClick:o?void 0:i,children:[(0,p.jsx)(ho.Z,{checked:t,sx:{pointerEvents:o?"none":void 0}}),(0,p.jsx)(v.Z,{variant:"body1",children:a})]})}),r&&(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"action.active",children:r}),(0,p.jsxs)(v.Z,{variant:"caption",color:"textSecondary",children:["Supported on Meta devices (firmware v",73," and earlier)",(0,p.jsx)(ee.Z,{title:"The Shortcut Menu is supported on Meta devices on firmware v".concat(73," or earlier. Meta devices on v").concat(74," and beyond use the native Meta quick pause menu."),children:(0,p.jsx)(cc.Z,{sx:{fontSize:"16px",color:"text.secondary",verticalAlign:"middle"}})}),", Pico, HTC, DPVR, and Lenovo devices"]})]})]})})})})})),zv=()=>{const e=(0,d.P)("HIDE_PASSTHROUGH_TOOLBAR_ITEM"),t=(0,Le.ye)("enableIpdAdjustmentToggle");return(0,o.difference)((0,o.keys)(vp.ZO),(()=>{let n=[];return e&&n.push("passthrough"),t||n.push("ipdAdjustment"),n})())},Bv=(0,a.memo)((()=>{var e;const[t,n]=[/^\d{4,8}$/,"The PIN must be between 4 and 8 digits"],i=(0,u.I0)(),o=Be.vc.configuration.defaultLauncherAdminPin,r=null!==(e=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.adminPin})))&&void 0!==e?e:o,[l,s]=(0,a.useState)(r),[d,c]=(0,a.useState)(null);(0,a.useLayoutEffect)((()=>{s(r)}),[r]);return(0,p.jsx)(Ul.z,{label:"Admin PIN (4-8 digits)",placeholder:"0000",value:l,onCh
3ange:e=>{const o=e.target.value;s(o),c(null),t.test(o)||c(n),i(Js(Ys.U.actions.launcherAdminPinSet({pin:o})))},error:!!d,helperText:d,privilege:"configurations"})})),Wv=(0,a.memo)((()=>Xs((e=>e.picoFastBoundarySetting))!==vp.qD.ON?null:(0,p.jsx)(ui.Q,{severity:"warning",iconProps:{sx:{fontSize:14,marginTop:"3px"}},children:(0,p.jsx)(v.Z,{variant:"caption",color:"warning.dark","data-testid":"configurationHomeScreenSettings_boundaryQuickSetupWarning",children:"Pico devices hide this button while Quick Boundary Setup is on in Device Settings."})})));Wv.displayName="ConfigurationHomeScreenBoundaryQuickSetupWarning";const Vv=()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.displayLanguage})))&&void 0!==e?e:vp.dU.EN_US,i=(0,a.useMemo)((()=>(0,o.map)(vp.dU,(e=>({value:e,label:vp.Yw[e]})))),[]);return(0,p.jsx)(Qi,{label:"Display Language",privilege:"configurations",options:i,onChange:e=>{return n=e,void t(Js(Ys.U.actions.homeScreenLanguageSet({language:n})));var n},value:n,style:{width:380}})},Gv=()=>{var e,t,n,a;const r=(0,u.I0)(),l=null!==(e=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.hiddenSettings})))&&void 0!==e?e:{},s=null!==(t=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.forcePassthrough})))&&void 0!==t&&t,d=!!Xs((e=>{var t;return null===(t=e.disabledQfbSettings)||void 0===t?void 0:t.SCREEN_CAPTURE_ENABLED})),c={wifi:{Icon:Im},guardian:{Icon:Sm},cast:{Icon:Dm},controller:{Icon:Mm},bluetooth:{Icon:Pm.Z},adminSettings:{Icon:Em},passthrough:{Icon:Rm,cannotEdit:s,disabledTooltip:"This configuration uses Passthrough to show menus in mixed reality. Since devices are locked into Passthrough, the toggle is hidden. To adjust this setting, use a 360 image or 3D environment instead of Passthrough as the Background"},screenRecording:{Icon:Tm,cannotEdit:d,disabledTooltip:d?'Screen recording is automatically hidden when casting is disabled for MHMS shared mode devices. Turn on "Allow casting and screen capture" in Device Settings to enable':void 0},ipdAdjustment:{Icon:km}},h=zv(),g=(0,o.pick)(c,h),C=null!==(n=Xs((e=>e.deviceExperienceMode)))&&void 0!==n?n:vp.w_.Default,x=null!==(a=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.disableShortcutMenu})))&&void 0!==a&&a;return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{spacing:1,paddingTop:4,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Display or hide the following settings"}),(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",columnGap:5,paddingTop:0,children:(0,o.map)(g,((e,t)=>{const n=e.Icon,a=e;return(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(zi.W,{privilege:"configurations",disableAutoSize:!0,children:(0,p.jsx)(ee.Z,{title:a.cannotEdit&&a.disabledTooltip?a.disabledTooltip:"",followCursor:!0,placement:"right",children:(0,p.jsxs)(m.Z,{padding:1.5,spacing:1.5,direction:"row",alignItems:"center",width:385,sx:{cursor:a.cannotEdit?"default":"pointer"},onClick:a.cannotEdit?void 0:()=>(e=>{r(Js(Ys.U.actions.homeScreenSettingVisibilityToggled({button:e})))})(t),children:[(0,p.jsx)(n,{fontSize:"large",color:l[t]?"disabled":"primary"}),(0,p.jsxs)(m.Z,{paddingLeft:1,children:[(0,p.jsx)(v.Z,{variant:"body2",children:vp.ZO[t]}),(0,o.map)(vp.oh[t],((e,n)=>(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:(0,o.map)(e,(e=>{var n,i;return null!==(n=null===(i=vp.jC[t])||void 0===i?void 0:i[e])&&void 0!==n?n:(0,Vr.ao)(e)})).join(", ")},n))),(0,o.isUndefined)(vp.oh[t])&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"All Devices"}),"guardian"===t&&(0,p.jsx)(Wv,{})]}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(ho.Z,{disabled:a.cannotEdit,checked:("screenRecording"!==t||!d)&&!l[t]})]})})}),"adminSettings"===t&&(0,p.jsx)(i.Z,{sx:{paddingY:1.5,paddingLeft:"56px","& .MuiTextField-root":{width:"90%"}},children:(0,p.jsx)(Bv,{})})]},t)}))}),(0,p.jsx)(Ie.Z,{sx:{paddingTop:1}})]}),C!==vp.w_.Kiosk&&C!==vp.w_.KioskVideo&&(0,p.jsx)(ig,{title:"Enable Shortcut Menu?",useDivider:!0,children:(0,p.jsx)(_v,{deviceExperienceMode:vp.w_.HomeScreen,enabled:!x,onToggle:()=>{r(Js(Ys.U.actions.disableHomeScreenShortcutMenuToggled()))}})}),(0,p.jsx)(ig,{title:(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Set Language"}),(0,p.jsx)(ci,{helpText:"Sets the language for the ManageXR Home Screen and Shortcut Menu. This does not change the device system language. To set the System Language on Pico devices, go to Configuration > Device Settings. ",url:"https://help.managexr.com/en/articles/5776842-device-sett
3ings#h_9a2d663ace"})]}),useDivider:!0,children:(0,p.jsx)(Vv,{})})]})};var Hv=n(73074),qv=n(15159),Yv=n(33695),Kv=n(15927);const Xv=(0,a.memo)((e=>{let{sx:t,privilege:n,onClick:a,onSubmit:r,onBlur:l,editing:s,value:d="",name:c="",disabled:u=!1,variant:h="body2",fontWeight:m="regular",registerOptions:g,inputOffset:v=0,underlineOffset:C=0,modified:x=!1}=e;const{privileges:f}=(0,w.P)(),b=!n||f[n],y=(0,De.Z)(),j=c?b?"Add ".concat(c):"No ".concat(c):"";return(0,p.jsx)(i.Z,{width:1,sx:t,children:(0,p.jsxs)(i.Z,{position:"relative",sx:{cursor:b?"text":"auto","&:hover .hoverUnderline":{display:"unset"}},onClick:()=>{b&&a()},children:[(0,p.jsx)(Ui.G,{variant:h,fontWeight:m,color:x&&d?"warning.main":d?"text.primary":"text.disabled",visibility:s?"hidden":"visible",title:d,children:d||j}),!s&&!u&&b&&(0,p.jsx)(i.Z,{position:"absolute",left:0,right:0,bottom:-4+C,height:x&&!d?"2px":"1px",bgcolor:x&&!d?"warning.light":"grey.500",display:x&&!d?"auto":"none",className:"hoverUnderline"}),s&&(0,p.jsx)(yg,{value:d,onSubmit:r,onBlur:()=>{setTimeout(l,y.transitions.duration.shortest)},sx:{position:"absolute",left:0,right:0,bottom:-4+v},textFieldProps:{placeholder:j,inputProps:{style:{...y.typography[h],fontWeight:y.typography["fontWeight".concat((0,o.capitalize)(m))]}}},registerOptions:g})]})})}));var Qv=n(68960);const Jv=a.memo((e=>{var t,n,r,l,s,d,c,h;let{contentWithOverrides:g,index:v,allCategories:C,compact:x,editingField:f,onFieldClick:b,onFieldBlur:y,onFieldSubmit:j}=e;const Z=(0,u.I0)(),w=Xs((e=>e.hiddenAppRefs)),E=Xs((e=>e)),S=Ks(),D=(0,Le.ye)("enableShowHideAppCategories"),M=dm(E,{visibleAndOrdered:!0}),k=sm(E),I=!!(0,o.find)(w,{path:g.ref.path}),A=a.useCallback((e=>{var t,n,i,a;const r=(0,$i.S3)(e,C).sort(ze.bL),l=null!==(t=g.categories)&&void 0!==t?t:[],s=(0,o.isEqual)(r,l)?null:r;if(Z(Js(Ys.U.actions.homeScreenContentOverridesSet({contentWithOverrides:g,overrides:{categories:s}}))),!D)return;const d=(0,o.difference)(r,C),c=null!==(n=null!==(i=null===(a=g.overrides)||void 0===a?void 0:a.categories)&&void 0!==i?i:g.categories)&&void 0!==n?n:[],u=(0,o.difference)(c,r);if((0,o.isEmpty)(d)&&(0,o.isEmpty)(u))return;let p=[...M,...d];if(!(0,o.isEmpty)(u)){const e=new Set;for(const t of k){var h,m,v;(t.ref.path===g.ref.path?r:null!==(h=null!==(m=null===(v=t.overrides)||void 0===v?void 0:v.categories)&&void 0!==m?m:t.categories)&&void 0!==h?h:[]).forEach((t=>e.add(t)))}p=p.filter((t=>!u.includes(t)||e.has(t)))}Z(Js(Ys.U.actions.orderedCategoriesSet({orderedCategories:p})))}),[C,k,g,Z,D,M]),R=a.useCallback((e=>S?((e,t,n)=>{var i;const o=null===(i=Mg[n.type])||void 0===i?void 0:i[0];if(!o)return;const a="app_".concat(t,"_").concat(Date.now()).concat(o);return"".concat(Tg(e),"/").concat(a)})(S,g.iconUrlStorageId,e):void 0),[S,g.iconUrlStorageId]),T=a.useCallback(((e,t)=>{if(e>Be.vc.vrContent.maxIconDimension||t>Be.vc.vrContent.maxIconDimension)return"Maximum icon dimensions: ".concat(Be.vc.vrContent.maxIconDimension," x ").concat(Be.vc.vrContent.maxIconDimension)}),[]),P=a.useCallback((e=>{Z(Js(Ys.U.actions.homeScreenContentOverridesSet({contentWithOverrides:g,overrides:{iconUrl:e}})))}),[g,Z]),L=a.useCallback((()=>{Z(Js(Ys.U.actions.homeScreenContentOverridesSet({contentWithOverrides:g,overrides:{iconUrl:null}})))}),[g,Z]);return(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsxs)(m.Z,{children:[0!==v&&(0,p.jsx)(Ie.Z,{flexItem:!0,sx:{paddingTop:1.5}}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,paddingTop:1.5,children:[x?(0,p.jsx)(i.Z,{component:"img",src:null!==(t=null===(n=g.overrides)||void 0===n?void 0:n.iconUrl)&&void 0!==t?t:g.iconUrl,alt:"",sx:{width:60,height:60,flexShrink:0,objectFit:"cover",borderRadius:1,display:"block",bgcolor:"grey.100"}}):(0,p.jsx)(i.Z,{width:60,height:60,children:(0,p.jsx)($g,{imageUrl:null===(r=g.overrides)||void 0===r?void 0:r.iconUrl,defaultImageUrl:g.iconUrl,getFilePath:R,onImageUploaded:P,onClear:L,validateDimensions:T,privilege:"configurations",modified:(0,o.has)(g.overrides,"iconUrl")})}),(0,p.jsx)(m.Z,{flexGrow:1,spacing:.5,children:(0,p.jsx)(Xv,{value:null!==(l=null===(s=g.overrides)||void 0===s?void 0:s.title)&&void 0!==l?l:g.title,name:"name",editing:"title"===f,onClick:()=>b(g,"title"),onBlur:()=>y(g,"title"),onSubmit:e=>j(g,"title",e),variant:"body1",inputOffset:-.5,underlineOffset:-.5,modified:(0,o.has)(g.overrides,"title")})}),(0,p.jsx)(i.Z,{width:100,children:(0,p.jsx)(po.Z,{label:I?"Hidden":"Visible",checked:!I,onChange:()=>{Z(Js(Ys.U.actions.homeScreenContentHiddenToggled({ref:g.ref})))},control:(0,p.jsx)(ho.Z,{size:"small"})})}),(0,p.jsx)(i.Z,{width:300,sx:{display:x?"none":void 0},children:(0,p.jsx)(Ic.Z,{multiple:!0,fullWidth:!0,autoComplete:!0,freeSolo:!0,size:"small",options:C,disableClearable:!0,disableCloseOnSelect:!0,clearOnBlur:!0,value:null!==(d=null!==(c=null===(h=g.overrides)||void 0===h?void 0:h.categories)&&void 0!==c?c:g.categories)&&void 0!==d?d:[],filterOptions:(0,Kv.D)({trim:!0,ignoreCase:!1}),onChange:(e,t)=>
3A(t),ChipProps:{variant:"filled"},renderInput:e=>(0,p.jsx)(Ln.Z,{...e,size:"medium",label:"Categories",placeholder:"New category",InputProps:{...e.InputProps,endAdornment:e.inputProps.value?(0,p.jsx)(Qv.Z,{}):void 0,sx:{"& .MuiOutlinedInput-notchedOutline, &:hover .MuiOutlinedInput-notchedOutline":{borderWidth:(0,o.has)(g.overrides,"categories")?2:void 0,borderColor:(0,o.has)(g.overrides,"categories")?"warning.light":void 0}}}})})})]})]})})})),$v=(0,a.memo)((e=>{let{category:t,index:n,draggedCategoryName:a,onDragStart:r,onDragHover:l,onDragEnd:s,onDeleteCategory:d}=e;const c=t===a,[,u]=(0,qv.c)({type:"used-category",item:()=>(r(t,n),{categoryName:t}),end:s}),[,h]=(0,am.L)({accept:"used-category",hover:e=>{e.categoryName!==t&&l(n)}});return(0,p.jsx)(ke.Z,{ref:e=>u(h(e)),label:(0,p.jsxs)(i.Z,{display:"flex",alignItems:"center",gap:.5,children:[(0,p.jsx)(Yv.Z,{sx:{fontSize:16,color:"grey.500"}}),(0,p.jsx)("span",{children:t})]}),size:"medium",variant:"filled",onDelete:()=>d(t),sx:{...y.cp.tooltip,textTransform:"none",bgcolor:"grey.900","&:hover":{bgcolor:(0,o.isUndefined)(a)?"grey.800":"grey.900"},color:"grey.100","& .MuiChip-deleteIcon":{color:"grey.500","&:hover":{color:"grey.100"}},cursor:"move",transition:"transform 0.15s ease-out",opacity:c?.9:1,transform:c?"scale(1.02)":"scale(1)"}})})),eC=e=>{var t,n,r,s;let{compact:d}=e;const h=(0,u.I0)(),g=(0,Le.ye)("enableShowHideAppCategories"),x=!d&&g,{configurationId:f}=(0,l.UO)(),{buildOrganizationPath:b}=(0,w.P)(),j=Xs((e=>e)),Z=null!==(t=Xs((e=>{var t,n,i;return(0,o.reduce)(null===(t=e.customLauncherSettings)||void 0===t?void 0:t.appOverrides,((e,t)=>e+(0,o.size)(t)),0)+(0,o.reduce)(null===(n=e.customLauncherSettings)||void 0===n?void 0:n.videoOverrides,((e,t)=>e+(0,o.size)(t)),0)+(0,o.reduce)(null===(i=e.customLauncherSettings)||void 0===i?void 0:i.webXRAppOverrides,((e,t)=>e+(0,o.size)(t)),0)})))&&void 0!==t?t:0,E=sm(j),S=dm(j),D=dm(j,{visibleAndOrdered:!0}),M=(0,a.useMemo)((()=>g?D:S),[g,D,S]),[k,I]=(0,a.useState)(),A=(0,a.useCallback)(((e,t)=>{I({refPath:e.ref.path,field:t})}),[]),R=(0,a.useCallback)(((e,t)=>{I((n=>(null===n||void 0===n?void 0:n.refPath)===e.ref.path&&n.field===t?void 0:n))}),[]),T=(0,a.useCallback)(((e,t,n)=>{h(Js(Ys.U.actions.homeScreenContentOverridesSet({contentWithOverrides:e,overrides:{[t]:n}}))),I(void 0)}),[h]),P=(0,o.sortBy)((0,o.without)(S,...M)),[L,N]=(0,a.useState)(M.map((e=>({name:e})))),U=(0,a.useRef)(L);(0,a.useEffect)((()=>{U.current=L}),[L]);const F=(0,a.useRef)(M),[O,_]=(0,a.useState)();(0,a.useEffect)((()=>{O||(0,o.isEqual)(M,F.current)||(N(M.map((e=>({name:e})))),F.current=M)}),[M,O]);const z=(0,a.useCallback)(((e,t)=>{_({categoryName:e,startIndex:t})}),[]),B=(0,a.useCallback)((e=>{O&&N((t=>{const n=(0,o.findIndex)(t,{name:O.categoryName}),i=-1===e?t.length-1:e;return n===i?t:(0,Hv.q)(t,n,i)}))}),[O]),W=(0,a.useCallback)((()=>{if(!O)return;const e=U.current;(0,o.findIndex)(e,{name:O.categoryName})!==O.startIndex&&h(Js(Ys.U.actions.orderedCategoriesSet({orderedCategories:e.map((e=>e.name))}))),_(void 0)}),[O,h]),V=(0,a.useCallback)((e=>{const t=M.filter((t=>t!==e));h(Js(Ys.U.actions.orderedCategoriesSet({orderedCategories:g?t:void 0})))}),[h,M,g]),G=(0,a.useCallback)((e=>{const t=[...M,e];h(Js(Ys.U.actions.orderedCategoriesSet({orderedCategories:g?t:void 0})))}),[h,M,g]),[,H]=(0,am.L)({accept:"used-category",hover:()=>{B(-1)}}),q=(0,a.useCallback)((e=>{const t=e?L.map((e=>e.name)):P;return(0,p.jsxs)(m.Z,{spacing:.7,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:e?"Categories":"Unused Categories"}),(0,o.isEmpty)(t)?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",fontStyle:"italic",children:e?(0,o.isEmpty)(S)?(0,p.jsxs)(p.Fragment,{children:["Add categories below, or tag content in your"," ",(0,p.jsx)(Xc,{to:(0,c.LT)(c._j.organization.vrContent),children:"library"})," ","to apply a category across all configurations."]}):"No categories displayed. Click a category below to enable it.":'All categories are currently active. Click the "X" to hide a category from the menu.'}):(0,p.jsxs)(i.Z,{display:"flex",flexWrap:"wrap",gap:1,alignItems:"center",sx:{"& > *":{transition:"transform 0.2s cubic-bezier(0.4, 0, 0.2, 1)"}},children:[e&&!(0,o.isEmpty)(t)&&(0,p.jsx)(ke.Z,{label:"All",size:"medium",variant:"filled",sx:{...y.cp.tooltip,textTransform:"none",bgcolor:"grey.900",color:"grey.100",cursor:"default",paddingX:1,"&:hover":{bgcolor:"grey.900"}}},"all-category"),t.map(((t,n)=>e?(0,p.jsx)($v,{category:t,index:n,draggedCategoryName:null===O||void 0===O?void 0:O.categoryName,onDragStart:z,onDragHover:B,onDragEnd:W,onDeleteCategory:V},"draggable-".concat(t)):(0,p.jsx)(ke.Z,{label:t,size:"medium",variant:"filled",clickable:!0,onClick:()=>G(t),sx:{...y.cp.tooltip,textTransform:"none",color:"text.primary"}},"unused-".concat(t)))),e&&!(0,o.isEmpty)(t)&&(0,p.jsx)(i.Z,{ref:H,sx:{flex:1,height:32,minWidth:40}})]})]})}),[L,P,H,S,null===O||void 0===O?void 0:O.categoryName,z,B,W,V,G]);return(0,p.jsx)(m.Z,{children:(0,p.jsxs)(m.Z,{children:[x&&!(0,o.isEmpty)(E)&&(0,p.jsxs)(m.Z,{paddingTop:4,spacing:3,children:[q(!0),!(0,o.isEmpty)(S)&&q(!1)]}),(0,p.jsxs)(m.Z,{paddingTop:4,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",paddingBottom:1,children:"Content"}),(0,o.isEmpty)(E)?(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",fontStyle:"italic",children:["No content has been added to this configuration yet. Once you add an"," ",(0,p.jsx)(Xc,{to:b((e=>e.configurations.configuration.apps),{configurationId:null!==(n=null===j||void 0===j?void 0:j.id)&&void 0!==n?n:f}),children:"app"}),","," ",(0,p.jsx)(Xc,{to:b((e=>e.configurations.configuration.videos),{configurationId:null!==(r=null===j||void 0===j?void 0:j.id)&&void 0!==r?r:f}),children:"video"}),", or"," ",(0,p.jsx)(Xc,{to:b((e=>e.configurations.configuration.webXRApps),{configurationId:null!==(s=null===j||void 0===j?void 0:j.id)&&void 0!==s?s:f}),children:"webXR link"})," ","to this configuration, it will show up here!"]}):(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)("span",{})," ",Z>0&&(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsxs)(C.Z,{startIcon:(0,p.jsx)(bu.Z,{}),onClick:()=>{h(Js(Ys.U.actions.homeScreenContentOverridesCleared()))},color:"warning",variant:"outlined",children:["Clear ",Z," override",1===Z?"":"s"]})})]})]}),(0,o.map)(E,((e,t)=>(0,p.jsx)(Jv,{contentWithOverrides:e,index:t,compact:d,allCategories:S,editingField:(null===k||void 0===k?void 0:k.refPath)===e.ref.path?k.field:void 0,onFieldClick:A,onFieldBlur:R,onFieldSubmit:T},e.ref.path)))]})})},tC={content:{label:"VR Content",component:(0,p.jsx)(eC,{})},settings:{label:"Menu Settings",component:(0,p.jsx)(Gv,{})},layout:{label:"Layout",component:(0,p.jsx)(Fv,{})}
3,images:{label:"Logo & Background",component:(0,p.jsx)(pv,{})},colors:{label:"Colors",component:(0,p.jsx)(hg,{})},meta:{label:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(dg.q,{fontSize:"inherit"}),(0,p.jsx)(v.Z,{variant:"inherit",color:"inherit",children:"Meta Only"})]}),component:(0,p.jsx)(m.Z,{paddingTop:4,children:(0,p.jsx)(sg,{})})}},nC=e=>{let{visibleTabIds:t,activeTabId:n,onActiveTabIdChange:i}=e;const{organizationId:r,user:l}=(0,w.P)(),s=(0,a.useCallback)(((e,t)=>{i(t);const n=window.location.pathname.replace(/\/$/,"");(0,b.A_)("".concat(n,"/").concat(t),r,l.id)}),[i,r,l.id]);return(0,p.jsx)(Me.Z,{sx:{paddingX:1,marginTop:-1},children:(0,p.jsxs)(Sn.ZP,{value:n,children:[(0,p.jsx)(Gn.Z,{onChange:s,"aria-label":"home screen settings",children:(0,o.map)(t,(e=>(0,p.jsx)(Yn.Z,{value:e,label:tC[e].label},e)))}),(0,o.map)(t,(e=>(0,p.jsx)(Dn.Z,{value:e,sx:{paddingY:0},children:tC[e].component},e)))]})})},iC={[vp.w_.HomeScreen]:"home screen",[vp.w_.Kiosk]:"kiosk",[vp.w_.Default]:"default",[vp.w_.KioskVideo]:"kiosk video"},oC=[{value:vp.IF.DEFAULT,label:vp.Vn[vp.IF.DEFAULT]},{value:vp.IF.KIOSK_APP,label:vp.Vn[vp.IF.KIOSK_APP]}],aC=(0,a.memo)((e=>{let{value:t,deviceExperienceMode:n,onChange:i=(()=>{}),demo:o=!1}=e;const a="Control which applications and content are available in ".concat(iC[n]," mode. ").concat("Depending on your choice, apps will be removed from the foreground if they are not allowed as per this setting.");return(0,p.jsx)(ph,{featureName:"Kiosk Mode Strictness",withLockIcon:!0,iconSX:{alignSelf:"flex-start",marginTop:.5},children:(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsx)(m.Z,{spacing:1,children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(Qi,{value:null!==t&&void 0!==t?t:vp.IF.DEFAULT,options:oC,onChange:o?()=>{}:i,label:"Kiosk Mode Strictness",disabled:o,privilege:"configurations"}),a&&n!==vp.w_.Default&&(0,p.jsx)(v.Z,{variant:"body2",color:"action.active",children:a})]})})})})})),rC=e=>{let{noneLabel:t="None",hideNone:n=!1,autoSelectFirstInList:i=!1,value:r,onChange:l,...s}=e;const{approvedApps:d}=ld(),c=Xs((e=>e.approvedInstantApps)),u=(0,E.Ev)(S.F.InstantApps,(0,a.useMemo)((()=>(0,o.map)(c,"id")),[c])),h=(0,a.useMemo)((()=>[...n?[]:[{value:qi.ki.None,label:t,type:"app"}],...[...(0,o.map)(d,(e=>({...(0,Vs.HB)(e)&&{Icon:dg.q},value:e.id,label:e.title,type:"app"}))),...(0,o.map)(u,(e=>({Icon:Ud.Z,value:e.id,label:e.title,type:"instantApp"})))].sort(((e,t)=>(0,ze.DN)(e.label,t.label)))]),[d,u,n,t]);(0,a.useEffect)((()=>{i&&!r&&h[0]&&l(h[0].value,h[0].type)}),[i,h,r,l]);const m=(0,a.useCallback)((e=>{const t=h.find((t=>t.value===e));l(e,t.type)}),[l,h]);return(0,p.jsx)(Qi,{...s,value:r,onChange:m,options:h})};rC.displayName="ConfigurationApprovedAppSelect";const lC=()=>{var e,t;const n=(0,u.I0)(),o=Xs((e=>e.kioskAppRef)),r=null!==(e=Xs((e=>e.enableKioskShortcutMenu)))&&void 0!==e&&e,l=Xs((e=>e.kioskModeStrictness)),s=(0,Le.ye)("enableStrictKioskModeControl"),c=(0,d.P)(Sc.X.ENABLE_STRICT_KIOSK_MODE_CONTROL),h=(0,a.useCallback)(((e,t)=>{n(Js(Ys.U.actions.kioskAppSet({appId:e,type:t})))}),[n]);return(0,p.jsx)(Me.Z,{children:(0,p.jsxs)(m.Z,{padding:3,paddingTop:2,spacing:3,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Select a Kiosk App"}),(0,p.jsx)(rC,{sx:{minWidth:400},value:null!==(t=null===o||void 0===o?void 0:o.id)&&void 0!==t?t:"",onChange:h,hideNone:!0,autoSelectFirstInList:!0,privilege:"configurations"})]}),(0,p.jsx)(i.Z,{width:"100%",children:(0,p.jsx)(Ie.Z,{})}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Enable Shortcut Menu?"}),(0,p.jsx)(_v,{deviceExperienceMode:vp.w_.Kiosk,enabled:r,onToggle:()=>{n(Js(Ys.U.actions.enableKioskShortcutMenuToggled()))}})]}),(s||c)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{sx:{width:"100%"}}),(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsx)(aC,{deviceExperienceMode:vp.w_.Kiosk,value:l,onChange:e=>{n(Js(Ys.U.actions.kioskModeStrictnessChanged({strictness:e})))}})})]})]})})};lC.displayName="ConfigurationKioskAppSelect";const sC=e=>{let{noneLabel:t="None",autoSelectFirstInList:n=!1,value:i,onChange:r,...l}=e;const{approvedVideos:s}=ld(),d=(0,a.useMemo)((()=>(0,o.map)(s,(e=>({value:e.id,label:e.title})))),[s]);return(0,a.useEffect)((()=>{n&&!i&&d[0]&&r(d[0].value)}),[n,d,i,r]),(0,p.jsx)(Qi,{...l,value:i,onChange:e=>r(e),options:d,privilege:"configurations"})};sC.displayName="ConfigurationApprovedVideoSelect";var dC=n(11099);const cC=Be.vc.configuration.defaultKioskVideoSettings.restartVideoAfterHmdOffDelay,uC=()=>{var e,t,n,r;const l=(0,u.I0)(),s=Xs((e=>e.kioskVideoRef)),c=null!==(e=Xs((e=>e.enableKioskShortcutMenu)))&&void 0!==e&&e,h=Xs((e=>e.kioskModeStrictness)),g=(0,Le.ye)("enableStrictKioskModeControl"),C=(0,d.P)(Sc.X.ENABLE_STRICT_KIOSK_MODE_CONTROL),x=Be.vc.configuration.defaultKioskVideoSettings.loopKioskVideo,f=null!==(t=Xs((e=>{var t;return null===(t=e.kioskVideoSettings)||void 0===t?void 0:t.loopKioskVideo})))&&void 0!==t?t:x,b=null!==(n=Xs((e=>{var t;return null===(t=e.kioskVideoSettings)||void 0===t?void 0:t.restartVideoAfterHmdOff})))&&void 0!==n&&n,y=(e=>{if((0,o.isUndefined)(e))return cC;const t=(0,o.find)(dC.di,(t=>t===e));return null!==t&&void 0!==t?t:cC})(Xs((e=>{var t;return null===(t=e.kioskVideoSettings)||void 0===t?void 0:t.restartVideoAfterHmdOffDelay}))),j=(0,a.useCallback)((e=>{l(Js(Ys.U.actions.kioskVideoSet({videoId:e})))}),[l]),Z=(0,a.useCallback)((e=>{l(Js(Ys.U.actions.setRestartVideoAfterHmdOffDelay({delay:e})))}),[l]);return(0,p.jsx)(Me.Z,{children:(0,p.jsxs)(m.Z,{padding:3,paddingTop:2,spacing:3,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Select a Kiosk Video"}),(0,p.jsx)(sC,{sx:{minWidth:400},value:null!==(r=null===s||void 0===s?void 0:s.id)&&void 0!==r?r:"",onChange:j,hideNone:!0,autoSelectFirstInList:!0,privilege:"configurations"})]}),(0,p.jsx)(i.Z,{width:"100%",children:(0,p.jsx)(Ie.Z,{})}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Video Playback"}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(m.Z,{direction:"row",children:(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",spacing:1,sx:{cursor:"pointer"},onClick:()=>{l(Js(Ys.U.actions.loopKioskVideoToggled()))},children:[(0,p.jsx)(ho.Z,{checked:f}),(0,p.jsx)(v.Z,{variant:"body2",children:"Loop video"})]})}),(0,p.jsx)(m.Z,{spacing:1,children:(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",paddingTop:1,spacing:1,children:[(0,p.jsx)(ho.Z,{checked:b,onClick:()=>{l(Js(Ys.U.actions.restartVideoAfterHmdDelayToggled()))}}),(0,p.jsx)(v.Z,{variant:"body2",children:"Reset video"}),(0,p.jsx)(dC.bz,{value:y,onChange:e=>Z(e)}),(0,p.jsx)(v.Z,{variant:"body2",children:"after headset taken off"})]})})]})]}),(0,p.jsx)(i.Z,{width:"100%",children:(0,p.jsx)(Ie.Z,{})}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Enable Shortcut Menu?"}),(0,p.jsx)(_v,{deviceExperienceMode:vp.w_.KioskVideo,enabled:c,onToggle:()=>{l(Js(Ys.U.actions.enableKioskShortcutMenuToggled()))}})]}),(g||C)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{sx:{width:"100%"}}),(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsx)(aC,{deviceExperienceMode:vp.w_.KioskVideo,value:h,onChange:e=>{l(Js(Ys.U.actions.kioskModeStrictnessChanged({strictness:e})))}})})]})]})})};uC.displayName="ConfigurationKioskVideoSelect";const pC=()=>{var e,t;const n=Xs((e=>e)),i=(0,u.I0)(),r=(0,d.U5)(),l=null!==(e=Xs((e=>e.deviceExperienceMode)))&&void 0!==e?e:vp.w_.Default,s=null!==(t=Xs((e=>e.enableKioskShortcutMenu)))&&void 0!==t&&t,c=Xs((e=>e.approvedApps)),h=Xs((e=>e.approvedInstantApps)),g=Xs((e=>e.approvedVideos)),v=(0,a.useCallback)((e=>{i(Js(Ys.U.actions.deviceExperienceModeChanged({deviceExperienceMode:e,subscriptionTierIsPremium:r})))}),[i,r]),[C,x]=(0,a.useState)("content"),f=(0,a.useMemo)((()=>{let e=[];return e=l===vp.w_.HomeScreen?["content","settings","layout","images","colors","meta"]:s?["images","settings","colors","meta"]:[],e}),[l,s]);(0,a.useEffect)((()=>x((e=>(0,o.includes)(f,e)?e:f[0]))),[f]);const b=l!==vp.w_.Default,y=(0,o.isEmpty)(f)&&b,j=(l===vp.w_.Kiosk||l===vp.w_.KioskVideo)&&s,Z=l===vp.w_.HomeScreen||j,w=l===vp.w_.Kiosk||l===vp.w_.KioskVideo?"shortcutMenu":"homeScreen",[E,S]=(0,a.useState)(w);return(0,a.useEffect)((()=>{S(l===vp.w_.Kiosk||l===vp.w_.KioskVideo?"shortcutMenu":"homeScreen")}),[l]),(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(m.Z,{paddingBottom:2,children:(0,p.jsx)(Xh,{title:"Select a Device Experience",deviceExperienceMode:l,approvedAppRefs:c,approvedVideoRefs:g,approvedInstantAppRefs:h,handleDeviceExperienceModeChange:v})}),l===vp.w_.Kiosk&&(0,p.jsx)(lC,{}),l===vp.w_.KioskVideo&&(0,p.jsx)(uC,{}),l===vp.w_.Default&&(0,p.jsx)(Jm,{}),n&&(0,p.jsxs)(m.Z,{spacing:0,children:[Z&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ym,{configuration:n,onAppMoved:e=>{i(Js(Ys.U.actions.launcherOrderSet({order:e})))},mode:E}),(0,p.jsx)(Qm,{onPreviewModeToggleChanged:e=>S(e),configuration:n,previewMode:E})]}),b&&!y&&(0,p.jsx)(nC,{visibleTabIds:f,activeTabId:C,onActiveTabIdC
3hange:x}),y&&(0,p.jsxs)(m.Z,{paddingLeft:3,paddingRight:3,spacing:3,children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(sg,{useDividers:!1})]})]})]})},hC=()=>(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"runtime-file-manifests/get-download-url"})),[])),mC=new Map,gC=e=>(0,o.fromPairs)((0,o.map)(e,(e=>{let[t,n]=e;return[t,(0,o.map)(n,(e=>({id:e,path:"".concat(S.F.Files,"/").concat(e)})))]}))),vC=e=>{const{requestAsync:t}=hC(),[n,i]=(0,a.useState)({}),o=(0,a.useRef)(new Set),r=(0,a.useRef)(!1);(0,a.useEffect)((()=>()=>{r.current=!0}),[]);const l=!e.fileRefs&&e.filesManifest?e.filesManifest.manifestPath:void 0;return(0,a.useEffect)((()=>{const e=l;e&&!o.current.has(e)&&(o.current.add(e),((e,t)=>{let n=mC.get(e);return n||(n=t({data:{manifestPath:e}}).then((e=>{let{downloadUrl:t}=e;return Dg().get(t)})).then((e=>e.data)),n.catch((()=>mC.delete(e))),mC.set(e,n)),n})(e,t).then((t=>{r.current||i((n=>({...n,[e]:gC(t)})))})).catch((t=>{(0,Si.yR)(t,{name:"FileLibraryManifestFetchError",contexts:{manifest:{manifestPath:e}}})})))}),[l,t]),e.fileRefs?e.fileRefs:l?n[l]:{}};var CC=n(7235);const xC="UIFileRefsTable-moreButton",fC=e=>{let{row:t}=e;const{handleRowContextMenu:n}=ox();return t.original.itemId===Od.Pm?null:(0,p.jsx)(x.Z,{className:xC,onClick:e=>{e.stopPropagation(),n(e,t)},color:"inherit",sx:{position:"absolute",right:8,zIndex:1},children:(0,p.jsx)(CC.Z,{})})};fC.displayName="UIFileRefsTableCellMoreButton";var bC=n(67657),yC=n(65322),jC=n(46198),ZC=n(35939),wC=n(53513);const EC=(0,a.memo)((e=>{var t,n;let{fileType:i,IconProps:o}=e;const a=null!==(n={image:bC.Z,video:yC.Z,audio:jC.Z,text:ZC.Z,application:wC.Z}[null!==(t=i.split("/")[0])&&void 0!==t?t:""])&&void 0!==n?n:wC.Z;return(0,p.jsx)(a,{...o})}));var SC=n(51029),DC=n(58931),MC=n(8663),kC=n(34550);const IC=e=>{let{deepFileCount:t,size:n}=e;return"".concat((0,ul.sr)(t,"file"),", ").concat((0,Ad.Z)(n))};var AC=n(50682),RC=n(8639);const TC="uiFileRefsTableDropzoneRoot",PC=e=>{let{dragDropItem:t,rows:n,index:o,children:r,rootDropzoneHeight:l=0,tooltipTitle:s="",tooltipEnterDelay:d=1500,isDragging:c}=e;const{privileges:u}=(0,w.P)(),{tableId:h,canDropOnRow:m,handleFilesDropped:g,canDropFiles:v}=ox(),C=(0,a.useMemo)((()=>null!==t&&void 0!==t?t:{itemId:TC,itemType:"folder",directory:Od.Pm,tableId:h}),[t,h]),x=(0,a.useCallback)((e=>{g(e,C.directory)}),[C.directory,g]),f=(0,Eg.uI)({onDropAccepted:x,multiple:!0,noClick:!0,useFsAccessApi:!0,disabled:!u.content||!v}),[{isDraggedOver:b},j]=(0,am.L)((()=>({accept:[NC],drop:()=>C,canDrop:e=>m(e,C),collect:e=>({isDraggedOver:e.isOver()&&e.canDrop()})})),[C,m]),Z=(0,a.useMemo)((()=>{if(C.directory===Od.Pm){const e=o,t=n.length-o-1;return{top:-e*LC,bottom:C.itemId===TC?0:-t*LC-l}}const e=e=>!!e&&(0,Od.LO)(e.original.directory,C.directory);let t=0;for(let a=o-1;a>=0&&e(n[a]);a--)t+=1;let i=0;for(let a=o+1;a<n.length&&e(n[a]);a++)i+=1;return{top:-t*LC,bottom:-i*LC,marginLeft:"folder"===C.itemType?0:-th.T}}),[C.directory,C.itemId,C.itemType,o,l,n]),E=b||f.isDragAccept;return(0,p.jsxs)(p.Fragment,{children:[E&&(0,p.jsx)(i.Z,{sx:{position:"absolute",right:0,left:0,zIndex:1,border:"2px dashed ".concat(y.DG.purple[600]),borderRadius:1,pointerEvents:"none",...Z}}),(0,p.jsx)(ee.Z,{title:c?"":s,followCursor:!0,placement:"bottom-start",enterDelay:d,enterNextDelay:500,children:(0,p.jsx)(i.Z,{...f.getRootProps({ref:j,style:{position:"absolute",inset:0,outline:"none"}}),"data-testid":t?void 0:"filesTableRootDropzone",children:r})})]})};PC.displayName="UIFileRefsTableDropzone";const LC=36,NC="UIFileRefsTableRow",UC={file:{default:{color:"text.primary"},hover:{backgroundColor:y.DG.grey[100]},selected:{backgroundColor:y.DG.purple[600],color:"white"},active:{backgroundColor:y.DG.purple[200],color:y.DG.purple[800]}},deviceFile:{default:{color:"text.primary"},hover:{backgroundColor:y.DG.grey[100]},selected:{backgroundColor:y.DG.purple[600],color:"white"},active:{backgroundColor:y.DG.purple[200],color:y.DG.purple[800]}},upload:{default:{color:"text.disabled"},hover:{backgroundColor:y.DG.grey[100]},selected:{backgroundColor:y.DG.purple[600],color:y.DG.purple[300]},active:{backgroundColor:y.DG.purple[200],color:y.DG.purple[400]}},folder:{default:{backgroundColor:y.DG.purple[50],color:y.DG.purple[700]},hover:{backgroundColor:y.DG.purple[100]},selected:{backgroundColor:y.DG.purple[600],color:"white"},active:{backgroundColor:y.DG.purple[200],color:y.DG.purple[800]}},pendingFolder:{default:{backgroundColor:y.DG.purple[50],color:"text.disabled"},hover:{backgroundColor:y.DG.purple[100]},selected:{backgroundColor:y.DG.purple[600],color:y.DG.purple[300]},active:{backgroundColor:y.DG.purple[200],color:y.DG.purple[400]}},root:{default:{backgroundColor:y.DG.grey[200],color:"text.primary"},hover:{},selected:{},active:{}}},FC=(0,a.forwardRef)(((e,t)=>{let{index:n,style:r,rootDropzoneHeight:l,row:s}=e;const{tableId:d,table:c,flexColumnIds:u,activeRows:h,disableSelection:g,disableDragDrop:C,handleRowClick:x,handleRowContextMenu:f,handleRowDragStart:b,handleRowDragEnd:y,handleRowDropped:j,renamingFolderId:Z,toggleFolderExpanded:w,getIsItemPending:E,getIsItemSelectable:S}=ox(),D=c.getRowModel().rows,M=s.original.itemId===Od.Pm,k=D[n+1],I=D[n-1],A=s.original.itemType,R=E(s.original),T=M?UC.root:R?"folder"===A?UC.pendingFolder:UC.upload:UC[A],P=(0,o.includes)(h,s),L=P&&(0,o.includes)(h,k),N=P&&(0,o.includes)(h,I),U=M||s.original.itemId===Z,F=s.getIsSelected(),O=g||!S(s.original),_=c.getSelectedRowModel().flatRows,z=(0,o.filter)((0,o.concat)(_,h),(e=>"folder"===e.original.itemType&&(0,Od.LO)(s.original.parentDirectory,e.original.directory))),B=(0,a.useMemo)((()=>({itemId:s.original.itemId,itemType:s.original.itemType,directory:s.original.directory,tableId:d})),[s.original.directory,s.original.itemId,s.original.itemType,d]),[{isDragging:W},V,G]=(0,qv.c)((()=>({type:NC,canDrag:()=>!C&&!U,item:()=>(b(B),B),end:(e,t)=>{y(B);const n=t.didDrop(),i=t.getDropResult();n&&i&&j(e,i)},collect:e=>({isDragging:e.isDragging()})})),[B,b,y,j]);(0,a.useEffect)((()=>{G((0,AC.r)())}),[G]);const H=R?(0,p.jsx)(v.Z,{variant:"body2",children:"Deletion pending. This file will be removed the next time this device comes online."}):"file"===s.original.itemType?(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",children:s.original.n
3ame}),s.original.description&&(0,p.jsx)(v.Z,{variant:"caption",children:s.original.description})]}):M?void 0:(0,p.jsx)(v.Z,{variant:"body2",children:s.original.name});return(0,p.jsxs)(th.J,{style:r,flexColumnIds:u,ref:t,row:s,onClick:U?void 0:e=>x(e,s),onContextMenu:U?void 0:e=>f(e,s),sx:{position:"relative",cursor:U||O?void 0:"pointer",borderRadius:1,borderTop:"1px solid white",userSelect:"none",...P?T.active:F?T.selected:T.default,"& .MuiTableCell-root":{color:"inherit"},["& .".concat(xC)]:{visibility:"hidden"},"&:hover":{["& .".concat(xC)]:{visibility:"visible"},...P||F||U||O?{}:T.hover}},TableCellProps:{sx:{borderBottom:"none",paddingY:0}},"data-testid":"filesTableRow",children:["folder"===s.original.itemType&&!M&&(0,p.jsx)(m.Z,{sx:{position:"absolute",zIndex:1,width:50,height:1,left:0,alignItems:"flex-start",justifyContent:"center",paddingLeft:.125,borderRadius:1,cursor:"pointer","&:hover":{backgroundColor:e=>e.palette.action.hover}},onClick:e=>{e.stopPropagation(),w(s)},children:s.getIsExpanded()?(0,p.jsx)(mh.Z,{color:"inherit"}):(0,p.jsx)(RC.Z,{color:"inherit"})}),P&&(0,p.jsx)(i.Z,{sx:{position:"absolute",top:N?-1:0,bottom:0,left:0,right:0,borderWidth:2,borderColor:UC.folder.selected.backgroundColor,borderRadius:1,borderStyle:"solid",borderTopStyle:N?"none":void 0,borderTopLeftRadius:N?0:void 0,borderTopRightRadius:N?0:void 0,borderBottomStyle:L?"none":void 0,borderBottomLeftRadius:L?0:void 0,borderBottomRightRadius:L?0:void 0,pointerEvents:"none"}}),(0,o.map)((0,o.range)(s.depth),(e=>{var t;const n=s.depth-e-1,a=null!==(t=null===k||void 0===k?void 0:k.depth)&&void 0!==t?t:0,r=0===e||n>=a,l=a===n,d=(0,o.some)(z,(e=>e.depth===n))?UC.folder.selected.backgroundColor:UC.folder.hover.backgroundColor,c=-th.T*(e+1);return(0,p.jsx)(i.Z,{sx:{position:"absolute",borderLeftStyle:"solid",borderBottomStyle:r?"solid":"none",borderBottomLeftRadius:l?8:0,borderColor:d,borderWidth:2,height:"calc(100% + 1px)",width:e=>e.spacing(th.T),top:"-50%",marginLeft:c,zIndex:-1,pointerEvents:"none"}},e)})),(0,p.jsx)(i.Z,{sx:{position:"absolute",inset:0,top:-1},children:(0,p.jsx)(PC,{dragDropItem:B,rows:D,index:n,rootDropzoneHeight:l,tooltipTitle:H,tooltipEnterDelay:R?500:void 0,isDragging:W,children:(0,p.jsx)(i.Z,{ref:V,sx:{position:"absolute",inset:0},"data-testid":"filesTableRow_drag"})})})]})}));FC.displayName="UIFileRefsTableRow";const OC=e=>{let{onSave:t,onClear:n,inputRef:i,...o}=e;const r=(0,a.useRef)();return(0,p.jsx)(Ul.z,{...o,inputRef:i?(0,lh.l)([r,i]):r,onKeyDown:e=>{var t;(0,bg.r)(e)&&!e.shiftKey&&(e.preventDefault(),e.stopPropagation(),null===(t=r.current)||void 0===t||t.blur());(0,bg.$)(e)&&n&&(e.preventDefault(),e.stopPropagation(),n(),setTimeout((()=>{var e;null===(e=r.current)||void 0===e||e.blur()}),0))},onBlur:()=>{t()}})},_C=e=>{let{row:t}=e;const n=(0,De.Z)(),{activeRows:r,filesFilter:l,renameFolder:s,renamingFolderId:d,setRenamingFolderId:c,disabledColumns:u,pendingFolderId:h,fileWarningsByPath:g,getIsItemPending:C}=ox(),x="folder"===t.original.itemType?t.original:void 0,[f,b]=(0,a.useState)(),j=(0,a.useRef)(),Z=(null===x||void 0===x?void 0:x.itemId)===h;(0,a.useEffect)((()=>{d!==(null===x||void 0===x?void 0:x.itemId)||Z?b(void 0):(b(null===x||void 0===x?void 0:x.name),setTimeout((()=>{var e,t;null===(e=j.current)||void 0===e||e.focus(),null===(t=j.current)||void 0===t||t.select()}),0))}),[null===x||void 0===x?void 0:x.itemId,null===x||void 0===x?void 0:x.name,d,Z]);const w=t.getIsSelected(),E=C(t.original),S=(0,o.includes)(r,t),D=t.original.itemId===Od.Pm,M="file"===t.original.itemType?null===g||void 0===g?void 0:g[(0,Od.SF)((0,Od.SF)(Od.Pm,t.original.parentDirectory),t.original.name)]:void 0,k=D&&t.original.name===Od.uu?(0,p.jsx)(SC.Z,{}):"folder"===t.original.itemType?t.getIsExpanded()?(0,p.jsx)(DC.Z,{fontSize:"small",sx:{marginX:.25}}):(0,p.jsx)(MC.Z,{fontSize:"small",sx:{marginX:.25}}):(0,p.jsx)(EC,{fileType:t.original.type,IconProps:{color:w||E?"inherit":"action"}}),I=(0,a.useMemo)((()=>{const e=UC[t.original.itemType],n=S?e.active:w?e.selected:e.default;if(!n.backgroundColor)return y.DG.purple[100];return(0,Dr.H3)(n.backgroundColor)<.5?(0,Dr.$n)(n.backgroundColor,.2):(0,Dr._j)(n.backgroundColor,.15)}),[S,w,t.original.itemType]),A=(0,a.useCallback)((e=>l?(0,ul.d2)(e,l,(e=>(0,p.jsx)(v.Z,{variant:"inherit",component:"span",sx:{backgroundColor:I},children:e})),{caseInsensitive:!0}):e),[l,I]);return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",width:1,paddingLeft:.75,children:[k,(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",overflow:"hidden",flexGrow:1,children:[x&&t.original.itemId===d&&!Z?(0,p.jsx)(OC,{placeholder:"Folder",value:null!==f&&void 0!==f?f:t.original.n
3ame,onChange:e=>b(e.target.value),onSave:async()=>{void 0!==f&&c(void 0),x&&f&&f!==x.name&&await s(x,f)},onClear:()=>{c(void 0)},fullWidth:!0,privilege:"content",autoFocus:!0,inputRef:j,inputProps:{style:{...n.typography.body2,paddingTop:7,paddingBottom:7}},sx:{zIndex:1}}):(0,p.jsx)(v.Z,{variant:"subtitle2",noWrap:!0,children:A(t.original.name)}),"folder"===t.original.itemType&&D&&(0,o.includes)(u,"size")&&(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",marginLeft:1,children:IC(t.original)}),"file"===t.original.itemType&&t.original.description&&(0,p.jsxs)(v.Z,{flexBasis:0,flexGrow:1,variant:"caption",noWrap:!0,children:[(0,p.jsx)(i.Z,{display:"inline-block",width:20}),A(t.original.description)]})]}),M&&(0,p.jsx)(ee.Z,{title:M,children:(0,p.jsx)(i.Z,{display:"flex",alignItems:"center",children:(0,p.jsx)(kC.Z,{color:"warning",fontSize:"small"})})}),"deviceFile"===t.original.itemType&&t.original.managedFileId&&(0,p.jsx)(Wl.Z,{})]})};_C.displayName="UIFileRefsTableCellName";const zC=e=>{let{row:t}=e;return"folder"===t.original.itemType?(0,p.jsx)(v.Z,{variant:"subtitle2",noWrap:!0,sx:{position:"absolute",opacity:.7},children:IC(t.original)}):(0,p.jsx)(v.Z,{variant:"subtitle2",children:(0,Ad.Z)(t.original.size)})};zC.displayName="UIFileRefsTableCellSize";const BC=e=>{let{row:t}=e;return"folder"===t.original.itemType?null:(0,p.jsx)(v.Z,{variant:"subtitle2",children:(0,Od.wm)(t.original)})};BC.displayName="UIFileRefsTableCellType";var WC=n(14667);const VC=(0,a.createContext)(void 0),GC=e=>{let{children:t}=e;const{notify:n}=(0,ie.o)(),{organizationId:i}=(0,w.P)(),{request:r}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"managed-files/create",getDocumentUpdate:e=>{let{response:t}=e;return(0,o.map)(t.files,(e=>({collection:S.F.Files,id:e.id,set:e})))}})),[])),{managedFileUploads:l,addManagedFileUpload:s,setManagedFileUploadProgress:d,setManagedFileUploadUrl:c,removeManagedFileUpload:h,renameManagedFileUploadDirectory:m,moveManagedFileUpload:g,moveManagedFileUploadDirectory:v,managedFileUploadDirectoriesRef:C}=(()=>{const e=(0,u.I0)(),{organizationId:t}=(0,w.P)(),n=(0,a.useRef)({}),[i,r]=(0,WC.x)({}),l=(0,a.useCallback)((e=>{const{id:i,directory:a}=e;r((n=>{(0,o.set)(n,[t,i],e)})),n.current[i]=a}),[t,r]),s=(0,a.useCallback)(((n,i)=>{e(Te.dV.actions.managedFileUploadProgressSet({organizationId:t,uploadId:n,uploadProgress:i}))}),[e,t]),d=(0,a.useCallback)(((e,n)=>{r((i=>{var o;null!==(o=i[t])&&void 0!==o&&o[e]&&(i[t][e].url=n)}))}),[t,r]),c=(0,a.useCallback)((i=>{r((e=>{var n;const o=null===(n=e[t])||void 0===n?void 0:n[i];o&&(o.abortController.abort(),delete e[t][i])})),e(Te.dV.actions.managedFileUploadProgressSet({organizationId:t,uploadId:i,uploadProgress:void 0})),delete n.current[i]}),[e,t,r]);return{managedFileUploads:(0,a.useMemo)((()=>i[t]||{}),[i,t]),addManagedFileUpload:l,setManagedFileUploadProgress:s,setManagedFileUploadUrl:d,removeManagedFileUpload:c,renameManagedFileUploadDirectory:(0,a.useCallback)(((e,i,a)=>r((r=>{(0,o.forEach)(r[t],(t=>{const o=(0,Od.o2)({directory:t.directory,sourceDirectory:e,sourceParentDirectory:i,newName:a});t.directory=o,n.current[t.id]=o}))}))),[t,r]),moveManagedFileUpload:(0,a.useCallback)(((e,i)=>{r((o=>{var a;const r=null===(a=o[t])||void 0===a?void 0:a[e];r&&(r.directory=i,n.current[r.id]=i)}))}),[t,r]),moveManagedFileUploadDirectory:(0,a.useCallback)(((e,i)=>r((a=>{(0,o.forEach)(a[t],(t=>{const o=(0,Od.Te)({directory:t.directory,sourceDirectory:e,destinationDirectory:i});t.directory=o,n.current[t.id]=o}))}))),[t,r]),managedFileUploadDirectoriesRef:n}})(),x=(0,a.useCallback)(((e,t)=>{var n;const{name:i,type:a,size:r}=e,l=null!==(n=e.path)&&void 0!==n?n:i,s=new RegExp("".concat((0,o.escapeRegExp)(i),"$")),d=(0,o.replace)(l,s,""),c=(0,Od.SF)(t,d);return{id:(0,Vt.Z)(),name:i,type:a,size:r,uploadDate:{seconds:(0,M.Mn)().unix(),nanoseconds:0},directory:c,abortController:new AbortController}}),[]),f=(0,a.useRef)({});(0,a.useEffect)((()=>{const e=setInterval((()=>{(0,o.forEach)(f.current,(e=>{let{apiRequestMethod:t,removeUploadMethod:n,files:i,uploadIds:a}=e;t({data:{files:i},onFinally:()=>{setTimeout((()=>{(0,o.forEach)(a,n)}),1e3)}})})),f.current={}}),2e3);return()=>clearInterval(e)}),[]);const b=(0,a.useCallback)((async e=>{(0,o.forEach)(e,(e=>{let{managedFileUpload:t}=e;s(t)}));const t=async(e,t)=>{const{id:a,abortController:l}=t,s="files/".concat((0,Vt.Z)()),u=(0,o.throttle)((e=>d(a,e)),500);try{const t=await Ug({organizationId:i,file:e,filePath:s,onProgress:u,abortController:l});if(!t)return;const{storageUrl:n}=t;c(a,n);const o=C.current[a];if(!o)return;const{name:d,type:p,size:m}=e;f.current[i]||(f.current[i]={apiRequestMethod:r,removeUploadMethod:h,files:[],uploadIds:[]}),f.current[i].files.push({name:d,type:p,size:m,url:n,directoryPath:o}),f.current[i].uploadIds.push(a)}catch(p){h(a),n({severity:"error",message:"Error uploading file ".concat(e.name)}
3),(0,Si.yR)(p,{name:"upload managed file error",contexts:{args:{file:(0,o.omit)(t,["abortController"])}}})}};await Promise.all((0,o.map)(e,(e=>{let{file:n,managedFileUpload:i}=e;return t(n,i)})))}),[s,i,c,C,r,d,h,n]),y=(0,a.useMemo)((()=>(0,o.groupBy)(l,"directory")),[l]);return(0,p.jsx)(VC.Provider,{value:{managedFileUploads:l,managedFileUploadsByDirectory:y,convertToManagedFileUpload:x,uploadManagedFiles:b,removeManagedFileUpload:h,renameManagedFileUploadDirectory:m,moveManagedFileUpload:g,moveManagedFileUploadDirectory:v},children:t})},HC=e=>{const{organizationId:t}=(0,w.P)();return(0,u.v9)((n=>{var i,o;return e?null===(i=n.ui.fileUploadProgress[t])||void 0===i||null===(o=i.managedFiles)||void 0===o?void 0:o[e]:void 0}))},qC=e=>{var t;let{row:n}=e;const i=HC("upload"===n.original.itemType?n.original.id:void 0);return"file"===n.original.itemType?(0,p.jsx)(v.Z,{variant:"subtitle2",children:(0,M.Mn)(n.original.uploadDate).format("MMM D, YYYY")}):"upload"===n.original.itemType?(0,p.jsx)(Rn.Z,{variant:"determinate",value:null!==(t=null===i||void 0===i?void 0:i.percentComplete)&&void 0!==t?t:0,sx:{width:"90%"}}):null};qC.displayName="UIFileRefsTableCellUploaded";const YC=e=>{var t,n;let{position:i,rows:o,onClose:a,renderContextMenu:r}=e;const l=1===(null===o||void 0===o?void 0:o.length)&&"file"===(null===(t=o[0])||void 0===t?void 0:t.original.itemType)?o[0].original:void 0,s=1===(null===o||void 0===o?void 0:o.length)&&"folder"===(null===(n=o[0])||void 0===n?void 0:n.original.itemType)?o[0].original:void 0;return(0,p.jsx)(Is.Z,{disableRestoreFocus:!0,open:!!i,onClose:a,onContextMenu:e=>{e.preventDefault(),a()},anchorReference:"anchorPosition",anchorPosition:i?{top:i.top-4,left:i.left+4}:void 0,MenuListProps:{sx:{width:250,borderRadius:10}},sx:{borderRadius:10,"& .MuiMenu-paper":{borderRadius:"8px"},"& .MuiListItemText-primary":{...y.cp.subtitle2}},children:r({rows:o,onClose:a,selectedFile:l,selectedFolder:s})})};var KC=n(10569);const XC=()=>{const{tableId:e}=ox(),t=(0,KC.f)((t=>{const n=t.isDragging(),i=t.getItemType(),o=t.getClientOffset();if(!n||i!==NC||!o)return;const a=t.getItem();return a.tableId===e?{dragItem:a,pointerPosition:o}:void 0}));return t?(0,p.jsx)(QC,{...t}):null},QC=e=>{let{dragItem:t,pointerPosition:n}=e;const{activeRows:o}=ox(),{x:a,y:r}=n;return(0,p.jsx)(i.Z,{sx:{position:"fixed",inset:0,zIndex:e=>e.zIndex.modal-1,pointerEvents:"none"},children:(0,p.jsx)(m.Z,{style:{alignItems:"center",justifyContent:"center",borderRadius:"50%",height:27,width:27,backgroundColor:y.DG.error[200],transform:"translate(".concat(a+20,"px, ").concat(r,"px)")},children:(0,p.jsx)(v.Z,{variant:"subtitle1",color:y.DG.white,children:o.length})})})};XC.displayName="UIFileRefsTableDragPreview";var JC=n(63095);const $C=["name","size","type","date"],ex=(0,a.createContext)(void 0),tx=()=>!1,nx=()=>!0,ix=e=>{let{contextRef:t,rootDirectory:n,deleteDialogData:i,tableId:r,canDropItems:l,onDragDrop:s,onAddFolder:d,disableDragDrop:c=!1,pendingFolderId:u,disableSelection:h=!1,onFilesDropped:m,renderContextMenu:g,getExtraColumns:v,disabledColumns:C,children:x,filesFilter:f,onRenameFolder:b,expanded:y,privilege:j,fileWarningsByPath:Z,getIsItemPending:E=tx,getIsItemSelectable:S=nx}=e;const{hasRequiredPrivilege:D}=(0,w.P)(),M=(0,_n.S)({xs:130,lg:160}),k=(0,_n.S)({xs:80,lg:120}),I=(0,a.useMemo)((()=>{const e=(0,da.Cl)(),t=[],n={name:e.accessor((e=>e.name),{id:"name",header:"Name",cell:e=>{let{row:t}=e;return(0,p.jsx)(_C,{row:t})},size:50,sortingFn:(e,t)=>(0,ze.gt)(e.original,t.original)}),size:e.accessor((e=>e.size),{id:"size",header:"Size",cell:e=>{let{row:t}=e;return(0,p.jsx)(zC,{row:t})},size:M}),type:e.accessor((e=>"folder"===e.itemType?"":(0,Od.wm)(e)),{id:"type",header:"Type",cell:e=>{let{row:t}=e;return(0,p.jsx)(BC,{row:t})},size:k,sortingFn:da.V2.text}),date:e.accessor((e=>"folder"===e.itemType?0:"deviceFile"===e.itemType?e.updatedAt:e.uploadDate.seconds),{id:"date",header:"Uploaded",cell:e=>{let{row:t}=e;return(0,p.jsx)(qC,{row:t})},size:128})},i=(0,o.difference)($C,null!==C&&void 0!==C?C:[]);return t.push(...(0,o.map)(i,(e=>n[e]))),v&&t.push(...(0,o.castArray)(v(e))),g&&t.push(e.display({id:"more-button",cell:e=>{let{row:t}=e;return(0,p.jsx)(fC,{row:t})},size:40})),t}),[C,v,g,M,k]),A=(0,a.useMemo)((()=>({sorting:[{id:"name",desc:!1}],rowSelection:{},expanded:!!y||{[Od.Pm]:!0}})),[y]),R=(0,a.useMemo)((()=>n.name?[n]:n.items),[n]),T=(0,sa.b7)({columns:I,data:R,initialState:A,autoResetAll:!0,enableSortingRemoval:!1,globalFilterFn:da.KT.includesString,getRowId:e=>e.itemId,getSubRows:e=>"folder"===e.itemType?e.items:[],getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)(),getExpandedRowModel:(0,da.rV)()}),P=(0,a.useCallback)((()=>T.resetRowSelection()),[T]);(0,a.useEffect)((()=>{const e=e=>{(0,bg.$)(e)&&P()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[P]),(0,a.useEffect)((()=>{h&&P()}
3),[P,h]);const L=(0,a.useCallback)((()=>{setTimeout((()=>{const e=T.getRowModel().rowsById;T.setRowSelection((t=>(0,o.pickBy)(t,((t,n)=>{const i=e[n];return!(null===i||void 0===i||!i.getIsAllParentsExpanded())&&S(i.original)}))))}),0)}),[S,T]),N=(0,a.useCallback)((()=>{setTimeout((()=>{const e=T.getRowModel().rowsById;T.setExpanded((t=>!0===t?t:(0,o.pickBy)(t,((t,n)=>!!e[n]))))}),0)}),[T]);(0,a.useLayoutEffect)((()=>{L(),N()}),[N,L,R]);const U=(0,a.useCallback)((e=>{const t=e.getIsExpanded();e.toggleExpanded(),t&&L()}),[L]),F=(0,a.useCallback)((()=>{T.setExpanded(!0)}),[T]),O=(0,a.useCallback)((()=>{T.setExpanded({[Od.Pm]:!0}),L()}),[L,T]),_=!!f,z=(0,a.useRef)((0,o.pick)(A,["expanded","rowSelection"]));(0,a.useEffect)((()=>{!_&&z.current?T.setState((e=>({...e,...z.current}))):(z.current=(0,o.pick)(T.getState(),["expanded","rowSelection"]),P(),T.setExpanded(!0))}),[P,T,_]);const B=(0,a.useCallback)(((e,t)=>{!h&&S(t.original)&&T.setRowSelection((n=>{const i=e.nativeEvent.shiftKey,a=e.nativeEvent.metaKey||e.nativeEvent.ctrlKey,r=n[t.id];if(a){var l;if(r)return(0,o.omit)(n,t.id);return(null===(l=T.getSelectedRowModel().flatRows[0])||void 0===l?void 0:l.original.parentDirectory)===t.original.parentDirectory?{...n,[t.id]:!0}:{[t.id]:!0}}if(i){if(r)return(0,o.omit)(n,t.id);{var s;const e=T.getSortedRowModel().flatRows,i=(0,o.findIndex)(e,t);if(-1===i)return n;const[a,r]=(0,JC.q)(e,i,(e=>{let{id:t}=e;return!!n[t]})),l=(0,o.slice)(e,a,r),d=null===(s=T.getSelectedRowModel().flatRows[0])||void 0===s?void 0:s.original.parentDirectory,c=(0,o.filter)(l,(e=>(!d||e.original.parentDirectory===d)&&S(e.original))),u=(0,o.chain)(c).keyBy("id").mapValues((()=>!0)).value();return{...n,...u}}}return r&&1===(0,o.size)(n)?{}:{[t.id]:!0}}))}),[h,S,T]),[W,V]=(0,a.useState)({}),G=(0,a.useCallback)((()=>V({})),[]),H=(0,a.useCallback)(((e,t)=>{if(!g)return;e.preventDefault();const n=T.getSelectedRowModel(),i=n.rowsById[t.id]?n.flatRows:[t];V({position:{top:e.clientY,left:e.clientX},rows:i})}),[g,T]),q=c||!s||!D(j),[Y,K]=(0,a.useState)(),X=(0,a.useCallback)((e=>{if(!e)return;const t=T.getSelectedRowModel(),n=t.rowsById[e.itemId]?t.flatRows:[T.getRowModel().rowsById[e.itemId]];return(0,o.compact)(n)}),[T]),Q=(0,a.useCallback)((e=>{q||K(e)}),[q]),J=(0,a.useCallback)((e=>{q||K((t=>(null===t||void 0===t?void 0:t.itemId)===e.itemId?void 0:t))}),[q]),$=(0,a.useCallback)(((e,t)=>{if(q)return!1;if(!l)return!0;const n=X(e),i=(0,o.map)(n,"original");return l(e,i,t)}),[q,l,X]),ee=(0,a.useCallback)((async(e,t)=>{if(q)return;const n=X(e),i=(0,o.map)(n,"original");await s(e,i,t)}),[X,s,q]),te=(0,a.useMemo)((()=>(0,o.compact)((0,o.concat)(null===W||void 0===W?void 0:W.rows,null===i||void 0===i?void 0:i.rows,X(Y)))),[null===W||void 0===W?void 0:W.rows,null===i||void 0===i?void 0:i.rows,Y,X]),ne=!!m,ie=(0,a.useCallback)(((e,t)=>{ne&&m(e,t)}),[ne,m]),oe=(0,a.useCallback)((e=>{const t=T.getRowModel().rowsById,n=n=>(0,o.mapKeys)(n,((n,i)=>{const o=t[i];return o?e(o):i}));T.setRowSelection((e=>n(e))),T.setExpanded((e=>!0===e||n(e)))}),[T]),ae=(0,a.useCallback)(((e,t,n)=>{oe((i=>{const o=(0,Od.o2)({directory:i.original.directory,sourceDirectory:e,sourceParentDirectory:t,newName:n});return"folder"===i.original.itemType?o:"deviceFile"===i.original.itemType?"".concat(o,":").concat(i.original.name):"".concat(o,":").concat(i.original.id)}))}),[oe]),re=(0,a.useCallback)(((e,t)=>{const n=(0,o.groupBy)(e,"itemType");oe((e=>{for(const o of null!==(i=n.folder)&&void 0!==i?i:[]){var i;const n=(0,Od.Te)({directory:e.original.directory,sourceDirectory:o.directory,destinationDirectory:t});if(n!==e.original.directory)return"folder"===e.original.itemType?n:"deviceFile"===e.original.itemType?"".concat(n,":").concat(e.original.name):"".concat(n,":").concat(e.original.id)}if("file"===e.original.itemType){if((0,o.some)(n.file,{itemId:e.original.itemId}))return"".concat(t,":").concat(e.original.id)}if("upload"===e.original.itemType){if((0,o.some)(n.upload,{itemId:e.original.itemId}))return"".concat(t,":").concat(e.original.id)}return e.original.itemId}))}),[oe]),[le,se]=(0,a.useState)(),de=(0,a.useCallback)((async(e,t)=>{b&&await b(e,t)}),[b]),[ce,ue]=(0,a.useState)(),pe=(0,a.useCallback)((e=>{const t=T.getRowModel().rows,n=(0,o.findIndex)(t,(t=>t.original.itemId===e));ue(n),setTimeout((()=>{ue(void 0)}),0)}),[T]),he=(0,a.useCallback)((async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Od.Pm;if(!d)return;const t=await d(e);if(!t)return;const n=(0,Od.Fc)(t),i=(0,o.chain)(n).map((e=>
3[e,!0])).fromPairs().value();T.setExpanded((e=>!0===e||{...e,...i})),pe(t),se(t),T.setRowSelection({[t]:!0})}),[d,pe,T]);return t&&(t.current={renameTableStateFolder:ae,moveTableStateItems:re}),(0,p.jsxs)(ex.Provider,{value:{table:T,tableId:r,flexColumnIds:"name",clearSelectedFiles:P,toggleFolderExpanded:U,expandAllFolders:F,collapseAllFolders:O,disableSelection:h,handleRowClick:B,handleRowContextMenu:H,disableDragDrop:q,pendingFolderId:u,handleRowDragStart:Q,handleRowDragEnd:J,canDropOnRow:$,handleRowDropped:ee,canDropFiles:ne,handleFilesDropped:ie,activeRows:te,filesFilter:f,addFolder:he,renameFolder:de,setRenamingFolderId:se,renamingFolderId:le,privilege:j,disabledColumns:C,scrollToRowIndex:ce,fileWarningsByPath:Z,getIsItemPending:E,getIsItemSelectable:S},children:[x,g&&(0,p.jsx)(YC,{...W,onClose:G,renderContextMenu:g}),(0,p.jsx)(XC,{})]})},ox=()=>{const e=(0,a.useContext)(ex);if(void 0===e)throw new Error("useUIFileRefsTableContext() must be used in a UIFileRefsTableProvider");return e};ex.displayName="UIFileRefsTableContext",ix.displayName="UIFileRefsTableProvider";var ax=n(75013);const rx=e=>{let{height:t="auto",emptyMessage:n="No files",virtualListStyle:r,noDropzone:l}=e;const s=(0,De.Z)(),{table:d,filesFilter:c,clearSelectedFiles:u,scrollToRowIndex:h}=ox(),m=d.getRowModel().rows,[g,v]=(0,a.useState)(0),{ref:C}=(0,Yi.y)((0,a.useCallback)((e=>{"auto"===t&&v(e.contentRect.height)}),[t])),x=(0,a.useMemo)((()=>{if(l)return 0;const e=m.length*LC+((0,o.isNumber)(null===r||void 0===r?void 0:r.paddingTop)?r.paddingTop:0);let n=0;return n="auto"===t?g-e:t-e,Math.max(n,s.spacingInt(ud.A8))}),[g,t,l,m.length,s,r]),f=(0,a.useCallback)((e=>{let{key:t,index:n,style:i,registerChild:o}=e;const a=d.getRowModel().rows[n];return a?(0,p.jsx)(FC,{ref:o,style:i,index:n,rootDropzoneHeight:x,row:a},t):null}),[x,d]),b=(0,a.useMemo)((()=>{var e;const t=d.getRowModel().rows,o=c?"No matching files":n,a=0===t.length||1===t.length&&(null===(e=t[0])||void 0===e?void 0:e.original.itemId)===Od.Pm;return l&&!a?[]:l?[{render:e=>{let{key:t,style:n,registerChild:a}=e;return(0,p.jsx)(i.Z,{style:n,ref:a,children:(0,p.jsx)(ax.B,{emptyMessage:o})},t)},height:ax.R}]:[{render:e=>{let{key:n,style:r,registerChild:l}=e;return(0,p.jsxs)(i.Z,{style:r,ref:l,position:"relative",onClick:u,children:[(0,p.jsx)(PC,{index:t.length,rows:t}),a&&(0,p.jsx)(ax.B,{emptyMessage:o})]},n)},height:x}]}),[u,x,n,c,l,d]);return(0,p.jsx)(i.Z,{ref:C,height:1,children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,table:d,height:t,rowHeight:LC,renderRow:f,extraRows:b,nativeListProps:{scrollToIndex:h,scrollToAlignment:"start",style:r}})})};rx.displayName="UIFileRefsTable";var lx=n(91293);const sx=()=>{const{privilege:e,addFolder:t}=ox(),[n,i]=(0,a.useState)(!1);return(0,p.jsx)(zi.W,{privilege:e,action:"add a folder",disableAutoSize:!0,children:(0,p.jsx)(C.Z,{variant:"outlined",startIcon:(0,p.jsx)(lx.Z,{}),onClick:async()=>{i(!0),await t(Od.Pm),i(!1)},disabled:n,children:"New folder"})})},dx=e=>{let{iconOnly:t=!1}=e;const{table:n,expandAllFolders:i,collapseAllFolders:o}=ox();return(0,p.jsxs)(Gh.Z,{disabled:!n.getCanSomeRowsExpand(),children:[(0,p.jsx)(ee.Z,{title:t?"Collapse":"",children:(0,p.jsx)(C.Z,{startIcon:t?void 0:(0,p.jsx)(RC.Z,{}),onClick:o,children:t?(0,p.jsx)(RC.Z,{}):"Collapse"})}),(0,p.jsx)(ee.Z,{title:t?"Open":"",children:(0,p.jsx)(C.Z,{startIcon:t?void 0:(0,p.jsx)(mh.Z,{}),onClick:i,children:t?(0,p.jsx)(mh.Z,{}):"Open"})})]})};var cx=n(67819);const ux=e=>{let{rows:t,selectedFile:n,selectedFolder:i,onClose:a,onRemoveItems:r}=e;const{privilege:l,addFolder:s,setRenamingFolderId:d}=ox();return(0,p.jsxs)(p.Fragment,{children:[i&&(0,p.jsx)(zi.W,{privilege:l,action:"add a folder",children:(0,p.jsxs)(Hi.Z,{onClick:()=>(s(i.directory),void a()),children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(lx.Z,{})}),(0,p.jsx)(Rs.Z,{children:"New Folder"})]})}),i&&(0,p.jsx)(zi.W,{privilege:l,action:"rename folders",children:(0,p.jsxs)(Hi.Z,{onClick:()=>(d(i.itemId),void a()),children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(cx.Z,{})}),(0,p.jsx)(Rs.Z,{children:"Rename"})]})}),i&&(0,p.jsx)(Ie.Z,{sx:{marginY:1}}),(0,p.jsx)(zi.W,{privilege:l,action:"remove files",children:(0,p.jsxs)(Hi.Z,{onClick:()=>{const e=(0,o.map)(t,"original");r(e),a()},children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(J.Z,{})}),(0,p.jsxs)(Rs.Z,{children:["Remove",n&&" File",i&&" Folder"]})]})})]})};ux.displayName="UIFileRefsTableTransferListContextMenu";const px={},hx=e=>{var t;
3let{fileRefs:n,onChange:r,destinationTitle:l,destinationRootName:s,destinationToolbarContent:d,destinationContentHeader:c,columnHeight:h,privilege:g,fileWarningsByPath:v}=e;const{notify:C}=(0,ie.o)(),x=(0,u.v9)((e=>e.firestore.data.files.data)),{fileSystem:f}=(0,Xn.w)(),b=null!==(t=vC(f))&&void 0!==t?t:px,y=(0,a.useMemo)((()=>(0,Vt.Z)()),[]),j=(0,a.useRef)(),Z=(0,a.useMemo)((()=>null!==n&&void 0!==n?n:{}),[n]),w=(0,a.useMemo)((()=>(0,Od.sd)({fileRefs:Z,filesById:x})),[Z,x]),E=(0,a.useMemo)((()=>(0,Od.R$)({filesByDirectory:w,rootName:s})),[w,s]),S=(0,a.useMemo)((()=>(0,Vt.Z)()),[]),[D,M,k]=(0,zn.G)("",300),I=(0,a.useMemo)((()=>(0,Od.sd)({fileRefs:b,filesById:x})),[b,x]),A=(0,a.useMemo)((()=>(0,Od.R$)({filesByDirectory:I,filesFilter:M})),[M,I]),R=(0,a.useCallback)((e=>{const t=(0,Od.HD)({fileRefs:Z,fileUploadDirectories:[],parentDirectory:e});if("error"!==t.type)return r(t.newFileRefs),t.newDirectory;var n;C({severity:"warning",message:null!==(n=(0,Od.gq)(t))&&void 0!==n?n:"Error adding folder"})}),[Z,C,r]),T=(0,a.useCallback)(((e,t)=>{var n;const i=(0,Od.qH)({fileRefs:Z,folder:e,fileUploadDirectories:[],newName:t});var o;"error"!==i.type?(null===(n=j.current)||void 0===n||n.renameTableStateFolder(e.directory,e.parentDirectory,t),r(i.newFileRefs)):C({severity:"warning",message:null!==(o=(0,Od.gq)(i))&&void 0!==o?o:"Error renaming folder"})}),[Z,C,r]),P=(0,a.useCallback)((e=>{const t=(0,Od.YH)({fileRefs:Z,removedItems:e});var n;"error"!==t.type?r(t.newFileRefs):C({severity:"warning",message:null!==(n=(0,Od.gq)(t))&&void 0!==n?n:"Error removing items"})}),[Z,C,r]),L=(0,a.useCallback)((e=>(0,p.jsx)(ux,{...e,onRemoveItems:P})),[P]),N=(0,a.useCallback)(((e,t,n)=>n.tableId!==S&&(e.tableId===y?(0,o.every)(t,(e=>(0,Od.mW)(e,n.directory))):e.tableId===S)),[y,S]),U=(0,a.useCallback)(((e,t,n)=>{if(e.tableId===y&&n.tableId===y){var i;const e=(0,Od.ik)({filesByDirectory:w,items:t,destinationDirectory:n.directory,isConfigurationOrApp:!0});var o;if("error"===e.type)return void C({severity:"warning",message:null!==(o=(0,Od.gq)(e))&&void 0!==o?o:"Error moving items"});null===(i=j.current)||void 0===i||i.moveTableStateItems(t,n.directory),r(e.newFileRefs)}else if(e.tableId===S&&n.tableId===y){const e=(0,Od.q3)({destinationFilesByDirectory:w,sourceFilesByDirectory:I,sourceItemsToCopy:t,destinationDirectory:n.directory});var a;if("error"===e.type)return void C({severity:"warning",message:null!==(a=(0,Od.gq)(e))&&void 0!==a?a:"Error copying items"});r(e.newFileRefs)}}),[w,I,y,S,C,r]),F={spacing:1,height:h},O={direction:"row",alignItems:"center",spacing:2,height:50},_={flexGrow:1,spacing:1},z=(0,a.useMemo)((()=>["size","type","date"]),[]);return(0,p.jsx)(ju,{column1Title:l,column2Title:"File Library",renderColumn1:()=>(0,p.jsx)(ix,{contextRef:j,tableId:y,rootDirectory:E,canDropItems:N,onDragDrop:U,renderContextMenu:L,onAddFolder:R,onRenameFolder:T,disabledColumns:z,expanded:!0,privilege:g,fileWarningsByPath:v,children:(0,p.jsxs)(m.Z,{...F,minWidth:400,"data-testid":"filesTableTransferList_destination",children:[(0,p.jsxs)(m.Z,{...O,children:[d,(0,p.jsx)(sx,{}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(dx,{iconOnly:!0})]}),(0,p.jsxs)(m.Z,{..._,children:[c&&(0,p.jsx)(i.Z,{children:c}),(0,p.jsx)(rx,{emptyMessage:"Drag and drop a file into a folder from the list on the right"})]})]})}),renderColumn2:()=>(0,p.jsx)(ix,{tableId:S,rootDirectory:A,canDropItems:N,onDragDrop:U,filesFilter:M,disabledColumns:z,privilege:g,children:(0,p.jsxs)(m.Z,{...F,minWidth:350,"data-testid":"filesTableTransferList_library",children:[(0,p.jsxs)(m.Z,{...O,children:[(0,p.jsx)(xu,{sx:{flexGrow:1},value:D,onChange:k,TextFieldProps:{placeholder:"Filter by name, description, or type"}}),(0,p.jsx)(dx,{iconOnly:!0})]}),(0,p.jsx)(m.Z,{..._,children:(0,p.jsx)(rx,{emptyMessage:"Go to your files library to upload files"})})]})})})};hx.displayName="UIFileRefsTableTransferList";const mx=(0,Od.SF)(Od.Pm,Jd.androidObb),gx=e=>(0,Od.SF)(Od.Pm,e),vx="Files deployed with an app supersede files uploaded here, so they will not be deployed.",Cx=(e,t)=>{const n=(0,o.slice)(e,0,2),i=(0,o.size)(e)-(0,o.size)(n);return i>0?(0,p.jsxs)(p.Fragment,{children:[(0,o.map)(n,((e,t)=>(0,p.jsxs)("span",{children:[t>0?", ":"",e]},t))),", and ".concat(i," other ").concat(t).concat(1===i?"":"s")]}):1===(0,o.size)(n)?(0,p.jsx)(p.Fragment,{children:n[0]}):(0,p.jsxs)(p.Fragment,{children:[n[0]," and ",n[1]]})},xx=e=>{if((0,o.isEmpty)(e))return;const t=(0,o.uniq)((0,o.map)(e,"appName")),n=1===(0,o.size)(e),a=1===(0,o.size)(t),r=(e=>Cx((0,o.map)(e,((e,t)=>
3(0,p.jsx)(i.Z,{component:"span",sx:{fontFamily:"monospace"},children:e.fileName},t))),"file"))(e),l=(e=>Cx((0,o.map)(e,((e,t)=>(0,p.jsx)(i.Z,{component:"span",sx:{fontWeight:600},children:e},t))),"app"))(t),s=(0,o.every)(e,"isObb");if((0,o.every)(e,(e=>!e.isExactMatch))){let e;return e=s?n?"the OBB":"the OBBs":n?"a file":"files",(0,p.jsxs)(p.Fragment,{children:[r," may conflict with ",e," bundled with ",l,"."," ",vx]})}let d,c="";return n?(d=s?"is the OBB that ":"conflicts with a file that ",c=" already deploys"):s?(d="are the OBBs that ",c=" already ".concat(a?"deploys":"deploy")):d="conflict with files already deployed by ",(0,p.jsxs)(p.Fragment,{children:[r," ",d,l,c,". ",vx]})},fx=e=>{let{permissionType:t,obbsInsteadOfPath:n=!1,isInfoLevel:i=!1}=e;const o=(a=t,r="config",i?Qd:"config"===r?Kd[a]:Xd[a]);var a,r;return(0,p.jsx)(ui.Q,{withBackground:!0,severity:o.severity,children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:o.title}),(0,p.jsxs)(v.Z,{variant:"body2",children:[o.body," ",(0,p.jsxs)(Kn.Z,{href:o.helpCenterLink,target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",flexDirection:"row",alignItems:"center"},color:"info.main",children:[(0,p.jsx)("span",{children:o.helpCenterAction}),"\xa0",(0,p.jsx)(Mu.Z,{sx:{fontSize:"1em",transform:"translateY(-1px)"}})]})]})]})})},bx=(0,a.memo)((()=>{const e=(0,u.I0)(),{approvedApps:t}=ld(),{deviceStreamToolbarVerticalOffset:n}=(0,ud.MS)(),{dashboardStats:i}=(0,Xn.w)(),r=(0,d.P)("DISABLE_ANDROID_PERMISSION_WARNINGS"),l=Xs((e=>e.fileRefs)),s=(0,u.v9)((e=>e.firestore.data.files.data)),c=(0,a.useMemo)((()=>(e=>{let{configurationFileRefs:t,approvedApps:n,filesById:i}=e;if((0,o.isEmpty)(t))return[];const a={},r={};(0,o.forEach)(n,(e=>{if((0,o.forEach)(e.fileRefs,((t,n)=>{if((0,o.isEmpty)(t))return;const l=gx(n);(0,o.forEach)(t,(t=>{const n=i[t.id];if(n){var o;const t=(0,Od.SF)(l,n.name);a[t]=null!==(o=a[t])&&void 0!==o?o:{app:e,isObb:!1}}else{var s;r[l]=null!==(s=r[l])&&void 0!==s?s:{app:e,isObb:!1}}}))})),!(0,o.isEmpty)(e.obbUrls)){var t;const i=(0,Od.SF)(mx,e.packageName),o=null!==(t=e.versionCode)&&void 0!==t?t:e.latestVersion;if(void 0!==o){var n;const t="main.".concat(o,".").concat(e.packageName,".obb"),r=(0,Od.SF)(i,t);a[r]=null!==(n=a[r])&&void 0!==n?n:{app:e,isObb:!0}}else{var l;r[i]=null!==(l=r[i])&&void 0!==l?l:{app:e,isObb:!0}}}}));const l={};return(0,o.forEach)(t,((e,t)=>{const n=gx(t);(0,o.forEach)(e,(e=>{var t;const o=i[e.id];if(!o)return;const s=(0,Od.SF)(n,o.name),d=a[s],c=r[n],u=null!==d&&void 0!==d?d:c;u&&(null!==(t=l[s])&&void 0!==t&&t.isExactMatch||(l[s]={configurationFileId:o.id,fileName:o.name,filePath:s,appName:u.app.title,isExactMatch:!!d,isObb:u.isObb}))}))})),(0,o.sortBy)((0,o.values)(l),[e=>e.isExactMatch?0:1,"fileName"])})({configurationFileRefs:l,approvedApps:t,filesById:s})),[l,t,s]),h=(0,a.useMemo)((()=>xx(c)),[c]),g=(0,a.useMemo)((()=>(0,o.fromPairs)((0,o.map)(c,(e=>[e.filePath,xx([e])])))),[c]),C=(0,a.useMemo)((()=>{if(r)return[];const e=[{type:"androidData",shouldShowWarning:tc(l,"androidData"),isInfoLevel:!$d(i,"androidData")}];return(0,o.filter)(e,"shouldShowWarning").map((e=>{let{type:t,isInfoLevel:n}=e;return{permission:t,isInfoLevel:n}}))}),[l,i,r]),x=(0,a.useCallback)((t=>{e(Js(Ys.U.actions.fileRefsUpdated({fileRefs:t})))}),[e]),f="calc(100vh - ".concat(ud.iU+ud.mO+75+n,"px - var(--scrollbarHeight))");return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,o.map)(C,(e=>(0,p.jsx)(fx,{permissionType:e.permission,isInfoLevel:e.isInfoLevel},e.permission))),h&&(0,p.jsx)(ui.Q,{withBackground:!0,children:(0,p.jsxs)(v.Z,{children:[h," ",(0,p.jsxs)(Kn.Z,{href:Be.IW.fileConflicts,target:"_blank",style:{display:"inline-flex",flexDirection:"row",alignItems:"center"},children:[(0,p.jsx)("span",{children:"Learn more about bundled file conflicts"}),"\xa0",(0,p.jsx)(Mu.Z,{sx:{fontSize:"1em",transform:"translateY(-1px)"}})]})]})}),(0,p.jsx)(hx,{fileRefs:l,destinationTitle:"Configuration Files",destinationRootName:Od.uu,columnHeight:f,onChange:x,privilege:"configurations",fileWarningsByPath:g})]})}));var yx=n(47071);const jx=(0,a.memo)((e=>{let{drop:t,dropActive:n,leadingIcon:o,title:a,titlePrefix:r,input:l,trailingComponent:s,emptyMessage:d,sx:c,children:u,color:h="default",dense:m=!1}=e;return(0,p.jsxs)(i.Z,{ref:t,position:"relative",sx:{borderColor:"primary"===h?y.DG.purple[50]:"grey.200",borderWidth:3,borderStyle:"solid",...c},children:[(0,p.jsxs)(i.Z,{sx:{minHeight:e=>e.spacing(5),paddingX:1,backgroundColor:"primary"===h?y.DG.purple[50]:"grey.200",color:"primary"===h?y.DG.purple[600]:"text.primary",display:"flex",alignItems:"center"},children:[o&&(0,p.jsx)(o,{}),(a||r)&&(0,p.jsxs)(Ui.G,{padding:m?.5:1,variant:"subtitle1",title:"".concat(null!==r&&void 0!==r?r:"").concat(a),children:[r&&(0,p.jsx)(i.Z,{component:"span",color:"primary"===h?"primary.light":"text.secondary",children:r}),a]}),l&&(0,p.jsx)(i.Z,{paddingBottom:.5,children:l}),(0,p.jsx)(i.Z,{flexGrow:1}),s]}),(0,p.jsxs)(i.Z,{padding:2,paddingTop:1.5,children:[d&&(0,p.jsx)(v.Z,{variant:"body2",color:"textSecondary",children:d}),u]}),n&&(0,p.jsx)(i.Z,{sx:{position:"absolute",borderWidth:3,borderStyle:"dashed",borderColor:"primary.light",inset:-3,pointerEvents:"none"}})]})}));var Zx=n(87213),wx=n(92227);const Ex=e=>{var t;let{model:n,deviceSystemVersions:r,helperText:l,defaultValue:s=vp.T5,enableOptionBlockFirmwareUpdates:d=!0}=e;const c=(0,u.I0)(),{isDeviceFirmwareVersionHiddenInEditingConfiguration:h}=(()=>{const{isDeviceFirmwareVersionHiddenByFeatureFlags:e}=Dc(),t=Ks(),n=(0,xo.ky)(S.F.Configurations,t);return(0,a.useMemo)((()=>({isDeviceFirmwareVersionHiddenInEditingConfiguration:(t,i)=>{const a=null===n||void 0===n?void 0:n.targetDeviceSystemVersions;if(a){const e=a[t];
3if(e&&!(0,o.isString)(e)&&e.id===i.id)return!1}return e(t,i)}})),[e,null===n||void 0===n?void 0:n.targetDeviceSystemVersions])})(),g=null!==(t=Xs((e=>{var t;const i=null===(t=e.targetDeviceSystemVersions)||void 0===t?void 0:t[n];return(0,o.isObject)(i)?i.id:i})))&&void 0!==t?t:s,C=(0,a.useMemo)((()=>Ec((0,o.filter)(r,(e=>!h(n,e)&&e.model===n))).sort(((e,t)=>(0,Vs.Wp)(t.version,e.version)))),[r,h,n]),x=(0,a.useMemo)((()=>{const e=d?[vp.AP.DeferToDevice,vp.AP.BlockFirmwareUpdates]:[vp.AP.DeferToDevice],t=(0,o.map)(e,(e=>({value:e,label:(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{marginTop:1},children:vp.bL[e]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:e===vp.AP.BlockFirmwareUpdates?vp.J$[e]:"Prompts user to update firmware by default"})]}),selectLabel:vp.bL[e]}))),n=(0,o.isEmpty)(C)?[]:[{value:"section_header",label:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"Or, set target firmware version:"})},...(0,o.map)(C,(e=>({value:e.id,label:e.version,selectLabel:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(v.Z,{color:"text.secondary",children:"Target"}),(0,p.jsx)(v.Z,{children:e.version})]})})))];return[{value:"section_header",label:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"Set update policy:"})},...t,...n]}),[d,C]),f=(0,a.useMemo)((()=>C.map((e=>{let{version:t}=e;return t})).join(",")),[C]);return(0,a.useEffect)((()=>{c(Js(Ys.U.actions.targetDeviceSystemVersionCleared()))}),[c,f]),!d&&(0,o.isEmpty)(C)?null:(0,p.jsx)(Qi,{value:g,options:x,label:(0,Vr.Gd)(n),onChange:e=>{c(Js(Ys.U.actions.targetDeviceSystemVersionChanged({model:n,target:e,defaultValue:s})))},privilege:"configurations",helperText:l,fullWidth:!0})};Ex.displayName="ConfigurationSettingFirmwareVersion";var Sx=n(25286);const Dx=e=>{let{variant:t="oculus"}=e;const n=(0,u.I0)(),o=Xs((e=>{switch(t){case"legacy":return e.legacyOculusFirmwareUpdateWindowValues;case"androidXr":return e.androidXrFirmwareUpdateWindowValues;default:return e.oculusFirmwareUpdateWindowValues}})),[r,l]=(0,a.useMemo)((()=>{var e,t;const n=e=>vr()().startOf("day").add(e,"minute");return[n(null!==(e=null===o||void 0===o?void 0:o.start)&&void 0!==e?e:vp.zm.start),n(null!==(t=null===o||void 0===o?void 0:o.end)&&void 0!==t?t:vp.zm.end
3)]}),[o]),s=(0,a.useMemo)((()=>60*l.hour()+l.minute()<=60*r.hour()+r.minute()),[r,l]),d=(0,a.useCallback)(((e,i)=>{const o={start:60*e.hour()+e.minute(),end:60*i.hour()+i.minute()},a="legacy"===t?Ys.U.actions.legacyFirmwareUpdateWindowsTimeChanged(o):"androidXr"===t?Ys.U.actions.androidXrFirmwareUpdateWindowsTimeChanged(o):Ys.U.actions.firmwareUpdateWindowsTimeChanged(o);n(Js(a))}),[n,t]);return(0,p.jsxs)(m.Z,{marginTop:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(he.Z,{sx:{color:y.DG.grey[500],marginLeft:1,marginRight:1}}),(0,p.jsx)(zi.W,{privilege:"configurations",action:"edit firmware update schedule",children:(0,p.jsxs)(i.Z,{display:"flex",flexDirection:"row",alignItems:"center",gap:1,flex:1,children:[(0,p.jsx)(Sx.j,{sx:{flex:1},label:"From",value:r,onChange:e=>{d(e||r,l)},disableOpenPicker:!0}),(0,p.jsx)(i.Z,{display:"flex",alignItems:"center",children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"-"})}),(0,p.jsx)(Sx.j,{sx:{flex:1},label:"To",value:l,onChange:e=>{d(r,e||l)},disableOpenPicker:!0})]})})]}),s&&(0,p.jsx)(v.Z,{marginLeft:5,marginTop:1,variant:"subtitle2",color:"text.secondary",children:"Selected schedule is overnight"}),(0,p.jsx)(v.Z,{marginLeft:5,marginTop:1,variant:"body2",color:"text.secondary",children:"*In device local timezone"})]})},Mx=e=>{var t,n;let{excludeBlock:a=!1,label:r,showLegacyPolicy:l,variant:s="meta"}=e;const d=(0,u.I0)(),c=(0,Le.ye)("enableMetaFirmwareSettingsSplit"),h="androidXr"===s,g=!h&&(null!==l&&void 0!==l?l:c),C=null!==(t=Xs((e=>h?e.androidXrFirmwareUpdatePolicy:e.oculusFirmwareUpdatePolicy)))&&void 0!==t?t:h?vp.bh:vp.E4,x=null!==(n=Xs((e=>e.legacyOculusFirmwareUpdatePolicy)))&&void 0!==n?n:vp._v,f=C===vp.AP.WindowFirmwareUpdates,b=x===vp.AP.WindowFirmwareUpdates,j=(0,o.map)(vp.AP,(e=>({value:e,label:(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1.25,children:[(0,p.jsx)(v.Z,{variant:"body2",children:vp.bL[e]}),e===vp.AP.BlockFirmwareUpdates?(0,p.jsx)(Fi._,{tooltipText:"Meta does not officially support preventing firmware updates. Blocking Meta firmware updates may result in unexpected behavior. On devices running firmware v81+, blocking is not supported and updates will be postponed for 30 days instead.",children:(0,p.jsx)(ke.Z,{label:"Alpha",variant:"outlined",size:"small",sx:{height:20,backgroundColor:y.DG.grey[700],color:y.DG.white,border:0,cursor:"pointer"}})}):null]}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"text.secondary"},children:e===vp.AP.BlockFirmwareUpdates?"Remain on current firmware. On v81+, blocking is not supported and updates are postponed for 30 days instead":vp.J$[e]}
3)]}),selectLabel:vp.bL[e]}))),Z=j.filter((e=>!a||e.value!==vp.AP.BlockFirmwareUpdates));return(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Qi,{value:C,options:Z,label:null!==r&&void 0!==r?r:"".concat(c?"Meta Quest Update Policy (MHMS)":"Firmware Update Policy"),onChange:e=>{d(Js(h?Ys.U.actions.androidXrFirmwarePolicyChanged({androidXrFirmwareUpdatePolicy:e}):Ys.U.actions.oculusFirmwarePolicyChanged({oculusFirmwareUpdatePolicy:e})))},privilege:"configurations",fullWidth:!0}),f&&(0,p.jsx)(Dx,{variant:h?"androidXr":"oculus"})]}),g&&(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Qi,{value:x,options:j,label:"Legacy Meta Quest Update Policy",onChange:e=>{d(Js(Ys.U.actions.legacyOculusFirmwarePolicyChanged({legacyOculusFirmwareUpdatePolicy:e})))},privilege:"configurations",fullWidth:!0}),b&&(0,p.jsx)(Dx,{variant:"legacy"})]})]})};Mx.displayName="ConfigurationSettingOculusFirmware";const kx=e=>{let{title:t,appendTitle:n,subtitle:o,linkUrl:a,children:r}=e;return(0,p.jsxs)(i.Z,{marginTop:t?1:0,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:t}),n]}),o&&(0,p.jsxs)(v.Z,{variant:"body2",marginTop:1,children:[o," ",a&&(0,p.jsx)(Kn.Z,{variant:"inherit",href:a,target:"_blank",children:"Learn More"})]}),(0,p.jsx)(m.Z,{spacing:3,paddingY:3,children:r})]})},Ix=()=>{var e;const t=(0,u.I0)(),{documents:n}=(0,E.jV)(S.F.DeviceSystemVersions),r=(0,Le.ye)("enableDPVRFirmwareControl"),l=(0,d.P)("ENABLE_DPVR_FIRMWARE_VERSION_CONTROL"),s=r||l,c=(0,d.P)(Sc.X.ENABLE_ANDROID_XR_EMM),h=Xs((e=>(0,o.some)(e.targetDeviceSystemVersions,((e,t)=>(0,o.isPlainObject)(e)&&bi.Dr.has(t))))),g=Xs((e=>(0,o.some)(e.targetDeviceSystemVersions,((e,t)=>(0,o.isPlainObject)(e)&&bi.Rd.has(t))))),v=Xs((e=>e.deviceExperienceMode)),C=Xs((e=>(0,$i.qe)(e,bi.p6.Pico))),x=Xs((e=>(0,$i.qe)(e,bi.p6.DPVR))),f=null!==(e=Xs((e=>
3e.enableKioskShortcutMenu)))&&void 0!==e&&e,b=!(v===vp.w_.HomeScreen||v===vp.w_.Kiosk&&f),y=(0,a.useMemo)((()=>[qi.VZ.UserInitiated,qi.VZ.RequestOnBoot,qi.VZ.ForceOnBoot].map((e=>({value:e,label:vp.rP[e],disabled:!(e!==qi.VZ.UserInitiated||!b)})))),[b]),j=(0,a.useCallback)(((e,n)=>{t(Js(Ys.U.actions.systemUpdateTypeChanged({type:e,deviceManufacturer:n})))}),[t]),Z={flexBasis:e=>e.spacing(40),flexShrink:0,flexGrow:1,spacing:3,sx:{"& > *:last-of-type":{flexGrow:1}}};return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",gap:3,children:[(0,p.jsx)(m.Z,{...Z,children:(0,p.jsx)(jx,{title:"Meta Devices",color:"primary",leadingIcon:dg.q,children:(0,p.jsx)(kx,{subtitle:"Set the Meta Quest firmware update policy.",linkUrl:Be.IW.firmwareSettingsOculus,children:(0,p.jsx)(Mx,{})})})}),(0,p.jsx)(m.Z,{...Z,children:(0,p.jsx)(jx,{title:"Pico Devices",color:"primary",leadingIcon:wx.C,children:(0,p.jsxs)(kx,{subtitle:"Set the target Pico firmware version by device.",linkUrl:Be.IW.firmwareSettingsPico,children:[(0,p.jsx)(i.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Ex,{model:"Pico Neo 2",deviceSystemVersions:n}),(0,p.jsx)(Ex,{model:"Pico Neo 3",deviceSystemVersions:n}),(0,p.jsx)(Ex,{model:"Pico G2 4K",deviceSystemVersions:n}),(0,p.jsx)(Ex,{model:"Pico G3",deviceSystemVersions:n}),(0,p.jsx)(Ex,{model:"Pico 4",deviceSystemVersions:n}),(0,p.jsx)(Ex,{model:"Pico 4 Ultra Enterprise",deviceSystemVersions:n})]})}),g&&(0,p.jsx)(yx.Z,{children:"Choose how to install a new target firmware"}),g&&(0,p.jsx)(Qi,{value:C,options:y,label:"Target Firmware Install Process",onChange:e=>j(e,bi.p6.Pico),privilege:"configurations",fullWidth:!0})]})})})]}),c?(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",gap:3,children:[(0,p.jsx)(m.Z,{...Z,children:(0,p.jsx)(jx,{title:"Android XR Devices",color:"primary",leadingIcon:Fl.u,children:(0,p.jsx)(kx,{subtitle:"Set the Android XR firmware update policy.",children:(0,p.jsx)(Mx,{excludeBlock:!0,label:"Android XR Update Policy",showLegacyPolicy:!1,variant:"androidXr"})})})}),(0,p.jsx)(m.Z,{...Z})]}):void 0,s?(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",gap:3,children:[(0,p.jsx)(m.Z,{...Z,children:(0,p.jsx)(jx,{title:"DPVR Devices",color:"primary",leadingIcon:Zx.M,children:(0,p.jsxs)(kx,{subtitle:"Set the target firmware version for DPVR devices.",children:[(0,p.jsx)(i.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Ex,{model:"DPVR P1 Pro",deviceSystemVersions:n,defaultValue:vp.AP.DeferToDevice,enableOptionBlockFirmwareUpdates:!1}),(0,p.jsx)(Ex,{model:"DPVR P2",deviceSystemVersions:n,defaultValue:vp.AP.DeferToDevice,enableOptionBlockFirmwareUpdates:!1})]})}),h&&(0,p.jsx)(yx.Z,{children:"Choose how to install a new target firmware"}),h&&(0,p.jsx)(Qi,{value:x,options:y,label:"Target Firmware Install Process",onChange:e=>j(e,bi.p6.DPVR),privilege:"configurations",fullWidth:!0})]})})}),(0,p.jsx)(m.Z,{...Z})]}):void 0]})};Ix.displayName="ConfigurationTabFirmware";const Ax=e=>"".concat(e.language,"-").concat(e.country),Rx=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.android12ObbPermissionsMode)))&&void 0!==e?e:vp.fK,[i,r]=vp.OQ[n],l=(0,a.useMemo)((()=>(0,o.map)(vp.dR,(e=>({value:e,label:vp.NV[e]})))),[]),s=(0,a.useMemo)((()=>(0,o.map)(vp.SE,(e=>({value:e,label:vp.le[e]})))),[]),d=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.android12ObbPermissionsModeChanged({how:e})))}),[t]),c=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.android12ObbPermissionsModeChanged({when:e})))}),[t]);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",children:[Bd.androidObb," Permission\xa0",(0,p.jsx)(ci,{url:Be.IW.androidObbPermission,helpText:"You may need to grant ManageXR this permission to deploy OBBs on Android 12 devices."})]}),(0,p.jsx)(Qi,{label:"How to notify",value:i,options:l,onChange:d,privilege:"configurations",fullWidth:!0}),(0,p.jsx)(Qi,{label:"When to notify",value:r,options:s,onChange:c,privilege:"configurations",fullWidth:!0})]})}));Rx.displayName="ConfigurationSettingAndroid12ObbPermissionsMode";const Tx=(0,a.memo)((e=>{var t;let{label:n,restriction:i}=e;const o=(0,u.I0)(),a=null!==(t=Xs((e=>{var t;return null===(t=e.androidUserRestrictions)||void 0===t?void 0:t[i]})))&&void 0!==t&&t;return(0,p.jsx)("div",{children:(0,p.jsx)(Pd,{label:n,checked:a,onChange:()=>{o(Js(Ys.U.actions.androidUserRestrictionToggled(i)))},control:(0,p.jsx)(ho.Z,{size:"small"}),privilege:"configurations"})})})),Px=(0,a.memo)((e=>{var t;let{label:n,field:i,defaultValue:o=!1}=e;const a=(0,u.I0)(),r=null!==(t=Xs((e=>e[i])))&&void 0!==t?t:o;return(0,p.jsx)("div",{children:(0,p.jsx)(Pd,{label:n,checked:r,onChange:()=>{a(Js(Ys.U.actions.booleanConfigFieldSet({field:i,value:!r,defaultValue:o})))},control:(0,p.jsx)(ho.Z,{size:"small"}),privilege:"configurations"})})}));Px.displayName="ConfigurationSettingBooleanField";const Lx={mhms:vp.fu.SCREEN_CAPTURE_ENABLED.subtitle,pico:"Allow people in your organization to cast from their device. Casting allows people in your organization to share a real-time view of what they're seeing in their Pico headset through their computer."},Nx=e=>{let{variant:t}=e;const n=(0,u.I0)(),i=!!Xs((e=>{var n,i;return"pico"===t?!(null!==(n=e.picoScreenCaptureDisabled)&&void 0!==n&&n):!(null!==(i=e.disabledQfbSettings)&&void 0!==i&&i.SCREEN_CAPTURE_ENABLED)}));return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(Pd,{label:vp.fu.SCREEN_CAPTURE_ENABLED.title,checked:i,onChange:()=>{n(Js("pico"!==t?Ys.U.actions.metaOemSettingToggled({setting:"SCREEN_CAPTURE_ENABLED"}):Ys.U.actions.picoScreenCaptureDisabledSet({picoScreenCaptureDisabled:i})))},control:(0,p.jsx)(ho.Z,{size:"small"}),privilege:"configurations"}),(0,p.jsx)(Fi._,{tooltipText:Lx[t],children:(0,p.jsx)(si.Z,{sx:{fontSize:"16px",color:"grey.600"}})})]}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",marginLeft:5.5,children:"Disabling removes Screen Recording from the Shortcut Menu"})]})};Nx.displayName="ConfigurationSettingCasting";var Ux=n(17133);const Fx=(0,a.memo)((e=>{var t,n;let{privilege:r}=e;const l=(0,u.I0)(),s=(0,d.U5)(),{privileges:c}=(0,w.P)(),h=!r||c[r],{register:g,setValue:v,clearErrors:C,watch:x,formState:f}=(0,fg.cI)({mode:"onChange"}),b=x("passcode"),y=Be.vc.configuration.defaultDevicePasscode,j=Xs((e=>e.devicePasscode)),Z=h?null!==j&&void 0!==j?j:y:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";(0,a.useEffect)((()=>{v("passcode",Z)}),[y,Z,v]);const E=null!==(t=Xs((e=>
3(0,o.isString)(e.devicePasscode))))&&void 0!==t&&t,S={required:"Please choose the 4 - 8 digit passcode.",minLength:{value:4,message:"Passcode is too short. It must contain 4 - 8 digits."},maxLength:{value:8,message:"Passcode is too long. It must contain 4 - 8 digits."},pattern:{value:/^\d+$/,message:"Invalid format. The passcode may only contain numbers."},onBlur:()=>{f.errors.passcode&&(v("passcode",Z),C())}},{ref:D,...M}=g("passcode",S);return(0,p.jsx)(i.Z,{paddingBottom:2,children:(0,p.jsx)(ph,{featureName:"lock screen and passcode",withLockIcon:!0,children:(0,p.jsxs)(m.Z,{width:1,direction:"row",alignItems:"flex-start",children:[(0,p.jsx)(i.Z,{children:(0,p.jsx)(Pd,{label:"",checked:E,onChange:()=>{v("passcode",y),l(Js(Ys.U.actions.devicePasscodeSet({passcode:E?null:y})))},control:s?(0,p.jsx)(ho.Z,{size:"small"}):(0,p.jsx)(p.Fragment,{}),privilege:pe.e.Configurations,disabled:!h})}),(0,p.jsxs)(m.Z,{width:1,children:[(0,p.jsx)(Ux.Z,{children:"Lock Screen"}),(0,p.jsx)(yx.Z,{sx:{marginBottom:2},children:"Lock device until the user enters a 4-8 digit code"}),(0,p.jsx)(Ul.z,{label:"Passcode",inputRef:D,...M,disabled:!E||!h,error:!!f.errors.passcode,helperText:null===(n=f.errors.passcode)||void 0===n?void 0:n.message,placeholder:"123456",fullWidth:!0,onKeyUp:()=>{f.errors.passcode||l(Js(Ys.U.actions.devicePasscodeSet({passcode:b})))},autoComplete:"off",privilege:pe.e.Configurations})]})]})})})})),Ox=(0,a.memo)((e=>{var t;let{label:n,field:i,min:o,max:r,unit:l,scale:s=1}=e;const d=(0,u.I0)(),c=null!==(t=Xs((e=>e[i])))&&void 0!==t?t:0,h=Math.round(c/s),g=(0,a.useCallback)((e=>{const t=parseInt(e.target.value,10);isNaN(t)||void 0!==o&&t<o||void 0!==r&&t>r||d(Js(Ys.U.actions.numberConfigFieldSet({field:i,value:t*s})))}),[d,i,o,r,s]);return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(Ul.z,{label:n,type:"number",value:h,inputProps:{min:o,max:r},onKeyDown:e=>{const t=e.key;["-","+",".","e","E"].includes(t)&&e.preventDefault()},onChange:g,privilege:"configurations",fullWidth:!0}),l&&(0,p.jsx)(v.Z,{variant:"body2",children:l})]})}));Ox.displayName="ConfigurationSettingNumberField";const _x=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.proximitySensorMode)))&&void 0!==e?e:vp.v5,i=(0,a.useMemo)((()=>(0,o.map)(vp.k9,((e,t)=>({value:t,label:e})))),[]),r=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.oculusProximityModeChanged({oculusProximityMode:e})))}),[t]);return(0,p.jsx)(Qi,{value:n,options:i,label:vp.pf,onChange:r,privilege:"configurations",fullWidth:!0,helperText:"Not supported on Quest 3S",testId:"configurationSettings_oculusProximityMode"})})),zx=(0,a.memo)((e=>{var t;let{helperText:n}=e;const i=(0,u.I0)(),o=null!==(t=Xs((e=>e.eyeTrackingFPS)))&&void 0!==t?t:vp.Fu.UNMANAGED,r=(0,a.useMemo)((()=>[vp.Fu.UNMANAGED,vp.Fu._60,vp.Fu._90].map((e=>({value:e,label:vp.qs[e]})))),[]),l=(0,a.useCallback)((e=>{i(Js(Ys.U.actions.picoEyeTrackingFpsChanged({eyeTrackingFPS:e})))}),[i]);return(0,p.jsx)(Qi,{value:o,options:r,label:"Eye Tracking FPS",onChange:l,privilege:"configurations",helperText:n,fullWidth:!0})})),Bx=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.picoGuardianMode)))&&void 0!==e?e:qi.ki.Unmanaged,i=(0,a.useMemo)((()=>[qi.ki.Unmanaged,"DISABLED","ENABLED"].map((e=>({value:e,label:vp.vU[e]})))),[]),o=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.picoGuardianModeChanged({picoGuardianMode:e})))}),[t]);return(0,p.jsx)(Qi,{label:"Play Boundary",value:n,options:i,onChange:o,privilege:"configurations",testId:"configurationSettings_picoGuardianMode",fullWidth:!0})})),Wx=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.picoPerformanceMode)))&&void 0!==e?e:qi.ki.Unmanaged,i=(0,a.useMemo)((()=>[qi.ki.Unmanaged,"BATTERY_SAVER","STANDARD","HIGH_PERFORMANCE"].map((e=>({value:e,label:vp.Q2[e]})))),[]),o=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.picoPerformanceModeChanged({picoPerformanceMode:e})))}),[t]);return(0,p.jsx)(Qi,{value:n,options:i,label:"Performance Mode",onChange:o,privilege:"configurations",helperText:"Does not apply to Pico Neo 3 or Pico 4",fullWidth:!0})})),Vx=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.screenOffDelay)))&&void 0!==e?e:vp.xj.UNMANAGED,i=(0,a.useMemo)((()=>[vp.xj.UNMANAGED,vp.xj._3,vp.xj._10,vp.xj._30,vp.xj._60,vp.xj._300,vp.xj._600,vp.xj.NEVER].map((e=>({value:e,label:(0,o.isNumber)(vp.J1[e])?(0,M.QA)(vp.J1[e]):vp.J1[e]})))),[]),r=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.picoScreenOffDelayChanged({screenOffDelay:e})))}),[t]);return(0,p.jsx)(Qi,{value:n,options:i,label:"Screen Off Delay",onChange:r,privilege:"configurations",fullWidth:!0,testId:"configurationSettings_picoScreenOffDelay"})})),Gx=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.sleepDelay)))&&void 0!==e?e:vp.zW.UNMANAGED,i=(0,a.useMemo)((()=>[vp.zW.UNMANAGED,vp.zW._15,vp.zW._30,vp.zW._60,vp.zW._300,vp.zW._600,vp.zW._1800,vp.zW.NEVER].map((e=>({value:e,label:(0,o.isNumber)(vp.Ez[e])?(0,M.QA)(vp.Ez[e]):vp.Ez[e]})))),[]),r=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.picoSleepDelayChanged({sleepDelay:e})))}),[t]);return(0,p.jsx)(Qi,{value:n,options:i,label:"Sleep Delay",onChange:r,privilege:"configurations",fullWidth:!0,testId:"configurationSettings_picoSleepDelay"})})),Hx=(0,a.memo)((e=>{var t;let{label:n,field:i,helperText:o}=e;const r=(0,u.I0)(),l=null!==(t=Xs((e=>e[i])))&&void 0!==t?t:vp.qD.UNMANAGED,s=(0,a.useMemo)((()=>[vp.qD.UNMANAGED,vp.qD.ON,vp.qD.OFF].map((e=>({value:e,label:vp.iR[e]})))),[]),d=(0,a.useCallback)((e=>
3{r(Js(Ys.U.actions.picoSystemSwitchSettingChanged({field:i,value:e})))}),[r,i]);return(0,p.jsx)(Qi,{label:n,value:l,options:s,onChange:d,privilege:"configurations",helperText:o,fullWidth:!0})})),qx=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>e.picoTrackingMode)))&&void 0!==e?e:qi.ki.Unmanaged,i=(0,a.useMemo)((()=>[qi.ki.Unmanaged,"3DOF","6DOF"].map((e=>({value:e,label:vp.Ux[e]})))),[]),o=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.picoTrackingModeChanged({picoTrackingMode:e})))}),[t]);return(0,p.jsx)(Qi,{label:"Movement Tracking",value:n,options:i,onChange:o,privilege:"configurations",fullWidth:!0})})),Yx=(0,a.memo)((e=>{var t;let{label:n}=e;const i=(0,u.I0)(),o=null!==(t=Xs((e=>e.deviceSecurityChallengeComplexity)))&&void 0!==t?t:vp.$r.NONE,r=(0,a.useMemo)((()=>[vp.$r.NONE,vp.$r.LOW,vp.$r.MEDIUM,vp.$r.HIGH].map((e=>({value:e,label:vp.C2[e]})))),[]),l=(0,a.useCallback)((e=>{i(Js(Ys.U.actions.deviceSecurityChallengeComplexitySet({value:e})))}),[i]);return(0,p.jsx)(Qi,{label:n,value:o,options:r,onChange:l,privilege:"configurations",fullWidth:!0})}));Yx.displayName="ConfigurationSettingSecurityChallengeComplexity";const Kx=()=>{const e=(0,u.I0)(),t=(0,Le.ye)("enableStreamingPromptPermission"),n=!1===Xs((e=>e.skipStreamingPermissionPrompt));return t?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(Pd,{label:"Require Streaming Permission Prompt",checked:n,onChange:()=>{e(Js(Ys.U.actions.skipStreamingPermissionPromptToggled()))},control:(0,p.jsx)(ho.Z,{size:"small"}),privilege:"configurations"}),(0,p.jsx)(ci,{url:Be.IW.skipStreamingPromptPermission,helpText:"When enabled, devices will require a prompt to be accepted in headset when a streaming request is made, even if they have the correct permissions."})]}):null};Kx.displayName="ConfigurationSettingSkipStreamingPromptPermission";var Xx=n(46112);const Qx=(0,a.memo)((e=>{var t;let{onSubmit:n,registerOptions:a,TextFieldProps:r,privilege:l,sx:s}=e;const{privileges:d}=(0,w.P)(),c=!l||d[l],{register:u,handleSubmit:h,clearErrors:m,setValue:g,formState:v}=(0,fg.cI)({mode:"onSubmit",reValidateMode:"onSubmit"}),C=h((e=>{let{value:t}=e;n(t),m(),g("value","")})),{ref:f,...b}=u("value",a),y={inputRef:f,error:!!v.errors.value,helperText:null===(t=v.errors.value)||void 0===t?void 0:t.message,inputProps:{sx:{paddingRight:5}},variant:"outlined",margin:"dense",...b},j=(0,o.merge)(r,y);return(0,p.jsx)(i.Z,{component:"form",sx:s,noValidate:!0,autoComplete:"off",onSubmit:C,children:(0,p.jsxs)(i.Z,{position:"relative",marginTop:-1,marginBottom:-.5,children:[(0,p.jsx)(Ul.z,{...j,privilege:l}),(0,p.jsx)(x.Z,{sx:{position:"absolute",top:"0.85em",right:e=>e.spacing(1)},type:"submit",disabled:!c,children:(0,p.jsx)(Qv.Z,{fontSize:"small"})})]})})})),Jx=(0,a.memo)((e=>{let{list:t,onItemAdded:n,onItemRemoved:i,label:r,placeholder:l,helperText:s,registerOptions:d,startAdornment:c="",disabled:u=!1,privilege:h}=e;const g=(0,a.useCallback)((e=>{n(e)}),[n]),{privileges:C}=(0,w.P)(),f=!h||C[h];return(0,p.jsxs)("div",{children:[(0,p.jsx)(Qx,{onSubmit:g,registerOptions:d,privilege:h,TextFieldProps:{label:r,placeholder:l,fullWidth:!0,InputProps:{startAdornment:c},disabled:u}}),s&&(0,p.jsx)(yx.Z,{children:s}),!(0,o.isEmpty)(t)&&(0,p.jsx)(ii.Z,{dense:!0,children:(0,o.map)(t,((e,t)=>(0,p.jsxs)(fl.ZP,{children:[(0,p.jsx)(Rs.Z,{primary:(0,p.jsxs)(m.Z,{direction:"row",paddingTop:.25,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"textSecondary",children:c}),(0,p.jsx)(Ui.G,{variant:"body2",title:e})]})}),f&&(0,p.jsx)(Xx.Z,{children:(0,p.jsx)(x.Z,{onClick:()=>i(t),disabled:u,children:(0,p.jsx)(J.Z,{fontSize:"inherit"})})})]},t)))})]})})),$x=()=>{var e;const t=(0,u.I0)(),n=(0,d.P)("xrhealth"),i=(0,d.U5)(),r=(0,Le.ye)("enableTutorialModeRevamp"),l=null!==(e=Xs((e=>{var t,n;return r?null===(t=e.tutorialAppRef)||void 0===t?void 0:t.id:null===(n=e.firstTimeUseAppRef)||void 0===n?void 0:n.id})))&&void 0!==e?e:qi.ki.None,s=(0,a.useCallback)(((e,n)=>{const i=r?Ys.U.actions.tutorialAppSet:Ys.U.actions.firstTimeUseAppSet;t(Js(i({appId:e===qi.ki.None?null:e,type:n})))}),[t,r]),c=Xs((e=>e.firstTimeUseFilePaths)),h=(0,a.useMemo)((()=>(0,o.map)(c,(e=>e.slice(1)))),[c]),m=(0,a.useMemo)((()=>({validate:{noRoot:e=>!/^\/*$/.test(e)||"Deleting the root directory is not allowed",noAndroid:e=>!/^\/*Android\/*$|^\/*Android\/+data\/*$|^\/*Android\/+obb\/*$/.test(e)||"Deleting this directory is not allowed",noInvalidChars:ul.aH},setValueAs:ul.pi})),[]),g=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.firstTimeUseFilePathAdded({path:e})))}),[t]),v=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.firstTimeUseFilePathRemoved({index:e})))}),[t]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ph,{featureName:"Tutorial Mode",withLockIcon:!0,iconSX:{marginTop:1}
3,children:(0,p.jsx)(rC,{value:l,onChange:s,label:"Tutorial App",helperText:r?"This app will open when a device boots up":"This app will open when a device boots up in Tutorial Mode",disabled:!i,privilege:"configurations",fullWidth:!0})}),n&&(0,p.jsx)(Jx,{list:h,onItemAdded:g,onItemRemoved:v,label:"XRHealth: Reset Device file paths for deletion",placeholder:"path/to/file",helperText:"These file paths will be deleted when the XRHealth: Reset Device command is sent",registerOptions:m,startAdornment:"sdcard/",disabled:!i,privilege:"configurations"})]})};$x.displayName="ConfigurationSettingTutorialMode";const ef=(0,o.map)(vp.vB,(e=>({value:e,label:vp.Vi[e]}))),tf=()=>{var e;const t=(0,u.I0)(),n=Ks(),i=(0,xo.ky)(S.F.Configurations,n);return{editingConfigWebXRBrowserSetting:null!==(e=Xs((e=>e.webXRBrowserSetting)))&&void 0!==e?e:vp.vB.DEFAULT,webXrBrowserSettingOptions:ef,handleWebXRBrowserSettingChanged:e=>{const n=!(null!==i&&void 0!==i&&i.webXRBrowserSetting),o=e===vp.vB.DEFAULT,a=n&&o?null:e;t(Js(Ys.U.actions.webXRBrowserSettingSet({webXRBrowserSetting:a})))}}},nf=e=>{let{helperText:t}=e;const{editingConfigWebXRBrowserSetting:n,webXrBrowserSettingOptions:i,handleWebXRBrowserSettingChanged:o}=tf();return(0,p.jsx)(Qi,{value:n,options:i,label:"Browser",onChange:o,privilege:"configurations",helperText:t,testId:"configurationSettings_webxrBrowser",fullWidth:!0})};nf.displayName="ConfigurationSettingWebXRBrowser";const of=()=>{var e,t;const n=(0,u.I0)(),i=null!==(e=Xs((e=>null===e||void 0===e?void 0:e.screenOffTimeout)))&&void 0!==e?e:vp.BL,o="DISABLED"===(null!==(t=Xs((e=>null===e||void 0===e?void 0:e.proximitySensorMode)))&&void 0!==t?t:vp.v5)&&i!==vp.BL,r=(0,a.useCallback)((e=>{n(Js(Ys.U.actions.screenOffTimeoutChanged({screenOffTimeout:e})))}),[n]);return(0,p.jsx)(Qi,{value:i,options:af,label:vp.IO,privilege:"configurations",fullWidth:!0,onChange:r,helperText:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.Z,{component:"span",display:"block",variant:"caption",color:"text.secondary",children:["Individual Mode only. Shared Mode devices use Session Timeout."," ",(0,p.jsx)(li.Q,{variant:"caption",href:Be.IW.qfbDeviceModes,children:"Learn More"})]}),(0,p.jsx)(v.Z,{component:"span",display:"block",variant:"caption",color:"text.secondary",children:"Not supported on Quest 3S"})]}),warning:o,warningText:"The ".concat(vp.pf," setting above will prevent devices from sleeping.")})},af=[{label:"Unmanaged",value:vp.BL},{label:"15 seconds",value:15e3},{label:"1 minute",value:6e4},{label:"2 minutes",value:12e4},{label:"3 minutes",value:18e4},{label:"5 minutes",value:3e5},{label:"15 minutes",value:9e5},{label:"4 hours",value:144e5}];of.displayName="ConfigurationSleepDelaySelect";const rf=()=>(0,p.jsx)(ci,{helpText:"All WebXR links open in a browser. We recommend using Wolvic Browser for the best experience. Selecting Wolvic will automatically install the browser app on your devices.",url:Be.IW.wolvicBrowser}),lf=(0,a.memo)((()=>{var e,t,n,i,r;const l=(0,u.I0)(),s=(0,z.T)("featureFlags"),c=(0,Le.ye)("enableTimezonesOnPico4AndG3"),h=(0,Le.ye)("enableUTCTimezones"),g=(0,Le.ye)("enablePicoCastingAndScreenCaptureSetting"),v=(0,d.P)(Sc.X.ENABLE_ANDROID_XR_EMM),C=(0,a.useMemo)((()=>({value:qi.ki.Unmanaged,label:"Unmanaged"})),[]),x=(0,a.useMemo)((()=>({value:qi.ki.Auto,label:"Auto"})),[]),f=null!==(e=Xs((e=>{var t;return null===(t=e.androidDeviceGlobalSettings)||void 0===t?void 0:t.adb_enabled})))&&void 0!==e?e:qi.ki.Unmanaged,b=(0,a.useMemo)((()=>[C,{value:"0",label:"Disabled"},{value:"1",label:"Enabled"}]),[C]),y=(0,a.useCallback)((e=>{l(Js(Ys.U.actions.usbDebuggingSet({value:e})))}),[l]),j=null!==(t=Xs((e=>e.localeLanguageTag)))&&void 0!==t?t:qi.ki.Unmanaged,Z=(0,a.useMemo)((()=>[C,...(0,o.map)(vp.SH,(e=>({value:Ax(e),label:e.label})))]),[C]),w=(0,a.useCallback)((e=>{l(Js(Ys.U.actions.systemLanguageChanged({localeLanguageTag:e})))}),[l]),E=null!==(n=Xs((e=>e.metaLocaleLanguageTag)))&&void 0!==n?n:qi.ki.Unmanaged,S=(0,a.useMemo)((()=>[C,...(0,o.map)(vp.tt,(e=>({value:Ax(e),label:e.label})))]),[C]),D=(0,a.useCallback)((e=>{l(Js(Ys.U.actions.metaSystemLanguageChanged({localeLanguageTag:e})))}),[l]),k=null!==(i=Xs((e=>
3e.travelMode)))&&void 0!==i?i:qi.ki.Unmanaged,I=(0,o.map)(vp.$x,((e,t)=>({value:t,label:e}))),A=(0,a.useCallback)((e=>{l(Js(Ys.U.actions.travelModeSet({value:e})))}),[l]),R=null!==(r=Xs((e=>e.timeZoneSetting)))&&void 0!==r?r:qi.ki.Unmanaged,T=Be.vc.common.timezones,P=(0,a.useMemo)((()=>{const e=h?T:T.filter((e=>!e.id.startsWith("Etc/GMT")));return[C,x,...(0,o.map)(e,(e=>({value:e.id,label:"(".concat((0,M.ob)(e.id),") ").concat(e.name)})))]}),[x,T,C,h]),L=(0,a.useCallback)((e=>{l(Js(Ys.U.actions.systemTimezoneChanged({timeZoneSetting:e})))}),[l]),N={flexBasis:e=>e.spacing(40),flexShrink:0,flexGrow:1,spacing:3,sx:{"& > *:last-of-type":{flexGrow:1}}};return(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",gap:3,children:[(0,p.jsxs)(m.Z,{...N,children:[(0,p.jsxs)(jx,{title:"All Devices",color:"primary",leadingIcon:Fl.u,children:[(0,p.jsxs)(kx,{title:"Security Settings",children:[!(null!==s&&void 0!==s&&s.hideLockScreenPasscode)&&(0,p.jsx)(Fx,{privilege:"configurations"}),(0,p.jsx)(Qi,{value:f,options:b,label:"USB Debugging (Developer Mode)",onChange:y,privilege:"configurations",fullWidth:!0}),(0,p.jsx)(Tx,{label:"Disable USB File Transfer",restriction:"no_usb_file_transfer"}),(0,p.jsx)(Kx,{})]}),(0,p.jsx)(kx,{title:"Android Permissions",subtitle:"Choose how and when users will be notified in-headset about missing permissions",children:(0,p.jsx)(Rx,{})}),(0,p.jsx)(kx,{title:"Tutorial Mode",children:(0,p.jsx)($x,{})})]}),(0,p.jsxs)(jx,{title:"Meta Devices Only",color:"primary",leadingIcon:dg.q,children:[(0,p.jsx)(kx,{title:"Device Settings",children:(0,p.jsx)(_x,{})}),(0,p.jsx)(kx,{title:"Browser for WebXR Links",appendTitle:(0,p.jsx)(rf,{}),children:(0,p.jsx)(nf,{})}),(0,p.jsxs)(kx,{title:"".concat(bi.RZ," Settings"),subtitle:"Only applied to devices enrolled through ".concat(bi.RZ," for Work"),children:[(0,p.jsx)(Nx,{variant:"mhms"}),(null===s||void 0===s?void 0:s.enableSetMetaSystemLanguage)&&(0,p.jsx)(Qi,{value:E,options:S,label:"System Language",onChange:D,privilege:"configurations",fullWidth:!0}),(0,p.jsx)(Qi,{value:R,options:P,label:"Time Zone",onChange:L,privilege:"configurations",fullWidth:!0}),(null===s||void 0===s?void 0:s.enableTravelModeToggle)&&(0,p.jsx)(Qi,{value:k,options:I,label:"Travel Mode",onChange:A,privilege:"configurations",fullWidth:!0}),(0,p.jsx)(of,{})]})]})]}),(0,p.jsxs)(m.Z,{...N,children:[(0,p.jsxs)(jx,{title:"Pico Devices Only",color:"primary",leadingIcon:wx.C,children:[(0,p.jsxs)(kx,{title:"System Settings",children:[(0,p.jsx)(Tx,{label:"Disable User Factory Reset",restriction:"no_factory_reset"}),(0,p.jsx)(Qi,{value:j,options:Z,label:"System Language",onChange:w,privilege:"configurations",fullWidth:!0}),(0,p.jsx)(Qi,{value:R,options:P,label:"Time Zone",onChange:L,privilege:"configurations",helperText:c?void 0:"Not supported on Pico 4 or G3",fullWidth:!0})]}),(0,p.jsxs)(kx,{title:"Device Settings",subtitle:"Manage Pico specific device settings.",linkUrl:Be.IW.deviceSettings,children:[g&&(0,p.jsx)(Nx,{variant:"pico"}),(0,p.jsx)(Wx,{}),(0,p.jsx)(qx,{}),(0,p.jsx)(Bx,{}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(Vx,{}),(0,p.jsx)(Gx,{})]}),(0,p.jsx)(zx,{helperText:"Only applies to Pico Neo 3 Eye"}),(0,p.jsx)(Hx,{label:vp.yn.QuickBoundarySetup,field:"picoFastBoundarySetting",helperText:"When on, Pico devices hide the Play Boundary Setup button on the Home Screen toolbar."}),(0,p.jsx)(Hx,{label:vp.yn.GlobalAntiDispersion,field:"picoGlobalAntiDispersionSetting"}),(0,p.jsx)(Hx,{label:vp.yn.EyeProtectionMode,field:"picoEyeProtectionModeSetting"})]})]}),v&&(0,p.jsxs)(jx,{title:"Android XR Devices Only",color:"primary",leadingIcon:Fl.u,children:[(0,p.jsxs)(kx,{title:"Device Restrictions",children:[(0,p.jsx)(Tx,{label:"Disable Adding/Modifying Accounts",restriction:"no_modify_accounts"}),(0,p.jsx)(Tx,{label:"Disable Mounting Physical Media",restriction:"no_physical_media"}),(0,p.jsx)(Tx,{label:"Disable Wi-Fi Configuration",restriction:"no_config_wifi"}),(0,p.jsx)(Px,{label:"Disable Screen Capture",field:"screenCaptureDisabled"}),(0,p.jsx)(Px,{label:"Disable Camera",field:"cameraDisabled"}),(0,p.jsx)(Px,{label:"Enforce Automatic Time",field:"autoTimeEnabled"}),(0,p.jsx)(Px,{label:"Enforce Automatic Time Zone",field:"autoTimeZoneEnabled"}),(0,p.jsx)(Px,{label:"Block Unknown Sources",field:"blockUnknownSources",defaultValue:!0}),(0,p.jsx)(Px,{label:"Block Debugging Features",field:"blockDebuggingFeatures"}),(0,p.jsx)(Px,{label:"Enable Verify Apps / Play Protect",field:"verifyAppsEnabled",defaultValue:!0})]}),(0,p.jsxs)(kx,{title:"Passcode",children:[(0,p.jsx)(Yx,{label:"Passcode Complexity"}),(0,p.jsx)(Ox,{label:"Wipe After Failed Attempts",field:"maxFailedPasswordsForWipe",min:0}),(0,p.jsx)(Ox,{label:"Require Strong Auth Timeout",field:"requiredStrongAuthTimeoutMs",min:0,max:72,scale:36e5,unit:"hours"})]})]})]})]})})),sf=e=>{let{video:t}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:t.iconUrl,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Ui.G,{variant:"body1",title:t.title}),secondary:t.description?(0,p.jsx)(Ui.G,{title:t.description}):mc[t.type]})]})},df=()=>{var e,t;const n=(0,u.I0)(),[i,r]=(0,a.useState)(""),{confirm:l}=(0,ie.o)(),s=(0,E.D)(S.F.Videos,{filter:(0,a.useCallback)((e=>e.title.toLocaleLowerCase().includes(i.toLocaleLowerCase())),[i]),sort:ze.gA}),d=null!==(e=Xs((e=>{let{approvedVideos:t}=e;return t})))&&void 0!==e?e:[],{kioskVideoRef:c}=Xs((e=>e))||{},h=(0,a.useCallback)((e=>{const t=[],i=e.id,o=()=>{n(Js(Ys.U.actions.videoUnapproved({videoId:e.id})))};
3c&&i===c.id&&t.push("This is your Kiosk Video. If you remove it, Kiosk Video Mode will be disabled until you choose a new video."),t.length?l({message:t,onConfirm:o}):o()}),[l,n,c]),g=null!==(t=Xs((e=>e.deviceExperienceMode)))&&void 0!==t?t:vp.w_.Default;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(xu,{value:i,onChange:r,TextFieldProps:{placeholder:"Filter by title"}}),(g===vp.w_.Default||g===vp.w_.Kiosk)&&(0,p.jsx)(ui.Q,{sx:{padding:3},children:"Set Device Experience to Home Screen or Kiosk Video to launch videos"}),(0,p.jsx)(Su,{allValues:s.documents,selectedIds:(0,o.map)(d,"id"),renderListItemContent:e=>(0,p.jsx)(sf,{video:e}),onAdd:e=>{n(Js(Ys.U.actions.videoApproved({videoId:e.id})))},onRemove:h,selectedTitle:"Deployed Videos",selectedEmptyMessage:"There are no deployed Videos",otherTitle:"Video Library",otherEmptyMessage:"No Videos",selectLabel:"Deploy",privilege:"configurations",testIdPrefix:"configurationVideos"})]})},cf=e=>{let{webXRApp:t}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:t.iconUrl,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Ui.G,{variant:"body1",title:t.title}),secondary:(0,p.jsx)(Ui.G,{title:t.description||t.url})})]})};var uf=n(62867);const pf=()=>{const{editingConfigWebXRBrowserSetting:e,webXrBrowserSettingOptions:t,handleWebXRBrowserSettingChanged:n}=tf();return(0,p.jsxs)(m.Z,{paddingX:2,paddingY:3,spacing:2,borderRadius:1,bgcolor:y.DG.purple[50],children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(uf.Z,{fontSize:"small",color:"primary"}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Select a Default Browser (for Meta devices only)"}),(0,p.jsx)(rf,{})]}),(0,p.jsx)(fs.Z,{children:(0,p.jsx)(Oi.Z,{row:!0,value:e||vp.vB.DEFAULT,onChange:(e,t)=>
3n(t),sx:{columnGap:3},children:(0,o.map)(t,(e=>{let{value:t,label:n}=e;return(0,p.jsx)(i.Z,{children:(0,p.jsx)(zi.W,{privilege:"configurations",children:(0,p.jsx)(po.Z,{value:t,control:(0,p.jsx)(_i.Z,{}),label:n})})},t)}))})})]})};pf.displayName="ConfigurationBannerSettingWebXRBrowser";const hf=()=>{var e,t;const n=(0,u.I0)(),[i,r]=(0,a.useState)(""),l=(0,E.D)(S.F.WebXRApps,{filter:(0,a.useCallback)((e=>e.title.toLocaleLowerCase().includes(i.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(i.toLocaleLowerCase())),[i]),sort:ze.gA}),s=null!==(e=Xs((e=>{let{approvedWebXRApps:t}=e;return t})))&&void 0!==e?e:[],d=null!==(t=Xs((e=>e.deviceExperienceMode)))&&void 0!==t?t:vp.w_.Default;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(pf,{}),(0,p.jsx)(xu,{value:i,onChange:r,TextFieldProps:{placeholder:"Filter by title or url"}}),d!==vp.w_.HomeScreen&&(0,p.jsx)(ui.Q,{sx:{padding:3},children:"Set Device Experience to Home Screen to launch WebXR Links"}),(0,p.jsx)(Su,{allValues:l.documents,selectedIds:(0,o.map)(s,"id"),renderListItemContent:e=>(0,p.jsx)(cf,{webXRApp:e}),onAdd:e=>{n(Js(Ys.U.actions.webXRAppApproved({webXRAppId:e.id})))},onRemove:e=>{n(Js(Ys.U.actions.webXRAppUnapproved({webXRAppId:e.id})))},selectedTitle:"Deployed WebXR Links",selectedEmptyMessage:"There are no deployed WebXR Links",otherTitle:"WebXR Link Library",otherEmptyMessage:"No WebXR Links",selectLabel:"Deploy",privilege:"configurations",testIdPrefix:"configurationWebXRApps"})]})};var mf=n(20393);const gf=e=>{let{setSearchTerm:t,placeholder:n="Search...",sx:i,debounceTimeMs:o=300,caseSensitive:r=!1,filterComputationPending:l=!1}=e;const[s,d]=(0,a.useState)(""),c=(0,zn.c)(s,o),u=s!==c||l;return(0,a.useEffect)((()=>{t(r?c:c.toLocaleLowerCase())}),[c,t,r]),(0,p.jsx)(xu,{value:s,onChange:d,TextFieldProps:{placeholder:n,InputProps:{startAdornment:(0,p.jsx)(bl.T,{pending:u})},size:"small",sx:{".MuiInputBase-root":{minHeight:36},...i}}})};var vf=n(4024),Cf=n(93445);const xf=e=>{let{wifiNetwork:t,selected:n=!1,advanced:o=!1,isPriorityWifiNetwork:r=!1,onPriorityNetworkToggled:l=(()=>{}),onDeleteClick:s,onDuplicateClick:d}=e;const[c,u]=a.useState(!1);return(0,p.jsxs)(m.Z,{flexGrow:1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(go.Z,{color:"action"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,children:[(0,p.jsx)(Ui.G,{title:t.ssid}),!!t.nickname&&(0,p.jsx)(Ui.G,{className:"wifi-nickname-container",sx:{visibility:c?"hidden":"visible"},variant:"body2",color:"text.secondary",textAlign:"right",title:t.nickname})]}),secondary:Cp.hH[t.type]}),(s||d)&&(0,p.jsx)(i.Z,{className:"wifi-more-options-container",padding:2,sx:{position:"absolute",right:0,visibility:c?"visible":"hidden"},children:(0,p.jsx)(jd,{onOpen:e=>{u(!0)},onClose:()=>u(!1),menuItems:[d&&(0,p.jsxs)(Hi.Z,{onClick:()=>d(t),children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Ed.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Duplicate"})]},"duplicate"),s&&(0,p.jsxs)(Hi.Z,{onClick:()=>s(t),children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Gl.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Delete"})]},"delete")].filter(Boolean)})})]}),o&&n&&(0,p.jsxs)(m.Z,{direction:"row",pl:4,mt:.5,spacing:1,alignItems:"center",children:[(0,p.jsx)(zi.W,{privilege:"configurations",action:"change wifi network priority",disableAutoSize:!0,children:(0,p.jsx)(x.Z,{onClick:()=>l(t.id),size:"small",sx:{color:r?"primary.main":"text.secondary",padding:.5},children:r?(0,p.jsx)(vf.Z,{fontSize:"small"}):(0,p.jsx)(Cf.Z,{fontSize:"small"})})}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",whiteSpace:"nowrap",lineHeight:1.5,children:"Always connect if available"}),(0,p.jsx)(Fi._,{tooltipText:"When this network is in range and accessible, automatically connect to it. Do not connect to any other available networks.",children:(0,p.jsx)("span",{children:(0,p.jsx)(cc.Z,{fontSize:"small",sx:{color:"text.secondary",marginLeft:1,verticalAlign:"middle"}})})})]})]})};var ff=n(94765);const bf=()=>{var e,t;const{buildOrganizationPath:n}=(0,w.P)(),r=(0,u.I0)(),l=(0,E.D)(S.F.WifiNetworks,{sort:(0,a.useCallback)(((e,t)=>{const n=(0,ze.bL)(e.ssid,t.ssid);return 0!==n?n:(0,ze.bL)(e.nickname,t.nickname)}),[])}),s=null!==(e=Xs((e=>{let{wifiNetworkRefs:t}=e;return t})))&&void 0!==e?e:[],[d,c]=(0,a.useState)(""),h=(0,a.useMemo)((()=>d?(0,ff.sz)({data:l.documents,fields:["nickname","ssid","type"],substring:d.toLowerCase()}):l.documents),[d,l.documents]),g=Qs(),v=(0,u.v9)((e=>e.ui.configuration.advancedWifi)),x=null!==(t=Xs((e=>e.priorityWifiNetwork)))&&void 0!==t?t:void 0,f=(0,a.useCallback)((e=>{const t=(null===x||void 0===x?void 0:x.id)===e;r(Js(Ys.U.actions.wifiNetworkPrioritySet({wifiNetworkId:t?"":e})))}),[x,r]),b=(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(gf,{setSearchTerm:c,placeholder:"Filter by nickname, SSID, or type"})}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(fu,{label:"Advanced",value:v,onToggle:()=>{r(Te.dV.actions.configurationAdvancedWifiToggled())}})})]});return(0,p.jsxs)(m.Z,{spacing:2,children:[b,(0,p.jsx)(Su,{allValues:h,selectedIds:(0,o.map)(s,"id"),renderListItemContent:(e,t)=>
3(0,p.jsx)(xf,{wifiNetwork:e,selected:t,advanced:v,isPriorityWifiNetwork:(null===x||void 0===x?void 0:x.id)===e.id,onPriorityNetworkToggled:f}),onAdd:e=>{r(Js(Ys.U.actions.wifiNetworkAdded({wifiNetworkId:e.id})))},onRemove:e=>{r(Js(Ys.U.actions.wifiNetworkRemoved({wifiNetworkId:e.id})))},selectedTitle:"Deployed Wi-Fi Networks",selectedEmptyMessage:d?"No matching Wi-Fi Networks deployed":"No deployed Wi-Fi Networks",otherTitle:"Wi-Fi Network Library",otherEmptyMessage:d?"No matching Wi-Fi Networks":"No Wi-Fi Networks in your library",selectLabel:"Deploy",privilege:"configurations"}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",padding:3,children:[(0,p.jsx)(i.Z,{children:!(0,o.isEmpty)(g)&&(0,p.jsx)(ui.Q,{severity:"error",children:(0,p.jsxs)(mf.h,{children:["A configuration can only include one Wi-Fi Network per SSID. Keep one network for ",(0,p.jsx)("em",{children:(0,o.join)(g,", ")})," and remove the others to save."]})})}),(0,p.jsx)(zi.W,{privilege:"content",action:"add Wi-Fi Networks",disableAutoSize:!0,children:(0,p.jsx)(Qc,{to:n((e=>e.wifiNetworks.create)),children:(0,p.jsx)(C.Z,{startIcon:(0,p.jsx)(Wn.Z,{}),variant:"contained",size:"small",children:"Add Wi-Fi Network"})})})]})]})},yf=1e3,jf=()=>{var e;const{configurationId:t}=(0,l.UO)(),n=(0,u.I0)(),i=(0,z.l)(S.F.Configurations,t),o=(0,xo.ty)(S.F.Configurations,t),{buildOrganizationPath:r}=(0,w.P)(),{appDeviceLimitExceeded:s,customColorsValid:d,hasQfbDevices:c}=ld(),h=o&&void 0!==c;xd(S.F.Configurations,t,r((e=>e.configurations))),(0,a.useEffect)((()=>(n(Ys.U.actions.startedEditing({configurationId:t})),()=>{n(Ys.U.actions.stoppedEditing())})),[n,t]);const m=(0,u.v9)((e=>!!e.configuration.editingConfiguration)),g=Qs(),v=[{path:r((e=>e.configurations.configuration.apps),{configurationId:t}),label:"Apps",component:(0,p.jsx)(Wu,{}),icon:s?(0,p.jsx)(Cd.Z,{color:"error"}):void 0},{path:r((e=>e.configurations.configuration.videos),{configurationId:t}),label:"Videos",component:(0,p.jsx)(df,{})},{path:r((e=>e.configurations.configuration.webXRApps),{configurationId:t}),label:"WebXR Links",component:(0,p.jsx)(hf,{})},{path:r((e=>e.configurations.configuration.files),{configurationId:t}),label:"Files",component:(0,p.jsx)(bx,{})},{path:r((e=>e.configurations.configuration.wifiNetworks),{configurationId:t}),label:"Wi-Fi Networks",component:(0,p.jsx)(bf,{}),icon:g.length?(0,p.jsx)(Cd.Z,{color:"error"}):void 0},{path:r((e=>e.configurations.configuration.homeScreen),{configurationId:t}),label:"Device Experience",component:(0,p.jsx)(pC,{}),icon:d?void 0:(0,p.jsx)(Cd.Z,{color:"error"})},{path:r((e=>e.configurations.configuration.settings),{configurationId:t}),label:"Device Settings",component:(0,p.jsx)(lf,{})},{path:r((e=>e.configurations.configuration.firmware),{configurationId:t}),label:"Firmware Updates",component:(0,p.jsx)(Ix,{})},{path:r((e=>e.configurations.configuration.schedule),{configurationId:t}),label:"Content Update Schedule",component:(0,p.jsx)(Zh,{})}];return(0,p.jsxs)(Mn.C,{toolbarBreadcrumbs:[{title:"Deploy",navCategory:!0},{title:"Configurations",path:r((e=>e.configurations))},{title:null!==(e=null===i||void 0===i?void 0:i.name)&&void 0!==e?e:""}],toolbarShowProgress:!h,noBottomPadding:!0,children:[(0,p.jsx)(dd,{hasChanges:m,path:r((e=>e.configurations.configuration),{configurationId:t})}),h&&(0,p.jsx)(vd,{sidebarContent:(0,p.jsx)(Cu,{routeTabs:v}),sidebarWidths:{xs:301,lg:400},contentMaxWidth:yf,children:(0,p.jsx)(sd,{routeTabs:v,hiddenRoutes:[{path:r((e=>e.configurations.configuration.history),{configurationId:t}),component:(0,p.jsx)(ch,{})}]})})]})};var Zf=n(89164),wf=n(25228),Ef=n(72466),Sf=n(90388),Df=n(60627),Mf=n(51815),kf=n(70542),If=n(83135);var Af=n(68169);const Rf=(0,a.createContext)({pinnedConfigs:new Set,isPinned:()=>!1,togglePin:()=>{}}),Tf=()=>(0,a.useContext)(Rf),Pf=e=>{let{children:t}=e;const[n,i]=(0,a.useState)(new Set);(0,a.useEffect)((()=>{if((0,di.oZ)("localStorage")){const t=localStorage.getItem("pinnedConfigurations");if(t)try{const e=JSON.parse(t);Array.isArray(e)&&i(new Set(e))}catch(e){console.error("Error parsing pinned configurations from localStorage",e)}}}),[]),(0,a.useEffect)((()=>{(0,di.oZ)("localStorage")&&localStorage.setItem("pinnedConfigurations",JSON.stringify(Array.from(n)))}),[n]);const o=(0,a.useCallback)((e=>n.has(e)),[n]),r=(0,a.useCallback)((e=>{i((t=>{const n=new Set(t);return!n.has(e)?(n.add(e),(0,b.ec)("Configuration Pinned",{configurationId:e})):(n.delete(e),(0,b.ec)("Configuration Unpinned",{configurationId:e})),n}))}),[]);return(0,p.jsx)(Rf.Provider,{value:{pinnedConfigs:n,isPinned:o,togglePin:r},children:t})};var Lf=n(24772),Nf=n(2300);const Uf=e=>{let{configId:t,sx:n={}}=e;const{isPinned:i,togglePin:o}=Tf(),a=i(t);return(0,p.jsx)(ee.Z,{placement:"bottom",title:a?"Unpin":(0,p.jsx)(m.Z,{children:(0,p.jsxs)("span",{style:{whiteSpace:"nowrap"},children:["Pin to top",(0,p.jsx)(v.Z,{variant:"caption",color:"grey.300",children:"\xa0(saved in your browser only
3)"})]})}),children:(0,p.jsx)(x.Z,{size:"small",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(t)},sx:{color:a?"primary.main":"action.active",opacity:a?1:0,...n},children:a?(0,p.jsx)(Lf.Z,{fontSize:"small"}):(0,p.jsx)(Nf.Z,{fontSize:"small"})})})},Ff=e=>{var t,n;let{configuration:a,height:r,onDuplicateClick:l,onDeleteClick:s}=e;const d=(0,De.Z)(),{buildOrganizationPath:c,privileges:u,configurationsFullAccess:h}=(0,w.P)(),g=u.configurations&&h,{isPinned:v}=Tf(),C=v(a.id),b="".concat((0,o.size)(null===a||void 0===a?void 0:a.approvedApps)+(0,o.size)(null===a||void 0===a?void 0:a.approvedInstantApps));return(0,p.jsxs)(i.Z,{position:"relative","data-testid":"configurationGridItem",children:[(0,p.jsx)(i.Z,{component:f.rU,sx:{...d.mixins.linkStyleReset,width:1,height:1},to:c((e=>e.configurations.configuration),{configurationId:a.id}),children:(0,p.jsx)(Me.Z,{sx:{position:"relative",...C&&{"&::before":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"2px",backgroundColor:"primary.main",zIndex:1}}},children:(0,p.jsx)(m.Z,{padding:1.5,height:r,sx:{"&:hover":{backgroundColor:y.DG.purple[50],"& .titleOnHover":{color:d.palette.primary.main,textDecoration:"underline"},"& button":{opacity:1}}},children:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(i.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(Ui.G,{variant:"h6",className:"titleOnHover",marginBottom:1,title:null!==(t=null===a||void 0===a?void 0:a.name)&&void 0!==t?t:"",sx:{flexGrow:1},preserveWhitespace:!0,children:null===a||void 0===a?void 0:a.name}),(0,p.jsx)(Uf,{configId:a.id,sx:{marginTop:-1,marginRight:-.5}})]}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(tu,{label:"Devices",value:"".concat(null!==(n=a.deviceCount)&&void 0!==n?n:0)}),(0,p.jsx)(tu,{label:"Deployed Apps",value:b}),(0,p.jsx)(lu,{configuration:a,isListItem:!0})]})]})})})}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",position:"absolute",bottom:e=>e.spacing(.5),width:1,paddingX:1.5,paddingBottom:u.configurations?0:1.5,children:[(0,p.jsx)(vu,{registrationCode:null===a||void 0===a?void 0:a.registrationCode}),u.configurations&&(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-end",width:1,children:[(0,p.jsx)(ee.Z,{title:"Delete",placement:"right",children:(0,p.jsx)(x.Z,{onClick:()=>s(a),size:"large","data-testid":"configurationGridItem_delete",children:(0,p.jsx)(Gl.Z,{})})}),(0,p.jsx)(ee.Z,{title:g?"Duplicate":Wc,placement:"right",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{onClick:()=>l(a),disabled:!g,size:"large",children:(0,p.jsx)(Ed.Z,{})})})})]})]})]})};var Of=n(29913);const _f=e=>{let{height:t,disabled:n}=e;const a=(0,l.k6)(),r=(0,De.Z)(),s=(0,u.I0)(),{notifyThunkResult:d}=(0,ie.o)(),{register:c,handleSubmit:h,formState:g}=(0,fg.cI)(),{organizationId:v,buildOrganizationPath:C}=(0,w.P)(),f=(0,u.v9)((e=>e.configurationList.createPending)),b=h((async e=>{let{configurationName:t}=e;const n=await s((0,Vc.Gx)({organizationId:v,name:t}));d({result:n,success:{message:"Configuration created"},error:{message:"Error creating configuration"}}),"fulfilled"===n.meta.requestStatus&&(0,o.isObject)(n.payload)&&a.push(C((e=>e.configurations.configuration),{configurationId:n.payload.id}))}));return(0,p.jsx)("form",{onSubmit:b,noValidate:!0,autoComplete:"off",children:(0,p.jsx)(Me.Z,{children:(0,p.jsxs)(m.Z,{height:t,padding:1.5,justifyContent:"space-between",children:[(0,p.jsx)(Ln.Z,{variant:"standard",placeholder:"New Configuration",InputProps:{sx:r.typography.h6},error:!!g.errors.configurationName,fullWidth:!0,disabled:n,...c("configurationName",{required:!0})}),(0,p.jsx)(i.Z,{alignSelf:"flex-end",children:f?(0,p.jsx)(Zi.Z,{}):(0,p.jsx)(ee.Z,{title:n?Bc:"Create",placement:"right",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{type:"submit",color:"primary",disabled:f||n,size:"large",sx:{marginBottom:-1,marginRight:-1},children:(0,p.jsx)(Of.Z,{fontSize:"large"})})})})})]})})})},zf=184,Bf=.5,Wf=(0,a.memo)((e=>{let{configurations:t,privileges:n,onDuplicateClick:r,onDeleteClick:l}=e;const s=(0,De.Z)(),{pinnedConfigs:d}=Tf(),c=(0,a.useMemo)((()=>[...t].sort(((e,t)=>{const n=d.has(e.id),i=d.has(t.id);return n&&!i?-1:!n&&i?1:(0,ze.bL)(e.name,t.name)}))),[t,d]),u=n.configurations,h=t.length+(u?1:0),[v,C]=(0,a.useState)(0),{ref:x}=(0,Yi.y)((0,a.useCallback)((e=>{C(e.contentRect.width)}),[])),f=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{var e;null===(e=f.current)||void 0===e||e.recomputeGridSize()}),[v]);const b=Math.max((0,o.floor)(v/(320+s.spacingInt(1))),1),y=(0,o.ceil)(h/b),j=zf+s.spacingInt(1),Z=e=>{let{columnIndex:t,rowIndex:o,key:a,style:s,isVisible:d}=e;const h=e=>(0,p.jsx)(i.Z,{style:s,padding:Bf,minWidth:320,children:e},a);if(0===t&&0===o&&u)return h((0,p.jsx)(_f,{height:zf,disabled:!n.canCreateOrDuplicate}));let v=o*b+t;u&&(v-=1);const C=c[v];return C?h(d?(0,p.jsx)(Ff,{configuration:C,height:zf,onDuplicateClick:()=>r(C),onDeleteClick:l}):(0,p.jsx)(Me.Z,{sx:{height:zf},children:(0,p.jsxs)(m.Z,{padding:1.5,spacing:1,height:zf,children:[(0,p.jsx)(g.Z,{variant:"text",height:"1.125rem",sx:{width:"60%"}}),(0,p.jsx)(g.Z,{variant:"text",height:"1rem",sx:{width:"30%"}}),(0,p.jsx)(g.Z,{variant:"text",height:"1rem",sx:{width:"30%"}}),(0,p.jsx)(i.Z,{height:1,flexGrow:1}),(0,p.jsx)(g.Z,{variant:"text",height:"1rem",sx:{width:"40%"}})]})})):null};return(0,p.jsx)(i.Z,{position:"relative",ref:x,margin:-.5,children:(0,p.jsx)(i.Z,{position:"absolute",paddingBottom:ud.A8+Bf,children:(0,p.jsx)(Af.j,{scrollElement:window,scrollingResetTimeInterval:75,children:e=>{let{height:t,isScrolling:n,onChildScroll:i,registerChild:o,scrollTop:a}=e;return(0,p.jsx)("div",{ref:o,children:(0,p.jsx)(Qr.rj,{height:t,width:v,rowHeight:j,autoHeight:!0,isScrolling:n,scrollTop:a,ref:f,columnCount:b,columnWidth:v/b,rowCount:y,onScroll:i,cellRenderer:Z})})}})})})}));var Vf=n(22906),Gf=n(87496);const Hf=e=>{const t=(0,xo.ky)(S.F.Configurations,e.configurationId),n=(0,a.useMemo)((()=>{var t;return null!==(t=e.selectedAppIds)&&void 0!==t?t:[]}),[e.selectedAppIds]),i=(0,E.Ev)(S.F.Apps,n),r=(0,a.useMemo)((()=>{var e;return null!==(e=(0,o.map)(null===t||void 0===t?void 0:t.approvedApps,"id"))&&void 0!==e?e:[]}),[null===t||void 0===t?void 0:t.approvedApps]),l=(0,E.Ev)(S.F.Apps,r),s=(0,a.useMemo)((()=>{var t;return null!==(t=e.selectedVideoIds)&&void 0!==t?t:[]}),[e.selectedVideoIds]),d=(0,E.Ev)(S.F.Videos,s),c=(0,a.useMemo)((()=>{var t;return null!==(t=e.selectedWebXRAppIds)&&void 0!==t?t:[]}),[e.selectedWebXRAppIds]),u=(0,E.Ev)(S.F.WebXRApps,c),p=(0,a.useMemo)((()=>new Set((0,o.map)(null===t||void 0===t?void 0:t.approvedVideos,"id"))),[null===t||void 0===t?void 0:t.approvedVideos]),h=(0,a.useMemo)((()=>new Set((0,o.map)(null===t||void 0===t?void 0:t.approvedWebXRApps,"id"))),[null===t||void 0===t?void 0:t.approvedWebXRApps]),m=(0,a.useMemo)((()=>{var e,n;return null!==(e=null===t||void 0===t||null===(n=t.approvedInstantApps)||void 0===n?void 0:n.map((e=>e.id)))&&void 0!==e?e:[]}),[null===t||void 0===t?void 0:t.approvedInstantApps]);return(0,a.useMemo)((()=>{var a;if(e.status!==Nc.COMPLETE)return null;if(!t)return null;const g=(0,o.keyBy)(l,"packageName"),v=new Set(r),C=(0,o.keyBy)(i,"id"),x={},f={};for(const e of n){const t=C[e];if(t)if(v.has(e))f[e]="current";else if(t.instantAppRef&&m.includes(t.instantAppRef.id))f[e]="current";else{const n=g[t.packageName];if(n){f[e]="outdated";const t=[];n.versionName&&t.push(n.versionName),n.versionCode&&t.push("".concat(n.versionCode)),n.versionLabel&&t.push(n.versionLabel),x[e]=t.length>0?"Configuration has ".concat(t.join(" \xb7 ")):"Version on configuration has changed"}else f[e]="missing",x[e]="Removed from configuration"}else f[e]="missing",x[e]="No longer in organization"}const b=new Set(d.map((e=>e.id))),y={};for(const e of s)b.has(e)?p.has(e)?y[e]="current":(y[e]="missing",x[e]="Removed from configuration"):(y[e]="missing",x[e]="No longer in organization");const j=new Set(u.map((e=>e.id))),Z={};for(const e of c)j.has(e)?h.has(e)?Z[e]="current":(Z[e]="missing",x[e]="Removed from configuration"):(Z[e]="missing",x[e]="No longer in organization");const w={},E=(0,o.entries)(null!==(a=e.firmwareByModelId)&&void 0!==a?a:{});for(const[e,n]of E){var S;const i=null===(S=t.targetDeviceSystemVersions)||void 0===S?void 0:S[e];(0,o.isObject)(i)?i.id===n?w[e]="current":(w[e]="outdated",x[e]="Configuration targets version ".concat(i.id)):w[e]="current"}let D=null;if(e.includeFiles){var M;const n=new Set((0,o.flatten)((0,o.values)(t.fileRefs)).map((e=>e.id))),i=new Set(null!==(M=e.resolvedFileIds)&&void 0!==M?M:[]),a=Array.from(n).filter((e=>!i.has(e))),r=Array.from(i).filter((e=>!n.has(e)));if(a.length>0||r.length>0){D="outdated";const e=[];a.length>0&&e.push("".concat(a.length," ").concat(1===a.length?"file":"files"," added to configuration")),r.length>0&&e.push("".concat(r.length," ").concat(1===r.length?"file":"files"," removed from configuration")),x.files=e.join(", ")}else D="current"}const k=[...Object.values(f),...Object.values(y),...Object.values(Z),...Object.values(w),...D?[D]:[]],I=k.filter((e=>"outdated"===e)).length,A=k.filter((e=>"missing"===e)).length;let R="current";return I>0&&A>0?R="outdated_and_missing":I>0?R="outdated":A>0&&(R="missing"),{overall:R,apps:f,videos:y,webXRApps:Z,firmware:w,files:D,details:x,outdatedCount:I,missingCount:A}}),[e,t,n,i,l,r,m,s,d,c,u,p,h])},qf=(0,a.createContext)({pinnedPackages:new Set,isPinned:()=>!1,togglePin:()=>{}}),Yf=()=>(0,a.useContext)(qf),Kf=e=>{let{children:t}=e;const[n,i]=(0,a.useState)(new Set);(0,a.useEffect)((()=>
3{if((0,di.oZ)("localStorage")){const t=localStorage.getItem("pinnedUsbPackages");if(t)try{const e=JSON.parse(t);Array.isArray(e)&&i(new Set(e))}catch(e){console.error("Error parsing pinned USB packages from localStorage",e)}}}),[]),(0,a.useEffect)((()=>{(0,di.oZ)("localStorage")&&localStorage.setItem("pinnedUsbPackages",JSON.stringify(Array.from(n)))}),[n]);const o=(0,a.useCallback)((e=>n.has(e)),[n]),r=(0,a.useCallback)((e=>{i((t=>{const n=new Set(t);return!n.has(e)?(n.add(e),(0,b.ec)("USB Package Pinned",{packageId:e})):(n.delete(e),(0,b.ec)("USB Package Unpinned",{packageId:e})),n}))}),[]);return(0,p.jsx)(qf.Provider,{value:{pinnedPackages:n,isPinned:o,togglePin:r},children:t})},Xf=e=>{let{packageId:t,sx:n={}}=e;const{isPinned:i,togglePin:o}=Yf(),a=i(t);return(0,p.jsx)(ee.Z,{placement:"bottom",title:a?"Unpin":(0,p.jsx)(m.Z,{children:(0,p.jsxs)("span",{style:{whiteSpace:"nowrap"},children:["Pin to top",(0,p.jsx)(v.Z,{variant:"caption",color:"grey.300",children:"\xa0(saved in your browser only)"})]})}),children:(0,p.jsx)(x.Z,{size:"small",onClick:e=>{e.preventDefault(),e.stopPropagation(),o(t)},sx:{color:a?"primary.main":"action.active",opacity:a?1:0,...n},children:a?(0,p.jsx)(Lf.Z,{fontSize:"small"}):(0,p.jsx)(Nf.Z,{fontSize:"small"})})})},Qf=(0,a.memo)((e=>{let{name:t,canEdit:n,onSave:o}=e;const r=(0,De.Z)(),l=(0,a.useRef)(null),s=(0,a.useRef)(!1),[d,c]=(0,a.useState)(t),[u,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(!1);(0,a.useEffect)((()=>{s.current||c(t)}),[t]);const v=(0,a.useMemo)((()=>{const e=(0,ul.Cq)(r,d||t||" ","subtitle2");return e?Math.ceil(e)+8:0}),[r,d,t]),C=u||m;return(0,p.jsx)(i.Z,{onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),sx:{flex:1,minWidth:0,"& .MuiInput-root:before":{borderBottom:"none !important"},"& .MuiInput-root:hover:not(.Mui-disabled):before":{borderBottom:C?"2px solid ".concat(r.palette.grey[400]," !important"):"none !important"},"& .MuiInput-root.Mui-focused:before":{borderBottom:"2px solid ".concat(r.palette.primary.main," !important")}},children:(0,p.jsx)(Ln.Z,{"data-testid":"usbUpdateJob_name",inputRef:l,variant:"standard",value:d,disabled:!n,onChange:e=>c(e.target.value),onFocus:()=>{s.current=!0,h(!0)},onBlur:()=>{s.current=!1,h(!1);const e=d.trim();e&&e!==t?o(e):c(t)},onKeyDown:e=>{var t;"Enter"!==e.key&&"Escape"!==e.key||null===(t=l.current)||void 0===t||t.blur()},onClick:e=>e.stopPropagation(),sx:{maxWidth:1,width:v>0?"".concat(v,"px"):"auto"},inputProps:{"aria-label":"USB update name",style:{...y.cp.subtitle2,padding:0,cursor:"text",textOverflow:"ellipsis",WebkitTextFillColor:r.palette.text.primary}}})})}));Qf.displayName="UsbUpdateJobNameField";const Jf=32,$f=["name","content"],eb=e=>{let{relevance:t,detail:n,showCurrentLabel:i}=e;if(!t)return null;if("current"===t){const e=(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{flexShrink:0},children:(0,p.jsx)(ng.Z,{sx:{fontSize:14,color:"success.main",flexShrink:0}})});return i?(0,p.jsx)(ee.Z,{title:"Files match the configuration",placement:"top",children:e}):e}const o="missing"===t?"error.main":"warning.main",a="missing"===t?"Not deployed anymore":"Out of date",r=(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{flexShrink:0},children:[(0,p.jsx)(Gf.Z,{sx:{fontSize:14,color:o}}),(0,p.jsx)(v.Z,{variant:"caption",sx:{color:o,lineHeight:1},children:a})]});return n?(0,p.jsx)(ee.Z,{title:n,placement:"top",children:r}):r},tb=e=>{let{columns:t,nameContent:n,dateContent:o,contentContent:a,height:r=Jf}=e;return(0,p.jsx)(i.Z,{sx:{display:"flex",height:r,alignItems:"center"},children:t.map((e=>(0,p.jsxs)(i.Z,{sx:{width:e.width,flexGrow:e.flexGrow,flexShrink:0,overflow:"hidden",paddingX:2},children:["name"===e.id&&(0,p.jsx)(i.Z,{sx:{paddingLeft:2},children:n}),"content"===e.id&&a,"deviceModels"===e.id&&o]},e.id)))})},nb=(0,a.memo)((e=>{var t,n;let{id:i,columns:o,relevance:a,detail:r,filesById:l,isGenerating:s}=e;const d=(0,xo.ky)(S.F.Apps,i),c=d?(0,Vs.bW)(d,l):0,u=s&&void 0===c;return(0,p.jsx)(tb,{columns:o,nameContent:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,p.jsx)(eb,{relevance:a,detail:r}),(0,p.jsx)(ee.Z,{title:null!==(t=null===d||void 0===d?void 0:d.title)&&void 0!==t?t:i,placement:"top",children:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,sx:{minWidth:0},children:null!==(n=null===d||void 0===d?void 0:d.title)&&void 0!==n?n:i}
3)})]}),dateContent:(()=>{const e=null===d||void 0===d?void 0:d.versionName;if(!e)return;const t=[];null!==d&&void 0!==d&&d.versionName&&t.push("Version: ".concat(d.versionName)),null!==d&&void 0!==d&&d.versionCode&&t.push("Code: ".concat(d.versionCode)),null!==d&&void 0!==d&&d.versionLabel&&t.push("Label: ".concat(d.versionLabel));const n=t.join("\n");return(0,p.jsx)(ee.Z,{title:n,placement:"top",children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:e})})})(),contentContent:u?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:"Computing..."}):void 0!==c&&c>0?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:(0,Ad.Z)(c)}):void 0})}));nb.displayName="AppContentItem";const ib=(0,a.memo)((e=>{var t,n;let{id:i,columns:o,relevance:a,detail:r}=e;const l=(0,xo.ky)(S.F.Videos,i);return(0,p.jsx)(tb,{columns:o,nameContent:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,p.jsx)(eb,{relevance:a,detail:r}),(0,p.jsx)(ee.Z,{title:null!==(t=null===l||void 0===l?void 0:l.title)&&void 0!==t?t:i,placement:"top",children:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,sx:{minWidth:0},children:null!==(n=null===l||void 0===l?void 0:l.title)&&void 0!==n?n:i})})]}),contentContent:null!=(null===l||void 0===l?void 0:l.size)&&l.size>0?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:(0,Ad.Z)(l.size)}):void 0})}));ib.displayName="VideoContentItem";const ob=(0,a.memo)((e=>{var t,n;let{id:i,columns:o,relevance:a,detail:r}=e;const l=(0,xo.ky)(S.F.WebXRApps,i);return(0,p.jsx)(tb,{columns:o,nameContent:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,p.jsx)(eb,{relevance:a,detail:r}),(0,p.jsx)(ee.Z,{title:null!==(t=null===l||void 0===l?void 0:l.title)&&void 0!==t?t:i,placement:"top",children:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,sx:{minWidth:0},children:null!==(n=null===l||void 0===l?void 0:l.title)&&void 0!==n?n:i})})]})})}));ob.displayName="WebXRContentItem";const ab=e=>{let{columns:t,label:n,showVersionHeader:i,showSizeHeader:o}=e;return(0,p.jsx)(tb,{columns:t,height:28,nameContent:(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",fontWeight:600,children:n}),dateContent:i?(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",fontWeight:600,children:"Version"}):void 0,contentContent:o?(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",fontWeight:600,children:"Size"}):void 0})},rb=(0,a.memo)((e=>{var t,n,i,r,l,s;let{row:d}=e;const c=d.original,u=c.status===Nc.PROCESSING||c.status===Nc.QUEUED&&!!c.phase,h=Hf(c),g=(0,a.useMemo)((()=>(e=>e.getAllCells().map((e=>({id:e.column.id,width:e.column.getSize(),flexGrow:$f.includes(e.column.id)?1:0}))))(d)),[d]),C=(0,a.useMemo)((()=>{let e=0;for(const t of g){if("name"===t.id)break;e+=t.width}return e}),[g]),x={"& > * + * + *":{position:"relative","&::before":{content:'""',position:"absolute",top:0,left:C,right:0,height:"1px",bgcolor:"grey.200"}}},f=null!==(t=c.selectedAppIds)&&void 0!==t?t:[],b=null!==(n=c.selectedVideoIds)&&void 0!==n?n:[],y=null!==(i=c.selectedWebXRAppIds)&&void 0!==i?i:[],j=(0,o.entries)(null!==(r=c.firmwareByModelId)&&void 0!==r?r:{}),{documents:Z}=(0,E.jV)(S.F.DeviceSystemVersions),w=(0,a.useMemo)((()=>(0,o.keyBy)(Z,"id")),[Z]),D=(0,a.useMemo)((()=>{var e;if(!c.includeAdminApp)return[];const t=null!==(e=c.selectedDeviceModelIds)&&void 0!==e?e:[];if(0===t.length)return[];const n=new Set(t.map(Vr.ao));return Array.from(n).sort()}),[c.includeAdminApp,c.selectedDeviceModelIds]),M=(0,o.size)(null!==(l=c.resolvedFileIds)&&void 0!==l?l:[]),{documentsById:k}=(0,E.D)(S.F.Files);return(0,p.jsxs)(m.Z,{sx:{bgcolor:"background.paper",borderBottom:1,borderColor:"divider",paddingBottom:4,"& > * + *":{position:"relative","&::before":{content:'""',position:"absolute",top:0,left:C,right:0,height:"1px",bgcolor:"grey.200"}}},children:[(0,o.size)(f)>0&&(0,p.jsxs)(m.Z,{sx:x,children:[(0,p.jsx)(ab,{columns:g,label:"Apps",showVersionHeader:!0,showSizeHeader:!0}),f.map((e=>(0,p.jsx)(nb,{id:e,columns:g,relevance:null===h||void 0===h?void 0:h.apps[e],detail:null===h||void 0===h?void 0:h.details[e],filesById:k,isGenerating:u},e)))]}),(0,o.size)(b)>0&&(0,p.jsxs)(m.Z,{sx:x,children:[(0,p.jsx)(ab,{columns:g,label:"Videos",showSizeHeader:!0}),b.map((e=>(0,p.jsx)(ib,{id:e,columns:g,relevance:null===h||void 0===h?void 0:h.videos[e],detail:null===h||void 0===h?void 0:h.details[e]},e)))]}),(0,o.size)(y)>0&&(0,p.jsxs)(m.Z,{sx:x,children:[(0,p.jsx)(ab,{columns:g,label:"WebXR Links"}),y.map((e=>(0,p.jsx)(ob,{id:e,columns:g,relevance:null===h||void 0===h?void 0:h.webXRApps[e],detail:null===h||void 0===h?void 0:h.details[e]},e)))]}),c.includeFiles&&(0,p.jsxs)(m.Z,{sx:x,children:[(0,p.jsx)(ab,{columns:g,label:"Files"}),(0,p.jsx)(tb,{columns:g,nameContent:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,p.jsx)(eb,{relevance:null!==(s=null===h||void 0===h?void 0:h.files)&&void 0!==s?s:void 0,detail:null===h||void 0===h?void 0:h.details.files,showCurrentLabel:!0}),(0,p.jsx)(v.Z,{variant:"body2",children:M>0?"".concat(M," ").concat(1===M?"file":"files"):"Files (Resolving...)"})]})})]}),(0,o.size)(j)>0&&(0,p.jsxs)(m.Z,{sx:x,children:[(0,p.jsx)(ab,{columns:g,label:"Firmware"}),j.map((e=>{var t,n;let[i,o]=e;return(0,p.jsx)(tb,{columns:g,nameContent:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{minWidth:0},children:[(0,p.jsx)(eb,{relevance:null===h||void 0===h?void 0:h.firmware[i],detail:null===h||void 0===h?void 0:h.details[i]}),(0,p.jsx)(v.Z,{variant:"body2",children:i})]}),dateContent:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:o?null!==(t=null===(n=w[o])||void 0===n?void 0:n.version)&&void 0!==t?t:o:""})},i)}))]}),D.length>0&&(0,p.jsxs)(m.Z,{sx:x,children:[(0,p.jsx)(ab,{columns:g,label:"Admin Apps"}),D.map((e=>(0,p.jsx)(tb,{columns:g,nameContent:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:e})},e)))]})]})}));rb.displayName="UsbUpdatesTableExpandedContent";const lb=["name","content"],sb=(0,a.forwardRef)(((e,t)=>{let{row:n,isExpanded:o,onToggleExpand:r,style:l,...s}=e;const d=(e=>{const t=(0,a.useRef)(null);return{onMouseDown:(0,a.useCallback)((e=>{t.current={x:e.clientX,y:e.clientY}}),[]),onClick:(0,a.useCallback)((n=>{const i=t.current;
3i&&(Math.abs(n.clientX-i.x)>4||Math.abs(n.clientY-i.y)>4)||e()}),[e])}})((()=>r(n.id)));return(0,p.jsxs)(i.Z,{ref:t,style:l,sx:{overflow:"hidden"},children:[(0,p.jsx)(i.Z,{...d,sx:{cursor:"pointer",height:60},children:(0,p.jsx)(th.J,{row:n,flexColumnIds:lb,hover:!0,sx:{height:"100%","& > .MuiTableCell-root":{borderBottom:o?"unset":void 0}}})}),o&&(0,p.jsx)(rb,{row:n})]})}));sb.displayName="UsbUpdatesTableRow";const db=(0,da.Cl)(),cb=["name","content"],ub=e=>{var t;if(!e.includeAdminApp)return[];const n=null!==(t=e.selectedDeviceModelIds)&&void 0!==t?t:[];if(0===n.length)return[];const i=new Set(n.map(Vr.ao));return Array.from(i).sort()},pb=e=>{switch(e){case Nc.QUEUED:case Nc.PROCESSING:return(0,p.jsx)(he.Z,{fontSize:"small"});case Nc.COMPLETE:return(0,p.jsx)(Vi.Z,{fontSize:"small"});case Nc.ERROR:return(0,p.jsx)(Cd.Z,{fontSize:"small"});default:return}},hb=e=>{if((e.status===Nc.PROCESSING||e.status===Nc.QUEUED&&e.phase)&&e.phase)switch(e.phase){case"resolve_content":return"Resolving...";case"pull_content":return e.progress?"Downloading (".concat(Math.round(e.progress.progressPercent),"%)"):"Downloading...";case"zip_content":return"Compressing...";case"save_metadata":return"Preparing...";case"save_final_archive":default:return"Processing...";case"notify_user":return"Notifying..."}switch(e.status){case Nc.QUEUED:return"Processing";case Nc.PROCESSING:return"Processing...";case Nc.COMPLETE:return"Ready";case Nc.ERROR:return"Failed";case Nc.ABORTED:return"Aborted";default:return"Unknown"}},mb=Be.IW.offlineUpdates,gb=(e,t)=>{if(t)return"Some apps or content in this package are out of date compared to the current configuration.";switch(e.status){case Nc.QUEUED:return(0,o.isUndefined)(e.phase)?"Package generation starting. Check back in a few minutes for an ETA.":"Package generation in progress.";case Nc.PROCESSING:return"Package generation in progress.";case Nc.COMPLETE:return(0,p.jsxs)(p.Fragment,{children:["Download this package to a USB-C stick and plug it into devices to update them offline."," ",(0,p.jsx)(Kn.Z,{href:mb,target:"_blank",rel:"noopener noreferrer",sx:{color:"inherit",textDecoration:"underline"},onClick:e=>e.stopPropagation(),children:"Learn more"})]});case Nc.ERROR:return"Package generation failed. Our team has been notified and will look into this.";case Nc.ABORTED:return"This USB update package generation was aborted.";default:return""}},vb=(0,a.memo)((e=>{var t;let{configurationId:n}=e;const o=(0,xo.ky)(S.F.Configurations,n),{buildOrganizationPath:a}=(0,w.P)(),r=a((e=>e.configurations.configuration),{configurationId:n});return(0,p.jsx)(i.Z,{sx:{minWidth:0,maxWidth:1,alignSelf:"flex-start"},children:(0,p.jsx)(Kn.Z,{variant:"body2",component:Xc,to:r,noWrap:!0,draggable:!1,sx:{color:"primary.main",display:"inline-block",maxWidth:"100%",WebkitUserDrag:"none",userSelect:"text"},children:null!==(t=null===o||void 0===o?void 0:o.name)&&void 0!==t?t:n})})}));vb.displayName="ConfigurationNameCell";const Cb=(0,a.memo)((e=>{let{job:t,relevanceMapRef:n,onRelevanceChange:i}=e;const o=Hf(t);n.current.set(t.id,o);const{privileges:r}=(0,w.P)(),{request:l}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"usb-updates/:jobId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.Jobs,id:null===t||void 0===t?void 0:t.jobId,update:n}}})),[]));(0,a.useEffect)((()=>{i()}),[null===o||void 0===o?void 0:o.overall,i]);const s=(0,a.useCallback)((e=>l({params:{jobId:t.id},data:{name:e},successMessage:"USB update name updated",errorMessage:"Error updating USB update name"})),[l,t.id]);return(0,p.jsx)(Qf,{name:t.name,canEdit:r.configurations,onSave:s})}));Cb.displayName="NameCell";const xb=(0,a.memo)((e=>{let{jobs:t,onDeleteClick:n,onStatusClick:r,showOutdated:l}=e;const{pinnedPackages:s}=Yf(),{documents:d}=(0,E.D)(S.F.UserOrganizationPrivileges),c=(0,a.useMemo)((()=>{const e=new Map;for(const t of d)e.set(t.userProfile.email,t.userProfile);return e}),[d]),[u,h]=(0,a.useState)(new Set),g=(0,a.useRef)(null),C=(0,a.useRef)(new Map),[f,b]=(0,a.useState)(0),y=(0,a.useRef)(),j=(0,a.useCallback)((()=>{clearTimeout(y.current),y.current=setTimeout((()=>{b((e=>e+1))}),0)}),[]);(0,a.useEffect)((()=>()=>clearTimeout(y.current)),[]);const Z=(0,a.useCallback)((e=>{h((t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))}),[]),w=(0,a.useMemo)((()=>[db.display({id:"expand",header:()=>(0,p.jsx)(i.Z,{visibility:"hidden",children:"H"}),size:32,cell:e=>{let{row:t}=e;return(0,p.jsx)(Vf.Z,{className:"expand-chevron",sx:{fontSize:16,color:"text.disabled",opacity:u.has(t.id)?1:0,transform:u.has(t.id)?"rotate(90deg)":"none",transition:"transform 0.2s, opacity 0.15s",".MuiTableRow-root:hover &":{opacity:1}}})}}),db.accessor("requestedBy",{id:"author",header:()=>(0,p.jsx)(i.Z,{visibility:"hidden",children:"H"}),size:40,enableSorting:!1,cell:e=>{let{getValue:t}=e;const n=t();if(!n)return null;const o=c.get(n),a=null!==o&&void 0!==o&&o.name?"Created by ".concat(o.name,"
3(").concat(n,")"):"Created by (".concat(n,")");return(0,p.jsx)(ee.Z,{title:a,placement:"top",children:(0,p.jsx)(i.Z,{display:"flex",alignItems:"center",children:(0,p.jsx)(se,{user:o,size:22})})})}}),db.accessor((e=>{var t;return null!==(t=e.pinned)&&void 0!==t&&t}),{id:"pinned",header:()=>(0,p.jsx)(i.Z,{visibility:"hidden",children:"Hidden"}),cell:e=>{let{row:t}=e;return(0,p.jsx)(Xf,{packageId:t.original.id,sx:{".MuiTableRow-root:hover &":{opacity:1},marginLeft:-.5}})},size:38,enableSorting:!0,sortDescFirst:!0}),db.accessor("name",{header:"Name",size:200,cell:e=>{let{row:t}=e;return(0,p.jsx)(m.Z,{sx:{minWidth:0,width:1},children:(0,p.jsx)(Cb,{job:t.original,relevanceMapRef:C,onRelevanceChange:j})})}}),db.accessor((e=>(e=>{const t=[],n=(0,o.size)(e.selectedAppIds),i=(0,o.size)(e.selectedVideoIds),a=(0,o.size)(e.selectedWebXRAppIds),r=ub(e);if(n>0&&t.push((0,ul.sr)(n,"app")),i>0&&t.push((0,ul.sr)(i,"video")),a>0&&t.push((0,ul.sr)(a,"WebXR")),e.includeFiles){const n=(0,o.size)(e.resolvedFileIds);n>0?t.push((0,ul.sr)(n,"file")):t.push("Files")}return r.length>0&&t.push("Admin Apps (".concat(r.join(", "),")")),t.length>0?t.join(", "):"No content"})(e)),{id:"content",header:"Content",size:200,sortingFn:"alphanumeric",cell:e=>{let{row:t,getValue:n}=e;const i=t.original,o=n();return(0,p.jsxs)(m.Z,{sx:{minWidth:0},children:[(0,p.jsx)(ee.Z,{title:o,placement:"top",children:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,color:"text.secondary",sx:{minWidth:0},children:o})}),(0,p.jsx)(vb,{configurationId:i.configurationId})]})}}),db.accessor("selectedDeviceModelIds",{id:"deviceModels",header:"Device Models",size:180,cell:e=>{let{getValue:t}=e;const n=t();if(!n||0===n.length)return null;const i=n.join(", ");return 1===n.length?(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,color:"text.secondary",children:n[0]}):(0,p.jsx)(ee.Z,{title:i,placement:"top",children:(0,p.jsxs)(v.Z,{variant:"body2",noWrap:!0,color:"text.secondary",sx:{minWidth:0},children:[n[0]," ",(0,p.jsxs)(v.Z,{component:"span",variant:"body2",color:"text.disabled",children:["+",n.length-1," more"]})]})})}}),db.accessor("estimatedSizeBytes",{header:"Est. Size",size:120,cell:e=>{let{getValue:t}=e;const n=t();return n?(0,p.jsx)(ee.Z,{title:(0,Ad.Z)(n),placement:"top",children:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:(0,Ad.Z)(n)})}):(0,p.jsx)(v.Z,{variant:"body2",children:"-"})}}),db.accessor("createdAt",{header:"Date",size:90,cell:e=>{let{getValue:t}=e;const n=t();return n?(0,p.jsx)(ee.Z,{title:(0,M.aH)(n),placement:"top",children:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,color:"text.secondary",children:(0,M.lN)(n)})}):(0,p.jsx)(v.Z,{variant:"body2",children:"-"})},sortDescFirst:!0}),db.accessor((e=>{const t=C.current.get(e.id);return e.status===Nc.COMPLETE&&null!=(null===t||void 0===t?void 0:t.overall)&&"current"!==t.overall?"Out of date":hb(e)}),{id:"status",header:"Status",size:180,sortingFn:"alphanumeric",cell:e=>{let{row:t}=e;const n=t.original,o=C.current.get(n.id),a=n.status===Nc.COMPLETE&&null!=(null===o||void 0===o?void 0:o.overall)&&"current"!==o.overall,l=n.progress,s=null===l||void 0===l?void 0:l.estimatedTimeOfArrival;if(!!s&&(n.status===Nc.PROCESSING||n.status===Nc.QUEUED&&!!n.phase)){const e=l?Math.round(l.progressPercent):0,t=(e=>{const t=Math.ceil(e/1e3),n=Math.floor(t/60),i=t%60;if(n>=60){const e=Math.floor(n/60),t=n%60;return"".concat(e,"h ").concat(t,"m")}return n>0?"".concat(n,"m ").concat(i,"s"):"".concat(i,"s")})(s);return(0,p.jsx)(ee.Z,{title:gb(n,!1),placement:"top",children:(0,p.jsxs)(m.Z,{spacing:.5,sx:{width:"100%",minWidth:0},onClick:e=>{r&&(e.stopPropagation(),r(n))},children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:"Processing..."}),(0,p.jsxs)(v.Z,{variant:"caption",color:"text.disabled",noWrap:!0,children:["ETA: ",t]})]}),(0,p.jsx)(Rn.Z,{variant:"determinate",value:e,sx:{borderRadius:1,height:4}})]})})}const d=n.status===Nc.QUEUED||n.status===Nc.COMPLETE;return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:(0,p.jsx)(ee.Z,{title:gb(n,a),placement:"top",disableInteractive:!1,leaveDelay:200,children:(0,p.jsx)(i.Z,{component:"span",sx:{dis
3play:"inline-flex",...d&&r&&{cursor:"pointer"}},...d&&r?{onClick:e=>{e.stopPropagation(),r(n)}}:{},children:(0,p.jsx)(ke.Z,{label:a?"Out of date":hb(n),icon:a?(0,p.jsx)(Gf.Z,{fontSize:"small"}):pb(n.status),size:"small",variant:"outlined",sx:()=>{const e=a?"warning.dark":(e=>{switch(e){case Nc.COMPLETE:return"success.dark";case Nc.ERROR:return"error.dark";default:return}})(n.status);return{...e&&{color:e,borderColor:e,"& .MuiChip-icon":{color:e}},...d&&r&&{cursor:"pointer"}}}})})})})}}),db.display({id:"download",header:"",size:50,cell:e=>{let{row:t}=e;const n=t.original;return n.status===Nc.COMPLETE&&n.downloadUrl?(0,p.jsx)(ee.Z,{title:"Download USB package",placement:"top",children:(0,p.jsx)(x.Z,{size:"small",onClick:e=>{e.stopPropagation(),null===r||void 0===r||r(n)},children:(0,p.jsx)(wi.Z,{})})}):null}}),db.display({id:"actions",header:"",size:60,cell:e=>{let{row:t}=e;return(0,p.jsx)(jd,{menuItems:(0,p.jsx)(Zd,{icon:(0,p.jsx)(Gl.Z,{}),label:"Delete",onClick:()=>n(t.original)})})}})]),[c,j,u,r,n]),[D,k]=(0,a.useState)([{id:"pinned",desc:!0},{id:"createdAt",desc:!0}]),I=(0,a.useCallback)((e=>{const t={id:"pinned",desc:!0},n=("function"===typeof e?e(D):e).find((e=>"pinned"!==e.id));if(n)return void k([t,n]);const i=D.find((e=>"pinned"!==e.id));k(i?[t,{id:i.id,desc:!i.desc}]:[t,{id:"createdAt",desc:!0}])}),[D]),A=(0,a.useMemo)((()=>t.map((e=>({...e,pinned:s.has(e.id)})))),[t,s]),R=(0,a.useMemo)((()=>l?A:A.filter((e=>{if(e.status!==Nc.COMPLETE)return!0;const t=C.current.get(e.id);return!t||"current"===t.overall}))),[A,l,f]),T=(0,sa.b7)({columns:w,data:R,state:{sorting:D},onSortingChange:I,enableSortingRemoval:!1,getRowId:e=>e.id,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),P=T.getRowModel().rows,L=(0,a.useMemo)((()=>P.map((e=>e.id)).join(",")),[P]);(0,a.useLayoutEffect)((()=>{var e;null===(e=g.current)||void 0===e||e.recomputeRowHeights()}),[u,L]);const N=(0,a.useCallback)((e=>{let{index:t}=e;const n=P[t];return n&&u.has(n.id)?60+(e=>{var t,n,i,a;const r=null!==(t=e.selectedAppIds)&&void 0!==t?t:[],l=null!==(n=e.selectedVideoIds)&&void 0!==n?n:[],s=null!==(i=e.selectedWebXRAppIds)&&void 0!==i?i:[],d=(0,o.entries)(null!==(a=e.firmwareByModelId)&&void 0!==a?a:{}),c=ub(e),u=!0===e.includeFiles,p=(0,o.size)(r)>0,h=(0,o.size)(l)>0,m=(0,o.size)(s)>0,g=(0,o.size)(d)>0,v=c.length>0;let C=0,x=0;return p&&(C++,x+=(0,o.size)(r)),h&&(C++,x+=(0,o.size)(l)),m&&(C++,x+=(0,o.size)(s)),u&&(C++,x+=1),g&&(C++,x+=(0,o.size)(d)),v&&(C++,x+=c.length),28*C+32*x+1+32})(n.original):60}),[u,P]),U=(0,a.useCallback)((e=>{let{key:t,registerChild:n,...i}=e;const o=P[i.index];return o?(0,p.jsx)(sb,{ref:n,row:o,isExpanded:u.has(o.id),onToggleExpand:Z,...i},t):null}),[u,Z,P]),F=(0,a.useMemo)((()=>(0,o.sumBy)(w,"size")),[w]);return(0,p.jsx)(m.Z,{bgcolor:"background.paper",component:Me.Z,minWidth:F,children:(0,p.jsx)(sh,{headerContent:(0,p.jsx)(eh.K,{table:T,flexColumnIds:cb}),headerBackgroundSize:1,children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:"window",table:T,rowHeight:N,flexColumnIds:cb,renderRow:U,emptyMessage:"No USB update packages",nativeListProps:{ref:g}})})})}));xb.displayName="UsbUpdatesTable";const fb=(0,a.memo)((e=>{let{jobs:t,onDeleteClick:n,onStatusClick:a,showOutdated:r}=e;return void 0===t?(0,p.jsx)(m.Z,{alignItems:"center",justifyContent:"center",minHeight:400,children:(0,p.jsx)(Zi.Z,{})}):(0,o.isEmpty)(t)?(0,p.jsx)(i.Z,{padding:4,textAlign:"center",children:(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.secondary",children:"Create a USB update package from the configuration page"})}):(0,p.jsx)(i.Z,{pt:.5,children:(0,p.jsx)(xb,{jobs:t,onDeleteClick:n,onStatusClick:a,showOutdated:r})})}));fb.displayName="ConfigurationsListUsbPackagesTab";const bb=(0,a.forwardRef)(((e,t)=>{var n;let{row:i,style:o}=e;const{buildOrganizationPath:a}=(0,w.P)(),r=i.original,l=null!==(n=r.pinned)&&void 0!==n&&n,s=(0,p.jsx)(th.J,{ref:t,style:o,row:i,flexColumnIds:yb,hover:!0,sx:{cursor:"pointer",...l&&{position:"relative","&::before":{content:'""',position:"absolute",left:0,top:0,bottom:0,width:"2px",backgroundColor:"primary.main",zIndex:1}}}});return(0,p.jsx)(Qc,{to:a((e=>e.configurations.configuration),{configurationId:r.id}),children:s})})),yb=["name"],jb=e=>{let{row:t}=e;const n=t.original;return(0,p.jsx)(i.Z,{sx:{fontWeight:"medium",width:"100%",height:"100%",display:"flex",alignItems:"center"}
3,children:(0,p.jsx)(v.Z,{variant:"subtitle2",sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",width:"100%",whiteSpace:"pre"},children:n.name})})},Zb=e=>{var t;let{row:n}=e;const o=n.original;return(0,p.jsx)(i.Z,{sx:{color:0===o.deviceCount?"text.disabled":"text.primary"},children:null!==(t=o.deviceCount)&&void 0!==t?t:0})},wb=e=>{let{row:t}=e;const n=t.original.deviceExperienceMode;return(0,p.jsx)(p.Fragment,{children:vp.z$[n]})},Eb=e=>{let{row:t}=e;const n=t.original;return(0,p.jsx)(vu,{registrationCode:n.registrationCode,hideLabel:!0})},Sb=e=>{let{row:t}=e;const n=t.original,i=n.updatedAt?(0,M.ax)(n.updatedAt):"Unknown";return(0,p.jsx)(p.Fragment,{children:i})},Db=e=>{let{row:t}=e;const n=t.original;return(0,p.jsx)(Uf,{configId:n.id,sx:{".MuiTableRow-root:hover &":{opacity:1},marginLeft:-.5}})},Mb=e=>{let{row:t,onDuplicateClick:n,onDeleteClick:i,privileges:o}=e;const a=t.original,{buildOrganizationPath:r}=(0,w.P)(),l=(0,X.h5)();if(!(o.configurations||l))return null;const s=[(0,p.jsx)(Zd,{icon:(0,p.jsx)(he.Z,{}),label:"View History",to:a.id?r((e=>e.configurations.configuration.history),{configurationId:a.id}):"#"},"configuration-view-history"),...o.configurations?[(0,p.jsx)(Zd,{icon:(0,p.jsx)(Ed.Z,{}),label:"Duplicate Configuration",onClick:()=>n(a),disabled:!o.canCreateOrDuplicate,tooltip:o.canCreateOrDuplicate?void 0:Wc},"configuration-duplicate"),(0,p.jsx)(Ie.Z,{sx:{marginY:1}},"divider"),(0,p.jsx)(Zd,{icon:(0,p.jsx)(Gl.Z,{}),label:"Delete Configuration",onClick:()=>i(a)},"configuration-delete")]:[]];return(0,p.jsx)(jd,{menuItems:s})},kb=(0,a.memo)((e=>{let{configurations:t,onDuplicateClick:n,onDeleteClick:r,privileges:l}=e;const{pinnedConfigs:s}=Tf(),d=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.accessor((e=>{var t;return null!==(t=e.pinned)&&void 0!==t&&t}),{id:"pinned",header:()=>(0,p.jsx)(i.Z,{visibility:"hidden",children:"Hidden"}),cell:e=>{let{row:t}=e;return(0,p.jsx)(Db,{row:t})},size:38,enableSorting:!0,sortDescFirst:!0}),e.accessor((e=>e.name),{id:"name",header:"Name",size:200,cell:e=>{let{row:t}=e;return(0,p.jsx)(jb,{row:t})},sortDescFirst:!1,sortingFn:(e,t)=>(0,ze.bL)(e.getValue("name"),t.getValue("name"))}),e.accessor((e=>{var t;return null!==(t=e.deviceCount)&&void 0!==t?t:0}),{id:"devices",header:"Devices",size:100,cell:e=>{let{row:t}=e;return(0,p.jsx)(Zb,{row:t})},sortDescFirst:!0}),e.accessor((e=>e.deviceExperienceMode),{id:"deviceExperienceMode",header:"Experience Mode",size:150,cell:e=>{let{row:t}=e;return(0,p.jsx)(wb,{row:t})},sortDescFirst:!1}),e.accessor((e=>e.registrationCode),{id:"registrationCode",header:()=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)("span",{children:"Configuration Code"}),(0,p.jsx)(ci,{helpText:"Use a configuration code to set up a device without sharing your ManageXR credentials.",url:Be.IW.deviceRegistrationCode})]}),size:190,cell:e=>{let{row:t}=e;return(0,p.jsx)(Eb,{row:t})},sortDescFirst:!1}),e.accessor((e=>{var t;return null!==(t=e.updatedAt)&&void 0!==t?t:0}),{id:"lastUpdated",header:"Last Updated",size:140,cell:e=>{let{row:t}=e;return(0,p.jsx)(Sb,{row:t})},sortDescFirst:!0}),e.display({id:"actions",header:"",size:60,cell:e=>{let{row:t}=e;return(0,p.jsx)(Mb,{row:t,onDuplicateClick:n,onDeleteClick:r,privileges:l})},enableSorting:!1})]}),[r,n,l]),[c,u]=(0,a.useState)([{id:"pinned",desc:!0},{id:"name",desc:!1}]),h=(0,a.useCallback)((e=>{const t={id:"pinned",desc:!0},n=("function"===typeof e?e(c):e).find((e=>"pinned"!==e.id));if(n)return void u([t,n]);const i=c.find((e=>"pinned"!==e.id));u(i?[t,{id:i.id,desc:!i.desc}]:[t,{id:"name",desc:!1}])}),[c]),g=(0,a.useMemo)((()=>t.map((e=>({...e,pinned:s.has(e.id)})))),[t,s]),v=(0,sa.b7)({columns:d,data:g,state:{sorting:c},onSortingChange:h,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)(),getRowId:e=>e.id,enableSorting:!0}),C=(0,a.useCallback)((e=>{let{key:t,registerChild:n,...i}=e;const o=v.getRowModel().rows[i.index];return o?(0,p.jsx)(bb,{ref:n,row:o,...i},t):null}),[v]),x=(0,a.useMemo)((()=>(0,o.sumBy)(d,"size")),[d]);return(0,p.jsx)(m.Z,{bgcolor:"background.paper",component:Me.Z,minWidth:x,children:(0,p.jsx)(sh,{headerContent:(0,p.jsx)(eh.K,{table:v,flexColumnIds:yb}
3),headerBackgroundSize:1,children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:"window",table:v,rowHeight:60,flexColumnIds:yb,emptyMessage:"No Configurations found",renderRow:C})})})})),Ib=(0,a.memo)((e=>{var t;let{jobs:n}=e;const o=null!==(t=(0,d.kV)().customUsbPackagesPerMonth)&&void 0!==t?t:5,{currentMonthUsed:r,monthJobs:l}=(0,a.useMemo)((()=>{if(!n)return{currentMonthUsed:0,monthJobs:[]};const e=(()=>{const e=new Date,t=e.getUTCFullYear(),n=String(e.getUTCMonth()+1).padStart(2,"0");return"".concat(t,"-").concat(n)})(),t=n.filter((t=>t.billingMonth===e&&"ERROR"!==t.status));return{currentMonthUsed:t.length,monthJobs:t}}),[n]),s=r>o,c=s?100:r/o*100,u=(0,a.useMemo)((()=>{if(0===l.length)return"No packages generated this month";const e=[...l].sort(ze.gt);return(0,p.jsxs)(m.Z,{spacing:.25,sx:{maxHeight:300,overflowY:"auto"},children:[(0,p.jsxs)(v.Z,{variant:"caption",paddingBottom:1,children:["Your organization can create up to ",(0,p.jsx)("b",{children:o})," USB update packages each month. You have created ",(0,p.jsx)("b",{children:r})," ","so far this month:"]}),e.map((e=>(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"caption",noWrap:!0,children:["\u2022 ",e.name]}),e.deleted&&(0,p.jsx)(v.Z,{variant:"caption",sx:{fontWeight:"bold",flexShrink:0},children:"(Deleted)"})]},e.id)))]})}),[l,o,r]);return(0,p.jsx)(ee.Z,{title:u,placement:"bottom",disableInteractive:!1,leaveDelay:300,children:(0,p.jsxs)(i.Z,{sx:{width:320},children:[(0,p.jsxs)(mf.h,{variant:"body2",children:[(0,p.jsx)("em",{style:s?{color:"inherit"}:void 0,children:r})," ","of ",(0,p.jsx)("em",{children:o})," package generations used this month"]}),(0,p.jsx)(Rn.Z,{sx:{marginTop:.5,"& .MuiLinearProgress-bar":s?{backgroundColor:"error.main"}:{}},variant:"determinate",value:c})]})})}));Ib.displayName="UsbPackageUsageSummary";const Ab=e=>{let{open:t,onClose:n}=e;const i=(0,u.I0)(),r=(0,l.k6)(),{notifyThunkResult:s}=(0,ie.o)(),{organizationId:d,buildOrganizationPath:c}=(0,w.P)(),[h,g]=(0,a.useState)(""),[v,C]=(0,a.useState)(!1),x=(0,u.v9)((e=>e.configurationList.createPending)),f=async e=>{if(e&&e.preventDefault(),!h.trim())return void C(!0);const t=await i((0,Vc.Gx)({organizationId:d,name:h.trim()}));s({result:t,success:{message:"Configuration created"},error:{message:"Error creating configuration"}}),"fulfilled"===t.meta.requestStatus&&(0,o.isObject)(t.payload)&&(n(),r.push(c((e=>e.configurations.configuration),{configurationId:t.payload.id})))};return(0,p.jsx)(Ro.Q,{title:"Add Configuration",open:t,onClose:n,maxWidth:"xs",rightActions:[(0,p.jsx)(Un.U,{submitting:x,disabled:!h.trim()||x,onClick:f,"data-testid":"addConfiguration_submit",children:"Create"})],children:(0,p.jsx)("form",{onSubmit:f,noValidate:!0,autoComplete:"off",children:(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsx)(Ln.Z,{label:"Configuration Name",value:h,onChange:e=>{g(e.target.value),C(!e.target.value)},disabled:x,error:v,helperText:v?"Name is required":"",fullWidth:!0,autoFocus:!0,required:!0,"data-testid":"addConfiguration_nameInput"})})})})},Rb="configurationListViewMode",Tb=(0,o.memoize)((e=>e.toLocaleLowerCase())),Pb=()=>{var e,t;const n=(0,u.I0)(),o=(0,l.k6)(),r=(0,l.TH)(),{notifyThunkResult:s}=(0,ie.o)(),{organizationId:d,privileges:c,configurationsFullAccess:h}=(0,w.P)(),g=c.configurations&&h,x=(0,Le.c)(),[f,y]=(0,a.useState)((()=>
3x||"usbPackages"!==new URLSearchParams(r.search).get("tab")?"configurations":"usbPackages")),j=(0,a.useCallback)(((e,t)=>{y(t);const n=new URLSearchParams(r.search);n.set("tab",t),o.replace({pathname:r.pathname,search:n.toString()})}),[o,r.pathname,r.search]),Z=(0,If.Y)((()=>{const{organizationId:e}=(0,w.P)();return(0,a.useMemo)((()=>{const t=S.F.Jobs,n=(0,Os.N$)(t),i=(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,e)),o=(0,td.ar)("jobType","==","USB_PACKAGE");return{id:(0,nd.tc)({collection:t,organizationId:e,filter:"usbPackageJobs"}),query:(0,td.IO)(n,i,o)}}),[e])})()),D=(0,a.useMemo)((()=>Z?Array.from(Z.values()):void 0),[Z]),M=new URLSearchParams(r.search),k=M.get("view"),I=M.get("action"),A=()=>{if((0,di.oZ)("localStorage")){const e=localStorage.getItem(Rb);if("table"===e||"grid"===e)return e}return"grid"},[R,T]=(0,a.useState)("table"===k||"grid"===k?k:A());(0,a.useEffect)((()=>{const e=new URLSearchParams(r.search).get("view");if("table"===e||"grid"===e)T(e);else if(!e){const e=A(),t=new URLSearchParams(r.
3search);t.set("view",e),o.replace({pathname:r.pathname,search:t.toString()})}}),[r.search,o,r.pathname]);const[P,L]=(0,a.useState)(""),[N,U,F]=(0,zn.G)(P,300),O=U!==N,[_,z]=(0,a.useState)(""),[B,W,V]=(0,zn.G)(_,300),G=W!==B,[H,q]=(0,a.useState)(!1),Y=(0,a.useMemo)((()=>D?D.filter((e=>{var t,n;if(e.deleted)return!1;if(""===W)return!0;return(null!==(t=null===(n=e.name)||void 0===n?void 0:n.toLocaleLowerCase())&&void 0!==t?t:"").includes(W)})):D),[D,W]),{documents:K}=(0,E.D)(S.F.Configurations,{sort:ze.gt,filter:(0,a.useCallback)((e=>{var t,n;if(""===U)return!0;const i=Tb(null!==(t=e.name)&&void 0!==t?t:""),o=Tb(null!==(n=e.registrationCode)&&void 0!==n?n:"");return i.includes(U)||o.includes(U)}),[U])}),[X,Q]=(0,a.useState)("create"===I&&g),[J,$]=(0,a.useState)(!1),[te,ne]=(0,a.useState)(!1),[oe,ae]=(0,a.useState)(),re=(0,a.useCallback)((e=>{ae(e),ne(!0)}),[]),le=(0,a.useCallback)((()=>{$(!1),ae(void 0),ne(!0)}),[]),se=(0,a.useCallback)((()=>{ne(!1),ae(void 0)}),[]);(0,a.useEffect)((()=>{if("create"===I){g&&Q(!0);
3const e=new URLSearchParams(r.search);e.delete("action"),o.replace({pathname:r.pathname,search:e.toString()})}}),[I,g,o,r.pathname,r.search]);const[de,ce]=(0,a.useState)({open:!1,configurationId:""}),ue=(0,a.useCallback)((e=>{g&&ce({open:!0,configurationId:e.id})}),[g]),pe=(0,a.useCallback)((()=>{ce({open:!1,configurationId:""})}),[]),he=(0,a.useCallback)((()=>{g&&Q(!0)}),[g]),me=(0,a.useCallback)((()=>{Q(!1)}),[]),ge=(0,a.useCallback)((async e=>{const t=await n((0,Vc.Xc)({organizationId:d,configurationId:e.id}));s({result:t,success:{message:"Configuration deleted"},error:{message:"Error deleting configuration"}})}),[n,s,d]),ve=$c(ge,{canCreateOrDuplicate:g}),Ce=(0,a.useCallback)((async e=>{const t=await n((0,Vc.O0)({organizationId:d,jobId:e.id}));s({result:t,success:{message:"USB package deleted"},error:{message:"Error deleting USB package"}})}),[n,s,d]),xe=Bn({onConfirm:Ce,title:"Delete USB Package",getMessage:e=>{const t=['Delete the USB package "'.concat(e.name,'"?')];return"COMPLETE"===e.status&&t.push("This package will still count towards your monthly usage limit."),t}}),fe=(0,a.useCallback)(((e,t)=>{if(null!==t){T(t),(0,b.ec)("Configuration View Mode Changed",{viewMode:t}),(0,di.oZ)("localStorage")&&localStorage.setItem(Rb,t);
3const e=new URLSearchParams(r.search);e.set("view",t),o.replace({pathname:r.pathname,search:e.toString()})}}),[o,r]);return(0,p.jsx)(Pf,{children:(0,p.jsx)(Kf,{children:(0,p.jsxs)(Mn.C,{toolbarBreadcrumbs:[{title:"Deploy",navCategory:!0},{title:"Configurations"}],toolbarContent:(0,p.jsx)(m.Z,{direction:"row",children:(0,p.jsx)(ee.Z,{title:g?"":Bc,placement:"bottom",children:(0,p.jsx)("span",{children:(0,p.jsx)(zi.W,{privilege:"configurations",action:"add",disableAutoSize:!0,children:(0,p.jsx)(C.Z,{color:"primary",variant:"contained",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),onClick:he,disabled:!g,"data-testid":"addConfigurationButton",children:"Add configuration"})})})})}),children:[(0,p.jsx)(Zf.Z,{children:(0,p.jsx)(sh,{headerContent:(0,p.jsxs)(m.Z,{bgcolor:"background.default",children:[!x&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsxs)(wf.Z,{value:f,onChange:j,"aria-label":"configurations page tabs",children:[(0,p.jsx)(Yn.Z,{value:"configurations",label:"Configurations",sx:{textTransform:"none",minWidth:"unset"}}),(0,p.jsx)(Yn.Z,{value:"usbPackages",label:"USB Packages",sx:{textTransform:"none",minWidth:"unset"}})]}),"usbPackages"===f&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.Z,{paddingLeft:1,display:"flex",alignItems:"center",children:(0,p.jsx)(zi.W,{privilege:"configurations",action:"add",disableAutoSize:!0,children:(0,p.jsx)(C.Z,{color:"primary",variant:"text",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),onClick:()=>$(!0),sx:{textTransform:"none"},"data-testid":"createUsbUpdateButton",children:"Create USB update"})})}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(i.Z,{display:"flex",alignItems:"center",children:(0,p.jsx)(Ib,{jobs:D})})]})]}),(0,p.jsx)(m.Z,{paddingY:1.5,gap:1,children:"configurations"===f?(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(xu,{value:P,onChange:e=>{L(e),F(e.toLocaleLowerCase())},TextFieldProps:{placeholder:"Filter by name or configuration code",InputProps:{startAdornment:(0,p.jsx)(bl.T,{pending:O})}},inputTestId:"configurationList_searchInput"})}),(0,p.jsxs)(Ef.Z,{value:R,exclusive:!0,onChange:fe,"aria-label":"view mode",size:"small",children:[(0,p.jsx)(ee.Z,{title:"Grid view",placement:"bottom",children:(0,p.jsx)(Sf.Z,{value:"grid","aria-label":"grid view",selected:"grid"===R,children:(0,p.jsx)(Mf.Z,{fontSize:"small"})})}),(0,p.jsx)(ee.Z,{title:"Table view",placement:"bottom",children:(0,p.jsx)(Sf.Z,{value:"table","aria-label":"table view",selected:"table"===R,children:(0,p.jsx)(kf.Z,{fontSize:"small"})})})]})]}):(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",children:[(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(xu,{value:_,onChange:e=>{z(e),V(e.toLocaleLowerCase())},TextFieldProps:{placeholder:"Filter by name",InputProps:{startAdornment:(0,p.jsx)(bl.T,{pending:G})}},inputTestId:"usbPackagesList_searchInput"})}),(0,p.jsx)(po.Z,{control:(0,p.jsx)(ho.Z,{checked:H,onChange:(e,t)=>
3q(t),size:"small",sx:{marginRight:1}}),label:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:"Show outdated"}),sx:{marginRight:0,marginLeft:1}})]})})]}),children:"configurations"===f?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Df.Z,{in:"grid"===R,children:(0,p.jsx)(i.Z,{overflow:"grid"===R?void 0:"hidden",children:(0,p.jsx)(Wf,{configurations:K,onDuplicateClick:ue,onDeleteClick:ve.trigger,privileges:{configurations:c.configurations,canCreateOrDuplicate:g}})})}),(0,p.jsx)(Df.Z,{in:"table"===R,children:(0,p.jsx)(i.Z,{pt:.5,children:(0,p.jsx)(kb,{configurations:K,onDuplicateClick:ue,onDeleteClick:ve.trigger,privileges:{configurations:c.configurations,canCreateOrDuplicate:g}})})})]}):(0,p.jsx)(fb,{jobs:Y,onDeleteClick:xe.trigger,onStatusClick:re,showOutdated:H})})}),(0,p.jsx)(Fn,{...xe.props}),c.configurations&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Fn,{...ve.props}),de.open&&(0,p.jsx)(qc,{open:de.open,onClose:pe,configurationId:de.configurationId}),(0,p.jsx)(Ab,{open:X,onClose:me}),(0,p.jsx)(Pc,{open:J,onClose:()=>$(!1),sourceConfigurationId:null!==(e=null===(t=K[0])||void 0===t?void 0:t.id)&&void 0!==e?e:"",onSuccess:le})]}),(0,p.jsx)(zc,{open:te,onClose:se,showUsbUpdatesLink:!1,job:oe})]})})})},Lb=(0,a.memo)((()=>(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{exact:!0,path:c._j.organization.configurations.__path,children:(0,p.jsx)(Pb,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.configurations.configuration.__path,children:(0,p.jsx)(rd,{children:(0,p.jsx)(jf,{})})})]})));var Nb=n(42169);const Ub=new Map;let Fb;const Ob=e=>{const{organizationId:t}=(0,w.P)(),{request:n}=(0,Fe.pv)({method:"get",path:"discover-xr/instant-apps/:instantAppId/analytics"}),[i,o]=(0,a.useState)(),[r,l]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(!e)return o(void 0),void l(!1);Fb!==t&&(Ub.clear(),Fb=t);const i=Ub.get(e);if(i&&Date.now()-i.fetchedAt<6e5)return o(i.response),void l(!1);o(void 0),l(!0);const a=new AbortController;return n({params:{instantAppId:e},onSuccess:t=>{Ub.set(e,{response:t,fetchedAt:Date.now()}),o(t)},onFinally:()=>{a.signal.aborted||l(!1)},errorMessage:"Error getting analytics",controller:a}),()=>a.abort()}),[n,e,t]),{analytics:i,pending:r}},_b=e=>{let{organizationCount:t,hasVersionChanges:n}=e;const i=(e=>1===e?"The one customer organization":"All ".concat((0,ul.sr)(e,"customer organization")))(t);return"".concat(i,n?" will receive the new versions of this app.":" will receive these updates.")},zb={fontWeight:600},Bb={color:"primary.main",fontWeight:600},Wb=(0,a.memo)((e=>{let{label:t}=e;return(0,p.jsx)(ke.Z,{size:"small",label:t,sx:{height:"unset",marginLeft:.5,verticalAlign:"middle",bgcolor:"grey.300",color:"grey.900","& .MuiChip-label":{paddingX:.75,fontSize:"0.85em",lineHeight:1.5}}})}));Wb.displayName="VersionLabelChip";const Vb=(e,t)=>0===e?"":e<t-1?", ":t>2?", and ":" and ",Gb=(0,a.memo)((e=>{let{names:t}=e;return(0,p.jsx)(p.Fragment,{children:t.map(((e,n)=>(0,p.jsxs)(a.Fragment,{children:[Vb(n,t.length),(0,p.jsx)(i.Z,{component:"span",sx:Bb,children:e})]},e)))})}));Gb.displayName="HighlightedModelNames";const Hb=(0,a.memo)((e=>{let{versionChange:t}=e;return(0,p.jsxs)(p.Fragment,{children:[" ","will change from"," ",(0,p.jsx)(i.Z,{component:"span",sx:Bb,children:t.previousVersion}),t.previousVersionLabel&&(0,p.jsx)(Wb,{label:t.previousVersionLabel})," ","to"," ",(0,p.jsx)(i.Z,{component:"span",sx:Bb,children:t.newVersion}),t.newVersionLabel&&(0,p.jsx)(Wb,{label:t.newVersionLabel})]})}));Hb.displayName="PublishUpdateVersionChangeClause";const qb=(0,a.memo)((e=>{let{deviceModelChange:t}=e;const{addedModelNames:n,removedModelNames:i}=t,o=n.length>0,a=i.length>0;return o||a?(0,p.jsxs)(p.Fragment,{children:[o?(0,p.jsxs)(p.Fragment,{children:[" ","will add support for ",(0,p.jsx)(Gb,{names:n})]}):null,o&&a?", remove support for ":null,!o&&a?(0,p.jsx)(p.Fragment,{children:" will remove support for "}):null,a?(0,p.jsx)(Gb,{names:i}):null,"."]}):null}));qb.displayName="PublishUpdateDeviceModelSupportClause";const Yb=e=>{let{organizationCount:t,channelChanges:n}=e;const o=(0,a.useMemo)((()=>n.some((e=>!!e.versionChange))),[n]),r=(0,a.useMemo)((()=>_b({organizationCount:t,hasVersionChanges:o})),[o,t]);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:r}),(0,p.jsx)(ii.Z,{disablePadding:!0,sx:{listStyleType:"disc",paddingLeft:2.5},children:n.map((e=>(0,p.jsx)(fl.ZP,{disableGutters:!0,disablePadding:!0,sx:{display:"list-item",paddingBottom:1},children:(0,p.jsxs)(v.Z,{variant:"body2",component:"div",children:[(0,p.jsx)(i.Z,{component:"span",sx:zb,children:e.channelName}
3),e.versionChange&&(0,p.jsx)(Hb,{versionChange:e.versionChange}),e.versionChange&&e.deviceModelChange&&" and",e.deviceModelChange&&(0,p.jsx)(qb,{deviceModelChange:e.deviceModelChange})]})},e.releaseChannelId)))})]})};Yb.displayName="DeveloperPortalPublishUpdateChanges";const Kb=e=>{let{open:t,onClose:n,instantAppTitle:i,organizationCount:o,channelChanges:r,onSubmit:l,children:s}=e;const[d,c]=(0,a.useState)(null),[u,h]=(0,a.useState)(t);t!==u&&(h(t),t&&c(null));const m=(0,a.useCallback)((async()=>{c(r),await l()}),[r,l]);return(0,p.jsxs)(Ni.Y,{open:t,onClose:n,title:"Update ".concat(i),maxWidth:"xs",submitText:"Publish now",submitColor:"primary",cancelText:"Cancel",disableActionTextTransform:!0,hideConfirmation:!0,onSubmit:m,children:[(0,p.jsx)(Yb,{organizationCount:o,channelChanges:null!==d&&void 0!==d?d:r}),s]})};Kb.displayName="DeveloperPortalPublishUpdateDialog";const Xb=e=>{let{apps:t,value:n,onChange:i,label:r="Version",disabled:l,privilege:s,sx:d,onClick:c,fallbackOption:u,sectionHeaderLabel:h="Versions",showTypeIcon:m=!0,includeSectionHeader:g=!0,testId:v,constrainItemWidth:C,compactSelectLabel:x=!1,maxMenuHeight:f,fullWidth:b,getOptionConflictTooltip:y}=e;const j=(0,a.useMemo)((()=>{const e=e=>(0,p.jsx)(lc,{app:e,hideReleaseChannel:!0}),i=[];g&&i.push({label:h,value:"section_header"});const a=new Set((0,o.map)(t,"id"));u&&!a.has(u.value)&&n===u.value&&i.push({value:u.value,label:u.label,...void 0!==u.selectLabel&&{selectLabel:u.selectLabel}});for(const n of t){const t=null===y||void 0===y?void 0:y(n),o=(0,p.jsx)(sc,{app:n,showTypeIcon:m,disableTooltip:null!=t});i.push({value:n.id,label:o,...null!=t&&{disabled:!0,tooltip:t},...x&&{selectLabel:e(n)}})}return i}),[t,x,u,y,g,h,m,n]);return(0,p.jsx)(Qi,{constrainItemWidth:C,disabled:l,fullWidth:b,label:r,maxMenuHeight:f,onChange:i,onClick:c,options:j,privilege:s,sx:d,testId:v,value:n})};Xb.displayName="UIAppVersionTextFieldSelect";const Qb=(0,a.memo)(Xb);let Jb,$b,ey,ty,ny;!function(e){e.DRAFT="DRAFT",e.SUBMISSION_PENDING="SUBMISSION_PENDING",e.LIVE="LIVE"}(Jb||(Jb={})),function(e){e.SUBSCRIPTION="subscription",e.PAY_ONCE="pay_once",e.DEMO="demo",e.FREE_SOME="some_features_free",e.FREE_ALL="all_features_free"}($b||($b={})),function(e){e.INTERNET="internet",e.HAND_TRACKING="hand_tracking"}(ey||(ey={})),function(e){e.ALWAYS="always",e.NEVER="never",e.SOMETIMES="sometimes"}(ty||(ty={})),function(e){e.CONTROLLERS="controllers",e.HAND_TRACKING="hand_tracking",e.EYE_TRACKING="eye_tracking",e.NATURAL_FACIAL_EXPRESSIONS="natural_facial_expressions",e.GAZE_CONTROL="gaze_control"}(ny||(ny={}));const iy=e=>e.phase===Jb.LIVE,oy=e=>e.phase===Jb.SUBMISSION_PENDING,ay=e=>{switch(e){case Jb.LIVE:return"LIVE ON MARKETPLACE";case Jb.SUBMISSION_PENDING:return"SUBMISSION PENDING";case Jb.DRAFT:return"DRAFT"}},ry=e=>{const t=[];let n=!1,i=!1;for(const a of(0,o.keys)(e.deviceModelToReleaseChannelId))a===bi.Q6.PicoNeo3?n=!0:a===bi.Q6.PicoNeo3Eye&&(i=!0),t.push(a);return n&&!i&&t.push(bi.Q6.PicoNeo3Eye),t};var ly=n(85097),sy=n(15625),dy=n(29844);const cy=e=>{const{instantApp:t,releaseChannelId:n,effectiveDeviceModels:i,originalDeviceModels:a}=e,r=null!==a&&void 0!==a?a:(0,dy.L)(t,n),l=(0,o.difference)(i,r);if(0===l.length)return[];const s=n.trim(),d=t.deviceModelToReleaseChannelId;return l.filter((e=>{var t;const n=null===d||void 0===d||null===(t=d[e])||void 0===t?void 0:t.trim();return!n||n!==s}))},uy=e=>{const{instantApp:t,existingReleaseChannels:n,editingByReleaseChannelId:i,releaseChannelId:o,selectedDeviceModels:a}=e,r=o.trim(),l=new Set,s=[],d=e=>{const n=null===i||void 0===i?void 0:i[e.id];return n?n.deviceModels:(0,dy.L)(t,e.id)};for(const u of a)if(u&&!l.has(u)){l.add(u);for(const e of n){const t=e.id.trim();var c;if(t&&t!==r)if(d(e).includes(u))s.push({deviceModel:u,existingChannelId:e.id,existingChannelName:null!==(c=e.name)&&void 0!==c&&c.trim()?e.name:e.id})}}return s},py=(e,t)=>e.name===t.name&&e.targetAppId===t.targetAppId&&(0,sy.x)(e.deviceModels,t.deviceModels),hy=e=>(t,n)=>{var i,a;const{instantAppId:r,instantApp:l,releaseChannel:s,action:d}=e;n().developerPortal.editingInstantAppId!==r&&(t(ly.uV.actions.stoppedEditing()),t(ly.uV.actions.startedEditing({instantAppId:r})));const c=n(),u=d.payload.releaseChannelId;if(!u||u!==s.id)return;if(!s.targetRef)return;if((null===(i=c.developerPortal.editingReleaseChannels)||void 0===i?void 0:i[u])||t(ly.uV.actions.changesStarted({releaseChannelId:u,sourceReleaseChannel:(0,ly.Dw)(s,l)})),t(d),d.type===ly.uV.actions.releaseChannelDeviceModelsChanged.type){var p;const e=n().developerPortal,i=(e=>{var t;const{instantApp:n,releaseChannelId:i,editingReleaseChannels:a,originalReleaseChannels:r}=e,l=a[i];if(!l)return[];const s=cy({instantApp:n,releaseChannelId:i,effectiveDeviceModels:l.deviceModels,originalDeviceModels:null===r||void 0===r||null===(t=r[i])||void 0===t?void 0:t.deviceModels});if(0===s.length)return[];const d=[];for(const[c,u]of Object.entries(a)){if(c===i)continue;const e=(0,dy.L)(n,c),t=s.filter((t=>u.deviceModels.includes(t)&&!e.includes(t)));if(0===t.length)continue;const a=(0,o.sortBy)((0,o.difference)(u.deviceModels,t));d.push({releaseChannelId:c,deviceModels:a})}return d})({instantApp:l,releaseChannelId:u,editingReleaseChannels:null!==(p=e.editingReleaseChannels)&&void 0!==p?p:{},originalReleaseChannels:e.originalReleaseChannels});for(const n of i)t(ly.uV.actions.releaseChannelDeviceModelsChanged(n));const a=n().developerPortal,r=a.originalReleaseChannels;for(const n of i){var h;const e=null===(h=a.editingReleaseChannels)||void 0===h?void 0:h[n.releaseChannelId],i=null===r||void 0===r?void 0:r[n.releaseChannelId];e&&i&&py(e,i)&&t(ly.uV.actions.changesCleared({releaseChannelId:n.releaseChannelId}))}}const m=null===(a=n().developerPortal.editingReleaseChannels)||void 0===a?void 0:a[u],g=(0,ly.Dw)(s,l);m&&py(m,g)&&t(ly.uV.actions.changesCleared({releaseChannelId:u}))},my=["Meta","Pico",bi.p6.Anker,bi.p6.DPVR,bi.p6.HTC,bi.p6.Lenovo,bi.p6.MagicLeap,bi.p6.Samsung,bi.p6.XREAL],gy=()=>{const e=(0,o.values)(bi.Q6);return(0,o.sortBy)(e,[e=>(e=>{const t=(0,Vr.sd)(e),n=t===bi.p6.Oculus?"Meta":null!==t&&void 0!==t?t:"Other",i=my.indexOf(n);return-1===i?my.length:i})(e),e=>(e=>{const t=(0,Vr.ao)(e);return"Unknown"===t?"\uffff":t})(e),e=>e])},vy=e=>{const t=(0,Vr.sd)(e);return t?t===bi.p6.Oculus?"Meta":t:"Other"},Cy=(()=>{const e=gy(),t=[];let n;for(const i of e){if(bi.uD.has(i))continue;const e=vy(i);e!==n&&(t.push({variant:"header",title:e}),n=e),t.push({id:i,title:(0,Vr.ao)(i)})}return t})(),xy=e=>{var t,n,i,o,a;const r=null!==(t=null!==(n=e.latestVersion)&&void 0!==n?n:e.versionCode)&&void 0!==t?t:"";return[null!==(i=e.packageName)&&void 0!==i?i:"",r,null!==(o=e.versionName)&&void 0!==o?o:"",null!==(a=e.versionLabel)&&void 0!==a?a:""].join("|")},fy=e=>{const t={};for(const o of e){var n,i;const e=null===(n=o.instantAppRef)||void 0===n?void 0:n.id;if(!e)continue;
3const a=xy(o),r=null!==(i=t[a])&&void 0!==i?i:t[a]=[];r.includes(e)||r.push(e)}return t},by=(e,t,n)=>{const i=n[xy(e)];return!!i&&i.some((e=>e!==t))},yy=(e,t,n,i)=>{const o=n[xy(e)],a=null===o||void 0===o?void 0:o.find((e=>e!==t));if(a)return{conflictingInstantAppId:a,conflictingTitle:i[a]}},jy=e=>e?'This app version is already published under the Instant App "'.concat(e,'"'):"This app version is already published under another Instant App",Zy=e=>e.reduce(((e,t)=>(t.id&&t.title&&(e[t.id]=t.title),e)),{}),wy=(e,t,n)=>{var i,o;return null!==(i=null===(o=e.find((e=>!by(e,t,n))))||void 0===o?void 0:o.id)&&void 0!==i?i:""},Ey=(e,t,n)=>{var i;if(t.some((t=>t.id===e)))return e;const o=n?t.find((e=>((e,t)=>{var n,i;const o=null!==(n=e.versionCode)&&void 0!==n?n:e.latestVersion,a=null!==(i=t.versionCode)&&void 0!==i?i:t.latestVersion;return null!=o&&null!=a&&o===a&&e.versionName===t.versionName&&e.versionLabel===t.versionLabel})(e,n))):void 0;return null!==(i=null===o||void 0===o?void 0:o.id)&&void 0!==i?i:e},Sy=(e,t)=>{var n,i;if(!e.targetRef)return;if(!t||t.id!==e.targetRef.id)return;const a=t.versionCode,r=(0,o.isNumber)(a)?String(a).trim():"",l=null!==(n=null===(i=t.versionName)||void 0===i?void 0:i.trim())&&void 0!==n?n:"";return r||l?r&&l?"".concat(r," (").concat(l,")"):r||"(".concat(l,")"):void 0},Dy=(e,t)=>{var n;return null!==(n=Sy(e,t))&&void 0!==n?n:"\u2014"},My=(e,t)=>Sy(e,t),ky=(0,a.memo)((e=>{let{instantApp:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),i=t.phase===Jb.LIVE,o=n((e=>e.connect.developerPortal.instantApp),{instantAppId:t.id});return(0,p.jsx)(ee.Z,{placement:"bottom",disableInteractive:!1,title:(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",children:t.title}),(0,p.jsx)(Kn.Z,{component:f.rU,to:o,color:"inherit",underline:"always",sx:{fontWeight:600},children:"View in Developer Portal"})]}),children:(0,p.jsx)(Ud.Z,{"aria-label":i?"Live on the marketplace":"Not live on the marketplace",sx:{color:i?Ld.Li:"action.active"}})})}));ky.displayName="DeveloperPortalReleaseChannelInstantAppBolt";var Iy=n(94070);const Ay=(0,a.memo)((e=>{let{conflicts:t}=e;const n=(0,a.useMemo)((()=>{const e=(0,o.groupBy)(t,"existingChannelId");return(0,o.map)(e,(e=>{const t=(0,o.head)(e);return{channelId:t.existingChannelId,channelName:t.existingChannelName,deviceModels:(0,o.map)(e,(e=>e.deviceModel)).sort(((e,t)=>(0,ze.bL)((0,Vr.ao)(e),(0,Vr.ao)(t))))}}))}),[t]);return 0===n.length?null:(0,p.jsx)(Iy.Z,{severity:"warning",children:(0,p.jsx)(m.Z,{spacing:.5,children:(0,o.map)(n,(e=>(0,p.jsxs)(v.Z,{variant:"body2",children:[(0,ul.Yv)((0,o.map)(e.deviceModels,Vr.ao))," devices will now receive the app version from this release channel instead of"," ",e.channelName]},e.channelId)))})})}));Ay.displayName="DeveloperPortalReleaseChannelModelsConflictAlert";const Ry=e=>e.join(", "),Ty=e=>{let{organizationCount:t}=e;return 0===t?"not saved by any organizations":"saved by ".concat((e=>"".concat(e," organization").concat(1===e?"":"s"))(t))},Py=e=>{let{open:t,onClose:n,instantApp:i,releaseChannel:r,deviceModels:l}=e;const s=(0,Le.I7)(),{analytics:d}=Ob(i.id),{requestAsync:c}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"developers/instant-apps/:instantAppId/release-channels/:releaseChannelId",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.ReleaseChannels,id:null===t||void 0===t?void 0:t.releaseChannelId,remove:!0}}})),[])),u=(0,a.useMemo)((()=>((e,t)=>{const n=t.trim();if(!n)return!1;const i=(0,o.uniq)((0,o.compact)((0,o.values)(e.deviceModelToReleaseChannelId)));return 1===i.length&&i[0]===n})(i,r.id)),[i,r.id]),h=(0,a.useMemo)((()=>l.map((e=>(0,Vr.ao)(e)))),[l]),g=(0,a.useMemo)((()=>(e=>{let{channelName:t,deviceModelNames:n}=e;const i="Are you sure you want to delete ".concat(t,"?");return 0===n.length?i:"".concat(i," This will stop delivering the app to ").concat(Ry(n)," devices on this channel.")})({channelName:r.name,deviceModelNames:h})),[h,r.name]),v=(0,a.useMemo)((()=>(e=>{let{deviceModelNames:t,organizationCount:n}=e;if(0===t.length)return"This release channel isn't delivering the app to any devices.";const i=void 0===n?"all organizations that have saved this app":0===n?"no organizations that have saved this app":1===n?"all 1 organization that has saved this app":"all ".concat(n," organizations that have saved this app");return"This will remove the app from ".concat(Ry(t)," devices across ").concat(i,". Those devices will no longer receive updates from this release channel.")})({deviceModelNames:h,organizationCount:null===d||void 0===d?void 0:d.sharedOrganizationsCount})),[null===d||void 0===d?void 0:d.sharedOrganizationsCount,h]),C=(0,a.useMemo)((()=>u?(e=>{let{appName:t,marketplaceName:n}=e;return"This is the only release channel for ".concat(t,". Deleting it will hide ").concat(t," from ").concat(n," until a new channel is added.")})({appName:i.title,marketplaceName:s}):void 0),[i.title,s,u]),x=(0,a.useCallback)((async()=>{try{await c({params:{instantAppId:i.id,releaseChannelId:r.id},successMessage:"Release channel deleted",errorMessage:"Error deleting release channel"}),(0,b.ec)("Developer Portal Release Channel Deleted",{releaseChannelId:r.id,instantAppId:i.id,wasLastReleaseChannel:u})}catch{}finally{n()}}),[i.id,n,r.id,c,u]);return(0,p.jsx)(Ni.Y,{open:t,onClose:n,title:"Delete release channel?",maxWidth:"sm",customDialogWidth:520,description:g,submitText:"Delete channel",cancelText:"Cancel",hideConfirmation:!0,onSubmit:x,children:(0,p.jsxs)(m.Z,{spacing:2,children:[C&&
3(0,p.jsx)(Iy.Z,{severity:"error",icon:(0,p.jsx)(me.Z,{fontSize:"small"}),children:C}),(0,p.jsx)(Iy.Z,{severity:"error",icon:(0,p.jsx)(me.Z,{fontSize:"small"}),children:v})]})})};Py.displayName="DeveloperPortalDeleteReleaseChannelDialog";const Ly=(0,a.memo)((e=>{let{instantApp:t,releaseChannel:n,deviceModels:i,selectedAppVersionId:r,onVrContentPage:s=!1}=e;const d=(0,l.k6)(),{hasRequiredPrivilege:c,buildOrganizationPath:u}=(0,w.P)(),{appCollections:{managedApps:h}}=(0,Xn.w)(),m=(0,a.useRef)(null),[g,v]=(0,a.useState)(!1),[C,f]=(0,a.useState)(!1),b=(0,a.useMemo)((()=>(0,o.flatMap)(h).find((e=>e.id===r))),[h,r]),y=!s&&c(pe.e.Content)&&!!b,j=s&&c(pe.e.Content),Z=t.phase!==Jb.SUBMISSION_PENDING&&(!s||c(pe.e.Content)),E="release-channel-actions-".concat(n.id),S=(0,a.useCallback)((()=>v(!0)),[]),D=(0,a.useCallback)((()=>v(!1)),[]),M=(0,a.useCallback)((()=>{v(!1),b&&d.push(u((e=>e.vrContent.edit.app.managed),{packageName:b.packageName}))}),[u,d,b]),k=(0,a.useCallback)((()=>{v(!1),d.push(u((e=>e.connect.developerPortal.instantApp),{instantAppId:t.id}))}),[u,d,t.id]),I=(0,a.useCallback)((()=>{v(!1),f(!0)}),[]),A=(0,a.useCallback)((()=>f(!1)),[]);return y||j||Z?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(x.Z,{ref:m,id:E,"aria-label":"Release channel actions","aria-haspopup":"menu","aria-expanded":g,onClick:S,children:(0,p.jsx)(yd.Z,{sx:{fontSize:20}})}),(0,p.jsxs)(Is.Z,{anchorEl:m.current,open:g,onClose:D,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},MenuListProps:{"aria-labelledby":E},children:[y&&(0,p.jsxs)(Hi.Z,{onClick:M,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Vf.Z,{fontSize:"small"})}),(0,p.jsx)(Rs.Z,{children:"Open in VR Content"})]}),j&&(0,p.jsxs)(Hi.Z,{onClick:k,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Vf.Z,{fontSize:"small"})}),(0,p.jsx)(Rs.Z,{children:"Open in Developer Portal"})]}),Z&&(0,p.jsxs)(Hi.Z,{onClick:I,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Gl.Z,{fontSize:"small"})}),(0,p.jsx)(Rs.Z,{children:"Delete"})]})]}),C&&(0,p.jsx)(Py,{open:!0,onClose:A,instantApp:t,releaseChannel:n,deviceModels:i})]}):null}));Ly.displayName="DeveloperPortalReleaseChannelRowMenu";const Ny=600,Uy={display:"flex",flex:1,flexDirection:"column",minHeight:0,minWidth:0,width:1,"& .MuiOutlinedInput-root":{alignItems:"center",boxSizing:"border-box",display:"flex",flex:1,minHeight:0},"& .MuiInputBase-input":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},"& .MuiSelect-select":{alignItems:"center",display:"flex",minWidth:0,overflow:"hidden"}},Fy=(0,a.memo)((e=>{let{instantApp:t,peerReleaseChannels:n,publishedApps:r,releaseChannel:l,editable:s=!1,onVrContentPage:d=!1,conflictIndex:c={},instantAppTitlesById:h={}}=e;const g=(0,u.v9)((e=>{var n;const{developerPortal:i}=e;if(i.editingInstantAppId===t.id)return null===(n=i.editingReleaseChannels)||void 0===n?void 0:n[l.id]})),C=(0,u.v9)((e=>{var n;const{developerPortal:i}=e;if(i.editingInstantAppId===t.id)return null===(n=i.originalReleaseChannels)||void 0===n?void 0:n[l.id]})),x=(0,u.v9)((e=>{const{developerPortal:n}=e;if(n.editingInstantAppId===t.id)return n.editingReleaseChannels})),f=(0,u.I0)(),{appCollections:{managedApps:b}}=(0,Xn.w)(),y=oy(t),j=(0,a.useCallback)((e=>{const n=yy(e,t.id,c,h);return n?jy(n.conflictingTitle):void 0}),[t.id,c,h]),Z=(0,a.useMemo)((()=>null!==g&&void 0!==g?g:(0,ly.Dw)(l,t)),[g,t,l]),w=(0,a.useMemo)((()=>((e,t)=>{var n,i;if(e.packageName)return e.packageName;const o=null===(n=e.targetRef)||void 0===n?void 0:n.id;return o&&t?null===(i=t.find((e=>e.id===o)))||void 0===i?void 0:i.packageName:void 0})(l,r)),[r,l]),E=(0,a.useMemo)((()=>{var e;return w&&null!==(e=b[w])&&void 0!==e?e:[]}),[b,w]),S=(0,a.useMemo)((()=>{var e;return null!==(e=E.find((e=>e.id===Z.targetAppId)))&&void 0!==e?e:r.find((e=>e.id===Z.targetAppId))}),[Z.targetAppId,r,E]),D=(0,a.useMemo)((()=>Dy({targetRef:{id:Z.targetAppId}},S)),[Z.targetAppId,S]),M=(0,a.useMemo)((()=>cy({instantApp:t,releaseChannelId:l.id,effectiveDeviceModels:Z.deviceModels,originalDeviceModels:null===C||void 0===C?void 0:C.deviceModels})),[Z.deviceModels,t,null===C||void 0===C?void 0:C.deviceModels,l.id]),k=(0,a.useMemo)((()=>{const e=uy({instantApp:t,existingReleaseChannels:n,editingByReleaseChannelId:x,releaseChannelId:l.id,selectedDeviceModels:M});return{list:e,conflictingModels:new Set((0,o.map)(e,(e=>e.deviceModel)))}}),[t,n,x,M,l.id]),I=(0,a.useMemo)((()=>Ey(Z.targetAppId,E,S)),[Z.targetAppId,S,E]),A=(0,a.useMemo)((()=>E.some((e=>e.id===I))?void 0:{value:I,label:(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,color:"text.secondary",children:D}),selectLabel:(0,p.jsx)(v.Z,{noWrap:!0,variant:"body2",color:"text.secondary",children:D})}),[I,E,D]),R=(0,a.useCallback)((e=>{f(hy({instantAppId:t.id,instantApp:t,releaseChannel:l,action:ly.uV.actions.releaseChannelDeviceModelsChanged({releaseChannelId:l.id,deviceModels:e})}))}),[f,t,l]),T=(0,a.useCallback)((e=>k.conflictingModels.has(e)?"warning":void 0),[k.conflictingModels]),P=(0,a.useCallback)((e=>{f(hy({instantAppId:t.id,instantApp:t,releaseChannel:l,action:ly.uV.actions.releaseChannelNameChanged({releaseChannelId:l.id,name:e.target.value})}))}),[f,t,l]),L=(0,a.useCallback)((e=>{var n;const i=((e,t,n,i)=>{var o;if(!t)return e;const a=null!==(o=n.find((e=>e.id===t)))&&void 0!==o?o:i.find((e=>e.id===t));return e===Ey(t,n,a)?t:e})(e,null===(n=l.targetRef)||void 0===n?void 0:n.id,E,r);f(hy({instantAppId:t.id,instantApp:t,releaseChannel:l,action:ly.uV.actions.releaseChannelTargetAppIdChanged({releaseChannelId:l.id,targetAppId:i})}))}),[f,t,r,l,E]);return(0,p.jsx)(ee.Z,{disableFocusListener:!y,disableHoverListener:!y,disableTouchListener:!y,enterDelay:250,enterNextDelay:250,followCursor:!0,placement:"top",title:"This submission is pending. To edit the Release Channel, cancel the current submission.",children:(0,p.jsxs)(i.Z,{sx:e=>({bgcolor:"background.paper",border:1,borderColor:"grey.300",borderRadius:"".concat(e.shape.borderRadius,"px"),boxSizing:"border-box",paddingX:1.5,paddingY:1.25,width:1,...y&&{"& .Mui-disabled":{pointerEvents:"none"}}}),minWidth:780,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"stretch",spacing:2,sx:{flexWrap:"nowrap",minWidth:0,overflowX:"auto",paddingBottom:w?2.75:1.5,paddingTop:1.5,width:1},children:[(0,p.jsx)(i.Z,{sx:{alignItems:"center",alignSelf:"center",display:"flex",flexShrink:0},children:(0,p.jsx)(ky,{instantApp:t})}),(0,p.jsxs)(i.Z,{sx:{flex:"0 0 auto",minWidth:140,width:200,display:"flex",flexDirection:"column",minHeight:0,overflow:"visible",position:"relative"},children:[(0,p.jsx)(ee.Z,{disableHoverListener:!Z.name||y,enterDelay:Ny,enterNextDelay:Ny,placement:"top",title:Z.name,children:(0,p.jsx)(i.Z,{sx:{display:"flex",flex:1,flexDirection:"column",minHeight:0,minWidth:0,width:1},children:(0,p.jsx)(Ln.Z,{disabled:!s,fullWidth:!0,label:"Name",value:Z.name,variant:"outlined",sx:Uy,onChange:P})})}),w?(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,title:w,sx:{left:0,maxWidth:"none",paddingTop:.5,position:"absolute",top:"100%",whiteSpace:"nowrap",width:"max-content",zIndex:1},children:w}):null]}),(0,p.jsx)(i.Z,{sx:{flex:"0 0 auto",minWidth:200,width:220,display:"flex",flexDirection:"column",minHeight:0,minWidth:0},children:(0,p.jsx)(ee.Z,{disableHoverListener:!D||"\u2014"===D||y,enterDelay:Ny,enterNextDelay:Ny,placement:"top",title:D,children:(0,p.jsx)(i.Z,{sx:{display:"flex",flex:1,flexDirection:"column",minHeight:0,minWidth:0,width:1},children:(0,p.jsx)(Qb,{apps:E,compactSelectLabel:!0,constrainItemWidth:!0,disabled:!s,fallbackOption:A,fullWidth:!0,getOptionConflictTooltip:s?j:void 0,onChange:L,showTypeIcon:!1,sx:Uy,value:
3I})})})}),(0,p.jsx)(ws,{checklist:!0,disabled:!s,getChipColor:T,hideClear:!0,label:"Device models",options:Cy,placeholder:"\u2014",sx:{alignItems:"stretch",flex:"2 1 auto",minWidth:220,width:1},truncateSelectedChipsOverflow:!0,truncatedSelectedChipsTestId:"DeveloperPortalReleaseChannelVisibleDeviceChips",values:Z.deviceModels,onChange:R}),(0,p.jsx)(i.Z,{sx:{alignItems:"center",alignSelf:"center",display:"flex",flexShrink:0},children:(0,p.jsx)(Ly,{instantApp:t,releaseChannel:l,deviceModels:Z.deviceModels,selectedAppVersionId:I,onVrContentPage:d})})]}),s&&k.list.length>0?(0,p.jsx)(Ay,{conflicts:k.list}):null]})})}));Fy.displayName="DeveloperPortalReleaseChannelRow";const Oy=e=>{let{instantApp:t,releaseChannels:n,fetched:r,editable:l=!1,publishedApps:s,onVrContentPage:d=!1,conflictIndex:c,instantAppTitlesById:u}=e;const h=(0,a.useMemo)((()=>(0,o.sortBy)(n,(e=>e.name.trim().toLowerCase()))),[n]),C=(0,a.useMemo)((()=>(0,o.orderBy)(s,[e=>{var t,n;return null!==(t=null!==(n=e.versionCode)&&void 0!==n?n:e.latestVersion)&&void 0!==t?t:0}],["desc"])),[s]);return r?0===h.length?(0,p.jsx)(i.Z,{paddingY:1,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"No release channels yet"})}):(0,p.jsx)(m.Z,{spacing:1.5,children:h.map((e=>(0,p.jsx)(Fy,{editable:l,onVrContentPage:d,instantApp:t,peerReleaseChannels:h,publishedApps:C,releaseChannel:e,conflictIndex:c,instantAppTitlesById:u},e.id)))}):(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(g.Z,{variant:"rounded",height:72}),(0,p.jsx)(g.Z,{variant:"rounded",height:72})]})};Oy.displayName="DeveloperPortalReleaseChannels";const _y=()=>(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"developers/instant-apps/:instantAppId/release-channels/:releaseChannelId",getDocumentUpdate:e=>{let{response:t}=e;const n=null===t||void 0===t?void 0:t.releaseChannel;if(null!==n&&void 0!==n&&n.id)return{collection:S.F.ReleaseChannels,id:n.id,set:n}}})),[])),zy=e=>!!e&&Object.values(e).some((e=>(0,o.isEmpty)(e.name.trim()))),By=(e,t,n)=>{const i=[];for(const o of e){const e=null===t||void 0===t?void 0:t[o.id];if(!e)continue;const a=(0,ly.f6)(e,o,n);a&&i.push({releaseChannel:o,patchPayload:a})}return i},Wy=async e=>{let{instantAppId:t,patches:n,patchReleaseChannel:i}=e;const o=[];for(const{releaseChannel:a,patchPayload:r}of n){try{await i({params:{instantAppId:t,releaseChannelId:a.id},data:r,errorMessage:"Could not update release channel"})}catch{return{committedReleaseChannelIds:o}}o.push(a.id)}return{committedReleaseChannelIds:o}},Vy=e=>{const{instantAppId:t,releaseChannelId:n,original:i,updated:o,publishedApps:a,managedApps:r}=e,l={instantAppId:t,releaseChannelId:n};if(i.name!==o.name&&(l.previousName=i.name,l.newName=o.name),i.targetAppId!==o.targetAppId){var s,d;const e=My({targetRef:{id:i.targetAppId}},null!==(s=r.find((e=>e.id===i.targetAppId)))&&void 0!==s?s:a.find((e=>e.id===i.targetAppId))),t=My({targetRef:{id:o.targetAppId}},null!==(d=r.find((e=>e.id===o.targetAppId)))&&void 0!==d?d:a.find((e=>e.id===o.targetAppId)));e&&(l.previousVersion=e),t&&(l.newVersion=t)}return(0,sy.x)(i.deviceModels,o.deviceModels)||(l.previousTargetedModels=i.deviceModels.map(Vr.ao),l.newTargetedModels=o.deviceModels.map(Vr.ao)),l},Gy=(e,t,n)=>{var i,o,a;const r=null===n||void 0===n||null===(i=n[e])||void 0===i||null===(o=i.name)||void 0===o?void 0:o.trim();if(r)return r;const l=t.find((t=>t.id===e));return(null===l||void 0===l||null===(a=l.name)||void 0===a?void 0:a.trim())||e},Hy=(e,t,n)=>{var i;return null!==(i=n.find((t=>t.id===e)))&&void 0!==i?i:t.find((t=>t.id===e))},qy=(e,t,n,i)=>{var o,a;if(e.targetAppId===t.targetAppId)return;const r=Hy(e.targetAppId,n,i),l=Hy(t.targetAppId,n,i);return{previousVersion:Dy({targetRef:{id:e.targetAppId}},r),previousVersionLabel:(null===r||void 0===r||null===(o=r.versionLabel)||void 0===o?void 0:o.trim())||void 0,newVersion:Dy({targetRef:{id:t.targetAppId}},l),newVersionLabel:(null===l||void 0===l||null===(a=l.versionLabel)||void 0===a?void 0:a.trim())||void 0}},Yy=(e,t)=>{if(!(0,sy.x)(e.deviceModels,t.deviceModels))return{addedModelNames:t.deviceModels.filter((t=>!e.deviceModels.includes(t))).map(Vr.ao),removedModelNames:e.deviceModels.filter((e=>!t.deviceModels.includes(e))).map(Vr.ao)}},Ky=(e,t)=>{var n;if(0===t.length)return;const i=null!==(n=e.deviceModelChange)&&void 0!==n?n:{addedModelNames:[],removedModelNames:[]};for(const o of t)i.removedModelNames.includes(o)||i.removedModelNames.push(o);e.deviceModelChange=i},Xy=(e,t,n,i,a,r,l)=>{const s={};for(const{releaseChannel:o}of n){const n=null===a||void 0===a?void 0:a[o.id],c=null===i||void 0===i?void 0:i[o.id];if(!n||!c)continue;const u=qy(n,c,r,l),p=Yy(n,c);(u||p)&&(s[o.id]={releaseChannelId:o.id,channelName:c.name,versionChange:u,deviceModelChange:p});const h=cy({instantApp:e,releaseChannelId:o.id,effectiveDeviceModels:c.deviceModels,originalDeviceModels:n.deviceModels});for(const a of uy({instantApp:e,existingReleaseChannels:t,editingByReleaseChannelId:i,releaseChannelId:o.id,selectedDeviceModels:h})){var d;const e=a.existingChannelId,n=null!==(d=s[e])&&void 0!==d?d:{releaseChannelId:e,channelName:Gy(e,t,i)};Ky(n,[(0,Vr.ao)(a.deviceModel)]),s[e]=n}}return(0,o.sortBy)(Object.values(s),"channelName")},Qy=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{publishedApps:i,managedApps:o=[],onPublishUpdateConfirmationRequested:r,onPublishUpdateComplete:l,notifyOnSuccess:s=!0}=n,d=(0,u.I0)(),{notify:c}=(0,ie.o)(),{requestAsync:p}=_y(),h=(0,u.v9)((e=>e.developerPortal.updateOpPending)),m=null===e||void 0===e?void 0:e.id;(0,a.useEffect)((()=>
3{if(m)return d(ly.I.startedEditing({instantAppId:m})),()=>{d(ly.I.stoppedEditing())}}),[d,m]);const g=(0,u.v9)((e=>{const{developerPortal:t}=e;if(m&&t.editingInstantAppId===m)return t.editingReleaseChannels})),v=(0,u.v9)((e=>{const{developerPortal:t}=e;if(m&&t.editingInstantAppId===m)return t.originalReleaseChannels})),C=!!e&&iy(e),x=!!e&&!oy(e)&&t.length>0,{patches:f,confirmationChanges:y}=(0,a.useMemo)((()=>{if(!e)return{patches:[],confirmationChanges:[]};const n=By(t,g,e);return i&&C?{patches:n,confirmationChanges:Xy(e,t,n,g,v,i,o)}:{patches:n,confirmationChanges:[]}}),[g,e,C,o,v,i,t]),j=x&&f.length>0,Z=j&&!zy(g),w=(0,a.useCallback)((()=>{j&&!h&&d(ly.I.allChangesCleared())}),[d,j,h]),E=(0,a.useCallback)((async()=>{if(!e||!Z||h)return!0;d(ly.I.releaseChannelsUpdateStarted());try{const t={};if(i)for(const{releaseChannel:a}of f){const n=null===v||void 0===v?void 0:v[a.id],r=null===g||void 0===g?void 0:g[a.id];n&&r&&(t[a.id]=Vy({instantAppId:e.id,releaseChannelId:a.id,original:n,updated:r,publishedApps:i,managedApps:o}))}const{committedReleaseChannelIds:n}=await Wy({instantAppId:e.id,patches:f,patchReleaseChannel:p});if(0===n.length)return!1;if(i)for(const e of n){const n=t[e];n&&(0,b.ec)("Developer Portal Release Channel Updated",n)}return d(ly.I.releaseChannelChangesCommitted({instantAppId:e.id,releaseChannelIds:n})),s&&c({severity:"success",message:"Release channels updated",autoHide:!0}),null===l||void 0===l||l(),n.length===f.length}finally{d(ly.I.releaseChannelsUpdateFinished())}}),[d,g,Z,e,c,s,l,v,i,o,f,p,h]),S=(0,a.useCallback)((async()=>{Z&&!h&&(y.length>0&&r?r():await E())}),[Z,r,y.length,h,E]),D=(0,a.useMemo)((()=>{if(x)return{hasPendingChanges:Z,hasStagedEdits:j,stagedEditCount:f.length,pending:h,onClick:S,onUndoClick:w}}),[x,Z,j,S,w,f.length,h]);return{canEditReleaseChannels:x,releaseChannelUpdate:D,publishUpdateChannelChanges:y,updateReleaseChannels:E}};var Jy=n(12679);const $y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:t=!0}=e,{organizationId:n}=(0,w.P)(),i=n===(0,Be.Hh)(),[r,l]=(0,a.useState)([]),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null);return(0,a.useEffect)((()=>{if(!t)return l([]),d(!0),void u(null);if(!n)return l([]),d(!1),void u(null);u(null);let e=!1;const a=(0,Os.N$)(S.F.ReleaseChannels),r=(0,Os.qb)(S.F.Organizations,n),s=i?(0,td.IO)(a,(0,td.ar)("organizationRef","==",r)):(0,td.IO)(a,(0,td.ar)("developerOrganizationRef","==",r)),c=(0,td.cf)(s,{includeMetadataChanges:!0},{next:t=>{e=!0;const n=(0,o.compact)((0,o.map)(t.docs,(e=>(0,Jy.Y)(S.F.ReleaseChannels,e))));l(n),t.metadata.fromCache||d(!0),u(null)},error:t=>{u(t),e||l([]),(Os.lX.currentUser||"permission-denied"!==t.code&&"aborted"!==t.code)&&(0,Si.yR)(t,{name:"Firestore query subscription error: ".concat(S.F.ReleaseChannels),contexts:{subscription:{collection:S.F.ReleaseChannels,organizationId:n,scope:i?"organizationRef":"developerOrganizationRef"}}})}});return()=>{c()}}),[t,n,i]),(0,a.useMemo)((()=>({documents:r,fetched:s,subscriptionError:c})),[r,s,c])},ej=e=>{const t=null===e||void 0===e?void 0:e.id,n=(0,E.h)(S.F.Apps,{filter:(0,a.useCallback)((e=>{var n;return!!t&&(null===(n=e.instantAppRef)||void 0===n?void 0:n.id)===t}),[t])});return(0,a.useMemo)((()=>({documents:n.documents,documentsById:n.documentsById,fetched:n.fetched})),[n.documents,n.documentsById,n.fetched])},tj=(0,a.memo)((e=>{let{count:t,analyticsPending:n,title:a,tooltipTitle:r}=e;return(0,p.jsxs)(m.Z,{flexShrink:0,children:[(0,p.jsx)(i.Z,{height:38,display:"flex",alignItems:"center",children:n?(0,p.jsx)(Zi.Z,{size:24}):(0,o.isNumber)(t)?(0,p.jsx)(ee.Z,{placement:"top-start",title:r,children:(0,p.jsx)(v.Z,{variant:"h4",children:t})}):(0,p.jsx)(v.Z,{variant:"h4",children:"\u2014"})}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.disabled",children:(0,ul.n8)(null!==t&&void 0!==t?t:0,a,"S")})]})}));tj.displayName="DeveloperPortalAnalyticsKpi";const nj=(0,a.memo)((function(e){let{canSubmit:t,submitting:n,onClick:o}=e;const a=(0,p.jsx)(Un.U,{disabled:!t,submitting:n,size:"small",type:"button",onClick:o,children:"Submit"});return t?a:(0,p.jsx)(ee.Z,{enterDelay:280,enterNextDelay:280,title:(0,p.jsx)(v.Z,{variant:"body2",component:"div",sx:{maxWidth:280},children:"This app is not live on the Marketplace yet. To publish, add release channels and submit for review."}
3),children:(0,p.jsx)(i.Z,{component:"span",sx:{display:"inline-flex"},children:a})})}));nj.displayName="DeveloperPortalAppSubmitButton";const ij=(0,a.memo)((function(e){let{color:t,isOutline:n=!1}=e;return(0,p.jsx)(i.Z,{component:"span",sx:{width:8,height:8,borderRadius:"50%",flexShrink:0,...n?{borderColor:t,borderStyle:"solid",borderWidth:1}:{bgcolor:t}}})}));ij.displayName="MarketplaceStatusDot";const oj=(0,a.memo)((function(e){let{fontColor:t,dotColor:n="text.secondary",text:i,dotOutline:o=!1}=e;const a=null!==t&&void 0!==t?t:"text.secondary";return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,sx:{width:"fit-content"},children:[(0,p.jsx)(ij,{color:n,isOutline:o}),(0,p.jsx)(v.Z,{component:"span",variant:"overline",fontWeight:600,color:a,children:i})]})}));oj.displayName="MarketplaceStatusRow";const aj=(0,a.memo)((function(e){let{title:t,children:n}=e;return(0,p.jsx)(ee.Z,{placement:"bottom-start",enterDelay:280,enterNextDelay:280,title:t,children:(0,p.jsx)(i.Z,{component:"span",sx:{display:"inline-flex",width:"fit-content"},children:n})})}));aj.displayName="MarketplaceStatusTooltip";const rj=(0,a.memo)((function(e){let{instantApp:t,marketplaceListingTo:n}=e;switch(t.phase){case Jb.LIVE:return(0,p.jsx)(aj,{title:"This app is published on marketplace and available for customers to download. Click to view it.",children:(0,p.jsx)(Kn.Z,{component:Xc,to:n,underline:"hover",sx:{color:"success.dark"},children:(0,p.jsx)(oj,{dotColor:"success.main",fontColor:"success.dark",text:"LIVE"})})});case Jb.SUBMISSION_PENDING:return(0,p.jsx)(aj,{title:"This app is not live on the Marketplace yet.\nOur team will review your submission within\n1-2 business days. If approved, the app will\nbe published automatically.",children:(0,p.jsx)(oj,{text:"SUBMISSION PENDING"})});case Jb.DRAFT:default:return(0,p.jsx)(aj,{title:"This app is not live on the Marketplace yet. To publish, add release channels and submit for review.",children:(0,p.jsx)(oj,{dotOutline:!0,text:"DRAFT"})})}}));rj.displayName="DeveloperPortalInstantAppMarketplaceStatus";const lj=(0,a.memo)((e=>{let{instantApp:t,marketplaceListingTo:n,releaseChannelUpdate:o,canSubmit:r=!1}=e;const{analytics:l,pending:s}=Ob(t.id),{request:d,pending:c}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"developers/instant-apps/:instantAppId/submit",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.InstantApps,id:t.instantApp.id,update:t.instantApp}}})),[])),{request:u,pending:h}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"developers/instant-apps/:instantAppId/cancel-submission",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.InstantApps,id:t.instantApp.id,update:t.instantApp}}})),[])),{request:g,pending:x}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"developers/instant-apps/:instantAppId/approve",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.InstantApps,id:t.instantApp.id,update:t.instantApp}}})),[])),f=(0,X.u7)(),b=(0,a.useCallback)((()=>{d({params:{instantAppId:t.id},successMessage:"Submitted for review",successAutoHide:!0,errorMessage:"Failed to submit app for review"})}),[d,t.id]),y=(0,a.useCallback)((()=>{u({params:{instantAppId:t.id},successMessage:"Submission canceled",successAutoHide:!0,errorMessage:"Failed to cancel submission"})}),[u,t.id]),j=(0,a.useCallback)((()=>{g({params:{instantAppId:t.id},successMessage:"App approved",successAutoHide:!0,errorMessage:"Failed to approve app"})}),[g,t.id]),Z=iy(t),w=t.phase===Jb.DRAFT,E=t.phase===Jb.SUBMISSION_PENDING;return(0,p.jsxs)(m.Z,{spacing:2,width:1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",flexWrap:"nowrap",gap:2,justifyContent:"space-between",width:1,children:[(0,p.jsx)(v.Z,{variant:"h5",sx:{flexShrink:0,whiteSpace:"nowrap"},children:t.title}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",flexShrink:0,spacing:2,children:[(0,p.jsx)(rj,{instantApp:t,marketplaceListingTo:n}),(Z||w)&&null!==o&&void 0!==o&&o.hasStagedEdits?(0,p.jsx)(C.Z,{disabled:o.pending,size:"small",type:"button",onClick:o.onUndoClick,children:"Undo"}):null,Z?(0,p.jsx)(C.Z,{disabled:(null===o||void 0===o?void 0:o.pending)||!(null!==o&&void 0!==o&&o.hasPendingChanges),variant:"contained",size:"small",type:"button",onClick:()=>o&&void o.onClick(),children:null!==o&&void 0!==o&&o.pending?"Saving\u2026":"Publish update"}):null,w&&null!==o&&void 0!==o&&o.hasStagedEdits?(0,p.jsx)(C.Z,{disabled:o.pending||!o.hasPendingChanges,variant:"contained",size:"small",type:"button",onClick:()=>{o.onClick()},children:o.pending?"Saving\u2026":"Save"}):null,!w||null!==o&&void 0!==o&&o.hasStagedEdits?null:(0,p.jsx)(nj,{canSubmit:r,submitting:c,onClick:b}),E?(0,p.jsx)(Un.U,{submitting:h,icon:(0,p.jsx)(J.Z,{}),size:"small",type:"button",variant:"outlined",onClick:y,children:"Cancel"}):null]})]}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",flexWrap:"wrap",gap:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",columnGap:4,flexWrap:"nowrap",children:[(0,p.jsx)(tj,{count:null===l||void 0===l?void 0:l.sharedOrganizationsCount,analyticsPending:s,title:"ORG",tooltipTitle:"Organizations with this Instant App"}),(0,p.jsx)(tj,{count:null===l||void 0===l?void 0:l.sharedDevicesCount,analyticsPending:s,title:"DEVICE",tooltipTitle:"Devices with this Instant App"})]}),f&&E?(0,p.jsx)(ee.Z,{title:"Make this app live on the Marketplace. It immediately becomes available to everyone, and users can add it to their organization. *Super Admins only.",placement:"bottom-start",children:(0,p.jsx)(i.Z,{children:(0,p.jsx)(Un.U,{submitting:x,size:"small",type:"button",onClick:j,children:"Approve"})})}):null]})]})}));lj.displayName="DeveloperPortalAppHeader";var sj=n(79834);const dj=()=>{const{buildOrganizationPath:e}=(0,w.P)(),t=(0,Le.d9)(),{instantApps:n,fetched:i}=(0,Ue.J)(),{instantAppId:o}=(0,l.UO)(),r=(0,l.k6)(),s=(0,a.useCallback)((t=>{r.push(e((e=>e.connect.developerPortal.instantApp),{instantAppId:t}))}),[e,r]);return t?(0,p.jsx)(ii.Z,{dense:!0,subheader:(0,p.jsx)(sj.Z,{disableSticky:!0,component:"div",children:"Your Apps"}),children:i&&0===n.length?(0,p.jsx)(fl.ZP,{children:(0,p.jsx)(Rs.Z,{secondary:"No instant apps yet",secondaryTypographyProps:{variant:"body2"}})}):n.map((e=>(0,p.jsx)(oi.Z,{selected:e.id===o,onClick:()=>s(e.id),children:(0,p.jsx)(Rs.Z,{primary:e.title})},e.id)))}):null};dj.displayName="DeveloperPortalSidebar";const cj={aspectRatio:"16/9",flexShrink:0,height:170,objectFit:"cover",pointerEvents:"none",width:"auto"},uj=(0,a.memo)((e=>
3{let{control:t,pending:n,onPackageChange:i}=e;const{appCollections:{managedApps:r}}=(0,Xn.w)(),l=(0,a.useMemo)((()=>(0,o.map)((0,o.keys)(r),(e=>{var t,n,i;const a=null!==(t=r[e])&&void 0!==t?t:[],l=(0,o.head)(a);return{value:e,label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,sx:{flexGrow:1,minWidth:0,width:1},children:[(0,p.jsx)(re.Z,{src:null===l||void 0===l?void 0:l.iconUrl,alt:null===l||void 0===l?void 0:l.title,variant:"rounded"}),(0,p.jsxs)(m.Z,{sx:{flexGrow:1,minWidth:0},children:[(0,p.jsx)(Ui.G,{title:null!==(n=null===l||void 0===l?void 0:l.title)&&void 0!==n?n:e,variant:"body1"}),(0,p.jsx)(Ui.G,{title:e,variant:"body2"})]})]}),selectLabel:null!==(i=null===l||void 0===l?void 0:l.title)&&void 0!==i?i:e}}))),[r]);return(0,p.jsx)(fg.Qr,{control:t,name:"packageName",rules:{required:!0},render:e=>{let{field:t}=e;return(0,p.jsx)(Qi,{label:"App",value:t.value,options:l,onChange:e=>{t.onChange(e),i(e)},disabled:n,placeholder:"Select an app...",constrainItemWidth:!0,helperText:0===l.length?"No apps uploaded yet. Upload one via VR Content first.":void 0})}})}));uj.displayName="DeveloperPortalAddReleaseChannelDialogAppField";const pj=(0,o.map)((0,o.filter)((0,o.values)(bi.Q6),(e=>!bi.uD.has(e))),(e=>({id:e,title:(0,Vr.ao)(e)}))),hj=(0,a.memo)((e=>{let{control:t,pending:n,instantApp:i,existingReleaseChannels:r}=e;const l=(0,fg.qo)({control:t,name:"deviceModels"}),s=(0,a.useMemo)((()=>(e=>{const{deviceModelToReleaseChannelId:t,existingReleaseChannels:n,selectedDeviceModels:i,omitReleaseChannelId:o}=e,a=t;if(!a)return[];const r="string"===typeof o?o.trim():"",l=new Set,s=[];for(const c of i){var d;if(!c||l.has(c))continue;l.add(c);const e=a[c],t="string"===typeof e?e.trim():"";if(!t)continue;if(r&&t===r)continue;const i=n.find((e=>e.id===t));s.push({deviceModel:c,existingChannelId:t,existingChannelName:null!==i&&void 0!==i&&null!==(d=i.name)&&void 0!==d&&d.trim()?i.name:t})}return s})({deviceModelToReleaseChannelId:i.deviceModelToReleaseChannelId,existingReleaseChannels:r,selectedDeviceModels:l})),[i.deviceModelToReleaseChannelId,r,l]),d=(0,a.useRef)(s);n||(d.current=s);const c=n?d.current:s,u=(0,a.useMemo)((()=>(0,o.map)(c,(e=>e.deviceModel))),[c]),h=(0,a.useMemo)((()=>{const e=(0,o.groupBy)(c,"existingChannelId");return(0,o.map)(e,(e=>{const t=(0,o.head)(e);return{channelId:t.existingChannelId,channelName:t.existingChannelName,deviceModels:(0,o.map)(e,(e=>e.deviceModel)).sort(ze.bL)}}))}),[c]);return(0,p.jsxs)(m.Z,{spacing:2.5,children:[(0,p.jsx)(fg.Qr,{control:t,name:"deviceModels",rules:{validate:e=>e.length>0},render:e=>{let{field:t}=e;return(0,p.jsx)(pl,{label:"Device models",values:t.value,options:pj,onChange:e=>t.onChange(e),shouldShowIndividualChips:!0,disabled:n,warningValues:u})}}),h.length>0&&(0,p.jsx)(Iy.Z,{severity:"warning",children:(0,p.jsx)(m.Z,{spacing:.5,children:(0,o.map)(h,(e=>(0,p.jsxs)(v.Z,{variant:"body2",children:[(0,ul.Yv)((0,o.map)(e.deviceModels,Vr.ao))," ","devices will now receive the app version from this release channel instead of ",e.channelName]},e.channelId)))})})]})}));hj.displayName="DeveloperPortalAddReleaseChannelDialogDeviceModelsField";const mj=(0,a.memo)((e=>{let{control:t,pending:n,instantAppId:i,conflictIndex:r,instantAppTitlesById:l}=e;const s=(0,fg.qo)({control:t,name:"packageName"}),{appCollections:{managedApps:d}}=(0,Xn.w)(),c=(0,a.useMemo)((()=>{var e;return s&&null!==(e=d[s])&&void 0!==e?e:[]}),[d,s]),u=(0,a.useMemo)((()=>(0,o.map)(c,(e=>{const t=yy(e,i,r,l);return{value:e.id,label:(0,p.jsx)(sc,{app:e,hideReleaseChannel:!0,disableTooltip:!!t}),...t&&{disabled:!0,tooltip:jy(t.conflictingTitle)}}}))),[c,i,r,l]);return s?(0,p.jsx)(fg.Qr,{control:t,name:"appId",rules:{required:!0,validate:e=>{const t=c.find((t=>t.id===e));return!t||!by(t,i,r)}},render:e=>{let{field:t}=e;return(0,p.jsx)(Qi,{label:"Version",value:t.value,options:u,onChange:t.onChange,disabled:n||0===u.length,placeholder:"Select a version...",constrainItemWidth:!0,helperText:0===u.length?"No versions uploaded for this package. Upload one via VR Content first.":void 0})}}):null}));mj.displayName="DeveloperPortalAddReleaseChannelDialogVersionField";const gj={name:"",packageName:"",appId:"",deviceModels:[]},vj=(0,a.memo)((e=>{var t;let{open:n,onClose:i,instantApp:r,existingReleaseChannels:l,releaseChannelsFetched:s,conflictIndex:d,instantAppTitlesById:c}=e;const{appCollections:{managedApps:u}}=(0,Xn.w)(),{requestAsync:h,pending:g}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"developers/instant-apps/:instantAppId/release-channels"})),[])),{register:x,control:f,handleSubmit:y,setValue:j,reset:Z,formState:{errors:w,isValid:E}}=(0,fg.cI)({defaultValues:gj,mode:"onChange"}),S=(0,a.useRef)(l),D=(0,a.useRef)(u),M=(0,a.useRef)(d);S.current=l,D.current=u,M.current=d,(0,a.useEffect)((()=>{var e,t,i,a;if(!n)return;const l=null!==(e=null===(t=(0,o.head)(S.current))||void 0===t?void 0:t.packageName)&&void 0!==e?e:"",s=null!==(i=(0,o.head)((0,o.keys)(D.current)))&&void 0!==i?i:"",d=l||s,c=d&&null!==(a=D.current[d])&&void 0!==a?a:[];Z({...gj,packageName:d,appId:wy(c,r.id,M.current)})}),[n,Z,r.id]);const k=(0,fg.qo)({control:f,name:"packageName"}),I=(0,fg.qo)({control:f,name:"appId"});(0,a.useEffect)((()=>{var e;if(!n||!I)return;const t=null!==(e=D.current[k])&&void 0!==e?e:[],i=t.find((e=>e.id===I));i&&by(i,r.id,d)&&j("appId",wy(t,r.id,d),{shouldValidate:!0})}),[n,I,k,d,r.id,j]);const A=(0,a.useCallback)((()=>{g||i()}),[i,g]),R=(0,a.useCallback)((e=>{var t;const n=null!==(t=D.current[e])&&void 0!==t?t:[];j("appId",wy(n,r.id,M.current),{shouldValidate:!0})}),[j,r.id]),T=y((async e=>{try{const t=await h({params:{instantAppId:r.id},data:{name:e.name.trim(),packageName:e.packageName,appId:e.appId,deviceModels:e.deviceModels},successMessage:"Release channel created",errorMessage:"Error creating release channel"});(0,b.ec)("Developer Portal Release Channel Created",{instantAppId:r.id,releaseChannelId:t.releaseChannel.i
3d,deviceModelCount:e.deviceModels.length,conflictCount:t.deviceModelConflicts.length}),i()}catch{}}));return(0,p.jsx)(Ro.Q,{open:n,onClose:A,title:"Add Release Channel",maxWidth:"sm",leftActions:(0,p.jsx)(C.Z,{onClick:A,disabled:g,children:"Cancel"}),rightActions:(0,p.jsx)(Un.U,{onClick:T,submitting:g,disabled:!E||!s,children:"Add channel"}),children:(0,p.jsx)("form",{onSubmit:T,noValidate:!0,children:(0,p.jsxs)(m.Z,{spacing:2.5,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Create a new release channel for this app. Device models already assigned to an existing channel will be moved to this one."}),(0,p.jsx)(Ln.Z,{label:"Name",placeholder:"e.g. Production Quest",fullWidth:!0,disabled:g,error:!!w.name,helperText:null===(t=w.name)||void 0===t?void 0:t.message,inputProps:{maxLength:100},...x("name",{required:"Name is required",validate:e=>e.trim().length>0||"Name is required",maxLength:{value:100,message:"Name must be ".concat(100," characters or fewer")}})}),(0,p.jsx)(uj,{control:f,pending:g,onPackageChange:R}),(0,p.jsx)(mj,{control:f,pending:g,instantAppId:r.id,conflictIndex:d,instantAppTitlesById:c}),(0,p.jsx)(hj,{control:f,pending:g,instantApp:r,existingReleaseChannels:l})]})})})}));vj.displayName="DeveloperPortalAddReleaseChannelDialog";const Cj=[{lead:"To update an app version:",body:"Edit the version on the release channel."},{lead:"To add a device model that's compatible with an existing version:",body:"Add it to that release channel's device models."},{lead:"To add a device model that needs a different app version:",body:"Create a new release channel with the right version and assign the model to it."},{lead:"To switch to a different app (new package name) for existing device models:",body:"Create a new release channel with the new app and choose the device models. This swaps their instant app. If the old release channel has no remaining device models, delete it."}],xj=e=>{let{instantApp:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),{appCollections:{managedApps:r}}=(0,Xn.w)(),{documents:l,fetched:s}=$y(),{analytics:d}=Ob(t.id),[c,u]=(0,a.useState)(!1),[h,g]=(0,a.useState)(!1),x=oy(t),f=(0,a.useCallback)((()=>{u(!0)}),[]),b=(0,a.useCallback)((()=>{u(!1)}),[]),y=(0,a.useCallback)((()=>{g(!0)}),[]),j=(0,a.useCallback)((()=>{g(!1)}),[]),Z=s,{documents:D,fetched:M}=ej(t),k=(0,a.useMemo)((()=>(0,o.flatMap)(r)),[r]),I=(0,a.useMemo)((()=>(0,o.filter)(l,(e=>{var n;return(null===(n=e.instantAppRef)||void 0===n?void 0:n.id)===t.id&&!!e.targetRef}))),[l,t.id]),A=Z&&M,{canEditReleaseChannels:R,releaseChannelUpdate:T,publishUpdateChannelChanges:P,updateReleaseChannels:L}=Qy(t,I,{publishedApps:D,managedApps:k,onPublishUpdateConfirmationRequested:y,onPublishUpdateComplete:j}),{conflictIndex:N,instantAppTitlesById:U}=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=(0,a.useCallback)((e=>!!e.instantAppRef),[]),{documents:n}=(0,E.h)(S.F.Apps,{enabled:e,filter:t}),{documents:i}=(0,E.jV)(S.F.InstantApps,{enabled:e}),o=(0,a.useMemo)((()=>fy(n)),[n]),r=(0,a.useMemo)((()=>Zy(i)),[i]);return{conflictIndex:o,instantAppTitlesById:r}}(R),F=(0,a.useCallback)((()=>{null!==T&&void 0!==T&&T.pending||g(!1)}),[null===T||void 0===T?void 0:T.pending]),O=(0,a.useCallback)((async()=>{await L()}),[L]),_=(0,a.useMemo)((()=>[{navCategory:!0,title:"Connect"},{title:"Developer Portal",path:n((e=>e.connect.developerPortal))},{title:t.title}]),[n,t.title]),z=n((e=>e.marketplace.instantApps.instantApp),{instantAppId:t.id});return(0,p.jsxs)(Mn.C,{noBottomPadding:!0,toolbarBreadcrumbs:_,children:[(0,p.jsx)(vd,{sidebarWidths:{xs:250,md:300},sidebarContent:(0,p.jsx)(dj,{}),children:(0,p.jsx)(m.Z,{padding:3,width:1,children:(0,p.jsxs)(i.Z,{sx:{alignItems:"start",columnGap:3,display:"grid",gridTemplateColumns:"auto minmax(0, 1fr)",gridTemplateRows:"auto auto",rowGap:3,width:1},children:[(0,p.jsx)(i.Z,{sx:{gridColumn:1,gridRow:1},children:t.iconUrl?(0,p.jsx)(Nb.Z,{alt:t.title,component:"img",image:t.iconUrl,sx:cj}):(0,p.jsx)(i.Z,{sx:{...cj,alignItems:"center",bgcolor:"grey.200",display:"flex",justifyContent:"center",pointerEvents:"auto"},children:(0,p.jsx)(v.Z,{component:"span",variant:"h3",children:t.title.charAt(0)})})}),(0,p.jsx)(i.Z,{sx:{gridColumn:2,gridRow:1,minWidth:0,paddingTop:2,width:1},children:(0,p.jsx)(lj,{instantApp:t,marketplaceListingTo:z,releaseChannelUpdate:T,canSubmit:I.length>0})}),(0,p.jsxs)(m.Z,{spacing:1.5,sx:{gridColumn:"1 / -1",gridRow:2,minWidth:0,width:1},children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,flexWrap:"nowrap",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,flexWrap:"nowrap",flexShrink:0,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:"Release channels"}),(0,p.jsx)(ee.Z,{enterDelay:280,enterNextDelay:280,title:(0,p.jsx)(m.Z,{spacing:1.5,sx:{maxWidth:360},children:Cj.map((e=>(0,p.jsxs)(v.Z,{variant:"body2",component:"div",children:[(0,p.jsx)(i.Z,{component:"span",sx:{fontWeight:600},children:e.lead}),(0,p.jsx)("br",{}),e.body]},e.lead)))}),children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{color:"text.secondary",userSelect:"none",width:"fit-content"},children:[(0,p.jsx)(cc.Z,{sx:{fontSize:18}}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{whiteSpace:"nowrap"},children:"How should I push updates?"})]})})]}),x?null:(0,p.jsx)(C.Z,{size:"small",variant:"text",color:"primary",startIcon:(0,p.jsx)(Wn.Z,{}),onClick:f,sx:{flexShrink:0,whiteSpace:"nowrap"},children:"Add release channel"})]}),(0,p.jsx)(Oy,{editable:R,fetched:A,instantApp:t,publishedApps:D,releaseChannels:I,conflictIndex:N,instantAppTitlesById:U})]})]})})}
3),(0,p.jsx)(vj,{open:c,onClose:b,instantApp:t,existingReleaseChannels:I,releaseChannelsFetched:s,conflictIndex:N,instantAppTitlesById:U}),d?(0,p.jsx)(Kb,{open:h,onClose:F,instantAppTitle:t.title,organizationCount:d.sharedOrganizationsCount,channelChanges:P,onSubmit:O}):null]})};xj.displayName="DeveloperPortalAppDetailPage";const fj=()=>{const{buildOrganizationPath:e}=(0,w.P)(),{instantApps:t,fetched:n}=(0,Ue.J)();if(!n)return null;const o=t[0];return o?(0,p.jsx)(l.l_,{to:e((e=>e.connect.developerPortal.instantApp),{instantAppId:o.id})}):(0,p.jsx)(Mn.C,{noBottomPadding:!0,toolbarBreadcrumbs:[{navCategory:!0,title:"Connect"},{title:"Developer Portal"}],children:(0,p.jsx)(vd,{sidebarWidths:{xs:250,md:300},sidebarContent:(0,p.jsx)(dj,{}),children:(0,p.jsx)(i.Z,{"data-testid":"developer-portal-index"})})})};fj.displayName="DeveloperPortalPage";const bj=e=>{let{instantApp:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),r=(0,Le.I7)(),{analytics:l,pending:s}=Ob(t.id),d=n((e=>e.marketplace.instantApps.instantApp),{instantAppId:t.id}),c=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{c.current&&gm()(c.current,{clamp:2})}),[]);const u=(0,o.join)((0,o.sortBy)(t.categories,o.identity),", ");return(0,p.jsxs)(m.Z,{direction:"row",sx:{backgroundColor:"grey.50"},minWidth:740,width:1,height:170,children:[(0,p.jsx)(Xc,{to:d,children:(0,p.jsx)(Nb.Z,{sx:cj,component:"img",image:t.iconUrl,alt:t.title})}),(0,p.jsx)(i.Z,{paddingX:3,paddingY:1.8,width:1,children:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",width:1,paddingBottom:1,alignItems:"baseline",spacing:1,children:[(0,p.jsx)(m.Z,{flexShrink:0,flexGrow:2,textAlign:"left",children:(0,p.jsx)(Ui.G,{variant:"h5",title:t.title})}),(0,p.jsx)(m.Z,{flexShrink:1,flexGrow:1,textAlign:"right",children:(0,p.jsx)(Ui.G,{variant:"caption",title:u})})]}),(0,p.jsx)(i.Z,{paddingBottom:1,children:(0,p.jsx)(v.Z,{ref:c,variant:"body2",children:t.description})}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",width:1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:10,children:[(0,p.jsx)(yj,{count:null===l||void 0===l?void 0:l.sharedOrganizationsCount,countPending:s,title:"ORG",tooltip:"Organizations with this App"}),(0,p.jsx)(yj,{count:null===l||void 0===l?void 0:l.sharedDevicesCount,countPending:s,title:"DEVICE",tooltip:"Devices with this App"})]}),(0,p.jsx)(Kn.Z,{component:Xc,to:d,children:"View on ".concat(r)})]})]})})]})},yj=e=>{let{count:t,countPending:n,title:i,tooltip:a}=e;return(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(m.Z,{height:38,justifyContent:"center",children:n?(0,p.jsx)(Zi.Z,{size:24}):(0,o.isNumber)(t)?(0,p.jsx)(ee.Z,{placement:"top-start",title:a,children:(0,p.jsx)(v.Z,{variant:"h4",children:t})}):(0,p.jsx)(v.Z,{variant:"h4",children:"\u2014"})}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.disabled",children:(0,ul.n8)(t||0,i,"S")})]})};bj.displayName="DeveloperPortalInstantAppAnalyticsCard",yj.displayName="AnalyticsData";const jj=()=>{const{instantApps:e}=(0,Ue.J)();return(0,p.jsx)(m.Z,{spacing:2.5,width:1,children:(0,o.map)(e,(e=>(0,p.jsx)(bj,{instantApp:e},e.id)))})},Zj=()=>{const{buildOrganizationPath:e}=(0,w.P)(),t=(0,a.useMemo)((()=>[{path:e((e=>e.connect.developerPortal)),component:(0,p.jsx)(jj,{}),label:"Your Apps"}]),[e]);return(0,p.jsx)(Mn.C,{noBottomPadding:!0,toolbarBreadcrumbs:[{navCategory:!0,title:"Connect"},{title:"Developer Portal"}],children:(0,p.jsx)(vd,{sidebarWidths:{xs:250,md:300},sidebarContent:(0,p.jsx)(wd,{dense:!1,routeTabs:t}),children:(0,p.jsx)(sd,{routeTabs:t})})})};Zj.displayName="LegacyDeveloperPortalPage";const wj=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsx)(l.l_,{to:e((e=>e.connect.developerPortal))})};wj.displayName="RedirectToDeveloperPortal";const Ej=()=>{const e=(0,c.$B)(c._j.organization.connect.developerPortal.instantApp),t=null===e||void 0===e?void 0:e.params.instantAppId,{instantApp:n,fetched:i}=(e=>{const{instantApps:t,fetched:n}=(0,Ue.J)();return{instantApp:(0,a.useMemo)((()=>t.find((t=>t.id===e))),[t,e]),fetched:n}})(null!==t&&void 0!==t?t:"");return i?t&&n?(0,p.jsx)(xj,{instantApp:n}):(0,p.jsx)(wj,{}):null};Ej.displayName="InstantAppOrRedirect";const Sj=()=>{const e=(0,Le.d9)();return(0,p.jsx)(l.AW,{path:c._j.organization.connect.developerPortal.__path,children:(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{exact:!0,path:c._j.organization.connect.developerPortal.__path,children:e?(0,p.jsx)(fj,{}):(0,p.jsx)(Zj,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.connect.developerPortal.instantApp.__path,children:e?(0,p.jsx)(Ej,{}):(0,p.jsx)(wj,{})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(wj,{})})]})})};Sj.displayName="ConnectFeature";var Dj=n(51798);const Mj=e=>{let{deviceModels:t,spacing:n=.3}=e;const i=(0,Vr.ar)(t),a=(0,Vr.T8)(t);return(0,p.jsx)(m.Z,{direction:"row",spacing:n,alignItems:"center",children:(0,o.map)(a,(e=>{const t=(0,Vr.Aj)(e),n=(0,o.join)(i[e],", ");return(0,p.jsx)(ee.Z,{title:n,placement:"top",children:(0,p.jsx)(x.Z,{sx:{"&:hover":{backgroundColor:y.DG.primary[50]},cursor:"default",height:20},children:(0,p.jsx)(t,{sx:{fontSize:14,color:"black"}})})},e)}))})};Mj.displayName="MarketplaceInstantAppDeviceManufacturerIcons";
3const kj=e=>{var t,n;let{instantApp:r,open:l,onCloseClick:s,wizardMode:c}=e;const{shareInstantAppPending:u,shareInstantApp:h,getIsInstantAppInOrganization:g}=Rj(),x=(0,d.P)("REQUIRES_THIRD_PARTY_APP_LEGAL_ADDENDUM"),{buildOrganizationPath:f}=(0,w.P)(),y=g(r.id)&&!c,j=ry(r),[Z,D]=(0,a.useState)([]),M=(0,a.useCallback)((()=>{D((e=>{const t=(0,o.chain)(e).filter("selected").map("text").value(),n=new Set(t),i=!(0,o.isEmpty)(r.developerAgreements),l=(0,o.map)(r.developerAgreements,((e,t)=>(0,p.jsxs)(a.Fragment,{children:[(0,p.jsxs)(Kn.Z,{href:e.link,target:"_blank",onClick:e=>e.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",gap:.25},children:[e.title,(0,p.jsx)(Mu.Z,{sx:{fontSize:14}})]}),t<r.developerAgreements.length-1?", ":""]},e.title))),s={title:(0,p.jsxs)(v.Z,{children:["I understand that this app is developed by"," ",r.websiteUrl?(0,p.jsx)(Kn.Z,{href:r.websiteUrl,target:"_blank",children:r.developerOrganizationProfile.name}):r.developerOrganizationProfile.name," ","and my use of this app may be subject to its policies"," ",i&&(0,p.jsxs)(a.Fragment,{children:["(",l,")"]})]}),noPrefix:!0},d={title:(0,p.jsxs)(v.Z,{children:["I agree with the"," ",(0,p.jsx)(Kn.Z,{href:Be.pV.thirdPartyAppAgreement,onClick:e=>e.stopPropagation(),target:"_blank",children:"Third Party Application Agreement"})]}),noPrefix:!0},c=[s];return x&&c.push(d),(0,o.map)(c,(e=>({...e,checked:n.has(e.title)})))}))}),[r,x]);(0,a.useEffect)((()=>{setTimeout(M)}),[M]),(0,a.useEffect)((()=>{D([])}),[r.id]);const k=e=>{const t=(0,o.map)(Z,(t=>({...t,checked:(0,o.isEqual)(e,t)?!t.checked:t.checked})));D(t)},I=(0,a.useMemo)((()=>(0,o.every)(Z,"checked")),[Z]),A=(0,a.useCallback)((async()=>{I&&(await h(r.id),c&&s(r))}),[I,r,h,c,s]),{documents:R}=(0,E.h)(S.F.Apps,{filter:(0,a.useCallback)((e=>{var t;return(null===(t=e.instantAppRef)||void 0===t?void 0:t.id)===r.id&&!!e.iconUrl}),[r.id])}),T=null!==(t=null===(n=R[0])||void 0===n?void 0:n.iconUrl)&&void 0!==t?t:r.iconUrl;return(0,p.jsx)(kn.Z,{open:l,fullWidth:!0,sx:{"& div.MuiPaper-root":{maxWidth:700,...c?{marginTop:"300px"}:{}}},onClose:()=>s(r),children:(0,p.jsxs)(m.Z,{sx:{paddingX:3.5,paddingTop:3.5,paddingBottom:3},children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",flexGrow:1,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,marginBottom:2.5,children:[(0,p.jsx)("img",{src:T,alt:r.title,width:68,height:68,style:{borderRadius:5,objectFit:"cover"}}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Mj,{deviceModels:j,spacing:0}),(0,p.jsx)(v.Z,{variant:"h5",color:"primary.600",children:r.title})]}),(0,p.jsx)(v.Z,{variant:"body1",color:"grey.800",children:r.developerOrganizationProfile.name})]})]}),y&&(0,p.jsx)(m.Z,{direction:"row",gap:3,alignItems:"center",children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(ng.Z,{color:"success"}),(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.secondary",children:"Success"})]})})]}),y?(0,p.jsxs)(m.Z,{spacing:.5,marginBottom:5.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:Dj.Z[900],children:"How to Get Started"}),(0,p.jsxs)(v.Z,{color:"text.primary",children:["You've added this to your VR Content library!",(0,p.jsx)("br",{})," To use it, put it in a configuration and deploy the configuration to your devices."]})]}):(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(m.Z,{marginBottom:4.25,spacing:1,children:[(0,p.jsx)(m.Z,{children:(0,o.map)(Z,((e,t)=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,padding:1,children:[(0,p.jsx)(i.Z,{paddingX:1,children:(0,p.jsx)(Pi.Z,{sx:{padding:0},checked:e.checked,onClick:()=>k(e)})}),(0,p.jsxs)(i.Z,{sx:{transform:"translateY(1px)"},children:[!e.noPrefix&&(0,p.jsxs)(v.Z,{onClick:()=>k(e),color:"text.secondary",sx:{display:"inline"},children:["I accept"," ",r.developerOrganizationProfile.name,"'s"," "]}),e.link?(0,p.jsx)(Kn.Z,{href:e.link,target:"_blank",onClick:e=>e.stopPropagation(),children:e.title}):(0,p.jsx)(v.Z,{color:"text.secondary",onClick:()=>k(e),children:e.title})]})]},t)))}),(0,p.jsx)(v.Z,{color:"text.secondary",children:"Save this Instant App to your VR Content Library and try it today. Contact the developer to access the full version."})]})}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",flexGrow:1,children:[y&&(0,p.jsx)(Qc,{to:f((e=>e.vrContent.edit.app.instant),{instantAppId:r.id}),children:(0,p.jsx)(C.Z,{variant:"outlined",onClick:()=>{(0,b.ec)("Discover XR View Saved Instant App Clicked",{instantAppId:r.id,supportedModels:ry(r),title:r.title,location:"Instant App Add Dialog"})},children:"View in VR Content"})}),(0,p.jsx)(C.Z,{onClick:()=>s(r),variant:y?"contained":"text",children:"Close"}),!y&&(0,p.jsx)(Un.U,{onClick:A,submitting:u,disabled:!I,children:"Add App"})]})]})})};kj.displayName="MarketplaceInstantAppShareConfirmationDialog";const Ij=(0,a.createContext)(void 0),Aj=e=>{let{children:t,shareDialogWizardMode:n}=e;const{privileges:i}=(0,w.P)(),o=(0,X.bo)(),{documents:r}=(0,E.jV)(S.F.InstantApps,{filter:(0,a.useCallback)((e=>o||iy(e)),[o])}),{documents:l}=(0,E.jV)(S.F.MarketplaceContentProviders),{documents:s}=(0,E.jV)(S.F.MarketplaceHardwareProviders),{documents:d}
3=(0,E.D)(S.F.Apps),{instantAppShareConfirmationDialog:c,...u}=Bj(n);return(0,p.jsxs)(Ij.Provider,{value:{instantApps:r,contentProviders:l,hardwareProviders:s,instantAppFilters:Lj(r),contentProviderFilters:Uj(l),hardwareProviderFilters:Oj(s),...u,...zj(i),..._j(r,d)},children:[t,c]})},Rj=()=>{const e=(0,a.useContext)(Ij);if(!e)throw new Error("useMarketplaceInstantAppLibraryContext() must be used within an MarketplaceInstantAppLibraryProvider");return e},Tj=(e,t,n,i,r)=>{const[l,s]=(0,WC.x)(void 0),[d,c]=(0,a.useState)(""),u=(0,a.useMemo)((()=>(0,o.mapValues)((0,o.keyBy)(t,"id"),(e=>n(e)))),[t,n]);(0,a.useEffect)((()=>{s((t=>{const n=(0,o.mapValues)(t,(e=>new Set((0,o.chain)(e).pickBy({checked:!0}).map("value").value()))),i=(0,o.chain)(e).keyBy(o.identity).mapValues((e=>(0,o.chain)(u).values().map(e).flatten().uniq().sort(ze.DN).value())).value();return(0,o.mapValues)(i,((e,t)=>{const i=n[t];return(0,o.map)(e,(e=>({checked:(null===i||void 0===i?void 0:i.has(e))||!1,value:e})))}))}))}),[u,e,n,s]);const p=(0,a.useCallback)((e=>!!l&&(0,o.every)(l,((t,n)=>{const i=n,a=(0,o.filter)(t,"checked");if((0,o.isEmpty)(a))return!0;const r=e[i];return(0,o.some)(a,(e=>(0,o.includes)(r,e.value)))}))),[l]),h=(0,a.useMemo)((()=>{var e,n;let a,l=(0,o.chain)(t).filter((e=>{const t=u[e.id];return!!t&&p(t)}));a=r?l.value():l.sortBy("title").value();const{searchableFields:s,searchableArrayFields:c}=null!==i&&void 0!==i?i:{},h=(null!==(e=null===s||void 0===s?void 0:s.length)&&void 0!==e?e:0)>0||(null!==(n=null===c||void 0===c?void 0:c.length)&&void 0!==n?n:0)>0;return!(0,o.isEmpty)(d)&&h&&(a=(0,ff.sz)({data:a,fields:null!==s&&void 0!==s?s:[],arrayFields:c,substring:d.toLocaleLowerCase()})),a}),[t,u,p,d,i,r]),m=(0,a.useCallback)(((e,t)=>{s((n=>{if(!n)return;const i=n[e];if(!i)return;const a=(0,o.findIndex)(i,(e=>e.value===t));-1!==a&&(i[a]={value:t,checked:!i[a].checked})}))}),[s]),g=(0,a.useCallback)((e=>{c(e)}),[c]);return(0,a.useMemo)((()=>({filtersMap:l,filteredDocuments:h,toggleFilter:m,onSearchChange:g})),[l,h,m,g])};let Pj;!function(e){e.CATEGORY="categories",e.DEVICE_MANUFACTURER="device manufacturers"}(Pj||(Pj={}));const Lj=e=>{const t=(0,a.useCallback)((e=>{const t=ry(e),n=(0,Vr.T8)(t);return{[Pj.CATEGORY]:e.categories||[],[Pj.DEVICE_MANUFACTURER]:n}}),[]);return Tj((0,a.useMemo)((()=>(0,o.values)(Pj)),[]),e,t,{searchableFields:["title","description"]})};let Nj;!function(e){e.PROVIDER_TYPE="provider type",e.CATEGORIES="content category"}(Nj||(Nj={}));const Uj=e=>{const t=(0,a.useCallback)((e=>{var t;return{[Nj.CATEGORIES]:null!==(t=e.categories)&&void 0!==t?t:[],[Nj.PROVIDER_TYPE]:e.providerVariant?[e.providerVariant]:[]}}),[]);return Tj((0,a.useMemo)((()=>(0,o.values)(Nj)),[]),e,t,{searchableFields:["title","description"]})};let Fj;!function(e){e.REGION_TYPE="regions",e.DEVICE_TYPE="device type"}(Fj||(Fj={}));const Oj=e=>{const t=(0,a.useCallback)((e=>{var t,n;return{[Fj.REGION_TYPE]:null!==(t=e.regions)&&void 0!==t?t:[],[Fj.DEVICE_TYPE]:null!==(n=e.supportedDeviceManufacturers)&&void 0!==n?n:[]}}),[]);return Tj((0,a.useMemo)((()=>(0,o.values)(Fj)),[]),e,t,{searchableFields:["title","description"]})},_j=(e,t)=>{const[n,i]=(0,a.useState)({}),r=(0,a.useCallback)((()=>{const n=(e,t)=>!!t.releaseChannelRef&&!!t.instantAppRef&&t.instantAppRef.id===e.id,a={};for(const i of e){const e=(0,o.some)(t,(e=>n(i,e)));a[i.id]=e}i(a)}),[t,e]);(0,a.useEffect)((()=>{r()}),[r]);return{getIsInstantAppInOrganization:(0,a.useCallback)((e=>!!n[e]),[n])}},zj=e=>{const{request:t,pending:n}=(0,Fe.pv)({method:"post",path:"discover-xr/instant-apps/:instantAppId/share"});return{shareInstantApp:(0,a.useCallback)((async i=>{e.content&&!n&&await t({params:{instantAppId:i},successMessage:"Instant App added to library",errorMessage:"Error adding Instant App to library"})}),[e.content,n,t]),shareInstantAppPending:n}},Bj=e=>{const[t,n]=(0,a.useState)();return{instantAppShareConfirmationDialog:t?(0,p.jsx)(kj,{open:!0,instantApp:t,onCloseClick:e=>{n((t=>{if(t!==e)return t}))},wizardMode:e}):null,openShareInstantAppConfirmationDialog:e=>{n(e)}}};
3Aj.displayName="MarketplaceInstantAppLibraryProvider";const Wj=(0,a.memo)((e=>{let{label:t,prompt:n,accept:r,acceptExtension:l,onFileSelected:s,onClearClick:d,selectedFile:c,sx:u,height:h,disabledReason:g}=e;const f=null!=g,{notify:b}=(0,ie.o)(),j=(0,a.useCallback)((e=>{const t=e[0];if(!t)return void(0,Si.yR)(new Error("No file"),{name:"AppFileDropzone.onDropAccepted() error",contexts:{props:{accept:r,acceptExtension:l}}});const n=l&&(e=>{const t=(0,o.split)(e.name,".");return t.length>1?(0,o.last)(t):void 0})(t)!==l;n?b({severity:"error",message:"Error: File extension must be .".concat(l)}):s(t)}),[l,r,b,s]),Z=(0,a.useCallback)((e=>{const t=e[0];if(!t)return;const n=null===t||void 0===t?void 0:t.errors[0];if("file-invalid-type"===(null===n||void 0===n?void 0:n.code)){const e=(e=>(0,o.uniq)((0,o.flatten)((0,o.values)(e))).join(", "))(r),i=e?"Supported formats: ".concat(e):"Unsupported file type.";b({severity:"error",message:i}),(0,Si.yR)(n,{name:"VRContentFileDropzone.onDropRejected()",contexts:{props:{accept:r},file:(0,o.pick)(t.file,["name","type","size"])}})}}),[r,b]),w=(0,Eg.uI)({multiple:!1,accept:r,onDropAccepted:j,onDropRejected:Z,disabled:f}),E=(0,p.jsx)(i.Z,{sx:{...u,width:1,borderWidth:3,borderRadius:1,borderStyle:c?"solid":"dashed",borderColor:w.isDragAccept||c?"primary.light":"grey.400",backgroundColor:c?"primary.light":"transparent",color:c?y.DG.purple[100]:"initial"},children:c?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",padding:.625,height:h||"initial",children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:Qg(c.type,l)}
3),(0,p.jsx)(Ui.G,{title:c.name,variant:"subtitle2",color:"primary.contrastText",flexGrow:1,marginLeft:1,textAlign:"center"}),d&&(0,p.jsx)(x.Z,{color:"inherit",onClick:d,children:(0,p.jsx)(J.Z,{fontSize:"inherit"})})]}):(0,p.jsxs)("div",{...w.getRootProps({style:{outline:"none",height:h||"initial"}}),children:[(0,p.jsx)("input",{"data-testid":"vrContentFileDropzone_input",...w.getInputProps()}),(0,p.jsx)(C.Z,{disabled:f,sx:{width:1,height:h?1:"initial",paddingY:.625,paddingX:4,textTransform:"none",color:"text.secondary"},children:null!==n&&void 0!==n?n:"Select ".concat(t)})]})});return f?(0,p.jsx)(ee.Z,{title:g,children:E}):E})),Vj=e=>!!e&&e.startsWith("http"),Gj=["Anne Frank House VR","Stellar Simulator","Bodyswaps","ENGAGE"],Hj=e=>e.toLowerCase().replace(/[^a-z0-9]/g,""),qj={width:40,height:40,borderRadius:1,flexShrink:0},Yj=(0,a.memo)((e=>{let{iconSrc:t,iconAlt:n,title:o,added:a,onClick:r,iconNode:l,disabledReason:s}=e;const d=null!=s,c=(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,role:"button",tabIndex:d?-1:0,"aria-pressed":!!a,"aria-disabled":d,"aria-label":"".concat(a?"Remove":"Add"," ").concat(o),onClick:d?void 0:r,onKeyDown:e=>{d||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),r())},sx:{paddingX:2,paddingY:1.25,borderTop:"1px solid ".concat(y.DG.grey[100]),cursor:d?"default":"pointer",bgcolor:a?y.DG.purple[50]:"transparent","&:hover":{bgcolor:d?"transparent":y.DG.grey[50]}},children:[t?(0,p.jsx)(i.Z,{component:"img",src:t,alt:n,sx:{...qj,objectFit:"cover",bgcolor:"grey.200"}}):l?(0,p.jsx)(m.Z,{alignItems:"center",justifyContent:"center",sx:{...qj,bgcolor:y.DG.grey[100],color:"text.secondary"},children:l}):(0,p.jsx)(i.Z,{sx:{...qj,bgcolor:y.DG.grey[300]}}),(0,p.jsx)(v.Z,{variant:"body2",sx:{flex:1,minWidth:0,fontWeight:500},noWrap:!0,children:o}),(0,p.jsx)(C.Z,{size:"small",variant:a?"contained":"outlined",disableElevation:!0,disabled:d,tabIndex:-1,"aria-hidden":!0,sx:{textTransform:"none",fontWeight:600,minWidth:64,flexShrink:0},children:a?"Added":"Add"})]});return d?(0,p.jsx)(ee.Z,{title:s,children:c}):c}));Yj.displayName="OnboardingLibraryRow";const Kj={paddingY:1.5,borderRadius:2,bgcolor:y.DG.primary[200],textTransform:"none",fontWeight:600,"&:hover":{bgcolor:y.DG.primary[300]}},Xj={width:"100%",backgroundColor:y.DG.grey[200],borderRadius:2,padding:.375},Qj={flex:"1 1 auto",minWidth:0,height:34,paddingX:.75,gap:.75,borderRadius:"6px",overflow:"hidden",fontSize:14,fontWeight:500,color:y.DG.grey[800],"&:hover":{color:y.DG.grey[900]}},Jj={color:y.DG.purple[700],fontWeight:600,backgroundColor:y.DG.white,boxShadow:y.jb},$j=()=>{const[e,t]=(0,a.useState)([]),[n,i]=(0,a.useState)(!1),[o,r]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{const e=(0,td.IO)((0,Os.N$)(S.F.Videos),(0,td.ar)("globalAccess","==",!0));return(0,td.cf)(e,(e=>{t(e.docs.map((e=>({...e.data(),id:e.id})))),i(!0),r(!1)}),(e=>{(0,Si.yR)(e,{name:"Global access videos subscription error"}),i(!0),r(!0)}))}),[]),{videos:e,fetched:n,errored:o}},eZ=(e,t)=>(0,o.filter)(t,(t=>t.targetRef.id===e.id)),tZ=(e,t)=>{const n=(i=e.id,(0,o.filter)(t,(e=>!!(0,o.find)(e.approvedApps,{id:i}))));var i;return(0,o.uniqBy)(n,"id")};var nZ=n(94079);const iZ=e=>async(t,n)=>{const{organizationId:i,apkFile:a,apkInfo:r,obbFile:l,newVersion:s=!1,onCreateStart:d,onCreateSuccess:c,onCreateError:u,onApkUploadProgress:p,versionLabel:h}=e,{package:m,versionCode:g,versionName:v}=r;try{var C,x,f,b,y;t(nZ.K.actions.newVersionStarted({organizationId:i,packageName:m,apkInfo:r,versionLabel:h,versionName:v,versionCode:g})),d&&d(m);const e=((e,t,n)=>{const i="".concat(Date.now(),"_").concat(t,"+").concat(n,".apk");return"".concat(kg(e),"/apks/").concat(i)})(m,g,v),u=Ug({organizationId:i,file:a,filePath:e,onProgress:e=>{t(nZ.K.actions.newVersionUploadProgress({organizationId:i,packageName:m,apkUploadProgress:e})),p&&p(e)}});let j=Promise.resolve(void 0);if(l){const e=((e,t,n)=>{const i="".concat(Date.now(),"_").concat(t,"+").concat(n,".obb");return"".concat(kg(e),"/obbs/").concat(i)})(m,g,v);j=Ug({organizationId:i,file:l,filePath:e,onProgress:e=>{t(nZ.K.actions.newVersionUploadProgress({organizationId:i,packageName:m,obbUploadProgress:e}))}})}let Z=Promise.resolve(void 0);if(!s&&r.icon){const e=(e=>{var t,n;const[i,o]=e.split(","),[a,r]=null!==(t=null===i||void 0===i?void 0:i.split(":"))&&void 0!==t?t:[],[l,s]=null!==(n=null===r||void 0===r?void 0:r.split(";"))&&void 0!==n?n:[];if("data"!==a||!o)return;const d="base64"===s?atob(o):unescape(o);for(var c=new Uint8Array(d.length),u=0;u<d.length;
3u++)c[u]=d.charCodeAt(u);return new Blob([c],{type:l})})(r.icon);if(e){const t=Rg(m,e);t&&(Z=Ug({organizationId:i,file:e,filePath:t,isPublic:!0}))}}const[w,E,D]=await Promise.all([u,j,Z]);if(!w)return;t(nZ.K.actions.newVersionDocumentPending({organizationId:i,packageName:m}));const M=n(),k=s?((e,t,n)=>{const i=(0,o.values)(n.firestore.data[S.F.Apps].data);return(0,o.chain)(i).filter((n=>n.organizationRef.id===e&&n.packageName===t)).sort(Vs.r6).reverse().value()[0]})(i,m,M):void 0,{defaultIconUrl:I,defaultTitle:A}=Be.vc.vrContent,R=null!==(C=null!==(x=null===k||void 0===k?void 0:k.title)&&void 0!==x?x:(0,Vs.GX)(r))&&void 0!==C?C:A,T=null!==(f=null!==(b=null===k||void 0===k?void 0:k.iconUrl)&&void 0!==b?b:null===D||void 0===D?void 0:D.publicDownloadUrl)&&void 0!==f?f:I,P=a.size,L=null!==(y=null===l||void 0===l?void 0:l.size)&&void 0!==y?y:0,N=await(0,Fe.gQ)({organizationId:i},{apkUrl:w.storageUrl,iconUrl:T,latestVersion:g,obbUrls:E?[E.storageUrl]:[],packageName:m,title:R,versionName:v,versionLabel:h,apkSize:P,obbSize:L});t(nZ.K.actions.newVersionComplete({organizationId:i,packageName:m})),c&&c(N)}catch(j){(0,Si.yR)(j,{name:"createManagedApp() error",contexts:{app:{packageName:m,apkInfo:r}}}),t(nZ.K.actions.newVersionComplete({organizationId:i,packageName:m})),u&&u(j)}},oZ=e=>async(t,n)=>{const{organizationId:i,formData:o,videoFile:a,onStart:r,onSuccess:l,onError:s}=e,d=Be.vc.vrContent.defaultIconUrl,c=(e=>{const t="".concat(Date.now(),"_").concat(e.name);return"videos/".concat(t)})(a),u=(0,Vt.Z)();try{t(nZ.K.actions.videoUploadStarted({organizationId:i,uploadId:u,formData:{...o,iconUrl:d}})),r&&r(u);const e=await Ug({organizationId:i,file:a,filePath:c,onProgress:e=>{t(nZ.K.actions.videoUploadProgress({organizationId:i,uploadId:u,uploadProgress:e}))}});if(!e)return;const{storageUrl:n}=e;t(nZ.K.actions.videoUploadDocumentPending({organizationId:i,uploadId:u}));const s=await(0,Fe.R5)({organizationId:i},{...o,iconUrl:d,storageUrl:n});t(nZ.K.actions.videoUploadComplete({organizationId:i,uploadId:u,videoId:s.id})),l&&l(s)}catch(p){(0,Si.yR)(p,{name:"create video error",contexts:{requestData:{...o,filePath:c}}}),s&&s(p)}},aZ=e=>{var t,n;let{video:o,onChange:a}=e;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,sx:{"& > *":{flexBasis:0,flexGrow:1}},children:[(0,p.jsx)(Qi,{label:"Video Type",value:o.type,onChange:e=>{const t=e===hc._2D?gc.NONE:o.mapping===gc.NONE?gc.EQUIRECTANGULAR:o.mapping,n=e===hc._2D?Cc.MONO:o.display,i=e===hc._2D?fc.NONE:o.packing;a({type:e,mapping:t,display:n,packing:i})},options:[hc._2D,hc._180,hc._360].map((e=>({value:e,label:mc[e]}))),fullWidth:!0,privilege:"content"}),o.type===hc._2D?(0,p.jsx)(i.Z,{}):(0,p.jsx)(Qi,{label:"Mapping",value:null!==(t=o.mapping)&&void 0!==t?t:gc.EQUIRECTANGULAR,onChange:e=>{a({mapping:e})},options:[gc.EQUIRECTANGULAR,gc.CUBEMAP].map((e=>({value:e,label:vc[e]}))),fullWidth:!0,privilege:"content"})]}),o.type!==hc._2D&&(0,p.jsxs)(m.Z,{direction:"row",spacing:2,sx:{"& > *":{flexBasis:0,flexGrow:1}},children:[(0,p.jsx)(Qi,{label:"Display",value:o.display,onChange:e=>{const t=e===Cc.MONO?fc.NONE:o.packing===fc.NONE?fc.TOP_BOTTOM:o.packing;a({display:e,packing:t})},options:[Cc.MONO,Cc.STEREO].map((e=>({value:e,label:xc[e]}))),fullWidth:!0,privilege:"content"}),o.display===Cc.MONO?(0,p.jsx)(i.Z,{}):(0,p.jsx)(Qi,{label:"Packing",value:null!==(n=o.packing)&&void 0!==n?n:fc.TOP_BOTTOM,onChange:e=>{a({packing:e})},options:[fc.TOP_BOTTOM,fc.LEFT_RIGHT].map((e=>({value:e,label:bc[e]}))),fullWidth:!0,privilege:"content"})]})]})},rZ=(0,a.memo)((e=>{let{title:t,onCancel:n,onConfirm:i}=e;const[o,r]=(0,a.useState)({type:hc._2D,display:Cc.MONO,mapping:gc.NONE,packing:fc.NONE});return(0,p.jsx)(Ro.Q,{open:!0,title:"Video details \u2014 ".concat(t),onClose:n,rightActions:[(0,p.jsx)(C.Z,{onClick:n,children:"Cancel"},"cancel"),(0,p.jsx)(C.Z,{variant:"contained",onClick:()=>i(o),children:"Upload"},"upload")],children:(0,p.jsx)(aZ,{video:o,onChange:e=>r((t=>({...t,...e})))})})}));rZ.displayName="OnboardingVideoMetadataDialog";const lZ={"application/vnd.android.package-archive":[".apk"],"video/mp4":[".mp4"],"video/x-matroska":[".mkv"]},sZ=e=>{const{onAppCreated:t,onVideoCreated:n}=e,i=(0,u.I0)(),{organizationId:r}=(0,w.P)(),{notify:l}=(0,ie.o)(),[s,d]=(0,a.useState)(null),[c,h]=(0,a.useState)(!1),[m,g]=(0,a.useState)(null),v=(e=>{const{onCreateSuccess:t,onUploadProgress:n,onError:i}=e,r=(0,u.I0)(),{organizationId:l}=(0,w.P)(),{notify:s}=(0,ie.o)(),{documents:d}
3=(0,E.D)(S.F.Apps);return(0,a.useCallback)((async e=>{const a=e.name.replace(/\.[^.]+$/,"");try{const{apkInfo:u,missingFields:p}=await(0,Vs.A7)(e);if(!u)return p&&s({severity:"error",message:"APK is missing ".concat(p.length>1?"these fields: ":"").concat((0,o.join)((0,o.map)(p,(e=>Vs.NO[e])),", "))}),void(null===i||void 0===i||i(p?"missing-fields":"parse-error"));const h=(0,o.find)(d,(e=>e.packageName===u.package));var c;if(h)return void s({severity:"info",message:"You've already added ".concat(null!==(c=h.title)&&void 0!==c?c:a)});await r(iZ({organizationId:l,apkFile:e,apkInfo:u,onApkUploadProgress:n,onCreateSuccess:e=>{var n;t(e,null!==(n=e.title)&&void 0!==n?n:a)},onCreateError:()=>{s({severity:"error",message:"Error uploading ".concat(a)}),null===i||void 0===i||i("create-error")}}))}catch(u){s({severity:"error",message:"Invalid APK file"}),null===i||void 0===i||i("invalid-apk"),(0,Si.yR)(new Error("Invalid APK file"),{name:"useCreateManagedAppFromApk() error",contexts:{file:(0,o.pick)(e,["name","size","type"])}})}}),[r,d,s,t,n,i,l])})({onCreateSuccess:(e,n)=>{(0,b.u0)({surface:"quickstart",step:"content",control:"content-item",action:"uploaded",value:"app"}),t(e,n)},onUploadProgress:e=>g(Math.round(e.percentComplete)),onError:e=>(0,b.u0)({surface:"quickstart",step:"content",control:"content-item",action:"upload-failed",value:"app",metadata:{reason:e}})});return{onFileSelected:(0,a.useCallback)((e=>{e.name.endsWith(".mp4")||e.name.endsWith(".mkv")?d({file:e,title:e.name.replace(/\.[^.]+$/,""),fileLabel:e.name.endsWith(".mkv")?"MKV":"MP4"}):(h(!0),g(0),v(e).finally((()=>{h(!1),g(null)})))}),[v]),isUploading:c,uploadPercent:m,videoMetadataDialog:s?(0,p.jsx)(rZ,{title:s.title,onCancel:()=>d(null),onConfirm:e=>
3{const{file:t,title:o,fileLabel:a}=s;d(null),h(!0),i(oZ({formData:{title:o,...e},videoFile:t,organizationId:r,onSuccess:e=>{h(!1),(0,b.u0)({surface:"quickstart",step:"content",control:"content-item",action:"uploaded",value:"video"}),n(e,a)},onError:()=>{h(!1),(0,b.u0)({surface:"quickstart",step:"content",control:"content-item",action:"upload-failed",value:"video"}),l({severity:"error",message:"Error uploading ".concat(o)})}}))}},s.title):null}},dZ={fontFamily:y.ht,fontWeight:700,marginBottom:2},cZ="Content privilege required to add content",uZ=(0,a.memo)((e=>{const{onNext:t,onSelectedContentChange:n,selectedContent:i}=e,{privileges:r}=(0,w.P)(),{instantApps:l,getIsInstantAppInOrganization:s,openShareInstantAppConfirmationDialog:d}=Rj(),{documents:c,fetched:u,errored:h}=(0,E.D)(S.F.Videos),{documents:g,fetched:x,errored:f}=(0,E.D)(S.F.Apps),{videos:y,fetched:j,errored:Z}=$j(),D=c,M=g,[k,I]=(0,a.useState)((()=>(0,o.map)(i,(e=>({source:"library",...e}))))),[A,R]=(0,a.useState)(null),T=(0,a.useMemo)((()=>new Set((0,o.map)(k,"id"))),[k]),P=(0,a.useRef)(new Set),L=(0,a.useRef)(new Set),N=(0,a.useCallback)((e=>{L.current.has(e.id)||P.current.add(e.id),I((t=>((e,t)=>(0,o.some)(e,(e=>e.id===t.id))?e:[...e,t])(t,e)))}),[]),U=(0,a.useCallback)((e=>I((t=>(0,o.filter)(t,(t=>t.id!==e))))),[]),F=(0,a.useCallback)(((e,t,n)=>(0,b.u0)({surface:"quickstart",step:"content",control:"content-item",action:e,value:t,metadata:{source:n}})),[]),O=(0,a.useMemo)((()=>{const e=new Set;return(0,o.forEach)(M,(t=>{var n;e.add(t.id),null!==(n=t.instantAppRef)&&void 0!==n&&n.id&&e.add(t.instantAppRef.id)})),(0,o.forEach)(D,(t=>e.add(t.id))),(0,o.forEach)(y,(t=>e.add(t.id))),e}),[M,D,y]);L.current=O;const _=(x||f)&&(u||h)&&j;(0,a.useEffect)((()=>{_&&I((e=>{const t=((e,t,n,i,a)=>(n.forEach((e=>{t.has(e)&&n.delete(e)})),(0,o.filter)(e,(e=>t.has(e.id)||n.has(e.id)||"video"===e.type&&i||"video"!==e.type&&a))))(e,O,P.current,h||Z,f);return t.length===e.length?e:t}))}),[_,O,h,Z,f]);const{onFileSelected:z,isUploading:B,uploadPercent:W,videoMetadataDialog:V}=sZ({onAppCreated:(e,t)=>{N({source:"upload",id:e.id,name:t,type:"app",packageNameOrId:e.packageName}),F("added","app","upload")},onVideoCreated:(e,t)=>{N({source:"upload",id:e.id,name:e.title,type:"video",fileLabel:t}),F("added","video","upload")}}),G=(0,a.useCallback)((e=>{var t,n;return{source:"library",id:e.id,name:e.title,type:"instantApp",packageNameOrId:null!==(t=null===(n=(0,o.find)(M,(t=>{var n;return(null===(n=t.instantAppRef)||void 0===n?void 0:n.id)===e.id})))||void 0===n?void 0:n.packageName)&&void 0!==t?t:e.id}}),[M]),H=(0,a.useCallback)((e=>T.has(e.id)?(U(e.id),void F("removed","instantApp","marketplace")):s(e.id)?(F("added","instantApp","marketplace"),N(G(e))):(R(e),void d(e))),[T,U,s,N,G,d,F]),q=(0,a.useCallback)((e=>{if(T.has(e.id))return U(e.id),void F("removed","video","library");N({source:"library",id:e.id,name:e.title,type:"video"}),F("added","video","library")}),[T,U,N,F]),Y=(0,a.useCallback)((e=>{var t;if(T.has(e.id))return U(e.id),void F("removed",e.kind,"library");N("app"===e.kind?{source:"library",id:e.id,name:e.title,type:"app",packageNameOrId:null!==(t=e.packageName)&&void 0!==t?t:e.id}:{source:"library",id:e.id,name:e.title,type:"video"}),F("added",e.kind,"library")}),[T,U,N,F]);(0,a.useEffect)((()=>{A&&s(A.id)&&(N(G(A)),F("added","instantApp","marketplace"),R(null))}),[A,s,N,G,F]),(0,a.useEffect)((()=>n(k)),[k,n]);const K=(0,o.filter)(k,(e=>"upload"===e.source)),X=k.length,Q=new Set((0,o.map)(K,"id")),J=new Set((0,o.map)(y,"id")),$=((e,t,n,i)=>{const a=(0,o.map)((0,o.uniqBy)((0,o.filter)(e,(e=>!e.instantAppRef)),(e=>{var t;return null!==(t=e.packageName)&&void 0!==t?t:e.id})),(e=>({id:e.id,title:e.title,iconUrl:e.iconUrl,kind:"app",packageName:e.packageName}))),r=(0,o.map)((0,o.filter)(t,(e=>!n.has(e.id)&&Vj(e.iconUrl))),(e=>({id:e.id,title:e.title,iconUrl:e.iconUrl,kind:"video"}))),l=new Set((0,o.map)((0,o.filter)(e,(e=>i.has(e.id)&&null!=e.packageName)),(e=>e.packageName)));return(0,o.filter)([...a,...r],(e=>!i.has(e.id)&&!(null!=e.packageName&&l.has(e.packageName))))})(M,D,J,Q),ee=(0,a.useMemo)((()=>(e=>(0,o.compact)((0,o.map)(Gj,(t=>(0,o.find)(e,(e=>Hj(e.title)===Hj(t)&&!!e.iconUrl&&e.iconUrl.includes("storage.googleapis.com")))))))(l)),[l]),te=(0,a.useMemo)((()=>(e=>(0,o.slice)((0,o.map)((0,o.filter)(e,(e=>Vj(e.iconUrl))),(e=>({id:e.id,title:e.title,iconUrl:e.iconUrl}))),0,3))(y)),[y]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{direction:"row",sx:{width:"100%"},children:[(0,p.jsxs)(m.Z,{sx:{flex:1},alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"subtitle1",sx:dZ,children:"Upload your own content"}
3),(0,p.jsx)(Wj,{prompt:"Choose an app or video",accept:lZ,onFileSelected:z,height:220,sx:{width:"100%"},disabledReason:r.content?void 0:cZ}),B&&(0,p.jsxs)(m.Z,{spacing:.75,sx:{width:"100%",marginTop:1.5},children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Uploading\u2026"}),null!=W&&W<100&&(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:[W,"%"]})]}),(0,p.jsx)(Rn.Z,{variant:null!=W&&W<100?"determinate":"indeterminate",value:null!==W&&void 0!==W?W:void 0})]}),K.length>0&&(0,p.jsx)(Me.Z,{variant:"outlined",sx:{borderRadius:3,overflow:"hidden",width:"100%",marginTop:1.5},children:(0,o.map)(K,(e=>(0,p.jsx)(Yj,{iconSrc:"",iconAlt:e.name,iconNode:"app"===e.type?(0,p.jsx)(zd.Z,{}):(0,p.jsx)(yC.Z,{}),title:e.name,added:!0,onClick:()=>{U(e.id),F("removed",e.type,"upload")}},e.id)))}),$.length>0&&(0,p.jsxs)(m.Z,{spacing:.75,sx:{width:"100%",marginTop:1.5},children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{fontWeight:700},children:"Previously uploaded"}),(0,p.jsx)(Me.Z,{variant:"outlined",sx:{borderRadius:3,overflow:"hidden",maxHeight:220,overflowY:"auto"},children:(0,o.map)($,(e=>(0,p.jsx)(Yj,{iconSrc:e.iconUrl,iconAlt:e.title,title:e.title,added:T.has(e.id),onClick:()=>Y(e)},e.id)))})]})]}),(0,p.jsx)(Ie.Z,{orientation:"vertical",flexItem:!0,sx:{marginX:3,"& .MuiDivider-wrapperVertical":{fontSize:"0.7rem",color:"text.secondary"}},children:"OR"}),(0,p.jsxs)(m.Z,{sx:{flex:1.15},alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"subtitle1",sx:dZ,children:"Use one of our free apps"}),(0,p.jsxs)(Me.Z,{variant:"outlined",sx:{borderRadius:3,overflow:"hidden",width:"100%"},children:[(0,o.map)(ee,(e=>(0,p.jsx)(Yj,{iconSrc:e.iconUrl,iconAlt:e.title,title:e.title,added:T.has(e.id),onClick:()=>H(e),disabledReason:r.content||s(e.id)?void 0:cZ},e.id))),(0,o.map)(te,(e=>(0,p.jsx)(Yj,{iconSrc:e.iconUrl,iconAlt:e.title,title:e.title,added:T.has(e.id),onClick:()=>q(e)},e.id)))]})]})]}),(0,p.jsx)(m.Z,{alignItems:"center",sx:{marginTop:3},children:(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,onClick:t,disabled:0===X,sx:{...Kj,fontSize:15,width:"50%"},children:0===X?"Pick at least one to continue":"Continue with ".concat(X," ").concat(1===X?"item":"items")})}),V]})}));uZ.displayName="OnboardingContentStep";const pZ=n.p+"static/media/pico4-render.73e86fbb5a1fe4626ee7.png",hZ=n.p+"static/media/quest3-render.0cc4896366349d1c09a7.png";var mZ=n(37443);const gZ=n.p+"static/media/connect_assignments.489f21884b0d155c9aeb.png",vZ=n.p+"static/media/connect_choose_provider.38c6b08c29736b4a930a.png",CZ=n.p+"static/media/connect_create_enrollment.a7810f3f99a0520ce2af.png",xZ=n.p+"static/media/connect_name_enrollment.993ce90b867a1ead4f57.png",fZ=n.p+"static/media/connect_pair_organization.c9dcea866afbaa18525a.jpg",bZ=n.p+"static/media/connect_review.327e9da6eaf92fec2c0b.png",yZ=n.p+"static/media/connect_temp_code.f17ee303113be239085c.jpg",jZ=n.p+"static/media/connect_upload_token.61fcef2ec2b77c83d2d9.png",ZZ=["Haven't purchased yet","Waiting on budget or procurement","Devices ordered, in shipping","Just exploring"],wZ=(0,a.memo)((e=>{let{open:t,onClose:n,onSubmit:i,source:r}=e;const[l,s]=(0,a.useState)(null);return(0,p.jsx)(Ro.Q,{open:t,onClose:n,customDialogWidth:520,title:"No device yet? No problem.",rightActions:(0,p.jsx)(C.Z,{"data-testid":"onboardingNoDeviceReason_submit",variant:"contained",disabled:!l,onClick:()=>{l&&i(l)},sx:{textTransform:"none",fontSize:15},children:"Browse our Reseller Directory"}),children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",sx:{fontSize:18},children:"Tell us where you are and we'll point you to trusted hardware partners who can help you get set up."}),(0,p.jsx)(m.Z,{direction:"row",sx:{flexWrap:"wrap",gap:1},children:(0,o.map)(ZZ,(e=>(0,p.jsx)(ke.Z,{"data-testid":"onboardingNoDeviceReason_chip_".concat(e),label:e,clickable:!0,color:l===e?"primary":"default",variant:l===e?"filled":"outlined",onClick:()=>{"device-step"===r?(0,b.u0)({surface:"quickstart",step:"device",control:"no-device-reason",action:"selected",value:e}):(0,b.u0)({surface:"dashboard",control:"no-device-reason",action:"selected",value:e,...r?{metadata:{source:r}}:{}}),s(e)}},e)))})]})})}));wZ.displayName="OnboardingNoDeviceReasonDialog";var EZ=n(49170);const SZ=(0,a.memo)((e=>{let{number:t,completed:n}=e;return(0,p.jsx)(i.Z,{sx:{width:n?22:26,height:n?22:26,borderRadius:"50%",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,lineHeight:1,bgcolor:n?y.DG.grey[500]:y.DG.primary[200],color:"common.white"},children:n?(0,p.jsx)(Vi.Z,{sx:{fontSize:13}}):t})}));SZ.displayName="StepNumberBadge";const DZ=(0,a.memo)((e=>{let{title:t,number:n,completed:o,summary:a,connector:r,onClick:l,children:s}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"stretch",spacing:1.5,sx:{alignSelf:"flex-start",maxWidth:"100%"},children:[(0,p.jsxs)(m.Z,{alignItems:"center",sx:{flexShrink:0},children:[(0,p.jsx)(i.Z,{sx:{marginTop:"3px"},children:(0,p.jsx)(SZ,{number:null!==n&&void 0!==n?n:0,completed:o})}),r&&(0,p.jsx)(i.Z,{sx:{width:"1px",flex:1,minHeight:16,marginTop:.75,marginBottom:1,bgcolor:"divider"}})]}),(0,p.jsxs)(m.Z,{spacing:.25,onClick:l,role:l?"button":void 0,tabIndex:l?0:void 0,onKeyDown:l?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),l())}:void 0,sx:{alignSelf:"flex-start",minWidth:0,marginX:-1.25,paddingX:1.25,paddingY:.5,borderRadius:1.5,...l&&{
3cursor:"pointer","&:hover":{bgcolor:y.DG.grey[100]}}},children:[(0,p.jsx)(v.Z,{variant:"h6",sx:{fontFamily:y.ht,fontWeight:700,lineHeight:1.2,...o&&{fontSize:"1rem",fontWeight:600,color:"text.secondary"}},children:t}),a&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:a}),s]})]})}));DZ.displayName="OnboardingMilestoneRow";const MZ=(0,a.memo)((e=>{let{label:t,onClick:n,sx:i}=e;return(0,p.jsx)(C.Z,{variant:"text",size:"small",disableElevation:!0,onClick:n,sx:[{textTransform:"none",color:"text.secondary"},...Array.isArray(i)?i:[i]],children:t})}));MZ.displayName="OnboardingSkipButton";const kZ=(0,a.memo)((e=>{let{title:t,number:n,completed:i,subtitle:o,onBack:a,bottomEnd:r,children:l}=e;return(0,p.jsxs)(m.Z,{sx:{width:"100%",paddingX:3,paddingY:2.5,border:"1px solid",borderColor:"divider",borderRadius:2,bgcolor:"common.white",boxShadow:y.QZ},children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,sx:{width:"100%",marginBottom:2.5},children:[null!=n&&(0,p.jsx)(SZ,{number:n,completed:i}),(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(v.Z,{variant:"h6",sx:{fontFamily:y.ht,fontWeight:700,lineHeight:1.2},children:t}),o&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:o})]})]}),l,(a||r)&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{width:"100%",marginTop:2.5},children:[a?(0,p.jsx)(C.Z,{onClick:a,startIcon:(0,p.jsx)(EZ.Z,{sx:{fontSize:16}}),sx:{alignItems:"center",color:"text.secondary",textTransform:"none",fontSize:13,fontWeight:500},children:"Back"}):(0,p.jsx)("span",{}),r]})]})}));kZ.displayName="OnboardingStepCard";const IZ=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?["device","content","homescreen","wifi","preview"]:["welcome","content","homescreen","wifi","preview","device"]},AZ=[{step:"content",number:1,title:"Pick your content",subtitle:"Add the content that will go on your headset.",headerTitle:"Set up your first headset",headerSubtitle:"A few quick steps to get your first headset ready to deploy."},{step:"homescreen",number:2,title:"Customize the homescreen",subtitle:"Choose how your headset home screen looks and works.",headerTitle:"Set up your first headset",headerSubtitle:"A few quick steps to get your first headset ready to deploy."},{step:"wifi",number:3,title:"Set up Wi-Fi",subtitle:"Add a network so headsets connect automatically once enrolled.",headerTitle:"Set up your first headset",headerSubtitle:"A few quick steps to get your first headset ready to deploy."},{step:"device",number:4,title:"Try it on a real device",subtitle:"Enroll a headset to see your setup live.",headerTitle:"Set up your first headset",headerSubtitle:"A few quick steps to get your first headset ready to deploy."}],RZ=e=>AZ.find((t=>t.step===e)),TZ=(e,t)=>{if("content"===e)return t>0?"".concat(t," ").concat(1===t?"item":"items"):void 0},PZ=e=>{var t,n,i,o,a,r,l,s;return(null!==(t=null===(n=e.approvedApps)||void 0===n?void 0:n.length)&&void 0!==t?t:0)>0||(null!==(i=null===(o=e.approvedInstantApps)||void 0===o?void 0:o.length)&&void 0!==i?i:0)>0||(null!==(a=null===(r=e.approvedWebXRApps)||void 0===r?void 0:r.length)&&void 0!==a?a:0)>0||(null!==(l=null===(s=e.approvedVideos)||void 0===s?void 0:s.length)&&void 0!==l?l:0)>0},LZ=["welcome","content","homescreen","preview","wifi","device"],NZ="mxr_trial_onboarding_dismissed_",UZ=e=>"".concat(NZ).concat(e),FZ=e=>{try{window.localStorage.setItem(UZ(e),"true")}catch(t){}},OZ=["pico","quest","other","later"],_Z={ssid:"",security:"wpa2",password:"",savedNetworkId:null},zZ="mxr_onboarding_progress_",BZ=e=>"".concat(zZ).concat(e),WZ=e=>{try{window.localStorage.removeItem(BZ(e))}catch(t){}},VZ=RZ("device").title,GZ=[{value:"pico",img:pZ,label:"Pico",sub:"Pico 4 \xb7 Pico 4 Enterprise \xb7 Pico Neo 3 \xb7 Pico Neo 3 Eye \xb7 Pico G3"},{value:"quest",img:hZ,label:"Quest",sub:"Meta Quest 3 \xb7 Meta Quest 3S \xb7 Meta Quest Pro \xb7 Meta Quest 2"},{value:"other",img:mZ,label:"Other",sub:""}],HZ={typography:"body2",color:"text.secondary"},qZ={width:"100%",maxWidth:760,display:"block",borderRadius:"8px",border:"1px solid ".concat(y.DG.grey[300])},YZ=e=>"pico"===e||"quest"===e?e:e&&"later"!==e?"other":"",KZ=e=>(0,o.map)(e.split("**"),((e,t)=>t%2?(0,p.jsx)("b",{children:e},t):e)),XZ=e=>e.outlined?{textTransform:"none",paddingX:3}:[Kj,{paddingX:3}],QZ=(e,t,n)=>e.subtle?(0,p.jsx)(C.Z,{onClick:e.onClick,startIcon:(0,p.jsx)(EZ.Z,{sx:{fontSize:16}}),sx:{alignItems:"center",color:"text.secondary",textTransform:"none",fontSize:13,fontWeight:500},children:e.label},t):(0,p.jsx)(C.Z,{variant:e.outlined?"outlined":"contained",disableElevation:!0,disabled:e.disabled,startIcon:e.icon,onClick:e.onClick,sx:n?[XZ(e),n]:XZ(e),children:e.label},t),JZ=(0,a.memo)((e=>{let{page:t}=e;const n=t.steps.length>1;return(0,p.jsxs)(m.Z,{spacing:3,children:[t.subtitle&&(0,p.jsx)(v.Z,{sx:HZ,children:t.subtitle}),(0,o.map)(t.steps,((e,t)=>{let{text:o,img:a,href:r,extra:l,render:s}=e;return s?(0,p.jsxs)(m.Z,{spacing:1.5,sx:{width:"100%"},children:[s,l]},t):(0,p.jsxs)(m.Z,{direction:"row",spacing:n?1.5:0,children:[n&&(0,p.jsx)(v.Z,{sx:{color:"text.primary",paddingTop:.5},children:"\u2022"}),(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{paddingTop:.5},children:r?(0,p.jsx)(Kn.Z,{href:r,target:"_blank",rel:"noopener",children:KZ(o)}):KZ(o)}),a&&(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",width:"100%"},children:(0,p.jsx)(i.Z,{component:"img",src:a,alt:"",sx:qZ})}),l]})]},t)})),(0,o.some)(t.buttons,(e=>e.subtle))?(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:(0,o.map)(t.buttons,((e,t)=>QZ(e,t,{minWidth:200})))}):(0,p.jsx)(m.Z,{spacing:1.5,alignItems:"center",children:(0,o.map)((0,o.reverse)([...t.buttons]),((e,t)=>QZ(e,t)))})]})}));JZ.displayName="SetupBody";const $Z=(0,a.memo)((e=>{let{onSignedUp:t,onBookHelp:n,onProgress:i}=e;return(0,a.useEffect)((()=>null===i||void 0===i?void 0:i(1/(nw.length+1))),[i]),(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(v.Z,{sx:HZ,children:"Quest enrollment needs a Meta Horizon Managed Services account. Sign up at Meta or have your MHMS admin invite you \u2014 or let us help set it up."}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,justifyContent:"center",children:[(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,onClick:n,sx:[Kj,{paddingX:3,flex:1,maxWidth:260}],children:"Help me set up my account"}),(0,p.jsx)(C.Z,{variant:"outlined",disableElevation:!0,onClick:t,sx:{textTransform:"none",paddingX:3,flex:1,maxWidth:260},children:"I've signed up"})]})]})}));$Z.displayName="DeviceGate";const ew=(0,a.memo)((e=>{let{onSkip:t,onProgress:n}=e;return(0,a.useEffect)((()=>null===n||void 0===n?void 0:n(1)),[n]),(0,p.jsxs)(m.Z,{spacing:2.5,sx:{width:"100%"},children:[(0,p.jsx)(v.Z,{sx:HZ,children:"We'll walk you through MHMS setup on a quick 15-minute call."}),(0,p.jsx)(i.Z,{component:"iframe",src:Be.pV.onboardingMeetingBooking,title:"Book an onboarding call",sx:{width:"100%",height:620,border:"1px solid ".concat(y.DG.grey[200]),borderRadius:3}}),(0,p.jsx)(C.Z,{onClick:t,sx:{alignSelf:"center",textTransform:"none",fontSize:13,color:y.DG.grey[500]},children:"Go to Dashboard"})]})}));ew.displayName="BookingBody";const tw=(0,a.memo)((e=>{var t;let{onDownloaded:n}=e;const{organization:o}=(0,d.mP)(),{enrollmentConfig:r}=Ii(),l=null===(t=(0,z.T)("qfbJsonTemplate"))||void 0===t?void 0:t.template,s=null===r||void 0===r?void 0:r.enrollmentToken,c=(0,a.useMemo)((()=>
3{if(l&&s)return((e,t)=>JSON.parse(JSON.stringify(e).replace("{{enrollmentToken}}",(()=>t))))(l,s)}),[l,s]),u=(new Date).toISOString().split("T")[0];return(0,p.jsx)(i.Z,{sx:{display:"inline-flex"},children:(0,p.jsx)(Ei,{buttonProps:{variant:"outlined",size:"medium",disabled:!c,sx:{textTransform:"none",fontWeight:600,paddingX:3}},buttonText:"Download token",filename:"meta-enrollment-token-".concat(o.name,"-").concat(u),data:c,onDownloaded:n})})}));tw.displayName="EnrollmentTokenDownloadButton";const nw=[{title:"Connect ManageXR to Meta",steps:[{text:"",render:(0,p.jsxs)(m.Z,{direction:"row",spacing:3,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Go to your MHMS Admin Center and add a third-party MDM"}),(0,p.jsx)(v.Z,{sx:HZ,children:"In the Third-party MDMs section, click Create third-party enrollment to connect ManageXR."}),(0,p.jsx)(C.Z,{variant:"outlined",component:"a",href:"https://devicemanager.meta.com/device_management/third_party_mdms/create",target:"_blank",rel:"noopener",endIcon:(0,p.jsx)(Mu.Z,{}),sx:{textTransform:"none",fontWeight:600,alignSelf:"center",marginTop:2},children:"Click here to go there directly"})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:CZ,alt:"",sx:qZ})})]})}]},{title:"Choose ManageXR and name your enrollment",steps:[{text:"",render:(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Choose ManageXR from the list of providers"}),(0,p.jsx)(v.Z,{sx:HZ,children:"Open the Provider dropdown and select ManageXR."})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:vZ,alt:"",sx:qZ})})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Give your enrollment a name"}),(0,p.jsx)(v.Z,{sx:HZ,children:'Use any name you like, we recommend "ManageXR"'})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:xZ,alt:"",sx:qZ})})]})]})}]},{title:"Upload your token to Meta",requiresTokenDownload:!0,steps:[{text:"",renderWithToken:e=>(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Upload your enrollment token"}),(0,p.jsx)(v.Z,{sx:HZ,children:"On the Management step, drag the JSON file in, or choose it from your device."}),(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",paddingTop:2},children:e})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:jZ,alt:"",sx:qZ})})]})}]},{title:"Assign ManageXR as the default enrollment",steps:[{text:"",render:(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Turn on Set as default enrollment, then click Next"}),(0,p.jsx)(v.Z,{sx:HZ,children:"You do not need to select any device groups or devices here."})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:gZ,alt:"",sx:qZ})})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Click Assign"}),(0,p.jsx)(v.Z,{sx:HZ,children:"You're almost done!"})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:bZ,alt:"",sx:qZ})})]})]})}]},{title:"Connect your headset to ManageXR",requiresEnrollmentDefaults:!0,requiresMetaVisit:!0,steps:[{text:"",renderWithMeta:e=>(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Complete the out-of-box experience"}),(0,p.jsx)(v.Z,{sx:HZ,children:"Setting up many devices on the same network at once can slow the firmware download or make it fail. If that happens, set up fewer devices at a time or split them across separate provisioning networks."})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0}})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Choose Connect to your organization"}),(0,p.jsx)(v.Z,{sx:HZ,children:'After the update, the pairing screen asks "Headset managed by your organization?". Select Connect to your organization underneath. If the button is not selectable yet, wait for "Your headset is up to date" in the top left.'})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:fZ,alt:"",sx:qZ})})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Continue to the temporary device code"}),(0,p.jsx)(v.Z,{sx:HZ,children:"Click Continue on the in-headset prompts until you reach a screen showing a temporary device code."})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:(0,p.jsx)(i.Z,{component:"img",src:yZ,alt:"",sx:qZ})})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:[(0,p.jsx)(v.Z,{sx:{fontWeight:700},children:"Enter the code at work.meta.com/device"}),(0,p.jsx)(v.Z,{sx:HZ,children:"With ManageXR set as the default enrollment, go to work.meta.com/device in your browser and enter the temporary device code from the headset."})]}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0,display:"flex",justifyContent:"center"},children:e})]})]})}]}],iw=(0,a.memo)((e=>{let{configurationId:t}=e;const{enrollmentConfig:n}=Ii(),{documents:i,fetched:r}=(0,E.D)(S.F.Configurations),{request:l}=Ti(),s=(0,a.useRef)(!1),d=(0,a.useRef)(!1),c=(0,a.useRef)(!0);(0,a.useEffect)((()=>()=>{c.current=!1}),[]);const[u,p]=(0,a.useState)(0);return(0,a.useEffect)((()=>
3{if(u>=3)return;if(s.current||d.current||!t)return;if(!n||!r)return;if(!(0,o.some)(i,(e=>e.id===t)))return;n.method===Mi.DefaultConfiguration&&n.configurationId===t?s.current=!0:(d.current=!0,l({params:{enrollmentConfigId:n.id},data:{method:Mi.DefaultConfiguration,configurationId:t},onSuccess:()=>{s.current=!0},onError:e=>{(0,Fe.tf)(e)&&(0,Si.yR)(e,{name:"TrialEnrollmentConfigAutoApply patch rejected"})},onFinally:()=>{d.current=!1,!s.current&&c.current&&p((e=>e+1))}}))}),[t,n,i,r,l,u]),null}));iw.displayName="TrialEnrollmentConfigAutoApply";const ow=(0,a.memo)((e=>{let{page:t,onPageChange:n,onBack:r,onFinish:l,finishLabel:s,trialConfigurationId:d,onProgress:c}=e;(0,a.useEffect)((()=>null===c||void 0===c?void 0:c((e=>(e+2)/(nw.length+1))(t))),[t,c]);const u=t>=nw.length-1,h=nw[t],m=!0===h.requiresTokenDownload,[g,v]=(0,a.useState)(!1),x=!0===h.requiresMetaVisit,[f,y]=(0,a.useState)(!1),j=(0,p.jsx)(tw,{onDownloaded:()=>v(!0)}),Z=(0,p.jsx)(C.Z,{variant:"outlined",component:"a",href:"https://work.meta.com/device",target:"_blank",rel:"noopener",endIcon:(0,p.jsx)(Mu.Z,{}),onClick:()=>{(0,b.u0)({surface:"quickstart",step:"device",control:"meta-device-link",action:"clicked"}),y(!0)},sx:{textTransform:"none",fontWeight:600},children:"Click here to go there directly"}),w=(0,o.map)(h.steps,((e,t)=>{let n=e;return m&&n.renderWithToken?n={...n,render:n.renderWithToken(j)}:m&&0===t&&(n={...n,extra:j}),n.renderWithMeta&&(n={...n,render:n.renderWithMeta(Z)}),h.requiresEnrollmentDefaults&&t===h.steps.length-1&&(n={...n,extra:(0,p.jsx)(i.Z,{sx:{maxWidth:600,width:"100%"},children:(0,p.jsx)(iw,{configurationId:null!==d&&void 0!==d?d:void 0})})}),n}));return(0,p.jsx)(JZ,{page:{...h,steps:w,buttons:[{label:"Back",subtle:!0,onClick:()=>{(0,b.u0)({surface:"quickstart",step:"device",control:"enroll-back",action:"clicked",metadata:{enrollPage:t}}),t>0?n(t-1):r()}},{label:u?s:"Next",onClick:()=>{u?l():((0,b.u0)({surface:"quickstart",step:"device",control:"enroll-next",action:"clicked",metadata:{enrollPage:t}}),(0,b.ec)("Onboarding Step Completed",{step:"device",enrollPage:t}),n(t+1))},disabled:m&&!g||x&&!f}]}})}));ow.displayName="DeviceEnroll";const aw=(0,a.memo)((e=>{let{label:t,onDownload:n}=e;return(0,p.jsxs)(m.Z,{spacing:2.5,alignItems:"flex-start",children:[(0,p.jsxs)(v.Z,{sx:HZ,children:["To add ",t&&"Other"!==t?"your ".concat(t," device"):"your device",", use the ManageXR Device Setup Tool. See the"," ",(0,p.jsx)(Kn.Z,{href:Be.IW.registerDevicesWithDeviceSetupTool,target:"_blank",rel:"noopener",children:"device setup guide \u2197"})," ","for more information."]}),(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,startIcon:(0,p.jsx)(Qn.Z,{}),onClick:()=>n("mac"),sx:Kj,children:"Download Device Setup Tool"}),(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:["Not your OS?"," ",(0,p.jsx)(Kn.Z,{component:"button",onClick:()=>n("win"),sx:{fontWeight:500},children:"Download for Windows instead"})]})]})}));aw.displayName="DstDownload";const rw=(0,a.memo)((e=>{let{num:t,caption:n,dark:i,bordered:o,children:a}=e;return(0,p.jsxs)(m.Z,{sx:{flex:1,borderRadius:2,overflow:"hidden",border:"".concat(o?2:1,"px solid ").concat(o?y.DG.primary[200]:y.DG.grey[200]),bgcolor:i?y.DG.grey[1100]:y.DG.white},children:[(0,p.jsx)(m.Z,{alignItems:"center",justifyContent:"center",sx:{height:120,bgcolor:i?y.DG.grey[1100]:y.DG.grey[50]},children:a}),(0,p.jsxs)(v.Z,{variant:"body2",sx:{padding:1.5,fontSize:13,color:i?y.DG.grey[300]:"text.primary"},children:[(0,p.jsx)("b",{children:t})," ",n]})]})}));rw.displayName="InstallCard";const lw=(0,a.memo)((e=>{let{img:t,configName:n,onBack:o,onNext:a,onWatchVideo:r,nextLabel:l}=e;return(0,p.jsxs)(m.Z,{spacing:2.5,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(rw,{num:1,caption:"Connect a headset to your computer",bordered:!0,children:t&&(0,p.jsx)(i.Z,{component:"img",src:t,alt:"",sx:{height:90,objectFit:"contain"}})}),(0,p.jsx)(rw,{num:2,caption:"Choose a configuration to deploy to your device",dark:!0,children:(0,p.jsxs)(m.Z,{spacing:.5,sx:{paddingX:2,width:"100%"},children:[(0,p.jsx)(v.Z,{variant:"caption",sx:{color:y.DG.grey[500]},children:"Configuration"}),(0,p.jsxs)(i.Z,{sx:{border:"1px solid ".concat(y.DG.grey[800]),borderRadius:1,padding:1,color:y.DG.white,fontSize:14},children:[n," \u25be"]})]})}),(0,p.jsx)(rw,{num:3,caption:"Click install, and manage it remotely from ManageXR!",dark:!0,children:(0,p.jsx)(i.Z,{sx:{bgcolor:y.DG.primary[200],borderRadius:1.5,paddingX:3,paddingY:1.5,color:y.DG.white,fontWeight:600},children:"\u2193 Install"})})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{textAlign:"center"},children:"Your download should begin automatically."}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(C.Z,{onClick:o,startIcon:(0,p.jsx)(EZ.Z,{sx:{fontSize:16}}),sx:{alignItems:"center",color:"text.secondary",textTransform:"none",fontSize:13,fontWeight:500},children:"Back"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(C.Z,{variant:"outlined",onClick:a,sx:{textTransform:"none"},children:l}),(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,onClick:r,sx:[Kj,{paddingX:3}],children:"\u25b6 Watch a video tutorial"})]})]})]})}));lw.displayName="DstInstall";const sw=(0,a.memo)((e=>{let{deviceChoice:t,onChoice:n}=e;const a=YZ(t),r=a||GZ[0].value;return(0,p.jsx)(m.Z,{direction:"row",spacing:2,role:"radiogroup","aria-label":"Headset brand",onKeyDown:e=>{var t;const i="ArrowRight"===e.key||"ArrowDown"===e.key?1:"ArrowLeft"===e.key||"ArrowUp"===e.key?-1:0;if(!i)return;e.preventDefault();const r=(0,o.findIndex)(GZ,(e=>e.value===a)),l=-1===r?i>0?0:GZ.length-1:(r+i+GZ.length)%GZ.length;n(GZ[l].value),null===(t=e.currentTarget.querySelectorAll('[role="radio"]')[l])||void 0===t||t.focus()},children:(0,o.map)(GZ,(e=>(0,p.jsxs)(m.Z,{alignItems:"center",role:"radio","aria-checked":a===e.value,"aria-label":e.label,tabIndex:r===e.value?0:-1,onClick:()=>n(e.value),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),n(e.value))},sx:{flex:1,padding:3.5,cursor:"pointer",borderRadius:"8px",border:"1px solid ".concat(a===e.value?y.DG.primary[100]:y.DG.grey[300]),bgcolor:a===e.value?"purple.50":"background.paper"},children:[(0,p.jsx)(i.Z,{component:"img",src:e.img,alt:e.label,sx:{width:"54%",height:88,objectFit:"contain"}}),(0,p.jsx)(v.Z,{fontWeight:700,sx:{marginTop:2},children:e.label}),(0,p.jsx)(v.Z,{sx:HZ,children:"other"===e.value?(0,p.jsxs)(p.Fragment,{children:["ManageXR supports most Android-based mobile devices,"," ",(0,p.jsxs)(Kn.Z,{href:Be.IW.supportedDevices,target:"_blank",rel:"noopener",onClick:e=>e.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",gap:.25},children:["see our full list",(0,p.jsx)(Mu.Z,{sx:{fontSize:"inherit"}})]}),"."]}):e.sub})]},e.value)))})}));sw.displayName="DevicePicker";const dw=(0,a.memo)((e=>{const{onNext:t,onSkip:n,deviceChoice:r,onDeviceChoiceChange:s,trialConfigurationId:d,onSetupProgress:c,phase:h,onPhaseChange:g,enrollPage:v,onEnrollPageChange:x,finishLabel:f,deviceIsLast:j}=e,Z=(0,Le.ye)("onboardingBookingEnabled"),E=(0,u.I0)(),D=(0,l.k6)(),{organizationId:M,buildOrganizationPath:k}=(0,w.P)(),[I,A]=(0,a.useState)(!1),[R,T]=(0,a.useState)(!1),P="pick"===h,L=(0,a.useCallback)((e=>{(0,b.ec)("Onboarding No Device Reported",{reason:e,source:"device-step"}),T(!1),FZ(M),E(Te.dV.actions.onboardingOverlaySet("dismissed")),D.push(k((e=>e.marketplace.hardwarePartners)))}),[E,D,k,M]),N=(0,o.find)(GZ,(e=>e.value===YZ(r))),U=null===N||void 0===N?void 0:N.label,F=(0,xo.ky)(S.F.Configurations,null!==d&&void 0!==d?d:void 0);(0,a.useEffect)((()=>{P&&(null===c||void 0===c||c(0))}),[P,c]),(0,a.useEffect)((()=>{"dst"===h&&(null===c||void 0===c||c(I?1:.5))}),[h,I,c]);const O=(0,a.useCallback)((e=>{(0,b.u0)({surface:"quickstart",step:"device",control:"dst-download",action:"clicked",value:"mac"===e?"mac":"win"}),(0,di.Sv)(ti(e),""),A(!0)}),[]),_=(0,a.useCallback)((()=>{WZ(M),FZ(M),E(Te.dV.actions.onboardingOverlaySet("dismissed")),D.push(k((e=>e.devices)))}),[M,E,D,k]),z=j?_:t,B=(0,a.useCallback)((e=>{(0,b.u0)({surface:"quickstart",step:"device",control:"brand",action:"selected",value:e}),s(e)}),[s]),W=(0,a.useCallback)((()=>((e,t)=>{if(e)return t();window.open(Be.pV.onboardingMeetingBooking,"_blank","noopener")})(Z,(()=>g("booking")))),[Z,g]),V=(()=>{switch(h){case"gate":return"Set Up Meta Horizon Managed Services";case"instructions":return nw[v].title;case"dst":return I?"Install ManageXR on your headset":"Download the Device Setup Tool";case"booking":return"Book an onboarding call";case"video":return"Watch a video tutorial";default:return"Set up your device"}})(),G="instructions"===h?3+v:2;return P?(0,p.jsxs)(kZ,{number:1,title:VZ,children:[(0,p.jsxs)(m.Z,{spacing:2,sx:{width:"100%"},children:[(0,p.jsx)(sw,{deviceChoice:r,onChoice:B}),(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,disabled:!r||"later"===r,onClick:()=>g("quest"===r?"gate":"dst"),sx:[Kj,{width:"50%",alignSelf:"center"}],children:"Continue"}),(0,p.jsx)(MZ,{label:"I don't have a device",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"device",control:"no-device",action:"clicked"}),T(!0)},sx:{alignSelf:"center"}})]}),(0,p.jsx)(wZ,{open:R,onClose:()=>T(!1),onSubmit:L,source:"device-step"})]}):(0,p.jsxs)(m.Z,{sx:{width:"100%"},children:[(0,p.jsxs)(m.Z,{sx:{paddingLeft:3},children:[(0,p.jsx)(DZ,{completed:!0,connector:!0,title:"Set up your device",summary:U?"".concat(U," selected"):void 0,onClick:()=>{g("pick"),x(0),A(!1)}}
3),"instructions"===h&&(0,p.jsx)(DZ,{completed:!0,connector:!0,title:"Set Up Meta Horizon Managed Services",onClick:()=>g("gate")}),"instructions"===h&&(0,o.map)((0,o.take)(nw,v),((e,t)=>(0,p.jsx)(DZ,{completed:!0,connector:!0,title:e.title,onClick:()=>x(t)},t)))]}),(0,p.jsx)(kZ,{number:G,title:V,onBack:"gate"===h||"booking"===h?()=>g("pick"):void 0,children:(()=>{var e;switch(h){case"gate":return(0,p.jsx)($Z,{onSignedUp:()=>g("instructions"),onBookHelp:W,onProgress:c});case"instructions":return(0,p.jsx)(ow,{page:v,onPageChange:x,onBack:()=>g("gate"),onFinish:z,finishLabel:f,trialConfigurationId:d,onProgress:c});case"dst":return I?(0,p.jsx)(lw,{img:null===N||void 0===N?void 0:N.img,configName:null!==(e=null===F||void 0===F?void 0:F.name)&&void 0!==e?e:"Trial Setup",onBack:()=>A(!1),onNext:z,onWatchVideo:()=>{(0,b.u0)({surface:"quickstart",step:"device",control:"watch-video",action:"clicked"}),g("video")},nextLabel:f}):(0,p.jsx)(aw,{label:U,onDownload:O});case"video":return(0,p.jsxs)(m.Z,{spacing:2.5,sx:{width:"100%"},children:[(0,p.jsx)(i.Z,{sx:{position:"relative",width:"100%",paddingTop:"56.25%",borderRadius:2,overflow:"hidden",bgcolor:y.DG.grey[1100]},children:(0,p.jsx)(i.Z,{sx:{position:"absolute",inset:0},children:(0,p.jsx)(gi,{url:"https://www.youtube.com/watch?v=paw4H0EK09o",width:"100%",YoutubePlayerProps:{height:"100%"},videoTitle:"Device Setup Tool tutorial"})})}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(C.Z,{onClick:()=>g("dst"),startIcon:(0,p.jsx)(EZ.Z,{sx:{fontSize:16}}),sx:{alignItems:"center",color:"text.secondary",textTransform:"none",fontSize:13,fontWeight:500},children:"Back"}),(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,onClick:z,sx:[Kj,{paddingX:3}],children:f})]})]});case"booking":return(0,p.jsx)(ew,{onSkip:n,onProgress:c});default:return null}})()})]})}));dw.displayName="OnboardingDeviceStep";var cw=n(1235);const uw=["Default","Arcade"],pw=(0,a.memo)((e=>{let{color:t}=e;return(0,p.jsx)(i.Z,{sx:{flexShrink:0,width:14,height:14,borderRadius:"4px",backgroundColor:t,border:"1px solid ".concat(hm(y.DG.grey[1100],.2))}})}));pw.displayName="ThemeSwatch";const hw=(0,a.memo)((e=>{let{children:t}=e;return(0,p.jsx)(i.Z,{component:"span",sx:{minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:t})}));hw.displayName="ThemeLabel";const mw=(0,a.memo)((e=>{let{themes:t,value:n,onChange:r}=e;const[l,s]=(0,a.useState)(null),d=(0,a.useMemo)((()=>(0,o.filter)((0,o.map)(uw,(e=>(0,o.find)(t,(t=>t.name===e)))),(e=>!!e))),[t]),c=(0,a.useMemo)((()=>(0,o.filter)(t,(e=>!(0,o.find)(d,(t=>t.id===e.id))))),[t,d]),u=(0,o.find)(c,(e=>e.id===n)),h=(0,a.useCallback)((e=>s(e.currentTarget)),[]),g=(0,a.useCallback)((()=>s(null)),[]),v=(0,a.useCallback)((e=>{(0,b.u0)({surface:"quickstart",step:"homescreen",control:"color-theme",action:"selected",value:e.name,metadata:{themeId:e.id}}),r(e.id)}),[r]),C=(0,a.useCallback)((e=>{v(e),s(null)}),[v]);return(0,p.jsxs)(m.Z,{direction:"row",spacing:.375,sx:Xj,children:[(0,o.map)(d,(e=>(0,p.jsxs)(Hn.Z,{onClick:()=>v(e),sx:{...Qj,...e.id===n?Jj:{}},children:[(0,p.jsx)(pw,{color:(0,ul.B$)(e.colors.menuBackground)}),(0,p.jsx)(hw,{children:e.name})]},e.id))),c.length>0&&(0,p.jsxs)(Hn.Z,{onClick:h,sx:{...Qj,...u?Jj:{}},children:[u&&(0,p.jsx)(pw,{color:(0,ul.B$)(u.colors.menuBackground)}),(0,p.jsx)(hw,{children:u?u.name:"More"}),(0,p.jsx)(cw.Z,{sx:{flexShrink:0,fontSize:18,marginLeft:-.25}})]}),(0,p.jsx)(Is.Z,{anchorEl:l,open:!!l,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,o.map)(c,(e=>(0,p.jsxs)(Hi.Z,{selected:e.id===n,onClick:()=>C(e),sx:{gap:1,minWidth:180},children:[(0,p.jsx)(pw,{color:(0,ul.B$)(e.colors.menuBackground)}),(0,p.jsx)(i.Z,{component:"span",sx:{flex:1},children:e.name}),e.id===n&&(0,p.jsx)(Vi.Z,{sx:{fontSize:18,color:y.DG.purple[700]}})]},e.id)))})]})}));mw.displayName="OnboardingColorThemePicker";var gw=n(17875);const vw=new Map,Cw=(0,a.memo)((e=>{let{steps:t,progressKey:n,onProgress:r,onReadyChange:l}=e;const[s,d]=(0,a.useState)((()=>{var e,t;return null!==(e=n?null===(t=vw.get(n))||void 0===t?void 0:t.completed:void 0)&&void 0!==e?e:0})),[c,u]=(0,a.useState)((()=>{var e,t;return null!==(e=n?null===(t=vw.get(n))||void 0===t?void 0:t.open:void 0)&&void 0!==e?e:0})),h=(0,a.useRef)(n);(0,a.useEffect)((()=>{var e,t;if(n===h.current)return void(n&&vw.set(n,{completed:s,open:c}));h.current=n;const i=n?vw.get(n):void 0;d(null!==(e=null===i||void 0===i?void 0:i.completed)&&void 0!==e?e:0),u(null!==(t=null===i||void 0===i?void 0:i.open)&&void 0!==t?t:0)}),[n,s,c]);const g=(0,a.useCallback)((e=>{let n=Math.max(0,e);for(;n<t.length-1&&null!==(i=t[n])&&void 0!==i&&i.disabled;){var i;n+=1}return Math.min(n,t.length-1)}),[t]),x=g(Math.min(c,t.length-1));(0,a.useEffect)((()=>{var e;const n=Math.min(c,t.length-1);if(null===(e=t[n])||void 0===e||!e.disabled)return;const i=g(n+1);d((e=>Math.min(t.length,Math.max(e,i)))),u(i)}),[c,t,g]),(0,a.useEffect)((()=>
3{if(0===t.length)return void(null===r||void 0===r||r(0));const e=t.length>1&&x>=t.length-1?t.length:s;null===r||void 0===r||r(Math.min(1,e/t.length))}),[r,s,x,t.length]),(0,a.useEffect)((()=>{null===l||void 0===l||l(s>=t.length-1)}),[l,s,t.length]);const f=(0,a.useCallback)((e=>{const n=g(e+1);d((e=>Math.min(t.length,Math.max(e,n)))),u(n)}),[t.length,g]),b=(0,a.useCallback)((e=>u(e)),[]),y=t[x];return(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(m.Z,{spacing:1,children:(0,o.map)(t,((e,t)=>{var n;if(t>s)return null;const o=!!e.disabled,a=t===x&&!o,r=t<s,l=!a&&!o;return(0,p.jsx)(ee.Z,{title:o&&null!==(n=e.disabledTooltip)&&void 0!==n?n:"",arrow:!0,placement:"top",children:(0,p.jsxs)(i.Z,{sx:{borderRadius:2,border:1,borderColor:a?"primary.main":"divider",paddingX:1.5,paddingY:1.25,opacity:o?.5:1},children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,"data-testid":"onboardingReveal_row_".concat(e.key),role:l?"button":void 0,tabIndex:l?0:void 0,"aria-label":l?"Edit ".concat(e.label):void 0,sx:{cursor:l?"pointer":"default"},onClick:l?()=>b(t):void 0,onKeyDown:l?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),b(t))}:void 0,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",sx:{flex:1,minWidth:0},children:e.label}),!a&&e.summary&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:e.summary}),r&&!a&&!o&&(e.skip?(0,p.jsx)(gw.Z,{sx:{fontSize:18,color:"text.disabled"}}):(0,p.jsx)(ng.Z,{sx:{fontSize:18,color:"success.main"}}))]}),!o&&(0,p.jsx)(qn.Z,{in:a,timeout:350,children:(0,p.jsx)(i.Z,{sx:{minWidth:0,paddingTop:1},children:e.content()})})]})},e.key)}))}),y&&x<t.length-1&&(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center"},children:(0,p.jsx)(C.Z,{variant:y.skip?"text":"contained",size:"large",disableElevation:!0,"data-testid":"onboardingReveal_".concat(y.skip?"skip":"next","_").concat(y.key),onClick:()=>f(x),sx:y.skip?{textTransform:"none",color:"text.secondary"}:{textTransform:"none",paddingX:7,paddingY:1,fontSize:15,fontWeight:600,minWidth:180,borderRadius:2},children:y.skip?"Skip":"Next"})})]})}));Cw.displayName="OnboardingCustomHomeReveal";const xw={top:{w:900,h:300,ar:3},bottom:{w:600,h:300,ar:2}},fw=420,bw=(0,a.memo)((e=>{let{file:t,busy:n,defaultDest:o="top",lockDest:r=!1,onClose:l,onApply:s}=e;const d=(0,De.Z)(),[c,u]=(0,a.useState)(o);(0,a.useEffect)((()=>{t&&u(o)}),[t,o]);const[h,g]=(0,a.useState)(1),[x,f]=(0,a.useState)({x:0,y:0}),[b,y]=(0,a.useState)(xw[o].ar),[j,Z]=(0,a.useState)(null),[w,E]=(0,a.useState)(null),[S,D]=(0,a.useState)(!1),M=(0,a.useRef)(null),k=(0,a.useRef)(null),I=(0,a.useRef)(null),A=xw[c],R=.5,T=A.ar,P=Math.min(Math.max(b,R),T),L=130,N=L*P,U=(fw-N)/2,F=15;(0,a.useEffect)((()=>{if(!t)return;Z(null);let e=!1;const n=URL.createObjectURL(t);E(n);const i=new Image;return i.onload=()=>{e||Z(i)},i.src=n,()=>{e=!0,URL.revokeObjectURL(n)}}),[t]);const O=j?L/j.height:1,_=O*h,z=j?j.width*_:N,B=j?j.height*_:L,W=(0,a.useCallback)(((e,t)=>{const n=(j?j.width:N)*t,i=(j?j.height:L)*t,o=Math.min(24,n,N),a=Math.min(24,i,L);return{x:Math.min(U+N-o,Math.max(U+o-n,e.x)),y:Math.min(145-a,Math.max(F+a-i,e.y))}}),[j,U,F,N,L]);(0,a.useEffect)((()=>{if(!j||I.current===j)return;I.current=j;const e=Math.min(Math.max(j.width/j.height,R),T);y(e),g(1);const t=L/j.height,n=L*e;f({x:(fw-n)/2+(n-j.width*t)/2,y:F+(L-j.height*t)/2})}),[j,c,R,T,F,L]),(0,a.useEffect)((()=>{f((e=>W(e,_)))}),[W,_]);const V=(0,a.useCallback)(((e,t)=>{const n=Array.isArray(t)?t[0]:t;if(!j)return void g(n);const i=U+N/2,o=O*h,a=O*n,r=(i-x.x)/o,l=(80-x.y)/o;g(n),f(W({x:i-r*a,y:80-l*a},a))}),[j,O,h,x,U,F,N,L,W]),G=(e,t)=>{e.stopPropagation(),k.current={sx:e.clientX,startAr:P,dir:t},e.currentTarget.setPointerCapture(e.pointerId)},H=e=>{const t=k.current;if(!t)return;const n=e.clientX-t.sx,i=t.startAr+t.dir*(n/220)*(T-1)*2;y(Math.min(Math.max(i,R),T))},q=()=>{k.current=null},Y=(0,a.useCallback)((async()=>{if(j&&!S){D(!0);try{const e=document.createElement("canvas"),t=A.h,n=Math.round(A.h*P);e.width=n,e.height=t;const i=e.getContext("2d");if(!i)return;i.drawImage(j,(U-x.x)/_,(F-x.y)/_,N/_,L/_,0,0,n,t);const o=await new Promise((t=>e.toBlob(t,"image/png")));o&&s(o,c)}finally{D(!1)}}}),[j,S,A,P,U,F,N,L,x,_,c,s]),K="conic-gradient(".concat(d.palette.grey[300]," 25%, ").
3concat(d.palette.grey[100]," 0 50%, ").concat(d.palette.grey[300]," 0 75%, ").concat(d.palette.grey[100]," 0)"),X=(0,Dr.Fq)(d.palette.common.black,.5),Q={position:"absolute",width:10,height:56,borderRadius:1.5,bgcolor:"primary.main",boxShadow:3,cursor:"ew-resize",touchAction:"none",zIndex:3};return(0,p.jsxs)(kn.Z,{open:!!t,onClose:n||S?void 0:l,maxWidth:"sm",children:[(0,p.jsx)(In.Z,{sx:{paddingBottom:.5},children:"Position your logo"}),(0,p.jsxs)(An.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{marginBottom:2},children:"Drag the logo to position it, use the side handles to set the shape, and zoom to frame it. Anything outside the bright selection is cropped; anything the logo does not cover stays transparent on the home screen."}),(0,p.jsxs)(m.Z,{spacing:2,alignItems:"center",children:[!r&&(0,p.jsxs)(Ef.Z,{exclusive:!0,fullWidth:!0,size:"small",color:"primary",value:c,onChange:(e,t)=>t&&u(t),sx:{width:fw},children:[(0,p.jsx)(Sf.Z,{value:"top","data-testid":"onboardingLogoCropDialog_destTop",children:"Top"}),(0,p.jsx)(Sf.Z,{value:"bottom","data-testid":"onboardingLogoCropDialog_destBottom",children:"Bottom"})]}),(0,p.jsxs)(i.Z,{"data-testid":"onboardingLogoCropDialog_stage",onPointerDown:e=>{M.current={sx:e.clientX,sy:e.clientY,ox:x.x,oy:x.y},e.currentTarget.setPointerCapture(e.pointerId)},onPointerMove:e=>{const t=M.current;t&&f(W({x:t.ox+(e.clientX-t.sx),y:t.oy+(e.clientY-t.sy)},_))},onPointerUp:()=>{M.current=null},sx:{position:"relative",width:fw,height:160,overflow:"hidden",borderRadius:2,border:"1px solid",borderColor:"grey.300",backgroundImage:K,backgroundSize:"16px 16px",cursor:"grab",touchAction:"none"},children:[w&&(0,p.jsx)(i.Z,{component:"img",src:w,alt:"",draggable:!1,sx:{position:"absolute",maxWidth:"none",userSelect:"none",pointerEvents:"none"},style:{left:x.x,top:x.y,width:z,height:B}}),(0,p.jsx)(i.Z,{sx:{position:"absolute",pointerEvents:"none",boxShadow:"0 0 0 9999px ".concat(X),border:"2px solid",borderColor:"common.white",borderRadius:1},style:{left:U,top:F,width:N,height:L}}),(0,p.jsx)(i.Z,{"data-testid":"onboardingLogoCropDialog_handleLeft",onPointerDown:e=>G(e,-1),onPointerMove:H,onPointerUp:q,sx:{...Q,transform:"translate(-50%, -50%)"},style:{left:U,top:80}}),(0,p.jsx)(i.Z,{"data-testid":"onboardingLogoCropDialog_handleRight",onPointerDown:e=>G(e,1),onPointerMove:H,onPointerUp:q,sx:{...Q,transform:"translate(-50%, -50%)"},style:{left:U+N,top:80}})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",sx:{width:320},children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{minWidth:40},children:"Zoom"}),(0,p.jsx)(ev.ZP,{min:.6,max:8,step:.01,value:h,onChange:V})]})]})]}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{"data-testid":"onboardingLogoCropDialog_cancelButton",onClick:l,disabled:n||S,color:"inherit",children:"Cancel"}),(0,p.jsx)(C.Z,{"data-testid":"onboardingLogoCropDialog_applyButton",onClick:()=>{Y()},variant:"contained",disableElevation:!0,disabled:!j||n||S,startIcon:n||S?(0,p.jsx)(Zi.Z,{size:16,color:"inherit"}):void 0,children:n||S?"Saving\u2026":"Apply logo"})]})]})}));bw.displayName="OnboardingLogoCropDialog";const yw=(0,a.memo)((e=>{let{label:t,url:n,onRemove:o}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,sx:{width:"100%",minWidth:0,height:76,borderRadius:1.5,border:"1px solid",borderColor:"grey.200",paddingLeft:1,paddingRight:.5},children:[(0,p.jsx)(i.Z,{sx:{width:72,height:48,flexShrink:0,borderRadius:1,border:"1px solid",borderColor:"grey.100",bgcolor:"grey.50",backgroundImage:"url(".concat(n,")"),backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),(0,p.jsx)(v.Z,{variant:"body2",sx:{flex:1,minWidth:0,fontWeight:700},children:t}),(0,p.jsx)(x.Z,{size:"small","data-testid":"onboardingLogoUpload_remove_".concat(t),onClick:o,"aria-label":"Remove ".concat(t),children:(0,p.jsx)(bu.Z,{sx:{fontSize:16}})})]})}));yw.displayName="LogoPreview";const jw=(0,a.memo)((e=>{let{label:t,onOpenPicker:n,onFileDrop:o,testId:a}=e;return(0,p.jsxs)(i.Z,{"data-testid":null!==a&&void 0!==a?a:"onboardingLogoUpload_dropzone",onClick:n,onDragOver:e=>e.preventDefault(),onDrop:e=>{var t;e.preventDefault(),o(null===(t=e.dataTransfer.files)||void 0===t?void 0:t[0])},sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:.25,height:76,paddingX:2,borderRadius:2,border:"2px dashed",borderColor:"grey.300",bgcolor:"grey.50",color:"text.secondary",cursor:"pointer",transition:"border-color 120ms, color 120ms","&:hover":{borderColor:"primary.main",color:"primary.main"}},children:[(0,p.jsx)(Ms.Z,{sx:{fontSize:22}}),(0,p.jsx)(v.Z,{variant:"body2",sx:{fontWeight:600,textAlign:"center"},children:t?"Add ".concat(t):"Upload a PNG or JPEG"})]})}));jw.displayName="LogoDropzone";const Zw=(0,a.memo)((e=>{let{bottomOnly:t=!1}=e;const n=(0,u.I0)(),{notify:o}=(0,ie.o)(),{organizationId:r}=(0,w.P)(),l=Ks(),s=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.topLogoUrl})),d=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.bottomLogoUrl})),[c,h]=(0,a.useState)(null),[g,v]=(0,a.useState)("top"),[C,x]=(0,a.useState)(!1),f=(0,a.useRef)(null),y=(0,a.useRef)("top"),j=(0,a.useCallback)(((e,t)=>{n(Js(Ys.U.actions.launcherImageUrlSet({imageKey:e,url:t})))}),[n]),Z=(0,a.useCallback)((e=>{(0,b.u0)({surface:"quickstart",step:"homescreen",control:"logo",action:"removed",metadata:{position:"topLogoUrl"===e?"top":"bottom"}}),j(e,null)}),[j]),E=(0,a.useCallback)((e=>{e&&e.type.startsWith("image/")&&(v(y.current),h(e))}),[]),S=(0,a.useCallback)((e=>{var t;y.current=e,null===(t=f.current)||void 0===t||t.click()}),[]),D=(0,a.useCallback)(((e,t)=>{y.current=e,E(t)}),[E]),M=(0,a.useCallback)((async(e,t)=>{if(l){x(!0);try{const n=new File([e],"logo.png",{type:"image/png"}),i=Pg(l,n,"topLogoUrl");if(!i)return;const o=await Ug({organizationId:r,file:n,filePath:i,isPublic:!0}),a=null===o||void 0===o?void 0:o.publicDownloadUrl;if(!a)throw new Error("missing download url");j("top"===t?"topLogoUrl":"bottomLogoUrl",a),(0,b.u0)({surface:"quickstart",step:"homescreen",control:"logo",action:"uploaded",metadata:{position:t}}),h(null)}catch(n){const e=n instanceof Error?n.message:void 0;o({severity:"error",message:e?"Failed to upload logo: ".concat(e):"Failed to upload logo"}),(0,Si.yR)(n,{name:"OnboardingLogoUpload.handleApply() error"})}finally{x(!1)}}}),[l,r,j,o]);return t?(0,p.jsxs)(i.Z,{children:[(0,p.jsx)("input",{ref:f,"data-testid":"onboardingLogoUpload_fileInput",type:"file",accept:"image/png,image/jpeg",hidden:!0,onChange:e=>{var t;E(null===(t=e.target.files)||void 0===t?void 0:t[0]),e.target.value=""}}),d?(0,p.jsx)(yw,{label:"Logo",url:d,onRemove:()=>Z("bottomLogoUrl")}):(0,p.jsx)(jw,{onOpenPicker:()=>S("bottom"),onFileDrop:e=>D("bottom",e)}),(0,p.jsx)(bw,{file:c,busy:C,defaultDest:"bottom",lockDest:!0,onClose:()=>h(null),onApply:M})]}):(0,p.jsxs)(i.Z,{children:[(0,p.jsx)("input",{ref:f,"data-testid":"onboardingLogoUpload_fileInput",type:"file",accept:"image/png,image/jpeg",hidden:!0,onChange:e=>{var t;E(null===(t=e.target.files)||void 0===t?void 0:t[0]),e.target.value=""}}),s||d?(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:s?(0,p.jsx)(yw,{label:"Top Logo",url:s,onRemove:()=>Z("topLogoUrl")}):(0,p.jsx)(jw,{label:"Top Logo",testId:"onboardingLogoUpload_dropzoneTop",onOpenPicker:()=>S("top"),onFileDrop:e=>D("top",e)})}),(0,p.jsx)(i.Z,{sx:{flex:1,minWidth:0},children:d?(0,p.jsx)(yw,{label:"Bottom Logo",url:d,onRemove:()=>Z("bottomLogoUrl")}):(0,p.jsx)(jw,{label:"Bottom Logo",testId:"onboardingLogoUpload_dropzoneBottom",onOpenPicker:()=>S("bottom"),onFileDrop:e=>D("bottom",e)})})]}):(0,p.jsx)(jw,{onOpenPicker:()=>S("top"),onFileDrop:e=>D("top",e)}),(0,p.jsx)(bw,{file:c,busy:C,defaultDest:g,onClose:()=>h(null),onApply:M})]})}));Zw.displayName="OnboardingLogoUpload";const ww=[{value:"custom-home",label:"Custom Home",icon:(0,p.jsx)(wh.Z,{})},{value:"boot-into-content",label:"Kiosk Mode",icon:(0,p.jsx)(uh.Z,{})}
3,{value:"unrestricted",label:"Unrestricted",icon:(0,p.jsx)(Mf.Z,{})}],Ew=(0,a.memo)((e=>{let{value:t,onChange:n}=e;return(0,p.jsx)(Ef.Z,{exclusive:!0,size:"small",value:t,onChange:(e,t)=>{t&&((0,b.u0)({surface:"quickstart",step:"homescreen",control:"mode",action:"selected",value:t}),n(t))},sx:{...Xj,gap:.375},children:(0,o.map)(ww,(e=>(0,p.jsxs)(Sf.Z,{value:e.value,sx:{...Qj,border:0,borderRadius:"6px !important",textTransform:"none","& .MuiSvgIcon-root":{flexShrink:0,fontSize:18,color:y.DG.grey[600]},"&:hover":{backgroundColor:"transparent",color:y.DG.grey[900]},"&.Mui-selected, &.Mui-selected:hover":{...Jj,"& .MuiSvgIcon-root":{color:y.DG.purple[700]}}},children:[e.icon,(0,p.jsx)(i.Z,{component:"span",sx:{minWidth:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e.label})]},e.value)))})}));Ew.displayName="OnboardingModePicker";const Sw=(0,a.memo)((e=>{let{images:t,value:n,onChange:i}=e;return(0,p.jsx)(m.Z,{spacing:.75,children:(0,p.jsxs)(ys.Z,{size:"small",fullWidth:!0,displayEmpty:!0,value:null!==n&&void 0!==n?n:"",onChange:e=>{var n,a;const r=e.target.value||null;(0,b.u0)({surface:"quickstart",step:"homescreen",control:"background",action:"selected",value:null!==(n=null===(a=(0,o.find)(t,(e=>e.imageUrl===r)))||void 0===a?void 0:a.name)&&void 0!==n?n:"custom"}),i(r)},children:[(0,o.map)(t,(e=>(0,p.jsx)(Hi.Z,{value:e.imageUrl,children:e.name},e.id))),n&&!(0,o.some)(t,(e=>e.imageUrl===n))&&(0,p.jsx)(Hi.Z,{value:n,children:"Custom background"})]})})}));Sw.displayName="BackgroundSelect";const Dw=(0,a.memo)((e=>{var t,n,i,r;let{onProgress:l,onReadyChange:s}=e;const c=(0,u.I0)(),h=(0,d.U5)(),m=Ks(),g=Xs((e=>e.kioskAppRef)),{approvedApps:v}=ld(),C=Xs((e=>e.approvedInstantApps)),x=(0,E.Ev)(S.F.InstantApps,(0,a.useMemo)((()=>(0,o.map)(C,"id")),[C])),f=(0,a.useMemo)((()=>{var e,t,n;const i=null===g||void 0===g?void 0:g.id;if(i)return null!==(e=null===(t=(0,o.find)(v,(e=>e.id===i)))||void 0===t?void 0:t.title)&&void 0!==e?e:null===(n=(0,o.find)(x,(e=>e.id===i)))||void 0===n?void 0:n.title}),[v,x,g]),b=null!==(t=Xs((e=>e.deviceExperienceMode)))&&void 0!==t?t:vp.w_.Default,y=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.customColors})),j=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.colorThemeRef})),Z=!!y||!!j,w=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.topLogoUrl})),D=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.bottomLogoUrl})),M=!!w||!!D,{documents:k}=(0,E.jV)(S.F.HomeScreenColorThemes,{sort:(0,a.useCallback)(((e,t)=>"default"===e.id?-1:e.name.localeCompare(t.name)),[])}),I=(0,a.useMemo)((()=>{var e,t,n,i;if(0===k.length)return"";const a=null!==(e=(0,o.find)(k,(e=>(0,o.isEqual)(e.colors,y))))&&void 0!==e?e:(0,o.find)(k,(e=>e.id===(null===j||void 0===j?void 0:j.id))),r=null!==(t=(0,o.find)(k,(e=>"default"===e.id)))&&void 0!==t?t:k[0];return null!==(n=null===(i=null!==a&&void 0!==a?a:r)||void 0===i?void 0:i.id)&&void 0!==n?n:""}),[k,y,j]),{documents:A}=(0,E.jV)(S.F.HomeScreenBackgroundImages,{sort:ze.gt}),R=null!==(n=null===(i=(0,o.find)(A,(e=>e.name.toLowerCase().includes("dunnottar"))))||void 0===i?void 0:i.imageUrl)&&void 0!==n?n:null===A||void 0===A||null===(r=A[0])||void 0===r?void 0:r.imageUrl,T=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.backgroundUrl})),P=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.environmentFileId})),L=Xs((e=>{var t,n;return null===(t=e.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n?void 0:n.forcePassthrough}))?"Passthrough":P?"3D environment":void 0,N=(0,a.useMemo)((()=>{var e;return L?{disabled:!0,summary:L,disabledTooltip:"".concat("Passthrough"===L?"Passthrough":"A 3D environment"," is set as the background for this configuration. Choose 360\xba image under Advanced Settings >
3 Logo & Background > Background to edit this setting, or edit the configuration directly from the Configurations page.")}:{summary:null===(e=(0,o.find)(A,(e=>e.imageUrl===T)))||void 0===e?void 0:e.name}}),[L,A,T]),U=(0,a.useCallback)((e=>{c(Js(e))}),[c]),F=b===vp.w_.Kiosk||b===vp.w_.KioskVideo?"boot-into-content":b===vp.w_.Default?"unrestricted":"custom-home",O=(0,a.useCallback)((e=>{U(Ys.U.actions.deviceExperienceModeChanged({deviceExperienceMode:e,subscriptionTierIsPremium:h}))}),[U,h]),_=(0,a.useCallback)((e=>{U(Ys.U.actions.launcherImageUrlSet({imageKey:"backgroundUrl",url:e,isCustomUploadedBackgroundImage:!1}))}),[U]),z=(0,a.useCallback)((e=>{var t;const n=null!==(t=(0,o.find)(k,(t=>t.id===e)))&&void 0!==t?t:k[0];n&&(U(Ys.U.actions.homeScreenCustomColorsSet({customColors:n.colors})),U(Ys.U.actions.homeScreenForcePassthroughSet({forcePassthrough:!1})),U(Ys.U.actions.homeScreenEnvironmentFileIdSet({environmentFileId:null})),U(Ys.U.actions.homeScreenCardStyleSet({cardStyle:vp.In.NO_PADDING})))}),[U,k]),B=(0,a.useCallback)((e=>{"boot-into-content"===e?(O(vp.w_.Kiosk),!T&&R&&_(R)):"unrestricted"===e?O(vp.w_.Default):(O(vp.w_.HomeScreen),Z||z(I),!T&&R&&_(R))}),[O,z,I,Z,T,R,_]);(0,a.useEffect)((()=>{"custom-home"===F&&(Z||z(I),!T&&R&&_(R))}),[F,Z,T,R,z,I,_]);const W=(0,a.useCallback)(((e,t)=>{U(Ys.U.actions.kioskAppSet({appId:e,type:t}))}),[U]),V=(0,a.useMemo)((()=>{var e;return[{key:"colorTheme",label:"Menu color",summary:null===(e=(0,o.find)(k,(e=>e.id===I)))||void 0===e?void 0:e.name,content:()=>(0,p.jsx)(mw,{themes:k,value:I,onChange:z})},{key:"background",label:"Background",...N,content:()=>(0,p.jsx)(Sw,{images:null!==A&&void 0!==A?A:[],value:T,onChange:_})},{key:"logos",label:"Logos",skip:!M,content:()=>(0,p.jsx)(Zw,{})},{key:"deviceMenu",label:"Shortcut Menu",content:()=>(0,p.jsx)(Iw,{})}]}),[I,k,z,M,N,A,T,_]),G=(0,a.useMemo)((()=>[{key:"kioskApp",label:"Kiosk app",summary:f,content:()=>{var e;return(0,p.jsx)(rC,{value:null!==(e=null===g||void 0===g?void 0:g.id)&&void 0!==e?e:"",onChange:W,hideNone:!0,autoSelectFirstInList:!0,privilege:"configurations"})}},{key:"background",label:"Background",...N,content:()=>(0,p.jsx)(Sw,{images:null!==A&&void 0!==A?A:[],value:T,onChange:_})},{key:"logo",label:"Logo",skip:!D,content:()=>(0,p.jsx)(Zw,{bottomOnly:!0})},{key:"deviceMenu",label:"Shortcut Menu",content:()=>(0,p.jsx)(Iw,{})}]),[g,f,W,D,N,A,T,_]),H=(0,a.useMemo)((()=>[{key:"experience",label:"Device Experience",summary:"custom-home"===F?"Custom Home":"boot-into-content"===F?"Kiosk Mode":"Unrestricted",content:()=>(0,p.jsx)(Ew,{value:F,onChange:B})},..."custom-home"===F?V:"boot-into-content"===F?G:[]]),[F,B,V,G]);return(0,p.jsx)(Cw,{steps:H,progressKey:m?"".concat(m,":").concat(F):void 0,onProgress:l,onReadyChange:s})}));Dw.displayName="OnboardingSimpleAppearancePanel";const Mw=[["wifi","Wi-Fi","Let users join Wi-Fi networks",Im],["guardian","Guardian","Redraw the play-space boundary",Sm],["cast","Cast","Cast the headset view to a
3screen",Dm],["bluetooth","Bluetooth","Pair Bluetooth accessories",Pm.Z],["controller","Controller","Manage controllers",Mm],["screenRecording","Camera","Screenshot or record",Tm],["passthrough","Passthrough","Toggle the real-world view",Rm],["ipdAdjustment","IPD","Adjust lens spacing",km],["adminSettings","Admin","Open admin settings",Em]],kw={padding:1.25,borderRadius:5,bgcolor:y.DG.grey[1100],color:y.DG.white,display:"flex",flexWrap:"wrap",justifyContent:"space-evenly",columnGap:.5,rowGap:.5},Iw=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),n=null!==(e=Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.hiddenSettings})))&&void 0!==e?e:{},r=zv(),l=(0,o.filter)(Mw,(e=>{let[t]=e;return(0,o.includes)(r,t)})),s=(0,a.useCallback)((e=>{t(Js(Ys.U.actions.homeScreenSettingVisibilityToggled({button:e})))}),[t]);return(0,p.jsxs)(m.Z,{spacing:.75,children:[(0,p.jsx)(i.Z,{sx:kw,children:(0,o.map)(l,(e=>{let[t,i,o,a]=e;return(0,p.jsx)(ee.Z,{title:o,arrow:!0,placement:"top",children:(0,p.jsxs)(m.Z,{alignItems:"center",spacing:.5,role:"button",tabIndex:0,"aria-pressed":!n[t],"aria-label":"".concat(i,": ").concat(o),onClick:()=>s(t),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),s(t))},sx:{cursor:"pointer",minWidth:0,paddingX:1.25,paddingY:1,borderRadius:3,opacity:n[t]?.35:1,"&:hover":{bgcolor:hm(y.DG.white,.1)}},children:[(0,p.jsx)(a,{sx:{fontSize:26}}),(0,p.jsx)(v.Z,{variant:"caption",sx:{fontSize:11,lineHeight:1.15,textAlign:"center",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]})},t)}))}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",textAlign:"center",children:"Click an icon to hide it from the headset menu."})]})}));Iw.displayName="OnboardingSimpleMenuPanel";const Aw=e=>{let{configuration:t,mode:n,extraBaseHeight:o=0}=e;const{ref:a,width:r}=(0,zu.m)(),l=(e=>e?e/900:0)(r),s=600+o;return(0,p.jsx)(i.Z,{ref:a,sx:{width:"100%",height:s*l,overflow:"hidden"},children:(0,p.jsx)(i.Z,{sx:{width:900,height:s,transform:"scale(".concat(l,")"),transformOrigin:"top left","& > *":{height:"100%",justifyContent:"center"}},children:(0,p.jsx)(Ym,{configuration:t,mode:n})})})},Rw=["content","settings","layout","images","colors"],Tw="Could not save your home screen. Check your connection and retry.",Pw=(0,a.memo)((e=>{let{onContinue:t,onCommit:n,onCommitted:o,onProgress:r}=e;const[l,s]=(0,a.useState)(!1),[d,c]=(0,a.useState)("content"),[u,h]=(0,a.useState)(!1),[g,x]=(0,a.useState)(null),[f,j]=(0,a.useState)(!1),Z=Xs((e=>e)),w=Xs((e=>e.deviceExperienceMode)),E=w===vp.w_.Kiosk?"shortcutMenu":"homeScreen",S=(Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.topLogoUrl}))?1:0)+(Xs((e=>{var t;return null===(t=e.customLauncherSettings)||void 0===t?void 0:t.bottomLogoUrl}))?1:0),D=0===S?0:.95*(600+80*S)-600,M=(0,a.useCallback)((()=>{u||(h(!0),x(null),n().then((e=>{e?(null===o||void 0===o||o(e),t()):(x(Tw),h(!1))})).catch((()=>{x(Tw),h(!1)})))}),[u,n,o,t]);return(0,p.jsxs)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:3,width:"100%",alignItems:"flex-start"},children:[Z&&(0,p.jsx)(i.Z,{sx:{width:l?"40%":"56%",flexShrink:0},children:(0,p.jsxs)(m.Z,{spacing:1.5,children:[w===vp.w_.Default?(0,p.jsxs)(m.Z,{alignItems:"center",justifyContent:"center",spacing:1.5,sx:{width:"100%",aspectRatio:"900 / 600",borderRadius:3,padding:4,textAlign:"center",bgcolor:y.DG.grey[1100],color:y.DG.white},children:[(0,p.jsx)(v.Z,{variant:"h6",children:"Default device menus"}),(0,p.jsx)(v.Z,{variant:"body2",sx:{maxWidth:340,opacity:.7},children:"Devices show the built-in system home screen and menus. There's no custom home to preview."})]}):(0,p.jsx)(Aw,{configuration:Z,mode:E,extraBaseHeight:D}),!l&&(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center"},children:(0,p.jsx)(C.Z,{size:"small",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"homescreen",control:"advanced-toggle",action:"toggled",value:"advanced"}),s(!0)},sx:{textTransform:"none",color:"text.secondary",fontSize:12,fontWeight:400,minWidth:0,paddingTop:0,paddingBottom:0},children:"Advanced settings"})})]})}),(0,p.jsx)(m.Z,{spacing:1.5,sx:{flex:1,minWidth:0},children:l?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.Z,{children:(0,p.jsx)(C.Z,{size:"small",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"homescreen",control:"advanced-toggle",action:"toggled",value:"simple"}),s(!1)},sx:{textTransform:"none"},children:"\u2190 Back to simple setup"})}),(0,p.jsx)(i.Z,{sx:{width:"100%",maxHeight:460,overflow:"auto"},children:(0,p.jsx)(nC,{visibleTabIds:[...Rw],activeTabId:d,onActiveTabIdC
3hange:c})})]}):(0,p.jsx)(Dw,{onProgress:r,onReadyChange:j})}),!l&&f&&(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1.5,sx:{width:"100%"},children:[g&&(0,p.jsx)(v.Z,{variant:"body2",color:"error",children:g}),(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,disabled:u,onClick:M,sx:{...Kj,width:"50%"},children:u?(0,p.jsx)(Zi.Z,{size:18,sx:{color:"inherit"}}):"Continue"})]})]})}));Pw.displayName="HomescreenEditor";const Lw=(0,a.memo)((e=>{const{onNext:t,trialConfigurationId:n,trialConfigurationError:o,commitTrialConfiguration:r,onSetupProgress:s,onConfigurationCommitted:d}=e,{organizationId:c}=(0,w.P)(),u=(0,a.useMemo)((()=>"/o/".concat(c,"/configurations/").concat(n,"/home-screen")),[c,n]),h=(0,a.useCallback)((e=>{const t=e.target.closest("a");null!==t&&void 0!==t&&t.href&&(new URL(t.href).pathname.startsWith(u)||(e.preventDefault(),window.open(t.href,"_blank","noopener,noreferrer")))}),[u]);return o||!n?(0,p.jsx)(m.Z,{alignItems:"center",spacing:2,sx:{paddingY:8},children:o?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{color:"error",children:o}),(0,p.jsx)(C.Z,{onClick:t,sx:{textTransform:"none"},children:"Skip this step"})]}):(0,p.jsx)(Zi.Z,{size:32,sx:{color:y.DG.primary[200]}})}):(0,p.jsx)(l.VA,{initialEntries:[u],children:(0,p.jsx)(l.AW,{path:"/o/:organizationId/configurations/:configurationId/home-screen",children:(0,p.jsx)(rd,{children:(0,p.jsx)(Aj,{shareDialogWizardMode:!0,children:(0,p.jsx)(i.Z,{onClickCapture:h,sx:{display:"contents"},children:(0,p.jsx)(Pw,{onContinue:t,onCommit:r,onCommitted:d,onProgress:s})})})})})})}));Lw.displayName="OnboardingHomescreenStep";var Nw=n(41405),Uw=n(1924);const Fw={default:!0,content:!0,devices:!0,configurations:!0,organization:!1,billing:!1},Ow=e=>{const t=(0,u.I0)(),{organizationId:n}=(0,w.P)(),{notifyThunkResult:i}=(0,ie.o)();return(0,a.useCallback)((async a=>{const r=await t((0,Uw.jc)({organizationId:n,...a}));i({result:r,success:{message:"User added"},error:{message:"Error adding user"}}),"fulfilled"===r.meta.requestStatus&&(0,o.isObject)(r.payload)&&(0,o.isString)(r.payload.signUpKeyId)&&e(r.payload.signUpKeyId)}),[t,i,n,e])},_w=(0,a.memo)((e=>{let{onInviteSent:t}=e;const{sending:n,sendInvite:r}=(()=>{const e=(0,u.I0)(),{organizationId:t}=(0,w.P)(),{notify:n}=(0,ie.o)(),[i,r]=(0,a.useState)(!1),l=(0,a.useCallback)((async a=>{if(i)return!1;r(!0);const l=await e((0,Uw.jc)({organizationId:t,email:a,role:pe.Z.Manager,privileges:Fw}));return r(!1),"fulfilled"===l.meta.requestStatus?(n({severity:"success",message:"Invite sent to ".concat(a)}),!0):(Uw.jc.rejected.match(l)&&l.meta.condition||n({severity:"error",message:(0,o.isString)(l.payload)?l.payload:"Error sending invite"}),!1)}),[i,e,t,n]);return{sending:i,sendInvite:l}})(),{privileges:l}=(0,w.P)(),s=!!l.organization,[d,c]=(0,a.useState)(""),[h,g]=(0,a.useState)([]),x=(0,a.useRef)(null),f=(e=>(0,Nw.HN)().test(e))(d),y=(0,a.useCallback)((async()=>{if(!s||!f||n)return;const e=d;var i;await r(e)&&((0,b.u0)({surface:"quickstart",step:"preview",control:"invite",action:"sent"}),g((t=>[...t,e])),c(""),null===(i=x.current)||void 0===i||i.focus(),null===t||void 0===t||t())}),[s,f,n,r,d,t]);return(0,p.jsxs)(m.Z,{spacing:1.5,sx:{width:"100%",maxWidth:680},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"stretch",children:[(0,p.jsx)(Ul.z,{inputRef:x,value:d,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&y()},placeholder:"[email protected]",inputProps:{"aria-label":"Teammate email","data-testid":"onboardingInviteCard_emailField"},autoFocus:!0,fullWidth:!0,size:"small",disabled:!s,sx:{flex:1}}),(0,p.jsx)(ee.Z,{title:s?"":"Organization privilege required to invite users",children:(0,p.jsx)(i.Z,{component:"span",sx:{display:"inline-flex",flexShrink:0},children:(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,onClick:()=>{y()},disabled:!s||!f||n,"data-testid":"onboardingInviteCard_sendButton",sx:[Kj,{whiteSpace:"nowrap",paddingY:0}],children:"Send invite"})})})]}),h.length>0&&(0,p.jsx)(m.Z,{spacing:.5,"data-testid":"onboardingInviteCard_sentList",children:(0,o.map)(h,(e=>(0,p.jsxs)(m.Z,{direction:"row",spacing:.75,alignItems:"center",children:[(0,p.jsx)(ng.Z,{sx:{fontSize:16,color:"success.main"}}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["Invite sent to ",e]})]},e)))})]})}));_w.displayName="OnboardingInviteCard";const zw=(0,a.memo)((e=>{let{trialConfigurationId:t,committedConfiguration:n,onAnyInviteSent:o}=e;const a=(0,xo.ky)(S.F.Configurations,null!==t&&void 0!==t?t:void 0),r=n&&n.id===t?n:a;return(0,p.jsxs)(m.Z,{spacing:2.5,alignItems:"center",sx:{width:"100%"},children:[(0,p.jsx)(_w,{onInviteSent:o}),r&&(0,p.jsxs)(m.Z,{spacing:.75,alignItems:"center",sx:{width:"100%"},children:[(0,p.jsx)(i.Z,{sx:{width:"100%",maxWidth:680,borderRadius:3,overflow:"hidden"},children:(0,p.jsx)(Aw,{configuration:r,mode:"homeScreen"})}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"You can keep editing this home screen anytime under Configurations."})]})]})}));zw.displayName="OnboardingPreviewStep";const Bw=n.p+"static/media/quest3-hero.609e4e83efa6c4bcfbd1.png",Ww=["Add apps and videos to your library","Customize the in-headset experience","Deploy to a headset and monitor it live"],Vw={paddingX:4,paddingY:1.5,borderRadius:999,fontFamily:y.ht,fontWeight:700,fontSize:16,textTransform:"none",boxShadow:y.mq,bgcolor:y.DG.primary[200],color:y.DG.white,"&:hover":{bgcolor:y.DG.primary[300]}},Gw=(0,a.memo)((e=>{let{onNext:t}=e;return(0,p.jsx)(i.Z,{sx:{width:"100%",flex:1,minHeight:"100%",display:"flex",alignItems:"center",justifyContent:"center",paddingX:{xs:4,md:8},paddingY:6},children:(0,p.jsxs)(m.Z,{direction:{xs:"column",md:"row"},spacing:{xs:5,md:9},alignItems:"center",sx:{maxWidth:1100,width:"100%"},children:[(0,p.jsxs)(m.Z,{spacing:3.5,alignItems:{xs:"center",md:"flex-start"},sx:{flex:1,maxWidth:520},children:[(0,p.jsxs)(m.Z,{spacing:2,alignItems:{xs:"center",md:"flex-start"},children:[(0,p.jsx)(v.Z,{variant:"h2",sx:{fontFamily:y.ht,fontWeight:700,lineHeight:1.08,textAlign:{xs:"center",md:"left"}},children:"Let's set up your headset"}),(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",sx:{textAlign:{xs:"center",md:"left"}},children:"ManageXR is mission control for your VR fleet: one place to deploy content, customize the experience, and manage every device remotely. In this quickstart you will:"})]}),(0,p.jsx)(m.Z,{spacing:1.5,alignItems:"flex-start",children:Ww.map((e=>(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"center",children:[(0,p.jsx)(Vi.Z,{sx:{fontSize:22,color:y.DG.primary[200]}}),(0,p.jsx)(v.Z,{variant:"body2",sx:{fontWeight:600},children:e})]},e)))}),(0,p.jsx)(C.Z,{onClick:t,endIcon:(0,p.jsx)(hp.Z,{}),sx:Vw,children:"Choose your content"})]}),(0,p.jsx)(i.Z,{sx:{flex:1,display:"flex",justifyContent:"center"},children:(0,p.jsx)(i.Z,{component:"img",src:Bw,alt:"VR headset",sx:{width:{xs:260,md:38
30},filter:"drop-shadow(0 34px 54px ".concat((0,Dr.Fq)(y.DG.primary[200],.22),")")}})})]})})}));Gw.displayName="OnboardingWelcomeStep";var Hw=n(62002),qw=n(18437);const Yw=e=>{if((0,o.isUndefined)(e)||""===e)return null;const t=Xw(e,"CERTIFICATE");return"invalid"===t?"Invalid certificate format":t},Kw=e=>{if((0,o.isUndefined)(e)||""===e.trim())return null;if((e=>{const t=e.trim().split("\n");return t.some((e=>e.startsWith("Proc-Type: 4,ENCRYPTED")))||t.some((e=>e.startsWith("DEK-Info:")))})(e))return"Invalid key format: The key you provided is encrypted";const t=e.trim().split("\n"),n=["PRIVATE KEY","RSA PRIVATE KEY"];let i=null,a=null;for(const o of n){const e=t.findIndex((e=>e.trim()==="-----BEGIN ".concat(o,"-----"))),n=t.findIndex((e=>e.trim()==="-----END ".concat(o,"-----")));if(-1!==e&&-1!==n&&n>e){i=o,a=n;break}if(-1!==e||-1!==n)return"Invalid private key prefix or suffix"}const r=i&&null!==a?t.slice(0,a+1).join("\n"):null;if(r){const e=Xw(r,i);if("invalid"===e)return"Invalid private key format";if(e)return"Invalid key format: "+e}const l=null!==a?a+1:0,s=t.slice(l).join("\n").trim();if(s){const e=Yw(s);if(e)return e.includes("Invalid certificate format")?e:"Invalid certificate format: "+e}return!r&&s?"Missing key: Provide a private key or RSA private key":r&&!s?"Missing certificate":null},Xw=(e,t)=>{const n=e.trim().split("\n"),i="-----BEGIN ".concat(t,"-----"),o="-----END ".concat(t,"-----");if(n.length<3)return"invalid";if(!n[0]||n[0].trim()!==i)return"Invalid prefix";const a=n[n.length-1];if(!a||a.trim()!==o)return"Invalid suffix";const r=[];let l="",s=!1,d=!1;for(const u of n){const e=u.trim();if(e===i){if(s)return"Invalid format: nested BEGIN markers";s=!0,l=u+"\n"}else if(e===o){if(!s)return"Invalid format: unexpected END marker";l+=u,r.push(l),l="",s=!1,d=!0}else if(s)l+=u+"\n";else if(""!==e&&d)return"Invalid format: content outside of BEGIN/END markers"}const c=/^[A-Za-z0-9+/=]+$/;for(const u of r){const e=u.trim().split("\n").slice(1,-1).join("");if(!c.test(e)||e.length%4!==0)return"invalid"}return null},Qw=bi.Tv.size+1,Jw=()=>{const e=ed((()=>{const{organizationId:e}=(0,w.P)(),t=id();return(0,a.useMemo)((()=>{if(t&&(0,o.isEmpty)(t.configRefs))return;const n=S.F.DeviceWebConsoleSettings,i=(0,Os.N$)(n),a=(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,e)),r=(0,td.ar)("model","in",Array.from(bi.Tv)),l=(0,td.xD)((0,td.ar)("model",">=","SM-"),(0,td.ar)("model","<","SM.")),s=(0,td.or)(r,l);if(t){const r=Math.floor(nd.ps/Qw),l=(0,o.chunk)(t.configRefs,r);return{id:(0,nd.tc)({collection:n,organizationId:e,filter:"android14Capable:configs:".concat(t.configurationIds.join(","))}),query:(0,o.map)(l,(e=>(0,td.IO)(i,(0,td.xD)(a,s,(0,td.ar)("deviceGroupRef","in",e)))))}}return{id:(0,nd.tc)({collection:n,organizationId:e,filter:"android14Capable"}),query:(0,td.IO)(i,(0,td.xD)(a,s))}}),[t,e])})());return e?e>0:void 0};let $w;!function(e){e.AUTH="AUTH",e.CA="CA"}($w||($w={}));const eE=e=>e.replace(/\s+/g," ").trim().toLowerCase(),tE=e=>!(!e.subject||!e.issuer)&&eE(e.subject)===eE(e.issuer),nE=(e,t)=>{if(!e.issuer||!t.subject)return!1;const n=e=>e.replace(/\s+/g," ").trim().toLowerCase();return n(e.issuer)===n(t.subject)},iE=e=>{var t,n;const i=new RegExp("\\b(".concat(["content\\s*keeper","cisco[\\s_-]*umbrella","dns[\\s_-]*filter","dnsfilter","web[\\s_-]*titan","webtitan","iboss","forcepoint","smoothwall"].join("|"),")\\b"),"i");return i.test(null!==(t=e.subject)&&void 0!==t?t:"")||i.test(null!==(n=e.issuer)&&void 0!==n?n:"")},oE=e=>!!e.validTo&&e.validTo<Date.now(),aE=e=>!!e.validFrom&&e.validFrom>Date.now(),rE=e=>0===e.length?[]:e.map(((e,t)=>({level:t,certificates:[e]}))),lE=(e,t)=>{const n=rE(e),i=((e,t)=>{if((0,o.isEmpty)(e))return{type:"nothing_selected",message:"Please select at least one certificate",severity:"error"};const n=e=>t.find((t=>t.id===e)),i=[];for(let o=0;o<e.length;o++){var a;const t=n(null!==(a=e[o])&&void 0!==a?a:"");if(!t)return{type:"missing_certificate",message:"Certificate has been deleted. Please select a different certificate.",severity:"error",level:o};i.push(t)}const r=i.filter(tE);if((0,o.isEmpty)(r))return{type:"missing_root",message:"Invalid chain. Missing root certificate.",severity:"error"};for(let o=0;o<i.length;o++){const e=i[o];if(e&&!tE(e)&&!i.some((t=>nE(e,t))))return{type:"issuer_mismatch",message:"Invalid chain. Missing certificate with subject ".concat(e.issuer),severity:"error",level:o}}for(const o of e){const e=n(o);if(e){if(oE(e))return{type:"expired",message:"".concat(e.name," is expired. Replace with a valid certificate."),severity:"error"};if(aE(e))return{type:"not_yet_valid",message:"".concat(e.name," is not yet valid. Replace with a valid certificate."),severity:"error"}}}})(e,t);return 0===e.length?{isValid:!1,warnings:i?[i]:[],levels:[],totalCertificates:0}:i?{isValid:!1,warnings:[i],levels:n,totalCertificates:e.length}:{isValid:!0,warnings:[{type:"valid",message:"Valid certificate chain",severity:"success"}],levels:n,totalCertificates:e.length}},sE=(e,t)=>{const n=rE(e),i=((e,t)=>{if((0,o.isEmpty)(e))return{type:"nothing_selected",message:"Please select at least one certificate",severity:"error"};const n=e=>t.find((t=>t.id===e)),i=[];for(let o=0;o<e.length;o++){var a;const t=n(null!==(a=e[o])&&void 0!==a?a:"");if(!t)return{type:"missing_certificate",message:"Certificate has been deleted. Please select a different certificate.",severity:"error",level:o};i.push(t)}const r=i.filter((e=>e.subtype===$w.AUTH));if(0===r.length)return{type:"missing_auth",message:"Chain must include an authentication certificate",severity:"error"};if(r.length>1)return{type:"multiple_auth",message:"Chain must include exactly one authentication certificate",severity:"error"};for(let o=0;o<i.length;o++){const e=i[o];if(e&&(e.subtype!==$w.AUTH&&!i.some((t=>t!==e&&nE(t,e)))))return{type:"issuer_mismatch",message:"".concat(e.name," is not related to any other certificate in the chain"),severity:"error",level:o}}for(const o of e){const e=n(o);if(e){if(oE(e))return{type:"expired",message:"".concat(e.name," is expired. Replace with a valid certificate."),severity:"error"};if(aE(e))return{type:"not_yet_valid",message:"".concat(e.name," is not yet valid. Replace with a valid certificate."),severity:"error"}}}const l=r[0];return l&&tE(l)?{type:"self_signed_auth",message:"This authentication certificate is self-signed. You may need to add it to your trust store directly, or obtain a new authentication certificate signed by a trusted CA.",severity:"warning"}:void 0})(e,t);return 0===e.length?{isValid:!1,warnings:i?[i]:[],levels:[],totalCertificates:0}:i?{isValid:"error"!==i.severity,warnings:[i],levels:n,totalCertificates:e.length}:{isValid:!0,warnings:[{type:"valid",message:"Valid certificate chain",severity:"success"}],levels:n,totalCertificates:e.length}},dE=e=>{if(!e)return;const t=Date.now();return e<t?void 0:(e-t)/864e5},cE=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;if(!e.validTo)return!1;const n=dE(e.validTo);return!!n&&(n>0&&n<=t)},uE=e=>!e.subtype||!(0,o.isNumber)(e.validTo)||!(0,o.isNumber)(e.validFrom)||!e.subject||!e.issuer,pE=e=>{if(uE(e))return"invalid";const t=Date.now();return e.validFrom&&t<e.validFrom?"not-yet-valid":e.validTo&&t>e.validTo?"expired":cE(e)?"expiring-soon":"valid"}
3,hE=e=>{if(!e.subtype)return"Invalid format";if(!e.subject||!e.issuer)return"Invalid format";const t=eE(e.subject)===eE(e.issuer);return e.subtype===$w.CA?t?"Root":"Intermediate":t?"Self-signed Auth":"Auth"},mE=e=>hE({subtype:e.subtype,subject:e.subject,issuer:e.issuer}),gE=(e,t)=>{var n;if(e.isValid&&e.subject){const t=(e=>{var t,n;if(!e)return"Unknown";const i=e.match(/CN=([^,]+)/);return null!==(t=null===i||void 0===i||null===(n=i[1])||void 0===n?void 0:n.trim())&&void 0!==t?t:"Unknown"})(e.subject);if("Unknown"!==t)return t}return null!==(n=e.sourceFileName)&&void 0!==n?n:"Certificate ".concat(t)},vE=/-----BEGIN (RSA |EC |ENCRYPTED |DSA |)PRIVATE KEY-----[\s\S]*?-----END \1PRIVATE KEY-----/g;function CE(e){return e.replace(vE,"").trim()}function xE(e){return e.replace(/[/\\:*?"<>|]/g,"_")}const fE=340,bE="__ADD_NEW__",yE={fontWeight:500,lineHeight:1.3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},jE={lineHeight:1.3,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},ZE=e=>{let{label:t,value:n,options:r,onChange:s,disabled:d=!1,privilege:c="content",multiple:u=!1,selectedValues:h=[],onMultipleChange:g,helperText:C,dropdownValidationMessage:f,error:b=!1,required:j=!1,infoTooltip:Z}=e;const E=(0,l.k6)(),{buildOrganizationPath:S}=(0,w.P)(),D=(0,a.useCallback)((e=>{if(e.target.value===bE){const e=S((e=>e.wifiNetworks.certificates.create));window.open(e,"_blank")}else null===s||void 0===s||s(e.target.value)}),[s,S]),k=(0,a.useCallback)((e=>{if(g)if("__ADD_NEW__"!==e)(0,o.includes)(h,e)?g(h.filter((t=>t!==e))):g([...h,e]);else{const e=S((e=>e.wifiNetworks.certificates.create));window.open(e,"_blank")}}),[h,g,S]),I=(0,a.useCallback)((e=>{const t=S((e=>e.wifiNetworks.certificates.certificate),{certificateId:e});E.push(t)}),[S,E]),A=r.find((e=>e.value===n)),R=r.filter((e=>(0,o.includes)(h,e.value))),T="warning"===(null===f||void 0===f?void 0:f.severity);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",spacing:1,width:"100%",children:[(0,p.jsx)(zi.W,{privilege:c,placement:"right-start",children:(0,p.jsx)(i.Z,{sx:{width:fE},children:(0,p.jsxs)(Ln.Z,{inputProps:{sx:{...(0,o.isUndefined)(A)?{color:"text.secondary"}:{}}},label:t,value:u?h:n,onChange:D,select:!0,disabled:d,fullWidth:!0,margin:"none",error:b,helperText:C,required:j,sx:{...T&&{"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:y.DG.warning[300]},"&:hover fieldset":{borderColor:y.DG.warning[300]},"&.Mui-focused fieldset":{borderColor:y.DG.warning[300]}},"& .MuiFormLabel-root":{color:y.DG.warning[300],"&.Mui-focused":{color:y.DG.warning[300]}},"& .MuiFormHelperText-root":{color:y.DG.warning[300]}}},SelectProps:{displayEmpty:!0,multiple:u||void 0,MenuProps:{autoFocus:!u&&void 0,disableAutoFocusItem:!!u||void 0,PaperProps:{sx:{maxHeight:600}},MenuListProps:{sx:{paddingBottom:0}}},renderValue:()=>u?0===R.length?(0,p.jsx)(v.Z,{variant:"body1",sx:{color:"text.secondary",paddingY:1},children:"None"}):(0,p.jsx)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:1,py:.5,paddingBottom:0},onClick:e=>e.stopPropagation(),children:(0,o.map)(R,(e=>{const t=(e=>{var t;return{subtype:null!==(t=e.subtype)&&void 0!==t?t:$w.CA,subject:e.subject,issuer:e.issuer}})(e),n=(e=>{if(!e.subtype)return"?";
3if(e.subtype===$w.CA)return tE(e)?"R":"I";return"A"})(t),o=e.statusColor===y.DG.error[300],a=e.statusColor===y.DG.warning[300],r=(0,p.jsxs)(i.Z,{children:[e.subject&&(0,p.jsxs)(i.Z,{sx:{mb:e.issuer?1:0},children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{fontSize:"0.75rem",fontWeight:500},children:"Subject:"}),(0,p.jsx)(v.Z,{variant:"body2",sx:{fontSize:"0.75rem"},children:e.subject})]}),e.issuer&&(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{fontSize:"0.75rem",fontWeight:600},children:"Issuer:"}),(0,p.jsx)(v.Z,{variant:"body2",sx:{fontSize:"0.75rem"},children:e.issuer})]})]});return(0,p.jsx)(ee.Z,{title:r,placement:"right",children:(0,p.jsx)(ke.Z,{avatar:(0,p.jsx)(i.Z,{component:"span",sx:{width:24,height:24,minWidth:24,borderRadius:"50%",bgcolor:o?y.DG.error[300]:a?y.DG.warning[300]:"grey.600",display:"flex",alignItems:"center",justifyContent:"center",WebkitTextFillColor:y.DG.grey[100]},children:(0,p.jsx)(v.Z,{children:n})}),label:e.label,size:"medium",variant:"filled",onClick:t=>{t.stopPropagation(),I(e.value)},onDelete:()=>{k(e.value)},onMouseDown:e=>e.stopPropagation(),sx:{...y.cp.tooltip,textTransform:"none",cursor:"pointer",bgcolor:o?y.DG.error[50]:a?y.DG.warning[50]:"grey.200","&:hover":{bgcolor:o?y.DG.error[100]:a?y.DG.warning[100]:"grey.300"},color:o?y.DG.error[300]:a?y.DG.warning[300]:"grey.800","& .MuiChip-deleteIcon":{color:o?y.DG.error[300]:a?y.DG.warning[300]:"grey.500","&:hover":{color:o?y.DG.error[300]:a?y.DG.warning[300]:"grey.700"}},"& .MuiChip-avatar":{ml:.5,mr:-.5}}})},e.value)}))}):(0,o.isUndefined)(A)?"Select a certificate":(0,p.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:.25,width:1,overflow:"hidden",paddingY:1},children:[(0,p.jsx)(v.Z,{variant:"body1",sx:{...yE,lineHeight:1.2},children:A.label}),A.validTo&&(0,p.jsx)(v.Z,{variant:"body2",sx:{...jE,color:y.DG.grey[600],lineHeight:1.2},children:(0,M.g9)(A.validTo)})]})},children:[(0,o.map)(r,(e=>{const t=u?(0,o.includes)(h,e.value):n===e.value;return(0,p.jsxs)(Hi.Z,{value:u?void 0:e.value,onClick:u?t=>{t.stopPropagation(),k(e.value)}:void 0,sx:{py:e.subtype?2:1.5,px:2,width:fE},children:[u&&(0,p.jsx)(Pi.Z,{checked:t,sx:{mr:1,p:0},disableRipple:!0}),e.subtype?(0,p.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",gap:.5,overflow:"hidden",flex:1},children:[(0,p.jsx)(v.Z,{variant:"body1",sx:{...yE,color:e.statusColor},children:e.label}),(0,p.jsxs)(v.Z,{variant:"body2",sx:{...jE,color:e.statusColor||y.DG.grey[600]},children:[hE(e),e.validTo&&(0,p.jsxs)(p.Fragment,{children:[" \xb7 ",(0,M.g9)(e.validTo)]})]})]}):e.label]},e.value)})),f&&(0,p.jsx)(i.Z,{component:"li",sx:{listStyle:"none",position:"sticky",bottom:49,backgroundColor:"background.paper",width:fE,padding:0,margin:0,paddingY:1.5,zIndex:1,pointerEvents:"auto"},children:(0,p.jsxs)(i.Z,{sx:{backgroundColor:"success"===f.severity?y.DG.success[50]:"warning"===f.severity?y.DG.warning[50]:y.DG.error[50],border:"success"===f.severity?"1px solid ".concat(y.DG.success[200]):"warning"===f.severity?"1px solid ".concat(y.DG.warning[200]):"1px solid ".concat(y.DG.error[200]),borderRadius:1,padding:1.5,marginX:2,maxWidth:308,display:"flex",gap:1},children:["success"===f.severity&&(0,p.jsx)(Vi.Z,{sx:{color:y.DG.success[300],fontSize:"1.25rem",mt:.125}}),(0,p.jsxs)(i.Z,{sx:{flex:1},children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"success"===f.severity?y.DG.success[300]:"warning"===f.severity?y.DG.warning[300]:y.DG.error[300],fontSize:"0.875rem",fontWeight:500},children:f.title}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:y.DG.grey[600],fontSize:"0.875rem",mt:.5,whiteSpace:"normal",wordBreak:"break-word"},children:f.description})]})]})}),(0,p.jsx)(Hi.Z,{value:u?void 0:bE,onClick:u?e=>{e.stopPropagation(),k(bE)}:void 0,sx:{py:1.5,px:2,color:y.DG.primary,width:fE,position:"sticky",bottom:0,backgroundColor:"background.paper",borderTop:"1px solid ".concat(y.DG.grey[300]),zIndex:2,pointerEvents:"auto","&:hover":{backgroundColor:"background.paper"}},children:(0,p.jsxs)(i.Z,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[(0,p.jsx)(v.Z,{sx:{flex:1},children:"+ Upload new certificate"}),(0,p.jsx)(Mu.Z,{sx:{fontSize:16}})]})})]})})}),Z&&(0,p.jsx)(Fi._,{tooltipContent:Z,TooltipProps:{disableInteractive:!1,placement:"right",componentsProps:{tooltip:{sx:{bgcolor:"grey.800",border:"none",boxShadow:"none"}}}},children:(0,p.jsx)(x.Z,{size:"small",children:(0,p.jsx)(cc.Z,{})})})]})},wE=e=>{let{title:t,description:n,titleColor:i}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{component:"span",display:"block",variant:"body2",sx:{color:i,fontSize:"inherit",lineHeight:1.4},children:t}),(0,p.jsx)(v.Z,{component:"span",display:"block",variant:"body2",sx:{color:y.DG.grey[600],fontSize:"inherit",lineHeight:1.4,marginTop:.25},children:n})]})},EE=e=>{let{selectedCertificateIds:t,onCertificatesChange:n,disabled:i=!1}=e;const r=(0,E.D)(S.F.Certificates),l=(0,a.useMemo)((()=>(0,o.map)(r.documents,(e=>{const t=uE(e),n=oE(e)||aE(e),i=cE(e);let o;return t||n?o=y.DG.error[300]:i&&(o=y.DG.warning[300]),{value:e.id,label:e.name,subtype:e.subtype,subject:e.subject,issuer:e.issuer,validTo:e.validTo,validFrom:e.validFrom,statusColor:o}})).sort(((e,t)=>(0,ze.bL)(e.label,t.label)))),[r.documents]),s=(0,a.useMemo)((()=>sE(t,r.documents)),[t,r.documents]),d=(0,a.useMemo)((()=>{const e=(0,o.filter)(s.warnings,(e=>"error"===e.severity&&("issuer_mismatch"===e.type||"missing_auth"===e.type||"multiple_auth"===e.type||"invalid_chain"===e.type||"nothing_selected"===e.type||"expired"===e.type||"not_yet_valid"===e.type||"missing_certificate"===e.type)));if(e.length>0){const a=e[0];if(!a)return;switch(a.type){case"issuer_mismatch":{var n;const e=(0,o.filter)((0,o.map)(t,(e=>r.documentsById[e])),(e=>Boolean(e)));let i=e[0];for(let t=0;t<e.length&&i;t++){const t=i,n=(0,o.find)(e,(e=>e!==t&&nE(t,e)));if(!n)break;i=n}return null!==(n=i)&&void 0!==n&&n.issuer?{title:"Missing certificate in chain",description:"Expected certificate with subject: ".concat(i.issuer)}:{title:"Invalid chain",description:a.message}}case"missing_auth":return{title:"Missing authentication certificate",description:a.message};case"multiple_auth":return{title:"Multiple authentication certificates",description:a.message};case"nothing_selected":return{title:"No certificates selected",description:"An authentication certificate is required for this network type"};case"expired":return{title:"Expired certificate",description:a.message};case"not_yet_valid":return{title:"Certificate not yet valid",description:a.message};case"missing_certificate":{var i;const e=(null!==(i=a.level)&&void 0!==i?i:0)+1;return{title:"Certificate not found",description:"Certificate at position ".concat(e," has been deleted. Please select a different certificate.")}}default:return{title:"Invalid chain",description:a.message}}}}),[s,r.documentsById,t]),c=(0,a.useMemo)((()=>
3{if(d)return;const e=(0,o.find)(s.warnings,(e=>"warning"===e.severity));return e?"self_signed_auth"===e.type?{title:"Self-signed certificate",description:e.message}:{title:"Warning",description:e.message}:void 0}),[s,d]),u=(0,a.useMemo)((()=>d?(0,p.jsx)(wE,{title:d.title,description:d.description,titleColor:y.DG.error[200]}):c?(0,p.jsx)(wE,{title:c.title,description:c.description,titleColor:y.DG.warning[300]}):void 0),[d,c]),h=(0,a.useMemo)((()=>{if(!s)return;if(0===t.length)return;if(d)return{title:d.title,description:d.description,severity:"error"};const e=(0,o.find)(s.warnings,(e=>"warning"===e.severity));if(e){return{title:"self_signed_auth"===e.type?"Self-signed certificate":"Warning",description:e.message,severity:"warning"}}if((0,o.find)(s.warnings,(e=>"valid"===e.type))){var n;const e=(0,o.map)(t,(e=>r.documentsById[e])),i=(0,o.minBy)((0,o.filter)(e,(e=>null!=(null===e||void 0===e?void 0:e.validTo))),(e=>e.validTo));return{title:"Valid certificate chain",description:(null!==(n=(0,M.g9)(null===i||void 0===i?void 0:i.validTo))&&void 0!==n?n:"")||"All certificates are valid",severity:"success"}}}),[s,t,d,r.documentsById]);return(0,p.jsx)(ZE,{privilege:"content",label:"Authentication Certificate",value:t[0]||"",options:l,disabled:i,multiple:!0,selectedValues:t,onMultipleChange:n,helperText:u,dropdownValidationMessage:h,error:!!d,required:!0})},SE=e=>{let{selectedCertificateIds:t,onCertificatesChange:n,disabled:r=!1,label:l,required:s=!1,submitted:d=!1,skipContentFilterCheck:c=!1,infoTooltip:u}=e;const h=(0,E.D)(S.F.Certificates),m=(0,o.filter)(h.documents,(e=>
3e.subtype===$w.CA)),g=(0,a.useMemo)((()=>(0,o.map)(m,(e=>{const t=uE(e),n=Date.now(),i=e.validTo&&e.validTo<n||e.validFrom&&e.validFrom>n,o=cE(e);let a;return t||i?a=y.DG.error[300]:o&&(a=y.DG.warning[300]),{value:e.id,label:e.name,subtype:e.subtype,subject:e.subject,issuer:e.issuer,validTo:e.validTo,validFrom:e.validFrom,statusColor:a}})).sort(((e,t)=>(0,ze.bL)(e.label,t.label)))),[m]),C=(0,a.useMemo)((()=>{if(!c)for(const e of t){const t=(0,o.find)(m,(t=>t.id===e));if(t&&iE(t))return{type:"content_filter",message:"".concat(t.name," is a content filtering certificate. Add it in the content filtering setup section at the bottom of the page if you want to connect it with this wifi network."),severity:"error"}}}),[t,m,c]),x=(0,a.useMemo)((()=>{const e=lE(t,m);return C?{...e,isValid:!1,warnings:[C,...e.warnings]}:e}),[t,m,C]),f=(0,a.useMemo)((()=>{if(!x)return;const e=(0,o.filter)(x.warnings,(e=>"error"===e.severity&&("issuer_mismatch"===e.type||"missing_root"===e.type||"invalid_chain"===e.type||"nothing_selected"===e.type||"expired"===e.type||"not_yet_valid"===e.type||"content_filter"===e.type||"missing_certificate"===e.type)));if(e.length>0){const i=e[0];if(!i)return;switch(i.type){case"issuer_mismatch":{const e=(0,o.find)(m,(e=>{var n;return e.id===t[null!==(n=i.level)&&void 0!==n?n:0]}));return null!==e&&void 0!==e&&e.issuer?{title:"Missing certificate in chain",description:"Expected certificate with subject: ".concat(e.issuer)}:{title:"Invalid chain",description:"The certificates you've selected are not a valid chain"}}case"missing_root":{const e=(0,o.find)(m,(e=>e.id===t[t.length-1]));return null!==e&&void 0!==e&&e.issuer?{title:"Missing root certificate",description:"Root certificate expected with subject: ".concat(e.issuer)}:{title:"Invalid chain",description:"The certificates you've selected are not a valid chain"}}case"nothing_selected":if(!s)return;return{title:"No certificates selected",description:i.message};case"expired":return{title:"Expired certificate",description:i.message};case"not_yet_valid":return{title:"Certificate not yet valid",description:i.message};case"content_filter":return{title:"Wrong type of cert detected",description:i.message};case"missing_certificate":{var n;const e=(null!==(n=i.level)&&void 0!==n?n:0)+1;return{title:"Certificate not found",description:"Certificate at position ".concat(e," has been deleted. Please select a different certificate.")}}default:return{title:"Invalid chain",description:i.message}}}}),[x,m,t,s]),b=(0,a.useMemo)((()=>d&&s&&0===t.length?"A CA certificate must be selected.":f?(0,p.jsxs)(i.Z,{component:"span",sx:{display:"block",paddingBottom:.5},children:[(0,p.jsx)(v.Z,{component:"span",display:"block",variant:"body2",sx:{color:y.DG.error[200],fontSize:"inherit",lineHeight:1.4},children:f.title}),(0,p.jsx)(v.Z,{component:"span",display:"block",variant:"body2",sx:{color:y.DG.grey[600],fontSize:"inherit",lineHeight:1.4,marginTop:.25},children:f.description})]}):void 0),[d,s,t.length,f]),j=(0,a.useMemo)((()=>{if(!x)return;if(0===t.length)return;if(f)return{title:f.title,description:f.description,severity:"error"};if((0,o.find)(x.warnings,(e=>"valid"===e.type))){const e=(0,o.find)(m,(e=>e.id===t[0]));let n="";if(null!==e&&void 0!==e&&e.validTo){const t={month:"long",year:"numeric"},i=new Date(e.validTo).toLocaleDateString("en-US",t);n+=n?" \u2022 Expires ".concat(i):"Expires ".concat(i)}return{title:"Valid certificate chain",description:n||"All certificates are valid",severity:"success"}}}),[x,t,f,m]);return(0,p.jsx)(ZE,{privilege:"content",label:null!==l&&void 0!==l?l:"CA Certificates",value:t[0]||"",options:g,disabled:r,multiple:!0,selectedValues:t,onMultipleChange:n,helperText:b,dropdownValidationMessage:j,error:!!f||d&&s&&0===t.length,infoTooltip:u})},DE=e=>{let{value:t,onChange:n,required:i=!1,submitted:o,isValid:r=!0,minFieldWidth:l=340,infoTooltip:s,helperText:d,onlyShowHelperTextOnErrors:c=!1,...u}=e;const[h,g]=(0,a.useState)(!1),v=i&&!t.trim(),C=(o||h)&&(v||!r);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",spacing:1,width:"100%",children:[(0,p.jsx)(Ul.z,{...u,privilege:"content",value:t,onChange:n,error:C,onBlur:()=>{g(!0)},helperText:C||!c?d:void 0,required:i,sx:{minWidth:l}}),s&&(0,p.jsx)(Fi._,{tooltipContent:s,TooltipProps:{disableInteractive:!1,placement:"right",componentsProps:{tooltip:{sx:{bgcolor:"grey.800",border:"none",boxShadow:"none"}}}},children:(0,p.jsx)(x.Z,{size:"small",children:(0,p.jsx)(cc.Z,{})})})]})},ME=e=>{let{title:t,isOptional:n=!1}=e;return(0,p.jsxs)(v.Z,{variant:"subtitle1",color:"text.primary",children:[t,n&&(0,p.jsxs)(v.Z,{component:"span",paddingLeft:"2px",color:"text.secondary",children:[" ","(Optional)"]})]})}
3,kE=[Cp.lX.WPA,Cp.lX.WPA3],IE=[Cp.lX.WPA_ENTERPRISE,Cp.lX.WPA3_ENTERPRISE],AE={[Cp.Pq.PEAP]:[Cp._q.MSCHAPV2,Cp._q.GTC],[Cp.Pq.TTLS]:[Cp._q.PAP,Cp._q.MSCHAP,Cp._q.MSCHAPV2,Cp._q.GTC]},RE=[Cp.Pq.PEAP,Cp.Pq.TLS,Cp.Pq.TTLS],TE=[Cp.Pq.PEAP,Cp.Pq.TLS,Cp.Pq.TTLS,Cp.Pq.PWD],PE=[Cp.Pq.PEAP,Cp.Pq.TTLS],LE=[Cp.Pq.PEAP,Cp.Pq.TLS,Cp.Pq.TTLS],NE=[Cp.Pq.TLS],UE=[Cp.Pq.PEAP,Cp.Pq.TTLS,Cp.Pq.PWD],FE={id:"",createdAt:0,updatedAt:0,organizationRef:(0,mp.J5)(""),version:"",ssid:"",type:Cp.lX.OPEN,hidden:!1,nickname:"",eapMethod:Cp.Pq.NONE,phase2Method:Cp._q.NONE,identity:"",anonymousIdentity:"",domain:"",proxySettingType:Cp.mR.NONE,proxyHost:"",proxyPort:null,proxyHostExclusionList:[],proxyPacUrl:"",hasPassword:!1,hasCaCertificatePem:!1,hasUserCertificatePem:!1,radiusCACertificateRefs:[],installedCACertificateRefs:[],userCertificateRefs:[],useScep:!1,subjectNameFormat:"",subjectAlternativeName:{},scepServerUrl:"",challengePassword:"",extendedKeyUsage:Cp.e9.NONE,keySize:Cp.Uo.NONE,keyUsage:Cp.Fu.NONE,userPrincipalName:"",certificateServerName:"",certificateLifetimeDays:"",renewalThreshold:""},OE=e=>{let{type:t,eapMethod:n}=e;return kE.includes(t)||IE.includes(t)&&UE.includes(n)},_E=e=>{let{password:t,hasPassword:n}=e;return(0,o.isUndefined)(t)?n:!!t},zE=e=>{let{userCertificatePem:t,hasUserCertificatePem:n,userCertificateRefs:i}=e;return(0,o.size)(i)>0||((0,o.isUndefined)(t)?n:null===Kw(t))},BE=e=>e.length<=32&&e.length>=2,WE=e=>!isNaN((0,o.parseInt)(e)),VE=e=>null!==e&&e>=0&&e<=65535,GE=340,HE=e=>{let{hasCertificate:t,value:n,includeRSAKeyPlaceholder:i,...a}=e;const r=t&&(0,o.isUndefined)(n),l="-----BEGIN CERTIFICATE-----\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n-----END CERTIFICATE-----",s=r?"":i?"-----BEGIN PRIVATE KEY-----\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n-----END PRIVATE KEY-----\n"+l:l;return(0,p.jsx)(DE,{...a,value:null!==n&&void 0!==n?n:"",multiline:!0,minRows:3,maxRows:10,inputProps:{sx:{width:n?500:void 0,fontFamily:"Roboto Mono, monospace",fontSize:"0.75em",lineHeight:"1.5"}},disabled:r,placeholder:s})},qE=e=>{let{label:t,onClick:n,disabled:i=!1}=e;return(0,p.jsx)(C.Z,{color:"error",startIcon:(0,p.jsx)(bu.Z,{}),onClick:n,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},disabled:i,children:t})},YE=e=>{var t,n,r,s,c,u,h,g,f;let{wifiNetwork:b=FE,onDeleteClick:j,onDuplicateClick:Z,onSaved:E}=e;const D=!!b.id,{organizationId:M,buildOrganizationPath:k,privileges:I}=(0,w.P)(),A=(0,d.P)("SCEP_ALPHA_ACCESS"),R=(0,Le.ye)("enableMacRandomizationToggle"),T=(0,Le.ye)("enableWpa3Wifi"),P=(0,Le.ye)("showCertificatesTab"),L=(()=>{const e=(0,d.kV)(),t=Jw(),n=(0,d.P)("DISABLE_WIFI_ANDROID14_DOMAIN_REQUIREMENT");return(0===e.numActiveDevices||t)&&!n})(),N=(0,l.k6)(),{notify:U}=(0,ie.o)(),[F,O]=(0,a.useState)(!1),_=(0,a.useCallback)((e=>{const t=BE(e.ssid),n=!OE(e)||_E(e),i=!IE.includes(e.type)||!TE.includes(e.eapMethod)||!!e.identity,a=!(e=>{let{type:t,eapMethod:n,useScep:i}=e;return!i&&!!IE.includes(t)&&NE.includes(n)})(e)||(P?(e=>{let{userCertificateRefs:t,hasUserCertificatePem:n}=e;return(0,o.size)(t)>0||n})(e):zE(e)),r=!IE.includes(e.type)||!RE.includes(e.eapMethod)||!L||!!e.domain,l=!(IE.includes(e.type)&&LE.includes(e.eapMethod)&&L)||(P?(0,o.size)(e.radiusCACertificateRefs)>0:!!e.caCertificatePem||!!(0,o.isUndefined)(e.caCertificatePem)&&e.hasCaCertificatePem),s=e.proxySettingType!==Cp.mR.MANUAL||!!e.proxyHost,d=e.proxySettingType!==Cp.mR.MANUAL||VE(e.proxyPort),c=e.proxySettingType!==Cp.mR.PAC||!!e.proxyPacUrl,u=e.useScep?(e=>{let{subjectNameFormat:t,scepServerUrl:n,certificateLifetimeDays:i,renewalThreshold:o}=e;return!!t&&!!n&&WE(i)&&WE(o)})(e)&&i:a&&i;return t&&n&&s&&d&&c&&u&&r&&l}),[L,P]),z=(0,a.useCallback)((e=>{let{changes:t,withChanges:n}=e;return D?(0,Fe.jW)({organizationId:M,wifiNetworkId:n.id},t):(0,Fe.S3)({organizationId:M},n)}),[D,M]),{withChanges:B,addChanges:W,clearChanges:V,hasChanges:G,changesValid:H,saveChanges:q,saveChangesPending:Y}=Ji({document:{...b},validate:_,save:z}),K=(0,a.useRef)(),X=(0,a.useRef)(),Q=(0,a.useRef)(),[J,$]=(0,a.useState)(!1),ee=()=>{const e={},{type:t,eapMethod:n,proxySettingType:i}=B;O(!0),IE.includes(t)?(AE[n]||(e.phase2Method=Cp._q.NONE),TE.includes(n)||(e.identity=""),PE.includes(n)||(e.anonymousIdentity=""),RE.includes(n)||(e.domain=""),LE.includes(n)||(e.caCertificatePem=""),NE.includes(n)||(P?e.userCertificateRefs=[]:e.userCertificatePem="")):(e.eapMethod=Cp.Pq.NONE,e.phase2Method=Cp._q.NONE,e.identity="",e.anonymousIdentity="",e.domain="",e.caCertificatePem="",P?e.userCertificateRefs=[]:e.userCertificatePem=""),OE(B)||(e.password=""),i!==Cp.mR.MANUA
3L&&(e.proxyHost="",e.proxyPort=null,e.proxyHostExclusionList=[]),i!==Cp.mR.PAC&&(e.proxyPacUrl=""),W(e),_(B)&&$(!0)};(0,a.useEffect)((()=>{J&&($(!1),q().then((e=>{e&&(E?E(e.id,B):N.push(k((e=>e.wifiNetworks.wifiNetwork),{wifiNetworkId:e.id}))),U({severity:"success",message:"Wi-Fi network saved"})})).catch((e=>{var t;const n=(0,Fe.tf)(e);U({severity:"error",message:null!==(t=null===n||void 0===n?void 0:n.message)&&void 0!==t?t:"Failed to save Wi-Fi network"}),n||(0,Si.yR)(e,{name:"save wifi network"})})))}),[k,N,U,E,q,J,B]);const[te,ne]=(0,a.useState)(!1),oe=WE(B.renewalThreshold),re=WE(B.certificateLifetimeDays);return(0,a.useEffect)((()=>{V(["disableMacRandomization"])}),[V,R]),(0,p.jsxs)(m.Z,{spacing:4,alignItems:"flex-start",sx:{px:3,py:3},children:[(0,p.jsx)(dd,{hasChanges:G}),!I.content&&(0,p.jsxs)(ui.Q,{children:["Content privilege required to ",D?"edit":"create"," Wi-Fi Networks."]}),!D&&(0,p.jsxs)(mf.h,{children:["Create a ",(0,p.jsx)("em",{children:"Wi-Fi Network"})," and assign it to a ",(0,p.jsx)("em",{children:"Configuration"})," ","to provide network credentials to your ",(0,p.jsx)("em",{children:"Devices"}),"."]}),(0,p.jsxs)(m.Z,{spacing:3,alignSelf:"stretch",children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",width:1,children:[(0,p.jsx)(ME,{title:"Basic Info"}),D&&I.content&&(0,p.jsxs)(m.Z,{spacing:1.5,direction:"row",children:[(0,p.jsx)(bd,{hasChanges:G,saveDisabled:!H,onSaveClick:ee,onUndoAllClick:V,savePending:Y}),(Z||j)&&(0,p.jsx)(jd,{placement:"left",menuItems:[Z&&(0,p.jsxs)(Hi.Z,{onClick:()=>Z(B),children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Ed.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Duplicate"})]},"duplicate"),j&&(0,p.jsxs)(Hi.Z,{onClick:()=>j(B),children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Gl.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Delete"})]},"delete")].filter(Boolean)})]})]}),(0,p.jsxs)(m.Z,{spacing:2,alignItems:"flex-start",children:[(0,p.jsx)(DE,{label:"Nickname",placeholder:"Home network",value:B.nickname,onChange:e=>W({nickname:e.target.value}),submitted:F}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"flex-start",children:[(0,p.jsx)(DE,{label:"SSID",placeholder:"Network-123",value:B.ssid,onChange:e=>W({ssid:e.target.value}),isValid:BE(B.ssid),helperText:"SSID must be between 2 and 32 characters.",autoFocus:!D,required:!0,submitted:F}),(0,p.jsx)(i.Z,{marginTop:3.5,children:(0,p.jsx)(Pd,{privilege:"content",label:"Hidden network",control:(0,p.jsx)(Pi.Z,{size:"small"}),checked:B.hidden,onChange:()=>W({hidden:!B.hidden}),sx:{whiteSpace:"nowrap"}})})]}),R&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(Pd,{privilege:"content",label:"Disable randomized MAC address",control:(0,p.jsx)(Pi.Z,{size:"small"}),checked:!!B.disableMacRandomization,onChange:()=>{void 0===b.disableMacRandomization&&!0===B.disableMacRandomization?V(["disableMacRandomization"]):W({disableMacRandomization:!B.disableMacRandomization})}}),(0,p.jsx)(Fi._,{tooltipText:"Only supported on Android 13 and above",children:(0,p.jsx)(cc.Z,{fontSize:"small",sx:{transform:"translateY(-1px)"}})})]})]})]}),(0,p.jsx)(Ie.Z,{flexItem:!0}),(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(ME,{title:"Authentication"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:4,children:[(0,p.jsxs)(m.Z,{spacing:2,flexGrow:1,children:[(0,p.jsx)(Qi,{privilege:"content",label:"Network Type",value:B.type,options:(0,o.map)(Cp.lX,(e=>({value:e,label:Cp.hH[e]}))).filter((e=>e.value!==Cp.lX.WPA3&&e.value!==Cp.lX.WPA3_ENTERPRISE||T)),onChange:e=>{const t={type:e};IE.includes(e)&&B.eapMethod===Cp.Pq.NONE&&(t.eapMethod=Cp.Pq.PEAP),IE.includes(e)&&B.phase2Method===Cp._q.NONE&&(t.phase2Method=Cp._q.MSCHAPV2),W(t)},sx:{minWidth:GE}}),IE.includes(B.type)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Qi,{privilege:"content",label:"EAP Method",value:B.eapMethod,options:(0,o.map)((0,o.omit)(Cp.Pq,Cp.Pq.NONE),(e=>({value:e,label:e}))),onChange:e=>{var t,n;const i=null!==(t=null===(n=AE[e])||void 0===n?void 0:n[0])&&void 0!==t?t:Cp._q.NONE;W({eapMethod:e,phase2Method:i})},sx:{minWidth:GE}}),!!AE[B.eapMethod]&&(0,p.jsx)(Qi,{privilege:"content",label:"Phase 2 Authentication",value:
3B.phase2Method,options:(0,o.map)(AE[B.eapMethod],(e=>({value:e,label:e}))),onChange:e=>W({phase2Method:e}),sx:{minWidth:GE}})]})]}),(0,p.jsxs)(m.Z,{spacing:2,flexGrow:1,alignItems:"flex-start",children:[IE.includes(B.type)&&(0,p.jsxs)(p.Fragment,{children:[RE.includes(B.eapMethod)&&(0,p.jsx)(DE,{label:"Radius Server Domain",placeholder:"radius.domain.com",value:B.domain,onChange:e=>W({domain:e.target.value}),required:L,isValid:!L||!!B.domain,submitted:F,infoTooltip:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"white"},children:"Domain is required for most XR devices to connect to enterprise networks. If you are using a WPA2/3-Enterprise network, your network has a Domain."}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"white"},children:(0,p.jsx)(li.Q,{href:"https://help.managexr.com/en/articles/7131251-deploying-enterprise-wi-fi-certificates-on-managexr#h_9525c978a8",sx:{color:"white",textDecoration:"underline"},children:"Deploying enterprise Wi-Fi networks"})})]})}),TE.includes(B.eapMethod)&&(0,p.jsx)(DE,{label:"Identity",placeholder:"user_id",value:B.identity,onChange:e=>W({identity:e.target.value}),isValid:!!B.identity,required:!0,submitted:F}),PE.includes(B.eapMethod)&&(0,p.jsx)(DE,{label:"Anonymous Identity",placeholder:"anonymous_id",value:B.anonymousIdentity,onChange:e=>W({anonymousIdentity:e.target.value}),submitted:F}),LE.includes(B.eapMethod)&&!B.useScep&&(0,p.jsx)(p.Fragment,{children:P?(0,p.jsx)(SE,{selectedCertificateIds:(0,o.map)(B.radiusCACertificateRefs,"id"),onCertificatesChange:e=>W({radiusCACertificateRefs:(0,o.map)(e,(e=>(0,mp.Tg)(S.F.Certificates,e)))}),disabled:!I.content,required:!0,submitted:F,infoTooltip:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"white"},children:"CA certificate is required for most XR devices to connect to enterprise networks. If you are using a WPA2/3-Enterprise network, your network has a CA certificate."}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"white"},children:(0,p.jsx)(li.Q,{href:"https://help.managexr.com/en/articles/7131251-deploying-enterprise-wi-fi-certificates-on-managexr#h_9525c978a8",sx:{color:"white",textDecoration:"underline"},children:"How to find your CA certificate"})})]})}):(0,p.jsxs)(i.Z,{position:"relative",children:[(0,p.jsx)(HE,{label:"CA Certificate",value:B.caCertificatePem,onChange:e=>W({caCertificatePem:e.target.value}),hasCertificate:B.hasCaCertificatePem,isValid:(!L||!!B.caCertificatePem||B.hasCaCertificatePem)&&null===Yw(B.caCertificatePem),required:L,helperText:null!==(t=Yw(B.caCertificatePem))&&void 0!==t?t:"",onlyShowHelperTextOnErrors:!0,inputRef:K,submitted:F,infoTooltip:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"white"},children:"CA certificate is required for most XR devices to connect to enterprise networks. If you are using a WPA2/3-Enterprise network, your network has a CA certificate."}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"white"},children:(0,p.jsx)(li.Q,{href:"https://help.managexr.com/en/articles/7131251-deploying-enterprise-wi-fi-certificates-on-managexr#h_9525c978a8",sx:{color:"white",textDecoration:"underline"},children:"How to find your CA certificate"})})]})}),B.hasCaCertificatePem&&(0,o.isUndefined)(B.caCertificatePem)&&(0,p.jsx)(qE,{label:"Remove CA Certificate",onClick:()=>{W({caCertificatePem:""}),setTimeout((()=>{var e;null===(e=K.current)||void 0===e||e.focus()}),0)},disabled:!I.content})]})}),NE.includes(B.eapMethod)&&(0,p.jsxs)(p.Fragment,{children:[!B.useScep&&(0,p.jsx)(p.Fragment,{children:P?(0,p.jsx)(EE,{selectedCertificateIds:(0,o.map)(B.userCertificateRefs,"id"),onCertificatesChange:e=>W({userCertificateRefs:(0,o.map)(e,(e=>(0,mp.Tg)(S.F.Certificates,e)))}),disabled:!I.content||B.useScep}):(0,p.jsxs)(i.Z,{position:"relative",children:[(0,p.jsx)(HE,{label:"User Certificate",value:B.userCertificatePem,onChange:e=>W({userCertificatePem:e.target.value}),hasCertificate:B.hasUserCertificatePem,inputRef:X,required:!0,submitted:F,isValid:zE(B),helperText:null!==(n=Kw(B.userCertificatePem))&&void 0!==n?n:"",onlyShowHelperTextOnErrors:!0,includeRSAKeyPlaceholder:!0}),B.hasUserCertificatePem&&(0,o.isUndefined)(B.userCertificatePem)&&(0,p.jsx)(qE,{label:"Remove User Certificate",onClick:()=>{W({userCertificatePem:""}),setTimeout((()=>{var e;null===(e=X.current)||void 0===e||e.focus()}),0)},disabled:!I.content})]})}),(0,p.jsx)(ph,{featureName:"SCEP",withLockIcon:!0,iconSX:{alignSelf:"center"},children:(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(Pd,{privilege:"content",label:"Use SCEP configuration",control:(0,p.jsx)(Pi.Z,{size:"small"}),checked:B.useScep,disabled:!A,onChange:()=>W({useScep:!B.useScep})}),(0,p.jsx)(ke.Z,{label:"Beta",variant:"outlined",size:"small",sx:{height:20,backgroundColor:y.DG.secondary[200],color:y.DG.white,border:0,transform:"translateY(-1px)"}})]}),!A&&(0,p.jsx)(v.Z,{component:"div",variant:"caption",color:y.DG.grey[800],children:(0,p.jsxs)(m.Z,{direction:"row",marginLeft:1.5,children:["Contact\xa0",(0,p.jsx)(ae,{value:Be.er.support,noPadding:!0,children:(0,p.jsx)(Kn.Z,{children:Be.er.support})}),"\xa0to set up SCEP"]})})]})})]})]}),OE(B)&&(0,p.jsxs)(i.Z,{position:"relative",children:[(0,p.jsx)(DE,{label:"Password",type:te?"text":"password",value:null!==(r=B.password)&&void 0!==r?r:"",onChange:e=>W({password:e.target.value}),isValid:_E(B),inputProps:{sx:{paddingRight:4.5}},inputRef:Q,required:!0,disabled:B.hasPassword&&(0,o.isUndefined)(B.password),placeholder:B.hasPassword&&(0,o.isUndefined)(B.password)?"":te?"password":"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",submitted:F}),B.hasPassword&&(0,o.isUndefined)(B.password)?(0,p.jsx)(qE,{label:"Change Password",onClick:()=>{W({password:""}),setTimeout((()=>{var e;null===(e=Q.current)||void 0===e||e.focus()}),0)},disabled:!I.content}):(0,p.jsx)(x.Z,{size:"small",sx:{position:"absolute",top:"50%",transform:"translateY(-50%)",right:4},onClick:()=>{ne(!te),setTimeout((()=>{var e;null===(e=Q.current)||void 0===e||e.focus()}),0)},children:te?(0,p.jsx)(Co.Z,{}):(0,p.jsx)(vo.Z,{})})]})]}),B.useScep&&A&&(0,p.jsxs)(m.Z,{spacing:2,flexGrow:1,alignItems:"flex-start",children:[(0,p.jsx)(DE,{label:"Subject Name Format",placeholder:"CN={{DEVICE_SERIAL}}
3,O=managexr",isValid:!!B.subjectNameFormat,required:!0,value:B.subjectNameFormat,onChange:e=>W({subjectNameFormat:e.target.value}),submitted:F}),(0,p.jsx)(DE,{label:"SAN - User Principal Name",placeholder:"[email protected]",value:null!==(s=B.subjectAlternativeName.USER_PRINCIPAL_NAME)&&void 0!==s?s:"",onChange:e=>{W({subjectAlternativeName:{...B.subjectAlternativeName,USER_PRINCIPAL_NAME:e.target.value}})},submitted:F}),(0,p.jsx)(DE,{label:"SAN - Email Address",placeholder:"[email protected]",value:null!==(c=B.subjectAlternativeName.EMAIL_ADDRESS)&&void 0!==c?c:"",onChange:e=>{W({subjectAlternativeName:{...B.subjectAlternativeName,EMAIL_ADDRESS:e.target.value}})},submitted:F}),(0,p.jsx)(DE,{label:"SAN - DNS",placeholder:"managexr.com",value:null!==(u=B.subjectAlternativeName.DNS)&&void 0!==u?u:"",onChange:e=>{W({subjectAlternativeName:{...B.subjectAlternativeName,DNS:e.target.value}})},submitted:F}),(0,p.jsx)(DE,{label:"SAN - URI",placeholder:"https://www.managexr.com",value:null!==(h=B.subjectAlternativeName.URI)&&void 0!==h?h:"",onChange:e=>{W({subjectAlternativeName:{...B.subjectAlternativeName,URI:e.target.value}})},submitted:F}),(0,p.jsx)(DE,{label:"SCEP Server URL",placeholder:"https://example-scep-server/api/certificates/scep",required:!0,isValid:!!B.scepServerUrl,value:B.scepServerUrl,onChange:e=>W({scepServerUrl:e.target.value}),submitted:F}),(0,p.jsx)(DE,{label:"SCEP Challenge Password",placeholder:"******",value:B.challengePassword,onChange:e=>W({challengePassword:e.target.value}),submitted:F}),(0,p.jsx)(Qi,{privilege:"content",label:"Key Size",placeholder:Cp.Uo.NONE,value:B.keySize,options:(0,o.map)(Cp.Uo,(e=>({value:e,label:e}))),onChange:e=>W({keySize:e}),sx:{minWidth:GE}}),(0,p.jsx)(Qi,{privilege:"content",label:"Key Usage",placeholder:Cp.Fu.NONE,value:B.keyUsage,options:(0,o.map)(Cp.Fu,(e=>({value:e,label:e}))),onChange:e=>W({keyUsage:e}),sx:{minWidth:GE}}),(0,p.jsx)(Qi,{privilege:"content",label:"Extended Key Usage",placeholder:Cp.e9.NONE,value:B.extendedKeyUsage,options:(0,o.map)(Cp.e9,(e=>({value:e,label:e}))),onChange:e=>W({extendedKeyUsage:e}),sx:{minWidth:GE}}),(0,p.jsx)(DE,{label:"Certificate Server Name",placeholder:"cert.managexr.com",value:B.certificateServerName,onChange:e=>W({certificateServerName:e.target.value}),submitted:F}),(0,p.jsx)(DE,{label:"Certificate Lifetime Days",placeholder:"365",value:B.certificateLifetimeDays,required:!0,onChange:e=>W({certificateLifetimeDays:e.target.value}),isValid:re&&!!B.certificateLifetimeDays,helperText:re?void 0:"Certificate Lifetime days must be a number",submitted:F}),(0,p.jsx)(DE,{label:"Renewal Threshold %",placeholder:"20",value:B.renewalThreshold,required:!0,onChange:e=>W({renewalThreshold:e.target.value}),isValid:oe&&!!B.renewalThreshold,helperText:oe?void 0:"Renewal threshold must be a number",submitted:F})]})]}),IE.includes(B.type)&&(0,p.jsx)(i.Z,{sx:{backgroundColor:y.DG.grey[100],borderRadius:1,padding:1,width:780},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,width:1,children:[(0,p.jsx)(qw.Z,{sx:{color:y.DG.purple[400],marginLeft:.5,marginRight:0,fontSize:30}}),(0,p.jsxs)(i.Z,{flex:1,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",sx:{fontSize:15},children:"Missing required information or having issues with certificates?"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{fontSize:15},children:"Use our step-by-step guide to finding and deploying certificates."})]}),(0,p.jsx)(C.Z,{variant:"contained",startIcon:(0,p.jsx)(Mu.Z,{sx:{fontSize:14,color:y.DG.grey[700],marginRight:1}}),onClick:()=>(0,di.UU)(Be.IW.addNetworkCertificateToWifi),sx:{textTransform:"none",paddingX:3,backgroundColor:y.DG.white,border:"1px solid ".concat(y.DG.grey[300]),"&:hover":{backgroundColor:y.DG.grey[50],borderColor:y.DG.grey[400]}},children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"View help doc"})})]})})]}),(0,p.jsx)(Ie.Z,{flexItem:!0}),(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(ME,{title:"Proxy setup",isOptional:!0}),(0,p.jsxs)(m.Z,{direction:"row",spacing:4,children:[(0,p.jsx)(Qi,{privilege:"content",label:"Proxy Type",value:B.proxySettingType,onCh
3ange:e=>W({proxySettingType:e}),options:[{value:Cp.mR.NONE,label:"None"},{value:Cp.mR.MANUAL,label:"Manual"},{value:Cp.mR.PAC,label:"PAC"}],sx:{minWidth:GE}}),(0,p.jsxs)(m.Z,{spacing:3,children:[B.proxySettingType===Cp.mR.MANUAL&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(DE,{label:"Proxy Host",placeholder:"www.domain.com",value:B.proxyHost,onChange:e=>W({proxyHost:e.target.value}),required:!0,isValid:!!B.proxyHost,submitted:F}),(0,p.jsx)(DE,{label:"Proxy Port",placeholder:"3128",value:null!==(g=null===(f=B.proxyPort)||void 0===f?void 0:f.toString())&&void 0!==g?g:"",onChange:e=>{const t=e.target.value;if((0,o.isEmpty)(t))return void W({proxyPort:null});if((0,o.size)(t)>8)return;const n=(0,o.parseInt)(e.target.value,10);isNaN(n)||W({proxyPort:n})},required:!0,isValid:VE(B.proxyPort),helperText:"Choose a valid port number between 0-65535",submitted:F}),(0,p.jsx)(Jx,{privilege:"content",placeholder:"*.domain.com",list:B.proxyHostExclusionList,onItemAdded:e=>{W({proxyHostExclusionList:[...B.proxyHostExclusionList,e]})},onItemRemoved:e=>{W({proxyHostExclusionList:[...(0,o.slice)(B.proxyHostExclusionList,0,e),...(0,o.slice)(B.proxyHostExclusionList,e+1)]})},label:"Proxy Host Exclusions"})]}),B.proxySettingType===Cp.mR.PAC&&(0,p.jsx)(DE,{label:"PAC Url",placeholder:"https://pac.url",value:B.proxyPacUrl,onChange:e=>W({proxyPacUrl:e.target.value}),required:!0,isValid:!!B.proxyPacUrl,submitted:F})]})]})]}),P&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{flexItem:!0}),(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(ME,{title:"Content filtering setup",isOptional:!0}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"If your organization uses a traffic filtering service like ContentKeeper, add your CA certificate to ensure devices allow filtering."}),(0,p.jsx)(SE,{selectedCertificateIds:(0,o.map)(B.installedCACertificateRefs,"id"),onCertificatesChange:e=>W({installedCACertificateRefs:(0,o.map)(e,(e=>(0,mp.Tg)(S.F.Certificates,e)))}),label:"CA Certificate",disabled:!I.content,skipContentFilterCheck:!0})]})]}),!D&&I.content&&(0,p.jsx)(Un.U,{submitting:Y,onClick:ee,disabled:!H,children:"Create"})]})},KE={width:"100%",maxWidth:460,alignSelf:"center",padding:3,borderRadius:3,border:"1px solid",borderColor:"grey.200",bgcolor:"grey.50"},XE="Your trial configuration is still being set up. Wait a moment and retry.",QE="Your trial configuration could not be created, so a network cannot be attached. Skip this step for now \u2014 you can add Wi-Fi later from the Wi-Fi Networks page.",JE={display:"inline-flex",alignItems:"center",paddingTop:1,gap:.5,fontSize:13,fontWeight:600,color:"text.secondary",textDecoration:"none","&:hover":{textDecoration:"underline"},"&:disabled":{color:"text.disabled",pointerEvents:"none"}},$E={fontSize:13,fontWeight:600,color:"text.secondary",textDecoration:"none","&:hover":{textDecoration:"underline"},"&:disabled":{color:"text.disabled",pointerEvents:"none"}},eS={autoComplete:"off",inputProps:{autoComplete:"off","data-1p-ignore":!0,"data-lpignore":"true"}},tS={autoComplete:"new-password",inputProps:{autoComplete:"new-password","data-1p-ignore":!0,"data-lpignore":"true"}},nS=(0,a.memo)((e=>{let{ssid:t,setSsid:n,security:i,setSecurity:o,password:a,setPassword:r,disabled:l,onAdvancedClick:s}=e;return(0,p.jsxs)(m.Z,{spacing:2,sx:{...KE,paddingBottom:1.5},children:[(0,p.jsx)(Ul.z,{...eS,name:"wifiSsid",value:t,onChange:e=>n(e.target.value),placeholder:"Network name (SSID)",size:"small",fullWidth:!0,autoFocus:!0,disabled:l}),(0,p.jsxs)(m.Z,{spacing:1,children:["wpa2"===i?(0,p.jsx)(Ul.z,{...tS,name:"wifiPassword",type:"password",value:a,onChange:e=>r(e.target.value),placeholder:"Password",size:"small",fullWidth:!0,disabled:l}):(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",sx:{paddingX:1.5,height:40,borderRadius:1,border:"1px dashed",borderColor:"grey.300",color:"text.secondary"},children:[(0,p.jsx)(Hw.Z,{sx:{fontSize:18}}),(0,p.jsx)(v.Z,{variant:"body2",children:"No password \u2014 open network"})]}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(Kn.Z,{component:"button",disabled:l,onClick:()=>o("wpa2"===i?"open":"wpa2"),sx:{...$E,paddingTop:1}
3,children:"wpa2"===i?"This network has no password":"This network has a password"}),(0,p.jsx)(Kn.Z,{component:"button",disabled:l,onClick:s,sx:JE,children:"Advanced options"})]})]})]})}));nS.displayName="WifiSimpleCard";const iS=(0,a.memo)((e=>{let{onNext:t,onSetupProgress:n,trialConfigurationId:r,trialConfigurationError:l,wifiDraft:s,onWifiDraftChange:d,onAdvancedOpenChange:c}=e;const h=(0,u.I0)(),{organizationId:g}=(0,w.P)(),[x,f]=(0,a.useState)(null),[y,j]=(0,a.useState)(null),[Z,D]=(0,a.useState)(!1),[M,k]=(0,a.useState)(null),{ssid:I,security:A,password:R}=s,{documents:T,fetched:P}=(0,E.D)(S.F.Configurations),{documents:L,fetched:N}=(0,E.D)(S.F.WifiNetworks),U=(0,o.find)(T,(e=>e.id===r)),F=(0,o.map)(null===U||void 0===U?void 0:U.wifiNetworkRefs,"id"),O=(0,o.filter)(L,(e=>(0,o.includes)(F,e.id))),_=O[0],z=P&&N,B=null!=s.savedNetworkId||BE(I.trim())&&("open"===A||R.length>0),W=null===_||void 0===_?void 0:_.id;(0,a.useEffect)((()=>{null===n||void 0===n||n(W||I.trim().length>0?.5:0)}),[n,I,W]),(0,a.useEffect)((()=>(null===c||void 0===c||c("advanced"===x),()=>null===c||void 0===c?void 0:c(!1))),[c,x]);const V=()=>{null===n||void 0===n||n(1),t()},G=async e=>{if(!r)return k(null!=l?QE:XE),!1;h(Ys.U.actions.startedEditing({configurationId:r})),(0,o.forEach)((0,o.without)(F,e),(e=>h(Js(Ys.U.actions.wifiNetworkRemoved({wifiNetworkId:e}))))),h(Js(Ys.U.actions.wifiNetworkAdded({wifiNetworkId:e})));try{return await h((0,Ys.q)({keepDraft:!0})).unwrap(),!0}catch(t){return(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-add",action:"upload-failed",value:"attach"}),(0,Si.yR)(t,{name:"onboarding wifi attach"}),k("Could not save the network to your configuration. Retry, or skip for now."),!1}},H=e=>({ssid:e.ssid,security:e.type===Cp.lX.OPEN?"open":"wpa2",password:"",savedNetworkId:e.id});return z?"advanced"===x?(0,p.jsxs)(m.Z,{spacing:2,sx:{width:"100%"},children:[(0,p.jsx)(i.Z,{children:(0,p.jsx)(C.Z,{size:"small",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"advanced-toggle",action:"toggled",value:y?"summary":"simple"}),f(null)},sx:{textTransform:"none"},children:y?"\u2190 Back":"\u2190 Back to simple setup"})}),(0,p.jsx)(i.Z,{sx:{width:"100%",marginX:-3},children:(0,p.jsx)(YE,{wifiNetwork:null!==y&&void 0!==y?y:{...FE,type:"open"===A?Cp.lX.OPEN:Cp.lX.WPA,ssid:I.trim(),nickname:I.trim()},onSaved:(e,t)=>{(async(e,t)=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-add",action:"added",value:"advanced"}),d({...H(t),savedNetworkId:e}),await G(e)&&V()})(e,t)}})}),M&&(0,p.jsx)(v.Z,{variant:"body2",color:"error",sx:{alignSelf:"center"},children:M})]}):"choose"===x?(0,p.jsxs)(m.Z,{spacing:2.5,sx:{width:"100%"},children:[(0,p.jsxs)(m.Z,{spacing:1,sx:KE,children:[0===L.length&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"No saved networks in your organization yet."}),(0,p.jsx)(m.Z,{sx:{maxHeight:176,overflowY:"auto"},children:(0,o.map)(L,(e=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:2,sx:{paddingY:.75,"& + &":{borderTop:"1px solid",borderColor:"grey.200"}},children:[(0,p.jsxs)(m.Z,{sx:{minWidth:0},children:[(0,p.jsx)(v.Z,{noWrap:!0,sx:{fontWeight:600},children:e.nickname||e.ssid}),(0,p.jsx)(v.Z,{noWrap:!0,variant:"body2",color:"text.secondary",children:e.ssid})]}),(0,o.includes)(F,e.id)&&1===O.length?(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(ng.Z,{color:"success",sx:{fontSize:18}}),(0,p.jsx)(v.Z,{variant:"body2",color:"success.main",children:"Current"})]}):(0,p.jsx)(C.Z,{size:"small",variant:"outlined",disabled:Z,onClick:()=>{(async e=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-add",action:"selected",value:"existing"}),D(!0),k(null);const t=await G(e.id);t&&d(H(e)),D(!1),t&&f(null)})(e)},sx:{textTransform:"none",flexShrink:0},children:"Use"})]},e.id)))})]}),(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1.5,sx:{width:"100%"},children:[M&&(0,p.jsx)(v.Z,{variant:"body2",color:"error",children:M}),(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,disabled:Z,onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-choose",action:"selected",value:"create-new"}),null!=s.savedNetworkId&&d(_Z),f("simple")},sx:{...Kj,width:"100%",maxWidth:460},children:"Create a new network"}),(0,p.jsx)(Kn.Z,{component:"button",disabled:Z,onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-choose",action:"dismissed"}),f(null)},sx:$E,children:"Cancel"})]})]}):"simple"!==x&&_?(0,p.jsxs)(m.Z,{spacing:1.5,sx:{width:"100%"},children:[(0,p.jsxs)(m.Z,{spacing:1,sx:KE,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",sx:{minWidth:0},children:[(0,p.jsx)(ng.Z,{color:"success",sx:{fontSize:20}}),(0,p.jsxs)(v.Z,{noWrap:!0,sx:{fontWeight:700},children:["Using ",_.nickname||_.ssid,O.length>1&&" and ".concat(O.length-1," more")]})]}),(0,p.jsx)(C.Z,{size:"small",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-edit",action:"clicked"}),j(_),f("advanced")},startIcon:(0,p.jsx)(jg.Z,{sx:{fontSize:16}}),sx:{textTransform:"none",color:"text.secondary",flexShrink:0},children:"Edit"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Your headsets will connect to this network automatically."})]}),(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1.5,sx:{width:"100%"},children:[(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,onClick:V,sx:{...Kj,width:"100%",maxWidth:460},children:"Continue"}),L.length>0&&(0,p.jsx)(Kn.Z,{component:"button",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-choose",action:"clicked",value:"summary"}),f("choose")},sx:$E,children:"Change network"})]})]}):(0,p.jsxs)(m.Z,{spacing:1.5,sx:{width:"100%"},children:[(0,p.jsx)(nS,{ssid:I,setSsid:e=>d({...s,ssid:e,savedNetworkId:null}),security:A,setSecurity:e=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-security",action:"toggled",value:e}),d({...s,security:e,savedNetworkId:null})},password:R,setPassword:e=>d({...s,password:e,savedNetworkId:null}),disabled:Z,onAdvancedClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"advanced-toggle",action:"toggled",value:"advanced"}),j(null),f("advanced")}}),(0,p.jsxs)(m.Z,{alignItems:"center",spacing:2,sx:{width:"100%"},children:[(0,p.jsx)(C.Z,{variant:"contained",disableElevation:!0,onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-add",action:"clicked"}),(async()=>
3{if(!r)return void k(null!=l?QE:XE);if(null!=s.savedNetworkId){if((0,o.includes)(F,s.savedNetworkId))return void V();D(!0),k(null);const e=await G(s.savedNetworkId);return D(!1),void(e&&V())}const e=I.trim(),t={...(0,o.omit)(FE,Cp.Yy),ssid:e,nickname:e,type:"open"===A?Cp.lX.OPEN:Cp.lX.WPA};let n;"wpa2"===A&&(t.password=R),D(!0),k(null);try{n=(await(0,Fe.S3)({organizationId:g},t)).id}catch(c){var i;const e=(0,Fe.tf)(c);return(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-add",action:"upload-failed",value:"create"}),e||(0,Si.yR)(c,{name:"onboarding wifi create"}),D(!1),void k(null!==(i=null===e||void 0===e?void 0:e.message)&&void 0!==i?i:"Could not add the network. Retry, or skip for now.")}const a=await G(n);d({...s,savedNetworkId:n}),D(!1),a&&V()})()},disabled:!B||Z,sx:{...Kj,width:"100%",maxWidth:460},children:"Add network & continue"}),!B&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:0===I.trim().length?"Enter your network name to continue.":BE(I.trim())?"Enter the network password, or mark the network as open if it has none.":"Network names must be 2 to 32 characters."}),M&&(0,p.jsx)(v.Z,{variant:"body2",color:"error",children:M}),L.length>0&&(0,p.jsx)(Kn.Z,{component:"button",disabled:Z,onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-choose",action:"clicked",value:"form"}),f("choose")},sx:$E,children:"Choose an existing network"})]})]}):(0,p.jsx)(m.Z,{alignItems:"center",sx:{width:"100%",paddingY:4},children:(0,p.jsx)(Zi.Z,{size:28})})}));iS.displayName="OnboardingWifiStep";const oS="Trial Setup",aS=Ys.U.actions,rS=e=>"video"===e.kind?e.videoId:e.appId,lS=e=>{const{selectedContent:t,trialConfigurationId:n,onTrialConfigurationIdChange:i}=e,r=(0,u.I0)(),{organizationId:l}=(0,w.P)(),[s,d]=(0,a.useState)(null),[c,p]=(0,a.useState)(null),h=(0,a.useRef)(!1),m=(0,a.useRef)(new Map),g=(0,a.useRef)(null),v=(0,a.useRef)(!1),C=(0,a.useRef)(t);C.current=t;const x=(0,xo.ky)(S.F.Configurations,null!==n&&void 0!==n?n:void 0),{documents:f,fetched:b}=(0,E.D)(S.F.Configurations),{documents:y,fetched:j}=(0,E.D)(S.F.Apps),{documents:Z,fetched:D}=(0,E.D)(S.F.Videos),{videos:M,fetched:k}=$j(),I=(0,a.useMemo)((()=>((e,t,n)=>{const i=new Set;return(0,o.forEach)(e,(e=>{var t;i.add(e.id),null!==(t=e.instantAppRef)&&void 0!==t&&t.id&&i.add(e.instantAppRef.id)})),(0,o.forEach)(t,(e=>i.add(e.id))),(0,o.forEach)(n,(e=>i.add(e.id))),i})(y,Z,M)),[y,Z,M]),A=(0,a.useCallback)((e=>{g.current=e,(0,o.forEach)(((e,t)=>{const n=new Set([...(0,o.map)(null===e||void 0===e?void 0:e.approvedApps,"id"),...(0,o.map)(null===e||void 0===e?void 0:e.approvedInstantApps,"id"),...(0,o.map)(null===e||void 0===e?void 0:e.approvedVideos,"id")]),i=[];return(0,o.forEach)(t,(e=>{var t;n.has(e.id)&&("video"===e.type?i.push({kind:"video",videoId:e.id}):i.push({kind:"app",appId:e.id,type:e.type,packageNameOrId:null!==(t=e.packageNameOrId)&&void 0!==t?t:e.id}))})),i})(e,C.current),(e=>m.current.set(rS(e),e))),r(aS.startedEditing({configurationId:e.id})),r(aS.changesStarted({sourceConfiguration:e})),d(e.id),i(e.id)}),[r,i]);(0,a.useEffect)((()=>{if(h.current)return;if(n&&x)return h.current=!0,void A(x);if(!b)return;h.current=!0;const e=(0,o.find)(f,{name:oS});e?A(e):r((0,Vc.Gx)({organizationId:l,name:oS})).unwrap().then((e=>{null!==e&&void 0!==e&&e.id?A(e):p("Failed to create configuration")})).catch((()=>p("Failed to create configuration")))}),[n,x,b,f,l,A,r]),(0,a.useEffect)((()=>{if(!s)return;const e=(0,o.filter)(((e,t)=>{const n=new Set([...(0,o.map)(null===e||void 0===e?void 0:e.approvedApps,"id"),...(0,o.map)(null===e||void 0===e?void 0:e.approvedInstantApps,"id"),...(0,o.map)(null===e||void 0===e?void 0:e.approvedVideos,"id")]),i=[];return(0,o.forEach)(t,(e=>{var t;n.has(e.id)||("video"===e.type?i.push({kind:"video",videoId:e.id}):i.push({kind:"app",appId:e.id,type:e.type,packageNameOrId:null!==(t=e.packageNameOrId)&&void 0!==t?t:e.id}))})),i})(g.current,t),(e=>!m.current.has(rS(e))));(0,o.forEach)(e,(e=>{("video"===e.kind?D&&k:j)&&I.has(rS(e))&&(m.current.set(rS(e),e),"video"===e.kind?r(aS.videoApproved({videoId:e.videoId})):r(aS.appApproved({appId:e.appId,type:e.type,packageNameOrId:e.packageNameOrId})))})),(0,o.forEach)(((e,t)=>{const n=new Set((0,o.map)(t,"id")),i=[];return e.forEach(((e,t)=>{n.has(t)||i.push(e)})),i})(m.current,t),(e=>{m.current.delete(rS(e)),"video"===e.kind?r(aS.videoUnapproved({videoId:e.videoId})):r(aS.appUnapproved({appId:e.appId,type:e.type,packageNameOrId:e.packageNameOrId}))}))}),[s,t,r,I,j,D,k]),(0,a.useEffect)((()=>()=>{s&&r(aS.stoppedEditing())}),[s,r]);const R=(0,a.useCallback)((async()=>
3{if(v.current)return null;v.current=!0;try{var e;try{await r((0,Ys.q)({keepDraft:!0})).unwrap()}catch(t){return null}return null!==(e=u.h.getState().configuration.editingConfiguration)&&void 0!==e?e:null}finally{v.current=!1}}),[r]);return{configId:s,error:c,commit:R}},sS=(0,a.memo)((e=>{let{total:t,progress:n}=e;return(0,p.jsx)(m.Z,{direction:"row",spacing:2,role:"progressbar","aria-label":"Setup progress","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":n,"aria-valuetext":"Step ".concat(n," of ").concat(t),sx:{width:"100%"},children:(0,o.map)((0,o.range)(t),(e=>(0,p.jsx)(i.Z,{sx:{flex:1,height:10,borderRadius:999,bgcolor:y.DG.grey[300],overflow:"hidden"},children:(0,p.jsx)(i.Z,{sx:{width:"".concat(100*Math.max(0,Math.min(1,n-e)),"%"),height:"100%",borderRadius:999,bgcolor:y.DG.primary[200],transition:"width 450ms cubic-bezier(0.4, 0, 0.2, 1)"}})},e)))})}));sS.displayName="StepMeter";const dS=(0,a.memo)((e=>{var t,n,r,l,s,d,c;const{variant:h="quickstart",onClose:g}=e,x="fullscreen"===h,{organizationId:f}=(0,w.P)(),j=(0,u.I0)(),Z=(0,a.useMemo)((()=>(e=>{try{var t,n;const i=window.localStorage.getItem(BZ(e));if(!i)return null;const a=JSON.parse(i);return(0,o.includes)(LZ,a.step)&&(0,o.isArray)(a.selectedContent)?{step:a.step,selectedContent:a.selectedContent,deviceChoice:(0,o.includes)(OZ,a.deviceChoice)&&null!==(t=a.deviceChoice)&&void 0!==t?t:null,trialConfigurationId:null!==(n=a.trialConfigurationId)&&void 0!==n?n:null}:null}catch(i){return null}})(f)),[f]),D=(0,u.v9)((e=>e.ui.app.onboardingEntryPoint)),M=(0,a.useRef)("addDevice"===D).current;(0,a.useEffect)((()=>{"addDevice"===D&&j(Te.dV.actions.onboardingEntryPointSet("continue"))}),[]);const k=(null!==(t=null===Z||void 0===Z?void 0:Z.selectedContent.length)&&void 0!==t?t:0)>0,I=M&&!k,[A,R]=(0,a.useState)(M?"device":"device"===(null===Z||void 0===Z?void 0:Z.step)?"content":null!==(n=null===Z||void 0===Z?void 0:Z.step)&&void 0!==n?n:"welcome"),[T,P]=(0,a.useState)(null!==(r=null===Z||void 0===Z?void 0:Z.selectedContent)&&void 0!==r?r:[]),[L,N]=(0,a.useState)(null!==(l=null===Z||void 0===Z?void 0:Z.trialConfigurationId)&&void 0!==l?l:null),[U,F]=(0,a.useState)(null!==(s=null===Z||void 0===Z?void 0:Z.deviceChoice)&&void 0!==s?s:null),[O,_]=(0,a.useState)(null),[z,B]=(0,a.useState)(0),[W,V]=(0,a.useState)("pick"),[G,H]=(0,a.useState)(0),[q,Y]=(0,a.useState)(_Z),[
3K,X]=(0,a.useState)(!1),[Q,J]=(0,a.useState)(!1),{configId:$,error:ee,commit:te}=lS({selectedContent:T,trialConfigurationId:L,onTrialConfigurationIdChange:N}),ne=function(){return IZ(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}(I);(0,a.useEffect)((()=>{"welcome"===A&&0===T.length&&!L&&!U||((e,t)=>{try{window.localStorage.setItem(BZ(e),JSON.stringify(t))}catch(n){}})(f,{step:A,selectedContent:T,deviceChoice:U,trialConfigurationId:L})}),[f,A,T,U,L]);const{documents:ie,fetched:oe}=(0,E.D)(S.F.Configurations),ae=(0,a.useRef)(null!=Z||M),re=(0,a.useRef)(!1);(0,a.useEffect)((()=>{if(re.current||!oe)return;re.current=!0;const e=(0,o.find)(ie,{name:oS});!ae.current&&e&&(N(e.id),R(PZ(e)?"homescreen":"content"))}),[oe,ie]),(0,a.useEffect)((()=>{var e;-1===(0,o.indexOf)(ne,A)&&R(null!==(e=ne[0])&&void 0!==e?e:"welcome")}),[ne,A]);const le=(0,a.useMemo)((()=>{const e=(0,o.find)(ie,(e=>e.id===L));return e?{deviceExperienceMode:(t=e).deviceExperienceMode,customLauncherSettings:t.customLauncherSettings}:void 0;var t}),[ie,L]),se=le?(e=>{const t=e.customLauncherSettings;let n=0;return e.deviceExperienceMode&&(n+=1),null!==t&&void 0!==t&&t.customColors&&(n+=1),null!==t&&void 0!==t&&t.backgroundUrl&&(n+=1),(null!==t&&void 0!==t&&t.topLogoUrl||null!==t&&void 0!==t&&t.bottomLogoUrl)&&(n+=1),null!==t&&void 0!==t&&t.hiddenSettings&&Object.keys(t.hiddenSettings).length>0&&(n+=1),n})(le):0,de=(0,a.useCallback)((()=>{(0,b.ec)("Onboarding Step Completed",{step:A});const e=ne[(0,o.indexOf)(ne,A)+1];if(!e)return WZ(f),void g();R(e)}),[ne,A,g,f]),ce=ne[(0,o.indexOf)(ne,"device")+1],ue=ce?"Next: ".concat(null!==(d=null===(c=RZ(ce))||void 0===c?void 0:c.title)&&void 0!==d?d:"Continue"):"Go to devices",pe={onNext:de,onSkip:g,selectedContent:T,onSelectedContentChange:P,trialConfigurationId:$,trialConfigurationError:ee,commitTrialConfiguration:te,deviceChoice:U,onDeviceChoiceChange:F,onSetupProgress:B,onConfigurationCommitted:_},he=()=>{switch(A){case"welcome":return(0,p.jsx)(Gw,{...pe});case"content":return(0,p.jsx)(Aj,{shareDialogWizardMode:!0,children:(0,p.jsx)(uZ,{...pe})});case"homescreen":return(0,p.jsx)(Lw,{...pe});case"wifi":return(0,p.jsx)(iS,{...pe,wifiDraft:q,onWifiDraftChange:Y,onAdvancedOpenChange:X});case"preview":return(0,p.jsx)(zw,{...pe,committedConfiguration:O,onAnyInviteSent:()=>J(!0)});case"device":return(0,p.jsx)(dw,{...pe,phase:W,onPhaseChange:V,enrollPage:G,onEnrollPageChange:H,finishLabel:ue,deviceIsLast:!ce});default:return null}},me=(0,a.useCallback)((()=>{(0,b.u0)({surface:"quickstart",control:"exit",action:"clicked",value:"skip",metadata:{step:A}}),g()}),[g,A]),ge=x&&(0,p.jsx)(m.Z,{direction:"row",justifyContent:"flex-end",sx:{width:"100%",paddingTop:2,paddingX:3},children:(0,p.jsx)(C.Z,{"data-testid":"onboardingFlow_skipToDashboard",onClick:me,sx:{color:"text.secondary",textTransform:"none",fontSize:13},children:"Skip to dashboard \u2192"})}),ve=RZ(A),Ce="device"===A,xe=null!=U&&"later"!==U,fe="content"===A?T.length>0?1:0:"homescreen"===A||"wifi"===A?z:1,be=ve&&(0,p.jsxs)(m.Z,{spacing:1.75,sx:{width:"100%",marginBottom:2.5},children:[(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"h4",sx:{fontFamily:y.ht,fontWeight:700,lineHeight:1.1},children:ve.headerTitle}),(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",children:ve.headerSubtitle})]}),(0,p.jsx)(sS,{total:Ce?2:3,progress:Ce?(xe?1:0)+z:ve.number-1+fe})]}),ye=(0,o.filter)(ne,(e=>"welcome"!==e&&"device"!==e)),je=(0,o.indexOf)(ye,A)+1,Ze=ne[(0,o.indexOf)(ne,A)-1],we=je>1&&Ze?()=>R(Ze):void 0,Ee="wifi"===A?(0,p.jsx)(MZ,{label:"Skip",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"wifi",control:"wifi-skip",action:"clicked"}),B(1),de()}}):void 0,Se="device"===ne[(0,o.indexOf)(ne,"preview")+1]?"Continue to device setup":"Continue to dashboard",De=Q?(0,p.jsx)(MZ,{label:Se,onClick:de}):(0,p.jsx)(MZ,{label:"Skip",onClick:()=>{(0,b.u0)({surface:"quickstart",step:"preview",control:"preview-later",action:"clicked"}),de()}}),Me=ve&&"device"!==A?(0,p.jsx)(kZ,{number:je,title:ve.title,subtitle:ve.subtitle,onBack:"wifi"===A&&K?void 0:we,bottomEnd:Ee,children:he()}):"preview"===A?(0,p.jsx)(kZ,{number:je,title:"Invite a teammate",subt
3itle:"Share ManageXR with a coworker so they can help set up and manage your headsets.",onBack:we,bottomEnd:De,children:he()}):he(),ke=(0,o.indexOf)(ne,A),Ie=Ce?[]:(0,o.filter)(AZ,(e=>(0,o.indexOf)(ne,e.step)<ke)),Ae=Ie.length>0&&(0,p.jsx)(m.Z,{sx:{width:"100%",paddingLeft:3},children:(0,o.map)(Ie,(e=>{return(0,p.jsx)(DZ,{completed:!0,connector:!0,title:e.title,summary:"homescreen"===e.step?(t=se,t>0?"".concat(t," ").concat(1===t?"customization":"customizations"):void 0):TZ(e.step,T.length),onClick:()=>R(e.step)},e.step);var t}))}),Re=(0,p.jsxs)(i.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",bgcolor:"common.white",...x?{height:"100%",overflowY:"auto",overscrollBehavior:"none"}:{minHeight:"calc(100vh - ".concat(ud.iU,"px)"),marginY:"".concat(-ud.mO,"px")}},children:[ge,(0,p.jsxs)(m.Z,{alignItems:"center",sx:{width:"100%",maxWidth:1280,paddingX:7,paddingY:"welcome"===A?0:4,flex:1},children:[be,Ae,Me]})]});return x?(0,p.jsx)(kn.Z,{open:!0,fullScreen:!0,transitionDuration:0,"aria-label":"Onboarding setup",onClose:(e,t)=>{"escapeKeyDown"===t&&g()},children:Re}):Re}));dS.displayName="OnboardingFlow";const cS=(0,a.memo)((()=>(0,p.jsx)(i.Z,{sx:{position:"fixed",inset:0,bgcolor:"common.white",zIndex:e=>e.zIndex.drawer+1}})));cS.displayName="OnboardingLandingCover";var uS=n(61889);const pS=()=>{const{privileges:e,configurationsFullAccess:t}=(0,w.P)();return e.configurations&&t},hS=()=>{var e;const{id:t,createdAt:n,hideOnboarding:i}=(0,d.kV)(),a=pS(),{organizationAnalytics:r}=(0,d.mP)("useOnboardingRule"),l=(0,xo.ty)(S.F.OrganizationAnalytics,t),{documents:s,fetched:c}=(0,E.D)(S.F.Configurations),u=(null!==(e=null===r||void 0===r?void 0:r.registeredDeviceEventCount)&&void 0!==e?e:0)>0,p=(0,o.some)(s,(e=>PZ(e))),h=null!=n&&Date.now()-n<3888e6,m=!l||!c;return{pending:m,showOnboarding:!m&&!i&&h&&(a?!u||!p:!u),orgIsRecent:h,orgHasDevice:u,orgHasContent:p}},mS=e=>{const[t,n]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(!e)return void n(!1);if(t)return;const i=window.setTimeout((()=>n(!0)),8e3);return()=>window.clearTimeout(i)}),[e,t]),t},gS=()=>{const{organization:e}=(0,d.mP)("useOnboardingVariant");return(0,d.GB)()&&!e.customContract?"test":"control"},vS=(e,t)=>t?(0,o.find)(e.variants,(e=>e===t)):void 0,CS=(e,t,n,i)=>{var a,r;const[l]=e.variants;if(i)return i;const s=vS(e,t);if(s)return s;const d=t&&n?((e,t)=>{const n=(0,o.compact)((0,o.map)(t.split(","),(e=>e.trim())));if(n.length<2)return null;const i=(0,o.compact)((0,o.map)(n,(t=>{const[n,i]=t.split(":"),o=vS(e,n),a=Number(i);if(o&&Number.isFinite(a)&&!(a<0))return{variant:o,weight:a}})));return i.length!==n.length||(0,o.sumBy)(i,(e=>e.weight))<=0||(0,o.uniqBy)(i,(e=>e.variant)).length!==i.length?null:i})(e,t):null;if(!d)return l;const c=(0,o.keyBy)(d,(e=>e.variant)),u=(0,o.filter)((0,o.compact)((0,o.map)(e.variants,(e=>c[e]))),(e=>e.weight>0)),p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=3735928559^t,i=1103547991^t;for(let o=0;o<e.length;o++){const t=e.charCodeAt(o);n=Math.imul(n^t,2654435761),i=Math.imul(i^t,1597334677)}return n=Math.imul(n^n>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),i=Math.imul(i^i>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&i)+(n>>>0)}("".concat(e.key,":").concat(n))/Number.MAX_SAFE_INTEGER*(0,o.sumBy)(u,(e=>e.weight));let h=0;const m=(0,o.find)(u,(e=>(h+=e.weight,p<h)));return null!==(a=null===(r=null!==m&&void 0!==m?m:(0,o.last)(u))||void 0===r?void 0:r.variant)&&void 0!==a?a:l},xS={key:"trial-onboarding",variants:["control","quickstart","fullscreen"]},fS=new Set,bS=()=>{var e;const t=null===(e=(0,z.T)("featureFlags"))||void 0===e?void 0:e.onboardingExperiment,{organization:n}=(0,d.mP)("useTrialOnboardingVariant"),i=n.id,o=(()=>{const e=(0,d.GB)(),{organization:t}=(0,d.mP)("useTrialOnboardingEligibility");return e&&!t.customContract})(),r=(0,a.useMemo)((()=>(e=>{var t,n;if("undefined"===typeof window)return;const i="mxr_experiment_".concat(e.key),[o,a]=null!==(t=null===(n=new URLSearchParams(window.location.search).get("exp"))||void 0===n?void 0:n.split(":"))&&void 0!==t?t:[],r=o===e.key?vS(e,a):void 0;return r?(window.localStorage.setItem(i,r),r):vS(e,window.localStorage.getItem(i))})(xS)),[]),l=CS(xS,t,i,r),s=void 0!==vS(xS,t);return(0,a.useEffect)((()=>
3{if(!o||s||r||"control"===l)return;const e="".concat(xS.key,":").concat(i,":").concat(l);fS.has(e)||(fS.add(e),(0,b.ec)("Experiment Viewed",{experiment:xS.key,variant:l}))}),[o,s,r,i,l]),l},yS=()=>{const e=(0,d.Yt)(),{id:t,hideOnboarding:n}=(0,d.kV)(),i=pS(),o=hS(),a=bS(),r=!!(0,z.T)("featureFlags"),l=o.pending||!r,s=mS(l);return e&&i?n||!o.orgIsRecent?"none":l?s?"none":"pending":o.showOnboarding?(e=>"true"===window.localStorage.getItem(UZ(e)))(t)?"none":"quickstart"===a?"quickstart":"fullscreen"===a?"fullscreen":"none":"none":"none"};var jS=n(19610);const ZS=e=>{let{deviceCount:t=1,showCountAndLink:n=!1}=e;const i=Yc();return(0,p.jsx)(ui.Q,{withBackground:!0,Icon:jS.Z,severity:"error",children:(0,p.jsxs)(m.Z,{spacing:1,children:[n?(0,p.jsxs)(v.Z,{children:["ManageXR repair required on"," ",(0,p.jsxs)(Kn.Z,{component:Xc,to:i({query:{filterIds:["requiresMxrRepair"]}}),fontWeight:"bold",children:[t," ",(0,ul.n8)(t,"Device","s")]})]}):(0,p.jsx)(v.Z,{children:"Requires ManageXR Repair"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["To continue remotely managing"," ",1===t?"this device":"these devices",", you need to repair the ManageXR installation."," ",(0,p.jsxs)(Kn.Z,{href:"https://help.managexr.com/en/articles/7244265-fixing-your-managexr-installation",target:"_blank",rel:"noopener noreferrer",style:{display:"inline-flex",flexDirection:"row",alignItems:"center"},children:[(0,p.jsxs)("span",{children:["Learn how to repair your ",(0,ul.n8)(t,"device","s")]}),"\xa0",(0,p.jsx)(Mu.Z,{sx:{fontSize:"1em",transform:"translateY(-1px)"}})]})]})]})})};const wS=n.p+"static/media/dashboardOnboardingGraphic.8070a19f63e156b5c637a9129f8db4be.svg";var ES=n(84845);const SS=n.p+"static/media/add_device.7e15dce1eff09b6b72d3.png",DS=n.p+"static/media/create_config.2137c608f7a49113c417.png",MS=n.p+"static/media/dashboard_hero_2cards.4a514c5bae5509eab59a.png",kS=n.p+"static/media/dashboard_hero_3cards.d66bf1ac307359301660.png",IS=n.p+"static/media/dashboard_hero_bg.0a2289d6dd94345fc9f7.jpg",AS=n.p+"static/media/explore_commands.15e95eb982580b5e27bf.png",RS=n.p+"static/media/invite_teammate.b2993f6fe54956c98d09.png",TS="mxr_explored_commands_",PS=e=>{return t="".concat(TS).concat(e),(0,di.oZ)("localStorage")&&"true"===window.localStorage.getItem(t);var t},LS=e=>{return t="".concat(TS).concat(e),void((0,di.oZ)("localStorage")&&window.localStorage.setItem(t,"true"));var t};var NS=n(32419);const US=[{label:"Set up devices and send basic commands",tooltip:"Register devices, view device details, and send basic commands like reboot, sync, and launch app"},{label:"Device streaming",tooltip:"Remotely view the screen of any device you can access"}],FS=[{privilege:pe.e.Content,label:"Library management",tooltip:"Add, edit, and delete apps, videos, webxr links, files, wi-fi networks, and certificates in the organization library"},{privilege:pe.e.Devices,label:"Device management",tooltip:"Edit device info, assign configurations, manage tags, and perform bulk actions on devices you can access"},{privilege:pe.e.Configurations,label:"Configuration management",tooltip:"Edit configurations you can access. Creating new configurations requires full Configuration and Device Access."},{privilege:pe.e.Organization,label:"Organization and user management",tooltip:"Manage users, roles, API keys, and organization settings. Requires full Configuration and Device Access."},{privilege:pe.e.Billing,label:"Billing management",tooltip:"View and manage subscriptions, payment methods, and invoices"}],OS={width:38,height:38,display:"flex",alignItems:"center",justifyContent:"center"},_S={fontSize:20},zS=e=>{let{label:t,tooltip:n}=e;return(0,p.jsx)(ee.Z,{title:n,placement:"right",children:(0,p.jsx)("span",{children:t})})};zS.displayName="PrivilegeLabel";const BS=e=>{let{label:t,tooltip:n,iconColor:o,labelColor:a,icon:r}=e;return(0,p.jsx)(po.Z,{label:(0,p.jsx)(zS,{label:t,tooltip:n}),sx:{"& > .MuiFormControlLabel-label":{color:a}},control:(0,p.jsx)(i.Z,{sx:OS,children:"check"===r?(0,p.jsx)(Vi.Z,{sx:{..._S,color:o}}):(0,p.jsx)(J.Z,{sx:{..._S,color:o}})})})},WS=(0,a.memo)((e=>{let{privileges:t,readOnly:n,disabled:i,compact:r,onPrivilegeChange:l,disabledPrivileges:s=[]}=e;const d=(0,a.useCallback)(((e,t)=>{null===l||void 0===l||l(e,t)}),[l]);return(0,p.jsxs)(m.Z,{spacing:r?.5:1.5,children:[(0,p.jsx)(m.Z,{spacing:.5,children:r?(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",children:"Platform Access"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Platform Access"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"What features can this role access?"})]})}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,o.map)(US,(e=>(0,p.jsx)(BS,{label:e.label,tooltip:e.tooltip,icon:"check",iconColor:i?"text.secondary":"primary.main",labelColor:i?"text.secondary":"text.primary"},e.label))),(0,o.map)(FS,(e=>{let{privilege:a,label:r,tooltip:l}=e;const c=t[a],u=i||(0,o.includes)(s,a);return n?(0,p.jsx)(BS,{label:r,tooltip:l,icon:c?"check":"close",iconColor:c?"primary.main":"text.secondary",labelColor:c?"text.primary":"text.secondary"},a):(0,p.jsx)(po.Z,{label:(0,p.jsx)(zS,{label:r,tooltip:l}),disabled:u,sx:{"&.Mui-disabled":{"& >
3 .MuiFormControlLabel-label, & > .MuiCheckbox-root":{color:"text.secondary"}}},control:(0,p.jsx)(Pi.Z,{checked:c,size:"small",onChange:e=>d(a,e.target.checked)})},a)}))]})]})}));WS.displayName="RolePrivilegesList";const VS=e=>{var t,n;let{open:i,onClose:r,onSubmit:l,editing:s,defaultRole:d,defaultPrivileges:c}=e;const{privileges:u,role:h}=(0,w.P)(),g=Be.vc.organizationUsers.privilegesForRole,v=Be.vc.organizationUsers.privilegeDescriptions,{register:x,handleSubmit:f,reset:b,control:y,watch:j,setValue:Z,formState:E}=(0,fg.cI)(),S=f((e=>{const t=s&&e.role!==pe.Z.Custom?null:void 0;return l({...e,userRoleId:t})}));(0,a.useEffect)((()=>{i&&b(s?{role:s.role,privileges:s.privileges}:{role:null!==d&&void 0!==d?d:pe.Z.Viewer,privileges:null!==c&&void 0!==c?c:g.viewer})}),[s,i,g.viewer,b,Z,d,c]);const D=j("privileges.organization"),M=(0,a.useMemo)((()=>["content","devices","configurations"]),[]);(0,a.useEffect)((()=>{D&&M.forEach((e=>{Z("privileges.".concat(e),!0)}))}),[M,D,Z]);const k=j("role");return(0,a.useEffect)((()=>{k!==pe.Z.Custom&&Z("privileges",g[k])}),[g,k,Z]),(0,p.jsxs)(kn.Z,{open:i,onClose:r,fullWidth:!0,maxWidth:"xs",children:[(0,p.jsx)(In.Z,{children:s?"Edit User Role":"Add User"}),(0,p.jsxs)("form",{onSubmit:S,noValidate:!0,autoComplete:"off",children:[(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[s?(0,p.jsxs)(mf.h,{children:["Select role for"," ",(0,p.jsx)("em",{children:null!==(t=s.userProfile.name)&&void 0!==t?t:s.userProfile.email})]}):(0,p.jsx)(Ln.Z,{type:"email",label:"Email Address",placeholder:"[email protected]",helperText:null===(n=E.errors.email)||void 0===n?void 0:n.message,error:!!E.errors.email,fullWidth:!0,autoFocus:!0,...x("email",NS.LV)}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(fg.Qr,{control:y,name:"role",render:e=>{let{formState:t,field:n}=e;return(0,p.jsx)(Ln.Z,{...n,inputRef:n.ref,select:!0,label:"Role",fullWidth:!0,disabled:t.isSubmitting,children:(0,o.map)(pe.Z,(e=>(e!==pe.Z.Owner||h===pe.Z.Owner)&&(0,p.jsx)(Hi.Z,{value:e,children:(0,o.capitalize)(e)},e)))})}}),(0,o.map)(pe.e,(e=>(0,p.jsx)(fg.Qr,{control:y,name:"privileges.".concat(e),render:t=>{let{field:n,formState:i}=t;return(0,p.jsx)(po.Z,{sx:{"&.Mui-disabled":{"& > .MuiFormControlLabel-label, & > .MuiCheckbox-root":{color:"text.secondary"}}},label:v[e],disabled:i.isSubmitting||k!==pe.Z.Custom||e===pe.e.Default||!u[e]||D&&M.includes(e),control:(0,p.jsx)(Pi.Z,{inputRef:n.ref,checked:n.value,size:"small",...n,onChange:e=>n.onChange(e.target.checked)})})}},e)))]}),!s&&(0,p.jsx)(Tn.Z,{variant:"body2",children:"We'll send an email to this user with instructions to join your\xa0organization."})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:r,disabled:E.isSubmitting,children:"Cancel"}),(0,p.jsx)(Un.U,{icon:!s&&(0,p.jsx)(Wn.Z,{}),submitting:E.isSubmitting,children:s?"Save":"Add"})]})]})]})},GS="__add_custom_role__",HS=(0,a.memo)((e=>{let{role:t}=e;const{documents:n}=(0,E.D)(S.F.Configurations),i=(0,a.useMemo)((()=>{if(t.configurationsFullAccess)return"All Configurations";const e=(0,o.keyBy)(n,"id");return(0,o.filter)((0,o.map)(t.approvedConfigurationIds,(t=>{var n;return null===(n=e[t])||void 0===n?void 0:n.name}))).join(", ")||"No configurations"}),[n,t.approvedConfigurationIds,t.configurationsFullAccess]),r=(0,a.useMemo)((()=>t.configurationsFullAccess?n.length:t.approvedConfigurationIds.length),[n.length,t.approvedConfigurationIds.length,t.configurationsFullAccess]),l=(0,a.useMemo)((()=>{if(t.configurationsFullAccess)return(0,o.sumBy)(n,(e=>{var t;return null!==(t=e.deviceCount)&&void 0!==t?t:0}));const e=(0,o.keyBy)(n,"id");return(0,o.sumBy)(t.approvedConfigurationIds,(t=>{var n,i;return null!==(n=null===(i=e[t])||void 0===i?void 0:i.deviceCount)&&void 0!==n?n:0}))}),[n,t.approvedConfigurationIds,t.configurationsFullAccess]);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Role Summary"}),(0,p.jsxs)(v.Z,{variant:"subtitle2",color:"text.secondary",children:["Configuration and Device Access (",r," ",1===r?"config":"configs",", ",l," ",1===l?"device":"devices",")"]}),(0,p.jsx)(v.Z,{variant:"subtitle1",children:i})]}),(0,p.jsx)(WS,{privileges:t.privileges,readOnly:!0,compact:!0})]})}));HS.displayName="RoleSummary";const qS=e=>{var t;let{open:n,onClose:i,onSubmit:r,editing:l,onAddRole:s,defaultRoleId:d}=e;const{role:c}=(0,w.P)(),{roles:u,rolesById:h}=to(),[g,x]=(0,a.useState)(!1),f=(0,a.useMemo)((()=>(0,o.map)((0,o.filter)(u,(e=>e.id!==pe.Z.Owner||c===pe.Z.Owner)),(e=>({value:e.id,label:e.name})))),[u,c]),b=(0,a.useMemo)((()=>s?[{value:GS,selectLabel:"Add a custom role",label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(v.Z,{color:"primary.main",fontSize:"inherit",fontWeight:500,children:"Add a custom role"}),(0,p.jsx)(hp.Z,{sx:{fontSize:"1rem",color:"primary.main"}})]})}]:void 0),[s]),y=(0,a.useCallback)((()=>l?l.userRoleId?l.userRoleId:l.role:d),[d,l]),{register:j,handleSubmit:Z,reset:E,watch:S,setValue:D,formState:M}=(0,fg.cI)({mode:"onTouched"});(0,a.useEffect)((()=>{n&&E({email:"",selectedRoleId:y()})}),[y,n,E]);const k=S("selectedRoleId"),I=(0,a.useMemo)((()=>k&&k!==GS?h[k]:void 0),[h,k]),A=Z((async e=>{const t=(0,o.find)(h,(t=>t.id===e.selectedRoleId));if(t){x(!0);try{await r({email:e.email,role:t.isSystem?t.id:pe.Z.Custom,privileges:t.privileges,userRoleId:t.isSystem?null:t.id})}finally{x(!1)}}})),R=(0,a.useCallback)((()=>{null===s||void 0===s||s((e=>{D("selectedRoleId",e)}))}),[s,D]),T=(0,a.useCallback)((e=>{e!==GS?D("selectedRoleId",e):R()}),[R,D]);return(0,p.jsxs)(kn.Z,{open:n,onClose:i,fullWidth:!0,maxWidth:"sm",children:[(0,p.jsxs)(In.Z,{component:m.Z,children:[l?"Edit User's Role":"Add User",l&&(0,p.jsxs)(mf.h,{emphasisColor:"text.primary",children:["Select role for"," ",(0,p.jsx)("em",{children:l.userProfile.claimed?"".concat(l.userProfile.name,", ").concat(l.userProfile.email):l.userProfile.email})]})]}),(0,p.jsxs)("form",{onSubmit:A,noValidate:!0,autoComplete:"off",children:[(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[!l&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Tn.Z,{variant:"body2",children:"We'll send an email to this user with instructions to join your\xa0organization."}),(0,p.jsx)(Ln.Z,{type:"email",label:"Email Address",placeholder:"[email protected]",helperText:null===(t=M.errors.email)||void 0===t?void 0:t.message,error:!!M.errors.email,fullWidth:!0,autoFocus:!0,sx:{"& .MuiFormHelperText-root":{minHeight:"1.5em"}},...j("email",NS.LV)})]}),(0,p.jsx)(Qi,{label:"Role",value:k,options:f,stickyOptions:b,maxMenuHeight:300,onChange:T,disabled:g,fullWidth:!0}),I&&(0,p.jsx)(HS,{role:I})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:i,disabled:g,children:"Close"}),(0,p.jsx)(Un.U,{icon:!l&&(0,p.jsx)(Wn.Z,{}),submitting:g,children:l?"Save role":"Add user"})]})]})]})},YS=(0,a.memo)((e=>{let{open:t,onClose:n,onSubmit:i,editing:o,onAddRole:a,defaultRole:r,defaultPrivileges:l,defaultRoleId:s}=e;return(0,Le.ye)("enableCustomUserRoles")?(0,p.jsx)(qS,{open:t,onClose:n,onSubmit:i,editing:o,onAddRole:a,defaultRoleId:s}):(0,p.jsx)(VS,{open:t,onClose:n,onSubmit:i,editing:o,defaultRole:r,defaultPrivileges:l})}));var KS=n(21164),XS=n(82962);const QS=(0,a.memo)((e=>{let{open:t,onClose:n,onAddAnother:o,signUpKeyId:a}=e;return(0,p.jsx)(Ro.Q,{title:"Add User",open:t,onClose:n,maxWidth:"xs",rightActions:[(0,p.jsx)(C.Z,{variant:"outlined",color:"primary",onClick:n,children:"Close"}),(0,p.jsx)(C.Z,{variant:"outlined",color:"primary",onClick:o,children:"Add another user"})],children:(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1.5,sx:{textAlign:"center"},children:[(0,p.jsx)(XS.Z,{color:"action",sx:{fontSize:36}}),(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",children:"Sent! We sent the user an email invite."}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["You can also copy the"," ",(0,p.jsx)(i.Z,{component:"span",sx:{dis
3play:"inline-flex",alignItems:"center"},children:(0,p.jsx)(ae,{value:window.location.origin+(0,c.LT)(c._j.auth.signUp,void 0,{key:a}),children:(0,p.jsxs)(Kn.Z,{component:"span",underline:"hover",color:"primary",sx:{display:"inline-flex",alignItems:"center",gap:.5,verticalAlign:"top"},children:[(0,p.jsx)(KS.Z,{fontSize:"small"}),"Invite Link"]})})})," ","and share it directly"]})]})})})),JS=(0,Kc.ZP)(i.Z)((()=>({borderRadius:8,backgroundColor:y.DG.purple[800],backgroundImage:"url(".concat(kS,"), url(").concat(IS,")"),backgroundSize:"auto calc(100% - 48px), cover",backgroundPosition:"right 24px top 24px, center center",backgroundRepeat:"no-repeat, no-repeat",padding:32,minHeight:300,display:"flex",flexDirection:"column",justifyContent:"center","@media (max-width: 1500px)":{backgroundImage:"url(".concat(MS,"), url(").concat(IS,")"),backgroundPosition:"calc(100% - 90px + (1500px - 100vw) * 0.2) 24px, center center"},"@media (max-width: 1150px)":{backgroundImage:"url(".concat(IS,")"),backgroundSize:"cover",backgroundPosition:"center center"}}))),$S=(0,Kc.ZP)(C.Z)({backgroundColor:y.DG.primary[200],"&:hover":{backgroundColor:y.DG.primary[300]},paddingLeft:48,paddingRight:48,paddingTop:8,paddingBottom:8}),eD=(0,Kc.ZP)(C.Z)({color:y.DG.white,borderColor:y.DG.white,"&:hover":{borderColor:y.DG.white,backgroundColor:"rgba(255,255,255,0.1)"},paddingLeft:24,paddingRight:24}),tD=(0,Kc.ZP)(i.Z)({display:"grid",gridTemplateColumns:"repeat(4, 1fr)",alignItems:"start",gap:20,paddingTop:16,paddingBottom:0,"@media (max-width: 1260px)":{gridTemplateColumns:"repeat(2, 1fr)",gap:16}}),nD=(0,Kc.ZP)(Me.Z)({cursor:"pointer",display:"flex",flexDirection:"column",overflow:"hidden",backgroundColor:y.DG.white,borderRadius:12,position:"relative"}),iD=(0,Kc.ZP)(i.Z)({height:134,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",paddingTop:14,paddingLeft:16,paddingRight:16,"@media (max-width: 1260px)":{height:160}}),oD=(0,Kc.ZP)(v.Z)({fontSize:13,fontFamily:y.JB,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}),aD=(0,a.memo)((()=>{const{buildOrganizationPath:e,privileges:t,organizationId:n}=(0,w.P)(),r=(0,l.k6)(),s=(0,u.I0)(),d=bS(),c=e((e=>e.quickstart)),h=hS(),g=pS(),[C,x]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[Z,D]=(0,a.useState)(!1),[M,k]=(0,a.useState)(!1),[I,A]=(0,a.useState)(""),[R]=(0,a.useState)((()=>PS(n))),{documents:T}=(0,E.D)(S.F.UserOrganizationPrivileges),P=(0,a.useMemo)((()=>{const e=new Set;return h.orgHasDevice&&e.add("add_device"),R&&e.add("explore_commands"),h.orgHasContent&&e.add("create_configuration"),(0,o.size)(T)>=2&&e.add("invite_teammate"),e}),[h.orgHasDevice,h.orgHasContent,R,T]),L=(0,a.useCallback)((()=>{g?(s(Te.dV.actions.onboardingEntryPointSet("addDevice")),"quickstart"===d?((0,Ne.y)("dashboard-cta"),r.push(c)):s(Te.dV.actions.onboardingOverlaySet("open"))):j(!0)}),[g,s,d,r,c]),N=(0,a.useCallback)((()=>{(0,b.u0)({surface:"dashboard",control:"no-device",action:"clicked"}),x(!0)}),[]),U=(0,a.useCallback)((t=>{(0,b.ec)("Onboarding No Device Reported",{reason:t,source:"dashboard"}),x(!1),r.push(e((e=>e.marketplace.hardwarePartners)))}),[r,e]),F=(0,a.useCallback)((()=>{r.push("".concat(e((e=>e.devices)),"?action=commands"))}),[r,e]),O=(0,a.useCallback)((()=>{g?(s(Te.dV.actions.onboardingEntryPointSet("continue")),"quickstart"===d?((0,Ne.y)("dashboard-cta"),r.push(c)):s(Te.dV.actions.onboardingOverlaySet("open"))):j(!0)}),[g,s,d,r,c]),_=Ow((0,a.useCallback)((e=>{A(e),D(!1),k(!0)}),[])),z=(0,a.useCallback)((()=>{k(!1),D(!0)}),[]),B=(0,a.useMemo)((()=>{const e=[];return g&&e.push({id:"create_configuration",image:DS,title:"Upload content",subtitle:"Choose the apps and videos to load onto your headsets and preview the setup",onClick:O}),e.push({id:"explore_commands",image:AS,title:"Explore device commands",subtitle:"Launch content, adjust settings, and stream remotely from the web console",onClick:F},{id:"add_device",image:SS,title:"Add a device",subtitle:"Connect your first device in under 5 minutes using our Device Setup Tool",onClick:L}),t.organization&&e.push({id:"invite_teammate",image:RS,title:"Invite a teammate",subt
3itle:"Add team members and assign role-based permissions to customize access",onClick:()=>D(!0)}),e}),[g,L,F,O,t.organization]),W=!h.orgHasDevice;return(0,p.jsxs)(p.Fragment,{children:[W&&(0,p.jsxs)(JS,{children:[(0,p.jsx)(v.Z,{variant:"h3",sx:{color:"common.white",fontSize:44,lineHeight:1.4},children:"Welcome to your dashboard"}),(0,p.jsx)(v.Z,{sx:{color:"common.white",maxWidth:550},children:"Set up your first device and configure your fleet. This dashboard provides real-time insights into device status and activity."}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,sx:{flexWrap:"wrap",marginTop:4},children:[(0,p.jsx)($S,{variant:"contained",size:"large",onClick:()=>{(0,b.u0)({surface:"dashboard",control:"get-started",action:"clicked"}),O()},children:"Get started"}),(0,p.jsx)(eD,{variant:"outlined",onClick:N,children:"I don't have a device"})]})]}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(tD,{children:B.map((e=>{const t=P.has(e.id);return(0,p.jsxs)(nD,{role:"button",tabIndex:0,sx:{boxShadow:t?"none":y.mq,"&:hover":{boxShadow:t?"0px 12px 16px -4px rgba(0,0,0,0.06), 0px 4px 6px -2px rgba(0,0,0,0.02)":"0px 25px 34px -7px rgba(0,0,0,0.14), 0px 10px 14px -3px rgba(0,0,0,0.07)"},"&:focus-visible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}},onClick:()=>{(0,b.u0)({surface:"dashboard",control:"card",action:"clicked",value:e.title}),e.onClick()},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),(0,b.u0)({surface:"dashboard",control:"card",action:"clicked",value:e.title}),e.onClick())},children:[t&&(0,p.jsx)(ng.Z,{sx:{position:"absolute",top:12,right:12,zIndex:1,fontSize:24,color:"success.main"}}),(0,p.jsx)(iD,{sx:{opacity:t?.5:1},children:(0,p.jsx)(i.Z,{component:"img",src:e.image,alt:e.title,sx:{width:"100%",height:"100%",objectFit:"contain"}})}),(0,p.jsxs)(m.Z,{sx:{paddingX:2,paddingTop:.7,paddingBottom:2.1,opacity:t?.5:1},children:[(0,p.jsx)(v.Z,{variant:"h6",sx:{fontSize:16},children:e.title}),(0,p.jsx)(oD,{variant:"body2",color:"textSecondary",title:e.subtitle,children:e.subt
3itle})]})]},e.id)}))})}),(0,p.jsx)(wZ,{open:C,onClose:()=>x(!1),onSubmit:U,source:"dashboard"}),(0,p.jsx)(qo,{analyticsLocation:"Onboarding - Dashboard",open:f,onClose:()=>j(!1)}),(0,p.jsx)(YS,{open:Z,onClose:()=>D(!1),onSubmit:_,defaultRole:pe.Z.Manager,defaultPrivileges:Fw,defaultRoleId:pe.Z.Manager}),(0,p.jsx)(QS,{open:M,onClose:()=>k(!1),onAddAnother:z,signUpKeyId:I})]})}));aD.displayName="DashboardEmptyState";var rD=n(63498);const lD=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M.E6;const i=(0,a.useCallback)((e=>e?n(e):void 0),[n]),[o,r]=(0,a.useState)(i(e));return(0,a.useEffect)((()=>{r(i(e));const n=setInterval((()=>{r(i(e))}),t);return()=>clearInterval(n)}),[t,i,e]),o},sD=()=>{const{alertsLoading:e,dashboardStatsLoading:t,dashboardStatsUpdateTime:n,refreshDashboardStats:i}=(0,Xn.w)(),o=(0,d.kV)(),{organization:r}=(0,d.mP)(),l=(0,d.GB)()&&!r.customContract,s="test"===gS()&&l&&0===o.numActiveDevices;(0,a.useEffect)((()=>{Date.now()-n>6e5&&i()}),[n,i]);const c=lD(n,3e4);return(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,paddingX:.5,children:[(0,p.jsx)(Un.U,{size:"small",onClick:i,icon:(0,p.jsx)(ks.Z,{}),submitting:t||e,disabled:s,children:"Refresh"}),(0,p.jsxs)(v.Z,{sx:{whiteSpace:"nowrap",display:s?"none":void 0},color:"textSecondary",variant:"body2",children:["Updated ",c]})]}),(0,p.jsx)("div",{children:(0,p.jsx)(rD.$,{size:"large"})})]})};let dD;sD.displayName="DashboardHeader",function(e){e[e.NO_STATUS=0]="NO_STATUS",e[e.STATUS_FAILURE_CONFLICT=5]="STATUS_FAILURE_CONFLICT",e[e.ANDROID_PERMISSION_ERROR_CODE=996]="ANDROID_PERMISSION_ERROR_CODE",e[e.DOWNGRADE_ERROR=997]="DOWNGRADE_ERROR",e[e.DOWNLOAD_ERROR=998]="DOWNLOAD_ERROR",e[e.UNKNOWN_ERROR=999]="UNKNOWN_ERROR",e[e.MALFORMED_CA_CERT_ERROR_CODE=991]="MALFORMED_CA_CERT_ERROR_CODE",e[e.MALFORMED_USER_CERT_ERROR_CODE=990]="MALFORMED_USER_CERT_ERROR_CODE",e[e.MISSING_CA_CERT_ERROR_CODE=989]="MISSING_CA_CERT_ERROR_CODE",e[e.MISSING_WIFI_DOMAIN_ERROR_CODE=988]="MISSING_WIFI_DOMAIN_ERROR_CODE",e[e.MAS_INSTALL_ERROR=985]="MAS_INSTALL_ERROR"}(dD||(dD={}));const cD=e=>{var t,n;return"app_install_error"===e.type&&e.code===dD.DOWNGRADE_ERROR?"Unable to downgrade to an app with a lower Version Code. To install an older version, enable Force Install in the Configuration settings or manually uninstall the app in the Installed Apps tab.":"app_install_error"===e.type&&e.code===dD.STATUS_FAILURE_CONFLICT?"Package signatures do not match previously installed version. To override, enable Force Install in the Configuration settings or manually uninstall the app in the Installed Apps tab.":"app_expiration_alert"===e.type?"warning"===e.level?"App will expire ".concat((0,M.E6)(e.expirationTimestamp)," and will be ").concat(e.expirationBehavior===gp.Kv.DELETE_APP?"deleted":"disabled","."):"App expired ".concat((0,M.E6)(e.expirationTimestamp)," and ").concat(e.expirationBehavior===gp.Kv.DELETE_APP?"will be deleted":"has been disabled","."):"firmware_install_error"===e.type&&e.code===dD.DOWNGRADE_ERROR?"Installed version is greater than target version. PUI versions cannot be rolled back.":"low_battery"===e.type?"Battery level at 30% or less.":"low_storage"===e.type?"Device storage at 1GB or less.":"file_install_error"===e.type&&null!==(t=e.message)&&void 0!==t&&t.includes("null")?"Failed to download file.":"wifi_install_error"===e.type&&e.code===dD.MALFORMED_CA_CERT_ERROR_CODE?"The CA certificate you supplied for this network is incorrectly formatted or invalid. Go to the Wi-Fi Networks section of your Library to replace the CA certificate.":"wifi_install_error"===e.type&&e.code===dD.MALFORMED_USER_CERT_ERROR_CODE?"The user certificate you supplied for this network is incorrectly formatted or invalid. Go to the Wi-Fi Networks section of your Library to replace the User certificate.":"wifi_install_error"===e.type&&e.code===dD.MISSING_CA_CERT_ERROR_CODE?"Devices on Android 14+ require a CA certificate for enterprise Wi-Fi networks. Go to the Wi-Fi Networks section of your Library to add a CA certificate to be able to deploy this network to this device.":"wifi_install_error"===e.type&&e.code===dD.MISSING_WIFI_DOMAIN_ERROR_CODE?"Devices on Android 14+ require a domain for enterprise Wi-Fi networks. Go to the Wi-Fi Networks section of your Library to add a domain to be able to deploy this network to this device.":"low_controller_battery"===e.type?"Controller battery level at 20% or less.":"ssl_certificate_error"===e.type?"SSL certificate validation failed for this network. This likely indicates a missing content filtering certificate on the device.":"app_install_error"===e.type&&e.code===dD.MAS_INSTALL_ERROR?"Meta was unable to install this app. This may indicate an unrecognized app ID or an issue with the Meta Managed App Store configuration. Remove the app from the configuration and try again.":null!==(n=e.message)&&void 0!==n?n:"Unknown error"},uD=e=>{switch(e.type){case"network_error":return"error"===e.level?(0,o.startCase)("network_error"):(0,o.startCase)("network_issue");case"wifi_install_error":return"Wi-Fi Provisioning Error";case"certificate_error":return"Certificate Error";case"ssl_certificate_error":return"SSL Certificate Error";case"mhms_migration_failed":return"MHMS Migration Failed";default:return(0,o.startCase)(e.type)}},pD="Inconsistent network connection",hD=(e,t)=>e===t?t:"".concat(e," \u2013 ").concat(t),mD=(0,a.memo)((e=>{let{alerts:t,groupsDevices:n}=e;const{endpointTimes:i,errorRange:r,firstReported:l,lastCheckIn:s}=(0,a.useMemo)((()=>{var e,i;const a=(0,o.filter)(t,(e=>"device"===e.variant)),r=(0,o.flatMap)(a,(e=>{var t;return null!==(t=e.endpointTimes)&&void 0!==t?t:[{firstSeen:e.firstSeen,lastError:e.lastError}]}));return{endpointTimes:r,errorRange:(0,M.mT)((0,o.map)(r,(e=>e.lastError))),firstReported:null===(e=(0,M.mT)((0,o.map)(r,(e=>e.firstSeen))))||void 0===e?void 0:e.oldest,lastCheckIn:n?null===(i=(0,o.maxBy)(a,(e=>{var t;return null!==(t=e.lastError)&&void 0!==t?t:0})))||void 0===i?void 0:i.lastCheckIn:void 0}}),[t,n]),d=lD(null===r||void 0===r?void 0:r.oldest),c=lD(null===r||void 0===r?void 0:r.newest),u=lD(s);if(!r)return null;const h=(0,o.compact)(["Last error: ".concat(n?(0,M.aH)(r.newest):hD((0,M.aH)(r.oldest),(0,M.aH)(r.newest))),l&&"First reported: ".concat((0,M.aH)(l)),s&&"Last synced: ".concat((0,M.aH)(s)),...(0,o.uniq)((0,o.map)(i,(e=>e.endpoint&&e.lastError?"".concat(e.endpoint,": ").concat((0,M.aH)(e.lastError)):void 0)))]);return(0,p.jsx)(ee.Z,{placement:"bottom",disableInteractive:!1,leaveDelay:300,title:(0,p.jsx)(m.Z,{children:(0,o.map)(h,(e=>(0,p.jsx)(v.Z,{variant:"caption",children:e},e)))}),children:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.primary",children:n?c:hD(d,c)}),u&&(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:["Synced ",u]})]})})}));function gD(e){try{const t=new URL(e);return"".concat(t.protocol,"//").concat(t.hostname)}catch(t){return e}}mD.displayName="DeviceAlertTimesCell";const vD=e=>"ssl_certificate_error"===e.type?"SSL Certificate Error":e.message?gD(e.message):void 0,CD=(0,a.memo)((e=>{let{anchorEl:t,PaperProps:n,devices:r}=e;const l=(0,De.Z)(),{buildOrganizationPath:s}=(0,w.P)(),d=(0,a.useMemo)((()=>(0,o.sortBy)(r,"name")),[r]),c=(0,a.useCallback)((e=>{let{key:t,index:n,style:i,registerChild:o}=e;const a=d[n];if(a)return(0,p.jsx)("div",{style:i,ref:o,children:(0,p.jsx)(Kn.Z,{component:f.rU,to:s((e=>e.devices.device),{deviceId:a.id}),children:(0,p.jsx)(Ui.G,{title:a.name,variant:"body2",link:!0})})},t)}),[s,d]),u=(0,o.size)(r),h=26*u,m=window.innerHeight-l.spacingInt(4),g=Math.min(h,m);return(0,p.jsx)(Xr.Z,{style:{zIndex:l.zIndex.modal},open:!!t,anchorEl:t,placement:"right-start",popperOptions:{modifiers:[{name:"preventOverflow",enabled:!0,options:{padding:l.spacingInt(1)}}]},children:(0,p.jsx)(Me.Z,{...n,sx:{border:1,borderColor:"grey.400",borderRadius:"8px",...null===n||void 0===n?void 0:n.sx},children:(0,p.jsx)(i.Z,{width:160,padding:1,children:(0,p.jsx)(Zu.Z,{height:g,renderRow:c,rowCount:u,rowHeight:26})})})})})),xD=(0,a.memo)((e=>{let{alerts:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),[i,o]=(0,a.useState)(null),r=e=>{o(e.currentTarget)},l=()=>{o(null)},s=(0,a.useMemo)((()=>{const e=[];for(const i of t){var n;if("app_expiration_alert"===i.type)e.push(...null!==(n=i.devices)&&void 0!==n?n:[]);else e.push({name:i.deviceName,id:i.deviceId})}return e}),[t]);if(0===s.length)return(0,p.jsx)(v.Z,{variant:"body2",children:"No Devices"});if(1===s.length){const e=s[0];return(0,p.jsx)(Kn.Z,{style:{width:"100%"},component:f.rU,to:n((e=>e.devices.device),{deviceId:e.id}),sx:{color:"primary.main"},children:(0,p.jsx)(Ui.G,{title:e.name,variant:"body2",link:!0})},e.id)}return(0,p.jsxs)(m.Z,{height:1,direction:"row",alignItems:"center",sx:{cursor:"pointer"},onMouseEnter:r,onMouseLeave:l,children:[(0,p.jsxs)(v.Z,{variant:"body2",children:[s.length," Devices"]}),(0,p.jsx)(CD,{devices:s,anchorEl:i})]})}));xD.displayName="DashboardAlertCellDevice";const fD={app_install_error:S.F.Apps,app_expiration_alert:S.F.Apps,file_install_error:S.F.Files,firmware_install_error:S.F.DeviceSystemVersions,video_install_error:S.F.Videos,network_error:S.F.WifiNetworks,wifi_install_error:S.F.WifiNetworks,ssl_certificate_error:S.F.WifiNetworks},bD=(0,a.memo)((e=>{var t;let{alerts:n}=e;const i=n[0],o=null===(t=i.targetRefPath)||void 0===t?void 0:t.split("/")[1],a=fD[i.type],r=(0,xo.ky)(a,o);return(0,p.jsxs)(m.Z,{width:1,children:[(r||a===S.F.WifiNetworks)&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[a===S.F.WifiNetworks&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(go.Z,{style:{width:20,height:20}}),(0,p.jsx)(Ui.G,{title:i.targetName,variant:"body2"})]}
3),a===S.F.Apps&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(re.Z,{variant:"rounded",style:{width:24,height:24},src:r.iconUrl}),(0,p.jsx)(Ui.G,{title:"".concat(r.title," ").concat(r.versionName),variant:"body2"})]}),a===S.F.Files&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(EC,{fileType:r.type}),(0,p.jsx)(Ui.G,{title:r.name,variant:"body2"})]}),a===S.F.DeviceSystemVersions&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(wx.C,{}),(0,p.jsx)(Ui.G,{variant:"body2",title:"".concat(r.model," Firmware ").concat(r.version)})]}),a===S.F.Videos&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(re.Z,{variant:"rounded",style:{width:24,height:24},src:r.iconUrl}),(0,p.jsx)(Ui.G,{title:r.title,variant:"body2"})]})]}),(0,p.jsx)(Ui.G,{variant:"caption",color:"textSecondary",title:cD(i),useTooltip:!0})]})})),yD=e=>{let{title:t,titleContent:n,subtitle:o,path:a,children:r}=e;const l=(0,p.jsxs)(Me.Z,{className:"dashboardTilePaper",sx:{paddingTop:1,paddingBottom:1.5,paddingX:2},children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",justifyContent:"space-between",spacing:1,children:[(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:(0,p.jsx)(v.Z,{variant:"h6",component:"span",children:t})}),n,o&&(0,p.jsx)(v.Z,{variant:"subtitle1",color:"textSecondary",component:"span",children:o})]}),r&&(0,p.jsx)(i.Z,{marginTop:1,children:r})]}),s=(0,Kc.ZP)(f.rU)((e=>{let{theme:t}=e;return{textDecoration:"none","&:hover .dashboardTilePaper":{backgroundColor:t.palette.action.hover}}}));return(0,p.jsx)(i.Z,{padding:.5,children:a?(0,p.jsx)(s,{to:a,children:l}):l})};yD.displayName="DashboardTile";const jD={info:3,warning:2,error:1},ZD=(0,o.invert)(jD),wD=(0,da.Cl)(),ED=()=>{const{deviceAlerts:e=[],organizationAlerts:t=[],alertsLoading:n}=(0,Xn.w)(),i=(0,a.useMemo)((()=>{const n={};(0,o.forEach)(e,(e=>{"network_error"===e.type&&"error"===e.level&&((e,t,n)=>{const i=e[t];if(i){if(i.includes(n))return!1;i.push(n)}else e[t]=[n]})(n,e.targetName,gD(e.message))}));const i=(0,o.chain)(e).map((e=>"network_error"===e.type&&"warning"===e.level&&e.message!==pD?e.targetName:void 0)).compact().uniq().value(),a=(0,o.chain)(e).map((e=>"network_error"===e.type&&"warning"===e.level&&e.message===pD?e.targetName:void 0)).compact().uniq().value(),r=(0,o.intersection)(i,a),l=new Map,s=(0,o.compact)((0,o.map)(e,(e=>{const t=jD[e.level];let i,a=e.message;"ssl_certificate_error"===e.type?(a=cD(e),i="ssl"):"network_error"!==e.type||((0,o.includes)(r,e.targetName)?(a="Unstable network connection. ".concat(e.targetName," involuntarily dropped requests and device connection."),i="inconsistent-and-dropped"):"warning"===e.level&&e.message===pD?(a="Unstable network connection. ".concat(e.targetName," involuntarily dropped device connection."),i="inconsistent"):"warning"===e.level?(a="Unstable network connection. ".concat(e.targetName," involuntarily dropped requests."),i="dropped"):"error"===e.level&&(a="Device(s) cannot communicate properly with ManageXR over ".concat(e.targetName," network due to blocked endpoints: ").concat((0,ul.Yv)(n[e.targetName])),i="error")),i&&(i="".concat(i,":").concat(e.targetName,":").concat(e.deviceId));const s=i?l.get(i):void 0;if(s)return void Object.assign(s,((e,t)=>{var n,i,o;const a=(null!==(n=t.lastError)&&void 0!==n?n:0)>(null!==(i=e.lastError)&&void 0!==i?i:0)?t:e;return{firstSeen:null===(o=(0,M.mT)([e.firstSeen,t.firstSeen]))||void 0===o?void 0:o.oldest,lastError:a.lastError,lastCheckIn:a.lastCheckIn}})(s,e));const d={...e,message:a,variant:"device",severityInteger:t};return i&&l.set(i,d),d}))),d=(0,o.map)(t,(e=>{const t=jD[e.level];return{...e,variant:"organization",severityInteger:t}}));return(0,o.chain)([...s,...d]).groupBy((e=>{var t;return"".concat(e.type,":").concat(null!==(t=e.targetRefPath)&&void 0!==t?t:e.targetName,":").concat(e.message)})).values().value()}),[e,t]),r=(0,a.useMemo)((()=>[wD.accessor((e=>{const t=e[0];let n=t.type;return"network_error"===t.type&&"warning"===t.level&&(n="network_issue"),t.severityInteger+n}),{header:"Type",id:"type",cell:e=>{const t=e.row.original[0],n={error:(0,p.jsx)(Cd.Z,{color:"error",sx:{fontSize:20}}),warning:(0,p.jsx)(me.Z,{color:"warning",sx:{fontSize:20}}),info:(0,p.jsx)(cc.Z,{color:"info",sx:{fontSize:20}})},i="app_expiration_alert"===t.type?(0,p.jsx)(Iu.Z,{color:"warning"===t.level?"secondary":"error",sx:{fontSize:20}}):n[t.level];return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[i,(0,p.jsx)(v.Z,{variant:"body2",children:uD(t)})]})},size:200}
3),wD.display({header:"Info",id:"info",cell:e=>(0,p.jsx)(bD,{alerts:e.row.original}),size:200}),wD.accessor((e=>{var t;return null===(t=(0,M.mT)((0,o.map)(e,(e=>e.lastError))))||void 0===t?void 0:t.newest}),{header:"Last Error",id:"lastError",cell:e=>(0,p.jsx)(mD,{alerts:e.row.original,groupsDevices:!0}),sortingFn:"basic",sortUndefined:-1,size:170}),wD.accessor((e=>e.length),{header:"Device",id:"device",cell:e=>(0,p.jsx)(xD,{alerts:e.row.original}),size:150})]),[]),l=(0,sa.b7)({columns:r,data:i,initialState:{sorting:[{id:"lastError",desc:!0}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),s=60*i.length,d=(0,o.clamp)(s,80,480);return(0,p.jsx)(yD,{title:"Alerts",titleContent:n?(0,p.jsx)(Zi.Z,{size:"1.2em"}):null,children:(0,p.jsx)(dc.A,{table:l,height:d,rowHeight:60,emptyMessage:"No alerts",flexColumnIds:"info"})})};ED.displayName="DashboardTileAlerts";const SD=(0,a.memo)((e=>{let{items:t,label:n,...a}=e;const r=(0,l.k6)(),s=(0,o.size)(t),d=36*s,c=Math.min(360,d);return(0,p.jsx)(yD,{...a,children:!(0,o.isEmpty)(t)&&(0,p.jsx)(Zu.Z,{height:c,renderRow:e=>{let{key:o,index:a,style:l,registerChild:s}=e;const d=t[a];if(!d)return;const c="".concat(d.count," ").concat(n).concat(1===d.count?"":"s"),u=d.countPath;return(0,p.jsxs)(m.Z,{ref:s,direction:"row",alignItems:"center",style:l,paddingX:2,paddingY:.5,component:d.path?f.rU:"div",to:d.path,sx:e=>d.path?{...e.mixins.linkStyleReset,"&:hover":{backgroundColor:e.palette.action.hover}}:{},children:[(0,p.jsx)(As.Z,{sx:{color:d.secondary?"textSecondary":"textPrimary"},children:"string"===typeof d.icon?(0,p.jsx)(re.Z,{variant:"rounded",style:{width:24,height:24},src:d.icon}):(0,p.jsx)(d.icon,{})}),(0,p.jsx)(v.Z,{variant:"body2",color:d.path?"primary":d.secondary?"textSecondary":"textPrimary",noWrap:!0,flexGrow:1,paddingRight:1,children:d.title}),(0,p.jsx)(i.Z,{flexShrink:0,children:u?(0,p.jsx)(v.Z,{variant:"body2",component:"span",role:"link",tabIndex:0,noWrap:!0,onClick:e=>{e.preventDefault(),e.stopPropagation(),r.push(u)},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),r.push(u))},sx:{color:"primary.main",cursor:"pointer"},children:c}):(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:c})})]},o)},rowCount:s,rowHeight:36})})})),DD=(0,a.memo)((()=>{const{buildOrganizationPath:e}=(0,w.P)(),{appCollections:t}=(0,Xn.w)(),{managedApps:n,externalApps:i,sharedApps:r,instantApps:l,metaHorizonStoreManagedApps:s,releaseChannelCloneApps:d}=t,c=Yc(),{documents:u}=(0,E.D)(S.F.Configurations),h=(0,a.useCallback)((e=>{const t=new Set((0,o.map)(e,"id")),n=new Set((0,o.compact)((0,o.map)(e,(e=>{var t;return null===(t=e.instantAppRef)||void 0===t?void 0:t.id})))),i=(0,o.filter)(u,(e=>{let{approvedApps:i,approvedInstantApps:a}=e;const r=(0,o.some)(i,(e=>t.has(e.id))),l=(0,o.some)(a,(e=>n.has(e.id)));return r||l})),a=(0,o.map)(i,(e=>e.id)),r=(0,o.sumBy)(i,(e=>{var t;return null!==(t=e.deviceCount)&&void 0!==t?t:0}));return{title:e[0].title,icon:e[0].iconUrl,count:r,countPath:r>0?c({query:{configurationIds:a}}):void 0}}),[c,u]),m=(0,a.useMemo)((()=>(0,o.mergeWith)({},n,d,((e,t)=>e?e.concat(t):t))),[n,d]),g=(0,a.useMemo)((()=>[...(0,o.map)(m,((t,n)=>({path:e((e=>e.vrContent.edit.app.managed),{packageName:n}),...h(t)}))),...(0,o.map)(i,((t,n)=>({path:e((e=>e.vrContent.edit.app.external),{appId:n}),...h(t)}))),...(0,o.map)(r,((t,n)=>({path:e((e=>e.vrContent.edit.app.shared),{packageName:n}),...h(t)}))),...(0,o.map)(l,((t,n)=>({path:e((e=>e.vrContent.edit.app.instant),{instantAppId:n}),...h(t)}))),...(0,o.map)(s,(t=>({path:e((e=>e.vrContent.edit.app.metaHorizonStoreManaged),{appId:t[0].id}),...h(t)})))].sort((0,ze.Hc)(((e,t)=>(0,ze.gA)(e,t)),((e,t)=>(0,ze.fM)(e.count,t.count))))),[m,i,r,l,s,e,h]),v=(0,o.size)(n)+(0,o.size)(i)+(0,o.size)(r)+(0,o.size)(l)+(0,o.size)(s);return(0,p.jsx)(SD,{title:"".concat(v," App").concat(1===v?"":"s"),items:g,label:"device"})})),MD=e=>{var t,n,i,a,r;let{app:l,releaseChannel:s,organizationId:d}=e;const c="".concat(l.title),u=null===(t=s.sharedOrganizationExpirationSettings)||void 0===t?void 0:t[d],h=(0,Vs.Wk)(u),g=(0,Vs.IR)(u),C=null!==u&&void 0!==u&&u.expirationTimestamp?"on "+(0,M.ax)(null===u||void 0===u?void 0:u.expirationTimestamp):"-",x=null===(n=s.sharedOrganizationDeviceLimitSettings)||void 0===n||null===(i=n[d])||void 0===i?void 0:i.deviceLimit,b=null!==(a=null===(r=s.sharedOrganizationDeployments)||void 0===r?void 0:r[d])&&void 0!==a?a:0,j=(0,o.isNumber)(x)&&b>x,{buildOrganizationPath:Z}=(0,w.P)();return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[h&&(0,p.jsx)(ee.Z,{title:"Ap
3p expiring soon",placement:"top",children:(0,p.jsx)(ke.Z,{color:"secondary",size:"small",sx:{height:"unset"},label:(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,height:"18px",color:y.DG.white,children:(0,p.jsx)(Iu.Z,{sx:{fontSize:"14px",color:"inherit"}})})})}),g&&(0,p.jsx)(ee.Z,{title:"App expired ".concat(C),placement:"top",children:(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,height:"18px",children:(0,p.jsx)(v.Z,{noWrap:!0,variant:"overline",paddingTop:.25,color:y.DG.grey[600],children:"Expired"})})}),j&&(0,p.jsx)(ee.Z,{title:"Device limit exceeded",placement:"top",children:(0,p.jsx)(ke.Z,{color:"error",size:"small",sx:{height:"unset"},label:(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,height:"18px",color:y.DG.white,children:(0,p.jsx)(Fl.u,{sx:{fontSize:"14px",color:"inherit"}})})})}),(0,p.jsx)(Ui.G,{title:"".concat(c," (").concat(s.name,")"),variant:"body2",width:250,useTooltip:!0,TooltipProps:{title:"".concat(c," (").concat(s.name,")"),enterDelay:800,enterNextDelay:1e3},children:(0,p.jsx)(Kn.Z,{component:f.rU,to:Z((e=>e.vrContent.edit.app.managed),{packageName:l.packageName}),variant:"body2",sx:{color:"primary.main"},children:c})})]})},kD=()=>{const{documents:e}=(0,E.D)(S.F.ReleaseChannels,{filter:(0,a.useCallback)((e=>!(0,o.isEmpty)(e.sharedOrganizations)),[])}),t=(0,u.v9)((e=>e.firestore.data.apps.data)),n=(0,a.useMemo)((()=>(0,o.chain)(e).map((e=>{const n=(0,o.keys)(e.sharedOrganizations),i=t[e.targetRef.id];if(i)return(0,o.map)(n,(t=>({app:i,releaseChannel:e,organizationId:t})))})).compact().flatten().value()),[t,e]),r=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.accessor((e=>{var t,n,i;return null!==(t=null===(n=e.releaseChannel.sharedOrganizations)||void 0===n||null===(i=n[e.organizationId])||void 0===i?void 0:i.name)&&void 0!==t?t:""}),{id:"organization",header:"Organization",size:285,sortingFn:ze.WP,cell:e=>{let{getValue:t}=e;const n=t();return(0,p.jsx)(Ui.G,{title:n,variant:"body2",useTooltip:!0,TooltipProps:{title:n,enterDelay:600,enterNextDelay:800}})}}),e.accessor((e=>"".concat(e.app.title," - ").concat(e.releaseChannel.name)),{id:"appReleaseChannel",header:"Shared App",sortingFn:ze.WP,size:200,cell:e=>{let{row:t}=e;return(0,p.jsx)(MD,{...t.original})}}),e.accessor((e=>{var t,n;return null!==(t=null===(n=e.releaseChannel.sharedOrganizationDeployments)||void 0===n?void 0:n[e.organizationId])&&void 0!==t?t:0}),{id:"deployments",header:"Deployments",size:125,cell:e=>{let{getValue:t}=e;const n=(0,ul.sr)(t(),"device");return(0,p.jsx)(v.Z,{noWrap:!0,title:n,variant:"body2",color:t()?"textPrimary":"textSecondary",children:n})}})]}),[]),l=(0,sa.b7)({columns:r,data:n,initialState:{sorting:[{id:"organization",desc:!1}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()});if(0===n.length)return null;const s=30*n.length,d=s>440,c="appReleaseChannel";return(0,p.jsx)(yD,{title:"App Sharing",children:(0,p.jsxs)(i.Z,{sx:{"& .MuiTableBody-root .MuiTableCell-root":{border:"none"}},children:[(0,p.jsx)(i.Z,{paddingRight:d?"var(--scrollbarWidth)":void 0,children:(0,p.jsx)(eh.K,{table:l,flexColumnIds:c})}),(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:Math.min(440,s),table:l,rowHeight:30,flexColumnIds:c})]})})},ID={user:[Vu.USER_EVENT],device:[Vu.DEVICE_EVENT],both:[Vu.DEVICE_EVENT,Vu.USER_EVENT]},AD={user:"Filter by user email or API key ID",device:"Filter by device name or serial",both:"Filter by user email, API key ID, device name or serial"},RD=(0,a.memo)((()=>{const e=(0,De.Z)(),[t,n]=(0,a.useState)("both"),[i,o]=(0,a.useState)(""),[r,l]=(0,a.useState)((0,M.us)().toISOString()),s=(0,a.useMemo)((()=>{if(i)return{deviceSerial:(0,ul.kp)(i),deviceName:(0,ul.kp)(i)}}),[i]),d=(0,a.useMemo)((()=>{if(i)return{userEmail:(0,ul.kp)(i),userId:(0,ul.kp)(i)}}),[i]),c=dh({auditLogTypes:ID[t],endTime:r,deviceEventsParams:s,userEventsParams:d});return(0,p.jsx)(yD,{title:"Activity Log for",titleContent:(0,p.jsxs)(m.Z,{direction:"row",flexGrow:1,justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(Qi,{variant:"standard",InputProps:{sx:{...e.typography.h6,color:"primary.main","& .MuiTypography-root":{fontWeight:"medium"}},disableUnderline:!0},SelectProps:{IconComponent:e=>(0,p.jsx)(fi.Z,{...e})},value:t,options:[{value:"both",label:"Users & Devices"},{value:"user",label:"Users only"},{value:"device",label:"Devices only"}],onChange:n,disabled:c.fetchingEvents}),(0,p.jsx)(Un.U,{variant:"contained",size:"small",onClick:c.refreshEvents,icon:(0,p.jsx)(ks.Z,{}),submitting:c.fetchingEvents,children:"Refresh"})]}),children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(rh,{filter:i,onFilterChange:o,filterPlaceholder:AD[t],endTime:r,onEndTimeChange:l,fetchingEvents:c.fetchingEvents}),(0,p.jsx)(oh,{...c,height:700})]})})})),TD=(0,ze.Hc)(ze.gt,((e,t)=>
3{var n,i;return(0,ze.fM)(null!==(n=null===e||void 0===e?void 0:e.deviceCount)&&void 0!==n?n:0,null!==(i=null===t||void 0===t?void 0:t.deviceCount)&&void 0!==i?i:0)})),PD=(0,a.memo)((()=>{const{buildOrganizationPath:e}=(0,w.P)(),{documents:t}=(0,E.D)(S.F.Configurations,{sort:TD}),n=Yc(),i=(0,a.useMemo)((()=>(0,o.map)(t,(t=>{var i;const o=null!==(i=t.deviceCount)&&void 0!==i?i:0;return{title:t.name,path:e((e=>e.configurations.configuration),{configurationId:t.id}),count:o,icon:Wl.Z,countPath:o>0?n({query:{configurationIds:[t.id]}}):void 0}}))),[n,e,t]);return(0,p.jsx)(SD,{title:"".concat((0,o.size)(t)," Configuration").concat(1===(0,o.size)(t)?"":"s"),items:i,label:"device"})})),LD=(0,a.memo)((e=>{let{dashboardStats:{numDevices:t,deviceModelCounts:n}}=e;const i=Yc(),r=(0,a.useMemo)((()=>(0,o.chain)(n).toPairs().map((e=>{let[t,n]=e;return{title:(0,Vr.ao)(t),count:n,model:t,icon:(0,Vr.Xj)(t)}})).groupBy("title").map(((e,t)=>({icon:e[0].icon,count:(0,o.sumBy)(e,"count"),title:t,countPath:i({query:{models:(0,o.map)(e,"model")}})}))).sort(((e,t)=>"Unknown"===e.title?1:e.title.localeCompare(t.title))).value()),[i,n]);return(0,p.jsx)(yD,{title:"".concat(t," Device").concat(1===t?"":"s"),subtitle:"".concat((0,o.size)(n)," Model").concat(1===(0,o.size)(n)?"":"s"),children:!(0,o.isEmpty)(r)&&(0,p.jsx)(ii.Z,{dense:!0,sx:r.length>10?{height:360,overflow:"auto"}:{},disablePadding:!0,children:(0,o.map)(r,((e,t)=>(0,p.jsxs)(fl.ZP,{component:f.rU,button:!0,to:e.countPath,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(e.icon,{})}),(0,p.jsx)(Rs.Z,{primary:e.title}),(0,p.jsx)(Xx.Z,{children:(0,p.jsx)(v.Z,{color:"primary",style:{fontWeight:600},children:e.count})})]},t)))})})})),ND=(0,a.memo)((e=>{let{items:t}=e;const n=(0,De.Z)(),i=(0,o.filter)(t,(e=>e.count>0));return(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{style:{height:n.spacing(3),display:"flex"},children:(0,o.map)(i,((e,t)=>{const o={backgroundColor:e.color,flexShrink:0,flexGrow:e.count,flexBasis:0,borderTopLeftRadius:0===t?n.shape.borderRadius:0,borderBottomLeftRadius:0===t?n.shape.borderRadius:0,borderTopRightRadius:t===i.length-1?n.shape.borderRadius:0,borderBottomRightRadius:t===i.length-1?n.shape.borderRadius:0};return(0,p.jsx)(ee.Z,{title:"".concat(e.title,": ").concat(e.count),placement:"top",arrow:!0,children:e.path?(0,p.jsx)(f.rU,{style:o,to:e.path}):(0,p.jsx)("div",{style:o})},t)}))}),(0,p.jsx)(ii.Z,{sx:{marginTop:1},dense:!0,disablePadding:!0,children:(0,o.map)(t,((e,t)=>(0,p.jsxs)(fl.ZP,{component:e.path?f.rU:"div",to:e.path,button:!!e.path,children:[(0,p.jsx)(As.Z,{style:{color:e.color},children:(0,p.jsx)(e.icon,{color:"inherit"})}),(0,p.jsx)(Rs.Z,{primary:e.title}),(0,p.jsx)(Xx.Z,{children:(0,p.jsx)(v.Z,{color:"primary.main",fontWeight:"medium",children:e.count})})]},t)))})]})})),UD=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 24 24",children:(0,p.jsx)("circle",{fill:"currentColor",cx:"12",cy:"12",r:"10"})}),FD=(0,a.memo)((e=>{let{dashboardStats:{deviceLastActiveCounts:t,numDevices:n}}=e;const i=Yc(),o=(0,a.useMemo)((()=>[{title:"< 1 Day Ago",count:t.today,color:y.DG.purple[700],icon:UD,path:i({query:{filterIds:["activeToday"]}})},{title:"1-7 Days Ago",count:t.week,color:y.DG.purple[500],icon:UD,path:i({query:{filterIds:["activeWeek"]}})},{title:"8-30 Days Ago",count:t.month,color:y.DG.purple[300],icon:UD,path:i({query:{filterIds:["activeMonth"]}})},{title:"> 30 Days Ago",count:t.other,color:y.DG.purple[200],icon:UD,path:i({query:{filterIds:["activeOther"]}})}]),[i,t]);return(0,p.jsx)(yD,{title:"Last Active",subtitle:0===n?"No Devices":"",children:n>0&&(0,p.jsx)(ND,{items:o})})}));var OD=n(77683),_D=n(78559),zD=n.n(_D),BD=n(96190);const WD={zoomControl:!1,closePopupOnClick:!1,maxBounds:zD().latLngBounds(zD().latLng(-85,-180),zD().latLng(85,180))},VD=e=>{zD().maplibreGL({style:"https://tiles.openfreemap.org/styles/bright"}).addTo(e)},GD=(0,Kc.ZP)("div")((e=>{let{theme:t}=e;return{height:400,width:"100%",borderRadius:t.shape.borderRadius,"& .mapCountIcon":{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",...t.typography.subtitle2,color:t.palette.primary.contrastText,borderRadius:t.shape.borderRadius,padding:t.spacing(0,.5),minWidth:t.spacing(2.5),textAlign:"center","&.mapCountIconHighAccuracy":{background:KD(t,{highAccuracy:!0}),"&.mapCountIconActive":{background:KD(t,{highAccuracy:!0,hover:!0})}},"&.mapCountIconLowAccuracy":{background:KD(t,{highAccuracy:!1}),"&.mapCountIconActive":{background:KD(t,{highAccuracy:!1,hover:!0})}}}}})),HD=(0,Kc.ZP)(Me.Z)((e=>{let{theme:t}=e;return{height:400,width:"100%",borderRadius:t.shape.borderRadius,backgroundColor:t.palette.grey[100],display:"flex",alignItems:"center",justifyContent:"center"}})),qD=(0,a.memo)((e=>{let{dashboardStats:{deviceLocations:t}}=e;const n=(0,a.useRef)(),[r,{width:l}]=Wm()(),[s,d]=(0,a.useState)(void 0),[c,u]=(0,a.useState)(!1),h=(0,a.useMemo)((()=>(0,o.pickBy)(t,(e=>{let{latitude:t,longitude:n}=e;return(0,o.isNumber)(t)&&(0,o.isNumber)(n)}))),[t]),g=(0,a.useMemo)((()=>(0,o.isUndefined)(s)?h:"highAccuracy"===s?(0,o.pickBy)(h,"highAccuracy"):(0,o.pickBy)(h,(e=>!e.highAccuracy))),[h,s]),C=(0,a.useMemo)((()=>
3!(0,o.isEmpty)(h)&&(0,o.some)(h,"highAccuracy")),[h]),x=(0,a.useMemo)((()=>!(0,o.isEmpty)(h)&&(0,o.some)(h,(e=>!e.highAccuracy))),[h]),f=C&&x;(0,a.useEffect)((()=>{f&&d(void 0)}),[f]);const b=(0,a.useMemo)((()=>(0,o.pickBy)(t,(e=>{let{latitude:t,longitude:n}=e;return!(0,o.isNumber)(t)||!(0,o.isNumber)(n)}))),[t]),y=(0,a.useMemo)((()=>{const e=(0,o.map)(g,(e=>{let{latitude:t,longitude:n}=e;return zD().latLng(t,n)}));if((0,o.isEmpty)(e))return;const t=zD().latLngBounds(e[0],e[0]);for(let n=1;n<e.length;n++)t.extend(e[n]);return t}),[g]),[j,Z]=(0,a.useState)(),[w,E]=(0,a.useState)();(0,a.useLayoutEffect)((()=>{if(y&&!c){if(!n.current){if(!(()=>{try{var e;const t=document.createElement("canvas"),n=null!==(e=t.getContext("webgl2"))&&void 0!==e?e:t.getContext("webgl");if(null===n)return!1;const i=n.getExtension("WEBGL_lose_context");return null===i||void 0===i||i.loseContext(),!0}catch{return!1}})())return void u(!0);let i;try{const e=zD().map("map",WD);i=e,VD(e),e.on("moveend",(()=>{const t=e.getBounds();Z([t.getWest(),t.getSouth(),t.getEast(),t.getNorth()]),E(e.getZoom())})),n.current=e}catch(t){var e;return null===(e=i)||void 0===e||e.remove(),u(!0),void(0,OD.Tb)(t,{tags:{component:"DashboardTileLocations"}})}}n.current.fitBounds(y,{maxZoom:11,padding:new(zD().Point)(20,20)})}}),[y,l,c]),(0,a.useEffect)((()=>()=>{var e;null===(e=n.current)||void 0===e||e.remove(),n.current=void 0}),[]);const[S,D]=(0,a.useState)();(0,a.useEffect)((()=>{if(null!==S&&void 0!==S&&S.anchorEl)return S.anchorEl.classList.add("mapCountIconActive"),()=>{S.anchorEl.classList.remove("mapCountIconActive")}}),[null===S||void 0===S?void 0:S.anchorEl,null===S||void 0===S?void 0:S.devices]);const M=(0,a.useRef)(null),k=(0,a.useCallback)((e=>{var t;(null===(t=M.current)||void 0===t?void 0:t.contains(e.relatedTarget))||D(void 0)}),[]);(0,a.useLayoutEffect)((()=>{if(!j||!(0,o.isNumber)(w))return;const e=(0,o.map)(g,((e,t)=>({type:"Feature",geometry:{type:"Point",coordinates:[e.longitude,e.latitude]},id:t,properties:{id:t,name:e.name,highAccuracy:e.highAccuracy}}))),t=new BD.Z({radius:60,maxZoom:20,map:e=>({devices:[e]}),reduce:(e,t)=>{e.devices=[...e.devices,...t.devices]}});t.load(e);const i=t.getClusters(j,w),a=[],r=(0,o.map)(i,(e=>{var t;let n=e.properties.devices;n||(n=[e.properties]);const i=(0,o.some)(n,"highAccuracy"),r=document.createElement("div");r.classList.add("mapCountIcon"),i?r.classList.add("mapCountIconHighAccuracy"):r.classList.add("mapCountIconLowAccuracy"),r.innerText="".concat(null!==(t=e.properties.point_count)&&void 0!==t?t:1);const l=()=>{const t=e.properties.cluster?e.properties.devices:[e.properties];D({anchorEl:r,devices:t})};r.addEventListener("mouseenter",l),r.addEventListener("mouseleave",k),a.push((()=>{r.removeEventListener("mouseenter",l),r.removeEventListener("mouseleave",k)}));const s=zD().divIcon({className:"",html:r,iconSize:new(zD().Point)(20,20)});return zD().marker([e.geometry.coordinates[1],e.geometry.coordinates[0]],{icon:s})}));return(0,o.forEach)(r,(e=>{n.current&&e.addTo(n.current)})),()=>{(0,o.forEach)(r,(e=>e.remove())),(0,o.forEach)(a,(e=>e()))}}),[j,w,g,k]);const I=(0,a.useMemo)((()=>({ref:M,onMouseLeave:e=>k(e.nativeEvent)})),[M,k]),A=(0,a.useRef)(null);return(0,p.jsxs)(yD,{title:"Location",children:[(0,p.jsx)(GD,{id:"map",sx:{display:y&&!c?"auto":"none"}}),(0,o.isEmpty)(h)&&(0,p.jsx)(HD,{children:(0,p.jsx)(v.Z,{color:"textSecondary",children:"No Known Locations"})}),!(0,o.isEmpty)(h)&&c&&(0,p.jsx)(HD,{children:(0,p.jsx)(v.Z,{color:"textSecondary",children:"Map unavailable in this browser"})}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",marginTop:1,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[C&&(0,p.jsx)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:(0,p.jsx)(YD,{highAccuracy:!0,disabled:!f,onClick:()=>{d("highAccuracy"===s?void 0:"highAccuracy")}})}),x&&(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(YD,{highAccuracy:!1,disabled:!f,onClick:()=>{d("lowAccuracy"===s?void 0:"lowAccuracy")}}),(0,p.jsx)(i.Z,{sx:{transform:"translateY(1px)"},children:(0,p.jsx)(ci,{helpText:"Device tracking is based on IP geolocation. VPNs and proxy servers may interfere with reporting accuracy.",url:"https://help.managexr.com/en/articles/6848864-troubleshooting-my-device-is-reporting-its-location-incorrectly-in-managexr"})})]})]}),!(0,o.isEmpty)(b)&&(0,p.jsxs)(mf.h,{whiteSpace:"nowrap",variant:"caption",children:["Unknown Location:"," ",(0,p.jsxs)("em",{ref:A,style:{cursor:"pointer"},onMouseEnter:()=>{A.current&&D({anchorEl:A.current,devices:(0,o.map)(b,((e,t)=>
3({id:t,name:e.name,highAccuracy:e.highAccuracy})))})},onMouseLeave:e=>k(e.nativeEvent),children:[(0,o.size)(b)," device",(0,o.size)(b)>1?"s":""]})]})]}),(0,p.jsx)("div",{children:r}),(0,p.jsx)(CD,{...S,PaperProps:I})]})}));function YD(e){let{highAccuracy:t,onClick:n,disabled:o}=e;return(0,p.jsxs)(C.Z,{onClick:n,disabled:o,variant:"text",sx:{color:"text.secondary",textTransform:"none"},children:[(0,p.jsx)(i.Z,{sx:e=>({width:e.spacing(2.5),height:e.spacing(2.5),borderRadius:"4px",background:KD(e,{highAccuracy:t}),marginRight:1})}),t?"High":"Low"," Accuracy"]})}function KD(e,t){return t.hover?t.highAccuracy?e.palette.primary.light:e.palette.grey[700]:t.highAccuracy?e.palette.primary.main:e.palette.grey[800]}const XD=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 24 24",children:(0,p.jsx)("circle",{stroke:"currentColor",strokeWidth:"4",fill:"none",cx:"12",cy:"12",r:"8"})}),QD=(0,a.memo)((e=>{let{dashboardStats:{deviceOnlineCounts:t,numDevices:n}}=e;const i=(0,De.Z)(),o=Yc(),r=(0,a.useMemo)((()=>[{title:"Online",count:t.online,color:y.DG.success[200],icon:UD,path:o({query:{filterIds:["online"]}})},{title:"Offline",count:t.offline,color:i.palette.grey[200],icon:XD,iconColor:i.palette.grey[500],path:o({query:{filterIds:["offline"]}})}]),[t,i,o]);return(0,p.jsx)(yD,{title:"Online",subtitle:0===n?"No Devices":"",children:n>0&&(0,p.jsx)(ND,{items:r})})})),JD=(0,a.memo)((e=>{let{dashboardStats:{deviceUpToDateCounts:t,numDevices:n}}=e;const i=Yc(),o=(0,a.useMemo)((()=>[{title:"Up to Date",count:t.upToDate,color:y.DG.success[200],icon:ng.Z,path:i({query:{filterIds:["upToDate"]}})},{title:"Out of Date",count:t.outOfDate,color:y.DG.warning[200],icon:Gf.Z,path:i({query:{filterIds:["outOfDate"]}})},{title:"Update Error",count:t.outOfDateWithError,color:y.DG.error[200],icon:Cd.Z,path:i({query:{filterIds:["updateError"]}})}]),[t,i]);return(0,p.jsx)(yD,{title:"Up to Date",subtitle:0===n?"No Devices":"",children:n>0&&(0,p.jsx)(ND,{items:o})})})),$D=(0,a.memo)((e=>{let{dashboardStats:{deviceTagCounts:t}}=e;const{documents:n}=(0,E.D)(S.F.Tags),i=Yc(),r=(0,a.useMemo)((()=>{var e;return[...(0,o.map)(n,(e=>{var n;const o=null!==(n=t[e.id])&&void 0!==n?n:0;return{title:e.name,count:o,icon:Vl.Z,countPath:o>0?i({query:{tagIds:[e.id]}}):void 0}})),...t.null?[{title:"No Tags",count:null!==(e=t.null)&&void 0!==e?e:0,icon:Vl.Z,secondary:!0,countPath:i({query:{tagIds:[qi.ki.None]}})}]:[]].sort((0,ze.Hc)(((e,t)=>(0,ze.gA)(e,t)),((e,t)=>(0,ze.fM)(e.count,t.count))))}),[i,t,n]);return(0,p.jsx)(SD,{title:"".concat((0,o.size)(n)," Device Tag").concat(1===(0,o.size)(n)?"":"s"),items:r,label:"device"})})),eM=(0,a.memo)((e=>{let{dashboardStats:{userRoleCounts:t}}=e;const{buildOrganizationPath:n,privileges:i,userRoleId:r}=(0,w.P)(),l=(0,a.useMemo)((()=>(0,o.map)((0,o.filter)(pe.Z,(e=>!!t[e])),(e=>{var n;return{title:(0,o.capitalize)(e),count:null!==(n=t[e])&&void 0!==n?n:0,icon:tp.Z}}))),[t]),s=(0,o.sum)((0,o.values)(t));return r&&!i.organization?null:(0,p.jsx)(SD,{title:"".concat(s," User").concat(1===s?"":"s"),items:l,label:"user",path:n((e=>e.settings.users))})})),tM={color:y.DG.white},nM=()=>{const{privileges:e,buildOrganizationPath:t,organizationId:n}=(0,w.P)(),{dashboardStats:i}=(0,Xn.w)(),{devicesRequireMxrRepairCount:o=0}=(0,d.kV)(),r=(0,d.EM)(),s=gS(),c=(0,X.bo)()||e.content,h=yS(),g=(0,u.I0)(),v=(0,u.v9)((e=>e.ui.app.onboardingOverlay));(0,a.useEffect)((()=>{"fullscreen"===h&&"closed"===v&&g(Te.dV.actions.onboardingOverlaySet("open"))}),[h,v,g]);const[C,x]=(0,a.useState)((()=>(0,ES.T)())),f=(0,a.useRef)(n),b=hS(),j="test"===s&&b.showOnboarding,Z=b.showOnboarding&&!j;return"pending"===h?(0,p.jsx)(cS,{}):(f.current!==n&&(f.current=n,C&&x(!1)),"quickstart"!==h||C?"fullscreen"===h&&"dismissed"!==v?(0,p.jsx)(cS,{}):(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Monitor",navCategory:!0},{title:"Dashboard"}],toolbarShowProgress:!i,children:(0,p.jsx)(Zf.Z,{disableGutters:!0,children:i&&(0,p.jsxs)(m.Z,{paddingX:j?3.5:7,paddingY:j?1:2.5,spacing:j?2.5:2,overflow:"hidden",children:[o>0&&(0,p.jsx)(ZS,{deviceCount:o,showCountAndLink:!0}),Z&&(0,p.jsx)(On.e,{title:"Welcome to your dashboard!",subtitle:"Keep your devices up to date, track activity, and investigate alerts from your dashboard. To start using the dashboard, enroll your first device",backgroundSx:{borderRadius:2,background:"url(".concat(wS,")"),backgroundSize:"auto 326px",backgroundPosition:"bottom right",backgroundColor:y.DG.purple[800],backgroundRepeat:"no-repeat",minWidth:900},titleSx:tM,subtitleSx:tM,ctaMessage:"Add Device",dialog:(0,p.jsx)(qo,{analyticsLocation:"Onboarding - Dashboard",open:!1,onClose:()=>{}})}),(0,p.jsx)(sD,{}),j&&(0,p.jsx)(aD,{}),(0,p.jsxs)(uS.ZP,{container:!0,flexWrap:"wrap-reverse",overflow:"hidden",paddingX:j?3:0,paddingTop:j?1:0,children:[(0,p.jsxs)(uS.ZP,{item:!0,xs:12,_1300:4,children:[(0,p.jsx)(PD,{}),(0,p.jsx)($D,{dashboardStats:i}),(0,p.jsx)(DD,{}),(0,p.jsx)(eM,{dashboardStats:i})]}),(0,p.jsxs)(uS.ZP,{item:!0,xs:12,_1300:8,children:[(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsxs)(m.Z,{flexGrow:1,children:[(0,p.jsx)(JD,{dashboardStats:i}),(0,p.jsx)(LD,{dashboardStats:i})]}),(0,p.jsxs)(m.Z,{flexGrow:1,children:[(0,p.jsx)(QD,{dashboardStats:i}),(0,p.jsx)(FD,{dashboardStats:i})]})]}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(kD,{}),(0,p.jsx)(ED,{}),!r&&(0,p.jsx)(qD,{dashboardStats:i}),c&&(0,p.jsx)(RD,{})]})]})]})]})})}):((0,Ne.y)("redirect"),(0,p.jsx)(l.l_,{to:t((e=>e.quickstart))})))};nM.displayName="DashboardPage";const iM="resetOnboarding",oM=()=>{const e=(0,a.useRef)(!1);if(e.current)return;e.current=!0;const t=new URLSearchParams(window.location.search);if(!t.has(iM))return;(()=>{try{const e=[];for(let t=0;t<window.localStorage.length;t+=1){const n=window.localStorage.key(t);n&&n.startsWith(NZ)&&e.push(n)}(0,o.forEach)(e,(e=>window.localStorage.removeItem(e)))}catch(e){}})(),(()=>{try{const e=[];for(let t=0;t<window.localStorage.length;t+=1){const n=window.localStorage.key(t);n&&n.startsWith(zZ)&&e.push(n)}(0,o.forEach)(e,(e=>window.localStorage.removeItem(e)))}catch(e){}})(),t.delete(iM);const n=t.toString(),i="".concat(window.location.pathname).concat(n?"?".concat(n):"").concat(window.location.hash);window.history.replaceState(window.history.state,"",i)},aM=()=>{oM();const e=!!(0,z.T)("featureFlags"),t=bS(),{buildOrganizationPath:n,organizationId:i}=(0,w.P)(),o=pS(),r=hS(),s=(0,l.k6)(),d=n((e=>e.dashboard)),c=(0,a.useCallback)((()=>{FZ(i),s.push(d)}),[s,d,i]),u=(0,a.useRef)(null),h=(0,a.useRef)(i);h.current!==i&&(h.current=i,u.current=null),null===u.current&&e&&!r.pending&&(u.current="quickstart"===t&&r.showOnboarding&&o);const m=mS(null===u.current),g=!0===u.current;return(0,a.useEffect)((()=>{g&&(0,b.u0)({surface:"quickstart",control:"page",action:"viewed",value:(0,Ne.p)()})}),[g]),null===u.current?m?(0,p.jsx)(l.l_,{to:d}):null:u.current?(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Get started",navCategory:!0},{title:"Quickstart"}],noBottomPadding:!0,children:(0,p.jsx)(dS,{onClose:c},i)}):(0,p.jsx)(l.l_,{to:d})};var rM=n(87200),lM=n(72390),sM=n(5300),dM=n(11015),cM=n(93164),uM=n(61983),pM=n(56089),hM=n(15773),mM=n(45520),gM=n(62746),vM=n(22722);const CM=e=>{if(!e)return!1;return[Be.vc.configuration.metaKioskAppPackageName,"com.oculus.vrshell"].includes(e)},xM=e=>{var t,n,i;const{lastUpdated:o,currentForegroundApp:a}=e;return a&&(null!==(t=null===(n=a.lastUpdated)||void 0===n?void 0:n.seconds)&&void 0!==t?t:0)>=(null!==(i=null===o||void 0===o?void 0:o.seconds)&&void 0!==i?i:0)?a.lastUpdated:o},fM=function(){var e,t;let{online:n,currentForegroundApp:i,lastUpdated:r,homeScreenState:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=!n,d=n&&!1===(null===i||void 0===i?void 0:i.hmdOnUser),c=(0,a.useMemo)((()=>CM(null===i||void 0===i?void 0:i.packageName)),[null===i||void 0===i?void 0:i.packageName]),p=null===l||void 0===l?void 0:l.viewDetails.videoState,h=null===l||void 0===l?void 0:l.viewDetails.videoTitle,m=null===(e=(0,u.v9)((e=>null!==i&&void 0!==i&&i.packageName?(0,o.find)(e.firestore.data.apps.data,{packageName:null===i||void 0===i?void 0:i.packageName}):void 0)))||void 0===e?void 0:e.iconUrl,g=null===(t=(0,z.l)(S.F.Videos,null===l||void 0===l?void 0:l.viewDetails.videoId))||void 0===t?void 0:t.iconUrl,v=(0,a.useMemo)((()=>xM({lastUpdated:r,currentForegroundApp:i})),[i,r]),C=lD(v);return(0,a.useMemo)((()=>{var e,t;if(s)return{title:"Offline",description:"Last seen ".concat(null!==C&&void 0!==C?C:"never")};if(d)return{title:"Idle",description:"Standby Mode"};let n,o,a="Online";return p?(a+=" - Current video:",n=g,o=h):c?(a+=" - Current app:",o="Oculus System"):null!==i&&void 0!==i&&i.title&&(a+=" - Current app:",n=m,o=i.title),{title:a,iconUrl:null!==(e=n)&&void 0!==e?e:Be.vc.vrContent.defaultIconUrl,description:null!==(t=o)&&void 0!==t?t:"--"}}),[s,d,c,null===i||void 0===i?void 0:i.title,p,C,g,h,m])};
3var bM=n(54982),yM=n(40827),jM=n(38654),ZM=n(80324),wM=n(42403),EM=n(1537),SM=n(65371),DM=n(35358),MM=n(45930),kM=n(47419),IM=n(7419),AM=n(83253),RM=n(72093),TM=n(5990),PM=n(29613),LM=n(23003);const NM=(0,a.memo)((e=>{let{batteryPercent:t,noTooltip:n,showCharging:i,orientation:a="horizontal"}=e;const r=[{level:20,color:"error",Icon:i?ZM.Z:wM.Z},{level:30,color:"warning",Icon:i?EM.Z:SM.Z},{level:50,color:"success",Icon:i?DM.Z:MM.Z},{level:60,color:"success",Icon:i?kM.Z:IM.Z},{level:80,color:"success",Icon:i?AM.Z:RM.Z},{level:90,color:"success",Icon:i?TM.Z:PM.Z},{level:100,color:"success",Icon:i?hh.Z:LM.Z}],l=t&&r.find((e=>e.level>=t))||{level:NaN,color:"disabled",Icon:LM.Z},s=i?" (charging)":"",d=(0,o.isNumber)(t)?"".concat(t,"%").concat(s):"Unknown",c=(0,p.jsx)(l.Icon,{color:l.color,sx:{transform:"horizontal"===a?"rotate(90deg)":void 0}});return n?c:(0,p.jsx)(ee.Z,{title:d,placement:"top",enterDelay:0,children:c})})),UM=e=>{let{label:t,onClick:n,startIcon:i,atBottom:o,sx:r}=e;const[l,s]=(0,a.useState)(!1);return(0,p.jsx)(m.Z,{color:"grey.300",sx:r,flexGrow:o?1:0,children:(0,p.jsx)(C.Z,{variant:"contained",color:"primary",onClick:async()=>{s(!0),await n(),s(!1)},startIcon:i,disabled:l,children:t})})};UM.displayName="DeviceStreamConnectionStatusButton";const FM=e=>{let{status:t,icon:n,stepNumber:o,title:a,subtitle:r}=e;const l="active"===t?"h6":"body1",s="pending"===t?"grey.500":"white";return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:2,children:[(0,p.jsxs)(m.Z,{width:24,alignItems:"center",children:[o&&(0,p.jsx)(v.Z,{variant:l,color:s,children:o}),n&&(0,p.jsx)(i.Z,{sx:{transform:"translateY(5px)"},children:n})]}),(0,p.jsxs)(m.Z,{spacing:1.5,children:[a&&(0,p.jsxs)(v.Z,{variant:l,color:s,children:[a,"complete"===t&&(0,p.jsx)(Vi.Z,{color:"success",sx:{marginLeft:1,transform:"translateY(5px)"}})]}),r&&(0,p.jsx)(v.Z,{variant:"body2",color:"grey.300",children:r})]})]})};FM.displayName="DeviceStreamConnectionStatusItem";const OM=[".intercom-lightweight-app",".intercom-lightweight-app-launcher",".intercom-messenger-frame"],_M=()=>{const e=(0,o.chain)(OM).map((e=>document.querySelector(e))).compact().value()[0],t=e?Number.parseInt(window.getComputedStyle(e).zIndex):void 0;return(0,o.isNumber)(t)?t+1e6:3e9},zM=e=>{var t;let{message:n,onEndStream:i,anchorElRef:o,anchorOrigin:r,transformOrigin:l}=e;const[s,d]=(0,a.useState)(!1),c=(0,a.useRef)(null);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(cg.ZP,{open:s,onClose:()=>d(!1),keepMounted:!1,anchorEl:null!==(t=null===o||void 0===o?void 0:o.current)&&void 0!==t?t:c.current,anchorOrigin:null!==r&&void 0!==r?r:{vertical:"top",horizontal:"right"},transformOrigin:null!==l&&void 0!==l?l:{vertical:"bottom",horizontal:"right"},sx:{zIndex:_M()},PaperProps:{sx:{pointerEvents:"none",background:"none",border:"none",paddingBottom:1.5}},disableScrollLock:!0,children:(0,p.jsx)(Me.Z,{sx:{pointerEvents:"auto",backgroundColor:y.DG.grey[1e3],border:"none",color:"white",padding:2,borderRadius:1},children:(0,p.jsxs)(m.Z,{spacing:2,children:[n&&(0,p.jsx)(v.Z,{children:n}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-end",spacing:2,children:[(0,p.jsx)(C.Z,{color:"inherit",onClick:e=>{e.stopPropagation(),d(!1)},children:"Cancel"}),(0,p.jsx)(C.Z,{variant:"contained",onClick:e=>{e.stopPropagation(),d(!1),null===i||void 0===i||i()},children:"End Stream"})]})]})})}),(0,p.jsx)(ee.Z,{title:"End Stream",placement:"top",children:(0,p.jsx)(x.Z,{ref:c,color:"inherit",size:"small",onClick:e=>{e.stopPropagation(),d(!0)},children:(0,p.jsx)(J.Z,{})})})]})};zM.displayName="DeviceStreamEndStreamButton";const BM=y.DG.grey[1e3],WM=e=>{let{status:t,deviceId:n,videoRef:r,statusItems:l,statusButton:s,connectionDetails:d,onMinimize:c,onMiniplayer:u,onClose:h,onEndStream:g,networkBanner:f}=e;const b=(0,De.Z)(),{buildOrganizationPath:j}=(0,w.P)(),{isDeviceForcedLegacy:Z}=(0,sM.S)(),E=Z(n),D=(0,z.l)(S.F.Devices,n),M=(0,Vr.UC)(null===D||void 0===D?void 0:D.model),{deviceStreamToolbarVerticalOffset:k}=(0,ud.MS)(),{streamingDeviceIds:I,dialogPrevious:A,dialogNext:R}=gk(),T=(0,a.useRef)(null),P=(0,a.useMemo)((()=>"".concat(b.spacingInt(4)+k,"px")),[k,b]),L=[{side:"left",Icon:rM.Z,onClick:A,disabled:0===(0,o.indexOf)(I,n)},{side:"right",Icon:lM.Z,onClick:R,disabled:(0,o.indexOf)(I,n)===I.length-1}];return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(kn.Z,{open:!0,fullWidth:!0,maxWidth:"md",sx:{zIndex:e
3=>e.zIndex.modal-2,"& .MuiDialog-paper":{backgroundColor:y.DG.grey[1100],color:"white",border:0,marginBottom:P}},onClose:h,children:(0,p.jsxs)(m.Z,{position:"relative",ref:T,minHeight:650,children:[(0,p.jsxs)(m.Z,{height:48,padding:1.5,spacing:1,direction:"row",alignItems:"center",bgcolor:BM,children:[(0,p.jsx)(Kn.Z,{component:Xc,to:j((e=>e.devices.device.device),{deviceId:n}),color:"white",children:(null===D||void 0===D?void 0:D.name)||"--"}),(0,p.jsx)(i.Z,{flexGrow:1}),E&&(0,p.jsx)(dM.uO,{showLabel:!0,sx:{marginRight:.5}}),(0,p.jsx)(ee.Z,{title:"Minimize",placement:"top",children:(0,p.jsx)(x.Z,{color:"inherit",size:"small",onClick:c,children:(0,p.jsx)(bM.Z,{})})}),(0,p.jsx)(ee.Z,{title:"Miniplayer",placement:"top",children:(0,p.jsx)(x.Z,{color:"inherit",size:"small",onClick:u,sx:{transform:"scale(-1, 1)"},children:(0,p.jsx)(yM.Z,{})})}),(0,p.jsx)(zM,{message:"Are you sure you want to end the stream?",onEndStream:g,anchorElRef:T,anchorOrigin:{vertical:"center",horizontal:"center"},transformOrigin:{vertical:"center",horizontal:"center"}})]}),f&&(0,p.jsx)(i.Z,{position:"relative",zIndex:2,children:f}),"connected"!==t&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(VM,{deviceImagePath:M}),(0,p.jsxs)(m.Z,{position:"absolute",zIndex:1,top:170,bottom:64,left:450,right:40,spacing:3,alignItems:"flex-start",children:[(0,o.map)(l,((e,t)=>(0,p.jsx)(FM,{...e},t))),s&&(0,p.jsx)(UM,{...s,sx:{paddingLeft:5,justifyContent:"flex-end",flexGrow:"pending_permission"===t||"pending_connection"===t?1:0}})]})]}),(0,p.jsx)("video",{ref:r,style:{flexGrow:1,flexBasis:0,minHeight:0,width:"100%",objectFit:"contain",visibility:"connected"===t?void 0:"hidden"}}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",bgcolor:BM,paddingX:1.5,paddingY:.5,visibility:"connected"===t?"visible":"hidden",children:[(0,p.jsx)(v.Z,{variant:"caption",color:y.DG.grey[300],children:null!==D&&void 0!==D&&D.online?d.description:""}),(0,p.jsx)(NM,{noTooltip:(0,o.isNumber)(null===D||void 0===D?void 0:D.batteryLevel),batteryPercent:null===D||void 0===D?void 0:D.batteryLevel,showCharging:(null===D||void 0===D?void 0:D.batteryIsCharging)&&(null===D||void 0===D?void 0:D.online)})]})]})}),I.length>1&&(0,o.map)(L,((e,t)=>{let{side:n,onClick:i,disabled:o,Icon:a}=e;return(0,p.jsx)(C.Z,{sx:{color:o?y.DG.grey[500]:"white",position:"fixed",top:0,[n]:0,height:"100%",width:100,zIndex:-1},onClick:i,children:(0,p.jsx)(a,{})},t)}))]})},VM=e=>{let{deviceImagePath:t}=e;return(0,p.jsxs)(i.Z,{position:"absolute",top:48,left:-16,width:500,height:"calc(100% - ".concat(48,"px)"),overflow:"hidden",sx:{pointerEvents:"none"},children:[(0,p.jsx)(GM,{size:520,top:-348}),(0,o.map)([382,417,445],((e,t)=>(0,p.jsx)(GM,{size:e,bottom:-130},t))),(0,p.jsx)(i.Z,{sx:{position:"absolute",top:172,left:"50%",height:"calc(100% - ".concat(305.3333333333333,"px)"),width:"1px",borderLeftStyle:"dashed",borderWidth:1,borderColor:y.DG.purple[200]}}),(0,p.jsx)(i.Z,{component:"img",src:t,sx:{position:"absolute",width:200,height:130,top:20,left:"50%",transform:"translateX(-50%)",objectFit:"contain"}}),(0,p.jsx)(jM.Z,{sx:{color:y.DG.purple[300],fontSize:200,position:"absolute",bottom:-33.33333333333334,left:"50%",transform:"translateX(-50%)"}})]})},GM=e=>{let{size:t,top:n,bottom:o}=e;return(0,p.jsx)(i.Z,{sx:{width:t,height:t,position:"absolute",top:n,bottom:o,left:"50%",transform:"translateX(-50%)",opacity:.4,backgroundColor:y.DG.grey[800],borderRadius:"50%"}})};WM.displayName="DeviceStreamDialog";let HM;!function(e){e.DEVICE="DEVICE",e.VIEWER="VIEWER"}(HM||(HM={}));const qM={STREAMING_PERMISSION_DISMISSED:"error_permission_dismissed",OEM_PREVENTED_STREAM:"error_oem_permission_required",PERMISSION_DENIED:"error_permission_denied",STREAM_TERMINATED_ON_DEVICE:"error_terminated_on_device",DEVICE_USER_ENDED_STREAM:"error_user_ended_on_device",STREAM_FAILED_TO_START:"error_failed_to_start",RTC_CONFIG_ERROR:"error_connection",CONFIG_BLOCKED_STREAM:"error_config_blocked",STREAM_CERTIFICATE_REJECTED:"error_certificate_rejected",ALREADY_STREAMING:"error_already_streaming"},YM=new Set(["error_user_ended_on_device","error_oem_permission_required","error_config_blocked","error_permission_denied","error_certificate_rejected"]),KM=e=>{var t;const{request:n}=(0,Fe.pv)({method:"post",path:"devices/:deviceId/launch-remote-stream"}),{request:i}
3=(0,Fe.pv)({method:"delete",path:"rtc-signaling/realtime-connection/viewer/:realtimeConnectionId"}),{request:o}=(0,Fe.pv)({method:"delete",path:"rtc-signaling/realtime-connection/viewer/batch-delete/:deviceId"}),r=(0,Le.ye)("enableDeviceStreamReconnection"),l=(0,a.useRef)(r);l.current!==r&&(console.log("[DS] enableReconnection changed:",r),l.current=r);const s=null===(t=(0,z.T)("featureFlags"))||void 0===t?void 0:t.deviceStreamReconnectionTimeoutMs,[d,c]=(0,a.useState)("pending_online"),u=(0,a.useRef)(d);u.current=d;const[p,h]=(0,a.useState)(),[m,g]=(0,a.useState)(),[v,C]=(0,a.useState)(),x=(0,z.l)(S.F.Devices,e),f=(0,z.l)(S.F.RealtimeConnections,p),b=(0,xo.ty)(S.F.RealtimeConnections,p);(0,a.useEffect)((()=>{p&&("pending_online"===d&&null!==x&&void 0!==x&&x.online&&c("pending_permission"),"pending_permission"!==d||null!==x&&void 0!==x&&x.online||c("pending_online"))}),[null===x||void 0===x?void 0:x.online,p,d]),(0,a.useEffect)((()=>{p||v||(c(null!==x&&void 0!==x&&x.online?"pending_permission":"pending_online"),n({params:{deviceId:e},onSuccess:e=>{e.existingRealtimeConnectionId?(C(e.existingRealtimeConnectionId),c("error_already_streaming")):e.realtimeConnection&&h(e.realtimeConnection.id)},errorMessage:"Failed to start screen stream",onError:()=>{c("error_connection")}}))}),[n,null===x||void 0===x?void 0:x.online,e,v,p]);const y=(0,a.useCallback)((async e=>{await i({params:{realtimeConnectionId:e},shouldLogError:e=>{var t,n;return!((0,Fe.IZ)(e)&&(400===(null===(t=e.response)||void 0===t?void 0:t.status)||404===(null===(n=e.response)||void 0===n?void 0:n.status)))}})}),[i]);XM({deviceId:e,realtimeConnectionId:p,onRetryLimitReached:(0,a.useCallback)((()=>{c("error_request_failed")}),[])});const j=(0,a.useRef)(void 0),Z=(0,a.useRef)(!1),w=(0,a.useRef)(void 0),E=(0,a.useRef)(void 0),D=(0,a.useCallback)((e=>{var t,n;(console.log("[DS] RTC connectionState:",e,"| current status:",u.current,"| reconnectingActive:",Z.current,"| hasRtcDoc:",!!f),"failed"===e||"closed"===e)?r&&f?(c((e=>YM.has(e)?e:"reconnecting")),g(void 0),Z.current||(Z.current=!0,null===(t=j.current)||void 0===t||t.call(j),null===(n=E.current)||void 0===n||n.call(E))):(c((e=>YM.has(e)?e:"error_connection")),g(void 0),f&&y(f.id)):"new"===e||"connecting"===e?Z.current||w.current||c("pending_connection"):"disconnected"===e?c(r?e=>YM.has(e)?e:"reconnecting":e=>YM.has(e)?e:"error_connection"):"connected"===e&&(Z.current=!1,w.current&&(clearTimeout(w.current),w.current=void 0),c("connected"))}),[y,r,f]);E.current=()=>{w.current&&clearTimeout(w.current);const e=null!==s&&void 0!==s?s:3e4;e>0&&(w.current=setTimeout((()=>{c((e=>"reconnecting"===e?(Z.current=!1,f&&y(f.id),"error_connection"):e))}),e))};const{resetRTCPeerConnection:M}=QM({realtimeConnection:f,enableReconnection:r,onConnectionStateChange:D,onMediaStreamChange:g,restartReconnectionTimeoutRef:E,reconnectingActiveRef:Z});j.current=M;const k=(0,a.useRef)(!1),I=(0,a.useCallback)((async()=>{k.current||p&&(k.current=!0,w.current&&(clearTimeout(w.current),w.current=void 0),Z.current=!1,await y(p),h(void 0),g(void 0),M(),k.current=!1)}),[p,y,M]),A=(0,a.useRef)(I);(0,a.useEffect)((()=>{A.current=I})),(0,a.useEffect)((()=>()=>{A.current()}),[]);const R=(0,a.useCallback)((async()=>{await o({params:{deviceId:e}}),C(void 0)}),[o,e]);(0,a.useEffect)((()=>{k.current||p&&b&&!f&&(console.log("[DS] RTC doc deleted externally | current status:",u.current,"| enableReconnection:",r),r&&!YM.has(u.current)?A.current():YM.has(u.current)||c("error_terminated_on_device"))}),[r,f,p,b]),(0,a.useEffect)((()=>{if(null===f||void 0===f||!f.deviceError)return;const e=qM[f.deviceError];c(e)}),[null===f||void 0===f?void 0:f.deviceError]);const T=(0,a.useRef)(null),P=(0,a.useCallback)((()=>{setTimeout((()=>{T.current&&(m?(T.current.srcObject=m,T.current.onloadedmetadata=()=>{var t;null===(t=T.current)||void 0===t||t.play().catch((t=>{(0,Si.yR)(t,{name:"Failed to play device stream video",contexts:{device:{id:e}}})}))}):T.current.srcObject=null)}),0)}),[e,m]);return(0,a.useLayoutEffect)(P,[P]),{status:d,videoRef:T,reloadVideo:P,retryStream:I,endOtherStream
3:R,canEndOtherStream:!!v}},XM=e=>{const{deviceId:t,realtimeConnectionId:n,onRetryLimitReached:i}=e,[r,l]=(0,a.useState)([]),[s,d]=(0,a.useState)(!1);(0,a.useEffect)((()=>{d(!1)}),[n]),(0,a.useEffect)((()=>{if(!n)return;if(s)return;const e=(0,Os.p6)(S.F.DeviceCommands,(e=>(0,td.IO)(e,(0,td.xD)((0,td.ar)("deviceRef","==",(0,Os.qb)(S.F.Devices,t)),(0,td.ar)("action","==","LAUNCH_REMOTE_STREAM"),(0,td.ar)("data.realtimeConnectionId","==",n))))),i=(0,td.cf)(e,(e=>{const t=e.docs.map((e=>({...e.data(),id:e.id})));l(t)}),(e=>{(0,Si.yR)(e,{name:"Query queued device commands for device stream",contexts:{device:{id:t}}})}));return()=>{i(),l([])}}),[s,t,n]);const{organizationId:c}=(0,w.P)(),u=(0,a.useCallback)((async()=>{if(n)try{await(0,Fe.aY)({organizationId:c},{deviceIds:[t],action:"LAUNCH_REMOTE_STREAM",data:{realtimeConnectionId:n}})}catch(e){(0,Si.yR)(e,{name:"Send another LAUNCH_REMOTE_STREAM command",contexts:{args:{organizationId:c,deviceId:t,realtimeConnectionId:n}}})}}),[t,c,n]),p=(0,z.l)(S.F.Devices,t);(0,a.useEffect)((()=>{if(!n)return;if(null===p||void 0===p||!p.online)return;if((0,o.isEmpty)(r))return;if((0,o.some)(r,{status:"COMPLETE"}))return void d(!0);const e=setTimeout((()=>{r.length<3?u():i()}),7500);return()=>{clearTimeout(e)}}),[null===p||void 0===p?void 0:p.online,i,r,u,n])},QM=e=>{const{realtimeConnection:t,enableReconnection:n,onConnectionStateChange:i,onMediaStreamChange:r,restartReconnectionTimeoutRef:l,reconnectingActiveRef:s}=e,{request:d}=(0,Fe.pv)({method:"patch",path:"rtc-signaling/realtime-connection/viewer/:realtimeConnectionId"}),c=(0,a.useRef)(),[u,p]=(0,a.useState)(0),{documents:h}=(0,E.jV)(S.F.IceServerConfigs),m=(0,a.useMemo)((()=>(0,o.map)(h,(e=>(0,o.pick)(e,"urls","credential","username")))),[h]),{addIceCandidate:g,resetIceCandidates:v}=JM({realtimeConnection:t});(0,a.useEffect)((()=>{if(c.current)return;if(!t)return;const e=new RTCPeerConnection({iceServers:m});e.onconnectionstatechange=()=>{i(e.connectionState)},e.onicecandidate=async e=>{if(!t||!e.candidate)return;const n=e.candidate.toJSON();g(n)},e.ontrack=async e=>{e.streams[0]&&r(e.streams[0])},c.current=e}),[g,m,i,r,u,t]);const C=(0,a.useRef)(new Set),x=(0,a.useCallback)((()=>{var e;console.log("[DS] resetRTCPeerConnection called"),null===(e=c.current)||void 0===e||e.close(),c.current=void 0,v(),p((e=>e+1))}),[v]),f=(0,a.useRef)(!1),b=(0,a.useRef)(void 0);(0,a.useEffect)((()=>{(async()=>{var e,i;if(f.current)return;if(!c.current)return;if(null===t||void 0===t||!t.offerSdp)return;const o=t.offerSdp!==b.current,a=void 0!==b.current,r=!(null===(e=c.current)||void 0===e||!e.remoteDescription);console.log("[DS] acceptOffer check | offerChanged:",o,"| hasLastProcessed:",a,"| hasRemoteDesc:",r,"| peerConnectionResetCount:",u);const p=null===(i=c.current)||void 0===i?void 0:i.connectionState;var h;if(n&&o&&a&&r)return"connecting"===p||"new"===p?void console.log("[DS] New offer arrived but PC is still",p,"\u2014 skipping reset, waiting for current attempt"):(console.log("[DS] Reconnection detected \u2014 resetting PC for new offer"),s.current=!0,x(),null===(h=l.current)||void 0===h||h.call(l),void(f.current=!1));if(o||!a){if(!t.answerSdp||!c.current.remoteDescription){f.current=!0;try{const e={sdp:t.offerSdp,type:"offer"};await c.current.setRemoteDescription(e);const n=await c.current.createAnswer();await c.current.setLocalDescription(n),await d({params:{realtimeConnectionId:t.id},data:{answerSdp:c.current.localDescription.sdp},errorMessage:"Error sending SDP answer"}),b.current=t.offerSdp,s.current=!1}catch(m){(0,Si.yR)(m,{name:"Device streaming accept offer error"})}f.current=!1}}else console.log("[DS] Stale offer \u2014 waiting for device ICE restart")})()}),[d,n,u,t,s,x,l]);const{documents:y}=(0,E.D)(S.F.IceCandidates,{filter:(0,a.useCallback)((e=>e.source===HM.DEVICE&&e.targetRealtimeConnectionId===(null===t||void 0===t?void 0:t.id)),[null===t||void 0===t?void 0:t.id])});return(0,a.useEffect)((()=>{var e;if(null!==(e=c.current)&&void 0!==e&&e.remoteDescription)for(const t of y){if(C.current.has(t.id))continue;C.current.add(t.id);const e=new RTCIceCandidate(t.candidate);c.current.addIceCandidate(e).catch((e=>{(0,Si.yR)(e,{name:"Add RTC Peer Connection Ice Candidate Error"})}))}}),[y]),{resetRTCPeerConnection:x}},JM=e=>{const{realtimeConnection:t}=e,{request:n}=(0,Fe.pv)({method:"post",path:"rtc-signaling/viewer-ice-candidates"}),[,i,r]=(0,zn.G)([],500),l=(0,a.useRef)(0),s=(0,a.useCallback)((e=>{r((t=>[...t,e]))}),[r]),d=(0,a.useCallback)((()=>{r([]),l.current=0}),[r]);return(0,a.useEffect)((()=>
3{if(!t)return;const e=(0,o.slice)(i,l.current);if((0,o.isEmpty)(e))return;const a=(0,o.map)(e,(e=>({candidate:e,targetRealtimeConnectionId:t.id,targetDeviceId:t.targetDeviceId})));n({data:a}),l.current=i.length}),[n,i,t]),(0,a.useMemo)((()=>({addIceCandidate:s,resetIceCandidates:d})),[s,d])};var $M=n(36101);var ek=n(77405);const tk=e=>{const{request:t}=(0,Fe.ji)({method:"post",path:"v1/devices/generate-streaming-sdk-token"}),[n,i]=(0,a.useState)();return(0,a.useEffect)((()=>{let n=!1;return i(void 0),t({data:{deviceIds:[e]},onSuccess:e=>{n||i(e.token)},onError:()=>{}}),()=>{n=!0}}),[e]),n},nk=(e,t)=>{var n;const i=tk(e),o=(0,Le.ye)("enableDeviceStreamReconnection"),r=null===(n=(0,z.T)("featureFlags"))||void 0===n?void 0:n.deviceStreamReconnectionTimeoutMs,{organizationId:l}=(0,w.P)(),{isDeviceForcedLegacy:s}=(0,sM.S)(),d=(0,z.l)(S.F.Devices,e),c=(0,Le.Bq)(l,d)&&!s(e),[u]=(0,a.useState)(c),p=(0,a.useMemo)((()=>({endOtherStreamAutomatically:!1,environment:(0,ek.h)("production")?"production":"development",reconnectionTimeoutMs:r,enableReconnection:o,...u?{transport:"livekit",livekitApiBaseUrl:"https://mighty-platform-dev.appspot.com"}:{}})),[r,o,u]),h=(0,$M.q)(e,null!==i&&void 0!==i?i:"",p),m="pending_online"===h.status&&t?"pending_connection":h.status,[g,v]=(0,a.useState)(0),C=h.retryStream,x=(0,a.useCallback)((()=>(v((e=>e+1)),C())),[C]),f=((e,t)=>{const[n,i]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(i(!1),"pending_connection"!==e)return;const t=setTimeout((()=>i(!0)),45e3);return()=>clearTimeout(t)}),[e,t]),n})(m,g),b=f?"error_command_processed_not_connected":m;
3return{...h,status:b,retryStream:x,canEndOtherStream:"error_already_streaming"===b}},ik=new Set(["reconnecting","error_connection"]);var ok=n(5040),ak=n(63550),rk=n(3200);const lk=e=>{let{deviceId:t,device:n}=e;const i=(0,rk.P)(!0),o=(0,z.l)(S.F.DeviceStatuses,null===n||void 0===n?void 0:n.userId),{isRecheckPending:a}=(0,sM.S)(),r=!a(t)&&!(null===o||void 0===o||!o.livekitEndpointBlocked);return(0,ak.P)(t,!0,i||r),null};lk.displayName="DeviceStreamLivekitBlockedGuard";const sk=(0,a.memo)((e=>{let{isViewerOnline:t}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"center",spacing:2,sx:{backgroundColor:y.DG.warning[50],paddingX:3,paddingY:1.5},children:[(0,p.jsx)(gM.Z,{sx:{fontSize:24,color:y.DG.warning[300],flexShrink:0},"aria-hidden":!0}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"text.primary"},children:t?"Your network connection was restored.":"Your network connection was lost. The stream will resume when you're back online."})]})}));sk.displayName="DeviceStreamNetworkBanner";const dk=e=>{let{deviceId:t}=e;const{organizationId:n}=(0,w.P)(),{isDeviceForcedLegacy:i}=(0,sM.S)(),o=(0,z.l)(S.F.Devices,t),a=(0,Le.Bq)(n,o)&&!i(t);return(0,p.jsx)(ck,{deviceId:t,livekitActive:a},a?"livekit":"webrtc")};dk.displayName="DeviceStreamToolbarItem";const ck=e=>{var t;let{deviceId:n,livekitActive:r}=e;const{confirm:l}=(0,ie.o)(),s=(0,z.l)(S.F.Devices,n),d=fM(s),{endStream:c,openDialog:u,closeDialog:h,dialogDeviceId:g,toolbarItemWidth:C,isToolbarItemVisible:f,toolbarExpandedItems:b,setToolbarItemExpanded:j}=gk(),{status:Z,videoRef:w,reloadVideo:E,retryStream:D,endOtherStream
3:M,canEndOtherStream:k}=((e,t)=>{const n=(0,Le.ye)("useLegacyDeviceStreaming"),[i]=(0,a.useState)(n);return i?KM(e):nk(e,t)})(n,!(null===s||void 0===s||!s.online)),{isDeviceForcedLegacy:I,isRestartRecommended:A}=(0,sM.S)(),R=I(n);(0,cM.K)(Z,D,!r),(0,uM.b)(n,r,Z);const T=(0,a.useRef)(null);(0,a.useEffect)((()=>{Z.startsWith("error_")?T.current=Z:"connected"===Z&&(T.current=null)}),[Z]);const P=(0,a.useMemo)((()=>f(n)),[n,f]),L=!!b[n],N=g===n;(0,a.useLayoutEffect)(E,[E,P,L,N]);const U=(0,pM.K)(),F=(0,a.useMemo)((()=>((e,t)=>t?null:ik.has(e)?"viewer_offline":null)(Z,U)),[Z,U]),[O,_]=(0,a.useState)(!1);(0,a.useEffect)((()=>{"viewer_offline"===F?_(!0):null===F&&"reconnecting"!==Z&&_(!1)}),[F,Z]);const B=()=>{c(n)},W={pending_permission:{label:"Cancel Stream",onClick:B,atBottom:!0},pending_connection:{label:"Cancel Stream",onClick:B,atBottom:!0},error_request_failed:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_permission_dismissed:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_oem_permission_required:{label:"Cancel Stream",onClick:B,atBottom:!0},error_config_blocked:{label:"Cancel Stream",onClick:B,atBottom:!0},error_permission_denied:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_failed_to_start:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_terminated_on_device:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_connection:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_user_ended_on_device:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_livekit_takeover:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_command_not_processed:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_command_processed_not_connected:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})},error_certificate_rejected:{label:"Cancel Stream",onClick:B,atBottom:!0},reconnecting:{label:"Cancel Stream",onClick:B,atBottom:!0},error_already_streaming:k?{label:"End Other Stream",onClick:()=>{l({message:"Are you sure you want to end the other stream?",onConfirm:()=>{M()},closeLabel:"Cancel",confirmLabel:"End Other Stream",darkMode:!0})}}:{label:"Retry",onClick:D,startIcon:(0,p.jsx)(ks.Z,{})}},V=(G=null===s||void 0===s?void 0:s.manufacturer,H=null===s||void 0===s?void 0:s.skipStreamingPermissionPrompt,q=null===s||void 0===s||null===(t=s.currentForegroundApp)||void 0===t?void 0:t.hmdOnUser,{pending_online:[{status:"active",icon:(0,p.jsx)(kC.Z,{color:"warning"}),title:"Device is Offline",subtitle:"The stream will start when the device is online"}],pending_permission:!1===q&&H?[{status:"active",icon:(0,p.jsx)(kC.Z,{color:"warning"}),title:"Waiting for user",subtitle:"The stream will reconnect once the user puts on their headset"}]:!1===q?[{status:"active",icon:(0,p.jsx)(kC.Z,{color:"warning"}),stepNumber:1,title:"Waiting for user",subtitle:"Requesting permission. The stream will start when the user puts on their headset and approves the request"},{status:"pending",stepNumber:2,title:"Establish Connection"}]:H?[{status:"active",title:"Establishing Connection...",subtitle:"Your stream will begin shortly"}]:[{status:"active",stepNumber:1,title:"Requesting Permission...",subtitle:"The stream will start when the device's user approves the stream request"},{status:"pending",stepNumber:2,title:"Establish Connection"}],pending_connection:H?[{status:"active",title:"Establishing Connection...",subtitle:"Your stream will begin shortly"}]:[{status:"complete",stepNumber:1,title:"Permission Received"},{status:"active",stepNumber:2,title:"Establishing Connection...",subtitle:"Your stream will begin shortly"}],reconnecting:[{status:"active",title:"Reconnecting...",subtitle:"Lost connection due to network issues. Attempting to reconnect."}],error_request_failed:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Stream request failed",subtitle:(0,ok.C)("error_request_failed",G)}],error_permission_dismissed:[{status:"active",icon:(0,p.jsx)(mM.Z,{color:"error"}),title:"Waiting on device",subtitle:(0,ok.C)("error_permission_dismissed",G)}],error_oem_permission_required:[{status:"active",icon:(0,p.jsx)(mM.Z,{color:"error"}),title:"Permission denied",subtitle:(0,ok.C)("error_oem_permission_required",G)}],error_config_blocked:[{status:"active",icon:(0,p.jsx)(mM.Z,{color:"error"}),title:"Streaming blocked by configuration",subtitle:(0,ok.C)("error_config_blocked",G)}],error_permission_denied:[{status:"active",icon:(0,p.jsx)(mM.Z,{color:"error"}),title:"Permission denied",subtitle:(0,ok.C)("error_permission_denied",G)}],error_failed_to_start:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Stream failed to start",subtitle:(0,ok.C)("error_failed_to_start",G)}],error_terminated_on_device:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Stream ended on device",subtitle:(0,ok.C)("error_terminated_on_device",G)}],error_user_ended_on_device:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Stream ended on device",subtitle:(0,ok.C)("error_user_ended_on_device",G)}],error_connection:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Connection error",subtitle:(0,ok.C)("error_connection",G)}],error_already_streaming:[{status:"active",icon:(0,p.jsx)(kC.Z,{color:"warning"}
3),title:"Device is already streaming",subtitle:(0,ok.C)("error_already_streaming",G)}],error_livekit_takeover:[{status:"active",icon:(0,p.jsx)(kC.Z,{color:"warning"}),title:"Stream taken over",subtitle:(0,ok.C)("error_livekit_takeover",G)}],error_command_not_processed:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Connection is taking longer than expected",subtitle:(0,ok.C)("error_command_not_processed",G)}],error_command_processed_not_connected:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Connection is taking longer than expected",subtitle:(0,ok.C)("error_command_processed_not_connected",G)}],error_certificate_rejected:[{status:"active",icon:(0,p.jsx)(hM.Z,{color:"error"}),title:"Streaming certificate rejected",subtitle:(0,ok.C)("error_certificate_rejected",G)}]});var G,H,q;let Y=V[Z];if("viewer_offline"===F&&Y)Y=Y.map((e=>"active"===e.status?{...e,icon:(0,p.jsx)(gM.Z,{color:"warning"}),title:"Your network disconnected",subtitle:"The stream will resume when you're back online."}:e));else if("reconnecting"===Z&&T.current&&Y){const e=(0,o.find)(V[T.current],{status:"active"}),t=null===e||void 0===e?void 0:e.subtitle;t&&(Y=Y.map((e=>"active"===e.status?{...e,subtitle:t}:e)))}const K=(0,o.find)(Y,{status:"active"}),X=W[Z];return(0,p.jsxs)(m.Z,{color:"white",sx:{borderTopLeftRadius:8,borderTopRightRadius:8,overflow:"hidden",pointerEvents:"auto",flexShrink:0,position:P?void 0:"absolute",width:P?C:0},children:[L&&(0,p.jsxs)(m.Z,{"data-testid":"device-stream-miniplayer",bgcolor:y.DG.grey[1100],position:"relative",sx:{aspectRatio:"16/9","& .displayOnHover":{visibility:"hidden"},"&:hover .displayOnHover":{visibility:"unset"}},children:[(0,p.jsx)("video",{ref:w,style:{width:"100%",height:"100%",objectFit:"contain",visibility:"connected"===Z?void 0:"hidden"}}),K&&(0,p.jsxs)(m.Z,{direction:"column",alignItems:"center",justifyContent:"center",padding:4,spacing:1.5,sx:{position:"absolute",inset:0},children:[K.icon,(0,p.jsx)(v.Z,{textAlign:"center",color:y.DG.purple[50],children:K.title}),("error_already_streaming"!==Z||!k)&&K.subtitle&&(0,p.jsx)(v.Z,{textAlign:"center",variant:"body2",color:y.DG.grey[400],children:K.subtitle}),"error_already_streaming"===Z&&k&&X&&(0,p.jsx)(UM,{...X,onClick:M})]})]}),(0,p.jsxs)(m.Z,{direction:"row",width:C,height:ud.ym,onClick:()=>{j(n,!L)},sx:{overflow:"hidden",cursor:"pointer",bgcolor:y.DG.grey[900],"&:hover":{bgcolor:y.DG.grey[800]},"& .displayOnHover":{visibility:"hidden"},"&:hover .displayOnHover":{visibility:"unset"}},children:[(0,p.jsxs)(i.Z,{position:"relative",width:ud.ym,height:ud.ym,flexShrink:0,padding:L?.5:0,children:[(0,p.jsx)(re.Z,{src:d.iconUrl,variant:"square",sx:{height:1,width:1}}),(0,p.jsx)(m.Z,{className:L||N?void 0:"displayOnHover",sx:{position:"absolute",inset:e=>L?e.spacing(.5):0,justifyContent:"center",alignItems:"center",backgroundColor:e=>e.palette.action.active},children:(0,p.jsx)(m.Z,{justifyContent:"center",alignItems:"center",width:27,height:27,borderRadius:"50%",bgcolor:y.DG.grey[800],children:N&&!L?(0,p.jsx)(vM.Z,{}):(0,p.jsx)(xi.Z,{})})})]}),(0,p.jsxs)(m.Z,{direction:"row",flexGrow:1,padding:1,overflow:"hidden",children:[(0,p.jsxs)(m.Z,{alignItems:"flex-start",spacing:.75,overflow:"hidden",children:[(0,p.jsx)(v.Z,{variant:"body2",lineHeight:1,noWrap:!0,width:1,children:(null===s||void 0===s?void 0:s.name)||"--"}),(0,p.jsx)(v.Z,{variant:"caption",color:y.DG.grey[200],lineHeight:1,noWrap:!0,width:1,children:null!==s&&void 0!==s&&s.online?d.description:""})]}),(0,p.jsx)(i.Z,{flexGrow:1}),R&&(0,p.jsx)(dM.uO,{showRestartInstruction:A(n),sx:{marginRight:.5}}),(0,p.jsx)(i.Z,{flexShrink:0,children:(0,p.jsx)(ee.Z,{title:"Expand Stream",placement:"top",children:(0,p.jsx)(x.Z,{onClick:()=>{N?h(n):u(n)},sx:{padding:"5px"},size:"small",color:"inherit",children:(0,p.jsx)(vM.Z,{fontSize:"small"})})})}),(0,p.jsx)(i.Z,{flexShrink:0,children:(0,p.jsx)(zM,{onEndStream:B})})]})]}),r&&(0,p.jsx)(lk,{deviceId:n,device:s}),N&&(0,p.jsx)(WM,{status:Z,deviceId:n,videoRef:w,statusItems:Y,statusButton:X,connectionDetails:d,onClose:()=>{h(n)},onMinimize:()=>{h(n),j(n,!1)},onMiniplayer:()=>{h(n),j(n,!0)},onEndStream:B,networkBanner:O?(0,p.jsx)(sk,{isViewerOnline:U}):void 0})]})};ck.displayName="DeviceStreamToolbarItemContent";const uk=()=>{const{confirm:e}=(0,ie.o)(),{endAllStreams:t,expandAllToolbarItems:n,collapseAllToolbarItems:i}=gk(),o=(0,a.useRef)(null),[r,l]=(0,a.useState)(!1);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(cg.ZP,{open:r,onClose:()=>
3l(!1),keepMounted:!1,anchorEl:o.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"},sx:{zIndex:_M()},PaperProps:{sx:{pointerEvents:"none",background:"none",border:"none",paddingBottom:1.5}},disableScrollLock:!0,children:(0,p.jsx)(Me.Z,{sx:{pointerEvents:"auto",backgroundColor:y.DG.grey[1e3],border:"none",color:"white"},children:(0,p.jsxs)(ii.Z,{sx:{minWidth:0},children:[(0,p.jsx)(oi.Z,{onClick:()=>{n(),l(!1)},children:"Expand All"}),(0,p.jsx)(oi.Z,{onClick:()=>{i(),l(!1)},children:"Collapse All"}),(0,p.jsx)(Ie.Z,{sx:{bgcolor:y.DG.grey[800]}}),(0,p.jsx)(oi.Z,{onClick:()=>{e({onConfirm:()=>{t()},message:"End all active device streams?",darkMode:!0}),l(!1)},children:"End All Streams"})]})})}),(0,p.jsx)(x.Z,{ref:o,color:"inherit",sx:{marginRight:1.5,backgroundColor:y.DG.grey[900],width:40,height:40,"&:hover":{backgroundColor:y.DG.grey[800]}},onClick:()=>l(!0),children:(0,p.jsx)(CC.Z,{sx:{fontSize:20}})})]})};uk.displayName="DeviceStreamToolbarMenuButton";const pk=()=>{const e=(0,De.Z)(),{deviceStreamToolbarVisible:t}=(0,ud.MS)(),{streamingDeviceIds:n,toolbarPages:r,toolbarPageIndex:l,toolbarResizeListener:s,setToolbarPage:d}=gk(),c=(0,a.useMemo)((()=>{const n=t?1.5:11;return"calc(100% - 100vw + var(--scrollbarWidth) + ".concat(e.spacing(n),")")}),[t,e]),u=[{Icon:rM.Z,onClick:()=>d(l-1),disabled:0===l},{Icon:lM.Z,onClick:()=>d(l+1),disabled:l===r.length-1}];return(0,p.jsxs)(m.Z,{position:"fixed",direction:"row",alignItems:"flex-end",bottom:0,width:1,paddingLeft:1.5,paddingRight:c,bgcolor:t?y.DG.grey[1e3]:void 0,height:ud.ym,zIndex:e=>e.zIndex.modal-1,sx:{pointerEvents:t?"auto":"none"},children:[(0,p.jsxs)(m.Z,{position:"relative",direction:"row",justifyContent:t?"flex-start":"flex-end",alignItems:"flex-end",flexGrow:1,gap:hk,sx:{overflowX:"hidden",pointerEvents:"none"},children:[s,(0,o.map)(n,(e=>(0,p.jsx)(dk,{deviceId:e},e)))]}),t&&(0,p.jsxs)(m.Z,{height:1,direction:"row",alignItems:"center",color:"white",children:[(0,p.jsxs)(m.Z,{paddingX:1,paddingTop:1,alignItems:"flex-start",visibility:r.length>1?"visible":"hidden",spacing:.5,children:[(0,p.jsx)(m.Z,{direction:"row",spacing:.25,children:(0,o.map)(r,((e,t)=>(0,p.jsx)(i.Z,{bgcolor:t===l?y.DG.primary[100]:y.DG.grey[200],width:8,height:8,borderRadius:"50%"},t)))}),(0,p.jsxs)(v.Z,{variant:"caption",minWidth:30,children:[l+1,"/",r.length]})]}),(0,o.map)(u,((e,t)=>{let{Icon:n,onClick:i,disabled:o}=e;return(0,p.jsx)(x.Z,{size:"medium",color:"inherit",onClick:i,disabled:o,sx:{width:32},children:(0,p.jsx)(n,{sx:{fontSize:22}})},t)})),(0,p.jsx)(uk,{})]})]})};pk.displayName="DeviceStreamToolbar";const hk=1.5,mk=(0,a.createContext)(void 0),gk=()=>{const e=(0,a.useContext)(mk);if(void 0===e)throw new Error("useDeviceStreamContext() must be used within a DeviceStreamProvider");return e},vk=e=>{let{children:t}=e;const n=(0,De.Z)(),{organizationId:i,privileges:r,buildOrganizationPath:s}=(0,w.P)(),{setDeviceStreamToolbarVisible:d}=(0,ud.MS)(),{notify:u}=(0,ie.o)(),[h,m]=(0,a.useState)([]),[g,v]=(0,a.useState)(),[C,x]=(0,a.useState)({}),[f,{width:b}]=Wm()(),{toolbarPageSize:y,toolbarItemWidth:j}=(0,a.useMemo)((()=>{if(!b)return{toolbarPageSize:h.length,toolbarItemWidth:0};const e=n.spacingInt(hk),t=Math.max(Math.floor((b+e)/(300+e)),1);return{toolbarPageSize:t,toolbarItemWidth:Math.round((b+e)/t-e)}}),[h,n,b]),Z=(0,a.useMemo)((()=>(0,o.chunk)(h,y)),[h,y]),[E,S]=(0,a.useState)(0),D=(0,a.useCallback)((e=>{const t=Math.max(e,0),n=Math.min(t,Z.length-1);S(n)}),[Z.length]);(0,a.useEffect)((()=>{D(E)}),[D,E]);const M=(0,a.useCallback)((e=>{v(e);const t=(0,o.findIndex)(Z,(t=>(0,o.includes)(t,e)));S(t)}),[Z]),k=(0,a.useCallback)((()=>{const e=(0,o.indexOf)(h,g),t=h[e-1];t&&M(t)}),[g,M,h]),I=(0,a.useCallback)((()=>{const e=(0,o.indexOf)(h,g),t=h[e+1];t&&M(t)}),[g,M,h]),A=(0,a.useCallback)((e=>{v((t=>t===e?void 0:t))}),[]),R=(0,a.useCallback)(((e,t)=>{x((n=>({...n,[e]:t})))}),[]),T=(0,a.useCallback)((()=>{x((0,o.chain)(h).map((e=>[e,!0])).fromPairs().value())}),[h]),P=(0,a.useCallback)((()=>{x({})}),[]),L=(0,a.useCallback)((e=>{const t=(0,o.includes)(Z[E],e),n=!(1===h.length&&e===g);return t&&n}),[h.length,g,E,Z]),N=(0,a.useCallback)((e=>{if(r.default){if((0,o.includes)(h,e)){const t=(0,o.findIndex)(Z,(t=>(0,o.includes)(t,e)));D(t)}else m((t=>(0,o.includes)(t,e)?t:[...t,e])),setTimeout((()=>{const e=Math.floor(h.length/y);S(e)}),0);R(e,!0)}else u({severity:"warning",message:"Viewer privilege required to use Device Screen Streaming"})}),[u,r.default,R,D,h,y,Z]),U=(0,a.useCallback)((e=>{m((t=>(0,o.without)(t,e))),A(e)}),[A]),F=(0,a.useCallback)((()=>{m([]),v(void 0)}),[]);(0,a.useEffect)((()=>{d(h.length>1)}),[d,h.length]),(0,a.useEffect)((()=>{F()}),[i,F]);return(0,p.jsxs)(mk.Provider,{value:{streamingDeviceIds:h,startStream
3:N,endStream:U,endAllStreams:F,dialogDeviceId:g,openDialog:M,dialogPrevious:k,dialogNext:I,closeDialog:A,toolbarPages:Z,toolbarPageIndex:E,setToolbarPage:D,toolbarResizeListener:f,toolbarItemWidth:j,toolbarExpandedItems:C,setToolbarItemExpanded:R,expandAllToolbarItems:T,collapseAllToolbarItems:P,isToolbarItemVisible:L},children:[(0,p.jsx)(l.NL,{when:!(0,o.isEmpty)(h),message:e=>!!e.pathname.startsWith(s((e=>e)))||(e.pathname===c._j.auth.signOut.__path?"Signing out will end all active device streams. Continue?":"Navigating to this page will end all active device streams. Continue?")}),(0,p.jsx)(pk,{}),t]})};mk.displayName="DeviceStreamContext",vk.displayName="DeviceStreamProvider";const Ck=()=>{const e=(0,u.I0)(),t=(0,u.v9)((e=>e.device.addDeviceDialogOpen)),n=(0,a.useCallback)((()=>{e(La.i7.actions.addDeviceDialogOpenChanged(!0))}),[e]),i=(0,a.useCallback)((()=>{e(La.i7.actions.addDeviceDialogOpenChanged(!1))}),[e]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.Z,{color:"primary",variant:"contained",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),onClick:n,children:"Add device"}),(0,p.jsx)(qo,{open:t,onClose:i,analyticsLocation:"Device List"})]})};var xk=n(28182);const fk="DeviceListSidebarItem",bk={container:"".concat(fk,"-container"),checkbox:"".concat(fk,"-checkbox"),listItem:"".concat(fk,"-listItem"),listItemOneAction:"".concat(fk,"-listItemOneAction"),listItemTwoActions:"".concat(fk,"-listItemTwoActions"),label:"".concat(fk,"-label"),form:"".concat(fk,"-form"),input:"".concat(fk,"-input"),secondaryActions:"".concat(fk,"-secondaryActions")},yk=(0,Kc.ZP)("div")((e=>{let{theme:t}=e;return{["& .".concat(bk.listItem)]:{paddingRight:t.spacing(2)},["& .".concat(bk.secondaryActions)]:{visibility:"hidden"},["& .".concat(bk.container,":hover")]:{["& .".concat(bk.secondaryActions)]:{visibility:"unset"},["& .".concat(bk.listItemOneAction)]:{paddingRight:t.spacing(5)},["& .".concat(bk.listItemTwoActions)]:{paddingRight:t.spacing(8)}},["& .".concat(bk.checkbox)]:{padding:t.spacing(.25)},["& .".concat(bk.label)]:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},["& .".concat(bk.form)]:{width:"100%"},["& .".concat(bk.input)]:{...t.typography.body2,marginTop:2}}})),jk=(0,a.memo)((e=>{let{title:t,icon:n,selected:i=!1,onClick:r,onInputSubmit:l,onDelete:s,onInputBlur:d,externalInputValue:c,externalInputKey:h,isOnboardingTest:m=!1,secondary:g=!1,privilege:v}=e;const[C,f]=(0,a.useState)(!1),{privileges:b}=(0,w.P)(),y=(0,u.v9)((e=>e.device.pendingOperation)),j=!v||b[v],Z=!!r&&!!l&&j,E=!!s&&j,S=()=>{f(!0)},D=(0,a.useCallback)((()=>{f(!1),null===d||void 0===d||d()}),[d]),M=[Z,E].every(o.identity),k=[Z,E].some(o.identity)&&!M;return(0,p.jsx)(yk,{children:(0,p.jsxs)(fl.ZP,{className:(0,xk.Z)(bk.listItem,k&&bk.listItemOneAction,M&&bk.listItemTwoActions),ContainerProps:{className:bk.container},button:!C,dense:!0,disabled:"changeOrganization"===(null===y||void 0===y?void 0:y.type),onClick:()=>{C||(r?r():l&&S())},children:[(0,p.jsx)(As.Z,{sx:n&&m?{color:"primary.main"}:void 0,children:n||(0,p.jsx)(Pi.Z,{className:bk.checkbox,checked:i,size:"small",color:"default"})}),C&&l?(0,p.jsx)(yg,{value:Z?t:"",onSubmit:l,onBlur:D,sx:{width:1},textFieldProps:{inputProps:{className:bk.input}},registerOptions:{required:"Tag name is required",validate:e=>e.trim().length>0||"Tag name cannot be empty"},externalValue:c,externalValueKey:h}):(0,p.jsx)(Rs.Z,{primaryTypographyProps:{title:t,className:bk.label,color:n&&m?"primary":g?"textSecondary":"textPrimary"},primary:t}),(Z||E)&&!C&&(0,p.jsxs)(Xx.Z,{className:bk.secondaryActions,children:[Z&&(0,p.jsx)(x.Z,{edge:"end",onClick:S,children:(0,p.jsx)(jg.Z,{fontSize:"small"})}),E&&(0,p.jsx)(x.Z,{edge:"end",onClick:()=>{s&&s()},children:(0,p.jsx)(Gl.Z,{fontSize:"small"})})]})]})})})),Zk=e=>{let{items:t,itemTypePlural:n,ItemTypeIcon:i,filterProperty:r,renderItem:l,collapsedLength:s=10,expanded:d,onExpandedChange:c,children:h}=e;const m=(0,a.useContext)(md),g=(0,u.v9)((e=>e.device.sidebarFilter)),v=(0,a.useMemo)((()=>g?(0,o.filter)(t,(e=>{const t=e[r];return(0,o.includes)((0,o.toLower)(t),(0,o.toLower)(g))})):t),[g,t,r]),[C,x]=(0,a.useState)(!0),f=void 0!==d?!d:C,b=(0,a.useCallback)((e=>{c?c(!e):x(e)}),[c]),y=!g&&t.length>s,j=v.length>s&&!(y&&f)&&!g,Z=(0,a.useCallback)((e=>{let{key:t,index:n,style:i,registerChild:o}=e;const a=v[n];return a?(0,p.jsx)("div",{style:i,ref:o,children:l(a)},t):null}),[v,l]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(sj.Z,{sx:{marginX:-2,paddingX:4},children:[(0,p.jsx)(i,{}),(0,p.jsx)("span",{children:(0,o.capitalize)(n)}),y&&!f&&(0,p.jsx)(Kn.Z,{variant:"body2",flexGrow:1,textAlign:"right",onClick:()=>b(!0),children:"Collapse"})]}),y&&f?(0,o.map)((0,o.slice)(v,0,s),l):j?(0,p.jsx)(Zu.Z,{height:"scroll-parent",scrollElement:m,renderRow:Z,rowCount:v.length,rowHeight:36}):(0,o.map)(v,l),h,y&&f&&(0,p.jsx)(fl.ZP,{children:(0,p.jsxs)(Kn.Z,{variant:"body2",onClick:()=>b(!1),children:["See all (",t.length,")"]})}),!!g&&(0,o.isEmpty)(v)&&(0,p.jsx)(fl.ZP,{children:(0,p.jsx)(Rs.Z,{secondary:"No matching ".concat((0,o.toLower)(n))})})]})}
3,wk=e=>{let{expanded:t,onExpandedChange:n}=e;const i=(0,u.I0)(),o=(0,l.k6)(),r="test"===gS(),{organizationId:s,privileges:d,buildOrganizationPath:c}=(0,w.P)(),h=(0,u.v9)((e=>e.device.query.configurationIds)),{documents:m}=(0,E.D)(S.F.Configurations,{sort:ze.gt,staticSort:"end"}),g=(0,a.useCallback)((async(e,t)=>{try{await(0,Fe.RG)({organizationId:s,configurationId:e},{name:t})}catch(n){(0,Si.yR)(n,{name:"rename configuration error",contexts:{configuration:{id:e,newName:t}}})}}),[s]),v=(0,u.v9)((e=>e.device.sidebarFilter)),C=(0,a.useCallback)((e=>{i(La.i7.actions.configurationSelected({configurationId:e}))}),[i]),x=(0,a.useCallback)((()=>{o.push("".concat(c((e=>e.configurations)),"?action=create"))}),[o,c]),f=(0,a.useCallback)((e=>(0,p.jsx)(jk,{title:e.name,onClick:()=>C(e.id),onInputSubmit:t=>g(e.id,t),selected:h.includes(e.id),isOnboardingTest:r,privilege:"configurations"},e.id)),[h,r,C,g]);return(0,p.jsx)(Zk,{expanded:t,onExpandedChange:n,items:m,itemTypePlural:"configurations",ItemTypeIcon:Wl.Z,filterProperty:"name",renderItem:f,children:d.configurations&&!v&&r&&(0,p.jsx)(jk,{title:"Add New Configuration",icon:(0,p.jsx)(Wn.Z,{}),onClick:x,isOnboardingTest:r,secondary:!0})})},Ek=()=>{const e=(0,qg.I0)(),t=(0,u.v9)((e=>e.device.sidebarFilter)),[n,i,o]=(0,zn.G)(t,300),r=n!==t;(0,a.useEffect)((()=>{e(La.i7.actions.deviceListSidebarFilterChanged({filter:i}))}),[i,e]);
3const l=(0,_n.S)({xs:"Search filters",lg:"Find a configuration, tag, or model"});return(0,p.jsx)(xu,{value:n,onChange:o,TextFieldProps:{placeholder:l,InputProps:{startAdornment:(0,p.jsx)(bl.T,{pending:r})}}})};var Sk=n(4898),Dk=n(70491);const Mk=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),{organization:n}=(0,d.mP)(),{dashboardStats:i}=(0,Xn.w)(),r=0===(null!==(e=n.devicesRequireMxrRepairCount)&&void 0!==e?e:0),l=(0,Le.ye)("enableStreamingPromptPermission"),s=(0,Le.ye)("enableQfbMigration"),{documents:c}=(0,E.D)(S.F.Apps,{filter:(0,a.useCallback)((e=>{const t=!(0,o.isEmpty)(e.obbUrls),n=tc(e.fileRefs,"androidObb");return t||n}),[])}),{documents:h}=(0,E.D)(S.F.Configurations,{filter:(0,a.useCallback)((e=>tc(e.fileRefs,"androidObb")),[])}),m=!$d(i,"androidObb")||(0,o.isEmpty)(c)&&(0,o.isEmpty)(h),g=(0,Dk.S)();function v(e,t){var n;return!g&&0===(null!==(n=null===t||void 0===t?void 0:t[e])&&void 0!==n?n:0)}const C={requiresMxrRepair:r,hasAndroidObbPermission:m,missingAndroidObbPermission:m,missingStreamWithoutPromptPermission:!l,hasStreamWithoutPromptPermission:!l,migrationPending:!s,mhmsMigrationComplete:!s,enrolledViaDeviceSetupTool:v(bi.HL.DST,null===i||void 0===i?void 0:i.deviceEnrollmentCounts),enrolledViaPreload:v(bi.HL.Preload,null===i||void 0===i?void 0:i.deviceEnrollmentCounts),enrolledViaQFB:v(bi.HL.QFB,null===i||void 0===i?void 0:i.deviceEnrollmentCounts),enrolledViaQRCode:v(bi.HL.QRCode,null===i||void 0===i?void 0:i.deviceEnrollmentCounts)},x=Be.vc.device.filterOptions,f=(0,u.v9)((e=>e.device.query.filterIds));return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(sj.Z,{sx:{marginX:-2,paddingX:4},children:[(0,p.jsx)(Sk.Z,{}),(0,p.jsx)("span",{children:"Filters"})]}),(0,o.map)(x,((e,n)=>C[n]?null:(0,p.jsx)(jk,{title:e.title,onClick:()=>(e=>{t(La.i7.actions.filterSelected({filterId:e}))})(n),selected:f.includes(n)},n)))]})})),kk=e=>{let{expanded:t,onExpandedChange:n}=e;const i=(0,u.I0)(),{dashboardStats:r}=(0,Xn.w)(),l=(0,u.v9)((e=>e.device.query.models)),s=(0,a.useCallback)((e=>{i(La.i7.actions.modelSelected({models:e}))}),[i]),d=(0,a.useMemo)((()=>(0,o.chain)(null===r||void 0===r?void 0:r.deviceModelCounts).toPairs().map((e=>{let[t,n]=e;return{modelName:(0,Vr.ao)(t),count:n,model:t}})).groupBy("modelName").map(((e,t)=>({count:(0,o.sumBy)(e,"count"),modelName:t,relatedModels:(0,o.map)(e,"model")}))).sort(((e,t)=>"Unknown"===e.modelName?1:e.modelName.localeCompare(t.modelName))).value(
3)),[r]),c=(0,a.useCallback)((e=>(0,p.jsx)(jk,{title:e.modelName,onClick:()=>s(e.relatedModels),selected:(0,o.isEmpty)((0,o.without)(e.relatedModels,...l)),privilege:"devices"},e.modelName)),[l,s]);return r?(0,p.jsx)(Zk,{expanded:t,onExpandedChange:n,items:d,itemTypePlural:"devices",ItemTypeIcon:Fl.u,filterProperty:"modelName",renderItem:c}):(0,p.jsx)(fl.ZP,{children:(0,p.jsx)(Rn.Z,{sx:{width:"100%"}})})},Ik=["Cart 1","Demo","San Francisco","Checked Out","Client","Needs Repair"],Ak=e=>{let{expanded:t,onExpandedChange:n}=e;const o=(0,u.I0)(),{privileges:r}=(0,w.P)(),l=(0,u.v9)((e=>e.device.query.tagIds)),s=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"tags",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.Tags,id:t.id,set:t}}})),[])),d=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"tags/:tagId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.Tags,id:null===t||void 0===t?void 0:t.tagId,update:n}}})),[])),c=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"tags/:tagId",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.Tags,id:null===t||void 0===t?void 0:t.tagId,remove:!0}}})),[])),h=gS(),m="loading"===h,g="test"===h,v=(0,u.v9)((e=>e.device.sidebarFilter)),[C,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)(),{documents:y}=(0,E.D)(S.F.Tags,{sort:ze.gt,staticSort:"start"}),j=(0,a.useMemo)((()=>C?new Set(y.map((e=>e.name.toLowerCase()))):void 0),[y,C]),Z=(0,a.useMemo)((()=>j?Ik.filter((e=>!j.has(e.toLowerCase()))):[]),[j]),D=(0,a.useCallback)((e=>{o(La.i7.actions.tagSelected({tagId:e}))}),[o]),M=(0,a.useCallback)((async e=>{await s.request({data:{name:e},errorMessage:"Error creating tag"})}),[s]),k=(0,a.useCallback)((async(e,t)=>{await d.request({params:{tagId:e},data:{name:t},errorMessage:"Error updating tag"})}),[d]),I=Bn({onConfirm:async e=>{e&&await c.request({params:{tagId:e.id},errorMessage:"Error deleting tag",onSuccess:()=>{o(La.i7.actions.deleteFilterItem({selectedId:e.id,selectedList:"tagIds"}))}})},title:"Delete Tag",getContent:e=>(0,p.jsxs)(mf.h,{children:["Delete the tag ",(0,p.jsx)("em",{children:e.name}),"? This action will remove the tag\xa0",(0,p.jsx)("em",{children:e.name})," from all devices that currently have it."]})}),A=(0,a.useCallback)((e=>(0,p.jsx)(jk,{title:e.name,onClick:()=>D(e.id),onInputSubmit:t=>k(e.id,t),onDelete:()=>I.trigger(e),selected:l.includes(e.id),isOnboardingTest:g,privilege:"devices"},e.id)),[l,g,D,k,I]);return(0,p.jsxs)(Zk,{expanded:t,onExpandedChange:n,ItemTypeIcon:Vl.Z,itemTypePlural:"tags",items:y,filterProperty:"name",renderItem:A,collapsedLength:r.devices?8:9,children:[!v&&!m&&(!g||y.length>0)&&(0,p.jsx)(jk,{title:"No Tags",onClick:()=>D(qi.ki.None),selected:l.includes(qi.ki.None),isOnboardingTest:g,secondary:!0}),r.devices&&!v&&!m&&!g&&(0,p.jsx)(jk,{title:"Add New Tag",icon:(0,p.jsx)(Wn.Z,{}),onInputSubmit:M,isOnboardingTest:g,secondary:!0}),r.devices&&!v&&!m&&g&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.Z,{onClick:()=>x(!0),children:(0,p.jsx)(jk,{title:"Add New Tag",icon:(0,p.jsx)(Wn.Z,{}),onInputSubmit:M,onInputBlur:()=>{x(!1),b(void 0)},externalInputValue:null===f||void 0===f?void 0:f.value,externalInputKey:null===f||void 0===f?void 0:f.nonce,isOnboardingTest:g,secondary:!0})}),C&&(0,p.jsx)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5,paddingX:2,paddingTop:1.3},children:Z.map((e=>(0,p.jsx)(ke.Z,{label:e,size:"small",onMouseDown:e=>e.preventDefault(),onClick:()=>b((t=>{var n;return{value:e,nonce:(null!==(n=null===t||void 0===t?void 0:t.nonce)&&void 0!==n?n:0)+1}})),sx:{paddingX:.5,paddingY:.5,fontWeight:400,color:"text.secondary"}},e)))})]}),r.devices&&(0,p.jsx)(Fn,{...I.props})]})},Rk=e=>{let{dimFilters:t}=e;const n=(0,u.I0)(),r=(()=>{const{organization:e}=(0,d.mP)(),t=gS();return"loading"!==t&&("test"!==t||e.numActiveDevices>0)})(),[l,s]=(0,a.useState)(null),c=(0,a.useCallback)((e=>t=>{s(t?e:null)}),[]),{configurationIds:h,filterIds:g,models:x,tagIds:f}=(0,u.v9)((e=>e.device.query)),b=!(0,o.every)([h,g,x,f],o.isEmpty),y=(0,o.sumBy)([h,g,x,f],"length"),j=(0,u.v9)((e=>e.device.pendingOperation)),Z=(0,p.jsx)(Ie.Z,{sx:{paddingTop:3,marginBottom:2,marginX:-2}});return(0,p.jsxs)(ii.Z,{disablePadding:!0,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,paddingX:1,paddingBottom:1,children:[(0,p.jsx)(C.Z,{startIcon:(0,p.jsx)(pa.Z,{}),variant:b?"contained":"text",color:"primary",size:"small",onClick:()=>{n(La.i7.actions.filtersCleared())},disabled:!b||"changeOrganization"===(null===j||void 0===j?void 0:j.type),children:"Clear filters"}),y>0&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:[y," selected"]})]}),(0,p.jsx)(i.Z,{paddingX:1,paddingBottom:1,children:(0,p.jsx)(Ek,{})}),(0,p.jsx)(wk,{expanded:"configurations"===l,onExpandedChange:c("configurations")}),Z,(0,p.jsx)(Ak,{expanded:"tags"===l,onExpandedChange:c("tags")}
3),r&&Z,r&&(0,p.jsx)(kk,{expanded:"models"===l,onExpandedChange:c("models")}),Z,(0,p.jsx)(i.Z,{ref:(0,a.useCallback)((e=>{e&&(t?e.setAttribute("inert",""):e.removeAttribute("inert"))}),[t]),sx:t?{opacity:.55}:void 0,children:(0,p.jsx)(Mk,{})}),(0,p.jsx)(i.Z,{height:e=>e.spacing(1)})]})};var Tk=n(33477);const Pk=(0,a.memo)((e=>{let{showCenteredSpinner:t=!0,testId:n="uiTable_refreshingOverlay"}=e;return(0,p.jsxs)(i.Z,{"data-testid":n,sx:{position:"absolute",inset:0,zIndex:4,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"auto"},children:[(0,p.jsx)(i.Z,{"aria-hidden":!0,sx:{position:"absolute",inset:0,bgcolor:"background.paper",opacity:.5,transition:"opacity 150ms ease"}}),t&&(0,p.jsx)(Zi.Z,{size:32,sx:{position:"relative"}})]})}));Pk.displayName="UITableRefreshingOverlay";var Lk=n(37320),Nk=n(23909);const Uk=(0,a.memo)((e=>{let{clearTestId:t="uiTableToolbar_searchClear",disabled:n,inputTestId:i="uiTableToolbar_searchInput",onClearClick:o,onInputChange:a,placeholder:r,value:l}=e;return(0,p.jsx)(Ln.Z,{"data-testid":i,disabled:n,onChange:a,placeholder:r,size:"small",sx:{width:400},value:l,InputProps:{startAdornment:(0,p.jsx)(mo.Z,{position:"start",children:(0,p.jsx)(ua.Z,{sx:{color:"grey.500",fontSize:18}})}),endAdornment:l?(0,p.jsx)(mo.Z,{position:"end",children:(0,p.jsx)(x.Z,{"data-testid":t,disabled:n,onClick:o,size:"small",children:(0,p.jsx)(pa.Z,{sx:{fontSize:16}})})}):void 0}})}));Uk.displayName="UITableToolbarSearch";const Fk=(0,a.memo)((e=>{var t,n,i;let{resultCount:o,selectionCount:r,showResultCount:l=!0,leftActions:s,rightActions:d,search:c,sx:u}=e;const[h,g]=(0,a.useState)(null!==(t=null===c||void 0===c?void 0:c.value)&&void 0!==t?t:"");(0,a.useEffect)((()=>{c&&!c.onSearchChange&&console.warn("[UITableToolbar] search UI requires onSearchChange callback")}),[c]),(0,a.useEffect)((()=>{null!=(null===c||void 0===c?void 0:c.value)&&g(c.value)}),[null===c||void 0===c?void 0:c.value]);const C=(0,zn.c)(h,null!==(n=null===c||void 0===c?void 0:c.debounceMs)&&void 0!==n?n:300),x=null===c||void 0===c?void 0:c.onSearchChange;(0,a.useEffect)((()=>{null===x||void 0===x||x(C)}),[C,x]);const f=(0,a.useCallback)((e=>{g(e.target.value)}),[]),b=(0,a.useCallback)((()=>{g(""),null===x||void 0===x||x("")}),[x]),y=!(null===c||void 0===c||!c.onSearchChange),j=!!r;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",gap:"".concat(8,"px"),paddingX:2,height:56,"data-testid":"uiTableToolbar",sx:u,children:[!j&&!s&&l&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"uiTableToolbar_resultsCount",children:[o," results"]}),s,j&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"uiTableToolbar_selectionCount",children:[r," selected"]}),(0,p.jsx)(m.Z,{flexGrow:1}),y&&(0,p.jsx)(Uk,{clearTestId:c.clearTestId,disabled:c.disabled,inputTestId:c.inputTestId,onClearClick:b,onInputChange:f,placeholder:null!==(i=c.placeholder)&&void 0!==i?i:"Search by name, serial, etc.",value:h}),d]})}));Fk.displayName="UITableToolbar";var Ok=n(23195),_k=n(82148);const zk="background.paper",Bk=e=>{let{table:t,flexColumnIds:n,tableBodyHasVerticalScrollbar:r,headerSx:l,sortKey:s,sortAscending:d,onSortClick:c,toolbar:u,virtualized:h=!1,rowHeight:m=_k.NJ,height:g="window",emptyMessage:v,renderRow:C,firstColumnPinMode:x=Nk.Tm.Sticky,enableRowSelection:f=!1,selectedRowIds:b=[],onSelectedRowIdsChange:y,refreshing:j=!1,showCenteredLoadingSpinner:Z=!0,sx:w}=e;const{contentAreaHeight:E}=(0,ud.MS)(),[S,D]=(0,a.useState)(0),{ref:M}=(0,Yi.y)((0,a.useCallback)((e=>{D(e.contentRect.height)}),[])),k=(0,o.reduce)(t.getVisibleLeafColumns(),((e,t)=>e+t.getSize()),0)+(f?Lk.xc:0),I=(0,a.useMemo)((()=>t.getRowModel().rows.map((e=>e.id))),[t]),A=(0,a.useMemo)((()=>({enableRowSelection:f,selectedRowIds:b,onSelectedRowIdsChange:y,rowIds:I})),[f,y,I,b]),R=(0,a.useMemo)((()=>{if(null!=r)return r;if(!h||!m)return!1;const e=t.getRowModel().rows.length*m;return"auto"===g?S>0&&e>S:!!(0,o.isNumber)(g)&&e>g}),[S,g,m,t,r,h]),T="auto"===g;return(0,p.jsx)(Lk.p_.Provider,{value:A,children:(0,p.jsxs)(i.Z,{sx:{...Tk.VX,...T&&{display:"flex",flexDirection:"column",height:"calc(".concat(E,")"),minHeight:0},...w,bgcolor:zk},children:[u&&(0,p.jsx)(Fk,{...u,sx:{flexShrink:0,...u.sx}}),(0,p.jsxs)(i.Z,{sx:{position:"relative",...T&&Tk.JZ},children:[(0,p.jsxs)(Nk.j6,{firstColumnPinMode:x,virtualized:h,tableBodyHasVerticalScrollbar:R,fillHeight:T,children:[(0,p.jsx)(Ok.pS,{table:t,flexColumnIds:n,sx:{flexShrink:0,minWidth:k,...l},sortKey:s,sortAscending:d,onSortClick:c}),h&&(0,p.jsx)(i.Z,{ref:M,sx:{minWidth:k,...T&&Tk.h0},children:(0,p.jsx)(nh.g,{height:g,table:t,flexColumnIds:n,rowHeight:m,emptyMessage:v,renderRow:C,tableMinWidth:k})})]}),j&&(0,p.jsx)(Pk,{showCenteredSpinner:Z})]})]})})};Bk.displayName="UITable";const Wk=e=>(0,o.map)(e,(e=>({id:e.id,visible:!e.hiddenByDefault}))),Vk=(e,t)=>{const n=Wk(e),i=new Set((0,o.map)(e,"id")),a=(0,o.reduce)(t,((e,t)=>
3(i.has(t.id)&&e.push(t),e)),[]),r=new Set((0,o.map)(a,"id")),l=(0,o.filter)(n,(e=>!r.has(e.id)));return[...a,...l]},Gk=e=>({columnOrder:(0,o.map)(e,"id"),hiddenColumnIds:(0,o.map)((0,o.filter)(e,(e=>!e.visible)),"id")}),Hk=["name"],qk=[{id:"configuration",label:"Configuration"},{id:"syncStatus",label:"Sync status"},{id:"lastSynced",label:"Last synced",hiddenByDefault:!0},{id:"model",label:"Model"},{id:"serial",label:"Serial",hiddenByDefault:!0},{id:"firmware",label:"Firmware"},{id:"activity",label:"Online"},{id:"currentActivity",label:"Current activity",hiddenByDefault:!0},{id:"battery",label:"Battery"},{id:"stream",label:"Stream"}],Yk=()=>{const{requestAsync:e}=(0,Fe.ji)({method:"get",path:"user-preferences/device-list"}),{requestAsync:t}=(0,Fe.ji)({method:"post",path:"user-preferences/device-list"}),[n,i]=(0,a.useState)(!1),r=(0,a.useRef)(null),l=(0,a.useRef)(!1),{applyColumnLayout:s,columnLayout:d,columnOrder:c,columnVisibility:u,onColumnOrderChange:p,onColumnVisibilityChange:h}=(e=>{let{columnMenuItems:t,pinnedColumnIds:n=[]}=e;const[i,r]=(0,a.useState)((()=>Wk(t))),l=(0,a.useCallback)((e=>{r(Vk(t,e))}),[t]),s=(0,a.useMemo)((()=>[...n,...(0,o.filter)((0,o.map)(i,"id"),(e=>!(0,o.includes)(n,e)))]),[i,n]),d=(0,a.useMemo)((()=>({...(0,o.fromPairs)((0,o.map)(i,(e=>[e.id,e.visible]))),...(0,o.fromPairs)((0,o.map)(n,(e=>[e,!0])))})),[i,n]),c=(0,a.useCallback)((e=>{const t="function"===typeof e?e(s):e,i=(0,o.filter)(t,(e=>!(0,o.includes)(n,e)));r((e=>{const t=(0,o.keyBy)(e,"id");return(0,o.compact)((0,o.map)(i,(e=>t[e])))}))}),[s,n]),u=(0,a.useCallback)((e=>{const t="function"===typeof e?e(d):e;r((e=>(0,o.map)(e,(e=>({...e,visible:!1!==t[e.id]})))))}),[d]);return{applyColumnLayout:l,columnLayout:i,columnOrder:s,columnVisibility:d,onColumnOrderChange:c,onColumnVisibilityChange:u}})({columnMenuItems:qk,pinnedColumnIds:Hk});(0,a.useEffect)((()=>{let t=!1;return i(!1),r.current=null,l.current=!1,e().then((e=>{if(t)return;if(r.current={columnOrder:e.columnOrder,hiddenColumnIds:e.hiddenColumnIds},l.current)return;const n=((e,t)=>{let{columnOrder:n,hiddenColumnIds:i}=t;const a=new Set(i),r=(0,o.map)(n,(e=>({id:e,visible:!a.has(e)}))),l=Vk(e,r);return(0,o.map)(l,(e=>({...e,visible:!a.has(e.id)&&e.visible})))})(qk,e);s(n)})).catch((()=>{t||(r.current=Gk(Wk(qk)))})).finally((()=>{t||i(!0)})),()=>{t=!0}}),[s,e]);const m=(0,a.useCallback)((e=>{l.current=!0,p(e)}),[p]),g=(0,a.useCallback)((e=>{l.current=!0,h(e)}),[h]),v=(0,a.useCallback)((()=>{if(!n)return;const e=Gk(d);(0,o.isEqual)(e,r.current)||t({data:e}).then((e=>{r.current={columnOrder:e.columnOrder,hiddenColumnIds:e.hiddenColumnIds}})).catch((()=>{}))}),[d,n,t]);return{columnLayout:d,columnOrder:c,columnVisibility:u,onColumnOrderChange:m,onColumnVisibilityChange:g,saveColumnLayoutOnMenuClose:v}},Kk=()=>{const e=(0,u.v9)((e=>e.device.queryResult)),t=(0,u.v9)((e=>e.device.selection.values));return(0,a.useMemo)((()=>(0,o.filter)(e,((e,n)=>{var i;return null!==(i=t[n])&&void 0!==i&&i}))),[e,t])},Xk=()=>{const e=Kk();return(0,a.useMemo)((()=>(0,o.map)(e,"id")),[e])},Qk=()=>{const{organization:e}=(0,d.mP)(),t=(0,d.GB)()&&!e.customContract,n=gS(),i=(0,u.v9)((e=>e.device.queryResult));return t&&"test"===n&&0===e.numActiveDevices&&(0,o.isEmpty)(i)},Jk=e=>{let{open:t,onClose:n,configurationId:i,numNewDevices:a=1}=e;const r=(0,z.l)(S.F.Configurations,i),l=(0,o.map)(null===r||void 0===r?void 0:r.approvedApps,(e=>(0,p.jsx)($k,{appId:e.id,numNewDevices:a},e.id)));return(0,p.jsx)(kn.Z,{open:t,onClose:n,maxWidth:"xs",children:(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[r?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.Z,{variant:"subtitle1",children:["Cannot deploy configuration to"," ",(0,ul.sr)(a,"device")]}),(0,p.jsxs)(v.Z,{color:"text.secondary",children:["Cannot deploy Configuration ",r.name," to"," ",(0,ul.sr)(a,"device")," because an app on this configuration has reached its device limit"]}),(0,p.jsx)(m.Z,{paddingY:1.5,spacing:1,children:l})]}):(0,p.jsx)(Rn.Z,{}),(0,p.jsx)(C.Z,{variant:"contained",onClick:n,sx:{alignSelf:"flex-end",textTransform:"none"},children:"Okay"})]})})})},$k=e=>{let{appId:t,numNewDevices:n}=e;const a=(0,z.l)(S.F.Apps,t);return a?void 0===a.deviceLimit?null:(0,p.jsxs)(m.Z,{direction:"row",bgcolor:y.DG.grey[50],children:[(0,p.jsx)(i.Z,{component:"img",src:a.iconUrl,alt:a.title,width:76,height:76}),(0,p.jsxs)(m.Z,{flexGrow:1,padding:1,spacing:1,justifyContent:"center",overflow:"hidden",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(Tu,{appVersions:[a]}),(0,p.jsxs)(v.Z,{noWrap:!0,children:[(0,p.jsx)(Kn.Z,{component:Xc,to:(0,c.LT)(c._j.organization.vrContent.edit.app.shared,{organizationId:a.organizationRef.id,packageName:a.packageName}),children:a.title}),(0,p.jsxs)(v.Z,{component:"span",variant:"body2",color:"text.secondary",children:[" ","- ",a.releaseChannelName]})]})]}),(0,p.jsx)(ou,{deviceLimit:a.deviceLimit,currentDeployments:(0,o.sum)((0,o.values)(a.configurationDeployments)),addedDeployments:n})]})]}):(0,p.jsx)(Rn.Z,{})};Jk.displayName="DeviceDialogConfigurationDeviceLimitError";const eI=e=>{let{table:t,flexColumnIds:n,extraRows:r,children:l,...s}=e;const{tableHeight:d,tableHasScrollbar:c}=(0,a.useMemo)((()=>{const e=40*t.getRowModel().rows.length+(0,o.sumBy)(r,"height"),n=Math.min(e,350);return{tableHeight:n,tableHasScrollbar:e>n}}),[t,r]);return(0,p.jsx)(Ni.Y,{...s,children:(0,p.jsxs)(m.Z,{spacing:.5,sx:{"& .MuiTableCell-root":{paddingX:1}},children:[(0,p.jsx)(i.Z,{sx:{paddingRight:c?"calc(var(--scrollbarWidth) + 1px)":"1px","& .MuiTableCell-root":{height:"unset"}},children:(0,p.jsx)(eh.K,{table:t,flexColumnIds:n,disableUnderline:!0})}),(0,p.jsx)(i.Z,{sx:{border:"1px solid ".concat(y.DG.grey[400]),borderRadius:2,overflow:"hidden","& .MuiTableRow-root:last-child .MuiTableCell-root":{borderBottom:"none"}},children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:d,rowHeight:40,table:t,flexColumnIds:n,extraRows:r})}),l]})})},tI=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=e===bi.Zb.SHARED?"I understand that I will not be able to move my ".concat((0,ul.n8)(t,"device")," back to Indiv
3idual Mode (Default Device Menus) after applying a configuration that uses Shared Mode (ManageXR Home Screen). If I want to switch back in the future, ").concat((0,ul.KO)(t)," will require a factory reset. "):"I understand that applying this configuration will factory reset my ".concat((0,ul.n8)(t,"device")," and that I will need to re-enroll ").concat((0,ul.Gv)(t)," for the new configuration to take effect.");return n},nI=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return"Apply configuration using ".concat(bi.to[e]," Mode to ").concat((0,ul.n8)(t,"device"),"?")},iI=e=>{let{open:t,onClose:n,onSubmit:i,devicesWcs:o,targetConfigurationId:a}=e;const r=(0,xo.ky)(S.F.Configurations,a),l=(0,$i.eH)(null===r||void 0===r?void 0:r.deviceExperienceMode),s=1===o.length?o[0]:void 0;return s?(0,p.jsx)(oI,{open:t,onClose:n,onSubmit:i,deviceWcs:s,targetQfbDeviceMode:l}):(0,p.jsx)(aI,{open:t,onClose:n,onSubmit:i,devicesWcs:o,targetQfbDeviceMode:l})},oI=e=>{let{open:t,onClose:n,onSubmit:i,deviceWcs:o,targetQfbDeviceMode:r}=e;const l=o.qfbDeviceMode,s="The device is currently in ".concat(bi.to[l]," Mode. The pending configuration uses ").concat(bi.to[r]," Mode."),d=(0,a.useCallback)((e=>{let{onConfirmationValidChange:t}=e;return(0,p.jsx)(Gc,{onConfirmationValidChange:t,warningText:"".concat(s," ").concat(r===bi.Zb.INDIVIDUAL?"Switching from Shared to Individual Mode requires a factory reset.":""),confirmationText:tI(r),linkHref:Be.IW.qfbDeviceModes})}),[r,s]),c=l&&l!==r,u=(0,a.useCallback)((()=>i([o.id])),[o.id,i]);return(0,a.useEffect)((()=>{t&&!c&&u()}),[c,u,t]),c?(0,p.jsx)(Ni.Y,{open:t,onClose:n,title:nI(r),maxWidth:"xs",submitText:"Change Configuration",renderConfirmationComponent:d,onSubmit:u}):null},aI=e=>{let{open:t,onClose:n,onSubmit:i,devicesWcs:r,targetQfbDeviceMode:l}=e;const{confirm:s}=(0,ie.o)(),{privileges:d}=(0,w.P)(),[c,u]=(0,a.useState)({}),h=(0,a.useCallback)((()=>{u((0,o.mapValues)((0,o.keyBy)(r,"id"),(()=>!0)))}),[r]);(0,a.useEffect)((()=>{t||h()}),[h,t]);const m=(0,a.useCallback)((e=>{u((t=>({...t,[e]:!t[e]})))}),[]),{confirmationRequired:g,qfbSharedDevicesCount:C,qfbIndividualDevicesCount:x}=(0,a.useMemo)((()=>{let e=!1,t=0,n=0;return(0,o.forEach)(r,(i=>{i.qfbDeviceMode&&(e||i.qfbDeviceMode===l||(e=!0),c[i.id]&&i.qfbDeviceMode===bi.Zb.SHARED&&(t+=1),c[i.id]&&i.qfbDeviceMode===bi.Zb.INDIVIDUAL&&(n+=1))})),{confirmationRequired:e,qfbSharedDevicesCount:t,qfbIndividualDevicesCount:n}}),[c,r,l]),f=(0,a.useMemo)((()=>l===bi.Zb.SHARED?x:C),[x,C,l]),b=l===bi.Zb.SHARED?bi.Zb.INDIVIDUAL:bi.Zb.SHARED,y=(0,a.useMemo)((()=>(0,o.keys)((0,o.pickBy)(c,(e=>e)))),[c]),j=(0,a.useMemo)((()=>!(0,o.isEmpty)(y)&&d.devices),[y,d.devices]),Z=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.accessor("id",{id:"name",header:()=>(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:(0,ul.sr)(r.length,"device")}),cell:e=>{let{getValue:t,row:n}=e;const i=n.original.qfbDeviceMode===b;return(0,p.jsx)(rI,{deviceId:t(),qfbDeviceMode:i?b:void 0,showModeChip:i})},size:200,enableSorting:!1}),e.display({id:"checkbox",size:40,cell:e=>{let{row:t}=e;const n=t.original.id;return(0,p.jsx)(Pi.Z,{checked:c[n],sx:{padding:0},onChange:()=>m(n)})}})]}),[r.length,b,c,m]),E=(0,sa.b7)({columns:Z,data:r,getCoreRowModel:(0,da.sC)(),getRowId:e=>e.id}),S="Re-enrollment requires ".concat(bi.RZ," managed services"),D=(0,a.useCallback)((e=>{let{onConfirmationValidChange:t}=e;return(0,p.jsx)(Gc,{onConfirmationValidChange:t,warningText:S,confirmationText:tI(l,f),linkHref:Be.IW.qfbDeviceModes})}),[l,f,S]),M=(0,a.useMemo)((()=>g&&0===f),[g,f]),[k,I]=(0,a.useState)(!1);(0,a.useEffect)((()=>{I(!1)}),[t]);const A=(0,a.useCallback)((async()=>{I(!0),await i(y)}),[y,i]);if((0,a.useEffect)((()=>{!t||g||k||s({message:"Apply configuration to ".concat(y.length," devices?"),onConfirm:A,onCancel:n})}),[s,g,y,A,n,t,k]),!g)return null;const R="".concat((0,ul.sr)(f,"device")," of ").concat(y.length," selected are in ").concat(bi.to[b]," Mode. The pending configuration uses ").concat(bi.to[l]," Mode."),T=l===bi.Zb.INDIVIDUAL&&f>0?"Factory Reset and Apply Configuration":"Apply Configuration";return(0,p.jsx)(eI,{maxWidth:"xs",title:nI(l,y.length),description:R,submitText:T,open:t,onClose:n,table:E,flexColumnIds:"name",renderConfirmationComponent:D,hideConfirmation:M,canSubmit:j,onSubmit:A,customDialogWidth:512})},rI=e=>{let{deviceId:t,qfbDeviceMode:n,showModeChip:i}=e;const o=(0,xo.ky)(S.F.Devices,t);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,width:1,children:[(0,p.jsx)(v.Z,{title:null===o||void 0===o?void 0:o.name,variant:"subtitle2",color:"text.secondary",noWrap:!0,children:null===o||void 0===o?void 0:o.name}),i&&(0,p.jsx)(mu,{qfbDeviceMode:n})]})};var lI=n(22321);const sI=(0,a.memo)((e=>{let{open:t,devicesWcs:n,onFactoryResetDialogClose:i}=e;const{privileges:r}=(0,w.P)(),{notifyThunkResult:l}=(0,ie.o)(),s=(0,u.I0)(),[d,c]=(0,a.useState)({}),[h,m]=(0,a.useState)(!1),g=(0,a.useCallback)((()=>{c((0,o.mapValues)((0,o.keyBy)(n,"id"),(()=>!0)))}),[n]);(0,a.useEffect)((()=>{t||(g(),m(!1))}),[t,g]);const C=(0,a.useCallback)((e=>{c((t=>({...t,[e]:!t[e]})))}),[]),x=(0,a.useMemo)((()=>(0,o.keys)((0,o.pickBy)(d,(e=>e)))),[d]),f=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.accessor("id",{id:"name",header:()=>(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:(0,ul.sr)(n.length,"device")}),cell:e=>{let{getValue:t}=e;return(0,p.jsx)(dI,{deviceId:t()})},size:100,enableSorting:!1}),e.display({id:"checkbox",size:40,cell:e=>{let{row:t}=e;const n=t.original.id;return(0,p.jsx)(Pi.Z,{checked:d[n],sx:{padding:0},onChange:()=>C(n)})}})]}),[d,n.length,C]),b=(0,sa.b7)({columns:f,data:n,getCoreRowModel:(0,da.sC)(),getRowId:e=>e.id}),y=(0,a.useMemo)((()=>(0,o.filter)(n,(e=>d[e.id]&&(null===e||void 0===e?void 0:e.model)&&bi.l_.has(null===e||void 0===e?void 0:e.model))).length),[d,n]),j=(0,o.some)(n,(e=>d[e.id]&&e.model&&bi.ty.has(e.model))),Z=(0,a.useMemo)((()=>!(0,o.isEmpty)(x)&&r.devices),[x,r.devices]),E=(0,a.useCallback)((async()=>
3{if(!Z)return;const e=await s((0,La.qJ)({deviceIds:x,action:"FACTORY_RESET_V2",wipeResetProtection:j&&h}));l({result:e,success:{message:"Factory Reset command sent"},error:{message:"Error sending Factory Reset command"}}),"fulfilled"===e.meta.requestStatus&&i&&i()}),[Z,x,s,l,i,j,h]),S=(0,a.useCallback)((e=>{let{onConfirmationValidChange:t}=e;return y>0?(0,p.jsx)(Gc,{onConfirmationValidChange:t,confirmationText:"I understand that all Meta Quest devices will need to re-enroll in ManageXR through the ".concat(bi.RZ," Admin Center to manage them again with ManageXR."),warningText:"Re-enrollment requires ".concat(bi.RZ," managed services"),linkHref:Be.IW.metaQuestReenrollment}):(0,p.jsx)(Li,{onConfirmationValidChange:t,confirmationText:"I understand that I will need to re-enroll ".concat((0,ul.Y8)(x.length)," ").concat((0,ul.n8)(x.length,"device")," to manage ").concat((0,ul.Gv)(x.length)," again with ManageXR.")})}),[y,x.length]);return(0,p.jsx)(eI,{maxWidth:"xs",title:"Factory Reset Device".concat(x.length>1?"s":""),description:"The factory reset command will send immediately to online devices. Offline devices will receive the command once they come online. You may cancel this action until the device receives it.",submitText:"Factory reset ".concat((0,ul.sr)(x.length,"device")),open:t,onClose:i,table:b,flexColumnIds:"name",renderConfirmationComponent:S,canSubmit:Z,onSubmit:E,children:j&&(0,p.jsx)(po.Z,{control:(0,p.jsx)(Pi.Z,{checked:h,onChange:e=>m(e.target.checked),sx:{padding:0,marginRight:1}}),label:"Also wipe factory-reset protection data"})})})),dI=e=>{let{deviceId:t}=e;const n=(0,xo.ky)(S.F.Devices,t);return(0,p.jsx)(v.Z,{title:null===n||void 0===n?void 0:n.name,variant:"subtitle2",color:"text.secondary",noWrap:!0,children:null===n||void 0===n?void 0:n.name})};var cI=n(8484),uI=n(29700),pI=n(61526),hI=n(9735),mI=n(74156),gI=n(9034),vI=n(76266),CI=n(69316),xI=n(65369),fI=n(74902),bI=n(92195),yI=n(46746),jI=n(84197),ZI=n(50989),wI=n(34553);const EI=(e,t)=>{if(t)return"Your organization administrators have disabled device streaming.";if(e.manufacturer===bi.p6.Oculus){if((0,Vr.wz)(e)<68)return"Remote screen streaming is not supported on Meta Quest devices on firmware versions below 68"}return null};var SI=n(92096),DI=n(84622);const MI=(0,a.memo)((e=>{var t;let{open:n,onClose:i,onSubmit:r}=e;const l=(0,X.u7)(),{allPrivileges:s,organizationId:d}=(0,w.P)(),c=(0,u.v9)((e=>e.device.selection.count)),h=(0,o.filter)(s,(e=>e.organizationRef.id!==d)),[g,x]=(0,a.useState)(l?d:null===(t=h[0])||void 0===t?void 0:t.organizationRef.id),f=(0,E.D)(S.F.Configurations,{organizationId:g,sort:ze.gt});return(0,p.jsx)(Ro.Q,{open:n,onClose:i,maxWidth:"sm",title:"Change ".concat((0,ul.n8)(c,"Device")," Organization"),rightActions:(0,p.jsx)(C.Z,{onClick:i,children:"Cancel"}),children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(v.Z,{variant:"body1",color:"textSecondary",children:["Select a new organization and configuration for"," ",(0,ul.sr)(c,"device")]}),(0,p.jsxs)(v.Z,{variant:"body1",color:"textSecondary",children:["The ",(0,ul.n8)(c,"device")," will sync to the new configuration the next time ",c>1?"they are":"it is"," ","online"]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsxs)(m.Z,{flexGrow:1,flexBasis:0,minWidth:0,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Organization"}),l?(0,p.jsx)(DI.M,{onChange:x}):(0,p.jsx)(ii.Z,{dense:!0,children:(0,o.map)(h,(e=>(0,p.jsx)(ee.Z,{title:e.privileges.devices?"":"Device privileges for ".concat(e.organizationProfile.name," required"),placement:"left",children:(0,p.jsx)("div",{style:{cursor:e.privileges.devices?"auto":"not-allowed"},children:(0,p.jsxs)(oi.Z,{onClick:()=>x(e.organizationRef.id),selected:e.organizationRef.id===g,disabled:!e.privileges.devices,"data-testid":"changeOrganization_organization",children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(SI.X,{size:"small",imageUrl:e.organizationProfile.imageUrl})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Ui.G,{title:e.organizationProfile.name,useTooltip:!0})})]})})},e.organizationRef.id)))})]}),(0,p.jsxs)(m.Z,{flexGrow:1,flexBasis:0,minWidth:0,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Configuration"}),f.fetched?(0,p.jsx)(ii.Z,{dense:!0,children:(0,o.map)(f.documents,(e=>(0,p.jsxs)(oi.Z,{onClick:()=>{g&&r(g,e.id)},"data-testid":"changeOrganization_configuration",children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Wl.Z,{})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Ui.G,{title:e.name,useTooltip:!0})})]},e.id)))}):(0,p.jsx)(Rn.Z,{sx:{marginY:3,marginX:2}})]})]})]})})}));var kI=n(4679);const II=(e,t)=>{const n=(0,Le.S5)(),i=(0,a.useMemo)((()=>new Set((0,o.map)(e,"id"))),[e]),{documents:r}
3=(0,E.D)(S.F.Apps,{filter:(0,a.useCallback)((e=>!n&&!!e.instantAppRef&&i.has(e.instantAppRef.id)),[n,i])});return(0,a.useMemo)((()=>{const n=[];if(!t)return n;for(const i of e){let e=i.deviceModelToReleaseChannelId[t];if(e||t!==bi.Q6.PicoNeo3Eye||(e=i.deviceModelToReleaseChannelId[bi.Q6.PicoNeo3]),e){const t=(0,o.find)(r,(t=>{var n;return(null===(n=t.releaseChannelRef)||void 0===n?void 0:n.id)===e}));t&&n.push(t)}}return n}),[t,r,e])},AI=e=>{let{items:t,disabled:n,onContentClicked:o,renderPrimaryText:a,renderSecondaryText:r}=e;return(0,p.jsx)(ii.Z,{dense:!0,children:t.map((e=>(0,p.jsxs)(oi.Z,{sx:{height:60},disabled:n,onClick:()=>o(e),"data-testid":"device_launchVRContentItem",children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:e.iconUrl,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:a?a(e):e.title,secondary:r?(0,p.jsx)(i.Z,{paddingLeft:2,children:(0,p.jsx)(v.Z,{variant:"body2",color:"grey.600",children:r(e)})}):void 0})]},e.id)))})},RI=(0,a.memo)((e=>{var t;let{onSubmit:n,apps:i,device:o,disabled:a,homeScreenId:r}=e;const l=null===o||void 0===o||null===(t=o.currentForegroundApp)||void 0===t?void 0:t.packageName;return(0,p.jsx)(AI,{items:i,disabled:a,renderPrimaryText:e=>e.instantAppRef?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(Ud.Z,{fontSize:"small",color:"disabled"}),(0,p.jsx)(v.Z,{variant:"body2",children:e.title})]}):(0,Vs.HB)(e)?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",gap:.5,children:[(0,p.jsx)(dg.q,{fontSize:"small",color:"disabled"}),(0,p.jsx)(v.Z,{variant:"body2",children:e.title})]}):e.title,renderSecondaryText:e=>e.packageName===l?"Currently playing":void 0,onContentClicked:e=>{e.id===r?n({homeScreen:!0}):e.instantAppRef?n({instantAppId:e.instantAppRef.id}):n({packageName:e.packageName})}})}));RI.displayName="DeviceLaunchVRContentApp";var TI=n(5019),PI=n(5773);const LI=e=>{var t,n;if(!(null===e||void 0===e||null===(t=e.currentForegroundApp)||void 0===t||!t.packageName)&&(null===e||void 0===e||null===(n=e.currentForegroundApp)||void 0===n?void 0:n.packageName.startsWith(Be.vc.configuration.launcherPackageNamePrefix)))return e.homeScreenState},NI=(0,a.memo)((e=>{let{text:t,playPauseIcon:n,disabled:i,onClick:o}=e;return(0,p.jsx)(C.Z,{startIcon:n,sx:{backgroundColor:"grey.200",width:1,"&:hover":{backgroundColor:"grey.300"},paddingY:1.5},onClick:o,disabled:i,children:t})})),UI=(0,a.memo)((e=>{let{disabled:t,videos:n,device:i,onPlayVideo:a,onPauseVideo:r,onResumeVideo:l}=e;const s=LI(i),d=null===s||void 0===s?void 0:s.viewDetails,c=null===d||void 0===d?void 0:d.videoId,u=c||!i;return(0,p.jsxs)(m.Z,{spacing:2,children:[u&&(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[(0,p.jsx)(NI,{text:"Resume Video",playPauseIcon:(0,p.jsx)(TI.Z,{}),disabled:t,onClick:l}),(0,p.jsx)(NI,{text:"Pause Video",playPauseIcon:(0,p.jsx)(PI.Z,{}),disabled:t,onClick:r})]}),(0,p.jsx)(AI,{items:n,disabled:t,onContentClicked:e=>{a(e.id,!0)},renderSecondaryText:e=>e.id!==c||(0,o.isNil)(null===d||void 0===d?void 0:d.videoState)?void 0:"Currently ".concat((0,o.lowerCase)(null===d||void 0===d?void 0:d.videoState))})]})})),FI=(0,a.memo)((e=>{var t;let{disabled:n,onLaunchURL:a,webxrApps:r}=e;const{register:l,handleSubmit:s,formState:d}=(0,fg.cI)(),c=s((e=>{let{url:t}=e;a(t)}));return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)("form",{onSubmit:c,noValidate:!0,children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"flex-start",children:[(0,p.jsx)(Ln.Z,{label:"URL",placeholder:"Enter a URL address...",fullWidth:!0,error:!!d.errors.url,helperText:null===(t=d.errors.url)||void 0===t?void 0:t.message,disabled:n,...l("url",{required:"Please enter a url",pattern:NS.qv})}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(Un.U,{onClick:c,disabled:n,children:"Send"})})]})}),!(0,o.isEmpty)(r)&&(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{textAlign:"center",color:"grey.400",children:"OR"}),(0,p.jsx)(AI,{items:r,disabled:n,onContentClicked:e=>{a(e.url)}})]})]})}));FI.displayName="DeviceLaunchVRContentWebXRLink";const OI=e=>{const t=(0,z.l)(S.F.Devices,e),n=null===t||void 0===t?void 0:t.userId,i=(0,z.l)(S.F.DeviceInstalledApps,n);return{loaded:(0,xo.ty)(S.F.DeviceInstalledApps,n),data:i}},_I="HOME_SCREEN",zI=(0,a.memo)((e=>{let{open:t,onCancel:n,configurationId:r,onLaunchApp:l,onLaunchURL:s,onPlayVideo:c,onPauseVideo:u,onResumeVideo:h,device:g,loading:x}=e;const b=(0,xo.ky)(S.F.Configurations,r),{buildOrganizationPath:y,organizationId:j}=(0,w.P)(),Z=(0,d.U5)(),D=(0,E.Ev)(S.F.Apps,(0,a.useMemo)((()=>(0,o.map)(null===b||void 0===b?void 0:b.approvedApps,"id")),[null===b||void 0===b?void 0:b.approvedApps])),M=(0,E.Ev)(S.F.Videos,(0,a.useMemo)((()=>(0,o.map)(null===b||void 0===b?void 0:b.approvedVideos,"id")),[null===b||void 0===b?void 0:b.approvedVideos]),{sort:ze.gA}),k=(0,E.Ev)(S.F.WebXRApps,(0,a.useMemo)((()=>(0,o.map)(null===b||void 0===b?void 0:b.approvedWebXRApps,"id")),[null===b||void 0===b?void 0:b.approvedWebXRApps]),{sort:ze.gA}),I=(0,E.Ev)(S.F.InstantApps,(0,a.useMemo)((()=>(0,o.map)(null===b||void 0===b?void 0:b.approvedInstantApps,"id")),[null===b||void 0===b?void 0:b.approvedInstantApps])),A=II(I,null===g||void 0===g?void 0:g.model),R=Id(),T=(0,a.useCallback)(((e,t)=>{N(t)}),[]),P=(0,a.useCallback)((()=>{n()}),[n]),[L,N]=(0,a.useState)("app"),U=(0,a.useMemo)((()=>({id:_I,title:"Home Screen",iconUrl:Be.vc.vrContent.defaultIconUrl,packageName:_I,organizationRef:(0,mp.J5)(j)})),[j]),{data:F}=OI(null===g||void 0===g?void 0:g.id),O=(0,a.useMemo)((()=>(0,o.some)((0,o.keys)(F),(e=>e.startsWith(Be.vc.configuration.launcherPackageNamePrefix)))),[F]),_=Z&&((null===b||void 0===b?void 0:b.deviceExperienceMode)===vp.w_.HomeScreen||(null===g||void 0===g?void 0:g.qfbDeviceMode)===bi.Zb.INDIVIDUAL&&O),z=(0,a.useMemo)((()=>{const e=!g,t=(0,o.map)(null===b||void 0===b?void 0:b.approvedInstantApps,"id"),n=(0,o.chain)(R).pick(t).values().flatMap("apps").uniqBy("instantAppRef.id").value();return[...D,...e?n:A].sort(ze.gA)}),[D,null===b||void 0===b?void 0:b.approvedInstantApps,g,A,R]),B=(0,a.useMemo)((()=>_?[...z,U]:[...z]),[z,U,_]),W=(0,a.useMemo)((()=>({app:{label:"APP",component:(0,p.jsx)(RI,{onSubmit:l,apps:B,device:g,disabled:x,homeScreenId:_I}
3),collection:S.F.Apps,showNoContentConfiguredMessage:(0,o.isEmpty)(B),pluralLabel:"apps"},webxr:{label:"WEBXR LINK",component:(0,p.jsx)(FI,{webxrApps:k,disabled:x,onLaunchURL:s}),collection:S.F.WebXRApps,showNoContentConfiguredMessage:(0,o.isEmpty)(k),forceShowComponent:!0,pluralLabel:"WebXR Links"},video:{label:"VIDEO",component:(0,p.jsx)(UI,{videos:M,device:g,disabled:x,onPlayVideo:c,onPauseVideo:u,onResumeVideo:h}),collection:S.F.Videos,showNoContentConfiguredMessage:(0,o.isEmpty)(M),pluralLabel:"videos"}})),[l,B,g,x,k,s,M,c,u,h]),V=(0,a.useMemo)((()=>W[L]),[L,W]);return(0,p.jsxs)(kn.Z,{open:t,maxWidth:"sm",fullWidth:!0,onClose:()=>!x&&n(),children:[(0,p.jsx)(i.Z,{position:"relative",display:"flex",flexGrow:1,height:4,children:x&&(0,p.jsx)(Rn.Z,{sx:{position:"absolute",width:1}})}),(0,p.jsx)(In.Z,{children:"Select VR Content to Launch"}),(0,p.jsxs)(An.Z,{children:[(0,p.jsx)(wf.Z,{value:L,onChange:T,variant:"fullWidth",children:(0,o.map)(W,((e,t)=>(0,p.jsx)(Yn.Z,{value:t,label:e.label,disabled:x,sx:e=>({"&:hover":{backgroundColor:"".concat(e.palette.grey[100]," !important")}}),"data-testid":"device_launchVRContentTab_".concat(t)},t)))}),(0,p.jsx)(m.Z,{paddingTop:2.5,children:(0,o.isNil)(b)?(0,p.jsx)(m.Z,{padding:4,flexGrow:1,justifyContent:"center",alignItems:"center",children:(0,p.jsx)(Zi.Z,{})}):(0,p.jsxs)(m.Z,{spacing:2,children:[(V.forceShowComponent||!V.showNoContentConfiguredMessage)&&(0,p.jsxs)(p.Fragment,{children:[" ",V.component," "]}),V.showNoContentConfiguredMessage&&(0,p.jsx)(i.Z,{children:(0,p.jsxs)(v.Z,{children:[(0,p.jsx)(Kn.Z,{component:f.rU,to:y((e=>e.configurations.configuration[V.collection]),{configurationId:b.id}),children:b.name})," ","has no ",V.pluralLabel," configured."]})})]})})]}),(0,p.jsx)(Pn.Z,{children:(0,p.jsx)(m.Z,{flexGrow:1,children:(0,p.jsx)(C.Z,{sx:{alignSelf:"flex-start",justifySelf:"flex-start"},disabled:x,onClick:P,children:"Cancel"})})})]})})),BI=(0,a.memo)((e=>{let{open:t,onClose:n,onConfirm:i}=e;return(0,p.jsx)(kn.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"xs",children:(0,p.jsxs)(m.Z,{minWidth:100,children:[(0,p.jsx)(In.Z,{children:"Volume Warning"}),(0,p.jsx)(An.Z,{children:(0,p.jsx)(Tn.Z,{children:"A loud sound will be played which could be uncomfortable to anyone currently in-headset. Do not play sound while a device is in use."})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:n,children:"Cancel"}),(0,p.jsx)(C.Z,{onClick:i,variant:"contained",children:"Play Sound"})]})]})})}));var WI=n(89673),VI=n(55818),GI=n(3721),HI=n(65370);const qI=e=>{let{title:t,body:n}=e;const[i,o]=(0,a.useState)(!1);return(0,p.jsxs)(WI.Z,{expanded:i,onChange:()=>{o(!i)},sx:{"&.Mui-expanded":{margin:0},"&:before":{opacity:0}
3},children:[(0,p.jsxs)(VI.Z,{expandIcon:i?(0,p.jsx)(HI.Z,{}):(0,p.jsx)(Wn.Z,{}),sx:{position:"relative",height:52,padding:0,"&.Mui-expanded":{minHeight:"unset"}},children:[(0,p.jsx)(Ie.Z,{sx:{position:"absolute",top:0,left:0,width:1}}),(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:t})]}),(0,p.jsx)(GI.Z,{sx:{padding:0,paddingBottom:3},children:n})]})};qI.displayName="UIFaqAccordion";const YI=e=>{let{items:t,ordered:n=!1,tooltip:o=!1,contentVariant:a=(o?"caption":"body2")}=e;const r=o?"white":"text.secondary",l=o?"white":"text.primary",s=o?"caption":"subtitle2",d=o?{color:"white",textDecoration:"underline"}:void 0;return(0,p.jsx)(i.Z,{component:n?"ol":"ul",sx:{padding:0,margin:0,paddingLeft:3},children:t.map(((e,t)=>(0,p.jsxs)(v.Z,{component:"li",variant:a,color:r,children:[e.title&&(0,p.jsx)(v.Z,{component:"span",variant:s,color:l,sx:{fontWeight:o?y.$4:void 0},children:e.title}),e.title&&" - ",e.content,e.learnMoreLink&&(0,p.jsxs)(p.Fragment,{children:[" ",e.learnMoreLink.parentheses&&"(",(0,p.jsx)(li.Q,{href:e.learnMoreLink.url,sx:d,children:e.learnMoreLink.title||"Learn more"}),e.learnMoreLink.parentheses&&")"]})]},t)))})};YI.displayName="UITextList";const KI=["Meta devices previously enrolled with the Device Setup Tool are considered legacy and won't get access to the latest features available through Meta Horizon managed services (MHMS), like improved casting, remote power off, and account-free Shared Mode.","Migrating a legacy device to MHMS is a zero-touch process\u2014no factory reset required. To migrate, your MHMS org must have available licenses and devices must be on Meta firmware v76+. "],XI=[{title:"What is a legacy device?",body:(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["Meta devices previously enrolled through the Device Setup Tool are considered legacy devices. ManageXR will continue to support legacy Meta devices, but legacy devices won't get access to all the new features that come with ManageXR's integration with Meta Horizon managed services."," ",(0,p.jsx)(li.Q,{href:Be.IW.legacyMetaVsMHMS,children:"Learn more about legacy Meta devices"})]})},{title:"Why migrate to MHMS?",body:(0,p.jsx)(YI,{items:[{title:"Access to new features",content:"Devices on Meta Horizon managed services will get access to the latest features that become available through ManageXR's integration with Meta. This includes a better casting experience, the remote Power Off command, setting System Language, and more.",learnMoreLink:{title:"Learn about feature differences",url:Be.IW.legacyMetaVsMHMS}},{title:"Account free device use",content:"By migrating to MHMS and using Shared Mode, you can use devices account free. This eliminates some occasional pesky issues with using consumer Meta accounts and test users (e.g, the need to re-authenticate with an 8 digit code)."},{title:"Support from Meta",content:"Meta has dedicated resources to supporting devices using MHMS. This makes it faster to resolve issues and make improvements to the experience."}]})},{title:"Preparing for migration",body:(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"In order to migrate, you will need the following:"}),(0,p.jsx)(YI,{items:[{title:"MHMS licenses",content:"An active Meta Horizon managed services account with enough licenses for the devices you're migrating.",learnMoreLink:{url:Be.IW.howToStartMHMSSubscription}},{title:"Minimum firmware version",content:"Devices must be on Meta firmware v76 or above to migrate.",learnMoreLink:{title:"Tips for upgrading firmware",url:Be.IW.firmwareSettingsOculus}},{title:"Configuration requirements",content:"The configuration applied to your device must use a Restricted Kiosk device experience like the custom Home Screen, Kiosk App, or Kiosk Video."}]})]})}
3,{title:"How it works",body:(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"To migrate you will:"}),(0,p.jsx)(YI,{items:[{content:"Enter your Meta Horizon managed services Organization ID"},{content:"Verify your device meets the requirements to migrate"},{content:"Confirm you want to migrate your device"}],ordered:!0})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"From there, migration is automatic - it does not require a factory reset or re-enrollment. Your device will show Pending Migration until it has come online and migrated successfully."}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"Once migrated, the device will:"}),(0,p.jsx)(YI,{items:[{content:"Appear on your Meta Horizon managed services account automatically (no factory reset and re-enrollment needed)"},{content:"Gain access to new settings available on MHMS devices only"},{content:"Use the updated MHMS experience",learnMoreLink:{title:"Shared Mode",url:Be.IW.qfbSharedMode,parentheses:!0}},{content:"Stay on its current configuration"}]})]})]})},{title:"Limitations",body:(0,p.jsx)(YI,{items:[{title:"Only Shared Mode",content:"Devices can only zero-touch migrate into Shared Mode. To use a device in Individual Mode, you will need to factory reset and re-enroll it.",learnMoreLink:{title:"Learn more about Meta Horizon managed services device modes",url:Be.IW.qfbDeviceModes}},{title:"No Meta Store Apps",content:"Apps downloaded directly from the Meta Horizon Store and used as External Apps will be removed from the device when it migrates. Migrating removes the consumer account from the device responsible for purchasing the apps."},{title:"Once migrated, it's not reversible",content:"You will not be able to convert your device back to your legacy experience once it is on MHMS."}]})}],QI=e=>{let{open:t,onClose:n,onGetStarted:i}=e;return(0,p.jsx)(Ro.Q,{open:t,onClose:n,customDialogWidth:660,title:(0,p.jsxs)(v.Z,{variant:"h4",color:"primary.main",children:[(0,p.jsx)(bI.Z,{sx:{fontSize:"1.2em",transform:"translateY(6px)"}}),"\xa0","Migrate your legacy device to Meta Horizon managed services"]}),rightActions:(0,p.jsx)(C.Z,{variant:"contained",color:"primary",onClick:i,children:"Get Started"}),children:(0,p.jsxs)(m.Z,{spacing:4,minHeight:500,children:[(0,p.jsx)(m.Z,{spacing:2,children:KI.map(((e,t)=>(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",children:e},t)))}),(0,p.jsx)(m.Z,{paddingX:7.5,children:XI.map(((e,t)=>(0,p.jsx)(qI,{title:e.title,body:e.body},t)))})]})})};QI.displayName="DeviceDialogQfbMigrationFaq";var JI=n(94294);const $I=e=>{var t;let{open:n,onClose:r,devicesWcs:l,onSubmit:s}=e;const{notify:d}=(0,ie.o)(),c=(0,a.useMemo)((()=>(0,o.filter)(l,Vr.YS)),[l]),u=(0,If.Y)((()=>{const{organizationId:e}=(0,w.P)(),t=id();return(0,a.useMemo)((()=>{if(t&&(0,o.isEmpty)(t.configRefs))return;const n=S.F.DeviceWebConsoleSettings,i=(0,Os.N$)(n),a=(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,e)),r=(0,td.ar)("model","in",Array.from(bi.l_));if(t){const l=Math.floor(nd.ps/bi.l_.size),s=(0,o.chunk)(t.configRefs,l);return{id:(0,nd.tc)({collection:n,organizationId:e,filter:"qfbCapable:configs:".concat(t.configurationIds.join(","))}),query:(0,o.map)(s,(e=>(0,td.IO)(i,a,r,(0,td.ar)("deviceGroupRef","in",e))))}}return{id:(0,nd.tc)({collection:n,organizationId:e,filter:"qfbCapable"}),query:(0,td.IO)(i,a,r)}}),[t,e])})()),h=(0,a.useMemo)((()=>{if(!u)return[];const e=[];return u.forEach((t=>{(0,Vr.YS)(t)&&e.push(t)})),e}),[u]),[g,C]=(0,a.useState)(!1),x=g?h:c,f=(e=>{const{documentsById:t}=(0,E.D)(S.F.Configurations),{documentsById:n}=(0,E.D)(S.F.Apps),i=(0,a.useCallback)((e=>{const i=t[e.deviceGroupRef.id],a=(0,o.pick)(n,(0,o.map)(null===i||void 0===i?void 0:i.approvedApps,"id")),r=e.firmwareVersion?(0,Vs.Wp)(e.firmwareVersion,"76.0.0")>=0:void 0,l=i?!(0,o.some)(a,Vs.n$):void 0,s=i?i.deviceExperienceMode!==vp.w_.Default:void 0;return{deviceWcs:e,status:e.vendorMigrationPending?"pending":void 0===r||void 0===l||void 0===s?void 0:r&&l&&s?"ready":"notReady",firmwareUpToDate:r,noExternalApps:l,sharedMode:s}}),[t,n]);return(0,a.useMemo)((()=>(0,o.keyBy)((0,o.map)(e,i),"deviceWcs.id")),[e,i])})(x),[b,y]=(0,a.useState)({}),j=(0,a.useCallback)((()=>{y((0,o.mapValues)(f,(e=>"ready"===e.status)))}),[f]);(0,a.useEffect)((()=>{n||(C(!1),j())}),[j,n]);const Z=(0,a.useCallback)((()=>{C(!0)}),[]),D=(0,a.useCallback)((e=>{y((t=>({...t,[e]:!t[e]})))}),[]),M=(0,a.useMemo)((()=>(0,o.keys)((0,o.pickBy)(b,(e=>e)))),[b]),k=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.accessor("deviceWcs.id",{id:"name",header:()=>(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:(0,ul.sr)(x.length,"device")}),cell:e=>{let{getValue:t}=e;return(0,p.jsx)(eA,{deviceId:t()})},size:200,enableSorting:!1}),e.display({id:"firmware",header:()=>(0,p.jsx)(m.Z,{direction:"row",justifyContent:"center",width:1,children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",children:"Firmware"})}),cell:e=>{let{row:t}=e;return(0,p.jsx)(tA,{firmwareUpToDate:t.original.firmwareUpToDate})},size:120}
3),e.display({id:"configuration",header:()=>(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",textAlign:"center",width:1,children:"Configuration"}),cell:e=>{let{row:t}=e;return(0,p.jsx)(nA,{noExternalApps:t.original.noExternalApps,sharedMode:t.original.sharedMode})},size:120}),e.accessor("status",{id:"status",header:()=>(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",textAlign:"center",width:1,children:"Status"}),cell:e=>{let{getValue:t}=e;return(0,p.jsx)(iA,{status:t()})},size:90}),e.display({id:"checkbox",size:40,cell:e=>{let{row:t}=e;const n=t.original.deviceWcs.id;return"pending"===t.original.status||void 0===t.original.status?(0,p.jsx)(Zi.Z,{size:20,sx:{marginLeft:.25}}):(0,p.jsx)(Pi.Z,{checked:b[n],sx:{padding:0},onChange:()=>D(n),disabled:"notReady"===t.original.status})}})]}),[b,D,x.length]),I=(0,sa.b7)({columns:k,data:(0,o.values)(f),getRowId:e=>e.deviceWcs.id,initialState:{sorting:[{id:"status",desc:!0}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),A=h.length-c.length,R=(0,a.useMemo)((()=>g||A<=0?[]:[{render:e=>{let{key:t,style:n,registerChild:o}=e;return(0,p.jsx)(i.Z,{style:n,ref:o,display:"flex",justifyContent:"center",alignItems:"center",paddingY:1,borderTop:e=>"1px solid ".concat(e.palette.grey.A100),children:(0,p.jsxs)(Kn.Z,{component:"button",variant:"body2",onClick:Z,sx:{cursor:"pointer"},children:["Load all"," ",(0,ul.sr)(A,"remaining legacy device")]})},t)},height:60}]),[g,A,Z]),{enrollmentConfig:T}=Ii(),{request:P}=Ti(),[L,N,U]=(0,zn.G)(null!==(t=null===T||void 0===T?void 0:T.vendorOrganizationId)&&void 0!==t?t:"",1e3),F=L!==(null===T||void 0===T?void 0:T.vendorOrganizationId);(0,a.useEffect)((()=>{T&&N!==T.vendorOrganizationId&&P({params:{enrollmentConfigId:T.id},data:{vendorOrganizationId:N},errorMessage:"Failed to update organization ID",onError:()=>{var e;U(null!==(e=T.vendorOrganizationId)&&void 0!==e?e:"")}})}),[P,N,T,U]);const O=(0,a.useMemo)((()=>{const e=(0,o.every)(M,(e=>{const t=f[e];return"ready"===(null===t||void 0===t?void 0:t.status)}));return M.length>0&&!F&&!(null===T||void 0===T||!T.vendorOrganizationId)&&e}),[M,F,null===T||void 0===T?void 0:T.vendorOrganizationId,f]),_=(0,a.useCallback)((async()=>{null!==T&&void 0!==T&&T.vendorOrganizationId?await s({deviceIds:M,companyId:T.vendorOrganizationId}):d({message:"Please enter your MHMS organization ID",severity:"error"})}),[null===T||void 0===T?void 0:T.vendorOrganizationId,s,M,d]);return(0,p.jsx)(eI,{customDialogWidth:670,open:n,onClose:r,title:"Select Devices for Migration",description:"You have ".concat((0,ul.sr)(h.length,"legacy Quest device")," total in this organization. Select the devices you want to migrate below."),submitText:"Migrate ".concat((0,ul.sr)(M.length,"Device")),table:I,flexColumnIds:"name",extraRows:R,canSubmit:O,onSubmit:_,children:(0,p.jsxs)(m.Z,{spacing:1.5,paddingRight:20,paddingTop:3,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Enter your MHMS Organization ID"}),(0,p.jsx)(ci,{helpText:"Enter the organization id of your Meta Horizon managed services account. You must already have an MHMS account with sufficient licenses for the devices you plan to migrate.",linkText:"Learn how to find your MHMS organization ID",url:Be.IW.howToMigrateLegacyDevice})]}),(0,p.jsxs)(i.Z,{sx:{position:"relative",marginRight:20},children:[(0,p.jsx)(Ul.z,{label:"Organization ID",placeholder:"Enter your organization ID...",value:L,onChange:e=>U(e.target.value),sx:{width:"100%","& .MuiInputBase-root":{paddingRight:"60px"}}}),(0,p.jsx)(i.Z,{sx:{position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",zIndex:1},children:(0,p.jsx)(Gi,{isPending:F})})]})]})})},eA=e=>{let{deviceId:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),i=(0,xo.ky)(S.F.Devices,t);return(0,p.jsx)(Kn.Z,{component:Xc,to:n((e=>e.devices.device),{deviceId:t}),title:null===i||void 0===i?void 0:i.name,variant:"body2",color:"primary.main",noWrap:!0,target:"_blank",children:null===i||void 0===i?void 0:i.name})},tA=e=>{let{firmwareUpToDate:t}=e;return(0,p.jsx)(m.Z,{width:1,direction:"row",justifyContent:"center",children:void 0===t?(0,p.jsx)(Zi.Z,{size:16}):t?(0,p.jsx)(Vi.Z,{color:"success"}):(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:"below v76"})})},nA=e=>{let{noExternalApps:t,sharedMode:n}=e;const i=(0,a.useMemo)((()=>
3{if(void 0===t||void 0===n)return[];const e=[];return t||e.push({title:"Remove store apps",content:"Your configuration uses External Apps (likely purchased from the Meta Horizon Store). Remove store apps from your configuration to acknowledge that you understand they will be wiped when you migrate to MHMS.",learnMoreLink:{url:Be.IW.addExternalApps}}),n||e.push({title:"Shared Mode is required",content:"The configuration applied to your device currently uses Default Device Menus. To use zero touch migration, apply a Shared Mode compatible device experience like the custom Home Screen, Kiosk App, or Kiosk Video.",learnMoreLink:{url:Be.IW.qfbDeviceModes}}),e}),[t,n]);return(0,p.jsx)(m.Z,{width:1,direction:"row",justifyContent:"center",alignItems:"center",spacing:.5,children:void 0===t||void 0===n?(0,p.jsx)(Zi.Z,{size:16}):0===i.length?(0,p.jsx)(Vi.Z,{color:"success"}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:(0,ul.sr)(i.length,"issue")}),(0,p.jsx)(ee.Z,{title:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"white",children:(0,ul.sr)(i.length,"issue")}),(0,p.jsx)(YI,{items:i,tooltip:!0})]}),placement:"right-start",disableInteractive:!1,children:(0,p.jsx)(JI.Z,{color:"action",sx:{fontSize:16}})})]})})},iA=e=>{let{status:t}=e;return(0,p.jsx)(m.Z,{width:1,direction:"row",justifyContent:"center",children:void 0===t?(0,p.jsx)(Zi.Z,{size:16}):"pending"===t?(0,p.jsx)(ke.Z,{sx:{height:"unset",color:"white",backgroundColor:"warning.dark"},size:"small",label:(0,p.jsx)(v.Z,{variant:"caption",children:"Pending"})}):"ready"===t?(0,p.jsx)(ke.Z,{sx:{height:"unset",color:"white",backgroundColor:"success.dark"},size:"small",label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.25,children:[(0,p.jsx)(Vi.Z,{color:"inherit",sx:{fontSize:16}}),(0,p.jsx)(v.Z,{variant:"caption",children:"Ready"})]})}):(0,p.jsx)(ke.Z,{sx:{height:"unset",color:"white",backgroundColor:"grey.800"},size:"small",label:(0,p.jsx)(v.Z,{variant:"caption",children:"Not Ready"})})})};$I.displayName="DeviceDialogQfbMigrationSelection";const oA=(0,a.memo)((e=>{let{open:t,onClose:n,onRemoveWifiNetwork:i}=e;const o=(0,a.useCallback)((()=>{n()}),[n]),[r,l]=(0,a.useState)(),s=e=>!e||e.length<=32&&e.length>=2;return(0,p.jsxs)(kn.Z,{open:t,maxWidth:"sm",fullWidth:!0,onClose:()=>n(),children:[(0,p.jsx)(In.Z,{children:"Remove Wi-Fi Network"}),(0,p.jsxs)(An.Z,{children:[(0,p.jsx)(Tn.Z,{children:"Enter the SSID of the Wi-Fi network to forget. If this network is on your configuration, you must also remove it from your configuration to permanently forget it."}),(0,p.jsx)(Ln.Z,{placeholder:"SSID",label:"SSID",fullWidth:!0,error:!s(r),helperText:!s(r)&&"SSID must be between 2 and 32 characters.",onChange:e=>l(e.target.value)})]}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:o,children:"Cancel"}),(0,p.jsx)(Un.U,{onClick:()=>{r&&(i(r),n())},disabled:!r||!s(r),children:"Remove Wi-Fi Network"})]})]})})),aA="RUN_NETWORK_TEST",rA=(0,a.memo)((e=>{let{open:t,numDevices:n,numDevicesRequireForceSync:i,submitting:o,onClose:a,onSubmit:r}=e;const l=n>1,[s,d]=l?["Send Bulk Sync Command","Send sync command to ".concat(n," devices? ").concat(i," out of the ").concat(n," devices are on configurations with content updates scheduled. Sending this command will force the device to update its content immediately when online, rather than adhering to its configuration.")]:["Force Sync to Override Sync Schedule","This device is on a configuration with content updates scheduled. Sending a sync command will force the device to update its content immediately when online, rather than adhering to its configuration."];return(0,p.jsxs)(kn.Z,{open:t,onClose:a,fullWidth:!0,maxWidth:"xs",children:[(0,p.jsx)(In.Z,{children:s}),(0,p.jsx)(An.Z,{children:(0,p.jsx)(Tn.Z,{children:d})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:a,children:"Cancel"}),(0,p.jsx)(Un.U,{onClick:r,submitting:o,children:"Force Sync"})]})]})}));rA.displayName="DeviceDialogForceSync";const lA="No devices are selected. Please select at least one device in order to launch VR content",sA=(0,a.memo)((e=>{var t,n;let{devicesWcs:r,isBulkMode:s=!1}=e;const h=(0,u.I0)(),g=(0,l.k6)(),{notifyThunkResult:v,confirm:C,notify:x}=(0,ie.o)(),{setOrganization:f,allPrivileges:b,privileges:y}=(0,w.P)(),j=(0,X.u7)(),Z=(0,X.JW)(),E=(0,X.bo)(),D=(0,d.U5)(),M=(0,d.P)("xrhealth"),{organization:k}
3=(0,d.mP)(),{startStream:I}=gk(),A=(0,Le.ye)("enableValidateFileIntegrityCommand"),R=(0,d.P)("FORCE_ENABLE_GET_LOGS_COMMAND"),T=(0,d.P)("CAN_SEND_VALIDATE_FILE_INTEGRITY"),P=A||T||E,L=(0,d.P)("CAN_SEND_CLEAR_DOWNLOAD_CACHE")||j||Z,N=(0,Le.ye)("hideLockScreenPasscode"),U=(0,Le.ye)("enableTutorialModeRevamp"),F=(0,d.P)("ENABLE_ANDROID_XR_EMM"),[O,_]=(0,a.useState)(!1),B=(0,a.useMemo)((()=>(0,o.map)(r,"id")),[r]),W=(0,o.size)(B),V=!(0,o.isEmpty)(B),G=!V&&s,H=(0,o.some)(r,(e=>!!e.qfbDeviceMode)),q=(0,u.v9)((e=>B.map((t=>e.firestore.data.devices.data[t])).filter(Boolean))),Y=(e=>(0,a.useMemo)((()=>{const t=(0,o.chain)(e).map((e=>e.deviceGroupRef.id)).compact().uniq().value();return 1===t.length?t[0]:void 0}),[e]))(r),K=(0,z.l)(S.F.Devices,1===W?B[0]:void 0),{canRunNetworkTest:Q,runNetworkTest:J}=(e=>{const t=(0,u.I0)(),{notifyThunkResult:n}=(0,ie.o)(),{privileges:i}=(0,w.P)(),r=(0,d.P)("ENABLE_DEVICE_NETWORK_TEST")&&!!i.devices&&!!e,l=(0,a.useCallback)((async()=>{if(!e)return;const i=Yu[aA],a=await t((0,La.qJ)({deviceIds:[e],action:aA}));n({result:a,success:{message:"".concat((0,o.capitalize)(i)," command sent")},error:{message:"Error sending ".concat((0,o.lowerCase)(i)," command"),action:{title:"Retry",onClick:l}}})}),[e,t,n]);return(0,a.useMemo)((()=>({canRunNetworkTest:r,runNetworkTest:l})),[r,l])})(1!==W||s?void 0:B[0]),[$,ee]=(0,a.useState)(null),te=(0,a.useCallback)((async(e,t)=>{W>1?C({message:e,onConfirm:t}):await t()}),[C,W]),ne=(0,u.v9)((e=>{var t;return!(0,o.isEmpty)((0,o.intersection)(null===(t=e.device.pendingOperation)||void 0===t?void 0:t.deviceIds,B))})),oe=(0,a.useCallback)((async(e,t)=>{const n=Yu[e];if(!V)return;const i=await h((0,La.qJ)({deviceIds:B,action:e,data:t}));v({result:i,success:{message:"".concat((0,o.capitalize)(n)," command sent")},error:{message:"Error sending ".concat((0,o.lowerCase)(n)," command"),action:{title:"Retry",onClick:()=>oe(e,t)}}})}),[B,h,V,v]),ae=(0,a.useCallback)((async e=>{$&&await oe($.action,{level:e})}),[$,oe]),[re,le]=(0,a.useState)(!1),[se,de]=(0,a.useState)(!1),ce=(0,a.useCallback)((()=>{le(!0)}),[]),ue=(0,a.useCallback)((()=>{le(!1)}),[]),pe=(0,Le.ye)("enableQfbMigration"),he=(0,a.useMemo)((()=>(0,o.some)(r,(e=>e.model&&bi.l_.has(e.model)&&!e.isQfbDevice))),[r]),[me,ge]=(0,a.useState)(!1),[ve,Ce]=(0,a.useState)(!1),xe=(0,a.useCallback)((()=>{ge(!0)}),[]),fe=(0,a.useCallback)((()=>{ge(!1),Ce(!0)}),[]),be=(0,a.useCallback)((()=>{ge(!1)}),[]),ye=(0,a.useCallback)((()=>{Ce(!1)}),[]),{request:je}=(0,Fe.pv)({method:"post",path:"devices/migrate-to-qfb"}),Ze=(0,a.useCallback)((async e=>{await je({data:e,errorMessage:"Failed to send migration command",successMessage:"Migration command sent"}),Ce(!1)}),[je]),we=(0,a.useCallback)((async()=>{if(!V)return void x({message:"No devices to launch home screen",severity:"error"});const e=await h((0,La.a3)({deviceIds:B}));v({result:e,success:{message:"Launch app command".concat(W>1?"s":""," sent")},error:{message:"Error sending launch app command",action:{title:"Retry",onClick:()=>we()}}})}),[V,h,B,v,W,x]),Ee=(0,a.useCallback)((async e=>{let{packageName:t,instantAppId:n,homeScreen:i}=e;W?(_(!0),await te("Launch app on ".concat(W," devices?"),(async()=>{n?await oe("LAUNCH_INSTANT_APP",{instantAppId:n}):t?await oe("LAUNCH_APP",{packageName:t}):i&&await we()})),_(!1),$e(!1)):x({message:lA,severity:"error"})}),[W,te,x,oe,we]),Se=(0,a.useCallback)((async e=>{W?(_(!0),await te("Launch WebXR Link on ".concat(W," devices?"),(async()=>{await oe("LAUNCH_WEB_URL",{url:e})})),_(!1),$e(!1)):x({message:lA,severity:"error"})}),[W,te,x,oe]),De=(0,a.useCallback)((async()=>{oe("PLAY_SOUND"),de(!1)}),[oe]),Me=(0,a.useCallback)((async(e,t)=>{W?(_(!0),await te("Play video on ".concat(W," devices?"),(async()=>{await oe("PLAY_VIDEO",{videoId:e,playFromBeginning:t})})),_(!1),t&&$e(!1)):x({message:lA,severity:"error"})}),[te,W,x,oe]),ke=(0,a.useCallback)((async()=>{W?(_(!0),await te("Pause video on ".concat(W," devices?"),(async()=>{await oe("PAUSE_VIDEO")})),_(!1)):x({message:lA,severity:"error"})}),[te,W,x,oe]),Ae=(0,a.useCallback)((async()=>{W?(_(!0),await te("Resume video on ".concat(W," devices?"),(async()=>{await oe("RESUME_VIDEO")})),_(!1)):x({message:lA,severity:"error"})}),[te,W,x,oe]),Re=(0,a.useCallback)((async e=>{W?await te("Remove Wi-Fi Network from ".concat(W," devices?"),(async()=>{await oe("REMOVE_WIFI_NETWORK",{ssid:e})})):x({message:lA,severity:"error"})}),[te,W,x,oe]),[Te,Pe]=(0,a.useState)(!1),Ne=(0,a.useCallback)((()=>{Ge(void 0),qe(void 0),Pe(!1)}),[]),Ue=(0,a.useCallback)(((e,t,n)=>{f(n),1===e&&g.push((0,c.LT)(c._j.organization.devices.device,{organizationId:n,deviceId:t[0]}))}),[g,f]),[Oe,_e]=(0,a.useState)(),ze=(0,a.useCallback)((async(e,t,n)=>{if(!V)return;const i=await h((0,La.e)({deviceIds:n,targetOrganizationId:e,targetConfigurationId:t}));"rejected"===i.meta.requestStatus&&i.payload===Fe.Xt.DeviceLimitExceeded?_e({configurationId:t,numDevices:n.length}):v({result:i,success:{message:"Device ".concat((0,ul.n8)(W,"organization")," changed"),action:{title:"View ".concat((0,ul.n8)(W,"Device")),onClick:()=>Ue(W,n,e)}},error:{message:"Error changing device organization"}})}),[V,h,v,W,Ue]),Be=(0,o.size)(b)>1||j,We=(0,a.useCallback)((()=>{Pe(!0)}),[]),[Ve,Ge]=(0,a.useState)(),[He,qe]=(0,a.useState)(),Ye=(0,a.useCallback)(((e,t)=>{qe(e),Ge(t),Pe(!1)}),[]),Ke=(0,a.useCallback)((async e=>{e&&He&&Ve&&(Ge(void 0),qe(void 0),await ze(He,Ve,e))}),[ze,Ve,He]),Xe=(0,a.useCallback)((async()=>{const e=await h((0,La.tz)({deviceIds:B}));v({result:e,success:{message:"Device".concat(W>1?"s":""," deleted")},error:{message:"Error deleting device".concat(W>1?"s":"")}})}),[h,v,B,W]),Qe=Bn({onConfirm:Xe,title:"Delete device".concat(W>1?"s":""),getMessage:()=>{var e,t;return"Are you sure you want to delete ".concat(W>1?W+" devices":null!==(e=null===(t=q[0])||void 0===t?void 0:t.name)&&void 0!==e?e:"","?")},ConfirmationInputProps:{confirmationText:W>1?W.toString():null!==(t=null===(n=q[0])||void 0===n?void 0:n.name)&&void 0!==t?t:"",TextFieldProps:{helperText:W>1?"Type the number of devices to confirm and delete":"Type the device name to confirm and delete",label:W>1?"Number of Devices":"Device Name"}}}),[Je,$e]=(0,a.useState)(!1),et=(0,a.useCallback)((()=>{$e(!0)}),[]),tt=(0,a.useCallback)((()=>{$e(!1)}),[]),[nt,it]=(0,a.useState)(!1),ot=(0,u.v9)((e=>e.firestore.data.deviceGroups.data)),at=(0,a.useMemo)((()=>U&&(0,o.some)(r,(e=>{var t;return!(null!==(t=ot[e.deviceGroupRef.id])&&void 0!==t&&t.tutorialAppRef)}))),[r,ot,U]),rt=(0,a.useMemo)((()=>(0,o.sumBy)(r,(e=>{const t=ot[e.deviceGroupRef.id];return(0,wp.Gp)(t)?1:0}))),[r,ot]),[lt,st]=(0,a.useState)(!1),dt=(0,a.useCallback)((()=>
3{if(0===rt)return oe("CHECK_IN");st(!0)}),[rt,oe]),ct=(0,a.useMemo)((()=>({LAUNCH_VR_CONTENT:{action:"LAUNCH_VR_CONTENT",icon:(0,p.jsx)(cI.Z,{}),tooltip:Y?Ku({action:"LAUNCH_VR_CONTENT",multipleDevices:!K}):G?"Select an App, Video, or WebXR Link to launch on devices":"Selected devices must share the same configuration to launch VR Content",onClick:et,disabled:!Y&&!G,includeInPreview:!0},LAUNCH_APP:{action:"LAUNCH_APP",icon:(0,p.jsx)(cI.Z,{}),tooltip:Y?Ku({action:"LAUNCH_APP",multipleDevices:!K}):"Selected devices must share the same configuration to launch an app",disabled:!Y},ENABLE_KIOSK:{action:"ENABLE_KIOSK",icon:(0,p.jsx)(Vi.Z,{}),tooltip:Ku({action:"ENABLE_KIOSK",multipleDevices:!K,useDisabledVariant:H}),disabled:H},DISABLE_KIOSK:{action:"DISABLE_KIOSK",icon:(0,p.jsx)(bu.Z,{}),tooltip:Ku({action:"DISABLE_KIOSK",multipleDevices:!K,useDisabledVariant:H}),disabled:H,includeInPreview:!0},DISABLE_TUTORIAL_MODE:{action:"DISABLE_TUTORIAL_MODE",icon:D?(0,p.jsx)(bu.Z,{}):(0,p.jsx)(uh.Z,{}),disabled:!D||at,tooltip:D?Ku({action:"DISABLE_TUTORIAL_MODE",multipleDevices:!K,useDisabledVariant:at,tutorialModeRevamp:U}):"Upgrade to Premium to use this feature"},ENABLE_TUTORIAL_MODE:{action:"ENABLE_TUTORIAL_MODE",icon:D?(0,p.jsx)(Vi.Z,{}):(0,p.jsx)(uh.Z,{}),disabled:!D||at,tooltip:D?Ku({action:"ENABLE_TUTORIAL_MODE",multipleDevices:!K,useDisabledVariant:at,tutorialModeRevamp:U}):"Upgrade to Premium to use this feature",includeInPreview:!0},RESTART:{action:"RESTART",icon:(0,p.jsx)(uI.Z,{}),tooltip:Ku({action:"RESTART",multipleDevices:!K}),includeInPreview:!0},POWER_OFF:(()=>{const e=!(0,Vr.xL)(r),t=Ku({action:"POWER_OFF",multipleDevices:!K,useDisabledVariant:e});return{action:"POWER_OFF",icon:(0,p.jsx)(pI.Z,{}),tooltip:t,disabled:e,includeInPreview:!0}})(),SET_VOLUME:{action:"SET_VOLUME",icon:(0,p.jsx)(xg.Z,{}),tooltip:Ku({action:"SET_VOLUME",multipleDevices:!K}),onClick:()=>ee({icon:(0,p.jsx)(xg.Z,{}),initialValue:50,title:"Adjust Volume",action:"SET_VOLUME"}),includeInPreview:!0},SET_BRIGHTNESS:{action:"SET_BRIGHTNESS",icon:(0,p.jsx)(hI.Z,{}),tooltip:Ku({action:"SET_BRIGHTNESS",multipleDevices:!K}),onClick:()=>ee({icon:(0,p.jsx)(hI.Z,{}),initialValue:100,title:"Adjust Brightness",action:"SET_BRIGHTNESS"}),includeInPreview:!0},CHECK_IN:{action:"CHECK_IN",icon:(0,p.jsx)(mI.Z,{}),tooltip:Ku({action:"CHECK_IN",multipleDevices:!K}),onClick:dt,includeInPreview:!0},RESET_FIRST_TIME_USE:{action:"RESET_FIRST_TIME_USE",icon:(0,p.jsx)(gI.Z,{}),tooltip:Ku({action:"RESET_FIRST_TIME_USE",multipleDevices:!K}),hideButton:!M,includeInPreview:!0},CHANGE_ORGANIZATION:(()=>{const e=!Be||!y.devices,t=Be?"You need device privileges to change organization.":"You do not have access to any other organizations.";return{action:"CHANGE_ORGANIZATION",icon:(0,p.jsx)(vI.Z,{}),disabled:e,tooltip:e?t:Ku({action:"CHANGE_ORGANIZATION",multipleDevices:!K}),onClick:()=>We(),includeInPreview:!0}})(),GET_LOGS:{action:"GET_LOGS",icon:(0,p.jsx)(CI.Z,{}),tooltip:Ku({action:"GET_LOGS",multipleDevices:!K}),hideButton:!E&&!R,includeInPreview:!0},REMOVE_WIFI_NETWORK:{action:"REMOVE_WIFI_NETWORK",onClick:()=>it(!0),tooltip:y.devices?Ku({action:"REMOVE_WIFI_NETWORK",multipleDevices:!K}):"You need device privileges to remove Wi-Fi networks from devices.",icon:(0,p.jsx)(lI.Z,{}),disabled:!y.devices,includeInPreview:!0},PAUSE_UPDATES:{action:"PAUSE_UPDATES",tooltip:y.devices?Ku({action:"PAUSE_UPDATES",multipleDevices:!K}):"You need device privileges to pause configuration updates on devices.",icon:(0,p.jsx)(xI.Z,{}),disabled:!y.devices,includeInPreview:!0},RESUME_UPDATES:{action:"RESUME_UPDATES",tooltip:y.devices?Ku({action:"RESUME_UPDATES",multipleDevices:!K}):"You need device privileges to resume configuration updates on devices.",icon:(0,p.jsx)(mi.Z,{}),disabled:!y.devices},FACTORY_RESET_V2:{action:"FACTORY_RESET_V2",tooltip:Ku({action:"FACTORY_RESET_V2",multipleDevices:!K}),icon:(0,p.jsx)(gw.Z,{}),disabled:!y.devices,onClick:()=>ce(),includeInPreview:!0},CANCEL_FACTORY_RESET:{action:"CANCEL_FACTORY_RESET",tooltip:Ku({action:"CANCEL_FACTORY_RESET",multipleDevices:!K}),icon:(0,p.jsx)(fI.Z,{}),disabled:!y.devices},MIGRATE_TO_QFB:{action:"MIGRATE_TO_QFB",tooltip:Ku({action:"MIGRATE_TO_QFB",multipleDevices:!K}),icon:(0,p.jsx)(bI.Z,{}),disabled:!y.devices||!he,onClick:xe},DELETE_DEVICE:{action:"DELETE_DEVICE",tooltip:y.devices?Ku({action:"DELETE_DEVICE",multipleDevices:!K}):"You need device privileges to delete devices.",icon:(0,p.jsx)(Gl.Z,{}),disabled:!y.devices,onClick:()=>Qe.trigger(B),includeInPreview:!0},LOCK:{action:"LOCK",tooltip:y.devices?Ku({action:"LOCK",multipleDevices:!K}):"You need device privileges to lock devices.",icon:(0,p.jsx)(uh.Z,{}),disabled:!y.devices,includeInPreview:!0},UNLOCK:{action:"UNLOCK",tooltip:y.devices?Ku({action:"UNLOCK",multipleDevices:!K}):"You need device privileges to unlock devices.",icon:(0,p.jsx)(Hw.Z,{}),disabled:!y.devices},LOCK_SCREEN:{action:"LOCK_SCREEN",tooltip:y.devices?Ku({action:"LOCK_SCREEN",multipleDevices:!K}):"You need device privileges to lock devices.",icon:(0,p.jsx)(uh.Z,{}),disabled:!y.devices,includeInPreview:!0},PLAY_SOUND:{action:"PLAY_SOUND",icon:(0,p.jsx)(yI.Z,{}),onClick:()=>de(!0),tooltip:Ku({action:"PLAY_SOUND",multipleDevices:!K}),includeInPreview:!0},VALIDATE_FILE_INTEGRITY:{action:"VALIDATE_FILE_INTEGRITY",icon:(0,p.jsx)(jI.Z,{}),tooltip:Ku({action:"VALIDATE_FILE_INTEGRITY",multipleDevices:!K}),disabled:!T&&!y.devices,includeInPreview:!0},CLEAR_DOWNLOAD_CACHE:{action:"CLEAR_DOWNLOAD_CACHE",icon:(0,p.jsx)(Gl.Z,{}),tooltip:Ku({action:"CLEAR_DOWNLOAD_CACHE",multipleDevices:!K}),hideButton:!L,includeInPreview:!0},CLEAR_MAS_APP_CACHE:{action:"CLEAR_MAS_APP_CACHE",icon:(0,p.jsx)(Gl.Z,{}),tooltip:Ku({action:"CLEAR_MAS_APP_CACHE",multipleDevices:!K}),hideButton:!j&&!Z,includeInPreview:!0},CLEAR_DEFERRED_INSTALL_CACHE:{action:"CLEAR_DEFERRED_INSTALL_CACHE",icon:(0,p.jsx)(Gl.Z,{}),tooltip:Ku({action:"CLEAR_DEFERRED_INSTALL_CACHE",multipleDevices:!K}),hideButton:!j&&!Z,includeInPreview:!0},CLEAR_INSTALL_FAILURE_CACHE:{action:"CLEAR_INSTALL_FAILURE_CACHE",icon:(0,p.jsx)(Gl.Z,{}),tooltip:Ku({action:"CLEAR_INSTALL_FAILURE_CACHE",multipleDevices:!K}),hideButton:!j&&!Z,includeInPreview:!0},CLEAR_PATCH_CACHE:{action:"CLEAR_PATCH_CACHE",icon:(0,p.jsx)(Gl.Z,{}),tooltip:Ku({action:"CLEAR_PATCH_CACHE",multipleDevices:!K}),hideButton:!j&&!Z,includeInPreview:!0},CLEAR_ALL_DOWNLOAD_STATE:{action:"CLEAR_ALL_DOWNLOAD_STATE",icon:(0,p.jsx)(Gl.Z,{}),tooltip:Ku({action:"CLEAR_ALL_DOWNLOAD_STATE",multipleDevices:!K}),hideButton:!j&&!Z,includeInPreview:!0},RUN_NETWORK_TEST:{action:"RUN_NETWORK_TEST",icon:(0,p.jsx)(ZI.Z,{}),tooltip:Ku({action:"RUN_NETWORK_TEST",multipleDevices:!1}),onClick:J},LAUNCH_REMOTE_STREAM:(()=>{const e=(0,Vr.Ud)(r),t=e&&!k.disallowStreaming;let n;if(K){var i;const e=EI({manufacturer:K.manufacturer,firmwareVersion:K.firmwareVersion},null!==(i=k.disallowStreaming)&&void 0!==i&&i);n=null!==e&&void 0!==e?e:Ku({action:"LAUNCH_REMOTE_STREAM",multipleDevices:!1,useDisabledVariant:!1})}else n=k.disallowStreaming?"Your organization administrators have disabled device streaming.":e?Ku({action:"LAUNCH_REMOTE_STREAM",multipleDevices:!0,useDisabledVariant:!1}):"Remote screen streaming is not supported on Meta Quest devices on firmware versions below 68";const o=!t,a=r.filter((e=>(0,Vr.Ud)([e])));return{action:"LAUNCH_REMOTE_STREAM",icon:(0,p.jsx)(wI.Z,{}),tooltip:n,disabled:o,onClick:()=>{a.forEach((e=>I(e.id)))},includeInPreview:!0}})()})),[Y,K,et,H,D,at,U,r,dt,M,Be,y.devices,E,R,T,L,j,Z,We,ce,Qe,B,k.disallowStreaming,I,he,xe,G,J]),ut=!K||void 0===K.factoryResetStatus,pt=(0,a.useMemo)((()=>
3{if(K&&"COMPLETE"===K.factoryResetStatus)return[ct.CHANGE_ORGANIZATION,ct.DELETE_DEVICE];if(K&&"QUEUED"===K.factoryResetStatus)return[ct.CANCEL_FACTORY_RESET];return[[ct.CHANGE_ORGANIZATION,!0],[ct.MIGRATE_TO_QFB,pe&&(!K||he)],[ct.FACTORY_RESET_V2,ut],[ct.DELETE_DEVICE,!0]].filter((e=>{let[,t]=e;return t})).map((e=>{let[t]=e;return t}))}),[ct.CHANGE_ORGANIZATION,ct.MIGRATE_TO_QFB,ct.FACTORY_RESET_V2,ct.CANCEL_FACTORY_RESET,ct.DELETE_DEVICE,pe,K,he,ut]),ht=(0,a.useMemo)((()=>{if(G)return Object.values(ct).filter((e=>!e.hideButton&&e.includeInPreview));if(K&&("QUEUED"===K.factoryResetStatus||"COMPLETE"===K.factoryResetStatus))return pt;const e=[[ct.LAUNCH_REMOTE_STREAM,!0],[ct.SET_VOLUME,!0],[ct.SET_BRIGHTNESS,!0],[ct.LAUNCH_VR_CONTENT,!0],[ct.LOCK,!N&&!!K&&"UNLOCKED"===K.lockScreenStatus],[ct.UNLOCK,!N&&!!K&&"LOCKED"===K.lockScreenStatus],[ct.RESTART,!0],[ct.POWER_OFF,!0],[ct.LOCK_SCREEN,F],[ct.CHECK_IN,!0],[ct.ENABLE_KIOSK,!q.every((e=>e.kioskModeEnabled))],[ct.DISABLE_KIOSK,q.some((e=>e.kioskModeEnabled))],[ct.ENABLE_TUTORIAL_MODE,U?(0,o.some)(q,(e=>!1===e.tutorialModeEnabled)):!q.every((e=>e.firstTimeUseModeEnabled))],[ct.DISABLE_TUTORIAL_MODE,U?(0,o.some)(q,(e=>!1!==e.tutorialModeEnabled)):q.some((e=>e.firstTimeUseModeEnabled))],[ct.RESET_FIRST_TIME_USE,!0],[ct.PLAY_SOUND,!0],[ct.REMOVE_WIFI_NETWORK,!0],[ct.PAUSE_UPDATES,q.every((e=>void 0===e.factoryResetStatus))&&!q.every((e=>e.pauseUpdates))],[ct.RESUME_UPDATES,q.every((e=>void 0===e.factoryResetStatus))&&q.some((e=>e.pauseUpdates))],[ct.GET_LOGS,!0],[ct.VALIDATE_FILE_INTEGRITY,P],[ct.CLEAR_DOWNLOAD_CACHE,L],[ct.CLEAR_MAS_APP_CACHE,!0],[ct.CLEAR_DEFERRED_INSTALL_CACHE,!0],[ct.CLEAR_INSTALL_FAILURE_CACHE,!0],[ct.CLEAR_PATCH_CACHE,!0],[ct.CLEAR_ALL_DOWNLOAD_STATE,!0],[ct.RUN_NETWORK_TEST,Q]].filter((e=>{let[,t]=e;return t})).map((e=>{let[t]=e;return t}));return e.push(...pt),e}),[ct,P,L,Q,pt,N,F,U,K,q,G]),mt=(0,a.useMemo)((()=>[{title:"Device",keys:["LAUNCH_REMOTE_STREAM","RESTART","POWER_OFF","LOCK_SCREEN","SET_VOLUME","SET_BRIGHTNESS","REMOVE_WIFI_NETWORK","PLAY_SOUND","GET_LOGS","RUN_NETWORK_TEST"]},{title:"Content & Experience",keys:["LAUNCH_VR_CONTENT","ENABLE_KIOSK","DISABLE_KIOSK","ENABLE_TUTORIAL_MODE","DISABLE_TUTORIAL_MODE","RESET_FIRST_TIME_USE"]},{title:"Updates",keys:["CHECK_IN","PAUSE_UPDATES","RESUME_UPDATES","VALIDATE_FILE_INTEGRITY","CLEAR_DOWNLOAD_CACHE","CLEAR_MAS_APP_CACHE","CLEAR_DEFERRED_INSTALL_CACHE","CLEAR_INSTALL_FAILURE_CACHE","CLEAR_PATCH_CACHE","CLEAR_ALL_DOWNLOAD_STATE"]},{title:"Organization & reset options",keys:["CHANGE_ORGANIZATION","MIGRATE_TO_QFB","FACTORY_RESET_V2","CANCEL_FACTORY_RESET","DELETE_DEVICE"]}]),[]),gt=(0,a.useMemo)((()=>{const e=new Map(ht.map((e=>[e.action,e]))),t=mt.map((t=>{const n=t.keys.map((t=>e.get(t))).filter(Boolean);return 0===n.length?null:{title:t.title,items:n}})).filter(Boolean);if(!s)return[t];const n=[[],[]];return t.forEach(((e,t)=>{n[t%2].push(e)})),n.filter((e=>e.length>0))}),[mt,s,ht]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Z,{direction:gt.length>1?"row":"column",sx:{paddingLeft:0,marginLeft:s?0:-1},children:gt.map(((e,t)=>{const n=0===t,o=gt.length>1;return(0,p.jsxs)(a.Fragment,{children:[o&&!n&&(0,p.jsx)(Ie.Z,{orientation:"vertical",flexItem:!0,sx:{marginX:1}}),(0,p.jsx)(m.Z,{children:e.map(((t,n)=>{const o=n===e.length-1;return(0,p.jsxs)(i.Z,{sx:{marginBottom:s?0:1.6},children:[(0,p.jsx)(dA,{title:t.title,bulkMode:s}),(0,p.jsx)(uA,{isBulkMode:s,commands:t.items,deviceIds:B,pending:ne}),!o&&s&&(0,p.jsx)(Ie.Z,{sx:{marginY:2}})]},t.title)}))})]},t)}))}),$&&(0,p.jsx)(kI.K,{open:null!=$,onClose:()=>ee(null),onConfirm:ae,title:$.title,initialValue:$.initialValue,icon:$.icon}),Be&&(0,p.jsx)(MI,{open:Te,onClose:Ne,onSubmit:Ye}),(0,p.jsx)(sI,{devicesWcs:r,open:re,onFactoryResetDialogClose:ue}),(0,p.jsx)(BI,{open:se,onClose:()=>de(!1),onConfirm:De}),(0,p.jsx)(oA,{open:nt,onClose:()=>it(!1),onRemoveWifiNetwork:Re}),!!Y&&(0,p.jsx)(zI,{open:Je,onCancel:tt,configurationId:Y,onLaunchApp:Ee,onLaunchURL:Se,onPlayVideo:Me,onPauseVideo:ke,onResumeVideo:Ae,device:K,loading:O}),(0,p.jsx)(Jk,{open:!!Oe,onClose:()=>_e(void 0),configurationId:null===Oe||void 0===Oe?void 0:Oe.configurationId,numNewDevices:null===Oe||void 0===Oe?void 0:Oe.numDevices}),(0,p.jsx)(rA,{open:lt,numDevices:W,numDevicesRequireForceSync:rt,submitting:ne,onClose:()=>{st(!1)},onSubmit:async()=>{await oe("CHECK_IN",{forceSync:!0}),st(!1)}}),(0,p.jsx)(iI,{open:!!Ve&&!!He,onClose:Ne,onSubmit:Ke,devicesWcs:r,targetConfigurationId:Ve}),(0,p.jsx)(QI,{open:me,onClose:be,onGetStarted:fe}),(me||ve)&&(0,p.jsx)($I,{open:ve,onClose:ye,devicesWcs:r,onSubmit:Ze}),y.devices&&(0,p.jsx)(Fn,{...Qe.props})]})})),dA=e=>{let{title:t,bulkMode:n}=e;return(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",flexGrow:1,marginLeft:n?2:0,children:t})},cA=(0,a.memo)((e=>{let{command:t,icon:n,tooltipText:o,disabled:a,isBulkMode:r,onClick:l,color:s="primary"}=e;const d=(0,De.Z)(),c=d.spacing(r?2.4:2),u=d.spacing(r?2.8:0),h=d.spacing(r?1.5:1.4),m=r?-20:-8;return(0,p.jsx)(i.Z,{sx:{"&:hover .infoHover":{visibility:"unset"}},children:(0,p.jsx)(ee.Z,{title:o||"",placement:"right",enterDelay:500,PopperProps:{modifiers:[{name:"offset",options:{offset:[0,m]}}]},children:(0,p.jsx)("span",{children:(0,p.jsx)(C.Z,{startIcon:n,color:s,disabled:a,onClick:l,sx:{width:"100%",justifyContent:"flex-start",paddingLeft:c,paddingRight:u,paddingY:d.spacing(.7),textTransform:"none",alignItems:"center","& .MuiButton-startIcon":{marginRight:h,"& svg":{fontSize:"1rem"}},"&:hover .infoHover":{visibility:"unset"}},"data-testid":"deviceCommand",children:t})})})})})),uA=(0,a.memo)((e=>{let{buttonColor:t,commands:n,pending:i,isBulkMode:r=!1,deviceIds:l}=e;const{notifyThunkResult:s,confirm:d}=(0,ie.o)(),c=(0,u.I0)(),h=(0,o.size)(l),g=(0,a.useCallback)(((e,t)=>{h>1?d({message:e,onConfirm:t}):t()}),[d,h]),v=(0,a.useCallback)((async(e,t)=>{const n=Yu[e];if(!h)return;const i=await c((0,La.qJ)({deviceIds:l,action:e,data:t}));s({result:i,success:{message:"".concat((0,o.capitalize)(n)," command sent")},error:{message:"Error sending ".concat((0,o.lowerCase)(n)," command"),action:{title:"Retry",onClick:()=>v(e,t)}}})}),[h,l,c,s]),C=(0,a.useCallback)((e=>{let{callback:t,action:n}=e;if(t)return t();"CHANGE_ORGANIZATION"!==n&&"DELETE_DEVICE"!==n&&"DELETE_FILES"!==n&&"LAUNCH_APP"!==n&&"LAUNCH_REMOTE_STREAM"!==n&&"LAUNCH_VR_CONTENT"!==n&&"MIGRATE_TO_QFB"!==n&&("CLEAR_ALL_DOWNLOAD_STATE"!==n?g("Send command to ".concat(h," devices?"),(()=>v(n))):d({message:h>1?"This will clear all download and install state on ".concat(h," devices, forcing a complete re-sync. Are you sure?"):"This will clear all download and install state, forcing a complete re-sync. Are you sure?",onConfirm:()=>v(n)}))}),[d,g,h,v]);return(0,p.jsx)(m.Z,{direction:"column",marginTop:.3,children:(0,o.map)(n,(e=>{let{action:n,icon:o,disabled:a,tooltip:l,hideButton:s,onClick:d}=e;return!s&&(0,p.jsx)(cA,{icon:o,color:t,onClick:()=>C({callback:d,action:n}),disabled:a||i,command:Yu[n],isBulkMode:r,tooltipText:l},n)}))})})),pA={color:"text.primary",borderColor:"divider","&:hover":{borderColor:"divider",backgroundColor:"action.hover"},"&.Mui-disabled":{borderColor:"divider"}},hA=e=>
3{let{open:t,onClose:n,listHeader:i,anchorEl:o,options:a,testIdPrefix:r}=e;return(0,p.jsx)(Is.Z,{MenuListProps:{dense:!0,subheader:(0,p.jsx)(sj.Z,{sx:{color:y.DG.primary[200]},children:i})},anchorEl:o,open:t,onClose:n,children:null===a||void 0===a?void 0:a.map((e=>{var t;return(0,p.jsx)(ee.Z,{title:null!==(t=e.tooltip)&&void 0!==t?t:"",placement:"left",enterDelay:1e3,children:(0,p.jsx)("span",{children:(0,p.jsxs)(Hi.Z,{onClick:()=>{e.onSelect(),n()},sx:e.secondary?{color:"text.secondary"}:void 0,disabled:e.disabled,dense:!0,"data-testid":"".concat(r,"_option"),children:[e.icon&&(0,p.jsx)(As.Z,{children:(0,p.jsx)(e.icon,{fontSize:"small"})}),e.title]})})},e.id)}))})},mA=(0,a.memo)((e=>{let{buttonText:t,listHeader:n,options:i,disabled:o=!1,renderPopover:r,testIdPrefix:l="deviceList_actionButton",defaultOpen:s=!1,variant:d="default"}=e;const c=(0,a.useRef)(null),u=(0,a.useRef)(!1),[h,m]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{if(!s||o||u.current)return;u.current=!0;const e=setTimeout((()=>{c.current&&m(!0)}),100);return()=>clearTimeout(e)}),[s,o]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(C.Z,{ref:c,size:"small",variant:"neutralOutlined"===d?"outlined":"text",disabled:o,onClick:()=>m(!0),"data-testid":"".concat(l,"_button"),sx:"neutralOutlined"===d?pA:void 0,children:t}),r&&h?r({open:h,onClose:()=>m(!1),anchorEl:c.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"center"}}):i&&n?(0,p.jsx)(hA,{listHeader:n,open:h,onClose:()=>m(!1),anchorEl:c.current,options:i,testIdPrefix:l}):null]})}));mA.displayName="DeviceListActionButton";const gA=e=>{let{orgTags:t,anchorEl:n,transformOrigin:i,anchorOrigin:r,deviceTagIds:l,handleSingleTagChange:s,onClose:d,saveTagChanges:c,open:u,listHeader:h,onDeviceList:g=!1}=e;const[v,C]=(0,a.useState)(),[x,f]=(0,a.useState)(),[b,j]=(0,a.useState)(),[Z,w]=(0,a.useState)(!1),E=(0,a.useMemo)((()=>!!v&&!!x&&!(0,o.isEqual)(v,x)),[v,x]),S=(0,o.size)(l),{confirm:D}=(0,ie.o)(),M=(0,a.useCallback)((async(e,t)=>{S>1?D({message:e,onConfirm:t}):await t()}),[D,S]),k=(0,a.useCallback)((()=>(0,o.chain)(t).keyBy("id").mapValues((e=>{const t=(0,o.values)(l);return(0,o.every)(t,(t=>(0,o.includes)(t,e.id)))?"all":(0,o.some)(t,(t=>(0,o.includes)(t,e.id)))?"some":"none"})).value()),[l,t]);(0,a.useEffect)((()=>{Z||(j(h),C(k),f(k))}),[l,k,h,Z]);const I=(0,a.useCallback)(((e,n)=>{if((0,o.isEmpty)(t))return d();C((t=>{if(!t)return t;const i=(0,o.cloneDeep)(t);
3return e===qi.ki.None?Object.keys(i).forEach((e=>{i[e]="none"})):i[e]="all"===n||"some"===n?"none":"all",i})),!g&&s&&s(e)}),[t,d,g,s]),A=()=>{C(k)},R=async()=>{c&&(w(!0),await c((()=>{const e={};return x&&(0,o.forEach)(v,((t,n)=>{x[n]!==t&&(e[n]=t)})),e})()),d&&d(),w(!1))},T=(0,a.useMemo)((()=>v?t.filter((e=>!!v[e.id])):[]),[t,v]),P=T.length>12,L=Math.min(36*T.length,432),N=(0,a.useCallback)((e=>{let{key:t,index:n,style:i,registerChild:o}=e;const a=T[n];return a&&v?(0,p.jsx)("div",{style:i,ref:o,children:(0,p.jsxs)(Hi.Z,{onClick:()=>I(a.id,v[a.id]),sx:{paddingY:0,paddingX:1},dense:!0,disabled:Z,children:[(0,p.jsx)(Pi.Z,{indeterminate:"some"===v[a.id],checked:"none"!==v[a.id]}),(0,p.jsx)(Rs.Z,{primary:a.name,primaryTypographyProps:{noWrap:!0}})]})},t):null}),[T,v,Z,I]);return(0,p.jsx)(cg.ZP,{open:u,onClose:()=>{Z||(d(),A())},anchorEl:n,anchorOrigin:r,transformOrigin:i,children:(0,p.jsxs)(ii.Z,{dense:!0,subheader:g?(0,p.jsx)(sj.Z,{sx:{color:y.DG.primary[200]},children:b}):null,sx:{minWidth:n?Math.min(n.clientWidth,320):"auto",maxWidth:320},children:[v&&(P?(0,p.jsx)(Zu.Z,{height:L,renderRow:N,rowCount:T.length,rowHeight:36,width:320}):T.map((e=>(0,p.jsxs)(Hi.Z,{onClick:()=>I(e.id,v[e.id]),sx:{paddingY:0,paddingX:1},dense:!0,disabled:Z,children:[(0,p.jsx)(Pi.Z,{indeterminate:"some"===v[e.id],checked:"none"!==v[e.id]}),(0,p.jsx)(Rs.Z,{primary:e.name,primaryTypographyProps:{noWrap:!0}})]},e.id)))),(0,p.jsx)(Hi.Z,{onClick:()=>I(qi.ki.None,"all"),sx:{color:"text.secondary"},disabled:Z,dense:!0,children:(0,p.jsx)(Rs.Z,{primary:"Remove All Tags",primaryTypographyProps:{noWrap:!0}})}),g&&c&&(0,p.jsx)(m.Z,{sx:{padding:1},children:(0,p.jsx)(bd,{reverse:!0,hasChanges:E,savePending:Z,onSaveClick:async()=>{await M("Change tags on ".concat(S," devices?"),R)},onUndoAllClick:A})})]})})},vA=(0,a.memo)((e=>{let{neutralActionButtons:t=!1,hideSelectionLabel:n=!1}=e;const i=(0,u.I0)(),r=(0,l.TH)(),s=(0,l.k6)(),{notifyThunkResult:c,notify:h}=(0,ie.o)(),{privileges:g,organizationId:C}=(0,w.P)(),{organization:x}=(0,d.mP)(),f=(0,d.GB)()&&!x.customContract,b=(0,u.v9)((e=>e.device.queryResult.length)),y=(0,u.v9)((e=>e.device.selection.bulk)),j=(0,u.v9)((e=>e.device.selection.count)),Z=(0,u.v9)((e=>e.device.queryPending)),D=(0,u.v9)((e=>e.device.pendingOperation)),M=Xk(),k=(0,If.Y)(((e,t)=>{const{organizationId:n}=(0,w.P)(),i=id();return(0,a.useMemo)((()=>{if(i&&(0,o.isEmpty)(i.configRefs))return;if((0,o.isEmpty)(t))return;const a=(0,Os.N$)(e),r=(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,n)),l=(0,nd.tc)({collection:e,organizationId:n,filter:(0,Vt.Z)()});if(i){const e=i.configRefs.length,n=Math.floor(nd.ps/e),s=e<=nd.ps?[i.configRefs]:(0,o.chunk)(i.configRefs,nd.ps),d=e<=nd.ps?Math.max(n,1):1,c=(0,o.chunk)(t,d);return{id:l,query:(0,o.flatMap)(s,(e=>(0,o.map)(c,(t=>(0,td.IO)(a,r,(0,td.ar)("id","in",t),(0,td.ar)("deviceGroupRef","in",e))))))}}return{id:l,query:(0,o.map)((0,o.chunk)(t,nd.ps),(e=>(0,td.IO)(a,r,(0,td.ar)("id","in",e))))}}),[e,i,t,n])})(S.F.DeviceWebConsoleSettings,M)),I=(0,a.useMemo)((()=>k?Array.from(k.values()):[]),[k]),{documents:A}=(0,E.D)(S.F.Tags,{sort:ze.gt}),R=Kk(),T=(0,a.useMemo)((()=>{const e={};return(0,o.forEach)(R,(t=>{e[t.id]=(0,o.map)(t.tagRefPaths,(e=>(0,o.split)(e,"/")[1]))})),e}),[R]),P=Z||!k||!!D||"none"===y,L=t?"neutralOutlined":"default",N=t?"Apply configuration":"Configuration",U=t?"Add tag":"Tag",F=t?"Send command":"Command",O=f?Z||!!D:P,_=new URLSearchParams(r.
3search),z=f&&"commands"===_.get("action"),[B,W]=(0,a.useState)(!1);(0,a.useEffect)((()=>{if(z&&!B){W(!0),LS(C);const e=new URLSearchParams(r.search);e.delete("action"),s.replace({pathname:r.pathname,search:e.toString()})}}),[z,B,s,r.pathname,r.search,C]);const[V,G]=(0,a.useState)(),H=(0,a.useCallback)((async(e,t)=>{const n=await i((0,La.OK)({deviceIds:t,configurationId:e}));"rejected"===n.meta.requestStatus&&n.payload===Fe.Xt.DeviceLimitExceeded?G({configurationId:e,numDevices:t.length}):c({result:n,success:{message:"Configuration assigned"},error:{message:"Error assigning configuration",action:{title:"Retry",onClick:()=>H(e,t)}}})}),[i,c]),[q,Y]=(0,a.useState)(),K=(0,a.useCallback)((e=>{Y(e)}),[]),X=(0,a.useCallback)((async e=>{q&&e&&(await H(q,e),Y(void 0))}),[q,H]),Q=(0,a.useCallback)((()=>{Y(void 0)}),[]),{documents:J}=(0,E.D)(S.F.Configurations,{sort:ze.gt}),$=(0,a.useMemo)((()=>J.map((e=>({id:e.id,title:e.name,onSelect:()=>K(e.id)})))),[J,K]),ee=async e=>{const t={};(0,o.forEach)(M,(n=>{var i;let a=T[n];(0,o.forEach)(e,((e,t)=>{"none"===e?a&&(0,o.remove)(a,(e=>e===t)):a?(0,o.includes)(a,t)||a.push(t):a=[t]})),t[n]=null!==(i=a)&&void 0!==i?i:[]}));try{await(0,Fe.lF)({organizationId:C},{deviceIdsToTagIds:t}),i(La.i7.actions.refreshQuery()),h({severity:"success",message:"Updated tags on ".concat(M.length," device").concat(1===M.length?"":"s")})}catch(n){const e=(0,Fe.tf)(n);h({severity:"error",message:e?e.message:"Failed to update tags"}),(0,Si.yR)(n,{name:"bulk update tags"})}};return(0,p.jsxs)(m.Z,{direction:"row",spacing:t?1:.5,alignItems:"center",children:[g.devices&&(0,p.jsx)(mA,{buttonText:N,listHeader:"Apply Configuration",options:$,disabled:P,testIdPrefix:"deviceList_configuration",variant:L}),g.devices&&(0,p.jsx)(mA,{buttonText:U,disabled:P,variant:L,renderPopover:e=>(0,p.jsx)(gA,{listHeader:"Tag ".concat(M.length," device").concat(1!==M.length?"s":""),orgTags:A,saveTagChanges:ee,deviceTagIds:T,onDeviceList:!0,...e}),testIdPrefix:"deviceList_tag"}),(0,p.jsx)(mA,{buttonText:F,disabled:O,defaultOpen:B,variant:L,renderPopover:e=>(0,p.jsx)(cg.ZP,{...e,children:(0,p.jsxs)(m.Z,{paddingY:2,paddingLeft:.8,paddingRight:7,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",paddingY:1,paddingX:2,children:"Send Command"}),(0,p.jsx)(sA,{devicesWcs:I,isBulkMode:!0})]})}),testIdPrefix:"deviceList_command"}),!n&&(0,p.jsxs)(v.Z,{variant:"body2",paddingLeft:2,paddingBottom:.25,"data-testid":"deviceList_selectionLabel",children:[!!j&&"".concat(j," of "),b," device",1===b?"":"s"]}),(0,p.jsx)(Jk,{open:!!V,onClose:()=>G(void 0),configurationId:null===V||void 0===V?void 0:V.configurationId,numNewDevices:null===V||void 0===V?void 0:V.numDevices}),(0,p.jsx)(iI,{open:!!q,onClose:Q,onSubmit:X,devicesWcs:I,targetConfigurationId:q||""})]})})),CA=n.p+"static/media/device_card_left.65323d1197b2f5f6e91e.png",xA=n.p+"static/media/device_card_right_bottom.d686391af5191f9dcefe.png",fA=n.p+"static/media/device_card_right_top.b4512dc7d47fc07a1252.png",bA=(0,Kc.ZP)(C.Z)({backgroundColor:y.DG.primary[200],"&:hover":{backgroundColor:y.DG.primary[300]},paddingLeft:64,paddingRight:64,paddingTop:8,paddingBottom:8}),yA=(0,Kc.ZP)(C.Z)({color:y.DG.primary[200],borderColor:y.DG.primary[200],"&:hover":{borderColor:y.DG.primary[300],backgroundColor:y.DG.purple[50]},paddingLeft:16,paddingRight:16}),jA="350px",ZA={width:"auto",borderRadius:2,boxShadow:y.mq,pointerEvents:"none",userSelect:"none"},wA=e=>{let{src:t,height:n}=e;return(0,p.jsx)(i.Z,{component:"img",src:t,alt:"",sx:{...ZA,height:n}})},EA=(0,a.memo)((()=>{const{organization:e}=(0,d.mP)(),{buildOrganizationPath:t}=(0,w.P)(),n=(0,l.k6)(),i=(0,u.I0)(),o=bS(),r=t((e=>e.quickstart)),[s,c]=(0,a.useState)(!1),h=(0,a.useCallback)((()=>{(0,b.u0)({surface:"devices",control:"add-a-device",action:"clicked"}),i(Te.dV.actions.onboardingEntryPointSet("addDevice")),"quickstart"===o?((0,Ne.y)("devices-cta"),n.push(r)):i(Te.dV.actions.onboardingOverlaySet("open"))}),[i,o,n,r]),g=(0,a.useCallback)((()=>{(0,b.u0)({surface:"devices",control:"no-device",action:"clicked"}),c(!0)}),[]),C=(0,a.useCallback)((e=>{(0,b.ec)("Onboarding No Device Reported",{reason:e,source:"device-list"}),c(!1),n.push(t((e=>e.marketplace.hardwarePartners)))}),[n,t]);return e.hideOnboarding?null:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Me.Z,{elevation:0,sx:{marginTop:2,borderRadius:3,border:"1px solid",borderColor:"grey.200",boxShadow:y.mq,overflow:"hidden"},children:(0,p.jsxs)(m.Z,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",paddingLeft:5},children:[(0,p.jsxs)(m.Z,{sx:{flex:"0 0 380px",justifyContent:"center"},children:[(0,p.jsx)(v.Z,{variant:"h4",sx:{fontSize:26,fontWeight:700,lineHeight:1.3,paddingBottom:1.3},children:"Manage your entire fleet on a single screen"}),(0,p.jsx)(v.Z,{variant:"body1",sx:{color:"text.primary",opacity:.7,lineHeight:1.4},children:"Send bulk commands, start streams, and organize your devices all from the device list. Need to check on a specific device? Dive into the individual device view for everything from Wi-Fi speed to last known location."}),(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1.5,sx:{marginTop:3},children:[(0,p.jsx)(bA,{variant:"contained",size:"large",onClick:h,children:"Add a Device"}),(0,p.jsx)(yA,{variant:"outlined",onClick:g,children:"I Don't Have a Device"})]})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,sx:{alignItems:"center",padding:2.5,paddingRight:4.5},children:[(0,p.jsx)(wA,{src:CA,height:jA}),(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(wA,{src:fA,height:"calc(".concat(jA," * 0.6)")}),(0,p.jsx)(wA,{src:xA,height:"calc(".concat(jA," * 0.36)")})]})]})]})}),(0,p.jsx)(wZ,{open:s,onClose:()=>c(!1),onSubmit:C})]})}));EA.displayName="DeviceListEmptyStateTest";const SA=(0,a.memo)((e=>(0,p.jsx)($n.Z,{...e,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,p.jsx)("path",{d:"M9.99967 16.6666C8.15245 16.6666 6.57954 16.0173 5.28092 14.7187C3.98231 13.4201 3.33301 11.8471 3.33301 9.99992C3.33301 8.1527 3.98231 6.57978 5.28092 5.28117C6.57954 3.98256 8.15245 3.33325 9.99967 3.33325C11.1802 3.33325 12.215 3.57284 13.1038 4.052C13.9927 4.53117 14.7636 5.18742 15.4163 6.02075V3.33325H16.6663V8.62492H11.3747V7.37492H14.8747C14.3469 6.54159 13.6733 5.86797 12.8538 5.35409C12.0344 4.8402 11.083 4.58325 9.99967 4.58325C8.48579 4.58325 7.20454 5.10756 6.15592 6.15617C5.10731 7.20478 4.58301 8.48603 4.58301 9.99992C4.58301 11.5138 5.10731 12.7951 6.15592 13.8437C7.20454 14.8923 8.48579 15.4166 9.99967 15.4166C11.1525 15.4166 12.208 15.0867 13.1663 14.427C14.1247 13.7673 14.7913 12.8958 15.1663 11.8124H16.458C16.0552 13.2708 15.2566 14.4444 14.0622 15.3333C12.8677 16.2221 11.5136 16.6666 9.99967 16.6666Z",fill:"currentColor"})})));SA.displayName="RefreshLightIcon";const DA="Refresh to sort and filter devices using the latest realtime data",MA={fontSize:20},kA=(0,a.memo)((e=>{let{onRefresh:t,pending:n=!1,disabled:i=!1,testId:o="uiTableToolbar_refreshButton",tooltip:a=DA,pendingSpinnerColor:r}=e;return(0,p.jsx)(ee.Z,{title:a,placement:"top",enterDelay:500,children:(0,p.jsx)("span",{"data-testid":o,children:(0,p.jsx)(x.Z,{disabled:n||i,onClick:t,sx:{width:36,height:36},children:n?(0,p.jsx)(Zi.Z,{size:20,sx:r?{color:r}:void 0}):(0,p.jsx)(SA,{sx:MA})})})})}));kA.displayName="UITableToolbarRefresh";const IA=(0,a.memo)((e=>{let{pendingSpinnerColor:t,onRefreshClick:n,pending:i}=e;const o=(0,u.I0)(),a=(0,u.v9)((e=>e.device.queryPending)),r=(0,u.v9)((e=>e.device.pendingOperation)),l=null!==i&&void 0!==i?i:a;return(0,p.jsx)(kA,{onRefresh:()=>{null===n||void 0===n||n(),o(La.i7.actions.refreshQuery())},pending:l,disabled:!!r,testId:"deviceList_refreshButton",pendingSpinnerColor:t})})),AA="500 14px ".concat(y.ht),RA="400 14px ".concat(y.JB),TA="500 12px ".concat(y.JB),PA=56,LA=new Map;let NA;const UA=(e,t,n)=>{var i;if(!e)return 0;const o="".concat(t,"|").concat(e),a=LA.get(o);if(null!=a)return a;
3if(void 0===NA&&(NA=document.createElement("canvas").getContext("2d")),!NA)return 0;NA.font=t;const r=Math.ceil(NA.measureText(e).width+n*e.length);return"loaded"===(null===(i=document.fonts)||void 0===i?void 0:i.status)&&LA.set(o,r),r},FA=e=>UA(e,TA,.12)+16,OA=e=>"+".concat(e," more"),_A=e=>"+".concat(e," tags"),zA=(e,t)=>{let n=0;for(let o=0;o<t;o++){var i;n+=null!==(i=e[o])&&void 0!==i?i:0}return n},BA=e=>e>0?18*e+12:0,WA={backgroundColor:"grey.300",color:"text.primary",height:20,lineHeight:1,flexShrink:0,"& .MuiChip-label":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"block"}},VA=(0,a.memo)((e=>{let{chips:t,availableWidth:n,overflowChipsLabel:i=_A}=e;const r=(0,a.useMemo)((()=>(e=>{let{availableWidth:t,getOverflowMoreWidth:n,overflowChipsWidth:i,chipWidths:o}=e;const a={visibleCount:0,showOverflowMore:!1,showOverflowChips:!1},r=o.length;if(r<=0||t<=0)return a;if(1===r)return{visibleCount:1,showOverflowMore:!1,showOverflowChips:!1,singleChipMaxWidth:t};if(zA(o,r)+8*(r-1)<=t)return{visibleCount:r,showOverflowMore:!1,showOverflowChips:!1};for(let l=r-1;l>=1;l--)if(zA(o,l)+8*(l-1)+8+n(r-l)<=t)return{visibleCount:l,showOverflowMore:!0,showOverflowChips:!1};return i<=t?{visibleCount:0,showOverflowMore:!1,showOverflowChips:!0}:a})({availableWidth:n,chipWidths:(0,o.map)(t,(e=>FA(e.label))),getOverflowMoreWidth:e=>FA(OA(e)),overflowChipsWidth:FA(i(t.length))})),[n,t,i]),l=(0,o.slice)(t,0,r.visibleCount),s=r.showOverflowChips?t:(0,o.slice)(t,r.visibleCount),d=1===t.length;return(0,o.isEmpty)(t)?null:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,flexWrap:"nowrap",children:[(0,o.map)(l,(e=>(0,p.jsx)(ee.Z,{title:e.label,children:(0,p.jsx)(ke.Z,{label:e.label,size:"small",sx:{...WA,...d&&{minWidth:0,maxWidth:"".concat(r.singleChipMaxWidth,"px")}}})},e.id))),(r.showOverflowMore||r.showOverflowChips)&&(0,p.jsx)(ee.Z,{title:(0,o.join)((0,o.map)(s,"label"),", "),placement:"bottom-start",children:(0,p.jsx)(ke.Z,{label:r.showOverflowChips?i(t.length):OA(s.length),size:"small",sx:WA})})]})}));VA.displayName="UITableCellChips";const GA={followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500},HA=(0,a.memo)((e=>{var t;let{value:n,primary:r=!1,link:l=!1,onNavigate:s,startIcons:d,endIcons:c,chips:u,tooltip:h,wrapTooltip:m,noWrap:g=!0,"data-testid":C,sx:x}=e;const[f,b]=(0,a.useState)(0),y=(0,a.useRef)(),j=(0,a.useCallback)((e=>{var t;if(null===(t=y.current)||void 0===t||t.disconnect(),!e)return;const n=()=>b(e.clientWidth);n(),y.current=new ResizeObserver(n),y.current.observe(e)}),[]),Z=(0,a.useCallback)((e=>{l&&s&&(e.preventDefault(),e.stopPropagation(),s())}),[l,s]),w=(0,a.useCallback)((e=>{l&&s&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),s()))}),[l,s]),E=null!==(t=null===c||void 0===c?void 0:c.length)&&void 0!==t?t:0,S=!(0,o.isEmpty)(u),D=S||E>0,M=(0,a.useMemo)((()=>"string"!==typeof n?0:r?(e=>UA(e,AA,.224))(n):(e=>UA(e,RA,.23800000000000002))(n)),[r,n]),{valueMaxWidth:k,chipAreaWidth:I}=(0,a.useMemo)((()=>(e=>{let{chipAreaReservePx:t=PA,containerWidth:n,endIconsReservePx:i,hasChips:o,naturalValueWidth:a}=e;const r=Math.max(n-i,0),l=o?12:0;return n<=0?{valueMaxWidth:void 0,chipAreaWidth:o?t:0}:o?a<=0?{valueMaxWidth:void 0,chipAreaWidth:Math.max(r-l,0)}:a+l+t<=r?{valueMaxWidth:void 0,chipAreaWidth:r-a-l}:{valueMaxWidth:Math.max(r-l-t,0),chipAreaWidth:Math.min(t,Math.max(r-l,0))}:{valueMaxWidth:r,chipAreaWidth:0}})({containerWidth:f,endIconsReservePx:BA(E),hasChips:S,naturalValueWidth:M})),[f,E,S,M]),A=!1===h?void 0:null!==h&&void 0!==h?h:"string"===typeof n?n:void 0,R=(0,p.jsx)(v.Z,{variant:r?"subtitle2":"body2",color:r?"text.primary":"text.secondary",component:"span",role:l?"link":void 0,tabIndex:l?0:void 0,noWrap:g,onClick:l?Z:void 0,onKeyDown:l?w:void 0,"data-testid":C,sx:{display:"block",minWidth:0,flex:D?"0 1 auto":void 0,maxWidth:D&&null!=k?"".concat(k,"px"):void 0,...l&&{textDecoration:"underline",cursor:"pointer"},...g&&{overflow:"hidden",textOverflow:"ellipsis"}},children:n}),T=m?m(R):null==A?R:(0,p.jsx)(ee.Z,{title:A,...GA,children:R});return(0,p.jsxs)(i.Z,{ref:D?j:void 0,display:"flex",alignItems:"center",justifyContent:"flex-start",columnGap:"".concat(12,"px"),width:1,minWidth:0,overflow:"hidden",sx:x,children:[(0,o.map)(d,((e,t)=>(0,p.jsx)(i.Z,{flexShrink:0,display:"flex",alignItems:"center",children:e},t))),(0,p.jsx)(i.Z,{minWidth:0,flex:D?"0 1 auto":"1 1 auto",overflow:"hidden",children:T}),I>0&&u&&(0,p.jsx)(i.Z,{flexShrink:0,minWidth:0,maxWidth:"".concat(I,"px"),children:(0,p.jsx)(VA,{chips:u,availableWidth:I})}),(0,o.map)(c,((e,t)=>(0,p.jsx)(i.Z,{flexShrink:0,display:"flex",alignItems:"center",onClick:e=>e.stopPropagation(),children:e},t)))]})}));HA.displayName="UITableCellContent";var qA=n(94923);const YA=e=>{let{deviceId:t,manufacturer:n,firmwareVersion:r,variant:l="button",hideDisabled:s=!1,iconVariant:c="default"}=e;const{organization:u}
3=(0,d.mP)(),{streamingDeviceIds:h,startStream:m}=gk(),g=(0,a.useMemo)((()=>{var e;const i=EI({manufacturer:n,firmwareVersion:r},null!==(e=u.disallowStreaming)&&void 0!==e&&e);if(i)return{buttonTitle:"Stream",disabled:!0,tooltipTitle:i};return{buttonTitle:(0,o.includes)(h,t)?"View Stream":"Stream",onClick:()=>m(t)}}),[t,n,r,u.disallowStreaming,m,h]),v=(0,a.useCallback)((e=>{var t;e.preventDefault(),e.stopPropagation(),null===(t=g.onClick)||void 0===t||t.call(g)}),[g]),f=(0,p.jsx)(x.Z,{sx:"muted"===c?{width:24,height:24,fontSize:16,color:"text.secondary",backgroundColor:"transparent","&:hover":{backgroundColor:"transparent",color:"text.primary"},"&.Mui-disabled":{backgroundColor:"transparent"}}:{width:24,height:24,color:y.DG.purple[700],backgroundColor:y.DG.purple[50],fontSize:16,"&:hover":{backgroundColor:y.DG.purple[100]}},disabled:g.disabled,onClick:v,children:(0,p.jsx)(wI.Z,{fontSize:"inherit",color:"inherit"})}),b="button"===l?(0,p.jsx)(C.Z,{size:"small",variant:"text",endIcon:(0,p.jsx)(wI.Z,{sx:{fontSize:10,color:g.disabled?"disabled":"primary.main"}}),disabled:g.disabled,onClick:v,sx:{fontSize:"0.75rem",fontWeight:"bold",lineHeight:1.2,color:"primary.main",minHeight:22},children:g.buttonTitle}):g.tooltipTitle?f:(0,p.jsx)(ee.Z,{title:g.buttonTitle,placement:"top",children:f}),j=g.tooltipTitle,Z=(0,p.jsx)(ee.Z,{title:null!==j&&void 0!==j?j:"",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(i.Z,{display:"inline-flex",children:b})});return s&&g.disabled?null:j?Z:(0,p.jsx)(zi.W,{privilege:"default",action:"use Device Screen Streaming",children:Z})},KA=e=>{const{online:t,currentForegroundApp:n}=null!==e&&void 0!==e?e:{},i=!t,o=!i&&!1===(null===n||void 0===n?void 0:n.hmdOnUser);if(!(!i&&!o))return;const a=LI(e),r="PLAYING"===(null===a||void 0===a?void 0:a.viewDetails.videoState),l="PAUSED"===(null===a||void 0===a?void 0:a.viewDetails.videoState),s=null!==a&&void 0!==a&&a.viewDetails.videoTitle?": ".concat(a.viewDetails.videoTitle):"";return r?"Video Playing".concat(s):l?"Video Paused".concat(s):null===n||void 0===n?void 0:n.title},XA=e=>{const t=(0,u.v9)((t=>t.firestore.data.devices.data[e])),n=(0,xo.ty)(S.F.Devices,e);return(0,a.useMemo)((()=>({device:t,loaded:n})),[t,n])},QA=(0,a.memo)((e=>{let{row:t,isLegacyTable:n=!1}=e;const{device:o,loaded:r}=XA(t.original.id),l=(0,d.U5)(),{online:s,currentForegroundApp:c}=null!==o&&void 0!==o?o:{},u=!s,h=!u&&!1===(null===c||void 0===c?void 0:c.hmdOnUser),C=u?"Offline":h?"Idle":"Online",x=u?"action":"success",f=!u&&!h?qA.Z:XD,b=n?KA(o):void 0,y=(0,a.useRef)(null);return(0,a.useLayoutEffect)((()=>{n&&y.current&&gm()(y.current,{clamp:2})}),[n,r,b]),r?"COMPLETE"===(null===o||void 0===o?void 0:o.factoryResetStatus)?null:n?(0,p.jsxs)(m.Z,{overflow:"hidden",width:1,alignItems:"stretch",children:[(0,p.jsxs)(m.Z,{direction:"row",overflow:"hidden",alignItems:"center",spacing:.5,children:[(0,p.jsx)(f,{color:x,sx:{fontSize:"0.75rem"}}),(0,p.jsx)(v.Z,{variant:"body2",children:C}),l&&(0,p.jsx)(i.Z,{flexGrow:1,textAlign:"right",children:(0,p.jsx)(YA,{deviceId:t.original.id,manufacturer:null===o||void 0===o?void 0:o.manufacturer,firmwareVersion:null===o||void 0===o?void 0:o.firmwareVersion,variant:"icon",hideDisabled:!0})})]}),b&&(0,p.jsx)(ee.Z,{title:b,followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500,children:(0,p.jsx)(v.Z,{ref:y,variant:"caption",color:"text.secondary",sx:{wordBreak:"break-word"},children:b})})]}):(0,p.jsx)(HA,{value:C,startIcons:[(0,p.jsx)(f,{color:x,sx:{fontSize:"0.75rem"}},"status")],tooltip:!1}):(0,p.jsx)(g.Z,{width:"100%"})}));QA.displayName="DeviceTableCellActivity";const JA=e=>{let{row:t,device:n}=e;return(0,d.U5)()?(0,p.jsx)(YA,{deviceId:t.original.id,manufacturer:null===n||void 0===n?void 0:n.manufacturer,firmwareVersion:null===n||void 0===n?void 0:n.firmwareVersion,variant:"icon",iconVariant:"muted",hideDisabled:!0}):null};JA.displayName="DeviceTableCellStreamButton";const $A=(0,a.memo)((e=>{let{row:t}=e;const{device:n,loaded:o}=XA(t.original.id);if(!o)return(0,p.jsx)(g.Z,{width:24});return"COMPLETE"===(null===n||void 0===n?void 0:n.factoryResetStatus)?null:(0,p.jsx)(i.Z,{width:1,display:"flex",justifyContent:"flex-start",children:(0,p.jsx)(JA,{row:t,device:n})})}));$A.displayName="DeviceTableCellStream";const eR=e=>{let{side:t,batteryPercent:n}=e;return(0,p.jsx)(ee.Z,{title:"".concat(null!==n&&void 0!==n?n:"Unknown","%"),placement:"top",enterDelay:0,children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[t&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",width:10,textAlign:"center",children:t}),(0,p.jsx)(i.Z,{sx:{width:20,height:4,bgcolor:"rgba(0, 0, 0, 0.12)",borderRadius:1,overflow:"hidden"},children:(0,p.jsx)(i.Z,{sx:{width:"".concat(null!==n&&void 0!==n?n:0,"%"),height:"100%",bgcolor:(0,Vr.W7)(n)&&n<=20?"error.main":"success.main"}})})]})})},tR=(0,a.memo)((e=>{var t,n,o,a;let{row:r,isLegacyTable:l=!1}=e;const{device:s,loaded:d}=XA(r.original.id);if(!d)return(0,p.jsx)(g.Z,{width:"100%"});const c={opacity:"COMPLETE"===(null===s||void 0===s?void 0:s.factoryResetStatus)?.5:1},u=(0,Vr.W7)(null===s||void 0===s||null===(t=s.controllerData)||void 0===t||null===(n=t.controller0)||void 0===n?void 0:n.batteryLevel),h=(0,Vr.W7)(null===s||void 0===s||null===(o=s.controllerData)||void 0===o||null===(a=o.controller1)||void 0===a?void 0:a.batteryLevel),v=(0,p.jsx)(NM,{batteryPercent:null===s||void 0===s?void 0:s.batteryLevel,showCharging:(null===s||void 0===s?void 0:s.batteryIsCharging)&&s.online}),C=(0,p.jsxs)(p.Fragment,{children:[u&&(0,p.jsx)(eR,{side:(0,Vr.$G)(s.model)?"R":"L",batteryPercent:s.controllerData.controller0.batteryLevel}),h&&(0,p.jsx)(eR,{side:"R",batteryPercent:s.controllerData.controller1.batteryLevel})]});return l?(0,p.jsx)(i.Z,{marginLeft:-.5,sx:c,children:(0,p.jsxs)(m.Z,{children:[v,C]})}):(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",gap:1,sx:c,children:[v,(u||h)&&(0,p.jsx)(m.Z,{direction:"column",alignItems:"flex-start",spacing:0,children:C})]})}));tR.displayName="DeviceTableCellBattery";const nR=e=>{let{label:t,status:n,TooltipProps:i,verboseLabel:o,deviceExperienceMode:a,iconOnly:r=!1}=e;const l={Kiosk:a===vp.w_.Default?"The Kiosk OFF override grants users full access to the native system menus. This currently has no effect because this device's configuration uses Default Device Menus. However, if you later switch to a configuration with the Home Screen or a Kiosk App and keep Kiosk OFF, users will still have access to the system menus. To remove this override and respect the device's configuration, send an Enable Kiosk command.":"This device is not locked into the ManageXR Home Screen or a Kiosk App. Users can access the native system menus. To lock the device back into the ManageXR Home Screen or Kiosk App, send an Enable Kiosk command.",Tutorial:"Off"===n?"Tutorial Mode is disabled on this device. The tutorial app set on this device's configuration will not launch when the device boots up. To re-enable it, send an Enable Tutorial Mode command.":"This device is in Tutorial Mode. When a user boots up the device, they will launch into the tutorial app set on the configuration. When users exit the app, Tutorial Mode will turn off."};return(0,p.jsx)(hu,{label:t,status:n,TooltipProps:{...i,title:l[t]},verboseLabel:o,startIcon:(0,p.jsx)(vf.Z,{color:"info",sx:{fontSize:r?16:12}}),iconOnly:r})},iR=(0,a.memo)((e=>{var t;let{row:n,isLegacyTable:i=!1}=e;const o=(0,l.k6)(),{device:r,loaded:s}=XA(n.original.id),d=(0,xo.ky)(S.F.Configurations,null===r||void 0===r?void 0:r.deviceGroupRef.id),u=(0,Le.ye)("enableTutorialModeRevamp"),h=null!==(t=null===d||void 0===d?void 0:d.name)&&void 0!==t?t:"",C=(0,a.useRef)(null),x=(0,c.LT)(c._j.organization.configurations.configuration,{organizationId:null===d||void 0===d?void 0:d.organizationRef.id,configurationId:null===d||void 0===d?void 0:d.id}),f=(0,a.useCallback)((()=>{o.push(x)}),[o,x]),b=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),f()}),[f]),y=(0,a.useCallback)((e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),f())}),[f]);if((0,a.useLayoutEffect)((()=>{i&&C.current&&gm()(C.current,{clamp:2})}),[h,i]),!i&&(!s||!d))return(0,p.jsx)(g.Z,{width:"100%"});if(!d)return(0,p.jsx)(g.Z,{width:"100%"});return"COMPLETE"===(null===r||void 0===r?void 0:r.factoryResetStatus)?null:i?(0,p.jsxs)(m.Z,{overflow:"hidden",spacing:.25,children:[(0,p.jsx)(ee.Z,{title:d.name,followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500,children:(0,p.jsx)(v.Z,{ref:C,component:"span",variant:"subtitle2",role:"link",tabIndex:0,onClick:b,onKeyDown:y,sx:{wordBreak:"break-word",color:"primary.main",cursor:"pointer"},"data-testid":"deviceList_tableRow_configuration",children:h})}),(null===r||void 0===r?void 0:r.vendorMigrationPending)&&(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(bI.Z,{sx:{fontSize:16,color:"text.secondary"}}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"MHMS Migration Pending"})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[!1===(null===r||void 0===r?void 0:r.kioskModeEnabled)&&!(null!==r&&void 0!==r&&r.qfbDeviceMode)&&(0,p.jsx)(nR,{label:"Kiosk",status:"Off",TooltipProps:{placement:"left"},deviceExperienceMode:d.deviceExperienceMode}),u?!1===(null===r||void 0===r?void 0:r.tutorialModeEnabled)&&d.tutorialAppRef&&(0,p.jsx)(nR,{label:"Tutorial",status:"Off",TooltipProps:{placement:"bottom-end"}}):(null===r||void 0===r?void 0:r.firstTimeUseModeEnabled)&&(0,p.jsx)(nR,{label:"Tutorial",status:"On",TooltipProps:{placement:"bottom-end"}}),(0,p.jsx)(mu,{qfbDeviceMode:null===r||void 0===r?void 0:r.qfbDeviceMode})]})]}):(0,p.jsx)(HA,{value:h,link:!0,onNavigate:f,"data-testid":"deviceList_tableRow_configuration"})}));iR.displayName="DeviceTableCellConfiguration";const oR=(0,a.memo)((e=>{let{row:t}=e;const{device:n,loaded:i}=XA(t.original.id);if(!i)return(0,p.jsx)(g.Z,{width:"100%"});if("COMPLETE"===(null===n||void 0===n?void 0:n.factoryResetStatus))return null;const o=KA(n);return(0,p.jsx)(HA,{value:null!==o&&void 0!==o?o:"--",tooltip:null!==o&&void 0!==o&&o})}));oR.displayName="DeviceTableCellCurrentActivity";const aR=e=>
3{let{firmwareVersion:t,releaseNotesUrl:n,children:i}=e;return(0,p.jsx)(ee.Z,{title:(0,p.jsxs)(m.Z,{spacing:.75,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,p.jsx)(v.Z,{variant:"caption",color:"inherit",sx:{opacity:.7},children:"Full firmware version"}),(0,p.jsx)(v.Z,{variant:"caption",color:"inherit",fontWeight:"bold",children:t}),(0,p.jsx)(Ie.Z,{sx:{borderColor:"rgba(255, 255, 255, 0.2)"}}),(0,p.jsxs)(Kn.Z,{href:n,target:"_blank",rel:"noopener noreferrer",variant:"caption",fontWeight:"bold",sx:{color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",gap:.5,paddingTop:.25},children:[(0,p.jsx)(Mu.Z,{sx:{fontSize:13}}),"Release Notes"]})]}),disableInteractive:!1,placement:"bottom-start",componentsProps:{tooltip:{sx:{borderRadius:2,paddingX:2.5,paddingY:1.25}}},children:i})};aR.displayName="UIFirmwareVersionTooltip";const rR=(0,a.memo)((e=>{var t,n;let{row:i}=e;const{device:o,loaded:a}=XA(i.original.id);if(!a)return(0,p.jsx)(g.Z,{width:"100%"});const{horizonOsVersion:r}=(0,Vr.aE)({manufacturer:null===o||void 0===o?void 0:o.manufacturer,firmwareVersion:null===o||void 0===o?void 0:o.firmwareVersion}),l=null!==(t=(0,Vr.xQ)({firmwareDisplayVersion:null===o||void 0===o?void 0:o.firmwareDisplayVersion,manufacturer:null===o||void 0===o?void 0:o.manufacturer,firmwareVersion:null===o||void 0===o?void 0:o.firmwareVersion}))&&void 0!==t?t:"--",s=!!(r||null!==o&&void 0!==o&&o.firmwareDisplayVersion),d={opacity:"COMPLETE"===(null===o||void 0===o?void 0:o.factoryResetStatus)?.5:1};return s?(0,p.jsx)(HA,{value:l,sx:d,wrapTooltip:e=>{var t;return(0,p.jsx)(aR,{firmwareVersion:null!==(t=null===o||void 0===o?void 0:o.firmwareVersion)&&void 0!==t?t:"Unknown",releaseNotesUrl:Be.IW.metaHorizonOsReleaseNotes,children:e})}}):(0,p.jsx)(HA,{value:l,tooltip:"Firmware version: ".concat(null!==(n=null===o||void 0===o?void 0:o.firmwareVersion)&&void 0!==n?n:"Unknown"),sx:d})}));rR.displayName="DeviceTableCellFirmware";const lR=(0,a.memo)((e=>{let{row:t}=e;const{device:n,loaded:i}=XA(t.original.id);if(!i)return(0,p.jsx)(g.Z,{width:"100%"});const o=null===n||void 0===n?void 0:n.lastUpdated,a=o?(0,M.pq)(o):"Never synced",r=o?"Last sync: ".concat((0,M.aH)(o)):"Device has never synced";return(0,p.jsx)(HA,{value:a,tooltip:r,sx:{opacity:"COMPLETE"===(null===n||void 0===n?void 0:n.factoryResetStatus)?.5:1}})}));lR.displayName="DeviceTableCellLastSynced";const sR=(0,a.memo)((e=>{let{row:t}=e;const{device:n,loaded:i}=XA(t.original.id);if(!i)return(0,p.jsx)(g.Z,{width:"100%"});const o=(0,Vr.ao)(null===n||void 0===n?void 0:n.model);return(0,p.jsx)(HA,{value:o,sx:{opacity:"COMPLETE"===(null===n||void 0===n?void 0:n.factoryResetStatus)?.5:1}})}));sR.displayName="DeviceTableCellModel";var dR=n(19467);const cR=(0,a.memo)((e=>{let{row:t}=e;const{device:n,loaded:i}=XA(t.original.id),r=(0,a.useMemo)((()=>(0,o.map)(null===n||void 0===n?void 0:n.tagRefs,"id")),[null===n||void 0===n?void 0:n.tagRefs]),l=(0,E.Ev)(S.F.Tags,r,{sort:ze.gt}),s=(0,a.useMemo)((()=>(0,o.map)(l,(e=>({id:e.id,label:e.name})))),[l]),d=(null===n||void 0===n?void 0:n.name)||t.original.name||"",c=(0,a.useMemo)((()=>{if(null!==n&&void 0!==n&&n.notes)return[(0,p.jsx)(Fi._,{tooltipText:n.notes,children:(0,p.jsx)(dR.Z,{color:"action",sx:{fontSize:"1.125rem",display:"block"}})},"notes")]}),[null===n||void 0===n?void 0:n.notes]);return i?(0,p.jsx)(HA,{primary:!0,value:d,chips:(0,o.isEmpty)(s)?void 0:s,endIcons:c,sx:{opacity:"COMPLETE"===(null===n||void 0===n?void 0:n.factoryResetStatus)?.5:1}}):(0,p.jsx)(g.Z,{width:"100%"})}));cR.displayName="DeviceTableCellName";const uR=(0,a.memo)((e=>{let{row:t}=e;const{device:n,loaded:i}=XA(t.original.id);if(!i)return(0,p.jsx)(g.Z,{width:"100%"});const o=(null===n||void 0===n?void 0:n.serial)||t.original.serial;return(0,p.jsx)(HA,{value:o,sx:{opacity:"COMPLETE"===(null===n||void 0===n?void 0:n.factoryResetStatus)?.5:1}})}));uR.displayName="DeviceTableCellSerial";const pR=()=>(0,z.T)("firmwareHold");let hR,mR;!function(e){e.PATCH_INSTALL="PATCH_INSTALL",e.FULL_INSTALL="FULL_INSTALL",e.FORCE_INSTALL="FORCE_INSTALL"}(hR||(hR={})),function(e){e.QUEUED="QUEUED",e.SETUP="SETUP",e.DOWNLOADING="DOWNLOADING",e.PATCHING="PATCHING",e.READY_TO_INSTALL="READY_TO_INSTALL",e.INSTALLING="INSTALLING",e.CLEANUP="CLEANUP",e.COMPLETE="COMPLETE",e.ERROR="ERROR"}(mR||(mR={}));const gR={QUEUED:"Queued",SETUP:"Queued",DOWNLOADING:"Downloading",PATCHING:"Patching",READY_TO_INSTALL:"Queued",INSTALLING:"Installing",CLEANUP:"Installing",COMPLETE:"Installing",ERROR:"Failed"};let vR,CR,xR,fR;!function(e){e.QUEUED="QUEUED",e.DOWNLOADING="DOWNLOADING",e.COMPLETE="COMPLETE",e.ERROR="ERROR"}(vR||(vR={})),function(e){e.UP_TO_DATE="UP_TO_DATE",e.DOWNLOADING="DOWNLOADING",e.READY_TO_INSTALL="READY_TO_INSTALL",e.ERROR="ERROR"}(CR||(CR={})),function(e){e.QUEUED="QUEUED",e.COMPLETE="COMPLETE",e.ERROR="ERROR"}
3(xR||(xR={})),function(e){e.QUEUED="QUEUED",e.COMPLETE="COMPLETE",e.ERROR="ERROR"}(fR||(fR={}));const bR=()=>{var e,t,n,i,a,r;const{device:l,configuration:s,targetRuntimeSettings:d}=DR(),c=null===(e=(0,z.T)("featureFlags"))||void 0===e?void 0:e.ignore3dEnvironmentForDevices;return c&&(0,o.some)(c,(e=>e===l.manufacturer||e===l.model))?null===d||void 0===d||null===(t=d.customLauncherSettings)||void 0===t||null===(n=t.backgroundSettings)||void 0===n||null===(i=n.environmentFile)||void 0===i?void 0:i.id:null===(a=s.customLauncherSettings)||void 0===a||null===(r=a.backgroundSettings)||void 0===r?void 0:r.environmentFileId},yR=e=>(0,o.fromPairs)((0,o.map)(e,(e=>[e.path,{id:e.id,path:e.path,url:""}]))),jR=new Map,ZR=e=>{const{requestAsync:t}=hC(),[n,i]=(0,a.useState)({}),r=(0,a.useRef)(new Set),l=(0,a.useRef)(!1);(0,a.useEffect)((()=>()=>{l.current=!0}),[]);const s=(0,a.useMemo)((()=>(e=>{var t;return(0,o.compact)([null===e||void 0===e||null===(t=e.filesManifest)||void 0===t?void 0:t.manifestPath,...(0,o.map)((0,o.values)(null===e||void 0===e?void 0:e.apps),(e=>{var t;return null===(t=e.filesManifest)||void 0===t?void 0:t.manifestPath}))])})(e)),[e]);return(0,a.useEffect)((()=>{(0,o.forEach)(s,(e=>{r.current.has(e)||(r.current.add(e),((e,t)=>{let n=jR.get(e);return n||(n=t({data:{manifestPath:e}}).then((e=>{let{downloadUrl:t}=e;return Dg().get(t)})).then((e=>e.data)),n.catch((()=>jR.delete(e))),jR.set(e,n)),n})(e,t).then((t=>{l.current||i((n=>({...n,[e]:t})))})).catch((t=>{(0,Si.yR)(t,{name:"RuntimeFileManifestFetchError",contexts:{manifest:{manifestPath:e}}})})))}))}),[s,t]),(0,a.useMemo)((()=>e?((e,t)=>{const n={...e},i=e.filesManifest?t[e.filesManifest.manifestPath]:void 0;return i&&(n.files=yR(i)),e.apps&&(n.apps=(0,o.mapValues)(e.apps,(e=>{const n=e.filesManifest?t[e.filesManifest.manifestPath]:void 0;return n?{...e,files:yR(n)}:e}))),n})(e,n):void 0),[e,n])},wR=10600,ER=(0,a.createContext)(void 0),SR=e=>{let{deviceId:t,configurationId:n,renderPlaceholder:i,children:r}=e;const l=(0,Le.S5)(),s=(0,z.l)(S.F.Devices,t),d=null!==n&&void 0!==n?n:null===s||void 0===s?void 0:s.deviceGroupRef.id,c=(0,xo.ky)(S.F.Configurations,d),u=d===(null===s||void 0===s?void 0:s.deviceGroupRef.id),h=(0,E.Ev)(S.F.Videos,(0,a.useMemo)((()=>(0,o.map)(null===c||void 0===c?void 0:c.approvedVideos,"id")),[null===c||void 0===c?void 0:c.approvedVideos]),{sort:ze.gA}),m=(0,E.Ev)(S.F.Apps,(0,a.useMemo)((()=>(0,o.map)(null===c||void 0===c?void 0:c.approvedApps,"id")),[null===c||void 0===c?void 0:c.approvedApps]),{sort:ze.gA}),g=(0,E.Ev)(S.F.WebXRApps,(0,a.useMemo)((()=>(0,o.map)(null===c||void 0===c?void 0:c.approvedWebXRApps,"id")),[null===c||void 0===c?void 0:c.approvedWebXRApps]),{sort:ze.gA}),v=(0,E.Ev)(S.F.InstantApps,(0,a.useMemo)((()=>(0,o.map)(null===c||void 0===c?void 0:c.approvedInstantApps,"id")),[null===c||void 0===c?void 0:c.approvedInstantApps]),{sort:ze.gA}),C=II(v,null===s||void 0===s?void 0:s.model),x=(0,z.l)(S.F.DeviceInstalledApps,null===s||void 0===s?void 0:s.userId),f=(0,xo.ty)(S.F.DeviceInstalledApps,null===s||void 0===s?void 0:s.userId),b=(0,z.l)(S.F.DeviceStatuses,null===s||void 0===s?void 0:s.userId),y=(0,xo.ty)(S.F.DeviceStatuses,null===s||void 0===s?void 0:s.userId),j=(0,z.l)(S.F.DeviceCurrentRuntimeSettings,null===s||void 0===s?void 0:s.userId),Z=ZR(j),w=(0,xo.ty)(S.F.DeviceCurrentRuntimeSettings,null===s||void 0===s?void 0:s.userId),D=(0,z.l)(S.F.DeviceTargetRuntimeSettings,null===s||void 0===s?void 0:s.userId),M=(0,xo.ty)(S.F.DeviceTargetRuntimeSettings,null===s||void 0===s?void 0:s.userId),[k,I]=(0,a.useState)(),{request:A}=(0,Fe.pv)({method:"post",path:"devices/:deviceId/generate-runtime-settings-preview"});(0,a.useEffect)((()=>{if(!t||!d||u||(null===k||void 0===k?void 0:k.configurationId)===d)return;const e=new AbortController;return I(void 0),A({params:{deviceId:t},data:{configurationId:d},onSuccess:e=>I({runtimeSettingsPreview:e,configurationId:d}),errorMessage:"Failed to load sync status",controller:e}),()=>e.abort()}),[d,u,t,A,null===k||void 0===k?void 0:k.configurationId]);const R=(0,a.useMemo)((()=>u?(null===D||void 0===D?void 0:D.configuration.id)===d?D:void 0:null===k||void 0===k?void 0:k.runtimeSettingsPreview),[d,u,null===k||void 0===k?void 0:k.runtimeSettingsPreview,D]),T=ZR(R);return s&&c&&y&&f&&w&&M?(0,p.jsx)(ER.Provider,{value:{device:s,configurationMatchesDevice:u,configuration:c,approvedApps:m,approvedVideos:h,approvedInstantApps:l?[]:v,resolvedInstantApps:C,approvedWebXRApps:g,deviceStatus:b,installedApps:x,currentRuntimeSettings:Z,targetRuntimeSettings:T},children:r}):i},DR=()=>{const e=(0,a.useContext)(ER);if((0,o.isUndefined)(e))throw new Error("useDeviceSyncStatusContext() must be used within a DeviceSyncStatusContext");return e},MR="FORCE_ENABLE_META_FIRMWARE_UPDATES",kR=()=>{const{device:e,configuration:t}=DR(),n=(e=>{const{manufacturer:t,isQfbDevice:n,configurationFeatureFlags:i}=e,o=(0,d.P)("FORCE_ENABLE_META_FIRMWARE_UPDATES"),a=(0,d.P)("DISABLE_META_FIRMWARE_UPDATES"),r=(0,Le.ye)("disableQfbDevicesMetaFirmwareUpdates"),l=(0,Le.ye)("disableLegacyDevicesMetaFirmwareUpdates"),s=(0,Le.ye)("disableMetaFirmwareUpdates"),c=pR();if(c&&t===bi.p6.Oculus&&(null===i||void 0===i||!i.includes(MR))&&!o)return a?c.messageMetaBlock:n&&r?c.messageMHMSBlock:!n&&l?c.messageLegacyBlock:s?c.messageMetaBlock:void 0})({manufacturer:e.manufacturer,isQfbDevice:e.isQfbDevice,configurationFeatureFlags:t.featureFlags}),i=(e=>{const{manufacturer:t,isQfbDevice:n,configurationFeatureFlags:i}=e,o=(0,d.P)("FORCE_ENABLE_META_FIRMWARE_UPDATES"),a=(0,d.P)("POSTPONE_META_DEVICE_FIRMWARE_UPDATES"),r=(0,Le.ye)("postponeQfbDevicesMetaFirmwareUpdates"),l=(0,Le.ye)("postponeLegacyDevicesMetaFirmwareUpdates"),s=(0,Le.ye)("postponeMetaFirmwareUpdates"),c=pR();if(c&&t===bi.p6.Oculus&&(null===i||void 0===i||!i.includes(MR))&&!o)return a?c.messageMetaPostpone:n&&r?c.messageMHMSPostpone:!n&&l?c.messageLegacyPostpone:s?c.messageMetaPostpone:void 0})({manufacturer:e.manufacturer,isQfbDevice:e.isQfbDevice,configurationFeatureFlags:t.featureFlags});return(0,o.isUndefined)(n)?!(0,o.isUndefined)(i)&&i:n},IR=()=>{const{approvedApps:e,targetRuntimeSettings:t}=DR(),n=Be.vc.configuration.adminAppPackageNames,i=(0,o.find)(null===t||void 0===t?void 0:t.apps,((e,t)=>(0,o.includes)(n,t))),a=null===i||void 0===i?void 0:i.packageName,r=(0,o.some)(e,{packageName:a}),l=(0,z.l)(S.F.Apps,a);if(!r)return l},AR=()=>{const{configuration:e,approvedApps:t,targetRuntimeSettings:n}=DR(),i=(0,o.find)(null===n||void 0===n?void 0:n.apps,Vs.Tv),a=(0,z.l)(S.F.Apps,null===i||void 0===i?void 0:i.id),r=e.deviceExperienceMode===vp.w_.HomeScreen||e.deviceExperienceMode===vp.w_.KioskVideo||e.deviceExperienceMode===vp.w_.Kiosk&&e.enableKioskShortcutMenu;if(!(0,d.U5)()||!r)return;return(0,o.some)(t,Vs.Tv)?void 0:a},RR=()=>{const{approvedApps:e,configuration:t,device:n}=DR(),i=Be.vc.configuration.wolvicAppId,a=Be.vc.configuration.compatibleDeviceModelsForWolvicApp,r=(0,z.l)(S.F.Apps,i),l=!!n.model&&a.includes(n.model),s=!t.webXRBrowserSetting||t.webXRBrowserSetting===vp.vB.DEFAULT;if(!l||s)return;const d=Be.vc.configuration.wolvicAppPackageName;return!(0,o.find)(e,{packageName:d})?r:void 0},TR=()=>{const{approvedApps:e,device:t}=DR(),n=Be.vc.configuration.pico4UltraEnterpriseAutoGrantPermissionAppPackageName,i=(0,o.some)(e,{packageName:n}),a=(0,z.l)(S.F.Apps,n);if(!i&&t.manufacturer&&t.model===bi.Q6.Pico4UltraEnterprise)return a},PR=()=>{const{approvedApps:e,device:t}=DR(),n=(0,d.P)("SHOW_OEM_CONFIG_SYNC_STATUS"),i=(0,X.bo)(),a=Be.vc.configuration.oemConfigAppPackageName,r=Be.vc.configuration.oemConfigAppPackageNameLegacy,l=(0,o.some)(e,{packageName:a}),s=(0,z.l)(S.F.Apps,a),c=(0,z.l)(S.F.Apps,r);if(!i&&!n)return;const u=t.firmwareVersion&&(0,Vs.Wp)(t.firmwareVersion,"72.0.0")>=0;if(l||t.manufacturer!==bi.p6.Oculus||t.model===bi.Q6.OculusQuest1||!u)return;return t.firmwareVersion&&(0,Vs.Wp)(t.firmwareVersion,"78.0.0")<0?c:s},LR=()=>{const{approvedApps:e,device:t}=DR(),n=(0,d.P)("SHOW_META_KIOSK_APK_SYNC_STATUS"),i=(0,X.bo)(),a=Be.vc.configuration.metaKioskAppPackageName,r=(0,o.some)(e,{packageName:a}),l=(0,Vr.wz)(t)>=79?Be.vc.configuration.metaKioskAppV79Id:Be.vc.configuration.metaKioskAppPackageName,s=(0,z.l)(S.F.Apps,l);if(!i&&!n)return;const c=t.firmwareVersion&&(0,Vs.Wp)(t.firmwareVersion,"72.0.0")>=0;return r||t.manufacturer!==bi.p6.Oculus||t.model===bi.Q6.OculusQuest1||t.isQfbDevice||!c?void 0:s},NR=e=>{const{resolvedInstantApps:t}=DR();return(0,o.find)(t,(t=>{var n;return(null===(n=t.instantAppRef)||void 0===n?void 0:n.id)===e.id}))},UR=[{deviceModel:bi.Q6.Pico4UltraEnterprise,packageName:"com.PrismsOfReality.Math.Main.Pico",versionCode:1356},{deviceModel:bi.Q6.Pico4UltraEnterprise,packageName:"com.PrismsOfReality.Science.Main.Pico",versionCode:491}],FR=[mR.PATCHING,mR.READY_TO_INSTALL,mR.INSTALLING,mR.CLEANUP,mR.COMPLETE],OR=(e,t)=>{var n,r,l,s,d,c,u,h,g,v,C;const{device:x,deviceStatus:f,installedApps:b,currentRuntimeSettings:y,targetRuntimeSettings:j}=DR(),Z=(0,Le.ye)("ignorePrismsObbErrors"),w=(0,Vs.HB)(e),E=x.manufacturer===bi.p6.Oculus&&!0===x.isQfbDevice;let S=null===j||void 0===j||null===(n=j.apps)||void 0===n?void 0:n[e.packageName];t&&S&&(S={...S,versionCode:e.versionCode,versionName:e.versionName,versionLabel:e.versionLabel});const D=null===y||void 0===y||null===(r=y.apps)||void 0===r?void 0:r[e.packageName],M=null===b||void 0===b?void 0:b[e.packageName],k=(0,a.useMemo)((()=>{var t,n;const i=M&&!D,o=M&&D&&(null!==(t=D.versionCode)&&void 0!==t?t:0)<1;if(i||o){return{id:e.id,packageName:e.packageName,title:e.title,iconUrl:e.iconUrl,organizationId:e.organizationRef.id,versionCode:M.versionCode,versionName:M.versionName}}if(!((null!==(n=null===D||void 0===D?void 0:D.versionCode)&&void 0!==n?n:0)<1))return D}),[M,D,e]),I=null===f||void 0===f||null===(l=f.appStatuses)||void 0===l?void 0:l[e.packageName],A=(null===I||void 0===I?void 0:I.nextVersion)===(null===(s=S)||void 0===s?void 0:s.versionCode)&&(null===I||void 0===I?void 0:I.nextVersionName)===(null===(d=S)||void 0===d?void 0:d.versionName),R=(0,o.includes)(FR,null===I||void 0===I?void 0:I.status),T=x.online&&x.updating,P=A&&(T||(null===I||void 0===I?void 0:I.status)===mR.ERROR||!R&&(null!==(c=null===I||void 0===I?void 0:I.progress)&&void 0!==c?c:0)>0)?I:void 0,L=P&&!T&&P.status!==mR.ERROR,N=A&&(null===I||void 0===I?void 0:I.status)===mR.READY_TO_INSTALL&&(null===(u=x.currentForegroundApp)||void 0===u?void 0:u.packageName)===e.packageName&&!(null!==(h=S)&&void 0!==h&&h.forceInstall),U=(null===k||void 0===k?void 0:k.versionCode)&&(null===(g=S)||void 0===g?void 0:g.versionCode)&&k.versionCode>S.versionCode,F=!(null!==(v=S)&&void 0!==v&&v.forceInstall)&&!P&&U,O=(null===P||void 0===P?void 0:P.status)===mR.ERROR&&P.errorCode===dD.DOWNGRADE_ERROR,_=F||O,z=t,B=(0,Vs.gk)(e,k)||z&&_,W
3=(0,o.keys)(null===(C=S)||void 0===C?void 0:C.files),V=Z&&(0,o.some)(UR,(t=>{var n;return t.deviceModel===x.model&&t.packageName===e.packageName&&t.versionCode===(null===(n=S)||void 0===n?void 0:n.versionCode)}))?0:(0,o.sumBy)(W,(e=>{var t;return null!==k&&void 0!==k&&null!==(t=k.files)&&void 0!==t&&t[e]?0:1})),G=0===V,H=B&&G,q=(0,Vs.IR)(e),[Y,K]=q?["expired","Expired"]:H?["success","Synced"]:_?["error","Unable to Downgrade"]:P?[P.status===mR.ERROR?"error":"pending",N?"Waiting":gR[P.status]]:k?["warning",B?"Missing Files":"Out of Date"]:["warning","Not Installed"],X=_&&!z?cD({type:"app_install_error",code:dD.DOWNGRADE_ERROR}):"error"===Y?cD({type:"app_install_error",code:null===P||void 0===P?void 0:P.errorCode,message:null===P||void 0===P?void 0:P.message}):void 0;let Q;X||(0,o.isEmpty)(W)||(Q=(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(i.Z,{children:["App Version: ",B?"Up to Date":"Out of Date"," ",k&&"(v.".concat(k.versionName," installed)")]}),(0,p.jsxs)(i.Z,{children:["Bundled Files: ",G?"Up to Date":"Out of Date"," ",V>0&&"(".concat(V," of ").concat(W.length," files missing)")]}),(!B||!G)&&(0,p.jsx)(i.Z,{marginTop:1,children:B||G?B?"Device will retry downloading missing files on next sync":"Device will retry downloading APK on next sync":"Device will retry downloading the app and bundled files on next sync"})]}));const J=R?void 0:P,{progress:$,totalBytesDownloaded:ee,totalDownloadSize:te,timeRemaining:ne,downloadSpeed:ie}=null!==J&&void 0!==J?J:{};if(w){var oe;if(!E)return{targetRuntimeApp:void 0,currentRuntimeApp:void 0,isForegroundPending:!1,indicatorProps:{status:"unavailable",labelSecondary:"Not Available for Device",tooltipTitle:"Editing this setting is only supported for Meta Quest devices enrolled through ".concat(bi.RZ)}};const e=(null===I||void 0===I?void 0:I.status)===mR.ERROR,t=!e&&(null!==(oe=null===k||void 0===k?void 0:k.versionCode)&&void 0!==oe?oe:0)>0,n=e?cD({type:"app_install_error",code:null===I||void 0===I?void 0:I.errorCode,message:null===I||void 0===I?void 0:I.message}):void 0;return{targetRuntimeApp:void 0,currentRuntimeApp:t?k:void 0,isForegroundPending:!1,indicatorProps:{status:e?"error":t?"success":"warning",labelSecondary:e?gR[mR.ERROR]:t?"Synced":"Not Installed",tooltipTitle:n}}}return{targetRuntimeApp:S,currentRuntimeApp:k,isForegroundPending:N,indicatorProps:{status:Y,labelSecondary:K,progressValue:$,tooltipTitle:null!==X&&void 0!==X?X:Q,totalBytesDownloaded:ee,totalDownloadSize:te,timeRemaining:ne,downloadSpeed:ie,expiredApp:q?e:void 0,isPaused:L}}},_R=e=>{var t,n;const{device:i,deviceStatus:a,currentRuntimeSettings:r}=DR(),l=null===a||void 0===a||null===(t=a.videoStatuses)||void 0===t?void 0:t[e.id],s=i.online&&i.updating||(null===l||void 0===l?void 0:l.status)===vR.ERROR?l:void 0,d=(0,o.find)((0,o.values)(null===r||void 0===r?void 0:r.videos),(t=>t.id===e.id)),c=!(null===d||void 0===d||!d.storageUrl),[u,p]=c?["success","Synced"]:s?[{QUEUED:"pending",DOWNLOADING:"pending",COMPLETE:"success",ERROR:"error"}[s.status],{QUEUED:"Queued",DOWNLOADING:"Downloading",COMPLETE:"Synced",ERROR:"Error"}[s.status]]:["warning","Missing"],h="error"===u?cD({type:"video_install_error",code:null===s||void 0===s?void 0:s.errorCode,message:null===s||void 0===s?void 0:s.message}):"",m=e.description?e.description:e.type.replace(/_/,"");return{video:e,subtitle:m,indicatorProps:{status:u,labelSecondary:p,tooltipTitle:h,progressValue:null!==(n=null===s||void 0===s?void 0:s.progress)&&void 0!==n?n:0,totalBytesDownloaded:null===s||void 0===s?void 0:s.totalBytesDownloaded,totalDownloadSize:null===s||void 0===s?void 0:s.totalDownloadSize,timeRemaining:null===s||void 0===s?void 0:s.timeRemaining,downloadSpeed:null===s||void 0===s?void 0:s.downloadSpeed}}},zR=e=>{const{currentRuntimeSettings:t}=DR(),n=(0,o.find)((0,o.values)(null===t||void 0===t?void 0:t.webXRApps),(t=>t.id===e.id)),i=n?"success":"warning",a=n?"Synced":"Missing";return{subtitle:null!==e&&void 0!==e&&e.description?e.description:null===e||void 0===e?void 0:e.url,indicatorProps:{status:i,labelSecondary:a}}},BR=(e,t,n)=>n?{status:"success",labelSecondary:"Synced"}:e.online&&e.updating&&t?{status:"pending",labelSecondary:"Syncing"}:{status:"warning",labelSecondary:"Out of date"},WR=()=>{const{configuration:e,device:t,currentRuntimeSettings:n,configurationMatchesDevice:i}
3=DR(),a=dm(e),r=[],l=VR(e,n);r.push(l);const s=YR(e,n);s&&r.push(s);const d=KR(e,n);d&&r.push(d);const c=XR(e,n);c&&r.push(c);const u=e.deviceExperienceMode===vp.w_.HomeScreen,p=e.deviceExperienceMode===vp.w_.Kiosk||e.deviceExperienceMode===vp.w_.KioskVideo,h=(0,Le.ye)("enableAutoCenterUiToggle"),m=qR(t,e,n);if(u||p){var g,v,C,x,f,b,y,j,Z,w;m&&r.push(m);const l=u?null!==(g=null===(v=e.customLauncherSettings)||void 0===v?void 0:v.disableShortcutMenu)&&void 0!==g&&g:!e.enableKioskShortcutMenu,s=u?null!==(C=null===n||void 0===n||null===(x=n.customLauncherSettings)||void 0===x?void 0:x.disableShortcutMenu)&&void 0!==C&&C:!(null!==n&&void 0!==n&&n.enableKioskShortcutMenu);r.push({title:"Shortcut Menu",label:l?"Off":"On",indicatorProps:BR(t,i,l===s)});const d=e.kioskModeStrictness,c=null===n||void 0===n?void 0:n.kioskModeStrictness;d&&r.push({title:"Kiosk Mode Strictness",label:vp.Vn[d],indicatorProps:BR(t,i,d===c)});const p=null===(f=e.customLauncherSettings)||void 0===f?void 0:f.displayLanguage;if(p){var E;const e=null===n||void 0===n||null===(E=n.customLauncherSettings)||void 0===E?void 0:E.displayLanguage,o=BR(t,i,p===e);r.push({title:"Display Language",label:vp.Yw[p],indicatorProps:o})}const k=null!==(b=null===(y=e.customLauncherSettings)||void 0===y?void 0:y.adminPin)&&void 0!==b?b:Be.vc.configuration.defaultLauncherAdminPin,I=null!==(j=null===n||void 0===n||null===(Z=n.customLauncherSettings)||void 0===Z?void 0:Z.adminPin)&&void 0!==j?j:Be.vc.configuration.defaultLauncherAdminPin,A=BR(t,i,k===I);if(r.push({title:"Admin PIN",label:k,indicatorProps:A}),h){var S,D;const o=!(null===(S=e.customLauncherSettings)||void 0===S||!S.autoCenterUI),a=!(null===n||void 0===n||null===(D=n.customLauncherSettings)||void 0===D||!D.autoCenterUI),l=BR(t,i,o===a);r.push({title:"Auto-center Menu",label:o?"On":"Off",indicatorProps:l})}const R=null===(w=e.customLauncherSettings)||void 0===w?void 0:w.orderedCategories;if(!(0,o.isUndefined)(R)){var M;const e=null===n||void 0===n||null===(M=n.customLauncherSettings)||void 0===M?void 0:M.orderedCategories,l=(0,o.isEqual)(R,e),s=Array.isArray(R)&&(0,o.isEmpty)(R)?"No categories":(null!==R&&void 0!==R?R:a).join(", ");r.push({title:"Categories",label:s,indicatorProps:BR(t,i,l)})}}const k=QR(e,n);k&&r.push(k);const I=GR(e,n);I&&r.push(I);const A=HR(t,e,n);A&&r.push(A);const R=eT(t,e,n);R&&r.push(R);const T=$R(t,e,n);T&&r.push(T);const P=tT(t,e,n);P&&r.push(P);const L=JR(t,e,n);return L&&e.deviceExperienceMode===vp.w_.Default&&r.push(...L),r},VR=(e,t)=>{const{device:n,configurationMatchesDevice:i}=DR(),o={[vp.w_.HomeScreen]:(0,Vs.Tv)(null===t||void 0===t?void 0:t.kioskApp),[vp.w_.Default]:!(null!==t&&void 0!==t&&t.kioskApp)&&!(null!==t&&void 0!==t&&t.kioskVideoId),[vp.w_.Kiosk]:!(null===t||void 0===t||!t.kioskApp),[vp.w_.KioskVideo]:!(null===t||void 0===t||!t.kioskVideoId)},a=(null===t||void 0===t?void 0:t.deviceExperienceMode)===e.deviceExperienceMode&&o[e.deviceExperienceMode],[r,l]=a?["success","Synced"]:n.online&&n.updating&&i?["pending","Syncing"]:["warning","Out of date"];return{title:"Experience Type",label:vp.qu[e.deviceExperienceMode],indicatorProps:{status:r,labelSecondary:l}}},GR=(e,t)=>{var n,i,a,r;const l=null===t||void 0===t||null===(n=t.customLauncherSettings)||void 0===n?void 0:n.colors,s=(0,xo.ky)(S.F.HomeScreenColorThemes,null===(i=e.customLauncherSettings)||void 0===i||null===(a=i.colorThemeRef)||void 0===a?void 0:a.id);if((null===e||void 0===e?void 0:e.deviceExperienceMode)!==vp.w_.HomeScreen&&(null===e||void 0===e?void 0:e.deviceExperienceMode)!==vp.w_.Kiosk)return;const d=null===(r=e.customLauncherSettings)||void 0===r?void 0:r.customColors,c=s?s.colors:d;if(!c)return;const u=(0,o.isEqual)(c,l);return{title:"Colors",label:s?s.name:"Custom Theme",indicatorProps:u?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"}}},HR=(e,t,n)=>{var i;const a=zv();if((null===t||void 0===t?void 0:t.deviceExperienceMode)!==vp.w_.HomeScreen&&(null===t||void 0===t?void 0:t.deviceExperienceMode)!==vp.w_.Kiosk)return;
3const r=e.model===bi.Q6.PicoNeo3Eye?bi.Q6.PicoNeo3:e.model,l=e.manufacturer;if(!l||!r)return;const s=(0,o.every)(a,(e=>(e=>{var i,a,s;const d=(0,o.get)(null===n||void 0===n||null===(i=n.customLauncherSettings)||void 0===i?void 0:i.hiddenSettings,e),c=(0,o.get)(null===t||void 0===t||null===(a=t.customLauncherSettings)||void 0===a?void 0:a.hiddenSettings,e);return!(!vp.oh[e]||(0,o.includes)(null===(s=vp.oh[e])||void 0===s?void 0:s[l],r))||(0,o.isEqual)(c,d)})(e)))?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"},d=(0,o.map)(null===t||void 0===t||null===(i=t.customLauncherSettings)||void 0===i?void 0:i.hiddenSettings,((e,t)=>t));return{title:"Visible Toolbar Settings",label:(0,ul.Yv)((0,o.map)((0,o.difference)(a,d),(e=>vp.ZO[e]))),indicatorProps:s}},qR=(e,t,n)=>{var i,a,r,l,s,d,c,u,p,h,m,g,v,C,x,f,b,y,j,Z,w,D,M;const{documents:k}=(0,E.jV)(S.F.HomeScreenBackgroundImages,{sort:ze.gt}),{documents:I}=(0,E.D)(S.F.EnvironmentFiles),A=bR();if((null===t||void 0===t?void 0:t.deviceExperienceMode)!==vp.w_.HomeScreen&&(null===t||void 0===t?void 0:t.deviceExperienceMode)!==vp.w_.Kiosk)return;if(!e.manufacturer||!e.model)return;const R=vp.oh.passthrough&&!(0,o.includes)(null===(i=vp.oh.passthrough)||void 0===i?void 0:i[e.manufacturer],e.model),T=null===(a=t.customLauncherSettings)||void 0===a||null===(r=a.backgroundSettings)||void 0===r?void 0:r.forcePassthrough,P=null===n||void 0===n||null===(l=n.customLauncherSettings)||void 0===l||null===(s=l.backgroundSettings)||void 0===s?void 0:s.forcePassthrough,L=T===P,N=null===(d=t.customLauncherSettings)||void 0===d?void 0:d.backgroundUrl,U=null===n||void 0===n||null===(c=n.customLauncherSettings)||void 0===c||null===(u=c.backgroundFile)||void 0===u?void 0:u.url,F=null!==(p=null===(h=t.customLauncherSettings)||void 0===h||null===(m=h.backgroundSettings)||void 0===m?void 0:m.backgroundStereoPacking)&&void 0!==p?p:vp.U.NONE,O=F===(null!==(g=null===n||void 0===n||null===(v=n.customLauncherSettings)||void 0===v||null===(C=v.backgroundSettings)||void 0===C?void 0:C.backgroundStereoPacking)&&void 0!==g?g:vp.U.NONE),_=N===U,z=(0,o.find)(k,{imageUrl:N}),B=F!==vp.U.NONE?"Custom (Stereo)":"Custom",W=z?null===z||void 0===z?void 0:z.name:B,V=T&&R,G=null===n||void 0===n||null===(x=n.customLauncherSettings)||void 0===x||null===(f=x.backgroundSettings)||void 0===f||null===(b=f.environmentFile)||void 0===b?void 0:b.id,H=A===G,q=null!==(y=null===(j=t.customLauncherSettings)||void 0===j||null===(Z=j.backgroundSettings)||void 0===Z?void 0:Z.environmentAudioVolume)&&void 0!==y?y:vp.sP,Y=null!==(w=null===n||void 0===n||null===(D=n.customLauncherSettings)||void 0===D||null===(M=D.backgroundSettings)||void 0===M?void 0:M.environmentAudioVolume)&&void 0!==w?w:vp.sP,K=V?{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Pico 4, Pico 4 Ultra Enterprise, and Meta Quest devices. Other devices use 360 images"}:(T?L:A?H&&q===Y:_&&O)?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"};return{title:"Background",label:(()=>{if(T)return"Passthrough";if(A){const e=(()=>{if(!A)return null;if(A===$h.mxrBungalow)return"Default";const e=(0,o.find)(I,{id:A});return(null===e||void 0===e?void 0:e.name)||"Unnamed Custom Environment File"})();let t="";if(void 0!==q){let e;e=0===q?vp.nM.NO_VOLUME:q<=30?vp.nM.LOW_VOLUME:vp.nM.NORMAL_VOLUME;const n=(0,vp.VN)(e);t=e===vp.nM.LOW_VOLUME?"Low Volume":e===vp.nM.NORMAL_VOLUME?"Normal Volume":n}return t?"3D Environment: ".concat(e,", ").concat(t):"3D Environment: ".concat(e)}return W})(),indicatorProps:K}},YR=(e,t)=>{const{approvedApps:n}=DR();if(e.deviceExperienceMode!==vp.w_.Kiosk||!e.kioskAppRef||(0,o.isEmpty)(n))return;const i=e.kioskAppRef.id,a=(0,o.find)(n,(e=>e.id===i));if(!a)return;const r=null===t||void 0===t?void 0:t.kioskApp,l=r&&r.packageName===a.packageName&&(0,Vs.gk)(a,r)?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"};return{title:"Kiosk App",label:a.title,indicatorProps:l}},KR=(e,t)=>{const{approvedVideos:n}=DR();if(e.deviceExperienceMode!==vp.w_.KioskVideo||!e.kioskVideoRef||(0,o.isEmpty)(n))return;const i=e.kioskVideoRef.id,a=(0,o.find)(n,(e=>e.id===i));if(!a)return;const r=(null===t||void 0===t?void 0:t.kioskVideoId)===i?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"};return{title:"Kiosk Video",label:a.title,indicatorProps:r}},XR=(e,t)=>{var n,i,a,r,l,s,d,c;if((0,o.isEmpty)(e.kioskVideoSettings)||e.deviceExperienceMode!==vp.w_.KioskVideo)return;const u=[],p=!(null===(n=e.kioskVideoSettings)||void 0===n||!n.loopKioskVideo),h=!(null===t||void 0===t||null===(i=t.kioskVideoSettings)||void 0===i||!i.loopKioskVideo);(0,o.isUndefined)(null===(a=e.kioskVideoSettings)||void 0===a?void 0:a.loopKioskVideo)||u.push("Loop Video ".concat(p?"On":"Off"));const m=!(null===(r=e.kioskVideoSettings)||void 0===r||!r.restartVideoAfterHmdOff),g=!(null===t||void 0===t||null===(l=t.kioskVideoSettings)||void 0===l||!l.restartVideoAfterHmdOff),v=null===(s=e.kioskVideoSettings)||void 0===s?void 0:s.restartVideoAfterHmdOffDelay,C=null===t||void 0===t||null===(d=t.kioskVideoSettings)||void 0===d?void 0:d.restartVideoAfterHmdOffDelay,x=!m||v===C;if(!(0,o.isUndefined)(null===(c=e.kioskVideoSettings)||void 0===c?void 0:c.restartVideoAfterHmdOff)){const e=m?"Reset Video ".concat(v+" seconds"," after HMD taken off"):"Reset Video Off";u.push(e)}const f=p===h&&m===g&&x?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"};return{title:"Video Playback Settings",label:(0,o.join)(u,", "),indicatorProps:f}},QR=(e,t)=>{var n,i,a,r,l,s,d,c,u,p,h,m,g,v,C,x,f,b,y,j,Z,w,E,S,D,M,k,I,A,R,T,P,L,N,U,F,O,_,z,B,W,V,G,H,q,Y,K,X,Q,J,$,ee,te,ne,ie,oe,ae,re,le,se,de,ce,ue,pe;if((null===e||void 0===e?void 0:e.deviceExperienceMode)!==vp.w_.HomeScreen)return;const he=[],me=[],ge=[],ve=[],Ce=null!==(n=null===(i=e.customLauncherSettings)||void 0===i||null===(a=i.librarySettings)||void 0===a||null===(r=a.panelSettings)||void 0===r?void 0:r.categoriesPosition)&&void 0!==n?n:vp.Bb,xe=Ce===(null!==(l=null===t||void 0===t||null===(s=t.customLauncherSettings)||void 0===s||null===(d=s.librarySettings)||void 0===d||null===(c=d.panelSettings)||void 0===c?void 0:c.categoriesPosition)&&void 0!==l?l:vp.Bb);me.push({upToDate:xe,title:vp.in[Ce]});const fe=null!==(u=null===(p=e.customLauncherSettings)||void 0===p||null===(h=p.librarySettings)||void 0===h||null===(m=h.gridSettings)||void 0===m?void 0:m.horizontalAlignment)&&void 0!==u?u:vp.t0,be=fe===(null!==(g=null===t||void 0===t||null===(v=t.customLauncherSettings)||void 0===v||null===(C=v.librarySettings)||void 0===C||null===(x=C.gridSettings)||void 0===x?void 0:x.horizontalAlignment)&&void 0!==g?g:vp.t0);ge.push({upToDate:be,title:"".concat(vp.mt[fe]," Horizontal Alignment")});const ye=null!==(f=null===(b=e.customLauncherSettings)||void 0===b||null===(y=b.librarySettings)||void 0===y||null===(j=y.gridSettings)||void 0===j?void 0:j.verticalAlignment)&&void 0!==f?f:vp.u8,je=ye===(null!==(Z=null===t||void 0===t||null===(w=t.customLauncherSettings)||void 0===w||null===(E=w.librarySettings)||void 0===E||null===(S=E.gridSettings)||void 0===S?void 0:S.verticalAlignment)&&void 0!==Z?Z:vp.u8);ge.push({upToDate:je,title:"".concat(vp.q_[ye]," Vertical Alignment")});const Ze=null!==(D=null===(M=e.customLauncherSettings)||void 0===M||null===(k=M.librarySettings)||void 0===k||null===(I=k.gridSettings)||void 0===I?void 0:I.cardsPerRow)&&void 0!==D?D:vp.x,we=Ze===(null!==(A=null===t||void 0===t||null===(R=t.customLauncherSettings)||void 0===R||null===(T=R.librarySettings)||void 0===T||null===(P=T.gridSettings)||void 0===P?void 0:P.cardsPerRow)&&void 0!==A?A:vp.x);ge.push({upToDate:we,title:"".concat(Ze," ").concat((0,ul.n8)(Ze,"card")," per row")});const Ee=null!==(L=null===(N=e.customLauncherSettings)||void 0===N||null===(U=N.librarySettings)||void 0===U||null===(F=U.cardSettings)||void 0===F?void 0:F.cardStyle)&&void 0!==L?L:vp.FW,Se=Ee===(null!==(O=null===t||void 0===t||null===(_=t.customLauncherSettings)||void 0===_||null===(z=_.librarySettings)||void 0===z||null===(B=z.cardSettings)||void 0===B?void 0:B.cardStyle)&&void 0!==O?O:vp.FW);ve.push({upToDate:Se,title:vp.$1[Ee]});const De=null===(W=null===(V=e.customLauncherSettings)||void 0===V||null===(G=V.librarySettings)||void 0===G||null===(H=G.cardSettings)||void 0===H?void 0:H.showTitle)||void 0===W||W,Me
3=De===(null===(q=null===t||void 0===t||null===(Y=t.customLauncherSettings)||void 0===Y||null===(K=Y.librarySettings)||void 0===K||null===(X=K.cardSettings)||void 0===X?void 0:X.showTitle)||void 0===q||q);ve.push({upToDate:Me,title:"".concat(De?"Show":"Hide"," Title")});const ke=null===(Q=null===(J=e.customLauncherSettings)||void 0===J||null===($=J.librarySettings)||void 0===$||null===(ee=$.cardSettings)||void 0===ee?void 0:ee.showContentType)||void 0===Q||Q,Ie=ke===(null===(te=null===t||void 0===t||null===(ne=t.customLauncherSettings)||void 0===ne||null===(ie=ne.librarySettings)||void 0===ie||null===(oe=ie.cardSettings)||void 0===oe?void 0:oe.showContentType)||void 0===te||te);ve.push({upToDate:Ie,title:"".concat(ke?"Show":"Hide"," Content Type")});const Ae=null!==(ae=null===(re=e.customLauncherSettings)||void 0===re||null===(le=re.librarySettings)||void 0===le||null===(se=le.cardSettings)||void 0===se?void 0:se.horizontalTextAlignment)&&void 0!==ae?ae:vp.o9,Re=Ae===(null!==(de=null===t||void 0===t||null===(ce=t.customLauncherSettings)||void 0===ce||null===(ue=ce.librarySettings)||void 0===ue||null===(pe=ue.cardSettings)||void 0===pe?void 0:pe.horizontalTextAlignment)&&void 0!==de?de:vp.o9);ve.push({upToDate:Re,title:"".concat(vp.nB[Ae]," Text Alignment")}),he.push({upToDate:(0,o.every)(me,"upToDate"),title:"Panel: "+(0,o.map)(me,"title").join(", ")}),he.push({upToDate:(0,o.every)(ge,"upToDate"),title:"Grid: "+(0,o.map)(ge,"title").join(", ")}),he.push({upToDate:(0,o.every)(ve,"upToDate"),title:"Cards: "+(0,o.map)(ve,"title").join(", ")});const Te=(0,o.every)(he,"upToDate")?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"};return{title:"Layout",label:(0,o.map)(he,"title").join("; "),indicatorProps:Te}},JR=(e,t,n)=>{const i=null===t||void 0===t?void 0:t.disabledQfbSettings,a=null===n||void 0===n?void 0:n.disabledQfbSettings,r=(0,o.uniq)((0,o.keys)(i).concat((0,o.keys)(a)));if((0,o.isEmpty)(r))return;const l=[];for(const c of r){var s,d;if(!vp.fu[c])continue;const t=null!==(s=null===i||void 0===i?void 0:i[c])&&void 0!==s&&s,n=null!==(d=null===a||void 0===a?void 0:a[c])&&void 0!==d&&d;if(!((0,o.has)(i,c)||!0!==n))continue;const r=t===n,u="SCREEN_CAPTURE_ENABLED"===c,p=e.manufacturer===bi.p6.Oculus&&!!e.isQfbDevice&&(e.qfbDeviceMode===bi.Zb.INDIVIDUAL||u)?r?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"}:{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Editing this setting is only supported for Meta Quest devices enrolled through ".concat(bi.RZ).concat(u?"":" using Individual Mode")};l.push({title:vp.fu[c].title,label:t?"Disabled":"Enabled",indicatorProps:p})}return l},$R=(e,t,n)=>{var i,a;const r="sessionPasscodeComplexity",l=null!==(i=t[r])&&void 0!==i?i:vp.wW,s=null!==(a=null===n||void 0===n?void 0:n[r])&&void 0!==a?a:vp.wW;if(!((0,o.has)(t,r)||s!==vp.wW))return;if(!(!1===(null===n||void 0===n?void 0:n.sessionInactivityTimeoutEnabled)||!1===t.sessionInactivityTimeoutEnabled))return;const d=l===s,c=e.manufacturer===bi.p6.Oculus&&!!e.isQfbDevice&&e.qfbDeviceMode===bi.Zb.SHARED?d?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"}:{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"This setting only applies to Meta Quest devices enrolled in ".concat(bi.RZ," Shared Mode")};return{title:"Session Password Complexity",label:vp.Go[l],indicatorProps:c}},eT=(e,t,n)=>{const i=(0,Le.ye)("enableEnableHandTrackingByDefault"),r=(0,a.useMemo)((()=>{const e=["sessionIntroWakeControllers","sessionIntroAdjustDeviceFit"];return i&&e.push("enableHandTrackingByDefault"),e.push("sessionInactivityTimeoutEnabled","stationaryBoundaryByDefault"),e}),[i]),l=e=>{switch(e){case"sessionInactivityTimeoutEnabled":return vp.C;case"stationaryBoundaryByDefault":return vp.Lt;case"enableHandTrackingByDefault":return vp.kF;case"sessionIntroWakeControllers":case"sessionIntroAdjustDeviceFit":return vp.DJ}},s=(0,o.filter)(r,(e=>(0,o.has)(t,e)&&t[e]!==l(e))),d=(0,o.some)(r,(e=>!(0,o.isUndefined)(t[e])));if(0===s.length&&!d)return null;
3let c=!0;for(const o of r){var u,p;(null!==(u=t[o])&&void 0!==u?u:l(o))===(null!==(p=null===n||void 0===n?void 0:n[o])&&void 0!==p?p:l(o))||(c=!1)}let h;return h=e.manufacturer===bi.p6.Oculus&&!!e.isQfbDevice&&e.qfbDeviceMode===bi.Zb.SHARED?c?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"}:{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Meta Quest devices enrolled in ".concat(bi.RZ," Shared Mode")},{title:"Session Intro Steps",label:[...(0,o.map)(s,(e=>vp.j[e])),vp.j.sessionIntroSafetyAndPolicies].join(", "),indicatorProps:h}},tT=(e,t,n)=>{var i,a;const r="sessionInactivityTimeout",l=null!==(i=t[r])&&void 0!==i?i:vp.O4,s=null!==(a=null===n||void 0===n?void 0:n[r])&&void 0!==a?a:vp.O4;if(!1===t.sessionInactivityTimeoutEnabled&&!1===(null===n||void 0===n?void 0:n.sessionInactivityTimeoutEnabled))return;if(!((0,o.has)(t,r)||s!==vp.O4))return;const d=l===s;let c;return c=e.manufacturer===bi.p6.Oculus&&!!e.isQfbDevice&&e.qfbDeviceMode===bi.Zb.SHARED?d?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"}:{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Meta Quest devices enrolled in ".concat(bi.RZ," Shared Mode")},{title:vp.GD,label:"".concat(l," minutes"),indicatorProps:c}},nT=()=>{const{configuration:e,currentRuntimeSettings:t,device:n,deviceStatus:i}=DR(),r=(0,E.D)(S.F.WifiNetworks,{filter:(0,a.useCallback)((t=>(0,o.some)(e.wifiNetworkRefs,{id:t.id})),[e.wifiNetworkRefs]),sort:(0,a.useCallback)(((e,t)=>e.ssid.localeCompare(t.ssid)),[])}).documents,l={success:"Synced",warning:"Out of date",error:"Provisioning Error",pending:"Provisioning\u2026",unavailable:"Provisioning\u2026"},s=(()=>{const e=xM(n);return e?(0,M.Mn)(e).toDate():void 0})();return(0,o.map)(r,(o=>{var a,r,d,c,u,p,h,m;const g=null===t||void 0===t||null===(a=t.wifiNetworks)||void 0===a?void 0:a[o.id],v=null===i||void 0===i||null===(r=i.wifiStatuses)||void 0===r?void 0:r[o.ssid],C=g===o.version,x=(null===v||void 0===v?void 0:v.status)===xR.ERROR,f=n.manufacturer===bi.p6.Oculus&&null==g&&n.online&&null!==(d=null===i||void 0===i||null===(c=i.wifiConnectionInfo)||void 0===c||null===(u=c[o.ssid])||void 0===u?void 0:u.currentlyConnected)&&void 0!==d&&d,b=x?"error":C?"success":f?"unavailable":"warning",y=x?cD({type:"wifi_install_error",code:null===v||void 0===v?void 0:v.errorCode}):void 0,j=l[b],Z=o.nickname,w=(null===(p=e.priorityWifiNetwork)||void 0===p?void 0:p.id)===o.id,E=null===i||void 0===i||null===(h=i.wifiConnectionInfo)||void 0===h?void 0:h[o.ssid],S=null!==E&&void 0!==E&&E.lastConnectionAttemptTime?(0,M.Mn)(E.lastConnectionAttemptTime).toDate():void 0,D=null!==(m=null===E||void 0===E?void 0:E.currentlyConnected)&&void 0!==m&&m;let k;D&&!n.online&&s?k=s:null!==E&&void 0!==E&&E.lastDisconnectedTime?k=(0,M.Mn)(E.lastDisconnectedTime).toDate():null!==E&&void 0!==E&&E.lastConnectedTime&&(k=(0,M.Mn)(E.lastConnectedTime).toDate());const I=null===E||void 0===E?void 0:E.lastConnectionAttemptResult,A=E?D&&n.online?"connected":I||k||D?"last_used":"never_used":void 0;return{title:o.ssid,wifiNetworkId:o.id,subtitle:Z,type:o.type,isPriorityNetwork:w,indicatorProps:{status:b,labelSecondary:j,tooltipTitle:y},connectionStatus:A,lastConnectionAttemptTime:S,lastConnectionAttemptResult:I,lastDisconnectedTime:k}}))},iT=()=>{var e,t,n,i,a,r;const{configuration:l,device:s,currentRuntimeSettings:d,configurationMatchesDevice:c,installedApps:u}=DR(),p=[],h=(0,Le.ye)("enableTimezonesOnPico4AndG3"),m=(0,Le.ye)("enablePicoCastingAndScreenCaptureSetting"),g=s.online,v=s.manufacturer===bi.p6.Pico,C=s.manufacturer===bi.p6.Oculus,x=s.model===bi.Q6.Pico4,f=s.model===bi.Q6.PicoG3,b=s.model===bi.Q6.PicoNeo3||s.model===bi.Q6.PicoNeo3Eye,y=C&&!0===s.isQfbDevice,j=e=>e&&"0"!==e?"On":"Off",Z=(0,o.find)(u,((e,t)=>(0,o.includes)(Be.vc.configuration.adminAppPackageNames,t))),w=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{isPicoOrQfbOnlySetting:i=!1,isQfbOnlySetting:a=!1,isPicoOnlySetting:r=!1,isOculusOnlySetting:l=!1,minimumAdminAppVersionCode:d,isUnavailableForPico4OrG3:u=!1,isUnavailableForPicoNeo3
3:p=!1,compatibleDeviceModels:h}=n;return h&&!(0,o.includes)(h,s.model)?{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for ".concat((0,ul.Yv)(h))}:a&&!y?{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Meta Quest devices enrolled in ".concat(bi.RZ)}:!i||v||y?r&&!v?{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Pico devices"}:l&&!C?{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Meta Quest devices"}:u&&(x||f)?{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Not available for Pico 4 or G3"}:p&&b?{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Not available for Pico Neo 3"}:d&&(null!==(t=null===Z||void 0===Z?void 0:Z.versionCode)&&void 0!==t?t:0)<d?{status:"unavailable",labelSecondary:"Unknown",tooltipTitle:"Admin App out of date"}:e?{status:"success",labelSecondary:"Synced"}:g&&s.updating&&c?{status:"pending",labelSecondary:"Syncing"}:{status:"warning",labelSecondary:"Out of date"}:{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Meta Quest devices enrolled in ".concat(bi.RZ," or Pico devices")}},E=(e,t)=>!(0,o.isNil)(e[t])&&"UNMANAGED"!==e[t],D=l.devicePasscode;if((0,o.isString)(D)){const e=w(D===(null===d||void 0===d?void 0:d.devicePasscode));p.push({title:"Lock Screen Passcode",label:j((0,o.isString)(D)),indicatorProps:e,clickToViewProps:{value:D,label:"passcode",requiredPrivilege:"configurations"}})}const k=null===(e=l.androidDeviceGlobalSettings)||void 0===e?void 0:e.adb_enabled;if((0,o.isString)(k)){var I;const e=w(k===(null===d||void 0===d||null===(I=d.androidDeviceGlobalSettings)||void 0===I?void 0:I.adb_enabled));p.push({title:"USB Debugging",label:j(k),indicatorProps:e})}const A=null===(t=l.androidUserRestrictions)||void 0===t?void 0:t.no_usb_file_transfer;if((0,o.isBoolean)(A)){var R;const e=w(A===(null===d||void 0===d||null===(R=d.androidUserRestrictions)||void 0===R?void 0:R.no_usb_file_transfer));p.push({title:"Disable USB Transfer",label:j(A),indicatorProps:e})}if(nc(s.model,"androidObb")||ic(s.osVersion,"androidObb")){var T;const e=null!==(T=l.android12ObbPermissionsMode)&&void 0!==T?T:vp.fK,t=null===d||void 0===d?void 0:d.android12ObbPermissionsMode,n=w(e===t,{minimumAdminAppVersionCode:t?void 0:Number.MAX_SAFE_INTEGER});p.push({title:"".concat(Bd.androidObb," Permission Notification"),label:(0,vp.do)(e),indicatorProps:n})}if((0,Le.ye)("enableStreamingPromptPermission")){const e=!!l.skipStreamingPermissionPrompt,t=w(e===!(null===d||void 0===d||!d.skipStreamingPermissionPrompt));p.push({title:"Stream Without Permission Prompt",label:e?"On":"Off",indicatorProps:t})}const P=(0,Le.ye)("enableTutorialModeRevamp"),L=(0,xo.ky)(S.F.Apps,P?null===(n=l.tutorialAppRef)||void 0===n?void 0:n.id:null===(i=l.firstTimeUseAppRef)||void 0===i?void 0:i.id);if(L){var N;const e=P?null===d||void 0===d?void 0:d.tutorialApp:null===d||void 0===d?void 0:d.firstTimeUseApp,t=w((null===e||void 0===e?void 0:e.id)===(null===L||void 0===L?void 0:L.id));p.push({title:"Tutorial App",label:L?null!==(N=null===L||void 0===L?void 0:L.title)&&void 0!==N?N:"Unknown":"Off",indicatorProps:t})}const U=null===(a=l.androidUserRestrictions)||void 0===a?void 0:a.no_factory_reset;if((0,o.isBoolean)(U)){var F;const e=w(U===(null===d||void 0===d||null===(F=d.androidUserRestrictions)||void 0===F?void 0:F.no_factory_reset),{isPicoOnlySetting:!0});p.push({title:"Disable User Factory Reset",label:j(U),indicatorProps:e})}if(s.manufacturer===bi.p6.Pico){const e=l.localeLanguageTag;if(E(l,"localeLanguageTag")){var O,_,z;const t=null===d||void 0===d?void 0:d.localeLanguageTag,n=(0,o.groupBy)(vp.SH,(e=>Ax(e))),i=w(e===t,{isPicoOnlySetting:!0});p.push({title:"System Language",label:e&&null!==(O=null===(_=n[e])||void 0===_||null===(z=_[0])||void 0===z?void 0:z.label)&&void 0!==O?O:"Unknown",indicatorProps:i})}}else if(s.manufacturer===bi.p6.Oculus){const e=l.metaLocaleLanguageTag;if(E(l,"metaLocaleLanguageTag")){var B,W,V;const t=null===d||void 0===d?void 0:d.metaLocaleLanguageTag,n=(0,o.groupBy)(vp.tt,(e=>Ax(e))),i=w(e===t,{isQfbOnlySetting:!0});p.push({title:"System Language",label:e&&null!==(B=null===(W=n[e])||void 0===W||null===(V=W[0])||void 0===V?void 0:V.label)&&void 0!==B?B:"Unknown",indicatorProps:i})}}const G=l.timeZoneSetting,H=Be.vc.common.timezones;if(E(l,"timeZoneSetting")&&(h||!x&&!f)){const e=null===d||void 0===d?void 0:d.timeZoneSetting,t=(0,o.isString)(G)?(0,o.find)(H,{id:G}):void 0,n=w(e===G,{isPicoOrQfbOnlySetting:!0,isUnavailableForPico4OrG3:!h});let i;i="AUTO"===G?"Auto":t?"".concat((0,M.ob)(t.id)," ").concat(t.name):"Unknown",p.push({title:"System Time Zone",label:i,indicatorProps:n})}const q=l.picoPerformanceMode;if(E(l,"picoPerformanceMode")){const e=w(q===(null===d||void 0===d?void 0:d.picoPerformanceMode),{isPicoOnlySetting:!0,isUnavailableForPico4OrG3:!0,isUnavailableForPicoNeo3
3:!0,minimumAdminAppVersionCode:wR}),t=q?vp.Q2[q]:"Off";p.push({title:"Performance Mode",label:t,indicatorProps:e})}const Y=l.picoGuardianMode;if(E(l,"picoGuardianMode")){const e=w(Y===(null===d||void 0===d?void 0:d.picoGuardianMode),{isPicoOnlySetting:!0,minimumAdminAppVersionCode:wR}),t=Y?vp.vU[Y]:"Disabled";p.push({title:"Play Boundary",label:t,indicatorProps:e})}const K=l.picoTrackingMode;if(E(l,"picoTrackingMode")){const e=w(K===(null===d||void 0===d?void 0:d.picoTrackingMode),{isPicoOnlySetting:!0,minimumAdminAppVersionCode:wR}),t=K?vp.Ux[K]:"Disabled";p.push({title:"Movement Tracking",label:t,indicatorProps:e})}const X=l.eyeTrackingFPS;if(E(l,"eyeTrackingFPS")){const e=w(X===(null===d||void 0===d?void 0:d.eyeTrackingFPS),{isPicoOnlySetting:!0}),t=X?vp.qs[X]:"Unmanaged";p.push({title:"Eye Tracking FPS",label:t,indicatorProps:e})}const Q=l.sleepDelay;if(E(l,"sleepDelay")){const e=w(Q===(null===d||void 0===d?void 0:d.sleepDelay),{isPicoOnlySetting:!0}),t=Q?(0,o.isNumber)(vp.Ez[Q])?(0,M.QA)(vp.Ez[Q]):vp.Ez[Q].toString():"Unmanaged";p.push({title:vp.IO+" (".concat(bi.p6.Pico,")"),label:t,indicatorProps:e})}const J=l.screenOffDelay;if(E(l,"screenOffDelay")){const e=w(J===(null===d||void 0===d?void 0:d.screenOffDelay),{isPicoOnlySetting:!0}),t=J?(0,o.isNumber)(vp.J1[J])?(0,M.QA)(vp.J1[J]):vp.J1[J].toString():"Unmanaged";p.push({title:"Screen Off Delay",label:t,indicatorProps:e})}const $=((e,t,n)=>{var i,a;const r="screenOffTimeout",l=null!==(i=t[r])&&void 0!==i?i:vp.BL,s=null!==(a=null===n||void 0===n?void 0:n[r])&&void 0!==a?a:vp.BL;if(!(0,o.has)(t,r)&&s===vp.BL)return;const d=l===s,c=e.manufacturer===bi.p6.Oculus&&e.isQfbDevice?d?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"}:{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Only available for Meta Quest devices enrolled in ".concat(bi.RZ)},u=(0,o.find)(af,{value:l});return u?{title:vp.IO+" (Meta)",label:u.label,indicatorProps:c}:void 0})(s,l,d);if($&&p.push($),m&&(0,o.has)(l,"picoScreenCaptureDisabled")){var ee,te;const e=null!==(ee=l.picoScreenCaptureDisabled)&&void 0!==ee&&ee,t=w(e===(null!==(te=null===d||void 0===d?void 0:d.picoScreenCaptureDisabled)&&void 0!==te&&te),{isPicoOnlySetting:!0,minimumAdminAppVersionCode:wR});p.push({title:"Screen Capture and Casting",label:e?"Disabled":"Allowed",indicatorProps:t})}const ne=l.picoFastBoundarySetting;if(E(l,"picoFastBoundarySetting")){const e=w(ne===(null===d||void 0===d?void 0:d.picoFastBoundarySetting),{isPicoOnlySetting:!0,minimumAdminAppVersionCode:wR}),t=ne?vp.iR[ne]:"Disabled";p.push({title:vp.yn.QuickBoundarySetup,label:t,indicatorProps:e})}const ie=l.picoGlobalAntiDispersionSetting;if(E(l,"picoGlobalAntiDispersionSetting")){const e=w(ie===(null===d||void 0===d?void 0:d.picoGlobalAntiDispersionSetting),{isPicoOnlySetting:!0,minimumAdminAppVersionCode:wR}),t=ie?vp.iR[ie]:"Disabled";p.push({title:vp.yn.GlobalAntiDispersion,label:t,indicatorProps:e})}const oe=l.picoEyeProtectionModeSetting;if(E(l,"picoEyeProtectionModeSetting")){const e=w(oe===(null===d||void 0===d?void 0:d.picoEyeProtectionModeSetting),{isPicoOnlySetting:!0,minimumAdminAppVersionCode:wR}),t=oe?vp.iR[oe]:"Disabled";p.push({title:vp.yn.EyeProtectionMode,label:t,indicatorProps:e})}const ae="proximitySensorMode";if((0,o.has)(l,ae)||(0,o.get)(d,ae)!==vp.v5){var re,le;const e=null!==(re=l.proximitySensorMode)&&void 0!==re?re:vp.v5,t=null!==(le=null===d||void 0===d?void 0:d.proximitySensorMode)&&void 0!==le?le:vp.v5;p.push({title:vp.pf,label:vp.k9[e],indicatorProps:w(e===t,{isOculusOnlySetting:!0})})}const se=null!==(r=l.webXRBrowserSetting)&&void 0!==r?r:vp.vB.DEFAULT;if(se!==vp.vB.DEFAULT||!(0,o.isEmpty)(l.approvedWebXRApps)&&(0,o.includes)(Be.vc.configuration.compatibleDeviceModelsForWolvicApp,s.model)){var de;const e=w(se===(null!==(de=null===d||void 0===d?void 0:d.webXRBrowserSetting)&&void 0!==de?de:vp.vB.DEFAULT),{compatibleDeviceModels:Be.vc.configuration.compatibleDeviceModelsForWolvicApp}),t=vp.Vi[se];p.push({title:"Browser for WebXR Links",label:t,indicatorProps:e})}const ce=l.travelMode;if(E(l,"travelMode")){const e=w(ce===(null===d||void 0===d?void 0:d.travelMode),{isQfbOnlySetting:!0}),t=ce?vp.$x[ce]:"Off";p.push({title:"Travel Mode",label:t,indicatorProps:e})}const ue=JR(s,l,d);ue&&l.deviceExperienceMode!==vp.w_.Default&&p.push(...ue);const pe=((e,t,n)=>{const i=null===t||void 0===t?void 0:t.adminPinProtectedSettings,a=null===n||void 0===n?void 0:n.adminPinProtectedSettings,r=(0,o.keys)(i),l=(0,o.keys)(a);if((0,o.isEmpty)(r)&&(0,o.isEmpty)(l))return;const s=[];let d=!0;for(const h of(0,o.union)(r,l)){var c,u;if(!vp.Ul[h])continue;const e="softwareupdate"===h||"usbdebugging"===h,t=null!==(c=null===i||void 0===i?void 0:i[h])&&void 0!==c?c:e,n=t===(null!==(u=null===a||void 0===a?void 0:a[h])&&void 0!==u?u:e),{title:o}=vp.Ul[h];n||(d=!1),s.push({title:o,upToDate:n,protected:t})}if(0===s.length)return;const p=e.manufacturer===bi.p6.Oculus&&e.isQfbDevice&&e.qfbDeviceMode===bi.Zb.SHARED?d?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"}:{status:"unavailable",labelSecondary:"Not Configurable for Device",tooltipTitle:"Editing this setting is only supported for Meta Quest devices enrolled through ".concat(bi.RZ," in Shared Mode")};return{title:"Admin PIN Protected Settings",label:s.map((e=>e.title+(e.protected?" (PIN On)":" (PIN Off)"))).sort(ze.bL).join(", "),indicatorProps:p}})(s,l,d);return pe&&p.push(pe),p},oT="Target Version",aT="Update Policy",rT=e=>e?e.blockFirmwareUpdates?vp.AP.BlockFirmwareUpdates:e.postponeOculusFirmwareUpdates?vp.AP.PostponeFirmwareUpdates:e.windowOculusFirmwareUpdates?vp.AP.WindowFirmwareUpdates:vp.AP.DeferToDevice:vp.AP.DeferToDevice,lT=()=>{var e;const t=DR(),{device:n,configuration:i,deviceStatus:a,currentRuntimeSettings:r,targetRuntimeSettings:l}=t,s=(0,Le.ye)("postponeMetaFirmwareUpdates"),d=(0,Le.ye)("enableMetaFirmwareSettingsSplit"),c=n.model===bi.Q6.PicoNeo3Eye?bi.Q6.PicoNeo3
3:n.model,u=c?null===(e=i.targetDeviceSystemVersions)||void 0===e?void 0:e[c]:void 0,p=(0,o.isObject)(u)?u:void 0,h=(0,xo.ky)(S.F.DeviceSystemVersions,null===p||void 0===p?void 0:p.id),m=n.model===bi.Q6.DPVRP2||n.model===bi.Q6.DPVRP1Pro,g=n.manufacturer===bi.p6.Pico,v=n.manufacturer===bi.p6.Oculus,C=u===vp.AP.DeferToDevice||(null===l||void 0===l?void 0:l.blockPicoFirmwareUpdates),x=i.oculusFirmwareUpdatePolicy,f=!!kR();if((g||m)&&h&&n.firmwareVersion){const e=(0,$i.qe)(i,n.manufacturer);return g?(e=>{var t;let{device:n,deviceStatus:i,targetVersion:o,systemUpdateType:a}=e;const r=n.firmwareVersion===o.version,l=-1===(0,Vs.Wp)(o.version,n.firmwareVersion),s=(null===i||void 0===i||null===(t=i.deviceSystemVersionStatus)||void 0===t?void 0:t.nextVersion)!==o.version||!n.online&&i.deviceSystemVersionStatus.status!==CR.ERROR?void 0:i.deviceSystemVersionStatus;let d;d=r?"success":!s||s.status===CR.READY_TO_INSTALL||l?"warning":s.status===CR.ERROR?"error":"pending";const c={UP_TO_DATE:"Synced",DOWNLOADING:"Downloading",READY_TO_INSTALL:a===vp.VZ.ForceOnBoot?"Awaiting Restart":"Awaiting User Input",ERROR:"Failed"},u="pending"===d?null===s||void 0===s?void 0:s.nextVersion:"",p=r?"Synced":l?"Unable to Downgrade":null!==s&&void 0!==s&&s.status?c[s.status]:"Out of Date",h=l?cD({type:"firmware_install_error",code:dD.DOWNGRADE_ERROR}):"error"===d?cD({type:"firmware_install_error",code:null===s||void 0===s?void 0:s.errorCode,message:null===s||void 0===s?void 0:s.message}):"";return{title:oT,targetVersion:o.version,installedVersion:n.firmwareVersion,indicatorProps:{status:d,labelPrimary:u,labelSecondary:p,progressValue:null===s||void 0===s?void 0:s.progress,tooltipTitle:h,totalBytesDownloaded:null===s||void 0===s?void 0:s.totalBytesDownloaded,totalDownloadSize:null===s||void 0===s?void 0:s.totalDownloadSize,timeRemaining:null===s||void 0===s?void 0:s.timeRemaining,downloadSpeed:null===s||void 0===s?void 0:s.downloadSpeed}}})({device:n,deviceStatus:a,targetVersion:h,systemUpdateType:e}):(e=>{var t;let{device:n,deviceStatus:i,targetVersion:o,systemUpdateType:a}=e;const r=n.firmwareVersion===o.version,l=(null===i||void 0===i||null===(t=i.deviceSystemVersionStatus)||void 0===t?void 0:t.nextVersion)!==o.version||!n.online&&i.deviceSystemVersionStatus.status!==CR.ERROR?void 0:i.deviceSystemVersionStatus;let s;s=r?"success":l&&l.status!==CR.READY_TO_INSTALL?l.status===CR.ERROR?"error":"pending":"warning";const d={UP_TO_DATE:"Synced",DOWNLOADING:"Downloading",READY_TO_INSTALL:a===vp.VZ.ForceOnBoot?"Awaiting Restart":"Awaiting User Input",ERROR:"Failed"},c="pending"===s?null===l||void 0===l?void 0:l.nextVersion:"",u=r?"Synced":null!==l&&void 0!==l&&l.status?d[l.status]:"Out of Date",p="error"===s?cD({type:"firmware_install_error",code:null===l||void 0===l?void 0:l.errorCode,message:null===l||void 0===l?void 0:l.message}):"";return{title:oT,targetVersion:o.version,installedVersion:n.firmwareVersion,indicatorProps:{status:s,labelPrimary:c,labelSecondary:u,progressValue:null===l||void 0===l?void 0:l.progress,tooltipTitle:p,totalBytesDownloaded:null===l||void 0===l?void 0:l.totalBytesDownloaded,totalDownloadSize:null===l||void 0===l?void 0:l.totalDownloadSize,timeRemaining:null===l||void 0===l?void 0:l.timeRemaining,downloadSpeed:null===l||void 0===l?void 0:l.downloadSpeed}}})({device:n,deviceStatus:a,targetVersion:h,systemUpdateType:e})}if(g&&C)return(e=>{let{targetRuntimeSettings:t,currentRuntimeSettings:n}=e;const i=e=>null!==e&&void 0!==e&&e.blockPicoFirmwareUpdates?vp.AP.BlockFirmwareUpdates:vp.AP.DeferToDevice,o=i(n),a=i(t),r=a===o,l=r?"success":"warning",s=r?"Synced":"Out of Date";return{title:aT,targetVersion:vp.bL[a],installedVersion:vp.bL[o],indicatorProps:{status:l,labelSecondary:s}}})({targetRuntimeSettings:l,currentRuntimeSettings:r});if(v){var b;const e=!n.isQfbDevice&&(0,o.isUndefined)(i.legacyOculusFirmwareUpdatePolicy)&&d&&!(null!==(b=i.featureFlags)&&void 0!==b&&b.includes(MR));return(e=>{var t,n,i,o;let{firmareHold:a,currentRuntimeSettings:r,targetRuntimeSettings:l,postponeMetaFirmwareUpdates:s,legacyDeviceIsDefaultDisabledUpdates:d}=e;const c=rT(r),u=rT(l);if(d){const e=vp.bL[vp.AP.BlockFirmwareUpdates],t=vp.bL[c];return c===vp.AP.BlockFirmwareUpdates?{title:aT,installedVersion:t,targetVersion:e,indicatorProps:{status:"success",labelSecondary:"Synced"}}:{title:aT,installedVersion:t,targetVersion:e,indicatorProps:{status:"warning",labelSecondary:"Out of Date"}}}const p=u===vp.AP.WindowFirmwareUpdates,h=(null===r||void 0===r||null===(t=r.oculusFirmwareUpdateWindowValues)||void 0===t?void 0:t.start)===(null===l||void 0===l||null===(n=l.oculusFirmwareUpdateWindowValues)||void 0===n?void 0:n.start)&&(null===r||void 0===r||null===(i=r.oculusFirmwareUpdateWindowValues)||void 0===i?void 0:i.end)===(null===l||void 0===l||null===(o=l.oculusFirmwareUpdateWindowValues)||void 0===o?void 0:o.end),m=a?{status:"firmware_hold",labelSecondary:"Hold"}:(p?c===u&&h:c===u)?{status:"success",labelSecondary:"Synced"}:{status:"warning",labelSecondary:"Out of Date"},g=s?vp.bL[vp.AP.PostponeFirmwareUpdates]:vp.bL[c];return{title:aT,targetVersion:vp.bL[u],installedVersion:g,indicatorProps:m}})({firmareHold:f,oculusUpdatePolicy:null!==x&&void 0!==x?x:vp.AP.PostponeFirmwareUpdates,currentRuntimeSettings:r,targetRuntimeSettings:l,postponeMetaFirmwareUpdates:s,legacyDeviceIsDefaultDisabledUpdates:e})}},sT=()=>{const{configuration:e,deviceStatus:t,currentRuntimeSettings:n,device:i}=DR(),{documents:a}=(0,E.D)(S.F.Files);return(0,o.chain)(null===e||void 0===e?void 0:e.fileRefs).pickBy((e=>!(0,o.isEmpty)(e))).toPairs().sort(((e,t)=>
3{let[n]=e,[i]=t;return n.localeCompare(i)})).map((e=>{let[r,l]=e;const s=(0,o.chain)(l).map((e=>{const l=(0,o.find)(a,{id:e.id});if(!l)return;const s=e=>{let t=(0,o.lastIndexOf)(e,"/");return-1===t?"":0===t?"/":e.slice(0,t)},d=(0,o.find)((0,o.values)(null===t||void 0===t?void 0:t.fileStatuses),(t=>s(t.path)===r&&t.id===e.id)),c=i.online&&i.updating||(null===d||void 0===d?void 0:d.status)===vR.ERROR?d:void 0,u=(0,o.find)((0,o.values)(null===n||void 0===n?void 0:n.files),(t=>s(t.path)===r&&t.id===e.id)),p=(0,o.find)((0,o.flatMap)((0,o.values)(null===n||void 0===n?void 0:n.apps),(e=>(0,o.values)(e.files))),(e=>{if(s(e.path)!==r)return!1;const t=(0,o.find)(a,{id:e.id});return(null===t||void 0===t?void 0:t.name)===l.name})),h=u||p,m="/"===r?"/".concat(l.name):"".concat(r,"/").concat(l.name),g=!!h&&h.path!==m,[v,C]=h?g?["warning","Out of Date"]:["success","Synced"]:c?[{QUEUED:"pending",DOWNLOADING:"pending",COMPLETE:"success",ERROR:"error"}[c.status],{QUEUED:"",DOWNLOADING:"Downloading",COMPLETE:"Synced",ERROR:"Error"}[c.status]]:["warning","Missing"],x="error"===v?cD({type:"file_install_error",code:null===c||void 0===c?void 0:c.errorCode,message:null===c||void 0===c?void 0:c.message}):"",f=(null===c||void 0===c?void 0:c.status)===vR.DOWNLOADING?c.progress:0,b=(null===c||void 0===c?void 0:c.status)===vR.DOWNLOADING;return{file:l,indicatorProps:{status:v,labelSecondary:C,tooltipTitle:x,progressValue:f,hideLabelSecondary:b,totalBytesDownloaded:null===c||void 0===c?void 0:c.totalBytesDownloaded,totalDownloadSize:null===c||void 0===c?void 0:c.totalDownloadSize,timeRemaining:null===c||void 0===c?void 0:c.timeRemaining,downloadSpeed:null===c||void 0===c?void 0:c.downloadSpeed}}})).compact().value();return[r,s]})).fromPairs().value()},dT=(e,t)=>!(0,d.P)("DISABLE_ANDROID_PERMISSION_WARNINGS")&&(ic(e.osVersion,t)?"required":!!nc(e.model,t)&&"upcoming"),cT=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{device:n,configuration:i,approvedApps:o,resolvedInstantApps:r}=DR(),l=dT(n,e);return(0,a.useMemo)((()=>{if(!l)return!1;if(t)return!1;return!(!tc(i.fileRefs,e)&&!ec([...o,...r],e))&&l}),[l,t,i.fileRefs,e,o,r])},uT=()=>{const{deviceStatus:e}=DR();return cT("androidObb",null===e||void 0===e?void 0:e.hasAndroidObbPermission)},pT=()=>{const{deviceStatus:e}=DR();return cT("androidData",null===e||void 0===e?void 0:e.hasAndroidDataPermission)},hT=()=>{const{device:e,configurationMatchesDevice:t,configuration:n,currentRuntimeSettings:i}=DR(),a=[];if(!(0,o.isNil)(n.onlyDownloadContentWhenCharging)){const o=Boolean(null===i||void 0===i?void 0:i.onlyDownloadContentWhenCharging),r=Boolean(n.onlyDownloadContentWhenCharging),l=BR(e,t,r===o);a.push({title:"Update Requirements",label:r?"Plugged in":"None",indicatorProps:l})}if(!(0,o.isNil)(n.onlyDownloadContentDuringUpdateWindow)){const r=null===i||void 0===i?void 0:i.updateWindows,l=n.updateWindows,s=Boolean(null===i||void 0===i?void 0:i.onlyDownloadContentDuringUpdateWindow),d=Boolean(n.onlyDownloadContentDuringUpdateWindow),c=s?r:void 0,u=d?l:void 0,p=BR(e,t,(0,o.isEqual)(c,u));a.push({title:"Content Update Schedule",label:d?"Scheduled":"Any time, any day",indicatorProps:p})}return a},mT=(0,a.memo)((e=>{let{online:t,outOfDate:n,statusHasError:o,updating:a,SvgIconProps:r,CircularProgressProps:l,filled:s=!1,showTooltip:d=!1}=e;const c=(0,Vr.Dd)({online:t,outOfDate:n,statusHasError:o,updating:a}),u=(0,Vr.y)({updating:a,online:t,outOfDate:n,statusHasError:o}),h={success:s?(0,p.jsx)(Rh.Z,{color:"success",...r}):(0,p.jsx)(ng.Z,{color:"success",...r}),pending:s?(0,p.jsx)(i.Z,{sx:{width:("number"===typeof(null===l||void 0===l?void 0:l.size)?l.size:20)+4,height:("number"===typeof(null===l||void 0===l?void 0:l.size)?l.size:20)+4,borderRadius:"50%",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,p.jsx)(Zi.Z,{color:"primary",...l})}):(0,p.jsx)(Zi.Z,{color:"primary",...l}),warning:s?(0,p.jsx)(Jr.Z,{color:"warning",...r}):(0,p.jsx)(Gf.Z,{color:"warning",...r}),error:s?(0,p.jsx)(hM.Z,{color:"error",...r}):(0,p.jsx)(Cd.Z,{color:"error",...r})}
3,m=(0,p.jsx)(p.Fragment,{children:h[c]});return d?(0,p.jsx)(ee.Z,{title:u,enterDelay:500,children:(0,p.jsx)(i.Z,{component:"span",sx:{display:"inline-flex",alignItems:"center"},children:m})}):m})),gT=e=>{let{appVersions:t,singleApp:n}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(Lu,{appVersions:t,sx:{transform:"translateY(-1px)"}}),(0,p.jsx)(Tu,{appVersions:t,singleApp:n})]})};var vT=n(61079);const CT=(0,a.memo)((e=>{const{status:t,progressValue:n,totalBytesDownloaded:i,totalDownloadSize:o,timeRemaining:a,downloadSpeed:r}=e,l=(0,M.Vl)(null!==a&&void 0!==a?a:0),s=(0,Ad.Z)(null!==r&&void 0!==r?r:0),d=(0,Ad.Z)(null!==i&&void 0!==i?i:0),c=(0,Ad.Z)(null!==o&&void 0!==o?o:0),u=(0,Vr.nk)(e);return(0,p.jsx)(ee.Z,{title:"paused"===u?(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"This device paused its download because it lost connection to the internet mid download."}),(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",fontWeight:"bold",children:"How to retry the download:"}),(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"The device will automatically try again within 15 minutes, if online"}),(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"To force a retry sooner, send a Sync command"}),(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"When it retries, the download will pick up from where it left off."})]}):"downloading"===u?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:6,justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"Speed"}),(0,p.jsxs)(v.Z,{color:"grey.800",fontSize:"small",children:[s,"/s"]})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:6,justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"Time left"}),(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:l})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:6,justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"Completed"}),(0,p.jsxs)(v.Z,{color:"grey.800",fontSize:"small",children:[d,"/",c]})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:6,justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"Percentage"}),(0,p.jsxs)(v.Z,{color:"grey.800",fontSize:"small",children:[Math.round(null!==n&&void 0!==n?n:0),"%"]})]})]}):(0,p.jsx)(v.Z,{color:"grey.800",fontSize:"small",children:"success"===t?"Success!":"Download queued"}),placement:"top-end",componentsProps:{tooltip:{sx:{bgcolor:"white",border:"1px solid",borderColor:"grey.200",color:"black",width:"paused"===u?300:"downloading"===u?230:"auto"}}},children:(0,p.jsx)(cc.Z,{fontSize:"small",sx:{color:"grey.400"}})})})),xT=(0,a.memo)((e=>{const{labelPrimary:t,labelSecondary:n,tooltipTitle:i="",hideProgressDetails:o=!1,expiredApp:r,hideLabelSecondary:l,isPaused:s,tooltipInteractive:d,LabelTypographyProps:c,iconPosition:u="end",...h}=e,g=(0,Vr.nk)(e),C="paused"===g?"warning":h.status,x="paused"===g?"Out of date":n,f=(0,a.useMemo)((()=>"pending"!==h.status||"paused"===g?null:o?(0,p.jsx)(Zi.Z,{variant:"downloading"===g?"determinate":"indeterminate",value:h.progressValue,size:14}):(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(Rn.Z,{sx:{width:e=>e.spacing(8)},variant:"downloading"===g?"determinate":"indeterminate",value:h.progressValue}),(0,p.jsx)(CT,{...h})]})),[h,g,o]),b={minWidth:0,...d?{textDecoration:"underline dashed",textUnderlineOffset:"3px"}:void 0};return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,"data-testid":"device_syncStatusIndicator",sx:{maxWidth:1,minWidth:0,overflow:"hidden"},children:[(0,p.jsx)(ee.Z,{title:i,placement:d?"right":"top-end",disableInteractive:!d,leaveDelay:d?200:0,componentsProps:d?{tooltip:{sx:{bgcolor:"grey.900",color:"white",maxWidth:360}}}:void 0,children:(0,p.jsxs)(m.Z,{direction:"start"===u?"row-reverse":"row",alignItems:"center",spacing:.5,sx:{minWidth:0,maxWidth:1,overflow:"hidden"},children:[t&&(0,p.jsx)(v.Z,{variant:"subtitle2",noWrap:!0,...c,sx:{minWidth:0},children:t}),x&&!l&&(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,...c,sx:b,children:x}),"success"===C&&(0,p.jsx)(ng.Z,{color:"success",fontSize:"small",sx:{flexShrink:0}}),"error"===C&&(0,p.jsx)(Cd.Z,{color:"error",fontSize:"small",sx:{flexShrink:0}}),"warning"===C&&(0,p.jsx)(Gf.Z,{color:"warning",fontSize:"small",sx:{flexShrink:0}}),"unavailable"===C&&(0,p.jsx)(cc.Z,{color:"action",fontSize:"small",sx:{flexShrink:0}}),"firmware_hold"===C&&(0,p.jsx)(vT.Z,{color:"info",fontSize:"small",sx:{flexShrink:0}}),"expired"===C&&(r?(0,p.jsx)(Lu,{appVersions:[r],fontSize:"small"}):(0,p.jsx)(Iu.Z,{color:"action",fontSize:"small",sx:{flexShrink:0}}))]})}),f]})})),fT=e=>{let{title:t,indicatorProps:n,TypographyProps:o,iconPosition:a,statusColumnWidth:r,titleIcon:l,hideStatus:s,syncedLabel:d}=e;const c=d&&"Synced"===n.labelSecondary?{...n,labelSecondary:d}:n;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{width:1,justifyContent:"space-between"},children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{minWidth:0,flex:1},children:[l,(0,p.jsx)(Ui.G,{title:t,variant:"body2",...o})]}),!s&&(0,p.jsx)(i.Z,{sx:r?{width:r,flexShrink:0,minWidth:0,overflow:"hidden"}:void 0,children:(0,p.jsx)(xT,{...c,LabelTypographyProps:o,iconPosition:a})})]})};fT.displayName="DeviceListItemSyncStatusPreviewItem";const bT=e=>{var t;let{title:n,targetApp:i,isGlobalReleaseChannel:o,TypographyProps:a,...r}=e;const{indicatorProps:l}=OR(i,o),s=(0,Vs.IR)(i);return(0,p.jsx)(fT,{title:null!==(t=null!==n&&void 0!==n?n:i.title)&&void 0!==t?t:"",indicatorProps:l,titleIcon:(0,p.jsx)(gT,{appVersions:[i],singleApp:!0}),TypographyProps:{...s&&{color:"text.secondary"},...a},...r})};bT.displayName="DeviceListItemSyncStatusPreviewApp";const yT=e=>{let{instantApp:t,...n}=e;const i=NR(t);return i?(0,p.jsx)(jT,{instantApp:t,targetApp:i,...n}):(0,p.jsx)(ZT,{instantApp:t,...n})},jT=e=>{let{instantApp:t,targetApp:n,...i}=e;const{indicatorProps:o}=OR(n);return(0,p.jsx)(fT,{title:t.title,indicatorProps:o,...i})},ZT=e=>{let{instantApp:t,...n}=e;return(0,p.jsx)(fT,{title:t.title,indicatorProps:{status:"warning",labelSecondary:"Incompatible"},...n})};yT.displayName="DeviceListItemSyncStatusPreviewInstantApp";const wT=(0,a.memo)((()=>{const e=(0,De.Z)(),{approvedApps:t,approvedInstantApps:n,approvedVideos:i,approvedWebXRApps:o}=DR(),r=IR(),l=AR(),s=RR(),d=TR(),c=PR(),u=LR(),h=sT(),g=lT(),C=nT(),x=WR(),f=hT(),b=iT(),y=uT(),j=pT(),Z=(0,a.useMemo)((()=>{const e=[];return r&&e.push({...r,deviceListItemTitle:"ManageXR Admin App"}),l&&e.push({...l,deviceListItemTitle:"ManageXR Home Screen"}),s&&e.push({...s,deviceListItemTitle:"Wolvic Browser"}),d&&e.push({...d,deviceListItemTitle:"Pico Permissions Granter"}),c&&e.push({...c,deviceListItemTitle:"OEMConfig"}),u&&e.push({...u,deviceListItemTitle:"OEMConfigKioskApp"}),e}),[r,l,u,c,d,s]);return(0,p.jsx)(Me.Z,{sx:{border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)",borderRadius:1},children:(0,p.jsxs)(m.Z,{sx:{overflowY:"auto",maxHeight:"calc(100vh - ".concat(e.spacing(2)," - var(--scrollbarHeight))")},width:360,padding:1,spacing:1,children:["required"===y&&(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Cd.Z,{fontSize:"small",color:"error"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Missing ",Bd.androidObb," Permission"]})]}),"required"===j&&(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Cd.Z,{fontSize:"small",color:"error"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Missing ",Bd.androidData," Permission"]})]}),(0,p.jsx)(ET,{title:"Deployed Apps",apps:t}),(0,p.jsx)(ST,{title:"Instant Apps",instantApps:n}),(0,p.jsx)(ET,{title:"ManageXR Apps",apps:Z,isGlobalReleaseChannel:!0}),(0,p.jsx)(DT,{title:"Files",filesSyncStatusesMap:h}),(0,p.jsx)(IT,{title:"Videos",videos:i}),(0,p.jsx)(MT,{title:"Web XR Links",webXRApps:o}
3),(0,p.jsx)(RT,{title:"Wi-Fi Networks",statuses:C}),(0,p.jsx)(RT,{title:"Firmware",statuses:g?[g]:void 0}),(0,p.jsx)(RT,{title:"Device Experience",statuses:x}),(0,p.jsx)(RT,{title:"Content Update Schedule",statuses:f}),(0,p.jsx)(RT,{title:"Device Settings",statuses:b})]})})})),ET=e=>{let{title:t,apps:n,isGlobalReleaseChannel:a}=e;return(0,o.isEmpty)(n)?null:(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:t}),(0,o.map)(n,(e=>{let{deviceListItemTitle:t,...n}=e;return(0,p.jsx)(bT,{title:t,targetApp:n,isGlobalReleaseChannel:a},n.id)}))]})},ST=e=>{let{title:t,instantApps:n}=e;return(0,o.isEmpty)(n)?null:(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:t}),(0,o.map)(n,(e=>(0,p.jsx)(yT,{instantApp:e},e.id)))]})},DT=e=>{let{title:t,filesSyncStatusesMap:n}=e;return(0,o.isEmpty)(n)?null:(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:t}),(0,o.map)(n,((e,t)=>(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"caption",color:"textSecondary",children:t}),(0,o.map)(e,(e=>(0,p.jsx)(fT,{title:e.file.name,indicatorProps:e.indicatorProps},e.file.id)))]},t)))]})},MT=e=>{let{title:t,webXRApps:n}=e;return(0,o.isEmpty)(n)?null:(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:t}),(0,o.map)(n,(e=>(0,p.jsx)(kT,{title:e.title,targetWebXRApp:e},e.id)))]})},kT=e=>{let{title:t,targetWebXRApp:n,...i}=e;const o=zR(n);return(0,p.jsx)(fT,{title:t,indicatorProps:o.indicatorProps,...i},n.id)},IT=e=>{let{title:t,videos:n}=e;return(0,o.isEmpty)(n)?null:(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:t}),(0,o.map)(n,(e=>(0,p.jsx)(AT,{title:e.title,targetVideo:e},e.id)))]})},AT=e=>{let{title:t,targetVideo:n,...i}=e;const o=_R(n);return(0,p.jsx)(fT,{title:t,indicatorProps:o.indicatorProps,...i},n.id)},RT=e=>{let{title:t,statuses:n}=e;return(0,o.isEmpty)(n)?null:(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:t}),(0,o.map)(n,(e=>(0,p.jsx)(fT,{indicatorProps:e.indicatorProps,title:e.title},e.title)))]})};wT.displayName="DeviceListItemSyncStatusPreview";const TT={TypographyProps:{variant:"caption",color:"text.secondary"},iconPosition:"start",statusColumnWidth:96,syncedLabel:"Up to date"},PT=(0,a.memo)((()=>{const{device:e,approvedApps:t,approvedInstantApps:n,approvedVideos:r,approvedWebXRApps:l}=DR(),s=IR(),d=AR(),c=RR(),u=TR(),h=PR(),g=LR(),C=sT(),x=lT(),f=nT(),b=WR(),y=hT(),j=iT(),Z=uT(),w=pT(),E="success"===(0,Vr.Dd)({updating:e.updating,online:e.online,outOfDate:e.outOfDate,statusHasError:e.statusHasError}),S=E,D=(0,a.useMemo)((()=>{const e=[];return s&&e.push({...s,deviceListItemTitle:"ManageXR Admin App"}),d&&e.push({...d,deviceListItemTitle:"ManageXR Home Screen"}),c&&e.push({...c,deviceListItemTitle:"Wolvic Browser"}),u&&e.push({...u,deviceListItemTitle:"Pico Permissions Granter"}),h&&e.push({...h,deviceListItemTitle:"OEMConfig"}),g&&e.push({...g,deviceListItemTitle:"OEMConfigKioskApp"}),e}),[s,d,c,u,h,g]),M=e=>E?[]:(0,o.filter)(e,(e=>{let{indicatorProps:t}=e;return"success"!==t.status})),k=M(f),I=M(b),A=M(y),R=M(j),T=null===x||void 0===x?void 0:x.indicatorProps.status,P=!!x&&("firmware_hold"===T||!E&&"success"!==T),L=!(0,o.isEmpty)(t)||!(0,o.isEmpty)(D);return(0,p.jsx)(Me.Z,{"data-testid":"deviceTable_syncStatusHover",sx:{border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)",borderRadius:"12px"},children:(0,p.jsxs)(m.Z,{sx:{overflowY:"auto",maxHeight:"min(".concat(460,"px, calc(100dvh - 16px))")},width:360,paddingX:2,paddingY:1.5,spacing:1.5,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"Sync Status"}),E&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(ng.Z,{color:"success",fontSize:"small"}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Up to Date"})]})]}),!E&&"required"===Z&&(0,p.jsx)(NT,{label:Bd.androidObb}),!E&&"required"===w&&(0,p.jsx)(NT,{label:Bd.androidData}
3),(0,p.jsxs)(LT,{show:L,title:"Apps",children:[(0,o.map)(t,(e=>(0,p.jsx)(bT,{targetApp:e,hideStatus:S,...TT},e.id))),(0,o.map)(D,(e=>{let{deviceListItemTitle:t,...n}=e;return(0,p.jsx)(bT,{title:t,targetApp:n,isGlobalReleaseChannel:!0,hideStatus:S,...TT},n.id)}))]}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(n),title:"Instant Apps",children:(0,o.map)(n,(e=>(0,p.jsx)(yT,{instantApp:e,hideStatus:S,...TT},e.id)))}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(C),title:"Files",children:(0,o.map)(C,((e,t)=>(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:t}),(0,o.map)(e,(e=>(0,p.jsx)(fT,{title:e.file.name,indicatorProps:e.indicatorProps,hideStatus:S,...TT},e.file.id)))]},t)))}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(r),title:"Videos",children:(0,o.map)(r,(e=>(0,p.jsx)(AT,{title:e.title,targetVideo:e,hideStatus:S,...TT},e.id)))}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(l),title:"Web XR Links",children:(0,o.map)(l,(e=>(0,p.jsx)(kT,{title:e.title,targetWebXRApp:e,hideStatus:S,...TT},e.id)))}),(0,p.jsx)(LT,{show:P,title:"Firmware",hideStatus:S&&"firmware_hold"!==(null===x||void 0===x?void 0:x.indicatorProps.status),statuses:x?[x]:[]}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(k),title:"Wi-Fi Networks",statuses:k}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(I),title:"Device Experience",statuses:I}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(A),title:"Content Update Schedule",statuses:A}),(0,p.jsx)(LT,{show:!(0,o.isEmpty)(R),title:"Device Settings",statuses:R})]})})}));PT.displayName="DeviceTableSyncStatusHover";const LT=e=>{let{show:t,title:n,hideStatus:a,statuses:r,children:l}=e;return t?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",sx:{marginBottom:.5},children:n}),(0,p.jsx)(m.Z,{spacing:.25,children:r?(0,o.map)(r,(e=>{let{title:t,indicatorProps:n}=e;return(0,p.jsx)(fT,{title:t,indicatorProps:n,hideStatus:a,...TT},t)})):l})]})]}):null},NT=e=>{let{label:t}=e;return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Cd.Z,{fontSize:"small",color:"error"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Missing ",t," Permission"]})]})},UT=(0,a.memo)((e=>{let{row:t}=e;const n=(0,De.Z)(),{device:o,loaded:r}=XA(t.original.id),l=(0,xo.ky)(S.F.Configurations,null===o||void 0===o?void 0:o.deviceGroupRef.id),s=(0,Le.ye)("enableTutorialModeRevamp"),d=(0,a.useRef)(null),[c,u]=(0,a.useState)(!1);return r?"COMPLETE"===(null===o||void 0===o?void 0:o.factoryResetStatus)?null:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,children:[(0,p.jsxs)(i.Z,{ref:d,component:"span",onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),sx:{display:"inline-flex",alignItems:"center",flexShrink:0},"data-testid":"deviceTable_syncStatusIcon",children:[(0,p.jsx)(mT,{online:null===o||void 0===o?void 0:o.online,outOfDate:null===o||void 0===o?void 0:o.outOfDate,statusHasError:null===o||void 0===o?void 0:o.statusHasError,updating:null===o||void 0===o?void 0:o.updating,SvgIconProps:{sx:{fontSize:"1rem"}},CircularProgressProps:{size:16}}),(0,p.jsx)(Xr.Z,{style:{zIndex:n.zIndex.modal},open:c,anchorEl:d.current,placement:"left-start",popperOptions:{strategy:"fixed",modifiers:[{name:"preventOverflow",options:{padding:n.spacingInt(1)}}]},children:(0,p.jsx)(SR,{deviceId:t.original.id,renderPlaceholder:(0,p.jsx)(Me.Z,{sx:{width:360,border:"1px solid",borderColor:"divider",borderRadius:"12px",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)",paddingX:2,paddingY:1.5},children:(0,p.jsx)(Rn.Z,{})}),children:(0,p.jsx)(PT,{})})})]}),!1===(null===o||void 0===o?void 0:o.kioskModeEnabled)&&!(null!==o&&void 0!==o&&o.qfbDeviceMode)&&(0,p.jsx)(nR,{label:"Kiosk",status:"Off",TooltipProps:{placement:"left"},deviceExperienceMode:null===l||void 0===l?void 0:l.deviceExperienceMode,iconOnly:!0}),s?!1===(null===o||void 0===o?void 0:o.tutorialModeEnabled)&&(null===l||void 0===l?void 0:l.tutorialAppRef)&&(0,p.jsx)(nR,{label:"Tutorial",status:"Off",TooltipProps:{placement:"bottom-end"},iconOnly:!0}):(null===o||void 0===o?void 0:o.firstTimeUseModeEnabled)&&(0,p.jsx)(nR,{label:"Tutorial",status:"On",TooltipProps:{placement:"bottom-end"},iconOnly:!0}),(0,p.jsx)(mu,{qfbDeviceMode:null===o||void 0===o?void 0:o.qfbDeviceMode,iconOnly:!0})]}):(0,p.jsx)(g.Z,{width:"100%"})}));UT.displayName="DeviceTableCellSyncStatus";const FT=(e,t)=>{const n=(0,o.filter)(e,(e=>!1!==t[e])),i=n.indexOf("configuration"),a=n.indexOf("syncStatus");return-1!==i&&a===i+1},OT=e=>{let{variant:t}=e;const n=(0,u.I0)(),i=(0,a.useCallback)((()=>{n(La.i7.actions.addDeviceDialogOpenChanged(!0))}),[n]);return"noMatchingDevices"===t?(0,p.jsx)(m.Z,{flex:1,alignItems:"center",justifyContent:"center",minHeight:0,"data-testid":"deviceTable_emptyState_noMatchingDevices",children:(0,p.jsx)(v.Z,{variant:"h4",color:"text.disabled",children:"No matching devices"})}):(0,p.jsxs)(m.Z,{flex:1,alignItems:"center",justifyContent:"center",spacing:3,minHeight:0,"data-testid":"deviceTable_emptyState_noDevices",children:[(0,p.jsxs)(m.Z,{alignItems:"center",spacing:1.5,children:[(0,p.jsx)(v.Z,{variant:"h4",color:"text.primary",children:"No devices"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",textAlign:"center",children:"Add devices to this organization to see them appear here."})]}),(0,p.jsx)(C.Z,{variant:"outlined",onClick:i,"data-testid":"deviceTable_emptyState_addDeviceButton",children:"Add device"})]})};OT.displayName="DeviceTableEmptyState";const _T=(0,a.memo)((e=>(0,p.jsx)($n.Z,{...e,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,p.jsx)("path",{d:"M7.39616 16.0209C7.16005 16.0209 6.94824 15.9272 6.76074 15.7397C6.57324 15.5522 6.47949 15.3404 6.47949 15.1042C6.47949 14.8542 6.57324 14.6355 6.76074 14.448C6.94824 14.2605 7.16005 14.1667 7.39616 14.1667C7.64616 14.1667 7.86491 14.2605 8.05241 14.448C8.23991 14.6355 8.33366 14.8542 8.33366 15.1042C8.33366 15.3404 8.23991 15.5522 8.05241 15.7397C7.86491 15.9272 7.64616 16.0209 7.39616 16.0209ZM7.39616 10.9376C7.16005 10.9376 6.94824 10.8438 6.76074 10.6563C6.57324 10.4688 6.47949 10.2501 6.47949 10.
30001C6.47949 9.75008 6.57324 9.53133 6.76074 9.34383C6.94824 9.15633 7.16005 9.06258 7.39616 9.06258C7.64616 9.06258 7.86491 9.15633 8.05241 9.34383C8.23991 9.53133 8.33366 9.75008 8.33366 10.0001C8.33366 10.2501 8.23991 10.4688 8.05241 10.6563C7.86491 10.8438 7.64616 10.9376 7.39616 10.9376ZM7.39616 5.83341C7.16005 5.83341 6.94824 5.73966 6.76074 5.55216C6.57324 5.36466 6.47949 5.14591 6.47949 4.89591C6.47949 4.6598 6.57324 4.448 6.76074 4.2605C6.94824 4.073 7.16005 3.97925 7.39616 3.97925C7.64616 3.97925 7.86491 4.073 8.05241 4.2605C8.23991 4.448 8.33366 4.6598 8.33366 4.89591C8.33366 5.14591 8.23991 5.36466 8.05241 5.55216C7.86491 5.73966 7.64616 5.83341 7.39616 5.83341ZM12.6045 5.83341C12.3545 5.83341 12.1357 5.73966 11.9482 5.55216C11.7607 5.36466 11.667 5.14591 11.667 4.89591C11.667 4.6598 11.7607 4.448 11.9482 4.2605C12.1357 4.073 12.3545 3.97925 12.6045 3.97925C12.8406 3.97925 13.0524 4.073 13.2399 4.2605C13.4274 4.448 13.5212 4.6598 13.5212 4.89591C13.5212 5.14591 13.4274 5.36466 13.2399 5.55216C13.0524 5.73966 12.8406 5.83341 12.6045 5.83341ZM12.6045 10.9376C12.3545 10.9376 12.1357 10.8438 11.9482 10.6563C11.7607 10.4688 11.667 10.2501 11.667 10.0001C11.667 9.75008 11.7607 9.53133 11.9482 9.34383C12.1357 9.15633 12.3545 9.06258 12.6045 9.06258C12.8406 9.06258 13.0524 9.15633 13.2399 9.34383C13.4274 9.53133 13.5212 9.75008 13.5212 10.0001C13.5212 10.2501 13.4274 10.4688 13.2399 10.6563C13.0524 10.8438 12.8406 10.9376 12.6045 10.9376ZM12.6045 16.0209C12.3545 16.0209 12.1357 15.9272 11.9482 15.7397C11.7607 15.5522 11.667 15.3404 11.667 15.1042C11.667 14.8542 11.7607 14.6355 11.9482 14.448C12.1357 14.2605 12.3545 14.1667 12.6045 14.1667C12.8406 14.1667 13.0524 14.2605 13.2399 14.448C13.4274 14.6355 13.5212 14.8542 13.5212 15.1042C13.5212 15.3404 13.4274 15.5522 13.2399 15.7397C13.0524 15.9272 12.8406 16.0209 12.6045 16.0209Z",fill:"currentColor"})})));_T.displayName="DragIndicatorLightIcon";const zT=(0,a.memo)((e=>(0,p.jsx)($n.Z,{...e,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,p.jsx)("path",{d:"M10.0205 17.3751C9.67329 17.3751 9.37815 17.2536 9.13509 17.0105C8.89204 16.7674 8.77051 16.4792 8.77051 16.1459C8.77051 15.8126 8.89204 15.5209 9.13509 15.2709C9.37815 15.0209 9.66634 14.8959 9.99967 14.8959C10.3469 14.8959 10.6386 15.0209 10.8747 15.2709C11.1108 15.5209 11.2288 15.8126 11.2288 16.1459C11.2288 16.4792 11.1108 16.7674 10.8747 17.0105C10.6386 17.2536 10.3538 17.3751 10.0205 17.3751ZM10.0205 11.2292C9.67329 11.2292 9.37815 11.1077 9.13509 10.8647C8.89204 10.6216 8.77051 10.3334 8.77051 10.0001C8.77051 9.65286 8.89204 9.36119 9.13509 9.12508C9.37815 8.88897 9.66634 8.77091 9.99967 8.77091C10.3469 8.77091 10.6386 8.88897 10.8747 9.12508C11.1108 9.36119 11.2288 9.64592 11.2288 9.97925C11.2288 10.3265 11.1108 10.6216 10.8747 10.8647C10.6386 11.1077 10.3538 11.2292 10.0205 11.2292ZM10.0205 5.10425C9.67329 5.10425 9.37815 4.98272 9.13509 4.73966C8.89204 4.49661 8.77051 4.20147 8.77051 3.85425C8.77051 3.50703 8.89204 3.21189 9.13509 2.96883C9.37815 2.72578 9.66634 2.60425 9.99967 2.60425C10.3469 2.60425 10.6386 2.72578 10.8747 2.96883C11.1108 3.21189 11.2288 3.50703 11.2288 3.85425C11.2288 4.20147 11.1108 4.49661 10.8747 4.73966C10.6386 4.98272 10.3538 5.10425 10.0205 5.10425Z",fill:"currentColor"})})));zT.displayName="MoreVerticalLightIcon";const BT={boxSizing:"border-box",height:37,minHeight:37,paddingX:2,paddingY:2},WT="More options",VT=240,GT=(0,a.memo)((e=>{let{menuItems:t,testId:n="uiTableToolbar_moreMenuButton",tooltip:o=WT,disabled:r=!1,width:l=VT,paperSx:s,onOpen:d,onClose:c}=e;const[u,h]=(0,a.useState)(null),m=Boolean(u),g=()=>{null===c||void 0===c||c(),h(null)};return(0,p.jsxs)(i.Z,{onClick:e=>e.stopPropagation(),children:[(0,p.jsx)(ee.Z,{title:o,placement:"top",enterDelay:500,children:(0,p.jsx)("span",{"data-testid":n,children:(0,p.jsx)(x.Z,{disabled:r,onClick:e=>{null===d||void 0===d||d(e),e.preventDefault(),e.stopPropagation(),h(e.currentTarget)},sx:{width:36,height:36,...m&&{bgcolor:y.DG.purple[100],"&:hover":{bgcolor:y.DG.purple[100]}}},children:(0,p.jsx)(zT,{sx:MA})})})}),(0,p.jsx)(Is.Z,{anchorEl:u,open:m,onClose:g,onClick:g,disableScrollLock:!0,elevation:0,MenuListProps:{sx:{width:l,paddingY:0}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{borderRadius:"8px",borderWidth:1,borderStyle:"solid",borderColor:"grey.400",boxShadow:"0px 0px 6px 0px #00000026",...s}},sx:{"& .MuiListItemText-primary":{...y.cp.body2}},children:t})]})}));GT.displayName="UITableToolbarMoreMenu";const HT=(0,a.memo)((e=>{let{columnId:t,label:n,visible:o,draggedColumnId:a,index:r,onColumnVisibilityToggle:l,onDragStart:s,onDragHover:
3d,onDragEnd:c}=e;const u=a===t,h=o?"text.primary":"text.secondary",{dragRef:m,dropRef:g}=(0,lm.RB)({id:t,index:r,dndType:"ui-table-toolbar-column",draggedId:a,onDragStart:s,onDragHover:d,onDragEnd:c});return(0,p.jsxs)(i.Z,{ref:g,"data-testid":"uiTableToolbar_columnsMenuItem_".concat(t),sx:{display:"flex",alignItems:"center",gap:.5,boxSizing:"border-box",height:37,paddingX:2,paddingY:2,opacity:u?.5:1},children:[(0,p.jsx)(i.Z,{ref:m,sx:{display:"flex",alignItems:"center",cursor:"grab",paddingRight:1.5},children:(0,p.jsx)(_T,{sx:{fontSize:20,color:h}})}),(0,p.jsx)(v.Z,{variant:"body2",color:h,sx:{flex:1,minWidth:0},children:n}),(0,p.jsx)(x.Z,{size:"small","aria-label":"".concat(o?"Hide":"Show"," ").concat(n," column"),"data-testid":"uiTableToolbar_columnsMenuItem_visibility_".concat(t),onClick:e=>{e.stopPropagation(),l(t)},sx:{marginLeft:"auto",color:h,width:20,height:20,padding:0},children:o?(0,p.jsx)(Co.Z,{sx:{fontSize:20}}):(0,p.jsx)(vo.Z,{sx:{fontSize:20}})})]})}));HT.displayName="UITableToolbarColumnsMenuItem";const qT=(0,a.memo)((e=>{let{columnLayout:t,columnMenuItems:n,onColumnLayoutOrderChange:i,onColumnVisibilityToggle:r}=e;const l=(0,a.useMemo)((()=>(0,o.keyBy)(n,"id")),[n]),s=(0,o.map)(t,"id"),{draggedId:d,onDragStart:c,onDragHover:u,onDragEnd:h}=(0,lm.gq)({order:s,getId:e=>e,setOrder:i,onReorder:i});return(0,p.jsxs)(m.Z,{onClick:e=>e.stopPropagation(),"data-testid":"uiTableToolbar_columnsMenu",children:[(0,p.jsx)(Hi.Z,{disabled:!0,disableRipple:!0,sx:{...BT,cursor:"default","&.Mui-disabled":{opacity:1}},children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Edit Table Columns"})}),(0,o.map)(t,((e,t)=>{const n=l[e.id];return n?(0,p.jsx)(HT,{columnId:e.id,label:n.label,visible:e.visible,draggedColumnId:d,index:t,onColumnVisibilityToggle:r,onDragStart:c,onDragHover:u,onDragEnd:h},e.id):null}))]})}));qT.displayName="UITableToolbarColumnsMenu";var YT=n(91232),KT=n(82543);const XT=()=>{const{organizationId:e}=(0,w.P)(),{notify:t}=(0,ie.o)(),n=(0,d.EM)(),i=(0,u.v9)((e=>e.device.query)),[o,r]=(0,a.useState)(!1);return{downloadPending:o,handleDownloadClick:(0,a.useCallback)((async()=>{r(!0);const o=(0,KT.n)(i,n);try{const{result:t}=await(0,Fe.z0)({organizationId:e},o);(0,di.KG)({name:"ManageXR Devices - ".concat((0,M.aH)(Date.now()),".csv"),type:"text/csv",content:t,settings:{withByteOrderMark:!0}})}catch(a){t({severity:"error",message:"Failed to generate CSV"}),(0,Si.yR)(a,{name:"download devices csv error"})}r(!1)}),[i,n,t,e])}},QT=(0,a.memo)((e=>{let{columnLayout:t,columnMenuItems:n,onColumnLayoutOrderChange:i,onColumnVisibilityToggle:o,onMenuClose:a}=e;const{downloadPending:r,handleDownloadClick:l}=XT();return(0,p.jsx)(GT,{testId:"deviceList_moreMenuButton",onClose:a,menuItems:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Zd,{sx:BT,icon:(0,p.jsx)(YT.Z,{sx:{fontSize:20}}),label:"Download CSV",onClick:l,disabled:r,tooltip:"Download CSV of device data, based on current filters"}),(0,p.jsx)(Ie.Z,{sx:{marginX:2,marginY:.5}}),(0,p.jsx)(qT,{columnLayout:t,columnMenuItems:n,onColumnLayoutOrderChange:i,onColumnVisibilityToggle:o})]})})}));QT.displayName="DeviceTableMoreMenu";const JT=n.p+"static/media/deviceListOnboardingGraphic.48fc147a1653d8d3cc6aa92b9d19eea9.svg",$T=()=>(0,p.jsx)(On.e,{backgroundSx:{background:"url(".concat(JT,")"),backgroundSize:"contain",backgroundPosition:"right",backgroundRepeat:"no-repeat",aspectRatio:785/268,backgroundColor:y.DG.purple[200]},ctaMessage:"Add your first device",title:"Manage your fleet from the device list",subtitle:"Organize your devices, apply configurations, and send grouped commands",dialog:(0,p.jsx)(qo,{analyticsLocation:"Onboarding - Device List",open:!1,onClose:()=>{}})}),eP=()=>{const{organization:e}=(0,d.mP)(),t=(0,u.v9)((e=>!e.device.query.searchValue&&(0,o.isEmpty)(e.device.query.configurationIds)&&(0,o.isEmpty)(e.device.query.tagIds)&&(0,o.isEmpty)(e.device.query.filterIds))),n=(0,u.v9)((e=>e.device.queryPending)),a=Qk(),r=e.numActiveDevices>0?"No devices match your filters":"Once you add devices, you'll be able to filter, organize, and manage them here!";return!n&&t&&a?(0,p.jsx)(EA,{}):!n&&t?(0,p.jsx)($T,{}):(0,p.jsx)(i.Z,{padding:4,textAlign:"center",children:(0,p.jsx)(v.Z,{variant:"subtitle1",color:"textSecondary",children:n?"Loading devices":r})})};var tP=n(85894);const nP=()=>{const e=(0,u.I0)(),t=(0,u.v9)((e=>e.device.queryPending)),n=(0,u.v9)((e=>e.device.pendingOperation)),o=(0,u.v9)((e=>e.device.selection.bulk));return n?(0,p.jsx)(i.Z,{width:38,height:38,padding:1,children:(0,p.jsx)(Zi.Z,{size:24})}):(0,p.jsx)(tP.V,{size:"medium",disabled:t,indeterminate:"some"===o,checked:"none"!==o,checkedIconColor:"primary",uncheckedIconColor:"text.secondary",onClick:()=>{e(La.i7.actions.bulkCheckboxChanged())},sx:{position:"absolute",left:12,top:1}})},iP=e=>{var t;let{row:n}=e;const a=(0,u.I0)(),r=null!==(t=(0,u.v9)((e=>e.device.selection.values[n.index])))&&void 0!==t&&t,l=(0,u.v9)((e=>e.device.pendingOperation)),s=(0,u.v9)((e=>e.device.queryPending));return(0,o.includes)(null===l||void 0===l?void 0:l.deviceIds,n.original.id)?(0,p.jsx)(i.Z,{width:38,height:38,padding:1,children:(0,p.jsx)(Zi.Z,{size:24})}):(0,p.jsx)(tP.V,{size:"medium",checked:r,checkedIconColor:"primary",uncheckedIconColor:"text.secondary",onClick:e=>{e.preventDefault(),a(La.i7.actions.checkboxChanged({index:n.index,multiSelect:e.nativeEvent.shiftKey}
3))},disabled:s||!!l,sx:{position:"absolute",left:12},"data-testid":"deviceList_tableRow_checkbox"})},oP=(0,a.memo)((()=>{const e=(0,u.I0)(),t=(0,a.useRef)(),n=(0,d.EM)()?Be.vc.device.hideUserInfoSearchOptions:Be.vc.device.searchOptions,i=(0,u.v9)((e=>e.device.query.searchValue)),o=(0,u.v9)((e=>e.device.pendingOperation)),{register:r,handleSubmit:l,watch:s,setValue:c}=(0,fg.cI)();(0,a.useEffect)((()=>{c("search",i)}),[c,i]);const h=s("search"),g=l((t=>{let{search:n}=t;e(La.i7.actions.searchValueChanged(n))})),{ref:v,...C}=r("search");return(0,p.jsx)("form",{style:{width:"100%"},onSubmit:g,noValidate:!0,children:(0,p.jsxs)(m.Z,{direction:"row",position:"relative",children:[(0,p.jsx)(Ln.Z,{InputProps:{sx:{paddingRight:3}},id:"search",placeholder:n.placeholder,inputRef:v,disabled:"changeOrganization"===(null===o||void 0===o?void 0:o.type),...C,onBlur:e=>{C.onBlur(e),h!==i&&g()},fullWidth:!0,"data-testid":"deviceList_searchInput"}),(0,p.jsx)("button",{disabled:"changeOrganization"===(null===o||void 0===o?void 0:o.type),style:{position:"absolute",visibility:"hidden"}}),h&&(0,p.jsx)(x.Z,{sx:{position:"absolute",right:e=>e.spacing(.5),top:"50%",transform:"translateY(-50%)"},onClick:()=>{var e;c("search",""),g(),null===(e=t.current)||void 0===e||e.focus()},disabled:"changeOrganization"===(null===o||void 0===o?void 0:o.type),children:(0,p.jsx)(pa.Z,{})})]})})})),aP=()=>{const{downloadPending:e,handleDownloadClick:t}=XT();return(0,p.jsx)(ee.Z,{title:"Download CSV of device data, based on current filters",placement:"top",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{onClick:t,disabled:e,children:e?(0,p.jsx)(Zi.Z,{size:24}):(0,p.jsx)(wi.Z,{})})})})},rP=(0,a.memo)((e=>{let{table:t,dimmed:n}=e;return(0,p.jsxs)(m.Z,{bgcolor:"background.default",spacing:.5,paddingTop:2,children:[(0,p.jsx)(i.Z,{paddingY:.5,children:(0,p.jsx)(oP,{})}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",paddingX:1.25,bgcolor:"grey.50",height:40,sx:{"& > *":{flexShrink:0}},children:[(0,p.jsx)(vA,{}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(aP,{}),(0,p.jsx)(IA,{})]}),(0,p.jsx)(eh.K,{table:t,flexColumnIds:hP,sx:{backgroundColor:"background.paper",...n&&{opacity:.35,pointerEvents:"none"}}})]})}));rP.displayName="DeviceTableToolbar";const lP=e=>{var t,n,i,o;let{row:a}=e;const{device:r,loaded:l}=XA(a.original.id);if(!l)return(0,p.jsx)(g.Z,{width:"100%"});const s="COMPLETE"===(null===r||void 0===r?void 0:r.factoryResetStatus),d=(0,Vr.ao)(null===r||void 0===r?void 0:r.model),{horizonOsVersion:c}=(0,Vr.aE)({manufacturer:null===r||void 0===r?void 0:r.manufacturer,firmwareVersion:null===r||void 0===r?void 0:r.firmwareVersion}),u=null!==(t=(0,Vr.xQ)({firmwareDisplayVersion:null===r||void 0===r?void 0:r.firmwareDisplayVersion,manufacturer:null===r||void 0===r?void 0:r.manufacturer,firmwareVersion:null===r||void 0===r?void 0:r.firmwareVersion}))&&void 0!==t?t:"--",h=!!(c||null!==r&&void 0!==r&&r.firmwareDisplayVersion),C=(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{wordBreak:"break-all"},noWrap:!0,children:u});return(0,p.jsxs)(m.Z,{overflow:"hidden",spacing:.25,sx:{opacity:s?.5:1},children:[(0,p.jsx)(ee.Z,{title:d,followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500,children:(0,p.jsx)(v.Z,{variant:"caption",noWrap:!0,children:d})}),h?(0,p.jsx)(aR,{firmwareVersion:null!==(n=null===r||void 0===r?void 0:r.firmwareVersion)&&void 0!==n?n:"Unknown",releaseNotesUrl:Be.IW.metaHorizonOsReleaseNotes,children:C}):(0,p.jsx)(ee.Z,{title:"Firmware version: ".concat(null!==(i=null===r||void 0===r?void 0:r.firmwareVersion)&&void 0!==i?i:"Unknown"),followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500,children:C}),(0,p.jsx)(ee.Z,{title:"Serial: ".concat(null!==(o=null===r||void 0===r?void 0:r.serial)&&void 0!==o?o:""),followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500,children:(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:null===r||void 0===r?void 0:r.serial})})]})},sP=e=>{let{tagRefs:t,onDeviceList:n=!1}=e;const i=(0,a.useMemo)((()=>(0,o.map)(t,"id")),[t]),r=(0,E.Ev)(S.F.Tags,i,{sort:ze.gt}),[l,s]=(0,a.useState)(0),{ref:d}=(0,Yi.y)((0,a.useCallback)((e=>{s(e.contentRect.width)}),[])),c=(0,a.useMemo)((()=>n?cP(r,l):0),[l,r,n]);if((0,o.isEmpty)(r))return n?null:(0,p.jsx)(v.Z,{paddingY:.25,variant:"body2",color:"text.secondary",children:"No Tags"});if(!n)return(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",gap:1,children:(0,p.jsx)(dP,{tags:r})});const u=(0,o.slice)(r,0,c+1),h=(0,o.slice)(r,c+1);return(0,p.jsxs)(m.Z,{ref:d,direction:"row",overflow:"hidden",alignItems:"center",spacing:1,width:1,children:[(0,p.jsx)(m.Z,{direction:"row",spacing:1,overflow:"hidden",children:(0,p.jsx)(dP,{tags:u,onDeviceList:n})}),!(0,o.isEmpty)(h)&&(0,p.jsx)(ee.Z,{title:(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",gap:1,marginTop:-2,marginLeft:-2,padding:.5,bgcolor:"background.paper",children:(0,p.jsx)(dP,{tags:h,onDeviceList:n})}),placement:"bottom-start",componentsProps:{tooltip:{sx:{backgroundColor:"transparent",maxWidth:"75vw"}}},children:(0,p.jsxs)(v.Z,{color:"text.secondary",variant:"overline",fontWeight:"bold",fontSize:10,sx:{paddingTop:.25,cursor:"pointer"},flexShrink:0,children:["+",h.length," more"]})})]})},dP=e=>{let{tags:t,onDeviceList:n=!1}=e;return(0,p.jsx)(p.Fragment,{children:(0,o.map)(t,(e=>(0,p.jsx)(ke.Z,{label:e.name,size:"small",sx:{backgroundColor:y.DG.purple[400],color:"background.paper",height:n?20:void 0,lineHeight:1}},e.id)))})},cP=(e,t)=>
3{const n=(0,o.map)(e,(e=>7*e.name.length+16));for(let i=e.length-1;i>0;i--){const a=i+1;if((0,o.sum)((0,o.slice)(n,0,a))+8*(a-1)+(a===e.length?0:53)<=t)return i}return 0},uP=(0,a.memo)((e=>{var t,n,i;let{row:o}=e;const{device:r}=XA(o.original.id),l="COMPLETE"===(null===r||void 0===r?void 0:r.factoryResetStatus),s=null!==(t=null===r||void 0===r?void 0:r.name)&&void 0!==t?t:"",d=(0,a.useRef)(null),c=!(null===r||void 0===r||!r.notes),u=(null!==(n=null===r||void 0===r||null===(i=r.tagRefs)||void 0===i?void 0:i.length)&&void 0!==n?n:0)>0,h=!(null===r||void 0===r||!r.requiresMxrRepair);return(0,a.useLayoutEffect)((()=>{if(!d.current)return;const e=(u||c)&&h?1:u||c||h?2:3;gm()(d.current,{clamp:e})}),[s,c,u,h]),(0,p.jsxs)(m.Z,{overflow:"hidden",spacing:.25,width:1,sx:{opacity:l?.5:1},children:[(0,p.jsx)(v.Z,{ref:d,variant:"subtitle2",sx:{wordBreak:"break-word"},children:(0,p.jsx)(ee.Z,{title:s,followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500,children:(0,p.jsx)("span",{children:s})})}),h&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.25,overflow:"hidden",flexShrink:0,children:[(0,p.jsx)(jS.Z,{color:"error",sx:{fontSize:"0.875rem"}}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:"Repair Required"})]}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",overflow:"hidden",spacing:.5,children:[c&&(0,p.jsx)(Fi._,{tooltipText:r.notes,children:(0,p.jsx)(dR.Z,{color:"action",sx:{fontSize:"1.125rem"}})}),(0,p.jsx)(sP,{tagRefs:null===r||void 0===r?void 0:r.tagRefs,onDeviceList:!0})]})]})}));uP.displayName="LegacyDeviceTableCellName";const pP=e=>{let{row:t}=e;const n=(0,De.Z)(),{device:i,loaded:o}=XA(t.original.id),{updating:r,online:l,outOfDate:s,statusHasError:d,lastUpdated:c}=null!==i&&void 0!==i?i:{},u=(0,Vr.y)({updating:r,online:l,outOfDate:s,statusHasError:d}),h=s?d?Cd.Z:Gf.Z:ng.Z,C=s?d?"error":"warning":"success";let x="Never synced",f="Device has never synced";c&&(x=(0,M.pq)(c),f="Last sync: ".concat((0,M.aH)(c)));const[b,y]=(0,a.useState)(null);return o?"COMPLETE"===(null===i||void 0===i?void 0:i.factoryResetStatus)?(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(v.Z,{variant:"caption",children:"Factory Reset"}),(null===i||void 0===i?void 0:i.lastUpdated)&&(0,p.jsx)(v.Z,{variant:"caption",children:(0,M.ax)(i.lastUpdated)})]}):"QUEUED"===(null===i||void 0===i?void 0:i.factoryResetStatus)?(0,p.jsx)(v.Z,{variant:"caption",children:"Factory Reset Pending..."}):(0,p.jsxs)(m.Z,{overflow:"hidden",spacing:.25,onMouseEnter:e=>{y(e.currentTarget)},onMouseLeave:()=>{y(null)},children:[(0,p.jsxs)(m.Z,{spacing:.5,children:[(null===i||void 0===i?void 0:i.pauseUpdates)&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.25,children:[(0,p.jsx)(PI.Z,{color:"secondary",sx:{fontSize:"1rem"}}),(0,p.jsx)(v.Z,{variant:"caption",children:"Paused"})]}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.25,children:[r&&l?(0,p.jsx)(Zi.Z,{size:"1rem"}):(0,p.jsx)(h,{color:C,sx:{fontSize:"1rem"}}),(0,p.jsx)(v.Z,{variant:"caption",children:u})]})]}),(0,p.jsx)(ee.Z,{title:f,followCursor:!0,placement:"bottom-start",enterDelay:1e3,enterNextDelay:500,children:(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:x})}),(0,p.jsx)(Xr.Z,{style:{zIndex:n.zIndex.modal},open:!!b,anchorEl:b,placement:"left-start",popperOptions:{modifiers:[{name:"preventOverflow",enabled:!0,options:{padding:n.spacingInt(1)}}]},children:(0,p.jsx)(SR,{deviceId:t.original.id,renderPlaceholder:(0,p.jsx)(Me.Z,{sx:{width:e=>e.spacing(42),padding:1.5},children:(0,p.jsx)(Rn.Z,{})}),children:(0,p.jsx)(wT,{})})})]}):(0,p.jsx)(g.Z,{width:"100%"})};pP.displayName="LegacyDeviceTableCellSyncStatus";const hP=["name","configuration","activity"],mP=()=>{const e=(0,u.I0)(),t=(0,u.v9)((e=>e.device.queryResult)),n=Qk(),i=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.display({id:"checkbox",size:50,cell:e=>{let{row:t}=e;return(0,p.jsx)(iP,{row:t})},header:()=>(0,p.jsx)(nP,{})}),e.accessor((()=>null),{id:"name",header:"Name",size:180,cell:e=>{let{row:t}=e;return(0,p.jsx)(uP,{row:t})},sortDescFirst:!1}),e.accessor((()=>null),{id:"model",header:"Model",size:120,cell:e=>{let{row:t}=e;return(0,p.jsx)(lP,{row:t})},sortDescFirst:!1}),e.accessor((()=>null),{id:"battery",header:"%",size:55,cell:e=>{let{row:t}=e;return(0,p.jsx)(tR,{row:t,isLegacyTable:!0})},sortDescFirst:!0}),e.accessor((()=>null),{id:"syncStatus",header:"Sync Status",size:122,cell:e=>{let{row:t}=e;return(0,p.jsx)(pP,{row:t})},sortDescFirst:!0}),e.accessor((()=>null),{id:"configuration",header:"Configuration",size:180,cell:e=>{let{row:t}=e;return(0,p.jsx)(iR,{row:t,isLegacyTable:!0})},sortDescFirst:!1}),e.accessor((()=>null),{id:"activity",header:"Activity",size:120,cell:e=>{let{row:t}=e;return(0,p.jsx)(QA,{row:t,isLegacyTable:!0})},sortDescFirst:!0})]}),[]),r=(0,u.v9)((e=>e.device.query.sortKey)),l=(0,u.v9)((e=>e.device.query.sortAscending)),s=(0,a.useMemo)((()=>(0,o.has)(Be.vc.device.sortColumns,r)?{id:r,desc:!l}:{id:"name",desc:!1}),[l,r]),[d,c,h]=(0,zn.G)(s,300);(0,a.useEffect)((()=>
3{e(La.i7.actions.sortChanged({sortKey:c.id,sortAscending:!c.desc}))}),[c.desc,c.id,e]);const g=(0,a.useCallback)((e=>{const[t]=(0,o.isFunction)(e)?e([d]):e;t&&h(t)}),[h,d]),v=(0,sa.b7)({columns:i,data:t,state:{sorting:[d]},autoResetAll:!0,getRowId:e=>e.id,enableSortingRemoval:!1,manualSorting:!0,onSortingChange:g,getCoreRowModel:(0,da.sC)()}),C=(0,a.useCallback)((e=>{let{key:t,registerChild:n,...i}=e;const o=v.getRowModel().rows[i.index];return o?(0,p.jsx)(gP,{ref:n,row:o,isLegacy:!0,...i},t):null}),[v]),x=(0,a.useMemo)((()=>(0,o.sumBy)(i,"size")),[i]);return(0,p.jsx)(Zf.Z,{sx:{"& .MuiTableCell-root":{paddingX:1}},children:(0,p.jsx)(sh,{headerContent:(0,p.jsx)(rP,{table:v,dimmed:n}),noHeaderBackground:!0,children:(0,p.jsxs)(m.Z,{minWidth:n?void 0:x,bgcolor:n?"transparent":"background.paper",children:[!n&&(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:"window",table:v,rowHeight:82,flexColumnIds:hP,renderRow:C}),(0,o.isEmpty)(t)&&(0,p.jsx)(eP,{})]})})})},gP=(0,a.memo)((0,a.forwardRef)(((e,t)=>{var n;let{row:i,style:r,isScrolling:l,isVisible:s,isLegacy:d=!1,columnLayoutKey:u}=e;const h=(0,X.bo)(),{organizationId:m}=(0,w.P)(),[g,v]=(0,a.useState)(!1),C=i.original.id,{device:x}=XA(C);(0,z.l)(S.F.Devices,C,{blockSubscription:!g}),(0,a.useEffect)((()=>{if(!s)return v(!1);if(!l)return v(!0);const e=setTimeout((()=>{v(!0)}),1500);return()=>{clearTimeout(e)}}),[s,l]);const f=null!==x&&void 0!==x&&x.factoryResetStatus?"QUEUED"===x.factoryResetStatus?y.DG.grey[100]:y.DG.grey[200]:void 0,b=h?null===x||void 0===x||null===(n=x.organizationRef)||void 0===n?void 0:n.id:m,j={ref:t,style:r,row:i,hover:!0,TableCellProps:{sx:{backgroundColor:f}},"data-testid":"deviceList_tableRow"},Z=d?(0,p.jsx)(th.J,{...j,flexColumnIds:hP}):(0,p.jsx)(_k.MV,{...j,rowHeight:CP,flexColumnIds:vP});return(0,p.jsx)(p.Fragment,{children:(0,o.isUndefined)(b)?Z:(0,p.jsx)(Qc,{to:(0,c.LT)(c._j.organization.devices.device,{deviceId:C,organizationId:b}),children:Z})})})));gP.displayName="DeviceTableRow";const vP=["name"],CP=52,xP={id:"name",desc:!1},fP=[{label:"Device battery, ascending",sortKey:"battery",ascending:!0},{label:"Device battery, descending",sortKey:"battery",ascending:!1},{label:"Controller battery, ascending",sortKey:"controllerBattery",ascending:!0},{label:"Controller battery, descending",sortKey:"controllerBattery",ascending:!1}],bP=()=>{const e=(0,u.I0)(),{contentAreaHeight:t}=(0,ud.MS)(),n=(0,u.v9)((e=>e.device.queryResult)),r=(0,u.v9)((e=>e.device.queryPending)),l=(0,u.v9)((e=>e.device.query.searchValue)),s=(0,u.v9)((e=>e.device.pendingOperation)),d=(0,u.v9)((e=>e.device.selection.count)),c=Qk(),h=(0,u.v9)((e=>{const{searchValue:t,configurationIds:n,tagIds:i,filterIds:a,models:r}=e.device.query;return!!t||!(0,o.every)([n,i,a,r],o.isEmpty)})),g=Xk(),C=d>0,[x,f]=(0,a.useState)(null),[b,y]=(0,a.useState)(!1),{columnLayout:j,columnOrder:Z,columnVisibility:w,onColumnOrderChange:E,onColumnVisibilityChange:S,saveColumnLayoutOnMenuClose:D}=Yk(),M=(0,a.useCallback)((e=>{E([...Hk,...e])}),[E]),k=(0,a.useCallback)((e=>{S((t=>({...t,[e]:!1===t[e]})))}),[S]),I=(0,a.useMemo)((()=>((e,t)=>FT(e,t)?"":"Sync Status")(Z,w)),[Z,w]),A=(0,a.useMemo)((()=>((e,t)=>FT(e,t)?80:122)(Z,w)),[Z,w]),R=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.accessor((()=>null),{id:"name",header:"Name",size:180,cell:e=>{let{row:t}=e;return(0,p.jsx)(cR,{row:t})},sortDescFirst:!1}),e.accessor((()=>null),{id:"configuration",header:"Configuration",size:180,cell:e=>{let{row:t}=e;return(0,p.jsx)(iR,{row:t})},sortDescFirst:!1}),e.accessor((()=>null),{id:"syncStatus",header:I,size:A,sortDescFirst:!0,cell:e=>{let{row:t}=e;return(0,p.jsx)(UT,{row:t})}}),e.accessor((()=>null),{id:"lastSynced",header:"Last synced",size:140,sortDescFirst:!0,cell:e=>{let{row:t}=e;return(0,p.jsx)(lR,{row:t})}}),e.accessor((()=>null),{id:"model",header:"Model",size:156,sortDescFirst:!1,cell:e=>{let{row:t}=e;return(0,p.jsx)(sR,{row:t})}}),e.accessor((()=>null),{id:"firmware",header:"Firmware",size:100,sortDescFirst:!0,cell:e=>{let{row:t}=e;return(0,p.jsx)(rR,{row:t})}}),e.accessor((()=>null),{id:"serial",header:"Serial",size:140,sortDescFirst:!1,cell:e=>{let{row:t}=e;return(0,p.jsx)(uR,{row:t})}}),e.accessor((()=>
3null),{id:"activity",header:"Online",size:120,sortDescFirst:!0,cell:e=>{let{row:t}=e;return(0,p.jsx)(QA,{row:t})}}),e.accessor((()=>null),{id:"currentActivity",header:"Current activity",size:180,sortDescFirst:!1,cell:e=>{let{row:t}=e;return(0,p.jsx)(oR,{row:t})}}),e.accessor((()=>null),{id:"battery",header:"Battery",size:96,sortDescFirst:!0,cell:e=>{let{row:t}=e;return(0,p.jsx)(tR,{row:t})},enableSorting:!1,meta:{sortClickOverride:!0,sortKeys:["battery","controllerBattery"]}}),e.display({id:"stream",header:"",size:56,cell:e=>{let{row:t}=e;return(0,p.jsx)($A,{row:t})},enableSorting:!1})]}),[A,I]),T=(0,u.v9)((e=>e.device.query.sortKey)),P=(0,u.v9)((e=>e.device.query.sortAscending)),L=(0,a.useMemo)((()=>(0,o.has)(Be.vc.device.sortColumns,T)?{id:T,desc:!P}:xP),[P,T]),[N,U,F]=(0,zn.G)(L,300);(0,a.useEffect)((()=>{r||y(!1)}),[r]),(0,a.useEffect)((()=>{e(La.i7.actions.sortChanged({sortKey:U.id,sortAscending:!U.desc}))}),[U.desc,U.id,e]);const O=(0,a.useCallback)((e=>{const t=[N],n=(0,o.isFunction)(e)?e(t):e,[i]=n;F(null!==i&&void 0!==i?i:xP)}),[F,N]),_=(0,a.useCallback)(((e,t)=>{"battery"===e&&(t.preventDefault(),t.stopPropagation(),f(t.currentTarget))}),[]),z=(0,a.useCallback)((()=>{f(null)}),[]),B=(0,a.useCallback)((e=>{F({id:e.sortKey,desc:!e.ascending}),f(null)}),[F]),W=(0,a.useCallback)((t=>{e(La.i7.actions.searchValueChanged(t))}),[e]),V=(0,a.useCallback)((t=>{e(La.i7.actions.selectedRowIdsChanged(t))}),[e]),G=(0,a.useCallback)((()=>{(0,o.isEmpty)(n)||r||y(!0)}),[r,n]),H=(q={columns:R,data:n,state:{sorting:[N],columnOrder:Z,columnVisibility:w},autoResetAll:!0,getRowId:e=>e.id,enableSortingRemoval:!0,manualSorting:!0,onSortingChange:O,onColumnOrderChange:E,onColumnVisibilityChange:S},(0,sa.b7)({getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)(),enableSortingRemoval:!0,enableMultiSort:!1,...q}));var q;const Y=(0,a.useCallback)((e=>{let{key:t,registerChild:n,columnLayoutKey:i,...o}=e;const a=H.getRowModel().rows[o.index];return a?(0,p.jsx)(gP,{ref:n,row:a,columnLayoutKey:i,...o},t):null}),[H]),K=H.getRowModel().rows.length,X=(0,a.useMemo)((()=>(0,o.has)(Be.vc.device.sortColumns,T)?{id:T,desc:!P}:xP),[P,T]),Q=N.id!==X.id||N.desc!==X.desc,J=r||b,$=!(0,o.isEmpty)(n)&&(J||Q),ee=!c&&(0,o.isEmpty)(n)&&!C,te=(0,a.useMemo)((()=>({resultCount:K,selectionCount:C?d:void 0,showResultCount:h,leftActions:C?(0,p.jsx)(vA,{neutralActionButtons:!0,hideSelectionLabel:!0}):void 0,search:{onSearchChange:W,value:l,disabled:"changeOrganization"===(null===s||void 0===s?void 0:s.type),inputTestId:"deviceList_searchInput"},rightActions:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",gap:"".concat(8,"px"),children:[(0,p.jsx)(IA,{pendingSpinnerColor:"text.secondary",onRefreshClick:G,pending:J}),(0,p.jsx)(QT,{columnLayout:j,columnMenuItems:qk,onColumnLayoutOrderChange:M,onColumnVisibilityToggle:k,onMenuClose:D})]})})),[j,M,k,W,G,h,C,J,null===s||void 0===s?void 0:s.type,K,D,l,d]),ne=(0,p.jsx)(Is.Z,{anchorEl:x,open:!!x,onClose:z,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:(0,o.map)(fP,(e=>(0,p.jsx)(Hi.Z,{selected:e.sortKey===N.id&&e.ascending===!N.desc,onClick:()=>B(e),children:(0,p.jsx)(v.Z,{variant:"body2",children:e.label})},"".concat(e.sortKey,"-").concat(e.ascending))))});return c?(0,p.jsx)(EA,{}):ee?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(i.Z,{sx:{...Tk.VX,display:"flex",flexDirection:"column",height:"calc(".concat(t,")"),minHeight:0,bgcolor:zk},children:[(0,p.jsx)(Fk,{...te,sx:{flexShrink:0}}),(0,p.jsx)(i.Z,{sx:Tk.JZ,children:r?(0,p.jsx)(m.Z,{flex:1,alignItems:"center",justifyContent:"center",children:(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.secondary",children:"Loading devices"})}):(0,p.jsx)(OT,{variant:h?"noMatchingDevices":"noDevices"})})]}),ne]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Bk,{enableRowSelection:!0,selectedRowIds:g,onSelectedRowIdsChange:V,refreshing:$,showCenteredLoadingSpinner:!1,toolbar:te,table:H,flexColumnIds:vP,virtualized:!0,rowHeight:CP,height:"auto",renderRow:Y,sortKey:N.id,sortAscending:!N.desc,onSortClick:_}),ne]})};bP.displayName="DeviceTable";var yP=n(62335);const jP=()=>{(()=>{const e=(0,yP.a)(),t=(0,u.I0)(),n=(0,l.k6)(),i=(0,ye.L)(),{organizationId:r}=(0,w.P)(),s=(0,u.v9)((e=>e.device.query)),d=(0,u.v9)((e=>e.device.addDeviceDialogOpen)),c=Yc(),p=(0,a.useMemo)((()=>{var t,n,i,a,r,l,s,d,c;const u=e.get("sort"),p=e.get("sortAsc")?!!(0,o.toNumber)(e.get("sortAsc")):null,h=null!==(t=e.get("search"))&&void 0!==t?t:"",m=null!==(n=null===(i=e.get("models"))||void 0===i?void 0:i.split(",").map(decodeURIComponent))&&void 0!==n?n:[],g=null!==(a=null===(r=e.get("configurations"))||void 0===r?void 0:r.split(",").map(decodeURIComponent))&&void 0!==a?a:[],v=null!==(l=null===(s=e.get("tags"))||void 0===s?void 0:s.split(",").map(decodeURIComponent))&&void 0!==l?l:[],C=null!==(d=null===(c=e.get("filters"))||void 0===c?void 0:c.split(",").map(decodeURIComponent))&&void 0!==d?d:[],x=e.get("time")?(0,o.toNumber)(e.get("time")):null;return u&&(0,o.has)(Be.vc.device.sortColumns,u)&&(0,o.isBoolean)(p)&&x?{sortKey:u,sortAscending:p,searchValue:h,models:m,configurationIds:g,tagIds:v,filterIds:C,refreshTime:x}:null}),[e]),h=e.get("add")?!!(0,o.toNumber)(e.get("add")):void 0,[m,g]=(0,a.useState)(!1);(0,a.useEffect)((()=>{r===i&&((0,o.isEqual)(s,p)&&d===h||(m?n.replace(c({query:s,addDeviceDialogOpen:d})):(p&&t(La.i7.actions.queryUpdated({newQuery:p})),(0,o.isBoolean)(h)&&t(La.i7.actions.addDeviceDialogOpenChanged(h)))),g(!0))}),[c,t,n,m,r,p,h,s,d,i])})();const e=Qk(),t=(0,Le.ye)("enableDeviceListTableV1"),n=(0,u.v9)((e=>e.device.selection.count)),i=t&&n>0;return(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Deploy",navCategory:!0},{title:"Devices"}],toolbarContent:i?void 0:(0,p.jsx)(Ck,{}),noBottomPadding:!0,children:(0,p.jsx)(vd,{sidebarContent:(0,p.jsx)(Rk,{dimFilters:e}),sidebarWidths:{xs:280,lg:380},noBottomPadding:t,noContentPadding:!0,noContentMaxWidth:!0,noContentBackgroun
3d:!t,contentBackgroundColor:t?"background.paper":void 0,children:t?(0,p.jsx)(bP,{}):(0,p.jsx)(mP,{})})})};var ZP=n(91410);const wP=["UNINSTALL_APP","CLEAR_APP_USER_DATA"],EP=e=>(0,o.includes)(Gu,e.action),SP=e=>Math.max(60-Math.floor((Date.now()-e.createdAt)/1e3),0),DP=e=>!(0,o.includes)(Hu,e.action),MP=(e,t)=>!(e=>{const t="QUEUED"===e.status&&EP(e)&&SP(e)<=0,n="COMPLETE"===e.status&&EP(e)&&!(0,o.isNil)(e.completedAt)&&e.createdAt<e.completedAt-6e4;return t||n})(e)&&!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;return"COMPLETE"===e.status&&!(0,o.isNil)(e.completedAt)&&e.completedAt<Date.now()-1e3*t}(e,t),kP=(0,a.createContext)(void 0),IP=e=>{let{deviceId:t,children:n}=e;const{organizationId:i}=(0,w.P)(),r=(0,qg.oR)(),[l,s]=(0,a.useState)(!1),[d,c]=(0,a.useState)([]),[u,h]=(0,a.useState)([]),[m,g]=(0,a.useState)();(0,a.useEffect)((()=>{if(s(!1),g(void 0),c([]),h([]),!t)return;const e=Date.now(),n=(0,Os.p6)(S.F.DeviceCommands,(n=>(0,td.IO)(n,(0,td.xD)((0,td.ar)("deviceRef","==",(0,Os.qb)(S.F.Devices,t)),(0,td.or)((0,td.ar)("status","==","QUEUED"),(0,td.xD)((0,td.ar)("status","==","COMPLETE"),(0,td.ar)("updatedAt",">=",e-1e4))))))),a=(0,td.cf)(n,(e=>{const t=(e=>{const t=[],n=new Map,i=new Set,a=new Set;for(let l=e.length-1;l>=0;l--){const s=e[l],{action:d,data:c,status:u,completedAt:p}=s;if("DELETE_FILES"!==d)if("QUEUED"!==u)if("COMPLETE"===u&&wP.includes(d)){const e=c.packageName,n=JSON.stringify([d,e,p]);if(a.has(n))continue;t.push(s),a.add(n)}else if("COMPLETE"!==u);else{const e=JSON.stringify([d,p]);if(i.has(e))continue;t.push(s),i.add(e)}else{const e=wP.includes(d)?JSON.stringify([d,c.packageName]):d,i=n.get(e);if(!(0,o.isNil)(i)){var r;const e=t[i];t[i]={...e,duplicateIds:[...null!==(r=e.duplicateIds)&&void 0!==r?r:[],s.id]};continue}n.set(e,t.length),t.push(s)}else t.push(s)}return(0,o.reverse)(t)})(e.docs.map((e=>({...e.data(),id:e.id}))).filter(MP).sort(((e,t)=>{var n,i;return(null!==(n=e.createdAt)&&void 0!==n?n:0)-(null!==(i=t.createdAt)&&void 0!==i?i:0)}))),n=(0,o.filter)(t,DP),i=(0,o.find)(n,(e=>!0===(0,o.get)(e,["data","forceSync"])&&"QUEUED"===e.status));s(!0),c(t),h(n),g(i)}),(e=>{if("permission-denied"===e.code){const e=r.getState(),n=e.firestore.data[S.F.Devices].metadata[t],i=e.firestore.data[S.F.Devices].data[t];if(null!==n&&void 0!==n&&n.loaded&&!i)return}(0,Si.yR)(e,{name:"query device commands for device detail",contexts:{device:{id:t},organization:{id:i}}})}));return a}),[t,i,r]);const v=(0,a.useCallback)((()=>{c((e=>(0,o.filter)(e,MP))),h((e=>(0,o.filter)(e,MP)))}),[]);(0,a.useEffect)((()=>{const e=setInterval(v,1e3);return()=>clearInterval(e)}),[v]);const C=(0,a.useMemo)((()=>({commandsLoaded:l,allQueuedCommands:d,visibleQueuedCommands:u,forceSyncCommand:m})),[l,d,u,m]);return(0,p.jsx)(kP.Provider,{value:C,children:n})},AP=()=>{const e=(0,a.useContext)(kP);if((0,o.isUndefined)(e))throw new Error("useDeviceCommandQueueContext() must be used within a DeviceCommandQueueProvider");return e},RP=()=>(0,Fe.pv)({method:"delete",path:"devices/:deviceId/commands/:commandId"}),TP=()=>(0,p.jsxs)($n.Z,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsxs)("g",{clipPath:"url(#clip0_400_14237)",children:[(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3333 2.49967V0.833008H15V2.49967H15.8333C16.75 2.49967 17.5 3.24967 17.5 4.16634V8.33301H15.8333V6.66634H4.16667V15.833H7.5V17.4997H4.16667C3.24167 17.4997 2.5 16.7497 2.5 15.833L2.50833 4.16634C2.50833 3.24967 3.24167 2.49967 4.16667 2.49967H5V0.833008H6.66667V2.49967H13.3333Z",fill:"currentColor"}),(0,p.jsx)("path",{d:"M13.6113 10.5552H12.7779V13.8886L15.4168 15.4719L15.8335 14.7886L13.6113 13.4719V10.5552ZM13.3335 8.33301C10.5724 8.33301 8.3335 10.5719 8.3335 13.333C8.3335 16.0941 10.5668 18.333 13.3335 18.333C16.0946 18.333 18.3335 16.0941 18.3335 13.333C18.3335 10.5719 16.0946 8.33301 13.3335 8.33301ZM13.3335 17.2219C11.1835 17.2219 9.44461 15.483 9.44461 13.333C9.44461 11.183 11.1835 9.44412 13.3335 9.44412C15.4835 9.44412 17.2224 11.183 17.2224 13.333C17.2224 15.483 15.4835 17.2219 13.3335 17.2219Z",fill:"currentColor"})]}),(0,p.jsx)("defs",{children:(0,p.jsx)("clipPath",{id:"clip0_400_14237",children:(0,p.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]}),PP=()=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"center",spacing:.5,children:[(0,p.jsx)(TP,{}),(0,p.jsx)(v.Z,{variant:"body2",children:"Force Sync"})]}
3),LP="deviceCommandQueue_time",NP="deviceCommandQueue_cancel",UP={"&:hover, &:focus-within":{bgcolor:"grey.100"},["&:hover .".concat(NP," + .").concat(LP,", &:focus-within .").concat(NP," + .").concat(LP)]:{display:"none"},["&:not(:hover):not(:focus-within) .".concat(NP)]:{position:"absolute",opacity:0}},FP=e=>{var t,n;const a="DELETE_FILES"===e.action&&null!==(t=null===(n=e.data)||void 0===n?void 0:n.paths)&&void 0!==t?t:[];return(0,o.isEmpty)(a)?"":(0,p.jsxs)(p.Fragment,{children:[(0,o.map)((0,o.take)(a,20),(e=>(0,p.jsx)(i.Z,{children:e},e))),a.length>20&&(0,p.jsxs)(i.Z,{children:["and ",a.length-20," more"]})]})},OP=(0,a.memo)((e=>{let{deviceCommands:t,commandTargets:n,onCancel:i}=e;return(0,p.jsx)(ii.Z,{sx:{overflow:"auto"},children:t.map(((e,t)=>(0,p.jsxs)(a.Fragment,{children:[(0,p.jsx)(fl.ZP,{sx:i&&UP,children:(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(_P,{index:t+1,command:e,commandTarget:n[t],onCancel:"QUEUED"===e.status?i:void 0})})}),(0,p.jsx)(Ie.Z,{})]},e.id)))})})),_P=(0,a.memo)((e=>{var t;let{command:n,index:r,commandTarget:l,onCancel:s}=e;const{action:d,createdAt:c}=n,[u,h]=(0,a.useState)(SP(n));(0,a.useEffect)((()=>{const e=setInterval((()=>{h(SP(n))}),1e3);return()=>clearInterval(e)}),[n]);const g=lD(c,void 0,M._H),C=Fa((e=>(0,o.pick)(e,["onlyDownloadContentDuringUpdateWindow","onlyDownloadContentWhenCharging"]))),f=(e=>"CHECK_IN"===e.action&&!(0,o.isNil)(e.data)&&e.data.forceSync)(n)&&(0,wp.Gp)(C);return(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",children:[(0,p.jsx)(m.Z,{children:(0,p.jsx)(v.Z,{variant:"body2",color:"textPrimary",textAlign:"center",width:16,children:r})}),(0,p.jsxs)(m.Z,{flexGrow:1,height:24,justifyContent:"center",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(ee.Z,{title:FP(n),placement:"left",children:(0,p.jsx)(v.Z,{variant:"body2",color:"textPrimary",children:null!==(t=Yu[d])&&void 0!==t?t:(0,o.startCase)((0,o.toLower)(d))})}),f&&(0,p.jsx)(PP,{})]}),!(0,o.isNil)(l)&&(0,p.jsx)(Ui.G,{variant:"caption",color:"text.secondary",title:l,width:200,marginTop:-.25})]}),s&&(0,p.jsx)(x.Z,{className:NP,"aria-label":"Cancel command","data-testid":"deviceCommandQueue_cancelButton",onClick:()=>s(n.id),sx:{padding:0,"&:hover":{color:"error.main"}},children:(0,p.jsx)(Gl.Z,{fontSize:"small"})}),(0,p.jsx)(i.Z,{className:LP,children:"COMPLETE"===n.status?(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Vi.Z,{fontSize:"small",sx:{paddingBottom:"1px",color:"text.secondary"}}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",textAlign:"right",children:"Handled"})]}):EP(n)?(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",textAlign:"right",children:"Expires in"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",width:25,textAlign:"center",children:u}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"s"})]}):(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:g})})]})})),zP=(0,a.memo)((e=>{let{containerSx:t,deviceCommands:n,commandTargets:r}=e;const l=Ua((e=>
3e.id)),s=(0,Le.ye)("enableDeviceFileDeletion"),d=(0,w.P)().hasRequiredPrivilege("devices"),{notify:c}=(0,ie.o)(),{request:u}=RP(),h=(0,Fe.pv)({method:"delete",path:"devices/:deviceId/commands"}),g=s&&d&&!!l,x=(0,a.useCallback)((e=>{var t,i;const a=null!==(t=null===(i=(0,o.find)(n,{id:e}))||void 0===i?void 0:i.duplicateIds)&&void 0!==t?t:[];(0,o.forEach)([e,...a],(t=>u({params:{deviceId:l,commandId:t},errorMessage:"Error canceling command",onSuccess:n=>{let{canceled:i}=n;i||t!==e||c({message:qu,severity:"warning"})}})))}),[n,l,c,u]);return(0,p.jsx)(i.Z,{sx:t,children:(0,p.jsxs)(Me.Z,{sx:{padding:2,border:"1px solid "+y.DG.grey[400],borderRadius:"8px",boxShadow:"0px 4px 15px rgba(0, 0, 0, 0.15)",width:"460px",minHeight:"300px",maxHeight:"560px",display:"flex",flexDirection:"column"},children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{marginBottom:1},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Command Queue"}),g&&(0,o.some)(n,{status:"QUEUED"})&&(0,p.jsx)(C.Z,{size:"small","data-testid":"deviceCommandQueue_cancelAllButton",disabled:h.pending,onClick:()=>h.request({params:{deviceId:l},errorMessage:"Error canceling commands"}),children:"Cancel all"})]}),(0,o.size)(n)>0?(0,p.jsx)(OP,{deviceCommands:n,commandTargets:r,onCancel:g?x:void 0}):(0,p.jsx)(m.Z,{sx:{flexGrow:1,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",sx:{width:"50%",textAlign:"center"},children:"Commands will queue until the device comes online"})})]})})})),BP=async e=>{let{organizationId:t,deviceUid:n,command:i}=e;if("CLEAR_APP_USER_DATA"===i.action||"UNINSTALL_APP"===i.action){var a;if(!n)return;const e=i.data.packageName,t=await(0,Os.q9)(S.F.DeviceInstalledApps,n);if(!t.exists())return e;return null===(a=t.data()[e])||void 0===a?void 0:a.applicationName}const r=await(async e=>{var t,n,i,o;return{LAUNCH_APP:{targetQueryField:"packageName",collection:S.F.Apps,targetId:null===(t=e.data)||void 0===t?void 0:t.packageName},PLAY_VIDEO:{targetQueryField:"id",collection:S.F.Videos,targetId:null===(n=e.data)||void 0===n?void 0:n.videoId},LAUNCH_WEB_URL:{targetQueryField:"url",collection:S.F.WebXRApps,targetId:null===(i=e.data)||void 0===i?void 0:i.url},LAUNCH_INSTANT_APP:{targetQueryField:"instantAppId",collection:S.F.InstantApps,targetId:null===(o=e.data)||void 0===o?void 0:o.instantAppId}}[e.action]})(i);if(!(0,o.isNil)(r)&&!(0,o.isNil)(r.targetId)){var l;const{targetQueryField:e,collection:n,targetId:i}=r,a=await(0,Os.CB)(n,(n=>(0,td.IO)(n,(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,t)),(0,td.ar)(e,"==",i))));return(0,o.isEmpty)(a)?i:null===(l=a[0])||void 0===l?void 0:l.title}},WP=(0,a.memo)((()=>{const e=(0,De.Z)(),{organizationId:t}=(0,w.P)(),{userId:n}=Ua((e=>e))||{},{visibleQueuedCommands:i}=AP(),[r,l]=(0,a.useState)([]);(0,a.useEffect)((()=>{(async()=>{const e=await Promise.all((0,o.map)(i,(e=>BP({organizationId:t,command:e,deviceUid:n}))));l(e)})()}),[i,t,n]);const[s,d]=(0,a.useState)(null);return(0,p.jsxs)(m.Z,{onMouseEnter:e=>{d(e.currentTarget)},onMouseLeave:()=>{d(null)},sx:{marginRight:"-5.5px"},children:[(0,p.jsxs)(x.Z,{sx:{borderRadius:1,marginBottom:"1px"},children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{paddingLeft:"2px",fontWeight:600},children:"".concat((0,o.size)(i)).concat((0,o.size)(i)>0?" pending":"")}),(0,p.jsx)(ZP.Z,{fontSize:"medium",sx:{paddingLeft:"3px"}})]}),(0,p.jsx)(Xr.Z,{style:{zIndex:e.zIndex.modal},open:!!s,anchorEl:s,placement:"right",popperOptions:{modifiers:[{name:"preventOverflow",enabled:!0,options:{padding:e.spacingInt(1)}}]},children:(0,p.jsx)(zP,{containerSx:{marginLeft:4},deviceCommands:i,commandTargets:r})})]})}));var VP=n(96496);const GP=(0,a.memo)((e=>{let{sx:t,id:n,pauseUpdates:i}=e;const{notifyThunkResult:r}=(0,ie.o)(),l=(0,u.I0)(),s=(0,a.useCallback)((async e=>{if(!i||!n)return;e.preventDefault();const t=await l((0,La.qJ)({deviceIds:[n],action:"RESUME_UPDATES"}));r({result:t,success:{message:"Resume configuration updates command sent"},error:{message:"Error sending resume configuration updates command"}})}),[i,n,l,r]),d=(0,u.v9)((e=>{var t;return(0,o.includes)(null===(t=e.device.pendingOperation)||void 0===t?void 0:t.deviceIds,n)}));return(0,p.jsx)(ke.Z,{sx:{...t,"&:hover .updatesPaused":{display:"none"},"&:hover .resumeUpdates":{display:"unset"},"&:hover":{backgroundColor:"secondary.main"},backgroundColor:"secondary.main",color:"background.paper",width:120},label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",width:110,children:[(0,p.jsx)(PI.Z,{className:"updatesPaused",sx:{color:"background.paper",fontSize:"medium"}}
3),(0,p.jsx)(VP.Z,{className:"resumeUpdates",sx:{display:"none",color:"background.paper",fontSize:"medium"}}),(0,p.jsxs)(m.Z,{flexGrow:1,direction:"column",alignItems:"center",children:[(0,p.jsx)(v.Z,{className:"updatesPaused",variant:"caption",children:"Updates Paused"}),(0,p.jsx)(v.Z,{className:"resumeUpdates",variant:"caption",sx:{display:"none"},children:"Resume ?"})]})]}),onClick:e=>s(e),clickable:!d,size:"small"})})),HP=()=>{const e=(0,Vr.i8)(Ua((e=>e.model))),t=Na(),n=(0,z.l)(S.F.Devices,t),{online:a,batteryLevel:r,batteryIsCharging:l,lastUpdated:s,updating:d,statusHasError:c,outOfDate:h,tutorialModeEnabled:g,firstTimeUseModeEnabled:C,kioskModeEnabled:x,id:f,name:b,factoryResetStatus:j,pauseUpdates:Z,requiresMxrRepair:w,deviceGroupRef:E,qfbDeviceMode:D,currentForegroundApp:M}=n||{},k=!a,I=a&&!1===(null===M||void 0===M?void 0:M.hmdOnUser),A=a&&!I,R=(0,u.v9)((e=>{var t;return E?null===(t=e.firestore.data.deviceGroups.data[E.id])||void 0===t?void 0:t.deviceExperienceMode:void 0})),T=(0,Le.ye)("enableTutorialModeRevamp"),P=(0,u.v9)((e=>{var t;return!!E&&!(null===(t=e.firestore.data.deviceGroups.data[E.id])||void 0===t||!t.tutorialAppRef)})),L=T?!1===g&&P:!!C,N="COMPLETE"===j,U=lD(s),F=!(null===x||void 0===x||x),O="Last synced ".concat(null!==U&&void 0!==U?U:"never");return(0,p.jsxs)(m.Z,{paddingX:1.5,paddingY:1,spacing:1.5,children:[!N&&(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[A?(0,p.jsx)(qA.Z,{color:"success",sx:{fontSize:8}}):(0,p.jsx)(XD,{color:k?"error":"success",sx:{fontSize:8}}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"deviceSidebar_onlineStatus",children:k?"Offline":I?"Idle":"Online"})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center","data-testid":"deviceSidebar_battery","data-battery-percent":(0,o.isNumber)(r)?r:void 0,children:[(0,p.jsx)(NM,{noTooltip:(0,o.isNumber)(r),batteryPercent:r,showCharging:l&&a}),(0,o.isNumber)(r)&&r>0&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:[r,"%"]})]})]}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"center",flex:1,paddingTop:4,paddingBottom:3,minHeight:140,children:[(0,p.jsx)(m.Z,{alignItems:"center",width:140,direction:"column",sx:{position:"relative"},spacing:.5,children:(0,p.jsxs)(m.Z,{justifyContent:"center",children:[(0,p.jsx)(i.Z,{zIndex:0,component:"img",src:e,maxWidth:140,sx:{opacity:Z?.4:1,paddingLeft:3.5,paddingRight:3.5}}),Z&&(0,p.jsx)(GP,{id:f,pauseUpdates:!0,sx:{zIndex:1,position:"absolute",marginLeft:1}})]})}),!N&&(0,p.jsxs)(m.Z,{direction:"column",width:140,marginLeft:1,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",borderRadius:1,children:[(0,p.jsx)(mT,{SvgIconProps:{sx:{fontSize:20}},CircularProgressProps:{size:"".concat(20,"px")},online:a,updating:d,statusHasError:c,outOfDate:h}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:y.DG.purple[800],"data-testid":"deviceSidebar_syncStatus",children:(0,Vr.y)({updating:d,online:a,outOfDate:h,statusHasError:c})})]}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",marginTop:.5,children:O}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",marginTop:.5,flexWrap:"wrap",gap:.5,children:[L&&(0,p.jsx)(nR,{label:"Tutorial",status:T?"Off":"On",TooltipProps:{placement:"bottom-start"},verboseLabel:!0}),F&&!D&&(0,p.jsx)(nR,{label:"Kiosk",status:"Off",TooltipProps:{placement:"bottom-start"},deviceExperienceMode:R}),(0,p.jsx)(mu,{qfbDeviceMode:D,placement:"device"})]}),w&&(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(jS.Z,{color:"error",sx:{fontSize:y.cp.body1.fontSize}}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Requires ManageXR Repair"})]})]})]}),N&&(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",align:"center",children:[null!==b&&void 0!==b?b:"Device"," has been Factory Reset"]})]})},qP=(0,a.memo)((e=>{let{routeTabs:t}=e;const n=(0,u.I0)(),{notifyThunkResult:i}=(0,ie.o)(),{privileges:r}=(0,w.P)(),l=Ua((e=>e)),s=(0,u.v9)((e=>{var t;return"update"===(null===(t=e.device.pendingOperation)||void 0===t?void 0:t.type)&&(0,o.includes)(e.device.pendingOperation.deviceIds,null===l||void 0===l?void 0:l.id)}
3)),d=(0,u.v9)((e=>!!e.device.editingDevice)),c=(0,u.v9)((e=>{var t;return null===(t=e.device.editingDevice)||void 0===t?void 0:t.name})),[h,g]=(0,a.useState)(),C=(0,a.useCallback)((async()=>{const e=await n((0,La.GL)());"rejected"===e.meta.requestStatus&&e.payload===Fe.Xt.DeviceLimitExceeded?g({configurationId:null===l||void 0===l?void 0:l.deviceGroupRef.id}):i({result:e,success:{message:"Device updated"},error:{message:"Error updating device",action:{title:"Retry",onClick:C}}})}),[null===l||void 0===l?void 0:l.deviceGroupRef.id,n,i]),[x,f]=(0,a.useState)(!1),b=(0,a.useCallback)((async()=>{f(!0)}),[]),y=(0,a.useCallback)((async()=>{await C(),f(!1)}),[C]),j=(0,a.useCallback)((()=>{f(!1)}),[]),Z=(0,a.useCallback)((()=>{n(La.i7.actions.deviceChangesCleared())}),[n]);return(0,p.jsxs)(p.Fragment,{children:[r.devices&&d&&(0,p.jsx)(bd,{hasChanges:d,savePending:s,onSaveClick:b,onUndoAllClick:Z,saveDisabled:""===c,sidebar:!0}),(0,p.jsx)(HP,{}),(0,p.jsx)(wd,{routeTabs:t}),(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(m.Z,{padding:1,children:[(0,p.jsxs)(m.Z,{flexDirection:"row",alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",paddingLeft:1,flexGrow:1,marginLeft:-2,children:"Commands"}),void 0===(null===l||void 0===l?void 0:l.factoryResetStatus)&&(0,p.jsx)(WP,{})]}),l&&(0,p.jsx)(sA,{devicesWcs:[l]})]}),(0,p.jsx)(Jk,{open:!!h,onClose:()=>g(void 0),configurationId:null===h||void 0===h?void 0:h.configurationId}),l&&(0,p.jsx)(iI,{open:x,onClose:j,onSubmit:y,devicesWcs:[l],targetConfigurationId:l.deviceGroupRef.id})]})})),YP=(0,a.memo)((()=>(0,p.jsxs)(m.Z,{paddingX:14,paddingTop:10,spacing:2,children:[(0,p.jsx)(Rn.Z,{}),(0,p.jsx)(v.Z,{variant:"body2",textAlign:"center",children:"Loading Analytics..."})]})));YP.displayName="DeviceTabAnalyticsLoading";const KP=(0,a.memo)((()=>{const e=$e(),t=Na(),n=(0,u.I0)(),o=(0,u.v9)((e=>e.ui.analytics.duration)),r=(0,u.v9)((e=>e.ui.analytics.dateRange)),l=(0,a.useCallback)((e=>{n(Te.dV.actions.analyticsDurationChanged({duration:e}))}),[n]),s=(0,a.useCallback)((e=>{var t,i;const o=[null===(t=e[0])||void 0===t?void 0:t.startOf("day").valueOf(),null===(i=e[1])||void 0===i?void 0:i.add(1,"day").startOf("day").valueOf()];(0,M.SZ)(o)&&n(Te.dV.actions.analyticsDateRangeChanged({dateRange:o}))}),[n]),d=(0,a.useMemo)((()=>[{value:"1 d",label:"Today"},{value:"7 d",label:"Last 7 days"},{value:"30 d",label:"Last 30 days"},{value:"91 d",label:"Last 90 days"},{value:"custom",label:"Custom"}]),[]);return e?(0,p.jsx)(m.Z,{spacing:1,children:t&&(0,M.SZ)(r)?(0,p.jsx)(Ge,{children:(0,p.jsx)(fn,{deviceId:t,children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(i.Z,{flexShrink:0,children:(0,p.jsx)(Cl,{})}),(0,p.jsx)(Ns,{duration:o,dateRange:r,onDurationChange:l,onDateRangeChange:s,durationOptions:d})]}),(0,p.jsx)(Br,{})]})})}):(0,p.jsx)(YP,{})}):null}));KP.displayName="DeviceTabAnalytics";const XP=e=>(0,p.jsx)($n.Z,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,p.jsx)("path",{d:"M11.6068 6.535L3.82776 14.314C3.45282 14.6891 3.24219 15.1977 3.24219 15.728C3.24219 16.2583 3.45282 16.7669 3.82776 17.142L5.36376 18.678C5.73891 19.0527 6.24751 19.2632 6.77776 19.263H13.0208M11.6068 6.535L13.7268 4.415C13.9125 4.22905 14.1331 4.08153 14.3759 3.98088C14.6187 3.88024 14.8789 3.82843 15.1418 3.82843C15.4046 3.82843 15.6648 3.88024 15.9076 3.98088C16.1504 4.08153 16.371 4.22905 16.5568 4.415L20.7988 8.657C21.1737 9.03206 21.3843 9.54068 21.3843 10.071C21.3843 10.6013 21.1737 11.1099 20.7988 11.485L18.6778 13.607M11.6068 6.535L18.6778 13.607M13.0208 19.263L18.6778 13.607M13.0208 19.263H19.9998",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});var QP=n(46843);const JP=(0,da.Cl)(),$P=()=>{const e=(0,u.I0)(),{notifyThunkResult:t}=(0,ie.o)(),n=Na(),r=OI(n),l=(0,z.l)(S.F.Devices,n),s=(0,xo.ky)(S.F.Configurations,null===l||void 0===l?void 0:l.deviceGroupRef.id),d=(0,E.Ev)(S.F.Apps,(0,a.useMemo)((()=>(0,o.map)(null===s||void 0===s?void 0:s.approvedApps,"id")),[null===s||void 0===s?void 0:s.approvedApps]),{filter:(0,a.useCallback)((e=>!!e.apkUrl),[])}),c=(0,a.useMemo)((()=>(0,o.chain)(r.data).values().filter((e=>
3!!e.packageName)).value()),[r.data]),h=Be.vc.device.systemAppPackageNamePrefixes,g=(0,a.useMemo)((()=>(0,o.filter)(c,(e=>!(0,o.some)(h,(t=>(0,o.startsWith)(e.packageName,t)))))),[c,h]),v=Be.vc.device.launcherManufacturerPackageNames,C=(0,a.useCallback)((async i=>{if(!n)return;const o=await e((0,La.qJ)({deviceIds:[n],action:"UNINSTALL_APP",data:{packageName:i.packageName}}));t({result:o,success:{message:"Uninstall command sent"},error:{message:"Error sending uninstall command"}})}),[n,e,t]),f=(0,a.useCallback)((async i=>{if(!n)return;const o=await e((0,La.qJ)({deviceIds:[n],action:"CLEAR_APP_USER_DATA",data:{packageName:i.packageName}}));t({result:o,success:{message:"Clear app data command sent"},error:{message:"Error sending command to clear app data"}})}),[n,e,t]),b=(0,a.useCallback)((e=>{var t;const n=(0,o.find)(d,{packageName:e.packageName}),i=(0,o.includes)(v,e.packageName),a=["Are you sure you want to uninstall and delete ".concat(null!==(t=null===n||void 0===n?void 0:n.title)&&void 0!==t?t:e.applicationName,"?")];return n||i?a.push("This app is managed by the ".concat(null===s||void 0===s?void 0:s.name," configuration and will be reinstalled the next time the device syncs.")):a.push("You may not be able to uninstall some preinstalled apps."),a}),[d,null===s||void 0===s?void 0:s.name,v]),y=Bn({onConfirm:C,title:"Uninstall App",getMessage:b,confirmLabel:"Uninstall"}),j=y.trigger,Z=Bn({onConfirm:f,title:"Clear App User Data",getMessage:()=>["Delete the data associated with an app, effectively resetting the app to its initial state as if it were just installed. You may lose saved logins, preferences, and other user data. The app will remain installed on the device.","Devices must be running Android 9 or higher to execute this action."],confirmLabel:"Clear App Data"}),w=Z.trigger,D=(0,a.useMemo)((()=>[JP.accessor((e=>(0,o.toLower)(e.applicationName)+(0,o.toLower)(e.packageName)),{header:"Name",id:"name",cell:e=>{var t;const n=(0,o.find)(d,{packageName:e.row.original.packageName}),i=(0,o.includes)(v,e.row.original.packageName);return(0,p.jsxs)("div",{style:{width:"100%"},children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(!!n||i)&&(0,p.jsx)(Ou,{icon:Wl.Z,title:"Managed by ".concat(null===s||void 0===s?void 0:s.name," configuration")}),!g.includes(e.row.original)&&(0,p.jsx)(Ou,{icon:QP.Z,title:"System app"}),(0,p.jsx)(Ui.G,{title:null!==(t=null===n||void 0===n?void 0:n.title)&&void 0!==t?t:e.row.original.applicationName})]}),(0,p.jsx)(ae,{value:e.row.original.packageName,children:(0,p.jsx)(Ui.G,{title:e.row.original.packageName,variant:"body2",color:"textSecondary"})})]})},size:200}),JP.display({header:"Version",id:"version",cell:e=>(0,p.jsx)(sc,{app:{title:e.row.original.applicationName,apkUrl:"installedApp",...e.row.original}}),size:150}),JP.accessor((e=>e.lastUpdate.seconds),{header:"Updated",id:"updated",cell:e=>(0,p.jsx)("div",{children:(0,M.x1)(e.row.original.lastUpdate)}),enableGlobalFilter:!1,size:100}),JP.display({header:"",id:"wipe_data",cell:e=>(0,p.jsx)(ee.Z,{title:g.includes(e.row.original)?"Clear app data":"System app data can't be cleared",placement:"right",children:(0,p.jsx)("div",{children:(0,p.jsx)(x.Z,{onClick:()=>w(e.row.original),disabled:!g.includes(e.row.original),children:(0,p.jsx)(XP,{})})})}),size:50}),JP.display({header:"",id:"uninstall",cell:e=>(0,p.jsx)(zi.W,{privilege:"devices",disableAutoSize:!0,children:(0,p.jsx)(ee.Z,{title:g.includes(e.row.original)?"Uninstall":"System apps can't be uninstalled",placement:"right",children:(0,p.jsx)("div",{children:(0,p.jsx)(x.Z,{onClick:()=>j(e.row.original),disabled:!g.includes(e.row.original),children:(0,p.jsx)(gw.Z,{})})})})}),size:50})]),[d,null===s||void 0===s?void 0:s.name,v,g,j,w]),k=(0,u.v9)((e=>e.ui.device.showSystemApps)),I=(0,a.useCallback)((()=>{e(Te.dV.actions.deviceShowSystemAppsToggled())}),[e]),[A,R,T]=(0,zn.G)("",100),P=(0,sa.b7)({columns:D,data:k?c:g,initialState:{sorting:[{id:"name",desc:!1}]},state:{globalFilter:R},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getFilteredRowModel:(0,da.vL)(),getSortedRowModel:(0,da.tj)()}),L="name";return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(sh,{sx:{minWidth:600}
3,headerBackgroundSize:3,headerContent:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,paddingBottom:2,children:[(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(xu,{value:A,onChange:T,TextFieldProps:{placeholder:"Filter apps by name or package name"}})}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(po.Z,{label:"Show system apps",control:(0,p.jsx)(Pi.Z,{size:"small",checked:k,onChange:I})})})]}),(0,p.jsx)(eh.K,{table:P,flexColumnIds:L})]}),children:(0,p.jsx)(m.Z,{children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,table:P,rowHeight:57,loading:!r.loaded,emptyMessage:R?"No matching apps":"No installed apps",flexColumnIds:L,height:"window"})})}),(0,p.jsx)(Fn,{...y.props}),(0,p.jsx)(Fn,{...Z.props})]})},eL={both:[Vu.DEVICE_EVENT,Vu.USER_EVENT],user:[Vu.USER_EVENT],device:[Vu.DEVICE_EVENT]},tL=()=>{const e=(0,De.Z)(),t=(0,c.$B)(c._j.organization.devices.device),n=null===t||void 0===t?void 0:t.params.deviceId,o=Ua((e=>e.serial)),[r,l]=(0,a.useState)(""),[s,d]=(0,a.useState)((0,M.us)().toISOString()),[u,h]=(0,a.useState)("both"),g=(0,a.useCallback)((e=>{h(e),"device"===e&&l("")}),[]),v=(0,a.useCallback)((e=>{l(e)}),[]),C=(0,a.useMemo)((()=>r&&"both"===u?[Vu.USER_EVENT]:eL[u]),[u,r]),x=(0,a.useMemo)((()=>({auditLogTypes:C,userEventsParams:{userEmail:r?(0,ul.kp)(r):void 0,userId:r?(0,ul.kp)(r):void 0,targetTypes:[S.F.Devices,S.F.DeviceCommands,S.F.RealtimeConnections],targetIds:n?[n]:void 0},deviceEventsParams:{deviceSerial:o},endTime:s})),[C,n,s,r,o]),f=dh(x);return(0,p.jsx)(oh,{...f,height:"window",renderTable:t=>{let{tableHeader:n,tableBody:o}=t;return(0,p.jsx)(sh,{sx:{minWidth:600},headerBackgroundSize:3,headerContent:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(i.Z,{paddingBottom:2,children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(i.Z,{minWidth:200,children:(0,p.jsx)(Qi,{fullWidth:!0,variant:"standard",InputProps:{sx:{...e.typography.h6,color:"primary.main","& .MuiTypography-root":{fontWeight:"medium"}},disableUnderline:!0},SelectProps:{IconComponent:fi.Z},value:u,options:[{value:"both",label:"Users & Device"},{value:"user",label:"Users only"},{value:"device",label:"Device only"}],onChange:g,disabled:f.fetchingEvents})}),(0,p.jsx)(rh,{filter:r,onFilterChange:v,filterPlaceholder:"Filter user events by email or API key ID",filterHidden:"device"===u,endTime:s,onEndTimeChange:d,onRefreshClick:f.refreshEvents,fetchingEvents:f.fetchingEvents})]})}),n]}),children:(0,p.jsx)(m.Z,{children:o})})}})},nL=e=>{let{configurationName:t,title:n,titleTo:a,items:r}=e;return(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(Kn.Z,{color:"primary.dark",variant:"subtitle1",fontWeight:"medium",marginBottom:2,lineHeight:1,component:Xc,to:a,children:n}),(0,o.map)(r,(e=>{let{title:t,label:n,indicatorProps:o,clickToViewProps:a}=e;return(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",paddingY:1.25,spacing:2,children:[(0,p.jsx)(i.Z,{width:290,flexShrink:0,children:(0,p.jsx)(Ui.G,{title:t,variant:"body1",color:"text.secondary"})}),(0,p.jsx)(v.Z,{color:"text.primary",children:n}),a&&(0,p.jsx)(Dp,{...a,sx:{height:25}}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(xT,{...o,hideProgressDetails:!0})]},t),(0,p.jsx)(Ie.Z,{})]},t)})),(0,o.isEmpty)(r)&&(0,p.jsxs)(v.Z,{variant:"body1",color:"text.primary",children:[(0,p.jsx)(Kn.Z,{component:Xc,to:a,children:t})," ","does not deploy any ",n]})]})};nL.displayName="DeviceSettingSyncStatusLayout";const iL=()=>{const e=hT(),{configuration:t}=DR(),{buildOrganizationPath:n}=(0,w.P)();return(0,o.isEmpty)(e)?null:(0,p.jsx)(nL,{items:e,title:"Content Update Schedule",titleTo:n((e=>e.configurations.configuration.schedule),{configurationId:t.id}),configurationName:t.name})};iL.displayName="DeviceContentUpdateScheduleSettingsSyncStatus";var oL=n(48691),aL=n(80731);const rL={[S.F.Apps]:"title",[S.F.DeviceSystemVersions]:"version",[S.F.Files]:"name",[S.F.Videos]:"title"},lL=(0,a.memo)((e=>{var t;let{item:n,lastInList:i}=e;const a=null===(t=n.targetRefPath)||void 0===t?void 0:t.split("/")[1],r=fD[n.type],l=(0,xo.ky)(r,a);if(r===S.F.WifiNetworks)return(0,p.jsx)(p.Fragment,{children:"".concat(n.targetName).concat(i?"":", ")});if(!r)return n.targetName===Jd.androidData?(0,p.jsx)(p.Fragment,{children:Jd.androidData}):(0,p.jsx)(p.Fragment,{});const s=rL[r],d=(0,o.get)(l,s);return(0,p.jsx)(p.Fragment,{children:d?"".concat(d).concat(i?"":", "):""})}
3)),sL={height:20,width:20},dL=(0,a.memo)((e=>{var t;let{cell:n}=e;const i=n.row.original[0],a=(0,o.compact)(n.row.original.map(((e,t)=>(0,o.isUndefined)(e.targetRefPath)&&(0,o.isUndefined)(e.targetName)?void 0:(0,p.jsx)(lL,{item:e,lastInList:t===n.row.original.length-1},e.targetRefPath)))),r=fD[i.type],l=null===(t=i.targetRefPath)||void 0===t?void 0:t.split("/")[1],s=(0,xo.ky)(r,l);let d="";if(r===S.F.WifiNetworks||"forbidden_file_location"===i.type)d=i.targetName;else{var c;const e=rL[r];d=null!==(c=(0,o.get)(s,e))&&void 0!==c?c:""}const u={error:(0,p.jsx)(Cd.Z,{color:"error",sx:sL}),warning:(0,p.jsx)(me.Z,{color:"warning",sx:sL}),info:(0,p.jsx)(cc.Z,{color:"info",sx:sL})},h="app_expiration_alert"===i.type?(0,p.jsx)(Iu.Z,{color:"warning"===i.level?"secondary":"error",sx:sL}):u[i.level];const g=a.length>=2?", +".concat(a.length-1):"";return(0,p.jsxs)(m.Z,{direction:"column",width:200,padding:0,position:"relative",right:16,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[h,(0,p.jsx)(v.Z,{variant:"caption",color:"text.primary",children:uD(i)})]}),a.length>0&&(0,p.jsx)(ee.Z,{title:a,placement:"bottom-start",children:(0,p.jsx)(m.Z,{children:(0,p.jsx)(Ui.G,{title:"",variant:"caption",color:"text.secondary",marginLeft:"14px",children:function(e,t){if(1===t)return e;const n=19-t.toString().length;return e.substring(0,n)+(n<e.length?"\u2026":"")}(d,a.length)+g})})})]})})),cL=(0,da.Cl)(),uL={width:20,height:20,marginTop:"6px"},pL=()=>(0,p.jsxs)(i.Z,{sx:{".Mui-expanded & > .collapseIconWrapper":{display:"none"},".expandIconWrapper":{display:"none"},".Mui-expanded & > .expandIconWrapper":{display:"block"}},children:[(0,p.jsx)(i.Z,{position:"relative",right:8,className:"expandIconWrapper",children:(0,p.jsx)(oL.Z,{sx:uL})}),(0,p.jsx)(i.Z,{position:"relative",right:-8,className:"collapseIconWrapper",children:(0,p.jsx)(aL.Z,{sx:uL})})]}),hL="INSTALL_FAILED_UPDATE_INCOMPATIBLE",mL=["setup_incomplete","low_storage","low_battery","low_controller_battery","missing_permissions","mhms_migration_failed","certificate_error"],gL=e=>{let{deviceAlertsObject:t}=e;const{filteredOrgAlerts:n,deviceAlertsLoading:r,deviceAlertsHasError:l,refreshDeviceAlerts:s,deviceAlerts:d}=t,c=uT(),u=pT(),h=DR(),[g,C]=(0,a.useMemo)((()=>{const e=(0,o.cloneDeep)(null!==d&&void 0!==d?d:[]);c&&e.push({type:"missing_permissions",deviceId:h.device.id,deviceName:h.device.name,level:"warning",message:"This device may require Android Obb Permissions to download the apps and files on its configuration"}),u&&e.push({type:"forbidden_file_location",deviceId:h.device.id,deviceName:h.device.name,level:"error",message:"Files in Android/data will not be deployed. Devices running Android 13+ do not permit MDMs or other 3rd parties to deploy files to Android/data",targetName:Jd.androidData});let t=jD.info;const i=(0,o.chain)(e).map((e=>"network_error"===e.type&&"error"===e.level?gD(e.message):void 0)).compact().uniq().sort(ze.bL).value(),a=(0,o.chain)(e).map((e=>"network_error"===e.type&&"warning"===e.level&&e.message!==pD?e.targetName:void 0)).compact().uniq().sort(ze.bL).value(),r=(0,o.chain)(e).map((e=>"network_error"===e.type&&"warning"===e.level&&e.message===pD?e.targetName:void 0)).compact().uniq().sort(ze.bL).value(),l=(0,o.intersection)(a,r),s=(0,o.difference)(r,a)[0],p=(0,o.difference)(a,r)[0],m=e=>{var t;if(null!==(t=e.message)&&void 0!==t&&t.includes(hL))return"".concat(hL,": Package signatures do not match previously installed version; ignoring!");if("network_error"===e.type&&"warning"===e.level&&(0,o.includes)(l,e.targetName)){const e=l.length>1?"".concat(l[0]," and ").concat((0,ul.sr)(l.length-1,"other network")," involuntarily dropped requests and device connection. "):"".concat(l[0]," involuntarily dropped requests and device connection.");return"Unstable network connection. ".concat(e)}if("network_error"===e.type&&"warning"===e.level&&e.message===pD){const e=r.length-l.length>1?"".concat(s," and ").concat((0,ul.sr)(r.length-l.length-1,"other network")," involuntarily dropped device connection."):"".concat(s," involuntarily dropped device connection.");return"Unstable network connection. ".concat(e)}if("network_error"===e.type&&"warning"===e.level){const e=a.length-l.length>1?"".concat(p," and ").concat((0,ul.sr)(a.length-l.length-1,"other network")," involuntarily dropped requests."):"".concat(p," has dropped requests.");return"Unstable network connection. ".concat(e)}return"network_error"===e.type&&"error"===e.level?"Device cannot communicate properly with ManageXR due to blocked endpoints: ".concat((0,ul.Yv)(i)):cD(e)},g=(0,o.map)((e=>{const t=new Map,n=new Map,i=new Map,o=[];for(const a of e){const e="network_error"===a.type&&"warning"===a.level?t:"network_error"===a.type&&"error"===a.level?n:"ssl_certificate_error"===a.type?i:void 0;if(!e){o.push({alert:a});continue}const r={endpoint:vD(a),firstSeen:a.firstSeen,lastError:a.lastError},l=e.get(a.targetName);if(l){l.push(r);continue}const s=[r];e.set(a.targetName,s),o.push({alert:a,endpointTimes:s})}return o}
3)(e),(e=>{let{alert:n,endpointTimes:i}=e;const o=jD[n.level];return o<t&&(t=o),{...n,message:m(n),variant:"device",severityInteger:o,endpointTimes:i}})),v=(0,o.map)(n,(e=>{const n=jD[e.level];return n<t&&(t=n),{...e,variant:"organization",severityInteger:n}}));return[(0,o.chain)([...g,...v]).groupBy((e=>"".concat(e.type,":").concat(e.message))).values().orderBy([e=>{var t,n;return"network_error"===(null===(t=e[0])||void 0===t?void 0:t.type)?Number.MAX_SAFE_INTEGER:null===(n=e[0])||void 0===n?void 0:n.severityInteger},e=>{var t,n;return"network_error"===(null===(t=e[0])||void 0===t?void 0:t.type)?"":null===(n=e[0])||void 0===n?void 0:n.type},e=>{var t;return null===(t=e[0])||void 0===t?void 0:t.message}],["desc","asc","asc"]).value(),t]}),[d,n,u,c,h.device.id,h.device.name]),x=(0,a.useMemo)((()=>[cL.accessor((e=>(0,o.startCase)(e[0].type)),{header:"Type",id:"type",cell:e=>(0,p.jsx)(dL,{cell:e}),size:180}),cL.display({header:"Info",id:"info",cell:e=>{var t;const n=e.row.original[0],i=cD(n);return(0,p.jsx)(ee.Z,{title:i,followCursor:!0,placement:"bottom",children:(0,p.jsx)(v.Z,{sx:{display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical",WebkitLineClamp:2},variant:"caption",color:"text.primary",marginTop:(0,o.includes)(mL,null===(t=e.row.original[0])||void 0===t?void 0:t.type)?"15px":"6px",children:i})})},size:200}),cL.display({header:"Last Error",id:"lastError",cell:e=>(0,p.jsx)(mD,{alerts:e.row.original}),size:150}),cL.display({header:"",id:"Learn More",cell:e=>{const t=e.row.original[0],n="missing_permissions"===t.type,i="forbidden_file_location"===t.type,o=n?Gd.androidObb:Gd.androidData;return(n||i)&&(0,p.jsx)(Kn.Z,{color:y.DG.info[200],variant:"caption",href:o,children:"Learn more"})},size:100})]),[]),f=(0,sa.b7)({columns:x,data:g,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),b=Math.min(60*g.length,210);return l?(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Cd.Z,{color:"error"}),(0,p.jsx)(v.Z,{children:"Failed to load device alerts."}),(0,p.jsx)(Un.U,{size:"small",onClick:s,icon:(0,p.jsx)(ks.Z,{}),submitting:r,children:"Refresh"})]}):0===g.length?null:(0,p.jsxs)(WI.Z,{disableGutters:!0,sx:{paddingBottom:4},children:[(0,p.jsx)(VI.Z,{expandIcon:(0,p.jsx)(pL,{}),"aria-controls":"panel1a-content",id:"panel1a-header",sx:{backgroundColor:y.DG.grey[200],"&:hover":{backgroundColor:y.DG.grey[300]},minHeight:40,maxHeight:40,"&.Mui-expanded":{minHeight:40,maxHeight:40},paddingLeft:"10px"},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(qA.Z,{color:ZD[C],sx:{height:8,width:8,marginRight:"6px"}}),(0,p.jsx)(v.Z,{color:y.DG.purple[800],fontSize:"small",children:"".concat(g.length," Device Alert").concat(1===g.length?"":"s")})]})}),(0,p.jsx)(GI.Z,{sx:{padding:0,paddingLeft:2,borderLeft:1,borderRight:1,borderBottom:1,borderColor:e=>e.palette.divider},children:(0,p.jsx)(i.Z,{sx:{"& .MuiTableBody-root .MuiTableRow-root:last-child .MuiTableCell-root":{border:"none"},"& .MuiTableBody-root .MuiTableRow-root .MuiTableCell-root:first-of-type":{paddingRight:0},"& .MuiTableBody-root .MuiTableRow-root .MuiTableCell-root:nth-of-type(2)":{alignItems:"start"}},children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,nativeListProps:{style:{paddingRight:16}},table:f,rowHeight:60,flexColumnIds:"info",height:b})})})]})};gL.displayName="DeviceDetailAlerts";const vL=()=>{var e;const{configuration:t}=DR(),{deviceExperienceMode:n,enableKioskShortcutMenu:i}=t,o=bR(),r=n===vp.w_.Kiosk?"shortcutMenu":"homeScreen",[l,s]=(0,a.useState)(r),d=(0,xo.ky)(S.F.Apps,null===(e=t.kioskAppRef)||void 0===e?void 0:e.id),c=n===vp.w_.HomeScreen||n===vp.w_.Kiosk&&i;return(0,a.useEffect)((()=>{s(n===vp.w_.Kiosk?"shortcutMenu":"homeScreen")}),[n]),(0,p.jsxs)(m.Z,{spacing:2,children:[n===vp.w_.Kiosk&&d&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,children:[(0,p.jsx)(v.Z,{color:"grey.700",whiteSpace:"nowrap",children:"Kiosk App"}),(0,p.jsx)(Ui.G,{title:d.title,color:"grey.800",fontWeight:"bold"})]}),c&&(0,p.jsxs)(m.Z,{spacing:0,children:[(0,p.jsx)(Ym,{configuration:t,environmentFileIdOverride:o,mode:l,disable:!0}),(0,p.jsx)(Qm,{onPreviewModeToggleChanged:e=>s(e),configuration:t,previewMode:l})]})]})};vL.displayName="DeviceDetailHomeScreenPreview";
3const CL=e=>{const{icon:t,title:n,appendTitle:a,titleIcon:r,titleLinkTo:l,subtitle:s,indicatorProps:d,fadedOut:c=!1,fadeOutIcon:u=!1,withIconBackground:h=!1,testId:g}=e,C=(0,Vr.nk)(d);return(0,p.jsxs)(m.Z,{direction:"row",height:90,maxWidth:580,overflow:"hidden",borderRadius:1,sx:{backgroundColor:y.DG.grey[100],opacity:c?.4:1},"data-testid":g,children:[(0,p.jsx)(i.Z,{height:1,display:"grid",sx:{aspectRatio:"1","& > *":{width:1,height:1,borderRadius:1},placeItems:"center",opacity:u?.4:1,backgroundColor:h?y.DG.grey[200]:void 0},children:t}),(0,p.jsxs)(m.Z,{flexGrow:1,paddingX:1,paddingTop:1.25,paddingBottom:"".concat(8,"px"),overflow:"hidden",position:"relative",spacing:.5,children:[(0,p.jsx)(xL,{downloading:"downloading"===C,indicatorProps:d,title:n,titleLinkTo:l,titleIcon:r,appendTitle:a}),(0,p.jsx)(m.Z,{flexGrow:1,justifyContent:"center",children:(0,o.isString)(s)?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",title:s,sx:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis"},children:s}):s}),("downloading"===C||"paused"===C)&&(0,p.jsx)(Rn.Z,{variant:"determinate",value:d.progressValue,sx:{position:"absolute",left:0,right:0,bottom:0,height:4,..."paused"===C&&{backgroundColor:"grey.300","& .MuiLinearProgress-bar":{backgroundColor:"grey.500"}}}})]})]})},xL=e=>{let{downloading:t,title:n,appendTitle:i,titleLinkTo:o,titleIcon:a,indicatorProps:r}=e;return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,justifyContent:"space-between",alignItems:"center",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",flexGrow:1,spacing:.5,children:[a,o?(0,p.jsx)(Kn.Z,{component:f.rU,to:o,sx:{width:1},children:(0,p.jsx)(Ui.G,{title:n,appendTitle:i,link:!0,variant:"subtitle1",color:"primary"})}):(0,p.jsx)(Ui.G,{title:n,appendTitle:i,variant:"subtitle1"})]}),t?(0,p.jsx)(fL,{indicatorProps:r}):(0,p.jsx)(xT,{...r,hideProgressDetails:!0})]})},fL=e=>{let{indicatorProps:t}=e;const{timeRemaining:n,downloadSpeed:o,totalBytesDownloaded:a,totalDownloadSize:r}=t,l=(0,Ad.Z)(null!==o&&void 0!==o?o:0),s=(0,Ad.Z)(null!==a&&void 0!==a?a:0),d=(0,Ad.Z)(null!==r&&void 0!==r?r:0),c=(0,M.Vl)(null!==n&&void 0!==n?n:0);return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsxs)(i.Z,{sx:{"&:hover .speed":{display:"unset"},"&:hover .downloadedBytes":{display:"none"}},children:[(0,p.jsxs)(v.Z,{className:"speed",variant:"body2",sx:{display:"none"},children:[l,"ps"]}),(0,p.jsxs)(v.Z,{className:"downloadedBytes",variant:"body2",children:[s,"/",d]})]}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["Est.\xa0",c]})]})};CL.displayName="UIDeviceSyncStatusCard";var bL=n(54153);const yL=()=>{const e=(()=>{const{configuration:e,currentRuntimeSettings:t,deviceStatus:n}=DR(),{documents:i}=(0,E.D)(S.F.Certificates,{filter:(0,a.useCallback)((t=>(0,o.some)(e.certificateRefs,{id:t.id})),[e.certificateRefs])}),r={success:"Up to date",warning:"Out of date",error:"Error"};return(0,o.map)(i,(e=>{var i,o;const a=null===n||void 0===n||null===(i=n.certificateStatuses)||void 0===i?void 0:i[e.id],l="ERROR"===(null===a||void 0===a?void 0:a.status),s=!0===(null===t||void 0===t||null===(o=t.certificates)||void 0===o?void 0:o[e.id]),d=l?"error":s?"success":"warning",c=r[d],u="error"===d?cD({type:"certificate_error",message:null===a||void 0===a?void 0:a.message}):void 0;return{title:e.name,certificateId:e.id,indicatorProps:{status:d,labelSecondary:c,tooltipTitle:u}}}))})();return(0,o.isEmpty)(e)?null:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",fontWeight:"medium",color:"primary.dark",alignSelf:"flex-start",children:"Certificates"}),(0,p.jsx)(m.Z,{spacing:1,children:(0,o.map)(e,(e=>(0,p.jsx)(CL,{icon:(0,p.jsxs)(m.Z,{justifyContent:"center",alignItems:"center",children:[(0,p.jsx)(bL.Z,{sx:{fontSize:38,color:"success"===e.indicatorProps.status?"success.main":y.DG.grey[500]}}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{fontSize:10},children:"Certificate"})]}),withIconBackground:!0,...e},e.certificateId)))})]})},jL=e=>{let{row:t,indicatorPropsByPath:n}=e;if("file"!==t.original.itemType)return null;
3const i=n[(0,Od.SF)(t.original.directory,t.original.name)];return i?(0,p.jsx)(m.Z,{width:1,direction:"row",justifyContent:"flex-end",zIndex:1,children:(0,p.jsx)(xT,{...i})}):null},ZL=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.3333 2.49992V0.833252H15V2.49992H15.8333C16.75 2.49992 17.5 3.24992 17.5 4.16659V8.33325H15.8333V6.66659H4.16667V15.8333H7.5V17.4999H4.16667C3.24167 17.4999 2.5 16.7499 2.5 15.8333L2.50833 4.16659C2.50833 3.24992 3.24167 2.49992 4.16667 2.49992H5V0.833252H6.66667V2.49992H13.3333Z",fill:"currentColor"}),(0,p.jsx)("path",{d:"M12.9307 10.0276H12.1391V13.1943L14.646 14.6985L15.0418 14.0493L12.9307 12.7984V10.0276ZM12.6668 7.9165C10.0438 7.9165 7.91684 10.0434 7.91684 12.6665C7.91684 15.2896 10.0385 17.4165 12.6668 17.4165C15.2899 17.4165 17.4168 15.2896 17.4168 12.6665C17.4168 10.0434 15.2899 7.9165 12.6668 7.9165ZM12.6668 16.3609C10.6243 16.3609 8.9724 14.709 8.9724 12.6665C8.9724 10.624 10.6243 8.97206 12.6668 8.97206C14.7093 8.97206 16.3613 10.624 16.3613 12.6665C16.3613 14.709 14.7093 16.3609 12.6668 16.3609Z",fill:"currentColor"})]});ZL.displayName="ScheduleIcon";const wL=e=>{let{contentType:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),{configuration:i}=DR(),{forceSyncCommand:o}=AP();return(0,wp.Gp)(i)?o?(0,p.jsx)(EL,{label:"Force Sync",tooltipText:"This device has been sent a sync command and will sync immediately when it comes online, rather than waiting for its configured update schedule."}):(0,p.jsx)(EL,{label:"Scheduled",TooltipProps:{disableInteractive:!1},tooltipContent:(0,p.jsxs)(v.Z,{...Fi.V,color:"text.primary",children:[(0,p.jsxs)("span",{children:[t," will sync according to its configured schedule. "]}),(0,p.jsx)(Kn.Z,{component:f.rU,to:n((e=>e.configurations.configuration.schedule),{configurationId:i.id}),children:"View\xa0Schedule\xa0"})]})}):null},EL=e=>{let{label:t,...n}=e;return(0,p.jsx)(Fi._,{...n,children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"center",alignItems:"center",spacing:.5,children:[(0,p.jsx)(ZL,{fontSize:"small"}),(0,p.jsx)(v.Z,{variant:"caption",children:t})]})})};wL.displayName="DeviceUpdatesScheduledIndicator";const SL=()=>{const{buildOrganizationPath:e}=(0,w.P)(),t=sT(),{configuration:n}=DR(),[i,r]=(0,a.useMemo)((()=>{const e={};return[(0,o.mapValues)(t,((t,n)=>(0,o.map)(t,(t=>{const i=(0,Od.SF)(n,t.file.name);return e[i]=t.indicatorProps,t.file})))),e]}),[t]),l=(0,a.useMemo)((()=>(0,Od.R$)({filesByDirectory:i,rootName:Od.uu})),[i]),s=(0,a.useCallback)((e=>e.display({id:"sync-status",size:115,cell:e=>{let{row:t}=e;return(0,p.jsx)(jL,{row:t,indicatorPropsByPath:r})}})),[r]),d=(0,a.useMemo)((()=>{const e=(l.deepFileCount+l.deepFolderCount+1)*LC;return Math.min(500,e)}),[l.deepFileCount,l.deepFolderCount]),c=(0,a.useMemo)((()=>["size","type","date"]),[]);return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(Kn.Z,{component:f.rU,to:e((e=>e.configurations.configuration.files),{configurationId:n.id}),variant:"subtitle1",fontWeight:"medium",color:"primary.dark",alignSelf:"flex-start",children:"Files"}),(0,p.jsx)(wL,{contentType:"Files"})]}),(0,o.isEmpty)(i)?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"None"}):(0,p.jsx)(ix,{tableId:n.id,rootDirectory:l,getExtraColumns:s,disabledColumns:c,expanded:!0,disableSelection:!0,children:(0,p.jsx)(rx,{height:d,noDropzone:!0})})]})};var DL=n(45644);const ML=e=>{let{installedValue:t="Unknown",targetValue:n,installedLabel:i,targetLabel:o}=e;const a=n!==t;return(0,p.jsxs)(m.Z,{direction:"column",alignItems:"flex-start",spacing:.25,children:[(0,p.jsx)(kL,{header:i,value:t,variant:a?"caption":"body2",color:"text.secondary"}),a&&(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(DL.Z,{fontSize:"small",color:"inherit"}),(0,p.jsx)(kL,{header:o,value:n,variant:"subtitle2",color:"text.primary"})]})]})},kL=e=>{let{header:t,value:n,variant:i,color:o}=e;const a=(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",color:y.DG.grey[200],children:[t,":"]}),(0,p.jsx)(v.Z,{variant:"body2",children:n})]});return(0,p.jsx)(ee.Z,{title:a,placement:"bottom-start",followCursor:!0,children:(0,p.jsx)(v.Z,{variant:i,color:o,children:n})})},IL=()=>{var e;const{device:t,configuration:n}=DR();if(t.manufacturer!==bi.p6.Oculus)return null;const i=(0,Vr.wz)(t);
3if(i<vp.$P)return null;if((t.isQfbDevice?n.oculusFirmwareUpdatePolicy:n.legacyOculusFirmwareUpdatePolicy)!==vp.AP.BlockFirmwareUpdates)return null;const o=null!==(e=(0,Vr.xQ)(t))&&void 0!==e?e:"v".concat(i);return(0,p.jsx)(Me.Z,{square:!1,sx:{backgroundColor:y.DG.info[50],borderRadius:2},children:(0,p.jsxs)(m.Z,{paddingY:2,paddingX:1.5,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(cc.Z,{sx:{color:"info.main",marginLeft:2}}),(0,p.jsx)(v.Z,{variant:"body1",sx:{marginLeft:2},children:"Disable Updates Limitation (v81+)"})]}),(0,p.jsxs)(v.Z,{variant:"body2",sx:{marginLeft:7,marginTop:.5},children:["This device is running firmware ",o,". The Disable Updates policy is not supported on v81+ \u2014 updates are being postponed for 30 days instead."]})]})})};IL.displayName="MetaQuestFirmwareDisableLimitationBanner";const AL=()=>{const e=kR();return e?(0,p.jsx)(Me.Z,{square:!1,sx:{backgroundColor:y.DG.info[50],borderRadius:2},children:(0,p.jsxs)(m.Z,{paddingY:2,paddingX:1.5,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(vT.Z,{sx:{color:"info.main",marginLeft:2}}),(0,p.jsx)(v.Z,{variant:"body1",sx:{marginLeft:2},children:"Firmware Hold Active"})]}),(0,p.jsxs)(v.Z,{variant:"body2",sx:{marginLeft:7,marginTop:.5},children:[e," ",(0,p.jsx)(li.Q,{href:Be.IW.firmwareHoldMetaDevices,sx:{display:"inline",fontSize:"inherit"},children:"Learn More"})]})]})}):null};AL.displayName="MetaQuestFirmwarePostponedBanner";const RL=(0,a.memo)((()=>{const{buildOrganizationPath:e}=(0,w.P)(),{configuration:t,device:n}=DR(),i=lT();if((0,o.isUndefined)(i))return null;const a=(0,Vr.Xj)(n.model),r=(null===i||void 0===i?void 0:i.title)===oT?(0,p.jsx)(ML,{installedValue:i.installedVersion,targetValue:i.targetVersion,installedLabel:"Installed Firmware",targetLabel:"Target Firmware"}):(null===i||void 0===i?void 0:i.title)===aT?(0,p.jsx)(ML,{installedValue:i.installedVersion,targetValue:i.targetVersion,installedLabel:"Current Policy",targetLabel:"Target Policy"}):null===i||void 0===i?void 0:i.subtitle;return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(Kn.Z,{variant:"subtitle1",fontWeight:"medium",component:f.rU,to:e((e=>e.configurations.configuration.firmware),{configurationId:t.id}),sx:{color:"primary.main"},children:"Firmware"}),n.manufacturer===bi.p6.Pico&&(0,p.jsx)(wL,{contentType:"Firmware"})]}),(0,p.jsx)(AL,{}),(0,p.jsx)(IL,{}),(0,p.jsx)(m.Z,{spacing:1,children:(0,p.jsx)(CL,{icon:(0,p.jsx)(a,{color:"action",sx:{padding:1.5,fontSize:64}}),...i,subtitle:r})})]})}));RL.displayName="DeviceDetailSettingsStatus";const TL=()=>{const e=(()=>{var e;const t=(0,d.P)(Sc.X.ENABLE_PUI4_HOME_SCREEN_INDICATOR),n=null===(e=(0,z.T)("featureFlags"))||void 0===e?void 0:e.pui4LastHomeScreenVersion;if(t&&n)return n})(),{device:t}=DR(),n=!!e&&(0,Vr.we)(t),i=n&&(0,Vr.If)(t);return(0,a.useMemo)((()=>{if(!n)return;const t={fontFamily:"ElzaText",fontWeight:500,fontSize:12};return{tooltipTitle:i?(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{sx:t,children:["Devices running PICO PUI v4 cannot upgrade beyond v",e," of the ManageXR Home Screen."]}),(0,p.jsxs)(v.Z,{sx:t,children:["To get the latest Home Screen version and features, upgrade your device to PUI 5."," ",(0,p.jsxs)(Kn.Z,{href:Be.IW.pui4HomeScreenLearnHow,target:"_blank",sx:{color:"white",textDecoration:"underline"},children:["Learn how",(0,p.jsx)(Mu.Z,{sx:{fontSize:14,verticalAlign:"middle",marginLeft:.25}})]})]})]}):(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{sx:t,children:"Devices running PICO PUI v4 will remain on a stable version of the ManageXR Home Screen:"}),(0,p.jsxs)(v.Z,{sx:t,children:["v",e]}),(0,p.jsx)(v.Z,{sx:t,children:(0,p.jsxs)(Kn.Z,{href:Be.IW.pui4HomeScreenLearnMore,target:"_blank",sx:{color:"white",textDecoration:"underline"},children:["Learn more",(0,p.jsx)(Mu.Z,{sx:{fontSize:14,verticalAlign:"middle",marginLeft:.25}})]})})]}),tooltipInteractive:!0}}),[n,i,e])},PL={placement:"top-end"},LL=e=>{let{tooltipContent:t,children:n}=e;return(0,p.jsx)(Fi._,{TooltipProps:PL,tooltipContent:t,children:(0,p.jsx)(Iy.Z,{severity:"info",sx:{alignSelf:"flex-end",borderRadius:1,padding:"2px 6px",color:"grey.700",backgroundColor:"background.paper",border:"1px solid ".concat(y.DG.grey[300]),alignItems:"center","& .MuiAlert-icon":{color:"grey.500",fontSize:"1rem",marginRight:"4px",padding:0,marginTop:0,marginBottom:0},"& .MuiAlert-message":{padding:0}},children:n})})},NL=()=>(0,p.jsx)(LL,{tooltipContent:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"This app update has been downloaded and is ready to install, but the app is currently running in the foreground on the device."}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",fontWeight:"bold",children:"How to install the update:"}),(0,p.jsxs)(m.Z,{spacing:.5,sx:{paddingLeft:2},children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"\u2022 The update will install automatically once the app is no longer in use"}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"\u2022 To install immediately, enable Force Install on the configuration"})]})]}),children:"Update waiting \u2014 app is in use on device"}),UL=e=>{let{progressValue:t}=e;return(0,p.jsxs)(LL,{tooltipContent:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"This device paused its download because it lost connection to the internet mid download."}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",fontWeight:"bold",children:"How to retry the download:"}),(0,p.jsxs)(m.Z,{spacing:.5,sx:{paddingLeft:2},children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"\u2022 The device will automatically try again within 15 minutes, if online"}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"\u2022 To force a retry sooner, send a Sync command"})]}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"When it retries, the download will pick up from where it left off."})]}),children:["Download paused at ",Math.round(null!==t&&void 0!==t?t:0),"%"]})},FL=e=>{var t,n,i;let{targetApp:a,currentRuntimeApp:r,hideReleaseChannel:l}=e;
3const s=(0,xo.ky)(S.F.Apps,null===r||void 0===r?void 0:r.id),d=(0,Vs.IR)(a),c=!(0,o.isUndefined)(a.instantAppRef);let u;var h;r?u={...s,title:null!==(h=null===s||void 0===s?void 0:s.title)&&void 0!==h?h:"",...r}:d&&(u=a);const g=!(0,Vs.n$)(a)&&!(0,Vs.HB)(a)&&((null===(t=u)||void 0===t?void 0:t.versionCode)!==a.versionCode||(null===(n=u)||void 0===n?void 0:n.versionName)!==a.versionName||(null===(i=u)||void 0===i?void 0:i.versionLabel)!==a.versionLabel);return(0,p.jsxs)(m.Z,{direction:"column",spacing:.25,children:[u?(0,p.jsx)(sc,{app:u,typographyVariant:g?"caption":"body2",showV:!0,color:"text.secondary",hideReleaseChannel:c||l,hideVersionLabel:c,tooltipHeader:"Installed Version:"}):(0,p.jsx)(v.Z,{variant:g?"caption":"body2",color:"text.secondary",children:"Not Installed"}),g&&(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(DL.Z,{fontSize:"small",color:"inherit"}),(0,p.jsx)(sc,{app:a,typographyVariant:"subtitle2",color:d?"text.secondary":void 0,hideReleaseChannel:c||l,hideVersionLabel:c,tooltipHeader:"Target Version:"})]})]})},OL=(0,a.memo)((e=>{let{targetApp:t,title:n,appendTitle:i,isGlobalReleaseChannel:o,indicatorProps:r}=e;const{buildOrganizationPath:l}=(0,w.P)(),{indicatorProps:s,currentRuntimeApp:d,isForegroundPending:c}=OR(t,o),u=(0,X.bo)(),h=o&&!u,g=(0,a.useMemo)((()=>{if(!t.globalAccess)return t.isShared?l((e=>e.vrContent.edit.app.shared),{packageName:t.packageName}):t.apkUrl?l((e=>e.vrContent.edit.app.managed),{packageName:t.packageName}):(0,Vs.HB)(t)?l((e=>e.vrContent.edit.app.metaHorizonStoreManaged),{appId:t.id}):l((e=>e.vrContent.edit.app.external),{appId:t.id})}),[t,l]),v="paused"===(0,Vr.nk)(s),C=(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(Fd,{app:t}),(0,p.jsx)(gT,{appVersions:[t],singleApp:!0})]});return(0,p.jsxs)(m.Z,{spacing:0,children:[(0,p.jsx)(CL,{icon:(0,p.jsx)("img",{src:t.iconUrl,alt:""}),title:null!==n&&void 0!==n?n:t.title,appendTitle:i,titleLinkTo:g,titleIcon:C,fadeOutIcon:(0,Vs.IR)(t),subtitle:(0,p.jsx)(FL,{targetApp:t,currentRuntimeApp:d,hideReleaseChannel:h}),indicatorProps:{...s,...r},testId:"device_appSyncStatus"}),v&&(0,p.jsx)(UL,{progressValue:s.progressValue}),c&&(0,p.jsx)(NL,{})]})}));OL.displayName="DeviceDetailAppStatusItem";const _L=(0,a.memo)((e=>{let{instantApp:t}=e;const n=NR(t);return n?(0,p.jsx)(zL,{instantApp:t,targetApp:n}):(0,p.jsx)(BL,{instantApp:t})})),zL=e=>{let{instantApp:t,targetApp:n}=e;const{indicatorProps:i,currentRuntimeApp:o}=OR(n),a="paused"===(0,Vr.nk)(i);return(0,p.jsxs)(m.Z,{spacing:0,children:[(0,p.jsx)(WL,{instantApp:t,titleIcon:(0,p.jsx)(Ud.Z,{sx:{color:Ld.Li}}),subtitle:(0,p.jsx)(FL,{targetApp:n,currentRuntimeApp:o}),indicatorProps:i}),a&&(0,p.jsx)(UL,{progressValue:i.progressValue})]})},BL=e=>{let{instantApp:t}=e;const n=(0,p.jsx)(m.Z,{direction:"row",maxWidth:1,alignItems:"center",spacing:1,children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Not supported on this device model"})}),i=(e=>{if(0===e.length)return"This app is not supported on this device.";const t=(0,Vr.ar)(e),n=(0,o.join)((0,o.map)(t,(e=>{const t=e?(0,o.map)(e,Vr.ao):[];return"\u2022 ".concat((0,o.join)(t,", "))})),"\n");return"".concat("This app is not supported on this device. It is compatible with:","\n").concat(n)})(ry(t));return(0,p.jsx)(ee.Z,{title:i,followCursor:!0,componentsProps:{tooltip:{sx:{whiteSpace:"pre-line"}}},children:(0,p.jsx)(m.Z,{children:(0,p.jsx)(WL,{instantApp:t,titleIcon:(0,p.jsx)(Ud.Z,{sx:{color:"action.active"}}),subtitle:n,indicatorProps:{status:"warning",labelSecondary:"Incompatible"},fadedOut:!0})})})},WL=e=>{var t;let{instantApp:n,...i}=e;const o=null!==(t=n.appIconUrl)&&void 0!==t?t:n.iconUrl,{buildOrganizationPath:a}=(0,w.P)(),r=a((e=>e.vrContent.edit.app.instant),{instantAppId:n.id});return(0,p.jsx)(CL,{...i,testId:"device_appSyncStatus",icon:(0,p.jsx)("img",{src:o,alt:""}),title:n.title,titleLinkTo:r})},VL=(0,a.memo)((e=>{let{targetVideo:t,title:n}=e;const{buildOrganizationPath:i}=(0,w.P)(),o=_R(t);return o?(0,p.jsx)(CL,{icon:(0,p.jsx)("img",{src:t.iconUrl,alt:t.title}),title:null!==n&&void 0!==n?n:t.title,...o,titleLinkTo:i((e=>e.vrContent.edit.video),{videoId:t.id}),testId:"device_videoSyncStatus"}):null})),GL=(0,a.memo)((e=>{let{title:t,children:n,warningMessage:i}=e;return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(Kn.Z,{fontWeight:"medium",component:f.rU,variant:"subtitle2",color:"primary.dark",to:t.to,alignSelf:"flex-start",children:t.text}),n&&(0,p.jsx)(m.Z,{spacing:1,children:n}),i]})})),HL=(0,a.memo)((e=>{let{targetWebXRApp:t,title:n}=e;const{buildOrganizationPath:i}=(0,w.P)(),o=zR(t);return(0,p.jsx)(CL,{icon:(0,p.jsx)("img",{src:t.iconUrl,alt:t.title}),title:null!==n&&void 0!==n?n:"".concat(t.title),titleLinkTo:i((e=>e.vrContent.edit.webXRApp),{webXRAppId:t.id}),...o,testId:"device_webxrSyncStatus"})})),qL=(0,a.memo)((()=>{const{buildOrganizationPath:e}=(0,w.P)(),{configuration:t,approvedApps:n,approvedVideos:i,approvedWebXRApps:a,approvedInstantApps:r}=DR(),l=IR(),s=AR(),d=RR(),c=TR(),u=PR(),h=LR(),g=TL(),C=[{title:{text:"Apps",to:e((e=>e.configurations.configuration.apps),{configurationId:t.id})},warningMessage:(0,o.isEmpty)(n)&&(0,o.isEmpty)(r)&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"None"}),children:[...(0,o.map)(n,(e=>(0,p.jsx)(OL,{targetApp:e},e.id))),...(0,o.map)(r,(e=>(0,p.jsx)(_L,{instantApp:e},e.id)))]},{title:{text:"Videos",to:e((e=>e.configurations.configuration.videos),{configurationId:t.id})},warningMessage:(0,o.isEmpty)(i)&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"None"}),children:!(0,o.isEmpty)(i)&&(0,o.map)(i,(e=>(0,p.jsx)(VL,{targetVideo:e},e.id)))},{title:{text:"WebXR Links",to:e((e=>e.configurations.configuration.webXRApps),{configurationId:t.id})},warningMessage:(0,o.isEmpty)(a)&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"None"}),children:!(0,o.isEmpty)(a)&&(0,o.map)(a,(e=>(0,p.jsx)(HL,{targetWebXRApp:e},e.id)))}];return(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(Kn.Z,{fontWeight:"medium",component:f.rU,to:e((e=>e.configurations.configuration.apps),{configurationId:t.id}),variant:"subtitle1",color:"primary.dark",alignSelf:"flex-start",children:"VR Content"}),(0,p.jsx)(wL,{contentType:"VR Content"})]}),(0,p.jsx)(m.Z,{spacing:4,children:(0,o.map)(C,(e=>(0,p.jsx)(GL,{...e},e.title.text)))})]}),(l||s||d||c||h||u)&&(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{fontWeight:"medium",variant:"subtitle1",color:"primary.dark",alignSelf:"flex-start",children:"ManageXR Apps"}),(0,p.jsx)(wL,{contentType:"ManageXR Apps"})]}),(0,p.jsxs)(m.Z,{spacing:1,children:[l&&(0,p.jsx)(OL,{title:"ManageXR Admin App",targetApp:l,isGlobalReleaseChannel:!0}),s&&(0,p.jsx)(OL,{title:"ManageXR Home Screen",targetApp:s,isGlobalReleaseChannel:!0,indicatorProps:g}),d&&(0,p.jsx)(OL,{title:"Wolvic Browser",appendTitle:(0,p.jsx)(ci,{helpText:"Your device uses Wolvic Browser to launch WebXR links.",url:Be.IW.wolvicBrowser}),targetApp:d,isGlobalReleaseChannel:!0}),c&&(0,p.jsx)(OL,{title:"Pico Permissions Granter",targetApp:c,isGlobalReleaseChannel:!0}),u&&(0,p.jsx)(OL,{title:"OEMConfig",targetApp:u,isGlobalReleaseChannel:!0}),h&&(0,p.jsx)(OL,{title:"OEMConfigKioskApp",targetApp:h,isGlobalReleaseChannel:!0})]})]})]})})),YL={WRONG_PASSWORD:"Wrong password",EAP_FAILURE:"Authentication failed (EAP)",TIMEOUT:"Connection timed out",CAPTIVE_PORTAL:"Captive portal detected",NO_INTERNET:"Connected, no internet",UNKNOWN_FAILURE:"Failed to connect"},KL=(0,a.memo)((e=>{let{connectionStatus:t,lastConnectionAttemptTime:n,lastConnectionAttemptResult:o,lastDisconnectedTime:r}=e;const{statusText:l,showErrorColor:s}=(0,a.useMemo)((()=>
3{if("connected"===t)return{statusText:null,showErrorColor:!1};if("never_used"===t)return n?{statusText:null,showErrorColor:!1}:{statusText:"Never used",showErrorColor:!1};if("last_used"===t){if(o&&"SUCCESS"!==o){const e=YL[o],t=n?(0,M.E6)(n.getTime()):void 0;return{statusText:t?"".concat(e," ").concat(t):e,showErrorColor:!0}}if(r){const e=(0,M.E6)(r.getTime());return{statusText:"Last connected ".concat(e),showErrorColor:!1}}if("SUCCESS"===o&&n){const e=(0,M.E6)(n.getTime());return{statusText:"Last connected ".concat(e),showErrorColor:!1}}if(n){const e=(0,M.E6)(n.getTime());return{statusText:"Last connected ".concat(e),showErrorColor:!1}}}return{statusText:null,showErrorColor:!1}}),[t,n,o,r]);return"connected"===t?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(i.Z,{sx:{width:8,height:8,borderRadius:"50%",backgroundColor:"success.main"}}),(0,p.jsx)(v.Z,{variant:"caption",color:"success.main",children:"Connected"})]}):l?(0,p.jsx)(v.Z,{variant:"caption",color:s?"error.main":"text.secondary",children:l}):null})),XL=(0,a.memo)((()=>{const{buildOrganizationPath:e}=(0,w.P)(),{configuration:t}=DR(),n=nT(),i=(0,Le.iM)();return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(Kn.Z,{variant:"subtitle1",fontWeight:"medium",component:f.rU,to:e((e=>e.configurations.configuration.wifiNetworks),{configurationId:t.id}),alignSelf:"flex-start",sx:{color:"primary.main"},children:"Wi-Fi Networks"}),(0,o.isEmpty)(n)?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"None"}):(0,p.jsx)(m.Z,{spacing:1,children:(0,o.map)(n,(t=>(0,p.jsx)(CL,{titleLinkTo:e((e=>e.wifiNetworks.wifiNetwork),{wifiNetworkId:t.wifiNetworkId}),icon:(0,p.jsxs)(m.Z,{justifyContent:"center",alignItems:"center",children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:0,alignItems:"flex-end",justifyContent:"center",children:[(0,p.jsx)(go.Z,{sx:{fontSize:38,color:y.DG.grey[500]}}),t.isPriorityNetwork&&(0,p.jsx)(ee.Z,{title:"Always connect if available",placement:"right",children:(0,p.jsx)(vf.Z,{sx:{fontSize:16,color:"primary.main",marginLeft:"-16px",marginBottom:.5}})})]}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{fontSize:10},children:Cp.mp[t.type]})]}),withIconBackground:!0,testId:"device_wifiSyncStatus",title:t.title,subtitle:(0,p.jsxs)(m.Z,{spacing:.25,children:[t.subtitle&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:t.subtitle}),i&&(0,p.jsx)(KL,{connectionStatus:t.connectionStatus,lastConnectionAttemptTime:t.lastConnectionAttemptTime,lastConnectionAttemptResult:t.lastConnectionAttemptResult,lastDisconnectedTime:t.lastDisconnectedTime})]}),indicatorProps:t.indicatorProps},t.wifiNetworkId)))})]})})),QL=()=>(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",rowGap:2,columnGap:5,children:[(0,p.jsx)(i.Z,{flexGrow:1,flexBasis:360,overflow:"hidden",children:(0,p.jsx)(qL,{})}),(0,p.jsxs)(m.Z,{flexGrow:1,spacing:3,flexBasis:360,overflow:"hidden",children:[(0,p.jsx)(SL,{}),(0,p.jsx)(XL,{}),(0,p.jsx)(RL,{}),(0,p.jsx)(yL,{})]})]}),JL=()=>{const e=WR(),{configuration:t}=DR(),{buildOrganizationPath:n}=(0,w.P)();return(0,o.isEmpty)(e)?null:(0,p.jsx)(nL,{items:e,title:"Device Experience",titleTo:n((e=>e.configurations.configuration.homeScreen),{configurationId:t.id}),configurationName:t.name})};JL.displayName="DeviceExperienceSettingsSyncStatus";var $L=n(99513);const eN=(0,a.memo)((e=>{var t;let{TextFieldProps:n}=e;const i=(0,u.I0)(),o=null!==(t=Ua((e=>e.notes)))&&void 0!==t?t:"";return(0,p.jsx)(zi.W,{privilege:"devices",children:(0,p.jsx)(Ln.Z,{multiline:!0,label:"Notes",rows:3,value:o,onChange:e=>{i(Oa(La.i7.actions.deviceNotesChanged({notes:e.target.value})))},InputProps:{sx:{paddingRight:"unset"}},inputProps:{sx:{paddingRight:"14px"}},fullWidth:!0,...n})})})),tN=(0,a.memo)((e=>{let{submitting:t,title:n,subtitle:i,buttonText:a="Submit",onButtonClick:r,icon:l}=e;return(0,p.jsxs)(m.Z,{height:146,paddingX:2,paddingY:3,direction:"row",spacing:2,alignItems:"center",children:[(0,p.jsx)(m.Z,{justifyContent:"center",alignItems:"center",height:1,borderRadius:2,paddingX:3,sx:{backgroundColor:"grey.100",aspectRatio:"6 / 5"},children:l||(0,p.jsx)(Rn.Z,{sx:{width:1},variant:"indeterminate"})}),(0,p.jsxs)(m.Z,{spacing:1,flexGrow:1,children:[n&&(0,p.jsx)(v.Z,{variant:"h6",children:n}),i&&((0,o.isString)(i)?(0,p.jsx)(v.Z,{variant:"body2",children:i}):i)]}),r&&(0,p.jsx)(Un.U,{variant:"text",submitting:t,onClick:()=>r&&r(),sx:{paddingRight:2},children:a})]})})),nN=e=>{var t;let{device:n}=e;const r=(0,u.I0)(),{notifyThunkResult:l}=(0,ie.o)(),s=(0,d.kV)().numTotalDeviceLicenses,c=(0,a.useMemo)((()=>"QUEUED"===(null===n||void 0===n?void 0:n.factoryResetStatus)),[n]),h=(()=>{const{allQueuedCommands:e,commandsLoaded:t}=AP(),[n,i]=(0,a.useMemo)((()=>{const t=[],n=[];return(0,o.forEach)(e,(e=>{var i;"FACTORY_RESET_V2"===e.action&&"QUEUED"===e.status&&(!0===(null===(i=e.data)||void 0===i?void 0:i.qfbIndividualModeFactoryReset)?t.push(e):n.push(e))})),[t,n]}),[e]);if(t)return n.length>0&&0===i.length})(),[g,C]=(0,a.useState)(!1),x=(0,a.useCallback)((async()=>
3{if(null===n||void 0===n||!n.id)return;C(!0);const e=await r((0,La.qJ)({deviceIds:[n.id],action:"CANCEL_FACTORY_RESET"}));l({result:e,success:{message:"Cancel Factory Reset Command sent"},error:{message:"Error sending Cancel Factory Reset command",action:{title:"Retry",onClick:()=>x()}}}),C(!1)}),[null===n||void 0===n?void 0:n.id,r,l]),f=(0,u.v9)((e=>e.device.pendingOperation)),b=null!==(t=null===n||void 0===n?void 0:n.name)&&void 0!==t?t:"This device";return c?(0,o.isUndefined)(h)?(0,p.jsx)(i.Z,{paddingY:2,children:(0,p.jsx)(Rn.Z,{})}):h?(0,p.jsx)(tN,{title:"Factory Reset to Change Device Mode Pending...",subtitle:(0,p.jsx)(m.Z,{spacing:1,children:(0,p.jsxs)(v.Z,{variant:"body2",children:["This device was in Shared Mode, but a configuration using Individual Mode was applied. Switching to Individual Mode requires a factory reset and re-enrollment."," ",(0,p.jsx)(i.Z,{component:"span",fontWeight:"bold",children:"To cancel the factory reset:"})," ","Save a configuration that uses Shared Mode."]})})}):(0,p.jsx)(tN,{title:"Factory Reset Command Pending...",subtitle:null!==n&&void 0!==n&&n.online?"".concat(b," will be factory reset soon. ").concat(b," no longer uses one of your ").concat(s," device licenses."):"".concat(b," is offline. It will be factory reset when it comes back online. This device no longer uses one of your ").concat(s," device licenses."),buttonText:"Cancel",submitting:g||!!f,onButtonClick:x}):null},iN=e=>{var t,n;let{device:o}=e;const r=(0,u.I0)(),{notifyThunkResult:l}=(0,ie.o)(),{documents:s}=(0,E.D)(S.F.OrganizationEnrollmentConfigs),d=(0,a.useMemo)((()=>s.find((e=>e.type===Di.QFB))),[s]),c=(0,a.useMemo)((()=>!0===(null===o||void 0===o?void 0:o.vendorMigrationPending)),[o]),[h,g]=(0,a.useState)(!1),C=(0,a.useCallback)((async()=>{if(null===o||void 0===o||!o.id)return;g(!0);const e=await r((0,La.qJ)({deviceIds:[o.id],action:"CANCEL_MIGRATE_TO_QFB"}));l({result:e,success:{message:"Cancel Migration to Meta Horizon managed services Command sent"},error:{message:"Error sending Cancel Migration to Meta Horizon managed services command",action:{title:"Retry",onClick:()=>C()}}}),g(!1)}),[null===o||void 0===o?void 0:o.id,r,l]),x=(0,u.v9)((e=>e.device.pendingOperation)),f=null!==(t=null===o||void 0===o?void 0:o.name)&&void 0!==t?t:"";if(!c)return null;const b=(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",children:null!==o&&void 0!==o&&o.online?"".concat(f," migration to Meta Horizon managed services is pending."):"".concat(f," is offline. Migration will proceed when it comes back online.")}),(0,p.jsxs)(v.Z,{variant:"subtitle2",children:["MHMS Org ID:"," ",(0,p.jsx)(i.Z,{component:"span",color:"text.secondary",children:null!==(n=null===d||void 0===d?void 0:d.vendorOrganizationId)&&void 0!==n?n:"Not set"})]})]});return(0,p.jsx)(tN,{icon:(0,p.jsx)(bI.Z,{sx:{fontSize:48,color:"primary.light"}}),title:"Migration to Meta Horizon managed services pending...",subtitle:b,buttonText:"Cancel",submitting:h||!!x,onButtonClick:C})},oN=(0,a.forwardRef)(((e,t)=>{let{tagRefs:n,popperOpen:i,handleSelectOpen:o}=e;return(0,p.jsx)(zi.W,{privilege:"devices",children:(0,p.jsxs)(fs.Z,{fullWidth:!0,children:[(0,p.jsx)(bs.Z,{sx:{whiteSpace:"nowrap",pointerEvents:"none"},children:"Tags"}),(0,p.jsx)(ys.Z,{label:"Tags",value:"",ref:t,size:"small",onOpen:o,open:i,displayEmpty:!0,renderValue:()=>(0,p.jsx)(sP,{tagRefs:n}),MenuProps:{sx:{display:"none"}},fullWidth:!0})]})})})),aN=()=>{const e=Ua((e=>e.requiresMxrRepair));return!e?null:(0,p.jsx)(m.Z,{spacing:2,children:e&&(0,p.jsx)(ZS,{})})},rN=()=>{var e;const t=(0,u.I0)(),{buildOrganizationPath:n}=(0,w.P)(),r=null!==(e=Ua((e=>e.name)))&&void 0!==e?e:"",l=Na(),s=Ua((e=>e)),d=Ua((e=>"COMPLETE"===e.factoryResetStatus)),c=Ua((e=>e.isQfbDevice)),h=Ua((e=>e.deviceGroupRef.id)),g=h&&n((e=>e.configurations.configuration),{configurationId:h}),{documents:C}=(0,E.D)(S.F.Configurations,{sort:ze.gt}),{documents:x}=(0,E.D)(S.F.Tags,{sort:ze.gt}),f=Ua((e=>e.tagRefs)),b=null===f||void 0===f?void 0:f.map((e=>e.id)),j=(0,a.useRef)(null),[Z,D]=(0,a.useState)(!1),M=(0,p.jsx)(Ul.z,{label:"Device Name",value:r,onChange:e=>{let{target:{value:n}}=e;t(Oa(La.i7.actions.deviceNameChanged({name:n})))},error:!r,privilege:"devices",fullWidth:!0,"data-testid":"device_nameInput"}),k=(0,p.jsx)(eN,{TextFieldProps:{placeholder:"i.e. where this device is stored, who it is assigned to and when it was purchased",sx:{"&, & .MuiOutlinedInput-root, & .MuiOutlinedInput-root textarea":{height:"100% !important"},paddingBottom:g?1.5:0}}}),I=Fa((e=>e)),A=I?(0,p.jsx)(zi.W,{privilege:"devices",placement:"right-start",children:(0,p.jsx)(Td.s,{options:C,value:
3I,onChange:(e,n)=>{t(Oa(La.i7.actions.deviceConfigurationChanged({configurationId:n.id})))},disabled:d,label:"Configuration",getOptionLabel:e=>e.name,renderIcon:()=>(0,p.jsx)(Wl.Z,{color:"action",sx:{fontSize:"1.5rem"}}),renderLabel:e=>(0,p.jsx)(Ui.G,{title:e?e.name:"",variant:"body1",color:"primary.main",fontWeight:"medium"}),testIdPrefix:"device_configurationSelect"})}):null,R=A&&g&&(0,p.jsxs)(m.Z,{spacing:.5,children:[A,g&&(0,p.jsxs)(i.Z,{sx:{paddingLeft:1},children:[(0,p.jsx)($L.Z,{sx:{color:y.DG.info[200],fontSize:"12px"}}),(0,p.jsx)(Kn.Z,{component:Xc,to:g,variant:"caption",children:"Go to configuration"})]})]});return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(nN,{device:s}),(0,p.jsx)(iN,{device:s}),(0,p.jsx)(uS.ZP,{container:!0,spacing:2,paddingBottom:2,children:d?(0,p.jsx)(uS.ZP,{item:!0,xs:12,children:(0,p.jsxs)(m.Z,{flexGrow:1,spacing:1.5,children:[M,k,c&&A]})}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(uS.ZP,{item:!0,lg:7,xs:12,children:(0,p.jsxs)(m.Z,{flexGrow:1,spacing:1.5,children:[M,(0,p.jsx)(oN,{ref:j,tagRefs:f,popperOpen:Z,handleSelectOpen:()=>{D(!0)}}),l&&(0,p.jsx)(gA,{orgTags:x,deviceTagIds:{[l]:(0,o.map)(f,"id")},open:Z,anchorEl:j.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:()=>{D(!1)},handleSingleTagChange:e=>{const n=b||[];(0,o.includes)(b,e)?(0,o.remove)(n,(t=>t===e)):n.push(e),t(Oa(La.i7.actions.deviceTagsChanged({newTagIds:(0,o.isEmpty)(n)||e===qi.ki.None?qi.ki.None:n})))}}),R]})}),(0,p.jsx)(uS.ZP,{item:!0,lg:5,xs:12,children:(0,p.jsx)(m.Z,{spacing:1.5,height:.9,children:k})})]})}),d&&c&&(0,p.jsx)(v.Z,{paddingBottom:2,children:"If you re-enroll this device, it will automatically be placed in the configuration above. If you want to assign it to a different configuration at enrollment, delete the device."}),!d&&(0,p.jsx)(aN,{})]})},lN=()=>{const e=iT(),{configuration:t}=DR(),{buildOrganizationPath:n}=(0,w.P)();return(0,p.jsx)(nL,{items:e,title:"Device Settings",titleTo:n((e=>e.configurations.configuration.settings),{configurationId:t.id}),configurationName:t.name})};lN.displayName="DeviceSettingSyncStatus";const sN=(0,a.memo)((e=>{let{deviceAlertsObject:t}=e;const{targetRuntimeSettings:n,device:i}=DR(),o=(0,X.bo)();return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(rN,{}),n?(0,p.jsxs)(m.Z,{children:[(o||i.id)&&(0,p.jsx)(gL,{deviceAlertsObject:t}),(0,p.jsxs)(m.Z,{spacing:8,children:[(0,p.jsx)(QL,{}),(0,p.jsx)(lN,{}),(0,p.jsx)(JL,{}),(0,p.jsx)(iL,{}),(0,p.jsx)(vL,{})]})]}):(0,p.jsxs)(m.Z,{paddingX:14,paddingTop:10,spacing:2,children:[(0,p.jsx)(Rn.Z,{}),(0,p.jsx)(v.Z,{variant:"body2",textAlign:"center",children:"Loading Configuration..."})]})]})}));sN.displayName="DeviceTabConfiguration";var dN=n(45558);const cN="device-map",uN=(0,a.memo)((e=>{let{location:t}=e;const n=(0,a.useRef)();(0,a.useLayoutEffect)((()=>{if(null===t||void 0===t||!t.geo)return;n.current||(n.current=zD().map(cN,WD),VD(n.current));const{latitude:e,longitude:i}=t.geo,o=zD().marker([e,i]);return n.current.setView([e,i],11),o.addTo(n.current),()=>{o.remove()}}),[null===t||void 0===t?void 0:t.geo]);const o=(null===t||void 0===t?void 0:t.geo)&&(0,Vr.oP)(null===t||void 0===t?void 0:t.geoProvider),r=(null===t||void 0===t?void 0:t.geo)&&(null===t||void 0===t?void 0:t.geoProvider)===bi.NN.GPS,l=(null===t||void 0===t?void 0:t.geo)&&(null===t||void 0===t?void 0:t.geoProvider)===bi.NN.NETWORK;return(0,p.jsxs)(i.Z,{flex:"0 0 max(40%, ".concat(277,"px)"),children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,children:[(0,p.jsx)(v.Z,{sx:{color:"text.primary"},variant:"body1",children:t?"".concat(t.city,", ").concat(t.region,", ").concat(t.country):"Unknown"}),(0,p.jsx)(v.Z,{variant:"caption",sx:{color:"text.secondary"},children:"at last sync"})]}),(0,p.jsx)(i.Z,{id:cN,height:277,width:1,borderRadius:1,marginTop:1.5,display:null!==t&&void 0!==t&&t.geo?"block":"none"}),!(null!==t&&void 0!==t&&t.geo)&&(0,p.jsx)(Me.Z,{sx:{height:277,width:"100%",borderRadius:1,marginTop:1,backgroundColor:"grey.100",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,p.jsx)(v.Z,{color:"textSecondary",children:"Location Unknown"})}),r&&(0,p.jsx)(i.Z,{marginTop:.5,children:(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",marginTop:.5,children:"High accuracy (GPS) - This device uses GPS-based location tracking"})}),l&&(0,p.jsx)(i.Z,{marginTop:.5,children:(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",marginTop:.5,children:"High accuracy (Network) - This device uses network-based location tracking"})}),o&&(0,p.jsxs)(i.Z,{marginTop:.5,children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",marginTop:.5,children:"Low accuracy - This device uses IP-based location tracking"}
3),(0,p.jsx)(i.Z,{marginLeft:.5,display:"inline-flex",sx:{transform:"translateY(1px)"},children:(0,p.jsx)(ci,{helpText:"Device tracking is based on IP geolocation. VPNs and proxy servers may interfere with reporting accuracy.",url:"https://help.managexr.com/en/articles/6848864-troubleshooting-my-device-is-reporting-its-location-incorrectly-in-managexr"})})]})]})}));uN.displayName="DeviceMap";const pN=e=>{let{startIcon:t,titleIcon:n,titleText:o,children:r,sx:l={},testId:s}=e;const d=!(!n&&!o),c=(0,De.Z)(),u=(0,a.useRef)(null),[h,g]=(0,a.useState)("0");return(0,a.useLayoutEffect)((()=>{if(!u.current)return;const e=getComputedStyle(u.current);e&&g(e.paddingLeft)}),[u]),(0,p.jsx)(i.Z,{display:"flex",flex:"1 0 0",padding:3,ref:u,sx:{backgroundColor:c.palette.grey[100],borderRadius:1.5,...l},className:"deviceStatusContainer","data-testid":s,children:(0,p.jsxs)(m.Z,{direction:"row",width:1,children:[t&&(0,p.jsx)(i.Z,{paddingRight:h,children:t}),(0,p.jsxs)(m.Z,{width:1,height:1,children:[d&&(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",marginBottom:r?2:0,spacing:1,children:[n&&(0,p.jsx)(i.Z,{width:26,height:26,children:n}),o&&(0,p.jsx)(v.Z,{variant:"body1",color:"text.primary",children:o})]}),r]})]})})},hN={usageStats:"App Usage Stats",...Bd},mN=()=>{const{device:e,deviceStatus:t}=DR(),{documents:n}=(0,E.D)(S.F.Configurations),i=(0,Le.ye)("enableStreamingPromptPermission"),{hasAndroidDataPermission:r,hasAndroidObbPermission:l}=t||{},s=null===e||void 0===e?void 0:e.usageStatsPermission,d=null===e||void 0===e?void 0:e.skipStreamingPromptPermission,c=(0,a.useMemo)((()=>{const t={androidObb:{title:hN.androidObb,hasPermission:!!l},usageStats:{title:hN.usageStats,hasPermission:!!s}};return i&&(t.skipStreamingPrompt={title:hN.skipStreamingPrompt,hasPermission:!!d}),(0,o.some)(n,(e=>tc(e.fileRefs,"androidData")))&&(t.androidData={title:hN.androidData,hasPermission:!!r}),(0,o.pickBy)(t,((t,n)=>{const i=n;return"usageStats"===i?"Oculus"===e.manufacturer:nc(e.model,i)||ic(e.osVersion,i)}))}),[n,e.manufacturer,e.model,e.osVersion,r,l,s,d,i]);return(0,o.isEmpty)(c)?null:(0,p.jsx)(pN,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"text.secondary"},children:"Android Permissions"}),(0,p.jsx)(ci,{url:Be.IW.android12Permissions,helpText:"You may need to grant ManageXR these permissions for specific functionality on this device."})]}),(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",gap:2,children:(0,o.map)(c,(e=>e?(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[e.title===Bd.androidData?(0,p.jsx)(Fi._,{tooltipText:"This permission is deprecated. This device does not permit MDMs to deploy files to Android/data. Choose another location for file deployment.",children:(0,p.jsx)(me.Z,{sx:{transform:"translateY(-1px)"},color:"warning"})}):e.hasPermission?(0,p.jsx)(Vi.Z,{sx:{transform:"translateY(-1px)"}}):(0,p.jsx)(bu.Z,{sx:{transform:"translateY(-1px)"}}),(0,p.jsxs)(v.Z,{noWrap:!0,children:[e.title," Permission"]})]},e.title):null))})]})})},gN="MuiLinearProgress",vN={bar:"".concat(gN,"-barColorPrimary"),barColorPrimary:"".concat(gN,"-bar")},CN=(0,Kc.ZP)(Rn.Z)((e=>{let{theme:t}=e;return{height:8,borderRadius:2,backgroundColor:t.palette.grey[300],["& .".concat(vN.bar)]:{backgroundColor:t.palette.primary.light},["& .".concat(vN.barColorPrimary)]:{borderRadius:2}}})),xN=(0,a.memo)((e=>{let{LinearProgressProps:t,title:n,currentValue:i,maxValue:o,units:a,warningMessage:r}=e;const l=i>o?100:100*i/o,s=a?"".concat(i," ").concat(a,"/ ").concat(o," ").concat(a):"".concat(i,"/ ").concat(o),d=n?"space-between":"flex-end";return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:d,width:1,marginBottom:1,sx:{"& .MuiTypography-root":{color:"text.secondary"}},children:[n&&(0,p.jsx)(v.Z,{variant:"body1",children:n}),(0,p.jsx)(v.Z,{variant:"body1",children:s})]}),(0,p.jsx)(CN,{color:"primary",variant:"determinate",...t,value:l}),r&&(0,p.jsx)(v.Z,{variant:"subtitle2",color:"warning.main",children:r})]})})),fN=(0,a.memo)((e=>{let{items:t}=e;return(0,p.jsx)(p.Fragment,{children:!(0,o.isEmpty)(t)&&(0,p.jsx)(pN,{sx:{paddingY:5,paddingRight:5,minWidth:400},startIcon:(0,p.jsx)(SC.Z,{}),children:(0,p.jsx)(m.Z,{spacing:3,children:(0,o.map)(t,((e,t)=>
3(0,p.jsx)(xN,{...e},t)))})})})})),bN=e=>{let{title:t,statStartIcon:n,statStartIconColor:i,statEndUIInfoTooltipText:r,stat:l,sx:s,constrained:d=!1,children:c,warning:u,useTooltipForStat:h=!1}=e;const g=(0,a.useMemo)((()=>(0,o.isNil)(l)||"-"===l||"Unknown"===l?"text.secondary":"text.primary"),[l]);return(0,p.jsxs)(m.Z,{className:"deviceTitleStat",sx:s,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(v.Z,{marginBottom:1,variant:"body2",sx:{color:"text.secondary"},noWrap:!0,children:t}),r&&(0,p.jsx)(ee.Z,{title:r,placement:"bottom",children:(0,p.jsx)(cc.Z,{fontSize:"small",sx:{color:"text.secondary",marginBottom:1,marginLeft:.5}})})]}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[n&&(0,p.jsx)(n,{fontSize:"small",color:i}),c,d&&l?(0,p.jsx)(Ui.G,{color:g,title:null!==l&&void 0!==l?l:"",useTooltip:h,noWrap:!0}):(0,p.jsx)(v.Z,{color:g,sx:{width:"fit-content"},noWrap:!0,children:null!==l&&void 0!==l?l:""})]}),u&&(0,p.jsx)(Fi._,{tooltipText:u.onHoverMessage,children:(0,p.jsx)(m.Z,{marginTop:1,sx:{"&:hover":{cursor:"pointer"}},children:(0,p.jsx)(ui.Q,{iconProps:{fontSize:"small"},children:(0,p.jsx)(v.Z,{variant:"body2",color:y.DG.warning[300],paddingBottom:0,children:u.visibleMessage})})})})]})},yN=e=>(0,p.jsx)($n.Z,{...e,viewBox:"2 2 21 21",children:(0,p.jsx)("path",{d:"M1 8.99977L3 10.9998C7.97 6.02977 16.03 6.02977 21 10.9998L23 8.99977C16.93 2.92977 7.08 2.92977 1 8.99977ZM9 16.9998L12 19.9998L15 16.9998C13.35 15.3398 10.66 15.3398 9 16.9998ZM5 12.9998L7 14.9998C9.76 12.2398 14.24 12.2398 17 14.9998L19 12.9998C15.14 9.13977 8.87 9.13977 5 12.9998Z",fill:"#BBB9C0"})}),jN=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"2 2 21 21",children:[(0,p.jsx)("path",{d:"M1 8.99977L3 10.9998C7.97 6.02977 16.03 6.02977 21 10.9998L23 8.99977C16.93 2.92977 7.08 2.92977 1 8.99977ZM9 16.9998L12 19.9998L15 16.9998C13.35 15.3398 10.66 15.3398 9 16.9998ZM5 12.9998L7 14.9998C9.76 12.2398 14.24 12.2398 17 14.9998L19 12.9998C15.14 9.13977 8.87 9.13977 5 12.9998Z",fill:"#BBB9C0"}),(0,p.jsx)("path",{d:"M12 19.895L9 16.895C10.66 15.235 13.35 15.235 15 16.895L12 19.895Z",fill:"#5E5B67"})]}),ZN=e=>(0,p.jsxs)($n.Z,{...e,viewBox:"2 2 21 21",children:[(0,p.jsx)("path",{d:"M1 8.99977L3 10.9998C7.97 6.02977 16.03 6.02977 21 10.9998L23 8.99977C16.93 2.92977 7.08 2.92977 1 8.99977ZM9 16.9998L12 19.9998L15 16.9998C13.35 15.3398 10.66 15.3398 9 16.9998ZM5 12.9998L7 14.9998C9.76 12.2398 14.24 12.2398 17 14.9998L19 12.9998C15.14 9.13977 8.87 9.13977 5 12.9998Z",fill:"#BBB9C0"}),(0,p.jsx)("path",{d:"M9 16.895L12 19.895L15 16.895C13.35 15.235 10.66 15.235 9 16.895ZM5 12.895L7 14.895C9.76 12.135 14.24 12.135 17 14.895L19 12.895C15.14 9.035 8.87 9.035 5 12.895Z",fill:"#5E5B67"})]}),wN=e=>(0,p.jsx)($n.Z,{...e,viewBox:"2 2 21 21",children:(0,p.jsx)("path",{d:"M1 8.99977L3 10.9998C7.97 6.02977 16.03 6.02977 21 10.9998L23 8.99977C16.93 2.92977 7.08 2.92977 1 8.99977ZM9 16.9998L12 19.9998L15 16.9998C13.35 15.3398 10.66 15.3398 9 16.9998ZM5 12.9998L7 14.9998C9.76 12.2398 14.24 12.2398 17 14.9998L19 12.9998C15.14 9.13977 8.87 9.13977 5 12.9998Z",fill:"#5E5B67"})}),EN=(0,a.memo)((e=>{let{connectedWifiNetwork:t,SvgIconProps:n}=e;const o=(0,Vr.eY)(t),a={[bi.o1.NO_CONNECTION]:yN,[bi.o1.WEAK_CONNECTION]:jN,[bi.o1.OKAY_CONNECTION]:ZN,[bi.o1.STRONG_CONNECTION]:wN},r={[bi.o1.NO_CONNECTION]:"No Connection",[bi.o1.WEAK_CONNECTION]:"Weak",[bi.o1.OKAY_CONNECTION]:"Okay",[bi.o1.STRONG_CONNECTION]:"Strong"},l=a[o];return(0,p.jsx)(ee.Z,{title:r[o],children:(0,p.jsx)(i.Z,{children:(0,p.jsx)(l,{...n})})})})),SN=(0,a.memo)((e=>{var t,n;let{connectedWifiNetwork:i}=e;const o=(0,d.EM)(),a=Math.max(null!==(t=null===i||void 0===i?void 0:i.linkSpeed)&&void 0!==t?t:0,0),r=Math.max(null!==(n=null===i||void 0===i?void 0:i.averageDownloadSpeed)&&void 0!==n?n:0,0),l=null===i||void 0===i?void 0:i.ssid,s=l&&a?"".concat(a," Mbit/s"):"-",c=l&&r?"".concat(r," Mbit/s"):"-";return(0,p.jsx)(pN,{startIcon:(0,p.jsx)(EN,{connectedWifiNetwork:i}),sx:{paddingRight:5,minWidth:400},children:(0,p.jsx)(m.Z,{height:1,justifyContent:"center",children:(0,p.jsxs)(m.Z,{direction:"row",sx:{"& .deviceTitleStat":{flexGrow:1}},spacing:1.5,alignItems:"center",justifyContent:"center",children:[!
3o&&(0,p.jsx)(bN,{title:"Wi-Fi Network",stat:l||"-",constrained:!0,useTooltipForStat:!0}),(0,p.jsx)(bN,{title:"Link Speed",stat:s,statEndUIInfoTooltipText:"Link speed is the maximum rate at which data can be transmitted over \n your Wi-Fi network between your device and the Wi-Fi router."}),(0,p.jsx)(bN,{title:"Download Speed",stat:c,statEndUIInfoTooltipText:"Download speed is the actual rate at which data was downloaded from the internet to your \n device during its last download on this network. \n This is often lower than link speed due to various factors like network congestion and internet plan limits."})]})})})})),DN=(0,a.memo)((e=>{var t,n;let{availableStorage:a,totalStorage:r,ram:l,model:s,mac:c,serial:u,controllerData:h,connectedWifiNetwork:g,location:C,firmwareDisplayVersion:x,firmwareVersion:f,osVersion:b,manufacturer:y,registerDate:j,lastEnrollmentDate:Z,lastEnrollmentMethod:w}=e;const E=(0,d.EM)(),{horizonOsVersion:S}=(0,Vr.aE)({manufacturer:y,firmwareVersion:f}),D=!(!S&&!x),k=[];if((0,o.isNumber)(a)&&(0,o.isNumber)(r)){const e=(0,o.toNumber)(Ce(a)),t=(0,o.toNumber)(Ce(r));k.push({title:"Storage Space",units:"GB",currentValue:t-e,maxValue:t,warningMessage:a<Math.pow(1024,3)?"Devices with low storage may not be able to sync apps or files":void 0})}if(l&&(0,o.isNumber)(l.availableRam)&&(0,o.isNumber)(l.totalRam)){const e=(0,o.toNumber)(Ce(l.availableRam)),t=(0,o.toNumber)(Ce(l.totalRam));k.push({title:"RAM",units:"GB",currentValue:(0,o.round)(t-e,1),maxValue:t})}const I=!(0,o.isEmpty)(k),A=s&&bi.uD.has(s)?{visibleMessage:"Not supported",onHoverMessage:"".concat((0,Vr.ao)(s)," devices are not supported by ManageXR. Some features like Kiosk Mode, the ManageXR Home Screen, and device settings may not work as intended.")}:void 0,R=[{title:"Device Type",stat:(0,Vr.ao)(s),statStartIcon:(0,Vr.Xj)(s),warning:A},{title:"Serial Number",stat:u}];c&&!E&&R.push({title:"MAC Address",stat:(0,Vr.wo)(c)});const T=kR();if(f){var P;const e=(0,p.jsx)(Fi._,{tooltipContent:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",children:"Firmware Hold Active"}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.primary",children:[T," ",(0,p.jsx)(li.Q,{href:Be.IW.firmwareHoldMetaDevices,target:"_blank",fontSize:"inherit",display:"inline",children:"Learn More"})]})]}),TooltipProps:{placement:"left",disableInteractive:!1},children:(0,p.jsx)(vT.Z,{sx:{color:"info.main",marginRight:.5}})}),t=null!==(P=(0,Vr.xQ)({firmwareDisplayVersion:x,manufacturer:y,firmwareVersion:f}))&&void 0!==P?P:f,n=D?(0,p.jsx)(aR,{firmwareVersion:null!==f&&void 0!==f?f:"Unknown",releaseNotesUrl:Be.IW.metaHorizonOsReleaseNotes,children:(0,p.jsx)(v.Z,{color:"text.primary",sx:{width:"fit-content",cursor:"default"},noWrap:!0,children:t})}):null;R.push({title:"Firmware Version",...T||n?{children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[T&&e,null!==n&&void 0!==n?n:t]})}:{stat:f}})}if(b&&R.push({title:"Android Version",stat:b}),h&&(null!==(t=h.controller0)&&void 0!==t&&t.version||null!==(n=h.controller1)&&void 0!==n&&n.version)){var L,N,U,F;const e=[...(0,Vr.CA)(s)?[{version:(null===(L=h.controller0)||void 0===L?void 0:L.version)||(null===(N=h.controller1)||void 0===N?void 0:N.version)}]:[{label:"L",version:null===(U=h.controller0)||void 0===U?void 0:U.version},{label:"R",version:null===(F=h.controller1)||void 0===F?void 0:F.version}]];R.push({title:"Controller Version",children:(0,p.jsx)(m.Z,{direction:"row",spacing:1,children:(0,o.map)(e,(e=>(0,p.jsxs)(v.Z,{noWrap:!0,children:[(0,p.jsx)(i.Z,{component:"span",color:"text.secondary",children:e.label?"".concat(e.label," "):""}),e.version?e.version:"--"]},e.label)))})})}return(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",gap:1,alignItems:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1,flexGrow:1,children:[(0,p.jsx)(SN,{connectedWifiNetwork:g}),I&&(0,p.jsx)(fN,{items:k}),!E&&(0,p.jsx)(pN,{sx:{paddingY:5,paddingRight:5,minWidth:515},startIcon:(0,p.jsx)(dN.Z,{}),children:(0,p.jsx)(uN,{location:C}
3)})]}),(0,p.jsxs)(m.Z,{spacing:1,flexGrow:1,flexShrink:0,flexBasis:0,justifyContent:"flex-start",children:[(0,p.jsx)(pN,{sx:{paddingTop:2.5,paddingBottom:4,height:"fit-content"},children:(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",gap:3,children:(0,o.map)(R,(e=>(0,p.jsx)(bN,{...e,sx:{flexBasis:e=>"calc(50% - ".concat(e.spacing(1.5),")"),flexGrow:1}},e.title)))})}),j&&(0,p.jsx)(pN,{sx:{paddingTop:2.5},children:(0,p.jsxs)(m.Z,{direction:"column",flexWrap:"wrap",gap:3,children:[(0,p.jsx)(bN,{title:"Enrollment Date",statEndUIInfoTooltipText:"Enrollment date and method are from the device's most recent enrollment in ManageXR. For full device history, visit the Activity Log.",children:(0,p.jsx)(v.Z,{sx:{color:"text.primary"},noWrap:!0,children:(0,M.ax)(null!==Z&&void 0!==Z?Z:j)})}),(0,p.jsx)(bN,{title:"Enrollment Method",children:(0,p.jsx)(v.Z,{sx:{color:"text.primary"},noWrap:!0,children:w?bi.HO[w]:bi.Gt})})]})}),(0,p.jsx)(mN,{})]})]})})),MN=e=>{let{title:t,stat:n}=e;const i=(0,a.useMemo)((()=>n&&"Unknown"!==n&&"-"!==n?"text.primary":"text.secondary"),[n]);return(0,p.jsxs)(m.Z,{className:"batteryStatus",justifyContent:"space-between",direction:"row",children:[(0,p.jsx)(v.Z,{variant:"body2",color:i,children:t}),(0,p.jsx)(v.Z,{color:i,variant:"body2",children:n})]})},kN=(0,a.memo)((e=>{var t,n,i,a;let{batteryLevel:r,batteryIsCharging:l,controllerData:s,model:d,manufacturer:c,online:u}=e;const h=bi.oh.has(d),g=l&&u?" (charging)":"";return(0,p.jsx)(pN,{titleText:"Battery",titleIcon:(0,p.jsx)(NM,{noTooltip:(0,o.isNumber)(r),batteryPercent:r,showCharging:l&&u,orientation:"vertical"}),sx:{minWidth:220},children:(0,p.jsxs)(m.Z,{sx:{"& .batteryStatus:not(:last-child)":{marginBottom:.3}},children:[(0,p.jsx)(MN,{title:h?"Tablet":"Headset",stat:r?"".concat(r,"%").concat(g):"-"}),!h&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(MN,{title:(0,Vr.$G)(d)?"Controller ":"Controller L",stat:(0,Vr.W7)(null===s||void 0===s||null===(t=s.controller0)||void 0===t?void 0:t.batteryLevel)?"".concat(null===s||void 0===s||null===(n=s.controller0)||void 0===n?void 0:n.batteryLevel,"%"):"-"}),!(0,Vr.$G)(d)&&(0,p.jsx)(MN,{title:"Controller R",stat:(0,Vr.W7)(null===s||void 0===s||null===(i=s.controller1)||void 0===i?void 0:i.batteryLevel)?"".concat(null===s||void 0===s||null===(a=s.controller1)||void 0===a?void 0:a.batteryLevel,"%"):"-"})]})]})})}));var IN=n(72507),AN=n(74075);const RN=(0,a.memo)((e=>{let{id:t,online:n,currentForegroundApp:o,lastUpdated:a,homeScreenState:r,manufacturer:l,firmwareVersion:s}=e;const d=n&&!1===(null===o||void 0===o?void 0:o.hmdOnUser),c=fM({online:n,currentForegroundApp:o,lastUpdated:a,homeScreenState:r}),u=n&&!!c.iconUrl||!!d;return(0,p.jsx)(pN,{titleIcon:(0,p.jsx)(IN.Z,{color:n?"success":"disabled"}),titleText:c.title,sx:{minWidth:220},testId:"deviceStatusItem_connection",children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"stretch",position:"relative",spacing:.25,children:[u&&(0,p.jsx)(m.Z,{width:64,alignItems:"center",justifyContent:"center",children:d?(0,p.jsx)(i.Z,{paddingY:.6,children:(0,p.jsx)(AN.Z,{color:"secondary",sx:{transform:"rotate(-22deg)"}})}):(0,p.jsx)(re.Z,{src:c.iconUrl,variant:"rounded"})}),(0,p.jsx)(Ui.G,{variant:"body2",title:c.description,whiteSpace:"normal",maxHeight:"3em"})]})})})),TN=(0,a.memo)((e=>{let{lastUpdated:t,online:n,outOfDate:i,statusHasError:o,updating:a,id:r,pauseUpdates:l}=e;const s=(0,Vr.Dd)({updating:a,online:n,outOfDate:i,statusHasError:o}),d=(0,De.Z)(),{buildOrganizationPath:c}=(0,w.P)(),u={success:"Up to date",warning:"Out of Date",pending:"Updating...",error:"Update Error"}[s],h=lD(t),m=(0,p.jsxs)(pN,{titleText:u,titleIcon:(0,p.jsx)(mT,{CircularProgressProps:{size:"20px"},online:n,outOfDate:i,statusHasError:o,updating:a}),sx:{minWidth:220},children:[(0,p.jsx)(Ui.G,{variant:"body2",title:"Last synced ".concat(null!==h&&void 0!==h?h:"never")}),l&&(0,p.jsx)(GP,{id:r,pauseUpdates:!0,sx:{marginTop:2}})]});return r?(0,p.jsx)(Kn.Z,{component:Qc,to:c((e=>e.devices.device.configuration),{deviceId:r}),sx:{"&:hover .deviceStatusContainer":{backgroundColor:d.palette.grey[200]},color:"unset"},children:m}):m})),PN=e=>{let{children:t,title:n}=e;return(0,p.jsxs)(m.Z,{className:"deviceTabDetailSection",children:[(0,p.jsx)(v.Z,{color:"primary",variant:"subtitle2",marginBottom:1,children:n}),t]})},LN=(0,a.memo)((e=>{let{deviceAlertsObject:t}=e;const n=Na(),i=(0,z.l)(S.F.Devices,n),r=(0,d.kV)(),l=(0,X.bo)(),s=r.numTotalDeviceLicenses,c=(0,a.useMemo)((()=>"COMPLETE"===(null===i||void 0===i?void 0:i.factoryResetStatus)),[i]),u=LI(i);return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(rN,{}),(0,p.jsxs)(m.Z,{spacing:1,sx:{"& .deviceTabDetailSection:not(:last-child)":{marginBottom:2}},children:[(l||n&&!c)&&(0,p.jsx)(gL,{deviceAlertsObject:t}),(0,p.jsx)(PN,{title:"Status",children:(0,p.jsx)(m.Z,{direction:"row",gap:1,flexWrap:"wrap",children:c?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(pN,{children:(0,p.jsx)(bN,{title:"Device Type",stat:(0,Vr.ao)(null===i||void 0===i?void 0:i.model),statStartIcon:(0,Vr.Xj)(null===i||void 0===i?void 0:i.model)})}),(0,p.jsx)(pN,{children:(0,p.jsx)(bN,{title:"Serial Number",stat:(null===i||void 0===i?void 0:i.serial)||"Unknown"})}),(0,p.jsxs)(pN,{sx:{display:"flex",alignItems:"center",flexBasis:"20%"},children:[(0,p.jsx)(bN,{title:"Factory Reset",stat:null!==i&&void 0!==i&&i.lastUpdated?"Factory Reset on "+(0,M.ax)(i.lastUpdated):""}),(0,p.jsxs)(v.Z,{variant:"body2",color:"GrayText",children:["This device no longer uses one of your ",s," ","device licenses. You will need to reinstall ManageXR on the device to bring it back under management.\xa0",(0,p.jsx)(Kn.Z,{href:"https://help.managexr.com/en/articles/5417073-factory-resetting-a-device",target:"_blank",rel:"noreferrer noopener",children:(0,p.jsx)(si.Z,{style:{fontSize:16,transform:"translateY(3px)"}})})]})]})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(RN,{...(0,o.pick)(i,["id","online","currentForegroundApp","lastUpdated","manufacturer","firmwareVersion"]),homeScreenState:u}),(0,p.jsx)(TN,{...(0,o.pick)(i,["lastUpdated","updating","online","outOfDate","statusHasError","id","pauseUpdates"])}),(0,p.jsx)(kN,{...(0,o.pick)(i,["batteryLevel","batteryIsCharging","controllerData","model","manufacturer","online"])})]})})}),i&&!c&&(0,p.jsx)(PN,{title:"Device Information",children:(0,p.jsx)(DN,{...(0,o.pick)(i,["availableStorage","totalStorage","ram","model","mac","serial","controllerData","connectedWifiNetwork","location","firmwareDisplayVersion","firmwareVersion","osVersion","manufacturer","registerDate","lastEnrollmentDate","lastEnrollmentMethod"])})})]})]})})),NN=e=>{var t;const n=(0,z.l)(S.F.DeviceInstalledApps,e),i=(0,o.find)(n,((e,t)=>(0,Vs.kM)(t)));return null!==(t=null===i||void 0===i?void 0:i.versionCode)&&void 0!==t?t:0};var UN=n(5542);const FN=e=>{let{row:t,belowMinimumVersion:n,versionGateReady:r,hasDevicesPrivilege:l,deviceFiles:s,pendingDeletions:d}=e;const c=Ua((e=>e.id)),u=Fa((e=>e.fileRefs)),{table:h}=ox(),{allQueuedCommands:m}=AP(),g=(0,Fe.pv)({method:"post",path:"devices/:deviceId/fileSystem/delete"}),C=RP(),{notify:f}=(0,ie.o)(),[b,y]=(0,a.useState)(),j=t.original;if(j.itemId===Od.Pm||!(e=>"deviceFile"===e.itemType||"folder"===e.itemType)(j))return null;if(!r)return null;const Z=(0,Od.kQ)(j,d),w=Z?null===d||void 0===d?void 0:d[Z]:void 0,E=null===w||void 0===w?void 0:w.commandId;if(E&&!l)return null;const S=!!w&&(0,o.some)(m,{id:w.commandId,status:"QUEUED"}),D=S||!!w&&Date.now()-w.requestedAt>
3=6e5,M=(0,Od.BZ)(j),k=(0,Od.GK)(j,u,s),I=(0,o.map)(h.getSelectedRowModel().flatRows,"original"),A=t.getIsSelected()&&I.length>1?I:[j],R=A.length>500,T=E?D?"Cancel delete":"Deleting on the device":l?n?"Update this device to the latest version of ManageXR in order to delete files.":M?"Delete disabled for this folder":k?"This file is part of this device's configuration. Delete the file from the configuration and sync the device to remove it.":R?"Select ".concat(500," items or fewer to delete"):"Delete":"Devices privilege required to delete files",{folderCount:P,fileCount:L}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Set;let i=0;return(0,o.forEach)(e,(e=>{"folder"===e.itemType?(n.add(e.directory),(0,o.forEach)(t,((t,o)=>{(0,Od.LO)(o,e.directory)&&(n.add(o),i+=t.length)}))):i+=1})),{folderCount:n.size,fileCount:i}}(null!==b&&void 0!==b?b:[],s),N=(0,o.map)(b,Od.Of);return(0,p.jsxs)(i.Z,{onClick:e=>e.stopPropagation(),sx:{position:"absolute",right:6,top:0,bottom:0,display:"flex",zIndex:1},alignItems:"center",children:[(0,p.jsx)(ee.Z,{title:T,children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{className:xC,size:"small",disabled:E?!D:!l||n||k||R,onClick:E?()=>{c&&E&&C.request({params:{deviceId:c,commandId:E},errorMessage:"Failed to cancel the delete files command",onSuccess:e=>{let{canceled:t}=e;!t&&S&&f({message:qu,severity:"warning"})}})}:()=>y(A),children:E?(0,p.jsx)(UN.Z,{fontSize:"small"}):(0,p.jsx)(Gl.Z,{fontSize:"small"})})})}),(0,p.jsx)(Fn,{open:!!b,onClose:()=>!g.pending&&y(void 0),onConfirm:()=>{c&&b&&g.request({params:{deviceId:c},data:{paths:N},successMessage:"Delete files command sent",errorMessage:"Failed to send the delete files command",onSuccess:()=>y(void 0)})},title:"Delete Files",message:"Deleting ".concat((0,ul.Yv)((0,o.compact)([P&&(0,ul.sr)(P,"folder"),L&&(0,ul.sr)(L,"file")]))),content:(0,p.jsxs)(i.Z,{sx:{marginTop:1},children:[(0,o.map)((0,o.take)(N,20),(e=>(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:e},e))),N.length>20&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["and ",N.length-20," more"]})]}),pending:g.pending})]})},ON=()=>{const e=Na(),t=(0,z.l)(S.F.Devices,e),n=(0,z.l)(S.F.DeviceFileSystems,null===t||void 0===t?void 0:t.userId),i=(0,xo.ty)(S.F.DeviceFileSystems,null===t||void 0===t?void 0:t.userId),o=(0,Le.ye)("enableDeviceFileDeleti
3on"),r=(0,w.P)().hasRequiredPrivilege("devices"),l=(0,xo.ty)(S.F.DeviceInstalledApps,null===t||void 0===t?void 0:t.userId),s=NN(null===t||void 0===t?void 0:t.userId)<(0,Le.sF)(),d=!(null!==t&&void 0!==t&&t.userId)||l,[c,u]=(0,a.useState)(""),h=(0,a.useMemo)((()=>(0,Od.R$)({deviceFilesByDirectory:null===n||void 0===n?void 0:n.files,filesFilter:c})),[null===n||void 0===n?void 0:n.files,c]),m=(0,a.useMemo)((()=>["date"]),[]),g=null===n||void 0===n?void 0:n.pendingDeletions,C=(0,a.useCallback)((e=>(0,Od.NJ)(e,g)),[g]),x=Fa((e=>e.fileRefs)),f=r&&!s&&d,b=(0,a.useCallback)((e=>f&&("deviceFile"===e.itemType||"folder"===e.itemType)&&e.itemId!==Od.Pm&&!(0,Od.GK)(e,x,null===n||void 0===n?void 0:n.files)&&!(0,Od.NJ)(e,g)),[f,null===n||void 0===n?void 0:n.files,x,g]),y=(0,a.useCallback)((e=>{const t=e.accessor((e=>"deviceFile"===e.itemType?e.updatedAt:0),{id:"last-modified",header:"Last Modified",size:186,cell:e=>{let{row:t}=e;return"deviceFile"===t.original.itemType?(0,p.jsx)(ee.Z,{title:(0,M.aH)(t.original.updatedAt),placement:"top",children:(0,p.jsx)(v.Z,{noWrap:!0,variant:"subtitle2",sx:{position:"relative",zIndex:1},children:(0,M.H4)(t.original.updatedAt)})}):null}}),i=e.display({id:"delete",size:40,cell:e=>{let{row:t}=e;return(0,p.jsx)(FN,{row:t,belowMinimumVersion:s,versionGateReady:d,hasDevicesPrivilege:r,deviceFiles:null===n||void 0===n?void 0:n.files,pendingDeletions:g})}});return o?[t,i]:t}),[s,o,null===n||void 0===n?void 0:n.files,r,g,d]);return i?(0,p.jsx)(ix,{tableId:"device-files",rootDirectory:h,filesFilter:c,disabledColumns:m,getExtraColumns:y,getIsItemPending:o?C:void 0,getIsItemSelectable:o?b:void 0,children:(0,p.jsx)(_N,{filesFilter:c,setFilesFilter:u})}):(0,p.jsx)(Rn.Z,{sx:{width:1}})},_N=e=>{let{filesFilter:t,setFilesFilter:n}=e;const o=(0,De.Z)(),{contentAreaHeight:a}=(0,ud.MS)(),{table:r,flexColumnIds:l}=ox();return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{height:110,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(xu,{value:t,onChange:n,TextFieldProps:{placeholder:"Filter by name or type"}})}),(0,p.jsx)(dx,{})]}),(0,p.jsxs)(m.Z,{direction:"row",paddingTop:1,paddingBottom:.25,spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Some files may not be visible"}),(0,p.jsx)(Fi._,{TooltipProps:{disableInteractive:!1},tooltipContent:(0,p.jsxs)(v.Z,{color:"text.secondary",variant:"body2",children:[(0,p.jsxs)("span",{children:["Devices running Android 12 or higher may not grant access for MDMs like ManageXR to read files from protected locations. This includes folders like Android/data."," "]}),(0,p.jsxs)(Kn.Z,{href:Be.IW.migrateFilesOutOfAndroidDataFAQ,target:"_blank",children:["Learn\xa0More\xa0",(0,p.jsx)(Mu.Z,{fontSize:"inherit",sx:{transform:"translateY(2px)"}})]})]}),children:(0,p.jsx)(cc.Z,{fontSize:"inherit",color:"action",sx:{transform:"translateY(1px)"}})})]}),(0,p.jsx)(eh.K,{table:r,flexColumnIds:l,sx:{paddingRight:"var(--scrollbarWidth)"}})]}),(0,p.jsx)(i.Z,{height:"calc(".concat(a," - ").concat(o.spacing(3)," - ").concat(110,"px)"),marginBottom:-3,children:(0,p.jsx)(rx,{virtualListStyle:{overflowY:"scroll"},emptyMessage:"The device has not reported its file data yet. Devices report file system data when they sync with ManageXR."})})]})};let zN,BN;!function(e){e.PENDING="PENDING",e.RECEIVED="RECEIVED",e.PROCESSING="PROCESSING",e.UPLOADING="UPLOADING",e.SUCCESS="SUCCESS",e.FAILURE="FAILURE"}(zN||(zN={})),function(e){e.WEB_CONSOLE="WEB_CONSOLE",e.HOME_SCREEN="HOME_SCREEN",e.DEVICE="DEVICE",e.AUTOMATIC="AUTOMATIC"}(BN||(BN={}));const WN="YYYY-MM-DD HH:mm",VN=()=>{const e=Na(),t=(0,z.l)(S.F.Devices,e),{documents:n,fetched:i}=(0,E.Dt)(S.F.DeviceLogs,e),r=NN(null===t||void 0===t?void 0:t.userId)<10787,{request:l}=(0,Fe.ji)({method:"post",path:"devices/:deviceUid/logs/:deviceLogId/get-download-url"}),[s,d]=(0,a.useState)({}),c=(0,a.useCallback)((e=>{null!==t&&void 0!==t&&t.userId&&(d((t=>({...t,[e]:!0}))),l({params:{deviceUid:t.userId,deviceLogId:e},onSuccess:e=>{let{downloadUrl:n}=e;(0,di.Sv)(n,"".concat(t.id,".zip"))},errorMessage:"Failed to download logs",onFinally:()=>{d((t=>({...t,[e]:!1})))}}))}),[null===t||void 0===t?void 0:t.id,null===t||void 0===t?void 0:t.userId,l]),u=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.accessor("logWindow",{id:"logWindow",header:"Log Window",size:320,cell:e=>{const t=e.getValue();return t?"".concat((0,M.i$)(t.start,WN)," - ").concat((0,M.i$)(t.end,WN)):(0,p.jsx)(v.Z,{variant:"inherit",color:"text.secondary",children:"Unknown"})}}),e.accessor("requestType",{id:"requestType",header:"Source",size:120,cell:e=>{const t=e.getValue();return"AUTOMATIC"===t?"Auto":(0,o.map)((0,o.split)(t,"_"),o.capitalize).join(" ")}}),e.accessor("status",{id:"status",header:"Status",size:100,cell:e=>(0,o.capitalize)(e.getValue())}),e.accessor("fileSize",{id:"fileSize",header:"Size",size:100,cell:e=>{const t=e.getValue();return t?(0,Ad.Z)(t):(0,p.jsx)(v.Z,{variant:"inherit",color:"text.secondary",children:"Unknown"})}}),e.accessor("requestedAt",{id:"requestedAt",header:"Requested",size:180,cell:e=>(0,M.i$)(e.getValue(),WN)}),e.accessor("uploadedAt",{id:"uploadedAt",header:"Uploaded",size:180,cell:e=>{const t=e.getValue();return t?(0,M.i$)(t,WN):(0,p.jsx)(v.Z,{variant:"inherit",color:"text.secondary",children:"Awaiting upload"})}}),e.display({id:"download",size:80,cell:e=>{const{id:t,status:n,storageUrl:i,errorMessage:o}=e.row.original;return(0,p.jsx)(ee.Z,{title:i?n===zN.FAILURE&&null!==o&&void 0!==o?o:"":"Waiting for logs",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{disabled:!i||n!==zN.SUCCESS||!!s[t],onClick:()=>c(e.row.original.id),children:(0,p.jsx)(wi.Z,{})})})})}})]}),[s,c]),h=(0,sa.b7)({columns:u,data:n,initialState:{sorting:[{id:"requestedAt",desc:!0}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),g=["id"],C=(0,a.useMemo)((()=>(0,o.sumBy)(u,"size")),[u]);
3return(0,p.jsx)(sh,{headerBackgroundSize:3,headerContent:(0,p.jsxs)(m.Z,{children:[r&&(0,p.jsx)(Iy.Z,{severity:"warning",sx:{marginBottom:2},children:"Device admin app version not high enough to support web console based log retrieval"}),(0,p.jsx)(eh.K,{table:h,flexColumnIds:g})]}),children:(0,p.jsx)(m.Z,{minWidth:C,children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,table:h,height:"window",loading:!i,emptyMessage:"No logs found",flexColumnIds:g,rowHeight:50})})})};var GN=n(95138);const HN=(0,a.memo)((()=>{var e;const t=(0,u.I0)(),{deviceId:n}=(0,l.UO)(),i=(0,z.l)(S.F.Devices,n),r=(0,xo.ty)(S.F.Devices,n),{buildOrganizationPath:s,privileges:d}=(0,w.P)(),c=(0,X.bo)(),h=c||d.content,m=$e(),g=!!(0,l.$B)({path:s((e=>e.devices.device.files),{deviceId:n}),exact:!0}),v="COMPLETE"===(null===i||void 0===i?void 0:i.factoryResetStatus);xd(S.F.Devices,n,s((e=>e.devices)));const C=Ua((e=>e.deviceGroupRef.id)),x=(0,u.v9)((e=>!!e.device.editingDevice));(0,a.useEffect)((()=>(t(La.i7.actions.deviceStartedEditing({deviceId:n})),()=>{t(La.i7.actions.deviceStoppedEditing())})),[t,n]);const f=(e=>{const{request:t}=(0,GN.k)(),[n,i]=(0,a.useState)(),[r,l]=(0,a.useState)(),[s,d]=(0,a.useState)(!0),[c,u]=(0,a.useState)(!1),p=(0,z.l)(S.F.DeviceStatuses,null===e||void 0===e?void 0:e.userId),[h,m]=(0,a.useState)(Date.now()),[g,v]=(0,a.useState)(null===e||void 0===e?void 0:e.batteryLevel),[C,x]=(0,a.useState)(null===e||void 0===e?void 0:e.lastUpdated),f=(0,a.useCallback)((()=>{m(Date.now()),d(!0)}),[]);return(0,a.useEffect)((()=>{const n=new AbortController;if(null!==e&&void 0!==e&&e.id)return t({params:{deviceId:e.id},onSuccess:e=>{let{deviceAlerts:t,orgAlerts:n}=e;i(t),l(n),u(!1),d(!1)},onError:t=>{(0,Si.yR)(t,{name:"api fetch device alerts",contexts:{args:{deviceId:e.id}}}),u(!0),d(!1)},controller:n}),()=>n.abort()}),[null===e||void 0===e?void 0:e.id,h,t]),(0,a.useEffect)((()=>{f()}),[null===p||void 0===p?void 0:p.updatedAt,f]),(0,a.useEffect)((()=>{const t=null===e||void 0===e?void 0:e.batteryLevel;(0,o.isUndefined)(t)||(0,o.isUndefined)(g)?(0,o.isUndefined)(t)||t<=30&&f():(g>30&&t<=30||g<=30&&t>30)&&f(),v(null===e||void 0===e?void 0:e.batteryLevel)}),[null===e||void 0===e?void 0:e.batteryLevel,g,f]),(0,a.useEffect)((()=>{(0,o.isUndefined)(C)&&!(0,o.isUndefined)(null===e||void 0===e?void 0:e.lastUpdated)&&f(),x(null===e||void 0===e?void 0:e.lastUpdated)}),[null===e||void 0===e?void 0:e.lastUpdated,C,f]),{deviceAlerts:n,filteredOrgAlerts:r,deviceAlertsLoading:s,deviceAlertsHasError:c,refreshDeviceAlerts:f}})(i),b=[...v?[]:[{path:s((e=>e.devices.device.configuration),{deviceId:n}),label:"Current Configuration",component:(0,p.jsx)(sN,{deviceAlertsObject:f})},...m?[{path:s((e=>e.devices.device.analytics),{deviceId:n}),label:"Analytics",component:(0,p.jsx)(KP,{})}]:[]],{path:s((e=>e.devices.device.device),{deviceId:n}),label:"Device Information",component:(0,p.jsx)(LN,{deviceAlertsObject:f})},...v?[]:[{path:s((e=>e.devices.device.apps),{deviceId:n}),label:"Installed Apps",component:(0,p.jsx)($P,{})},{path:s((e=>e.devices.device.files),{deviceId:n}),label:"File System",component:(0,p.jsx)(ON,{})}],...h?[{path:s((e=>e.devices.device.activityLog),{deviceId:n}),label:"Activity Log",component:(0,p.jsx)(tL,{})}]:[],...c?[{path:s((e=>e.devices.device.logs),{deviceId:n}),label:"Device Logs",component:(0,p.jsx)(VN,{})}]:[]];return(0,p.jsxs)(Mn.C,{toolbarBreadcrumbs:[{title:"Deploy",navCategory:!0},{title:"Devices",path:s((e=>e.devices))},{title:null!==(e=null===i||void 0===i?void 0:i.name)&&void 0!==e?e:""}],toolbarShowProgress:!r,noBottomPadding:!0,children:[(0,p.jsx)(dd,{hasChanges:x,path:s((e=>e.devices.device),{deviceId:n})}),r&&(0,p.jsx)(IP,{deviceId:n,children:(0,p.jsx)(vd,{sidebarContent:(0,p.jsx)(qP,{routeTabs:b}),noBottomPadding:g,noSidebarGutter:!0,sidebarWidths:{xs:310,lg:410},children:(0,p.jsx)(SR,{deviceId:n,configurationId:C,renderPlaceholder:(0,p.jsx)(Rn.Z,{sx:{marginY:2,marginX:1}}),children:(0,p.jsx)(sd,{routeTabs:b})})})})]})})),qN=(0,a.memo)((()=>(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{exact:!0,path:c._j.organization.devices.__path,children:(0,p.jsx)(jP,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.devices.device.__path,children:(0,p.jsx)(HN,{})})]}))),YN=()=>(0,Fe.pv)({method:"post",path:"files/get-download-url"});var KN=n(3425);const XN={configurations:"configurations",managedApps:"apps",releaseChannels:"release channels",organizationProfiles:"organizations"},QN=e=>{let{label:t,getLabel:n,emptyLabel:i,configurationRoute:a,children:r,...l}=e;const s=(0,o.pickBy)(l,(e=>!(0,o.isEmpty)(e)));let d=t;if(!t&&n){const e=(0,o.chain)(s).map(((e,t)=>
3XN[t])).uniq().value();d=n({and:(0,ul.Yv)(e),or:(0,ul.mt)(e)})}return(0,o.isEmpty)(s)?i?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:i}):null:(0,p.jsxs)(m.Z,{children:[d&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:d}),(0,p.jsx)(ii.Z,{dense:!0,children:(0,o.map)(s,((e,t)=>(0,o.map)(e,(e=>{const n=e;return(0,p.jsx)(JN,{type:t,document:n,configurationRoute:a},n.id)}))))})]})},JN=e=>{let{type:t,document:n,configurationRoute:i}=e;return{configurations:e=>(0,p.jsx)($N,{configuration:e,configurationRoute:i}),managedApps:e=>(0,p.jsx)(eU,{app:e}),releaseChannels:e=>(0,p.jsx)(tU,{releaseChannel:e}),organizationProfiles:e=>(0,p.jsx)(nU,{organizationProfile:e})}[t](n)},$N=e=>{let{configuration:t,configurationRoute:n="apps"}=e;const{buildOrganizationPath:i}=(0,w.P)();return(0,p.jsxs)(fl.ZP,{children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Wl.Z,{})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Kn.Z,{component:f.rU,to:i((e=>e.configurations.configuration[n]),{configurationId:t.id}),color:"text.primary",children:t.name})})]})},eU=e=>{let{app:t}=e;const{buildOrganizationPath:n}=(0,w.P)();return(0,p.jsxs)(fl.ZP,{children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Ko,{iconUrl:t.iconUrl,variant:"rounded",sx:{width:24,height:24}})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Kn.Z,{component:f.rU,to:n((e=>e.vrContent.edit.app.managed),{packageName:t.packageName}),color:"text.primary",children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",children:[(0,p.jsx)(v.Z,{variant:"body2",children:t.title}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.disabled",paddingLeft:.5,children:"v."}),(0,p.jsx)(sc,{app:t})]})})})]})},tU=e=>{let{releaseChannel:t}=e;return(0,p.jsxs)(fl.ZP,{children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(KN.Z,{})}),(0,p.jsx)(Rs.Z,{primary:t.name})]})},nU=e=>{let{organizationProfile:t}=e;return(0,p.jsxs)(fl.ZP,{children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(SI.X,{imageUrl:t.imageUrl,size:"small"})}),(0,p.jsx)(Rs.Z,{primary:t.name})]})};QN.displayName="UIDocumentList",JN.displayName="DocumentItem",$N.displayName="ConfigurationItem",tU.displayName="ReleaseChannelItem",nU.displayName="OrganizationProfileItem";const iU=e=>{let{rows:t,files:n,folders:i,uploads:r}=e;const{documents:l}=(0,E.D)(S.F.Configurations,{filter:(0,a.useCallback)((e=>(0,o.some)(n,(t=>(0,Od.Xc)(t.id,e.fileRefs)))),[n])}),{documents:s}=(0,E.D)(S.F.Apps,{filter:(0,a.useCallback)((e=>(0,Vs.Vi)(e)&&(0,o.some)(n,(t=>(0,Od.Xc)(t.id,e.fileRefs)))),[n])});let d=0,c=0,u=0;(0,o.forEach)(t,(e=>{"folder"===e.original.itemType&&(c+=1),"file"===e.original.itemType&&(d+=1),"upload"===e.original.itemType&&(u+=1)}));const h=d?(0,ul.sr)(d,"file"):void 0,g=u?(0,ul.sr)(u,"upload"):void 0,v=c?(0,ul.sr)(c,"folder"):void 0,C=(0,ul.Yv)((0,o.compact)([v,h,g])),x=n.length-d,f=r.length-u,b=x?(0,ul.sr)(x,"file"):void 0,y=f?(0,ul.sr)(f,"upload"):void 0,j=(0,ul.Yv)((0,o.compact)([b,y]));return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to delete ",(0,p.jsx)("em",{children:C}),"?"]}),j&&(0,p.jsxs)(mf.h,{children:[(0,p.jsxs)("em",{children:[j," inside the ",(0,ul.n8)(c,"folder")]})," ","will also be deleted"]}),!!n.length&&(0,p.jsx)(QN,{configurations:l,configurationRoute:"files",managedApps:s,getLabel:e=>"The ".concat((0,ul.n8)(n.length,"file")," will be removed from these ").concat(e.and),emptyLabel:"".concat(n.length>1?"The files are":"The file is"," not linked to any configurations or apps.")})]})},oU=(0,a.createContext)(void 0),aU=()=>{const e=(0,a.useContext)(oU);if(void 0===e)throw new Error("useFilesContext() must be used in a FilesProvider");return e},rU=e=>{let{children:t}=e;const{privileges:n,hasRequiredPrivilege:i}=(0,w.P)(),{notify:r}=(0,ie.o)(),{fileSystem:l}=(0,Xn.w)(),{managedFileUploadsByDirectory:s,removeManagedFileUpload:d,renameManagedFileUploadDirectory:c,moveManagedFileUpload:h,moveManagedFileUploadDirectory:m,convertToManagedFileUpload:g,uploadManagedFiles:v}=(()=>{const e=(0,a.useContext)(VC);if(!e)throw new Error("useFileUploadContext() must be used within a FileUploadProvider");return e})(),{documents:C}=(0,E.D)(S.F.Configurations),{documents:x}
3=(0,E.D)(S.F.Apps),f=(0,u.v9)((e=>e.firestore.data.files.data)),b=YN(),y=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"managed-files/delete",getDocumentUpdate:e=>{let{data:t}=e;return(0,o.map)(null===t||void 0===t?void 0:t.fileIds,(e=>({collection:S.F.Files,id:e,remove:!0})))}})),[])),j=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"managed-files/:fileId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.Files,id:null===t||void 0===t?void 0:t.fileId,update:n}}})),[])),Z=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"managed-files/update-file-system",getDocumentUpdate:e=>{let{params:t,response:n}=e;return{collection:S.F.FileSystems,id:null===t||void 0===t?void 0:t.organizationId,set:n}}})),[])),[D,M]=(0,a.useState)(!1),k=vC(l),I=D||void 0===k,A=(0,a.useRef)(),[R,T]=(0,a.useState)(),[P,L]=(0,a.useState)(void 0),N=(0,a.useMemo)((()=>{var e;return null!==(e=null!==R&&void 0!==R?R:k)&&void 0!==e?e:{}}),[k,R]);(0,a.useEffect)((()=>{P&&null!==k&&void 0!==k&&k[P]&&(T(void 0),L(void 0))}),[k,P]);const U=(0,a.useMemo)((()=>(0,Od.sd)({fileRefs:N,filesById:f})),[N,f]),[F,O,_]=(0,zn.G)("",300),z=(0,a.useMemo)((()=>(0,Od.R$)({filesByDirectory:U,fileUploadsByDirectory:s,filesFilter:O})),[U,O,s]),B=(0,a.useCallback)(((e,t)=>{const n=(0,o.map)(e,(e=>({file:e,managedFileUpload:g(e,t)}))),i=(0,o.chain)(n).map("managedFileUpload").groupBy("directory").value(),{canUpload:a,errorMessage:l}=(0,Od.A8)({pendingFileUploadsByDirectory:i,fileUploadsByDirectory:s,filesByDirectory:U,destinationDirectory:t});a?v(n):r({severity:"warning",message:l})}),[g,U,s,r,v]),W=(0,a.useCallback)((async e=>{i("content")&&await b.request({data:{storageUrl:e.url,filename:e.name,persistent:!1},onSuccess:t=>{let{downloadUrl:n}=t;(0,di.Sv)(n,e.name)},errorMessage:"Error downloading file"})}),[b,i]),V=(0,a.useCallback)((async e=>{let{files:t,folders:n,uploads:i}=e;M(!0);const a=(0,o.map)(t,"id"),r=(0,o.map)(n,"directory");(0,o.forEach)(i,(e=>d(e.id))),await y.request({data:{fileIds:a,directoryPaths:r},errorMessage:"Error deleting ".concat((0,ul.n8)(a.length,"file"))}),M(!1)}),[y,d]),G=(0,a.useCallback)((e=>{let{rows:t,files:n,folders:i,uploads:o}=e;return(0,p.jsx)(iU,{rows:t,files:n,folders:i,uploads:o})}),[]),H=Bn({getTitle:e=>{let{files:t}=e;return"Delete ".concat((0,ul.n8)(t.length,"file"))},onConfirm:V,getContent:G}),q=(0,a.useCallback)((e=>{const t=(0,o.map)(e,"original"),{files:n,folders:i,uploads:a}=(0,Od.Nx)(t);H.trigger({rows:e,files:n,folders:i,uploads:a})}),[H]),Y=(0,a.useCallback)((async(e,t)=>{if(!t)return;const n=(0,Od.bY)({file:e,newName:t,filesByDirectory:U,fileUploadsByDirectory:s});if(!n.canRename)return void r({severity:"warning",message:n.errorMessage});const i=(0,o.filter)(C,(t=>(0,Od.Xc)(e.id,t.fileRefs)));for(const o of i){var a;const n=(0,Od.sd)({fileRefs:null!==(a=o.fileRefs)&&void 0!==a?a:{},filesById:f}),i=(0,Od.bY)({file:e,newName:t,filesByDirectory:n,isConfigurationOrApp:!0});if(!i.canRename)return void r({severity:"warning",message:"Error in Configuration ".concat(o.name,": ").concat(i.errorMessage)})}const l=(0,o.filter)(x,(t=>(0,Od.Xc)(e.id,t.fileRefs)));for(const o of l){var d;const n=(0,Od.sd)({fileRefs:null!==(d=o.fileRefs)&&void 0!==d?d:{},filesById:f}),i=(0,Od.bY)({file:e,newName:t,filesByDirectory:n,isConfigurationOrApp:!0});if(!i.canRename)return void r({severity:"warning",message:"Error in App ".concat((0,Vs.rW)(o),": ").concat(i.errorMessage)})}await j.request({params:{fileId:e.id},data:{name:t},errorMessage:"Error updating file name"})}),[j,x,C,U,f,s,r]),K=(0,a.useCallback)((async(e,t)=>{await j.request({params:{fileId:e.id},data:{description:t},errorMessage:"Error updating file description"})}),[j]),X=(0,a.useCallback)((async e=>{if(I)return;const t=(0,Od.HD)({fileRefs:N,fileUploadDirectories:(0,o.keys)(s),parentDirectory:e});var n;if("error"===t.type)return void r({severity:"warning",message:null!==(n=(0,Od.gq)(t))&&void 0!==n?n:"Error adding folder"});const{newFileRefs:i,newDirectory:a}=t;return M(!0),T(i),L(a),Z.request({data:{fileRefs:{[a]:[]},version:l.version,appendNewFolder:!0},errorMessage:"Error adding folder"}).then((()=>{M(!1)})).catch((()=>{T(void 0),L(void 0),M(!1)})),a}),[I,N,s,Z,l.version,r]),Q=(0,a.useCallback)((async(e,t)=>{var n;if(I)return;if(e.name===t)return;const i=(0,Od.qH)({fileRefs:N,folder:e,newName:t,fileUploadDirectories:(0,o.keys)(s)});var a;if("error"===i.type)return void r({severity:"warning",message:null!==(a=(0,Od.gq)(i))&&void 0!==a?a:"Error renaming folder"});const{newFileRefs:d}=i;M(!0),c(e.directory,e.parentDirectory,t),null===(n=A.current)||void 0===n||n.renameTableStateFolder(e.directory,e.parentDirectory,t),T(d),await Z.request({data:{fileRefs:d,version:l.version},errorMessage:"Error renaming folder"}),T(void 0),M(!1)}
3),[Z,I,N,l.version,r,s,c]),J=(0,a.useCallback)(((e,t,n)=>(0,o.every)(t,(e=>(0,Od.mW)(e,n.directory)))),[]),$=(0,a.useCallback)((async(e,t,n)=>{var i;if(I)return;const{directory:a}=n,d=(0,Od.ik)({filesByDirectory:U,fileUploadsByDirectory:s,items:t,destinationDirectory:a});var c;if("error"===d.type)return void r({severity:"warning",message:null!==(c=(0,Od.gq)(d))&&void 0!==c?c:"Error moving items"});const{newFileRefs:u}=d;M(!0),(0,o.forEach)(t,(e=>{"upload"===e.itemType?h(e.id,a):"folder"===e.itemType&&m(e.directory,a)})),null===(i=A.current)||void 0===i||i.moveTableStateItems(t,a),T(u),await Z.request({data:{fileRefs:d.newFileRefs,version:l.version}}),T(void 0),M(!1)}),[U,s,Z,I,l.version,r,h,m]);return(0,p.jsxs)(oU.Provider,{value:{rootDirectory:z,uploadFiles:B,downloadFile:W,deleteFiles:q,deleteDialogData:H.data,renameFile:Y,updateFileDescription:K,addFolder:X,renameFolder:Q,canDropItems:J,handleDragDrop:$,fileOperationPending:I,tableContextRef:A,filesFilter:O,filesFilterInputValue:F,setFilesFilter:_,pendingFolderDirectory:P},children:[t,n.content&&(0,p.jsx)(Fn,{...H.props})]})};oU.displayName="FilesContext",rU.displayName="FilesProvider";const lU=()=>{const{privileges:e}=(0,w.P)(),{uploadFiles:t}=aU(),n=(0,a.useCallback)((e=>{t(e,Od.Pm)}),[t]),i=(0,Eg.uI)({multiple:!0,onDropAccepted:n,useFsAccessApi:!0,disabled:!e.content});return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsxs)(zi.W,{privilege:"content",action:"upload files",disableAutoSize:!0,children:[(0,p.jsx)(C.Z,{variant:"contained",color:"primary",size:"small",startIcon:(0,p.jsx)(Ms.Z,{}),onClick:i.open,children:"Add files"}),(0,p.jsx)("input",{...i.getInputProps()})]}),(0,p.jsx)(Fi._,{tooltipContent:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Uploading folders via the file picker is available in the Chrome, Edge, and Opera browsers."}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"If you want to upload a folder in your current browser, you can drag and drop it into the files section below."})]}),hideTooltip:(0,di.G5)(),children:(0,p.jsx)("span",{children:(0,p.jsx)(zi.W,{privilege:"content",action:"upload folders",disableAutoSize:!0,children:(0,p.jsx)(C.Z,{variant:"contained",color:"primary",size:"small",startIcon:(0,p.jsx)(Ms.Z,{}),onClick:async()=>{const e=await(0,di.NN)();n(e)},disabled:!(0,di.G5)(),children:"Add folder"})})})})]})},sU={},dU=e=>{let{item:t}=e;const{privileges:n}=(0,w.P)(),[o,r]=(0,a.useState)(),[l,s]=(0,a.useState)(!1),d=n.content&&"file"===t.itemType&&t.type.startsWith("image/"),c=HC("upload"===t.itemType?t.id:void 0),{request:u}=YN();(0,a.useEffect)((()=>{if(r(void 0),d){const e=t.url,n=sU[e];if(!n){s(!0);const n=new AbortController;return u({data:{storageUrl:e,filename:t.name,persistent:!1},onSuccess:t=>{let{downloadUrl:n}=t;sU[e]=n,r(n)},controller:n}),()=>n.abort()}r(n)}else s(!1)}),[u,t,d]);const h={color:y.DG.purple[300],fontSize:112};return(0,p.jsxs)(m.Z,{height:200,bgcolor:"grey.100",borderRadius:1,alignItems:"center",justifyContent:"center",marginX:e=>"".concat(e.spacing(0)," !important"),position:"relative",children:[d?o&&(0,p.jsx)("img",{onLoad:()=>s(!1),src:o,alt:t.name,width:"100%",height:"100%",style:{objectFit:"contain",objectPosition:"center"}},t.url):"folder"===t.itemType?(0,p.jsx)(MC.Z,{sx:h}):"upload"===t.itemType?(0,p.jsx)(Rn.Z,{variant:c?"determinate":"indeterminate",value:null===c||void 0===c?void 0:c.percentComplete,sx:{width:"80%"}}):(0,p.jsx)(EC,{fileType:t.type,IconProps:{sx:h}}),l&&(0,p.jsx)(i.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},children:(0,p.jsx)(Zi.Z,{size:30})})]})},cU=()=>{const{table:e}=ox(),t=e.getFilteredSelectedRowModel().flatRows;if((0,o.isEmpty)(t))return(0,p.jsx)(uU,{});const n=1===t.length?t[0]:void 0,i="file"===(null===n||void 0===n?void 0:n.original.itemType)?n.original:void 0;if(n&&i)return(0,p.jsx)(pU,{row:n,file:i});const a="upload"===(null===n||void 0===n?void 0:n.original.itemType)?n.original:void 0;if(n&&a)return(0,p.jsx)(hU,{row:n,upload:a});const r="folder"===(null===n||void 0===n?void 0:n.original.itemType)?n.original:void 0;return n&&r?(0,p.jsx)(mU,{row:n,folder:r}):(0,p.jsx)(vU,{rows:t})},uU=()=>{const{rootDirectory:e}=aU();return(0,p.jsxs)(m.Z,{padding:2,spacing:1,children:[(0,p.jsx)(v.Z,{children:"All Files"}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"grey.600",children:(0,ul.sr)(e.deepFileCount,"file")}),(0,p.jsx)(v.Z,{color:"grey.600",children:(0,Ad.Z)(e.size)})]}),(0,p.jsx)(v.Z,{paddingY:20,textAlign:"center",color:"grey.500",children:"Select a file to see a preview"})]})},pU=e=>{var t,n;let{row:i,file:r}=e;const{downloadFile:l,fileOperationPending:s,renameFile:d,updateFileDescription:c}=aU(),{hasRequiredPrivilege:u}=(0,w.P)(),h=(0,a.useCallback)((async e=>{let{changes:t}=e;t.name?await d(r,(0,o.trim)(t.name)):(0,o.isUndefined)(t.description)||await c(r,(0,o.trim)(t.description))}),[r,d,c]),{withChanges:m,addChanges:g,saveChanges:v,clearChanges:C}=Ji({document:r,save:h}),x=[{label:"Type",value:(0,Od.wm)(r)},{label:"Size",value:(0,Ad.Z)(r.size)},{label:"Location",value:(0,Od.SF)(r.directory,r.name)},{label:"Modified",value:(0,M.aH)(null!==(t=r.updatedAt)&&void 0!==t?t:r.uploadDate)},{label:"Created",value:(0,M.aH)(r.uploadDate)}];return(0,p.jsx)(gU,{row:i,properties:x,textFields:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(OC,{label:"Filename",placeholder:"filename.txt",multiline:!0,value:m.name,onChange:e=>g({name:(0,o.replace)(e.target.value,"\n","")}),onSave:v,onClear:()=>C(["name"]),fullWidth:!0,privilege:"content",disabled:s}),(0,p.jsx)(OC,{label:"Description",placeholder:"Add a description",multiline:!0,minRows:2,value:null!==(n=m.description)&&void 0!==n?n:"",onCh
3ange:e=>g({description:e.target.value}),onSave:v,onClear:()=>C(["description"]),fullWidth:!0,privilege:"content",disabled:s})]}),actions:(0,p.jsx)(zi.W,{privilege:"content",action:"download",children:(0,p.jsxs)(oi.Z,{onClick:async()=>{u("content")&&await l(r)},disabled:s,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(wi.Z,{color:"action"})}),(0,p.jsx)(Rs.Z,{primary:"Download"})]})})})},hU=e=>{let{row:t,upload:n}=e;const i=[{label:"Type",value:(0,Od.wm)(n)},{label:"Size",value:(0,Ad.Z)(n.size)},{label:"Location",value:(0,Od.SF)(n.directory,n.name)}];return(0,p.jsx)(gU,{row:t,properties:i,textFields:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ul.z,{label:"Filename",placeholder:"filename.txt",multiline:!0,value:n.name,fullWidth:!0,privilege:"content",disabled:!0}),(0,p.jsx)(Ul.z,{label:"Description",placeholder:"Add a description",multiline:!0,minRows:2,value:"",fullWidth:!0,privilege:"content",disabled:!0})]}),actions:(0,p.jsx)(zi.W,{privilege:"content",action:"download",children:(0,p.jsxs)(oi.Z,{disabled:!0,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(wi.Z,{color:"action"})}),(0,p.jsx)(Rs.Z,{primary:"Download"})]})})})},mU=e=>{let{row:t,folder:n}=e;const{fileOperationPending:i,renameFolder:o}=aU(),[r,l]=(0,a.useState)();(0,a.useEffect)((()=>
3{l(n.name)}),[n.name]);const s=[{label:"Type",value:"Folder"},{label:"Size",value:IC(n)},{label:"Location",value:n.directory}];return(0,p.jsx)(gU,{row:t,properties:s,textFields:(0,p.jsx)(OC,{label:"Folder name",placeholder:"Folder",multiline:!0,value:null!==r&&void 0!==r?r:n.name,onChange:e=>l(e.target.value),onSave:async()=>{r&&await o(n,r),l(void 0)},onClear:()=>{l(void 0)},fullWidth:!0,privilege:"content",disabled:i})})},gU=e=>{let{row:t,properties:n,textFields:a,actions:r}=e;const{fileOperationPending:l,deleteFiles:s}=aU(),d=t.original;return(0,p.jsxs)(m.Z,{padding:2,spacing:2,children:[(0,p.jsx)(v.Z,{noWrap:!0,title:d.name,children:d.name}),(0,p.jsx)(dU,{item:d}),a,r&&(0,p.jsxs)(m.Z,{spacing:1,marginX:e=>"".concat(e.spacing(-2.5)," !important"),children:[(0,p.jsx)(Ie.Z,{}),r,(0,p.jsx)(Ie.Z,{})]}),(0,p.jsx)(v.Z,{paddingY:1,children:"Properties"}),(0,p.jsx)(uS.ZP,{container:!0,rowSpacing:2,children:(0,o.map)(n,(e=>{let{label:t,value:n}=e;return[(0,p.jsx)(uS.ZP,{item:!0,xs:4,md:3,children:(0,p.jsx)(v.Z,{variant:"body2",color:"grey.600",children:t},t)},t),(0,p.jsx)(uS.ZP,{item:!0,xs:8,md:9,children:(0,p.jsx)(v.Z,{variant:"body2",color:"grey.800",sx:{wordBreak:"break-all"},children:n},t)},"".concat(t,":value"))]}))}),(0,p.jsx)(i.Z,{paddingTop:7,children:(0,p.jsx)(zi.W,{privilege:"content",action:"delete",children:(0,p.jsx)(C.Z,{startIcon:(0,p.jsx)(Gl.Z,{}),variant:"outlined",color:"error",onClick:()=>s([t]),disabled:l,children:"Delete"})})})]})},vU=e=>{let{rows:t}=e;const{deleteFiles:n,fileOperationPending:a}=aU(),r=(0,o.sumBy)(t,(e=>e.original.size)),l=(0,o.sumBy)(t,(e=>"folder"===e.original.itemType?1:0)),s=(0,o.sumBy)(t,(e=>"folder"===e.original.itemType?0:1)),d=(0,o.sumBy)(t,(e=>"folder"===e.original.itemType?e.original.deepFileCount:1)),c=l?(0,ul.sr)(l,"folder"):void 0,u=s?(0,ul.sr)(s,"file"):void 0,h=(0,o.join)((0,o.compact)([c,u]),", ");return(0,p.jsxs)(m.Z,{padding:2,spacing:1,children:[(0,p.jsxs)(v.Z,{children:[h," selected"]}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"grey.600",children:(0,ul.sr)(d,"file")}),(0,p.jsx)(v.Z,{color:"grey.600",children:(0,Ad.Z)(r)})]}),(0,p.jsx)(i.Z,{paddingTop:28,children:(0,p.jsx)(zi.W,{action:"delete",privilege:"content",children:(0,p.jsxs)(C.Z,{startIcon:(0,p.jsx)(Gl.Z,{}),variant:"outlined",color:"error",onClick:()=>n(t),disabled:a,children:["Delete ",h]})})})]})},CU=()=>{const{filesFilterInputValue:e,setFilesFilter:t}=aU();return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(xu,{value:e,onChange:t,TextFieldProps:{placeholder:"Filter by name, description, or type"}})}),(0,p.jsx)(dx,{}),(0,p.jsx)(sx,{})]})},xU=()=>{const e=(0,De.Z)(),{contentAreaHeight:t}=(0,ud.MS)(),{table:n,flexColumnIds:i}=ox();return(0,p.jsx)(vd,{sidebarContent:(0,p.jsx)(cU,{}),sidebarSide:"right",noContentPadding:!0,noContentMaxWidth:!0,noBottomPadding:!0,noSidebarGutter:!0,sidebarWidths:{xs:300,md:400,lg:500,xl:600},children:(0,p.jsxs)(m.Z,{height:"calc(".concat(t,")"),minWidth:750,position:"relative",children:[(0,p.jsx)(Me.Z,{sx:{position:"absolute",inset:0,bottom:"unset",right:"calc(var(--scrollbarWidth) + 2px)",zIndex:1},children:(0,p.jsxs)(m.Z,{paddingX:4,paddingTop:3,spacing:2,children:[(0,p.jsx)(CU,{}),(0,p.jsx)(eh.K,{table:n,flexColumnIds:i})]})}),(0,p.jsx)(rx,{emptyMessage:"You haven't uploaded any files yet",virtualListStyle:{paddingTop:120,paddingLeft:e.spacing(4),paddingRight:e.spacing(4),overflowY:"scroll"}})]})})},fU=e=>{let{rows:t,selectedFile:n,selectedFolder:i,onClose:o}=e;const{addFolder:a,setRenamingFolderId:r}=ox(),{downloadFile:l,deleteFiles:s,fileOperationPending:d}=aU();return(0,p.jsxs)(p.Fragment,{children:[n&&(0,p.jsx)(zi.W,{privilege:"content",action:"download",children:(0,p.jsxs)(Hi.Z,{onClick:()=>(l(n),void o()),disabled:d,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(wi.Z,{})}),(0,p.jsx)(Rs.Z,{children:"Download"})]})}),i&&(0,p.jsx)(zi.W,{privilege:"content",action:"add a folder",children:(0,p.jsxs)(Hi.Z,{onClick:()=>(async e=>{await a(e.directory),o()})(i),disabled:d,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(lx.Z,{})}),(0,p.jsx)(Rs.Z,{children:"New Folder"})]})}),i&&(0,p.jsx)(zi.W,{privilege:"content",action:"rename folders",children:(0,p.jsxs)(Hi.Z,{onClick:()=>(r(i.itemId),void o()),disabled:d,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(cx.Z,{})}),(0,p.jsx)(Rs.Z,{children:"Rename"})]})}),(n||i)&&(0,p.jsx)(Ie.Z,{sx:{marginY:1}}),(0,p.jsx)(zi.W,{privilege:"content",action:"delete",children:(0,p.jsxs)(Hi.Z,{onClick:()=>{t&&s(t),o()},disabled:d,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Gl.Z,{})}),(0,p.jsxs)(Rs.Z,{children:["Delete",n&&" File",i&&" Folder"]})]})})]})},bU=()=>{const{rootDirectory:e,deleteDialogData:t,handleDragDrop:n,fileOperationPending:i,filesFilter:o,canDropItems:r,tableContextRef:l,uploadFiles:s,addFolder:d,renameFolder:c,pendingFolderDirectory:u}=aU(),h=(0,a.useCallback)((e=>(0,p.jsx)(fU,{...e})),[]);return(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Library",navCategory:!0},{title:"Files"}],toolbarContent:(0,p.jsx)(lU,{}),noBottomPadding:!0,children:(0,p.jsx)(ix,{contextRef:l,tableId:"files-library",rootDirectory:e,deleteDialogData:t,canDropItems:r,onDragDrop:n,onFilesDropped:s,onAddFolder:d,onRenameFolder:c,disableDragDrop:i,pendingFolderId:u,renderContextMenu:h,filesFilter:o,privilege:"content",children:(0,p.jsx)(xU,{})})})},yU=()=>(0,p.jsx)(rU,{children:(0,p.jsx)(bU,{})});var jU=n(14177),ZU=n(46977),wU=n(97825);const EU=e=>{let{title:t,subtitle:n,to:i,icon:o,iconPadding:a=4,iconProps:r,hidden:s=!1}=e;const d=(0,l.$B)({path:i,exact:!0});return s?null:(0,p.jsx)(Qc,{to:i,children:(0,p.jsx)(oi.Z,{sx:{textTransform:"none",padding:1.5},selected:!!d,children:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(o,{color:"action",...r}),(0,p.jsx)(v.Z,{color:"text.primary",variant:"body1",paddingLeft:a,children:t})]}),n&&(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:n})]})})})},SU=()=>{const{buildOrganizationPath:e}=(0,w.P)(),t=(0,a.useMemo)((()=>[{sectionTitle:"Immersive Apps",navButtonProps:[{title:Ld.qD.instantApps,to:e((e=>e.marketplace.instantApps)),icon:Ud.Z,iconProps:{sx:{color:Ld.Li}}}]},{sectionTitle:"Custom Content & Professional Services",navButtonProps:[{title:Ld.qD.contentProviders,to:e((e=>e.marketplace.contentProviders)),icon:jU.Z},{title:Ld.qD.hardwarePartners,to:e((e=>e.marketplace.hardwarePartners)),icon:ZU.Z}]}]),[e]),n=(0,a.useMemo)((()=>[{title:"Not seeing an app?",subtitle:"Request an app",icon:_s.Z,to:e((e=>e.marketplace.request)),iconPadding:1,iconProps:{color:"primary"}},{title:"Want to be listed?",subtitle:"Join our Partner Network",
3icon:wU.Z,to:e((e=>e.marketplace.join)),iconPadding:1,iconProps:{color:"primary"}}]),[e]),[i,r]=(0,a.useState)(0),{ref:l}=(0,Yi.y)((0,a.useCallback)((e=>{r(e.contentRect.height)}),[]));return(0,p.jsxs)(ii.Z,{sx:{position:"initial",paddingBottom:"".concat(i,"px")},children:[(0,p.jsx)(m.Z,{spacing:2,children:(0,o.map)(t,(e=>(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:e.sectionTitle}),(0,p.jsx)(ii.Z,{children:(0,o.map)(e.navButtonProps,(e=>(0,p.jsx)(EU,{...e},e.title)))})]},e.sectionTitle)))}),(0,p.jsx)(m.Z,{ref:l,sx:{position:"absolute",bottom:32,left:0,width:1,paddingX:2},children:(0,o.map)(n,(e=>(0,p.jsx)(EU,{...e},e.title)))})]})};SU.displayName="MarketplaceSidebar";const DU=e=>{let{title:t,breadcrumbTitle:n,mainBody:i,renderMainBody:o,secondaryBody:a,renderSecondaryBody:r}=e;const l=(0,Le.I7)();return(0,p.jsx)(Mn.C,{noBottomPadding:!0,toolbarBreadcrumbs:[{navCategory:!0,title:"Connect"},{title:l},{title:n}],children:(0,p.jsx)(vd,{sidebarWidths:{xs:300},sidebarContent:(0,p.jsx)(SU,{}),children:(0,p.jsxs)(m.Z,{spacing:2,paddingTop:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:t}),(0,p.jsx)(v.Z,{variant:"body1",children:o?o(i):i}),(0,p.jsx)(v.Z,{variant:"body1",children:r?r(a):a})]})})})};DU.displayName="MarketplaceRequestJoinPageLayout";const MU=()=>{const e=(0,Le.I7)(),t=()=>{(0,b.ec)("Discover XR Join Form Clicked",{location:"Join Page"})},n="list your offering on ".concat(e);return(0,p.jsx)(DU,{title:"Join the ManageXR Partner Network",mainBody:"Scaling with VR and AR can be hard. Successful deployments require the right content, hardware, logistics, management, and more. Let's work together to provide teams the resources they need to make an impact with XR.",secondaryBody:"Apply to ".concat(n," today!"),renderSecondaryBody:e=>(0,ul.d2)(e,n,(e=>(0,p.jsx)(Kn.Z,{href:Be.pV.getListedOnMarketplaceForm,target:"_blank",onClick:t,children:e}))),breadcrumbTitle:"Join"})};var kU;function IU(){return IU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},IU.apply(this,arguments)}function AU(e,t){let{title:n,titleId:i,...o}=e;return a.createElement("svg",IU({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":i},o),n?a.createElement("title",{id:i},n):null,kU||(kU=a.createElement("path",{d:"M14.9998 19.1663H3.33317C2.4165 19.1663 1.6665 18.4163 1.6665 17.4997V5.83301H3.33317V17.4997H14.9998V19.1663ZM12.4998 0.833008H6.6665C5.74984 0.833008 5.00817 1.58301 5.00817 2.49967L4.99984 14.1663C4.99984 15.083 5.7415 15.833 6.65817 15.833H15.8332C16.7498 15.833 17.4998 15.083 17.4998 14.1663V5.83301L12.4998 0.833008ZM13.7498 12.4997H8.74984V10.833H13.7498V12.4997ZM13.7498 7.49967H12.0832V9.16634H10.4165V7.49967H8.74984V5.83301H10.4165V4.16634H12.0832V5.83301H13.7498V7.49967Z",fill:"#8A8990"})))}MU.displayName="MarketplaceJoinPage";const RU=a.forwardRef(AU);n.p;var TU,PU,LU;function NU(){return NU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},NU.apply(this,arguments)}function UU(e,t){let{title:n,titleId:i,...o}=e;return a.createElement("svg",NU({width:871,height:154,viewBox:"0 0 871 154",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":i},o),n?a.createElement("title",{id:i},n):null,a.createElement("mask",{id:"mask0_984_11690",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:871,height:154},TU||(TU=a.createElement("rect",{width:871,height:154,rx:6,fill:"#ECEAF8"}))),PU||(PU=a.createElement("g",{mask:"url(#mask0_984_11690)"},a.createElement("rect",{width:871,height:157,rx:6,fill:"#FAFAFA"}),a.createElement("g",{opacity:.4},a.createElement("g",{opacity:.5},a.createElement("g",{opacity:.8},a.createElement("path",{d:"M402 34.4093H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 42.4948H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 50.6034H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 58.7122H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 66.2432H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 74.3518H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 82.4375H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 90.5459H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 98.0769H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 107.341H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M402 114.849H545.552",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M409.808 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M417.339 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M425.448 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M433.533 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M441.642 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M449.75 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M457.282 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M465.367 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M473.476 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M481.584 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M489.693 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M497.224 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M505.31 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M513.418 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M521.527 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M529.635 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M537.144 26V123.257",stroke:"#5A5A96",strokeWidth:.2486,strokeMiterlimit:10})),a.createElement("path",{d:"M465.09 109.212V37.9672L474.354 42.9569V114.895L465.09 109.212Z",fill:"url(#paint0_linear_984_11690)"}),a.createElement("path",{d:"M483.618 109.188L483.433 37.8052L474.354 42.9336V114.894L483.618 109.188Z",fill:"url(#paint1_linear_984_11690)"}),a.createElement("path",{d:"M465.09 37.967L474.354 33.208L483.433 37.8052L474.354 43.1417L465.09 37.967Z",fill:"url(#paint2_linear_984_11690)"}),a.createElement("path",{d:"M508.498 108.68V58.8044L518.339 63.7942V114.363L508.498 108.68Z",fill:"url(#paint3_linear_984_11690)"}),a.createElement("path",{d:"M527.603 108.68L527.418 58.6658L518.339 63.7942V114.363L527.603 108.68Z",fill:"url(#paint4_linear_984_11690)"}),a.createElement("path",{d:"M508.498 58.8045L518.339 53.2598L527.418 58.6657L518.339 63.8404L508.498 58.8045Z",fill:"url(#paint5_linear_984_11690)"}),a.createElement("path",{opacity:.6,d:"M422.26 108.68V58.8044L431.524 63.7942V114.363L422.26 108.68Z",fill:"url(#paint6_linear_984_11690)"}),a.createElement("path",{opacity:.6,d:"M440.787 108.68L440.579 58.6658L431.524 63.7942V114.363L440.787 108.68Z",fill:"url(#paint7_linear_984_11690)"}),a.createElement("path",{opacity:.6,d:"M422.26 58.8046L431.547 53.8374L440.602 58.6889L431.524 63.7943L422.26 58.8046Z",fill:"url(#paint8_linear_984_11690)"})),a.createElement("path",{d:"M689.659 27.1552H552.483V123.234H689.659V27.1552Z",stroke:"#684EAF",strokeWidth:.2486,strokeMiterlimit:10}),a.createElement("path",{d:"M432.979 140.86H659.581",stroke:"#684EAF",strokeWidth:.2139,strokeMiterlimit:10}),a.createElement("path",{d:"M432.979 151.811H659.581",stroke:"#684EAF",strokeWidth:.2139,strokeMiterlimit:10})),a.createElement("g",{opacity:.4},a.createElement("g",{opacity:.6},a.createElement("path",{d:"M263.032 59.1663L115 79.2451",stroke:"#5A5A96",strokeWidth:.0823,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M299.963 8.68152L260.761 21.7129",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M263.23 19.045V59.3649",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M263.23 20.8833L271.251 24.3798L298.071 16.0347",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M271.251 24.3804V60.717",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M274.081 61.7621V26.3808L298.071 19.045",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M274.081 26.3809L276.081 27.5525L298.071 20.8837",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M276.082 27.552V62.1762",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M288.734 21.8929V64.7723",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M326.567 22.0728V59.3647L336.967 64.6457V35.771L326.567 22.0728Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M336.967 35.7707H334.011L326.567 27.9663",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M334.011 35.7711V63.0596",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M333.019 62.6451V36.4382L326.567 29.6431",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M333.019 36.438H332.208L326.567 31.0127",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M332.208 36.438V62.2304",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M252.812 146.962V71.7476L220.026 75.1722V137.824L228.426 134.435V74.289",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M228.426 134.435L252.812 140.725",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M239.402 80.291L231.165 80.9579V96.2423H239.402V80.291Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M241.187 80.2908V96.242H251.316V79.5156L241.187 80.2908Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M231.165 98.2068H239.402V112.896L231.165 112.356V98.2068Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M241.187 98.2068V112.896L251.316 113.491V98.4411L241.187 98.2068Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M272.188 71.7476V86.0225L300.792 86.5092V75.3343L272.188 71.7476Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M297.584 86.4552V74.9377",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M285.49 73.4236V86.2567",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M287.833 73.7119V86.2566",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M283.814 73.4236V86.2209",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M326.567 78.5063V86.9595L336.967 87.1397V79.9842L326.567 78.5063Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M335.363 79.7495V87.1215",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M331.758 79.2451V87.0495",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M330.352 79.1372V87.0318",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M329.451 78.9207V87.0135",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M115 56.5349V118.051L254.236 179.513L320.168 126.45L304.3
361 124.81L262.491 149.413V59.3648L195.333 68.3588V131.083",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M320.168 71.279V-6.78345",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M182.789 30.9587V84.5443H187.313V133.119L195.334 131.082L220.026 137.824",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M136.809 117.474L119.542 119.908V85.9684L136.485 85.4817L136.809 117.474ZM136.809 117.474L187.313 133.119",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M115 118.051V125.26L254.2 195.987V179.513",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M326.567 156.911C330.668 156.911 333.993 155.636 333.993 154.064C333.993 152.491 330.668 151.216 326.567 151.216C322.465 151.216 319.141 152.491 319.141 154.064C319.141 155.636 322.465 156.911 326.567 156.911Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M254.2 195.988L343.564 111.959V34.7078L320.168 -7L242.466 20.8834V47.559L182.789 30.9589L115 56.445",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M242.466 47.559V62.0324",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M320.168 126.451V71.2791",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M262.491 59.3647L304.109 67.9623L304.361 124.81",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M195.874 43.7378V59.3648L237.726 67.5476V54.4981L195.874 43.7378Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M237.726 54.4984L234.356 55.3457L234.536 66.917",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M234.356 55.3452L195.874 45.7743",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M233.202 66.6645V56.0843L195.874 46.8921",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M233.202 56.0846H232.283V66.4845",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M224.514 53.9395V64.9702",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M223.217 53.6151V64.6098",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M222.316 53.6151V64.5739",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M210.131 50.5687V62.1581",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M208.347 61.7983V49.9565",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M207.301 49.7034V61.5451",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M182.788 84.5444L136.484 85.4817",stroke:"#5A5A96",strokeWidth:.5394,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M170.496 46.6936V71.693",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M151.968 53.3625V74.1985",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M140.702 57.4003V75.7128",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M125.76 62.7535V78.1821",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M125.76 62.7535L127.977 63.0598V77.4071",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M127.977 63.0597L140.702 58.9684",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M151.968 53.3625L154.978 53.7232V73.7299",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M154.977 53.7235L170.496 48.3704",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M155.915 73.6579V54.3001L170.496 49.3976",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M164.206 51.506V72.54",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M165.413 72.3781V51.1096L166.279 51.5063V72.2699",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M155.915 54.2999L156.581 54.5703V73.5678",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M156.582 54.57L164.206 52.1368",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M166.278 51.5065L170.496 50.0645",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M128.77 77.3168V63.5464L140.702 59.9777",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M134.736 61.7616V76.5054",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M135.53 76.3977V61.5278L136.106 61.7622V76.3255",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M128.77 63.5464L129.293 63.7266V77.2447",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M129.293 63.7261L134.736 62.14",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M136.106 61.7618L140.702 60.392",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M298.071 7.59973V66.5745",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}
3),a.createElement("path",{d:"M141.117 88.7261H182.627V115.113L141.117 109.31V88.7261Z",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M143.749 88.7261V108.895L141.117 109.31",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M143.748 108.895L182.626 114.014",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M145.01 88.7261V108.102L182.626 112.482",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M161.881 88.7261V110.067",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M164.999 110.283V88.7261",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M163.827 88.7261V110.283",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}),a.createElement("path",{d:"M145.01 108.102H145.965V88.7261",stroke:"#5A5A96",strokeWidth:.4045,strokeMiterlimit:10,strokeLinecap:"round"}))),a.createElement("rect",{opacity:.3,x:-82,y:26,width:154,height:147,fill:"url(#pattern0)"}),a.createElement("path",{d:"M729.5 139.659L835.218 77.3411L729.5 17.2488L623.782 77.3411L729.5 139.659Z",stroke:"#7761E5",strokeLinecap:"round",strokeDasharray:"3 3"}),a.createElement("circle",{cx:835.218,cy:77.3411,r:2.78205,fill:"#7761E5"}),a.createElement("circle",{cx:729.5,cy:139.659,r:2.78205,fill:"#7761E5"}),a.createElement("circle",{cx:623.782,cy:77.3411,r:2.78205,fill:"#7761E5"}),a.createElement("path",{d:"M729.5 164.697L835.218 102.379L729.5 42.2871L623.782 102.379L729.5 164.697Z",stroke:"#FF7644",strokeLinecap:"round",strokeDasharray:"3 3"}),a.createElement("circle",{cx:835.218,cy:102.379,r:2.78205,fill:"#FF7644"}),a.createElement("circle",{cx:623.782,cy:102.379,r:2.78205,fill:"#FF7644"}),a.createElement("path",{d:"M729.794 70.1791L683.14 42.7356C682.473 42.3435 681.633 42.8241 681.633 43.5975V96.8056C681.633 97.1569 681.817 97.4824 682.118 97.6631L728.772 125.655C729.439 126.055 730.287 125.575 730.287 124.798V71.041C730.287 70.6867 730.099 70.3588 729.794 70.1791Z",fill:"#917FEB",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M730.843 70.1791L777.497 42.7356C778.164 42.3435 779.004 42.8241 779.004 43.5975V96.8056C779.004 97.1569 778.82 97.4824 778.519 97.6631L731.865 125.655C731.198 126.055 730.35 125.575 730.35 124.798V71.041C730.35 70.6867 730.538 70.3588 730.843 70.1791Z",fill:"#917FEB",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),a.createElement("path",{d:"M729.707 69.9012L682.614 43.2194C681.941 42.8382 681.937 41.87 682.606 41.4833L728.686 14.8793C728.99 14.7037 729.364 14.7005 729.671 14.871L777.24 41.2783C777.92 41.6556 777.928 42.63 777.255 43.0186L730.7 69.8971C730.393 70.0743 730.016 70.0758 729.707 69.9012Z",fill:"#B7ADEB",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),LU||(LU=a.createElement("defs",null,a.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},a.createElement("use",{xlinkHref:"#image0_984_11690",transform:"matrix(0.00446429 0 0 0.00467687 0 -0.00042517)"})),a.createElement("linearGradient",{id:"paint0_linear_984_11690",x1:473.479,y1:75.8314,x2:465.239,y2:77.1426,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FFC69D"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint1_linear_984_11690",x1:488.245,y1:78.3324,x2:471.389,y2:74.7736,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FFC69D"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint2_linear_984_11690",x1:465.088,y1:38.1793,x2:483.423,y2:38.1793,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FF8C6A"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint3_linear_984_11690",x1:518.613,y1:65.0037,x2:509.062,y2:104.709,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FFC69D"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint4_linear_984_11690",x1:533.293,y1:89.6842,x2:516.063,y2:84.4398,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FFC69D"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint5_linear_984_11690",x1:508.501,y1:58.5517,x2:527.415,y2:58.5517,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FF8C6A"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint6_linear_984_11690",x1:431.241,y1:85.7022,x2:419.254,y2:88.1371,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FFC69D"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint7_linear_984_11690",x1:442.937,y1:87.7192,x2:427.954,y2:85.0972,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FFC69D"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("linearGradient",{id:"paint8_linear_984_11690",x1:422.253,y1:58.8163,x2:440.606,y2:58.8163,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#FF8C6A"}),a.createElement("stop",{offset:1,stopColor:"#FF9F58"})),a.createElement("image",{id:"image0_984_11690",width:224,height:214,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAADWCAYAAADIDo5RAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABnlSURBVHgB7Z1rbFRnesefc2Y8NjffIBAwl8kGGsgNkg3OQhNhhLSbVJUWorZRN9pipOyXdrPY6qdKlTBSP+0Xm262H/phcVTtVuq2gVWqzSZKaiPRTeMEMCEJJGA8XGxjfL/bczlv3+d4jhkPczmX9z1zZs7zkyx7wNeZ8z/P83+f53lfAIIgCIIgCIIgCIIgCIIgvM3nH80c/qRjLgyELRQgCBt80jHVEGTKCWDQgI8VUNpjqnpy38EVESBMQwIkLHGpg1XHYeYEaNCU/n9chJE4sFPfO7S6DQhTkAAJ03R1zB5XNK2Ff1id6/NQiBqwk/WHVrcDkRMSIJEXTDcDmnpaARYGSyhn46raTGlpdkiARFZwcSXIEqcNn2cX8ofZIQESD7Ho82aPg8bQ51WDAMgfZoYESCyj6+PpRn5RtIIg4aVD/nA5JEBCJ72sIB/yhwgJ0OdguhlLzLQpChyFAuB3f0gC9DGfdWA9T5zPswumpUyF9r0HV50En0EC9CH2ywpy8aM/JAH6CFFlBeko0BlXAsf8kJaqQPiGO5cHeudnYg3gcSaGZhuufHTjNPiAIBC+ob9nDEYGpmHrznWwfmsleI352RjcuHgPJoZn+SMGfoAE6DMW+EV+/eIA3L42DN95Zj3UblwNhSYe02CA3xzwd/IbJECfgkK8+mkfj4RVsGXnWqhYWQaF4P7tCei9cl8XoR8hAfocFAC+bXq8BjbyN7eEiGnmnWsjyXTTv5AACR23/CFGOox4KHqCBEikINMfGj6vv2fUt+lmJkiAxEOI9oeYZuLqJq5yEsshARJZceoPl5cViEyQAIm8WPWHfi4rWIUESJgi1R/mEqIhPMc+T1EL2iDuFiRAwhKGEDGtTPWHwssKjJEACSIbhj/cEK4eZxqrprKCPUiAhCMGI+O+iFSyoGkIgiggJEA/oUAECE9BAiSIAkICJIgCQgIkiAJCAiSIAkICJIgCQgIkiAJCAiSIAkICJIgCQgIkiAJCAvQRTGO/g+JgnGnaKfABtDW9z2htuhRWEonT/KVvAA/CGDsFwUBLc9tz4+ADSIA+pfWtC42KAngeYBg8AetkCa25+V/qu8FHkAB9TutPP2tRVPVoAYUYYUw71vz23k7wISRAQk9LIZ5oURTFzUM6x7nweLoZbPNLupkJEiCxhIv+8CwLRJub2/ZFwOeQAImHkOcPuc9j7KRf081MkACJrAj0h1hWONn8y71tQCyDBEjkxKk/9FtZwSokQMIUuhATiTYFlB+a+wqebgZix8jn5YYESFjChD/0dVnBKiRAwhatf/dZkxJQj6cIkcoKNiABErZJ8YeMBdRmEh5BEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEIQ0aB6QcJVLHaw6DrPHgbHDjMGp+kOr28HHkAAJ1/ikY6ohoKmnFWBh498UUCILKjvypwdX+2pLegMSICGdTzrmwkGWOA0MGrJ9Dhdie0xVT+47uCICPoIESEhjMd2cOQEaNJn+IlVpiYP6jl+ESAIkpNDVMXtc0bQW/mE1WATTUg3YST/4QxIgIRT0eUGmnMiVbpoFhRhTtWP7Dq7phBKFBEgIAX1eIIE7pIHwE5ZK2R/SEdWEEPqu3LskQ3zI3Gy0sfezvg4oQYJAEAK4e320eqhvCrbuXAfrt1aCCOIxDQZ6xqC/Z1T/uBQhARLCWJiNwfWLA3D72jA8/dIWqFhZBnYZHZiG3iv3YZ5/z1KGBEgIB4V44cObPBJWwZaday0JcWZingtvCCaGZ8EPkAALzNgYq+avwh5eKzvMPdQ2vnq4BxaX7lOX7yN8JSLCV8z48jycgwR01tQoEfA4929P6G+YlqIQc4Ep5h0eOft5yuknSIAFYmyKNSgMjuvL9VpSbCzrp4fxEBT8by7CRlw6G59g3UyBU1yMZ7kYPX0mA6akg0khZvKH6PPwc0rV5+WCVkFdhke88Pgk61A06OCiOgw2CtVJ9nABn1ZUuDQ2yRrB4xj+8HOemhq+DtPM7o5bcJN7PT+KD6EI6BKYaqpBOMGwLYuBSMIoRB4RT/CI2FxTqZwFD2P4w1VVFbrf8zsUAV1gYpod55Gql1npibQOCvHMxCQ7jVEWPA6JbxESoETQ52G6yRLQBvZTTUswBo0o9okpdqIYhOh3SIASSPq8M0mf1wAFgEfbFi7EjmLwh36GBCgQ9HkYeXBhJLnAUmgMf9jLf7c9QHgOWoQRBI80h/nF3sojTxgEoWgxKBv7FsomeoEFQqCVV0N07VOgla0Ci4TxpsD9YbuWgJPFUEPMQBhKEIqADjF8Hi6AgMCLJDjdByt73oPQ8JegxGZAnR+DIBfiypv/DaGRr8AOqf4QCE9AArRJMt1sFe3zVC62FXc6oKLvvB4BM4GiXMWFWDYZATugP9TTUpH+UIEISIV1QglC84A2wAiCJYVYlFUP9i7AijUBqNkQBDVg/+lcSjdHv8kqvEwwno7ObTloJy016OZ/yxERaWnrWxcaFQVwGDcM4ogwph1rfntvJ5QgJEAL6O1jGpzWEiw80h+D8cEHQikLqVBbVwaVa63b6sDcEFQMfKqnmnaJVz1m1x/qcOEI8YetTZeqIR5vUhTVaZo7zoV3CoLBtua25zzdaucEEqAJsKygBEDf1WtsMA6j/V
3HgIsz4uSjEjdsroHxl/qcWI105Fx76PVFE1z2tC9EmEe4R26vWKCfBIVyIYYjjhLxiZ0i3nQXU5lIWngEJMAfJ9rHj6JnmpjQY4cKbm0qY+lqMhLV1IS7IzE8xppv6Aosmft4N01IUYqwyDDaJMIVHw0qlHRzS+rdde5Rg4Iy5tJR1MsZOlmq6mQkSYBawfYwloAV93vDtKEyPx8EOtZtCULkuuCRETDdReIHZ+yAbx/5QgbP8OWh2wR+O83yiufkX320Hn0ECTCM5JnRCizM93USfly3dNIvhD9fBN7r43CZW8yewsP45sItEf+gLn5cLEmASvW9ShRb+hBydGU/AEI96sajYEZmQOgfbyrthdXAE3GZ22/dBq6gBB4hLS9EfaloTqFEuvH0R8DG+F2CKz8NJherrF8ZgfkZxtJ9JLnCvk+c3dkHNGve2XHAaAdMQJkTC561oRlkhtX1s8NYk3Lg4YmobBSvg8OmdayP6+ydeLeMCBOkkVq7XV0TxvUD0/tKJSXagiNvaPIMvBYiNybys0Apa9g6WfNsomCXTXifzm16Chep+CPGVUCe1v2wIWAXN/zMW29oaJ6ZYmxaHUyREe/iqFW2pfWxxWqEh3+dn2kbBCrjXyYUPezJuNIRpIa5QYgFdFEwt0yPebPgHUsW37Gfy1J3GnuzjGwE6mUo3tlG4fvGeKSGa3esEywPzj9bDfN1LetRyAgp5jgsPIx8K0WUejD3xtB4I05R8CqpfEAlo4/Ws3eCQfNvsoThvcJFa3dMyvrpOfwsNfwWhEWtlChE+z6hNYiM4jj1hdLYZQcPYnF7kY0+uUrKroKntY1a+7vy7t/RFmHyU81VSwx9a3UL9pde2wfbnMy/woAhCQ90QnLqb83uI8HnYhYPCw64cKd+fl3WS/tCXNT4zlJwA08sKYBGzAjRAIeKTaMUj5hKgAQ7h4txf+iINppd6hKp9wlGqif2n2IearxXOaZM3UNkiJyWVguJCQHIq3ZUNkJAFSWcXxPiFj2klRidMEZVEFOJrNkOseocTMegRtvxel+lWOBwCxjcHQnywbaIGByktXU5JCNBoHxMxGBuqCIBXwItdVAHd7ryhAYoQResgLQ3r0/jkD5dR1KugmG6OTbB2kVPpXhKgKDCCrox84Hj6AtNhTFsdTeMv1g8v0bYYixSlAFN2H+vF3k0oMtQFd9YkUGy4tcWK2/8jtOBvCLGCp7Kqve9bLWVbjCKk6ASop5v8DoovIAje7BYjhcjh2GxgKohRRJXQBZP6M3BTJ5l/j7FJlAMhLvrDSdbh102Ei0aAyw41kbBFHa44YqRwLTrxCxYv3vL7l0AkxqZO+H1lDPtmAoWIP9O22Ll9SPrDothWXySeF2BK+1ivrF2m9dpbck6vcpXci7Y8pEHl6gfDvRipcMtBUQS5N3Nj2DcdJeU5tEvSH3ZwXy/zDA1P4WkBunSoib7aiLU1ZOfjk3Dk+3e5SMQLcfeuMfibI71Qt+FBpwz+XIdzesuI8xVKp21tdlisTz4BAghzX9/qF3/oyUK8yLKCFYz0zViwuNZTCV1f1MLktLPeyroNc1C/e0R/byBpVGgJfc8ZSdMW6eBNRFYPqqhpfK/iKQEm28daC32uQurFO8XFd/XmGui6bH02ENPNl14Ygl08qhq4MSpkoKfW3NuiR5MB3jwWHq131BhgllIVoicE6LR9TAbpFy8KEaPh1Z78s4EoPEw3d+8c1z9GRLWQ2UFvO8NFGUHRkCWnOGRF7xyUXFtbwQVoHGoCHj18I/3iHR4th9+f25g1LcU089D+e8sWWgT0UwrBzrRFKvq8IUbvpF+2Aq7I4gqzGpuGRHmNftCMAyLFcBqwGQomwEL5PLukX7zp/hAXbQ7tHxTu8wSOCumYnbZIx4nPy7Tzt4ibUimkpa4LcNlZ6UVG+sW7EFXh8rXqxZRz54P6YTGMCmWbtkjHic8z0/gtRIiLY0/vFKMQXRWgcagJuODz8K6L6Q6+sIkVYr1KqYwKoUD0Bu0sInfi8/D5Mdv4LWhhqij9oSsCNHYfAxd8HgoPPVtqcVvACUIPYVy8hRwVMhAhxBB/zgLco+H3wOl8Oz4PyfT8m0WYEBdPe+qGIkCqADHdTE6lSy8r5ErZDLyyGJKO01EhxM3yRibMPP9mEegPm70+jS9NgHpNT5XTt5mO1YNOHJ4gJBQRR5OlUgghyjpoRsg0vseHgKUJEFuJQLL4MM0p54sidnofvRAxRB9Nloob0d7J828WAa9Td3WVImxbcNFIESA202I/H0jCSNlEHHQiwx/mQ+bRZOnIEKLI598sToTIgC/OVCkt4EGkCJBHP5yx2QMSEJ2yGbgSMWwusjiFJbe2wMUVEWC/bCEmLpCFjS9aF6ECndWVykHwILL2hBEuPtkXr7H5kEx/WOhRIVECLDo83OwhZRwpOm/uFFmz6MOykQ9cuXjxQnWy50kuSmBUSAd38o6ufRrcxLAKdlLQ6bEoeBUpKegf3x9kT+4XU/zG7Q5kdfPnA9M2u/WwXJTKqBBmJRX9/yt0oDgdJ/2nBrjP6wsH13ly9E5KCvr1J/f1jWdF7DBWgHMOpIMXUwK3oi/yUSH83njwp9m2NquIuHlgNtbdMQBeRYoAMeR3/f6uvgO0UzAKMTXEo8Y34NYeJ26UKIyDWYJciMU+KmRsIizqhiLy5oHXoZdTUGkb82LYj84loP7PNsPqmhA4IbruKb5KGZYaMZBCzOw5OZgllUKPChk3FJX//BV9523dUETePDDynf+vW3D7qrePpZC6Mzb+8aP3ZiH8chW8UL8FnGC8wGUrHpGS7hS6TW3pJlPko0Io3pnv/Ll+QzGbtYjweal83nUHvv1wVPhioAykGNO2ty6w1MdfTd/Ro+Cbb+6DujrngxB6IXj0W0cRw0D23ix2KJVRITNbYohcJLp+fQj+8Iev4fbNMXhq1dZl/9f0i+/6ZxEmE6OjM/Dzn38E9fXb4NVXn4La2pVgl8U75mLEsLsKJ2pmLzh9Vx+U1ULVwqJn6sEshRwVcnoeRK6sRaTPm5uLwbvvdkNX1y39cUgtniNPXIuAUbb8xX7llSe5EJ8EEVhZhRPl8zJdxDLSWH0S/s4VGJtaDevWjIFSs6FoR4Ww7xVHt/QZTQEZBwqvs/M6nDt3Xf/YAAVIETAPmCrgHeuVV3bBiy+GwQlmV+FECCTXRSzgBKFlaAkGQ/fKYHz0Gf3x0OhjUFsRgrUWtxEVMSpknAeh/302n0ORnTiYbv7mN5/rmVUxIycC/uwC7mIdNh5nioCpoC988839jtJSA1zNS1+FE+HzrF7ETiPG2GAcRvujugjTKQupUFtXBpVr898/PTwqZIvR0Vn49a8/gxs3hrJ+zkMRUFG6m/75eU9OREg5i+sHL/6kRgGlwXg8FJ2EBGQ/unlqal5PI/ButnlzDaxYYT81ZMGKxUI3F5vG35ZMvoMLBS9iPGUIo59ZFv1hH6jxWX1lEH2iGeamNLh3Yx4mR+K4VXtGUJQz4wmYGk7AqpogBAIP30cxQlcM/B+UjfeAwvIfm20VvNHpo1Tof8ul7zCip5jvvfclvPPOp7oIcxFQVFgfqlp6zJ/Gf/ig6189OSEvJQK2Nl2qVjTWwa8gvSk7XwRMpbZ2VXKhRow/dILIebd8ESMWZTB8OwrT43GwCkbC2roQj4xK0Y0KmQF9HlqWVJ+Xi7QIGOH+7zHwKNKMKRdhWNE0PDgzbEWABihEEf7QDrIu4kwXKkYzTDfHB2MZ000r1G4KwebE+eIaFcqBUVbIlW5mIkWAERaIHmxu2xcBjyJ1ZQhFCPFEy9czd49aFaDBM89sgtde2yPEH5pB1rxhKoYQx7UtMMSjXiwqLkUMqXPwaOgbWFtmrZgvAlECxBQTywpXrvSDHZICPMsC6rHmtuf8uSdMKo2Nv21gwE7zHxcGm4ioH+bC7WHZL4f3Qqx8A8hi7n4/7H/8IriBqBaybGUFi79NhCfix9rb/7ITigBXayONjf/RyJOsE3aFKCstxZQTz1B3YzzI4O1/2wHrt1bBlp1roWKluL7TieFZuHNtBLToHPz49SHPjwoZfPFFP5w5c9lJWWGcX8wnufDaoIiQsgqaje7u33Y/t+e13ymgL9t9DyyCd0VMS7B+iCulmzeLWX3DVcKykatSVguz0fXFWpiZWIDRgWlIxDSoWucsssf597j19RD0XB6EhVleMlkZgh2v7tOjE+73KboMgaKb3/yy46hn1PM+/vgb21FPAXZKgZkj7e1vdEKRUbDugMbGfw/z0nULj4hHwSYi01LZR3mlgxEwlXIeBbfuXMejYv7Tl9IZ6BmD29eGdREaYO/tX/z94tS6yL9NVAsZiu3997/W000HdHLxNbe3/1VRbMKbiYK35zhNS5EDB3ZAQ8MOIUKUNVyaCkalX/5qU8b/W1VVDjtfrDOVlmK6eePiPZiffThypArQIFOTgpXfWdSokCE8v/i8XHimP44v1DTxhZrjXvCHIqctUkn1TO3/mHuBJJc/RMGh8FCA2cgkQINCjQoJaB9Dn3cKYLqtvf2Ytwf9TOKpBlURaSkK8Uc/egF27HgEnCJyz5P0sZt8AkSCZSpserxWFyKCKSamm/09o8vSzUzkEiDi5qiQmfaxfPCI185/I77I8tcRKCE82SGeFGIbF+IPwSYi/aGTtDSbZzIjQAP0h+gNUXz5hGeQT4AGmf42kT7P6GJxQGdydbMTShBPCtBAhD/EsSf0h076SxGrCxn5PJMVAdrBrAANRI8KWW0fy0BRlhWs4mkBGnB/yNNSdtQL/jDfQoZZz+Q1AYrCbvtYKii8UvJ5uSgKASKi/OFbbx0QkpZmWsiw4plKTYDo895//6ulqXSb8HQzfqzUfF4uikaABihEBsEz4GD7e1H+ENNSjIjGAZ1WFitKRYB+bB8TSdEJ0MCpP0RPiPXDQow94arqr/5JbsEfN0U++rMqqXubiiorcOG1gE8pWgEaLPpDFKI93Bx7Sh1zSu+EkcFPf3xdyqxeX984vPvuZYc+j/F63kyLH3xeLopegIgIf7h9+yPwxht7pY49pR7rJVuA5SENfvJ6z9JjEaNC4trHSresYJWSEKABT0v3cBGe8erYU6oAp6bLoOuLWrjaY733Mx+7d41B/bOjuggNnArQeVkBfR72bb5+FoglSkqABiLGng4c2K7XD0WSqcXt5p1VcP7zR2By2vlIUt2GOajfPaK/N3Daw4k+D8eEMO20Scm1j4mkJAWIJNPSRi/6w0wtbtd4JMSIaEeIlatjsJdHvF2PTy79m9MeTkHtYzzaxZr9VFawSskK0MBrY0+ppLeBYVp69eYa6Lq81tTXY4qJ6ebunePL0k0nPZxiygrk88xS8gI0aGz8z8MMtFav+cNMLW5m/CGmmYf23+PR78Euak57OD/9NKKnm9Q+5h6+EaCBV7fFyNTi1je4Aj7+44Zlaem62gV4+YUh4T7PefsYlRXs4DsBIqLa2o4c2Q3PPrsJRJKpxQ39YffVati1fVJPNw2c+rz0Q01s4rv2MZH4UoAGXvWHsmf1qH3MO/hagAaixp4wLRUpRBmzejSV7i1IgCl4aVuMVETM6ombSp9qJuGJgwSYhih/KOo0YK
3dQ+5i3IQFmITn2dJp/2AA2kb2bdz7ETKXr2/61AyEFEmAeRPlDN8eeBJQVyOe5BAnQJMmxJ+4PwVZe6cbYk9NDTZJQWcFFSIAWEOEPRZ4GbCCirMBAu6yC2kQ+z11IgDZY9IeBjkK3taHYsH3s3LkbvjvUpFQgATpAhD/EiIhixPdmNhMeGZnl3u6+7u8w1XSwwELtYx6ABOiQxsYz3BPGm5yMPaWCQsT9aow3BEWG/g6jnBPBpVD0h5qUCiRAQYjwh/Kh9jGvQQIUjIjTgCVAZQWPQgKUhAh/KIJSPdSkVCABSmQxLS1L9pe6DrWPFQEkQBdw2R9SWaGIIAG6iOy01E+HmpQKJMACIEGI1D5WpJAAC8RiWhpocCBEHuWUs7ye9w75vOKFBOgBDDHylwMFuY3X68JpouRiY/xN7VZAuwX6fpvT3ZRqEgRBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEITn+X9FZThsIzNZ0QAAAABJRU5ErkJggg=="}))))}const FU=a.forwardRef(UU);n.p;var OU,_U,zU,BU,WU,VU,GU,HU,qU,YU,KU,XU,QU,JU,$U,eF,tF,nF,iF,oF,aF,rF,lF,sF,dF,cF,uF,pF,hF,mF,gF,vF,CF,xF,fF,bF,yF,jF,ZF,wF,EF,SF,DF,MF,kF;function IF(){return IF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},IF.apply(this,arguments)}function AF(e,t){let{title:n,titleId:i,...o}=e;return a.createElement("svg",IF({width:871,height:154,viewBox:"0 0 871 154",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":i},o),n?a.createElement("title",{id:i},n):null,a.createElement("mask",{id:"mask0_984_11638",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:871,height:154},OU||(OU=a.createElement("rect",{width:871,height:154,rx:6,fill:"#ECEAF8"}))),a.createElement("g",{mask:"url(#mask0_984_11638)"},_U||(_U=a.createElement("rect",{width:871,height:157,rx:6,fill:"#FAFAFA"})),zU||(zU=a.createElement("g",{opacity:.15},a.createElement("path",{d:"M568.206 154.494C568.206 155.168 568.856 155.702 569.674 155.702C570.491 155.702 571.141 155.168 571.141 154.494C571.141 153.821 570.491 153.286 569.674 153.286C568.856 153.286 568.206 153.821 568.206 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 154.494C553.263 155.168 553.913 155.702 554.73 155.702C555.548 155.702 556.198 155.168 556.198 154.494C556.198 153.821 555.548 153.286 554.73 153.286C553.913 153.286 553.263 153.821 553.263 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M549.749 155.702C550.56 155.702 551.217 155.161 551.217 154.494C551.217 153.827 550.56 153.286 549.749 153.286C548.939 153.286 548.282 153.827 548.282 154.494C548.282 155.161 548.939 155.702 549.749 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 155.702C545.578 155.702 546.235 155.161 546.235 154.494C546.235 153.827 545.578 153.286 544.768 153.286C543.958 153.286 543.301 153.827 543.301 154.494C543.301 155.161 543.958 155.702 544.768 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 154.494C538.296 155.168 538.945 155.702 539.763 155.702C540.581 155.702 541.23 155.168 541.23 154.494C541.23 153.821 540.581 153.286 539.763 153.286C538.945 153.286 538.296 153.821 538.296 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 154.494C513.39 155.167 514.039 155.702 514.857 155.702C515.675 155.702 516.325 155.167 516.325 154.494C516.325 153.821 515.675 153.286 514.857 153.286C514.039 153.266 513.39 153.821 513.39 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 155.702C505.705 155.702 506.362 155.161 506.362 154.494C506.362 153.827 505.705 153.286 504.895 153.286C504.085 153.286 503.428 153.827 503.428 154.494C503.428 155.161 504.085 155.702 504.895 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 154.494C483.479 155.168 484.129 155.702 484.947 155.702C485.764 155.702 486.414 155.168 486.414 154.494C486.414 153.821 485.764 153.286 484.947 153.286C484.129 153.286 483.479 153.821 483.479 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 154.494C368.842 155.167 369.491 155.702 370.309 155.702C371.127 155.702 371.777 155.167 371.777 154.494C371.777 153.821 371.127 153.286 370.309 153.286C369.491 153.266 368.842 153.821 368.842 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 154.494C363.861 155.167 364.51 155.702 365.328 155.702C366.146 155.702 366.795 155.167 366.795 154.494C366.795 153.821 366.146 153.286 365.328 153.286C364.51 153.266 363.861 153.821 363.861 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 155.702C361.157 155.702 361.814 155.161 361.814 154.494C361.814 153.827 361.157 153.286 360.347 153.286C359.537 153.286 358.88 153.827 358.88 154.494C358.88 155.161 359.537 155.702 360.347 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 155.702C356.176 155.702 356.833 155.161 356.833 154.494C356.833 153.827 356.176 153.286 355.366 153.286C354.555 153.286 353.899 153.827 353.899 154.494C353.899 155.161 354.555 155.702 355.366 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 154.494C348.894 155.168 349.543 155.702 350.361 155.702C351.179 155.702 351.828 155.168 351.828 154.494C351.828 153.821 351.179 153.286 350.361 153.286C349.543 153.286 348.894 153.821 348.894 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 155.702C346.214 155.702 346.871 155.161 346.871 154.494C346.871 153.827 346.214 153.286 345.404 153.286C344.593 153.286 343.937 153.827 343.937 154.494C343.937 155.161 344.593 155.702 345.404 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 155.702C341.209 155.702 341.866 155.161 341.866 154.494C341.866 153.827 341.209 153.286 340.399 153.286C339.588 153.286 338.931 153.827 338.931 154.494C338.931 155.161 339.588 155.702 340.399 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 154.494C333.95 155.168 334.6 155.702 335.418 155.702C336.235 155.702 336.885 155.168 336.885 154.494C336.885 153.821 336.235 153.286 335.418 153.286C334.6 153.286 333.95 153.821 333.95 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 154.494C328.969 155.167 329.618 155.702 330.436 155.702C331.254 155.702 331.904 155.167 331.904 154.494C331.904 153.821 331.254 153.286 330.436 153.286C329.618 153.266 328.969 153.821 328.969 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 155.702C326.266 155.702 326.923 155.161 326.923 154.494C326.923 153.827 326.266 153.286 325.455 153.286C324.645 153.286 323.988 153.827 323.988 154.494C323.988 155.161 324.645 155.702 325.455 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 155.702C321.284 155.702 321.941 155.161 321.941 154.494C321.941 153.827 321.284 153.286 320.474 153.286C319.664 153.286 319.007 153.827 319.007 154.494C319.007 155.161 319.664 155.702 320.474 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M225.785 155.702C226.595 155.702 227.252 155.161 227.252 154.494C227.252 153.827 226.595 153.286 225.785 153.286C224.975 153.286 224.318 153.827 224.318 154.494C224.318 155.161 224.975 155.702 225.785 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M219.313 154.494C219.313 155.167 219.962 155.702 220.78 155.702C221.598 155.702 222.247 155.167 222.247 154.494C222.247 153.821 221.598 153.286 220.78 153.286C219.986 153.266 219.313 153.821 219.313 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M214.332 154.494C214.332 155.168 214.981 155.702 215.799 155.702C216.617 155.702 217.266 155.168 217.266 154.494C217.266 153.821 216.617 153.286 215.799 153.286C214.981 153.286 214.332 153.821 214.332 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M210.818 155.702C211.628 155.702 212.285 155.161 212.285 154.494C212.285 153.827 211.628 153.286 210.818 153.286C210.007 153.286 209.35 153.827 209.35 154.494C209.35 155.161 210.007 155.702 210.818 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M204.37 154.494C204.37 155.168 205.019 155.702 205.837 155.702C206.655 155.702 207.304 155.168 207.304 154.494C207.304 153.821 206.655 153.286 205.837 153.286C205.019 153.286 204.37 153.821 204.37 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M199.388 154.494C199.388 155.167 200.038 155.702 200.855 155.702C201.673 155.702 202.323 155.167 202.323 154.494C202.323 153.821 201.673 153.286 200.855 153.286C200.038 153.266 199.388 153.821 199.388 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M195.874 155.702C196.685 155.702 197.342 155.161 197.342 154.494C197.342 153.827 196.685 153.286 195.874 153.286C195.064 153.286 194.407 153.827 194.407 154.494C194.407 155.161 195.064 155.702 195.874 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M190.893 155.702C191.703 155.702 192.36 155.161 192.36 154.494C192.36 153.827 191.703 153.286 190.893 153.286C190.083 153.286 189.426 153.827 189.426 154.494C189.426 155.161 190.083 155.702 190.893 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 154.494C184.421 155.167 185.07 155.702 185.888 155.702C186.706 155.702 187.356 155.167 187.356 154.494C187.356 153.821 186.706 153.286 185.888 153.286C185.094 153.266 184.421 153.821 184.421 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 154.494C179.44 155.167 180.089 155.702 180.907 155.702C181.725 155.702 182.375 155.167 182.375 154.494C182.375 153.821 181.725 153.286 180.907 153.286C180.113 153.266 179.44
3153.821 179.44 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 155.702C176.736 155.702 177.393 155.161 177.393 154.494C177.393 153.827 176.736 153.286 175.926 153.286C175.116 153.286 174.459 153.827 174.459 154.494C174.459 155.161 175.116 155.702 175.926 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 155.702C171.755 155.702 172.412 155.161 172.412 154.494C172.412 153.827 171.755 153.286 170.945 153.286C170.134 153.286 169.478 153.827 169.478 154.494C169.478 155.161 170.134 155.702 170.945 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 154.494C164.496 155.167 165.146 155.702 165.964 155.702C166.781 155.702 167.431 155.167 167.431 154.494C167.431 153.821 166.781 153.286 165.964 153.286C165.146 153.266 164.496 153.821 164.496 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 154.494C159.515 155.167 160.165 155.702 160.982 155.702C161.8 155.702 162.45 155.167 162.45 154.494C162.45 153.821 161.8 153.286 160.982 153.286C160.165 153.266 159.515 153.821 159.515 154.494Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 155.702C156.812 155.702 157.469 155.161 157.469 154.494C157.469 153.827 156.812 153.286 156.001 153.286C155.191 153.286 154.534 153.827 154.534 154.494C154.534 155.161 155.191 155.702 156.001 155.702Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 151.093C545.578 151.093 546.235 150.552 546.235 149.885C546.235 149.218 545.578 148.677 544.768 148.677C543.958 148.677 543.301 149.218 543.301 149.885C543.301 150.552 543.958 151.093 544.768 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 149.885C533.314 150.558 533.964 151.093 534.782 151.093C535.6 151.093 536.249 150.558 536.249 149.885C536.249 149.212 535.6 148.677 534.782 148.677C533.964 148.677 533.314 149.212 533.314 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 149.885C513.39 150.558 514.039 151.093 514.857 151.093C515.675 151.093 516.325 150.558 516.325 149.885C516.325 149.212 515.675 148.677 514.857 148.677C514.039 148.677 513.39 149.212 513.39 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 151.093C505.705 151.093 506.362 150.552 506.362 149.885C506.362 149.218 505.705 148.677 504.895 148.677C504.085 148.677 503.428 149.218 503.428 149.885C503.428 150.552 504.085 151.093 504.895 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 149.885C498.423 150.558 499.072 151.093 499.89 151.093C500.708 151.093 501.358 150.558 501.358 149.885C501.358 149.212 500.708 148.677 499.89 148.677C499.072 148.677 498.423 149.212 498.423 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 149.885C483.479 150.558 484.129 151.093 484.947 151.093C485.764 151.093 486.414 150.558 486.414 149.885C486.414 149.212 485.764 148.677 484.947 148.677C484.129 148.677 483.479 149.212 483.479 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 149.885C478.498 150.558 479.148 151.093 479.965 151.093C480.783 151.093 481.433 150.558 481.433 149.885C481.433 149.212 480.783 148.677 479.965 148.677C479.148 148.677 478.498 149.212 478.498 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 149.885C368.842 150.558 369.491 151.093 370.309 151.093C371.127 151.093 371.777 150.558 371.777 149.885C371.777 149.212 371.127 148.677 370.309 148.677C369.491 148.677 368.842 149.212 368.842 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 149.885C363.861 150.558 364.51 151.093 365.328 151.093C366.146 151.093 366.795 150.558 366.795 149.885C366.795 149.212 366.146 148.677 365.328 148.677C364.51 148.677 363.861 149.212 363.861 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 151.093C361.157 151.093 361.814 150.552 361.814 149.885C361.814 149.218 361.157 148.677 360.347 148.677C359.537 148.677 358.88 149.218 358.88 149.885C358.88 150.552 359.537 151.093 360.347 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 151.093C356.176 151.093 356.833 150.552 356.833 149.885C356.833 149.218 356.176 148.677 355.366 148.677C354.555 148.677 353.899 149.218 353.899 149.885C353.899 150.552 354.555 151.093 355.366 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 149.885C348.894 150.558 349.543 151.093 350.361 151.093C351.179 151.093 351.828 150.558 351.828 149.885C351.828 149.212 351.179 148.677 350.361 148.677C349.543 148.677 348.894 149.212 348.894 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 151.093C346.214 151.093 346.871 150.552 346.871 149.885C346.871 149.218 346.214 148.677 345.404 148.677C344.593 148.677 343.937 149.218 343.937 149.885C343.937 150.552 344.593 151.093 345.404 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 151.093C341.209 151.093 341.866 150.552 341.866 149.885C341.866 149.218 341.209 148.677 340.399 148.677C339.588 148.677 338.931 149.218 338.931 149.885C338.931 150.552 339.588 151.093 340.399 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 149.885C333.95 150.558 334.6 151.093 335.418 151.093C336.235 151.093 336.885 150.558 336.885 149.885C336.885 149.212 336.235 148.677 335.418 148.677C334.6 148.677 333.95 149.212 333.95 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 149.885C328.969 150.558 329.618 151.093 330.436 151.093C331.254 151.093 331.904 150.558 331.904 149.885C331.904 149.212 331.254 148.677 330.436 148.677C329.618 148.677 328.969 149.212 328.969 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 151.093C326.266 151.093 326.923 150.552 326.923 149.885C326.923 149.218 326.266 148.677 325.455 148.677C324.645 148.677 323.988 149.218 323.988 149.885C323.988 150.552 324.645 151.093 325.455 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 151.093C321.284 151.093 321.941 150.552 321.941 149.885C321.941 149.218 321.284 148.677 320.474 148.677C319.664 148.677 319.007 149.218 319.007 149.885C319.007 150.552 319.664 151.093 320.474 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 149.885C314.002 150.558 314.651 151.093 315.469 151.093C316.287 151.093 316.936 150.558 316.936 149.885C316.936 149.212 316.287 148.677 315.469 148.677C314.675 148.677 314.002 149.212 314.002 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M214.332 149.885C214.332 150.558 214.981 151.093 215.799 151.093C216.617 151.093 217.266 150.558 217.266 149.885C217.266 149.212 216.617 148.677 215.799 148.677C214.981 148.677 214.332 149.212 214.332 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M210.818 151.093C211.628 151.093 212.285 150.552 212.285 149.885C212.285 149.218 211.628 148.677 210.818 148.677C210.007 148.677 209.35 149.218 209.35 149.885C209.35 150.552 210.007 151.093 210.818 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M204.37 149.885C204.37 150.558 205.019 151.093 205.837 151.093C206.655 151.093 207.304 150.558 207.304 149.885C207.304 149.212 206.655 148.677 205.837 148.677C205.019 148.677 204.37 149.212 204.37 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M199.388 149.885C199.388 150.558 200.038 151.093 200.855 151.093C201.673 151.093 202.323 150.558 202.323 149.885C202.323 149.212 201.673 148.677 200.855 148.677C200.038 148.677 199.388 149.212 199.388 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M195.874 151.093C196.685 151.093 197.342 150.552 197.342 149.885C197.342 149.218 196.685 148.677 195.874 148.677C195.064 148.677 194.407 149.218 194.407 149.885C194.407 150.552 195.064 151.093 195.874 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M190.893 151.093C191.703 151.093 192.36 150.552 192.36 149.885C192.36 149.218 191.703 148.677 190.893 148.677C190.083 148.677 189.426 149.218 189.426 149.885C189.426 150.552 190.083 151.093 190.893 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 149.885C184.421 150.558 185.07 151.093 185.888 151.093C186.706 151.093 187.356 150.558 187.356 149.885C187.356 149.212 186.706 148.677 185.888 148.677C185.094 148.677 184.421 149.212 184.421 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 149.885C179.44 150.558 180.089 151.093 180.907 151.093C181.725 151.093 182.375 150.558 182.375 149.885C182.375 149.212 181.725 148.677 180.907 148.677C180.113 148.677 179.44
3149.212 179.44 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 151.093C176.736 151.093 177.393 150.552 177.393 149.885C177.393 149.218 176.736 148.677 175.926 148.677C175.116 148.677 174.459 149.218 174.459 149.885C174.459 150.552 175.116 151.093 175.926 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 151.093C171.755 151.093 172.412 150.552 172.412 149.885C172.412 149.218 171.755 148.677 170.945 148.677C170.134 148.677 169.478 149.218 169.478 149.885C169.478 150.552 170.134 151.093 170.945 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 149.885C164.496 150.558 165.146 151.093 165.964 151.093C166.781 151.093 167.431 150.558 167.431 149.885C167.431 149.212 166.781 148.677 165.964 148.677C165.146 148.677 164.496 149.212 164.496 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 149.885C159.515 150.558 160.165 151.093 160.982 151.093C161.8 151.093 162.45 150.558 162.45 149.885C162.45 149.212 161.8 148.677 160.982 148.677C160.165 148.677 159.515 149.212 159.515 149.885Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 151.093C156.812 151.093 157.469 150.552 157.469 149.885C157.469 149.218 156.812 148.677 156.001 148.677C155.191 148.677 154.534 149.218 154.534 149.885C154.534 150.552 155.191 151.093 156.001 151.093Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 145.297C503.404 145.971 504.053 146.505 504.871 146.505C505.689 146.505 506.338 145.971 506.338 145.297C506.338 144.624 505.689 144.089 504.871 144.089C504.053 144.089 503.404 144.624 503.404 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 145.297C498.423 145.971 499.072 146.505 499.89 146.505C500.708 146.505 501.358 145.971 501.358 145.297C501.358 144.624 500.708 144.089 499.89 144.089C499.072 144.089 498.423 144.624 498.423 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 145.297C493.442 145.971 494.091 146.505 494.909 146.505C495.727 146.505 496.376 145.971 496.376 145.297C496.376 144.624 495.727 144.089 494.909 144.089C494.115 144.089 493.442 144.624 493.442 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 145.297C478.498 145.971 479.148 146.505 479.965 146.505C480.783 146.505 481.433 145.971 481.433 145.297C481.433 144.624 480.783 144.089 479.965 144.089C479.148 144.089 478.498 144.624 478.498 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 145.297C373.823 145.971 374.472 146.505 375.29 146.505C376.108 146.505 376.757 145.971 376.757 145.297C376.757 144.624 376.108 144.089 375.29 144.089C374.472 144.089 373.823 144.624 373.823 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 145.297C368.842 145.971 369.491 146.505 370.309 146.505C371.127 146.505 371.777 145.971 371.777 145.297C371.777 144.624 371.127 144.089 370.309 144.089C369.491 144.089 368.842 144.624 368.842 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 145.297C363.861 145.971 364.51 146.505 365.328 146.505C366.146 146.505 366.795 145.971 366.795 145.297C366.795 144.624 366.146 144.089 365.328 144.089C364.51 144.089 363.861 144.624 363.861 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 145.297C358.88 145.971 359.529 146.505 360.347 146.505C361.165 146.505 361.814 145.971 361.814 145.297C361.814 144.624 361.165 144.089 360.347 144.089C359.529 144.089 358.88 144.624 358.88 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 145.297C353.875 145.971 354.524 146.505 355.342 146.505C356.16 146.505 356.809 145.971 356.809 145.297C356.809 144.624 356.16 144.089 355.342 144.089C354.548 144.089 353.875 144.624 353.875 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 145.297C348.894 145.971 349.543 146.505 350.361 146.505C351.179 146.505 351.828 145.971 351.828 145.297C351.828 144.624 351.179 144.089 350.361 144.089C349.543 144.089 348.894 144.624 348.894 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 145.297C343.912 145.971 344.562 146.505 345.38 146.505C346.198 146.505 346.847 145.971 346.847 145.297C346.847 144.624 346.198 144.089 345.38 144.089C344.562 144.089 343.912 144.624 343.912 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 145.297C338.931 145.971 339.581 146.505 340.399 146.505C341.217 146.505 341.866 145.971 341.866 145.297C341.866 144.624 341.217 144.089 340.399 144.089C339.581 144.089 338.931 144.624 338.931 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 145.297C333.95 145.971 334.6 146.505 335.418 146.505C336.235 146.505 336.885 145.971 336.885 145.297C336.885 144.624 336.235 144.089 335.418 144.089C334.6 144.089 333.95 144.624 333.95 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 145.297C328.969 145.971 329.618 146.505 330.436 146.505C331.254 146.505 331.904 145.971 331.904 145.297C331.904 144.624 331.254 144.089 330.436 144.089C329.618 144.089 328.969 144.624 328.969 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 145.297C323.988 145.971 324.638 146.505 325.455 146.505C326.273 146.505 326.923 145.971 326.923 145.297C326.923 144.624 326.273 144.089 325.455 144.089C324.638 144.089 323.988 144.624 323.988 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 145.297C319.007 145.971 319.656 146.505 320.474 146.505C321.292
3146.505 321.941 145.971 321.941 145.297C321.941 144.624 321.292 144.089 320.474 144.089C319.656 144.089 319.007 144.624 319.007 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 145.297C314.002 145.971 314.651 146.505 315.469 146.505C316.287 146.505 316.936 145.971 316.936 145.297C316.936 144.624 316.287 144.089 315.469 144.089C314.675 144.089 314.002 144.624 314.002 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M209.35 145.297C209.35 145.971 210 146.505 210.818 146.505C211.635 146.505 212.285 145.971 212.285 145.297C212.285 144.624 211.635 144.089 210.818 144.089C210 144.089 209.35 144.624 209.35 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M204.37 145.297C204.37 145.971 205.019 146.505 205.837 146.505C206.655 146.505 207.304 145.971 207.304 145.297C207.304 144.624 206.655 144.089 205.837 144.089C205.019 144.089 204.37 144.624 204.37 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M199.388 145.297C199.388 145.971 200.038 146.505 200.855 146.505C201.673 146.505 202.323 145.971 202.323 145.297C202.323 144.624 201.673 144.089 200.855 144.089C200.038 144.089 199.388 144.624 199.388 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M194.383 145.297C194.383 145.971 195.033 146.505 195.851 146.505C196.668 146.505 197.318 145.971 197.318 145.297C197.318 144.624 196.668 144.089 195.851 144.089C195.057 144.089 194.383 144.624 194.383 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M189.402 145.297C189.402 145.971 190.051 146.505 190.869 146.505C191.687 146.505 192.337 145.971 192.337 145.297C192.337 144.624 191.687 144.089 190.869 144.089C190.075 144.089 189.402 144.624 189.402 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 145.297C184.421 145.971 185.07 146.505 185.888 146.505C186.706 146.505 187.356 145.971 187.356 145.297C187.356 144.624 186.706 144.089 185.888 144.089C185.094 144.089 184.421 144.624 184.421 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 145.297C179.44 145.971 180.089 146.505 180.907 146.505C181.725 146.505 182.375 145.971 182.375 145.297C182.375 144.624 181.725 144.089 180.907 144.089C180.113 144.089 179.44 144.624 179.44 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M174.459 145.297C174.459 145.971 175.108 146.505 175.926 146.505C176.744 146.505 177.393 145.971 177.393 145.297C177.393 144.624 176.744 144.089 175.926 144.089C175.108 144.089 174.459 144.624 174.459 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 145.297C169.478 145.971 170.127 146.505 170.945 146.505C171.763 146.505 172.412 145.971 172.412 145.297C172.412 144.624 171.763 144.089 170.945 144.089C170.127 144.089 169.478 144.624 169.478 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 145.297C164.496 145.971 165.146 146.505 165.964 146.505C166.781 146.505 167.431 145.971 167.431 145.297C167.431 144.624 166.781 144.089 165.964 144.089C165.146 144.089 164.496 144.624 164.496 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 145.297C159.515 145.971 160.165 146.505 160.982 146.505C161.8 146.505 162.45 145.971 162.45 145.297C162.45 144.624 161.8 144.089 160.982 144.089C160.165 144.089 159.515 144.624 159.515 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 145.297C154.51 145.971 155.16 146.505 155.978 146.505C156.796 146.505 157.445 145.971 157.445 145.297C157.445 144.624 156.796 144.089 155.978 144.089C155.184 144.089 154.51 144.624 154.51 145.297Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 140.71C508.385 141.383 509.035 141.918 509.853 141.918C510.67 141.918 511.32 141.383 511.32 140.71C511.32 140.037 510.67 139.502 509.853 139.502C509.035 139.502 508.385 140.037 508.385 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 140.71C503.404 141.383 504.053 141.918 504.871 141.918C505.689 141.918 506.338 141.383 506.338 140.71C506.338 140.037 505.689 139.502 504.871 139.502C504.053 139.502 503.404 140.037 503.404 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 140.71C498.423 141.383 499.072 141.918 499.89 141.918C500.708 141.918 501.358 141.383 501.358 140.71C501.358 140.037 500.708 139.502 499.89 139.502C499.072 139.502 498.423 140.037 498.423 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 140.71C493.442 141.383 494.091 141.918 494.909 141.918C495.727 141.918 496.376 141.383 496.376 140.71C496.376 140.037 495.727 139.502 494.909 139.502C494.115 139.502 493.442 140.037 493.442 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 140.71C483.479 141.383 484.129 141.918 484.947 141.918C485.764 141.918 486.414 141.383 486.414 140.71C486.414 140.037 485.764 139.502 484.947 139.502C484.129 139.502 483.479 140.037 483.479 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 140.71C478.498 141.383 479.148 141.918 479.965 141.918C480.783 141.918 481.433 141.383 481.433 140.71C481.433 140.037 480.783 139.502 479.965 139.502C479.148 139.502 478.498 140.037 478.498 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 140.71C473.517 141.383 474.167 141.918 474.984 141.918C475.802 141.918 476.452 141.383 476.452 140.71C476.452 140.037 475.802 139.502 474.984 139.502C474.167 139.502 473.517 140.037 473.517 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 140.71C378.804 141.383 379.454 141.918 380.271 141.918C381.089 141.918 381.739 141.383 381.739 140.71C381.739 140.037 381.089 139.502 380.271 139.502C379.478 139.502 378.804 140.037 378.804 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 140.71C373.823 141.383 374.472 141.918 375.29 141.918C376.108 141.918 376.757 141.383 376.757 140.71C376.757 140.037 376.108 139.502 375.29 139.502C374.472 139.502 373.823 140.037 373.823 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 140.71C368.842 141.383 369.491 141.918 370.309 141.918C371.127 141.918 371.777 141.383 371.777 140.71C371.777 140.037 371.127 139.502 370.309 139.502C369.491 139.502 368.842 140.037 368.842 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 140.71C363.861 141.383 364.51 141.918 365.328 141.918C366.146 141.918 366.795 141.383 366.795 140.71C366.795 140.037 366.146 139.502 365.328 139.502C364.51 139.502 363.861 140.037 363.861 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 140.71C358.88 141.383 359.529 141.918 360.347 141.918C361.165 141.918 361.814 141.383 361.814 140.71C361.814 140.037 361.165 139.502 360.347 139.502C359.529 139.502 358.88 140.037 358.88 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 140.71C353.875 141.383 354.524 141.918 355.342 141.918C356.16 141.918 356.809 141.383 356.809 140.71C356.809 140.037 356.16 139.502 355.342 139.502C354.548 139.502 353.875 140.037 353.875 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 140.71C348.894 141.383 349.543 141.918 350.361 141.918C351.179 141.918 351.828 141.383 351.828 140.71C351.828 140.037 351.179 139.502 350.361 139.502C349.543 139.502 348.894 140.037 348.894 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 140.71C343.912 141.383 344.562 141.918 345.38 141.918C346.198 141.918 346.847 141.383 346.847 140.71C346.847 140.037 346.198 139.502 345.38 139.502C344.562 139.502 343.912 140.037 343.912 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 140.71C338.931 141.383 339.581 141.918 340.399 141.918C341.217 141.918 341.866 141.383 341.866 140.71C341.866 140.037 341.217 139.502 340.399 139.502C339.581 139.502 338.931 140.037 338.931 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 140.71C333.95 141.383 334.6 141.918 335.418 141.918C336.235 141.918 336.885 141.383 336.885 140.71C336.885 140.037 336.235 139.502 335.418 139.502C334.6 139.502 333.95 140.037 333.95 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 140.71C328.969 141.383 329.618 141.918 330.436 141.918C331.254 141.918 331.904 141.383 331.904 140.71C331.904 140.037 331.254 139.502 330.436 139.502C329.618 139.502 328.969 140.037 328.969 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 140.71C323.988 141.383 324.638 141.918 325.455 141.918C326.273 141.918 326.923 141.383 326.923 140.71C326.923 140.037 326.273 139.502 325.455 139.502C324.638 139.502 323.988 140.037 323.988 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 140.71C319.007 141.383 319.656 141.918 320.474 141.918C321.292
3141.918 321.941 141.383 321.941 140.71C321.941 140.037 321.292 139.502 320.474 139.502C319.656 139.502 319.007 140.037 319.007 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 140.71C314.002 141.383 314.651 141.918 315.469 141.918C316.287 141.918 316.936 141.383 316.936 140.71C316.936 140.037 316.287 139.502 315.469 139.502C314.675 139.502 314.002 140.037 314.002 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M209.35 140.71C209.35 141.383 210 141.918 210.818 141.918C211.635 141.918 212.285 141.383 212.285 140.71C212.285 140.037 211.635 139.502 210.818 139.502C210 139.502 209.35 140.037 209.35 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M204.37 140.71C204.37 141.383 205.019 141.918 205.837 141.918C206.655 141.918 207.304 141.383 207.304 140.71C207.304 140.037 206.655 139.502 205.837 139.502C205.019 139.502 204.37 140.037 204.37 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M199.388 140.71C199.388 141.383 200.038 141.918 200.855 141.918C201.673 141.918 202.323 141.383 202.323 140.71C202.323 140.037 201.673 139.502 200.855 139.502C200.038 139.502 199.388 140.037 199.388 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M194.383 140.71C194.383 141.383 195.033 141.918 195.851 141.918C196.668 141.918 197.318 141.383 197.318 140.71C197.318 140.037 196.668 139.502 195.851 139.502C195.057 139.502 194.383 140.037 194.383 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M189.402 140.71C189.402 141.383 190.051 141.918 190.869 141.918C191.687 141.918 192.337 141.383 192.337 140.71C192.337 140.037 191.687 139.502 190.869 139.502C190.075 139.502 189.402 140.037 189.402 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 140.71C184.421 141.383 185.07 141.918 185.888 141.918C186.706 141.918 187.356 141.383 187.356 140.71C187.356 140.037 186.706 139.502 185.888 139.502C185.094 139.502 184.421 140.037 184.421 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 140.71C179.44 141.383 180.089 141.918 180.907 141.918C181.725 141.918 182.375 141.383 182.375 140.71C182.375 140.037 181.725 139.502 180.907 139.502C180.113 139.502 179.44 140.037 179.44 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M174.459 140.71C174.459 141.383 175.108 141.918 175.926 141.918C176.744 141.918 177.393 141.383 177.393 140.71C177.393 140.037 176.744 139.502 175.926 139.502C175.108 139.502 174.459 140.037 174.459 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 140.71C169.478 141.383 170.127 141.918 170.945 141.918C171.763 141.918 172.412 141.383 172.412 140.71C172.412 140.037 171.763 139.502 170.945 139.502C170.127 139.502 169.478 140.037 169.478 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 140.71C164.496 141.383 165.146 141.918 165.964 141.918C166.781 141.918 167.431 141.383 167.431 140.71C167.431 140.037 166.781 139.502 165.964 139.502C165.146 139.502 164.496 140.037 164.496 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 140.71C159.515 141.383 160.165 141.918 160.982 141.918C161.8 141.918 162.45 141.383 162.45 140.71C162.45 140.037 161.8 139.502 160.982 139.502C160.165 139.502 159.515 140.037 159.515 140.71Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 137.331C510.687 137.331 511.344 136.79 511.344 136.123C511.344 135.455 510.687 134.914 509.876 134.914C509.066 134.914 508.409 135.455 508.409 136.123C508.409 136.79 509.066 137.331 509.876 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 137.331C505.705 137.331 506.362 136.79 506.362 136.123C506.362 135.455 505.705 134.914 504.895 134.914C504.085 134.914 503.428 135.455 503.428 136.123C503.428 136.79 504.085 137.331 504.895 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 136.122C478.498 136.796 479.148 137.33 479.965 137.33C480.783 137.33 481.433 136.796 481.433 136.122C481.433 135.449 480.783 134.915 479.965 134.915C479.148 134.895 478.498 135.449 478.498 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 137.331C381.105 137.331 381.762 136.79 381.762 136.123C381.762 135.455 381.105 134.914 380.295 134.914C379.485 134.914 378.828 135.455 378.828 136.123C378.828 136.79 379.485 137.331 380.295 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 137.331C376.1 137.331 376.757 136.79 376.757 136.123C376.757 135.455 376.1 134.914 375.29 134.914C374.48 134.914 373.823 135.455 373.823 136.123C373.823 136.79 374.48 137.331 375.29 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 136.122C368.842 136.796 369.491 137.33 370.309 137.33C371.127 137.33 371.777 136.796 371.777 136.122C371.777 135.449 371.127 134.915 370.309 134.915C369.491 134.895 368.842 135.449 368.842 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 136.122C363.861 136.796 364.51 137.33 365.328 137.33C366.146 137.33 366.795 136.796 366.795 136.122C366.795 135.449 366.146 134.915 365.328 134.915C364.51 134.895 363.861 135.449 363.861 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 137.331C361.157 137.331 361.814 136.79 361.814 136.123C361.814 135.455 361.157 134.914 360.347 134.914C359.537 134.914 358.88 135.455 358.88 136.123C358.88 136.79 359.537 137.331 360.347 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 137.331C356.176 137.331 356.833 136.79 356.833 136.123C356.833 135.455 356.176 134.914 355.366 134.914C354.555 134.914 353.899 135.455 353.899 136.123C353.899 136.79 354.555 137.331 355.366 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 136.123C348.894 136.796 349.543 137.331 350.361 137.331C351.179 137.331 351.828 136.796 351.828 136.123C351.828 135.449 351.179 134.914 350.361 134.914C349.543 134.914 348.894 135.449 348.894 136.123Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 137.331C346.214 137.331 346.871 136.79 346.871 136.123C346.871 135.455 346.214 134.914 345.404 134.914C344.593 134.914 343.937 135.455 343.937 136.123C343.937 136.79 344.593 137.331 345.404 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 137.331C341.209 137.331 341.866 136.79 341.866 136.123C341.866 135.455 341.209 134.914 340.399 134.914C339.588 134.914 338.931 135.455 338.931 136.123C338.931 136.79 339.588 137.331 340.399 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 136.123C333.95 136.796 334.6 137.331 335.418 137.331C336.235 137.331 336.885 136.796 336.885 136.123C336.885 135.449 336.235 134.914 335.418 134.914C334.6 134.914 333.95 135.449 333.95 136.123Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 136.122C328.969 136.796 329.618 137.33 330.436 137.33C331.254 137.33 331.904 136.796 331.904 136.122C331.904 135.449 331.254 134.915 330.436 134.915C329.618 134.895 328.969 135.449 328.969 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 137.331C326.266 137.331 326.923 136.79 326.923 136.123C326.923 135.455 326.266 134.914 325.455 134.914C324.645 134.914 323.988 135.455 323.988 136.123C323.988 136.79 324.645 137.331 325.455 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 137.331C321.284 137.331 321.941 136.79 321.941 136.123C321.941 135.455 321.284 134.914 320.474 134.914C319.664 134.914 319.007 135.455 319.007 136.123C319.007 136.79 319.664 137.331 320.474 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 136.122C314.002 136.796 314.651 137.33 315.469 137.33C316.287 137.33 316.936 136.796 316.936 136.122C316.936 135.449 316.287 134.915 315.469 134.915C314.675 134.895 314.002 135.449 314.002 136.122Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M204.37 136.123C204.37 136.796 205.019 137.331 205.837 137.331C206.655 137.331 207.304 136.796 207.304 136.123C207.304 135.449 206.655 134.914 205.837 134.914C205.019 134.914 204.37 135.449 204.37 136.123Z",fill:"#5840D2"}),a.createElement("path",{d:"M199.388 136.122C199.388 136.796 200.038 137.33 200.855 137.33C201.673 137.33 202.323 136.796 202.323 136.122C202.323 135.449 201.673 134.915 200.855 134.915C200.038 134.895 199.388 135.449 199.388 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M195.874 137.331C196.685 137.331 197.342 136.79 197.342 136.123C197.342 135.455 196.685 134.914 195.874 134.914C195.064 134.914 194.407 135.455 194.407 136.123C194.407 136.79 195.064 137.331 195.874 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M190.893 137.331C191.703 137.331 192.36 136.79 192.36 136.123C192.36 135.455 191.703 134.914 190.893 134.914C190.083 134.914 189.426 135.455 189.426 136.123C189.426 136.79 190.083 137.331 190.893 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 136.122C184.421 136.796 185.07 137.33 185.888 137.33C186.706 137.33 187.356 136.796 187.356 136.122C187.356 135.449 186.706 134.915 185.888 134.915C185.094 134.895 184.421 135.449 184.421 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 136.122C179.44 136.796 180.089 137.33 180.907 137.33C181.725 137.33 182.375 136.796 182.375 136.122C182.375 135.449 181.725 134.915 180.907 134.915C180.113 134.895 179.44 135.449 179.44 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 137.331C176.736 137.331 177.393 136.79 177.393 136.123C177.393 135.455 176.736 134.914 175.926 134.914C175.116 134.914 174.459 135.455 174.459 136.123C174.459 136.79 175.116 137.331 175.926 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 137.331C171.755 137.331 172.412 136.79 172.412 136.123C172.412 135.455 171.755 134.914 170.945 134.914C170.134 134.914 169.478 135.455 169.478 136.123C169.478 136.79 170.134 137.331 170.945 137.331Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 136.122C164.496 136.796 165.146 137.33 165.964 137.33C166.781 137.33 167.431 136.796 167.431 136.122C167.431 135.449 166.781 134.915 165.964 134.915C165.146 134.895 164.496 135.449 164.496 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 136.122C159.515 136.796 160.165 137.33 160.982 137.33C161.8 137.33 162.45 136.796 162.45 136.122C162.45 135.449 161.8 134.915 160.982 134.915C160.165 134.895 159.515 135.449 159.515 136.122Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 131.535C478.498 132.208 479.148 132.743 479.965 132.743C480.783 132.743 481.433 132.208 481.433 131.535C481.433 130.862 480.783 130.327 479.965 130.327C479.148 130.307 478.498 130.862 478.498 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 131.535C443.606 132.208 444.256 132.743 445.074 132.743C445.892 132.743 446.541 132.208 446.541 131.535C446.541 130.862 445.892 130.327 445.074 130.327C444.256 130.307 443.606 130.862 443.606 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 131.535C383.785 132.208 384.435 132.743 385.253 132.743C386.071 132.743 386.72 132.208 386.72 131.535C386.72 130.862 386.071 130.327 385.253 130.327C384.435 130.327 383.785 130.862 383.785 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 132.743C381.105 132.743 381.762 132.202 381.762 131.535C381.762 130.868 381.105 130.327 380.295 130.327C379.485 130.327 378.828 130.868 378.828 131.535C378.828 132.202 379.485 132.743 380.295 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 132.743C376.1 132.743 376.757 132.202 376.757 131.535C376.757 130.868 376.1 130.327 375.29 130.327C374.48 130.327 373.823 130.868 373.823 131.535C373.823 132.202 374.48 132.743 375.29 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 131.535C368.842 132.208 369.491 132.743 370.309 132.743C371.127 132.743 371.777 132.208 371.777 131.535C371.777 130.862 371.127 130.327 370.309 130.327C369.491 130.307 368.842 130.862 368.842 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 131.535C363.861 132.208 364.51 132.743 365.328 132.743C366.146 132.743 366.795 132.208 366.795 131.535C366.795 130.862 366.146 130.327 365.328 130.327C364.51 130.307 363.861 130.862 363.861 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 132.743C361.157 132.743 361.814 132.202 361.814 131.535C361.814 130.868 361.157 130.327 360.347 130.327C359.537 130.327 358.88 130.868 358.88 131.535C358.88 132.202 359.537 132.743 360.347 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 132.743C356.176 132.743 356.833 132.202 356.833 131.535C356.833 130.868 356.176 130.327 355.366 130.327C354.555 130.327 353.899 130.868 353.899 131.535C353.899 132.202 354.555 132.743 355.366 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 131.535C348.894 132.208 349.543 132.743 350.361 132.743C351.179 132.743 351.828 132.208 351.828 131.535C351.828 130.862 351.179 130.327 350.361 130.327C349.543 130.327 348.894 130.862 348.894 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 132.743C346.214 132.743 346.871 132.202 346.871 131.535C346.871 130.868 346.214 130.327 345.404 130.327C344.593 130.327 343.937 130.868 343.937 131.535C343.937 132.202 344.593 132.743 345.404 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 132.743C341.209 132.743 341.866 132.202 341.866 131.535C341.866 130.868 341.209 130.327 340.399 130.327C339.588 130.327 338.931 130.868 338.931 131.535C338.931 132.202 339.588 132.743 340.399 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 131.535C333.95 132.208 334.6 132.743 335.418 132.743C336.235 132.743 336.885 132.208 336.885 131.535C336.885 130.862 336.235 130.327 335.418 130.327C334.6 130.327 333.95 130.862 333.95 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 131.535C328.969 132.208 329.618 132.743 330.436 132.743C331.254 132.743 331.904 132.208 331.904 131.535C331.904 130.862 331.254 130.327 330.436 130.327C329.618 130.307 328.969 130.862 328.969 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 132.743C326.266 132.743 326.923 132.202 326.923 131.535C326.923 130.868 326.266 130.327 325.455 130.327C324.645 130.327 323.988 130.868 323.988 131.535C323.988 132.202 324.645 132.743 325.455 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 132.743C321.284 132.743 321.941 132.202 321.941 131.535C321.941 130.868 321.284 130.327 320.474 130.327C319.664 130.327 319.007 130.868 319.007 131.535C319.007 132.202 319.664 132.743 320.474 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 131.535C314.002 132.208 314.651 132.743 315.469 132.743C316.287 132.743 316.936 132.208 316.936 131.535C316.936 130.862 316.287 130.327 315.469 130.327C314.675 130.307 314.002 130.862 314.002 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 131.535C309.021 132.208 309.67 132.743 310.488 132.743C311.306 132.743 311.956 132.208 311.956 131.535C311.956 130.862 311.306 130.327 310.488 130.327C309.67 130.327 309.021 130.862 309.021 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 132.743C306.341 132.743 306.998 132.202 306.998 131.535C306.998 130.868 306.341 130.327 305.531 130.327C304.72 130.327 304.063 130.868 304.063 131.535C304.063 132.202 304.72 132.743 305.531 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 132.743C301.336 132.743 301.993 132.202 301.993 131.535C301.993 130.868 301.336 130.327 300.526 130.327C299.716 130.327 299.059 130.868 299.059 131.535C299.059 132.202 299.716 132.743 300.526 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 131.535C294.077 132.208 294.727 132.743 295.545 132.743C296.362 132.743 297.012 132.208 297.012 131.535C297.012 130.862 296.362 130.327 295.545 130.327C294.727 130.327 294.077 130.862 294.077 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 131.535C289.096 132.208 289.745 132.743 290.563 132.743C291.381 132.743 292.031 132.208 292.031 131.535C292.031 130.862 291.381 130.327 290.563 130.327C289.745 130.307 289.096 130.862 289.096 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 132.743C286.392 132.743 287.049 132.202 287.049 131.535C287.049 130.868 286.392 130.327 285.582 130.327C284.772 130.327 284.115 130.868 284.115 131.535C284.115 132.202 284.772 132.743 285.582 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 131.535C279.134 132.208 279.783 132.743 280.601 132.743C281.419 132.743 282.069 132.208 282.069 131.535C282.069 130.862 281.419 130.327 280.601 130.327C279.783 130.307 279.134 130.862 279.134 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M195.874 132.743C196.685 132.743 197.342 132.202 197.342 131.535C197.342 130.868 196.685 130.327 195.874 130.327C195.064 130.327 194.407 130.868 194.407 131.535C194.407 132.202 195.064 132.743 195.874 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M190.893 132.743C191.703 132.743 192.36 132.202 192.36 131.535C192.36 130.868 191.703 130.327 190.893 130.327C190.083 130.327 189.426 130.868 189.426 131.535C189.426 132.202 190.083 132.743 190.893 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 131.535C184.421 132.208 185.07 132.743 185.888 132.743C186.706 132.743 187.356 132.208 187.356 131.535C187.356 130.862 186.706 130.327 185.888 130.327C185.094 130.307 184.421 130.862 184.421 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 131.535C179.44 132.208 180.089 132.743 180.907 132.743C181.725 132.743 182.375 132.208 182.375 131.535C182.375 130.862 181.725 130.327 180.907 130.327C180.113 130.307 179.44
3130.862 179.44 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 132.743C176.736 132.743 177.393 132.202 177.393 131.535C177.393 130.868 176.736 130.327 175.926 130.327C175.116 130.327 174.459 130.868 174.459 131.535C174.459 132.202 175.116 132.743 175.926 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 132.743C171.755 132.743 172.412 132.202 172.412 131.535C172.412 130.868 171.755 130.327 170.945 130.327C170.134 130.327 169.478 130.868 169.478 131.535C169.478 132.202 170.134 132.743 170.945 132.743Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 131.535C164.496 132.208 165.146 132.743 165.964 132.743C166.781 132.743 167.431 132.208 167.431 131.535C167.431 130.862 166.781 130.327 165.964 130.327C165.146 130.307 164.496 130.862 164.496 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 131.535C159.515 132.208 160.165 132.743 160.982 132.743C161.8 132.743 162.45 132.208 162.45 131.535C162.45 130.862 161.8 130.327 160.982 130.327C160.165 130.307 159.515 130.862 159.515 131.535Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 126.926C508.385 127.599 509.035 128.134 509.853 128.134C510.67 128.134 511.32 127.599 511.32 126.926C511.32 126.253 510.67 125.718 509.853 125.718C509.035 125.718 508.385 126.253 508.385 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 126.926C473.517 127.599 474.167 128.134 474.984 128.134C475.802 128.134 476.452 127.599 476.452 126.926C476.452 126.253 475.802 125.718 474.984 125.718C474.167 125.718 473.517 126.253 473.517 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 126.926C438.625 127.599 439.275 128.134 440.093 128.134C440.911 128.134 441.56 127.599 441.56 126.926C441.56 126.253 440.911 125.718 440.093 125.718C439.275 125.718 438.625 126.253 438.625 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 126.926C433.644 127.599 434.294 128.134 435.111 128.134C435.929 128.134 436.579 127.599 436.579 126.926C436.579 126.253 435.929 125.718 435.111 125.718C434.294 125.718 433.644 126.253 433.644 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 126.926C383.785 127.599 384.435 128.134 385.253 128.134C386.071 128.134 386.72 127.599 386.72 126.926C386.72 126.253 386.071 125.718 385.253 125.718C384.435 125.718 383.785 126.253 383.785 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 126.926C378.804 127.599 379.454 128.134 380.271 128.134C381.089 128.134 381.739 127.599 381.739 126.926C381.739 126.253 381.089 125.718 380.271 125.718C379.478 125.718 378.804 126.253 378.804 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 126.926C373.823 127.599 374.472 128.134 375.29 128.134C376.108 128.134 376.757 127.599 376.757 126.926C376.757 126.253 376.108 125.718 375.29 125.718C374.472 125.718 373.823 126.253 373.823 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 126.926C368.842 127.599 369.491 128.134 370.309 128.134C371.127 128.134 371.777 127.599 371.777 126.926C371.777 126.253 371.127 125.718 370.309 125.718C369.491 125.718 368.842 126.253 368.842 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 126.926C363.861 127.599 364.51 128.134 365.328 128.134C366.146 128.134 366.795 127.599 366.795 126.926C366.795 126.253 366.146 125.718 365.328 125.718C364.51 125.718 363.861 126.253 363.861 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 126.926C358.88 127.599 359.529 128.134 360.347 128.134C361.165 128.134 361.814 127.599 361.814 126.926C361.814 126.253 361.165 125.718 360.347 125.718C359.529 125.718 358.88 126.253 358.88 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 126.926C353.875 127.599 354.524 128.134 355.342 128.134C356.16 128.134 356.809 127.599 356.809 126.926C356.809 126.253 356.16 125.718 355.342 125.718C354.548 125.718 353.875 126.253 353.875 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 126.926C348.894 127.599 349.543 128.134 350.361 128.134C351.179 128.134 351.828 127.599 351.828 126.926C351.828 126.253 351.179 125.718 350.361 125.718C349.543 125.718 348.894 126.253 348.894 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 126.926C343.912 127.599 344.562 128.134 345.38 128.134C346.198 128.134 346.847 127.599 346.847 12
36.926C346.847 126.253 346.198 125.718 345.38 125.718C344.562 125.718 343.912 126.253 343.912 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 126.926C338.931 127.599 339.581 128.134 340.399 128.134C341.217 128.134 341.866 127.599 341.866 126.926C341.866 126.253 341.217 125.718 340.399 125.718C339.581 125.718 338.931 126.253 338.931 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 126.926C333.95 127.599 334.6 128.134 335.418 128.134C336.235 128.134 336.885 127.599 336.885 126.926C336.885 126.253 336.235 125.718 335.418 125.718C334.6 125.718 333.95 126.253 333.95 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 126.926C328.969 127.599 329.618 128.134 330.436 128.134C331.254 128.134 331.904 127.599 331.904 126.926C331.904 126.253 331.254 125.718 330.436 125.718C329.618 125.718 328.969 126.253 328.969 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 126.926C323.988 127.599 324.638 128.134 325.455 128.134C326.273 128.134 326.923 127.599 326.923 126.926C326.923 126.253 326.273 125.718 325.455 125.718C324.638 125.718 323.988 126.253 323.988 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 126.926C319.007 127.599 319.656 128.134 320.474 128.134C321.292 128.134 321.941 127.599 321.941 126.926C321.941 126.253 321.292 125.718 320.474 125.718C319.656 125.718 319.007 126.253 319.007 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 126.926C314.002 127.599 314.651 128.134 315.469 128.134C316.287 128.134 316.936 127.599 316.936 126.926C316.936 126.253 316.287 125.718 315.469 125.718C314.675 125.718 314.002 126.253 314.002 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 126.926C309.021 127.599 309.67 128.134 310.488 128.134C311.306 128.134 311.956 127.599 311.956 126.926C311.956 126.253 311.306 125.718 310.488 125.718C309.67 125.718 309.021 126.253 309.021 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 126.926C304.04 127.599 304.689 128.134 305.507 128.134C306.325 128.134 306.974 127.599 306.974 126.926C306.974 126.253 306.325 125.718 305.507 125.718C304.689 125.718 304.04 126.253 304.04 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 126.926C299.059 127.599 299.708 128.134 300.526 128.134C301.344 128.134 301.993 127.599 301.993 126.926C301.993 126.253 301.344 125.718 300.526 125.718C299.708 125.718 299.059 126.253 299.059 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 126.926C294.077 127.599 294.727 128.134 295.545 128.134C296.362 128.134 297.012 127.599 297.012 126.926C297.012 126.253 296.362 125.718 295.545 125.718C294.727 125.718 294.077 126.253 294.077 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 126.926C289.096 127.599 289.745 128.134 290.563 128.134C291.381 128.134 292.031 127.599 292.031 126.926C292.031 126.253 291.381 125.718 290.563 125.718C289.745 125.718 289.096 126.253 289.096 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 126.926C284.115 127.599 284.764 128.134 285.582 128.134C286.4 128.134 287.049 127.599 287.049 126.926C287.049 126.253 286.4 125.718 285.582 125.718C284.764 125.718 284.115 126.253 284.115 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 126.926C279.134 127.599 279.783 128.134 280.601 128.134C281.419 128.134 282.069 127.599 282.069 126.926C282.069 126.253 281.419 125.718 280.601 125.718C279.783 125.718 279.134 126.253 279.134 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 126.926C274.129 127.599 274.778 128.134 275.596 128.134C276.414 128.134 277.063 127.599 277.063 126.926C277.063 126.253 276.414 125.718 275.596 125.718C274.802 125.718 274.129 126.253 274.129 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M189.402 126.926C189.402 127.599 190.051 128.134 190.869 128.134C191.687 128.134 192.337 127.599 192.337 126.926C192.337 126.253 191.687 125.718 190.869 125.718C190.075 125.718 189.402 126.253 189.402 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 126.926C184.421 127.599 185.07 128.134 185.888 128.134C186.706 128.134 187.356 127.599 187.356 126.926C187.356 126.253 186.706 125.718 185.888 125.718C185.094 125.718 184.421 126.253 184.421 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 126.926C179.44 127.599 180.089 128.134 180.907 128.134C181.725 128.134 182.375 127.599 182.375 126.926C182.375 126.253 181.725 125.718 180.907 125.718C180.113 125.718 179.44 126.253 179.44 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M174.459 126.926C174.459 127.599 175.108 128.134 175.926 128.134C176.744 128.134 177.393 127.599 177.393 126.926C177.393 126.253 176.744 125.718 175.926 125.718C175.108 125.718 174.459 126.253 174.459 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 126.926C169.478 127.599 170.127 128.134 170.945 128.134C171.763 128.134 172.412 127.599 172.412 126.926C172.412 126.253 171.763 125.718 170.945 125.718C170.127 125.718 169.478 126.253 169.478 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 126.926C164.496 127.599 165.146 128.134 165.964 128.134C166.781 128.134 167.431 127.599 167.431 126.926C167.431 126.253 166.781 125.718 165.964 125.718C165.146 125.718 164.496 126.253 164.496 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 126.926C159.515 127.599 160.165 128.134 160.982
3128.134C161.8 128.134 162.45 127.599 162.45 126.926C162.45 126.253 161.8 125.718 160.982 125.718C160.165 125.718 159.515 126.253 159.515 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 126.926C154.51 127.599 155.16 128.134 155.978 128.134C156.796 128.134 157.445 127.599 157.445 126.926C157.445 126.253 156.796 125.718 155.978 125.718C155.184 125.718 154.51 126.253 154.51 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 126.926C149.529 127.599 150.179 128.134 150.997 128.134C151.814 128.134 152.464 127.599 152.464 126.926C152.464 126.253 151.814 125.718 150.997 125.718C150.203 125.718 149.529 126.253 149.529 126.926Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 122.338C518.371 123.012 519.021 123.546 519.839 123.546C520.657 123.546 521.306 123.012 521.306 122.338C521.306 121.665 520.657 121.13 519.839 121.13C519.021 121.13 518.371 121.665 518.371 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 122.338C488.46 123.012 489.11 123.546 489.928 123.546C490.746 123.546 491.395 123.012 491.395 122.338C491.395 121.665 490.746 121.13 489.928 121.13C489.11 121.13 488.46 121.665 488.46 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 122.338C483.479 123.012 484.129 123.546 484.947 123.546C485.764 123.546 486.414 123.012 486.414 122.338C486.414 121.665 485.764 121.13 484.947 121.13C484.129 121.13 483.479 121.665 483.479 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 122.338C473.517 123.012 474.167 123.546 474.984 123.546C475.802 123.546 476.452 123.012 476.452 122.338C476.452 121.665 475.802 121.13 474.984 121.13C474.167 121.13 473.517 121.665 473.517 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 122.338C438.625 123.012 439.275 123.546 440.093 123.546C440.911 123.546 441.56 123.012 441.56 122.338C441.56 121.665 440.911 121.13 440.093 121.13C439.275 121.13 438.625 121.665 438.625 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 122.338C433.644 123.012 434.294 123.546 435.111 123.546C435.929 123.546 436.579 123.012 436.579 122.338C436.579 121.665 435.929 121.13 435.111 121.13C434.294 121.13 433.644 121.665 433.644 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 122.338C383.785 123.012 384.435 123.546 385.253 123.546C386.071 123.546 386.72 123.012 386.72 122.338C386.72 121.665 386.071 121.13 385.253 121.13C384.435 121.13 383.785 121.665 383.785 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 122.338C373.823 123.012 374.472 123.546 375.29 123.546C376.108 123.546 376.757 123.012 376.757 122.338C376.757 121.665 376.108 121.13 375.29 121.13C374.472 121.13 373.823 121.665 373.823 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 122.338C368.842 123.012 369.491 123.546 370.309 123.546C371.127 123.546 371.777 123.012 371.777 122.338C371.777 121.665 371.127 121.13 370.309 121.13C369.491 121.13 368.842 121.665 368.842 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 122.338C363.861 123.012 364.51 123.546 365.328 123.546C366.146 123.546 366.795 123.012 366.795 122.338C366.795 121.665 366.146 121.13 365.328 121.13C364.51 121.13 363.861 121.665 363.861 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 122.338C358.88 123.012 359.529 123.546 360.347 123.546C361.165 123.546 361.814 123.012 361.814 122.338C361.814 121.665 361.165 121.13 360.347 121.13C359.529 121.13 358.88 121.665 358.88 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 122.338C353.875 123.012 354.524 123.546 355.342 123.546C356.16 123.546 356.809 123.012 356.809 122.338C356.809 121.665 356.16 121.13 355.342 121.13C354.548 121.13 353.875 121.665 353.875 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 122.338C348.894 123.012 349.543 123.546 350.361 123.546C351.179 123.546 351.828 123.012 351.828 122.338C351.828 121.665 351.179 121.13 350.361 121.13C349.543 121.13 348.894 121.665 348.894 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 122.338C343.912 123.012 344.562 123.546 345.38 123.546C346.198 123.546 346.847 123.012 346.847 122.338C346.847 121.665 346.198 121.13 345.38 121.13C344.562 121.13 343.912 12
31.665 343.912 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 122.338C338.931 123.012 339.581 123.546 340.399 123.546C341.217 123.546 341.866 123.012 341.866 122.338C341.866 121.665 341.217 121.13 340.399 121.13C339.581 121.13 338.931 121.665 338.931 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 122.338C333.95 123.012 334.6 123.546 335.418 123.546C336.235 123.546 336.885 123.012 336.885 122.338C336.885 121.665 336.235 121.13 335.418 121.13C334.6 121.13 333.95 121.665 333.95 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 122.338C328.969 123.012 329.618 123.546 330.436 123.546C331.254 123.546 331.904 123.012 331.904 122.338C331.904 121.665 331.254 121.13 330.436 121.13C329.618 121.13 328.969 121.665 328.969 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 122.338C323.988 123.012 324.638 123.546 325.455 123.546C326.273 123.546 326.923 123.012 326.923 122.338C326.923 121.665 326.273 121.13 325.455 121.13C324.638 121.13 323.988 121.665 323.988 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 122.338C319.007 123.012 319.656 123.546 320.474 123.546C321.292 123.546 321.941 123.012 321.941 122.338C321.941 121.665 321.292 121.13 320.474 121.13C319.656 121.13 319.007 121.665 319.007 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 122.338C314.002 123.012 314.651 123.546 315.469 123.546C316.287 123.546 316.936 123.012 316.936 122.338C316.936 121.665 316.287 121.13 315.469 121.13C314.675 121.13 314.002 121.665 314.002 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 122.338C309.021 123.012 309.67 123.546 310.488 123.546C311.306 123.546 311.956 123.012 311.956 122.338C311.956 121.665 311.306 121.13 310.488 121.13C309.67 121.13 309.021 121.665 309.021 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 122.338C304.04 123.012 304.689 123.546 305.507 123.546C306.325 123.546 306.974 123.012 306.974 122.338C306.974 121.665 306.325 121.13 305.507 121.13C304.689 121.13 304.04 121.665 304.04 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 122.338C299.059 123.012 299.708 123.546 300.526 123.546C301.344 123.546 301.993 123.012 301.993 122.338C301.993 121.665 301.344 121.13 300.526 121.13C299.708 121.13 299.059 121.665 299.059 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 122.338C294.077 123.012 294.727 123.546 295.545 123.546C296.362 123.546 297.012 123.012 297.012 122.338C297.012 121.665 296.362 12
31.13 295.545 121.13C294.727 121.13 294.077 121.665 294.077 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 122.338C289.096 123.012 289.745 123.546 290.563 123.546C291.381 123.546 292.031 123.012 292.031 122.338C292.031 121.665 291.381 121.13 290.563 121.13C289.745 121.13 289.096 121.665 289.096 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 122.338C284.115 123.012 284.764 123.546 285.582 123.546C286.4 123.546 287.049 123.012 287.049 122.338C287.049 121.665 286.4 121.13 285.582 121.13C284.764 121.13 284.115 121.665 284.115 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 122.338C279.134 123.012 279.783 123.546 280.601 123.546C281.419 123.546 282.069 123.012 282.069 122.338C282.069 121.665 281.419 121.13 280.601 121.13C279.783 121.13 279.134 121.665 279.134 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 122.338C274.129 123.012 274.778 123.546 275.596 123.546C276.414 123.546 277.063 123.012 277.063 122.338C277.063 121.665 276.414 121.13 275.596 121.13C274.802 121.13 274.129 121.665 274.129 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M269.148 122.338C269.148 123.012 269.797 123.546 270.615 123.546C271.433 123.546 272.082 123.012 272.082 122.338C272.082 121.665 271.433 121.13 270.615 121.13C269.797 121.13 269.148 121.665 269.148 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 122.338C169.478 123.012 170.127 123.546 170.945 123.546C171.763 123.546 172.412 123.012 172.412 122.338C172.412 121.665 171.763 121.13 170.945 121.13C170.127 121.13 169.478 121.665 169.478 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 122.338C164.496 123.012 165.146 123.546 165.964 123.546C166.781 123.546 167.431 123.012 167.431 122.338C167.431 121.665 166.781 121.13 165.964 121.13C165.146 121.13 164.496 121.665 164.496 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M144.548 122.338C144.548 123.012 145.198 123.546 146.015 123.546C146.833 123.546 147.483 123.012 147.483 122.338C147.483 121.665 146.833 121.13 146.015 121.13C145.222 121.13 144.548 121.665 144.548 122.338Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 117.751C518.371 118.424 519.021 118.959 519.839 118.959C520.657 118.959 521.306 118.424 521.306 117.751C521.306 117.078 520.657 116.543 519.839 116.543C519.021 116.543 518.371 117.078 518.371 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 117.751C513.39 118.424 514.039 118.959 514.857 118.959C515.675 118.959 516.325 118.424 516.325 117.751C516.325 117.078 515.675 116.543 514.857 116.543C514.039 116.543 513.39 117.078 513.39 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 117.751C493.442 118.424 494.091 118.959 494.909 118.959C495.727 118.959 496.376 118.424 496.376 117.751C496.376 117.078 495.727 116.543 494.909 116.543C494.115 116.543 493.442 117.078 493.442 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 117.751C488.46 118.424 489.11 118.959 489.928 118.959C490.746 118.959 491.395 118.424 491.395 117.751C491.395 117.078 490.746 116.543 489.928 116.543C489.11 116.543 488.46 117.078 488.46 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 117.751C483.479 118.424 484.129 118.959 484.947 118.959C485.764 118.959 486.414 118.424 486.414 117.751C486.414 117.078 485.764 116.543 484.947 116.543C484.129 116.543 483.479 117.078 483.479 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 117.751C478.498 118.424 479.148 118.959 479.965 118.959C480.783 118.959 481.433 118.424 481.433 117.751C481.433 117.078 480.783 116.543 479.965 116.543C479.148 116.543 478.498 117.078 478.498 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 117.751C473.517 118.424 474.167 118.959 474.984 118.959C475.802 118.959 476.452 118.424 476.452 117.751C476.452 117.078 475.802 116.543 474.984 116.543C474.167 116.543 473.517 117.078 473.517 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 117.751C438.625 118.424 439.275 118.959 440.093 118.959C440.911 118.959 441.56 118.424 441.56 117.751C441.56 117.078 440.911 116.543 440.093 116.543C439.275 116.543 438.625 117.078 438.625 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 117.751C433.644 118.424 434.294 118.959 435.111 118.959C435.929 118.959 436.579 118.424 436.579 117.751C436.579 117.078 435.929 116.543 435.111 116.543C434.294 116.543 433.644 117.078 433.644 117.751Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M378.804 117.751C378.804 118.424 379.454 118.959 380.271 118.959C381.089 118.959 381.739 118.424 381.739 117.751C381.739 117.078 381.089 116.543 380.271 116.543C379.478 116.543 378.804 117.078 378.804 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 117.751C373.823 118.424 374.472 118.959 375.29 118.959C376.108 118.959 376.757 118.424 376.757 117.751C376.757 117.078 376.108 116.543 375.29 116.543C374.472 116.543 373.823 117.078 373.823 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 117.751C368.842 118.424 369.491 118.959 370.309 118.959C371.127 118.959 371.777 118.424 371.777 117.751C371.777 117.078 371.127 116.543 370.309 116.543C369.491 116.543 368.842 117.078 368.842 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 117.751C363.861 118.424 364.51 118.959 365.328 118.959C366.146 118.959 366.795 118.424 366.795 117.751C366.795 117.078 366.146 116.543 365.328 116.543C364.51 116.543 363.861 117.078 363.861 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 117.751C358.88 118.424 359.529 118.959 360.347 118.959C361.165 118.959 361.814 118.424 361.814 117.751C361.814 117.078 361.165 116.543 360.347 116.543C359.529 116.543 358.88 117.078 358.88 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 117.751C353.875 118.424 354.524 118.959 355.342 118.959C356.16 118.959 356.809 118.424 356.809 117.751C356.809 117.078 356.16 116.543 355.342 116.543C354.548 116.543 353.875 117.078 353.875 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 117.751C348.894 118.424 349.543 118.959 350.361 118.959C351.179 118.959 351.828 118.424 351.828 117.751C351.828 117.078 351.179 116.543 350.361 116.543C349.543 116.543 348.894 117.078 348.894 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 117.751C343.912 118.424 344.562 118.959 345.38 118.959C346.198 118.959 346.847 118.424 346.847 117.751C346.847 117.078 346.198 116.543 345.38 116.543C344.562 116.543 343.912 117.078 343.912 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 117.751C338.931 118.424 339.581 118.959 340.399 118.959C341.217 118.959 341.866 118.424 341.866 117.751C341.866 117.078 341.217 116.543 340.399 116.543
3C339.581 116.543 338.931 117.078 338.931 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 117.751C333.95 118.424 334.6 118.959 335.418 118.959C336.235 118.959 336.885 118.424 336.885 117.751C336.885 117.078 336.235 116.543 335.418 116.543C334.6 116.543 333.95 117.078 333.95 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 117.751C328.969 118.424 329.618 118.959 330.436 118.959C331.254 118.959 331.904 118.424 331.904 117.751C331.904 117.078 331.254 116.543 330.436 116.543C329.618 116.543 328.969 117.078 328.969 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 117.751C323.988 118.424 324.638 118.959 325.455 118.959C326.273 118.959 326.923 118.424 326.923 117.751C326.923 117.078 326.273 116.543 325.455 116.543C324.638 116.543 323.988 117.078 323.988 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 117.751C319.007 118.424 319.656 118.959 320.474 118.959C321.292 118.959 321.941 118.424 321.941 117.751C321.941 117.078 321.292 116.543 320.474 116.543C319.656 116.543 319.007 117.078 319.007 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 117.751C314.002 118.424 314.651 118.959 315.469 118.959C316.287 118.959 316.936 118.424 316.936 117.751C316.936 117.078 316.287 116.543 315.469 116.543C314.675 116.543 314.002 117.078 314.002 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 117.751C309.021 118.424 309.67 118.959 310.488 118.959C311.306 118.959 311.956 118.424 311.956 117.751C311.956 117.078 311.306 116.543 310.488 116.543C309.67 116.543 309.021 117.078 309.021 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 117.751C304.04 118.424 304.689 118.959 305.507 118.959C306.325 118.959 306.974 118.424 306.974 117.751C306.974 117.078 306.325 116.543 305.507 116.543C304.689 116.543 304.04 117.078 304.04 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 117.751C299.059 118.424 299.708 118.959 300.526 118.959C301.344 118.959 301.993 118.424 301.993 117.751C301.993 117.078 301.344 116.543 300.526 116.543C299.708 116.543 299.059 117.078 299.059 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 117.751C294.077 118.424 294.727 118.959 295.545 118.959C296.362 118.959 297.012 118.424 297.012 117.751C297.012 117.078 296.362 116.543 295.545 116.543C294.727 116.543 294.077 117.078 294.077 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 117.751C289.096 118.424 289.745 118.959 290.563 118.959C291.381 118.959 292.031 118.424 292.031 117.751C292.031 117.078 291.381 116.543 290.563 116.543C289.745 116.543 289.096 117.078 289.096 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 117.751C284.115 118.424 284.764 118.959 285.582 118.959C286.4 118.959 287.049 118.424 287.049 117.751C287.049 117.078 286.4 116.543 285.582 116.543C284.764 116.543 284.115 117.078 284.115 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 117.751C279.134 118.424 279.783 118.959 280.601 118.959C281.419 118.959 282.069 118.424 282.069 117.751C282.069 117.078 281.419 116.543 280.601 116.543C279.783 116.543 279.134 117.078 279.134 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 117.751C274.129 118.424 274.778 118.959 275.596 118.959C276.414 118.959 277.063 118.424 277.063 117.751C277.063 117.078 276.414 116.543 275.596 116.543C274.802 116.543 274.129 117.078 274.129 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M269.148 117.751C269.148 118.424 269.797 118.959 270.615 118.959C271.433 118.959 272.082 118.424 272.082 117.751C272.082 117.078 271.433 116.543 270.615 116.543C269.797 116.543 269.148 117.078 269.148 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M144.548 117.751C144.548 118.424 145.198 118.959 146.015 118.959C146.833 118.959 147.483 118.424 147.483 117.751C147.483 117.078 146.833 116.543 146.015 116.543C145.222 116.543 144.548 117.078 144.548 117.751Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 113.163C513.39 113.837 514.039 114.371 514.857 114.371C515.675 114.371 516.325 113.837 516.325 113.163C516.325 112.49 515.675 111.956 514.857 111.956C514.039 111.936 513.39 112.49 513.39 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 114.372C490.738 114.372 491.395 113.831 491.395 113.164C491.395 112.497 490.738 111.956 489.928 111.956C489.117 111.956 488.46 112.497 488.46 113.164C488.46 113.831 489.117 114.372 489.928 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 113.164C483.479 113.837 484.129 114.372 484.947 114.372C485.764 114.372 486.414 113.837 486.414 113.164C486.414 112.49 485.764 111.956 484.947 111.956C484.129 111.956 483.479 112.49 483.479 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 113.163C478.498 113.837 479.148 114.371 479.965 114.371C480.783 114.371 481.433 113.837 481.433 113.163C481.433 112.49 480.783 111.956 479.965 111.956C479.148 111.936 478.498 112.49 478.498 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 114.372C475.795 114.372 476.452 113.831 476.452 113.164C476.452 112.497 475.795 111.956 474.984 111.956C474.174 111.956 473.517 112.497 473.517 113.164C473.517 113.831 474.174 114.372 474.984 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 114.372C470.814 114.372 471.471 113.831 471.471 113.164C471.471 112.497 470.814 111.956 470.003 111.956C469.193 111.956 468.536 112.497 468.536 113.164C468.536 113.831 469.193 114.372 470.003 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 113.164C438.625 113.837 439.275 114.372 440.093 114.372C440.911 114.372 441.56 113.837 441.56 113.164C441.56 112.49 440.911 111.956 440.093 111.956C439.275 111.956 438.625 112.49 438.625 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 114.372C435.922 114.372 436.579 113.831 436.579 113.164C436.579 112.497 435.922 111.956 435.111 111.956C434.301 111.956 433.644 112.497 433.644 113.164C433.644 113.831 434.301 114.372 435.111 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 114.372C430.941 114.372 431.598 113.831 431.598 113.164C431.598 112.497 430.941 111.956 430.131 111.956C429.32 111.956 428.663 112.497 428.663 113.164C428.663 113.831 429.32 114.372 430.131 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 113.164C388.767 113.837 389.416 114.372 390.234 114.372C391.052 114.372 391.701 113.837 391.701 113.164C391.701 112.49 391.052 111.956 390.234 111.956C389.416 111.956 388.767 112.49 388.767 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 113.164C383.785 113.837 384.435 114.372 385.253 114.372C386.071 114.372 386.72 113.837 386.72 113.164C386.72 112.49 386.071 111.956 385.253 111.956C384.435 111.956 383.785 112.49 383.785 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 114.372C381.105 114.372 381.762 113.831 381.762 113.164C381.762 112.497 381.105 111.956 380.295 111.956C379.485 111.956 378.828 112.497 378.828 113.164C378.828 113.831 379.485 114.372 380.295 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 114.372C376.1 114.372 376.757 113.831 376.757 113.164C376.757 112.497 376.1 111.956 375.29 111.956C374.48 111.956 373.823 112.497 373.823 113.164C373.823 113.831 374.48 114.372 375.29 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 113.163C363.861 113.837 364.51 114.371 365.328 114.371C366.
3146 114.371 366.795 113.837 366.795 113.163C366.795 112.49 366.146 111.956 365.328 111.956C364.51 111.936 363.861 112.49 363.861 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 114.372C361.157 114.372 361.814 113.831 361.814 113.164C361.814 112.497 361.157 111.956 360.347 111.956C359.537 111.956 358.88 112.497 358.88 113.164C358.88 113.831 359.537 114.372 360.347 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 114.372C356.176 114.372 356.833 113.831 356.833 113.164C356.833 112.497 356.176 111.956 355.366 111.956C354.555 111.956 353.899 112.497 353.899 113.164C353.899 113.831 354.555 114.372 355.366 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 113.164C348.894 113.837 349.543 114.372 350.361 114.372C351.179 114.372 351.828 113.837 351.828 113.164C351.828 112.49 351.179 111.956 350.361 111.956C349.543 111.956 348.894 112.49 348.894 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 114.372C346.214 114.372 346.871 113.831 346.871 113.164C346.871 112.497 346.214 111.956 345.404 111.956C344.593 111.956 343.937 112.497 343.937 113.164C343.937 113.831 344.593 114.372 345.404 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 114.372C341.209 114.372 341.866 113.831 341.866 113.164C341.866 112.497 341.209 111.956 340.399 111.956C339.588 111.956 338.931 112.497 338.931 113.164C338.931 113.831 339.588 114.372 340.399 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 113.164C333.95 113.837 334.6 114.372 335.418 114.372C336.235 114.372 336.885 113.837 336.885 113.164C336.885 112.49 336.235 111.956 335.418 111.956C334.6 111.956 333.95 112.49 333.95 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 113.163C328.969 113.837 329.618 114.371 330.436 114.371C331.254 114.371 331.904 113.837 331.904 113.163C331.904 112.49 331.254 111.956 330.436 111.956C329.618 111.936 328.969 112.49 328.969 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 114.372C326.266 114.372 326.923 113.831 326.923 113.164C326.923 112.497 326.266 111.956 325.455 111.956C324.645 111.956 323.988 112.497 323.988 113.164C323.988 113.831 324.645 114.372 325.455 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 114.372C321.284 114.372 321.941 113.831 321.941 113.164C321.941 112.497 321.284 111.956 320.474 111.956C319.664 111.956 319.007 112.497 319.007 113.164C319.007 113.831 319.664 114.372 320.474 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 113.163C314.002 113.837 314.651 114.371 315.469 114.371C316.287 114.371 316.936 113.837 316.936 113.163C316.936 112.49 316.287 111.956 315.469 111.956C314.675 111.936 314.002 112.49 314.002 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 113.164C309.021 113.837 309.67 114.372 310.488 114.372C311.306 114.372 311.956 113.837 311.956 113.164C311.956 112.49 311.306 111.956 310.488 111.956C309.67 111.956 309.021 112.49 309.021 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 114.372C306.341 114.372 306.998 113.831 306.998 113.164C306.998 112.497 306.341 111.956 305.531 111.956C304.72 111.956 304.063 112.497 304.063 113.164C304.063 113.831 304.72 114.372 305.531 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 114.372C301.336 114.372 301.993 113.831 301.993 113.164C301.993 112.497 301.336 111.956 300.526 111.956C299.716 111.956 299.059 112.497 299.059 113.164C299.059 113.831 299.716 114.372 300.526 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 113.164C294.077 113.837 294.727 114.372 295.545 114.372C296.362 114.372 297.012 113.837 297.012 113.164C297.012 112.49 296.362 111.956 295.545 111.956C294.727 111.956 294.077 112.49 294.077 113.164Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 113.163C289.096 113.837 289.745 114.371 290.563 114.371C291.381 114.371 292.031 113.837 292.031 113.163C292.031 112.49 291.381 111.956 290.563 111.956C289.745 111.936 289.096 112.49 289.096 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 114.372C286.392 114.372 287.049 113.831 287.049 113.164C287.049 112.497 286.392 111.956 285.582 111.956C284.772 111.956 284.115 112.497 284.115 113.164C284.115 113.831 284.772 114.372 285.582 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 113.163C279.134 113.837 279.783 114.371 280.601 114.371C281.419 114.371 282.069 113.837 282.069 113.163C282.069 112.49 281.419 111.956 280.601 111.956C279.783 111.936 279.134 112.49 279.134 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 113.163C274.129 113.837 274.778 114.371 275.596 114.371C276.414 114.371 277.063 113.837 277.063 113.163C277.063 112.49 276.414 111.956 275.596 111.956C274.802 111.936 274.129 112.49 274.129 113.163Z",fill:"#5840D2"}),a.createElement("path",{d:"M270.639 114.372C271.449 114.372 272.106 113.831 272.106 113.164C272.106 112.497 271.449 111.956 270.639 111.956C269.829 111.956 269.172 112.497 269.172 113.164C269.172 113.831 269.829 114.372 270.639 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 114.372C146.85 114.372 147.507 113.831 147.507 113.164C147.507 112.497 146.85 111.956 146.039 111.956C145.229 111.956 144.572 112.497 144.572 113.164C144.572 113.831 145.229 114.372 146.039 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 114.372C141.845 114.372 142.502 113.831 142.502 113.164C142.502 112.497 141.845 111.956 141.034 111.956C140.224 111.956 139.567 112.497 139.567 113.164C139.567 113.831 140.224 114.372 141.034 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 114.372C136.863 114.372 137.52 113.831 137.52 113.164C137.52 112.497 136.863 111.956 136.053 111.956C135.243 111.956 134.586 112.497 134.586 113.164C134.586 113.831 135.243 114.372 136.053 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 114.372C131.882 114.372 132.539 113.831 132.539 113.164C132.539 112.497 131.882 111.956 131.072 111.956C130.262 111.956 129.605 112.497 129.605 113.164C129.605 113.831 130.262 114.372 131.072 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 114.372C126.901 114.372 127.558 113.831 127.558 113.164C127.558 112.497 126.901 111.956 126.091 111.956C125.281 111.956 124.624 112.497 124.624 113.164C124.624 113.831 125.281 114.372 126.091 114.372Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 108.576C513.39 109.249 514.039 109.784 514.857 109.784C515.675 109.784 516.325 109.249 516.325 108.576C516.325 107.903 515.675 107.368 514.857 107.368C514.039 107.348 513.39 107.903 513.39 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 109.784C490.738 109.784 491.395 109.243 491.395 108.576C491.395 107.909 490.738 107.368 489.928 107.368C489.117 107.368 488.46 107.909 488.46 108.576C488.46 109.243 489.117 109.784 489.928 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 108.576C483.479 109.25 484.129 109.784 484.947 109.784C485.764 109.784 486.414 109.25 486.414 108.576C486.414 107.903 485.764 107.368 484.947 107.368C484.129 107.368 483.479 107.903 483.479 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 108.576C478.498 109.249 479.148 109.784 479.965 109.784C480.783 109.784 481.433 109.249 481.433 108.576C481.433 107.903 480.783 107.368 479.965 107.368C479.148 107.348 478.498 107.903 478.498 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 109.784C475.795 109.784 476.452 109.243 476.452 108.576C476.452 107.909 475.795 107.368 474.984 107.368C474.174 107.368 473.517 107.909 473.517 108.576C473.517 109.243 474.174 109.784 474.984 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 109.784C470.814 109.784 471.471 109.243 471.471 108.576C471.471 107.909 470.814 107.368 470.003 107.368C469.193 10
37.368 468.536 107.909 468.536 108.576C468.536 109.243 469.193 109.784 470.003 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 108.576C443.606 109.249 444.256 109.784 445.074 109.784C445.892 109.784 446.541 109.249 446.541 108.576C446.541 107.903 445.892 107.368 445.074 107.368C444.256 107.348 443.606 107.903 443.606 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 108.576C438.625 109.25 439.275 109.784 440.093 109.784C440.911 109.784 441.56 109.25 441.56 108.576C441.56 107.903 440.911 107.368 440.093 107.368C439.275 107.368 438.625 107.903 438.625 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 109.784C435.922 109.784 436.579 109.243 436.579 108.576C436.579 107.909 435.922 107.368 435.111 107.368C434.301 107.368 433.644 107.909 433.644 108.576C433.644 109.243 434.301 109.784 435.111 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 109.784C430.941 109.784 431.598 109.243 431.598 108.576C431.598 107.909 430.941 107.368 430.131 107.368C429.32 107.368 428.663 107.909 428.663 108.576C428.663 109.243 429.32 109.784 430.131 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 109.784C396.049 109.784 396.706 109.243 396.706 108.576C396.706 107.909 396.049 107.368 395.239 107.368C394.428 107.368 393.771 107.909 393.771 108.576C393.771 109.243 394.428 109.784 395.239 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 108.576C388.767 109.25 389.416 109.784 390.234 109.784C391.052 109.784 391.701 109.25 391.701 108.576C391.701 107.903 391.052 107.368 390.234 107.368C389.416 107.368 388.767 107.903 388.767 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 108.576C383.785 109.25 384.435 109.784 385.253 109.784C386.071 109.784 386.72 109.25 386.72 108.576C386.72 107.903 386.071 107.368 385.253 107.368C384.435 107.368 383.785 107.903 383.785 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 109.784C381.105 109.784 381.762 109.243 381.762 108.576C381.762 107.909 381.105 107.368 380.295 107.368C379.485 107.368 378.828 107.909 378.828 108.576C378.828 109.243 379.485 109.784 380.295 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 109.784C376.1 109.784 376.757 109.243 376.757 108.576C376.757 107.909 376.1 107.368 375.29 107.368C374.48 107.368 373.823 107.909 373.823 108.576C373.823 109.243 374.48 109.784 375.29 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 108.576C363.861 109.249 364.51 109.784 365.328 109.784C366.146 109.784 366.795 109.249 366.795 108.576C366.795 107.903 366.146 107.368 365.328 107.368C364.51 107.348 363.861 107.903 363.861 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 109.784C361.157 109.784 361.814 109.243 361.814 108.576C361.814 107.909 361.157 107.368 360.347 107.368C359.537 107.368 358.88 107.909 358.88 108.576C358.88 109.243 359.537 109.784 360.347 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 109.784C356.176 109.784 356.833 109.243 356.833 108.576C356.833 107.909 356.176 107.368 355.366 107.368C354.555 107.368 353.899 107.909 353.899 108.576C353.899 109.243 354.555 109.784 355.366 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 108.576C348.894 109.25 349.543 109.784 350.361 109.784C351.179 109.784 351.828 109.25 351.828 108.576C351.828 107.903 351.179 107.368 350.361 107.368C349.543 107.368 348.894 107.903 348.894 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 109.784C346.214 109.784 346.871 109.243 346.871 108.576C346.871 107.909 346.214 107.368 345.404 107.368C344.593 107.368 343.937 107.909 343.937 108.576C343.937 109.243 344.593 109.784 345.404 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 109.784C341.209 109.784 341.866 109.243 341.866 108.576C341.866 107.909 341.209 107.368 340.399 107.368C339.588 107.368 338.931 107.909 338.931 108.576C338.931 109.243 339.588 109.784 340.399 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 108.576C333.95 109.25 334.6 109.784 335.418 109.784C336.235 109.784 336.885 109.25 336.885 108.576C336.885 107.903 336.235 107.368 335.418 107.368C334.6 107.368 333.95 107.903 333.95 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 108.576C328.969 109.249 329.618 109.784 330.436 109.784C331.254 109.784 331.904 109.249 331.904 108.576C331.904 107.903 331.254 107.368 330.436 107.368C329.618 107.348 328.969 107.903 328.969 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 109.784C326.266 109.784 326.923 109.243 326.923 108.576C326.923 107.909 326.266 107.368 325.455 107.368C324.645 107.368 323.988 107.909 323.988 108.576C323.988 109.243 324.645 109.784 325.455 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 109.784C321.284 109.784 321.941 109.243 321.941 108.576C321.941 107.909 321.284 107.368 320.474 107.368C319.664 107.368 319.007 107.909 319.007 108.576C319.007 109.243 319.664 109.784 320.474 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 108.576C314.002 109.249 314.651 109.784 315.469 109.784C316.287 109.784 316.936 109.249 316.936 108.576C316.936 107.903 316.287 107.368 315.469 107.368C314.675 107.348 314.002 107.903 314.002 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 108.576C309.021 109.25 309.67 109.784 310.488 109.784C311.306 109.784 311.956 109.25 311.956 108.576C311.956 107.903 311.306 107.368 310.488 107.368C309.67 107.368 309.021 107.903 309.021 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 109.784C306.341 109.784 306.998 109.243 306.998 108.576C306.998 107.909 306.341 107.368 305.531 107.368C304.72 107.368 304.063 107.909 304.063 108.576C304.063 109.243 304.72 109.784 305.531 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 109.784C301.336 109.784 301.993 109.243 301.993 108.576C301.993 107.909 301.336 107.368 300.526 107.368C299.716 107.368 299.059 107.909 299.059 108.576C299.059 109.243 299.716 109.784 300.526 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 108.576C294.077 109.25 294.727 109.784 295.545 109.784C296.362 109.784 297.012 109.25 297.012 108.576C297.012 107.903 296.362 107.368 295.545 107.368C294.727 107.368 294.077 107.903 294.077 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 108.576C289.096 109.249 289.745 109.784 290.563 109.784C291.381 109.784 292.031 109.249 292.031 108.576C292.031 107.903 291.381 107.368 290.563 107.368C289.745 107.348 289.096 107.903 289.096 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 109.784C286.392 109.784 287.049 109.243 287.049 108.576C287.049 10
37.909 286.392 107.368 285.582 107.368C284.772 107.368 284.115 107.909 284.115 108.576C284.115 109.243 284.772 109.784 285.582 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 108.576C279.134 109.249 279.783 109.784 280.601 109.784C281.419 109.784 282.069 109.249 282.069 108.576C282.069 107.903 281.419 107.368 280.601 107.368C279.783 107.348 279.134 107.903 279.134 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 108.576C274.129 109.249 274.778 109.784 275.596 109.784C276.414 109.784 277.063 109.249 277.063 108.576C277.063 107.903 276.414 107.368 275.596 107.368C274.802 107.348 274.129 107.903 274.129 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M270.639 109.784C271.449 109.784 272.106 109.243 272.106 108.576C272.106 107.909 271.449 107.368 270.639 107.368C269.829 107.368 269.172 107.909 269.172 108.576C269.172 109.243 269.829 109.784 270.639 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 109.784C171.755 109.784 172.412 109.243 172.412 108.576C172.412 107.909 171.755 107.368 170.945 107.368C170.134 107.368 169.478 107.909 169.478 108.576C169.478 109.243 170.134 109.784 170.945 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 108.576C159.515 109.249 160.165 109.784 160.982 109.784C161.8 109.784 162.45 109.249 162.45 108.576C162.45 107.903 161.8 107.368 160.982 107.368C160.165 107.348 159.515 107.903 159.515 108.576Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 109.784C141.845 109.784 142.502 109.243 142.502 108.576C142.502 107.909 141.845 107.368 141.034 107.368C140.224 107.368 139.567 107.909 139.567 108.576C139.567 109.243 140.224 109.784 141.034 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 109.784C136.863 109.784 137.52 109.243 137.52 108.576C137.52 107.909 136.863 107.368 136.053 107.368C135.243 107.368 134.586 107.909 134.586 108.576C134.586 109.243 135.243 109.784 136.053 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 109.784C131.882 109.784 132.539 109.243 132.539 108.576C132.539 107.909 131.882 107.368 131.072 107.368C130.262 107.368 129.605 107.909 129.605 108.576C129.605 109.243 130.262 109.784 131.072 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 109.784C126.901 109.784 127.558 109.243 127.558 108.576C127.558 107.909 126.901 107.368 126.091 107.368C125.281 107.368 124.624 107.909 124.624 108.576C124.624 109.243 125.281 109.784 126.091 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 109.784C121.92 109.784 122.577 109.243 122.577 108.576C122.577 107.909 121.92 107.368 121.11 107.368C120.299 107.368 119.642 107.909 119.642 108.576C119.642 109.243 120.299 109.784 121.11 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 109.784C116.939 109.784 117.596 109.243 117.596 108.576C117.596 107.909 116.939 107.368 116.129 107.368C115.318 107.368 114.661 107.909 114.661 108.576C114.661 109.243 115.318 109.784 116.129 109.784Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 103.967C493.442 104.64 494.091 105.175 494.909 105.175C495.727 105.175 496.376 104.64 496.376 103.967C496.376 103.294 495.727 102.759 494.909 102.759C494.115 102.759 493.442 103.294 493.442 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 103.967C483.479 104.64 484.129 105.175 484.947 105.175C485.764 105.175 486.414 104.64 486.414 103.967C486.414 103.294 485.764 102.759 484.947 102.759C484.129 102.759 483.479 103.294 483.479 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 103.967C478.498 104.64 479.148 105.175 479.965 105.175C480.783 105.175 481.433 104.64 481.433 103.967C481.433 103.294 480.783 102.759 479.965 102.759C479.148 102.759 478.498 103.294 478.498 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 103.967C473.517 104.64 474.167 105.175 474.984 105.175C475.802 105.175 476.452 104.64 476.452 103.967C476.452 103.294 475.802 102.759 474.984 102.759C474.167 102.759 473.517 103.294 473.517 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 103.967C468.512 104.64 469.162 105.175 469.98 105.175C470.797 105.175 471.447 104.64 471.447 103.967C471.447 103.294 470.797 102.759 469.98 102.759C469.162 102.759 468.512 103.294 468.512 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 103.967C463.531 104.64 464.181 105.175 464.998 105.175C465.816 105.175 466.466 104.64 466.466 103.967C466.466 103.294 465.816 102.759 464.998 102.759C464.205 102.759 463.531 103.294 463.531 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 103.967C448.587 104.64 449.237 105.175 450.055 105.175C450.873 105.175 451.522 104.64 451.522 103.967C451.522 103.294 450.873 102.759 450.055 102.759C449.237 102.759 448.587 103.294 448.587 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 103.967C443.606 104.64 444.256 105.175 445.074 105.175C445.892 105.175 446.541 104.64 446.541 103.967C446.541 103.294 445.892 102.759 445.074 102.759C444.256 102.759 443.606 103.294 443.606 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 103.967C438.625 104.64 439.275 105.175 440.093 105.175C440.911 105.175 441.56 104.64 441.56 103.967C441.56 103.294 440.911 102.759 440.093 102.759C439.275 102.759 438.625 103.294 438.625 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 103.967C433.644 104.64 434.294 105.175 435.111 105.175C435.929 105.175 436.579 104.64 436.579 103.967C436.579 103.294 435.929 102.759 435.111 102.759C434.294 102.759 433.644 103.294 433.644 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 103.967C428.639 104.64 429.289 105.175 430.107 105.175C430.924 105.175 431.574 104.64 431.574 103.967C431.574 103.294 430.924 102.759 430.107 102.759C429.289 102.759 428.639 103.294 428.639 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 103.967C398.752 104.64 399.402 105.175 400.22 105.175C401.038 105.175 401.687 104.64 401.687 103.967C401.687 103.294 401.038 102.759 400.22 102.759C399.402 102.759 398.752 103.294 398.752 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 103.967C393.747 104.64 394.397 105.175 395.215 105.175C396.033 105.175 396.682 104.64 396.682 103.967C396.682 103.294 396.033 102.759 395.215 102.759C394.421 102.759 393.747 103.294 393.747 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 103.967C388.767 104.64 389.416 105.175 390.234 105.175C391.052 105.175 391.701 104.64 391.701 103.967C391.701 103.294 391.052 102.759 390.234 102.759C389.416 102.759 388.767 103.294 388.767 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 103.967C383.785 104.64 384.435 105.175 385.253 105.175C386.071 105.175 386.72 104.64 386.72 103.967C386.72 103.294 386.071 102.759 385.253 102.759C384.435 102.759 383.785 103.294 383.785 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 103.967C378.804 104.64 379.454 105.175 380.271 105.175C381.089 105.175 381.739 104.64 381.739 103.967C381.739 103.294 381.089 102.759 380.271 102.759C379.478 102.759 378.804 103.294 378.804 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 103.967C373.823 104.64 374.472 105.175 375.29 105.175C376.108 105.175 376.757 104.64 376.757 103.967C376.757 103.294 376.108 102.759 375.29 102.759C374.472 102.759 373.823 103.294 373.823 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 103.967C368.842 104.64 369.491 105.175 370.309 105.175C371.127 105.175 371.777 104.64 371.777 103.967C371.777 103.294 371.127 102.759 370.309 102.759C369.491 102.759 368.842 103.294 368.842 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 103.967C358.88 104.64 359.529 105.175 360.347 105.175C361.165 105.175 361.814 104.64 361.814 103.967C361.814 103.294 361.165 102.759 360.347 102.759C359.529 102.759 358.88 103.294 358.88 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 103.967C353.875 104.64 354.524 105.175 355.342 105.175C356.16 105.175 356.809 104.64 356.809 103.967C356.809 103.294 356.16 102.759 355.342 102.759C354.548 102.759 353.875 103.294 353.875 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 103.967C348.894 104.64 349.543 105.175 350.361 105.175C351.179 105.175 351.828 104.64 351.828 103.967C351.828 103.294 351.179 102.759 350.361 102.759C349.543 102.759 348.894 103.294 348.894 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 103.967C343.912 104.64 344.562 105.175 345.38 105.175C346.198 105.175 346.847 104.64 346.847 103.967C346.847 103.294 346.198 102.759 345.38 102.759C344.562 102.759 343.912 103.294 343.912 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 103.967C338.931 104.64 339.581 105.175 340.399 105.175C341.217 105.175 341.866 104.64 341.866 103.967C341.866 103.294 341.217 102.759 340.399 102.759C339.581 102.759 338.931 103.294 338.931 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 103.967C333.95 104.64 334.6 105.175 335.418 105.175C336.235 105.175 336.885 104.64 336.885 103.967C336.885 103.294 336.235 102.759 335.418 102.759C334.6 102.759 333.95 103.294 333.95 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 103.967C328.969 104.64 329.618 105.175 330.436 105.175C331.254 105.175 331.904 104.64 331.904 103.967C331.904 103.294 331.254 102.759 330.436 102.759C329.618 102.759 328.969 103.294 328.969 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 103.967C323.988 104.64 324.638 105.175 325.455 105.175C326.273 105.175 326.923 104.64 326.923 103.967C326.923 103.294 326.273 102.759 325.455 102.759C324.638 102.759 323.988 103.294 323.988 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 103.967C319.007 104.64 319.656 105.175 320.474 105.175C321.292
3105.175 321.941 104.64 321.941 103.967C321.941 103.294 321.292 102.759 320.474 102.759C319.656 102.759 319.007 103.294 319.007 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 103.967C314.002 104.64 314.651 105.175 315.469 105.175C316.287 105.175 316.936 104.64 316.936 103.967C316.936 103.294 316.287 102.759 315.469 102.759C314.675 102.759 314.002 103.294 314.002 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 103.967C309.021 104.64 309.67 105.175 310.488 105.175C311.306 105.175 311.956 104.64 311.956 103.967C311.956 103.294 311.306 102.759 310.488 102.759C309.67 102.759 309.021 103.294 309.021 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 103.967C304.04 104.64 304.689 105.175 305.507 105.175C306.325 105.175 306.974 104.64 306.974 103.967C306.974 103.294 306.325 102.759 305.507 102.759C304.689 102.759 304.04 103.294 304.04 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 103.967C299.059 104.64 299.708 105.175 300.526 105.175C301.344 105.175 301.993 104.64 301.993 103.967C301.993 103.294 301.344 102.759 300.526 102.759C299.708 102.759 299.059 103.294 299.059 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 103.967C294.077 104.64 294.727 105.175 295.545 105.175C296.362 105.175 297.012 104.64 297.012 103.967C297.012 103.294 296.362 102.759 295.545 102.759C294.727 102.759 294.077 103.294 294.077 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 103.967C289.096 104.64 289.745 105.175 290.563 105.175C291.381 105.175 292.031 104.64 292.031 103.967C292.031 103.294 291.381 102.759 290.563 102.759C289.745 102.759 289.096 103.294 289.096 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 103.967C284.115 104.64 284.764 105.175 285.582 105.175C286.4 105.175 287.049 104.64 287.049 103.967C287.049 103.294 286.4 102.759 285.582 102.759C284.764 102.759 284.115 103.294 284.115 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 103.967C279.134 104.64 279.783 105.175 280.601 105.175C281.419 105.175 282.069 104.64 282.069 103.967C282.069 103.294 281.419 102.759 280.601 102.759C279.783 102.759 279.134 103.294 279.134 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 103.967C274.129 104.64 274.778 105.175 275.596 105.175C276.414 105.175 277.063 104.64 277.063 103.967C277.063 103.294 276.414 102.759 275.596 102.759C274.802 102.759 274.129 103.294 274.129 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M269.148 103.967C269.148 104.64 269.797 105.175 270.615 105.175C271.433 105.175 272.082 104.64 272.082 103.967C272.082 103.294 271.433 102.759 270.615 102.759C269.797 102.759 269.148 103.294 269.148 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 103.967C169.478 104.64 170.127 105.175 170.945 105.175C171.763 105.175 172.412 104.64 172.412 103.967C172.412 103.294 171.763 102.759 170.945 102.759C170.127 102.759 169.478 103.294 169.478 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 103.967C159.515 104.64 160.165 105.175 160.982 105.175C161.8 105.175 162.45 104.64 162.45 103.967C162.45 103.294 161.8 102.759 160.982 102.759C160.165 102.759 159.515 103.294 159.515 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M139.567 103.967C139.567 104.64 140.216 105.175 141.034 105.175C141.852 105.175 142.502 104.64 142.502 103.967C142.502 103.294 141.852 102.759 141.034 102.759C140.24 102.759 139.567 103.294 139.567 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 103.967C134.586 104.64 135.235 105.175 136.053 105.175C136.871 105.175 137.52 104.64 137.52 103.967C137.52 103.294 136.871 102.759 136.053 102.759C135.235 102.759 134.586 103.294 134.586 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 103.967C124.624 104.64 125.273 105.175 126.091 105.175C126.909 105.175 127.558 104.64 127.558 103.967C127.558 103.294 126.909 102.759 126.091 102.759C125.273 102.759 124.624 103.294 124.624 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 103.967C119.642 104.64 120.292 105.175 121.11 105.175C121.928 105.175 122.577 104.64 122.577 103.967C122.577 103.294 121.928 102.759 121.11 102.759C120.292 102.759 119.642 103.294 119.642 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 103.967C114.637 104.64 115.287 105.175 116.105 105.175C116.923 105.175 117.572 104.64 117.572 103.967C117.572 103.294 116.923 102.759 116.105 102.759C115.311 102.759 114.637 103.294 114.637 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 103.967C109.656 104.64 110.305 105.175 111.123 105.175C111.941 105.175 112.591 104.64 112.591 103.967C112.591 103.294 111.941 102.759 111.123 102.759C110.33 102.759 109.656 103.294 109.656 103.967Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 99.3797C498.423 100.053 499.072 100.588 499.89 100.588C500.708 100.588 501.358 100.053 501.358 99.3797C501.358 98.7064 500.708 98.1716 499.89 98.1716C499.072 98.1716 498.423 98.7064 498.423 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 99.3797C493.442 100.053 494.091 100.588 494.909 100.588C495.727 100.588 496.376 100.053 496.376 99.3797C496.376 98.7064 495.727 98.1716 494.909 98.1716C494.115 98.1716 493.442 98.7064 493.442 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 99.3797C488.46 100.053 489.11 100.588 489.928 100.588C490.746 100.588 491.395 100.053 491.395 99.3797C491.395 98.7064 490.746 98.1716 489.928 98.1716C489.11 98.1716 488.46 98.7064 488.46 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 99.3797C483.479 100.053 484.129 100.588 484.947 100.588C485.764 100.588 486.414 100.053 486.414 99.3797C486.414 98.7064 485.764 98.1716 484.947 98.1716C484.129 98.1716 483.479 98.7064 483.479 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 99.3797C478.498 100.053 479.148 100.588 479.965 100.588C480.783 100.588 481.433 100.053 481.433 99.3797C481.433 98.7064 480.783 98.1716 479.965 98.1716C479.148 98.1716 478.498 98.7064 478.498 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 99.3797C473.517 100.053 474.167 100.588 474.984 100.588C475.802 100.588 476.452 100.053 476.452 99.3797C476.452 98.7064 475.802 98.1716 474.984 98.1716C474.167 98.1716 473.517 98.7064 473.517 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 99.3797C468.512 100.053 469.162 100.588 469.98 100.588C470.797 100.588 471.447 100.053 471.447 99.3797C471.447 98.7064 470.797 98.1716 469.98 98.1716C469.162 98.1716 468.512 98.7064 468.512 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 99.3797C463.531 100.053 464.181 100.588 464.998 100.588C465.816 100.588 466.466 100.053 466.466 99.3797C466.466 98.7064 465.816 98.1716 464.998 98.1716C464.205 98.1716 463.531 98.7064 463.531 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 99.3797C458.55 100.053 459.199 100.588 460.017 100.588C460.835 100.588 461.484 100.053 461.484 99.3797C461.484 98.7064 460.835 98.1716 460.017 98.1716C459.199 98.1716 458.55 98.7064 458.55 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 99.3797C453.569 100.053 454.218 100.588 455.036 100.588C455.854 100.588 456.504 100.053 456.504 99.3797C456.504 98.7064 455.854 98.1716 455.036 98.1716C454.218 98.1716 453.569 98.7064 453.569 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 99.3797C448.587 100.053 449.237 100.588 450.055 100.588C450.873 100.588 451.522 100.053 451.522 99.3797C451.522 98.7064 450.873 98.1716 450.055 98.1716C449.237 98.1716 448.587 98.7064 448.587 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 99.3797C443.606 100.053 444.256 100.588 445.074 100.588C445.892 100.588 446.541 100.053 446.541 99.3797C446.541 98.7064 445.892 98.1716 445.074 98.1716C444.256 98.1716 443.606 98.7064 443.606 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 99.3797C438.625 100.053 439.275 100.588 440.093 100.588C440.911 100.588 441.56 100.053 441.56 99.3797C441.56 98.7064 440.911 98.1716 440.093 98.1716C439.275 98.1716 438.625 98.7064 438.625 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 99.3797C433.644 100.053 434.294 100.588 435.111 100.588C435.929 100.588 436.579 100.053 436.579 99.3797C436.579 98.7064 435.929 98.1716 435.111 98.1716C434.294 98.1716 433.644 98.7064 433.644 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 99.3797C428.639 100.053 429.289 100.588 430.107 100.588C430.924 100.588 431.574 100.053 431.574 99.3797C431.574 98.7064 430.924 98.1716 430.107 98.1716C429.289 98.1716 428.639 98.7064 428.639 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 99.3797C423.658 100.053 424.308 100.588 425.126 100.588C425.943 100.588 426.593 100.053 426.593 99.3797C426.593 98.7064 425.943 98.1716 425.126 98.1716C424.308 98.1716 423.658 98.7064 423.658 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 99.3797C398.752 100.053 399.402 100.588 400.22 100.588C401.038 100.588 401.687 100.053 401.687 99.3797C401.687 98.7064 401.038 98.1716 400.22 98.1716C399.402 98.1716 398.752 98.7064 398.752 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 99.3797C393.747 100.053 394.397 100.588 395.215 100.588C396.033 100.588 396.682 100.053 396.682 99.3797C396.682 98.7064 396.033 98.1716 395.215 98.1716C394.421 98.1716 393.747 98.7064 393.747 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 99.3797C388.767 100.053 389.416 100.588 390.234 100.588C391.052 100.588 391.701 100.053 391.701 99.3797C391.701 98.7064 391.052 98.1716 390.234 98.1716C389.416 98.1716 388.767 98.7064 388.767 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 99.3797C383.785 100.053 384.435 100.588 385.253 100.588C386.071 100.588 386.72 100.053 386.72 99.3797C386.72 98.7064 386.071 98.1716 385.253 98.1716C384.435 98.1716 383.785 98.7064 383.785 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 99.3797C378.804 100.053 379.454 100.588 380.271 100.588C381.089 100.588 381.739 100.053 381.739 99.3797C381.739 98.7064 381.089 98.1716 380.271 98.1716C379.478 98.1716 378.804 98.7064 378.804 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 99.3797C373.823 100.053 374.472 100.588 375.29 100.588C376.108 100.588 376.757 100.053 376.757 99.3797C376.757 98.7064 376.108 98.1716 375.29 98.1716C374.472 98.1716 373.823 98.7064 373.823 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 99.3797C368.842 100.053 369.491 100.588 370.309 100.588C371.127 100.588 371.777 100.053 371.777 99.3797C371.777 98.7064 371.127 98.1716 370.309 98.1716C369.491 98.1716 368.842 98.7064 368.842 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 99.3797C358.88 100.053 359.529 100.588 360.347 100.588C361.165 100.588 361.814 100.053 361.814 99.3797C361.814 98.7064 361.165 98.1716 360.347 98.1716C359.529 98.1716 358.88 98.7064 358.88 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 99.3797C353.875 100.053 354.524 100.588 355.342 100.588C356.16 100.588 356.809 100.053 356.809 99.3797C356.809 98.7064 356.16 98.1716 355.342 98.1716C354.548 98.1716 353.875 98.7064 353.875 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 99.3797C348.894 100.053 349.543 100.588 350.361 100.588C351.179 100.588 351.828 100.053 351.828 99.3797C351.828 98.7064 351.179 98.1716 350.361 98.1716C349.543 98.1716 348.894 98.7064 348.894 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 99.3797C343.912 100.053 344.562 100.588 345.38 100.588C346.198 100.588 346.847 100.053 346.847 99.3797C346.847 98.7064 346.198 98.1716 345.38 98.1716C344.562 98.1716 343.912 98.7064 343.912 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 99.3797C338.931 100.053 339.581 100.588 340.399 100.588C341.217 100.588 341.866 100.053 341.866 99.3797C341.866 98.7064 341.217 98.1716 340.399 98.1716C339.581 98.1716 338.931 98.7064 338.931 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 99.3797C333.95 100.053 334.6 100.588 335.418 100.588C336.235 100.588 336.885 100.053 336.885 99.3797C336.885 98.7064 336.235 98.1716 335.418 98.1716C334.6 98.1716 333.95 98.7064 333.95 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 99.3797C328.969 100.053 329.618 100.588 330.436 100.588C331.254 100.588 331.904 100.053 331.904 99.3797C331.904 98.7064 331.254 98.1716 330.436 98.1716C329.618 98.1716 328.969 98.7064 328.969 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 99.3797C323.988 100.053 324.638 100.588 325.455 100.588C326.273 100.588 326.923 100.053 326.923 99.3797C326.923 98.7064 326.273 98.1716 325.455 98.1716C324.638 98.1716 323.988 98.7064 323.988 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 99.3797C319.007 100.053 319.656 100.588 320.474 100.588C321.292
3100.588 321.941 100.053 321.941 99.3797C321.941 98.7064 321.292 98.1716 320.474 98.1716C319.656 98.1716 319.007 98.7064 319.007 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 99.3797C314.002 100.053 314.651 100.588 315.469 100.588C316.287 100.588 316.936 100.053 316.936 99.3797C316.936 98.7064 316.287 98.1716 315.469 98.1716C314.675 98.1716 314.002 98.7064 314.002 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 99.3797C309.021 100.053 309.67 100.588 310.488 100.588C311.306 100.588 311.956 100.053 311.956 99.3797C311.956 98.7064 311.306 98.1716 310.488 98.1716C309.67 98.1716 309.021 98.7064 309.021 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 99.3797C304.04 100.053 304.689 100.588 305.507 100.588C306.325 100.588 306.974 100.053 306.974 99.3797C306.974 98.7064 306.325 98.1716 305.507 98.1716C304.689 98.1716 304.04 98.7064 304.04 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 99.3797C299.059 100.053 299.708 100.588 300.526 100.588C301.344 100.588 301.993 100.053 301.993 99.3797C301.993 98.7064 301.344 98.1716 300.526 98.1716C299.708 98.1716 299.059 98.7064 299.059 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 99.3797C294.077 100.053 294.727 100.588 295.545 100.588C296.362 100.588 297.012 100.053 297.012 99.3797C297.012 98.7064 296.362 98.1716 295.545 98.1716C294.727 98.1716 294.077 98.7064 294.077 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 99.3797C289.096 100.053 289.745 100.588 290.563 100.588C291.381 100.588 292.031 100.053 292.031 99.3797C292.031 98.7064 291.381 98.1716 290.563 98.1716C289.745 98.1716 289.096 98.7064 289.096 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 99.3797C284.115 100.053 284.764 100.588 285.582 100.588C286.4 100.588 287.049 100.053 287.049 99.3797C287.049 98.7064 286.4 98.1716 285.582 98.1716C284.764 98.1716 284.115 98.7064 284.115 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 99.3797C279.134 100.053 279.783 100.588 280.601 100.588C281.419 100.588 282.069 100.053 282.069 99.3797C282.069 98.7064 281.419 98.1716 280.601 98.1716C279.783 98.1716 279.134 98.7064 279.134 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 99.3797C274.129 100.053 274.778 100.588 275.596 100.588C276.414 100.588 277.063 100.053 277.063 99.3797C277.063 98.7064 276.414 98.1716 275.596 98.1716C274.802 98.1716 274.129 98.7064 274.129 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M269.148 99.3797C269.148 100.053 269.797 100.588 270.615 100.588C271.433 100.588 272.082 100.053 272.082 99.3797C272.082 98.7064 271.433 98.1716 270.615 98.1716C269.797 98.1716 269.148 98.7064 269.148 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 99.3797C154.51 100.053 155.16 100.588 155.978 100.588C156.796 100.588 157.445 100.053 157.445 99.3797C157.445 98.7064 156.796 98.1716 155.978 98.1716C155.184 98.1716 154.51 98.7064 154.51 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 99.3797C119.642 100.053 120.292 100.588 121.11 100.588C121.928 100.588 122.577 100.053 122.577 99.3797C122.577 98.7064 121.928 98.1716 121.11 98.1716C120.292 98.1716 119.642 98.7064 119.642 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 99.3797C114.637 100.053 115.287 100.588 116.105 100.588C116.923 100.588 117.572 100.053 117.572 99.3797C117.572 98.7064 116.923 98.1716 116.105 98.1716C115.311 98.1716 114.637 98.7064 114.637 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 99.3797C109.656 100.053 110.305 100.588 111.123 100.588C111.941 100.588 112.591 100.053 112.591 99.3797C112.591 98.7064 111.941 98.1716 111.123 98.1716C110.33 98.1716 109.656 98.7064 109.656 99.3797Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 96C510.687 96 511.344 95.4592 511.344 94.792C511.344 94.1248 510.687 93.5839 509.876 93.5839C509.066 93.5839 508.409 94.1248 508.409 94.792C508.409 95.4592 509.066 96 509.876 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 96C505.705 96 506.362 95.4592 506.362 94.792C506.362 94.1248 505.705 93.5839 504.895 93.5839C504.085 93.5839 503.428 94.1248 503.428 94.792C503.428 95.4592 504.085 96 504.895 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 94.792C498.423 95.4653 499.072 9
36 499.89 96C500.708 96 501.358 95.4653 501.358 94.792C501.358 94.1186 500.708 93.5839 499.89 93.5839C499.072 93.5839 498.423 94.1186 498.423 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 94.792C493.442 95.4652 494.091 95.9998 494.909 95.9998C495.727 95.9998 496.376 95.4652 496.376 94.792C496.376 94.1188 495.727 93.5842 494.909 93.5842C494.115 93.5644 493.442 94.1188 493.442 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 96C490.738 96 491.395 95.4592 491.395 94.792C491.395 94.1248 490.738 93.5839 489.928 93.5839C489.117 93.5839 488.46 94.1248 488.46 94.792C488.46 95.4592 489.117 96 489.928 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 94.792C483.479 95.4653 484.129 96 484.947 96C485.764 96 486.414 95.4653 486.414 94.792C486.414 94.1186 485.764 93.5839 484.947 93.5839C484.129 93.5839 483.479 94.1186 483.479 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 94.792C478.498 95.4652 479.148 95.9998 479.965 95.9998C480.783 95.9998 481.433 95.4652 481.433 94.792C481.433 94.1188 480.783 93.5842 479.965 93.5842C479.148 93.5644 478.498 94.1188 478.498 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 96C475.795 96 476.452 95.4592 476.452 94.792C476.452 94.1248 475.795 93.5839 474.984 93.5839C474.174 93.5839 473.517 94.1248 473.517 94.792C473.517 95.4592 474.174 96 474.984 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 96C470.814 96 471.471 95.4592 471.471 94.792C471.471 94.1248 470.814 93.5839 470.003 93.5839C469.193 93.5839 468.536 94.1248 468.536 94.792C468.536 95.4592 469.193 96 470.003 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 94.792C463.531 95.4652 464.181 95.9998 464.998 95.9998C465.816 95.9998 466.466 95.4652 466.466 94.792C466.466 94.1188 465.816 93.5842 464.998 93.5842C464.205 93.5644 463.531 94.1188 463.531 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 94.792C458.55 95.4653 459.199 96 460.017 96C460.835 96 461.484 95.4653 461.484 94.792C461.484 94.1186 460.835 93.5839 460.017 93.5839C459.199 93.5839 458.55 94.1186 458.55 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 96C455.847 96 456.504 95.4592 456.504 94.792C456.504 94.1248 455.847 93.5839 455.036 93.5839C454.226 93.5839 453.569 94.1248 453.569 94.792C453.569 95.4592 454.226 96 455.036 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 96C450.865 96 451.522 95.4592 451.522 94.792C451.522 94.1248 450.865 93.5839 450.055 93.5839C449.244 93.5839 448.587 94.1248 448.587 94.792C448.587 95.4592 449.244 96 450.055 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 94.792C443.606 95.4652 444.256 95.9998 445.074 95.9998C445.892 95.9998 446.541 95.4652 446.541 94.792C446.541 94.1188 445.892 93.5842 445.074 93.5842C444.256 93.5644 443.606 94.1188 443.606 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 94.792C438.625 95.4653 439.275 96 440.093 96C440.911 96 441.56 95.4653 441.56 94.792C441.56 94.1186 440.911 93.5839 440.093 93.5839C439.275 93.5839 438.625 94.1186 438.625 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 96C435.922 96 436.579 95.4592 436.579 94.792C436.579 94.1248 435.922 93.5839 435.111 93.5839C434.301 93.5839 433.644 94.1248 433.644 94.792C433.644 95.4592 434.301 96 435.111 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 96C430.941 96 431.598 95.4592 431.598 94.792C431.598 94.1248 430.941 93.5839 430.131 93.5839C429.32 93.5839 428.663 94.1248 428.663 94.792C428.663 95.4592 429.32 96 430.131 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 94.792C423.658 95.4653 424.308 96 425.126 96C425.943 96 426.593 95.4653 426.593 94.792C426.593 94.1186 425.943 93.5839 425.126 93.5839C424.308 93.5839 423.658 94.1186 423.658 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 94.792C418.677 95.4652 419.327 95.9998 420.145 95.9998C420.962 95.9998 421.612 95.4652 421.612 94.792C421.612 94.1188 420.962 93.5842 420.145 93.5842C419.351 93.5644 418.677 94.1188 418.677 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 94.792C408.715 95.4652 409.364 95.9998 410.182 95.9998C411 95.9998 411.65 95.4652 411.65 94.792C411.65 94.1188 411 93.5842 410.182 93.5842C409.364 93.5644 408.715 94.1188 408.715 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 96C401.03 96 401.687 95.4592 401.687 94.792C401.687 94.1248 401.03 93.5839 400.22 93.5839C399.409 93.5839 398.752 94.1248 398.752 94.792C398.752 95.4592 399.409 96 400.22 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 94.792C388.767 95.4653 389.416 96 390.234 96C391.052 9
36 391.701 95.4653 391.701 94.792C391.701 94.1186 391.052 93.5839 390.234 93.5839C389.416 93.5839 388.767 94.1186 388.767 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 94.792C383.785 95.4653 384.435 96 385.253 96C386.071 96 386.72 95.4653 386.72 94.792C386.72 94.1186 386.071 93.5839 385.253 93.5839C384.435 93.5839 383.785 94.1186 383.785 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 96C381.105 96 381.762 95.4592 381.762 94.792C381.762 94.1248 381.105 93.5839 380.295 93.5839C379.485 93.5839 378.828 94.1248 378.828 94.792C378.828 95.4592 379.485 96 380.295 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 96C376.1 96 376.757 95.4592 376.757 94.792C376.757 94.1248 376.1 93.5839 375.29 93.5839C374.48 93.5839 373.823 94.1248 373.823 94.792C373.823 95.4592 374.48 96 375.29 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 94.792C368.842 95.4652 369.491 95.9998 370.309 95.9998C371.127 95.9998 371.777 95.4652 371.777 94.792C371.777 94.1188 371.127 93.5842 370.309 93.5842C369.491 93.5644 368.842 94.1188 368.842 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 94.792C363.861 95.4652 364.51 95.9998 365.328 95.9998C366.146 95.9998 366.795 95.4652 366.795 94.792C366.795 94.1188 366.146 93.5842 365.328 93.5842C364.51 93.5644 363.861 94.1188 363.861 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 96C361.157 96 361.814 95.4592 361.814 94.792C361.814 94.1248 361.157 93.5839 360.347 93.5839C359.537 93.5839 358.88 94.1248 358.88 94.792C358.88 95.4592 359.537 96 360.347 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 96C356.176 96 356.833 95.4592 356.833 94.792C356.833 94.1248 356.176 93.5839 355.366 93.5839C354.555 93.5839 353.899 94.1248 353.899 94.792C353.899 95.4592 354.555 96 355.366 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 94.792C348.894 95.4653 349.543 96 350.361 96C351.179 96 351.828 95.4653 351.828 94.792C351.828 94.1186 351.179 93.5839 350.361 93.5839C349.543 93.5839 348.894 94.1186 348.894 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 96C346.214 96 346.871 95.4592 346.871 94.792C346.871 94.1248 346.214 93.5839 345.404 93.5839C344.593 93.5839 343.937 94.1248 343.937 94.792C343.937 95.4592 344.593 96 345.404 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 96C341.209 96 341.866 95.4592 341.866 94.792C341.866 94.1248 341.209 93.5839 340.399 93.5839C339.588 93.5839 338.931 94.1248 338.931 94.792C338.931 95.4592 339.588 96 340.399 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 94.792C333.95 95.4653 334.6 96 335.418 96C336.235 96 336.885 95.4653 336.885 94.792C336.885 94.1186 336.235 93.5839 335.418 93.5839C334.6 93.5839 333.95 94.1186 333.95 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 94.792C328.969 95.4652 329.618 95.9998 330.436 95.9998C331.254 95.9998 331.904 95.4652 331.904 94.792C331.904 94.1188 331.254 93.5842 330.436 93.5842C329.618 93.5644 328.969 94.1188 328.969 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 96C326.266 96 326.923 95.4592 326.923 94.792C326.923 94.1248 326.266 93.5839 325.455 93.5839C324.645 93.5839 323.988 94.1248 323.988 94.792C323.988 95.4592 324.645 96 325.455 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 96C321.284 96 321.941 95.4592 321.941 94.792C321.941 94.1248 321.284 93.5839 320.474 93.5839C319.664 93.5839 319.007 94.1248 319.007 94.792C319.007 95.4592 319.664 96 320.474 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 94.792C314.002 95.4652 314.651 95.9998 315.469 95.9998C316.287 95.9998 316.936 95.4652 316.936 94.792C316.936 94.1188 316.287 93.5842 315.469 93.5842C314.675 93.5644 314.002 94.1188 314.002 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 94.792C309.021 95.4653 309.67 96 310.488 96C311.306 96 311.956 95.4653 311.956 94.792C311.956 94.1186 311.306 93.5839 310.488 93.5839C309.67 93.5839 309.021 94.1186 309.021 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 96C306.341 96 306.998 95.4592 306.998 94.792C306.998 94.1248 306.341 93.5839 305.531 93.5839C304.72 93.5839 304.063 94.1248 304.063 94.792C304.063 95.4592 304.72 96 305.531 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 96C301.336 96 301.993 95.4592 301.993 94.792C301.993 94.1248 301.336 93.5839 300.526 93.5839C299.716 93.5839 299.059 94.1248 299.059 94.792C299.059 95.4592 299.716 96 300.526 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 94.792C294.077 95.4653 294.727 96 295.545 96C296.362 96 297.012 95.4653 297.012 94.792C297.012 94.1186 296.362 93.5839 295.545 93.5839C294.727 93.5839 294.077 94.1186 294.077 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 94.792C289.096 95.4652 289.745 95.9998 290.563 95.9998C291.381 95.9998 292.031 95.4652 292.031 94.792C292.031 94.1188 291.381 93.5842 290.563 93.5842C289.745 93.5644 289.096 94.1188 289.096 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 96C286.392 96 287.049 95.4592 287.049 94.792C287.049 94.1248 286.392 93.5839 285.582 93.5839C284.772 93.5839 284.115 94.1248 284.115 94.792C284.115 95.4592 284.772 96 285.582 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 94.792C279.134 95.4652 279.783 95.9998 280.601 95.9998C281.419 95.9998 282.069 95.4652 282.069 94.792C282.069 94.1188 281.419 93.5842 280.601 93.5842C279.783 93.5644 279.134 94.1188 279.134 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 94.792C274.129 95.4652 274.778 95.9998 275.596 95.9998C276.414 95.9998 277.063 95.4652 277.063 94.792C277.063 94.1188 276.414 93.5842 275.596 93.5842C274.802 93.5644 274.129 94.1188 274.129 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M270.639 96C271.449 96 272.106 95.4592 272.106 94.792C272.106 94.1248 271.449 93.5839 270.639 93.5839C269.829 93.5839 269.172 94.1248 269.172 94.792C269.172 95.4592 269.829 96 270.639 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 96C121.92 96 122.577 95.4592 122.577 94.792C122.577 94.1248 121.92 93.5839 12
31.11 93.5839C120.299 93.5839 119.642 94.1248 119.642 94.792C119.642 95.4592 120.299 96 121.11 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 96C116.939 96 117.596 95.4592 117.596 94.792C117.596 94.1248 116.939 93.5839 116.129 93.5839C115.318 93.5839 114.661 94.1248 114.661 94.792C114.661 95.4592 115.318 96 116.129 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 94.792C109.656 95.4652 110.305 95.9998 111.123 95.9998C111.941 95.9998 112.591 95.4652 112.591 94.792C112.591 94.1188 111.941 93.5842 111.123 93.5842C110.33 93.5644 109.656 94.1188 109.656 94.792Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 96C106.977 96 107.634 95.4592 107.634 94.792C107.634 94.1248 106.977 93.5839 106.166 93.5839C105.356 93.5839 104.699 94.1248 104.699 94.792C104.699 95.4592 105.356 96 106.166 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 96C101.972 96 102.629 95.4592 102.629 94.792C102.629 94.1248 101.972 93.5839 101.161 93.5839C100.351 93.5839 99.694 94.1248 99.694 94.792C99.694 95.4592 100.351 96 101.161 96Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 90.2043C513.39 90.8775 514.039 91.4121 514.857 91.4121C515.675 91.4121 516.325 90.8775 516.325 90.2043C516.325 89.5311 515.675 88.9965 514.857 88.9965C514.039 88.9767 513.39 89.5311 513.39 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 91.4128C510.687 91.4128 511.344 90.872 511.344 90.2048C511.344 89.5376 510.687 88.9967 509.876 88.9967C509.066 88.9967 508.409 89.5376 508.409 90.2048C508.409 90.872 509.066 91.4128 509.876 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 91.4128C505.705 91.4128 506.362 90.872 506.362 90.2048C506.362 89.5376 505.705 88.9967 504.895 88.9967C504.085 88.9967 503.428 89.5376 503.428 90.2048C503.428 90.872 504.085 91.4128 504.895 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 90.2048C498.423 90.8781 499.072 91.4128 499.89 91.4128C500.708 91.4128 501.358 90.8781 501.358 90.2048C501.358 89.5314 500.708 88.9967 499.89 88.9967C499.072 88.9967 498.423 89.5314 498.423 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 90.2043C493.442 90.8775 494.091 91.4121 494.909 91.4121C495.727 91.4121 496.376 90.8775 496.376 90.2043C496.376 89.5311 495.727 88.9965 494.909 88.9965C494.115 88.9767 493.442 89.5311 493.442 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 91.4128C490.738 91.4128 491.395 90.872 491.395 90.2048C491.395 89.5376 490.738 88.9967 489.928 88.9967C489.117 88.9967 488.46 89.5376 488.46 90.2048C488.46 90.872 489.117 91.4128 489.928 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 90.2048C483.479 90.8781 484.129 91.4128 484.947 91.4128C485.764 91.4128 486.414 90.8781 486.414 90.2048C486.414 89.5314 485.764 88.9967 484.947 88.9967C484.129 88.9967 483.479 89.5314 483.479 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 90.2043C478.498 90.8775 479.148 91.4121 479.965 91.4121C480.783 91.4121 481.433 90.8775 481.433 90.2043C481.433 89.5311 480.783 88.9965 479.965 88.9965C479.148 88.9767 478.498 89.5311 478.498 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 91.4126C475.795 91.4126 476.452 90.8718 476.452 90.2046C476.452 89.5374 475.795 88.9965 474.984 88.9965C474.174 88.9965 473.517 89.5374 473.517 90.2046C473.517 90.8718 474.174 91.4126 474.984 91.4126Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 91.4128C470.814 91.4128 471.471 90.872 471.471 90.2048C471.471 89.5376 470.814 88.9967 470.003 88.9967C469.193 88.9967 468.536 89.5376 468.536 90.2048C468.536 90.872 469.193 91.4128 470.003 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 90.2043C463.531 90.8775 464.181 91.4121 464.998 91.4121C465.816 91.4121 466.466 90.8775 466.466 90.2043C466.466 89.5311 465.816 88.9965 464.998 88.9965C464.205 88.9767 463.531 89.5311 463.531 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 90.2046C458.55 90.8779 459.199 91.4126 460.017 91.4126C460.835 91.4126 461.484 90.8779 461.484 90.2046C461.484 89.5312 460.835 88.9965 460.017 88.9965C459.199 88.9965 458.55 89.5312 458.55 90.2046Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 91.4128C455.847 91.4128 456.504 90.872 456.504 90.2048C456.504 89.5376 455.847 88.9967 455.036 88.9967C454.226 88.9967 453.569 89.5376 453.569 90.2048C453.569 90.872 454.226 91.4128 455.036 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 91.4128C450.865 91.4128 451.522 90.872 451.522 90.2048C451.522 89.5376 450.865 88.9967 450.055 88.9967C449.244 88.9967 448.587 89.5376 448.587 90.2048C448.587 90.872 449.244 91.4128 450.055 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 90.2043C443.606 90.8775 444.256 91.4121 445.074 91.4121C445.892 91.4121 446.541 90.8775 446.541 90.2043C446.541 89.5311 445.892 88.9965 445.074 88.9965C444.256 88.9767 443.606 89.5311 443.606 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 90.2048C438.625 90.8781 439.275 91.4128 440.093 91.4128C440.911 91.4128 441.56 90.8781 441.56 90.2048C441.56 89.5314 440.911 88.9967 440.093 88.9967C439.275 88.9967 438.625 89.5314 438.625 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 91.4128C435.922 91.4128 436.579 90.872 436.579 90.2048C436.579 89.5376 435.922 88.9967 435.111 88.9967C434.301 88.9967 433.644 89.5376 433.644 90.2048C433.644 90.872 434.301 91.4128 435.111 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 91.4128C430.941 91.4128 431.598 90.872 431.598 90.2048C431.598 89.5376 430.941 88.9967 430.131 88.9967C429.32 88.9967 428.663 89.5376 428.663 90.2048C428.663 90.872 429.32 91.4128 430.131 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 90.2048C423.658 90.8781 424.308 91.4128 425.126 91.4128C425.943 91.4128 426.593 90.8781 426.593 90.2048C426.593 89.5314 425.943 88.9967 425.126 88.9967C424.308 88.9967 423.658 89.5314 423.658 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 90.2043C418.677 90.8775 419.327 91.4121 420.145 91.4121C420.962 91.4121 421.612 90.8775 421.612 90.2043C421.612 89.5311 420.962 88.9965 420.145 88.9965C419.351 88.9767 418.677 89.5311 418.677 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 91.4128C415.974 91.4128 416.63 90.872 416.63 90.2048C416.63 89.5376 415.974 88.9967 415.163 88.9967C414.353 88.9967 413.696 89.5376 413.696 90.2048C413.696 90.872 414.353 91.4128 415.163 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 90.2043C408.715 90.8775 409.364 91.4121 410.182 91.4121C411 91.4121 411.65 90.8775 411.65 90.2043C411.65 89.5311 411 88.9965 410.182 88.9965C409.364 88.9767 408.715 89.5311 408.715 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 90.2043C403.734 90.8775 404.383 91.4121 405.201 91.4121C406.019 91.4121 406.668 90.8775 406.668 90.2043C406.668 89.5311 406.019 88.9965 405.201 88.9965C404.383 88.9767 403.734 89.5311 403.734 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 91.4126C401.03 91.4126 401.687 90.8718 401.687 90.2046C401.687 89.5374 401.03 88.9965 400.22 88.9965C399.409 88.9965 398.752 89.5374 398.752 90.2046C398.752 90.8718 399.409 91.4126 400.22 91.4126Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 91.4128C396.049 91.4128 396.706 90.872 396.706 90.2048C396.706 89.5376 396.049 88.9967 395.239 88.9967C394.428 88.9967 393.771 89.5376 393.771 90.2048C393.771 90.872 394.428 91.4128 395.239 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 90.2048C383.785 90.8781 384.435 91.4128 385.253 91.4128C386.071 91.4128 386.72 90.8781 386.72 90.2048C386.72 89.5314 386.071 88.9967 385.253 88.9967C384.435 88.9967 383.785 89.5314 383.785 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 91.4128C381.105 91.4128 381.762 90.872 381.762 90.2048C381.762 89.5376 381.105 88.9967 380.295 88.9967C379.485 88.9967 378.828 89.5376 378.828 90.2048C378.828 90.872 379.485 91.4128 380.295 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 91.4128C376.1 91.4128 376.757 90.872 376.757 90.2048C376.757 89.5376 376.1 88.9967 375.29 88.9967C374.48 88.9967 373.823 89.5376 373.823 90.2048C373.823 90.872 374.48 91.4128 375.29 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 90.2043C368.842 90.8775 369.491 91.4121 370.309 91.4121C371.127 91.4121 371.777 90.8775 371.777 90.2043C371.777 89.5311 371.127 88.9965 370.309 88.9965C369.491 88.9767 368.842 89.5311 368.842 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 90.2043C363.861 90.8775 364.51 91.4121 365.328 91.4121C366.146 91.4121 366.795 90.8775 366.795 90.2043C366.795 89.5311 366.146 88.9965 365.328 88.9965C364.51 88.9767 363.861 89.5311 363.861 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 91.4128C356.176 91.4128 356.833 90.872 356.833 90.2048C356.833 89.5376 356.176 88.9967 355.366 88.9967C354.555 88.9967 353.899 89.5376 353.899 90.2048C353.899 90.872 354.555 91.4128 355.366 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 90.2048C348.894 90.8781 349.543 91.4128 350.361 91.4128C351.179 91.4128 351.828 90.8781 351.828 90.2048C351.828 89.5314 351.179 88.9967 350.361 88.9967C349.543 88.9967 348.894 89.5314 348.894 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 91.4128C346.214 91.4128 346.871 90.872 346.871 90.2048C346.871 89.5376 346.214 88.9967 345.404 88.9967C344.593 88.9967 343.937 89.5376 343.937 90.2048C343.937 90.872 344.593 91.4128 345.404 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 91.4128C341.209 91.4128 341.866 90.872 341.866 90.2048C341.866 89.5376 341.209 88.9967 340.399 88.9967C339.588 88.9967 338.931 89.5376 338.931 90.2048C338.931 90.872 339.588 91.4128 340.399 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 90.2046C333.95 90.8779 334.6 91.412
36 335.418 91.4126C336.235 91.4126 336.885 90.8779 336.885 90.2046C336.885 89.5312 336.235 88.9965 335.418 88.9965C334.6 88.9965 333.95 89.5312 333.95 90.2046Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 90.2043C328.969 90.8775 329.618 91.4121 330.436 91.4121C331.254 91.4121 331.904 90.8775 331.904 90.2043C331.904 89.5311 331.254 88.9965 330.436 88.9965C329.618 88.9767 328.969 89.5311 328.969 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 91.4128C326.266 91.4128 326.923 90.872 326.923 90.2048C326.923 89.5376 326.266 88.9967 325.455 88.9967C324.645 88.9967 323.988 89.5376 323.988 90.2048C323.988 90.872 324.645 91.4128 325.455 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 91.4128C321.284 91.4128 321.941 90.872 321.941 90.2048C321.941 89.5376 321.284 88.9967 320.474 88.9967C319.664 88.9967 319.007 89.5376 319.007 90.2048C319.007 90.872 319.664 91.4128 320.474 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 90.2043C314.002 90.8775 314.651 91.4121 315.469 91.4121C316.287 91.4121 316.936 90.8775 316.936 90.2043C316.936 89.5311 316.287 88.9965 315.469 88.9965C314.675 88.9767 314.002 89.5311 314.002 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 90.2048C309.021 90.8781 309.67 91.4128 310.488 91.4128C311.306 91.4128 311.956 90.8781 311.956 90.2048C311.956 89.5314 311.306 88.9967 310.488 88.9967C309.67 88.9967 309.021 89.5314 309.021 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 91.4128C306.341 91.4128 306.998 90.872 306.998 90.2048C306.998 89.5376 306.341 88.9967 305.531 88.9967C304.72 88.9967 304.063 89.5376 304.063 90.2048C304.063 90.872 304.72 91.4128 305.531 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 91.4128C301.336 91.4128 301.993 90.872 301.993 90.2048C301.993 89.5376 301.336 88.9967 300.526 88.9967C299.716 88.9967 299.059 89.5376 299.059 90.2048C299.059 90.872 299.716 91.4128 300.526 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 90.2048C294.077 90.8781 294.727 91.4128 295.545 91.4128C296.362 91.4128 297.012 90.8781 297.012 90.2048C297.012 89.5314 296.362 88.9967 295.545 88.9967C294.727 88.9967 294.077 89.5314 294.077 90.2048Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 90.2043C289.096 90.8775 289.745 91.4121 290.563 91.4121C291.381 91.4121 292.031 90.8775 292.031 90.2043C292.031 89.5311 291.381 88.9965 290.563 88.9965C289.745 88.9767 289.096 89.5311 289.096 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 91.4126C286.392 91.4126 287.049 90.8718 287.049 90.2046C287.049 89.5374 286.392 88.9965 285.582 88.9965C284.772 88.9965 284.115 89.5374 284.115 90.2046C284.115 90.8718 284.772 91.4126 285.582 91.4126Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 90.2043C279.134 90.8775 279.783 91.4121 280.601 91.4121C281.419 91.4121 282.069 90.8775 282.069 90.2043C282.069 89.5311 281.419 88.9965 280.601 88.9965C279.783 88.9767 279.134 89.5311 279.134 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M274.129 90.2043C274.129 90.8775 274.778 91.4121 275.596 91.4121C276.414 91.4121 277.063 90.8775 277.063 90.2043C277.063 89.5311 276.414 88.9965 275.596 88.9965C274.802 88.9767 274.129 89.5311 274.129 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M151.02 91.4128C151.831 91.4128 152.488 90.872 152.488 90.2048C152.488 89.5376 151.831 88.9967 151.02 88.9967C150.21 88.9967 149.553 89.5376 149.553 90.2048C149.553 90.872 150.21 91.4128 151.02 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 91.4128C121.92 91.4128 122.577 90.872 122.577 90.2048C122.577 89.5376 121.92 88.9967 121.11 88.9967C120.299 88.9967 119.642 89.5376 119.642 90.2048C119.642 90.872 120.299 91.4128 121.11 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 91.4128C116.939 91.4128 117.596 90.872 117.596 90.2048C117.596 89.5376 116.939 88.9967 116.129 88.9967C115.318 88.9967 114.661 89.5376 114.661 90.2048C114.661 90.872 115.318 91.4128 116.129 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 90.2043C109.656 90.8775 110.305 91.4121 111.123 91.4121C111.941 91.4121 112.591 90.8775 112.591 90.2043C112.591 89.5311 111.941 88.9965 111.123 88.9965C110.33 88.9767 109.656 89.5311 109.656 90.2043Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 91.4128C106.977 91.4128 107.634 9
30.872 107.634 90.2048C107.634 89.5376 106.977 88.9967 106.166 88.9967C105.356 88.9967 104.699 89.5376 104.699 90.2048C104.699 90.872 105.356 91.4128 106.166 91.4128Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 91.4126C96.9909 91.4126 97.6478 90.8718 97.6478 90.2046C97.6478 89.5374 96.9909 88.9965 96.1805 88.9965C95.3701 88.9965 94.7131 89.5374 94.7131 90.2046C94.7131 90.8718 95.3701 91.4126 96.1805 91.4126Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 85.5956C513.39 86.269 514.039 86.8037 514.857 86.8037C515.675 86.8037 516.325 86.269 516.325 85.5956C516.325 84.9223 515.675 84.3876 514.857 84.3876C514.039 84.3876 513.39 84.9421 513.39 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 85.5956C508.385 86.269 509.035 86.8037 509.853 86.8037C510.67 86.8037 511.32 86.269 511.32 85.5956C511.32 84.9223 510.67 84.3876 509.853 84.3876C509.035 84.3876 508.385 84.9421 508.385 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 85.5956C503.404 86.269 504.053 86.8037 504.871 86.8037C505.689 86.8037 506.338 86.269 506.338 85.5956C506.338 84.9223 505.689 84.3876 504.871 84.3876C504.053 84.3876 503.404 84.9421 503.404 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 85.5956C498.423 86.269 499.072 86.8037 499.89 86.8037C500.708 86.8037 501.358 86.269 501.358 85.5956C501.358 84.9223 500.708 84.3876 499.89 84.3876C499.072 84.3876 498.423 84.9421 498.423 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 85.5956C493.442 86.269 494.091 86.8037 494.909 86.8037C495.727 86.8037 496.376 86.269 496.376 85.5956C496.376 84.9223 495.727 84.3876 494.909 84.3876C494.115 84.3876 493.442 84.9421 493.442 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 85.5956C488.46 86.269 489.11 86.8037 489.928 86.8037C490.746 86.8037 491.395 86.269 491.395 85.5956C491.395 84.9223 490.746 84.3876 489.928 84.3876C489.11 84.3876 488.46 84.9421 488.46 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 85.5956C483.479 86.269 484.129 86.8037 484.947 86.8037C485.764 86.8037 486.414 86.269 486.414 85.5956C486.414 84.9223 485.764 84.3876 484.947 84.3876C484.129 84.3876 483.479 84.9421 483.479 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 85.5956C478.498 86.269 479.148 86.8037 479.965 86.8037C480.783 86.8037 481.433 86.269 481.433 85.5956C481.433 84.9223 480.783 84.3876 479.965 84.3876C479.148 84.3876 478.498 84.9421 478.498 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 85.5956C473.517 86.269 474.167 86.8037 474.984 86.8037C475.802 86.8037 476.452 86.269 476.452 85.5956C476.452 84.9223 475.802 84.3876 474.984 84.3876C474.167 84.3876 473.517 84.9421 473.517 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 85.5956C468.512 86.269 469.162 86.8037 469.98 86.8037C470.797 86.8037 471.447 86.269 471.447 85.5956C471.447 84.9223 470.797 84.3876 469.98 84.3876C469.162 84.3876 468.512 84.9421 468.512 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 85.5956C463.531 86.269 464.181 86.8037 464.998 86.8037C465.816 86.8037 466.466 86.269 466.466 85.5956C466.466 84.9223 465.816 84.3876 464.998 84.3876C464.205 84.3876 463.531 84.9421 463.531 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 85.5956C458.55 86.269 459.199 86.8037 460.017 86.8037C460.835 86.8037 461.484 86.269 461.484 85.5956C461.484 84.9223 460.835 84.3876 460.017 84.3876C459.199 84.3876 458.55 84.9421 458.55 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 85.5956C453.569 86.269 454.218 86.8037 455.036 86.8037C455.854 86.8037 456.504 86.269 456.504 85.5956C456.504 84.9223 455.854 84.3876 455.036 84.3876C454.218 84.3876 453.569 84.9421 453.569 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 85.5956C448.587 86.269 449.237 86.8037 450.055 86.8037C450.873 86.8037 451.522 86.269 451.522 85.5956C451.522 84.9223 450.873 84.3876 450.055 84.3876C449.237 84.3876 448.587 84.9421 448.587 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 85.5956C443.606 86.269 444.256 86.8037 445.074 86.8037C445.892 86.8037 446.541 86.269 446.541 85.5956C446.541 84.9223 445.892 84.3876 445.074 84.3876C444.256 84.3876 443.606 84.9421 443.606 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 85.5956C438.625 86.269 439.275 86.8037 440.093 86.8037C440.911 86.8037 441.56 86.269 441.56 85.5956C441.56 84.9223 440.911 84.3876 440.093 84.3876C439.275 84.3876 438.625 84.9421 438.625 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 85.5956C433.644 86.269 434.294 86.8037 435.111 86.8037C435.929 86.8037 436.579 86.269 436.579 85.5956C436.579 84.9223 435.929 84.3876 435.111 84.3876C434.294 84.3876 433.644 84.9421 433.644 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 85.5956C428.639 86.269 429.289 86.8037 430.107 86.8037C430.924 86.8037 431.574 86.269 431.574 85.5956C431.574 84.9223 430.924 84.3876 430.107 84.3876C429.289 84.3876 428.639 84.9421 428.639 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 85.5956C423.658 86.269 424.308 86.8037 425.126 86.8037C425.943 86.8037 426.593 86.269 426.593 85.5956C426.593 84.9223 425.943 84.3876 425.126 84.3876C424.308 84.3876 423.658 84.9421 423.658 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 85.5956C418.677 86.269 419.327 86.8037 420.145 86.8037C420.962 86.8037 421.612 86.269 421.612 85.5956C421.612 84.9223 420.962 84.3876 420.145 84.3876C419.351 84.3876 418.677 84.9421 418.677 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 85.5956C413.696 86.269 414.345 86.8037 415.163 86.8037C415.981 86.8037 416.63 86.269 416.63 85.5956C416.63 84.9223 415.981 84.3876 415.163 84.3876C414.345 84.3876 413.696 84.9421 413.696 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 85.5956C408.715 86.269 409.364 86.8037 410.182 86.8037C411 86.8037 411.65 86.269 411.65 85.5956C411.65 84.9223 411 84.3876 410.182 84.3876C409.364 84.3876 408.715 84.9421 408.715 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 85.5956C403.734 86.269 404.383 86.8037 405.201 86.8037C406.019 86.8037 406.668 86.269 406.668 85.5956C406.668 84.9223 406.019 84.3876 405.201 84.3876C404.383 84.3876 403.734 84.9421 403.734 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 85.5956C398.752 86.269 399.402 86.8037 400.22 86.8037C401.038 86.8037 401.687 86.269 401.687 85.5956C401.687 84.9223 401.038 84.3876 400.22 84.3876C399.402 84.3876 398.752 84.9421 398.752 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 85.5956C393.747 86.269 394.397 86.8037 395.215 86.8037C396.033 86.8037 396.682 86.269 396.682 85.5956C396.682 84.9223 396.033 84.3876 395.215 84.3876C394.421 84.3876 393.747 84.9421 393.747 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 85.5956C388.767 86.269 389.416 86.8037 390.234 86.8037C391.052 86.8037 391.701 86.269 391.701 85.5956C391.701 84.9223 391.052 84.3876 390.234 84.3876C389.416 84.3876 388.767 84.9421 388.767 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 85.5956C378.804 86.269 379.454 86.8037 380.271 86.8037C381.089 86.8037 381.739 86.269 381.739 85.5956C381.739 84.9223 381.089 84.3876 380.271 84.3876C379.478 84.3876 378.804 84.9421 378.804 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 85.5956C373.823 86.269 374.472 86.8037 375.29 86.8037C376.108 86.8037 376.757 86.269 376.757 85.5956C376.757 84.9223 376.108 84.3876 375.29 84.3876C374.472 84.3876 373.823 84.9421 373.823 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 85.5956C368.842 86.269 369.491 86.8037 370.309 86.8037C371.127 86.8037 371.777 8
36.269 371.777 85.5956C371.777 84.9223 371.127 84.3876 370.309 84.3876C369.491 84.3876 368.842 84.9421 368.842 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 85.5956C363.861 86.269 364.51 86.8037 365.328 86.8037C366.146 86.8037 366.795 86.269 366.795 85.5956C366.795 84.9223 366.146 84.3876 365.328 84.3876C364.51 84.3876 363.861 84.9421 363.861 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 85.5956C358.88 86.269 359.529 86.8037 360.347 86.8037C361.165 86.8037 361.814 86.269 361.814 85.5956C361.814 84.9223 361.165 84.3876 360.347 84.3876C359.529 84.3876 358.88 84.9421 358.88 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 85.5956C353.875 86.269 354.524 86.8037 355.342 86.8037C356.16 86.8037 356.809 86.269 356.809 85.5956C356.809 84.9223 356.16 84.3876 355.342 84.3876C354.548 84.3876 353.875 84.9421 353.875 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 85.5956C348.894 86.269 349.543 86.8037 350.361 86.8037C351.179 86.8037 351.828 86.269 351.828 85.5956C351.828 84.9223 351.179 84.3876 350.361 84.3876C349.543 84.3876 348.894 84.9421 348.894 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 85.5956C343.912 86.269 344.562 86.8037 345.38 86.8037C346.198 86.8037 346.847 86.269 346.847 85.5956C346.847 84.9223 346.198 84.3876 345.38 84.3876C344.562 84.3876 343.912 84.9421 343.912 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 85.5956C338.931 86.269 339.581 86.8037 340.399 86.8037C341.217 86.8037 341.866 86.269 341.866 85.5956C341.866 84.9223 341.217 84.3876 340.399 84.3876C339.581 84.3876 338.931 84.9421 338.931 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 85.5956C333.95 86.269 334.6 86.8037 335.418 86.8037C336.235 86.8037 336.885 86.269 336.885 85.5956C336.885 84.9223 336.235 84.3876 335.418 84.3876C334.6 84.3876 333.95 84.9421 333.95 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 85.5956C328.969 86.269 329.618 86.8037 330.436 86.8037C331.254 86.8037 331.904 86.269 331.904 85.5956C331.904 84.9223 331.254 84.3876 330.436 84.3876C329.618 84.3876 328.969 84.9421 328.969 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 85.5956C323.988 86.269 324.638 86.8037 325.455 86.8037C326.273 86.8037 326.923 86.269 326.923 85.5956C326.923 84.9223 326.273 84.3876 325.455 84.3876C324.638 84.3876 323.988 84.9421 323.988 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 85.5956C319.007 86.269 319.656 86.8037 320.474 86.8037C321.292 86.8037 321.941 86.269 321.941 85.5956C321.941 84.9223 321.292 84.3876 320.474 84.3876C319.656 84.3876 319.007 84.9421 319.007 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 85.5956C314.002 86.269 314.651 86.8037 315.469 86.8037C316.287 86.8037 316.936 86.269 316.936 85.5956C316.936 84.9223 316.287 84.3876 315.469 84.3876C314.675 84.3876 314.002 84.9421 314.002 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 85.5956C309.021 86.269 309.67 86.8037 310.488 86.8037C311.306 86.8037 311.956 86.269 311.956 85.5956C311.956 84.9223 311.306 84.3876 310.488 84.3876C309.67 84.3876 309.021 84.9421 309.021 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 85.5956C304.04 86.269 304.689 86.8037 305.507 86.8037C306.325 86.8037 306.974 86.269 306.974 85.5956C306.974 84.9223 306.325 84.3876 305.507 84.3876C304.689 84.3876 304.04 84.9421 304.04 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 85.5956C299.059 86.269 299.708 86.8037 300.526 86.8037C301.344 86.8037 301.993 86.269 301.993 85.5956C301.993 84.9223 301.344 84.3876 300.526 84.3876C299.708 84.3876 299.059 84.9421 299.059 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 85.5956C294.077 86.269 294.727 86.8037 295.545 86.8037C296.362 86.8037 297.012 86.269 297.012 85.5956C297.012 84.9223 296.362 84.3876 295.545 84.3876C294.727 84.3876 294.077 84.9421 294.077 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 85.5956C289.096 86.269 289.745 86.8037 290.563 86.8037C291.381 86.8037 292.031 86.269 292.031 85.5956C292.031 84.9223 291.381 84.3876 290.563 84.3876C289.745 84.3876 289.096 84.9421 289.096 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 85.5956C284.115 86.269 284.764 86.8037 285.582 86.8037C286.4 86.8037 287.049 86.269 287.049 85.5956C287.049 84.9223 286.4 84.3876 285.582 84.3876C284.764 84.3876 284.115 84.9421 284.115 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 85.5956C279.134 86.269 279.783 86.8037 280.601 86.8037C281.419 86.8037 282.069 86.269 282.069 85.5956C282.069 84.9223 281.419 84.3876 280.601 84.3876C279.783 84.3876 279.134 84.9421 279.134 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 85.5956C149.529 86.269 150.179 86.8037 150.997 86.8037C151.814 86.8037 152.464 86.269 152.464 85.5956C152.464 84.9223 151.814 84.3876 150.997 84.3876C150.203 84.3876 149.529 84.9421 149.529 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 85.5956C134.586 86.269 135.235 86.8037 136.053 86.8037C136.871 86.8037 137.52 86.269 137.52 85.5956C137.52 84.9223 136.871 84.3876 136.053 84.3876C135.235 84.3876 134.586 84.9421 134.586 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 85.5956C124.624 86.269 125.273 86.8037 126.091 86.8037C126.909 86.8037 127.558 86.269 127.558 85.5956C127.558 84.9223 126.909 84.3876 126.091 84.3876C125.273 84.3876 124.624 84.9421 124.624 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 85.5956C119.642 86.269 120.292 86.8037 121.11 86.8037C121.928 86.8037 122.577 86.269 122.577 85.5956C122.577 84.9223 121.928 84.3876 121.11 84.3876C120.292 84.3876 119.642 84.9421 119.642 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 85.5956C114.637 86.269 115.287 86.8037 116.105 86.8037C116.923 86.8037 117.572 86.269 117.572 85.5956C117.572 84.9223 116.923 84.3876 116.105 84.3876C115.311 84.3876 114.637 84.9421 114.637 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 85.5956C109.656 86.269 110.305 86.8037 111.123 86.8037C111.941 86.8037 112.591 86.269 112.591 85.5956C112.591 84.9223 111.941 84.3876 111.123 84.3876C110.33 84.3876 109.656 84.9421 109.656 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 85.5956C104.675 86.269 105.325 86.8037 106.142 86.8037C106.96 86.8037 107.61 86.269 107.61 85.5956C107.61 84.9223 106.96 84.3876 106.142 84.3876C105.349 84.3876 104.675 84.9421 104.675 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 85.5956C99.694 86.269 100.343 86.8037 101.161 86.8037C101.979 86.8037 102.629 86.269 102.629 85.5956C102.629 84.9223 101.979 84.3876 101.161 84.3876C100.367 84.3876 99.694 84.9421 99.694 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 85.5956C94.7131 86.269 95.3626 86.8037 96.1805 86.8037C96.9983 86.8037 97.6478 86.269 97.6478 85.5956C97.6478 84.9223 96.9983 84.3876 96.1805 84.3876C95.3626 84.3876 94.7131 84.9421 94.7131 85.5956Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 81.0081C513.39 81.6815 514.039 82.2162 514.857 82.2162C515.675 82.2162 516.325 8
31.6815 516.325 81.0081C516.325 80.3348 515.675 79.8 514.857 79.8C514.039 79.8 513.39 80.3348 513.39 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 81.0081C508.385 81.6815 509.035 82.2162 509.853 82.2162C510.67 82.2162 511.32 81.6815 511.32 81.0081C511.32 80.3348 510.67 79.8 509.853 79.8C509.035 79.8 508.385 80.3348 508.385 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 81.0081C503.404 81.6815 504.053 82.2162 504.871 82.2162C505.689 82.2162 506.338 81.6815 506.338 81.0081C506.338 80.3348 505.689 79.8 504.871 79.8C504.053 79.8 503.404 80.3348 503.404 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 81.0081C498.423 81.6815 499.072 82.2162 499.89 82.2162C500.708 82.2162 501.358 81.6815 501.358 81.0081C501.358 80.3348 500.708 79.8 499.89 79.8C499.072 79.8 498.423 80.3348 498.423 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 81.0081C493.442 81.6815 494.091 82.2162 494.909 82.2162C495.727 82.2162 496.376 81.6815 496.376 81.0081C496.376 80.3348 495.727 79.8 494.909 79.8C494.115 79.8 493.442 80.3348 493.442 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 81.0081C488.46 81.6815 489.11 82.2162 489.928 82.2162C490.746 82.2162 491.395 81.6815 491.395 81.0081C491.395 80.3348 490.746 79.8 489.928 79.8C489.11 79.8 488.46 80.3348 488.46 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 81.0081C483.479 81.6815 484.129 82.2162 484.947 82.2162C485.764 82.2162 486.414 81.6815 486.414 81.0081C486.414 80.3348 485.764 79.8 484.947 79.8C484.129 79.8 483.479 80.3348 483.479 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 81.0081C478.498 81.6815 479.148 82.2162 479.965 82.2162C480.783 82.2162 481.433 81.6815 481.433 81.0081C481.433 80.3348 480.783 79.8 479.965 79.8C479.148 79.8 478.498 80.3348 478.498 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 81.0081C473.517 81.6815 474.167 82.2162 474.984 82.2162C475.802 82.2162 476.452 81.6815 476.452 81.0081C476.452 80.3348 475.802 79.8 474.984 79.8C474.167 79.8 473.517 80.3348 473.517 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 81.0081C468.512 81.6815 469.162 82.2162 469.98 82.2162C470.797 82.2162 471.447 81.6815 471.447 81.0081C471.447 80.3348 470.797 79.8 469.98 79.8C469.162 79.8 468.512 80.3348 468.512 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 81.0081C463.531 81.6815 464.181 82.2162 464.998 82.2162C465.816 82.2162 466.466 81.6815 466.466 81.0081C466.466 80.3348 465.816 79.8 464.998 79.8C464.205 79.8 463.531 80.3348 463.531 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 81.0081C458.55 81.6815 459.199 82.2162 460.017 82.2162C460.835 82.2162 461.484 81.6815 461.484 81.0081C461.484 80.3348 460.835 79.8 460.017 79.8C459.199 79.8 458.55 80.3348 458.55 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 81.0081C453.569 81.6815 454.218 82.2162 455.036 82.2162C455.854 82.2162 456.504 81.6815 456.504 81.0081C456.504 80.3348 455.854 79.8 455.036 79.8C454.218 79.8 453.569 80.3348 453.569 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 81.0081C448.587 81.6815 449.237 82.2162 450.055 82.2162C450.873 82.2162 451.522 81.6815 451.522 81.0081C451.522 80.3348 450.873 79.8 450.055 79.8C449.237 79.8 448.587 80.3348 448.587 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 81.0081C443.606 81.6815 444.256 82.2162 445.074 82.2162C445.892 82.2162 446.541 81.6815 446.541 81.0081C446.541 80.3348 445.892 79.8 445.074 79.8C444.256 79.8 443.606 80.3348 443.606 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 81.0081C438.625 81.6815 439.275 82.2162 440.093 82.2162C440.911 82.2162 441.56 81.6815 441.56 81.0081C441.56 80.3348 440.911 79.8 440.093 79.8C439.275 79.8 438.625 80.3348 438.625 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 81.0081C433.644 81.6815 434.294 82.2162 435.111 82.2162C435.929 82.2162 436.579 81.6815 436.579 81.0081C436.579 80.3348 435.929 79.8 435.111 79.8C434.294 79.8 433.644 80.3348 433.644 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 81.0081C428.639 81.6815 429.289 82.2162 430.107 82.2162C430.924 82.2162 431.574 81.6815 431.574 81.0081C431.574 80.3348 430.924 79.8 430.107 79.8C429.289 79.8 428.639 80.3348 428.639 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 81.0081C423.658 81.6815 424.308 82.2162 425.126 82.2162C425.943 82.2162 426.593 81.6815 426.593 81.0081C426.593 80.3348 425.943 79.8 425.126 79.8C424.308 79.8 423.658 80.3348 423.658 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 81.0081C418.677 81.6815 419.327 82.2162 420.145 82.2162C420.962 82.2162 421.612 81.6815 421.612 81.0081C421.612 80.3348 420.962 79.8 420.145 79.8C419.351 79.8 418.677 80.3348 418.677 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 81.0081C413.696 81.6815 414.345 82.2162 415.163 82.2162C415.981 82.2162 416.63 81.6815 416.63 81.0081C416.63 80.3348 415.981 79.8 415.163 79.8C414.345 79.8 413.696 80.3348 413.696 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 81.0081C408.715 81.6815 409.364 82.2162 410.182 82.2162C411 82.2162 411.65 81.6815 411.65 81.0081C411.65 80.3348 411 79.8 410.182 79.8C409.364 79.8 408.715 80.3348 408.715 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 81.0081C403.734 81.6815 404.383 82.2162 405.201 82.2162C406.019 82.2162 406.668 81.6815 406.668 81.0081C406.668 80.3348 406.019 79.8 405.201 79.8C404.383 79.8 403.734 80.3348 403.734 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 81.0081C398.752 81.6815 399.402 82.2162 400.22 82.2162C401.038 82.2162 401.687 81.6815 401.687 81.0081C401.687 80.3348 401.038 79.8 400.22 79.8C399.402 79.8 398.752 80.3348 398.752 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 81.0081C393.747 81.6815 394.397 82.2162 395.215 82.2162C396.033 82.2162 396.682 81.6815 396.682 81.0081C396.682 80.3348 396.033 79.8 395.215 79.8C394.421 79.8 393.747 8
30.3348 393.747 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 81.0081C388.767 81.6815 389.416 82.2162 390.234 82.2162C391.052 82.2162 391.701 81.6815 391.701 81.0081C391.701 80.3348 391.052 79.8 390.234 79.8C389.416 79.8 388.767 80.3348 388.767 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 81.0081C383.785 81.6815 384.435 82.2162 385.253 82.2162C386.071 82.2162 386.72 81.6815 386.72 81.0081C386.72 80.3348 386.071 79.8 385.253 79.8C384.435 79.8 383.785 80.3348 383.785 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 81.0081C378.804 81.6815 379.454 82.2162 380.271 82.2162C381.089 82.2162 381.739 81.6815 381.739 81.0081C381.739 80.3348 381.089 79.8 380.271 79.8C379.478 79.8 378.804 80.3348 378.804 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 81.0081C373.823 81.6815 374.472 82.2162 375.29 82.2162C376.108 82.2162 376.757 81.6815 376.757 81.0081C376.757 80.3348 376.108 79.8 375.29 79.8C374.472 79.8 373.823 80.3348 373.823 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 81.0081C368.842 81.6815 369.491 82.2162 370.309 82.2162C371.127 82.2162 371.777 81.6815 371.777 81.0081C371.777 80.3348 371.127 79.8 370.309 79.8C369.491 79.8 368.842 80.3348 368.842 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 81.0081C363.861 81.6815 364.51 82.2162 365.328 82.2162C366.146 82.2162 366.795 81.6815 366.795 81.0081C366.795 80.3348 366.146 79.8 365.328 79.8C364.51 79.8 363.861 80.3348 363.861 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 81.0081C358.88 81.6815 359.529 82.2162 360.347 82.2162C361.165 82.2162 361.814 81.6815 361.814 81.0081C361.814 80.3348 361.165 79.8 360.347 79.8C359.529 79.8 358.88 80.3348 358.88 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 81.0081C353.875 81.6815 354.524 82.2162 355.342 82.2162C356.16 82.2162 356.809 81.6815 356.809 81.0081C356.809 80.3348 356.16 79.8 355.342 79.8C354.548 79.8 353.875 80.3348 353.875 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 81.0081C348.894 81.6815 349.543 82.2162 350.361 82.2162C351.179 82.2162 351.828 81.6815 351.828 81.0081C351.828 80.3348 351.179 79.8 350.361 79.8C349.543 79.8 348.894 80.3348 348.894 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 81.0081C343.912 81.6815 344.562 82.2162 345.38 82.2162C346.198 82.2162 346.847 81.6815 346.847 81.0081C346.847 80.3348 346.198 79.8 345.38 79.8C344.562 79.8 343.912 80.3348 343.912 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 81.0081C338.931 81.6815 339.581 82.2162 340.399 82.2162C341.217 82.2162 341.866 81.6815 341.866 81.0081C341.866 80.3348 341.217 79.8 340.399 79.8C339.581 79.8 338.931 80.3348 338.931 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 81.0081C333.95 81.6815 334.6 82.2162 335.418 82.2162C336.235 82.2162 336.885 81.6815 336.885 81.0081C336.885 80.3348 336.235 79.8 335.418 79.8C334.6 79.8 333.95 80.3348 333.95 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 81.0081C328.969 81.6815 329.618 82.2162 330.436 82.2162C331.254 82.2162 331.904 81.6815 331.904 81.0081C331.904 80.3348 331.254 79.8 330.436 79.8C329.618 79.8 328.969 80.3348 328.969 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 81.0081C323.988 81.6815 324.638 82.2162 325.455 82.2162C326.273 82.2162 326.923 81.6815 326.923 81.0081C326.923 80.3348 326.273 79.8 325.455 79.8C324.638 79.8 323.988 80.3348 323.988 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 81.0081C319.007 81.6815 319.656 82.2162 320.474 82.2162C321.292 82.2162 321.941 81.6815 321.941 81.0081C321.941 80.3348 321.292 79.8 320.474 79.8C319.656 79.8 319.007 80.3348 319.007 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 81.0081C314.002 81.6815 314.651 82.2162 315.469 82.2162C316.287 82.2162 316.936 81.6815 316.936 81.0081C316.936 80.3348 316.287 79.8 315.469 79.8C314.675 79.8 314.002 80.3348 314.002 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 81.0081C309.021 81.6815 309.67 82.2162 310.488 82.2162C311.306 82.2162 311.956 81.6815 311.956 81.0081C311.956 80.3348 311.306 79.8 310.488 79.8C309.67 79.8 309.021 80.3348 309.021 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 81.0081C304.04 81.6815 304.689 82.2162 305.507 82.2162C306.325 82.2162 306.974 81.6815 306.974 81.0081C306.974 80.3348 306.325 79.8 305.507 79.8C304.689 79.8 304.04 80.3348 304.04 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 81.0081C299.059 81.6815 299.708 82.2162 300.526 82.2162C301.344 82.2162 301.993 81.6815 301.993 81.0081C301.993 80.3348 301.344 79.8 300.526 79.8C299.708 79.8 299.059 80.3348 299.059 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 81.0081C294.077 81.6815 294.727 82.2162 295.545 82.2162C296.362 82.2162 297.012 81.6815 297.012 81.0081C297.012 80.3348 296.362 79.8 295.545 79.8C294.727 79.8 294.077 80.3348 294.077 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 81.0081C289.096 81.6815 289.745 82.2162 290.563 82.2162C291.381 82.2162 292.031 81.6815 292.031 81.0081C292.031 80.3348 291.381 79.8 290.563 79.8C289.745 79.8 289.096 80.3348 289.096 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 81.0081C284.115 81.6815 284.764 82.2162 285.582 82.2162C286.4 82.2162 287.049 81.6815 287.049 81.0081C287.049 80.3348 286.4 79.8 285.582 79.8C284.764 79.8 284.115 80.3348 284.115 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 81.0081C149.529 81.6815 150.
3179 82.2162 150.997 82.2162C151.814 82.2162 152.464 81.6815 152.464 81.0081C152.464 80.3348 151.814 79.8 150.997 79.8C150.203 79.8 149.529 80.3348 149.529 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M144.548 81.0081C144.548 81.6815 145.198 82.2162 146.015 82.2162C146.833 82.2162 147.483 81.6815 147.483 81.0081C147.483 80.3348 146.833 79.8 146.015 79.8C145.222 79.8 144.548 80.3348 144.548 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M139.567 81.0081C139.567 81.6815 140.216 82.2162 141.034 82.2162C141.852 82.2162 142.502 81.6815 142.502 81.0081C142.502 80.3348 141.852 79.8 141.034 79.8C140.24 79.8 139.567 80.3348 139.567 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 81.0081C134.586 81.6815 135.235 82.2162 136.053 82.2162C136.871 82.2162 137.52 81.6815 137.52 81.0081C137.52 80.3348 136.871 79.8 136.053 79.8C135.235 79.8 134.586 80.3348 134.586 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M129.605 81.0081C129.605 81.6815 130.254 82.2162 131.072 82.2162C131.89 82.2162 132.539 81.6815 132.539 81.0081C132.539 80.3348 131.89 79.8 131.072 79.8C130.254 79.8 129.605 80.3348 129.605 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 81.0081C124.624 81.6815 125.273 82.2162 126.091 82.2162C126.909 82.2162 127.558 81.6815 127.558 81.0081C127.558 80.3348 126.909 79.8 126.091 79.8C125.273 79.8 124.624 80.3348 124.624 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 81.0081C119.642 81.6815 120.292 82.2162 121.11 82.2162C121.928 82.2162 122.577 81.6815 122.577 81.0081C122.577 80.3348 121.928 79.8 121.11 79.8C120.292 79.8 119.642 80.3348 119.642 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 81.0081C114.637 81.6815 115.287 82.2162 116.105 82.2162C116.923 82.2162 117.572 81.6815 117.572 81.0081C117.572 80.3348 116.923 79.8 116.105 79.8C115.311 79.8 114.637 80.3348 114.637 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 81.0081C109.656 81.6815 110.305 82.2162 111.123 82.2162C111.941 82.2162 112.591 81.6815 112.591 81.0081C112.591 80.3348 111.941 79.8 111.123 79.8C110.33 79.8 109.656 80.3348 109.656 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 81.0081C104.675 81.6815 105.325 82.2162 106.142 82.2162C106.96 82.2162 107.61 81.6815 107.61 81.0081C107.61 80.3348 106.96 79.8 106.142 79.8C105.349 79.8 104.675 80.3348 104.675 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 81.0081C99.694 81.6815 100.343 82.2162 101.161 82.2162C101.979 82.2162 102.629 81.6815 102.629 81.0081C102.629 80.3348 101.979 79.8 101.161 79.8C100.367 79.8 99.694 80.3348 99.694 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 81.0081C89.7318 81.6815 90.3813 82.2162 91.1991 82.2162C92.017 82.2162 92.6665 81.6815 92.6665 81.0081C92.6665 80.3348 92.017 79.8 91.1991 79.8C90.3813 79.8 89.7318 80.3348 89.7318 81.0081Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 76.4208C533.314 77.0941 533.964 77.6288 534.782 77.6288C535.6 77.6288 536.249 77.0941 536.249 76.4208C536.249 75.7474 535.6 75.2127 534.782 75.2127C533.964 75.2127 533.314 75.7474 533.314 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 76.4208C513.39 77.0941 514.039 77.6288 514.857 77.6288C515.675 77.6288 516.325 77.0941 516.325 76.4208C516.325 75.7474 515.675 75.2127 514.857 75.2127C514.039 75.2127 513.39 75.7474 513.39 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 77.6288C510.687 77.6288 511.344 77.088 511.344 76.4208C511.344 75.7536 510.687 75.2127 509.876 75.2127C509.066 75.2127 508.409 75.7536 508.409 76.4208C508.409 77.088 509.066 77.6288 509.876 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 77.6288C505.705 77.6288 506.362 77.088 506.362 76.4208C506.362 75.7536 505.705 75.2127 504.895 75.2127C504.085 75.2127 503.428 75.7536 503.428 76.4208C503.428 77.088 504.085 77.6288 504.895 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 76.4208C498.423 77.0941 499.072 77.6288 499.89 77.6288C500.708 77.6288 501.358 77.0941 501.358 76.4208C501.358 75.7474 500.708 75.2127 499.89 75.2127C499.072 75.2127 498.423 75.7474 498.423 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 76.4208C493.442 77.0941 494.091 77.6288 494.909 77.6288C495.727 77.6288 496.376 77.0941 496.376 76.4208C496.376 75.7474 495.727 75.2127 494.909 75.2127C494.115 75.2127 493.442 75.7474 493.442 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 77.6288C490.738 77.6288 491.395 77.088 491.395 76.4208C491.395 75.7536 490.738 75.2127 489.928 75.2127C489.117 75.2127 488.46 75.7536 488.46 76.4208C488.46 77.088 489.117 77.6288 489.928 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 76.4208C483.479 77.0941 484.129 77.6288 484.947 77.6288C485.764 77.6288 486.414 77.0941 486.414 76.4208C486.414 75.7474 485.764 75.2127 484.947 75.2127C484.129 75.2127 483.479 75.7474 483.479 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 76.4208C478.498 77.0941 479.148 77.6288 479.965 77.6288C480.783 77.6288 48
31.433 77.0941 481.433 76.4208C481.433 75.7474 480.783 75.2127 479.965 75.2127C479.148 75.2127 478.498 75.7474 478.498 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 77.6288C475.795 77.6288 476.452 77.088 476.452 76.4208C476.452 75.7536 475.795 75.2127 474.984 75.2127C474.174 75.2127 473.517 75.7536 473.517 76.4208C473.517 77.088 474.174 77.6288 474.984 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 77.6288C470.814 77.6288 471.471 77.088 471.471 76.4208C471.471 75.7536 470.814 75.2127 470.003 75.2127C469.193 75.2127 468.536 75.7536 468.536 76.4208C468.536 77.088 469.193 77.6288 470.003 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 76.4208C463.531 77.0941 464.181 77.6288 464.998 77.6288C465.816 77.6288 466.466 77.0941 466.466 76.4208C466.466 75.7474 465.816 75.2127 464.998 75.2127C464.205 75.2127 463.531 75.7474 463.531 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 76.4208C458.55 77.0941 459.199 77.6288 460.017 77.6288C460.835 77.6288 461.484 77.0941 461.484 76.4208C461.484 75.7474 460.835 75.2127 460.017 75.2127C459.199 75.2127 458.55 75.7474 458.55 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 77.6288C455.847 77.6288 456.504 77.088 456.504 76.4208C456.504 75.7536 455.847 75.2127 455.036 75.2127C454.226 75.2127 453.569 75.7536 453.569 76.4208C453.569 77.088 454.226 77.6288 455.036 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 77.6288C450.865 77.6288 451.522 77.088 451.522 76.4208C451.522 75.7536 450.865 75.2127 450.055 75.2127C449.244 75.2127 448.587 75.7536 448.587 76.4208C448.587 77.088 449.244 77.6288 450.055 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 76.4208C443.606 77.0941 444.256 77.6288 445.074 77.6288C445.892 77.6288 446.541 77.0941 446.541 76.4208C446.541 75.7474 445.892 75.2127 445.074 75.2127C444.256 75.2127 443.606 75.7474 443.606 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 76.4208C438.625 77.0941 439.275 77.6288 440.093 77.6288C440.911 77.6288 441.56 77.0941 441.56 76.4208C441.56 75.7474 440.911 75.2127 440.093 75.2127C439.275 75.2127 438.625 75.7474 438.625 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 77.6288C435.922 77.6288 436.579 77.088 436.579 76.4208C436.579 75.7536 435.922 75.2127 435.111 75.2127C434.301 75.2127 433.644 75.7536 433.644 76.4208C433.644 77.088 434.301 77.6288 435.111 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 77.6288C430.941 77.6288 431.598 77.088 431.598 76.4208C431.598 75.7536 430.941 75.2127 430.131 75.2127C429.32 75.2127 428.663 75.7536 428.663 76.4208C428.663 77.088 429.32 77.6288 430.131 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 76.4208C423.658 77.0941 424.308 77.6288 425.126 77.6288C425.943 77.6288 426.593 77.0941 426.593 76.4208C426.593 75.7474 425.943 75.2127 425.126 75.2127C424.308 75.2127 423.658 75.7474 423.658 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 76.4208C418.677 77.0941 419.327 77.6288 420.145 77.6288C420.962 77.6288 421.612 77.0941 421.612 76.4208C421.612 75.7474 420.962 75.2127 420.145 75.2127C419.351 75.2127 418.677 75.7474 418.677 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 77.6288C415.974 77.6288 416.63 77.088 416.63 76.4208C416.63 75.7536 415.974 75.2127 415.163 75.2127C414.353 75.2127 413.696 75.7536 413.696 76.4208C413.696 77.088 414.353 77.6288 415.163 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 76.4208C408.715 77.0941 409.364 77.6288 410.182 77.6288C411 77.6288 411.65 77.0941 411.65 76.4208C411.65 75.7474 411 75.2127 410.182 75.2127C409.364 75.2127 408.715 75.7474 408.715 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 76.4208C403.734 77.0941 404.383 77.6288 405.201 77.6288C406.019 77.6288 406.668 77.0941 406.668 76.4208C406.668 75.7474 406.019 75.2127 405.201 75.2127C404.383 75.2127 403.734 75.7474 403.734 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 77.6288C401.03 77.6288 401.687 77.088 401.687 76.4208C401.687 75.7536 401.03 75.2127 400.22 75.2127C399.409 75.2127 398.752 75.7536 398.752 76.4208C398.752 77.088 399.409 77.6288 400.22 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 77.6288C396.049 77.6288 396.706 77.088 396.706 76.4208C396.706 75.7536 396.049 75.2127 395.239 75.2127C394.428 75.2127 393.771 75.7536 393.771 76.4208C393.771 77.088 394.428 77.6288 395.239 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 76.4208C388.767 77.0941 389.416 77.6288 390.234 77.6288C391.052 77.6288 391.701 77.0941 391.701 76.4208C391.701 75.7474 391.052 75.2127 390.234 75.2127C389.416 75.2127 388.767 75.7474 388.767 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 76.4208C383.785 77.0941 384.435 77.6288 385.253 77.6288C386.071 77.6288 386.72 77.0941 386.72 76.4208C386.72 75.7474 386.071 75.2127 385.253 75.2127C384.435 75.2127 383.785 75.7474 383.785 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 77.6288C381.105 77.6288 381.762 77.088 381.762 76.4208C381.762 75.7536 381.105 75.2127 380.295 75.2127C379.485 75.2127 378.828 75.7536 378.828 76.4208C378.828 77.088 379.485 77.6288 380.295 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 77.6288C376.1 77.6288 376.757 77.088 376.757 76.4208C376.757 75.7536 376.1 75.2127 375.29 75.2127C374.48 75.2127 373.823 75.7536 373.823 76.4208C373.823 77.088 374.48 77.6288 375.29 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 76.4208C368.842 77.0941 369.491 77.6288 370.309 77.6288C371.127 77.6288 371.777 77.0941 371.777 76.4208C371.777 75.7474 371.127 75.2127 370.309 75.2127C369.491 75.2127 368.842 75.7474 368.842 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 76.4208C363.861 77.0941 364.51 77.6288 365.328 77.6288C366.146 77.6288 366.795 77.0941 366.795 76.4208C366.795 75.7474 366.146 75.2127 365.328 75.2127C364.51 75.2127 363.861 75.7474 363.861 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 77.6288C361.157 77.6288 361.814 77.088 361.814 76.4208C361.814 75.7536 361.157 75.2127 360.347 75.2127C359.537 75.2127 358.88 75.7536 358.88 76.4208C358.88 77.088 359.537 77.6288 360.347 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 76.4208C333.95 77.0941 334.6 77.6288 335.418 77.6288C336.235 77.6288 336.885 77.0941 336.885 76.4208C336.885 75.7474 336.235 75.2127 335.418 75.2127C334.6 75.2127 333.95 75.7474 333.95 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 77.6288C321.284 77.6288 321.941 77.088 321.941 76.4208C321.941 7
35.7536 321.284 75.2127 320.474 75.2127C319.664 75.2127 319.007 75.7536 319.007 76.4208C319.007 77.088 319.664 77.6288 320.474 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 76.4208C314.002 77.0941 314.651 77.6288 315.469 77.6288C316.287 77.6288 316.936 77.0941 316.936 76.4208C316.936 75.7474 316.287 75.2127 315.469 75.2127C314.675 75.2127 314.002 75.7474 314.002 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 76.4208C309.021 77.0941 309.67 77.6288 310.488 77.6288C311.306 77.6288 311.956 77.0941 311.956 76.4208C311.956 75.7474 311.306 75.2127 310.488 75.2127C309.67 75.2127 309.021 75.7474 309.021 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 77.6288C306.341 77.6288 306.998 77.088 306.998 76.4208C306.998 75.7536 306.341 75.2127 305.531 75.2127C304.72 75.2127 304.063 75.7536 304.063 76.4208C304.063 77.088 304.72 77.6288 305.531 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 77.6288C301.336 77.6288 301.993 77.088 301.993 76.4208C301.993 75.7536 301.336 75.2127 300.526 75.2127C299.716 75.2127 299.059 75.7536 299.059 76.4208C299.059 77.088 299.716 77.6288 300.526 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 76.4208C294.077 77.0941 294.727 77.6288 295.545 77.6288C296.362 77.6288 297.012 77.0941 297.012 76.4208C297.012 75.7474 296.362 75.2127 295.545 75.2127C294.727 75.2127 294.077 75.7474 294.077 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 76.4208C289.096 77.0941 289.745 77.6288 290.563 77.6288C291.381 77.6288 292.031 77.0941 292.031 76.4208C292.031 75.7474 291.381 75.2127 290.563 75.2127C289.745 75.2127 289.096 75.7474 289.096 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 77.6288C286.392 77.6288 287.049 77.088 287.049 76.4208C287.049 75.7536 286.392 75.2127 285.582 75.2127C284.772 75.2127 284.115 75.7536 284.115 76.4208C284.115 77.088 284.772 77.6288 285.582 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 77.6288C156.812 77.6288 157.469 77.088 157.469 76.4208C157.469 75.7536 156.812 75.2127 156.001 75.2127C155.191 75.2127 154.534 75.7536 154.534 76.4208C154.534 77.088 155.191 77.6288 156.001 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M151.02 77.6288C151.831 77.6288 152.488 77.088 152.488 76.4208C152.488 75.7536 151.831 75.2127 151.02 75.2127C150.21 75.2127 149.553 75.7536 149.553 76.4208C149.553 77.088 150.21 77.6288 151.02 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 77.6288C146.85 77.6288 147.507 77.088 147.507 76.4208C147.507 75.7536 146.85 75.2127 146.039 75.2127C145.229 75.2127 144.572 75.7536 144.572 76.4208C144.572 77.088 145.229 77.6288 146.039 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 77.6288C141.845 77.6288 142.502 77.088 142.502 76.4208C142.502 75.7536 141.845 75.2127 141.034 75.2127C140.224 75.2127 139.567 75.7536 139.567 76.4208C139.567 77.088 140.224 77.6288 141.034 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 77.6288C136.863 77.6288 137.52 77.088 137.52 76.4208C137.52 75.7536 136.863 75.2127 136.053 75.2127C135.243 75.2127 134.586 75.7536 134.586 76.4208C134.586 77.088 135.243 77.6288 136.053 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 77.6288C131.882 77.6288 132.539 77.088 132.539 76.4208C132.539 75.7536 131.882 75.2127 131.072 75.2127C130.262 75.2127 129.605 75.7536 129.605 76.4208C129.605 77.088 130.262 77.6288 131.072 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 77.6288C126.901 77.6288 127.558 77.088 127.558 76.4208C127.558 75.7536 126.901 75.2127 126.091 75.2127C125.281 75.2127 124.624 75.7536 124.624 76.4208C124.624 77.088 125.281 77.6288 126.091 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 77.6288C121.92 77.6288 122.577 77.088 122.577 76.4208C122.577 75.7536 121.92 75.2127 121.11 75.2127C120.299 75.2127 119.642 75.7536 119.642 76.4208C119.642 77.088 120.299 77.6288 121.11 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 77.6288C116.939 77.6288 117.596 77.088 117.596 76.4208C117.596 75.7536 116.939 75.2127 116.129 75.2127C115.318 75.2127 114.661 75.7536 114.661 76.4208C114.661 77.088 115.318 77.6288 116.129 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 76.4208C109.656 77.0941 110.305 77.6288 111.123 77.6288C111.941 77.6288 112.591 77.0941 112.591 76.4208C112.591 75.7474 111.941 75.2127 111.123 75.2127C110.33 75.2127 109.656 75.7474 109.656 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 77.6288C106.977 77.6288 107.634 77.088 107.634 76.4208C107.634 75.7536 106.977 75.2127 106.166 75.2127C105.356 75.2127 104.699 75.7536 104.699 76.4208C104.699 77.088 105.356 77.6288 106.166 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 77.6288C101.972 77.6288 102.629 77.088 102.629 76.4208C102.629 75.7536 101.972 75.2127 101.161 75.2127C100.351 75.2127 99.694 75.7536 99.694 76.4208C99.694 77.088 100.351 77.6288 101.161 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 77.6288C96.9909 77.6288 97.6478 77.088 97.6478 76.4208C97.6478 75.7536 96.9909 75.2127 96.1805 75.2127C95.3701 75.2127 94.7131 75.7536 94.7131 76.4208C94.7131 77.088 95.3701 77.6288 96.1805 77.6288Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 76.4208C89.7318 77.0941 90.3813 77.6288 91.1991 77.6288C92.017 77.6288 92.6665 77.0941 92.6665 76.4208C92.6665 75.7474 92.017 75.2127 91.1991 75.2127C90.3813 75.2127 89.7318 75.7474 89.7318 76.4208Z",fill:"#5840D2"}),a.createElement("path",{d:"M549.749 73.0412C550.56 73.0412 551.217 72.5004 551.217 71.8332C551.217 71.166 550.56 70.6251 549.749 70.6251C548.939 70.6251 548.282 71.166 548.282 71.8332C548.282 72.5004 548.939 73.0412 549.749 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 73.0412C545.578 73.0412 546.235 72.5004 546.235 71.8332C546.235 71.166 545.578 70.6251 544.768 70.6251C543.958 70.
36251 543.301 71.166 543.301 71.8332C543.301 72.5004 543.958 73.0412 544.768 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 73.0412C530.611 73.0412 531.268 72.5004 531.268 71.8332C531.268 71.166 530.611 70.6251 529.801 70.6251C528.99 70.6251 528.333 71.166 528.333 71.8332C528.333 72.5004 528.99 73.0412 529.801 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 73.0412C525.63 73.0412 526.287 72.5004 526.287 71.8332C526.287 71.166 525.63 70.6251 524.82 70.6251C524.009 70.6251 523.352 71.166 523.352 71.8332C523.352 72.5004 524.009 73.0412 524.82 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 73.0412C510.687 73.0412 511.344 72.5004 511.344 71.8332C511.344 71.166 510.687 70.6251 509.876 70.6251C509.066 70.6251 508.409 71.166 508.409 71.8332C508.409 72.5004 509.066 73.0412 509.876 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 73.0412C505.705 73.0412 506.362 72.5004 506.362 71.8332C506.362 71.166 505.705 70.6251 504.895 70.6251C504.085 70.6251 503.428 71.166 503.428 71.8332C503.428 72.5004 504.085 73.0412 504.895 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 71.8332C498.423 72.5065 499.072 73.0412 499.89 73.0412C500.708 73.0412 501.358 72.5065 501.358 71.8332C501.358 71.1598 500.708 70.6251 499.89 70.6251C499.072 70.6251 498.423 71.1598 498.423 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 71.8328C493.442 72.506 494.091 73.0406 494.909 73.0406C495.727 73.0406 496.376 72.506 496.376 71.8328C496.376 71.1596 495.727 70.625 494.909 70.625C494.115 70.6052 493.442 71.1596 493.442 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 73.0412C490.738 73.0412 491.395 72.5004 491.395 71.8332C491.395 71.166 490.738 70.6251 489.928 70.6251C489.117 70.6251 488.46 71.166 488.46 71.8332C488.46 72.5004 489.117 73.0412 489.928 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 71.8332C483.479 72.5065 484.129 73.0412 484.947 73.0412C485.764 73.0412 486.414 72.5065 486.414 71.8332C486.414 71.1598 485.764 70.6251 484.947 70.6251C484.129 70.6251 483.479 71.1598 483.479 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 71.8328C478.498 72.506 479.148 73.0406 479.965 73.0406C480.783 73.0406 481.433 72.506 481.433 71.8328C481.433 71.1596 480.783 70.625 479.965 70.625C479.148 70.6052 478.498 71.1596 478.498 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 73.0412C475.795 73.0412 476.452 72.5004 476.452 71.8332C476.452 71.166 475.795 70.6251 474.984 70.6251C474.174 70.6251 473.517 71.166 473.517 71.8332C473.517 72.5004 474.174 73.0412 474.984 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 73.0412C470.814 73.0412 471.471 72.5004 471.471 71.8332C471.471 71.166 470.814 70.6251 470.003 70.6251C469.193 70.6251 468.536 71.166 468.536 71.8332C468.536 72.5004 469.193 73.0412 470.003 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 71.8328C463.531 72.506 464.181 73.0406 464.998 73.0406C465.816 73.0406 466.466 72.506 466.466 71.8328C466.466 71.1596 465.816 70.625 464.998 70.625C464.205 70.6052 463.531 71.1596 463.531 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 71.8332C458.55 72.5065 459.199 73.0412 460.017 73.0412C460.835 73.0412 461.484 72.5065 461.484 71.8332C461.484 71.1598 460.835 70.6251 460.017 70.6251C459.199 70.6251 458.55 71.1598 458.55 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 73.0412C455.847 73.0412 456.504 72.5004 456.504 71.8332C456.504 71.166 455.847 70.6251 455.036 70.6251C454.226 70.6251 453.569 71.166 453.569 71.8332C453.569 72.5004 454.226 73.0412 455.036 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 73.0412C450.865 73.0412 451.522 72.5004 451.522 71.8332C451.522 71.166 450.865 70.6251 450.055 70.6251C449.244 70.6251 448.587 71.166 448.587 71.8332C448.587 72.5004 449.244 73.0412 450.055 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 71.8328C443.606 72.506 444.256 73.0406 445.074 73.0406C445.892 73.0406 446.541 72.506 446.541 71.8328C446.541 71.1596 445.892 70.625 445.074 70.625C444.256 70.6052 443.606 71.1596 443.606 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 71.8332C438.625 72.5065 439.275 73.0412 440.093 73.0412C440.911 73.0412 441.56 72.5065 441.56 71.8332C441.56 71.1598 440.911 70.6251 440.093 70.6251C439.275 70.6251 438.625 71.1598 438.625 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 73.0412C435.922 73.0412 436.579 72.5004 436.579 71.8332C436.579 71.166 435.922 70.6251 435.111 70.6251C434.301 70.6251 433.644 71.166 433.644 71.8332C433.644 72.5004 434.301 73.0412 435.111 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 73.0412C430.941 73.0412 431.598 72.5004 431.598 71.8332C431.598 71.166 430.941 70.6251 430.131 70.6251C429.32 70.6251 428.663 71.166 428.663 71.8332C428.663 72.5004 429.32 73.0412 430.131 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 71.8332C423.658 72.5065 424.308 73.0412 425.126 73.0412C425.943 73.0412 426.593 72.5065 426.593 71.8332C426.593 71.1598 425.943 70.6251 425.126 70.6251C424.308 70.6251 423.658 71.1598 423.658 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 71.8328C418.677 72.506 419.327 73.0406 420.145 73.0406C420.962 73.0406 421.612 72.506 421.612 71.8328C421.612 71.1596 420.962 70.625 420.145 70.625C419.351 70.6052 418.677 71.1596 418.677 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 73.0412C415.974 73.0412 416.63 72.5004 416.63 71.8332C416.63 71.166 415.974 70.6251 415.163 70.6251C414.353 70.6251 413.696 71.166 413.696 71.8332C413.696 72.5004 414.353 73.0412 415.163 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 71.8328C408.715 72.506 409.364 73.0406 410.182 73.0406C411 73.0406 411.65 72.506 411.65 71.8328C411.65 71.1596 411 70.625 410.182 70.625C409.364 70.6052 408.715 71.1596 408.715 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 71.8328C403.734 72.506 404.383 73.0406 405.201 73.0406C406.019 73.0406 406.668 72.506 406.668 71.8328C406.668 71.1596 406.019 70.625 405.201 70.625C404.383 70.6052 403.734 71.1596 403.734 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 73.0412C401.03 73.0412 401.687 72.5004 401.687 71.8332C401.687 71.166 401.03 70.6251 400.22 70.6251C399.409 70.6251 398.752 71.166 398.752 71.8332C398.752 72.5004 399.409 73.0412 400.22 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 73.0412C396.049 73.0412 396.706 72.5004 396.706 71.8332C396.706 71.166 396.049 70.6251 395.239 70.6251C394.428 70.6251 393.771 71.166 393.771 71.8332C393.771 72.5004 394.428 73.0412 395.239 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 71.8332C388.767 72.5065 389.416 73.0412 390.234 73.0412C391.052 73.0412 391.701 72.5065 391.701 71.8332C391.701 71.1598 391.052 70.6251 390.234 70.6251C389.416 70.6251 388.767 71.1598 388.767 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 71.8332C383.785 72.5065 384.435 73.0412 385.253 73.0412C386.071 73.0412 386.72 72.5065 386.72 71.8332C386.72 71.1598 386.071 70.6251 385.253 70.
36251C384.435 70.6251 383.785 71.1598 383.785 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 73.0412C381.105 73.0412 381.762 72.5004 381.762 71.8332C381.762 71.166 381.105 70.6251 380.295 70.6251C379.485 70.6251 378.828 71.166 378.828 71.8332C378.828 72.5004 379.485 73.0412 380.295 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 73.0412C376.1 73.0412 376.757 72.5004 376.757 71.8332C376.757 71.166 376.1 70.6251 375.29 70.6251C374.48 70.6251 373.823 71.166 373.823 71.8332C373.823 72.5004 374.48 73.0412 375.29 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 71.8328C368.842 72.506 369.491 73.0406 370.309 73.0406C371.127 73.0406 371.777 72.506 371.777 71.8328C371.777 71.1596 371.127 70.625 370.309 70.625C369.491 70.6052 368.842 71.1596 368.842 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 71.8328C363.861 72.506 364.51 73.0406 365.328 73.0406C366.146 73.0406 366.795 72.506 366.795 71.8328C366.795 71.1596 366.146 70.625 365.328 70.625C364.51 70.6052 363.861 71.1596 363.861 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 71.8328C314.002 72.506 314.651 73.0406 315.469 73.0406C316.287 73.0406 316.936 72.506 316.936 71.8328C316.936 71.1596 316.287 70.625 315.469 70.625C314.675 70.6052 314.002 71.1596 314.002 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 71.8332C309.021 72.5065 309.67 73.0412 310.488 73.0412C311.306 73.0412 311.956 72.5065 311.956 71.8332C311.956 71.1598 311.306 70.6251 310.488 70.6251C309.67 70.6251 309.021 71.1598 309.021 71.8332Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 73.0412C306.341 73.0412 306.998 72.5004 306.998 71.8332C306.998 71.166 306.341 70.6251 305.531 70.6251C304.72 70.6251 304.063 71.166 304.063 71.8332C304.063 72.5004 304.72 73.0412 305.531 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 73.0412C301.336 73.0412 301.993 72.5004 301.993 71.8332C301.993 71.166 301.336 70.6251 300.526 70.6251C299.716 70.6251 299.059 71.166 299.059 71.8332C299.059 72.5004 299.716 73.0412 300.526 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 71.8328C159.515 72.506 160.165 73.0406 160.982 73.0406C161.8 73.0406 162.45 72.506 162.45 71.8328C162.45 71.1596 161.8 70.625 160.982 70.625C160.165 70.6052 159.515 71.1596 159.515 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 73.0412C156.812 73.0412 157.469 72.5004 157.469 71.8332C157.469 71.166 156.812 70.6251 156.001 70.6251C155.191 70.6251 154.534 71.166 154.534 71.8332C154.534 72.5004 155.191 73.0412 156.001 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M151.02 73.0412C151.831 73.0412 152.488 72.5004 152.488 71.8332C152.488 71.166 151.831 70.6251 151.02 70.6251C150.21 70.6251 149.553 71.166 149.553 71.8332C149.553 72.5004 150.21 73.0412 151.02 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 73.0412C146.85 73.0412 147.507 72.5004 147.507 71.8332C147.507 71.166 146.85 70.6251 146.039 70.6251C145.229 70.6251 144.572 71.166 144.572 71.8332C144.572 72.5004 145.229 73.0412 146.039 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 73.0412C141.845 73.0412 142.502 72.5004 142.502 71.8332C142.502 71.166 141.845 70.6251 141.034 70.6251C140.224 70.6251 139.567 71.166 139.567 71.8332C139.567 72.5004 140.224 73.0412 141.034 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 73.0412C136.863 73.0412 137.52 72.5004 137.52 71.8332C137.52 71.166 136.863 70.6251 136.053 70.6251C135.243 70.6251 134.586 71.166 134.586 71.8332C134.586 72.5004 135.243 73.0412 136.053 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 73.0412C131.882 73.0412 132.539 72.5004 132.539 71.8332C132.539 71.166 131.882 70.6251 131.072 70.6251C130.262 70.6251 129.605 71.166 129.605 71.8332C129.605 72.5004 130.262 73.0412 131.072 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 73.0412C126.901 73.0412 127.558 72.5004 127.558 71.8332C127.558 71.166 126.901 70.6251 126.091 70.6251C125.281 70.6251 124.624 71.166 124.624 71.8332C124.624 72.5004 125.281 73.0412 126.091 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 73.0412C121.92 73.0412 122.577 72.5004 122.577 71.8332C122.577 71.166 121.92 70.6251 121.11 70.6251C120.299 70.6251 119.642 71.166 119.642 71.8332C119.642 72.5004 120.299 73.0412 12
31.11 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 73.0412C116.939 73.0412 117.596 72.5004 117.596 71.8332C117.596 71.166 116.939 70.6251 116.129 70.6251C115.318 70.6251 114.661 71.166 114.661 71.8332C114.661 72.5004 115.318 73.0412 116.129 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 71.8328C109.656 72.506 110.305 73.0406 111.123 73.0406C111.941 73.0406 112.591 72.506 112.591 71.8328C112.591 71.1596 111.941 70.625 111.123 70.625C110.33 70.6052 109.656 71.1596 109.656 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 73.0412C106.977 73.0412 107.634 72.5004 107.634 71.8332C107.634 71.166 106.977 70.6251 106.166 70.6251C105.356 70.6251 104.699 71.166 104.699 71.8332C104.699 72.5004 105.356 73.0412 106.166 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 73.0412C101.972 73.0412 102.629 72.5004 102.629 71.8332C102.629 71.166 101.972 70.6251 101.161 70.6251C100.351 70.6251 99.694 71.166 99.694 71.8332C99.694 72.5004 100.351 73.0412 101.161 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 73.0412C96.9909 73.0412 97.6478 72.5004 97.6478 71.8332C97.6478 71.166 96.9909 70.6251 96.1805 70.6251C95.3701 70.6251 94.7131 71.166 94.7131 71.8332C94.7131 72.5004 95.3701 73.0412 96.1805 73.0412Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 71.8328C89.7318 72.506 90.3813 73.0406 91.1991 73.0406C92.017 73.0406 92.6665 72.506 92.6665 71.8328C92.6665 71.1596 92.017 70.625 91.1991 70.625C90.3813 70.6052 89.7318 71.1596 89.7318 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 71.8328C84.7507 72.506 85.4002 73.0406 86.2181 73.0406C87.0359 73.0406 87.6854 72.506 87.6854 71.8328C87.6854 71.1596 87.0359 70.625 86.2181 70.625C85.4002 70.6052 84.7507 71.1596 84.7507 71.8328Z",fill:"#5840D2"}),a.createElement("path",{d:"M549.749 68.4537C550.56 68.4537 551.217 67.9128 551.217 67.2457C551.217 66.5785 550.56 66.0376 549.749 66.0376C548.939 66.0376 548.282 66.5785 548.282 67.2457C548.282 67.9128 548.939 68.4537 549.749 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 68.4537C525.63 68.4537 526.287 67.9128 526.287 67.2457C526.287 66.5785 525.63 66.0376 524.82 66.0376C524.009 66.0376 523.352 66.5785 523.352 67.2457C523.352 67.9128 524.009 68.4537 524.82 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 68.4537C510.687 68.4537 511.344 67.9128 511.344 67.2457C511.344 66.5785 510.687 66.0376 509.876 66.0376C509.066 66.0376 508.409 66.5785 508.409 67.2457C508.409 67.9128 509.066 68.4537 509.876 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 68.4537C505.705 68.4537 506.362 67.9128 506.362 67.2457C506.362 66.5785 505.705 66.0376 504.895 66.0376C504.085 66.0376 503.428 66.5785 503.428 67.2457C503.428 67.9128 504.085 68.4537 504.895 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 67.2457C498.423 67.919 499.072 68.4537 499.89 68.4537C500.708 68.4537 501.358 67.919 501.358 67.2457C501.358 66.5723 500.708 66.0376 499.89 66.0376C499.072 66.0376 498.423 66.5723 498.423 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 67.2457C493.442 67.9189 494.091 68.4535 494.909 68.4535C495.727 68.4535 496.376 67.9189 496.376 67.2457C496.376 66.5725 495.727 66.0379 494.909 66.0379C494.115 66.0181 493.442 66.5725 493.442 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 68.4537C490.738 68.4537 491.395 67.9128 491.395 67.2457C491.395 66.5785 490.738 66.0376 489.928 66.0376C489.117 66.0376 488.46 66.5785 488.46 67.2457C488.46 67.9128 489.117 68.4537 489.928 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 67.2457C483.479 67.919 484.129 68.4537 484.947 68.4537C485.764 68.4537 486.414 67.919 486.414 67.2457C486.414 66.5723 485.764 66.0376 484.947 66.0376C484.129 66.0376 483.479 66.5723 483.479 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 67.2457C478.498 67.9189 479.148 68.4535 479.965 68.4535C480.783 68.4535 481.433 67.9189 481.433 67.2457C481.433 66.5725 480.783 66.0379 479.965 66.0379C479.148 66.0181 478.498 66.5725 478.498 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 68.4537C475.795 68.4537 476.452 67.9128 476.452 67.2457C476.452 66.5785 475.795 66.0376 474.984 66.0376C474.174 66.0376 473.517 66.5785 473.517 67.2457C473.517 67.9128 474.174 68.4537 474.984 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 68.4537C470.814 68.4537 471.471 67.9128 471.471 67.2457C471.471 66.5785 470.814 66.0376 470.003 66.0376C469.193 66.0376 468.536 66.5785 468.536 67.2457C468.536 67.9128 469.193 68.4537 470.003 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 67.2457C463.531 67.9189 464.181 68.4535 464.998 68.4535C465.816 68.4535 466.466 67.9189 466.466 67.2457C466.466 66.5725 465.816 66.0379 464.998 66.0379C464.205 66.0181 463.531 66.5725 463.531 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 67.2457C458.55 67.919 459.199 68.4537 460.017 68.4537C460.835 68.4537 461.484 67.919 461.484 67.2457C461.484 66.5
3723 460.835 66.0376 460.017 66.0376C459.199 66.0376 458.55 66.5723 458.55 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 68.4537C455.847 68.4537 456.504 67.9128 456.504 67.2457C456.504 66.5785 455.847 66.0376 455.036 66.0376C454.226 66.0376 453.569 66.5785 453.569 67.2457C453.569 67.9128 454.226 68.4537 455.036 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 68.4537C450.865 68.4537 451.522 67.9128 451.522 67.2457C451.522 66.5785 450.865 66.0376 450.055 66.0376C449.244 66.0376 448.587 66.5785 448.587 67.2457C448.587 67.9128 449.244 68.4537 450.055 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 67.2457C443.606 67.9189 444.256 68.4535 445.074 68.4535C445.892 68.4535 446.541 67.9189 446.541 67.2457C446.541 66.5725 445.892 66.0379 445.074 66.0379C444.256 66.0181 443.606 66.5725 443.606 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 67.2457C438.625 67.919 439.275 68.4537 440.093 68.4537C440.911 68.4537 441.56 67.919 441.56 67.2457C441.56 66.5723 440.911 66.0376 440.093 66.0376C439.275 66.0376 438.625 66.5723 438.625 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 68.4537C435.922 68.4537 436.579 67.9128 43
36.579 67.2457C436.579 66.5785 435.922 66.0376 435.111 66.0376C434.301 66.0376 433.644 66.5785 433.644 67.2457C433.644 67.9128 434.301 68.4537 435.111 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 68.4537C430.941 68.4537 431.598 67.9128 431.598 67.2457C431.598 66.5785 430.941 66.0376 430.131 66.0376C429.32 66.0376 428.663 66.5785 428.663 67.2457C428.663 67.9128 429.32 68.4537 430.131 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 67.2457C423.658 67.919 424.308 68.4537 425.126 68.4537C425.943 68.4537 426.593 67.919 426.593 67.2457C426.593 66.5723 425.943 66.0376 425.126 66.0376C424.308 66.0376 423.658 66.5723 423.658 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 67.2457C418.677 67.9189 419.327 68.4535 420.145 68.4535C420.962 68.4535 421.612 67.9189 421.612 67.2457C421.612 66.5725 420.962 66.0379 420.145 66.0379C419.351 66.0181 418.677 66.5725 418.677 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 68.4537C415.974 68.4537 416.63 67.9128 416.63 67.2457C416.63 66.5785 415.974 66.0376 415.163 66.0376C414.353 66.0376 413.696 66.5785 413.696 67.2457C413.696 67.9128 414.353 68.4537 415.163 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 67.2457C408.715 67.9189 409.364 68.4535 410.182 68.4535C411 68.4535 411.65 67.9189 411.65 67.2457C411.65 66.5725 411 66.0379 410.182 66.0379C409.364 66.0181 408.715 66.5725 408.715 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 67.2457C403.734 67.9189 404.383 68.4535 405.201 68.4535C406.019 68.4535 406.668 67.9189 406.668 67.2457C406.668 66.5725 406.019 66.0379 405.201 66.0379C404.383 66.0181 403.734 66.5725 403.734 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 68.4537C401.03 68.4537 401.687 67.9128 401.687 67.2457C401.687 66.5785 401.03 66.0376 400.22 66.0376C399.409 66.0376 398.752 66.5785 398.752 67.2457C398.752 67.9128 399.409 68.4537 400.22 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 68.4537C396.049 68.4537 396.706 67.9128 396.706 67.2457C396.706 66.5785 396.049 66.0376 395.239 66.0376C394.428 66.0376 393.771 66.5785 393.771 67.2457C393.771 67.9128 394.428 68.4537 395.239 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 67.2457C388.767 67.919 389.416 68.4537 390.234 68.4537C391.052 68.4537 391.701 67.919 391.701 67.2457C391.701 66.5723 391.052 66.0376 390.234 66.0376C389.416 66.0376 388.767 66.5723 388.767 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 67.2457C383.785 67.919 384.435 68.4537 385.253 68.4537C386.071 68.4537 386.72 67.919 386.72 67.2457C386.72 66.5723 386.071 66.0376 385.253 66.0376C384.435 66.0376 383.785 66.5723 383.785 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 68.4537C381.105 68.4537 381.762 67.9128 381.762 67.2457C381.762 66.5785 381.105 66.0376 380.295 66.0376C379.485 66.0376 378.828 66.5785 378.828 67.2457C378.828 67.9128 379.485 68.4537 380.295 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 68.4537C376.1 68.4537 376.757 67.9128 376.757 67.2457C376.757 66.5785 376.1 66.0376 375.29 66.0376C374.48 66.0376 373.823 66.5785 373.823 67.2457C373.823 67.9128 374.48 68.4537 375.29 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 67.2457C368.842 67.9189 369.491 68.4535 370.309 68.4535C371.127 68.4535 371.777 67.9189 371.777 67.2457C371.777 66.5725 371.127 66.0379 370.309 66.0379C369.491 66.0181 368.842 66.5725 368.842 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 67.2457C363.861 67.9189 364.51 68.4535 365.328 68.4535C366.146 68.4535 366.795 67.9189 366.795 67.2457C366.795 66.5725 366.146 66.0379 365.328 66.0379C364.51 66.0181 363.861 66.5725 363.861 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 68.4537C361.157 68.4537 361.814 67.9128 361.814 67.2457C361.814 66.5785 361.157 66.0376 360.347 66.0376C359.537 66.0376 358.88 66.5785 358.88 67.2457C358.88 67.9128 359.537 68.4537 360.347 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 68.4537C356.176 68.4537 356.833 67.9128 356.833 67.2457C356.833 66.5785 356.176 66.0376 355.366 66.0376C354.555 66.0376 353.899 66.5785 353.899 67.2457C353.899 67.9128 354.555 68.4537 355.366 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 67.2457C348.894 67.919 349.543 68.4537 350.361 68.4537C351.179 68.4537 351.828 67.919 351.828 67.2457C351.828 66.5723 351.179 66.
30376 350.361 66.0376C349.543 66.0376 348.894 66.5723 348.894 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 68.4537C341.209 68.4537 341.866 67.9128 341.866 67.2457C341.866 66.5785 341.209 66.0376 340.399 66.0376C339.588 66.0376 338.931 66.5785 338.931 67.2457C338.931 67.9128 339.588 68.4537 340.399 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 67.2457C333.95 67.919 334.6 68.4537 335.418 68.4537C336.235 68.4537 336.885 67.919 336.885 67.2457C336.885 66.5723 336.235 66.0376 335.418 66.0376C334.6 66.0376 333.95 66.5723 333.95 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 68.4537C326.266 68.4537 326.923 67.9128 326.923 67.2457C326.923 66.5785 326.266 66.0376 325.455 66.0376C324.645 66.0376 323.988 66.5785 323.988 67.2457C323.988 67.9128 324.645 68.4537 325.455 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 67.2457C294.077 67.919 294.727 68.4537 295.545 68.4537C296.362 68.4537 297.012 67.919 297.012 67.2457C297.012 66.5723 296.362 66.0376 295.545 66.0376C294.727 66.0376 294.077 66.5723 294.077 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 67.2457C289.096 67.9189 289.745 68.4535 290.563 68.4535C291.381 68.4535 292.031 67.9189 292.031 67.2457C292.031 66.5725 291.381 66.0379 290.563 66.0379C289.745 66.0181 289.096 66.5725 289.096 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 68.4537C286.392 68.4537 287.049 67.9128 287.049 67.2457C287.049 66.5785 286.392 66.0376 285.582 66.0376C284.772 66.0376 284.115 66.5785 284.115 67.2457C284.115 67.9128 284.772 68.4537 285.582 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 67.2457C159.515 67.9189 160.165 68.4535 160.982 68.4535C161.8 68.4535 162.45 67.9189 162.45 67.2457C162.45 66.5725 161.8 66.0379 160.982 66.0379C160.165 66.0181 159.515 66.5725 159.515 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 68.4537C156.812 68.4537 157.469 67.9128 157.469 67.2457C157.469 66.5785 156.812 66.0376 156.001 66.0376C155.191 66.0376 154.534 66.5785 154.534 67.2457C154.534 67.9128 155.191 68.4537 156.001 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M151.02 68.4537C151.831 68.4537 152.488 67.9128 152.488 67.2457C152.488 66.5785 151.831 66.0376 151.02 66.0376C150.21 66.0376 149.553 66.5785 149.553 67.2457C149.553 67.9128 150.21 68.4537 151.02 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 68.4537C146.85 68.4537 147.507 67.9128 147.507 67.2457C147.507 66.5785 146.85 66.0376 146.039 66.0376C145.229 66.0376 144.572 66.5785 144.572 67.2457C144.572 67.9128 145.229 68.4537 146.039 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 68.4537C141.845 68.4537 142.502 67.9128 142.502 67.2457C142.502 66.5785 141.845 66.0376 141.034 66.0376C140.224 66.0376 139.567 66.5785 139.567 67.2457C139.567 67.9128 140.224 68.4537 141.034 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 68.4537C136.863 68.4537 137.52 67.9128 137.52 67.2457C137.52 66.5785 136.863 66.0376 136.053 66.0376C135.243 66.0376 134.586 66.5785 134.586 67.2457C134.586 67.9128 135.243 68.4537 136.053 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 68.4537C131.882 68.4537 132.539 67.9128 132.539 67.2457C132.539 66.5785 131.882 66.0376 131.072 66.0376C130.262 66.0376 129.605 66.5785 129.605 67.2457C129.605 67.9128 130.262 68.4537 131.072 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 68.4537C126.901 68.4537 127.558 67.9128 127.558 67.2457C127.558 66.5785 126.901 66.0376 126.091 66.0376C125.281 66.0376 124.624 66.5785 124.624 67.2457C124.624 67.9128 125.281 68.4537 126.091 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 68.4537C121.92 68.4537 122.577 67.9128 122.577 67.2457C122.577 66.5785 121.92 66.0376 121.11 66.0376C120.299 66.0376 119.642 66.5785 119.642 67.2457C119.642 67.9128 120.299 68.4537 121.11 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 68.4537C116.939 68.4537 117.596 67.9128 117.596 67.2457C117.596 66.5785 116.939 66.0376 116.129 66.0376C115.318 66.0376 114.661 66.5785 114.661 67.2457C114.661 67.9128 115.318 68.4537 116.129 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 67.2457C109.656 67.9189 110.305 68.4535 111.123 68.4535C111.941 68.4535 112.591 67.9189 112.591 67.2457C112.591 66.5725 111.941 66.0379 111.123 66.0379C110.33 66.0181 109.656 66.5725 109.656 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 68.4537C106.977 68.4537 107.634 67.9128 107.634 67.2457C107.634 66.5785 106.977 66.0376 106.166 66.0376C105.356 66.0376 104.699 66.5785 104.699 67.2457C104.699 67.9128 105.356 68.4537 106.166 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 68.4537C101.972 68.4537 102.629 67.9128 102.629 67.2457C102.629 66.5785 101.972 66.0376 101.161 66.0376C100.351 66.0376 99.694 66.5785 99.694 67.2457C99.694 67.9128 100.351 68.4537 101.161 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 68.4537C96.9909 68.4537 97.6478 67.9128 97.6478 67.2457C97.6478 66.5785 96.9909 66.0376 96.1805 66.0376C95.3701 66.0376 94.7131 66.5785 94.7131 67.2457C94.7131 67.9128 95.3701 68.4537 96.1805 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 67.2457C89.7318 67.9189 90.3813 68.4535 91.1991 68.4535C92.017 68.4535 92.6665 67.9189 92.6665 67.2457C92.6665 66.5725 92.017 66.0379 91.1991 66.0379C90.3813 66.0181 89.7318 66.5725 89.7318 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 67.2457C84.7507 67.9189 85.4002 68.4535 86.2181 68.4535C87.0359 68.4535 87.6854 67.9189 87.6854 67.2457C87.6854 66.5725 87.0359 66.0379 86.2181 66.0379C85.4002 66.0181 84.7
3507 66.5725 84.7507 67.2457Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 68.4537C82.0474 68.4537 82.7043 67.9128 82.7043 67.2457C82.7043 66.5785 82.0474 66.0376 81.237 66.0376C80.4266 66.0376 79.7697 66.5785 79.7697 67.2457C79.7697 67.9128 80.4266 68.4537 81.237 68.4537Z",fill:"#5840D2"}),a.createElement("path",{d:"M548.258 62.6368C548.258 63.3101 548.907 63.8448 549.725 63.8448C550.543 63.8448 551.193 63.3101 551.193 62.6368C551.193 61.9634 550.543 61.4287 549.725 61.4287C548.907 61.4287 548.258 61.9832 548.258 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M523.352 62.6368C523.352 63.3101 524.002 63.8448 524.82 63.8448C525.637 63.8448 526.287 63.3101 526.287 62.6368C526.287 61.9634 525.637 61.4287 524.82 61.4287C524.002 61.4287 523.352 61.9832 523.352 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 62.6368C518.371 63.3101 519.021 63.8448 519.839 63.8448C520.657 63.8448 521.306 63.3101 521.306 62.6368C521.306 61.9634 520.657 61.4287 519.839 61.4287C519.021 61.4287 518.371 61.9832 518.371 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 62.6368C508.385 63.3101 509.035 63.8448 509.853 63.8448C510.
367 63.8448 511.32 63.3101 511.32 62.6368C511.32 61.9634 510.67 61.4287 509.853 61.4287C509.035 61.4287 508.385 61.9832 508.385 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 62.6368C503.404 63.3101 504.053 63.8448 504.871 63.8448C505.689 63.8448 506.338 63.3101 506.338 62.6368C506.338 61.9634 505.689 61.4287 504.871 61.4287C504.053 61.4287 503.404 61.9832 503.404 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 62.6368C498.423 63.3101 499.072 63.8448 499.89 63.8448C500.708 63.8448 501.358 63.3101 501.358 62.6368C501.358 61.9634 500.708 61.4287 499.89 61.4287C499.072 61.4287 498.423 61.9832 498.423 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 62.6368C493.442 63.3101 494.091 63.8448 494.909 63.8448C495.727 63.8448 496.376 63.3101 496.376 62.6368C496.376 61.9634 495.727 61.4287 494.909 61.4287C494.115 61.4287 493.442 61.9832 493.442 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 62.6368C488.46 63.3101 489.11 63.8448 489.928 63.8448C490.746 63.8448 491.395 63.3101 491.395 62.6368C491.395 61.9634 490.746 61.4287 489.928 61.4287C489.11 61.4287 488.46 61.9832 488.46 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 62.6368C483.479 63.3101 484.129 63.8448 484.947 63.8448C485.764 63.8448 486.414 63.3101 486.414 62.6368C486.414 61.9634 485.764 61.4287 484.947 61.4287C484.129 61.4287 483.479 61.9832 483.479 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 62.6368C478.498 63.3101 479.148 63.8448 479.965 63.8448C480.783 63.8448 481.433 63.3101 481.433 62.6368C481.433 61.9634 480.783 61.4287 479.965 61.4287C479.148 61.4287 478.498 61.9832 478.498 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 62.6368C473.517 63.3101 474.167 63.8448 474.984 63.8448C475.802 63.8448 476.452 63.3101 476.452 62.6368C476.452 61.9634 475.802 61.4287 474.984 61.4287C474.167 61.4287 473.517 61.9832 473.517 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 62.6368C468.512 63.3101 469.162 63.8448 469.98 63.8448C470.797 63.8448 471.447 63.3101 471.447 62.6368C471.447 61.9634 470.797 61.4287 469.98 61.4287C469.162 61.4287 468.512 61.9832 468.512 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 62.6368C463.531 63.3101 464.181 63.8448 464.998 63.8448C465.816 63.8448 466.466 63.3101 466.466 62.6368C466.466 61.9634 465.816 61.4287 464.998 61.4287C464.205 61.4287 463.531 61.9832 463.531 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 62.6368C458.55 63.3101 459.199 63.8448 460.017 63.8448C460.835 63.8448 461.484 63.3101 461.484 62.6368C461.484 61.9634 460.835 61.4287 460.017 61.4287C459.199 61.4287 458.55 61.9832 458.55 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 62.6368C453.569 63.3101 454.218 63.8448 455.036 63.8448C455.854 63.8448 456.504 63.3101 456.504 62.6368C456.504 61.9634 455.854 61.4287 455.036 61.4287C454.218 61.4287 453.569 61.9832 453.569 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 62.6368C448.587 63.3101 449.237 63.8448 450.055 63.8448C450.873 63.8448 451.522 63.3101 451.522 62.6368C451.522 61.9634 450.873 61.4287 450.055 61.4287C449.237 61.4287 448.587 61.9832 448.587 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 62.6368C443.606 63.3101 444.256 63.8448 445.074 63.8448C445.892 63.8448 446.541 63.3101 446.541 62.6368C446.541 61.9634 445.892 61.4287 445.074 61.4287C444.256 61.4287 443.606 61.9832 443.606 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 62.6368C438.625 63.3101 439.275 63.8448 440.093 63.8448C440.911 63.8448 441.56 63.3101 441.56 62.6368C441.56 61.9634 440.911 61.4287 440.093 61.4287C439.275 61.4287 438.625 61.9832 438.625 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 62.6368C433.644 63.3101 434.294 63.8448 435.111 63.8448C435.929 63.8448 436.579 63.3101 436.579 62.6368C436.579 61.9634 435.929 61.4287 435.111 61.4287C434.294 61.4287 433.644 61.9832 433.644 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 62.6368C428.639 63.3101 429.289 63.8448 430.107 63.8448C430.924 63.8448 431.574 63.3101 431.574 62.6368C431.574 61.9634 430.924 61.4287 430.107 61.4287C429.289 61.4287 428.639 61.9832 428.639 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 62.6368C423.658 63.3101 424.308 63.8448 425.126 63.8448C425.943 63.8448 426.593 63.3101 426.593 62.6368C426.593 61.9634 425.943 61.4287 425.126 61.4287C424.308 61.4287 423.658 61.9832 423.658 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 62.6368C418.677 63.3101 419.327 63.8448 420.145 63.8448C420.962 63.8448 421.612 63.3101 421.612 62.6368C421.612 61.9634 420.962 61.4287 420.145 61.4287C419.351 61.4287 418.677 61.9832 418.677 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 62.6368C413.696 63.3101 414.345 63.8448 415.163 63.8448C415.981 63.8448 416.63 63.3101 416.63 62.6368C416.63 61.9634 415.981 61.4287 415.163 61.4287C414.345 61.4287 413.696 61.9832 413.696 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 62.6368C408.715 63.3101 409.364 63.8448 410.182 63.8448C411 63.8448 411.65 63.3101 411.65 62.6368C411.65 61.9634 411 61.4287 410.182 61.4287C409.364 61.4287 408.715 61.9832 408.715 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 62.6368C403.734 63.3101 404.383 63.8448 405.201 63.8448C406.019 63.8448 406.668 63.3101 406.668 62.6368C406.668 61.9634 406.019 61.4287 405.201 61.4287C404.383 61.4287 403.734 61.9832 403.734 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 62.6368C398.752 63.3101 399.402 63.8448 400.22 63.8448C401.038 63.8448 401.687 63.3101 401.687 62.6368C401.687 61.9634 401.038 61.4287 400.22 61.4287C399.402 61.4287 398.752 61.9832 398.752 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 62.6368C393.747 63.3101 394.397 63.8448 395.215 63.8448C396.033 63.8448 396.682 63.3101 396.682 62.6368C396.682 61.9634 396.033 61.4287 395.215 61.4287C394.421 61.4287 393.747 61.9832 393.747 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 62.6368C388.767 63.3101 389.416 63.8448 390.234 63.8448C391.052 63.8448 391.701 63.3101 391.701 62.6368C391.701 61.9634 391.052 61.4287 390.234 61.4287C389.416 61.4287 388.767 61.9832 388.767 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 62.6368C383.785 63.3101 384.435 63.8448 385.253 63.8448C386.071 63.8448 386.72 63.3101 386.72 62.6368C386.72 61.9634 386.071 61.4287 385.253 61.4287C384.435 61.4287 383.785 61.9832 383.785 62.6368Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M378.804 62.6368C378.804 63.3101 379.454 63.8448 380.271 63.8448C381.089 63.8448 381.739 63.3101 381.739 62.6368C381.739 61.9634 381.089 61.4287 380.271 61.4287C379.478 61.4287 378.804 61.9832 378.804 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 62.6368C373.823 63.3101 374.472 63.8448 375.29 63.8448C376.108 63.8448 376.757 63.3101 376.757 62.6368C376.757 61.9634 376.108 61.4287 375.29 61.4287C374.472 61.4287 373.823 61.9832 373.823 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 62.6368C368.842 63.3101 369.491 63.8448 370.309 63.8448C371.127 63.8448 371.777 63.3101 371.777 62.6368C371.777 61.9634 371.127 61.4287 370.309 61.4287C369.491 61.4287 368.842 61.9832 368.842 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 62.6368C363.861 63.3101 364.51 63.8448 365.328 63.8448C366.146 63.8448 366.795 63.3101 366.795 62.6368C366.795 61.9634 366.146 61.4287 365.328 61.4287C364.51 61.4287 363.861 61.9832 363.861 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 62.6368C358.88 63.3101 359.529 63.8448 360.347 63.8448C361.165 63.8448 361.814 63.3101 361.814 62.6368C361.814 61.9634 361.165 61.4287 360.347 61.4287C359.529 61.4287 358.88 61.9832 358.88 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 62.6368C353.875 63.3101 354.524 63.8448 355.342 63.8448C356.16 63.8448 356.809 63.3101 356.809 62.6368C356.809 61.9634 356.16 61.4287 355.342 61.4287C354.548 61.4287 353.875 61.9832 353.875 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 62.6368C348.894 63.3101 349.543 63.8448 350.361 63.8448C351.179 63.8448 351.828 63.3101 351.828 62.6368C351.828 61.9634 351.179 61.4287 350.361 61.4287C349.543 61.4287 348.894 61.9832 348.894 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 62.6368C343.912 63.3101 344.562 63.8448 345.38 63.8448C346.198 63.8448 346.847 63.3101 346.847 62.6368C346.847 61.9634 346.198 61.4287 345.38 61.4287C344.562 61.4287 343.912 61.9832 343.912 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 62.6368C333.95 63.3101 334.6 63.8448 335.418 63.8448C336.235 63.8448 336.885 63.3101 336.885 62.6368C336.885 61.9634 336.235 61.4287 335.418 61.4287C334.6 61.4287 333.95 61.9832 333.95 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 62.6368C314.002 63.3101 314.651 63.8448 315.469 63.8448C316.287 63.8448 316.936 63.3101 316.936 62.6368C316.936 61.9634 316.287 61.4287 315.469 61.4287C314.675 61.4287 314.002 61.9832 314.002 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 62.6368C304.04 63.3101 304.689 63.8448 305.507 63.8448C306.325 63.8448 306.974 63.3101 306.974 62.6368C306.974 61.9634 306.325 61.4287 305.507 61.4287C304.689 61.4287 304.04 61.9832 304.04 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 62.6368C294.077 63.3101 294.727 63.8448 295.545 63.8448C296.362 63.8448 297.012 63.3101 297.012 62.6368C297.012 61.9634 296.362 61.4287 295.545 61.4287C294.727 61.4287 294.077 61.9832 294.077 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 62.6368C289.096 63.3101 289.745 63.8448 290.563 63.8448C291.381 63.8448 292.031 63.3101 292.031 62.6368C292.031 61.9634 291.381 61.4287 290.563 61.4287C289.745 61.4287 289.096 61.9832 289.096 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 62.6368C284.115 63.3101 284.764 63.8448 285.582 63.8448C286.4 63.8448 287.049 63.3101 287.049 62.6368C287.049 61.9634 286.4 61.4287 285.582 61.4287C284.764 61.4287 284.115 61.9832 284.115 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 62.6368C164.496 63.3101 165.146 63.8448 165.964 63.8448C166.781 63.8448 167.431 63.3101 167.431 62.6368C167.431 61.9634 166.781 61.4287 165.964 61.4287C165.146 61.4287 164.496 61.9832 164.496 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 62.6368C159.515 63.3101 160.165 63.8448 160.982 63.8448C161.8 63.8448 162.45 63.3101 162.45 62.6368C162.45 61.9634 161.8 61.4287 160.982 61.4287C160.165 61.4287 159.515 61.9832 159.515 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 62.6368C154.51 63.3101 155.16 63.8448 155.978 63.8448C156.796 63.8448 157.445 63.3101 157.445 62.6368C157.445 61.9634 156.796 61.4287 155.978 61.4287C155.184 61.4287 154.51 61.9832 154.51 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 62.6368C149.529 63.3101 150.179 63.8448 150.997 63.8448C151.814 63.8448 152.464 63.3101 152.464 62.6368C152.464 61.9634 151.814 61.4287 150.997 61.4287C150.203 61.4287 149.529 61.9832 149.529 62.6368Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M144.548 62.6368C144.548 63.3101 145.198 63.8448 146.015 63.8448C146.833 63.8448 147.483 63.3101 147.483 62.6368C147.483 61.9634 146.833 61.4287 146.015 61.4287C145.222 61.4287 144.548 61.9832 144.548 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M139.567 62.6368C139.567 63.3101 140.216 63.8448 141.034 63.8448C141.852 63.8448 142.502 63.3101 142.502 62.6368C142.502 61.9634 141.852 61.4287 141.034 61.4287C140.24 61.4287 139.567 61.9832 139.567 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 62.6368C134.586 63.3101 135.235 63.8448 136.053 63.8448C136.871 63.8448 137.52 63.3101 137.52 62.6368C137.52 61.9634 136.871 61.4287 136.053 61.4287C135.235 61.4287 134.586 61.9832 134.586 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M129.605 62.6368C129.605 63.3101 130.254 63.8448 131.072 63.8448C131.89 63.8448 132.539 63.3101 132.539 62.6368C132.539 61.9634 131.89 61.4287 131.072 61.4287C130.254 61.4287 129.605 61.9832 129.605 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 62.6368C124.624 63.3101 125.273 63.8448 126.091 63.8448C126.909 63.8448 127.558 63.3101 127.558 62.6368C127.558 61.9634 126.909 61.4287 126.091 61.4287C125.273 61.4287 124.624 61.9832 124.624 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 62.6368C119.642 63.3101 120.292 63.8448 121.11 63.8448C121.928 63.8448 122.577 63.3101 122.577 62.6368C122.577 61.9634 121.928 61.4287 121.11 61.4287C120.292 61.4287 119.642 61.9832 119.642 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 62.6368C114.637 63.3101 115.287 63.8448 116.105 63.8448C116.923 63.8448 117.572 63.3101 117.572 62.6368C117.572 61.9634 116.923 61.4287 116.105 61.4287C115.311 61.4287 114.637 61.9832 114.637 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 62.6368C109.656 63.3101 110.305 63.8448 111.123 63.8448C111.941 63.8448 112.591 63.3101 112.591 62.6368C112.591 61.9634 111.941 61.4287 111.123 61.4287C110.33 61.4287 109.656 61.9832 109.656 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 62.6368C104.675 63.3101 105.325 63.8448 106.142 63.8448C106.96 63.8448 107.61 63.3101 107.61 62.6368C107.61 61.9634 106.96 61.4287 106.142 61.4287C105.349 61.4287 104.675 61.9832 104.675 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 62.6368C99.694 63.3101 100.343 63.8448 101.161 63.8448C101.979 63.8448 102.629 63.3101 102.629 62.6368C102.629 61.9634 101.979 61.4287 101.161 61.4287C100.367 61.4287 99.694 61.9832 99.694 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 62.6368C94.7131 63.3101 95.3626 63.8448 96.1805 63.8448C96.9983 63.8448 97.6478 63.3101 97.6478 62.6368C97.6478 61.9634 96.9983 61.4287 96.1805 61.4287C95.3626 61.4287 94.7131 61.9832 94.7131 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 62.6368C89.7318 63.3101 90.3813 63.8448 91.1991 63.8448C92.017 63.8448 92.6665 63.3101 92.6665 62.6368C92.6665 61.9634 92.017 61.4287 91.1991 61.4287C90.3813 61.4287 89.7318 61.9832 89.7318 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 62.6368C84.7507 63.3101 85.4002 63.8448 86.2181 63.8448C87.0359 63.8448 87.6854 63.3101 87.6854 62.6368C87.6854 61.9634 87.0359 61.4287 86.2181 61.4287C85.4002 61.4287 84.7507 61.9832 84.7507 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M79.7697 62.6368C79.7697 63.3101 80.4191 63.8448 81.237 63.8448C82.0548 63.8448 82.7043 63.3101 82.7043 62.6368C82.7043 61.9634 82.0548 61.4287 81.237 61.4287C80.4191 61.4287 79.7697 61.9832 79.7697 62.6368Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 58.0492C553.263 58.7225 553.913 59.2572 554.73 59.2572C555.548 59.2572 556.198 58.7225 556.198 58.0492C556.198 57.3758 555.548 56.8411 554.73 56.8411C553.913 56.8411 553.263 57.3758 553.263 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M548.258 58.0492C548.258 58.7225 548.907 59.2572 549.725 59.2572C550.543 59.2572 551.193 58.7225 551.193 58.0492C551.193 57.3758 550.543 56.8411 549.725 56.8411C548.907 56.8411 548.258 57.3758 548.258 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M528.333 58.0492C528.333 58.7225 528.983 59.2572 529.801 59.2572C530.619 59.2572 531.268 58.7225 531.268 58.0492C531.268 57.3758 530.619 56.8411 529.801 56.8411C528.983 56.8411 528.333 57.3758 528.333 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M523.352 58.0492C523.352 58.7225 524.002 59.2572 524.82 59.2572C525.637 59.2572 526.287 58.7225 526.287 58.0492C526.287 57.3758 525.637 56.8411 524.82 56.8411C524.002 56.8411 523.352 57.3758 523.352 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 58.0492C518.371 58.7225 519.021 59.2572 519.839 59.2572C520.657 59.2572 521.306 58.7225 521.306 58.0492C521.306 57.3758 520.657 56.8411 519.839 56.8411C519.021 56.8411 518.371 57.3758 518.371 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 58.0492C513.39 58.7225 514.039 59.2572 514.857 59.2572C515.675 59.2572 516.325 58.7225 516.325 58.0492C516.325 57.3758 515.675 56.8411 514.857 56.8411C514.039 56.8411 513.39 57.3758 513.39 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 58.0492C508.385 58.7225 509.035 59.2572 509.853 59.2572C510.67 59.2572 511.32 58.7225 511.32 58.0492C511.32 57.3758 510.67 56.8411 509.853 56.8411C509.035 56.8411 508.385 57.3758 508.385 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 58.0492C503.404 58.7225 504.053 59.2572 504.871 59.2572C505.689 59.2572 506.338 58.7225 506.338 58.0492C506.338 57.3758 505.689 56.8411 504.871 56.8411C504.053 56.8411 503.404 57.3758 503.404 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 58.0492C498.423 58.7225 499.072 59.2572 499.89 59.2572C500.708 59.2572 501.358 58.7225 501.358 58.0492C501.358 57.3758 500.708 56.8411 499.89 56.8411C499.072 56.8411 498.423 57.3758 498.423 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 58.0492C493.442 58.7225 494.091 59.2572 494.909 59.2572C495.727 59.2572 496.376 58.7225 496.376 58.0492C496.376 57.3758 495.727 56.8411 494.909 56.8411C494.115 56.8411 493.442 57.3758 493.442 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 58.0492C488.46 58.7225 489.11 59.2572 489.928 59.2572C490.746 59.2572 491.395 58.7225 491.395 58.0492C491.395 57.3758 490.746 56.8411 489.928 56.8411C489.11 56.8411 488.46 57.3758 488.46 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 58.0492C483.479 58.7225 484.129 59.2572 484.947 59.2572C485.764 59.2572 486.414 58.7225 486.414 58.0492C486.414 57.3758 485.764 56.8411 484.947 56.8411C484.129 56.8411 483.479 57.3758 483.479 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 58.0492C478.498 58.7225 479.148 59.2572 479.965 59.2572C480.783 59.2572 481.433 58.7225 481.433 58.0492C481.433 57.3758 480.783 56.8411 479.965 56.8411C479.148 56.8411 478.498 57.3758 478.498 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 58.0492C473.517 58.7225 474.167 59.2572 474.984 59.2572C475.802 59.2572 476.452 58.7225 476.452 58.0492C476.452 57.3758 475.802 56.8411 474.984 56.8411C474.167 56.8411 473.517 57.3758 473.517 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 58.0492C468.512 58.7225 469.162 59.2572 469.98 59.2572C470.797 59.2572 471.447 58.7225 471.447 58.0492C471.447 57.3758 470.797 56.8411 469.98 56.8411C469.162 56.8411 468.512 57.3758 468.512 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 58.0492C463.531 58.7225 464.181 59.2572 464.998 59.2572C465.816 59.2572 466.466 58.7225 466.466 58.0492C466.466 57.3758 465.816 56.8411 464.998 56.8411C464.205 56.8411 463.531 57.3758 463.531 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 58.0492C458.55 58.7225 459.199 59.2572 460.017 59.2572C460.835 59.2572 461.484 58.7225 461.484 58.0492C461.484 57.3758 460.835 56.8411 460.017 56.8411C459.199 56.8411 458.55 57.3758 458.55 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 58.0492C453.569 58.7225 454.218 59.2572 455.036 59.2572C455.854 59.2572 456.504 58.7225 456.504 58.0492C456.504 57.3758 455.854 56.8411 455.036 56.8411C454.218 56.8411 453.569 57.3758 453.569 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 58.0492C448.587 58.7225 449.237 59.2572 450.055 59.2572C450.873 59.2572 451.522 58.7225 451.522 58.0492C451.522 57.3758 450.873 56.8411 450.055 56.8411C449.237 56.8411 448.587 57.3758 448.587 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 58.0492C443.606 58.7225 444.256 59.2572 445.074 59.2572C445.892 59.2572 446.541 58.7225 446.541 58.0492C446.541 57.3758 445.892 56.8411 445.074 56.8411C444.256 56.8411 443.606 57.3758 443.606 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 58.0492C438.625 58.7225 439.275 59.2572 440.093 59.2572C440.911 59.2572 441.56 58.7225 441.56 58.0492C441.56 57.3758 440.911 56.8411 440.093 56.8411C439.275 56.8411 438.625 57.3758 438.625 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 58.0492C433.644 58.7225 434.294 59.2572 435.111 59.2572C435.929 59.2572 436.579 58.7225 436.579 58.0492C436.579 57.3758 435.929 56.8411 435.111 56.8411C434.294 56.8411 433.644 57.3758 433.644 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 58.0492C428.639 58.7225 429.289 59.2572 430.107 59.2572C430.924 59.2572 431.574 58.7225 431.574 58.0492C431.574 57.3758 430.924 56.8411 430.107 56.8411C429.289 56.8411 428.639 57.3758 428.639 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 58.0492C423.658 58.7225 424.308 59.2572 425.126 59.2572C425.943 59.2572 426.593 58.7225 426.593 58.0492C426.593 57.3758 425.943 56.8411 425.126 56.8411C424.308 56.8411 423.658 57.3758 423.658 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 58.0492C418.677 58.7225 419.327 59.2572 420.145 59.2572C420.962 59.2572 421.612 58.7225 421.612 58.0492C421.612 57.3758 420.962 56.8411 420.145 56.8411C419.351 56.8411 418.677 57.3758 418.677 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 58.0492C413.696 58.7225 414.345 59.2572 415.163 59.2572C415.981 59.2572 416.63 58.7225 416.63 58.0492C416.63 57.3758 415.981 56.8411 415.163 56.8411C414.345 56.8411 413.696 57.3758 413.696 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 58.0492C408.715 58.7225 409.364 59.2572 410.182 59.2572C411 59.2572 411.65 58.7225 411.65 58.0492C411.65 57.3758 411 56.8411 410.182 56.8411C409.364 56.8411 408.715 57.3758 408.715 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 58.0492C403.734 58.7225 404.383 59.2572 405.201 59.2572C406.019 59.2572 406.668 58.7225 406.668 58.0492C406.668 57.3758 406.019 56.8411 405.201 56.8411C404.383 56.8411 403.734 57.3758 403.734 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 58.0492C398.752 58.7225 399.402 59.2572 400.22 59.2572C401.038 59.2572 401.687 58.7225 401.687 58.0492C401.687 57.3758 401.038 56.8411 400.22 56.8411C399.402 56.8411 398.752 57.3758 398.752 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 58.0492C393.747 58.7225 394.397 59.2572 395.215 59.2572C396.033 59.2572 396.682 58.7225 396.682 58.0492C396.682 57.3758 396.033 56.8411 395.215 56.8411C394.421 56.8411 393.747 57.3758 393.747 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 58.0492C388.767 58.7225 389.416 59.2572 390.234 59.2572C391.052 59.2572 391.701 58.7225 391.701 58.0492C391.701 57.3758 391.052 56.8411 390.234 56.8411C389.416 56.8411 388.767 57.3758 388.767 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 58.0492C383.785 58.7225 384.435 59.2572 385.253 59.2572C386.071 59.2572 386.72 58.7225 386.72 58.0492C386.72 57.3758 386.071 56.8411 385.253 56.8411C384.435 56.8411 383.785 57.3758 383.785 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 58.0492C378.804 58.7225 379.454 59.2572 380.271 59.2572C381.089 59.2572 381.739 58.7225 381.739 58.0492C381.739 57.3758 381.089 56.8411 380.271 56.8411C379.478 56.8411 378.804 57.3758 378.804 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 58.0492C373.823 58.7225 374.472 59.2572 375.29 59.2572C376.108 59.2572 376.757 58.7225 376.757 58.0492C376.757 57.3758 376.108 56.8411 375.29 56.8411C374.472 56.8411 373.823 57.3758 373.823 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 58.0492C368.842 58.7225 369.491 59.2572 370.309 59.2572C371.127 59.2572 371.777 58.7225 371.777 58.0492C371.777 57.3758 371.127 56.8411 370.309 56.8411C369.491 56.8411 368.842 57.3758 368.842 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 58.0492C363.861 58.7225 364.51 59.2572 365.328 59.2572C366.146 59.2572 366.795 58.7225 366.795 58.0492C366.795 57.3758 366.146 56.8411 365.328 56.8411C364.51 56.8411 363.861 57.3758 363.861 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 58.0492C358.88 58.7225 359.529 59.2572 360.347 59.2572C361.165 59.2572 361.814 58.7225 361.814 58.0492C361.814 57.3758 361.165 56.8411 360.347 56.8411C359.529 56.8411 358.88 57.3758 358.88 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 58.0492C353.875 58.7225 354.524 59.2572 355.342 59.2572C356.16 59.2572 356.809 58.7225 356.809 58.0492C356.809 57.3758 356.16 56.8411 355.342 56.8411C354.548 56.8411 353.875 57.3758 353.875 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 58.0492C348.894 58.7225 349.543 59.2572 350.361 59.2572C351.179 59.2572 351.828 58.7225 351.828 58.0492C351.828 57.3758 351.179 56.8411 350.361 56.8411C349.543 56.8411 348.894 57.3758 348.894 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 58.0492C343.912 58.7225 344.562 59.2572 345.38 59.2572C346.198 59.2572 346.847 58.7225 346.847 58.0492C346.847 57.3758 346.198 56.8411 345.38 56.8411C344.562 56.8411 343.912 57.3758 343.912 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 58.0492C338.931 58.7225 339.581 59.2572 340.399 59.2572C341.217 59.2572 341.866 58.7225 341.866 58.0492C341.866 57.3758 341.217 56.8411 340.399 56.8411C339.581 56.8411 338.931 57.3758 338.931 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 58.0492C333.95 58.7225 334.6 59.2572 335.418 59.2572C336.235 59.2572 336.885 58.7225 336.885 58.0492C336.885 57.3758 336.235 56.8411 335.418 56.8411C334.6 56.8411 333.95 57.3758 333.95 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 58.0492C323.988 58.7225 324.638 59.2572 325.455 59.2572C326.273 59.2572 326.923 58.7225 326.923 58.0492C326.923 57.3758 326.273 56.8411 325.455 56.8411C324.638 56.8411 323.988 57.3758 323.988 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 58.0492C319.007 58.7225 319.656 59.2572 320.474 59.2572C321.292 59.2572 321.941 58.7225 321.941 58.0492C321.941 57.3758 321.292 56.8411 320.474 56.8411C319.656 56.8411 319.007 57.3758 319.007 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 58.0492C299.059 58.7225 299.708 59.2572 300.526 59.2572C301.344 59.2572 301.993 58.7225 301.993 58.0492C301.993 57.3758 301.344 56.8411 300.526 56.8411C299.708 56.8411 299.059 57.3758 299.059 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 58.0492C294.077 58.7225 294.727 59.2572 295.545 59.2572C296.362 59.2572 297.
3012 58.7225 297.012 58.0492C297.012 57.3758 296.362 56.8411 295.545 56.8411C294.727 56.8411 294.077 57.3758 294.077 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 58.0492C289.096 58.7225 289.745 59.2572 290.563 59.2572C291.381 59.2572 292.031 58.7225 292.031 58.0492C292.031 57.3758 291.381 56.8411 290.563 56.8411C289.745 56.8411 289.096 57.3758 289.096 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M284.115 58.0492C284.115 58.7225 284.764 59.2572 285.582 59.2572C286.4 59.2572 287.049 58.7225 287.049 58.0492C287.049 57.3758 286.4 56.8411 285.582 56.8411C284.764 56.8411 284.115 57.3758 284.115 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 58.0492C169.478 58.7225 170.127 59.2572 170.945 59.2572C171.763 59.2572 172.412 58.7225 172.412 58.0492C172.412 57.3758 171.763 56.8411 170.945 56.8411C170.127 56.8411 169.478 57.3758 169.478 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 58.0492C164.496 58.7225 165.146 59.2572 165.964 59.2572C166.781 59.2572 167.431 58.7225 167.431 58.0492C167.431 57.3758 166.781 56.8411 165.964 56.8411C165.146 56.8411 164.496 57.3758 164.496 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 58.0492C159.515 58.7225 160.165 59.2572 160.982 59.2572C161.8 59.2572 162.45 58.7225 162.45 58.0492C162.45 57.3758 161.8 56.8411 160.982 56.8411C160.165 56.8411 159.515 57.3758 159.515 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 58.0492C154.51 58.7225 155.16 59.2572 155.978 59.2572C156.796 59.2572 157.445 58.7225 157.445 58.0492C157.445 57.3758 156.796 56.8411 155.978 56.8411C155.184 56.8411 154.51 57.3758 154.51 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 58.0492C149.529 58.7225 150.179 59.2572 150.997 59.2572C151.814 59.2572 152.464 58.7225 152.464 58.0492C152.464 57.3758 151.814 56.8411 150.997 56.8411C150.203 56.8411 149.529 57.3758 149.529 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M144.548 58.0492C144.548 58.7225 145.198 59.2572 146.015 59.2572C146.833 59.2572 147.483 58.7225 147.483 58.0492C147.483 57.3758 146.833 56.8411 146.015 56.8411C145.222 56.8411 144.548 57.3758 144.548 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M139.567 58.0492C139.567 58.7225 140.216 59.2572 141.034 59.2572C141.852 59.2572 142.502 58.7225 142.502 58.0492C142.502 57.3758 141.852 56.8411 141.034 56.8411C140.24 56.8411 139.567 57.3758 139.567 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 58.0492C134.586 58.7225 135.235 59.2572 136.053 59.2572C136.871 59.2572 137.52 58.7225 137.52 58.0492C137.52 57.3758 136.871 56.8411 136.053 56.8411C135.235 56.8411 134.586 57.3758 134.586 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M129.605 58.0492C129.605 58.7225 130.254 59.2572 131.072 59.2572C131.89 59.2572 132.539 58.7225 132.539 58.0492C132.539 57.3758 131.89 56.8411 131.072 56.8411C130.254 56.8411 129.605 57.3758 129.605 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 58.0492C124.624 58.7225 125.273 59.2572 126.091 59.2572C126.909 59.2572 127.558 58.7225 127.558 58.0492C127.558 57.3758 126.909 56.8411 126.091 56.8411C125.273 56.8411 124.624 57.3758 124.624 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 58.0492C119.642 58.7225 120.292 59.2572 12
31.11 59.2572C121.928 59.2572 122.577 58.7225 122.577 58.0492C122.577 57.3758 121.928 56.8411 121.11 56.8411C120.292 56.8411 119.642 57.3758 119.642 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 58.0492C114.637 58.7225 115.287 59.2572 116.105 59.2572C116.923 59.2572 117.572 58.7225 117.572 58.0492C117.572 57.3758 116.923 56.8411 116.105 56.8411C115.311 56.8411 114.637 57.3758 114.637 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 58.0492C109.656 58.7225 110.305 59.2572 111.123 59.2572C111.941 59.2572 112.591 58.7225 112.591 58.0492C112.591 57.3758 111.941 56.8411 111.123 56.8411C110.33 56.8411 109.656 57.3758 109.656 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 58.0492C104.675 58.7225 105.325 59.2572 106.142 59.2572C106.96 59.2572 107.61 58.7225 107.61 58.0492C107.61 57.3758 106.96 56.8411 106.142 56.8411C105.349 56.8411 104.675 57.3758 104.675 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 58.0492C99.694 58.7225 100.343 59.2572 101.161 59.2572C101.979 59.2572 102.629 58.7225 102.629 58.0492C102.629 57.3758 101.979 56.8411 101.161 56.8411C100.367 56.8411 99.694 57.3758 99.694 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 58.0492C94.7131 58.7225 95.3626 59.2572 96.1805 59.2572C96.9983 59.2572 97.6478 58.7225 97.6478 58.0492C97.6478 57.3758 96.9983 56.8411 96.1805 56.8411C95.3626 56.8411 94.7131 57.3758 94.7131 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 58.0492C89.7318 58.7225 90.3813 59.2572 91.1991 59.2572C92.017 59.2572 92.6665 58.7225 92.6665 58.0492C92.6665 57.3758 92.017 56.8411 91.1991 56.8411C90.3813 56.8411 89.7318 57.3758 89.7318 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 58.0492C84.7507 58.7225 85.4002 59.2572 86.2181 59.2572C87.0359 59.2572 87.6854 58.7225 87.6854 58.0492C87.6854 57.3758 87.0359 56.8411 86.2181 56.8411C85.4002 56.8411 84.7507 57.3758 84.7507 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M79.7697 58.0492C79.7697 58.7225 80.4191 59.2572 81.237 59.2572C82.0548 59.2572 82.7043 58.7225 82.7043 58.0492C82.7043 57.3758 82.0548 56.8411 81.237 56.8411C80.4191 56.8411 79.7697 57.3758 79.7697 58.0492Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 53.4619C538.296 54.1353 538.945 54.67 539.763 54.67C540.581 54.67 541.23 54.1353 541.23 53.4619C541.23 52.7886 540.581 52.2538 539.763 52.2538C538.945 52.2538 538.296 52.7886 538.296 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 53.4619C533.314 54.1353 533.964 54.67 534.782 54.67C535.6 54.67 536.249 54.1353 536.249 53.4619C536.249 52.7886 535.6 52.2538 534.782 52.2538C533.964 52.2538 533.314 52.7886 533.314 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 54.67C530.611 54.67 531.268 54.1291 531.268 53.4619C531.268 52.7947 530.611 52.2538 529.801 52.2538C528.99 52.2538 528.333 52.7947 528.333 53.4619C528.333 54.1291 528.99 54.67 529.801 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 54.67C525.63 54.67 526.287 54.1291 526.287 53.4619C526.287 52.7947 525.63 52.2538 524.82 52.2538C524.009 52.2538 523.352 52.7947 523.352 53.4619C523.352 54.1291 524.009 54.67 524.82 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 53.4619C518.371 54.1353 519.021 54.67 519.839 54.67C520.657 54.67 521.306 54.1353 521.306 53.4619C521.306 52.7886 520.657 52.2538 519.839 52.2538C519.021 52.2538 518.371 52.7886 518.371 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 53.4619C513.39 54.1353 514.039 54.67 514.857 54.67C515.675 54.67 516.325 54.1353 516.325 53.4619C516.325 52.7886 515.675 52.2538 514.857 52.2538C514.039 52.2538 513.39 52.7886 513.39 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 54.67C510.687 54.67 511.344 54.1291 511.344 53.4619C511.344 52.7947 510.687 52.2538 509.876 52.2538C509.066 52.2538 508.409 52.7947 508.409 53.4619C508.409 54.1291 509.066 54.67 509.876 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 54.67C505.705 54.67 506.362 54.1291 506.362 53.4619C506.362 52.7947 505.705 52.2538 504.895 52.2538C504.085 52.2538 503.428 52.7947 503.428 53.4619C503.428 54.1291 504.085 54.67 504.895 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 53.4619C498.423 54.1353 499.072 54.67 499.89 54.67C500.708 54.67 501.358 54.1353 501.358 53.4619C501.358 52.7886 500.708 52.2538 499.89 52.2538C499.072 52.2538 498.423 52.7886 498.423 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 53.4619C493.442 54.1353 494.091 54.67 494.909 54.67C495.727 54.67 496.376 54.1353 496.376 53.4619C496.376 52.7886 495.727 52.2538 494.909 52.2538C494.115 52.2538 493.442 52.7886 493.442 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 54.67C490.738 54.67 491.395 54.1291 491.395 53.4619C491.395 52.7947 490.738 52.2538 489.928 52.2538C489.117 52.2538 488.46 52.7947 488.46 53.4619C488.46 54.1291 489.117 54.67 489.928 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 53.4619C483.479 54.1353 484.129 54.67 484.947 54.67C485.764 54.67 486.414 54.1353 486.414 53.4619C486.414 52.7886 485.764 52.2538 484.947 52.2538C484.129 52.2538 483.479 52.7886 483.479 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 53.4619C478.498 54.1353 479.148 54.67 479.965 54.67C480.783 54.67 481.433 54.1353 481.433 53.4619C481.433 52.7886 480.783 52.2538 479.965 52.2538C479.148 52.2538 478.498 52.7886 478.498 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 54.67C475.795 54.67 476.452 54.1291 476.452 53.4619C476.452 52.7947 475.795 52.2538 474.984 52.2538C474.174 52.2538 473.517 52.7947 473.517 53.4619C473.517 54.1291 474.174 54.67 474.984 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 54.67C470.814 54.67 471.471 54.1291 471.471 53.4619C471.471 52.7947 470.814 52.2538 470.003 52.2538C469.193 52.2538 468.536 52.7947 468.536 53.4619C468.536 54.1291 469.193 54.67 470.003 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 53.4619C463.531 54.1353 464.181 54.67 464.998 54.67C465.816 54.67 466.466 54.1353 466.466 53.4619C466.466 52.7886 465.816 52.2538 464.998 52.2538C464.205 52.2538 463.531 52.7886 463.531 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 53.4619C458.55 54.1353 459.199 54.67 460.017 54.67C460.835 54.67 461.484 54.1353 461.484 53.4619C461.484 52.7886 460.835 52.2538 460.017 52.2538C459.199 52.2538 458.55 52.7886 458.55 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 54.67C455.847 54.67 456.504 54.1291 456.504 53.4619C456.504 52.7947 455.847 52.2538 455.036 52.2538C454.226 52.2538 453.569 52.7947 453.569 53.4619C453.569 54.1291 454.226 54.67 455.036 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 54.67C450.865 54.67 451.522 54.1291 451.522 53.4619C451.522 52.7947 450.865 52.2538 450.055 52.2538C449.244 52.2538 448.587 52.7947 448.587 53.4619C448.587 54.1291 449.244 54.67 450.055 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 53.4619C443.606 54.1353 444.256 54.67 445.074 54.67C445.892 54.67 446.541 54.1353 446.541 53.4619C446.541 52.7886 445.892 52.2538 445.074 52.2538C444.256 52.2538 443.606 52.7886 443.606 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 53.4619C438.625 54.1353 439.275 54.67 440.093 54.67C440.911 54.67 441.56 54.1353 441.56 53.4619C441.56 52.7886 440.911 52.2538 440.093 52.2538C439.275 52.2538 438.625 52.7886 438.625 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 54.67C435.922 54.67 436.579 54.1291 436.579 53.4619C436.579 52.7947 435.922 52.2538 435.111 52.2538C434.301 52.2538 433.644 52.7947 433.644 53.4619C433.644 54.1291 434.301 54.67 435.111 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 54.67C430.941 54.67 431.598 54.1291 431.598 53.4619C431.598 52.7947 430.941 52.2538 430.131 52.2538C429.32 52.2538 428.663 52.7947 428.663 53.4619C428.663 54.1291 429.32 54.67 430.131 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 53.4619C423.658 54.1353 424.308 54.67 425.126 54.67C425.943 54.67 426.593 54.1353 426.593 53.4619C426.593 52.7886 425.943 52.2538 425.126 52.2538C424.308 52.2538 423.658 52.7886 423.658 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 53.4619C418.677 54.1353 419.327 54.67 420.145 54.67C420.962 54.67 421.612 54.1353 421.612 53.4619C421.612 52.7886 420.962 52.2538 420.145 52.2538C419.351 52.2538 418.677 52.7886 418.677 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 54.67C415.974 54.67 416.63 54.1291 416.63 53.4619C416.63 52.7947 415.974 52.2538 415.163 52.2538C414.353 52.2538 413.696 52.7947 413.696 53.4619C413.696 54.1291 414.353 54.67 415.163 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 53.4619C408.715 54.1353 409.364 54.67 410.182 54.67C411 54.67 411.65 54.1353 411.65 53.4619C411.65 52.7886 411 52.2538 410.182 52.2538C409.364 52.2538 408.715 52.7886 408.715 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 53.4619C403.734 54.1353 404.383 54.67 405.201 54.67C406.
3019 54.67 406.668 54.1353 406.668 53.4619C406.668 52.7886 406.019 52.2538 405.201 52.2538C404.383 52.2538 403.734 52.7886 403.734 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 54.67C401.03 54.67 401.687 54.1291 401.687 53.4619C401.687 52.7947 401.03 52.2538 400.22 52.2538C399.409 52.2538 398.752 52.7947 398.752 53.4619C398.752 54.1291 399.409 54.67 400.22 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 54.67C396.049 54.67 396.706 54.1291 396.706 53.4619C396.706 52.7947 396.049 52.2538 395.239 52.2538C394.428 52.2538 393.771 52.7947 393.771 53.4619C393.771 54.1291 394.428 54.67 395.239 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 53.4619C388.767 54.1353 389.416 54.67 390.234 54.67C391.052 54.67 391.701 54.1353 391.701 53.4619C391.701 52.7886 391.052 52.2538 390.234 52.2538C389.416 52.2538 388.767 52.7886 388.767 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 53.4619C383.785 54.1353 384.435 54.67 385.253 54.67C386.071 54.67 386.72 54.1353 386.72 53.4619C386.72 52.7886 386.071 52.2538 385.253 52.2538C384.435 52.2538 383.785 52.7886 383.785 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 54.67C381.105 54.67 381.762 54.1291 381.762 53.4619C381.762 52.7947 381.105 52.2538 380.295 52.2538C379.485 52.2538 378.828 52.7947 378.828 53.4619C378.828 54.1291 379.485 54.67 380.295 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 54.67C376.1 54.67 376.757 54.1291 376.757 53.4619C376.757 52.7947 376.1 52.2538 375.29 52.2538C374.48 52.2538 373.823 52.7947 373.823 53.4619C373.823 54.1291 374.48 54.67 375.29 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 53.4619C368.842 54.1353 369.491 54.67 370.309 54.67C371.127 54.67 371.777 54.1353 371.777 53.4619C371.777 52.7886 371.127 52.2538 370.309 52.2538C369.491 52.2538 368.842 52.7886 368.842 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 53.4619C363.861 54.1353 364.51 54.67 365.328 54.67C366.146 54.67 366.795 54.1353 366.795 53.4619C366.795 52.7886 366.146 52.2538 365.328 52.2538C364.51 52.2538 363.861 52.7886 363.861 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 54.67C361.157 54.67 361.814 54.1291 361.814 53.4619C361.814 52.7947 361.157 52.2538 360.347 52.2538C359.537 52.2538 358.88 52.7947 358.88 53.4619C358.88 54.1291 359.537 54.67 360.347 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 54.67C356.176 54.67 356.833 54.1291 356.833 53.4619C356.833 52.7947 356.176 52.2538 355.366 52.2538C354.555 52.2538 353.899 52.7947 353.899 53.4619C353.899 54.1291 354.555 54.67 355.366 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 53.4619C348.894 54.1353 349.543 54.67 350.361 54.67C351.179 54.67 351.828 54.1353 351.828 53.4619C351.828 52.7886 351.179 52.2538 350.361 52.2538C349.543 52.2538 348.894 52.7886 348.894 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 54.67C346.214 54.67 346.871 54.1291 346.871 53.4619C346.871 52.7947 346.214 52.2538 345.404 52.2538C344.593 52.2538 343.937 52.7947 343.937 53.4619C343.937 54.1291 344.593 54.67 345.404 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 54.67C341.209 54.67 341.866 54.1291 341.866 53.4619C341.866 52.7947 341.209 52.2538 340.399 52.2538C339.588 52.2538 338.931 52.7947 338.931 53.4619C338.931 54.1291 339.588 54.67 340.399 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 53.4619C333.95 54.1353 334.6 54.67 335.418 54.67C336.235 54.67 336.885 54.1353 336.885 53.4619C336.885 52.7886 336.235 52.2538 335.418 52.2538C334.6 52.2538 333.95 52.7886 333.95 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 53.4619C328.969 54.1353 329.618 54.67 330.436 54.67C331.254 54.67 331.904 54.1353 331.904 53.4619C331.904 52.7886 331.254 52.2538 330.436 52.2538C329.618 52.2538 328.969 52.7886 328.969 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 54.67C326.266 54.67 326.923 54.1291 326.923 53.4619C326.923 52.7947 326.266 52.2538 325.455 52.2538C324.645 52.2538 323.988 52.7947 323.988 53.4619C323.988 54.1291 324.645 54.67 325.455 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 54.67C321.284 54.67 321.941 54.1291 321.941 53.4619C321.941 52.7947 321.284 52.2538 320.474 52.2538C319.664 52.2538 319.007 52.7947 319.007 53.4619C319.007 54.1291 319.664 54.67 320.474 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 53.4619C314.002 54.1353 314.651 54.67 315.469 54.67C316.287 54.67 316.936 54.1353 316.936 53.4619C316.936 52.7886 316.287 52.2538 315.469 52.2538C314.675 52.2538 314.002 52.7886 314.002 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 53.4619C309.021 54.1353 309.67 54.67 310.488 54.67C311.306 54.67 311.956 54.1353 311.956 53.4619C311.956 52.7886 311.306 52.2538 310.488 52.2538C309.67 52.2538 309.021 52.7886 309.021 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 54.67C306.341 54.67 306.998 54.1291 306.998 53.4619C306.998 52.7947 306.341 52.2538 305.531 52.2538C304.72 52.2538 304.063 52.7947 304.063 53.4619C304.063 54.1291 304.72 54.67 305.531 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 54.67C301.336 54.67 301.993 54.1291 301.993 53.4619C301.993 52.7947 301.336 52.2538 300.526 52.2538C299.716 52.2538 299.059 52.7947 299.059 53.4619C299.059 54.1291 299.716 54.67 300.526 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 53.4619C294.077 54.1353 294.727 54.67 295.545 54.67C296.362 54.67 297.012 54.1353 297.012 53.4619C297.012 52.7886 296.362 52.2538 295.545 52.2538C294.727 52.2538 294.077 52.7886 294.077 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 53.4619C184.421 54.1353 185.07 54.67 185.888 54.67C186.706 54.67 187.356 54.1353 187.356 53.4619C187.356 52.7886 186.706 52.2538 185.888 52.2538C185.094 52.2538 184.421 52.7886 184.421 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 53.4619C179.44 54.1353 180.089 54.67 180.907 54.67C181.725 54.67 182.375 54.1353 182.375 53.4619C182.375 52.7886 181.725 52.2538 180.907 52.2538C180.113 52.2538 179.44 52.7886 179.44 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 54.67C176.736 54.67 177.393 54.1291 177.393 53.4619C177.393 52.7947 176.736 52.2538 175.926 52.2538C175.116 52.2538 174.459 52.7947 174.459 53.4619C174.459 54.1291 175.116 54.67 175.926 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 54.67C171.755 54.67 172.412 54.1291 172.412 53.4619C172.412 52.7947 171.755 52.2538 170.945 52.2538C170.134 52.2538 169.478 52.7947 169.478 53.4619C169.478 54.1291 170.134 54.67 170.945 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 53.4619C164.496 54.1353 165.146 54.67 165.964 54.67C166.781 54.67 167.431 54.1353 167.431 53.4619C167.431 52.7886 166.781 52.2538 165.964 52.2538C165.146 52.2538 164.496 52.7886 164.496 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 53.4619C159.515 54.1353 160.165 54.67 160.982 54.67C161.8 54.67 162.45 54.1353 162.45 53.4619C162.45 52.7886 161.8 52.2538 160.982 52.2538C160.165 52.2538 159.515 52.7886 159.515 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 54.67C156.812 54.67 157.469 54.1291 157.469 53.4619C157.469 52.7947 156.812 52.2538 156.001 52.2538C155.191 52.2538 154.534 52.7947 154.534 53.4619C154.534 54.1291 155.191 54.67 156.001 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M151.02 54.67C151.831 54.67 152.488 54.1291 152.488 53.4619C152.488 52.7947 151.831 52.2538 151.02 52.2538C150.21 52.2538 149.553 52.7947 149.553 53.4619C149.553 54.1291 150.21 54.67 151.02 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 54.67C146.85 54.67 147.507 54.1291 147.507 53.4619C147.507 52.7947 146.85 52.2538 146.039 52.2538C145.229 52.2538 144.572 52.7947 144.572 53.4619C144.572 54.1291 145.229 54.67 146.039 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 54.67C141.845 54.67 142.502 54.1291 142.502 53.4619C142.502 52.7947 141.845 52.2538 141.034 52.2538C140.224 52.2538 139.567 52.7947 139.567 53.4619C139.567 54.1291 140.224 54.67 141.034 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 54.67C136.863 54.67 137.52 54.1291 137.52 53.4619C137.52 52.7947 136.863 52.2538 136.053 52.2538C135.243 52.2538 134.586 52.7947 134.586 53.4619C134.586 54.1291 135.243 54.67 136.053 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 54.67C131.882 54.67 132.539 54.1291 132.539 53.4619C132.539 52.7947 131.882 52.2538 131.072 52.2538C130.262 52.2538 129.605 52.7947 129.605 53.4619C129.605 54.1291 130.262 54.67 131.072 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 54.67C126.901 54.67 127.558 54.1291 127.558 53.4619C127.558 52.7947 126.901 52.2538 126.091 52.2538C125.281 52.2538 124.624 52.7947 124.624 53.4619C124.624 54.1291 125.281 54.67 126.091 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 54.67C121.92 54.67 122.577 54.1291 122.577 53.4619C122.577 52.7947 121.92 52.2538 121.11 52.2538C120.299 52.2538 119.642 52.7947 119.642 53.4619C119.642 54.1291 120.299 54.67 121.11 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 54.67C116.939 54.67 117.596 54.1291 117.596 53.4619C117.596 52.7947 116.939 52.2538 116.129 52.2538C115.318 52.2538 114.661 52.7947 114.661 53.4619C114.661 54.1291 115.318 54.67 116.129 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 53.4619C109.656 54.1353 110.305 54.67 111.123 54.67C111.941 54.67 112.591 54.1353 112.591 53.4619C112.591 52.7886 111.941 52.2538 111.123 52.2538C110.33 52.2538 109.656 52.7886 109.656 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 54.67C106.977 54.67 107.634 54.1291 107.634 53.4619C107.634 52.7947 106.977 52.2538 106.166 52.2538C105.356 52.2538 104.699 52.7947 104.699 53.4619C104.699 54.1291 105.356 54.67 106.166 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 54.67C101.972 54.67 102.629 54.1291 102.629 53.4619C102.629 52.7947 101.972 52.2538 101.161 52.2538C100.351 52.2538 99.694 52.7947 99.694 53.4619C99.694 54.1291 100.351 54.67 101.161 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 54.67C96.9909 54.67 97.6478 54.1291 97.6478 53.4619C97.6478 52.7947 96.9909 52.2538 96.1805 52.2538C95.3701 52.2538 94.7131 52.7947 94.7131 53.4619C94.7131 54.1291 95.3701 54.67 96.1805 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 53.4619C89.7318 54.1353 90.3813 54.67 91.1991 54.67C92.017 54.67 92.6665 54.1353 92.6665 53.4619C92.6665 52.7886 92.017 52.2538 91.1991 52.2538C90.3813 52.2538 89.7318 52.7886 89.7318 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 53.4619C84.7507 54.1353 85.4002 54.67 86.2181 54.67C87.0359 54.67 87.6854 54.1353 87.6854 53.4619C87.6854 52.7886 87.0359 52.2538 86.2181 52.2538C85.4002 52.2538 84.7507 52.7886 84.7507 53.4619Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 54.67C82.0474 54.67 82.7043 54.1291 82.7043 53.4619C82.7043 52.7947 82.0474 52.2538 81.237 52.2538C80.4266 52.2538 79.7697 52.7947 79.7697 53.4619C79.7697 54.1291 80.4266 54.67 81.237 54.67Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 48.8741C553.263 49.5474 553.913 50.0821 554.73 50.0821C555.548 50.0821 556.198 49.5474 556.198 48.8741C556.198 48.2007 555.548 47.666 554.73 47.666C553.913 47.666 553.263 48.2007 553.263 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 50.0821C545.578 50.0821 546.235 49.5413 546.235 48.8741C546.235 48.2069 545.578 47.666 544.768 47.666C543.958 47.666 543.301 48.2069 543.301 48.8741C543.301 49.5413 543.958 50.0821 544.768 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 48.8741C538.296 49.5474 538.945 50.0821 539.763 50.0821C540.581 50.0821 541.23 49.5474 541.23 48.8741C541.23 48.2007 540.581 47.666 539.763 47.666C538.945 47.666 538.296 48.2007 538.296 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 48.8741C533.314 49.5474 533.964 50.0821 534.782 50.0821C535.6 50.0821 536.249 49.5474 536.249 48.8741C536.249 48.2007 535.6 47.666 534.782 47.666C533.964 47.666 533.314 48.2007 533.314 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 50.0821C530.611 50.0821 531.268 49.5413 531.268 48.8741C531.268 48.2069 530.611 47.666 529.801 47.666C528.99 47.666 528.333 48.2069 528.333 48.8741C528.333 49.5413 528.99 50.0821 529.801 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 50.0821C525.63 50.0821 526.287 49.5413 526.287 48.8741C526.287 48.2069 525.63 47.666 524.82 47.666C524.009 47.666 523.352 48.2069 523.352 48.8741C523.352 49.5413 524.009 50.0821 524.82 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 48.8741C518.371 49.5474 519.021 50.0821 519.839 50.0821C520.657 50.0821 521.306 49.5474 521.306 48.8741C521.306 48.2007 520.657 47.666 519.839 47.666C519.021 47.666 518.371 48.2007 518.371 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 48.8741C513.39 49.5473 514.039 50.0819 514.857 50.0819C515.675 50.0819 516.325 49.5473 516.325 48.8741C516.325 48.2009 515.675 47.6663 514.857 47.6663C514.039 47.6465 513.39 48.2009 513.39 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 50.0821C510.687 50.0821 511.344 49.5413 511.344 48.8741C511.344 48.2069 510.687 47.666 509.876 47.666C509.066 47.666 508.409 48.2069 508.409 48.8741C508.409 49.5413 509.066 50.0821 509.876 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 50.0821C505.705 50.0821 506.362 49.5413 506.362 48.8741C506.362 48.2069 505.705 47.666 504.895 47.666C504.085 47.666 503.428 48.2069 503.428 48.8741C503.428 49.5413 504.085 50.0821 504.895 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 48.8741C498.423 49.5474 499.072 50.0821 499.89 50.0821C500.708 50.0821 501.358 49.5474 501.358 48.8741C501.358 48.2007 500.708 47.666 499.89 47.666C499.072 47.666 498.423 48.2007 498.423 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 48.8741C493.442 49.5473 494.091 50.0819 494.909 50.0819C495.727 50.0819 496.376 49.5473 496.376 48.8741C496.376 48.2009 495.727 47.6663 494.909 47.6663C494.115 47.6465 493.442 48.2009 493.442 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 50.0821C490.738 50.0821 491.395 49.5413 491.395 48.8741C491.395 48.2069 490.738 47.666 489.928 47.666C489.117 47.666 488.46 48.2069 488.46 48.8741C488.46 49.5413 489.117 50.0821 489.928 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 48.8741C483.479 49.5474 484.129 50.0821 484.947 50.0821C485.764 50.0821 486.414 49.5474 486.414 48.8741C486.414 48.2007 485.764 47.666 484.947 47.666C484.129 47.666 483.479 48.2007 483.479 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 48.8741C478.498 49.5473 479.148 50.0819 479.965 50.0819C480.783 50.0819 481.433 49.5473 481.433 48.8741C481.433 48.2009 480.783 47.6663 479.965 47.6663C479.148 47.6465 478.498 48.2009 478.498 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 50.0821C475.795 50.0821 476.452 49.5413 476.452 48.8741C476.452 48.2069 475.795 47.666 474.984 47.666C474.174 47.666 473.517 48.2069 473.517 48.8741C473.517 49.5413 474.174 50.0821 474.984 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 50.0821C470.814 50.0821 471.471 49.5413 471.471 48.8741C471.471 48.2069 470.814 47.666 470.003 47.666C469.193 47.666 468.536 48.2069 468.536 48.8741C468.536 49.5413 469.193 50.0821 470.003 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 48.8741C463.531 49.5473 464.181 50.0819 464.998 50.0819C465.816 50.0819 466.466 49.5473 466.466 48.8741C466.466 48.2009 465.816 47.6663 464.998 47.6663C464.205 47.6465 463.531 48.2009 463.531 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 48.8741C458.55 49.5474 459.199 50.0821 460.017 50.0821C460.835 50.0821 461.484 49.5474 461.484 48.8741C461.484 48.2007 460.835 47.666 460.017 47.666C459.199 47.666 458.55 48.2007 458.55 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 50.0821C455.847 50.0821 456.504 49.5413 456.504 48.8741C456.504 48.2069 455.847 47.666 455.036 47.666C454.226 47.666 453.569 48.2069 453.569 48.8741C453.569 49.5413 454.226 50.0821 455.036 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 50.0821C450.865 50.0821 451.522 49.5413 451.522 48.8741C451.522 48.2069 450.865 47.666 450.055 47.666C449.244 47.666 448.587 48.2069 448.587 48.8741C448.587 49.5413 449.244 50.0821 450.055 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 48.8741C443.606 49.5473 444.256 50.0819 445.074 50.0819C445.892 50.0819 446.541 49.5
3473 446.541 48.8741C446.541 48.2009 445.892 47.6663 445.074 47.6663C444.256 47.6465 443.606 48.2009 443.606 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 48.8741C438.625 49.5474 439.275 50.0821 440.093 50.0821C440.911 50.0821 441.56 49.5474 441.56 48.8741C441.56 48.2007 440.911 47.666 440.093 47.666C439.275 47.666 438.625 48.2007 438.625 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 50.0821C435.922 50.0821 436.579 49.5413 436.579 48.8741C436.579 48.2069 435.922 47.666 435.111 47.666C434.301 47.666 433.644 48.2069 433.644 48.8741C433.644 49.5413 434.301 50.0821 435.111 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 50.0821C430.941 50.0821 431.598 49.5413 431.598 48.8741C431.598 48.2069 430.941 47.666 430.131 47.666C429.32 47.666 428.663 48.2069 428.663 48.8741C428.663 49.5413 429.32 50.0821 430.131 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 48.8741C423.658 49.5474 424.308 50.0821 425.126 50.0821C425.943 50.0821 426.593 49.5474 426.593 48.8741C426.593 48.2007 425.943 47.666 425.126 47.666C424.308 47.666 423.658 48.2007 423.658 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 48.8739C418.677 49.5471 419.327 50.0817 420.145 50.0817C420.962 50.0817 421.612 49.5471 421.612 48.8739C421.612 48.2007 420.962 47.6661 420.145 47.6661C419.351 47.6463 418.677 48.2007 418.677 48.8739Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 50.0821C415.974 50.0821 416.63 49.5413 416.63 48.8741C416.63 48.2069 415.974 47.666 415.163 47.666C414.353 47.666 413.696 48.2069 413.696 48.8741C413.696 49.5413 414.353 50.0821 415.163 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 48.8741C408.715 49.5473 409.364 50.0819 410.182 50.0819C411 50.0819 411.65 49.5473 411.65 48.8741C411.65 48.2009 411 47.6663 410.182 47.6663C409.364 47.6465 408.715 48.2009 408.715 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 48.8741C403.734 49.5473 404.383 50.0819 405.201 50.0819C406.019 50.0819 406.668 49.5473 406.668 48.8741C406.668 48.2009 406.019 47.6663 405.201 47.6663C404.383 47.6465 403.734 48.2009 403.734 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 50.0821C401.03 50.0821 401.687 49.5413 401.687 48.8741C401.687 48.2069 401.03 47.666 400.22 47.666C399.409 47.666 398.752 48.2069 398.752 48.8741C398.752 49.5413 399.409 50.0821 400.22 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 50.0821C396.049 50.0821 396.706 49.5413 396.706 48.8741C396.706 48.2069 396.049 47.666 395.239 47.666C394.428 47.666 393.771 48.2069 393.771 48.8741C393.771 49.5413 394.428 50.0821 395.239 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 48.8741C388.767 49.5474 389.416 50.0821 390.234 50.0821C391.052 50.0821 391.701 49.5474 391.701 48.8741C391.701 48.2007 391.052 47.666 390.234 47.666C389.416 47.666 388.767 48.2007 388.767 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 48.8741C383.785 49.5474 384.435 50.0821 385.253 50.0821C386.071 50.0821 386.72 49.5474 386.72 48.8741C386.72 48.2007 386.071 47.666 385.253 47.666C384.435 47.666 383.785 48.2007 383.785 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 50.0821C381.105 50.0821 381.762 49.5413 381.762 48.8741C381.762 48.2069 381.105 47.666 380.295 47.666C379.485 47.666 378.828 48.2069 378.828 48.8741C378.828 49.5413 379.485 50.0821 380.295 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 50.0821C376.1 50.0821 376.757 49.5413 376.757 48.8741C376.757 48.2069 376.1 47.666 375.29 47.666C374.48 47.666 373.823 48.2069 373.823 48.8741C373.823 49.5413 374.48 50.0821 375.29 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 48.8739C368.842 49.5471 369.491 50.0817 370.309 50.0817C371.127 50.0817 371.777 49.5471 371.777 48.8739C371.777 48.2007 371.127 47.6661 370.309 47.6661C369.491 47.6463 368.842 48.2007 368.842 48.8739Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 48.8739C363.861 49.5471 364.51 50.0817 365.328 50.0817C366.146 50.0817 366.795 49.5471 366.795 48.8739C366.795 48.2007 366.146 47.6661 365.328 47.6661C364.51 47.6463 363.861 48.2007 363.861 48.8739Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 50.0821C361.157 50.0821 361.814 49.5413 361.814 48.8741C361.814 48.2069 361.157 47.666 360.347 47.666C359.537 47.666 358.88 48.2069 358.88 48.8741C358.88 49.5413 359.537 50.0821 360.347 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 50.0821C356.176 50.0821 356.833 49.5413 356.833 48.8741C356.833 48.2069 356.176 47.666 355.366 47.666C354.555 47.666 353.899 48.2069 353.899 48.8741C353.899 49.5413 354.555 50.0821 355.366 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 48.8741C348.894 49.5474 349.543 50.0821 350.361 50.0821C351.179 50.0821 351.828 49.5474 351.828 48.8741C351.828 48.2007 351.179 47.666 350.361 47.666C349.543 47.666 348.894 48.2007 348.894 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 50.0821C346.214 50.0821 346.871 49.5413 346.871 48.8741C346.871 48.2069 346.214 47.666 345.404 47.666C344.593 47.666 343.937 48.2069 343.937 48.8741C343.937 49.5413 344.593 50.0821 345.404 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 50.0821C341.209 50.0821 341.866 49.5413 341.866 48.8741C341.866 48.2069 341.209 47.666 340.399 47.666C339.588 47.666 338.931 48.2069 338.931 48.8741C338.931 49.5413 339.588 50.0821 340.399 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 48.8741C333.95 49.5474 334.6 50.0821 335.418 50.0821C336.235 50.0821 336.885 49.5474 336.885 48.8741C336.885 48.2007 336.235 47.666 335.418 47.666C334.6 47.666 333.95 48.2007 333.95 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 48.8741C328.969 49.5473 329.618 50.0819 330.436 50.0819C331.254 50.0819 331.904 49.5473 331.904 48.8741C331.904 48.2009 331.254 47.6663 330.436 47.6663C329.618 47.6465 328.969 48.2009 328.969 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 50.0821C326.266 50.0821 326.923 49.5413 326.923 48.8741C326.923 48.2069 326.266 47.666 325.455 47.666C324.645 47.
3666 323.988 48.2069 323.988 48.8741C323.988 49.5413 324.645 50.0821 325.455 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 50.0821C321.284 50.0821 321.941 49.5413 321.941 48.8741C321.941 48.2069 321.284 47.666 320.474 47.666C319.664 47.666 319.007 48.2069 319.007 48.8741C319.007 49.5413 319.664 50.0821 320.474 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 48.8741C314.002 49.5473 314.651 50.0819 315.469 50.0819C316.287 50.0819 316.936 49.5473 316.936 48.8741C316.936 48.2009 316.287 47.6663 315.469 47.6663C314.675 47.6465 314.002 48.2009 314.002 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 48.8741C309.021 49.5474 309.67 50.0821 310.488 50.0821C311.306 50.0821 311.956 49.5474 311.956 48.8741C311.956 48.2007 311.306 47.666 310.488 47.666C309.67 47.666 309.021 48.2007 309.021 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M305.531 50.0821C306.341 50.0821 306.998 49.5413 306.998 48.8741C306.998 48.2069 306.341 47.666 305.531 47.666C304.72 47.666 304.063 48.2069 304.063 48.8741C304.063 49.5413 304.72 50.0821 305.531 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M300.526 50.0821C301.336 50.0821 301.993 49.5413 301.993 48.8741C301.993 48.2069 301.336 47.666 300.526 47.666C299.716 47.666 299.059 48.2069 299.059 48.8741C299.059 49.5413 299.716 50.0821 300.526 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 48.8741C294.077 49.5474 294.727 50.0821 295.545 50.0821C296.362 50.0821 297.012 49.5474 297.012 48.8741C297.012 48.2007 296.362 47.666 295.545 47.666C294.727 47.666 294.077 48.2007 294.077 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 48.8741C179.44 49.5473 180.089 50.0819 180.907 50.0819C181.725 50.0819 182.375 49.5473 182.375 48.8741C182.375 48.2009 181.725 47.6663 180.907 47.6663C180.113 47.6465 179.44 48.2009 179.44 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 50.0821C176.736 50.0821 177.393 49.5413 177.393 48.8741C177.393 48.2069 176.736 47.666 175.926 47.666C175.116 47.666 174.459 48.2069 174.459 48.8741C174.459 49.5413 175.116 50.0821 175.926 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 50.0821C171.755 50.0821 172.412 49.5413 172.412 48.8741C172.412 48.2069 171.755 47.666 170.945 47.666C170.134 47.666 169.478 48.2069 169.478 48.8741C169.478 49.5413 170.134 50.0821 170.945 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 48.8741C164.496 49.5473 165.146 50.0819 165.964 50.0819C166.781 50.0819 167.431 49.5473 167.431 48.8741C167.431 48.2009 166.781 47.6663 165.964 47.6663C165.146 47.6465 164.496 48.2009 164.496 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 48.8741C159.515 49.5473 160.165 50.0819 160.982 50.0819C161.8 50.0819 162.45 49.5473 162.45 48.8741C162.45 48.2009 161.8 47.6663 160.982 47.6663C160.165 47.6465 159.515 48.2009 159.515 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 50.0821C156.812 50.0821 157.469 49.5413 157.469 48.8741C157.469 48.2069 156.812 47.666 156.001 47.666C155.191 47.666 154.534 48.2069 154.534 48.8741C154.534 49.5413 155.191 50.0821 156.001 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M151.02 50.0821C151.831 50.0821 152.488 49.5413 152.488 48.8741C152.488 48.2069 151.831 47.666 151.02 47.666C150.21 47.666 149.553 48.2069 149.553 48.8741C149.553 49.5413 150.21 50.0821 151.02 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 50.0821C146.85 50.0821 147.507 49.5413 147.507 48.8741C147.507 48.2069 146.85 47.666 146.039 47.666C145.229 47.666 144.572 48.2069 144.572 48.8741C144.572 49.5413 145.229 50.0821 146.039 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 50.0821C141.845 50.0821 142.502 49.5413 142.502 48.8741C142.502 48.2069 141.845 47.666 141.034 47.666C140.224 47.666 139.567 48.2069 139.567 48.8741C139.567 49.5413 140.224 50.0821 141.034 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 50.0821C136.863 50.0821 137.52 49.5413 137.52 48.8741C137.52 48.2069 136.863 47.666 136.053 47.666C135.243 47.666 134.586 48.2069 134.586 48.8741C134.586 49.5413 135.243 50.0821 136.053 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 50.0821C131.882 50.0821 132.539 49.5413 132.539 48.8741C132.539 48.2069 131.882 47.666 131.072 47.666C130.262 47.666 129.605 48.2069 129.605 48.8741C129.605 49.5413 130.262 50.0821 131.072 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 50.0821C126.901 50.0821 127.558 49.5413 127.558 48.8741C127.558 48.2069 126.901 47.666 126.091 47.666C125.281 47.666 124.624 48.2069 124.624 48.8741C124.624 49.5413 125.281 50.0821 126.091 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 50.0821C121.92 50.0821 122.577 49.5413 122.577 48.8741C122.577 48.2069 121.92 47.666 121.11 47.666C120.299 47.666 119.642 48.2069 119.642 48.8741C119.642 49.5413 120.299 50.0821 121.11 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 50.0821C116.939 50.0821 117.596 49.5413 117.596 48.8741C117.596 48.2069 116.939 47.666 116.129 47.666C115.318 47.666 114.661 48.2069 114.661 48.8741C114.661 49.5413 115.318 50.0821 116.129 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 48.8741C109.656 49.5473 110.305 50.0819 111.123 50.0819C111.941 50.0819 112.591 49.5473 112.591 48.8741C112.591 48.2009 111.941 47.6663 111.123 47.6663C110.33 47.6465 109.656 48.2009 109.656 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 50.0821C106.977 50.0821 107.634 49.5413 107.634 48.8741C107.634 48.2069 106.977 47.666 106.166 47.666C105.356 47.666 104.699 48.2069 104.699 48.8741C104.699 49.5413 105.356 50.0821 106.166 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 50.0821C101.972 50.0821 102.629 49.5413 102.629 48.8741C102.629 48.2069 101.972 47.666 101.161 47.666C100.351 47.666 99.694 48.2069 99.694 48.8741C99.694 49.5413 100.351 50.0821 101.161 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 50.0821C96.9909 50.0821 97.6478 49.5413 97.6478 48.8741C97.6478 48.2069 96.9909 47.666 96.1805 47.666C95.3701 47.666 94.7131 48.2069 94.7131 48.8741C94.7131 49.5413 95.3701 50.0821 96.1805 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 48.8741C89.7318 49.5473 90.3813 50.0819 91.1991 50.0819C92.017 50.0819 92.6665 49.5473 92.6665 48.8741C92.6665 48.2009 92.017 47.6663 91.1991 47.6663C90.3813 47.6465 89.7318 48.2009 89.7318 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 48.8741C84.7507 49.5473 85.4002 50.0819 86.2181 50.0819C87.0359 50.0819 87.6854 49.5473 87.6854 48.8741C87.6854 48.2009 87.0359 47.6663 86.2181 47.6663C85.4002 47.6465 84.7
3507 48.2009 84.7507 48.8741Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 50.0821C82.0474 50.0821 82.7043 49.5413 82.7043 48.8741C82.7043 48.2069 82.0474 47.666 81.237 47.666C80.4266 47.666 79.7697 48.2069 79.7697 48.8741C79.7697 49.5413 80.4266 50.0821 81.237 50.0821Z",fill:"#5840D2"}),a.createElement("path",{d:"M543.277 44.2864C543.277 44.9596 543.927 45.4942 544.745 45.4942C545.562 45.4942 546.212 44.9596 546.212 44.2864C546.212 43.6132 545.562 43.0786 544.745 43.0786C543.951 43.0588 543.277 43.6132 543.277 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 44.2868C538.296 44.9601 538.945 45.4949 539.763 45.4949C540.581 45.4949 541.23 44.9601 541.23 44.2868C541.23 43.6135 540.581 43.0787 539.763 43.0787C538.945 43.0787 538.296 43.6135 538.296 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 44.2868C533.314 44.9601 533.964 45.4949 534.782 45.4949C535.6 45.4949 536.249 44.9601 536.249 44.2868C536.249 43.6135 535.6 43.0787 534.782 43.0787C533.964 43.0787 533.314 43.6135 533.314 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M528.333 44.2864C528.333 44.9596 528.983 45.4942 529.801 45.4942C530.619 45.4942 531.268 44.9596 531.268 44.2864C531.268 43.6132 530.619 43.0786 529.801 43.0786C528.983 43.0588 528.333 43.6132 528.333 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M523.352 44.2868C523.352 44.9601 524.002 45.4949 524.82 45.4949C525.637 45.4949 526.287 44.9601 526.287 44.2868C526.287 43.6135 525.637 43.0787 524.82 43.0787C524.002 43.0787 523.352 43.6135 523.352 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 44.2868C518.371 44.9601 519.021 45.4949 519.839 45.4949C520.657 45.4949 521.306 44.9601 521.306 44.2868C521.306 43.6135 520.657 43.0787 519.839 43.0787C519.021 43.0787 518.371 43.6135 518.371 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 44.2864C513.39 44.9596 514.039 45.4942 514.857 45.4942C515.675 45.4942 516.325 44.9596 516.325 44.2864C516.325 43.6132 515.675 43.0786 514.857 43.0786C514.039 43.0588 513.39 43.6132 513.39 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 44.2868C508.385 44.9601 509.035 45.4949 509.853 45.4949C510.67 45.4949 511.32 44.9601 511.32 44.2868C511.32 43.6135 510.67 43.0787 509.853 43.0787C509.035 43.0787 508.385 43.6135 508.385 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 44.2868C503.404 44.9601 504.053 45.4949 504.871 45.4949C505.689 45.4949 506.338 44.9601 506.338 44.2868C506.338 43.6135 505.689 43.0787 504.871 43.0787C504.053 43.0787 503.404 43.6135 503.404 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 44.2868C498.423 44.9601 499.072 45.4949 499.89 45.4949C500.708 45.4949 501.358 44.9601 501.358 44.2868C501.358 43.6135 500.708 43.0787 499.89 43.0787C499.072 43.0787 498.423 43.6135 498.423 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 44.2864C493.442 44.9596 494.091 45.4942 494.909 45.4942C495.727 45.4942 496.376 44.9596 496.376 44.2864C496.376 43.6132 495.727 43.0786 494.909 43.0786C494.115 43.0588 493.442 43.6132 493.442 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 44.2868C488.46 44.9601 489.11 45.4949 489.928 45.4949C490.746 45.4949 491.395 44.9601 491.395 44.2868C491.395 43.6135 490.746 43.0787 489.928 43.0787C489.11 43.0787 488.46 43.6135 488.46 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 44.2868C483.479 44.9601 484.129 45.4949 484.947 45.4949C485.764 45.4949 486.414 44.9601 486.414 44.2868C486.414 43.6135 485.764 43.0787 484.947 43.0787C484.129 43.0787 483.479 43.6135 483.479 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 44.2864C478.498 44.9596 479.148 45.4942 479.965 45.4942C480.783 45.4942 481.433 44.9596 481.433 44.2864C481.433 43.6132 480.783 43.0786 479.965 43.0786C479.148 43.0588 478.498 43.6132 478.498 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 44.2868C473.517 44.9601 474.167 45.4949 474.984 45.4949C475.802 45.4949 476.452 44.9601 476.452 44.2868C476.452 43.6135 475.802 43.0787 474.984 43.0787C474.167 43.0787 473.517 43.6135 473.517 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 44.2868C468.512 44.9601 469.162 45.4949 469.98 45.4949C470.797 45.4949 471.447 44.9601 471.447 44.2868C471.447 43.6135 470.797 43.0787 469.98 43.0787C469.162 43.0787 468.512 43.6135 468.512 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 44.2864C463.531 44.9596 464.181 45.4942 464.998 45.4942C465.816 45.4942 466.466 44.9596 466.466 44.2864C466.466 43.6132 465.816 43.0786 464.998 43.0786C464.205 43.0588 463.531 43.6132 463.531 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 44.2868C458.55 44.9601 459.199 45.4949 460.017 45.4949C460.835 45.4949 461.484 44.9601 461.484 44.2868C461.484 43.6135 460.835 43.0787 460.017 43.0787C459.199 43.0787 458.55 43.6135 458.55 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 44.2868C453.569 44.9601 454.218 45.4949 455.036 45.4949C455.854 45.4949 456.504 44.9601 456.504 44.2868C456.504 43.6135 455.854 43.0787 455.036 43.0787C454.218 43.0787 453.569 43.6135 453.569 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 44.2868C448.587 44.9601 449.237 45.4949 450.055 45.4949C450.873 45.4949 451.522 44.9601 451.522 44.2868C451.522 43.6135 450.873 43.0787 450.055 43.0787C449.237 43.0787 448.587 43.6135 448.587 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 44.2864C443.606 44.9596 444.256 45.4942 445.074 45.4942C445.892 45.4942 446.541 44.9596 446.541 44.2864C446.541 43.6132 445.892 43.0786 445.074 43.0786C444.256 43.0588 443.606 43.6132 443.606 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 44.2868C438.625 44.9601 439.275 45.4949 440.093 45.4949C440.911 45.4949 441.56 44.9601 441.56 44.2868C441.56 43.6135 440.911 43.0787 440.093 43.0787C439.275 43.0787 438.625 43.6135 438.625 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 44.2868C433.644 44.9601 434.294 45.4949 435.111 45.4949C435.929 45.4949 436.579 44.9601 436.579 44.2868C436.579 43.6135 435.929 43.0787 435.111 43.0787C434.294 43.0787 433.644 43.6135 433.644 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 44.2868C428.639 44.9601 429.289 45.4949 430.107 45.4949C430.924 45.4949 431.574 44.9601 431.574 44.2868C431.574 43.6135 430.924 43.0787 430.107 43.0787C429.289 43.0787 428.639 43.6135 428.639 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 44.2868C423.658 44.9601 424.308 45.4949 425.126 45.4949C425.943 45.4949 426.593 44.9601 426.593 44.2868C426.593 43.6135 425.943 43.0787 425.126 43.0787C424.308 43.0787 423.658 43.6135 423.658 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 44.2864C418.677 44.9596 419.327 45.4942 420.145 45.4942C420.962 45.4942 421.612 44.9596 421.612 44.2864C421.612 43.6132 420.962 43.0786 420.145 43.0786C419.351 43.0588 418.677 43.6132 418.677 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 44.2864C413.696 44.9596 414.345 45.4942 415.163 45.4942C415.981 45.4942 416.63 44.9596 416.63 44.2864C416.63 43.6132 415.981 43.0786 415.163 43.0786C414.345 43.0588 413.696 43.6132 413.696 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 44.2864C408.715 44.9596 409.364 45.4942 410.182 45.4942C411 45.4942 411.65 44.9596 411.65 44.2864C411.65 43.6132 411 43.0786 410.182 43.0786C409.364 43.0588 408.715 43.6132 408.715 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 44.2864C403.734 44.9596 404.383 45.4942 405.201 45.4942C406.019 45.4942 406.668 44.9596 406.668 44.2864C406.668 43.6132 406.019 43.0786 405.201 43.0786C404.383 43.0588 403.734 43.6132 403.734 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 44.2868C398.752 44.9601 399.402 45.4949 400.22 45.4949C401.038 45.4949 401.687 44.9601 401.687 44.2868C401.687 43.6135 401.038 43.0787 400.22 43.0787C399.402 43.0787 398.752 43.6135 398.752 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 44.2864C393.747 44.9596 394.397 45.4942 395.215 45.4942C396.033 45.4942 396.682 44.9596 396.682 44.2864C396.682 43.6132 396.033 43.0786 395.215 43.0786C394.421 43.0588 393.747 43.6132 393.747 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 44.2868C388.767 44.9601 389.416 45.4949 390.234 45.4949C391.052 45.4949 391.701 44.9601 391.701 44.2868C391.701 43.6135 391.052 43.0787 390.234 43.0787C389.416 43.0787 388.767 43.6135 388.767 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 44.2868C383.785 44.9601 384.435 45.4949 385.253 45.4949C386.071 45.4949 386.72 44.9601 386.72 44.2868C386.72 43.6135 386.071 43.0787 385.253 43.0787C384.435 43.0787 383.785 43.6135 383.785 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 44.2864C378.804 44.9596 379.454 45.4942 380.271 45.4942C381.089 45.4942 381.739 44.9596 381.739 44.2864C381.739 43.6132 381.089 43.0786 380.271 43.0786C379.478 43.0588 378.804 43.6132 378.804 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 44.2868C373.823 44.9601 374.472 45.4949 375.29 45.4949C376.108 45.4949 376.757 44.9601 376.757 44.2868C376.757 43.6135 376.108 43.0787 375.29 43.0787C374.472 43.0787 373.823 43.6135 373.823 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 44.2864C368.842 44.9596 369.491 45.4942 370.309 45.4942C371.127 45.4942 371.777 44.9596 371.777 44.2864C371.777 43.6132 371.127 43.0786 370.309 43.0786C369.491 43.0588 368.842 43.6132 368.842 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 44.2864C363.861 44.9596 364.51 45.4942 365.328 45.4942C366.146 45.4942 366.795 44.9596 366.795 44.2864C366.795 43.6132 366.146 43.0786 365.328 43.0786C364.51 43.0588 363.861 43.6132 363.861 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 44.2868C358.88 44.9601 359.529 45.4949 360.347 45.4949C361.165 45.4949 361.814 44.9601 361.814 44.2868C361.814 43.6135 361.165 43.0787 360.347 43.0787C359.529 43.0787 358.88 43.6135 358.88 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 44.2864C353.875 44.9596 354.524 45.4942 355.342 45.4942C356.16 45.4942 356.809 44.9596 356.809 44.2864C356.809 43.6132 356.16 43.0786 355.342 43.0786C354.548 43.0588 353.875 43.6132 353.875 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 44.2868C348.894 44.9601 349.543 45.4949 350.361 45.4949C351.179 45.4949 351.828 44.9601 351.828 44.2868C351.828 43.6135 351.179 43.0787 350.361 43.0787C349.543 43.0787 348.894 43.6135 348.894 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 44.2868C343.912 44.9601 344.562 45.4949 345.38 45.4949C346.198 45.4949 346.847 44.9601 346.847 44.2868C346.847 43.6135 346.198 43.0787 345.38 43.0787C344.562 43.0787 343.912 43.6135 343.912 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 44.2868C338.931 44.9601 339.581 45.4949 340.399 45.4949C341.217 45.4949 341.866 44.9601 341.866 44.2868C341.866 43.6135 341.217 43.0787 340.399 43.0787C339.581 43.0787 338.931 43.6135 338.931 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 44.2868C333.95 44.9601 334.6 45.4949 335.418 45.4949C336.235 45.4949 336.885 44.9601 336.885 44.2868C336.885 43.6135 336.235 43.0787 335.418 43.0787C334.6 43.0787 333.95 43.6135 333.95 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 44.2864C328.969 44.9596 329.618 45.4942 330.436 45.4942C331.254 45.4942 331.904 44.9596 331.904 44.2864C331.904 43.6132 331.254 43.0786 330.436 43.0786C329.618 43.0588 328.969 43.6132 328.969 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 44.2864C323.988 44.9596 324.638 45.4942 325.455 45.4942C326.273 45.4942 326.923 44.9596 326.923 44.2864C326.923 43.6132 326.273 43.0786 325.455 43.0786C324.638 43.0588 323.988 43.6132 323.988 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 44.2864C319.007 44.9596 319.656 45.4942 320.474 45.4942C321.292 45.4942 321.941 44.9596 321.941 44.2864C321.941 43.6132 321.292 43.0786 320.474 43.0786C319.656 43.0588 319.007 43.6132 319.007 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 44.2864C314.002 44.9596 314.651 45.4942 315.469 45.4942C316.287 45.4942 316.936 44.9596 316.936 44.2864C316.936 43.6132 316.287 43.0786 315.469 43.0786C314.675 43.0588 314.002 43.6132 314.002 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 44.2868C309.021 44.9601 309.67 45.4949 310.488 45.4949C311.306 45.4949 311.956 44.9601 311.956 44.2868C311.956 43.6135 311.306 43.0787 310.488 43.0787C309.67 43.0787 309.021 43.6135 309.021 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 44.2868C304.04 44.9601 304.689 45.4949 305.507 45.4949C306.325 45.4949 306.974 44.9601 306.974 44.2868C306.974 43.6135 306.325 43.0787 305.507 43.0787C304.689 43.0787 304.04 43.6135 304.04 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 44.2868C299.059 44.9601 299.708 45.4949 300.526 45.4949C301.344 45.4949 301.993 44.9601 301.993 44.2868C301.993 43.6135 301.344 43.0787 300.526 43.0787C299.708 43.0787 299.059 43.6135 299.059 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 44.2868C294.077 44.9601 294.727 45.4949 295.545 45.4949C296.362 45.4949 297.012 44.9601 297.012 44.2868C297.012 43.6135 296.362 43.0787 295.545 43.0787C294.727 43.0787 294.077 43.6135 294.077 44.2868Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 44.2864C289.096 44.9596 289.745 45.4942 290.563 45.4942C291.381 45.4942 292.031 44.9596 292.031 44.2864C292.031 43.6132 291.381 43.0786 290.563 43.0786C289.745 43.0588 289.096 43.6132 289.096 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M199.388 44.2864C199.388 44.9596 200.038 45.4942 200.855 45.4942C201.673 45.4942 202.323 44.9596 202.323 44.2864C202.323 43.6132 201.673 43.0786 200.855 43.0786C200.038 43.0588 199.388 43.6132 199.388 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M194.383 44.2864C194.383 44.9596 195.033 45.4942 195.851 45.4942C196.668 45.4942 197.318 44.9596 197.318 44.2864C197.318 43.6132 196.668 43.0786 195.851 43.0786C195.057 43.0588 194.383 43.6132 194.383 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 44.2864C179.44 44.9596 180.089 45.4942 180.907 45.4942C181.725 45.4942 182.375 44.9596 182.375 44.2864C182.375 43.6132 181.725 43.0786 180.907 43.0786C180.113 43.0588 179.44 43.6132 179.44 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M174.459 44.2864C174.459 44.9596 175.108 45.4942 175.926 45.4942C176.744 45.4942 177.393 44.9596 177.393 44.2864C177.393 43.6132 176.744 43.0786 175.926 43.0786C175.108 43.0588 174.459 43.6132 174.459 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 44.2864C169.478 44.9596 170.127 45.4942 170.945 45.4942C171.763 45.4942 172.412 44.9596 172.412 44.2864C172.412 43.6132 171.763 43.0786 170.945 43.0786C170.127 43.0588 169.478 43.6132 169.478 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 44.2864C164.496 44.9596 165.146 45.4942 165.964 45.4942C166.781 45.4942 167.431 44.9596 167.431 44.2864C167.431 43.6132 166.781 43.0786 165.964 43.0786C165.146 43.0588 164.496 43.6132 164.496 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 44.2864C159.515 44.9596 160.165 45.4942 160.982 45.4942C161.8 45.4942 162.45 44.9596 162.45 44.2864C162.45 43.6132 161.8 43.0786 160.982 43.0786C160.165 43.0588 159.515 43.6132 159.515 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 44.2864C154.51 44.9596 155.16 45.4942 155.978 45.4942C156.796 45.4942 157.445 44.9596 157.445 44.2864C157.445 43.6132 156.796 43.0786 155.978 43.0786C155.184 43.0588 154.51 43.6132 154.51 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 44.2864C149.529 44.9596 150.
3179 45.4942 150.997 45.4942C151.814 45.4942 152.464 44.9596 152.464 44.2864C152.464 43.6132 151.814 43.0786 150.997 43.0786C150.203 43.0588 149.529 43.6132 149.529 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M144.548 44.2864C144.548 44.9596 145.198 45.4942 146.015 45.4942C146.833 45.4942 147.483 44.9596 147.483 44.2864C147.483 43.6132 146.833 43.0786 146.015 43.0786C145.222 43.0588 144.548 43.6132 144.548 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M139.567 44.2864C139.567 44.9596 140.216 45.4942 141.034 45.4942C141.852 45.4942 142.502 44.9596 142.502 44.2864C142.502 43.6132 141.852 43.0786 141.034 43.0786C140.24 43.0588 139.567 43.6132 139.567 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 44.2864C134.586 44.9596 135.235 45.4942 136.053 45.4942C136.871 45.4942 137.52 44.9596 137.52 44.2864C137.52 43.6132 136.871 43.0786 136.053 43.0786C135.235 43.0588 134.586 43.6132 134.586 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M129.605 44.2864C129.605 44.9596 130.254 45.4942 131.072 45.4942C131.89 45.4942 132.539 44.9596 132.539 44.2864C132.539 43.6132 131.89 43.0786 131.072 43.0786C130.254 43.0588 129.605 43.6132 129.605 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 44.2864C124.624 44.9596 125.273 45.4942 126.091 45.4942C126.909 45.4942 127.558 44.9596 127.558 44.2864C127.558 43.6132 126.909 43.0786 126.091 43.0786C125.273 43.0588 124.624 43.6132 124.624 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 44.2864C119.642 44.9596 120.292 45.4942 121.11 45.4942C121.928 45.4942 122.577 44.9596 122.577 44.2864C122.577 43.6132 121.928 43.0786 121.11 43.0786C120.292 43.0588 119.642 43.6132 119.642 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 44.2864C114.637 44.9596 115.287 45.4942 116.105 45.4942C116.923 45.4942 117.572 44.9596 117.572 44.2864C117.572 43.6132 116.923 43.0786 116.105 43.0786C115.311 43.0588 114.637 43.6132 114.637 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 44.2864C109.656 44.9596 110.305 45.4942 111.123 45.4942C111.941 45.4942 112.591 44.9596 112.591 44.2864C112.591 43.6132 111.941 43.0786 111.123 43.0786C110.33 43.0588 109.656 43.6132 109.656 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 44.2864C104.675 44.9596 105.325 45.4942 106.142 45.4942C106.96 45.4942 107.61 44.9596 107.61 44.2864C107.61 43.6132 106.96 43.0786 106.142 43.0786C105.349 43.0588 104.675 43.6132 104.675 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 44.2864C99.694 44.9596 100.343 45.4942 101.161 45.4942C101.979 45.4942 102.629 44.9596 102.629 44.2864C102.629 43.6132 101.979 43.0786 101.161 43.0786C100.367 43.0588 99.694 43.6132 99.694 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 44.2864C94.7131 44.9596 95.3626 45.4942 96.1805 45.4942C96.9983 45.4942 97.6478 44.9596 97.6478 44.2864C97.6478 43.6132 96.9983 43.0786 96.1805 43.0786C95.3626 43.0588 94.7131 43.6132 94.7131 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 44.2864C89.7318 44.9596 90.3813 45.4942 91.1991 45.4942C92.017 45.4942 92.6665 44.9596 92.6665 44.2864C92.6665 43.6132 92.017 43.0786 91.1991 43.0786C90.3813 43.0588 89.7318 43.6132 89.7318 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 44.2864C84.7507 44.9596 85.4002 45.4942 86.2181 45.4942C87.0359 45.4942 87.6854 44.9596 87.6854 44.2864C87.6854 43.6132 87.0359 43.0786 86.2181 43.0786C85.4002 43.0588 84.7507 43.6132 84.7507 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M79.7697 44.2864C79.7697 44.9596 80.4191 45.4942 81.237 45.4942C82.0548 45.4942 82.7043 44.9596 82.7043 44.2864C82.7043 43.6132 82.0548 43.0786 81.237 43.0786C80.4191 43.0588 79.7697 43.6132 79.7697 44.2864Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 39.6777C553.263 40.3511 553.913 40.8858 554.73 40.8858C555.548 40.8858 556.198 40.3511 556.198 39.6777C556.198 39.0044 555.548 38.4697 554.73 38.4697C553.913 38.4697 553.263 39.0242 553.263 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M548.258 39.6777C548.258 40.3511 548.907 40.8858 549.725 40.8858C550.543 40.8858 551.193 40.3511 551.193 39.6777C551.193 39.0044 550.543 38.4697 549.725 38.4697C548.907 38.4697 548.258 39.0242 548.258 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M543.277 39.6777C543.277 40.3511 543.927 40.8858 544.745 40.8858C545.562 40.8858 546.212 40.3511 546.212 39.6777C546.212 39.0044 545.562 38.4697 544.745 38.4697C543.951 38.4697 543.277 39.0242 543.277 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 39.6777C538.296 40.3511 538.945 40.8858 539.763 40.8858C540.581 40.8858 541.23 40.3511 541.23 39.6777C541.23 39.0044 540.581 38.4697 539.763 38.4697C538.945 38.4697 538.296 39.0242 538.296 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 39.6777C533.314 40.3511 533.964 40.8858 534.782 40.8858C535.6 40.8858 536.249 40.3511 536.249 39.6777C536.249 39.0044 535.6 38.4697 534.782 38.4697C533.964 38.4697 533.314 39.0242 533.314 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M528.333 39.6777C528.333 40.3511 528.983 40.8858 529.801 40.8858C530.619 40.8858 531.268 40.3511 531.268 39.6777C531.268 39.0044 530.619 38.4697 529.801 38.4697C528.983 38.4697 528.333 39.0242 528.333 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M523.352 39.6777C523.352 40.3511 524.002 40.8858 524.82 40.8858C525.637 40.8858 526.287 40.3511 526.287 39.6777C526.287 39.0044 525.637 38.4697 524.82 38.4697C524.002 38.4697 523.352 39.0242 523.352 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 39.6777C518.371 40.3511 519.021 40.8858 519.839 40.8858C520.657 40.8858 521.306 40.3511 521.306 39.6777C521.306 39.0044 520.657 38.4697 519.839 38.4697C519.021 38.4697 518.371 39.0242 518.371 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 39.6777C513.39 40.3511 514.039 40.8858 514.857 40.8858C515.675 40.8858 516.325 40.3511 516.325 39.6777C516.325 39.0044 515.675 38.4697 514.857 38.4697C514.039 38.4697 513.39 39.0242 513.39 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 39.6777C508.385 40.3511 509.035 40.8858 509.853 40.8858C510.67 40.8858 511.32 40.3511 511.32 39.6777C511.32 39.0044 510.67 38.4697 509.853 38.4697C509.035 38.4697 508.385 39.0242 508.385 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 39.6777C503.404 40.3511 504.053 40.8858 504.871 40.8858C505.689 40.8858 506.338 40.3511 506.338 39.6777C506.338 39.0044 505.689 38.4697 504.871 38.4697C504.053 38.4697 503.404 39.0242 503.404 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 39.6777C498.423 40.3511 499.072 40.8858 499.89 40.8858C500.708 40.8858 501.358 40.3511 501.358 39.6777C501.358 39.0044 500.708 38.4697 499.89 38.4697C499.072 38.4697 498.423 39.0242 498.423 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 39.6777C493.442 40.3511 494.091 40.8858 494.909 40.8858C495.727 40.8858 496.376 40.3511 496.376 39.6777C496.376 39.0044 495.727 38.4697 494.909 38.4697C494.115 38.4697 493.442 39.0242 493.442 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 39.6777C488.46 40.3511 489.11 40.8858 489.928 40.8858C490.746 40.8858 491.395 40.3511 491.395 39.6777C491.395 39.0044 490.746 38.4697 489.928 38.4697C489.11 38.4697 488.46 39.0242 488.46 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 39.6777C483.479 40.3511 484.129 40.8858 484.947 40.8858C485.764 40.8858 486.414 40.3511 486.414 39.6777C486.414 39.0044 485.764 38.4697 484.947 38.4697C484.129 38.4697 483.479 39.0242 483.479 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 39.6777C478.498 40.3511 479.148 40.8858 479.965 40.8858C480.783 40.8858 481.433 40.3511 481.433 39.6777C481.433 39.0044 480.783 38.4697 479.965 38.4697C479.148 38.4697 478.498 39.0242 478.498 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 39.6777C473.517 40.3511 474.167 40.8858 474.984 40.8858C475.802 40.8858 476.452 40.3511 476.452 39.6777C476.452 39.0044 475.802 38.4697 474.984 38.4697C474.167 38.4697 473.517 39.0242 473.517 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 39.6777C468.512 40.3511 469.162 40.8858 469.98 40.8858C470.797 40.8858 471.447 40.3511 471.447 39.6777C471.447 39.0044 470.797 38.4697 469.98 38.4697C469.162 38.4697 468.512 39.0242 468.512 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 39.6777C463.531 40.3511 464.181 40.8858 464.998 40.8858C465.816 40.8858 466.466 40.3511 466.466 39.6777C466.466 39.0044 465.816 38.4697 464.998 38.4697C464.205 38.4697 463.531 39.0242 463.531 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 39.6777C458.55 40.3511 459.199 40.8858 460.017 40.8858C460.835 40.8858 461.484 40.3511 461.484 39.6777C461.484 39.0044 460.835 38.4697 460.017 38.4697C459.199 38.4697 458.55 39.0242 458.55 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 39.6777C453.569 40.3511 454.218 40.8858 455.036 40.8858C455.854 40.8858 456.504 40.3511 456.504 39.6777C456.504 39.0044 455.854 38.4697 455.036 38.4697C454.218 38.4697 453.569 39.0242 453.569 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 39.6777C448.587 40.3511 449.237 40.8858 450.055 40.8858C450.873 40.8858 451.522 40.3511 451.522 39.6777C451.522 39.0044 450.873 38.4697 450.055 38.4697C449.237 38.4697 448.587 39.0242 448.587 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 39.6777C443.606 40.3511 444.256 40.8858 445.074 40.8858C445.892 40.8858 446.541 40.3511 446.541 39.6777C446.541 39.0044 445.892 38.4697 445.074 38.4697C444.256 38.4697 443.606 39.0242 443.606 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 39.6777C438.625 40.3511 439.275 40.8858 440.093 40.8858C440.911 40.8858 441.56 40.3511 441.56 39.6777C441.56 39.0044 440.911 38.4697 440.093 38.4697C439.275 38.4697 438.625 39.0242 438.625 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 39.6777C433.644 40.3511 434.294 40.8858 435.111 40.8858C435.929 40.8858 436.579 40.3511 436.579 39.6777C436.579 39.0044 435.929 38.4697 435.111 38.4697C434.294 38.4697 433.644 39.0242 433.644 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 39.6777C428.639 40.3511 429.289 40.8858 430.107 40.8858C430.924 40.8858 431.574 40.3511 431.574 39.6777C431.574 39.0044 430.924 38.4697 430.107 38.4697C429.289 38.4697 428.639 39.0242 428.639 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 39.6777C423.658 40.3511 424.308 40.8858 425.126 40.8858C425.943 40.8858 426.593 40.3511 426.593 39.6777C426.593 39.0044 425.943 38.4697 425.126 38.4697C424.308 38.4697 423.658 39.0242 423.658 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 39.6777C418.677 40.3511 419.327 40.8858 420.145 40.8858C420.962 40.8858 421.612 40.3511 421.612 39.6777C421.612 39.0044 420.962 38.4697 420.145 38.4697C419.351 38.4697 418.677 39.0242 418.677 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 39.6777C413.696 40.3511 414.345 40.8858 415.163 40.8858C415.981 40.8858 416.63 40.3511 416.63 39.6777C416.63 39.0044 415.981 38.4697 415.163 38.4697C414.345 38.4697 413.696 39.0242 413.696 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 39.6777C408.715 40.3511 409.364 40.8858 410.182 40.8858C411 40.8858 411.65 40.3511 411.65 39.6777C411.65 39.0044 411 38.4697 410.182 38.4697C409.364 38.4697 408.715 39.0242 408.715 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 39.6777C403.734 40.3511 404.383 40.8858 405.201 40.8858C406.019 40.8858 406.668 40.3511 406.668 39.6777C406.668 39.0044 406.019 38.4697 405.201 38.4697C404.383 38.4697 403.734 39.0242 403.734 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 39.6777C398.752 40.3511 399.402 40.8858 400.22 40.8858C401.038 40.8858 401.687 40.3511 401.687 39.6777C401.687 39.0044 401.038 38.4697 400.22 38.4697C399.402 38.4697 398.752 39.0242 398.752 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 39.6777C393.747 40.3511 394.397 40.8858 395.215 40.8858C396.033 40.8858 396.682 40.3511 396.682 39.6777C396.682 39.0044 396.033 38.4697 395.215 38.4697C394.421 38.4697 393.747 39.0242 393.747 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 39.6777C388.767 40.3511 389.416 40.8858 390.234 40.8858C391.052 40.8858 391.701 40.3511 391.701 39.6777C391.701 39.0044 391.052 38.4697 390.234 38.4697C389.416 38.4697 388.767 39.0242 388.767 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 39.6777C383.785 40.3511 384.435 40.8858 385.253 40.8858C386.071 40.8858 386.72 40.3511 386.72 39.6777C386.72 39.0044 386.071 38.4697 385.253 38.4697C384.435 38.4697 383.785 39.0242 383.785 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 39.6777C378.804 40.3511 379.454 40.8858 380.271 40.8858C381.089 40.8858 381.739 40.3511 381.739 39.6777C381.739 39.0044 381.089 38.4697 380.271 38.4697C379.478 38.4697 378.804 39.0242 378.804 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 39.6777C373.823 40.3511 374.472 40.8858 375.29 40.8858C376.108 40.8858 376.757 40.3511 376.757 39.6777C376.757 39.0044 376.108 38.4697 375.29 38.4697C374.472 38.4697 373.823 39.0242 373.823 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 39.6777C368.842 40.3511 369.491 40.8858 370.309 40.8858C371.127 40.8858 371.777 40.3511 371.777 39.6777C371.777 39.0044 371.127 38.4697 370.309 38.4697C369.491 38.4697 368.842 39.0242 368.842 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 39.6777C363.861 40.3511 364.51 40.8858 365.328 40.8858C366.146 40.8858 366.795 40.3511 366.795 39.6777C366.795 39.0044 366.146 38.4697 365.328 38.4697C364.51 38.4697 363.861 39.0242 363.861 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 39.6777C358.88 40.3511 359.529 40.8858 360.347 40.8858C361.165 40.8858 361.814 40.3511 361.814 39.6777C361.814 39.0044 361.165 38.4697 360.347 38.4697C359.529 38.4697 358.88 39.0242 358.88 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 39.6777C353.875 40.3511 354.524 40.8858 355.342 40.8858C356.16 40.8858 356.809 40.3511 356.809 39.6777C356.809 39.0044 356.16 38.4697 355.342 38.4697C354.548 38.4697 353.875 39.0242 353.875 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 39.6777C348.894 40.3511 349.543 40.8858 350.361 40.8858C351.179 40.8858 351.828 40.3511 351.828 39.6777C351.828 39.0044 351.179 38.4697 350.361 38.4697C349.543 38.4697 348.894 39.0242 348.894 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 39.6777C343.912 40.3511 344.562 40.8858 345.38 40.8858C346.198 40.8858 346.847 40.3511 346.847 39.6777C346.847 39.0044 346.198 38.4697 345.38 38.4697C344.562 38.4697 343.912 39.0242 343.912 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 39.6777C338.931 40.3511 339.581 40.8858 340.399 40.8858C341.217 40.8858 341.866 40.3511 341.866 39.6777C341.866 39.0044 341.217 38.4697 340.399 38.4697C339.581 38.4697 338.931 39.0242 338.931 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 39.6777C333.95 40.3511 334.6 40.8858 335.418 40.8858C336.235 40.8858 336.885 40.3511 336.885 39.6777C336.885 39.0044 336.235 38.4697 335.418 38.4697C334.6 38.4697 333.95 39.0242 333.95 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 39.6777C328.969 40.3511 329.618 40.8858 330.436 40.8858C331.254 40.8858 331.904 40.3511 331.904 39.6777C331.904 39.0044 331.254 38.4697 330.436 38.4697C329.618 38.4697 328.969 39.0242 328.969 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 39.6777C323.988 40.3511 324.638 40.8858 325.455 40.8858C326.273 40.8858 326.923 40.3511 326.923 39.6777C326.923 39.0044 326.273 38.4697 325.455 38.4697C324.638 38.4697 323.988 39.0242 323.988 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 39.6777C319.007 40.3511 319.656 40.8858 320.474 40.8858C321.292 40.8858 321.941 40.3511 321.941 39.6777C321.941 39.0044 321.292 38.4697 320.474 38.4697C319.656 38.4697 319.007 39.0242 319.007 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 39.6777C314.002 40.3511 314.651 40.8858 315.469 40.8858C316.287 40.8858 316.936 40.3511 316.936 39.6777C316.936 39.0044 316.287 38.4697 315.469 38.4697C314.675 38.4697 314.002 39.0242 314.002 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 39.6777C309.021 40.3511 309.67 40.8858 310.488 40.8858C311.306 40.8858 311.956 40.3511 311.956 39.6777C311.956 39.0044 311.306 38.4697 310.488 38.4697C309.67 38.4697 309.021 39.0242 309.021
339.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M304.04 39.6777C304.04 40.3511 304.689 40.8858 305.507 40.8858C306.325 40.8858 306.974 40.3511 306.974 39.6777C306.974 39.0044 306.325 38.4697 305.507 38.4697C304.689 38.4697 304.04 39.0242 304.04 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M299.059 39.6777C299.059 40.3511 299.708 40.8858 300.526 40.8858C301.344 40.8858 301.993 40.3511 301.993 39.6777C301.993 39.0044 301.344 38.4697 300.526 38.4697C299.708 38.4697 299.059 39.0242 299.059 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 39.6777C294.077 40.3511 294.727 40.8858 295.545 40.8858C296.362 40.8858 297.012 40.3511 297.012 39.6777C297.012 39.0044 296.362 38.4697 295.545 38.4697C294.727 38.4697 294.077 39.0242 294.077 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 39.6777C289.096 40.3511 289.745 40.8858 290.563 40.8858C291.381 40.8858 292.031 40.3511 292.031 39.6777C292.031 39.0044 291.381 38.4697 290.563 38.4697C289.745 38.4697 289.096 39.0242 289.096 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M189.402 39.6777C189.402 40.3511 190.051 40.8858 190.869 40.8858C191.687 40.8858 192.337 40.3511 192.337 39.6777C192.337 39.0044 191.687 38.4697 190.869 38.4697C190.075 38.4697 189.402 39.0242 189.402 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 39.6777C184.421 40.3511 185.07 40.8858 185.888 40.8858C186.706 40.8858 187.356 40.3511 187.356 39.6777C187.356 39.0044 186.706 38.4697 185.888 38.4697C185.094 38.4697 184.421 39.0242 184.421 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 39.6777C179.44 40.3511 180.089 40.8858 180.907 40.8858C181.725 40.8858 182.375 40.3511 182.375 39.6777C182.375 39.0044 181.725 38.4697 180.907 38.4697C180.113 38.4697 179.44 39.0242 179.44 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M174.459 39.6777C174.459 40.3511 175.108 40.8858 175.926 40.8858C176.744 40.8858 177.393 40.3511 177.393 39.6777C177.393 39.0044 176.744 38.4697 175.926 38.4697C175.108 38.4697 174.459 39.0242 174.459 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 39.6777C169.478 40.3511 170.127 40.8858 170.945 40.8858C171.763 40.8858 172.412 40.3511 172.412 39.6777C172.412 39.0044 171.763 38.4697 170.945 38.4697C170.127 38.4697 169.478 39.0242 169.478 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 39.6777C164.496 40.3511 165.146 40.8858 165.964 40.8858C166.781 40.8858 167.431 40.3511 167.431 39.6777C167.431 39.0044 166.781 38.4697 165.964 38.4697C165.146 38.4697 164.496 39.0242 164.496 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 39.6777C159.515 40.3511 160.165 40.8858 160.982 40.8858C161.8 40.8858 162.45 40.3511 162.45 39.6777C162.45 39.0044 161.8 38.4697 160.982 38.4697C160.165 38.4697 159.515 39.0242 159.515 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 39.6777C154.51 40.3511 155.16 40.8858 155.978 40.8858C156.796 40.8858 157.445 40.3511 157.445 39.6777C157.445 39.0044 156.796 38.4697 155.978 38.4697C155.184 38.4697 154.51 39.0242 154.51 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 39.6777C149.529 40.3511 150.179 40.8858 150.997 40.8858C151.814 40.8858 152.464 40.3511 152.464 39.6777C152.464 39.0044 151.814 38.4697 150.997 38.4697C150.203 38.4697 149.529 39.0242 149.529 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M144.548 39.6777C144.548 40.3511 145.198 40.8858 146.015 40.8858C146.833 40.8858 147.483 40.3511 147.483 39.6777C147.483 39.0044 146.833 38.4697 146.015 38.4697C145.222 38.4697 144.548 39.0242 144.548 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M139.567 39.6777C139.567 40.3511 140.216 40.8858 141.034 40.8858C141.852 40.8858 142.502 40.3511 142.502 39.6777C142.502 39.0044 141.852 38.4697 141.034 38.4697C140.24 38.4697 139.567 39.0242 139.567 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 39.6777C134.586 40.3511 135.235 40.8858 136.053 40.8858C136.871 40.8858 137.52 40.3511 137.52 39.6777C137.52 39.0044 136.871 38.4697 136.053 38.4697C135.235 38.4697 134.586 39.0242 134.586 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M129.605 39.6777C129.605 40.3511 130.254 40.8858 131.072 40.8858C131.89 40.8858 132.539 40.3511 132.539 39.6777C132.539 39.0044 131.89 38.4697 131.072 38.4697C130.254 38.4697 129.605 39.0242 129.605 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 39.6777C124.624 40.3511 125.273 40.8858 126.091 40.8858C126.909 40.8858 127.558 40.3511 127.558 39.6777C127.558 39.0044 126.909 38.4697 126.091 38.4697C125.273 38.4697 124.624 39.0242 124.624 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 39.6777C119.642 40.3511 120.292 40.8858 121.11 40.8858C121.928 40.8858 122.577 40.3511 122.577 39.6777C122.577 39.0044 121.928 38.4697 121.11 38.4697C120.292 38.4697 119.642 39.0242 119.642 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 39.6777C114.637 40.3511 115.287 40.8858 116.105 40.8858C116.923 40.8858 117.572 40.3511 117.572 39.6777C117.572 39.0044 116.923 38.4697 116.105 38.4697C115.311 38.4697 114.637 39.0242 114.637 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 39.6777C109.656 40.3511 110.305 40.8858 111.123 40.8858C111.941 40.8858 112.591 40.3511 112.591 39.6777C112.591 39.0044 111.941 38.4697 111.123 38.4697C110.33 38.4697 109.656 39.0242 109.656 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 39.6777C104.675 40.3511 105.325 40.8858 106.142 40.8858C106.96 40.8858 107.61 40.3511 107.61 39.6777C107.61 39.0044 106.96 38.4697 106.142 38.4697C105.349 38.4697 104.675 39.0242 104.675 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 39.6777C99.694 40.3511 100.343 40.8858 101.161 40.8858C101.979 40.8858 102.629 40.3511 102.629 39.6777C102.629 39.0044 101.979 38.4697 101.161 38.4697C100.367 38.4697 99.694 39.0242 99.694 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 39.6777C94.7131 40.3511 95.3626 40.8858 96.1805 40.8858C96.9983 40.8858 97.6478 40.3511 97.6478 39.6777C97.6478 39.0044 96.9983 38.4697 96.1805 38.4697C95.3626 38.4697 94.7131 39.0242 94.7131 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 39.6777C89.7318 40.3511 90.3813 40.8858 91.1991 40.8858C92.017 40.8858 92.6665 40.3511 92.6665 39.6777C92.6665 39.0044 92.017 38.4697 91.1991 38.4697C90.3813 38.4697 89.7318 39.0242 89.7318 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 39.6777C84.7507 40.3511 85.4002 40.8858 86.2181 40.8858C87.0359 40.8858 87.6854 40.3511 87.6854 39.6777C87.6854 39.0044 87.0359 38.4697 86.2181 38.4697C85.4002 38.4697 84.7507 39.0242 84.7507 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M79.7697 39.6777C79.7697 40.3511 80.4191 40.8858 81.237 40.8858C82.0548 40.8858 82.7043 40.3511 82.7043 39.6777C82.7043 39.0044 82.0548 38.4697 81.237 38.4697C80.4191 38.4697 79.7697 39.0242 79.7697 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 39.6777C74.7645 40.3511 75.414 40.8858 76.2319 40.8858C77.0497 40.8858 77.6992 40.3511 77.6992 39.6777C77.6992 39.0044 77.0497 38.4697 76.2319 38.4697C75.4381 38.4697 74.7645 39.0242 74.7645 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 39.6777C69.7836 40.3511 70.433 40.8858 71.2509 40.8858C72.0688 40.8858 72.7182 40.3511 72.7182 39.6777C72.7182 39.0044 72.0688 38.4697 71.2509 38.4697C70.4571 38.4697 69.7836 39.0242 69.7836 39.6777Z",fill:"#5840D2"}),a.createElement("path",{d:"M584.641 36.2984C585.451 36.2984 586.108 35.7576 586.108 35.0904C586.108 34.4232 585.451 33.8823 584.641 33.8823C583.83 33.8823 583.173 34.4232 583.173 35.0904C583.173 35.7576 583.83 36.2984 584.641 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M579.66 36.2984C580.47 36.2984 581.127 35.7576 581.127 35.0904C581.127 34.4232 580.47 33.8823 579.66 33.8823C578.849 33.8823 578.192 34.4232 578.192 35.0904C578.192 35.7576 578.849 36.2984 579.66 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 35.0904C553.263 35.7637 553.913 36.2984 554.73 36.2984C555.548 36.2984 556.198 35.7637 556.198 35.0904C556.198 34.417 555.548 33.8823 554.73 33.8823C553.913 33.8823 553.263 34.417 553.263 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M549.749 36.2984C550.56 36.2984 551.217 35.7576 551.217 35.0904C551.217 34.4232 550.56 33.8823 549.749 33.8823C548.939 33.8823 548.282 34.4232 548.282 35.0904C548.282 35.7576 548.939 36.2984 549.749 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 36.2984C545.578 36.2984 546.235 35.7576 546.235 35.0904C546.235 34.4232 545.578 33.8823 544.768 33.8823C543.958 33.8823 543.301 34.4232 543.301 35.0904C543.301 35.7576 543.958 36.2984 544.768 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 35.0904C538.296 35.7637 538.945 36.2984 539.763 36.2984C540.581 36.2984 541.23 35.7637 541.23 35.0904C541.23 34.417 540.581 33.8823 539.763 33.8823C538.945 33.8823 538.296 34.417 538.296 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 35.0904C533.314 35.7637 533.964 36.2984 534.782 36.2984C535.6 36.2984 536.249 35.7637 536.249 35.0904C536.249 34.417 535.
36 33.8823 534.782 33.8823C533.964 33.8823 533.314 34.417 533.314 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 36.2984C530.611 36.2984 531.268 35.7576 531.268 35.0904C531.268 34.4232 530.611 33.8823 529.801 33.8823C528.99 33.8823 528.333 34.4232 528.333 35.0904C528.333 35.7576 528.99 36.2984 529.801 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 36.2984C525.63 36.2984 526.287 35.7576 526.287 35.0904C526.287 34.4232 525.63 33.8823 524.82 33.8823C524.009 33.8823 523.352 34.4232 523.352 35.0904C523.352 35.7576 524.009 36.2984 524.82 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 35.0904C518.371 35.7637 519.021 36.2984 519.839 36.2984C520.657 36.2984 521.306 35.7637 521.306 35.0904C521.306 34.417 520.657 33.8823 519.839 33.8823C519.021 33.8823 518.371 34.417 518.371 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 35.0904C513.39 35.7637 514.039 36.2984 514.857 36.2984C515.675 36.2984 516.325 35.7637 516.325 35.0904C516.325 34.417 515.675 33.8823 514.857 33.8823C514.039 33.8823 513.39 34.417 513.39 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 36.2984C510.687 36.2984 511.344 35.7576 511.344 35.0904C511.344 34.4232 510.687 33.8823 509.876 33.8823C509.066 33.8823 508.409 34.4232 508.409 35.0904C508.409 35.7576 509.066 36.2984 509.876 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 36.2984C505.705 36.2984 506.362 35.7576 506.362 35.0904C506.362 34.4232 505.705 33.8823 504.895 33.8823C504.085 33.8823 503.428 34.4232 503.428 35.0904C503.428 35.7576 504.085 36.2984 504.895 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 35.0904C498.423 35.7637 499.072 36.2984 499.89 36.2984C500.708 36.2984 501.358 35.7637 501.358 35.0904C501.358 34.417 500.708 33.8823 499.89 33.8823C499.072 33.8823 498.423 34.417 498.423 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 35.0904C493.442 35.7637 494.091 36.2984 494.909 36.2984C495.727 36.2984 496.376 35.7637 496.376 35.0904C496.376 34.417 495.727 33.8823 494.909 33.8823C494.115 33.8823 493.442 34.417 493.442 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 36.2984C490.738 36.2984 491.395 35.7576 491.395 35.0904C491.395 34.4232 490.738 33.8823 489.928 33.8823C489.117 33.8823 488.46 34.4232 488.46 35.0904C488.46 35.7576 489.117 36.2984 489.928 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 35.0904C483.479 35.7637 484.129 36.2984 484.947 36.2984C485.764 36.2984 486.414 35.7637 486.414 35.0904C486.414 34.417 485.764 33.8823 484.947 33.8823C484.129 33.8823 483.479 34.417 483.479 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 35.0904C478.498 35.7637 479.148 36.2984 479.965 36.2984C480.783 36.2984 481.433 35.7637 481.433 35.0904C481.433 34.417 480.783 33.8823 479.965 33.8823C479.148 33.8823 478.498 34.417 478.498 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 36.2984C475.795 36.2984 476.452 35.7576 476.452 35.0904C476.452 34.4232 475.795 33.8823 474.984 33.8823C474.174 33.8823 473.517 34.4232 473.517 35.0904C473.517 35.7576 474.174 36.2984 474.984 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 36.2984C470.814 36.2984 471.471 35.7576 471.471 35.0904C471.471 34.4232 470.814 33.8823 470.003 33.8823C469.193 33.8823 468.536 34.4232 468.536 35.0904C468.536 35.7576 469.193 36.2984 470.003 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 35.0904C463.531 35.7637 464.181 36.2984 464.998 36.2984C465.816 36.2984 466.466 35.7637 466.466 35.0904C466.466 34.417 465.816 33.8823 464.998 33.8823C464.205 33.8823 463.531 34.417 463.531 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 35.0904C458.55 35.7637 459.199 36.2984 460.017 36.2984C460.835 36.2984 461.484 35.7637 461.484 35.0904C461.484 34.417 460.835 33.8823 460.017 33.8823C459.199 33.8823 458.55 34.417 458.55 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 36.2984C455.847 36.2984 456.504 35.7576 456.504 35.0904C456.504 34.4232 455.847 33.8823 455.036 33.8823C454.226 33.8823 453.569 34.4232 453.569 35.0904C453.569 35.7576 454.226 36.2984 455.036 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 36.2984C450.865 36.2984 451.522 35.7576 451.522 35.0904C451.522 34.4232 450.865 33.8823 450.055 33.8823C449.244 33.8823 448.587 34.4232 448.587 35.0904C448.587 35.7576 449.244 36.2984 450.055 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 35.0904C443.606 35.7637 444.256 36.2984 445.074 36.2984C445.892 36.2984 446.541 35.7637 446.541 35.0904C446.541 34.417 445.892 33.8823 445.074 33.8823C444.256 33.8823 443.606 34.417 443.606 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 35.0904C438.625 35.7637 439.275 36.2984 440.093 36.2984C440.911 36.2984 441.56 35.7637 441.56 35.0904C441.56 34.417 440.911 33.8823 440.093 33.8823C439.275 33.8823 438.625 34.417 438.625 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 36.2984C435.922 36.2984 436.579 35.7576 436.579 35.0904C436.579 34.4232 435.922 33.8823 435.111 33.8823C434.301 33.8823 433.644 34.4232 433.644 35.0904C433.644 35.7576 434.301 36.2984 435.111 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 36.2984C430.941 36.2984 431.598 35.7576 431.598 35.0904C431.598 34.4232 430.941 33.8823 430.131 33.8823C429.32 33.8823 428.663 34.4232 428.663 35.0904C428.663 35.7576 429.32 36.2984 430.131 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 35.0904C423.658 35.7637 424.308 36.2984 425.126 36.2984C425.943 36.2984 426.593 35.7637 426.593 35.0904C426.593 34.417 425.943 33.8823 425.126 33.8823C424.308 33.8823 423.658 34.417 423.658 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 35.0904C418.677 35.7637 419.327 36.2984 420.145 36.2984C420.962 36.2984 421.612 35.7637 421.612 35.0904C421.612 34.417 420.962 33.8823 420.145 33.8823C419.351 33.8823 418.677 34.417 418.677 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 36.2984C415.974 36.2984 416.63 35.7576 416.63 35.0904C416.63 34.4232 415.974 33.8823 415.163 33.8823C414.353 33.8823 413.696 34.4232 413.696 35.0904C413.696 35.7576 414.353 36.2984 415.163 36.2984Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M408.715 35.0904C408.715 35.7637 409.364 36.2984 410.182 36.2984C411 36.2984 411.65 35.7637 411.65 35.0904C411.65 34.417 411 33.8823 410.182 33.8823C409.364 33.8823 408.715 34.417 408.715 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 35.0904C403.734 35.7637 404.383 36.2984 405.201 36.2984C406.019 36.2984 406.668 35.7637 406.668 35.0904C406.668 34.417 406.019 33.8823 405.201 33.8823C404.383 33.8823 403.734 34.417 403.734 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 36.2984C401.03 36.2984 401.687 35.7576 401.687 35.0904C401.687 34.4232 401.03 33.8823 400.22 33.8823C399.409 33.8823 398.752 34.4232 398.752 35.0904C398.752 35.7576 399.409 36.2984 400.22 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 36.2984C396.049 36.2984 396.706 35.7576 396.706 35.0904C396.706 34.4232 396.049 33.8823 395.239 33.8823C394.428 33.8823 393.771 34.4232 393.771 35.0904C393.771 35.7576 394.428 36.2984 395.239 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 35.0904C388.767 35.7637 389.416 36.2984 390.234 36.2984C391.052 36.2984 391.701 35.7637 391.701 35.0904C391.701 34.417 391.052 33.8823 390.234 33.8823C389.416 33.8823 388.767 34.417 388.767 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 35.0904C383.785 35.7637 384.435 36.2984 385.253 36.2984C386.071 36.2984 386.72 35.7637 386.72 35.0904C386.72 34.417 386.071 33.8823 385.253 33.8823C384.435 33.8823 383.785 34.417 383.785 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 36.2984C381.105 36.2984 381.762 35.7576 381.762 35.0904C381.762 34.4232 381.105 33.8823 380.295 33.8823C379.485 33.8823 378.828 34.4232 378.828 35.0904C378.828 35.7576 379.485 36.2984 380.295 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 36.2984C376.1 36.2984 376.757 35.7576 376.757 35.0904C376.757 34.4232 376.1 33.8823 375.29 33.8823C374.48 33.8823 373.823 34.4232 373.823 35.0904C373.823 35.7576 374.48 36.2984 375.29 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 35.0904C368.842 35.7637 369.491 36.2984 370.309 36.2984C371.127 36.2984 371.777 35.7637 371.777 35.0904C371.777 34.417 371.127 33.8823 370.309 33.8823C369.491 33.8823 368.842 34.417 368.842 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 35.0904C363.861 35.7637 364.51 36.2984 365.328 36.2984C366.146 36.2984 366.795 35.7637 366.795 35.0904C366.795 34.417 366.146 33.8823 365.328 33.8823C364.51 33.8823 363.861 34.417 363.861 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 36.2984C361.157 36.2984 361.814 35.7576 361.814 35.0904C361.814 34.4232 361.157 33.8823 360.347 33.8823C359.537 33.8823 358.88 34.4232 358.88 35.0904C358.88 35.7576 359.537 36.2984 360.347 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 36.2984C356.176 36.2984 356.833 35.7576 356.833 35.0904C356.833 34.4232 356.176 33.8823 355.366 33.8823C354.555 33.8823 353.899 34.4232 353.899 35.0904C353.899 35.7576 354.555 36.2984 355.366 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 35.0904C348.894 35.7637 349.543 36.2984 350.361 36.2984C351.179 36.2984 351.828 35.7637 351.828 35.0904C351.828 34.417 351.179 33.8823 350.361 33.8823C349.543 33.8823 348.894 34.417 348.894 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 36.2984C346.214 36.2984 346.871 35.7576 346.871 35.0904C346.871 34.4232 346.214 33.8823 345.404 33.8823C344.593 33.8823 343.937 34.4232 343.937 35.0904C343.937 35.7576 344.593 36.2984 345.404 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 36.2984C341.209 36.2984 341.866 35.7576 341.866 35.0904C341.866 34.4232 341.209 33.8823 340.399 33.8823C339.588 33.8823 338.931 34.4232 338.931 35.0904C338.931 35.7576 339.588 36.2984 340.399 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 35.0904C333.95 35.7637 334.6 36.2984 335.418 36.2984C336.235 36.2984 336.885 35.7637 336.885 35.0904C336.885 34.417 336.235 33.8823 335.418 33.8823C334.6 33.8823 333.95 34.417 333.95 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 35.0904C328.969 35.7637 329.618 36.2984 330.436 36.2984C331.254 36.2984 331.904 35.7637 331.904 35.0904C331.904 34.417 331.254 33.8823 330.436 33.8823C329.618 33.8823 328.969 34.417 328.969 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 36.2984C326.266 36.2984 326.923 35.7576 326.923 35.0904C326.923 34.4232 326.266 33.8823 325.455 33.8823C324.645 33.8823 323.988 34.4232 323.988 35.0904C323.988 35.7576 324.645 36.2984 325.455 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 36.2984C321.284 36.2984 321.941 35.7576 321.941 35.0904C321.941 34.4232 321.284 33.8823 320.474 33.8823C319.664 33.8823 319.007 34.4232 319.007 35.
30904C319.007 35.7576 319.664 36.2984 320.474 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 35.0904C314.002 35.7637 314.651 36.2984 315.469 36.2984C316.287 36.2984 316.936 35.7637 316.936 35.0904C316.936 34.417 316.287 33.8823 315.469 33.8823C314.675 33.8823 314.002 34.417 314.002 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M294.077 35.0904C294.077 35.7637 294.727 36.2984 295.545 36.2984C296.362 36.2984 297.012 35.7637 297.012 35.0904C297.012 34.417 296.362 33.8823 295.545 33.8823C294.727 33.8823 294.077 34.417 294.077 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M285.582 36.2984C286.392 36.2984 287.049 35.7576 287.049 35.0904C287.049 34.4232 286.392 33.8823 285.582 33.8823C284.772 33.8823 284.115 34.4232 284.115 35.0904C284.115 35.7576 284.772 36.2984 285.582 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M279.134 35.0904C279.134 35.7637 279.783 36.2984 280.601 36.2984C281.419 36.2984 282.069 35.7637 282.069 35.0904C282.069 34.417 281.419 33.8823 280.601 33.8823C279.783 33.8823 279.134 34.417 279.134 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M195.874 36.2984C196.685 36.2984 197.342 35.7576 197.342 35.0904C197.342 34.4232 196.685 33.8823 195.874 33.8823C195.064 33.8823 194.407 34.4232 194.407 35.0904C194.407 35.7576 195.064 36.2984 195.874 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M190.893 36.2984C191.703 36.2984 192.36 35.7576 192.36 35.0904C192.36 34.4232 191.703 33.8823 190.893 33.8823C190.083 33.8823 189.426 34.4232 189.426 35.0904C189.426 35.7576 190.083 36.2984 190.893 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 35.0904C184.421 35.7637 185.07 36.2984 185.888 36.2984C186.706 36.2984 187.356 35.7637 187.356 35.0904C187.356 34.417 186.706 33.8823 185.888 33.8823C185.094 33.8823 184.421 34.417 184.421 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 35.0904C179.44 35.7637 180.089 36.2984 180.907 36.2984C181.725 36.2984 182.375 35.7637 182.375 35.0904C182.375 34.417 181.725 33.8823 180.907 33.8823C180.113 33.8823 179.44 34.417 179.44 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 36.2984C176.736 36.2984 177.393 35.7576 177.393 35.0904C177.393 34.4232 176.736 33.8823 175.926 33.8823C175.116 33.8823 174.459 34.4232 174.459 35.0904C174.459 35.7576 175.116 36.2984 175.926 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 36.2984C171.755 36.2984 172.412 35.7576 172.412 35.0904C172.412 34.4232 171.755 33.8823 170.945 33.8823C170.134 33.8823 169.478 34.4232 169.478 35.0904C169.478 35.7576 170.134 36.2984 170.945 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 35.0904C164.496 35.7637 165.146 36.2984 165.964 36.2984C166.781 36.2984 167.431 35.7637 167.431 35.0904C167.431 34.417 166.781 33.8823 165.964 33.8823C165.146 33.8823 164.496 34.417 164.496 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 35.0904C159.515 35.7637 160.165 36.2984 160.982 36.2984C161.8 36.2984 162.45 35.7637 162.45 35.0904C162.45 34.417 161.8 33.8823 160.982 33.8823C160.165 33.8823 159.515 34.417 159.515 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M156.001 36.2984C156.812 36.2984 157.469 35.7576 157.469 35.0904C157.469 34.4232 156.812 33.8823 156.001 33.8823C155.191 33.8823 154.534 34.4232 154.534 35.0904C154.534 35.7576 155.191 36.2984 156.001 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 36.2984C146.85 36.2984 147.507 35.7576 147.507 35.0904C147.507 34.4232 146.85 33.8823 146.039 33.8823C145.229 33.8823 144.572 34.4232 144.572 35.0904C144.572 35.7576 145.229 36.2984 146.039 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 36.2984C141.845 36.2984 142.502 35.7576 142.502 35.0904C142.502 34.4232 141.845 33.8823 141.034 33.8823C140.224 33.8823 139.567 34.4232 139.567 35.0904C139.567 35.7576 140.224 36.2984 141.034 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 36.2984C136.863 36.2984 137.52 35.7576 137.52 35.0904C137.52 34.4232 136.863 33.8823 136.053 33.8823C135.243 33.8823 134.586 34.4232 134.586 35.0904C134.586 35.7576 135.243 36.2984 136.053 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 36.2984C131.882 36.2984 132.539 35.7576 132.539 35.0904C132.539 34.4232 131.882 33.8823 131.072 33.8823C130.262 33.8823 129.605 34.4232 129.605 35.0904C129.605 35.7576 130.262 36.2984 131.072 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 36.2984C126.901 36.2984 127.558 35.7576 127.558 35.0904C127.558 34.4232 126.901 33.8823 126.091 33.8823C125.281 33.8823 124.624 34.4232 124.624 35.0904C124.624 35.7576 125.281 36.2984 126.091 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 36.2984C121.92 36.2984 122.577 35.7576 122.577 35.0904C122.577 34.4232 121.92 33.8823 121.11 33.8823C120.299 33.8823 119.642 34.4232 119.642 35.0904C119.642 35.7576 120.299 36.2984 121.11 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 36.2984C116.939 36.2984 117.596 35.7576 117.596 35.0904C117.596 34.4232 116.939 33.8823 116.129 33.8823C115.318 33.8823 114.661 34.4232 114.661 35.0904C114.661 35.7576 115.318 36.2984 116.129 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 35.0904C109.656 35.7637 110.305 36.2984 111.123 36.2984C111.941 36.2984 112.591 35.7637 112.591 35.0904C112.591 34.417 111.941 33.8823 111.123 33.8823C110.33 33.8823 109.656 34.417 109.656 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 36.2984C106.977 36.2984 107.634 35.7576 107.634 35.0904C107.634 34.4232 106.977 33.8823 106.166 33.8823C105.356 33.8823 104.699 34.4232 104.699 35.0904C104.699 35.7576 105.356 36.2984 106.166 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 36.2984C101.972 36.2984 102.629 35.7576 102.629 35.0904C102.629 34.4232 101.972 33.8823 101.161 33.8823C100.351 33.8823 99.694 34.4232 99.694 35.0904C99.694 35.7576 100.351 36.2984 101.161 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 36.2984C96.9909 36.2984 97.6478 35.7576 97.6478 35.0904C97.6478 34.4232 96.9909 33.8823 96.1805 33.8823C95.3701 33.8823 94.7131 34.4232 94.7131 35.0904C94.7131 35.7576 95.3701 36.2984 96.1805 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 35.0904C89.7318 35.7637 90.3813 36.2984 91.1991 36.2984C92.017 36.2984 92.6665 35.7637 92.6665 35.0904C92.6665 34.417 92.017 33.8823 91.1991 33.8823C90.3813 33.8823 89.7318 34.417 89.7318 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 35.0904C84.7507 35.7637 85.4002 36.2984 86.2181 36.2984C87.0359 36.2984 87.6854 35.7637 87.6854 35.0904C87.6854 34.417 87.0359 33.8823 86.2181 33.8823C85.4002 33.8823 84.7507 34.417 84.7
3507 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 36.2984C82.0474 36.2984 82.7043 35.7576 82.7043 35.0904C82.7043 34.4232 82.0474 33.8823 81.237 33.8823C80.4266 33.8823 79.7697 34.4232 79.7697 35.0904C79.7697 35.7576 80.4266 36.2984 81.237 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 35.0904C74.7645 35.7637 75.414 36.2984 76.2319 36.2984C77.0497 36.2984 77.6992 35.7637 77.6992 35.0904C77.6992 34.417 77.0497 33.8823 76.2319 33.8823C75.4381 33.8823 74.7645 34.417 74.7645 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 35.0904C69.7836 35.7637 70.433 36.2984 71.2509 36.2984C72.0688 36.2984 72.7182 35.7637 72.7182 35.0904C72.7182 34.417 72.0688 33.8823 71.2509 33.8823C70.4571 33.8823 69.7836 34.417 69.7836 35.0904Z",fill:"#5840D2"}),a.createElement("path",{d:"M66.2934 36.2984C67.1038 36.2984 67.7607 35.7576 67.7607 35.0904C67.7607 34.4232 67.1038 33.8823 66.2934 33.8823C65.483 33.8823 64.826 34.4232 64.826 35.0904C64.826 35.7576 65.483 36.2984 66.2934 36.2984Z",fill:"#5840D2"}),a.createElement("path",{d:"M584.641 31.7108C585.451 31.7108 586.108 31.1699 586.108 30.5027C586.108 29.8355 585.451 29.2947 584.641 29.2947C583.83 29.2947 583.173 29.8355 583.173 30.5027C583.173 31.1699 583.83 31.7108 584.641 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M579.66 31.7108C580.47 31.7108 581.127 31.1699 581.127 30.5027C581.127 29.8355 580.47 29.2947 579.66 29.2947C578.849 29.2947 578.192 29.8355 578.192 30.5027C578.192 31.1699 578.849 31.7108 579.66 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 30.5027C538.296 31.1761 538.945 31.7108 539.763 31.7108C540.581 31.7108 541.23 31.1761 541.23 30.5027C541.23 29.8294 540.581 29.2947 539.763 29.2947C538.945 29.2947 538.296 29.8294 538.296 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 30.5027C533.314 31.1761 533.964 31.7108 534.782 31.7108C535.6 31.7108 536.249 31.1761 536.249 30.5027C536.249 29.8294 535.6 29.2947 534.782 29.2947C533.964 29.2947 533.314 29.8294 533.314 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 31.7108C530.611 31.7108 531.268 31.1699 531.268 30.5027C531.268 29.8355 530.611 29.2947 529.801 29.2947C528.99 29.2947 528.333 29.8355 528.333 30.5027C528.333 31.1699 528.99 31.7108 529.801 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 31.7108C525.63 31.7108 526.287 31.1699 526.287 30.5027C526.287 29.8355 525.63 29.2947 524.82 29.2947C524.009 29.2947 523.352 29.8355 523.352 30.5027C523.352 31.1699 524.009 31.7108 524.82 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 30.5027C518.371 31.1761 519.021 31.7108 519.839 31.7108C520.657 31.7108 521.306 31.1761 521.306 30.5027C521.306 29.8294 520.657 29.2947 519.839 29.2947C519.021 29.2947 518.371 29.8294 518.371 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 30.5027C513.39 31.1761 514.039 31.7108 514.857 31.7108C515.675 31.7108 516.325 31.1761 516.325 30.5027C516.325 29.8294 515.675 29.2947 514.857 29.2947C514.039 29.2947 513.39 29.8294 513.39 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 31.7108C510.687 31.7108 511.344 31.1699 511.344 30.5027C511.344 29.8355 510.687 29.2947 509.876 29.2947C509.066 29.2947 508.409 29.8355 508.409 30.5027C508.409 31.1699 509.066 31.7108 509.876 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 31.7108C505.705 31.7108 506.362 31.1699 506.362 30.5027C506.362 29.8355 505.705 29.2947 504.895 29.2947C504.085 29.2947 503.428 29.8355 503.428 30.5027C503.428 31.1699 504.085 31.7108 504.895 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 30.5027C498.423 31.1761 499.072 31.7108 499.89 31.7108C500.708 31.7108 501.358 31.1761 501.358 30.5027C501.358 29.8294 500.708 29.2947 499.89 29.2947C499.072 29.2947 498.423 29.8294 498.423 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 30.5027C493.442 31.1761 494.091 31.7108 494.909 31.7108C495.727 31.7108 496.376 31.1761 496.376 30.5027C496.376 29.8294 495.727 29.2947 494.909 29.2947C494.115 29.2947 493.442 29.8294 493.442 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 31.7108C490.738 31.7108 491.395 31.1699 491.395 30.5027C491.395 29.8355 490.738 29.2947 489.928 29.2947C489.117 29.2947 488.46 29.8355 488.46 30.5027C488.46 31.1699 489.117 31.7108 489.928 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 30.5027C483.479 31.1761 484.129 31.7108 484.947 31.7108C485.764 31.7108 486.414 31.1761 486.414 30.5027C486.414 29.8294 485.764 29.2947 484.947 29.2947C484.129 29.2947 483.479 29.8294 483.479 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 30.5027C478.498 31.1761 479.148 31.7108 479.965 31.7108C480.783 31.7108 481.433 31.1761 481.433 30.5027C481.433 29.8294 480.783 29.2947 479.965 29.2947C479.148 29.2947 478.498 29.8294 478.498 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 31.7108C475.795 31.7108 476.452 31.1699 476.452 30.5027C476.452 29.8355 475.795 29.2947 474.984 29.2947C474.174 29.2947 473.517 29.8355 473.517 30.5027C473.517 31.1699 474.174 31.7108 474.984 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 31.7108C470.814 31.7108 471.471 31.1699 471.471 30.5027C471.471 29.8355 470.814 29.2947 470.003 29.2947C469.193 29.2947 468.536 29.8355 468.536 30.5027C4
368.536 31.1699 469.193 31.7108 470.003 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 30.5027C463.531 31.1761 464.181 31.7108 464.998 31.7108C465.816 31.7108 466.466 31.1761 466.466 30.5027C466.466 29.8294 465.816 29.2947 464.998 29.2947C464.205 29.2947 463.531 29.8294 463.531 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 30.5027C458.55 31.1761 459.199 31.7108 460.017 31.7108C460.835 31.7108 461.484 31.1761 461.484 30.5027C461.484 29.8294 460.835 29.2947 460.017 29.2947C459.199 29.2947 458.55 29.8294 458.55 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 31.7108C455.847 31.7108 456.504 31.1699 456.504 30.5027C456.504 29.8355 455.847 29.2947 455.036 29.2947C454.226 29.2947 453.569 29.8355 453.569 30.5027C453.569 31.1699 454.226 31.7108 455.036 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 31.7108C450.865 31.7108 451.522 31.1699 451.522 30.5027C451.522 29.8355 450.865 29.2947 450.055 29.2947C449.244 29.2947 448.587 29.8355 448.587 30.5027C448.587 31.1699 449.244 31.7108 450.055 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 30.5027C443.606 31.1761 444.256 31.7108 445.074 31.7108C445.892 31.7108 446.541 31.1761 446.541 30.5027C446.541 29.8294 445.892 29.2947 445.074 29.2947C444.256 29.2947 443.606 29.8294 443.606 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 30.5027C438.625 31.1761 439.275 31.7108 440.093 31.7108C440.911 31.7108 441.56 31.1761 441.56 30.5027C441.56 29.8294 440.911 29.2947 440.093 29.2947C439.275 29.2947 438.625 29.8294 438.625 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 31.7108C435.922 31.7108 436.579 31.1699 436.579 30.5027C436.579 29.8355 435.922 29.2947 435.111 29.2947C434.301 29.2947 433.644 29.8355 433.644 30.5027C433.644 31.1699 434.301 31.7108 435.111 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 31.7108C430.941 31.7108 431.598 31.1699 431.598 30.5027C431.598 29.8355 430.941 29.2947 430.131 29.2947C429.32 29.2947 428.663 29.8355 428.663 30.5027C428.663 31.1699 429.32 31.7108 430.131 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 30.5027C423.658 31.1761 424.308 31.7108 425.126 31.7108C425.943 31.7108 426.593 31.1761 426.593 30.5027C426.593 29.8294 425.943 29.2947 425.126 29.2947C424.308 29.2947 423.658 29.8294 423.658 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 30.5027C418.677 31.1761 419.327 31.7108 420.145 31.7108C420.962 31.7108 421.612 31.1761 421.612 30.5027C421.612 29.8294 420.962 29.2947 420.145 29.2947C419.351 29.2947 418.677 29.8294 418.677 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 31.7108C415.974 31.7108 416.63 31.1699 416.63 30.5027C416.63 29.8355 415.974 29.2947 415.163 29.2947C414.353 29.2947 413.696 29.8355 413.696 30.5027C413.696 31.1699 414.353 31.7108 415.163 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 30.5027C408.715 31.1761 409.364 31.7108 410.182 31.7108C411 31.7108 411.65 31.1761 411.65 30.5027C411.65 29.8294 411 29.2947 410.182 29.2947C409.364 29.2947 408.715 29.8294 408.715 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 30.5027C403.734 31.1761 404.383 31.7108 405.201 31.7108C406.019 31.7108 406.668 31.1761 406.668 30.5027C406.668 29.8294 406.019 29.2947 405.201 29.2947C404.383 29.2947 403.734 29.8294 403.734 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 31.7108C401.03 31.7108 401.687 31.1699 401.687 30.5027C401.687 29.8355 401.03 29.2947 400.22 29.2947C399.409 29.2947 398.752 29.8355 398.752 30.5027C398.752 31.1699 399.409 31.7108 400.22 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 31.7108C396.049 31.7108 396.706 31.1699 396.706 30.5027C396.706 29.8355 396.049 29.2947 395.239 29.2947C394.428 29.2947 393.771 29.8355 393.771 30.5027C393.771 31.1699 394.428 31.7108 395.239 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 30.5027C388.767 31.1761 389.416 31.7108 390.234 31.7108C391.052 31.7108 391.701 31.1761 391.701 30.5027C391.701 29.8294 391.052 29.2947 390.234 29.2947C389.416 29.2947 388.767 29.8294 388.767 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 30.5027C383.785 31.1761 384.435 31.7108 385.253 31.7108C386.071 31.7108 386.72 31.1761 386.72 30.5027C386.72 29.8294 386.071 29.2947 385.253 29.2947C384.435 29.2947 383.785 29.8294 383.785 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 31.7108C381.105 31.7108 381.762 31.1699 381.762 30.5027C381.762 29.8355 381.105 29.2947 380.295 29.2947C379.485 29.2947 378.828 29.8355 378.828 30.5027C378.828 31.1699 379.485 31.7108 380.295 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 31.7108C376.1 31.7108 376.757 31.1699 376.757 30.5027C376.757 29.8355 376.1 29.2947 375.29 29.2947C374.48 29.2947 373.823 29.8355 373.823 30.5027C373.823 31.1699 374.48 31.7108 375.29 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 30.5027C368.842 31.1761 369.491 31.7108 370.309 31.7108C371.127 31.7108 371.777 31.1761 371.777 30.5027C371.777 29.8294 371.127 29.2947 370.309 29.2947C369.491 29.2947 368.842 29.8294 368.842 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 30.5027C363.861 31.1761 364.51 31.7108 365.328 31.7108C366.146 31.7108 366.795 31.1761 366.795 30.5027C366.795 29.8294 366.146 29.2947 365.328 29.2947C364.51 29.2947 363.861 29.8294 363.861 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 31.7108C361.157 31.7108 361.814 31.1699 361.814 30.5027C361.814 29.8355 361.157 29.2947 360.347 29.2947C359.537 29.2947 358.88 29.8355 358.88 30.5027C358.88 31.1699 359.537 31.7108 360.347 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 31.7108C356.176 31.7108 356.833 31.1699 356.833 30.5027C356.833 29.8355 356.176 29.2947 355.366 29.2947C354.555 29.2947 353.899 29.8355 353.899 30.5027C353.899 31.1699 354.555 31.7108 355.366 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 30.5027C348.894 31.1761 349.543 31.7108 350.361 31.7108C351.179 31.7108 351.828 31.1761 351.828 30.5027C351.828 29.8294 351.179 29.2947 350.361 29.2947C349.543 29.2947 348.894 29.8294 348.894 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 31.7108C346.214 31.7108 346.871 31.1699 346.871 30.5027C346.871 29.8355 346.214 29.2947 345.404 29.2947C344.593 29.2947 343.937 29.8355 343.937 30.5027C343.937 31.1699 344.593 31.7108 345.404 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 31.7108C341.209 31.7108 341.866 31.1699 341.866 30.5027C341.866 29.8355 341.209 29.2947 340.399 29.2947C339.588 29.2947 338.931 29.8355 338.931 30.5027C338.931 31.1699 339.588 31.7108 340.399 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 30.5027C333.95 31.1761 334.6 31.7108 335.418 31.7108C336.235 31.7108 336.885 31.1761 336.885 30.5027C33
36.885 29.8294 336.235 29.2947 335.418 29.2947C334.6 29.2947 333.95 29.8294 333.95 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 31.7108C326.266 31.7108 326.923 31.1699 326.923 30.5027C326.923 29.8355 326.266 29.2947 325.455 29.2947C324.645 29.2947 323.988 29.8355 323.988 30.5027C323.988 31.1699 324.645 31.7108 325.455 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 31.7108C321.284 31.7108 321.941 31.1699 321.941 30.5027C321.941 29.8355 321.284 29.2947 320.474 29.2947C319.664 29.2947 319.007 29.8355 319.007 30.5027C319.007 31.1699 319.664 31.7108 320.474 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 30.5027C314.002 31.1761 314.651 31.7108 315.469 31.7108C316.287 31.7108 316.936 31.1761 316.936 30.5027C316.936 29.8294 316.287 29.2947 315.469 29.2947C314.675 29.2947 314.002 29.8294 314.002 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 30.5027C289.096 31.1761 289.745 31.7108 290.563 31.7108C291.381 31.7108 292.031 31.1761 292.031 30.5027C292.031 29.8294 291.381 29.2947 290.563 29.2947C289.745 29.2947 289.096 29.8294 289.096 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 30.5027C184.421 31.1761 185.07 31.7108 185.888 31.7108C186.706 31.7108 187.356 31.1761 187.356 30.5027C187.356 29.8294 186.706 29.2947 185.888 29.2947C185.094 29.2947 184.421 29.8294 184.421 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 30.5027C179.44 31.1761 180.089 31.7108 180.907 31.7108C181.725 31.7108 182.375 31.1761 182.375 30.5027C182.375 29.8294 181.725 29.2947 180.907 29.2947C180.113 29.2947 179.44 29.8294 179.44 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 31.7108C176.736 31.7108 177.393 31.1699 177.393 30.5027C177.393 29.8355 176.736 29.2947 175.926 29.2947C175.116 29.2947 174.459 29.8355 174.459 30.5027C174.459 31.1699 175.116 31.7108 175.926 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 31.7108C171.755 31.7108 172.412 31.1699 172.412 30.5027C172.412 29.8355 171.755 29.2947 170.945 29.2947C170.134 29.2947 169.478 29.8355 169.478 30.5027C169.478 31.1699 170.134 31.7108 170.945 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 30.5027C164.496 31.1761 165.146 31.7108 165.964 31.7108C166.781 31.7108 167.431 31.1761 167.431 30.5027C167.431 29.8294 166.781 29.2947 165.964 29.2947C165.146 29.2947 164.496 29.8294 164.496 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 30.5027C159.515 31.1761 160.165 31.7108 160.982 31.7108C161.8 31.7108 162.45 31.1761 162.45 30.5027C162.45 29.8294 161.8 29.2947 160.982 29.2947C160.165 29.2947 159.515 29.8294 159.515 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 31.7108C141.845 31.7108 142.502 31.1699 142.502 30.5027C142.502 29.8355 141.845 29.2947 141.034 29.2947C140.224 29.2947 139.567 29.8355 139.567 30.5027C139.567 31.1699 140.224 31.7108 141.034 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 31.7108C136.863 31.7108 137.52 31.1699 137.52 30.5027C137.52 29.8355 136.863 29.2947 136.053 29.2947C135.243 29.2947 134.586 29.8355 134.586 30.5027C134.586 31.1699 135.243 31.7108 136.053 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 31.7108C131.882 31.7108 132.539 31.1699 132.539 30.5027C132.539 29.8355 131.882 29.2947 131.072 29.2947C130.262 29.2947 129.605 29.8355 129.605 30.5027C129.605 31.1699 130.262 31.7108 131.072 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 31.7108C126.901 31.7108 127.558 31.1699 127.558 30.5027C127.558 29.8355 126.901 29.2947 126.091 29.2947C125.281 29.2947 124.624 29.8355 124.624 30.5027C124.624 31.1699 125.281 31.7108 126.091 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 31.7108C121.92 31.7108 122.577 31.1699 122.577 30.5027C122.577 29.8355 121.92 29.2947 121.11 29.2947C120.299 29.2947 119.642 29.8355 119.642 30.5027C119.642 31.1699 120.299 31.7108 121.11 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 31.7108C116.939 31.7108 117.596 31.1699 117.596 30.5027C117.596 29.8355 116.939 29.2947 116.129 29.2947C115.318 29.2947 114.661 29.8355 114.661 30.5027C114.661 31.1699 115.318 31.7108 116.129 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 30.5027C109.656 31.1761 110.305 31.7108 111.123 31.7108C111.941 31.7108 112.591 31.1761 112.591 30.5027C112.591 29.8294 111.941 29.2947 111.123 29.2947C110.33 29.2947 109.656 29.8294 109.656 30.5027Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M106.166 31.7108C106.977 31.7108 107.634 31.1699 107.634 30.5027C107.634 29.8355 106.977 29.2947 106.166 29.2947C105.356 29.2947 104.699 29.8355 104.699 30.5027C104.699 31.1699 105.356 31.7108 106.166 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 31.7108C101.972 31.7108 102.629 31.1699 102.629 30.5027C102.629 29.8355 101.972 29.2947 101.161 29.2947C100.351 29.2947 99.694 29.8355 99.694 30.5027C99.694 31.1699 100.351 31.7108 101.161 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 31.7108C96.9909 31.7108 97.6478 31.1699 97.6478 30.5027C97.6478 29.8355 96.9909 29.2947 96.1805 29.2947C95.3701 29.2947 94.7131 29.8355 94.7131 30.5027C94.7131 31.1699 95.3701 31.7108 96.1805 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 30.5027C89.7318 31.1761 90.3813 31.7108 91.1991 31.7108C92.017 31.7108 92.6665 31.1761 92.6665 30.5027C92.6665 29.8294 92.017 29.2947 91.1991 29.2947C90.3813 29.2947 89.7318 29.8294 89.7318 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 30.5027C84.7507 31.1761 85.4002 31.7108 86.2181 31.7108C87.0359 31.7108 87.6854 31.1761 87.6854 30.5027C87.6854 29.8294 87.0359 29.2947 86.2181 29.2947C85.4002 29.2947 84.7507 29.8294 84.7507 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 31.7108C82.0474 31.7108 82.7043 31.1699 82.7043 30.5027C82.7043 29.8355 82.0474 29.2947 81.237 29.2947C80.4266 29.2947 79.7697 29.8355 79.7697 30.5027C79.7697 31.1699 80.4266 31.7108 81.237 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 30.5027C74.7645 31.1761 75.414 31.7108 76.2319 31.7108C77.0497 31.7108 77.6992 31.1761 77.6992 30.5027C77.6992 29.8294 77.0497 29.2947 76.2319 29.2947C75.4381 29.2947 74.7645 29.8294 74.7645 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 30.5027C69.7836 31.1761 70.433 31.7108 71.2509 31.7108C72.0688 31.7108 72.7182 31.1761 72.7182 30.5027C72.7182 29.8294 72.0688 29.2947 71.2509 29.2947C70.4571 29.2947 69.7836 29.8294 69.7836 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M66.2934 31.7108C67.1038 31.7108 67.7607 31.1699 67.7607 30.5027C67.7607 29.8355 67.1038 29.2947 66.2934 29.2947C65.483 29.2947 64.826 29.8355 64.826 30.5027C64.826 31.1699 65.483 31.7108 66.2934 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M61.2885 31.7108C62.0989 31.7108 62.7558 31.1699 62.7558 30.5027C62.7558 29.8355 62.0989 29.2947 61.2885 29.2947C60.4781 29.2947 59.8212 29.8355 59.8212 30.5027C59.8212 31.1699 60.4781 31.7108 61.2885 31.7108Z",fill:"#5840D2"}),a.createElement("path",{d:"M9.98621 30.5027C9.98621 31.1761 10.6357 31.7108 11.4535 31.7108C12.2714 31.7108 12.9209 31.1761 12.9209 30.5027C12.9209 29.8294 12.2714 29.2947 11.4535 29.2947C10.6357 29.2947 9.98621 29.8294 9.98621 30.5027Z",fill:"#5840D2"}),a.createElement("path",{d:"M584.641 27.1234C585.451 27.1234 586.108 26.5825 586.108 25.9153C586.108 25.2481 585.451 24.7073 584.641 24.7073C583.83 24.7073 583.173 25.2481 583.173 25.9153C583.173 26.5825 583.83 27.1234 584.641 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M579.66 27.1234C580.47 27.1234 581.127 26.5825 581.127 25.9153C581.127 25.2481 580.47 24.7073 579.66 24.7073C578.849 24.7073 578.192 25.2481 578.192 25.9153C578.192 26.5825 578.849 27.1234 579.66 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 27.1234C545.578 27.1234 546.235 26.5825 546.235 25.9153C546.235 25.2481 545.578 24.7073 544.768 24.7073C543.958 24.7073 543.301 25.2481 543.301 25.9153C543.301 26.5825 543.958 27.1234 544.768 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 25.9153C538.296 26.5887 538.945 27.1234 539.763 27.1234C540.581 27.1234 541.23 26.5887 541.23 25.9153C541.23 25.242 540.581 24.7073 539.763 24.7073C538.945 24.7073 538.296 25.242 538.296 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 25.9153C533.314 26.5887 533.964 27.1234 534.782 27.1234C535.6 27.1234 536.249 26.5887 536.249 25.9153C536.249 25.242 535.6 24.7073 534.782 24.7073C533.964 24.7073 533.314 25.242 533.314 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 27.1234C530.611 27.1234 531.268 26.5825 531.268 25.9153C531.268 25.2481 530.611 24.7073 529.801 24.7073C528.99 24.7073 528.333 25.2481 528.333 25.9153C528.333 26.5825 528.99 27.1234 529.801 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 27.1234C525.63 27.1234 526.287 26.5825 526.287 25.9153C526.287 25.2481 525.63 24.7073 524.82 24.7073C524.009 24.7073 523.352 25.2481 523.352 25.9153C523.352 26.5825 524.009 27.1234 524.82 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 25.9153C518.371 26.5887 519.021 27.1234 519.839 27.1234C520.657 27.1234 521.306 26.5887 521.306 25.9153C521.306 25.242 520.657 24.7073 519.839 24.7073C519.021 24.7073 518.371 25.242 518.371 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 25.9153C513.39 26.5885 514.039 27.1231 514.857 27.1231C515.675 27.1231 516.325 26.5885 516.325 25.9153C516.325 25.2421 515.675 24.7075 514.857 24.7075C514.039 24.6877 513.39 25.2421 513.39 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 27.1234C510.687 27.1234 511.344 26.5825 511.344 25.9153C511.344 25.2481 510.687 24.7073 509.876 24.7073C509.066 24.7073 508.409 25.2481 508.409 25.9
3153C508.409 26.5825 509.066 27.1234 509.876 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 27.1234C505.705 27.1234 506.362 26.5825 506.362 25.9153C506.362 25.2481 505.705 24.7073 504.895 24.7073C504.085 24.7073 503.428 25.2481 503.428 25.9153C503.428 26.5825 504.085 27.1234 504.895 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 25.9153C498.423 26.5887 499.072 27.1234 499.89 27.1234C500.708 27.1234 501.358 26.5887 501.358 25.9153C501.358 25.242 500.708 24.7073 499.89 24.7073C499.072 24.7073 498.423 25.242 498.423 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 25.9153C493.442 26.5885 494.091 27.1231 494.909 27.1231C495.727 27.1231 496.376 26.5885 496.376 25.9153C496.376 25.2421 495.727 24.7075 494.909 24.7075C494.115 24.6877 493.442 25.2421 493.442 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 27.1234C490.738 27.1234 491.395 26.5825 491.395 25.9153C491.395 25.2481 490.738 24.7073 489.928 24.7073C489.117 24.7073 488.46 25.2481 488.46 25.9153C488.46 26.5825 489.117 27.1234 489.928 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 25.9153C483.479 26.5887 484.129 27.1234 484.947 27.1234C485.764 27.1234 486.414 26.5887 486.414 25.9153C486.414 25.242 485.764 24.7073 484.947 24.7073C484.129 24.7073 483.479 25.242 483.479 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 25.9153C478.498 26.5885 479.148 27.1231 479.965 27.1231C480.783 27.1231 481.433 26.5885 481.433 25.9153C481.433 25.2421 480.783 24.7075 479.965 24.7075C479.148 24.6877 478.498 25.2421 478.498 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 27.1234C475.795 27.1234 476.452 26.5825 476.452 25.9153C476.452 25.2481 475.795 24.7073 474.984 24.7073C474.174 24.7073 473.517 25.2481 473.517 25.9153C473.517 26.5825 474.174 27.1234 474.984 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 27.1234C470.814 27.1234 471.471 26.5825 471.471 25.9153C471.471 25.2481 470.814 24.7073 470.003 24.7073C469.193 24.7073 468.536 25.2481 468.536 25.9153C468.536 26.5825 469.193 27.1234 470.003 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 25.9153C463.531 26.5885 464.181 27.1231 464.998 27.1231C465.816 27.1231 466.466 26.5885 466.466 25.9153C466.466 25.2421 465.816 24.7075 464.998 24.7075C464.205 24.6877 463.531 25.2421 463.531 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 25.9153C458.55 26.5887 459.199 27.1234 460.017 27.1234C460.835 27.1234 461.484 26.5887 461.484 25.9153C461.484 25.242 460.835 24.7073 460.017 24.7073C459.199 24.7073 458.55 25.242 458.55 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 27.1234C455.847 27.1234 456.504 26.5825 456.504 25.9153C456.504 25.2481 455.847 24.7073 455.036 24.7073C454.226 24.7073 453.569 25.2481 453.569 25.9153C453.569 26.5825 454.226 27.1234 455.036 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 27.1234C450.865 27.1234 451.522 26.5825 451.522 25.9153C451.522 25.2481 450.865 24.7073 450.055 24.7073C449.244 24.7073 448.587 25.2481 448.587 25.9153C448.587 26.5825 449.244 27.1234 450.055 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 25.9153C443.606 26.5885 444.256 27.1231 445.074 27.1231C445.892 27.1231 446.541 26.5885 446.541 25.9153C446.541 25.2421 445.892 24.7075 445.074 24.7075C444.256 24.6877 443.606 25.2421 443.606 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 25.9153C438.625 26.5887 439.275 27.1234 440.093 27.1234C440.911 27.1234 441.56 26.5887 441.56 25.9153C441.56 25.242 440.911 24.7073 440.093 24.7073C439.275 24.7073 438.625 25.242 438.625 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 27.1234C435.922 27.1234 436.579 26.5825 436.579 25.9153C436.579 25.2481 435.922 24.7073 435.111 24.7073C434.301 24.7073 433.644 25.2481 433.644 25.9153C433.644 26.5825 434.301 27.1234 435.111 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 27.1234C430.941 27.1234 431.598 26.5825 431.598 25.9153C431.598 25.2481 430.941 24.7073 430.131 24.7073C429.32 24.7073 428.663 25.2481 428.663 25.9153C428.663 26.5825 429.32 27.1234 430.131 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 25.9153C423.658 26.5887 424.308 27.1234 425.126 27.1234C425.943 27.1234 426.593 26.5887 426.593 25.9153C426.593 25.242 425.943 24.7073 425.126 24.7073C424.308 24.7073 423.658 25.242 423.658 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 25.9151C418.677 26.5883 419.327 27.1229 420.145 27.1229C420.962 27.1229 421.612 26.5883 421.612 25.9151C421.612 25.2419 420.962 24.7073 420.145 24.7073C419.351 24.6875 418.677 25.2419 418.677 25.9151Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 27.1234C415.974 27.1234 416.63 26.5825 416.63 25.9153C416.63 25.2481 415.974 24.7073 415.163 24.7073C414.353 24.7073 413.696 25.2481 413.696 25.9153C413.696 26.5825 414.353 27.1234 415.163 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 25.9153C408.715 26.5885 409.364 27.1231 410.
3182 27.1231C411 27.1231 411.65 26.5885 411.65 25.9153C411.65 25.2421 411 24.7075 410.182 24.7075C409.364 24.6877 408.715 25.2421 408.715 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 25.9153C403.734 26.5885 404.383 27.1231 405.201 27.1231C406.019 27.1231 406.668 26.5885 406.668 25.9153C406.668 25.2421 406.019 24.7075 405.201 24.7075C404.383 24.6877 403.734 25.2421 403.734 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 27.1234C401.03 27.1234 401.687 26.5825 401.687 25.9153C401.687 25.2481 401.03 24.7073 400.22 24.7073C399.409 24.7073 398.752 25.2481 398.752 25.9153C398.752 26.5825 399.409 27.1234 400.22 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 27.1234C396.049 27.1234 396.706 26.5825 396.706 25.9153C396.706 25.2481 396.049 24.7073 395.239 24.7073C394.428 24.7073 393.771 25.2481 393.771 25.9153C393.771 26.5825 394.428 27.1234 395.239 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 25.9153C388.767 26.5887 389.416 27.1234 390.234 27.1234C391.052 27.1234 391.701 26.5887 391.701 25.9153C391.701 25.242 391.052 24.7073 390.234 24.7073C389.416 24.7073 388.767 25.242 388.767 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 25.9153C383.785 26.5887 384.435 27.1234 385.253 27.1234C386.071 27.1234 386.72 26.5887 386.72 25.9153C386.72 25.242 386.071 24.7073 385.253 24.7073C384.435 24.7073 383.785 25.242 383.785 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 27.1234C381.105 27.1234 381.762 26.5825 381.762 25.9153C381.762 25.2481 381.105 24.7073 380.295 24.7073C379.485 24.7073 378.828 25.2481 378.828 25.9153C378.828 26.5825 379.485 27.1234 380.295 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 27.1234C376.1 27.1234 376.757 26.5825 376.757 25.9153C376.757 25.2481 376.1 24.7073 375.29 24.7073C374.48 24.7073 373.823 25.2481 373.823 25.9153C373.823 26.5825 374.48 27.1234 375.29 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 25.9151C368.842 26.5883 369.491 27.1229 370.309 27.1229C371.127 27.1229 371.777 26.5883 371.777 25.9151C371.777 25.2419 371.127 24.7073 370.309 24.7073C369.491 24.6875 368.842 25.2419 368.842 25.9151Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 25.9151C363.861 26.5883 364.51 27.1229 365.328 27.1229C366.146 27.1229 366.795 26.5883 366.795 25.9151C366.795 25.2419 366.146 24.7073 365.328 24.7073C364.51 24.6875 363.861 25.2419 363.861 25.9151Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 27.1234C361.157 27.1234 361.814 26.5825 361.814 25.9153C361.814 25.2481 361.157 24.7073 360.347 24.7073C359.537 24.7073 358.88 25.2481 358.88 25.9153C358.88 26.5825 359.537 27.1234 360.347 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 27.1234C356.176 27.1234 356.833 26.5825 356.833 25.9153C356.833 25.2481 356.176 24.7073 355.366 24.7073C354.555 24.7073 353.899 25.2481 353.899 25.9153C353.899 26.5825 354.555 27.1234 355.366 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 25.9153C348.894 26.5887 349.543 27.1234 350.361 27.1234C351.179 27.1234 351.828 26.5887 351.828 25.9153C351.828 25.242 351.179 24.7073 350.361 24.7073C349.543 24.7073 348.894 25.242 348.894 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 27.1234C346.214 27.1234 346.871 26.5825 346.871 25.9153C346.871 25.2481 346.214 24.7073 345.404 24.7073C344.593 24.7073 343.937 25.2481 343.937 25.9153C343.937 26.5825 344.593 27.1234 345.404 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 27.1234C326.266 27.1234 326.923 26.5825 326.923 25.9153C326.923 25.2481 326.266 24.7073 325.455 24.7073C324.645 24.7073 323.988 25.2481 323.988 25.9153C323.988 26.5825 324.645 27.1234 325.455 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 27.1234C321.284 27.1234 321.941 26.5825 321.941 25.9153C321.941 25.2481 321.284 24.7073 320.474 24.7073C319.664 24.7073 319.007 25.2481 319.007 25.9153C319.007 26.5825 319.664 27.1234 320.474 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M289.096 25.9153C289.096 26.5885 289.745 27.1231 290.563 27.1231C291.381 27.1231 292.031 26.5885 292.031 25.9153C292.031 25.2421 291.381 24.7075 290.563 24.7075C289.745 24.6877 289.096 25.2421 289.096 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 25.9153C184.421 26.5885 185.07 27.1231 185.888 27.1231C186.706 27.1231 187.356 26.5885 187.356 25.9153C187.356 25.2421 186.706 24.7075 185.888 24.7075C185.094 24.6877 184.421 25.2421 184.421 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 25.9153C179.44 26.5885 180.089 27.1231 180.907 27.1231C181.725 27.1231 182.375 26.5885 182.375 25.9153C182.375 25.2421 181.725 24.7075 180.907 24.7075C180.113 24.6877 179.44 25.2421 179.44 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 27.1234C176.736 27.1234 177.393 26.5825 177.393 25.9153C177.393 25.2481 176.736 24.7073 175.926 24.7073C175.116 24.7073 174.459 25.2481 174.459 25.9153C174.459 26.5825 175.116 27.1234 175.926 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 27.1234C171.755 27.1234 172.412 26.5825 172.412 25.9153C172.412 25.2481 171.755 24.7073 170.945 24.7073C170.134 24.7073 169.478 25.2481 169.478 25.9
3153C169.478 26.5825 170.134 27.1234 170.945 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 25.9153C164.496 26.5885 165.146 27.1231 165.964 27.1231C166.781 27.1231 167.431 26.5885 167.431 25.9153C167.431 25.2421 166.781 24.7075 165.964 24.7075C165.146 24.6877 164.496 25.2421 164.496 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 25.9153C159.515 26.5885 160.165 27.1231 160.982 27.1231C161.8 27.1231 162.45 26.5885 162.45 25.9153C162.45 25.2421 161.8 24.7075 160.982 24.7075C160.165 24.6877 159.515 25.2421 159.515 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 27.1234C131.882 27.1234 132.539 26.5825 132.539 25.9153C132.539 25.2481 131.882 24.7073 131.072 24.7073C130.262 24.7073 129.605 25.2481 129.605 25.9153C129.605 26.5825 130.262 27.1234 131.072 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 27.1234C126.901 27.1234 127.558 26.5825 127.558 25.9153C127.558 25.2481 126.901 24.7073 126.091 24.7073C125.281 24.7073 124.624 25.2481 124.624 25.9153C124.624 26.5825 125.281 27.1234 126.091 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 27.1234C121.92 27.1234 122.577 26.5825 122.577 25.9153C122.577 25.2481 121.92 24.7073 121.11 24.7073C120.299 24.7073 119.642 25.2481 119.642 25.9153C119.642 26.5825 120.299 27.1234 121.11 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 27.1234C116.939 27.1234 117.596 26.5825 117.596 25.9153C117.596 25.2481 116.939 24.7073 116.129 24.7073C115.318 24.7073 114.661 25.2481 114.661 25.9153C114.661 26.5825 115.318 27.1234 116.129 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 25.9153C109.656 26.5885 110.305 27.1231 111.123 27.1231C111.941 27.1231 112.591 26.5885 112.591 25.9153C112.591 25.2421 111.941 24.7075 111.123 24.7075C110.33 24.6877 109.656 25.2421 109.656 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 27.1234C106.977 27.1234 107.634 26.5825 107.634 25.9153C107.634 25.2481 106.977 24.7073 106.166 24.7073C105.356 24.7073 104.699 25.2481 104.699 25.9153C104.699 26.5825 105.356 27.1234 106.166 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 27.1234C101.972 27.1234 102.629 26.5825 102.629 25.9153C102.629 25.2481 101.972 24.7073 101.161 24.7073C100.351 24.7073 99.694 25.2481 99.694 25.9153C99.694 26.5825 100.351 27.1234 101.161 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 27.1234C96.9909 27.1234 97.6478 26.5825 97.6478 25.9153C97.6478 25.2481 96.9909 24.7073 96.1805 24.7073C95.3701 24.7073 94.7131 25.2481 94.7131 25.9153C94.7131 26.5825 95.3701 27.1234 96.1805 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 25.9153C89.7318 26.5885 90.3813 27.1231 91.1991 27.1231C92.017 27.1231 92.6665 26.5885 92.6665 25.9153C92.6665 25.2421 92.017 24.7075 91.1991 24.7075C90.3813 24.6877 89.7318 25.2421 89.7318 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 25.9153C84.7507 26.5885 85.4002 27.1231 86.2181 27.1231C87.0359 27.1231 87.6854 26.5885 87.6854 25.9153C87.6854 25.2421 87.0359 24.7075 86.2181 24.7075C85.4002 24.6877 84.7507 25.2421 84.7507 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 27.1234C82.0474 27.1234 82.7043 26.5825 82.7043 25.9153C82.7043 25.2481 82.0474 24.7073 81.237 24.7073C80.4266 24.7073 79.7697 25.2481 79.7697 25.9153C79.7697 26.5825 80.4266 27.1234 81.237 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 25.9153C74.7645 26.5885 75.414 27.1231 76.2319 27.1231C77.0497 27.1231 77.6992 26.5885 77.6992 25.9153C77.6992 25.2421 77.0497 24.7075 76.2319 24.7075C75.4381 24.6877 74.7645 25.2421 74.7645 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 25.9153C69.7836 26.5885 70.433 27.1231 71.2509 27.1231C72.0688 27.1231 72.7182 26.5885 72.7182 25.9153C72.7182 25.2421 72.0688 24.7075 71.2509 24.7075C70.4571 24.6877 69.7836 25.2421 69.7836 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M66.2934 27.1234C67.1038 27.1234 67.7607 26.5825 67.7607 25.9153C67.7607 25.2481 67.1038 24.7073 66.2934 24.7073C65.483 24.7073 64.826 25.2481 64.826 25.9153C64.826 26.5825 65.483 27.1234 66.2934 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M61.2885 27.1234C62.0989 27.1234 62.7558 26.5825 62.7558 25.9153C62.7558 25.2481 62.0989 24.7073 61.2885 24.7073C60.4781 24.7073 59.8212 25.2481 59.8212 25.9153C59.8212 26.5825 60.4781 27.1234 61.2885 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M21.4154 27.1234C22.2258 27.1234 22.8828 26.5825 22.8828 25.9153C22.8828 25.2481 22.2258 24.7073 21.4154 24.7073C20.6051 24.7073 19.9481 25.2481 19.9481 25.9153C19.948
31 26.5825 20.6051 27.1234 21.4154 27.1234Z",fill:"#5840D2"}),a.createElement("path",{d:"M14.9672 25.9153C14.9672 26.5885 15.6166 27.1231 16.4345 27.1231C17.2523 27.1231 17.9018 26.5885 17.9018 25.9153C17.9018 25.2421 17.2523 24.7075 16.4345 24.7075C15.6166 24.6877 14.9672 25.2421 14.9672 25.9153Z",fill:"#5840D2"}),a.createElement("path",{d:"M593.135 21.3276C593.135 22.0008 593.785 22.5354 594.603 22.5354C595.421 22.5354 596.07 22.0008 596.07 21.3276C596.07 20.6544 595.421 20.1198 594.603 20.1198C593.785 20.1 593.135 20.6544 593.135 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M588.131 21.3279C588.131 22.0012 588.78 22.5359 589.598 22.5359C590.416 22.5359 591.066 22.0012 591.066 21.3279C591.066 20.6545 590.416 20.1198 589.598 20.1198C588.78 20.1198 588.131 20.6545 588.131 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M573.187 21.3279C573.187 22.0012 573.837 22.5359 574.655 22.5359C575.473 22.5359 576.122 22.0012 576.122 21.3279C576.122 20.6545 575.473 20.1198 574.655 20.1198C573.837 20.1198 573.187 20.6545 573.187 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M568.206 21.3279C568.206 22.0012 568.856 22.5359 569.674 22.5359C570.491 22.5359 571.141 22.0012 571.141 21.3279C571.141 20.6545 570.491 20.1198 569.674 20.1198C568.856 20.1198 568.206 20.6545 568.206 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M563.225 21.3276C563.225 22.0008 563.875 22.5354 564.693 22.5354C565.511 22.5354 566.16 22.0008 566.16 21.3276C566.16 20.6544 565.511 20.1198 564.693 20.1198C563.875 20.1 563.225 20.6544 563.225 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M558.244 21.3276C558.244 22.0008 558.893 22.5354 559.711 22.5354C560.529 22.5354 561.178 22.0008 561.178 21.3276C561.178 20.6544 560.529 20.1198 559.711 20.1198C558.893 20.1 558.244 20.6544 558.244 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 21.3279C553.263 22.0012 553.913 22.5359 554.73 22.5359C555.548 22.5359 556.198 22.0012 556.198 21.3279C556.198 20.6545 555.548 20.1198 554.73 20.1198C553.913 20.1198 553.263 20.6545 553.263 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M548.258 21.3279C548.258 22.0012 548.907 22.5359 549.725 22.5359C550.543 22.5359 551.193 22.0012 551.193 21.3279C551.193 20.6545 550.543 20.1198 549.725 20.1198C548.907 20.1198 548.258 20.6545 548.258 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M543.277 21.3276C543.277 22.0008 543.927 22.5354 544.745 22.5354C545.562 22.5354 546.212 22.0008 546.212 21.3276C546.212 20.6544 545.562 20.1198 544.745 20.1198C543.951 20.1 543.277 20.6544 543.277 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 21.3279C538.296 22.0012 538.945 22.5359 539.763 22.5359C540.581 22.5359 541.23 22.0012 541.23 21.3279C541.23 20.6545 540.581 20.1198 539.763 20.1198C538.945 20.1198 538.296 20.6545 538.296 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 21.3279C533.314 22.0012 533.964 22.5359 534.782 22.5359C535.6 22.5359 536.249 22.0012 536.249 21.3279C536.249 20.6545 535.6 20.1198 534.782 20.1198C533.964 20.1198 533.314 20.6545 533.314 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M528.333 21.3276C528.333 22.0008 528.983 22.5354 529.801 22.5354C530.619 22.5354 531.268 22.0008 531.268 21.3276C531.268 20.6544 530.619 20.1198 529.801 20.1198C528.983 20.1 528.333 20.6544 528.333 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M523.352 21.3279C523.352 22.0012 524.002 22.5359 524.82 22.5359C525.637 22.5359 526.287 22.0012 526.287 21.3279C526.287 20.6545 525.637 20.1198 524.82 20.1198C524.002 20.1198 523.352 20.6545 523.352 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 21.3279C518.371 22.0012 519.021 22.5359 519.839 22.5359C520.657 22.5359 521.306 22.0012 521.306 21.3279C521.306 20.6545 520.657 20.1198 519.839 20.1198C519.021 20.1198 518.371 20.6545 518.371 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 21.3276C513.39 22.0008 514.039 22.5354 514.857 22.5354C515.675 22.5354 516.325 22.0008 516.325 21.3276C516.325 20.6544 515.675 20.1198 514.857 20.1198C514.039 20.1 513.39 20.6544 513.39 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 21.3279C508.385 22.0012 509.035 22.5359 509.853 22.5359C510.67 22.5359 511.32 22.0012 511.32 21.3279C511.32 20.6545 510.67 20.1198 509.853 20.1198C509.035 20.1198 508.385 20.6545 508.385 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 21.3279C503.404 22.0012 504.053 22.5359 504.871 22.5359C505.689 22.5359 506.338 22.0012 506.338 21.3279C506.338 20.6545 505.689 20.1198 504.871 20.1198C504.053 20.1198 503.404 20.6545 503.404 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 21.3279C498.423 22.0012 499.072 22.5359 499.89 22.5359C500.708 22.5359 501.358 22.0012 501.358 21.3279C501.358 20.6545 500.708 20.1198 499.89 20.1198C499.072 20.1198 498.423 20.6545 498.423 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 21.3276C493.442 22.0008 494.091 22.5354 494.909 22.5354C495.727 22.5354 496.376 22.0008 496.376 21.3276C496.376 20.6544 495.727 20.1198 494.909 20.1198C494.115 20.1 493.442 20.6544 493.442 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 21.3279C488.46 22.0012 489.11 22.5359 489.928 22.5359C490.746 22.5359 491.395 22.0012 491.395 21.3279C491.395 20.6545 490.746 20.1198 489.928 20.1198C489.11 20.1198 488.46 20.6545 488.46 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 21.3279C483.479 22.0012 484.129 22.5359 484.947 22.5359C485.764 22.5359 486.414 22.0012 486.414 21.3279C486.414 20.6545 485.764 20.1198 484.947 20.1198C484.129 20.1198 483.479 20.6545 483.479 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 21.3276C478.498 22.0008 479.148 22.5354 479.965 22.5354C480.783 22.5354 481.433 22.0008 481.433 21.3276C481.433 20.6544 480.783 20.1198 479.965 20.1198C479.148 20.1 478.498 20.6544 478.498 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 21.3279C473.517 22.0012 474.167 22.5359 474.984 22.5359C475.802 22.5359 476.452 22.0012 476.452 21.3279C476.452 20.6545 475.802 20.1198 474.984 20.1198C474.167 20.1198 473.517 20.6545 473.517 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 21.3279C468.512 22.0012 469.162 22.5359 469.98 22.5359C470.797 22.5359 471.447 22.0012 471.447 21.3279C471.447 20.6545 470.797 20.1198 469.98 20.1198C469.162 20.1198 468.512 20.6545 468.512 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 21.3276C463.531 22.0008 464.181 22.5354 464.998 22.5354C465.816 22.5354 466.466 22.0008 466.466 21.3276C466.466 20.6544 465.816 20.1198 464.998 20.1198C464.205 20.1 463.531 20.6544 463.531 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 21.3279C458.55 22.0012 459.199 22.5359 460.017 22.5359C460.835 22.5359 461.484 22.0012 461.484 21.3279C461.484 20.6545 460.835 20.1198 460.017 20.1198C459.199 20.1198 458.55 20.6545 458.55 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 21.3279C453.569 22.0012 454.218 22.5359 455.036 22.5359C455.854 22.5359 456.504 22.0012 456.504 21.3279C456.504 20.6545 455.854 20.1198 45
35.036 20.1198C454.218 20.1198 453.569 20.6545 453.569 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 21.3279C448.587 22.0012 449.237 22.5359 450.055 22.5359C450.873 22.5359 451.522 22.0012 451.522 21.3279C451.522 20.6545 450.873 20.1198 450.055 20.1198C449.237 20.1198 448.587 20.6545 448.587 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 21.3276C443.606 22.0008 444.256 22.5354 445.074 22.5354C445.892 22.5354 446.541 22.0008 446.541 21.3276C446.541 20.6544 445.892 20.1198 445.074 20.1198C444.256 20.1 443.606 20.6544 443.606 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 21.3279C438.625 22.0012 439.275 22.5359 440.093 22.5359C440.911 22.5359 441.56 22.0012 441.56 21.3279C441.56 20.6545 440.911 20.1198 440.093 20.1198C439.275 20.1198 438.625 20.6545 438.625 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 21.3279C433.644 22.0012 434.294 22.5359 435.111 22.5359C435.929 22.5359 436.579 22.0012 436.579 21.3279C436.579 20.6545 435.929 20.1198 435.111 20.1198C434.294 20.1198 433.644 20.6545 433.644 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 21.3279C428.639 22.0012 429.289 22.5359 430.107 22.5359C430.924 22.5359 431.574 22.0012 431.574 21.3279C431.574 20.6545 430.924 20.1198 430.107 20.1198C429.289 20.1198 428.639 20.6545 428.639 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 21.3279C423.658 22.0012 424.308 22.5359 425.126 22.5359C425.943 22.5359 426.593 22.0012 426.593 21.3279C426.593 20.6545 425.943 20.1198 425.126 20.1198C424.308 20.1198 423.658 20.6545 423.658 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 21.3276C418.677 22.0008 419.327 22.5354 420.145 22.5354C420.962 22.5354 421.612 22.0008 421.612 21.3276C421.612 20.6544 420.962 20.1198 420.145 20.1198C419.351 20.1 418.677 20.6544 418.677 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 21.3276C413.696 22.0008 414.345 22.5354 415.163 22.5354C415.981 22.5354 416.63 22.0008 416.63 21.3276C416.63 20.6544 415.981 20.1198 415.163 20.1198C414.345 20.1 413.696 20.6544 413.696 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 21.3276C408.715 22.0008 409.364 22.5354 410.182 22.5354C411 22.5354 411.65 22.0008 411.65 21.3276C411.65 20.6544 411 20.1198 410.182 20.1198C409.364 20.1 408.715 20.6544 408.715 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 21.3276C403.734 22.0008 404.383 22.5354 405.201 22.5354C406.019 22.5354 406.668 22.0008 406.668 21.3276C406.668 20.6544 406.019 20.1198 405.201 20.1198C404.383 20.1 403.734 20.6544 403.734 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 21.3279C398.752 22.0012 399.402 22.5359 400.22 22.5359C401.038 22.5359 401.687 22.0012 401.687 21.3279C401.687 20.6545 401.038 20.1198 400.22 20.1198C399.402 20.1198 398.752 20.6545 398.752 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 21.3276C393.747 22.0008 394.397 22.5354 395.215 22.5354C396.033 22.5354 396.682 22.0008 396.682 21.3276C396.682 20.6544 396.033 20.1198 395.215 20.1198C394.421 20.1 393.747 20.6544 393.747 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 21.3279C388.767 22.0012 389.416 22.5359 390.234 22.5359C391.052 22.5359 391.701 22.0012 391.701 21.3279C391.701 20.6545 391.052 20.1198 390.234 20.1198C389.416 20.1198 388.767 20.6545 388.767 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 21.3279C383.785 22.0012 384.435 22.5359 385.253 22.5359C386.071 22.5359 386.72 22.0012 386.72 21.3279C386.72 20.6545 386.071 20.1198 385.253 20.1198C384.435 20.1198 383.785 20.6545 383.785 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 21.3276C378.804 22.0008 379.454 22.5354 380.271 22.5354C381.089 22.5354 381.739 22.0008 381.739 21.3276C381.739 20.6544 381.089 20.1198 380.271 20.1198C379.478 20.1 378.804 20.6544 378.804 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 21.3279C373.823 22.0012 374.472 22.5359 375.29 22.5359C376.108 22.5359 376.757 22.0012 376.757 21.3279C376.757 20.6545 376.108 20.1198 375.29 20.1198C374.472 20.1198 373.823 20.6545 373.823 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 21.3276C368.842 22.0008 369.491 22.5354 370.309 22.5354C371.127 22.5354 371.777 22.0008 371.777 21.3276C371.777 20.6544 371.127 20.1198 370.309 20.1198C369.491 20.1 368.842 20.6544 368.842 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 21.3276C363.861 22.0008 364.51 22.5354 365.328 22.5354C366.146 22.5354 366.795 22.0008 366.795 21.3276C366.795 20.6544 366.146 20.1198 365.328 20.1198C364.51 20.1 363.861 20.6544 363.861 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 21.3279C358.88 22.0012 359.529 22.5359 360.347 22.5359C361.165 22.5359 361.814 22.0012 361.814 21.3279C361.814 20.6545 361.165 20.1198 360.347 20.1198C359.529 20.1198 358.88 20.6545 358.88 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 21.3276C353.875 22.0008 354.524 22.5354 355.342 22.5354C356.16 22.5354 356.809 22.0008 356.809 21.3276C356.809 20.6544 356.16 20.1198 355.342 20.1198C354.548 20.1 353.875 20.6544 353.875 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 21.3279C348.894 22.0012 349.543 22.5359 350.361 22.5359C351.179 22.5359 351.828 22.0012 351.828 21.3279C351.828 20.6545 351.179 20.1198 350.361 20.1198C349.543 20.1198 348.894 20.6545 348.894 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 21.3279C338.931 22.0012 339.581 22.5359 340.399 22.5359C341.217 22.5359 341.866 22.0012 341.866 21.3279C341.866 20.6545 341.217 20.1198 340.399 20.1198C339.581 20.1198 338.931 20.6545 338.931 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 21.3276C328.969 22.0008 329.618 22.5354 330.436 22.5354C331.254 22.5354 331.904 22.0008 331.904 21.3276C331.904 20.6544 331.254 20.1198 330.436 20.1198C329.618 20.1 328.969 20.6544 328.969 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 21.3276C323.988 22.0008 324.638 22.5354 325.455 22.5354C326.273 22.5354 326.923 22.0008 326.923 21.3276C326.923 20.6544 326.273 20.1198 325.455 20.1198C324.638 20.1 323.988 20.6544 323.988 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 21.3276C319.007 22.0008 319.656 22.5354 320.474 22.5354C321.292 22.5354 321.941 22.0008 321.941 21.3276C321.941 20.6544 321.292 20.1198 320.474 20.1198C319.656 20.1 319.007 20.6544 319.007 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 21.3276C314.002 22.0008 314.651 22.5354 315.469 22.5354C316.287 22.5354 316.936 22.0008 316.936 21.3276C316.936 20.6544 316.287 20.1198 315.469 20.1198C314.675 20.1 314.002 20.6544 314.002 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 21.3279C309.021 22.0012 309.67 22.5359 310.488 22.5359C311.306 22.5359 311.956 22.0012 311.956 21.3279C311.956 20.6545 311.306 20.1198 310.488 20.1198C309.67 20.1198 309.021 20.6545 309.021 21.3279Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 21.3276C169.478 22.0008 170.127 22.5354 170.945 22.5354C171.763 22.5354 172.412 22.0008 172.412 21.3276C172.412 20.6544 171.763 20.1198 170.945 20.1198C170.127 20.1 169.478 20.6544 169.478 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 21.3276C164.496 22.0008 165.146 22.5354 165.964 22.5354C166.781 22.5354 167.431 22.0008 167.431 21.3276C167.431 20.6544 166.781 20.1198 165.964 20.1198C165.146 20.1 164.496 20.6544 164.496 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 21.3276C159.515 22.0008 160.165 22.5354 160.982 22.5354C161.8 22.5354 162.45 22.0008 162.45 21.3276C162.45 20.6544 161.8 20.1198 160.982 20.1198C160.165 20.1 159.515 20.6544 159.515 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 21.3276C124.624 22.0008 125.273 22.5354 126.091 22.5354C126.909 22.5354 127.558 22.0008 127.558 21.3276C127.558 20.6544 126.909 20.1198 126.091 20.1198C125.273 20.1 124.624 20.6544 124.624 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 21.3276C119.642 22.0008 120.292 22.5354 121.11 22.5354C121.928 22.5354 122.577 22.0008 122.577 21.3276C122.577 20.6544 121.928 20.1198 121.11 20.1198C120.292 20.1 119.642 20.6544 119.642 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 21.3276C114.637 22.0008 115.287 22.5354 116.105 22.5354C116.923 22.5354 117.572 22.0008 117.572 21.3276C117.572 20.6544 116.923 20.1198 116.105 20.1198C115.311 20.1 114.637 20.6544 114.637 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 21.3276C109.656 22.0008 110.305 22.5354 111.123 22.5354C111.941 22.5354 112.591 22.0008 112.591 21.3276C112.591 20.6544 111.941 20.1198 111.123 20.1198C110.33 20.1 109.656 20.6544 109.656 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 21.3276C104.675 22.0008 105.325 22.5354 106.142 22.5354C106.96 22.5354 10
37.61 22.0008 107.61 21.3276C107.61 20.6544 106.96 20.1198 106.142 20.1198C105.349 20.1 104.675 20.6544 104.675 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 21.3276C99.694 22.0008 100.343 22.5354 101.161 22.5354C101.979 22.5354 102.629 22.0008 102.629 21.3276C102.629 20.6544 101.979 20.1198 101.161 20.1198C100.367 20.1 99.694 20.6544 99.694 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 21.3276C94.7131 22.0008 95.3626 22.5354 96.1805 22.5354C96.9983 22.5354 97.6478 22.0008 97.6478 21.3276C97.6478 20.6544 96.9983 20.1198 96.1805 20.1198C95.3626 20.1 94.7131 20.6544 94.7131 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 21.3276C89.7318 22.0008 90.3813 22.5354 91.1991 22.5354C92.017 22.5354 92.6665 22.0008 92.6665 21.3276C92.6665 20.6544 92.017 20.1198 91.1991 20.1198C90.3813 20.1 89.7318 20.6544 89.7318 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 21.3276C84.7507 22.0008 85.4002 22.5354 86.2181 22.5354C87.0359 22.5354 87.6854 22.0008 87.6854 21.3276C87.6854 20.6544 87.0359 20.1198 86.2181 20.1198C85.4002 20.1 84.7507 20.6544 84.7507 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M79.7697 21.3276C79.7697 22.0008 80.4191 22.5354 81.237 22.5354C82.0548 22.5354 82.7043 22.0008 82.7043 21.3276C82.7043 20.6544 82.0548 20.1198 81.237 20.1198C80.4191 20.1 79.7697 20.6544 79.7697 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 21.3276C74.7645 22.0008 75.414 22.5354 76.2319 22.5354C77.0497 22.5354 77.6992 22.0008 77.6992 21.3276C77.6992 20.6544 77.0497 20.1198 76.2319 20.1198C75.4381 20.1 74.7645 20.6544 74.7645 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 21.3276C69.7836 22.0008 70.433 22.5354 71.2509 22.5354C72.0688 22.5354 72.7182 22.0008 72.7182 21.3276C72.7182 20.6544 72.0688 20.1198 71.2509 20.1198C70.4571 20.1 69.7836 20.6544 69.7836 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M64.8024 21.3276C64.8024 22.0008 65.4518 22.5354 66.2697 22.5354C67.0876 22.5354 67.737 22.0008 67.737 21.3276C67.737 20.6544 67.0876 20.1198 66.2697 20.1198C65.4759 20.1 64.8024 20.6544 64.8024 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M59.8212 21.3276C59.8212 22.0008 60.4706 22.5354 61.2885 22.5354C62.1063 22.5354 62.7558 22.0008 62.7558 21.3276C62.7558 20.6544 62.1063 20.1198 61.2885 20.1198C60.4706 20.1 59.8212 20.6544 59.8212 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M54.8397 21.3276C54.8397 22.0008 55.4892 22.5354 56.307 22.5354C57.1249 22.5354 57.7744 22.0008 57.7744 21.3276C57.7744 20.6544 57.1249 20.1198 56.307 20.1198C55.4892 20.1 54.8397 20.6544 54.8397 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M49.8588 21.3276C49.8588 22.0008 50.5082 22.5354 51.3261 22.5354C52.1439 22.5354 52.7934 22.0008 52.7934 21.3276C52.7934 20.6544 52.1439 20.1198 51.3261 20.1198C50.5082 20.1 49.8588 20.6544 49.8588 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M44.8777 21.3276C44.8777 22.0008 45.5272 22.5354 46.345 22.5354C47.1629 22.5354 47.8123 22.0008 47.8123 21.3276C47.8123 20.6544 47.1629 20.1198 46.345 20.1198C45.5272 20.1 44.8777 20.6544 44.8777 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M39.8728 21.3276C39.8728 22.0008 40.5223 22.5354 41.3401 22.5354C42.158 22.5354 42.8075 22.0008 42.8075 21.3276C42.8075 20.6544 42.158 20.1198 41.3401 20.1198C40.5463 20.1 39.8728 20.6544 39.8728 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M29.9105 21.3276C29.9105 22.0008 30.56 22.5354 31.3778 22.5354C32.1957 22.5354 32.8452 22.0008 32.8452 21.3276C32.8452 20.6544 32.1957 20.1198 31.3778 20.1198C30.584 20.1 29.9105 20.6544 29.9105 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M19.9481 21.3276C19.9481 22.0008 20.5976 22.5354 21.4154 22.5354C22.2333 22.5354 22.8828 22.0008 22.8828 21.3276C22.8828 20.6544 22.2333 20.1198 21.4154 20.1198C20.5976 20.1 19.9481 20.6544 19.9481 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M14.9672 21.3276C14.9672 22.0008 15.6166 22.5354 16.4345 22.5354C17.2523 22.5354 17.9018 22.0008 17.9018 21.3276C17.9018 20.6544 17.2523 20.1198 16.4345 20.1198C15.6166 20.1 14.9672 20.6544 14.9672 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M9.98621 21.3276C9.98621 22.0008 10.6357 22.5354 11.4535 22.5354C12.2714 22.5354 12.9209 22.0008 12.9209 21.3276C12.9209 20.6544 12.2714 20.1198 11.4535 20.1198C10.6357 20.1 9.98621 20.6544 9.98621 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M5.00513 21.3276C5.00513 22.0008 5.6546 22.5354 6.47246 22.5354C7.29031 22.5354 7.93978 22.0008 7.93978 21.3276C7.93978 20.6544 7.29031 20.1198 6.47246 20.1198C5.6546 20.1 5.00513 20.6544 5.00513 21.3276Z",fill:"#5840D2"}),a.createElement("path",{d:"M608.079 16.7188C608.079 17.3921 608.729 17.9269 609.547 17.9269C610.364 17.9269 611.014 17.3921 611.014 16.7188C611.014 16.0455 610.364 15.5107 609.547 15.5107C608.729 15.5107 608.079 16.0653 608.079 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M603.098 16.7188C603.098 17.3921 603.747 17.9269 604.565 17.9269C605.383 17.9269 606.033 17.3921 606.033 16.7188C606.033 16.0455 605.383 15.5107 604.565 15.5107C603.747 15.5107 603.098 16.0653 603.098 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M598.117 16.7188C598.117 17.3921 598.767 17.9269 599.584 17.9269C600.402 17.9269 601.052 17.3921 601.052 16.7188C601.052 16.0455 600.402 15.5107 599.584 15.5107C598.767 15.5107 598.117 16.0653 598.117 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M593.135 16.7188C593.135 17.3921 593.785 17.9269 594.603 17.9269C595.421 17.9269 596.07 17.3921 596.07 16.7188C596.07 16.0455 595.421 15.5107 594.603 15.5107C593.785 15.5107 593.135 16.0653 593.135 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M588.131 16.7188C588.131 17.3921 588.78 17.9269 589.598 17.9269C590.416 17.9269 591.066 17.3921 591.066 16.7188C591.066 16.0455 590.416 15.5107 589.598 15.5107C588.78 15.5107 588.131 16.0653 588.131 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M583.15 16.7188C583.15 17.3921 583.799 17.9269 584.617 17.9269C585.435 17.9269 586.084 17.3921 586.084 16.7188C586.084 16.0455 585.435 15.5107 584.617 15.5107C583.799 15.5107 583.15 16.0653 583.15 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M578.169 16.7188C578.169 17.3921 578.818 17.9269 579.636 17.9269C580.454 17.9269 581.103 17.3921 581.103 16.7188C581.103 16.0455 580.454 15.5107 579.636 15.5107C578.818 15.5107 578.169 16.0653 578.169 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M573.187 16.7188C573.187 17.3921 573.837 17.9269 574.655 17.9269C575.473 17.9269 576.122 17.3921 576.122 16.7188C576.122 16.
30455 575.473 15.5107 574.655 15.5107C573.837 15.5107 573.187 16.0653 573.187 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M568.206 16.7188C568.206 17.3921 568.856 17.9269 569.674 17.9269C570.491 17.9269 571.141 17.3921 571.141 16.7188C571.141 16.0455 570.491 15.5107 569.674 15.5107C568.856 15.5107 568.206 16.0653 568.206 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M563.225 16.7188C563.225 17.3921 563.875 17.9269 564.693 17.9269C565.511 17.9269 566.16 17.3921 566.16 16.7188C566.16 16.0455 565.511 15.5107 564.693 15.5107C563.875 15.5107 563.225 16.0653 563.225 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M558.244 16.7188C558.244 17.3921 558.893 17.9269 559.711 17.9269C560.529 17.9269 561.178 17.3921 561.178 16.7188C561.178 16.0455 560.529 15.5107 559.711 15.5107C558.893 15.5107 558.244 16.0653 558.244 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 16.7188C553.263 17.3921 553.913 17.9269 554.73 17.9269C555.548 17.9269 556.198 17.3921 556.198 16.7188C556.198 16.0455 555.548 15.5107 554.73 15.5107C553.913 15.5107 553.263 16.0653 553.263 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M548.258 16.7188C548.258 17.3921 548.907 17.9269 549.725 17.9269C550.543 17.9269 551.193 17.3921 551.193 16.7188C551.193 16.0455 550.543 15.5107 549.725 15.5107C548.907 15.5107 548.258 16.0653 548.258 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M543.277 16.7188C543.277 17.3921 543.927 17.9269 544.745 17.9269C545.562 17.9269 546.212 17.3921 546.212 16.7188C546.212 16.0455 545.562 15.5107 544.745 15.5107C543.951 15.5107 543.277 16.0653 543.277 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 16.7188C538.296 17.3921 538.945 17.9269 539.763 17.9269C540.581 17.9269 541.23 17.3921 541.23 16.7188C541.23 16.0455 540.581 15.5107 539.763 15.5107C538.945 15.5107 538.296 16.0653 538.296 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 16.7188C533.314 17.3921 533.964 17.9269 534.782 17.9269C535.6 17.9269 536.249 17.3921 536.249 16.7188C536.249 16.0455 535.6 15.5107 534.782 15.5107C533.964 15.5107 533.314 16.0653 533.314 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M528.333 16.7188C528.333 17.3921 528.983 17.9269 529.801 17.9269C530.619 17.9269 531.268 17.3921 531.268 16.7188C531.268 16.0455 530.619 15.5107 529.801 15.5107C528.983 15.5107 528.333 16.0653 528.333 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M523.352 16.7188C523.352 17.3921 524.002 17.9269 524.82 17.9269C525.637 17.9269 526.287 17.3921 526.287 16.7188C526.287 16.0455 525.637 15.5107 524.82 15.5107C524.002 15.5107 523.352 16.0653 523.352 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 16.7188C518.371 17.3921 519.021 17.9269 519.839 17.9269C520.657 17.9269 521.306 17.3921 521.306 16.7188C521.306 16.0455 520.657 15.5107 519.839 15.5107C519.021 15.5107 518.371 16.0653 518.371 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 16.7188C513.39 17.3921 514.039 17.9269 514.857 17.9269C515.675 17.9269 516.325 17.3921 516.325 16.7188C516.325 16.0455 515.675 15.5107 514.857 15.5107C514.039 15.5107 513.39 16.0653 513.39 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 16.7188C508.385 17.3921 509.035 17.9269 509.853 17.9269C510.67 17.9269 511.32 17.3921 511.32 16.7188C511.32 16.0455 510.67 15.5107 509.853 15.5107C509.035 15.5107 508.385 16.0653 508.385 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 16.7188C503.404 17.3921 504.053 17.9269 504.871 17.9269C505.689 17.9269 506.338 17.3921 506.338 16.7188C506.338 16.0455 505.689 15.5107 504.871 15.5107C504.053 15.5107 503.404 16.0653 503.404 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 16.7188C498.423 17.3921 499.072 17.9269 499.89 17.9269C500.708 17.9269 501.358 17.3921 501.358 16.7188C501.358 16.0455 500.708 15.5107 499.89 15.5107C499.072 15.5107 498.423 16.0653 498.423 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 16.7188C493.442 17.3921 494.091 17.9269 494.909 17.9269C495.727 17.9269 496.376 17.3921 496.376 16.7188C496.376 16.0455 495.727 15.5107 494.909 15.5107C494.115 15.5107 493.442 16.0653 493.442 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 16.7188C488.46 17.3921 489.11 17.9269 489.928 17.9269C490.746 17.9269 491.395 17.3921 491.395 16.7188C491.395 16.0455 490.746 15.5107 489.928 15.5107C489.11 15.5107 488.46 16.0653 488.46 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 16.7188C483.479 17.3921 484.129 17.9269 484.947 17.9269C485.764 17.9269 486.414 17.3921 486.414 16.7188C486.414 16.0455 485.764 15.5107 484.947 15.5107C484.129 15.5107 483.479 16.0653 483.479 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 16.7188C478.498 17.3921 479.148 17.9269 479.965 17.9269C480.783 17.9269 481.433 17.3921 481.433 16.7188C481.433 16.0455 480.783 15.5107 479.965 15.5107C479.148 15.5107 478.498 16.0653 478.498 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 16.7188C473.517 17.3921 474.167 17.9269 474.984 17.9269C475.802 17.9269 476.452 17.3921 476.452 16.7188C476.452 16.0455 475.802 15.5107 474.984 15.5107C474.167 15.5107 473.517 16.0653 473.517 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 16.7188C468.512 17.3921 469.162 17.9269 469.98 17.9269C470.797 17.9269 471.447 17.3921 471.447 16.7188C471.447 16.0455 470.797 15.5107 469.98 15.5107C469.162 15.5107 468.512 16.0653 468.512 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 16.7188C463.531 17.3921 464.181 17.9269 464.998 17.9269C465.816 17.9269 466.466 17.3921 466.466 16.7188C466.466 16.0455 465.816 15.5107 464.998 15.5107C464.205 15.5107 463.531 16.0653 463.531 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 16.7188C458.55 17.3921 459.199 17.9269 460.017 17.9269C460.835 17.9269 461.484 17.3921 461.484 16.7188C461.484 16.0455 460.835 15.5107 460.017 15.5107C459.199 15.5107 458.55 16.0653 458.55 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 16.7188C453.569 17.3921 454.218 17.9269 455.036 17.9269C455.854 17.9269 456.504 17.3921 456.504 16.7188C456.504 16.0455 455.854 15.5107 455.036 15.5107C454.218 15.5107 453.569 16.
30653 453.569 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 16.7188C448.587 17.3921 449.237 17.9269 450.055 17.9269C450.873 17.9269 451.522 17.3921 451.522 16.7188C451.522 16.0455 450.873 15.5107 450.055 15.5107C449.237 15.5107 448.587 16.0653 448.587 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 16.7188C443.606 17.3921 444.256 17.9269 445.074 17.9269C445.892 17.9269 446.541 17.3921 446.541 16.7188C446.541 16.0455 445.892 15.5107 445.074 15.5107C444.256 15.5107 443.606 16.0653 443.606 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 16.7188C438.625 17.3921 439.275 17.9269 440.093 17.9269C440.911 17.9269 441.56 17.3921 441.56 16.7188C441.56 16.0455 440.911 15.5107 440.093 15.5107C439.275 15.5107 438.625 16.0653 438.625 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 16.7188C433.644 17.3921 434.294 17.9269 435.111 17.9269C435.929 17.9269 436.579 17.3921 436.579 16.7188C436.579 16.0455 435.929 15.5107 435.111 15.5107C434.294 15.5107 433.644 16.0653 433.644 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M428.639 16.7188C428.639 17.3921 429.289 17.9269 430.107 17.9269C430.924 17.9269 431.574 17.3921 431.574 16.7188C431.574 16.0455 430.924 15.5107 430.107 15.5107C429.289 15.5107 428.639 16.0653 428.639 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 16.7188C423.658 17.3921 424.308 17.9269 425.126 17.9269C425.943 17.9269 426.593 17.3921 426.593 16.7188C426.593 16.0455 425.943 15.5107 425.126 15.5107C424.308 15.5107 423.658 16.0653 423.658 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 16.7188C418.677 17.3921 419.327 17.9269 420.145 17.9269C420.962 17.9269 421.612 17.3921 421.612 16.7188C421.612 16.0455 420.962 15.5107 420.145 15.5107C419.351 15.5107 418.677 16.0653 418.677 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 16.7188C413.696 17.3921 414.345 17.9269 415.163 17.9269C415.981 17.9269 416.63 17.3921 416.63 16.7188C416.63 16.0455 415.981 15.5107 415.163 15.5107C414.345 15.5107 413.696 16.0653 413.696 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 16.7188C408.715 17.3921 409.364 17.9269 410.182 17.9269C411 17.9269 411.65 17.3921 411.65 16.7188C411.65 16.0455 411 15.5107 410.182 15.5107C409.364 15.5107 408.715 16.0653 408.715 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 16.7188C403.734 17.3921 404.383 17.9269 405.201 17.9269C406.019 17.9269 406.668 17.3921 406.668 16.7188C406.668 16.0455 406.019 15.5107 405.201 15.5107C404.383 15.5107 403.734 16.0653 403.734 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M398.752 16.7188C398.752 17.3921 399.402 17.9269 400.22 17.9269C401.038 17.9269 401.687 17.3921 401.687 16.7188C401.687 16.0455 401.038 15.5107 400.22 15.5107C399.402 15.5107 398.752 16.0653 398.752 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 16.7188C393.747 17.3921 394.397 17.9269 395.215 17.9269C396.033 17.9269 396.682 17.3921 396.682 16.7188C396.682 16.0455 396.033 15.5107 395.215 15.5107C394.421 15.5107 393.747 16.0653 393.747 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 16.7188C388.767 17.3921 389.416 17.9269 390.234 17.9269C391.052 17.9269 391.701 17.3921 391.701 16.7188C391.701 16.0455 391.052 15.5107 390.234 15.5107C389.416 15.5107 388.767 16.0653 388.767 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 16.7188C383.785 17.3921 384.435 17.9269 385.253 17.9269C386.071 17.9269 386.72 17.3921 386.72 16.7188C386.72 16.0455 386.071 15.5107 385.253 15.5107C384.435 15.5107 383.785 16.0653 383.785 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M378.804 16.7188C378.804 17.3921 379.454 17.9269 380.271 17.9269C381.089 17.9269 381.739 17.3921 381.739 16.7188C381.739 16.0455 381.089 15.5107 380.271 15.5107C379.478 15.5107 378.804 16.0653 378.804 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M373.823 16.7188C373.823 17.3921 374.472 17.9269 375.29 17.9269C376.108 17.9269 376.757 17.3921 376.757 16.7188C376.757 16.0455 376.108 15.5107 375.29 15.5107C374.472 15.5107 373.823 16.0653 373.823 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 16.7188C368.842 17.3921 369.491 17.9269 370.309 17.9269C371.127 17.9269 371.777 17.3921 371.777 16.7188C371.777 16.0455 371.127 15.5107 370.309 15.5107C369.491 15.5107 368.842 16.0653 368.842 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 16.7188C363.861 17.3921 364.51 17.9269 365.328 17.9269C366.146 17.9269 366.795 17.3921 366.795 16.7188C366.795 16.0455 366.146 15.5107 365.328 15.5107C364.51 15.5107 363.861 16.0653 363.861 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 16.7188C358.88 17.3921 359.529 17.9269 360.347 17.9269C361.165 17.9269 361.814 17.3921 361.814 16.7188C361.814 16.0455 361.165 15.5107 360.347 15.5107C359.529 15.5107 358.88 16.0653 358.88 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 16.7188C353.875 17.3921 354.524 17.9269 355.342 17.9269C356.16 17.9269 356.809 17.3921 356.809 16.7188C356.809 16.0455 356.16 15.5107 355.342 15.5107C354.548 15.5107 353.875 16.0653 353.875 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 16.7188C348.894 17.3921 349.543 17.9269 350.361 17.9269C351.179 17.9269 351.828 17.3921 351.828 16.7188C351.828 16.0455 351.179 15.5107 350.361 15.5107C349.543 15.5107 348.894 16.0653 348.894 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 16.7188C343.912 17.3921 344.562 17.9269 345.38 17.9269C346.198 17.9269 346.847 17.3921 346.847 16.7188C346.847 16.0455 346.198 15.5107 345.38 15.5107C344.562 15.5107 343.912 16.0653 343.912 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 16.7188C338.931 17.3921 339.581 17.9269 340.399 17.9269C341.217 17.9269 341.866 17.3921 341.866 16.7188C341.866 16.0455 341.217 15.5107 340.399 15.5107C339.581 15.5107 338.931 16.0653 338.931 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 16.7188C333.95 17.3921 334.6 17.9269 335.418 17.9269C336.235 17.9269 336.885 17.3921 336.885 16.7188C336.885 16.0455 336.235 15.5107 335.418 15.5107C334.6 15.5107 333.95 16.0653 333.95 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 16.7188C328.969 17.3921 329.618 17.9269 330.436 17.9269C331.254 17.9269 331.904 17.3921 331.904 16.7188C331.904 16.0455 331.254 15.5107 330.436 15.5107C329.618 15.5107 328.969 16.0653 328.969 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M323.988 16.7188C323.988 17.3921 324.638 17.9269 325.455 17.9269C326.273 17.9269 326.923 17.3921 326.923 16.7188C326.923 16.0455 326.273 15.5107 325.455 15.5107C324.638 15.5107 323.988 16.0653 323.988 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M319.007 16.7188C319.007 17.3921 319.656 17.9269 320.474 17.9269C321.292
317.9269 321.941 17.3921 321.941 16.7188C321.941 16.0455 321.292 15.5107 320.474 15.5107C319.656 15.5107 319.007 16.0653 319.007 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M314.002 16.7188C314.002 17.3921 314.651 17.9269 315.469 17.9269C316.287 17.9269 316.936 17.3921 316.936 16.7188C316.936 16.0455 316.287 15.5107 315.469 15.5107C314.675 15.5107 314.002 16.0653 314.002 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M309.021 16.7188C309.021 17.3921 309.67 17.9269 310.488 17.9269C311.306 17.9269 311.956 17.3921 311.956 16.7188C311.956 16.0455 311.306 15.5107 310.488 15.5107C309.67 15.5107 309.021 16.0653 309.021 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M219.313 16.7188C219.313 17.3921 219.962 17.9269 220.78 17.9269C221.598 17.9269 222.247 17.3921 222.247 16.7188C222.247 16.0455 221.598 15.5107 220.78 15.5107C219.986 15.5107 219.313 16.0653 219.313 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M214.332 16.7188C214.332 17.3921 214.981 17.9269 215.799 17.9269C216.617 17.9269 217.266 17.3921 217.266 16.7188C217.266 16.0455 216.617 15.5107 215.799 15.5107C214.981 15.5107 214.332 16.0653 214.332 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M209.35 16.7188C209.35 17.3921 210 17.9269 210.818 17.9269C211.635 17.9269 212.285 17.3921 212.285 16.7188C212.285 16.0455 211.635 15.5107 210.818 15.5107C210 15.5107 209.35 16.0653 209.35 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 16.7188C169.478 17.3921 170.127 17.9269 170.945 17.9269C171.763 17.9269 172.412 17.3921 172.412 16.7188C172.412 16.0455 171.763 15.5107 170.945 15.5107C170.127 15.5107 169.478 16.0653 169.478 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 16.7188C164.496 17.3921 165.146 17.9269 165.964 17.9269C166.781 17.9269 167.431 17.3921 167.431 16.7188C167.431 16.0455 166.781 15.5107 165.964 15.5107C165.146 15.5107 164.496 16.0653 164.496 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 16.7188C159.515 17.3921 160.165 17.9269 160.982 17.9269C161.8 17.9269 162.45 17.3921 162.45 16.7188C162.45 16.0455 161.8 15.5107 160.982 15.5107C160.165 15.5107 159.515 16.0653 159.515 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M154.51 16.7188C154.51 17.3921 155.16 17.9269 155.978 17.9269C156.796 17.9269 157.445 17.3921 157.445 16.7188C157.445 16.0455 156.796 15.5107 155.978 15.5107C155.184 15.5107 154.51 16.0653 154.51 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M129.605 16.7188C129.605 17.3921 130.254 17.9269 131.072 17.9269C131.89 17.9269 132.539 17.3921 132.539 16.7188C132.539 16.0455 131.89 15.5107 131.072 15.5107C130.254 15.5107 129.605 16.0653 129.605 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 16.7188C124.624 17.3921 125.273 17.9269 126.091 17.9269C126.909 17.9269 127.558 17.3921 127.558 16.7188C127.558 16.0455 126.909 15.5107 126.091 15.5107C125.273 15.5107 124.624 16.0653 124.624 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M119.642 16.7188C119.642 17.3921 120.292 17.9269 121.11 17.9269C121.928 17.9269 122.577 17.3921 122.577 16.7188C122.577 16.0455 121.928 15.5107 121.11 15.5107C120.292 15.5107 119.642 16.0653 119.642 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M114.637 16.7188C114.637 17.3921 115.287 17.9269 116.105 17.9269C116.923 17.9269 117.572 17.3921 117.572 16.7188C117.572 16.0455 116.923 15.5107 116.105 15.5107C115.311 15.5107 114.637 16.0653 114.637 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 16.7188C109.656 17.3921 110.305 17.9269 111.123 17.9269C111.941 17.9269 112.591 17.3921 112.591 16.7188C112.591 16.0455 111.941 15.5107 111.123 15.5107C110.33 15.5107 109.656 16.0653 109.656 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 16.7188C104.675 17.3921 105.325 17.9269 106.142 17.9269C106.96 17.9269 107.61 17.3921 107.61 16.7188C107.61 16.0455 106.96 15.5107 106.142 15.5107C105.349 15.5107 104.675 16.0653 104.675 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 16.7188C99.694 17.3921 100.343 17.9269 101.161 17.9269C101.979
317.9269 102.629 17.3921 102.629 16.7188C102.629 16.0455 101.979 15.5107 101.161 15.5107C100.367 15.5107 99.694 16.0653 99.694 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 16.7188C94.7131 17.3921 95.3626 17.9269 96.1805 17.9269C96.9983 17.9269 97.6478 17.3921 97.6478 16.7188C97.6478 16.0455 96.9983 15.5107 96.1805 15.5107C95.3626 15.5107 94.7131 16.0653 94.7131 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 16.7188C89.7318 17.3921 90.3813 17.9269 91.1991 17.9269C92.017 17.9269 92.6665 17.3921 92.6665 16.7188C92.6665 16.0455 92.017 15.5107 91.1991 15.5107C90.3813 15.5107 89.7318 16.0653 89.7318 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 16.7188C84.7507 17.3921 85.4002 17.9269 86.2181 17.9269C87.0359 17.9269 87.6854 17.3921 87.6854 16.7188C87.6854 16.0455 87.0359 15.5107 86.2181 15.5107C85.4002 15.5107 84.7507 16.0653 84.7507 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M79.7697 16.7188C79.7697 17.3921 80.4191 17.9269 81.237 17.9269C82.0548 17.9269 82.7043 17.3921 82.7043 16.7188C82.7043 16.0455 82.0548 15.5107 81.237 15.5107C80.4191 15.5107 79.7697 16.0653 79.7697 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 16.7188C74.7645 17.3921 75.414 17.9269 76.2319 17.9269C77.0497 17.9269 77.6992 17.3921 77.6992 16.7188C77.6992 16.0455 77.0497 15.5107 76.2319 15.5107C75.4381 15.5107 74.7645 16.0653 74.7645 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 16.7188C69.7836 17.3921 70.433 17.9269 71.2509 17.9269C72.0688 17.9269 72.7182 17.3921 72.7182 16.7188C72.7182 16.0455 72.0688 15.5107 71.2509 15.5107C70.4571 15.5107 69.7836 16.0653 69.7836 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M64.8024 16.7188C64.8024 17.3921 65.4518 17.9269 66.2697 17.9269C67.0876 17.9269 67.737 17.3921 67.737 16.7188C67.737 16.0455 67.0876 15.5107 66.2697 15.5107C65.4759 15.5107 64.8024 16.0653 64.8024 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M59.8212 16.7188C59.8212 17.3921 60.4706 17.9269 61.2885 17.9269C62.1063 17.9269 62.7558 17.3921 62.7558 16.7188C62.7558 16.0455 62.1063 15.5107 61.2885 15.5107C60.4706 15.5107 59.8212 16.0653 59.8212 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M54.8397 16.7188C54.8397 17.3921 55.4892 17.9269 56.307 17.9269C57.1249 17.9269 57.7744 17.3921 57.7744 16.7188C57.7744 16.0455 57.1249 15.5107 56.307 15.5107C55.4892 15.5107 54.8397 16.0653 54.8397 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M49.8588 16.7188C49.8588 17.3921 50.5082 17.9269 51.3261 17.9269C52.1439 17.9269 52.7934 17.3921 52.7934 16.7188C52.7934 16.0455 52.1439 15.5107 51.3261 15.5107C50.5082 15.5107 49.8588 16.0653 49.8588 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M44.8777 16.7188C44.8777 17.3921 45.5272 17.9269 46.345 17.9269C47.1629 17.9269 47.8123 17.3921 47.8123 16.7188C47.8123 16.0455 47.1629 15.5107 46.345 15.5107C45.5272 15.5107 44.8777 16.0653 44.8777 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M39.8728 16.7188C39.8728 17.3921 40.5223 17.9269 41.3401 17.9269C42.158 17.9269 42.8075 17.3921 42.8075 16.7188C42.8075 16.0455 42.158 15.5107 41.3401 15.5107C40.5463 15.5107 39.8728 16.0653 39.8728 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M34.8916 16.7188C34.8916 17.3921 35.5411 17.9269 36.3589 17.9269C37.1768 17.9269 37.8263 17.3921 37.8263 16.7188C37.8263 16.0455 37.1768 15.5107 36.3589 15.5107C35.5651 15.5107 34.8916 16.0653 34.8916 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M29.9105 16.7188C29.9105 17.3921 30.56 17.9269 31.3778 17.9269C32.1957 17.9269 32.8452 17.3921 32.8452 16.7188C32.8452 16.0455 32.1957 15.5107 31.3778 15.5107C30.584 15.5107 29.9105 16.0653 29.9105 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M24.9294 16.7188C24.9294 17.3921 25.5789 17.9269 26.3968 17.9269C27.2146 17.9269 27.8641 17.3921 27.8641 16.7188C27.8641 16.0455 27.2146 15.5107 26.3968 15.5107C25.603 15.5107 24.9294 16.0653 24.9294 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M19.9481 16.7188C19.9481 17.3921 20.5976 17.9269 21.4154 17.9269C22.2333 17.9269 22.8828 17.3921 22.8828 16.7188C22.8828 16.0455 22.2333 15.5107 21.4154 15.5107C20.5976 15.5107 19.9481 16.0653 19.9481 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M14.9672 16.7188C14.9672 17.3921 15.6166 17.9269 16.4345 17.9269C17.2523 17.9269 17.9018 17.3921 17.9018 16.7188C17.9018 16.0455 17.2523 15.5107 16.4345 15.5107C15.6166 15.5107 14.9672 16.0653 14.9672 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M9.98621 16.7188C9.98621 17.3921 10.6357 17.9269 11.4535 17.9269C12.2714 17.9269 12.9209 17.3921 12.9209 16.7188C12.9209 16.0455 12.2714 15.5107 11.4535 15.5107C10.6357 15.5107 9.98621 16.0653 9.98621 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M5.00513 16.7188C5.00513 17.3921 5.6546 17.9269 6.47246 17.9269C7.29031 17.9269 7.93978 17.3921 7.93978 16.7188C7.93978 16.0455 7.29031 15.5107 6.47246 15.5107C5.6546 15.5107 5.00513 16.0653 5.00513 16.7188Z",fill:"#5840D2"}),a.createElement("path",{d:"M613.06 12.1312C613.06 12.8046 613.71 13.3393 614.528 13.3393C615.346 13.3393 615.995 12.8046 615.995 12.1312C615.995 11.4579 615.346 10.9232 614.528 10.9232C613.71 10.9232 613.06 11.4579 613.06 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M608.079 12.1312C608.079 12.8046 608.729 13.3393 609.547 13.3393C610.364 13.3393 611.014 12.8046 611.014 12.1312C611.014 11.4579 610.364 10.9232 609.547 10.9232C608.729 10.9232 608.079 11.4579 608.079 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M604.565 13.3393C605.376 13.3393 606.033 12.7984 606.033 12.1312C606.033 11.464 605.376 10.9232 604.565 10.9232C603.755 10.9232 603.098 11.464 603.098 12.1312C603.098 12.7984 603.755 13.3393 604.565 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M599.584 13.3393C600.395 13.3393 601.052 12.7984 601.052 12.1312C601.052 11.464 600.395 10.9232 599.584 10.9232C598.774 10.9232 598.117 11.464 598.117 12.1312C598.117 12.7984 598.774 13.3393 599.584 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M593.135 12.1312C593.135 12.8046 593.785 13.3393 594.603 13.3393C595.421 13.3393 596.07 12.8046 596.07 12.1312C596.07 11.4579 595.421 10.9232 594.603 10.9232C593.785 10.9232 593.135 11.4579 593.135 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M588.131 12.1312C588.131 12.8046 588.78 13.3393 589.598 13.3393C590.416 13.3393 591.066 12.8046 591.066 12.1312C591.066 11.4579 590.416 10.9232 589.598 10.9232C588.78 10.9232 588.131 11.4579 588.131 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M584.641 13.3393C585.451 13.3393 586.108 12.7984 586.108 12.1312C586.108 11.464 585.451 10.9232 584.641 10.9232C583.83 10.9232 583.173 11.464 583.173 12.1312C583.173 12.7984 583.83 13.3393 584.641 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M579.66 13.3393C580.47 13.3393 581.127 12.7984 581.127 12.1312C581.127 11.464 580.47 10.9232 579.66 10.9232C578.849 10.9232 578.192 11.464 578.192 12.1312C578.192 12.7984 578.849 13.3393 579.66 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M573.187 12.1312C573.187 12.8046 573.837 13.3393 574.655 13.3393C575.473 13.3393 576.122 12.8046 576.122 12.1312C576.122 11.4579 575.473 10.9232 574.655 10.9232C573.837 10.9232 573.187 11.4579 573.187 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M568.206 12.1312C568.206 12.8046 568.856 13.3393 569.674 13.3393C570.491 13.3393 571.141 12.8046 571.141 12.1312C571.141 11.4579 570.491 10.9232 569.674 10.9232C568.856 10.9232 568.206 11.4579 568.206 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M564.693 13.3393C565.503 13.3393 566.16 12.7984 566.16 12.1312C566.16 11.464 565.503 10.9232 564.693 10.9232C563.882 10.9232 563.225 11.464 563.225 12.1312C563.225 12.7984 563.882 13.3393 564.693 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M558.244 12.1312C558.244 12.8046 558.893 13.3393 559.711 13.3393C560.529 13.3393 561.178 12.8046 561.178 12.1312C561.178 11.4579 560.529 10.9232 559.711 10.9232C558.893 10.9232 558.244 11.4579 558.244 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 12.1312C553.263 12.8046 553.913 13.3393 554.73 13.3393C555.548 13.3393 556.198 12.8046 556.198 12.1312C556.198 11.4579 555.548 10.9232 554.73 10.9232C553.913 10.9232 553.263 11.4579 553.263 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M549.749 13.3393C550.56 13.3393 551.217 12.7984 551.217 12.1312C551.217 11.464 550.56 10.9232 549.749 10.9232C548.939 10.9232 548.282 11.464 548.282 12.1312C548.282 12.7984 548.939 13.3393 549.749 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 13.3393C545.578 13.3393 546.235 12.7984 546.235 12.1312C546.235 11.464 545.578 10.9232 544.768 10.9232C543.958 10.9232 543.301 11.464 543.301 12.1312C543.301 12.7984 543.958 13.3393 544.768 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 12.1312C538.296 12.8046 538.945 13.3393 539.763 13.3393C540.581 13.3393 541.23 12.8046 541.23 12.1312C541.23 11.4579 540.581 10.9232 539.763 10.9232C538.945 10.9232 538.296 11.4579 538.296 12.1312Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M533.314 12.1312C533.314 12.8046 533.964 13.3393 534.782 13.3393C535.6 13.3393 536.249 12.8046 536.249 12.1312C536.249 11.4579 535.6 10.9232 534.782 10.9232C533.964 10.9232 533.314 11.4579 533.314 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 13.3393C530.611 13.3393 531.268 12.7984 531.268 12.1312C531.268 11.464 530.611 10.9232 529.801 10.9232C528.99 10.9232 528.333 11.464 528.333 12.1312C528.333 12.7984 528.99 13.3393 529.801 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 13.3393C525.63 13.3393 526.287 12.7984 526.287 12.1312C526.287 11.464 525.63 10.9232 524.82 10.9232C524.009 10.9232 523.352 11.464 523.352 12.1312C523.352 12.7984 524.009 13.3393 524.82 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 12.1312C518.371 12.8046 519.021 13.3393 519.839 13.3393C520.657 13.3393 521.306 12.8046 521.306 12.1312C521.306 11.4579 520.657 10.9232 519.839 10.9232C519.021 10.9232 518.371 11.4579 518.371 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 12.1312C513.39 12.8046 514.039 13.3393 514.857 13.3393C515.675 13.3393 516.325 12.8046 516.325 12.1312C516.325 11.4579 515.675 10.9232 514.857 10.9232C514.039 10.9232 513.39 11.4579 513.39 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 13.3393C510.687 13.3393 511.344 12.7984 511.344 12.1312C511.344 11.464 510.687 10.9232 509.876 10.9232C509.066 10.9232 508.409 11.464 508.409 12.1312C508.409 12.7984 509.066 13.3393 509.876 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 13.3393C505.705 13.3393 506.362 12.7984 506.362 12.1312C506.362 11.464 505.705 10.9232 504.895 10.9232C504.085 10.9232 503.428 11.464 503.428 12.1312C503.428 12.7984 504.085 13.3393 504.895 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 12.1312C498.423 12.8046 499.072 13.3393 499.89 13.3393C500.708 13.3393 501.358 12.8046 501.358 12.1312C501.358 11.4579 500.708 10.9232 499.89 10.9232C499.072 10.9232 498.423 11.4579 498.423 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 12.1312C493.442 12.8046 494.091 13.3393 494.909 13.3393C495.727 13.3393 496.376 12.8046 496.376 12.1312C496.376 11.4579 495.727 10.9232 494.909 10.9232C494.115 10.9232 493.442 11.4579 493.442 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M489.928 13.3393C490.738 13.3393 491.395 12.7984 491.395 12.1312C491.395 11.464 490.738 10.9232 489.928 10.9232C489.117 10.9232 488.46 11.464 488.46 12.1312C488.46 12.7984 489.117 13.3393 489.928 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 12.1312C483.479 12.8046 484.129 13.3393 484.947 13.3393C485.764 13.3393 486.414 12.8046 486.414 12.1312C486.414 11.4579 485.764 10.9232 484.947 10.9232C484.129 10.9232 483.479 11.4579 483.479 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 12.1312C478.498 12.8046 479.148 13.3393 479.965 13.3393C480.783 13.3393 481.433 12.8046 481.433 12.1312C481.433 11.4579 480.783 10.9232 479.965 10.9232C479.148 10.9232 478.498 11.4579 478.498 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 13.3393C475.795 13.3393 476.452 12.7984 476.452 12.1312C476.452 11.464 475.795 10.9232 474.984 10.9232C474.174 10.9232 473.517 11.464 473.517 12.1312C473.517 12.7984 474.174 13.3393 474.984 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 13.3393C470.814 13.3393 471.471 12.7984 471.471 12.1312C471.471 11.464 470.814 10.9232 470.003 10.9232C469.193 10.9232 468.536 11.464 468.536 12.1312C468.536 12.7984 469.193 13.3393 470.003 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 12.1312C463.531 12.8046 464.181 13.3393 464.998 13.3393C465.816 13.3393 466.466 12.8046 466.466 12.1312C466.466 11.4579 465.816 10.9232 464.998 10.9232C464.205 10.9232 463.531 11.4579 463.531 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 12.1312C458.55 12.8046 459.199 13.3393 460.017 13.3393C460.835 13.3393 461.484 12.8046 461.484 12.1312C461.484 11.4579 460.835 10.9232 460.017 10.9232C459.199 10.9232 458.55 11.4579 458.55 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 13.3393C455.847 13.3393 456.504 12.7984 456.504 12.1312C456.504 11.464 455.847 10.9232 455.036 10.9232C454.226 10.9232 453.569 11.464 453.569 12.1312C453.569 12.7984 454.226 13.3393 455.036 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 13.3393C450.865 13.3393 451.522 12.7984 451.522 12.1312C451.522 11.464 450.865 10.9232 450.055 10.9232C449.244 10.9232 448.587 11.464 448.587 12.1312C448.587 12.7984 449.244 13.3393 450.055 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 12.1312C443.606 12.8046 444.256 13.3393 445.074 13.3393C445.892 13.3393 446.541 12.8046 446.541 12.1312C446.541 11.4579 445.892 10.9232 445.074 10.9232C444.256 10.9232 443.606 11.4579 443.606 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 12.1312C438.625 12.8046 439.275 13.3393 440.093 13.3393C440.911 13.3393 441.56 12.8046 441.56 12.1312C441.56 11.4579 440.911 10.9232 440.093 10.9232C439.275 10.9232 438.625 11.4579 438.625 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 13.3393C435.922 13.3393 436.579 12.7984 436.579 12.1312C436.579 11.464 435.922 10.9232 435.111 10.9232C434.301 10.9232 433.644 11.464 433.644 12.1312C433.644 12.7984 434.301 13.3393 435.111 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 13.3393C430.941 13.3393 431.598 12.7984 431.598 12.1312C431.598 11.464 430.941 10.9232 430.131 10.9232C429.32 10.9232 428.663 11.464 428.663 12.1312C428.663 12.7984 429.32 13.3393 430.131 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 12.1312C423.658 12.8046 424.308 13.3393 425.126 13.3393C425.943 13.3393 426.593 12.8046 426.593 12.1312C426.593 11.4579 425.943 10.9232 425.126 10.9232C424.308 10.9232 423.658 11.4579 423.658 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 12.1312C418.677 12.8046 419.327 13.3393 420.145 13.3393C420.962 13.3393 421.612 12.8046 421.612 12.1312C421.612 11.4579 420.962 10.9232 420.145 10.9232C419.351 10.9232 418.677 11.4579 418.677 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 13.3393C415.974 13.3393 416.63 12.7984 416.63 12.1312C416.63 11.464 415.974 10.9232 415.163 10.9232C414.353 10.9232 413.696 11.464 413.696 12.1312C413.696 12.7984 414.353 13.3393 415.163 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 12.1312C408.715 12.8046 409.364 13.3393 410.182 13.3393C411 13.3393 411.65 12.8046 411.65 12.1312C411.65 11.4579 411 10.9232 410.182 10.9232C409.364 10.9232 408.715 11.4579 408.715 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 12.1312C403.734 12.8046 404.383 13.3393 405.201 13.3393C406.019 13.3393 406.668 12.8046 406.668 12.1312C406.668 11.4579 406.019 10.9232 405.201 10.9232C404.383 10.9232 403.734 11.4579 403.734 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 13.3393C401.03 13.3393 401.687 12.7984 401.687 12.1312C401.687 11.464 401.03 10.9232 400.22 10.9232C399.409 10.9232 398.752 11.464 398.752 12.1312C398.752 12.7984 399.409 13.3393 400.22 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 13.3393C396.049 13.3393 396.706 12.7984 396.706 12.1312C396.706 11.464 396.049 10.9232 395.239 10.9232C394.428 10.9232 393.771 11.464 393.771 12.1312C393.771 12.7984 394.428 13.3393 395.239 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 12.1312C388.767 12.8046 389.416 13.3393 390.234 13.3393C391.052 13.3393 391.701 12.8046 391.701 12.1312C391.701 11.4579 391.052 10.9232 390.234 10.9232C389.416 10.9232 388.767 11.4579 388.767 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 12.1312C383.785 12.8046 384.435 13.3393 385.253 13.3393C386.071 13.3393 386.72 12.8046 386.72 12.1312C386.72 11.4579 386.071 10.9232 385.253 10.9232C384.435 10.9232 383.785 11.4579 383.785 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 13.3393C381.105 13.3393 381.762 12.7984 381.762 12.1312C381.762 11.464 381.105 10.9232 380.295 10.9232C379.485 10.9232 378.828 11.464 378.828 12.1312C378.828 12.7984 379.485 13.3393 380.295 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M375.29 13.3393C376.1 13.3393 376.757 12.7984 376.757 12.1312C376.757 11.464 376.1 10.9232 375.29 10.9232C374.48 10.9232 373.823 11.464 373.823 12.1312C373.823 12.7984 374.48 13.3393 375.29 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 12.1312C368.842 12.8046 369.491 13.3393 370.309 13.3393C371.127 13.3393 371.777 12.8046 371.777 12.1312C371.777 11.4579 371.127 10.9232 370.309 10.9232C369.491 10.9232 368.842 11.4579 368.842 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 12.1312C363.861 12.8046 364.51 13.3393 365.328 13.3393C366.146 13.3393 366.795 12.8046 366.795 12.1312C366.795 11.4579 366.146 10.9232 365.328 10.9232C364.51 10.9232 363.861 11.4579 363.861 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 13.3393C361.157 13.3393 361.814 12.7984 361.814 12.1312C361.814 11.464 361.157 10.9232 360.347 10.9232C359.537 10.9232 358.88 11.464 358.88 12.1312C358.88 12.7984 359.537 13.3393 360.347 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 13.3393C356.176 13.3393 356.833 12.7984 356.833 12.1312C356.833 11.464 356.176 10.9232 355.366 10.9232C354.555 10.9232 353.899 11.464 353.899 12.1312C353.899 12.7984 354.555 13.3393 355.366 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 12.1312C348.894 12.8046 349.543 13.3393 350.361 13.3393C351.179 13.3393 351.828 12.8046 351.828 12.1312C351.828 11.4579 351.179 10.9232 350.361 10.9232C349.543 10.9232 348.894 11.4579 348.894 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 13.3393C346.214 13.3393 346.871 12.7984 346.871 12.1312C346.871 11.464 346.214 10.9232 345.404 10.9232C344.593 10.9232 343.937 11.464 343.937 12.1312C343.937 12.7984 344.593 13.3393 345.404 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 12.1312C333.95 12.8046 334.6 13.3393 335.418 13.3393C336.235 13.3393 336.885 12.8046 336.885 12.1312C336.885 11.4579 336.235 10.9232 335.418 10.9232C334.6 10.9232 333.95 11.4579 333.95 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 12.1312C328.969 12.8046 329.618 13.3393 330.436 13.3393C331.254 13.3393 331.904 12.8
3046 331.904 12.1312C331.904 11.4579 331.254 10.9232 330.436 10.9232C329.618 10.9232 328.969 11.4579 328.969 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 13.3393C326.266 13.3393 326.923 12.7984 326.923 12.1312C326.923 11.464 326.266 10.9232 325.455 10.9232C324.645 10.9232 323.988 11.464 323.988 12.1312C323.988 12.7984 324.645 13.3393 325.455 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M320.474 13.3393C321.284 13.3393 321.941 12.7984 321.941 12.1312C321.941 11.464 321.284 10.9232 320.474 10.9232C319.664 10.9232 319.007 11.464 319.007 12.1312C319.007 12.7984 319.664 13.3393 320.474 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M270.639 13.3393C271.449 13.3393 272.106 12.7984 272.106 12.1312C272.106 11.464 271.449 10.9232 270.639 10.9232C269.829 10.9232 269.172 11.464 269.172 12.1312C269.172 12.7984 269.829 13.3393 270.639 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M265.658 13.3393C266.468 13.3393 267.125 12.7984 267.125 12.1312C267.125 11.464 266.468 10.9232 265.658 10.9232C264.848 10.9232 264.191 11.464 264.191 12.1312C264.191 12.7984 264.848 13.3393 265.658 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M259.186 12.1312C259.186 12.8046 259.835 13.3393 260.653 13.3393C261.471 13.3393 262.12 12.8046 262.12 12.1312C262.12 11.4579 261.471 10.9232 260.653 10.9232C259.859 10.9232 259.186 11.4579 259.186 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M225.785 13.3393C226.595 13.3393 227.252 12.7984 227.252 12.1312C227.252 11.464 226.595 10.9232 225.785 10.9232C224.975 10.9232 224.318 11.464 224.318 12.1312C224.318 12.7984 224.975 13.3393 225.785 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M219.313 12.1312C219.313 12.8046 219.962 13.3393 220.78 13.3393C221.598 13.3393 222.247 12.8046 222.247 12.1312C222.247 11.4579 221.598 10.9232 220.78 10.9232C219.986 10.9232 219.313 11.4579 219.313 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M214.332 12.1312C214.332 12.8046 214.981 13.3393 215.799 13.3393C216.617 13.3393 217.266 12.8046 217.266 12.1312C217.266 11.4579 216.617 10.9232 215.799 10.9232C214.981 10.9232 214.332 11.4579 214.332 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M210.818 13.3393C211.628 13.3393 212.285 12.7984 212.285 12.1312C212.285 11.464 211.628 10.9232 210.818 10.9232C210.007 10.9232 209.35 11.464 209.35 12.1312C209.35 12.7984 210.007 13.3393 210.818 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M204.37 12.1312C204.37 12.8046 205.019 13.3393 205.837 13.3393C206.655 13.3393 207.304 12.8046 207.304 12.1312C207.304 11.4579 206.655 10.9232 205.837 10.9232C205.019 10.9232 204.37 11.4579 204.37 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 13.3393C176.736 13.3393 177.393 12.7984 177.393 12.1312C177.393 11.464 176.736 10.9232 175.926 10.9232C175.116 10.9232 174.459 11.464 174.459 12.1312C174.459 12.7984 175.116 13.3393 175.926 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 13.3393C171.755 13.3393 172.412 12.7984 172.412 12.1312C172.412 11.464 171.755 10.9232 170.945 10.9232C170.134 10.9232 169.478 11.464 169.478 12.1312C169.478 12.7984 170.134 13.3393 170.945 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 12.1312C164.496 12.8046 165.146 13.3393 165.964 13.3393C166.781 13.3393 167.431 12.8046 167.431 12.1312C167.431 11.4579 166.781 10.9232 165.964 10.9232C165.146 10.9232 164.496 11.4579 164.496 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M159.515 12.1312C159.515 12.8046 160.165 13.3393 160.982 13.3393C161.8 13.3393 162.45 12.8046 162.45 12.1312C162.45 11.4579 161.8 10.9232 160.982 10.9232C160.165 10.9232 159.515 11.4579 159.515 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 13.3393C146.85 13.3393 147.507 12.7984 147.507 12.1312C147.507 11.464 146.85 10.9232 146.039 10.9232C145.229 10.9232 144.572 11.464 144.572 12.1312C144.572 12.7984 145.229 13.3393 146.039 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 13.3393C141.845 13.3393 142.502 12.7984 142.502 12.1312C142.502 11.464 141.845 10.9232 141.034 10.9232C140.224 10.9232 139.567 11.464 139.567 12.1312C139.567 12.7984 140.224 13.3393 141.034 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 13.3393C136.863 13.3393 137.52 12.7984 137.52 12.1312C137.52 11.464 136.863 10.9232 136.053 10.9232C135.243 10.9232 134.586 11.464 134.586 12.1312C134.586 12.7984 135.243 13.3393 136.053 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 13.3393C131.882 13.3393 132.539 12.7984 132.539 12.1312C132.539 11.464 131.882 10.9232 131.072 10.9232C130.262 10.9232 129.605 11.464 129.605 12.1312C129.605 12.7984 130.262 13.3393 131.072 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 13.3393C126.901 13.3393 127.558 12.7984 127.558 12.1312C127.558 11.464 126.901 10.9232 126.091 10.9232C125.281 10.9232 124.624 11.464 124.624 12.1312C124.624 12.7984 125.281 13.3393 126.091 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 13.3393C121.92 13.3393 122.577 12.7984 122.577 12.1312C122.577 11.464 121.92 10.9232 121.11 10.9232C120.299 10.9232 119.642 11.464 119.642 12.1312C119.642 12.7984 120.299 13.3393 121.11 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 13.3393C116.939 13.3393 117.596 12.7984 117.596 12.1312C117.596 11.464 116.939 10.9232 116.129 10.9232C115.318 10.9232 114.661 11.464 114.661 12.1312C114.661 12.7984 115.318 13.3393 116.129 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 12.1312C109.656 12.8046 110.305 13.3393 111.123 13.3393C111.941 13.3393 112.591 12.8046 112.591 12.1312C112.591 11.4579 111.941 10.9232 111.123 10.9232C110.33 10.9232 109.656 11.4579 109.656 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 13.3393C106.977 13.3393 107.634 12.7984 107.634 12.1312C107.634 11.464 106.977 10.9232 106.166 10.9232C105.356 10.9232 104.699 11.464 104.699 12.1312C104.699 12.7984 105.356 13.3393 106.166 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 13.3393C101.972 13.3393 102.629 12.7984 102.629 12.1312C102.629 11.464 101.972 10.9232 101.161 10.9232C100.351 10.9232 99.694 11.464 99.694 12.1312C99.694 12.7984 100.351 13.3393 101.161 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 13.3393C96.9909 13.3393 97.6478 12.7984 97.6478 12.1312C97.6478 11.464 96.9909 10.9232 96.1805 10.9232C95.3701 10.9232 94.7131 11.464 94.7131 12.1312C94.7131 12.7984 95.3701 13.3393 96.1805 13.3393Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M89.7318 12.1312C89.7318 12.8046 90.3813 13.3393 91.1991 13.3393C92.017 13.3393 92.6665 12.8046 92.6665 12.1312C92.6665 11.4579 92.017 10.9232 91.1991 10.9232C90.3813 10.9232 89.7318 11.4579 89.7318 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 12.1312C84.7507 12.8046 85.4002 13.3393 86.2181 13.3393C87.0359 13.3393 87.6854 12.8046 87.6854 12.1312C87.6854 11.4579 87.0359 10.9232 86.2181 10.9232C85.4002 10.9232 84.7507 11.4579 84.7507 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 13.3393C82.0474 13.3393 82.7043 12.7984 82.7043 12.1312C82.7043 11.464 82.0474 10.9232 81.237 10.9232C80.4266 10.9232 79.7697 11.464 79.7697 12.1312C79.7697 12.7984 80.4266 13.3393 81.237 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 12.1312C74.7645 12.8046 75.414 13.3393 76.2319 13.3393C77.0497 13.3393 77.6992 12.8046 77.6992 12.1312C77.6992 11.4579 77.0497 10.9232 76.2319 10.9232C75.4381 10.9232 74.7645 11.4579 74.7645 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 12.1312C69.7836 12.8046 70.433 13.3393 71.2509 13.3393C72.0688 13.3393 72.7182 12.8046 72.7182 12.1312C72.7182 11.4579 72.0688 10.9232 71.2509 10.9232C70.4571 10.9232 69.7836 11.4579 69.7836 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M66.2934 13.3393C67.1038 13.3393 67.7607 12.7984 67.7607 12.1312C67.7607 11.464 67.1038 10.9232 66.2934 10.9232C65.483 10.9232 64.826 11.464 64.826 12.1312C64.826 12.7984 65.483 13.3393 66.2934 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M61.2885 13.3393C62.0989 13.3393 62.7558 12.7984 62.7558 12.1312C62.7558 11.464 62.0989 10.9232 61.2885 10.9232C60.4781 10.9232 59.8212 11.464 59.8212 12.1312C59.8212 12.7984 60.4781 13.3393 61.2885 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M54.8397 12.1312C54.8397 12.8046 55.4892 13.3393 56.307 13.3393C57.1249 13.3393 57.7744 12.8046 57.7744 12.1312C57.7744 11.4579 57.1249 10.9232 56.307 10.9232C55.4892 10.9232 54.8397 11.4579 54.8397 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M49.8588 12.1312C49.8588 12.8046 50.5082 13.3393 51.3261 13.3393C52.1439 13.3393 52.7934 12.8046 52.7934 12.1312C52.7934 11.4579 52.1439 10.9232 51.3261 10.9232C50.5082 10.9232 49.8588 11.4579 49.8588 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M46.345 13.3393C47.1554 13.3393 47.8123 12.7984 47.8123 12.1312C47.8123 11.464 47.1554 10.9232 46.345 10.9232C45.5346 10.9232 44.8777 11.464 44.8777 12.1312C44.8777 12.7984 45.5346 13.3393 46.345 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M41.3638 13.3393C42.1742 13.3393 42.8311 12.7984 42.8311 12.1312C42.8311 11.464 42.1742 10.9232 41.3638 10.9232C40.5534 10.9232 39.8965 11.464 39.8965 12.1312C39.8965 12.7984 40.5534 13.3393 41.3638 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M34.8916 12.1312C34.8916 12.8046 35.5411 13.3393 36.3589 13.3393C37.1768 13.3393 37.8263 12.8046 37.8263 12.1312C37.8263 11.4579 37.1768 10.9232 36.3589 10.9232C35.5651 10.9232 34.8916 11.4579 34.8916 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M29.9105 12.1312C29.9105 12.8046 30.56 13.3393 31.3778 13.3393C32.1957 13.3393 32.8452 12.8046 32.8452 12.1312C32.8452 11.4579 32.1957 10.9232 31.3778 10.9232C30.584 10.9232 29.9105 11.4579 29.9105 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M26.4206 13.3393C27.231 13.3393 27.8879 12.7984 27.8879 12.1312C27.8879 11.464 27.231 10.9232 26.4206 10.9232C25.6102 10.9232 24.9532 11.464 24.9532 12.1312C24.9532 12.7984 25.6102 13.3393 26.4206 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M21.4154 13.3393C22.2258 13.3393 22.8828 12.7984 22.8828 12.1312C22.8828 11.464 22.2258 10.9232 21.4154 10.9232C20.6051 10.9232 19.9481 11.464 19.9481 12.1312C19.9481 12.7984 20.6051 13.3393 21.4154 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M14.9672 12.1312C14.9672 12.8046 15.6166 13.3393 16.4345 13.3393C17.2523 13.3393 17.9018 12.8046 17.9018 12.1312C17.9018 11.4579 17.2523 10.9232 16.4345 10.9232C15.6166 10.9232 14.9672 11.4579 14.9672 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M9.98621 12.1312C9.98621 12.8046 10.6357 13.3393 11.4535 13.3393C12.2714 13.3393 12.9209 12.8046 12.9209 12.1312C12.9209 11.4579 12.2714 10.9232 11.4535 10.9232C10.6357 10.9232 9.98621 11.4579 9.98621 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M6.47246 13.3393C7.28284 13.3393 7.93978 12.7984 7.93978 12.1312C7.93978 11.464 7.28284 10.9232 6.47246 10.9232C5.66207 10.9232 5.00513 11.464 5.00513 12.1312C5.00513 12.7984 5.66207 13.3393 6.47246 13.3393Z",fill:"#5840D2"}),a.createElement("path",{d:"M0 12.1312C0 12.8046 0.649474 13.3393 1.46733 13.3393C2.28518 13.3393 2.93465 12.8046 2.93465 12.1312C2.93465 11.4579 2.28518 10.9232 1.46733 10.9232C0.673529 10.9232 0 11.4579 0 12.1312Z",fill:"#5840D2"}),a.createElement("path",{d:"M619.533 8.75181C620.343 8.75181 621 8.21094 621 7.54375C621 6.87656 620.343 6.33569 619.533 6.33569C618.722 6.33569 618.065 6.87656 618.065 7.54375C618.065 8.21094 618.722 8.75181 619.533 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M613.06 7.54375C613.06 8.2171 613.71 8.75181 614.528 8.75181C615.346 8.75181 615.995 8.2171 615.995 7.54375C615.995 6.87041 615.346 6.33569 614.528 6.33569C613.71 6.33569 613.06 6.87041 613.06 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M608.079 7.54375C608.079 8.2171 608.729 8.75181 609.547 8.75181C610.364 8.75181 611.014 8.2171 611.014 7.54375C611.014 6.87041 610.364 6.33569 609.547 6.33569C608.729 6.33569 608.079 6.87041 608.079 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M604.565 8.75181C605.376 8.75181 606.033 8.21094 606.033 7.54375C606.033 6.87656 605.376 6.33569 604.565 6.33569C603.755 6.33569 603.098 6.87656 603.098 7.54375C603.098 8.21094 603.755 8.75181 604.565 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M599.584 8.75181C600.395 8.75181 601.052 8.21094 601.052 7.54375C601.052 6.87656 600.395 6.33569 599.584 6.33569C598.774 6.33569 598.117 6.87656 598.117 7.54375C598.117 8.21094 598.774 8.75181 599.584 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M593.135 7.54375C593.135 8.2171 593.785 8.75181 594.603 8.75181C595.421 8.75181 596.07 8.2171 596.07 7.54375C596.07 6.87041 595.421 6.33569 594.603 6.33569C593.785 6.33569 593.135 6.87041 593.135 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M588.131 7.54375C588.131 8.2171 588.78 8.75181 589.598 8.75181C590.416 8.75181 591.066 8.2171 591.066 7.54375C591.066 6.87041 590.416 6.33569 589.598 6.33569C588.78 6.33569 588.131 6.87041 588.131 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M584.641 8.75181C585.451 8.75181 586.108 8.21094 586.108 7.54375C586.108 6.87656 585.451 6.33569 584.641 6.33569C583.83 6.33569 583.173 6.87656 583.173 7.54375C583.173 8.21094 583.83 8.75181 584.641 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M579.66 8.75181C580.47 8.75181 581.127 8.21094 581.127 7.54375C581.127 6.876
356 580.47 6.33569 579.66 6.33569C578.849 6.33569 578.192 6.87656 578.192 7.54375C578.192 8.21094 578.849 8.75181 579.66 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M573.187 7.54375C573.187 8.2171 573.837 8.75181 574.655 8.75181C575.473 8.75181 576.122 8.2171 576.122 7.54375C576.122 6.87041 575.473 6.33569 574.655 6.33569C573.837 6.33569 573.187 6.87041 573.187 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M568.206 7.54375C568.206 8.2171 568.856 8.75181 569.674 8.75181C570.491 8.75181 571.141 8.2171 571.141 7.54375C571.141 6.87041 570.491 6.33569 569.674 6.33569C568.856 6.33569 568.206 6.87041 568.206 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M564.693 8.75181C565.503 8.75181 566.16 8.21094 566.16 7.54375C566.16 6.87656 565.503 6.33569 564.693 6.33569C563.882 6.33569 563.225 6.87656 563.225 7.54375C563.225 8.21094 563.882 8.75181 564.693 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M558.244 7.54375C558.244 8.2171 558.893 8.75181 559.711 8.75181C560.529 8.75181 561.178 8.2171 561.178 7.54375C561.178 6.87041 560.529 6.33569 559.711 6.33569C558.893 6.33569 558.244 6.87041 558.244 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 7.54375C553.263 8.2171 553.913 8.75181 554.73 8.75181C555.548 8.75181 556.198 8.2171 556.198 7.54375C556.198 6.87041 555.548 6.33569 554.73 6.33569C553.913 6.33569 553.263 6.87041 553.263 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M549.749 8.75181C550.56 8.75181 551.217 8.21094 551.217 7.54375C551.217 6.87656 550.56 6.33569 549.749 6.33569C548.939 6.33569 548.282 6.87656 548.282 7.54375C548.282 8.21094 548.939 8.75181 549.749 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M544.768 8.75181C545.578 8.75181 546.235 8.21094 546.235 7.54375C546.235 6.87656 545.578 6.33569 544.768 6.33569C543.958 6.33569 543.301 6.87656 543.301 7.54375C543.301 8.21094 543.958 8.75181 544.768 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 7.54375C538.296 8.2171 538.945 8.75181 539.763 8.75181C540.581 8.75181 541.23 8.2171 541.23 7.54375C541.23 6.87041 540.581 6.33569 539.763 6.33569C538.945 6.33569 538.296 6.87041 538.296 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 7.54375C533.314 8.2171 533.964 8.75181 534.782 8.75181C535.6 8.75181 536.249 8.2171 536.249 7.54375C536.249 6.87041 535.6 6.33569 534.782 6.33569C533.964 6.33569 533.314 6.87041 533.314 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M529.801 8.75181C530.611 8.75181 531.268 8.21094 531.268 7.54375C531.268 6.87656 530.611 6.33569 529.801 6.33569C528.99 6.33569 528.333 6.87656 528.333 7.54375C528.333 8.21094 528.99 8.75181 529.801 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M524.82 8.75181C525.63 8.75181 526.287 8.21094 526.287 7.54375C526.287 6.87656 525.63 6.33569 524.82 6.33569C524.009 6.33569 523.352 6.87656 523.352 7.54375C523.352 8.21094 524.009 8.75181 524.82 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 7.54375C518.371 8.2171 519.021 8.75181 519.839 8.75181C520.657 8.75181 521.306 8.2171 521.306 7.54375C521.306 6.87041 520.657 6.33569 519.839 6.33569C519.021 6.33569 518.371 6.87041 518.371 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 7.54375C513.39 8.2171 514.039 8.75181 514.857 8.75181C515.675 8.75181 516.325 8.2171 516.325 7.54375C516.325 6.87041 515.675 6.33569 514.857 6.33569C514.039 6.33569 513.39 6.87041 513.39 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M509.876 8.75181C510.687 8.75181 511.344 8.21094 511.344 7.54375C511.344 6.87656 510.687 6.33569 509.876 6.33569C509.066 6.33569 508.409 6.87656 508.409 7.54375C508.409 8.21094 509.066 8.75181 509.876 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M504.895 8.75181C505.705 8.75181 506.362 8.21094 506.362 7.54375C506.362 6.87656 505.705 6.33569 504.895 6.33569C504.085 6.33569 503.428 6.87656 503.428 7.54375C503.428 8.21094 504.085 8.75181 504.895 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 7.54375C498.423 8.2171 499.072 8.75181 499.89 8.75181C500.708 8.75181 501.358 8.2171 501.358 7.54375C501.358 6.87041 500.708 6.33569 499.89 6.33569C499.072 6.33569 498.423 6.87041 498.423 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 7.54375C493.442 8.2171 494.091 8.75181 494.909 8.75181C495.727 8.75181 496.376 8.2171 496.376 7.54375C496.376 6.87041 495.727 6.33569 494.909 6.33569C494.115 6.33569 493.442 6.87041 493.442 7.54375Z",fill:"#5840D2"}
3),a.createElement("path",{d:"M489.928 8.75181C490.738 8.75181 491.395 8.21094 491.395 7.54375C491.395 6.87656 490.738 6.33569 489.928 6.33569C489.117 6.33569 488.46 6.87656 488.46 7.54375C488.46 8.21094 489.117 8.75181 489.928 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 7.54375C483.479 8.2171 484.129 8.75181 484.947 8.75181C485.764 8.75181 486.414 8.2171 486.414 7.54375C486.414 6.87041 485.764 6.33569 484.947 6.33569C484.129 6.33569 483.479 6.87041 483.479 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 7.54375C478.498 8.2171 479.148 8.75181 479.965 8.75181C480.783 8.75181 481.433 8.2171 481.433 7.54375C481.433 6.87041 480.783 6.33569 479.965 6.33569C479.148 6.33569 478.498 6.87041 478.498 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M474.984 8.75181C475.795 8.75181 476.452 8.21094 476.452 7.54375C476.452 6.87656 475.795 6.33569 474.984 6.33569C474.174 6.33569 473.517 6.87656 473.517 7.54375C473.517 8.21094 474.174 8.75181 474.984 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M470.003 8.75181C470.814 8.75181 471.471 8.21094 471.471 7.54375C471.471 6.87656 470.814 6.33569 470.003 6.33569C469.193 6.33569 468.536 6.87656 468.536 7.54375C468.536 8.21094 469.193 8.75181 470.003 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 7.54375C463.531 8.2171 464.181 8.75181 464.998 8.75181C465.816 8.75181 466.466 8.2171 466.466 7.54375C466.466 6.87041 465.816 6.33569 464.998 6.33569C464.205 6.33569 463.531 6.87041 463.531 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 7.54375C458.55 8.2171 459.199 8.75181 460.017 8.75181C460.835 8.75181 461.484 8.2171 461.484 7.54375C461.484 6.87041 460.835 6.33569 460.017 6.33569C459.199 6.33569 458.55 6.87041 458.55 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M455.036 8.75181C455.847 8.75181 456.504 8.21094 456.504 7.54375C456.504 6.87656 455.847 6.33569 455.036 6.33569C454.226 6.33569 453.569 6.87656 453.569 7.54375C453.569 8.21094 454.226 8.75181 455.036 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M450.055 8.75181C450.865 8.75181 451.522 8.21094 451.522 7.54375C451.522 6.87656 450.865 6.33569 450.055 6.33569C449.244 6.33569 448.587 6.87656 448.587 7.54375C448.587 8.21094 449.244 8.75181 450.055 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 7.54375C443.606 8.2171 444.256 8.75181 445.074 8.75181C445.892 8.75181 446.541 8.2171 446.541 7.54375C446.541 6.87041 445.892 6.33569 445.074 6.33569C444.256 6.33569 443.606 6.87041 443.606 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 7.54375C438.625 8.2171 439.275 8.75181 440.093 8.75181C440.911 8.75181 441.56 8.2171 441.56 7.54375C441.56 6.87041 440.911 6.33569 440.093 6.33569C439.275 6.33569 438.625 6.87041 438.625 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M435.111 8.75181C435.922 8.75181 436.579 8.21094 436.579 7.54375C436.579 6.87656 435.922 6.33569 435.111 6.33569C434.301 6.33569 433.644 6.87656 433.644 7.54375C433.644 8.21094 434.301 8.75181 435.111 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M430.131 8.75181C430.941 8.75181 431.598 8.21094 431.598 7.54375C431.598 6.87656 430.941 6.33569 430.131 6.33569C429.32 6.33569 428.663 6.87656 428.663 7.54375C428.663 8.21094 429.32 8.75181 430.131 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 7.54375C423.658 8.2171 424.308 8.75181 425.126 8.75181C425.943 8.75181 426.593 8.2171 426.593 7.54375C426.593 6.87041 425.943 6.33569 425.126 6.33569C424.308 6.33569 423.658 6.87041 423.658 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 7.54375C418.677 8.2171 419.327 8.75181 420.145 8.75181C420.962 8.75181 421.612 8.2171 421.612 7.54375C421.612 6.87041 420.962 6.33569 420.145 6.33569C419.351 6.33569 418.677 6.87041 418.677 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M415.163 8.75181C415.974 8.75181 416.63 8.21094 416.63 7.54375C416.63 6.87656 415.974 6.33569 415.163 6.33569C414.353 6.33569 413.696 6.87656 413.696 7.54375C413.696 8.21094 414.353 8.75181 415.163 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 7.54375C408.715 8.2171 409.364 8.75181 410.182 8.75181C411 8.75181 411.65 8.2171 411.65 7.54375C411.65 6.87041 411 6.33569 410.182 6.33569C409.364 6.33569 408.715 6.87041 408.715 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 7.54375C403.734 8.2171 404.383 8.75181 405.201 8.75181C406.
3019 8.75181 406.668 8.2171 406.668 7.54375C406.668 6.87041 406.019 6.33569 405.201 6.33569C404.383 6.33569 403.734 6.87041 403.734 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M400.22 8.75181C401.03 8.75181 401.687 8.21094 401.687 7.54375C401.687 6.87656 401.03 6.33569 400.22 6.33569C399.409 6.33569 398.752 6.87656 398.752 7.54375C398.752 8.21094 399.409 8.75181 400.22 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M395.239 8.75181C396.049 8.75181 396.706 8.21094 396.706 7.54375C396.706 6.87656 396.049 6.33569 395.239 6.33569C394.428 6.33569 393.771 6.87656 393.771 7.54375C393.771 8.21094 394.428 8.75181 395.239 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M388.767 7.54375C388.767 8.2171 389.416 8.75181 390.234 8.75181C391.052 8.75181 391.701 8.2171 391.701 7.54375C391.701 6.87041 391.052 6.33569 390.234 6.33569C389.416 6.33569 388.767 6.87041 388.767 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 7.54375C383.785 8.2171 384.435 8.75181 385.253 8.75181C386.071 8.75181 386.72 8.2171 386.72 7.54375C386.72 6.87041 386.071 6.33569 385.253 6.33569C384.435 6.33569 383.785 6.87041 383.785 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M380.295 8.75181C381.105 8.75181 381.762 8.21094 381.762 7.54375C381.762 6.87656 381.105 6.33569 380.295 6.33569C379.485 6.33569 378.828 6.87656 378.828 7.54375C378.828 8.21094 379.485 8.75181 380.295 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M368.842 7.54375C368.842 8.2171 369.491 8.75181 370.309 8.75181C371.127 8.75181 371.777 8.2171 371.777 7.54375C371.777 6.87041 371.127 6.33569 370.309 6.33569C369.491 6.33569 368.842 6.87041 368.842 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 7.54375C363.861 8.2171 364.51 8.75181 365.328 8.75181C366.146 8.75181 366.795 8.2171 366.795 7.54375C366.795 6.87041 366.146 6.33569 365.328 6.33569C364.51 6.33569 363.861 6.87041 363.861 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M360.347 8.75181C361.157 8.75181 361.814 8.21094 361.814 7.54375C361.814 6.87656 361.157 6.33569 360.347 6.33569C359.537 6.33569 358.88 6.87656 358.88 7.54375C358.88 8.21094 359.537 8.75181 360.347 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M355.366 8.75181C356.176 8.75181 356.833 8.21094 356.833 7.54375C356.833 6.87656 356.176 6.33569 355.366 6.33569C354.555 6.33569 353.899 6.87656 353.899 7.54375C353.899 8.21094 354.555 8.75181 355.366 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 7.54375C348.894 8.2171 349.543 8.75181 350.361 8.75181C351.179 8.75181 351.828 8.2171 351.828 7.54375C351.828 6.87041 351.179 6.33569 350.361 6.33569C349.543 6.33569 348.894 6.87041 348.894 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M345.404 8.75181C346.214 8.75181 346.871 8.21094 346.871 7.54375C346.871 6.87656 346.214 6.33569 345.404 6.33569C344.593 6.33569 343.937 6.87656 343.937 7.54375C343.937 8.21094 344.593 8.75181 345.404 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M340.399 8.75181C341.209 8.75181 341.866 8.21094 341.866 7.54375C341.866 6.87656 341.209 6.33569 340.399 6.33569C339.588 6.33569 338.931 6.87656 338.931 7.54375C338.931 8.21094 339.588 8.75181 340.399 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 7.54375C333.95 8.2171 334.6 8.75181 335.418 8.75181C336.235 8.75181 336.885 8.2171 336.885 7.54375C336.885 6.87041 336.235 6.33569 335.418 6.33569C334.6 6.33569 333.95 6.87041 333.95 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 7.54375C328.969 8.2171 329.618 8.75181 330.436 8.75181C331.254 8.75181 331.904 8.2171 331.904 7.54375C331.904 6.87041 331.254 6.33569 330.436 6.33569C329.618 6.33569 328.969 6.87041 328.969 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M325.455 8.75181C326.266 8.75181 326.923 8.21094 326.923 7.54375C326.923 6.87656 326.266 6.33569 325.455 6.33569C324.645 6.33569 323.988 6.87656 323.988 7.54375C323.988 8.21094 324.645 8.75181 325.455 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M234.256 7.54375C234.256 8.2171 234.905 8.75181 235.723 8.75181C236.541 8.75181 237.191 8.2171 237.191 7.54375C237.191 6.87041 236.541 6.33569 235.723 6.33569C234.929 6.33569 234.256 6.87041 234.256 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M230.766 8.75181C231.577 8.75181 232.234 8.21094 232.234 7.54375C232.234 6.87656 231.577 6.33569 230.766 6.33569C229.956 6.33569 229.299 6.87656 229.299 7.54375C229.299 8.21094 229.956 8.75181 230.766 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M225.785 8.75181C226.595 8.75181 227.252 8.21094 227.252 7.54375C227.252 6.87656 226.595 6.33569 225.785 6.33569C224.975 6.33569 224.318 6.87656 224.318 7.54375C224.318 8.21094 224.975 8.75181 225.785 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M219.313 7.54375C219.313 8.2171 219.962 8.75181 220.78 8.75181C221.598 8.75181 222.247 8.2171 222.247 7.54375C222.247 6.87041 221.598 6.33569 220.78 6.33569C219.986 6.33569 219.313 6.87041 219.313 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M214.332 7.54375C214.332 8.2171 214.981 8.75181 215.799 8.75181C216.617 8.75181 217.266 8.2171 217.266 7.54375C217.266 6.87041 216.617 6.33569 215.799 6.33569C214.981 6.33569 214.332 6.87041 214.332 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M210.818 8.75181C211.628 8.75181 212.285 8.21094 212.285 7.54375C212.285 6.876
356 211.628 6.33569 210.818 6.33569C210.007 6.33569 209.35 6.87656 209.35 7.54375C209.35 8.21094 210.007 8.75181 210.818 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M204.37 7.54375C204.37 8.2171 205.019 8.75181 205.837 8.75181C206.655 8.75181 207.304 8.2171 207.304 7.54375C207.304 6.87041 206.655 6.33569 205.837 6.33569C205.019 6.33569 204.37 6.87041 204.37 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M184.421 7.54375C184.421 8.2171 185.07 8.75181 185.888 8.75181C186.706 8.75181 187.356 8.2171 187.356 7.54375C187.356 6.87041 186.706 6.33569 185.888 6.33569C185.094 6.33569 184.421 6.87041 184.421 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M179.44 7.54375C179.44 8.2171 180.089 8.75181 180.907 8.75181C181.725 8.75181 182.375 8.2171 182.375 7.54375C182.375 6.87041 181.725 6.33569 180.907 6.33569C180.113 6.33569 179.44 6.87041 179.44 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M175.926 8.75181C176.736 8.75181 177.393 8.21094 177.393 7.54375C177.393 6.87656 176.736 6.33569 175.926 6.33569C175.116 6.33569 174.459 6.87656 174.459 7.54375C174.459 8.21094 175.116 8.75181 175.926 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M170.945 8.75181C171.755 8.75181 172.412 8.21094 172.412 7.54375C172.412 6.87656 171.755 6.33569 170.945 6.33569C170.134 6.33569 169.478 6.87656 169.478 7.54375C169.478 8.21094 170.134 8.75181 170.945 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M151.02 8.75181C151.831 8.75181 152.488 8.21094 152.488 7.54375C152.488 6.87656 151.831 6.33569 151.02 6.33569C150.21 6.33569 149.553 6.87656 149.553 7.54375C149.553 8.21094 150.21 8.75181 151.02 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M146.039 8.75181C146.85 8.75181 147.507 8.21094 147.507 7.54375C147.507 6.87656 146.85 6.33569 146.039 6.33569C145.229 6.33569 144.572 6.87656 144.572 7.54375C144.572 8.21094 145.229 8.75181 146.039 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M141.034 8.75181C141.845 8.75181 142.502 8.21094 142.502 7.54375C142.502 6.87656 141.845 6.33569 141.034 6.33569C140.224 6.33569 139.567 6.87656 139.567 7.54375C139.567 8.21094 140.224 8.75181 141.034 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M136.053 8.75181C136.863 8.75181 137.52 8.21094 137.52 7.54375C137.52 6.87656 136.863 6.33569 136.053 6.33569C135.243 6.33569 134.586 6.87656 134.586 7.54375C134.586 8.21094 135.243 8.75181 136.053 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M131.072 8.75181C131.882 8.75181 132.539 8.21094 132.539 7.54375C132.539 6.87656 131.882 6.33569 131.072 6.33569C130.262 6.33569 129.605 6.87656 129.605 7.54375C129.605 8.21094 130.262 8.75181 131.072 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M126.091 8.75181C126.901 8.75181 127.558 8.21094 127.558 7.54375C127.558 6.87656 126.901 6.33569 126.091 6.33569C125.281 6.33569 124.624 6.87656 124.624 7.54375C124.624 8.21094 125.281 8.75181 126.091 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M121.11 8.75181C121.92 8.75181 122.577 8.21094 122.577 7.54375C122.577 6.87656 121.92 6.33569 121.11 6.33569C120.299 6.33569 119.642 6.87656 119.642 7.54375C119.642 8.21094 120.299 8.75181 121.11 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M116.129 8.75181C116.939 8.75181 117.596 8.21094 117.596 7.54375C117.596 6.87656 116.939 6.33569 116.129 6.33569C115.318 6.33569 114.661 6.87656 114.661 7.54375C114.661 8.21094 115.318 8.75181 116.129 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 7.54375C109.656 8.2171 110.305 8.75181 111.123 8.75181C111.941 8.75181 112.591 8.2171 112.591 7.54375C112.591 6.87041 111.941 6.33569 111.123 6.33569C110.33 6.33569 109.656 6.87041 109.656 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M106.166 8.75181C106.977 8.75181 107.634 8.21094 107.634 7.54375C107.634 6.87656 106.977 6.33569 106.166 6.33569C105.356 6.33569 104.699 6.87656 104.699 7.54375C104.699 8.21094 105.356 8.75181 106.166 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M101.161 8.75181C101.972 8.75181 102.629 8.21094 102.629 7.54375C102.629 6.87656 101.972 6.33569 101.161 6.33569C100.351 6.33569 99.694 6.87656 99.694 7.54375C99.694 8.21094 100.351 8.75181 101.161 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M96.1805 8.75181C96.9909 8.75181 97.6478 8.21094 97.6478 7.54375C97.6478 6.87656 96.9909 6.33569 96.1805 6.33569C95.3701 6.33569 94.7131 6.87656 94.7131 7.54375C94.7131 8.21094 95.3701 8.75181 96.1805 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 7.54375C89.7318 8.2171 90.3813 8.75181 91.1991 8.75181C92.017 8.75181 92.6665 8.2171 92.6665 7.54375C92.6665 6.87041 92.017 6.33569 91.1991 6.33569C90.3813 6.33569 89.7318 6.87041 89.7318 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 7.54375C84.7507 8.2171 85.4002 8.75181 86.2181 8.75181C87.0359 8.75181 87.6854 8.2171 87.6854 7.54375C87.6854 6.87041 87.0359 6.33569 86.2181 6.33569C85.4002 6.33569 84.7507 6.87041 84.7507 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M81.237 8.75181C82.0474 8.75181 82.7043 8.21094 82.7043 7.54375C82.7043 6.87656 82.0474 6.33569 81.237 6.33569C80.4266 6.33569 79.7697 6.87656 79.7697 7.54375C79.7697 8.21094 80.4266 8.75181 81.237 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 7.54375C74.7645 8.2171 75.414 8.75181 76.2319 8.75181C77.0497 8.75181 77.6992 8.2171 77.6992 7.54375C77.6992 6.87041 77.0497 6.33569 76.2319 6.33569C75.4381 6.33569 74.7645 6.87041 74.7645 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 7.54375C69.7836 8.2171 70.433 8.75181 71.2509 8.75181C72.0688 8.75181 72.7182 8.2171 72.7182 7.54375C72.7182 6.87041 72.0688 6.33569 71.2509 6.33569C70.4571 6.33569 69.7836 6.87041 69.7836 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M66.2934 8.75181C67.1038 8.75181 67.7607 8.21094 67.7607 7.54375C67.7607 6.87656 67.1038 6.33569 66.2934 6.33569C65.483 6.33569 64.826 6.87656 64.826 7.54375C64.826 8.21094 65.483 8.75181 66.2934 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M61.2885 8.75181C62.0989 8.75181 62.7558 8.21094 62.7558 7.54375C62.7558 6.87656 62.0989 6.33569 61.2885 6.33569C60.4781 6.33569 59.8212 6.87656 59.8212 7.54375C59.8212 8.21094 60.4781 8.75181 61.2885 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M54.8397 7.54375C54.8397 8.2171 55.4892 8.75181 56.307 8.75181C57.1249 8.75181 57.7744 8.2171 57.7744 7.54375C57.7744 6.87041 57.1249 6.33569 56.307 6.33569C55.4892 6.33569 54.8397 6.87041 54.8397 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M49.8588 7.54375C49.8588 8.2171 50.5082 8.75181 51.3261 8.75181C52.1439 8.75181 52.7934 8.2171 52.7934 7.54375C52.7934 6.87041 52.1439 6.33569 51.3261 6.33569C50.5082 6.33569 49.8588 6.87041 49.8588 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M46.345 8.75181C47.1554 8.75181 47.8123 8.21094 47.8123 7.54375C47.8123 6.87656 47.1554 6.33569 46.345 6.33569C45.5346 6.33569 44.8777 6.87656 44.8777 7.54375C44.8777 8.21094 45.5346 8.75181 46.345 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M41.3638 8.75181C42.1742 8.75181 42.8311 8.21094 42.8311 7.54375C42.8311 6.876
356 42.1742 6.33569 41.3638 6.33569C40.5534 6.33569 39.8965 6.87656 39.8965 7.54375C39.8965 8.21094 40.5534 8.75181 41.3638 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M34.8916 7.54375C34.8916 8.2171 35.5411 8.75181 36.3589 8.75181C37.1768 8.75181 37.8263 8.2171 37.8263 7.54375C37.8263 6.87041 37.1768 6.33569 36.3589 6.33569C35.5651 6.33569 34.8916 6.87041 34.8916 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M29.9105 7.54375C29.9105 8.2171 30.56 8.75181 31.3778 8.75181C32.1957 8.75181 32.8452 8.2171 32.8452 7.54375C32.8452 6.87041 32.1957 6.33569 31.3778 6.33569C30.584 6.33569 29.9105 6.87041 29.9105 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M26.4206 8.75181C27.231 8.75181 27.8879 8.21094 27.8879 7.54375C27.8879 6.87656 27.231 6.33569 26.4206 6.33569C25.6102 6.33569 24.9532 6.87656 24.9532 7.54375C24.9532 8.21094 25.6102 8.75181 26.4206 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M21.4154 8.75181C22.2258 8.75181 22.8828 8.21094 22.8828 7.54375C22.8828 6.87656 22.2258 6.33569 21.4154 6.33569C20.6051 6.33569 19.9481 6.87656 19.9481 7.54375C19.9481 8.21094 20.6051 8.75181 21.4154 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M14.9672 7.54375C14.9672 8.2171 15.6166 8.75181 16.4345 8.75181C17.2523 8.75181 17.9018 8.2171 17.9018 7.54375C17.9018 6.87041 17.2523 6.33569 16.4345 6.33569C15.6166 6.33569 14.9672 6.87041 14.9672 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M9.98621 7.54375C9.98621 8.2171 10.6357 8.75181 11.4535 8.75181C12.2714 8.75181 12.9209 8.2171 12.9209 7.54375C12.9209 6.87041 12.2714 6.33569 11.4535 6.33569C10.6357 6.33569 9.98621 6.87041 9.98621 7.54375Z",fill:"#5840D2"}),a.createElement("path",{d:"M6.47246 8.75181C7.28284 8.75181 7.93978 8.21094 7.93978 7.54375C7.93978 6.87656 7.28284 6.33569 6.47246 6.33569C5.66207 6.33569 5.00513 6.87656 5.00513 7.54375C5.00513 8.21094 5.66207 8.75181 6.47246 8.75181Z",fill:"#5840D2"}),a.createElement("path",{d:"M618.042 2.95635C618.042 3.62969 618.691 4.16441 619.509 4.16441C620.327 4.16441 620.976 3.62969 620.976 2.95635C620.976 2.283 620.327 1.74829 619.509 1.74829C618.691 1.74829 618.042 2.283 618.042 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M613.06 2.95635C613.06 3.62969 613.71 4.16441 614.528 4.16441C615.346 4.16441 615.995 3.62969 615.995 2.95635C615.995 2.283 615.346 1.74829 614.528 1.74829C613.71 1.74829 613.06 2.283 613.06 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M608.079 2.95599C608.079 3.6292 608.729 4.1638 609.547 4.1638C610.364 4.1638 611.014 3.6292 611.014 2.95599C611.014 2.28279 610.364 1.7482 609.547 1.7482C608.729 1.7284 608.079 2.28279 608.079 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M603.098 2.95635C603.098 3.62969 603.747 4.16441 604.565 4.16441C605.383 4.16441 606.033 3.62969 606.033 2.95635C606.033 2.283 605.383 1.74829 604.565 1.74829C603.747 1.74829 603.098 2.283 603.098 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M598.117 2.95635C598.117 3.62969 598.767 4.16441 599.584 4.16441C600.402 4.16441 601.052 3.62969 601.052 2.95635C601.052 2.283 600.402 1.74829 599.584 1.74829C598.767 1.74829 598.117 2.283 598.117 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M593.135 2.95599C593.135 3.6292 593.785 4.1638 594.603 4.1638C595.421 4.1638 596.07 3.6292 596.07 2.95599C596.07 2.28279 595.421 1.7482 594.603 1.7482C593.785 1.7284 593.135 2.28279 593.135 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M588.131 2.95635C588.131 3.62969 588.78 4.16441 589.598 4.16441C590.416 4.16441 591.066 3.62969 591.066 2.95635C591.066 2.283 590.416 1.74829 589.598 1.74829C588.78 1.74829 588.131 2.283 588.131 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M583.15 2.95635C583.15 3.62969 583.799 4.16441 584.617 4.16441C585.435 4.16441 586.084 3.62969 586.084 2.95635C586.084 2.283 585.435 1.74829 584.617 1.74829C583.799 1.74829 583.15 2.283 583.15 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M578.169 2.95635C578.169 3.62969 578.818 4.16441 579.636 4.16441C580.454 4.16441 581.103 3.62969 581.103 2.95635C581.103 2.283 580.454 1.74829 579.636 1.74829C578.818 1.74829 578.169 2.283 578.169 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M573.187 2.95635C573.187 3.62969 573.837 4.16441 574.655 4.16441C575.473 4.16441 576.122 3.62969 576.122 2.95635C576.122 2.283 575.473 1.74829 574.655 1.74829C573.837 1.74829 573.187 2.283 573.187 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M568.206 2.95635C568.206 3.62969 568.856 4.16441 569.674 4.16441C570.491 4.16441 571.141 3.62969 571.141 2.95635C571.
3141 2.283 570.491 1.74829 569.674 1.74829C568.856 1.74829 568.206 2.283 568.206 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M563.225 2.95599C563.225 3.6292 563.875 4.1638 564.693 4.1638C565.511 4.1638 566.16 3.6292 566.16 2.95599C566.16 2.28279 565.511 1.7482 564.693 1.7482C563.875 1.7284 563.225 2.28279 563.225 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M558.244 2.95599C558.244 3.6292 558.893 4.1638 559.711 4.1638C560.529 4.1638 561.178 3.6292 561.178 2.95599C561.178 2.28279 560.529 1.7482 559.711 1.7482C558.893 1.7284 558.244 2.28279 558.244 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M553.263 2.95635C553.263 3.62969 553.913 4.16441 554.73 4.16441C555.548 4.16441 556.198 3.62969 556.198 2.95635C556.198 2.283 555.548 1.74829 554.73 1.74829C553.913 1.74829 553.263 2.283 553.263 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M548.258 2.95635C548.258 3.62969 548.907 4.16441 549.725 4.16441C550.543 4.16441 551.193 3.62969 551.193 2.95635C551.193 2.283 550.543 1.74829 549.725 1.74829C548.907 1.74829 548.258 2.283 548.258 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M543.277 2.95599C543.277 3.6292 543.927 4.1638 544.745 4.1638C545.562 4.1638 546.212 3.6292 546.212 2.95599C546.212 2.28279 545.562 1.7482 544.745 1.7482C543.951 1.7284 543.277 2.28279 543.277 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M538.296 2.95635C538.296 3.62969 538.945 4.16441 539.763 4.16441C540.581 4.16441 541.23 3.62969 541.23 2.95635C541.23 2.283 540.581 1.74829 539.763 1.74829C538.945 1.74829 538.296 2.283 538.296 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M533.314 2.95635C533.314 3.62969 533.964 4.16441 534.782 4.16441C535.6 4.16441 536.249 3.62969 536.249 2.95635C536.249 2.283 535.6 1.74829 534.782 1.74829C533.964 1.74829 533.314 2.283 533.314 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M528.333 2.95599C528.333 3.6292 528.983 4.1638 529.801 4.1638C530.619 4.1638 531.268 3.6292 531.268 2.95599C531.268 2.28279 530.619 1.7482 529.801 1.7482C528.983 1.7284 528.333 2.28279 528.333 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M523.352 2.95635C523.352 3.62969 524.002 4.16441 524.82 4.16441C525.637 4.16441 526.287 3.62969 526.287 2.95635C526.287 2.283 525.637 1.74829 524.82 1.74829C524.002 1.74829 523.352 2.283 523.352 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M518.371 2.95635C518.371 3.62969 519.021 4.16441 519.839 4.16441C520.657 4.16441 521.306 3.62969 521.306 2.95635C521.306 2.283 520.657 1.74829 519.839 1.74829C519.021 1.74829 518.371 2.283 518.371 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M513.39 2.95599C513.39 3.6292 514.039 4.1638 514.857 4.1638C515.675 4.1638 516.325 3.6292 516.325 2.95599C516.325 2.28279 515.675 1.7482 514.857 1.7482C514.039 1.7284 513.39 2.28279 513.39 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M508.385 2.95635C508.385 3.62969 509.035 4.16441 509.853 4.16441C510.67 4.16441 511.32 3.62969 511.32 2.95635C511.32 2.283 510.67 1.74829 509.853 1.74829C509.035 1.74829 508.385 2.283 508.385 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M503.404 2.95635C503.404 3.62969 504.053 4.16441 504.871 4.16441C505.689 4.16441 506.338 3.62969 506.338 2.95635C506.338 2.283 505.689 1.74829 504.871 1.74829C504.053 1.74829 503.404 2.283 503.404 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M498.423 2.95635C498.423 3.62969 499.072 4.16441 499.89 4.16441C500.708 4.16441 501.358 3.62969 501.358 2.95635C501.358 2.283 500.708 1.74829 499.89 1.74829C499.072 1.74829 498.423 2.283 498.423 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M493.442 2.95599C493.442 3.6292 494.091 4.1638 494.909 4.1638C495.727 4.1638 496.376 3.6292 496.376 2.95599C496.376 2.28279 495.727 1.7482 494.909 1.7482C494.115 1.7284 493.442 2.28279 493.442 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M488.46 2.95635C488.46 3.62969 489.11 4.16441 489.928 4.16441C490.746 4.16441 491.395 3.62969 491.395 2.95635C491.395 2.283 490.746 1.74829 489.928 1.74829C489.11 1.74829 488.46 2.283 488.46 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M483.479 2.95635C483.479 3.62969 484.129 4.16441 484.947 4.16441C485.764 4.16441 486.414 3.62969 486.414 2.95635C486.414 2.283 485.764 1.74829 484.947 1.74829C484.129 1.74829 483.479 2.283 483.479 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M478.498 2.95599C478.498 3.6292 479.148 4.1638 479.965 4.1638C480.783 4.1638 481.433 3.6292 481.433 2.95599C481.433 2.28279 480.783 1.7482 479.965 1.7482C479.148 1.7284 478.498 2.28279 478.498 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M473.517 2.95635C473.517 3.62969 474.167 4.16441 474.984 4.16441C475.802 4.16441 476.452 3.62969 476.452 2.95635C476.452 2.283 475.802 1.74829 474.984 1.74829C474.167 1.74829 473.517 2.283 473.517 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M468.512 2.95635C468.512 3.62969 469.162 4.16441 469.98 4.16441C470.797 4.16441 471.447 3.62969 471.447 2.95635C471.447 2.283 470.797 1.74829 469.98 1.74829C469.162 1.74829 468.512 2.283 468.512 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M463.531 2.95599C463.531 3.6292 464.181 4.1638 464.998 4.1638C465.816 4.1638 466.466 3.6292 466.466 2.95599C466.466 2.28279 465.816 1.7482 464.998 1.7482C464.205 1.7284 463.531 2.28279 463.531 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M458.55 2.95635C458.55 3.62969 459.199 4.16441 460.017 4.16441C460.835 4.16441 461.484 3.62969 461.484 2.95635C461.484 2.283 460.835 1.74829 460.017 1.74829C459.199 1.74829 458.55 2.283 458.55 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M453.569 2.95635C453.569 3.62969 454.218 4.16441 455.036 4.16441C455.854 4.16441 456.504 3.62969 456.504 2.95635C456.504 2.283 455.854 1.74829 455.036 1.74829C454.218 1.74829 453.569 2.283 453.569 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M448.587 2.95635C448.587 3.62969 449.237 4.16441 450.055 4.16441C450.873 4.16441 451.522 3.62969 451.522 2.95635C451.522 2.283 450.873 1.74829 450.055 1.74829C449.237 1.74829 448.587 2.283 448.587 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M443.606 2.95599C443.606 3.6292 444.256 4.1638 445.074 4.1638C445.892 4.1638 446.541 3.6292 446.541 2.95599C446.541 2.28279 445.892 1.7482 445.074 1.7482C444.256 1.7284 443.606 2.28279 443.606 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M438.625 2.95635C438.625 3.62969 439.275 4.16441 440.093 4.16441C440.911 4.16441 441.56 3.62969 441.56 2.95635C441.56 2.283 440.911 1.74829 440.093 1.74829C439.275 1.74829 438.625 2.283 438.625 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M433.644 2.95635C433.644 3.62969 434.294 4.16441 435.111 4.16441C435.929 4.16441 436.579 3.62969 436.579 2.95635C436.579 2.283 435.929 1.74829 435.111 1.74829C434.294 1.74829 433.644 2.283 433.644 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M423.658 2.95635C423.658 3.62969 424.308 4.16441 425.126 4.16441C425.943 4.16441 426.593 3.62969 426.593 2.95635C426.593 2.283 425.943 1.74829 425.126 1.74829C424.308 1.74829 423.658 2.283 423.658 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M418.677 2.95599C418.677 3.6292 419.327 4.1638 420.145 4.1638C420.962 4.1638 421.612 3.6292 421.612 2.95599C421.612 2.28279 420.962 1.7482 420.145 1.7482C419.351 1.7284 418.677 2.28279 418.677 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M413.696 2.95599C413.696 3.6292 414.345 4.1638 415.163 4.1638C415.981 4.1638 416.63 3.6292 416.63 2.95599C416.63 2.28279 415.981 1.7482 415.163 1.7482C414.345 1.7284 413.696 2.28279 413.696 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M408.715 2.95599C408.715 3.6292 409.364 4.1638 410.182 4.1638C411 4.1638 411.65 3.6292 411.65 2.95599C411.65 2.28279 411 1.7482 410.182 1.7482C409.364 1.7284 408.715 2.28279 408.715 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M403.734 2.95599C403.734 3.6292 404.383 4.1638 405.201 4.1638C406.019 4.1638 406.668 3.6292 406.668 2.95599C406.668 2.28279 406.019 1.7482 405.201 1.7482C404.383 1.7284 403.734 2.28279 403.734 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M393.747 2.95612C393.747 3.62932 394.397 4.16392 395.215 4.16392C396.033 4.16392 396.682 3.62932 396.682 2.95612C396.682 2.28292 396.033 1.74832 395.215 1.74832C394.421 1.72852 393.747 2.28292 393.747 2.95612Z",fill:"#5840D2"}),a.createElement("path",{d:"M383.785 2.95635C383.785 3.62969 384.435 4.16441 385.253 4.16441C386.071 4.16441 386.72 3.62969 386.72 2.95635C386.72 2.283 386.071 1.74829 385.253 1.74829C384.435 1.74829 383.785 2.283 383.785 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M363.861 2.95599C363.861 3.6292 364.51 4.1638 365.328 4.1638C366.146 4.1638 366.795 3.6292 366.795 2.95599C366.795 2.28279 366.146 1.7482 365.328 1.7482C364.51 1.7284 363.861 2.28279 363.861 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M358.88 2.95635C358.88 3.62969 359.529 4.16441 360.347 4.16441C361.165 4.16441 361.814 3.62969 361.814 2.95635C361.814 2.283 361.165 1.74829 360.347 1.74829C359.529 1.74829 358.88 2.283 358.88 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M353.875 2.95599C353.875 3.6292 354.524 4.1638 355.342 4.1638C356.16 4.1638 356.809 3.6292 356.809 2.95599C356.809 2.28279 356.16 1.7482 355.342 1.7482C354.548 1.7284 353.875 2.28279 353.875 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M348.894 2.95635C348.894 3.62969 349.543 4.16441 350.361 4.16441C351.179 4.16441 351.828 3.62969 351.828 2.95635C351.828 2.283 351.179 1.74829 350.361 1.74829C349.543 1.74829 348.894 2.283 348.894 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M343.912 2.95635C343.912 3.62969 344.562 4.16441 345.38 4.16441C346.198 4.16441 346.847 3.62969 346.847 2.95635C346.847 2.283 346.198 1.74829 345.38 1.74829C344.562 1.74829 343.912 2.283 343.912 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M338.931 2.95635C338.931 3.62969 339.581 4.16441 340.399 4.16441C341.217 4.16441 341.866 3.62969 341.866 2.95635C341.866 2.283 341.217 1.74829 340.399 1.74829C339.581 1.74829 338.931 2.283 338.931 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M333.95 2.95635C333.95 3.62969 334.6 4.16441 335.418 4.16441C336.235 4.16441 336.885 3.62969 336.885 2.95635C336.885 2.283 336.235 1.74829 335.418 1.74829C334.6 1.74829 333.95 2.283 333.95 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M328.969 2.95599C328.969 3.6292 329.618 4.1638 330.436 4.1638C331.254 4.1638 331.904 3.6292 331.904 2.95599C33
31.904 2.28279 331.254 1.7482 330.436 1.7482C329.618 1.7284 328.969 2.28279 328.969 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M249.223 2.95635C249.223 3.62969 249.873 4.16441 250.691 4.16441C251.509 4.16441 252.158 3.62969 252.158 2.95635C252.158 2.283 251.509 1.74829 250.691 1.74829C249.873 1.74829 249.223 2.283 249.223 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M244.242 2.95635C244.242 3.62969 244.892 4.16441 245.71 4.16441C246.527 4.16441 247.177 3.62969 247.177 2.95635C247.177 2.283 246.527 1.74829 245.71 1.74829C244.892 1.74829 244.242 2.283 244.242 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M239.261 2.95635C239.261 3.62969 239.911 4.16441 240.728 4.16441C241.546 4.16441 242.196 3.62969 242.196 2.95635C242.196 2.283 241.546 1.74829 240.728 1.74829C239.911 1.74829 239.261 2.283 239.261 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M234.256 2.95599C234.256 3.6292 234.905 4.1638 235.723 4.1638C236.541 4.1638 237.191 3.6292 237.191 2.95599C237.191 2.28279 236.541 1.7482 235.723 1.7482C234.929 1.7284 234.256 2.28279 234.256 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M229.275 2.95599C229.275 3.6292 229.925 4.1638 230.742 4.1638C231.56 4.1638 232.21 3.6292 232.21 2.95599C232.21 2.28279 231.56 1.7482 230.742 1.7482C229.949 1.7284 229.275 2.28279 229.275 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M224.294 2.95599C224.294 3.6292 224.943 4.1638 225.761 4.1638C226.579 4.1638 227.228 3.6292 227.228 2.95599C227.228 2.28279 226.579 1.7482 225.761 1.7482C224.967 1.7284 224.294 2.28279 224.294 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M219.313 2.95599C219.313 3.6292 219.962 4.1638 220.78 4.1638C221.598 4.1638 222.247 3.6292 222.247 2.95599C222.247 2.28279 221.598 1.7482 220.78 1.7482C219.986 1.7284 219.313 2.28279 219.313 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M214.332 2.95635C214.332 3.62969 214.981 4.16441 215.799 4.16441C216.617 4.16441 217.266 3.62969 217.266 2.95635C217.266 2.283 216.617 1.74829 215.799 1.74829C214.981 1.74829 214.332 2.283 214.332 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M209.35 2.95599C209.35 3.6292 210 4.1638 210.818 4.1638C211.635 4.1638 212.285 3.6292 212.285 2.95599C212.285 2.28279 211.635 1.7482 210.818 1.7482C210 1.7284 209.35 2.28279 209.35 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M204.37 2.95635C204.37 3.62969 205.019 4.16441 205.837 4.16441C206.655 4.16441 207.304 3.62969 207.304 2.95635C207.304 2.283 206.655 1.74829 205.837 1.74829C205.019 1.74829 204.37 2.283 204.37 2.95635Z",fill:"#5840D2"}),a.createElement("path",{d:"M174.459 2.95599C174.459 3.6292 175.108 4.1638 175.926 4.1638C176.744 4.1638 177.393 3.6292 177.393 2.95599C177.393 2.28279 176.744 1.7482 175.926 1.7482C175.108 1.7284 174.459 2.28279 174.459 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M169.478 2.95599C169.478 3.6292 170.127 4.1638 170.945 4.1638C171.763 4.1638 172.412 3.6292 172.412 2.95599C172.412 2.28279 171.763 1.7482 170.945 1.7482C170.127 1.7284 169.478 2.28279 169.478 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M164.496 2.95599C164.496 3.6292 165.146 4.1638 165.964 4.1638C166.781 4.1638 167.431 3.6292 167.431 2.95599C167.431 2.28279 166.781 1.7482 165.964 1.7482C165.146 1.7284 164.496 2.28279 164.496 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M149.529 2.95599C149.529 3.6292 150.179 4.1638 150.997 4.1638C151.814 4.1638 152.464 3.6292 152.464 2.95599C152.464 2.28279 151.814 1.7482 150.997 1.7482C150.203 1.7284 149.529 2.28279 149.529 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M139.567 2.95599C139.567 3.6292 140.216 4.1638 141.034 4.1638C141.852 4.1638 142.502 3.6292 142.502 2.95599C142.502 2.28279 141.852 1.7482 141.034 1.7482C140.24 1.7284 139.567 2.28279 139.567 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M134.586 2.95599C134.586 3.6292 135.235 4.1638 136.053 4.1638C136.871 4.1638 137.52 3.6292 137.52 2.95599C137.52 2.28279 136.871 1.7482 136.053 1.7482C135.235 1.7284 134.586 2.28279 134.586 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M129.605 2.95599C129.605 3.6292 130.254 4.1638 131.072 4.1638C131.89 4.1638 132.539 3.6292 132.539 2.95599C132.539 2.28279 131.89 1.7482
3131.072 1.7482C130.254 1.7284 129.605 2.28279 129.605 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M124.624 2.95599C124.624 3.6292 125.273 4.1638 126.091 4.1638C126.909 4.1638 127.558 3.6292 127.558 2.95599C127.558 2.28279 126.909 1.7482 126.091 1.7482C125.273 1.7284 124.624 2.28279 124.624 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M109.656 2.95599C109.656 3.6292 110.305 4.1638 111.123 4.1638C111.941 4.1638 112.591 3.6292 112.591 2.95599C112.591 2.28279 111.941 1.7482 111.123 1.7482C110.33 1.7284 109.656 2.28279 109.656 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M104.675 2.95599C104.675 3.6292 105.325 4.1638 106.142 4.1638C106.96 4.1638 107.61 3.6292 107.61 2.95599C107.61 2.28279 106.96 1.7482 106.142 1.7482C105.349 1.7284 104.675 2.28279 104.675 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M99.694 2.95599C99.694 3.6292 100.343 4.1638 101.161 4.1638C101.979 4.1638 102.629 3.6292 102.629 2.95599C102.629 2.28279 101.979 1.7482 101.161 1.7482C100.367 1.7284 99.694 2.28279 99.694 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M94.7131 2.95612C94.7131 3.62932 95.3626 4.16392 96.1805 4.16392C96.9983 4.16392 97.6478 3.62932 97.6478 2.95612C97.6478 2.28292 96.9983 1.74832 96.1805 1.74832C95.3626 1.72852 94.7131 2.28292 94.7131 2.95612Z",fill:"#5840D2"}),a.createElement("path",{d:"M89.7318 2.95599C89.7318 3.6292 90.3813 4.1638 91.1991 4.1638C92.017 4.1638 92.6665 3.6292 92.6665 2.95599C92.6665 2.28279 92.017 1.7482 91.1991 1.7482C90.3813 1.7284 89.7318 2.28279 89.7318 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M84.7507 2.95599C84.7507 3.6292 85.4002 4.1638 86.2181 4.1638C87.0359 4.1638 87.6854 3.6292 87.6854 2.95599C87.6854 2.28279 87.0359 1.7482 86.2181 1.7482C85.4002 1.7284 84.7507 2.28279 84.7507 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M79.7697 2.95599C79.7697 3.6292 80.4191 4.1638 81.237 4.1638C82.0548 4.1638 82.7043 3.6292 82.7043 2.95599C82.7043 2.28279 82.0548 1.7482 81.237 1.7482C80.4191 1.7284 79.7697 2.28279 79.7697 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M74.7645 2.95599C74.7645 3.6292 75.414 4.1638 76.2319 4.1638C77.0497 4.1638 77.6992 3.6292 77.6992 2.95599C77.6992 2.28279 77.0497 1.7482 76.2319 1.7482C75.4381 1.7284 74.7645 2.28279 74.7645 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M69.7836 2.95599C69.7836 3.6292 70.433 4.1638 71.2509 4.1638C72.0688 4.1638 72.7182 3.6292 72.7182 2.95599C72.7182 2.28279 72.0688 1.7482 71.2509 1.7482C70.4571 1.7284 69.7836 2.28279 69.7836 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M64.8024 2.95599C64.8024 3.6292 65.4518 4.1638 66.2697 4.1638C67.0876 4.1638 67.737 3.6292 67.737 2.95599C67.737 2.28279 67.0876 1.7482 66.2697 1.7482C65.4759 1.7284 64.8024 2.28279 64.8024 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M59.8212 2.95599C59.8212 3.6292 60.4706 4.1638 61.2885 4.1638C62.1063 4.1638 62.7558 3.6292 62.7558 2.95599C62.7558 2.28279 62.1063 1.7482 61.2885 1.7482C60.4706 1.7284 59.8212 2.28279 59.8212 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M54.8397 2.95599C54.8397 3.6292 55.4892 4.1638 56.307 4.1638C57.1249 4.1638 57.7744 3.6292 57.7744 2.95599C57.7744 2.28279 57.1249 1.7482 56.307 1.7482C55.4892 1.7284 54.8397 2.28279 54.8397 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M49.8588 2.95599C49.8588 3.6292 50.5082 4.1638 51.3261 4.1638C52.1439 4.1638 52.7934 3.6292 52.7934 2.95599C52.7934 2.28279 52.1439 1.7482 51.3261 1.7482C50.5082 1.7284 49.8588 2.28279 49.8588 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M44.8777 2.95599C44.8777 3.6292 45.5272 4.1638 46.345 4.1638C47.1629 4.1638 47.8123 3.6292 47.8123 2.95599C47.8123 2.28279 47.1629 1.7482 46.345 1.7482C45.5272 1.7284 44.8777 2.28279 44.8777 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M39.8728 2.95599C39.8728 3.6292 40.5223 4.1638 41.3401 4.1638C42.158 4.1638 42.8075 3.6292 42.8075 2.95599C42.8075 2.28279 42.158 1.7482 41.3401 1.7482C40.5463 1.7284 39.8728 2.28279 39.8728 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M34.8916 2.95599C34.8916 3.6292 35.5411 4.1638 36.3589 4.1638C37.1768 4.1638 37.8263 3.6292 37.8263 2.95599C37.8263 2.28279 37.1768 1.7482 36.3589 1.7482C35.5651 1.7284 34.8916 2.28279 34.8916 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M29.9105 2.95599C29.9105 3.6292 30.56 4.1638 31.3778 4.1638C32.1957 4.1638 32.8452 3.6292 32.8452 2.95599C32.8452 2.28279 32.1957 1.7482 31.3778 1.7482C30.584 1.7284 29.9105 2.28279 29.9105 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M24.9294 2.95599C24.9294 3.6292 25.5789 4.1638 26.3968 4.1638C27.2146 4.1638 27.8641 3.6292 27.8641 2.95599C27.8641 2.28279 27.2146 1.7482 26.3968 1.7482C25.603 1.7284 24.9294 2.28279 24.9294 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M19.9481 2.95599C19.9481 3.6292 20.5976 4.1638 21.4154 4.1638C22.2333 4.1638 22.8828 3.6292 22.8828 2.95599C22.8828 2.28279 22.2333 1.7482 21.4154 1.7482C20.5976 1.7284 19.9481 2.28279 19.9481 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M14.9672 2.95599C14.9672 3.6292 15.6166 4.1638 16.4345 4.1638C17.2523 4.1638 17.9018 3.6292 17.9018 2.95599C17.9018 2.28279 17.2523 1.7482
316.4345 1.7482C15.6166 1.7284 14.9672 2.28279 14.9672 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M9.98621 2.95599C9.98621 3.6292 10.6357 4.1638 11.4535 4.1638C12.2714 4.1638 12.9209 3.6292 12.9209 2.95599C12.9209 2.28279 12.2714 1.7482 11.4535 1.7482C10.6357 1.7284 9.98621 2.28279 9.98621 2.95599Z",fill:"#5840D2"}),a.createElement("path",{d:"M5.00513 2.95599C5.00513 3.6292 5.6546 4.1638 6.47246 4.1638C7.29031 4.1638 7.93978 3.6292 7.93978 2.95599C7.93978 2.28279 7.29031 1.7482 6.47246 1.7482C5.6546 1.7284 5.00513 2.28279 5.00513 2.95599Z",fill:"#5840D2"}))),BU||(BU=a.createElement("path",{d:"M720.477 47.6636L714.198 58.6008L762.795 61.9411L772.539 42.9798L720.477 47.6636Z",fill:"#B3B3E0"})),WU||(WU=a.createElement("path",{d:"M634.222 45.6545V39.1875L701.252 43.1932L702.721 56.8679L687.765 76.8967L672.81 78.6296L633.154 49.3965L634.222 45.6545Z",fill:"#B3B3E0"})),VU||(VU=a.createElement("path",{d:"M633.33 77.4742L602 52.1967L645.611 43.8336L679.792 74.2721L633.33 77.4742Z",fill:"#CACAED"})),GU||(GU=a.createElement("path",{d:"M633.506 142.118L633.33 77.4742L679.792 74.2721L680.156 142.37L633.506 142.118Z",fill:"#DFDFF4"})),HU||(HU=a.createElement("path",{d:"M755.637 76.5827L679.792 74.2721L680.156 142.37L755.812 142.282L755.637 76.5827Z",fill:"#D4D4F4"})),qU||(qU=a.createElement("path",{d:"M783.752 56.2904L704.479 53.2892L679.741 74.2973L755.586 76.6329L783.752 56.2904Z",fill:"#CACAED"})),YU||(YU=a.createElement("g",{opacity:.78}
3,a.createElement("path",{d:"M734.833 138.888H759V121.888H729C729.966 127.946 731.974 133.667 734.833 138.888Z",fill:"#906DCD"}),a.createElement("path",{d:"M801 97.8879H811V112.888H801V97.8879Z",fill:"#5943A8"}),a.createElement("path",{d:"M788 150.888H774.234C762.511 150.888 753 141.482 753 129.888C753 118.294 762.511 108.888 774.234 108.888H788V150.888Z",fill:"#6B50B5"}),a.createElement("path",{d:"M787 108.888H781.635C774.655 108.888 769 114.728 769 121.936V137.839C769 145.048 774.655 150.888 781.635 150.888H787V108.888Z",fill:"#5943A8"}),a.createElement("path",{d:"M844 121.953C844 121.706 843.987 121.471 843.974 121.223C843.974 121.145 843.961 121.067 843.961 120.989C843.948 120.832 843.935 120.663 843.922 120.506C843.909 120.415 843.896 120.323 843.883 120.232C843.87 120.089 843.844 119.945 843.818 119.802C843.805 119.711 843.792 119.619 843.766 119.528C843.74 119.385 843.714 119.241 843.675 119.111C843.649 119.02 843.636 118.928 843.61 118.837C843.571 118.694 843.532 118.55 843.493 118.407C843.468 118.329 843.441 118.237 843.428 118.159C843.377 118.002 843.325 117.846 843.273 117.69C843.247 117.624 843.234 117.559 843.208 117.494C843.13 117.272 843.052 117.064 842.961 116.855C842.948 116.816 842.922 116.79 842.909 116.751C842.831 116.581 842.753 116.399 842.675 116.229C842.662 116.216 842.662 116.19 842.649 116.177C840.532 111.861 836.104 108.888 830.974 108.888H823.065H787.987C787.532 108.888 787.091 108.914 786.662 108.953C786.221 108.992 785.792 109.07 785.377 109.149C784.74 109.279 784.13 109.462 783.519 109.67C783.117 109.814 782.727 109.983 782.351 110.166C781.974 110.348 781.597 110.557 781.247 110.766C779.454 111.861 777.948 113.374 776.87 115.16C776.649 115.525 776.455 115.89 776.273 116.268C776.091 116.646 775.922 117.038 775.779 117.442C775.558 118.042 775.39 118.668 775.26 119.306C775.169 119.737 775.104 120.167 775.065 120.597C775.026 121.028 775 121.484 775 121.927V137.835C775 138.044 775 138.253 775.013 138.461C775.013 138.527 775.026 138.592 775.026 138.657C775.039 138.8 775.039 138.944 775.052 139.074C775.065 139.153 775.065 139.231 775.078 139.309C775.091 139.439 775.104 139.57 775.13 139.7C775.143 139.778 775.156 139.857 775.169 139.935C775.195 140.065 775.208 140.196 775.234 140.326C775.247 140.391 775.26 140.469 775.273 140.535C775.299 140.678 775.338 140.835 775.377 140.978C775.39 141.03 775.403 141.069 775.416 141.121C775.467 141.317 775.519 141.513 775.584 141.695C775.597 141.747 775.61 141.786 775.623 141.826C775.675 141.969 775.714 142.112 775.766 142.256C775.792 142.321 775.818 142.386 775.844 142.451C775.896 142.569 775.935 142.686 775.987 142.817C776.013 142.882 776.039 142.96 776.078 143.025C776.13 143.143 776.182 143.26 776.234 143.364C776.26 143.43 776.299 143.495 776.325 143.56C776.39 143.677 776.442 143.795 776.507 143.912C776.533 143.964 776.558 144.029 776.597 144.081C776.688 144.251 776.779 144.42 776.883 144.577C776.883 144.577 776.883 144.577 776.883 144.59C776.987 144.759 777.091 144.916 777.195 145.085C777.234 145.138 777.26 145.19 777.299 145.242C777.377 145.346 777.454 145.464 777.532 145.568C777.571 145.62 777.623 145.685 777.662 145.737C777.74 145.842 777.818 145.933 777.896 146.024C777.948 146.076 777.987 146.142 778.039 146.194C778.117 146.285 778.208 146.389 778.286 146.481C778.338 146.533 778.377 146.585 778.429 146.637C778.532 146.741 778.623 146.846 778.727 146.95C778.766 146.989 778.792 147.015 778.831 147.054C778.974 147.198 779.104 147.328 779.247 147.459C779.286 147.485 779.312 147.524 779.351 147.55C779.455 147.654 779.571 147.745 779.688 147.837C779.74 147.876 779.792 147.928 779.844 147.967C779.948 148.045 780.039 148.124 780.143 148.202C780.208 148.241 780.26 148.293 780.325 148.332C780.429 148.41 780.519 148.476 780.623 148.554C780.688 148.593 780.74 148.632 780.805 148.684C780.909 148.763 781.026 148.828 781.143 148.893C781.195 148.932 781.247 148.958 781.299 148.997C781.468 149.102 781.623 149.193 781.792 149.284H781.805C781.974 149.375 782.156 149.467 782.325 149.558C782.377 149.584 782.442 149.61 782.494 149.636C782.61 149.688 782.74 149.754 782.87 149.806C782.935 149.832 783 149.858 783.065 149.884C783.182 149.936 783.299 149.975 783.416 150.027C783.48 150.054 783.558 150.08 783.623 150.106C783.74 150.145 783.87 150.197 783.987 150.236C784.052 150.262 784.117 150.275 784.182 150.301C784.325 150.34 784.481 150.392 784.623 150.432C784.662 150.445 784.714 150.458 784.753 150.471C784.766 150.471 784.779 150.471 784.779 150.484C785.805 150.745 786.87 150.888 787.974 150.888H813.299H830.961C838.143 150.888 843.961 145.046 843.961 137.835V121.953H844Z",fill:"#906DCD"}),a.createElement("path",{opacity:.2,d:"M842 116.17C839.878 111.858 835.44 108.888 830.299 108.888H822.372C822.242 110.803 821.695 112.588 820.315 113.591C822.359 114.047 822.202 117.46 819.847 117.46H811.659C809.72 119.31 808.861 121.876 809.59 125.159C810.943 131.217 808.536 133.223 795.181 135.972C787.007 137.652 784.625 145.026 784 150.484C785.028 150.745 786.096 150.888 787.202 150.888H812.584C812.727 149.429 813 147.814 813.469 146.198H793.424C790.899 146.198 790.899 142.277 793.424 142.277H815.109C816.788 139.333 819.482 136.858 823.8
303 135.972C837.158 133.223 839.553 131.217 838.212 125.159C837.301 121.016 838.902 118.033 842 116.17Z",fill:"white"}),a.createElement("path",{d:"M831 113.888H817.21H803.573H790C790 115.27 790.805 116.484 792.019 117.208C792.748 117.643 793.63 117.888 794.588 117.888H803.586H817.223H826.424C827.063 117.888 827.664 117.776 828.214 117.576C828.482 117.476 828.751 117.353 828.993 117.208C830.195 116.484 831 115.27 831 113.888ZM803.586 116.718V115.058H817.223V116.718H803.586Z",fill:"#6B50B5"}),a.createElement("path",{d:"M772 141.888C770.901 141.888 770 141.095 770 140.127V135.649C770 134.681 770.901 133.888 772 133.888C773.099 133.888 774 134.681 774 135.649V140.127C774 141.108 773.099 141.888 772 141.888Z",fill:"#FF9F58"}),a.createElement("path",{d:"M772 139.888C770.901 139.888 770 139.095 770 138.127V133.649C770 132.681 770.901 131.888 772 131.888C773.099 131.888 774 132.681 774 133.649V138.127C774 139.108 773.099 139.888 772 139.888Z",fill:"#8266F7"}),a.createElement("path",{d:"M772 128.888C773.104 128.888 774 127.993 774 126.888C774 125.783 773.104 124.888 772 124.888C770.895 124.888 770 125.783 770 126.888C770 127.993 770.895 128.888 772 128.888Z",fill:"#6B50B5"}),a.createElement("path",{d:"M772 126.888C773.104 126.888 774 125.993 774 124.888C774 123.783 773.104 122.888 772 122.888C770.895 122.888 770 123.783 770 124.888C770 125.993 770.895 126.888 772 126.888Z",fill:"#FF9F58"}),a.createElement("path",{d:"M771.059 124.837H772.849V125.512H771.059V124.837Z",fill:"#6B50B5"}),a.createElement("path",{d:"M771.617 124.279H772.292V126.069H771.617V124.279Z",fill:"#6B50B5"}),a.createElement("path",{d:"M813.866 97.2205C812.296 91.6556 810.195 86.5059 807.601 81.9787C800.972 70.3821 791.892 64 782.033 64C774.289 64.1167 765.079 70.914 765.079 78.6581L768.076 80.7075C770.995 77.1792 774.211 74.7925 777.558 73.651C783.382 75.6227 787.884 81.0578 790.932 86.3891C792.994 90.0083 795.394 94.0813 796.717 98.5047C796.964 99.3089 796.821 99.9965 797.548 100.412L803.722 103.992C804.734 104.576 805.992 104.588 807.017 104.005L812.335 100.995C813.645 100.256 814.281 98.6863 813.866 97.2205Z",fill:"#906DCD"}),a.createElement("path",{d:"M761.837 82.4199C768.283 71.1475 777.052 64.8042 786.6 64.467C785.095 64.1556 783.577 64 782.034 64H773.07C763.212 64 754.131 70.3821 747.503 81.9787C741.328 92.7842 737.93 107.066 737.93 122.178H752.263C752.328 107.222 755.727 93.1215 761.837 82.4199Z",fill:"#906DCD"}),a.createElement("path",{d:"M778 73.4128C778 73.4128 742.19 64.3138 738 121.888H756.016C756.016 121.888 757.993 82.2265 778 73.4128Z",fill:"#6B50B5"}),a.createElement("path",{d:"M798.923 101.216L794.37 98.3879C792.917 97.4799 793.552 95.2359 795.265 95.2359H815.552C817.278 95.2359 817.913 97.4929 816.447 98.4009L810.273 102.176L798.923 101.216Z",fill:"#906DCD"}),a.createElement("path",{d:"M759.924 120.888H755.694C755.476 121.321 755.27 121.768 755.09 122.227H759.937C764.192 122.227 767.663 125.656 767.663 129.888C767.663 134.12 764.205 137.55 759.937 137.55H755C755.18 138.008 755.373 138.442 755.591 138.888H759.937C764.938 138.888 769 134.86 769 129.901C769 124.929 764.925 120.888 759.924 120.888Z",fill:"#FF9F58"}))),a.createElement("g",{opacity:.78},KU||(KU=a.createElement("path",{d:"M710.919 143.591C712.36 139.67 712.36 128.353 710.919 124.433C709.477 120.512 698.192 121.022 698.192 121.022C698.192 121.022 696.387 121.871 695.141 125.543C685.972 125.935 664.233 126.929 661.87 127.673C658.883 128.627 657 130.457 657 133.999C657 137.54 658.883 139.37 661.87 140.324C664.22 141.082 685.972 142.075 695.141 142.454C696.387 146.139 698.192 146.975 698.192 146.975C698.192 146.975 709.477 147.511 710.919 143.591Z",fill:"url(#paint0_linear_984_11638)"})),XU||(XU=a.createElement("path",{d:"M710.907 124.674C710.815 124.433 710.671 124.216 710.5 124C710.329 124.204 710.185 124.433 710.093 124.674C708.636 128.491 708.636 139.509 710.093 143.326C710.185 143.567 710.329 143.784 710.5 144C710.671 143.796 710.815 143.567 710.907 143.326C712.364 139.509 712.364 128.491 710.907 124.674Z",fill:"#4A3A9B"})),QU||(QU=a.createElement("path",{d:"M701.5 143C705.09 143 708 139.194 708 134.5C708 129.806 705.09 126 701.5 126C697.91 126 695 129.806 695 134.5C695 139.194 697.91 143 701.5 143Z",fill:"#906DCD"})),JU||(JU=a.createElement("path",{d:"M701.5 142C705.09 142 708 138.418 708 134C708 129.582 705.09 126 701.5 126C697.91 126 695 129.582 695 134C695 138.418 697.91 142 701.5 142Z",fill:"#4A3A9B"})),$U||($U=a.createElement("path",{d:"M701.5 138C699.562 138 698 136.201 698 134C698 131.785 699.574 130 701.5 130C703.438 130 705 131.799 705 134C705.012 136.201 703.438 138 701.5 138Z",fill:"#906DCD"})),eF||(eF=a.createElement("path",{d:"M701.523 137.54C699.668 137.54 698.15 136.035 698.15 134.167C698.15 132.312 699.655 130.795 701.523 130.795C703.378 130.795 704.895 132.299 704.895 134.167C704.895 136.035 703.391 137.54 701.523 137.54Z",fill:"#CCCCCC"})),tF||(tF=a.createElement("path",{d:"M701.523 136.93C699.992 136.93 698.76 135.685 698.76 134.167C698.76 132.65 700.005 131.405 701.523 131.405C703.053 131.405 704.286 132.65 704.286 134.167C704.286 135.685 703.053 136.93 701.523 136.93Z",fill:"url(#paint1_linear_984_11638)"})),nF||(nF=a.createElement("path",{d:"M689.563 135.893C690.516 135.893 691.288 135.12 691.288 134.167C691.288 133.215 690.516 132.442 689.563 132.442C688.61 132.442 687.838 133.215 687.838 134.167C687.838 135.12 688.61 135.893 689.563 135.893Z",fill:"#CCCCCC"})),iF||(iF=a.createElement("path",{d:"M689.563 135.672C690.394 135.672 691.068 134.998 691.068 134.167C691.068 133.336 690.394 132.663 689.563 132.663C688.732 132.663 688.058 133.336 688.058 134.167C688.058 134.998 688.732 135.672 689.563 135.672Z",fill:"url(#paint2_linear_984_11638)"})),oF||(oF=a.createElement("path",{d:"M672.596 135.893C673.549 135.893 674.321 135.12 674.321 134.167C674.321 133.215 673.549 132.442 672.596 132.442C671.643 132.442 670.871 133.215 670.871 134.167C670.871 135.12 671.643 135.893 672.596 135.893Z",fill:"#CCCCCC"})),aF||(aF=a.createElement("path",{d:"M672.596 135.672C673.427 135.672 674.101 134.998 674.101 134.167C674.101 133.336 673.427 132.663 672.596 132.663C671.765 132.663 671.091 133.336 671.091 134.167C671.
3091 134.998 671.765 135.672 672.596 135.672Z",fill:"url(#paint3_linear_984_11638)"})),rF||(rF=a.createElement("path",{d:"M681.663 136.93C683.189 136.93 684.426 135.693 684.426 134.167C684.426 132.641 683.189 131.405 681.663 131.405C680.137 131.405 678.9 132.641 678.9 134.167C678.9 135.693 680.137 136.93 681.663 136.93Z",fill:"#CCCCCC"})),lF||(lF=a.createElement("path",{d:"M681.663 136.269C682.824 136.269 683.764 135.328 683.764 134.167C683.764 133.007 682.824 132.066 681.663 132.066C680.502 132.066 679.562 133.007 679.562 134.167C679.562 135.328 680.502 136.269 681.663 136.269Z",fill:"#FF9F58"})),sF||(sF=a.createElement("path",{d:"M706.984 126.06C706.465 126.06 706.05 125.645 706.05 125.126C706.05 124.607 706.465 124.192 706.984 124.192C707.503 124.192 707.918 124.607 707.918 125.126C707.931 125.632 707.503 126.06 706.984 126.06Z",fill:"#CCCCCC"})),dF||(dF=a.createElement("path",{d:"M706.984 125.943C706.53 125.943 706.167 125.58 706.167 125.126C706.167 124.672 706.53 124.309 706.984 124.309C707.438 124.309 707.801 124.672 707.801 125.126C707.801 125.58 707.438 125.943 706.984 125.943Z",fill:"url(#paint4_linear_984_11638)"})),a.createElement("g",{opacity:.5},a.createElement("g",{opacity:.5},a.createElement("mask",{id:"mask1_984_11638",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:699,y:131,width:10,height:10},cF||(cF=a.createElement("g",{opacity:.5},a.createElement("g",{opacity:.5},a.createElement("path",{opacity:.5,d:"M707.827 134.219C708.709 136.411 707.659 138.902 705.479 139.784C703.3 140.653 700.822 139.59 699.94 137.397C699.058 135.205 700.109 132.715 702.288 131.833C704.468 130.95 706.945 132.014 707.827 134.219Z",fill:"url(#paint5_radial_984_11638)"}))))),uF||(uF=a.createElement("g",{mask:"url(#mask1_984_11638)"},a.createElement("path",{opacity:.5,d:"M707.827 134.219C708.709 136.411 707.659 138.902 705.479 139.784C703.3 140.653 700.822 139.59 699.94 137.397C699.058 135.205 700.109 132.715 702.288 131.833C704.468 130.95 706.945 132.014 707.827 134.219Z",fill:"url(#paint6_radial_984_11638)"})))))),a.createElement("g",{opacity:.78},pF||(pF=a.createElement("path",{d:"M595.061 143.591C593.646 139.67 593.646 128.353 595.061 124.433C596.477 120.512 607.557 121.022 607.557 121.022C607.557 121.022 609.329 121.871 610.553 125.543C619.554 125.935 640.898 126.929 643.219 127.673C646.151 128.627 648 130.457 648 133.998C648 137.553 646.151 139.37 643.219 140.324C640.911 141.082 619.554 142.075 610.553 142.454C609.329 146.139 607.557 146.975 607.557 146.975C607.557 146.975 596.477 147.511 595.061 143.591Z",fill:"url(#paint7_linear_984_11638)"})),hF||(hF=a.createElement("path",{d:"M594.729 124.674C594.79 124.433 594.886 124.216 595 124C595.114 124.204 595.21 124.433 595.271 124.674C596.243 128.491 596.243 139.509 595.271 143.326C595.21 143.567 595.114 143.784 595 144C594.886 143.796 594.79 143.567 594.729 143.326C593.757 139.496 593.757 128.491 594.729 124.674Z",fill:"#4A3A9B"})),mF||(mF=a.createElement("path",{d:"M604.5 143C608.09 143 611 139.194 611 134.5C611 129.806 608.09 126 604.5 126C600.91 126 598 129.806 598 134.5C598 139.194 600.91 143 604.5 143Z",fill:"#906DCD"})),gF||(gF=a.createElement("path",{d:"M604 142C607.314 142 610 138.418 610 134C610 129.582 607.314 126 604 126C600.686 126 598 129.582 598 134C598 138.418 600.686 142 604 142Z",fill:"#4A3A9B"})),vF||(vF=a.createElement("path",{d:"M604 138C606.215 138 608 136.201 608 134C608 131.785 606.201 130 604 130C601.799 130 600 131.799 600 134C599.987 136.201 601.785 138 604 138Z",fill:"#906DCD"})),CF||(CF=a.createElement("path",{d:"M604.274 137.592C606.129 137.592 607.647 136.087 607.647 134.219C607.647 132.364 606.142 130.847 604.274 130.847C602.419 130.847 600.901 132.351 600.901 134.219C600.901 136.087 602.406 137.592 604.274 137.592Z",fill:"#CCCCCC"})),xF||(xF=a.createElement("path",{d:"M604.274 136.995C605.805 136.995 607.037 135.75 607.037 134.232C607.037 132.715 605.792 131.469 604.274 131.469C602.743 131.469 601.511 132.715 601.511 134.232C601.511 135.75 602.743 136.995 604.274 136.995Z",fill:"url(#paint8_linear_984_11638)"})),fF||(fF=a.createElement("path",{d:"M616.247 135.945C617.2 135.945 617.972 135.172 617.972 134.219C617.972 133.266 617.2 132.494 616.247 132.494C615.294 132.494 614.522 133.266 614.522 134.219C614.522 135.172 615.294 135.945 616.247 135.945Z",fill:"#CCCCCC"})),bF||(bF=a.createElement("path",{d:"M616.247 135.724C617.078 135.724 617.752 135.05 617.752 134.219C617.752 133.388 617.078 132.715 616.247 132.715C615.416 132.715 614.742 133.388 614.742 134.219C614.742 135.05 615.416 135.724 616.247 135.724Z",fill:"url(#paint9_linear_984_11638)"})),yF||(yF=a.createElement("path",{d:"M633.201 135.945C634.154 135.945 634.926 135.172 634.926 134.219C634.926 133.266 634.154 132.494 633.201 132.494C632.248 132.494 631.476 133.266 631.476 134.219C631.476 135.172 632.248 135.945 633.201 135.945Z",fill:"#CCCCCC"})),jF||(jF=a.createElement("path",{d:"M633.201 135.724C634.032 135.724 634.705 135.05 634.705 134.219C634.705 133.388 634.032 132.715 633.201 132.715C632.37 132.715 631.696 133.388 631.696 134.219C631.696 135.05 632.37 135.724 633.201 135.724Z",fill:"url(#paint10_linear_984_11638)"})),ZF||(ZF=a.createElement("path",{d:"M624.134 136.982C625.66 136.982 626.897 135.745 626.897 134.219C626.897 132.693 625.66 131.456 624.134 131.456C622.608 131.456 621.371 132.693 621.371 134.219C621.371 135.745 622.608 136.982 624.134 136.982Z",fill:"#CCCCCC"})),wF||(wF=a.createElement("path",{d:"M624.134 136.321C625.294 136.321 626.235 135.38 626.235 134.219C626.235 133.059 625.294 132.118 624.134 132.118C622.973 132.118 622.032 133.059 622.032 134.219C622.032 135.38 622.973 136.321 624.134 136.321Z",fill:"#FF9F58"})),EF||(EF=a.createElement("path",{d:"M598.813 126.112C599.332 126.112 599.747 125.697 599.747 125.178C599.747 124.659 599.332 124.244 598.813 124.244C598.294 124.244 597.879 124.659 597.879 125.178C597.866 125.697 598.294 126.112 598.813 126.112Z",fill:"#CCCCCC"})),SF||(SF=a.createElement("path",{d:"M598.813 125.995C599.267 125.995 599.63 125.632 599.63 125.178C599.63 124.724 599.267 124.361 598.813 124.361C598.359 124.361 597.996 124.724 597.996 125.178C597.996 125.632 598.359 125.995 598.813 125.995Z",fill:"url(#paint11_linear_984_11638)"})),a.createElement("g",{opacity:.5},a.createElement("g",{opacity:.5},a.createElement("mask",{id:"mask2_984_11638",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:597,y:131,width:10,height:10},DF||(DF=a.createElement("g",{opacity:.5},a.createElement("g",{opacity:.5},a.createElement("path",{opacity:.5,d:"M597.969 134.271C597.087 136.463 598.138 138.954 600.317 139.836C602.497 140.705 604.974 139.641 605.856 137.449C606.738 135.257 605.688 132.767 603.508 131.884C601.329 131.002 598.852 132.079 597.969 134.271Z",fill:"url(#paint12_radial_984_11638)"}))))),MF||(MF=a.createElement("g",{mask:"url(#mask2_984_11638)"},a.createElement("path",{opacity:.5,d:"M597.969 134.271C597.087 136.463 598.138 138.954 600.317 139.836C602.497 140.705 604.974 139.641 605.856 137.449C606.738 135.257 605.688 132.767 603.508 131.884C601.329 131.002 598.852 132.079 597.969 134.271Z",fill:"url(#paint13_radial_984_11638)"}))))))),kF||(kF=a.createElement("defs",null,a.createElement("linearGradient",{id:"paint0_linear_984_11638",x1:684.498,y1:120.998,x2:684.498,y2:147.027,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1874,stopColor:"#5C45AA"}),a.createElement("stop",{offset:.3011,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3952,stopColor:"#7256B9"}),a.createElement("stop",{offset:.478,stopColor:"#8766C7"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5454,stopColor:"#7E5FC1"}),a.createElement("stop",{offset:.5968,stopColor:"#6D53B6"}),a.createElement("stop",{offset:.6608,stopColor:"#624AAE"}),a.createElement("stop",{offset:.7506,stopColor:"#5B44A9"}),a.createElement("stop",{offset:1,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint1_linear_984_11638",x1:699.453,y1:132.288,x2:703.88,y2:136.299,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint2_linear_984_11638",x1:688.05,y1:134.169,x2:691.069,y2:134.169,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint3_linear_984_11638",x1:671.
3087,y1:134.169,x2:674.106,y2:134.169,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint4_linear_984_11638",x1:707.586,y1:125.582,x2:706.302,y2:124.579,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("radialGradient",{id:"paint5_radial_984_11638",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(703.879 135.8) rotate(-21.8633) scale(4.05477 4.51673)"},a.createElement("stop",{stopColor:"white"}),a.createElement("stop",{offset:.2113,stopColor:"#C4C4C4"}),a.createElement("stop",{offset:.6019,stopColor:"#5C5C5C"}),a.createElement("stop",{offset:.8731,stopColor:"#1A1A1A"}),a.createElement("stop",{offset:1})),a.createElement("radialGradient",{id:"paint6_radial_984_11638",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(703.879 135.8) rotate(-21.8633) scale(4.05477 4.51673)"},a.createElement("stop",{stopColor:"#FFEFDE"}),a.createElement("stop",{offset:.1269,stopColor:"#E5D7C8"}),a.createElement("stop",{offset:.3981,stopColor:"#A3998E"}),a.createElement("stop",{offset:.7887,stopColor:"#3B3734"}),a.createElement("stop",{offset:1})),a.createElement("linearGradient",{id:"paint7_linear_984_11638",x1:621.005,y1:121.003,x2:621.005,y2:147.032,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1874,stopColor:"#5C45AA"}),a.createElement("stop",{offset:.3011,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3952,stopColor:"#7256B9"}),a.createElement("stop",{offset:.478,stopColor:"#8766C7"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5454,stopColor:"#7E5FC1"}),a.createElement("stop",{offset:.5968,stopColor:"#6D53B6"}),a.createElement("stop",{offset:.6608,stopColor:"#624AAE"}),a.createElement("stop",{offset:.7506,stopColor:"#5B44A9"}),a.createElement("stop",{offset:1,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint8_linear_984_11638",x1:606.347,y1:132.344,x2:601.919,y2:136.355,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint9_linear_984_11638",x1:617.75,y1:134.225,x2:614.731,y2:134.225,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint10_linear_984_11638",x1:634.713,y1:134.225,x2:631.694,y2:134.225,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("linearGradient",{id:"paint11_linear_984_11638",x1:598.215,y1:125.639,x2:599.498,y2:124.636,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#5943A8"}),a.createElement("stop",{offset:.1933,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.3052,stopColor:"#644BAF"}),a.createElement("stop",{offset:.3964,stopColor:"#7256B9"}),a.createElement("stop",{offset:.4758,stopColor:"#8565C6"}),a.createElement("stop",{offset:.5083,stopColor:"#906DCD"}),a.createElement("stop",{offset:.5385,stopColor:"#8665C6"}),a.createElement("stop",{offset:.6144,stopColor:"#7256B9"}),a.createElement("stop",{offset:.7013,stopColor:"#644BAF"}),a.createElement("stop",{offset:.8076,stopColor:"#5B45AA"}),a.createElement("stop",{offset:.9893,stopColor:"#5943A8"})),a.createElement("radialGradient",{id:"paint12_radial_984_11638",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(601.921 135.857) rotate(-158.137) scale(4.0548 4.51672)"},a.createElement("stop",{stopColor:"white"}),a.createElement("stop",{offset:.2113,stopColor:"#C4C4C4"}),a.createElement("stop",{offset:.6019,stopColor:"#5C5C5C"}),a.createElement("stop",{offset:.8731,stopColor:"#1A1A1A"}),a.createElement("stop",{offset:1})),a.createElement("radialGradient",{id:"paint13_radial_984_11638",cx:0,cy:0,r:1,gradientUnits:"userSpaceOnUse",gradientTransform:"translate(601.921 135.857) rotate(-158.137) scale(4.0548 4.51672)"},a.createElement("stop",{stopColor:"#FFEFDE"}),a.createElement("stop",{offset:.1269,stopColor:"#E5D7C8"}),a.createElement("stop",{offset:.3981,stopColor:"#A3998E"}),a.createElement("stop",{offset:.7887,stopColor:"#3B3734"}),a.createElement("stop",{offset:1})))))}const RF=a.forwardRef(AF);n.p;var TF,PF,LF,NF,UF,FF,OF,_F,zF,BF,WF,VF;function GF(){return GF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},GF.apply(this,arguments)}function HF(e,t){let{title:n,titleId:i,...o}=e;return a.createElement("svg",GF({width:871,height:154,viewBox:"0 0 871 154",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",ref:t,"aria-labelledby":i},o),n?a.createElement("title",{id:i},n):null,a.createElement("mask",{id:"mask0_984_13062",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:871,height:154},TF||(TF=a.createElement("rect",{width:871,height:154,rx:6,fill:"#FAFAFA"}))),a.createElement("g",{mask:"url(#mask0_984_13062)"},PF||(PF=a.createElement("rect",{width:871,height:157,rx:6,fill:"#FAFAFA"})),LF||(LF=a.createElement("rect",{opacity:.1,x:319,y:22,width:195,height:129,fill:"url(#pattern0)"})),a.createElement("g",{opacity:.2},a.createElement("mask",{id:"mask1_984_13062",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:508,y:0,width:144,height:158}
3,NF||(NF=a.createElement("path",{d:"M508 0H651.039V157.263H508V0Z",fill:"white"}))),UF||(UF=a.createElement("g",{mask:"url(#mask1_984_13062)"},a.createElement("path",{d:"M605.1 107.1L601.665 1.26343L536 39.8597V143.501L542.228 147.492L605.1 107.1Z",fill:"#5F60AB"}),a.createElement("path",{d:"M607.893 108.896V5.25903L542.227 43.8553V147.492L607.893 108.896Z",fill:"#EEEEFF"}),a.createElement("path",{d:"M573.589 62.7721V38.1695L600.079 22.6006V47.2031L573.589 62.7721Z",fill:"#906DCD"}),a.createElement("path",{d:"M551.345 54.9367L567.833 45.1407C568.448 44.7733 568.953 43.9696 568.953 43.3542C568.953 42.7387 568.448 42.5321 567.833 42.8995L551.345 52.6955C550.73 53.0629 550.225 53.8667 550.225 54.482C550.225 55.0974 550.73 55.3041 551.345 54.9367Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M551.345 60.59L567.833 50.794C568.448 50.4266 568.953 49.6229 568.953 49.0074C568.953 48.392 568.448 48.1854 567.833 48.5528L551.345 58.3488C550.73 58.7162 550.225 59.5199 550.225 60.1354C550.225 60.7507 550.73 60.9574 551.345 60.59Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M551.345 66.2436L567.833 56.4475C568.448 56.0801 568.953 55.2764 568.953 54.661C568.953 54.0456 568.448 53.8389 567.833 54.2064L551.345 64.0024C550.73 64.3698 550.225 65.1735 550.225 65.7889C550.225 66.4043 550.73 66.611 551.345 66.2436Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M551.345 71.8971L567.833 62.1011C568.448 61.7337 568.953 60.93 568.953 60.3146C568.953 59.6992 568.448 59.4925 567.833 59.8599L551.345 69.6559C550.73 70.0233 550.225 70.827 550.225 71.4425C550.225 72.0579 550.73 72.2645 551.345 71.8971Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M551.345 94.0898L567.833 84.2944C568.448 83.9269 568.953 83.1232 568.953 82.5076C568.953 81.892 568.448 81.6857 567.833 82.0532L551.345 91.8486C550.73 92.216 550.225 93.0197 550.225 93.6354C550.225 94.251 550.73 94.4572 551.345 94.0898Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M551.345 99.7434L567.833 89.9473C568.448 89.5798 568.953 88.7761 568.953 88.1612C568.953 87.5456 568.448 87.3386 567.833 87.7061L551.345 97.5022C550.73 97.8697 550.225 98.6734 550.225 99.289C550.225 99.9046 550.73 100.111 551.345 99.7434Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M551.345 105.397L567.833 95.6008C568.448 95.2333 568.953 94.4296 568.953 93.8148C568.953 93.1992 568.448 92.9921 567.833 93.3596L551.345 103.156C550.73 103.523 550.225 104.327 550.225 104.943C550.225 105.557 550.73 105.764 551.345 105.397Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M551.345 111.051L567.833 101.254C568.448 100.887 568.953 100.083 568.953 99.4684C568.953 98.8528 568.448 98.6457 567.833 99.0132L551.345 108.809C550.73 109.177 550.225 109.981 550.225 110.596C550.225 111.211 550.73 111.418 551.345 111.051Z",fill:"#C8BBE6"}),a.createElement("path",{d:"M601.665 1.26343L607.893 5.25899L542.228 43.8552L536 39.8597L601.665 1.26343Z",fill:"#FFA07E"}),a.createElement("path",{d:"M634.066 118.335V14.698L568.4 53.2942V156.935L571.193 158.732L634.066 118.335Z",fill:"#7C7CD6"}),a.createElement("path",{d:"M636.858 120.13V16.4937L571.193 55.0899V158.731L636.858 120.13Z",fill:"#D7D7FF"}),a.createElement("path",{d:"M574.32 153.261V56.8809L633.73 21.9587V118.344L574.32 153.261Z",fill:"#F0F1FF"}),a.createElement("path",{d:"M630.042 38.9883L578.008 69.5704V71.4671L630.042 40.8804V38.9883Z",fill:"#EEEEFF"}),a.createElement("path",{d:"M630.042 103.886L578.008 134.469V136.365L630.042 105.783V103.886Z",fill:"#EEEEFF"}),a.createElement("path",{d:"M603.172 88.0611V63.4583L629.662 47.8894V72.492L603.172 88.0611Z",fill:"#5F60AB"}),a.createElement("path",{d:"M580.929 80.225L597.417 70.429C598.033 70.0616 598.538 69.2579 598.538 68.6425C598.538 68.0271 598.033 67.8204 597.417 68.1878L580.929 77.9838C580.314 78.3512 579.809 79.155 579.809 79.7704C579.809 80.3857 580.314 80.5927 580.929 80.225Z",fill:"#5F60AB"}),a.createElement("path",{d:"M580.929 85.8791L597.417 76.0828C598.033 75.7154 598.538 74.9117 598.538 74.2962C598.538 73.6809 598.033 73.4742 597.417 73.8416L580.929 83.6379C580.314 84.0054 579.809 84.8091 579.809 85.4239C579.809 86.0396 580.314 86.2466 580.929 85.8791Z",fill:"#5F60AB"}),a.createElement("path",{d:"M580.929 91.5318L597.417 81.7364C598.033 81.3689 598.538 80.5652 598.538 79.9496C598.538 79.3342 598.033 79.1275 597.417 79.495L580.929 89.2906C580.314 89.6581 579.809 90.4618 579.809 91.0774C579.809 91.693 580.314 91.8993 580.929 91.5318Z",fill:"#5F60AB"}),a.createElement("path",{d:"M580.929 97.1855L597.417 87.3901C598.033 87.0226 598.538 86.2189 598.538 85.6033C598.538 84.9877 598.033 84.7814 597.417 85.1489L580.929 94.9443C580.314 95.3117 579.809 96.1154 579.809 96.7311C579.809 97.3467 580.314 97.5529 580.929 97.1855Z",fill:"#5F60AB"}),a.createElement("path",{d:"M612.173 93.8425L628.66 84.0463C629.276 83.6789 629.781 82.8752 629.781 82.2595C629.781 81.6439 629.276 81.4377 628.66 81.8051L612.173 91.6013C611.557 91.9688 611.052 92.7725 611.052 93.3873C611.052 94.0029 611.557 94.21 612.173 93.8425Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M612.173 99.4961L628.66 89.6999C629.276 89.3324 629.781 88.5287 629.781 87.9131C629.781 87.2975 629.276 87.0912 628.66 87.4587L612.173 97.2549C611.557 97.6216 611.052 98.4253 611.052 99.0409C611.052 99.6565 611.557 99.8628 612.173 99.4961Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M612.173 105.149L628.66 95.3535C629.276 94.986 629.781 94.1823 629.781 93.5667C629.781 92.9511 629.276 92.7448 628.66 93.1123L612.173 102.908C611.557 103.275 611.052 104.079 611.052 104.694C611.052 105.31 611.557 105.516 612.173 105.149Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M612.173 110.802L628.66 101.007C629.276 100.64 629.781 99.8359 629.781 99.2202C629.781 98.6046 629.276 98.3984 628.66 98.7658L612.173 108.561C611.557 108.929 611.052 109.732 611.052 110.348C611.052 110.964 611.557 111.17 612.173 110.802Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M583.625 110.802L600.113 101.006C600.728 100.64 601.233 99.8358 601.233 99.2202C601.233 98.6046 600.728 98.3983 600.113 98.765L583.625 108.561C583.01 108.929 582.505 109.732 582.505 110.348C582.505 110.964 583.01 111.17 583.625 110.802Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M583.625 116.456L600.113 106.66C600.728 106.293 601.233 105.489 601.233 104.874C601.233 104.259 600.728 104.051 600.113 104.419L583.625 114.215C583.01 114.583 582.505 115.386 582.505 116.002C582.505 116.618 583.01 116.824 583.625 116.456Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M583.625 122.11L600.113 112.313C600.728 111.946 601.233 111.142 601.233 110.527C601.233 109.912 600.728 109.705 600.113 110.072L583.625 119.868C583.01 120.236 582.505 121.04 582.505 121.655C582.505 122.27 583.01 122.477 583.625 122.11Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M583.625 127.763L600.113 117.967C600.728 117.599 601.233 116.796 601.233 116.18C601.233 115.565 600.728 115.358 600.113 115.726L583.625 125.522C583.01 125.889 582.505 126.693 582.505 127.309C582.505 127.923 583.01 128.13 583.625 127.763Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M598.927 131.952L615.414 122.156C616.03 121.788 616.535 120.984 616.535 120.369C616.535 119.754 616.03 119.547 615.414 119.914L598.927 129.71C598.311 130.078 597.807 130.882 597.807 131.497C597.807 132.112 598.311 132.319 598.927 131.952Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M589.715 58.2955L618.34 41.2891C619.41 40.6554 620.287 39.2592 620.287 38.1845C620.287 37.1144 619.41 36.7607 618.34 37.3945L589.715 54.401C588.645 55.0348 587.767 56.4309 587.767 57.5055C587.767 58.5756 588.645 58.9293 589.715 58.2955Z",fill:"#C6C6ED"}),a.createElement("path",{d:"M634.066 14.698L636.858 16.4937L571.193 55.09L568.4 53.2942L634.066 14.698Z",fill:"#B1B1E5"})))),a.createElement("mask",{id:"mask2_984_13062",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-16,y:70,width:131,height:97},FF||(FF=a.createElement("path",{d:"M-16 70L51.5 70L74.5 91L115 115.5V167H-16V70
3Z",fill:"#D9D9D9"}))),OF||(OF=a.createElement("g",{mask:"url(#mask2_984_13062)"},a.createElement("rect",{opacity:.1,x:-33,y:21,width:154,height:147,fill:"url(#pattern1)"}))),_F||(_F=a.createElement("g",{opacity:.5},a.createElement("path",{opacity:.6,d:"M862.327 -35L651 -33.5426L719.256 157.721C719.208 158.401 726.786 174.287 755.886 173.947C794.654 173.461 791.933 156.506 791.885 155.778L862.327 -35Z",fill:"url(#paint0_linear_984_13062)"}),a.createElement("path",{d:"M801.55 69L781 94.3594L804.902 81.3884L801.55 69Z",fill:"#E26B29"}),a.createElement("path",{d:"M748.695 117.642L731.983 111.083L742.768 121.431L748.695 117.642Z",fill:"#E26B29"}),a.createElement("path",{d:"M764.148 54.438L759.339 56.7212L765.752 60.4134L764.148 54.438Z",fill:"#F78B43"}),a.createElement("path",{d:"M762.008 28L752 32.8095L765.36 40.3881L762.008 28Z",fill:"#F78B43"}),a.createElement("path",{d:"M716.05 24.0766L705.848 16.2065L708.811 33.7928L716.05 24.0766Z",fill:"#F78B43"}),a.createElement("path",{d:"M720.328 42.8821C721.108 42.8821 721.741 42.2492 721.741 41.4687C721.741 40.6883 721.108 40.0557 720.328 40.0557C719.547 40.0557 718.914 40.6883 718.914 41.4687C718.914 42.2492 719.547 42.8821 720.328 42.8821Z",fill:"#F78B43"}),a.createElement("path",{d:"M752.047 76.0935C753.177 76.0935 754.093 75.1772 754.093 74.0469C754.093 72.9165 753.177 72 752.047 72C750.916 72 750 72.9165 750 74.0469C750 75.1772 750.916 76.0935 752.047 76.0935Z",fill:"#F78B43"}),a.createElement("path",{d:"M767.26 101.48C768.391 101.48 769.307 100.564 769.307 99.4336C769.307 98.3033 768.391 97.3867 767.26 97.3867C766.13 97.3867 765.214 98.3033 765.214 99.4336C765.214 100.564 766.13 101.48 767.26 101.48Z",fill:"#F78B43"}),a.createElement("path",{d:"M701.966 61.9773C702.533 61.9773 702.992 61.5177 702.992 60.9508C702.992 60.3839 702.533 59.9246 701.966 59.9246C701.399 59.9246 700.939 60.3839 700.939 60.9508C700.939 61.5177 701.399 61.9773 701.966 61.9773Z",fill:"#F78B43"}),a.createElement("path",{d:"M820.453 53.4798C821.02 53.4798 821.479 53.0201 821.479 52.4532C821.479 51.8864 821.02 51.427 820.453 51.427C819.886 51.427 819.426 51.8864 819.426 52.4532C819.426 53.0201 819.886 53.4798 820.453 53.4798Z",fill:"#F78B43"}),a.createElement("path",{d:"M739.5 45L746.5 46L733.5 40.5L740.5 48L736 49.5L746.5 51L739.5 45Z",fill:"#FF9F58"}))),zF||(zF=a.createElement("g",{opacity:.21},a.createElement("g",{opacity:.4},a.createElement("path",{d:"M163.849 104.262L146.278 94.1136V54.2751L163.849 64.4237V104.262Z",fill:"url(#paint1_linear_984_13062)"}),a.createElement("path",{d:"M163.849 104.262L181.42 94.1136V54.2751L163.849 64.4237V104.262Z",fill:"url(#paint2_linear_984_13062)"}),a.createElement("path",{d:"M146.278 54.2752L163.849 64.4238L181.42 54.2752L164.227 44.5312L146.278 54.2752Z",fill:"url(#paint3_linear_984_13062)"})),a.createElement("g",{opacity:.4},a.createElement("g",{opacity:.8},a.createElement("path",{opacity:.8,d:"M163.849 64.9637L146.278 54.8151V42.0215L163.849 52.1701V64.9637Z",fill:"url(#paint4_linear_984_13062)"}),a.createElement("path",{opacity:.8,d:"M163.849 64.9637L181.42 54.8151V42.0215L163.849 52.1701V64.9637Z",fill:"url(#paint5_linear_984_13062)"}),a.createElement("path",{opacity:.8,d:"M146.278 42.0214L163.849 52.17L181.42 42.0214L164.227 32.2781L146.278 42.0214Z",fill:"url(#paint6_linear_984_13062)"}))),a.createElement("path",{opacity:.3,d:"M163.849 130.389C172.808 130.389 180.07 126.958 180.07 122.724C180.07 118.491 172.808 115.059 163.849 115.059C154.89 115.059 147.627 118.491 147.627 122.724C147.627 126.958 154.89 130.389 163.849 130.389Z",fill:"#8263C6"}))),BF||(BF=a.createElement("g",{opacity:.21},a.createElement("path",{d:"M212.54 104.262L194.969 94.1137V68.4724L212.54 78.621V104.262Z",fill:"url(#paint7_linear_984_13062)"}),a.createElement("path",{d:"M212.54 104.262L230.138 94.1137V68.4724L212.54 78.621V104.262Z",fill:"url(#paint8_linear_984_13062)"}),a.createElement("path",{d:"M194.969 68.4725L212.54 78.6211L230.138 68.4725L212.918 58.7285L194.969 68.4725Z",fill:"url(#paint9_linear_984_13062)"}),a.createElement("g",{opacity:.8},a.createElement("g",{opacity:.8},a.createElement("path",{opacity:.8,d:"M212.54 79.161L194.969 69.0124V56.2188L212.54 66.3673V79.161Z",fill:"url(#paint10_linear_984_13062)"}),a.createElement("path",{opacity:.8,d:"M212.54 79.161L230.138 69.0124V56.2188L212.54 66.3673V79.161Z",fill:"url(#paint11_linear_984_13062)"}),a.createElement("path",{opacity:.8,d:"M194.969 56.2187L212.54 66.3672L230.138 56.2187L212.918 46.4753L194.969 56.2187Z",fill:"url(#paint12_linear_984_13062)"}))),a.createElement("path",{opacity:.3,d:"M212.54 130.389C221.499 130.389 228.762 126.958 228.762 122.724C228.762 118.491 221.499 115.059 212.54 115.059C203.581 115.059 196.319 118.491 196.319 122.724C196.319 126.958 203.581 130.389 212.54 130.389Z",fill:"#8263C6"}))),WF||(WF=a.createElement("g",{opacity:.21},a.createElement("g",{opacity:.4},a.createElement("path",{d:"M261.232 104.263L243.661 94.114V75.2205L261.232 85.3961V104.263Z",fill:"url(#paint13_linear_984_13062)"}),a.createElement("path",{d:"M261.232 104.263L278.83 94.114V75.2205L261.232 85.3961V104.263Z",fill:"url(#paint14_linear_984_13062)"}),a.createElement("path",{d:"M243.661 75.2204L261.232 85.396L278.83 75.2204L261.61 65.5034L243.661 75.2204Z",fill:"url(#paint15_linear_984_13062)"})),a.createElement("g",{opacity:.8},a.createElement("g",{opacity:.8},a.createElement("path",{opacity:.8,d:"M261.232 85.9355L243.661 75.787V62.9663L261.232 73.1419V85.9355Z",fill:"url(#paint16_linear_984_13062)"}),a.createElement("path",{opacity:.8,d:"M261.232 85.9355L278.83 75.787V62.9663L261.232 73.1419V85.9355Z",fill:"url(#paint17_linear_984_13062)"}),a.createElement("path",{opacity:.8,d:"M243.661 62.9665L261.232 73.1421L278.83 62.9665L261.61 53.2495L243.661 62.9665Z",fill:"url(#paint18_linear_984_13062)"}))),a.createElement("path",{opacity:.3,d:"M261.232 130.389C270.191 130.389 277.453 126.958 277.453 122.724C277.453 118.491 270.191 115.059 261.232 115.059C252.273 115.059 245.01 118.491 245.01 122.724C245.01 126.958 252.273 130.389 261.232 130.389Z",fill:"#8263C6"})))),VF||(VF=a.createElement("defs",null,a.createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:1,height:1},a.createElement("use",{xlinkHref:"#image0_984_13062",transform:"matrix(0.00408357 0 0 0.00617284 -0.0022792 0)"})),a.createElement("pattern",{id:"pattern1",patternContentUnits:"objectBoundingBox",width:1,height:1},a.createElement("use",{xlinkHref:"#image1_984_13062",transform:"matrix(0.00446429 0 0 0.00467687 0 -0.00042517)"})),a.createElement("linearGradient",{id:"paint0_linear_984_13062",x1:755.863,y1:179.359,x2:756.633,y2:-17.8056,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{offset:.0894,stopColor:"#EA6B4E"}),a.createElement("stop",{offset:1,stopColor:"white",stopOpacity:0})),a.createElement("linearGradient",{id:"paint1_linear_984_13062",x1:164.554,y1:63.801,x2:144.204,y2:96.9525,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint2_linear_984_13062",x1:183.921,y1:74.1604,x2:161.621,y2:84.2636,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint3_linear_984_13062",x1:146.266,y1:54.4721,x2:181.433,y2:54.4721,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint4_linear_984_13062",x1:146.266,y1:53.4912,x2:163.85,y2:53.4912,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint5_linear_984_13062",x1:163.85,y1:53.4912,x2:181.433,y2:53.4912,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint6_linear_984_13062",x1:146.266,y1:42.2186,x2:181.433,y2:42.2186,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint7_linear_984_13062",x1:213.245,y1:75.2928,x2:201.208,y2:102.682,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint8_linear_984_13062",x1:232.643,y1:82.7099,x2:213.438,y2:94.8811,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint9_linear_984_13062",x1:194.959,y1:68.6748,x2:230.127,y2:68.6748,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint10_linear_984_13062",x1:194.957,y1:67.6885,x2:212.541,y2:67.6885,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#AE95DA"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint11_linear_984_13062",x1:212.541,y1:67.6885,x2:230.152,y2:67.6885,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#B7A0DF"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint12_linear_984_13062",x1:194.957,y1:56.4159,x2:230.152,y2:56.4159,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#A68AD6"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint13_linear_984_13062",x1:261.937,y1:80.7549,x2:253.546,y2:104.281,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint14_linear_984_13062",x1:281.335,y1:86.7737,x2:264.615,y2:99.8319,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint15_linear_984_13062",x1:243.653,y1:75.4378,x2:278.82,y2:75.4378,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint16_linear_984_13062",x1:243.649,y1:74.4496,x2:261.233,y2:74.4496,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint17_linear_984_13062",x1:261.233,y1:74.4496,x2:278.843,y2:74.4496,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("linearGradient",{id:"paint18_linear_984_13062",x1:243.649,y1:63.1904,x2:278.843,y2:63.1904,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#906DCD"}),a.createElement("stop",{offset:1,stopColor:"#906DCD",stopOpacity:.3})),a.createElement("image",{id:"image0_984_13062",width:246,height:162,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPYAAACiCAYAAAByDTApAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAACChSURBVHgB7Z1ZkFtnlcfPvVq71fu+2e62nXYS746XGGdimxAnGQYCSTFVFAxOXqlkElcKhqqpmjjF1MwT5c488MbEUBQwM0USQoAkFIlngECC13jBa7rd+76qWy3pLvOdT0truZKupKvt6vyqREutK6N0919nP58ABGFCTr14oU5U4AVVVV5kD+s0LjmtWnyvnOg7OAAmRACCMBmnnjv7JUEUToEK3bHPbdpRC717GsHmsMPU6CrMjfv7Wtc5Xtl9tH4eTAQJmzANp178yxFBtrwMoB6Jfa7rnir47N9vAM+KCBNDfpAlNfycAMKAXxSPHjxaMQAmgYRNlDzodgsqvAwKd7ujqGm0w6Nf64YKlxMGb/miBB0Jitsi+nabxXJbgSBKmFf/8cLLqhwfRzsqLbDrcAtsPdgKo5/6YHzQG/U60SKAaFNAUCzg9ynMa1e7vYrtGfZUH5gAEjZRknC3WxFfY8mx7tjndh1pgX2fa4PJYQVunPfEvVZwStDe44JKl5WJWoXBqx5QZBWY1p8EEjZB5B/mdncLsvoayNpx9N7PtYPN6YQbF+Pd7opqCzR22PjXEDa7ABarwIXNzPYuMAkUYxMlQao4+uEvr4OW9dXQf80LvlUl6nlZlaGmWYSO7irNf3vgsgf83sBrJNHSY4YkGllsouhhcfQLLI4+CQni6C0PNDG3W45zu/2SBG3rK6CutZLH1OUECZsoWjCOBlnsY3H0ztjn7j/QyNzuNnAvCnDnii/utVYnK2L31nBXuxwhYRNFR6o4+sATHWBzOGHgRnwc7VN8sPG+mqg4uhwhYRNFQ7gNNEH56jCLo7u21AXj6PjyFSbG6lpdQJCwiSLh1PPnnhFk5ZSaqB59oBlGByTN8pWrQYC2DRVlF0cng4RNFBS9baA3LnrjXovudl27BapqbEBEQ8ImCgLG0SDJJwVZOI4F5Eiauyrg4afWRcTRUtTzNrsIrT32so+jk0HCJvJKVBwtCHFu94HH22HzribeBro0Hx9HVzUC1LbYwOkkUSeDhE3kDT5OqbA4WmOcEttA9xxpg8kRWTOOdtYK0LmR4mi9kLCJnBMVR8cMV0XG0bevaLeB1rSIUFNvB0I/JGwiZ4TbQHn5KlqwkeOUQ3f8rHwVHUdjG2hduwhtXU4g0oeETeSEbMYp61utZdkGaiQkbMJQshmnVKwSdN4TGKcksoN+goQhZDNOKdpU6GCJMSpfGQcJm8iK6Dg6mvhxyuhhDYyjGzvs0NxJcbTRkLCJjMlmnLKO1aLbNlRTHJ0jSNhE2iQbp9y0ow4OfaEz4TglutvdPZVlO06ZL0jYhG5onLJ0IGETKUk1ThlqA000ToltoK3r64HIHyTsEiAsLFCeCZ5ukbfjabIZp8R6dA
3NLjlEcnX/oJ17kcGGxLxAUFrq8Xb31LEa1gqJaTlpF5dVcLLnXO0452q8dRzsbFGhqroRSgJYZEnkjVlhoIR98ohPqmmtgetzPRM0vOympli+xr7vBILIdp6ztEKG+yQFEYSFhFxnodjNh9YWEhYLefqgZOjbWw/yMykUdKheBYoHleWnXx79zP7P/karTkAXZjlOi213ZIILTSX9SxQD9FooELWGhy7vvWBcTtAAzEwFXMbJchKdYMGGDCMJh9tRpyJBsxymxyYTaQIsL+m0UAYH+auW1kLBQ0Pc/2MosoYMLCi23ylS/7p5KzXKRKqjdkAGpxikPfaGLufy2hOOUsadqEMUDCbuAhIUlr8XRuCu7dUM9P+oVQI4oF1WDUegdpxzp92u2gQZO1aA20GKGhF0AtIR14Il2Jt46HkcHRJ2bclGqccrNOxthZlyhccoSh4SdZ2KFhS7vg3+7jsXQEBVHB8pFxmWXk41T4qka2AaK//8D1/1xr8Vxyu77y/dUjVKEhJ0nYoWFLu/hpzaA32+DsbsyvyYX5SIapyxPSNg5JlZYofJVz7bmYHOHnJNyUapxygcf74g4VSM6jsb3g3vGaJyydCFh5wgtYWHpqGdbE49hQx1buSgXZT9OSdtASx0Sdg6IFVZU+Wo44HbnolyU7Thle7udTtUwCSRsA4kVFnd5n+gE0VoBS/MoaJmXi5rXO6Cx1bg42uP2dfc9f/6DTMYpk9XHidKFhG0AieLoUBuoLMk5KRf5PDIMXZ+B0Tuz3Uyi3ZHPRbaBDt70MvEnOlWjgk7VMCEk7CzQmlPG0tHmXc2wtLDWBoqHsHf1Grs15NqHk3Dx/TGW+JLjnsOaeLJxSjpVw/yQsDMkdk45Mo6emQi0geaiXDTe72aCHuVfY6FTNYgQJOw00RqnfIglparqA+OUofJV4BB24xJR7jkffPzrYRj8a/zodWQbaKJxSmeDTKdqlBEkbJ3EzilrjVMiRh/Cjq42ut14i3W7Y8cpE7eB2vLmdkuSAguLHlj1SiDLMlRWBD7cVOY8iKIItTUVYLWKQOQWEnYKEo1TarWBGn0IO1pntNJorWMJjVNiTVwrjnZUATSty884JYp5YmqJiVeGCpaIq1++ATWrw6BM3QFYdYPqDYQNQssmmLN0grdtJ1jqumh2O4fQTzYJsXPKuEFk36OdoKj2qDZQow9hTxVHF8s4ZUjQoihDh3wbXBNnQbnyHheyX+sFQ5egJnjXu/GzID/wDbDUdwFhPCRsDWLnlJONUxp5CDu62pjpRrc7llAcXVVbAYO3fAU/VWNkbAFkxQ89lgGwn/8pKEy0sfl5tXETqNVtAPYqEJbG2X+gG4SZO/w5x6fvA7AbiltiN8JYSNgRaI1TRraBhsYpjS4XpYqjo8cpV6OexzbQtvUVeRunxNh5cHgWelpFqLvx3yCdex2U4HMqE7DaewzknkOgNmwG1eGKe72wNAGWKz8Hy+XX+WPLuR8BMNFLR74NhHFQITMIH6dUtccpfatrcbTR5SJ0t//w+oBmHB05Thn6UIkkUB935W2ccmJyiYUAEvRYBwB++z1QF8f591HQyvanQN72tKaYtUCB295+KWDJGYW03LSl1IToHac0ulw0O+ZhibGhhHE0toFiTVxrnLIQp2qg6+10qLC+/6fcSodAQUt7jusWdAi1uhU8T34f7L96Caxz/dxyK+07QenYCUT2lK3FDreBQqJxytyVizCOxlss8eOUStTza2uS8ruve2hkDtY1KVDx/r/xWBpRq9pAOvotLsZs8M8OQ/Xbz4GK2XMWj/u++mPIN2SxTYDeccpclYv+8PpduH1+Jup7ek7VMLo+rgfMet+6Mwnb10lgfeM7oARd70yttBa2hi5Y3Ph3UH3tZ9wtF0cvkdU2gLISdqHGKUNoiRpLaE8c38jHKW9c9Ma9plCnakSJ+q3vhOPpXMTCvvufBOHTt7nV5i55x/eAyI6yEHaicUp7RSXMTWH7pZzzrSHoeseK+j6WHDvI3sfgbT943NFud6FP1RibWIgTNWauZZb1Nhqrq57Xte3X3gJx7BIIrCyGCTkic0wt7FTjlMtuKaJclLu2S8x4x8bUuPjgyNPr4fr51ahYOro+XphfDybKeuqX8yJqxOmwwmLTXmiCt/hjgbnjavchIDLHlMLWO06Zr0PY3/nPm1GPA80mG+DWJ9GiLoZTNe4OzUEz8xKs7/xrXkQdQm3aHL5vYVZbIWFnhemErWecMp9bQ9D9jq1RP/18L0/UhdzvXLSlZoJ72QcOVtJqvnYapKnb/HsYU+da1Miy7ICWmlb2YTIBgDciK0wj7EKNU6bi4gfRLjhm4J2VNrh5cYU/RlF33uss+M5u7Cgbn5yHncvvhOvU+WwasbLfjVDbFhC2exyI7DCFsPteuHAq1AaaaJyyEIew43RWpLVGF3w3EzbG1UixiBqZml6Ee1t9IP34R/yxyurTee8EcwYSZoJvGYjsKHlh9z1/7jVQlGfwfr7GKfVy+/xs1OP79jeC3yuyuDrwYdPQaSsKUWOraA37+fBkGQSaT/wavdsejx9WVvzQ2Jib0ptgQF2cCFDSwg72dz+D97F0tO0zHeEGk3zHrX6/wm6sPAQ+EBaGQFR8MHonuoSFCbyxu4HtJrzvvLHwP350wRXFDx133wYpVKv+zDd5y2ckt25NwQ9+8CEXd0ODCx5//D64554Wdt84katestRGUbLCxlJWsNmEN3nsfLgThm55Y07VyL2ovV4Z/KtucExeglrvBKhzw/z7Y3O1IPl2ha/byMpbGFsvzQVia6tLgmJgdGweeltWQXor4ILzYY7uz0RdMzu7EhZ14PEy/OQnZ/n9/fs3sFs3E3kzZIMkq3wpA6LayXJnS+labEk+CULAjX30axvh7g1v3mNW9/IqOOeuQ9Xwh3z1j1LbBcr9XwRwNcMUj6OHw9du3l4XntCSAQdKaqDQoLWurBTB9t53+egl7//e9nTcdb/5zdWwqGP5+OO7/JatFcc1ShDctALUnJI1JSnsQOOJchzvYzJqmdWm8ylqv8Tc7pUlqB06A8Lsp6C03g/KxiOgWte6xGbH56Je08ni/+HbwbbVquLY440Js/vks+CfDCw/kPd+I84FRy5fHk35b2VrxV3Mm1FDZS4SdtaUpsWWpS8BBBbi9T7QBMN3/CyeduRP1IvTUPvpL7mVlnd8BdTa+PU+7rm1vm8MFVwsObXiDi5qqCz8Mj+01pgwk34VzII3btKsV6OlTmStExFrxXfs6ISKiuTJS9mzwHvF+Xtp2gREdpSksAWwPImlLYxbV5eZK2lX85KIihK1xQHyfV8E1ZnapXZUWJio12aq7UUg7LC1DnWXHfym5nXDw/OQKSEr/sYbl2D79g74+tf38Q/DWHCrKS4/DKE0krCzpUT3wKo8K4Vx6+K8DIJdgVwTJ+rtX9ElaqSmgV3vX3uPFkvhm1G4tf4wmDDrPZZwVBLFmS1o8dGC9/dPaz7vXvZCdYSwAfekEVlRqgueebtoZa2d91rnw7XlMXXI/UZRW/VPXVU32Fn0EPFv+QubEUdr3Tn3p7VRzN7HEl47MrIARmGxan+gsZIliAN/CtxnCTyy2NlT0pvbXTUBcVntuf3PWHKvQt3UnzMSdbGB1hon2uSr7/LHqdYRGWGxkWPHeqG6Oj5bjnPfFU4R1KlAAk8lURtCSQsb20cRv5Q7C4gueO3yLVBGr3HLFnK/Jyfd/FZqLCx4oLfZF15xpGx5LOn1WMPOFhT1vgM9UFdbAVrvp37lZjhxpvTQVJcR0PrhFGBcXTn0Mcidu8PZ75s3J+HChUBM6HLZYdu2dmhurub3ix2/5Af7xZ/wHeDo9qaa3BoZyTx5hoRE3dJUrfn8otsD60bOhHeSZ7tDjQhAwk7C6qofqqcvcBdcXX8w/P3+gbVNKMvLPvjoo7v8fk9PI3R3N0JLS3HWYdENr662gTL4CX+sduxIen2uRY3vp4ElFpU/Bd4Pilqrjk6kDwk7CRb/IggT11jW+LGouHp+zqN5fX//DL+h5S7Gtmd0ezuVm7qSZsjMTOZueCpRh95P+9z/hd9PqrCA0A8JOwForWsmz4LCYmrsLAsxP+9J+Vq04sUobL/fD47xjwAzEjz7nGIbaKaJMz2iRnD4BI/64YVAPHQgpkedyBw6zzQBvqVZnjBTIlxwZHnZC6WKhX2Mh/eCp3DDkUxccb2ixlHRdTUra0k8JmpaYGgcJGwNcGKrdvk2QIy1RubmUltsu90CVVXFlUjDJpBahwRKsC9c6diV8jXpZsT1ihpZWvbwJF4I6YHjQBgHCVsDWZHBOn1dswcc48JkoKgPH94ElZXFJWzvqgRO90D4sZ56cToW+6GHunWLGq31psZVkK+8xx9j51shkmai37zz3yRsDYTlSVA9i8xab417zudLXDNHUT/4YDfL9BafS+n1sQz//PXAA4xnUwg7neGPPXs64fDRLbpEjWBs7brys/DjfFtrgf3/22euQuWnb4NZoeRZDIqigm11mv1kHJoWO5ErHhJ1a2vh56y1wAUUSrC7S0/Lpt7hDxT1E5/fplvUuN54U+NKway1be4m2KevcHGbGRJ2DF5WW61avAuqK36W2O+X+S2WSFGLYnGec8jfVrC7S8+QhR43PF1RY93a5RLDu9WQfFlri2eKC9qyMgnlAAk7Bpy8sig+kKriha1lrUtB1CHUheB51josZKrEGYr66CP36hY1wkdFV86ER0VxvXGurTXG0fbJC2B1j8Q9p4r5X3CZL0jYMeC2JYyvoUbLDY/+Yy8lUdvtYlobSpJZ7JCo13fVg14CxwatgPT7wM5y3s6qsYbJKNDVRrfbNntD0+2WK1vA27YfzAoJOwaMsdXVRV7qimVlJfpED+wRLwVRx6I6Ugs7UeIsE1GjC+5wsPj2f0+Fj+Lla5hytG7YttDPk2OCRtZbcdaDt3kXF7aZIWHHgLGfYNMey5yfX7PY27a3w6ZNzZqi5ksZpNwvf8glWhY7E1HjWObw6GzghJFQMwpuQu01/tigZHE0ut2+pm3gr++FcoCEHYOIvriFCRutdgy+YOIMRX3fvW2aokaLL7tnwCFjoqp4qolKxOeM4E0+bmqUqJHBkVnYUjEI0m+Du9VwE+oeYxNm6Go7MI5mlloLFDOK2swxdSwk7BgEJlbF1QSCeyruuXs2NzOX0grt7bUJRe1bnIbq228xd74HgoteigKLxQJC6NA7X3Jhxw5/HDiwDh56uDdtUWNc3du8yrLgfYETRlhs7//C9wxzwXXF0cztRve73CBhx2CzWsBf0Qj28U+YH+nl9ewQGzc2JXwdut5oqbmo/ex1juKqZ2NjjeCs4sIWlpKfZunxrOUSUNRoqdtbayEdsF69vnaRifqf16a3DMyCo9vtHPtIM45WbS5YZYkxs8fRySBha6B27gEY/guIo+fjhkC08PlkUJbGoLr/3bWVxNdwr3jxbFix2Wwgt20HYfIOCGOXkl6L64KHmQtdU+2Erds7MxJ1nXMVKn7372sjonhyJ4uts0VcnQPH1MWEcTS63f6GLWXldmtBwtbAYq8E6NoN4sgFUFu2JtxGilba616C6nmWsBn6mF+3tr10DoqJKpcDVqo2ADrBwtI4CMwdTzRNhTvAn35qD098Wa3p5QnQ/UZRt/7hFVCDZ2xjsizbkzt5GyhLjKHrrYVU2wPelt1lL+gQJOwEyMxSW6bvgPXy/8BK214QO7aHE1A4JKL6Wew4dgHqZ65w11vB1UnsNcW66BAFusTc01B0a7nxXkoLmq6o7w4z97tmESp+HeF+bzkG/gQ7y/WSrA0U3W1f49akbrd72Qczs8uwYV35xNok7ASEdoeLN9+FioH3QZg4y/54mngpTHRPgxpMrvHzujYc1OwrLzbEyjqQ27eDZewyCLfeBTDANUawTj02MQ/3VM+A9dffjRb14W9DpmAcjdludL9jwTial69quiHVe7t6fQzqaiqgnCBhJ4G71ixeFhaGQZy5HciUSz6WNW8GtZW56C33l9QqYlelAxZ7Pg/1TNgi80YsN9/Lup48M7vCyoBeuHf5DAgf/BjUYCkN3e9MLTW2gTrGPzYkjr47OAurqxJAcc7m5AwStg7QGsslYJH1oG78G5D/+l9gmesH64ff5+uR1Kr0M9VoCQeHZ6GnVYTaS/8B8q0Pw4MdPFGWQUyttw1Usekrl2G8Pz65BOUICbvMQKstHH4O4M2XeD3b9suXArVlneJGQeOZ2rU1VtjteQfkn78OctBK8+aTo9/KaIVwsjg6kzZQfJ+3P53Wda3fu9a944TV7FazFgkk7DLE37ITrMyiWs79iGfIxTdOgPTYv4Da1AuiGJ8wQ5Fg8klVZWislGC7mwn6zyz5FoylEdxZJh3+p7SbT3LRBorZ/EtXRnRd612Jav2d3320noRNlC4hVxnFbfVMgvXN58Cy+RAsrTsCvpbtIImVIMkyCEznldIMbPRcB8v4ZVBu/RGkiJbUTK10snFKJJs2UKyj87h
3aB5IvstcWLoJJIGGXMRLvBGsLW2759h+hEm8Jro9cMcHHLvd+I+3km9FxtCaqyur2dl7mSoV7bk3Ysgq/AJNAwi5zUJhoba3nfgjC2Cdc4InAhha1+xDIW45lFEejdcbyVbZtoBga3Lg1CTu3dWg+vynY+osu+fyCh5+/3dmu3bfvWVr7uFJFy5tgEkjYBO/f9h8J1JvFsUsgzNyJmgDD55XGzRmfhJkqjg653Xq5+tdxJlo55XXYYNPU6OI3LRZnJPCHXHEBzhw8WjEAJoGETUTBLbFBB+OlagPVG0ejS+10WLlQMX7GHen4OFtmR9ZCAea9/xBMBAmbyAm4wSRZHJ2qDTQEut3nLg5xtxtH5QcGZ8EIZkb9YWstgDCw7xHXaTARJGzCUFKNU+KghlTVCXrxev3BrxIMDBkj6uV5GWZH1xJrCqivgMkgYROGYGQbqBaYBNNbwkqGZ0mB8f6I89dYbL3/s1WnwWSQsImsSDlOyayzj1nprMpXjNaWatjU08Tja8xyWyzpr52am5BgemhN1OiC+wXxWTAhJOwc4Pep4PeqYHayHacMgWd5oXBTgcmzutoKfksHtNIzzPWOLG1xVDhhpkx4JCRsA1FklSdl5if8IPnMK+yk45RptoFilnt8YlGXsNMFfx9Tg35W1or/4FFleHbfMZdp6taxkLANAt08TMjgH5NZSRZHI2ih04mjMeONWW4sXYXiZ6cz+k/S4bAxF7wxLSuNvwP8feAHrMbvYx4U9cv7j1WfARNDws4SdPOmB72w6lkrnWCWdWHagzt2j4AJyEUbaOygxt3hgMA3rGuIug6/19Whf9sr/j4mWHLM79Pa6y68KYniiYOPmNP9joSEnSEYR+MfUETchpbgVYvV1bf3qDDf9/x5U5zkzk/VwDZQDUFnug0URX2nfzouy93anPk2BK8H3W5vfByNsMw3yOor+x6tOgNlAgk7TbTdPPNZAqPbQENgogzr0bGiRkudSTdZZF5DA/ZhCyjoPigzSNhpgL3FU4MRcbQJLIHgWwbx8s/BcvNdflifsuNpsFbX5eRUDYypr9/Sjs8zEXWSvAb3nqzWqr7djwimmK9OFxK2DjTKJaawBIJ7gm9QWZvomgDL7/vAeuCr7C/DHnVtOuWrXJM0jmYftpJgebYc4uhkkLCTgHE0DgpElUsU9RUzWIJ4UQeRfKC6p0GoC4xEZtIGmgqsR3d11PJmExzwaKzXl3TTyGuEwaSlqijP7nvU3NluvZCwNdCMo01mCSxnf5h89jpHp2p0ttdC9/qGtHaWh34fkf3dEXDvae+jrrKLo5NBwo4BBwQwjo6c/DGbJcCZa1w9nAipdQf4Ox/Mug00FoyjNyc5/0yLZP0BgsqqEJaqk+UaRyeDhB0kURxtNkuA45TiudcgURsNzmP7ux+BQpOwDRRh3pMqwIl9R6tNs6PMaMpe2FrlEjNagshxSmn2bsLrlC2PQSHBOHqaeUzu+fhJLoqj9VPWwg4JOjKONpsl0GoDVVe1l+jj6R3ZngySKTraQHnzD7nd+ihLYceWS8xoCZKNUwrO6jhxq42bQdpTmGa52LxGJOx3c9oiVp4gQadHWQk7WRuomf5wUp2qgadsWv6ytuIrm3O2siFVHI3NP3vLqA3USMpC2FrlEjNaAt3jlBsA5M3HWC17HNSGzWmf3pEtydpAQ0M0Ztxqkk9ML+y4cokJLUGqcUqtNlBcKYy3fBOX11gjaogGiKwoTWELMMDqNd3JLol188xoCfJyqoZB0DhlfilJYaug/oIJ9YXFWW/ccxrlElNaglyMU+aCZG2g5ThOmS9K02KLlj5QlCdnx1a68eBTq2KjcUrIbpzSaGicsrCUpLBP9O0eOPXihaOTQ8snu7a4js9N+gFvYUxoCfjplDNXczJOaTRJ10SZZIim2CnZ5BmKm315ZviO+4xnSXxZkpRulcXeggyvmskS6Imji2mcMnJNVBQ0TplXSj4r3rWJJ8NOgwlJdTql0eOUmULjlMUHDYEUIXriaKPHKTMhdRsojVMWChJ2EZGvUzWMIG5NVAQ0Tll4SNhFQranU+JB8FvuyX2cTeOUpQEJu8AkPZ0yxakauMYXbzNzyzA9uwxtix4Yn1jKicCTnapBcXTxQcIuEEacqsGPx5lc5OJGLl4ehQ3r6sFIaJyyNCFhF4iKoQ80rXQ6baC4DBBFjcfihPZ04z4xo0jWBkrjlMUNCbtISLcNdHnFy8+MRguNYj53YQjcKz64en0ctt7bBtmg51QNGqcsbkjYBSbd0ykRPE0DF+/jpk8UNS7iX/VJUOVy8C2gmULjlOaBhF1AUrWBjowtcKsca4HxBMrQ+t5l5o4PsFgbXfKtO9viTqvUS6pTNWicsrQgYRcIT8chvs1Ei8BJlKPgctnZ/Xh3uMplD1939uIwv49Cz0TUNE5pTkjYBUJL1OhST7Asd2d7XcBKC1ifnoi77u7QbNhi49dOPGZWTe9cbhqnNDck7CIALS+WrqZn3bBlcwsXK95Q6I0N8dlxFDKeTomJsraWamhlN73oOVWDxilLHxJ2EYAZbixdHXhgQ9T38eQMTIjFEjqZEhtR0jmlksYpywcSdpGgJVC02Oh219V26n6NFqnaQGmc0nyQsIsEh9P4SS06VaN8IWEXAbU1FfwWy8joAmSCnjbQvY9WnQTCtJCwiwCMsccn3LCpp5E/xmTauUtD/Nzorfe2p/NPJT9Vg8YpywYSdhEQmNKSY8pd7eF6tR70napBbne5QMIuEnDs0r3s41YbS11VVn2iTtUGSnF0eULCLgIsFpEPc3Rho0ka6DlVg9zu8oSEXQRgrVqrXp0IGqckUkHCLiH0tIHSOCWBkLBLgFSnajBH/ASNUxKRkLBzhArKgoBTHFmSapySt4HSOCURAwk7V6hMeFnomk7VILKBhJ0rBPUi+5/jeNfrkXW/LFkcrapwSVDVF6l8RaSChJ0rLNbTICun8K5Ph7D1nKqxn8YpCZ2IQOSEE327Me59E+9PjaxAZfXaj3rVG50Ew1M1+j/xaMbS2AZqFV09NCNNpANZ7ByiWsRnBUXZNTXs6RYtKjPiAshSIMPd1KgGs90pximPUhxNpE/2aVsiKadevNANkvzinqOtL2ze3Qqj/b6k11MbKGEEJOw8gQL/h2/f+8FIv9rtW9VaHBgoXzFBnwSCyBISdp5ZmPGfvHHRd1wAtTv4LapHE4bz/xOe7y+M5wnIAAAAAElFTkSuQmCC"}),a.createElement("image",{id:"image1_984_13062",width:224,height:214,xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAADWCAYAAADIDo5RAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABnlSURBVHgB7Z1rbFRnesefc2Y8NjffIBAwl8kGGsgNkg3OQhNhhLSbVJUWorZRN9pipOyXdrPY6qdKlTBSP+0Xm262H/phcVTtVuq2gVWqzSZKaiPRTeMEMCEJJGA8XGxjfL/bczlv3+d4jhkPczmX9z1zZs7zkyx7wNeZ8z/P83+f53lfAIIgCIIgCIIgCIIgCIIgvM3nH80c/qRjLgyELRQgCBt80jHVEGTKCWDQgI8VUNpjqnpy38EVESBMQwIkLHGpg1XHYeYEaNCU/n9chJE4sFPfO7S6DQhTkAAJ03R1zB5XNK2Ff1id6/NQiBqwk/WHVrcDkRMSIJEXTDcDmnpaARYGSyhn46raTGlpdkiARFZwcSXIEqcNn2cX8ofZIQESD7Ho82aPg8bQ51WDAMgfZoYESCyj6+PpRn5RtIIg4aVD/nA5JEBCJ72sIB/yhwgJ0OdguhlLzLQpChyFAuB3f0gC9DGfdWA9T5zPswumpUyF9r0HV50En0EC9CH2ywpy8aM/JAH6CFFlBeko0BlXAsf8kJaqQPiGO5cHeudnYg3gcSaGZhuufHTjNPiAIBC+ob9nDEYGpmHrznWwfmsleI352RjcuHgPJoZn+SMGfoAE6DMW+EV+/eIA3L42DN95Zj3UblwNhSYe02CA3xzwd/IbJECfgkK8+mkfj4RVsGXnWqhYWQaF4P7tCei9cl8XoR8hAfocFAC+bXq8BjbyN7eEiGnmnWsjyXTTv5AACR23/CFGOox4KHqCBEikINMfGj6vv2fUt+lmJkiAxEOI9oeYZuLqJq5yEsshARJZceoPl5cViEyQAIm8WPWHfi4rWIUESJgi1R/mEqIhPMc+T1EL2iDuFiRAwhKGEDGtTPWHwssKjJEACSIbhj/cEK4eZxqrprKCPUiAhCMGI+O+iFSyoGkIgiggJEA/oUAECE9BAiSIAkICJIgCQgIkiAJCAiSIAkICJIgCQgIkiAJCAiSIAkICJIgCQgIkiAJCAvQRTGO/g+JgnGnaKfABtDW9z2htuhRWEonT/KVvAA/CGDsFwUBLc9tz4+ADSIA+pfWtC42KAngeYBg8AetkCa25+V/qu8FHkAB9TutPP2tRVPVoAYUYYUw71vz23k7wISRAQk9LIZ5oURTFzUM6x7nweLoZbPNLupkJEiCxhIv+8CwLRJub2/ZFwOeQAImHkOcPuc9j7KRf081MkACJrAj0h1hWONn8y71tQCyDBEjkxKk/9FtZwSokQMIUuhATiTYFlB+a+wqebgZix8jn5YYESFjChD/0dVnBKiRAwhatf/dZkxJQj6cIkcoKNiABErZJ8YeMBdRmEh5BEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEIQ0aB6QcJVLHaw6DrPHgbHDjMGp+kOr28HHkAAJ1/ikY6ohoKmnFWBh498UUCILKjvypwdX+2pLegMSICGdTzrmwkGWOA0MGrJ9Dhdie0xVT+47uCICPoIESEhjMd2cOQEaNJn+IlVpiYP6jl+ESAIkpNDVMXtc0bQW/mE1WATTUg3YST/4QxIgIRT0eUGmnMiVbpoFhRhTtWP7Dq7phBKFBEgIAX1eIIE7pIHwE5ZK2R/SEdWEEPqu3LskQ3zI3Gy0sfezvg4oQYJAEAK4e320eqhvCrbuXAfrt1aCCOIxDQZ6xqC/Z1T/uBQhARLCWJiNwfWLA3D72jA8/dIWqFhZBnYZHZiG3iv3YZ5/z1KGBEgIB4V44cObPBJWwZaday0JcWZingtvCCaGZ8EPkAALzNgYq+avwh5eKzvMPdQ2vnq4BxaX7lOX7yN8JSLCV8z48jycgwR01tQoEfA4929P6G+YlqIQc4Ep5h0eOft5yuknSIAFYmyKNSgMjuvL9VpSbCzrp4fxEBT8by7CRlw6G59g3UyBU1yMZ7kYPX0mA6akg0khZvKH6PPwc0rV5+WCVkFdhke88Pgk61A06OCiOgw2CtVJ9nABn1ZUuDQ2yRrB4xj+8HOemhq+DtPM7o5bcJN7PT+KD6EI6BKYaqpBOMGwLYuBSMIoRB4RT/CI2FxTqZwFD2P4w1VVFbrf8zsUAV1gYpod55Gql1npibQOCvHMxCQ7jVEWPA6JbxESoETQ52G6yRLQBvZTTUswBo0o9okpdqIYhOh3SIASSPq8M0mf1wAFgEfbFi7EjmLwh36GBCgQ9HkYeXBhJLnAUmgMf9jLf7c9QHgOWoQRBI80h/nF3sojTxgEoWgxKBv7FsomeoEFQqCVV0N07VOgla0Ci4TxpsD9YbuWgJPFUEPMQBhKEIqADjF8Hi6AgMCLJDjdByt73oPQ8JegxGZAnR+DIBfiypv/DaGRr8AOqf4QCE9AArRJMt1sFe3zVC62FXc6oKLvvB4BM4GiXMWFWDYZATugP9TTUpH+UIEISIV1QglC84A2wAiCJYVYlFUP9i7AijUBqNkQBDVg/+lcSjdHv8kqvEwwno7ObTloJy016OZ/yxERaWnrWxcaFQVwGDcM4ogwph1rfntvJ5QgJEAL6O1jGpzWEiw80h+D8cEHQikLqVBbVwaVa63b6sDcEFQMfKqnmnaJVz1m1x/qcOEI8YetTZeqIR5vUhTVaZo7zoV3CoLBtua25zzdaucEEqAJsKygBEDf1WtsMA6j/V
3HgIsz4uSjEjdsroHxl/qcWI105Fx76PVFE1z2tC9EmEe4R26vWKCfBIVyIYYjjhLxiZ0i3nQXU5lIWngEJMAfJ9rHj6JnmpjQY4cKbm0qY+lqMhLV1IS7IzE8xppv6Aosmft4N01IUYqwyDDaJMIVHw0qlHRzS+rdde5Rg4Iy5tJR1MsZOlmq6mQkSYBawfYwloAV93vDtKEyPx8EOtZtCULkuuCRETDdReIHZ+yAbx/5QgbP8OWh2wR+O83yiufkX320Hn0ECTCM5JnRCizM93USfly3dNIvhD9fBN7r43CZW8yewsP45sItEf+gLn5cLEmASvW9ShRb+hBydGU/AEI96sajYEZmQOgfbyrthdXAE3GZ22/dBq6gBB4hLS9EfaloTqFEuvH0R8DG+F2CKz8NJherrF8ZgfkZxtJ9JLnCvk+c3dkHNGve2XHAaAdMQJkTC561oRlkhtX1s8NYk3Lg4YmobBSvg8OmdayP6+ydeLeMCBOkkVq7XV0TxvUD0/tKJSXagiNvaPIMvBYiNybys0Apa9g6WfNsomCXTXifzm16Chep+CPGVUCe1v2wIWAXN/zMW29oaJ6ZYmxaHUyREe/iqFW2pfWxxWqEh3+dn2kbBCrjXyYUPezJuNIRpIa5QYgFdFEwt0yPebPgHUsW37Gfy1J3GnuzjGwE6mUo3tlG4fvGeKSGa3esEywPzj9bDfN1LetRyAgp5jgsPIx8K0WUejD3xtB4I05R8CqpfEAlo4/Ws3eCQfNvsoThvcJFa3dMyvrpOfwsNfwWhEWtlChE+z6hNYiM4jj1hdLYZQcPYnF7kY0+uUrKroKntY1a+7vy7t/RFmHyU81VSwx9a3UL9pde2wfbnMy/woAhCQ90QnLqb83uI8HnYhYPCw64cKd+fl3WS/tCXNT4zlJwA08sKYBGzAjRAIeKTaMUj5hKgAQ7h4txf+iINppd6hKp9wlGqif2n2IearxXOaZM3UNkiJyWVguJCQHIq3ZUNkJAFSWcXxPiFj2klRidMEZVEFOJrNkOseocTMegRtvxel+lWOBwCxjcHQnywbaIGByktXU5JCNBoHxMxGBuqCIBXwItdVAHd7ryhAYoQResgLQ3r0/jkD5dR1KugmG6OTbB2kVPpXhKgKDCCrox84Hj6AtNhTFsdTeMv1g8v0bYYixSlAFN2H+vF3k0oMtQFd9YkUGy4tcWK2/8jtOBvCLGCp7Kqve9bLWVbjCKk6ASop5v8DoovIAje7BYjhcjh2GxgKohRRJXQBZP6M3BTJ5l/j7FJlAMhLvrDSdbh102Ei0aAyw41kbBFHa44YqRwLTrxCxYv3vL7l0AkxqZO+H1lDPtmAoWIP9O22Ll9SPrDothWXySeF2BK+1ivrF2m9dpbck6vcpXci7Y8pEHl6gfDvRipcMtBUQS5N3Nj2DcdJeU5tEvSH3ZwXy/zDA1P4WkBunSoib7aiLU1ZOfjk3Dk+3e5SMQLcfeuMfibI71Qt+FBpwz+XIdzesuI8xVKp21tdlisTz4BAghzX9/qF3/oyUK8yLKCFYz0zViwuNZTCV1f1MLktLPeyroNc1C/e0R/byBpVGgJfc8ZSdMW6eBNRFYPqqhpfK/iKQEm28daC32uQurFO8XFd/XmGui6bH02ENPNl14Ygl08qhq4MSpkoKfW3NuiR5MB3jwWHq131BhgllIVoicE6LR9TAbpFy8KEaPh1Z78s4EoPEw3d+8c1z9GRLWQ2UFvO8NFGUHRkCWnOGRF7xyUXFtbwQVoHGoCHj18I/3iHR4th9+f25g1LcU089D+e8sWWgT0UwrBzrRFKvq8IUbvpF+2Aq7I4gqzGpuGRHmNftCMAyLFcBqwGQomwEL5PLukX7zp/hAXbQ7tHxTu8wSOCumYnbZIx4nPy7Tzt4ibUimkpa4LcNlZ6UVG+sW7EFXh8rXqxZRz54P6YTGMCmWbtkjHic8z0/gtRIiLY0/vFKMQXRWgcagJuODz8K6L6Q6+sIkVYr1KqYwKoUD0Bu0sInfi8/D5Mdv4LWhhqij9oSsCNHYfAxd8HgoPPVtqcVvACUIPYVy8hRwVMhAhxBB/zgLco+H3wOl8Oz4PyfT8m0WYEBdPe+qGIkCqADHdTE6lSy8r5ErZDLyyGJKO01EhxM3yRibMPP9mEegPm70+jS9NgHpNT5XTt5mO1YNOHJ4gJBQRR5OlUgghyjpoRsg0vseHgKUJEFuJQLL4MM0p54sidnofvRAxRB9Nloob0d7J828WAa9Td3WVImxbcNFIESA202I/H0jCSNlEHHQiwx/mQ+bRZOnIEKLI598sToTIgC/OVCkt4EGkCJBHP5yx2QMSEJ2yGbgSMWwusjiFJbe2wMUVEWC/bCEmLpCFjS9aF6ECndWVykHwILL2hBEuPtkXr7H5kEx/WOhRIVECLDo83OwhZRwpOm/uFFmz6MOykQ9cuXjxQnWy50kuSmBUSAd38o6ufRrcxLAKdlLQ6bEoeBUpKegf3x9kT+4XU/zG7Q5kdfPnA9M2u/WwXJTKqBBmJRX9/yt0oDgdJ/2nBrjP6wsH13ly9E5KCvr1J/f1jWdF7DBWgHMOpIMXUwK3oi/yUSH83njwp9m2NquIuHlgNtbdMQBeRYoAMeR3/f6uvgO0UzAKMTXEo8Y34NYeJ26UKIyDWYJciMU+KmRsIizqhiLy5oHXoZdTUGkb82LYj84loP7PNsPqmhA4IbruKb5KGZYaMZBCzOw5OZgllUKPChk3FJX//BV9523dUETePDDynf+vW3D7qrePpZC6Mzb+8aP3ZiH8chW8UL8FnGC8wGUrHpGS7hS6TW3pJlPko0Io3pnv/Ll+QzGbtYjweal83nUHvv1wVPhioAykGNO2ty6w1MdfTd/Ro+Cbb+6DujrngxB6IXj0W0cRw0D23ix2KJVRITNbYohcJLp+fQj+8Iev4fbNMXhq1dZl/9f0i+/6ZxEmE6OjM/Dzn38E9fXb4NVXn4La2pVgl8U75mLEsLsKJ2pmLzh9Vx+U1ULVwqJn6sEshRwVcnoeRK6sRaTPm5uLwbvvdkNX1y39cUgtniNPXIuAUbb8xX7llSe5EJ8EEVhZhRPl8zJdxDLSWH0S/s4VGJtaDevWjIFSs6FoR4Ww7xVHt/QZTQEZBwqvs/M6nDt3Xf/YAAVIETAPmCrgHeuVV3bBiy+GwQlmV+FECCTXRSzgBKFlaAkGQ/fKYHz0Gf3x0OhjUFsRgrUWtxEVMSpknAeh/302n0ORnTiYbv7mN5/rmVUxIycC/uwC7mIdNh5nioCpoC988839jtJSA1zNS1+FE+HzrF7ETiPG2GAcRvujugjTKQupUFtXBpVr898/PTwqZIvR0Vn49a8/gxs3hrJ+zkMRUFG6m/75eU9OREg5i+sHL/6kRgGlwXg8FJ2EBGQ/unlqal5PI/ButnlzDaxYYT81ZMGKxUI3F5vG35ZMvoMLBS9iPGUIo59ZFv1hH6jxWX1lEH2iGeamNLh3Yx4mR+K4VXtGUJQz4wmYGk7AqpogBAIP30cxQlcM/B+UjfeAwvIfm20VvNHpo1Tof8ul7zCip5jvvfclvPPOp7oIcxFQVFgfqlp6zJ/Gf/ig6189OSEvJQK2Nl2qVjTWwa8gvSk7XwRMpbZ2VXKhRow/dILIebd8ESMWZTB8OwrT43GwCkbC2roQj4xK0Y0KmQF9HlqWVJ+Xi7QIGOH+7zHwKNKMKRdhWNE0PDgzbEWABihEEf7QDrIu4kwXKkYzTDfHB2MZ000r1G4KwebE+eIaFcqBUVbIlW5mIkWAERaIHmxu2xcBjyJ1ZQhFCPFEy9czd49aFaDBM89sgtde2yPEH5pB1rxhKoYQx7UtMMSjXiwqLkUMqXPwaOgbWFtmrZgvAlECxBQTywpXrvSDHZICPMsC6rHmtuf8uSdMKo2Nv21gwE7zHxcGm4ioH+bC7WHZL4f3Qqx8A8hi7n4/7H/8IriBqBaybGUFi79NhCfix9rb/7ITigBXayONjf/RyJOsE3aFKCstxZQTz1B3YzzI4O1/2wHrt1bBlp1roWKluL7TieFZuHNtBLToHPz49SHPjwoZfPFFP5w5c9lJWWGcX8wnufDaoIiQsgqaje7u33Y/t+e13ymgL9t9DyyCd0VMS7B+iCulmzeLWX3DVcKykatSVguz0fXFWpiZWIDRgWlIxDSoWucsssf597j19RD0XB6EhVleMlkZgh2v7tOjE+73KboMgaKb3/yy46hn1PM+/vgb21FPAXZKgZkj7e1vdEKRUbDugMbGfw/z0nULj4hHwSYi01LZR3mlgxEwlXIeBbfuXMejYv7Tl9IZ6BmD29eGdREaYO/tX/z94tS6yL9NVAsZiu3997/W000HdHLxNbe3/1VRbMKbiYK35zhNS5EDB3ZAQ8MOIUKUNVyaCkalX/5qU8b/W1VVDjtfrDOVlmK6eePiPZiffThypArQIFOTgpXfWdSokCE8v/i8XHimP44v1DTxhZrjXvCHIqctUkn1TO3/mHuBJJc/RMGh8FCA2cgkQINCjQoJaB9Dn3cKYLqtvf2Ytwf9TOKpBlURaSkK8Uc/egF27HgEnCJyz5P0sZt8AkSCZSpserxWFyKCKSamm/09o8vSzUzkEiDi5qiQmfaxfPCI185/I77I8tcRKCE82SGeFGIbF+IPwSYi/aGTtDSbZzIjQAP0h+gNUXz5hGeQT4AGmf42kT7P6GJxQGdydbMTShBPCtBAhD/EsSf0h076SxGrCxn5PJMVAdrBrAANRI8KWW0fy0BRlhWs4mkBGnB/yNNSdtQL/jDfQoZZz+Q1AYrCbvtYKii8UvJ5uSgKASKi/OFbbx0QkpZmWsiw4plKTYDo895//6ulqXSb8HQzfqzUfF4uikaABihEBsEz4GD7e1H+ENNSjIjGAZ1WFitKRYB+bB8TSdEJ0MCpP0RPiPXDQow94arqr/5JbsEfN0U++rMqqXubiiorcOG1gE8pWgEaLPpDFKI93Bx7Sh1zSu+EkcFPf3xdyqxeX984vPvuZYc+j/F63kyLH3xeLopegIgIf7h9+yPwxht7pY49pR7rJVuA5SENfvJ6z9JjEaNC4trHSresYJWSEKABT0v3cBGe8erYU6oAp6bLoOuLWrjaY733Mx+7d41B/bOjuggNnArQeVkBfR72bb5+FoglSkqABiLGng4c2K7XD0WSqcXt5p1VcP7zR2By2vlIUt2GOajfPaK/N3Daw4k+D8eEMO20Scm1j4mkJAWIJNPSRi/6w0wtbtd4JMSIaEeIlatjsJdHvF2PTy79m9MeTkHtYzzaxZr9VFawSskK0MBrY0+ppLeBYVp69eYa6Lq81tTXY4qJ6ebunePL0k0nPZxiygrk88xS8gI0aGz8z8MMtFav+cNMLW5m/CGmmYf23+PR78Euak57OD/9NKKnm9Q+5h6+EaCBV7fFyNTi1je4Aj7+44Zlaem62gV4+YUh4T7PefsYlRXs4DsBIqLa2o4c2Q3PPrsJRJKpxQ39YffVati1fVJPNw2c+rz0Q01s4rv2MZH4UoAGXvWHsmf1qH3MO/hagAaixp4wLRUpRBmzejSV7i1IgCl4aVuMVETM6ombSp9qJuGJgwSYhih/KOo0YK
3dQ+5i3IQFmITn2dJp/2AA2kb2bdz7ETKXr2/61AyEFEmAeRPlDN8eeBJQVyOe5BAnQJMmxJ+4PwVZe6cbYk9NDTZJQWcFFSIAWEOEPRZ4GbCCirMBAu6yC2kQ+z11IgDZY9IeBjkK3taHYsH3s3LkbvjvUpFQgATpAhD/EiIhixPdmNhMeGZnl3u6+7u8w1XSwwELtYx6ABOiQxsYz3BPGm5yMPaWCQsT9aow3BEWG/g6jnBPBpVD0h5qUCiRAQYjwh/Kh9jGvQQIUjIjTgCVAZQWPQgKUhAh/KIJSPdSkVCABSmQxLS1L9pe6DrWPFQEkQBdw2R9SWaGIIAG6iOy01E+HmpQKJMACIEGI1D5WpJAAC8RiWhpocCBEHuWUs7ye9w75vOKFBOgBDDHylwMFuY3X68JpouRiY/xN7VZAuwX6fpvT3ZRqEgRBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEARBEITn+X9FZThsIzNZ0QAAAABJRU5ErkJggg=="}))))}const qF=a.forwardRef(HF);n.p;var YF=n(7785);n.p;n.p;n.p;const KF=e=>{let{providerVariant:t,title:n,caption:r,description:l,categories:s,iconUrl:d,to:c}=e;const u=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{u.current&&gm()(u.current,{clamp:4})}),[]);const h=null!==r&&void 0!==r?r:l,g=(0,o.sortBy)(s,o.identity).join(", ");return(0,p.jsx)(Qc,{to:c,children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,height:172,sx:{cursor:"pointer","&:hover":{backgroundColor:"grey.200"}},children:[(0,p.jsx)(i.Z,{width:172,flexShrink:0,sx:{aspectRatio:"1/1",backgroundColor:"grey.100"},children:(0,p.jsx)("img",{alt:"",src:d,width:"100%",height:"100%",style:{objectFit:"contain",objectPosition:"center"}})}),(0,p.jsxs)(m.Z,{paddingY:.5,justifyContent:"space-between",flexGrow:1,minWidth:0,children:[(0,p.jsxs)(m.Z,{children:[t&&(0,p.jsx)(v.Z,{variant:"caption",marginBottom:1,children:t}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:n}),h&&(0,p.jsx)(v.Z,{ref:u,variant:"body2",color:"grey.800",sx:{overflow:"hidden",wordBreak:"break-word"},children:h})]})]}),g&&(0,p.jsx)(Ui.G,{variant:"caption",title:g})]})]})})};KF.displayName="MarketplaceLibraryProviderCard";const XF=e=>{let{items:t,renderItem:n,getItemKey:r,cellHeight:l,minCellWidth:s,cellPadding:d=1}=e;const c=(0,De.Z)(),[u,h]=(0,a.useState)(0),{ref:m}=(0,Yi.y)((0,a.useCallback)((e=>{h(e.contentRect.width)}),[])),g=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{var e;null===(e=g.current)||void 0===e||e.recomputeGridSize()}),[u]);const v=c.spacingInt(d),C=Math.max((0,o.floor)(u/(s+2*v)),1),x=(0,o.ceil)(t.length/C),f=u/C,b=("function"===typeof l?l(f-2*v):l)+2*v,y=e=>{let{columnIndex:o,rowIndex:a,style:l,isVisible:c}=e;const u=t[a*C+o];return u?(0,p.jsx)(i.Z,{style:l,padding:d,minWidth:s,children:n(u,c)},r(u)):null},j=x*b;return(0,p.jsx)(i.Z,{position:"relative",ref:m,margin:-d,minHeight:j,children:(0,p.jsx)(i.Z,{position:"absolute",children:(0,p.jsx)(Af.j,{scrollElement:window,scrollingResetTimeInterval:75,children:e=>{let{height:t,isScrolling:n,onChildScroll:i,registerChild:o,scrollTop:a}=e;return(0,p.jsx)("div",{ref:o,children:(0,p.jsx)(Qr.rj,{height:t,width:u,rowHeight:b,autoHeight:!0,isScrolling:n,scrollTop:a,ref:g,columnCount:C,columnWidth:f,rowCount:x,onScroll:i,cellRenderer:y})})}})})})},QF=(0,a.memo)(XF);QF.displayName="UIVirtualGrid";var JF=n(21003);const $F=e=>{let{title:t,filters:n,onClick:i}=e;const o=(0,a.useMemo)((()=>n.map((e=>({id:e.value,title:"Oculus"===e.value?"Meta":e.value})))),[n]),r=(0,a.useMemo)((()=>n.filter((e=>e.checked)).map((e=>e.value))),[n]);return(0,p.jsx)(pl,{label:t,placeholder:"Filter by ".concat(t),values:r,options:o,onChange:e=>{if(0===e.length&&r.length>0)return void r.forEach((e=>i(e)));const t=e.find((e=>!r.includes(e))),n=r.find((t=>!e.includes(t)));t?i(t):n&&i(n)},checklist:!0})};$F.displayName="MarketplaceFiltersList";const eO=e=>{let{SvgComponent:t,renderTitle:n,caption:o,title:a,noTitle:r=!1}=e;return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{sx:{aspectRatio:t?Ld.Sl:void 0},justifyContent:"center",paddingX:Ld.GD,position:"relative",children:[t&&(0,p.jsx)(t,{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),!r&&(0,p.jsx)(v.Z,{variant:"h3",sx:{color:y.DG.primary[200],position:"relative",zIndex:1},children:n?n(a):a})]}),o&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",gap:1,marginTop:t?1:0,children:[o.icon&&(0,p.jsx)(i.Z,{children:o.icon}),o.primaryText&&(0,p.jsx)(v.Z,{color:"text.primary",variant:"h5",...o.primaryProps,children:o.primaryText})]}),o.secondaryText&&(0,p.jsx)(v.Z,{color:"text.primary",children:o.secondaryText})]})]})};eO.displayName="MarketplaceLibraryTitleBanner";const tO=e=>{let{titleBanner:t,bottomBannerMessage:n="Want your content to be discovered? Join the ManageXR Partner Network",filtersMap:r,filteredDocuments:l,title:s,noTitle:d=!1,emptyFilteredDocumentsMessage:c="No results found",renderEmptyFilteredDocumentsMessage:u,renderItem:h,toggleFilter:g,
3itemMinWidth:x,itemMaxWidth:f,searchPlaceholder:j="Search",onSearchChange:Z,virtualized:w=!1,cellHeight:E}=e;const S=(0,Le.I7)(),[D,M,k]=(0,zn.G)("",Be.vc.common.searchFilterTimeoutMs),I=D!==M;(0,a.useEffect)((()=>{Z(M)}),[M,Z]);const A=(0,o.isEmpty)(l),R=(0,a.useMemo)((()=>{if(!r)return!1;const e=Object.values(r).flat();return(0,o.some)(e,(e=>e.checked))}),[r]),T=(0,a.useCallback)((()=>{if(!r)return;Object.entries(r).forEach((e=>{let[t,n]=e;n.forEach((e=>{e.checked&&g(t,e.value)}))}))}),[r,g]),P=(0,a.useCallback)((e=>e.id),[]),L=(0,a.useCallback)(((e,t)=>h(e,t)),[h]),N=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(eO,{...t,title:s,noTitle:d}),(0,p.jsx)(i.Z,{sx:e=>({marginTop:3,marginBottom:2,marginLeft:"-".concat(e.spacingInt(Ld.N6),"px"),width:"calc(100% + ".concat(2*e.spacingInt(Ld.N6),"px)")}),children:(0,p.jsx)(Ie.Z,{})}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(xu,{value:D,onChange:k,TextFieldProps:{placeholder:j,InputProps:{startAdornment:(0,p.jsx)(bl.T,{pending:I})}}}),r&&(0,p.jsxs)(m.Z,{spacing:1,direction:"row",alignItems:"center",children:[(0,o.map)(r,((e,t)=>(0,p.jsx)($F,{filters:e,onClick:e=>g(t,e),title:t},t))),R&&(0,p.jsx)(C.Z,{variant:"text",size:"small",onClick:T,sx:{textTransform:"none",color:"primary.main","&:hover":{color:"primary.main",backgroundColor:"transparent"}},children:"Clear filters"})]})]}),A?(0,p.jsx)(m.Z,{height:1,paddingTop:3,justifyContent:"flex-end",children:(0,p.jsx)(v.Z,{variant:"body2",children:u?u(c):c})}):w&&E?(0,p.jsx)(i.Z,{marginTop:3,children:(0,p.jsx)(QF,{items:l,renderItem:L,getItemKey:P,cellHeight:E,minCellWidth:x})}):(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",gap:2.5,marginTop:3,flexWrap:"wrap",sx:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(".concat(x,"px, 1fr))")},children:(0,o.map)(l,(e=>(0,p.jsx)(i.Z,{maxWidth:f,height:"100%",children:h(e)},e.id)))}),(0,p.jsxs)(m.Z,{marginTop:6,paddingY:4,paddingX:3,sx:{backgroundColor:"grey.50"},position:"relative",children:[(0,p.jsx)(JF.Z,{sx:{fill:y.DG.purple[100],position:"absolute",fontSize:"87.5px",top:"50%",transform:"translateY(-50%)",zIndex:1}}),(0,p.jsxs)(m.Z,{spacing:2,alignItems:"center",justifyContent:"center",textAlign:"center",zIndex:2,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:n}),(0,p.jsx)(C.Z,{sx:{paddingX:11.5},variant:"contained",href:Be.pV.getListedOnMarketplaceForm,target:"_blank",onClick:()=>{(0,b.ec)("Discover XR Join Form Clicked",{location:"".concat(s," Library")})},children:"Join"})]})]})]}),U=(0,p.jsx)(vd,{sidebarWidths:{xs:300},sidebarContent:(0,p.jsx)(SU,{}),children:N});return(0,p.jsx)(Mn.C,{noBottomPadding:!0,toolbarBreadcrumbs:[{title:"Connect",navCategory:!0},{title:S},{title:s}],children:U})};tO.displayName="MarketplaceLibraryPageLayout";const nO=()=>{const{contentProviderFilters:e}=Rj(),{buildOrganizationPath:t}=(0,w.P)();return(0,p.jsx)(tO,{title:Ld.qD.contentProviders,renderItem:e=>(0,p.jsx)(KF,{...e,to:t((e=>e.marketplace.contentProviders.contentProvider),{contentProviderId:e.id})}),titleBanner:{SvgComponent:FU,caption:{primaryText:"Connect with developers who build immersive content tailored to your organization's needs.",secondaryText:"Whether you are looking to implement a comprehensive training platform with handpicked content, to design a custom healthcare module, or to launch a game-changing VR marketing campaign, we have a partner who can help you make it happen."}},emptyFilteredDocumentsMessage:"No Content Providers match your filters yet! Tell us more about what type of content you are looking for.",itemMinWidth:400,itemMaxWidth:600,searchPlaceholder:"Search by name, description",...e})};nO.displayName="MarketplaceLibraryContentProvidersPage";const iO=e=>{let{prefixUneditableValue:t,...n}=e;return(0,p.jsx)(Ul.z,{...n,InputProps:{...n.InputProps,startAdornment:(0,p.jsx)(i.Z,{marginRight:.5,children:(0,p.jsx)(v.Z,{noWrap:!0,color:"text.disabled",children:t})})}})};iO.displayName="UIPartiallyEditableTextField";const oO=e=>{let{open:t,contactName:n,defaultSubject:i,defaultMessage:o,disabled:r,onClose:l,onSubmit:s}=e;const[d,c]=(0,a.useState)(i.editableValue),[u,h]=(0,a.useState)(o),[g,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)(!1),j=(0,a.useCallback)((async()=>{b(!0);const{success:e}=await s({subject:i.prefixUneditableValue+d,message:u});e&&x(!0),b(!1)}),[i.prefixUneditableValue,u,s,d]);(0,a.useEffect)((()=>{h(o)}),[o,t]),(0,a.useEffect)((()=>{c(i.editableValue)}),[i,t]),(0,a.useEffect)((()=>{x(!1)}),[t]);const Z=r||f||g;return(0,p.jsx)(kn.Z,{open:t,fullWidth:!0,sx:{"div.MuiPaper-root":{maxWidth:700}},onClose:()=>l(),children:(0,p.jsxs)(m.Z,{spacing:2,paddingX:3.5,paddingY:3,children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(v.Z,{sx:{...y.cp.buttonSmall,textTransform:"none",width:55},children:"Contact:"}),(0,p.jsx)(Ln.Z,{disabled:!0,value:n,fullWidth:!0})]}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(v.Z,{sx:{...y.cp.buttonSmall,textTransform:"none",width:55},children:"Subject:"}),(0,p.jsx)(iO,{value:d,prefixUneditableValue:i.prefixUneditableValue,fullWidth:!0,onChange:e=>c(e.target.value),disabled:Z})]}),(0,p.jsx)(Ln.Z,{label:"Edit your message",multiline:!0,minRows:5,value:u,disabled:Z,onChange:e=>h(e.target.value)})]}),g?(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-end",width:1,spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(Rh.Z,{color:"success"}),(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Message Sent"})]}),(0,p.jsx)(C.Z,{sx:{paddingX:6},variant:"contained",onClick:l,children:"Close"})]}):(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",width:1,children:[(0,p.jsx)(C.Z,{variant:"text",onClick:l,children:"Close"}),(0,p.jsx)(Un.U,{variant:"contained",submitting:f,onClick:j,sx:{paddingX:5},children:"Submit"})]})]})})};oO.displayName="MarketplaceEmailProviderDialog";const aO=e=>{let{contentProvider:t,open:n,onClose:i}=e;const{user:o}=(0,w.P)(),{organization:r}=(0,d.mP)(),l=(0,Fe.pv)({method:"post",path:"discover-xr/content-providers/:contentProviderId/email-provider"}),s="I discovered ".concat(t.title," on ManageXR and am interested in working with you.\nPlease let me know what the next steps are!\n\nThanks,\n").concat(o.name||r.name),c="".concat(r.name," Connect"),u="".concat(t.title," - "),h=(0,a.useCallback)((async e=>{let{message:n,subject:i}=e,a=!1;const d=o.email||r.billingEmail,c=o.name||r.name;return await l.request({params:{contentProviderId:t.id},data:{message:n,subject:i,contactEmail:d,contactName:c},onSuccess:()=>{a=!0,(0,b.ec)("Discover XR Contact Content Provider Message Sent",{contactEmail:d,contactName:c,contentProviderId:t.id,contentProviderEmail:t.contactEmail,edited:n!==s,message:n,subject:i,title:t.title})},errorMessage:"Error sending message"}),{success:a}}),[l,t.contactEmail,t.id,t.title,s,r.billingEmail,r.name,o.email,o.name]);return(0,p.jsx)(oO,{open:n,contactName:t.title,defaultSubject:{editableValue:c,prefixUneditableValue:u},defaultMessage:s,disabled:!1,onClose:i,onSubmit:h})};aO.displayName="MarketplaceLibraryDetailContentProviderEmailDialog";var rO=n(8570);const lO=e=>{let{text:t}=e;return(0,p.jsx)(rO.D,{components:{p:e=>{let{node:t,children:n,...i}=e;return(0,p.jsx)(v.Z,{...i,children:n})},a:e=>{let{node:t,children:n,...i}=e;return(0,p.jsx)("a",{...i,target:"_blank",children:n})}},disallowedElements:["code"],children:t})};lO.displayName="UIMarkdown";const sO=e=>{let{clamp:t,text:n,withMarkdown:o,...r}=e;const l=(0,a.useRef)(null),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),[h,m]=(0,a.useState)(),{ref:g}=(0,Yi.y)((0,a.useCallback)((e=>{m(e.contentRect.width)}),[]));(0,a.useLayoutEffect)((()=>{l.current&&!s&&(gm()(l.current,{clamp:t}),u(l.current.scrollHeight>l.current.clientHeight))}),[t,n,h,s]),(0,a.useEffect)((()=>{d(!1)}),[n]);const C=(0,a.useCallback)((()=>{d(!0),u(!1),l.current&&gm()(l.current,{clamp:Number.MAX_SAFE_INTEGER})}),[]);return(0,p.jsxs)(i.Z,{position:"relative",paddingBottom:c?"".concat(24,"px"):0,children:[(0,p.jsx)(v.Z,{ref:(0,lh.l)([l,g]),...r,children:o?(0,p.jsx)(lO,{text:n}):n}),c&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Kn.Z,{onClick:C,sx:{position:"absolute",bottom:0,left:0,zIndex:1},children:"View More"}),(0,p.jsx)(i.Z,{position:"absolute",bottom:24,width:1,height:40,sx:{background:"linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%)"}})]})]})};sO.displayName="UIClampToggleText";var dO=n(24891),cO=n(52791);const uO=e=>{let{title:t,items:n,children:i}=e;return(0,p.jsxs)(dO.Z,{children:[t&&(0,p.jsx)(v.Z,{variant:"h6",sx:{marginBottom:.5},children:t}),(0,p.jsx)(dO.Z,{spacing:1,children:(0,o.map)(n,((e,t)=>{const n="string"===typeof e.value||"number"===typeof e.value,i=n?String(e.value):"";return(0,p.jsxs)(dO.Z,{spacing:.5,children:[(0,p.jsxs)(dO.Z,{flexGrow:1,flexDirection:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e.title&&(0,p.jsx)(cO.Z,{flexBasis:1,flexGrow:1,children:(0,p.jsx)(v.Z,{color:"grey.800",children:(0,o.capitalize)(e.title)})}),(0,p.jsx)(cO.Z,{flexBasis:240,flexGrow:1,children:e.clampProps&&n?(0,p.jsx)(sO,{color:"grey.800",text:i,withMarkdown:!0,...e.clampProps}):n&&Nw.yV.test(i)?(0,p.jsx)(Kn.Z,{href:i,target:"_blank",children:e.value}):n?(0,p.jsx)(v.Z,{color:"grey.800",children:e.value}):e.value})]}),e.subtitle]},"".concat(e.title).concat(t))}))}),i]})};uO.displayName="MarketplaceLibraryDetailContentSection";const pO=e=>{let{content:t}=e;const n=t.filter((e=>!(0,o.isEmpty)(e.items)||!!e.children));return(0,p.jsx)(m.Z,{spacing:3,sx:{flexBasis:2,flexGrow:1},children:n.map(((e,t)=>(0,p.jsxs)(a.Fragment,{children:[t>0&&(0,p.jsx)(i.Z,{sx:e=>({marginLeft:"-".concat(e.spacingInt(Ld.N6),"px !important"),width:"calc(100% + ".concat(2*e.spacingInt(Ld.N6),"px)")}),children:(0,p.jsx)(Ie.Z,{})}),(0,p.jsx)(uO,{...e,children:e.children})]},"".concat(e.title).concat(t))))})};pO.displayName="MarketplaceInstantAppDetailContent";var hO=n(96766);let mO;!function(e){e.VIDEO="video",e.IMAGE="image"}(mO||(mO={}));n(65141);const gO="carouselDotList",vO=e=>{var t;let{media:n,aspectRatio:r,mainImageWidth:l,partialImageWidth:s,imageSpacing:d}=e;const c=(0,o.size)(n)>1,u=l/r,h={all:{breakpoint:{max:Number.MAX_SAFE_INTEGER,min:0},items:1,partialVisibilityGutter:c?s:0}},[g,v]=(0,a.useState)(0),C=!!n&&(null===(t=n[g])||void 0===t?void 0:t.type)===mO.VIDEO,f=e=>{let{onClick:t,active:n}=e;return(0,p.jsx)(x.Z,{onClick:t,children:(0,p.jsx)(qA.Z,{sx:{color:n?y.DG.grey[600]:y.DG.grey[400],fontSize:"8px"}})})},b=e=>t=>{let{onClick:o}=t;const a={fontSize:"18px",color:y.DG.black},r=!!n&&g===n.length-1,l=e===(r?"left":"right")&&s,c=l?r?s-d:s:82,h="left"===e?"90deg":"270deg",v=C?u-72:u;return(0,p.jsxs)(m.Z,{onClick:o,sx:{width:c,height:v,zIndex:2,position:"absolute",[e]:0,cursor:"pointer",top:0,"& .buttonBackgroun
3d":{background:l?"linear-gradient(".concat(h,", ").concat(y.DG.grey[50]," 0%, transparent 100%)"):void 0},"&:hover .buttonBackground":{background:l?"linear-gradient(".concat(h,", ").concat(y.DG.grey[500]," 0%, transparent 100%)"):y.DG.grey[500],opacity:l?1:.5}},children:[(0,p.jsx)(i.Z,{className:"buttonBackground",sx:{position:"absolute",top:0,[e]:0,height:u,width:c,pointerEvents:"none"}}),(0,p.jsx)(x.Z,{className:"".concat(e,"-arrow"),onClick:o,sx:{position:"absolute",[e]:"32px",top:"50%",transform:"translateY(calc(-50% + ".concat(C?36:0,"px))"),filter:"drop-shadow(0px 0px 3px rgb(255 255 255 / 0.6))"},children:"right"===e?(0,p.jsx)(lM.Z,{sx:a}):(0,p.jsx)(rM.Z,{sx:a})})]})},j=b("right"),Z=b("left"),w=l+s+d,E=(0,a.useCallback)((e=>v(e)),[]);return(0,p.jsx)(i.Z,{position:"relative",sx:{width:w,["& .".concat(gO)]:{bottom:-23,left:w/2,transform:"translateX(-50%)",width:"fit-content"}},children:(0,p.jsx)(hO.default,{responsive:h,swipeable:!1,infinite:!1,showDots:c,arrows:c,renderDotsOutside:c,partialVisible:c,transitionDuration:0,customTransition:"all 0.15s ease-out",renderArrowsWhenDisabled:!1,dotListClass:gO,customDot:(0,p.jsx)(f,{}),customRightArrow:(0,p.jsx)(j,{}),customLeftArrow:(0,p.jsx)(Z,{}),beforeChange:E,children:(0,o.map)(n,((e,t)=>(0,p.jsx)(CO,{media:e,width:l,height:u,isCurrentSlide:t===g},e.src)))})})},CO=e=>{let{width:t,height:n,media:{src:o,type:r},isCurrentSlide:l}=e;const s=(0,a.useRef)(null),[d,c]=(0,a.useState)(!1),u=(0,a.useCallback)(((e,t)=>{c(!0),(0,OD.Tb)(e,{tags:{error_type:t,component:"MarketplaceLibraryDetailMediaCarousel"},contexts:{video:{src:o,error_name:e.name||"Unknown",error_message:e.message||"Video load/play error"}}})}),[o]),h=(0,a.useCallback)((()=>{c(!0),(0,OD.Tb)(new Error("Image failed to load"),{tags:{error_type:"image_load_error",component:"MarketplaceLibraryDetailMediaCarousel"},contexts:{image:{src:o}}})}),[o]);return(0,a.useEffect)((()=>{if(!s.current)return;const e=s.current,t=()=>{u(new Error("Video failed to load"),"video_load_error")},n=()=>c(!1);if(e.addEventListener("error",t),e.addEventListener("loadstart",n),l){const t=e.play();void 0!==t&&t.catch((e=>{if(e instanceof DOMException)switch(e.name){case"AbortError":case"NotAllowedError":return;case"NotSupportedError":return void u(e,"video_broken_link")}u(e,"video_play_error")}))}else e.pause();return()=>{e.removeEventListener("error",t),e.removeEventListener("loadstart",n)}}),[l,o,u]),d?(0,p.jsx)(i.Z,{sx:{width:t,height:n,background:y.DG.grey[200],display:"flex",alignItems:"center",justifyContent:"center",color:y.DG.grey[600]},children:"Media unavailable"}):(0,p.jsx)(i.Z,{sx:{width:t,height:n,background:"black"},children:r===mO.VIDEO?(0,p.jsx)("video",{ref:s,src:o,height:"100%",width:"100%",controls:!0,autoPlay:!1,muted:!0,loop:!0}):(0,p.jsx)("img",{src:o,height:"100%",width:"100%",alt:"",onError:h,style:{objectFit:"cover",pointerEvents:"none",userSelect:"none"}})})};CO.displayName="MediaElement",vO.displayName="MarketplaceLibraryDetailMediaCarousel";const xO=e=>(0,p.jsx)($n.Z,{...e,viewBox:"3 3 24 24",children:(0,p.jsx)("path",{d:"M22 9.1C22 6.8 19.1 5 15.5 5C11.8 5.1 9 6.8 9 9.1C9 10.3 9.8 11.3 11 12.1C11.9 12.6 12.5 13.6 12.5 14.6L12.9 23.7C13 25.1 14.1 26.2 15.5 26.2C16.9 26.2 18.1 25.1 18.2 23.7L18.6 14.6C18.6 13.6 19.2 12.6 20.1 12.1C21.3 11.3 22 10.3 22 9.1ZM15.5 17.8C14.4 17.8 13.4 16.9 13.4 15.7C13.4 14.5 14.3 13.6 15.5 13.6C16.6 13.6 17.6 14.5 17.6 15.7C17.6 16.9 16.6 17.8 15.5 17.8ZM15.5 11.2C12.9 11.2 11 10.1 11 9.1C11 8.1 12.9 7 15.5 7C18.1 7 20 8.1 20 9.1C20.1 10.1 18.1 11.2 15.5 11.2ZM16.4 15.7C16.4 16.2 16 16.6 15.5 16.6C15 16.6 14.6 16.2 14.6 15.7C14.6 15.2 15 14.8 15.5 14.8C16 14.8 16.4 15.2 16.4 15.7Z"})});var fO=n(63833),bO=n(76056),yO=n(36611),jO=n(60252);const ZO={requiresIdentity:{icon:(0,p.jsx)(fO.Z,{}),label:"Requires identity"},supportsTouchControllers:{icon:(0,p.jsx)(xO,{}),label:"Supports controllers"},supportsHandTracking:{icon:(0,p.jsx)(bO.Z,{}),label:"Supports hand tracking"},supportsEyeTracking:{icon:(0,p.jsx)(yO.Z,{}),label:"Supports eye tracking"},supportsNaturalFacialExpressions:{icon:(0,p.jsx)(jO.Z,{}),label:"Supports natural facial expressions"},supportsGazeControl:{icon:(0,p.jsx)(yO.Z,{}),label:"Supports gaze control"}},wO={always:"Requires",never:"Does not require",sometimes:"Sometimes requires"},EO=(0,a.memo)((e=>{let{icon:t,label:n}=e;return(0,p.jsxs)(dO.Z,{direction:"row",height:48,spacing:2,children:[t,(0,p.jsx)(v.Z,{variant:"body1",color:"text.primary",children:n})]})}));EO.displayName="QuickInfoItemRow";const SO=(0,a.memo)((e=>{let{appQuickInfo:t,sidebarPaddingX:n=gd}=e;const i=(0,a.useMemo)((()=>{const e=[];
3if(t.requiresIdentity&&e.push(ZO.requiresIdentity),void 0!==t.requiresInternet){const n=t.requiresInternet;"boolean"===typeof n?e.push({icon:n?(0,p.jsx)(go.Z,{}):(0,p.jsx)(gM.Z,{}),label:n?"Requires internet":"Does not require internet"}):e.push({icon:"never"===n?(0,p.jsx)(gM.Z,{}):(0,p.jsx)(go.Z,{}),label:"".concat(wO[n]," internet")})}return t.requiresHandTracking&&e.push({icon:(0,p.jsx)(bO.Z,{}),label:"".concat(wO[t.requiresHandTracking]," hand tracking")}),t.supportsTouchControllers&&e.push(ZO.supportsTouchControllers),t.supportsHandTracking&&e.push(ZO.supportsHandTracking),t.supportsEyeTracking&&e.push(ZO.supportsEyeTracking),t.supportsNaturalFacialExpressions&&e.push(ZO.supportsNaturalFacialExpressions),t.supportsGazeControl&&e.push(ZO.supportsGazeControl),e}),[t]);return 0===i.length?null:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(cO.Z,{children:(0,p.jsx)(Ie.Z,{sx:e=>({transform:"translateX(-".concat(e.spacing(n),")"),width:"calc(100% + ".concat(e.spacing(2*n),")")})})}),(0,p.jsx)(dO.Z,{spacing:1,color:"action.active",children:i.map((e=>(0,p.jsx)(EO,{icon:e.icon,label:e.label},e.label)))})]})}));SO.displayName="MarketplaceAppQuickInfoSection";const DO=e=>{let{content:t}=e;return(0,o.isEmpty)(t)?null:(0,p.jsx)(m.Z,{spacing:2,children:(0,o.map)(t,((e,t)=>{let{title:n,items:i}=e;return(0,o.isEmpty)(i)?null:(0,p.jsxs)(m.Z,{children:[n&&(0,p.jsx)(v.Z,{variant:"subtitle2",color:"grey.800",sx:{marginBottom:1},children:n}),(0,o.map)(i,((e,t)=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:3,paddingY:1,children:[e.icon,(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"text.primary"},children:e.value}),e.caption&&(0,p.jsx)(v.Z,{variant:"caption",sx:{color:"text.secondary"},children:e.caption})]})]},"".concat(e.value,"-").concat(t))))]},null!==n&&void 0!==n?n:"section-".concat(t))}))})};DO.displayName="MarketplaceLibraryDetailPanelContent";const MO=e=>{let{contentName:t,contentOwnerName:n,primaryButton:i,secondaryButton:r,panelLinks:l,iconUrl:s,badge:d,content:c,supportedDevices:u,appQuickInfo:h,sidebarPaddingX:m}=e;const g=(0,a.useMemo)((()=>{const e=[];if(c&&!(0,o.isEmpty)(c)&&e.push(...c),u&&!(0,o.isEmpty)(u)){const t={title:"Supported Devices",items:[]};(0,o.forEach)(u,(e=>{let{caption:n,manufacturer:i,models:a}=e;const r=(0,o.sortBy)(a,Vr.W1),l=(0,ul.Yv)(null!==r&&void 0!==r?r:[]);if(!i&&a)t.items.push({value:l,caption:n});else if(i){const e="Oculus"===i?"Meta":i,o=(0,Vr.Aj)(i);t.items.push({value:e,caption:null!==n&&void 0!==n?n:l,icon:(0,p.jsx)(o,{})})}})),e.push(t)}return e}),[c,u]);return(0,p.jsxs)(dO.Z,{spacing:3,children:[(0,p.jsxs)(dO.Z,{spacing:2,children:[d,(0,p.jsx)("img",{src:s,width:"126px",alt:t,style:{objectFit:"fill",aspectRatio:"1/1"}}),(0,p.jsxs)(dO.Z,{justifyContent:"center",height:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",sx:{color:"text.primary"},children:t}),n&&n!==t&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["By ",n]})]}),(0,p.jsxs)(dO.Z,{spacing:1,children:[i,r,(0,o.map)(l,((e,t)=>(0,p.jsx)(C.Z,{variant:"outlined",href:e.link,target:"_blank",endIcon:(0,p.jsx)(Mu.Z,{color:"inherit"}),children:e.title},"".concat(e.link).concat(t))))]})]}),(0,p.jsx)(DO,{content:g}),h&&(0,p.jsx)(SO,{appQuickInfo:h,sidebarPaddingX:m})]})};MO.displayName="MarketplaceLibraryDetailPanel";const kO=e=>{let{libraryPath:t,backToLabel:n,panelProps:o}=e;const{buildOrganizationPath:a}=(0,w.P)();return(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsx)(i.Z,{height:40,children:(0,p.jsx)(Qc,{to:a((e=>e.marketplace[t])),children:(0,p.jsx)(C.Z,{fullWidth:!0,startIcon:(0,p.jsx)(EZ.Z,{}),sx:{justifyContent:"flex-start",textTransform:"none","& .MuiButton-startIcon":{paddingRight:2}},children:(0,p.jsx)(i.Z,{sx:{paddingY:1},children:(0,p.jsx)(v.Z,{variant:"body1",color:"text.primary",sx:{textAlign:"start",whiteSpace:"normal"},children:n})})})})}),(0,p.jsx)(MO,{...o})]})};kO.displayName="MarketplaceLibraryDetailSidebar";const IO={xs:280,md:300},AO=16/9,RO=e=>{let{contentSections:t,description:n,libraryPath:o,marketingMedia:r,panelProps:l,title:s,backToLabel:d}=e;const{buildOrganizationPath:c}=(0,w.P)(),u=(0,Le.I7)(),h=c((e=>e.marketplace[o])),g=(0,_n.S)({xs:IO.md-IO.xs,md:0}),C=890+g,[x,f]=(0,a.useState)(C),[b,y]=(0,a.useState)(0),[j,Z]=(0,a.useState)(1200),[E,S]=(0,a.useState)(0),[D,M]=(0,a.useState)(!1);(0,a.useEffect)((()=>
3{if(j<=C)f(j),y(0),S(0);else{const e=j-C-16,t=Math.max(e,72);f(j-t-16),y(t),S(16)}}),[j,g,E,C]);const{ref:k}=(0,Yi.y)((0,a.useCallback)((e=>{Z(Math.floor(e.contentRect.width)),M(!0)}),[])),I="".concat(Math.ceil(.5625*x),"px"),A=(0,p.jsxs)(i.Z,{paddingTop:I,minWidth:500,position:"relative",ref:k,children:[(0,p.jsx)(i.Z,{position:"absolute",sx:{top:0,height:I,width:1},children:D&&(0,p.jsx)(vO,{media:r,aspectRatio:AO,mainImageWidth:x,partialImageWidth:b,imageSpacing:E})}),(0,p.jsx)(m.Z,{direction:"row",spacing:2,marginTop:2.5,children:(0,p.jsxs)(m.Z,{maxWidth:x,children:[(0,p.jsx)(v.Z,{variant:"h4",children:s}),n&&(0,p.jsx)(i.Z,{marginBottom:3,children:(0,p.jsx)(sO,{color:"grey.800",clamp:8,text:n,withMarkdown:!0})}),(0,p.jsx)(pO,{content:t})]})})]}),R=(0,p.jsx)(vd,{sidebarWidths:IO,sidebarContent:(0,p.jsx)(kO,{libraryPath:o,backToLabel:d,panelProps:l}),children:A});return(0,p.jsx)(Mn.C,{noBottomPadding:!0,toolbarBreadcrumbs:[{title:"Connect",navCategory:!0},{title:u},{title:Ld.qD[o],path:h},{title:s}],children:R})};RO.displayName="MarketplaceLibraryDetailPageLayout";const TO=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsx)(l.l_,{to:e((e=>e.marketplace.instantApps))})},PO=()=>{const{contentProviders:e}=Rj(),t=(0,Le.Sv)(),n=(0,c.$B)(t.contentProviders.contentProvider),i=null===n||void 0===n?void 0:n.params.contentProviderId;if(!i)return(0,p.jsx)(TO,{});const a=(0,o.find)(e,{id:i});return a?(0,p.jsx)(LO,{marketplaceContentProvider:a}):(0,p.jsx)(TO,{})},LO=e=>{let{marketplaceContentProvider:t}=e;const{user:n}=(0,w.P)(),{organization:i}=(0,d.mP)(),[r,l]=(0,a.useState)(!1);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(RO,{libraryPath:"contentProviders",backToLabel:"Back to Content Providers",title:t.title,description:t.description,marketingMedia:t.marketingMedia,panelProps:{iconUrl:t.iconUrl,contentName:t.title,primaryButton:t.contactEmail?(0,p.jsx)(C.Z,{variant:"contained",fullWidth:!0,onClick:()=>{l(!0),(0,b.ec)("Discover XR Contact Content Provider Clicked",{contactEmail:n.email||i.billingEmail,contactName:n.name||i.name,contentProviderEmail:t.contactEmail,contentProviderId:t.id,title:t.title})},children:"Contact"}):void 0,secondaryButton:t.websiteUrl?(0,p.jsx)(C.Z,{target:"_blank",component:"a",href:t.websiteUrl,variant:"outlined",onClick:()=>{(0,b.ec)("Discover XR Visit Partner Website Clicked",{contentProviderId:t.id,title:t.title,type:"contentProvider",url:t.websiteUrl})},children:"Go to website"}):void 0,panelLinks:t.panelLinks,supportedDevices:(0,o.map)(t.supportedDeviceManufacturers,(e=>({manufacturer:e})))},contentSections:[{title:"Categories",children:(0,p.jsx)(m.Z,{direction:"row",spacing:.5,children:(0,o.map)(t.categories,(e=>(0,p.jsx)(ke.Z,{label:e,variant:"filled",sx:{backgroundColor:"primary.main",height:"unset",color:y.DG.white}},e)))})}]}),(0,p.jsx)(aO,{open:r,contentProvider:t,onClose:()=>l(!1)})]})};LO.displayName="MarketplaceLibraryDetailContentProviderPage",PO.displayName="MarketplaceLibraryDetailContentProviderPageOrRedirect";const NO=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsx)(l.l_,{to:e((e=>e.marketplace.hardwarePartners))})},UO=()=>{const{hardwareProviders:e}=Rj(),t=(0,Le.Sv)(),n=(0,c.$B)(t.hardwarePartners.hardwarePartner),i=null===n||void 0===n?void 0:n.params.hardwarePartnerId;if(!i)return(0,p.jsx)(NO,{});const a=(0,o.find)(e,{id:i});return a?(0,p.jsx)(FO,{marketplaceHardwarePartner:a}):(0,p.jsx)(NO,{})},FO=e=>{let{marketplaceHardwarePartner:t}=e;const n=[{title:"Contact",items:t.contactInfo}];return(0,p.jsx)(RO,{libraryPath:"hardwarePartners",backToLabel:"Back to Hardware Partners",description:t.description||t.caption,title:t.title,marketingMedia:t.marketingMedia,contentSections:n,panelProps:{contentName:t.title,primaryButton:(0,p.jsx)(C.Z,{variant:"contained",href:Be.pV.connectWithResellerCalendlyMeeting,target:"_blank",onClick:()=>{(0,b.ec)("Discover XR Connect With Hardware Partner Clicked",{hardwarePartnerId:t.id,title:t.title})},children:"Contact"}),secondaryButton:(0,p.jsx)(p.Fragment,{children:t.websiteUrl&&(0,p.jsx)(C.Z,{variant:"outlined",target:"_blank",href:t.websiteUrl,onClick:()=>{(0,b.ec)("Discover XR Visit Partner Website Clicked",{hardwarePartnerId:t.id,title:t.title,type:"hardwarePartner",url:t.websiteUrl})},children:"Go to website"})}),panelLinks:t.panelLinks,iconUrl:t.iconUrl,content:[{title:(0,ul.n8)((0,o.size)(t.regi
3ons),"Region"),items:(0,o.isEmpty)(t.regions)?[]:[{value:(0,o.join)(t.regions,", ")}]}],supportedDevices:(0,o.map)(t.supportedDeviceManufacturers,(e=>({manufacturer:e})))}})};FO.displayName="MarketplaceLibraryDetailHardwarePartnerPage",UO.displayName="MarketplaceLibraryDetailHardwarePartnerPageOrRedirect";const OO=e=>({variant:"contained",fullWidth:!0,size:e?"small":void 0,sx:{textTransform:"none",fontWeight:"bold"}}),_O=e=>{let{instantApp:t,location:n,small:i=!1,...o}=e;const r=(0,l.k6)(),{privileges:s,buildOrganizationPath:d}=(0,w.P)(),{getIsInstantAppInOrganization:c,shareInstantAppPending:u,openShareInstantAppConfirmationDialog:h}=Rj(),m=c(t.id),g=(0,a.useCallback)((e=>{e.preventDefault(),m||s.content&&(h(t),(0,b.ec)("Discover XR Add Instant App Clicked",{location:n,title:t.title,instantAppId:t.id,supportedModels:ry(t)}))}),[s.content,m,h,t,n]),v=d((e=>e.vrContent.edit.app.instant),{instantAppId:t.id}),x=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),(0,b.ec)("Discover XR View Saved Instant App Clicked",{location:n,title:t.title,instantAppId:t.id,supportedModels:ry(t)}),r.push(v)}),[v,r,t,n]);return m?(0,p.jsx)(C.Z,{...OO(i),...o,onClick:x,children:(0,p.jsx)("span",{style:{textTransform:"none"},children:"You have this - go to app"})}):(0,p.jsx)(zi.W,{privilege:"content",action:"get Instant Apps",children:(0,p.jsx)(Un.U,{...OO(i),onClick:g,submitting:u,...o,children:"Add to library"})})};_O.displayName="MarketplaceInstantAppGetButton";const zO=e=>{let{phase:t,withShadow:n=!0}=e;if(t===Jb.LIVE)return null;const o=t===Jb.DRAFT;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,sx:{bgcolor:"background.paper",borderRadius:1,paddingX:1,paddingY:.5,boxShadow:n?2:0,width:"fit-content"},children:[(0,p.jsx)(i.Z,{component:"span",sx:{width:8,height:8,borderRadius:"50%",flexShrink:0,...o?{borderColor:"text.secondary",borderStyle:"solid",borderWidth:1}:{bgcolor:"text.secondary"}}}),(0,p.jsx)(v.Z,{component:"span",variant:"overline",fontWeight:600,color:"text.secondary",lineHeight:1,children:ay(t)})]})};zO.displayName="MarketplaceInstantAppPhaseBadge";const BO=e=>{let{instantApp:t,open:n,onClose:i,location:o}=e;const{user:r}=(0,w.P)(),{organization:l}=(0,d.mP)(),s=(0,Fe.pv)({method:"post",path:"discover-xr/instant-apps/:instantAppId/email-developer"}),c="I tried ".concat(t.title," on ManageXR and want to access more of your content. Please let me know what the next steps are.\n\nThanks,\n").concat(r.name||l.name),u="".concat(l.name," Connect"),h="".concat(t.developerOrganizationProfile.name," - "),m=(0,a.useCallback)((async e=>{let{message:n,subject:i}=e,a=!1;const d=r.email||l.billingEmail,u=r.name||l.name;return await s.request({params:{instantAppId:t.id},data:{message:n,subject:i,contactEmail:d,contactName:u},onSuccess:()=>{a=!0,(0,b.ec)("Discover XR Contact Instant App Developer Message Sent",{contactEmail:d,contactName:u,developerEmail:t.contactEmail,developerName:t.developerOrganizationProfile.name,edited:n!==c,instantAppId:t.id,location:o,message:n,subject:i,supportedModels:ry(t),title:t.title})},errorMessage:"Error sending message"}),{success:a}}),[s,c,t,o,l.billingEmail,l.name,r.email,r.name]);return(0,p.jsx)(oO,{open:n,contactName:t.developerOrganizationProfile.name,defaultSubject:{editableValue:u,prefixUneditableValue:h},defaultMessage:c,disabled:!1,onClose:i,onSubmit:m})},WO=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(0,o.max)((0,o.values)(null===e||void 0===e?void 0:e.deviceModelToSize)),i=(0,a.useMemo)((()=>(0,o.chain)(null===e||void 0===e?void 0:e.deviceModelToReleaseChannelId).values().uniq().compact().value()),[null===e||void 0===e?void 0:e.deviceModelToReleaseChannelId]),r=(0,E.Ev)(S.F.ReleaseChannels,i),l=(0,a.useMemo)((()=>(0,o.map)(r,"targetRef.id")),[r]),s=(0,E.Ev)(S.F.Apps,l,{sort:(0,a.useCallback)(((e,t)=>(0,Vs.r6)(t,e)),[])}),d=(0,a.useMemo)((()=>{if(!s[0])return[];const e=s[0],t=e.versionCode,n=e.createdAt,i=[];return(0,o.isNumber)(t)&&i.push({title:"Version Number",value:t}),n&&i.push({title:"Release Date",value:(0,M.ax)(n)}),i}),[s]);return(0,a.useMemo)((()=>[{items:t&&null!==e&&void 0!==e&&e.description&&e.description!==e.caption?[{value:e.description,clampProps:{clamp:8}}]:[]},{title:"categories",children:t?null:(0,p.jsx)(m.Z,{direction:"row",spacing:.5,children:(0,o.map)(null===e||void 0===e?void 0:e.categories,(e=>(0,p.jsx)(ke.Z,{label:e,variant:"filled",sx:{backgroundColor:"primary.main",height:"unset",color:y.DG.white}},e)))})},{title:"Developer",items:null===e||void 0===e?void 0:e.developerInfo},{title:"Version",items:d},{title:"Languages",items:[{value:(0,o.join)(null===e||void 0===e?void 0:e.languages,", ")}]}
3,{title:"App Size",items:n?[{value:(0,Ad.Z)(n)}]:[]},{title:"Contact Information",items:null===e||void 0===e?void 0:e.contactInfo}]),[null===e||void 0===e?void 0:e.caption,null===e||void 0===e?void 0:e.categories,null===e||void 0===e?void 0:e.contactInfo,null===e||void 0===e?void 0:e.description,null===e||void 0===e?void 0:e.developerInfo,null===e||void 0===e?void 0:e.languages,n,d,t])},VO=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsx)(l.l_,{to:e((e=>e.marketplace.instantApps))})},GO=()=>{const{instantApps:e}=Rj(),t=(0,Le.Sv)(),n=(0,c.$B)(t.instantApps.instantApp),i=null===n||void 0===n?void 0:n.params.instantAppId;if(!i)return(0,p.jsx)(VO,{});const a=(0,o.find)(e,(e=>i===e.id));return a?(0,p.jsx)(HO,{instantApp:a}):(0,p.jsx)(VO,{})},HO=e=>{var t;let{instantApp:n}=e;const{user:i}=(0,w.P)(),{organization:r}=(0,d.mP)(),l=WO(n),s=ry(n),c=(0,a.useMemo)((()=>(e=>{var t,n;const i={};return null===(t=e.requirements)||void 0===t||t.forEach((e=>{const t=e.frequency;e.title===ey.INTERNET?i.requiresInternet=t:e.title===ey.HAND_TRACKING&&(i.requiresHandTracking=t)})),null===(n=e.supportedFeatures)||void 0===n||n.forEach((e=>{e===ny.CONTROLLERS?i.supportsTouchControllers=!0:e===ny.HAND_TRACKING?i.supportsHandTracking=!0:e===ny.EYE_TRACKING?i.supportsEyeTracking=!0:e===ny.NATURAL_FACIAL_EXPRESSIONS?i.supportsNaturalFacialExpressions=!0:e===ny.GAZE_CONTROL&&(i.supportsGazeControl=!0)})),i})(n)),[n]),[u,h]=(0,a.useState)(!1),m=(0,a.useMemo)((()=>{const e=(0,Vr.ar)(s);return(0,o.map)(e,((e,t)=>({manufacturer:t,models:e})))}),[s]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(RO,{libraryPath:"instantApps",backToLabel:"Back to Instant Apps",description:n.description||n.caption,title:n.title,marketingMedia:n.marketingMedia,contentSections:l,panelProps:{contentName:n.title,contentOwnerName:n.developerOrganizationProfile.name,primaryButton:(0,p.jsx)(_O,{fullWidth:!0,instantApp:n,location:"Instant App Detail Page"}),secondaryButton:(0,p.jsx)(p.Fragment,{children:n.contactEmail&&(0,p.jsx)(C.Z,{onClick:()=>{h(!0),(0,b.ec)("Discover XR Contact Instant App Developer Clicked",{contactEmail:i.email||r.billingEmail,contactName:i.name||r.name,developerEmail:n.contactEmail,developerName:n.developerOrganizationProfile.name,instantAppId:n.id,location:"Instant App Detail Page",supportedModels:ry(n),title:n.title})},variant:"outlined",children:"Contact"})}),panelLinks:n.panelLinks,iconUrl:null!==(t=n.appIconUrl)&&void 0!==t?t:n.iconUrl,badge:(0,p.jsx)(zO,{phase:n.phase,withShadow:!1}),supportedDevices:m,appQuickInfo:c}}),(0,p.jsx)(BO,{instantApp:n,open:u,onClose:()=>h(!1),location:"Instant App Detail Page"})]})};HO.displayName="MarketplaceLibraryDetailInstantAppPage",GO.displayName="MarketplaceLibraryDetailInstantAppPageOrRedirect";const qO=()=>{const{hardwareProviderFilters:e}=Rj(),{buildOrganizationPath:t}=(0,w.P)();return(0,p.jsx)(tO,{title:Ld.qD.hardwarePartners,renderItem:e=>(0,p.jsx)(KF,{...e,to:t((e=>e.marketplace.hardwarePartners.hardwarePartner),{hardwarePartnerId:e.id})}),titleBanner:{SvgComponent:RF,caption:{primaryText:"Access partners who help you purchase and set up devices faster.",secondaryText:"Hardware resellers and provisioning partners make it much easier to scale your device fleet. They take care of procurement, handle device setup, and configure devices with your content through ManageXR. Devices arrive at your site ready-to-use."}},emptyFilteredDocumentsMessage:"No Hardware Partners match your filters yet! Let us know what you need, and we'll help connect the dots.",bottomBannerMessage:"Want your services to be discovered? Join the ManageXR Partner Network",itemMinWidth:400,itemMaxWidth:600,searchPlaceholder:"Search by name, description",...e})};qO.displayName="MarketplaceLibraryHardwarePartnersPage";var YO=n(57621),KO=n(39504);const XO=e=>{let{imageUrl:t,imageAlt:n,imageAspectRatio:o="16/9",linkTo:r,title:l,badge:s,subtitle:d,caption:c,contentHeight:u,topRightContent:h,actionButton:g}=e;const C=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{C.current&&gm()(C.current,{clamp:2})}),[]);const x=(0,p.jsxs)(i.Z,{sx:{display:"flex",position:"relative"},children:[(0,p.jsx)(Nb.Z,{sx:{backgroundColor:"grey.100",height:"auto",objectFit:"cover",pointerEvents:"none",aspectRatio:o},component:"img",image:t,alt:n}),(0,p.jsx)(i.Z,{className:"actionButton",sx:{position:"absolute",right:12,top:12,zIndex:10,visibility:"hidden"},children:g}),s&&(0,p.jsx)(i.Z,{sx:{position:"absolute",left:12,top:12,zIndex:10},children:s})]});return(0,p.jsx)(Qc,{to:r,style:{height:"100%"},children:(0,p.jsxs)(YO.Z,{sx:{padding:0,cursor:"pointer",height:"100%",display:"flex",flexDirection:"column","&:hover":{backgroundColor:"grey.100"},"&:hover .actionButton":{visibility:"visible"},"& button.getButton.Mui-disabled":{backgroundColor:"".concat(y.DG.purple[800]," !important"),color:"".concat(y.DG.white," !important"),"& svg":{color:y.DG.white}}},children:[x,(0,p.jsx)(KO.Z,{sx:{minHeight:u,flex:1,paddingTop:.5,paddingX:.5,paddingBottom:"0 !important"},children:(0,p.jsxs)(m.Z,{sx:{overflow:"hidden"},spacing:.5,height:c?"auto":1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,height:1,children:[(0,p.jsxs)(m.Z,{sx:{flex:1,minWidth:0},height:1,justifyContent:c?"flex-start":"space-between",children:[(0,p.jsx)(v.Z,{variant:"subtitle2",sx:{dis
3play:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",wordBreak:"break-word"},children:l}),d]}),h]}),c&&(0,p.jsx)(v.Z,{ref:C,variant:"body2",color:"grey.800",children:c})]})})]})})};XO.displayName="MarketplaceLibraryCard";const QO=e=>{var t;let{instantApp:n}=e;const{buildOrganizationPath:i}=(0,w.P)(),a=null!==(t=n.caption)&&void 0!==t?t:n.description,r=(0,o.chain)(n.categories).sortBy((e=>e)).join(", ").value(),l=ry(n),s=i((e=>e.marketplace.instantApps.instantApp),{instantAppId:n.id});return(0,p.jsx)(XO,{imageUrl:n.iconUrl,imageAlt:n.title,linkTo:s,title:n.title,badge:(0,p.jsx)(zO,{phase:n.phase}),subtitle:(0,p.jsx)(Ui.G,{variant:"caption",color:"grey.800",title:r}),caption:a,contentHeight:95,topRightContent:(0,p.jsx)(Mj,{deviceModels:l}),actionButton:(0,p.jsx)(_O,{instantApp:n,location:"Instant App Library Card",small:!0})})};QO.displayName="MarketplaceInstantAppLibraryCard";const JO=()=>{const{instantAppFilters:e}=Rj(),t=()=>{(0,b.ec)("Discover XR Request App Form Clicked",{location:"Instant Apps Library"})};return(0,p.jsx)(tO,{title:Ld.qD.instantApps,renderItem:e=>(0,p.jsx)(QO,{instantApp:e}),titleBanner:{SvgComponent:qF,renderTitle:e=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ud.Z,{fontSize:"large",sx:{color:Ld.Li}}),e]}),caption:{primaryText:"The easiest way to try new VR content on your devices.",secondaryText:"Instant Apps are free, high-quality demo applications to help you experiment with new content quickly. Save an Instant App to your VR Content Library. Add it to your Configuration. Apply the Configuration to your devices."}},emptyFilteredDocumentsMessage:"No Instant Apps match your filters! Looking for an app? Let us know what content you want, and we'll see what we can do.",renderEmptyFilteredDocumentsMessage:e=>(0,ul.d2)(e,"Let us know what content you want",(e=>(0,p.jsx)(Kn.Z,{href:Be.pV.requestAnInstantAppForm,target:"_blank",onClick:t,children:e}))),itemMinWidth:300,itemMaxWidth:500,searchPlaceholder:"Search by name, description",...e})};JO.displayName="MarketplaceLibraryInstantAppsPage";const $O=()=>{const e=(0,Le.I7)(),t=()=>{(0,b.ec)("Discover XR Request App Form Clicked",{location:"Request Page"})};return(0,p.jsx)(DU,{title:"Request an App",mainBody:"Not finding the app or provider you're looking for on ".concat(e," yet? Submit a quick content request to let us know what we should add."),renderMainBody:e=>(0,ul.d2)(e,"content request",(e=>(0,p.jsx)(Kn.Z,{href:Be.pV.requestAnInstantAppForm,target:"_blank",onClick:t,children:e}))),secondaryBody:"We are working together with developers to bring great VR content to you quickly and easily.",breadcrumbTitle:"Request"})};$O.displayName="MarketplaceRequestPage";const e_=()=>{const{buildOrganizationPath:e}=(0,w.P)(),t=(0,Le.Sv)();return(0,p.jsx)(Aj,{children:(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{exact:!0,path:t.request.__path,children:(0,p.jsx)($O,{})}),(0,p.jsx)(l.AW,{exact:!0,path:t.join.__path,children:(0,p.jsx)(MU,{})}),(0,p.jsx)(l.AW,{exact:!0,path:t.instantApps.__path,children:(0,p.jsx)(JO,{})}),(0,p.jsx)(l.AW,{exact:!0,path:t.contentProviders.__path,children:(0,p.jsx)(nO,{})}),(0,p.jsx)(l.AW,{exact:!0,path:t.hardwarePartners.__path,children:(0,p.jsx)(qO,{})}),(0,p.jsx)(l.AW,{exact:!0,path:t.instantApps.instantApp.__path,children:(0,p.jsx)(GO,{})}),(0,p.jsx)(l.AW,{exact:!0,path:t.contentProviders.contentProvider.__path,children:(0,p.jsx)(PO,{})}),(0,p.jsx)(l.AW,{exact:!0,path:t.hardwarePartners.hardwarePartner.__path,children:(0,p.jsx)(UO,{})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(l.l_,{to:e((e=>e.marketplace.instantApps))})})]})})};e_.displayName="MarketplaceFeature";var t_=n(47317),n_=n(74320),i_=n(92498);const o_=()=>{const e=(0,Le.ye)("enableRoomsAccessGating"),t=F(),n=(0,d.GB)(),i=(0,d.kV)();if(!e||t||n)return!1;const o=Date.now();if(o<N)return!1;if((0,O.xT)(i.featureFlags,i.featureFlagOverrides,new Date(o)))return!1;const a=i.firstPaidInvoiceAt?1e3*i.firstPaidInvoiceAt.seconds:void 0;return!(void 0!==a&&o-a<O.Yp)},a_=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 8 11",children:(0,p.jsx)("path",{d:"M5 0V7.01H8L4 11L0 7.01H3V0H5Z",fill:"currentColor"})}),r_=e=>(0,p.jsx)($n.Z,{...e,viewBox:"0 0 8 11",children:(0,p.jsx)("path",{d:"M4 0L0 3.99H3V11H5V3.99H8L4 0Z",fill:"currentColor"})}),l_=(e,t)=>
3e.name.toLowerCase().includes(t)||e.serial.toLowerCase().includes(t),s_=(e,t,n)=>{if(!t.trim())return e;const i=t.toLowerCase();return e.filter((e=>e.name.toLowerCase().includes(i)||e.deviceIds.some((e=>{const t=null===n||void 0===n?void 0:n.get(e);return!!t&&l_(t,i)}))))},d_=(e,t,n)=>{if(!t.trim()||!n)return;const i=t.toLowerCase();if(e.name.toLowerCase().includes(i))return;const o=[];for(const a of e.deviceIds){const e=n.get(a);e&&l_(e,i)&&o.push(e.serial.toLowerCase().includes(i)?e.serial:e.name)}return o.length>0?{labels:o,otherCount:e.deviceIds.length-o.length}:void 0},c_=(e,t,n)=>{const i=t.toLowerCase().trim();if(!i)return 0;const o=new RegExp("(^|[\\s\\-_])".concat(i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),"i");if(o.test(e.name))return 0;const a=d_(e,t,n);return null!==a&&void 0!==a&&a.labels.some((e=>o.test(e)))?1:e.name.toLowerCase().includes(i)?2:3},u_=e=>{let{rooms:t,searchValue:n,deviceInfoMap:o,onRoomSelected:r,onSearchChange:l}=e;const[s,d]=(0,a.useState)(!1),c=(0,a.useRef)(null),u=(0,a.useRef)(null),[h,g,C]=(0,zn.G)(n,300),x=(0,a.useRef)(n);(0,a.useEffect)((()=>{n!==x.current&&(C(n),x.current=n)}),[n,C]);const f=h!==g;(0,a.useEffect)((()=>
3{l(g)}),[g,l]);const b=(0,a.useMemo)((()=>{if(!h.trim())return[];const e=s_(t,h,o),n=new Map(e.map((e=>[e.id,c_(e,h,o)])));return[...e].sort(((e,t)=>{var i,o;return(null!==(i=n.get(e.id))&&void 0!==i?i:0)-(null!==(o=n.get(t.id))&&void 0!==o?o:0)}))}),[t,h,o]),y=(0,a.useCallback)((()=>{d(!1)}),[]),j=(0,a.useCallback)((e=>{const t=e.target.value;C(t),d(!!t)}),[C]),Z=(0,a.useCallback)((e=>{r(e),y()}),[y,r]),w=(0,a.useCallback)((e=>{"Escape"===e.key&&y()}),[y]),E=(0,a.useCallback)((()=>{h&&d(!0)}),[h]);return(0,p.jsx)(ca.Z,{onClickAway:y,children:(0,p.jsxs)(m.Z,{ref:u,children:[(0,p.jsx)(Ln.Z,{inputRef:c,autoComplete:"off",size:"small",placeholder:"Search",value:h,onChange:j,onKeyDown:w,onFocus:E,InputProps:{startAdornment:(0,p.jsx)(bl.T,{pending:f})},sx:{width:300,".MuiInputBase-root":{minHeight:36}}}),s&&h&&b.length>0&&(0,p.jsx)(Xr.Z,{open:!0,anchorEl:u.current,placement:"bottom-start",sx:{zIndex:1300},disablePortal:!0,children:(0,p.jsx)(Me.Z,{sx:e=>({overflow:"auto",border:1,borderColor:"grey.400",borderRadius:"8px",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.1)",transform:"translateY(".concat(e.spacingInt(1),"px)"),width:300,maxHeight:400}),children:(0,p.jsx)(ii.Z,{dense:!0,disablePadding:!0,children:b.map((e=>(0,p.jsx)(fl.ZP,{disablePadding:!0,children:(0,p.jsx)(oi.Z,{onClick:()=>Z(e),onMouseDown:e=>{e.preventDefault()},children:(0,p.jsxs)(m.Z,{spacing:.5,sx:{width:"100%",overflow:"hidden"},children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(()=>{const t=d_(e,h,o),{text:n,suffix:a}=((e,t)=>{if(!e)return{text:"".concat(t," ").concat(1===t?"device":"devices"),suffix:""};const n=e.otherCount>0?"and ".concat(e.otherCount," other ").concat(1===e.otherCount?"device":"devices"):"";return{text:e.labels.join(", "),suffix:n}})(t,e.deviceIds.length);return(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,component:"div",sx:a?{display:"flex",minWidth:0}:void 0,children:[(0,p.jsx)(i.Z,{component:"span",sx:a?{overflow:"hidden",textOverflow:"ellipsis",flexShrink:1,minWidth:0}:void 0,children:n}),a&&(0,p.jsxs)(i.Z,{component:"span",sx:{flexShrink:0},children:["\xa0",a]})]})})()]})})},e.id)))})})}),s&&h&&0===b.length&&(0,p.jsx)(Xr.Z,{open:!0,anchorEl:u.current,placement:"bottom-start",sx:{zIndex:1300},disablePortal:!0,children:(0,p.jsx)(Me.Z,{sx:e=>({border:1,borderColor:"grey.400",borderRadius:"8px",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.1)",transform:"translateY(".concat(e.spacingInt(1),"px)"),width:300,padding:2}),children:(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",align:"center",children:['No rooms found matching "',h,'"']})})})]})})};var p_=n(20792),h_=n(82638);const m_=[],g_=(e,t)=>{const n=(0,a.useMemo)((()=>{if(!t||0===t.length||0===e.length)return m_;const n=t.filter((t=>e.includes(t.id)));return Array.from(new Set((0,o.map)(n,(e=>e.deviceGroupRefPath.split("/")[1]))))}),[e,t]),i=(0,E.Ev)(S.F.Configurations,n);return(0,a.useMemo)((()=>(0,o.map)(i,(e=>({id:e.id,name:e.name,organizationId:e.organizationRef.id}))).sort(ze.gt)),[i])};var v_=n(37161);const C_=()=>{const e=(0,u.I0)(),t=(0,d.kV)(),n=(0,d.EM)(),i=(0,u.v9)((e=>e.room.query)),o=(0,u.v9)((e=>e.room.queryPending)),r=(0,u.v9)((e=>e.room.queryResult)),l=(0,u.v9)((e=>e.room.selectedDevices)),s=(0,u.v9)((e=>e.room.selectedDevicesPending)),c=(0,u.v9)((e=>e.room.selectedDeviceIds));return(0,a.useEffect)((()=>{null!==t&&void 0!==t&&t.id&&e((0,v_.i3)({organizationId:t.id,hideUserIdentifyingInfo:n}))}),[e,null===t||void 0===t?void 0:t.id,n,i.refreshTime]),(0,a.useEffect)((()=>{null!==t&&void 0!==t&&t.id&&c.length>0&&e((0,v_.Q3)({organizationId:t.id,hideUserIdentifyingInfo:n,deviceIds:c}))}),[e,null===t||void 0===t?void 0:t.id,n,c]),{query:i,queryPending:o,queryResult:r,selectedDevices:l,selectedDevicesPending:s,selectedDeviceIds:c,refresh:()=>{null!==t&&void 0!==t&&t.id&&e((0,v_.i3)({organizationId:t.id,hideUserIdentifyingInfo:n}))}}},x_=(e,t,n,i)=>{if(!e.startingActivity)return null;const o=e.startingActivity;switch(o.action){case"LAUNCH_APP":{var a;const e=null===(a=o.data)||void 0===a?void 0:a.packageName;if(!e)return null;const n=t.find((t=>t.packageName===e));return n?{iconUrl:n.iconUrl||Be.vc.vrContent.defaultIconUrl,title:n.title}:null}case"LAUNCH_INSTANT_APP":{var r;const e=null===(r=o.data)||void 0===r?void 0:r.instantAppId;if(!e)return null;const n=t.find((t=>{var n;return(null===(n=t.instantAppRef)||void 0===n?void 0:n.id)===e}));return n?{iconUrl:n.iconUrl||Be.vc.vrContent.defaultIconUrl,title:n.title}:null}case"PLAY_VIDEO":{var l;const e=null===(l=o.data)||void 0===l?void 0:l.videoId;if(!e)return null;const t=n.find((t=>t.id===e));return t?{iconUrl:t.iconUrl||Be.vc.vrContent.defaultIconUrl,title:t.title}:null}case"LAUNCH_WEB_URL":{var s;const e=null===(s=o.data)||void 0===s?void 0:s.url;if(!e)return null;const t=i.find((t=>t.url===e));return t?{iconUrl:t.iconUrl||Be.vc.vrContent.defaultIconUrl,title:t.title}:null}default:return null}},f_=e=>{const{documents:t}
3=(0,E.D)(S.F.Apps),{documents:n}=(0,E.D)(S.F.Videos),{documents:i}=(0,E.D)(S.F.WebXRApps);return(0,a.useMemo)((()=>x_(e,t,n,i)),[e,t,n,i])},b_=e=>{let{value:t,onChange:n,onBlur:i,onFocus:o,error:r,helperText:l,disabled:s,showLabel:d=!0,autoSelectOnClick:c=!0,sx:u,inputPropsStyle:h}=e;const g=(0,a.useRef)(null),C=(0,a.useRef)(null),x=(0,p.jsx)(Ul.z,{value:t,onChange:n,onFocus:()=>{null===C.current&&(C.current=t),null===o||void 0===o||o()},onBlur:()=>{const e=null!==C.current&&t!==C.current;C.current=null,e&&(null===i||void 0===i||i())},onKeyDown:e=>{var t;"Enter"!==e.key&&"Escape"!==e.key||(null===(t=g.current)||void 0===t||t.blur())},error:r,helperText:l,disabled:s,variant:"standard",ref:g,onClick:()=>{c&&g.current&&(g.current.select(),g.current.scrollLeft=g.current.scrollWidth)},sx:u||{minWidth:"250px",maxWidth:"350px"},inputProps:{style:{textOverflow:"ellipsis",...h}}});return d?(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",width:"100%",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Room Name"}),x]}):x},y_=e=>{let{value:t,onChange:n,onBlur:o,disabled:r}=e;const l=(0,De.Z)(),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),h=(0,a.useMemo)((()=>{const e=(0,ul.Cq)(l,t||"Room Name","h5");return e?Math.ceil(e)+8:0}),[l,t]),m=s||c;return(0,p.jsx)(i.Z,{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),sx:{flex:1,minWidth:0,marginRight:2,"& .MuiInput-root:before":{borderBottom:"none !important"},"& .MuiInput-root:hover:not(.Mui-disabled):before":{borderBottom:m?"2px solid ".concat(y.DG.grey[400]," !important"):"none !important"},"& .MuiInput-root.Mui-focused:before":{borderBottom:"2px solid ".concat(y.DG.grey[400]," !important")}},children:(0,p.jsx)(b_,{value:t,onChange:n,onBlur:()=>{d(!1),o()},onFocus:()=>{d(!0)},disabled:r,showLabel:!1,autoSelectOnClick:!1,sx:{maxWidth:"90%",width:h>0?"".concat(h,"px"):"auto"},inputPropsStyle:{...y.cp.h5,padding:0,cursor:"text"}})})};var j_=n(89238),Z_=n(29330),w_=n(225),E_=n(4790);const S_=[],D_=e=>e.split("/")[1],M_=(e,t)=>{const n=(0,a.useMemo)((()=>{if(!t||0===t.length||0===e.length)return S_;const n=t.filter((t=>e.includes(t.id)));return Array.from(new Set(n.map((e=>D_(e.deviceGroupRefPath)))))}),[e,t]),i=(0,E.Ev)(S.F.Configurations,n),{appIds:r,instantAppIds:l,webXRAppIds:s,videoIds:d}=(0,a.useMemo)((()=>{if(0===i.length)return{appIds:S_,instantAppIds:S_,webXRAppIds:S_,videoIds:S_};const e=new Set,t=new Set,n=new Set,o=new Set;return i.forEach((i=>{var a,r,l,s;null===(a=i.approvedApps)||void 0===a||a.forEach((t=>{e.add(t.id)})),null===(r=i.approvedInstantApps)||void 0===r||r.forEach((e=>{t.add(e.id)})),null===(l=i.approvedWebXRApps)||void 0===l||l.forEach((e=>{n.add(e.id)})),null===(s=i.approvedVideos)||void 0===s||s.forEach((e=>{o.add(e.id)}))})),{appIds:Array.from(e),instantAppIds:Array.from(t),webXRAppIds:Array.from(n),videoIds:Array.from(o)}}),[i]),c=(0,E.Ev)(S.F.Apps,r),u=(0,E.Ev)(S.F.InstantApps,l),p=(0,E.Ev)(S.F.WebXRApps,s),h=(0,E.Ev)(S.F.Videos,d),m=(0,a.useMemo)((()=>new Set(u.map((e=>e.id)))),[u]),{documents:g}=(0,E.D)(S.F.Apps,{filter:(0,a.useCallback)((e=>!!e.instantAppRef&&m.has(e.instantAppRef.id)),[m])}),v=(0,a.useMemo)((()=>{const e=new Map;return u.forEach((t=>{const n=new Map;(0,o.entries)(t.deviceModelToReleaseChannelId).forEach((e=>{let[i,o]=e;const a=g.find((e=>{var n,i;return(null===(n=e.instantAppRef)||void 0===n?void 0:n.id)===t.id&&(null===(i=e.releaseChannelRef)||void 0===i?void 0:i.id)===o}));null!==a&&void 0!==a&&a.packageName&&n.set(i,a.packageName)})),n.size>0&&e.set(t.id,n)})),e}),[g,u]),C=(0,E.Ev)(S.F.Devices,e),x=(0,a.useMemo)((()=>{const e=new Map;
3return C.forEach((t=>{t.model&&e.set(t.id,t.model)})),e}),[C]),f=(0,Z_.G)(e),b=(0,a.useMemo)((()=>{const e=new Map;for(const t of f)e.set(t.deviceSerial,t);return e}),[f]);return(0,a.useMemo)((()=>{const n=[],a=new Map;if(t&&t.length>0&&i.length>0){t.filter((t=>e.includes(t.id))).forEach((e=>{var t;const n=D_(e.deviceGroupRefPath);if(!a.has(n)){const e=i.find((e=>e.id===n));e&&a.set(n,{name:e.name,deviceIds:new Set})}null===(t=a.get(n))||void 0===t||t.deviceIds.add(e.id)}))}const r=(e,t,n)=>{const i=t.join(", ");return 1===t.length?"This ".concat(e,' is not deployed on the configuration "').concat(i,'", so it is not available on the ').concat(n," ").concat(1===n?"device":"devices"," using that configuration. Add it to the configuration to make it available."):"This ".concat(e," is not deployed on the configurations: ").concat(i,", so it is not available on the ").concat(n," ").concat(1===n?"device":"devices"," using those configurations. Add it to the configurations to make it available.")},l=(n,i,o,a)=>{const r=(null===t||void 0===t?void 0:t.map((e=>({id:e.id,name:e.name,model:x.get(e.id)}))))||[],{notInstalledDeviceIds:l,notInstalledDeviceNames:s}=(0,E_.a)({activityId:n,activityAction:i,activityData:o,deviceIds:e,devices:r,deviceOutOfDateDetailsMap:b,instantAppIdToDeviceModelToPackageNameMap:v});return l.length>0?{notInstalledDeviceCount:l.length,notInstalledDeviceNames:s,notInstalledTooltip:(0,E_.b)(a,s)}:{}};(0,o.uniqBy)(c.filter((e=>"packageName"in e)),"id").forEach((t=>{const o=[],s=new Set;a.forEach(((e,n)=>{var a;const r=i.find((e=>e.id===n));(null===r||void 0===r||null===(a=r.approvedApps)||void 0===a?void 0:a.some((e=>e.id===t.id)))?e.deviceIds.forEach((e=>s.add(e))):o.push(e.name)}));const d=e.length-s.size,c=l(t.id,"LAUNCH_APP",{packageName:t.packageName},t.title);n.push({id:t.id,title:t.title,iconUrl:t.iconUrl,action:"LAUNCH_APP",data:{packageName:t.packageName},unavailableTooltip:o.length>0?r("app",o,d):void 0,unavailableDeviceCount:d>0?d:void 0,...c,availableDeviceIds:s.size>0?s:void 0})})),(0,o.uniqBy)(u,"id").forEach((e=>{const t=[];let o=0;a.forEach(((n,a)=>{var r;const l=i.find((e=>e.id===a));(null===l||void 0===l||null===(r=l.approvedInstantApps)||void 0===r?void 0:r.some((t=>t.id===e.id)))||(t.push(n.name),o+=n.deviceIds.size)}));const s=l(e.id,"LAUNCH_INSTANT_APP",{instantAppId:e.id},e.title);n.push({id:e.id,title:e.title,iconUrl:e.iconUrl,action:"LAUNCH_INSTANT_APP",data:{instantAppId:e.id},unavailableTooltip:t.length>0?r("app",t,o):void 0,unavailableDeviceCount:o>0?o:void 0,...s})})),(0,o.uniqBy)(p,"id").forEach((e=>{const t=[];let o=0;a.forEach(((n,a)=>{var r;const l=i.find((e=>e.id===a));(null===l||void 0===l||null===(r=l.approvedWebXRApps)||void 0===r?void 0:r.some((t=>t.id===e.id)))||(t.push(n.name),o+=n.deviceIds.size)}));const s=l(e.id,"LAUNCH_WEB_URL",{url:e.url},e.title);n.push({id:e.id,title:e.title,iconUrl:e.iconUrl,action:"LAUNCH_WEB_URL",data:{url:e.url},unavailableTooltip:t.length>0?r("WebXR link",t,o):void 0,unavailableDeviceCount:o>0?o:void 0,...s})})),(0,o.uniqBy)(h,"id").forEach((e=>{const t=[];let o=0;a.forEach(((n,a)=>{var r;const l=i.find((e=>e.id===a));(null===l||void 0===l||null===(r=l.approvedVideos)||void 0===r?void 0:r.some((t=>t.id===e.id)))||(t.push(n.name),o+=n.deviceIds.size)}));const s=l(e.id,"PLAY_VIDEO",{videoId:e.id},e.title);n.push({id:e.id,title:e.title,iconUrl:e.iconUrl,action:"PLAY_VIDEO",data:{videoId:e.id},unavailableTooltip:t.length>0?r("video",t,o):void 0,unavailableDeviceCount:o>0?o:void 0,...s})}));const s=[];return n.forEach((t=>{const n=t,i=s.find((e=>(0,w_.xW)({action:e.action,data:e.data},{action:n.action,data:n.data})));if(i){if(i.availableDeviceIds&&n.availableDeviceIds){const t=new Set([...Array.from(i.availableDeviceIds),...Array.from(n.availableDeviceIds)]);i.availableDeviceIds=t;const o=e.length-t.size;if(i.unavailableDeviceCount=o>0?o:void 0,o>0){const n=[],l=new Set(e.filter((e=>!t.has(e))));a.forEach((e=>{Array.from(e.deviceIds).some((e=>l.has(e)))&&n.push(e.name)}));const s=(0,w_.te)(i.action),d="webxr"===s?"WebXR link":s;i.unavailableTooltip=r(d,n,o)}else i.unavailableTooltip=void 0}}else s.push({...n,availableDeviceIds:n.availableDeviceIds})}
3)),s.map((e=>{let{availableDeviceIds:t,...n}=e;return n}))}),[c,u,p,h,t,e,i,b,v,x])},k_=(0,a.memo)((e=>{let{config:t}=e;const n=(0,c.LT)(c._j.organization.configurations.configuration,{organizationId:t.organizationId,configurationId:t.id});return(0,p.jsx)(Kn.Z,{component:f.rU,to:n,target:"_blank",rel:"noopener noreferrer",variant:"inherit",color:"primary",children:t.name})}));k_.displayName="ConfigLink";const I_=e=>{let{configurations:t}=e;if(0===t.length)return null;const n=t[0],i=t.length-1;return 1===t.length?(0,p.jsx)(k_,{config:n}):2===t.length?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(k_,{config:n})," and ",(0,p.jsx)(k_,{config:t[1]})]}):t.length<=4?(0,p.jsx)(p.Fragment,{children:t.map(((e,n)=>(0,p.jsxs)(a.Fragment,{children:[n>0&&(n===t.length-1?", and ":", "),(0,p.jsx)(k_,{config:e})]},e.id)))}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(k_,{config:n})," and ",i," other configuration",i>1?"s":""," tied to devices in this room"]})};I_.displayName="ConfigurationLinks";const A_=e=>{let{anchorEl:t,onClose:n,selectedActivity:i,onActivitySelect:o,deviceIds:a,devices:r,configurations:l}=e;const s=M_(a,r);return(0,p.jsx)(j_.s,{items:s,selectedActivity:i,useStandaloneModal:!0,title:"Select Starting Activity",onActivitySelect:e=>{o(e),n()},configurationLinks:l.length>0?(0,p.jsx)(I_,{configurations:l}):void 0,height:"216px",open:Boolean(t),onClose:n})},R_=30,T_=e=>{let{devices:t,selectedDeviceIds:n,onDeviceSelectionChange:o,hasFiltersApplied:r=!1}=e;const l=(0,a.useRef)(null),s=t.length,d=R_-n.length,c=t.filter((e=>!n.includes(e.id))).length,u=s>0&&t.every((e=>n.includes(e.id))),h=u||n.length>=R_,m=c>d,g=()=>{if(h){const e=new Set(t.map((e=>e.id))),i=n.filter((t=>!e.has(t)));o(i)}else{const e=new Set(n),i=R_-n.length;if(i<=0)return;const a=t.filter((t=>!e.has(t.id))).slice(0,i).map((e=>e.id)),r=[...n,...a];o(r)}},C=(()=>{if(0===s){return"Select all ".concat(r?"filtered ":"","devices")}if(h){const e=r?"filtered ":"";return 1===s?"Deselect 1 ".concat(e,"device"):"Deselect all ".concat(e,"devices")}const e=r?"filtered ":"";return 1===s?"Select 1 ".concat(e,"device"):"Select all ".concat(s," ").concat(e,"device").concat(1===s?"":"s")})(),x=0===t.length?"There are no devices to select!":m?"Rooms can hold up to 30 devices. Adding ".concat(t.length," devices would exceed the max. Apply more filters to your list (configuration, tags, name) or select devices individually."):!m&&!u&&n.length>=R_?"Maximum of ".concat(R_," devices per room reached"):null,f=(0,p.jsx)(Pi.Z,{checked:h,onChange:g,disabled:m||0===t.length,size:"small"});return(0,p.jsxs)(i.Z,{display:"flex",alignItems:"center",gap:1,children:[(0,p.jsx)(ee.Z,{title:x||"",enterDelay:500,disableHoverListener:!x,children:(0,p.jsx)("span",{ref:l,children:f})}),(0,p.jsx)(ee.Z,{title:x||"",enterDelay:500,disableHoverListener:!x,PopperProps:{anchorEl:()=>l.current},children:(0,p.jsx)(v.Z,{variant:"body2",color:m?"text.secondary":"text.primary",onClick:!m&&t.length>0?g:void 0,sx:{cursor:!m&&t.length>0?"pointer":"default",userSelect:"none"},children:C})})]})},P_=e=>{let{row:t,selectedDeviceIds:n,onDeviceClick:i}=e;const o=t.original,a=n.includes(o.id),r=!a&&n.length>=R_,l=(0,p.jsx)(tP.V,{size:"small",checked:a,checkedIconColor:"primary",uncheckedIconColor:"text.secondary",onClick:e=>{e.preventDefault(),e.stopPropagation(),i(o.id,t.index,e.nativeEvent.shiftKey,a)},disabled:r});return r?(0,p.jsx)(ee.Z,{title:"Maximum of ".concat(R_," devices per room reached"),children:(0,p.jsx)("span",{children:l})}):l},L_=e=>{var t;let{row:n}=e;const i=n.original,o=i.name||"Unnamed Device",r=null===(t=i.deviceGroupRefPath)||void 0===t?void 0:t.split("/")[1],l=(0,xo.ky)(S.F.Configurations,r),s=(null===l||void 0===l?void 0:l.name)||"No Configuration",d=(0,a.useMemo)((()=>{var e;return(null===(e=i.tagRefPaths)||void 0===e?void 0:e.map((e=>e.split("/")[1])).filter((e=>!!e)))||[]}),[i.tagRefPaths]),c=(0,E.Ev)(S.F.Tags,d,{sort:ze.gt});return(0,p.jsxs)(m.Z,{spacing:.25,overflow:"hidden",height:"100%",justifyContent:"center",children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"flex-end",children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",noWrap:!0,children:o}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:i.serial})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",noWrap:!0,children:s}),(0,p.jsx)(m.Z,{direction:"row",spacing:1,sx:{flexWrap:"wrap",minHeight:20},children:c&&c.length>0?c.map((e=>(0,p.jsx)(ke.Z,{label:e.name,size:"small",variant:"filled",sx:{color:"text.secondary",fontSize:"0.75rem",he
3ight:20}},e.id))):null})]})]})},N_=e=>{let{row:t}=e;const n=t.original,o=(0,z.l)(S.F.Devices,n.id),a=(0,Vr.aJ)(null===o||void 0===o?void 0:o.model);return(0,p.jsxs)(i.Z,{sx:{position:"relative",width:56,height:56,flexShrink:0},children:[(0,p.jsx)(i.Z,{sx:{width:56,height:56,borderRadius:"50%",backgroundColor:"white",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",border:1,borderColor:"divider"},children:(0,p.jsx)(i.Z,{component:"img",src:a,sx:{width:48,height:48,objectFit:"contain"}})}),o&&(0,p.jsx)(i.Z,{sx:{position:"absolute",bottom:-2,right:-2,width:20,height:20,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,p.jsx)(mT,{online:o.online,outOfDate:o.outOfDate,statusHasError:o.statusHasError,updating:o.updating,filled:!0,showTooltip:!0,SvgIconProps:{fontSize:"small",sx:{fontSize:16}},CircularProgressProps:{size:12}})})]})},U_=()=>{const e=(0,u.I0)(),t=(0,u.v9)((e=>e.room.query.configurationIds)),{documents:n}=(0,E.D)(S.F.Configurations,{sort:ze.gt,staticSort:"end"}),i=(0,a.useMemo)((()=>n.map((e=>({id:e.id,title:e.name})))),[n]);return(0,p.jsx)(pl,{label:"configuration",placeholder:"Filter by configuration",values:t,options:i,onChange:n=>{const i=t||[],o=n.filter((e=>!i.includes(e))),a=i.filter((e=>!n.includes(e)));o.forEach((t=>{e(v_.CM.configurationSelected({configurationId:t}))})),a.forEach((t=>{e(v_.CM.configurationDeselected({configurationId:t}))}))},checklist:!0,sx:{minWidth:180}})},F_=(0,a.memo)((e=>{let{onSearchChange:t,value:n}=e;const i=(0,a.useRef)(),o=(0,u.v9)((e=>e.room.queryPending)),[r,l]=(0,a.useState)("");(0,a.useEffect)((()=>{""===n&&l("")}),[n]);const s=(0,a.useRef)(),d=(0,a.useCallback)((e=>{const n=e.target.value;return l(n),s.current&&clearTimeout(s.current),s.current=setTimeout((()=>{t(n)}),300),()=>{s.current&&clearTimeout(s.current)}}),[t]);return(0,p.jsxs)(m.Z,{direction:"row",position:"relative",children:[(0,p.jsx)(Ln.Z,{InputProps:{sx:{paddingRight:3}},id:"search",placeholder:"Search by name or serial",inputRef:i,disabled:o,value:r,onChange:d,onKeyDown:e=>{"Enter"===e.key&&e.preventDefault()},fullWidth:!0}),r&&(0,p.jsx)(x.Z,{sx:{position:"absolute",right:e=>e.spacing(.5),top:"50%",transform:"translateY(-50%)"},onClick:()=>{var e;l(""),t(""),null===(e=i.current)||void 0===e||e.focus()},disabled:o,children:(0,p.jsx)(pa.Z,{})})]})}));F_.displayName="RoomDeviceListSearch";const O_=()=>{const e=(0,u.I0)(),t=(0,u.v9)((e=>e.room.query.tagIds)),{documents:n}=(0,E.D)(S.F.Tags,{sort:ze.gt,staticSort:"start"}),i=(0,a.useMemo)((()=>[{id:qi.ki.None,title:"No Tags"},...n.map((e=>({id:e.id,title:e.name})))]),[n]);return(0,p.jsx)(pl,{label:"tag",placeholder:"Filter by tag",values:t,options:i,onChange:n=>{const i=t||[],o=n.filter((e=>!i.includes(e))),a=i.filter((e=>!n.includes(e)));o.forEach((t=>{e(v_.CM.tagSelected({tagId:t}))})),a.forEach((t=>{e(v_.CM.tagDeselected({tagId:t}))}))},checklist:!0})},__=e=>{let{onSearchChange:t,onClearAll:n,hasFiltersApplied:o=!1,searchValue:a}=e;return(0,p.jsxs)(m.Z,{spacing:1.5,paddingBottom:1,children:[(0,p.jsx)(i.Z,{children:(0,p.jsx)(F_,{onSearchChange:t,value:a})}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(O_,{}),(0,p.jsx)(U_,{}),(0,p.jsx)(i.Z,{flex:1}),o&&(0,p.jsx)(C.Z,{size:"small",onClick:n,sx:{minWidth:"auto",textTransform:"none","&:hover":{backgroundColor:"transparent"},"&:hover .MuiTypography-root":{textDecoration:"underline"}},children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{"&:hover":{textDecorationColor:y.DG.grey[800]}},children:"clear filters"})})]})]})},z_=["info"],B_=(0,a.forwardRef)(((e,t)=>{let{row:n,style:i,isScrolling:o,isVisible:a,index:r,selectedDeviceIds:l,onDeviceClick:s}=e;const d=r%2===0,c=d?y.DG.purple[50]:"white",u=d?y.DG.purple[100]:y.DG.grey[100],h=n.original,m=l.includes(h.id);return(0,p.jsx)(th.J,{ref:t,style:i,row:n,flexColumnIds:z_,hover:!0,onClick:e=>{const t=e.target;t.closest("input")||t.closest("button")||t.closest("a")||t.closest('[role="button"]')||s(h.id,r,e.nativeEvent.shiftKey,m)},TableCellProps:{sx:{verticalAlign:"top"}},sx:{backgroundColor:c,userSelect:"none","&.MuiTableRow-hover:hover":{backgroundColor:"".concat(u),cursor:"pointer"}}})})),W_=["info"],V_=e=>{let{selectedDeviceIds:t,onDeviceSelectionChange:n,showSelectedAtTop:r=!1,onSearchChange:l}=e;const s=(0,u.I0)(),{queryResult:d,queryPending:c,selectedDevices:h}=C_(),[g,v]=(0,a.useState)(""),C=(0,u.v9)((e=>e.room.query)),x=(0,a.useRef)(C),f=(0,a.useCallback)(((e,t)=>{if(!t.trim())return e;const n=t.toLowerCase();return e.filter((e=>{var t,i,o;return(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(n))||(null===(i=e.serial)||void 0===i?void 0:i.toLowerCase().includes(n))||(null===(o=e.id)||void 0===o?void 0:o.toLowerCase().includes(n))}))}),[]),b=(0,a.useMemo)((()=>f(d,g)),[d,g,f]);(0,a.useEffect)((()=>{const e=x.current,n=C;(JSON.stringify(e.configurationIds)!==JSON.stringify(n.configurationIds)||JSON.stringify(e.tagIds)!==JSON.stringify(n.tagIds))&&t.length>0&&r&&s(v_.CM.selectedDevicesUpdated(t)),x.current=n}),[C,r,s]),(0,a.useEffect)((()=>(r&&t.length>0?s(v_.CM.selectedDevicesUpdated(t)):r||s(v_.CM.selectedDevicesUpdated([])),()=>{s(v_.CM.selectedDevicesUpdated([]))})),[r,s]);const y=(0,a.useMemo)((()=>{const e=new Set(b.map((e=>e.id))),t=h.filter((t=>e.has(t.id))),n=new Set(h.map((e=>e.id)));return{visibleSelectedDevices:t,unselectedDevices:b.filter((e=>!n.has(e.id)))}}),[b,h]),j=(0,a.useMemo)((()=>r&&0!==y.visibleSelectedDevices.length?[...y.visibleSelectedDevices,...y.unselectedDevices]:b),[b,y,r]),Z=(0,a.useMemo)((()=>j.map((e=>e.id))),[j]),w=(0,a.useRef)(null);(0,a.useEffect)((()=>{w.current=null}),[Z]);const E=(0,a.useCallback)(((e,i,o,a)=>{const r=Z.indexOf(e);if(-1!==r){if(o&&null===w.current)return a?n(t.filter((t=>t!==e))):t.length<R_&&n([...t,e]),void(w.current=r);if(a)if(o&&null!==w.current){const e=Math.min(w.current,r),i=Math.max(w.current,r),o=Z.slice(e,i+1),a=t.filter((e=>!o.includes(e)));n(a),w.current=r}else n(t.filter((t=>t!==e))),w.current=null;else{if(o&&null!==w.current){const i=Math.min(w.current,r),o=Math.max(w.current,r),a=Z.slice(i,o+1).filter((e=>!t.includes(e))),l=[...t,...a];return l.length>R_?t.length<R_&&n([...t,e]):n(l),void(w.current=r)}t.length<R_&&n([...t,e]),w.current=o?r:null}}}),[t,n,Z]),S=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.display({id:"checkbox",size:40,cell:e=>{let{row:n}=e;return(0,p.jsx)(P_,{row:n,selectedDeviceIds:t,onDeviceClick:E})}}),e.display({id:"image",size:64,cell:e=>{let{row:t}=e;return(0,p.jsx)(N_,{row:t})}}),e.display({id:"info",size:400,cell:e=>{let{row:t}=e;return(0,p.jsx)(L_,{row:t})}})]}),[t,E]),D=(0,sa.b7)({columns:S,data:j,autoResetAll:!0,getRowId:e=>e.id,getCoreRowModel:(0,da.sC)()}),M=(0,a.useCallback)((e=>{let{key:n,registerChild:i,...o}=e;const a=D.getRowModel().rows[o.index];return a?(0,p.jsx)(B_,{ref:i,row:a,selectedDeviceIds:t,onDeviceClick:E,...o},n):null}),[D,t,E]),k=(0,a.useMemo)((()=>(0,o.sumBy)(S,"size")),[S]),I=(0,a.useCallback)((e=>{v(e),null===l||void 0===l||l(e)}),[l]),A=(0,a.useCallback)((()=>{v(""),null===l||void 0===l||l(""),s(v_.CM.allFiltersCleared())}),[s,l]),R=""!==g.trim()||C.configurationIds.length>0||C.tagIds.length>0;return(0,p.jsxs)(m.Z,{spacing:1,sx:{"& .MuiTableCell-root":{paddingX:1}},height:"100%",overflow:"hidden",children:[(0,p.jsx)(__,{onSearchChange:I,onClearAll:A,hasFiltersApplied:R,searchValue:g}),(0,p.jsx)(i.Z,{px:1,children:(0,p.jsx)(T_,{devices:j,selectedDeviceIds:t,onDeviceSelectionChange:n,hasFiltersApplied:R})}),(0,p.jsx)(m.Z,{minWidth:k,flex:1,minHeight:0,sx:{bgcolor:"background.paper",borderRadius:"8px",border:1,borderColor:"divider",overflow:"hidden"},children:(0,p.jsx)(i.Z,{flex:1,minHeight:0,children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:"auto",table:D,rowHeight:82,flexColumnIds:W_,renderRow:M,loading:c,emptyMessage:"No devices found"})})})]})},G_=e=>{let{selectedDeviceIds:t,onDeviceSelectionChange:n,onCancel:o,onSave:a,isSaving:r}=e;return(0,p.jsxs)(m.Z,{spacing:2,sx:{height:"100%"},children:[(0,p.jsx)(v.Z,{variant:"h6",children:"Edit Devices"}),(0,p.jsx)(i.Z,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:(0,p.jsx)(V_,{selectedDeviceIds:t,onDeviceSelectionChange:n,showSelectedAtTop:!0,onSearchChange:()=>{}})}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,justifyContent:"flex-end",children:[(0,p.jsx)(C.Z,{variant:"text",onClick:o,disabled:r,sx:{textTransform:"none"},children:"Cancel"}),(0,p.jsx)(C.Z,{variant:"contained",onClick:a,disabled:r||0===t.length,children:"Save"})]})]})};var H_=n(53665),q_=n(51967);const Y_=["info"],K_=e=>{let{row:t,style:n,index:i}=e;const o=i%2===0?y.DG.grey[50]:"white";return(0,p.jsx)(th.J,{style:n,row:t,flexColumnIds:Y_,hover:!0,TableCellProps:{sx:{verticalAlign:"top",padding:0}},sx:{backgroundColor:o,"&.MuiTableRow-hover:hover":{backgroundColor:o}}})},X_=e=>{let{devices:t,loading:n=!1}=e;const r=(0,a.useMemo)((()=>{const e=(0,da.Cl)();return[e.display({id:"image",size:72,cell:e=>{let{row:t}=e;return(0,p.jsx)(i.Z,{sx:{paddingLeft:1,paddingRight:1},children:(0,p.jsx)(N_,{row:t})})}}),e.display({id:"info",size:400,cell:e=>{let{row:t}=e;return(0,p.jsx)(L_,{row:t})}})]}),[]),l=(0,sa.b7)({columns:r,data:t,autoResetAll:!0,getRowId:e=>e.id,getCoreRowModel:(0,da.sC)()}),s=(0,a.useCallback)((e=>{let{key:t,registerChild:n,...i}=e;const o=l.getRowModel().rows[i.index];return o?(0,p.jsx)(K_,{row:o,style:i.style,index:i.index},t):null}),[l]),d=(0,a.useMemo)((()=>(0,o.sumBy)(r,"size")),[r]);return(0,p.jsx)(m.Z,{minWidth:d,flex:1,minHeight:0,sx:{bgcolor:"background.paper",borderRadius:"8px",border:1,borderColor:"divider",overflow:"hidden"},children:(0,p.jsx)(i.Z,{flex:1,minHeight:0,children:(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:"auto",table:l,rowHeight:82,flexColumnIds:Y_,renderRow:s,loading:n,emptyMessage:"No devices in this room"})})})},Q_=e=>{let{roomName:t,deviceCount:n,savedDevices:o,devicesLoading:a=!1,onEditDevices:r,selectedActivity:l,onChangeActivity:s,isPrivateLink:d,onAccessChange:c,disablePublicRoomLinks:u=!1,roomUrl:h,qrUrl:g,onQRCodeDownloadSuccess:x,qrCodeRef:f}=e;const b=!!u||null!==d&&void 0!==d&&d;return(0,p.jsxs)(m.Z,{spacing:3.25,children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Devices"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",children:(0,ul.sr)(n,"device")}),(0,p.jsx)(Kn.Z,{component:"span",variant:"subtitle2",onClick:r,sx:{cursor:"pointer",color:"primary.main"},children:"Edit"})]})]}),(0,p.jsx)(i.Z,{sx:{height:"218px",display:"flex",flexDirection:"column"},children:(0,p.jsx)(X_,{devices:o,loading:a})})]}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsxs)(m.Z,{spacing:0,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Starting Activity"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"(Optional)"})]}),(0,p.jsx)(C.Z,{variant:"outlined",onClick:e=>s(e),sx:{justifyContent:"space-between",textTransform:"none",padding:2,borderColor:y.DG.grey[500],minWidth:0,maxWidth:"300px"},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,overflow:"hidden",flex:1},children:[(null===l||void 0===l?void 0:l.iconUrl)&&(0,p.jsx)(i.Z,{component:"img",src:null===l||void 0===l?void 0:l.iconUrl,alt:(null===l||void 0===l?void 0:l.title)||"Activity icon",sx:{width:24,height:24,objectFit:"cover",borderRadius:1,flexShrink:0}}),(0,p.jsx)(ee.Z,{title:(null===l||void 0===l?void 0:l.title)||"",enterDelay:500,disableHoverListener:!(null!==l&&void 0!==l&&l.t
3itle),children:(0,p.jsx)(v.Z,{variant:"body1",color:"text.primary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:(null===l||void 0===l?void 0:l.title)||"No activity selected"})}),(0,p.jsx)(mh.Z,{fontSize:"small"})]})})]}),(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsxs)(m.Z,{spacing:0,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Room Access"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Share a link or QR code to manage this room from another device."})]}),(0,p.jsx)(Fi._,{tooltipText:"Your organization has disabled public room links",hideTooltip:!u,children:(0,p.jsx)("span",{children:(0,p.jsx)(H_._,{isPrivate:b,onChange:c,disabled:u})})})]}),(0,p.jsx)(i.Z,{sx:{display:"none"},children:(0,p.jsx)(q_.i,{roomUrl:h,roomName:t,onDownloadSuccess:x,ref:f})})]})},J_=e=>{var t;let{open:n,onClose:o,room:r}=e;const l=(0,u.I0)(),s=(0,d.kV)(),{notify:c}=(0,ie.o)(),[h,m]=(0,a.useState)("main"),[g,v]=(0,a.useState)(r.name),[f,j]=(0,a.useState)(r.deviceIds),[Z,w]=(0,a.useState)(r.startingActivity),[E,S]=(0,a.useState)(!1),[D,M]=(0,a.useState)(null),{queryResult:k}=C_(),I=g_(f,k),A=(0,a.useMemo)((()=>{const e=new Map(k.map((e=>[e.id,e])));return f.map((t=>e.get(t))).filter((e=>void 0!==e))}),[f,k]),[R,T]=(0,a.useState)(!1);(0,a.useEffect)((()=>{n&&(l(v_.CM.allFiltersCleared()),v(r.name),j(r.deviceIds),w(r.startingActivity),m("main"),T(!1))}),[n,r,l]),(0,a.useEffect)((()=>{n&&l(v_.CM.allFiltersCleared())}),[h,l,n]),(0,a.useEffect)((()=>{if(n&&"main"===h&&!R&&k.length>0&&f.length>0)if(A.length<f.length){const e=A.map((e=>e.id));(async()=>{try{await(0,Fe.k$)({organizationId:s.id,roomId:r.id},{deviceIds:e}),j(e),T(!0),c({severity:"info",message:"Some devices in this room were removed from this organization"})}catch(t){console.error("Failed to update room devices:",t),T(!0)}})()}else T(!0)}),[n,h,R,k.length,f.length]);const P=f_(Z!==r.startingActivity?{...r,startingActivity:Z}:r),L=null!==P&&void 0!==P?P:void 0,N=(0,a.useCallback)((async()=>{if(g.trim()){if(g.trim()!==r.name){S(!0);try{await(0,Fe.k$)({organizationId:s.id,roomId:r.id},{name:g.trim()}),c({severity:"success",message:"Room name updated"})}catch(e){c({severity:"error",message:"Failed to update room name"}),v(r.name)}finally{S(!1)}}}else v(r.name)}),[g,r.name,r.id,s.id,c]),U=(0,a.useCallback)((async()=>{S(!0);try{await(0,Fe.k$)({organizationId:s.id,roomId:r.id},{deviceIds:f}),c({severity:"success",message:"Room devices updated"}),m("main")}catch(e){c({severity:"error",message:"Failed to update room devices"})}finally{S(!1)}}),[f,r.id,s.id,c]),F=(0,a.useCallback)((async e=>{w(e),S(!0);try{await(0,Fe.k$)({organizationId:s.id,roomId:r.id},{startingActivity:null!==e&&void 0!==e?e:null}),c({severity:"success",message:"Starting activity updated"})}catch(t){c({severity:"error",message:"Failed to update starting activity"}),w(r.startingActivity)}finally{S(!1)}}),[r.id,r.startingActivity,s.id,c]),O=(0,a.useCallback)((e=>{j(e)}),[]),_=(0,a.useCallback)((e=>{M(e.currentTarget)}),[]),z=(0,a.useCallback)((()=>{M(null)}),[]),[B,W]=(0,a.useState)(null!==(t=r.isPrivateLink)&&void 0!==t&&t);(0,a.useEffect)((()=>{var e;W(null!==(e=r.isPrivateLink)&&void 0!==e&&e)}),[r.isPrivateLink]);const V=(0,a.useCallback)((async e=>{if(B!==e){S(!0),W(e);try{await(0,Fe.k$)({organizationId:s.id,roomId:r.id},{isPrivateLink:e}),(0,b.ec)("Room Access Changed",{roomId:r.id,organizationId:s.id,newAccess:e?"organization":"public",previousAccess:B?"organization":"public",source:"room_edit"}),c({severity:"success",message:"Room access updated"})}catch(n){var t;W(null!==(t=r.isPrivateLink)&&void 0!==t&&t),c({severity:"error",message:"Failed to update room access"})}finally{S(!1)}}}),[r.id,r.isPrivateLink,s.id,B,c]),G=(0,h_.q9)(r.id,r.streamingCode),H=(0,h_.Do)(r.id,r.streamingCode),[q,Y]=(0,a.useState)(!1),K=(0,a.useRef)();(0,a.useEffect)((()=>()=>clearTimeout(K.current)),[]);const X=(0,a.useRef)(null),Q=(0,a.useCallback)((()=>{navigator.clipboard.writeText(G).then((()=>{c({severity:"success",message:"Room link copied to clipboard"}),(0,b.ec)("Room Link Copied",{roomId:r.id,organizationId:s.id,source:"room_edit"}),Y(!0),clearTimeout(K.current),K.current=setTimeout((()=>Y(!1)),2e3)})).catch((()=>{c({severity:"error",message:"Failed to copy link to clipboard"})}))}),[G,c,r.id,s.id]),$=(0,a.useCallback)((()=>{c({severity:"success",message:"QR code downloaded successfully"}),(0,b.ec)("Room QR Code Downloaded",{roomId:r.id,organizationId:s.id,roomName:r.name,source:"room_edit"})}),[c,r.id,r.name,s.id]),ee=(0,a.useCallback)((()=>{(0,di.UU)(G)}),[G]),te="main"===h,ne="main"===h,ae="main"===h?600:900,re="main"===h?"auto":"90vh",le="main"===h?"auto":"hidden";return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(p_.Z,{open:n,onClose:o,disableRestoreFocus:!0,disableAutoFocus:!0,children:(0,p.jsxs)(i.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:ae,height:re,maxHeight:"90vh",bgcolor:"background.paper",boxShadow:24,borderRadius:2,display:"flex",flexDirection:"column"},children:[te&&(0,p.jsxs)(i.Z,{sx:{paddingX:3,paddingTop:2,paddingBottom:0,display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,p.jsx)(y_,{value:g,onChange:e=>v(e.target.value),onBlur:N,disabled:E}),(0,p.jsx)(x.Z,{onClick:o,size:"small",sx:{color:y.DG.grey[600],"&:hover":{backgroundColor:y.DG.grey[100]}},children:(0,p.jsx)(J.Z,{})})]}),(0,p.jsx)(i.Z,{sx:{padding:3,flex:1,overflowY:le,display:"flex",flexDirection:"column",minHeight:0},children:(()=>{switch(h){case"main":return(0,p.jsx)(Q_,{roomName:g,deviceCount:f.length,savedDevices:A,devicesLoading:0===A.length&&f.length>0,onEditDevices:()=>m("devices"),selectedActivity:L,onChangeActivity:_,isPrivateLink:B,onAccessChange:V,disablePublicRoomLinks:s.disablePublicRoomLinks,roomUrl:G,qrUrl:H,onQRCodeDownloadSuccess:$,qrCodeRef:X});case"devices":return(0,p.jsx)(G_,{selectedDeviceIds:f,onDeviceSelectionChange:O,onCancel:()=>{j(r.deviceIds),m("main")},onSave:U,isSaving:E});default:return null}})()}),ne&&(0,p.jsxs)(i.Z,{sx:{paddingX:3,paddingY:2,borderTop:"1px solid ".concat(y.DG.grey[200]),display:"flex",alignItems:"center",gap:1},children:[(0,p.jsx)(C.Z,{variant:"outlined",onClick:()=>{var e;return null===(e=X.current)||void 0===e?void 0:e.download()},startIcon:(0,p.jsx)(vi.Z,{sx:{fontSize:16}}),sx:{textTransform:"none"},children:"QR code"}),(0,p.jsx)(C.Z,{variant:"outlined",onClick:Q,startIcon:(0,p.jsx)(oe.Z,{sx:{fontSize:16}}),sx:{textTransform:"none"},children:q?"Copied!":"Copy link"}),(0,p.jsx)(i.Z,{sx:{flexGrow:1}}),(0,p.jsx)(C.Z,{variant:"contained",color:"primary",onClick:ee,sx:{textTransform:"none"},endIcon:(0,p.jsx)(Mu.Z,{sx:{fontSize:18}}),children:"Start room"})]})]})}),Boolean(D)&&(0,p.jsx)(A_,{anchorEl:D,onClose:z,deviceIds:f,devices:k,selectedActivity:Z,onActivitySelect:F,configurations:I})]})};var $_=n(12041);const ez=e=>{let{open:t,onClose:n,room:i,onSuccess:o}=e;const{request:r,pending:l}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"rooms/:id/duplicate",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.Rooms,id:t.id,set:t}}})),[])),[s,d]=(0,a.useState)(""),[c,u]=(0,a.useState)(!1);(0,a.useEffect)((()=>{null!==i&&void 0!==i&&i.name&&t&&(d("".concat(i.name," copy")),u(!1))}),[null===i||void 0===i?void 0:i.name,t]);const h=async e=>{if(e&&e.preventDefault(),s.trim())try{await r({params:{id:i.id},data:{name:s.trim()},successMessage:"Room duplicated successfully",errorMessage:"Failed to duplicate room",onSuccess:o}),n()}catch{}else u(!0)};return(0,p.jsx)(Ro.Q,{title:"Duplicate Room",open:t,onClose:n,maxWidth:"xs",rightActions:[(0,p.jsx)(Un.U,{submitting:l,disabled:!s.trim()||l,onClick:h,children:"Duplicate"},"duplicate")],children:(0,p.jsx)("form",{onSubmit:h,noValidate:!0,autoComplete:"off",children:(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsx)(Ln.Z,{label:"Room Name",value:s,onChange:e=>{d(e.target.value),u(!e.target.value)},disabled:l,error:c,helperText:c?"Name is required":"",fullWidth:!0,autoFocus:!0,required:!0})})})})},tz=e=>{var t;let{room:n,height:o,apps:r,videos:l,webXRApps:s,onEditClick:d,onDuplicateSuccess:h}=e;const{organizationId:g}=(0,w.P)(),{request:x}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"rooms/:id",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.Rooms,id:null===t||void 0===t?void 0:t.id,remove:!0}}})),[])),[f,b]=(0,a.useState)(!1),j=(0,Le.ye)("enableMoreRoomActions"),Z=(0,X.bo)(),E=(e=>Bn({onConfirm:e,title:"Delete Room",getMessage:e=>'Delete the room "'.concat(e.name,'"?')}))((0,a.useCallback)((async e=>{await x({params:{id:e.id},successMessage:"Room deleted successfully",errorMessage:"Failed to delete room"})}),[x])),D=(0,z.l)(S.F.RoomsHeartbeat,n.id),k=(0,$_.n)(D),I=(0,a.useMemo)((()=>x_(n,r,l,s)),[n,r,l,s]),A=()=>{const e=(null===I||void 0===I?void 0:I.iconUrl)||null;return(0,p.jsx)(i.Z,{sx:{width:32,height:32,borderRadius:"4px",backgroundColor:y.DG.grey[300],display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexShrink:0},children:e?(0,p.jsx)("img",{src:e,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:"4px"}}):(0,p.jsx)(Bl.Z,{color:"disabled"})})},R=(0,u.v9)((e=>n&&n.createdBy?e.firestore.data[S.F.UserOrganizationPrivileges].data["".concat(n.createdBy.id,":").concat(g)]:void 0)),T=null===n||void 0===n||null===(t=n.createdBy)||void 0===t?void 0:t.id,P=(0,z.l)(S.F.Users,Z&&T&&!R?T:void 0),L=(0,a.useMemo)((()=>null!==R&&void 0!==R&&R.userProfile?R.userProfile:P?{id:P.id,name:P.name,email:P.email,imageUrl:P.imageUrl,claimed:P.claimed}:void 0),[null===R||void 0===R?void 0:R.userProfile,P]),N=(0,a.useMemo)((()=>{var e;const t=null!==(e=null===L||void 0===L?void 0:L.name)&&void 0!==e?e:"Deleted User";return n.createdAt?"Created by ".concat(t," on ").concat((0,M.ax)(n.createdAt)):"Created by ".concat(t)}),[null===L||void 0===L?void 0:L.name,n.createdAt]),U={noActivity:"Allow participants to keep using any content in their library when you start the room",activity:"Launch participants into ".concat(null===I||void 0===I?void 0:I.title," when you start the room")},F={"&:hover":{backgroundColor:y.DG.purple[50]}}
3,O=[(0,p.jsxs)(Hi.Z,{onClick:()=>{b(!0)},sx:F,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Ed.Z,{})}),(0,p.jsx)(Rs.Z,{children:"Duplicate"})]},"duplicate"),(0,p.jsxs)(Hi.Z,{onClick:()=>{E.trigger(n)},sx:F,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Gl.Z,{})}),(0,p.jsx)(Rs.Z,{children:"Delete"})]},"delete")];return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ez,{open:f,onClose:()=>{b(!1)},room:n,onSuccess:h}),(0,p.jsx)(Fn,{...E.props}),(0,p.jsx)(i.Z,{position:"relative",children:(0,p.jsxs)(Me.Z,{sx:{borderRadius:"8px",border:"1px solid",borderColor:y.DG.grey[400],overflow:"hidden"},children:[j&&(0,p.jsx)(i.Z,{sx:{position:"absolute",top:4,right:4,zIndex:1},children:(0,p.jsx)(jd,{menuItems:O,placement:"bottom",width:100,paperSx:{borderRadius:"8px"}})}),(0,p.jsxs)(m.Z,{padding:1.5,height:o,onClick:()=>{null===d||void 0===d||d(n)},sx:{cursor:"pointer","&:hover:not(:has(button:hover))":{backgroundColor:y.DG.grey[50]}},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:(0,ul.sr)(n.deviceIds.length,"Device")}),k&&(0,p.jsx)(ke.Z,{label:"In Use",size:"small",color:"warning",sx:{height:20,fontSize:"0.7rem"}}),(0,p.jsx)(ee.Z,{title:N,enterDelay:300,children:(0,p.jsx)(i.Z,{children:(0,p.jsx)(se,{user:L,size:"xs"})})})]}),(0,p.jsx)(Ui.G,{variant:"h6",className:"titleOnHover",title:n.name,sx:{flexGrow:1,marginTop:.5},children:n.name}),(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(Ie.Z,{sx:{marginX:-1.5,borderColor:y.DG.grey[200]}}),(0,p.jsx)(ee.Z,{placement:"right",title:null===I?U.noActivity:U.activity,children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(A,{}),(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:null===I?"Participant choice":I.title})]})}),(0,p.jsx)(C.Z,{variant:"outlined",fullWidth:!0,sx:{border:"1px solid",borderColor:y.DG.grey[300],backgroundColor:y.DG.white},onClick:e=>{e.stopPropagation();const t="".concat(c._j.casting.room.__path.replace(":roomId",n.id),"?streamingCode=").concat(n.streamingCode);(0,di.UU)(t)},children:"Start"})]})]})]})})]})},nz=180;let iz;!function(e){e.ALPHABETICAL="ALPHABETICAL",e.LAST_USED="LAST_USED"}(iz||(iz={}));const oz=(0,a.memo)((e=>{let{rooms:t,allRooms:n,selectedRoomId:o,onCloseRoomModal:r}=e;const[l,s]=(0,a.useState)(null),{documents:d}=(0,E.D)(S.F.Apps),{documents:c}=(0,E.D)(S.F.Videos),{documents:u}=(0,E.D)(S.F.WebXRApps);(0,a.useEffect)((()=>{if(o){const e=n.find((e=>e.id===o));e&&s(e)}}),[o,n]),(0,a.useEffect)((()=>{if(l){const e=n.find((e=>e.id===l.id));e&&e!==l&&s(e)}}),[n,l]);const h=(0,a.useCallback)((e=>{s(e)}),[]),v=(0,a.useCallback)((()=>{s(null),r()}),[r]),C=(0,a.useCallback)(((e,t)=>t?(0,p.jsx)(tz,{room:e,height:nz,apps:d,videos:c,webXRApps:u,onEditClick:h,onDuplicateSuccess:h}):(0,p.jsx)(i.Z,{sx:{height:nz,border:"1px solid",borderColor:"divider",borderRadius:1},children:(0,p.jsxs)(m.Z,{padding:1.5,spacing:1,height:nz,children:[(0,p.jsx)(g.Z,{variant:"text",height:"1.125rem",sx:{width:"60%"}}),(0,p.jsx)(g.Z,{variant:"text",height:"1rem",sx:{width:"30%"}}),(0,p.jsx)(g.Z,{variant:"text",height:"1rem",sx:{width:"50%"}}),(0,p.jsx)(g.Z,{variant:"text",height:"1rem",sx:{width:"40%"}})]})})),[d,c,u,h]),x=(0,a.useCallback)((e=>e.id),[]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(QF,{items:t,renderItem:C,getItemKey:x,cellHeight:nz,minCellWidth:262,cellPadding:1}),l&&(0,p.jsx)(J_,{open:!0,onClose:v,room:l})]})})),az=n.p+"static/media/filter_bar.956ecd53bbb86ab2c178.png",rz=n.p+"static/media/tile_bottom_left.78cec46fa72224ff0b45.png",lz=n.p+"static/media/tile_bottom_right.a961ad1ddee4af9a4d9c.png",sz=n.p+"static/media/tile_top_left_on_call.5e2a25b719705e0e17ad.png",dz=n.p+"static/media/tile_top_right.3541819f7315585c23ea.png",cz=(0,a.memo)((e=>{let{admins:t,max:n}=e;const i=(0,o.slice)(t,0,n),a=(0,o.size)(t)-(0,o.size)(i);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,sx:{flexShrink:0},children:[(0,o.map)(i,(e=>(0,p.jsx)(de,{name:e.name,email:e.email},e.email))),a>0&&(0,p.jsxs)(v.Z,{variant:"body2",sx:{color:"text.secondary",whiteSpace:"nowrap"},"data-testid":"billingAdminChipList_overflow",children:["+",a," more"]})]})}));cz.displayName="UIBillingAdminChipList";const uz=(0,Kc.ZP)(i.Z)((e=>{let{theme:t}=e;return{position:"relative",overflow:"hidden",minHeight:327,borderRadius:8,backgroundColor:y.DG.purple[50],backgroundImage:["linear-gradient(180deg, ".concat((0,Dr.Fq)(y.DG.primary[50],.12)," 0%, ").concat((0,Dr.Fq)(y.DG.primary[100],.12)," 100%)"),"radial-gradient(646px 487px at 93% 100%, ".concat(y.DG.primary[100]," 6%, #9483EB 14%, #B1A5F1 21%, ").concat(y.DG.purple[100]," 37%, ").concat(y.DG.white," 100%)")].join(", "),display:"flex",alignItems:"center",padding:"".concat(t.spacing(7)," ").concat(64,"px")}})),pz=(0,Kc.ZP)(i.Z)({position:"absolute",right:0,bottom:0,width:620,height:327,pointerEvents:"none"}),hz=(0,Kc.ZP)("img")({position:"absolute",objectFit:"cover",boxShadow:"0px 2px 4px 0px rgba(0, 0, 0, 0.15)"}),mz=(0,Kc.ZP)(i.Z)({position:"absolute",left:0,top:226,width:470,height:54,overflow:"hidden",borderRadius:8,border:"1px solid ".concat(y.DG.grey[400]),backgroundColor:y.DG.white,"& img":{height:"100%",objectFit:"cover",objectPosition:"left"}}),gz=(0,a.memo)((()=>{const{hasBillingPrivilege:e,subscriptionPath:t}=K(),{admins:n}=D(!e),{salesContactUrl:o}=Y(),a=!o.startsWith("mailto:"),{ref:r,width:l}=(0,zu.m)(),s=!l||(e=>e+64-452>=620)(l);return(0,p.jsxs)(uz,{ref:r,"data-testid":"roomsLockedHero",children:[(0,p.jsxs)(m.Z,{spacing:2,sx:{maxWidth:420,position:"relative"},children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Stay connected with Rooms"}),(0,p.jsx)(v.Z,{variant:"body1",children:"Get back to real-time visibility and easy troubleshooting, and add Rooms to your subscription."}),e?(0,p.jsx)(i.Z,{children:(0,p.jsx)(C.Z,{component:f.rU,to:t,variant:"contained","data-testid":"roomsLockedHero_cta",children:"Get access to Rooms"})}):(0,p.jsxs)(m.Z,{spacing:1,"data-testid":"roomsLockedHero_adminContact",children:[(0,p.jsx)(v.Z,{variant:"body1",children:"For access, reach out to your admin:"}),(0,p.jsx)(cz,{admins:n,max:5})]}),(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:[(0,p.jsx)(Kn.Z,{href:o,target:a?"_blank":void 0,rel:a?"noopener":void 0,"data-testid":"roomsLockedHero_salesLink",children:"Click here to contact sales"})," ","for a free trial"]})]}),(0,p.jsxs)(pz,{"aria-hidden":!0,sx:{display:s?"block":"none"},children:[(0,p.jsx)(hz,{src:sz,alt:"",sx:{left:19,top:16,width:285,height:164,boxShadow:"none"}}),(0,p.jsx)(hz,{src:dz,alt:"",sx:{left:317,top:20,width:276,height:159}}),(0,p.jsx)(hz,{src:rz,alt:"",sx:{left:50,top:193,width:272,height:157}}),(0,p.jsx)(hz,{src:lz,alt:"",sx:{left:341,top:193,width:272,height:157}}),(0,p.jsx)(mz,{children:(0,p.jsx)("img",{src:az,alt:""})})]})]})}));gz.displayName="RoomsLockedHero";var vz=n(9953);const Cz=600,xz=e=>{let{open:t,onClose:n,title:a,children:r,leftActions:l,rightActions:s,width:d=Cz,showCloseButton:c=!0,externalCloseButton:u=!1,sx:h}=e;return(0,p.jsxs)(p.Fragment,{children:[u&&t&&(0,p.jsx)(x.Z,{onClick:n,size:"small",sx:{position:"fixed",top:16,right:("number"===typeof d?d:parseInt(d))+16,zIndex:e
3=>e.zIndex.drawer+1,"&:hover":{color:y.DG.grey[400],backgroundColor:"transparent"}},children:(0,p.jsx)(J.Z,{})}),(0,p.jsx)(vz.ZP,{anchor:"right",open:t,onClose:n,variant:"temporary",sx:{"& .MuiDrawer-paper":{width:d,height:"100vh"},...h},children:(0,p.jsxs)(m.Z,{height:"100%",overflow:"hidden",children:[(0,p.jsx)(m.Z,{paddingX:3,paddingY:2.5,width:1,children:(0,p.jsxs)(m.Z,{direction:"row",width:1,spacing:1,justifyContent:c&&!u?"space-between":"flex-start",alignItems:"flex-start",children:[(0,o.isString)(a)?(0,p.jsx)(v.Z,{variant:"h6",children:a}):a,c&&!u&&(0,p.jsx)(x.Z,{onClick:n,size:"small",children:(0,p.jsx)(J.Z,{})})]})}),(0,p.jsx)(i.Z,{paddingX:3,paddingTop:2,paddingBottom:3,overflow:"auto",flexGrow:1,children:r}),(!(0,o.isEmpty)(l)||!(0,o.isEmpty)(s))&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(m.Z,{direction:"row",paddingX:3,paddingY:2.5,children:(0,p.jsxs)(m.Z,{direction:"row",width:1,spacing:3,children:[!(0,o.isEmpty)(l)&&(0,p.jsx)(m.Z,{direction:"row",justifyContent:"flex-start",flexGrow:1,spacing:1.5,children:l}),!(0,o.isEmpty)(s)&&(0,p.jsx)(m.Z,{direction:"row",justifyContent:"flex-end",flexGrow:1,spacing:1.5,children:s})]})})]})]})})]})};xz.displayName="UIRightDrawer";const fz=[],bz=e=>{let{open:t,onClose:n}=e;const o=(0,u.I0)(),r=(0,d.kV)(),{notify:l}=(0,ie.o)(),[s,h]=(0,a.useState)(!1),[g,x]=(0,a.useState)(1),[f,y]=(0,a.useState)(!1),[j,Z]=(0,a.useState)(!1),[w,E]=(0,a.useState)(!0),S="New Room";(0,a.useEffect)((()=>{var e,n,i,o;t&&(null===(e=(n=window).Intercom)||void 0===e||e.call(n,qi.Lw.HIDE),null===(i=(o=window).Intercom)||void 0===i||i.call(o,qi.Lw.UPDATE,{hide_default_launcher:!0}));return()=>{var e,t;null===(e=(t=window).Intercom)||void 0===e||e.call(t,qi.Lw.UPDATE,{hide_default_launcher:!1})}}),[t]);const{handleSubmit:D,formState:{errors:M},reset:k,watch:I,trigger:A,setValue:R,register:T}=(0,fg.cI)({defaultValues:{name:S,deviceIds:[],startingActivity:void 0},mode:"onChange"});T("deviceIds",{validate:e=>e.length>0||"Please select at least one device"});const P=I("name"),L=I("deviceIds"),N=I("startingActivity"),{queryResult:U}=C_(),F=M_(2===g?L:fz,2===g?U:void 0),O=g_(2===g?L:fz,2===g?U:void 0),_=(0,a.useMemo)((()=>{if(!N)return null;const e=F.find((e=>(0,w_.xW)(e,N)));return(null===e||void 0===e?void 0:e.title)||null}),[N,F]);(0,a.useEffect)((()=>{t&&o(v_.CM.resetState())}),[t,o]);const z=(0,a.useCallback)((e=>{e.length>R_?l({severity:"warning",message:"You can only select up to ".concat(R_," devices per room")}):R("deviceIds",e)}),[R,l]),B=(0,a.useCallback)((e=>{}),[]),W=(0,a.useCallback)((e=>{R("startingActivity",e)}),[R]),V=(0,a.useCallback)((async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h(!0);try{const i=f?e.name:S,o=await(0,Fe.K8)({organizationId:r.id},{name:i,deviceIds:e.deviceIds,startingActivity:e.startingActivity,isPrivateLink:w});if(w||(0,b.ec)("Room Access Changed",{roomId:o.id,organizationId:r.id,newAccess:"public",previousAccess:"organization",source:"room_creation"}),t){const e="".concat(c._j.casting.room.__path.replace(":roomId",o.id),"?streamingCode=").concat(o.streamingCode);(0,di.UU)(e)}k(),y(!1),l({severity:"success",message:'Room "'.concat(i,'" created successfully!')}),x(1),Z(!1),n()}catch(i){l({severity:"error",message:"Failed to create room. Please try again."}),console.error("Failed to create room:",i)}finally{h(!1)}}),[r.id,k,n,l,f,S,w]),G=(0,a.useCallback)((async()=>{await A(["name","deviceIds"])&&(x(2),Z(!0))}),[A]),H=(0,a.useCallback)((()=>{x(1),o(v_.CM.allFiltersCleared())}),[o]),q=(0,a.useCallback)((()=>{s||(k(),x(1),y(!1),Z(!1),E(!0),n())}),[s,k,n]),Y=(0,a.useCallback)((()=>{f||P!==S||(R("name",""),y(!0))}),[f,P,S,R]),K=(0,a.useCallback)((e=>{const t=e.target.value;R("name",t),f||t===S||y(!0)}),[f,S,R]),X=(0,a.useCallback)((()=>{P.trim()||(R("name",S),y(!1))}),[P,S,R]),Q=(0,a.useMemo)((()=>{var e;return(0,p.jsx)(b_,{value:P,onChange:K,onFocus:Y,onBlur:X,error:!!M.name,helperText:null===(e=M.name)||void 0===e?void 0:e.message,disabled:s,showLabel:2===g})}),[P,K,Y,X,M.name,s,g]);return(0,p.jsx)(xz,{open:t,onClose:q,title:(()=>{const e=(0,p.jsx)(v.Z,{variant:"h4",children:"Create a room"});return 2===g?e:(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",width:"100%",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{variant:"h4",children:"Create a room"}),Q]})})(),width:600,externalCloseButton:!0,leftActions:2===g?(0,p.jsx)(C.Z,{variant:"text",sx:{textTransform:"none"},onClick:D((e=>V(e,!1))),disabled:s,children:"Save room for later"}):void 0,rightActions:1===g?(0,p.jsxs)(m.Z,{display:"flex",alignItems:"center",direction:"row",gap:1,children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",color:"text.secondary",children:[L.length," devices selected"]}),(0,p.jsxs)(C.Z,{variant:"outlined",sx:{textTransform:"none"},onClick:G,disabled:s||!f&&!1||f&&!P.trim()||0===L.length,children:["Next: ","Select activity"]})]}):(0,p.jsx)(Un.U,{onClick:D((e=>
3V(e,!0))),submitting:s,children:"Start room"}),children:(0,p.jsx)(m.Z,{component:"form",spacing:3,height:"100%",onSubmit:D(V),children:1===g?(0,p.jsxs)(m.Z,{spacing:3,height:"100%",children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-start",alignItems:"center",gap:1,width:"100%",children:[(0,p.jsx)(v.Z,{variant:"h6",children:"Select devices"}),(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",children:["(",R_," max)"]})]}),(0,p.jsx)(i.Z,{flex:1,minHeight:0,children:(0,p.jsx)(V_,{selectedDeviceIds:L,onDeviceSelectionChange:z,showSelectedAtTop:j,onSearchChange:B})}),M.deviceIds&&(0,p.jsx)(v.Z,{variant:"body2",color:"error",children:M.deviceIds.message})]}):2===g?(0,p.jsxs)(m.Z,{spacing:3,children:[Q,(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Select Devices"}),(0,p.jsx)(C.Z,{variant:"text",onClick:H,sx:{textTransform:"none",alignSelf:"flex-start","&:hover":{backgroundColor:"transparent",textDecoration:"underline"}},children:(0,p.jsxs)(v.Z,{variant:"body1",color:"primary",children:[L.length," device",1===L.length?"":"s"," ","selected"]})})]}),(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsxs)(m.Z,{spacing:0,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Room Access"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Use a link or QR code to manage this room from another device."})]}),(0,p.jsx)(H_._,{isPrivate:w,onChange:E})]}),(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",width:"100%",justifyContent:"space-between",gap:10,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",gap:.5,flexShrink:0,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.secondary",children:"(Optional)"}),(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Select Starting Activity"})]}),_&&(0,p.jsx)(ee.Z,{title:_,placement:"top",children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.secondary",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:_})})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Launch devices into a starting app, video, or WebXR link when the room starts."})]}),(0,p.jsx)(j_.s,{items:F,selectedActivity:N,onActivitySelect:W,configurationLinks:O.length>0?(0,p.jsx)(I_,{configurations:O}):void 0})]})]}):null})})},yz=()=>{const[e,t]=(0,a.useState)(!1),n=(0,a.useCallback)((()=>{t(!0)}),[]),i=(0,a.useCallback)((()=>{t(!1)}),[]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(On.e,{backgroundSx:{background:"url(".concat(YF.Z,")"),backgroundSize:"contain",backgroundPosition:"left center",backgroundRepeat:"no-repeat",aspectRatio:"556 / 175",paddingLeft:"10%",paddingTop:"5%",paddingRight:14,paddingBottom:8},title:"Create a room",subtitle:"See what learners see, guide them through activities, and keep your class on task.",ctaMessage:"Create Room",onCtaClick:n}),e&&(0,p.jsx)(bz,{open:e,onClose:i})]})};var jz=n(73366);const Zz=[{icon:go.Z,label:"Use a strong Wi-Fi connection.",detail:" Streaming quality depends heavily on network stability."},{icon:AN.Z,label:"Increase sleep timeout",detail:" on devices that support it. When a device sleeps, the system will end its stream."},{icon:wI.Z,label:'Turn off "Require Streaming Permission Prompt"',detail:" so streams start automatically across all devices when you launch a Room."},{icon:fO.Z,label:"Heads-on vs. heads-off matters.",detail:" Devices behave differently when worn versus sitting idle. Expect streaming to drop if a headset goes to sleep."}],wz=()=>{const[e,t]=(0,a.useState)(null),n=(0,a.useCallback)((e=>t(e.currentTarget)),[]),o=(0,a.useCallback)((()=>t(null)),[]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ee.Z,{title:"Tips for a better streaming experience",children:(0,p.jsx)(x.Z,{size:"small",onClick:n,"aria-label":"Streaming tips","data-testid":"roomsStreamingTips_button",children:(0,p.jsx)(jz.Z,{fontSize:"small"})})}),(0,p.jsx)(cg.ZP,{open:!!e,anchorEl:e,onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:(0,p.jsxs)(m.Z,{spacing:1.5,sx:{padding:2.5,maxWidth:420},children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:500,children:"Tips for a better streaming experience"}),Zz.map((e=>{let{icon:t,label:n,detail:o}=e;return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"flex-start",children:[(0,p.jsx)(t,{sx:{fontSize:16,color:"text.secondary",marginTop:"2px",flexShrink:0}}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:[(0,p.jsx)(i.Z,{component:"span",fontWeight:500,color:"text.primary",children:n}),o]})]},n)})),(0,p.jsx)(v.Z,{variant:"body2",children:(0,p.jsx)(li.Q,{href:Be.IW.rooms,children:"View help doc"})})]})})]})};wz.displayName="RoomsStreamingTips";const Ez=()=>{const[e,t]=(0,a.useState)(!1),n=o_(),o=(0,a.useCallback)((()=>{t(!0)}),[]),r=(0,a.useCallback)((()=>{t(!1)}),[]);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(wz,{}),(0,p.jsx)(ee.Z,{title:n?(l="create a room","Add Rooms to your subscription to ".concat(l)):"",children:(0,p.jsx)(i.Z,{component:"span","data-testid":"roomsPageToolbar_createRoomTooltipTarget",children:(0,p.jsx)(C.Z,{color:"primary",variant:"contained",size:"small",disabled:n,startIcon:(0,p.jsx)(Wn.Z,{}),onClick:o,"data-testid":"roomsPageToolbar_createRoomButton",children:"Create room"})})}),e&&(0,p.jsx)(bz,{open:e,onClose:r})]});var l},Sz=(0,a.memo)((()=>{const{show:e,isIsv:t,hasBillingPrivilege:n,hasCreatedRoom:i,admins:o,subscriptionPath:r}=K(),l=e,{organization:s}=(0,d.mP)(),c=!(null===s||void 0===s||!s.isResold),{roomsTab:u,roomsTabResold:h,roomsTabIsv:g}=Y(),x=t||c,y=t?g:c?h:u,j=null!==s&&void 0!==s&&s.firstPaidInvoiceAt?(0,M.i$)(1e3*s.firstPaidInvoiceAt.seconds+O.Yp,"MMMM D, YYYY"):void 0;(0,a.useEffect)((()=>{l&&(0,b.ec)("Rooms Pricing Announcement Shown",{surface:"roomsTab",hasBillingPrivilege:n,hasCreatedRoom:i})}),[l,n,i]);const Z=(0,a.useCallback)((()=>{(0,b.ec)("Rooms Pricing Announcement Clicked",{surface:"roomsTab",hasBillingPrivilege:n,hasCreatedRoom:i})}),[n,i]);return l?(0,p.jsx)(Iy.Z,{severity:"info","data-testid":"roomsPricingTabBanner",sx:{marginBottom:2},action:n&&!x?(0,p.jsx)(C.Z,{component:f.rU,to:{pathname:r,state:{openAddRooms:!0,entrySurface:"roomsTab"}},size:"small",variant:"contained",onClick:Z,"data-testid":"roomsPricingTabBanner_cta",children:y.ctaLabel}):void 0,children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,flexWrap:"wrap",children:[(0,p.jsxs)(v.Z,{variant:"body2",children:[(w=n?y.adminLine1:y.userLine1,w.includes(O.Hc)?j?w.replace(O.Hc,j):"Your free access to Rooms is ending soon.":w)," ",n?y.adminLine2:y.userLine2,x&&(0,p.jsx)(ke.Z,{component:"a",href:"mailto:[email protected]",clickable:!0,size:"small",label:"[email protected]","data-testid":"roomsPricingTabBanner_partnersChip",sx:{marginLeft:1,verticalAlign:"middle"}})]}
3),!x&&!n&&(0,p.jsx)(cz,{admins:o,max:5})]})}):null;var w}));Sz.displayName="RoomsPricingTabBanner";const Dz=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,E.D)(S.F.Rooms,e)},Mz=e=>{const{organizationId:t}=(0,w.P)(),n=id();return(0,a.useMemo)((()=>{const i=n?(0,o.filter)(e,(e=>(0,o.includes)(n.configurationIds,e))):e;if((0,o.isEmpty)(i))return;const a=S.F.DeviceWebConsoleSettings,r=(0,Os.N$)(a),l=(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,t)),s=(0,o.map)(i,(e=>(0,Os.qb)(S.F.Configurations,e)));return{id:(0,nd.tc)({collection:a,organizationId:t,filter:"configs:".concat(i.join(","))}),query:(0,o.map)((0,o.chunk)(s,nd.ps),(e=>(0,td.IO)(r,l,(0,td.ar)("deviceGroupRef","in",e))))}}),[n,e,t])},kz={[iz.ALPHABETICAL]:"A to Z",[iz.LAST_USED]:"Last used"},Iz=()=>{const e=(0,l.k6)(),t=(0,l.TH)(),n=(0,a.useMemo)((()=>new URLSearchParams(t.search)),[t.search]),{organizationId:r}=(0,w.P)(),s=(0,Le.t2)(r),d=o_(),c=(0,Le.ye)("enableRoomsNetworkCheck"),u=(0,i_.W)({page:"rooms",extraVisibleGuard:c,livekitEnabled:s}),h=(0,Le.ye)("enableSortingRooms"),[g,C]=(0,a.useState)(iz.ALPHABETICAL),[x,f]=(0,a.useState)(!0),[b,j]=(0,a.useState)(null),[Z,E]=(0,a.useState)(""),[S,D]=(0,a.useState)(void 0),M=(0,a.useCallback)(((e,t)=>{if(g===iz.ALPHABETICAL){const n=(0,ze.bL)(e.name,t.name);return x?n:-n}{var n,i;const o=null!==(n=e.lastUsedAt)&&void 0!==n?n:0,a=null!==(i=t.lastUsedAt)&&void 0!==i?i:0;return 0===o&&0===a?0:0===o?1:0===a?-1:x?a-o:o-a}}),[g,x]),{documents:k,fetched:I}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{configurationsFullAccess:t,approvedConfigurationIds:n}=(0,w.P)(),{documents:i,fetched:r,...l}=Dz(e),s=!1===t,d=Mz(n),c=(0,If.Y)(s?d:void 0),u=(0,a.useMemo)((()=>s?c?i.filter((e=>0===e.deviceIds.length||e.deviceIds.every((e=>c.has(e))))):[]:i),[i,s,c]),p=s&&(!d||(0,o.isEmpty)(d.query)),h=s?p||r&&void 0!==c:r,m=(0,a.useMemo)((()=>(0,o.keyBy)(u,"id")),[u]);return(0,a.useMemo)((()=>({...l,documents:u,documentsById:m,fetched:h})),[l,u,m,h])}({sort:M}),[A,R]=(0,a.useState)(),T=(0,a.useRef)(!1);(0,a.useEffect)((()=>{Z.trim()&&!T.current&&(T.current=!0,(0,Fe.Y4)({organizationId:r},{$where:{},$orderBy:{}}).then((e=>R(new Map(e.map((e=>[e.id,{name:e.name,serial:e.serial}])))))).catch((()=>{T.current=!1})))}),[Z,r]);const P=(0,a.useMemo)((()=>s_(k,Z,A)),[k,Z,A]),L=k&&k.length>0,N=P&&P.length>0,U=()=>{j(null)},F=e=>{C(e),U()},O=(0,a.useCallback)((e=>{E(e)}),[]),_=(0,a.useCallback)((e=>{D(e.id)}),[]),z=(0,a.useCallback)((()=>{D(void 0)}),[]);return(0,a.useEffect)((()=>{const i=n.get("roomId"),o=n.get("search");if(o&&E(o),i&&D(i),i||o){const n=new URLSearchParams(t.search);n.delete("roomId"),n.delete("search");const i=n.toString(),o=t.pathname+(i?"?".concat(i):"");e.replace(o)}}),[n,t.pathname,t.search,e]),(0,p.jsxs)(Mn.C,{toolbarBreadcrumbs:[{navCategory:!0,title:"Monitor"},{title:"Rooms"}],toolbarContent:(0,p.jsx)(Ez,{}),children:[(0,p.jsx)("style",{children:"\n main {\n background-color: ".concat(y.DG.white," !important;\n }\n ")}),(0,p.jsx)(i.Z,{sx:{display:"flex",flex:1,minHeight:"100%"},children:(0,p.jsxs)(m.Z,{padding:7,gap:2,sx:{flex:1,minWidth:0,minHeight:"100%"},children:[!d&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Rooms"}),L&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(i.Z,{sx:{flexGrow:1}}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(u_,{rooms:k,searchValue:Z,deviceInfoMap:A,onRoomSelected:_,onSearchChange:O}),h&&(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{cursor:"pointer"},children:[(0,p.jsxs)(m.Z,{direction:"row",onClick:()=>{f((e=>!e))},spacing:0,children:[(0,p.jsx)(r_,{sx:{fontSize:"11px",marginRight:"-2px",color:x?"text.secondary":"action.disabled"}}),(0,p.jsx)(a_,{sx:{fontSize:"11px",marginTop:"6px",marginLeft:"-2px",color:x?"action.disabled":"text.secondary"}})]}),(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.secondary",onClick:e=>{j(e.currentTarget)},children:kz[g]})]})]}
3),(0,p.jsxs)(Is.Z,{anchorEl:b,open:Boolean(b),onClose:U,children:[(0,p.jsx)(Hi.Z,{onClick:()=>F(iz.ALPHABETICAL),children:kz[iz.ALPHABETICAL]}),(0,p.jsx)(Hi.Z,{onClick:()=>F(iz.LAST_USED),children:kz[iz.LAST_USED]})]})]})]}),d?(0,p.jsx)(gz,{}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Sz,{}),u.visible&&"warning"===u.severity&&(0,p.jsxs)(Iy.Z,{severity:"warning",children:[(0,p.jsx)(t_.Z,{sx:{fontWeight:600},children:u.title}),(0,p.jsxs)(v.Z,{variant:"body2",children:[u.subtitle," ",(0,p.jsx)(Kn.Z,{component:"button",variant:"body2",onClick:u.openDialog,sx:{verticalAlign:"baseline"},children:"See details"})]})]}),"warning"===u.severity&&(0,p.jsx)(n_.X,{open:u.dialogOpen,onClose:u.closeDialog,onCopied:u.onCopied,onDismiss:u.dismissBanner,severity:u.severity,title:u.title,groups:u.groups}),(0,p.jsx)(Ie.Z,{}),I?L&&P?N?(0,p.jsx)(oz,{rooms:P,allRooms:k,selectedRoomId:S,onCloseRoomModal:z}):(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"200px"},children:(0,p.jsxs)(v.Z,{variant:"body1",color:"text.secondary",children:['No rooms found matching "',Z,'"']})}):(0,p.jsx)(yz,{}):(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"400px"},children:(0,p.jsx)(Zi.Z,{})})]})]})})]})},Az=()=>(0,p.jsx)(Iz,{}),Rz=(0,a.memo)((e=>{let{privilege:t,featureDescription:n="access this feature"}=e;const i=(0,l.k6)(),{organizationProfile:a}=(0,w.P)();return(0,p.jsxs)(Me.Z,{sx:{padding:1},children:[(0,p.jsx)(In.Z,{children:"Privileges required"}),(0,p.jsxs)(An.Z,{children:[(0,p.jsxs)(mf.h,{paragraph:!0,children:["You need ",(0,p.jsx)("em",{children:(0,o.capitalize)(t)})," privileges for"," ",(0,p.jsx)("em",{children:a.name})," to ",n,"."]}),(0,p.jsx)(C.Z,{size:"small",color:"primary",startIcon:(0,p.jsx)(rM.Z,{}),onClick:()=>{i.goBack()},children:"Back"})]})]})}));var Tz=n(12870);const Pz=(0,a.memo)((e=>{let{apiKey:t}=e;const n=(0,u.I0)(),{organizationId:i}=(0,w.P)(),{notify:o}=(0,ie.o)(),r=(0,u.v9)((e=>e.organizationApiKeys.editingNameId===t.id)),l=(0,a.useCallback)((()=>{n(Tz.H.actions.nameEditStarted({id:t.id}))}),[t.id,n]),s=(0,a.useCallback)((()=>{n(Tz.H.actions.nameEditEnded({id:t.id}))}),[t.id,n]),d=(0,a.useCallback)((async e=>{try{await(0,Fe.Hd)({organizationId:i,apiKeyId:t.id},{name:e}),o({severity:"success",message:"API key updated"})}catch(r){var n,a;(0,Si.yR)(r,{name:"rename api key error",contexts:{apiKey:{id:t.id,name:e}}}),o({severity:"error",message:null!==(n=null===(a=(0,Fe.tf)(r))||void 0===a?void 0:a.message)&&void 0!==n?n:"Failed to update API key"})}}),[t.id,o,i]),c=(0,a.useMemo)((()=>({required:!0})),[]);return(0,p.jsx)(Xv,{value:t.name,editing:r,onClick:l,onSubmit:d,onBlur:s,name:"name",privilege:"organization",registerOptions:c,inputOffset:-1})})),Lz=(0,da.Cl)(),Nz=(0,a.memo)((()=>{const{notify:e}=(0,ie.o)(),{privileges:t,organizationId:n}=(0,w.P)(),i=(0,a.useCallback)((async t=>{try{await(0,Fe.x3)({organizationId:n,apiKeyId:t.id}),e({severity:"success",message:"API key deleted"})}catch(a){var i,o;(0,Si.yR)(a,{name:"handleDeleteApiKeyConfirm() error",contexts:{apiKey:{id:t.id}}}),e({severity:"error",message:null!==(i=null===(o=(0,Fe.tf)(a))||void 0===o?void 0:o.message)&&void 0!==i?i:"Failed to delete API key"})}}),[e,n]),{trigger:o,props:r}=Bn({title:"Delete API Key",onConfirm:i,getMessage:e=>"Are you sure you want to delete ".concat(e.name,"?")}),{documents:l}=(0,E.D)(S.F.ApiKeys),s=(0,a.useMemo)((()=>{const e=[Lz.accessor("name",{header:"Name",cell:e=>(0,p.jsx)(Pz,{apiKey:e.row.original}),size:300}),Lz.accessor("id",{header:"ID",size:220})];return t.organization&&e.push(Lz.display({header:"",id:"delete",cell:e=>(0,p.jsx)(x.Z,{onClick:()=>o(e.row.original),children:(0,p.jsx)(Gl.Z,{})}),size:50})),e}),[t.organization,o]),d=(0,sa.b7)({columns:s,data:l,initialState:{sorting:[{id:"name",desc:!1}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()});return(0,p.jsxs)("div",{children:[(0,p.jsx)(dc.A,{table:d,rowHeight:43,emptyMessage:"You haven't created any API keys",flexColumnIds:"name"}),(0,p.jsx)(Fn,{...r})]})})),Uz=(0,a.memo)((e=>{let{open:t,onClose:n}=e;const{notify:i}=(0,ie.o)(),{organizationId:o}=(0,w.P)(),[r,l]=(0,a.useState)(""),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)();(0,a.useEffect)((()=>
3{t&&(l("API Key - ".concat((0,M.ah)())),d(!1),u(void 0))}),[t]);return(0,p.jsxs)(kn.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"sm",children:[(0,p.jsx)(In.Z,{children:"New API Key"}),!s&&!c&&(0,p.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),r){d(!0);try{const e=await(0,Fe.Ib)({organizationId:o},{name:r});u(e),i({severity:"success",message:"API key created"})}catch(a){var t,n;(0,Si.yR)(a,{name:"create api key error",contexts:{apiKey:{name:r}}}),i({severity:"error",message:null!==(t=null===(n=(0,Fe.tf)(a))||void 0===n?void 0:n.message)&&void 0!==t?t:"Failed to create API key"})}d(!1)}},noValidate:!0,autoComplete:"off",children:[(0,p.jsx)(An.Z,{children:(0,p.jsx)(Ln.Z,{name:"name",label:"Name",placeholder:"API Key 1",value:r,onChange:e=>l(e.target.value),fullWidth:!0,autoFocus:!0})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:n,children:"Cancel"}),(0,p.jsx)(Un.U,{disabled:!r,children:"Create"})]})]}),!s&&c&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,alignItems:"flex-start",children:[(0,p.jsx)(v.Z,{children:r}),(0,p.jsx)(tu,{label:"ID",value:c.apiKeyId}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,flexWrap:"wrap",children:[(0,p.jsx)(v.Z,{variant:"caption",color:"textSecondary",children:"Secret"}),(0,p.jsx)(v.Z,{variant:"subtitle2",component:"span",fontWeight:"medium",sx:{overflowWrap:"anywhere"},children:c.apiKeySecret})]}),(0,p.jsxs)(Tn.Z,{variant:"body2",children:["Store this Secret in a safe location."," ",(0,p.jsx)("strong",{children:"You will need to generate a new API Key if you lose your Secret."})]}),(0,p.jsx)(Ei,{filename:r,data:c?{id:c.apiKeyId,secret:c.apiKeySecret}:void 0})]})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsx)(C.Z,{onClick:n,children:"Done"})})]}),s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(An.Z,{children:(0,p.jsx)(Rn.Z,{})}),(0,p.jsx)(Pn.Z,{})]})]})})),Fz=()=>{const{privileges:e,hasRequiredPrivilege:t,organizationId:n,buildOrganizationPath:o}=(0,w.P)(),r=(0,d.U5)(),l=r&&t("organization"),[s,c]=(0,a.useState)(!1),u=(0,a.useCallback)((()=>{c(!1)}),[]);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",flexWrap:"wrap",spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h5",children:"API Keys"}),e.organization&&!r&&(0,p.jsxs)(v.Z,{variant:"body2",children:["To create an API key, please"," ",(0,p.jsx)(Kn.Z,{component:f.rU,to:o((e=>e.settings.subscription)),children:"upgrade your subscription"})," ","to the Premium plan."]})]}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(ph,{featureName:"the API",children:(0,p.jsx)(zi.W,{privilege:"organization",action:"use the API",children:(0,p.jsx)(C.Z,{variant:"contained",color:"primary",size:"small",startIcon:l?(0,p.jsx)(Wn.Z,{}):(0,p.jsx)(uh.Z,{}),onClick:()=>c(!0),disabled:!l,children:"New API key"})})})})]}),(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",flexWrap:"wrap",children:(0,p.jsxs)(mf.h,{paragraph:!0,children:["Organization ID ",(0,p.jsx)("em",{children:n})]})}),(0,p.jsx)(Nz,{}),(0,p.jsxs)(v.Z,{variant:"body2",color:"textSecondary",children:["See the"," ",(0,p.jsx)(Kn.Z,{href:"https://help.managexr.com/en/articles/5509120-api-key-usage",target:"_blank",rel:"noreferrer noopener",children:"API Usage"})," ","documentation page for instructions."]}),(0,p.jsx)(Uz,{open:s,onClose:u})]})};Fz.displayName="SettingsOrganizationApiKeysPage";const Oz={devices:[S.F.Devices,S.F.DeviceCommands,S.F.RealtimeConnections],billing:[S.F.OrganizationBilling,S.F.Subscriptions,S.F.SubscriptionSchedules,S.F.PaymentMethods]},_z=[S.F.AnalyticsFilters,S.F.AppPatches,S.F.Groups],zz=(0,o.union)((0,o.flatMap)(Oz),_z),Bz=()=>{const[e,t]=(0,a.useState)(""),[n,o]=(0,a.useState)((0,M.us)().toISOString()),[r,l]=(0,a.useState)("all"),s=(0,a.useMemo)((()=>[{value:"all",label:"All types"},...[{value:"devices",label:"Devices"},{value:"billing",label:"Billing"},...Object.entries(S.N).filter((e=>{let[t,n]=e;return!!n&&!zz.includes(t)})).map((e=>{let[t,n]=e;return{value:t,label:n}}))].sort(((e,t)=>String(e.label).localeCompare(String(t.label))))]),[]),d=(0,a.useMemo)((()=>{let t;
3"all"!==r&&(t="devices"===r||"billing"===r?Oz[r]:[r]);return{auditLogTypes:[Vu.USER_EVENT],userEventsParams:{userEmail:e?(0,ul.kp)(e):void 0,userId:e?(0,ul.kp)(e):void 0,targetTypes:t},endTime:n}}),[n,e,r]),c=dh(d);return(0,p.jsx)(oh,{...c,height:"window",renderTable:a=>{let{tableHeader:d,tableBody:u}=a;return(0,p.jsx)(sh,{headerBackgroundSize:3,headerContent:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Audit Logs"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(i.Z,{flexGrow:0,minWidth:180,children:(0,p.jsx)(Qi,{label:"Target Type",value:r,onChange:l,options:s,size:"small"})}),(0,p.jsx)(i.Z,{flexGrow:1,children:(0,p.jsx)(rh,{filter:e,onFilterChange:t,filterPlaceholder:"Filter by user email or API key ID",endTime:n,onEndTimeChange:o,fetchingEvents:c.fetchingEvents,onRefreshClick:c.refreshEvents})})]})]}),d]}),children:u})}})},Wz=()=>(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.Organizations,id:null===t||void 0===t?void 0:t.organizationId,update:n}}})),[])),Vz=()=>{var e;const{privileges:t,allPrivileges:n,setOrganization:r}=(0,w.P)(),{organization:l,subscription:s}=(0,d.mP)(),{notify:c}=(0,ie.o)(),u=(0,X.u7)()||(0,ek.h)(["local","development"])&&t.organization,h=Wz(),{request:g,pending:x}=(0,Fe.pv)({method:"delete",path:""}),{register:f,handleSubmit:b,formState:j,reset:Z,setValue:E,watch:S}=(0,fg.cI)({defaultValues:{name:l.name,imageUrl:l.imageUrl,billingEmail:l.billingEmail}}),D=S("imageUrl"),M=(0,a.useCallback)((e=>(e=>{var t;const n=null===(t=Mg[e.type])||void 0===t?void 0:t[0];if(!n)return;const i="avatar_".concat(Date.now()).concat(n);return"profile/".concat(i)})(e)),[]),k=(0,a.useCallback)((e=>{E("imageUrl",e,{shouldDirty:!0})}),[E]),I=(0,a.useCallback)((()=>{E("imageUrl","",{shouldDirty:!0})}),[E]),A=b((async e=>{let{name:t,imageUrl:n,billingEmail:i}=e;await h.request({data:{name:t,imageUrl:n,billingEmail:i},onSuccess:()=>{Z({name:t,imageUrl:n,billingEmail:i})},successMessage:"Organization profile updated",errorMessage:"Error updating organization profile"})})),R=(0,a.useMemo)((()=>{var e;return null===(e=(0,o.filter)(n,(e=>e.organizationRef.id!==l.id))[0])||void 0===e?void 0:e.organizationRef.id}),[n,l.id]),T=(0,a.useCallback)((async()=>{if("past_due"===(null===s||void 0===s?void 0:s.status))return c({message:"In order to delete your organization, you must complete your subscription payment",severity:"error"});await g({successMessage:"Organization deleted",errorMessage:"Error deleting organization",onSuccess:()=>{R&&r(R)}})}),[g,R,c,r,null===s||void 0===s?void 0:s.status]),{trigger:P,props:L}=Bn({onConfirm:T,title:"Delete Organization",confirmLabel:"Delete organization",getContent:e=>(0,p.jsxs)(mf.h,{paragraph:!0,children:["Are you sure you want to delete ",(0,p.jsx)("em",{children:e.name}),"? All device configurations, apps, and files will be removed as a result. This action cannot be undone."]}),getConfirmationInputProps:e=>({confirmationText:e.name,TextFieldProps:{helperText:"Type the organization name to confirm and delete",label:"Organization Name"}})});return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Profile"}),(0,p.jsxs)(zi.W,{privilege:"organization",children:[(0,p.jsx)("form",{onSubmit:A,noValidate:!0,autoComplete:"off",children:(0,p.jsxs)(m.Z,{direction:"row",spacing:4,alignItems:"center",children:[(0,p.jsxs)(m.Z,{paddingTop:2,spacing:2,alignItems:"center",children:[(0,p.jsxs)(i.Z,{width:200,height:200,position:"relative",children:[(0,p.jsx)($g,{imageUrl:D||void 0,onImageUploaded:k,onClear:I,getFilePath:M,privilege:"organization",imageFit:"cover"}),!D&&(0,p.jsx)(vI.Z,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"80%",height:"80%",color:y.DG.grey[200],pointerEvents:"none"}})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",paddingLeft:1,children:"Organization Icon"}),(0,p.jsx)("input",{type:"hidden",...f("imageUrl")})]}),(0,p.jsxs)(m.Z,{spacing:2,alignItems:"flex-start",width:300,children:[(0,p.jsx)(Ln.Z,{label:"Organization Name",error:!!j.errors.name,disabled:j.isSubmitting||!t.organization,fullWidth:!0,...f("name",{required:!0})}),(0,p.jsx)(Ln.Z,{label:"Billing Email",error:!!j.errors.billingEmail,helperText:null===(e=j.errors.billingEmail)||void 0===e?void 0:e.message,disabled:j.isSubmitting||!t.organization,fullWidth:!0,...f("billingEmail",NS.LV)}),(0,p.jsx)(Un.U,{disabled:!j.isDirty||!t.organization,submitting:j.isSubmitting,iconPlacement:"end",children:"Update profile"})]})]})}),u&&(0,p.jsx)(m.Z,{alignItems:"flex-end",direction:"row",children:(0,p.jsx)(C.Z,{color:"error",variant:"outlined",startIcon:(0,p.jsx)(Gl.Z,{}),onClick:()=>P(l),disabled:x,size:"small","data-testid":"organizationSettings_delete",children:"Delete organization"})}),(0,p.jsx)(Fn,{...L})]})]})},Gz=(0,a.memo)((e=>{let{title:t,description:n,value:i,disabled:o,privilege:a,onToggle:r,forbiddenForOrganization:l,hide:s=!1}=e;return s?null:(0,p.jsxs)(m.Z,{spacing:3,direction:"row",paddingBottom:1,children:[(0,p.jsxs)(m.Z,{width:1,spacing:1,children:[(0,p.jsx)(v.Z,{children:t}),(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:n})]}),(0,p.jsx)(m.Z,{children:(0,p.jsx)(zi.W,{privilege:a,forbiddenForOrganization:l,action:"change the ".concat(t," security setting"),children:(0,p.jsx)(fu,{value:i,disabled:o,label:i?"On":"Off",size:"medium",onToggle:r})})})]})})),Hz=e=>{var t;let{open:n,onClose:i}=e;const{user:o,organizationProfile:r}=(0,w.P)(),[l,s]=(0,a.useState)(!1),d=Wz();return(0,p.jsxs)(kn.Z,{open:n,onClose:i,maxWidth:"xs",fullWidth:!0,children:[(0,p.jsxs)(An.Z,{children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{children:["Require 2-Step Authentication for everyone within"," ",null!==(t=r.name)&&void 0!==t?t:"this organization","?"," "]}),(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"grey.600"},children:"Turning this on will require all users to receive a code on their mobile phone and enter it on this application to complete sign-in. Users in this org will not be able to access the organization\u2019s pages until they set up 2-Step Authentication."})]}),!o.mfaEnabled&&(0,p.jsx)(ui.Q,{sx:{marginTop:2,backgroundColor:y.DG.secondary[50],padding:1,borderRadius:2,marginRight:1},children:(0,p.jsxs)(v.Z,{variant:"body2",children:["You must set up 2-Step Authentication on your own account before enforcing 2-Step Auth for your organization."," ",(0,p.jsx)(Kn.Z,{component:Qc,to:(0,c.LT)(c._j.userSettings),children:"Go to account page"})]})})]}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:()=>i(),children:"Cancel"}),(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",children:(0,p.jsx)(Un.U,{onClick:async()=>{s(!0),await d.request({data:{forceMfa:!0},successMessage:"2-Step Auth is required for all users in this organization"}),i(),s(!1)},variant:"contained",color:"primary",disabled:!o.mfaEnabled,sx:{marginRight:o.mfaEnabled?0:2},submitting:l,children:"Require for everyone"})})]})]})},qz=()=>{var e,t;const{privileges:n,organizationProfile:i}=(0,w.P)(),r=(0,d.U5)(),l=(0,d.kV)(),s=Wz(),c=(0,d.P)("HIDE_USER_IDENTIFYING_INFORMATION"),u=(0,Le.iA)(),h=(0,Le.c)(!1),g=(0,Le.I7)(),[C,x]=(0,a.useState)(!1),f=Bn({onConfirm:async()=>{l.forceMfa&&await s.request({data:{forceMfa:!1},successMessage:"2-Step Auth is no longer required in this organization"})},title:"Remove 2-Step Authentication requirement for \n ".concat(null!==(e=i.name)&&void 0!==e?e:"this organization","?"),content:(0,p.jsx)(v.Z,{variant:"body2",sx:{color:"grey.600"},children:"Doing so removes the organization requirement for 2-Step Auth, but will not change the 2-Step Auth settings in affected user accounts."}),confirmLabel:"Remove requirement"}),b=(0,a.useCallback)((()=>{l.forceMfa?f.trigger(!0):x(!0)}),[l.forceMfa,f]),y=(0,a.useCallback)((async e=>{let{changes:t}=e;await s.request({data:t,successMessage:"Security settings updated",errorMessage:"Error updating organization security settings"})}),[s]),{withChanges:j,addChangesAndSave:Z,saveChangesPending:E}=Ji({document:l,save:y}),S=(0,a.useCallback)((async e=>{Z(e)}),[Z]),D=(0,a.useCallback)((async()=>{await S({disableDiscoverXR:!l.disableDiscoverXR})}),[S,l.disableDiscoverXR]),M=Bn({onConfirm:D,title:"Hide ".concat(g," for ").concat(null!==(t=i.name)&&void 0!==t?t:"this organization","?"),content:(0,p.jsxs)(v.Z,{variant:"body2",sx:{color:"grey.600"},children:["Turning this off will hide ",g," from view and remove all saved Instant Apps."]}),confirmLabel:"Hide and remove Instant Apps"}),k=(0,a.useMemo)((()=>({DISALLOW_SCREEN_STREAMING:{title:"Screen Streaming",description:"Allow all devices in this organization to participate in Screen\n Streaming to device managers that request it. Turning this off will\n remove all users' ability to request a screen stream.",value:!j.disallowStreaming,disabled:!n.organization||E||s.pending,privilege:"organization",onToggle:()=>S({disallowStreaming:!l.disallowStreaming})}
3,DISABLE_USB_UPDATES:{title:"USB Updates",description:(0,p.jsxs)(p.Fragment,{children:["Allow users in this organization to generate and apply ManageXR USB Updates to devices. ManageXR USB Updates use cryptographic keys to validate that an update is coming from your organization or a trusted entity."," ",(0,p.jsx)(li.Q,{href:Be.IW.offlineUpdates,children:"Learn more"})]}),value:!j.disableUsbUpdates,disabled:!n.organization||E||s.pending,privilege:"organization",hide:h,onToggle:()=>S({disableUsbUpdates:!l.disableUsbUpdates})}})),[s.pending,S,h,j.disallowStreaming,j.disableUsbUpdates,l.disallowStreaming,l.disableUsbUpdates,n.organization,E]),I=(0,Le.S5)(!1),A=!n.organization||E||s.pending,R=(0,a.useMemo)((()=>({DISABLE_PUBLIC_ROOM_LINKS:{title:"Public links for Rooms",description:'Allow users to set Rooms access to "Anyone with the link or QR code." This option allows people who don\'t use ManageXR to facilitate rooms. Turning this off will require all Room links to be private and only accessible by authenticated users in this organization.',value:!j.disablePublicRoomLinks,disabled:A,privilege:"organization",onToggle:()=>S({disablePublicRoomLinks:!l.disablePublicRoomLinks})}})),[A,S,j.disablePublicRoomLinks,l.disablePublicRoomLinks]),T=(0,a.useMemo)((()=>({ENFORCE_MFA:{title:"Require 2-Step Authentication for your organization",description:"Turning this on will require all users to receive a code on their mobile phone and enter it on this application to complete sign-in. Users in the org will not be able to access the organization\u2019s pages unless they set up 2-Step Auth.",value:!!j.forceMfa,disabled:A,privilege:"organization",onToggle:()=>b()},HIDE_USER_IDENTIFYING_INFO:{title:"Reporting Sensitive Information",description:"Allow the reporting of location, MAC address and Wi-Fi network name for devices in this organization. Turning this off will hide this information from view. ",value:!j.hideUserIdentifyingInfo&&!c,disabled:c||A,privilege:"organization",onToggle:()=>S({hideUserIdentifyingInfo:!l.hideUserIdentifyingInfo}),forbiddenForOrganization:c},DISABLE_DISCOVER_XR:{title:g,description:"Allow all users in this organization to view ".concat(g," and contact potential partners. Allow all users with App & file privileges to save Instant Apps. Turning this off will hide ").concat(g," from view and remove all saved Instant Apps."),value:!j.disableDiscoverXR,disabled:A,privilege:"organization",onToggle:()=>{j.disableDiscoverXR?D():M.trigger(!0)},hide:I}})),[I,M,c,b,D,S,g,j.disableDiscoverXR,j.forceMfa,j.hideUserIdentifyingInfo,l.hideUserIdentifyingInfo,A]),P=r?{...T,...k,...u?{}:R}:{...T,...u?{}:R};return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Security"}),(0,p.jsx)(m.Z,{paddingTop:1,children:(0,o.map)((0,o.toPairs)(P),((e,t)=>{let[n,i]=e;return i.hide?null:(0,p.jsxs)(m.Z,{spacing:2,paddingBottom:2,children:[0!==t&&(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(Gz,{...i})]},n)}))}),(0,p.jsx)(Hz,{open:C,onClose:()=>x(!1)}),(0,p.jsx)(Fn,{...f.props}),(0,p.jsx)(Fn,{...M.props})]})},Yz=()=>(0,Fe.pv)({method:"post",path:"billing/preview-subscription-change"}),Kz="[email protected]",Xz=(0,a.memo)((()=>(0,p.jsx)(ae,{value:Kz,noPadding:!0,showValue:!0,inline:!0,children:(0,p.jsx)(Hn.Z,{"data-testid":"salesContactChip_email",sx:{typography:"caption",color:"text.primary",borderRadius:10,paddingX:1,paddingY:.25,backgroundColor:"action.selected",whiteSpace:"nowrap",lineHeight:1.5,"&.Mui-focusVisible":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}},children:Kz})})));Xz.displayName="UISalesContactChip";const Qz=e=>{const t=(0,Le.W1)(),n=U(),i=(0,d.mU)(),o=(0,d.kV)();return!!t&&(o&&!o.subscriptionRef?e===k.QV.Premium&&!o.customContract&&Date.now()>=N:n&&L(null===i||void 0===i?void 0:i.items,A.ROOMS,e,o))},Jz=()=>{const e=(0,Le.W1)(),{documents:t,fetched:n}=(0,E.D)(S.F.Rooms,{enabled:e});return{hasCreatedRoom:!(0,o.isEmpty)(t),fetched:n}},$z=()=>{var e;const{featureFlags:t}=(0,d.kV)(),n=Sc.X.ENABLE_ROOMS_OVERRIDE,i=null===(e=(0,o.find)(t,(e=>e.startsWith("".concat(n,":")))))||void 0===e?void 0:e.split(":")[1];return i&&!isNaN(new Date(i).getTime())?i:void 0},eB={[k.zF.Monthly]:4,[k.zF.Annually]:3.5},tB="October 1",nB="See what learners see, guide them through activities, and keep your class on task.";var iB=n(15825),oB=n(65764);var aB=n(7373);const rB=(e,t,n)=>({deviceQuantity:null!==e&&void 0!==e?e:0,period:null!==t&&void 0!==t?t:k.zF.Annually,isTrialing:n}),lB={[A.ROOMS]:"Rooms"}
3,sB="MMMM D, YYYY",dB=e=>(0,o.join)((0,o.sortBy)((0,o.map)((0,o.filter)(e,(e=>!!e.sku)),(e=>e.sku))),","),cB=e=>e?(0,o.split)(e,","):[],uB=(e,t)=>t===k.QV.Premium?e:(0,o.filter)(e,(e=>e!==A.ROOMS)),pB=(e,t)=>{var n,i,a;const r=(0,o.last)((0,o.sortBy)(null===t||void 0===t?void 0:t.phases,(e=>e.periodStart.seconds)));return{tier:null!==(n=null===r||void 0===r?void 0:r.tier)&&void 0!==n?n:null===e||void 0===e?void 0:e.tier,period:null!==(i=null===r||void 0===r?void 0:r.period)&&void 0!==i?i:null===e||void 0===e?void 0:e.period,quantity:null!==(a=null===r||void 0===r?void 0:r.quantity)&&void 0!==a?a:null===e||void 0===e?void 0:e.quantity}},hB=(e,t)=>{const n=(0,o.last)((0,o.sortBy)(null===t||void 0===t?void 0:t.phases,(e=>e.periodStart.seconds)));return n?n.items:e},mB=(0,a.createContext)(void 0),gB=e=>{let{children:t}=e;const n=(0,oB.useStripe)(),{apiPostCreateSubscription:o,apiPostUpdateSubscription:a,apiPostCreatePaymentMethod:r,apiPostCancelResumeSubscription:l,apiDeletePaymentMethod:s,apiPostPreviewSubscription:d,apiPatchUpdateOrgBillingAndPreviewTax:c,apiPostUpdatePaymentMethodAndSubscription:u,apiPostCreatePaymentMethodAndSubscription:h,apiGetUpcomingInvoice:m}=CB(),{createStripePaymentMethodAndAddToOrg:g,createStripePaymentMethod:C,deletePaymentMethod:x,paymentMethodSelection:f,pendingStripePaymentMethodCreate:b,setDefaultPaymentMethod:y,stripePaymentMethodSelectionChanged:j}=yB({apiDeletePaymentMethod:s,apiPostCreatePaymentMethod:r,stripeClient:n}),{subscription:Z,subscriptionSchedule:w,subscriptionSelection:E,stripeDiscountId:S,subscriptionSelectionChanged:D,resetSubscriptionSelection:M,subscriptionFullyLoaded:k,cancelSubscription:I,cancelSubscriptionSchedule:A,resumeSubscription:R,pendingCancelSubscriptionSchedule:T,pendingSubscriptionUpsert:P,upsertSubscriptionAndPaymentMethod:L}=fB({apiPostCancelResumeSubscription:l,apiPostUpdateSubscription:a,apiPostUpdatePaymentMethodAndSubscription:u,apiPostCreatePaymentMethodAndSubscription:h,stripeClient:n,paymentMethodSelection:f}),{subscriptionPreview:N,subscriptionPreviewError:U,subscriptionPreviewChanged:F,refreshSubscriptionPreview:O}=jB(Z,S,E,d,P),_=P||o.pending||a.pending||u.pending,B=l.pending||T,W=r.pending,V=s.pending,{upcomingInvoice:G,pendingUpcomingInvoice:H}=xB(Z,m,S),q=d.pending,Y=c.pending,K=(0,z.T)("pricingFeatureList"),{updateOrganizationBilling:X,organizationBillingSelection:Q,organizationBillingSelectionChanged:J}=bB({apiPatchUpdateOrgBillingAndPreviewTax:c});return k&&K?(0,p.jsx)(mB.Provider,{value:{subscription:Z,subscriptionSchedule:w,subscriptionSelection:E,stripeDiscountId:S,subscriptionSelectionChanged:D,resetSubscriptionSelection:M,cancelSubscription:I,cancelSubscriptionSchedule:A,resumeSubscription:R,upsertSubscriptionAndPaymentMethod:L,subscriptionPreview:N,subscriptionPreviewError:U,subscriptionPreviewChanged:F,refreshSubscriptionPreview:O,upcomingInvoice:G,createStripePaymentMethodAndAddToOrg:g,createStripePaymentMethod:C,deletePaymentMethod:x,paymentMethodSelection:f,setDefaultPaymentMethod:y,stripePaymentMethodSelectionChanged:j,pendingSubscriptionUpsert:_,pendingSubscriptionCancelResume:B,pendingPaymentMethodCreate:W,pendingPaymentMethodDelete:V,pendingSubscriptionPreview:q,pendingOrganizationBillingUpdate:Y,pendingUpcomingInvoice:H,pendingStripePaymentMethodCreate:b,organizationBillingSelection:Q,organizationBillingSelectionChanged:J,updateOrganizationBilling:X,stripeLoaded:!!n,featureListsByTier:K},children:t}):(0,p.jsxs)(i.Z,{padding:1,paddingTop:2,children:[(0,p.jsx)(v.Z,{color:"textSecondary",gutterBottom:!0,children:"Loading subscription"}),(0,p.jsx)(Rn.Z,{})]})},vB=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"useSubscriptionContext()";const t=(0,a.useContext)(mB);if((0,o.isUndefined)(t))throw new Error("".concat(e," must be used in a SubscriptionProvider"));return t},CB=()=>{const e=(0,Fe.pv)({method:"post",path:"billing/create-subscription"}),t=(0,Fe.pv)({method:"post",path:"billing/update-subscription"}),n=(0,Fe.pv)({method:"post",path:"billing/create-payment-method"}),i=(0,Fe.pv)({method:"post",path:"billing/update-subscription-cancellation"}),o=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"billing/payment-method/:id",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.PaymentMethods,id:null===t||void 0===t?void 0:t.id,remove:!0}}})),[])),r=Yz(),l=(0,Fe.pv)({method:"get",path:"billing/upcoming-invoice/:subscriptionId"}),s=(0,Fe.pv)({method:"patch",path:"billing/update-organization-billing-and-preview-tax"}),d=(0,Fe.pv)({method:"post",path:"billing/update-subscription-and-payment-method"});return{apiPostCancelResumeSubscription:i,apiPostCreatePaymentMethod:n,apiPostCreatePaymentMethodAndSubscription:(0,Fe.pv)({method:"post",path:"billing/create-subscription-and-payment-method"}),apiPostCreateSubscription:e,apiPostUpdateSubscription:t,apiPostPreviewSubscription:r,apiPostUpdatePaymentMethodAndSubscription:d,apiDeletePaymentMethod:o,apiPatchUpdateOrgBillingAndPreviewTax:s,apiGetUpcomingInvoice:l}},xB=(e,t,n)=>{const[i,o]=(0,a.useState)(),{request:r}=t,l=null===e||void 0===e?void 0:e.id,s="".concat(JSON.stringify(e),"|").concat(n);return(0,a.useEffect)((()=>
3{if(!l)return void o(void 0);o(void 0);let e=!1;return r({params:{subscriptionId:l},onSuccess:t=>{e||o(null!==t&&void 0!==t?t:void 0)},onError:()=>{e||o(void 0)}}),()=>{e=!0}}),[l,s,r]),{upcomingInvoice:i,pendingUpcomingInvoice:t.pending}},fB=e=>{var t,n;let{apiPostCancelResumeSubscription:i,apiPostUpdateSubscription:r,apiPostUpdatePaymentMethodAndSubscription:l,apiPostCreatePaymentMethodAndSubscription:s,stripeClient:c,paymentMethodSelection:p}=e;const{notify:h}=(0,ie.o)(),m=(0,d.kV)(),g=null===(t=m.subscriptionRef)||void 0===t?void 0:t.id,v=(0,d.mU)(),C=(0,xo.ty)(S.F.Subscriptions,g),x=null===v||void 0===v||null===(n=v.subscriptionScheduleRef)||void 0===n?void 0:n.id,f=(0,z.l)(S.F.SubscriptionSchedules,x),y=(0,xo.ty)(S.F.SubscriptionSchedules,x),j=(null===v||void 0===v?void 0:v.stripeDiscountId)||m.stripeDiscountId,[Z,w]=(0,a.useState)(!1),[E,D]=(0,a.useState)(!1),M=(0,u.I0)(),I=(0,u.v9)((e=>e.subscriptionSelection.selection));(0,a.useEffect)((()=>(M(aB.sd.resetState()),()=>{M(aB.sd.resetState())})),[M,m.id]);const R=!m.subscriptionRef||C&&(!x||y),T=dB(hB(null===v||void 0===v?void 0:v.items,f)),P=(0,a.useMemo)((()=>cB(T)),[T]),L=pB(v,f),N=L.tier,U=L.period,F=L.quantity,O=(0,a.useMemo)((()=>{if(R)return N?{tier:N,period:null!==U&&void 0!==U?U:aB.Cp.period,quantity:null!==F&&void 0!==F?F:aB.Cp.quantity,addons:P}:{...aB.Cp,quantity:Math.max(m.numActiveDevices,5)}}),[N,U,F,P,R,m.numActiveDevices]),_=(0,a.useCallback)((()=>{M(aB.sd.selectionReset(O))}),[M,O]);(0,a.useEffect)((()=>{O&&M(aB.sd.selectionHydrated(O))}),[M,O]);const{request:B}=i,W=(0,a.useCallback)((async()=>{null!==v&&void 0!==v&&v.id?await B({data:{subscriptionId:v.id,cancel:!0},successMessage:"Subscription canceled",errorMessage:"Error canceling subscription"}):(0,Si.yR)(new Error("cancelSubscription() called without subscription defined"),{name:"cancelSubscription() error"})}),[B,null===v||void 0===v?void 0:v.id]),V=(0,a.useCallback)((async()=>{null!==v&&void 0!==v&&v.id?await B({data:{subscriptionId:v.id,cancel:!1},successMessage:"Subscription resumed",errorMessage:"Error resuming subscription"}):(0,Si.yR)(new Error("resumeSubscription() called without subscription defined"),{name:"resumeSubscription() error"})}),[B,null===v||void 0===v?void 0:v.id]),{request:G}=r,H=(0,a.useCallback)((async()=>{null!==v&&void 0!==v&&v.id?(w(!0),await G({data:{tier:v.tier,period:v.period,quantity:v.quantity,subscriptionId:v.id},successMessage:"Scheduled change canceled",errorMessage:"Error canceling scheduled change"}),w(!1)):(0,Si.yR)(new Error("cancelSubscriptionSchedule() called without subscription defined"),{name:"cancelSubscriptionSchedule() error"})}),[G,null===v||void 0===v?void 0:v.tier,null===v||void 0===v?void 0:v.period,null===v||void 0===v?void 0:v.quantity,null===v||void 0===v?void 0:v.id]),q=(0,a.useCallback)((async()=>{D(!0);const e=((e,t)=>(0,o.includes)(e.addons,A.ROOMS)&&!(0,o.some)(null===t||void 0===t?void 0:t.items,(e=>e.sku===A.ROOMS)))(I,v),t=((e,t,n)=>{var i,o;return{organizationId:n,deviceQuantity:null!==(i=e.quantity)&&void 0!==i?i:0,period:null!==(o=e.period)&&void 0!==o?o:k.zF.Annually,isTrialing:"trialing"===(null===t||void 0===t?void 0:t.status)}})(I,v,m.id);let n;const i=p?{paymentMethod:{paymentMethodId:p.id,defaultPaymentMethod:!0}}:{};try{n=v?await l.requestAsync({data:{subscription:{...I,addons:uB(I.addons,I.tier),subscriptionId:v.id},...i}}):await s.requestAsync({data:{subscription:{...I,addons:uB(I.addons,I.tier)},...i}})}catch(g){return D(!1),e&&(0,b.ec)("Rooms Purchase Failed",t),void h({message:"Failed to ".concat(v?"update":"create"," the subscription").concat(p?" and payment method":""),severity:"error"})}const a=n.status;let r={success:["success","Subscription updated"],scheduled:["success","Subscription change scheduled"],payment_failed:["error","Payment failed"],requires_action:["warning","Payment required"]}[a],d="success"===a||"scheduled"===a,u="payment_failed"===a;if("requires_action"===a){const{client_secret:e,payment_method:t}=n.paymentIntent;if(c&&e&&t){const n=await c.confirmCardPayment(e,{payment_method:t});n.error?(r=["error",n.error.message||"Payment failed"],(0,Si.yR)(n.error,{name:"stripeClient.confirmCardPayment() failed"}),u=!0):(r=["success","Subscription updated"],d=!0)}}D(!1),h({severity:r[0],message:r[1]}),"success"!==a&&"scheduled"!==a||M(aB.sd.selectionReset(void 0)),e&&(d?(0,b.ec)("Rooms Purchase Completed",t):u&&(0,b.ec)("Rooms Purchase Failed",t))}),[s,l,M,h,m.id,p,c,v,I]);return{subscription:v,subscriptionSchedule:f,subscriptionSelection:I,str
3ipeDiscountId:j,subscriptionSelectionChanged:e=>{M(aB.sd.selectionEdited(e))},resetSubscriptionSelection:_,subscriptionFullyLoaded:R,cancelSubscription:W,resumeSubscription:V,pendingCancelSubscriptionSchedule:Z,cancelSubscriptionSchedule:H,pendingSubscriptionUpsert:E,upsertSubscriptionAndPaymentMethod:q}},bB=e=>{var t,n,i,r,l,s,c,u,p,h,m,g,v,C;let{apiPatchUpdateOrgBillingAndPreviewTax:x}=e;const f=(0,d.oW)(),[b,y]=(0,a.useState)({billingName:(null===f||void 0===f?void 0:f.billingName)||"",line1:(null===f||void 0===f||null===(t=f.address)||void 0===t?void 0:t.line1)||"",line2:(null===f||void 0===f||null===(n=f.address)||void 0===n?void 0:n.line2)||"",city:(null===f||void 0===f||null===(i=f.address)||void 0===i?void 0:i.city)||"",state:(null===f||void 0===f||null===(r=f.address)||void 0===r?void 0:r.state)||"",country:(null===f||void 0===f||null===(l=f.address)||void 0===l?void 0:l.country)||"",postalCode:(null===f||void 0===f||null===(s=f.address)||void 0===s?void 0:s.postalCode)||"",stripeTaxIdValue:(null===f||void 0===f||null===(c=f.stripeTaxId)||void 0===c?void 0:c.value)||""}),j=e=>{y(e)},{requestAsync:Z}=x,w=(0,a.useCallback)((async(e,t)=>{try{var n;return Z({data:{address:{line1:e.line1,line2:e.line2,city:e.city,state:e.state,country:e.country,postalCode:e.postalCode},...e.billingName!==(null!==(n=null===f||void 0===f?void 0:f.billingName)&&void 0!==n?n:"")?{billingName:e.billingName}:{},...e.taxIdValue&&!(0,o.isEmpty)(e.taxIdValue)?{taxId:{type:"eu_vat",value:e.taxIdValue}}:{},subscriptionChange:t},errorMessage:"Failed to update billing address"})}catch(i){return}}),[Z,null===f||void 0===f?void 0:f.billingName]);return(0,a.useEffect)((()=>{var e,t,n,i,o,a,r;const l={billingName:null===f||void 0===f?void 0:f.billingName,line1:null===f||void 0===f||null===(e=f.address)||void 0===e?void 0:e.line1,line2:null===f||void 0===f||null===(t=f.address)||void 0===t?void 0:t.line2,city:null===f||void 0===f||null===(n=f.address)||void 0===n?void 0:n.city,state:null===f||void 0===f||null===(i=f.address)||void 0===i?void 0:i.state,country:null===f||void 0===f||null===(o=f.address)||void 0===o?void 0:o.country,postalCode:null===f||void 0===f||null===(a=f.address)||void 0===a?void 0:a.postalCode,stripeTaxIdValue:null===f||void 0===f||null===(r=f.stripeTaxId)||void 0===r?void 0:r.value};j(l)}),[null===f||void 0===f?void 0:f.billingName,null===f||void 0===f||null===(u=f.address)||void 0===u?void 0:u.line1,null===f||void 0===f||null===(p=f.address)||void 0===p?void 0:p.line2,null===f||void 0===f||null===(h=f.address)||void 0===h?void 0:h.city,null===f||void 0===f||null===(m=f.address)||void 0===m?void 0:m.state,null===f||void 0===f||null===(g=f.address)||void 0===g?void 0:g.country,null===f||void 0===f||null===(v=f.address)||void 0===v?void 0:v.postalCode,null===f||void 0===f||null===(C=f.stripeTaxId)||void 0===C?void 0:C.value]),{organizationBilling:f,organizationBillingSelection:b,organizationBillingSelectionChanged:j,updateOrganizationBilling:w}},yB=e=>{var t;let{apiPostCreatePaymentMethod:n,apiDeletePaymentMethod:i,stripeClient:o}=e;const r=(0,d.kV)(),{notify:l}=(0,ie.o)(),[s,c]=(0,a.useState)(!1),u=(0,z.l)(S.F.PaymentMethods,null===(t=r.defaultPaymentMethodRef)||void 0===t?void 0:t.id),[p,h]=(0,a.useState)(),m=(0,a.useCallback)((async e=>{c(!0);const t=await(async()=>{if(!o)return(0,Si.yR)(new Error("stripeClient not initialized when calling createStripePaymentMethod"),{name:"stripeClient not initialized"}),void l({message:"Failed to create payment method.",severity:"error"});const{error:t,paymentMethod:n}=await o.createPaymentMethod({type:"card",card:e});if(t?(0,Si.yR)(t,{name:"stripeClient.createPaymentMethod error"}):n||(0,Si.yR)(new Error("stripeClient.createPaymentMethod did not return error or paymentMethod"),{name:"stripeclient.createPaymentMethod error"}),!t&&n)return n;l({message:"Failed to create payment method.",severity:"error"})})();return c(!1),t}),[l,o]),g=(0,a.useCallback)((async(e,t)=>{let i=!1;if(!o)return i=!0,{error:i};try{const i=await m(e);if(!i)return{error:!0};await n.request({data:{paymentMethodId:i.id,defaultPaymentMethod:t},successMessage:"Payment method added",errorMessage:"Error adding payment method"})}catch(a){l({severity:"error",message:"Failed to add payment method"}),i=!0}return{error:i}}),[n,l,o,m]),v=(0,a.useCallback)((async e=>{await n.request({data:{paymentMethodId:e,defaultPaymentMethod:!0},successMessage:"Default payment method set",errorMessage:"Error updating default payment method"})}),[n]),C=(0,a.useCallback)((async e=>{let t;try{await i.requestAsync({params:{id:e},successMessage:"Payment method deleted",errorMessage:"Error deleting payment method"}),t=!0}catch(n){t=!1}return{error:t}}),[i]);return(0,a.useEffect)((()=>{h(u)}),[u]),{createStripePaymentMethodAndAddToOrg:g,createStripePaymentMethod:m,deletePaymentMethod:C,setDefaultPaymentMethod:v,stripePaymentMethodSelectionChanged:e=>{h(e)},paymentMethodSelection:p,pendingStripePaymentMethodCreate:s}},jB=(e,t,n,i,o)=>{const{notify:r}=(0,ie.o)(),{request:l}=i,s=(0,zn.c)(n,500),[d,c]=(0,a.useState)(),[u,p]=(0,a.useState)(),[h,m]=(0,a.useState)(0),g=(0,a.useCallback)((()=>{m((e=>e+1))}),[]),v=(0,a.useCallback)((e=>{c((t=>{if(t)return{...t,...e}}))}),[]);return(0,a.useEffect)((()=>
3{if(!(!!s.tier&&!!s.period&&!!s.quantity))return;if(o)return;if(!(0,k.js)(s.tier))return c(void 0),void p(void 0);const t="canceled"!==(null===e||void 0===e?void 0:e.status)?null===e||void 0===e?void 0:e.stripeSubscriptionId:void 0;if("trialing"!==(null===e||void 0===e?void 0:e.status)&&(null===e||void 0===e?void 0:e.cancelAtPeriodEnd))return;c(void 0),p(void 0);const n=new AbortController;return l({data:{tier:s.tier,period:s.period,quantity:s.quantity,addons:uB(s.addons,s.tier),subscriptionId:t},onSuccess:e=>{c(e)},onError:e=>{const t=(0,Fe.tf)(e);t?p(t.message):r({message:"Failed to preview subscription changes",severity:"error"})},controller:n}),()=>n.abort()}),[null===e||void 0===e?void 0:e.id,null===e||void 0===e?void 0:e.status,null===e||void 0===e?void 0:e.cancelAtPeriodEnd,null===e||void 0===e?void 0:e.stripeSubscriptionId,s.tier,s.period,s.quantity,s.addons,v,l,r,t,h,o]),{subscriptionPreview:d,subscriptionPreviewError:u,subscriptionPreviewChanged:v,refreshSubscriptionPreview:g}};gB.displayName="SubscriptionProvider";const ZB=()=>{var e;const t=null===(e=(0,d.kV)().defaultPaymentMethodRef)||void 0===e?void 0:e.id;return(0,xo.ky)(S.F.PaymentMethods,t)},wB=(e,t)=>e>0&&!t?"Confirm & pay":"Confirm",EB=e=>{let{subscriptionPreview:t,pendingSubscriptionPreview:n,pendingSubscriptionUpsert:i,hasSubscriptionSelection:o,hasPaymentMethod:a}=e;return!t||n||i||!o||(t.immediateTotal||0)>0&&!a},SB=e=>{var t,n;const i=(0,d.kV)();if(!e)return{};const a=e.immediateTotalTax||0,r=(null===(t=e.tax)||void 0===t?void 0:t.perPeriod)||0,l=(null===(n=e.discount)||void 0===n?void 0:n.totalPerPeriod)||0,s=i.balance?Math.min(e.immediateTotal+a,-i.balance):0,c=e.immediateTotal+a-s,u=e.subtotal.perPeriod+r-l;return{totalDueNow:c,immediateAccountCreditPaymentAmount:s,nextRecurringTotal:u,nextInvoiceTotal:u+(0,o.sumBy)(e.addons,(t=>((e,t)=>e.isActivationPrice&&void 0!==e.activatesAt&&e.activatesAt<=t)(t,e.nextInvoiceDate)?Math.round((t.standardUnitAmount.perPeriod-t.unitAmount.perPeriod)*t.quantity):0))}},DB=(0,a.memo)((()=>{var e,t,n;const{subscriptionPreview:i,paymentMethodSelection:a}=vB(),r=ZB(),l=(0,d.GB)(),s=(0,d.mU)(),c=null===(e=(0,d.kV)())||void 0===e?void 0:e.billingEmail,u="send_invoice"===(null===s||void 0===s?void 0:s.collectionMethod),{totalDueNow:h=0,nextInvoiceTotal:m=0}=SB(i),g=(0,o.find)(null===i||void 0===i?void 0:i.addons,(e=>e.sku===A.ROOMS)),v=null===g||void 0===g?void 0:g.activatesAt,C=l&&i&&(null!==(t=i.willEndTrial)&&void 0!==t?t:i.isUpgrade),x=null===i||void 0===i?void 0:i.scheduledChange,f=!!x;return i?a||r?(0,p.jsxs)(p.Fragment,{children:[h>0&&void 0!==v&&(0,p.jsxs)(mf.h,{"data-testid":"subscriptionReview_roomsActivation",children:[u?"The invoice covers only a prorated amount for Rooms from ":"You are only being charged a prorated amount for Rooms covering ",(0,p.jsx)("em",{children:(0,M.i$)(v,"M/DD/YY")})," to"," ",(0,p.jsx)("em",{children:(0,M.i$)(i.nextInvoiceDate,"M/DD/YY")}),"."]}),h>0&&(u?(0,p.jsxs)(mf.h,{"data-testid":"subscriptionReview_invoiceBilled",children:["An invoice for"," ",(0,p.jsx)("em",{"data-testid":"subscriptionReview_totalDueNow",children:fe(h)})," ","covering the remainder of your current billing period will be emailed",c?" to ".concat(c):""," for payment."]}):(0,p.jsxs)(mf.h,{children:["You will be billed"," ",(0,p.jsx)("em",{"data-testid":"subscriptionReview_totalDueNow",children:fe(h)})," ","for the remainder of your current billing period."]})),h<0&&(0,p.jsxs)(mf.h,{children:["Your account will receive a credit of"," ",(0,p.jsx)("em",{"data-testid":"subscriptionReview_accountCredit",children:fe(Math.abs(h))})]}),C&&(0,p.jsxs)(mf.h,{children:["Your ",(0,p.jsx)("em",{children:"Free Trial"})," will end immediately"]}),f&&(0,p.jsxs)(mf.h,{"data-testid":"subscriptionReview_scheduledChange",children:[i.immediateChange?"The rest of this change":"This change"," ","will take effect on"," ",(0,p.jsx)("em",{children:(0,M.x1)(null!==(n=null===x||void 0===x?void 0:x.effectiveDate)&&void 0!==n?n:i.nextInvoiceDate)}),", the end of your ",l?"trial period":"current billing period"]}),(0,p.jsxs)(mf.h,{children:[u?"Your next recurring invoice of ":"Your next recurring payment of ",(0,p.jsx)("em",{"data-testid":"subscriptionReview_nextRecurringTotal",children:fe(m)})," ",u?"will be issued on ":"will be billed on ",(0,p.jsx)("em",{children:(0,M.i$)(i.nextInvoiceDate,"M/DD/YY")}),"."]})]}):(0,p.jsx)(ui.Q,{children:(0,p.jsxs)(mf.h,{children:["To make this change, you must choose a ",(0,p.jsx)("em",{children:"default payment method"})]})}):null}));
3DB.displayName="SettingsSubscriptionChangeSentences";const MB=(0,a.memo)((e=>{let{title:t,value:n}=e;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"grey.700",variant:"body2",children:t}),(0,p.jsx)(v.Z,{color:"text.primary",variant:"body2",children:n})]})}));MB.displayName="ConfirmationRow";const kB=(0,a.memo)((()=>{var e;const{subscriptionSelection:t,subscriptionPreview:n,subscriptionPreviewError:i,pendingSubscriptionPreview:r,pendingSubscriptionUpsert:l}=vB(),s=(0,d.GB)(),c=(0,a.useRef)(!1);(0,a.useEffect)((()=>{n?c.current||(c.current=!0,(0,b.ec)("Rooms Purchase Quote Viewed",{...rB(t.quantity,t.period,s),surface:"addRoomsCard",immediateTotal:n.immediateTotal})):c.current=!1}),[n,t,s]);const u=(0,a.useRef)(!1);return(0,a.useEffect)((()=>{i?u.current||(u.current=!0,(0,b.ec)("Rooms Purchase Quote Failed",{...rB(t.quantity,t.period,s),surface:"addRoomsCard",error:i})):u.current=!1}),[i,t,s]),(0,p.jsxs)(p.Fragment,{children:[n&&(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsxs)(m.Z,{spacing:2,divider:(0,p.jsx)(Ie.Z,{}),children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(MB,{title:"Subscription Tier",value:(0,o.capitalize)(n.tier)}),!(null===(e=n.addons)||void 0===e||!e.length)&&(0,p.jsx)(MB,{title:"Add-on",value:(0,o.join)((0,o.map)(n.addons,(e=>(0,o.capitalize)(e.sku))),", ")})]}),!l&&(0,p.jsx)(m.Z,{spacing:1.5,children:(0,p.jsx)(DB,{})})]})}),i&&(0,p.jsx)(ui.Q,{children:(0,p.jsxs)(v.Z,{children:[i," Contact us at"," ",(0,p.jsx)(Kn.Z,{href:"mailto:[email protected]",children:"[email protected]"})," for help."]})}),r&&!l&&(0,p.jsx)(Rn.Z,{})]})}));let IB;kB.displayName="SettingsAddRoomsConfirmation",function(e){e.AFGHANISTAN="AF",e.ALBANIA="AL",e.ALGERIA="DZ",e.AMERICAN_SAMOA="AS",e.ANDORRA="AD",e.ANGOLA="AO",e.ANGUILLA="AI",e.ANTARCTICA="AQ",e.ANTIGUA_AND_BARBUDA="AG",e.ARGENTINA="AR",e.ARMENIA="AM",e.ARUBA="AW",e.AUSTRALIA="AU",e.AUSTRIA="AT",e.AZERBAIJAN="AZ",e.BAHAMAS="BS",e.BAHRAIN="BH",e.BANGLADESH="BD",e.BARBADOS="BB",e.BELARUS="BY",e.BELGIUM="BE",e.BELIZE="BZ",e.BENIN="BJ",e.BERMUDA="BM",e.BHUTAN="BT",e.BOLIVIA="BO",e.BOSNIA_AND_HERZEGOVINA="BA",e.BOTSWANA="BW",e.BOUVET_ISLAND="BV",e.BRAZIL="BR",e.BRITISH_INDIAN_OCEAN_TERRITORY="IO",e.BRUNEI_DARUSSALAM="BN",e.BULGARIA="BG",e.BURKINA_FASO="BF",e.BURUNDI="BI",e.CAMBODIA="KH",e.CAMEROON="CM",e.CANADA="CA",e.CABO_VERDE="CV",e.CAYMAN_ISLANDS="KY",e.CENTRAL_AFRICAN_REPUBLIC="CF",e.CHAD="TD",e.CHILE="CL",e.CHINA="CN",e.CHRISTMAS_ISLAND="CX",e.COCOS_ISLANDS="CC",e.COLOMBIA="CO",e.COMOROS="KM",e.CONGO="CG",e.CONGO_DEMOCRATIC_REPUBLIC_OF_THE="CD",e.COOK_ISLANDS="CK",e.COSTA_RICA="CR",e["C\xd4TE_DIVOIRE"]="CI",e.CROATIA="HR",e.CUBA="CU",e.CYPRUS="CY",e.CZECH_REPUBLIC="CZ",e.DENMARK="DK",e.DJIBOUTI="DJ",e.DOMINICA="DM",e.DOMINICAN_REPUBLIC="DO",e.ECUADOR="EC",e.EGYPT="EG",e.EL_SALVADOR="SV",e.EQUATORIAL_GUINEA="GQ",e.ERITREA="ER",e.ESTONIA="EE",e.ETHIOPIA="ET",e.FALKLAND_ISLANDS="FK",e.FAROE_ISLANDS="FO",e.FIJI="FJ",e.FINLAND="FI",e.FRANCE="FR",e.FRENCH_GUIANA="GF",e.FRENCH_POLYNESIA="PF",e.FRENCH_SOUTHERN_TERRITORIES="TF",e.GABON="GA",e.GAMBIA="GM",e.GEORGIA="GE",e.GERMANY="DE",e.GHANA="GH",e.GIBRALTAR="GI",e.GREECE="GR",e.GREENLAND="GL",e.GRENADA="GD",e.GUADELOUPE="GP",e.GUAM="GU",e.GUATEMALA="GT",e.GUINEA="GN",e.GUINEA_BISSAU="GW",e.GUYANA="GY",e.HAITI="HT",e.HEARD_ISLAND_AND_MCDONALD_ISLANDS="HM",e.HOLY_SEE="VA",e.HONDURAS="HN",e.HONG_KONG="HK",e.HUNGARY="HU",e.ICELAND="IS",e.INDIA="IN",e.INDONESIA="ID",e.IRAN="IR",e.IRAQ="IQ",e.IRELAND="IE",e.ISRAEL="IL",e.ITALY="IT",e.JAMAICA="JM",e.JAPAN="JP",e.JORDAN="JO",e.KAZAKHSTAN="KZ",e.KENYA="KE",e.KIRIBATI="KI",e.KOREA_DEMOCRATIC_PEOPLES_REPUBLIC="KP",e.KOREA_REPUBLIC="KR",e.KUWAIT="KW",e.KYRGYZSTAN="KG",e.LAOS="LA",e.LATVIA="LV",e.LEBANON="LB",e.LESOTHO="LS",e.LIBERIA="LR",e.LIBYA="LY",e.LIECHTENSTEIN="LI",e.LITHUANIA="LT",e.LUXEMBOURG="LU",e.MACAO="MO",e.MADAGASCAR="MG",e.MALAWI="MW",e.MALAYSIA="MY",e.MALDIVES="MV",e.MALI="ML",e.MALTA="MT",e.MARSHALL_ISLANDS="MH",e.MARTINIQUE="MQ",e.MAURITANIA="MR",e.MAURITIUS="MU",e.MAYOTTE="YT",e.MEXICO="MX",e.MICRONESIA="FM",e.MOLDOVA="MD",e.MONACO="MC",e.MONGOLIA="MN",e.MONTSERRAT="MS",e.MOROCCO="MA",e.MOZAMBIQUE="MZ",e.MYANMAR="MM",e.NAMIBIA="NA",e.NAURU="NR",e.NEPAL="NP",e.NETHERLANDS="NL",e.NEW_CALEDONIA="NC",e.NEW_ZEALAND="NZ",e.NICARAGUA="NI",e.NIGER="NE",e.NIGERIA="NG",e.NIUE="NU",e.NORFOLK_ISLAND="NF",e.NORTHERN_MARIANA_ISLANDS="MP",e.NORTH_MACEDONIA="MK",e.NORWAY="NO",e.OMAN="OM",e.PAKISTAN="PK",e.PALAU="PW",e.PALESTINE="PS",e.PANAMA="PA",e.PAPUA_NEW_GUINEA="PG",e.PARAGUAY="PY",e.PERU="PE",e.PHILIPPINES="PH",e.PITCAIRN="PN",e.POLAND="PL",e.PORTUGAL="PT",e.PUERTO_RICO="PR",e.QATAR="QA",e["R\xc9UNION"]="RE",e.ROMANIA="RO",e.RUSSIAN_FEDERATION="RU",e.RWANDA="RW",e.SAINT_HELENA="SH",e.SAINT_KITTS_AND_NEVIS="KN",e.SAINT_LUCIA="LC",e.SAINT_PIERRE_AND_MIQUELON="PM",e.SAINT_VINCENT_AND_THE_GRENADINES="VC",e.SAMOA="WS",e.SAN_MARINO="SM",e.SAO_TOME_AND_PRINCIPE="ST",e.SAUDI_ARABIA="SA",e.SENEGAL="SN",e.SEYCHELLES="SC",e.SIERRA_LEONE="SL",e.SINGAPORE="SG",e.SLOVAKIA="SK",e.SLOVENIA="SI",e.SOLOMON_ISLANDS="SB",e.SOMALIA="SO",e.SOUTH_AFRICA="ZA",e.SOUTH_GEORGIA_AND_THE_SOUTH_SANDWICH_ISLANDS="GS",e.SPAIN="ES",e.SRI_LANKA="LK",e.SUDAN="SD",e.SURINAME="SR",e.SVALBARD_AND_JAN_MAYEN="SJ",e.ESWATINI="SZ",e.SWEDEN="SE",e.SWITZERLAND="CH",e.SYRIAN_ARAB_REPUBLIC="SY",e.TAIWAN="TW",e.TAJIKISTAN="TJ",e.TANZANIA="TZ",e.THAILAND="TH",e.TIMOR_LESTE="TL",e.TOGO="TG",e.TOKELAU="TK",e.TONGA="TO",e.TRINIDAD_AND_TOBAGO="TT",e.TUNISIA="TN",e["T\xdcRKIYE"]="TR",e.TURKMENISTAN="TM",e.TURKS_AND_CAICOS_ISLANDS="TC",e.TUVALU="TV",e.UGANDA="UG",e.UKRAINE="UA",e.UNITED_ARAB_EMIRATES="AE",e.UNITED_KINGDOM_OF_GREAT_BRITAIN_AND_NORTHERN_IRELAND="GB",e.UNITED_STATES_OF_AMERICA="US",e.UNITED_STATES_MINOR_OUTLYING_ISLANDS="UM",e.URUGUAY="UY",e.UZBEKISTAN="UZ",e.VANUATU="VU",e.VENEZUELA="VE",e.VIET_NAM="VN",e.VIRGIN_ISLANDS_BRITISH="VG",e.VIRGIN_ISLANDS_US="VI",e.WALLIS_AND_FUTUNA="WF",e.WESTERN_SAHARA="EH",e.YEMEN="YE",e.ZAMBIA="ZM",e.ZIMBABWE="ZW",e["\xc5LAND_ISLANDS"]="AX",e.BONAIRE="BQ",e["CURA\xc7AO"]="CW",e.GUERNSEY="GG",e.ISLE_OF_MAN="IM",e.JERSEY="JE",e.MONTENEGRO="ME",e["SAINT_BARTH\xc9LEMY"]="BL",e.SERBIA="RS",e.SINT_MAARTEN="SX",e.SOUTH_SUDAN="SS",e.KOSOVO="XK"}(IB||(IB={}));const AB=new Set([IB.AUSTRIA,IB.BELGIUM,IB.BULGARIA,IB.CROATIA,IB.CYPRUS,IB.CZECH_REPUBLIC,IB.DENMARK,IB.ESTONIA,IB.FINLAND,IB.FRANCE,IB.GERMANY,IB.GREECE,IB.HUNGARY,IB.ITALY,IB.LITHUANIA,IB.LUXEMBOURG,IB.MALTA,IB.NETHERLANDS,IB.POLAND,IB.PORTUGAL,IB.ROMANIA,IB.SLOVAKIA,IB.SLOVENIA,IB.SPAIN,IB.SWEDEN,IB.UNITED_KINGDOM_OF_GREAT_BRITAIN_AND_NORTHERN_IRELAND]),RB=(0,a.memo)((e=>{var t;let{fieldValues:n,fieldErrors:i,formErrors:r,isSubmitting:l,showTaxIdField:s,onSubmit:d,onChange:c,hideSubmitButton:u,disabled:h,countryRequiresState:g}=e;const C=(0,a.useCallback)((e=>{e.preventDefault(),d()}),[d]),x=(0,a.useCallback)((e=>{c&&c({...n,...e})}),[n,c]),f=(0,a.useCallback)((e=>{x({billingName:e})}),[x]),b=(0,a.useCallback)((e=>{x({line1:e})}),[x]),y=(0,a.useCallback)((e=>{x({line2:e})}),[x]),j=(0,a.useCallback)((e=>{x({city:e})}),[x]),Z=(0,a.useCallback)((e=>{x({state:e})}),[x]),w=(0,a.useCallback)((e=>{x({taxIdValue:e})}),[x]),E=(0,a.useCallback)((e=>{x({postalCode:e})}),[x]),S=null===i||void 0===i?void 0:i.country,D="US"===n.country||"CA"===n.country,M="US"===n.country?Be.vc.common.usStates:Be.vc.common.canadianProvinces,k=(0,a.useMemo)((()=>(0,o.map)(M,((e,t)=>({code:t,name:e})))),[M]),I=(0,a.useMemo)((()=>{var e;return null!==(e=(0,o.find)(k,{code:n.state}))&&void 0!==e?e:null}),[k,n.state]),A="State/Province";return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)("form",{onSubmit:C,noValidate:!0,children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ln.Z,{label:"Billing Name (optional)",error:(0,o.isString)(i.billingName),placeholder:"Acme, Inc.",helperText:null!==(t=null===i||void 0===i?void 0:i.billingName)&&void 0!==t?t:"Shown on your invoices",fullWidth:!0,value:n.billingName,inputProps:{maxLength:256},onChange:e=>f(e.target.value)})}),(0,p.jsxs)(fs.Z,{children:[(0,p.jsx)(bs.Z,{id:"org-country",children:"Country"}),(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(ys.Z,{label:"Country",type:"text",labelId:"org-country",fullWidth:!0,displayEmpty:!0,error:(0,o.isString)(i.country),value:n.country,onChange:e=>{x({country:e.target.value})},renderValue:(0,o.isEmpty)(n.country)?()=>(0,p.jsx)(v.Z,{color:"grey.500",children:"Select Country"}):void 0,children:(0,o.map)(Be.vc.common.countries,((e,t)=>(0,p.jsx)(Hi.Z,{value:t,children:(0,p.jsx)(v.Z,{children:e})},t)))})}),S&&(0,p.jsx)(yx.Z,{error:!0,children:S})]}),(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ln.Z,{label:"Address Line 1",error:(0,o.isString)(i.line1),placeholder:"123 Main St",helperText:null===i||void 0===i?void 0:i.line1,fullWidth:!0,value:n.line1,onChange:e=>b(e.target.value)})}),(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ln.Z,{label:"Address Line 2 (optional)",error:(0,o.isString)(i.line2),placeholder:"Apt 4B",helperText:null===i||void 0===i?void 0:i.line2,fullWidth:!0,value:n.line2,onChange:e=>y(e.target.value)})}),(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ln.Z,{label:"City",error:(0,o.isString)(i.city),placeholder:"New York",helperText:null===i||void 0===i?void 0:i.city,fullWidth:!0,value:n.city,onChange:e=>j(e.target.value)})}),g&&(0,p.jsx)(p.Fragment,{children:D?(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ic.Z,{options:k,value:
3I,onChange:(e,t)=>{var n;x({state:null!==(n=null===t||void 0===t?void 0:t.code)&&void 0!==n?n:""})},getOptionLabel:e=>e.name,isOptionEqualToValue:(e,t)=>e.code===t.code,renderInput:e=>(0,p.jsx)(Ln.Z,{...e,label:A,error:(0,o.isString)(i.state),helperText:null===i||void 0===i?void 0:i.state,placeholder:"Select State/Province"}),fullWidth:!0,autoHighlight:!0})}):(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ln.Z,{label:A,error:(0,o.isString)(i.state),placeholder:"NY",helperText:null===i||void 0===i?void 0:i.state,fullWidth:!0,value:n.state,onChange:e=>Z(e.target.value)})})}),(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ln.Z,{label:"Postal Code",error:(0,o.isString)(i.postalCode),placeholder:"12345",helperText:null===i||void 0===i?void 0:i.postalCode,fullWidth:!0,value:n.postalCode,onChange:e=>E(e.target.value)})}),s&&(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Ln.Z,{label:"VAT Number (optional)",error:(0,o.isString)(i.taxIdValue),helperText:null===i||void 0===i?void 0:i.taxIdValue,placeholder:"XX123456789",fullWidth:!0,value:n.taxIdValue,onChange:e=>w(e.target.value)})}),!u&&(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Un.U,{disabled:h,submitting:l,sx:{alignSelf:"flex-end",paddingX:3},children:"Save"})})]})}),r&&!(0,o.isEmpty)(r)&&(0,p.jsx)(ui.Q,{severity:"error",withBackground:!0,children:r.join(" ")})]})})),TB=e=>{let{formFieldValues:t,organizationAddress:n,requireFullAddress:i,countryRequiresState:o}=e;const a={};if((null===n||void 0===n?void 0:n.line1)&&(null===n||void 0===n?void 0:n.city)&&(null===n||void 0===n?void 0:n.postalCode)&&(null===n||void 0===n?void 0:n.country)){null!==n&&void 0!==n&&n.line1&&!t.line1&&(a.line1="Address line 1 cannot be removed once set. Please provide a new address."),null!==n&&void 0!==n&&n.city&&!t.city&&(a.city="City cannot be removed once set. Please provide a new city."),null!==n&&void 0!==n&&n.postalCode&&!t.postalCode&&(a.postalCode="Postal code cannot be removed once set. Please provide a new postal code."),null!==n&&void 0!==n&&n.country&&!t.country&&(a.country="Country cannot be removed once set. Please select a new country.");("US"===(null===n||void 0===n?void 0:n.country)||"CA"===(null===n||void 0===n?void 0:n.country)||"UA"===(null===n||void 0===n?void 0:n.country)||"IN"===(null===n||void 0===n?void 0:n.country))&&null!==n&&void 0!==n&&n.state&&!t.state&&(a.state="State/Province cannot be removed once set. Please select a new state/province.")}else t.country||(a.country="Country is required."),t.postalCode||(a.postalCode="Postal code is required."),i&&(t.line1||(a.line1="Address line 1 is required."),t.city||(a.city="City is required."),o&&!t.state&&(a.state="State/Province is required."));return a},PB=function(){var e,t,n,i,r,l,s,c;let{notifySuccess:u,onChange:h,requireFullAddress:m=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const g=(0,d.oW)(),{notify:v}=(0,ie.o)(),[C,x]=(0,a.useState)({}),[f,b]=(0,a.useState)([]),[y,j]=(0,a.useState)(!1),[Z,w]=(0,a.useState)(!0),{subscription:E,subscriptionSelection:S}=vB(),[D,M]=(0,a.useState)({billingName:"",line1:"",line2:"",city:"",state:"",country:"",postalCode:"",taxIdValue:""}),[k,I]=(0,a.useState)(D),A=(0,a.useMemo)((()=>!(0,o.isEmpty)(f)||!(0,o.isEmpty)(C)),[f,C]),R=(0,a.useMemo)((()=>AB.has(D.country)),[D.country]),T=(0,a.useMemo)((()=>"US"===D.country||"CA"===D.country||"UA"===D.country||"IN"===D.country),[D.country]),P=(0,a.useMemo)((()=>{const e=D.country&&D.postalCode;if(!m)return e;return e&&D.line1&&D.city&&(!T||D.state)}),[D.country,D.postalCode,D.line1,D.city,D.state,m,T]);(0,a.useEffect)((()=>{var e,t,n,i,o,a,r,l,s,d,c,u,p,h,m;const v={billingName:null!==(e=null===g||void 0===g?void 0:g.billingName)&&void 0!==e?e:"",line1:null!==(t=null===g||void 0===g||null===(n=g.address)||void 0===n?void 0:n.line1)&&void 0!==t?t:"",line2:null!==(i=null===g||void 0===g||null===(o=g.address)||void 0===o?void 0:o.line2)&&void 0!==i?i:"",city:null!==(a=null===g||void 0===g||null===(r=g.address)||void 0===r?void 0:r.city)&&void 0!==a?a:"",state:null!==(l=null===g||void 0===g||null===(s=g.address)||void 0===s?void 0:s.state)&&void 0!==l?l:"",country:null!==(d=null===g||void 0===g||null===(c=g.address)||void 0===c?void 0:c.country)&&void 0!==d?d:"",postalCode:null!==(u=null===g||void 0===g||null===(p=g.address)||void 0===p?void 0:p.postalCode)&&void 0!==u?u:"",taxIdValue:null!==(h=null===g||void 0===g||null===(m=g.stripeTaxId)||void 0===m?void 0:m.value)&&void 0!==h?h:""};M(v),I(v),w(!0)}),[null===g||void 0===g?void 0:g.billingName,null===g||void 0===g||null===(e=g.address)||void 0===e?void 0:e.line1,null===g||void 0===g||null===(t=g.address)||void 0===t?void 0:t.line2,null===g||void 0===g||null===(n=g.address)||void 0===n?void 0:n.city,null===g||void 0===g||null===(i=g.address)||void 0===i?void 0:i.state,null===g||void 0===g||null===(r=g.address)||void 0===r?void 0:r.country,null===g||void 0===g||null===(l=g.address)||void 0===l?void 0:l.postalCode,null===g||void 0===g||null===(s=g.stripeTaxId)||void 0===s?void 0:s.value]);const{updateOrganizationBilling:L,subscriptionPreviewChanged:N}=vB(),U=(0,a.useCallback)((e=>{w(!1);const t=TB({formFieldValues:e,organizationAddress:null===g||void 0===g?void 0:g.address,requireFullAddress:m,countryRequiresState:T});M(e),x(t),h&&h(e)}),[h,null===g||void 0===g?void 0:g.address,m,T]),F=(0,a.useCallback)((async()=>{j(!0);try{const e=TB({formFieldValues:D,organizationAddress:null===g||void 0===g?void 0:g.address,requireFullAddress:m,countryRequiresState:T});if(x(e),b([]),w(!1),!(0,o.isEmpty)(e))return;const t=await L(D,{subscriptionId:null===E||void 0===E?void 0:E.id,tier:S.tier,quantity:S.quantity,period:S.period,addons:S.addons});if(!t)return;const{billingRegionErrors:n,tax:i,immediateTotalTax:a}=t;if(N({tax:i,immediateTotalTax:a}),!(0,o.isEmpty)(n)){w(!1);const e={};return n.taxId&&(e.taxIdValue="Not a valid VAT number"),n.location&&(b([n.location]),e.country="",e.postalCode="",e.line1="",e.line2="",e.city="",e.state=""),void x(e)}w(!0),I(D),u&&v({message:"Billing region updated successfully",severity:"success"})}finally{j(!1)}}),[D,v,u,m,null===E||void 0===E?void 0:E.id,N,T,S.period,S.quantity,S.tier,S.addons,L,null===g||void 0===g?void 0:g.address]);return(0,a.useMemo)((()=>({renderSettingsOrganizationBillingForm:e=>{var t;return(0,p.jsx)(RB,{fieldValues:D,fieldErrors:C,formErrors:f,showTaxIdField:!(null===g||void 0===g||null===(t=g.stripeTaxId)||void 0===t||!t.value)||R,isSubmitting:y,requireFullAddress:m,countryRequiresState:T,onSubmit:F,onChange:U,...e})},hasBeenValidated:P&&((0,o.isEqual)(k,D)||Z&&!A),submitForm:F})),[D,k,Z,A,F,C,f,null===g||void 0===g||null===(c=g.stripeTaxId)||void 0===c?void 0:c.value,R,y,m,U,T,P])};RB.displayName="SettingsOrganizationBillingForm";const LB=(0,a.memo)((e=>{let{isDefault:t,onClick:n,disabled:i=!1,privilege:o}=e;const{privileges:a}=(0,w.P)(),r=!o||a[o];return(0,p.jsx)(m.Z,{height:31,justifyContent:"center",children:t?(0,p.jsx)(v.Z,{"data-testid":"defaultSelector_default",variant:"body2",color:"primary.dark",fontWeight:y.Y$,children:"DEFAULT"}):(0,p.jsx)(C.Z,{size:"small",color:"inherit",sx:{textTransform:"none",color:"text.secondary",visibility:r&&!t?"visible":"hidden"},onClick:n,disabled:t||i,children:"Set Default"})})})),NB=(0,a.memo)((e=>{let{paymentMethod:t,date:n=!1,variant:i}=e;return(0,p.jsxs)(m.Z,{display:"inline-flex",direction:"row",spacing:1,children:[t.brand&&(0,p.jsxs)(v.Z,{variant:i,children:[" ",(0,o.capitalize)(t.brand)]}),(0,p.jsxs)(v.Z,{variant:i,color:"primary",fontWeight:"medium",children:["\u2022\u2022\u2022\u2022 ",t.last4]}),n&&(0,p.jsxs)(v.Z,{variant:i,color:"textSecondary",children:[t.expirationMonth,"/",t.expirationYear]})]})})),UB=(0,a.memo)((e=>{var t;let{paymentMethod:n,showDeleteButton:i,isLastPaymentMethod:o=!1}=e;const{organization:r}=(0,d.mP)(),{setDefaultPaymentMethod:l,pendingPaymentMethodCreate:s,pendingPaymentMethodDelete:c,deletePaymentMethod:u}=vB(),h=s||c,g=(()=>{const{subscription:e}=vB(),t=(0,d.GB)();if(!e||t)return!1;const n=!!e.cancelAt&&e.cancelAt.seconds<=e.currentPeriodEnd.seconds;return!(e.cancelAtPeriodEnd||n)})(),[v,C]=(0,a.useState)(!1),[f,b]=(0,a.useState)(),y=(0,a.useCallback)((()=>{C(!1)}),[]),j=(0,a.useCallback)((async()=>
3{if(!f)return;const{error:e}=await u(f.id);e||(b(void 0),C(!1))}),[u,f]),Z=n.id===(null===(t=r.defaultPaymentMethodRef)||void 0===t?void 0:t.id);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"flex-end",flexWrap:"wrap",paddingY:1,paddingX:2,flexGrow:1,spacing:1,"data-testid":"paymentMethods_row",sx:e=>({border:"1px solid ".concat(e.palette.grey[400]),borderRadius:2}),children:[(0,p.jsx)(m.Z,{flexGrow:1,children:(0,p.jsx)(NB,{paymentMethod:n,date:!0})}),(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(LB,{isDefault:Z,onClick:()=>(async e=>{await l(e)})(n.stripePaymentMethodId),disabled:s||c})}),i&&(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(x.Z,{"data-testid":"paymentMethods_rowDelete",disabled:h,onClick:()=>(e=>{b(e),C(!0)})(n),children:(0,p.jsx)(Gl.Z,{})})})]})]}),(0,p.jsx)(Fn,{open:v,onClose:y,onConfirm:j,title:"Delete payment method",message:o&&g?"Warning: This is your last payment method. Deleting it will cancel your subscription at the end of the current billing period. Are you sure you want to delete the payment method ending in ".concat(null===f||void 0===f?void 0:f.last4,"?"):"Are you sure you want to delete the payment method ending in ".concat(null===f||void 0===f?void 0:f.last4,"?"),pending:c})]})})),FB=(0,a.memo)((e=>{let{getStripeCardElementOrPaymentMethodRef:t,onStripeCardElementValidChange:n=(()=>{})}=e;const{pendingStripePaymentMethodCreate:i}=vB(),{documents:r,fetched:l}=(0,E.D)(S.F.PaymentMethods),{organization:s}=(0,d.mP)(),c=(0,oB.useElements)(),[u,h]=(0,a.useState)(!1),[g,C]=(0,a.useState)(!1),x=l&&!(0,o.isEmpty)(r),f=(0,a.useCallback)((()=>{if(null===c)return void(0,Si.yR)(new Error("Stripe useElements() returned null while trying to getStripeCardElement()"),{name:"Stripe useElements() error"});const e=c.getElement(oB.CardElement);if(null!==e)return e;(0,Si.yR)(new Error("Stripe getElement() returned null while trying to getStripeCardElement()"),{name:"Stripe getElement() error"})}),[c]),b=(0,a.useCallback)((()=>{if((u||!x)&&g)return{type:"StripeCardElement",data:f()};return{type:"PaymentMethod",data:s.defaultPaymentMethodRef&&(0,o.find)(r,(e=>{var t;return e.id===(null===(t=s.defaultPaymentMethodRef)||void 0===t?void 0:t.id)}))}}),[f,g,s.defaultPaymentMethodRef,r,x,u]);t&&(t.current=b);const y=(0,a.useCallback)((e=>{C(!(e.error||!e.complete))}),[]);return(0,a.useEffect)((()=>{n(g)}),[g,n]),(0,p.jsxs)(m.Z,{position:"relative",children:[i&&(0,p.jsx)(Rn.Z,{sx:{position:"absolute",width:1}}),x&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{color:"primary",variant:"body1",children:"Payment Method"}),(0,p.jsx)(m.Z,{spacing:2,children:(0,o.map)(r,(e=>(0,p.jsx)(UB,{paymentMethod:e},e.id)))}),!u&&(0,p.jsx)(Kn.Z,{marginTop:1,onClick:()=>h(!0),children:"Use another card?"})]}),(!x||u)&&(0,p.jsxs)(m.Z,{marginTop:2,spacing:1,children:[(0,p.jsx)(v.Z,{color:"primary",variant:"body1",children:"Add a new card"}),(0,p.jsxs)(m.Z,{spacing:2.5,children:[(0,p.jsx)(Me.Z,{sx:{paddingTop:2,paddingBottom:2,paddingX:1.5},children:(0,p.jsx)(oB.CardElement,{onChange:y,id:"new-payment-method-element"})}),(!x||g)&&(0,p.jsx)(v.Z,{variant:"body2",color:"grey.500",children:"This payment method will be saved and can be edited later. It will be automatically charged every billing period."})]})]})]})})),OB=(e,t)=>(0,p.jsx)(Fi._,{tooltipText:t,children:(0,p.jsxs)(i.Z,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[e,(0,p.jsx)(cc.Z,{sx:{fontSize:15},color:"action"})]})}),_B=(e,t)=>{const n=e.col1||e.col2?(0,p.jsxs)(m.Z,{direction:"row",flexGrow:1,alignItems:"baseline",children:[(0,p.jsx)(i.Z,{flex:1,flexBasis:1,children:(0,p.jsx)(v.Z,{noWrap:!0,color:"grey.800",...e.col1Props,children:e.col1})}),(0,p.jsx)(i.Z,{flex:1,flexBasis:1,children:(0,p.jsx)(v.Z,{noWrap:!0,textAlign:"right",color:"grey.800",...e.col2Props,children:e.col2})})]}):void 0,o=e.divider?(0,p.jsx)(Ie.Z,{sx:{paddingY:.5}}):void 0;return n||o?(0,p.jsxs)(i.Z,{paddingY:.5,sx:e.sx,children:[n,o]},t):void 0},zB=e=>{let{children:t,paddingTop:n=1.5,paddingBottom:i=8,testId:o}=e;return(0,p.jsx)(m.Z,{"data-testid":o,padding:3,paddingTop:n,paddingBottom:i,sx:{backgroundColor:y.DG.grey[100]},borderRadius:2,flexGrow:1,height:1,children:t})},BB=(0,a.memo)((e=>{var t,n;let{subscriptionPreview:i,fallbackValues:r,pendingTaxUpdate:l,pendingTotalPerPeriodUpdate:s}=e;const{organization:c}=(0,d.mP)(),u=(0,z.T)("featureFlags"),{tier:h=r.tier,quantity:g=r.quantity,period:v=r.period,intervalCount:C=1,proration:x,discount:f}=i||{},b=(null===i||void 0===i?void 0:i.device.perMonth)||0,y=null!==(t=null===i||void 0===i?void 0:i.subtotal.perPeriod)&&void 0!==t?t:0,j=null===i||void 0===i?void 0:i.nextInvoiceDate,Z=(0,a.useMemo)((()=>(0,o.map)(null===i||void 0===i?void 0:i.addons,(e=>
3({addon:e,label:lB[e.sku],activationDateLabel:e.activatesAt?(0,M.i$)(e.activatesAt,sB):void 0,isFlatFee:1===e.quantity&&Number(g)>1})))),[null===i||void 0===i?void 0:i.addons,g]),{totalDueNow:w=0,immediateAccountCreditPaymentAmount:E,nextRecurringTotal:S=0}=SB(i),D=((null===i||void 0===i||null===(n=i.tax)||void 0===n?void 0:n.perPeriod)||0)>0,I=(0,a.useMemo)((()=>{var e;const t=(0,O.nZ)(v,C),n=[{col1:"Next Invoice",col1Props:{variant:"overline",color:"grey.600",sx:{fontWeight:700}},col2:void 0!==j?"".concat((0,M.i$)(j,"MMM D, YYYY")," \u2013 ").concat((0,M.i$)((0,M.Mn)(j).add(t,"month").valueOf(),"MMM D, YYYY")):void 0,col2Props:{variant:"overline",color:"grey.600",sx:{display:"block"}},sx:{paddingBottom:0,marginBottom:-1}},{divider:!0},{col1:"".concat((0,o.capitalize)(h)," Tier Price per Month"),col2:b?fe(b):"--"}];for(const i of(0,o.filter)(Z,(e=>{let{isFlatFee:t}=e;return!t}))){const e="".concat(i.label," Price / Month"),t=i.addon.isActivationPrice&&i.activationDateLabel?"".concat(i.label," is free until ").concat(i.activationDateLabel,". From ").concat(i.activationDateLabel,": ").concat(fe(i.addon.standardUnitAmount.perMonth)," per device per month."):void 0;n.push({col1:t?OB(e,t):e,col2:fe(i.addon.unitAmount.perMonth)})}n.push({col1:"x Devices",col2:"x ".concat(g),sx:{paddingLeft:3}}),(v===k.zF.Annually||C>1)&&n.push({col1:"x Months",col2:"x ".concat(t),sx:{paddingLeft:3}});for(const i of(0,o.filter)(Z,(e=>{let{isFlatFee:t}=e;return t})))n.push({col1:"".concat(i.label," Add-on"),col2:fe(i.addon.unitAmount.perPeriod)});if(n.push({divider:!0}),n.push({col1:"Subtotal",col2:y?fe(y):"--"}),f){var a;const e=(0,o.filter)([{label:"Device",amount:null!==(a=f.deviceLinePerPeriod)&&void 0!==a?a:0},...(0,o.map)(Z,(e=>{var t;return{label:e.label,amount:null!==(t=e.addon.discountPerPeriod)&&void 0!==t?t:0}}))],(e=>{let{amount:t}=e;return t>0})),t=void 0!==f.deviceLinePerPeriod?(0,o.sumBy)(e,"amount"):f.totalPerPeriod,[i]=e,r=1===e.length&&i?"".concat(i.label," "):"";t>0&&n.push({col1:"".concat(f.name?f.name+" ":"").concat(r,"Discount").concat(f.percent?" (".concat(f.percent,"%)"):""),col2:fe(-t)})}const r=(null===u||void 0===u?void 0:u.disableStripeTaxCollection)||(null===(e=c.featureFlags)||void 0===e?void 0:e.includes(Sc.X.DISABLE_STRIPE_AUTOMATIC_TAX));return!D&&r||n.push({col1:"Tax",col2:l?(0,p.jsx)(Zi.Z,{size:17}):null!==i&&void 0!==i&&i.tax?fe(i.tax.perPeriod):"--"}),n.push({divider:!0},{col1:"Total per ".concat((0,O.Ce)(v,C)),col1Props:{color:"grey.900"},col2:s?(0,p.jsx)(Zi.Z,{size:24}):S?fe(S):"--",col2Props:{color:"grey.900",variant:"h6"}}),n}),[h,b,Z,g,v,C,y,f,null===i||void 0===i?void 0:i.tax,D,null===u||void 0===u?void 0:u.disableStripeTaxCollection,c.featureFlags,s,S,l,j]),A=(0,a.useMemo)((()=>{var e;const t=[],n=(0,o.sumBy)(Z,(e=>{var t;let{addon:n}=e;return null!==(t=n.dueNowAmount)&&void 0!==t?t:0})),i=!!x&&Z.length>0&&n>0&&!x.unusedTimeTotal&&n===x.remainingTimeTotal,a=null===(e=(0,o.find)(Z,"activationDateLabel"))||void 0===e?void 0:e.addon.activatesAt,r={col1:"Due now",col1Props:{variant:"overline",color:"grey.600",sx:{fontWeight:700}},col2:void 0!==j?"".concat(void 0!==a?"".concat((0,M.i$)(a,"MMM D, YYYY")," \u2013 "):"Through ").concat((0,M.i$)(j,"MMM D, YYYY")):void 0,col2Props:{variant:"overline",color:"grey.600",sx:{display:"block"}},sx:{paddingBottom:0,marginBottom:-1}};if(i&&x){t.push(r,{divider:!0});for(const e of Z){var l;const n=null!==(l=e.addon.dueNowAmount)&&void 0!==l?l:0;if(n<=0)continue;const i=e.activationDateLabel?"".concat(e.label," from ").concat(e.activationDateLabel):void 0!==j?"".concat(e.label," through ").concat((0,M.i$)(j,sB)):"".concat(e.label," for remaining period");t.push({col1:e.activationDateLabel?OB(i,"".concat(e.label," is free until ").concat(e.activationDateLabel,". You'll only be charged from ").concat(e.activationDateLabel," through the end of your billing period.")):i,col2:fe(n)})}return E&&t.push({col1:"Applied account balance",col2:fe(-E)}),x.tax&&t.push({col1:"Tax",col2:fe(x.tax)}),t.push({divider:!0},{col1:"Total due now",col1Props:{color:"grey.800"},col2:fe(w),col2Props:{color:"grey.800",variant:"h6"}}),t}return x&&(t.push(r,{divider:!0}),(x.remainingTimeTotal||x.unusedTimeTotal)&&t.push({col1:"Upgrade cost for current plan",col2:fe(x.remainingTimeTotal+x.unusedTimeTotal)}),E&&t.push({col1:"Applied account balance",col2:fe(-E)}),x.tax&&t.push({col1:"Tax",col2:fe(x.tax)}),t.push({divider:!0},{col1:"Total due now",col1Props:{color:"grey.800"},col2:fe(w),col2Props:{color:"grey.800",variant:"h6"}})),t}),[Z,E,j,x,w]),R=A.length>0;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(zB,{testId:"invoicePreview_nextInvoiceCard",paddingBottom:R?2:8,children:(0,o.map)(I,_B)}),R&&(0,p.jsx)(zB,{testId:"invoicePreview_dueNowCard",paddingTop:.75,paddingBottom:3,children:(0,o.map)(A,((e,t)=>
3_B(e,"proration-".concat(t))))}),D&&(0,p.jsx)(ui.Q,{severity:"info",withBackground:!0,children:"Tax Exempt? Send your tax exemption certificate to [email protected]."})]})})),WB=()=>{const e=(0,Le.ye)("enableCombinedDeviceAndRoomsChanges"),t=F(),{subscriptionSelection:n}=vB(),i=t&&n.tier!==k.QV.Premium;return{removesRooms:i,blocked:i&&!e}},VB=()=>{var e;const t=(0,d.mU)(),n=(0,z.l)(S.F.SubscriptionSchedules,null===t||void 0===t||null===(e=t.subscriptionScheduleRef)||void 0===e?void 0:e.id);return((e,t,n)=>{const i=(0,o.sortBy)(null===n||void 0===n?void 0:n.phases,(e=>e.periodStart.seconds)),a=t=>(0,o.some)(t.items,(t=>t.sku===e)),r=(0,o.last)(i);if(r&&!a(r))return(0,o.reduce)(i,((e,t)=>({effectiveAt:e.present&&!a(t)?t.periodStart:e.effectiveAt,present:a(t)})),{effectiveAt:void 0,present:(0,o.some)(t,(t=>t.sku===e))}).effectiveAt})(A.ROOMS,null===t||void 0===t?void 0:t.items,n)},GB={"data-testid":"roomsAddonCheckbox_input"},HB=(0,a.memo)((()=>{var e,t;const{subscriptionSelection:n,subscriptionSelectionChanged:r}=vB(),l=(0,Le.W1)(),s=(0,d.GB)(),c=Qz(n.tier),u=U(),h=(0,d.kV)(),g=_(),C=(()=>{const e=(0,d.mU)(),t=(0,d.kV)();return(0,o.some)(null===e||void 0===e?void 0:e.items,(e=>e.sku===A.ROOMS))&&P(null===e||void 0===e?void 0:e.items,t)})(),{hasCreatedRoom:x}=Jz(),f=VB(),y=g&&void 0===f,j=g&&!C,Z=(()=>{var e;const t=(0,d.mU)(),n=_(),i=(0,o.find)(null===t||void 0===t?void 0:t.items,(e=>e.sku===A.ROOMS));return i?0===i.unitAmount&&!(null!==(e=i.isCatalogPrice)&&void 0!==e?e:i.isStandardPrice):n})(),w=$z(),E=null!==f&&void 0!==f?f:w,D=!g&&!c&&u&&!s&&!h.isResold,I=j||(0,o.includes)(n.addons,A.ROOMS),R=(0,Le.ye)("enableCombinedDeviceAndRoomsChanges"),T=(0,d.mU)(),L=(()=>{var e;const t=(0,d.mU)(),n=(0,z.l)(S.F.SubscriptionSchedules,null===t||void 0===t||null===(e=t.subscriptionScheduleRef)||void 0===e?void 0:e.id);return pB(t,n)})(),N=!!T&&(void 0!==n.quantity&&Number(n.quantity)!==(null!==(e=L.quantity)&&void 0!==e?e:T.quantity)||void 0!==n.period&&n.period!==(null!==(t=L.period)&&void 0!==t?t:T.period)),F=!R&&N;(0,a.useEffect)((()=>{F&&!j&&I!==y&&r({addons:y?(0,o.uniq)([...n.addons,A.ROOMS]):(0,o.filter)(n.addons,(e=>e!==A.ROOMS))})}),[F,j,I,y,n.addons,r]);const O=(0,a.useCallback)((e=>{var t,i;e.target.checked&&(0,b.ec)("Rooms Purchase Started",{...rB(null!==(t=n.quantity)&&void 0!==t?t:null===T||void 0===T?void 0:T.quantity,null!==(i=n.period)&&void 0!==i?i:null===T||void 0===T?void 0:T.period,s),surface:"subscriptionForm",entrySurface:"direct",hasCreatedRoom:x});r({addons:e.target.checked?[...n.addons,A.ROOMS]:(0,o.filter)(n.addons,(e=>e!==A.ROOMS))})}),[n.addons,n.quantity,n.period,null===T||void 0===T?void 0:T.quantity,null===T||void 0===T?void 0:T.period,s,x,r]);return l&&(c||g||D)?n.tier!==k.QV.Premium?null:(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsxs)(i.Z,{component:"label","data-testid":"roomsAddonCheckbox",sx:{display:"flex",alignItems:"flex-start",gap:1,padding:1.5,borderRadius:1,border:"1px solid",borderColor:I?"primary.main":"divider",backgroundColor:e=>(0,Dr.Fq)(e.palette.primary.main,I?.06:.02),cursor:j||F||D?"default":"pointer",opacity:D?.6:1,"&:hover":{borderColor:j||F||D?void 0:"primary.main"}},children:[(0,p.jsx)(Pi.Z,{checked:I,disabled:j||F||D,onChange:O,size:"small",sx:{padding:0},inputProps:GB}),(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(v.Z,{variant:"body2",children:"Add Rooms"}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:nB})]})]}),D&&(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary","data-testid":"roomsAddonCheckbox_contactSales",children:["Contact ",(0,p.jsx)(Xz,{})," to buy Rooms."]}),(F||j)&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:F?"Rooms and device plan changes must be made separately.":Z?(B=E,B?"You have been granted Rooms for free until ".concat((0,M.i$)(B,"MMMM D, YYYY"),"."):"You have been granted Rooms for free."):"Contact support to remove Rooms from your subscription."})]}):null;var B}));HB.displayName="SettingsRoomsAddonCheckbox";const qB=(0,a.memo)((()=>{const{subscriptionSelection:e,pendingSubscriptionUpsert:t,subscriptionSelectionChanged:n,subscriptionPreviewError:i}=vB(),{removesRooms:o,blocked:r}=WB(),l=(0,a.useMemo)((()=>[{value:k.QV.Essential,label:"Essential"},{value:k.QV.Premium,label:"Premium"}]),[]),s=(0,a.useCallback)((e=>{n({tier:e})}),[n]),d=(0,a.useMemo)((()=>[{value:k.zF.Monthly,label:"Monthly"},{value:k.zF.Annually,label:"Annually"}]),[]),c=(0,a.useCallback)((e=>{n({period:e})}),[n]);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Ln.Z,{label:"Devices",value:e.quantity,onChange:e=>{const t=parseInt(e.target.value);n({quantity:isNaN(t)||t<1?void 0:t})},error:!e.quantity,autoFocus:!0}),(0,p.jsx)(Qi,{label:"Tier",value:e.tier,options:l,onChange:s,disabled:t}),(0,p.jsx)(Qi,{label:"Billed",value:e.period,options:d,onChange:c,disabled:t}),(0,p.jsx)(HB,{})]}
3),o&&(0,p.jsx)(ui.Q,{withBackground:!0,children:r?"You cannot downgrade to the Essential Tier while subscribed to the Rooms add-on. Remove Rooms from your subscription first.":"Downgrading to the Essential Tier removes the Rooms add-on. Your organization will lose access to Rooms."}),i&&(0,p.jsx)(ui.Q,{withBackground:!0,children:i})]})})),YB=(0,a.memo)((e=>{let{items:t,children:n,sx:i,disableBottomBorderRadius:a=!1,disableTopBorderRadius:r=!1}=e;return(0,p.jsxs)(m.Z,{"data-testid":"subscriptionDetailRow",paddingY:2,paddingX:2,direction:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",columnGap:2,rowGap:1,border:e=>"1px solid ".concat(e.palette.grey[400]),borderRadius:2,sx:{...i,...a?{borderBottomLeftRadius:0,borderBottomRightRadius:0}:{},...r?{borderTopLeftRadius:0,borderTopRightRadius:0}:{}},children:[(0,o.map)(t,((e,t)=>(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[e.title&&(0,p.jsx)(v.Z,{color:"grey.700",variant:"body2",sx:{whiteSpace:"nowrap"},children:e.title}),e.value&&(0,p.jsx)(v.Z,{color:"primary",variant:"body2",children:e.value})]},t))),n]})})),KB=(0,a.memo)((()=>{var e;const{subscriptionSelection:t,subscriptionPreview:n,subscriptionPreviewError:r,pendingSubscriptionPreview:l,paymentMethodSelection:s,organizationBillingSelection:d,pendingSubscriptionUpsert:c}=vB(),u=(0,a.useMemo)((()=>{if(n)return{...t,devicePerMonth:n.device.perMonth,totalPerPeriod:n.total.perPeriod,discount:n.discount}}),[n,t]),h=F()&&!!n&&!(0,o.includes)((0,o.map)(n.addons,(e=>e.sku)),A.ROOMS),g=!!d.stripeTaxIdValue;return(0,p.jsxs)(p.Fragment,{children:[n&&(0,p.jsx)(p.Fragment,{children:u&&(0,p.jsx)(m.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(YB,{items:[{title:"Devices",value:n.quantity},{title:"Tier",value:(0,o.capitalize)(n.tier)},{title:"Billing",value:(0,o.capitalize)(n.period)},...null!==(e=n.addons)&&void 0!==e&&e.length?[{title:"Add-on",value:(0,o.join)((0,o.map)(n.addons,(e=>(0,o.capitalize)(e.sku))),", ")}]:h?[{title:"Add-on",value:"Rooms (removing)"}]:[]]}),d.billingName&&(0,p.jsx)(YB,{items:[{title:"Billing Name"},{value:d.billingName}]}),(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(YB,{items:[{title:"Billing Address"},{value:(0,p.jsxs)(m.Z,{spacing:0,children:[d.line1&&(0,p.jsx)(v.Z,{variant:"body2",children:d.line1}),d.line2&&(0,p.jsx)(v.Z,{variant:"body2",children:d.line2}),(d.city||d.state||d.postalCode)&&(0,p.jsx)(v.Z,{variant:"body2",children:(0,o.join)((0,o.compact)([d.city,d.state,d.postalCode]),", ")}),d.country&&(0,p.jsx)(v.Z,{variant:"body2",children:d.country})]})}],disableBottomBorderRadius:g}),g&&(0,p.jsx)(YB,{items:[{title:"VAT Number"},{value:d.stripeTaxIdValue||"--"}],sx:{marginTop:"-1px"},disableTopBorderRadius:!0})]}),s&&(0,p.jsx)(YB,{items:[{title:"Payment Method"},{value:(0,p.jsx)(NB,{paymentMethod:s,variant:"body2"})}]}),!c&&(0,p.jsx)(YB,{children:(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsx)(DB,{})})})]})})}),r&&(0,p.jsx)(ui.Q,{children:(0,p.jsxs)(v.Z,{children:[r," Contact us at"," ",(0,p.jsx)(Kn.Z,{href:"mailto:[email protected]",children:"[email protected]"})," for help."]})}),l&&!c&&(0,p.jsx)(Rn.Z,{})]})}));KB.displayName="SettingsSubscriptionUpdateReview";const XB=(0,a.memo)((e=>{var t,n,r;let{open:l,onClose:s,condensed:c}=e;const{organizationBillingSelectionChanged:u,upsertSubscriptionAndPaymentMethod:h,createStripePaymentMethod:g,stripePaymentMethodSelectionChanged:x,subscription:f,subscriptionSelection:b,subscriptionPreview:y,subscriptionPreviewError:j,refreshSubscriptionPreview:Z,pendingOrganizationBillingUpdate:w,paymentMethodSelection:D,pendingStripePaymentMethodCreate:M,pendingSubscriptionPreview:I,pendingSubscriptionUpsert:A}=vB(),{organization:R}=(0,d.mP)(),{totalDueNow:T=0}=SB(y),P="send_invoice"===(null===(t=(0,d.mU)())||void 0===t?void 0:t.collectionMethod),[L,N]=(0,a.useState)(0),[U,F]=(0,a.useState)(!1),{documents:O,fetched:_}=(0,E.D)(S.F.PaymentMethods),B=(0,a.useMemo)((()=>{const e=R.defaultPaymentMethodRef;return!(!e||!_)&&(0,o.some)(O,(t=>t.id===e.id))}),[R.defaultPaymentMethodRef,O,_]);(0,a.useEffect)((()=>{l&&N(c?3:0)}),[l,c]);const W=(()=>{var e;const{subscription:t,subscriptionSelection:n}=vB(),i=(0,z.l)(S.F.SubscriptionSchedules,null===t||void 0===t||null===(e=t.subscriptionScheduleRef)||void 0===e?void 0:e.id);return!(0,o.isEqual)({...(0,o.pick)(t,["tier","period","quantity"]),...pB(t,i),addons:cB(dB(hB(null===t||void 0===t?void 0:t.items,i)))},n)})(),V=!!b.tier&&!!b.period&&!!b.quantity,G=ZB(),H=(0,a.useCallback)((async()=>{try{await h(),s()}catch(e){N(1)}}),[s,h]),q=(0,a.useCallback)((async()=>{const e=ie.current();if(e&&e.data){if("PaymentMethod"===e.type)x(e.data);else if("StripeCardElement"===e.type){var t,n,i,o;const a=e.data,r=await g(a);if(!r)return;x({id:r.id,brand:null===(t=r.card)||void 0===t?void 0:t.brand,last4:null===(n=r.card)||void 0===n?void 0:n.last4,expirationMonth:null===(i=r.card)||void 0===i?void 0:i.exp_month,expirationYear:null===(o=r.card)||void 0===o?void 0:o.exp_year,stripePaymentMethodId:r.id})}Z(),N(3)}else(0,Si.yR)(new Error("Submit and Review Button should be disabled if StripeCardElementOrPaymentMethod is undefined"),{name:"Subscription Update Submit and Review Button should be disabled"})}),[g,Z,x]),{submitForm:Y,hasBeenValidated:K,renderSettingsOrganizationBillingForm:X}=PB({onChange:e=>u(e),requireFullAddress:!0}),Q=(0,a.useCallback)((async()=>{K?N(L+1):Y()}),[L,K,Y]),J=(0,d.GB)(),{blocked:$}=WB(),ee=!V||!y||I||!!j||$||!(!f||J)&&!W,te=(0,a.useMemo)((()=>({0:{header:"Select Plan",renderValue:()=>(0,p.jsx)(qB,{}),ButtonProps:{disabled:ee,onClick:()=>N(1)}},1:{header:"Billing Address",renderValue:()=>X({hideSubmitButton:!0}),ButtonProps:{disabled:w,onClick:()=>Q()},buttonText:K?"Next":"Update address"},2:{renderValue:()=>(0,p.jsx)(FB,{onStripeCardElementValidChange:e=>F(e),getStripeCardElementOrPaymentMethodRef:ie}),buttonText:"Review",ButtonProps:{disabled:M||!_||!B&&!U,onClick:q}},3:{renderValue:()=>c?(0,p.jsx)(kB,{}):(0,p.jsx)(KB,{}),buttonText:wB(T,P),ButtonProps:{disabled:EB({subscriptionPreview:y,pendingSubscriptionPreview:I,pendingSubscriptionUpsert:A,hasSubscriptionSelection:!!b,hasPaymentMethod:!!G||!!D}),submitting:A,onClick:H}}})),[B,Q,q,P,H,U,K,G,D,_,w,M,I,A,X,ee,c,y,b,T]),ne=(0,a.useMemo)((()=>te[L]),[L,te]),ie=(0,a.useRef)((()=>{}));return(0,p.jsxs)(kn.Z,{open:l,onClose:s,maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{maxWidth:900}},children:[(0,p.jsx)(In.Z,{children:(0,p.jsxs)(m.Z,{width:1,direction:"row",spacing:12,justifyContent:"space-between",paddingBottom:1,children:[(0,p.jsx)(v.Z,{variant:"inherit",gutterBottom:!0,children:f?"Update Subscription":"Create Subscription"}),!c&&(0,p.jsx)(Dd.Z,{sx:{flexGrow:1,transform:"translateY(-3px)"},activeStep:L,children:(0,o.map)(["Select Plan","Region","Payment","Review"],(e=>(0,p.jsx)(Md.Z,{children:(0,p.jsx)(iB.Z,{children:e})},e)))})]})}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",spacing:3,children:[(0,p.jsxs)(i.Z,{flex:1,flexBasis:1,height:"fit-content",children:[(0,p.jsx)(BB,{subscriptionPreview:y,fallbackValues:{tier:b.tier,period:b.period,quantity:null!==(n=b.quantity)&&void 0!==n?n:"--"},pendingTaxUpdate:w,pendingTotalPerPeriodUpdate:w||I}),0===L&&(null===y||void 0===y?void 0:y.annualPlanSavings)&&b.period===k.zF.Monthly&&(0,p.jsxs)(v.Z,{variant:"body2",color:"grey.700",marginTop:.5,children:["You can save"," ",fe(y.annualPlanSavings.totalPerMonth)," ","per month by switching to Annual billing"]})]}),(0,p.jsx)(i.Z,{flex:1,flexBasis:1,position:"relative",paddingTop:.5,children:(0,o.map)(te,((e,t)=>
3(0,p.jsx)(i.Z,{children:L===Number(t)&&(0,p.jsxs)(m.Z,{spacing:2,children:[e.header&&(0,p.jsx)(v.Z,{color:"primary",variant:"body1",children:e.header}),e.renderValue()]})},t)))})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:0===L||c?s:()=>N(L-1),children:0===L||c?"Cancel":"Back"}),!ne.hideButton&&(0,p.jsx)(Un.U,{variant:"contained",color:"primary",...ne.ButtonProps,children:null!==(r=ne.buttonText)&&void 0!==r?r:"Next"})]})]})})),QB=()=>{var e;const{organization:t}=(0,d.mP)(),n=(0,d.mU)(),i=null!==(e=null===n||void 0===n?void 0:n.period)&&void 0!==e?e:k.zF.Monthly,o=100*eB[i];return(e=>e%100===0?"$".concat(e/100):fe(e))(null!==t&&void 0!==t&&t.isEdu?Math.round(.8*o):o)},JB=(0,a.memo)((()=>{const{subscriptionSelectionChanged:e,resetSubscriptionSelection:t}=vB(),n=(0,Le.W1)(),r=(()=>{const e=(0,d.mU)();return Qz(null===e||void 0===e?void 0:e.tier)})(),s=U(),c=_(),u=VB(),h=$z(),g=null!==u&&void 0!==u?u:h,x=(0,d.U5)(),f=(()=>{const{subscription:e}=vB();if(!e)return!1;const t=!!e.cancelAt&&e.cancelAt.seconds<=e.currentPeriodEnd.seconds;return e.cancelAtPeriodEnd||t})(),y=QB(),j=(0,d.mU)(),Z=(0,d.GB)(),{hasCreatedRoom:w,fetched:E}=Jz(),[S,D]=(0,a.useState)(!1),I=(0,a.useMemo)((()=>rB(null===j||void 0===j?void 0:j.quantity,null===j||void 0===j?void 0:j.period,Z)),[null===j||void 0===j?void 0:j.quantity,null===j||void 0===j?void 0:j.period,Z]),R=(0,a.useCallback)((n=>{(0,b.ec)("Rooms Purchase Started",{...I,surface:"addRoomsCard",entrySurface:n,hasCreatedRoom:w}),t(),e({tier:k.QV.Premium,addons:(0,o.uniq)([A.ROOMS])}),D(!0)}),[I,w,t,e]),T=(0,a.useCallback)((()=>D(!1)),[]),{organization:P}=(0,d.mP)(),L=!(null===P||void 0===P||!P.isResold),N=r&&!f&&!c,F=!c&&!L&&!f&&!Z&&(r||!x),O=(0,l.TH)(),z=(0,l.k6)();(0,a.useEffect)((()=>{var e,t;if(null===(e=O.state)||void 0===e||!e.openAddRooms||!n||!E)return;const i=null!==(t=O.state.entrySurface)&&void 0!==t?t:"roomsTab";z.replace({...O,state:void 0}),F&&R(i)}),[R,z,O,n,E,F]);const B=(0,a.useMemo)((()=>{if(!c&&!F&&s)return L?"resold":f?"pendingCancellation":x&&!r?"ineligible":void 0}),[c,F,s,L,f,x,r]),W=(0,a.useRef)();return(0,a.useEffect)((()=>{n&&B&&E&&W.current!==B&&(W.current=B,(0,b.ec)("Rooms Purchase Blocked",{surface:"addRoomsCard",reason:B,hasCreatedRoom:w}))}),[n,B,w,E]),n?Z&&!c?null:s||c?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Me.Z,{variant:"outlined","data-testid":"addRoomsCard",sx:{padding:2,border:"1px solid",borderColor:c?"divider":"primary.main",borderRadius:1},children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(Q.Z,{fontSize:"small"}),(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Add Rooms"})]}),c?(0,p.jsxs)(m.Z,{alignItems:"flex-end",spacing:.25,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(ng.Z,{color:"primary",fontSize:"small"}),(0,p.jsx)(v.Z,{variant:"body2",color:"primary","data-testid":"addRoomsCard_added",children:"Added"})]}),void 0!==g&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Ends on ".concat((0,M.i$)(g,"MMMM D, YYYY"))})]}):N&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Free until ".concat(tB)})]}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:[nB,N&&(0,p.jsxs)(p.Fragment,{children:[" ",(0,p.jsxs)(Kn.Z,{href:"https://help.managexr.com/en/articles/13345958-rooms-beta",target:"_blank",rel:"noopener",variant:"body2",children:["Learn more",(0,p.jsx)(Mu.Z,{sx:{fontSize:14,marginLeft:.5}})]})]})]}),N&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Rooms is free to use before ".concat(tB,". Afterwards, Rooms will be ").concat(y," / month / device.")}),!c&&!L&&f&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"addRoomsCard_pendingCancellation",children:"Resume your subscription to add Rooms."}),!c&&!L&&!f&&!r&&!x&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"addRoomsCard_upgradeRequired",children:"You must upgrade to Premium to add Rooms to your subscription."}),!c&&L&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"addRoomsCard_resold",children:["Reach out to your reseller to add Rooms to your subscription. If you do not know your reseller or need help finding their contact information, please reach out to"," ",(0,p.jsx)(Kn.Z,{href:"mailto:[email protected]",variant:"body2",children:"[email protected]"})," ","for assistance."]}),!c&&!L&&!f&&!r&&x&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary","data-testid":"addRoomsCard_ineligible",children:["Reach out to ",(0,p.jsx)(Xz,{})," to add Rooms to your subscription."]}),F&&(0,p.jsx)(i.Z,{display:"flex",justifyContent:"flex-end",children:(0,p.jsx)(C.Z,{variant:"contained",size:"small",onClick:()=>R("direct"),"data-testid":"addRoomsCard_cta",children:x?"Add Rooms":"Upgrade and add Rooms"})})]})}),(0,p.jsx)(XB,{open:S,onClose:T,condensed:!0})]}):null:null}));JB.displayName="SettingsAddRoomsCard";var $B=n(36353);const eW=()=>{const{renderSettingsOrganizationBillingForm:e}=PB({notifySuccess:!0,requireFullAddress:!1});return(0,p.jsx)(jx,{title:"Billing Address",leadingIcon:$B.Z,trailingComponent:(0,p.jsx)(Fi._,{tooltipText:"Billing address is required for tax collection",children:(0,p.jsx)(cc.Z,{color:"action"})}),color:"primary",children:e()})},tW={q_reason:{id:"q_reason",type:"choice",question:"Why do you want to cancel your plan?",otherLabel:"What could we do better?",otherPlaceholder:"Tell us what we could have done differently",options:[{id:"cost",label:"The cost",next:"terminal_bye"},{id:"no_longer_necessary",label:"No longer using the devices",next:"terminal_bye"},{id:"missing_features",label:"Missing features we needed",next:"terminal_bye"},{id:"issues",label:"Experienced issues",next:"terminal_bye"},{id:"support",label:"Lack of support",next:"terminal_bye"},{id:"another_solution",label:"Found another solution",next:"terminal_bye"},{id:"other",label:"Other",next:"terminal_bye"}]},terminal_bye:{id:"terminal_bye",type:"terminal",question:"We're sorry to see you go."}},nW=e=>{let{value:t,onChange:n,label:i,placeholder:o,ariaLabel:a}=e;return(0,p.jsx)(Ul.z,{fullWidth:!0,multiline:!0,minRows:3,autoFocus:!0,label:i,placeholder:o,inputProps:{"aria-label":a,"data-testid":"cancelSurveyDialog_textInput"},value:t,onChange:e=>n(e.target.value),helperText:"At least ".concat(10," characters (").concat(t.trim().length,"/").concat(10,")")})},iW=(0,a.memo)((e=>{var t,n,r,l,s,d;let{open:c,pending:u,periodEnd:h,onClose:g,onConfirm:x}=e;const f=(0,Le.ye)("enableCustomChurnSurvey"),y=(0,z.T)("churnSurvey"),{tree:j,rootId:Z}=(0,a.useMemo)((()=>(e=>{const t=null===e||void 0===e?void 0:e.nodes,n=null===e||void 0===e?void 0:e.root;return t&&n&&t[n]?{tree:t,rootId:n}:{tree:tW,rootId:"q_reason"}})(f?y:void 0)),[f,y]),w=j!==tW,[E,S]=(0,a.useState)([Z]),[D,k]=(0,a.useState)({}),[I,A]=(0,a.useState)(""),[R,T]=(0,a.useState)(null),P=null!==(t=E[E.length-1])&&void 0!==t?t:Z,L=null!==(n=j[P])&&void 0!==n?n:j[Z],N=(0,a.useMemo)((()=>{const e=(t,n)=>{var i;const a=j[t];if(!a||n.has(t))return 1;
3const r="choice"===a.type?(0,o.map)(a.options,(e=>e.next)):"text"===a.type||"schedule"===a.type?[a.next]:[];if(0===r.length)return 1;const l=new Set(n).add(t);return 1+(null!==(i=(0,o.max)((0,o.map)(r,(t=>e(t,l)))))&&void 0!==i?i:0)};return Math.max(1,e(Z,new Set))}),[j,Z]),U=Math.min(100,E.length/N*100),F=N>2,O=(0,a.useCallback)((()=>{S([Z]),k({}),A(""),T(null)}),[Z]),_=(0,a.useRef)(!1);(0,a.useEffect)((()=>{c&&!_.current&&(O(),(0,b.ec)("Subscription Cancellation Survey Opened",{usingPublishedTree:w})),_.current=c}),[c,O,w]),(0,a.useEffect)((()=>{c&&(0,o.isEmpty)(D)&&1===E.length&&E[0]!==Z&&S([Z])}),[c,Z,D,E]);const B=(0,a.useCallback)((()=>{var e;(0,b.ec)("Subscription Cancellation Survey Abandoned",{lastQuestionId:P,lastQuestion:null!==(e=null===L||void 0===L?void 0:L.question)&&void 0!==e?e:"",stepsAnswered:(0,o.size)(D),reachedEnd:"terminal"===(null===L||void 0===L?void 0:L.type)}),O(),g()}),[P,L,D,g,O]),W=(0,a.useCallback)((e=>{if(e.captureText||"other"===e.id)return A(""),void T(e);k((t=>({...t,[P]:{answer:e.label,text:""}}))),S((t=>[...t,e.next])),A("")}),[P]),V=(0,a.useCallback)((()=>{if(!R)return;const e=I.trim();k((t=>({...t,[P]:{answer:R.label,text:e}}))),S((e=>[...e,R.next])),A(""),T(null)}),[P,R,I]),G=(0,a.useCallback)((e=>{const t=I.trim();t&&k((e=>({...e,[P]:{answer:"",text:t}}))),S((t=>[...t,e])),A("")}),[P,I]),H=(0,a.useCallback)((e=>{S((t=>[...t,e])),A("")}),[]),q=(0,a.useCallback)((()=>{A(""),R?T(null):S((e=>e.length>1?e.slice(0,-1):e))}),[R]),Y=(0,a.useMemo)((()=>{var e;const t=(0,o.compact)((0,o.map)(E,(e=>{const t=D[e],n=j[e];if(t&&n)return{questionId:e,question:n.question,answer:t.answer,text:t.text}}))),n=(0,o.find)(t,(e=>!!e.answer));return{primaryReason:null!==(e=null===n||void 0===n?void 0:n.answer)&&void 0!==e?e:"",responses:t}}),[E,D,j]),K=(0,a.useCallback)((async()=>{await x(Y),O()}),[Y,x,O]),X=E.length<=1;if(!L)return null;const Q="terminal"!==L.type&&(!X||!!R),J=I.trim().length>=10,$="terminal"===L.type?(0,p.jsx)(C.Z,{variant:"text",onClick:B,disabled:u,children:"Not now"}):Q?(0,p.jsx)(C.Z,{variant:"text",onClick:q,children:"Back"}):null,ee="terminal"===L.type?(0,p.jsx)(Un.U,{"data-testid":"cancelSurveyDialog_confirm",submitting:u,disabled:u,color:"error",type:"button",onClick:K,children:"Confirm cancellation"}):"text"===L.type?(0,p.jsx)(Un.U,{"data-testid":"cancelSurveyDialog_continue",disabled:!J,type:"button",onClick:()=>G(L.next),children:"Continue"}):"choice"===L.type&&R?(0,p.jsx)(Un.U,{"data-testid":"cancelSurveyDialog_continue",disabled:!J,type:"button",onClick:V,children:"Continue"}):"schedule"===L.type?(0,p.jsx)(C.Z,{"data-testid":"cancelSurveyDialog_skip",variant:"text",onClick:()=>H(L.next),children:null!==(r=L.skipLabel)&&void 0!==r?r:"Skip"}):null;return(0,p.jsxs)(kn.Z,{open:c,onClose:B,maxWidth:"schedule"!==L.type&&"xs",fullWidth:"schedule"!==L.type,PaperProps:"schedule"===L.type?{sx:{width:700,maxWidth:"95vw"}}:void 0,children:[F&&(0,p.jsx)(Rn.Z,{variant:"determinate",value:U,sx:{marginTop:2,marginX:2,borderRadius:1}}),(0,p.jsxs)(ai.i,{title:L.question,leftActions:$,rightActions:ee,onClose:B,children:["choice"===L.type&&!R&&(0,p.jsx)(m.Z,{spacing:1.5,children:(0,o.map)(L.options,(e=>(0,p.jsx)(C.Z,{"data-testid":"cancelSurveyDialog_option",fullWidth:!0,variant:"outlined",size:"large",onClick:()=>W(e),sx:{justifyContent:"flex-start",textAlign:"left",whiteSpace:"normal",textTransform:"none",paddingY:1.5,fontSize:14,fontWeight:"normal",lineHeight:1.4,borderColor:"divider",color:"text.primary","&:hover":{borderColor:"primary.main",bgcolor:"action.hover"}},children:e.label},e.id)))}),"choice"===L.type&&R&&(0,p.jsx)(nW,{value:I,onChange:A,label:null!==(l=L.otherLabel)&&void 0!==l?l:"Tell us more",placeholder:null!==(s=L.otherPlaceholder)&&void 0!==s?s:"Share a few details\u2026"}),"text"===L.type&&(0,p.jsx)(nW,{value:I,onChange:A,placeholder:null!==(d=L.placeholder)&&void 0!==d?d:"Type your answer\u2026",ariaLabel:L.question}),"schedule"===L.type&&(0,p.jsxs)(m.Z,{spacing:1.5,children:[L.subtitle&&(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",children:L.subtitle}),(0,p.jsx)(i.Z,{component:"iframe",src:L.embedUrl,title:"Book a call with a specialist",sx:{width:"100%",height:"68vh",minHeight:420,border:1,borderColor:"divider",borderRadius:2}})]}),"terminal"===L.type&&(0,p.jsxs)(v.Z,{variant:"body1",color:"text.secondary",children:["You can still access the ManageXR platform until"," ",(0,M.x1)(h),". Your content, configurations, and device information will be saved if you choose to come back."]})]})]})}));
3iW.displayName="SettingsSubscriptionCancelSurveyDialog";const oW=()=>{const{documents:e}=(0,E.D)(S.F.Invoices,{filter:(0,a.useCallback)((e=>ue(e)),[])});return{count:e.length,total:e.reduce(((e,t)=>e+t.total),0)}},aW=(0,a.memo)((()=>{var e;const t=oW(),n=(0,d.mU)(),i=ZB(),[o,r]=(0,a.useState)(!1),{cancelSubscription:l,resumeSubscription:s,pendingSubscriptionCancelResume:c,pendingSubscriptionUpsert:u}=vB(),h=(0,a.useCallback)((async()=>{await s()}),[s]),m=(0,a.useCallback)((async e=>{await l(),(0,b.ec)("Subscription Cancellation Submitted",{primaryReason:e.primaryReason,responses:e.responses}),r(!1)}),[l]);return n&&("trialing"!==n.status||i)?(0,p.jsx)(p.Fragment,{children:n.cancelAtPeriodEnd?(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(C.Z,{"data-testid":"subscriptionAction_resume",onClick:h,size:"small",color:"primary",variant:"contained",disabled:c,startIcon:c?(0,p.jsx)(Zi.Z,{size:"1em"}):(0,p.jsx)(TI.Z,{}),sx:{alignSelf:"flex-start"},children:"Resume Subscription"})}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ee.Z,{title:t.count>0?"You must pay your open invoices before ending your subscription.":"",children:(0,p.jsx)("span",{children:(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(C.Z,{"data-testid":"subscriptionAction_cancel",size:"small",variant:"outlined",color:"error",startIcon:(0,p.jsx)(bu.Z,{}),disabled:c||u||t.count>0,onClick:()=>r(!0),children:"Cancel Subscription"})})})}),(0,p.jsx)(iW,{open:o,pending:c,periodEnd:null!==(e=null===n||void 0===n?void 0:n.currentPeriodEnd)&&void 0!==e?e:0,onClose:()=>r(!1),onConfirm:m})]})}):null})),rW=e=>{var t;let{children:n}=e;const i=null===(t=(0,d.kV)().usesMxrPartner)||void 0===t?void 0:t.fixedContentProvider;return i?(0,p.jsx)(ui.Q,{withoutIcon:!0,withBackground:!0,children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(mf.h,{children:["You're using a ",(0,p.jsx)("em",{children:"Fixed Content Subscription"})," provided by"," ",(0,p.jsx)("em",{children:i})]}),(0,p.jsxs)(mf.h,{children:["ManageXR has partnered with ",i," to enable the adoption of game changing educational tools in schools across the world. This Fixed Content Subscription of ManageXR allows you to remotely control your headsets, deploy new ",i," updates, lock devices to a custom home screen, and more."]}),(0,p.jsxs)(mf.h,{children:["If you are looking to explore and access other content on your VR devices, please contact ",i," to have your subscription updated at no additional charge."]})]})}):(0,p.jsxs)(p.Fragment,{children:[" ",n]})},lW=e=>{let{usesMxrPartner:t}=e;return(0,p.jsx)(i.Z,{marginTop:2,"data-testid":"subscriptionStatus_customContract",children:(0,p.jsx)(rW,{children:(0,p.jsxs)(i.Z,{children:["Your organization has a custom subscription plan. Contact"," ",null!==t&&void 0!==t&&t.reseller?(0,p.jsxs)("span",{children:["your ",t.reseller," Account Executive for help."]}):(0,p.jsxs)("span",{children:["us at"," ",(0,p.jsx)(Kn.Z,{href:"mailto:[email protected]",children:"[email protected]"})," for help."]})]})})})},sW=(0,a.memo)((e=>{let{open:t,onClose:n,onConfirm:i,invoice:o,paymentMethod:a,pending:r}=e;const l=o.total-0>0;return(0,p.jsxs)(kn.Z,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:[(0,p.jsx)(In.Z,{children:"Pay Invoice"}),(0,p.jsxs)(An.Z,{children:[!r&&(0,p.jsxs)(p.Fragment,{children:[l&&(0,p.jsxs)(mf.h,{children:["Pay ",(0,p.jsx)("em",{children:fe(o.total)})," with"," ",(0,p.jsx)(NB,{paymentMethod:a}),"?"]}),!l&&!1,l&&!1]}),r&&(0,p.jsx)(Rn.Z,{})]}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:n,disabled:r,children:"Cancel"}),(0,p.jsx)(C.Z,{onClick:i,variant:"contained",color:"primary",disabled:r,children:"Pay"})]})]})})),dW=(0,a.memo)((e=>{let{invoice:t}=e;const n=(0,De.Z)(),o=(0,oB.useStripe)(),{notify:r}=(0,ie.o)(),l=(0,Fe.pv)({method:"post",path:"billing/retry-invoice"}),s=(0,Fe.pv)({method:"get",path:"billing/invoice-url/:invoiceId"}),d=ZB(),[c,u]=(0,a.useState)(!1),h=(0,a.useCallback)((()=>{u(!1)}),[]),[g,x]=(0,a.useState)(""),f=(0,a.useCallback)((async()=>{if(g)return g;const e=await s.requestAsync({params:{invoiceId:t.id},errorMessage:"Error getting invoice url"}).catch((()=>{}));return e?(x(e.url),e.url):void 0}),[s,t.id,g]),[b,y]=(0,a.useState)(!1),j=(0,a.useCallback)((async()=>{d&&(y(!0),await l.requestAsync({data:{invoiceId:t.id},errorMessage:"Failed to pay invoice"}).then((async e=>{const t=e.status,n=()=>{r({severity:"error",message:"Failed to pay invoice"})};
3if("success"===t)r({severity:"success",message:"Invoice paid"});else if("payment_failed"===t)n();else if("requires_action"===t){const{client_secret:t,payment_method:i}=e.paymentIntent;if(o&&t&&i){(await o.confirmCardPayment(t,{payment_method:i})).error?n():r({severity:"success",message:"Invoice paid"})}else n()}else n();h()})).catch((e=>{})).finally((()=>{y(!1)})))}),[l,h,t.id,r,d,o]),Z=(0,a.useCallback)((()=>{f().then((e=>{e&&(0,di.UU)(e)}))}),[f]);return(0,p.jsxs)(i.Z,{position:"relative",paddingY:.25,"data-testid":"subscriptionInvoices_row",children:[s.pending&&(0,p.jsx)(Rn.Z,{sx:{position:"absolute",inset:"0"}}),(0,p.jsx)(Kn.Z,{component:C.Z,sx:{...n.mixins.linkStyleReset,textTransform:"none",width:1,textAlign:"left","&:hover .external-link-icon":{opacity:1}},onClick:Z,children:(0,p.jsxs)(m.Z,{width:1,direction:"row",alignItems:"baseline",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(v.Z,{flexGrow:1,variant:"body2","data-testid":"subscriptionInvoices_rowDate",children:(0,M.aH)(t.createdAt)}),(0,p.jsx)(Mu.Z,{color:"primary",fontSize:"small",className:"external-link-icon",sx:{opacity:0}})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2.4,children:[(0,p.jsx)(v.Z,{variant:"body2","data-testid":"subscriptionInvoices_rowAmount",children:t.isTrial?"(Trial)":fe(t.total)}),(0,p.jsx)(v.Z,{width:55,align:"center",variant:"subtitle2",color:"primary","data-testid":"subscriptionInvoices_rowStatus",children:"paid"===t.status&&"Paid"})]})]})},t.id),"open"===t.status&&(0,p.jsx)(C.Z,{size:"small",variant:"contained",color:"primary",disabled:l.pending||b,onClick:()=>{d&&u(!0)},sx:{position:"absolute",right:e=>e.spacing(1),top:"50%",transform:"translateY(-50%)",minWidth:50,pointerEvents:d?void 0:"none"},children:"Pay"}),d&&(0,p.jsx)(sW,{open:c,onClose:h,onConfirm:j,invoice:t,paymentMethod:d,pending:l.pending||b})]})})),cW=(0,a.memo)((e=>{let{maxHeight:t}=e;const{documents:n,fetched:r}=(0,E.D)(S.F.Invoices,{filter:(0,a.useCallback)((e=>("open"===e.status||"paid"===e.status)&&0!==e.total),[]),sort:(0,a.useCallback)(((e,t)=>t.createdAt-e.createdAt),[])}),l=!!t&&36*n.length>t;return(0,p.jsx)(jx,{color:"primary",title:"Invoices",leadingIcon:CI.Z,emptyMessage:r&&(0,o.isEmpty)(n)?"You don't have any invoices yet":void 0,sx:{maxHeight:t,overflow:"hidden"},children:(0,p.jsxs)(m.Z,{spacing:2,height:1,children:[(0,p.jsxs)(m.Z,{marginX:-.5,height:1,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:3,paddingLeft:1,paddingRight:l?"calc(var(--scrollbarWidth) + 14px)":1.75,height:22,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",flexGrow:1,children:"Date"}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Amount"}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",align:"center",children:"Status"})]}),(0,p.jsx)(i.Z,{paddingBottom:1,marginBottom:-2,sx:e=>({overflowY:"auto",height:t?t-50-22:1}),children:(0,o.map)(n,(e=>(0,p.jsx)(dW,{invoice:e},e.id)))})]}),!r&&(0,p.jsx)(Rn.Z,{})]})})})),uW=(0,a.memo)((e=>{let{deviceId:t,index:n}=e;const a=(0,u.I0)(),r=(0,u.v9)((e=>e.device.selection.values[n])),l=(0,u.v9)((e=>e.device.pendingOperation)),s=(0,u.v9)((e=>e.device.queryPending));return(0,o.includes)(null===l||void 0===l?void 0:l.deviceIds,t)?(0,p.jsx)(i.Z,{width:38,height:38,padding:1,children:(0,p.jsx)(Zi.Z,{size:24})}):(0,p.jsx)(Pi.Z,{size:"small",checked:r,onChange:e=>{a(La.i7.actions.checkboxChanged({index:n,multiSelect:(0,o.get)(e.nativeEvent,"shiftKey",!1)}))},disabled:s||!!l})})),pW=e=>{let{open:t,onClose:n}=e;const{notifyThunkResult:i,confirm:r}=(0,ie.o)(),s=(0,u.I0)(),d=(0,u.v9)((e=>e.device.queryResult)),[h,g]=(0,a.useState)(!1),[x,f]=(0,a.useState)(!1),[b,y]=(0,a.useState)(!1),{allPrivileges:j,privileges:Z}=(0,w.P)(),E=(0,X.u7)(),S=Xk(),D=(0,a.useCallback)((()=>{s(La.i7.actions.allDevicesSelected())}),[s]);(0,a.useEffect)((()=>{t&&(D(),g(!1),y(!1),f(!1))}),[t,D]);const[M,k]=(0,a.useState)(!1),I=(0,a.useCallback)((()=>{k(!1)}),[]),A=(0,l.k6)(),R=(0,a.useCallback)(((e,t)=>{1===t.length?A.push((0,c.LT)(c._j.organization.devices.device,{organizationId:e,deviceId:t[0]})):A.push((0,c.LT)(c._j.organization.devices,{organizationId:e}))}),[A]),[T,P]=(0,a.useState)(),L=(0,a.useCallback)((async(e,t)=>{if((0,o.isEmpty)(S))return;const n=await s((0,La.e)({deviceIds:S,targetOrganizationId:e,targetConfigurationId:t}));"rejected"===n.meta.requestStatus&&n.payload===Fe.Xt.DeviceLimitExceeded?P({configurationId:t,numDevices:S.length}):i({result:n,success:{message:"Device ".concat((0,ul.n8)(S.length,"organization")," changed"),action:{title:"View ".concat((0,ul.n8)(S.length,"Device")),onClick:()=>R(e,S)}},error:{message:"Error changing device organization"}})}),[S,s,i,R]),N=(0,o.size)(j)>1||E,U=(0,a.useCallback)((()=>{k(!0)}),[]),F=(0,ul.n8)(S.length,"device"),O=S.length>1?"them":"it",_=(0,a.useCallback)(((e,t)=>{k(!1),r({message:"Change organization of ".concat(S.length," ").concat(F,"?"),onConfirm:()=>L(e,t)})}),[L,r,F,S.length]),z=(0,a.useCallback)((e=>{let{key:t,index:n,style:i,registerChild:o}=e;return(0,p.jsxs)(cO.Z,{style:i,ref:o,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",height:32,paddingLeft:1,children:[(0,p.jsx)(Ui.G,{title:d[n].name,variant:"subtitle2",color:"text.secondary"}),(0,p.jsx)(uW,{index:n,deviceId:d[n].id})]}),n!==d.length-1&&(0,p.jsx)(Ie.Z,{sx:{borderColor:"grey.100"}})]},t)}),[d]),B=(0,a.useCallback)((async()=>{g(!0);const e=await s((0,La.tz)({deviceIds:S}));i({result:e,success:{message:"".concat((0,ul.n8)(S.length,"Device")," Deleted")},error:{message:"Error sending Delete command"}}),"fulfilled"===e.meta.requestStatus&&(s(La.i7.actions.refreshQuery()),y(!1),f(!1)),g(!1)}),[S,s,i]),W=(0,a.useCallback)((()=>{h||(b?B():f(!0))}),[b,B,h]),V=(0,a.useCallback)((()=>
3{if(x)return y(!1),f(!1);n&&n()}),[x,n]),G=Z.devices&&(!(0,o.isEmpty)(S)||x&&b),H=N&&Z.devices&&!(0,o.isEmpty)(S);return(0,p.jsxs)(kn.Z,{open:t,fullWidth:!0,maxWidth:"sm",children:[(0,p.jsxs)(cO.Z,{paddingX:2,paddingBottom:2,children:[(0,p.jsx)(In.Z,{sx:{paddingLeft:0},children:(0,p.jsxs)(v.Z,{variant:"h6",color:"black",children:["Delete or move ",F," to a different organization"]})}),x?(0,p.jsx)(Nn,{message:"Are you sure you want to delete ".concat(S.length," ").concat(F,"?"),confirmationText:"".concat(S.length),onConfirmationValidChange:y}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Tn.Z,{children:(0,p.jsxs)(v.Z,{variant:"body2",children:["Delete your ",F," to remove ",O," from ManageXR. Move your ",F," to continue using ",O," in a different ManageXR organization today."]})}),(0,p.jsxs)(v.Z,{variant:"caption",color:"primary",children:[S.length," ",F]}),(0,p.jsx)(cO.Z,{marginTop:1,border:e=>"1px solid ".concat(e.palette.grey.A100),children:(0,p.jsx)(Zu.Z,{height:Math.min(300,32*d.length),rowHeight:32,renderRow:z,rowCount:d.length})})]})]}),(0,p.jsxs)(Pn.Z,{sx:{justifyContent:"space-between",paddingBottom:2},children:[(0,p.jsx)(C.Z,{onClick:V,variant:"text",color:"primary",startIcon:x&&(0,p.jsx)(rM.Z,{}),children:x?"Back":"Cancel"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[!x&&(0,p.jsx)(Un.U,{onClick:U,color:"primary",disabled:!H,submitting:h,children:"Move ".concat(S.length," ").concat((0,ul.n8)(S.length,"Device"),"\n ")}),(0,p.jsx)(Un.U,{onClick:W,color:"error",disabled:!G,submitting:h,children:"Delete ".concat(S.length," ").concat((0,ul.n8)(S.length,"Device"))})]})]}),(0,p.jsx)(MI,{open:M,onClose:I,onSubmit:_}),(0,p.jsx)(Jk,{open:!!T,onClose:()=>P(void 0),configurationId:null===T||void 0===T?void 0:T.configurationId,numNewDevices:null===T||void 0===T?void 0:T.numDevices})]})},hW=()=>{const[e,t]=(0,a.useState)(!1),n=(0,u.v9)((e=>e.device.queryResult)),i=(0,u.I0)();(0,a.useEffect)((()=>{i(La.i7.actions.filtersCleared())}),[i]);const r=(0,a.useCallback)((()=>{t(!0)}),[]),l=(0,a.useCallback)((()=>{t(!1)}),[]);return(0,o.isEmpty)(n)?null:(0,p.jsxs)(m.Z,{spacing:2,justifyContent:"center",children:[(0,p.jsxs)(v.Z,{children:["Trying to add your devices to another organization on ManageXR? Delete them from this organization or move them to another organization first."," ",(0,p.jsx)(Kn.Z,{onClick:r,children:"Delete or move devices?"})]}),(0,p.jsx)(pW,{open:e,onClose:l})]})},mW=e=>{let{overrideTier:t}=e;return(0,p.jsxs)(m.Z,{sx:{padding:2,margin:2,backgroundColor:y.DG.success[50],borderRadius:2},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Rh.Z,{color:"success"}),(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Subscription Override Applied"})]}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Your organization has an active subscription override. The subscription override gives you access to ",t," tier features. The override has no effect on your billing."]})]})};var gW=n(92119);const vW=(0,a.memo)((e=>{let{open:t,onClose:n}=e;const i=(0,oB.useElements)(),{createStripePaymentMethodAndAddToOrg:o,stripeLoaded:r}=vB(),[l,s]=(0,a.useState)(!1),[d,c]=(0,a.useState)(!0);return(0,p.jsxs)(kn.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"xs",children:[(0,p.jsxs)(In.Z,{children:[l?"Adding":"Add"," Payment Method"]}),(0,p.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),!i)return;const t=i.getElement(oB.CardElement);if(!t)return;s(!0);const{error:a}=await o(t,d);a||n(),s(!1)},children:[(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Me.Z,{sx:{paddingTop:2,paddingBottom:1.5,paddingX:1.5},children:(0,p.jsx)(oB.CardElement,{})}),(0,p.jsx)(po.Z,{control:(0,p.jsx)(ho.Z,{size:"small"}),checked:d,onChange:()=>c(!d),label:"Make this my default payment method",disabled:l})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:n,disabled:l,children:"Cancel"}),(0,p.jsx)(Un.U,{"data-testid":"createPaymentMethodDialog_submit",disabled:!r||!i,submitting:l,icon:(0,p.jsx)(Wn.Z,{}),children:"Add"})]})]})]})})),CW=(0,a.memo)((()=>{const{organization:e}=(0,d.mP)(),{pendingPaymentMethodCreate:t,pendingPaymentMethodDelete:n}=vB(),{documents:i,fetched:r}=(0,E.D)(S.F.PaymentMethods),[l,s]=(0,a.useState)(!1),c=(0,a.useCallback)((()=>{s(!1)}),[]),u=t||n;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(jx,{title:"Payment Methods",leadingIcon:gW.Z,emptyMessage:r&&(0,o.isEmpty)(i)?"You haven't added any payment methods":void 0,trailingComponent:e.balance<0?(0,p.jsxs)(mf.h,{sx:{whiteSpace:"nowrap"},children:["Credits ",(0,p.jsx)("em",{children:fe(-e.balance)})]}):void 0,color:"primary",children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(m.Z,{spacing:1,children:(0,o.map)(i,(e=>(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(UB,{paymentMethod:e,showDeleteButton:!0,isLastPaymentMethod:1===i.length})})},e.id)))}),!r&&(0,p.jsx)(Rn.Z,{}),(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(C.Z,{"data-testid":"paymentMethods_add",size:"small",variant:"contained",color:"primary",onClick:()=>s(!0),startIcon:(0,p.jsx)(Wn.Z,{}),disabled:u,sx:{alignSelf:"flex-end"},children:"Add payment method"})})]})}),(0,p.jsx)(vW,{open:l,onClose:c})]})})),xW=e=>
30===e.unitAmount,fW=(e,t)=>(0,o.filter)(e,(e=>e.kind===t)),bW=e=>(0,o.sumBy)(e,(e=>e.quantity)),yW=e=>(0,o.uniq)((0,o.map)(e,(e=>e.stripePriceId))).sort(),jW=e=>{const t=(0,o.uniq)((0,o.map)(e,(e=>(0,O.yV)(e.period,e.intervalCount))));return 1===t.length?t[0]:void 0},ZW=(e,t)=>{const n=fW(e,I.ADD_ON),i=fW(t,I.ADD_ON),a=e=>bW((0,o.filter)(fW(e,I.DEVICE),(e=>!xW(e)))),r=a(e),l=a(t),s=r!==l,d=(0,o.compact)((0,o.uniq)([...(0,o.map)(n,(e=>e.sku)),...(0,o.map)(i,(e=>e.sku))]));return(0,o.compact)((0,o.map)(d,(e=>{const t=lB[e],a=(0,o.filter)(n,(t=>t.sku===e)),r=(0,o.filter)(i,(t=>t.sku===e));if(!r.length)return a.length?"".concat(t," ends"):void 0;if(!a.length)return"".concat(t," is added");if(!(0,o.isEqual)(yW(a),yW(r)))return((e,t,n)=>{const i=(0,o.sumBy)(t,(e=>{var t;return null!==(t=e.unitAmount)&&void 0!==t?t:NaN})),a=(0,o.sumBy)(n,(e=>{var t;return null!==(t=e.unitAmount)&&void 0!==t?t:NaN}));return 0===i&&a>0?"Billing for ".concat(e," begins"):"".concat(e,i>0&&0===a?" becomes free":" pricing changes")})(t,a,r);const d=bW(a),c=bW(r);if(d===c)return;return s&&c===l?void 0:"".concat(t," changes to ").concat(c)})))},wW=e=>{var t;const n=null!==(t=e.phases)&&void 0!==t?t:[];return(0,o.reduce)(n,((t,i,a)=>{const r=n[a-1];if(!r||i.periodStart.seconds<e.periodStart.seconds)return t;const l=((e,t)=>{const n=fW(e,I.DEVICE),i=fW(t,I.DEVICE),a=(0,o.filter)(n,(e=>!xW(e))),r=(0,o.filter)(i,(e=>!xW(e))),l=bW((0,o.filter)(n,xW)),s=bW((0,o.filter)(i,xW)),d=bW(a),c=bW(r),u=jW(a),p=jW(r),h=!!p&&u!==p,m=h?", billed ".concat(p.toLowerCase()):"",g=!(0,o.isEqual)(yW(a),yW(r)),v=[],C=d!==c;return d>0&&0===c?v.push("Paid device plan ends"):0===d&&c>0?v.push("Device plan begins at ".concat(c," devices").concat(m)):C?v.push("Device plan changes to ".concat(c," devices").concat(m)):(g||h)&&v.push("Device plan changes".concat(m)),l!==s&&(0===s?v.push("Free devices end"):0===l?v.push("".concat(s," free devices added")):v.push("Free devices change to ".concat(s))),{descriptions:v,paidPlanChanged:C}})(r.items,i.items),s=[...l.descriptions,...ZW(r.items,i.items)];return s.length>0?[...t,{effectiveAt:i.periodStart,descriptions:s,includesDeviceChange:l.paidPlanChanged}]:t}),[])},EW=(0,a.memo)((e=>{let{transitions:t,currentSummary:n,children:i}=e;return(0,p.jsxs)(m.Z,{spacing:1.5,paddingY:2,paddingX:2,border:e=>"1px solid ".concat(e.palette.grey[400]),borderRadius:2,"data-testid":"subscriptionSchedule_timeline",children:[(0,p.jsx)(v.Z,{children:"Scheduled Changes"}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(SW,{label:"Today",descriptions:[n],isCurrent:!0,isLast:!1}),(0,o.map)(t,((e,n)=>(0,p.jsx)(SW,{label:(0,M.rV)(e.effectiveAt),descriptions:e.descriptions,isLast:n===t.length-1},e.effectiveAt.seconds)))]}),i]})}));EW.displayName="SettingsSubscriptionScheduleTimeline";const SW=(0,a.memo)((e=>{let{label:t,descriptions:n,isLast:a,isCurrent:r=!1}=e;return(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,"data-testid":"subscriptionSchedule_timelineEntry",children:[(0,p.jsxs)(m.Z,{alignItems:"center",width:10,children:[(0,p.jsx)(i.Z,{sx:{height:20,display:"flex",alignItems:"center",flexShrink:0},children:(0,p.jsx)(i.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:r?"primary.main":"grey.500"}})}),!a&&(0,p.jsx)(i.Z,{sx:{width:"1px",flexGrow:1,bgcolor:"grey.500",marginTop:"-".concat(5,"px"),marginBottom:"-".concat(5,"px")}})]}),(0,p.jsxs)(m.Z,{paddingBottom:a?0:2,spacing:.25,children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,color:r?"primary":"grey.700",lineHeight:"".concat(20,"px"),children:t}),(0,o.map)(n,(e=>(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:e},e)))]})]})}));SW.displayName="TimelineEntry";const DW=(0,a.memo)((e=>{let{subscription:t,subscriptionSchedule:n}=e;const{cancelSubscriptionSchedule:i,pendingSubscriptionCancelResume:o,pendingSubscriptionUpsert:r}=vB(),l=(0,a.useCallback)((async()=>{await i()}),[i]),s=(0,a.useMemo)((()=>n?wW(n):[]),[n]),d=1===s.length?s[0]:void 0,c=!0===(null===d||void 0===d?void 0:d.includesDeviceChange)&&1===(null===d||void 0===d?void 0:d.descriptions.length),u=s.length>0&&!c,h=(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(Un.U,{"data-testid":"subscriptionAction_cancelScheduledUpdate",sx:{alignSelf:"flex-start"},color:"error",variant:"text",onClick:l,disabled:o||r,submitting:o,children:"Cancel update"})}),g=t?[(0,ul.sr)(t.quantity,"device"),(0,cd.Z)(t.tier),(0,O.yV)(t.period,t.intervalCount)].join(" \xb7 "):"";return(0,p.jsxs)(m.Z,{spacing:2,children:[t&&!n&&(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{color:"primary.300",variant:"subtitle1",fontWeight:600,children:"Subscription Details"}),(0,p.jsx)(YB,{items:[{title:"Devices",value:(0,p.jsx)("span",{"data-testid":"subscriptionDetail
3s_deviceCount",children:t.quantity})},{title:"Tier",value:(0,cd.Z)(t.tier)},{title:"Billing",value:(0,O.yV)(t.period,t.intervalCount)}]})]}),t&&n&&(0,p.jsxs)(m.Z,{spacing:3.5,children:[(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(v.Z,{children:"Active Subscription"}),(0,p.jsx)(YB,{items:[{title:"Devices",value:(0,p.jsx)("span",{"data-testid":"subscriptionDetails_deviceCount",children:t.quantity})},{title:"Tier",value:(0,cd.Z)(t.tier)},{title:"Billing",value:(0,O.yV)(t.period,t.intervalCount)}]})]}),!u&&(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(v.Z,{color:"primary",children:"Pending Subscription"}),(0,p.jsx)(YB,{items:[{title:"Devices",value:(0,p.jsx)("span",{"data-testid":"subscriptionDetails_pendingDeviceCount",children:n.quantity})},{title:"Tier",value:(0,cd.Z)(n.tier)},{title:"Billing",value:(0,O.yV)(n.period,n.intervalCount)}]})]})]}),n&&(u?(0,p.jsx)(EW,{transitions:s,currentSummary:g,children:h}):(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(ui.Q,{withBackground:!0,withoutIcon:!0,children:(0,p.jsxs)(v.Z,{children:["Your new subscription will take effect on"," ",(0,M.rV)(n.periodStart),", the end of the current billing cycle. Your next payment of"," ",fe(n.price.totalPerPeriod)," ","will be billed on that day."]})}),h]}))]})})),MW="[email protected]";var kW=n(98018);const IW=(0,a.memo)((()=>{const e=(0,Le.W1)(),t=F(),n=U(),i=(0,d.GB)();return!e||t||!n||i?null:(0,p.jsxs)(m.Z,{"data-testid":"resoldRoomsBanner",sx:{paddingX:2,paddingTop:2,paddingBottom:2.5,marginBottom:2.5,border:"2px solid",borderColor:y.DG.primary[50],borderRadius:"8px",background:"linear-gradient(to top, ".concat(y.DG.white," 49%, ").concat(y.DG.purple[100]," 215%)")},children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(kW.Z,{sx:{color:"text.primary",fontSize:20}}),(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:"Get Rooms"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",marginTop:2,children:nB}),(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",marginTop:1.5,children:["Reach out to your reseller to add Rooms to your subscription. If you do not know your reseller or need help finding their contact information, please reach out to"," ",(0,p.jsx)(Kn.Z,{href:"mailto:".concat(MW),variant:"body2",children:MW})," ","for assistance."]})]})}));IW.displayName="SettingsResoldRoomsBanner";const AW=(0,a.memo)((()=>{const e=(0,d.kV)(),t=(0,d.mU)(),n=F(),i=null===t||void 0===t?void 0:t.currentPeriodEnd,r=i?(0,M.i$)(i,"MMMM D, YYYY"):void 0,l=(0,a.useMemo)((()=>{if(i)return(0,M.Qp)((0,M.UE)((0,M.Mn)(i).valueOf()))}),[i]),s=void 0!==l&&l>=0&&l<=30,c=(0,a.useMemo)((()=>{var i;return(0,o.compact)([t&&{id:"tier",label:"Subscription Tier",lines:(0,o.compact)([(0,o.capitalize)(t.tier),n&&"Rooms Add-on"])},{id:"licenses",label:"Device Licenses",lines:[e.unlimitedDevices?"Unlimited":null!==(i=e.numTotalDeviceLicenses)&&void 0!==i?i:0]},r&&{id:"renewalDate",label:"Renewal Date",lines:[r]}])}),[t,n,e,r]);return(0,p.jsxs)(m.Z,{marginTop:1,sx:{maxWidth:630},"data-testid":"subscriptionStatus_resold",children:[s&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.primary","data-testid":"subscriptionResold_renewalNotice",marginBottom:1,children:["Your subscription ends in ",l," ",1===l?"day":"days",", on ",r,". Reach out to your reseller before this date to renew your subscription. If you do not know your reseller, please reach out to"," ",(0,p.jsx)(Kn.Z,{href:"mailto:".concat(MW),variant:"body2",children:MW}),"."]}),(0,p.jsx)(IW,{}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(m.Z,{justifyContent:"center",sx:{height:58,paddingX:2.5,paddingTop:1.5,paddingBottom:.5,borderBottom:"2px solid",borderColor:"grey.400"},children:(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",children:"Subscription Details"})}),(0,o.map)(c,(e=>{const t=e.lines.length>1;return(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:t?"flex-start":"center",sx:{minHeight:58,paddingX:2.5,paddingY:t?2:1,borderBottom:"1px solid",borderColor:"grey.400"},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"text.primary",flex:1,children:e.label}),(0,p.jsx)(m.Z,{flex:1,alignItems:"flex-end","data-testid":"subscriptionResold_".concat(e.id),children:(0,o.map)(e.lines,((e,t)=>(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",textAlign:"right",children:e},t)))})]},e.id)}))]})]})}));
3AW.displayName="SettingsSubscriptionResoldDetails";const RW=(0,a.memo)((()=>{var e,t,n;const a=(0,d.kV)(),{subscription:r,subscriptionSchedule:l,pendingSubscriptionUpsert:s,pendingPaymentMethodDelete:c,pendingPaymentMethodCreate:u,pendingSubscriptionCancelResume:h,pendingOrganizationBillingUpdate:g,pendingUpcomingInvoice:C,pendingStripePaymentMethodCreate:x,upcomingInvoice:f}=vB(),b=oW(),y=ZB(),j=f?f.total:l?l.price.totalPerPeriod+(l.price.taxPerPeriod||0):((null===r||void 0===r?void 0:r.price.totalPerPeriod)||0)+((null===r||void 0===r?void 0:r.price.taxPerPeriod)||0),Z=null!==(e=null===f||void 0===f?void 0:f.paymentDate)&&void 0!==e?e:null===r||void 0===r?void 0:r.currentPeriodEnd,w=(0,d.GB)(),E=!(null===r||void 0===r||!r.cancelAt)&&r.cancelAt.seconds<=r.currentPeriodEnd.seconds,S=!!r&&(r.cancelAtPeriodEnd||E),D=w&&S,k=S&&!w&&!!y,I=S&&!w&&!y,A=(0,d.Ey)(),R=!C&&y&&!(null!==r&&void 0!==r&&r.cancelAtPeriodEnd)&&!E&&(0,o.isNumber)(j)&&Z;return s||c||u||h||x||g?(0,p.jsx)(i.Z,{flexGrow:1,paddingRight:3,marginRight:3,children:(0,p.jsx)(Rn.Z,{})}):(0,p.jsxs)(m.Z,{spacing:1,flexGrow:1,children:[w&&(0,p.jsxs)(m.Z,{"data-testid":"subscriptionStatus_trialRemaining",children:[(0,p.jsxs)(mf.h,{gutterBottom:!0,emphasisColor:"black",children:[(0,p.jsxs)("em",{children:[(0,ul.sr)(A,"day")," remaining"]})," on the free trial"]}),D&&(0,p.jsx)(v.Z,{color:"grey.700",variant:"subtitle2",children:"Upgrade to a subscription plan before the end of your trial so your account does not get locked. You will be billed at the end of the free trial and not at the time of purchase."})]}),k&&(0,p.jsx)(i.Z,{"data-testid":"subscriptionStatus_canceled",children:(0,p.jsx)(ui.Q,{withBackground:!0,children:(0,p.jsx)(m.Z,{spacing:1,children:(0,p.jsxs)(mf.h,{children:["You have canceled your subscription. You will lose access to the ManageXR platform on"," ",(0,p.jsx)("em",{children:(0,M.x1)(E&&null!==(t=r.cancelAt)&&void 0!==t?t:r.currentPeriodEnd)}),"."]})})})}),I&&(0,p.jsx)(ui.Q,{withBackground:!0,children:(0,p.jsx)(m.Z,{spacing:1,children:(0,p.jsxs)(mf.h,{children:["You have removed your payment method. Your subscription will end and you will lose access to the ManageXR platform on"," ",(0,p.jsx)("em",{children:(0,M.x1)(E&&null!==(n=r.cancelAt)&&void 0!==n?n:r.currentPeriodEnd)}),". To continue your subscription, enter a new payment method."]})})}),R&&(0,p.jsx)(i.Z,{"data-testid":"subscriptionStatus_nextPayment",children:(0,p.jsxs)(mf.h,{gutterBottom:!0,children:["Your next payment of ",(0,p.jsx)("em",{children:fe(j)})," will be billed on ",(0,p.jsx)("em",{children:(0,M.x1)(Z)})]})}),b.total>0&&!s&&(0,p.jsx)(ui.Q,{withBackground:!0,severity:"unpaid"===(null===r||void 0===r?void 0:r.status)?"error":"warning",children:(0,p.jsxs)(mf.h,{gutterBottom:!0,children:["You have"," ",(0,p.jsxs)("em",{children:[b.count," unpaid invoice",1!==b.count&&"s"]})," ",b.count>1?"totaling":"of"," ",(0,p.jsx)("em",{children:fe(b.total)}),".","incomplete_expired"===(null===r||void 0===r?void 0:r.status)&&" If you fail to pay, your account will be suspended.","unpaid"===(null===r||void 0===r?void 0:r.status)&&" You must pay ".concat(1!==b.count?"these invoices":"this invoice"," to continue using ManageXR.")]})}),r&&!a.defaultPaymentMethodRef&&("trialing"!==(null===r||void 0===r?void 0:r.status)||!(null!==r&&void 0!==r&&r.cancelAtPeriodEnd))&&(0,p.jsx)(ui.Q,{withBackground:!0,children:(0,p.jsxs)(mf.h,{gutterBottom:!0,children:["Please choose a ",(0,p.jsx)("em",{children:"default payment method"})," to enable automatic billing and ensure no disruption to your service","trialing"===(null===r||void 0===r?void 0:r.status)&&" after your trial ends"]})})]})})),TW=()=>{const e=(0,d.GB)(),t=(0,d.mU)();return(!t||e||"canceled"===t.status||"incomplete_expired"===t.status)&&(!t||!!t.cancelAtPeriodEnd)},PW=(0,a.memo)((e=>{let{sx:t}=e;const{pendingSubscriptionUpsert:n,resetSubscriptionSelection:i}=vB(),o=(0,l.TH)(),r=(0,l.k6)(),[s,d]=(0,a.useState)(!1);(0,a.useEffect)((()=>{const e=new URLSearchParams(o.search);"true"===e.get("startSubscription")&&(d(!0),e.delete("startSubscription"),r.replace({search:e.toString()}))}),[o.search,r]);const c=TW();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(zi.W,{privilege:"billing",children:(0,p.jsx)(C.Z,{"data-testid":"subscriptionAction_upsert",size:"small",variant:"contained",color:"primary",sx:t,disabled:n,onClick:()=>{c||i(),d(!0)},children:c?"Start a subscription":"Update subscription"})}),(0,p.jsx)(XB,{open:s,onClose:()=>d(!1)})]})}));var LW=n(39331);const NW=(0,a.memo)((()=>(0,Le.W1)()?(0,p.jsxs)(m.Z,{"data-testid":"roomsAddonHighlight",spacing:1,sx:{marginX:-4,marginBottom:-3,paddingX:4,paddingTop:2,paddingBottom:3,borderBottomLeftRadius:"6px",borderBottomRightRadius:"6px",background:"linear-gradient(to top, ".concat(y.DG.purple[50],", ").concat(y.DG.white,")")},children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,p.jsx)(i.Z,{sx:{width:20,height:20,backgroundColor:"text.primary",mask:"url(".concat(LW,") no-repeat center / contain"),WebkitMask:"url(".concat(LW,") no-repeat center / contain")}}),(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:"Rooms"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Add-on"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",children:nB})]}):null));NW.displayName="SettingsRoomsAddonHighlight";const UW=(0,a.memo)((e=>{let{isCurrentPlan:t,isSelected:n,isPremium:a,costPerDevice:r,tierFeatures:l,footer:s,onClick:d}=e;return(0,p.jsxs)(m.Z,{paddingX:4,paddingTop:4,paddingBottom:3,position:"relative",borderRadius:2,border:e=>"2px solid ".concat(n?e.palette.primary.main:"rgba(0, 0, 0, 0.04)"),width:300,sx:e=>({cursor:"pointer",...n?{}:{"&:hover":{borderColor:e.palette.primary.light}}}),onClick:d,children:[(t||a)&&(0,p.jsx)(i.Z,{display:"flex",position:"absolute",alignItems:"center",justifyContent:"center",width:1,marginX:-4,sx:{transform:"translateY(-150%)"},children:(0,p.jsx)(ke.Z,{color:"primary",label:(0,p.jsx)(v.Z,{variant:"overline",children:t?"Current Plan":"Most Popular"}),sx:{height:"unset"}})}),n&&(0,p.jsx)(Rh.Z,{sx:{position:"absolute",top:16,right:16,fontSize:"1.75rem"},color:"primary"}),(0,p.jsxs)(m.Z,{spacing:2,height:1,children:[(0,p.jsxs)(m.Z,{direction:"row",columnGap:1,alignItems:"baseline",children:[(0,p.jsx)(v.Z,{variant:"h4",color:"black",width:46,children:r}),(0,p.jsx)(v.Z,{variant:"body2",color:"grey.700",children:"/ device / month"})]}),(0,p.jsx)(m.Z,{spacing:.5,children:(0,o.map)(l,(e=>(0,p.jsx)(v.Z,{variant:"body2",color:"grey.700",children:e},e)))}),(0,p.jsx)(m.Z,{display:"flex",justifyContent:"flex-end",alignItems:"center",width:1,height:1,paddingTop:3,children:(0,p.jsx)(v.Z,{variant:"subtitle1",color:n?"primary":"grey.400",children:s})})]}),a&&(0,p.jsx)(NW,{})]})})),FW=(0,a.memo)((()=>{const{subscription:e,subscriptionSelection:t,subscriptionSelectionChanged:n,featureListsByTier:i}=vB(),o=null===e||void 0===e?void 0:e.tier,r=(0,a.useCallback)((()=>{const e=t.period===k.zF.Monthly?k.zF.Annually:k.zF.Monthly;n({period:e})}),[t.period,n]);return(0,p.jsxs)(m.Z,{spacing:2,justifyContent:"center",children:[(0,p.jsxs)(m.Z,{direction:"row",width:1,alignItems:"center",justifyContent:"center",spacing:1,children:[(0,p.jsx)(v.Z,{children:"Billed Monthly"}),(0,p.jsx)(ho.Z,{value:t.period===k.zF.Annually,onChange:r}),(0,p.jsx)(v.Z,{children:"Billed Yearly"})]}),(0,p.jsxs)(m.Z,{direction:"row",columnGap:2,justifyContent:"center",children:[(0,p.jsx)(UW,{costPerDevice:t.period===k.zF.Monthly?"$8":"$7",isCurrentPlan:o===k.QV.Essential,isSelected:t.tier===k.QV.Essential,footer:"Essential",tierFeatures:i.essential,onClick:()=>n({tier:k.QV.Essential})}),(0,p.jsx)(UW,{costPerDevice:t.period===k.zF.Monthly?"$12":"$10",isCurrentPlan:o===k.QV.Premium,isSelected:t.tier===k.QV.Premium,isPremium:!0,footer:"Premium",tierFeatures:i.premium,onClick:()=>n({tier:k.QV.Premium})})]}),(0,p.jsx)(m.Z,{alignItems:"center",paddingTop:2,children:(0,p.jsx)(PW,{sx:{paddingX:7,paddingY:1.45}})})]})})),OW=()=>{const e=(0,d.mU)(),t=(()=>{const{documents:e}=(0,E.D)(S.F.Invoices);return e})(),n=(0,o.isEmpty)(t),i=(0,o.every)(t,(e=>!0===e.isTrial));return!(e||!n&&!i)},_W=()=>{var e,t,n,o,r,l,s;const c=(0,d.kV)(),{subscription:u,subscriptionSchedule:h,stripeDiscountId:g,pendingSubscriptionUpsert:v}=vB(),{pending:C,request:x}=Yz(),f=(0,d.oW)(),[b,y]=(0,a.useState)(),j=(0,a.useMemo)((()=>h||u),[u,h]),Z=dB(null===j||void 0===j?void 0:j.items);(0,a.useEffect)((()=>
3{if(null===j||void 0===j||!j.tier||v)return;if(!(0,k.js)(j.tier))return void y(void 0);const e=new AbortController,t={tier:j.tier,quantity:j.quantity,period:j.period,addons:cB(Z),...null!==u&&void 0!==u&&u.id?{subscriptionId:u.id}:{}};return x({data:t,controller:e,onSuccess:e=>y(e)}),()=>e.abort()}),[x,null===u||void 0===u?void 0:u.id,null===f||void 0===f||null===(e=f.address)||void 0===e?void 0:e.country,null===f||void 0===f||null===(t=f.address)||void 0===t?void 0:t.postalCode,null===f||void 0===f||null===(n=f.address)||void 0===n?void 0:n.state,null===f||void 0===f||null===(o=f.address)||void 0===o?void 0:o.city,null===f||void 0===f||null===(r=f.address)||void 0===r?void 0:r.line1,null===f||void 0===f||null===(l=f.address)||void 0===l?void 0:l.line2,null===j||void 0===j?void 0:j.tier,null===j||void 0===j?void 0:j.quantity,null===j||void 0===j?void 0:j.period,Z,null===u||void 0===u?void 0:u.stripeDiscountId,g,v]);const[w,{height:E}]=Wm()(),S=TW(),D=(0,d.GB)(),M=OW(),I=!!u&&u.cancelAtPeriodEnd,A=!D&&!M||!(D&&I);return(0,d.P)(Sc.X.HIDE_PRICING)?(0,p.jsx)(lW,{usesMxrPartner:c.usesMxrPartner}):(0,p.jsxs)(m.Z,{flexWrap:"wrap",marginX:-2,children:[c.subscriptionTierOverride&&(0,p.jsx)(mW,{overrideTier:c.subscriptionTierOverride}),(0,p.jsxs)(m.Z,{flexGrow:1,spacing:2,margin:2,marginBottom:4,children:[(0,p.jsxs)(m.Z,{direction:"row",flexGrow:1,justifyContent:"space-between",spacing:4,children:[(0,p.jsx)(RW,{}),!S&&(0,p.jsxs)(i.Z,{children:[!(u&&u.cancelAtPeriodEnd)&&(0,p.jsx)(PW,{}),u&&u.cancelAtPeriodEnd&&(0,p.jsx)(aW,{})]})]}),S&&(0,p.jsx)(FW,{}),!u&&(0,p.jsx)(hW,{})]}),(0,p.jsxs)(m.Z,{margin:2,marginBottom:0,spacing:2,children:[!S&&(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(i.Z,{flexBasis:1,flexGrow:1,children:u?(0,p.jsx)(BB,{subscriptionPreview:b,fallbackValues:{tier:u.tier,period:u.period,quantity:null!==(s=u.quantity)&&void 0!==s?s:"--"},pendingTaxUpdate:C,pendingTotalPerPeriodUpdate:C}):void 0}),(0,p.jsxs)(m.Z,{flexBasis:1,flexGrow:1,spacing:2,children:[(0,p.jsx)(DW,{subscription:u,subscriptionSchedule:h}),(0,p.jsx)(JB,{})]})]}),A&&(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,marginTop:2,children:[(0,p.jsx)(m.Z,{flexBasis:1,flexGrow:1,children:(0,p.jsxs)(m.Z,{position:"relative",spacing:2,children:[(0,p.jsx)(CW,{}),(0,p.jsx)(eW,{}),w]})}),(0,p.jsx)(m.Z,{flexBasis:1,flexGrow:1,height:1,children:(0,p.jsx)(cW,{maxHeight:E})})]}),!(null!==u&&void 0!==u&&u.cancelAtPeriodEnd)&&(0,p.jsx)(aW,{})]})]})]})},zW=()=>{const e=(0,d.kV)(),t=(0,X.bo)(),n=(0,d.P)(Sc.X.HIDE_PRICING),o=(()=>{const e=(0,d.kV)(),t=(0,d.P)(Sc.X.HIDE_PRICING);return!!e.isResold&&!t})();return(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"baseline",children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Subscription"}),t&&e.stripeCustomerId&&(0,p.jsx)(li.Q,{href:ce(e.stripeCustomerId),variant:"caption",children:"Go to Stripe"})]}),!o&&(0,p.jsx)(i.Z,{children:(0,p.jsx)(rD.$,{noSubscriptionTierOverride:!n})})]}),o?(0,p.jsx)(AW,{}):(0,p.jsx)(gB,{children:(0,p.jsx)(_W,{})})]})},BW=(0,a.memo)((e=>{let{onClick:t}=e;const{privileges:n}=(0,w.P)();return n.organization?(0,p.jsx)(C.Z,{variant:"contained",color:"primary",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),onClick:t,children:"Add user"}):null})),WW=(0,da.Cl)(),VW=WW.accessor("name",{header:"Role Name",id:"name",cell:e=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,sx:{overflow:"hidden"},children:[e.row.original.isSystem&&(0,p.jsx)($u,{sx:{fontSize:16,color:"text.secondary",flexShrink:0}}),(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:e.getValue()})]}),size:300}),GW=WW.accessor("usersAssigned",{header:"Users Assigned to the Role",id:"usersAssigned",cell:e=>(0,p.jsx)(v.Z,{variant:"body2",children:e.getValue()}),size:200,enableGlobalFilter:!1}),HW=e=>e.isSystem,qW=["name","usersAssigned","actions"],YW=(0,a.memo)((e=>{let{onClickRole:t,onDeleteRole:n}=e;const{roles:r}=to(),[l,s]=(0,a.useState)(""),[d,c]=(0,a.useState)([]),u=((e,t,n)=>(0,a.useMemo)((()=>{const[i,a]=(0,o.partition)(e,n);if(0===t.length)return[...i,...a];const{id:r,desc:l}=t[0];return[...i,...(0,o.orderBy)(a,[r],[l?"desc":"asc"])]}),[e,t,n]))(r,d,HW),h=(0,a.useMemo)((()=>[VW,GW,...n?[WW.display({header:"",id:"actions",cell:e=>{const t=e.row.original;if(t.isSystem)return null;const o=t.usersAssigned>0;return(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"flex-end",width:1},children:(0,p.jsx)(Fi._,{tooltipText:"Roles with users assigned cannot be deleted",hideTooltip:!o,children:(0,p.jsx)(i.Z,{component:"span",sx:o?{cursor:"not-allowed","& > *":{pointerEvents:"none"}}:void 0,children:(0,p.jsx)(x.Z,{disabled:o,"aria-label":"Delete role",onClick:e=>{e.stopPropagation(),n(t)},children:(0,p.jsx)(Gl.Z,{})})})})})},size:50})]:[]]),[n]),g=(0,sa.b7)({columns:h,data:u,state:{globalFilter:l,sorting:d},onSortingChange:c,manualSorting:!0,getCoreRowModel:(0,da.sC)(),getFilteredRowModel:(0,da.vL)()}),v=g.getRowModel().rows,C=(0,a.useCallback)((e=>{let{key:n,index:i,style:o,registerChild:a}=e;const r=v[i],l=t?()=>t(r.original):void 0;return(0,p.jsx)(th.J,{style:o,ref:a,row:r,flexColumnIds:qW,onClick:l,sx:{cursor:l?"pointer":"default","&:hover":l?{bgcolor:"action.hover"}:void 0}},n)}),[v,t]);return(0,p.jsxs)(m.Z,{spacing:"18px",children:[(0,p.jsx)(xu,{value:l,onCh
3ange:s,TextFieldProps:{placeholder:"Filter roles by name"}}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(eh.K,{table:g,flexColumnIds:qW}),(0,p.jsx)(nh.g,{useLegacyTableRows:!0,table:g,rowHeight:54,height:"window",flexColumnIds:qW,emptyMessage:"No matching roles",renderRow:C})]})]})}));YW.displayName="SettingsRolesTable";var KW=n(49342),XW=n(66363);const QW=()=>{const{organizationId:e}=(0,w.P)(),{notify:t}=(0,ie.o)(),[n,i]=(0,a.useState)(!1),o=(0,a.useCallback)((async()=>{i(!0);try{const{result:t}=await(0,Fe.F2)({organizationId:e});(0,di.KG)({name:"ManageXR Users - ".concat((0,M.aH)(Date.now()),".csv"),type:"text/csv",content:t,settings:{withByteOrderMark:!0}})}catch(n){t({severity:"error",message:"Failed to export users"}),(0,Si.yR)(n,{name:"download users csv error"})}finally{i(!1)}}),[t,e]);return(0,p.jsx)(ee.Z,{title:"Download users list as .csv",placement:"top",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{onClick:o,disabled:n,children:n?(0,p.jsx)(Zi.Z,{size:24}):(0,p.jsx)(wi.Z,{})})})})},JW=(0,da.Cl)(),$W=(0,a.memo)((e=>{let{onEditUser:t,editPending:n}=e;const i=(0,u.I0)(),{notifyThunkResult:r}=(0,ie.o)(),{user:l,organizationId:s,privileges:h,role:g}=(0,w.P)(),{organization:C}=(0,d.mP)(),{userPrivileges:f,roles:b,getRoleName:y}=to(),[j,Z]=(0,a.useState)([]),E=(0,a.useMemo)((()=>b.map((e=>({id:e.id,title:e.name})))),[b]),S=(0,a.useMemo)((()=>{if(0===j.length)return f;const e=new Set(j);return f.filter((t=>{var n;const i=null!==(n=t.userRoleId)&&void 0!==n?n:t.role;return e.has(i)}))}),[f,j]),D=(0,a.useCallback)((async e=>{const t=await i((0,Uw.AV)({userId:e.userRef.id,organizationId:s}));r({result:t,success:{message:"User removed"},error:{message:"Error removing user"}})}),[i,r,s]),M=(0,a.useCallback)((e=>{var t;return e.userRef.id===l.id?"Are you sure you want to remove yourself from ".concat(C.name,"?"):"Are you sure you want to remove ".concat(null!==(t=e.userProfile.name)&&void 0!==t?t:e.userProfile.email," from ").concat(C.name,"?")}),[C.name,l.id]),{trigger:k,props:I}=Bn({onConfirm:D,title:"Remove User",confirmLabel:"Remove",getMessage:M}),A=(0,a.useMemo)((()=>{const e=[JW.accessor((e=>{var t;return(0,o.toLower)(null!==(t=e.userProfile.name)&&void 0!==t?t:"zz")}),{header:"Name",id:"name",cell:e=>{var t;return(0,p.jsx)(v.Z,{variant:"body2",color:e.row.original.userProfile.name?"textPrimary":"textSecondary",children:e.row.original.userProfile.claimed?null!==(t=e.row.original.userProfile.name)&&void 0!==t?t:"Unnamed":(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",gap:1,children:[(0,p.jsx)(ee.Z,{title:"This user still needs to accept the email invite to join this organization. They should check for an email from ".concat(Be.jO,"."),placement:"top-start",children:(0,p.jsx)(v.Z,{component:"span",variant:"body2",color:"textSecondary",children:"Pending User"})}),e.row.original.userProfile.signUpKeyId&&(0,p.jsx)(ae,{value:window.location.origin+(0,c.LT)(c._j.auth.signUp,void 0,{key:e.row.original.userProfile.signUpKeyId}),children:(0,p.jsxs)(Kn.Z,{underline:"hover",sx:{display:"inline-flex",gap:.5,color:"primary.main"},children:["Invite link",(0,p.jsx)(KS.Z,{fontSize:"small",color:"primary"})]})})]})})},size:250,sortingFn:da.V2.text}),JW.accessor((e=>(0,o.toLower)(e.userProfile.email)),{header:"Email",id:"email",cell:e=>(0,p.jsx)(Ui.G,{variant:"body2",title:e.getValue(),children:e.getValue()}),size:250,sortingFn:da.V2.text}),JW.accessor((e=>{const t=(0,o.indexOf)((0,o.values)(pe.Z),e.role);return"".concat(String(t).padStart(2,"0"),"-").concat((0,o.toLower)(y(e)))}),{header:"Role",id:"role",cell:e=>!h.organization||e.row.original.role===pe.Z.Owner&&g!==pe.Z.Owner?(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,title:y(e.row.original),children:y(e.row.original)}):(0,p.jsx)(Kn.Z,{component:"button",variant:"body2",noWrap:!0,title:y(e.row.original),onClick:()=>null===t||void 0===t?void 0:t(e.row.original),disabled:n,sx:{color:"primary.main",display:"block"},children:y(e.row.original)}),enableGlobalFilter:!1,size:150,sortingFn:da.V2.text})];return h.organization&&(C.forceMfa&&e.push(JW.display({header:()=>(0,p.jsx)(KW.Z,{}),id:"mfaStatus",cell:e=>(0,p.jsx)(ee.Z,{title:e.row.original.userProfile.mfaEnabled?"2-Step Auth ON":"2-Step Auth OFF",placement:"bottom-start",followCursor:!0,children:e.row.original.userProfile.mfaEnabled?(0,p.jsx)(bL.Z,{sx:{color:"primary.main"}}):(0,p.jsx)(XW.Z,{sx:{color:"grey.400"}})}),size:120})),e.push(JW.display({header:"",id:"remove",cell:e=>(0,p.jsx)(x.Z,{onClick:()=>k(e.row.original),children:(0,p.jsx)(bu.Z,{})}),size:50}))),e}),[n,y,t,C.forceMfa,h.organization,g,k]),[R,T,P]=(0,zn.G)("",100),L=(0,sa.b7)({columns:A,data:S,initialState:{sorting:[{id:"name",desc:!1}]},state:{globalFilter:T},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getFilteredRowModel:(0,da.vL)(),getSortedRowModel:(0,da.tj)()});return(0,p.jsxs)(m.Z,{spacing:"18px",children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"center",children:[(0,p.jsx)(xu,{value:R,onChange:P,TextFieldProps:{placeholder:"Filter users by name or email"},sx:{flex:1}}),(0,p.jsx)(pl,{label:"Role",values:j,options:E,onChange:Z,checklist:!0,sx:{"& .MuiChip-root":{borderRadius:"4px",height:40,borderColor:"grey.500",justifyContent:"flex-start"}}}),(0,p.jsx)(QW,{})]}),(0,p.jsx)(dc.A,{table:L,rowHeight:54,emptyMessage:"No matching users",flexColumnIds:["email","role"]}),(0,p.jsx)(Fn,{...I})]})})),eV="__all_configurations__",tV=(0,a.memo)((e=>{let{configurationsFullAccess:t,approvedConfigurationIds:n,onChange:i,disabled:o,hideSelector:r}=e;const{documents:l}=(0,E.D)(S.F.Configurations),{multiSelectOptions:s,allMultiSelectOption:d,deviceCountMap:c,totalDeviceCount:u}=(0,a.useMemo)((()=>{const e=[...l].sort(ze.gt),t=new Map;let n=0;return{multiSelectOptions:e.map((e=>{var i;const o=null!==(i=e.deviceCount)&&void 0!==i?i:0;return t.set(e.id,o),n+=o,{id:e.id,title:e.name,subtitle:(0,ul.sr)(o,"device")}})),allMultiSelectOption:{id:eV,title:"All Configurations",subtitle:(0,ul.sr)(n,"device")},deviceCountMap:t,totalDeviceCount:n}}),[l]),h=(0,a.useMemo)((()=>t?[eV]:n.filter((e=>c.has(e)))),[t,n,c]),g=(0,a.useMemo)((()=>t?u:h.reduce(((e,t)=>{var n;return e+(null!==(n=c.get(t))&&void 0!==n?n:0)}),0)),[t,u,c,h]),C=t?c.size:h.length,x=(0,a.useCallback)((e=>{e.includes(eV)?i(!0,[]):i(!1,e)}),[i]),f=t?"This role can access all configurations (".concat((0,ul.sr)(u,"Device"),")"):"This role can access ".concat((0,ul.sr)(C,"configuration")," (").concat((0,ul.sr)(g,"Device"),")");return(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Configuration and Device Access"}),(0,p.jsx)(Fi._,{tooltipText:"Access to devices will change when a configuration changes",children:(0,p.jsx)(cc.Z,{fontSize:"small",color:"action",sx:{cursor:"help"}})})]}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.primary",children:f}),!r&&(0,p.jsx)(pl,{label:"Accessible Configurations",placeholder:"Select configurations",values:h,options:s,onChange:x,shouldShowIndividualChips:!0,allOption:d,disabled:o})]})}));tV.displayName="SettingsConfigurationSelector";const nV=(0,a.memo)((e=>{var t;let{dialog:n,onClose:r,onRoleCreated:l}=e;const{notify:s,confirm:d}=(0,ie.o)(),{userRoleId:c}=(0,w.P)(),u=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"user-roles",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.UserRoles,id:t.id,set:t}}})),[])),h=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"user-roles/:userRoleId"})),[])),g="edit"===n.type,x="view"===n.type,f="closed"!==n.type,b=Be.vc.organizationUsers.privilegesForRole[pe.Z.Custom],{register:y,handleSubmit:j,reset:Z,setError:E,formState:D,watch:M,setValue:k,getValues:I}=(0,fg.cI)({mode:"onTouched",defaultValues:{name:"",configurationsFullAccess:!0,approvedConfigurationIds:[],privileges:b}});(0,a.useEffect)((()=>{var e,t;f&&Z(n.role?{name:n.role.name,configurationsFullAccess:null===(e=n.role.configurationsFullAccess)||void 0===e||e,approvedConfigurationIds:null!==(t=n.role.approvedConfigurationIds)&&void 0!==t?t:[],privileges:n.role.privileges}
3:{name:"",configurationsFullAccess:!0,approvedConfigurationIds:[],privileges:b})}),[f,n.role,Z,b]);const A=M("configurationsFullAccess"),R=M("approvedConfigurationIds"),T=(0,a.useCallback)(((e,t)=>{k("configurationsFullAccess",e),k("approvedConfigurationIds",t);const n=I("privileges");e||0!==t.length?!e&&t.length>0&&n[pe.e.Organization]&&k("privileges",{...n,[pe.e.Organization]:!1}):k("privileges",{...n,[pe.e.Devices]:!1,[pe.e.Configurations]:!1,[pe.e.Organization]:!1,[pe.e.Billing]:!1})}),[k,I]),P=M("privileges"),L=(0,a.useMemo)((()=>x?[]:A||0!==R.length?A?[]:[pe.e.Organization]:[pe.e.Devices,pe.e.Configurations,pe.e.Organization,pe.e.Billing]),[x,A,R.length]),N=(0,a.useCallback)(((e,t)=>{const n=I("privileges");k("privileges",{...n,[e]:t})}),[k,I]),U=(0,a.useCallback)((async e=>{try{if(g&&n.role){const t=e.name!==n.role.name;await h.requestAsync({params:{userRoleId:n.role.id},data:{...t?{name:e.name}:{},privileges:e.privileges,configurationsFullAccess:e.configurationsFullAccess,approvedConfigurationIds:e.approvedConfigurationIds},successMessage:"Role updated"})}else{const t=await u.requestAsync({data:{name:e.name,privileges:e.privileges,configurationsFullAccess:e.configurationsFullAccess,approvedConfigurationIds:e.approvedConfigurationIds},successMessage:"Role created"});null!==t&&void 0!==t&&t.id?null===l||void 0===l||l(t.id):l&&(0,OD.Tb)(new Error("postUserRole returned no id for role auto-selection"))}r()}catch(i){const e=(0,Fe.tf)(i);var t;if(null!==e&&void 0!==e&&e.message.includes("already exists"))E("name",{message:e.message});else s({severity:"error",message:null!==(t=null===e||void 0===e?void 0:e.message)&&void 0!==t?t:"Something went wrong"})}}),[g,n.role,r,l,s,h,u,E]),F=(0,a.useCallback)((e=>{var t,i,a;if(!(g&&(null===(t=n.role)||void 0===t?void 0:t.id)===c))return U(e);const r=(0,o.compact)([(null===(i=n.role)||void 0===i?void 0:i.privileges.organization)&&!e.privileges.organization&&"Organization management",(null===(a=n.role)||void 0===a?void 0:a.privileges.billing)&&!e.privileges.billing&&"Billing management"]);if(0===r.length)return U(e);d({message:"You are assigned to this role. Saving will remove your ".concat(r.join(" and ")," access. Are you sure?"),confirmLabel:"Save",onConfirm:()=>U(e)})}),[g,n.role,c,d,U]),O=x?n.role.isSystem?"View System Role":"View Custom Role":g?"Edit Custom Role":"Add a Custom Role",_=M("name"),z=x?"div":"form",B=x?{}:{onSubmit:j(F),noValidate:!0,autoComplete:"off"};return(0,p.jsxs)(kn.Z,{open:f,onClose:r,fullWidth:!0,maxWidth:"sm",disableScrollLock:!0,disableRestoreFocus:!0,"data-testid":"roleDialog",children:[(0,p.jsx)(In.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",justifyContent:"space-between",children:[(0,p.jsx)("span",{children:O}),("edit"===n.type||"view"===n.type)&&!n.role.isSystem&&n.role.usersAssigned>0&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:[n.role.usersAssigned," ",1===n.role.usersAssigned?"user is":"users are"," ","assigned to this role"]})]})}),(0,p.jsxs)(z,{...B,children:[(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[x&&n.role.isSystem?(0,p.jsx)(Ln.Z,{label:"Role Name",value:"".concat(n.role.name," (System)"),fullWidth:!0,disabled:!0,InputProps:{startAdornment:(0,p.jsx)(mo.Z,{position:"start",children:(0,p.jsx)(uh.Z,{sx:{fontSize:20,color:"text.secondary"}})})},sx:{"& .MuiOutlinedInput-notchedOutline":{borderStyle:"dashed"}}}):x?(0,p.jsx)(Ln.Z,{label:"Role Name",value:n.role.name,fullWidth:!0,disabled:!0}):(0,p.jsx)(Ln.Z,{"data-testid":"roleDialog_nameInput",label:"Role Name",fullWidth:!0,autoFocus:!0,helperText:(null===(t=D.errors.name)||void 0===t?void 0:t.message)||(0,p.jsx)(i.Z,{component:"span",minHeight:"1.2em",display:"block"}),error:!!D.errors.name,disabled:D.isSubmitting,...y("name",{validate:e=>e.trim().length>0||"Role name is required",setValueAs:e=>e.trim()})}),(0,p.jsx)(tV,{configurationsFullAccess:A,approvedConfigurationIds:R,onChange:T,disabled:x||D.isSubmitting,hideSelector:x&&n.role.isSystem}),(0,p.jsx)(WS,{privileges:x?n.role.privileges:P,readOnly:x,disabled:!x&&D.isSubmitting,disabledPrivileges:L,onPrivilegeChange:x?void 0:N})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:r,disabled:D.isSubmitting,children:"Close"}),!x&&(0,p.jsx)(Un.U,{icon:g?void 0:(0,p.jsx)(Wn.Z,{}),submitting:D.isSubmitting,disabled:!(null!==_&&void 0!==_&&_.trim()),children:g?"Save":"Add role"})]})]})]})}));nV.displayName="SettingsDialogRole";const iV={type:"closed"},oV=(0,a.memo)((()=>{const e=(0,Le.ye)("enableCustomUserRoles"),t=(0,u.I0)(),n=(0,l.k6)(),o=(0,l.TH)(),{organizationId:r,privileges:s}=(0,w.P)(),{confirm:d,notifyThunkResult:c}=(0,ie.o)(),h=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"user-roles/:userRoleId",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.UserRoles,id:null===t||void 0===t?void 0:t.userRoleId,remove:!0}}})),[])),[g,x]=(0,a.useState)("users"),[f,b]=(0,a.useState)(iV),y=(0,a.useRef)(null),[j,Z]=(0,a.useState)(!1),[E,D]=(0,a.useState)(!1),[M,k]=(0,a.useState)(""),[I,A]=(0,a.useState)(!1);(0,a.useEffect)((()=>{const e=new URLSearchParams(o.search);"create"===e.get("action")&&(D(!0),Z(!0),e.delete("action"),n.replace({pathname:o.pathname,search:e.toString()}))}),[n,o.pathname,o.search]);const R=(0,a.useCallback)((()=>{D(!1),Z(!0)}),[]),T=(0,a.useCallback)((()=>{Z(!1),D(!1),y.current=null}),[]),P=Ow((0,a.useCallback)((e=>{k(e),Z(!1),A(!0)}),[])),L=(0,a.useCallback)((()=>{A(!1)}),[]),N=(0,a.useCallback)((()=>{A(!1),D(!1),Z(!0)}),[]),[U,F]=(0,a.useState)(),[O,_]=(0,a.useState)(!1),z=(0,u.v9)((e=>e.organizationUsers.editPending)),B=(0,a.useCallback)((e=>{F(e),_(!0)}),[]),W=(0,a.useCallback)((()=>{_(!1),y.current=null}),[]),V=(0,a.useCallback)((async e=>{if(!U)return;const n=await t((0,Uw.fN)({organizationId:r,userId:U.userRef.id,...e}));c({result:n,success:{message:"User updated"},error:{message:"Error updating user"}}),"fulfilled"===n.meta.requestStatus&&_(!1)}),[t,U,c,r]),G=(0,a.useCallback)((e=>{d({message:'Are you sure you want to delete "'.concat(e.name,'"?'),confirmLabel:"Delete",onConfirm:()=>{h.request({params:{userRoleId:e.id},successMessage:"Role deleted",errorMessage:"Failed to delete role"})}})}),[d,h]),H=(0,a.useCallback)((e=>b(e.isSystem||!s.organization?{type:"view",role:e}:{type:"edit",role:e})),[s.organization]),q=(0,a.useCallback)((e=>{y.current=e,b({type:"add"})}),[]),Y=(0,a.useCallback)((()=>{y.current=null,b(iV)}),[]),K=(0,a.useCallback)((e=>{var t;null===(t=y.current)||void 0===t||t.call(y,e),y.current=null}),[]),X=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(YS,{open:j,onClose:T,onSubmit:P,onAddRole:e?q:void 0,defaultRole:E?pe.Z.Manager:void 0,defaultPrivileges:E?Fw:void 0,defaultRoleId:E?pe.Z.Manager:pe.Z.Viewer}),(0,p.jsx)(YS,{open:O,onClose:W,onSubmit:V,editing:U,onAddRole:e?q:void 0,defaultRoleId:pe.Z.Viewer}),(0,p.jsx)(QS,{open:I,onClose:L,onAddAnother:N,signUpKeyId:M})]});return e?(0,p.jsxs)(Sn.ZP,{value:g,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[(0,p.jsxs)(Gn.Z,{onChange:(e,t)=>
3x(t),"aria-label":"users and roles tabs",children:[(0,p.jsx)(Yn.Z,{value:"users",label:"Users",sx:{textTransform:"none",paddingX:8,minWidth:"unset"}}),(0,p.jsx)(Yn.Z,{value:"roles",label:"Roles",sx:{textTransform:"none",paddingX:8,minWidth:"unset"}})]}),(0,p.jsxs)(i.Z,{children:["users"===g&&(0,p.jsx)(BW,{onClick:R}),"roles"===g&&s.organization&&(0,p.jsx)(C.Z,{"data-testid":"addRoleButton",variant:"contained",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),onClick:()=>b({type:"add"}),children:"Add role"})]})]}),(0,p.jsx)(Dn.Z,{value:"users",sx:{paddingX:0,paddingY:3},children:(0,p.jsx)($W,{onEditUser:B,editPending:z})}),(0,p.jsx)(Dn.Z,{value:"roles",sx:{paddingX:0,paddingY:3},children:(0,p.jsx)(YW,{onClickRole:H,onDeleteRole:s.organization?G:void 0})}),X,(0,p.jsx)(nV,{dialog:f,onClose:Y,onRoleCreated:K})]}):(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Users"}),(0,p.jsx)(BW,{onClick:R})]}),(0,p.jsx)($W,{onEditUser:B,editPending:z}),X]})}));let aV;oV.displayName="SettingsOrganizationUsersPage",function(e){e.WorkOS="workos",e.Firebase="firebase",e.Google="google",e.Microsoft="microsoft"}(aV||(aV={}));var rV=n(44702),lV=n(1189);const sV=["auth/email-already-exists","auth/email-already-in-use"],dV={"auth/invalid-credential":{field:"password",message:"The password you entered is incorrect."},"auth/wrong-password":{field:"password",message:"The password you entered is incorrect."},"auth/invalid-email":{field:"email",message:"The email address is badly formatted."},"auth/invalid-new-email":{field:"email",message:"The email address is badly formatted."},"auth/missing-new-email":{field:"email",message:"Please enter a new email address."},"auth/requires-recent-login":{field:"password",message:"For your security, please sign out and sign back in before changing your email."},"auth/user-mismatch":{field:"password",message:"These credentials do not match the signed-in account."},"auth/user-disabled":{field:"email",message:"This account has been disabled. Please contact [email protected]."},"auth/too-many-requests":{field:"password",message:"Too many attempts. Please wait a few minutes and try again."},"auth/network-request-failed":{field:"password",message:"Network error. Please check your connection and try again."},"auth/operation-not-allowed":{field:"email",message:"Email changes are not allowed for this account. Please contact [email protected]."}},cV=(0,a.memo)((e=>{var t,n;let{onCancel:i}=e;const{notify:r}=(0,ie.o)(),{authUser:l}=(0,X.Eu)(),{register:s,handleSubmit:d,watch:c,setError:u,formState:h,reset:g}=(0,fg.cI)({reValidateMode:"onSubmit"}),v=c("password"),x=c("email"),[f,b]=(0,a.useState)(),y=d((async e=>{let{email:t,password:n}=e;try{if(!l.email)return;b(t);const e=lV.w9.credential(l.email,n);await(0,lV.aF)(l,e),await(0,lV.Ov)(l,t),g()}catch(i){if(!(i instanceof rV.ZR))return(0,Si.yR)(i,{name:"firebase change email"}),void r({severity:"error",message:"Failed to update email"});if((0,o.includes)(sV,i.code))return;if("auth/internal-error"===i.code){let e;try{e=JSON.parse(i.message)}catch{e=void 0}if("INVALID_NEW_EMAIL"===(0,o.get)(e,["error","message"]))return void u("email",{message:"The email address is badly formatted."})}const e=(0,o.get)(dV,i.code);if(e)return void u(e.field,{message:e.message,type:"firebase"});(0,Si.yR)(i,{name:"firebase change email"}),r({severity:"error",message:"Failed to update email"})}}));return(0,p.jsx)("form",{onSubmit:y,noValidate:!0,children:(0,p.jsxs)(m.Z,{spacing:2,paddingTop:1,children:[!h.isSubmitSuccessful&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ln.Z,{type:"email",label:"New Email",placeholder:"[email protected]",helperText:null===(t=h.errors.email)||void 0===t?void 0:t.message,error:!!h.errors.email,disabled:h.isSubmitting,fullWidth:!0,...s("email",NS.LV)}),(0,p.jsx)(Ln.Z,{type:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",helperText:null===(n=h.errors.password)||void 0===n?void 0:n.message,error:!!h.errors.password,disabled:h.isSubmitting,fullWidth:!0,...s("password",{required:"Please enter your password"})}),(0,p.jsxs)(m.Z,{direction:"row",width:1,justifyContent:"space-between",children:[(0,p.jsx)(C.Z,{onClick:i,children:"Cancel"}),(0,p.jsx)(Un.U,{disabled:!(v&&x),submitting:h.isSubmitting,iconPlacement:"end",children:"Update Email"})]})]}),h.isSubmitSuccessful&&(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(mf.h,{children:["If the email address ",(0,p.jsx)("em",{children:f})," is available, we'll send you an email. To confirm the change, please click the link in the email."]}),(0,p.jsx)(C.Z,{onClick:i,variant:"contained",sx:{alignSelf:"flex-end"},children:"Close"})]})]})})})),uV=(0,a.memo)((e=>{let{open:t,onClose:n}=e;return(0,p.jsxs)(kn.Z,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:[(0,p.jsx)(In.Z,{children:"Change Email Address"}),(0,p.jsx)(An.Z,{children:(0,p.jsx)(cV,{onCancel:n})})]})})),pV=(0,a.memo)((()=>{const{authUser:e}=(0,X.Eu)(),[t,n]=(0,a.useState)(!1);return(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",spacing:2,height:60,children:[(0,p.jsx)(i.Z,{minWidth:140,children:(0,p.jsx)(v.Z,{variant:"subtitle1",sx:{color:"grey.700"},children:"Email"})}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:2,children:[(0,p.jsx)(v.Z,{sx:{color:"grey.700"},children:e.email}),(0,p.jsx)(C.Z,{color:"primary",size:"small",onClick:()=>n(!0),children:"Change email"}),(0,p.jsx)(uV,{open:t,onClose:()=>n(!1)})]})]})}));var hV=n(31014),mV=n(23736),gV=n(73642);const vV=e=>{var t;let{onAuthenticated:n,onClose:i}=e;const{notify:r}=(0,ie.o)(),{register:l,formState:s,watch:d,handleSubmit:c,setError:u}=(0,fg.cI)({reValidateMode:"onChange"}),h=d("currentPassword"),{authUser:g}=(0,X.Eu)(),C=(0,o.map)(g.providerData,(e=>e.providerId.replace(/.com/g,""))),x=(0,o.filter)(C,(e=>"password"!==e)),[f,b]=(0,a.useState)(),y=c((async e=>{let{currentPassword:t}=e;const a=Os.lX.currentUser;if(null===a||void 0===a||!a.email)return;const l=lV.w9.credential(a.email,t);await(0,lV.aF)(a,l).then((async()=>{await n()})).catch((e=>{if("auth/multi-factor-auth-required"===e.code)b(e);
3else{const t={"auth/too-many-requests":"Access to this account has been temporarily disabled because of many failed log-in attempts. You can immediately restore it by resetting your password or you can try again later","auth/wrong-password":"Incorrect password. Please try again"},n=(0,o.get)(t,e.code);n?u("currentPassword",{message:n}):((0,Si.yR)(e,{name:"Failed to re-authenticate."}),r({severity:"error",message:"Failed to re-authenticate."}),i())}}))}));return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{spacing:2,marginTop:1,children:[(0,o.includes)(C,"password")&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("form",{onSubmit:y,noValidate:!0,children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Ln.Z,{type:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",helperText:null===(t=s.errors.currentPassword)||void 0===t?void 0:t.message,error:!!s.errors.currentPassword,disabled:s.isSubmitting,fullWidth:!0,...l("currentPassword",{required:"Please enter your password"})}),(0,p.jsx)(Un.U,{disabled:!h,submitting:s.isSubmitting,iconPlacement:"end",sx:{height:1},children:"Next"})]})}),x.length>0&&(0,p.jsx)(Ie.Z,{sx:{margin:"8px 0"},children:(0,p.jsx)(v.Z,{variant:"body2",children:"or"})})]}),x.length>0&&(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(m.Z,{spacing:2,alignItems:(0,o.includes)(C,"password")?"center":"flex-start",children:[(0,o.includes)(C,"google")&&(0,p.jsx)(gV.H,{providerType:"google",mode:"reauthenticate",onSuccess:n,onClose:i}),(0,o.includes)(C,"microsoft")&&(0,p.jsx)(gV.H,{providerType:"microsoft",mode:"reauthenticate",onSuccess:n,onClose:i})]})})]}),f&&(0,p.jsx)(mV.A,{mfaError:f,onAuthenticated:n,onClose:i,clearMfaError:()=>b(void 0)})]})},CV=e=>{let{open:t,onClose:n,onSuccess:i,message:a,cancelLabel:r="Cancel",title:l}=e;return(0,p.jsxs)(kn.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:"xs",children:[l&&(0,p.jsx)(In.Z,{children:l}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[a&&(0,o.castArray)(a).map(((e,t)=>(0,p.jsx)(v.Z,{variant:"body1",children:e},t))),(0,p.jsx)(vV,{onAuthenticated:async()=>{await i()},onClose:n})]})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsx)(C.Z,{onClick:n,variant:"text",children:r})})]})};var xV=n(39778),fV=n(14181),bV=n(93818);const yV=e=>{let{newTotpFactorAllowed:t,onModeSelect:n,onClose:i}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(v.Z,{variant:"h6",color:"text.primary",children:"Select an authentication method"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,color:y.DG.grey[300],children:[(0,p.jsx)(jV,{Icon:fV.Z,label:"Authenticator App",onClick:()=>n("totp"),disabledWithTooltip:t?void 0:xV.vB}),(0,p.jsx)(jV,{Icon:bV.Z,label:"Text Message",onClick:()=>n("phone")})]})]})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsx)(C.Z,{variant:"contained",onClick:i,children:"Cancel"})})]})},jV=e=>{let{Icon:t,label:n,onClick:o,disabledWithTooltip:a}=e;const r=!!a;return(0,p.jsx)(ee.Z,{title:null!==a&&void 0!==a?a:"",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(i.Z,{flexGrow:1,flexBasis:0,children:(0,p.jsx)(C.Z,{onClick:o,variant:"outlined",color:"inherit",disabled:r,sx:{width:"100%",height:135,textTransform:"none"},children:(0,p.jsxs)(m.Z,{spacing:3,alignItems:"center",children:[(0,p.jsx)(t,{sx:{color:y.DG.grey[400],fontSize:40}}),(0,p.jsx)(v.Z,{variant:"body2",color:r?"text.disabled":"text.primary",children:n})]})})})})};var ZV=n(85338),wV=n(31424);n(57781);const EV=(0,a.forwardRef)(((e,t)=>(0,p.jsx)(Ln.Z,{...e,autoFocus:!0,fullWidth:!0,label:"Phone Number",name:"phoneNumber",inputRef:t,type:"tel"}))),SV=150,DV=(0,a.createContext)(void 0),MV=()=>{const e=(0,a.useContext)(DV);if(!e)throw new Error("useMfaSetupContext must be used within a SettingsDialogMfaSetupContextProvider");return e},kV=e=>{let{children:t}=e;const{authUser:n}=(0,X.Eu)(),i=(0,hV.g)(),{notify:r}=(0,ie.o)(),[l,s]=(0,a.useState)();(0,a.useEffect)((()=>{(0,lV.JG)(n).getSession().then(s)}),[n]);const d=(0,a.useCallback)((async(e,t)=>{try{return await(0,lV.JG)(n).enroll(e,t),await i.request({params:{userId:n.uid},errorMessage:"Error registering 2-Step Authentication method",successMessage:"2-Step Authentication method registered"}),{status:"success"}}catch(a){const t=a,n="phone"===e.factorId?xV.u2:xV.vs,i=(0,o.get)(n,t.code);return i?{status:"retry",message:i}:(r({message:"Oops, something went wrong",severity:"error"}),(0,Si.yR)(a,{name:"Error verifying authentication method during 2-step auth setup",contexts:{factorInfo:{type:e.factorId}}}),{status:"error"})}}),[i,n,r]);return l?(0,p.jsx)(DV.Provider,{value:{multiFactorSession:l,enrollFactor:d},children:t}):(0,p.jsx)(Rn.Z,{})};DV.displayName="MfaSetupContext",kV.displayName="MfaSetupProvider";const IV=e=>{let{onSuccess:t,onClose:n,phoneAuthProvider:a}=e;const{multiFactorSession:r}=MV(),{notify:l}=(0,ie.o)(),{control:s,handleSubmit:d,setError:c,formState:u,reset:h}=(0,fg.cI)({reValidateMode:"onChange"}),g=()=>{h(),n()},x=d((async e=>{let{phone:n}=e;try{if(!n)return;const e=Os.lX.currentUser;if(null===e||void 0===e||!e.email)return;const i={phoneNumber:n,session:r},o=await a.verifyPhoneNumber(i,Os.$O);t(n,o)}catch(i){const e={"auth/second-factor-already-in-use":"Phone number is already enrolled for 2-Step Auth on this account.","auth/invalid-phone-number":"Please enter a valid phone number."},t=(0,o.get)(e,i.code);t?c("phone",{message:t}):(g(),l({message:"Oops, something went wrong",severity:"error"}),(0,Si.yR)(i,{name:"Error designating phone number for 2-step auth setup"}))}}));return(0,p.jsxs)("form",{onSubmit:x,children:[(0,p.jsx)(An.Z,{sx:{minHeight:SV},children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body1",children:"Add a number to use for 2-Step Authentication"}),(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(m.Z,{direction:"row",children:(0,p.jsx)(wV.Z,{defaultCountry:"US",international:!0,countryCallingCodeEditable:!1,style:{width:300},inputComponent:EV,disabled:u.isSubmitting,name:"phone",control:s,rules:{required:"Please enter a phone number",validate:e=>!!(0,ZV.yf)(e)||"Please enter a valid phone number"}})}),u.errors.phone&&(0,p.jsx)(v.Z,{color:"error",display:"block",variant:"body2",paddingLeft:5,children:u.errors.phone.message})]})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:g,children:"Cancel"}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(Un.U,{submitting:u.isSubmitting,iconPlacement:"end",variant:"contained",children:"Verify Phone Number"})]})]})};IV.displayName="SettingsDialogMfaSetupPhoneAdd";var AV=n(11997);const RV=e=>{var t;let{phone:n,initialVerificationId:o,onClose:r,phoneAuthProvider:l}=e;const{multiFactorSession:s,enrollFactor:d}=MV(),c=(0,Fe.ji)((0,a.useMemo)((()=>({method:"patch",path:"users/:userId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.Users,id:null===t||void 0===t?void 0:t.userId,update:n}}})),[])),{register:u,handleSubmit:h,setError:g,formState:x,reset:f}=(0,fg.cI)({reValidateMode:"onChange"}),{sendingVerificationCode:b,sendVerificationCode:y,verificationId:j}=(0,AV.w)(l,o),Z=()=>{f(),r()},w=h((async e=>{let{verificationCode:t}=e;if(!j)return;const n=lV.RO.credential(j,t),i=lV.ww.assertion(n),o=await d(i);"retry"===o.status?g("verificationCode",{message:o.message}):Z()}));return(0,p.jsxs)("form",{onSubmit:w,children:[(0,p.jsx)(In.Z,{children:"2-Step Authentication"}),(0,p.jsx)(An.Z,{sx:{minHeight:SV},children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(v.Z,{variant:"body2",color:"grey.600",paddingBottom:2,children:["Enter the code sent to ",n," to verify this phone number."," ",(0,p.jsx)(v.Z,{variant:"body2",component:"span",color:b?"text.disabled":"primary.main",onClick:()=>(async()=>
3{if(f(),!n)return;y({phoneNumber:n,session:s})})(),sx:{"&:hover":{backgroundColor:"unset",cursor:"pointer"}},children:"Send another code?"})]}),(0,p.jsx)(Ln.Z,{type:"text",label:"Verification Code",placeholder:"XXXXXX",error:!!x.errors.verificationCode,helperText:null===(t=x.errors.verificationCode)||void 0===t?void 0:t.message,disabled:x.isSubmitting,fullWidth:!0,...u("verificationCode",{required:"Please enter your verification code"})})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:Z,children:"Cancel"}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(Un.U,{variant:"contained",submitting:x.isSubmitting||c.pending,children:"Enter"})]})]})};RV.displayName="SettingsDialogMfaSetupPhoneVerify";const TV=e=>{let{onClose:t}=e;const[n,i]=(0,a.useState)("add"),[o,r]=(0,a.useState)(),[l,s]=(0,a.useState)(),d=(0,a.useMemo)((()=>new lV.RO(Os.lX)),[]),c=()=>{t(),r(void 0),s(void 0),i("add")},u=l&&o;return"add"===n?(0,p.jsx)(IV,{onSuccess:(e,t)=>{r(e),s(t),i("verify")},onClose:c,phoneAuthProvider:d}):"verify"===n&&u?(0,p.jsx)(RV,{onClose:c,initialVerificationId:l,phone:o,phoneAuthProvider:d}):null};TV.displayName="SettingsDialogMfaSetupPhone";const PV=["Download and install an authenticator app on your phone","Open the app","Scan the QR code below"],LV=["Download and install an authenticator app on your phone","Open the app","Select the option to use a setup key","Enter your email and the setup key"],NV=e=>{let{onNext:t,onClose:n,totpSecret:r}=e;const{authUser:l}=(0,X.Eu)(),[s,d]=(0,a.useState)("qrCode"),c=(0,a.useRef)(null);(0,a.useLayoutEffect)((()=>{if("qrCode"!==s)return;if(!l.email)return;const e=r.generateQrCodeUrl(l.email,"ManageXR");Mo.toCanvas(c.current,e)}),[l.email,s,r]);const u="qrCode"===s?PV:LV,h=(0,o.chunk)(r.secretKey,(0,o.ceil)(r.secretKey.length/2)).map((e=>(0,o.join)(e,"")));return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(An.Z,{sx:{minHeight:SV},children:(0,p.jsxs)(m.Z,{spacing:1.5,width:1,children:[(0,p.jsx)(v.Z,{variant:"h6",children:"Connect to your Authenticator App"}),(0,p.jsx)(m.Z,{children:(0,o.map)(u,((e,t)=>(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:[t+1,". ",e]},e)))}),(0,p.jsxs)(m.Z,{width:1,alignItems:"center",justifyContent:"center",spacing:"qrCode"===s?0:1.5,minHeight:222,children:["qrCode"===s?(0,p.jsx)("canvas",{ref:c}):(0,p.jsx)(ae,{value:r.secretKey,children:(0,p.jsx)(m.Z,{alignItems:"center",children:(0,o.map)(h,(e=>(0,p.jsx)(v.Z,{variant:"h4",color:"text.secondary",lineHeight:1.2,children:e},e)))})}),(0,p.jsx)(C.Z,{size:"small",onClick:()=>{d((e=>"qrCode"===e?"setupKey":"qrCode"))},sx:{textTransform:"none"},children:"qrCode"===s?"Can't scan the QR code?":"Use QR code instead"})]})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:n,children:"Cancel"}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(C.Z,{variant:"contained",onClick:t,children:"Next"})]})]})},UV=e=>{var t,n;let{totpSecret:a,onBack:r,onClose:l}=e;const{enrollFactor:s}=MV(),{register:d,handleSubmit:c,formState:u,setError:h,reset:g}=(0,fg.cI)(),x=c((async e=>{let{verificationCode:t,displayName:n}=e;const i=lV.SP.assertionForEnrollment(a,t),o=await s(i,n);"retry"===o.status?h("verificationCode",{message:o.message}):(g(),l())}));return(0,p.jsxs)("form",{onSubmit:x,noValidate:!0,children:[(0,p.jsx)(An.Z,{sx:{minHeight:SV},children:(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(v.Z,{variant:"h6",children:"Connect to your Authenticator App"}),(0,p.jsxs)(m.Z,{spacing:4,children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Enter the code generated by your device"}),(0,p.jsx)(Ul.z,{label:"Code",placeholder:"XXXXXX",error:!!u.errors.verificationCode,helperText:null===(t=u.errors.verificationCode)||void 0===t?void 0:t.message,disabled:u.isSubmitting,autoFocus:!0,...d("verificationCode",{required:"Please enter the code from your authenticator app"})})]}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Enter the name of your authenticator app"}),(0,p.jsx)(Ul.z,{label:"Name",placeholder:"My Authenticator App",error:!!u.errors.displayName,helperText:null===(n=u.errors.displayName)||void 0===n?void 0:n.message,disabled:u.isSubmitting,...d("displayName",{required:"Please enter a name for this authenticator app",setValueAs:o.trim})})]})]})]})}),(0,p.jsxs)(Pn.Z,{children:[(0,p.jsx)(C.Z,{onClick:r,children:"Back"}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(Un.U,{submitting:u.isSubmitting,children:"Verify"})]})]})},FV=e=>{let{onClose:t}=e;const{multiFactorSession:n}=MV(),[i,o]=(0,a.useState)("add"),[r,l]=(0,a.useState)(),s=()=>{t(),o("add"),l(void 0)};return(0,a.useEffect)((()=>{lV.SP.generateSecret(n).then((e=>{l(e)}))}),[n]),r?"add"===i?(0,p.jsx)(NV,{totpSecret:r,onNext:()=>
3o("verify"),onClose:s}):(0,p.jsx)(UV,{totpSecret:r,onBack:()=>o("add"),onClose:s}):(0,p.jsx)(Rn.Z,{})};FV.displayName="SettingsDialogMfaSetupPhone";const OV=e=>{let{open:t,onClose:n,phoneFactorsAllowed:i,newTotpFactorAllowed:o}=e;const r=i?"selection":"totp",[l,s]=(0,a.useState)(r);(0,a.useEffect)((()=>{s((e=>"totp"===e||i?e:"totp"))}),[o,i]);const d=()=>{s(r),n()};return(0,p.jsx)(kn.Z,{open:t,onClose:d,maxWidth:"xs",fullWidth:!0,children:(0,p.jsxs)(kV,{children:["selection"===l&&(0,p.jsx)(yV,{onModeSelect:s,newTotpFactorAllowed:o,onClose:d}),"totp"===l&&(0,p.jsx)(FV,{onClose:d}),"phone"===l&&(0,p.jsx)(TV,{onClose:d})]})})};OV.displayName="SettingsDialogMfaSetup";const _V=e=>{let{factorInfo:t,onDelete:n,orgsThatRequireMfa:i=[],savedFactorCount:o}=e;const[r,l]=(0,a.useState)(!1),s=(0,xV.yS)(t),d=Bn({onConfirm:()=>n(t),content:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(v.Z,{children:["Delete this authentication method",1===o?" and turn 2-Step Auth OFF?":""]}),(0,p.jsx)(Tn.Z,{children:1===o?(0,p.jsxs)(mf.h,{variant:"body2",children:["Removing ",(0,p.jsx)("em",{children:s})," will also turn 2-Step Authentication OFF, since it is your only saved authentication method.",i.length>0&&(0,p.jsxs)(p.Fragment,{children:[" ","You will lose access to"," ",(0,ul.sr)(i.length,"organization")," ",(0,p.jsxs)("em",{children:["(",i.join(", "),")"]})," that require",1===i.length?"s ":" ","2-Step Authentication until you turn it back on."]})]}):(0,p.jsxs)(mf.h,{variant:"body2",children:["This action will remove ",(0,p.jsx)("em",{children:s})," from your saved 2-Step Authentication methods. You may need to sign in again."]})})]}),confirmLabel:"".concat(1===o?"Delete and Turn Off":"Delete")}),c="totp"===t.factorId?fV.Z:bV.Z;return(0,p.jsxs)(m.Z,{direction:"row",sx:{alignItems:"center",border:"solid",borderWidth:1,borderRadius:1,borderColor:"grey.300",paddingX:1},children:[(0,p.jsx)(c,{fontSize:"small",color:"action",sx:{marginTop:"1px"}}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",padding:1,flexGrow:1,children:s}),(0,p.jsx)(x.Z,{onClick:()=>l(!0),children:(0,p.jsx)(Gl.Z,{sx:{color:"grey.600"}})}),(0,p.jsx)(CV,{message:"Re-Authenticate to delete authentication method",open:r,onClose:()=>l(!1),onSuccess:()=>{l(!1),d.trigger(t)}}),(0,p.jsx)(Fn,{...d.props})]})};_V.displayName="SettingsMfaFactorItem";const zV=()=>{var e;const{authUser:t}=(0,X.Eu)(),{notify:n}=(0,ie.o)(),{user:r,allPrivileges:l}=(0,w.P)(),s=(0,Fe.ji)({method:"patch",path:"users/:userId/disable-mfa"}),d=(0,hV.g)(),c=(0,o.filter)(l,(e=>!0===e.organizationProfile.forceMfa)).map((e=>e.organizationProfile.name)),[u,h]=(0,a.useState)(!1),[g,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)(!1),y=(0,lV.JG)(t),j=(0,xV.oz)(y.enrolledFactors),Z=(0,o.some)(j,{factorId:"phone"}),E=!(0,o.some)(j,{factorId:"totp"}),S=async()=>{try{const e=await s.requestAsync({params:{userId:r.id}});await(0,lV._p)(Os.lX,e.customToken),n({severity:"success",message:"2-Step Auth disabled"})}catch(e){(0,Si.yR)(e,{name:"Error turning off 2-Step Auth"}),n({severity:"error",message:"Error turning off 2-Step Auth."})}},D=Bn({onConfirm:S,title:"",content:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{variant:"body1",marginBottom:2,children:"Turn 2-Step Authentication OFF?"}),(0,p.jsxs)(mf.h,{variant:"body2",children:["This action also deletes your saved authentication methods. You will lose access to any organizations that require 2-Step Authentication",(0,p.jsx)("em",{children:c.length>0?" (".concat(c.join(", "),") "):""}),"until you turn it back on."]})]}),confirmLabel:"Turn OFF 2-Step Auth"});return(0,p.jsxs)(m.Z,{paddingTop:2,spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",children:[r.mfaEnabled?(0,p.jsx)(bL.Z,{color:"success"}):(0,p.jsx)(XW.Z,{sx:{color:"grey.600"}}),(0,p.jsx)(v.Z,{variant:"subtitle1",paddingLeft:1,children:"2-Step Authentication\xa0"}),(0,p.jsxs)(v.Z,{variant:"subtitle1",sx:{color:"primary.main"},children:["is ",r.mfaEnabled?"ON":"OFF"]}),(0,p.jsx)(i.Z,{flexGrow:1}),(0,p.jsx)(fu,{label:"",value:null!==(e=r.mfaEnabled)&&void 0!==e&&e,onToggle:async()=>{r.mfaEnabled?h(!0):x(!0)}})]}),(0,p.jsx)(m.Z,{children:(0,p.jsxs)(v.Z,{variant:"body2",sx:{color:"grey.600"},children:["Receive a code from an authenticator app",Z?" or via text message":""," and enter it on this application to complete sign-in to your account. Some organizations may require you to turn on 2-Step Authentication before you can view them in ManageXR."]})}),(0,p.jsx)(OV,{open:f,onClose:()=>b(!1),phoneFactorsAllowed:Z,newTotpFactorAllowed:E}
3),(0,p.jsx)(CV,{message:"Re-authenticate to turn off 2-Step Auth",open:u,onClose:()=>h(!1),onSuccess:()=>{h(!1),D.trigger(j)}}),(0,p.jsx)(CV,{message:"Re-authenticate to setup 2-Step Auth",open:g,onClose:()=>x(!1),onSuccess:()=>{x(!1),b(!0)}}),(0,p.jsx)(Fn,{...D.props}),j.length>0&&(0,p.jsxs)(m.Z,{spacing:1,width:350,children:[null===j||void 0===j?void 0:j.map((e=>(0,p.jsx)(_V,{factorInfo:e,onDelete:e=>(async e=>{if(1===(null===j||void 0===j?void 0:j.length))await S().catch((e=>{(0,Si.yR)(e,{name:"Failed to turn off 2-step auth."}),n({severity:"error",message:"Oops, something went wrong!"})}));else try{await y.unenroll(e.uid),await d.request({params:{userId:r.id}})}catch(t){(0,Si.yR)(t,{name:"Failed to delete 2-step auth method."}),n({severity:"error",message:"Oops, something went wrong!"})}})(e),onDeleteAndTurnOff:S,orgsThatRequireMfa:c,savedFactorCount:j.length},e.uid))),Z&&(0,p.jsx)(ee.Z,{title:xV.ZV,placement:"bottom-start",followCursor:!0,disableHoverListener:j.length<5,children:(0,p.jsx)(i.Z,{sx:{alignSelf:"flex-end"},children:(0,p.jsx)(C.Z,{onClick:()=>{j.length>=5?n({severity:"error",message:xV.ZV}):x(!0)},disabled:j.length>=5,children:"Add another method"})})})]})]})};zV.displayName="SettingsMfa";var BV=n(92418);const WV=(0,a.memo)((e=>{let{open:t,onClose:n}=e;return(0,p.jsx)(kn.Z,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:(0,p.jsx)(An.Z,{children:(0,p.jsx)(BV.t,{showBackButton:!1,onClose:n})})})})),VV=(0,a.memo)((e=>{var t,n,i,o;let{onClose:r}=e;const{notify:l}=(0,ie.o)(),{register:s,handleSubmit:d,watch:c,setError:u,formState:h,reset:g}=(0,fg.cI)({reValidateMode:"onSubmit"}),v=c("currentPassword"),x=c("password"),f=c("passwordConfirm"),[b,y]=(0,a.useState)(),[j,Z]=(0,a.useState)(),w=d((async e=>{let{currentPassword:t,password:n}=e;try{const e=Os.lX.currentUser;if(null===e||void 0===e||!e.email)return;const i=lV.w9.credential(e.email,t);await(0,lV.aF)(e,i),await(0,lV.gQ)(e,n),g(),l({severity:"success",message:"Password updated"}),r()}catch(i){if(!(i instanceof rV.ZR))return(0,Si.yR)(i,{name:"unknown update password error"}),void l({severity:"error",message:"Failed to update password"});"auth/wrong-password"===i.code||"auth/invalid-credential"===i.code?u("currentPassword",{message:"Incorrect password. Please try again.",type:"firebase"}):"auth/multi-factor-auth-required"===i.code?(Z(n),y(i)):((0,Si.yR)(i,{name:"firebase update password error: ".concat(i.code),contexts:{firebaseError:{code:i.code,message:i.message,customData:i.customData,name:i.name}}}),l({severity:"error",message:"Failed to update password"}))}}));return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("form",{onSubmit:w,noValidate:!0,children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Ln.Z,{type:"password",label:"Current Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",helperText:null===(t=h.errors.currentPassword)||void 0===t?void 0:t.message,error:!!h.errors.currentPassword,disabled:h.isSubmitting,fullWidth:!0,...s("currentPassword",{required:"Please enter your current password"})}),(0,p.jsx)(Ln.Z,{type:"password",label:"New Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",helperText:null!==(n=null===(i=h.errors.password)||void 0===i?void 0:i.message)&&void 0!==n?n:"8 characters, one letter, one number",error:!!h.errors.password,disabled:h.isSubmitting,fullWidth:!0,...s("password",{required:"Please enter a new password",pattern:{value:(0,Nw.BV)(),message:"Must be at least 8 characters, with one letter and one number"}})}),(0,p.jsx)(Ln.Z,{type:"password",label:"Confirm Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",helperText:null===(o=h.errors.passwordConfirm)||void 0===o?void 0:o.message,error:!!h.errors.passwordConfirm,disabled:h.isSubmitting,fullWidth:!0,...s("passwordConfirm",{required:"Please confirm your password",pattern:{value:(0,Nw.Xv)(x),message:"Passwords do not match"}})}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",width:1,children:[(0,p.jsx)(C.Z,{onClick:r,children:"Cancel"}),(0,p.jsx)(Un.U,{disabled:!(v&&x&&f),submitting:h.isSubmitting,iconPlacement:"end",children:"Update Password"})]})]})}),b&&(0,p.jsx)(mV.A,{mfaError:b,clearMfaError:()=>{y(void 0),Z(void 0)},onAuthenticated:async()=>{try{const e=Os.lX.currentUser;if(!e||!j)return;await(0,lV.gQ)(e,j),g(),Z(void 0),l({severity:"success",message:"Password updated"}),r()}catch(e){(0,Si.yR)(e,{name:"update password after MFA error"}),l({severity:"error",message:"Failed to update password"})}}})]})})),GV=(0,a.memo)((e=>{let{open:t,onClose:n,onForgotPassword:i}=e;return(0,p.jsxs)(kn.Z,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",justifyContent:"space-between",marginRight:3,children:[(0,p.jsx)(In.Z,{children:"Change Password"}),(0,p.jsx)(Kn.Z,{variant:"caption",onClick:()=>{i(),n()},children:"Forgot your password?"})]}),(0,p.jsx)(An.Z,{sx:{paddingTop:1},children:(0,p.jsx)(VV,{onClose:n})})]})})),HV=(0,a.memo)((()=>{const[e,t]=(0,a.useState)(!1),[n,o]=(0,a.useState)(!1);return(0,p.jsxs)(m.Z,{alignItems:"center",spacing:2,direction:"row",height:60,width:700,children:[(0,p.jsx)(i.Z,{minWidth:140,sx:{color:"grey.700"},children:(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Password"})}),(0,p.jsx)(v.Z,{sx:{color:"grey.700"},children:"***************"}),(0,p.jsx)(C.Z,{color:"primary",size:"small",onClick:()=>t(!0),children:"Change password"}),(0,p.jsx)(GV,{open:e,onClose:()=>t(!1),onForgotPassword:()=>o(!0)}),n&&(0,p.jsx)(WV,{open:n,onClose:()=>o(!1)})]})})),qV=(0,a.memo)((()=>{const{user:e}=(0,w.P)(),{notify:t}=(0,ie.o)(),{register:n,handleSubmit:o,formState:a,reset:r}=(0,fg.cI)({defaultValues:{name:e.name}}),l=o((async n=>{let{name:i}=n;try{if(!e)return;await(0,Fe.UF)({userId:e.id},{name:i}),r({name:i}),t({severity:"success",message:"Profile updated"})}catch(o){(0,Si.yR)(o,{name:"update profile name error",contexts:{update:{userId:e.id,name:i}}}),t({severity:"error",message:"Failed to update profile"})}}));return(0,p.jsx)("form",{onSubmit:l,noValidate:!0,autoComplete:"off",children:(0,p.jsxs)(m.Z,{alignItems:"center",direction:"row",spacing:2,height:60,width:700,children:[(0,p.jsx)(i.Z,{minWidth:140,children:(0,p.jsx)(v.Z,{variant:"subtitle1",sx:{color:"grey.700"},children:"Profile Name"})}),(0,p.jsx)(Ln.Z,{label:"Name",error:!!a.errors.name,disabled:a.isSubmitting,fullWidth:!0,...n("name",{required:!0})}),(0,p.jsx)(i.Z,{minWidth:150,children:(0,p.jsx)(Un.U,{disabled:!a.isDirty,submitting:a.isSubmitting,iconPlacement:"end",children:"Update profile"})})]})})}
3)),YV=e=>{let{usesSsoProvider:t,ssoProviderName:n,children:i}=e;return t?(0,p.jsxs)(mf.h,{children:["User account is managed by"," ",n?(0,o.startCase)(n):"your SSO provider","."]}):(0,p.jsx)(p.Fragment,{children:i})},KV=()=>{var e,t,n;const{user:i}=(0,w.P)(),a=!(0,o.isUndefined)(i.ssoProviderInfo),r=(null===(e=i.ssoProviderInfo)||void 0===e?void 0:e.type)===aV.WorkOS?null===(t=i.ssoProviderInfo)||void 0===t?void 0:t.name:null===(n=i.ssoProviderInfo)||void 0===n?void 0:n.type,l=!(r===aV.Google||r===aV.Microsoft),s=a&&l;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Account"}),(0,p.jsxs)(YV,{usesSsoProvider:a,ssoProviderName:r,children:[(0,p.jsx)(qV,{}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(pV,{}),(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(HV,{})]}),!s&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{}),(0,p.jsx)(zV,{})]})]})},XV=()=>{var e;const t=(0,d.Yt)(),{privileges:n,buildOrganizationPath:i,userRoleId:o}=(0,w.P)(),r=(0,d.kV)(),l=(0,X.h5)(),s=n.billing||(null===(e=r.usesMxrPartner)||void 0===e?void 0:e.fixedContentProvider)||l,u=n.content||l;return{userSettingsPages:(0,a.useMemo)((()=>[{path:c._j.userSettings.account.__path,title:"Account",component:(0,p.jsx)(KV,{})}]),[]),organizationSettingsPages:(0,a.useMemo)((()=>{const e=!!o;return[{path:i((e=>e.settings.organization)),title:"Organization",component:(0,p.jsx)(Vz,{})},{path:i((e=>e.settings.users)),title:"Users",component:e&&!n.organization?(0,p.jsx)(Rz,{privilege:"organization",featureDescription:"view and manage organization users"}):(0,p.jsx)(oV,{}),hidden:e&&!n.organization},{path:i((e=>e.settings.apiKeys)),title:"API Keys",component:(0,p.jsx)(je,{children:(0,p.jsx)(Fz,{})}),disabled:!t},{path:i((e=>e.settings.security)),title:"Security",component:(0,p.jsx)(je,{children:(0,p.jsx)(qz,{})}),disabled:!t},{path:i((e=>e.settings.auditLogs)),title:"Audit Logs",component:(0,p.jsx)(je,{children:(0,p.jsx)(Bz,{})}),disabled:!t,hidden:!u},{path:i((e=>e.settings.subscription)),title:"Subscription",component:s?(0,p.jsx)(zW,{}):(0,p.jsx)(Rz,{privilege:"billing",featureDescription:"manage its subscription"}),hidden:!s}]}),[i,u,n.organization,s,t,o])}},QV=e=>{let{to:t,replace:n,children:i,...o}=e;const a=(0,l.$B)({path:t,exact:!1,sensitive:!0});return(0,p.jsx)(Qc,{to:t,replace:n,children:(0,p.jsx)(oi.Z,{selected:!!a,...o,children:i})})},JV=(0,a.memo)((e=>{let{userSettingsPages:t,organizationSettingsPages:n}=e;return(0,p.jsxs)(ii.Z,{dense:!0,disablePadding:!0,children:[(0,p.jsx)(sj.Z,{children:"Organization Settings"}),(0,o.map)(n,(e=>!e.hidden&&(0,p.jsx)(QV,{to:e.path,disabled:e.disabled,"data-testid":"settingsSidebar_".concat(e.title),children:(0,p.jsx)(Rs.Z,{primary:e.title})},e.path))),(0,p.jsx)(sj.Z,{children:"User Settings"}),(0,o.map)(t,(e=>(0,p.jsx)(QV,{to:e.path,disabled:e.disabled,"data-testid":"settingsSidebar_".concat(e.title),children:(0,p.jsx)(Rs.Z,{primary:e.title})},e.path)))]})})),$V=()=>{const{userSettingsPages:e,organizationSettingsPages:t}=XV();return(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Settings"}],noBottomPadding:!0,children:(0,p.jsx)(vd,{sidebarContent:(0,p.jsx)(JV,{userSettingsPages:e,organizationSettingsPages:t}),children:(0,p.jsxs)(l.rs,{children:[(0,o.map)(t,(e=>(0,p.jsx)(l.AW,{path:e.path,children:e.component},e.path))),t[0]&&(0,p.jsx)(l.AW,{path:c._j.organization.settings.__path,children:(0,p.jsx)(l.l_,{to:t[0].path})})]})})})},eG=()=>{var e;const t=(0,d.hu)(),{organization:n}=(0,d.mP)();return t?(0,p.jsx)(i.Z,{paddingBottom:1,children:(0,p.jsxs)(ui.Q,{severity:"error",sx:{backgroundColor:y.DG.secondary[50],padding:2,borderRadius:1},children:["You must turn on ",(0,p.jsx)("b",{children:"2-Step Authentication"})," to access"," ",(0,p.jsx)("b",{children:null!==(e=n.name)&&void 0!==e?e:"this organization"}),". You may still access other organizations that do not require 2-Step Authentication."]})}):null},tG=()=>{const{userSettingsPages:e,organizationSettingsPages:t}=XV();return(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Settings"}],noBottomPadding:!0,disableGlobalSearch:!0,children:(0,p.jsxs)(vd,{sidebarContent:(0,p.jsx)(JV,{userSettingsPages:e,organizationSettingsPages:t}),children:[(0,p.jsx)(eG,{}),(0,p.jsxs)(l.rs,{children:[(0,o.map)(e,(e=>(0,p.jsx)(l.AW,{path:e.path,children:e.component},e.path))),e[0]&&(0,p.jsx)(l.AW,{path:c._j.userSettings.__path,children:(0,p.jsx)(l.l_,{to:e[0].path})})]})]})})};function nG(e,t){const n=t&&t.onSave||function(){},i=e.shadowRoot||e.attachShadow({mode:"open"});i.innerHTML='<style>\n :host{\n --bg:#f7f6f3;--panel:#ffffff;--ink:#191917;--muted:#6b6a64;--faint:#9a988f;\n --line:#e2e0d8;--line-strong:#c9c6bb;\n --choice:#4f46e5;--text:#0d9488;--sched:#d97706;--end:#d4483b;--end-bg:#fdf1ef;\n --sel:#4f46e5;--sel-soft:#eef0ff;\n --shadow:0 1px 2px rgba(25,25,23,.05),0 4px 14px rgba(25,25,23,.06);\n --r:12px;\n --sans:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;\n --mono:ui-monospace,"SF Mono",Menlo,Consolas,"Roboto Mono",monospace;\n display:block;height:100%;\n }\n *{box-sizing:border-box}\n .cs-root{margin:0;font-family:var(--sans);color:var(--ink);background:var(--bg);\n -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;\n display:flex;flex-direction:column;height:100%;overflow:hidden;}\n header{display:flex;align-items:center;gap:18px;flex-wrap:wrap;\n padding:12px 20px;border-bottom:1px solid var(--line);background:var(--panel);z-index:5;}\n .brand{display:flex;flex-direction:column;gap:2px;margin-right:auto}\n .brand h1{margin:0;font-size:15px;font-weight:640;letter-spacing:-.01em;text-wrap:balance}\n .brand p{margin:0;font-size:12px;color:var(--muted)}\n .brand code{font-family:var(--mono);font-size:11px;color:var(--faint)}\n\n .seg{display:inline-flex;background:#efeee8;border:1px solid var(--line);border-radius:10px;padding:3px}\n .seg button{font:inherit;font-size:12.5px;font-weight:560;color:var(--muted);border:0;background:transparent;\n padding:6px 13px;border-radius:7px;cursor:pointer;transition:background .15s,color .15s;touch-action:manipulation}\n .seg button:hover{color:var(--ink)}\n .seg button[aria-pressed="true"]{background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}\n .seg button:focus-visible{outline:2px solid var(--sel);outline-offset:2px}\n\n .tools{display:inline-flex;align-items:center;gap:6px}\n .btn{font:inherit;font-size:12.5px;font-weight:560;display:inline-flex;align-items:center;gap:6px;\n border:1px solid var(--line);background:var(--panel);color:var(--muted);border-radius:8px;padding:7px 12px;\n cursor:pointer;transition:color .15s,border-color .15s;touch-action:manipulation}\n .btn:hover{color:var(--ink);border-color:var(--line-strong)}\n .btn:focus-visible{outline:2px solid var(--sel);outline-offset:2px}\n .btn svg{width:15px;height:15px}\n .btn.primary{background:var(--ink);color:#fff;border-color:var(--ink)}\n .btn.primary:hover{background:#000;color:#fff}\n .btn:disabled{opacity:.4;cursor:default}\n .btn:disabled:hover{color:var(--muted);border-color:var(--line)}\n .icbtn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;\n border:1px solid var(--line);background:var(--panel);color:var(--muted);cursor:pointer;\n transition:color .15s,border-color .15s;touch-action:manipulation}\n .icbtn:hover{color:var(--ink);border-color:var(--line-strong)}\n .icbtn:focus-visible{outline:2px solid var(--sel);outline-offset:2px}\n .icbtn svg{width:16px;height:16px}\n\n .legend{display:inline-flex;align-items:center;gap:14px;font-size:11.5px;color:var(--muted)}
3\n .legend span{display:inline-flex;align-items:center;gap:6px}\n .swatch{width:12px;height:12px;border-radius:4px;border:1px solid rgba(0,0,0,.08)}\n\n main{position:relative;flex:1;min-height:0;display:flex}\n #stage{position:relative;flex:1;min-height:0;overflow:hidden;cursor:grab;\n background:radial-gradient(circle at 1px 1px,#e6e4db 1px,transparent 0) 0 0/22px 22px;}\n #stage.panning{cursor:grabbing}\n #stage.hidden{display:none}\n #canvas{position:absolute;top:0;left:0;transform-origin:0 0;will-change:transform}\n #edges{position:absolute;top:0;left:0;overflow:visible;pointer-events:none}\n\n .node{position:absolute;width:196px;background:var(--panel);border:1px solid var(--line);\n border-left:3px solid var(--line-strong);border-radius:var(--r);padding:11px 13px;\n box-shadow:var(--shadow);cursor:pointer;transition:box-shadow .15s,border-color .15s,transform .15s,opacity .15s}\n .node:hover{box-shadow:0 2px 4px rgba(25,25,23,.06),0 8px 22px rgba(25,25,23,.10);transform:translateY(-1px)}\n .node:focus-visible{outline:2px solid var(--sel);outline-offset:2px}\n .node .kind{font-family:var(--mono);font-size:9.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--faint);margin-bottom:5px}\n .node .q{font-size:13px;line-height:1.32;font-weight:520;letter-spacing:-.005em}\n .node .meta{margin-top:7px;font-size:10.5px;color:var(--faint)}\n .node.type-choice{border-left-color:var(--choice)}\n .node.type-choice .kind{color:var(--choice)}\n .node.type-text{border-left-color:var(--text)}\n .node.type-text .kind{color:var(--text)}\n .node.type-schedule{border-left-color:var(--sched)}\n .node.type-schedule .kind{color:var(--sched)}\n .node.type-terminal{border-left-color:var(--end);background:var(--end-bg)}\n .node.type-terminal .kind{color:var(--end)}\n .node.dim{opacity:.28;filter:saturate(.4)}\n .node.sel{border-color:var(--sel);box-shadow:0 0 0 2px var(--sel-soft),var(--shadow)}\n .node.orphan{background:#fdecea;border-color:#f0b7b0;border-left-color:var(--end)}\n .node.orphan .kind{color:var(--end)}\n .node .node-del{position:absolute;top:-9px;right:-9px;width:22px;height:22px;border-radius:50%;\n background:var(--end);color:#fff;font-size:15px;line-height:22px;text-align:center;cursor:pointer;\n box-shadow:var(--shadow);display:none}\n .node.orphan .node-del{display:block}\n .node .node-del:hover{background:#b23a2f}\n .orphan-note{color:var(--end)!important}\n\n .hint{font-size:11px;color:var(--faint);pointer-events:none}\n .float{position:absolute;z-index:6;display:flex;align-items:center;gap:10px}\n .float-tl{top:14px;left:16px}\n .float-bl{bottom:14px;left:16px;gap:12px}\n .zoomcluster{display:inline-flex;gap:4px;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:4px;box-shadow:var(--shadow)}\n .zoomcluster .icbtn{border:0;box-shadow:none;width:30px;height:30px}\n\n .tpick{position:relative;flex:1;min-width:0}\n .pickslot{flex:1;min-width:0}\n .tpick-trig{display:flex;align-items:center;gap:8px;width:100%;font:inherit;font-size:13px;\n border:1px solid var(--line);border-radius:8px;background:#fff;padding:8px 10px;cursor:pointer;text-align:left}\n .tpick-trig:hover{border-color:var(--line-strong)}\n .tpick-trig .tpick-q{color:var(--ink);flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n .tpick-trig .chev{width:14px;height:14px;color:var(--faint);flex:none}\n .tpick-pop{position:fixed;z-index:50;background:var(--panel);border:1px solid var(--line-strong);\n border-radius:12px;box-shadow:0 12px 38px rgba(25,25,23,.2);max-height:420px;overflow:auto;padding:9px}\n .tpick-search{width:100%;font:inherit;font-size:13.5px;border:1px solid var(--line);border-radius:9px;\n padding:9px 11px;margin-bottom:7px;background:#fcfcfa}\n .tpick-search:focus{outline:2px solid var(--sel);outline-offset:0;border-color:var(--sel)}\n .tpick-item{display:flex;align-items:flex-start;gap:9px;width:100%;font:inherit;font-size:13.5px;\n border:0;background:none;border-radius:8px;padding:10px 10px;cursor:pointer;text-align:left;line-height:1.35}\n .tpick-item:hover{background:#efeee8}\n .tpick-item.sel{background:var(--sel-soft)}\n .tpick-item .ck{width:13px;color:var(--sel);flex:none;font-size:13px;margin-top:1px}\n .tpick-item .tpick-q{color:var(--ink);white-space:normal;overflow-wrap:anywhere}\n .tpick-create{margin-top:6px;border-top:1px solid var(--line);padding-top:9px}\n .tpick-create-lbl{font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--faint);margin-bottom:3px}\n .tpick-create-q{font-size:12.5px;color:var(--ink);font-weight:520;margin-bottom:8px;line-height:1.3}
3\n .tpick-create-btns{display:flex;gap:6px}\n .tpick-create-btns button{flex:1;font:inherit;font-size:12px;font-weight:540;border:1px solid var(--line);\n background:#fcfcfa;border-radius:7px;padding:6px;cursor:pointer;color:var(--ink)}\n .tpick-create-btns button[data-t="choice"]:hover{border-color:var(--choice);color:var(--choice);background:#f0eff8}\n .tpick-create-btns button[data-t="text"]:hover{border-color:var(--text);color:var(--text);background:#eef7f5}\n .tpick-create-btns button[data-t="schedule"]:hover{border-color:var(--sched);color:var(--sched);background:#fdf3e6}\n\n /* Branches + Outline (unchanged readers) */\n #branches,#outline{flex:1;min-height:0;overflow:auto}\n #branches{padding:28px}#outline{padding:28px 32px}\n #branches.hidden,#outline.hidden{display:none}\n .bt-node{background:var(--panel);border:1px solid var(--line);border-left:3px solid var(--line-strong);\n border-radius:10px;padding:8px 12px;box-shadow:var(--shadow);max-width:340px}\n .bt-node .kind{font-family:var(--mono);font-size:9px;letter-spacing:.09em;text-transform:uppercase;color:var(--faint)}\n .bt-node .q{font-weight:540;line-height:1.3;margin-top:2px}\n .bt-node.type-choice{border-left-color:var(--choice)}\n .bt-node.type-text{border-left-color:var(--text)}\n .bt-node.type-schedule{border-left-color:var(--sched)}\n .bt-node.type-terminal{border-left-color:var(--end);background:var(--end-bg)}\n .bt-branch{display:flex;flex-direction:column;gap:10px;margin:10px 0 10px 26px;padding-left:22px;border-left:2px solid var(--line)}\n .bt-edge{font-size:11.5px;color:var(--muted);margin-bottom:3px}\n .bt-edge .opt{background:#f0eff8;color:var(--choice);border:1px solid #e0ddf3;padding:1px 8px;border-radius:20px;font-weight:520}\n .bt-edge .opt.other{background:#f2f1ec;color:var(--faint);border-color:var(--line);font-style:italic}\n .bt-ref{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--muted);\n background:#f2f1ec;border:1px dashed var(--line-strong);border-radius:8px;padding:6px 11px;width:fit-content}\n .bt-ref b{color:var(--ink);font-weight:560}.bt-ref svg{width:13px;height:13px;color:var(--faint)}\n .ol{max-width:820px;margin:0 auto;font-size:13.5px}\n .ol details{margin:1px 0}\n .ol summary{list-style:none;cursor:pointer;display:flex;align-items:flex-start;gap:9px;padding:7px 10px;border-radius:8px;transition:background .12s}\n .ol summary::-webkit-details-marker{display:none}\n .ol summary:hover{background:#efeee8}\n .ol summary:focus-visible{outline:2px solid var(--sel);outline-offset:1px}\n .ol .tw{width:14px;flex:none;color:var(--faint);transition:transform .15s;margin-top:2px}\n .ol details[open]>summary .tw{transform:rotate(90deg)}\n .ol .leaf .tw{visibility:hidden}\n .ol .dot{width:8px;height:8px;border-radius:3px;flex:none;margin-top:5px}\n .ol .dot.type-choice{background:var(--choice)}.ol .dot.type-text{background:var(--text)}.ol .dot.type-schedule{background:var(--sched)}.ol .dot.type-terminal{background:var(--end)}\n .ol .qt{font-weight:540;line-height:1.35}\n .ol .kids{margin-left:22px;padding-left:16px;border-left:1px solid var(--line)}\n .ol .opt{font-size:11px;color:var(--muted);font-weight:480;margin-left:8px}\n .ol .opt.other{font-style:italic;color:var(--faint)}\n .ol .ref{color:var(--faint);font-size:11.5px;font-style:italic;margin-left:8px}\n\n /* Editor panel */\n #detail{width:430px;flex:none;border-left:1px solid var(--line);background:var(--panel);\n padding:18px 18px 40px;overflow:auto;position:absolute;right:0;top:0;bottom:0;\n transform:translateX(100%);transition:transform .2s ease;box-shadow:-8px 0 24px rgba(25,25,23,.05)}\n #detail.open{transform:none}\n .dhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}\n .dkind{font-family:var(--mono);font-size:10px;letter-spacing:.09em;text-transform:uppercase;color:var(--faint)}\n .dkind b{color:var(--muted)}\n .close{color:var(--faint);background:none;border:0;cursor:pointer;font-size:20px;line-height:1;padding:2px 6px;border-radius:6px}\n .close:hover{color:var(--ink);background:#efeee8}\n .fieldlbl{font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin:14px 0 6px;font-weight:600}\n .ed-q{width:100%;font:inherit;font-size:14px;font-weight:520;line-height:1.35;color:var(--ink);\n border:1px solid var(--line);border-radius:9px;padding:9px 11px;resize:vertical;min-height:58px;background:#fcfcfa}\n .ed-q:focus{outline:2px solid var(--sel);outline-offset:0;border-color:var(--sel)}\n .ed-ph{width:100%;font:inherit;font-size:13px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#fcfcfa;color:var(--ink)}\n .ed-ph:focus{outline:2px solid var(--sel);outline-offset:0;border-color:var(--sel)}\n .ed-ph::placeholder{color:var(--faint)}\n .typetoggle{display:inline-flex;background:#efeee8;border:1px solid var(--line);border-radius:9px;padding:3px}\n .typetoggle button{font:inherit;font-size:12px;font-weight:560;color:var(--muted);border:0;background:transparent;padding:6px 13px;border-radius:6px;cursor:pointer;transition:background .15s,color .15s}\n .typetoggle button:hover{color:var(--ink)}\n .typetoggle button[aria-pressed="true"]{background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}\n .typetoggle button:focus-visible{outline:2px solid var(--sel);outline-offset:2px}\n .opts{display:flex;flex-direction:column;gap:8px;margin-top:4px}\n .optrow{border:1px solid var(--line);border-radius:11px;padding:10px;background:#faf9f6;transition:border-color .15s}\n .optrow:hover{border-color:var(--line-strong)}\n .opt-top{display:flex;align-items:center;gap:6px}\n .optrow input.lbl{flex:1;min-width:0;font:inherit;font-size:14px;font-weight:520;color:var(--ink);\n border:1px solid transparent;background:#fff;border-radius:8px;padding:8px 10px;transition:border-color .15s,box-shadow .15s}\n .optrow input.lbl:hover{border-color:var(--line)}\n .optrow input.lbl:focus{outline:none;border-color:var(--sel);box-shadow:0 0 0 2px var(--sel-soft)}\n .optrow input.lbl::placeholder{color:var(--faint);font-weight:400}\n .optrow.other input.lbl{font-style:italic;color:var(--muted)}\n .optrow .ftbtn{flex:none;width:30px;height:30px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--faint);font-style:italic;cursor:pointer}\n .optrow .ftbtn[aria-pressed="true"]{background:var(--sel-soft);border-color:var(--sel);color:var(--sel)}\n .opt-goto{display:flex;align-items:center;gap:9px;margin-top:9px;padding-left:2px}\n .opt-goto .goto-lbl{font-size:9.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--faint);font-weight:700;white-space:nowrap;flex:none}\n .optrow .del{border:0;background:none;color:var(--faint);cursor:pointer;font-size:17px;padding:0 6px;border-radius:6px;flex:none;line-height:1}\n .optrow .del:hover{color:var(--end);background:#fdf1ef}\n .addopt{margin-top:4px;font-size:12px;font-weight:540;color:var(--choice);background:#f0eff8;border:1px dashed #cfcaf1;\n border-radius:8px;padding:7px;cursor:pointer;width:100%}\n .addopt:hover{background:#e8e6fb}\n .end-note{font-size:12.5px;color:var(--muted);line-height:1.5}\n .toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%) translateY(20px);opacity:0;\n background:var(--ink);color:#fff;font-size:12.5px;font-weight:520;padding:9px 16px;border-radius:9px;\n box-shadow:var(--shadow);transition:opacity .2s,transform .2s;pointer-events:none;z-index:20}\n .toast.show{opacity:1;transform:translateX(-50%) translateY(0)}\n\n @media (max-width:760px){#detail{width:100%}.legend{display:none}.brand{margin-right:0;flex-basis:100%}}\n @media (prefers-reduced-motion:reduce){*{transition:none!important}}\n</style>\n<div class="cs-root">\n<header>\n <div class="brand">\n <h1>Cancellation Survey Flow</h1>\n <p>Branching churn survey · <code>
3SettingsSubscriptionCancelSurveyDialog</code></p>\n </div>\n</header>\n\n<main>\n <div class="float float-tl">\n <button class="btn" id="undoBtn" disabled>\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 14 4 9l5-5"/><path d="M4 9h11a5 5 0 0 1 0 10h-4"/></svg>Undo\n </button>\n <button class="btn primary" id="copyTree">\n <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12l5 5L20 7"/></svg>Save\n </button>\n </div>\n <div class="float float-bl" id="graphTools">\n <div class="zoomcluster">\n <button class="icbtn" id="zoomout" aria-label="Zoom out"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M5 12h14"/></svg></button>\n <button class="icbtn" id="fit" aria-label="Fit to view" title="Fit to view"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"/></svg></button>\n <button class="icbtn" id="zoomin" aria-label="Zoom in"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg></button>\n </div>\n <span class="hint">Drag to pan · scroll to zoom · click a step to edit</span>\n </div>\n\n <section id="stage" aria-label="Flow graph">\n <div id="canvas"><svg id="edges"></svg></div>\n </section>\n <section id="branches" class="hidden" aria-label="Branch tree"></section>\n <section id="outline" class="hidden" aria-label="Outline"></section>\n <aside id="detail" aria-live="polite">\n <div class="dhead">\n <div class="dkind" id="dkind"></div>\n <button class="close" id="detailClose" aria-label="Close">×</button>\n </div>\n <div id="detailBody"></div>\n </aside>\n</main>\n<div class="toast" id="toast" role="status"></div>\n</div>\n';const o=[];function a(e,t,n){window.addEventListener(e,t,n),o.push([e,t,n])}let r="q_reason";const l={q_reason:{type:"choice",question:"Why do you want to cancel your plan?",options:[{label:"Moving to a different management platform",next:"q_platform"},{label:"I don't need device management",next:"q_have_devices"}]},q_platform:{type:"choice",question:"Which platform are you moving to?",options:[{label:"Meta Horizon managed services",next:"q_platform_reason"},{label:"PICO Business Device Manager",next:"q_platform_reason"},{label:"Microsoft Intune",next:"q_platform_reason"},{label:"ArborXR",next:"q_platform_reason"},{label:"Omnissa / VMware",next:"q_platform_reason"},{label:"We built our own",next:"q_platform_reason"},{label:"Other",next:"q_platform_reason",other:!0}]},q_platform_reason:{type:"choice",question:"What made you want to leave?",options:[{label:"We found better pricing",next:"q_platform_price"},{label:"We need a feature ManageXR doesn't offer",next:"q_platform_which_feature"},{label:"There were bugs that affected our deployment",next:"q_platform_which_bug"},{label:"Required to switch for contractual or procurement reasons",next:"q_platform_contractual"},{label:"Other",next:"q_keep_business",other:!0}]},q_keep_business:{type:"choice",question:"What could we have done to keep your business?",options:[{label:"Lower or more flexible pricing",next:"q_keep_pricing"},{label:"Add a feature we needed",next:"q_keep_which_feature"},{label:"Better support or onboarding",next:"q_keep_support"},{label:"A more reliable platform",next:"q_keep_reliability"},{label:"Other",next:"q_who_in_charge",other:!0}]},q_have_devices:{type:"choice",question:"Have you gotten rid of your devices?",options:[{label:"Yes",next:"q_got_rid"},{label:"No",next:"q_future_use"}]},q_got_rid:{type:"choice",question:"Why did you get rid of the devices?",options:[{label:"Our program came to an end",next:"q_program_end_reason"},{label:"They broke or were lost",next:"q_who_in_charge"},{label:"We switched to different hardware",next:"q_switched_to"},{label:"We sold or passed them on",next:"q_sold_to"},{label:"Other",next:"q_who_in_charge",other:!0}]},q_program_end_reason:{type:"choice",question:"What brought the program to an end?",options:[{label:"Budget
3cuts",next:"q_who_in_charge"},{label:"A grant or funding ended",next:"q_who_in_charge"},{label:"A leadership change",next:"q_who_in_charge"},{label:"Other",next:"q_who_in_charge",other:!0}]},q_devices_going:{type:"choice",question:"Where are the devices going?",options:[{label:"To another organization",next:"q_devices_org"},{label:"To a reseller or refurbisher",next:"q_devices_reseller"},{label:"Recycled or disposed",next:"q_who_in_charge"},{label:"Into storage for now",next:"q_who_in_charge"},{label:"Other",next:"q_who_in_charge",other:!0}]},q_future_use:{type:"choice",question:"Do you still plan to use the devices in the future?",options:[{label:"Yes",next:"q_manage_how"},{label:"Maybe",next:"q_maybe"},{label:"No",next:"q_why_not_keep"}]},q_maybe:{type:"text",question:"Tell us more",next:"q_who_in_charge"},q_why_not_keep:{type:"choice",question:"Why won't you keep using them?",options:[{label:"Our program or use case ended",next:"q_revive"},{label:"They didn't deliver the value we expected",next:"q_devices_going"},{label:"Hardware problems",next:"q_devices_going"},{label:"No staff or time to run them",next:"q_devices_going"},{label:"Other",next:"q_who_in_charge",other:!0}]},q_manage_how:{type:"choice",question:"How do you plan to manage them?",options:[{label:"With another management platform",next:"q_platform"},{label:"With the device manufacturer's own tools",next:"q_who_in_charge"},{label:"Manually, one device at a time",next:"q_manual_why"},{label:"With custom in-house tooling",next:"q_who_in_charge"},{label:"Not sure yet",next:"q_who_in_charge"}]},q_manual_why:{type:"choice",question:"What makes manual management workable for you?",options:[{label:"We only have a few devices",next:"q_who_in_charge"},{label:"We rarely need to update them",next:"q_who_in_charge"},{label:"We have enough dedicated staff",next:"q_who_in_charge"},{label:"Other",next:"q_who_in_charge",other:!0}]},q_platform_price:{type:"text",question:"What made their pricing better for you?",next:"q_who_in_charge"},q_platform_which_feature:{type:"text",question:"Which feature were you missing?",next:"q_who_in_charge"},q_platform_which_bug:{type:"text",question:"What bugs affected your deployment?",next:"q_who_in_charge"},q_platform_contractual:{type:"text",question:"What was the requirement?",next:"q_who_in_charge"},q_keep_pricing:{type:"text",question:"What pricing would have worked for you?",next:"q_who_in_charge"},q_keep_which_feature:{type:"text",question:"Which feature would have kept you?",next:"q_who_in_charge"},q_keep_support:{type:"text",question:"What support or onboarding did you need?",next:"q_who_in_charge"},q_keep_reliability:{type:"text",question:"Where did the platform fall short on reliability?",next:"q_who_in_charge"},q_who_in_charge:{type:"text",question:"Are there any other people involved in this decision",next:"terminal_bye"},q_switched_to:{type:"text",question:"What hardware are you switching to?",next:"q_devices_going"},q_devices_org:{type:"text",question:"Which organization are they going to?",next:"q_who_in_charge"},q_devices_reseller:{type:"text",question:"Which reseller or refurbisher?",next:"q_who_in_charge"},q_sold_to:{type:"text",question:"Who did you sell or pass them on to?",next:"q_who_in_charge"},q_revive:{type:"choice",question:"What would help bring the program back?",options:[{label:"New or better content",next:"q_devices_going"},{label:"Easier setup or management",next:"q_devices_going"},{label:"More training or support",next:"q_devices_going"},{label:"Other",next:"q_devices_going",other:!0}]},terminal_bye:{type:"terminal",question:"We're sorry to see you go."}},s={choice:"Question",text:"Free response",schedule:"Schedule a call",terminal:"End"};function d(e){const t=l[e];return t?"choice"===t.type?t.options.map(((e,t)=>({to:e.next,label:e.label,other:!!e.other,i:t}))):"text"===t.type||"schedule"===t.type?[{to:t.next,label:"",other:!1,i:0}]:[]:[]}let c={};function u(){c={},Object.keys(l).forEach((e=>c[e]=0)),Object.keys(l).forEach((e=>d(e).forEach((e=>{null!=c[e.to]&&c[e.to]++}))))}u();const p=i.getElementById("stage"),h=i.getElementById("canvas"),m=i.getElementById("edges");let g=null,v={},C=[],x={};function f(e,t,n,i){let o=i?t(e).map((e=>e.to)):t[e];if(!o||!o.length)return n[e];const a=o.map((e=>n[e])).filter((e=>null!=e));return a.length?a.reduce(((e,t)=>e+t),0)/a.length:n[e]}function b(){const e=function(){const e={};e[r]=0;let t=!0,n=0;for(;t&&n++<300;)t=!1,Object.keys(l).forEach((n=>
3{null!=e[n]&&d(n).forEach((i=>{var o;const a=e[n]+1;a>(null!==(o=e[i.to])&&void 0!==o?o:-1)&&(e[i.to]=a,t=!0)}))}));return Object.keys(l).forEach((t=>{null==e[t]&&(e[t]=0)})),e}(),t=Math.max(...Object.values(e)),n=[];for(let r=0;r<=t;r++)n.push([]);const i=new Set;!function t(o){i.has(o)||(i.add(o),n[e[o]].push(o),d(o).forEach((e=>t(e.to))))}(r),Object.keys(l).forEach((t=>{i.has(t)||(i.add(t),n[e[t]].push(t))}));const o={};Object.keys(l).forEach((e=>o[e]=[])),Object.keys(l).forEach((e=>d(e).forEach((t=>o[t.to].push(e)))));const a=()=>{const e={};return n.forEach((t=>t.forEach(((t,n)=>e[t]=n)))),e};for(let r=0;r<8;r++){let e=a();for(let i=1;i<=t;i++)n[i].sort(((t,n)=>f(t,o,e)-f(n,o,e))),e=a();for(let i=t-1;i>=0;i--)n[i].sort(((t,n)=>f(t,d,e,!0)-f(n,d,e,!0))),e=a()}return{rows:n,layer:e,maxL:t}}const y=196;let j={x:60,y:40,k:1};function Z(){Object.values(v).forEach((e=>e.remove())),v={},m.innerHTML="",C=[];const{rows:e,layer:t,maxL:n}=b(),i={};e.forEach(((e,t)=>{let n=-(e.length*y+46*(e.length-1))/2;e.forEach((e=>{i[e]={x:n,layer:t},n+=242}))})),Object.keys(l).forEach((e=>{const t=function(e){const t=l[e],n=document.createElement("button"),i=e!==r&&0===c[e];if(n.className="node type-"+t.type+(i?" orphan":""),n.dataset.id=e,n.innerHTML='<div class="kind">'.concat(s[t.type],'</div><div class="q"></div>'),n.querySelector(".q").textContent=t.question,i){const t=document.createElement("span");t.className="node-del",t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.setAttribute("aria-label","Delete orphaned step"),t.textContent="\xd7";const i=t=>{t.stopPropagation(),t.preventDefault(),function(e){if(e===r)return;delete l[e],g===e&&(g=null,B());u(),Z(),z(),J(),Y("Step deleted")}(e)};t.addEventListener("click",i),t.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||i(e)})),n.appendChild(t);const o=document.createElement("div");o.className="meta orphan-note",o.textContent="Orphaned \xb7 nothing links here",n.appendChild(o)}else if(c[e]>1){const t=document.createElement("div");t.className="meta",t.textContent="".concat(c[e]," paths lead here"),n.appendChild(t)}return n.addEventListener("click",(t=>{t.stopPropagation(),function(e){g=e,k(e),O(e)}(e)})),n.addEventListener("mouseenter",(()=>D(e))),n.addEventListener("mouseleave",(()=>D(null))),n}(e);h.appendChild(t),v[e]=t,t.style.left=i[e].x+"px",t.style.top="0px"}));const o=[];e.forEach(((e,t)=>{let n=0;e.forEach((e=>n=Math.max(n,v[e].offsetHeight))),o[t]=n}));const a=[];let p=0;for(let r=0;r<=n;r++)a[r]=p,p+=o[r]+78;
3Object.keys(i).forEach((e=>{i[e].y=a[i[e].layer],v[e].style.top=i[e].y+"px"}));let f=1e9,j=-1e9,E=0;Object.keys(i).forEach((e=>{f=Math.min(f,i[e].x),j=Math.max(j,i[e].x+y),E=Math.max(E,i[e].y+v[e].offsetHeight)}));const M=20-f;Object.keys(i).forEach((e=>{i[e].x+=M,v[e].style.left=i[e].x+"px"}));const I=j-f+40,A=E+40;m.setAttribute("width",I),m.setAttribute("height",A),h.style.width=I+"px",h.style.height=A+"px",x=i;Object.keys(l).forEach((e=>d(e).forEach((t=>{if(!i[t.to])return;const n=i[e].x+98,o=i[e].y+v[e].offsetHeight,a=i[t.to].x+98,r=i[t.to].y,l=Math.max(30,(r-o)/2),s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d","M".concat(n,",").concat(o," C").concat(n,",").concat(o+l," ").concat(a,",").concat(r-l," ").concat(a,",").concat(r)),s.setAttribute("fill","none"),s.dataset.from=e,s.dataset.to=t.to,m.appendChild(s),C.push(s)})))),w(),S(),g&&v[g]&&k(g)}function w(){h.style.transform="translate(".concat(j.x,"px,").concat(j.y,"px) scale(").concat(j.k,")")}function E(){const e=h.offsetWidth,t=h.offsetHeight;if(!e||!t)return;const n=Math.min((p.clientWidth-96)/e,(p.clientHeight-96)/t,1.1);j.k=n,j.x=(p.clientWidth-e*n)/2,j.y=48,w()}function S(e){const t=new Set;if(g){const e=function(e){const t=[[r]],n=new Set([r]);for(;t.length;){const i=t.shift(),o=i[i.length-1];if(o===e)return i;for(const e of d(o))n.has(e.to)||(n.add(e.to),t.push([...i,e.to]))}return[e]}(g);for(let n=0;n<e.length-1;n++)t.add(e[n]+">"+e[n+1])}C.forEach((n=>{const i=n.dataset.from+">"+n.dataset.to,o=t.has(i),a=e&&n.dataset.from===e;let r="var(--line-strong)",l="1.4",s=".4";o&&(r="var(--sel)",l="2.2",s="1"),a&&(r=o?"var(--sel)":"#8a8780",l="2",s="1"),!g||o||a||(s=".28"),n.setAttribute("stroke",r),n.setAttribute("stroke-width",l),n.style.opacity=s}))}function D(e){e&&v[e],S(e),g||Object.entries(v).forEach((t=>{let[n,i]=t;const o=e&&(n===e||d(e).some((e=>e.to===n)));i.classList.toggle("dim",!!e&&!o)}))}function M(){g=null,k(null),B(),S()}function k(e){Object.entries(v).forEach((t=>{let[n,i]=t;i.classList.toggle("sel",n===e),i.classList.remove("dim")})),S()}let I,A,R,T,P=!1;function L(e){const t=p.clientWidth/2,n=p.clientHeight/2,i=Math.min(2.2,Math.max(.25,j.k*e));j.x=t-(t-j.x)*(i/j.k),j.y=n-(n-j.y)*(i/j.k),j.k=i,w()}p.addEventListener("mousedown",(e=>{e.target.closest(".node")||(P=!0,p.classList.add("panning"),I=e.clientX,A=e.clientY,R=j.x,T=j.y)})),a("mousemove",(e=>{P&&(j.x=R+(e.clientX-I),j.y=T+(e.clientY-A),w())})),a("mouseup",(()=>{P=!1,p.classList.remove("panning")})),p.addEventListener("wheel",(e=>{e.preventDefault();const t=p.getBoundingClientRect(),n=e.clientX-t.left,i=e.clientY-t.top,o=Math.exp(.0015*-e.deltaY),a=Math.min(2.2,Math.max(.25,j.k*o));j.x=n-(n-j.x)*(a/j.k),j.y=i-(i-j.y)*(a/j.k),j.k=a,w()}),{passive:!1}),p.addEventListener("click",(e=>{e.target.closest(".node")||M()})),i.getElementById("zoomin").onclick=()=>L(1.2),i.getElementById("zoomout").onclick=()=>L(1/1.2),i.getElementById("fit").onclick=E;const N=i.getElementById("detail"),U=i.getElementById("detailBody"),F=i.getElementById("dkind");function O(e){const t=l[e];F.innerHTML="".concat(s[t.type]);const n="schedule"===t.type?"Heading":"Question";let o='<div class="fieldlbl">'.concat(n,'</div><textarea class="ed-q" id="edQ" rows="2"></textarea>');"terminal"!==t.type&&(o+='<div class="fieldlbl">Type</div><div class="typetoggle" id="typeToggle" role="group" aria-label="Step type">\n <button type="button" data-type="choice" aria-pressed="'.concat("choice"===t.type,'">Question</button>\n <button type="button" data-type="text" aria-pressed="').concat("text"===t.type,'">Free response</button>\n <button type="button" data-type="schedule" aria-pressed="').concat("schedule"===t.type,'">Schedule a call</button></div>')),"choice"===t.type?(o+='<div class="fieldlbl">Answers · '.concat(t.options.length,'</div><div class="opts" id="opts"></div>'),o+='<button class="addopt" id="addOpt">+ Add answer</button>'):"text"===t.type?(o+='<div class="fieldlbl">Placeholder</div><input class="ed-ph" id="edPh" placeholder="Grey hint shown inside the input\u2026"/>',o+='<div class="fieldlbl">Continues to</div><div id="textPick"></div>'):"schedule"===t.type?(o+='<div class="fieldlbl">Subtitle</div><input class="ed-ph" id="edSub" placeholder="Optional line under the heading\u2026"/>',o+='<div class="fieldlbl">Booking embed URL</div><input class="ed-ph" id="edUrl" placeholder="Calendly or ChiliPiper link\u2026"/>',o+='<div class="fieldlbl">Skip button label</div><input class="ed-ph" id="edSkip" placeholder="Skip"/>',o+='<div class="fieldlbl">Continues to</div><div id="schedPick"></div>'):o+='<p class="end-note">Terminal step. Confirms the cancellation and runs the real unsubscribe.</p>',U.innerHTML=o,N.classList.add("open");const a=i.getElementById("edQ");a.value=t.question,a.addEventListener("input",(()=>{t.question=a.value,v[e]&&(v[e].querySelector(".q").textContent=a.value),z()})),a.addEventListener("blur",(()=>{Z(),J()}));const r=i.getElementById("typeToggle");if(r&&r.querySelectorAll("button").forEach((t=>t.onclick=()=>function(e,t){const n=l[e];
3if(n.type===t||"terminal"===t)return;"choice"===n.type&&(n._opts=n.options,n._next=n.options&&n.options[0]&&n.options[0].next);"text"===n.type&&(n._next=n.next,null!=n.placeholder&&(n._ph=n.placeholder));"schedule"===n.type&&(n._next=n.next,null!=n.embedUrl&&(n._url=n.embedUrl),null!=n.subtitle&&(n._sub=n.subtitle),null!=n.skipLabel&&(n._skip=n.skipLabel));const i=n._next||"terminal_bye";delete n.options,delete n.next,delete n.placeholder,delete n.embedUrl,delete n.subtitle,delete n.skipLabel,"choice"===t?(n.type="choice",n.options=n._opts||[{label:"Answer",next:i}]):"text"===t?(n.type="text",n.next=i,null!=n._ph&&(n.placeholder=n._ph)):"schedule"===t&&(n.type="schedule",n.next=i,n.embedUrl=n._url||"",null!=n._sub&&(n.subtitle=n._sub),null!=n._skip&&(n.skipLabel=n._skip));_(e)}(e,t.dataset.type))),"choice"===t.type&&(!function(e){const t=l[e],n=i.getElementById("opts");n.innerHTML="",t.options.forEach(((i,o)=>{const a=document.createElement("div");a.className="optrow"+(i.other?" other":""),a.innerHTML='<div class="opt-top">\n <input class="lbl" value="'.concat(W(i.label),'" placeholder="Answer text" aria-label="Answer text"/>\n <button class="ftbtn" title="Free-text answer: opens a write-in box for the customer" aria-label="Toggle free-text answer" aria-pressed="').concat(i.other?"true":"false",'">Aa</button>\n <button class="del" title="Delete answer" aria-label="Delete answer">×</button>\n </div>\n <div class="opt-goto"><span class="goto-lbl">Leads to</span><div class="pickslot"></div></div>');const r=a.querySelector(".lbl"),l=a.querySelector(".del"),s=a.querySelector(".ftbtn");r.addEventListener("input",(()=>{i.label=r.value,z()})),r.addEventListener("blur",J),s.addEventListener("click",(()=>{i.other=!i.other,_(e)})),a.querySelector(".pickslot").appendChild(H(i.next,((t,n)=>{i.next=t,_(n?t:e)}),e)),l.addEventListener("click",(()=>{t.options.length<=1?Y("Keep at least one answer"):(t.options.splice(o,1),_(e))})),a.addEventListener("mouseenter",(()=>{return t=e,n=i.next,void C.forEach((e=>{e.dataset.from===t&&e.dataset.to===n?(e.setAttribute("stroke","var(--sel)"),e.setAttribute("stroke-width","2.6"),e.style.opacity="1"):e.style.opacity=".12"}));var t,n})),a.addEventListener("mouseleave",(()=>S())),n.appendChild(a)}))}(e),i.getElementById("addOpt").onclick=()=>{var n;t.options.push({label:"New answer",next:(null===(n=t.options[0])||void 0===n?void 0:n.next)||"terminal_bye"}),_(e)}),"text"===t.type){const n=i.getElementById("edPh");n.value=t.placeholder||"",n.addEventListener("input",(()=>{t.placeholder=n.value,z()})),n.addEventListener("blur",J),i.getElementById("textPick").appendChild(H(t.next,((n,i)=>{t.next=n,_(i?n:e)}),e))}if("schedule"===t.type){const n=i.getElementById("edSub");n.value=t.subtitle||"",n.addEventListener("input",(()=>{t.subtitle=n.value,z()})),n.addEventListener("blur",J);const o=i.getElementById("edUrl");o.value=t.embedUrl||"",o.addEventListener("input",(()=>{t.embedUrl=o.value,z()})),o.addEventListener("blur",J);const a=i.getElementById("edSkip");a.value=t.skipLabel||"",a.addEventListener("input",(()=>{t.skipLabel=a.value,z()})),a.addEventListener("blur",J),i.getElementById("schedPick").appendChild(H(t.next,((n,i)=>{t.next=n,_(i?n:e)}),e))}}function _(e){u(),Z(),g=e,k(e),O(e),z(),J()}function z(){te.dataset.done="",ne.dataset.done=""}function B(){N.classList.remove("open")}function W(e){return String(e).replace(/[&<>"]/g,(e=>({"&":"&","<":"<",">":">",'"':"""}[e])))}function V(e,t){return e.length>t?e.slice(0,t)+"\u2026":e}function G(e,t){const n=function(e,t){let n=String(e).toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,26);n||(n="text"===t?"text":"step"),/^q_/.test(n)||(n="q_"+n);let i=n,o=2;for(;l[i];)i=n+"_"+o++;return i}(e,t);return l[n]="text"===t?{type:"text",question:e,next:"terminal_bye"}:"schedule"===t?{type:"schedule",question:e,embedUrl:"",next:"terminal_bye"}:{type:"choice",question:e,options:[{label:"Answer",next:"terminal_bye"}]},u(),n}function H(e,t,n){const o=document.createElement("div");o.className="tpick";const a=document.createElement("button");a.type="button",a.className="tpick-trig";a.innerHTML='<span class="tpick-q">'.concat(W(V(l[e].question,44)),"</span>").concat('<svg class="chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');const s=document.createElement("div");s.className="tpick-pop",s.hidden=!0,s.innerHTML='<input class="tpick-search" placeholder="Search steps or type a new question\u2026" aria-label="Search or create step"/><div class="tpick-list"></div>';const d=s.querySelector(".tpick-search"),c=s.querySelector(".tpick-list");function u(){const t=d.value.trim(),i=t.toLowerCase();c.innerHTML="";const o=Object.keys(l).filter((e=>e!==r&&e!==n&&(e.toLowerCase().includes(i)||l[e].question.toLowerCase().includes(i))));o.forEach((t=>{const n=document.createElement("button");n.type="button",n.className="tpick-item"+(t===e?" sel":""),n.innerHTML='<span class="ck">'.concat(t===e?"\u2713":"",'</span><span class="tpick-q">').concat(W(l[t].question),"</span>"),n.onmousedown=e=>{e.preventDefault(),p(t,!1)},c.appendChild(n)}));const a=o.some((e=>l[e].question.toLowerCase()===i));if(t&&!a){const e=document.createElement("div");e.className="tpick-create",e.innerHTML='<div class="tpick-create-lbl">Create new step</div><div class="tpick-create-q">“'.concat(W(t),'”</div>\n <div class="tpick-create-btns"><button type="button" data-t="choice">+ Question</button><button type="button" data-t="text">+ Free response</button><button type="button" data-t="schedule">+ Schedule</button></div>'),e.querySelectorAll("button").forEach((e=>e.onmousedown=n=>{n.preventDefault(),p(G(t,e.dataset.t),!0)})),c.appendChild(e)}}function p(e,n){h(),t(e,n)}function h(){s.hidden=!0,i.removeEventListener("mousedown",m,!0)}function m(e){o.contains(e.target)||s.contains(e.target)||h()}return a.onclick=()=>{s.hidden?function(){const e=a.getBoundingClientRect(),t=Math.max(e.width,320);s.style.width=t+"px",s.style.left=Math.min(e.left,innerWidth-t-12)+"px",s.hidden=!1;const n=Math.min(340,s.scrollHeight+16);e.bottom+n+8>innerHeight?(s.style.top="",s.style.bottom=innerHeight-e.top+4+"px"):(s.style.bottom="",s.style.top=e.bottom+4+"px"),d.value="",u(),setTimeout((()=>d.focus()),0),i.addEventListener("mousedown",m,!0)}():h()},d.addEventListener("input",u),d.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.stopPropagation(),h())})),o.appendChild(a),o.appendChild(s),o}let q;function Y(e){const t=i.getElementById("toast");t.textContent=e,t.classList.add("show"),clearTimeout(q),q=setTimeout((()=>t.classList.remove("show")),1900)}i.getElementById("detailClose").onclick=M,i.getElementById("copyTree").onclick=()=>{n({root:r,nodes:l}),Y("Saving\u2026")};const K=i.getElementById("undoBtn");let X=[],Q=-1;function J(){const e=JSON.stringify({t:l,r:r});Q>=0&&X[Q]===e||(X=X.slice(0,Q+1),X.push(e),Q=X.length-1,X.length>150&&(X.shift(),Q--),$())}function $(){K.disabled=Q<=0}function ee(){Q<=0||(Q--,function(e){const t=JSON.parse(e);Object.keys(l).forEach((e=>delete l[e])),Object.assign(l,t.t),r=t.r,u(),Z(),z(),g&&l[g]?(k(g),O(g)):(g=null,B(),S())}(X[Q]),$(),Y("Undone"))}K.onclick=ee;const te=i.getElementById("branches"),ne=i.getElementById("outline");function ie(){te.innerHTML="",te.appendChild(oe(r,new Set))}function oe(e,t){const n=l[e],i=document.createElement("div"),o=document.createElement("div");o.className="bt-node type-"+n.type,o.innerHTML='<div class="kind">'.concat(s[n.type],'</div><div class="q">').concat(W(n.question),"</div>"),i.appendChild(o);const a=d(e);if(!a.length)return i;const r=document.createElement("div");return r.className="bt-branch",a.forEach((e=>{const n=document.createElement("div");if(e.label){const t=document.createElement("div");t.className="bt-edge",t.innerHTML='<span class="opt'.concat(e.other?" other":"",'">').concat(W(e.label),"</span>"),n.appendChild(t)}if(c[e.to]>1&&t.has(e.to)){const t=document.createElement("div");t.className="bt-ref",t.innerHTML='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h14M13 6l6 6-6 6"/></svg><span>joins <b>'.concat(W(V(l[e.to].question,40)),"</b></span>"),n.appendChild(t)}else c[e.to]>1&&t.add(e.to),n.appendChild(oe(e.to,t));r.appendChild(n)})),i.appendChild(r),i}function ae(){ne.innerHTML="";const e=document.createElement("div");e.className="ol",e.appendChild(re(r,new Set)),ne.appendChild(e)}function re(e,t){const n=l[e],i=d(e),o=i.length>0,a=document.createElement("details");o&&(a.open=!0);const r=document.createElement("summary");if(o||r.classList.add("leaf"),r.innerHTML='<span class="tw"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg></span><span class="dot type-'.concat(n.type,'"></span><span class="qt">').concat(W(n.question),"</span>"),a.appendChild(r),o){const e=document.createElement("div");
3e.className="kids",i.forEach((n=>{const i=n.label?'<span class="opt'.concat(n.other?" other":"",'">').concat(W(n.label)," →</span>"):"";if(c[n.to]>1&&t.has(n.to)){const t=document.createElement("div");t.style.padding="6px 10px",t.innerHTML='<span class="dot type-'.concat(l[n.to].type,'" style="display:inline-block;vertical-align:middle;margin-right:6px"></span>').concat(i,'<span class="ref">→ ').concat(W(V(l[n.to].question,44)),"</span>"),e.appendChild(t)}else{if(c[n.to]>1&&t.add(n.to),i){const t=document.createElement("div");t.style.margin="4px 0 0 30px",t.innerHTML=i,e.appendChild(t)}e.appendChild(re(n.to,t))}})),a.appendChild(e)}return a}const le=i.getElementById("graphTools"),se={graph:p,branches:te,outline:ne};let de="graph";return i.querySelectorAll(".seg button").forEach((e=>e.addEventListener("click",(()=>{return t=e.dataset.mode,de=t,i.querySelectorAll(".seg button").forEach((e=>e.setAttribute("aria-pressed",e.dataset.mode===t))),Object.entries(se).forEach((e=>{let[n,i]=e;return i.classList.toggle("hidden",n!==t)})),le.style.display="graph"===t?"inline-flex":"none",void("graph"===t?g&&N.classList.add("open"):(B(),"branches"===t&&"1"!==te.dataset.done&&(ie(),te.dataset.done="1"),"outline"===t&&"1"!==ne.dataset.done&&(ae(),ne.dataset.done="1")));var t})))),Z(),requestAnimationFrame(E),J(),a("resize",(()=>{"graph"===de&&E()})),a("keydown",(e=>{if("Escape"!==e.key){if((e.metaKey||e.ctrlKey)&&"z"===e.key.toLowerCase()){const t=i.activeElement;if(t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName))return;e.preventDefault(),ee()}}else M()})),{loadTree:function(e){e&&e.nodes&&Object.keys(e.nodes).length&&(Object.keys(l).forEach((e=>delete l[e])),Object.assign(l,e.nodes),Object.keys(l).forEach((e=>{const t=l[e];"choice"===t.type&&(Array.isArray(t.options)||(t.options=[]),t.options.forEach((e=>{e.other=!!e.captureText,delete e.captureText})))})),r=e.root&&l[e.root]?e.root:Object.keys(l)[0],g=null,B(),u(),Z(),requestAnimationFrame(E),X=[],Q=-1,J())},destroy:function(){o.forEach((e=>{let[t,n,i]=e;return window.removeEventListener(t,n,i)})),o.length=0,clearTimeout(q),i.innerHTML=""}}}const iG=e=>"choice"===e.type?(0,o.map)(e.options,(e=>e.next)):"text"===e.type||"schedule"===e.type?[e.next]:[],oG=e=>{if(!e.root||!e.nodes[e.root])return"Set a starting question before saving the survey.";const t=(e=>{let t=null;return(0,o.forEach)(e,((e,n)=>{t||"choice"===e.type&&0===e.options.length&&(t=n)})),t})(e.nodes);if(t)return'The question "'.concat(t,'" has no answers. Add at least one answer or remove the question.');const n=(e=>{const t=[];return(0,o.forEach)(e,((n,i)=>{(0,o.forEach)(iG(n),(n=>{e[n]||t.push("".concat(i," \u2192 ").concat(n))}))})),t})(e.nodes);if(n.length>0)return"Some answers lead to a missing question: ".concat(n.join(", "),".");const i=((e,t)=>{const n=new Set,i=new Set,a=[];let r=null;const l=t=>{if(r||i.has(t))return;const s=e[t];s&&(n.has(t)?r=[...a.slice(a.indexOf(t)),t]:(n.add(t),a.push(t),(0,o.forEach)(iG(s),(e=>l(e))),a.pop(),n.delete(t),i.add(t)))};return l(t),r})(e.nodes,e.root);return i?"Answers loop and never reach an ending: ".concat(i.join(" \u2192 "),". Point one answer to an ending instead."):null},aG=()=>{const e=(0,a.useRef)(null),t=(0,a.useRef)(null),[n,r]=(0,a.useState)(null),{contentAreaHeight:l}=(0,ud.MS)(),{notify:s}=(0,ie.o)(),d=(0,X.u7)(),u=(0,Fe.ji)({method:"get",path:"super-admin/churn-survey"}),h=(0,Fe.ji)({method:"patch",path:"super-admin/churn-survey"}),m=(0,a.useCallback)((async e=>{if(!d)return void s({severity:"warning",message:"The churn survey is read-only for Super Viewers."});const t={root:(n=e).root,nodes:(0,o.mapValues)(n.nodes,((e,t)=>{var n;switch(e.type){case"choice":return{id:t,type:"choice",question:e.question,options:(0,o.map)(e.options,((e,n)=>({id:e.id||"".concat(t,"_opt").concat(n),label:e.label,next:e.next,...e.other||e.captureText?{captureText:!0}:{}}))),...null!=e.otherLabel?{otherLabel:e.otherLabel}:{},...null!=e.otherPlaceholder?{otherPlaceholder:e.otherPlaceholder}:{}};case"text":return{id:t,type:"text",question:e.question,next:e.next,...null!=e.placeholder?{placeholder:e.placeholder}:{}};case"schedule":return{id:t,type:"schedule",question:e.question,embedUrl:null!==(n=e.embedUrl)&&void 0!==n?n:"",next:e.next,...null!=e.subt
3itle?{subtitle:e.subtitle}:{},...null!=e.skipLabel?{skipLabel:e.skipLabel}:{}};case"terminal":return{id:t,type:"terminal",question:e.question}}}))};var n;const i=oG(t);if(i)s({severity:"error",message:i});else try{await h.requestAsync({data:t}),s({severity:"success",message:"Churn survey saved."})}catch{s({severity:"error",message:"Could not save the churn survey."})}}),[d,h,s]),g=(0,a.useRef)(m);return g.current=m,(0,a.useEffect)((()=>{let e=!1;return(async()=>{try{const t=await u.requestAsync({});!e&&null!==t&&void 0!==t&&t.config&&r({root:t.config.root,nodes:t.config.nodes})}catch{e||s({severity:"error",message:"Could not load the churn survey."})}})(),()=>{e=!0}}),[]),(0,a.useEffect)((()=>{if(e.current)return t.current=nG(e.current,{onSave:e=>g.current(e)}),()=>{var e;null===(e=t.current)||void 0===e||e.destroy(),t.current=null}}),[]),(0,a.useEffect)((()=>{var e;n&&(null===(e=t.current)||void 0===e||e.loadTree(n))}),[n]),(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Super Tools",path:(0,c.LT)(c._j.superTools)},{title:"Churn Survey"}],disableGlobalSearch:!0,noBottomPadding:!0,children:(0,p.jsx)(i.Z,{sx:{height:"calc(".concat(l,")")},children:(0,p.jsx)("div",{ref:e,style:{width:"100%",height:"100%"}})})})},rG=(0,a.memo)((e=>{let{open:t,packageName:n,version:i,onClose:o,onConfirm:a}=e;return(0,p.jsx)(Ni.Y,{open:t,onClose:o,title:"Delete Failsafe Deployment",submitText:"Delete",cancelText:"Cancel",hideConfirmation:!0,onSubmit:a,children:(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["Are you sure you want to delete the failsafe deployment for"," ",(0,Vs.wb)(n)," ",i,"? This action cannot be undone."]})})}));rG.displayName="FailsafeDeleteDialog";const lG={needs_failsafe:"Needs Failsafe",looping_risk:"Looping Risk",failsafe_deployed:"Deployed",updated_past:"Updated Past",unknown:"Unknown"},sG={needs_failsafe:"warning",looping_risk:"error",failsafe_deployed:"success",updated_past:"default",unknown:"info"},dG=(0,da.Cl)(),cG=[dG.accessor("serial",{id:"serial",header:"Serial",size:200,enableSorting:!1,cell:e=>{let{row:t}=e;return(0,p.jsx)(v.Z,{variant:"body2",sx:{fontFamily:"monospace",overflow:"hidden",textOverflow:"ellipsis"},noWrap:!0,children:t.original.isPlaceholder?(n=t.original.serial,"deploy-to-all-devices"===n?"All devices":"No devices (placeholder)"):t.original.serial});var n}}),dG.display({id:"select",header:"Select",size:60,cell:e=>{var t;let{row:n,table:o}=e;const a=null===(t=o.options.meta)||void 0===t?void 0:t.readOnly,r=n.original.isPlaceholder||!n.getCanSelect();return(0,p.jsx)(ee.Z,{title:a&&r?"Super Viewer accounts have read-only access":"",children:(0,p.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:1,height:1},children:(0,p.jsx)(tP.V,{checked:n.getIsSelected(),disabled:r,onClick:n.getToggleSelectedHandler(),size:"small"})})})}}),dG.accessor("deviceName",{id:"deviceName",header:"Device Name",size:180,enableSorting:!1,cell:e=>{var t;let{getValue:n}=e;return(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:null!==(t=n())&&void 0!==t?t:"\u2014"})}}),dG.accessor("organizationName",{id:"organizationName",header:"Organization",size:180,enableSorting:!1,cell:e=>{var t;let{getValue:n}=e;return(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:null!==(t=n())&&void 0!==t?t:"\u2014"})}}),dG.accessor("online",{id:"online",header:"Online",size:60,enableSorting:!1,cell:e=>{let{getValue:t}=e;const n=t();return(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center"},children:(0,p.jsx)(i.Z,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:!0===n?"success.main":!1===n?"grey.400":"grey.300"}})})}}),dG.accessor("installedVersionName",{id:"installedVersionName",header:"Version",size:120,enableSorting:!1,cell:e=>{let{getValue:t}=e;return(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:t()||"\u2014"})}}),dG.accessor("category",{id:"category",header:"Failsafe Status",size:160,enableSorting:!1,cell:e=>{let{getValue:t}=e;return(0,p.jsx)(ke.Z,{label:lG[t()],color:sG[t()],size:"small",variant:"outlined"})}})],uG="Super Viewer accounts have read-only access",pG={needs_fail
3safe:{label:"Needs Failsafe",color:"warning.main",description:"Device version is lower than the failsafe version"},looping_risk:{label:"Looping Risk",color:"error.main",description:"Same version code but different build. Device may keep re-downloading."},failsafe_deployed:{label:"Failsafe Deployed",color:"success.main",description:"Device has the failsafe build installed"},updated_past:{label:"Updated Past Failsafe",color:"text.secondary",description:"Device version is higher than the failsafe version"},unknown:{label:"Unknown",color:"grey.500",description:"Device category could not be determined"}},hG=["looping_risk","needs_failsafe","failsafe_deployed","updated_past","unknown"],mG=(0,a.memo)((e=>{let{category:t,rows:n}=e;const[o,r]=(0,a.useState)(!0),l=pG[t],s=(0,a.useCallback)((()=>{r((e=>!e))}),[]),d=n.length>200,c=d?n.slice(0,200):n;return 0===n.length?null:(0,p.jsxs)(i.Z,{sx:{marginBottom:1},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",onClick:s,sx:{cursor:"pointer",paddingY:.5,paddingX:1,borderRadius:1,"&:hover":{bgcolor:"action.hover"}},children:[(0,p.jsx)(i.Z,{sx:{width:10,height:10,borderRadius:"50%",bgcolor:l.color,flexShrink:0}}),(0,p.jsxs)(v.Z,{variant:"subtitle2",sx:{fontWeight:"bold"},children:[l.label," (",n.length,")"]}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:l.description}),(0,p.jsx)(i.Z,{sx:{flexGrow:1}}),(0,p.jsx)(fi.Z,{fontSize:"small",sx:{transform:o?"rotate(180deg)":"none",transition:"transform 0.2s"}})]}),(0,p.jsxs)(qn.Z,{in:o,unmountOnExit:!0,children:[c.map((e=>(0,p.jsx)(_k.MV,{row:e,rowHeight:48},e.id))),d&&(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",sx:{paddingX:1,paddingY:.5},children:["Showing ",200," of ",n.length," devices"]})]})]})}));mG.displayName="CategorySection";const gG=(0,a.memo)((e=>{let{failsafeVersionId:t,readOnly:n,onSerialsRemoved:o,onDelete:r}=e;const l=(0,Fe.ji)({method:"get",path:"admin/failsafe-versions/:id/devices"}),s=(0,Fe.ji)({method:"patch",path:"admin/failsafe-versions/:id/serials"}),[d,c]=(0,a.useState)([]),[u,h]=(0,a.useState)(!0),[g,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)({}),y=(0,a.useMemo)((()=>({readOnly:n})),[n]);(0,a.useEffect)((()=>{let e=!1;return h(!0),x(!1),l.requestAsync({params:{id:t}}).then((t=>{e||(c(t),h(!1))})).catch((()=>{e||(x(!0),h(!1))})),()=>{e=!0}}),[t]);const j=(0,sa.b7)({columns:cG,data:d,state:{rowSelection:f},onRowSelectionChange:b,enableRowSelection:e=>!e.original.isPlaceholder&&!n,getRowId:(e,t)=>"".concat(e.serial,"-").concat(t),getCoreRowModel:(0,da.sC)(),getFilteredRowModel:(0,da.vL)(),meta:y}),Z=(0,a.useMemo)((()=>{const e={needs_failsafe:[],failsafe_deployed:[],looping_risk:[],updated_past:[],unknown:[]};for(const t of j.getRowModel().rows){const n=e[t.original.category];n?n.push(t):e.unknown.push(t)}return e}),[d,j]),w=(0,a.useMemo)((()=>j.getSelectedRowModel().rows.map((e=>e.original.serial))),[j]),E=(0,a.useCallback)((()=>{if(0===w.length)return;const e=[...w];s.request({params:{id:t},data:{serialsToRemove:e},successMessage:"Removed ".concat(e.length," serial(s)"),errorMessage:"Failed to remove serials",onSuccess:t=>{const n=new Set(e);c((e=>e.filter((e=>!n.has(e.serial))))),b((e=>{const t={...e};for(const o of Object.keys(t)){var i;n.has(null!==(i=o.split("-")[0])&&void 0!==i?i:"")&&delete t[o]}return t})),o(t)}})}),[t,w,s,o]);return u?(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",paddingY:3},children:(0,p.jsx)(Zi.Z,{size:24})}):(0,p.jsxs)(m.Z,{spacing:1,sx:{paddingY:1},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[w.length>0&&(0,p.jsx)(ee.Z,{title:n?uG:"",children:(0,p.jsx)("span",{children:(0,p.jsxs)(C.Z,{size:"small",variant:"outlined",color:"error",disabled:n||s.pending,onClick:E,children:["Remove from failsafe targeting (",w.length,")"]})})}),(0,p.jsx)(i.Z,{sx:{flexGrow:1}}),(0,p.jsx)(ee.Z,{title:n?uG:"",children:(0,p.jsx)("span",{children:(0,p.jsx)(C.Z,{size:"small",variant:"outlined",color:"error",disabled:n,onClick:r,children:"Delete Failsafe Deployment"})})})]}),(0,p.jsx)(Ok.pS,{table:j}),hG.map((e=>(0,p.jsx)(mG,{category:e,rows:Z[e]},e))),!g&&0===d.length&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",sx:{paddingY:2,textAlign:"center"},children:"No devices"}),g&&(0,p.jsx)(v.Z,{variant:"body2",color:"error",sx:{paddingY:2,textAlign:"center"},children:"Failed to load devices"})]})}));gG.displayName="FailsafeEntryDetail";const vG=["all","prod","prod.pico2","prod.nohome","prod.pico"],CG=(0,a.memo)((e=>{let{value:t,onChange:n}=e;const i=(0,a.useCallback)(((e,t)=>{null!==t&&n(t)}),[n]);return(0,p.jsx)(Ef.Z,{value:t,exclusive:!0,onChange:i,size:"small",children:vG.map((e=>(0,p.jsx)(Sf.Z,{value:e,children:"all"===e?"All":e},e)))})}));CG.displayName="FailsafeListFilter";const xG=(0,a.memo)((e=>{let{entry:t}=e;const n=t.categoryCounts;return(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[n.needsFailsafeCount>0&&(0,p.jsx)(ke.Z,{label:"".concat(n.needsFailsafeCount," remaining"),color:"warning",size:"small"}),n.loopingRiskCount>0&&(0,p.jsx)(ke.Z,{label:"".concat(n.loopingRiskCount," looping"),color:"error",size:"small"}),n.failsafeDeployedCount>0&&(0,p.jsx)(ke.Z,{label:"".concat(n.failsafeDeployedCount," deployed"),color:"success",size:"small"}),n.updatedPastCount>0&&(0,p.jsx)(ke.Z,{label:"".concat(n.updatedPastCount," updated past"),color:"default",size:"small"})]})}));xG.displayName="FailsafeCategoryChips";const fG=e=>{const t=new Date(e);return isNaN(t.getTime())?"\u2014":t.toLocaleDateString()},bG="https://console.firebase.google.com/project/".concat("mighty-platform-dev","/firestore/databases/-default-/data/misc/failsafeAdminApp/versions"),yG=(0,da.Cl)(),jG=[yG.accessor("versionName",{id:"version",header:"Version",size:160,sortingFn:(e,t)=>((e,t)=>{const n=(0,Vs.FE)(e),i=(0,Vs.FE)(t),o=Math.max(n.length,i.length);for(let l=0;l<o;l++){var a,r;const e=(null!==(a=n[l])&&void 0!==a?a:0)-(null!==(r=i[l])&&void 0!==r?r:0);if(0!==e)return e}return 0})(e.original.versionName||"",t.original.versionName||""),cell:e=>{let{row:t}=e;return(0,p.jsx)(v.Z,{variant:"body2",sx:{fontWeight:"medium"},noWrap:!0,children:t.original.versionName||"v".concat(t.original.version)})}}),yG.accessor("createdDate",{id:"createdDate",header:"Created",size:140,sortDescFirst:!0,
3cell:e=>{let{getValue:t}=e;return(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:fG(t())})}}),yG.accessor("packageName",{id:"package",header:"Package",size:200,enableSorting:!1,cell:e=>{let{getValue:t}=e;return(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",noWrap:!0,children:(0,Vs.wb)(t())})}}),yG.accessor("targetCount",{id:"targetCount",header:"Targets",size:140,cell:e=>{let{row:t}=e;const n=t.original;return(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:n.hasPlaceholders?"All devices".concat(n.targetCount>0?" + ".concat(n.targetCount):""):"".concat(n.targetCount," targets")})}}),yG.display({id:"statuses",header:"Statuses",size:250,cell:e=>{let{row:t}=e;return(0,p.jsx)(xG,{entry:t.original})}}),yG.display({id:"link",header:"",size:40,cell:e=>{let{row:t}=e;return(0,p.jsx)(i.Z,{component:"a",href:"".concat(bG,"/").concat(t.original.id),target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),sx:{display:"flex",alignItems:"center",color:"text.secondary","&:hover":{color:"primary.main"}},title:"Open in Firestore",children:(0,p.jsx)(Mu.Z,{fontSize:"small"})})}})],ZG=()=>{const e=(0,Fe.ji)({method:"get",path:"admin/failsafe-versions"}),t=(0,Fe.ji)({method:"delete",path:"admin/failsafe-versions/:id"}),n=(0,X.u7)(),o=(0,X.JW)(),r=!n&&!o,[l,s]=(0,a.useState)([]),[d,c]=(0,a.useState)(!0),[u,h]=(0,a.useState)(!1),[g,C]=(0,a.useState)("all"),[x,f]=(0,a.useState)(null),[b,y]=(0,a.useState)(null),[j,Z]=(0,a.useState)([{id:"createdDate",desc:!0}]),w=(0,a.useCallback)((()=>{c(!0),h(!1),e.requestAsync().then((e=>{s(e),c(!1)})).catch((()=>{h(!0),c(!1)}))}),[]);(0,a.useEffect)((()=>{w()}),[w]);const E=(0,a.useMemo)((()=>"all"===g?l:l.filter((e=>{var t,n;return null!==(t=null===(n=e.packageName)||void 0===n?void 0:n.endsWith(".".concat(g)))&&void 0!==t&&t}))),[l,g]),S=(0,sa.b7)({columns:jG,data:E,state:{sorting:j},onSortingChange:Z,enableSortingRemoval:!1,getRowId:e=>e.id,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),D=S.getRowModel().rows,M=(0,a.useCallback)((e=>{f((t=>t===e?null:e))}),[]),k=(0,a.useCallback)((e=>{C(e)}),[]),I=(0,a.useCallback)((e=>{s((t=>t.map((t=>t.id===e.id?e:t))))}),[]),A=(0,a.useCallback)((async()=>{b&&(await t.requestAsync({params:{id:b.id},successMessage:"Failsafe deployment deleted",errorMessage:"Failed to delete failsafe deployment"}),s((e=>e.filter((e=>e.id!==b.id)))),f(null),y(null))}),[b,t]);return(0,p.jsxs)(Mn.C,{toolbarBreadcrumbs:[{title:"Failsafe Admin"}],disableGlobalSearch:!0,children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{paddingX:2,paddingY:2},children:[(0,p.jsx)(v.Z,{variant:"h5",children:"Failsafe Versions"}),(0,p.jsx)(CG,{value:g,onChange:k})]}),d?(0,p.jsx)(i.Z,{sx:{display:"flex",justifyContent:"center",paddingY:6},children:(0,p.jsx)(Zi.Z,{})}):u?(0,p.jsx)(v.Z,{variant:"body1",color:"error",sx:{paddingY:4,textAlign:"center"},children:"Failed to load failsafe entries"}):0===D.length?(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",sx:{paddingY:4,textAlign:"center"},children:"No failsafe entries found"}):(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(Ok.pS,{table:S}),D.map((e=>{const t=x===e.id;return(0,p.jsxs)(i.Z,{children:[(0,p.jsx)(_k.MV,{row:e,rowHeight:52,hover:!0,onClick:()=>M(e.id),sx:{cursor:"pointer",...t&&{borderBottomColor:"transparent"}}}),t&&(0,p.jsx)(i.Z,{sx:{paddingX:2,paddingBottom:2,borderBottom:1,borderColor:"divider"},children:(0,p.jsx)(gG,{failsafeVersionId:e.original.id,readOnly:r,onSerialsRemoved:I,onDelete:()=>y(e.original)})})]},e.id)}))]})]}),b&&(0,p.jsx)(rG,{open:!0,packageName:b.packageName,version:b.versionName||"v".concat(b.version),onClose:()=>y(null),onConfirm:A})]})},wG=e=>{let{value:t,options:n,onChange:i,size:a="small",fullWidth:r=!0}=e;return(0,p.jsx)(Ef.Z,{value:t,exclusive:!0,size:a,onChange:(e,t)=>
3{t&&i(t)},sx:{backgroundColor:y.DG.grey[200],...r&&{width:1}},children:(0,o.map)(n,(e=>(0,p.jsx)(Sf.Z,{value:e.value,disabled:e.disabled,sx:{border:0,borderRadius:"4px !important",height:30,...r&&{flex:1},minWidth:0,whiteSpace:"nowrap","&.Mui-disabled":{border:0},"&.Mui-selected, &.Mui-selected:hover":{color:y.DG.white,backgroundColor:y.DG.purple[700],boxShadow:2,borderRadius:1,zIndex:1},"&:hover":{backgroundColor:y.DG.grey[300],borderRadius:1,zIndex:0}},children:e.label},e.value)))})},EG=e=>{let{url:t,sx:n}=e;const{notify:i}=(0,ie.o)(),o=(0,a.useCallback)((e=>{e.stopPropagation(),navigator.clipboard.writeText(t).then((()=>i({severity:"success",message:"Image URL copied"}))).catch((()=>i({severity:"error",message:"Could not copy the URL"})))}),[t,i]);return(0,p.jsx)(ee.Z,{title:"Copy image URL",children:(0,p.jsx)(x.Z,{size:"small",onClick:o,"aria-label":"copy image URL",sx:n,children:(0,p.jsx)(oe.Z,{fontSize:"small"})})})};EG.displayName="MarketplaceCopyUrlButton";const SG=e=>{let{entityType:t,docId:n,label:i="Upload image",onUploaded:o}=e;const r=(0,Fe.ji)({method:"post",path:"super-admin/marketplace-images/upload-url"}),l=(0,Fe.ji)({method:"post",path:"super-admin/marketplace-images/finalize"}),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)(void 0),h=(0,a.useCallback)((async e=>{u(void 0),d(!0);try{const a=await(e=>new Promise(((t,n)=>{const i=URL.createObjectURL(e),o=new Image;o.onload=()=>{const e=document.createElement("canvas"),a=Math.min(1,2048/Math.max(o.naturalWidth,o.naturalHeight));e.width=Math.round(o.naturalWidth*a),e.height=Math.round(o.naturalHeight*a);const r=e.getContext("2d");if(!r)return URL.revokeObjectURL(i),void n(new Error("Could not get a canvas context"));r.drawImage(o,0,0,e.width,e.height),e.toBlob((e=>{URL.revokeObjectURL(i),e?t(e):n(new Error("WebP conversion failed"))}),"image/webp",.9)},o.onerror=()=>{URL.revokeObjectURL(i),n(new Error("Could not load the selected image"))},o.src=i})))(e),s="".concat((i=e.name,i.replace(/\.[^.]+$/,"").replace(/[^A-Za-z0-9._-]/g,"-").replace(/^[^A-Za-z0-9]+/,"")||"image"),"-").concat(Date.now(),".webp"),c=await r.requestAsync({data:{entityType:t,docId:n,filename:s}});if(!c)throw new Error("Could not get an upload URL");const u=new AbortController;let p;const h=()=>{p&&clearTimeout(p),p=setTimeout((()=>u.abort()),3e4)};h();try{await Dg().request({method:"put",url:c.uploadUrl,data:a,headers:{"content-type":c.contentType},signal:u.signal,onUploadProgress:h})}finally{p&&clearTimeout(p)}const m=await l.requestAsync({data:{storagePath:c.storagePath}});if(!m)throw new Error("Could not finalize the upload");null===o||void 0===o||o(m.publicUrl)}catch(a){u(Dg().isCancel(a)?"Upload stalled. Check your connection and try again.":(e=>{if((0,Fe.IZ)(e)){var t,n;const i=null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message;if(i)return"string"===typeof i?i:JSON.stringify(i)}return e instanceof Error?e.message:"Upload failed"})(a))}finally{d(!1)}var i}),[t,n,r,l,o]);return(0,p.jsxs)(m.Z,{spacing:1,sx:{border:1,borderColor:"divider",borderRadius:1,padding:2,bgcolor:"grey.50"},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",children:[(0,p.jsxs)(C.Z,{variant:"outlined",component:"label",size:"small",disabled:s,"data-testid":"marketplaceImageUpload_button",children:[i,(0,p.jsx)("input",{hidden:!0,type:"file",accept:"image/png,image/jpeg,image/webp",onChange:e=>{var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];n&&h(n),e.target.value=""}})]}),s&&(0,p.jsx)(Zi.Z,{size:18}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Your image converts to webp, uploads to public hosting, and fills in the URL."})]}),c&&(0,p.jsx)(v.Z,{variant:"caption",color:"error",children:c})]})},DG=(e,t)=>{var n,i;return null!==(n=null===(i=(0,o.find)(t,(t=>t.value===e)))||void 0===i?void 0:i.label)&&void 0!==n?n:e},MG=e=>{let{label:t,value:n,options:i,onChange:a}=e;return(0,p.jsx)(Ic.Z,{freeSolo:!0,autoSelect:!0,handleHomeEndKeys:!0,size:"small",options:(0,o.map)(i,(e=>e.value)),getOptionLabel:e=>DG(e,i),value:n||null,onChange:(e,t)=>
3a(null!==t&&void 0!==t?t:""),renderInput:e=>(0,p.jsx)(Ln.Z,{...e,label:t,size:"small"})})},kG=e=>{let{items:t,onChange:n,stringOptions:i}=e;const a=t,r=null!==i&&void 0!==i?i:[];return(0,p.jsx)(Ic.Z,{multiple:!0,freeSolo:!0,autoSelect:!0,handleHomeEndKeys:!0,disableCloseOnSelect:!0,size:"small",options:(0,o.map)(r,(e=>e.value)),getOptionLabel:e=>DG(e,r),value:a,onChange:(e,t)=>n(t),renderInput:e=>(0,p.jsx)(Ln.Z,{...e,placeholder:"Add value",size:"small"})})},IG=e=>{let{items:t,onChange:n,objectKeys:a,objectKeyOptions:r}=e;const l=t,s=(e,t,i)=>{n((0,o.map)(l,((n,o)=>o===e?{...n,[t]:i}:n)))},d=(e,t)=>{if(t<0||t>=l.length)return;const i=[...l],o=i[e];i[e]=i[t],i[t]=o,n(i)};return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,o.map)(l,((e,t)=>(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",sx:{border:1,borderColor:"divider",borderRadius:1,padding:1},children:[(0,p.jsx)(i.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(".concat(a.length,", 1fr)"),gap:1,flexGrow:1},children:(0,o.map)(a,(n=>{var i;const o=null===r||void 0===r?void 0:r[n],a=String(null!==(i=e[n])&&void 0!==i?i:"");return o?(0,p.jsx)(MG,{label:n,value:a,options:o,onChange:e=>s(t,n,e)},n):(0,p.jsx)(Ln.Z,{size:"small",label:n,value:a,onChange:e=>s(t,n,e.target.value)},n)}))}),(0,p.jsxs)(m.Z,{direction:"row",spacing:.25,alignItems:"center",children:[(0,p.jsx)(x.Z,{size:"small",disabled:0===t,onClick:()=>d(t,t-1),"aria-label":"move up",children:(0,p.jsx)(oL.Z,{fontSize:"small"})}),(0,p.jsx)(x.Z,{size:"small",disabled:t===l.length-1,onClick:()=>d(t,t+1),"aria-label":"move down",children:(0,p.jsx)(mh.Z,{fontSize:"small"})}),(0,p.jsx)(x.Z,{size:"small",onClick:()=>n((0,o.filter)(l,((e,n)=>n!==t))),"aria-label":"remove",children:(0,p.jsx)(Gl.Z,{fontSize:"small"})})]})]},t))),(0,p.jsx)(i.Z,{children:(0,p.jsx)(C.Z,{size:"small",onClick:()=>{const e={};(0,o.forEach)(a,(t=>{e[t]=""})),n([...l,e])},children:"Add row"})})]})},AG=e=>{let{label:t,items:n,onChange:i,objectKeys:o,stringOptions:a,objectKeyOptions:r}=e;return(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"caption",fontWeight:600,color:"text.secondary",children:t}),o?(0,p.jsx)(IG,{items:n,onChange:i,objectKeys:o,objectKeyOptions:r}):(0,p.jsx)(kG,{items:n,onChange:i,stringOptions:a})]})},RG=(e,t,n)=>{if(n<0||n>=e.length)return e;const i=[...e],o=i[t],a=i[n];return i[t]=a,i[n]=o,i},TG={bgcolor:e=>(0,Dr.Fq)(e.palette.common.black,.55),color:"common.white",padding:.5,"&:hover":{bgcolor:e=>(0,Dr.Fq)(e.palette.common.black,.75)}},PG=e=>{let{value:t,onChange:n}=e;return 0===t.length?(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"No marketing media."}):(0,p.jsx)(m.Z,{direction:"row",sx:{flexWrap:"wrap",gap:1.5,paddingBottom:1},children:(0,o.map)(t,((e,a)=>(0,p.jsxs)(i.Z,{sx:{position:"relative",flex:"0 0 auto"},children:[e.type===mO.VIDEO?(0,p.jsx)(i.Z,{component:"video",src:e.src,controls:!0,sx:{height:120,width:190,borderRadius:1,border:1,borderColor:"divider",bgcolor:"grey.900"}}):(0,p.jsx)(i.Z,{component:"img",src:e.src,sx:{height:120,width:190,borderRadius:1,border:1,borderColor:"divider",bgcolor:"grey.900",objectFit:"cover"}}),(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,sx:{position:"absolute",top:4,right:4},children:[(0,p.jsx)(EG,{url:e.src,sx:TG}),(0,p.jsx)(x.Z,{size:"small",sx:TG,disabled:0===a,onClick:()=>n(RG(t,a,a-1)),"aria-label":"move left",children:"\u2190"}),(0,p.jsx)(x.Z,{size:"small",sx:TG,disabled:a===t.length-1,onClick:()=>n(RG(t,a,a+1)),"aria-label":"move right",children:"\u2192"}),(0,p.jsx)(x.Z,{size:"small",sx:TG,onClick:()=>n((0,o.filter)(t,((e,t)=>t!==a))),"aria-label":"remove",children:"\u2715"})]})]},e.src)))})};let LG,NG;!function(e){e.APP_DEVELOPER="App Developer",e.CUSTOM_CONTENT_DEVELOPER="Custom Content Developer",e.CONTENT_PLATFORM_PROVIDER="Content Platform Provider"}(LG||(LG={})),function(e){e.ACCESSORIES="Accessories",e.MANUFACTURER="Manufacturer",e.RESELLER_AND_PROVISIONING_PARTNER="Reseller & Provisioning Partner"}(NG||(NG={}));const UG=e=>e.replace(/_/g," ").replace(/\b\w/g,(e=>e.toUpperCase())),FG=e=>(0,o.map)((0,o.values)(e),(e=>({value:e,label:UG(e)}
3))),OG=e=>(0,o.map)(e,(e=>({value:e,label:e}))),_G=FG(ey),zG=FG(ty),BG={supportedFeatures:FG(ny),paymentModels:FG($b)},WG={discoverContentProvider:OG((0,o.values)(LG)),discoverHardwareProvider:OG((0,o.values)(NG))},VG={requirements:{title:_G,frequency:zG},contactInfo:{title:OG(["Sales","Support","General","Press","Partnerships"])},developerAgreements:{title:OG(["Privacy Policy","Terms of Service","EULA"])},developerInfo:{title:OG(["Name","Website","Email","Headquarters","Founded"])},panelLinks:{title:OG(["Website","Trailer","Documentation","Community"])}},GG={LIVE:"success",DRAFT:"warning",SUBMISSION_PENDING:"info"},HG={bgcolor:e=>(0,Dr.Fq)(e.palette.common.black,.55),color:"common.white",padding:.5,"&:hover":{bgcolor:e=>(0,Dr.Fq)(e.palette.common.black,.75)}},qG={instantApps:["categories","languages","requirements","supportedFeatures","paymentModels","panelLinks","contactInfo","developerInfo","developerAgreements"],discoverContentProvider:["categories","supportedDeviceManufacturers","panelLinks","contactInfo"],discoverHardwareProvider:["categories","supportedDeviceManufacturers","regions","panelLinks","contactInfo"]},YG=new Set(["categories","languages","supportedFeatures","paymentModels","supportedDeviceManufacturers","regions"]),KG={panelLinks:["title","link"],developerAgreements:["title","link"],contactInfo:["title","value"],developerInfo:["title","value"],requirements:["title","frequency"]},XG={instantApps:["title","caption","description","contactEmail","websiteUrl"],discoverContentProvider:["title","caption","description","contactEmail","websiteUrl","providerVariant"],discoverHardwareProvider:["title","caption","description","contactEmail","websiteUrl","providerVariant"]},QG={instantApps:["panelLinks","requirements","supportedFeatures"],discoverContentProvider:["panelLinks","supportedDeviceManufacturers"],discoverHardwareProvider:["panelLinks","supportedDeviceManufacturers","regions"]},JG={instantApps:["categories","developerInfo","languages","contactInfo","paymentModels","developerAgreements"],discoverContentProvider:["categories","contactInfo"],discoverHardwareProvider:["categories","contactInfo"]},$G={title:"App title, shown as the heading on the detail page and sidebar.",caption:"Short blurb on marketplace list cards, and description fallback.",description:"Main paragraph under the title on the detail page.",contactEmail:"Fills the Contact button in the sidebar.",websiteUrl:"Saved on the doc, not shown on the detail page.",providerVariant:"Sets the provider variant.",panelLinks:"Sidebar link buttons like Website and Trailer.",requirements:"Sidebar line like Requires internet or hand tracking.",supportedFeatures:"Sidebar line like Supports controllers or eye tracking.",supportedDeviceManufacturers:"Supported manufacturers list in the sidebar.",regions:"Regions list in the sidebar.",categories:"Category chips shown under the title.",developerInfo:"Developer section on the detail page.",languages:"Languages section on the detail page.",contactInfo:"Contact Information section on the detail page.",paymentModels:"Saved on the doc, not shown on the detail page.",developerAgreements:"Saved on the doc, not shown on the detail page."},eH=e=>null==e?"":String(e),tH=e=>e.title||e.id,nH=e=>{let{children:t}=e;return(0,p.jsx)(v.Z,{variant:"subtitle2",color:"purple.800",fontWeight:600,children:t})},iH=e=>{let{field:t}=e;return $G[t]?(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:$G[t]}):null},oH=e=>{let{label:t,help:n,url:o,aspect:a,width:r,entityType:l,docId:s,onUploaded:d}=e;return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{spacing:.25,children:[(0,p.jsx)(v.Z,{variant:"caption",fontWeight:600,color:"text.secondary",children:t}),n&&(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:n})]}),(0,p.jsxs)(i.Z,{sx:{position:"relative",width:r},children:[(0,p.jsx)(i.Z,{sx:{width:r,aspectRatio:a,borderRadius:1,border:1,borderColor:"divider",bgcolor:"grey.100",backgroundImage:o?"url(".concat(o,")"):void 0,backgroundSize:"cover",backgroundPosition:"center"}}),o&&(0,p.jsx)(EG,{url:o,sx:{position:"absolute",top:4,right:4,...HG}})]}),(0,p.jsx)(SG,{entityType:l,docId:s,label:"Replace",onUploaded:d})]})},aH=e=>{var t,n,r,l;let{type:s,doc:d,onDirtyChange:c}=e;const u=d,h=(0,Fe.ji)({method:"patch",path:"super-admin/marketplace-docs/:entityType/:docId"}),g=(0,Fe.ji)({method:"delete",path:"super-admin/marketplace-docs/:entityType/:docId"}),{notify:x}=(0,ie.o)(),f=(0,X.u7)(),b=(0,a.useCallback)((async e=>{try{await g.requestAsync({params:{entityType:s,docId:e.id},successMessage:'Deleted "'.concat(tH(e),'"'),errorMessage:"Delete failed"}),null===c||void 0===c||c(!1)}catch{}}),[g,s,c]),y=Bn({onConfirm:b,getTitle:e=>'Delete "'.concat(e.title||"(untitled)",'"'),getMessage:e=>"instantApps"===s?['Deleting "'.concat(tH(e),'" removes it from every configuration that has it and deletes its release channels.'),"This cannot be undone."]:['Deleting "'.concat(tH(e),'" removes it from the marketplace catalog.'),"This cannot be undone."],getConfirmationInputProps:e=>({confirmationText:tH(e),TextFieldProps:{helperText:e.title?"Type the entry title to confirm and delete":"Type the entry id to confirm and delete"}})}),[j,Z]=(0,a.useState)((()=>(0,o.reduce)(XG[s],((e,t)=>(e[t]=eH(u[t]),e)),{}))),[w,E]=(0,a.useState)(d.iconUrl),[S,D]=(0,a.useState)(u.appIconUrl),[M,k]=(0,a.useState)(null!==(t=d.marketingMedia)&&void 0!==t?t:[]),[I,A]=(0,a.useState)((()=>(0,o.pick)(u,qG[s]))),[R,T]=(0,a.useState)(!1),P=(0,a.useMemo)((()=>({text:j,lists:I,media:M,iconUrl:w,appIconUrl:S})),[j,I,M,w,S]),[L,N]=(0,a.useState)(P),U=(0,a.useMemo)((()=>!(0,o.isEqual)(P,L)),[P,L]);(0,a.useEffect)((()=>{null===c||void 0===c||c(U)}),[U,c]);const F=(0,a.useCallback)((async()=>{const e={};(0,o.forEach)(XG[s],(t=>{j[t]!==L.text[t]&&(e[t]=j[t])})),(0,o.forEach)(qG[s],(t=>{(0,o.isEqual)(I[t],L.lists[t])||(e[t]=I[t])})),w!==L.iconUrl&&(e.iconUrl=w),(0,o.isEqual)(M,L.media)||(e.marketingMedia=M),"instantApps"===s&&S!==L.appIconUrl&&(e.appIconUrl=S),T(!0);try{var t;const n=await h.requestAsync({params:{entityType:s,docId:d.id},data:{patch:e}});N({text:j,lists:I,media:M,iconUrl:w,appIconUrl:S}),x({severity:"success",message:"Saved ".concat(null!==(t=null===n||void 0===n?void 0:n.updated.length)&&void 0!==t?t:0," field(s)")})}catch(n){x({severity:"error",message:n instanceof Error?n.message:"Save failed"})}finally{T(!1)}}),[j,I,w,S,M,s,d.id,L]),O="instantApps"===s,_=eH(u.phase),z=null===(n=u.developerOrganizationProfile)||void 0===n?void 0:n.name,B=(0,a.useMemo)((()=>(0,o.filter)(XG[s],(e=>"contactEmail"!==e))),[s]),W=(0,a.useMemo)((()=>(0,o.filter)(JG[s],(e=>(0,o.includes)(qG[s],e)))),[s]),V=(0,a.useCallback)(((e,t)=>{var n;let i="providerVariant"===e?WG[s]:void 0;const a=null!==(n=j[e])&&void 0!==n?n:"";return i&&a&&!(0,o.includes)((0,o.map)(i,"value"),a)&&(i=[{value:a,label:"".concat(a," (legacy)")},...i]),i?(0,p.jsx)(Qi,{label:e,value:a,options:[{value:"",label:"None"},...i],onChange:t=>Z((n=>({...n,[e]:t}))),size:"small",fullWidth:!0,helperText:$G[e]},e):(0,p.jsx)(Ln.Z,{label:e,value:a,onChange:t=>Z((n=>({...n,[e]:t.target.value}))),size:"small",fullWidth:!0,multiline:null===t||void 0===t?void 0:t.multiline,minRows:null!==t&&void 0!==t&&t.multiline?3:void 0,helperText:$G[e],InputProps:null!==t&&void 0!==t&&t.heading?{sx:{fontSize:20,fontWeight:600}}:void 0},e)}),[j,s]),G=(0,a.useCallback)((e=>{var t;return(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(AG,{label:e,items:null!==(t=I[e])&&void 0!==t?t:[],objectKeys:YG.has(e)?void 0:KG[e],stringOptions:BG[e],objectKeyOptions:VG[e],onChange:t=>A((n=>({...n,[e]:t})))}),(0,p.jsx)(iH,{field:e})]},e)}),[I]);return(0,p.jsxs)(i.Z,{sx:{flex:1,overflowY:"auto",padding:3},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",sx:{marginBottom:2},children:[(0,p.jsx)(C.Z,{variant:"contained",size:"small",onClick:F,disabled:R||!U,"data-testid":"marketplaceBrowse_save",children:"Save changes"}),R&&(0,p.jsx)(Zi.Z,{size:18}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",sx:{flex:1},children:"Saves your marketing edits: text, images, and media. Release channel, phase, and device support stay unchanged."}),(0,p.jsx)(ee.Z,{title:f?"":"Only Super Admins can delete marketplace entries",children:(0,p.jsx)("span",{children:(0,p.jsx)(C.Z,{color:"error",variant:"outlined",size:"small",onClick:()=>y.trigger(d),disabled:R||!f,"data-testid":"marketplaceBrowse_delete",children:"Delete"})})})]}),(0,p.jsxs)(i.Z,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"320px 1fr"},gap:3,alignItems:"start"},children:[(0,p.jsxs)(m.Z,{spacing:2,sx:{border:1,borderColor:"divider",borderRadius:1,padding:2,bgcolor:"grey.50"},children:[(0,p.jsx)(nH,{children:"Sidebar preview"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(re.Z,{src:S||w,variant:"rounded",sx:{width:56,height:56}}),(0,p.jsxs)(m.Z,{sx:{minWidth:0},children:[(0,p.jsx)(v.Z,{variant:"subtitle2",fontWeight:600,noWrap:!0,children:j.title||d.title||"(untitled)"}),O&&z&&(0,p.jsxs)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:["By ",z]}),O&&_&&(0,p.jsx)(i.Z,{children:(0,p.jsx)(ke.Z,{label:_,size:"small",color:null!==(r=GG[_])&&void 0!==r?r:"default",sx:{height:18,"& .MuiChip-label":{fontSize:10}}})})]})]}),O&&(0,p.jsx)(oH,{label:"Square icon (appIconUrl)",help:"Square app icon shown in the sidebar.",url:S,aspect:"1 / 1",width:120,entityType:s,docId:d.id,onUploaded:D}),(0,p.jsx)(Ln.Z,{label:"contactEmail",value:null!==(l=j.contactEmail)&&void 0!==l?l:"",onChange:e=>Z((t=>({...t,contactEmail:e.target.value}))),size:"small",fullWidth:!0,helperText:$G.contactEmail}),(0,o.map)(QG[s],(e=>G(e)))]}),(0,p.jsxs)(m.Z,{spacing:3,sx:{minWidth:0},children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(nH,{children:"Thumbnails & media"}),(0,p.jsx)(i.Z,{sx:{display:"flex",flexWrap:"wrap",gap:3},children:(0,p.jsx)(oH,{label:"Card thumbnail (iconUrl)",help:"Wide image on marketplace list cards.",url:w,aspect:"16 / 9",width:280,entityType:s,docId:d.id,onUploaded:E})}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Marketing media \u2014 carousel images on the detail page."}),(0,p.jsx)(PG,{value:M,onChange:k}),(0,p.jsx)(i.Z,{children:(0,p.jsx)(SG,{entityType:s,docId:d.id,label:"Add image",onUploaded:e=>k((t=>[...t,{src:e,type:mO.IMAGE}]))})})]}),(0,p.jsx)(Ie.Z,{}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(nH,{children:"Detail content"}),(0,o.map)(B,(e=>V(e,{heading:"title"===e,multiline:"description"===e||"caption"===e}))),(0,o.map)(W,(e=>G(e)))]})]})]}),(0,p.jsx)(Fn,{...y.props})]})},rH=[{value:"instantApps",label:"Instant App"},{value:"discoverContentProvider",label:"Content"},{value:"discoverHardwareProvider",label:"Hardware"}],lH=(0,a.memo)((e=>{var t;let{open:n,onClose:i,onCreated:o}=e;const r=(0,Fe.ji)({method:"post",path:"super-admin/marketplace-docs/:entityType"}),l=(0,Fe.ji)({method:"post",path:"super-admin/marketplace-docs/instantApps"}),s=(0,X.u7)(),[d,c]=(0,a.useState)("instantApps"),[u,h]=(0,a.useState)(""),[g,x]=(0,a.useState)(""),[f,b]=(0,a.useState)(void 0),[y,j]=(0,a.useState)(!1),Z="instantApps"===d,w=(0,a.useCallback)((e=>{c(e),x(""),b(void 0)}),[]),E=(0,a.useCallback)((()=>{y||(h(""),x(""),b(void 0),i())}),[y,i]),S=(0,a.useCallback)((async()=>{const e=u.trim();j(!0);try{const t="instantApps"===d?await l.requestAsync({data:{title:e,developerOrganizationId:null!==f&&void 0!==f?f:""},successMessage:'Created DRAFT "'.concat(e,'" \u2014 add its icon and details here'),errorMessage:"Create failed"}):await r.requestAsync({params:{entityType:d},data:{title:e,...g?{fields:{providerVariant:g}}:{}},successMessage:'Created "'.concat(e,'" \u2014 add its icon and details here'),errorMessage:"Create failed"});h(""),x(""),b(void 0),o(d,t.id)}catch{}finally{j(!1)}}),[r,l,d,u,g,f,o]);return(0,p.jsx)(Ro.Q,{open:n,onClose:E,maxWidth:"xs",title:"New marketplace entry",rightActions:[(0,p.jsx)(C.Z,{onClick:E,disabled:y,children:"Cancel"},"cancel"),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[y&&(0,p.jsx)(Zi.Z,{size:18}),(0,p.jsx)(ee.Z,{title:s?"":"Only Super Admins can create marketplace entries",children:(0,p.jsx)("span",{children:(0,p.jsx)(C.Z,{variant:"contained",onClick:S,disabled:y||!u.trim()||!s||Z&&!f,"data-testid":"marketplaceCreate_submit",children:"Create"})})})]},"create")],children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(wG,{value:d,options:rH,onChange:w}),(0,p.jsx)(Ln.Z,{label:"Title",value:u,onChange:e=>h(e.target.value),size:"small",fullWidth:!0,autoFocus:!0,helperText:"The icon and remaining marketing fields are added in the editor after the entry is created.",inputProps:{"data-testid":"marketplaceCreate_title"}}),Z?(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"primary",children:"Developer organization"}),(0,p.jsx)(DI.M,{onChange:b,defaultSearchActiveOrgsOnly:!1}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Creates a DRAFT shell and turns on this org's Developer Portal tab. The developer submits versions and a super-admin approves before the app goes live."})]}):(0,p.jsx)(Qi,{label:"providerVariant",value:g,options:[{value:"",label:"None"},...null!==(t=WG[d])&&void 0!==t?t:[]],onChange:x,size:"small",fullWidth:!0})]})})}));lH.displayName="MarketplaceCreateDialog";const sH={instantApps:"Instant Apps",discoverContentProvider:"Content Providers",discoverHardwareProvider:"Hardware Partners"},dH=[{value:"instantApps",label:"Instant Apps"},{value:"discoverContentProvider",label:"Content"},{value:"discoverHardwareProvider",label:"Hardware"}],cH=(0,a.memo)((e=>{var t;let{doc:n,selected:i,onSelect:o}=e;const r=(0,a.useCallback)((()=>
3o(n.id)),[n.id,o]),l=n.phase,s=Boolean(n.title);return(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"center",onClick:r,sx:{paddingX:1.5,paddingY:1.25,cursor:"pointer",borderBottom:1,borderColor:"divider",bgcolor:i?"purple.100":"transparent","&:hover":{bgcolor:i?"purple.100":"action.hover"}},"data-testid":"marketplaceBrowse_row",children:[(0,p.jsx)(re.Z,{src:n.iconUrl,variant:"rounded",sx:{width:48,height:48}}),(0,p.jsxs)(m.Z,{spacing:.25,sx:{minWidth:0,flex:1},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:.75,alignItems:"center",sx:{minWidth:0},children:[(0,p.jsx)(v.Z,{variant:"body2",fontWeight:600,noWrap:!0,fontStyle:s?"normal":"italic",color:i?"purple.700":s?"text.primary":"text.secondary",children:n.title||"(untitled)"}),l&&(0,p.jsx)(ke.Z,{label:l,size:"small",color:null!==(t=GG[l])&&void 0!==t?t:"default",sx:{height:18,flexShrink:0,"& .MuiChip-label":{paddingX:.75,fontSize:10}}})]}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",noWrap:!0,children:n.caption||n.id})]})]})}));cH.displayName="BrowseListRow";const uH=()=>{const e=(0,E.jV)(S.F.InstantApps),t=(0,E.jV)(S.F.MarketplaceContentProviders),n=(0,E.jV)(S.F.MarketplaceHardwareProviders),r={instantApps:{docs:e.documents,fetched:e.fetched},discoverContentProvider:{docs:t.documents,fetched:t.fetched},discoverHardwareProvider:{docs:n.documents,fetched:n.fetched}},[l,s]=(0,a.useState)("instantApps"),[d,c]=(0,a.useState)(""),[u,h]=(0,a.useState)(void 0),[g,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)(!1),{confirm:y}=(0,ie.o)(),j=(0,X.u7)(),{docs:Z,fetched:w}=r[l],D=(0,a.useMemo)((()=>{const e=(0,o.toLower)(d.trim()),t=e?(0,o.filter)(Z,(t=>(0,o.includes)((0,o.toLower)(t.title),e)||(0,o.includes)((0,o.toLower)(t.id),e))):Z;return(0,o.orderBy)(t,[e=>(0,o.toLower)(e.title)],["asc"])}),[Z,d]),M=(0,a.useMemo)((()=>(0,o.filter)(Z,(e=>e.id===u))[0]),[Z,u]),k=(0,a.useCallback)((e=>{const t=()=>{s(e),h(void 0),c("")};g?y({message:"You have unsaved changes. Discard them?",confirmLabel:"Discard",closeLabel:"Cancel",onConfirm:t}):t()}),[g,y]),I=(0,a.useCallback)((e=>{e!==u&&(g?y({message:"You have unsaved changes. Discard them and switch?",confirmLabel:"Discard",closeLabel:"Cancel",onConfirm:()=>h(e)}):h(e))}),[u,g,y]),A=(0,a.useCallback)((()=>{g?y({message:"You have unsaved changes. Discard them?",confirmLabel:"Discard",closeLabel:"Cancel",onConfirm:()=>b(!0)}):b(!0)}),[g,y]),R=(0,a.useCallback)(((e,t)=>{b(!1),s(e),c(""),x(!1),h(t)}),[]),T=(0,a.useCallback)((()=>b(!1)),[]);return(0,p.jsxs)(i.Z,{sx:{display:"grid",gridTemplateColumns:"360px 1fr",gap:2,height:"calc(100vh - ".concat(ud.iU,"px - ").concat(ud.GY," - 24px)"),minHeight:420,minWidth:0},children:[(0,p.jsxs)(Me.Z,{variant:"outlined",sx:{display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,p.jsxs)(i.Z,{sx:{padding:1.5,borderBottom:1,borderColor:"divider"},children:[(0,p.jsx)(wG,{value:l,options:dH,onChange:k}),(0,p.jsx)(ee.Z,{title:j?"":"Only Super Admins can create marketplace entries",children:(0,p.jsx)(i.Z,{component:"span",sx:{display:"block"},children:(0,p.jsx)(C.Z,{variant:"outlined",size:"small",fullWidth:!0,onClick:A,disabled:!j,sx:{marginTop:1},"data-testid":"marketplaceBrowse_newEntry",children:"New entry"})})})]}),(0,p.jsx)(i.Z,{sx:{padding:1.5,borderBottom:1,borderColor:"divider"},children:(0,p.jsx)(xu,{value:d,onChange:c,inputTestId:"marketplaceBrowse_filter",TextFieldProps:{size:"small",placeholder:"Search by title\u2026",InputProps:{startAdornment:(0,p.jsx)(mo.Z,{position:"start",children:(0,p.jsx)(ua.Z,{fontSize:"small",color:"disabled"})})}}})}),(0,p.jsx)(v.Z,{variant:"subtitle2",color:"purple.800",fontWeight:600,sx:{paddingX:1.5,paddingY:1.25},children:w?"".concat(D.length," ").concat(sH[l]):"Loading\u2026"}),(0,p.jsx)(i.Z,{sx:{flex:1,overflowY:"auto"},children:(0,o.map)(D,(e=>(0,p.jsx)(cH,{doc:e,selected:e.id===u,onSelect:I},e.id)))})]}),(0,p.jsx)(Me.Z,{variant:"outlined",sx:{display:"flex",overflow:"hidden",minWidth:0},children:M?(0,p.jsx)(aH,{type:l,doc:M,onDirtyChange:x},M.id):(0,p.jsx)(m.Z,{flex:1,alignItems:"center",justifyContent:"center",sx:{padding:5},children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Select an item on the left to view its details."})})}),(0,p.jsx)(lH,{open:f,onClose:T,onCreated:R})]})},pH=()=>(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Super Tools",path:(0,c.LT)(c._j.superTools)},{title:"Marketplace"}],disableGlobalSearch:!0,constrainContentWidth:!0,noBottomPadding:!0,children:(0,p.jsx)(m.Z,{spacing:2,sx:{paddingX:3,paddingTop:2},children:(0,p.jsx)(uH,{})})});var hH=n(66647),mH=n(75719);const gH=[{key:"failsafe",title:"Failsafe Admin",description:"Review failsafe admin-app versions and the devices on each.",Icon:bL.Z,path:(0,c.LT)(c._j.superTools.failsafe)},{key:"marketplace",title:"Marketplace",description:"Browse marketplace apps and sync prod content into dev.",Icon:mH.Z,path:(0,c.LT)(c._j.superTools.marketplace)},{key:"churnSurvey",title:"Churn Survey",description:"Edit the branching cancellation survey shown when a customer cancels.",Icon:Eh.Z,path:(0,c.LT)(c._j.superTools.churnSurvey)},{key:"twoStepAuthReset",title:"2-Step Auth Reset",description:"Remove a user's saved 2-Step Auth sign-in methods so they can set it up again.",Icon:XW.Z,path:(0,c.LT)(c._j.superTools.twoStepAuthReset)}],vH=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Console",path:e()},{title:"Super Tools"}],disableGlobalSearch:!0,children:(0,p.jsx)(m.Z,{spacing:2,sx:{paddingX:3,paddingTop:2,maxWidth:640},children:gH.map((e=>(0,p.jsx)(YO.Z,{variant:"outlined",children:(0,p.jsx)(hH.Z,{component:f.rU,to:e.path,"data-testid":"superToolsIndex_".concat(e.key),children:(0,p.jsxs)(m.Z,{direction:"row",spacing:2,alignItems:"center",sx:{paddingX:2,paddingY:2},children:[(0,p.jsx)(e.Icon,{color:"action"}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:e.title}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:e.description})]})]})})},e.key)))})})},CH=["Super Admin"],xH=()=>{const{claims:e}=(0,X.Eu)(),{buildOrganizationPath:t}=(0,w.P)(),{confirm:n}=(0,ie.o)(),i=(0,Fe.ji)({method:"post",path:"super-admin/users/two-step-auth/lookup"}),r=(0,Fe.ji)({method:"post",path:"super-admin/users/:userId/reset-two-step-auth"}),{register:l,handleSubmit:s,watch:d,formState:u}=(0,fg.cI)({defaultValues:{email:""}}),h=d("email"),[g,x]=(0,a.useState)(),f=(0,a.useRef)(0),b=(0,o.includes)(CH,e.role);(0,a.useEffect)((()=>{f.current+=1,x(void 0)}),[h]);const y=s((async e=>{const t=f.current+1;f.current=t,x(void 0);const n=await i.requestAsync({data:{email:e.email},errorMessage:"No user found"}).catch((()=>{}));t===f.current&&x(n)})),j=(0,a.useCallback)((()=>{g&&n({message:["Reset 2-Step Auth for ".concat(g.email,"?"),"This removes every saved sign-in method and turns 2-Step Auth OFF. It cannot be undone. The user can set it up again from Account Settings."],confirmLabel:"Reset 2-Step Auth",closeLabel:"Cancel",onConfirm:async()=>{const e=await r.requestAsync({params:{userId:g.uid},successMessage:"2-Step Auth reset",errorMessage:"Could not reset 2-Step Auth"}).catch((()=>{}));e&&x(e)}})}),[n,r,g]);return(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Console",path:t()},{title:"Super Tools",path:(0,c.LT)(c._j.superTools)},{title:"2-Step Auth Reset"}],disableGlobalSearch:!0,children:(0,p.jsxs)(m.Z,{spacing:2,sx:{paddingX:3,paddingTop:2,maxWidth:640},children:[!b&&(0,p.jsx)(v.Z,{color:"text.secondary",children:"Only a Super Admin can use this tool."}),(0,p.jsxs)(m.Z,{component:"form",onSubmit:y,noValidate:!0,direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(Ul.z,{label:"User email",size:"small",fullWidth:!0,disabled:!b,inputProps:{"data-testid":"twoStepAuthReset_emailInput"},...l("email",{required:!0,setValueAs:o.trim})}),(0,p.jsx)(Un.U,{type:"submit",submitting:u.isSubmitting,disabled:!b||!(0,o.trim)(h),"data-testid":"twoStepAuthReset_lookupButton",children:"Look up"})]}),g&&(0,p.jsx)(YO.Z,{variant:"outlined",sx:{padding:2},children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:g.name?"".concat(g.name," (").concat(g.email,")"):g.email}),(0,p.jsxs)(v.Z,{variant:"body2","data-testid":"twoStepAuthReset_flag",children:["Account Settings shows 2-Step Auth:"," ",g.mfaEnabled?"ON":"OFF"]}),(0,p.jsxs)(v.Z,{variant:"body2","data-testid":"twoStepAuthReset_factors",children:["Saved sign-in methods: ",g.enrolledFactors.length]}),g.enrolledFactors.map(((e,t)=>(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["totp"===e.factorId?"Authenticator app":"Phone",e.displayName?": ".concat(e.displayName):""]},t))),(0,p.jsx)(C.Z,{color:"error",variant:"outlined",sx:{alignSelf:"flex-start"},onClick:j,disabled:!b||r.pending||!g.mfaEnabled&&0===g.enrolledFactors.length,"data-testid":"twoStepAuthReset_resetButton",children:"Reset 2-Step Auth"})]})})]})})};xH.displayName="TwoStepAuthResetToolPage";const fH=()=>{const e=(0,X.bo)(),{buildOrganizationPath:t}=(0,w.P)();return e?(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{path:c._j.superTools.failsafe.__path,children:(0,p.jsx)(ZG,{})}),(0,p.jsx)(l.AW,{path:c._j.superTools.marketplace.__path,children:(0,p.jsx)(pH,{})}),(0,p.jsx)(l.AW,{path:c._j.superTools.churnSurvey.__path,children:(0,p.jsx)(aG,{})}),(0,p.jsx)(l.AW,{path:c._j.superTools.twoStepAuthReset.__path,children:(0,p.jsx)(xH,{})}),(0,p.jsx)(l.AW,{exact:!0,path:c._j.superTools.__path,children:(0,p.jsx)(vH,{})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(l.l_,{to:c._j.superTools.__path})})]}):(0,p.jsx)(l.l_,{to:t((e=>e))})},bH=a.memo((()=>{var e;const{privileges:t,buildOrganizationPath:n}=(0,w.P)(),i=(0,d.kV)();return!t.content||null!==(e=i.usesMxrPartner)&&void 0!==e&&e.fixedContentProvider?null:(0,p.jsx)(Qc,{to:n((e=>e.vrContent.create)),children:(0,p.jsx)(C.Z,{variant:"contained",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),children:"Add content"})})}));bH.displayName="VRContentPageToolbarContent";const yH=(0,a.memo)((e=>{var t,n;
3let{options:r,value:l,onChange:s,disabled:c=!1,variant:u="outlined",privilege:h,tall:g,useDescriptionTooltip:x}=e;const f=(0,d.Vp)(),{privileges:b}=(0,w.P)(),j=!h||b[h],Z=(0,o.find)(r,{value:l}),[E,S]=(0,a.useState)(),D=(0,o.chain)(r).map("description").maxBy("length").value(),M=(0,a.useCallback)((e=>e.premiumFeature&&!(0,k.WP)(f,k.QV.Premium)),[f]),I=(0,a.useCallback)((e=>{var t;return j?e.disabled?null!==(t=e.disabledTooltip)&&void 0!==t?t:"":M(e)?"Upgrade to Premium to use this feature":x&&e.description?(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:e.description}):"":"".concat((0,o.capitalize)(h)," privilege required to edit")}),[M,j,h,x]),A=null===(t=E||Z)||void 0===t?void 0:t.helpLinkInfo;return(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(m.Z,{direction:"row",spacing:1,children:(0,o.map)(r,((e,t)=>{var n;const o=M(e);return(0,p.jsx)(ee.Z,{title:I(e),followCursor:!0,placement:"right",componentsProps:x&&!e.disabled?{tooltip:{sx:{bgcolor:"white",color:"text.secondary",border:"1px solid",borderColor:"divider",boxShadow:"0 4px 10px rgba(0, 0, 0, 0.15)"}}}:void 0,children:(0,p.jsx)(i.Z,{sx:{cursor:e.disabled||o||!j?"not-allowed":"auto"},onMouseEnter:()=>S(e),onMouseLeave:()=>S((t=>t===e?void 0:t)),children:(0,p.jsxs)(C.Z,{sx:{paddingX:2+(null!==(n=e.extraPaddingX)&&void 0!==n?n:0),paddingY:g?2.5:void 0,borderColor:hm(y.DG.purple[200],.5),"&, &:hover":{backgroundColor:l===e.value?y.DG.purple[100]:void 0},"&, &:hover, &.Mui-disabled,":{borderWidth:2}},variant:u,startIcon:e.Icon&&(0,p.jsx)(e.Icon,{}),onClick:()=>s&&s(e.value),disabled:c||e.disabled||o||!j,children:[o&&(0,p.jsx)(uh.Z,{sx:{marginRight:1}}),e.label]})})},t)}))}),!x&&(0,p.jsxs)(i.Z,{position:"relative",children:[(0,p.jsx)(v.Z,{variant:"body1",visibility:"hidden",children:D}),(0,p.jsxs)(v.Z,{position:"absolute",top:0,left:0,variant:"body1",color:E&&E!==Z?"textSecondary":"textPrimary",children:[null!==(n=null===E||void 0===E?void 0:E.description)&&void 0!==n?n:null===Z||void 0===Z?void 0:Z.description,A&&(0,p.jsx)(Kn.Z,{variant:"inherit",href:A.helpLink,target:"_blank",children:" "+A.helpLinkText})]})]})]})})),jH=(0,a.memo)((e=>{var t;let{apkInfo:n,title:i}=e;const{buildOrganizationPath:o}=(0,w.P)(),a=null!==(t=null!==i&&void 0!==i?i:(0,Vs.GX)(n))&&void 0!==t?t:"New";return(0,p.jsx)(ui.Q,{children:(0,p.jsxs)(mf.h,{variant:"body2",children:["There is already an app for package name\xa0",(0,p.jsx)("em",{children:n.package}),". If you want to add a new version, go to the\xa0",(0,p.jsxs)(Kn.Z,{component:f.rU,to:o((e=>e.vrContent.edit.app.managed),{packageName:n.package}),children:[a," app page"]}),"."]})})})),ZH=(0,a.memo)((e=>{let{disabledAppVersionLabelEditing:t,appVersionLabelError:n,isEditingAppVersionLabel:o,title:r,versionCode:l,versionLabel:s,versionName:d,uploadedTime:c,sx:u,showAddLabelButton:h,onAppVersionLabelChange:g=(()=>{}),onAppVersionLabelEnterPressed:x=(()=>{}),onAddLabelButtonClicked:f=(()=>{})}=e;const b=c&&"".concat((0,M.rV)(c)),y=c&&"".concat((0,M.aH)(c)),j=(0,a.useCallback)((e=>{"Enter"===e.key&&x()}),[x]);return(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"nowrap",alignItems:"baseline",justifyContent:"space-between",paddingTop:.5,spacing:1,width:1,sx:u,overflow:"hidden",children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",spacing:1,overflow:"hidden",children:[(0,p.jsx)(sc,{app:{versionCode:l,versionLabel:s,versionName:d,title:r},hideVersionLabel:o,showV:!0}),o&&(0,p.jsx)(Ln.Z,{value:s,autoFocus:!0,variant:"standard",onChange:e=>g(e.target.value),disabled:t,placeholder:"Enter version label",error:n,onKeyDown:j,sx:{margin:0,flexBasis:160,flexShrink:0}}),h&&(0,p.jsx)(C.Z,{variant:"text",color:"primary",sx:{paddingX:2,textTransform:"none"},onClick:f,children:"Add label"})]}),b&&y&&(0,p.jsx)(i.Z,{flexBasis:"min-content",children:(0,p.jsx)(ee.Z,{title:y,placement:"top",children:(0,p.jsx)(v.Z,{noWrap:!0,variant:"subtitle1",fontWeight:"medium",children:b})})})]})}));ZH.displayName="VRContentAppNewVersionInfo";const wH=(0,a.memo)((e=>{let{title:t,iconUrl:n,packageName:o,children:a}=e;return(0,p.jsxs)(m.Z,{direction:"row",paddingY:1,spacing:2,children:[(0,p.jsx)(i.Z,{component:"img",width:160,height:160,borderRadius:1,alt:t,src:n}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"h6",children:t}),(0,p.jsx)(v.Z,{variant:"body1",color:"textSecondary",gutterBottom:!0,flexGrow:1,children:o}),a]})]})})),EH=(0,a.memo)((e=>{var t,n;let{onSubmit:i}=e;const o=(0,u.v9)((e=>e.vrContent.createExternalOpPending)),{register:a,handleSubmit:r,formState:l}=(0,fg.cI)(),s=r((e=>{let{packageName:t,title:n}=e;return i(t,n)}));return(0,p.jsx)("form",{onSubmit:s,noValidate:!0,autoComplete:"off",children:(0,p.jsxs)(m.Z,{alignItems:"flex-start",spacing:2,children:[(0,p.jsx)(Ln.Z,{sx:{width:350},label:"Title",placeholder:"Add title",...a("title",{required:"Please enter a title"}),autoFocus:!0,error:!!l.errors.title,helperText:null===(t=l.errors.title)||void 0===t?void 0:t.message}),(0,p.jsx)(Ln.Z,{sx:{width:350},label:"Package name",placeholder:"Add package name",error:!!l.errors.packageName,helperText:null===(n=l.errors.packageName)||void 0===n?void 0:n.message,...a("packageName",{required:"Please enter a package name",pattern:{value:Nw._t,message:"Please enter a valid package name"},setValueAs:e=>e.replaceAll(" ","")})}),(0,p.jsx)(C.Z,{variant:"contained",color:"primary",type:"submit",startIcon:o?(0,p.jsx)(Zi.Z,{color:"inherit",size:"1em"}):(0,p.jsx)(Wn.Z,{}),disabled:o,children:"Create"})]})})})),SH=e=>{let{error:t,isAdminApp:n}=e;if(!t)return null;const i=n?"Please delete the old version and re-upload":"Please provide a unique label to differentiate this APK";return(0,p.jsx)(ui.Q,{children:(0,p.jsxs)(mf.h,{variant:"body2",children:["You have already uploaded an APK with this version. ",i]})})};SH.displayName="VRContentApkErrorDuplicateVersion";const DH=(0,a.memo)((e=>{let{renderApkError:t,renderApk:n,onModeChange:i,previousVersion:r,submitLabel:l,isVersionLabelRequired:s,onCreateStart:d,onCreateSuccess:c,onCreateError:h,versionLabel:g,onVersionLabelError:v=(()=>{}),onApkCleared:x=(()=>{})}=e;const f=(0,u.I0)(),{organizationId:b}=(0,w.P)(),{notify:y}=(0,ie.o)(),[j,Z]=(0,a.useState)(),[E,S]=(0,a.useState)(),[D,M]=(0,a.useState)(),[k,I]=(0,a.useState)(),[A,R]=(0,a.useState)(!1),[T,P]=(0,a.useState)(!1),L=(0,a.useCallback)((()=>{x(),S(void 0),Z(void 0),I(void 0),R(!1),P(!1)}),[x]);(0,a.useEffect)((()=>{L()}),[L,r]);const N=(0,a.useCallback)((async e=>{try{L();const{apkInfo:n,missingFields:i}=await(0,Vs.A7)(e);if(n){P((0,Vs.kM)(n.package));const i=t(n);if(i)return void I(i);const o=s(n,g);o&&R(o),Z(n),S(e)}else i&&y({severity:"error",message:"APK is missing ".concat(i.length>1?"these fields: ":"").concat(i.map((e=>Vs.NO[e])).join(", "))})}catch(n){y({severity:"error",message:"Invalid APK file"}),(0,Si.yR)(new Error("Invalid APK file"),{name:"AppCreateManagedForm.handleApkSelected() error",contexts:{file:(0,o.pick)(e,["name","size","type"])}})}}),[L,s,y,t,g]),U=(0,a.useCallback)((()=>{M(void 0)}),[]),F=(0,a.useCallback)((e=>{M(e)}),[]),O=!!j&&!!E;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsx)(Wj,{label:".apk",acceptExtension:"apk",selectedFile:E,onFileSelected:N,onClearClick:L,height:64}),(0,p.jsx)(Wj,{label:".obb",acceptExtension:"obb",selectedFile:D,onFileSelected:F,onClearClick:U,height:64})]}),(0,p.jsxs)(m.Z,{alignItems:"flex-start",spacing:1,children:[k,(0,p.jsx)(SH,{error:A,isAdminApp:T}),j&&n(j,A),(0,p.jsxs)(m.Z,{direction:"row",spacing:1,justifyContent:"flex-end",alignItems:"center",width:1,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(Kn.Z,{variant:"caption",onClick:i,whiteSpace:"nowrap",children:"Have an external url?"}),(0,p.jsx)(Ie.Z,{orientation:"vertical",flexItem:!0}),(0,p.jsx)(Kn.Z,{variant:"caption",target:"_blank",rel:"noreferrer noopener",href:"https://help.managexr.com/en/articles/5770931-managexr-cli",whiteSpace:"nowrap",children:"Want to automate your uploads?"})]}),(0,p.jsx)(C.Z,{color:"primary",disabled:!O,onClick:()=>
3{if(!j||!E)return;const e=s(j,g);return T&&e?(v(),void y({severity:"error",message:"An existing admin app version already exists. Please delete it and re-upload"})):e?(v(),void y({severity:"error",message:"Unique version label required"})):void(!T||(0,o.isEmpty)(g)?(f(iZ({organizationId:b,apkFile:E,apkInfo:j,obbFile:D,newVersion:!!r,onCreateStart:d,onCreateSuccess:c,onCreateError:h,versionLabel:g})),U(),L()):y({severity:"error",message:"The admin app APK is not allowed to have a version label"}))},variant:"contained",startIcon:(0,p.jsx)(Wn.Z,{}),sx:{flexShrink:0},children:l})]})]})]})})),MH=()=>(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"apps",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.Apps,id:t.id,set:t}}})),[])),kH=(0,a.memo)((e=>{let{open:t,onCancel:n,onConfirm:i,submittedFormData:{versionName:o,latestVersion:r,apkUrl:l}}=e;const[s,d]=(0,a.useState)(!1);return(0,p.jsxs)(kn.Z,{open:t,fullWidth:!0,maxWidth:"sm",children:[(0,p.jsx)(In.Z,{children:(0,p.jsx)(m.Z,{direction:"row",alignItems:"baseline",spacing:.5,children:(0,p.jsx)(ui.Q,{withBackground:!0,withoutIcon:!0,fullWidth:!0,children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,children:[(0,p.jsx)(me.Z,{color:"warning",fontSize:"large"}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"h6",color:"grey.800",children:"Warning"}),(0,p.jsx)(v.Z,{color:"grey.700",children:"Be sure to submit the correct application metadata"})]})]})})})}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,alignItems:"center",children:[(0,p.jsxs)(mf.h,{alignItems:"center",justifyContent:"center",children:["It's critical that you enter the correct metadata for the app version you are creating. Specifically, the Version Code (",(0,p.jsx)("em",{children:r}),") and Version Name (",(0,p.jsx)("em",{children:o}),") you entered must exactly match the Version Code and Version Name of the APK that can be downloaded at external URL:"," ",(0,p.jsx)("em",{children:(0,p.jsx)(Kn.Z,{href:l,target:"_blank",rel:"noreferrer",children:l})}),". Also, you must ensure that the APK file being served by the external URL never changes."]}),(0,p.jsx)(mf.h,{children:"If the above requirements are not met, then your app will fail to deploy and cause devices to always think their app is out-of-date, resulting in devices redownloading and reinstalling the app indefinitely."}),(0,p.jsxs)(mf.h,{children:["If you can't guarantee the metadata you manually entered will always match the APK downloaded from the external URL you supplied, then we HIGHLY recommend that you upload the APK directly to our servers instead of using an external URL. Please contact"," ",(0,p.jsx)(Kn.Z,{href:"mailto:[email protected]",children:"[email protected]"})," ","if you have any questions."]})]})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:2,children:[(0,p.jsx)(C.Z,{onClick:n,children:"Cancel"}),(0,p.jsx)(Un.U,{onClick:async()=>{d(!0),await i(),d(!1)},submitting:s,children:"Add Version"})]})})]})})),IH=e=>{let{children:t}=e;return(0,p.jsx)(m.Z,{direction:"row",spacing:2,children:t})},AH=(0,a.memo)((e=>{var t,n,i,r,l,s,d;let{isVersionLabelRequired:c,renderApkError:u,onModeChange:h,submitLabel:g,previousVersion:C,onCreateStart:x,onCreateSuccess:f,onCreateError:b}=e;const y=MH(),[j,Z]=(0,a.useState)(),[w,E]=(0,a.useState)(),{register:S,handleSubmit:D,reset:M,formState:k,setError:I,clearErrors:A}=(0,fg.cI)(),[R,T]=(0,a.useState)();(0,a.useEffect)((()=>{C&&(M({packageName:C.packageName,title:C.title}),T(void 0))}),[C,M]);const P=Be.vc.vrContent.defaultIconUrl,[L,N]=(0,a.useState)(),U=D((async e=>{var t;let{packageName:n,title:i,versionCode:a,versionName:r,apkUrl:l,obbUrl:s,versionLabel:d}=e;const p=u({package:n,versionCode:a,versionName:r,application:{label:i}});if(p)return void T(p);const h=(0,Vs.kM)(n);E(h);const m=c({package:n,versionCode:a,versionName:r},d);if(Z(m),m&&h)return void I("versionLabel",{type:"custom",message:"An APK already exists with this version. Delete it before creating a new one."});if(m)return void I("versionLabel",{type:"custom"});if(h&&!(0,o.isEmpty)(d))return void I("versionLabel",{type:"custom",message:"A version label is not allowed for admin a
3pps. Leave it blank."});const g={apkUrl:l,iconUrl:null!==(t=null===C||void 0===C?void 0:C.iconUrl)&&void 0!==t?t:P,latestVersion:a,obbUrls:s?[s]:[],packageName:n,title:null!==i&&void 0!==i?i:null===C||void 0===C?void 0:C.title,versionName:r,...(0,o.isString)(d)&&""!==d?{versionLabel:d}:{}};N(g)})),F=(0,a.useCallback)((async()=>{L&&(await y.request({data:L,onSuccess:async e=>{M(),x&&x(L.packageName),f&&f(e)},onError:e=>{b&&b(e)}}),N(void 0))}),[y,b,x,f,M,L]),O=(0,a.useCallback)((()=>{N(void 0)}),[]);return(0,p.jsx)("form",{onSubmit:U,noValidate:!0,autoComplete:"off",children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(IH,{children:[(0,p.jsx)(Ln.Z,{label:"APK Url",placeholder:"https://apk.url",error:!!k.errors.apkUrl,helperText:null===(t=k.errors.apkUrl)||void 0===t?void 0:t.message,disabled:k.isSubmitting,fullWidth:!0,...S("apkUrl",{required:"Please enter an APK url",pattern:NS.tY})}),(0,p.jsx)(Ln.Z,{label:"OBB Url",placeholder:"https://obb.url",error:!!k.errors.obbUrl,helperText:null===(n=k.errors.obbUrl)||void 0===n?void 0:n.message,disabled:k.isSubmitting,fullWidth:!0,...S("obbUrl",{pattern:NS.tY})})]}),C?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("input",{...S("packageName"),type:"hidden"}),(0,p.jsx)("input",{...S("title"),type:"hidden"})]}):(0,p.jsxs)(IH,{children:[(0,p.jsx)(Ln.Z,{label:"Package Name",placeholder:"com.package.name",...S("packageName",{required:"Please enter a package name",pattern:{value:Nw._t,message:"Please enter a valid package name"},setValueAs:e=>e.replaceAll(" ","")}),error:!!k.errors.packageName,helperText:null===(i=k.errors.packageName)||void 0===i?void 0:i.message,disabled:k.isSubmitting,fullWidth:!0}),(0,p.jsx)(Ln.Z,{label:"Title",placeholder:"App Title",error:!!k.errors.title,helperText:null===(r=k.errors.title)||void 0===r?void 0:r.message,disabled:k.isSubmitting,fullWidth:!0,...S("title",{required:"Please enter a title"})})]}),(0,p.jsxs)(IH,{children:[(0,p.jsx)(Ln.Z,{label:"Version Code",placeholder:"1",error:!!k.errors.versionCode,helperText:null===(l=k.errors.versionCode)||void 0===l?void 0:l.message,disabled:k.isSubmitting,fullWidth:!0,...S("versionCode",{required:"Please enter a version code",pattern:{value:/^\d*$/,message:"Version code must be a number"},valueAsNumber:!0})}),(0,p.jsx)(Ln.Z,{label:"Version Name",placeholder:"1.0",error:!!k.errors.versionName,helperText:null===(s=k.errors.versionName)||void 0===s?void 0:s.message,disabled:k.isSubmitting,fullWidth:!0,...S("versionName",{required:"Please enter a version name"})})]}),(0,p.jsxs)(v.Z,{style:{marginTop:0},variant:"caption",color:"textSecondary",children:["Please verify that ",!C&&"package name, ","version code and version name match your APK file to avoid install errors."]}),(0,p.jsx)(IH,{children:(0,p.jsx)(Ln.Z,{label:"Version Label",placeholder:"Version 1",error:!!k.errors.versionLabel,helperText:null===(d=k.errors.versionLabel)||void 0===d?void 0:d.message,disabled:k.isSubmitting,fullWidth:!0,...S("versionLabel",{onChange:()=>A("versionLabel")})})}),(0,p.jsxs)(m.Z,{alignItems:"flex-start",spacing:1,children:[R,(0,p.jsx)(SH,{error:j,isAdminApp:w}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(Un.U,{submitting:k.isSubmitting||!!L,icon:(0,p.jsx)(Wn.Z,{}),children:g}),(0,p.jsx)(Kn.Z,{variant:"caption",onClick:h,children:"Have an APK file?"})]})]}),L&&(0,p.jsx)(kH,{open:!0,onConfirm:F,onCancel:O,submittedFormData:L})]})})})),RH=e=>{const[t,n]=(0,a.useState)("apk"),i=(0,a.useCallback)((()=>{n("apk")}),[]),o=(0,a.useCallback)((()=>{n("url")}),[]);return(0,a.useEffect)((()=>{var t;n(null!==(t=e.previousVersion)&&void 0!==t&&t.externalAppFiles?"url":"apk")}),[e.previousVersion]),"apk"===t?(0,p.jsx)(DH,{...e,onModeChange:o}):(0,p.jsx)(AH,{...e,onModeChange:i})},TH=e=>{var t,n;let{appProfile:i}=e;return(0,p.jsxs)(wH,{title:i.title,iconUrl:i.iconUrl,packageName:i.packageName,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",children:"Release Channel"}),(0,p.jsx)(v.Z,{gutterBottom:!0,children:(0,p.jsx)(sc,{app:i})}),(0,p.jsx)(v.Z,{variant:"subtitle2",gutterBottom:!0,children:"Shared by"}),(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,p.jsx)(SI.X,{imageUrl:null===(t=i.sharingOrganizationProfile)||void 0===t?void 0:t.imageUrl,size:"small"}),(0,p.jsxs)(v.Z,{children:["\xa0",null===(n=i.sharingOrganizationProfile)||void 0===n?void 0:n.name]})]})]})},PH=(0,a.memo)((()=>{const e=(0,l.k6)(),{organizationId:t,buildOrganizationPath:n}=(0,w.P)(),{notify:i}=(0,ie.o)(),o=(0,fg.cI)(),[r,s]=(0,a.useState)(),[d,c]=(0,a.useState)(),u=o.handleSubmit((async e=>{let{shareCode:n}=e;try{c(void 0);const e=await(0,Fe.IF)({organizationId:t},{shareCode:n});s(n),c(e)}catch(o){const e=(0,Fe.tf)(o);e?i({severity:"error",message:e.message}
3):(i({severity:"error",message:"Failed to check share code"}),(0,Si.yR)(o,{name:"preview share code",contexts:{args:{shareCode:n}}}))}})),[h,g]=(0,a.useState)(!1);return(0,p.jsxs)("div",{children:[(0,p.jsx)("form",{onSubmit:u,noValidate:!0,autoComplete:"off",children:(0,p.jsxs)(m.Z,{alignItems:"flex-start",spacing:2,children:[(0,p.jsx)(Ln.Z,{sx:{width:350},label:"Share Code",placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",error:!!o.formState.errors.shareCode,autoFocus:!0,...o.register("shareCode",{required:!0})}),(0,p.jsx)(Un.U,{submitting:o.formState.isSubmitting,disabled:h,children:"Check share code"})]})}),d&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{sx:{marginTop:2,marginBottom:1}}),(0,p.jsx)(TH,{appProfile:d}),(0,p.jsx)("br",{}),(0,p.jsx)(Un.U,{icon:(0,p.jsx)(Wn.Z,{}),onClick:async()=>{if(r&&d){g(!0);try{await(0,Fe.T2)({organizationId:t},{shareCode:r}),e.push(n((e=>e.vrContent.edit.app.shared),{packageName:d.packageName})),i({severity:"success",message:"Added shared app"})}catch(o){const e=(0,Fe.tf)(o);e?i({severity:"error",message:e.message}):(i({severity:"error",message:"Failed to add shared app"}),(0,Si.yR)(o,{name:"accept share code",contexts:{args:{shareCode:r}}}))}g(!1)}},submitting:h,children:"Add shared app"})]})]})}));var LH=n(52593),NH=n(93912);const UH=(0,a.createContext)(void 0),FH=e=>{var t;let{children:n}=e;const{organizationId:i,buildOrganizationPath:r}=(0,w.P)(),{appCollections:{managedApps:s,pendingApps:d,externalApps:h,sharedApps:m,instantApps:g,metaHorizonStoreManagedApps:v,releaseChannelCloneApps:C}}=(0,Xn.w)(),{documents:x}=(0,E.D)(S.F.Videos,{sort:ze.gA}),{documents:f}=(0,E.D)(S.F.WebXRApps,{sort:ze.gA}),b=null!==(t=(0,u.v9)((e=>e.vrContent.videoUploads[i])))&&void 0!==t?t:{},y=(0,Le.d9)(),{documents:j,fetched:Z}=$y({enabled:y}),[D,M]=(0,a.useState)("all"),[k,I]=(0,a.useState)(""),A=!!(0,c.$B)(c._j.organization.vrContent.edit.app),R=!!(0,c.$B)(c._j.organization.vrContent.edit.video),T=!!(0,c.$B)(c._j.organization.vrContent.edit.webXRApp),P=(0,l.k6)(),L=(0,a.useCallback)((e=>{M(e);("all"===e||"apps"===e)&&A||("all"===e||"videos"===e)&&R||("all"===e||"webXR"===e)&&T||P.replace(r((e=>e.vrContent.edit)))}),[r,P,A,R,T]),N=(0,o.isEmpty)(s)&&(0,o.isEmpty)(d)&&(0,o.isEmpty)(h)&&(0,o.isEmpty)(m)&&(0,o.isEmpty)(g)&&(0,o.isEmpty)(v),U=(0,o.isEmpty)(x),F=(0,o.isEmpty)(f),O=(0,a.useMemo)((()=>({all:{label:"All",Icon:Bl.Z,disabled:N&&U&&F},apps:{label:"Apps",Icon:LH.Z,disabled:N},videos:{label:"Videos",Icon:Ci.Z,disabled:U},webXR:{label:"WebXR",Icon:NH.Z,disabled:F}})),[N,U,F]),_=(0,a.useMemo)((()=>({expiration:(0,o.some)(m,(e=>{var t;return!(null===(t=e[0])||void 0===t||!t.expirationTimestamp)})),deviceLimit:(0,o.some)(m,(e=>{var t;return void 0!==(null===(t=e[0])||void 0===t?void 0:t.deviceLimit)}))})),[m]);return(0,p.jsx)(UH.Provider,{value:{managedApps:s,pendingApps:d,externalApps:h,sharedApps:m,instantApps:g,metaHorizonStoreManagedApps:v,releaseChannelCloneApps:C,developerPortalReleaseChannelsEnabled:y,developerOrganizationReleaseChannels:j,developerOrganizationReleaseChannelsFetched:Z,videos:x,videoUploads:b,webXRApps:f,contentFilter:D,contentFilterOptions:O,handleContentFilterChange:L,sharedAppFeatures:_,searchTerm:k,setSearchTerm:I},children:n})},OH=()=>{const e=(0,a.useContext)(UH);if((0,o.isUndefined)(e))throw new Error("useVRContentContext() must be in a VRContentProvider");return e},_H=(0,a.memo)((()=>{const{managedApps:e,pendingApps:t}=OH(),n=(0,u.I0)(),{notify:r,notifyThunkResult:s}=(0,ie.o)(),d=(0,l.k6)(),c=(0,yP.a)(),{buildOrganizationPath:h}=(0,w.P)(),{defaultIconUrl:g,defaultTitle:C}=Be.vc.vrContent,[x,f]=(0,a.useState)(),[b,y]=(0,a.useState)(!1),[j,Z]=(0,a.useState)(!1),E=(0,u.v9)((e=>e.vrContent.createExternalOpPending)),S=c.get("type"),D=(0,a.useCallback)((e=>{d.replace(h((e=>e.vrContent.create.app),{},{type:e}))}),[h,d]),M=(0,a.useMemo)((()=>[{value:"managed",label:"Managed",description:"Managed Apps are any custom application that your organization wants to make available to the devices. These apps are stored in the cloud and can be automatically installed, updated, and removed over the internet. Once a device is given access to a managed app, it will install it as soon as it connects to the internet."},{value:"external",label:"External",description:"External Apps are apps that have already been manually downloaded onto a device, outside of ManageXR. They may have been sideloaded or purchased in-headset from an app store. You can add an External App to your configuration to make it appear in the Home Screen or use it as a Kiosk App.",helpLinkInfo:{helpLink:Be.IW.addExternalApps,helpLinkText:"Learn More About External Apps."}},{value:"shared",label:"Shared",description:"Shared Apps are shared by other organizations and give you the ability to manage a third-party app on your devices without needing to upload the app files on your own. A third-party vendor will provide you with a Share Code, which you can then use to gain access to their app."}]),[]),k=(0,a.useCallback)(((t,n)=>(0,o.chain)(e[t.package]).filter({packageName:t.package,latestVersion:t.versionCode,versionName:t.versionName}).some((e=>
3e.versionLabel===(""===n?void 0:n))).value()),[e]),I=(0,a.useCallback)((n=>{const i=(0,o.first)(e[n.package]),a=t[n.package];if(i||a)return(0,p.jsx)(jH,{apkInfo:n,title:null===i||void 0===i?void 0:i.title})}),[e,t]),A=(0,a.useCallback)((e=>{Z(!1),f(e)}),[]),R=(0,a.useCallback)((e=>{var t,n;const i=null!==(t=(0,Vs.GX)(e))&&void 0!==t?t:C,o=null!==(n=e.icon)&&void 0!==n?n:g;return(0,p.jsx)(wH,{title:i,iconUrl:o,packageName:e.package,children:(0,p.jsx)(ZH,{title:i,versionCode:e.versionCode,versionName:e.versionName,versionLabel:x,isEditingAppVersionLabel:b,appVersionLabelError:j,sx:{width:void 0},showAddLabelButton:!b,onAppVersionLabelChange:A,onAddLabelButtonClicked:()=>y(!0)})})}),[j,g,C,b,A,x]),T=(0,a.useCallback)((()=>{Z(!1),y(!1)}),[]),P=(0,a.useCallback)((()=>{Z(!0)}),[]),L=(0,a.useCallback)((e=>{d.push(h((e=>e.vrContent.edit.app.managed),{packageName:e}))}),[h,d]),N=(0,a.useCallback)((e=>{r({severity:"success",message:"".concat(e.title," created"),action:{title:"View App",onClick:()=>d.push(h((e=>e.vrContent.edit.app.managed),{packageName:e.packageName}))}})}),[h,d,r]),U=(0,a.useCallback)((e=>{const t=(0,Fe.tf)(e);r({severity:"error",message:t?t.message:"Failed to create app"})}),[r]),F=(0,a.useCallback)((async(e,t)=>{const i=await n((0,nZ.j6)({packageName:e,title:t}));s({result:i,success:{message:"".concat(t," created")},error:{message:"Error creating ".concat(t)}}),"fulfilled"===i.meta.requestStatus&&(0,o.isObject)(i.payload)&&d.push(h((e=>e.vrContent.edit.app.external),{appId:i.payload.id}))}),[h,n,d,s]);return(0,p.jsxs)(m.Z,{sx:{minWidth:600},spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h6",color:"textSecondary",children:"New App"}),(0,p.jsxs)(m.Z,{spacing:3,children:[(0,p.jsx)(yH,{options:M,value:S,onChange:D,disabled:E}),(0,p.jsx)(i.Z,{children:"managed"===S?(0,p.jsx)(RH,{submitLabel:"Create app",isVersionLabelRequired:k,renderApkError:I,renderApk:R,onCreateStart:L,onCreateSuccess:N,onCreateError:U,onVersionLabelError:P,onApkCleared:T,versionLabel:x}):"external"===S?(0,p.jsx)(EH,{onSubmit:F}):"shared"===S?(0,p.jsx)(PH,{}):(0,p.jsx)(l.l_,{to:h((e=>e.vrContent.create.app),{},{type:"managed"})})})]})]})})),zH=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h6",color:"textSecondary",children:"Find Instant Apps"}),(0,p.jsx)(v.Z,{variant:"body1",children:"Instant Apps are free, high-quality demo applications available on ManageXR. Instant Apps allow you to experiment with 3rd party content quickly. Save Instant Apps directly to your VR Content Library and try them on your devices today."}),(0,p.jsx)(Kn.Z,{component:Xc,to:e((e=>e.marketplace.instantApps)),onClick:()=>(0,b.ec)("Discover XR CTA Clicked",{location:"VR Content"}),children:(0,p.jsx)(C.Z,{variant:"contained",children:"Explore Instant Apps"})})]})},BH=(0,a.memo)((e=>{let{imageUrl:t,imageAlt:n,title:o,steps:a,learnMoreLink:r,learnMoreText:l}=e;return(0,p.jsxs)(i.Z,{sx:{border:"1px solid",borderColor:"grey.300",borderRadius:4,padding:2,margin:1},children:[t&&(0,p.jsx)("img",{style:{borderRadius:5,width:"100%",height:"auto"},src:t,alt:n}),o&&(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",sx:{marginTop:1,marginBottom:1},children:o}),a&&a.length>0&&(0,p.jsx)(m.Z,{spacing:1,children:a.map(((e,t)=>(0,p.jsxs)(m.Z,{direction:"row",gap:1,alignItems:"center",children:[(0,p.jsx)(i.Z,{sx:{flexShrink:0,display:"flex",width:16,height:16,borderRadius:1,backgroundColor:y.DG.purple[400],color:"white",justifyContent:"center",alignItems:"center"},children:(0,p.jsx)(v.Z,{variant:"caption",children:t+1})}),(0,p.jsx)(v.Z,{variant:"body2",component:"div",children:e.content})]},t)))}),r&&l&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ie.Z,{sx:{padding:1,marginBottom:1}}),(0,p.jsx)(li.Q,{href:r,target:"_blank",rel:"noopener",variant:"body2",children:l})]})]})}));BH.displayName="UIRichHelpInstructions";const WH=(0,da.Cl)(),VH=e=>{let{rows:t}=e;const n=(0,a.useMemo)((()=>[WH.accessor((e=>{var t;return null!==(t=e.app.name)&&void 0!==t?t:""}),{id:"name",header:"Name",cell:e=>{var t;const n=e.row.original;return(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",minWidth:0,children:["error"===n.status&&(0,p.jsx)(ee.Z,{title:null!==(t=n.error)&&void 0!==t?t:"This row cannot be imported",children:(0,p.jsx)(Cd.Z,{color:"error",fontSize:"small"})}),(0,p.jsx)(v.Z,{noWrap:!0,children:e.getValue()||"\u2014"})]})},size:250}),WH.accessor((e=>{var t,n;return null!==(t=null===(n=e.app.supportedDevices)||void 0===n?void 0:n.join(", "))&&void 0!==t?t:""}),{id:"supportedDevices",header:"Supported Devices",cell:e=>(0,p.jsx)(v.Z,{noWrap:!0,children:e.getValue()||"\u2014"}),size:300})]),[]),i=(0,sa.b7)({columns:n,data:t,initialState:{sorting:[{id:"name",desc:!1}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),o=(0,a.useMemo)((()=>{const e=43*i.getRowModel().rows.length;return Math.max(100,Math.min(e,350))}),[i]);return(0,p.jsx)(dc.A,{table:i,rowHeight:43,height:o,emptyMessage:"No apps to preview",flexColumnIds:"supportedDevices"})};VH.displayName="VRContentMetaCsvImportPreviewTable";const GH=(0,da.Cl)(),HH=e=>{let{apps:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),i=(0,a.useMemo)((()=>[GH.accessor("title",{header:"Name",cell:e=>{const t=e.row.original;return(0,p.jsx)(Kn.Z,{component:Xc,to:n((e=>e.vrContent.edit.app.metaHorizonStoreManaged),{appId:t.id}),children:t.title||"\u2014"})},size:250}),GH.accessor((e=>{var t,n;return null!==(t=null===(n=e.supportedDevices)||void 0===n?void 0:n.join(", "))&&void 0!==t?t:""}),{id:"supportedDevices",header:"Supported Devices",cell:e=>(0,p.jsx)(v.Z,{noWrap:!0,children:e.getValue()||"\u2014"}),size:300})]),[n]),o=(0,sa.b7)({columns:i,data:t,initialState:{sorting:[{id:"title",desc:!1}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}
3),r=(0,a.useMemo)((()=>{const e=43*o.getRowModel().rows.length;return Math.max(100,Math.min(e,350))}),[o]);return(0,p.jsx)(dc.A,{table:o,rowHeight:43,height:r,emptyMessage:"No apps created",flexColumnIds:"supportedDevices"})};HH.displayName="VRContentMetaCsvImportCreatedAppsTable";const qH=(0,da.Cl)(),YH=e=>{let{apps:t}=e;const{buildOrganizationPath:n}=(0,w.P)(),i=(0,a.useMemo)((()=>[qH.accessor("name",{header:"Name",cell:e=>{const t=e.row.original;return(0,p.jsx)(Kn.Z,{component:Xc,to:n((e=>e.vrContent.edit.app.metaHorizonStoreManaged),{appId:t.id}),children:t.name||"\u2014"})},size:250}),qH.accessor("reason",{header:"Reason",cell:e=>(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:e.getValue()}),size:300})]),[n]),o=(0,sa.b7)({columns:i,data:t,initialState:{sorting:[{id:"name",desc:!1}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)()}),r=(0,a.useMemo)((()=>{const e=43*o.getRowModel().rows.length;return Math.max(100,Math.min(e,350))}),[o]);return(0,p.jsx)(dc.A,{table:o,rowHeight:43,height:r,emptyMessage:"No apps skipped",flexColumnIds:"reason"})};YH.displayName="VRContentMetaCsvImportSkippedAppsTable";const KH=["created","skipped"],XH=e=>{let{createdApps:t,skippedApps:n,summary:o,onImportMore:r}=e;const{organizationId:l,user:s}=(0,w.P)(),[d,c]=(0,a.useState)(0),u=(0,a.useCallback)(((e,t)=>{c(t),(0,b.A_)("".concat(window.location.pathname,"/").concat(KH[t]),l,s.id)}),[l,s.id]);return(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(Iy.Z,{severity:"success",sx:{marginBottom:2},children:["Import complete: ",o.created," app",1!==o.created?"s":""," ","created, ",o.skipped," skipped"]}),(0,p.jsxs)(Me.Z,{variant:"outlined",sx:{overflow:"hidden"},children:[(0,p.jsxs)(wf.Z,{value:d,onChange:u,sx:{borderBottom:1,borderColor:"divider"},children:[(0,p.jsx)(Yn.Z,{label:"Created (".concat(o.created,")")}),(0,p.jsx)(Yn.Z,{label:"Skipped (".concat(o.skipped,")")})]}),0===d&&(0,p.jsx)(HH,{apps:t}),1===d&&(0,p.jsx)(YH,{apps:n}),(0,p.jsx)(m.Z,{direction:"row",spacing:2,sx:{padding:2,borderTop:1,borderColor:"divider",backgroundColor:"background.default"},children:(0,p.jsx)(C.Z,{variant:"outlined",onClick:r,children:"Import More"})})]})]})};XH.displayName="VRContentMetaCsvImportResults";const QH=(0,a.memo)((e=>{let{open:t,onClose:n,onContinue:i,onUploadNew:o}=e;return(0,p.jsxs)(kn.Z,{open:t,onClose:n,fullWidth:!0,maxWidth:!1,PaperProps:{sx:{maxWidth:520}},children:[(0,p.jsx)(In.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1.5,children:[(0,p.jsx)(me.Z,{color:"warning"}),(0,p.jsx)(v.Z,{variant:"h6",sx:{flexGrow:1},children:"App icons missing"}),(0,p.jsx)(x.Z,{onClick:n,size:"small","aria-label":"Close",sx:{color:"text.secondary"},children:(0,p.jsx)(J.Z,{})})]})}),(0,p.jsx)(An.Z,{children:(0,p.jsx)(v.Z,{color:"text.secondary",children:"The CSV you uploaded is out of date, so ManageXR can\u2019t fetch app icons from Meta. Re-download the latest CSV from Meta Horizon Managed Services and upload it here to restore all of the correct app icons."})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:2,children:[(0,p.jsx)(C.Z,{variant:"outlined",onClick:i,children:"Continue with missing icons"}),(0,p.jsx)(C.Z,{variant:"contained",onClick:o,children:"Upload new CSV"})]})})]})}));QH.displayName="VRContentDialogStaleCsvWarning";var JH=n(1025),$H=n.n(JH);const eq=["id","name","packageName","origin"],tq=new Set(["Self Hosted"]),nq=/^[+-]?\d*\.?\d+\s*[eE]\s*[+-]?\s*\d+$/,iq={id:["id","appid","app_id"],name:["name","appname","app_name","title"],packageName:["packagename","package_name","package","package-name"],versionName:["versionname","version_name","version","version-name"],versionCode:["versioncode","version_code","version-code"],iconUrl:["logo","iconurl","icon_url","iconuri","icon_uri","icon"],origin:["origin","source"],supportedDevices:["supporteddevices","supported_devices","supported-devices","platform","platforms"]},oq="Meta ",aq=e=>!!e&&Object.values(bi.Q6).includes(e),rq={id:"ID",name:"Name",packageName:"Package Name",versionName:"Version Name",versionCode:"Version Code",origin:"Origin"},lq=(e,t)=>
3(0,o.findKey)(e,(e=>e===t)),sq=(e,t,n)=>lq(t,n)?e?null:"empty_value":"missing_column",dq=e=>{const t=(0,o.map)((0,o.filter)(e,(e=>"missing_column"===e.type)),(e=>rq[e.field]||e.field)),n=(0,o.map)((0,o.filter)(e,(e=>"empty_value"===e.type)),(e=>rq[e.field]||e.field)),i=(0,o.some)(e,(e=>"scientific_notation"===e.type)),a=[];return(0,o.isEmpty)(t)||a.push("Missing column: ".concat(t.join(", "))),(0,o.isEmpty)(n)||a.push("Missing: ".concat(n.join(", "))),i&&a.push("ID uses scientific notation (often from Excel). Format the ID column as text and re-export the CSV"),a.join(". ")},cq=e=>{const t=(0,o.map)(e,(e=>rq[e]||e));return"CSV is missing required columns: ".concat(t.join(", "))},uq=(e,t,n)=>{var i;const a=(0,o.findKey)(t,(e=>e===n));return a?null===(i=e[a])||void 0===i?void 0:i.replace(/\u00A0/g," ").trim():void 0},pq=(e,t)=>{var n,i,a,r;const l=uq(e,t,"versionCode"),{mapped:s,unmapped:d}=(e=>{if(null===e||void 0===e||!e.trim())return{mapped:[],unmapped:[]};const t=(0,o.compact)((0,o.map)(e.split(","),(e=>e.trim()))),n=[],i=[];return t.forEach((e=>{if(aq(e))return void n.push(e);const t=e.startsWith(oq)?e.slice(oq.length):void 0;aq(t)?n.push(t):i.push(e)})),{mapped:(0,o.uniq)(n),unmapped:i}})(uq(e,t,"supportedDevices"));return(0,o.isEmpty)(d)||(0,OD.uT)("metaCsvParser: unmapped Meta device names in CSV: ".concat(d.join(", ")),{level:"warning",tags:{source:"metaCsvParser.parsePlatformToDeviceModels"}}),{id:null!==(n=uq(e,t,"id"))&&void 0!==n?n:"",name:null!==(i=uq(e,t,"name"))&&void 0!==i?i:"",packageName:null!==(a=uq(e,t,"packageName"))&&void 0!==a?a:"",versionName:uq(e,t,"versionName")||void 0,versionCode:l?parseInt(l,10):void 0,iconUrl:uq(e,t,"iconUrl")||void 0,origin:null!==(r=uq(e,t,"origin"))&&void 0!==r?r:"",supportedDevices:(0,o.isEmpty)(s)?void 0:s}},hq=(e,t)=>{if(tq.has(e.origin))return{app:e,status:"filtered"};const n=[],i=sq(e.id,t,"id");var a;i?n.push({field:"id",type:i}):(a=e.id,nq.test(a.trim())&&n.push({field:"id",type:"scientific_notation"}));const r=sq(e.name,t,"name");
3r&&n.push({field:"name",type:r});const l=sq(e.packageName,t,"packageName");return l&&n.push({field:"packageName",type:l}),(0,o.isEmpty)(n)?{app:e,status:"valid"}:{app:e,status:"error",error:dq(n)}},mq=e=>{var t;const n=e.errors[0];if(n)return{success:!1,error:"Invalid CSV format: ".concat(n.message)};const i=null!==(t=e.meta.fields)&&void 0!==t?t:[];if((0,o.isEmpty)(i))return{success:!1,error:"CSV file appears to be empty or has no headers"};const a=(e=>{const t=(0,o.compact)((0,o.map)(e,(e=>{const t=(e=>e.toLowerCase().replace(/[\s_-]+/g,""))(e),n=(0,o.findKey)(iq,(e=>e.includes(t)));return n?[e,n]:void 0})));return(0,o.fromPairs)(t)})(i),r=(e=>(0,o.filter)(eq,(t=>!lq(e,t))))(a);if(!(0,o.isEmpty)(r))return{success:!1,error:cq(r)};if((0,o.isEmpty)(e.data))return{success:!1,error:"CSV file has headers but no data rows"};return{success:!0,rows:(0,o.map)(e.data,(e=>{const t=pq(e,a);return hq(t,a)}))}},gq=e=>(0,o.map)((0,o.filter)(e,(e=>"valid"===e.status)),(e=>e.app)),vq=/^[0-9a-fA-F]+$/,Cq=["oculuscdn.com","fbcdn.net"],xq=e=>{try{const n=new URL(e);if(t=n.hostname,!(0,o.some)(Cq,(e=>t===e||t.endsWith(".".concat(e)))))return;const i=n.searchParams.get("oe");if(i&&vq.test(i)){const e=parseInt(i,16),t=Math.floor(Date.now()/1e3);if(Number.isFinite(e)&&Math.abs(e-t)<=31536e4)return e}return void(0,OD.uT)("metaCsvParser: failed to extract valid expiration time from Meta CDN iconUrl (raw=".concat(null!==i&&void 0!==i?i:"<missing>",")"),{level:"warning",tags:{source:"metaCsvParser.parseIconExpirationTime"}})}catch(n){return void(0,OD.Tb)(n,{level:"warning",tags:{source:"metaCsvParser.parseIconExpirationTime"}})}var t},fq=(0,a.memo)((()=>{const[e,t]=(0,a.useState)("upload"),[n,r]=(0,a.useState)([]),[l,s]=(0,a.useState)(),[d,c]=(0,a.useState)(),[u,h]=(0,a.useState)(!1),{pending:g,request:x}=(0,Fe.pv)({method:"post",path:"meta-horizon-store/managed-apps/csv-import"}),f=(0,a.useMemo)((()=>(e=>{var t,n,i;const a=(0,o.countBy)(e,"status");return{valid:null!==(t=a.valid)&&void 0!==t?t:0,filtered:null!==(n=a.filtered)&&void 0!==n?n:0,errors:null!==(i=a.error)&&void 0!==i?i:0}})(n)),[n]),y=(0,a.useMemo)((()=>gq(n)),[n]),j=(0,a.useMemo)((()=>(0,o.compact)((0,o.map)((0,o.filter)(n,(e=>"filtered"===e.status)),(e=>e.app.name)))),[n]),Z=(0,a.useMemo)((()=>(0,o.keyBy)(n,(e=>e.app.packageName))),[n]),w=(0,a.useMemo)((()=>null!==d&&void 0!==d&&d.skipped?d.skipped.map((e=>{var t;return{...e,name:e.name||(null===(t=Z[e.packageName])||void 0===t?void 0:t.app.name)||""}})):[]),[null===d||void 0===d?void 0:d.skipped,Z]),E=f.valid>0&&0===f.errors,S=(0,a.useCallback)((async e=>{const n=e[0];if(!n)return;s(void 0);const i=await(e=>new Promise((t=>{$H().parse(e,{header:!0,skipEmptyLines:!0,complete:e=>t(mq(e)),error:e=>t({success:!1,error:"Failed to parse CSV: ".concat(e.message)})})})))(n);if(!i.success)return void s(i.error);const a=(l=i.rows,(0,o.countBy)((0,o.filter)(l,(e=>"valid"===e.status&&"Meta Horizon Store"!==e.app.origin)),(e=>e.app.origin)));var l;(0,o.isEmpty)(a)||(0,b.ec)("Meta Non-Store Origin Detected",{origins:a}),r(i.rows);(e=>{const t=Math.floor(Date.now()/1e3);return(0,o.some)(e,(e=>{const n=xq(e);return void 0!==n&&n<t}))})((0,o.compact)((0,o.map)(gq(i.rows),(e=>e.iconUrl))))?h(!0):t("confirm")}),[]),D=(0,a.useCallback)((()=>{h(!1),t("confirm")}),[]),{getRootProps:M,getInputProps:k,isDragActive:I,inputRef:A}=(0,Eg.uI)({accept:{"text/csv":[".csv"],"application/vnd.ms-excel":[".csv"]},multiple:!1,onDropAccepted:S}),R=(0,a.useCallback)((()=>{var e;null===(e=A.current)||void 0===e||e.click()}),[A]),T=(0,a.useCallback)((()=>{var e;r([]),h(!1),null===(e=A.current)||void 0===e||e.click()}),[A]),P=(0,a.useCallback)((()=>{r([]),s(void 0),t("upload"),c(void 0)}),[]),L=(0,a.useCallback)((()=>{x({data:{apps:(0,o.map)(y,(e=>({id:e.id,name:e.name,packageName:e.packageName,versionName:e.versionName,versionCode:e.versionCode,iconUrl:e.iconUrl,supportedDevices:e.supportedDevices})))},errorMessage:"Failed to import apps",onSuccess:e=>{c(e),t("results")}})}),[x,y]);return(0,p.jsxs)(m.Z,{sx:{minWidth:600},spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h6",color:"textSecondary",children:"Import Apps from the Meta Horizon Managed App Store"}),"upload"===e&&(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(v.Z,{variant:"body1",color:"text.primary",sx:{marginBottom:2},children:["Save store apps in the"," ",(0,p.jsx)(li.Q,{href:Be.FI.metaHorizonDiscoverApps,rel:"noopener",children:"Discover Apps"})," ","section of Meta Horizon managed services. Then, upload your saved apps to ManageXR to deploy them in bulk"," ",(0,p.jsx)(ci,{url:Be.IW.metaHorizonManagedAppStore,helpText:'Only store apps available through the "Discover Apps" section of Meta Horizon managed services are supported. This cannot be used to access paid apps from the consumer Meta Horizon Store.'})]}),(0,p.jsx)(BH,{imageUrl:"https://storage.googleapis.com/mighty-platform-dev/public/MAS%20integration%20instructional%20graphicV2.webp",imageAlt:"Screenshot showing the Export Applications List button in Meta Admin Center",title:"How to export store apps from Horizon managed services",steps:[{content:(0,p.jsxs)(p.Fragment,{children:["In your Meta Admin Center, go to"," ",(0,p.jsx)(li.Q,{href:Be.FI.metaHorizonManageApps,rel:"noopener",variant:"body2",children:"Apps &
3Content"})]})},{content:"Click the export button in the top right corner"},{content:"Return to ManageXR and upload the exported CSV in the dropzone below"}],learnMoreLink:Be.IW.metaHorizonManagedAppStore,learnMoreText:"Learn more about deploying Meta managed store apps"}),(0,p.jsxs)(i.Z,{...M(),onClick:R,sx:{border:"2px dashed",borderColor:I?"primary.main":"grey.400",borderRadius:1,padding:4,textAlign:"center",cursor:"pointer",backgroundColor:I?"action.hover":"background.paper","&:hover":{borderColor:"primary.main",backgroundColor:"action.hover"}},children:[(0,p.jsx)("input",{...k()}),(0,p.jsx)(Ms.Z,{sx:{fontSize:48,color:"text.secondary",marginBottom:1}}),(0,p.jsx)(v.Z,{variant:"body1",children:"Drop CSV file here, or click to select"}),(0,p.jsx)(v.Z,{variant:"caption",color:"text.secondary",children:"Accepts .csv files"})]}),l&&(0,p.jsx)(Iy.Z,{severity:"error",sx:{marginTop:2},children:l})]}),"confirm"===e&&(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(Iy.Z,{severity:"info",sx:{marginBottom:2},children:[f.valid," app",1!==f.valid?"s":""," ready to import",f.filtered>0&&(0,p.jsxs)(p.Fragment,{children:[", ",(0,p.jsx)(ee.Z,{title:(0,p.jsxs)(p.Fragment,{children:["These apps aren't from the Meta Horizon Store and won't be imported:"," ",j.join(", ")||"unknown apps"]}),children:(0,p.jsxs)(i.Z,{component:"span",sx:{textDecoration:"underline dashed",textUnderlineOffset:3,cursor:"pointer"},children:[f.filtered," filtered out"]})})]}),f.errors>0&&", ".concat(f.errors," error").concat(1!==f.errors?"s":"")]}),f.errors>0&&(0,p.jsx)(Iy.Z,{severity:"warning",sx:{marginBottom:2},children:"Fix errors before continuing. Rows with missing required fields cannot be imported."}),(0,p.jsxs)(Me.Z,{variant:"outlined",sx:{overflow:"hidden"},children:[(0,p.jsx)(VH,{rows:n}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,sx:{padding:2,borderTop:1,borderColor:"divider",backgroundColor:"background.default"},children:[(0,p.jsx)(C.Z,{variant:"outlined",onClick:P,disabled:g,children:"Clear"}),(0,p.jsx)(C.Z,{variant:"contained",onClick:L,disabled:g||!E,startIcon:g?(0,p.jsx)(Zi.Z,{size:16}):void 0,children:g?"Importing...":"Import Apps"})]})]})]}),"results"===e&&d&&(0,p.jsx)(XH,{createdApps:d.apps,skippedApps:w,summary:d.summary,onImportMore:P}
3),(0,p.jsx)(QH,{open:u,onClose:T,onContinue:D,onUploadNew:T})]})}));fq.displayName="VRContentPageCreateMetaCsvImport";const bq=()=>{const e=(0,u.I0)(),{organizationId:t,buildOrganizationPath:n}=(0,w.P)(),{notify:i}=(0,ie.o)(),o=(0,l.k6)(),[r,s]=a.useState(""),[d,c]=a.useState({type:hc._2D,mapping:gc.NONE,display:Cc.MONO,packing:fc.NONE}),[h,g]=a.useState(),[C,x]=a.useState(!1);return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h6",color:"textSecondary",children:"New Video"}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",spacing:2,sx:{"& > *":{flexBasis:0,flexGrow:1}},children:[(0,p.jsx)(Wj,{label:".mp4 or .mkv",accept:{"video/mp4":[".mp4"],"video/x-matroska":[".mkv"]},selectedFile:h,onFileSelected:g,onClearClick:()=>g(void 0)}),(0,p.jsx)(Ul.z,{label:"Title",placeholder:"Video name",value:r,onChange:e=>s(e.target.value),error:C&&!r,helperText:C&&!r?"Please enter a title":void 0,autoFocus:!0,fullWidth:!0})]}),(0,p.jsx)(aZ,{video:d,onChange:e=>c({...d,...e})}),(0,p.jsx)(Un.U,{startIcon:(0,p.jsx)(Wn.Z,{}),onClick:()=>{x(!0),h&&r&&e(oZ({formData:{title:r,...d},videoFile:h,organizationId:t,onStart:e=>{o.push(n((e=>e.vrContent.edit.videoUpload),{uploadId:e}))},onError:e=>{var t;const n=(0,Fe.tf)(e);i({severity:"error",message:null!==(t=null===n||void 0===n?void 0:n.message)&&void 0!==t?t:"Error creating Video"})},onSuccess:e=>{i({severity:"success",message:"".concat(e.title," created"),action:{title:"View",onClick:()=>{o.push(n((e=>e.vrContent.edit.video),{videoId:e.id}))}}})}}))},disabled:!h,sx:{alignSelf:"flex-start"},children:"Create video"})]})},yq=()=>{var e,t;const{organizationId:n,buildOrganizationPath:i}=(0,w.P)(),{notify:o}=(0,ie.o)(),a=(0,l.k6)(),{register:r,handleSubmit:s,formState:d}=(0,fg.cI)(),c=Be.vc.vrContent.defaultIconUrl,u=s((async e=>{let{url:t,title:r}=e;try{const e=await(0,Fe.Oo)({organizationId:n},{url:t,title:r,iconUrl:c});o({severity:"success",message:"".concat(e.title," created")}),a.push(i((e=>e.vrContent.edit.webXRApp),{webXRAppId:e.id}))}catch(s){var l;(0,Si.yR)(s,{name:"create web xr app error"});const e=(0,Fe.tf)(s);o({severity:"error",message:null!==(l=null===e||void 0===e?void 0:e.message)&&void 0!==l?l:"Error creating WebXR Link"})}}));return(0,p.jsx)("form",{onSubmit:u,noValidate:!0,children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h6",color:"textSecondary",children:"New WebXR Link"}),(0,p.jsx)(Ul.z,{label:"Link URL",placeholder:"https://webxr.link",error:!!d.errors.url,helperText:null===(e=d.errors.url)||void 0===e?void 0:e.message,fullWidth:!0,...r("url",{required:"Please enter a url",pattern:NS.qv})}),(0,p.jsx)(Ul.z,{label:"Title",placeholder:"WebXR Link Name",error:!!d.errors.title,helperText:null===(t=d.errors.title)||void 0===t?void 0:t.message,fullWidth:!0,...r("title",{required:"Please enter a title"})}),(0,p.jsx)(Un.U,{startIcon:(0,p.jsx)(Wn.Z,{}),onSubmit:u,submitting:d.isSubmitting,sx:{alignSelf:"flex-start"},children:"Create link"})]})})},jq=()=>{const{buildOrganizationPath:e}=(0,w.P)(),t=(0,d.U5)(),n=(0,d.P)("FORCE_HIDE_DISCOVER_XR"),o=(0,Le.ye)("enableMetaHorizonManagedAppCsvImport");return(0,p.jsxs)(ii.Z,{disablePadding:!0,children:[(0,p.jsx)(sj.Z,{children:"Add new content"}),(0,p.jsxs)(QV,{to:e((e=>e.vrContent.create.app)),replace:!0,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(LH.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"App"})]}),(0,p.jsx)(ee.Z,{title:t?"":"Upgrade to Premium to use this feature",placement:"right",children:(0,p.jsx)(i.Z,{children:(0,p.jsxs)(QV,{to:e((e=>e.vrContent.create.video)),replace:!0,disabled:!t,children:[(0,p.jsx)(As.Z,{children:t?(0,p.jsx)(Ci.Z,{}):(0,p.jsx)(uh.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Video"})]})})}),(0,p.jsx)(ee.Z,{title:t?"":"Upgrade to Premium to use this feature",placement:"right",children:(0,p.jsx)(i.Z,{children:(0,p.jsxs)(QV,{to:e((e=>e.vrContent.create.webXRApp)),replace:!0,disabled:!t,children:[(0,p.jsx)(As.Z,{children:t?(0,p.jsx)(NH.Z,{}):(0,p.jsx)(uh.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"WebXR Link"})]})})}),!n&&(0,p.jsx)(i.Z,{children:(0,p.jsxs)(QV,{to:e((e=>e.vrContent.create.instant)),replace:!0,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Ud.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Instant"})]})}),o&&(0,p.jsxs)(QV,{to:e((e=>e.vrContent.create.metaCsvImport)),replace:!0,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(dg.q,{})}),(0,p.jsx)(Rs.Z,{primary:"Meta Horizon Store Apps"})]})]})},Zq=(0,a.memo)((()=>{var e;const{privileges:t,buildOrganizationPath:n}=(0,w.P)(),i=(0,d.kV)(),o=t.content&&!(null!==(e=i.usesMxrPartner)&&void 0!==e&&e.fixedContentProvider),a=(0,Le.ye)("enableMetaHorizonManagedAppCsvImport");return(0,p.jsx)(vd,{sidebarContent:(0,p.jsx)(jq,{}),minContentWidth:vK,children:o?(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.create.app.__path,children:(0,p.jsx)(_H,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.create.video.__path,children:(0,p.jsx)(bq,{})}
3),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.create.webXRApp.__path,children:(0,p.jsx)(yq,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.create.instant.__path,children:(0,p.jsx)(zH,{})}),a&&(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.create.metaCsvImport.__path,children:(0,p.jsx)(fq,{})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(l.l_,{to:n((e=>e.vrContent.create.app),{},{type:"managed"})})})]}):(0,p.jsx)(Me.Z,{sx:{paddingY:2,paddingX:2},children:(0,p.jsx)(rW,{children:(0,p.jsx)(Rz,{privilege:"content",featureDescription:"create VR Content"})})})})})),wq=()=>{const{contentFilter:e,handleContentFilterChange:t,contentFilterOptions:n}=OH(),i=(0,a.useMemo)((()=>(0,o.map)(n,((e,t)=>({value:t,label:e.label,disabled:e.disabled})))),[n]);return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:(0,p.jsx)(wG,{value:e,options:i,onChange:t})})},Eq=()=>{const{setSearchTerm:e}=OH(),t=(0,_n.S)({xs:"Search VR content",lg:"Filter by title, description, or category"});return(0,p.jsx)(gf,{setSearchTerm:e,placeholder:t,debounceTimeMs:500})},Sq=(e,t)=>{const{dashboardStats:n,dashboardStatsLoading:i}=(0,Xn.w)(),{requiresMhmsEnrollment:r=!1}=null!==t&&void 0!==t?t:{},l=(()=>{const{organizationId:e}=(0,w.P)(),t=id();return(0,a.useMemo)((()=>{if(t&&(0,o.isEmpty)(t.configRefs))return;const n=S.F.DeviceWebConsoleSettings,i=(0,Os.N$)(n),a=(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,e)),r=(0,td.ar)("isQfbDevice","==",!0);if(t){const l=(0,o.chunk)(t.configRefs,nd.ps);return{id:(0,nd.tc)({collection:n,organizationId:e,filter:"isQfbDevice:configs:".concat(t.configurationIds.join(","))}),query:(0,o.map)(l,(e=>(0,td.IO)(i,a,r,(0,td.ar)("deviceGroupRef","in",e))))}}return{id:(0,nd.tc)({collection:n,organizationId:e,filter:"isQfbDevice"}),query:(0,td.IO)(i,a,r)}}),[t,e])})(),s=(0,If.Y)(r?l:void 0);return(0,a.useMemo)((()=>{if(r&&!l)return{isLoading:!1,compatibleModels:[],compatibleCount:0};if(r?!s:i||!n)return{isLoading:!0,compatibleModels:[],compatibleCount:0};if(r){const t=Array.from(s.values()),n=(0,o.countBy)(t,"model"),i=(0,o.keys)(n);if(!e){return{isLoading:!1,compatibleModels:i,compatibleCount:t.length}}if(0===e.length)return{isLoading:!1,compatibleModels:[],compatibleCount:0};const a=(0,o.filter)(i,(t=>(0,o.includes)(e,t)));return{isLoading:!1,compatibleModels:a,compatibleCount:(0,o.reduce)(a,((e,t)=>{var i;return e+(null!==(i=n[t])&&void 0!==i?i:0)}),0)}}if(!e||0===e.length)return{isLoading:!1,compatibleModels:[],compatibleCount:0};const t=n.deviceModelCounts,a=(0,o.keys)(t),d=(0,o.filter)(a,(t=>(0,o.includes)(e,t)));return{isLoading:!1,compatibleModels:d,compatibleCount:(0,o.reduce)(d,((e,n)=>{var i;return e+(null!==(i=t[n])&&void 0!==i?i:0)}),0)}}),[n,i,l,s,r,e])},Dq=e=>{let{supportedDevices:t,requiresMhmsEnrollment:n=!1}=e;const{isLoading:r,compatibleCount:s,compatibleModels:d}=Sq(t,{requiresMhmsEnrollment:n}),c=!t&&n,{buildOrganizationPath:h}=(0,w.P)(),g=(0,l.k6)(),C=(0,u.I0)(),x=(0,a.useCallback)((()=>{C(La.i7.actions.filtersCleared()),C(La.i7.actions.modelSelected({models:d})),n&&(C(La.i7.actions.filterSelected({filterId:"mhmsMigrationComplete"})),C(La.i7.actions.filterSelected({filterId:"enrolledViaQFB"}))),g.push(h((e=>e.devices)))}),[h,d,C,g,n]),f={backgroundColor:"grey.100",borderRadius:1,padding:.5,paddingX:1,width:"fit-content",maxWidth:"100%"};if(r)return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:f,children:[(0,p.jsx)(Zi.Z,{size:16}),(0,p.jsx)(v.Z,{variant:"body2",children:"Checking compatibility"})]});if(!c&&(!t||0===t.length))return null;if(s>0){const e=c?"Some apps are incompatible with specific Meta device models. Check the Meta Horizon Store to verify.":"Go to compatible devices";return(0,p.jsx)(ee.Z,{title:e,placement:"bottom-start",children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:f,children:[(0,p.jsx)(Rh.Z,{color:"primary",fontSize:"small"}),(0,p.jsxs)(v.Z,{variant:"body2",children:["Compatible with"," ",(0,p.jsxs)(Kn.Z,{component:"button",variant:"body2",onClick:x,sx:{verticalAlign:"baseline"},children:[s," ",1===s?"device":"devices"]})]})]})})}const b=c?(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"body2",children:["This app requires devices enrolled through"," ",(0,p.jsx)("strong",{children:"Meta Horizon managed services"}),"."]}),(0,p.jsx)(v.Z,{variant:"body2",children:"You currently have no devices enrolled through MHMS."}),(0,p.jsx)(v.Z,{variant:"body2",children:"Some apps are incompatible with specific Meta device models. Check the Meta Horizon Store to verify."})]}):(()=>{const e=(0,o.map)(t,(e=>(0,Vr.ao)(e)));return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"body2",children:"This app is only supported on:"}),(0,p.jsx)(i.Z,{component:"ul",sx:{margin:0,paddingLeft:2.5},children:(0,o.map)(e,(e=>(0,p.jsx)(v.Z,{component:"li",variant:"body2",children:e},e)))}),n&&(0,p.jsxs)(v.Z,{variant:"body2",children:["Devices must be enrolled through"," ",(0,p.jsx)("strong",{children:"Meta Horizon managed services"}),"."]}),(0,p.jsx)(v.Z,{variant:"body2",children:"You will not be able to install it on other devices."})]})})();return(0,p.jsx)(ee.Z,{title:b,placement:"bottom-start",children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{...f,cursor:"default"},children:[(0,p.jsx)(hM.Z,{color:"error",fontSize:"small"}),(0,p.jsx)(v.Z,{variant:"body2",children:"You have no devices compatible with this app"})]})})};Dq.displayName="UIOrgDeviceCompatibilityChip";const Mq=e=>{const{documents:t,fetched:n}=(0,E.jV)(S.F.InstantApps);return{instantApp:(0,a.useMemo)((()=>{var n,i;const o=null===(n=e.find((e=>e.instantAppRef)))||void 0===n||null===(i=n.instantAppRef)||void 0===i?void 0:i.id;return o?t.find((e=>e.id===o)):void 0}),[e,t]),fetched:n}}
3,kq=e=>{var t;let{app:n,onChange:i}=e;const{privileges:o}=(0,w.P)(),a=o.content&&!n.releaseChannelRef&&(0,Vs.n$)(n),r=!a||Nw._t.test(n.packageName);return(0,p.jsx)(ae,{value:null!==(t=n.packageName)&&void 0!==t?t:"",disabled:a,noPadding:!0,children:(0,p.jsx)(Ul.z,{label:"Package Name",value:n.packageName,onChange:e=>i(e.target.value),placeholder:"Package name",error:!r,helperText:r?"":"Please enter a valid package name",fullWidth:!0,privilege:"content",disableEvents:!a})})},Iq=(0,a.memo)((e=>{var t;let{app:n}=e;const{documents:i}=(0,E.D)(S.F.Configurations,{filter:(0,a.useCallback)((e=>!!(0,o.find)(e.approvedApps,{id:n.id})),[n.id])});return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to remove ",(0,p.jsx)("em",{children:n.title})," release channel"," ",(0,p.jsx)("em",{children:n.releaseChannelName}),"?"]}),(0,p.jsxs)(mf.h,{variant:"body2",children:["Once removed, you will lose access to it until"," ",(0,p.jsx)("em",{children:null===(t=n.sharingOrganizationProfile)||void 0===t?void 0:t.name})," shares it with you again."]}),(0,p.jsx)(QN,{configurations:i,configurationRoute:"apps",label:"It will be removed from these configurations",emptyLabel:"It's not linked to any configurations."})]})})),Aq=e=>{let{apps:t}=e;const{sharedAppFeatures:n}=OH(),{organizationId:r,privileges:l}=(0,w.P)(),{notify:s}=(0,ie.o)(),d=(0,_n.S)({xs:200,md:260}),c=(0,_n.S)({xs:200,md:300,xl:380}),u=(0,a.useCallback)((e=>e?(0,o.chain)(e).values().sum().value():0),[]),h=(0,a.useMemo)((()=>t.filter(Vs.Wk).length),[t]),g=h>0,C=(0,a.useMemo)((()=>t.filter((e=>(0,Vs.Uq)(e))).length),[t])>0,f=(0,a.useCallback)((e=>(0,p.jsx)(Iq,{app:e})),[]),b=Bn({title:"Remove Release Channel",onConfirm:async e=>{if(null!==e&&void 0!==e&&e.releaseChannelRef)try{await(0,Fe.w6)({organizationId:r,releaseChannelId:e.releaseChannelRef.id}),s({severity:"success",message:"Release channel removed"})}catch(t){s({severity:"error",message:"Failed to remove release channel"}),(0,Si.yR)(t,{name:"Remove shared release channel",contexts:{args:{organizationId:r,releaseChannelId:e.releaseChannelRef.id}}})}},confirmLabel:"Remove",getContent:f}),y=b.trigger,j=(0,a.useMemo)((()=>{const e=(0,da.Cl)(),t=[e.display({id:"organization",header:"Shared by Organization",size:c,cell:e=>{var t,n;let{row:i}=e;const o=null===(t=i.original.sharingOrganizationProfile)||void 0===t?void 0:t.imageUrl,a=null===(n=i.original.sharingOrganizationProfile)||void 0===n?void 0:n.name;return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:2,overflow:"hidden",children:[(0,p.jsx)(SI.X,{imageUrl:o,size:"small"}),(0,p.jsx)(v.Z,{noWrap:!0,variant:"subtitle2",title:a,children:a})]})}}),e.display({id:"release_channel",header:"Release Channel/Version",size:d,cell:e=>{let{row:t}=e;const n=t.original.releaseChannelName;return(0,p.jsxs)(m.Z,{direction:"row",flexWrap:"wrap",gap:.5,children:[(0,p.jsx)(v.Z,{noWrap:!0,variant:"subtitle2",title:n,children:n}),(0,p.jsx)(sc,{app:t.original,typographyVariant:"subtitle2",hideReleaseChannel:!0,color:"text.secondary"})]})}})];return n.deviceLimit&&t.push(e.display({id:"device_limit",header:"Device Limit",size:160,cell:e=>{let{row:t}=e;const{deviceLimit:n,configurationDeployments:i}=t.original;if(void 0===n)return(0,p.jsx)(v.Z,{variant:"subtitle2",children:"-"});const o=u(i),a="".concat(o," / ").concat(n);let r="inherit";(0,Vs.Uq)(t.original)&&(r="secondary.main");const l=n?"This app can only be deployed to ".concat((0,ul.sr)(n,"device")):"";return(0,p.jsx)(ee.Z,{title:l,placement:"top",children:(0,p.jsxs)(v.Z,{variant:"subtitle2",color:r,overflow:"hidden",textOverflow:"ellipsis",width:1,children:[(0,p.jsx)(v.Z,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:a})," ","devices"]})})}})),n.expiration&&t.push(e.display({id:"expiration_date",header:"Expiration Date",size:170,cell:e=>{let{row:t}=e;const{expirationTimestamp:n,expirationBehavior:i=gp.Kv.NONE}=t.original,a=(0,Vs.Wk)(t.original),r=(0,Vs.IR)(t.original);let l=n?"on "+(0,M.ax)(n):"-",s="subtitle2",d="inherit";a?d="secondary.main":r&&(l="Expired ".concat(l),s="caption",d="text.secondary");const c=i&&i!==gp.Kv.NONE?"App ".concat(r?"was":"will be"," ").concat((0,o.capitalize)(gp._A[i])):"",u=n&&!r?"This app will expire around ".concat((0,M.Mn)(n).format("ha")," ").concat(l):"";return(0,p.jsx)(ee.Z,{title:u,placement:"top",children:(0,p.jsxs)(m.Z,{direction:"column",spacing:.5,children:[(0,p.jsx)(v.Z,{variant:s,color:d,whiteSpace:"nowrap",children:l}),(0,p.jsx)(v.Z,{variant:"caption",color:d,children:c})]})})}})),l.content&&t.push(e.display({id:"remove",cell:e=>{let{row:t}=e;return(0,p.jsx)(ee.Z,{title:"Remove Shared App",placement:"top",children:(0,p.jsx)(x.Z,{size:"small",onClick:()=>y(t.original),children:(0,p.jsx)(bu.Z,{})})})},size:50})),t}),[c,d,n.deviceLimit,n.expiration,l.content,u,y]),Z=(0,sa.b7)({columns:j,data:t,getCoreRowModel:(0,da.sC)()});return(0,p.jsxs)(m.Z,{direction:"column",spacing:1,children:[g&&(0,p.jsxs)(u
3i.Q,{withBackground:!0,Icon:Iu.Z,children:[(0,ul.sr)(h,"Release Channel")," ",1===h?"expires":"expire"," soon"]}),C&&(0,p.jsx)(ui.Q,{withBackground:!0,severity:"error",Icon:Fl.u,children:(0,p.jsxs)(m.Z,{direction:"column",spacing:1,children:["Device limit exceeded",(0,p.jsx)(v.Z,{variant:"body2",children:"The organization sharing this app may have lowered the device limit. To comply with the limit, remove this app from some devices. For questions about the device limit, please contact the sharing organization."})]})}),(0,p.jsx)(i.Z,{sx:{paddingTop:2,"& .MuiTableBody-root .MuiTableCell-root":{border:"none"}},children:(0,p.jsx)(dc.A,{table:Z,rowHeight:46,flexColumnIds:"release_channel"})}),(0,p.jsx)(Fn,{...b.props})]})},Rq=e=>{let{value:t,onChange:n,allCategories:i,resetKey:o,sx:r}=e;const l=(e=>{const t=(0,a.useRef)(e);return t.current.length===e.length&&t.current.every(((t,n)=>t===e[n]))||(t.current=e),t.current})(t);return(0,p.jsx)(zi.W,{privilege:"content",children:(0,p.jsx)(Ic.Z,{multiple:!0,fullWidth:!0,autoComplete:!0,freeSolo:!0,size:"small",ChipProps:{variant:"filled"},options:i,disableClearable:!0,disableCloseOnSelect:!0,clearOnBlur:!0,value:l,filterOptions:(0,Kv.D)({trim:!0,ignoreCase:!1}),renderInput:e=>(0,p.jsx)(Ln.Z,{...e,size:"medium",label:"Home Screen Categories",placeholder:"New category",InputProps:{...e.InputProps,endAdornment:e.inputProps.value?(0,p.jsx)(Qv.Z,{}):void 0}}),onChange:(e,t)=>
3{n((0,$i.S3)(t,i))},sx:r},o)})};Rq.displayName="VRContentCategoriesAutocomplete";const Tq=e=>{var t,n;let{content:r,contentId:l,onChanges:s,getIconPath:d,renderColumn1Content:c,renderColumn2Content:u,appType:h,titleEndAdornment:g}=e;const v=(0,De.Z)(),C=Be.vc.vrContent.defaultIconUrl,x=(()=>{const{externalApps:e,managedApps:t,videos:n,webXRApps:i}=OH();return(0,a.useMemo)((()=>(0,o.chain)([...(0,o.flatten)((0,o.values)(t)),...(0,o.flatten)((0,o.values)(e)),...n,...i]).map((e=>{var t;return null!==(t=e.categories)&&void 0!==t?t:[]})).flatten().sort(((e,t)=>e.localeCompare(t))).sortedUniq().value()),[e,t,n,i])})(),f=(0,a.useCallback)(((e,t)=>{if(e>Be.vc.vrContent.maxIconDimension||t>Be.vc.vrContent.maxIconDimension)return"Maximum icon dimensions: ".concat(Be.vc.vrContent.maxIconDimension," x ").concat(Be.vc.vrContent.maxIconDimension)}),[]),b="shared"===h||"instant"===h,y="shared"===h?"organization sharing the app":"Instant App developer";return(0,p.jsxs)(m.Z,{direction:"row",spacing:2,children:[(0,p.jsxs)(m.Z,{width:180,flexShrink:0,children:[(0,p.jsx)(i.Z,{width:180,height:180,borderRadius:1,children:(0,p.jsx)($g,{label:"App Icon",helperText:["JPEG or PNG","square aspect ratio","256 x 256 recommended","512 x 512 maximum"],imageUrl:r.iconUrl===C?void 0:r.iconUrl,defaultImageUrl:C,onImageUploaded:e=>s({iconUrl:e}),getFilePath:d,onClear:()=>s({iconUrl:C}),validateDimensions:f,privilege:"content",disabled:b})}),c&&c()]}),(0,p.jsxs)(m.Z,{paddingTop:1,marginTop:e=>"-".concat(e.spacing(1)," !important"),spacing:2,flexGrow:1,overflow:"hidden",children:[(0,p.jsx)(Ul.z,{label:"Title",placeholder:"Title",value:r.title,onChange:e=>s({title:e.target.value}),inputProps:{sx:{...v.typography.h6}},fullWidth:!0,error:!r.title,privilege:"content",disabled:b,disableEvents:b,disableEventsTooltip:"Title is provided by the ".concat(y),InputProps:g?{endAdornment:(0,p.jsx)(mo.Z,{position:"end",children:g})}:void 0}),(0,p.jsx)(Ul.z,{label:"Description",placeholder:"Add description",value:null!==(t=r.description)&&void 0!==t?t:"",multiline:!0,onChange:e=>s({description:e.target.value}),fullWidth:!0,privilege:"content",disabled:b,disableEvents:b,disableEventsTooltip:"Description is provided by the ".concat(y)}),(0,p.jsx)(Rq,{value:null!==(n=r.categories)&&void 0!==n?n:[],onChange:e=>s({categories:e}),allCategories:x,resetKey:l}),u&&u()]})]})},Pq=e=>{let{onClick:t,buttonText:n="Delete app"}=e;const{privileges:i}=(0,w.P)();return i.content?(0,p.jsx)(m.Z,{flexGrow:1,justifyContent:"flex-end",alignItems:"flex-start",paddingTop:8,children:(0,p.jsx)(C.Z,{variant:"outlined",color:"error",onClick:t,startIcon:(0,p.jsx)(Gl.Z,{}),children:n})}):null};Pq.displayName="VRContentDeleteButton";const Lq=e=>{let{icon:t,typeLabel:n,rightContent:o}=e;return(0,p.jsx)(sh,{extraHeaderBackgroundWidth:2,headerBackgroundSize:3,headerContent:(0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",justifyContent:"space-between",spacing:1,paddingBottom:1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[t,(0,p.jsx)(v.Z,{color:"textSecondary",variant:"subtitle1",children:n})]}),o]}),(0,p.jsx)(i.Z,{width:e=>"calc(100% + ".concat(e.spacing(4),")"),marginX:-2,height:ud.mO,bgcolor:e=>e.palette.background.default})]})})};Lq.displayName="VRContentDetailHeader";const Nq=(0,a.createContext)(void 0),Uq=e=>{let{children:t}=e;const n=(0,a.useRef)(new Map),[i,r]=(0,a.useState)({}),l=(0,a.useCallback)((()=>{r({})}),[]),s=(e,t)=>"".concat(t,":").concat(e),d=(0,u.v9)((e=>e.firestore.data.apps.data)),c=(0,a.useCallback)((function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const i={},a={};(0,o.forEach)(e,(e=>{const t=d[e.fromAppRef.id];t&&(i[e.id]=t)})),(0,o.forEach)(t,(e=>{const t=d[e.fromAppRef.id];t&&(a[e.id]=t)}));const r=e=>i[e]||a[e];return{pendingQuery:n,appPatches:e,appPatchJobs:t,getFromApp:r}}),[d]),h=(0,a.useCallback)(((e,t)=>{const i=s(e,t);let a,r;const d=()=>{const e=n.current.get(i);e&&a&&r&&(e.data=c(a,r,!1),e.lastAccessed=Date.now(),l())},u=(0,Os.p6)(S.F.AppPatches,(n=>(0,td.IO)(n,(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,t)),(0,td.ar)("toAppRef","==",(0,Os.qb)(S.F.Apps,e))))),p=(0,Os.p6)(S.F.Jobs,(n=>(0,td.IO)(n,(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,t)),(0,td.ar)("jobType","==","APP_PATCH"),(0,td.ar)("toAppRef","==",(0,Os.qb)(S.F.Apps,e)),(0,td.ar)("status","in",["QUEUED","PROCESSING"]))));return[(0,td.cf)(u,(e=>{a=(0,o.map)(e.docs,(e=>({...e.data(),id:e.id}))),d()}),(t=>{(0,Si.yR)(t,{name:"query app patches for app versions table",contexts:{app:{id:e}}})})),(0,td.cf)(p,(e=>{r=(0,o.map)(e.docs,(e=>({...e.data(),id:e.id}))),d()}),(e=>{(0,Si.yR)(e,{name:"query app patch jobs for app versions table"})}))]}),[c,l]),m=(0,a.useCallback)(((e,t)=>{const i=s(e,t),o=Date.now();let a=n.current.get(i);if(a)a.lastAccessed=o;else{a={data:c(),unsubscribers:h(e,t),lastAccessed:o},n.current.set(i,a)}return a.data}),[c,h]),g=(0,a.useCallback)((()=>{const e=Date.now(),t=(0,M.ON)(5);for(const[i,o]of Array.from(n.current.entries()))e-o.lastAccessed>
3t&&(o.unsubscribers.forEach((e=>e())),n.current.delete(i))}),[]),v=(0,a.useCallback)((()=>{for(const e of Array.from(n.current.values()))e.unsubscribers.forEach((e=>e()));n.current.clear()}),[]);(0,a.useEffect)((()=>v),[v]),(0,a.useEffect)((()=>{const e=setInterval(g,(0,M.ON)(1));return()=>clearInterval(e)}),[g]);const C=(0,a.useMemo)((()=>({getAppPatchesData:m})),[m,i]);return(0,p.jsx)(Nq.Provider,{value:C,children:t})},Fq=()=>(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"apps/versions/:appId",getDocumentUpdate:e=>{let{params:t,data:n}=e;const i={};var a;(0,o.isUndefined)(null===n||void 0===n?void 0:n.versionLabel)||(i.versionLabel=null!==(a=null===n||void 0===n?void 0:n.versionLabel)&&void 0!==a?a:void 0);return(0,o.isUndefined)(null===n||void 0===n?void 0:n.fileRefs)||(i.fileRefs=null===n||void 0===n?void 0:n.fileRefs),{collection:S.F.Apps,id:null===t||void 0===t?void 0:t.appId,update:i}}})),[])),Oq=e=>{let{apps:t}=e;const n=(0,u.v9)((e=>e.vrContent.editingFilesAppId)),i=(0,a.useMemo)((()=>(0,o.find)(t,{id:n})),[t,n]),r=(0,a.useMemo)((()=>(0,o.chain)(t).filter((e=>e.id!==n&&(0,Od.l7)(e.fileRefs))).orderBy("createdAt","desc").value()),[t,n]),{documents:l}=(0,E.D)(S.F.Configurations,{filter:(0,a.useCallback)((e=>(0,Od.l7)(e.fileRefs)),[]),sort:ze.gt});return i?(0,p.jsx)(_q,{app:i,otherVersionsWithFiles:r,configurationsWithFiles:l}):null},_q=e=>{let{app:t,otherVersionsWithFiles:n,configurationsWithFiles:i}=e;const r=(0,u.I0)(),{dashboardStats:l}=(0,Xn.w)(),s=(0,d.P)("DISABLE_ANDROID_PERMISSION_WARNINGS"),c=Fq(),h=(0,a.useCallback)((async e=>{let{changes:{fileRefs:n}}=e;await c.request({params:{appId:t.id},data:{fileRefs:n},successMessage:"Bundled files saved",errorMessage:"Failed to save bundled files"})}),[c,t.id]),{withChanges:{fileRefs:g},addChanges:x,saveChanges:f,clearChanges:y,hasChanges:j,saveChangesPending:Z}=Ji({document:t,save:h}),w=(0,a.useCallback)((e=>{x({fileRefs:e})}),[x]),E=(0,a.useMemo)((()=>{if(s)return[];const e=[{type:"androidData",shouldShowWarning:tc(g,"androidData"),isInfoLevel:!$d(l,"androidData")}];return(0,o.filter)(e,"shouldShowWarning").map((e=>{let{type:t,isInfoLevel:n}=e;return{permission:t,isInfoLevel:n}}))}),[g,l,s]),[S,D]=(0,a.useState)();(0,a.useEffect)((()=>{j||D(void 0)}),[j]);const M=(0,a.useRef)(null),[k,I]=(0,a.useState)(!1),A=(0,a.useCallback)((e=>{e.fileRefs&&(x({fileRefs:e.fileRefs}),D({type:"app",document:e}),I(!1),(0,b.ec)("Bundled Files Copied",{source:"App Version",sourceId:e.id,appId:t.id}))}),[x,t.id]),R=(0,a.useCallback)((e=>{e.fileRefs&&(x({fileRefs:e.fileRefs}),D({type:"configuration",document:e}),I(!1),(0,b.ec)("Bundled Files Copied",{source:"Configuration",sourceId:e.id,appId:t.id}))}),[x,t.id]),T=(0,a.useCallback)((e=>{const{documents:t,onClick:n,renderMenuItemContent:i}=e,a=(0,o.groupBy)(t,(e=>(0,o.isEqual)(e.fileRefs,g)?"same":"different"));return[...(0,o.map)(a.different,(e=>(0,p.jsx)(Hi.Z,{onClick:()=>n(e),children:i(e)},e.id))),...(0,o.map)(a.same,(e=>(0,p.jsx)(ee.Z,{title:"Files are the same as this version",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)("span",{children:(0,p.jsx)(Hi.Z,{disabled:!0,children:i(e)})})},e.id)))]}),[g]),P=(0,a.useMemo)((()=>T({documents:n,onClick:A,renderMenuItemContent:e=>(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(sc,{app:e}),secondary:(0,Od.gM)(e.fileRefs)})})),[A,n,T]),L=(0,a.useMemo)((()=>T({documents:i,onClick:R,renderMenuItemContent:e=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Wl.Z,{})}),(0,p.jsx)(Rs.Z,{primary:e.name,secondary:(0,Od.gM)(e.fileRefs)})]})})),[i,R,T]),N=(0,a.useMemo)((()=>S?(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"baseline",height:26,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Copied from"}),"app"===S.type&&(0,p.jsx)(sc,{typographyVariant:"body2",app:S.document,showV:!0}),"configuration"===S.type&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Wl.Z,{color:"action",fontSize:"small",sx:{transform:"translateY(5px)"}}),(0,p.jsx)(v.Z,{variant:"body2",children:S.document.name})]}),!(0,o.isEqual)(g,S.document.fileRefs)&&(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"(Edited)"})]}):null),[S,g]),{confirm:U}=(0,ie.o)(),F=()=>{const e=()=>{r(nZ.K.actions.stoppedEditingFiles({appId:t.id}))};j?U({message:"You have unsaved changes. Close without saving?",closeLabel:"Cancel",confirmLabel:"Close",onConfirm:e}):e()},O=(0,p.jsx)(zi.W,{privilege:"content",action:"copy files",disableAutoSize:!0,children:(0,p.jsx)(C.Z,{variant:"outlined",ref:M,sx:{textTransform:"none"},endIcon:(0,p.jsx)(mh.Z,{}),onClick:()=>I(!0),disabled:Z||(0,o.isEmpty)(P)&&(0,o.isEmpty)(L),children:"Copy Files from"})});return(0,p.jsxs)(kn.Z,{open:!0,onClose:F,disableEscapeKeyDown:!0,maxWidth:"md",fullWidth:!0,children:[(0,p.jsx)(In.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",children:[(0,p.jsx)(v.Z,{variant:"h6",color:"text.secondary",children:"Bundled files for version\xa0"}),(0,p.jsx)(sc,{app:{...t,fileRefs:g},typographyVariant:"h6",sx:{color:"text.secondary"}})]})}),(0,p.jsxs)(An.Z,{children:[(0,p.jsxs)(m.Z,{spacing:2,children:[(0,o.map)(E,(e=>(0,p.jsx)(fx,{permissionType:e.permission,isInfoLevel:e.isInfoLevel},e.permission))),(0,p.jsx)(hx,{fileRefs:g,destinationTitle:"This Version",destinationRootName:Od.uu,onChange:w,columnHeight:"calc(100vh - 332px)",destinationToolbarContent:O,destinationContentHeader:N,privilege:"content"})]}),(0,p.jsxs)(Is.Z,{anchorEl:M.current,open:k,onClose:()=>I(!1),children:[!(0,o.isEmpty)(P)&&(0,p.jsx)(sj.Z,{children:"Version"}),P,!(0,o.isEmpty)(L)&&(0,p.jsx)(sj.Z,{children:"Configuration"}),L]})]}),(0,p.jsx)(Pn.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",width:1,children:[(0,p.jsx)(C.Z,{onClick:F,children:"Close"}),(0,p.jsx)(bd,{hasChanges:j,savePending:Z,onSaveClick:f,onUndoAllClick:y,reverse:!0})]})})]})},zq=e=>{let{apps:t}=e;const n=(0,u.v9)((e=>e.vrContent.duplicatingAppId)),i=(0,a.useMemo)((()=>(0,o.find)(t,{id:n})),[t,n]),r=(0,a.useMemo)((()=>(0,o.chain)(t).filter((e=>
3!!i&&e.versionCode===i.versionCode&&e.versionName===i.versionName)).map("versionLabel").compact().value()),[t,i]);return i?(0,p.jsx)(Bq,{app:i,usedVersionLabels:r}):null},Bq=e=>{var t;let{app:n,usedVersionLabels:i}=e;const a=(0,u.I0)(),r=MH(),{register:l,handleSubmit:s,formState:d}=(0,fg.cI)(),c=()=>{a(nZ.K.actions.stoppedDuplicating({appId:n.id}))},h=s((async e=>{var t;let{versionLabel:i}=e;if(!n.apkUrl||!n.latestVersion||!n.versionName)return;const o={apkUrl:n.apkUrl,fileRefs:n.fileRefs,iconUrl:n.iconUrl,latestVersion:n.latestVersion,obbUrls:null!==(t=n.obbUrls)&&void 0!==t?t:[],packageName:n.packageName,title:n.title,versionName:n.versionName,versionLabel:i,...n.apkSize?{apkSize:n.apkSize}:{},...n.obbSize?{obbSize:n.obbSize}:{}};await r.request({data:o,successMessage:"App version duplicated",errorMessage:"Error duplicating app version"}),c()}));return(0,p.jsx)(kn.Z,{open:!0,onClose:c,fullWidth:!0,maxWidth:"xs",children:(0,p.jsxs)("form",{onSubmit:h,noValidate:!0,children:[(0,p.jsx)(In.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"baseline",children:[(0,p.jsx)(v.Z,{variant:"h6",color:"text.secondary",children:"Duplicate\xa0version\xa0"}),(0,p.jsx)(sc,{app:n,typographyVariant:"h6",sx:{color:"text.secondary"}})]})}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:"Please enter a unique label for the duplicated version."}),(0,p.jsx)(Ul.z,{label:"Version Label",placeholder:"Version label",error:!!d.errors.versionLabel,helperText:null===(t=d.errors.versionLabel)||void 0===t?void 0:t.message,autoFocus:!0,...l("versionLabel",{required:"Please enter a version label",validate:{noDuplicateVersionLabel:e=>!(0,o.includes)(i,e)||"This label is already used by another version"}})})]})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",width:1,children:[(0,p.jsx)(C.Z,{onClick:c,children:"Close"}),(0,p.jsx)(Un.U,{submitting:d.isSubmitting,children:"Duplicate"})]})})]})})},Wq=()=>(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"apps/delete",getDocumentUpdate:e=>{let{data:t}=e;return null!==t&&void 0!==t&&t.packageName?{collection:S.F.Apps,managedAppPackageName:t.packageName,remove:!0}:null!==t&&void 0!==t&&t.appId?{collection:S.F.Apps,id:t.appId,remove:!0}:void 0}})),[])),Vq=(e,t)=>!!t&&!!e.packageName&&e.packageName===t,Gq=e=>{var t;const{developerPortalReleaseChannelsEnabled:n,developerOrganizationReleaseChannels:i}=OH(),o=null===(t=e[0])||void 0===t?void 0:t.packageName;return(0,a.useMemo)((()=>n?i.filter((e=>Vq(e,o))):[]),[i,n,o])},Hq=(0,a.memo)((e=>{let{subject:t="app",blocked:n=!1,instantApp:r,releaseChannels:l}=e;const s=(0,Le.I7)(),d=(0,a.useMemo)((()=>(0,o.map)(l,(e=>{var t;return{id:e.id,name:e.name,sharedClause:Ty({organizationCount:(0,o.keys)(null!==(t=e.sharedOrganizations)&&void 0!==t?t:{}).length})}}))),[l]),c=(0,a.useMemo)((()=>{if(!r)return;const e=(0,o.map)(l,(e=>e.id));return(0,dy.R)(r,e)?(e=>{let{instantAppName:t,marketplaceName:n,blocked:i=!1}=e;return i?"This would remove the last release channel for ".concat(t,", so it would be hidden from ").concat(n," until a new channel is added."):"This removes the last release channel for ".concat(t,", so it will be hidden from ").concat(n," until a new channel is added.")})({instantAppName:r.title,marketplaceName:s,blocked:n}):void 0}),[n,r,s,l]);if(0===l.length)return null;const u=(e=>{let{subject:t="app",blocked:n=!1,instantAppName:i,channelCount:o}=e;const a="".concat(o," release channel").concat(1===o?"":"s"),r=n?"would":"will";return i?{lead:"Deleting this ".concat(t," ").concat(r," also delete ").concat(a," for the Instant App "),instantAppName:i,trailing:":"}:{lead:"Deleting this ".concat(t," ").concat(r," also delete ").concat(a," for its Instant App:"),trailing:""}})({subject:t,blocked:n,instantAppName:null===r||void 0===r?void 0:r.title,channelCount:l.length});return(0,p.jsx)(Iy.Z,{severity:"error",icon:(0,p.jsx)(me.Z,{fontSize:"small"}),children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(v.Z,{variant:"body2",children:[u.lead,u.instantAppName&&(0,p.jsx)(i.Z,{component:"span",sx:{fontWeight:"bold",color:"primary.main"},children:u.instantAppName}),u.trailing]}),(0,p.jsx)(m.Z,{component:"ul",spacing:.5,sx:{marginY:0,paddingLeft:2.5},children:d.map((e=>(0,p.jsxs)(v.Z,{component:"li",variant:"body2",children:[(0,p.jsx)(i.Z,{component:"span",sx:{fontWeight:"bold"},children:e.name})," is ".concat(e.sharedClause,".")]},e.id)))}),c&&(0,p.jsx)(v.Z,{variant:"body2",children:c})]})})}));
3Hq.displayName="VRContentDeleteAppInstantAppWarning";const qq=(0,a.memo)((e=>{let{app:t}=e;const{configurations:n,releaseChannels:i}=(e=>{const{documents:t}=(0,E.D)(S.F.Configurations),{documents:n}=(0,E.D)(S.F.ReleaseChannels);return(0,a.useMemo)((()=>({configurations:tZ(e,t),releaseChannels:eZ(e,n)})),[e,t,n])})(t),r=!(0,o.isEmpty)(i),l=Gq([t]),{instantApp:s}=Mq(l);return(0,p.jsxs)(m.Z,{spacing:1,children:[r?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(mf.h,{children:["Can't delete version ",(0,p.jsx)("em",{children:t.versionName}),"."]}),(0,p.jsx)(QN,{releaseChannels:i,label:"It's linked to these release channels"})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to delete version ",(0,p.jsx)("em",{children:t.versionName}),"?"]}),(0,p.jsx)(QN,{configurations:n,configurationRoute:"apps",label:"It will be removed from these configurations",emptyLabel:"It's not linked to any configurations or release channels."})]}),(0,p.jsx)(Hq,{subject:"version",blocked:r,instantApp:s,releaseChannels:l})]})}));qq.displayName="VRContentDeleteAppVersionDialogContent";const Yq=(e,t,n)=>{const{organizationId:i,hasRequiredPrivilege:o}=(0,w.P)(),[r,l]=(0,a.useState)(!1),s=(0,a.useCallback)((async()=>{if(o(n)){l(!0);try{const{downloadUrl:n}=await(0,Fe.Wj)({organizationId:i},{storageUrl:e,filename:t,persistent:!1});(0,di.Sv)(n,t)}catch(a){(0,Si.yR)(a,{name:"get file download url",contexts:{file:{storageUrl:e,filename:t}}})}finally{l(!1)}}}),[t,o,i,n,e]);return(0,a.useMemo)((()=>({handleClick:s,pending:r})),[s,r])},Kq=e=>{let{storageUrl:t,filename:n,children:i,privilege:o,...a}=e;const{handleClick:r,pending:l}=Yq(t,n,o);return(0,p.jsx)(C.Z,{...a,disabled:l||a.disabled,onClick:r,startIcon:(0,p.jsx)(wi.Z,{}),children:i})};Kq.displayName="UIDownloadButton";const Xq=e=>{let{file:t,privilege:n}=e;const{title:i,url:o,filename:a}=t,{handleClick:r,pending:l}=Yq(o,a,n);return(0,p.jsxs)(Hi.Z,{onClick:r,disabled:l,sx:{paddingX:2,paddingY:1},children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(wi.Z,{})}),(0,p.jsxs)(Rs.Z,{children:["Download ",i]})]})};Xq.displayName="UISidebarDownloadMenuItem";const Qq=e=>{let{toApp:t,open:n,onClose:r}=e;const{getAppPatchesData:l}=(()=>{const e=(0,a.useContext)(Nq);if(void 0===e)throw new Error("useVRContentAppPatchesContext must be used within a VRContentAppPatchesProvider");return e})(),{pendingQuery:s,appPatches:d,appPatchJobs:c,getFromApp:u}=l(t.id,t.organizationRef.id),h=(0,a.useMemo)((()=>{if(!d&&!c)return[];const e=[];return null===d||void 0===d||d.forEach((t=>{var n,i,a,r;const l=((e,t)=>{if(!e||!t)return;if(0===e)return;const n=(e-t)/e*100;return(0,o.round)(n,1)})(null===(n=t.stats)||void 0===n?void 0:n.totalUnpatchedSize,null===(i=t.stats)||void 0===i?void 0:i.totalPatchSize),s=u(t.id);s&&e.push({id:t.id,fromApp:s,patchSize:null===(a=t.stats)||void 0===a?void 0:a.totalPatchSize,fullSize:null===(r=t.stats)||void 0===r?void 0:r.totalUnpatchedSize,downloadSizeReduction:l})})),null===c||void 0===c||c.forEach((t=>{const n=u(t.id);n&&e.push({id:t.id,fromApp:n})})),e}),[d,c,u]),g=(0,a.useMemo)((()=>{const e=(0,da.Cl)(),t=[];return t.push(e.accessor("fromApp",{id:"sourceVersion",header:()=>(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(v.Z,{children:"Installed App"}),(0,p.jsx)(Fi._,{tooltipText:"When a device has this app installed, it can be patched from this version.",TooltipProps:{placement:"left",disableInteractive:!1},children:(0,p.jsx)(cc.Z,{color:"action",sx:{fontSize:16}})})]}),cell:e=>{const t=e.row.original.fromApp;return(0,p.jsx)(sc,{app:t,typographyVariant:"body2"})},sortingFn:(e,t)=>(0,Vs.r6)(e.original.fromApp,t.original.fromApp),size:200})),t.push(e.accessor("patchSize",{id:"patchSize",header:()=>(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(v.Z,{children:"Patch Size"}),(0,p.jsx)(Fi._,{tooltipText:"The size of the patch file that will be downloaded to upgrade devices to this version. When a patch is ready to be downloaded, the size will be shown here.",TooltipProps:{placement:"left",disableInteractive:!1},children:(0,p.jsx)(cc.Z,{color:"action",sx:{fontSize:16}})})]}),cell:e=>{const t=e.row.original;if(!t.patchSize)return(0,p.jsx)(ke.Z,{label:"Not Ready",color:"default",size:"small",sx:{minWidth:80}});
3const n=(0,Ad.Z)(t.patchSize),i=t.downloadSizeReduction?" (-".concat(t.downloadSizeReduction.toFixed(1),"%)"):"";return(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,alignItems:"center",children:[(0,p.jsx)(v.Z,{children:n}),i&&(0,p.jsx)(v.Z,{color:"success.main",variant:"caption",children:i})]})},size:150})),t}),[]),C=(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["App Patches help devices update faster by downloading only the changes from the previous installed version. ManageXR automatically generates patch previews for new app versions to show you the expected update size between the new version and versions installed on devices."," ",(0,p.jsx)(Kn.Z,{color:y.DG.info[200],href:Be.IW.appPatches,target:"_blank",children:"Learn More"})]}),x=(0,sa.b7)({columns:g,data:h,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)(),initialState:{sorting:[{id:"sourceVersion",desc:!1}]}});return(0,p.jsx)(Ro.Q,{open:n,onClose:r,maxWidth:"sm",title:(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"h6",color:"text.secondary",children:"App patches for this version"}),(0,p.jsx)(sc,{app:t,sx:{color:"text.secondary"}})]}),children:s?(0,p.jsx)(i.Z,{display:"flex",justifyContent:"center",padding:4,children:(0,p.jsx)(Zi.Z,{})}):0===h.length?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{variant:"subtitle1",mb:.5,children:"No patches found"}),C]}):(0,p.jsxs)(m.Z,{spacing:4,children:[C,(0,p.jsx)(dc.A,{table:x,height:(0,o.clamp)(50*h.length,400),rowHeight:50,flexColumnIds:"sourceVersion",emptyMessage:"No patches or jobs found for this version"})]})})},Jq=e=>{let{app:t,onDelete:n}=e;const i=(0,u.I0)(),o=(0,u.v9)((e=>e.vrContent.editingVersionLabelAppId===t.id)),r=(0,Le.ye)("enableAppPatchStats"),[l,s]=(0,a.useState)(!1),d=(0,a.useMemo)((()=>{var e;const n=[];return t.apkUrl&&n.push((0,p.jsx)(Xq,{file:{title:"APK",url:t.apkUrl,filename:"".concat(t.title,"_").concat(t.latestVersion,"_").concat(t.versionName,".apk")}},"download-app-version-apk")),null!==(e=t.obbUrls)&&void 0!==e&&e[0]&&n.push((0,p.jsx)(Xq,{file:{title:"OBB",url:t.obbUrls[0],filename:"main.".concat(t.latestVersion,".").concat(t.packageName,".obb")}},"download-app-version-obb")),n}),[t.apkUrl,t.latestVersion,t.obbUrls,t.packageName,t.title,t.versionName]);return(0,p.jsx)(zi.W,{privilege:"content",action:"perform actions",children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[r&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Qq,{toApp:t,open:l,onClose:()=>s(!1)}),(0,p.jsx)(ee.Z,{title:"View Patch Sizes",placement:"top",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{onClick:()=>s(!0),children:(0,p.jsx)(RU,{fontSize:"small"})})})})]}),(0,p.jsx)(ee.Z,{title:o?"Save Label":"Edit Label",placement:"top",children:(0,p.jsx)("span",{children:(0,p.jsx)(x.Z,{disabled:!1,onClick:()=>{const e=o?nZ.K.actions.stoppedEditingVersionLabel:nZ.K.actions.startedEditingVersionLabel;i(e({appId:t.id}))},children:o?(0,p.jsx)(fd.Z,{color:"primary"}):(0,p.jsx)(jg.Z,{})})})}),(0,p.jsx)(jd,{menuItems:[...d,(0,p.jsx)(Zd,{icon:(0,p.jsx)(Ed.Z,{}),label:"Duplicate",onClick:()=>{i(nZ.K.actions.startedDuplicating({appId:t.id}))}},"duplicate-app-version"),(0,p.jsx)(Ie.Z,{sx:{marginY:1}},"divider"),(0,p.jsx)(Zd,{icon:(0,p.jsx)(Gl.Z,{}),label:"Delete",onClick:n},"delete-app-version")]})]})})};Jq.displayName="VRContentAppVersionsTableCellActions";const $q=e=>{let{app:t}=e;return t.createdAt?(0,p.jsx)(ee.Z,{title:(0,M.aH)(t.createdAt),placement:"top",children:(0,p.jsx)(v.Z,{noWrap:!0,variant:"body2",children:(0,M.rV)(t.createdAt)})}):null};$q.displayName="VRContentAppVersionsTableCellDate";var eY=n(58787);const tY=e=>{let{app:t}=e;const n=(0,u.I0)(),i=()=>{n(nZ.K.actions.startedEditingFiles({appId:t.id}))};return!(0,o.isEmpty)(t.fileRefs)?(0,p.jsx)(Kn.Z,{onClick:i,sx:{color:"primary.main"},children:(0,Od.gM)(t.fileRefs)}):(0,p.jsx)(x.Z,{color:"primary",onClick:i,sx:{marginLeft:"-5px"},children:(0,p.jsx)(eY.Z,{fontSize:"small"})})},nY=e=>{let{app:t}=e;const n=(0,E.D)(S.F.Files),i=(0,Vs.bW)(t,n.documentsById);return(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,children:i?(0,Ad.Z)(i):"--"})},iY=e=>{let{app:t}=e;const n=(0,u.I0)(),[i,r]=(0,a.useState)(),l=Fq(),s=(0,a.useCallback)((async()=>{var e;if((0,o.isUndefined)(i)||l.pending)return;const n=(0,o.trim)(i);if(n!==(null!==(e=t.versionLabel)&&void 0!==e?e:"")){const e=(0,o.isEmpty)(n)?null:n;await l.request({params:{appId:t.id},data:{versionLabel:e},successMessage:"App version label updated",errorMessage:"Failed to update app version label"})}r(void 0)}),[l,t.id,t.versionLabel,i]),d=(0,u.v9)((e=>e.vrContent.editingVersionLabelAppId===t.id));(0,a.useEffect)((()=>{var e;d&&(0,o.isUndefined)(i)?r(null!==(e=t.versionLabel)&&void 0!==e?e:""):d||s()}),[t,i,d,s]);const c=!(0,o.isUndefined)(i);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:1,width:1,children:[(0,p.jsx)(m.Z,{direction:"row",alignItems:"baseline",spacing:.5,maxWidth:1,overflow:"hidden",children:(0,p.jsx)(sc,{app:t,hideVersionLabel:c,showTypeIcon:!0,showV:!0})}),c&&(0,p.jsx)(OC,{value:i,placeholder:"Enter version label",variant:"standard",onChange:e=>r(e.target.value),onSave:()=>{n(nZ.K.actions.stoppedEditingVersionLabel({appId:t.id})),s()},onClear:()=>{r(void 0),n(nZ.K.actions.stoppedEditingVersionLabel({appId:t.id}))},disabled:l.pending,autoFocus:!0,sx:{margin:0,flexBasis:160,flexShrink:0,flexGrow:1}})]})};iY.displayName="VRContentAppVersionsTableCellVersion";const oY=e=>{var t;let{apps:n}=e;const{privileges:i}=(0,w.P)(),{trigger:r,...l}=(()=>{const e=Wq(),t=(0,a.useCallback)((async t=>{await e.request({data:{appId:t.id},successMessage:"Version deleted",errorMessage:"Error deleting version"})}),[e]),{documents:n}=(0,E.D)(S.F.ReleaseChannels),i=(0,a.useCallback)((e=>!(0,o.some)(n,(t=>t.targetRef.id===e.id))),[n]),r=(0,a.useCallback)((e=>(0,p.jsx)(qq,{app:e})),[]);return Bn({title:"Delete Version",onConfirm:t,getContent:r,getCanDelete:i})})(),s=(0,a.useMemo)((()=>{const e=(0,da.Cl)(),t=[];return t.push(e.accessor((e=>e.versionCode),{id:"version",header:"Version",cell:e=>(0,p.jsx)(iY,{app:e.row.original}),size:200,sortingFn:(e,t)=>(0,Vs.r6)(e.original,t.original)})),t.push(e.accessor((e=>e.createdAt),{id:"createdAt",header:"Uploaded",cell:e=>(0,p.jsx)($q,{app:e.row.original}),size:120})),t.push(e.display({id:"files",header:"Bundled Files",cell:e=>(0,p.jsx)(tY,{app:e.row.original}),size:130})),t.push(e.display({id:"totalSize",header:"Total Size",cell:e=>(0,p.jsx)(nY,{app:e.row.original}),size:100})),t.push(e.display({id:"actions",header:"Actions",cell:e=>(0,p.jsx)(Jq,{app:e.row.original,onDelete:()=>r(e.row.original)}),size:120})),t}),[r]),d=(0,sa.b7)({columns:s,data:n,initialState:{sorting:[{id:"createdAt",desc:!0}]},enableSortingRemoval:!1,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)(),getPaginationRowModel:(0,da.G_)()}),[c,u]=(0,a.useState)(!1);(0,a.useEffect)((()=>{const e=c?n.length:10;d.setState((t=>({...t,pagination:{pageIndex:0,pageSize:e}})))}),[n.length,c,d]);const h=null===(t=n[0])||void 0===t?void 0:t.packageName;(0,a.useEffect)((()=>{u(!1)}),[h]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(dc.A,{table:d,rowHeight:40,flexColumnIds:"version"}),n.length>10&&(0,p.jsxs)(m.Z,{alignItems:"center",paddingTop:1,spacing:.5,children:[!c&&(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:["Displaying ",10," Versions"]}),(0,p.jsx)(C.Z,{onClick:()=>{u(!c)},children:c?"Collapse":"Display all"})]}),(0,p.jsx)(Oq,{apps:n}),i.content&&(0,p.jsx)(zq,{apps:n}),i.content&&(0,p.jsx)(Fn,{...l.props})]})};oY.displayName="VRContentAppVersionsTable";const aY=(0,a.memo)((e=>{let{apkInfo:t,packageName:n}=e;return(0,p.jsx)(ui.Q,{children:(0,p.jsxs)(mf.h,{variant:"body2",children:["APK package name ",(0,p.jsx)("em",{children:t.package})," doesn't match app package name"," ",(0,p.jsx)("em",{children:n}),"."]})})})),rY=e=>{let{packageName:t,apps:n}=e;const i=(0,l.k6)(),{notify:r}=(0,ie.o)(),{buildOrganizationPath:s}=(0,w.P)(),[d,c]=(0,a.useState)(!1),[u,h]=(0,a.useState)(),[m,g]=(0,a.useState)(!1),v=(0,a.useCallback)(((e,t)=>(0,o.chain)(n).filter({packageName:e.package,latestVersion:e.versionCode,versionName:e.versionName}).some((e=>
3e.versionLabel===(""===t?void 0:t))).value()),[n]),C=(0,a.useCallback)((e=>{c(!1),h(e)}),[]),x=(0,a.useCallback)((e=>{if(e.package!==t)return(0,p.jsx)(aY,{apkInfo:e,packageName:t})}),[t]),f=(0,a.useCallback)(((e,t)=>{var n;const i=m||t,{defaultTitle:o}=Be.vc.vrContent,a=null!==(n=(0,Vs.GX)(e))&&void 0!==n?n:o;return(0,p.jsx)(ZH,{title:a,versionCode:e.versionCode,versionName:e.versionName,versionLabel:u,isEditingAppVersionLabel:i,onAppVersionLabelChange:C,appVersionLabelError:d,showAddLabelButton:!t&&!i,onAddLabelButtonClicked:()=>g(!0)})}),[d,m,C,u]),b=(0,a.useCallback)((e=>{r({severity:"success",message:"".concat(e.title," created"),action:{title:"View App",onClick:()=>i.push(s((e=>e.vrContent.edit.app.managed),{packageName:t}))}})}),[s,i,r,t]),y=(0,a.useCallback)((e=>{const o=(0,Fe.tf)(e);r({severity:"error",message:o?o.message:"Failed to add new ".concat(n[0].title," version"),action:{title:"View App",onClick:()=>i.push(s((e=>e.vrContent.edit.app.managed),{packageName:t}))}})}),[n,s,i,r,t]),j=(0,a.useCallback)((()=>{c(!1),g(!1)}),[]),Z=(0,a.useCallback)((()=>{c(!0),g(!1)}),[]);return(0,p.jsx)(RH,{submitLabel:"Add version",isVersionLabelRequired:v,renderApk:f,renderApkError:x,previousVersion:n[0],onCreateSuccess:b,onCreateError:y,onVersionLabelError:Z,onApkCleared:j,versionLabel:u})},lY=(0,a.memo)((e=>{let{documentPending:t,uploadProgress:n,type:i}=e;const o=n.secondsRemaining,a=((e,t,n)=>isFinite(t)?e?"Finalizing":"Uploading ".concat(n):"Upload queued")(t,o,i),r=isFinite(o)&&!t;return(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsxs)(v.Z,{variant:"caption",color:"textSecondary",children:["You may continue to use the rest of the site while your ",i," uploads"]}),(0,p.jsx)(Rn.Z,{variant:r?"determinate":"indeterminate",value:n.percentComplete}),(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",spacing:1,children:[(0,p.jsx)(v.Z,{variant:"caption",children:a}),isFinite(o)&&(0,p.jsxs)(v.Z,{variant:"caption",children:[(0,M.QA)(o)," remaining"]})]})]})})),sY=e=>{var t;let{appUpload:n}=e;const{defaultTitle:i}=Be.vc.vrContent,o=null!==(t=(0,Vs.GX)(n.apkInfo))&&void 0!==t?t:i;return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",columnGap:1,children:(0,p.jsx)(ZH,{title:o,versionCode:n.apkInfo.versionCode,versionName:n.apkInfo.versionName,versionLabel:n.versionLabel})}),n&&(0,p.jsx)(lY,{type:"app",uploadProgress:n.uploadProgress,documentPending:n.documentPending}),(0,p.jsx)(Ie.Z,{})]})};sY.displayName="VRContentAppVersionUpload";const dY=e=>{let{apps:t}=e;const{organizationId:n,privileges:r}=(0,w.P)(),l=(0,u.v9)((e=>(0,o.get)(e.vrContent.appUploads,[n,t[0].packageName]))),s=(0,a.useMemo)((()=>(0,o.chain)(t).filter((e=>!(e.versionName===(null===l||void 0===l?void 0:l.apkInfo.versionName)&&e.latestVersion===(null===l||void 0===l?void 0:l.apkInfo.versionCode)&&e.versionLabel===(null===l||void 0===l?void 0:l.versionLabel)))).value()),[t,null===l||void 0===l?void 0:l.apkInfo.versionName,null===l||void 0===l?void 0:l.apkInfo.versionCode,null===l||void 0===l?void 0:l.versionLabel]);return(0,p.jsx)(i.Z,{padding:1,sx:{backgroundColor:y.DG.purple[50]},children:(0,p.jsxs)(m.Z,{spacing:1,children:[r.content&&(l?(0,p.jsx)(sY,{appUpload:l}):(0,p.jsx)(i.Z,{padding:2,sx:{backgroundColor:y.DG.white},children:(0,p.jsx)(rY,{apps:t,packageName:t[0].packageName})})),(0,p.jsx)(i.Z,{padding:2,sx:{backgroundColor:y.DG.white},children:(0,p.jsx)(Uq,{children:(0,p.jsx)(oY,{apps:s})})})]})})};dY.displayName="VRContentAppVersions";const cY=(0,a.memo)((e=>{let{releaseChannel:t}=e;const n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=(0,a.useMemo)((()=>(0,o.map)((0,o.castArray)(e),"id")),[e]),{documents:n}=(0,E.D)(S.F.Apps,{filter:(0,a.useCallback)((e=>!!e.releaseChannelRef&&(0,o.includes)(t,e.releaseChannelRef.id)),[t])}),{documents:i}=(0,E.D)(S.F.Configurations,{sort:ze.gt,filter:(0,a.useCallback)((e=>(0,o.some)(e.approvedApps,(e=>!!(0,o.find)(n,{id:e.id})))),[n])});return i}(t);return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to delete ",(0,p.jsx)("em",{children:null===t||void 0===t?void 0:t.name}),"?"]}),(0,p.jsx)(QN,{configurations:n,configurationRoute:"apps",label:"It will be removed from these configurations",emptyLabel:"It's not linked to any configurations."}),(0,p.jsx)(QN,{organizationProfiles:(0,o.values)(t.sharedOrganizations),label:"It will be unshared with these organizations",emptyLabel:"It's not shared with any organizations."})]})}));let uY,pY;!function(e){e.App="app",e.WebXRApp="webXRApp",e.Video="video"}(uY||(uY={})),function(e){e.NONE="NONE",e.DATE="DATE",e.DURATION="DURATION"}(pY||(pY={}));pY.NONE,pY.DURATION,pY.DATE;const hY=31536e6,mY=(e,t)=>
3((0,o.isEmpty)(e[t])&&delete e[t],e),gY=e=>{let{children:t,...n}=e;return(0,p.jsx)(ee.Z,{placement:"top",enterDelay:600,enterNextDelay:200,...n,children:t})};gY.displayName="VRContentDeviceLimitTooltip";const vY=e=>{let{value:t,emptyInputLabel:n="No Limit",onChange:o,isExceeded:r}=e;const l=(0,a.useRef)(null),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)("");(0,a.useEffect)((()=>{u(void 0!==t?t.toString():"")}),[t]);const h=r?"error.main":"info.main",g="This app can be deployed to ".concat(null!==t&&void 0!==t?t:"unlimited"," devices"),x="Deployment exceeds limit of ".concat(t," devices. The app will remain on devices until admins in the recipient organization take action. To revoke access immediately, unshare it or force expiration."),f=r?x:g;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(zi.W,{privilege:"content",action:"edit device limit",disableAutoSize:!0,children:(0,p.jsx)(gY,{title:f,disableFocusListener:!0,children:(0,p.jsx)(Kn.Z,{ref:l,component:"button",variant:"body2",color:h,onClick:()=>d(!0),textAlign:"start",overflow:"hidden",textOverflow:"ellipsis",sx:{outline:"none !important"},children:void 0!==t?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(v.Z,{variant:"inherit",color:"inherit",textOverflow:"ellipsis",whiteSpace:"nowrap",component:"span",children:t})," ",(0,ul.n8)(t,"device")]}):n})})}),(0,p.jsx)(cg.ZP,{anchorEl:l.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},open:s,onClose:()=>d(!1),children:(0,p.jsx)(m.Z,{children:(0,p.jsx)(i.Z,{padding:1,width:1,children:(0,p.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=parseInt(c);isNaN(t)||(o(t),d(!1))},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,justifyContent:"flex-start",alignItems:"center",padding:1,children:[(0,p.jsx)(Ln.Z,{value:c,type:"number",inputProps:{min:0},onKeyDown:e=>{const t=e.key;["-","+",".","*","e","E"].includes(t)&&e.preventDefault()},onChange:e=>(e=>{if(void 0===e)return u("");u(e)})(e.target.value),autoFocus:!0,placeholder:"No Limit"}),(0,p.jsx)(v.Z,{children:"devices"})]}),(0,p.jsxs)(m.Z,{direction:"row-reverse",spacing:.5,justifyContent:"flex-start",paddingTop:1,children:[(0,p.jsx)(C.Z,{size:"small",variant:"contained",color:"primary",type:"submit",disabled:!c||""===c,children:"Enter"}),(0,p.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>d(!1),children:"Cancel"})]}),(0,p.jsx)(C.Z,{onClick:()=>{o(void 0),u(""),d(!1)},sx:{textTransform:"none",justifyContent:"flex-start",width:1,marginTop:.5},children:"Remove device limit"})]})})})})]})};vY.displayName="VRContentReleaseChannelDeviceLimitInput";const CY=e=>{let{value:t=gp.Kv.NONE,onChange:n,hasExpired:i,inlineLabels:r}=e;const[l,s]=(0,a.useState)(!1),d=(0,a.useRef)(null);if(t===gp.Kv.NONE)return(0,p.jsx)(v.Z,{variant:"body2",children:"-"});if(i)return(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:gp.y6[t]});const c=gp._K[t],u=r?gp._A:gp.qi;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(zi.W,{privilege:"content",action:"edit expiration behavior",disableAutoSize:!0,children:(0,p.jsx)(gY,{title:c,children:(0,p.jsx)(Kn.Z,{ref:d,variant:"body2",color:"info.main",onClick:()=>s(!0),children:u[t]})})}),(0,p.jsx)(Is.Z,{MenuListProps:{dense:!0},anchorEl:d.current,open:l,onClose:()=>s(!1),children:(0,o.map)(gp.Kv,(e=>e===gp.Kv.NONE?null:(0,p.jsx)(Hi.Z,{onClick:()=>(e=>{n(e),s(!1)})(e),selected:e===t,children:u[e]},e)))})]})};CY.displayName="VRContentReleaseChannelExpirationBehaviorInput";var xY=n(55692);const fY=e=>{let{expirationTimestamp:t,expirationType:n,onExpirationTimestampChange:o,onExpirationTypeChange:r}=e;const[l,s]=(0,a.useState)(!1),d=(0,a.useRef)(null),c=(0,a.useMemo)((()=>(0,M.Mn)(t)),[t]),[u,h]=(0,a.useState)("");(0,a.useEffect)((()=>{h((0,M.Qp)(t).toString())}),[t]);const g=e=>!(isNaN(e)||e<=0),[x,f]=n===pY.DATE?["on ".concat(fp(t)),bp(t)]:[yp(t),jp(t)];return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(gY,{title:f,children:(0,p.jsx)(Kn.Z,{ref:d,variant:"body2",color:"info.main",onClick:()=>s(!0),children:x})}),(0,p.jsx)(cg.ZP,{anchorEl:d.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},open:l,onClose:()=>s(!1),children:(0,p.jsxs)(m.Z,{width:325,children:[(0,p.jsxs)(wf.Z,{value:n,onChange:(e,t)=>
3{r(t)},variant:"fullWidth",children:[(0,p.jsx)(Yn.Z,{value:pY.DATE,label:"Set Date",sx:{textTransform:"none"}}),(0,p.jsx)(Yn.Z,{value:pY.DURATION,label:"Set Duration",sx:{textTransform:"none"}})]}),n===pY.DATE&&(0,p.jsx)(xY.W,{value:c,onChange:e=>{if(!e)return;const t=e.valueOf();o(t),s(!1)},disablePast:!0,fixedWeekNumber:6,showDaysOutsideCurrentMonth:!0,sx:{"& .MuiPickersDay-dayOutsideMonth":{color:y.DG.grey[600]},"& .MuiDayCalendar-slideTransition":{overflow:"hidden"}}}),n===pY.DURATION&&(0,p.jsx)(m.Z,{children:(0,p.jsx)(i.Z,{padding:1,width:1,children:(0,p.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=parseInt(u);if(!g(t))return;const n=(0,M.Qv)(t);o(n),s(!1)},children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",padding:1,children:[(0,p.jsx)(Ln.Z,{value:u,type:"number",inputProps:{min:1},onKeyDown:e=>{const t=e.key;["-","+",".","*","e","E"].includes(t)&&e.preventDefault()},onChange:e=>(e=>{if(!e||""===e)return h("");const t=parseInt(e);g(t)&&h(e)})(e.target.value),autoFocus:!0,fullWidth:!0}),(0,p.jsx)(v.Z,{children:"days"})]}),(0,p.jsxs)(m.Z,{direction:"row-reverse",spacing:.5,justifyContent:"flex-start",paddingTop:1,children:[(0,p.jsx)(C.Z,{type:"submit",size:"small",variant:"contained",color:"primary",disabled:!u||""===u,children:"Enter"}),(0,p.jsx)(C.Z,{size:"small",color:"primary",onClick:()=>s(!1),children:"Cancel"})]})]})})})]})})]})};fY.displayName="VRContentReleaseChannelShareCodeExpirationTimestampInput";const bY=e=>{let{expirationType:t,expirationTimestamp:n,expirationBehavior:i,onExpirationTypeChange:o,onExpirationTimestampChange:a,onExpirationBehaviorChange:r}=e;const l=()=>{o(pY.DATE)};return t===pY.NONE||void 0===n?(0,p.jsx)(zi.W,{privilege:"content",action:"edit expiration type",disableAutoSize:!0,children:(0,p.jsx)(Kn.Z,{component:"button",variant:"body2",color:"info.main",onClick:l,children:"Add Expiration"})}):(0,p.jsxs)(m.Z,{width:1,direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,p.jsxs)(v.Z,{variant:"subtitle2",children:["App will expire"," ",(0,p.jsx)(fY,{expirationTimestamp:n,expirationType:t,onExpirationTimestampChange:a,onExpirationTypeChange:o})," ","and will be"," ",(0,p.jsx)(CY,{value:i,onChange:r,inlineLabels:!0})," ","when it expires"]}),(0,p.jsx)(ee.Z,{title:"Remove Expiration",placement:"top",children:(0,p.jsx)(x.Z,{onClick:()=>{o(pY.NONE)},children:(0,p.jsx)(J.Z,{})})})]})};bY.displayName="VRContentReleaseChannelShareCodeExpirationInput";const yY=e=>{let{text:t}=e;return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:.5,marginLeft:"-2px",children:(0,p.jsx)(v.Z,{variant:"overline",color:"textSecondary",sx:{lineHeight:"14px",fontSize:"12px"},children:t})})},jY=(0,da.Cl)(),ZY=()=>(0,p.jsx)(i.Z,{position:"absolute",right:"0",top:"0",bottom:"0",sx:{borderRight:"1px solid",justifyContent:"center",color:y.DG.grey[400]}}),wY=e=>{let{shareCodes:t,updates:n,onUpdatesChanged:i}=e;const r=(0,a.useCallback)(((e,t,n)=>{const a=(e=>{let{persistent:t,shareCode:n,currentUpdates:i}=e;const a=(0,o.cloneDeep)(i);var r;return n.persistent===t?null===(r=a[n.id])||void 0===r||delete r.persistent:(0,o.set)(a,[n.id,"persistent"],t),mY(a,n.id)})({persistent:t,shareCode:e,currentUpdates:n});i(a)}),[i]),l=(0,a.useCallback)(((e,t)=>{const n=(e=>{var t;let{shareCodeId:n,currentUpdates:i}=e;const a=(0,o.cloneDeep)(i);return null!==(t=a[n])&&void 0!==t&&t.delete?delete a[n]:a[n]={delete:!0},a})({shareCodeId:e.id,currentUpdates:t});i(n)}),[i]),s=(0,a.useCallback)(((e,t,n)=>{const a=(e=>{let{currentUpdates:t,shareCode:n,newExpirationBehavior:i}=e;const a=(0,o.cloneDeep)(t);var r;return n.expirationBehavior===i?(null===(r=a[n.id])||void 0===r||delete r.expirationBehavior,mY(a,n.id)):((0,o.set)(a,[n.id,"expirationBehavior"],i),a)})({newExpirationBehavior:t,shareCode:e,currentUpdates:n});i(a),(0,b.ec)("Expiration Edit Staged",{field:"Behavior",value:t,releaseChannelId:e.releaseChannelRef.id,source:"Shared App"})}),[i]),d=(0,a.useCallback)(((e,t,n)=>{const a=(e=>{var t;let{currentUpdates:n,shareCode:i,newExpirationType:a}=e;const r=(0,o.cloneDeep)(n);if(a===(null===(t=n[i.id])||void 0===t?void 0:t.expirationType))return r;if(i.expirationType===a){var l,s,d,c;return null===(l=r[i.id])||void 0===l||delete l.expirationType,null===(s=r[i.id])||void 0===s||delete s.expirationTimestamp,(a===pY.NONE||(null===(d=r[i.id])||void 0===d?void 0:d.expirationBehavior)===gp.Kv.NONE)&&(null===(c=r[i.id])||void 0===c||delete c.expirationBehavior),mY(r,i.id)}if(a===pY.NONE)(0,o.set)(r,[i.id,"expirationTimestamp"],null),(0,o.set)(r,[i.id,"expirationBehavior"],gp.Kv.NONE);else{var u,p,h,m,g,v;const e=null!==(u=null!==(p=null===(h=r[i.id])||void 0===h?void 0:h.expirationTimestamp)&&void 0!==p?p:i.expirationTimestamp)&&void 0!==u?u:null;if(null===e){const e=a===pY.DATE?(0,M.h1)(hY):hY;(0,o.set)(r,[i.id,"expirationTimestamp"],e)}else a===pY.DURATION?(0,o.set)(r,[i.id,"expirationTimestamp"],(0,M.UE)(e)):a===pY.DATE&&(0,o.set)(r,[i.id,"expirationTimestamp"],(0,M.h1)(e));(null!==(m=null!==(g=null===(v=r[i.id])||void 0===v?void 0:v.expirationBehavior)&&void 0!==g?g:i.expirationBehavior)&&void 0!==m?m:gp.Kv.NONE)===gp.Kv.NONE&&(0,o.set)(r,[i.id,"expirationBehavior"],gp.Kv.DISABLE_APP)}return(0,o.set)(r,[i.id,"expirationType"],a),r})({newExpirationType:t,shareCode:e,currentUpdates:n});i(a),(0,b.ec)("Expiration Edit Staged",{field:"Type",value:t,releaseChannelId:e.releaseChannelRef.id,source:"Share Code"})}),[i]),c=(0,a.useCallback)(((e,t,n)=>{const a=(e=>{let{currentUpdates:t,shareCode:n,newDeviceLimit:i}=e;const a=(0,o.cloneDeep)(t);var r;return n.deviceLimit===i?(null===(r=a[n.id])||void 0===r||delete r.deviceLimit,mY(a,n.id)):(void 0===i&&(0,o.isNumber)(n.deviceLimit)?(0,o.set)(a,[n.id,"deviceLimit"],null):void 0!==i&&(0,o.set)(a,[n.id,"deviceLimit"],i),a)})({newDeviceLimit:t,shareCode:e,currentUpdates:n});i(a)}),[i]),u=(0,a.useCallback)(((e,t,n)=>{var a,r;const l=(e=>{let{currentUpdates:t,shareCode:n,newExpirationTimestamp:i}=e;const a=(0,o.cloneDeep)(t);var r;return n.expirationTimestamp===i?(null===(r=a[n.id])||void 0===r||delete r.expirationTimestamp,mY(a,n.id)):((0,o.set)(a,[n.id,"expirationTimestamp"],i),a)})({newExpirationTimestamp:t,shareCode:e,currentUpdates:n});i(l);const s=(null!==(a=null===(r=n[e.id])||void 0===r?void 0:r.expirationType)&&void 0!==a?a:e.expirationType)===pY.DATE?"Date":"Duration";(0,b.ec)("Expiration Edit Staged",{field:s,value:t,releaseChannelId:e.releaseChannelRef.id,source:"Share Code"})}),[i]),h=(0,a.useMemo)((()=>{const e=[jY.display({header:()=>(0,p.jsx)(yY,{text:"Share Code"}),id:"shareCode",cell:e=>{let{row:t}=e;const{shareCode:n}=t.original;return(0,p.jsx)(ae,{value:n.shareCode,children:(0,p.jsx)(v.Z,{variant:"subtitle2",children:n.shareCode})})},size:120}),jY.display({header:()=>(0,p.jsxs)(m.Z,{direction:"row",alignItems:"space-between",spacing:.5,sx:{marginRight:"-16px"},children:[(0,p.jsx)(yY,{text:"Multi-Use"}),(0,p.jsx)(Fi._,{tooltipText:"Multi-Use Share Codes can be redeemed many times. Single-Use Share Codes can only be redeemed once.",icon:jz.Z,children:(0,p.jsx)(cc.Z,{fontSize:"small",sx:{color:y.DG.grey[800]}})})]}),id:"multiUse",cell:e=>{var t;let{row:n}=e;const{shareCode:i,updates:o}=n.original,a=o[i.id];return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"center",width:1,children:[(0,p.jsx)(ZY,{}),(0,p.jsx)(Pi.Z,{sx:{color:"info.main","&.Mui-checked":{color:"info.main"}},checked:null!==(t=null===a||void 0===a?void 0:a.persistent)&&void 0!==t?t:i.persistent,onChange:e=>r(i,e.target.checked,o)})]})},size:130}),jY.display({header:()=>(0,p.jsx)(yY,{text:"Device Limit"}),id:"deviceLimit",size:130,cell:e=>{var t;let{row:n}=e;const{shareCode:i,updates:o}=n.original,a=null===(t=o[i.id])||void 0===t?void 0:t.deviceLimit,r=null===a?void 0:null!==a&&void 0!==a?a:i.deviceLimit;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(vY,{value:r,onChange:e=>c(i,e,o),emptyInputLabel:"Add Limit"}),(0,p.jsx)(ZY,{})]})}}),jY.display({header:()=>(0,p.jsx)(yY,{text:"Expiration Behavior"}),id:"expiration",size:300,cell:e=>{var t,n,i,o,a;let{row:r}=e;const{shareCode:l,updates:c}=r.original,h=c[l.id],m=null!==(t=null!==(n=null===h||void 0===h?void 0:h.expirationType)&&void 0!==n?n:l.expirationType)&&void 0!==t?t:pY.NONE,g=null!==(i=null===h||void 0===h?void 0:h.expirationTimestamp)&&void 0!==i?i:l.expirationTimestamp,v=null!==(o=null!==(a=null===h||void 0===h?void 0:h.expirationBehavior)&&void 0!==a?a:l.expirationBehavior)&&void 0!==o?o:gp.Kv.NONE;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(bY,{expirationType:m,expirationTimestamp:g,expirationBehavior:v,onExpirationTypeChange:e=>d(l,e,c),onExpirationTimestampChange:e=>u(l,e,c),onExpirationBehaviorChange:e=>s(l,e,c)}),(0,p.jsx)(ZY,{})]})}}),jY.display({header:"",id:"delete",cell:e=>{let{row:t}=e;const{shareCode:n,updates:i}=t.original;return(0,p.jsx)(ee.Z,{title:"Delete",placement:"top",children:(0,p.jsx)(x.Z,{onClick:()=>l(n,i),children:(0,p.jsx)(Gl.Z,{})})})},size:50})];return e}),[l,c,s,u,d,r]),g=(0,a.useMemo)((()=>(0,o.chain)(t).map((e=>({shareCode:e,updates:n}))).filter((e=>{var t;let{shareCode:n,updates:i}=e;return!(null!==(t=i[n.id])&&void 0!==t&&t.delete)}
3)).value()),[n,t]),C=(0,sa.b7)({columns:h,data:g,getCoreRowModel:(0,da.sC)()});return(0,o.isEmpty)(g)?null:(0,p.jsx)(dc.A,{table:C,rowHeight:50,emptyMessage:"No share codes",flexColumnIds:"shareCode"})};wY.displayName="VRContentReleaseChannelShareCodesTable";const EY=e=>{let{stagedOrgIds:t,sharedOrganizations:n,onAddOrgClick:i}=e;const{allPrivileges:r,organizationId:l}=(0,w.P)(),s=(0,a.useMemo)((()=>{const e=(0,o.chain)(r).map((e=>{let{organizationProfile:{id:t,name:n}}=e;return{id:t,title:n,variant:"default"}})).filter((e=>{let{id:t}=e;return l!==t&&!(0,o.some)(n,{id:t})})).sort(ze.IG).value(),t=(0,o.chain)(n).values().map((e=>{let{name:t}=e;return{title:t,variant:"text"}})).sort(ze.IG).value();return(0,o.isEmpty)(t)?e:[...e,{title:"Already Shared",variant:"header"},...t]}),[r,l,n]);return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"info.main",gutterBottom:!0,children:"Share with My Organizations"}),(0,p.jsx)(m.Z,{direction:"row",spacing:1.5,children:(0,p.jsx)(ws,{label:"Select Orgs",options:s,onChange:i,renderSelectedValues:e=>"".concat((0,ul.sr)((0,o.size)(e),"New Organization")," Selected"),values:t,checklist:!0,hideClear:!0,sx:{minWidth:350}})})]})};EY.displayName="VRContentReleaseChannelShareWithOrgs";const SY=(0,a.memo)((e=>{let{open:t,releaseChannelId:n,onClose:r}=e;const{notify:l}=(0,ie.o)(),{organizationId:s}=(0,w.P)(),{request:d}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"release-channels/:releaseChannelId/share-codes/:shareCodeId",getDocumentUpdate:e=>{let{params:t,data:n}=e;const i=(0,o.omit)(n,"expirationTimestamp");return null===(null===n||void 0===n?void 0:n.expirationTimestamp)?i.expirationTimestamp=void 0:null!==n&&void 0!==n&&n.expirationTimestamp&&(i.expirationTimestamp=n.expirationTimestamp),{collection:S.F.ReleaseChannelShareCodes,id:null===t||void 0===t?void 0:t.shareCodeId,update:i}}})),[])),{request:c}=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"release-channels/:releaseChannelId/share-codes/:shareCodeId",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.ReleaseChannelShareCodes,id:null===t||void 0===t?void 0:t.shareCodeId,remove:!0}}})),[])),u=(0,z.l)(S.F.ReleaseChannels,n),[h,g]=(0,a.useState)([]),[C,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)(),[j,Z]=(0,a.useState)({}),E=!(0,o.isEmpty)(h)||!(0,o.isEmpty)(j);(0,a.useEffect)((()=>{t&&(g([]),b(void 0),Z({}))}),[t]),(0,a.useEffect)((()=>{if(!n||!t)return;x(!0);const e=(0,Os.p6)(S.F.ReleaseChannelShareCodes,(e=>(0,td.IO)(e,(0,td.ar)("organizationRef","==",(0,Os.qb)(S.F.Organizations,s)),(0,td.ar)("releaseChannelRef","==",(0,Os.qb)(S.F.ReleaseChannels,n)))));return(0,td.cf)(e,(e=>{x(!1),b(e.docs.map((e=>({...e.data(),id:e.id}))).sort(((e,t)=>{var n,i;return(null!==(n=e.createdAt)&&void 0!==n?n:0)-(null!==(i=t.createdAt)&&void 0!==i?i:0)})))}),(e=>{(0,Si.yR)(e,{name:"query release channel share codes",contexts:{releaseChannel:{id:n}}})}))}),[t,s,n]);const[D,M]=(0,a.useState)(!1),[k,I]=(0,a.useState)(!1);return(0,p.jsx)(kn.Z,{open:t,onClose:r,fullWidth:!0,sx:{"& .MuiDialog-paper":{minWidth:850}},children:u&&!C?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(In.Z,{children:(0,p.jsx)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",children:(0,p.jsxs)(m.Z,{direction:"row",children:[(0,p.jsx)(v.Z,{color:"info.dark",variant:"subtitle1",children:"Release Channel for\xa0"}),(0,p.jsx)(v.Z,{color:y.DG.purple[800],variant:"subtitle1",children:u.name})]})})}),(0,p.jsx)(An.Z,{children:(0,p.jsx)(EY,{sharedOrganizations:u.sharedOrganizations,stagedOrgIds:h,onAddOrgClick:e=>g(e)})}),(0,p.jsx)(Ie.Z,{variant:"middle"}),(0,p.jsx)(An.Z,{children:(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle2",color:"info.main",gutterBottom:!0,children:"Or, use Share Codes"}),(0,p.jsx)(mf.h,{variant:"body2",color:"textSecondary",gutterBottom:!0,children:'Send a share code to give another organization access to this release channel. By default, share codes are single-use. When a share code is redeemed, the organization is added to the "Shared With" list and the share code is deleted.'}),f&&!(0,o.isEmpty)(f)&&(0,p.jsx)(i.Z,{paddingTop:1,children:(0,p.jsx)(wY,{shareCodes:f,updates:j,onUpdatesChanged:Z})}),(0,p.jsx)("div",{children:(0,p.jsx)(Un.U,{size:"small",submitting:D,onClick:async()=>
3{if(n){M(!0);try{(e=>{ne()(e.shareCode,{format:"text/plain",onCopy:()=>{l({severity:"info",message:"Copied to clipboard"})}})})(await(0,Fe.rx)({organizationId:s,releaseChannelId:n}))}catch(e){const t=(0,Fe.tf)(e);l({severity:"error",message:t?t.message:"Failed to create share code"}),(0,Si.yR)(e,{name:"add share code"})}M(!1)}},icon:(0,p.jsx)(Wn.Z,{}),color:"info",sx:{marginTop:2},children:"Share code"})})]})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsx)(bd,{hasChanges:E,savePending:k,onSaveClick:async()=>{if(n){I(!0);try{const e=[];if((0,o.isEmpty)(h)||e.push((0,Fe.WU)({organizationId:s,releaseChannelId:n},{organizationIds:h})),!(0,o.isEmpty)(j))for(const[t,i]of(0,o.entries)(j))!0===i.delete?e.push(c({params:{shareCodeId:t,releaseChannelId:n}})):(0,o.isEmpty)((0,o.omit)(i,"delete"))||e.push(d({params:{releaseChannelId:n,shareCodeId:t},data:(0,o.omit)(i,"delete")}));await Promise.all(e),await new Promise((e=>setTimeout(e,500))),g([]),Z({}),l({severity:"success",message:"Share settings saved"}),r()}catch(e){const t=(0,Fe.tf)(e);t?l({severity:"error",message:t.message}):((0,Si.yR)(e,{name:"Save app release channel sharing",contexts:{args:{releaseChannelId:n,stagedAdditions:h}}}),l({severity:"error",message:"Failed to save share settings"}))}I(!1)}},onUndoAllClick:()=>{g([]),r()},forceEnableUndoButton:!0,undoText:"Undo and close",reverse:!0,undoColor:"primary"})})]}):(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(In.Z,{children:(0,p.jsx)(Rn.Z,{})})})})}));function DY(e,t,n){const i={},a=function(e,t,n){const i=(0,o.map)(e,(e=>({...e,...null===t||void 0===t?void 0:t[e.id]}))),a=(0,o.map)(n,((e,t)=>({...e,id:t})));return[...i,...a]}(e,t,n);for(const l of a){const{name:e,id:t}=l;(0,o.isEmpty)(e)&&(i[t]=!0)}const r=(0,o.groupBy)(a,"name");for(const l of(0,o.values)(r)){if(l.length>1)for(const t of l){const n=(0,o.find)(e,(e=>{let{id:n}=e;return n===t.id}));(null===n||void 0===n?void 0:n.name)!==t.name&&(i[t.id]=!0)}}return i}const MY=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(0,u.v9)((e=>e.vrContent.createdReleaseChannels)),i=(0,u.v9)((e=>e.vrContent.editedReleaseChannels)),o=(0,a.useMemo)((()=>[...e,...t]),[t,e]);return(0,a.useMemo)((()=>DY(o,i,n)),[o,n,i])},kY=e=>{let{instantAppReleaseChannels:t}=e;const{developerOrganizationReleaseChannelsFetched:n}=OH(),{instantApp:i,fetched:o}=Mq(t),{documents:a}=ej(i);if(!n||!o)return(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(g.Z,{variant:"rounded",height:72}),(0,p.jsx)(g.Z,{variant:"rounded",height:72})]});if(!i)return(0,p.jsx)(v.Z,{color:"text.secondary",variant:"body2",children:"No instant app release channels for this app."});const r=!oy(i)&&t.length>0;return(0,p.jsx)(Oy,{editable:r,onVrContentPage:!0,instantApp:i,releaseChannels:t,fetched:!0,publishedApps:a})};kY.displayName="VRContentInstantAppReleaseChannels";const IY=e=>{let{value:t,onChange:n,expiresSoon:o,hasExpired:r}=e;const[l,s]=(0,a.useState)(!1),d=(0,a.useMemo)((()=>void 0===t?null:(0,M.Mn)(t)),[t]),c=(0,a.useRef)(null),u=o?"secondary.dark":"info.main",h=fp(t,r),g=bp(t,r);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(zi.W,{privilege:"content",action:"edit expiration date",disableAutoSize:!0,children:(0,p.jsx)(gY,{title:g,children:(0,p.jsx)(Kn.Z,{ref:c,component:"button",variant:"body2",color:u,onClick:()=>s(!0),children:h})})}),(0,p.jsx)(cg.ZP,{anchorEl:c.current,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},open:l,onClose:()=>s(!1),children:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(xY.W,{value:d,onChange:e=>{const t=e?e.valueOf():void 0;n(t),s(!1)},disablePast:!0,fixedWeekNumber:6,showDaysOutsideCurrentMonth:!0,sx:{"& .MuiPickersDay-dayOutsideMonth":{color:y.DG.grey[600]},"& .MuiDayCalendar-slideTransition":{overflow:"hidden"}}}),(0,p.jsx)(i.Z,{padding:1,width:1,children:(0,p.jsx)(C.Z,{onClick:()=>{n(void 0),s(!1)},sx:{textTransform:"none",justifyContent:"flex-start",width:1},children:"Remove expiration date"})})]})})]})};IY.displayName="VRContentReleaseChannelExpirationDateInput";const AY=(0,da.Cl)(),RY=e=>{let{releaseChannel:t,sharedOrganizationsWithoutUnshared:n}=e;const{privileges:i}=(0,w.P)(),r=(0,u.I0)(),l=(0,a.useCallback)((e=>{i.content&&r(nZ.K.actions.releaseChannelUnshared({id:t.id,organizationId:e}))}),[r,i.content,t.id]),s=(0,a.useCallback)(((e,n,i)=>{r(nZ.K.actions.releaseChannelSharedOrganizationExpirationDateUpdated({releaseChannelId:t.id,organizationId:e,newExpirationTimestamp:n,storedOrganizationSettings:i})),(0,b.ec)("Expiration Edit Staged",{field:"Date",value:n,releaseChannelId:t.id,source:"Shared App"})}),[r,t.id]),d=(0,a.useCallback)(((e,n,i)=>{r(nZ.K.actions.releaseChannelSharedOrganizationExpirationBehaviorUpdated({releaseChannelId:t.id,organizationId:e,newExpirationBehavior:n,storedOrganizationSettings:i})),(0,b.ec)("Expiration Edit Staged",{field:"Behavior",value:n,releaseChannelId:t.id,source:"Shared App"})}),[r,t.id]),c=(0,a.useCallback)(((e,n,i)=>{r(nZ.K.actions.releaseChannelSharedOrganizationDeviceLimitUpdated({releaseChannelId:t.id,organizationId:e,newDeviceLimit:n,storedOrganizationSettings:i}))}),[r,t.id]),h=(0,a.useCallback)(((e,t)=>(0,o.findIndex)(e,(e=>e.index===t))+1),[]),g=(0,a.useMemo)((()=>{const e=[AY.display({id:"index",size:40,cell:e=>{let{table:t,cell:n}=e;return(0,p.jsx)(v.Z,{variant:"subtitle2",color:"textSecondary",children:h(t.getSortedRowModel().rows,n.row.index)})}}),AY.accessor((e=>e.organizationProfile.name),{id:"organizationName",header:"Organization Name",size:200,cell:e=>{let{row:t}=e;const{organizationProfile:n,hasExpired:i}=t.original;return(0,p.jsx)(ee.Z,{title:n.name,followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(v.Z,{variant:"body2",color:i?"text.secondary":"text.primary",noWrap:!0,children:n.name})})}}),AY.accessor((e=>{var t;return null!==(t=e.sharedDevicesCount)&&void 0!==t?t:-1}),{id:"deployments",header:"Deployments",size:130,cell:e=>{let{row:t}=e;const{sharedDevicesCount:n,hasExpired:i,deviceLimitExceeded:a,deviceLimitSettings:r}=t.original,l=e=>(0,p.jsx)(ee.Z,{title:a?"Deployment exceeds limit of ".concat(null===r||void 0===r?void 0:r.deviceLimit," devices"):"Deployed on ".concat(e),placement:"top",enterDelay:600,enterNextDelay:200,sx:{cursor:"default"},children:(0,p.jsx)(v.Z,{variant:"body2",color:i?"text.secondary":a?"error.main":"text.primary",noWrap:!0,children:e})});return(0,o.isNumber)(n)?l((0,ul.sr)(n,"device")):l("-")}}),AY.accessor((e=>{var t;return null===(t=e.deviceLimitSettings)||void 0===t?void 0:t.deviceLimit}),{id:"device_limit",header:"Device Limit",size:140,cell:e=>{let{row:t}=e;const{editedDeviceLimitSettings:n,organizationProfile:i,deviceLimitSettings:o,deviceLimitExceeded:a}=t.original,r=(null===n||void 0===n?void 0:n.deviceLimit)!==(null===o||void 0===o?void 0:o.deviceLimit);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,children:[a&&!r&&(0,p.jsx)(qA.Z,{color:"error",sx:{fontSize:"0.5rem",marginBottom:.125}}),(0,p.jsx)(vY,{value:null===n||void 0===n?void 0:n.deviceLimit,onChange:e=>c(i.id,e,o),isExceeded:a&&!r})]})}}),AY.accessor((e=>{var t,n;return null!==(t=null===(n=e.expirationSettings)||void 0===n?void 0:n.expirationTimestamp)&&void 0!==t?t:-1}),{id:"expiration_date",header:"Exp. Date",size:140,cell:e=>{let{row:t}=e;const{organizationProfile:n,expirationSettings:i,editedExpirationSettings:o,expiresSoon:a,hasExpired:r}=t.original,l=(null===o||void 0===o?void 0:o.expirationTimestamp)!==(null===i||void 0===i?void 0:i.expirationTimestamp);return(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.75,children:[a&&!l&&(0,p.jsx)(qA.Z,{color:"secondary",sx:{fontSize:"0.5rem",marginBottom:.125}}),(0,p.jsx)(IY,{value:null===o||void 0===o?void 0:o.expirationTimestamp,onChange:e=>s(n.id,e,i),expiresSoon:a&&!l,hasExpired:r&&!l})]})}}),AY.display({id:"expiration_behavior",header:"Exp. Behavior",size:130,cell:e=>{let{row:t}=e;const{organizationProfile:n,expirationSettings:i,editedExpirationSettings:o,hasExpired:a}=t.original,r=(0,Vs.IR)(o);return(0,p.jsx)(CY,{value:null===o||void 0===o?void 0:o.expirationBehavior,onChange:e=>d(n.id,e,i),hasExpired:r&&a})}})];return i.content&&e.push(AY.display({id:"delete",size:50,cell:e=>{let{row:t}=e;const n=t.original.organizationProfile.id;return(0,p.jsx)(ee.Z,{title:"Unshare",placement:"top",children:(0,p.jsx)(x.Z,{onClick:()=>l(n),children:(0,p.jsx)(J.Z,{})})})}})),e}),[h,c,d,s,l,i.content]),C=(0,u.v9)((e=>{var n,i;return null===(n=e.vrContent.editedReleaseChannels)||void 0===n||null===(i=n[t.id])||void 0===i?void 0:i.sharedOrganizationExpirationSettingUpdates})),f=(0,u.v9)((e=>{var n,i;return null===(n=e.vrContent.editedReleaseChannels)||void 0===n||null===(i=n[t.id])||void 0===i?void 0:i.sharedOrganizationDeviceLimitSettingUpdates})),y=(0,a.useMemo)((()=>(0,o.map)(n,((e,n)=>{var i,o,a,r,l;const s=null===(i=t.sharedOrganizationExpirationSettings)||void 0===i?void 0:i[n],d=null!==(o=null===C||void 0===C?void 0:C[n])&&void 0!==o?o:null===(a=t.sharedOrganizationExpirationSettings)||void 0===a?void 0:a[n],c=(0,Vs.Wk)(s),u=(0,Vs.IR)(s),p=null===(r=t.sharedOrganizationDeviceLimitSettings)||void 0===r?void 0:r[n];let h=null===f||void 0===f?void 0:f[n];null===h?h=void 0:void 0===h&&(h=p);const m=null===(l=t.sharedOrganizationDeployments)||void 0===l?void 0:l[n];return{organizationProfile:e,expirationSettings:s,editedExpirationSettings:d,sharedDevicesCount:m,expiresSoon:c,hasExpired:u,deviceLimitSettings:p,editedDeviceLimitSettings:h,deviceLimitExceeded:void 0!==(null===p||void 0===p?void 0:p.deviceLimit)&&void 0!==m&&m>p.deviceLimit}}))),[n,t,C,f]),j=(0,sa.b7)({columns:g,data:y,getCoreRowModel:(0,da.sC)(),getSortedRowModel:(0,da.tj)(),initialState:{sorting:[{id:"organizationName",desc:!1}]},enableSortingRemoval:!1});if((0,o.isEmpty)(n))return null;const Z="organizationName";return(0,p.jsxs)(m.Z,{spacing:1,sx:{"& .MuiTableBody-root .MuiTableCell-root":{border:"none"}},children:[(0,p.jsx)(eh.K,{table:j,flexColumnIds:Z}),(0,p.jsx)(nh.g,{useLegacyTableRows:!0,height:"window",table:j,flexColumnIds:Z,rowHeight:34})]})};RY.displayName="VRContentReleaseChannelSharedOrganizationsTable";const TY=(0,a.memo)((e=>
3{let{id:t,newName:n,targetRef:r,unsharedOrganizationIds:l,versions:s,existing:d=!1,releaseChannel:c,nameHasError:h,onShareClick:g,onDeleteClick:f}=e;const{privileges:j}=(0,w.P)(),Z=(0,u.I0)(),E=(0,a.useCallback)((e=>{Z(nZ.K.actions.releaseChannelEdited({id:t,data:{targetRef:e===(null===c||void 0===c?void 0:c.targetRef.id)?void 0:(0,mp.Pf)(e)},existing:d}))}),[Z,d,t,null===c||void 0===c?void 0:c.targetRef.id]),S=e=>{e.stopPropagation()},D=e=>{S(e),c&&g&&(g(c),(0,b.ec)("Share App Clicked",{releaseChannelId:t,releaseChannelName:n}))},M=(0,a.useMemo)((()=>l?(0,o.omit)(null===c||void 0===c?void 0:c.sharedOrganizations,l):null===c||void 0===c?void 0:c.sharedOrganizations),[null===c||void 0===c?void 0:c.sharedOrganizations,l]),k=(0,o.size)(M)>0,[I,A]=(0,a.useState)(!1),R=(0,a.useCallback)((()=>{A((e=>!e))}),[]),T="accordion-toggle-box",P=(0,o.chain)(null===c||void 0===c?void 0:c.sharedOrganizationExpirationSettings).values().filter(Vs.Wk).size().value(),L=(0,o.chain)(null===c||void 0===c?void 0:c.sharedOrganizationDeviceLimitSettings).filter(((e,t)=>{var n;let{deviceLimit:i}=e;const o=null===c||void 0===c||null===(n=c.sharedOrganizationDeployments)||void 0===n?void 0:n[t];return void 0!==i&&void 0!==o&&o>i})).size().value();return(0,p.jsxs)(m.Z,{spacing:1,padding:1,paddingTop:1.5,onClick:R,sx:{backgroundColor:y.DG.purple[50],...d?{["&:hover:not(:has(> * > *:hover)), &:hover:has(> * > .".concat(T,":hover)")]:{backgroundColor:y.DG.purple[100],cursor:"pointer"}}:{}},children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"center",alignItems:"center",spacing:1,children:[(0,p.jsx)(i.Z,{height:30,width:30,sx:{position:"relative"},className:T,children:d&&(0,p.jsx)(x.Z,{sx:{"&:hover":{backgroundColor:"unset !important"}},children:(0,p.jsx)(mh.Z,{sx:{transform:"rotate(".concat(I?"0":"-90","deg)")}})})}),(0,p.jsx)("div",{children:(0,p.jsx)(Ul.z,{label:"Name",placeholder:"Release Channel",error:h,onChange:e=>{Z(nZ.K.actions.releaseChannelEdited({id:t,data:{name:e.target.value===(null===c||void 0===c?void 0:c.name)?void 0:e.target.value},existing:d}))},value:n,autoFocus:!d,style:{margin:0,minWidth:230},privilege:"content",onClick:S})}),(0,p.jsx)("div",{children:(0,p.jsx)(Qb,{apps:s,label:"Version",onChange:E,onClick:S,privilege:"content",sx:{minWidth:200,maxWidth:500},value:r.id})}),!!P&&(0,p.jsx)(ee.Z,{title:"".concat(P," expiring soon"),placement:"top",children:(0,p.jsx)(ke.Z,{color:"secondary",size:"small",label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,color:y.DG.white,children:[(0,p.jsx)(Iu.Z,{sx:{fontSize:"1rem",color:"inherit"}}),(0,p.jsx)(v.Z,{variant:"inherit",color:"inherit",children:P})]})})}),!!L&&(0,p.jsx)(ee.Z,{title:"".concat((0,ul.sr)(L,"device limit")," exceeded"),placement:"top",children:(0,p.jsx)(ke.Z,{color:"error",size:"small",label:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,color:y.DG.white,children:[(0,p.jsx)(Fl.u,{sx:{fontSize:"1rem",color:"inherit"}}),(0,p.jsx)(v.Z,{variant:"inherit",color:"inherit",children:L})]})})}),(0,p.jsx)("div",{className:"divider",style:{flexGrow:1,pointerEvents:"none"}}),(0,p.jsx)(zi.W,{privilege:"content",action:"share",disableAutoSize:!0,children:(0,p.jsx)(ee.Z,{title:d?"":"Save changes to manage sharing",placement:"top",children:(0,p.jsx)("span",{children:(0,p.jsxs)(C.Z,{size:"small",color:"info",onClick:D,startIcon:(0,p.jsx)(Wn.Z,{}),disabled:!d,sx:{marginLeft:3},children:["Share",(0,o.size)(null===c||void 0===c?void 0:c.sharedOrganizations)>0?" (".concat((0,o.size)(null===c||void 0===c?void 0:c.sharedOrganizations),")"):""]})})})}),j.content&&(0,p.jsx)(x.Z,{onClick:e=>{S(e),d||Z(nZ.K.actions.releaseChannelDeleted({id:t,existing:d})),c&&f&&f(c)},children:d?(0,p.jsx)(ee.Z,{title:"Delete",placement:"top",children:(0,p.jsx)(Gl.Z,{color:"primary"})}):(0,p.jsx)(ee.Z,{title:"Undo",placement:"top",children:(0,p.jsx)(bu.Z,{color:"primary"})})})]}),c&&I&&(0,p.jsx)(i.Z,{padding:1,sx:{backgroundColor:y.DG.white},onClick:S,children:k?(0,p.jsx)(RY,{releaseChannel:c,sharedOrganizationsWithoutUnshared:M}):(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"center",alignItems:"baseline",spacing:.5,paddingY:3,children:[(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"You have not shared this release channel to any organizations."}),j.content&&(0,p.jsx)(Kn.Z,{component:"button",variant:"inherit",color:"info.main",onClick:D,children:"Share?"})]})})]})}));TY.displayName="VRContentReleaseChannel";const PY=e=>{let{apps:t,releaseChannels:n,releaseChannelUpdateErrors:i,createdReleaseChannels:a,onShareClick:r,onDeleteClick:l}=e;const s=(0,u.v9)((e=>e.vrContent.editedReleaseChannels)),d=(0,u.v9)((e=>e.vrContent.releaseChannelUnsharedOrganizationIds));return(0,p.jsxs)(p.Fragment,{children:[(0,o.map)(a,((e,n)=>
3(0,p.jsx)(TY,{id:n,newName:e.name,targetRef:e.targetRef,versions:t,nameHasError:!!i[n]},n))),(0,o.map)(n,(e=>{var n,o,a,c;return e.targetRef?(0,p.jsx)(TY,{id:e.id,newName:null!==(n=null===s||void 0===s||null===(o=s[e.id])||void 0===o?void 0:o.name)&&void 0!==n?n:e.name,targetRef:null!==(a=null===s||void 0===s||null===(c=s[e.id])||void 0===c?void 0:c.targetRef)&&void 0!==a?a:e.targetRef,unsharedOrganizationIds:null===d||void 0===d?void 0:d[e.id],versions:t,existing:!0,releaseChannel:e,nameHasError:!!i[e.id],onShareClick:r,onDeleteClick:l},e.id):null}))]})};PY.displayName="ReleaseChannelList";const LY=e=>{let{apps:t,organizationReleaseChannels:n,organizationReleaseChannelsFetched:i,instantAppReleaseChannels:r}=e;const l=(0,u.I0)(),{organizationId:s}=(0,w.P)(),{notify:d}=(0,ie.o)(),{developerPortalReleaseChannelsEnabled:c}=OH(),h=(0,u.v9)((e=>e.vrContent.createdReleaseChannels)),C=MY(n,r),x=(0,u.v9)((e=>e.vrContent.updateOpPending)),f=(0,a.useMemo)((()=>[...n,...r]),[r,n]),b=(0,a.useMemo)((()=>(0,o.omitBy)(h,(e=>{if(!x)return!1;return(0,o.some)(f,(t=>t.name===e.name&&t.targetRef.path===e.targetRef.path))}))),[h,f,x]),[y,j]=(0,a.useState)(!1),[Z,E]=(0,a.useState)(),S=(0,a.useCallback)((e=>{E(e.id),j(!0)}),[]),D=(0,a.useCallback)((()=>{j(!1)}),[]),M=(0,a.useCallback)((async e=>{try{await(0,Fe.C5)({organizationId:s,releaseChannelId:e.id}),l(nZ.K.actions.releaseChannelDeleted({id:e.id,existing:!0})),d({severity:"success",message:"Release channel deleted"})}catch(t){(0,Si.yR)(t,{name:"delete release channel",contexts:{releaseChannel:{id:e.id}}}),d({severity:"error",message:"Failed to delete release channel"})}}),[l,d,s]),k=(0,a.useCallback)((e=>(0,p.jsx)(cY,{releaseChannel:e})),[]),I=Bn({onConfirm:M,title:"Delete Release Channel",getContent:k}),A=I.trigger,R=(0,a.useCallback)((e=>{A(e)}),[A]);if(!i)return(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(g.Z,{variant:"rounded",height:72}),(0,p.jsx)(g.Z,{variant:"rounded",height:72})]});const T=!(0,o.isEmpty)(n)||!(0,o.isEmpty)(b),P=!(0,o.isEmpty)(r),L=T||!P,N=c&&P;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{spacing:3,children:[c&&P&&(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Instant App Release Channels"}),(0,p.jsx)(kY,{instantAppReleaseChannels:r})]}),L&&(0,p.jsxs)(m.Z,{spacing:1.5,children:[N&&(0,p.jsx)(v.Z,{variant:"subtitle1",children:"Private Release Channels"}),(0,o.isEmpty)(n)&&(0,o.isEmpty)(b)&&(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:"No Release Channels"}),(0,p.jsxs)(v.Z,{color:"textSecondary",paddingTop:2,children:["Use release channels to simplify app version management and share apps with other organizations."," ",(0,p.jsxs)(Kn.Z,{href:Be.IW.releaseChannels,target:"_blank",noWrap:!0,children:["Learn more"," ",(0,p.jsx)(Mu.Z,{fontSize:"inherit",sx:{transform:"translateY(2px)"}})]})]})]}),(0,p.jsx)(PY,{apps:t,releaseChannels:n,releaseChannelUpdateErrors:C,createdReleaseChannels:b,onShareClick:S,onDeleteClick:R})]})]}),(0,p.jsx)(SY,{open:y,releaseChannelId:Z,onClose:D}),(0,p.jsx)(Fn,{...I.props})]})};LY.displayName="VRContentReleaseChannels";const NY=["versions","releaseChannels"],UY=e=>{let{apps:t,organizationReleaseChannels:n,organizationReleaseChannelsFetched:r,instantAppReleaseChannels:l}=e;const{privileges:s,organizationId:d,user:c}=(0,w.P)(),h=(0,u.I0)(),[g,x]=(0,a.useState)("versions"),f=(0,a.useMemo)((()=>({versions:{label:"Versions",render:()=>(0,p.jsx)(dY,{apps:t})},releaseChannels:{label:"Release Channels",render:()=>(0,p.jsx)(LY,{apps:t,organizationReleaseChannels:n,organizationReleaseChannelsFetched:r,instantAppReleaseChannels:l})}})),[t,l,n,r]),y=(0,a.useCallback)(((e,n)=>{x(n),(0,b.ec)("Managed App Tab Clicked",{value:n,appId:t[0].id}),(0,b.A_)("".concat(window.location.pathname,"/").concat((0,o.kebabCase)(n)),d,null===c||void 0===c?void 0:c.id)}),[t,d,null===c||void 0===c?void 0:c.id]);return(0,p.jsxs)(Sn.ZP,{value:g,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",sx:{alignSelf:"stretch",width:"100%"},children:[(0,p.jsx)(Gn.Z,{onChange:y,"aria-label":"managed app tabs",sx:{flex:1,minWidth:0},children:(0,o.map)(NY,(e=>(0,p.jsx)(Yn.Z,{value:e,sx:{width:160,marginTop:2},label:(0,p.jsx)(v.Z,{variant:"button",textTransform:"none",children:f[e].label})},e)))}),s.content&&"releaseChannels"===g&&(0,p.jsx)(i.Z,{sx:{alignSelf:"center",paddingTop:2,flexShrink:0},children:(0,p.jsx)(C.Z,{variant:"contained",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),onClick:()=>{s.content&&h(nZ.K.actions.releaseChannelAdded({data:{name:"",targetRef
3:(0,mp.Pf)(t[0].id)}}))},children:"New release channel"})})]}),(0,o.map)(NY,(e=>(0,p.jsx)(Dn.Z,{value:e,sx:{paddingX:.5,paddinTop:3,paddingBottom:0},children:f[e].render()},e)))]})};UY.displayName="VRContentPageEditAppManagedAppTabs";const FY=(0,a.memo)((e=>{var t;let{apps:n}=e;const i=!(null===(t=n[0])||void 0===t||!t.instantAppRef),{documents:r}=(0,E.D)(S.F.ReleaseChannels,{filter:(0,a.useCallback)((e=>(0,o.some)(n,(t=>e.targetRef.id===t.id))),[n])}),l=(0,a.useMemo)((()=>(0,o.map)(r,"id")),[r]),s=Gq(n),{instantApp:d}=Mq(s),{documents:c}=(0,E.D)(S.F.Apps,{filter:(0,a.useCallback)((e=>!!e.releaseChannelRef&&(0,o.includes)(l,e.releaseChannelRef.id)),[l])}),u=(0,a.useMemo)((()=>(0,o.map)(c,"id")),[c]),{documents:h}=(0,E.D)(S.F.Configurations,{filter:(0,a.useCallback)((e=>{const t=(0,o.map)(e.approvedApps,(e=>e.id)),i=(0,o.map)(e.approvedInstantApps,(e=>e.id));if((0,o.intersection)(t,u).length)return!0;const a=(0,o.map)(n,(e=>e.id)),r=(0,o.compact)((0,o.map)(n,(e=>{var t;return null===(t=e.instantAppRef)||void 0===t?void 0:t.id})));return!!((0,o.intersection)(a,t)||(0,o.intersection)(r,i)).length}),[u,n])}),g=(0,o.values)((0,o.assign)({},...(0,o.map)(r,(e=>e.sharedOrganizations))));return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to ",i?"remove":"delete"," ",(0,p.jsx)("em",{children:n[0].title}),"?"]}),!i&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.Z,{variant:"body2",color:"text.secondary",children:[n.length," version",n.length>1&&"s",(0,o.isEmpty)(r)?" ":", ".concat(r.length," release channel").concat(r.length>1?"s":"",", "),"and all related files will be deleted."]}),(0,p.jsx)(QN,{configurations:h,configurationRoute:"apps",label:"It will be removed from these configurations",emptyLabel:"It's not linked to any configurations."}),(0,p.jsx)(QN,{organizationProfiles:g,label:"It will be unshared with these organizations",emptyLabel:"It's not shared with any organizations."}),(0,p.jsx)(Hq,{instantApp:d,releaseChannels:s})]})]})})),OY=()=>{var e;const t=Wq(),n=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"discover-xr/instant-apps/:instantAppId/unshare",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.Apps,instantAppId:null===t||void 0===t?void 0:t.instantAppId,remove:!0}}})),[])),i=(0,a.useCallback)((async e=>{const n={};e.apkUrl?n.packageName=e.packageName:n.appId=e.id,await t.request({data:n,successMessage:"App deleted",errorMessage:"Failed to delete app"})}),[t]),o=(0,a.useCallback)((async e=>{await n.request({params:{instantAppId:e},successMessage:"Instant App removed",errorMessage:"Failed to remove Instant App"})}),[n]),r=(0,a.useCallback)((async e=>{const t=e[0];t.instantAppRef?await o(t.instantAppRef.id):await i(t)}),[i,o]),l=(0,a.useCallback)((e=>(0,p.jsx)(FY,{apps:e})),[]),s=(0,a.useCallback)((e=>{const t=e[0];return null!==t&&void 0!==t&&t.instantAppRef?"Remove Instant App":"Delete App"}),[]),d=Bn({onConfirm:r,getTitle:s,getContent:l}),c=Gq(null!==(e=d.data)&&void 0!==e?e:[]);return(0,a.useMemo)((()=>({...d,props:{...d.props,maxWidth:c.length>0?"sm":"xs"}})),[d,c.length])},_Y=e=>!!e.title&&Nw._t.test(e.packageName),zY=e=>{let{apps:t,type:n,packageNameOrId:i,instantApp:o}=e;const a=OY();return(0,p.jsxs)(m.Z,{spacing:2,children:["managed"===n?(0,p.jsx)(BY,{apps:t,packageNameOrId:i}):(0,p.jsx)(WY,{apps:t,type:n,packageNameOrId:i,instantApp:o,organizationReleaseChannels:[],instantAppReleaseChannels:[]}),"shared"===n&&(0,p.jsx)(Aq,{apps:t}),"shared"!==n&&(0,p.jsx)(Pq,{onClick:()=>{a.trigger(t),o&&(0,b.ec)("Discover XR Delete Instant App Clicked",{title:o.title,instantAppId:o.id,supportedModels:ry(o)})}}),(0,p.jsx)(Fn,{...a.props})]})},BY=e=>{var t,n;let{apps:i,packageNameOrId:r}=e;const l=null===(t=i[0])||void 0===t?void 0:t.packageName,{documents:s,fetched:d}=(0,E.D)(S.F.ReleaseChannels,{filter:(0,a.useCallback)((e=>Vq(e,l)),[l]),sort:ze.gt,staticSort:"start"}),{developerPortalReleaseChannelsEnabled:c,developerOrganizationReleaseChannels:u}=OH(),h=(0,a.useMemo)((()=>c?u.filter((e=>Vq(e,l))):[]),[u,c,l]),{instantApp:m}=Mq(h),{documents:g}=ej(m),{appCollections:{managedApps:v}}=(0,Xn.w)(),C=(0,a.useMemo)((()=>(0,o.flatMap)(v)),[v]),{releaseChannelUpdate:x,publishUpdateChannelChanges:f,updateReleaseChannels:b}=Qy(m,h,{publishedApps:g,managedApps:C,notifyOnSuccess:!1}),{analytics:y,pending:j}=Ob(null!==(n=null===m||void 0===m?void 0:m.id)&&void 0!==n?n:""),Z=null===y||void 0===y?void 0:y.sharedOrganizationsCount,w=(0,a.useMemo)((()=>{var e;return{hasStagedEdits:!(null===x||void 0===x||!x.hasStagedEdits),stagedEditCount:null!==(e=null===x||void 0===x?void 0:x.stagedEditCount)&&void 0!==e?e:0,changesInvali
3d:!(null===x||void 0===x||!x.hasStagedEdits)&&!x.hasPendingChanges,commit:b,clearStagedEdits:()=>null===x||void 0===x?void 0:x.onUndoClick(),publishUpdateChannelChanges:f,instantAppTitle:null===m||void 0===m?void 0:m.title,organizationCount:Z,publishUpdatePending:f.length>0&&void 0===Z&&j}}),[j,null===m||void 0===m?void 0:m.title,Z,f,x,b]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(WY,{apps:i,type:"managed",packageNameOrId:r,organizationReleaseChannels:s,instantAppReleaseChannels:h,instantAppReleaseChannelEditing:w}),(0,p.jsx)(UY,{apps:i,organizationReleaseChannels:s,organizationReleaseChannelsFetched:d,instantAppReleaseChannels:h})]})},WY=e=>{var t,n,i,r;let{apps:s,type:c,packageNameOrId:h,instantApp:g,instantAppReleaseChannelEditing:x,organizationReleaseChannels:f,instantAppReleaseChannels:y}=e;const j=(0,u.I0)(),{user:Z,privileges:E}=(0,w.P)(),{organization:D}=(0,d.mP)(),{confirm:M,notify:k,notifyThunkResult:I}=(0,ie.o)(),A=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"apps/instant-apps/:instantAppId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.Apps,instantAppId:null===t||void 0===t?void 0:t.instantAppId,update:n}}})),[])),R=(0,a.useCallback)((e=>{var t;return null!==(t=(0,o.find)(f,{id:e}))&&void 0!==t?t:(0,o.find)(y,{id:e})}),[y,f]),T=(0,u.v9)((e=>e.vrContent.createdReleaseChannels)),P=(0,u.v9)((e=>e.vrContent.editedReleaseChannels)),L=(0,u.v9)((e=>e.vrContent.releaseChannelUnsharedOrganizationIds)),N=MY(f,y),[U,F]=(0,a.useState)(!1),[O,_]=(0,a.useState)(null);(0,a.useEffect)((()=>{j(nZ.K.actions.releaseChannelChangesDiscarded())}),[j,h]);const z=(0,a.useCallback)((async e=>{const t=!(0,o.isEmpty)(e),n=(0,o.uniq)([...Object.keys(null!==T&&void 0!==T?T:{}),...Object.keys(null!==P&&void 0!==P?P:{}),...Object.keys(null!==L&&void 0!==L?L:{})]),i=n.length>0;let a=!0;if(t||i){const t=await j((0,nZ.do)({type:c,packageNameOrId:h,appChanges:e,existingReleaseChannels:[...f,...y]}));"fulfilled"!==t.meta.requestStatus&&(a=!1,I({result:t,error:{message:"Error updating app"}}))}if(a&&x&&(a=await x.commit()),a){var r;const e=n.length+(null!==(r=null===x||void 0===x?void 0:x.stagedEditCount)&&void 0!==r?r:0);k({severity:"success",message:t?"App updated":"".concat((0,ul.n8)(e,"Release channel")," updated"),autoHide:!0})}}),[T,j,P,x,y,k,I,f,h,L,c]),B=(0,a.useCallback)((e=>{let{changes:t}=e;return new Promise((e=>{var n;const i=[];(0,o.forEach)(P,((e,t)=>{var n;const a=R(t);a&&e.targetRef&&!(0,o.isEmpty)(a.sharedOrganizations)&&i.push((0,p.jsxs)(m.Z,{children:[(0,p.jsxs)(mf.h,{variant:"body2",children:["The new"," ",(0,p.jsx)("em",{children:null!==(n=e.name)&&void 0!==n?n:a.name})," ","release channel version will be deployed to these organizations:"]}),(0,p.jsx)(ii.Z,{dense:!0,children:(0,o.map)(a.sharedOrganizations,(e=>(0,p.jsxs)(fl.ZP,{children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(vI.Z,{})}),(0,p.jsx)(Rs.Z,{primaryTypographyProps:{variant:"body2"},children:e.name})]},"".concat(a.id,"-").concat(e.id))))})]},a.id))}));const a=async()=>{g?await A.request({params:{instantAppId:g.id},data:t,successMessage:"Instant App updated",errorMessage:"Error updating Instant App"}):await z(t),e()},r=null!==(n=null===x||void 0===x?void 0:x.publishUpdateChannelChanges)&&void 0!==n?n:[],l=null===x||void 0===x?void 0:x.organizationCount,s=null===x||void 0===x?void 0:x.instantAppTitle;r.length>0&&void 0!==l&&s?_({instantAppTitle:s,organizationCount:l,channelChanges:r,organizationDeploymentContent:i.length?(0,p.jsx)(p.Fragment,{children:i}):void 0,onConfirm:a,onCancel:e}):i.length?M({renderContent:()=>(0,p.jsx)(p.Fragment,{children:i}),onConfirm:a,onCancel:e,closeLabel:"Cancel",confirmLabel:"Confirm"}):a()}))}),[A,z,M,P,R,g,x]),{withChanges:W,addChanges:V,hasChanges:G,clearChanges:H,changesValid:q,saveChanges:Y,saveChangesPending:K}=Ji({document:s[0],save:B,validate:_Y,allowSaveWithoutChanges:!0}),X=G||!(0,o.isEmpty)(T)||!(0,o.isEmpty)(P)||!(0,o.isEmpty)(L)||!(null===x||void 0===x||!x.hasStagedEdits),Q=(0,o.isEmpty)(N),J=!q||!Q||!(null===x||void 0===x||!x.changesInvalid)||!(null===x||void 0===x||!x.publishUpdatePending),$=(0,a.useCallback)((()=>{H(),j(nZ.K.actions.releaseChannelChangesDiscarded()),null===x||void 0===x||x.clearStagedEdits()}),[H,j,x]),ee=(0,a.useCallback)((e=>
3Rg(h,e)),[h]),te=g?ry(g):void 0,ne="meta_horizon_store_managed"===c,oe=[bi.Q6.OculusQuest2,bi.Q6.OculusQuestPro,bi.Q6.OculusQuest3,bi.Q6.MetaQuest3S],ae=null!==W&&void 0!==W&&null!==(t=W.supportedDevices)&&void 0!==t&&t.length?W.supportedDevices:oe,re=(0,a.useMemo)((()=>g?{...W,description:g.caption||g.description}:W),[W,g]),le=WO(g,!0),se=()=>{g&&(F(!0),(0,b.ec)("Discover XR Contact Instant App Developer Clicked",{contactEmail:Z.email||D.billingEmail,contactName:Z.name||D.name,developerEmail:g.contactEmail,developerName:g.developerOrganizationProfile.name,instantAppId:g.id,location:"VR Content Page",supportedModels:te,title:g.title}))};return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l.NL,{when:X,message:()=>"You have unsaved changes. Are you sure you want to leave?"}),(0,p.jsx)(Lq,{icon:"instant"===c?(0,p.jsx)(Ud.Z,{color:"disabled"}):"meta_horizon_store_managed"===c?(0,p.jsx)(Nd,{}):void 0,typeLabel:"meta_horizon_store_managed"===c?"Meta Horizon Store App":"".concat((0,o.capitalize)(c)," App"),rightContent:E.content?(0,p.jsx)(bd,{hasChanges:X,savePending:K,onSaveClick:Y,onUndoAllClick:$,saveDisabled:J}):void 0}),(0,p.jsx)(Tq,{content:re,contentId:h,getIconPath:ee,onChanges:V,renderColumn1Content:()=>(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(m.Z,{spacing:1,children:[te&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Mj,{deviceModels:te}),(0,p.jsx)(Dq,{supportedDevices:te})]}),ne&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Mj,{deviceModels:ae}),(0,p.jsx)(Dq,{requiresMhmsEnrollment:!0})]}),(null===g||void 0===g?void 0:g.contactEmail)&&(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",children:"Love this Instant App?"}),(0,p.jsx)(C.Z,{startIcon:(0,p.jsx)(uf.Z,{}),variant:"outlined",onClick:se,children:"Get Connected"}),(0,p.jsx)(v.Z,{variant:"body2",children:"to get the full version"})]})]})}),renderColumn2Content:()=>(0,p.jsxs)(p.Fragment,{children:["instant"!==c&&(0,p.jsx)(kq,{app:W,onChange:e=>V({packageName:e})}),"instant"===c&&g&&(0,p.jsx)(pO,{content:le})]}),appType:c}),g&&(0,p.jsx)(BO,{instantApp:g,open:U,onClose:()=>F(!1),location:"VR Content Page"}),(0,p.jsx)(Kb,{open:!!O,instantAppTitle:null!==(n=null===O||void 0===O?void 0:O.instantAppTitle)&&void 0!==n?n:"",organizationCount:null!==(i=null===O||void 0===O?void 0:O.organizationCount)&&void 0!==i?i:0,channelChanges:null!==(r=null===O||void 0===O?void 0:O.channelChanges)&&void 0!==r?r:[],onClose:()=>{null===O||void 0===O||O.onCancel(),_(null)},onSubmit:async()=>{await(null===O||void 0===O?void 0:O.onConfirm()),_(null)},children:null===O||void 0===O?void 0:O.organizationDeploymentContent})]})};zY.displayName="VRContentPageEditApp",BY.displayName="VRContentPageEditManagedAppDetail",WY.displayName="EditAppForm";const VY=e=>{var t,n;let{apkInfo:i,versionLabel:o}=e;const{defaultIconUrl:a,defaultTitle:r}=Be.vc.vrContent,l=null!==(t=i.icon)&&void 0!==t?t:a,s=null!==(n=(0,Vs.GX)(i))&&void 0!==n?n:r;return(0,p.jsx)(wH,{title:s,iconUrl:l,packageName:i.package,children:(0,p.jsx)(sc,{app:{...i,versionLabel:o,title:s}})})},GY=e=>{let{appUpload:t}=e;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(lY,{type:"app",uploadProgress:t.uploadProgress,documentPending:t.documentPending}),(0,p.jsx)(VY,{apkInfo:t.apkInfo,versionLabel:t.versionLabel})]})},HY=()=>{const{buildOrganizationPath:e}=(0,w.P)(),{managedApps:t,pendingApps:n,externalApps:i,sharedApps:a,metaHorizonStoreManagedApps:r,instantApps:s,videos:d,videoUploads:c,webXRApps:u,contentFilter:h}=OH(),m=(0,o.isEmpty)(t)?(0,o.isEmpty)(n)?(0,o.isEmpty)(i)?(0,o.isEmpty)(a)?(0,o.isEmpty)(r)?(0,o.isEmpty)(s)?void 0:(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.app.instant),{instantAppId:(0,o.keys)(s)[0]})}):(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.app.metaHorizonStoreManaged),{appId:(0,o.keys)(r)[0]})}):(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.app.shared),{packageName:(0,o.keys)(a)[0]})}):(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.app.external),{appId:(0,o.keys)(i)[0]})}):(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.app.managed),{packageName:(0,o.keys)(n)[0]})}):(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.app.managed),{packageName:(0,o.keys)(t)[0]})}),g=(0,o.isEmpty)(d)?void 0:(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.video),{videoId:d[0].id})}),v=(0,o.pickBy)(c,(e=>!e.videoId)),C=(0,o.isEmpty)(v)?void 0:(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.videoUpload),{uploadId:(0,o.keys)(v)[0]})}),x=(0,o.isEmpty)(u)?void 0:(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.webXRApp),{webXRAppId:u[0].id})});return("all"===h||"apps"===h)&&m||("all"===h||"videos"===h)&&g||("all"===h||"videos"===h)&&C||("all"===h||"webXR"===h)&&x||(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.create))})},qY=e=>"."+(0,o.last)(e.split(".")),YY=e=>{let{video:t}=e;const n=(0,E.D)(S.F.Configurations,{filter:(0,a.useCallback)((e=>!!(0,o.find)(e.approvedVideos,{id:t.id})),[t.id])});return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to delete ",(0,p.jsx)("em",{children:t.title}),"?"]}),(0,p.jsx)(QN,{configurations:n.documents,configurationRoute:"videos",label:"It will be removed from these configurations",emptyLabel:"It's not linked to any configurations."})]})},KY=e=>!!e.title,XY=e=>{let{video:t}=e;const{organizationId:n,privileges:o}=(0,w.P)(),{notify:r}=(0,ie.o)(),s=a.useCallback((async e=>{let{changes:i,withChanges:o}=e;try{await(0,Fe.dD)({organizationId:n,videoId:t.id},i),r({severity:"success",message:"".concat(o.title," updated")})}catch(l){var a;(0,Si.yR)(l,{name:"update video error"});const e=(0,Fe.tf)(l);r({severity:"error",message:null!==(a=null===e||void 0===e?void 0:e.message)&&void 0!==a?a:"Error updating ".concat(t.title)})}}),[r,n,t.id,t.title]),{withChanges:d,addChanges:c,clearChanges:u,hasChanges:h,changesValid:g,saveChanges:x,saveChangesPending:f}=Ji({document:t,validate:KY,save:s}),b=a.useCallback((e=>((e,t)=>{const n=Ag(t);if(n)return"videos/".concat(e,"/icons/").concat(n)})(t.id,e)),[t.id]),y=a.useCallback((async()=>{try{await(0,Fe.dC)({organizationId:n,videoId:t.id}),r({severity:"success",message:"".concat(t.title," deleted")})}catch(i){var e;(0,Si.yR)(i,{name:"delete video error"});const n=(0,Fe.tf)(i);r({severity:"error",message:null!==(e=null===n||void 0===n?void 0:n.message)&&void 0!==e?e:"Error deleting ".concat(t.title)})}}),[r,n,t.id,t.title]),j=a.useCallback((e=>(0,p.jsx)(YY,{video:e})),[]),Z=Bn({onConfirm:y,title:"Delete Video",getContent:j});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l.NL,{when:h,message:()=>"You have unsaved changes. Are you sure you want to leave?"}),(0,p.jsx)(Fn,{...Z.props}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"textSecondary",variant:"h6",children:"Video"}),o.content&&(0,p.jsx)(bd,{hasChanges:h,savePending:f,onSaveClick:x,onUndoAllClick:u,saveDisabled:!g})]}
3),(0,p.jsx)(Tq,{content:d,contentId:d.id,onChanges:c,getIconPath:b,renderColumn1Content:()=>(0,p.jsx)(i.Z,{paddingY:2,children:(0,p.jsx)(zi.W,{privilege:"content",action:"download video",children:(0,p.jsx)(Kq,{storageUrl:t.storageUrl,filename:"".concat(t.title).concat(qY(t.storageUrl)),variant:"text",sx:{alignSelf:"flex-start"},privilege:"content",children:"Download"})})}),renderColumn2Content:()=>(0,p.jsx)(aZ,{video:d,onChange:c}),titleEndAdornment:qY(t.storageUrl)}),o.content&&(0,p.jsx)(i.Z,{paddingTop:8,children:(0,p.jsx)(C.Z,{onClick:()=>Z.trigger(t),variant:"outlined",color:"error",startIcon:(0,p.jsx)(Gl.Z,{}),sx:{alignSelf:"flex-start"},children:"Delete video"})})]})]})},QY=e=>{let{videoUpload:t}=e;return(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(v.Z,{variant:"h6",children:t.formData.title}),(0,p.jsx)(lY,{type:"video",uploadProgress:t.uploadProgress,documentPending:t.documentPending})]})},JY=e=>{let{webXRApp:t}=e;const n=(0,E.D)(S.F.Configurations,{filter:(0,a.useCallback)((e=>!!(0,o.find)(e.approvedWebXRApps,{id:t.id})),[t.id])});return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to delete ",(0,p.jsx)("em",{children:t.title}),"?"]}),(0,p.jsx)(QN,{configurations:n.documents,configurationRoute:"webXRApps",label:"It will be removed from these configurations",emptyLabel:"It's not linked to any configurations."})]})},$Y=e=>!!e.title&&Nw.Et.test(e.url),eK=e=>{let{webXRApp:t}=e;const{organizationId:n,privileges:o}=(0,w.P)(),{notify:r}=(0,ie.o)(),s=a.useCallback((async e=>{let{changes:i,withChanges:o}=e;try{await(0,Fe.$b)({organizationId:n,webXRAppId:t.id},i),r({severity:"success",message:"".concat(o.title," updated")})}catch(l){var a;(0,Si.yR)(l,{name:"update web xr app error"});const e=(0,Fe.tf)(l);r({severity:"error",message:null!==(a=null===e||void 0===e?void 0:e.message)&&void 0!==a?a:"Error updating ".concat(t.title)})}}),[r,n,t.id,t.title]),{withChanges:d,addChanges:c,clearChanges:u,hasChanges:h,changesValid:g,saveChanges:x,saveChangesPending:f}=Ji({document:t,validate:$Y,save:s}),b=a.useCallback((e=>((e,t)=>{const n=Ag(t);if(n)return"web-xr-apps/".concat(e,"/icons/").concat(n)})(t.id,e)),[t.id]),y=a.useCallback((async()=>{try{await(0,Fe.gH)({organizationId:n,webXRAppId:t.id}),r({severity:"success",message:"".concat(t.title," deleted")})}catch(i){var e;(0,Si.yR)(i,{name:"delete web xr app error"});const n=(0,Fe.tf)(i);r({severity:"error",message:null!==(e=null===n||void 0===n?void 0:n.message)&&void 0!==e?e:"Error deleting ".concat(t.title)})}}),[r,n,t.id,t.title]),j=a.useCallback((e=>(0,p.jsx)(JY,{webXRApp:e})),[]),Z=Bn({onConfirm:y,title:"Delete WebXR Link",getContent:j});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l.NL,{when:h,message:()=>"You have unsaved changes. Are you sure you want to leave?"}),(0,p.jsx)(Fn,{...Z.props}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",children:[(0,p.jsx)(v.Z,{color:"textSecondary",variant:"h6",children:"WebXR Link"}),o.content&&(0,p.jsx)(bd,{hasChanges:h,savePending:f,onSaveClick:x,onUndoAllClick:u,saveDisabled:!g})]}),(0,p.jsx)(Tq,{content:d,contentId:d.id,onChanges:c,getIconPath:b,renderColumn2Content:()=>(0,p.jsx)(Ul.z,{label:"URL",placeholder:"https://webxr.link",value:d.url,privilege:"content",onChange:e=>c({url:e.target.value}),fullWidth:!0,error:!Nw.Et.test(d.url),helperText:Nw.Et.test(d.url)?void 0:"Please enter a valid URL"})}),o.content&&(0,p.jsx)(i.Z,{paddingTop:8,children:(0,p.jsx)(C.Z,{onClick:()=>Z.trigger(t),variant:"outlined",color:"error",startIcon:(0,p.jsx)(Gl.Z,{}),sx:{alignSelf:"flex-start"},children:"Delete WebXR link"})})]})]})},tK=e=>{let{fallbackTitle:t,fallbackIconUrl:n,packageName:i}=e;const o=null!==t&&void 0!==t?t:"",a=null!==i&&void 0!==i?i:" ";return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:n,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",spacing:.5,children:[(0,p.jsx)(ee.Z,{title:"Meta Horizon Managed Store App",followCursor:!0,placement:"bottom-start",children:(0,p.jsx)(Nd,{sx:{fontSize:"1rem"}})}),(0,p.jsx)(Ui.G,{title:o,variant:"body1"})]}),secondary:(0,p.jsx)(Ui.G,{title:a,variant:"body2"})})]})};tK.displayName="UIMetaHorizonStoreManagedAppListItemContent";const nK=e=>{var t;let{upload:n}=e;const{defaultTitle:i}=Be.vc.vrContent,o=null!==(t=(0,Vs.GX)(null===n||void 0===n?void 0:n.apkInfo))&&void 0!==t?t:i,a=isFinite(n.uploadProgress.secondsRemaining)&&!n.documentPending;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:null===n||void 0===n?void 0:n.apkInfo.icon,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Ui.G,{variant:"subtitle1",title:o}),secondary:(0,p.jsx)(Rn.Z,{variant:a?"determinate":"indeterminate",value:n.uploadProgress.percentComplete,sx:{marginY:1}})})]})};nK.displayName="VRContentAppUploadListItemContent";const iK=e=>{let{videoUpload:t}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Ru.Z,{children:(0,p.jsx)(Ko,{iconUrl:t.formData.iconUrl,variant:"rounded"})}),(0,p.jsx)(Rs.Z,{primary:(0,p.jsx)(Ui.G,{variant:"body1",title:t.formData.title}),secondary:(0,p.jsx)(Rn.Z,{variant:t.documentPending?"indeterminate":"determinate",value:t.uploadProgress.percentComplete,sx:{marginY:1}})})]})},oK=(0,a.memo)((()=>{const{pendingApps:e,videoUploads:t,contentFilter:n,searchTerm:i}=OH(),{buildOrganizationPath:r}=(0,w.P)(),l=(0,Le.S5)(),{filteredManagedApps:s,filteredExternalApps:d,filteredSharedApps:c,filteredInstantApps:h,filteredMetaHorizonStoreManagedApps:m,filteredVideos:g,filteredWebXRApps:C,hasNoResults:x}=(()=>{const{managedApps:e,pendingApps:t,externalApps:n,sharedApps:i,instantApps:r,metaHorizonStoreManagedApps:l,videos:s,videoUploads:d,webXRApps:c,searchTerm:p,contentFilter:h}=OH(),m=(0,Le.S5)(),g=(0,u.v9)((e=>e.firestore.data.instantApps.data));return(0,a.useMemo)((()=>
3{if(!p)return{filteredManagedApps:e,filteredExternalApps:n,filteredSharedApps:i,filteredInstantApps:r,filteredMetaHorizonStoreManagedApps:l,filteredVideos:s,filteredWebXRApps:c,hasNoResults:!1};const a=(0,o.pickBy)(e,(e=>(0,ff.cb)({data:e,fields:["title","packageName","description"],arrayFields:["categories"],substring:p}))),u=(0,o.pickBy)(n,(e=>(0,ff.cb)({data:e,fields:["title","packageName","description"],arrayFields:["categories"],substring:p}))),v=(0,o.pickBy)(i,(e=>(0,ff.cb)({data:e,fields:["title","packageName","description"],arrayFields:["categories"],substring:p}))),C=(0,o.pickBy)(r,((e,t)=>{const n=g[t];return!!n&&((0,ff.cb)({data:[n],fields:["title","description"],arrayFields:["categories"],substring:p})||(0,ff.cb)({data:e,fields:["packageName"],substring:p}))})),x=(0,o.pickBy)(l,(e=>(0,ff.cb)({data:e,fields:["title","packageName","description"],arrayFields:["categories"],substring:p}))),f=(0,ff.sz)({data:s,fields:["title","description"],arrayFields:["categories"],substring:p}),b=(0,ff.sz)({data:c,fields:["title","description"],arrayFields:["categories"],substring:p}),y=!(0,o.isEmpty)(t)||!(0,o.isEmpty)(a)||!(0,o.isEmpty)(u)||!(0,o.isEmpty)(v)||!(0,o.isEmpty)(x)||!m&&!(0,o.isEmpty)(C),j=!(0,o.isEmpty)(f)||!(0,o.isEmpty)((0,o.pickBy)(d,(e=>!e.videoId))),Z=!(0,o.isEmpty)(b);return{filteredManagedApps:a,filteredExternalApps:u,filteredSharedApps:v,filteredInstantApps:C,filteredMetaHorizonStoreManagedApps:x,filteredVideos:f,filteredWebXRApps:b,hasNoResults:!(("all"===h||"apps"===h)&&y||("all"===h||"videos"===h)&&j||("all"===h||"webXR"===h)&&Z)}}),[p,h,t,e,n,i,r,l,s,d,c,g,m])})(),f=(0,u.v9)((e=>e.firestore.data.instantApps.data));return(0,p.jsxs)(ii.Z,{disablePadding:!0,sx:{marginTop:-gd},children:[("all"===n||"apps"===n)&&(0,p.jsxs)(p.Fragment,{children:[(!(0,o.isEmpty)(e)||!(0,o.isEmpty)(s))&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aK,{title:"Managed Apps"}),(0,o.map)(e,((e,t)=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.app.managed),{packageName:t}),children:(0,p.jsx)(nK,{upload:e})},t))),(0,o.map)(s,((e,t)=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.app.managed),{packageName:t}),children:(0,p.jsx)(Nu,{appVersions:e,showUploadProgress:!0})},t)))]}),!(0,o.isEmpty)(d)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aK,{title:"External Apps"}),(0,o.map)(d,((e,t)=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.app.external),{appId:t}),children:(0,p.jsx)(Nu,{appVersions:e})},t)))]}),!(0,o.isEmpty)(c)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aK,{title:"Shared Apps"}),(0,o.map)(c,((e,t)=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.app.shared),{packageName:t}),children:(0,p.jsx)(Nu,{appVersions:e})},t)))]}),!(0,o.isEmpty)(m)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aK,{title:"Meta Managed Store Apps"}),(0,o.map)(m,((e,t)=>{const n=e[0];return n?(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.app.metaHorizonStoreManaged),{appId:t}),children:(0,p.jsx)(tK,{fallbackTitle:null===n||void 0===n?void 0:n.title,fallbackIconUrl:null===n||void 0===n?void 0:n.iconUrl,packageName:null===n||void 0===n?void 0:n.packageName})},t):null}))]}),!l&&!(0,o.isEmpty)(h)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aK,{title:"Instant Apps"}),(0,o.map)(h,((e,t)=>{const n=f[t];return n?(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.app.instant),{instantAppId:t}),children:(0,p.jsx)(Uu,{instantApp:n})},t):null}))]})]}),("all"===n||"videos"===n)&&(!(0,o.isEmpty)(g)||!(0,o.isEmpty)(t))&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aK,{title:"Videos"}),(0,o.map)((0,o.pickBy)(t,(e=>!e.videoId)),((e,t)=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.videoUpload),{uploadId:t}),children:(0,p.jsx)(iK,{videoUpload:e})},t))),(0,o.map)(g,(e=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.video),{videoId:e.id}),children:(0,p.jsx)(sf,{video:e})},e.id)))]}),("all"===n||"webXR"===n)&&!(0,o.isEmpty)(C)&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(aK,{title:"WebXR Links"}),(0,o.map)(C,(e=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:r((e=>e.vrContent.edit.webXRApp),{webXRAppId:e.id}),children:(0,p.jsx)(cf,{webXRApp:e})},e.id)))]}),x&&(0,p.jsxs)(v.Z,{padding:3,variant:"body2",color:"text.secondary",children:["No results for \u201c",i,"\u201d"]})]})})),aK=e=>{let{title:t}=e;return(0,p.jsx)(sj.Z,{sx:{color:"text.secondary",backgroundColor:"common.white",marginX:-gd,paddingLeft:gd+.375,paddingRight:gd,lineHeight:"40px",paddingTop:"25px",paddingBottom:1,borderBottom:e=>"1px solid ".concat(e.palette.divider)},children:(0,p.jsx)(v.Z,{noWrap:!0,variant:"subtitle2",children:t})})},rK=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit))})},lK=()=>{const{managedApps:e,pendingApps:t}=OH(),n=(0,c.$B)(c._j.organization.vrContent.edit.app.managed),i=null===n||void 0===n?void 0:n.params.packageName;if(!i)return(0,p.jsx)(rK,{});const o=e[i],a=t[i];return o?(0,p.jsx)(zY,{type:"managed",packageNameOrId:i,apps:o}):a?(0,p.jsx)(GY,{appUpload:a}):(0,p.jsx)(rK,{})},sK=()=>{const{externalApps:e}=OH(),t=(0,c.$B)(c._j.organization.vrContent.edit.app.external),n=null===t||void 0===t?void 0:t.params.appId;if(!n)return(0,p.jsx)(rK,{});const i=n?e[n]:void 0;return i?(0,p.jsx)(zY,{type:"external",packageNameOrId:n,apps:i}):(0,p.jsx)(rK,{})},dK=()=>{const{sharedApps:e}=OH(),t=(0,c.$B)(c._j.organization.vrContent.edit.app.shared),n=null===t||void 0===t?void 0:t.params.packageName;if(!n)return(0,p.jsx)(rK,{});const i=n?e[n]:void 0;return i?(0,p.jsx)(zY,{type:"shared",packageNameOrId:n,apps:i}):(0,p.jsx)(rK,{})},cK=()=>{const{instantApps:e}=OH(),{documents:t}=(0,E.jV)(S.F.InstantApps),n=(0,c.$B)(c._j.organization.vrContent.edit.app.instant),i=null===n||void 0===n?void 0:n.params.instantAppId;if(!i)return(0,p.jsx)(rK,{});const a=(0,o.find)(t,(e=>e.id===i));if(!a)return(0,p.jsx)(rK,{});const r=i?e[i]:void 0;return r?(0,p.jsx)(zY,{type:"instant",packageNameOrId:i,apps:r,instantApp:a}):(0,p.jsx)(rK,{})},uK=()=>{const{metaHorizonStoreManagedApps:e}=OH(),t=(0,c.$B)(c._j.organization.vrContent.edit.app.metaHorizonStoreManaged),n=null===t||void 0===t?void 0:t.params.appId;if(!n)return(0,p.jsx)(rK,{});const i=e[n],a=(0,o.first)(i);return a?(0,p.jsx)(zY,{type:"meta_horizon_store_managed",packageNameOrId:a.id,apps:[a]}):(0,p.jsx)(rK,{})},pK=()=>{const{videos:e}=OH(),t=(0,c.$B)(c._j.organization.vrContent.edit.video),n=null===t||void 0===t?void 0:t.params.videoId;if(!n)return(0,p.jsx)(rK,{});const i=(0,o.find)(e,{id:n});return i?(0,p.jsx)(XY,{video:i}):(0,p.jsx)(rK,{})},hK=()=>{const{buildOrganizationPath:e}=(0,w.P)(),{videoUploads:t}=OH(),n=(0,c.$B)(c._j.organization.vrContent.edit.videoUpload),i=null===n||void 0===n?void 0:n.params.uploadId;if(!i)return(0,p.jsx)(rK,{});const o=t[i];return null!==o&&void 0!==o&&o.videoId?(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit.video),{videoId:o.videoId})}):o?(0,p.jsx)(QY,{videoUpload:o}):(0,p.jsx)(rK,{})},mK=()=>{const{webXRApps:e}=OH(),t=(0,c.$B)(c._j.organization.vrContent.edit.webXRApp),n=null===t||void 0===t?void 0:t.params.webXRAppId;if(!n)return(0,p.jsx)(rK,{});const i=(0,o.find)(e,{id:n});return i?(0,p.jsx)(eK,{webXRApp:i}):(0,p.jsx)(rK,{})},gK=()=>(0,p.jsx)(vd,{sidebarContent:(0,p.jsx)(oK,{}),fixedSidebarContent:(0,p.jsxs)(m.Z,{spacing:1,paddingY:1,children:[(0,p.jsx)(wq,{}),(0,p.jsx)(Eq,{})]}),fixedSidebarContentHeight:90,minContentWidth:vK,children:(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.app.managed.__path,children:(0,p.jsx)(lK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.app.external.__path,children:(0,p.jsx)(sK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.app.shared.__path,children:(0,p.jsx)(dK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.app.instant.__path,children:(0,p.jsx)(cK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.app.metaHorizonStoreManaged.__path,children:(0,p.jsx)(uK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.video.__path,children:(0,p.jsx)(pK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.videoUpload.__path,children:(0,p.jsx)(hK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.webXRApp.__path,children:(0,p.jsx)(mK,{})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(HY,{})})]})}),vK=800,CK=a.memo((()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsx)(FH,{children:(0,p.jsx)(Mn.C,{toolbarBreadcrumbs:[{title:"Library",navCategory:!0},{title:"VR Content",path:e((e=>e.vrContent.edit))}],toolbarContent:(0,p.jsx)(bH,{}),noBottomPadding:!0,constrainContentWidth:!0,children:(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.edit.__path,children:(0,p.jsx)(gK,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.create.__path,children:(0,p.jsx)(Zq,{})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(l.l_,{to:e((e=>e.vrContent.edit))})})]})})})}));CK.displayName="VRContentFeature";const xK=()=>{const{buildOrganizationPath:e}=(0,w.P)();return(0,p.jsxs)(ii.Z,{disablePadding:!0,sx:{marginTop:-gd},children:[(0,p.jsx)(sj.Z,{sx:{color:"primary.main",backgroundColor:"common.white",marginX:-gd,paddingLeft:gd+.375,paddingRight:gd,lineHeight:"40px",paddingTop:"20px"},children:"Add new Network or Certificate"}),(0,p.jsxs)(m.Z,{paddingTop:1,spacing:1,children:[(0,p.jsx)(QV,{to:e((e=>e.wifiNetworks.create)),sx:{paddingY:2},children:(0,p.jsxs)(m.Z,{direction:"row",spacing:4,alignItems:"center",children:[(0,p.jsx)(go.Z,{}),(0,p.jsx)("span",{children:"Wi-Fi Network"})]})}),(0,p.jsx)(QV,{to:e((e=>e.wifiNetworks.certificates.create)),sx:{paddingY:2},children:(0,p.jsxs)(m.Z,{direction:"row",spacing:4,alignItems:"center",children:[(0,p.jsx)(qw.Z,{}),(0,p.jsx)("span",{children:"Certificate"})]})})]})]})};var fK=n(86880),bK=n(32815);var yK=n(75562),jK=n(40271),ZK=n.n(jK),wK=n(56855);const EK="AUTH_CERT_REQUIRES_PRIVATE_KEY",SK="ORPHAN_PRIVATE_KEY",DK=/-----BEGIN CERTIFICATE-----[\s\S]*?-----END CERTIFICATE-----/g,MK=/-----BEGIN (RSA |EC |)PRIVATE KEY-----[\s\S]*?-----END \1PRIVATE KEY-----/g,kK="2.5.29.19",IK="2.5.29.15",AK="1.2.840.113549.1.7.6",RK="1.2.840.113549.1.12.10.1.3",TK="1.2.840.113549.1.12.10.1.2",PK="1.2.840.113549.1.12.10.1.1",LK="1.2.840.113549.1.1.1",NK="1.2.840.10045.2.1",UK={"2.5.4.3":"CN","2.5.4.6":"C","2.5.4.7":"L","2.5.4.8":"ST","2.5.4.10":"O","2.5.4.11":"OU","1.2.840.113549.1.9.1":"E"};function FK(e,t){return{issuer:"",pem:"",subject:"",validFrom:void 0,validTo:void 0,isCA:!1,isValid:e,...t}}const OK=e=>FK(!1,e);function _K(e){return e.isValid&&!e.isCA&&!e.hasPrivateKey}function zK(e){return _K(e)?{...e,isValid:!1,errorCode:EK,errorMessage:"Authentication certificate requires a private key. Please upload the certificate with its private key."}:e}function BK(e){return OK({pem:e,hasPrivateKey:!0,errorCode:SK,errorMessage:"Private key found but corresponding certificate is missing"})}const WK=["Invalid PEM","malformed","Too few bytes","password","PKCS","MAC","integrity","Invalid","Only 8, 16, 24, or 32 bits supported"];function VK(e){return!(e instanceof Error)||!WK.some((t=>e.message.includes(t)))}function GK(e){return(0,o.map)(Array.from(e),(e=>"0x".concat(e.toString(16).padStart(2,"0")))).join(" ")}function HK(e){const t=new Uint8Array(e);return{bufferSize:e.byteLength,firstBytes:GK(t.slice(0,20))}}
3function qK(e,t,n){(0,Si.yR)(e,{name:t,contexts:{parsing:{...n,errorMessage:e instanceof Error?e.message:String(e),errorName:e instanceof Error?e.name:"Unknown"}}})}function YK(e,t,n){var i;if(e.includes("-----BEGIN"))return"pem";const o=null!==(i=null===n||void 0===n?void 0:n.toLowerCase())&&void 0!==i?i:"";return o.endsWith(".p12")||o.endsWith(".pfx")?"pkcs12":function(e){const t=new Uint8Array(e);if(t.length<2||48!==t[0])return"unknown";try{var n,i;const t=(0,yK.sc)(e);if(-1===t.offset)return"unknown";const o=t.result;if(null===(n=o.valueBlock)||void 0===n||!n.value||o.valueBlock.value.length<2)return"der";const a=o.valueBlock.value[0];return 2===(null===a||void 0===a||null===(i=a.idBlock)||void 0===i?void 0:i.tagNumber)?"pkcs12":"der"}catch(o){return VK(o)&&qK(o,"detectFormat ASN.1 parsing error",HK(e)),"unknown"}}(t)}async function KK(e){const t=e.match(DK),n=e.match(MK);return t&&0!==t.length?n&&n.length>0?async function(e,t){try{const n=(0,o.map)(e,(async e=>{try{return{der:hX(e),pem:e}}catch{return null}})),i=(0,o.map)(t,(async e=>{try{return{der:hX(e),pem:e}}catch{return null}})),a=(await Promise.all(n)).filter((e=>null!==e)),r=(await Promise.all(i)).filter((e=>null!==e)),l=(0,o.map)(a,(async e=>{try{const t=(0,yK.sc)(e.der);if(-1===t.offset)return{cert:new wK.KBB,parsed:OK({pem:e.pem})};const n=new wK.KBB({schema:t.result});return{cert:n,parsed:await dX(n)}}catch(t){return VK(t)&&qK(t,"parsePemWithPrivateKeys certificate error",{format:"PEM"}),{cert:new wK.KBB,parsed:OK({pem:e.pem})}}}));return XK((await Promise.all(l)).filter((e=>null!==e)),(0,o.map)(r,(e=>e.der)))}catch(n){return qK(n,"parsePemWithPrivateKeys error",{certCount:e.length,keyCount:t.length}),QK(e)}}(t,n):QK(t):function(e){return e&&0!==e.length?(0,o.map)(e,BK):[]}(n)}async function XK(e,t){const n=new Set,i=await Promise.all((0,o.map)(t,(async e=>async function(e){try{const t=(0,yK.sc)(e);if(-1===t.offset)return null;try{const e=new wK.owv({schema:t.result}),n=e.privateKeyAlgorithm.algorithmId,i=rX(e.privateKey.valueBlock.valueHexView,n);return i||qK(new Error("Unsupported algorithm OID: ".concat(n)),"extractPublicKeyFromPrivateKey unsupported algorithm",{algorithmOid:n}),i}catch{const t=new Uint8Array(e),n=rX(t,LK);return n||rX(t,NK)}}catch(t){return VK(t)&&qK(t,"extractPublicKeyFromPrivateKey error",{}),null}}(e)))),a=(0,o.map)(e,(e=>{let{cert:t}=e;return function(e){try{if(!e.subjectPublicKeyInfo)return null;if(!e.subjectPublicKeyInfo.subjectPublicKey)return null;return aX(e.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView)}catch(t){return qK(t,"extractPublicKeyFromCertificate error",{}),null}}(t)}));(0,o.forEach)(e,((e,r)=>{let{parsed:l}=e;const s=a[r];s&&(0,o.forEach)(t,((e,t)=>{if(n.has(t))return;const a=i[t];if(a&&function(e,t){const n=lX(new Uint8Array(e)),i=lX(new Uint8Array(t));return n.length===i.length&&(0,o.every)(Array.from(n),((e,t)=>e===i[t]))}(s,a)){if(e){const i=mX(e,"PRIVATE KEY");l.pem=i+"\n"+l.pem,l.hasPrivateKey=!0,n.add(t)}return!1}}))}));const r=(0,o.map)(e,(e=>{let{parsed:t}=e;return zK(t)}));return(0,o.forEach)(t,((e,t)=>{if(!n.has(t)&&e){const t=mX(e,"PRIVATE KEY");r.push(BK(t))}})),r}async function QK(e){const t=(0,o.map)(e,(async(t,n)=>{try{return await async function(e){try{const t=hX(e),n=(0,yK.sc)(t);if(-1===n.offset)return OK({pem:e});return dX(new wK.KBB({schema:n.result}))}catch(t){return VK(t)&&qK(t,"parseSinglePemCertificate error",{pemLength:e.length,pemPreview:e.substring(0,150)}),OK({pem:e})}}(t)}catch(i){return VK(i)&&qK(i,"tryParsePEM individual certificate error",{format:"PEM",certificateIndex:n,totalMatches:e.length,certPemLength:t.length,certPemPreview:t.substring(0,150)}),OK({pem:t})}})),n=await Promise.all(t);return(0,o.map)(n,zK)}async function JK(e){try{const t=(0,yK.sc)(e);if(-1===t.offset)return[];const n=new wK.KBB({schema:t.result}),i=await dX(n);return _K(i)?[zK(i)]:[i]}catch(t){return VK(t)&&qK(t,"tryParseDER error",{format:"DER",...HK(e)}),[]}}async function $K(e,t,n){const i=function(e,t,n){try{const t=(0,yK.sc)(e);if(-1===t.offset)throw new Error("Invalid ASN.1 structure");return{success:!0,pfx:new wK.rqV({schema:t.result})}}catch(i){return qK(i,"tryParsePKCS12 ASN.1 parsing error",{format:"PKCS12",fileName:t,hasPassword:!!n,...HK(e)}),{success:!1,error:OK({isEncrypted:!1,fileName:t,errorMessage:"Unable to parse file - it may be corrupted or in an unsupported format"})}}}(e,n,t);if(!i.success)return[i.error];const a=await async function(e){try{var t,n;const i=(new TextEncoder).encode("");return await e.parseInternalValues({password:i.buffer.slice(0),checkIntegrity:!1}),!(null===(t=e.parsedValue)||void 0===t||null===(n=t.authenticatedSafe)||void 0===n||!n.safeContents)&&(0,o.some)(e.parsedValue.authenticatedSafe.safeContents,(e=>e.contentType===AK))}catch{return!0}}(i.pfx);if(a&&!t)return[OK({isEncrypted:!0,fileName:n,errorMessage:"Password required to decrypt this file"})];const{certificates:r,hasEncryptedContent:l,decryptionFailed:s,foundAnyCertBags:d}=await async function(e,t,n,i){const o=t?[t]:[""];let a=!1,r=!1,l=!1;for(const p of o)try{var s,d,c;const t=(new TextEncoder).encode(p);if(await e.parseInternalValues({password:t.buffer.slice(0),checkIntegrity:!0}),null===(s=e.parsedValue)||void 0===s||null===(d=s.authenticatedSafe)||void 0===d||!d.safeContents)continue;const n=e.parsedValue.authenticatedSafe,{params:i,hasEncryptedContent:o}=nX(n,t);if(o&&(a=!0),await n.parseInternalValues({safeContents:i}),null===(c=n.parsedValue)||void 0===c||!c.safeContents)continue;const u=await oX(n.parsedValue.safeContents,t);
3u.foundAnyCertBags&&(r=!0);const h=await sX(u.certificateDerBytes,u.privateKeyDerBytes);if(h.length>0)return{certificates:h,hasEncryptedContent:a,decryptionFailed:!1,foundAnyCertBags:r};l=!1}catch(u){const e=u instanceof Error?u.message:"";(e.includes("password")||e.includes("MAC")||e.includes("integrity"))&&(a=!0,l=!0),VK(u)&&qK(u,"tryParsePKCS12 unexpected error",{format:"PKCS12",fileName:n,hasPassword:!!t,...HK(i),passwordAttempt:""===p?"empty":"provided"});continue}return{certificates:[],hasEncryptedContent:a,decryptionFailed:l,foundAnyCertBags:r}}(i.pfx,t,n,e);if(r.length>0)return r;let c=!1;if(t&&!s){const i=await async function(e,t,n){try{const n=new Uint8Array(e),i=Array.from(n,(e=>String.fromCharCode(e))).join(""),a=ZK().asn1.fromDer(i),r=ZK().pkcs12.pkcs12FromAsn1(a,t),l="1.2.840.113549.1.12.10.1.3",s="1.2.840.113549.1.12.10.1.2",d=r.getBags({bagType:l})[l],c=r.getBags({bagType:s})[s],u=(0,o.map)(d||[],(e=>e.cert?ZK().pki.certificateToPem(e.cert):"")).filter(Boolean),p=(0,o.map)(c||[],(e=>e.key?ZK().pki.privateKeyToPem(e.key):"")).filter(Boolean);if(0===u.length)return{certificates:[],passwordFailed:!1};const h=[...p,...u].join("\n");return{certificates:await KK(h),passwordFailed:!1}}catch(i){const e=i instanceof Error&&(i.message.includes("Invalid password")||i.message.includes("PKCS#12 MAC could not be verified"));return e||qK(i,"tryParsePkcs12WithForge error",{format:"PKCS12",fileName:n}),{certificates:[],passwordFailed:e}}}(e,t,n);if(i.certificates.length>0)return i.certificates;c=i.passwordFailed}const u=a||l;let p;return p=u&&s||c?t?"Unable to decrypt this file. The password may be incorrect.":"Password required to decrypt this file":u&&!d?"File decrypted successfully but contains
3no certificates":d?"Certificate data found but appears corrupted or unsupported":"File contains no certificate data",[OK({isEncrypted:u&&(s||void 0!==t)||c,fileName:n,errorMessage:p})]}async function eX(e,t,n,i,o){switch(e){case"pem":return KK(t);case"der":return JK(n);case"pkcs12":return $K(n,i,o);default:return async function(e,t,n,i){const o=await KK(e);if(o.length>0)return o;const a=await JK(t);return a.length>0?a:$K(t,n,i)}(t,n,i,o)}}async function tX(e,t){try{const n=await e.text(),i=await e.arrayBuffer(),a=YK(n,i,e.name),r=await eX(a,n,i,t,e.name);return 0===r.length?(qK(new Error("Unable to parse certificate file"),"parseCertificateFile unable to parse",{name:e.name,size:e.size,type:e.type,hasPassword:!!t}),[OK({fileName:e.name,sourceFileName:e.name,errorMessage:"Unable to parse this file as a certificate"})]):(0,o.map)(r,(t=>({...t,sourceFileName:e.name})))}catch(n){return qK(n,"parseCertificateFile error",{name:e.name,size:e.size,type:e.type,hasPassword:!!t}),[OK({fileName:e.name,sourceFileName:e.name,errorMessage:"Error parsing file: ".concat(n instanceof Error?n.message:"Unknown error")})]}}function nX(e,t){let n=!1;return{params:(0,o.map)(e.safeContents,(e=>e.contentType===AK?(n=!0,{password:t.buffer.slice(0)}):{})),hasEncryptedContent:n}}function iX(e){return e.bagId===RK}async function oX(e,t){const n=[],i=[];let a=!1;return await Promise.all((0,o.map)(e,(async e=>{(function(e){var t;return!(null===(t=e.value)||void 0===t||!t.safeBags)})(e)&&await Promise.all((0,o.map)(e.value.safeBags,(async e=>{iX(e)&&(a=!0);const o=function(e){if(!iX(e))return null;const t=e.bagValue;try{if(t.parsedValue instanceof wK.KBB)return t.parsedValue.toSchema().toBER(!1);if(t.certValue&&"toSchema"in t.certValue)return t.certValue.toSchema().toBER(!1)}catch(n){return qK(n,"extractCertificateDerFromBag error",{hasParsedValue:!!t.parsedValue,hasCertValue:!!t.certValue}),null}return null}(e);if(o)return void n.push(o);const r=await async function(e,t){if(function(e){return e.bagId===TK}(e)){const i=e.bagValue;try{if(await i.parseInternalValues({password:t.buffer.slice(0)}),i.parsedValue)return i.parsedValue.toSchema().toBER(!1)}catch(n){return n instanceof Error&&!n.message.includes("password")&&!n.message.includes("PKCS")&&qK(n,"extractPrivateKeyDerFromBag shrouded key error",{bagId:e.bagId}),null}}if(function(e){return e.bagId===PK}(e)){return e.bagValue.toSchema().toBER(!1)}return null}(e,t);r&&i.push(r)})))}))),{certificateDerBytes:n,privateKeyDerBytes:i,foundAnyCertBags:a}}function aX(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function rX(e,t){const n=function(e){var t;const n=(0,yK.sc)(e);if(-1===n.offset)return null;const i=n.result;return null!==(t=i.valueBlock)&&void 0!==t&&t.value?i:null}(e);if(!n)return null;if(t===LK){var i,o;const e=n.valueBlock.value[1],t=n.valueBlock.value[2];if(!e||!t)return null;if(2!==(null===(i=e.idBlock)||void 0===i?void 0:i.tagNumber))return null;if(2!==(null===(o=t.idBlock)||void 0===o?void 0:o.tagNumber))return null;return new yK.T9({value:[e,t]}).toBER(!1)}if(t===NK){const e=n.valueBlock.value[3]||n.valueBlock.value[2];if(!e)return null;const t=e.valueBlock.value[0];return t?aX(t.valueBlock.valueHexView):null}return null}function lX(e){return e.length>1&&0===e[0]?e.slice(1):e}async function sX(e,t){const n=(0,o.map)(e,(async(t,n)=>{const i=(0,yK.sc)(t);if(-1===i.offset)return qK(new Error("Certificate ASN.1 parse failed"),"convertDersToCertificates ASN.1 error",{certificateIndex:n,totalCertificates:e.length,fromPkcs12:!0,...HK(t)}),{cert:new wK.KBB,parsed:OK({errorMessage:"Unable to parse certificate from PKCS#12 file"})};const o=new wK.KBB({schema:i.result});return{cert:o,parsed:await dX(o)}}));return XK(await Promise.all(n),t)}async function dX(e){try{var t,n,i,a;const r=cX(e.subject),l=cX(e.issuer),s=mX(e.toSchema().toBER(!1)),d=function(e){return!!e.extensions&&(0,o.some)(e.extensions,(e=>{try{const t=e.extnID===kK,n=e.extnID===IK;return!(!t||!function(e){try{var t,n;if(e.parsedValue instanceof wK.JBN)return!0===e.parsedValue.cA;if(e.parsedValue){return!0===new wK.JBN({schema:e.parsedValue}).cA}if(null!==(t=e.extnValue)&&void 0!==t&&null!==(n=t.valueBlock)&&void 0!==n&&n.valueHexView){const t=e.extnValue.valueBlock.valueHexView,n=(0,yK.sc)(aX(t));if(-1!==n.offset){return!0===new wK.JBN({schema:n.result}).cA}}return!1}catch(i){return console.error("hasBasicConstraintsCaFlag error:",i),!1}}(e))||!(!n||!function(e){var t;if(!e.parsedValue)return!1;const n=null===(t=e.parsedValue.valueBlock)||void 0===t?void 0:t.valueHexView;
3if(!n||0===n.length)return!1;const i=n[0];return void 0!==i&&0!==(4&i)}(e))}catch(t){return qK(t,"isCACertificate extension parsing error",{extensionOid:e.extnID,isCritical:e.critical}),!1}}))}(e),c=await gX(s);return FK(!0,{issuer:l,pem:s,subject:r,validFrom:null===(t=e.notBefore)||void 0===t||null===(n=t.value)||void 0===n?void 0:n.getTime(),validTo:null===(i=e.notAfter)||void 0===i||null===(a=i.value)||void 0===a?void 0:a.getTime(),isCA:d,sha256Fingerprint:c})}catch(r){return(0,Si.yR)(r,{name:"convertPkijsCertificateToParsed error",contexts:{certificate:{hasSubject:!!e.subject,hasIssuer:!!e.issuer,errorMessage:r instanceof Error?r.message:String(r),errorName:r instanceof Error?r.name:"Unknown"}}}),OK()}}function cX(e){if(null===e||void 0===e||!e.typesAndValues)return"";return(0,o.compact)((0,o.map)(e.typesAndValues,(e=>{var t;if(null===e||void 0===e||null===(t=e.value)||void 0===t||!t.valueBlock)return null;const n=UK[e.type]||e.type;return"".concat(n,"=").concat(e.value.valueBlock.value)}))).join(", ")}function uX(e){if("undefined"!==typeof Buffer)return Buffer.from(e).toString("base64");let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function pX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64;const n=[];for(let i=0;i<e.length;i+=t)n.push(e.slice(i,i+t));return n.join("\n")}function hX(e){try{const t=function(e){if(!e.includes("-----BEGIN")||!e.includes("-----END"))throw new Error("Invalid PEM format");const t=e.replace(/-----BEGIN [^-]+-----/,"").replace(/-----END [^-]+-----/,"").replace(/\s/g,"");if(!t)throw new Error("Invalid PEM format");return t}(e),n=function(e){if("undefined"!==typeof Buffer)return new Uint8Array(Buffer.from(e,"base64"));const t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}(t);return aX(n)}catch{throw new Error("Invalid PEM format")}}function mX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CERTIFICATE";const n=new Uint8Array(e),i=uX(n),o=pX(i);return"-----BEGIN ".concat(t,"-----\n").concat(o,"\n-----END ").concat(t,"-----")}async function gX(e){try{const t=hX(e),n=await crypto.subtle.digest("SHA-256",t),i=new Uint8Array(n);return(0,o.map)(Array.from(i),(e=>e.toString(16).padStart(2,"0"))).join("")}catch(t){if(t instanceof Error&&"Invalid PEM format"===t.message)return;const n=(0,o.get)(t,"message"),i=(0,o.get)(t,"name");return void(0,Si.yR)(t,{name:"calculateSha256Fingerprint error",contexts:{certificate:{pemLength:e.length,pemPreview:e.substring(0,100),hasCertificateMarkers:e.includes("BEGIN CERTIFICATE"),errorMessage:n,errorName:i}}})}}const vX=e=>{var t,n,r,l,s,d;let{parsedCert:c,subject:u,issuer:h,validFrom:g,validTo:C,subtype:x,sha256Fingerprint:f,pem:b}=e;const j=null!==(t=null===c||void 0===c?void 0:c.subject)&&void 0!==t?t:u,Z=null!==(n=null===c||void 0===c?void 0:c.issuer)&&void 0!==n?n:h,w=null!==(r=null===c||void 0===c?void 0:c.validFrom)&&void 0!==r?r:g,E=null!==(l=null===c||void 0===c?void 0:c.validTo)&&void 0!==l?l:C,S=null!==c&&void 0!==c&&c.isCA?$w.CA:c?$w.AUTH:x,D=null!==(s=null===c||void 0===c?void 0:c.sha256Fingerprint)&&void 0!==s?s:f,k=null!==(d=null===c||void 0===c?void 0:c.pem)&&void 0!==d?d:b,I=null===c||void 0===c?void 0:c.isEncrypted,A=null===c||void 0===c?void 0:c.errorMessage,R=null===c||void 0===c?void 0:c.warningMessage,[T,P]=(0,a.useState)(D);(0,a.useEffect)((()=>{if(D)P(D);else{if(k){let e=!1;return gX(k).then((t=>{e||P(t)})),()=>{e=!0}}P(void 0)}}),[D,k]);const L=(0,a.useMemo)((()=>({id:"",organizationRef:{id:"",path:""},name:"",subject:j,issuer:Z,validFrom:w,validTo:E,subtype:null!==S&&void 0!==S?S:$w.CA})),[j,Z,w,E,S]),N=(0,a.useMemo)((()=>I||A?"invalid":pE(L)),[L,I,A]),U=(0,a.useMemo)((()=>I?y.DG.warning[200]:A?y.DG.error[200]:((e,t)=>{var n,i,o,a;const r=pE(e),l=tE(e);var s;if("valid"===r&&e.subtype===$w.AUTH&&l)return null!==(s=t.warning[200])&&void 0!==s?s:"";switch(r){case"valid":return null!==(n=t.purple[800])&&void 0!==n?n:"";case"expired":case"invalid":return null!==(i=t.error[200])&&void 0!==i?i:"";case"not-yet-valid":case"expiring-soon":return null!==(o=t.warning[200])&&void 0!==o?o:"";default:return null!==(a=t.purple[800])&&void 0!==a?a:""}})(L,y.DG)),[L,I,A]),F=(0,a.useMemo)((()=>I?"This certificate is encrypted. Enter a password to decrypt it."
3:A||R?void 0:((e,t)=>{switch(pE(e)){case"expired":return"This certificate expired on ".concat(t(e.validTo),". You will not be able to use it.");case"not-yet-valid":return"This certificate is not yet valid.";case"expiring-soon":return"This certificate is about to expire. If it expires without being replaced, devices may lose wi-fi connection.";case"invalid":return"This certificate is invalid or could not be parsed.";default:return}})(L,M.Q2)),[L,I,A,R]),O=(0,a.useMemo)((()=>I?"Encrypted":j||Z?mE(L):null!==c&&void 0!==c&&c.hasPrivateKey?"Private Key":!1===(null===c||void 0===c?void 0:c.isValid)?"Invalid":"Private Key"),[L,I,j,Z,null===c||void 0===c?void 0:c.hasPrivateKey,null===c||void 0===c?void 0:c.isValid]),_=(0,a.useMemo)((()=>(e=>{const t=tE(e);if(e.subtype===$w.AUTH&&t)return"This authentication certificate is self-signed. You may need to add it to your trust store directly, or obtain a new authentication certificate signed by a trusted CA."})(L)),[L]),z=(0,a.useMemo)((()=>{const e=I?y.DG.warning[200]:"expired"===N||"invalid"===N?y.DG.error[200]:y.DG.warning[200];return(0,o.compact)([A&&{text:A,color:y.DG.error[200]},R&&{text:R,color:y.DG.warning[200]},F&&{text:F,color:e},_&&{text:_,color:y.DG.warning[200]}])}),[A,R,F,_,I,N]),B=(0,p.jsx)(i.Z,{sx:{border:2,borderColor:U,borderRadius:3,p:2.5,backgroundColor:"background.paper"},children:(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",justifyContent:"flex-start",children:[(0,p.jsxs)(m.Z,{spacing:1.5,sx:{width:"250px"},children:[(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",sx:{lineHeight:1.3,color:"not-yet-valid"===N?y.DG.warning[200]:"inherit",fontWeight:600},children:O}),T&&(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",gap:1,children:(0,p.jsx)(ae,{value:T,children:(0,p.jsxs)(v.Z,{variant:"body2",sx:{color:y.DG.grey[600],lineHeight:1.3,fontSize:"0.875rem"},children:["#",T.slice(0,8)]})})})]}),(0,p.jsx)(m.Z,{spacing:.5,children:(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"caption",sx:{color:y.DG.grey[600],fontWeight:500,fontSize:"0.75rem"},children:"Validity"}),(0,p.jsxs)(m.Z,{direction:"row",spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body2",sx:{lineHeight:1.4,fontSize:"0.875rem",color:"not-yet-valid"===N?y.DG.warning[200]:"inherit",fontWeight:"not-yet-valid"===N?600:"inherit"},children:w?"".concat((0,M.Q2)(w)," "):"-"}),(0,p.jsx)(v.Z,{sx:{lineHeight:1.4,fontSize:"0.875rem",color:"inherit",fontWeight:"inherit"},children:w?" to":""})]}),E?(0,p.jsx)(v.Z,{variant:"body2",sx:{lineHeight:1.4,fontSize:"0.875rem",color:"expired"===N?y.DG.error[200]:"inherit",fontWeight:"expired"===N?600:"inherit"},children:(0,M.Q2)(E)}):null]})})]}),(0,p.jsxs)(m.Z,{spacing:2,sx:{minWidth:"300px",maxWidth:"70%"},children:[(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"caption",sx:{color:y.DG.grey[600]},children:"Subject"}),(0,p.jsx)(v.Z,{variant:"body2",sx:{lineHeight:1.4,wordBreak:"break-word"},children:j||"-"})]}),(0,p.jsxs)(m.Z,{children:[(0,p.jsx)(v.Z,{variant:"caption",sx:{color:y.DG.grey[600],fontWeight:500,fontSize:"0.75rem"},children:"Issuer"}),(0,p.jsx)(v.Z,{variant:"body2",sx:{lineHeight:1.4,wordBreak:"break-word",fontSize:"0.875rem"},children:Z||"-"})]})]})]})}),W=z.length>0?(0,o.map)(z,((e,t)=>(0,p.jsx)(v.Z,{variant:"subtitle1",sx:{color:e.color,fontSize:"0.875rem"},children:e.text},t))):null;return(0,p.jsxs)(m.Z,{spacing:1,children:[B,W]})},CX={"application/x-pkcs12":[".p12",".pfx"],"application/x-pem-file":[".pem"],"application/x-x509-ca-cert":[".der",".cer",".crt"]},xX=(0,a.memo)((e=>{let{certificateType:t,onFileSelected:n,selectedFiles:o,disabled:r=!1}=e;const l=CX,{notify:s}=(0,ie.o)(),d=(0,a.useCallback)((e=>{0!==e.length?n(e,t):(0,Si.yR)(new Error("No files provided"),{name:"CertificateFileDropzone.onDropAccepted() error",contexts:{props:{certificateType:t}}})}),[t,n]),c=(0,a.useCallback)((e=>{e.length>0&&s({severity:"error",message:"".concat(e.length>1?"".concat(e.length," files were "):"Your file was "," not uploaded due to ").concat(1===e.length?"an":""," unrecognized file extension").concat(e.length>1?"s":"",".")})}),[s]),u=(0,Eg.uI)({multiple:!0,accept:l,onDropAccepted:d,onDropRejected:c,disabled:r});return(0,p.jsxs)(i.Z,{...u.getRootProps({style:{outline:"none"}}),sx:{width:1,minHeight:240,borderWidth:3,borderRadius:1,borderStyle:"dashed",borderColor:u.isDragAccept?"primary.light":y.DG.grey[500],backgroundColor:u.isDragAccept?y.DG.grey[800]:y.DG.grey[700],cursor:r?"default":"pointer",transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center","&:hover":r?{}:{borderColor:"primary.light",backgroundColor:y.DG.grey[800]}}
3,children:[(0,p.jsx)("input",{...u.getInputProps()}),(0,p.jsxs)(m.Z,{spacing:2,alignItems:"center",sx:{padding:3,textAlign:"center"},children:[(0,p.jsx)(fd.Z,{sx:{fontSize:48,color:y.DG.grey[400]}}),(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body1",fontWeight:600,color:"common.white",children:"CA Certificate"}),(0,p.jsx)(v.Z,{variant:"body2",color:y.DG.grey[400],children:".pem, .der, .cer, and .crt format supported"})]}),(0,p.jsx)(v.Z,{variant:"body2",color:y.DG.grey[400],children:"OR"}),(0,p.jsxs)(m.Z,{spacing:.5,children:[(0,p.jsx)(v.Z,{variant:"body1",fontWeight:600,color:"common.white",children:"Authentication Certificate"}),(0,p.jsx)(v.Z,{variant:"body2",color:y.DG.grey[400],children:".p12, .pfx, and .pem format supported"})]})]})]})]})}));xX.displayName="CertificateFileDropzone";var fX=n(82271),bX=n(53329);const yX={nickname:"",description:"",password:""},jX=e=>{var t;return null!==(t=e.sha256Fingerprint)&&void 0!==t?t:"cert-".concat(e.sourceFileName,"-").concat((0,Vt.Z)())},ZX=e=>{let{certificates:t,sourceFileMap:n,onSave:i,onCancel:r,onCertificatesUpdate:l,saving:s,existingCertificates:d}=e;const[c]=(0,a.useState)((()=>{const e=new Map;return t.forEach((t=>{e.set(t,jX(t))})),e})),u=(0,a.useCallback)((e=>{let t=c.get(e);return t||(t=jX(e),c.set(e,t)),t}),[c]),[h,g]=(0,a.useState)(new Map);(0,a.useEffect)((()=>{const e=new Map;(0,o.forEach)(d,(t=>{t.sha256Hash&&e.set(t.sha256Hash,t.name)})),g(e)}),[d]);const f=(0,a.useCallback)((e=>{if(!e.sha256Fingerprint)return{isDuplicate:!1};const n=h.get(e.sha256Fingerprint);if(n)return{isDuplicate:!0,existingName:n};const i=t.filter((t=>t.sha256Fingerprint===e.sha256Fingerprint));if(i.length>1){return{isDuplicate:i.indexOf(e)>0,isDuplicateInBatch:!0}}return{isDuplicate:!1}}),[h,t]),[b,j]=(0,a.useState)((()=>{const e=new Map;return t.forEach(((t,n)=>{var i;const o=null!==(i=c.get(t))&&void 0!==i?i:jX(t);e.set(o,{nickname:gE(t,n+1),description:"",password:""})})),e})),[Z,w]=(0,a.useState)((()=>new Map)),E=(0,a.useRef)(new Map),S=(0,a.useRef)(new Map);(0,a.useEffect)((()=>()=>{E.current.forEach((e=>clearTimeout(e))),S.current.forEach((e=>clearTimeout(e)))}),[]);const D=(0,a.useCallback)(((e,t)=>{j((n=>{const i=new Map(n),o=i.get(e)||yX;return i.set(e,{...o,nickname:t}),i}))}),[]),M=(0,a.useCallback)(((e,t)=>{j((n=>{const i=new Map(n),o=i.get(e)||yX;return i.set(e,{...o,description:t}),i}))}),[]),k=(0,a.useCallback)((e=>{const t=E.current.get(e);t&&(clearTimeout(t),E.current.delete(e));const n=S.current.get(e);n&&(clearTimeout(n),S.current.delete(e))}),[]),I=(0,a.useCallback)(((e,t)=>{l((n=>{const i=n.findIndex((t=>u(t)===e));if(-1===i)return n;const o=n.slice(0,i),a=n.slice(i+1);return t.forEach(((e,t)=>{const n=jX(e);c.set(e,n),j((i=>{const o=new Map(i);return o.set(n,{nickname:gE(e,t+1),description:"",password:""}),o}))})),[...o,...t,...a]}))}),[l,u,c]),A=(0,a.useCallback)(((e,t,i)=>{j((t=>{const n=new Map(t),o=n.get(e)||yX;return n.set(e,{...o,password:i}),n}));const o=t.sourceFileName?n.get(t.sourceFileName):void 0;if(!t.isEncrypted||!o||!i)return void(i||(k(e),w((t=>
3new Map(t).set(e,"idle")))));k(e),w((t=>new Map(t).set(e,"processing")));const a=setTimeout((()=>{(async()=>{const t=Date.now();let n="error";try{const t=(await tX(o,i)).filter((e=>!e.isEncrypted));t.length>0&&(I(e,t),n="success")}catch(l){(0,Si.yR)(l,{name:"Failed to retry parsing with password"})}const a=200-(Date.now()-t),r=()=>{w((t=>new Map(t).set(e,n))),S.current.delete(e)};if(a>0){const t=setTimeout(r,a);S.current.set(e,t)}else r()})()}),300);E.current.set(e,a)}),[n,k,I]),R=(0,a.useCallback)((e=>{l((t=>t.filter((t=>u(t)!==e)))),j((t=>{const n=new Map(t);return n.delete(e),n}))}),[l,u]),T=(0,a.useCallback)((()=>{l([]),j(new Map)}),[l]),P=(e,t)=>{if(!e.isEncrypted)return null;const n=b.get(t)||yX,i=Z.get(t)||"idle";return(0,p.jsx)(Ln.Z,{label:"Password",type:"password",helperText:(()=>{switch(i){case"processing":return"Decrypting certificate...";case"error":return"Incorrect password";case"success":return"Certificate decrypted successfully";default:return"Enter the password to decrypt this certificate"}})(),error:"error"===i,color:"success"===i?"success":void 0,value:n.password,onChange:n=>A(t,e,n.target.value),fullWidth:!0,sx:{maxWidth:"450px"}})},L=e=>{if(s)return null;const t=f(e);if(!t.isDuplicate)return null;const n=t.isDuplicateInBatch?"This certificate is a duplicate of another certificate in this upload. It will not be saved.":'This certificate already exists as "'.concat(t.existingName,'". It will not be saved.');return(0,p.jsx)(v.Z,{variant:"subtitle1",sx:{color:y.DG.error[200],fontSize:"0.875rem"},children:n})},N=t.filter((e=>!e.isEncrypted)).filter((e=>e.isValid)),U=N.filter((e=>!f(e).isDuplicate)),F=(0,a.useCallback)((async()=>{const e=N.filter((e=>!f(e).isDuplicate)),t=(0,o.map)(e,((e,t)=>{const n=u(e),i=b.get(n)||{nickname:"Certificate ".concat(t+1),description:""};return{...e,nickname:i.nickname,description:i.description,id:"temp-".concat(t),subtype:e.isCA?$w.CA:$w.AUTH}}));await i(t)}),[N,b,i,u,f]),O=N.some((e=>f(e).isDuplicate)),_=N.length>0&&!O&&N.every((e=>{const t=u(e),n=b.get(t);return""!==(null===n||void 0===n?void 0:n.nickname.trim())}));return(0,p.jsxs)(m.Z,{spacing:3,width:1,children:[(0,p.jsxs)(m.Z,{direction:"row",alignItems:"center",justifyContent:"flex-start",children:[(0,p.jsx)(v.Z,{variant:"body1",color:"text.secondary",children:(0,p.jsxs)(v.Z,{component:"span",variant:"body1",color:"primary",fontWeight:600,children:[t.length," certificate",1!==t.length?"s":""," ","found"]})}),(0,p.jsx)(C.Z,{onClick:T,disabled:s||0===t.length,children:(0,p.jsx)(v.Z,{component:"span",variant:"body2",color:y.DG.grey[600],sx:{textTransform:"none"},children:"clear all"})})]}),(0,p.jsx)(m.Z,{spacing:3,children:(0,o.map)(t,((e,t)=>{const n=u(e),i=b.get(n)||yX;return(0,p.jsxs)(m.Z,{spacing:2,children:[t>0&&(0,p.jsx)(Ie.Z,{sx:{my:2}}),(0,p.jsxs)(m.Z,{spacing:2,children:[(0,p.jsx)(Ln.Z,{label:"Nickname",placeholder:"Certificate Nickname",value:i.nickname,onChange:e=>D(n,e.target.value),sx:{maxWidth:"450px"},required:!0,disabled:e.isEncrypted||!e.isValid}),(0,p.jsx)(Ln.Z,{label:"Description",placeholder:"What are you using this for? Where did it come from?",value:i.description,onChange:e=>M(n,e.target.value),sx:{maxWidth:"450px"},multiline:!0,rows:3,disabled:e.isEncrypted||!e.isValid}),P(e,n)]}),(0,p.jsxs)(m.Z,{direction:"row",alignItems:"flex-start",spacing:2,children:[(0,p.jsx)(vX,{parsedCert:e}),(0,p.jsx)(x.Z,{onClick:()=>R(n),sx:{mt:"125px"},children:(0,p.jsx)(fX.Z,{})})]}),L(e)]},n)}))}),(0,p.jsxs)(m.Z,{direction:"row",spacing:2,justifyContent:"flex-end",children:[(0,p.jsx)(C.Z,{onClick:r,disabled:s,children:"Cancel"}),(0,p.jsx)(C.Z,{variant:"contained",onClick:F,disabled:!_||s,startIcon:(0,p.jsx)(bX.Z,{}),children:s?"Saving...":"Save ".concat(U.length," Certificate").concat(1!==U.length?"s":"")})]})]})},wX={id:"",organizationRef:(0,mp.J5)(""),name:"",storageUrl:"",subtype:$w.AUTH},EX=".pem";function SX(e){return e.name.toLowerCase().endsWith(EX)}function DX(e){var t;return null!==(t=null===e||void 0===e?void 0:e.toLowerCase().endsWith(EX))&&void 0!==t&&t}function MX(e,t){const{sourceFileNameQueueByFingerprint:n,sourceFileNameQueueByPem:i,orphanPrivateKeySourceFileNameQueue:o}=t;if(e.sha256Fingerprint){const t=n.get(e.sha256Fingerprint),i=null===t||void 0===t?void 0:t.shift();if(i)return i}if(e.hasPrivateKey&&e.errorCode===SK&&o.length>0){const e=o.shift();if(e)return e}if(e.pem){const t=i.get(e.pem),n=null===t||void 0===t?void 0:t.shift();if(n)return n}return e.sourceFileName}function kX(e){var t,n,i,o;return[null!==(t=e.sourceFileName)&&void 0!==t?t:"",null!==(n=e.sha256Fingerprint)&&void 0!==n?n:"",null!==(i=e.errorCode)&&void 0!==i?i:"",null!==(o=e.errorMessage)&&void 0!==o?o:"",e.hasPrivateKey?"1":"0",e.pem,e.subject,e.issuer].join("|")}function IX(e,t){if(0===t.length)return e;const n=e.filter((e=>DX(e.sourceFileName))),i=e.filter((e=>!DX(e.sourceFileName))),o=function(e){const t=new Map,n=new Map,i=[];return e.forEach((e=>{if(e.sourceFileName&&e.sha256Fingerprint){var o;const n=null!==(o=t.get(e.sha256Fingerprint))&&void 0!==o?o:[];n.push(e.sourceFileName),t.set(e.sha256Fingerprint,n)}if(e.sourceFileName&&e.pem){var a;const t=null!==(a=n.get(e.pem))&&void 0!==a?a:[];t.push(e.sourceFileName),n.set(e.pem,t)}e.sourceFileName&&e.hasPrivateKey&&e.errorCode===SK&&i.push(e.sourceFileName)})),{sourceFileNameQueueByFingerprint:t,sourceFileNameQueueByPem:n,orphanPrivateKeySourceFileNameQueue:i}}(n),a=t.map((e=>({...e,sourceFileName:MX(e,o)}))),r=n.filter((e=>{return!e.isValid&&!((t=e).errorCode===EK||t.errorCode===SK);var t})),l=new Set(a.map((e=>kX(e)))),s=r.filter((e=>{const t=kX(e);return!l.has(t)&&(l.add(t),!0)}));return[...a,...s,...i]}const AX=e=>{let{certificate:t,onDeleteClick:n}=e;const r=(0,l.k6)(),{notify:s}=(0,ie.o)(),{buildOrganizationPath:d,organizationId:c,privileges:u}=(0,w.P)(),h=(0,X.u7)(),[g,x]=(0,a.useState)(!1),[f,b]=(0,a.useState)(!1),[j,Z]=(0,a.useState)([]),[D,M]=(0,a.useState)([]),[k,I]=(0,a.useState)(new Map),A=(0,E.D)(S.F.WifiNetworks),R=(0,E.D)(S.F.Certificates),T=(0,Fe.pv)((0,a.useMemo)((()=>({method:"post",path:"certificates",getDocumentUpdate:e=>{let{response:t}=e;return{collection:S.F.Certificates,id:t.id,set:t}}})),[])),P=(0,Fe.pv)((0,a.useMemo)((()=>({method:"patch",path:"certificates/:certificateId",getDocumentUpdate:e=>{let{params:t,data:n}=e;return{collection:S.F.Certificates,id:null===t||void 0===t?void 0:t.certificateId,update:n}}})),[])),L=(0,Fe.pv)({method:"get",path:"certificates/:certId/download-pem"}),N=!t,U=(0,o.filter)(A.documents,(e=>
3!!t&&(t.subtype===$w.CA?(0,o.some)(e.radiusCACertificateRefs,{id:t.id})||(0,o.some)(e.installedCACertificateRefs,{id:t.id}):(0,o.some)(e.userCertificateRefs,{id:t.id})))),F=U.length>0,[O,_]=(0,a.useState)(!F),{changes:z,addChanges:B,hasChanges:W,saveChanges:V,clearChanges:G,withChanges:H}=Ji({document:null!==t&&void 0!==t?t:wX,save:async()=>{N||await P.requestAsync({params:{certificateId:t.id},data:{...void 0!==z.name&&""!==z.name&&{name:z.name},...void 0!==z.description&&{description:z.description}}})}});(0,a.useEffect)((()=>{N&&!z.organizationRef&&B({organizationRef:(0,mp.J5)(c)})}),[N,c,z.organizationRef,B]);const q=(0,a.useCallback)((e=>{B({name:e.target.value})}),[B]),Y=(0,a.useCallback)((async(e,t)=>{b(!0),M(e);try{const t=new Map,n=(0,o.map)(e,(async e=>(t.set(e.name,e),tX(e)))),i=await Promise.all(n),a=(0,o.flatMap)(i,(e=>e)),r=e.filter(SX);if(r.length>1){const e=await Promise.all((0,o.map)(r,(e=>e.text()))),n=await KK(e.join("\n"));return Z(IX(a,n)),void I(t)}Z(a),I(t)}catch(n){(0,Si.yR)(n,{name:"parseCertificateFile error"})}finally{b(!1)}}),[]),K=(0,a.useCallback)((()=>{t&&n&&n(t)}),[t,n]),Q=(0,a.useCallback)((()=>{if(!t||t.subtype!==$w.CA)return;const e=t.pem;if(!e)return;const n=CE(e);if(0===n.length)return;const i=xE(H.name||"certificate")+".pem";(0,di.KG)({name:i,type:"application/x-pem-file",content:n})}),[t,H.name]),J=(0,a.useMemo)((()=>(null===t||void 0===t?void 0:t.subtype)===$w.CA&&(!!t.pem&&CE(t.pem).length>0)),[t]),[$,ee]=(0,a.useState)(!1),[te,ne]=(0,a.useState)(!1),oe=(0,a.useCallback)((async()=>{if(t&&t.subtype===$w.AUTH){ne(!0);try{const e=await L.requestAsync({params:{certId:t.id}}),n=xE(H.name||"certificate")+".pem";(0,di.KG)({name:n,type:"application/x-pem-file",content:e.pem}),ee(!1)}catch(n){var e;const i=(0,Fe.tf)(n);s({severity:"error",message:null!==(e=null===i||void 0===i?void 0:i.message)&&void 0!==e?e:"Error downloading certificate"}),(0,Si.yR)(n,{name:"download auth certificate pem",contexts:t?{certificate:{id:t.id}}:void 0})}finally{ne(!1)}}}),[t,L,H.name,s]),ae=(0,a.useCallback)((async()=>{x(!0);try{await V()}catch(n){var e;const i=(0,Fe.tf)(n);s({severity:"error",message:null!==(e=null===i||void 0===i?void 0:i.message)&&void 0!==e?e:"Error ".concat(N?"creating":"updating"," certificate")}),(0,Si.yR)(n,{name:"".concat(N?"create":"update"," certificate"),contexts:t?{certificate:{id:t.id}}:void 0})}finally{x(!1)}}),[V,N,t,s]),re=(0,a.useCallback)((e=>{e.preventDefault(),_((e=>!e))}),[]),le=(0,a.useCallback)((async e=>{x(!0);try{const t=(0,o.map)(e,(async e=>T.requestAsync({data:{name:e.nickname,description:e.description,subtype:e.subtype,subject:e.subject,issuer:e.issuer,validFrom:e.validFrom,validTo:e.validTo,pem:e.pem}}))),n=await Promise.all(t);s({severity:"success",message:"".concat(e.length," ").concat(1===e.length?"certificate":"certificates"," created successfully")}),M([]),Z([]);const i=n[0];i?r.push(d((e=>e.wifiNetworks.certificates.certificate),{certificateId:i.id})):r.goBack()}catch(n){var t;const e=(0,Fe.tf)(n);s({severity:"error",message:null!==(t=null===e||void 0===e?void 0:e.message)&&void 0!==t?t:"Error creating certificates"}),(0,Si.yR)(n,{name:"create certificates error"})}finally{x(!1)}}),[T,s,r,d]),se=(0,a.useCallback)((()=>{Z([]),I(new Map)}),[]);return(0,p.jsxs)(m.Z,{spacing:4,alignItems:"flex-start",sx:{paddingX:3,paddingY:3,maxWidth:1e3},children:[(0,p.jsx)(dd,{hasChanges:W&&!N}
3),!u.content&&(0,p.jsxs)(ui.Q,{children:["Content privilege required to"," ",N?"create":"edit"," Certificates."]}),!N&&(0,p.jsxs)(m.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",width:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",children:N?"Upload your certificate":"Basic Info"}),u.content&&(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"center",children:[!N&&(0,p.jsx)(bd,{hasChanges:W,savePending:g,onSaveClick:ae,onUndoAllClick:G}),(0,p.jsx)(jd,{menuItems:(0,o.compact)([J&&(0,p.jsxs)(Hi.Z,{onClick:Q,sx:{alignItems:"center"},children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(wi.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Download",sx:{marginTop:-1}})]},"download"),h&&(null===t||void 0===t?void 0:t.subtype)===$w.AUTH&&(0,p.jsxs)(Hi.Z,{onClick:()=>ee(!0),children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(wi.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Download Auth Cert"})]},"download-auth"),(0,p.jsxs)(Hi.Z,{onClick:K,children:[(0,p.jsx)(As.Z,{children:(0,p.jsx)(Gl.Z,{})}),(0,p.jsx)(Rs.Z,{primary:"Delete"})]},"delete")])})]})]}),N&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",sx:{pt:0},children:"Upload your certificate"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Upload a file that contains one or more certificates."})]}),!f&&0===j.length&&(0,p.jsx)(xX,{certificateType:$w.AUTH,onFileSelected:Y,selectedFiles:D,disabled:g||!u.content}),!f&&j.length>0&&(0,p.jsx)(ZX,{certificates:j,sourceFileMap:k,onCancel:se,onCertificatesUpdate:Z,onSave:le,saving:g,existingCertificates:R.documents})]}),!N&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.Z,{spacing:2,width:1,children:[(0,p.jsx)(Ul.z,{name:"name",label:"Nickname",placeholder:"Certificate Nickname",value:H.name||"",onChange:q,fullWidth:!0,privilege:"content"}),(0,p.jsx)(Ul.z,{name:"description",label:"Description",placeholder:"What are you using this for? Where did it come from?",value:H.description||"",onChange:e=>B({description:e.target.value}),fullWidth:!0,multiline:!0,rows:3,privilege:"content"})]}),(0,p.jsx)(Ie.Z,{sx:{width:1}}),(0,p.jsxs)(m.Z,{spacing:2,width:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:"Certificate Details"}),(0,p.jsx)(vX,{subject:null===t||void 0===t?void 0:t.subject,issuer:null===t||void 0===t?void 0:t.issuer,validFrom:null===t||void 0===t?void 0:t.validFrom,validTo:null===t||void 0===t?void 0:t.validTo,subtype:null===t||void 0===t?void 0:t.subtype,sha256Fingerprint:null===t||void 0===t?void 0:t.sha256Hash,pem:(null===t||void 0===t?void 0:t.subtype)===$w.CA?null===t||void 0===t?void 0:t.pem:void 0})]}),(0,p.jsx)(Ie.Z,{sx:{width:1}}),(0,p.jsxs)(m.Z,{spacing:2,width:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:"Usage"}),U.length>0?(0,p.jsx)(m.Z,{direction:"row",flexWrap:"wrap",sx:{gap:1},children:U.map((e=>(0,p.jsx)(ke.Z,{size:"small",icon:(0,p.jsx)(go.Z,{}),label:"".concat(e.nickname||e.ssid),onClick:()=>r.push(d((e=>e.wifiNetworks.wifiNetwork),{wifiNetworkId:e.id})),sx:{"&:active":{boxShadow:"none !important"},...y.cp.body2,cursor:"pointer",borderRadius:"5px",height:"25px",backgroundColor:y.DG.grey[100],"& .MuiChip-icon":{fontSize:16,marginLeft:"5px",height:22,color:y.DG.primary[200],marginRight:"1px"},"& .MuiChip-label":{paddingRight:"9px",fontSize:"14px",fontWeight:500}}},e.id)))}):(0,p.jsxs)(m.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,p.jsx)(qA.Z,{sx:{fontSize:8,color:y.DG.grey[400]}}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Not in use - see instructions below"})]})]}),(0,p.jsx)(Ie.Z,{sx:{width:1}}),(0,p.jsxs)(m.Z,{spacing:1,width:1,children:[(0,p.jsx)(v.Z,{variant:"subtitle1",color:"text.primary",children:H.subtype===$w.
3CA?"How to deploy this CA certificate":"How to deploy this certificate"}),(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Add the certificate to a wi-fi network used by your devices"}),(0,p.jsx)(Kn.Z,{href:"#",variant:"body2",onClick:re,sx:{cursor:"pointer"},children:O?null:"Show full instructions"}),(0,p.jsx)(qn.Z,{in:O,children:(0,p.jsxs)(m.Z,{spacing:3,sx:{pt:2,color:y.DG.grey[700]},children:[(0,p.jsx)(m.Z,{spacing:1.5,children:(0,p.jsx)(v.Z,{variant:"body1",fontWeight:500,children:"1. Go to Library > Wi-Fi Networks"})}),(0,p.jsx)(m.Z,{spacing:1.5,children:(0,p.jsx)(v.Z,{variant:"body1",fontWeight:500,children:"2. Select a Wi-Fi Network (or create a new one)"})}),(0,p.jsxs)(m.Z,{spacing:1.5,children:[(0,p.jsx)(v.Z,{variant:"body1",fontWeight:500,children:"3. Add the certificate to the correct section on the Wi-Fi network"}),(0,p.jsxs)(m.Z,{spacing:2,paddingLeft:2,children:[(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[(0,p.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:40,height:40,borderRadius:1,backgroundColor:y.DG.purple[100],flexShrink:0},children:(0,p.jsx)(fK.Z,{sx:{color:y.DG.purple[700],fontSize:24}})}),(0,p.jsx)(m.Z,{flex:1,children:(0,p.jsxs)(v.Z,{variant:"body2",children:["For ",(0,p.jsx)("strong",{children:"RADIUS server"})," authentication, add this certificate to the Wi-Fi >"," ",(0,p.jsx)("strong",{children:"Authentication"})," section"]})})]}),(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"flex-start",children:[(0,p.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:40,height:40,borderRadius:1,backgroundColor:y.DG.purple[100],flexShrink:0},children:(0,p.jsx)(bK.Z,{sx:{color:y.DG.purple[700],fontSize:24}})}),(0,p.jsx)(m.Z,{flex:1,children:(0,p.jsxs)(v.Z,{variant:"body2",children:["For"," ",(0,p.jsx)("strong",{children:"content filtering & reverse proxy"}),", add this certificate to the Wi-Fi >"," ",(0,p.jsx)("strong",{children:"Content filtering setup"})," section"]})})]})]})]}),(0,p.jsx)(m.Z,{spacing:1.5,children:(0,p.jsx)(v.Z,{variant:"body1",fontWeight:500,children:"4. Add any other certificates in the chain"})}),(0,p.jsx)(m.Z,{spacing:1.5,children:(0,p.jsx)(v.Z,{variant:"body1",fontWeight:500,children:"5. Deploy the Wi-Fi network on a configuration"})}),(0,p.jsx)(i.Z,{children:(0,p.jsxs)(Kn.Z,{href:"https://help.managexr.com/en/articles/7131251-deploying-enterprise-wi-fi-certificates-on-managexr",target:"_blank",rel:"noopener noreferrer",variant:"body2",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["Learn more about certificates and how to deploy them",(0,p.jsx)(Mu.Z,{sx:{fontSize:16,marginLeft:.5}})]})})]})})]})]}),(0,p.jsx)(Ro.Q,{title:"Download Auth Certificate",open:$,onClose:()=>ee(!1),maxWidth:"xs",leftActions:(0,p.jsx)(C.Z,{onClick:()=>ee(!1),children:"Cancel"}),rightActions:(0,p.jsx)(C.Z,{variant:"contained",onClick:oe,disabled:te,children:te?"Downloading...":"Download"}),children:(0,p.jsx)(v.Z,{variant:"body2",color:"text.secondary",children:"Auth certificates contain private keys and should be treated like passwords. Only download after receiving permission from the customer."})})]})},RX=e=>{let{documents:t,searchTerm:n,searchFields:i,sortFn:o}=e;return(0,a.useMemo)((()=>{const e=n?(0,ff.sz)({data:t,fields:i,substring:n}):t;return o?[...e].sort(o):e}),[t,n,i,o])},TX=e=>{let{certificate:t,to:n}=e;const{isInvalid:o,isExpired:a,isExpiringSoon:r,isSelfSignedAuth:l,statusColor:s,displayLabel:d}=t;return(0,p.jsx)(QV,{dense:!0,divider:!0,to:n,sx:{height:61},children:(0,p.jsxs)(m.Z,{direction:"row",spacing:1.5,alignItems:"center",width:1,children:[(0,p.jsx)(i.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",width:29,height:40,borderRadius:1,flexShrink:0,paddingLeft:"1px"},children:(0,p.jsx)(qw.Z,{sx:{color:s,fontSize:23}})}),(0,p.jsxs)(m.Z,{flex:1,minWidth:0,children:[(0,p.jsx)(v.Z,{variant:"body2",noWrap:!0,fontWeight:500,sx:{color:o||a?y.DG.error[300]:r||l?y.DG.warning[300]:"inherit"},children:t.name}),d&&(0,p.jsx)(v.Z,{variant:"caption",noWrap:!0,sx:{fontSize:10,
3color:o||a?y.DG.error[300]:r||l?y.DG.warning[300]:"text.secondary"},children:d})]})]})},t.id)},PX=["name"],LX=e=>{let{certificates:t,onDeleteClick:n,searchTerm:i}=e;const{buildOrganizationPath:r}=(0,w.P)(),l=(0,a.useCallback)(((e,t)=>(0,ze.bL)(e.name,t.name)),[]),s=RX({documents:t,searchTerm:i,searchFields:PX,sortFn:l});return(0,p.jsxs)(ii.Z,{disablePadding:!0,sx:{marginTop:-gd},children:[(0,p.jsx)(sj.Z,{sx:{color:"text.secondary",backgroundColor:"common.white",marginX:-gd,paddingLeft:gd+.375,paddingRight:gd,lineHeight:"40px",paddingTop:"20px",borderBottom:e=>"1px solid ".concat(e.palette.divider)},children:"Certificates"}),(0,o.map)(s,(e=>(0,p.jsx)(TX,{certificate:e,to:r((e=>e.wifiNetworks.certificates.certificate),{certificateId:e.id})},e.id))),(0,o.isEmpty)(s)&&(0,p.jsx)(m.Z,{paddingBottom:2,alignItems:"center",children:(0,p.jsx)(v.Z,{color:"text.secondary",children:i?"No matching Certificates":"No Certificates"})})]})},NX=e=>{let{wifiNetwork:t}=e;const{documents:n}=(0,E.D)(S.F.Configurations),i=a.useMemo((()=>(0,o.filter)(n,(e=>!!(0,o.find)(e.wifiNetworkRefs,{id:t.id})))),[n,t.id]);return(0,p.jsxs)(m.Z,{spacing:1,children:[(0,p.jsxs)(mf.h,{children:["Are you sure you want to delete"," ",(0,p.jsx)("em",{children:t.nickname||t.ssid}),"?"]}),(0,p.jsx)(QN,{configurations:i,configurationRoute:"wifiNetworks",label:"It will be removed from these configurations",emptyLabel:"It's not linked to any configurations."})]})},UX=e=>{let{wifiNetworks:t,onDeleteClick:n,onDuplicateClick:i,searchTerm:r}=e;const l=(0,Le.ye)("showCertificatesTab"),{buildOrganizationPath:s}=(0,w.P)(),d=(0,a.useCallback)(((e,t)=>{const n=(0,ze.bL)(e.ssid,t.ssid);return 0!==n?n:(0,ze.bL)(e.nickname,t.nickname)}),[]),c=RX({documents:t,searchTerm:r,searchFields:["nickname","ssid","type"],sortFn:d});return(0,p.jsxs)(ii.Z,{disablePadding:!0,sx:{marginTop:-gd},children:[(0,p.jsx)(sj.Z,{sx:{color:"text.secondary",backgroundColor:"common.white",marginX:-gd,paddingLeft:gd+.375,paddingRight:gd,lineHeight:"40px",paddingTop:l?"20px":"0px",borderBottom:e=>"1px solid ".concat(e.palette.divider)},children:"Wi-Fi Networks"}),(0,o.map)(c,(e=>(0,p.jsx)(QV,{dense:!0,divider:!0,to:s((e=>e.wifiNetworks.wifiNetwork),{wifiNetworkId:e.id}),sx:{height:61},children:(0,p.jsx)(xf,{wifiNetwork:e,onDeleteClick:n,onDuplicateClick:i})},e.id))),(0,o.isEmpty)(c)&&(0,p.jsx)(m.Z,{paddingBottom:2,alignItems:"center",children:(0,p.jsx)(v.Z,{color:"text.secondary",children:r?"No matching Wi-Fi Networks":"No Wi-Fi Networks"})})]})},FX=()=>{const{buildOrganizationPath:e}=(0,w.P)(),t=(0,Le.ye)("showCertificatesTab"),n=(0,c.$B)(c._j.organization.wifiNetworks.certificates);return(0,p.jsx)(m.Z,{direction:"row",children:(0,p.jsx)(zi.W,{privilege:"content",action:"add Wi-Fi Networks or Certificates",disableAutoSize:!0,children:(0,p.jsx)(Qc,{to:e((e=>n?e.wifiNetworks.certificates.create:e.wifiNetworks.create)),children:(0,p.jsx)(C.Z,{variant:"contained",size:"small",startIcon:(0,p.jsx)(Wn.Z,{}),children:t?"Add":"Add Wi-Fi network"})})})})},OX=()=>{const e=(0,l.k6)(),{buildOrganizationPath:t}=(0,w.P)(),n=(0,Le.ye)("showCertificatesTab"),r=(0,c.$B)(c._j.organization.wifiNetworks.certificates),s=(0,c.$B)(c._j.organization.wifiNetworks.certificates.certificate),d=!!r||!!s?"certificates":"networks",u=(0,a.useMemo)((()=>(0,o.filter)([{value:"networks",label:"Wi-Fi Networks"},n?{value:"certificates",label:"Certificates"}:null],(e=>null!==e))),[n]);return(0,p.jsx)(m.Z,{direction:"row",alignItems:"center",spacing:1,children:(0,p.jsx)(i.Z,{flex:1,minWidth:0,children:(0,p.jsx)(wG,{value:d,options:u,onChange:n=>{"networks"===n?e.push(t((e=>e.wifiNetworks))):"certificates"===n&&e.push(t((e=>e.wifiNetworks.certificates)))}})})})},_X=e=>{let{setSearchTerm:t,isOnCertificatesRoute:n}=e;const i=(0,Le.ye)("showCertificatesTab");return(0,p.jsxs)(m.Z,{spacing:1,paddingY:1,children:[i&&(0,p.jsx)(OX,{}),(0,p.jsx)(gf,{setSearchTerm:t,placeholder:n?"Search by name":"Search by nickname, SSID, or type"})]})},zX=e=>{let{open:t,onClose:n,wifiNetwork:i}=e;const o=(0,l.k6)(),{notify:r}=(0,ie.o)(),{organizationId:s,buildOrganizationPath:d}=(0,w.P)(),[c,u]=(0,a.useState)(""),[h,g]=(0,a.useState)(!1),[v,C]=(0,a.useState)(!1);(0,a.useEffect)((()=>{t&&(null!==i&&void 0!==i&&i.nickname?u("".concat(i.nickname," copy")):null!==i&&void 0!==i&&i.ssid&&u("".concat(i.ssid," copy")),g(!1))}),[i,t]);const x=async e=>{if(i)if(e&&e.preventDefault(),c.trim()){C(!0);try{const e=await(0,Fe.G2)({organizationId:s},{nickname:c,wifiNetworkId:i.id});r({severity:"success",message:"Wi-Fi network duplicated"}),n(),o.push(d((e=>e.wifiNetworks.wifiNetwork),{wifiNetworkId:e.id}))}catch(h){var t;const n=(0,Fe.tf)(h);r({severity:"error",message:null!==(t=null===n||void 0===n?void 0:n.message)&&void 0!==t?t:"Error duplicating Wi-Fi network"}),(0,Si.yR)(h,{name:"duplicate wifi network",contexts:{wifiNetwork:{id:i.id}}})}finally{C(!1)}}else g(!0)};return(0,p.jsx)(Ro.Q,{title:"Duplicate Wi-Fi Network",open:t,onClose:n,maxWidth:"xs",rightActions:[(0,p.jsx)(Un.U,{submitting:v,disabled:!c.trim()||v,onClick:x,children:"Duplicate"})],children:(0,p.jsx)("form",{onSubmit:x,noValidate:!0,autoComplete:"off",children:(0,p.jsx)(m.Z,{spacing:2,children:(0,p.jsx)(Ln.Z,{label:"Nickname",value:c,onChange:e=>{u(e.target.value),g(!e.target.value)},disabled:v,error:h,helperText:h?"Nickname is required":"",fullWidth:!0,autoFocus:!0,required:!0,placeholder:"Home network"})})})})},BX=e=>{let{wifiNetworks:t,...n}=e;const{buildOrganizationPath:i}=(0,w.P)(),a=(0,c.$B)(c._j.organization.wifiNetworks.wifiNetwork),r=null===a||void 0===a?void 0:a.params.wifiNetworkId,s=(0,o.find)(t,{id:r});return s?(0,p.jsx)(YE,{...n,wifiNetwork:s}):(0,p.jsx)(l.l_,{to:i((e=>e.wifiNetworks))})},WX=e=>{let{certificates:t,onDeleteClick:n}=e;const{buildOrganizationPath:i}=(0,w.P)(),a=(0,c.$B)(c._j.organization.wifiNetworks.certificates.certificate),r=null===a||void 0===a?void 0:a.params.certificateId,s=(0,o.find)(t,{id:r});return s?(0,p.jsx)(AX,{certificate:s,onDeleteClick:n}):(0,p.jsx)(l.l_,{to:i((e=>e.wifiNetworks.certificates))})},VX=()=>{const{notify:e}=(0,ie.o)(),{buildOrganizationPath:t,organizationId:n}=(0,w.P)(),i=(0,E.D)(S.F.WifiNetworks),r=(0,E.D)(S.F.Certificates),s=(0,Fe.pv)((0,a.useMemo)((()=>({method:"delete",path:"certificates/:certificateId",getDocumentUpdate:e=>{let{params:t}=e;return{collection:S.F.Certificates,id:null===t||void 0===t?void 0:t.certificateId,remove:!0}}})),[])),d=(0,Le.ye)("showCertificatesTab"),u=(0,c.$B)(c._j.organization.wifiNetworks.certificates),h=(0,c.$B)(c._j.organization.wifiNetworks.certificates.certificate),m=(0,c.$B)(c._j.organization.wifiNetworks.create),g=(0,c.$B)(c._j.organization.wifiNetworks.certificates.create),v=(0,a.useMemo)((()=>({onCertificatesRoute:!!u||!!h,onCreateRoute:!!m||!!g})),[u,h,m,g]),C=(0,a.useMemo)((()=>{const e=[...i.documents];return e.sort(((e,t)=>{const n=(0,ze.bL)(e.ssid,t.ssid);return 0!==n?n:(0,ze.bL)(e.nickname,t.nickname)})),e}),[i.documents]),x=(0,a.useMemo)((()=>{const e=[...r.documents];return e.sort(((e,t)=>(0,ze.bL)(e.name,t.name))),e}),[r.documents]),f=(0,a.useMemo)((()=>(0,o.map)(r.documents,(e=>{const t=pE(e),n=mE(e),i=uE(e),o="expired"===t,a=cE(e),r=e.subtype===$w.AUTH&&tE(e),l=(e=>{const t=uE(e),n="expired"===pE(e);if(t)return e.subject?e.issuer?"Invalid":"Missing issuer":"Missing subject";if(n){if(e.validTo){const t=new Date(e.validTo).toLocaleDateString("en-US",{month:"short",year:"numeric"});return"Expired ".concat(t)}return"Expired"}if(e.validTo){const t=new Date(e.validTo).toLocaleDateString("en-US",{month:"short",year:"numeric"});return"Expires ".concat(t)}return""})(e),s=l?"".concat(n," \u2022 ").concat(l):n;let d;return d=i||o?y.DG.error[300]:a||r?y.DG.warning[300]:y.DG.primary[300],{...e,displayLabel:s,statusColor:d,validityStatus:t,typeLabel:n,isInvalid:i,isExpired:o,isExpiringSoon:a,isSelfSignedAuth:r}}))),[r.documents]),[b,j]=(0,a.useState)(""),[Z,D]=(0,a.useState)({open:!1,wifiNetwork:null}),M=(0,a.useCallback)((async t=>{try{await(0,Fe.Qw)({organizationId:n,wifiNetworkId:t.id}),e({severity:"success",message:"Wi-Fi network deleted"})}catch(o){var i;const n=(0,Fe.tf)(o);e({severity:"error",message:null!==(i=null===n||void 0===n?void 0:n.message)&&void 0!==i?i:"Error deleting Wi-Fi network"}),(0,Si.yR)(o,{name:"delete wifi network",contexts:{wifiNetwork:{id:t.id}}})}}),[e,n]),k=(0,a.useCallback)((async t=>{try{await s.requestAsync({params:{certificateId:t.id}}),e({severity:"success",message:"Certificate deleted"})}catch(i){var n;const o=(0,Fe.tf)(i);e({severity:"error",message:null!==(n=null===o||void 0===o?void 0:o.message)&&void 0!==n?n:"Error deleting certificate"}),(0,Si.yR)(i,{name:"delete certificate",contexts:{certificate:{id:t.
3id}}})}}),[e,s]),I=(0,a.useCallback)((e=>{D({open:!0,wifiNetwork:e})}),[]),A=(0,a.useCallback)((()=>{D({open:!1,wifiNetwork:null})}),[]),R=Bn({title:"Delete Wi-Fi Network",onConfirm:M,getContent:e=>(0,p.jsx)(NX,{wifiNetwork:e})}),T=Bn({title:"Delete Certificate",onConfirm:k,getContent:e=>'Are you sure you want to delete "'.concat(e.name,'"?')}),P=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l.AW,{path:c._j.organization.wifiNetworks.wifiNetwork.__path,children:(0,p.jsx)(BX,{wifiNetworks:i.documents,onDeleteClick:R.trigger,onDuplicateClick:I})}),(0,p.jsx)(l.AW,{path:c._j.organization.wifiNetworks.create.__path,children:(0,p.jsx)(YE,{onDeleteClick:R.trigger,onDuplicateClick:I})}),(0,p.jsx)(l.AW,{path:c._j.organization.wifiNetworks.__path,exact:!0,children:C[0]?(0,p.jsx)(l.l_,{to:t((e=>e.wifiNetworks.wifiNetwork),{wifiNetworkId:C[0].id})}):(0,p.jsx)(l.l_,{to:t((e=>e.wifiNetworks.create))})})]}),L=(0,a.useMemo)((()=>{const e=!(d&&v.onCreateRoute),t=d&&v.onCreateRoute,n=e?d?90:70:0;let o;return o=t?(0,p.jsx)(xK,{}):v.onCertificatesRoute&&d?(0,p.jsx)(LX,{certificates:f,searchTerm:b}):(0,p.jsx)(UX,{wifiNetworks:i.documents,onDeleteClick:R.trigger,onDuplicateClick:I,searchTerm:b}),{showFilter:e,fixedSidebarHeight:n,content:o}}),[d,v.onCreateRoute,v.onCertificatesRoute,f,b,i.documents,R.trigger,I]);return(0,p.jsxs)(Mn.C,{toolbarBreadcrumbs:[{title:"Library",navCategory:!0},{title:v.onCertificatesRoute?"Certificates":"Wi-Fi Networks",path:v.onCertificatesRoute?t((e=>e.wifiNetworks.certificates)):t((e=>e.wifiNetworks))}],toolbarContent:(0,p.jsx)(FX,{}),noBottomPadding:!0,children:[(0,p.jsx)(vd,{fixedSidebarContent:L.showFilter?(0,p.jsx)(_X,{setSearchTerm:j,isOnCertificatesRoute:v.onCertificatesRoute}):null,fixedSidebarContentHeight:L.fixedSidebarHeight,sidebarContent:L.content,children:d?(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{path:c._j.organization.wifiNetworks.certificates.create.__path,children:(0,p.jsx)(AX,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.wifiNetworks.certificates.certificate.__path,children:(0,p.jsx)(WX,{certificates:r.documents,onDeleteClick:T.trigger})}),(0,p.jsx)(l.AW,{path:c._j.organization.wifiNetworks.certificates.__path,exact:!0,children:x[0]?(0,p.jsx)(l.l_,{to:t((e=>e.wifiNetworks.certificates.certificate),{certificateId:x[0].id})}):(0,p.jsx)(l.l_,{to:t((e=>e.wifiNetworks.certificates.create))})}),P]}):(0,p.jsx)(l.rs,{children:P})}),(0,p.jsx)(Fn,{...R.props}),(0,p.jsx)(Fn,{...T.props}),(0,p.jsx)(zX,{open:Z.open,onClose:A,wifiNetwork:Z.wifiNetwork})]})},GX=(0,a.memo)((e=>{let{children:t}=e;const n=(0,ye.L)(),{hasOrganizationAccess:i,setOrganization:o,organizationId:a}=(0,w.P)();return!n||i(n)?(0,p.jsx)(p.Fragment,{children:t}):(0,p.jsx)(Mn.C,{disableGlobalSearch:!0,children:(0,p.jsx)("div",{style:{paddingTop:32,display:"flex",justifyContent:"center"},children:(0,p.jsxs)(Me.Z,{style:{padding:8,width:400},children:[(0,p.jsx)(In.Z,{children:"Permission denied"}),(0,p.jsx)(An.Z,{children:(0,p.jsx)(v.Z,{children:"You need to be invited to this organization before you can access it"})}),(0,p.jsx)(Pn.Z,{children:(0,p.jsx)(C.Z,{size:"small",color:"primary",variant:"contained",onClick:()=>{o(a)},children:"Ok"})})]})})})}));var HX=n(20785);const qX=()=>{var e,t;const n=(0,l.TH)(),{buildOrganizationPath:i}=(0,w.P)(),o=null!==(e=null===(t=n.pathname.match(/^\/os(.*)$/))||void 0===t?void 0:t[1])&&void 0!==e?e:"",a=n.search,r="".concat(i()).concat(o).concat(a);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(HX.l,{showProgress:!0,hideOrganizationContextItems:!0}),(0,p.jsx)(l.l_,{to:r})]})},YX=e=>{let{from:t}=e;const n=(0,l.TH)(),i="discover"===t?"/marketplace":"/discover",o=n.pathname.replace("/".concat(t),i);return(0,p.jsx)(l.l_,{to:{...n,pathname:o}})};YX.displayName="MarketplacePathRedirect";const KX=()=>{const e=yS(),{buildOrganizationPath:t}=(0,w.P)();return"pending"===e?(0,p.jsx)(cS,{}):"quickstart"===e?((0,Ne.y)("redirect"),(0,p.jsx)(l.l_,{to:t((e=>e.quickstart))})):(0,p.jsx)(l.l_,{to:t((e=>e.dashboard))})};KX.displayName="TrialOnboardingDefaultRoute";const XX=()=>{const{buildOrganizationPath:e,organizationId:t,user:n}=(0,w.P)(),m=(0,l.TH)(),g=(0,a.useRef)(t);g.current=t;const v=(0,a.useRef)(n.id);v.current=n.id,(0,a.useEffect)((()=>{"/"===m.pathname||m.pathname.startsWith("/auth")||(0,b.A_)(m.pathname,g.current,v.current)}),[m.pathname]);const C=(0,Le.S5)(),x=(0,Le.ye)("enableMarketplaceRename"),f=(0,Le.IQ)(),y=(0,Le.iA)(),j=bS(),Z=(0,d.Yt)(),E=hS(),S=pS(),{instantApps:D}=(0,Ue.J)(),M=(0,u.v9)((e=>e.ui.app.showFeatureFlagOverlay)),k=(0,u.I0)(),I=(0,u.v9)((e=>e.ui.app.onboardingOverlay)),A=(0,a.useCallback)((()=>{FZ(t),k(Te.dV.actions.onboardingOverlaySet("dismissed"))}),[k,t]);return(0,p.jsxs)(i.Z,{sx:{display:"flex"},children:[(0,p.jsx)(be,{}),(0,p.jsx)($,{}),(0,p.jsx)(s.H,{disableMarketplace:C,hideAnalyticsPage:f,hideRooms:y,trialOnboardingVariant:j,showTrialOnboardingEntries:Z&&E.showOnboarding,canOpenTrialOnboarding:S}),M&&(0,p.jsx)(Pe,{}),"open"===I&&(0,p.jsx)(dS,{variant:"fullscreen",onClose:A},t),(0,p.jsx)(r.ql,{children:(0,p.jsx)("title",{children:"ManageXR"})}),(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{path:c._j.organizationStatic.__path,children:(0,p.jsx)(qX,{})}),(0,p.jsx)(l.AW,{path:c._j.organization.__path,children:(0,p.jsx)(h,{children:(0,p.jsx)(Xn.n,{children:(0,p.jsx)(GX,{
3children:(0,p.jsx)(vk,{children:(0,p.jsxs)(l.rs,{children:[(0,p.jsx)(l.AW,{path:c._j.organization.dashboard.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(nM,{})})}),(0,p.jsx)(l.AW,{path:c._j.organization.quickstart.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(aM,{})})}),(0,p.jsx)(l.AW,{path:c._j.organization.devices.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(qN,{})})}),(0,p.jsx)(l.AW,{path:c._j.organization.configurations.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(Lb,{})})}),(0,p.jsx)(l.AW,{path:c._j.organization.vrContent.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(CK,{})})}),(0,p.jsx)(l.AW,{path:c._j.organization.files.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(yU,{})})}),(0,p.jsx)(l.AW,{path:c._j.organization.wifiNetworks.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(VX,{})})}),!f&&(0,p.jsx)(l.AW,{path:c._j.organization.analytics.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(Ws,{})})}),!y&&(0,p.jsx)(l.AW,{path:c._j.organization.rooms.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(Az,{})})}),(0,p.jsx)(l.AW,{path:c._j.organization.settings.__path,children:(0,p.jsx)($V,{})}),!C&&(0,p.jsx)(l.AW,{path:x?c._j.organization.marketplaceRenamed.__path:c._j.organization.marketplace.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(e_,{})})}),!C&&(0,p.jsx)(l.AW,{path:x?c._j.organization.marketplace.__path:c._j.organization.marketplaceRenamed.__path,children:(0,p.jsx)(YX,{from:x?"discover":"marketplace"})}),!C&&!(0,o.isEmpty)(D)&&(0,p.jsx)(l.AW,{path:c._j.organization.connect.__path,children:(0,p.jsx)(je,{children:(0,p.jsx)(Sj,{})})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(KX,{})})]})})})})})}),(0,p.jsx)(l.AW,{path:c._j.userSettings.__path,children:(0,p.jsx)(tG,{})}),(0,p.jsx)(l.AW,{path:c._j.superTools.__path,children:(0,p.jsx)(fH,{})}),(0,p.jsx)(l.AW,{children:(0,p.jsx)(l.l_,{to:e((e=>e))})})]})]})},QX=()=>(0,p.jsx)(X.Ho,{children:(0,p.jsx)(w.h,{children:(0,p.jsx)(GC,{children:(0,p.jsx)(d.f0,{children:(0,p.jsx)(XX,{})})})})})},11015:(e,t,n)=>{"use strict";n.d(t,{uO:()=>p});var i=n(20068),o=n(53767),a=n(20890),r=n(22522),l=n(34550),s=n(80184);const d="Your network is interfering with device streaming, we recommend contacting your network administrator. Click this alert to open a network test in a new tab",c="".concat(d),u="Please restart this headset to switch to our legacy streaming service. ".concat(d),p=e=>{let{showLabel:t=!1,showRestartInstruction:n=!1,sx:d}=e;return(0,s.jsx)(i.Z,{arrow:!0,title:n?u:c,children:(0,s.jsxs)(o.Z,{component:"a",href:(0,r.LT)(r._j.networkTest),target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),"data-testid":"stream-livekit-legacy-alert",direction:"row",spacing:.5,alignItems:"center",sx:{cursor:"pointer",color:"inherit",textDecoration:"none",flexShrink:0,...d},children:[(0,s.jsx)(l.Z,{color:"warning",fontSize:"small"}),t&&(0,s.jsx)(a.Z,{variant:"caption",fontWeight:600,noWrap:!0,children:"Limited"})]})})};p.displayName="StreamLivekitLegacyAlert"},63550:(e,t,n)=>{"use strict";n.d(t,{P:()=>r});var i=n(72791),o=n(5300),a=n(82373);const r=(e,t,n)=>{const r=(0,a.ye)("enableLivekitAutoFallback"),{isDeviceForcedLegacy:l,forceLegacyForDevice:s}=(0,o.S)(),d=l(e);(0,i.useEffect)((()=>{r&&t&&n&&!d&&s(e)}),[r,e,t,n,d,s])}},61983:(e,t,n)=>{"use strict";n.d(t,{b:()=>l});var i=n(72791),o=n(5300),a=n(82373);const r=new Set(["error_command_processed_not_connected","error_command_not_processed","error_connection","error_failed_to_start"]),l=(e,t,n)=>{const l=(0,a.ye)("enableLivekitAutoFallback"),{isRecheckPending:s,clearRecheck:d,forceLegacyForDevice:c}=(0,o.S)(),u=s(e);(0,i.useEffect)((()=>{t&&u&&("connected"===n?d(e):l&&r.has(n)&&c(e))}),[t,u,n,l,e,d,c])}},25819:()=>{}}]); 4//# sourceMappingURL=252.ea6af182.chunk.js.map 5//# debugId=565999b7-007b-5832-9cb2-391ede08d8fe
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.