@access-ci/ui 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access-ci-ui.bundle.js +2 -2
- package/dist/access-ci-ui.js +1 -1
- package/dist/access-ci-ui.umd.cjs +2 -2
- package/dist/{access-qa-bot-B5rREVFN.js → access-qa-bot-BvygsUcK.js} +14 -10
- package/dist/{icon-O_INIAmy.js → icon-B0cQKa3s.js} +1 -1
- package/dist/{index-nJ8fTwBb.js → index-B1qdYKlx.js} +2 -2
- package/dist/{resource-group-detail-iTKyGKxd.js → resource-group-detail-BX_q1Q8n.js} +2 -2
- package/dist/{resource-home-DntoKl3s.js → resource-home-Cf6Gx_B5.js} +2 -2
- package/package.json +2 -2
|
@@ -39,7 +39,7 @@ var AccessCiUi=(()=>{var Bf=Object.defineProperty;var gk=Object.getOwnPropertyDe
|
|
|
39
39
|
background-color: #0000001a !important;
|
|
40
40
|
opacity: 1 !important;
|
|
41
41
|
}
|
|
42
|
-
`),Se.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${r?"qa-bot-header-login-button":""} ${e}`,style:{...o,...n}},"Log In"))},c3=()=>(_.useEffect(()=>{let t=a=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(a.key))return;let l=document.activeElement;if(l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.contentEditable==="true"||l.classList.contains("rcb-chat-input-textarea")))return;let c=document.querySelector(".rcb-chat-window");if(!c)return;let u=Array.from(c.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(p=>p.offsetParent!==null);if(u.length>0){let p=u[u.length-1].querySelector(".rcb-checkbox-container");if(p&&p.offsetParent!==null){let A=Array.from(p.querySelectorAll(".rcb-checkbox-row-container")),b=p.querySelector(".rcb-checkbox-next-button");if(A.length>0){let y=[...A];return b&&y.push(b),void((k,w)=>{k.preventDefault();let S=-1;for(let T=0;T<w.length;T++)if(w[T]===document.activeElement||w[T].contains(document.activeElement)){S=T;break}S===-1&&(S=0);let M=S;switch(k.key){case"ArrowDown":case"ArrowRight":M=S<w.length-1?S+1:0;break;case"ArrowUp":case"ArrowLeft":M=S>0?S-1:w.length-1;break;case"Home":M=0;break;case"End":M=w.length-1;break;case"Enter":case" ":{let T=w[S],P=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void T.dispatchEvent(P)}default:return}w[M].focus(),w[M].setAttribute("tabindex","0"),w[M].classList.add("keyboard-focused"),w.forEach((T,P)=>{P!==M&&(T.setAttribute("tabindex","-1"),T.classList.remove("keyboard-focused"))})})(a,y)}}}let d=[];if(u.length>0){let p=u[u.length-1],A=Array.from(p.querySelectorAll(".rcb-options-container")).filter(b=>b.offsetParent!==null);if(A.length>0){let b=A[A.length-1];d=Array.from(b.querySelectorAll(".rcb-options"))}}if(d.length===0)return;let f=d.findIndex(p=>p===document.activeElement);switch(a.key){case"ArrowDown":case"ArrowRight":{let p;a.preventDefault(),p=f<d.length-1?f+1:0,d[p].setAttribute("tabindex","0"),d.forEach((A,b)=>{b!==p&&(A.setAttribute("tabindex","-1"),A.classList.remove("keyboard-focused"))}),d[p].classList.add("keyboard-focused"),d[p].focus();break}case"ArrowUp":case"ArrowLeft":{let p;a.preventDefault(),p=f>0?f-1:d.length-1,d[p].setAttribute("tabindex","0"),d.forEach((A,b)=>{b!==p&&(A.setAttribute("tabindex","-1"),A.classList.remove("keyboard-focused"))}),d[p].classList.add("keyboard-focused"),d[p].focus();break}case"Enter":case" ":if(a.preventDefault(),document.activeElement&&d.includes(document.activeElement)){let p=document.activeElement;if(p.classList.contains("rcb-checkbox-row-container")||p.closest(".rcb-checkbox-row-container")){let A=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});p.dispatchEvent(A);let b=p.querySelector(".rcb-checkbox-label"),y=b?b.textContent:p.textContent||"checkbox",k=p.querySelector(".rcb-checkbox-mark"),w=k&&k.style.backgroundColor?"checked":"unchecked";e(`${y} ${w}`)}else{let A=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});p.dispatchEvent(A);let b=p.textContent||p.innerText;e(`Selected: ${b}`)}}break;case"Home":a.preventDefault(),d.length>0&&(d[0].setAttribute("tabindex","0"),d.forEach((p,A)=>{A!==0&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),d[0].classList.add("keyboard-focused"),d[0].focus());break;case"End":if(a.preventDefault(),d.length>0){let p=d.length-1;d[p].setAttribute("tabindex","0"),d.forEach((A,b)=>{b!==p&&(A.setAttribute("tabindex","-1"),A.classList.remove("keyboard-focused"))}),d[p].classList.add("keyboard-focused"),d[p].focus()}}},e=a=>{let l=document.createElement("div");l.setAttribute("aria-live","assertive"),l.setAttribute("aria-atomic","true"),l.className="sr-only",l.textContent=a,document.body.appendChild(l),setTimeout(()=>{document.body.contains(l)&&document.body.removeChild(l)},1e3)},n=(a=null)=>{let l=a;if(l||(l=document.querySelector(".rcb-chat-window"),l||(l=document.querySelector('[class*="rcb-chat"]')),l||(l=document.querySelector(".qa-bot"))),!l)return;let c=l.closest(".embedded-qa-bot")!==null,u=Array.from(l.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(A=>A.offsetParent!==null);if(u.length===0)return;let d=u[u.length-1],f=Array.from(d.querySelectorAll(".rcb-options-container")).filter(A=>A.offsetParent!==null),p=[];if(f.length>0){let A=f[f.length-1];p=Array.from(A.querySelectorAll(".rcb-options"))}if(p.length===0){let A=d.querySelector(".rcb-checkbox-container");if(!A&&l&&(A=l.querySelector(".rcb-checkbox-container")),A&&A.offsetParent!==null){let b=Array.from(A.querySelectorAll(".rcb-checkbox-row-container")).filter(y=>y.offsetParent!==null&&y.style.display!=="none");if(b.length>0){let y=A.querySelector(".rcb-checkbox-next-button"),k=[...b];if(y&&y.offsetParent!==null&&k.push(y),k.forEach((w,S)=>{w.setAttribute("tabindex",S===0?"0":"-1"),S===0?w.classList.add("keyboard-focused"):w.classList.remove("keyboard-focused")}),b.length>1){A.querySelectorAll(".keyboard-nav-hint").forEach(S=>S.remove());let w=document.createElement("div");w.className="keyboard-nav-hint",w.textContent="Use arrow keys \u2195 to navigate, Enter to select/deselect, or click any option",w.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",A.insertBefore(w,A.firstChild)}return void setTimeout(()=>{k[0]&&k[0].offsetParent!==null&&!c&&k[0].focus()},150)}}}if(p.length>0){if(p.forEach((A,b)=>{let y=b===0?"0":"-1";A.setAttribute("tabindex",y),A.setAttribute("role","option"),A.setAttribute("aria-posinset",b+1),A.setAttribute("aria-setsize",p.length),b===0?A.classList.add("keyboard-focused"):A.classList.remove("keyboard-focused")}),p.length>1){let A=f.length>0?f[f.length-1]:null;if(A){A.querySelectorAll(".keyboard-nav-hint").forEach(y=>y.remove());let b=document.createElement("div");b.className="keyboard-nav-hint",b.textContent="Use arrow keys \u2195 to navigate, Enter to select, or click any option",b.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",A.insertBefore(b,A.firstChild)}}else{let A=f.length>0?f[f.length-1]:null;A&&A.querySelectorAll(".keyboard-nav-hint").forEach(b=>b.remove())}setTimeout(()=>{p[0]&&p[0].offsetParent!==null&&!c&&(p[0].focus(),p.length>1&&e(`${p.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(a=>{a.forEach(l=>{if(l.type==="childList"){let c=Array.from(l.addedNodes),u=c.some(f=>f.nodeType===Node.ELEMENT_NODE&&(f.classList?.contains("rcb-options-container")||f.classList?.contains("rcb-options")||f.querySelector?.(".rcb-options-container")||f.querySelector?.(".rcb-options"))),d=c.some(f=>f.nodeType===Node.ELEMENT_NODE&&(f.classList?.contains("rcb-checkbox-container")||f.querySelector?.(".rcb-checkbox-container")));if(u||d){let f=l.target;for(;f&&!f.classList?.contains("qa-bot")&&!f.classList?.contains("rcb-chat-window");)f=f.parentElement;(f||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(p=>{p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused")}),setTimeout(()=>n(f),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",t),n();let o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(a=>{let l=a.querySelectorAll(".rcb-options-container .rcb-options").length>0,c=a.querySelectorAll(".rcb-checkbox-row-container").length>0;if(l){let u=a.querySelectorAll(".rcb-options[tabindex]").length;a.querySelectorAll(".rcb-options").length>u&&n(a)}if(c){let u=a.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;a.querySelectorAll(".rcb-checkbox-row-container").length>u&&n(a)}})},1e3);return()=>{document.removeEventListener("keydown",t),r.disconnect(),clearInterval(o)}},[]),null),Jy=t=>(console.error("Bot error:",t),t&&t.error,Kt.ERRORS.API_UNAVAILABLE),Zy=t=>!t||typeof t!="string"?t:t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+(?![)\\]])`,"gi"),e=>{let n=e,r="",o=n.match(/([.,;:!?]+)$/);return o&&(r=o[1],n=n.slice(0,-r.length)),`[${n}](${n})${r}`}),u3=({sessionId:t,apiKey:e})=>{let n=null;return{go_ahead_and_ask:{message:"Please type your question about ACCESS below.",path:"qa_loop"},qa_loop:{message:async r=>{let{userInput:o}=r;if(o==="\u{1F44D} Helpful"||o==="\u{1F44E} Not helpful"){if(e&&t&&n){let a={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o==="\u{1F44D} Helpful"?1:0},l=typeof process<"u"&&process.env?.REACT_APP_RATING_ENDPOINT?process.env.REACT_APP_RATING_ENDPOINT:Kt.RATING_ENDPOINT;try{await fetch(l,{method:"POST",headers:a})}catch(c){console.error("Error sending feedback:",c)}}return"Thanks for the feedback! Ask another question about ACCESS or start a new chat."}try{let a=Op();n=a;let l={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":a},c=await fetch(typeof process<"u"&&process.env?.REACT_APP_API_ENDPOINT?process.env.REACT_APP_API_ENDPOINT:Kt.API_ENDPOINT,{method:"POST",headers:l,body:JSON.stringify({query:o})}),u=(await c.json()).response,d=Zy(u);return await r.injectMessage(d),setTimeout(async()=>{await r.injectMessage("Ask another question about ACCESS or start a new chat.")},100),null}catch(a){return console.error("Error in bot flow:",a),Jy(a)}},renderMarkdown:["BOT"],options:r=>r.userInput==="\u{1F44D} Helpful"||r.userInput==="\u{1F44E} Not helpful"?[]:["\u{1F44D} Helpful","\u{1F44E} Not helpful"],chatDisabled:!1,path:"qa_loop"}}},d3=({sessionId:t,apiKey:e})=>{let n=null;return{metrics_intro:{message:`Please type your question about usage and performance metrics (XDMoD) below. You can see some <a target="_blank" href="${Kt.METRICS_QUESTIONS_URL}">examples here</a>.`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async r=>{let{userInput:o}=r;if(o==="\u{1F44D} Helpful"||o==="\u{1F44E} Not helpful"){if(e&&t&&n){let a={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o==="\u{1F44D} Helpful"?1:0},l=typeof process<"u"&&process.env?.REACT_APP_METRICS_RATING_ENDPOINT?process.env.REACT_APP_METRICS_RATING_ENDPOINT:Kt.METRICS_RATING_ENDPOINT;try{await fetch(l,{method:"POST",headers:a})}catch(c){console.error("Error sending metrics feedback:",c)}}return"Thanks for the feedback! Ask another question about usage and performance metrics (XDMoD) or start a new chat."}try{let a=Op();n=a;let l={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":a},c=await fetch(typeof process<"u"&&process.env?.REACT_APP_METRICS_API_ENDPOINT?process.env.REACT_APP_METRICS_API_ENDPOINT:Kt.METRICS_API_ENDPOINT,{method:"POST",headers:l,body:JSON.stringify({query:o})}),u=(await c.json()).response,d=Zy(u);return await r.injectMessage(d),setTimeout(async()=>{await r.injectMessage("Ask another question about usage and performance metrics (XDMoD) or start a new chat.")},100),null}catch(a){return console.error("Error in metrics flow:",a),Jy(a)}},renderMarkdown:["BOT"],options:r=>r.userInput==="\u{1F44D} Helpful"||r.userInput==="\u{1F44E} Not helpful"?[]:["\u{1F44D} Helpful","\u{1F44E} Not helpful"],chatDisabled:!1,path:"metrics_loop"}}},h3=t=>Se.createElement(Xy,t,Se.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),Se.createElement("polyline",{points:"17 8 12 3 7 8"}),Se.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),$y=({onFileUpload:t})=>{let[e,n]=_.useState(!1),[r,o]=_.useState([]),[a,l]=_.useState(null),c=_.useRef(null),{captureScreenshot:u,isCapturing:d,isScreenCaptureAvailable:f}=(()=>{let[w,S]=_.useState(!1),M=()=>typeof navigator<"u"&&navigator.mediaDevices&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!M())throw new Error("Screen capture is not available in this environment");try{S(!0);let T=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",logicalSurface:!0,width:{ideal:1920},height:{ideal:1080}},audio:!1}),P=document.createElement("video");P.srcObject=T,await new Promise(G=>{P.onloadedmetadata=()=>{P.play(),G()}});let R=document.createElement("canvas");R.width=P.videoWidth,R.height=P.videoHeight,R.getContext("2d").drawImage(P,0,0,R.width,R.height);let F=await new Promise(G=>R.toBlob(G,"image/png")),V=new Date().toISOString().replace(/[:.]/g,"-"),U=new File([F],`screenshot-${V}.png`,{type:"image/png"});return T.getTracks().forEach(G=>G.stop()),S(!1),U}catch(T){throw console.error("Error capturing screenshot:",T),S(!1),T}},isCapturing:w,isScreenCaptureAvailable:M()}})(),p=w=>{let S=document.createElement("div");S.setAttribute("aria-live","assertive"),S.setAttribute("aria-atomic","true"),S.className="sr-only",S.textContent=w,document.body.appendChild(S),setTimeout(()=>document.body.removeChild(S),1e3)},A=w=>{if(!w||!w.length||w.length===0)return void console.warn("FileUploadComponent: No valid files provided to handleFiles");let S;try{S=Array.from(w)}catch(R){return console.error("FileUploadComponent: Error converting files to array:",R),void p("Error processing selected files. Please try again.")}let M=[...r,...S];o(M);let T=S.length,P=S.map(R=>R.name).join(", ");p(`${T} file${T>1?"s":""} selected: ${P}`),setTimeout(()=>{let R=document.querySelector(".rcb-chat-content");R&&(R.scrollTop=R.scrollHeight)},100),t&&t(M)},b=w=>{w.preventDefault(),w.stopPropagation(),w.type==="dragenter"||w.type==="dragover"?n(!0):w.type==="dragleave"&&n(!1)},y=()=>{try{c.current&&c.current.click()}catch(w){console.error("FileUploadComponent: Error in handleButtonClick:",w),p("Error opening file selection dialog. Please try again.")}},k=()=>{l(null)};return Se.createElement("div",{className:"file-upload-container",style:{padding:"16px",margin:"8px 0"}},f&&Se.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},Se.createElement("button",{onClick:w=>{w.preventDefault(),(async()=>{try{let S=await u();A([S]),p("Screenshot captured successfully")}catch{p("Error capturing screenshot. Please try again.")}})()},disabled:d,"aria-describedby":"screenshot-help","aria-label":d?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:d?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},Se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Se.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),Se.createElement("circle",{cx:"12",cy:"13",r:"4"})),d?"Taking screenshot...":"Take screenshot..."),Se.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),Se.createElement("div",{className:"file-upload-dropzone "+(e?"active":""),onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:w=>{w.preventDefault(),w.stopPropagation(),n(!1);try{w.dataTransfer&&w.dataTransfer.files&&w.dataTransfer.files.length>0&&A(w.dataTransfer.files)}catch(S){console.error("FileUploadComponent: Error in handleDrop:",S),p("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:w=>{w.key!=="Enter"&&w.key!==" "||(w.preventDefault(),y())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:e?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},Se.createElement("input",{ref:c,type:"file",className:"file-input",onChange:w=>{try{w.target&&w.target.files&&w.target.files.length>0&&A(w.target.files)}catch(S){console.error("FileUploadComponent: Error in handleFileSelect:",S),p("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:"image/*,application/pdf,text/*,.doc,.docx"}),Se.createElement("div",{className:"upload-content",onClick:y,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},Se.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},Se.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},Se.createElement(h3,null),Se.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),Se.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. Accepted: Images, PDFs, Text files (Max 10MB each)")),r.length>0&&Se.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},Se.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),r.map((w,S)=>Se.createElement("span",{key:S,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:M=>{M.stopPropagation(),(T=>{l(T)})(w)}},Se.createElement("span",{onClick:M=>{M.stopPropagation(),(T=>{let P=r.filter((R,F)=>F!==T);o(P),t&&t(P)})(S)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${w.name}`},"\xD7"),w.name," (",(w.size/1024).toFixed(1)," KB)"))))),(()=>{if(!a)return null;let w=a.type.startsWith("image/"),S=a.type.startsWith("text/"),M=a.type==="application/pdf";return Se.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:k},Se.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:T=>T.stopPropagation()},Se.createElement("button",{onClick:k,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"\xD7"),Se.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},a.name),w&&Se.createElement("img",{src:URL.createObjectURL(a),alt:a.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),S&&Se.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(a)),M&&Se.createElement("iframe",{src:URL.createObjectURL(a),style:{width:"100%",height:"70vh",border:"none"},title:a.name}),!w&&!S&&!M&&Se.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())},ev=async(t,e="support",n=[])=>{let r={support:17,general_help:17,feedback:17,loginAccess:30,loginProvider:31,security:26},o={serviceDeskId:e==="security"?3:2,requestTypeId:r[e]||r.support,requestFieldValues:{...t}};if(n&&n.length>0){let a=await Promise.all(n.map(async l=>new Promise((c,u)=>{let d=new FileReader;d.onload=()=>{let f=d.result.split(",")[1];c({fileName:l.name,contentType:l.type,size:l.size,fileData:f})},d.onerror=()=>u(new Error(`Failed to read file ${l.name}`)),d.readAsDataURL(l)})));o.attachments=a}return o},tv=async(t,e)=>{let n=Kt.netlifyBaseUrl.replace("/.netlify/functions/","").replace("/.netlify/functions",""),r;r=e==="create-support-ticket"?`${n}/api/v1/tickets`:e==="create-security-incident"?`${n}/api/v1/security-incidents`:`${Kt.netlifyBaseUrl}/${e}`;try{let o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let a="";try{let l=await o.text();console.error("| \u274C Post data to proxy failed:",o.status,l);try{let c=JSON.parse(l);a=c.message||c.error||l}catch{a=l}}catch{a=`HTTP ${o.status} ${o.statusText}`}return o.status===403?a="The ticket service is temporarily unavailable. Please try again later or contact support directly.":o.status===404?a="Ticket service not found. Please try again later.":o.status===500?a="Server error. Please try again later.":o.status===401&&(a="Authentication error with the ticket service. Please contact support."),{success:!1,status:o.status,error:a}}return{success:!0,data:await o.json()}}catch(o){return console.error("| \u274C Post data to proxy exception:",o),{success:!1,error:o.message}}},Jf=(t,e)=>Se.createElement($y,{onFileUpload:n=>t({...e||{},uploadedFiles:n})}),Zf=t=>{let e=null;return{submitTicket:async(n,r,o=[])=>{try{let a=await ev(n,r,o),l=await tv(a,"create-support-ticket");l.success?(e={success:!0,ticketKey:l.data.data.ticketKey,ticketUrl:l.data.data.ticketUrl},t(c=>({...c,ticketKey:l.data.data.ticketKey,ticketUrl:l.data.data.ticketUrl}))):(console.error(`| \u274C ${r} ticket creation failed:`,l),e={success:!1,error:l.error||"Unknown error"},t(c=>({...c,submissionError:l.error||"Unknown error"})))}catch(a){console.error(`| \u274C Error sending ${r} data to proxy:`,a),e={success:!1,error:a.message},t(l=>({...l,submissionError:a.message}))}},getSubmissionResult:()=>e}},$f=(t,e="ticket")=>t?t.success?t.ticketUrl&&t.ticketKey?`Your ${e} has been submitted successfully.
|
|
42
|
+
`),Se.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${r?"qa-bot-header-login-button":""} ${e}`,style:{...o,...n}},"Log In"))},c3=()=>(_.useEffect(()=>{let t=a=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(a.key))return;let l=document.activeElement;if(l&&(l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.contentEditable==="true"||l.classList.contains("rcb-chat-input-textarea")))return;let c=document.querySelector(".rcb-chat-window");if(!c)return;let u=Array.from(c.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(p=>p.offsetParent!==null);if(u.length>0){let p=u[u.length-1].querySelector(".rcb-checkbox-container");if(p&&p.offsetParent!==null){let A=Array.from(p.querySelectorAll(".rcb-checkbox-row-container")),b=p.querySelector(".rcb-checkbox-next-button");if(A.length>0){let y=[...A];return b&&y.push(b),void((k,w)=>{k.preventDefault();let S=-1;for(let T=0;T<w.length;T++)if(w[T]===document.activeElement||w[T].contains(document.activeElement)){S=T;break}S===-1&&(S=0);let M=S;switch(k.key){case"ArrowDown":case"ArrowRight":M=S<w.length-1?S+1:0;break;case"ArrowUp":case"ArrowLeft":M=S>0?S-1:w.length-1;break;case"Home":M=0;break;case"End":M=w.length-1;break;case"Enter":case" ":{let T=w[S],P=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void T.dispatchEvent(P)}default:return}w[M].focus(),w[M].setAttribute("tabindex","0"),w[M].classList.add("keyboard-focused"),w.forEach((T,P)=>{P!==M&&(T.setAttribute("tabindex","-1"),T.classList.remove("keyboard-focused"))})})(a,y)}}}let d=[];if(u.length>0){let p=u[u.length-1],A=Array.from(p.querySelectorAll(".rcb-options-container")).filter(b=>b.offsetParent!==null);if(A.length>0){let b=A[A.length-1];d=Array.from(b.querySelectorAll(".rcb-options"))}}if(d.length===0)return;let f=d.findIndex(p=>p===document.activeElement);switch(a.key){case"ArrowDown":case"ArrowRight":{let p;a.preventDefault(),p=f<d.length-1?f+1:0,d[p].setAttribute("tabindex","0"),d.forEach((A,b)=>{b!==p&&(A.setAttribute("tabindex","-1"),A.classList.remove("keyboard-focused"))}),d[p].classList.add("keyboard-focused"),d[p].focus();break}case"ArrowUp":case"ArrowLeft":{let p;a.preventDefault(),p=f>0?f-1:d.length-1,d[p].setAttribute("tabindex","0"),d.forEach((A,b)=>{b!==p&&(A.setAttribute("tabindex","-1"),A.classList.remove("keyboard-focused"))}),d[p].classList.add("keyboard-focused"),d[p].focus();break}case"Enter":case" ":if(a.preventDefault(),document.activeElement&&d.includes(document.activeElement)){let p=document.activeElement;if(p.classList.contains("rcb-checkbox-row-container")||p.closest(".rcb-checkbox-row-container")){let A=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});p.dispatchEvent(A);let b=p.querySelector(".rcb-checkbox-label"),y=b?b.textContent:p.textContent||"checkbox",k=p.querySelector(".rcb-checkbox-mark"),w=k&&k.style.backgroundColor?"checked":"unchecked";e(`${y} ${w}`)}else{let A=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});p.dispatchEvent(A);let b=p.textContent||p.innerText;e(`Selected: ${b}`)}}break;case"Home":a.preventDefault(),d.length>0&&(d[0].setAttribute("tabindex","0"),d.forEach((p,A)=>{A!==0&&(p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused"))}),d[0].classList.add("keyboard-focused"),d[0].focus());break;case"End":if(a.preventDefault(),d.length>0){let p=d.length-1;d[p].setAttribute("tabindex","0"),d.forEach((A,b)=>{b!==p&&(A.setAttribute("tabindex","-1"),A.classList.remove("keyboard-focused"))}),d[p].classList.add("keyboard-focused"),d[p].focus()}}},e=a=>{let l=document.createElement("div");l.setAttribute("aria-live","assertive"),l.setAttribute("aria-atomic","true"),l.className="sr-only",l.textContent=a,document.body.appendChild(l),setTimeout(()=>{document.body.contains(l)&&document.body.removeChild(l)},1e3)},n=(a=null)=>{let l=a;if(l||(l=document.querySelector(".rcb-chat-window"),l||(l=document.querySelector('[class*="rcb-chat"]')),l||(l=document.querySelector(".qa-bot"))),!l)return;let c=l.closest(".embedded-qa-bot")!==null,u=Array.from(l.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(A=>A.offsetParent!==null);if(u.length===0)return;let d=u[u.length-1],f=Array.from(d.querySelectorAll(".rcb-options-container")).filter(A=>A.offsetParent!==null),p=[];if(f.length>0){let A=f[f.length-1];p=Array.from(A.querySelectorAll(".rcb-options"))}if(p.length===0){let A=d.querySelector(".rcb-checkbox-container");if(!A&&l&&(A=l.querySelector(".rcb-checkbox-container")),A&&A.offsetParent!==null){let b=Array.from(A.querySelectorAll(".rcb-checkbox-row-container")).filter(y=>y.offsetParent!==null&&y.style.display!=="none");if(b.length>0){let y=A.querySelector(".rcb-checkbox-next-button"),k=[...b];if(y&&y.offsetParent!==null&&k.push(y),k.forEach((w,S)=>{w.setAttribute("tabindex",S===0?"0":"-1"),S===0?w.classList.add("keyboard-focused"):w.classList.remove("keyboard-focused")}),b.length>1){A.querySelectorAll(".keyboard-nav-hint").forEach(S=>S.remove());let w=document.createElement("div");w.className="keyboard-nav-hint",w.textContent="Use arrow keys \u2195 to navigate, Enter to select/deselect, or click any option",w.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",A.insertBefore(w,A.firstChild)}return void setTimeout(()=>{k[0]&&k[0].offsetParent!==null&&!c&&k[0].focus()},150)}}}if(p.length>0){if(p.forEach((A,b)=>{let y=b===0?"0":"-1";A.setAttribute("tabindex",y),A.setAttribute("role","option"),A.setAttribute("aria-posinset",b+1),A.setAttribute("aria-setsize",p.length),b===0?A.classList.add("keyboard-focused"):A.classList.remove("keyboard-focused")}),p.length>1){let A=f.length>0?f[f.length-1]:null;if(A){A.querySelectorAll(".keyboard-nav-hint").forEach(y=>y.remove());let b=document.createElement("div");b.className="keyboard-nav-hint",b.textContent="Use arrow keys \u2195 to navigate, Enter to select, or click any option",b.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",A.insertBefore(b,A.firstChild)}}else{let A=f.length>0?f[f.length-1]:null;A&&A.querySelectorAll(".keyboard-nav-hint").forEach(b=>b.remove())}setTimeout(()=>{p[0]&&p[0].offsetParent!==null&&!c&&(p[0].focus(),p.length>1&&e(`${p.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(a=>{a.forEach(l=>{if(l.type==="childList"){let c=Array.from(l.addedNodes),u=c.some(f=>f.nodeType===Node.ELEMENT_NODE&&(f.classList?.contains("rcb-options-container")||f.classList?.contains("rcb-options")||f.querySelector?.(".rcb-options-container")||f.querySelector?.(".rcb-options"))),d=c.some(f=>f.nodeType===Node.ELEMENT_NODE&&(f.classList?.contains("rcb-checkbox-container")||f.querySelector?.(".rcb-checkbox-container")));if(u||d){let f=l.target;for(;f&&!f.classList?.contains("qa-bot")&&!f.classList?.contains("rcb-chat-window");)f=f.parentElement;(f||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(p=>{p.setAttribute("tabindex","-1"),p.classList.remove("keyboard-focused")}),setTimeout(()=>n(f),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",t),n();let o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(a=>{let l=a.querySelectorAll(".rcb-options-container .rcb-options").length>0,c=a.querySelectorAll(".rcb-checkbox-row-container").length>0;if(l){let u=a.querySelectorAll(".rcb-options[tabindex]").length;a.querySelectorAll(".rcb-options").length>u&&n(a)}if(c){let u=a.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;a.querySelectorAll(".rcb-checkbox-row-container").length>u&&n(a)}})},1e3);return()=>{document.removeEventListener("keydown",t),r.disconnect(),clearInterval(o)}},[]),null),Jy=t=>(console.error("Bot error:",t),t&&t.error,Kt.ERRORS.API_UNAVAILABLE),Zy=t=>{if(!t||typeof t!="string")return t;let e=t.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return e=e.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`,"gi"),n=>{let r=n,o="",a=r.match(/([.,;:!?]+)$/);return a&&(o=a[1],r=r.slice(0,-o.length)),`[${r}](${r})${o}`}),e},u3=({sessionId:t,apiKey:e})=>{let n=null;return{go_ahead_and_ask:{message:"Please type your question about ACCESS below.",path:"qa_loop"},qa_loop:{message:async r=>{let{userInput:o}=r;if(o==="\u{1F44D} Helpful"||o==="\u{1F44E} Not helpful"){if(e&&t&&n){let a={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o==="\u{1F44D} Helpful"?1:0},l=typeof process<"u"&&process.env?.REACT_APP_RATING_ENDPOINT?process.env.REACT_APP_RATING_ENDPOINT:Kt.RATING_ENDPOINT;try{await fetch(l,{method:"POST",headers:a})}catch(c){console.error("Error sending feedback:",c)}}return"Thanks for the feedback! Ask another question about ACCESS or start a new chat."}try{let a=Op();n=a;let l={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":a},c=await fetch(typeof process<"u"&&process.env?.REACT_APP_API_ENDPOINT?process.env.REACT_APP_API_ENDPOINT:Kt.API_ENDPOINT,{method:"POST",headers:l,body:JSON.stringify({query:o})}),u=(await c.json()).response,d=Zy(u);return await r.injectMessage(d),setTimeout(async()=>{await r.injectMessage("Ask another question about ACCESS or start a new chat.")},100),null}catch(a){return console.error("Error in bot flow:",a),Jy(a)}},renderMarkdown:["BOT"],options:r=>r.userInput==="\u{1F44D} Helpful"||r.userInput==="\u{1F44E} Not helpful"?[]:["\u{1F44D} Helpful","\u{1F44E} Not helpful"],chatDisabled:!1,path:"qa_loop"}}},d3=({sessionId:t,apiKey:e})=>{let n=null;return{metrics_intro:{message:`Please type your question about usage and performance metrics (XDMoD) below. You can see some <a target="_blank" href="${Kt.METRICS_QUESTIONS_URL}">examples here</a>.`,renderHtml:["BOT"],path:"metrics_loop"},metrics_loop:{message:async r=>{let{userInput:o}=r;if(o==="\u{1F44D} Helpful"||o==="\u{1F44E} Not helpful"){if(e&&t&&n){let a={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o==="\u{1F44D} Helpful"?1:0},l=typeof process<"u"&&process.env?.REACT_APP_METRICS_RATING_ENDPOINT?process.env.REACT_APP_METRICS_RATING_ENDPOINT:Kt.METRICS_RATING_ENDPOINT;try{await fetch(l,{method:"POST",headers:a})}catch(c){console.error("Error sending metrics feedback:",c)}}return"Thanks for the feedback! Ask another question about usage and performance metrics (XDMoD) or start a new chat."}try{let a=Op();n=a;let l={"Content-Type":"application/json","X-Origin":"metrics","X-API-KEY":e,"X-Session-ID":t,"X-Query-ID":a},c=await fetch(typeof process<"u"&&process.env?.REACT_APP_METRICS_API_ENDPOINT?process.env.REACT_APP_METRICS_API_ENDPOINT:Kt.METRICS_API_ENDPOINT,{method:"POST",headers:l,body:JSON.stringify({query:o})}),u=(await c.json()).response,d=Zy(u);return await r.injectMessage(d),setTimeout(async()=>{await r.injectMessage("Ask another question about usage and performance metrics (XDMoD) or start a new chat.")},100),null}catch(a){return console.error("Error in metrics flow:",a),Jy(a)}},renderMarkdown:["BOT"],options:r=>r.userInput==="\u{1F44D} Helpful"||r.userInput==="\u{1F44E} Not helpful"?[]:["\u{1F44D} Helpful","\u{1F44E} Not helpful"],chatDisabled:!1,path:"metrics_loop"}}},h3=t=>Se.createElement(Xy,t,Se.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),Se.createElement("polyline",{points:"17 8 12 3 7 8"}),Se.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),$y=({onFileUpload:t})=>{let[e,n]=_.useState(!1),[r,o]=_.useState([]),[a,l]=_.useState(null),c=_.useRef(null),{captureScreenshot:u,isCapturing:d,isScreenCaptureAvailable:f}=(()=>{let[w,S]=_.useState(!1),M=()=>typeof navigator<"u"&&navigator.mediaDevices&&typeof navigator.mediaDevices.getDisplayMedia=="function";return{captureScreenshot:async()=>{if(!M())throw new Error("Screen capture is not available in this environment");try{S(!0);let T=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",logicalSurface:!0,width:{ideal:1920},height:{ideal:1080}},audio:!1}),P=document.createElement("video");P.srcObject=T,await new Promise(G=>{P.onloadedmetadata=()=>{P.play(),G()}});let R=document.createElement("canvas");R.width=P.videoWidth,R.height=P.videoHeight,R.getContext("2d").drawImage(P,0,0,R.width,R.height);let F=await new Promise(G=>R.toBlob(G,"image/png")),V=new Date().toISOString().replace(/[:.]/g,"-"),U=new File([F],`screenshot-${V}.png`,{type:"image/png"});return T.getTracks().forEach(G=>G.stop()),S(!1),U}catch(T){throw console.error("Error capturing screenshot:",T),S(!1),T}},isCapturing:w,isScreenCaptureAvailable:M()}})(),p=w=>{let S=document.createElement("div");S.setAttribute("aria-live","assertive"),S.setAttribute("aria-atomic","true"),S.className="sr-only",S.textContent=w,document.body.appendChild(S),setTimeout(()=>document.body.removeChild(S),1e3)},A=w=>{if(!w||!w.length||w.length===0)return void console.warn("FileUploadComponent: No valid files provided to handleFiles");let S;try{S=Array.from(w)}catch(R){return console.error("FileUploadComponent: Error converting files to array:",R),void p("Error processing selected files. Please try again.")}let M=[...r,...S];o(M);let T=S.length,P=S.map(R=>R.name).join(", ");p(`${T} file${T>1?"s":""} selected: ${P}`),setTimeout(()=>{let R=document.querySelector(".rcb-chat-content");R&&(R.scrollTop=R.scrollHeight)},100),t&&t(M)},b=w=>{w.preventDefault(),w.stopPropagation(),w.type==="dragenter"||w.type==="dragover"?n(!0):w.type==="dragleave"&&n(!1)},y=()=>{try{c.current&&c.current.click()}catch(w){console.error("FileUploadComponent: Error in handleButtonClick:",w),p("Error opening file selection dialog. Please try again.")}},k=()=>{l(null)};return Se.createElement("div",{className:"file-upload-container",style:{padding:"16px",margin:"8px 0"}},f&&Se.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},Se.createElement("button",{onClick:w=>{w.preventDefault(),(async()=>{try{let S=await u();A([S]),p("Screenshot captured successfully")}catch{p("Error capturing screenshot. Please try again.")}})()},disabled:d,"aria-describedby":"screenshot-help","aria-label":d?"Taking screenshot, please wait":"Take a screenshot to attach",style:{display:"flex",alignItems:"center",gap:"8px",backgroundColor:"#107180",color:"white",border:"none",borderRadius:"5px",padding:"8px 12px",cursor:d?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},Se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Se.createElement("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),Se.createElement("circle",{cx:"12",cy:"13",r:"4"})),d?"Taking screenshot...":"Take screenshot..."),Se.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),Se.createElement("div",{className:"file-upload-dropzone "+(e?"active":""),onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:w=>{w.preventDefault(),w.stopPropagation(),n(!1);try{w.dataTransfer&&w.dataTransfer.files&&w.dataTransfer.files.length>0&&A(w.dataTransfer.files)}catch(S){console.error("FileUploadComponent: Error in handleDrop:",S),p("Error processing dropped files. Please try again.")}},role:"button",tabIndex:0,"aria-label":"File upload area. Click to select files or drag and drop files here.","aria-describedby":"upload-instructions",onKeyDown:w=>{w.key!=="Enter"&&w.key!==" "||(w.preventDefault(),y())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:e?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},Se.createElement("input",{ref:c,type:"file",className:"file-input",onChange:w=>{try{w.target&&w.target.files&&w.target.files.length>0&&A(w.target.files)}catch(S){console.error("FileUploadComponent: Error in handleFileSelect:",S),p("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:"image/*,application/pdf,text/*,.doc,.docx"}),Se.createElement("div",{className:"upload-content",onClick:y,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},Se.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},Se.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},Se.createElement(h3,null),Se.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),Se.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. Accepted: Images, PDFs, Text files (Max 10MB each)")),r.length>0&&Se.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},Se.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),r.map((w,S)=>Se.createElement("span",{key:S,style:{background:"#fff",color:"#107180",borderRadius:"5px",padding:"4px 12px",fontSize:"14px",marginRight:"4px",marginBottom:"4px",border:"1px solid #ccc",display:"flex",alignItems:"center",gap:"6px",cursor:"pointer"},onClick:M=>{M.stopPropagation(),(T=>{l(T)})(w)}},Se.createElement("span",{onClick:M=>{M.stopPropagation(),(T=>{let P=r.filter((R,F)=>F!==T);o(P),t&&t(P)})(S)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${w.name}`},"\xD7"),w.name," (",(w.size/1024).toFixed(1)," KB)"))))),(()=>{if(!a)return null;let w=a.type.startsWith("image/"),S=a.type.startsWith("text/"),M=a.type==="application/pdf";return Se.createElement("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.7)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},onClick:k},Se.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:T=>T.stopPropagation()},Se.createElement("button",{onClick:k,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"\xD7"),Se.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},a.name),w&&Se.createElement("img",{src:URL.createObjectURL(a),alt:a.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),S&&Se.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(a)),M&&Se.createElement("iframe",{src:URL.createObjectURL(a),style:{width:"100%",height:"70vh",border:"none"},title:a.name}),!w&&!S&&!M&&Se.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())},ev=async(t,e="support",n=[])=>{let r={support:17,general_help:17,feedback:17,loginAccess:30,loginProvider:31,security:26},o={serviceDeskId:e==="security"?3:2,requestTypeId:r[e]||r.support,requestFieldValues:{...t}};if(n&&n.length>0){let a=await Promise.all(n.map(async l=>new Promise((c,u)=>{let d=new FileReader;d.onload=()=>{let f=d.result.split(",")[1];c({fileName:l.name,contentType:l.type,size:l.size,fileData:f})},d.onerror=()=>u(new Error(`Failed to read file ${l.name}`)),d.readAsDataURL(l)})));o.attachments=a}return o},tv=async(t,e)=>{let n=Kt.netlifyBaseUrl.replace("/.netlify/functions/","").replace("/.netlify/functions",""),r;r=e==="create-support-ticket"?`${n}/api/v1/tickets`:e==="create-security-incident"?`${n}/api/v1/security-incidents`:`${Kt.netlifyBaseUrl}/${e}`;try{let o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!o.ok){let a="";try{let l=await o.text();console.error("| \u274C Post data to proxy failed:",o.status,l);try{let c=JSON.parse(l);a=c.message||c.error||l}catch{a=l}}catch{a=`HTTP ${o.status} ${o.statusText}`}return o.status===403?a="The ticket service is temporarily unavailable. Please try again later or contact support directly.":o.status===404?a="Ticket service not found. Please try again later.":o.status===500?a="Server error. Please try again later.":o.status===401&&(a="Authentication error with the ticket service. Please contact support."),{success:!1,status:o.status,error:a}}return{success:!0,data:await o.json()}}catch(o){return console.error("| \u274C Post data to proxy exception:",o),{success:!1,error:o.message}}},Jf=(t,e)=>Se.createElement($y,{onFileUpload:n=>t({...e||{},uploadedFiles:n})}),Zf=t=>{let e=null;return{submitTicket:async(n,r,o=[])=>{try{let a=await ev(n,r,o),l=await tv(a,"create-support-ticket");l.success?(e={success:!0,ticketKey:l.data.data.ticketKey,ticketUrl:l.data.data.ticketUrl},t(c=>({...c,ticketKey:l.data.data.ticketKey,ticketUrl:l.data.data.ticketUrl}))):(console.error(`| \u274C ${r} ticket creation failed:`,l),e={success:!1,error:l.error||"Unknown error"},t(c=>({...c,submissionError:l.error||"Unknown error"})))}catch(a){console.error(`| \u274C Error sending ${r} data to proxy:`,a),e={success:!1,error:a.message},t(l=>({...l,submissionError:a.message}))}},getSubmissionResult:()=>e}},$f=(t,e="ticket")=>t?t.success?t.ticketUrl&&t.ticketKey?`Your ${e} has been submitted successfully.
|
|
43
43
|
|
|
44
44
|
Ticket: <a href="${t.ticketUrl}" target="_blank">${t.ticketKey}</a>
|
|
45
45
|
|
|
@@ -117,7 +117,7 @@ Ticket: <a href="${o.ticketUrl}" target="_blank">${o.ticketKey}</a>
|
|
|
117
117
|
|
|
118
118
|
Our cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure.`:(o&&o.success,`Your security incident report has been submitted successfully.
|
|
119
119
|
|
|
120
|
-
Our cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure.`))((qe()||{}).submissionResult||r),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}};g3="2.7.2";localStorage.getItem("QaBotDebug")==="true"&&console.info("%c\u{1F916} ACCESS QA Bot | v".concat(g3," | react-chatbotify v2.2.0 [").concat(new Date().toISOString().slice(0,10),"]"),"background: #107180; color: white; padding: 8px; border-radius: 3px; font-weight: bold;");m3=()=>{for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(n&&n.startsWith("qa_bot_session_")){let r=localStorage.getItem(n);if(r)return r}}let t="qa_bot_session_".concat(Op());return localStorage.setItem(t,t),t},nv=Se.forwardRef((t,e)=>{let{apiKey:n,open:r=!1,onOpenChange:o,embedded:a=!1,isLoggedIn:l,loginUrl:c=Kt.LOGIN_URL,ringEffect:u=!1,welcome:d,userEmail:f,userName:p,accessId:A}=t,b=n||process.env.REACT_APP_API_KEY||null,[y,k]=_.useState(l!==void 0&&l),w=_.useRef(m3()).current,{ticketForm:S,feedbackForm:M,updateTicketForm:T,updateFeedbackForm:P,resetTicketForm:R,resetFeedbackForm:F}=Ky();_.useEffect(()=>{l!==void 0&&k(l)},[l]),_.useEffect(()=>{if(!a&&o){let le=he=>{e&&e.current&&e.current._markAsUserInteraction&&e.current._markAsUserInteraction();let Z=he.data.newState;o(Z)};return window.addEventListener("rcb-toggle-chat-window",le),()=>{window.removeEventListener("rcb-toggle-chat-window",le)}}},[a,o,e]);let V=qy(0,d),U=_.useRef(null),G=((le,he={})=>_.useMemo(()=>{let Z=(L,ce)=>{if(le.current){let I=getComputedStyle(le.current).getPropertyValue(L);if(I&&I.trim()!=="")return I.trim();if(le.current.parentElement){let J=getComputedStyle(le.current.parentElement).getPropertyValue(L);if(J&&J.trim()!=="")return J.trim()}}return ce};return{primaryColor:Z("--primary-color",he.primaryColor||Kt.THEME.PRIMARY_COLOR),secondaryColor:Z("--secondary-color",he.secondaryColor||Kt.THEME.SECONDARY_COLOR),fontFamily:Z("--font-family",he.fontFamily||Kt.THEME.FONT_FAMILY)}},[le,he]))(U),W=(({themeColors:le,embedded:he,defaultOpen:Z,isLoggedIn:L,loginUrl:ce})=>{let I=L,J=sessionStorage.getItem("qa_bot_tooltip_shown")?"NEVER":"START";return _.useMemo(()=>({general:{...le,embedded:he,primaryColor:le.primaryColor,fontFamily:"Arial, sans-serif",secondaryColor:le.secondaryColor},header:{title:Se.createElement("div",{key:"header-title"},Se.createElement("h1",{className:"sr-only"},Kt.CHATBOT.TITLE),Se.createElement("span",{"aria-hidden":"true"},Kt.CHATBOT.TITLE)),avatar:Kt.CHATBOT.AVATAR_URL,buttons:[I?Se.createElement(l3,{key:"user-icon"}):Se.createElement(vp,{key:"login-button",loginUrl:ce,isHeaderButton:!0}),Rt.CLOSE_CHAT_BUTTON]},chatWindow:{defaultOpen:!!he},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},chatInput:{enabledPlaceholderText:"Type your question here...",disabledPlaceholderText:"",disabled:!1,allowNewline:!0,sendButtonStyle:{display:"flex"},characterLimit:1e3,sendButtonAriaLabel:"Send message",showCharacterCount:!1,ariaLabel:"Chat input area",ariaDescribedBy:"chat-input-help"},chatHistory:{disabled:!1},botBubble:{simulateStream:!0,streamSpeed:10,allowNewline:!0,dangerouslySetInnerHTML:!0,renderHtml:!0,ariaLabel:"Bot response",role:"log"},chatButton:{icon:Kt.CHATBOT.AVATAR_URL},tooltip:{text:Kt.CHATBOT.TOOLTIP_TEXT,mode:J},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0},notification:{disabled:!0},footer:{text:Se.createElement("div",{key:"footer-text"},Se.createElement("a",{href:"https://support.access-ci.org/tools/access-qa-tool"},"About this tool"),"."),buttons:[Se.createElement(s3,{key:"new-chat-button"})]},event:{rcbToggleChatWindow:!0}}),[le,he,Z,I,J,ce])})({themeColors:G,embedded:a,defaultOpen:!1,isLoggedIn:y,loginUrl:c}),X=_.useMemo(()=>({ticketForm:S||{},feedbackForm:M||{},updateTicketForm:T,updateFeedbackForm:P,resetTicketForm:R,resetFeedbackForm:F}),[S,M,T,P,R,F]),Y=[()=>tE(pe),n3(),()=>r3(ae)];var ae,pe;let de=_.useMemo(()=>A3({welcomeMessage:V,isBotLoggedIn:y,loginUrl:c,sessionId:w,ticketForm:S,setTicketForm:T,formContext:X,apiKey:b,userInfo:{email:f||null,name:p||null,accessId:A||null}}),[V,y,c,w,S,M,T,P,X,b,f,p,A]);return((le,he)=>{_.useEffect(()=>{he.current&&(le?he.current.classList.add("bot-logged-in"):he.current.classList.remove("bot-logged-in"))},[le,he])})(y,U),((le,he)=>{_.useEffect(()=>{if(!le||!he.current)return;let Z=setTimeout(()=>{let L=he.current?.querySelector(".rcb-tooltip-show");L&&L.classList.add("phone-ring")},500);return()=>{clearTimeout(Z)}},[le,he])})(u,U),_.useEffect(()=>{let le=()=>{let Z=document.querySelector(".rcb-chat-window");if(!Z)return;let L=Z.querySelector(".rcb-send-button");L&&(L.hasAttribute("tabindex")||L.setAttribute("tabindex","0"),L.hasAttribute("data-keyboard-enabled")||(L.setAttribute("data-keyboard-enabled","true"),L.addEventListener("keydown",ce=>{if(ce.key==="Enter"||ce.key===" "){ce.preventDefault();let I=L&&Object.keys(L).find(ye=>ye.startsWith("__reactProps"));if(I){let ye=L[I],ge=ye?.onMouseDown;if(ge&&typeof ge=="function")return void ge(ce)}let J=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});L.dispatchEvent(J)}})))},he=setInterval(le,1e3);return le(),()=>clearInterval(he)},[]),c3(),_.useEffect(()=>{let le=()=>{sessionStorage.setItem("qa_bot_tooltip_shown","true")};return window.addEventListener("rcb-toggle-chat-window",le),()=>{window.removeEventListener("rcb-toggle-chat-window",le)}},[]),Se.createElement("div",{className:"qa-bot ".concat(a?"embedded-qa-bot":""),ref:U,role:"application","aria-label":a?"Ask ACCESS - Embedded Chat Application":"Ask ACCESS - Chat Assistant Application"},Se.createElement(py,null,Se.createElement(Yy,{ref:e,embedded:a,isBotLoggedIn:y,currentOpen:r}),Se.createElement(FC,{key:"chatbot-".concat(w,"-").concat(y),settings:W,flow:de,plugins:Y}),Se.createElement("div",{"aria-live":"polite",role:"status",className:"sr-only",id:"bot-live-region"}),Se.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."),Se.createElement("div",{id:"keyboard-help",className:"sr-only"},"Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs.")))});nv.displayName="QABotInternal";Np=Se.forwardRef((t,e)=>Se.createElement(a3,null,Se.createElement(nv,_u({},t,{ref:e}))));Np.displayName="QABot";Vb('.rcb-toggle-icon{background-color:initial!important;background-position:calc(50% - 1px) calc(50% + 2px);background-repeat:no-repeat;background-size:62%!important}.rcb-chat-window{height:800px!important;max-height:80vh!important;max-width:100%;width:550px!important}.rcb-chat-window .rcb-bot-avatar{background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:0}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:#107180}.rcb-chat-window .rcb-bot-message a{color:#fff;text-decoration:none}.rcb-chat-window .rcb-bot-message a:hover{text-decoration:underline}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-tooltip-show.phone-ring{animation:phone-ring 3s ease-out!important;z-index:10000!important}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:#107180!important;border-color:#107180!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:#107180!important;outline:none!important}.rcb-options:active{background-color:#107180!important;border-color:#107180!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:#107180!important;content:"\u2190"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=access-qa-tool]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}',{insertAt:"top"});b3=Se.forwardRef((t,e)=>{let[n,r]=Se.useState(t.isLoggedIn||!1),[o,a]=Se.useState(t.defaultOpen||!1),l=Se.useRef();return Se.useImperativeHandle(e,()=>({addMessage:c=>{l.current&&l.current.addMessage(c)},setBotIsLoggedIn:c=>{r(c)},openChat:()=>{!t.embedded&&l.current&&a(!0)},closeChat:()=>{!t.embedded&&l.current&&a(!1)},toggleChat:()=>{!t.embedded&&l.current&&a(c=>!c)}}),[t.embedded]),Se.createElement(Np,{ref:l,apiKey:t.apiKey,embedded:t.embedded,isLoggedIn:n,open:!!t.embedded||o,onOpenChange:t.embedded?void 0:a,loginUrl:t.loginUrl,ringEffect:t.ringEffect,welcome:t.welcome,userEmail:t.userEmail,userName:t.userName,accessId:t.accessId})});b3.displayName="ProgrammaticQABot"});function ct({alt:t=null,name:e=null,src:n=null}){return e?E.jsx("i",{className:`icon bi bi-${e}`}):E.jsx("img",{className:"icon",alt:t,src:n})}var jp=Bl(()=>{_s()});var aw={};xu(aw,{default:()=>b5});function _o({children:t,headerComponents:e=null,icon:n=null,sectionId:r=null,title:o}){let a=r||o.toLowerCase().replace(/[^0-9a-z]+/g,"-");return _.useLayoutEffect(()=>(av(),av),[]),E.jsxs("section",{id:a,"data-section-title":o,"data-section-icon":n,children:[E.jsxs("div",{className:"flex-header",children:[E.jsxs("h2",{children:[n?E.jsx(ct,{name:n}):null,o]}),e?E.jsx("div",{className:"header-components",children:e}):null]}),t]})}function y3({infoGroupId:t}){let e=In(`https://support.access-ci.org/api/1.0/affinity_groups/${t}`);if(!e||e.error||!e.length)return;let n=Xd(e[0].slack_link);return E.jsxs(_o,{title:"User Community",icon:"people-fill",children:[E.jsx("p",{children:"Join the community by participating in an affinity group! Members get update about announcements, events, and outages."}),E.jsxs("div",{className:"button-group",children:[E.jsxs("a",{href:e[0].url,className:"btn secondary",children:[E.jsx(ct,{name:"person-plus-fill"})," Join Affinity Group"]}),n?E.jsxs("a",{href:n,className:"btn",children:[E.jsx(ct,{name:"slack"})," Connect on Slack"]}):null,E.jsxs("a",{href:"#questions-and-answers",className:"btn",children:[E.jsx(ct,{name:"chat-fill"})," Ask and Answer Questions"]})]})]})}function v3({infoGroupId:t}){let e=Xs(t),n=In(e&&e.infoResourceIds.length?`https://operations-api.access-ci.org/wh2/cider/v1/info_resourceid/${e.infoResourceIds[0]}/?format=json`:null);if(!e)return;let{accessAllocated:r,name:o,description:a,imageUri:l,organizations:c}=e,u=r?"https://allocations.access-ci.org/get-your-first-project":null,d=n&&n.results?(n.results.compute||n.results.storage||{}).user_guide_url:null;return E.jsxs("div",{className:"resource-group-description",children:[l?E.jsx("img",{className:"resource-group-feature-image",src:l}):null,E.jsx("h1",{children:e.name}),c.map(f=>E.jsx("p",{children:E.jsxs("a",{href:f.organization_url||"#",children:[f.organization_favicon_url?E.jsx(ct,{alt:f.organization_name,src:f.organization_favicon_url}):null,f.organization_name]})},f.organization_name)),a?E.jsx("p",{children:a}):null,E.jsxs("div",{style:{marginTop:"1rem"},children:[u?E.jsxs("a",{href:u,className:"btn secondary lg",children:[E.jsx(ct,{name:"check2-circle"})," Get Started with ",o]}):null,d?E.jsxs("a",{href:d,className:"btn lg",children:[E.jsx(ct,{name:"book"})," User Guide"]}):null]})]})}function x3({column:t,row:e,style:n={}}){let r=t.format?t.format(e[t.key],e):e[t.key],o=["cell"];return t.class&&o.push(t.class),t.rowClass&&o.push(t.rowClass(e)),E.jsx("td",{className:o.join(" "),style:n,children:r})}function Qd({columns:t,rows:e,classes:n,frozenColumns:r=0,maxHeight:o=400,minWidth:a,rowClasses:l=[],scrollResetOnUpdate:c=!1}){let u=_.useRef();_.useLayoutEffect(()=>{u.current&&c&&(u.current.scrollTop=0)},[e]);let d=[0];for(let y=0;y<r;y++)d[y+1]=d[y]+(t[y].width||100);let f=(y,k)=>y<r?{position:"sticky",left:`${d[y]}px`,minWidth:`${t[y].width||100}px`,width:`${t[y].width||100}px`,zIndex:k||1}:{},p=t.map((y,k)=>E.jsx("th",{className:y.headerClass||y.class||"",style:f(k,100),children:y.formatHeader?y.formatHeader(y.name,y):y.name},y.key)),A=e.map((y,k)=>{let w=t.map((S,M)=>{let T=w3[S.type||"text"];return E.jsx(T,{column:S,row:y,style:f(M)},S.key)});return E.jsx("tr",{className:l[k]||"",children:w},k)}),b={};return a&&(b.minWidth=a),E.jsx("div",{className:`grid ${n||""}`,style:{maxHeight:Number.isInteger(o)?`${o}px`:o||null},ref:u,children:E.jsxs("table",{className:"table",style:b,children:[E.jsx("thead",{children:E.jsx("tr",{children:p})}),E.jsx("tbody",{children:A})]})})}function k3({infoGroupId:t}){let e=In(`https://support.access-ci.org/api/1.0/affinity_groups/${t}`),n=e&&!e.error&&e.length?e[0].field_ask_ci_locale:null,r=n?`${n}.json`:null,o=In(r);if(!o||o.error||!o.topic_list||!o.topic_list.topics||!o.topic_list.topics.length)return;let a=[{key:"title",name:"Topic",format:(c,u)=>E.jsxs(E.Fragment,{children:[u.pinned?E.jsx(ct,{name:"pin-fill"}):null,E.jsx("a",{href:`https://ask.cyberinfrastructure.org/t/${u.slug}/${u.id}`,children:c})]})},{key:"posts_count",name:"Posts",format:c=>c.toLocaleString("en-us")},{key:"bumped_at",name:"Last Update",format:c=>new Date(c).toLocaleString("en-US",{dateStyle:"medium"})}],l=[E.jsx("a",{href:n,className:"btn secondary",children:"Ask a Question"},"ask"),E.jsx("a",{href:n,className:"btn",children:"View All Topics"},"all")];return E.jsx(_o,{title:"Questions and Answers",icon:"chat-fill",headerComponents:l,children:E.jsx(Qd,{columns:a,rows:o.topic_list.topics.slice(0,5)})})}function No(t){return t?(t.nodeName||"").toLowerCase():null}function wr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function zi(t){var e=wr(t).Element;return t instanceof e||t instanceof Element}function Nr(t){var e=wr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function KA(t){if(typeof ShadowRoot>"u")return!1;var e=wr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function L3(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},a=e.elements[n];!Nr(a)||!No(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(l){var c=o[l];c===!1?a.removeAttribute(l):a.setAttribute(l,c===!0?"":c)}))})}function j3(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],a=e.attributes[r]||{},l=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),c=l.reduce(function(u,d){return u[d]="",u},{});!Nr(o)||!No(o)||(Object.assign(o.style,c),Object.keys(a).forEach(function(u){o.removeAttribute(u)}))})}}function Oo(t){return t.split("-")[0]}function oA(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function X1(){return!/^((?!chrome|android).)*safari/i.test(oA())}function Hs(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,a=1;e&&Nr(t)&&(o=t.offsetWidth>0&&Qs(r.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Qs(r.height)/t.offsetHeight||1);var l=zi(t)?wr(t):window,c=l.visualViewport,u=!X1()&&n,d=(r.left+(u&&c?c.offsetLeft:0))/o,f=(r.top+(u&&c?c.offsetTop:0))/a,p=r.width/o,A=r.height/a;return{width:p,height:A,top:f,right:d+p,bottom:f+A,left:d,x:d,y:f}}function XA(t){var e=Hs(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function J1(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&KA(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ca(t){return wr(t).getComputedStyle(t)}function F3(t){return["table","td","th"].indexOf(No(t))>=0}function Za(t){return((zi(t)?t.ownerDocument:t.document)||window.document).documentElement}function Hd(t){return No(t)==="html"?t:t.assignedSlot||t.parentNode||(KA(t)?t.host:null)||Za(t)}function sv(t){return!Nr(t)||ca(t).position==="fixed"?null:t.offsetParent}function R3(t){var e=/firefox/i.test(oA()),n=/Trident/i.test(oA());if(n&&Nr(t)){var r=ca(t);if(r.position==="fixed")return null}var o=Hd(t);for(KA(o)&&(o=o.host);Nr(o)&&["html","body"].indexOf(No(o))<0;){var a=ca(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function uc(t){for(var e=wr(t),n=sv(t);n&&F3(n)&&ca(n).position==="static";)n=sv(n);return n&&(No(n)==="html"||No(n)==="body"&&ca(n).position==="static")?e:n||R3(t)||e}function JA(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Kl(t,e,n){return Fi(t,gd(e,n))}function z3(t,e,n){var r=Kl(t,e,n);return r>n?n:r}function Z1(){return{top:0,right:0,bottom:0,left:0}}function $1(t){return Object.assign({},Z1(),t)}function ex(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}function H3(t){var e,n=t.state,r=t.name,o=t.options,a=n.elements.arrow,l=n.modifiersData.popperOffsets,c=Oo(n.placement),u=JA(c),d=[sr,jr].indexOf(c)>=0,f=d?"height":"width";if(!(!a||!l)){var p=Q3(o.padding,n),A=XA(a),b=u==="y"?ir:sr,y=u==="y"?Lr:jr,k=n.rects.reference[f]+n.rects.reference[u]-l[u]-n.rects.popper[f],w=l[u]-n.rects.reference[u],S=uc(a),M=S?u==="y"?S.clientHeight||0:S.clientWidth||0:0,T=k/2-w/2,P=p[b],R=M-A[f]-p[y],F=M/2-A[f]/2+T,V=Kl(P,F,R),U=u;n.modifiersData[r]=(e={},e[U]=V,e.centerOffset=V-F,e)}}function U3(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||J1(e.elements.popper,o)&&(e.elements.arrow=o))}function Us(t){return t.split("-")[1]}function q3(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:Qs(n*o)/o||0,y:Qs(r*o)/o||0}}function lv(t){var e,n=t.popper,r=t.popperRect,o=t.placement,a=t.variation,l=t.offsets,c=t.position,u=t.gpuAcceleration,d=t.adaptive,f=t.roundOffsets,p=t.isFixed,A=l.x,b=A===void 0?0:A,y=l.y,k=y===void 0?0:y,w=typeof f=="function"?f({x:b,y:k}):{x:b,y:k};b=w.x,k=w.y;var S=l.hasOwnProperty("x"),M=l.hasOwnProperty("y"),T=sr,P=ir,R=window;if(d){var F=uc(n),V="clientHeight",U="clientWidth";if(F===wr(n)&&(F=Za(n),ca(F).position!=="static"&&c==="absolute"&&(V="scrollHeight",U="scrollWidth")),F=F,o===ir||(o===sr||o===jr)&&a===tc){P=Lr;var G=p&&F===R&&R.visualViewport?R.visualViewport.height:F[V];k-=G-r.height,k*=u?1:-1}if(o===sr||(o===ir||o===Lr)&&a===tc){T=jr;var W=p&&F===R&&R.visualViewport?R.visualViewport.width:F[U];b-=W-r.width,b*=u?1:-1}}var X=Object.assign({position:c},d&&W3),Y=f===!0?q3({x:b,y:k},wr(n)):{x:b,y:k};if(b=Y.x,k=Y.y,u){var ae;return Object.assign({},X,(ae={},ae[P]=M?"0":"",ae[T]=S?"0":"",ae.transform=(R.devicePixelRatio||1)<=1?"translate("+b+"px, "+k+"px)":"translate3d("+b+"px, "+k+"px, 0)",ae))}return Object.assign({},X,(e={},e[P]=M?k+"px":"",e[T]=S?b+"px":"",e.transform="",e))}function Y3(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,l=a===void 0?!0:a,c=n.roundOffsets,u=c===void 0?!0:c,d={placement:Oo(e.placement),variation:Us(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,lv(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:l,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,lv(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}function K3(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,a=o===void 0?!0:o,l=r.resize,c=l===void 0?!0:l,u=wr(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&d.forEach(function(f){f.addEventListener("scroll",n.update,qu)}),c&&u.addEventListener("resize",n.update,qu),function(){a&&d.forEach(function(f){f.removeEventListener("scroll",n.update,qu)}),c&&u.removeEventListener("resize",n.update,qu)}}function ud(t){return t.replace(/left|right|bottom|top/g,function(e){return J3[e]})}function cv(t){return t.replace(/start|end/g,function(e){return Z3[e]})}function ZA(t){var e=wr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $A(t){return Hs(Za(t)).left+ZA(t).scrollLeft}function $3(t,e){var n=wr(t),r=Za(t),o=n.visualViewport,a=r.clientWidth,l=r.clientHeight,c=0,u=0;if(o){a=o.width,l=o.height;var d=X1();(d||!d&&e==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}return{width:a,height:l,x:c+$A(t),y:u}}function eP(t){var e,n=Za(t),r=ZA(t),o=(e=t.ownerDocument)==null?void 0:e.body,a=Fi(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=Fi(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+$A(t),u=-r.scrollTop;return ca(o||n).direction==="rtl"&&(c+=Fi(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:l,x:c,y:u}}function eg(t){var e=ca(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function tx(t){return["html","body","#document"].indexOf(No(t))>=0?t.ownerDocument.body:Nr(t)&&eg(t)?t:tx(Hd(t))}function Xl(t,e){var n;e===void 0&&(e=[]);var r=tx(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),a=wr(r),l=o?[a].concat(a.visualViewport||[],eg(r)?r:[]):r,c=e.concat(l);return o?c:c.concat(Xl(Hd(l)))}function aA(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tP(t,e){var n=Hs(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function uv(t,e,n){return e===Y1?aA($3(t,n)):zi(e)?tP(e,n):aA(eP(Za(t)))}function nP(t){var e=Xl(Hd(t)),n=["absolute","fixed"].indexOf(ca(t).position)>=0,r=n&&Nr(t)?uc(t):t;return zi(r)?e.filter(function(o){return zi(o)&&J1(o,r)&&No(o)!=="body"}):[]}function rP(t,e,n,r){var o=e==="clippingParents"?nP(t):[].concat(e),a=[].concat(o,[n]),l=a[0],c=a.reduce(function(u,d){var f=uv(t,d,r);return u.top=Fi(f.top,u.top),u.right=gd(f.right,u.right),u.bottom=gd(f.bottom,u.bottom),u.left=Fi(f.left,u.left),u},uv(t,l,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function nx(t){var e=t.reference,n=t.element,r=t.placement,o=r?Oo(r):null,a=r?Us(r):null,l=e.x+e.width/2-n.width/2,c=e.y+e.height/2-n.height/2,u;switch(o){case ir:u={x:l,y:e.y-n.height};break;case Lr:u={x:l,y:e.y+e.height};break;case jr:u={x:e.x+e.width,y:c};break;case sr:u={x:e.x-n.width,y:c};break;default:u={x:e.x,y:e.y}}var d=o?JA(o):null;if(d!=null){var f=d==="y"?"height":"width";switch(a){case zs:u[d]=u[d]-(e[f]/2-n[f]/2);break;case tc:u[d]=u[d]+(e[f]/2-n[f]/2);break}}return u}function nc(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,a=n.strategy,l=a===void 0?t.strategy:a,c=n.boundary,u=c===void 0?C3:c,d=n.rootBoundary,f=d===void 0?Y1:d,p=n.elementContext,A=p===void 0?zl:p,b=n.altBoundary,y=b===void 0?!1:b,k=n.padding,w=k===void 0?0:k,S=$1(typeof w!="number"?w:ex(w,cc)),M=A===zl?E3:zl,T=t.rects.popper,P=t.elements[y?M:A],R=rP(zi(P)?P:P.contextElement||Za(t.elements.popper),u,f,l),F=Hs(t.elements.reference),V=nx({reference:F,element:T,placement:o}),U=aA(Object.assign({},T,V)),G=A===zl?U:F,W={top:R.top-G.top+S.top,bottom:G.bottom-R.bottom+S.bottom,left:R.left-G.left+S.left,right:G.right-R.right+S.right},X=t.modifiersData.offset;if(A===zl&&X){var Y=X[o];Object.keys(W).forEach(function(ae){var pe=[jr,Lr].indexOf(ae)>=0?1:-1,de=[ir,Lr].indexOf(ae)>=0?"y":"x";W[ae]+=Y[de]*pe})}return W}function oP(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,a=n.rootBoundary,l=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?G1:u,f=Us(r),p=f?c?iv:iv.filter(function(y){return Us(y)===f}):cc,A=p.filter(function(y){return d.indexOf(y)>=0});A.length===0&&(A=p);var b=A.reduce(function(y,k){return y[k]=nc(t,{placement:k,boundary:o,rootBoundary:a,padding:l})[Oo(k)],y},{});return Object.keys(b).sort(function(y,k){return b[y]-b[k]})}function aP(t){if(Oo(t)===GA)return[];var e=ud(t);return[cv(t),e,cv(e)]}function iP(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,l=n.altAxis,c=l===void 0?!0:l,u=n.fallbackPlacements,d=n.padding,f=n.boundary,p=n.rootBoundary,A=n.altBoundary,b=n.flipVariations,y=b===void 0?!0:b,k=n.allowedAutoPlacements,w=e.options.placement,S=Oo(w),M=S===w,T=u||(M||!y?[ud(w)]:aP(w)),P=[w].concat(T).reduce(function(ge,Ee){return ge.concat(Oo(Ee)===GA?oP(e,{placement:Ee,boundary:f,rootBoundary:p,padding:d,flipVariations:y,allowedAutoPlacements:k}):Ee)},[]),R=e.rects.reference,F=e.rects.popper,V=new Map,U=!0,G=P[0],W=0;W<P.length;W++){var X=P[W],Y=Oo(X),ae=Us(X)===zs,pe=[ir,Lr].indexOf(Y)>=0,de=pe?"width":"height",le=nc(e,{placement:X,boundary:f,rootBoundary:p,altBoundary:A,padding:d}),he=pe?ae?jr:sr:ae?Lr:ir;R[de]>F[de]&&(he=ud(he));var Z=ud(he),L=[];if(a&&L.push(le[Y]<=0),c&&L.push(le[he]<=0,le[Z]<=0),L.every(function(ge){return ge})){G=X,U=!1;break}V.set(X,L)}if(U)for(var ce=y?3:1,I=function(ge){var Ee=P.find(function(De){var je=V.get(De);if(je)return je.slice(0,ge).every(function(ze){return ze})});if(Ee)return G=Ee,"break"},J=ce;J>0;J--){var ye=I(J);if(ye==="break")break}e.placement!==G&&(e.modifiersData[r]._skip=!0,e.placement=G,e.reset=!0)}}function dv(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function hv(t){return[ir,jr,Lr,sr].some(function(e){return t[e]>=0})}function lP(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,a=e.modifiersData.preventOverflow,l=nc(e,{elementContext:"reference"}),c=nc(e,{altBoundary:!0}),u=dv(l,r),d=dv(c,o,a),f=hv(u),p=hv(d);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}function uP(t,e,n){var r=Oo(t),o=[sr,ir].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,l=a[0],c=a[1];return l=l||0,c=(c||0)*o,[sr,jr].indexOf(r)>=0?{x:c,y:l}:{x:l,y:c}}function dP(t){var e=t.state,n=t.options,r=t.name,o=n.offset,a=o===void 0?[0,0]:o,l=G1.reduce(function(f,p){return f[p]=uP(p,e.rects,a),f},{}),c=l[e.placement],u=c.x,d=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=l}function fP(t){var e=t.state,n=t.name;e.modifiersData[n]=nx({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}function AP(t){return t==="x"?"y":"x"}function gP(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,a=o===void 0?!0:o,l=n.altAxis,c=l===void 0?!1:l,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.padding,A=n.tether,b=A===void 0?!0:A,y=n.tetherOffset,k=y===void 0?0:y,w=nc(e,{boundary:u,rootBoundary:d,padding:p,altBoundary:f}),S=Oo(e.placement),M=Us(e.placement),T=!M,P=JA(S),R=AP(P),F=e.modifiersData.popperOffsets,V=e.rects.reference,U=e.rects.popper,G=typeof k=="function"?k(Object.assign({},e.rects,{placement:e.placement})):k,W=typeof G=="number"?{mainAxis:G,altAxis:G}:Object.assign({mainAxis:0,altAxis:0},G),X=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Y={x:0,y:0};if(F){if(a){var ae,pe=P==="y"?ir:sr,de=P==="y"?Lr:jr,le=P==="y"?"height":"width",he=F[P],Z=he+w[pe],L=he-w[de],ce=b?-U[le]/2:0,I=M===zs?V[le]:U[le],J=M===zs?-U[le]:-V[le],ye=e.elements.arrow,ge=b&&ye?XA(ye):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Z1(),De=Ee[pe],je=Ee[de],ze=Kl(0,V[le],ge[le]),Re=T?V[le]/2-ce-ze-De-W.mainAxis:I-ze-De-W.mainAxis,$e=T?-V[le]/2+ce+ze+je+W.mainAxis:J+ze+je+W.mainAxis,vt=e.elements.arrow&&uc(e.elements.arrow),Jt=vt?P==="y"?vt.clientTop||0:vt.clientLeft||0:0,ut=(ae=X?.[P])!=null?ae:0,Ot=he+Re-ut-Jt,xn=he+$e-ut,Zt=Kl(b?gd(Z,Ot):Z,he,b?Fi(L,xn):L);F[P]=Zt,Y[P]=Zt-he}if(c){var Mn,pn=P==="x"?ir:sr,$t=P==="x"?Lr:jr,Bt=F[R],Ht=R==="y"?"height":"width",Lt=Bt+w[pn],mt=Bt-w[$t],_n=[ir,sr].indexOf(S)!==-1,zn=(Mn=X?.[R])!=null?Mn:0,Qn=_n?Lt:Bt-V[Ht]-U[Ht]-zn+W.altAxis,On=_n?Bt+V[Ht]+U[Ht]-zn-W.altAxis:mt,sn=b&&_n?z3(Qn,Bt,On):Kl(b?Qn:Lt,Bt,b?On:mt);F[R]=sn,Y[R]=sn-Bt}e.modifiersData[r]=Y}}function bP(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function yP(t){return t===wr(t)||!Nr(t)?ZA(t):bP(t)}function vP(t){var e=t.getBoundingClientRect(),n=Qs(e.width)/t.offsetWidth||1,r=Qs(e.height)/t.offsetHeight||1;return n!==1||r!==1}function xP(t,e,n){n===void 0&&(n=!1);var r=Nr(e),o=Nr(e)&&vP(e),a=Za(e),l=Hs(t,o,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((No(e)!=="body"||eg(a))&&(c=yP(e)),Nr(e)?(u=Hs(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=$A(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function wP(t){var e=new Map,n=new Set,r=[];t.forEach(function(a){e.set(a.name,a)});function o(a){n.add(a.name);var l=[].concat(a.requires||[],a.requiresIfExists||[]);l.forEach(function(c){if(!n.has(c)){var u=e.get(c);u&&o(u)}}),r.push(a)}return t.forEach(function(a){n.has(a.name)||o(a)}),r}function kP(t){var e=wP(t);return N3.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function CP(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function EP(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}function pv(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function SP(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,a=o===void 0?fv:o;return function(l,c,u){u===void 0&&(u=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},fv,a),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,A={state:d,setOptions:function(k){var w=typeof k=="function"?k(d.options):k;y(),d.options=Object.assign({},a,d.options,w),d.scrollParents={reference:zi(l)?Xl(l):l.contextElement?Xl(l.contextElement):[],popper:Xl(c)};var S=kP(EP([].concat(r,d.options.modifiers)));return d.orderedModifiers=S.filter(function(M){return M.enabled}),b(),A.update()},forceUpdate:function(){if(!p){var k=d.elements,w=k.reference,S=k.popper;if(pv(w,S)){d.rects={reference:xP(w,uc(S),d.options.strategy==="fixed"),popper:XA(S)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(U){return d.modifiersData[U.name]=Object.assign({},U.data)});for(var M=0;M<d.orderedModifiers.length;M++){if(d.reset===!0){d.reset=!1,M=-1;continue}var T=d.orderedModifiers[M],P=T.fn,R=T.options,F=R===void 0?{}:R,V=T.name;typeof P=="function"&&(d=P({state:d,options:F,name:V,instance:A})||d)}}}},update:CP(function(){return new Promise(function(k){A.forceUpdate(),k(d)})}),destroy:function(){y(),p=!0}};if(!pv(l,c))return A;A.setOptions(u).then(function(k){!p&&u.onFirstUpdate&&u.onFirstUpdate(k)});function b(){d.orderedModifiers.forEach(function(k){var w=k.name,S=k.options,M=S===void 0?{}:S,T=k.effect;if(typeof T=="function"){var P=T({state:d,name:w,instance:A,options:M}),R=function(){};f.push(P||R)}})}function y(){f.forEach(function(k){return k()}),f=[]}return A}}function Fp(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function tg(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function sx(t,e){return typeof t=="function"?t.apply(void 0,e):t}function Av(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function IP(t){return t.split(/\s+/).filter(Boolean)}function Ns(t){return[].concat(t)}function gv(t,e){t.indexOf(e)===-1&&t.push(e)}function MP(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function _P(t){return t.split("-")[0]}function md(t){return[].slice.call(t)}function mv(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function Jl(){return document.createElement("div")}function Ud(t){return["Element","Fragment"].some(function(e){return tg(t,e)})}function OP(t){return tg(t,"NodeList")}function NP(t){return tg(t,"MouseEvent")}function LP(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function jP(t){return Ud(t)?[t]:OP(t)?md(t):Array.isArray(t)?t:md(document.querySelectorAll(t))}function Rp(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function bv(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function FP(t){var e,n=Ns(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function RP(t,e){var n=e.clientX,r=e.clientY;return t.every(function(o){var a=o.popperRect,l=o.popperState,c=o.props,u=c.interactiveBorder,d=_P(l.placement),f=l.modifiersData.offset;if(!f)return!0;var p=d==="bottom"?f.top.y:0,A=d==="top"?f.bottom.y:0,b=d==="right"?f.left.x:0,y=d==="left"?f.right.x:0,k=a.top-r+p>u,w=r-a.bottom-A>u,S=a.left-n+b>u,M=n-a.right-y>u;return k||w||S||M})}function zp(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[r](o,n)})}function yv(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}function zP(){Bo.isTouch||(Bo.isTouch=!0,window.performance&&document.addEventListener("mousemove",lx))}function lx(){var t=performance.now();t-vv<20&&(Bo.isTouch=!1,document.removeEventListener("mousemove",lx)),vv=t}function QP(){var t=document.activeElement;if(LP(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function HP(){document.addEventListener("touchstart",zP,Ni),window.addEventListener("blur",QP)}function cx(t){var e=t.plugins||[],n=e.reduce(function(r,o){var a=o.name,l=o.defaultValue;if(a){var c;r[a]=t[a]!==void 0?t[a]:(c=no[a])!=null?c:l}return r},{});return Object.assign({},t,n)}function KP(t,e){var n=e?Object.keys(cx(Object.assign({},no,{plugins:e}))):YP,r=n.reduce(function(o,a){var l=(t.getAttribute("data-tippy-"+a)||"").trim();if(!l)return o;if(a==="content")o[a]=l;else try{o[a]=JSON.parse(l)}catch{o[a]=l}return o},{});return r}function xv(t,e){var n=Object.assign({},e,{content:sx(e.content,[t])},e.ignoreAttributes?{}:KP(t,e.plugins));return n.aria=Object.assign({},no.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}function iA(t,e){t[XP()]=e}function wv(t){var e=Jl();return t===!0?e.className=ox:(e.className=ax,Ud(t)?e.appendChild(t):iA(e,t)),e}function kv(t,e){Ud(e.content)?(iA(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?iA(t,e.content):t.textContent=e.content)}function sA(t){var e=t.firstElementChild,n=md(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(rx)}),arrow:n.find(function(r){return r.classList.contains(ox)||r.classList.contains(ax)}),backdrop:n.find(function(r){return r.classList.contains(BP)})}}function ux(t){var e=Jl(),n=Jl();n.className=TP,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Jl();r.className=rx,r.setAttribute("data-state","hidden"),kv(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props);function o(a,l){var c=sA(e),u=c.box,d=c.content,f=c.arrow;l.theme?u.setAttribute("data-theme",l.theme):u.removeAttribute("data-theme"),typeof l.animation=="string"?u.setAttribute("data-animation",l.animation):u.removeAttribute("data-animation"),l.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?u.setAttribute("role",l.role):u.removeAttribute("role"),(a.content!==l.content||a.allowHTML!==l.allowHTML)&&kv(d,t.props),l.arrow?f?a.arrow!==l.arrow&&(u.removeChild(f),u.appendChild(wv(l.arrow))):u.appendChild(wv(l.arrow)):f&&u.removeChild(f)}return{popper:e,onUpdate:o}}function ZP(t,e){var n=xv(t,Object.assign({},no,cx(mv(e)))),r,o,a,l=!1,c=!1,u=!1,d=!1,f,p,A,b=[],y=Av(Ot,n.interactiveDebounce),k,w=JP++,S=null,M=MP(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},P={id:w,reference:t,popper:Jl(),popperInstance:S,props:n,state:T,plugins:M,clearDelayTimeouts:Qn,setProps:On,setContent:sn,show:ue,hide:Ie,hideWithInteractivity:Qe,enable:_n,disable:zn,unmount:lt,destroy:it};if(!n.render)return P;var R=n.render(P),F=R.popper,V=R.onUpdate;F.setAttribute("data-tippy-root",""),F.id="tippy-"+P.id,P.popper=F,t._tippy=P,F._tippy=P;var U=M.map(function(se){return se.fn(P)}),G=t.hasAttribute("aria-expanded");return vt(),ce(),he(),Z("onCreate",[P]),n.showOnCreate&&Lt(),F.addEventListener("mouseenter",function(){P.props.interactive&&P.state.isVisible&&P.clearDelayTimeouts()}),F.addEventListener("mouseleave",function(){P.props.interactive&&P.props.trigger.indexOf("mouseenter")>=0&&pe().addEventListener("mousemove",y)}),P;function W(){var se=P.props.touch;return Array.isArray(se)?se:[se,0]}function X(){return W()[0]==="hold"}function Y(){var se;return!!((se=P.props.render)!=null&&se.$$tippy)}function ae(){return k||t}function pe(){var se=ae().parentNode;return se?FP(se):document}function de(){return sA(F)}function le(se){return P.state.isMounted&&!P.state.isVisible||Bo.isTouch||f&&f.type==="focus"?0:Fp(P.props.delay,se?0:1,no.delay)}function he(se){se===void 0&&(se=!1),F.style.pointerEvents=P.props.interactive&&!se?"":"none",F.style.zIndex=""+P.props.zIndex}function Z(se,Te,Oe){if(Oe===void 0&&(Oe=!0),U.forEach(function(et){et[se]&&et[se].apply(et,Te)}),Oe){var tt;(tt=P.props)[se].apply(tt,Te)}}function L(){var se=P.props.aria;if(se.content){var Te="aria-"+se.content,Oe=F.id,tt=Ns(P.props.triggerTarget||t);tt.forEach(function(et){var Je=et.getAttribute(Te);if(P.state.isVisible)et.setAttribute(Te,Je?Je+" "+Oe:Oe);else{var bt=Je&&Je.replace(Oe,"").trim();bt?et.setAttribute(Te,bt):et.removeAttribute(Te)}})}}function ce(){if(!(G||!P.props.aria.expanded)){var se=Ns(P.props.triggerTarget||t);se.forEach(function(Te){P.props.interactive?Te.setAttribute("aria-expanded",P.state.isVisible&&Te===ae()?"true":"false"):Te.removeAttribute("aria-expanded")})}}function I(){pe().removeEventListener("mousemove",y),Yu=Yu.filter(function(se){return se!==y})}function J(se){if(!(Bo.isTouch&&(u||se.type==="mousedown"))){var Te=se.composedPath&&se.composedPath()[0]||se.target;if(!(P.props.interactive&&yv(F,Te))){if(Ns(P.props.triggerTarget||t).some(function(Oe){return yv(Oe,Te)})){if(Bo.isTouch||P.state.isVisible&&P.props.trigger.indexOf("click")>=0)return}else Z("onClickOutside",[P,se]);P.props.hideOnClick===!0&&(P.clearDelayTimeouts(),P.hide(),c=!0,setTimeout(function(){c=!1}),P.state.isMounted||De())}}}function ye(){u=!0}function ge(){u=!1}function Ee(){var se=pe();se.addEventListener("mousedown",J,!0),se.addEventListener("touchend",J,Ni),se.addEventListener("touchstart",ge,Ni),se.addEventListener("touchmove",ye,Ni)}function De(){var se=pe();se.removeEventListener("mousedown",J,!0),se.removeEventListener("touchend",J,Ni),se.removeEventListener("touchstart",ge,Ni),se.removeEventListener("touchmove",ye,Ni)}function je(se,Te){Re(se,function(){!P.state.isVisible&&F.parentNode&&F.parentNode.contains(F)&&Te()})}function ze(se,Te){Re(se,Te)}function Re(se,Te){var Oe=de().box;function tt(et){et.target===Oe&&(zp(Oe,"remove",tt),Te())}if(se===0)return Te();zp(Oe,"remove",p),zp(Oe,"add",tt),p=tt}function $e(se,Te,Oe){Oe===void 0&&(Oe=!1);var tt=Ns(P.props.triggerTarget||t);tt.forEach(function(et){et.addEventListener(se,Te,Oe),b.push({node:et,eventType:se,handler:Te,options:Oe})})}function vt(){X()&&($e("touchstart",ut,{passive:!0}),$e("touchend",xn,{passive:!0})),IP(P.props.trigger).forEach(function(se){if(se!=="manual")switch($e(se,ut),se){case"mouseenter":$e("mouseleave",xn);break;case"focus":$e(VP?"focusout":"blur",Zt);break;case"focusin":$e("focusout",Zt);break}})}function Jt(){b.forEach(function(se){var Te=se.node,Oe=se.eventType,tt=se.handler,et=se.options;Te.removeEventListener(Oe,tt,et)}),b=[]}function ut(se){var Te,Oe=!1;if(!(!P.state.isEnabled||Mn(se)||c)){var tt=((Te=f)==null?void 0:Te.type)==="focus";f=se,k=se.currentTarget,ce(),!P.state.isVisible&&NP(se)&&Yu.forEach(function(et){return et(se)}),se.type==="click"&&(P.props.trigger.indexOf("mouseenter")<0||l)&&P.props.hideOnClick!==!1&&P.state.isVisible?Oe=!0:Lt(se),se.type==="click"&&(l=!Oe),Oe&&!tt&&mt(se)}}function Ot(se){var Te=se.target,Oe=ae().contains(Te)||F.contains(Te);if(!(se.type==="mousemove"&&Oe)){var tt=Ht().concat(F).map(function(et){var Je,bt=et._tippy,gt=(Je=bt.popperInstance)==null?void 0:Je.state;return gt?{popperRect:et.getBoundingClientRect(),popperState:gt,props:n}:null}).filter(Boolean);RP(tt,se)&&(I(),mt(se))}}function xn(se){var Te=Mn(se)||P.props.trigger.indexOf("click")>=0&&l;if(!Te){if(P.props.interactive){P.hideWithInteractivity(se);return}mt(se)}}function Zt(se){P.props.trigger.indexOf("focusin")<0&&se.target!==ae()||P.props.interactive&&se.relatedTarget&&F.contains(se.relatedTarget)||mt(se)}function Mn(se){return Bo.isTouch?X()!==se.type.indexOf("touch")>=0:!1}function pn(){$t();var se=P.props,Te=se.popperOptions,Oe=se.placement,tt=se.offset,et=se.getReferenceClientRect,Je=se.moveTransition,bt=Y()?sA(F).arrow:null,gt=et?{getBoundingClientRect:et,contextElement:et.contextElement||ae()}:t,at={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Hn){var An=Hn.state;if(Y()){var Nn=de(),cr=Nn.box;["placement","reference-hidden","escaped"].forEach(function(cn){cn==="placement"?cr.setAttribute("data-placement",An.placement):An.attributes.popper["data-popper-"+cn]?cr.setAttribute("data-"+cn,""):cr.removeAttribute("data-"+cn)}),An.attributes.popper={}}}},ln=[{name:"offset",options:{offset:tt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Je}},at];Y()&&bt&&ln.push({name:"arrow",options:{element:bt,padding:3}}),ln.push.apply(ln,Te?.modifiers||[]),P.popperInstance=DP(gt,F,Object.assign({},Te,{placement:Oe,onFirstUpdate:A,modifiers:ln}))}function $t(){P.popperInstance&&(P.popperInstance.destroy(),P.popperInstance=null)}function Bt(){var se=P.props.appendTo,Te,Oe=ae();P.props.interactive&&se===ix||se==="parent"?Te=Oe.parentNode:Te=sx(se,[Oe]),Te.contains(F)||Te.appendChild(F),P.state.isMounted=!0,pn()}function Ht(){return md(F.querySelectorAll("[data-tippy-root]"))}function Lt(se){P.clearDelayTimeouts(),se&&Z("onTrigger",[P,se]),Ee();var Te=le(!0),Oe=W(),tt=Oe[0],et=Oe[1];Bo.isTouch&&tt==="hold"&&et&&(Te=et),Te?r=setTimeout(function(){P.show()},Te):P.show()}function mt(se){if(P.clearDelayTimeouts(),Z("onUntrigger",[P,se]),!P.state.isVisible){De();return}if(!(P.props.trigger.indexOf("mouseenter")>=0&&P.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(se.type)>=0&&l)){var Te=le(!1);Te?o=setTimeout(function(){P.state.isVisible&&P.hide()},Te):a=requestAnimationFrame(function(){P.hide()})}}function _n(){P.state.isEnabled=!0}function zn(){P.hide(),P.state.isEnabled=!1}function Qn(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(a)}function On(se){if(!P.state.isDestroyed){Z("onBeforeUpdate",[P,se]),Jt();var Te=P.props,Oe=xv(t,Object.assign({},Te,mv(se),{ignoreAttributes:!0}));P.props=Oe,vt(),Te.interactiveDebounce!==Oe.interactiveDebounce&&(I(),y=Av(Ot,Oe.interactiveDebounce)),Te.triggerTarget&&!Oe.triggerTarget?Ns(Te.triggerTarget).forEach(function(tt){tt.removeAttribute("aria-expanded")}):Oe.triggerTarget&&t.removeAttribute("aria-expanded"),ce(),he(),V&&V(Te,Oe),P.popperInstance&&(pn(),Ht().forEach(function(tt){requestAnimationFrame(tt._tippy.popperInstance.forceUpdate)})),Z("onAfterUpdate",[P,se])}}function sn(se){P.setProps({content:se})}function ue(){var se=P.state.isVisible,Te=P.state.isDestroyed,Oe=!P.state.isEnabled,tt=Bo.isTouch&&!P.props.touch,et=Fp(P.props.duration,0,no.duration);if(!(se||Te||Oe||tt)&&!ae().hasAttribute("disabled")&&(Z("onShow",[P],!1),P.props.onShow(P)!==!1)){if(P.state.isVisible=!0,Y()&&(F.style.visibility="visible"),he(),Ee(),P.state.isMounted||(F.style.transition="none"),Y()){var Je=de(),bt=Je.box,gt=Je.content;Rp([bt,gt],0)}A=function(){var at;if(!(!P.state.isVisible||d)){if(d=!0,F.offsetHeight,F.style.transition=P.props.moveTransition,Y()&&P.props.animation){var ln=de(),Hn=ln.box,An=ln.content;Rp([Hn,An],et),bv([Hn,An],"visible")}L(),ce(),gv(Qp,P),(at=P.popperInstance)==null||at.forceUpdate(),Z("onMount",[P]),P.props.animation&&Y()&&ze(et,function(){P.state.isShown=!0,Z("onShown",[P])})}},Bt()}}function Ie(){var se=!P.state.isVisible,Te=P.state.isDestroyed,Oe=!P.state.isEnabled,tt=Fp(P.props.duration,1,no.duration);if(!(se||Te||Oe)&&(Z("onHide",[P],!1),P.props.onHide(P)!==!1)){if(P.state.isVisible=!1,P.state.isShown=!1,d=!1,l=!1,Y()&&(F.style.visibility="hidden"),I(),De(),he(!0),Y()){var et=de(),Je=et.box,bt=et.content;P.props.animation&&(Rp([Je,bt],tt),bv([Je,bt],"hidden"))}L(),ce(),P.props.animation?Y()&&je(tt,P.unmount):P.unmount()}}function Qe(se){pe().addEventListener("mousemove",y),gv(Yu,y),y(se)}function lt(){P.state.isVisible&&P.hide(),P.state.isMounted&&($t(),Ht().forEach(function(se){se._tippy.unmount()}),F.parentNode&&F.parentNode.removeChild(F),Qp=Qp.filter(function(se){return se!==P}),P.state.isMounted=!1,Z("onHidden",[P]))}function it(){P.state.isDestroyed||(P.clearDelayTimeouts(),P.unmount(),Jt(),delete t._tippy,P.state.isDestroyed=!0,Z("onDestroy",[P]))}}function dc(t,e){e===void 0&&(e={});var n=no.plugins.concat(e.plugins||[]);HP();var r=Object.assign({},e,{plugins:n}),o=jP(t),a=o.reduce(function(l,c){var u=c&&ZP(c,r);return u&&l.push(u),l},[]);return Ud(t)?a[0]:a}function $P({color:t="var(--contrast-6)",icon:e="info-circle-fill",tooltip:n}){let r=_.useRef(null);return _.useLayoutEffect(()=>{r.current&&dc(r.current,{content:n,theme:"access",appendTo:r.current.parentElement})},[r.current]),E.jsx("button",{className:"info-tip",style:{color:t},ref:r,children:E.jsx(ct,{name:e})})}function eD({infoGroupId:t}){let e=In(`https://support.access-ci.org/api/1.0/kb/${t}`);if(!(!e||e.error||!e.length))return E.jsx(_o,{title:"Documentation",icon:"book",children:E.jsx("ul",{children:e.map(({title:n,description:r,link:o})=>E.jsxs("li",{children:[E.jsx("a",{href:mg(o),children:n}),r?E.jsx($P,{tooltip:Xd(r)}):null]},n))})})}function tD({children:t,icon:e="megaphone-fill"}){return E.jsxs("div",{className:"alert",children:[e?E.jsx(ct,{name:e}):null,E.jsx("div",{className:"alert-body",children:t})]})}function nD({children:t}){let[e,n]=_.useState(!1);return E.jsxs("div",{className:`expand-text ${e?"expanded":"contracted"}`,children:[t,E.jsxs("button",{className:"expand-button",onClick:()=>n(!e),children:[E.jsx(ct,{name:`caret-${e?"up":"left"}-fill`}),e?"Less":"More"]})]})}function rD({date__end:t,date__start:e,description:n,location:r,registration:o,speaker:a,title:l}){let c=o,u=c?E.jsx("a",{href:c,children:l}):l,d=[],f=null,p=e,A=t;if(p){let b=new Date(p),y=new Date(A||p),[k,w]=[b,y].map(F=>F.toLocaleString("en-US",{dateStyle:"long"})),[S,M]=[b,y].map(F=>F.toLocaleString("en-US",{timeStyle:"short"})),T=b.toLocaleTimeString("en-US",{timeZoneName:"short"}).split(" ")[2],P=[`${k},`,S];(M!=S||w!=k)&&(P.push("-"),w!=k&&P.push(`${w},`),P.push(M)),P.push(`(${T})`),d.push(E.jsx(ct,{name:"calendar"}),P.join(" ")),a&&d.push(E.jsx(ct,{name:"people-fill"}),a),r&&d.push(E.jsx(ct,{name:"geo-alt-fill"}),r);let R=b.toLocaleString("en-US",{dateStyle:"medium"}).split(",")[0].split(" ").map(F=>E.jsx("span",{children:F},F));f=c?E.jsx("a",{href:c,className:"event-icon",children:R}):E.jsx("div",{className:"event-icon",children:R})}return E.jsxs("div",{className:"event",children:[f,E.jsxs("div",{className:"event-details",children:[E.jsx("h3",{children:u}),d.length?E.jsx("div",{className:"event-metadata",children:d}):null,n?E.jsx(nD,{children:E.jsx("div",{children:zd(n)})}):null]})]})}function oD({infoGroupId:t}){let e=Xs(t),n=In("https://operations-api.access-ci.org/wh2/news/v1/affiliation/access-ci.org/current_outages/"),r=In("https://operations-api.access-ci.org/wh2/news/v1/affiliation/access-ci.org/future_outages/"),o=In(`https://support.access-ci.org/api/1.1/events/ag/${t}`),a=Rd([e,n,r],(c,u,d)=>[...u.results,...d.results].filter(f=>f.AffectedResources.some(p=>c.infoResourceIds.includes(p.ResourceID))),[]),l=Rd([o],c=>c.filter(u=>new Date(u.date__start)>=new Date),[]);if(!(!a.length&&!l.length))return E.jsxs(_o,{title:"Announcements and Events",icon:"calendar3",children:[a.map(({Subject:c,Content:u})=>E.jsxs(tD,{children:[c," ",E.jsx("a",{href:"https://operations.access-ci.org/infrastructure_news_view",children:"Learn more."})]},c)),l.map(c=>E.jsx(rD,{...c},c.title))]})}function aD({children:t,headingLevel:e=2,title:n}){let[r,o]=_.useState(!1),a=`h${e}`;return E.jsxs("div",{className:"accordion",children:[E.jsx(a,{className:"accordion-heading",children:E.jsxs("button",{"aria-expanded":r,onClick:()=>o(!r),children:[n,E.jsx(ct,{name:r?"caret-up-fill":"caret-down-fill"})]})}),E.jsx("div",{className:"accordion-content",style:{display:r?"block":"none"},children:t})]})}function iD({resource_descriptive_name:t,resource_description:e,compute:n,storage:r}){let o=(n||r||{}).recommended_use;return E.jsxs(aD,{title:t,children:[e?zd(e):null,o?E.jsxs(E.Fragment,{children:[E.jsx("h3",{children:"Recommended Use"}),zd(o)]}):null]})}function sD({infoGroupId:t}){let e=Xs(t),n=In(e?e.infoResourceIds.map(u=>`https://operations-api.access-ci.org/wh2/cider/v1/info_resourceid/${u}/?format=json`):null,{defaultValue:[]}),r=n.filter(u=>u.results&&u.results.cider_type=="Compute").map(u=>({...u.results.compute,key:u.results.info_resourceid,name:u.results.resource_descriptive_name,format:(d,f)=>{let p=u.results.compute[f.attr];return f.format&&p?f.format(p,f):p||E.jsx(E.Fragment,{children:"\u2014"})}})),o=n.length?[{name:"Nodes",attr:"node_count",format:u=>u.toLocaleString("en-us")},{name:"CPU Type",attr:"cpu_type"},{name:"CPU Speed",attr:"cpu_speed_ghz",format:u=>`${u} Ghz`},{name:"CPU Cores per Node",attr:"cpu_count_per_node"},{name:"RAM per CPU Core",attr:"memory_per_cpu_gb",format:u=>`${u.toLocaleString("en-us")} GB`},{name:"GPU",attr:"gpu_description"},{name:"Local Storage per Node",attr:"local_storage_per_node_gb",format:u=>`${u.toLocaleString("en-us")} GB`},{name:"Network Interconnect",attr:"interconnect"},{name:"Operating System",attr:"operating_system"},{name:"Batch System",attr:"batch_system"}].filter(u=>r.some(d=>d[u.attr])):[],a={key:"name",name:"Attribute",format:u=>E.jsx("strong",{children:u})},l=r.length>0&&o.length>0,c={compute:[],storage:[],other:[]};for(let{results:u}of n)(c[u.cider_type.toLowerCase()]||c.other).push(E.jsx(iD,{...u},u.resource_descriptive_name));return E.jsxs(E.Fragment,{children:[l||c.compute.length>0?E.jsxs(_o,{title:"Compute Resources",icon:"cpu-fill",children:[c.compute,l&&E.jsxs(E.Fragment,{children:[E.jsx("h3",{children:"Specifications"}),E.jsx(Qd,{columns:[a,...r],rows:o,maxHeight:null})]})]}):null,c.storage.length>0?E.jsx(_o,{title:"Storage Resources",icon:"hdd-fill",children:c.storage}):null,c.other.length>0?E.jsx(_o,{title:"Other Resources",icon:"stars",children:c.other}):null]})}function Cv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ev(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cv(Object(n),!0).forEach(function(r){cD(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dd(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dd=function(e){return typeof e}:dd=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dd(t)}function Vd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lD(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wd(t,e,n){return e&&lD(t.prototype,e),t}function cD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uD(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&lA(t,e)}function Vs(t){return Vs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vs(t)}function lA(t,e){return lA=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},lA(t,e)}function dD(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hD(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fD(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hD(t)}function pD(t){var e=dD();return function(){var n=Vs(t),r;if(e){var o=Vs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fD(this,r)}}function AD(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Vs(t),t!==null););return t}function hd(){return typeof Reflect<"u"&&Reflect.get?hd=Reflect.get:hd=function(t,e,n){var r=AD(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},hd.apply(this,arguments)}function qa(t){console.error("[Glide warn]: ".concat(t))}function to(t){return parseInt(t)}function cA(t){return typeof t=="string"}function rc(t){var e=dd(t);return e==="function"||e==="object"&&!!t}function bd(t){return typeof t=="function"}function mD(t){return typeof t>"u"}function uA(t){return t.constructor===Array}function bD(t,e,n){var r={};for(var o in e)bd(e[o])?r[o]=e[o](t,r,n):qa("Extension must be a function");for(var a in r)bd(r[a].mount)&&r[a].mount();return r}function Vt(t,e,n){Object.defineProperty(t,e,n)}function Sv(t,e){var n=Object.assign({},t,e);if(e.hasOwnProperty("classes")){n.classes=Object.assign({},t.classes,e.classes);var r=["direction","type","slide","arrow","nav"];r.forEach(function(o){e.classes.hasOwnProperty(o)&&(n.classes[o]=Ev(Ev({},t.classes[o]),e.classes[o]))})}return e.hasOwnProperty("breakpoints")&&(n.breakpoints=Object.assign({},t.breakpoints,e.breakpoints)),n}function xD(t,e,n){var r={mount:function(){this._o=!1},make:function(u){var d=this;t.disabled||(!t.settings.waitForTransition||t.disable(),this.move=u,n.emit("run.before",this.move),this.calculate(),n.emit("run",this.move),e.Transition.after(function(){d.isStart()&&n.emit("run.start",d.move),d.isEnd()&&n.emit("run.end",d.move),d.isOffset()&&(d._o=!1,n.emit("run.offset",d.move)),n.emit("run.after",d.move),t.enable()}))},calculate:function(){var u=this.move,d=this.length,f=u.steps,p=u.direction,A=1;if(p==="="){if(t.settings.bound&&to(f)>d){t.index=d;return}t.index=f;return}if(p===">"&&f===">"){t.index=d;return}if(p==="<"&&f==="<"){t.index=0;return}if(p==="|"&&(A=t.settings.perView||1),p===">"||p==="|"&&f===">"){var b=o(A);b>d&&(this._o=!0),t.index=a(b,A);return}if(p==="<"||p==="|"&&f==="<"){var y=l(A);y<0&&(this._o=!0),t.index=c(y,A);return}qa("Invalid direction pattern [".concat(p).concat(f,"] has been used"))},isStart:function(){return t.index<=0},isEnd:function(){return t.index>=this.length},isOffset:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?this._o?u==="|>"?this.move.direction==="|"&&this.move.steps===">":u==="|<"?this.move.direction==="|"&&this.move.steps==="<":this.move.direction===u:!1:this._o},isBound:function(){return t.isType("slider")&&t.settings.focusAt!=="center"&&t.settings.bound}};function o(u){var d=t.index;return t.isType("carousel")?d+u:d+(u-d%u)}function a(u,d){var f=r.length;return u<=f?u:t.isType("carousel")?u-(f+1):t.settings.rewind?r.isBound()&&!r.isEnd()?f:0:r.isBound()?f:Math.floor(f/d)*d}function l(u){var d=t.index;if(t.isType("carousel"))return d-u;var f=Math.ceil(d/u);return(f-1)*u}function c(u,d){var f=r.length;return u>=0?u:t.isType("carousel")?u+(f+1):t.settings.rewind?r.isBound()&&r.isStart()?f:Math.floor(f/d)*d:0}return Vt(r,"move",{get:function(){return this._m},set:function(u){var d=u.substr(1);this._m={direction:u.substr(0,1),steps:d?to(d)?to(d):d:0}}}),Vt(r,"length",{get:function(){var u=t.settings,d=e.Html.slides.length;return this.isBound()?d-1-(to(u.perView)-1)+to(u.focusAt):d-1}}),Vt(r,"offset",{get:function(){return this._o}}),r}function Pv(){return new Date().getTime()}function dx(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,a,l,c=0,u=function(){c=n.leading===!1?0:Pv(),r=null,l=t.apply(o,a),r||(o=a=null)},d=function(){var f=Pv();!c&&n.leading===!1&&(c=f);var p=e-(f-c);return o=this,a=arguments,p<=0||p>e?(r&&(clearTimeout(r),r=null),c=f,l=t.apply(o,a),r||(o=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(u,p)),l};return d.cancel=function(){clearTimeout(r),c=0,r=o=a=null},d}function wD(t,e,n){var r={apply:function(o){for(var a=0,l=o.length;a<l;a++){var c=o[a].style,u=e.Direction.value;a!==0?c[Gu[u][0]]="".concat(this.value/2,"px"):c[Gu[u][0]]="",a!==o.length-1?c[Gu[u][1]]="".concat(this.value/2,"px"):c[Gu[u][1]]=""}},remove:function(o){for(var a=0,l=o.length;a<l;a++){var c=o[a].style;c.marginLeft="",c.marginRight=""}}};return Vt(r,"value",{get:function(){return to(t.settings.gap)}}),Vt(r,"grow",{get:function(){return r.value*e.Sizes.length}}),Vt(r,"reductor",{get:function(){var o=t.settings.perView;return r.value*(o-1)/o}}),n.on(["build.after","update"],dx(function(){r.apply(e.Html.wrapper.children)},30)),n.on("destroy",function(){r.remove(e.Html.wrapper.children)}),r}function hx(t){if(t&&t.parentNode){for(var e=t.parentNode.firstChild,n=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}return[]}function dA(t){return Array.prototype.slice.call(t)}function CD(t,e,n){var r={mount:function(){this.root=t.selector,this.track=this.root.querySelector(kD),this.collectSlides()},collectSlides:function(){this.slides=dA(this.wrapper.children).filter(function(o){return!o.classList.contains(t.settings.classes.slide.clone)})}};return Vt(r,"root",{get:function(){return r._r},set:function(o){cA(o)&&(o=document.querySelector(o)),o!==null?r._r=o:qa("Root element must be a existing Html node")}}),Vt(r,"track",{get:function(){return r._t},set:function(o){r._t=o}}),Vt(r,"wrapper",{get:function(){return r.track.children[0]}}),n.on("update",function(){r.collectSlides()}),r}function ED(t,e,n){var r={mount:function(){this.value=t.settings.peek}};return Vt(r,"value",{get:function(){return r._v},set:function(o){rc(o)?(o.before=to(o.before),o.after=to(o.after)):o=to(o),r._v=o}}),Vt(r,"reductor",{get:function(){var o=r.value,a=t.settings.perView;return rc(o)?o.before/a+o.after/a:o*2/a}}),n.on(["resize","update"],function(){r.mount()}),r}function SD(t,e,n){var r={mount:function(){this._o=0},make:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.offset=a,n.emit("move",{movement:this.value}),e.Transition.after(function(){n.emit("move.after",{movement:o.value})})}};return Vt(r,"offset",{get:function(){return r._o},set:function(o){r._o=mD(o)?0:to(o)}}),Vt(r,"translate",{get:function(){return e.Sizes.slideWidth*t.index}}),Vt(r,"value",{get:function(){var o=this.offset,a=this.translate;return e.Direction.is("rtl")?a+o:a-o}}),n.on(["build.before","run"],function(){r.make()}),r}function PD(t,e,n){var r={setupSlides:function(){for(var o="".concat(this.slideWidth,"px"),a=e.Html.slides,l=0;l<a.length;l++)a[l].style.width=o},setupWrapper:function(){e.Html.wrapper.style.width="".concat(this.wrapperSize,"px")},remove:function(){for(var o=e.Html.slides,a=0;a<o.length;a++)o[a].style.width="";e.Html.wrapper.style.width=""}};return Vt(r,"length",{get:function(){return e.Html.slides.length}}),Vt(r,"width",{get:function(){return e.Html.track.offsetWidth}}),Vt(r,"wrapperSize",{get:function(){return r.slideWidth*r.length+e.Gaps.grow+e.Clones.grow}}),Vt(r,"slideWidth",{get:function(){return r.width/t.settings.perView-e.Peek.reductor-e.Gaps.reductor}}),n.on(["build.before","resize","update"],function(){r.setupSlides(),r.setupWrapper()}),n.on("destroy",function(){r.remove()}),r}function DD(t,e,n){var r={mount:function(){n.emit("build.before"),this.typeClass(),this.activeClass(),n.emit("build.after")},typeClass:function(){e.Html.root.classList.add(t.settings.classes.type[t.settings.type])},activeClass:function(){var o=t.settings.classes,a=e.Html.slides[t.index];a&&(a.classList.add(o.slide.active),hx(a).forEach(function(l){l.classList.remove(o.slide.active)}))},removeClasses:function(){var o=t.settings.classes,a=o.type,l=o.slide;e.Html.root.classList.remove(a[t.settings.type]),e.Html.slides.forEach(function(c){c.classList.remove(l.active)})}};return n.on(["destroy","update"],function(){r.removeClasses()}),n.on(["resize","update"],function(){r.mount()}),n.on("move.after",function(){r.activeClass()}),r}function TD(t,e,n){var r={mount:function(){this.items=[],t.isType("carousel")&&(this.items=this.collect())},collect:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=e.Html.slides,l=t.settings,c=l.perView,u=l.classes,d=l.cloningRatio;if(a.length>0)for(var f=+!!t.settings.peek,p=c+f+Math.round(c/2),A=a.slice(0,p).reverse(),b=a.slice(p*-1),y=0;y<Math.max(d,Math.floor(c/a.length));y++){for(var k=0;k<A.length;k++){var w=A[k].cloneNode(!0);w.classList.add(u.slide.clone),o.push(w)}for(var S=0;S<b.length;S++){var M=b[S].cloneNode(!0);M.classList.add(u.slide.clone),o.unshift(M)}}return o},append:function(){for(var o=this.items,a=e.Html,l=a.wrapper,c=a.slides,u=Math.floor(o.length/2),d=o.slice(0,u).reverse(),f=o.slice(u*-1).reverse(),p="".concat(e.Sizes.slideWidth,"px"),A=0;A<f.length;A++)l.appendChild(f[A]);for(var b=0;b<d.length;b++)l.insertBefore(d[b],c[0]);for(var y=0;y<o.length;y++)o[y].style.width=p},remove:function(){for(var o=this.items,a=0;a<o.length;a++)e.Html.wrapper.removeChild(o[a])}};return Vt(r,"grow",{get:function(){return(e.Sizes.slideWidth+e.Gaps.value)*r.items.length}}),n.on("update",function(){r.remove(),r.mount(),r.append()}),n.on("build.before",function(){t.isType("carousel")&&r.append()}),n.on("destroy",function(){r.remove()}),r}function BD(t,e,n){var r=new fx,o={mount:function(){this.bind()},bind:function(){r.on("resize",window,dx(function(){n.emit("resize")},t.settings.throttle))},unbind:function(){r.off("resize",window)}};return n.on("destroy",function(){o.unbind(),r.destroy()}),o}function _D(t,e,n){var r={mount:function(){this.value=t.settings.direction},resolve:function(o){var a=o.slice(0,1);return this.is("rtl")?o.split(a).join(MD[a]):o},is:function(o){return this.value===o},addClass:function(){e.Html.root.classList.add(t.settings.classes.direction[this.value])},removeClass:function(){e.Html.root.classList.remove(t.settings.classes.direction[this.value])}};return Vt(r,"value",{get:function(){return r._v},set:function(o){ID.indexOf(o)>-1?r._v=o:qa("Direction value must be `ltr` or `rtl`")}}),n.on(["destroy","update"],function(){r.removeClass()}),n.on("update",function(){r.mount()}),n.on(["build.before","update"],function(){r.addClass()}),r}function OD(t,e){return{modify:function(n){return e.Direction.is("rtl")?-n:n}}}function ND(t,e){return{modify:function(n){var r=Math.floor(n/e.Sizes.slideWidth);return n+e.Gaps.value*r}}}function LD(t,e){return{modify:function(n){return n+e.Clones.grow/2}}}function jD(t,e){return{modify:function(n){if(t.settings.focusAt>=0){var r=e.Peek.value;return rc(r)?n-r.before:n-r}return n}}}function FD(t,e){return{modify:function(n){var r=e.Gaps.value,o=e.Sizes.width,a=t.settings.focusAt,l=e.Sizes.slideWidth;return a==="center"?n-(o/2-l/2):n-l*a-r*a}}}function RD(t,e,n){var r=[ND,LD,jD,FD].concat(t._t,[OD]);return{mutate:function(o){for(var a=0;a<r.length;a++){var l=r[a];bd(l)&&bd(l().modify)?o=l(t,e,n).modify(o):qa("Transformer should be a function that returns an object with `modify()` method")}return o}}}function zD(t,e,n){var r={set:function(o){var a=RD(t,e).mutate(o),l="translate3d(".concat(-1*a,"px, 0px, 0px)");e.Html.wrapper.style.mozTransform=l,e.Html.wrapper.style.webkitTransform=l,e.Html.wrapper.style.transform=l},remove:function(){e.Html.wrapper.style.transform=""},getStartIndex:function(){var o=e.Sizes.length,a=t.index,l=t.settings.perView;return e.Run.isOffset(">")||e.Run.isOffset("|>")?o+(a-l):(a+l)%o},getTravelDistance:function(){var o=e.Sizes.slideWidth*t.settings.perView;return e.Run.isOffset(">")||e.Run.isOffset("|>")?o*-1:o}};return n.on("move",function(o){if(!t.isType("carousel")||!e.Run.isOffset())return r.set(o.movement);e.Transition.after(function(){n.emit("translate.jump"),r.set(e.Sizes.slideWidth*t.index)});var a=e.Sizes.slideWidth*e.Translate.getStartIndex();return r.set(a-e.Translate.getTravelDistance())}),n.on("destroy",function(){r.remove()}),r}function QD(t,e,n){var r=!1,o={compose:function(a){var l=t.settings;return r?"".concat(a," 0ms ").concat(l.animationTimingFunc):"".concat(a," ").concat(this.duration,"ms ").concat(l.animationTimingFunc)},set:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";e.Html.wrapper.style.transition=this.compose(a)},remove:function(){e.Html.wrapper.style.transition=""},after:function(a){setTimeout(function(){a()},this.duration)},enable:function(){r=!1,this.set()},disable:function(){r=!0,this.set()}};return Vt(o,"duration",{get:function(){var a=t.settings;return t.isType("slider")&&e.Run.offset?a.rewindDuration:a.animationDuration}}),n.on("move",function(){o.set()}),n.on(["build.before","resize","translate.jump"],function(){o.disable()}),n.on("run",function(){o.enable()}),n.on("destroy",function(){o.remove()}),o}function WD(t,e,n){var r=new fx,o=Dv?{passive:!0}:!1,a={mount:function(){this._n=e.Html.root.querySelectorAll(HD),this._c=e.Html.root.querySelectorAll(ng),this._arrowControls={previous:e.Html.root.querySelectorAll(UD),next:e.Html.root.querySelectorAll(VD)},this.addBindings()},setActive:function(){for(var l=0;l<this._n.length;l++)this.addClass(this._n[l].children)},removeActive:function(){for(var l=0;l<this._n.length;l++)this.removeClass(this._n[l].children)},addClass:function(l){var c=t.settings,u=l[t.index];u&&(u.classList.add(c.classes.nav.active),hx(u).forEach(function(d){d.classList.remove(c.classes.nav.active)}))},removeClass:function(l){var c=l[t.index];c?.classList.remove(t.settings.classes.nav.active)},setArrowState:function(){if(!t.settings.rewind){var l=a._arrowControls.next,c=a._arrowControls.previous;this.resetArrowState(l,c),t.index===0&&this.disableArrow(c),t.index===e.Run.length&&this.disableArrow(l)}},resetArrowState:function(){for(var l=t.settings,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u.forEach(function(f){dA(f).forEach(function(p){p.classList.remove(l.classes.arrow.disabled)})})},disableArrow:function(){for(var l=t.settings,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u.forEach(function(f){dA(f).forEach(function(p){p.classList.add(l.classes.arrow.disabled)})})},addBindings:function(){for(var l=0;l<this._c.length;l++)this.bind(this._c[l].children)},removeBindings:function(){for(var l=0;l<this._c.length;l++)this.unbind(this._c[l].children)},bind:function(l){for(var c=0;c<l.length;c++)r.on("click",l[c],this.click),r.on("touchstart",l[c],this.click,o)},unbind:function(l){for(var c=0;c<l.length;c++)r.off(["click","touchstart"],l[c])},click:function(l){!Dv&&l.type==="touchstart"&&l.preventDefault();var c=l.currentTarget.getAttribute("data-glide-dir");e.Run.make(e.Direction.resolve(c))}};return Vt(a,"items",{get:function(){return a._c}}),n.on(["mount.after","move.after"],function(){a.setActive()}),n.on(["mount.after","run"],function(){a.setArrowState()}),n.on("destroy",function(){a.removeBindings(),a.removeActive(),r.destroy()}),a}function yd({children:t,cssClass:e=""}){let n=_.useRef(null);return _.useEffect(()=>{n.current&&new YD(n.current).mount({Controls:WD})},[]),E.jsx("section",{className:`carousel ${e}`,children:E.jsxs("div",{className:"glide",ref:n,children:[E.jsx("div",{className:"glide__track","data-glide-el":"track",children:E.jsx("ul",{className:"glide__slides",children:t})}),E.jsxs("div",{className:"glide__arrows","data-glide-el":"controls",children:[E.jsx("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:E.jsx("path",{d:"M0 12l10.975 11 2.848-2.828-6.176-6.176H24v-3.992H7.646l6.176-6.176L10.975 1 0 12z"})})}),E.jsx("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:E.jsx("path",{d:"M13.025 1l-2.847 2.828 6.176 6.176h-16.354v3.992h16.354l-6.176 6.176 2.847 2.828 10.975-11z"})})})]})]})})}function Ax({children:t}){return E.jsx("li",{className:"glide__slide",children:t})}function GD({title:t,description:e,linkText:n,linkURI:r,imageURI:o,imageAltText:a}){return E.jsx(Ax,{children:E.jsxs("span",{className:"slide-inner",children:[o&&E.jsx("a",{href:r,className:"slide-image",children:E.jsx("img",{src:o,alt:a})}),E.jsxs("span",{className:"slide-text",children:[t&&E.jsx("h2",{children:t}),e&&E.jsx("p",{children:e}),n&&E.jsx("a",{href:r,children:n})]})]})})}function KD({children:t,maxHeight:e="400px"}){return E.jsx("div",{className:"scroll-text",children:E.jsx("div",{className:"scroll-text-inner",style:{maxHeight:e},children:t})})}function Ku({icon:t,text:e,title:n}){if(e)return E.jsxs("abbr",{className:"project-meta",title:n,children:[E.jsx(ct,{name:t}),e]})}function JD({infoGroupId:t}){let e=Xs(t),n=In(e?`${XD}?${e.infoResourceIds.map(o=>`info_resourceids[]=${o}`).join("&")}`:null);if(!n||!n.projects||!n.projects.length)return null;let r=[{key:"resourceName",name:"Resource"},{key:"allocation",name:"Current Allocation",format:(o,a)=>a.units=="[Yes = 1, No = 0]"?o==1?"Yes":"No":`${o.toLocaleString("en-us")} ${a.units||""}`}];return E.jsx(_o,{title:"Recent Projects",icon:"pc-display",children:E.jsx(yd,{cssclassName:"carousel-projects",children:n.projects.map(o=>E.jsxs(yd.Slide,{children:[E.jsx("h3",{children:o.requestTitle}),E.jsxs("div",{className:"project-metadata",children:[E.jsx(Ku,{icon:"cash-coin",text:o.allocationType,title:"Allocation Type"}),E.jsx(Ku,{icon:"person-fill",text:`${o.pi} (${o.piInstitution})`,title:"Primary Investigator"}),E.jsx(Ku,{icon:"folder",text:o.fos,title:"Field of Science"}),E.jsx(Ku,{icon:"calendar-range",text:[o.beginDate,o.endDate].map(a=>new Date(a).toLocaleString("en-US",{dateStyle:"medium"})).join(" to "),title:"Project Dates"})]}),E.jsxs(KD,{children:[E.jsx("p",{children:o.abstract}),E.jsx(Qd,{columns:r,rows:o.resources,maxHeight:null})]})]},o.requestTitle))})})}function hc(t){return t+.5|0}function ql(t){return Va(hc(t*2.55),0,255)}function Ya(t){return Va(hc(t*255),0,255)}function la(t){return Va(hc(t/2.55)/100,0,1)}function Tv(t){return Va(hc(t*100),0,100)}function t8(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&_r[t[1]]*17,g:255&_r[t[2]]*17,b:255&_r[t[3]]*17,a:e===5?_r[t[4]]*17:255}:(e===7||e===9)&&(n={r:_r[t[1]]<<4|_r[t[2]],g:_r[t[3]]<<4|_r[t[4]],b:_r[t[5]]<<4|_r[t[6]],a:e===9?_r[t[7]]<<4|_r[t[8]]:255})),n}function r8(t){var e=e8(t)?ZD:$D;return t?"#"+e(t.r)+e(t.g)+e(t.b)+n8(t.a,e):void 0}function gx(t,e,n){let r=e*Math.min(n,1-n),o=(a,l=(a+t/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[o(0),o(8),o(4)]}function a8(t,e,n){let r=(o,a=(o+t/60)%6)=>n-n*e*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function i8(t,e,n){let r=gx(t,1,.5),o;for(e+n>1&&(o=1/(e+n),e*=o,n*=o),o=0;o<3;o++)r[o]*=1-e-n,r[o]+=e;return r}function s8(t,e,n,r,o){return t===o?(e-n)/r+(e<n?6:0):e===o?(n-t)/r+2:(t-e)/r+4}function rg(t){let e=t.r/255,n=t.g/255,r=t.b/255,o=Math.max(e,n,r),a=Math.min(e,n,r),l=(o+a)/2,c,u,d;return o!==a&&(d=o-a,u=l>.5?d/(2-o-a):d/(o+a),c=s8(e,n,r,d,o),c=c*60+.5),[c|0,u||0,l]}function og(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Ya)}function ag(t,e,n){return og(gx,t,e,n)}function l8(t,e,n){return og(i8,t,e,n)}function c8(t,e,n){return og(a8,t,e,n)}function mx(t){return(t%360+360)%360}function u8(t){let e=o8.exec(t),n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?ql(+e[5]):Ya(+e[5]));let o=mx(+e[2]),a=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?r=l8(o,a,l):e[1]==="hsv"?r=c8(o,a,l):r=ag(o,a,l),{r:r[0],g:r[1],b:r[2],a:n}}function d8(t,e){var n=rg(t);n[0]=mx(n[0]+e),n=ag(n),t.r=n[0],t.g=n[1],t.b=n[2]}function h8(t){if(!t)return;let e=rg(t),n=e[0],r=Tv(e[1]),o=Tv(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${o}%, ${la(t.a)})`:`hsl(${n}, ${r}%, ${o}%)`}function f8(){let t={},e=Object.keys(Iv),n=Object.keys(Bv),r,o,a,l,c;for(r=0;r<e.length;r++){for(l=c=e[r],o=0;o<n.length;o++)a=n[o],c=c.replace(a,Bv[a]);a=parseInt(Iv[l],16),t[c]=[a>>16&255,a>>8&255,a&255]}return t}function p8(t){Ju||(Ju=f8(),Ju.transparent=[0,0,0,0]);let e=Ju[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}function g8(t){let e=A8.exec(t),n=255,r,o,a;if(e){if(e[7]!==r){let l=+e[7];n=e[8]?ql(l):Va(l*255,0,255)}return r=+e[1],o=+e[3],a=+e[5],r=255&(e[2]?ql(r):Va(r,0,255)),o=255&(e[4]?ql(o):Va(o,0,255)),a=255&(e[6]?ql(a):Va(a,0,255)),{r,g:o,b:a,a:n}}}function m8(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${la(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}function b8(t,e,n){let r=Os(la(t.r)),o=Os(la(t.g)),a=Os(la(t.b));return{r:Ya(Up(r+n*(Os(la(e.r))-r))),g:Ya(Up(o+n*(Os(la(e.g))-o))),b:Ya(Up(a+n*(Os(la(e.b))-a))),a:t.a+n*(e.a-t.a)}}function Zu(t,e,n){if(t){let r=rg(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=ag(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function bx(t,e){return t&&Object.assign(e||{},t)}function Mv(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ya(t[3]))):(e=bx(t,{r:0,g:0,b:0,a:1}),e.a=Ya(e.a)),e}function y8(t){return t.charAt(0)==="r"?g8(t):u8(t)}function aa(){}function St(t){return t==null}function on(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ht(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Fr(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Po(t,e){return Fr(t)?t:e}function pt(t,e){return typeof t>"u"?e:t}function _t(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function yt(t,e,n,r){let o,a,l;if(on(t))for(a=t.length,o=0;o<a;o++)e.call(n,t[o],o);else if(ht(t))for(l=Object.keys(t),a=l.length,o=0;o<a;o++)e.call(n,t[l[o]],l[o])}function xd(t,e){let n,r,o,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(o=t[n],a=e[n],o.datasetIndex!==a.datasetIndex||o.index!==a.index)return!1;return!0}function wd(t){if(on(t))return t.map(wd);if(ht(t)){let e=Object.create(null),n=Object.keys(t),r=n.length,o=0;for(;o<r;++o)e[n[o]]=wd(t[n[o]]);return e}return t}function vx(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function w8(t,e,n,r){if(!vx(t))return;let o=e[t],a=n[t];ht(o)&&ht(a)?oc(o,a,r):e[t]=wd(a)}function oc(t,e,n){let r=on(e)?e:[e],o=r.length;if(!ht(t))return t;n=n||{};let a=n.merger||w8,l;for(let c=0;c<o;++c){if(l=r[c],!ht(l))continue;let u=Object.keys(l);for(let d=0,f=u.length;d<f;++d)a(u[d],t,l,n)}return t}function Zl(t,e){return oc(t,e,{merger:k8})}function k8(t,e,n){if(!vx(t))return;let r=e[t],o=n[t];ht(r)&&ht(o)?Zl(r,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=wd(o))}function C8(t){let e=t.split("."),n=[],r="";for(let o of e)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function E8(t){let e=C8(t);return n=>{for(let r of e){if(r==="")break;n=n&&n[r]}return n}}function Ka(t,e){return(_v[e]||(_v[e]=E8(e)))(t)}function ig(t){return t.charAt(0).toUpperCase()+t.slice(1)}function S8(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}function fd(t,e,n){return Math.abs(t-e)<n}function Lv(t){let e=Math.round(t);t=fd(t,e,t/1e3)?e:t;let n=Math.pow(10,Math.floor(xx(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function D8(t){let e=[],n=Math.sqrt(t),r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((o,a)=>o-a).pop(),e}function T8(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Cd(t){return!T8(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function B8(t,e){let n=Math.round(t);return n-e<=t&&n+e>=t}function I8(t,e,n){let r,o,a;for(r=0,o=t.length;r<o;r++)a=t[r][n],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Io(t){return t*(an/180)}function M8(t){return t*(180/an)}function jv(t){if(!Fr(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function _8(t,e){let n=e.x-t.x,r=e.y-t.y,o=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*an&&(a+=vr),{angle:a,distance:o}}function O8(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Mi(t){return(t%vr+vr)%vr}function fA(t,e,n,r){let o=Mi(t),a=Mi(e),l=Mi(n),c=Mi(a-o),u=Mi(l-o),d=Mi(o-a),f=Mi(o-l);return o===a||o===l||r&&a===l||c>u&&d<f}function ro(t,e,n){return Math.max(e,Math.min(n,t))}function N8(t){return ro(t,-32768,32767)}function Ls(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function sg(t,e,n){n=n||(l=>t[l]<e);let r=t.length-1,o=0,a;for(;r-o>1;)a=o+r>>1,n(a)?o=a:r=a;return{lo:o,hi:r}}function j8(t,e,n){let r=0,o=t.length;for(;r<o&&t[r]<e;)r++;for(;o>r&&t[o-1]>n;)o--;return r>0||o<t.length?t.slice(r,o):t}function F8(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),wx.forEach(n=>{let r="_onData"+ig(n),o=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...a){let l=o.apply(this,a);return t._chartjs.listeners.forEach(c=>{typeof c[r]=="function"&&c[r](...a)}),l}})})}function Fv(t,e){let n=t._chartjs;if(!n)return;let r=n.listeners,o=r.indexOf(e);o!==-1&&r.splice(o,1),!(r.length>0)&&(wx.forEach(a=>{delete t[a]}),delete t._chartjs)}function kx(t){let e=new Set(t);return e.size===t.length?t:Array.from(e)}function Ex(t,e){let n=[],r=!1;return function(...o){n=o,r||(r=!0,Cx.call(window,()=>{r=!1,t.apply(e,n)}))}}function R8(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}function Sx(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Qv(t){return Sx(t)?t:new vd(t)}function Vp(t){return Sx(t)?t:new vd(t).saturate(.5).darken(.1).hexString()}function U8(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:H8},numbers:{type:"number",properties:Q8}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function V8(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}function W8(t,e){e=e||{};let n=t+JSON.stringify(e),r=Hv.get(n);return r||(r=new Intl.NumberFormat(t,e),Hv.set(n,r)),r}function qd(t,e,n){return W8(e,n).format(t)}function Y8(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}function G8(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Px.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}function ec(t,e){if(!e)return t;let n=e.split(".");for(let r=0,o=n.length;r<o;++r){let a=n[r];t=t[a]||(t[a]=Object.create(null))}return t}function Wp(t,e,n){return typeof e=="string"?oc(ec(t,e),n):oc(ec(t,""),e)}function K8(t){return!t||St(t.size)||St(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Uv(t,e,n,r,o){let a=e[o];return a||(a=e[o]=t.measureText(o).width,n.push(o)),a>r&&(r=a),r}function _i(t,e,n){let r=t.currentDevicePixelRatio,o=n!==0?Math.max(n/2,.5):0;return Math.round((e-o)*r)/r+o}function Vv(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Wv(t,e,n,r){Dx(t,e,n,r,null)}function Dx(t,e,n,r,o){let a,l,c,u,d,f,p,A,b=e.pointStyle,y=e.rotation,k=e.radius,w=(y||0)*P8;if(b&&typeof b=="object"&&(a=b.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(w),t.drawImage(b,-b.width/2,-b.height/2,b.width,b.height),t.restore();return}if(!(isNaN(k)||k<=0)){switch(t.beginPath(),b){default:o?t.ellipse(n,r,o/2,k,0,0,vr):t.arc(n,r,k,0,vr),t.closePath();break;case"triangle":f=o?o/2:k,t.moveTo(n+Math.sin(w)*f,r-Math.cos(w)*k),w+=Nv,t.lineTo(n+Math.sin(w)*f,r-Math.cos(w)*k),w+=Nv,t.lineTo(n+Math.sin(w)*f,r-Math.cos(w)*k),t.closePath();break;case"rectRounded":d=k*.516,u=k-d,l=Math.cos(w+Ii)*u,p=Math.cos(w+Ii)*(o?o/2-d:u),c=Math.sin(w+Ii)*u,A=Math.sin(w+Ii)*(o?o/2-d:u),t.arc(n-p,r-c,d,w-an,w-xr),t.arc(n+A,r-l,d,w-xr,w),t.arc(n+p,r+c,d,w,w+xr),t.arc(n-A,r+l,d,w+xr,w+an),t.closePath();break;case"rect":if(!y){u=Math.SQRT1_2*k,f=o?o/2:u,t.rect(n-f,r-u,2*f,2*u);break}w+=Ii;case"rectRot":p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+A,r-l),t.lineTo(n+p,r+c),t.lineTo(n-A,r+l),t.closePath();break;case"crossRot":w+=Ii;case"cross":p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+p,r+c),t.moveTo(n+A,r-l),t.lineTo(n-A,r+l);break;case"star":p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+p,r+c),t.moveTo(n+A,r-l),t.lineTo(n-A,r+l),w+=Ii,p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+p,r+c),t.moveTo(n+A,r-l),t.lineTo(n-A,r+l);break;case"line":l=o?o/2:Math.cos(w)*k,c=Math.sin(w)*k,t.moveTo(n-l,r-c),t.lineTo(n+l,r+c);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(w)*(o?o/2:k),r+Math.sin(w)*k);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Tx(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function cg(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ug(t){t.restore()}function X8(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),St(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function J8(t,e,n,r,o){if(o.strikethrough||o.underline){let a=t.measureText(r),l=e-a.actualBoundingBoxLeft,c=e+a.actualBoundingBoxRight,u=n-a.actualBoundingBoxAscent,d=n+a.actualBoundingBoxDescent,f=o.strikethrough?(u+d)/2:d;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(l,f),t.lineTo(c,f),t.stroke()}}function Z8(t,e){let n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function ic(t,e,n,r,o,a={}){let l=on(e)?e:[e],c=a.strokeWidth>0&&a.strokeColor!=="",u,d;for(t.save(),t.font=o.string,X8(t,a),u=0;u<l.length;++u)d=l[u],a.backdrop&&Z8(t,a.backdrop),c&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),St(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(d,n,r,a.maxWidth)),t.fillText(d,n,r,a.maxWidth),J8(t,n,r,d,a),r+=Number(o.lineHeight);t.restore()}function Ed(t,e){let{x:n,y:r,w:o,h:a,radius:l}=e;t.arc(n+l.topLeft,r+l.topLeft,l.topLeft,1.5*an,an,!0),t.lineTo(n,r+a-l.bottomLeft),t.arc(n+l.bottomLeft,r+a-l.bottomLeft,l.bottomLeft,an,xr,!0),t.lineTo(n+o-l.bottomRight,r+a),t.arc(n+o-l.bottomRight,r+a-l.bottomRight,l.bottomRight,xr,0,!0),t.lineTo(n+o,r+l.topRight),t.arc(n+o-l.topRight,r+l.topRight,l.topRight,0,-xr,!0),t.lineTo(n+l.topLeft,r)}function tT(t,e){let n=(""+t).match($8);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}function Bx(t,e){let n={},r=ht(e),o=r?Object.keys(e):e,a=ht(t)?r?l=>pt(t[l],t[e[l]]):l=>t[l]:()=>t;for(let l of o)n[l]=nT(a(l));return n}function Ix(t){return Bx(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Fs(t){return Bx(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Rr(t){let e=Ix(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Bn(t,e){t=t||{},e=e||zt.font;let n=pt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=pt(t.style,e.style);r&&!(""+r).match(eT)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);let o={family:pt(t.family,e.family),lineHeight:tT(pt(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:pt(t.weight,e.weight),string:""};return o.string=K8(o),o}function ed(t,e,n,r){let o,a,l;for(o=0,a=t.length;o<a;++o)if(l=t[o],l!==void 0&&l!==void 0)return l}function rT(t,e,n){let{min:r,max:o}=t,a=yx(e,(o-r)/2),l=(c,u)=>n&&c===0?0:c+u;return{min:l(r,-Math.abs(a)),max:l(o,a)}}function Gs(t,e){return Object.assign(Object.create(t),e)}function dg(t,e=[""],n,r,o=()=>t[0]){let a=n||t;typeof r>"u"&&(r=Nx("_fallback",t));let l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:r,_getTarget:o,override:c=>dg([c,...t],e,a,r)};return new Proxy(l,{deleteProperty(c,u){return delete c[u],delete c._keys,delete t[0][u],!0},get(c,u){return _x(c,u,()=>dT(u,e,t,c))},getOwnPropertyDescriptor(c,u){return Reflect.getOwnPropertyDescriptor(c._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(c,u){return Yv(c).includes(u)},ownKeys(c){return Yv(c)},set(c,u,d){let f=c._storage||(c._storage=o());return c[u]=f[u]=d,delete c._keys,!0}})}function Ws(t,e,n,r){let o={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Mx(t,r),setContext:a=>Ws(t,a,n,r),override:a=>Ws(t.override(a),e,n,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete t[l],!0},get(a,l,c){return _x(a,l,()=>aT(a,l,c))},getOwnPropertyDescriptor(a,l){return a._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(a,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(a,l,c){return t[l]=c,delete a[l],!0}})}function Mx(t,e={scriptable:!0,indexable:!0}){let{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:n,indexable:r,isScriptable:Xa(n)?n:()=>n,isIndexable:Xa(r)?r:()=>r}}function _x(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];let r=n();return t[e]=r,r}function aT(t,e,n){let{_proxy:r,_context:o,_subProxy:a,_descriptors:l}=t,c=r[e];return Xa(c)&&l.isScriptable(e)&&(c=iT(e,c,t,n)),on(c)&&c.length&&(c=sT(e,c,t,l.isIndexable)),hg(e,c)&&(c=Ws(c,o,a&&a[e],l)),c}function iT(t,e,n,r){let{_proxy:o,_context:a,_subProxy:l,_stack:c}=n;if(c.has(t))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t);c.add(t);let u=e(a,l||r);return c.delete(t),hg(t,u)&&(u=fg(o._scopes,o,t,u)),u}function sT(t,e,n,r){let{_proxy:o,_context:a,_subProxy:l,_descriptors:c}=n;if(typeof a.index<"u"&&r(t))return e[a.index%e.length];if(ht(e[0])){let u=e,d=o._scopes.filter(f=>f!==u);e=[];for(let f of u){let p=fg(d,o,t,f);e.push(Ws(p,a,l&&l[t],c))}}return e}function Ox(t,e,n){return Xa(t)?t(e,n):t}function cT(t,e,n,r,o){for(let a of e){let l=lT(n,a);if(l){t.add(l);let c=Ox(l._fallback,n,o);if(typeof c<"u"&&c!==n&&c!==r)return c}else if(l===!1&&typeof r<"u"&&n!==r)return null}return!1}function fg(t,e,n,r){let o=e._rootScopes,a=Ox(e._fallback,n,r),l=[...t,...o],c=new Set;c.add(r);let u=qv(c,l,n,a||n,r);return u===null||typeof a<"u"&&a!==n&&(u=qv(c,l,a,u,r),u===null)?!1:dg(Array.from(c),[""],o,a,()=>uT(e,n,r))}function qv(t,e,n,r,o){for(;n;)n=cT(t,e,n,r,o);return n}function uT(t,e,n){let r=t._getTarget();e in r||(r[e]={});let o=r[e];return on(o)&&ht(n)?n:o||{}}function dT(t,e,n,r){let o;for(let a of e)if(o=Nx(oT(a,t),n),typeof o<"u")return hg(t,o)?fg(n,r,t,o):o}function Nx(t,e){for(let n of e){if(!n)continue;let r=n[t];if(typeof r<"u")return r}}function Yv(t){let e=t._keys;return e||(e=t._keys=hT(t._scopes)),e}function hT(t){let e=new Set;for(let n of t)for(let r of Object.keys(n).filter(o=>!o.startsWith("_")))e.add(r);return Array.from(e)}function fT(t,e,n,r){let{iScale:o}=t,{key:a="r"}=this._parsing,l=new Array(r),c,u,d,f;for(c=0,u=r;c<u;++c)d=c+n,f=e[d],l[c]={r:o.parse(Ka(f,a),d)};return l}function pg(){return typeof window<"u"&&typeof document<"u"}function Ag(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Sd(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}function pT(t,e){return Yd(t).getPropertyValue(e)}function Ri(t,e,n){let r={};n=n?"-"+n:"";for(let o=0;o<4;o++){let a=AT[o];r[a]=parseFloat(t[e+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function mT(t,e){let n=t.touches,r=n&&n.length?n[0]:t,{offsetX:o,offsetY:a}=r,l=!1,c,u;if(gT(o,a,t.target))c=o,u=a;else{let d=e.getBoundingClientRect();c=r.clientX-d.left,u=r.clientY-d.top,l=!0}return{x:c,y:u,box:l}}function Li(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:r}=e,o=Yd(n),a=o.boxSizing==="border-box",l=Ri(o,"padding"),c=Ri(o,"border","width"),{x:u,y:d,box:f}=mT(t,n),p=l.left+(f&&c.left),A=l.top+(f&&c.top),{width:b,height:y}=e;return a&&(b-=l.width+c.width,y-=l.height+c.height),{x:Math.round((u-p)/b*n.width/r),y:Math.round((d-A)/y*n.height/r)}}function bT(t,e,n){let r,o;if(e===void 0||n===void 0){let a=t&&Ag(t);if(!a)e=t.clientWidth,n=t.clientHeight;else{let l=a.getBoundingClientRect(),c=Yd(a),u=Ri(c,"border","width"),d=Ri(c,"padding");e=l.width-d.width-u.width,n=l.height-d.height-u.height,r=Sd(c.maxWidth,a,"clientWidth"),o=Sd(c.maxHeight,a,"clientHeight")}}return{width:e,height:n,maxWidth:r||kd,maxHeight:o||kd}}function yT(t,e,n,r){let o=Yd(t),a=Ri(o,"margin"),l=Sd(o.maxWidth,t,"clientWidth")||kd,c=Sd(o.maxHeight,t,"clientHeight")||kd,u=bT(t,e,n),{width:d,height:f}=u;if(o.boxSizing==="content-box"){let p=Ri(o,"border","width"),A=Ri(o,"padding");d-=A.width+p.width,f-=A.height+p.height}return d=Math.max(0,d-a.width),f=Math.max(0,r?d/r:f-a.height),d=td(Math.min(d,l,u.maxWidth)),f=td(Math.min(f,c,u.maxHeight)),d&&!f&&(f=td(d/2)),(e!==void 0||n!==void 0)&&r&&u.height&&f>u.height&&(f=u.height,d=td(Math.floor(f*r))),{width:d,height:f}}function Gv(t,e,n){let r=e||1,o=Math.floor(t.height*r),a=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||l.height!==o||l.width!==a?(t.currentDevicePixelRatio=r,l.height=o,l.width=a,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}function Kv(t,e){let n=pT(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Rs(t,e,n){return t?xT(e,n):wT()}function Lx(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function jx(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function nd(t,e,n){return t.options.clip?t[n]:e[n]}function kT(t,e){let{xScale:n,yScale:r}=t;return n&&r?{left:nd(n,e,"left"),right:nd(n,e,"right"),top:nd(r,e,"top"),bottom:nd(r,e,"bottom")}:e}function CT(t,e){let n=e._clip;if(n.disabled)return!1;let r=kT(e,t.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:r.bottom+(n.bottom===!0?0:n.bottom)}}function ST(t,e){let n=[],r=Object.keys(e);for(let o=0;o<r.length;o++){let a=t[r[o]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function PT(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Jv(t,e){let n=t&&t.options||{},r=n.reverse,o=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:r?a:o,end:r?o:a}}function DT(t,e,n){if(n===!1)return!1;let r=Jv(t,n),o=Jv(e,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}function TT(t){let e,n,r,o;return ht(t)?(e=t.top,n=t.right,r=t.bottom,o=t.left):e=n=r=o=t,{top:e,right:n,bottom:r,left:o,disabled:t===!1}}function Fx(t,e){let n=[],r=t._getSortedDatasetMetas(e),o,a;for(o=0,a=r.length;o<a;++o)n.push(r[o].index);return n}function Zv(t,e,n,r={}){let o=t.keys,a=r.mode==="single",l,c,u,d;if(e===null)return;let f=!1;for(l=0,c=o.length;l<c;++l){if(u=+o[l],u===n){if(f=!0,r.all)continue;break}d=t.values[u],Fr(d)&&(a||e===0||Ga(e)===Ga(d))&&(e+=d)}return!f&&!r.all?0:e}function BT(t,e){let{iScale:n,vScale:r}=e,o=n.axis==="x"?"x":"y",a=r.axis==="x"?"x":"y",l=Object.keys(t),c=new Array(l.length),u,d,f;for(u=0,d=l.length;u<d;++u)f=l[u],c[u]={[o]:f,[a]:t[f]};return c}function qp(t,e){let n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function IT(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function MT(t){let{min:e,max:n,minDefined:r,maxDefined:o}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}function _T(t,e,n){let r=t[e]||(t[e]={});return r[n]||(r[n]={})}function $v(t,e,n,r){for(let o of e.getMatchingVisibleMetas(r).reverse()){let a=t[o.index];if(n&&a>0||!n&&a<0)return o.index}return null}function e1(t,e){let{chart:n,_cachedMeta:r}=t,o=n._stacks||(n._stacks={}),{iScale:a,vScale:l,index:c}=r,u=a.axis,d=l.axis,f=IT(a,l,r),p=e.length,A;for(let b=0;b<p;++b){let y=e[b],{[u]:k,[d]:w}=y,S=y._stacks||(y._stacks={});A=S[d]=_T(o,f,k),A[c]=w,A._top=$v(A,l,!0,r.type),A._bottom=$v(A,l,!1,r.type);let M=A._visualValues||(A._visualValues={});M[c]=w}}function Yp(t,e){let n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function OT(t,e){return Gs(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function NT(t,e,n){return Gs(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Ql(t,e){let n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(let o of e){let a=o._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}function jT(t,e){if(!t._cache.$bar){let n=t.getMatchingVisibleMetas(e),r=[];for(let o=0,a=n.length;o<a;o++)r=r.concat(n[o].controller.getAllParsedValues(t));t._cache.$bar=kx(r.sort((o,a)=>o-a))}return t._cache.$bar}function FT(t){let e=t.iScale,n=jT(e,t.type),r=e._length,o,a,l,c,u=()=>{l===32767||l===-32768||(ac(c)&&(r=Math.min(r,Math.abs(l-c)||r)),c=l)};for(o=0,a=n.length;o<a;++o)l=e.getPixelForValue(n[o]),u();for(c=void 0,o=0,a=e.ticks.length;o<a;++o)l=e.getPixelForTick(o),u();return r}function RT(t,e,n,r){let o=n.barThickness,a,l;return St(o)?(a=e.min*n.categoryPercentage,l=n.barPercentage):(a=o*r,l=1),{chunk:a/r,ratio:l,start:e.pixels[t]-a/2}}function zT(t,e,n,r){let o=e.pixels,a=o[t],l=t>0?o[t-1]:null,c=t<o.length-1?o[t+1]:null,u=n.categoryPercentage;l===null&&(l=a-(c===null?e.end-e.start:c-a)),c===null&&(c=a+a-l);let d=a-(a-Math.min(l,c))/2*u;return{chunk:Math.abs(c-l)/2*u/r,ratio:n.barPercentage,start:d}}function QT(t,e,n,r){let o=n.parse(t[0],r),a=n.parse(t[1],r),l=Math.min(o,a),c=Math.max(o,a),u=l,d=c;Math.abs(l)>Math.abs(c)&&(u=c,d=l),e[n.axis]=d,e._custom={barStart:u,barEnd:d,start:o,end:a,min:l,max:c}}function Rx(t,e,n,r){return on(t)?QT(t,e,n,r):e[n.axis]=n.parse(t,r),e}function n1(t,e,n,r){let o=t.iScale,a=t.vScale,l=o.getLabels(),c=o===a,u=[],d,f,p,A;for(d=n,f=n+r;d<f;++d)A=e[d],p={},p[o.axis]=c||o.parse(l[d],d),u.push(Rx(A,p,a,d));return u}function Kp(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function HT(t,e,n){return t!==0?Ga(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function UT(t){let e,n,r,o,a;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(o="end",a="start"):(o="start",a="end"),{start:n,end:r,reverse:e,top:o,bottom:a}}function VT(t,e,n,r){let o=e.borderSkipped,a={};if(!o){t.borderSkipped=a;return}if(o===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:l,end:c,reverse:u,top:d,bottom:f}=UT(t);o==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?o=d:(n._bottom||0)===r?o=f:(a[r1(f,l,c,u)]=!0,o=d)),a[r1(o,l,c,u)]=!0,t.borderSkipped=a}function r1(t,e,n,r){return r?(t=WT(t,e,n),t=o1(t,n,e)):t=o1(t,e,n),t}function WT(t,e,n){return t===e?n:t===n?e:t}function o1(t,e,n){return t==="start"?e:t==="end"?n:t}function qT(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}function YT(t,e,n){let r=1,o=1,a=0,l=0;if(e<vr){let c=t,u=c+e,d=Math.cos(c),f=Math.sin(c),p=Math.cos(u),A=Math.sin(u),b=(T,P,R)=>fA(T,c,u,!0)?1:Math.max(P,P*n,R,R*n),y=(T,P,R)=>fA(T,c,u,!0)?-1:Math.min(P,P*n,R,R*n),k=b(0,d,p),w=b(xr,f,A),S=y(an,d,p),M=y(an+xr,f,A);r=(k-S)/2,o=(w-M)/2,a=-(k+S)/2,l=-(w+M)/2}return{ratioX:r,ratioY:o,offsetX:a,offsetY:l}}function Oi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}function KT(t,e,n,r){let{controller:o,data:a,_sorted:l}=t,c=o._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&e===c.axis&&e!=="r"&&l&&a.length){let d=c._reversePixels?L8:pA;if(r){if(o._sharedOptions){let f=a[0],p=typeof f.getRange=="function"&&f.getRange(e);if(p){let A=d(a,e,n-p),b=d(a,e,n+p);return{lo:A.lo,hi:b.hi}}}}else{let f=d(a,e,n);if(u){let{vScale:p}=o._cachedMeta,{_parsed:A}=t,b=A.slice(0,f.lo+1).reverse().findIndex(k=>!St(k[p.axis]));f.lo-=Math.max(0,b);let y=A.slice(f.hi).findIndex(k=>!St(k[p.axis]));f.hi+=Math.max(0,y)}return f}}return{lo:0,hi:a.length-1}}function Gd(t,e,n,r,o){let a=t.getSortedVisibleDatasetMetas(),l=n[e];for(let c=0,u=a.length;c<u;++c){let{index:d,data:f}=a[c],{lo:p,hi:A}=KT(a[c],e,l,o);for(let b=p;b<=A;++b){let y=f[b];y.skip||r(y,d,b)}}}function XT(t){let e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,o){let a=e?Math.abs(r.x-o.x):0,l=n?Math.abs(r.y-o.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(l,2))}}function Xp(t,e,n,r,o){let a=[];return!o&&!t.isPointInArea(e)||Gd(t,n,e,function(l,c,u){!o&&!Tx(l,t.chartArea,0)||l.inRange(e.x,e.y,r)&&a.push({element:l,datasetIndex:c,index:u})},!0),a}function JT(t,e,n,r){let o=[];function a(l,c,u){let{startAngle:d,endAngle:f}=l.getProps(["startAngle","endAngle"],r),{angle:p}=_8(l,{x:e.x,y:e.y});fA(p,d,f)&&o.push({element:l,datasetIndex:c,index:u})}return Gd(t,n,e,a),o}function ZT(t,e,n,r,o,a){let l=[],c=XT(n),u=Number.POSITIVE_INFINITY;function d(f,p,A){let b=f.inRange(e.x,e.y,o);if(r&&!b)return;let y=f.getCenterPoint(o);if(!(a||t.isPointInArea(y))&&!b)return;let k=c(e,y);k<u?(l=[{element:f,datasetIndex:p,index:A}],u=k):k===u&&l.push({element:f,datasetIndex:p,index:A})}return Gd(t,n,e,d),l}function Jp(t,e,n,r,o,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!r?JT(t,e,n,o):ZT(t,e,n,r,o,a)}function a1(t,e,n,r,o){let a=[],l=n==="x"?"inXRange":"inYRange",c=!1;return Gd(t,n,e,(u,d,f)=>{u[l]&&u[l](e[n],o)&&(a.push({element:u,datasetIndex:d,index:f}),c=c||u.inRange(e.x,e.y,o))}),r&&!c?[]:a}function Hl(t,e){return t.filter(n=>n.pos===e)}function i1(t,e){return t.filter(n=>zx.indexOf(n.pos)===-1&&n.box.axis===e)}function Ul(t,e){return t.sort((n,r)=>{let o=e?r:n,a=e?n:r;return o.weight===a.weight?o.index-a.index:o.weight-a.weight})}function eB(t){let e=[],n,r,o,a,l,c;for(n=0,r=(t||[]).length;n<r;++n)o=t[n],{position:a,options:{stack:l,stackWeight:c=1}}=o,e.push({index:n,box:o,pos:a,horizontal:o.isHorizontal(),weight:o.weight,stack:l&&a+l,stackWeight:c});return e}function tB(t){let e={};for(let n of t){let{stack:r,pos:o,stackWeight:a}=n;if(!r||!zx.includes(o))continue;let l=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=a}return e}function nB(t,e){let n=tB(t),{vBoxMaxWidth:r,hBoxMaxHeight:o}=e,a,l,c;for(a=0,l=t.length;a<l;++a){c=t[a];let{fullSize:u}=c.box,d=n[c.stack],f=d&&c.stackWeight/d.weight;c.horizontal?(c.width=f?f*r:u&&e.availableWidth,c.height=o):(c.width=r,c.height=f?f*o:u&&e.availableHeight)}return n}function rB(t){let e=eB(t),n=Ul(e.filter(d=>d.box.fullSize),!0),r=Ul(Hl(e,"left"),!0),o=Ul(Hl(e,"right")),a=Ul(Hl(e,"top"),!0),l=Ul(Hl(e,"bottom")),c=i1(e,"x"),u=i1(e,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:o.concat(u).concat(l).concat(c),chartArea:Hl(e,"chartArea"),vertical:r.concat(o).concat(u),horizontal:a.concat(l).concat(c)}}function s1(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function Qx(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function oB(t,e,n,r){let{pos:o,box:a}=n,l=t.maxPadding;if(!ht(o)){n.size&&(t[o]-=n.size);let p=r[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?a.height:a.width),n.size=p.size/p.count,t[o]+=n.size}a.getPadding&&Qx(l,a.getPadding());let c=Math.max(0,e.outerWidth-s1(l,t,"left","right")),u=Math.max(0,e.outerHeight-s1(l,t,"top","bottom")),d=c!==t.w,f=u!==t.h;return t.w=c,t.h=u,n.horizontal?{same:d,other:f}:{same:f,other:d}}function aB(t){let e=t.maxPadding;function n(r){let o=Math.max(e[r]-t[r],0);return t[r]+=o,o}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function iB(t,e){let n=e.maxPadding;function r(o){let a={left:0,top:0,right:0,bottom:0};return o.forEach(l=>{a[l]=Math.max(e[l],n[l])}),a}return r(t?["left","right"]:["top","bottom"])}function Yl(t,e,n,r){let o=[],a,l,c,u,d,f;for(a=0,l=t.length,d=0;a<l;++a){c=t[a],u=c.box,u.update(c.width||e.w,c.height||e.h,iB(c.horizontal,e));let{same:p,other:A}=oB(e,n,c,r);d|=p&&o.length,f=f||A,u.fullSize||o.push(c)}return d&&Yl(o,e,n,r)||f}function rd(t,e,n,r,o){t.top=n,t.left=e,t.right=e+r,t.bottom=n+o,t.width=r,t.height=o}function l1(t,e,n,r){let o=n.padding,{x:a,y:l}=e;for(let c of t){let u=c.box,d=r[c.stack]||{placed:0,weight:1},f=c.stackWeight/d.weight||1;if(c.horizontal){let p=e.w*f,A=d.size||u.height;ac(d.start)&&(l=d.start),u.fullSize?rd(u,o.left,l,n.outerWidth-o.right-o.left,A):rd(u,e.left+d.placed,l,p,A),d.start=l,d.placed+=p,l=u.bottom}else{let p=e.h*f,A=d.size||u.width;ac(d.start)&&(a=d.start),u.fullSize?rd(u,a,o.top,A,n.outerHeight-o.bottom-o.top):rd(u,a,e.top+d.placed,A,p),d.start=a,d.placed+=p,a=u.right}}e.x=a,e.y=l}function lB(t,e){let n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[pd]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",c1(o)){let a=Kv(t,"width");a!==void 0&&(t.width=a)}if(c1(r))if(t.style.height==="")t.height=t.width/(e||2);else{let a=Kv(t,"height");a!==void 0&&(t.height=a)}return t}function cB(t,e,n){t&&t.addEventListener(e,n,Hx)}function uB(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Hx)}function dB(t,e){let n=sB[t.type]||t.type,{x:r,y:o}=Li(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:o!==void 0?o:null}}function Td(t,e){for(let n of t)if(n===e||n.contains(e))return!0}function hB(t,e,n){let r=t.canvas,o=new MutationObserver(a=>{let l=!1;for(let c of a)l=l||Td(c.addedNodes,r),l=l&&!Td(c.removedNodes,r);l&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function fB(t,e,n){let r=t.canvas,o=new MutationObserver(a=>{let l=!1;for(let c of a)l=l||Td(c.removedNodes,r),l=l&&!Td(c.addedNodes,r);l&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function Ux(){let t=window.devicePixelRatio;t!==u1&&(u1=t,sc.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function pB(t,e){sc.size||window.addEventListener("resize",Ux),sc.set(t,e)}function AB(t){sc.delete(t),sc.size||window.removeEventListener("resize",Ux)}function gB(t,e,n){let r=t.canvas,o=r&&Ag(r);if(!o)return;let a=Ex((c,u)=>{let d=o.clientWidth;n(c,u),d<o.clientWidth&&n()},window),l=new ResizeObserver(c=>{let u=c[0],d=u.contentRect.width,f=u.contentRect.height;d===0&&f===0||a(d,f)});return l.observe(o),pB(t,a),l}function Zp(t,e,n){n&&n.disconnect(),e==="resize"&&AB(t)}function mB(t,e,n){let r=t.canvas,o=Ex(a=>{t.ctx!==null&&n(dB(a,t))},t);return cB(r,e,o),o}function bB(t){return!pg()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?kA:CA}function yB(t,e){let n=t.options.ticks,r=vB(t),o=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?wB(e):[],l=a.length,c=a[0],u=a[l-1],d=[];if(l>o)return kB(e,d,a,l/o),d;let f=xB(a,e,o);if(l>0){let p,A,b=l>1?Math.round((u-c)/(l-1)):null;for(od(e,d,f,St(b)?0:c-b,c),p=0,A=l-1;p<A;p++)od(e,d,f,a[p],a[p+1]);return od(e,d,f,u,St(b)?e.length:u+b),d}return od(e,d,f),d}function vB(t){let e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),o=t._maxLength/n;return Math.floor(Math.min(r,o))}function xB(t,e,n){let r=CB(t),o=e.length/n;if(!r)return Math.max(o,1);let a=D8(r);for(let l=0,c=a.length-1;l<c;l++){let u=a[l];if(u>o)return u}return Math.max(o,1)}function wB(t){let e=[],n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function kB(t,e,n,r){let o=0,a=n[0],l;for(r=Math.ceil(r),l=0;l<t.length;l++)l===a&&(e.push(t[l]),o++,a=n[o*r])}function od(t,e,n,r,o){let a=pt(r,0),l=Math.min(pt(o,t.length),t.length),c=0,u,d,f;for(n=Math.ceil(n),o&&(u=o-r,n=u/Math.floor(u/n)),f=a;f<0;)c++,f=Math.round(a+c*n);for(d=Math.max(a,0);d<l;d++)d===f&&(e.push(t[d]),c++,f=Math.round(a+c*n))}function CB(t){let e=t.length,n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}function f1(t,e){let n=[],r=t.length/e,o=t.length,a=0;for(;a<o;a+=r)n.push(t[Math.floor(a)]);return n}function SB(t,e,n){let r=t.ticks.length,o=Math.min(e,r-1),a=t._startPixel,l=t._endPixel,c=1e-6,u=t.getPixelForTick(o),d;if(!(n&&(r===1?d=Math.max(u-a,l-u):e===0?d=(t.getPixelForTick(1)-u)/2:d=(u-t.getPixelForTick(o-1))/2,u+=o<e?d:-d,u<a-c||u>l+c)))return u}function PB(t,e){yt(t,n=>{let r=n.gc,o=r.length/2,a;if(o>e){for(a=0;a<o;++a)delete n.data[r[a]];r.splice(0,o)}})}function Vl(t){return t.drawTicks?t.tickLength:0}function p1(t,e){if(!t.display)return 0;let n=Bn(t.font,e),r=Rr(t.padding);return(on(t.text)?t.text.length:1)*n.lineHeight+r.height}function DB(t,e){return Gs(t,{scale:e,type:"scale"})}function TB(t,e,n){return Gs(t,{tick:n,index:e,type:"tick"})}function BB(t,e,n){let r=lg(t);return(n&&e!=="right"||!n&&e==="right")&&(r=EB(r)),r}function IB(t,e,n,r){let{top:o,left:a,bottom:l,right:c,chart:u}=t,{chartArea:d,scales:f}=u,p=0,A,b,y,k=l-o,w=c-a;if(t.isHorizontal()){if(b=Tn(r,a,c),ht(n)){let S=Object.keys(n)[0],M=n[S];y=f[S].getPixelForValue(M)+k-e}else n==="center"?y=(d.bottom+d.top)/2+k-e:y=d1(t,n,e);A=c-a}else{if(ht(n)){let S=Object.keys(n)[0],M=n[S];b=f[S].getPixelForValue(M)-w+e}else n==="center"?b=(d.left+d.right)/2-w+e:b=d1(t,n,e);y=Tn(r,l,o),p=n==="left"?-xr:xr}return{titleX:b,titleY:y,maxWidth:A,rotation:p}}function MB(t,e,n){let r=oc(Object.create(null),[n?zt.get(n):{},zt.get(e),t.defaults]);zt.set(e,r),t.defaultRoutes&&_B(e,t.defaultRoutes),t.descriptors&&zt.describe(e,t.descriptors)}function _B(t,e){Object.keys(e).forEach(n=>{let r=n.split("."),o=r.pop(),a=[t].concat(r).join("."),l=e[n].split("."),c=l.pop(),u=l.join(".");zt.route(a,o,u,c)})}function OB(t){return"id"in t&&"defaults"in t}function NB(t){let e={},n=[],r=Object.keys(To.plugins.items);for(let a=0;a<r.length;a++)n.push(To.getPlugin(r[a]));let o=t.plugins||[];for(let a=0;a<o.length;a++){let l=o[a];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function LB(t,e){return!e&&t===!1?null:t===!0?{}:t}function jB(t,{plugins:e,localIds:n},r,o){let a=[],l=t.getContext();for(let c of e){let u=c.id,d=LB(r[u],o);d!==null&&a.push({plugin:c,options:FB(t.config,{plugin:c,local:n[u]},d,l)})}return a}function FB(t,{plugin:e,local:n},r,o){let a=t.pluginScopeKeys(e),l=t.getOptionScopes(r,a);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function PA(t,e){let n=zt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function RB(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function zB(t,e){return t===e?"_index_":"_value_"}function A1(t){if(t==="x"||t==="y"||t==="r")return t}function QB(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function DA(t,...e){if(A1(t))return t;for(let n of e){let r=n.axis||QB(n.position)||t.length>1&&A1(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function g1(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function HB(t,e){if(e.data&&e.data.datasets){let n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return g1(t,"x",n[0])||g1(t,"y",n[0])}return{}}function UB(t,e){let n=Qi[t.type]||{scales:{}},r=e.scales||{},o=PA(t.type,e),a=Object.create(null);return Object.keys(r).forEach(l=>{let c=r[l];if(!ht(c))return console.error(`Invalid scale configuration for scale: ${l}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);let u=DA(l,c,HB(l,t),zt.scales[c.type]),d=zB(u,o),f=n.scales||{};a[l]=Zl(Object.create(null),[{axis:u},c,f[u],f[d]])}),t.data.datasets.forEach(l=>{let c=l.type||t.type,u=l.indexAxis||PA(c,e),d=(Qi[c]||{}).scales||{};Object.keys(d).forEach(f=>{let p=RB(f,u),A=l[p+"AxisID"]||p;a[A]=a[A]||Object.create(null),Zl(a[A],[{axis:p},r[A],d[f]])})}),Object.keys(a).forEach(l=>{let c=a[l];Zl(c,[zt.scales[c.type],zt.scale])}),a}function Vx(t){let e=t.options||(t.options={});e.plugins=pt(e.plugins,{}),e.scales=UB(t,e)}function Wx(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function VB(t){return t=t||{},t.data=Wx(t.data),Vx(t),t}function ad(t,e){let n=m1.get(t);return n||(n=e(),m1.set(t,n),qx.add(n)),n}function b1(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));let o=n.join(),a=r.get(o);return a||(a={resolver:dg(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(o,a)),a}function YB(t,e){let{isScriptable:n,isIndexable:r}=Mx(t);for(let o of e){let a=n(o),l=r(o),c=(l||a)&&t[o];if(a&&(Xa(c)||qB(c))||l&&on(c))return!0}return!1}function y1(t,e){return t==="top"||t==="bottom"||KB.indexOf(t)===-1&&e==="x"}function v1(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function x1(t){let e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),_t(n&&n.onComplete,[t],e)}function XB(t){let e=t.chart,n=e.options.animation;_t(n&&n.onProgress,[t],e)}function Yx(t){return pg()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}function JB(t,e,n){let r=Object.keys(t);for(let o of r){let a=+o;if(a>=e){let l=t[o];delete t[o],(n>0||a>e)&&(t[a+n]=l)}}}function ZB(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function k1(){return yt(gg.instances,t=>t._plugins.invalidate())}function Gx(t,e){let{x:n,y:r,base:o,width:a,height:l}=t.getProps(["x","y","base","width","height"],e),c,u,d,f,p;return t.horizontal?(p=l/2,c=Math.min(n,o),u=Math.max(n,o),d=r-p,f=r+p):(p=a/2,c=n-p,u=n+p,d=Math.min(r,o),f=Math.max(r,o)),{left:c,top:d,right:u,bottom:f}}function Wa(t,e,n,r){return t?0:ro(e,n,r)}function $B(t,e,n){let r=t.options.borderWidth,o=t.borderSkipped,a=Ix(r);return{t:Wa(o.top,a.top,0,n),r:Wa(o.right,a.right,0,e),b:Wa(o.bottom,a.bottom,0,n),l:Wa(o.left,a.left,0,e)}}function eI(t,e,n){let{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,a=Fs(o),l=Math.min(e,n),c=t.borderSkipped,u=r||ht(o);return{topLeft:Wa(!u||c.top||c.left,a.topLeft,0,l),topRight:Wa(!u||c.top||c.right,a.topRight,0,l),bottomLeft:Wa(!u||c.bottom||c.left,a.bottomLeft,0,l),bottomRight:Wa(!u||c.bottom||c.right,a.bottomRight,0,l)}}function tI(t){let e=Gx(t),n=e.right-e.left,r=e.bottom-e.top,o=$B(t,n/2,r/2),a=eI(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:a},inner:{x:e.left+o.l,y:e.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,a.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(o.b,o.r))}}}}function $p(t,e,n,r){let o=e===null,a=n===null,l=t&&!(o&&a)&&Gx(t,r);return l&&(o||Ls(e,l.left,l.right))&&(a||Ls(n,l.top,l.bottom))}function nI(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function rI(t,e){t.rect(e.x,e.y,e.w,e.h)}function eA(t,e,n={}){let r=t.x!==n.x?-e:0,o=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-r,l=(t.y+t.h!==n.y+n.h?e:0)-o;return{x:t.x+r,y:t.y+o,w:t.w+a,h:t.h+l,radius:t.radius}}function Kx(t){return BA[t%BA.length]}function Xx(t){return C1[t%C1.length]}function oI(t,e){return t.borderColor=Kx(e),t.backgroundColor=Xx(e),++e}function aI(t,e){return t.backgroundColor=t.data.map(()=>Kx(e++)),e}function iI(t,e){return t.backgroundColor=t.data.map(()=>Xx(e++)),e}function sI(t){let e=0;return(n,r)=>{let o=t.getDatasetMeta(r).controller;o instanceof vA?e=aI(n,e):o instanceof xA?e=iI(n,e):o&&(e=oI(n,e))}}function E1(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function lI(t){return t&&(t.borderColor||t.backgroundColor)}function cI(){return zt.borderColor!=="rgba(0,0,0,0.1)"||zt.backgroundColor!=="rgba(0,0,0,0.1)"}function hI(t,e,n,r,o){let a=fI(r,t,e,n),l=pI(o,r,e.lineHeight);return{itemWidth:a,itemHeight:l}}function fI(t,e,n,r){let o=t.text;return o&&typeof o!="string"&&(o=o.reduce((a,l)=>a.length>l.length?a:l)),e+n.size/2+r.measureText(o).width}function pI(t,e,n){let r=t;return typeof e.text!="string"&&(r=Jx(e,n)),r}function Jx(t,e){let n=t.text?t.text.length:0;return e*n}function AI(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}function mI(t,e){let n=new Id({ctx:t.ctx,options:e,chart:t});Or.configure(t,n,e),Or.addBox(t,n),t.titleBlock=n}function Do(t,e){return e&&(on(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function sa(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
120
|
+
Our cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure.`))((qe()||{}).submissionResult||r),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}};g3="2.7.3";localStorage.getItem("QaBotDebug")==="true"&&console.info(`%c\u{1F916} ACCESS QA Bot | v${g3} | react-chatbotify v2.2.0 [${new Date().toISOString().slice(0,10)}]`,"background: #107180; color: white; padding: 8px; border-radius: 3px; font-weight: bold;");m3=()=>{for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(n&&n.startsWith("qa_bot_session_")){let r=localStorage.getItem(n);if(r)return r}}let t=`qa_bot_session_${Op()}`;return localStorage.setItem(t,t),t},nv=Se.forwardRef((t,e)=>{let{apiKey:n,open:r=!1,onOpenChange:o,embedded:a=!1,isLoggedIn:l,loginUrl:c=Kt.LOGIN_URL,ringEffect:u=!1,welcome:d,userEmail:f,userName:p,accessId:A}=t,b=n||process.env.REACT_APP_API_KEY||null,[y,k]=_.useState(l!==void 0&&l),w=_.useRef(m3()).current,{ticketForm:S,feedbackForm:M,updateTicketForm:T,updateFeedbackForm:P,resetTicketForm:R,resetFeedbackForm:F}=Ky();_.useEffect(()=>{l!==void 0&&k(l)},[l]),_.useEffect(()=>{if(!a&&o){let le=he=>{e&&e.current&&e.current._markAsUserInteraction&&e.current._markAsUserInteraction();let Z=he.data.newState;o(Z)};return window.addEventListener("rcb-toggle-chat-window",le),()=>{window.removeEventListener("rcb-toggle-chat-window",le)}}},[a,o,e]);let V=qy(0,d),U=_.useRef(null),G=((le,he={})=>_.useMemo(()=>{let Z=(L,ce)=>{if(le.current){let I=getComputedStyle(le.current).getPropertyValue(L);if(I&&I.trim()!=="")return I.trim();if(le.current.parentElement){let J=getComputedStyle(le.current.parentElement).getPropertyValue(L);if(J&&J.trim()!=="")return J.trim()}}return ce};return{primaryColor:Z("--primary-color",he.primaryColor||Kt.THEME.PRIMARY_COLOR),secondaryColor:Z("--secondary-color",he.secondaryColor||Kt.THEME.SECONDARY_COLOR),fontFamily:Z("--font-family",he.fontFamily||Kt.THEME.FONT_FAMILY)}},[le,he]))(U),W=(({themeColors:le,embedded:he,defaultOpen:Z,isLoggedIn:L,loginUrl:ce})=>{let I=L,J=sessionStorage.getItem("qa_bot_tooltip_shown")?"NEVER":"START";return _.useMemo(()=>({general:{...le,embedded:he,primaryColor:le.primaryColor,fontFamily:"Arial, sans-serif",secondaryColor:le.secondaryColor},header:{title:Se.createElement("div",{key:"header-title"},Se.createElement("h1",{className:"sr-only"},Kt.CHATBOT.TITLE),Se.createElement("span",{"aria-hidden":"true"},Kt.CHATBOT.TITLE)),avatar:Kt.CHATBOT.AVATAR_URL,buttons:[I?Se.createElement(l3,{key:"user-icon"}):Se.createElement(vp,{key:"login-button",loginUrl:ce,isHeaderButton:!0}),Rt.CLOSE_CHAT_BUTTON]},chatWindow:{defaultOpen:!!he},device:{desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},chatInput:{enabledPlaceholderText:"Type your question here...",disabledPlaceholderText:"",disabled:!1,allowNewline:!0,sendButtonStyle:{display:"flex"},characterLimit:1e3,sendButtonAriaLabel:"Send message",showCharacterCount:!1,ariaLabel:"Chat input area",ariaDescribedBy:"chat-input-help"},chatHistory:{disabled:!1},botBubble:{simulateStream:!0,streamSpeed:10,allowNewline:!0,dangerouslySetInnerHTML:!0,renderHtml:!0,ariaLabel:"Bot response",role:"log"},chatButton:{icon:Kt.CHATBOT.AVATAR_URL},tooltip:{text:Kt.CHATBOT.TOOLTIP_TEXT,mode:J},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0},notification:{disabled:!0},footer:{text:Se.createElement("div",{key:"footer-text"},Se.createElement("a",{href:"https://support.access-ci.org/tools/access-qa-tool"},"About this tool"),"."),buttons:[Se.createElement(s3,{key:"new-chat-button"})]},event:{rcbToggleChatWindow:!0}}),[le,he,Z,I,J,ce])})({themeColors:G,embedded:a,defaultOpen:!1,isLoggedIn:y,loginUrl:c}),X=_.useMemo(()=>({ticketForm:S||{},feedbackForm:M||{},updateTicketForm:T,updateFeedbackForm:P,resetTicketForm:R,resetFeedbackForm:F}),[S,M,T,P,R,F]),Y=[()=>tE(pe),n3(),()=>r3(ae)];var ae,pe;let de=_.useMemo(()=>A3({welcomeMessage:V,isBotLoggedIn:y,loginUrl:c,sessionId:w,ticketForm:S,setTicketForm:T,formContext:X,apiKey:b,userInfo:{email:f||null,name:p||null,accessId:A||null}}),[V,y,c,w,S,M,T,P,X,b,f,p,A]);return((le,he)=>{_.useEffect(()=>{he.current&&(le?he.current.classList.add("bot-logged-in"):he.current.classList.remove("bot-logged-in"))},[le,he])})(y,U),((le,he)=>{_.useEffect(()=>{if(!le||!he.current)return;let Z=setTimeout(()=>{let L=he.current?.querySelector(".rcb-tooltip-show");L&&L.classList.add("phone-ring")},500);return()=>{clearTimeout(Z)}},[le,he])})(u,U),_.useEffect(()=>{let le=()=>{let Z=document.querySelector(".rcb-chat-window");if(!Z)return;let L=Z.querySelector(".rcb-send-button");L&&(L.hasAttribute("tabindex")||L.setAttribute("tabindex","0"),L.hasAttribute("data-keyboard-enabled")||(L.setAttribute("data-keyboard-enabled","true"),L.addEventListener("keydown",ce=>{if(ce.key==="Enter"||ce.key===" "){ce.preventDefault();let I=L&&Object.keys(L).find(ye=>ye.startsWith("__reactProps"));if(I){let ye=L[I],ge=ye?.onMouseDown;if(ge&&typeof ge=="function")return void ge(ce)}let J=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});L.dispatchEvent(J)}})))},he=setInterval(le,1e3);return le(),()=>clearInterval(he)},[]),c3(),_.useEffect(()=>{let le=()=>{sessionStorage.setItem("qa_bot_tooltip_shown","true")};return window.addEventListener("rcb-toggle-chat-window",le),()=>{window.removeEventListener("rcb-toggle-chat-window",le)}},[]),Se.createElement("div",{className:"qa-bot "+(a?"embedded-qa-bot":""),ref:U,role:"application","aria-label":a?"Ask ACCESS - Embedded Chat Application":"Ask ACCESS - Chat Assistant Application"},Se.createElement(py,null,Se.createElement(Yy,{ref:e,embedded:a,isBotLoggedIn:y,currentOpen:r}),Se.createElement(FC,{key:`chatbot-${w}-${y}`,settings:W,flow:de,plugins:Y}),Se.createElement("div",{"aria-live":"polite",role:"status",className:"sr-only",id:"bot-live-region"}),Se.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."),Se.createElement("div",{id:"keyboard-help",className:"sr-only"},"Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs.")))});nv.displayName="QABotInternal";Np=Se.forwardRef((t,e)=>Se.createElement(a3,null,Se.createElement(nv,_u({},t,{ref:e}))));Np.displayName="QABot";Vb('.rcb-toggle-icon{background-color:initial!important;background-position:calc(50% - 1px) calc(50% + 2px);background-repeat:no-repeat;background-size:62%!important}.rcb-chat-window{height:800px!important;max-height:80vh!important;max-width:100%;width:550px!important}.rcb-chat-window .rcb-bot-avatar{background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:0}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:#107180}.rcb-chat-window .rcb-bot-message a{color:#fff;text-decoration:none}.rcb-chat-window .rcb-bot-message a:hover{text-decoration:underline}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-tooltip-show.phone-ring{animation:phone-ring 3s ease-out!important;z-index:10000!important}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:#107180!important;border-color:#107180!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:#107180!important;outline:none!important}.rcb-options:active{background-color:#107180!important;border-color:#107180!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:#107180!important;content:"\u2190"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=access-qa-tool]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}',{insertAt:"top"});b3=Se.forwardRef((t,e)=>{let[n,r]=Se.useState(t.isLoggedIn||!1),[o,a]=Se.useState(t.defaultOpen||!1),l=Se.useRef();return Se.useImperativeHandle(e,()=>({addMessage:c=>{l.current&&l.current.addMessage(c)},setBotIsLoggedIn:c=>{r(c)},openChat:()=>{!t.embedded&&l.current&&a(!0)},closeChat:()=>{!t.embedded&&l.current&&a(!1)},toggleChat:()=>{!t.embedded&&l.current&&a(c=>!c)}}),[t.embedded]),Se.createElement(Np,{ref:l,apiKey:t.apiKey,embedded:t.embedded,isLoggedIn:n,open:!!t.embedded||o,onOpenChange:t.embedded?void 0:a,loginUrl:t.loginUrl,ringEffect:t.ringEffect,welcome:t.welcome,userEmail:t.userEmail,userName:t.userName,accessId:t.accessId})});b3.displayName="ProgrammaticQABot"});function ct({alt:t=null,name:e=null,src:n=null}){return e?E.jsx("i",{className:`icon bi bi-${e}`}):E.jsx("img",{className:"icon",alt:t,src:n})}var jp=Bl(()=>{_s()});var aw={};xu(aw,{default:()=>b5});function _o({children:t,headerComponents:e=null,icon:n=null,sectionId:r=null,title:o}){let a=r||o.toLowerCase().replace(/[^0-9a-z]+/g,"-");return _.useLayoutEffect(()=>(av(),av),[]),E.jsxs("section",{id:a,"data-section-title":o,"data-section-icon":n,children:[E.jsxs("div",{className:"flex-header",children:[E.jsxs("h2",{children:[n?E.jsx(ct,{name:n}):null,o]}),e?E.jsx("div",{className:"header-components",children:e}):null]}),t]})}function y3({infoGroupId:t}){let e=In(`https://support.access-ci.org/api/1.0/affinity_groups/${t}`);if(!e||e.error||!e.length)return;let n=Xd(e[0].slack_link);return E.jsxs(_o,{title:"User Community",icon:"people-fill",children:[E.jsx("p",{children:"Join the community by participating in an affinity group! Members get update about announcements, events, and outages."}),E.jsxs("div",{className:"button-group",children:[E.jsxs("a",{href:e[0].url,className:"btn secondary",children:[E.jsx(ct,{name:"person-plus-fill"})," Join Affinity Group"]}),n?E.jsxs("a",{href:n,className:"btn",children:[E.jsx(ct,{name:"slack"})," Connect on Slack"]}):null,E.jsxs("a",{href:"#questions-and-answers",className:"btn",children:[E.jsx(ct,{name:"chat-fill"})," Ask and Answer Questions"]})]})]})}function v3({infoGroupId:t}){let e=Xs(t),n=In(e&&e.infoResourceIds.length?`https://operations-api.access-ci.org/wh2/cider/v1/info_resourceid/${e.infoResourceIds[0]}/?format=json`:null);if(!e)return;let{accessAllocated:r,name:o,description:a,imageUri:l,organizations:c}=e,u=r?"https://allocations.access-ci.org/get-your-first-project":null,d=n&&n.results?(n.results.compute||n.results.storage||{}).user_guide_url:null;return E.jsxs("div",{className:"resource-group-description",children:[l?E.jsx("img",{className:"resource-group-feature-image",src:l}):null,E.jsx("h1",{children:e.name}),c.map(f=>E.jsx("p",{children:E.jsxs("a",{href:f.organization_url||"#",children:[f.organization_favicon_url?E.jsx(ct,{alt:f.organization_name,src:f.organization_favicon_url}):null,f.organization_name]})},f.organization_name)),a?E.jsx("p",{children:a}):null,E.jsxs("div",{style:{marginTop:"1rem"},children:[u?E.jsxs("a",{href:u,className:"btn secondary lg",children:[E.jsx(ct,{name:"check2-circle"})," Get Started with ",o]}):null,d?E.jsxs("a",{href:d,className:"btn lg",children:[E.jsx(ct,{name:"book"})," User Guide"]}):null]})]})}function x3({column:t,row:e,style:n={}}){let r=t.format?t.format(e[t.key],e):e[t.key],o=["cell"];return t.class&&o.push(t.class),t.rowClass&&o.push(t.rowClass(e)),E.jsx("td",{className:o.join(" "),style:n,children:r})}function Qd({columns:t,rows:e,classes:n,frozenColumns:r=0,maxHeight:o=400,minWidth:a,rowClasses:l=[],scrollResetOnUpdate:c=!1}){let u=_.useRef();_.useLayoutEffect(()=>{u.current&&c&&(u.current.scrollTop=0)},[e]);let d=[0];for(let y=0;y<r;y++)d[y+1]=d[y]+(t[y].width||100);let f=(y,k)=>y<r?{position:"sticky",left:`${d[y]}px`,minWidth:`${t[y].width||100}px`,width:`${t[y].width||100}px`,zIndex:k||1}:{},p=t.map((y,k)=>E.jsx("th",{className:y.headerClass||y.class||"",style:f(k,100),children:y.formatHeader?y.formatHeader(y.name,y):y.name},y.key)),A=e.map((y,k)=>{let w=t.map((S,M)=>{let T=w3[S.type||"text"];return E.jsx(T,{column:S,row:y,style:f(M)},S.key)});return E.jsx("tr",{className:l[k]||"",children:w},k)}),b={};return a&&(b.minWidth=a),E.jsx("div",{className:`grid ${n||""}`,style:{maxHeight:Number.isInteger(o)?`${o}px`:o||null},ref:u,children:E.jsxs("table",{className:"table",style:b,children:[E.jsx("thead",{children:E.jsx("tr",{children:p})}),E.jsx("tbody",{children:A})]})})}function k3({infoGroupId:t}){let e=In(`https://support.access-ci.org/api/1.0/affinity_groups/${t}`),n=e&&!e.error&&e.length?e[0].field_ask_ci_locale:null,r=n?`${n}.json`:null,o=In(r);if(!o||o.error||!o.topic_list||!o.topic_list.topics||!o.topic_list.topics.length)return;let a=[{key:"title",name:"Topic",format:(c,u)=>E.jsxs(E.Fragment,{children:[u.pinned?E.jsx(ct,{name:"pin-fill"}):null,E.jsx("a",{href:`https://ask.cyberinfrastructure.org/t/${u.slug}/${u.id}`,children:c})]})},{key:"posts_count",name:"Posts",format:c=>c.toLocaleString("en-us")},{key:"bumped_at",name:"Last Update",format:c=>new Date(c).toLocaleString("en-US",{dateStyle:"medium"})}],l=[E.jsx("a",{href:n,className:"btn secondary",children:"Ask a Question"},"ask"),E.jsx("a",{href:n,className:"btn",children:"View All Topics"},"all")];return E.jsx(_o,{title:"Questions and Answers",icon:"chat-fill",headerComponents:l,children:E.jsx(Qd,{columns:a,rows:o.topic_list.topics.slice(0,5)})})}function No(t){return t?(t.nodeName||"").toLowerCase():null}function wr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function zi(t){var e=wr(t).Element;return t instanceof e||t instanceof Element}function Nr(t){var e=wr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function KA(t){if(typeof ShadowRoot>"u")return!1;var e=wr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function L3(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},a=e.elements[n];!Nr(a)||!No(a)||(Object.assign(a.style,r),Object.keys(o).forEach(function(l){var c=o[l];c===!1?a.removeAttribute(l):a.setAttribute(l,c===!0?"":c)}))})}function j3(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],a=e.attributes[r]||{},l=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),c=l.reduce(function(u,d){return u[d]="",u},{});!Nr(o)||!No(o)||(Object.assign(o.style,c),Object.keys(a).forEach(function(u){o.removeAttribute(u)}))})}}function Oo(t){return t.split("-")[0]}function oA(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function X1(){return!/^((?!chrome|android).)*safari/i.test(oA())}function Hs(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,a=1;e&&Nr(t)&&(o=t.offsetWidth>0&&Qs(r.width)/t.offsetWidth||1,a=t.offsetHeight>0&&Qs(r.height)/t.offsetHeight||1);var l=zi(t)?wr(t):window,c=l.visualViewport,u=!X1()&&n,d=(r.left+(u&&c?c.offsetLeft:0))/o,f=(r.top+(u&&c?c.offsetTop:0))/a,p=r.width/o,A=r.height/a;return{width:p,height:A,top:f,right:d+p,bottom:f+A,left:d,x:d,y:f}}function XA(t){var e=Hs(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function J1(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&KA(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ca(t){return wr(t).getComputedStyle(t)}function F3(t){return["table","td","th"].indexOf(No(t))>=0}function Za(t){return((zi(t)?t.ownerDocument:t.document)||window.document).documentElement}function Hd(t){return No(t)==="html"?t:t.assignedSlot||t.parentNode||(KA(t)?t.host:null)||Za(t)}function sv(t){return!Nr(t)||ca(t).position==="fixed"?null:t.offsetParent}function R3(t){var e=/firefox/i.test(oA()),n=/Trident/i.test(oA());if(n&&Nr(t)){var r=ca(t);if(r.position==="fixed")return null}var o=Hd(t);for(KA(o)&&(o=o.host);Nr(o)&&["html","body"].indexOf(No(o))<0;){var a=ca(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function uc(t){for(var e=wr(t),n=sv(t);n&&F3(n)&&ca(n).position==="static";)n=sv(n);return n&&(No(n)==="html"||No(n)==="body"&&ca(n).position==="static")?e:n||R3(t)||e}function JA(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Kl(t,e,n){return Fi(t,gd(e,n))}function z3(t,e,n){var r=Kl(t,e,n);return r>n?n:r}function Z1(){return{top:0,right:0,bottom:0,left:0}}function $1(t){return Object.assign({},Z1(),t)}function ex(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}function H3(t){var e,n=t.state,r=t.name,o=t.options,a=n.elements.arrow,l=n.modifiersData.popperOffsets,c=Oo(n.placement),u=JA(c),d=[sr,jr].indexOf(c)>=0,f=d?"height":"width";if(!(!a||!l)){var p=Q3(o.padding,n),A=XA(a),b=u==="y"?ir:sr,y=u==="y"?Lr:jr,k=n.rects.reference[f]+n.rects.reference[u]-l[u]-n.rects.popper[f],w=l[u]-n.rects.reference[u],S=uc(a),M=S?u==="y"?S.clientHeight||0:S.clientWidth||0:0,T=k/2-w/2,P=p[b],R=M-A[f]-p[y],F=M/2-A[f]/2+T,V=Kl(P,F,R),U=u;n.modifiersData[r]=(e={},e[U]=V,e.centerOffset=V-F,e)}}function U3(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||J1(e.elements.popper,o)&&(e.elements.arrow=o))}function Us(t){return t.split("-")[1]}function q3(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:Qs(n*o)/o||0,y:Qs(r*o)/o||0}}function lv(t){var e,n=t.popper,r=t.popperRect,o=t.placement,a=t.variation,l=t.offsets,c=t.position,u=t.gpuAcceleration,d=t.adaptive,f=t.roundOffsets,p=t.isFixed,A=l.x,b=A===void 0?0:A,y=l.y,k=y===void 0?0:y,w=typeof f=="function"?f({x:b,y:k}):{x:b,y:k};b=w.x,k=w.y;var S=l.hasOwnProperty("x"),M=l.hasOwnProperty("y"),T=sr,P=ir,R=window;if(d){var F=uc(n),V="clientHeight",U="clientWidth";if(F===wr(n)&&(F=Za(n),ca(F).position!=="static"&&c==="absolute"&&(V="scrollHeight",U="scrollWidth")),F=F,o===ir||(o===sr||o===jr)&&a===tc){P=Lr;var G=p&&F===R&&R.visualViewport?R.visualViewport.height:F[V];k-=G-r.height,k*=u?1:-1}if(o===sr||(o===ir||o===Lr)&&a===tc){T=jr;var W=p&&F===R&&R.visualViewport?R.visualViewport.width:F[U];b-=W-r.width,b*=u?1:-1}}var X=Object.assign({position:c},d&&W3),Y=f===!0?q3({x:b,y:k},wr(n)):{x:b,y:k};if(b=Y.x,k=Y.y,u){var ae;return Object.assign({},X,(ae={},ae[P]=M?"0":"",ae[T]=S?"0":"",ae.transform=(R.devicePixelRatio||1)<=1?"translate("+b+"px, "+k+"px)":"translate3d("+b+"px, "+k+"px, 0)",ae))}return Object.assign({},X,(e={},e[P]=M?k+"px":"",e[T]=S?b+"px":"",e.transform="",e))}function Y3(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,a=n.adaptive,l=a===void 0?!0:a,c=n.roundOffsets,u=c===void 0?!0:c,d={placement:Oo(e.placement),variation:Us(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,lv(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:l,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,lv(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}function K3(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,a=o===void 0?!0:o,l=r.resize,c=l===void 0?!0:l,u=wr(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&d.forEach(function(f){f.addEventListener("scroll",n.update,qu)}),c&&u.addEventListener("resize",n.update,qu),function(){a&&d.forEach(function(f){f.removeEventListener("scroll",n.update,qu)}),c&&u.removeEventListener("resize",n.update,qu)}}function ud(t){return t.replace(/left|right|bottom|top/g,function(e){return J3[e]})}function cv(t){return t.replace(/start|end/g,function(e){return Z3[e]})}function ZA(t){var e=wr(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $A(t){return Hs(Za(t)).left+ZA(t).scrollLeft}function $3(t,e){var n=wr(t),r=Za(t),o=n.visualViewport,a=r.clientWidth,l=r.clientHeight,c=0,u=0;if(o){a=o.width,l=o.height;var d=X1();(d||!d&&e==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}return{width:a,height:l,x:c+$A(t),y:u}}function eP(t){var e,n=Za(t),r=ZA(t),o=(e=t.ownerDocument)==null?void 0:e.body,a=Fi(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=Fi(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+$A(t),u=-r.scrollTop;return ca(o||n).direction==="rtl"&&(c+=Fi(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:l,x:c,y:u}}function eg(t){var e=ca(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function tx(t){return["html","body","#document"].indexOf(No(t))>=0?t.ownerDocument.body:Nr(t)&&eg(t)?t:tx(Hd(t))}function Xl(t,e){var n;e===void 0&&(e=[]);var r=tx(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),a=wr(r),l=o?[a].concat(a.visualViewport||[],eg(r)?r:[]):r,c=e.concat(l);return o?c:c.concat(Xl(Hd(l)))}function aA(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function tP(t,e){var n=Hs(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function uv(t,e,n){return e===Y1?aA($3(t,n)):zi(e)?tP(e,n):aA(eP(Za(t)))}function nP(t){var e=Xl(Hd(t)),n=["absolute","fixed"].indexOf(ca(t).position)>=0,r=n&&Nr(t)?uc(t):t;return zi(r)?e.filter(function(o){return zi(o)&&J1(o,r)&&No(o)!=="body"}):[]}function rP(t,e,n,r){var o=e==="clippingParents"?nP(t):[].concat(e),a=[].concat(o,[n]),l=a[0],c=a.reduce(function(u,d){var f=uv(t,d,r);return u.top=Fi(f.top,u.top),u.right=gd(f.right,u.right),u.bottom=gd(f.bottom,u.bottom),u.left=Fi(f.left,u.left),u},uv(t,l,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function nx(t){var e=t.reference,n=t.element,r=t.placement,o=r?Oo(r):null,a=r?Us(r):null,l=e.x+e.width/2-n.width/2,c=e.y+e.height/2-n.height/2,u;switch(o){case ir:u={x:l,y:e.y-n.height};break;case Lr:u={x:l,y:e.y+e.height};break;case jr:u={x:e.x+e.width,y:c};break;case sr:u={x:e.x-n.width,y:c};break;default:u={x:e.x,y:e.y}}var d=o?JA(o):null;if(d!=null){var f=d==="y"?"height":"width";switch(a){case zs:u[d]=u[d]-(e[f]/2-n[f]/2);break;case tc:u[d]=u[d]+(e[f]/2-n[f]/2);break}}return u}function nc(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,a=n.strategy,l=a===void 0?t.strategy:a,c=n.boundary,u=c===void 0?C3:c,d=n.rootBoundary,f=d===void 0?Y1:d,p=n.elementContext,A=p===void 0?zl:p,b=n.altBoundary,y=b===void 0?!1:b,k=n.padding,w=k===void 0?0:k,S=$1(typeof w!="number"?w:ex(w,cc)),M=A===zl?E3:zl,T=t.rects.popper,P=t.elements[y?M:A],R=rP(zi(P)?P:P.contextElement||Za(t.elements.popper),u,f,l),F=Hs(t.elements.reference),V=nx({reference:F,element:T,placement:o}),U=aA(Object.assign({},T,V)),G=A===zl?U:F,W={top:R.top-G.top+S.top,bottom:G.bottom-R.bottom+S.bottom,left:R.left-G.left+S.left,right:G.right-R.right+S.right},X=t.modifiersData.offset;if(A===zl&&X){var Y=X[o];Object.keys(W).forEach(function(ae){var pe=[jr,Lr].indexOf(ae)>=0?1:-1,de=[ir,Lr].indexOf(ae)>=0?"y":"x";W[ae]+=Y[de]*pe})}return W}function oP(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,a=n.rootBoundary,l=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?G1:u,f=Us(r),p=f?c?iv:iv.filter(function(y){return Us(y)===f}):cc,A=p.filter(function(y){return d.indexOf(y)>=0});A.length===0&&(A=p);var b=A.reduce(function(y,k){return y[k]=nc(t,{placement:k,boundary:o,rootBoundary:a,padding:l})[Oo(k)],y},{});return Object.keys(b).sort(function(y,k){return b[y]-b[k]})}function aP(t){if(Oo(t)===GA)return[];var e=ud(t);return[cv(t),e,cv(e)]}function iP(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,a=o===void 0?!0:o,l=n.altAxis,c=l===void 0?!0:l,u=n.fallbackPlacements,d=n.padding,f=n.boundary,p=n.rootBoundary,A=n.altBoundary,b=n.flipVariations,y=b===void 0?!0:b,k=n.allowedAutoPlacements,w=e.options.placement,S=Oo(w),M=S===w,T=u||(M||!y?[ud(w)]:aP(w)),P=[w].concat(T).reduce(function(ge,Ee){return ge.concat(Oo(Ee)===GA?oP(e,{placement:Ee,boundary:f,rootBoundary:p,padding:d,flipVariations:y,allowedAutoPlacements:k}):Ee)},[]),R=e.rects.reference,F=e.rects.popper,V=new Map,U=!0,G=P[0],W=0;W<P.length;W++){var X=P[W],Y=Oo(X),ae=Us(X)===zs,pe=[ir,Lr].indexOf(Y)>=0,de=pe?"width":"height",le=nc(e,{placement:X,boundary:f,rootBoundary:p,altBoundary:A,padding:d}),he=pe?ae?jr:sr:ae?Lr:ir;R[de]>F[de]&&(he=ud(he));var Z=ud(he),L=[];if(a&&L.push(le[Y]<=0),c&&L.push(le[he]<=0,le[Z]<=0),L.every(function(ge){return ge})){G=X,U=!1;break}V.set(X,L)}if(U)for(var ce=y?3:1,I=function(ge){var Ee=P.find(function(De){var je=V.get(De);if(je)return je.slice(0,ge).every(function(ze){return ze})});if(Ee)return G=Ee,"break"},J=ce;J>0;J--){var ye=I(J);if(ye==="break")break}e.placement!==G&&(e.modifiersData[r]._skip=!0,e.placement=G,e.reset=!0)}}function dv(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function hv(t){return[ir,jr,Lr,sr].some(function(e){return t[e]>=0})}function lP(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,a=e.modifiersData.preventOverflow,l=nc(e,{elementContext:"reference"}),c=nc(e,{altBoundary:!0}),u=dv(l,r),d=dv(c,o,a),f=hv(u),p=hv(d);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}function uP(t,e,n){var r=Oo(t),o=[sr,ir].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,l=a[0],c=a[1];return l=l||0,c=(c||0)*o,[sr,jr].indexOf(r)>=0?{x:c,y:l}:{x:l,y:c}}function dP(t){var e=t.state,n=t.options,r=t.name,o=n.offset,a=o===void 0?[0,0]:o,l=G1.reduce(function(f,p){return f[p]=uP(p,e.rects,a),f},{}),c=l[e.placement],u=c.x,d=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=l}function fP(t){var e=t.state,n=t.name;e.modifiersData[n]=nx({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}function AP(t){return t==="x"?"y":"x"}function gP(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,a=o===void 0?!0:o,l=n.altAxis,c=l===void 0?!1:l,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.padding,A=n.tether,b=A===void 0?!0:A,y=n.tetherOffset,k=y===void 0?0:y,w=nc(e,{boundary:u,rootBoundary:d,padding:p,altBoundary:f}),S=Oo(e.placement),M=Us(e.placement),T=!M,P=JA(S),R=AP(P),F=e.modifiersData.popperOffsets,V=e.rects.reference,U=e.rects.popper,G=typeof k=="function"?k(Object.assign({},e.rects,{placement:e.placement})):k,W=typeof G=="number"?{mainAxis:G,altAxis:G}:Object.assign({mainAxis:0,altAxis:0},G),X=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Y={x:0,y:0};if(F){if(a){var ae,pe=P==="y"?ir:sr,de=P==="y"?Lr:jr,le=P==="y"?"height":"width",he=F[P],Z=he+w[pe],L=he-w[de],ce=b?-U[le]/2:0,I=M===zs?V[le]:U[le],J=M===zs?-U[le]:-V[le],ye=e.elements.arrow,ge=b&&ye?XA(ye):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Z1(),De=Ee[pe],je=Ee[de],ze=Kl(0,V[le],ge[le]),Re=T?V[le]/2-ce-ze-De-W.mainAxis:I-ze-De-W.mainAxis,$e=T?-V[le]/2+ce+ze+je+W.mainAxis:J+ze+je+W.mainAxis,vt=e.elements.arrow&&uc(e.elements.arrow),Jt=vt?P==="y"?vt.clientTop||0:vt.clientLeft||0:0,ut=(ae=X?.[P])!=null?ae:0,Ot=he+Re-ut-Jt,xn=he+$e-ut,Zt=Kl(b?gd(Z,Ot):Z,he,b?Fi(L,xn):L);F[P]=Zt,Y[P]=Zt-he}if(c){var Mn,pn=P==="x"?ir:sr,$t=P==="x"?Lr:jr,Bt=F[R],Ht=R==="y"?"height":"width",Lt=Bt+w[pn],mt=Bt-w[$t],_n=[ir,sr].indexOf(S)!==-1,zn=(Mn=X?.[R])!=null?Mn:0,Qn=_n?Lt:Bt-V[Ht]-U[Ht]-zn+W.altAxis,On=_n?Bt+V[Ht]+U[Ht]-zn-W.altAxis:mt,sn=b&&_n?z3(Qn,Bt,On):Kl(b?Qn:Lt,Bt,b?On:mt);F[R]=sn,Y[R]=sn-Bt}e.modifiersData[r]=Y}}function bP(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function yP(t){return t===wr(t)||!Nr(t)?ZA(t):bP(t)}function vP(t){var e=t.getBoundingClientRect(),n=Qs(e.width)/t.offsetWidth||1,r=Qs(e.height)/t.offsetHeight||1;return n!==1||r!==1}function xP(t,e,n){n===void 0&&(n=!1);var r=Nr(e),o=Nr(e)&&vP(e),a=Za(e),l=Hs(t,o,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&((No(e)!=="body"||eg(a))&&(c=yP(e)),Nr(e)?(u=Hs(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=$A(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function wP(t){var e=new Map,n=new Set,r=[];t.forEach(function(a){e.set(a.name,a)});function o(a){n.add(a.name);var l=[].concat(a.requires||[],a.requiresIfExists||[]);l.forEach(function(c){if(!n.has(c)){var u=e.get(c);u&&o(u)}}),r.push(a)}return t.forEach(function(a){n.has(a.name)||o(a)}),r}function kP(t){var e=wP(t);return N3.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function CP(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function EP(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}function pv(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function SP(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,a=o===void 0?fv:o;return function(l,c,u){u===void 0&&(u=a);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},fv,a),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,A={state:d,setOptions:function(k){var w=typeof k=="function"?k(d.options):k;y(),d.options=Object.assign({},a,d.options,w),d.scrollParents={reference:zi(l)?Xl(l):l.contextElement?Xl(l.contextElement):[],popper:Xl(c)};var S=kP(EP([].concat(r,d.options.modifiers)));return d.orderedModifiers=S.filter(function(M){return M.enabled}),b(),A.update()},forceUpdate:function(){if(!p){var k=d.elements,w=k.reference,S=k.popper;if(pv(w,S)){d.rects={reference:xP(w,uc(S),d.options.strategy==="fixed"),popper:XA(S)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(U){return d.modifiersData[U.name]=Object.assign({},U.data)});for(var M=0;M<d.orderedModifiers.length;M++){if(d.reset===!0){d.reset=!1,M=-1;continue}var T=d.orderedModifiers[M],P=T.fn,R=T.options,F=R===void 0?{}:R,V=T.name;typeof P=="function"&&(d=P({state:d,options:F,name:V,instance:A})||d)}}}},update:CP(function(){return new Promise(function(k){A.forceUpdate(),k(d)})}),destroy:function(){y(),p=!0}};if(!pv(l,c))return A;A.setOptions(u).then(function(k){!p&&u.onFirstUpdate&&u.onFirstUpdate(k)});function b(){d.orderedModifiers.forEach(function(k){var w=k.name,S=k.options,M=S===void 0?{}:S,T=k.effect;if(typeof T=="function"){var P=T({state:d,name:w,instance:A,options:M}),R=function(){};f.push(P||R)}})}function y(){f.forEach(function(k){return k()}),f=[]}return A}}function Fp(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function tg(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function sx(t,e){return typeof t=="function"?t.apply(void 0,e):t}function Av(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function IP(t){return t.split(/\s+/).filter(Boolean)}function Ns(t){return[].concat(t)}function gv(t,e){t.indexOf(e)===-1&&t.push(e)}function MP(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function _P(t){return t.split("-")[0]}function md(t){return[].slice.call(t)}function mv(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function Jl(){return document.createElement("div")}function Ud(t){return["Element","Fragment"].some(function(e){return tg(t,e)})}function OP(t){return tg(t,"NodeList")}function NP(t){return tg(t,"MouseEvent")}function LP(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function jP(t){return Ud(t)?[t]:OP(t)?md(t):Array.isArray(t)?t:md(document.querySelectorAll(t))}function Rp(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function bv(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function FP(t){var e,n=Ns(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function RP(t,e){var n=e.clientX,r=e.clientY;return t.every(function(o){var a=o.popperRect,l=o.popperState,c=o.props,u=c.interactiveBorder,d=_P(l.placement),f=l.modifiersData.offset;if(!f)return!0;var p=d==="bottom"?f.top.y:0,A=d==="top"?f.bottom.y:0,b=d==="right"?f.left.x:0,y=d==="left"?f.right.x:0,k=a.top-r+p>u,w=r-a.bottom-A>u,S=a.left-n+b>u,M=n-a.right-y>u;return k||w||S||M})}function zp(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){t[r](o,n)})}function yv(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}function zP(){Bo.isTouch||(Bo.isTouch=!0,window.performance&&document.addEventListener("mousemove",lx))}function lx(){var t=performance.now();t-vv<20&&(Bo.isTouch=!1,document.removeEventListener("mousemove",lx)),vv=t}function QP(){var t=document.activeElement;if(LP(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function HP(){document.addEventListener("touchstart",zP,Ni),window.addEventListener("blur",QP)}function cx(t){var e=t.plugins||[],n=e.reduce(function(r,o){var a=o.name,l=o.defaultValue;if(a){var c;r[a]=t[a]!==void 0?t[a]:(c=no[a])!=null?c:l}return r},{});return Object.assign({},t,n)}function KP(t,e){var n=e?Object.keys(cx(Object.assign({},no,{plugins:e}))):YP,r=n.reduce(function(o,a){var l=(t.getAttribute("data-tippy-"+a)||"").trim();if(!l)return o;if(a==="content")o[a]=l;else try{o[a]=JSON.parse(l)}catch{o[a]=l}return o},{});return r}function xv(t,e){var n=Object.assign({},e,{content:sx(e.content,[t])},e.ignoreAttributes?{}:KP(t,e.plugins));return n.aria=Object.assign({},no.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}function iA(t,e){t[XP()]=e}function wv(t){var e=Jl();return t===!0?e.className=ox:(e.className=ax,Ud(t)?e.appendChild(t):iA(e,t)),e}function kv(t,e){Ud(e.content)?(iA(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?iA(t,e.content):t.textContent=e.content)}function sA(t){var e=t.firstElementChild,n=md(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(rx)}),arrow:n.find(function(r){return r.classList.contains(ox)||r.classList.contains(ax)}),backdrop:n.find(function(r){return r.classList.contains(BP)})}}function ux(t){var e=Jl(),n=Jl();n.className=TP,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Jl();r.className=rx,r.setAttribute("data-state","hidden"),kv(r,t.props),e.appendChild(n),n.appendChild(r),o(t.props,t.props);function o(a,l){var c=sA(e),u=c.box,d=c.content,f=c.arrow;l.theme?u.setAttribute("data-theme",l.theme):u.removeAttribute("data-theme"),typeof l.animation=="string"?u.setAttribute("data-animation",l.animation):u.removeAttribute("data-animation"),l.inertia?u.setAttribute("data-inertia",""):u.removeAttribute("data-inertia"),u.style.maxWidth=typeof l.maxWidth=="number"?l.maxWidth+"px":l.maxWidth,l.role?u.setAttribute("role",l.role):u.removeAttribute("role"),(a.content!==l.content||a.allowHTML!==l.allowHTML)&&kv(d,t.props),l.arrow?f?a.arrow!==l.arrow&&(u.removeChild(f),u.appendChild(wv(l.arrow))):u.appendChild(wv(l.arrow)):f&&u.removeChild(f)}return{popper:e,onUpdate:o}}function ZP(t,e){var n=xv(t,Object.assign({},no,cx(mv(e)))),r,o,a,l=!1,c=!1,u=!1,d=!1,f,p,A,b=[],y=Av(Ot,n.interactiveDebounce),k,w=JP++,S=null,M=MP(n.plugins),T={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},P={id:w,reference:t,popper:Jl(),popperInstance:S,props:n,state:T,plugins:M,clearDelayTimeouts:Qn,setProps:On,setContent:sn,show:ue,hide:Ie,hideWithInteractivity:Qe,enable:_n,disable:zn,unmount:lt,destroy:it};if(!n.render)return P;var R=n.render(P),F=R.popper,V=R.onUpdate;F.setAttribute("data-tippy-root",""),F.id="tippy-"+P.id,P.popper=F,t._tippy=P,F._tippy=P;var U=M.map(function(se){return se.fn(P)}),G=t.hasAttribute("aria-expanded");return vt(),ce(),he(),Z("onCreate",[P]),n.showOnCreate&&Lt(),F.addEventListener("mouseenter",function(){P.props.interactive&&P.state.isVisible&&P.clearDelayTimeouts()}),F.addEventListener("mouseleave",function(){P.props.interactive&&P.props.trigger.indexOf("mouseenter")>=0&&pe().addEventListener("mousemove",y)}),P;function W(){var se=P.props.touch;return Array.isArray(se)?se:[se,0]}function X(){return W()[0]==="hold"}function Y(){var se;return!!((se=P.props.render)!=null&&se.$$tippy)}function ae(){return k||t}function pe(){var se=ae().parentNode;return se?FP(se):document}function de(){return sA(F)}function le(se){return P.state.isMounted&&!P.state.isVisible||Bo.isTouch||f&&f.type==="focus"?0:Fp(P.props.delay,se?0:1,no.delay)}function he(se){se===void 0&&(se=!1),F.style.pointerEvents=P.props.interactive&&!se?"":"none",F.style.zIndex=""+P.props.zIndex}function Z(se,Te,Oe){if(Oe===void 0&&(Oe=!0),U.forEach(function(et){et[se]&&et[se].apply(et,Te)}),Oe){var tt;(tt=P.props)[se].apply(tt,Te)}}function L(){var se=P.props.aria;if(se.content){var Te="aria-"+se.content,Oe=F.id,tt=Ns(P.props.triggerTarget||t);tt.forEach(function(et){var Je=et.getAttribute(Te);if(P.state.isVisible)et.setAttribute(Te,Je?Je+" "+Oe:Oe);else{var bt=Je&&Je.replace(Oe,"").trim();bt?et.setAttribute(Te,bt):et.removeAttribute(Te)}})}}function ce(){if(!(G||!P.props.aria.expanded)){var se=Ns(P.props.triggerTarget||t);se.forEach(function(Te){P.props.interactive?Te.setAttribute("aria-expanded",P.state.isVisible&&Te===ae()?"true":"false"):Te.removeAttribute("aria-expanded")})}}function I(){pe().removeEventListener("mousemove",y),Yu=Yu.filter(function(se){return se!==y})}function J(se){if(!(Bo.isTouch&&(u||se.type==="mousedown"))){var Te=se.composedPath&&se.composedPath()[0]||se.target;if(!(P.props.interactive&&yv(F,Te))){if(Ns(P.props.triggerTarget||t).some(function(Oe){return yv(Oe,Te)})){if(Bo.isTouch||P.state.isVisible&&P.props.trigger.indexOf("click")>=0)return}else Z("onClickOutside",[P,se]);P.props.hideOnClick===!0&&(P.clearDelayTimeouts(),P.hide(),c=!0,setTimeout(function(){c=!1}),P.state.isMounted||De())}}}function ye(){u=!0}function ge(){u=!1}function Ee(){var se=pe();se.addEventListener("mousedown",J,!0),se.addEventListener("touchend",J,Ni),se.addEventListener("touchstart",ge,Ni),se.addEventListener("touchmove",ye,Ni)}function De(){var se=pe();se.removeEventListener("mousedown",J,!0),se.removeEventListener("touchend",J,Ni),se.removeEventListener("touchstart",ge,Ni),se.removeEventListener("touchmove",ye,Ni)}function je(se,Te){Re(se,function(){!P.state.isVisible&&F.parentNode&&F.parentNode.contains(F)&&Te()})}function ze(se,Te){Re(se,Te)}function Re(se,Te){var Oe=de().box;function tt(et){et.target===Oe&&(zp(Oe,"remove",tt),Te())}if(se===0)return Te();zp(Oe,"remove",p),zp(Oe,"add",tt),p=tt}function $e(se,Te,Oe){Oe===void 0&&(Oe=!1);var tt=Ns(P.props.triggerTarget||t);tt.forEach(function(et){et.addEventListener(se,Te,Oe),b.push({node:et,eventType:se,handler:Te,options:Oe})})}function vt(){X()&&($e("touchstart",ut,{passive:!0}),$e("touchend",xn,{passive:!0})),IP(P.props.trigger).forEach(function(se){if(se!=="manual")switch($e(se,ut),se){case"mouseenter":$e("mouseleave",xn);break;case"focus":$e(VP?"focusout":"blur",Zt);break;case"focusin":$e("focusout",Zt);break}})}function Jt(){b.forEach(function(se){var Te=se.node,Oe=se.eventType,tt=se.handler,et=se.options;Te.removeEventListener(Oe,tt,et)}),b=[]}function ut(se){var Te,Oe=!1;if(!(!P.state.isEnabled||Mn(se)||c)){var tt=((Te=f)==null?void 0:Te.type)==="focus";f=se,k=se.currentTarget,ce(),!P.state.isVisible&&NP(se)&&Yu.forEach(function(et){return et(se)}),se.type==="click"&&(P.props.trigger.indexOf("mouseenter")<0||l)&&P.props.hideOnClick!==!1&&P.state.isVisible?Oe=!0:Lt(se),se.type==="click"&&(l=!Oe),Oe&&!tt&&mt(se)}}function Ot(se){var Te=se.target,Oe=ae().contains(Te)||F.contains(Te);if(!(se.type==="mousemove"&&Oe)){var tt=Ht().concat(F).map(function(et){var Je,bt=et._tippy,gt=(Je=bt.popperInstance)==null?void 0:Je.state;return gt?{popperRect:et.getBoundingClientRect(),popperState:gt,props:n}:null}).filter(Boolean);RP(tt,se)&&(I(),mt(se))}}function xn(se){var Te=Mn(se)||P.props.trigger.indexOf("click")>=0&&l;if(!Te){if(P.props.interactive){P.hideWithInteractivity(se);return}mt(se)}}function Zt(se){P.props.trigger.indexOf("focusin")<0&&se.target!==ae()||P.props.interactive&&se.relatedTarget&&F.contains(se.relatedTarget)||mt(se)}function Mn(se){return Bo.isTouch?X()!==se.type.indexOf("touch")>=0:!1}function pn(){$t();var se=P.props,Te=se.popperOptions,Oe=se.placement,tt=se.offset,et=se.getReferenceClientRect,Je=se.moveTransition,bt=Y()?sA(F).arrow:null,gt=et?{getBoundingClientRect:et,contextElement:et.contextElement||ae()}:t,at={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Hn){var An=Hn.state;if(Y()){var Nn=de(),cr=Nn.box;["placement","reference-hidden","escaped"].forEach(function(cn){cn==="placement"?cr.setAttribute("data-placement",An.placement):An.attributes.popper["data-popper-"+cn]?cr.setAttribute("data-"+cn,""):cr.removeAttribute("data-"+cn)}),An.attributes.popper={}}}},ln=[{name:"offset",options:{offset:tt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Je}},at];Y()&&bt&&ln.push({name:"arrow",options:{element:bt,padding:3}}),ln.push.apply(ln,Te?.modifiers||[]),P.popperInstance=DP(gt,F,Object.assign({},Te,{placement:Oe,onFirstUpdate:A,modifiers:ln}))}function $t(){P.popperInstance&&(P.popperInstance.destroy(),P.popperInstance=null)}function Bt(){var se=P.props.appendTo,Te,Oe=ae();P.props.interactive&&se===ix||se==="parent"?Te=Oe.parentNode:Te=sx(se,[Oe]),Te.contains(F)||Te.appendChild(F),P.state.isMounted=!0,pn()}function Ht(){return md(F.querySelectorAll("[data-tippy-root]"))}function Lt(se){P.clearDelayTimeouts(),se&&Z("onTrigger",[P,se]),Ee();var Te=le(!0),Oe=W(),tt=Oe[0],et=Oe[1];Bo.isTouch&&tt==="hold"&&et&&(Te=et),Te?r=setTimeout(function(){P.show()},Te):P.show()}function mt(se){if(P.clearDelayTimeouts(),Z("onUntrigger",[P,se]),!P.state.isVisible){De();return}if(!(P.props.trigger.indexOf("mouseenter")>=0&&P.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(se.type)>=0&&l)){var Te=le(!1);Te?o=setTimeout(function(){P.state.isVisible&&P.hide()},Te):a=requestAnimationFrame(function(){P.hide()})}}function _n(){P.state.isEnabled=!0}function zn(){P.hide(),P.state.isEnabled=!1}function Qn(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(a)}function On(se){if(!P.state.isDestroyed){Z("onBeforeUpdate",[P,se]),Jt();var Te=P.props,Oe=xv(t,Object.assign({},Te,mv(se),{ignoreAttributes:!0}));P.props=Oe,vt(),Te.interactiveDebounce!==Oe.interactiveDebounce&&(I(),y=Av(Ot,Oe.interactiveDebounce)),Te.triggerTarget&&!Oe.triggerTarget?Ns(Te.triggerTarget).forEach(function(tt){tt.removeAttribute("aria-expanded")}):Oe.triggerTarget&&t.removeAttribute("aria-expanded"),ce(),he(),V&&V(Te,Oe),P.popperInstance&&(pn(),Ht().forEach(function(tt){requestAnimationFrame(tt._tippy.popperInstance.forceUpdate)})),Z("onAfterUpdate",[P,se])}}function sn(se){P.setProps({content:se})}function ue(){var se=P.state.isVisible,Te=P.state.isDestroyed,Oe=!P.state.isEnabled,tt=Bo.isTouch&&!P.props.touch,et=Fp(P.props.duration,0,no.duration);if(!(se||Te||Oe||tt)&&!ae().hasAttribute("disabled")&&(Z("onShow",[P],!1),P.props.onShow(P)!==!1)){if(P.state.isVisible=!0,Y()&&(F.style.visibility="visible"),he(),Ee(),P.state.isMounted||(F.style.transition="none"),Y()){var Je=de(),bt=Je.box,gt=Je.content;Rp([bt,gt],0)}A=function(){var at;if(!(!P.state.isVisible||d)){if(d=!0,F.offsetHeight,F.style.transition=P.props.moveTransition,Y()&&P.props.animation){var ln=de(),Hn=ln.box,An=ln.content;Rp([Hn,An],et),bv([Hn,An],"visible")}L(),ce(),gv(Qp,P),(at=P.popperInstance)==null||at.forceUpdate(),Z("onMount",[P]),P.props.animation&&Y()&&ze(et,function(){P.state.isShown=!0,Z("onShown",[P])})}},Bt()}}function Ie(){var se=!P.state.isVisible,Te=P.state.isDestroyed,Oe=!P.state.isEnabled,tt=Fp(P.props.duration,1,no.duration);if(!(se||Te||Oe)&&(Z("onHide",[P],!1),P.props.onHide(P)!==!1)){if(P.state.isVisible=!1,P.state.isShown=!1,d=!1,l=!1,Y()&&(F.style.visibility="hidden"),I(),De(),he(!0),Y()){var et=de(),Je=et.box,bt=et.content;P.props.animation&&(Rp([Je,bt],tt),bv([Je,bt],"hidden"))}L(),ce(),P.props.animation?Y()&&je(tt,P.unmount):P.unmount()}}function Qe(se){pe().addEventListener("mousemove",y),gv(Yu,y),y(se)}function lt(){P.state.isVisible&&P.hide(),P.state.isMounted&&($t(),Ht().forEach(function(se){se._tippy.unmount()}),F.parentNode&&F.parentNode.removeChild(F),Qp=Qp.filter(function(se){return se!==P}),P.state.isMounted=!1,Z("onHidden",[P]))}function it(){P.state.isDestroyed||(P.clearDelayTimeouts(),P.unmount(),Jt(),delete t._tippy,P.state.isDestroyed=!0,Z("onDestroy",[P]))}}function dc(t,e){e===void 0&&(e={});var n=no.plugins.concat(e.plugins||[]);HP();var r=Object.assign({},e,{plugins:n}),o=jP(t),a=o.reduce(function(l,c){var u=c&&ZP(c,r);return u&&l.push(u),l},[]);return Ud(t)?a[0]:a}function $P({color:t="var(--contrast-6)",icon:e="info-circle-fill",tooltip:n}){let r=_.useRef(null);return _.useLayoutEffect(()=>{r.current&&dc(r.current,{content:n,theme:"access",appendTo:r.current.parentElement})},[r.current]),E.jsx("button",{className:"info-tip",style:{color:t},ref:r,children:E.jsx(ct,{name:e})})}function eD({infoGroupId:t}){let e=In(`https://support.access-ci.org/api/1.0/kb/${t}`);if(!(!e||e.error||!e.length))return E.jsx(_o,{title:"Documentation",icon:"book",children:E.jsx("ul",{children:e.map(({title:n,description:r,link:o})=>E.jsxs("li",{children:[E.jsx("a",{href:mg(o),children:n}),r?E.jsx($P,{tooltip:Xd(r)}):null]},n))})})}function tD({children:t,icon:e="megaphone-fill"}){return E.jsxs("div",{className:"alert",children:[e?E.jsx(ct,{name:e}):null,E.jsx("div",{className:"alert-body",children:t})]})}function nD({children:t}){let[e,n]=_.useState(!1);return E.jsxs("div",{className:`expand-text ${e?"expanded":"contracted"}`,children:[t,E.jsxs("button",{className:"expand-button",onClick:()=>n(!e),children:[E.jsx(ct,{name:`caret-${e?"up":"left"}-fill`}),e?"Less":"More"]})]})}function rD({date__end:t,date__start:e,description:n,location:r,registration:o,speaker:a,title:l}){let c=o,u=c?E.jsx("a",{href:c,children:l}):l,d=[],f=null,p=e,A=t;if(p){let b=new Date(p),y=new Date(A||p),[k,w]=[b,y].map(F=>F.toLocaleString("en-US",{dateStyle:"long"})),[S,M]=[b,y].map(F=>F.toLocaleString("en-US",{timeStyle:"short"})),T=b.toLocaleTimeString("en-US",{timeZoneName:"short"}).split(" ")[2],P=[`${k},`,S];(M!=S||w!=k)&&(P.push("-"),w!=k&&P.push(`${w},`),P.push(M)),P.push(`(${T})`),d.push(E.jsx(ct,{name:"calendar"}),P.join(" ")),a&&d.push(E.jsx(ct,{name:"people-fill"}),a),r&&d.push(E.jsx(ct,{name:"geo-alt-fill"}),r);let R=b.toLocaleString("en-US",{dateStyle:"medium"}).split(",")[0].split(" ").map(F=>E.jsx("span",{children:F},F));f=c?E.jsx("a",{href:c,className:"event-icon",children:R}):E.jsx("div",{className:"event-icon",children:R})}return E.jsxs("div",{className:"event",children:[f,E.jsxs("div",{className:"event-details",children:[E.jsx("h3",{children:u}),d.length?E.jsx("div",{className:"event-metadata",children:d}):null,n?E.jsx(nD,{children:E.jsx("div",{children:zd(n)})}):null]})]})}function oD({infoGroupId:t}){let e=Xs(t),n=In("https://operations-api.access-ci.org/wh2/news/v1/affiliation/access-ci.org/current_outages/"),r=In("https://operations-api.access-ci.org/wh2/news/v1/affiliation/access-ci.org/future_outages/"),o=In(`https://support.access-ci.org/api/1.1/events/ag/${t}`),a=Rd([e,n,r],(c,u,d)=>[...u.results,...d.results].filter(f=>f.AffectedResources.some(p=>c.infoResourceIds.includes(p.ResourceID))),[]),l=Rd([o],c=>c.filter(u=>new Date(u.date__start)>=new Date),[]);if(!(!a.length&&!l.length))return E.jsxs(_o,{title:"Announcements and Events",icon:"calendar3",children:[a.map(({Subject:c,Content:u})=>E.jsxs(tD,{children:[c," ",E.jsx("a",{href:"https://operations.access-ci.org/infrastructure_news_view",children:"Learn more."})]},c)),l.map(c=>E.jsx(rD,{...c},c.title))]})}function aD({children:t,headingLevel:e=2,title:n}){let[r,o]=_.useState(!1),a=`h${e}`;return E.jsxs("div",{className:"accordion",children:[E.jsx(a,{className:"accordion-heading",children:E.jsxs("button",{"aria-expanded":r,onClick:()=>o(!r),children:[n,E.jsx(ct,{name:r?"caret-up-fill":"caret-down-fill"})]})}),E.jsx("div",{className:"accordion-content",style:{display:r?"block":"none"},children:t})]})}function iD({resource_descriptive_name:t,resource_description:e,compute:n,storage:r}){let o=(n||r||{}).recommended_use;return E.jsxs(aD,{title:t,children:[e?zd(e):null,o?E.jsxs(E.Fragment,{children:[E.jsx("h3",{children:"Recommended Use"}),zd(o)]}):null]})}function sD({infoGroupId:t}){let e=Xs(t),n=In(e?e.infoResourceIds.map(u=>`https://operations-api.access-ci.org/wh2/cider/v1/info_resourceid/${u}/?format=json`):null,{defaultValue:[]}),r=n.filter(u=>u.results&&u.results.cider_type=="Compute").map(u=>({...u.results.compute,key:u.results.info_resourceid,name:u.results.resource_descriptive_name,format:(d,f)=>{let p=u.results.compute[f.attr];return f.format&&p?f.format(p,f):p||E.jsx(E.Fragment,{children:"\u2014"})}})),o=n.length?[{name:"Nodes",attr:"node_count",format:u=>u.toLocaleString("en-us")},{name:"CPU Type",attr:"cpu_type"},{name:"CPU Speed",attr:"cpu_speed_ghz",format:u=>`${u} Ghz`},{name:"CPU Cores per Node",attr:"cpu_count_per_node"},{name:"RAM per CPU Core",attr:"memory_per_cpu_gb",format:u=>`${u.toLocaleString("en-us")} GB`},{name:"GPU",attr:"gpu_description"},{name:"Local Storage per Node",attr:"local_storage_per_node_gb",format:u=>`${u.toLocaleString("en-us")} GB`},{name:"Network Interconnect",attr:"interconnect"},{name:"Operating System",attr:"operating_system"},{name:"Batch System",attr:"batch_system"}].filter(u=>r.some(d=>d[u.attr])):[],a={key:"name",name:"Attribute",format:u=>E.jsx("strong",{children:u})},l=r.length>0&&o.length>0,c={compute:[],storage:[],other:[]};for(let{results:u}of n)(c[u.cider_type.toLowerCase()]||c.other).push(E.jsx(iD,{...u},u.resource_descriptive_name));return E.jsxs(E.Fragment,{children:[l||c.compute.length>0?E.jsxs(_o,{title:"Compute Resources",icon:"cpu-fill",children:[c.compute,l&&E.jsxs(E.Fragment,{children:[E.jsx("h3",{children:"Specifications"}),E.jsx(Qd,{columns:[a,...r],rows:o,maxHeight:null})]})]}):null,c.storage.length>0?E.jsx(_o,{title:"Storage Resources",icon:"hdd-fill",children:c.storage}):null,c.other.length>0?E.jsx(_o,{title:"Other Resources",icon:"stars",children:c.other}):null]})}function Cv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ev(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cv(Object(n),!0).forEach(function(r){cD(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dd(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?dd=function(e){return typeof e}:dd=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dd(t)}function Vd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lD(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wd(t,e,n){return e&&lD(t.prototype,e),t}function cD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uD(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&lA(t,e)}function Vs(t){return Vs=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vs(t)}function lA(t,e){return lA=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},lA(t,e)}function dD(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hD(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fD(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hD(t)}function pD(t){var e=dD();return function(){var n=Vs(t),r;if(e){var o=Vs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fD(this,r)}}function AD(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Vs(t),t!==null););return t}function hd(){return typeof Reflect<"u"&&Reflect.get?hd=Reflect.get:hd=function(t,e,n){var r=AD(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},hd.apply(this,arguments)}function qa(t){console.error("[Glide warn]: ".concat(t))}function to(t){return parseInt(t)}function cA(t){return typeof t=="string"}function rc(t){var e=dd(t);return e==="function"||e==="object"&&!!t}function bd(t){return typeof t=="function"}function mD(t){return typeof t>"u"}function uA(t){return t.constructor===Array}function bD(t,e,n){var r={};for(var o in e)bd(e[o])?r[o]=e[o](t,r,n):qa("Extension must be a function");for(var a in r)bd(r[a].mount)&&r[a].mount();return r}function Vt(t,e,n){Object.defineProperty(t,e,n)}function Sv(t,e){var n=Object.assign({},t,e);if(e.hasOwnProperty("classes")){n.classes=Object.assign({},t.classes,e.classes);var r=["direction","type","slide","arrow","nav"];r.forEach(function(o){e.classes.hasOwnProperty(o)&&(n.classes[o]=Ev(Ev({},t.classes[o]),e.classes[o]))})}return e.hasOwnProperty("breakpoints")&&(n.breakpoints=Object.assign({},t.breakpoints,e.breakpoints)),n}function xD(t,e,n){var r={mount:function(){this._o=!1},make:function(u){var d=this;t.disabled||(!t.settings.waitForTransition||t.disable(),this.move=u,n.emit("run.before",this.move),this.calculate(),n.emit("run",this.move),e.Transition.after(function(){d.isStart()&&n.emit("run.start",d.move),d.isEnd()&&n.emit("run.end",d.move),d.isOffset()&&(d._o=!1,n.emit("run.offset",d.move)),n.emit("run.after",d.move),t.enable()}))},calculate:function(){var u=this.move,d=this.length,f=u.steps,p=u.direction,A=1;if(p==="="){if(t.settings.bound&&to(f)>d){t.index=d;return}t.index=f;return}if(p===">"&&f===">"){t.index=d;return}if(p==="<"&&f==="<"){t.index=0;return}if(p==="|"&&(A=t.settings.perView||1),p===">"||p==="|"&&f===">"){var b=o(A);b>d&&(this._o=!0),t.index=a(b,A);return}if(p==="<"||p==="|"&&f==="<"){var y=l(A);y<0&&(this._o=!0),t.index=c(y,A);return}qa("Invalid direction pattern [".concat(p).concat(f,"] has been used"))},isStart:function(){return t.index<=0},isEnd:function(){return t.index>=this.length},isOffset:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;return u?this._o?u==="|>"?this.move.direction==="|"&&this.move.steps===">":u==="|<"?this.move.direction==="|"&&this.move.steps==="<":this.move.direction===u:!1:this._o},isBound:function(){return t.isType("slider")&&t.settings.focusAt!=="center"&&t.settings.bound}};function o(u){var d=t.index;return t.isType("carousel")?d+u:d+(u-d%u)}function a(u,d){var f=r.length;return u<=f?u:t.isType("carousel")?u-(f+1):t.settings.rewind?r.isBound()&&!r.isEnd()?f:0:r.isBound()?f:Math.floor(f/d)*d}function l(u){var d=t.index;if(t.isType("carousel"))return d-u;var f=Math.ceil(d/u);return(f-1)*u}function c(u,d){var f=r.length;return u>=0?u:t.isType("carousel")?u+(f+1):t.settings.rewind?r.isBound()&&r.isStart()?f:Math.floor(f/d)*d:0}return Vt(r,"move",{get:function(){return this._m},set:function(u){var d=u.substr(1);this._m={direction:u.substr(0,1),steps:d?to(d)?to(d):d:0}}}),Vt(r,"length",{get:function(){var u=t.settings,d=e.Html.slides.length;return this.isBound()?d-1-(to(u.perView)-1)+to(u.focusAt):d-1}}),Vt(r,"offset",{get:function(){return this._o}}),r}function Pv(){return new Date().getTime()}function dx(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,a,l,c=0,u=function(){c=n.leading===!1?0:Pv(),r=null,l=t.apply(o,a),r||(o=a=null)},d=function(){var f=Pv();!c&&n.leading===!1&&(c=f);var p=e-(f-c);return o=this,a=arguments,p<=0||p>e?(r&&(clearTimeout(r),r=null),c=f,l=t.apply(o,a),r||(o=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(u,p)),l};return d.cancel=function(){clearTimeout(r),c=0,r=o=a=null},d}function wD(t,e,n){var r={apply:function(o){for(var a=0,l=o.length;a<l;a++){var c=o[a].style,u=e.Direction.value;a!==0?c[Gu[u][0]]="".concat(this.value/2,"px"):c[Gu[u][0]]="",a!==o.length-1?c[Gu[u][1]]="".concat(this.value/2,"px"):c[Gu[u][1]]=""}},remove:function(o){for(var a=0,l=o.length;a<l;a++){var c=o[a].style;c.marginLeft="",c.marginRight=""}}};return Vt(r,"value",{get:function(){return to(t.settings.gap)}}),Vt(r,"grow",{get:function(){return r.value*e.Sizes.length}}),Vt(r,"reductor",{get:function(){var o=t.settings.perView;return r.value*(o-1)/o}}),n.on(["build.after","update"],dx(function(){r.apply(e.Html.wrapper.children)},30)),n.on("destroy",function(){r.remove(e.Html.wrapper.children)}),r}function hx(t){if(t&&t.parentNode){for(var e=t.parentNode.firstChild,n=[];e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}return[]}function dA(t){return Array.prototype.slice.call(t)}function CD(t,e,n){var r={mount:function(){this.root=t.selector,this.track=this.root.querySelector(kD),this.collectSlides()},collectSlides:function(){this.slides=dA(this.wrapper.children).filter(function(o){return!o.classList.contains(t.settings.classes.slide.clone)})}};return Vt(r,"root",{get:function(){return r._r},set:function(o){cA(o)&&(o=document.querySelector(o)),o!==null?r._r=o:qa("Root element must be a existing Html node")}}),Vt(r,"track",{get:function(){return r._t},set:function(o){r._t=o}}),Vt(r,"wrapper",{get:function(){return r.track.children[0]}}),n.on("update",function(){r.collectSlides()}),r}function ED(t,e,n){var r={mount:function(){this.value=t.settings.peek}};return Vt(r,"value",{get:function(){return r._v},set:function(o){rc(o)?(o.before=to(o.before),o.after=to(o.after)):o=to(o),r._v=o}}),Vt(r,"reductor",{get:function(){var o=r.value,a=t.settings.perView;return rc(o)?o.before/a+o.after/a:o*2/a}}),n.on(["resize","update"],function(){r.mount()}),r}function SD(t,e,n){var r={mount:function(){this._o=0},make:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.offset=a,n.emit("move",{movement:this.value}),e.Transition.after(function(){n.emit("move.after",{movement:o.value})})}};return Vt(r,"offset",{get:function(){return r._o},set:function(o){r._o=mD(o)?0:to(o)}}),Vt(r,"translate",{get:function(){return e.Sizes.slideWidth*t.index}}),Vt(r,"value",{get:function(){var o=this.offset,a=this.translate;return e.Direction.is("rtl")?a+o:a-o}}),n.on(["build.before","run"],function(){r.make()}),r}function PD(t,e,n){var r={setupSlides:function(){for(var o="".concat(this.slideWidth,"px"),a=e.Html.slides,l=0;l<a.length;l++)a[l].style.width=o},setupWrapper:function(){e.Html.wrapper.style.width="".concat(this.wrapperSize,"px")},remove:function(){for(var o=e.Html.slides,a=0;a<o.length;a++)o[a].style.width="";e.Html.wrapper.style.width=""}};return Vt(r,"length",{get:function(){return e.Html.slides.length}}),Vt(r,"width",{get:function(){return e.Html.track.offsetWidth}}),Vt(r,"wrapperSize",{get:function(){return r.slideWidth*r.length+e.Gaps.grow+e.Clones.grow}}),Vt(r,"slideWidth",{get:function(){return r.width/t.settings.perView-e.Peek.reductor-e.Gaps.reductor}}),n.on(["build.before","resize","update"],function(){r.setupSlides(),r.setupWrapper()}),n.on("destroy",function(){r.remove()}),r}function DD(t,e,n){var r={mount:function(){n.emit("build.before"),this.typeClass(),this.activeClass(),n.emit("build.after")},typeClass:function(){e.Html.root.classList.add(t.settings.classes.type[t.settings.type])},activeClass:function(){var o=t.settings.classes,a=e.Html.slides[t.index];a&&(a.classList.add(o.slide.active),hx(a).forEach(function(l){l.classList.remove(o.slide.active)}))},removeClasses:function(){var o=t.settings.classes,a=o.type,l=o.slide;e.Html.root.classList.remove(a[t.settings.type]),e.Html.slides.forEach(function(c){c.classList.remove(l.active)})}};return n.on(["destroy","update"],function(){r.removeClasses()}),n.on(["resize","update"],function(){r.mount()}),n.on("move.after",function(){r.activeClass()}),r}function TD(t,e,n){var r={mount:function(){this.items=[],t.isType("carousel")&&(this.items=this.collect())},collect:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],a=e.Html.slides,l=t.settings,c=l.perView,u=l.classes,d=l.cloningRatio;if(a.length>0)for(var f=+!!t.settings.peek,p=c+f+Math.round(c/2),A=a.slice(0,p).reverse(),b=a.slice(p*-1),y=0;y<Math.max(d,Math.floor(c/a.length));y++){for(var k=0;k<A.length;k++){var w=A[k].cloneNode(!0);w.classList.add(u.slide.clone),o.push(w)}for(var S=0;S<b.length;S++){var M=b[S].cloneNode(!0);M.classList.add(u.slide.clone),o.unshift(M)}}return o},append:function(){for(var o=this.items,a=e.Html,l=a.wrapper,c=a.slides,u=Math.floor(o.length/2),d=o.slice(0,u).reverse(),f=o.slice(u*-1).reverse(),p="".concat(e.Sizes.slideWidth,"px"),A=0;A<f.length;A++)l.appendChild(f[A]);for(var b=0;b<d.length;b++)l.insertBefore(d[b],c[0]);for(var y=0;y<o.length;y++)o[y].style.width=p},remove:function(){for(var o=this.items,a=0;a<o.length;a++)e.Html.wrapper.removeChild(o[a])}};return Vt(r,"grow",{get:function(){return(e.Sizes.slideWidth+e.Gaps.value)*r.items.length}}),n.on("update",function(){r.remove(),r.mount(),r.append()}),n.on("build.before",function(){t.isType("carousel")&&r.append()}),n.on("destroy",function(){r.remove()}),r}function BD(t,e,n){var r=new fx,o={mount:function(){this.bind()},bind:function(){r.on("resize",window,dx(function(){n.emit("resize")},t.settings.throttle))},unbind:function(){r.off("resize",window)}};return n.on("destroy",function(){o.unbind(),r.destroy()}),o}function _D(t,e,n){var r={mount:function(){this.value=t.settings.direction},resolve:function(o){var a=o.slice(0,1);return this.is("rtl")?o.split(a).join(MD[a]):o},is:function(o){return this.value===o},addClass:function(){e.Html.root.classList.add(t.settings.classes.direction[this.value])},removeClass:function(){e.Html.root.classList.remove(t.settings.classes.direction[this.value])}};return Vt(r,"value",{get:function(){return r._v},set:function(o){ID.indexOf(o)>-1?r._v=o:qa("Direction value must be `ltr` or `rtl`")}}),n.on(["destroy","update"],function(){r.removeClass()}),n.on("update",function(){r.mount()}),n.on(["build.before","update"],function(){r.addClass()}),r}function OD(t,e){return{modify:function(n){return e.Direction.is("rtl")?-n:n}}}function ND(t,e){return{modify:function(n){var r=Math.floor(n/e.Sizes.slideWidth);return n+e.Gaps.value*r}}}function LD(t,e){return{modify:function(n){return n+e.Clones.grow/2}}}function jD(t,e){return{modify:function(n){if(t.settings.focusAt>=0){var r=e.Peek.value;return rc(r)?n-r.before:n-r}return n}}}function FD(t,e){return{modify:function(n){var r=e.Gaps.value,o=e.Sizes.width,a=t.settings.focusAt,l=e.Sizes.slideWidth;return a==="center"?n-(o/2-l/2):n-l*a-r*a}}}function RD(t,e,n){var r=[ND,LD,jD,FD].concat(t._t,[OD]);return{mutate:function(o){for(var a=0;a<r.length;a++){var l=r[a];bd(l)&&bd(l().modify)?o=l(t,e,n).modify(o):qa("Transformer should be a function that returns an object with `modify()` method")}return o}}}function zD(t,e,n){var r={set:function(o){var a=RD(t,e).mutate(o),l="translate3d(".concat(-1*a,"px, 0px, 0px)");e.Html.wrapper.style.mozTransform=l,e.Html.wrapper.style.webkitTransform=l,e.Html.wrapper.style.transform=l},remove:function(){e.Html.wrapper.style.transform=""},getStartIndex:function(){var o=e.Sizes.length,a=t.index,l=t.settings.perView;return e.Run.isOffset(">")||e.Run.isOffset("|>")?o+(a-l):(a+l)%o},getTravelDistance:function(){var o=e.Sizes.slideWidth*t.settings.perView;return e.Run.isOffset(">")||e.Run.isOffset("|>")?o*-1:o}};return n.on("move",function(o){if(!t.isType("carousel")||!e.Run.isOffset())return r.set(o.movement);e.Transition.after(function(){n.emit("translate.jump"),r.set(e.Sizes.slideWidth*t.index)});var a=e.Sizes.slideWidth*e.Translate.getStartIndex();return r.set(a-e.Translate.getTravelDistance())}),n.on("destroy",function(){r.remove()}),r}function QD(t,e,n){var r=!1,o={compose:function(a){var l=t.settings;return r?"".concat(a," 0ms ").concat(l.animationTimingFunc):"".concat(a," ").concat(this.duration,"ms ").concat(l.animationTimingFunc)},set:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";e.Html.wrapper.style.transition=this.compose(a)},remove:function(){e.Html.wrapper.style.transition=""},after:function(a){setTimeout(function(){a()},this.duration)},enable:function(){r=!1,this.set()},disable:function(){r=!0,this.set()}};return Vt(o,"duration",{get:function(){var a=t.settings;return t.isType("slider")&&e.Run.offset?a.rewindDuration:a.animationDuration}}),n.on("move",function(){o.set()}),n.on(["build.before","resize","translate.jump"],function(){o.disable()}),n.on("run",function(){o.enable()}),n.on("destroy",function(){o.remove()}),o}function WD(t,e,n){var r=new fx,o=Dv?{passive:!0}:!1,a={mount:function(){this._n=e.Html.root.querySelectorAll(HD),this._c=e.Html.root.querySelectorAll(ng),this._arrowControls={previous:e.Html.root.querySelectorAll(UD),next:e.Html.root.querySelectorAll(VD)},this.addBindings()},setActive:function(){for(var l=0;l<this._n.length;l++)this.addClass(this._n[l].children)},removeActive:function(){for(var l=0;l<this._n.length;l++)this.removeClass(this._n[l].children)},addClass:function(l){var c=t.settings,u=l[t.index];u&&(u.classList.add(c.classes.nav.active),hx(u).forEach(function(d){d.classList.remove(c.classes.nav.active)}))},removeClass:function(l){var c=l[t.index];c?.classList.remove(t.settings.classes.nav.active)},setArrowState:function(){if(!t.settings.rewind){var l=a._arrowControls.next,c=a._arrowControls.previous;this.resetArrowState(l,c),t.index===0&&this.disableArrow(c),t.index===e.Run.length&&this.disableArrow(l)}},resetArrowState:function(){for(var l=t.settings,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u.forEach(function(f){dA(f).forEach(function(p){p.classList.remove(l.classes.arrow.disabled)})})},disableArrow:function(){for(var l=t.settings,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];u.forEach(function(f){dA(f).forEach(function(p){p.classList.add(l.classes.arrow.disabled)})})},addBindings:function(){for(var l=0;l<this._c.length;l++)this.bind(this._c[l].children)},removeBindings:function(){for(var l=0;l<this._c.length;l++)this.unbind(this._c[l].children)},bind:function(l){for(var c=0;c<l.length;c++)r.on("click",l[c],this.click),r.on("touchstart",l[c],this.click,o)},unbind:function(l){for(var c=0;c<l.length;c++)r.off(["click","touchstart"],l[c])},click:function(l){!Dv&&l.type==="touchstart"&&l.preventDefault();var c=l.currentTarget.getAttribute("data-glide-dir");e.Run.make(e.Direction.resolve(c))}};return Vt(a,"items",{get:function(){return a._c}}),n.on(["mount.after","move.after"],function(){a.setActive()}),n.on(["mount.after","run"],function(){a.setArrowState()}),n.on("destroy",function(){a.removeBindings(),a.removeActive(),r.destroy()}),a}function yd({children:t,cssClass:e=""}){let n=_.useRef(null);return _.useEffect(()=>{n.current&&new YD(n.current).mount({Controls:WD})},[]),E.jsx("section",{className:`carousel ${e}`,children:E.jsxs("div",{className:"glide",ref:n,children:[E.jsx("div",{className:"glide__track","data-glide-el":"track",children:E.jsx("ul",{className:"glide__slides",children:t})}),E.jsxs("div",{className:"glide__arrows","data-glide-el":"controls",children:[E.jsx("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:E.jsx("path",{d:"M0 12l10.975 11 2.848-2.828-6.176-6.176H24v-3.992H7.646l6.176-6.176L10.975 1 0 12z"})})}),E.jsx("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">",children:E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:E.jsx("path",{d:"M13.025 1l-2.847 2.828 6.176 6.176h-16.354v3.992h16.354l-6.176 6.176 2.847 2.828 10.975-11z"})})})]})]})})}function Ax({children:t}){return E.jsx("li",{className:"glide__slide",children:t})}function GD({title:t,description:e,linkText:n,linkURI:r,imageURI:o,imageAltText:a}){return E.jsx(Ax,{children:E.jsxs("span",{className:"slide-inner",children:[o&&E.jsx("a",{href:r,className:"slide-image",children:E.jsx("img",{src:o,alt:a})}),E.jsxs("span",{className:"slide-text",children:[t&&E.jsx("h2",{children:t}),e&&E.jsx("p",{children:e}),n&&E.jsx("a",{href:r,children:n})]})]})})}function KD({children:t,maxHeight:e="400px"}){return E.jsx("div",{className:"scroll-text",children:E.jsx("div",{className:"scroll-text-inner",style:{maxHeight:e},children:t})})}function Ku({icon:t,text:e,title:n}){if(e)return E.jsxs("abbr",{className:"project-meta",title:n,children:[E.jsx(ct,{name:t}),e]})}function JD({infoGroupId:t}){let e=Xs(t),n=In(e?`${XD}?${e.infoResourceIds.map(o=>`info_resourceids[]=${o}`).join("&")}`:null);if(!n||!n.projects||!n.projects.length)return null;let r=[{key:"resourceName",name:"Resource"},{key:"allocation",name:"Current Allocation",format:(o,a)=>a.units=="[Yes = 1, No = 0]"?o==1?"Yes":"No":`${o.toLocaleString("en-us")} ${a.units||""}`}];return E.jsx(_o,{title:"Recent Projects",icon:"pc-display",children:E.jsx(yd,{cssclassName:"carousel-projects",children:n.projects.map(o=>E.jsxs(yd.Slide,{children:[E.jsx("h3",{children:o.requestTitle}),E.jsxs("div",{className:"project-metadata",children:[E.jsx(Ku,{icon:"cash-coin",text:o.allocationType,title:"Allocation Type"}),E.jsx(Ku,{icon:"person-fill",text:`${o.pi} (${o.piInstitution})`,title:"Primary Investigator"}),E.jsx(Ku,{icon:"folder",text:o.fos,title:"Field of Science"}),E.jsx(Ku,{icon:"calendar-range",text:[o.beginDate,o.endDate].map(a=>new Date(a).toLocaleString("en-US",{dateStyle:"medium"})).join(" to "),title:"Project Dates"})]}),E.jsxs(KD,{children:[E.jsx("p",{children:o.abstract}),E.jsx(Qd,{columns:r,rows:o.resources,maxHeight:null})]})]},o.requestTitle))})})}function hc(t){return t+.5|0}function ql(t){return Va(hc(t*2.55),0,255)}function Ya(t){return Va(hc(t*255),0,255)}function la(t){return Va(hc(t/2.55)/100,0,1)}function Tv(t){return Va(hc(t*100),0,100)}function t8(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&_r[t[1]]*17,g:255&_r[t[2]]*17,b:255&_r[t[3]]*17,a:e===5?_r[t[4]]*17:255}:(e===7||e===9)&&(n={r:_r[t[1]]<<4|_r[t[2]],g:_r[t[3]]<<4|_r[t[4]],b:_r[t[5]]<<4|_r[t[6]],a:e===9?_r[t[7]]<<4|_r[t[8]]:255})),n}function r8(t){var e=e8(t)?ZD:$D;return t?"#"+e(t.r)+e(t.g)+e(t.b)+n8(t.a,e):void 0}function gx(t,e,n){let r=e*Math.min(n,1-n),o=(a,l=(a+t/30)%12)=>n-r*Math.max(Math.min(l-3,9-l,1),-1);return[o(0),o(8),o(4)]}function a8(t,e,n){let r=(o,a=(o+t/60)%6)=>n-n*e*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function i8(t,e,n){let r=gx(t,1,.5),o;for(e+n>1&&(o=1/(e+n),e*=o,n*=o),o=0;o<3;o++)r[o]*=1-e-n,r[o]+=e;return r}function s8(t,e,n,r,o){return t===o?(e-n)/r+(e<n?6:0):e===o?(n-t)/r+2:(t-e)/r+4}function rg(t){let e=t.r/255,n=t.g/255,r=t.b/255,o=Math.max(e,n,r),a=Math.min(e,n,r),l=(o+a)/2,c,u,d;return o!==a&&(d=o-a,u=l>.5?d/(2-o-a):d/(o+a),c=s8(e,n,r,d,o),c=c*60+.5),[c|0,u||0,l]}function og(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Ya)}function ag(t,e,n){return og(gx,t,e,n)}function l8(t,e,n){return og(i8,t,e,n)}function c8(t,e,n){return og(a8,t,e,n)}function mx(t){return(t%360+360)%360}function u8(t){let e=o8.exec(t),n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?ql(+e[5]):Ya(+e[5]));let o=mx(+e[2]),a=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?r=l8(o,a,l):e[1]==="hsv"?r=c8(o,a,l):r=ag(o,a,l),{r:r[0],g:r[1],b:r[2],a:n}}function d8(t,e){var n=rg(t);n[0]=mx(n[0]+e),n=ag(n),t.r=n[0],t.g=n[1],t.b=n[2]}function h8(t){if(!t)return;let e=rg(t),n=e[0],r=Tv(e[1]),o=Tv(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${o}%, ${la(t.a)})`:`hsl(${n}, ${r}%, ${o}%)`}function f8(){let t={},e=Object.keys(Iv),n=Object.keys(Bv),r,o,a,l,c;for(r=0;r<e.length;r++){for(l=c=e[r],o=0;o<n.length;o++)a=n[o],c=c.replace(a,Bv[a]);a=parseInt(Iv[l],16),t[c]=[a>>16&255,a>>8&255,a&255]}return t}function p8(t){Ju||(Ju=f8(),Ju.transparent=[0,0,0,0]);let e=Ju[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}function g8(t){let e=A8.exec(t),n=255,r,o,a;if(e){if(e[7]!==r){let l=+e[7];n=e[8]?ql(l):Va(l*255,0,255)}return r=+e[1],o=+e[3],a=+e[5],r=255&(e[2]?ql(r):Va(r,0,255)),o=255&(e[4]?ql(o):Va(o,0,255)),a=255&(e[6]?ql(a):Va(a,0,255)),{r,g:o,b:a,a:n}}}function m8(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${la(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}function b8(t,e,n){let r=Os(la(t.r)),o=Os(la(t.g)),a=Os(la(t.b));return{r:Ya(Up(r+n*(Os(la(e.r))-r))),g:Ya(Up(o+n*(Os(la(e.g))-o))),b:Ya(Up(a+n*(Os(la(e.b))-a))),a:t.a+n*(e.a-t.a)}}function Zu(t,e,n){if(t){let r=rg(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=ag(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function bx(t,e){return t&&Object.assign(e||{},t)}function Mv(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Ya(t[3]))):(e=bx(t,{r:0,g:0,b:0,a:1}),e.a=Ya(e.a)),e}function y8(t){return t.charAt(0)==="r"?g8(t):u8(t)}function aa(){}function St(t){return t==null}function on(t){if(Array.isArray&&Array.isArray(t))return!0;let e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function ht(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Fr(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Po(t,e){return Fr(t)?t:e}function pt(t,e){return typeof t>"u"?e:t}function _t(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function yt(t,e,n,r){let o,a,l;if(on(t))for(a=t.length,o=0;o<a;o++)e.call(n,t[o],o);else if(ht(t))for(l=Object.keys(t),a=l.length,o=0;o<a;o++)e.call(n,t[l[o]],l[o])}function xd(t,e){let n,r,o,a;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(o=t[n],a=e[n],o.datasetIndex!==a.datasetIndex||o.index!==a.index)return!1;return!0}function wd(t){if(on(t))return t.map(wd);if(ht(t)){let e=Object.create(null),n=Object.keys(t),r=n.length,o=0;for(;o<r;++o)e[n[o]]=wd(t[n[o]]);return e}return t}function vx(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function w8(t,e,n,r){if(!vx(t))return;let o=e[t],a=n[t];ht(o)&&ht(a)?oc(o,a,r):e[t]=wd(a)}function oc(t,e,n){let r=on(e)?e:[e],o=r.length;if(!ht(t))return t;n=n||{};let a=n.merger||w8,l;for(let c=0;c<o;++c){if(l=r[c],!ht(l))continue;let u=Object.keys(l);for(let d=0,f=u.length;d<f;++d)a(u[d],t,l,n)}return t}function Zl(t,e){return oc(t,e,{merger:k8})}function k8(t,e,n){if(!vx(t))return;let r=e[t],o=n[t];ht(r)&&ht(o)?Zl(r,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=wd(o))}function C8(t){let e=t.split("."),n=[],r="";for(let o of e)r+=o,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function E8(t){let e=C8(t);return n=>{for(let r of e){if(r==="")break;n=n&&n[r]}return n}}function Ka(t,e){return(_v[e]||(_v[e]=E8(e)))(t)}function ig(t){return t.charAt(0).toUpperCase()+t.slice(1)}function S8(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}function fd(t,e,n){return Math.abs(t-e)<n}function Lv(t){let e=Math.round(t);t=fd(t,e,t/1e3)?e:t;let n=Math.pow(10,Math.floor(xx(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function D8(t){let e=[],n=Math.sqrt(t),r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((o,a)=>o-a).pop(),e}function T8(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Cd(t){return!T8(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function B8(t,e){let n=Math.round(t);return n-e<=t&&n+e>=t}function I8(t,e,n){let r,o,a;for(r=0,o=t.length;r<o;r++)a=t[r][n],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}function Io(t){return t*(an/180)}function M8(t){return t*(180/an)}function jv(t){if(!Fr(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function _8(t,e){let n=e.x-t.x,r=e.y-t.y,o=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*an&&(a+=vr),{angle:a,distance:o}}function O8(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Mi(t){return(t%vr+vr)%vr}function fA(t,e,n,r){let o=Mi(t),a=Mi(e),l=Mi(n),c=Mi(a-o),u=Mi(l-o),d=Mi(o-a),f=Mi(o-l);return o===a||o===l||r&&a===l||c>u&&d<f}function ro(t,e,n){return Math.max(e,Math.min(n,t))}function N8(t){return ro(t,-32768,32767)}function Ls(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function sg(t,e,n){n=n||(l=>t[l]<e);let r=t.length-1,o=0,a;for(;r-o>1;)a=o+r>>1,n(a)?o=a:r=a;return{lo:o,hi:r}}function j8(t,e,n){let r=0,o=t.length;for(;r<o&&t[r]<e;)r++;for(;o>r&&t[o-1]>n;)o--;return r>0||o<t.length?t.slice(r,o):t}function F8(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),wx.forEach(n=>{let r="_onData"+ig(n),o=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...a){let l=o.apply(this,a);return t._chartjs.listeners.forEach(c=>{typeof c[r]=="function"&&c[r](...a)}),l}})})}function Fv(t,e){let n=t._chartjs;if(!n)return;let r=n.listeners,o=r.indexOf(e);o!==-1&&r.splice(o,1),!(r.length>0)&&(wx.forEach(a=>{delete t[a]}),delete t._chartjs)}function kx(t){let e=new Set(t);return e.size===t.length?t:Array.from(e)}function Ex(t,e){let n=[],r=!1;return function(...o){n=o,r||(r=!0,Cx.call(window,()=>{r=!1,t.apply(e,n)}))}}function R8(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}function Sx(t){if(t&&typeof t=="object"){let e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Qv(t){return Sx(t)?t:new vd(t)}function Vp(t){return Sx(t)?t:new vd(t).saturate(.5).darken(.1).hexString()}function U8(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:H8},numbers:{type:"number",properties:Q8}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function V8(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}function W8(t,e){e=e||{};let n=t+JSON.stringify(e),r=Hv.get(n);return r||(r=new Intl.NumberFormat(t,e),Hv.set(n,r)),r}function qd(t,e,n){return W8(e,n).format(t)}function Y8(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}function G8(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Px.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}function ec(t,e){if(!e)return t;let n=e.split(".");for(let r=0,o=n.length;r<o;++r){let a=n[r];t=t[a]||(t[a]=Object.create(null))}return t}function Wp(t,e,n){return typeof e=="string"?oc(ec(t,e),n):oc(ec(t,""),e)}function K8(t){return!t||St(t.size)||St(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Uv(t,e,n,r,o){let a=e[o];return a||(a=e[o]=t.measureText(o).width,n.push(o)),a>r&&(r=a),r}function _i(t,e,n){let r=t.currentDevicePixelRatio,o=n!==0?Math.max(n/2,.5):0;return Math.round((e-o)*r)/r+o}function Vv(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Wv(t,e,n,r){Dx(t,e,n,r,null)}function Dx(t,e,n,r,o){let a,l,c,u,d,f,p,A,b=e.pointStyle,y=e.rotation,k=e.radius,w=(y||0)*P8;if(b&&typeof b=="object"&&(a=b.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(w),t.drawImage(b,-b.width/2,-b.height/2,b.width,b.height),t.restore();return}if(!(isNaN(k)||k<=0)){switch(t.beginPath(),b){default:o?t.ellipse(n,r,o/2,k,0,0,vr):t.arc(n,r,k,0,vr),t.closePath();break;case"triangle":f=o?o/2:k,t.moveTo(n+Math.sin(w)*f,r-Math.cos(w)*k),w+=Nv,t.lineTo(n+Math.sin(w)*f,r-Math.cos(w)*k),w+=Nv,t.lineTo(n+Math.sin(w)*f,r-Math.cos(w)*k),t.closePath();break;case"rectRounded":d=k*.516,u=k-d,l=Math.cos(w+Ii)*u,p=Math.cos(w+Ii)*(o?o/2-d:u),c=Math.sin(w+Ii)*u,A=Math.sin(w+Ii)*(o?o/2-d:u),t.arc(n-p,r-c,d,w-an,w-xr),t.arc(n+A,r-l,d,w-xr,w),t.arc(n+p,r+c,d,w,w+xr),t.arc(n-A,r+l,d,w+xr,w+an),t.closePath();break;case"rect":if(!y){u=Math.SQRT1_2*k,f=o?o/2:u,t.rect(n-f,r-u,2*f,2*u);break}w+=Ii;case"rectRot":p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+A,r-l),t.lineTo(n+p,r+c),t.lineTo(n-A,r+l),t.closePath();break;case"crossRot":w+=Ii;case"cross":p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+p,r+c),t.moveTo(n+A,r-l),t.lineTo(n-A,r+l);break;case"star":p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+p,r+c),t.moveTo(n+A,r-l),t.lineTo(n-A,r+l),w+=Ii,p=Math.cos(w)*(o?o/2:k),l=Math.cos(w)*k,c=Math.sin(w)*k,A=Math.sin(w)*(o?o/2:k),t.moveTo(n-p,r-c),t.lineTo(n+p,r+c),t.moveTo(n+A,r-l),t.lineTo(n-A,r+l);break;case"line":l=o?o/2:Math.cos(w)*k,c=Math.sin(w)*k,t.moveTo(n-l,r-c),t.lineTo(n+l,r+c);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(w)*(o?o/2:k),r+Math.sin(w)*k);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Tx(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function cg(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ug(t){t.restore()}function X8(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),St(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function J8(t,e,n,r,o){if(o.strikethrough||o.underline){let a=t.measureText(r),l=e-a.actualBoundingBoxLeft,c=e+a.actualBoundingBoxRight,u=n-a.actualBoundingBoxAscent,d=n+a.actualBoundingBoxDescent,f=o.strikethrough?(u+d)/2:d;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(l,f),t.lineTo(c,f),t.stroke()}}function Z8(t,e){let n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function ic(t,e,n,r,o,a={}){let l=on(e)?e:[e],c=a.strokeWidth>0&&a.strokeColor!=="",u,d;for(t.save(),t.font=o.string,X8(t,a),u=0;u<l.length;++u)d=l[u],a.backdrop&&Z8(t,a.backdrop),c&&(a.strokeColor&&(t.strokeStyle=a.strokeColor),St(a.strokeWidth)||(t.lineWidth=a.strokeWidth),t.strokeText(d,n,r,a.maxWidth)),t.fillText(d,n,r,a.maxWidth),J8(t,n,r,d,a),r+=Number(o.lineHeight);t.restore()}function Ed(t,e){let{x:n,y:r,w:o,h:a,radius:l}=e;t.arc(n+l.topLeft,r+l.topLeft,l.topLeft,1.5*an,an,!0),t.lineTo(n,r+a-l.bottomLeft),t.arc(n+l.bottomLeft,r+a-l.bottomLeft,l.bottomLeft,an,xr,!0),t.lineTo(n+o-l.bottomRight,r+a),t.arc(n+o-l.bottomRight,r+a-l.bottomRight,l.bottomRight,xr,0,!0),t.lineTo(n+o,r+l.topRight),t.arc(n+o-l.topRight,r+l.topRight,l.topRight,0,-xr,!0),t.lineTo(n+l.topLeft,r)}function tT(t,e){let n=(""+t).match($8);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}function Bx(t,e){let n={},r=ht(e),o=r?Object.keys(e):e,a=ht(t)?r?l=>pt(t[l],t[e[l]]):l=>t[l]:()=>t;for(let l of o)n[l]=nT(a(l));return n}function Ix(t){return Bx(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Fs(t){return Bx(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Rr(t){let e=Ix(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Bn(t,e){t=t||{},e=e||zt.font;let n=pt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=pt(t.style,e.style);r&&!(""+r).match(eT)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);let o={family:pt(t.family,e.family),lineHeight:tT(pt(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:pt(t.weight,e.weight),string:""};return o.string=K8(o),o}function ed(t,e,n,r){let o,a,l;for(o=0,a=t.length;o<a;++o)if(l=t[o],l!==void 0&&l!==void 0)return l}function rT(t,e,n){let{min:r,max:o}=t,a=yx(e,(o-r)/2),l=(c,u)=>n&&c===0?0:c+u;return{min:l(r,-Math.abs(a)),max:l(o,a)}}function Gs(t,e){return Object.assign(Object.create(t),e)}function dg(t,e=[""],n,r,o=()=>t[0]){let a=n||t;typeof r>"u"&&(r=Nx("_fallback",t));let l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:a,_fallback:r,_getTarget:o,override:c=>dg([c,...t],e,a,r)};return new Proxy(l,{deleteProperty(c,u){return delete c[u],delete c._keys,delete t[0][u],!0},get(c,u){return _x(c,u,()=>dT(u,e,t,c))},getOwnPropertyDescriptor(c,u){return Reflect.getOwnPropertyDescriptor(c._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(c,u){return Yv(c).includes(u)},ownKeys(c){return Yv(c)},set(c,u,d){let f=c._storage||(c._storage=o());return c[u]=f[u]=d,delete c._keys,!0}})}function Ws(t,e,n,r){let o={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Mx(t,r),setContext:a=>Ws(t,a,n,r),override:a=>Ws(t.override(a),e,n,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete t[l],!0},get(a,l,c){return _x(a,l,()=>aT(a,l,c))},getOwnPropertyDescriptor(a,l){return a._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(a,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(a,l,c){return t[l]=c,delete a[l],!0}})}function Mx(t,e={scriptable:!0,indexable:!0}){let{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:o=e.allKeys}=t;return{allKeys:o,scriptable:n,indexable:r,isScriptable:Xa(n)?n:()=>n,isIndexable:Xa(r)?r:()=>r}}function _x(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];let r=n();return t[e]=r,r}function aT(t,e,n){let{_proxy:r,_context:o,_subProxy:a,_descriptors:l}=t,c=r[e];return Xa(c)&&l.isScriptable(e)&&(c=iT(e,c,t,n)),on(c)&&c.length&&(c=sT(e,c,t,l.isIndexable)),hg(e,c)&&(c=Ws(c,o,a&&a[e],l)),c}function iT(t,e,n,r){let{_proxy:o,_context:a,_subProxy:l,_stack:c}=n;if(c.has(t))throw new Error("Recursion detected: "+Array.from(c).join("->")+"->"+t);c.add(t);let u=e(a,l||r);return c.delete(t),hg(t,u)&&(u=fg(o._scopes,o,t,u)),u}function sT(t,e,n,r){let{_proxy:o,_context:a,_subProxy:l,_descriptors:c}=n;if(typeof a.index<"u"&&r(t))return e[a.index%e.length];if(ht(e[0])){let u=e,d=o._scopes.filter(f=>f!==u);e=[];for(let f of u){let p=fg(d,o,t,f);e.push(Ws(p,a,l&&l[t],c))}}return e}function Ox(t,e,n){return Xa(t)?t(e,n):t}function cT(t,e,n,r,o){for(let a of e){let l=lT(n,a);if(l){t.add(l);let c=Ox(l._fallback,n,o);if(typeof c<"u"&&c!==n&&c!==r)return c}else if(l===!1&&typeof r<"u"&&n!==r)return null}return!1}function fg(t,e,n,r){let o=e._rootScopes,a=Ox(e._fallback,n,r),l=[...t,...o],c=new Set;c.add(r);let u=qv(c,l,n,a||n,r);return u===null||typeof a<"u"&&a!==n&&(u=qv(c,l,a,u,r),u===null)?!1:dg(Array.from(c),[""],o,a,()=>uT(e,n,r))}function qv(t,e,n,r,o){for(;n;)n=cT(t,e,n,r,o);return n}function uT(t,e,n){let r=t._getTarget();e in r||(r[e]={});let o=r[e];return on(o)&&ht(n)?n:o||{}}function dT(t,e,n,r){let o;for(let a of e)if(o=Nx(oT(a,t),n),typeof o<"u")return hg(t,o)?fg(n,r,t,o):o}function Nx(t,e){for(let n of e){if(!n)continue;let r=n[t];if(typeof r<"u")return r}}function Yv(t){let e=t._keys;return e||(e=t._keys=hT(t._scopes)),e}function hT(t){let e=new Set;for(let n of t)for(let r of Object.keys(n).filter(o=>!o.startsWith("_")))e.add(r);return Array.from(e)}function fT(t,e,n,r){let{iScale:o}=t,{key:a="r"}=this._parsing,l=new Array(r),c,u,d,f;for(c=0,u=r;c<u;++c)d=c+n,f=e[d],l[c]={r:o.parse(Ka(f,a),d)};return l}function pg(){return typeof window<"u"&&typeof document<"u"}function Ag(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Sd(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}function pT(t,e){return Yd(t).getPropertyValue(e)}function Ri(t,e,n){let r={};n=n?"-"+n:"";for(let o=0;o<4;o++){let a=AT[o];r[a]=parseFloat(t[e+"-"+a+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function mT(t,e){let n=t.touches,r=n&&n.length?n[0]:t,{offsetX:o,offsetY:a}=r,l=!1,c,u;if(gT(o,a,t.target))c=o,u=a;else{let d=e.getBoundingClientRect();c=r.clientX-d.left,u=r.clientY-d.top,l=!0}return{x:c,y:u,box:l}}function Li(t,e){if("native"in t)return t;let{canvas:n,currentDevicePixelRatio:r}=e,o=Yd(n),a=o.boxSizing==="border-box",l=Ri(o,"padding"),c=Ri(o,"border","width"),{x:u,y:d,box:f}=mT(t,n),p=l.left+(f&&c.left),A=l.top+(f&&c.top),{width:b,height:y}=e;return a&&(b-=l.width+c.width,y-=l.height+c.height),{x:Math.round((u-p)/b*n.width/r),y:Math.round((d-A)/y*n.height/r)}}function bT(t,e,n){let r,o;if(e===void 0||n===void 0){let a=t&&Ag(t);if(!a)e=t.clientWidth,n=t.clientHeight;else{let l=a.getBoundingClientRect(),c=Yd(a),u=Ri(c,"border","width"),d=Ri(c,"padding");e=l.width-d.width-u.width,n=l.height-d.height-u.height,r=Sd(c.maxWidth,a,"clientWidth"),o=Sd(c.maxHeight,a,"clientHeight")}}return{width:e,height:n,maxWidth:r||kd,maxHeight:o||kd}}function yT(t,e,n,r){let o=Yd(t),a=Ri(o,"margin"),l=Sd(o.maxWidth,t,"clientWidth")||kd,c=Sd(o.maxHeight,t,"clientHeight")||kd,u=bT(t,e,n),{width:d,height:f}=u;if(o.boxSizing==="content-box"){let p=Ri(o,"border","width"),A=Ri(o,"padding");d-=A.width+p.width,f-=A.height+p.height}return d=Math.max(0,d-a.width),f=Math.max(0,r?d/r:f-a.height),d=td(Math.min(d,l,u.maxWidth)),f=td(Math.min(f,c,u.maxHeight)),d&&!f&&(f=td(d/2)),(e!==void 0||n!==void 0)&&r&&u.height&&f>u.height&&(f=u.height,d=td(Math.floor(f*r))),{width:d,height:f}}function Gv(t,e,n){let r=e||1,o=Math.floor(t.height*r),a=Math.floor(t.width*r);t.height=Math.floor(t.height),t.width=Math.floor(t.width);let l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||l.height!==o||l.width!==a?(t.currentDevicePixelRatio=r,l.height=o,l.width=a,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}function Kv(t,e){let n=pT(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Rs(t,e,n){return t?xT(e,n):wT()}function Lx(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function jx(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function nd(t,e,n){return t.options.clip?t[n]:e[n]}function kT(t,e){let{xScale:n,yScale:r}=t;return n&&r?{left:nd(n,e,"left"),right:nd(n,e,"right"),top:nd(r,e,"top"),bottom:nd(r,e,"bottom")}:e}function CT(t,e){let n=e._clip;if(n.disabled)return!1;let r=kT(e,t.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:r.bottom+(n.bottom===!0?0:n.bottom)}}function ST(t,e){let n=[],r=Object.keys(e);for(let o=0;o<r.length;o++){let a=t[r[o]];a&&a.active()&&n.push(a.wait())}return Promise.all(n)}function PT(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Jv(t,e){let n=t&&t.options||{},r=n.reverse,o=n.min===void 0?e:0,a=n.max===void 0?e:0;return{start:r?a:o,end:r?o:a}}function DT(t,e,n){if(n===!1)return!1;let r=Jv(t,n),o=Jv(e,n);return{top:o.end,right:r.end,bottom:o.start,left:r.start}}function TT(t){let e,n,r,o;return ht(t)?(e=t.top,n=t.right,r=t.bottom,o=t.left):e=n=r=o=t,{top:e,right:n,bottom:r,left:o,disabled:t===!1}}function Fx(t,e){let n=[],r=t._getSortedDatasetMetas(e),o,a;for(o=0,a=r.length;o<a;++o)n.push(r[o].index);return n}function Zv(t,e,n,r={}){let o=t.keys,a=r.mode==="single",l,c,u,d;if(e===null)return;let f=!1;for(l=0,c=o.length;l<c;++l){if(u=+o[l],u===n){if(f=!0,r.all)continue;break}d=t.values[u],Fr(d)&&(a||e===0||Ga(e)===Ga(d))&&(e+=d)}return!f&&!r.all?0:e}function BT(t,e){let{iScale:n,vScale:r}=e,o=n.axis==="x"?"x":"y",a=r.axis==="x"?"x":"y",l=Object.keys(t),c=new Array(l.length),u,d,f;for(u=0,d=l.length;u<d;++u)f=l[u],c[u]={[o]:f,[a]:t[f]};return c}function qp(t,e){let n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function IT(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function MT(t){let{min:e,max:n,minDefined:r,maxDefined:o}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:o?n:Number.POSITIVE_INFINITY}}function _T(t,e,n){let r=t[e]||(t[e]={});return r[n]||(r[n]={})}function $v(t,e,n,r){for(let o of e.getMatchingVisibleMetas(r).reverse()){let a=t[o.index];if(n&&a>0||!n&&a<0)return o.index}return null}function e1(t,e){let{chart:n,_cachedMeta:r}=t,o=n._stacks||(n._stacks={}),{iScale:a,vScale:l,index:c}=r,u=a.axis,d=l.axis,f=IT(a,l,r),p=e.length,A;for(let b=0;b<p;++b){let y=e[b],{[u]:k,[d]:w}=y,S=y._stacks||(y._stacks={});A=S[d]=_T(o,f,k),A[c]=w,A._top=$v(A,l,!0,r.type),A._bottom=$v(A,l,!1,r.type);let M=A._visualValues||(A._visualValues={});M[c]=w}}function Yp(t,e){let n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function OT(t,e){return Gs(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function NT(t,e,n){return Gs(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Ql(t,e){let n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(let o of e){let a=o._stacks;if(!a||a[r]===void 0||a[r][n]===void 0)return;delete a[r][n],a[r]._visualValues!==void 0&&a[r]._visualValues[n]!==void 0&&delete a[r]._visualValues[n]}}}function jT(t,e){if(!t._cache.$bar){let n=t.getMatchingVisibleMetas(e),r=[];for(let o=0,a=n.length;o<a;o++)r=r.concat(n[o].controller.getAllParsedValues(t));t._cache.$bar=kx(r.sort((o,a)=>o-a))}return t._cache.$bar}function FT(t){let e=t.iScale,n=jT(e,t.type),r=e._length,o,a,l,c,u=()=>{l===32767||l===-32768||(ac(c)&&(r=Math.min(r,Math.abs(l-c)||r)),c=l)};for(o=0,a=n.length;o<a;++o)l=e.getPixelForValue(n[o]),u();for(c=void 0,o=0,a=e.ticks.length;o<a;++o)l=e.getPixelForTick(o),u();return r}function RT(t,e,n,r){let o=n.barThickness,a,l;return St(o)?(a=e.min*n.categoryPercentage,l=n.barPercentage):(a=o*r,l=1),{chunk:a/r,ratio:l,start:e.pixels[t]-a/2}}function zT(t,e,n,r){let o=e.pixels,a=o[t],l=t>0?o[t-1]:null,c=t<o.length-1?o[t+1]:null,u=n.categoryPercentage;l===null&&(l=a-(c===null?e.end-e.start:c-a)),c===null&&(c=a+a-l);let d=a-(a-Math.min(l,c))/2*u;return{chunk:Math.abs(c-l)/2*u/r,ratio:n.barPercentage,start:d}}function QT(t,e,n,r){let o=n.parse(t[0],r),a=n.parse(t[1],r),l=Math.min(o,a),c=Math.max(o,a),u=l,d=c;Math.abs(l)>Math.abs(c)&&(u=c,d=l),e[n.axis]=d,e._custom={barStart:u,barEnd:d,start:o,end:a,min:l,max:c}}function Rx(t,e,n,r){return on(t)?QT(t,e,n,r):e[n.axis]=n.parse(t,r),e}function n1(t,e,n,r){let o=t.iScale,a=t.vScale,l=o.getLabels(),c=o===a,u=[],d,f,p,A;for(d=n,f=n+r;d<f;++d)A=e[d],p={},p[o.axis]=c||o.parse(l[d],d),u.push(Rx(A,p,a,d));return u}function Kp(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function HT(t,e,n){return t!==0?Ga(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function UT(t){let e,n,r,o,a;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(o="end",a="start"):(o="start",a="end"),{start:n,end:r,reverse:e,top:o,bottom:a}}function VT(t,e,n,r){let o=e.borderSkipped,a={};if(!o){t.borderSkipped=a;return}if(o===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:l,end:c,reverse:u,top:d,bottom:f}=UT(t);o==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?o=d:(n._bottom||0)===r?o=f:(a[r1(f,l,c,u)]=!0,o=d)),a[r1(o,l,c,u)]=!0,t.borderSkipped=a}function r1(t,e,n,r){return r?(t=WT(t,e,n),t=o1(t,n,e)):t=o1(t,e,n),t}function WT(t,e,n){return t===e?n:t===n?e:t}function o1(t,e,n){return t==="start"?e:t==="end"?n:t}function qT(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}function YT(t,e,n){let r=1,o=1,a=0,l=0;if(e<vr){let c=t,u=c+e,d=Math.cos(c),f=Math.sin(c),p=Math.cos(u),A=Math.sin(u),b=(T,P,R)=>fA(T,c,u,!0)?1:Math.max(P,P*n,R,R*n),y=(T,P,R)=>fA(T,c,u,!0)?-1:Math.min(P,P*n,R,R*n),k=b(0,d,p),w=b(xr,f,A),S=y(an,d,p),M=y(an+xr,f,A);r=(k-S)/2,o=(w-M)/2,a=-(k+S)/2,l=-(w+M)/2}return{ratioX:r,ratioY:o,offsetX:a,offsetY:l}}function Oi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}function KT(t,e,n,r){let{controller:o,data:a,_sorted:l}=t,c=o._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(c&&e===c.axis&&e!=="r"&&l&&a.length){let d=c._reversePixels?L8:pA;if(r){if(o._sharedOptions){let f=a[0],p=typeof f.getRange=="function"&&f.getRange(e);if(p){let A=d(a,e,n-p),b=d(a,e,n+p);return{lo:A.lo,hi:b.hi}}}}else{let f=d(a,e,n);if(u){let{vScale:p}=o._cachedMeta,{_parsed:A}=t,b=A.slice(0,f.lo+1).reverse().findIndex(k=>!St(k[p.axis]));f.lo-=Math.max(0,b);let y=A.slice(f.hi).findIndex(k=>!St(k[p.axis]));f.hi+=Math.max(0,y)}return f}}return{lo:0,hi:a.length-1}}function Gd(t,e,n,r,o){let a=t.getSortedVisibleDatasetMetas(),l=n[e];for(let c=0,u=a.length;c<u;++c){let{index:d,data:f}=a[c],{lo:p,hi:A}=KT(a[c],e,l,o);for(let b=p;b<=A;++b){let y=f[b];y.skip||r(y,d,b)}}}function XT(t){let e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,o){let a=e?Math.abs(r.x-o.x):0,l=n?Math.abs(r.y-o.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(l,2))}}function Xp(t,e,n,r,o){let a=[];return!o&&!t.isPointInArea(e)||Gd(t,n,e,function(l,c,u){!o&&!Tx(l,t.chartArea,0)||l.inRange(e.x,e.y,r)&&a.push({element:l,datasetIndex:c,index:u})},!0),a}function JT(t,e,n,r){let o=[];function a(l,c,u){let{startAngle:d,endAngle:f}=l.getProps(["startAngle","endAngle"],r),{angle:p}=_8(l,{x:e.x,y:e.y});fA(p,d,f)&&o.push({element:l,datasetIndex:c,index:u})}return Gd(t,n,e,a),o}function ZT(t,e,n,r,o,a){let l=[],c=XT(n),u=Number.POSITIVE_INFINITY;function d(f,p,A){let b=f.inRange(e.x,e.y,o);if(r&&!b)return;let y=f.getCenterPoint(o);if(!(a||t.isPointInArea(y))&&!b)return;let k=c(e,y);k<u?(l=[{element:f,datasetIndex:p,index:A}],u=k):k===u&&l.push({element:f,datasetIndex:p,index:A})}return Gd(t,n,e,d),l}function Jp(t,e,n,r,o,a){return!a&&!t.isPointInArea(e)?[]:n==="r"&&!r?JT(t,e,n,o):ZT(t,e,n,r,o,a)}function a1(t,e,n,r,o){let a=[],l=n==="x"?"inXRange":"inYRange",c=!1;return Gd(t,n,e,(u,d,f)=>{u[l]&&u[l](e[n],o)&&(a.push({element:u,datasetIndex:d,index:f}),c=c||u.inRange(e.x,e.y,o))}),r&&!c?[]:a}function Hl(t,e){return t.filter(n=>n.pos===e)}function i1(t,e){return t.filter(n=>zx.indexOf(n.pos)===-1&&n.box.axis===e)}function Ul(t,e){return t.sort((n,r)=>{let o=e?r:n,a=e?n:r;return o.weight===a.weight?o.index-a.index:o.weight-a.weight})}function eB(t){let e=[],n,r,o,a,l,c;for(n=0,r=(t||[]).length;n<r;++n)o=t[n],{position:a,options:{stack:l,stackWeight:c=1}}=o,e.push({index:n,box:o,pos:a,horizontal:o.isHorizontal(),weight:o.weight,stack:l&&a+l,stackWeight:c});return e}function tB(t){let e={};for(let n of t){let{stack:r,pos:o,stackWeight:a}=n;if(!r||!zx.includes(o))continue;let l=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=a}return e}function nB(t,e){let n=tB(t),{vBoxMaxWidth:r,hBoxMaxHeight:o}=e,a,l,c;for(a=0,l=t.length;a<l;++a){c=t[a];let{fullSize:u}=c.box,d=n[c.stack],f=d&&c.stackWeight/d.weight;c.horizontal?(c.width=f?f*r:u&&e.availableWidth,c.height=o):(c.width=r,c.height=f?f*o:u&&e.availableHeight)}return n}function rB(t){let e=eB(t),n=Ul(e.filter(d=>d.box.fullSize),!0),r=Ul(Hl(e,"left"),!0),o=Ul(Hl(e,"right")),a=Ul(Hl(e,"top"),!0),l=Ul(Hl(e,"bottom")),c=i1(e,"x"),u=i1(e,"y");return{fullSize:n,leftAndTop:r.concat(a),rightAndBottom:o.concat(u).concat(l).concat(c),chartArea:Hl(e,"chartArea"),vertical:r.concat(o).concat(u),horizontal:a.concat(l).concat(c)}}function s1(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function Qx(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function oB(t,e,n,r){let{pos:o,box:a}=n,l=t.maxPadding;if(!ht(o)){n.size&&(t[o]-=n.size);let p=r[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?a.height:a.width),n.size=p.size/p.count,t[o]+=n.size}a.getPadding&&Qx(l,a.getPadding());let c=Math.max(0,e.outerWidth-s1(l,t,"left","right")),u=Math.max(0,e.outerHeight-s1(l,t,"top","bottom")),d=c!==t.w,f=u!==t.h;return t.w=c,t.h=u,n.horizontal?{same:d,other:f}:{same:f,other:d}}function aB(t){let e=t.maxPadding;function n(r){let o=Math.max(e[r]-t[r],0);return t[r]+=o,o}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function iB(t,e){let n=e.maxPadding;function r(o){let a={left:0,top:0,right:0,bottom:0};return o.forEach(l=>{a[l]=Math.max(e[l],n[l])}),a}return r(t?["left","right"]:["top","bottom"])}function Yl(t,e,n,r){let o=[],a,l,c,u,d,f;for(a=0,l=t.length,d=0;a<l;++a){c=t[a],u=c.box,u.update(c.width||e.w,c.height||e.h,iB(c.horizontal,e));let{same:p,other:A}=oB(e,n,c,r);d|=p&&o.length,f=f||A,u.fullSize||o.push(c)}return d&&Yl(o,e,n,r)||f}function rd(t,e,n,r,o){t.top=n,t.left=e,t.right=e+r,t.bottom=n+o,t.width=r,t.height=o}function l1(t,e,n,r){let o=n.padding,{x:a,y:l}=e;for(let c of t){let u=c.box,d=r[c.stack]||{placed:0,weight:1},f=c.stackWeight/d.weight||1;if(c.horizontal){let p=e.w*f,A=d.size||u.height;ac(d.start)&&(l=d.start),u.fullSize?rd(u,o.left,l,n.outerWidth-o.right-o.left,A):rd(u,e.left+d.placed,l,p,A),d.start=l,d.placed+=p,l=u.bottom}else{let p=e.h*f,A=d.size||u.width;ac(d.start)&&(a=d.start),u.fullSize?rd(u,a,o.top,A,n.outerHeight-o.bottom-o.top):rd(u,a,e.top+d.placed,A,p),d.start=a,d.placed+=p,a=u.right}}e.x=a,e.y=l}function lB(t,e){let n=t.style,r=t.getAttribute("height"),o=t.getAttribute("width");if(t[pd]={initial:{height:r,width:o,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",c1(o)){let a=Kv(t,"width");a!==void 0&&(t.width=a)}if(c1(r))if(t.style.height==="")t.height=t.width/(e||2);else{let a=Kv(t,"height");a!==void 0&&(t.height=a)}return t}function cB(t,e,n){t&&t.addEventListener(e,n,Hx)}function uB(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Hx)}function dB(t,e){let n=sB[t.type]||t.type,{x:r,y:o}=Li(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:o!==void 0?o:null}}function Td(t,e){for(let n of t)if(n===e||n.contains(e))return!0}function hB(t,e,n){let r=t.canvas,o=new MutationObserver(a=>{let l=!1;for(let c of a)l=l||Td(c.addedNodes,r),l=l&&!Td(c.removedNodes,r);l&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function fB(t,e,n){let r=t.canvas,o=new MutationObserver(a=>{let l=!1;for(let c of a)l=l||Td(c.removedNodes,r),l=l&&!Td(c.addedNodes,r);l&&n()});return o.observe(document,{childList:!0,subtree:!0}),o}function Ux(){let t=window.devicePixelRatio;t!==u1&&(u1=t,sc.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function pB(t,e){sc.size||window.addEventListener("resize",Ux),sc.set(t,e)}function AB(t){sc.delete(t),sc.size||window.removeEventListener("resize",Ux)}function gB(t,e,n){let r=t.canvas,o=r&&Ag(r);if(!o)return;let a=Ex((c,u)=>{let d=o.clientWidth;n(c,u),d<o.clientWidth&&n()},window),l=new ResizeObserver(c=>{let u=c[0],d=u.contentRect.width,f=u.contentRect.height;d===0&&f===0||a(d,f)});return l.observe(o),pB(t,a),l}function Zp(t,e,n){n&&n.disconnect(),e==="resize"&&AB(t)}function mB(t,e,n){let r=t.canvas,o=Ex(a=>{t.ctx!==null&&n(dB(a,t))},t);return cB(r,e,o),o}function bB(t){return!pg()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?kA:CA}function yB(t,e){let n=t.options.ticks,r=vB(t),o=Math.min(n.maxTicksLimit||r,r),a=n.major.enabled?wB(e):[],l=a.length,c=a[0],u=a[l-1],d=[];if(l>o)return kB(e,d,a,l/o),d;let f=xB(a,e,o);if(l>0){let p,A,b=l>1?Math.round((u-c)/(l-1)):null;for(od(e,d,f,St(b)?0:c-b,c),p=0,A=l-1;p<A;p++)od(e,d,f,a[p],a[p+1]);return od(e,d,f,u,St(b)?e.length:u+b),d}return od(e,d,f),d}function vB(t){let e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),o=t._maxLength/n;return Math.floor(Math.min(r,o))}function xB(t,e,n){let r=CB(t),o=e.length/n;if(!r)return Math.max(o,1);let a=D8(r);for(let l=0,c=a.length-1;l<c;l++){let u=a[l];if(u>o)return u}return Math.max(o,1)}function wB(t){let e=[],n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function kB(t,e,n,r){let o=0,a=n[0],l;for(r=Math.ceil(r),l=0;l<t.length;l++)l===a&&(e.push(t[l]),o++,a=n[o*r])}function od(t,e,n,r,o){let a=pt(r,0),l=Math.min(pt(o,t.length),t.length),c=0,u,d,f;for(n=Math.ceil(n),o&&(u=o-r,n=u/Math.floor(u/n)),f=a;f<0;)c++,f=Math.round(a+c*n);for(d=Math.max(a,0);d<l;d++)d===f&&(e.push(t[d]),c++,f=Math.round(a+c*n))}function CB(t){let e=t.length,n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}function f1(t,e){let n=[],r=t.length/e,o=t.length,a=0;for(;a<o;a+=r)n.push(t[Math.floor(a)]);return n}function SB(t,e,n){let r=t.ticks.length,o=Math.min(e,r-1),a=t._startPixel,l=t._endPixel,c=1e-6,u=t.getPixelForTick(o),d;if(!(n&&(r===1?d=Math.max(u-a,l-u):e===0?d=(t.getPixelForTick(1)-u)/2:d=(u-t.getPixelForTick(o-1))/2,u+=o<e?d:-d,u<a-c||u>l+c)))return u}function PB(t,e){yt(t,n=>{let r=n.gc,o=r.length/2,a;if(o>e){for(a=0;a<o;++a)delete n.data[r[a]];r.splice(0,o)}})}function Vl(t){return t.drawTicks?t.tickLength:0}function p1(t,e){if(!t.display)return 0;let n=Bn(t.font,e),r=Rr(t.padding);return(on(t.text)?t.text.length:1)*n.lineHeight+r.height}function DB(t,e){return Gs(t,{scale:e,type:"scale"})}function TB(t,e,n){return Gs(t,{tick:n,index:e,type:"tick"})}function BB(t,e,n){let r=lg(t);return(n&&e!=="right"||!n&&e==="right")&&(r=EB(r)),r}function IB(t,e,n,r){let{top:o,left:a,bottom:l,right:c,chart:u}=t,{chartArea:d,scales:f}=u,p=0,A,b,y,k=l-o,w=c-a;if(t.isHorizontal()){if(b=Tn(r,a,c),ht(n)){let S=Object.keys(n)[0],M=n[S];y=f[S].getPixelForValue(M)+k-e}else n==="center"?y=(d.bottom+d.top)/2+k-e:y=d1(t,n,e);A=c-a}else{if(ht(n)){let S=Object.keys(n)[0],M=n[S];b=f[S].getPixelForValue(M)-w+e}else n==="center"?b=(d.left+d.right)/2-w+e:b=d1(t,n,e);y=Tn(r,l,o),p=n==="left"?-xr:xr}return{titleX:b,titleY:y,maxWidth:A,rotation:p}}function MB(t,e,n){let r=oc(Object.create(null),[n?zt.get(n):{},zt.get(e),t.defaults]);zt.set(e,r),t.defaultRoutes&&_B(e,t.defaultRoutes),t.descriptors&&zt.describe(e,t.descriptors)}function _B(t,e){Object.keys(e).forEach(n=>{let r=n.split("."),o=r.pop(),a=[t].concat(r).join("."),l=e[n].split("."),c=l.pop(),u=l.join(".");zt.route(a,o,u,c)})}function OB(t){return"id"in t&&"defaults"in t}function NB(t){let e={},n=[],r=Object.keys(To.plugins.items);for(let a=0;a<r.length;a++)n.push(To.getPlugin(r[a]));let o=t.plugins||[];for(let a=0;a<o.length;a++){let l=o[a];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function LB(t,e){return!e&&t===!1?null:t===!0?{}:t}function jB(t,{plugins:e,localIds:n},r,o){let a=[],l=t.getContext();for(let c of e){let u=c.id,d=LB(r[u],o);d!==null&&a.push({plugin:c,options:FB(t.config,{plugin:c,local:n[u]},d,l)})}return a}function FB(t,{plugin:e,local:n},r,o){let a=t.pluginScopeKeys(e),l=t.getOptionScopes(r,a);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,o,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function PA(t,e){let n=zt.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function RB(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function zB(t,e){return t===e?"_index_":"_value_"}function A1(t){if(t==="x"||t==="y"||t==="r")return t}function QB(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function DA(t,...e){if(A1(t))return t;for(let n of e){let r=n.axis||QB(n.position)||t.length>1&&A1(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function g1(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function HB(t,e){if(e.data&&e.data.datasets){let n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return g1(t,"x",n[0])||g1(t,"y",n[0])}return{}}function UB(t,e){let n=Qi[t.type]||{scales:{}},r=e.scales||{},o=PA(t.type,e),a=Object.create(null);return Object.keys(r).forEach(l=>{let c=r[l];if(!ht(c))return console.error(`Invalid scale configuration for scale: ${l}`);if(c._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);let u=DA(l,c,HB(l,t),zt.scales[c.type]),d=zB(u,o),f=n.scales||{};a[l]=Zl(Object.create(null),[{axis:u},c,f[u],f[d]])}),t.data.datasets.forEach(l=>{let c=l.type||t.type,u=l.indexAxis||PA(c,e),d=(Qi[c]||{}).scales||{};Object.keys(d).forEach(f=>{let p=RB(f,u),A=l[p+"AxisID"]||p;a[A]=a[A]||Object.create(null),Zl(a[A],[{axis:p},r[A],d[f]])})}),Object.keys(a).forEach(l=>{let c=a[l];Zl(c,[zt.scales[c.type],zt.scale])}),a}function Vx(t){let e=t.options||(t.options={});e.plugins=pt(e.plugins,{}),e.scales=UB(t,e)}function Wx(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function VB(t){return t=t||{},t.data=Wx(t.data),Vx(t),t}function ad(t,e){let n=m1.get(t);return n||(n=e(),m1.set(t,n),qx.add(n)),n}function b1(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));let o=n.join(),a=r.get(o);return a||(a={resolver:dg(e,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(o,a)),a}function YB(t,e){let{isScriptable:n,isIndexable:r}=Mx(t);for(let o of e){let a=n(o),l=r(o),c=(l||a)&&t[o];if(a&&(Xa(c)||qB(c))||l&&on(c))return!0}return!1}function y1(t,e){return t==="top"||t==="bottom"||KB.indexOf(t)===-1&&e==="x"}function v1(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function x1(t){let e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),_t(n&&n.onComplete,[t],e)}function XB(t){let e=t.chart,n=e.options.animation;_t(n&&n.onProgress,[t],e)}function Yx(t){return pg()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}function JB(t,e,n){let r=Object.keys(t);for(let o of r){let a=+o;if(a>=e){let l=t[o];delete t[o],(n>0||a>e)&&(t[a+n]=l)}}}function ZB(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}function k1(){return yt(gg.instances,t=>t._plugins.invalidate())}function Gx(t,e){let{x:n,y:r,base:o,width:a,height:l}=t.getProps(["x","y","base","width","height"],e),c,u,d,f,p;return t.horizontal?(p=l/2,c=Math.min(n,o),u=Math.max(n,o),d=r-p,f=r+p):(p=a/2,c=n-p,u=n+p,d=Math.min(r,o),f=Math.max(r,o)),{left:c,top:d,right:u,bottom:f}}function Wa(t,e,n,r){return t?0:ro(e,n,r)}function $B(t,e,n){let r=t.options.borderWidth,o=t.borderSkipped,a=Ix(r);return{t:Wa(o.top,a.top,0,n),r:Wa(o.right,a.right,0,e),b:Wa(o.bottom,a.bottom,0,n),l:Wa(o.left,a.left,0,e)}}function eI(t,e,n){let{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),o=t.options.borderRadius,a=Fs(o),l=Math.min(e,n),c=t.borderSkipped,u=r||ht(o);return{topLeft:Wa(!u||c.top||c.left,a.topLeft,0,l),topRight:Wa(!u||c.top||c.right,a.topRight,0,l),bottomLeft:Wa(!u||c.bottom||c.left,a.bottomLeft,0,l),bottomRight:Wa(!u||c.bottom||c.right,a.bottomRight,0,l)}}function tI(t){let e=Gx(t),n=e.right-e.left,r=e.bottom-e.top,o=$B(t,n/2,r/2),a=eI(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:a},inner:{x:e.left+o.l,y:e.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(o.t,o.l)),topRight:Math.max(0,a.topRight-Math.max(o.t,o.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(o.b,o.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(o.b,o.r))}}}}function $p(t,e,n,r){let o=e===null,a=n===null,l=t&&!(o&&a)&&Gx(t,r);return l&&(o||Ls(e,l.left,l.right))&&(a||Ls(n,l.top,l.bottom))}function nI(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function rI(t,e){t.rect(e.x,e.y,e.w,e.h)}function eA(t,e,n={}){let r=t.x!==n.x?-e:0,o=t.y!==n.y?-e:0,a=(t.x+t.w!==n.x+n.w?e:0)-r,l=(t.y+t.h!==n.y+n.h?e:0)-o;return{x:t.x+r,y:t.y+o,w:t.w+a,h:t.h+l,radius:t.radius}}function Kx(t){return BA[t%BA.length]}function Xx(t){return C1[t%C1.length]}function oI(t,e){return t.borderColor=Kx(e),t.backgroundColor=Xx(e),++e}function aI(t,e){return t.backgroundColor=t.data.map(()=>Kx(e++)),e}function iI(t,e){return t.backgroundColor=t.data.map(()=>Xx(e++)),e}function sI(t){let e=0;return(n,r)=>{let o=t.getDatasetMeta(r).controller;o instanceof vA?e=aI(n,e):o instanceof xA?e=iI(n,e):o&&(e=oI(n,e))}}function E1(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function lI(t){return t&&(t.borderColor||t.backgroundColor)}function cI(){return zt.borderColor!=="rgba(0,0,0,0.1)"||zt.backgroundColor!=="rgba(0,0,0,0.1)"}function hI(t,e,n,r,o){let a=fI(r,t,e,n),l=pI(o,r,e.lineHeight);return{itemWidth:a,itemHeight:l}}function fI(t,e,n,r){let o=t.text;return o&&typeof o!="string"&&(o=o.reduce((a,l)=>a.length>l.length?a:l)),e+n.size/2+r.measureText(o).width}function pI(t,e,n){let r=t;return typeof e.text!="string"&&(r=Jx(e,n)),r}function Jx(t,e){let n=t.text?t.text.length:0;return e*n}function AI(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}function mI(t,e){let n=new Id({ctx:t.ctx,options:e,chart:t});Or.configure(t,n,e),Or.addBox(t,n),t.titleBlock=n}function Do(t,e){return e&&(on(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function sa(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
121
121
|
`)>-1?t.split(`
|
|
122
122
|
`):t}function yI(t,e){let{element:n,datasetIndex:r,index:o}=e,a=t.getDatasetMeta(r).controller,{label:l,value:c}=a.getLabelAndValue(o);return{chart:t,label:l,parsed:a.getParsed(o),raw:t.data.datasets[r].data[o],formattedValue:c,dataset:a.getDataset(),dataIndex:o,datasetIndex:r,element:n}}function P1(t,e){let n=t.chart.ctx,{body:r,footer:o,title:a}=t,{boxWidth:l,boxHeight:c}=e,u=Bn(e.bodyFont),d=Bn(e.titleFont),f=Bn(e.footerFont),p=a.length,A=o.length,b=r.length,y=Rr(e.padding),k=y.height,w=0,S=r.reduce((P,R)=>P+R.before.length+R.lines.length+R.after.length,0);if(S+=t.beforeBody.length+t.afterBody.length,p&&(k+=p*d.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),S){let P=e.displayColors?Math.max(c,u.lineHeight):u.lineHeight;k+=b*P+(S-b)*u.lineHeight+(S-1)*e.bodySpacing}A&&(k+=e.footerMarginTop+A*f.lineHeight+(A-1)*e.footerSpacing);let M=0,T=function(P){w=Math.max(w,n.measureText(P).width+M)};return n.save(),n.font=d.string,yt(t.title,T),n.font=u.string,yt(t.beforeBody.concat(t.afterBody),T),M=e.displayColors?l+2+e.boxPadding:0,yt(r,P=>{yt(P.before,T),yt(P.lines,T),yt(P.after,T)}),M=0,n.font=f.string,yt(t.footer,T),n.restore(),w+=y.width,{width:w,height:k}}function vI(t,e){let{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function xI(t,e,n,r){let{x:o,width:a}=r,l=n.caretSize+n.caretPadding;if(t==="left"&&o+a+l>e.width||t==="right"&&o-a-l<0)return!0}function wI(t,e,n,r){let{x:o,width:a}=n,{width:l,chartArea:{left:c,right:u}}=t,d="center";return r==="center"?d=o<=(c+u)/2?"left":"right":o<=a/2?d="left":o>=l-a/2&&(d="right"),xI(d,t,e,n)&&(d="center"),d}function D1(t,e,n){let r=n.yAlign||e.yAlign||vI(t,n);return{xAlign:n.xAlign||e.xAlign||wI(t,e,n,r),yAlign:r}}function kI(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function CI(t,e,n){let{y:r,height:o}=t;return e==="top"?r+=n:e==="bottom"?r-=o+n:r-=o/2,r}function T1(t,e,n,r){let{caretSize:o,caretPadding:a,cornerRadius:l}=t,{xAlign:c,yAlign:u}=n,d=o+a,{topLeft:f,topRight:p,bottomLeft:A,bottomRight:b}=Fs(l),y=kI(e,c),k=CI(e,u,d);return u==="center"?c==="left"?y+=d:c==="right"&&(y-=d):c==="left"?y-=Math.max(f,A)+o:c==="right"&&(y+=Math.max(p,b)+o),{x:ro(y,0,r.width-e.width),y:ro(k,0,r.height-e.height)}}function id(t,e,n){let r=Rr(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function B1(t){return Do([],sa(t))}function EI(t,e,n){return Gs(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function I1(t,e){let n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}function or(t,e,n,r){let o=t[e].call(n,r);return typeof o>"u"?Zx[e].call(n,r):o}function DI(t,e,n,r){let o=t.indexOf(e);if(o===-1)return PI(t,e,n,r);let a=t.lastIndexOf(e);return o!==a?n:o}function M1(t){let e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function BI(t,e){let n=[],{bounds:r,step:o,min:a,max:l,precision:c,count:u,maxTicks:d,maxDigits:f,includeBounds:p}=t,A=o||1,b=d-1,{min:y,max:k}=e,w=!St(a),S=!St(l),M=!St(u),T=(k-y)/(f+1),P=Lv((k-y)/b/A)*A,R,F,V,U;if(P<1e-14&&!w&&!S)return[{value:y},{value:k}];U=Math.ceil(k/P)-Math.floor(y/P),U>b&&(P=Lv(U*P/b/A)*A),St(c)||(R=Math.pow(10,c),P=Math.ceil(P*R)/R),r==="ticks"?(F=Math.floor(y/P)*P,V=Math.ceil(k/P)*P):(F=y,V=k),w&&S&&o&&B8((l-a)/o,P/1e3)?(U=Math.round(Math.min((l-a)/P,d)),P=(l-a)/U,F=a,V=l):M?(F=w?a:F,V=S?l:V,U=u-1,P=(V-F)/U):(U=(V-F)/P,fd(U,Math.round(U),P/1e3)?U=Math.round(U):U=Math.ceil(U));let G=Math.max(jv(P),jv(F));R=Math.pow(10,St(c)?G:c),F=Math.round(F*R)/R,V=Math.round(V*R)/R;let W=0;for(w&&(p&&F!==a?(n.push({value:a}),F<a&&W++,fd(Math.round((F+W*P)*R)/R,a,_1(a,T,t))&&W++):F<a&&W++);W<U;++W){let X=Math.round((F+W*P)*R)/R;if(S&&X>l)break;n.push({value:X})}return S&&p&&V!==l?n.length&&fd(n[n.length-1].value,l,_1(l,T,t))?n[n.length-1].value=l:n.push({value:l}):(!S||V===l)&&n.push({value:V}),n}function _1(t,e,{horizontal:n,minRotation:r}){let o=Io(r),a=(n?Math.sin(o):Math.cos(o))||.001,l=.75*e*(""+t).length;return Math.min(e/a,l)}function O1(t,e){return t-e}function N1(t,e){if(St(e))return null;let n=t._adapter,{parser:r,round:o,isoWeekday:a}=t._parseOpts,l=e;return typeof r=="function"&&(l=r(l)),Fr(l)||(l=typeof r=="string"?n.parse(l,r):n.parse(l)),l===null?null:(o&&(l=o==="week"&&(Cd(a)||a===!0)?n.startOf(l,"isoWeek",a):n.startOf(l,o)),+l)}function L1(t,e,n,r){let o=ar.length;for(let a=ar.indexOf(t);a<o-1;++a){let l=Kd[ar[a]],c=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(c*l.size))<=r)return ar[a]}return ar[o-1]}function II(t,e,n,r,o){for(let a=ar.length-1;a>=ar.indexOf(n);a--){let l=ar[a];if(Kd[l].common&&t._adapter.diff(o,r,l)>=e-1)return l}return ar[n?ar.indexOf(n):0]}function MI(t){for(let e=ar.indexOf(t)+1,n=ar.length;e<n;++e)if(Kd[ar[e]].common)return ar[e]}function j1(t,e,n){if(!n)t[e]=!0;else if(n.length){let{lo:r,hi:o}=sg(n,e),a=n[r]>=e?n[r]:n[o];t[a]=!0}}function _I(t,e,n,r){let o=t._adapter,a=+o.startOf(e[0].value,r),l=e[e.length-1].value,c,u;for(c=a;c<=l;c=+o.add(c,1,r))u=n[c],u>=0&&(e[u].major=!0);return e}function F1(t,e,n){let r=[],o={},a=e.length,l,c;for(l=0;l<a;++l)c=e[l],o[c]=l,r.push({value:c,major:!1});return a===0||!n?r:_I(t,r,o,n)}function sd(t,e,n){let r=0,o=t.length-1,a,l,c,u;n?(e>=t[r].pos&&e<=t[o].pos&&({lo:r,hi:o}=pA(t,"pos",e)),{pos:a,time:c}=t[r],{pos:l,time:u}=t[o]):(e>=t[r].time&&e<=t[o].time&&({lo:r,hi:o}=pA(t,"time",e)),{time:a,pos:c}=t[r],{time:l,pos:u}=t[o]);let d=l-a;return d?c+(u-c)*(e-a)/d:c}function OI({type:t="bar",data:e,options:n}){let r=_.useRef(null),o=_.useRef(null);return _.useLayoutEffect(()=>{o.current&&(r.current?(r.current.options=n,r.current.data=e,r.current.update()):r.current=new gg(o.current,{type:t,data:e,options:n}))},[t,e,n]),E.jsx("div",{className:"chart",children:E.jsx("canvas",{ref:o})})}function NI({infoGroupId:t}){let[e,n]=_.useState("overview"),r=sw(t).filter(d=>d.cider_type=="Compute"),o=In(r.length?r.map(d=>`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${d.info_resourceid}/`):null,{defaultValue:[]}),a=In(e!=="overview"?`https://rest-test.ccr.xdmod.org/rest/v0.1/custom_queries/wait_times/${e}/queue/job_walltime`:null);if(!o.length||!r.length)return;let l=o.map((d,f)=>d.error?d:{...d.data[0],...r[f]}).filter(d=>!d.error);if(!l.length)return;let c=[E.jsxs("select",{value:e,onChange:d=>n(d.target.value),children:[E.jsx("option",{value:"overview",children:"Overview"},"overview"),l.map(d=>E.jsx("option",{value:d.info_resourceid,children:ld(d.resource_descriptive_name)},d.info_resourceid))]},"select")],u=null;if(e==="overview")u=E.jsx("div",{className:"cards",children:l.map(({info_resourceid:d,job_count:f,median_expansion_factor:p,median_wait_time:A,median_wall_time:b,resource_descriptive_name:y})=>E.jsxs("p",{className:"card metrics-overview",children:[E.jsxs("b",{children:[ld(y),":"]})," Users ran"," ",E.jsxs("strong",{children:[E.jsx(ct,{name:"file-earmark-code"}),parseInt(f).toLocaleString("en-us")," jobs"]})," ","during the last 30 days. Waiting in the queue caused an average"," ",E.jsxs("strong",{children:[E.jsx(ct,{name:"calculator"}),((p-1)*100).toLocaleString("en-us",{maximumFractionDigits:0}),"% increase"]})," ","in the total completion time. The average job waited for"," ",E.jsxs("strong",{children:[E.jsx(ct,{name:"hourglass-split"})," ",Q1(A)]})," ","and ran for"," ",E.jsxs("strong",{children:[E.jsx(ct,{name:"stopwatch"}),Q1(b)]}),"."," ",E.jsx("a",{title:`Wait time chart for ${ld(y)}`,href:"#",onClick:k=>{k.preventDefault(),n(d)},children:"View chart \xBB"})]},d))});else if(a&&a.info_resource_id===e){let d={},f=tA;for(let y of a.data)d[y.queue]=d[y.queue]||{label:y.queue,data:Array(tA.length).fill(null)},d[y.queue].data[tA.indexOf(y.job_walltime)]=y.median_wait_time/60;let p=Object.values(d);p.forEach((y,k)=>{let w=z1[k%(z1.length-1)];y.backgroundColor=getComputedStyle(document.body).getPropertyValue(w)});let A=l.find(y=>y.info_resourceid==a.info_resource_id),b={interaction:{intersect:!1,mode:"index"},plugins:{title:{display:!0,text:`Median Wait Time by Queue on ${ld(A.resource_descriptive_name)}: Last 30 Days`}},scales:{x:{title:{display:!0,text:"Job Wall Time (Run Time)"}},y:{title:{display:!0,text:"Median Wait Time (Minutes)"}}}};u=E.jsxs(E.Fragment,{children:[E.jsx(OI,{type:"bar",data:{labels:f,datasets:p},options:b}),E.jsx("p",{children:E.jsx("a",{href:"#",onClick:y=>{y.preventDefault(),n("overview")},children:"\xAB Back to overview"})})]})}return E.jsxs(_o,{title:"Wait Time",icon:"hourglass-split",headerComponents:c,children:[u,E.jsxs("p",{className:"metrics-disclaimer",children:[E.jsx(ct,{name:"info-circle"}),"These metrics describe activity from ACCESS projects. Many resources have additional projects that are not part of ACCESS."]})]})}function ua(t){return Array.isArray?Array.isArray(t):tw(t)==="[object Array]"}function LI(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function jI(t){return t==null?"":LI(t)}function Mo(t){return typeof t=="string"}function $x(t){return typeof t=="number"}function FI(t){return t===!0||t===!1||RI(t)&&tw(t)=="[object Boolean]"}function ew(t){return typeof t=="object"}function RI(t){return ew(t)&&t!==null}function yr(t){return t!=null}function rA(t){return!t.trim().length}function tw(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function nw(t){let e=null,n=null,r=null,o=1,a=null;if(Mo(t)||ua(t))r=t,e=U1(t),n=NA(t);else{if(!H1.call(t,"name"))throw new Error(UI("name"));let l=t.name;if(r=l,H1.call(t,"weight")&&(o=t.weight,o<=0))throw new Error(VI(l));e=U1(l),n=NA(l),a=t.getFn}return{path:e,id:n,weight:o,src:r,getFn:a}}function U1(t){return ua(t)?t:t.split(".")}function NA(t){return ua(t)?t.join("."):t}function WI(t,e){let n=[],r=!1,o=(a,l,c)=>{if(yr(a))if(!l[c])n.push(a);else{let u=l[c],d=a[u];if(!yr(d))return;if(c===l.length-1&&(Mo(d)||$x(d)||FI(d)))n.push(jI(d));else if(ua(d)){r=!0;for(let f=0,p=d.length;f<p;f+=1)o(d[f],l,c+1)}else l.length&&o(d,l,c+1)}};return o(t,Mo(e)?e.split("."):e,0),r?n:n[0]}function JI(t=1,e=3){let n=new Map,r=Math.pow(10,e);return{get(o){let a=o.match(XI).length;if(n.has(a))return n.get(a);let l=1/Math.pow(a,.5*t),c=parseFloat(Math.round(l*r)/r);return n.set(a,c),c},clear(){n.clear()}}}function rw(t,e,{getFn:n=Ye.getFn,fieldNormWeight:r=Ye.fieldNormWeight}={}){let o=new lc({getFn:n,fieldNormWeight:r});return o.setKeys(t.map(nw)),o.setSources(e),o.create(),o}function ZI(t,{getFn:e=Ye.getFn,fieldNormWeight:n=Ye.fieldNormWeight}={}){let{keys:r,records:o}=t,a=new lc({getFn:e,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(o),a}function cd(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:o=Ye.distance,ignoreLocation:a=Ye.ignoreLocation}={}){let l=e/t.length;if(a)return l;let c=Math.abs(r-n);return o?l+c/o:c?1:l}function $I(t=[],e=Ye.minMatchCharLength){let n=[],r=-1,o=-1,a=0;for(let l=t.length;a<l;a+=1){let c=t[a];c&&r===-1?r=a:!c&&r!==-1&&(o=a-1,o-r+1>=e&&n.push([r,o]),r=-1)}return t[a-1]&&a-r>=e&&n.push([r,a-1]),n}function e5(t,e,n,{location:r=Ye.location,distance:o=Ye.distance,threshold:a=Ye.threshold,findAllMatches:l=Ye.findAllMatches,minMatchCharLength:c=Ye.minMatchCharLength,includeMatches:u=Ye.includeMatches,ignoreLocation:d=Ye.ignoreLocation}={}){if(e.length>ji)throw new Error(HI(ji));let f=e.length,p=t.length,A=Math.max(0,Math.min(r,p)),b=a,y=A,k=c>1||u,w=k?Array(p):[],S;for(;(S=t.indexOf(e,y))>-1;){let V=cd(e,{currentLocation:S,expectedLocation:A,distance:o,ignoreLocation:d});if(b=Math.min(V,b),y=S+f,k){let U=0;for(;U<f;)w[S+U]=1,U+=1}}y=-1;let M=[],T=1,P=f+p,R=1<<f-1;for(let V=0;V<f;V+=1){let U=0,G=P;for(;U<G;)cd(e,{errors:V,currentLocation:A+G,expectedLocation:A,distance:o,ignoreLocation:d})<=b?U=G:P=G,G=Math.floor((P-U)/2+U);P=G;let W=Math.max(1,A-G+1),X=l?p:Math.min(A+G,p)+f,Y=Array(X+2);Y[X+1]=(1<<V)-1;for(let ae=X;ae>=W;ae-=1){let pe=ae-1,de=n[t.charAt(pe)];if(k&&(w[pe]=+!!de),Y[ae]=(Y[ae+1]<<1|1)&de,V&&(Y[ae]|=(M[ae+1]|M[ae])<<1|1|M[ae+1]),Y[ae]&R&&(T=cd(e,{errors:V,currentLocation:pe,expectedLocation:A,distance:o,ignoreLocation:d}),T<=b)){if(b=T,y=pe,y<=A)break;W=Math.max(1,2*A-y)}}if(cd(e,{errors:V+1,currentLocation:A,expectedLocation:A,distance:o,ignoreLocation:d})>b)break;M=Y}let F={isMatch:y>=0,score:Math.max(.001,T)};if(k){let V=$I(w,c);V.length?u&&(F.indices=V):F.isMatch=!1}return F}function t5(t){let e={};for(let n=0,r=t.length;n<r;n+=1){let o=t.charAt(n);e[o]=(e[o]||0)|1<<r-n-1}return e}function V1(t,e){let n=t.match(e);return n?n[1]:null}function o5(t,e={}){return t.split(r5).map(n=>{let r=n.trim().split(n5).filter(a=>a&&!!a.trim()),o=[];for(let a=0,l=r.length;a<l;a+=1){let c=r[a],u=!1,d=-1;for(;!u&&++d<W1;){let f=HA[d],p=f.isMultiMatch(c);p&&(o.push(new f(p,e)),u=!0)}if(!u)for(d=-1;++d<W1;){let f=HA[d],p=f.isSingleMatch(c);if(p){o.push(new f(p,e));break}}}return o})}function i5(...t){VA.push(...t)}function WA(t,e){for(let n=0,r=VA.length;n<r;n+=1){let o=VA[n];if(o.condition(t,e))return new o(t,e)}return new Nd(t,e)}function ow(t,e,{auto:n=!0}={}){let r=o=>{let a=Object.keys(o),l=s5(o);if(!l&&a.length>1&&!YA(o))return r(q1(o));if(l5(o)){let u=l?o[qA.PATH]:a[0],d=l?o[qA.PATTERN]:o[u];if(!Mo(d))throw new Error(QI(u));let f={keyId:NA(u),pattern:d};return n&&(f.searcher=WA(d,e)),f}let c={children:[],operator:a[0]};return a.forEach(u=>{let d=o[u];ua(d)&&d.forEach(f=>{c.children.push(r(f))})}),c};return YA(t)||(t=q1(t)),r(t)}function c5(t,{ignoreFieldNorm:e=Ye.ignoreFieldNorm}){t.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:a,score:l})=>{let c=o?o.weight:null;r*=Math.pow(l===0&&c?Number.EPSILON:l,(c||1)*(e?1:a))}),n.score=r})}function u5(t,e){let n=t.matches;e.matches=[],yr(n)&&n.forEach(r=>{if(!yr(r.indices)||!r.indices.length)return;let{indices:o,value:a}=r,l={indices:o,value:a};r.key&&(l.key=r.key.src),r.idx>-1&&(l.refIndex=r.idx),e.matches.push(l)})}function d5(t,e){e.score=t.score}function h5(t,e,{includeMatches:n=Ye.includeMatches,includeScore:r=Ye.includeScore}={}){let o=[];return n&&o.push(u5),r&&o.push(d5),t.map(a=>{let{idx:l}=a,c={item:e[l],refIndex:l};return o.length&&o.forEach(u=>{u(a,c)}),c})}function f5({highlight:t,text:e}){if(!t||!t.length)return e;let n=new RegExp(t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"gi"),r=[...e.matchAll(n)];if(!r.length)return e;let o=[],a=0;for(let l of r)l.index>a&&o.push(e.substr(a,l.index)),o.push(E.jsx("span",{className:"highlight",children:l[0]})),a=l.index+l[0].length;return o.push(e.substr(a)),o}function p5({delay:t=300,placeholder:e,setSearchText:n,width:r="calc(var(--width) / 4)"}){let o=_.useRef(null),a=_.useRef(null),[l,c]=_.useState(""),u=()=>{c(""),n(""),o.current.value="",o.current.focus()};return _.useLayoutEffect(()=>{o.current&&o.current.addEventListener("keyup",()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,n(o.current.value),c(o.current.value)},t)})},[o.current]),E.jsx(E.Fragment,{children:E.jsxs("div",{className:"search",children:[E.jsx("input",{placeholder:e,style:{width:r},ref:o}),l.length?E.jsx("button",{className:"btn btn-clear",title:"Clear search",onClick:u,children:E.jsx(ct,{name:"x-lg"})}):null]})})}function g5({infoGroupId:t}){let e=In(`https://ara-db.ccs.uky.edu/api=API_0/z0CiQbts8t4pnv6fJQD4g9nskbCOl6UD-67akYK68wk/rp=${t}?include=${A5.join(",")}`),[n,r]=_.useState(""),o=_.useMemo(()=>e&&e.length?new Ja(e,{keys:[{name:"software_name",weight:.6},{name:"software_description",weight:.4}]}):null,[e]);if(!e||!e.length)return;let a=d=>E.jsx(f5,{text:d,highlight:n}),l=[{key:"software_name",name:"Package",format:(d,f)=>{let p=[],A=a(d),b=f.software_web_page||f.software_documentation;return p.push(b?E.jsx("a",{href:b,children:A}):A),f.software_documentation&&p.push(E.jsx(E.Fragment,{children:" "}),E.jsx("a",{href:f.software_documentation,title:`Documentation for ${d}`,children:E.jsx(ct,{name:"book"})})),f.software_use_link&&f.software_use_link!=f.software_documentation&&p.push(E.jsx(E.Fragment,{children:" "}),E.jsx("a",{href:f.software_use_link.split(`
|
|
123
123
|
`)[0].trim(),title:`Usage example for ${d}`,children:E.jsx(ct,{name:"terminal"})})),E.jsx("span",{style:{lineHeight:1.3},children:p})}},{key:"software_versions",name:"Versions",format:(d,f)=>d.map(p=>p.replace(`${f.rp_name}: `,"").split(",").join(", "))},{key:"software_description",name:"Description",format:(d,f)=>{let p=/Description Source:[ ]+(http[^ ]+)/,A=d.match(p);return E.jsxs(E.Fragment,{children:[a(d.replace(p,""))," ",A?E.jsx("a",{href:A[1],title:`Description source for ${f.software_name}`,children:E.jsx(ct,{name:"info-circle"})}):null]})}}],c=n.length?o.search(n).map(d=>d.item):e,u=[E.jsx(p5,{placeholder:"Search software packages...",setSearchText:r})];return E.jsx(_o,{title:"Software",icon:"terminal",headerComponents:u,children:E.jsx(Qd,{columns:l,rows:c,scrollResetOnUpdate:!0})})}function m5({prompt:t="Jump To:"}){let[e,n]=_.useState([]),r=_.useRef(null),o=()=>{let l=[];for(let c of r.current.querySelectorAll("[data-section-title]"))l.push({icon:c.dataset.sectionIcon,id:c.id,title:c.dataset.sectionTitle});n(l)},a=l=>{let c=r.current.querySelector(`#${l}`);c&&c.scrollIntoView()};return _.useEffect(()=>{r.current&&(o(),document.addEventListener("accessci-update-sections",o))},[r.current]),E.jsx("div",{ref:l=>r.current=l?.parentElement,children:e.length>=2?E.jsxs("nav",{className:"section-navigation",children:[t?E.jsx("h2",{children:t}):null,E.jsx("ul",{children:e.map(({icon:l,id:c,title:u})=>E.jsx("li",{children:E.jsxs("a",{href:`#${c}`,onClick:d=>{d.preventDefault(),a(c)},children:[l?E.jsxs(E.Fragment,{children:[E.jsx(ct,{name:l})," "]}):null,u]})},c))})]}):null})}function b5({baseUri:t,showBreadcrumbs:e=!0}){let{infoGroupId:n}=lw(),r=Xs(n),o=[{name:"Resources",href:t}];return r&&o.push({name:r.name}),E.jsxs(E.Fragment,{children:[e&&E.jsx(fc,{expandWidth:!0,items:o,topBorder:!0}),E.jsxs("div",{className:"resource-group-detail",children:[E.jsx(v3,{infoGroupId:n}),E.jsx(m5,{}),E.jsx(sD,{infoGroupId:n}),E.jsx(eD,{infoGroupId:n}),E.jsx(oD,{infoGroupId:n}),E.jsx(y3,{infoGroupId:n}),E.jsx(g5,{infoGroupId:n}),E.jsx(JD,{infoGroupId:n}),E.jsx(NI,{infoGroupId:n}),E.jsx(k3,{infoGroupId:n})]})]})}var av,w3,ir,Lr,jr,sr,GA,cc,zs,tc,C3,Y1,zl,E3,iv,G1,S3,P3,D3,T3,B3,I3,M3,_3,O3,N3,K1,Fi,gd,Qs,Q3,V3,W3,G3,qu,X3,J3,Z3,sP,cP,hP,pP,mP,fv,PP,DP,TP,rx,BP,ox,ax,Ni,ix,Bo,vv,UP,VP,WP,qP,no,YP,GP,XP,JP,Yu,Qp,gD,yD,vD,Gu,kD,fx,ID,MD,px,Hp,Dv,HD,ng,UD,VD,qD,YD,XD,Va,_r,hA,ZD,$D,Xu,e8,n8,o8,Bv,Iv,Ju,A8,Up,Os,vd,v8,x8,yx,_v,ac,Xa,Ov,an,vr,kd,P8,xr,Ii,Nv,xx,Ga,pA,L8,wx,Cx,lg,Tn,z8,$u,Rv,zv,$l,Q8,H8,Hv,q8,Px,Qi,AA,gA,zt,$8,eT,nT,oT,hg,lT,Yd,AT,gT,td,vT,xT,wT,mA,ia,Xv,ET,bA,Pd,Gp,t1,LT,qs,yA,vA,xA,wA,GT,$T,zx,Or,Dd,kA,pd,sB,c1,Hx,sc,u1,CA,Ks,EB,d1,h1,Ys,js,EA,To,SA,m1,qx,Wl,WB,qB,GB,KB,Ad,w1,gg,TA,BA,C1,uI,S1,dI,Bd,gI,Id,bI,Gl,Zx,Md,SI,PI,TI,IA,MA,_A,Kd,ar,_d,R1,z1,tA,nA,Q1,ld,zI,QI,HI,UI,VI,H1,OA,qI,YI,GI,KI,Ye,XI,lc,ji,Od,Nd,Lo,LA,jA,FA,RA,zA,QA,Ld,jd,HA,W1,n5,r5,a5,UA,VA,Fd,qA,YA,s5,l5,q1,Ja,A5,iw=Bl(()=>{_s();jp();av=()=>{let t=new Event("accessci-update-sections");document.dispatchEvent(t)};w3={text:x3};ir="top",Lr="bottom",jr="right",sr="left",GA="auto",cc=[ir,Lr,jr,sr],zs="start",tc="end",C3="clippingParents",Y1="viewport",zl="popper",E3="reference",iv=cc.reduce(function(t,e){return t.concat([e+"-"+zs,e+"-"+tc])},[]),G1=[].concat(cc,[GA]).reduce(function(t,e){return t.concat([e,e+"-"+zs,e+"-"+tc])},[]),S3="beforeRead",P3="read",D3="afterRead",T3="beforeMain",B3="main",I3="afterMain",M3="beforeWrite",_3="write",O3="afterWrite",N3=[S3,P3,D3,T3,B3,I3,M3,_3,O3];K1={name:"applyStyles",enabled:!0,phase:"write",fn:L3,effect:j3,requires:["computeStyles"]};Fi=Math.max,gd=Math.min,Qs=Math.round;Q3=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,$1(typeof t!="number"?t:ex(t,cc))};V3={name:"arrow",enabled:!0,phase:"main",fn:H3,effect:U3,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};W3={top:"auto",right:"auto",bottom:"auto",left:"auto"};G3={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Y3,data:{}},qu={passive:!0};X3={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:K3,data:{}},J3={left:"right",right:"left",bottom:"top",top:"bottom"};Z3={start:"end",end:"start"};sP={name:"flip",enabled:!0,phase:"main",fn:iP,requiresIfExists:["offset"],data:{_skip:!1}};cP={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:lP};hP={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:dP};pP={name:"popperOffsets",enabled:!0,phase:"read",fn:fP,data:{}};mP={name:"preventOverflow",enabled:!0,phase:"main",fn:gP,requiresIfExists:["offset"]};fv={placement:"bottom",modifiers:[],strategy:"absolute"};PP=[X3,pP,G3,K1,hP,sP,mP,V3,cP],DP=SP({defaultModifiers:PP}),TP="tippy-box",rx="tippy-content",BP="tippy-backdrop",ox="tippy-arrow",ax="tippy-svg-arrow",Ni={passive:!0,capture:!0},ix=function(){return document.body};Bo={isTouch:!1},vv=0;UP=typeof window<"u"&&typeof document<"u",VP=UP?!!window.msCrypto:!1,WP={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},qP={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},no=Object.assign({appendTo:ix,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},WP,qP),YP=Object.keys(no),GP=function(t){var e=Object.keys(t);e.forEach(function(n){no[n]=t[n]})};XP=function(){return"innerHTML"};ux.$$tippy=!0;JP=1,Yu=[],Qp=[];dc.defaultProps=no;dc.setDefaultProps=GP;dc.currentInput=Bo;Object.assign({},K1,{effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow)}});dc.setDefaultProps({render:ux});gD={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perSwipe:"",touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",waitForTransition:!0,throttle:10,direction:"ltr",peek:0,cloningRatio:1,breakpoints:{},classes:{swipeable:"glide--swipeable",dragging:"glide--dragging",direction:{ltr:"glide--ltr",rtl:"glide--rtl"},type:{slider:"glide--slider",carousel:"glide--carousel"},slide:{clone:"glide__slide--clone",active:"glide__slide--active"},arrow:{disabled:"glide__arrow--disabled"},nav:{active:"glide__bullet--active"}}};yD=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vd(this,t),this.events=e,this.hop=e.hasOwnProperty}return Wd(t,[{key:"on",value:function(e,n){if(uA(e)){for(var r=0;r<e.length;r++)this.on(e[r],n);return}this.hop.call(this.events,e)||(this.events[e]=[]);var o=this.events[e].push(n)-1;return{remove:function(){delete this.events[e][o]}}}},{key:"emit",value:function(e,n){if(uA(e)){for(var r=0;r<e.length;r++)this.emit(e[r],n);return}this.hop.call(this.events,e)&&this.events[e].forEach(function(o){o(n||{})})}}]),t}(),vD=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vd(this,t),this._c={},this._t=[],this._e=new yD,this.disabled=!1,this.selector=e,this.settings=Sv(gD,n),this.index=this.settings.startAt}return Wd(t,[{key:"mount",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this._e.emit("mount.before"),rc(e)?this._c=bD(this,e,this._e):qa("You need to provide a object on `mount()`"),this._e.emit("mount.after"),this}},{key:"mutate",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return uA(e)?this._t=e:qa("You need to provide a array on `mutate()`"),this}},{key:"update",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.settings=Sv(this.settings,e),e.hasOwnProperty("startAt")&&(this.index=e.startAt),this._e.emit("update"),this}},{key:"go",value:function(e){return this._c.Run.make(e),this}},{key:"move",value:function(e){return this._c.Transition.disable(),this._c.Move.make(e),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return e&&(this.settings.autoplay=e),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(e,n){return this._e.on(e,n),this}},{key:"isType",value:function(e){return this.settings.type===e}},{key:"settings",get:function(){return this._o},set:function(e){rc(e)?this._o=e:qa("Options must be an `object` instance.")}},{key:"index",get:function(){return this._i},set:function(e){this._i=to(e)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(e){this._d=!!e}}]),t}();Gu={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};kD='[data-glide-el="track"]';fx=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vd(this,t),this.listeners=e}return Wd(t,[{key:"on",value:function(e,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;cA(e)&&(e=[e]);for(var a=0;a<e.length;a++)this.listeners[e[a]]=r,n.addEventListener(e[a],this.listeners[e[a]],o)}},{key:"off",value:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;cA(e)&&(e=[e]);for(var o=0;o<e.length;o++)n.removeEventListener(e[o],this.listeners[e[o]],r)}},{key:"destroy",value:function(){delete this.listeners}}]),t}();ID=["ltr","rtl"],MD={">":"<","<":">","=":"="};px=!1;try{Hp=Object.defineProperty({},"passive",{get:function(){px=!0}}),window.addEventListener("testPassive",null,Hp),window.removeEventListener("testPassive",null,Hp)}catch{}Dv=px,HD='[data-glide-el="controls[nav]"]',ng='[data-glide-el^="controls"]',UD="".concat(ng,' [data-glide-dir*="<"]'),VD="".concat(ng,' [data-glide-dir*=">"]');qD={Html:CD,Translate:zD,Transition:QD,Direction:_D,Peek:ED,Sizes:PD,Gaps:wD,Move:SD,Clones:TD,Resize:BD,Build:DD,Run:xD},YD=function(t){uD(n,t);var e=pD(n);function n(){return Vd(this,n),e.apply(this,arguments)}return Wd(n,[{key:"mount",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return hd(Vs(n.prototype),"mount",this).call(this,Object.assign({},qD,r))}}]),n}(vD);yd.Slide=Ax;yd.ImageSlide=GD;XD="https://allocations.access-ci.org/current-projects.json";Va=(t,e,n)=>Math.max(Math.min(t,n),e);_r={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},hA=[..."0123456789ABCDEF"],ZD=t=>hA[t&15],$D=t=>hA[(t&240)>>4]+hA[t&15],Xu=t=>(t&240)>>4===(t&15),e8=t=>Xu(t.r)&&Xu(t.g)&&Xu(t.b)&&Xu(t.a);n8=(t,e)=>t<255?e(t):"";o8=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;Bv={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Iv={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};A8=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;Up=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Os=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);vd=class t{constructor(e){if(e instanceof t)return e;let n=typeof e,r;n==="object"?r=Mv(e):n==="string"&&(r=t8(e)||p8(e)||y8(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=bx(this._rgb);return e&&(e.a=la(e.a)),e}set rgb(e){this._rgb=Mv(e)}rgbString(){return this._valid?m8(this._rgb):void 0}hexString(){return this._valid?r8(this._rgb):void 0}hslString(){return this._valid?h8(this._rgb):void 0}mix(e,n){if(e){let r=this.rgb,o=e.rgb,a,l=n===a?.5:n,c=2*l-1,u=r.a-o.a,d=((c*u===-1?c:(c+u)/(1+c*u))+1)/2;a=1-d,r.r=255&d*r.r+a*o.r+.5,r.g=255&d*r.g+a*o.g+.5,r.b=255&d*r.b+a*o.b+.5,r.a=l*r.a+(1-l)*o.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=b8(this._rgb,e._rgb,n)),this}clone(){return new t(this.rgb)}alpha(e){return this._rgb.a=Ya(e),this}clearer(e){let n=this._rgb;return n.a*=1-e,this}greyscale(){let e=this._rgb,n=hc(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){let n=this._rgb;return n.a*=1+e,this}negate(){let e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Zu(this._rgb,2,e),this}darken(e){return Zu(this._rgb,2,-e),this}saturate(e){return Zu(this._rgb,1,e),this}desaturate(e){return Zu(this._rgb,1,-e),this}rotate(e){return d8(this._rgb,e),this}};v8=(()=>{let t=0;return()=>t++})();x8=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,yx=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;_v={"":t=>t,x:t=>t.x,y:t=>t.y};ac=t=>typeof t<"u",Xa=t=>typeof t=="function",Ov=(t,e)=>{if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0};an=Math.PI,vr=2*an,kd=Number.POSITIVE_INFINITY,P8=an/180,xr=an/2,Ii=an/4,Nv=an*2/3,xx=Math.log10,Ga=Math.sign;pA=(t,e,n,r)=>sg(t,n,r?o=>{let a=t[o][e];return a<n||a===n&&t[o+1][e]===n}:o=>t[o][e]<n),L8=(t,e,n)=>sg(t,n,r=>t[r][e]>=n);wx=["push","pop","shift","splice","unshift"];Cx=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();lg=t=>t==="start"?"left":t==="end"?"right":"center",Tn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,z8=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e,$u=t=>t===0||t===1,Rv=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*vr/n)),zv=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*vr/n)+1,$l={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*xr)+1,easeOutSine:t=>Math.sin(t*xr),easeInOutSine:t=>-.5*(Math.cos(an*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>$u(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>$u(t)?t:Rv(t,.075,.3),easeOutElastic:t=>$u(t)?t:zv(t,.075,.3),easeInOutElastic(t){return $u(t)?t:t<.5?.5*Rv(t*2,.1125,.45):.5+.5*zv(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-$l.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?$l.easeInBounce(t*2)*.5:$l.easeOutBounce(t*2-1)*.5+.5};Q8=["x","y","borderWidth","radius","tension"],H8=["color","borderColor","backgroundColor"];Hv=new Map;q8={values(t){return on(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";let r=this.chart.options.locale,o,a=t;if(n.length>1){let d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(o="scientific"),a=Y8(t,n)}let l=xx(Math.abs(a)),c=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),u={notation:o,minimumFractionDigits:c,maximumFractionDigits:c};return Object.assign(u,this.options.ticks.format),qd(t,r,u)}};Px={formatters:q8};Qi=Object.create(null),AA=Object.create(null);gA=class{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,o)=>Vp(o.backgroundColor),this.hoverBorderColor=(r,o)=>Vp(o.borderColor),this.hoverColor=(r,o)=>Vp(o.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Wp(this,e,n)}get(e){return ec(this,e)}describe(e,n){return Wp(AA,e,n)}override(e,n){return Wp(Qi,e,n)}route(e,n,r,o){let a=ec(this,e),l=ec(this,r),c="_"+n;Object.defineProperties(a,{[c]:{value:a[n],writable:!0},[n]:{enumerable:!0,get(){let u=this[c],d=l[o];return ht(u)?Object.assign({},d,u):pt(u,d)},set(u){this[c]=u}}})}apply(e){e.forEach(n=>n(this))}},zt=new gA({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[U8,V8,G8]);$8=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,eT=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;nT=t=>+t||0;oT=(t,e)=>t?t+ig(e):e,hg=(t,e)=>ht(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);lT=(t,e)=>t===!0?e:typeof t=="string"?Ka(e,t):void 0;Yd=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);AT=["top","right","bottom","left"];gT=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);td=t=>Math.round(t*10)/10;vT=function(){let t=!1;try{let e={get passive(){return t=!0,!1}};pg()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();xT=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},wT=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};mA=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,o){let a=n.listeners[o],l=n.duration;a.forEach(c=>c({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(r-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=Cx.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,o)=>{if(!r.running||!r.items.length)return;let a=r.items,l=a.length-1,c=!1,u;for(;l>=0;--l)u=a[l],u._active?(u._total>r.duration&&(r.duration=u._total),u.tick(e),c=!0):(a[l]=a[a.length-1],a.pop());c&&(o.draw(),this._notify(o,r,e,"progress")),a.length||(r.running=!1,this._notify(o,r,e,"complete"),r.initial=!1),n+=a.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){let n=this._charts,r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){let n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,o)=>Math.max(r,o._duration),0),this._refresh())}running(e){if(!this._running)return!1;let n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){let n=this._charts.get(e);if(!n||!n.items.length)return;let r=n.items,o=r.length-1;for(;o>=0;--o)r[o].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}},ia=new mA,Xv="transparent",ET={boolean(t,e,n){return n>.5?e:t},color(t,e,n){let r=Qv(t||Xv),o=r.valid&&Qv(e||Xv);return o&&o.valid?o.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}},bA=class{constructor(e,n,r,o){let a=n[r];o=ed([e.to,o,a,e.from]);let l=ed([e.from,a,o]);this._active=!0,this._fn=e.fn||ET[e.type||typeof l],this._easing=$l[e.easing]||$l.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=l,this._to=o,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);let o=this._target[this._prop],a=r-this._start,l=this._duration-a;this._start=r,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=ed([e.to,n,o,e.from]),this._from=ed([e.from,o,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){let n=e-this._start,r=this._duration,o=this._prop,a=this._from,l=this._loop,c=this._to,u;if(this._active=a!==c&&(l||n<r),!this._active){this._target[o]=c,this._notify(!0);return}if(n<0){this._target[o]=a;return}u=n/r%2,u=l&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[o]=this._fn(a,c,u)}wait(){let e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){let n=e?"res":"rej",r=this._promises||[];for(let o=0;o<r.length;o++)r[o][n]()}},Pd=class{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!ht(e))return;let n=Object.keys(zt.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(o=>{let a=e[o];if(!ht(a))return;let l={};for(let c of n)l[c]=a[c];(on(a.properties)&&a.properties||[o]).forEach(c=>{(c===o||!r.has(c))&&r.set(c,l)})})}_animateOptions(e,n){let r=n.options,o=PT(e,r);if(!o)return[];let a=this._createAnimations(o,r);return r.$shared&&ST(e.options.$animations,r).then(()=>{e.options=r},()=>{}),a}_createAnimations(e,n){let r=this._properties,o=[],a=e.$animations||(e.$animations={}),l=Object.keys(n),c=Date.now(),u;for(u=l.length-1;u>=0;--u){let d=l[u];if(d.charAt(0)==="$")continue;if(d==="options"){o.push(...this._animateOptions(e,n));continue}let f=n[d],p=a[d],A=r.get(d);if(p)if(A&&p.active()){p.update(A,f,c);continue}else p.cancel();if(!A||!A.duration){e[d]=f;continue}a[d]=p=new bA(A,e,d,f),o.push(p)}return o}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}let r=this._createAnimations(e,n);if(r.length)return ia.add(this._chart,r),!0}};Gp=t=>t==="reset"||t==="none",t1=(t,e)=>e?t:Object.assign({},t),LT=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Fx(n,!0),values:null},qs=class{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){let e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=qp(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Ql(this._cachedMeta),this.index=e}linkScales(){let e=this.chart,n=this._cachedMeta,r=this.getDataset(),o=(p,A,b,y)=>p==="x"?A:p==="r"?y:b,a=n.xAxisID=pt(r.xAxisID,Yp(e,"x")),l=n.yAxisID=pt(r.yAxisID,Yp(e,"y")),c=n.rAxisID=pt(r.rAxisID,Yp(e,"r")),u=n.indexAxis,d=n.iAxisID=o(u,a,l,c),f=n.vAxisID=o(u,l,a,c);n.xScale=this.getScaleForId(a),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(c),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){let n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){let e=this._cachedMeta;this._data&&Fv(this._data,this),e._stacked&&Ql(e)}_dataCheck(){let e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(ht(n)){let o=this._cachedMeta;this._data=BT(n,o)}else if(r!==n){if(r){Fv(r,this);let o=this._cachedMeta;Ql(o),o._parsed=[]}n&&Object.isExtensible(n)&&F8(n,this),this._syncList=[],this._data=n}}addElements(){let e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){let n=this._cachedMeta,r=this.getDataset(),o=!1;this._dataCheck();let a=n._stacked;n._stacked=qp(n.vScale,n),n.stack!==r.stack&&(o=!0,Ql(n),n.stack=r.stack),this._resyncElements(e),(o||a!==n._stacked)&&(e1(this,n._parsed),n._stacked=qp(n.vScale,n))}configure(){let e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){let{_cachedMeta:r,_data:o}=this,{iScale:a,_stacked:l}=r,c=a.axis,u=e===0&&n===o.length?!0:r._sorted,d=e>0&&r._parsed[e-1],f,p,A;if(this._parsing===!1)r._parsed=o,r._sorted=!0,A=o;else{on(o[e])?A=this.parseArrayData(r,o,e,n):ht(o[e])?A=this.parseObjectData(r,o,e,n):A=this.parsePrimitiveData(r,o,e,n);let b=()=>p[c]===null||d&&p[c]<d[c];for(f=0;f<n;++f)r._parsed[f+e]=p=A[f],u&&(b()&&(u=!1),d=p);r._sorted=u}l&&e1(this,A)}parsePrimitiveData(e,n,r,o){let{iScale:a,vScale:l}=e,c=a.axis,u=l.axis,d=a.getLabels(),f=a===l,p=new Array(o),A,b,y;for(A=0,b=o;A<b;++A)y=A+r,p[A]={[c]:f||a.parse(d[y],y),[u]:l.parse(n[y],y)};return p}parseArrayData(e,n,r,o){let{xScale:a,yScale:l}=e,c=new Array(o),u,d,f,p;for(u=0,d=o;u<d;++u)f=u+r,p=n[f],c[u]={x:a.parse(p[0],f),y:l.parse(p[1],f)};return c}parseObjectData(e,n,r,o){let{xScale:a,yScale:l}=e,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=new Array(o),f,p,A,b;for(f=0,p=o;f<p;++f)A=f+r,b=n[A],d[f]={x:a.parse(Ka(b,c),A),y:l.parse(Ka(b,u),A)};return d}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){let o=this.chart,a=this._cachedMeta,l=n[e.axis],c={keys:Fx(o,!0),values:n._stacks[e.axis]._visualValues};return Zv(c,l,a.index,{mode:r})}updateRangeFromParsed(e,n,r,o){let a=r[n.axis],l=a===null?NaN:a,c=o&&r._stacks[n.axis];o&&c&&(o.values=c,l=Zv(o,a,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){let r=this._cachedMeta,o=r._parsed,a=r._sorted&&e===r.iScale,l=o.length,c=this._getOtherScale(e),u=LT(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:p}=MT(c),A,b;function y(){b=o[A];let k=b[c.axis];return!Fr(b[e.axis])||f>k||p<k}for(A=0;A<l&&!(!y()&&(this.updateRangeFromParsed(d,e,b,u),a));++A);if(a){for(A=l-1;A>=0;--A)if(!y()){this.updateRangeFromParsed(d,e,b,u);break}}return d}getAllParsedValues(e){let n=this._cachedMeta._parsed,r=[],o,a,l;for(o=0,a=n.length;o<a;++o)l=n[o][e.axis],Fr(l)&&r.push(l);return r}getMaxOverflow(){return!1}getLabelAndValue(e){let n=this._cachedMeta,r=n.iScale,o=n.vScale,a=this.getParsed(e);return{label:r?""+r.getLabelForValue(a[r.axis]):"",value:o?""+o.getLabelForValue(a[o.axis]):""}}_update(e){let n=this._cachedMeta;this.update(e||"default"),n._clip=TT(pt(this.options.clip,DT(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){let e=this._ctx,n=this.chart,r=this._cachedMeta,o=r.data||[],a=n.chartArea,l=[],c=this._drawStart||0,u=this._drawCount||o.length-c,d=this.options.drawActiveElementsOnTop,f;for(r.dataset&&r.dataset.draw(e,a,c,u),f=c;f<c+u;++f){let p=o[f];p.hidden||(p.active&&d?l.push(p):p.draw(e,a))}for(f=0;f<l.length;++f)l[f].draw(e,a)}getStyle(e,n){let r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){let o=this.getDataset(),a;if(e>=0&&e<this._cachedMeta.data.length){let l=this._cachedMeta.data[e];a=l.$context||(l.$context=NT(this.getContext(),e,l)),a.parsed=this.getParsed(e),a.raw=o.data[e],a.index=a.dataIndex=e}else a=this.$context||(this.$context=OT(this.chart.getContext(),this.index)),a.dataset=o,a.index=a.datasetIndex=this.index;return a.active=!!n,a.mode=r,a}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){let o=n==="active",a=this._cachedDataOpts,l=e+"-"+n,c=a[l],u=this.enableOptionSharing&&ac(r);if(c)return t1(c,u);let d=this.chart.config,f=d.datasetElementScopeKeys(this._type,e),p=o?[`${e}Hover`,"hover",e,""]:[e,""],A=d.getOptionScopes(this.getDataset(),f),b=Object.keys(zt.elements[e]),y=()=>this.getContext(r,o,n),k=d.resolveNamedOptions(A,b,y,p);return k.$shared&&(k.$shared=u,a[l]=Object.freeze(t1(k,u))),k}_resolveAnimations(e,n,r){let o=this.chart,a=this._cachedDataOpts,l=`animation-${n}`,c=a[l];if(c)return c;let u;if(o.options.animation!==!1){let f=this.chart.config,p=f.datasetAnimationScopeKeys(this._type,n),A=f.getOptionScopes(this.getDataset(),p);u=f.createResolver(A,this.getContext(e,r,n))}let d=new Pd(o,u&&u.animations);return u&&u._cacheable&&(a[l]=Object.freeze(d)),d}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Gp(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){let r=this.resolveDataElementOptions(e,n),o=this._sharedOptions,a=this.getSharedOptions(r),l=this.includeOptions(n,a)||a!==o;return this.updateSharedOptions(a,n,r),{sharedOptions:a,includeOptions:l}}updateElement(e,n,r,o){Gp(o)?Object.assign(e,r):this._resolveAnimations(n,o).update(e,r)}updateSharedOptions(e,n,r){e&&!Gp(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,o){e.active=o;let a=this.getStyle(n,o);this._resolveAnimations(n,r,o).update(e,{options:!o&&this.getSharedOptions(a)||a})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){let e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){let n=this._data,r=this._cachedMeta.data;for(let[c,u,d]of this._syncList)this[c](u,d);this._syncList=[];let o=r.length,a=n.length,l=Math.min(a,o);l&&this.parse(0,l),a>o?this._insertElements(o,a-o,e):a<o&&this._removeElements(a,o-a)}_insertElements(e,n,r=!0){let o=this._cachedMeta,a=o.data,l=e+n,c,u=d=>{for(d.length+=n,c=d.length-1;c>=l;c--)d[c]=d[c-n]};for(u(a),c=e;c<l;++c)a[c]=new this.dataElementType;this._parsing&&u(o._parsed),this.parse(e,n),r&&this.updateElements(a,e,n,"reset")}updateElements(e,n,r,o){}_removeElements(e,n){let r=this._cachedMeta;if(this._parsing){let o=r._parsed.splice(e,n);r._stacked&&Ql(r,o)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{let[n,r,o]=e;this[n](r,o)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){let e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);let r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};yA=class extends qs{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(e,n,r,o){return n1(e,n,r,o)}parseArrayData(e,n,r,o){return n1(e,n,r,o)}parseObjectData(e,n,r,o){let{iScale:a,vScale:l}=e,{xAxisKey:c="x",yAxisKey:u="y"}=this._parsing,d=a.axis==="x"?c:u,f=l.axis==="x"?c:u,p=[],A,b,y,k;for(A=r,b=r+o;A<b;++A)k=n[A],y={},y[a.axis]=a.parse(Ka(k,d),A),p.push(Rx(Ka(k,f),y,l,A));return p}updateRangeFromParsed(e,n,r,o){super.updateRangeFromParsed(e,n,r,o);let a=r._custom;a&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(e){let n=this._cachedMeta,{iScale:r,vScale:o}=n,a=this.getParsed(e),l=a._custom,c=Kp(l)?"["+l.start+", "+l.end+"]":""+o.getLabelForValue(a[o.axis]);return{label:""+r.getLabelForValue(a[r.axis]),value:c}}initialize(){this.enableOptionSharing=!0,super.initialize();let e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){let n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,r,o){let a=o==="reset",{index:l,_cachedMeta:{vScale:c}}=this,u=c.getBasePixel(),d=c.isHorizontal(),f=this._getRuler(),{sharedOptions:p,includeOptions:A}=this._getSharedOptions(n,o);for(let b=n;b<n+r;b++){let y=this.getParsed(b),k=a||St(y[c.axis])?{base:u,head:u}:this._calculateBarValuePixels(b),w=this._calculateBarIndexPixels(b,f),S=(y._stacks||{})[c.axis],M={horizontal:d,base:k.base,enableBorderRadius:!S||Kp(y._custom)||l===S._top||l===S._bottom,x:d?k.head:w.center,y:d?w.center:k.head,height:d?w.size:Math.abs(k.size),width:d?Math.abs(k.size):w.size};A&&(M.options=p||this.resolveDataElementOptions(b,e[b].active?"active":o));let T=M.options||e[b].options;VT(M,T,S,l),qT(M,T,f.ratio),this.updateElement(e[b],b,M,o)}}_getStacks(e,n){let{iScale:r}=this._cachedMeta,o=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),a=r.options.stacked,l=[],c=this._cachedMeta.controller.getParsed(n),u=c&&c[r.axis],d=f=>{let p=f._parsed.find(b=>b[r.axis]===u),A=p&&p[f.vScale.axis];if(St(A)||isNaN(A))return!0};for(let f of o)if(!(n!==void 0&&d(f))&&((a===!1||l.indexOf(f.stack)===-1||a===void 0&&f.stack===void 0)&&l.push(f.stack),f.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(r=>e[r].axis===n).shift()}_getAxis(){let e={},n=this.getFirstScaleIdForIndexAxis();for(let r of this.chart.data.datasets)e[pt(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,r){let o=this._getStacks(e,r),a=n!==void 0?o.indexOf(n):-1;return a===-1?o.length-1:a}_getRuler(){let e=this.options,n=this._cachedMeta,r=n.iScale,o=[],a,l;for(a=0,l=n.data.length;a<l;++a)o.push(r.getPixelForValue(this.getParsed(a)[r.axis],a));let c=e.barThickness;return{min:c||FT(n),pixels:o,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:c?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){let{_cachedMeta:{vScale:n,_stacked:r,index:o},options:{base:a,minBarLength:l}}=this,c=a||0,u=this.getParsed(e),d=u._custom,f=Kp(d),p=u[n.axis],A=0,b=r?this.applyStack(n,u,r):p,y,k;b!==p&&(A=b-p,b=p),f&&(p=d.barStart,b=d.barEnd-d.barStart,p!==0&&Ga(p)!==Ga(d.barEnd)&&(A=0),A+=p);let w=!St(a)&&!f?a:A,S=n.getPixelForValue(w);if(this.chart.getDataVisibility(e)?y=n.getPixelForValue(A+b):y=S,k=y-S,Math.abs(k)<l){k=HT(k,n,c)*l,p===c&&(S-=k/2);let M=n.getPixelForDecimal(0),T=n.getPixelForDecimal(1),P=Math.min(M,T),R=Math.max(M,T);S=Math.max(Math.min(S,R),P),y=S+k,r&&!f&&(u._stacks[n.axis]._visualValues[o]=n.getValueForPixel(y)-n.getValueForPixel(S))}if(S===n.getPixelForValue(c)){let M=Ga(k)*n.getLineWidthForValue(c)/2;S+=M,k-=M}return{size:k,base:S,head:y,center:y+k/2}}_calculateBarIndexPixels(e,n){let r=n.scale,o=this.options,a=o.skipNull,l=pt(o.maxBarThickness,1/0),c,u,d=this._getAxisCount();if(n.grouped){let f=a?this._getStackCount(e):n.stackCount,p=o.barThickness==="flex"?zT(e,n,o,f*d):RT(e,n,o,f*d),A=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,b=this._getAxis().indexOf(pt(A,this.getFirstScaleIdForIndexAxis())),y=this._getStackIndex(this.index,this._cachedMeta.stack,a?e:void 0)+b;c=p.start+p.chunk*y+p.chunk/2,u=Math.min(l,p.chunk*p.ratio)}else c=r.getPixelForValue(this.getParsed(e)[r.axis],e),u=Math.min(l,n.min*n.ratio);return{base:c-u/2,head:c+u/2,center:c,size:u}}draw(){let e=this._cachedMeta,n=e.vScale,r=e.data,o=r.length,a=0;for(;a<o;++a)this.getParsed(a)[n.axis]!==null&&!r[a].hidden&&r[a].draw(this._ctx)}};vA=class extends qs{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let n=e.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=e.legend.options;return n.labels.map((a,l)=>{let c=e.getDatasetMeta(0).controller.getStyle(l);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){let r=this.getDataset().data,o=this._cachedMeta;if(this._parsing===!1)o._parsed=r;else{let a=u=>+r[u];if(ht(r[e])){let{key:u="value"}=this._parsing;a=d=>+Ka(r[d],u)}let l,c;for(l=e,c=e+n;l<c;++l)o._parsed[l]=a(l)}}_getRotation(){return Io(this.options.rotation-90)}_getCircumference(){return Io(this.options.circumference)}_getRotationExtents(){let e=vr,n=-vr;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){let o=this.chart.getDatasetMeta(r).controller,a=o._getRotation(),l=o._getCircumference();e=Math.min(e,a),n=Math.max(n,a+l)}return{rotation:e,circumference:n-e}}update(e){let n=this.chart,{chartArea:r}=n,o=this._cachedMeta,a=o.data,l=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,c=Math.max((Math.min(r.width,r.height)-l)/2,0),u=Math.min(x8(this.options.cutout,c),1),d=this._getRingWeight(this.index),{circumference:f,rotation:p}=this._getRotationExtents(),{ratioX:A,ratioY:b,offsetX:y,offsetY:k}=YT(p,f,u),w=(r.width-l)/A,S=(r.height-l)/b,M=Math.max(Math.min(w,S)/2,0),T=yx(this.options.radius,M),P=Math.max(T*u,0),R=(T-P)/this._getVisibleDatasetWeightTotal();this.offsetX=y*T,this.offsetY=k*T,o.total=this.calculateTotal(),this.outerRadius=T-R*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-R*d,0),this.updateElements(a,0,a.length,e)}_circumference(e,n){let r=this.options,o=this._cachedMeta,a=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||o._parsed[e]===null||o.data[e].hidden?0:this.calculateCircumference(o._parsed[e]*a/vr)}updateElements(e,n,r,o){let a=o==="reset",l=this.chart,c=l.chartArea,u=l.options.animation,d=(c.left+c.right)/2,f=(c.top+c.bottom)/2,p=a&&u.animateScale,A=p?0:this.innerRadius,b=p?0:this.outerRadius,{sharedOptions:y,includeOptions:k}=this._getSharedOptions(n,o),w=this._getRotation(),S;for(S=0;S<n;++S)w+=this._circumference(S,a);for(S=n;S<n+r;++S){let M=this._circumference(S,a),T=e[S],P={x:d+this.offsetX,y:f+this.offsetY,startAngle:w,endAngle:w+M,circumference:M,outerRadius:b,innerRadius:A};k&&(P.options=y||this.resolveDataElementOptions(S,T.active?"active":o)),w+=M,this.updateElement(T,S,P,o)}}calculateTotal(){let e=this._cachedMeta,n=e.data,r=0,o;for(o=0;o<n.length;o++){let a=e._parsed[o];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(o)&&!n[o].hidden&&(r+=Math.abs(a))}return r}calculateCircumference(e){let n=this._cachedMeta.total;return n>0&&!isNaN(e)?vr*(Math.abs(e)/n):0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],a=qd(n._parsed[e],r.options.locale);return{label:o[e]||"",value:a}}getMaxBorderWidth(e){let n=0,r=this.chart,o,a,l,c,u;if(!e){for(o=0,a=r.data.datasets.length;o<a;++o)if(r.isDatasetVisible(o)){l=r.getDatasetMeta(o),e=l.data,c=l.controller;break}}if(!e)return 0;for(o=0,a=e.length;o<a;++o)u=c.resolveDataElementOptions(o),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,o=e.length;r<o;++r){let a=this.resolveDataElementOptions(r);n=Math.max(n,a.offset||0,a.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(pt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}},xA=class extends qs{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){let n=e.data;if(n.labels.length&&n.datasets.length){let{labels:{pointStyle:r,color:o}}=e.legend.options;return n.labels.map((a,l)=>{let c=e.getDatasetMeta(0).controller.getStyle(l);return{text:a,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:o,lineWidth:c.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){let n=this._cachedMeta,r=this.chart,o=r.data.labels||[],a=qd(n._parsed[e].r,r.options.locale);return{label:o[e]||"",value:a}}parseObjectData(e,n,r,o){return fT.bind(this)(e,n,r,o)}update(e){let n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){let e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((r,o)=>{let a=this.getParsed(o).r;!isNaN(a)&&this.chart.getDataVisibility(o)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))}),n}_updateRadius(){let e=this.chart,n=e.chartArea,r=e.options,o=Math.min(n.right-n.left,n.bottom-n.top),a=Math.max(o/2,0),l=Math.max(r.cutoutPercentage?a/100*r.cutoutPercentage:1,0),c=(a-l)/e.getVisibleDatasetCount();this.outerRadius=a-c*this.index,this.innerRadius=this.outerRadius-c}updateElements(e,n,r,o){let a=o==="reset",l=this.chart,c=l.options.animation,u=this._cachedMeta.rScale,d=u.xCenter,f=u.yCenter,p=u.getIndexAngle(0)-.5*an,A=p,b,y=360/this.countVisibleElements();for(b=0;b<n;++b)A+=this._computeAngle(b,o,y);for(b=n;b<n+r;b++){let k=e[b],w=A,S=A+this._computeAngle(b,o,y),M=l.getDataVisibility(b)?u.getDistanceFromCenterForValue(this.getParsed(b).r):0;A=S,a&&(c.animateScale&&(M=0),c.animateRotate&&(w=S=p));let T={x:d,y:f,innerRadius:0,outerRadius:M,startAngle:w,endAngle:S,options:this.resolveDataElementOptions(b,k.active?"active":o)};this.updateElement(k,b,T,o)}}countVisibleElements(){let e=this._cachedMeta,n=0;return e.data.forEach((r,o)=>{!isNaN(this.getParsed(o).r)&&this.chart.getDataVisibility(o)&&n++}),n}_computeAngle(e,n,r){return this.chart.getDataVisibility(e)?Io(this.resolveDataElementOptions(e,n).angle||r):0}};wA=class t{static override(e){Object.assign(t.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return Oi()}parse(){return Oi()}format(){return Oi()}add(){return Oi()}diff(){return Oi()}startOf(){return Oi()}endOf(){return Oi()}},GT={_date:wA};$T={modes:{index(t,e,n,r){let o=Li(e,t),a=n.axis||"x",l=n.includeInvisible||!1,c=n.intersect?Xp(t,o,a,r,l):Jp(t,o,a,!1,r,l),u=[];return c.length?(t.getSortedVisibleDatasetMetas().forEach(d=>{let f=c[0].index,p=d.data[f];p&&!p.skip&&u.push({element:p,datasetIndex:d.index,index:f})}),u):[]},dataset(t,e,n,r){let o=Li(e,t),a=n.axis||"xy",l=n.includeInvisible||!1,c=n.intersect?Xp(t,o,a,r,l):Jp(t,o,a,!1,r,l);if(c.length>0){let u=c[0].datasetIndex,d=t.getDatasetMeta(u).data;c=[];for(let f=0;f<d.length;++f)c.push({element:d[f],datasetIndex:u,index:f})}return c},point(t,e,n,r){let o=Li(e,t),a=n.axis||"xy",l=n.includeInvisible||!1;return Xp(t,o,a,r,l)},nearest(t,e,n,r){let o=Li(e,t),a=n.axis||"xy",l=n.includeInvisible||!1;return Jp(t,o,a,n.intersect,r,l)},x(t,e,n,r){let o=Li(e,t);return a1(t,o,"x",n.intersect,r)},y(t,e,n,r){let o=Li(e,t);return a1(t,o,"y",n.intersect,r)}}},zx=["left","top","right","bottom"];Or={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){let n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;let o=Rr(t.options.layout.padding),a=Math.max(e-o.width,0),l=Math.max(n-o.height,0),c=rB(t.boxes),u=c.vertical,d=c.horizontal;yt(t.boxes,k=>{typeof k.beforeLayout=="function"&&k.beforeLayout()});let f=u.reduce((k,w)=>w.box.options&&w.box.options.display===!1?k:k+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:o,availableWidth:a,availableHeight:l,vBoxMaxWidth:a/2/f,hBoxMaxHeight:l/2}),A=Object.assign({},o);Qx(A,Rr(r));let b=Object.assign({maxPadding:A,w:a,h:l,x:o.left,y:o.top},o),y=nB(u.concat(d),p);Yl(c.fullSize,b,p,y),Yl(u,b,p,y),Yl(d,b,p,y)&&Yl(u,b,p,y),aB(b),l1(c.leftAndTop,b,p,y),b.x+=b.w,b.y+=b.h,l1(c.rightAndBottom,b,p,y),t.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},yt(c.chartArea,k=>{let w=k.box;Object.assign(w,t.chartArea),w.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}},Dd=class{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,o){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,o?Math.floor(n/o):r)}}isAttached(e){return!0}updateConfig(e){}},kA=class extends Dd{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}},pd="$chartjs",sB={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},c1=t=>t===null||t==="";Hx=vT?{passive:!0}:!1;sc=new Map,u1=0;CA=class extends Dd{acquireContext(e,n){let r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(lB(e,n),r):null}releaseContext(e){let n=e.canvas;if(!n[pd])return!1;let r=n[pd].initial;["height","width"].forEach(a=>{let l=r[a];St(l)?n.removeAttribute(a):n.setAttribute(a,l)});let o=r.style||{};return Object.keys(o).forEach(a=>{n.style[a]=o[a]}),n.width=n.width,delete n[pd],!0}addEventListener(e,n,r){this.removeEventListener(e,n);let o=e.$proxies||(e.$proxies={}),a={attach:hB,detach:fB,resize:gB}[n]||mB;o[n]=a(e,n,r)}removeEventListener(e,n){let r=e.$proxies||(e.$proxies={}),o=r[n];o&&(({attach:Zp,detach:Zp,resize:Zp}[n]||uB)(e,n,o),r[n]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,o){return yT(e,n,r,o)}isAttached(e){let n=e&&Ag(e);return!!(n&&n.isConnected)}};Ks=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){let{x:e,y:n}=this.getProps(["x","y"],t);return{x:e,y:n}}hasValue(){return Cd(this.x)&&Cd(this.y)}getProps(t,e){let n=this.$animations;if(!e||!n)return this;let r={};return t.forEach(o=>{r[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),r}};EB=t=>t==="left"?"right":t==="right"?"left":t,d1=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,h1=(t,e)=>Math.min(e||t,t);Ys=class t extends Ks{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:o}=this;return e=Po(e,Number.POSITIVE_INFINITY),n=Po(n,Number.NEGATIVE_INFINITY),r=Po(r,Number.POSITIVE_INFINITY),o=Po(o,Number.NEGATIVE_INFINITY),{min:Po(e,r),max:Po(n,o),minDefined:Fr(e),maxDefined:Fr(n)}}getMinMax(e){let{min:n,max:r,minDefined:o,maxDefined:a}=this.getUserBounds(),l;if(o&&a)return{min:n,max:r};let c=this.getMatchingVisibleMetas();for(let u=0,d=c.length;u<d;++u)l=c[u].controller.getMinMax(this,e),o||(n=Math.min(n,l.min)),a||(r=Math.max(r,l.max));return n=a&&n>r?r:n,r=o&&n>r?n:r,{min:Po(n,Po(r,n)),max:Po(r,Po(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){_t(this.options.beforeUpdate,[this])}update(e,n,r){let{beginAtZero:o,grace:a,ticks:l}=this.options,c=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=rT(this,a,o),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let u=c<this.ticks.length;this._convertTicksToLabels(u?f1(this.ticks,c):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=yB(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){_t(this.options.afterUpdate,[this])}beforeSetDimensions(){_t(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){_t(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),_t(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){_t(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){let n=this.options.ticks,r,o,a;for(r=0,o=e.length;r<o;r++)a=e[r],a.label=_t(n.callback,[a.value,r,e],this)}afterTickToLabelConversion(){_t(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){_t(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let e=this.options,n=e.ticks,r=h1(this.ticks.length,e.ticks.maxTicksLimit),o=n.minRotation||0,a=n.maxRotation,l=o,c,u,d;if(!this._isVisible()||!n.display||o>=a||r<=1||!this.isHorizontal()){this.labelRotation=o;return}let f=this._getLabelSizes(),p=f.widest.width,A=f.highest.height,b=ro(this.chart.width-p,0,this.maxWidth);c=e.offset?this.maxWidth/r:b/(r-1),p+6>c&&(c=b/(r-(e.offset?.5:1)),u=this.maxHeight-Vl(e.grid)-n.padding-p1(e.title,this.chart.options.font),d=Math.sqrt(p*p+A*A),l=M8(Math.min(Math.asin(ro((f.highest.height+6)/c,-1,1)),Math.asin(ro(u/d,-1,1))-Math.asin(ro(A/d,-1,1)))),l=Math.max(o,Math.min(a,l))),this.labelRotation=l}afterCalculateLabelRotation(){_t(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){_t(this.options.beforeFit,[this])}fit(){let e={width:0,height:0},{chart:n,options:{ticks:r,title:o,grid:a}}=this,l=this._isVisible(),c=this.isHorizontal();if(l){let u=p1(o,n.options.font);if(c?(e.width=this.maxWidth,e.height=Vl(a)+u):(e.height=this.maxHeight,e.width=Vl(a)+u),r.display&&this.ticks.length){let{first:d,last:f,widest:p,highest:A}=this._getLabelSizes(),b=r.padding*2,y=Io(this.labelRotation),k=Math.cos(y),w=Math.sin(y);if(c){let S=r.mirror?0:w*p.width+k*A.height;e.height=Math.min(this.maxHeight,e.height+S+b)}else{let S=r.mirror?0:k*p.width+w*A.height;e.width=Math.min(this.maxWidth,e.width+S+b)}this._calculatePadding(d,f,w,k)}}this._handleMargins(),c?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,o){let{ticks:{align:a,padding:l},position:c}=this.options,u=this.labelRotation!==0,d=c!=="top"&&this.axis==="x";if(this.isHorizontal()){let f=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1),A=0,b=0;u?d?(A=o*e.width,b=r*n.height):(A=r*e.height,b=o*n.width):a==="start"?b=n.width:a==="end"?A=e.width:a!=="inner"&&(A=e.width/2,b=n.width/2),this.paddingLeft=Math.max((A-f+l)*this.width/(this.width-f),0),this.paddingRight=Math.max((b-p+l)*this.width/(this.width-p),0)}else{let f=n.height/2,p=e.height/2;a==="start"?(f=0,p=e.height):a==="end"&&(f=n.height,p=0),this.paddingTop=f+l,this.paddingBottom=p+l}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){_t(this.options.afterFit,[this])}isHorizontal(){let{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)St(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){let n=this.options.ticks.sampleSize,r=this.ticks;n<r.length&&(r=f1(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){let{ctx:o,_longestTextCache:a}=this,l=[],c=[],u=Math.floor(n/h1(n,r)),d=0,f=0,p,A,b,y,k,w,S,M,T,P,R;for(p=0;p<n;p+=u){if(y=e[p].label,k=this._resolveTickFontOptions(p),o.font=w=k.string,S=a[w]=a[w]||{data:{},gc:[]},M=k.lineHeight,T=P=0,!St(y)&&!on(y))T=Uv(o,S.data,S.gc,T,y),P=M;else if(on(y))for(A=0,b=y.length;A<b;++A)R=y[A],!St(R)&&!on(R)&&(T=Uv(o,S.data,S.gc,T,R),P+=M);l.push(T),c.push(P),d=Math.max(T,d),f=Math.max(P,f)}PB(a,n);let F=l.indexOf(d),V=c.indexOf(f),U=G=>({width:l[G]||0,height:c[G]||0});return{first:U(0),last:U(n-1),widest:U(F),highest:U(V),widths:l,heights:c}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){let n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);let n=this._startPixel+e*this._length;return N8(this._alignToPixels?_i(this.chart,n,0):n)}getDecimalForPixel(e){let n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){let n=this.ticks||[];if(e>=0&&e<n.length){let r=n[e];return r.$context||(r.$context=TB(this.getContext(),e,r))}return this.$context||(this.$context=DB(this.chart.getContext(),this))}_tickSize(){let e=this.options.ticks,n=Io(this.labelRotation),r=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),a=this._getLabelSizes(),l=e.autoSkipPadding||0,c=a?a.widest.width+l:0,u=a?a.highest.height+l:0;return this.isHorizontal()?u*r>c*o?c/r:u/o:u*o<c*r?u/r:c/o}_isVisible(){let e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){let n=this.axis,r=this.chart,o=this.options,{grid:a,position:l,border:c}=o,u=a.offset,d=this.isHorizontal(),f=this.ticks.length+(u?1:0),p=Vl(a),A=[],b=c.setContext(this.getContext()),y=b.display?b.width:0,k=y/2,w=function(de){return _i(r,de,y)},S,M,T,P,R,F,V,U,G,W,X,Y;if(l==="top")S=w(this.bottom),F=this.bottom-p,U=S-k,W=w(e.top)+k,Y=e.bottom;else if(l==="bottom")S=w(this.top),W=e.top,Y=w(e.bottom)-k,F=S+k,U=this.top+p;else if(l==="left")S=w(this.right),R=this.right-p,V=S-k,G=w(e.left)+k,X=e.right;else if(l==="right")S=w(this.left),G=e.left,X=w(e.right)-k,R=S+k,V=this.left+p;else if(n==="x"){if(l==="center")S=w((e.top+e.bottom)/2+.5);else if(ht(l)){let de=Object.keys(l)[0],le=l[de];S=w(this.chart.scales[de].getPixelForValue(le))}W=e.top,Y=e.bottom,F=S+k,U=F+p}else if(n==="y"){if(l==="center")S=w((e.left+e.right)/2);else if(ht(l)){let de=Object.keys(l)[0],le=l[de];S=w(this.chart.scales[de].getPixelForValue(le))}R=S-k,V=R-p,G=e.left,X=e.right}let ae=pt(o.ticks.maxTicksLimit,f),pe=Math.max(1,Math.ceil(f/ae));for(M=0;M<f;M+=pe){let de=this.getContext(M),le=a.setContext(de),he=c.setContext(de),Z=le.lineWidth,L=le.color,ce=he.dash||[],I=he.dashOffset,J=le.tickWidth,ye=le.tickColor,ge=le.tickBorderDash||[],Ee=le.tickBorderDashOffset;T=SB(this,M,u),T!==void 0&&(P=_i(r,T,Z),d?R=V=G=X=P:F=U=W=Y=P,A.push({tx1:R,ty1:F,tx2:V,ty2:U,x1:G,y1:W,x2:X,y2:Y,width:Z,color:L,borderDash:ce,borderDashOffset:I,tickWidth:J,tickColor:ye,tickBorderDash:ge,tickBorderDashOffset:Ee}))}return this._ticksLength=f,this._borderValue=S,A}_computeLabelItems(e){let n=this.axis,r=this.options,{position:o,ticks:a}=r,l=this.isHorizontal(),c=this.ticks,{align:u,crossAlign:d,padding:f,mirror:p}=a,A=Vl(r.grid),b=A+f,y=p?-f:b,k=-Io(this.labelRotation),w=[],S,M,T,P,R,F,V,U,G,W,X,Y,ae="middle";if(o==="top")F=this.bottom-y,V=this._getXAxisLabelAlignment();else if(o==="bottom")F=this.top+y,V=this._getXAxisLabelAlignment();else if(o==="left"){let de=this._getYAxisLabelAlignment(A);V=de.textAlign,R=de.x}else if(o==="right"){let de=this._getYAxisLabelAlignment(A);V=de.textAlign,R=de.x}else if(n==="x"){if(o==="center")F=(e.top+e.bottom)/2+b;else if(ht(o)){let de=Object.keys(o)[0],le=o[de];F=this.chart.scales[de].getPixelForValue(le)+b}V=this._getXAxisLabelAlignment()}else if(n==="y"){if(o==="center")R=(e.left+e.right)/2-b;else if(ht(o)){let de=Object.keys(o)[0],le=o[de];R=this.chart.scales[de].getPixelForValue(le)}V=this._getYAxisLabelAlignment(A).textAlign}n==="y"&&(u==="start"?ae="top":u==="end"&&(ae="bottom"));let pe=this._getLabelSizes();for(S=0,M=c.length;S<M;++S){T=c[S],P=T.label;let de=a.setContext(this.getContext(S));U=this.getPixelForTick(S)+a.labelOffset,G=this._resolveTickFontOptions(S),W=G.lineHeight,X=on(P)?P.length:1;let le=X/2,he=de.color,Z=de.textStrokeColor,L=de.textStrokeWidth,ce=V;l?(R=U,V==="inner"&&(S===M-1?ce=this.options.reverse?"left":"right":S===0?ce=this.options.reverse?"right":"left":ce="center"),o==="top"?d==="near"||k!==0?Y=-X*W+W/2:d==="center"?Y=-pe.highest.height/2-le*W+W:Y=-pe.highest.height+W/2:d==="near"||k!==0?Y=W/2:d==="center"?Y=pe.highest.height/2-le*W:Y=pe.highest.height-X*W,p&&(Y*=-1),k!==0&&!de.showLabelBackdrop&&(R+=W/2*Math.sin(k))):(F=U,Y=(1-X)*W/2);let I;if(de.showLabelBackdrop){let J=Rr(de.backdropPadding),ye=pe.heights[S],ge=pe.widths[S],Ee=Y-J.top,De=0-J.left;switch(ae){case"middle":Ee-=ye/2;break;case"bottom":Ee-=ye;break}switch(V){case"center":De-=ge/2;break;case"right":De-=ge;break;case"inner":S===M-1?De-=ge:S>0&&(De-=ge/2);break}I={left:De,top:Ee,width:ge+J.width,height:ye+J.height,color:de.backdropColor}}w.push({label:P,font:G,textOffset:Y,options:{rotation:k,color:he,strokeColor:Z,strokeWidth:L,textAlign:ce,textBaseline:ae,translation:[R,F],backdrop:I}})}return w}_getXAxisLabelAlignment(){let{position:e,ticks:n}=this.options;if(-Io(this.labelRotation))return e==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){let{position:n,ticks:{crossAlign:r,mirror:o,padding:a}}=this.options,l=this._getLabelSizes(),c=e+a,u=l.widest.width,d,f;return n==="left"?o?(f=this.right+a,r==="near"?d="left":r==="center"?(d="center",f+=u/2):(d="right",f+=u)):(f=this.right-c,r==="near"?d="right":r==="center"?(d="center",f-=u/2):(d="left",f=this.left)):n==="right"?o?(f=this.left+a,r==="near"?d="right":r==="center"?(d="center",f-=u/2):(d="left",f-=u)):(f=this.left+c,r==="near"?d="left":r==="center"?(d="center",f+=u/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;let e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){let{ctx:e,options:{backgroundColor:n},left:r,top:o,width:a,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,o,a,l),e.restore())}getLineWidthForValue(e){let n=this.options.grid;if(!this._isVisible()||!n.display)return 0;let r=this.ticks.findIndex(o=>o.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){let n=this.options.grid,r=this.ctx,o=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),a,l,c=(u,d,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(u.x,u.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(a=0,l=o.length;a<l;++a){let u=o[a];n.drawOnChartArea&&c({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&c({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){let{chart:e,ctx:n,options:{border:r,grid:o}}=this,a=r.setContext(this.getContext()),l=r.display?a.width:0;if(!l)return;let c=o.setContext(this.getContext(0)).lineWidth,u=this._borderValue,d,f,p,A;this.isHorizontal()?(d=_i(e,this.left,l)-l/2,f=_i(e,this.right,c)+c/2,p=A=u):(p=_i(e,this.top,l)-l/2,A=_i(e,this.bottom,c)+c/2,d=f=u),n.save(),n.lineWidth=a.width,n.strokeStyle=a.color,n.beginPath(),n.moveTo(d,p),n.lineTo(f,A),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;let n=this.ctx,r=this._computeLabelArea();r&&cg(n,r);let o=this.getLabelItems(e);for(let a of o){let l=a.options,c=a.font,u=a.label,d=a.textOffset;ic(n,u,0,d,c,l)}r&&ug(n)}drawTitle(){let{ctx:e,options:{position:n,title:r,reverse:o}}=this;if(!r.display)return;let a=Bn(r.font),l=Rr(r.padding),c=r.align,u=a.lineHeight/2;n==="bottom"||n==="center"||ht(n)?(u+=l.bottom,on(r.text)&&(u+=a.lineHeight*(r.text.length-1))):u+=l.top;let{titleX:d,titleY:f,maxWidth:p,rotation:A}=IB(this,u,n,c);ic(e,r.text,0,0,a,{color:r.color,maxWidth:p,rotation:A,textAlign:BB(c,n,o),textBaseline:"middle",translation:[d,f]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){let e=this.options,n=e.ticks&&e.ticks.z||0,r=pt(e.grid&&e.grid.z,-1),o=pt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==t.prototype.draw?[{z:n,draw:a=>{this.draw(a)}}]:[{z:r,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:o,draw:()=>{this.drawBorder()}},{z:n,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(e){let n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",o=[],a,l;for(a=0,l=n.length;a<l;++a){let c=n[a];c[r]===this.id&&(!e||c.type===e)&&o.push(c)}return o}_resolveTickFontOptions(e){let n=this.options.ticks.setContext(this.getContext(e));return Bn(n.font)}_maxDigits(){let e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}},js=class{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){let n=Object.getPrototypeOf(e),r;OB(n)&&(r=this.register(n));let o=this.items,a=e.id,l=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in o||(o[a]=e,MB(e,l,r),this.override&&zt.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){let n=this.items,r=e.id,o=this.scope;r in n&&delete n[r],o&&r in zt[o]&&(delete zt[o][r],this.override&&delete Qi[r])}};EA=class{constructor(){this.controllers=new js(qs,"datasets",!0),this.elements=new js(Ks,"elements"),this.plugins=new js(Object,"plugins"),this.scales=new js(Ys,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(o=>{let a=r||this._getRegistryForType(o);r||a.isForType(o)||a===this.plugins&&o.id?this._exec(e,a,o):yt(o,l=>{let c=r||this._getRegistryForType(l);this._exec(e,c,l)})})}_exec(e,n,r){let o=ig(e);_t(r["before"+o],[],r),n[e](r),_t(r["after"+o],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){let r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){let o=n.get(e);if(o===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return o}},To=new EA,SA=class{constructor(){this._init=[]}notify(e,n,r,o){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));let a=o?this._descriptors(e).filter(o):this._descriptors(e),l=this._notify(a,e,n,r);return n==="afterDestroy"&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,n,r,o){o=o||{};for(let a of e){let l=a.plugin,c=l[r],u=[n,o,a.options];if(_t(c,u,l)===!1&&o.cancelable)return!1}return!0}invalidate(){St(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;let n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){let r=e&&e.config,o=pt(r.options&&r.options.plugins,{}),a=NB(r);return o===!1&&!n?[]:jB(e,a,o,n)}_notifyStateChanges(e){let n=this._oldCache||[],r=this._cache,o=(a,l)=>a.filter(c=>!l.some(u=>c.plugin.id===u.plugin.id));this._notify(o(n,r),e,"stop"),this._notify(o(r,n),e,"start")}};m1=new Map,qx=new Set;Wl=(t,e,n)=>{let r=Ka(e,n);r!==void 0&&t.add(r)},WB=class{constructor(t){this._config=VB(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Wx(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),Vx(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ad(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return ad(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return ad(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,n=this.type;return ad(`${n}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let n=this._scopeCache,r=n.get(t);return(!r||e)&&(r=new Map,n.set(t,r)),r}getOptionScopes(t,e,n){let{options:r,type:o}=this,a=this._cachedScopes(t,n),l=a.get(e);if(l)return l;let c=new Set;e.forEach(d=>{t&&(c.add(t),d.forEach(f=>Wl(c,t,f))),d.forEach(f=>Wl(c,r,f)),d.forEach(f=>Wl(c,Qi[o]||{},f)),d.forEach(f=>Wl(c,zt,f)),d.forEach(f=>Wl(c,AA,f))});let u=Array.from(c);return u.length===0&&u.push(Object.create(null)),qx.has(e)&&a.set(e,u),u}chartOptionScopes(){let{options:t,type:e}=this;return[t,Qi[e]||{},zt.datasets[e]||{},{type:e},zt,AA]}resolveNamedOptions(t,e,n,r=[""]){let o={$shared:!0},{resolver:a,subPrefixes:l}=b1(this._resolverCache,t,r),c=a;if(YB(a,e)){o.$shared=!1,n=Xa(n)?n():n;let u=this.createResolver(t,n,l);c=Ws(a,n,u)}for(let u of e)o[u]=c[u];return o}createResolver(t,e,n=[""],r){let{resolver:o}=b1(this._resolverCache,t,n);return ht(e)?Ws(o,e,void 0,r):o}};qB=t=>ht(t)&&Object.getOwnPropertyNames(t).some(e=>Xa(t[e]));GB="4.5.0",KB=["top","bottom","left","right","chartArea"];Ad={},w1=t=>{let e=Yx(t);return Object.values(Ad).filter(n=>n.canvas===e).pop()};gg=class{static defaults=zt;static instances=Ad;static overrides=Qi;static registry=To;static version=GB;static getChart=w1;static register(...t){To.add(...t),k1()}static unregister(...t){To.remove(...t),k1()}constructor(t,e){let n=this.config=new WB(e),r=Yx(t),o=w1(r);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");let a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||bB(r)),this.platform.updateConfig(n);let l=this.platform.acquireContext(r,a.aspectRatio),c=l&&l.canvas,u=c&&c.height,d=c&&c.width;if(this.id=v8(),this.ctx=l,this.canvas=c,this.width=d,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new SA,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=R8(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],Ad[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ia.listen(this,"complete",x1),ia.listen(this,"progress",XB),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:n,height:r,_aspectRatio:o}=this;return St(t)?e&&o?o:r?n/r:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return To}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Gv(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Vv(this.canvas,this.ctx),this}stop(){return ia.stop(this),this}resize(t,e){ia.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let n=this.options,r=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(r,t,e,o),l=n.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Gv(this,l,!0)&&(this.notifyPlugins("resize",{size:a}),_t(n.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let t=this.options.scales||{};yt(t,(e,n)=>{e.id=n})}buildOrUpdateScales(){let t=this.options,e=t.scales,n=this.scales,r=Object.keys(n).reduce((a,l)=>(a[l]=!1,a),{}),o=[];e&&(o=o.concat(Object.keys(e).map(a=>{let l=e[a],c=DA(a,l),u=c==="r",d=c==="x";return{options:l,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),yt(o,a=>{let l=a.options,c=l.id,u=DA(c,l),d=pt(l.type,a.dtype);(l.position===void 0||y1(l.position,u)!==y1(a.dposition))&&(l.position=a.dposition),r[c]=!0;let f=null;if(c in n&&n[c].type===d)f=n[c];else{let p=To.getScale(d);f=new p({id:c,type:d,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(l,t)}),yt(r,(a,l)=>{a||delete n[l]}),yt(n,a=>{Or.configure(this,a,a.options),Or.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,n=t.length;if(t.sort((r,o)=>r.index-o.index),n>e){for(let r=e;r<n;++r)this._destroyDatasetMeta(r);t.splice(e,n-e)}this._sortedMetasets=t.slice(0).sort(v1("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((n,r)=>{e.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,n,r;for(this._removeUnreferencedMetasets(),n=0,r=e.length;n<r;n++){let o=e[n],a=this.getDatasetMeta(n),l=o.type||this.config.type;if(a.type&&a.type!==l&&(this._destroyDatasetMeta(n),a=this.getDatasetMeta(n)),a.type=l,a.indexAxis=o.indexAxis||PA(l,this.options),a.order=o.order||0,a.index=n,a.label=""+o.label,a.visible=this.isDatasetVisible(n),a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{let c=To.getController(l),{datasetElementType:u,dataElementType:d}=zt.datasets[l];Object.assign(c,{dataElementType:To.getElement(d),datasetElementType:u&&To.getElement(u)}),a.controller=new c(this,n),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){yt(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let n=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;let o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,d=this.data.datasets.length;u<d;u++){let{controller:f}=this.getDatasetMeta(u),p=!r&&o.indexOf(f)===-1;f.buildOrUpdateElements(p),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),r||yt(o,u=>{u.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(v1("z","_idx"));let{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){yt(this.scales,t=>{Or.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!Ov(e,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:n,start:r,count:o}of e){let a=n==="_removeElements"?-o:o;JB(t,r,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,n=o=>new Set(t.filter(a=>a[0]===o).map((a,l)=>l+","+a.splice(1).join(","))),r=n(0);for(let o=1;o<e;o++)if(!Ov(r,n(o)))return;return Array.from(r).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Or.update(this,this.width,this.height,t);let e=this.chartArea,n=e.width<=0||e.height<=0;this._layers=[],yt(this.boxes,r=>{n&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,o)=>{r._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,n=this.data.datasets.length;e<n;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,n=this.data.datasets.length;e<n;++e)this._updateDataset(e,Xa(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let n=this.getDatasetMeta(t),r={meta:n,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(n.controller._update(e),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ia.has(this)?this.attached&&!ia.running(this)&&ia.start(this):(this.draw(),x1({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:n,height:r}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,r)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,n=[],r,o;for(r=0,o=e.length;r<o;++r){let a=e[r];(!t||a.visible)&&n.push(a)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,n={meta:t,index:t.index,cancelable:!0},r=CT(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(r&&cg(e,r),t.controller.draw(),r&&ug(e),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Tx(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,n,r){let o=$T.modes[e];return typeof o=="function"?o(this,t,n,r):[]}getDatasetMeta(t){let e=this.data.datasets[t],n=this._metasets,r=n.filter(o=>o&&o._dataset===e).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},n.push(r)),r}getContext(){return this.$context||(this.$context=Gs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!e.hidden}setDatasetVisibility(t,e){let n=this.getDatasetMeta(t);n.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,n){let r=n?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,r);ac(e)?(o.data[e].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),a.update(o,{visible:n}),this.update(l=>l.datasetIndex===t?r:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ia.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Vv(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ad[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,n=(o,a)=>{e.addEventListener(this,o,a),t[o]=a},r=(o,a,l)=>{o.offsetX=a,o.offsetY=l,this._eventHandler(o)};yt(this.options.events,o=>n(o,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,n=(c,u)=>{e.addEventListener(this,c,u),t[c]=u},r=(c,u)=>{t[c]&&(e.removeEventListener(this,c,u),delete t[c])},o=(c,u)=>{this.canvas&&this.resize(c,u)},a,l=()=>{r("attach",l),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,r("resize",o),this._stop(),this._resize(0,0),n("attach",l)},e.isAttached(this.canvas)?l():a()}unbindEvents(){yt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},yt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,n){let r=n?"set":"remove",o,a,l,c;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+r+"DatasetHoverStyle"]()),l=0,c=t.length;l<c;++l){a=t[l];let u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[r+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],n=t.map(({datasetIndex:r,index:o})=>{let a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[o],index:o}});!xd(n,e)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,e))}notifyPlugins(t,e,n){return this._plugins.notify(this,t,e,n)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,n){let r=this.options.hover,o=(c,u)=>c.filter(d=>!u.some(f=>d.datasetIndex===f.datasetIndex&&d.index===f.index)),a=o(e,t),l=n?t:o(t,e);a.length&&this.updateHoverStyle(a,r.mode,!1),l.length&&r.mode&&this.updateHoverStyle(l,r.mode,!0)}_eventHandler(t,e){let n={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},r=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,r)===!1)return;let o=this._handleEvent(t,e,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,r),(o||n.changed)&&this.render(),this}_handleEvent(t,e,n){let{_active:r=[],options:o}=this,a=e,l=this._getActiveElements(t,r,n,a),c=S8(t),u=ZB(t,this._lastEvent,n,c);n&&(this._lastEvent=null,_t(o.onHover,[t,l,this],this),c&&_t(o.onClick,[t,l,this],this));let d=!xd(l,r);return(d||e)&&(this._active=l,this._updateHoverStyles(l,r,e)),this._lastEvent=u,d}_getActiveElements(t,e,n,r){if(t.type==="mouseout")return[];if(!n)return e;let o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,r)}};TA=class extends Ks{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){let{inflateAmount:n,options:{borderColor:r,backgroundColor:o}}=this,{inner:a,outer:l}=tI(this),c=nI(l.radius)?Ed:rI;e.save(),(l.w!==a.w||l.h!==a.h)&&(e.beginPath(),c(e,eA(l,n,a)),e.clip(),c(e,eA(a,-n,l)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),c(e,eA(a,n)),e.fillStyle=o,e.fill(),e.restore()}inRange(e,n,r){return $p(this,e,n,r)}inXRange(e,n){return $p(this,e,null,n)}inYRange(e,n){return $p(this,null,e,n)}getCenterPoint(e){let{x:n,y:r,base:o,horizontal:a}=this.getProps(["x","y","base","horizontal"],e);return{x:a?(n+o)/2:n,y:a?r:(r+o)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}},BA=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],C1=BA.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));uI={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;let{data:{datasets:r},options:o}=t.config,{elements:a}=o,l=E1(r)||lI(o)||a&&E1(a)||cI();if(!n.forceOverride&&l)return;let c=sI(t);r.forEach(c)}},S1=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},dI=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index,Bd=class extends Ks{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){let e=this.options.labels||{},n=_t(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,o)=>e.sort(r,o,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){let{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}let r=e.labels,o=Bn(r.font),a=o.size,l=this._computeTitleHeight(),{boxWidth:c,itemHeight:u}=S1(r,a),d,f;n.font=o.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(l,a,c,u)+10):(f=this.maxHeight,d=this._fitCols(l,o,c,u)+10),this.width=Math.min(d,e.maxWidth||this.maxWidth),this.height=Math.min(f,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,o){let{ctx:a,maxWidth:l,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.lineWidths=[0],f=o+c,p=e;a.textAlign="left",a.textBaseline="middle";let A=-1,b=-f;return this.legendItems.forEach((y,k)=>{let w=r+n/2+a.measureText(y.text).width;(k===0||d[d.length-1]+w+2*c>l)&&(p+=f,d[d.length-(k>0?0:1)]=0,b+=f,A++),u[k]={left:0,top:b,row:A,width:w,height:o},d[d.length-1]+=w+c}),p}_fitCols(e,n,r,o){let{ctx:a,maxHeight:l,options:{labels:{padding:c}}}=this,u=this.legendHitBoxes=[],d=this.columnSizes=[],f=l-e,p=c,A=0,b=0,y=0,k=0;return this.legendItems.forEach((w,S)=>{let{itemWidth:M,itemHeight:T}=hI(r,n,a,w,o);S>0&&b+T+2*c>f&&(p+=A+c,d.push({width:A,height:b}),y+=A+c,k++,A=b=0),u[S]={left:y,top:b,col:k,width:M,height:T},A=Math.max(A,M),b+=T+c}),p+=A,d.push({width:A,height:b}),p}adjustHitBoxes(){if(!this.options.display)return;let e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:o},rtl:a}}=this,l=Rs(a,this.left,this.width);if(this.isHorizontal()){let c=0,u=Tn(r,this.left+o,this.right-this.lineWidths[c]);for(let d of n)c!==d.row&&(c=d.row,u=Tn(r,this.left+o,this.right-this.lineWidths[c])),d.top+=this.top+e+o,d.left=l.leftForLtr(l.x(u),d.width),u+=d.width+o}else{let c=0,u=Tn(r,this.top+e+o,this.bottom-this.columnSizes[c].height);for(let d of n)d.col!==c&&(c=d.col,u=Tn(r,this.top+e+o,this.bottom-this.columnSizes[c].height)),d.top=u,d.left+=this.left+o,d.left=l.leftForLtr(l.x(d.left),d.width),u+=d.height+o}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){let e=this.ctx;cg(e,this),this._draw(),ug(e)}}_draw(){let{options:e,columnSizes:n,lineWidths:r,ctx:o}=this,{align:a,labels:l}=e,c=zt.color,u=Rs(e.rtl,this.left,this.width),d=Bn(l.font),{padding:f}=l,p=d.size,A=p/2,b;this.drawTitle(),o.textAlign=u.textAlign("left"),o.textBaseline="middle",o.lineWidth=.5,o.font=d.string;let{boxWidth:y,boxHeight:k,itemHeight:w}=S1(l,p),S=function(F,V,U){if(isNaN(y)||y<=0||isNaN(k)||k<0)return;o.save();let G=pt(U.lineWidth,1);if(o.fillStyle=pt(U.fillStyle,c),o.lineCap=pt(U.lineCap,"butt"),o.lineDashOffset=pt(U.lineDashOffset,0),o.lineJoin=pt(U.lineJoin,"miter"),o.lineWidth=G,o.strokeStyle=pt(U.strokeStyle,c),o.setLineDash(pt(U.lineDash,[])),l.usePointStyle){let W={radius:k*Math.SQRT2/2,pointStyle:U.pointStyle,rotation:U.rotation,borderWidth:G},X=u.xPlus(F,y/2),Y=V+A;Dx(o,W,X,Y,l.pointStyleWidth&&y)}else{let W=V+Math.max((p-k)/2,0),X=u.leftForLtr(F,y),Y=Fs(U.borderRadius);o.beginPath(),Object.values(Y).some(ae=>ae!==0)?Ed(o,{x:X,y:W,w:y,h:k,radius:Y}):o.rect(X,W,y,k),o.fill(),G!==0&&o.stroke()}o.restore()},M=function(F,V,U){ic(o,U.text,F,V+w/2,d,{strikethrough:U.hidden,textAlign:u.textAlign(U.textAlign)})},T=this.isHorizontal(),P=this._computeTitleHeight();T?b={x:Tn(a,this.left+f,this.right-r[0]),y:this.top+f+P,line:0}:b={x:this.left+f,y:Tn(a,this.top+P+f,this.bottom-n[0].height),line:0},Lx(this.ctx,e.textDirection);let R=w+f;this.legendItems.forEach((F,V)=>{o.strokeStyle=F.fontColor,o.fillStyle=F.fontColor;let U=o.measureText(F.text).width,G=u.textAlign(F.textAlign||(F.textAlign=l.textAlign)),W=y+A+U,X=b.x,Y=b.y;u.setWidth(this.width),T?V>0&&X+W+f>this.right&&(Y=b.y+=R,b.line++,X=b.x=Tn(a,this.left+f,this.right-r[b.line])):V>0&&Y+R>this.bottom&&(X=b.x=X+n[b.line].width+f,b.line++,Y=b.y=Tn(a,this.top+P+f,this.bottom-n[b.line].height));let ae=u.x(X);if(S(ae,Y,F),X=z8(G,X+y+A,T?X+W:this.right,e.rtl),M(u.x(X),Y,F),T)b.x+=W+f;else if(typeof F.text!="string"){let pe=d.lineHeight;b.y+=Jx(F,pe)+f}else b.y+=R}),jx(this.ctx,e.textDirection)}drawTitle(){let e=this.options,n=e.title,r=Bn(n.font),o=Rr(n.padding);if(!n.display)return;let a=Rs(e.rtl,this.left,this.width),l=this.ctx,c=n.position,u=r.size/2,d=o.top+u,f,p=this.left,A=this.width;if(this.isHorizontal())A=Math.max(...this.lineWidths),f=this.top+d,p=Tn(e.align,p,this.right-A);else{let y=this.columnSizes.reduce((k,w)=>Math.max(k,w.height),0);f=d+Tn(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}let b=Tn(c,p,p+A);l.textAlign=a.textAlign(lg(c)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=r.string,ic(l,n.text,b,f,r)}_computeTitleHeight(){let e=this.options.title,n=Bn(e.font),r=Rr(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,o,a;if(Ls(e,this.left,this.right)&&Ls(n,this.top,this.bottom)){for(a=this.legendHitBoxes,r=0;r<a.length;++r)if(o=a[r],Ls(e,o.left,o.left+o.width)&&Ls(n,o.top,o.top+o.height))return this.legendItems[r]}return null}handleEvent(e){let n=this.options;if(!AI(e.type,n))return;let r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){let o=this._hoveredItem,a=dI(o,r);o&&!a&&_t(n.onLeave,[e,o,this],this),this._hoveredItem=r,r&&!a&&_t(n.onHover,[e,r,this],this)}else r&&_t(n.onClick,[e,r,this],this)}};gI={id:"legend",_element:Bd,start(t,e,n){let r=t.legend=new Bd({ctx:t.ctx,options:n,chart:t});Or.configure(t,r,n),Or.addBox(t,r)},stop(t){Or.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){let r=t.legend;Or.configure(t,r,n),r.options=n},afterUpdate(t){let e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){let r=e.datasetIndex,o=n.chart;o.isDatasetVisible(r)?(o.hide(r),e.hidden=!0):(o.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){let e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:o,color:a,useBorderRadius:l,borderRadius:c}}=t.legend.options;return t._getSortedDatasetMetas().map(u=>{let d=u.controller.getStyle(n?0:void 0),f=Rr(d.borderWidth);return{text:e[u.index].label,fillStyle:d.backgroundColor,fontColor:a,hidden:!u.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:o||d.textAlign,borderRadius:l&&(c||d.borderRadius),datasetIndex:u.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}},Id=class extends Ks{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){let r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;let o=on(r.text)?r.text.length:1;this._padding=Rr(r.padding);let a=o*Bn(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}isHorizontal(){let e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){let{top:n,left:r,bottom:o,right:a,options:l}=this,c=l.align,u=0,d,f,p;return this.isHorizontal()?(f=Tn(c,r,a),p=n+e,d=a-r):(l.position==="left"?(f=r+e,p=Tn(c,o,n),u=an*-.5):(f=a-e,p=Tn(c,n,o),u=an*.5),d=o-n),{titleX:f,titleY:p,maxWidth:d,rotation:u}}draw(){let e=this.ctx,n=this.options;if(!n.display)return;let r=Bn(n.font),o=r.lineHeight/2+this._padding.top,{titleX:a,titleY:l,maxWidth:c,rotation:u}=this._drawArgs(o);ic(e,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:u,textAlign:lg(n.align),textBaseline:"middle",translation:[a,l]})}};bI={id:"title",_element:Id,start(t,e,n){mI(t,n)},stop(t){let e=t.titleBlock;Or.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){let r=t.titleBlock;Or.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},Gl={average(t){if(!t.length)return!1;let e,n,r=new Set,o=0,a=0;for(e=0,n=t.length;e<n;++e){let l=t[e].element;if(l&&l.hasValue()){let c=l.tooltipPosition();r.add(c.x),o+=c.y,++a}}return a===0||r.size===0?!1:{x:[...r].reduce((l,c)=>l+c)/r.size,y:o/a}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,o=Number.POSITIVE_INFINITY,a,l,c;for(a=0,l=t.length;a<l;++a){let u=t[a].element;if(u&&u.hasValue()){let d=u.getCenterPoint(),f=O8(e,d);f<o&&(o=f,c=u)}}if(c){let u=c.tooltipPosition();n=u.x,r=u.y}return{x:n,y:r}}};Zx={beforeTitle:aa,title(t){if(t.length>0){let e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:aa,beforeBody:aa,beforeLabel:aa,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");let n=t.formattedValue;return St(n)||(e+=n),e},labelColor(t){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){let e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:aa,afterBody:aa,beforeFooter:aa,footer:aa,afterFooter:aa};Md=class extends Ks{static positioners=Gl;constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){let e=this._cachedAnimations;if(e)return e;let n=this.chart,r=this.options.setContext(this.getContext()),o=r.enabled&&n.options.animation&&r.animations,a=new Pd(this.chart,o);return o._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=EI(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){let{callbacks:r}=n,o=or(r,"beforeTitle",this,e),a=or(r,"title",this,e),l=or(r,"afterTitle",this,e),c=[];return c=Do(c,sa(o)),c=Do(c,sa(a)),c=Do(c,sa(l)),c}getBeforeBody(e,n){return B1(or(n.callbacks,"beforeBody",this,e))}getBody(e,n){let{callbacks:r}=n,o=[];return yt(e,a=>{let l={before:[],lines:[],after:[]},c=I1(r,a);Do(l.before,sa(or(c,"beforeLabel",this,a))),Do(l.lines,or(c,"label",this,a)),Do(l.after,sa(or(c,"afterLabel",this,a))),o.push(l)}),o}getAfterBody(e,n){return B1(or(n.callbacks,"afterBody",this,e))}getFooter(e,n){let{callbacks:r}=n,o=or(r,"beforeFooter",this,e),a=or(r,"footer",this,e),l=or(r,"afterFooter",this,e),c=[];return c=Do(c,sa(o)),c=Do(c,sa(a)),c=Do(c,sa(l)),c}_createItems(e){let n=this._active,r=this.chart.data,o=[],a=[],l=[],c=[],u,d;for(u=0,d=n.length;u<d;++u)c.push(yI(this.chart,n[u]));return e.filter&&(c=c.filter((f,p,A)=>e.filter(f,p,A,r))),e.itemSort&&(c=c.sort((f,p)=>e.itemSort(f,p,r))),yt(c,f=>{let p=I1(e.callbacks,f);o.push(or(p,"labelColor",this,f)),a.push(or(p,"labelPointStyle",this,f)),l.push(or(p,"labelTextColor",this,f))}),this.labelColors=o,this.labelPointStyles=a,this.labelTextColors=l,this.dataPoints=c,c}update(e,n){let r=this.options.setContext(this.getContext()),o=this._active,a,l=[];if(!o.length)this.opacity!==0&&(a={opacity:0});else{let c=Gl[r.position].call(this,o,this._eventPosition);l=this._createItems(r),this.title=this.getTitle(l,r),this.beforeBody=this.getBeforeBody(l,r),this.body=this.getBody(l,r),this.afterBody=this.getAfterBody(l,r),this.footer=this.getFooter(l,r);let u=this._size=P1(this,r),d=Object.assign({},c,u),f=D1(this.chart,r,d),p=T1(r,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,a={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:c.x,caretY:c.y}}this._tooltipItems=l,this.$context=void 0,a&&this._resolveAnimations().update(this,a),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,o){let a=this.getCaretPosition(e,r,o);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)}getCaretPosition(e,n,r){let{xAlign:o,yAlign:a}=this,{caretSize:l,cornerRadius:c}=r,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Fs(c),{x:A,y:b}=e,{width:y,height:k}=n,w,S,M,T,P,R;return a==="center"?(P=b+k/2,o==="left"?(w=A,S=w-l,T=P+l,R=P-l):(w=A+y,S=w+l,T=P-l,R=P+l),M=w):(o==="left"?S=A+Math.max(u,f)+l:o==="right"?S=A+y-Math.max(d,p)-l:S=this.caretX,a==="top"?(T=b,P=T-l,w=S-l,M=S+l):(T=b+k,P=T+l,w=S+l,M=S-l),R=T),{x1:w,x2:S,x3:M,y1:T,y2:P,y3:R}}drawTitle(e,n,r){let o=this.title,a=o.length,l,c,u;if(a){let d=Rs(r.rtl,this.x,this.width);for(e.x=id(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",l=Bn(r.titleFont),c=r.titleSpacing,n.fillStyle=r.titleColor,n.font=l.string,u=0;u<a;++u)n.fillText(o[u],d.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+c,u+1===a&&(e.y+=r.titleMarginBottom-c)}}_drawColorBox(e,n,r,o,a){let l=this.labelColors[r],c=this.labelPointStyles[r],{boxHeight:u,boxWidth:d}=a,f=Bn(a.bodyFont),p=id(this,"left",a),A=o.x(p),b=u<f.lineHeight?(f.lineHeight-u)/2:0,y=n.y+b;if(a.usePointStyle){let k={radius:Math.min(d,u)/2,pointStyle:c.pointStyle,rotation:c.rotation,borderWidth:1},w=o.leftForLtr(A,d)+d/2,S=y+u/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,Wv(e,k,w,S),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Wv(e,k,w,S)}else{e.lineWidth=ht(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;let k=o.leftForLtr(A,d),w=o.leftForLtr(o.xPlus(A,1),d-2),S=Fs(l.borderRadius);Object.values(S).some(M=>M!==0)?(e.beginPath(),e.fillStyle=a.multiKeyBackground,Ed(e,{x:k,y,w:d,h:u,radius:S}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),Ed(e,{x:w,y:y+1,w:d-2,h:u-2,radius:S}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(k,y,d,u),e.strokeRect(k,y,d,u),e.fillStyle=l.backgroundColor,e.fillRect(w,y+1,d-2,u-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){let{body:o}=this,{bodySpacing:a,bodyAlign:l,displayColors:c,boxHeight:u,boxWidth:d,boxPadding:f}=r,p=Bn(r.bodyFont),A=p.lineHeight,b=0,y=Rs(r.rtl,this.x,this.width),k=function(U){n.fillText(U,y.x(e.x+b),e.y+A/2),e.y+=A+a},w=y.textAlign(l),S,M,T,P,R,F,V;for(n.textAlign=l,n.textBaseline="middle",n.font=p.string,e.x=id(this,w,r),n.fillStyle=r.bodyColor,yt(this.beforeBody,k),b=c&&w!=="right"?l==="center"?d/2+f:d+2+f:0,P=0,F=o.length;P<F;++P){for(S=o[P],M=this.labelTextColors[P],n.fillStyle=M,yt(S.before,k),T=S.lines,c&&T.length&&(this._drawColorBox(n,e,P,y,r),A=Math.max(p.lineHeight,u)),R=0,V=T.length;R<V;++R)k(T[R]),A=p.lineHeight;yt(S.after,k)}b=0,A=p.lineHeight,yt(this.afterBody,k),e.y-=a}drawFooter(e,n,r){let o=this.footer,a=o.length,l,c;if(a){let u=Rs(r.rtl,this.x,this.width);for(e.x=id(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=u.textAlign(r.footerAlign),n.textBaseline="middle",l=Bn(r.footerFont),n.fillStyle=r.footerColor,n.font=l.string,c=0;c<a;++c)n.fillText(o[c],u.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+r.footerSpacing}}drawBackground(e,n,r,o){let{xAlign:a,yAlign:l}=this,{x:c,y:u}=e,{width:d,height:f}=r,{topLeft:p,topRight:A,bottomLeft:b,bottomRight:y}=Fs(o.cornerRadius);n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,n.lineWidth=o.borderWidth,n.beginPath(),n.moveTo(c+p,u),l==="top"&&this.drawCaret(e,n,r,o),n.lineTo(c+d-A,u),n.quadraticCurveTo(c+d,u,c+d,u+A),l==="center"&&a==="right"&&this.drawCaret(e,n,r,o),n.lineTo(c+d,u+f-y),n.quadraticCurveTo(c+d,u+f,c+d-y,u+f),l==="bottom"&&this.drawCaret(e,n,r,o),n.lineTo(c+b,u+f),n.quadraticCurveTo(c,u+f,c,u+f-b),l==="center"&&a==="left"&&this.drawCaret(e,n,r,o),n.lineTo(c,u+p),n.quadraticCurveTo(c,u,c+p,u),n.closePath(),n.fill(),o.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){let n=this.chart,r=this.$animations,o=r&&r.x,a=r&&r.y;if(o||a){let l=Gl[e.position].call(this,this._active,this._eventPosition);if(!l)return;let c=this._size=P1(this,e),u=Object.assign({},l,this._size),d=D1(n,e,u),f=T1(e,u,d,n);(o._to!==f.x||a._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=c.width,this.height=c.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){let n=this.options.setContext(this.getContext()),r=this.opacity;if(!r)return;this._updateAnimationTarget(n);let o={width:this.width,height:this.height},a={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;let l=Rr(n.padding),c=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&c&&(e.save(),e.globalAlpha=r,this.drawBackground(a,e,o,n),Lx(e,n.textDirection),a.y+=l.top,this.drawTitle(a,e,n),this.drawBody(a,e,n),this.drawFooter(a,e,n),jx(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){let r=this._active,o=e.map(({datasetIndex:c,index:u})=>{let d=this.chart.getDatasetMeta(c);if(!d)throw new Error("Cannot find a dataset at index "+c);return{datasetIndex:c,element:d.data[u],index:u}}),a=!xd(r,o),l=this._positionChanged(o,n);(a||l)&&(this._active=o,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let o=this.options,a=this._active||[],l=this._getActiveElements(e,a,n,r),c=this._positionChanged(l,e),u=n||!xd(l,a)||c;return u&&(this._active=l,(o.enabled||o.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,r,o){let a=this.options;if(e.type==="mouseout")return[];if(!o)return n.filter(c=>this.chart.data.datasets[c.datasetIndex]&&this.chart.getDatasetMeta(c.datasetIndex).controller.getParsed(c.index)!==void 0);let l=this.chart.getElementsAtEventForMode(e,a.mode,a,r);return a.reverse&&l.reverse(),l}_positionChanged(e,n){let{caretX:r,caretY:o,options:a}=this,l=Gl[a.position].call(this,e,n);return l!==!1&&(r!==l.x||o!==l.y)}},SI={id:"tooltip",_element:Md,positioners:Gl,afterInit(t,e,n){n&&(t.tooltip=new Md({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){let e=t.tooltip;if(e&&e._willRender()){let n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){let n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Zx},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},PI=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);TI=(t,e)=>t===null?null:ro(Math.round(t),0,e);IA=class extends Ys{static id="category";static defaults={ticks:{callback:M1}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){let n=this._addedLabels;if(n.length){let r=this.getLabels();for(let{index:o,label:a}of n)r[o]===a&&r.splice(o,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(St(e))return null;let r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:DI(r,e,pt(n,e),this._addedLabels),TI(n,r.length-1)}determineDataLimits(){let{minDefined:e,maxDefined:n}=this.getUserBounds(),{min:r,max:o}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(o=this.getLabels().length-1)),this.min=r,this.max=o}buildTicks(){let e=this.min,n=this.max,r=this.options.offset,o=[],a=this.getLabels();a=e===0&&n===a.length-1?a:a.slice(e,n+1),this._valueRange=Math.max(a.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let l=e;l<=n;l++)o.push({value:l});return o}getLabelForValue(e){return M1.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){let n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}};MA=class extends Ys{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return St(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){let{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds(),{min:o,max:a}=this,l=u=>o=n?o:u,c=u=>a=r?a:u;if(e){let u=Ga(o),d=Ga(a);u<0&&d<0?c(0):u>0&&d>0&&l(0)}if(o===a){let u=a===0?1:Math.abs(a*.05);c(a+u),e||l(o-u)}this.min=o,this.max=a}getTickLimit(){let e=this.options.ticks,{maxTicksLimit:n,stepSize:r}=e,o;return r?(o=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,o>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${o} ticks. Limiting to 1000.`),o=1e3)):(o=this.computeTickLimit(),n=n||11),n&&(o=Math.min(n,o)),o}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let e=this.options,n=e.ticks,r=this.getTickLimit();r=Math.max(2,r);let o={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},a=this._range||this,l=BI(o,a);return e.bounds==="ticks"&&I8(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){let e=this.ticks,n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){let o=(r-n)/Math.max(e.length-1,1)/2;n-=o,r+=o}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return qd(e,this.chart.options.locale,this.options.ticks.format)}},_A=class extends MA{static id="linear";static defaults={ticks:{callback:Px.formatters.numeric}};determineDataLimits(){let{min:e,max:n}=this.getMinMax(!0);this.min=Fr(e)?e:0,this.max=Fr(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){let e=this.isHorizontal(),n=e?this.width:this.height,r=Io(this.options.ticks.minRotation),o=(e?Math.sin(r):Math.cos(r))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,a.lineHeight/o))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}},Kd={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ar=Object.keys(Kd);_d=class extends Ys{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){let r=e.time||(e.time={}),o=this._adapter=new GT._date(e.adapters.date);o.init(n),Zl(r.displayFormats,o.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:N1(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let e=this.options,n=this._adapter,r=e.time.unit||"day",{min:o,max:a,minDefined:l,maxDefined:c}=this.getUserBounds();function u(d){!l&&!isNaN(d.min)&&(o=Math.min(o,d.min)),!c&&!isNaN(d.max)&&(a=Math.max(a,d.max))}(!l||!c)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),o=Fr(o)&&!isNaN(o)?o:+n.startOf(Date.now(),r),a=Fr(a)&&!isNaN(a)?a:+n.endOf(Date.now(),r)+1,this.min=Math.min(o,a-1),this.max=Math.max(o+1,a)}_getLabelBounds(){let e=this.getLabelTimestamps(),n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){let e=this.options,n=e.time,r=e.ticks,o=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&o.length&&(this.min=this._userMin||o[0],this.max=this._userMax||o[o.length-1]);let a=this.min,l=this.max,c=j8(o,a,l);return this._unit=n.unit||(r.autoSkip?L1(n.minUnit,this.min,this.max,this._getLabelCapacity(a)):II(this,c.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:MI(this._unit),this.initOffsets(o),e.reverse&&c.reverse(),F1(this,c,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,o,a;this.options.offset&&e.length&&(o=this.getDecimalForValue(e[0]),e.length===1?n=1-o:n=(this.getDecimalForValue(e[1])-o)/2,a=this.getDecimalForValue(e[e.length-1]),e.length===1?r=a:r=(a-this.getDecimalForValue(e[e.length-2]))/2);let l=e.length<3?.5:.25;n=ro(n,0,l),r=ro(r,0,l),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){let e=this._adapter,n=this.min,r=this.max,o=this.options,a=o.time,l=a.unit||L1(a.minUnit,n,r,this._getLabelCapacity(n)),c=pt(o.ticks.stepSize,1),u=l==="week"?a.isoWeekday:!1,d=Cd(u)||u===!0,f={},p=n,A,b;if(d&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,d?"day":l),e.diff(r,n,l)>1e5*c)throw new Error(n+" and "+r+" are too far apart with stepSize of "+c+" "+l);let y=o.ticks.source==="data"&&this.getDataTimestamps();for(A=p,b=0;A<r;A=+e.add(A,c,l),b++)j1(f,A,y);return(A===r||o.bounds==="ticks"||b===1)&&j1(f,A,y),Object.keys(f).sort(O1).map(k=>+k)}getLabelForValue(e){let n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){let r=this.options.time.displayFormats,o=this._unit,a=n||r[o];return this._adapter.format(e,a)}_tickFormatFunction(e,n,r,o){let a=this.options,l=a.ticks.callback;if(l)return _t(l,[e,n,r],this);let c=a.time.displayFormats,u=this._unit,d=this._majorUnit,f=u&&c[u],p=d&&c[d],A=r[n],b=d&&p&&A&&A.major;return this._adapter.format(e,o||(b?p:f))}generateTickLabels(e){let n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n],o.label=this._tickFormatFunction(o.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){let n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){let n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){let n=this.options.ticks,r=this.ctx.measureText(e).width,o=Io(this.isHorizontal()?n.maxRotation:n.minRotation),a=Math.cos(o),l=Math.sin(o),c=this._resolveTickFontOptions(0).size;return{w:r*a+c*l,h:r*l+c*a}}_getLabelCapacity(e){let n=this.options.time,r=n.displayFormats,o=r[n.unit]||r.millisecond,a=this._tickFormatFunction(e,0,F1(this,[e],this._majorUnit),o),l=this._getLabelSize(a),c=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return c>0?c:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;let o=this.getMatchingVisibleMetas();if(this._normalized&&o.length)return this._cache.data=o[0].controller.getAllParsedValues(this);for(n=0,r=o.length;n<r;++n)e=e.concat(o[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){let e=this._cache.labels||[],n,r;if(e.length)return e;let o=this.getLabels();for(n=0,r=o.length;n<r;++n)e.push(N1(this,o[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return kx(e.sort(O1))}};R1=class extends _d{static id="timeseries";static defaults=_d.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=sd(n,this.min),this._tableRange=sd(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){let{min:n,max:r}=this,o=[],a=[],l,c,u,d,f;for(l=0,c=e.length;l<c;++l)d=e[l],d>=n&&d<=r&&o.push(d);if(o.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(l=0,c=o.length;l<c;++l)f=o[l+1],u=o[l-1],d=o[l],Math.round((f+u)/2)!==d&&a.push({time:d,pos:l/(c-1)});return a}_generate(){let e=this.min,n=this.max,r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((o,a)=>o-a)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;let n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(sd(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){let n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return sd(this._table,r*this._tableRange+this._minPos,!0)}};gg.register(uI,yA,TA,IA,_A,gI,bI,SI);z1=["--teal-700","--yellow-400","--teal-400","--orange-400","--green-400","--red-400"],tA=["0 - 1s","1 - 30s","30s - 30min","30 - 60min","1 - 5hr","5 - 10hr","10 - 18hr","18+hr"],nA=(t,e,n=0)=>`${t.toFixed(n)} ${e}${t==1?"":"s"}`,Q1=t=>{let e=t/3600;if(e>=1)return nA(e,"hour",1);let n=t/60;return n>=1?nA(n,"minute",0):nA(t,"second",0)},ld=t=>t.replace(/ \([^)]+\)/,"");zI="Incorrect 'index' type",QI=t=>`Invalid value for key ${t}`,HI=t=>`Pattern length exceeds max of ${t}.`,UI=t=>`Missing ${t} property in key`,VI=t=>`Property 'weight' in key '${t}' must be a positive integer`,H1=Object.prototype.hasOwnProperty,OA=class{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(r=>{let o=nw(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};qI={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},YI={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},GI={location:0,threshold:.6,distance:100},KI={useExtendedSearch:!1,getFn:WI,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Ye={...YI,...qI,...GI,...KI},XI=/[^ ]+/g;lc=class{constructor({getFn:e=Ye.getFn,fieldNormWeight:n=Ye.fieldNormWeight}={}){this.norm=JI(n,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Mo(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){let n=this.size();Mo(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!yr(e)||rA(e))return;let r={v:e,i:n,n:this.norm.get(e)};this.records.push(r)}_addObject(e,n){let r={i:n,$:{}};this.keys.forEach((o,a)=>{let l=o.getFn?o.getFn(e):this.getFn(e,o.path);if(yr(l)){if(ua(l)){let c=[],u=[{nestedArrIndex:-1,value:l}];for(;u.length;){let{nestedArrIndex:d,value:f}=u.pop();if(yr(f))if(Mo(f)&&!rA(f)){let p={v:f,i:d,n:this.norm.get(f)};c.push(p)}else ua(f)&&f.forEach((p,A)=>{u.push({nestedArrIndex:A,value:p})})}r.$[a]=c}else if(Mo(l)&&!rA(l)){let c={v:l,n:this.norm.get(l)};r.$[a]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};ji=32;Od=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t,Nd=class{constructor(e,{location:n=Ye.location,threshold:r=Ye.threshold,distance:o=Ye.distance,includeMatches:a=Ye.includeMatches,findAllMatches:l=Ye.findAllMatches,minMatchCharLength:c=Ye.minMatchCharLength,isCaseSensitive:u=Ye.isCaseSensitive,ignoreDiacritics:d=Ye.ignoreDiacritics,ignoreLocation:f=Ye.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:a,findAllMatches:l,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:f},e=u?e:e.toLowerCase(),e=d?Od(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let p=(b,y)=>{this.chunks.push({pattern:b,alphabet:t5(b),startIndex:y})},A=this.pattern.length;if(A>ji){let b=0,y=A%ji,k=A-y;for(;b<k;)p(this.pattern.substr(b,ji),b),b+=ji;if(y){let w=A-ji;p(this.pattern.substr(w),w)}}else p(this.pattern,0)}searchIn(e){let{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o}=this.options;if(e=n?e:e.toLowerCase(),e=r?Od(e):e,this.pattern===e){let k={isMatch:!0,score:0};return o&&(k.indices=[[0,e.length-1]]),k}let{location:a,distance:l,threshold:c,findAllMatches:u,minMatchCharLength:d,ignoreLocation:f}=this.options,p=[],A=0,b=!1;this.chunks.forEach(({pattern:k,alphabet:w,startIndex:S})=>{let{isMatch:M,score:T,indices:P}=e5(e,k,w,{location:a+S,distance:l,threshold:c,findAllMatches:u,minMatchCharLength:d,includeMatches:o,ignoreLocation:f});M&&(b=!0),A+=T,M&&P&&(p=[...p,...P])});let y={isMatch:b,score:b?A/this.chunks.length:1};return b&&o&&(y.indices=p),y}},Lo=class{constructor(e){this.pattern=e}static isMultiMatch(e){return V1(e,this.multiRegex)}static isSingleMatch(e){return V1(e,this.singleRegex)}search(){}};LA=class extends Lo{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},jA=class extends Lo{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},FA=class extends Lo{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}},RA=class extends Lo{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},zA=class extends Lo{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},QA=class extends Lo{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}},Ld=class extends Lo{constructor(e,{location:n=Ye.location,threshold:r=Ye.threshold,distance:o=Ye.distance,includeMatches:a=Ye.includeMatches,findAllMatches:l=Ye.findAllMatches,minMatchCharLength:c=Ye.minMatchCharLength,isCaseSensitive:u=Ye.isCaseSensitive,ignoreDiacritics:d=Ye.ignoreDiacritics,ignoreLocation:f=Ye.ignoreLocation}={}){super(e),this._bitapSearch=new Nd(e,{location:n,threshold:r,distance:o,includeMatches:a,findAllMatches:l,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},jd=class extends Lo{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,r,o=[],a=this.pattern.length;for(;(r=e.indexOf(this.pattern,n))>-1;)n=r+a,o.push([r,n-1]);let l=!!o.length;return{isMatch:l,score:l?0:1,indices:o}}},HA=[LA,jd,FA,RA,QA,zA,jA,Ld],W1=HA.length,n5=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,r5="|";a5=new Set([Ld.type,jd.type]),UA=class{constructor(e,{isCaseSensitive:n=Ye.isCaseSensitive,ignoreDiacritics:r=Ye.ignoreDiacritics,includeMatches:o=Ye.includeMatches,minMatchCharLength:a=Ye.minMatchCharLength,ignoreLocation:l=Ye.ignoreLocation,findAllMatches:c=Ye.findAllMatches,location:u=Ye.location,threshold:d=Ye.threshold,distance:f=Ye.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:o,minMatchCharLength:a,findAllMatches:c,ignoreLocation:l,location:u,threshold:d,distance:f},e=n?e:e.toLowerCase(),e=r?Od(e):e,this.pattern=e,this.query=o5(this.pattern,this.options)}static condition(e,n){return n.useExtendedSearch}searchIn(e){let n=this.query;if(!n)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:o,ignoreDiacritics:a}=this.options;e=o?e:e.toLowerCase(),e=a?Od(e):e;let l=0,c=[],u=0;for(let d=0,f=n.length;d<f;d+=1){let p=n[d];c.length=0,l=0;for(let A=0,b=p.length;A<b;A+=1){let y=p[A],{isMatch:k,indices:w,score:S}=y.search(e);if(k){if(l+=1,u+=S,r){let M=y.constructor.type;a5.has(M)?c=[...c,...w]:c.push(w)}}else{u=0,l=0,c.length=0;break}}if(l){let A={isMatch:!0,score:u/l};return r&&(A.indices=c),A}}return{isMatch:!1,score:1}}},VA=[];Fd={AND:"$and",OR:"$or"},qA={PATH:"$path",PATTERN:"$val"},YA=t=>!!(t[Fd.AND]||t[Fd.OR]),s5=t=>!!t[qA.PATH],l5=t=>!ua(t)&&ew(t)&&!YA(t),q1=t=>({[Fd.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});Ja=class{constructor(e,n={},r){this.options={...Ye,...n},this.options.useExtendedSearch,this._keyStore=new OA(this.options.keys),this.setCollection(e,r)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof lc))throw new Error(zI);this._myIndex=n||rw(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){yr(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let n=[];for(let r=0,o=this._docs.length;r<o;r+=1){let a=this._docs[r];e(a,r)&&(this.removeAt(r),r-=1,o-=1,n.push(a))}return n}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){let{includeMatches:r,includeScore:o,shouldSort:a,sortFn:l,ignoreFieldNorm:c}=this.options,u=Mo(e)?Mo(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return c5(u,{ignoreFieldNorm:c}),a&&u.sort(l),$x(n)&&n>-1&&(u=u.slice(0,n)),h5(u,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(e){let n=WA(e,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:a,i:l,n:c})=>{if(!yr(a))return;let{isMatch:u,score:d,indices:f}=n.searchIn(a);u&&o.push({item:a,idx:l,matches:[{score:d,value:a,norm:c,indices:f}]})}),o}_searchLogical(e){let n=ow(e,this.options),r=(c,u,d)=>{if(!c.children){let{keyId:p,searcher:A}=c,b=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(u,p),searcher:A});return b&&b.length?[{idx:d,item:u,matches:b}]:[]}let f=[];for(let p=0,A=c.children.length;p<A;p+=1){let b=c.children[p],y=r(b,u,d);if(y.length)f.push(...y);else if(c.operator===Fd.AND)return[]}return f},o=this._myIndex.records,a={},l=[];return o.forEach(({$:c,i:u})=>{if(yr(c)){let d=r(n,c,u);d.length&&(a[u]||(a[u]={idx:u,item:c,matches:[]},l.push(a[u])),d.forEach(({matches:f})=>{a[u].matches.push(...f)}))}}),l}_searchObjectList(e){let n=WA(e,this.options),{keys:r,records:o}=this._myIndex,a=[];return o.forEach(({$:l,i:c})=>{if(!yr(l))return;let u=[];r.forEach((d,f)=>{u.push(...this._findMatches({key:d,value:l[f],searcher:n}))}),u.length&&a.push({idx:c,item:l,matches:u})}),a}_findMatches({key:e,value:n,searcher:r}){if(!yr(n))return[];let o=[];if(ua(n))n.forEach(({v:a,i:l,n:c})=>{if(!yr(a))return;let{isMatch:u,score:d,indices:f}=r.searchIn(a);u&&o.push({score:d,key:e,value:a,idx:l,norm:c,indices:f})});else{let{v:a,n:l}=n,{isMatch:c,score:u,indices:d}=r.searchIn(a);c&&o.push({score:u,key:e,value:a,norm:l,indices:d})}return o}};Ja.version="7.1.0";Ja.createIndex=rw;Ja.parseIndex=ZI;Ja.config=Ye;Ja.parseQuery=ow;i5(UA);A5=["software_name","software_description","software_web_page","software_documentation","software_use_link"]});var dw={};xu(dw,{default:()=>C5});function cw({active:t,tagCategory:e,tagId:n,iconUri:r,name:o,toggleTag:a}){let l=r||y5[o]||"tag";return E.jsx("li",{className:`tag tag-category-${e.name.toLowerCase().replace(/[^a-z]+/g,"-")}${t.tagIds.has(n)?" active":""}`,children:E.jsxs("button",{href:"#",disabled:t.disabledTagIds.has(n),onClick:c=>{c.preventDefault(),a(n)},children:[l.startsWith("http")?E.jsx(ct,{alt:o,src:l}):E.jsx(ct,{name:l}),o]})})}function uw({children:t}){return E.jsx("ul",{className:"tags",children:t})}function v5({active:t,baseUri:e,description:n,imageType:r,imageUri:o,name:a,infoGroupId:l,tags:c,toggleTag:u}){let d=`${e}/${l}`;return E.jsxs("div",{className:"resource-group",children:[E.jsx("a",{className:`resource-group-image image-type-${r}`,href:d,children:o?E.jsx("img",{src:o}):E.jsx(ct,{name:"motherboard"})}),E.jsxs("div",{className:"resource-group-text",children:[E.jsx("h3",{children:E.jsx("a",{href:d,children:a})}),E.jsx(uw,{children:c.map(f=>E.jsx(cw,{...f,active:t,toggleTag:u},f.tagId))}),E.jsxs("p",{children:[n&&n,E.jsx("br",{}),E.jsxs("a",{href:d,children:["Learn more about ",a," \xBB"]})]})]})]})}function x5({active:t,baseUri:e,name:n,resourceGroups:r,toggleTag:o}){return E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:n}),r.filter(({infoGroupId:a})=>t.infoGroupIds.has(a)).map(a=>E.jsx(v5,{...a,baseUri:e,active:t,toggleTag:o},a.infoGroupId))]})}function w5({active:t,clearTags:e,tagCategories:n,toggleTag:r}){let[o,a]=_.useState(!1),l=_.useRef(null);return _.useEffect(()=>{let c=()=>a(!1);return document.body.addEventListener("click",c),()=>document.body.removeEventListener("click",c)},[]),E.jsxs("section",{className:"filters-outer",onClick:c=>{c.stopPropagation()},children:[E.jsxs("button",{ref:l,onClick:()=>a(!o),className:`btn-filters btn ${o?"active":""}`,children:[E.jsx(ct,{name:"filter"})," Filters",t.tagIds.size>0?E.jsx("span",{className:"active-tag-count",children:t.tagIds.size}):null]}),o?E.jsxs("div",{className:"filters-inner",children:[n.map(c=>E.jsxs(E.Fragment,{children:[E.jsx("h2",{children:c.name}),E.jsx(uw,{children:c.tags.map(u=>E.jsx(cw,{...u,active:t,toggleTag:r}))})]})),E.jsxs("button",{onClick:e,disabled:t.tagIds.size==0,className:"btn danger",children:[E.jsx(ct,{name:"trash"})," Clear Filters"]})]}):null]})}function k5({setBotOpen:t}){let e=_.useRef(null),n=[{title:"Browse resources",icon:"filter-square",description:"Filter resources to find the best match for your research.",onClick:r=>{r.preventDefault(),e.current&&e.current.nextSibling.scrollIntoView({bahavior:"smooth"})}},{title:"Ask a question",icon:"question-circle",onClick:r=>{r.preventDefault(),t(!0)},description:"You have resource questions. Our Q&A bot has answers!",login:!0},{title:"Get suggestions",icon:"card-checklist",href:"https://ara.access-ci.org/",description:"Fill out a form to get resource recommendations."},{title:"Read news",icon:"newspaper",href:"https://access-ci.org/tag/resource-providers/",description:"See the latest news from resource providers."}];return E.jsxs("section",{id:"resource-pathways",ref:e,children:[E.jsxs("p",{className:"intro",children:["ACCESS provides advanced computing resources ",E.jsx("strong",{children:"at no cost"})," ","to researchers and educators."]}),E.jsx("ul",{className:"resource-pathways",children:n.map(({title:r,icon:o,href:a,description:l,login:c,onClick:u},d)=>E.jsx("li",{className:`resource-pathway-${d}`,children:E.jsxs("a",{href:a||"#",onClick:u,children:[o?E.jsx(ct,{name:o}):null," ",E.jsxs("span",{className:"detail",children:[E.jsx("span",{className:"title",children:r}),E.jsx("span",{className:"description",children:l}),c?E.jsxs("span",{className:"login",children:[E.jsx(ct,{name:"key"})," Requires ACCESS Login"]}):null]})]})},r))})]})}function C5({baseUri:t,title:e,setBotOpen:n,showBreadcrumbs:r=!0,showTitle:o=!0}){let[a,l]=_.useState([]),c=bg(),u=_.useMemo(()=>c?fw(c,a):null,[c,a]),d=p=>l(a.includes(p)?a.filter(A=>A!=p):[...a,p]),f=()=>l([]);return E.jsxs(E.Fragment,{children:[r&&E.jsx(fc,{expandWidth:!0,items:[{name:"Resources"}],topBorder:!0}),e&&E.jsx("h1",{className:o?"":"visually-hidden",children:e}),E.jsx(k5,{setBotOpen:n}),E.jsxs("div",{id:"browse-resources",children:[u?E.jsx(w5,{tagCategories:c.tagCategories,active:u,clearTags:f,toggleTag:d}):null,c?c.resourceCategories.filter(({resourceCategoryId:p})=>u.resourceCategoryIds.has(p)).map(p=>E.jsx(x5,{...p,active:u,baseUri:t,clearTags:f,toggleTag:d},p.name)):null]})]})}var y5,hw=Bl(()=>{_s();jp();y5={"ACCESS Pegasus":"https://pegasus.isi.edu/wordpress/wp-content/uploads/2016/01/favicon.ico","ACCESS OnDemand":"https://openondemand.org/themes/fire/theme/assets/media/favicons/favicon.ico","Advance reservations":"calendar-check","Composable hardware fabric":"boxes","Compute Resources":"cpu-fill","CPU Compute":"cpu-fill","GPU Compute":"cpu","Innovative / Novel Compute":"lightbulb","Large Memory Nodes":"arrows-fullscreen",Preemption:"clock-history","Science Gateway support":"globe","Service / Other":"stars","Storage Resources":"hdd-fill","Virtual Machines":"pc-display-horizontal",Cloud:"cloud",Storage:"hdd-fill"}});function Lp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function E5(){if(gw)return st;gw=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function A(I){return I===null||typeof I!="object"?null:(I=p&&I[p]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,k={};function w(I,J,ye){this.props=I,this.context=J,this.refs=k,this.updater=ye||b}w.prototype.isReactComponent={},w.prototype.setState=function(I,J){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,J,"setState")},w.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function S(){}S.prototype=w.prototype;function M(I,J,ye){this.props=I,this.context=J,this.refs=k,this.updater=ye||b}var T=M.prototype=new S;T.constructor=M,y(T,w.prototype),T.isPureReactComponent=!0;var P=Array.isArray,R=Object.prototype.hasOwnProperty,F={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function U(I,J,ye){var ge,Ee={},De=null,je=null;if(J!=null)for(ge in J.ref!==void 0&&(je=J.ref),J.key!==void 0&&(De=""+J.key),J)R.call(J,ge)&&!V.hasOwnProperty(ge)&&(Ee[ge]=J[ge]);var ze=arguments.length-2;if(ze===1)Ee.children=ye;else if(1<ze){for(var Re=Array(ze),$e=0;$e<ze;$e++)Re[$e]=arguments[$e+2];Ee.children=Re}if(I&&I.defaultProps)for(ge in ze=I.defaultProps,ze)Ee[ge]===void 0&&(Ee[ge]=ze[ge]);return{$$typeof:t,type:I,key:De,ref:je,props:Ee,_owner:F.current}}function G(I,J){return{$$typeof:t,type:I.type,key:J,ref:I.ref,props:I.props,_owner:I._owner}}function W(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function X(I){var J={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(ye){return J[ye]})}var Y=/\/+/g;function ae(I,J){return typeof I=="object"&&I!==null&&I.key!=null?X(""+I.key):J.toString(36)}function pe(I,J,ye,ge,Ee){var De=typeof I;(De==="undefined"||De==="boolean")&&(I=null);var je=!1;if(I===null)je=!0;else switch(De){case"string":case"number":je=!0;break;case"object":switch(I.$$typeof){case t:case e:je=!0}}if(je)return je=I,Ee=Ee(je),I=ge===""?"."+ae(je,0):ge,P(Ee)?(ye="",I!=null&&(ye=I.replace(Y,"$&/")+"/"),pe(Ee,J,ye,"",function($e){return $e})):Ee!=null&&(W(Ee)&&(Ee=G(Ee,ye+(!Ee.key||je&&je.key===Ee.key?"":(""+Ee.key).replace(Y,"$&/")+"/")+I)),J.push(Ee)),1;if(je=0,ge=ge===""?".":ge+":",P(I))for(var ze=0;ze<I.length;ze++){De=I[ze];var Re=ge+ae(De,ze);je+=pe(De,J,ye,Re,Ee)}else if(Re=A(I),typeof Re=="function")for(I=Re.call(I),ze=0;!(De=I.next()).done;)De=De.value,Re=ge+ae(De,ze++),je+=pe(De,J,ye,Re,Ee);else if(De==="object")throw J=String(I),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.");return je}function de(I,J,ye){if(I==null)return I;var ge=[],Ee=0;return pe(I,ge,"","",function(De){return J.call(ye,De,Ee++)}),ge}function le(I){if(I._status===-1){var J=I._result;J=J(),J.then(function(ye){(I._status===0||I._status===-1)&&(I._status=1,I._result=ye)},function(ye){(I._status===0||I._status===-1)&&(I._status=2,I._result=ye)}),I._status===-1&&(I._status=0,I._result=J)}if(I._status===1)return I._result.default;throw I._result}var he={current:null},Z={transition:null},L={ReactCurrentDispatcher:he,ReactCurrentBatchConfig:Z,ReactCurrentOwner:F};function ce(){throw Error("act(...) is not supported in production builds of React.")}return st.Children={map:de,forEach:function(I,J,ye){de(I,function(){J.apply(this,arguments)},ye)},count:function(I){var J=0;return de(I,function(){J++}),J},toArray:function(I){return de(I,function(J){return J})||[]},only:function(I){if(!W(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},st.Component=w,st.Fragment=n,st.Profiler=o,st.PureComponent=M,st.StrictMode=r,st.Suspense=u,st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,st.act=ce,st.cloneElement=function(I,J,ye){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var ge=y({},I.props),Ee=I.key,De=I.ref,je=I._owner;if(J!=null){if(J.ref!==void 0&&(De=J.ref,je=F.current),J.key!==void 0&&(Ee=""+J.key),I.type&&I.type.defaultProps)var ze=I.type.defaultProps;for(Re in J)R.call(J,Re)&&!V.hasOwnProperty(Re)&&(ge[Re]=J[Re]===void 0&&ze!==void 0?ze[Re]:J[Re])}var Re=arguments.length-2;if(Re===1)ge.children=ye;else if(1<Re){ze=Array(Re);for(var $e=0;$e<Re;$e++)ze[$e]=arguments[$e+2];ge.children=ze}return{$$typeof:t,type:I.type,key:Ee,ref:De,props:ge,_owner:je}},st.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:a,_context:I},I.Consumer=I},st.createElement=U,st.createFactory=function(I){var J=U.bind(null,I);return J.type=I,J},st.createRef=function(){return{current:null}},st.forwardRef=function(I){return{$$typeof:c,render:I}},st.isValidElement=W,st.lazy=function(I){return{$$typeof:f,_payload:{_status:-1,_result:I},_init:le}},st.memo=function(I,J){return{$$typeof:d,type:I,compare:J===void 0?null:J}},st.startTransition=function(I){var J=Z.transition;Z.transition={};try{I()}finally{Z.transition=J}},st.unstable_act=ce,st.useCallback=function(I,J){return he.current.useCallback(I,J)},st.useContext=function(I){return he.current.useContext(I)},st.useDebugValue=function(){},st.useDeferredValue=function(I){return he.current.useDeferredValue(I)},st.useEffect=function(I,J){return he.current.useEffect(I,J)},st.useId=function(){return he.current.useId()},st.useImperativeHandle=function(I,J,ye){return he.current.useImperativeHandle(I,J,ye)},st.useInsertionEffect=function(I,J){return he.current.useInsertionEffect(I,J)},st.useLayoutEffect=function(I,J){return he.current.useLayoutEffect(I,J)},st.useMemo=function(I,J){return he.current.useMemo(I,J)},st.useReducer=function(I,J,ye){return he.current.useReducer(I,J,ye)},st.useRef=function(I){return he.current.useRef(I)},st.useState=function(I){return he.current.useState(I)},st.useSyncExternalStore=function(I,J,ye){return he.current.useSyncExternalStore(I,J,ye)},st.useTransition=function(){return he.current.useTransition()},st.version="18.3.1",st}function Ms(){return mw||(mw=1,Aw.exports=E5()),Aw.exports}function S5(){if(bw)return pc;bw=1;var t=Ms(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(c,u,d){var f,p={},A=null,b=null;d!==void 0&&(A=""+d),u.key!==void 0&&(A=""+u.key),u.ref!==void 0&&(b=u.ref);for(f in u)r.call(u,f)&&!a.hasOwnProperty(f)&&(p[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:e,type:c,key:A,ref:b,props:p,_owner:o.current}}return pc.Fragment=n,pc.jsx=l,pc.jsxs=l,pc}function P5(){return yw||(yw=1,pw.exports=S5()),pw.exports}function fc({expandWidth:t=!1,homeTitle:e="ACCESS Home",homeUrl:n="https://access-ci.org/",items:r=[],topBorder:o=!1}){if(!(!r||!r.length))return E.jsxs("ul",{className:`breadcrumbs ${t?"expand":""} ${o?"top-border":""}`,children:[E.jsx("li",{className:"home",children:E.jsx("a",{href:n,title:e,children:E.jsx("img",{src:D5,alt:e,height:"14"})})},"home"),r.map(a=>E.jsx("li",{className:a.classes||"",children:a.href?E.jsx("a",{href:a.href,children:a.name}):a.name},a.name))]})}function B5(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t.length!==e.length||t.some((n,r)=>!Object.is(n,e[r]))}function j5(){return ww||(ww=1,function(t){function e(Z,L){var ce=Z.length;Z.push(L);e:for(;0<ce;){var I=ce-1>>>1,J=Z[I];if(0<o(J,L))Z[I]=L,Z[ce]=J,ce=I;else break e}}function n(Z){return Z.length===0?null:Z[0]}function r(Z){if(Z.length===0)return null;var L=Z[0],ce=Z.pop();if(ce!==L){Z[0]=ce;e:for(var I=0,J=Z.length,ye=J>>>1;I<ye;){var ge=2*(I+1)-1,Ee=Z[ge],De=ge+1,je=Z[De];if(0>o(Ee,ce))De<J&&0>o(je,Ee)?(Z[I]=je,Z[De]=ce,I=De):(Z[I]=Ee,Z[ge]=ce,I=ge);else if(De<J&&0>o(je,ce))Z[I]=je,Z[De]=ce,I=De;else break e}}return L}function o(Z,L){var ce=Z.sortIndex-L.sortIndex;return ce!==0?ce:Z.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}var u=[],d=[],f=1,p=null,A=3,b=!1,y=!1,k=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(Z){for(var L=n(d);L!==null;){if(L.callback===null)r(d);else if(L.startTime<=Z)r(d),L.sortIndex=L.expirationTime,e(u,L);else break;L=n(d)}}function P(Z){if(k=!1,T(Z),!y)if(n(u)!==null)y=!0,le(R);else{var L=n(d);L!==null&&he(P,L.startTime-Z)}}function R(Z,L){y=!1,k&&(k=!1,S(U),U=-1),b=!0;var ce=A;try{for(T(L),p=n(u);p!==null&&(!(p.expirationTime>L)||Z&&!X());){var I=p.callback;if(typeof I=="function"){p.callback=null,A=p.priorityLevel;var J=I(p.expirationTime<=L);L=t.unstable_now(),typeof J=="function"?p.callback=J:p===n(u)&&r(u),T(L)}else r(u);p=n(u)}if(p!==null)var ye=!0;else{var ge=n(d);ge!==null&&he(P,ge.startTime-L),ye=!1}return ye}finally{p=null,A=ce,b=!1}}var F=!1,V=null,U=-1,G=5,W=-1;function X(){return!(t.unstable_now()-W<G)}function Y(){if(V!==null){var Z=t.unstable_now();W=Z;var L=!0;try{L=V(!0,Z)}finally{L?ae():(F=!1,V=null)}}else F=!1}var ae;if(typeof M=="function")ae=function(){M(Y)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,de=pe.port2;pe.port1.onmessage=Y,ae=function(){de.postMessage(null)}}else ae=function(){w(Y,0)};function le(Z){V=Z,F||(F=!0,ae())}function he(Z,L){U=w(function(){Z(t.unstable_now())},L)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Z){Z.callback=null},t.unstable_continueExecution=function(){y||b||(y=!0,le(R))},t.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<Z?Math.floor(1e3/Z):5},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_getFirstCallbackNode=function(){return n(u)},t.unstable_next=function(Z){switch(A){case 1:case 2:case 3:var L=3;break;default:L=A}var ce=A;A=L;try{return Z()}finally{A=ce}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Z,L){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var ce=A;A=Z;try{return L()}finally{A=ce}},t.unstable_scheduleCallback=function(Z,L,ce){var I=t.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?I+ce:I):ce=I,Z){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=ce+J,Z={id:f++,callback:L,priorityLevel:Z,startTime:ce,expirationTime:J,sortIndex:-1},ce>I?(Z.sortIndex=ce,e(d,Z),n(u)===null&&Z===n(d)&&(k?(S(U),U=-1):k=!0,he(P,ce-I))):(Z.sortIndex=J,e(u,Z),y||b||(y=!0,le(R))),Z},t.unstable_shouldYield=X,t.unstable_wrapCallback=function(Z){var L=A;return function(){var ce=A;A=L;try{return Z.apply(this,arguments)}finally{A=ce}}}}(xw)),xw}function F5(){return kw||(kw=1,vw.exports=j5()),vw.exports}function R5(){if(Cw)return lr;Cw=1;var t=Ms(),e=F5();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,h=1;h<arguments.length;h++)s+="&args[]="+encodeURIComponent(arguments[h]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){l(i,s),l(i+"Capture",s)}function l(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function A(i){return u.call(p,i)?!0:u.call(f,i)?!1:d.test(i)?p[i]=!0:(f[i]=!0,!1)}function b(i,s,h,g){if(h!==null&&h.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return g?!1:h!==null?!h.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function y(i,s,h,g){if(s===null||typeof s>"u"||b(i,s,h,g))return!0;if(g)return!1;if(h!==null)switch(h.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(i,s,h,g,m,C,O){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=g,this.attributeNamespace=m,this.mustUseProperty=h,this.propertyName=i,this.type=s,this.sanitizeURL=C,this.removeEmptyString=O}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){w[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];w[s]=new k(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){w[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){w[i]=new k(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){w[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){w[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){w[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){w[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){w[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function M(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(S,M);w[s]=new k(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(S,M);w[s]=new k(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(S,M);w[s]=new k(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){w[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),w.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){w[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function T(i,s,h,g){var m=w.hasOwnProperty(s)?w[s]:null;(m!==null?m.type!==0:g||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(y(s,h,m,g)&&(h=null),g||m===null?A(s)&&(h===null?i.removeAttribute(s):i.setAttribute(s,""+h)):m.mustUseProperty?i[m.propertyName]=h===null?m.type===3?!1:"":h:(s=m.attributeName,g=m.attributeNamespace,h===null?i.removeAttribute(s):(m=m.type,h=m===3||m===4&&h===!0?"":""+h,g?i.setAttributeNS(g,s,h):i.setAttribute(s,h))))}var P=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Symbol.for("react.element"),F=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),X=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),pe=Symbol.for("react.suspense_list"),de=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),he=Symbol.for("react.offscreen"),Z=Symbol.iterator;function L(i){return i===null||typeof i!="object"?null:(i=Z&&i[Z]||i["@@iterator"],typeof i=="function"?i:null)}var ce=Object.assign,I;function J(i){if(I===void 0)try{throw Error()}catch(h){var s=h.stack.trim().match(/\n( *(at )?)/);I=s&&s[1]||""}return`
|