jplan-pack 0.6.532 → 0.6.561

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.
@@ -1,14 +1,14 @@
1
- "use strict";const c=require("vue"),tv=require("@vueuse/core"),Be=require("vuetify/lib/components/VBtn/index.mjs"),Ft=require("vuetify/components"),tc=require("vuetify/lib/components/VIcon/index.mjs"),lt=require("vuetify/lib/components/VCard/index.mjs"),Vs=require("vuetify/lib/components/VDialog/index.mjs"),fo=require("vuetify/lib/components/VDivider/index.mjs"),_e=require("vuetify/lib/components/VGrid/index.mjs"),nv=require("vuetify/lib/components/VAvatar/index.mjs"),rv=require("vuetify/lib/components/VImg/index.mjs"),Vt=require("vuetify/lib/components/VList/index.mjs"),ov=require("vuetify/lib/components/VMenu/index.mjs"),iv=require("vuetify/lib/components/VDataTable/index.mjs"),Ok=require("vuetify/lib/components/VTextField/index.mjs"),ra=require("vuetify/lib/components/VSelect/index.mjs"),Nk=require("vuetify/lib/components/VCheckbox/index.mjs"),Pk=require("vuetify/lib/components/VChip/index.mjs"),ha=require("vuetify/lib/components/VLabel/index.mjs"),Mk=require("vuetify/lib/components/VTextarea/index.mjs"),xk=require("vuetify/lib/components/VBtnToggle/index.mjs");function Dk(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const Lk=Dk(tv),Bk={key:0},Uk={key:1},Tc=c.defineComponent({__name:"CopyButton",props:{contentToCopy:{},size:{},color:{}},setup(r){const e=r,{copy:t,copied:n,isSupported:i}=tv.useClipboard();return(s,l)=>{const d=c.resolveComponent("CopyIcon");return c.unref(i)?(c.openBlock(),c.createElementBlock("span",Bk,[c.createVNode(Be.VBtn,{icon:"",variant:"text",onClick:l[0]||(l[0]=f=>c.unref(t)(e.contentToCopy)),size:s.size,color:s.color},{default:c.withCtx(()=>[c.createVNode(d,{size:s.size},null,8,["size"])]),_:1},8,["size","color"]),c.unref(n)?(c.openBlock(),c.createElementBlock("span",{key:0,style:c.normalizeStyle({fontSize:typeof e.size=="number"?e.size-4+"px":void 0}),class:"ms-1"}," Copied ",4)):c.createCommentVNode("",!0)])):(c.openBlock(),c.createElementBlock("p",Uk,"Your browser does not support Clipboard API"))}}}),mm=c.defineComponent({__name:"IconSet",props:{item:{},level:{default:0},size:{default:25},stroke:{default:1.5},color:{},svg:{default:null}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[typeof e.item=="object"&&"name"in e.item?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.item.name),{key:0,size:e.size,"stroke-width":e.stroke,color:e.color},null,8,["size","stroke-width","color"])):c.createCommentVNode("",!0),typeof e.item=="string"?(c.openBlock(),c.createBlock(tc.VIcon,{key:1,color:e.color,size:e.size},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.item),1)]),_:1},8,["color","size"])):c.createCommentVNode("",!0)],64))}}),av=c.defineComponent({__name:"JIconBtn",props:{variant:{default:"text"},icon:{},color:{default:"secondary"},tooltip:{},size:{}},emits:["click"],setup(r){const e=r,t=c.useSlots();return(n,i)=>n.tooltip?(c.openBlock(),c.createBlock(c.unref(Ft.VTooltip),{key:0,text:n.tooltip,"open-delay":"1000"},{activator:c.withCtx(({props:s})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps(s,{variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[0]||(i[0]=l=>n.$emit("click"))}),{default:c.withCtx(()=>[!c.unref(t).default&&s.icon?(c.openBlock(),c.createBlock(mm,{key:0,item:s.icon,size:s.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default")]),_:2},1040,["variant","color","size"])]),_:3},8,["text"])):(c.openBlock(),c.createBlock(c.unref(Ft.VBtn),{key:1,variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[1]||(i[1]=s=>n.$emit("click"))},{default:c.withCtx(()=>[!c.unref(t).default&&e.icon?(c.openBlock(),c.createBlock(mm,{key:0,item:e.icon,size:e.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default")]),_:3},8,["variant","color","size"]))}}),sv=c.defineComponent({__name:"JBtn",props:{variant:{default:"flat"},text:{},icon:{},color:{default:"secondary"},tooltip:{}},emits:["click"],setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VBtn),{"prepend-icon":e.icon,variant:e.variant,color:e.color,tooltip:e.tooltip,onClick:t[0]||(t[0]=n=>e.$emit("click"))},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.text)+" ",1),c.renderSlot(e.$slots,"default")]),_:3},8,["prepend-icon","variant","color","tooltip"]))}});var cv=!1;function Ts(r,e,t){return Array.isArray(r)?(r.length=Math.max(r.length,e),r.splice(e,1,t),t):(r[e]=t,t)}function Tu(r,e){if(Array.isArray(r)){r.splice(e,1);return}delete r[e]}function Vk(){return lv().__VUE_DEVTOOLS_GLOBAL_HOOK__}function lv(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Fk=typeof Proxy=="function",Hk="devtools-plugin:setup",$k="plugin:settings:set";let Uo,od;function Kk(){var r;return Uo!==void 0||(typeof window<"u"&&window.performance?(Uo=!0,od=window.performance):typeof globalThis<"u"&&(!((r=globalThis.perf_hooks)===null||r===void 0)&&r.performance)?(Uo=!0,od=globalThis.perf_hooks.performance):Uo=!1),Uo}function zk(){return Kk()?od.now():Date.now()}class Wk{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const l in e.settings){const d=e.settings[l];n[l]=d.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},n);try{const l=localStorage.getItem(i),d=JSON.parse(l);Object.assign(s,d)}catch{}this.fallbacks={getSettings(){return s},setSettings(l){try{localStorage.setItem(i,JSON.stringify(l))}catch{}s=l},now(){return zk()}},t&&t.on($k,(l,d)=>{l===this.plugin.id&&this.fallbacks.setSettings(d)}),this.proxiedOn=new Proxy({},{get:(l,d)=>this.target?this.target.on[d]:(...f)=>{this.onQueue.push({method:d,args:f})}}),this.proxiedTarget=new Proxy({},{get:(l,d)=>this.target?this.target[d]:d==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(d)?(...f)=>(this.targetQueue.push({method:d,args:f,resolve:()=>{}}),this.fallbacks[d](...f)):(...f)=>new Promise(g=>{this.targetQueue.push({method:d,args:f,resolve:g})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function uv(r,e){const t=r,n=lv(),i=Vk(),s=Fk&&t.enableEarlyProxy;if(i&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(Hk,r,e);else{const l=s?new Wk(t,i):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:l}),l&&e(l.proxiedTarget)}}/*!
1
+ "use strict";const c=require("vue"),Pd=require("@vueuse/core"),Be=require("vuetify/lib/components/VBtn/index.mjs"),Ft=require("vuetify/components"),Xs=require("vuetify/lib/components/VIcon/index.mjs"),lt=require("vuetify/lib/components/VCard/index.mjs"),Ls=require("vuetify/lib/components/VDialog/index.mjs"),fo=require("vuetify/lib/components/VDivider/index.mjs"),_e=require("vuetify/lib/components/VGrid/index.mjs"),Zp=require("vuetify/lib/components/VAvatar/index.mjs"),ev=require("vuetify/lib/components/VImg/index.mjs"),Vt=require("vuetify/lib/components/VList/index.mjs"),tv=require("vuetify/lib/components/VMenu/index.mjs"),nv=require("vuetify/lib/components/VDataTable/index.mjs"),kk=require("vuetify/lib/components/VTextField/index.mjs"),ta=require("vuetify/lib/components/VSelect/index.mjs"),Rk=require("vuetify/lib/components/VCheckbox/index.mjs"),Ok=require("vuetify/lib/components/VChip/index.mjs"),ua=require("vuetify/lib/components/VLabel/index.mjs"),Nk=require("vuetify/lib/components/VTextarea/index.mjs"),Pk=require("vuetify/lib/components/VBtnToggle/index.mjs");function Mk(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const xk=Mk(Pd),Dk={key:0},Lk={key:1},Cc=c.defineComponent({__name:"CopyButton",props:{contentToCopy:{},size:{},color:{}},setup(r){const e=r,{copy:t,copied:n,isSupported:i}=Pd.useClipboard();return(s,l)=>{const d=c.resolveComponent("CopyIcon");return c.unref(i)?(c.openBlock(),c.createElementBlock("span",Dk,[c.createVNode(Be.VBtn,{icon:"",variant:"text",onClick:l[0]||(l[0]=f=>c.unref(t)(e.contentToCopy)),size:s.size,color:s.color},{default:c.withCtx(()=>[c.createVNode(d,{size:s.size},null,8,["size"])]),_:1},8,["size","color"]),c.unref(n)?(c.openBlock(),c.createElementBlock("span",{key:0,style:c.normalizeStyle({fontSize:typeof e.size=="number"?e.size-4+"px":void 0}),class:"ms-1"}," Copied ",4)):c.createCommentVNode("",!0)])):(c.openBlock(),c.createElementBlock("p",Lk,"Your browser does not support Clipboard API"))}}}),fm=c.defineComponent({__name:"IconSet",props:{item:{},level:{default:0},size:{default:25},stroke:{default:1.5},color:{},svg:{default:null}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[typeof e.item=="object"&&"name"in e.item?(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.item.name),{key:0,size:e.size,"stroke-width":e.stroke,color:e.color},null,8,["size","stroke-width","color"])):c.createCommentVNode("",!0),typeof e.item=="string"?(c.openBlock(),c.createBlock(Xs.VIcon,{key:1,color:e.color,size:e.size},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.item),1)]),_:1},8,["color","size"])):c.createCommentVNode("",!0)],64))}}),rv=c.defineComponent({__name:"JIconBtn",props:{variant:{default:"text"},icon:{},color:{default:"secondary"},tooltip:{},size:{}},emits:["click"],setup(r){const e=r,t=c.useSlots();return(n,i)=>n.tooltip?(c.openBlock(),c.createBlock(c.unref(Ft.VTooltip),{key:0,text:n.tooltip,"open-delay":"1000"},{activator:c.withCtx(({props:s})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps(s,{variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[0]||(i[0]=l=>n.$emit("click"))}),{default:c.withCtx(()=>[!c.unref(t).default&&s.icon?(c.openBlock(),c.createBlock(fm,{key:0,item:s.icon,size:s.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default")]),_:2},1040,["variant","color","size"])]),_:3},8,["text"])):(c.openBlock(),c.createBlock(c.unref(Ft.VBtn),{key:1,variant:n.variant,color:n.color,icon:"",size:n.size,onClick:i[1]||(i[1]=s=>n.$emit("click"))},{default:c.withCtx(()=>[!c.unref(t).default&&e.icon?(c.openBlock(),c.createBlock(fm,{key:0,item:e.icon,size:e.size},null,8,["item","size"])):c.createCommentVNode("",!0),c.renderSlot(n.$slots,"default")]),_:3},8,["variant","color","size"]))}}),ov=c.defineComponent({__name:"JBtn",props:{variant:{default:"flat"},text:{},icon:{},color:{default:"secondary"},tooltip:{}},emits:["click"],setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VBtn),{"prepend-icon":e.icon,variant:e.variant,color:e.color,tooltip:e.tooltip,onClick:t[0]||(t[0]=n=>e.$emit("click"))},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.text)+" ",1),c.renderSlot(e.$slots,"default")]),_:3},8,["prepend-icon","variant","color","tooltip"]))}});var iv=!1;function ws(r,e,t){return Array.isArray(r)?(r.length=Math.max(r.length,e),r.splice(e,1,t),t):(r[e]=t,t)}function yu(r,e){if(Array.isArray(r)){r.splice(e,1);return}delete r[e]}function Bk(){return av().__VUE_DEVTOOLS_GLOBAL_HOOK__}function av(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Uk=typeof Proxy=="function",Vk="devtools-plugin:setup",Fk="plugin:settings:set";let Uo,ed;function Hk(){var r;return Uo!==void 0||(typeof window<"u"&&window.performance?(Uo=!0,ed=window.performance):typeof globalThis<"u"&&(!((r=globalThis.perf_hooks)===null||r===void 0)&&r.performance)?(Uo=!0,ed=globalThis.perf_hooks.performance):Uo=!1),Uo}function $k(){return Hk()?ed.now():Date.now()}class Kk{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const l in e.settings){const d=e.settings[l];n[l]=d.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},n);try{const l=localStorage.getItem(i),d=JSON.parse(l);Object.assign(s,d)}catch{}this.fallbacks={getSettings(){return s},setSettings(l){try{localStorage.setItem(i,JSON.stringify(l))}catch{}s=l},now(){return $k()}},t&&t.on(Fk,(l,d)=>{l===this.plugin.id&&this.fallbacks.setSettings(d)}),this.proxiedOn=new Proxy({},{get:(l,d)=>this.target?this.target.on[d]:(...f)=>{this.onQueue.push({method:d,args:f})}}),this.proxiedTarget=new Proxy({},{get:(l,d)=>this.target?this.target[d]:d==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(d)?(...f)=>(this.targetQueue.push({method:d,args:f,resolve:()=>{}}),this.fallbacks[d](...f)):(...f)=>new Promise(g=>{this.targetQueue.push({method:d,args:f,resolve:g})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function sv(r,e){const t=r,n=av(),i=Bk(),s=Uk&&t.enableEarlyProxy;if(i&&(n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(Vk,r,e);else{const l=s?new Kk(t,i):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:l}),l&&e(l.proxiedTarget)}}/*!
2
2
  * pinia v2.2.6
3
3
  * (c) 2024 Eduardo San Martin Morote
4
4
  * @license MIT
5
- */let Qi;const fa=r=>Qi=r,dv=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function di(r){return r&&typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"&&typeof r.toJSON!="function"}var Zn;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Zn||(Zn={}));const co=typeof window<"u",pm=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function qk(r,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}function Ld(r,e,t){const n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){gv(n.response,e,t)},n.onerror=function(){console.error("could not download file")},n.send()}function hv(r){const e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Fs(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}const Hs=typeof navigator=="object"?navigator:{userAgent:""},fv=/Macintosh/.test(Hs.userAgent)&&/AppleWebKit/.test(Hs.userAgent)&&!/Safari/.test(Hs.userAgent),gv=co?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!fv?Gk:"msSaveOrOpenBlob"in Hs?jk:Yk:()=>{};function Gk(r,e="download",t){const n=document.createElement("a");n.download=e,n.rel="noopener",typeof r=="string"?(n.href=r,n.origin!==location.origin?hv(n.href)?Ld(r,e,t):(n.target="_blank",Fs(n)):Fs(n)):(n.href=URL.createObjectURL(r),setTimeout(function(){URL.revokeObjectURL(n.href)},4e4),setTimeout(function(){Fs(n)},0))}function jk(r,e="download",t){if(typeof r=="string")if(hv(r))Ld(r,e,t);else{const n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Fs(n)})}else navigator.msSaveOrOpenBlob(qk(r,t),e)}function Yk(r,e,t,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return Ld(r,e,t);const i=r.type==="application/octet-stream",s=/constructor/i.test(String(pm.HTMLElement))||"safari"in pm,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&s||fv)&&typeof FileReader<"u"){const d=new FileReader;d.onloadend=function(){let f=d.result;if(typeof f!="string")throw n=null,new Error("Wrong reader.result type");f=l?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=f:location.assign(f),n=null},d.readAsDataURL(r)}else{const d=URL.createObjectURL(r);n?n.location.assign(d):location.href=d,n=null,setTimeout(function(){URL.revokeObjectURL(d)},4e4)}}function ut(r,e){const t="🍍 "+r;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function Bd(r){return"_a"in r&&"install"in r}function mv(){if(!("clipboard"in navigator))return ut("Your browser doesn't support the Clipboard API","error"),!0}function pv(r){return r instanceof Error&&r.message.toLowerCase().includes("document is not focused")?(ut('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Jk(r){if(!mv())try{await navigator.clipboard.writeText(JSON.stringify(r.state.value)),ut("Global state copied to clipboard.")}catch(e){if(pv(e))return;ut("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function Qk(r){if(!mv())try{vv(r,JSON.parse(await navigator.clipboard.readText())),ut("Global state pasted from clipboard.")}catch(e){if(pv(e))return;ut("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function Xk(r){try{gv(new Blob([JSON.stringify(r.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){ut("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let mr;function Zk(){mr||(mr=document.createElement("input"),mr.type="file",mr.accept=".json");function r(){return new Promise((e,t)=>{mr.onchange=async()=>{const n=mr.files;if(!n)return e(null);const i=n.item(0);return e(i?{text:await i.text(),file:i}:null)},mr.oncancel=()=>e(null),mr.onerror=t,mr.click()})}return r}async function eR(r){try{const t=await Zk()();if(!t)return;const{text:n,file:i}=t;vv(r,JSON.parse(n)),ut(`Global state imported from "${i.name}".`)}catch(e){ut("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function vv(r,e){for(const t in e){const n=r.state.value[t];n?Object.assign(n,e[t]):r.state.value[t]=e[t]}}function xn(r){return{_custom:{display:r}}}const yv="🍍 Pinia (root)",$s="_root";function tR(r){return Bd(r)?{id:$s,label:yv}:{id:r.$id,label:r.$id}}function nR(r){if(Bd(r)){const t=Array.from(r._s.keys()),n=r._s;return{state:t.map(s=>({editable:!0,key:s,value:r.state.value[s]})),getters:t.filter(s=>n.get(s)._getters).map(s=>{const l=n.get(s);return{editable:!1,key:s,value:l._getters.reduce((d,f)=>(d[f]=l[f],d),{})}})}}const e={state:Object.keys(r.$state).map(t=>({editable:!0,key:t,value:r.$state[t]}))};return r._getters&&r._getters.length&&(e.getters=r._getters.map(t=>({editable:!1,key:t,value:r[t]}))),r._customProperties.size&&(e.customProperties=Array.from(r._customProperties).map(t=>({editable:!0,key:t,value:r[t]}))),e}function rR(r){return r?Array.isArray(r)?r.reduce((e,t)=>(e.keys.push(t.key),e.operations.push(t.type),e.oldValue[t.key]=t.oldValue,e.newValue[t.key]=t.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:xn(r.type),key:xn(r.key),oldValue:r.oldValue,newValue:r.newValue}:{}}function oR(r){switch(r){case Zn.direct:return"mutation";case Zn.patchFunction:return"$patch";case Zn.patchObject:return"$patch";default:return"unknown"}}let ri=!0;const Ks=[],io="pinia:mutations",At="pinia",{assign:iR}=Object,nc=r=>"🍍 "+r;function aR(r,e){uv({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ks,app:r},t=>{typeof t.now!="function"&&ut("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:io,label:"Pinia 🍍",color:15064968}),t.addInspector({id:At,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Jk(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Qk(e),t.sendInspectorTree(At),t.sendInspectorState(At)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Xk(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await eR(e),t.sendInspectorTree(At),t.sendInspectorState(At)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:n=>{const i=e._s.get(n);i?typeof i.$reset!="function"?ut(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`,"warn"):(i.$reset(),ut(`Store "${n}" reset.`)):ut(`Cannot reset "${n}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((n,i)=>{const s=n.componentInstance&&n.componentInstance.proxy;if(s&&s._pStores){const l=n.componentInstance.proxy._pStores;Object.values(l).forEach(d=>{n.instanceData.state.push({type:nc(d.$id),key:"state",editable:!0,value:d._isOptionsAPI?{_custom:{value:c.toRaw(d.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>d.$reset()}]}}:Object.keys(d.$state).reduce((f,g)=>(f[g]=d.$state[g],f),{})}),d._getters&&d._getters.length&&n.instanceData.state.push({type:nc(d.$id),key:"getters",editable:!1,value:d._getters.reduce((f,g)=>{try{f[g]=d[g]}catch(m){f[g]=m}return f},{})})})}}),t.on.getInspectorTree(n=>{if(n.app===r&&n.inspectorId===At){let i=[e];i=i.concat(Array.from(e._s.values())),n.rootNodes=(n.filter?i.filter(s=>"$id"in s?s.$id.toLowerCase().includes(n.filter.toLowerCase()):yv.toLowerCase().includes(n.filter.toLowerCase())):i).map(tR)}}),globalThis.$pinia=e,t.on.getInspectorState(n=>{if(n.app===r&&n.inspectorId===At){const i=n.nodeId===$s?e:e._s.get(n.nodeId);if(!i)return;i&&(n.nodeId!==$s&&(globalThis.$store=c.toRaw(i)),n.state=nR(i))}}),t.on.editInspectorState((n,i)=>{if(n.app===r&&n.inspectorId===At){const s=n.nodeId===$s?e:e._s.get(n.nodeId);if(!s)return ut(`store "${n.nodeId}" not found`,"error");const{path:l}=n;Bd(s)?l.unshift("state"):(l.length!==1||!s._customProperties.has(l[0])||l[0]in s.$state)&&l.unshift("$state"),ri=!1,n.set(s,l,n.state.value),ri=!0}}),t.on.editComponentState(n=>{if(n.type.startsWith("🍍")){const i=n.type.replace(/^🍍\s*/,""),s=e._s.get(i);if(!s)return ut(`store "${i}" not found`,"error");const{path:l}=n;if(l[0]!=="state")return ut(`Invalid path for store "${i}":
5
+ */let Yi;const da=r=>Yi=r,cv=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function di(r){return r&&typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"&&typeof r.toJSON!="function"}var Zn;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Zn||(Zn={}));const co=typeof window<"u",gm=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function zk(r,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}function Md(r,e,t){const n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){dv(n.response,e,t)},n.onerror=function(){console.error("could not download file")},n.send()}function lv(r){const e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Bs(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}const Us=typeof navigator=="object"?navigator:{userAgent:""},uv=/Macintosh/.test(Us.userAgent)&&/AppleWebKit/.test(Us.userAgent)&&!/Safari/.test(Us.userAgent),dv=co?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!uv?Wk:"msSaveOrOpenBlob"in Us?qk:Gk:()=>{};function Wk(r,e="download",t){const n=document.createElement("a");n.download=e,n.rel="noopener",typeof r=="string"?(n.href=r,n.origin!==location.origin?lv(n.href)?Md(r,e,t):(n.target="_blank",Bs(n)):Bs(n)):(n.href=URL.createObjectURL(r),setTimeout(function(){URL.revokeObjectURL(n.href)},4e4),setTimeout(function(){Bs(n)},0))}function qk(r,e="download",t){if(typeof r=="string")if(lv(r))Md(r,e,t);else{const n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Bs(n)})}else navigator.msSaveOrOpenBlob(zk(r,t),e)}function Gk(r,e,t,n){if(n=n||open("","_blank"),n&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return Md(r,e,t);const i=r.type==="application/octet-stream",s=/constructor/i.test(String(gm.HTMLElement))||"safari"in gm,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||i&&s||uv)&&typeof FileReader<"u"){const d=new FileReader;d.onloadend=function(){let f=d.result;if(typeof f!="string")throw n=null,new Error("Wrong reader.result type");f=l?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=f:location.assign(f),n=null},d.readAsDataURL(r)}else{const d=URL.createObjectURL(r);n?n.location.assign(d):location.href=d,n=null,setTimeout(function(){URL.revokeObjectURL(d)},4e4)}}function ut(r,e){const t="🍍 "+r;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function xd(r){return"_a"in r&&"install"in r}function hv(){if(!("clipboard"in navigator))return ut("Your browser doesn't support the Clipboard API","error"),!0}function fv(r){return r instanceof Error&&r.message.toLowerCase().includes("document is not focused")?(ut('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function jk(r){if(!hv())try{await navigator.clipboard.writeText(JSON.stringify(r.state.value)),ut("Global state copied to clipboard.")}catch(e){if(fv(e))return;ut("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function Yk(r){if(!hv())try{gv(r,JSON.parse(await navigator.clipboard.readText())),ut("Global state pasted from clipboard.")}catch(e){if(fv(e))return;ut("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function Jk(r){try{dv(new Blob([JSON.stringify(r.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){ut("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let mr;function Qk(){mr||(mr=document.createElement("input"),mr.type="file",mr.accept=".json");function r(){return new Promise((e,t)=>{mr.onchange=async()=>{const n=mr.files;if(!n)return e(null);const i=n.item(0);return e(i?{text:await i.text(),file:i}:null)},mr.oncancel=()=>e(null),mr.onerror=t,mr.click()})}return r}async function Xk(r){try{const t=await Qk()();if(!t)return;const{text:n,file:i}=t;gv(r,JSON.parse(n)),ut(`Global state imported from "${i.name}".`)}catch(e){ut("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function gv(r,e){for(const t in e){const n=r.state.value[t];n?Object.assign(n,e[t]):r.state.value[t]=e[t]}}function xn(r){return{_custom:{display:r}}}const mv="🍍 Pinia (root)",Vs="_root";function Zk(r){return xd(r)?{id:Vs,label:mv}:{id:r.$id,label:r.$id}}function eR(r){if(xd(r)){const t=Array.from(r._s.keys()),n=r._s;return{state:t.map(s=>({editable:!0,key:s,value:r.state.value[s]})),getters:t.filter(s=>n.get(s)._getters).map(s=>{const l=n.get(s);return{editable:!1,key:s,value:l._getters.reduce((d,f)=>(d[f]=l[f],d),{})}})}}const e={state:Object.keys(r.$state).map(t=>({editable:!0,key:t,value:r.$state[t]}))};return r._getters&&r._getters.length&&(e.getters=r._getters.map(t=>({editable:!1,key:t,value:r[t]}))),r._customProperties.size&&(e.customProperties=Array.from(r._customProperties).map(t=>({editable:!0,key:t,value:r[t]}))),e}function tR(r){return r?Array.isArray(r)?r.reduce((e,t)=>(e.keys.push(t.key),e.operations.push(t.type),e.oldValue[t.key]=t.oldValue,e.newValue[t.key]=t.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:xn(r.type),key:xn(r.key),oldValue:r.oldValue,newValue:r.newValue}:{}}function nR(r){switch(r){case Zn.direct:return"mutation";case Zn.patchFunction:return"$patch";case Zn.patchObject:return"$patch";default:return"unknown"}}let ri=!0;const Fs=[],io="pinia:mutations",At="pinia",{assign:rR}=Object,Zs=r=>"🍍 "+r;function oR(r,e){sv({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Fs,app:r},t=>{typeof t.now!="function"&&ut("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:io,label:"Pinia 🍍",color:15064968}),t.addInspector({id:At,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{jk(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Yk(e),t.sendInspectorTree(At),t.sendInspectorState(At)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Jk(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Xk(e),t.sendInspectorTree(At),t.sendInspectorState(At)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:n=>{const i=e._s.get(n);i?typeof i.$reset!="function"?ut(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`,"warn"):(i.$reset(),ut(`Store "${n}" reset.`)):ut(`Cannot reset "${n}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((n,i)=>{const s=n.componentInstance&&n.componentInstance.proxy;if(s&&s._pStores){const l=n.componentInstance.proxy._pStores;Object.values(l).forEach(d=>{n.instanceData.state.push({type:Zs(d.$id),key:"state",editable:!0,value:d._isOptionsAPI?{_custom:{value:c.toRaw(d.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>d.$reset()}]}}:Object.keys(d.$state).reduce((f,g)=>(f[g]=d.$state[g],f),{})}),d._getters&&d._getters.length&&n.instanceData.state.push({type:Zs(d.$id),key:"getters",editable:!1,value:d._getters.reduce((f,g)=>{try{f[g]=d[g]}catch(m){f[g]=m}return f},{})})})}}),t.on.getInspectorTree(n=>{if(n.app===r&&n.inspectorId===At){let i=[e];i=i.concat(Array.from(e._s.values())),n.rootNodes=(n.filter?i.filter(s=>"$id"in s?s.$id.toLowerCase().includes(n.filter.toLowerCase()):mv.toLowerCase().includes(n.filter.toLowerCase())):i).map(Zk)}}),globalThis.$pinia=e,t.on.getInspectorState(n=>{if(n.app===r&&n.inspectorId===At){const i=n.nodeId===Vs?e:e._s.get(n.nodeId);if(!i)return;i&&(n.nodeId!==Vs&&(globalThis.$store=c.toRaw(i)),n.state=eR(i))}}),t.on.editInspectorState((n,i)=>{if(n.app===r&&n.inspectorId===At){const s=n.nodeId===Vs?e:e._s.get(n.nodeId);if(!s)return ut(`store "${n.nodeId}" not found`,"error");const{path:l}=n;xd(s)?l.unshift("state"):(l.length!==1||!s._customProperties.has(l[0])||l[0]in s.$state)&&l.unshift("$state"),ri=!1,n.set(s,l,n.state.value),ri=!0}}),t.on.editComponentState(n=>{if(n.type.startsWith("🍍")){const i=n.type.replace(/^🍍\s*/,""),s=e._s.get(i);if(!s)return ut(`store "${i}" not found`,"error");const{path:l}=n;if(l[0]!=="state")return ut(`Invalid path for store "${i}":
6
6
  ${l}
7
- Only state can be modified.`);l[0]="$state",ri=!1,n.set(s,l,n.state.value),ri=!0}})})}function sR(r,e){Ks.includes(nc(e.$id))||Ks.push(nc(e.$id)),uv({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ks,app:r,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const n=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:l,onError:d,name:f,args:g})=>{const m=Cv++;t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛫 "+f,subtitle:"start",data:{store:xn(e.$id),action:xn(f),args:g},groupId:m}}),l(v=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛬 "+f,subtitle:"end",data:{store:xn(e.$id),action:xn(f),args:g,result:v},groupId:m}})}),d(v=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),logType:"error",title:"💥 "+f,subtitle:"end",data:{store:xn(e.$id),action:xn(f),args:g,error:v},groupId:m}})})},!0),e._customProperties.forEach(l=>{c.watch(()=>c.unref(e[l]),(d,f)=>{t.notifyComponentUpdate(),t.sendInspectorState(At),ri&&t.addTimelineEvent({layerId:io,event:{time:n(),title:"Change",subtitle:l,data:{newValue:d,oldValue:f},groupId:$r}})},{deep:!0})}),e.$subscribe(({events:l,type:d},f)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(At),!ri)return;const g={time:n(),title:oR(d),data:iR({store:xn(e.$id)},rR(l)),groupId:$r};d===Zn.patchFunction?g.subtitle="⤵️":d===Zn.patchObject?g.subtitle="🧩":l&&!Array.isArray(l)&&(g.subtitle=l.type),l&&(g.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:l}}),t.addTimelineEvent({layerId:io,event:g})},{detached:!0,flush:"sync"});const i=e._hotUpdate;e._hotUpdate=c.markRaw(l=>{i(l),t.addTimelineEvent({layerId:io,event:{time:n(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:xn(e.$id),info:xn("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(At),t.sendInspectorState(At)});const{$dispose:s}=e;e.$dispose=()=>{s(),t.notifyComponentUpdate(),t.sendInspectorTree(At),t.sendInspectorState(At),t.getSettings().logStoreChanges&&ut(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(At),t.sendInspectorState(At),t.getSettings().logStoreChanges&&ut(`"${e.$id}" store installed 🆕`)})}let Cv=0,$r;function vm(r,e,t){const n=e.reduce((i,s)=>(i[s]=c.toRaw(r)[s],i),{});for(const i in n)r[i]=function(){const s=Cv,l=t?new Proxy(r,{get(...f){return $r=s,Reflect.get(...f)},set(...f){return $r=s,Reflect.set(...f)}}):r;$r=s;const d=n[i].apply(l,arguments);return $r=void 0,d}}function cR({app:r,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){vm(e,Object.keys(t.actions),e._isOptionsAPI);const n=e._hotUpdate;c.toRaw(e)._hotUpdate=function(i){n.apply(this,arguments),vm(e,Object.keys(i._hmrPayload.actions),!!e._isOptionsAPI)}}sR(r,e)}}function lR(){const r=c.effectScope(!0),e=r.run(()=>c.ref({}));let t=[],n=[];const i=c.markRaw({install(s){fa(i),i._a=s,s.provide(dv,i),s.config.globalProperties.$pinia=i,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co&&aR(s,i),n.forEach(l=>t.push(l)),n=[]},use(s){return!this._a&&!cv?n.push(s):t.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy<"u"&&i.use(cR),i}function wv(r,e){for(const t in e){const n=e[t];if(!(t in r))continue;const i=r[t];di(i)&&di(n)&&!c.isRef(n)&&!c.isReactive(n)?r[t]=wv(i,n):r[t]=n}return r}const uR=()=>{};function ym(r,e,t,n=uR){r.push(e);const i=()=>{const s=r.indexOf(e);s>-1&&(r.splice(s,1),n())};return!t&&c.getCurrentScope()&&c.onScopeDispose(i),i}function Vo(r,...e){r.slice().forEach(t=>{t(...e)})}const dR=r=>r(),Cm=Symbol(),Eu=Symbol();function _v(r,e){r instanceof Map&&e instanceof Map?e.forEach((t,n)=>r.set(n,t)):r instanceof Set&&e instanceof Set&&e.forEach(r.add,r);for(const t in e){if(!e.hasOwnProperty(t))continue;const n=e[t],i=r[t];di(i)&&di(n)&&r.hasOwnProperty(t)&&!c.isRef(n)&&!c.isReactive(n)?r[t]=_v(i,n):r[t]=n}return r}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const{assign:Tn}=Object;function wm(r){return!!(c.isRef(r)&&r.effect)}function _m(r,e,t,n){const{state:i,actions:s,getters:l}=e,d=t.state.value[r];let f;function g(){!d&&(process.env.NODE_ENV==="production"||!n)&&(t.state.value[r]=i?i():{});const m=process.env.NODE_ENV!=="production"&&n?c.toRefs(c.ref(i?i():{}).value):c.toRefs(t.state.value[r]);return Tn(m,s,Object.keys(l||{}).reduce((v,C)=>(process.env.NODE_ENV!=="production"&&C in m&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${C}" in store "${r}".`),v[C]=c.markRaw(c.computed(()=>{fa(t);const S=t._s.get(r);return l[C].call(S,S)})),v),{}))}return f=hR(r,g,e,t,n,!0),f}function hR(r,e,t={},n,i,s){let l;const d=Tn({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!n._e.active)throw new Error("Pinia destroyed");const f={deep:!0};process.env.NODE_ENV!=="production"&&!cv&&(f.onTrigger=j=>{g?S=j:g==!1&&!z._hotUpdating&&(Array.isArray(S)?S.push(j):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let g,m,v=[],C=[],S;const _=n.state.value[r],A=c.ref({});let O;function $(j){let q;g=m=!1,process.env.NODE_ENV!=="production"&&(S=[]),typeof j=="function"?(j(n.state.value[r]),q={type:Zn.patchFunction,storeId:r,events:S}):(_v(n.state.value[r],j),q={type:Zn.patchObject,payload:j,storeId:r,events:S});const Ee=O=Symbol();c.nextTick().then(()=>{O===Ee&&(g=!0)}),m=!0,Vo(v,q,n.state.value[r])}const V=function(){const{state:q}=t,Ee=q?q():{};this.$patch(Ue=>{Tn(Ue,Ee)})};function U(){l.stop(),v=[],C=[],n._s.delete(r)}const Q=(j,q="")=>{if(Cm in j)return j[Eu]=q,j;const Ee=function(){fa(n);const Ue=Array.from(arguments),Ct=[],An=[];function sn(wt){Ct.push(wt)}function Mt(wt){An.push(wt)}Vo(C,{args:Ue,name:Ee[Eu],store:z,after:sn,onError:Mt});let Qe;try{Qe=j.apply(this&&this.$id===r?this:z,Ue)}catch(wt){throw Vo(An,wt),wt}return Qe instanceof Promise?Qe.then(wt=>(Vo(Ct,wt),wt)).catch(wt=>(Vo(An,wt),Promise.reject(wt))):(Vo(Ct,Qe),Qe)};return Ee[Cm]=!0,Ee[Eu]=q,Ee},se=c.markRaw({actions:{},getters:{},state:[],hotState:A}),we={_p:n,$id:r,$onAction:ym.bind(null,C),$patch:$,$reset:V,$subscribe(j,q={}){const Ee=ym(v,j,q.detached,()=>Ue()),Ue=l.run(()=>c.watch(()=>n.state.value[r],Ct=>{(q.flush==="sync"?m:g)&&j({storeId:r,type:Zn.direct,events:S},Ct)},Tn({},f,q)));return Ee},$dispose:U},z=c.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co?Tn({_hmrPayload:se,_customProperties:c.markRaw(new Set)},we):we);n._s.set(r,z);const Te=(n._a&&n._a.runWithContext||dR)(()=>n._e.run(()=>(l=c.effectScope()).run(()=>e({action:Q}))));for(const j in Te){const q=Te[j];if(c.isRef(q)&&!wm(q)||c.isReactive(q))process.env.NODE_ENV!=="production"&&i&&Ts(A.value,j,c.toRef(Te,j)),process.env.NODE_ENV!=="production"&&se.state.push(j);else if(typeof q=="function"){const Ee=process.env.NODE_ENV!=="production"&&i?q:Q(q,j);Te[j]=Ee,process.env.NODE_ENV!=="production"&&(se.actions[j]=q),d.actions[j]=q}else process.env.NODE_ENV!=="production"&&wm(q)&&(se.getters[j]=t.getters[j],co&&(Te._getters||(Te._getters=c.markRaw([]))).push(j))}if(Tn(z,Te),Tn(c.toRaw(z),Te),Object.defineProperty(z,"$state",{get:()=>process.env.NODE_ENV!=="production"&&i?A.value:n.state.value[r],set:j=>{if(process.env.NODE_ENV!=="production"&&i)throw new Error("cannot set hotState");$(q=>{Tn(q,j)})}}),process.env.NODE_ENV!=="production"&&(z._hotUpdate=c.markRaw(j=>{z._hotUpdating=!0,j._hmrPayload.state.forEach(q=>{if(q in z.$state){const Ee=j.$state[q],Ue=z.$state[q];typeof Ee=="object"&&di(Ee)&&di(Ue)?wv(Ee,Ue):j.$state[q]=Ue}Ts(z,q,c.toRef(j.$state,q))}),Object.keys(z.$state).forEach(q=>{q in j.$state||Tu(z,q)}),g=!1,m=!1,n.state.value[r]=c.toRef(j._hmrPayload,"hotState"),m=!0,c.nextTick().then(()=>{g=!0});for(const q in j._hmrPayload.actions){const Ee=j[q];Ts(z,q,Q(Ee,q))}for(const q in j._hmrPayload.getters){const Ee=j._hmrPayload.getters[q],Ue=c.computed(()=>(fa(n),Ee.call(z,z)));Ts(z,q,Ue)}Object.keys(z._hmrPayload.getters).forEach(q=>{q in j._hmrPayload.getters||Tu(z,q)}),Object.keys(z._hmrPayload.actions).forEach(q=>{q in j._hmrPayload.actions||Tu(z,q)}),z._hmrPayload=j._hmrPayload,z._getters=j._getters,z._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const j={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(q=>{Object.defineProperty(z,q,Tn({value:z[q]},j))})}return n._p.forEach(j=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const q=l.run(()=>j({store:z,app:n._a,pinia:n,options:d}));Object.keys(q||{}).forEach(Ee=>z._customProperties.add(Ee)),Tn(z,q)}else Tn(z,l.run(()=>j({store:z,app:n._a,pinia:n,options:d})))}),process.env.NODE_ENV!=="production"&&z.$state&&typeof z.$state=="object"&&typeof z.$state.constructor=="function"&&!z.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
7
+ Only state can be modified.`);l[0]="$state",ri=!1,n.set(s,l,n.state.value),ri=!0}})})}function iR(r,e){Fs.includes(Zs(e.$id))||Fs.push(Zs(e.$id)),sv({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Fs,app:r,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const n=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:l,onError:d,name:f,args:g})=>{const m=pv++;t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛫 "+f,subtitle:"start",data:{store:xn(e.$id),action:xn(f),args:g},groupId:m}}),l(v=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),title:"🛬 "+f,subtitle:"end",data:{store:xn(e.$id),action:xn(f),args:g,result:v},groupId:m}})}),d(v=>{$r=void 0,t.addTimelineEvent({layerId:io,event:{time:n(),logType:"error",title:"💥 "+f,subtitle:"end",data:{store:xn(e.$id),action:xn(f),args:g,error:v},groupId:m}})})},!0),e._customProperties.forEach(l=>{c.watch(()=>c.unref(e[l]),(d,f)=>{t.notifyComponentUpdate(),t.sendInspectorState(At),ri&&t.addTimelineEvent({layerId:io,event:{time:n(),title:"Change",subtitle:l,data:{newValue:d,oldValue:f},groupId:$r}})},{deep:!0})}),e.$subscribe(({events:l,type:d},f)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(At),!ri)return;const g={time:n(),title:nR(d),data:rR({store:xn(e.$id)},tR(l)),groupId:$r};d===Zn.patchFunction?g.subtitle="⤵️":d===Zn.patchObject?g.subtitle="🧩":l&&!Array.isArray(l)&&(g.subtitle=l.type),l&&(g.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:l}}),t.addTimelineEvent({layerId:io,event:g})},{detached:!0,flush:"sync"});const i=e._hotUpdate;e._hotUpdate=c.markRaw(l=>{i(l),t.addTimelineEvent({layerId:io,event:{time:n(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:xn(e.$id),info:xn("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(At),t.sendInspectorState(At)});const{$dispose:s}=e;e.$dispose=()=>{s(),t.notifyComponentUpdate(),t.sendInspectorTree(At),t.sendInspectorState(At),t.getSettings().logStoreChanges&&ut(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(At),t.sendInspectorState(At),t.getSettings().logStoreChanges&&ut(`"${e.$id}" store installed 🆕`)})}let pv=0,$r;function mm(r,e,t){const n=e.reduce((i,s)=>(i[s]=c.toRaw(r)[s],i),{});for(const i in n)r[i]=function(){const s=pv,l=t?new Proxy(r,{get(...f){return $r=s,Reflect.get(...f)},set(...f){return $r=s,Reflect.set(...f)}}):r;$r=s;const d=n[i].apply(l,arguments);return $r=void 0,d}}function aR({app:r,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){mm(e,Object.keys(t.actions),e._isOptionsAPI);const n=e._hotUpdate;c.toRaw(e)._hotUpdate=function(i){n.apply(this,arguments),mm(e,Object.keys(i._hmrPayload.actions),!!e._isOptionsAPI)}}iR(r,e)}}function sR(){const r=c.effectScope(!0),e=r.run(()=>c.ref({}));let t=[],n=[];const i=c.markRaw({install(s){da(i),i._a=s,s.provide(cv,i),s.config.globalProperties.$pinia=i,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co&&oR(s,i),n.forEach(l=>t.push(l)),n=[]},use(s){return!this._a&&!iv?n.push(s):t.push(s),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof Proxy<"u"&&i.use(aR),i}function vv(r,e){for(const t in e){const n=e[t];if(!(t in r))continue;const i=r[t];di(i)&&di(n)&&!c.isRef(n)&&!c.isReactive(n)?r[t]=vv(i,n):r[t]=n}return r}const cR=()=>{};function pm(r,e,t,n=cR){r.push(e);const i=()=>{const s=r.indexOf(e);s>-1&&(r.splice(s,1),n())};return!t&&c.getCurrentScope()&&c.onScopeDispose(i),i}function Vo(r,...e){r.slice().forEach(t=>{t(...e)})}const lR=r=>r(),vm=Symbol(),Cu=Symbol();function yv(r,e){r instanceof Map&&e instanceof Map?e.forEach((t,n)=>r.set(n,t)):r instanceof Set&&e instanceof Set&&e.forEach(r.add,r);for(const t in e){if(!e.hasOwnProperty(t))continue;const n=e[t],i=r[t];di(i)&&di(n)&&r.hasOwnProperty(t)&&!c.isRef(n)&&!c.isReactive(n)?r[t]=yv(i,n):r[t]=n}return r}process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();const{assign:Tn}=Object;function ym(r){return!!(c.isRef(r)&&r.effect)}function Cm(r,e,t,n){const{state:i,actions:s,getters:l}=e,d=t.state.value[r];let f;function g(){!d&&(process.env.NODE_ENV==="production"||!n)&&(t.state.value[r]=i?i():{});const m=process.env.NODE_ENV!=="production"&&n?c.toRefs(c.ref(i?i():{}).value):c.toRefs(t.state.value[r]);return Tn(m,s,Object.keys(l||{}).reduce((v,C)=>(process.env.NODE_ENV!=="production"&&C in m&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${C}" in store "${r}".`),v[C]=c.markRaw(c.computed(()=>{da(t);const S=t._s.get(r);return l[C].call(S,S)})),v),{}))}return f=uR(r,g,e,t,n,!0),f}function uR(r,e,t={},n,i,s){let l;const d=Tn({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!n._e.active)throw new Error("Pinia destroyed");const f={deep:!0};process.env.NODE_ENV!=="production"&&!iv&&(f.onTrigger=j=>{g?S=j:g==!1&&!z._hotUpdating&&(Array.isArray(S)?S.push(j):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let g,m,v=[],C=[],S;const _=n.state.value[r],b=c.ref({});let O;function $(j){let q;g=m=!1,process.env.NODE_ENV!=="production"&&(S=[]),typeof j=="function"?(j(n.state.value[r]),q={type:Zn.patchFunction,storeId:r,events:S}):(yv(n.state.value[r],j),q={type:Zn.patchObject,payload:j,storeId:r,events:S});const Ee=O=Symbol();c.nextTick().then(()=>{O===Ee&&(g=!0)}),m=!0,Vo(v,q,n.state.value[r])}const V=function(){const{state:q}=t,Ee=q?q():{};this.$patch(Ue=>{Tn(Ue,Ee)})};function U(){l.stop(),v=[],C=[],n._s.delete(r)}const Q=(j,q="")=>{if(vm in j)return j[Cu]=q,j;const Ee=function(){da(n);const Ue=Array.from(arguments),Ct=[],bn=[];function sn(wt){Ct.push(wt)}function Mt(wt){bn.push(wt)}Vo(C,{args:Ue,name:Ee[Cu],store:z,after:sn,onError:Mt});let Qe;try{Qe=j.apply(this&&this.$id===r?this:z,Ue)}catch(wt){throw Vo(bn,wt),wt}return Qe instanceof Promise?Qe.then(wt=>(Vo(Ct,wt),wt)).catch(wt=>(Vo(bn,wt),Promise.reject(wt))):(Vo(Ct,Qe),Qe)};return Ee[vm]=!0,Ee[Cu]=q,Ee},se=c.markRaw({actions:{},getters:{},state:[],hotState:b}),we={_p:n,$id:r,$onAction:pm.bind(null,C),$patch:$,$reset:V,$subscribe(j,q={}){const Ee=pm(v,j,q.detached,()=>Ue()),Ue=l.run(()=>c.watch(()=>n.state.value[r],Ct=>{(q.flush==="sync"?m:g)&&j({storeId:r,type:Zn.direct,events:S},Ct)},Tn({},f,q)));return Ee},$dispose:U},z=c.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co?Tn({_hmrPayload:se,_customProperties:c.markRaw(new Set)},we):we);n._s.set(r,z);const Te=(n._a&&n._a.runWithContext||lR)(()=>n._e.run(()=>(l=c.effectScope()).run(()=>e({action:Q}))));for(const j in Te){const q=Te[j];if(c.isRef(q)&&!ym(q)||c.isReactive(q))process.env.NODE_ENV!=="production"&&i&&ws(b.value,j,c.toRef(Te,j)),process.env.NODE_ENV!=="production"&&se.state.push(j);else if(typeof q=="function"){const Ee=process.env.NODE_ENV!=="production"&&i?q:Q(q,j);Te[j]=Ee,process.env.NODE_ENV!=="production"&&(se.actions[j]=q),d.actions[j]=q}else process.env.NODE_ENV!=="production"&&ym(q)&&(se.getters[j]=t.getters[j],co&&(Te._getters||(Te._getters=c.markRaw([]))).push(j))}if(Tn(z,Te),Tn(c.toRaw(z),Te),Object.defineProperty(z,"$state",{get:()=>process.env.NODE_ENV!=="production"&&i?b.value:n.state.value[r],set:j=>{if(process.env.NODE_ENV!=="production"&&i)throw new Error("cannot set hotState");$(q=>{Tn(q,j)})}}),process.env.NODE_ENV!=="production"&&(z._hotUpdate=c.markRaw(j=>{z._hotUpdating=!0,j._hmrPayload.state.forEach(q=>{if(q in z.$state){const Ee=j.$state[q],Ue=z.$state[q];typeof Ee=="object"&&di(Ee)&&di(Ue)?vv(Ee,Ue):j.$state[q]=Ue}ws(z,q,c.toRef(j.$state,q))}),Object.keys(z.$state).forEach(q=>{q in j.$state||yu(z,q)}),g=!1,m=!1,n.state.value[r]=c.toRef(j._hmrPayload,"hotState"),m=!0,c.nextTick().then(()=>{g=!0});for(const q in j._hmrPayload.actions){const Ee=j[q];ws(z,q,Q(Ee,q))}for(const q in j._hmrPayload.getters){const Ee=j._hmrPayload.getters[q],Ue=c.computed(()=>(da(n),Ee.call(z,z)));ws(z,q,Ue)}Object.keys(z._hmrPayload.getters).forEach(q=>{q in j._hmrPayload.getters||yu(z,q)}),Object.keys(z._hmrPayload.actions).forEach(q=>{q in j._hmrPayload.actions||yu(z,q)}),z._hmrPayload=j._hmrPayload,z._getters=j._getters,z._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const j={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(q=>{Object.defineProperty(z,q,Tn({value:z[q]},j))})}return n._p.forEach(j=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&co){const q=l.run(()=>j({store:z,app:n._a,pinia:n,options:d}));Object.keys(q||{}).forEach(Ee=>z._customProperties.add(Ee)),Tn(z,q)}else Tn(z,l.run(()=>j({store:z,app:n._a,pinia:n,options:d})))}),process.env.NODE_ENV!=="production"&&z.$state&&typeof z.$state=="object"&&typeof z.$state.constructor=="function"&&!z.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
8
8
  state: () => new MyClass()
9
- Found in store "${z.$id}".`),_&&s&&t.hydrate&&t.hydrate(z.$state,_),g=!0,m=!0,z}/*! #__NO_SIDE_EFFECTS__ */function fR(r,e,t){let n,i;if(typeof r=="string")n=r,i=e;else if(i=r,n=r.id,process.env.NODE_ENV!=="production"&&typeof n!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function s(l,d){const f=c.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&Qi&&Qi._testing?null:l)||(f?c.inject(dv,null):null),l&&fa(l),process.env.NODE_ENV!=="production"&&!Qi)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
9
+ Found in store "${z.$id}".`),_&&s&&t.hydrate&&t.hydrate(z.$state,_),g=!0,m=!0,z}/*! #__NO_SIDE_EFFECTS__ */function dR(r,e,t){let n,i;if(typeof r=="string")n=r,i=e;else if(i=r,n=r.id,process.env.NODE_ENV!=="production"&&typeof n!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function s(l,d){const f=c.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&Yi&&Yi._testing?null:l)||(f?c.inject(cv,null):null),l&&da(l),process.env.NODE_ENV!=="production"&&!Yi)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
10
10
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
11
- This will fail in production.`);l=Qi,l._s.has(n)||(_m(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const g=l._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const m="__hot:"+n,v=_m(m,Tn({},i),l,!0);d._hotUpdate(v),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&co){const m=c.getCurrentInstance();if(m&&m.proxy&&!d){const v=m.proxy,C="_pStores"in v?v._pStores:v._pStores={};C[n]=g}}return g}return s.$id=n,s}const gR=fR({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(r){this.mini_sidebar=r},SET_CUSTOMIZER_DRAWER(r){this.Customizer_drawer=r},SET_LAYOUT(r){this.setHorizontalLayout=r},SET_THEME(r){this.actTheme=r},SET_FONT(r){this.fontTheme=r}}}),Fo=c.ref({}),wa=r=>{const e=c.computed(()=>r?Fo.value[r]||!1:Fo.value.default||!1),t=()=>{r?Fo.value[r]=!0:Fo.value.default=!0},n=()=>{r?Fo.value[r]=!1:Fo.value.default=!1};return c.onUnmounted(()=>{n()}),c.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},ie=c.ref(!1);var mR=Object.defineProperty,Tm=Object.getOwnPropertySymbols,pR=Object.prototype.hasOwnProperty,vR=Object.prototype.propertyIsEnumerable,Em=(r,e,t)=>e in r?mR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Tv=(r,e)=>{for(var t in e||(e={}))pR.call(e,t)&&Em(r,t,e[t]);if(Tm)for(var t of Tm(e))vR.call(e,t)&&Em(r,t,e[t]);return r},Ec=r=>typeof r=="function",Sc=r=>typeof r=="string",Ev=r=>Sc(r)&&r.trim().length>0,yR=r=>typeof r=="number",lo=r=>typeof r>"u",ga=r=>typeof r=="object"&&r!==null,CR=r=>er(r,"tag")&&Ev(r.tag),Sv=r=>window.TouchEvent&&r instanceof TouchEvent,Av=r=>er(r,"component")&&bv(r.component),wR=r=>Ec(r)||ga(r),bv=r=>!lo(r)&&(Sc(r)||wR(r)||Av(r)),Sm=r=>ga(r)&&["height","width","right","left","top","bottom"].every(e=>yR(r[e])),er=(r,e)=>(ga(r)||Ec(r))&&e in r,_R=(r=>()=>r++)(0);function Su(r){return Sv(r)?r.targetTouches[0].clientX:r.clientX}function Am(r){return Sv(r)?r.targetTouches[0].clientY:r.clientY}var TR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},_a=r=>Av(r)?_a(r.component):CR(r)?c.defineComponent({render(){return r}}):typeof r=="string"?r:c.toRaw(c.unref(r)),ER=r=>{if(typeof r=="string")return r;const e=er(r,"props")&&ga(r.props)?r.props:{},t=er(r,"listeners")&&ga(r.listeners)?r.listeners:{};return{component:_a(r),props:e,listeners:t}},SR=()=>typeof window<"u",Ac=class{constructor(){this.allHandlers={}}getHandlers(r){return this.allHandlers[r]||[]}on(r,e){const t=this.getHandlers(r);t.push(e),this.allHandlers[r]=t}off(r,e){const t=this.getHandlers(r);t.splice(t.indexOf(e)>>>0,1)}emit(r,e){this.getHandlers(r).forEach(n=>n(e))}},AR=r=>["on","off","emit"].every(e=>er(r,e)&&Ec(r[e]));exports.TYPE=void 0;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(function(r){r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right"})(exports.POSITION||(exports.POSITION={}));var nn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(nn||(nn={}));var Bn="Vue-Toastification",Ln={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Iv={type:Ln.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},zs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Ln.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},id={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},kv={transition:{type:[Object,String],default:`${Bn}__bounce`}},bR={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:Ln.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Ln.trueBoolean,pauseOnHover:Ln.trueBoolean,closeOnClick:Ln.trueBoolean,timeout:id.timeout,hideProgressBar:id.hideProgressBar,toastClassName:Ln.classNames,bodyClassName:Ln.classNames,icon:Iv.customIcon,closeButton:zs.component,closeButtonClassName:zs.classNames,showCloseButtonOnHover:zs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Ac}},IR={id:{type:[String,Number],required:!0,default:0},type:Ln.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},kR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Ln.trueBoolean,maxToasts:{type:Number,default:20},transition:kv.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:Ln.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},wr={CORE_TOAST:bR,TOAST:IR,CONTAINER:kR,PROGRESS_BAR:id,ICON:Iv,TRANSITION:kv,CLOSE_BUTTON:zs},Rv=c.defineComponent({name:"VtProgressBar",props:wr.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Bn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function RR(r,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(r.style),class:c.normalizeClass(r.cpClass)},null,6)}Rv.render=RR;var OR=Rv,Ov=c.defineComponent({name:"VtCloseButton",props:wr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?_a(this.component):"button"},classes(){const r=[`${Bn}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),NR=c.createTextVNode(" × ");function PR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.buttonComponent),c.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:c.withCtx(()=>[NR]),_:1},16,["aria-label","class"])}Ov.render=PR;var MR=Ov,Nv={},xR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},DR=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),LR=[DR];function BR(r,e){return c.openBlock(),c.createElementBlock("svg",xR,LR)}Nv.render=BR;var UR=Nv,Pv={},VR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},FR=c.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),HR=[FR];function $R(r,e){return c.openBlock(),c.createElementBlock("svg",VR,HR)}Pv.render=$R;var bm=Pv,Mv={},KR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},zR=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),WR=[zR];function qR(r,e){return c.openBlock(),c.createElementBlock("svg",KR,WR)}Mv.render=qR;var GR=Mv,xv={},jR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},YR=c.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),JR=[YR];function QR(r,e){return c.openBlock(),c.createElementBlock("svg",jR,JR)}xv.render=QR;var XR=xv,Dv=c.defineComponent({name:"VtIcon",props:wr.ICON,computed:{customIconChildren(){return er(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return Sc(this.customIcon)?this.trimValue(this.customIcon):er(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return er(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:bv(this.customIcon)?_a(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:bm,[exports.TYPE.INFO]:bm,[exports.TYPE.SUCCESS]:UR,[exports.TYPE.ERROR]:XR,[exports.TYPE.WARNING]:GR}[this.type]},iconClasses(){const r=[`${Bn}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return Ev(r)?r.trim():e}}});function ZR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{class:c.normalizeClass(r.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Dv.render=ZR;var eO=Dv,Lv=c.defineComponent({name:"VtToast",components:{ProgressBar:OR,CloseButton:MR,Icon:eO},inheritAttrs:!1,props:Object.assign({},wr.CORE_TOAST,wr.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const r=[`${Bn}__toast`,`${Bn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Bn}__toast--rtl`),r},bodyClasses(){return[`${Bn}__toast-${Sc(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Sm(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:er,getVueComponentFromObj:_a,closeToast(){this.eventBus.emit(nn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const r=this.$el;r.addEventListener("touchstart",this.onDragStart,{passive:!0}),r.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const r=this.$el;r.removeEventListener("touchstart",this.onDragStart),r.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(r){this.beingDragged=!0,this.dragPos={x:Su(r),y:Am(r)},this.dragStart=Su(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Su(r),y:Am(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Sm(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),tO=["role"];function nO(r,e){const t=c.resolveComponent("Icon"),n=c.resolveComponent("CloseButton"),i=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.classes),style:c.normalizeStyle(r.draggableStyle),onClick:e[0]||(e[0]=(...s)=>r.clickHandler&&r.clickHandler(...s)),onMouseenter:e[1]||(e[1]=(...s)=>r.hoverPause&&r.hoverPause(...s)),onMouseleave:e[2]||(e[2]=(...s)=>r.hoverPlay&&r.hoverPlay(...s))},[r.icon?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:c.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(r.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),c.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},c.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,tO),r.closeButton?(c.openBlock(),c.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:c.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),r.timeout?(c.openBlock(),c.createBlock(i,{key:2,"is-running":r.isRunning,"hide-progress-bar":r.hideProgressBar,timeout:r.timeout,onCloseToast:r.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):c.createCommentVNode("v-if",!0)],38)}Lv.render=nO;var rO=Lv,Bv=c.defineComponent({name:"VtTransition",props:wr.TRANSITION,emits:["leave"],methods:{hasProp:er,leave(r){r instanceof HTMLElement&&(r.style.left=r.offsetLeft+"px",r.style.top=r.offsetTop+"px",r.style.width=getComputedStyle(r).width,r.style.position="absolute")}}});function oO(r,e){return c.openBlock(),c.createBlock(c.TransitionGroup,{tag:"div","enter-active-class":r.transition.enter?r.transition.enter:`${r.transition}-enter-active`,"move-class":r.transition.move?r.transition.move:`${r.transition}-move`,"leave-active-class":r.transition.leave?r.transition.leave:`${r.transition}-leave-active`,onLeave:r.leave},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Bv.render=oO;var iO=Bv,Uv=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:rO,VtTransition:iO},props:Object.assign({},wr.CORE_TOAST,wr.CONTAINER,wr.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const r=this.eventBus;r.on(nn.ADD,this.addToast),r.on(nn.CLEAR,this.clearToasts),r.on(nn.DISMISS,this.dismissToast),r.on(nn.UPDATE,this.updateToast),r.on(nn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(r){Ec(r)&&(r=await r()),TR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=ER(r.content);const e=Object.assign({},this.defaults,r.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[r.type],r),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(r){const e=this.toasts[r];!lo(e)&&!lo(e.onClose)&&e.onClose(),delete this.toasts[r]},clearToasts(){Object.keys(this.toasts).forEach(r=>{this.dismissToast(r)})},getPositionToasts(r){const e=this.filteredToasts.filter(t=>t.position===r).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(r){lo(r.container)||this.setup(r.container),this.defaults=Object.assign({},this.defaults,r)},updateToast({id:r,options:e,create:t}){this.toasts[r]?(e.timeout&&e.timeout===this.toasts[r].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[r],e))):t&&this.addToast(Object.assign({},{id:r},e))},getClasses(r){return[`${Bn}__container`,r].concat(this.defaults.containerClassName)}}});function aO(r,e){const t=c.resolveComponent("Toast"),n=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.positions,i=>(c.openBlock(),c.createElementBlock("div",{key:i},[c.createVNode(n,{transition:r.defaults.transition,class:c.normalizeClass(r.getClasses(i))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.getPositionToasts(i),s=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Uv.render=aO;var sO=Uv,Im=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new Ac;e&&c.nextTick(()=>{const s=c.createApp(sO,Tv({},r)),l=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(l,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Bn}] App to share context with was not provided.`):(s._context.components=f._context.components,s._context.directives=f._context.directives,s._context.mixins=f._context.mixins,s._context.provides=f._context.provides,s.config.globalProperties=f.config.globalProperties)}});const n=(s,l)=>{const d=Object.assign({},{id:_R(),type:exports.TYPE.DEFAULT},l,{content:s});return t.emit(nn.ADD,d),d.id};n.clear=()=>t.emit(nn.CLEAR,void 0),n.updateDefaults=s=>{t.emit(nn.UPDATE_DEFAULTS,s)},n.dismiss=s=>{t.emit(nn.DISMISS,s)};function i(s,{content:l,options:d},f=!1){const g=Object.assign({},d,{content:l});t.emit(nn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.SUCCESS})),n.info=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.INFO})),n.error=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.ERROR})),n.warning=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.WARNING})),n},cO=()=>{const r=()=>console.warn(`[${Bn}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function ma(r){return SR()?AR(r)?Im({eventBus:r},!1):Im(r,!0):cO()}var bc=Symbol("VueToastification"),Ud=new Ac,lO=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=ma(Tv({eventBus:Ud},e));r.provide(bc,t)},uO=r=>{const e=ma(r);c.getCurrentInstance()&&c.provide(bc,e)},Hn=r=>{if(r)return ma(r);const e=c.getCurrentInstance()?c.inject(bc,void 0):void 0;return e||ma(Ud)},dO=lO;const hO={class:"d-flex align-center"},fO={key:1},gO={class:"ms-auto"},Ta=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=e,i=c.ref(!1),{isDialogActive:s,closeDialog:l}=wa(t.ddId);async function d(){try{await n("onCancel")}catch(g){console.error(g)}l()}async function f(){i.value=!0;try{await n("onSave")}catch(g){console.error(g)}i.value=!1,l()}return(g,m)=>{const v=c.resolveComponent("ExclamationCircleIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[g.variant==="global"?(c.openBlock(),c.createBlock(Vs.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[0]||(m[0]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{rounded:"",loading:i.value},{default:c.withCtx(()=>[c.createVNode(lt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",hO,[g.$slots.title?c.renderSlot(g.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",fO,c.toDisplayString(t.title),1))]),c.createElementVNode("div",gO,[c.renderSlot(g.$slots,"heading-actions"),c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(fo.VDivider,{class:"mx-5"}),c.createVNode(lt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3}),g.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(g.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[g.$slots.metadata?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[3]||(m[3]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:f,loading:i.value},{default:c.withCtx(()=>m[4]||(m[4]=[c.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),g.variant==="confirm"?(c.openBlock(),c.createBlock(Vs.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[1]||(m[1]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(v,{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[5]||(m[5]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:f},{default:c.withCtx(()=>m[6]||(m[6]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),g.variant==="empty"?(c.openBlock(),c.createBlock(Vs.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[2]||(m[2]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64)}}}),Vd=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=wa("delete-all-__J"),n=e;return(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Ta,{"dd-id":"delete-all-__J",variant:"confirm",title:"Confirm delete",text:"Are you sure you want to delete all selected items?","on-save":()=>n("removeAll")},null,8,["on-save"]),c.createVNode(Be.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>s[0]||(s[0]=[c.createTextVNode(" Delete")])),_:1},8,["onClick"])],64))}}),Vv=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(c.openBlock(),c.createBlock(Be.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>n[0]||(n[0]=[c.createTextVNode(" Edit ")])),_:1}))}});var mO={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},Fv={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},Hv={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},pO={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},km={name:"FilterIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},vO={name:"HierarchyIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},yO={name:"LayoutSidebarRightCollapseIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},CO={name:"RefreshIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},wO={name:"TableIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const $v=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:n})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:e.variant},n,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Fv),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Hv),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),_O={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Kv=c.defineComponent({__name:"DotsMenuV1",props:{variant:{default:"text"},color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:i})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:t.variant},i,{icon:""}),{default:c.withCtx(()=>[t.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Fv),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Hv),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VList),null,{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.options,(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[i.title?(c.openBlock(),c.createElementBlock("div",_O,c.toDisplayString(i.title),1)):c.createCommentVNode("",!0),i.action?(c.openBlock(),c.createBlock(c.unref(Ft.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VListItemTitle),null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),i.divider?(c.openBlock(),c.createBlock(c.unref(Ft.VDivider),{key:2,class:"mt-2"})):c.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),Ic=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(lt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(lt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),zv=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=c.ref(!1),i=c.ref(!1);c.onUnmounted(()=>{n.value=!1});const s=e;async function l(){try{await s("onCancel")}catch(f){console.error(f)}n.value=!1}async function d(){i.value=!0;try{await s("onSave")}catch(f){console.error(f)}i.value=!1,n.value=!1}return(f,g)=>(c.openBlock(),c.createBlock(Vs.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:m,props:v})=>[c.renderSlot(f.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:m,props:v})))]),default:c.withCtx(({isActive:m})=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(pO),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>g[0]||(g[0]=[c.createTextVNode(" Cancel ")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>g[1]||(g[1]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),Au="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Wv=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=r,t=c.ref(e.src),n=c.computed(()=>t.value||Au);function i(){t.value=Au}return(s,l)=>(c.openBlock(),c.createBlock(nv.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(rv.VImg,{src:n.value,"lazy-src":Au,onError:i,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),bu="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",qv=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=c.ref(e.img),n=c.computed(()=>t.value||bu);function i(){t.value=bu}return(s,l)=>(c.openBlock(),c.createBlock(nv.VAvatar,{size:s.size},{default:c.withCtx(()=>[c.createVNode(rv.VImg,{src:n.value,"lazy-src":bu,onError:i,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),TO=c.defineComponent({__name:"ContextMenu",setup(r){const e=c.ref(!1),t=c.ref({x:0,y:0}),n=s=>{s.preventDefault(),t.value={x:s.clientX,y:s.clientY},e.value=!0},i=()=>{e.value=!1};return c.onMounted(()=>{document.addEventListener("click",i)}),c.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(n,["right"]),class:"relative w-full h-full"},[c.renderSlot(s.$slots,"default",{},void 0,!0),c.createVNode(ov.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),vi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},Gv=vi(TO,[["__scopeId","data-v-a53b15af"]]),EO={class:"d-inline-flex"},jv=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>{var i;if(e.headers)return e.headers;if(e.columns)return(i=e.columns)==null?void 0:i.filter(s=>s.checked)}),n=c.useModel(r,"selection");return(i,s)=>(c.openBlock(),c.createBlock(iv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:i.items,"items-length":i.items.length,loading:i.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":i.sortBy,class:"customize-table"},{top:c.withCtx(()=>s[1]||(s[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",EO,[c.renderSlot(i.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!i.loading&&i.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),Yv=6048e5,SO=864e5,Rm=Symbol.for("constructDateFrom");function Wr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Rm in r?r[Rm](e):r instanceof Date?new r.constructor(e):new Date(e)}function $n(r,e){return Wr(e||r,r)}let AO={};function kc(){return AO}function pa(r,e){var d,f,g,m;const t=kc(),n=(e==null?void 0:e.weekStartsOn)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,i=$n(r,e==null?void 0:e.in),s=i.getDay(),l=(s<n?7:0)+s-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function rc(r,e){return pa(r,{...e,weekStartsOn:1})}function Jv(r,e){const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=Wr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=rc(i),l=Wr(t,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const d=rc(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function Om(r){const e=$n(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function bO(r,...e){const t=Wr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function Nm(r,e){const t=$n(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function IO(r,e,t){const[n,i]=bO(t==null?void 0:t.in,r,e),s=Nm(n),l=Nm(i),d=+s-Om(s),f=+l-Om(l);return Math.round((d-f)/SO)}function kO(r,e){const t=Jv(r,e),n=Wr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),rc(n)}function RO(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function OO(r){return!(!RO(r)&&typeof r!="number"||isNaN(+$n(r)))}function NO(r,e){const t=$n(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const PO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},MO=(r,e,t)=>{let n;const i=PO[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function Sn(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const xO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},DO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},LO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},BO={date:Sn({formats:xO,defaultWidth:"full"}),time:Sn({formats:DO,defaultWidth:"full"}),dateTime:Sn({formats:LO,defaultWidth:"full"})},UO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},VO=(r,e,t,n)=>UO[r];function Ze(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const l=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):l;i=r.formattingValues[d]||r.formattingValues[l]}else{const l=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[l]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const FO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},$O={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},KO={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},WO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qO=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},GO={ordinalNumber:qO,era:Ze({values:FO,defaultWidth:"wide"}),quarter:Ze({values:HO,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:$O,defaultWidth:"wide"}),day:Ze({values:KO,defaultWidth:"wide"}),dayPeriod:Ze({values:zO,defaultWidth:"wide",formattingValues:WO,defaultFormattingWidth:"wide"})};function et(r){return(e,t={})=>{const n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(i);if(!s)return null;const l=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?YO(d,v=>v.test(l)):jO(d,v=>v.test(l));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const m=e.slice(l.length);return{value:g,rest:m}}}function jO(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function YO(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function Rc(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const i=n[0],s=e.match(r.parsePattern);if(!s)return null;let l=r.valueCallback?r.valueCallback(s[0]):s[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(i.length);return{value:l,rest:d}}}const JO=/^(\d+)(th|st|nd|rd)?/i,QO=/\d+/i,XO={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ZO={any:[/^b/i,/^(a|c)/i]},eN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tN={any:[/1/i,/2/i,/3/i,/4/i]},nN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},iN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},aN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},cN={ordinalNumber:Rc({matchPattern:JO,parsePattern:QO,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:XO,defaultMatchWidth:"wide",parsePatterns:ZO,defaultParseWidth:"any"}),quarter:et({matchPatterns:eN,defaultMatchWidth:"wide",parsePatterns:tN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:nN,defaultMatchWidth:"wide",parsePatterns:rN,defaultParseWidth:"any"}),day:et({matchPatterns:oN,defaultMatchWidth:"wide",parsePatterns:iN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:aN,defaultMatchWidth:"any",parsePatterns:sN,defaultParseWidth:"any"})},Fd={code:"en-US",formatDistance:MO,formatLong:BO,formatRelative:VO,localize:GO,match:cN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lN(r,e){const t=$n(r,e==null?void 0:e.in);return IO(t,NO(t))+1}function uN(r,e){const t=$n(r,e==null?void 0:e.in),n=+rc(t)-+kO(t);return Math.round(n/Yv)+1}function Qv(r,e){var m,v,C,S;const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=kc(),s=(e==null?void 0:e.firstWeekContainsDate)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=Wr((e==null?void 0:e.in)||r,0);l.setFullYear(n+1,0,s),l.setHours(0,0,0,0);const d=pa(l,e),f=Wr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=pa(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function dN(r,e){var d,f,g,m;const t=kc(),n=(e==null?void 0:e.firstWeekContainsDate)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,i=Qv(r,e),s=Wr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),pa(s,e)}function hN(r,e){const t=$n(r,e==null?void 0:e.in),n=+pa(t,e)-+dN(t,e);return Math.round(n/Yv)+1}function Re(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Dr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Re(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Re(t+1,2)},d(r,e){return Re(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return Re(r.getHours()%12||12,e.length)},H(r,e){return Re(r.getHours(),e.length)},m(r,e){return Re(r.getMinutes(),e.length)},s(r,e){return Re(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return Re(i,e.length)}},Ho={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Pm={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return Dr.y(r,e)},Y:function(r,e,t,n){const i=Qv(r,n),s=i>0?i:1-i;if(e==="YY"){const l=s%100;return Re(l,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Re(s,e.length)},R:function(r,e){const t=Jv(r);return Re(t,e.length)},u:function(r,e){const t=r.getFullYear();return Re(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Re(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Re(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return Dr.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return Re(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const i=hN(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Re(i,e.length)},I:function(r,e,t){const n=uN(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Re(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Dr.d(r,e)},D:function(r,e,t){const n=lN(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Re(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Re(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Re(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Re(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const i=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let i;switch(n===12?i=Ho.noon:n===0?i=Ho.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let i;switch(n>=17?i=Ho.evening:n>=12?i=Ho.afternoon:n>=4?i=Ho.morning:i=Ho.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Dr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Dr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Dr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Dr.s(r,e)},S:function(r,e){return Dr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return xm(n);case"XXXX":case"XX":return ao(n);case"XXXXX":case"XXX":default:return ao(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return xm(n);case"xxxx":case"xx":return ao(n);case"xxxxx":case"xxx":default:return ao(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Mm(n,":");case"OOOO":default:return"GMT"+ao(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Mm(n,":");case"zzzz":default:return"GMT"+ao(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Re(n,e.length)},T:function(r,e,t){return Re(+r,e.length)}};function Mm(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?t+String(i):t+String(i)+e+Re(s,2)}function xm(r,e){return r%60===0?(r>0?"-":"+")+Re(Math.abs(r)/60,2):ao(r,e)}function ao(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Re(Math.trunc(n/60),2),s=Re(n%60,2);return t+i+e+s}const Dm=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Xv=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},fN=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Dm(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Dm(n,e)).replace("{{time}}",Xv(i,e))},gN={p:Xv,P:fN},mN=/^D+$/,pN=/^Y+$/,vN=["D","DD","YY","YYYY"];function yN(r){return mN.test(r)}function CN(r){return pN.test(r)}function wN(r,e,t){const n=_N(r,e,t);if(console.warn(n),vN.includes(r))throw new RangeError(n)}function _N(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const TN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,EN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,SN=/^'([^]*?)'?$/,AN=/''/g,bN=/[a-zA-Z]/;function IN(r,e,t){var m,v,C,S,_,A,O,$;const n=kc(),i=(t==null?void 0:t.locale)??n.locale??Fd,s=(t==null?void 0:t.firstWeekContainsDate)??((v=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((A=(_=t==null?void 0:t.locale)==null?void 0:_.options)==null?void 0:A.weekStartsOn)??n.weekStartsOn??(($=(O=n.locale)==null?void 0:O.options)==null?void 0:$.weekStartsOn)??0,d=$n(r,t==null?void 0:t.in);if(!OO(d))throw new RangeError("Invalid time value");let f=e.match(EN).map(V=>{const U=V[0];if(U==="p"||U==="P"){const Q=gN[U];return Q(V,i.formatLong)}return V}).join("").match(TN).map(V=>{if(V==="''")return{isToken:!1,value:"'"};const U=V[0];if(U==="'")return{isToken:!1,value:kN(V)};if(Pm[U])return{isToken:!0,value:V};if(U.match(bN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+U+"`");return{isToken:!1,value:V}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:l,locale:i};return f.map(V=>{if(!V.isToken)return V.value;const U=V.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&CN(U)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&yN(U))&&wN(U,e,String(r));const Q=Pm[U[0]];return Q(d,U,i.localize,g)}).join("")}function kN(r){const e=r.match(SN);return e?e[1].replace(AN,"'"):r}const Lm={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},RN=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?Lm[r].withPreposition:Lm[r].standalone;return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:"vor "+n:n},ON={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},NN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},PN={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},MN={date:Sn({formats:ON,defaultWidth:"full"}),time:Sn({formats:NN,defaultWidth:"full"}),dateTime:Sn({formats:PN,defaultWidth:"full"})},xN={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},DN=(r,e,t,n)=>xN[r],LN={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},BN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},ad={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},UN={narrow:ad.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:ad.wide},VN={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},FN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},HN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},$N=r=>Number(r)+".",KN={ordinalNumber:$N,era:Ze({values:LN,defaultWidth:"wide"}),quarter:Ze({values:BN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:ad,formattingValues:UN,defaultWidth:"wide"}),day:Ze({values:VN,defaultWidth:"wide"}),dayPeriod:Ze({values:FN,defaultWidth:"wide",formattingValues:HN,defaultFormattingWidth:"wide"})},zN=/^(\d+)(\.)?/i,WN=/\d+/i,qN={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},GN={any:[/^v/i,/^n/i]},jN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},YN={any:[/1/i,/2/i,/3/i,/4/i]},JN={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},QN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},XN={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},ZN={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},e0={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},t0={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},n0={ordinalNumber:Rc({matchPattern:zN,parsePattern:WN,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:qN,defaultMatchWidth:"wide",parsePatterns:GN,defaultParseWidth:"any"}),quarter:et({matchPatterns:jN,defaultMatchWidth:"wide",parsePatterns:YN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:JN,defaultMatchWidth:"wide",parsePatterns:QN,defaultParseWidth:"any"}),day:et({matchPatterns:XN,defaultMatchWidth:"wide",parsePatterns:ZN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:e0,defaultMatchWidth:"wide",parsePatterns:t0,defaultParseWidth:"any"})},r0={code:"de",formatDistance:RN,formatLong:MN,formatRelative:DN,localize:KN,match:n0,options:{weekStartsOn:1,firstWeekContainsDate:4}},o0={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},i0=(r,e,t)=>{let n;const i=o0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+n:"il y a "+n:n},a0={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},s0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},c0={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},l0={date:Sn({formats:a0,defaultWidth:"full"}),time:Sn({formats:s0,defaultWidth:"full"}),dateTime:Sn({formats:c0,defaultWidth:"full"})},u0={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},d0=(r,e,t,n)=>u0[r],h0={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},f0={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},g0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},m0={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},p0={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},v0=(r,e)=>{const t=Number(r),n=e==null?void 0:e.unit;if(t===0)return"0";const i=["year","week","hour","minute","second"];let s;return t===1?s=n&&i.includes(n)?"ère":"er":s="ème",t+s},y0=["MMM","MMMM"],C0={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&y0.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:v0,era:Ze({values:h0,defaultWidth:"wide"}),quarter:Ze({values:f0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:g0,defaultWidth:"wide"}),day:Ze({values:m0,defaultWidth:"wide"}),dayPeriod:Ze({values:p0,defaultWidth:"wide"})},w0=/^(\d+)(ième|ère|ème|er|e)?/i,_0=/\d+/i,T0={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},E0={any:[/^av/i,/^ap/i]},S0={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},A0={any:[/1/i,/2/i,/3/i,/4/i]},b0={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},I0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},k0={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},R0={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},O0={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},N0={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},P0={ordinalNumber:Rc({matchPattern:w0,parsePattern:_0,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:T0,defaultMatchWidth:"wide",parsePatterns:E0,defaultParseWidth:"any"}),quarter:et({matchPatterns:S0,defaultMatchWidth:"wide",parsePatterns:A0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:b0,defaultMatchWidth:"wide",parsePatterns:I0,defaultParseWidth:"any"}),day:et({matchPatterns:k0,defaultMatchWidth:"wide",parsePatterns:R0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:O0,defaultMatchWidth:"any",parsePatterns:N0,defaultParseWidth:"any"})},M0={code:"fr",formatDistance:i0,formatLong:l0,formatRelative:d0,localize:C0,match:P0,options:{weekStartsOn:1,firstWeekContainsDate:4}},x0={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},D0=(r,e,t)=>{let n;const i=x0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+n:"há "+n:n},L0={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},B0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},U0={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},V0={date:Sn({formats:L0,defaultWidth:"full"}),time:Sn({formats:B0,defaultWidth:"full"}),dateTime:Sn({formats:U0,defaultWidth:"full"})},F0={lastWeek:r=>{const e=r.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},H0=(r,e,t,n)=>{const i=F0[r];return typeof i=="function"?i(e):i},$0={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},K0={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},z0={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},W0={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},q0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},G0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},j0=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},Y0={ordinalNumber:j0,era:Ze({values:$0,defaultWidth:"wide"}),quarter:Ze({values:K0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:z0,defaultWidth:"wide"}),day:Ze({values:W0,defaultWidth:"wide"}),dayPeriod:Ze({values:q0,defaultWidth:"wide",formattingValues:G0,defaultFormattingWidth:"wide"})},J0=/^(\d+)[ºªo]?/i,Q0=/\d+/i,X0={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Z0={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},eP={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},tP={any:[/1/i,/2/i,/3/i,/4/i]},nP={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},rP={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},oP={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},iP={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},aP={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},sP={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},cP={ordinalNumber:Rc({matchPattern:J0,parsePattern:Q0,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:X0,defaultMatchWidth:"wide",parsePatterns:Z0,defaultParseWidth:"any"}),quarter:et({matchPatterns:eP,defaultMatchWidth:"wide",parsePatterns:tP,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:nP,defaultMatchWidth:"wide",parsePatterns:rP,defaultParseWidth:"any"}),day:et({matchPatterns:oP,defaultMatchWidth:"wide",parsePatterns:iP,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:aP,defaultMatchWidth:"any",parsePatterns:sP,defaultParseWidth:"any"})},lP={code:"pt-BR",formatDistance:D0,formatLong:V0,formatRelative:H0,localize:Y0,match:cP,options:{weekStartsOn:0,firstWeekContainsDate:1}},uP={"en-US":Fd,"pt-BR":lP,"fr-FR":M0,"de-DE":r0};function Zv(r){if(!r)return"";const e=navigator.language,t=uP[e]||Fd;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":IN(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}const dP={class:"d-inline-flex"},hP={class:"d-inline-flex"},fP={class:"d-inline-flex"},ey=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>e.headers?e.headers:e.columns?e.columns.filter(g=>g.checked):[]),n=c.useModel(r,"selection"),i=c.ref(!1),s=c.ref({x:0,y:0}),l=c.ref(null),d=(g,{item:m})=>{g.preventDefault(),l.value=m,s.value={x:g.clientX,y:g.clientY},i.value=!0};function f(g,{item:m}){var C;if(!e.selectOnRowClick||!((C=n.value)!=null&&C.length))return;const v=n.value.findIndex(S=>S===m);v!==-1?n.value.splice(v,1):n.value.push(m)}return(g,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(ov.VMenu,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=v=>i.value=v),style:c.normalizeStyle({top:`${s.value.y}px`,left:`${s.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"contextmenu",{item:l.value})]),_:3},8,["modelValue","style"]),c.createVNode(iv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":m[1]||(m[1]=v=>n.value=v),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:g.items,"items-length":g.items.length,loading:g.loading||!1,"return-object":"","show-select":"","sort-by":g.sortBy,search:g.search,"filter-keys":g.filterKeys,class:"customize-table","onContextmenu:row":d,"onClick:row":f},c.createSlots({top:c.withCtx(()=>[m[2]||(m[2]=c.createElementVNode("span",{class:"mt-4"},null,-1))]),"item.avatar":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"avatar",{item:v})]),"item.active":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"active",{item:v})]),"item.image":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"image",{item:v})]),"item.picture":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"picture",{item:v})]),"item.icon":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"icon",{item:v})]),"item.actions":c.withCtx(({item:v})=>[c.createElementVNode("div",dP,[c.renderSlot(g.$slots,"actions",{item:v})])]),"no-data":c.withCtx(()=>[!g.loading&&g.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode("No records found.")],64)):c.createCommentVNode("",!0)]),_:2},[c.renderList(g.dateFields,v=>({name:`item.${v}`,fn:c.withCtx(({item:C})=>[c.createElementVNode("div",hP,c.toDisplayString(c.unref(Zv)(C[v])),1)])})),g.customFields?{name:`item.${customField}`,fn:c.withCtx(({item:v})=>[c.createElementVNode("div",fP,[c.renderSlot(g.$slots,customField,{item:v})])]),key:"0"}:void 0]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])],64))}}),ty=c.defineComponent({__name:"SearchFilter",props:{search:{},searchModifiers:{}},emits:["update:search"],setup(r){const e=c.useModel(r,"search");return(t,n)=>{const i=c.resolveComponent("SearchIcon");return c.openBlock(),c.createBlock(Ok.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s)},{"prepend-inner":c.withCtx(()=>[c.createVNode(i,{size:"15",class:"ma-1 me-1"})]),_:1},8,["modelValue"])}}}),gP={class:"d-flex align-center"},mP={class:"d-flex align-center justify-end"},pP={class:"d-flex align-center"},vP={class:"d-flex align-center ms-1"},yP=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filters:{}},{filterKeys:{},filterKeysModifiers:{},search:{},searchModifiers:{},columns:{},columnsModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:filterKeys","update:search","update:columns"]),setup(r,{emit:e}){var g,m;const t=e,n=c.useModel(r,"filterKeys"),i=c.useModel(r,"search"),s=c.useModel(r,"columns"),{openDialog:l}=wa("col-settings"),d=c.getCurrentInstance(),f=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((m=d==null?void 0:d.vnode.props)==null?void 0:m["onUpdate:remove"])!==void 0;return(v,C)=>{const S=c.resolveComponent("EraserIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(zd),{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=_=>s.value=_)},null,8,["modelValue"]),c.createVNode(_e.VRow,{class:"align-center",justify:"space-between"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",gP,[c.createVNode(c.unref(km),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ty,{modelValue:i.value,"onUpdate:modelValue":C[1]||(C[1]=_=>i.value=_)},null,8,["modelValue"])])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",mP,[c.renderSlot(v.$slots,"tleft-prepend",{},void 0,!0)])]),_:3}),c.createVNode(_e.VCol,null,{default:c.withCtx(()=>[c.createElementVNode("div",pP,[c.createVNode(ra.VSelect,{items:["Move data","Copy","Duplicate","Loop"],"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a filter",density:"compact",class:"min-w-75 me-2","prepend-inner-icon":c.unref(km),"hide-details":"",multiple:""},null,8,["prepend-inner-icon"]),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(S,{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(CO),{onClick:C[2]||(C[2]=_=>t("refresh")),color:"rgb(var(--v-theme-secondary))"})]),_:1})])]),_:1})]),_:3}),c.createVNode(fo.VDivider,{class:"my-4"}),c.createVNode(_e.VRow,{justify:"space-between",class:"align-center"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto"},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"left-prepend",{},void 0,!0),c.unref(f)?(c.openBlock(),c.createBlock(c.unref(Vd),{key:0,onRemoveAll:C[3]||(C[3]=_=>t("remove"))})):c.createCommentVNode("",!0),c.renderSlot(v.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(_e.VSpacer),c.createVNode(_e.VRow,{justify:"end",class:"align-center me-2 min-h-_JTable-header","no-gutters":""},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"right-prepend",{},void 0,!0),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center me-2"},{default:c.withCtx(()=>[c.createVNode(c.unref(wO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ra.VSelect,{items:v.filters,"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Visualize",density:"compact",class:"min-w-50 me-2",modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=_=>n.value=_),"hide-details":"",multiple:""},null,8,["items","modelValue"])]),_:1}),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center ms-1"},{default:c.withCtx(()=>[c.createVNode(c.unref(vO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ra.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Actions",density:"compact",class:"min-w-50","hide-details":""})]),_:1}),c.createElementVNode("div",vP,[c.createVNode(Be.VBtn,{icon:"",flat:"",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(yO),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"])])]),_:3})]),_:3})],64)}}}),ny=vi(yP,[["__scopeId","data-v-ecaf75ac"]]);/*!
11
+ This will fail in production.`);l=Yi,l._s.has(n)||(Cm(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const g=l._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const m="__hot:"+n,v=Cm(m,Tn({},i),l,!0);d._hotUpdate(v),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&co){const m=c.getCurrentInstance();if(m&&m.proxy&&!d){const v=m.proxy,C="_pStores"in v?v._pStores:v._pStores={};C[n]=g}}return g}return s.$id=n,s}const hR=dR({id:"customizer",state:()=>({Sidebar_drawer:!0,Customizer_drawer:!1,mini_sidebar:!1,setHorizontalLayout:!1,actTheme:"DarkJPLANTheme",fontTheme:"Roboto",inputBg:!1,boxed:!1}),getters:{},actions:{SET_SIDEBAR_DRAWER(){this.Sidebar_drawer=!this.Sidebar_drawer},SET_MINI_SIDEBAR(r){this.mini_sidebar=r},SET_CUSTOMIZER_DRAWER(r){this.Customizer_drawer=r},SET_LAYOUT(r){this.setHorizontalLayout=r},SET_THEME(r){this.actTheme=r},SET_FONT(r){this.fontTheme=r}}}),Fo=c.ref({}),ya=r=>{const e=c.computed(()=>r?Fo.value[r]||!1:Fo.value.default||!1),t=()=>{r?Fo.value[r]=!0:Fo.value.default=!0},n=()=>{r?Fo.value[r]=!1:Fo.value.default=!1};return c.onUnmounted(()=>{n()}),c.onMounted(()=>{n()}),{isDialogActive:e,openDialog:t,closeDialog:n}},ie=c.ref(!1);var fR=Object.defineProperty,wm=Object.getOwnPropertySymbols,gR=Object.prototype.hasOwnProperty,mR=Object.prototype.propertyIsEnumerable,_m=(r,e,t)=>e in r?fR(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Cv=(r,e)=>{for(var t in e||(e={}))gR.call(e,t)&&_m(r,t,e[t]);if(wm)for(var t of wm(e))mR.call(e,t)&&_m(r,t,e[t]);return r},wc=r=>typeof r=="function",_c=r=>typeof r=="string",wv=r=>_c(r)&&r.trim().length>0,pR=r=>typeof r=="number",lo=r=>typeof r>"u",ha=r=>typeof r=="object"&&r!==null,vR=r=>er(r,"tag")&&wv(r.tag),_v=r=>window.TouchEvent&&r instanceof TouchEvent,Tv=r=>er(r,"component")&&Ev(r.component),yR=r=>wc(r)||ha(r),Ev=r=>!lo(r)&&(_c(r)||yR(r)||Tv(r)),Tm=r=>ha(r)&&["height","width","right","left","top","bottom"].every(e=>pR(r[e])),er=(r,e)=>(ha(r)||wc(r))&&e in r,CR=(r=>()=>r++)(0);function wu(r){return _v(r)?r.targetTouches[0].clientX:r.clientX}function Em(r){return _v(r)?r.targetTouches[0].clientY:r.clientY}var wR=r=>{lo(r.remove)?r.parentNode&&r.parentNode.removeChild(r):r.remove()},Ca=r=>Tv(r)?Ca(r.component):vR(r)?c.defineComponent({render(){return r}}):typeof r=="string"?r:c.toRaw(c.unref(r)),_R=r=>{if(typeof r=="string")return r;const e=er(r,"props")&&ha(r.props)?r.props:{},t=er(r,"listeners")&&ha(r.listeners)?r.listeners:{};return{component:Ca(r),props:e,listeners:t}},TR=()=>typeof window<"u",Tc=class{constructor(){this.allHandlers={}}getHandlers(r){return this.allHandlers[r]||[]}on(r,e){const t=this.getHandlers(r);t.push(e),this.allHandlers[r]=t}off(r,e){const t=this.getHandlers(r);t.splice(t.indexOf(e)>>>0,1)}emit(r,e){this.getHandlers(r).forEach(n=>n(e))}},ER=r=>["on","off","emit"].every(e=>er(r,e)&&wc(r[e]));exports.TYPE=void 0;(function(r){r.SUCCESS="success",r.ERROR="error",r.WARNING="warning",r.INFO="info",r.DEFAULT="default"})(exports.TYPE||(exports.TYPE={}));exports.POSITION=void 0;(function(r){r.TOP_LEFT="top-left",r.TOP_CENTER="top-center",r.TOP_RIGHT="top-right",r.BOTTOM_LEFT="bottom-left",r.BOTTOM_CENTER="bottom-center",r.BOTTOM_RIGHT="bottom-right"})(exports.POSITION||(exports.POSITION={}));var nn;(function(r){r.ADD="add",r.DISMISS="dismiss",r.UPDATE="update",r.CLEAR="clear",r.UPDATE_DEFAULTS="update_defaults"})(nn||(nn={}));var Bn="Vue-Toastification",Ln={type:{type:String,default:exports.TYPE.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Sv={type:Ln.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Hs={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Ln.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},td={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Av={transition:{type:[Object,String],default:`${Bn}__bounce`}},SR={position:{type:String,default:exports.POSITION.TOP_RIGHT},draggable:Ln.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Ln.trueBoolean,pauseOnHover:Ln.trueBoolean,closeOnClick:Ln.trueBoolean,timeout:td.timeout,hideProgressBar:td.hideProgressBar,toastClassName:Ln.classNames,bodyClassName:Ln.classNames,icon:Sv.customIcon,closeButton:Hs.component,closeButtonClassName:Hs.classNames,showCloseButtonOnHover:Hs.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Tc}},AR={id:{type:[String,Number],required:!0,default:0},type:Ln.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},bR={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Ln.trueBoolean,maxToasts:{type:Number,default:20},transition:Av.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:r=>r},filterToasts:{type:Function,default:r=>r},containerClassName:Ln.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},wr={CORE_TOAST:SR,TOAST:AR,CONTAINER:bR,PROGRESS_BAR:td,ICON:Sv,TRANSITION:Av,CLOSE_BUTTON:Hs},bv=c.defineComponent({name:"VtProgressBar",props:wr.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Bn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function IR(r,e){return c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(r.style),class:c.normalizeClass(r.cpClass)},null,6)}bv.render=IR;var kR=bv,Iv=c.defineComponent({name:"VtCloseButton",props:wr.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Ca(this.component):"button"},classes(){const r=[`${Bn}__close-button`];return this.showOnHover&&r.push("show-on-hover"),r.concat(this.classNames)}}}),RR=c.createTextVNode(" × ");function OR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.buttonComponent),c.mergeProps({"aria-label":r.ariaLabel,class:r.classes},r.$attrs),{default:c.withCtx(()=>[RR]),_:1},16,["aria-label","class"])}Iv.render=OR;var NR=Iv,kv={},PR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},MR=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),xR=[MR];function DR(r,e){return c.openBlock(),c.createElementBlock("svg",PR,xR)}kv.render=DR;var LR=kv,Rv={},BR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},UR=c.createElementVNode("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),VR=[UR];function FR(r,e){return c.openBlock(),c.createElementBlock("svg",BR,VR)}Rv.render=FR;var Sm=Rv,Ov={},HR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},$R=c.createElementVNode("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),KR=[$R];function zR(r,e){return c.openBlock(),c.createElementBlock("svg",HR,KR)}Ov.render=zR;var WR=Ov,Nv={},qR={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},GR=c.createElementVNode("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),jR=[GR];function YR(r,e){return c.openBlock(),c.createElementBlock("svg",qR,jR)}Nv.render=YR;var JR=Nv,Pv=c.defineComponent({name:"VtIcon",props:wr.ICON,computed:{customIconChildren(){return er(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return _c(this.customIcon)?this.trimValue(this.customIcon):er(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return er(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Ev(this.customIcon)?Ca(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[exports.TYPE.DEFAULT]:Sm,[exports.TYPE.INFO]:Sm,[exports.TYPE.SUCCESS]:LR,[exports.TYPE.ERROR]:JR,[exports.TYPE.WARNING]:WR}[this.type]},iconClasses(){const r=[`${Bn}__icon`];return this.hasCustomIcon?r.concat(this.customIconClass):r}},methods:{trimValue(r,e=""){return wv(r)?r.trim():e}}});function QR(r,e){return c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.component),{class:c.normalizeClass(r.iconClasses)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(r.customIconChildren),1)]),_:1},8,["class"])}Pv.render=QR;var XR=Pv,Mv=c.defineComponent({name:"VtToast",components:{ProgressBar:kR,CloseButton:NR,Icon:XR},inheritAttrs:!1,props:Object.assign({},wr.CORE_TOAST,wr.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const r=[`${Bn}__toast`,`${Bn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&r.push("disable-transition"),this.rtl&&r.push(`${Bn}__toast--rtl`),r},bodyClasses(){return[`${Bn}__toast-${_c(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return Tm(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:er,getVueComponentFromObj:Ca,closeToast(){this.eventBus.emit(nn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const r=this.$el;r.addEventListener("touchstart",this.onDragStart,{passive:!0}),r.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const r=this.$el;r.removeEventListener("touchstart",this.onDragStart),r.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(r){this.beingDragged=!0,this.dragPos={x:wu(r),y:Em(r)},this.dragStart=wu(r),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(r){this.beingDragged&&(r.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:wu(r),y:Em(r)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,Tm(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),ZR=["role"];function eO(r,e){const t=c.resolveComponent("Icon"),n=c.resolveComponent("CloseButton"),i=c.resolveComponent("ProgressBar");return c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.classes),style:c.normalizeStyle(r.draggableStyle),onClick:e[0]||(e[0]=(...s)=>r.clickHandler&&r.clickHandler(...s)),onMouseenter:e[1]||(e[1]=(...s)=>r.hoverPause&&r.hoverPause(...s)),onMouseleave:e[2]||(e[2]=(...s)=>r.hoverPlay&&r.hoverPlay(...s))},[r.icon?(c.openBlock(),c.createBlock(t,{key:0,"custom-icon":r.icon,type:r.type},null,8,["custom-icon","type"])):c.createCommentVNode("v-if",!0),c.createElementVNode("div",{role:r.accessibility.toastRole||"alert",class:c.normalizeClass(r.bodyClasses)},[typeof r.content=="string"?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(c.toDisplayString(r.content),1)],2112)):(c.openBlock(),c.createBlock(c.resolveDynamicComponent(r.getVueComponentFromObj(r.content)),c.mergeProps({key:1,"toast-id":r.id},r.hasProp(r.content,"props")?r.content.props:{},c.toHandlers(r.hasProp(r.content,"listeners")?r.content.listeners:{}),{onCloseToast:r.closeToast}),null,16,["toast-id","onCloseToast"]))],10,ZR),r.closeButton?(c.openBlock(),c.createBlock(n,{key:1,component:r.closeButton,"class-names":r.closeButtonClassName,"show-on-hover":r.showCloseButtonOnHover,"aria-label":r.accessibility.closeButtonLabel,onClick:c.withModifiers(r.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):c.createCommentVNode("v-if",!0),r.timeout?(c.openBlock(),c.createBlock(i,{key:2,"is-running":r.isRunning,"hide-progress-bar":r.hideProgressBar,timeout:r.timeout,onCloseToast:r.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):c.createCommentVNode("v-if",!0)],38)}Mv.render=eO;var tO=Mv,xv=c.defineComponent({name:"VtTransition",props:wr.TRANSITION,emits:["leave"],methods:{hasProp:er,leave(r){r instanceof HTMLElement&&(r.style.left=r.offsetLeft+"px",r.style.top=r.offsetTop+"px",r.style.width=getComputedStyle(r).width,r.style.position="absolute")}}});function nO(r,e){return c.openBlock(),c.createBlock(c.TransitionGroup,{tag:"div","enter-active-class":r.transition.enter?r.transition.enter:`${r.transition}-enter-active`,"move-class":r.transition.move?r.transition.move:`${r.transition}-move`,"leave-active-class":r.transition.leave?r.transition.leave:`${r.transition}-leave-active`,onLeave:r.leave},{default:c.withCtx(()=>[c.renderSlot(r.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}xv.render=nO;var rO=xv,Dv=c.defineComponent({name:"VueToastification",devtools:{hide:!0},components:{Toast:tO,VtTransition:rO},props:Object.assign({},wr.CORE_TOAST,wr.CONTAINER,wr.TRANSITION),data(){return{count:0,positions:Object.values(exports.POSITION),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const r=this.eventBus;r.on(nn.ADD,this.addToast),r.on(nn.CLEAR,this.clearToasts),r.on(nn.DISMISS,this.dismissToast),r.on(nn.UPDATE,this.updateToast),r.on(nn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(r){wc(r)&&(r=await r()),wR(this.$el),r.appendChild(this.$el)},setToast(r){lo(r.id)||(this.toasts[r.id]=r)},addToast(r){r.content=_R(r.content);const e=Object.assign({},this.defaults,r.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[r.type],r),t=this.defaults.filterBeforeCreate(e,this.toastArray);t&&this.setToast(t)},dismissToast(r){const e=this.toasts[r];!lo(e)&&!lo(e.onClose)&&e.onClose(),delete this.toasts[r]},clearToasts(){Object.keys(this.toasts).forEach(r=>{this.dismissToast(r)})},getPositionToasts(r){const e=this.filteredToasts.filter(t=>t.position===r).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?e.reverse():e},updateDefaults(r){lo(r.container)||this.setup(r.container),this.defaults=Object.assign({},this.defaults,r)},updateToast({id:r,options:e,create:t}){this.toasts[r]?(e.timeout&&e.timeout===this.toasts[r].timeout&&e.timeout++,this.setToast(Object.assign({},this.toasts[r],e))):t&&this.addToast(Object.assign({},{id:r},e))},getClasses(r){return[`${Bn}__container`,r].concat(this.defaults.containerClassName)}}});function oO(r,e){const t=c.resolveComponent("Toast"),n=c.resolveComponent("VtTransition");return c.openBlock(),c.createElementBlock("div",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.positions,i=>(c.openBlock(),c.createElementBlock("div",{key:i},[c.createVNode(n,{transition:r.defaults.transition,class:c.normalizeClass(r.getClasses(i))},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.getPositionToasts(i),s=>(c.openBlock(),c.createBlock(t,c.mergeProps({key:s.id},s),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Dv.render=oO;var iO=Dv,Am=(r={},e=!0)=>{const t=r.eventBus=r.eventBus||new Tc;e&&c.nextTick(()=>{const s=c.createApp(iO,Cv({},r)),l=s.mount(document.createElement("div")),d=r.onMounted;if(lo(d)||d(l,s),r.shareAppContext){const f=r.shareAppContext;f===!0?console.warn(`[${Bn}] App to share context with was not provided.`):(s._context.components=f._context.components,s._context.directives=f._context.directives,s._context.mixins=f._context.mixins,s._context.provides=f._context.provides,s.config.globalProperties=f.config.globalProperties)}});const n=(s,l)=>{const d=Object.assign({},{id:CR(),type:exports.TYPE.DEFAULT},l,{content:s});return t.emit(nn.ADD,d),d.id};n.clear=()=>t.emit(nn.CLEAR,void 0),n.updateDefaults=s=>{t.emit(nn.UPDATE_DEFAULTS,s)},n.dismiss=s=>{t.emit(nn.DISMISS,s)};function i(s,{content:l,options:d},f=!1){const g=Object.assign({},d,{content:l});t.emit(nn.UPDATE,{id:s,options:g,create:f})}return n.update=i,n.success=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.SUCCESS})),n.info=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.INFO})),n.error=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.ERROR})),n.warning=(s,l)=>n(s,Object.assign({},l,{type:exports.TYPE.WARNING})),n},aO=()=>{const r=()=>console.warn(`[${Bn}] This plugin does not support SSR!`);return new Proxy(r,{get(){return r}})};function fa(r){return TR()?ER(r)?Am({eventBus:r},!1):Am(r,!0):aO()}var Ec=Symbol("VueToastification"),Dd=new Tc,sO=(r,e)=>{(e==null?void 0:e.shareAppContext)===!0&&(e.shareAppContext=r);const t=fa(Cv({eventBus:Dd},e));r.provide(Ec,t)},cO=r=>{const e=fa(r);c.getCurrentInstance()&&c.provide(Ec,e)},Hn=r=>{if(r)return fa(r);const e=c.getCurrentInstance()?c.inject(Ec,void 0):void 0;return e||fa(Dd)},lO=sO;const uO={class:"d-flex align-center"},dO={key:1},hO={class:"ms-auto"},wa=c.defineComponent({__name:"JDialog",props:{ddId:{},variant:{default:"global"},title:{},text:{},width:{default:"500"},reference:{type:Boolean},buttons:{type:Boolean,default:!0},scrim:{default:"background"}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=e,i=c.ref(!1),{isDialogActive:s,closeDialog:l}=ya(t.ddId);async function d(){try{await n("onCancel")}catch(g){console.error(g)}l()}async function f(){i.value=!0;try{await n("onSave")}catch(g){console.error(g)}i.value=!1,l()}return(g,m)=>{const v=c.resolveComponent("ExclamationCircleIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[g.variant==="global"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:0,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[0]||(m[0]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{rounded:"",loading:i.value},{default:c.withCtx(()=>[c.createVNode(lt.VCardTitle,{class:"mt-2 px-5 d-flex"},{default:c.withCtx(()=>[c.createElementVNode("div",uO,[g.$slots.title?c.renderSlot(g.$slots,"title",{key:0}):(c.openBlock(),c.createElementBlock("div",dO,c.toDisplayString(t.title),1))]),c.createElementVNode("div",hO,[c.renderSlot(g.$slots,"heading-actions"),c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})])]),_:3}),c.createVNode(fo.VDivider,{class:"mx-5"}),c.createVNode(lt.VCardText,{class:"overflow-y-scroll"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3}),g.$slots.footer?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.renderSlot(g.$slots,"footer")]),_:3})],64)):c.createCommentVNode("",!0),t.buttons?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createVNode(fo.VDivider,{class:"mx-5 mt-2"}),c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[g.$slots.metadata?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis ma-0 pa-0"},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"metadata")]),_:3})):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[3]||(m[3]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"j-btn-form",variant:"flat",color:"secondary",onClick:f,loading:i.value},{default:c.withCtx(()=>m[4]||(m[4]=[c.createTextVNode(" Save ")])),_:1},8,["loading"])]),_:3})],64)):c.createCommentVNode("",!0)]),_:3},8,["loading"])]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0),g.variant==="confirm"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:1,scrim:"background",width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[1]||(m[1]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(v,{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:d,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:d},{default:c.withCtx(()=>m[5]||(m[5]=[c.createTextVNode(" Cancel")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:f},{default:c.withCtx(()=>m[6]||(m[6]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:1},8,["width","modelValue"])):c.createCommentVNode("",!0),g.variant==="empty"?(c.openBlock(),c.createBlock(Ls.VDialog,{key:2,scrim:t.scrim,width:t.width,modelValue:c.unref(s),"onUpdate:modelValue":m[2]||(m[2]=C=>c.isRef(s)?s.value=C:null),"onClick:outside":d},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"default")]),_:3},8,["scrim","width","modelValue"])):c.createCommentVNode("",!0)],64)}}}),Ld=c.defineComponent({__name:"DeleteAllBtn",emits:["removeAll"],setup(r,{emit:e}){const{openDialog:t}=ya("delete-all-__J"),n=e;return(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(wa,{"dd-id":"delete-all-__J",variant:"confirm",title:"Confirm delete",text:"Are you sure you want to delete all selected items?","on-save":()=>n("removeAll")},null,8,["on-save"]),c.createVNode(Be.VBtn,{onClick:c.unref(t),variant:"plain",color:"secondary","prepend-icon":"mdi-delete"},{default:c.withCtx(()=>s[0]||(s[0]=[c.createTextVNode(" Delete")])),_:1},8,["onClick"])],64))}}),Lv=c.defineComponent({__name:"EditButton",emits:["editAll"],setup(r,{emit:e}){return(t,n)=>(c.openBlock(),c.createBlock(Be.VBtn,{variant:"plain",color:"secondary","prepend-icon":"mdi-pencil"},{default:c.withCtx(()=>n[0]||(n[0]=[c.createTextVNode(" Edit ")])),_:1}))}});var fO={name:"CircleOffIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-circle-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 3l18 18"},null),c.createTextVNode(" ")])}},Bv={name:"DotsVerticalIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots-vertical",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},Uv={name:"DotsIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null),c.createTextVNode(" ")])}},gO={name:"ExclamationCircleIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 9v4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 16v.01"},null),c.createTextVNode(" ")])}},bm={name:"FilterIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-filter",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z"},null),c.createTextVNode(" ")])}},mO={name:"HierarchyIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-hierarchy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M6.5 17.5l5.5 -4.5l5.5 4.5"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M12 7l0 6"},null),c.createTextVNode(" ")])}},pO={name:"LayoutSidebarRightCollapseIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-layout-sidebar-right-collapse",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M15 4v16"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M9 10l2 2l-2 2"},null),c.createTextVNode(" ")])}},vO={name:"RefreshIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-refresh",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"},null),c.createTextVNode(" ")])}},yO={name:"TableIcon",props:{size:{type:[Number,String],default:24}},render(){const r=this.$props.size+"px",e=this.$data.attrs||{},t={width:e.width||r,height:e.height||r};return c.createVNode("svg",c.mergeProps({xmlns:"http://www.w3.org/2000/svg",class:"icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},t),[c.createTextVNode(" "),c.createVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M3 10h18"},null),c.createTextVNode(" "),c.createVNode("path",{d:"M10 3v18"},null),c.createTextVNode(" ")])}};const Vv=c.defineComponent({__name:"DotsMenu",props:{variant:{default:"text"},color:{},orientation:{},size:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:n})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:e.variant},n,{icon:""}),{default:c.withCtx(()=>[e.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Bv),{key:0,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Uv),{key:1,size:e.size,color:`rgb(var(--v-theme-${e.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.renderSlot(e.$slots,"default")]),_:3}))}}),CO={key:0,class:"pa-4 pb-2 text-medium-emphasis"},Fv=c.defineComponent({__name:"DotsMenuV1",props:{variant:{default:"text"},color:{},orientation:{},options:{},size:{}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(c.unref(Ft.VMenu),{"close-on-content-click":!0},{activator:c.withCtx(({props:i})=>[c.createVNode(c.unref(Ft.VBtn),c.mergeProps({variant:t.variant},i,{icon:""}),{default:c.withCtx(()=>[t.orientation==="y"?(c.openBlock(),c.createBlock(c.unref(Bv),{key:0,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"])):(c.openBlock(),c.createBlock(c.unref(Uv),{key:1,size:t.size,color:`rgb(var(--v-theme-${t.color}))`,class:"cursor-pointer"},null,8,["size","color"]))]),_:2},1040,["variant"])]),default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VList),null,{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.options,(i,s)=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:s},[i.title?(c.openBlock(),c.createElementBlock("div",CO,c.toDisplayString(i.title),1)):c.createCommentVNode("",!0),i.action?(c.openBlock(),c.createBlock(c.unref(Ft.VListItem),{key:1,class:"cursor-pointer",onClick:i.action},{default:c.withCtx(()=>[c.createVNode(c.unref(Ft.VListItemTitle),null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(i.name),1)]),_:2},1024)]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),i.divider?(c.openBlock(),c.createBlock(c.unref(Ft.VDivider),{key:2,class:"mt-2"})):c.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1}))}}),Sc=c.defineComponent({__name:"ParentCard",props:{title:{},height:{default:"100%"},loading:{type:Boolean}},setup(r){const e=r;return(t,n)=>(c.openBlock(),c.createBlock(lt.VCard,{height:t.height,loading:t.loading,class:"bg-surface rounded-sm pa-5"},{default:c.withCtx(()=>[e.title?(c.openBlock(),c.createBlock(lt.VCardTitle,{key:0,class:"pa-0"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(e.title),1)]),_:1})):c.createCommentVNode("",!0),c.renderSlot(t.$slots,"default")]),_:3},8,["height","loading"]))}}),Hv=c.defineComponent({__name:"ConfirmDialog",props:{title:{},text:{},width:{},loading:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=r,n=c.ref(!1),i=c.ref(!1);c.onUnmounted(()=>{n.value=!1});const s=e;async function l(){try{await s("onCancel")}catch(f){console.error(f)}n.value=!1}async function d(){i.value=!0;try{await s("onSave")}catch(f){console.error(f)}i.value=!1,n.value=!1}return(f,g)=>(c.openBlock(),c.createBlock(Ls.VDialog,{scrim:"rgb(0,0,0,100)",width:t.width},{activator:c.withCtx(({isActive:m,props:v})=>[c.renderSlot(f.$slots,"button",c.normalizeProps(c.guardReactiveProps({isActive:m,props:v})))]),default:c.withCtx(({isActive:m})=>[c.createVNode(lt.VCard,{loading:i.value,title:t.title,rounded:"","min-height":"300"},{prepend:c.withCtx(()=>[c.createVNode(c.unref(gO),{color:"rgb(var(--v-theme-secondary))"})]),append:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"ms-auto",icon:"mdi-window-close",onClick:l,variant:"plain"})]),default:c.withCtx(()=>[c.createVNode(lt.VCardText,{class:"text-center mt-7"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.text),1)]),_:1}),c.createVNode(lt.VCardActions,{class:"d-flex"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"outlined",color:"secondary",onClick:l},{default:c.withCtx(()=>g[0]||(g[0]=[c.createTextVNode(" Cancel ")])),_:1}),c.createVNode(Be.VBtn,{class:"flex-grow-1",variant:"flat",color:"secondary",onClick:d},{default:c.withCtx(()=>g[1]||(g[1]=[c.createTextVNode(" Confirm")])),_:1})]),_:1})]),_:1},8,["loading","title"])]),_:3},8,["width"]))}}),_u="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",$v=c.defineComponent({__name:"JAvatar",props:{src:{}},setup(r){const e=r,t=c.ref(e.src),n=c.computed(()=>t.value||_u);function i(){t.value=_u}return(s,l)=>(c.openBlock(),c.createBlock(Zp.VAvatar,{size:"50"},{default:c.withCtx(()=>[c.createVNode(ev.VImg,{src:n.value,"lazy-src":_u,onError:i,width:"50",alt:"profile-placeholder"},null,8,["src"])]),_:1}))}}),Tu="https://app-files.jplan.com.br/pub/resources/profile-placeholder.svg",Kv=c.defineComponent({__name:"AvatarPicture",props:{img:{},size:{}},setup(r){const e=r,t=c.ref(e.img),n=c.computed(()=>t.value||Tu);function i(){t.value=Tu}return(s,l)=>(c.openBlock(),c.createBlock(Zp.VAvatar,{size:s.size},{default:c.withCtx(()=>[c.createVNode(ev.VImg,{src:n.value,"lazy-src":Tu,onError:i,width:"40",alt:"Avatar"},null,8,["src"])]),_:1},8,["size"]))}}),wO=c.defineComponent({__name:"ContextMenu",setup(r){const e=c.ref(!1),t=c.ref({x:0,y:0}),n=s=>{s.preventDefault(),t.value={x:s.clientX,y:s.clientY},e.value=!0},i=()=>{e.value=!1};return c.onMounted(()=>{document.addEventListener("click",i)}),c.onUnmounted(()=>{document.removeEventListener("click",i)}),(s,l)=>(c.openBlock(),c.createElementBlock("div",{onContextmenu:c.withModifiers(n,["right"]),class:"relative w-full h-full"},[c.renderSlot(s.$slots,"default",{},void 0,!0),c.createVNode(tv.VMenu,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=d=>e.value=d),style:c.normalizeStyle({top:`${t.value.y}px`,left:`${t.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.renderSlot(s.$slots,"actions",{},void 0,!0)]),_:3})]),_:3},8,["modelValue","style"])],32))}}),vi=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},zv=vi(wO,[["__scopeId","data-v-a53b15af"]]),_O={class:"d-inline-flex"},Wv=c.defineComponent({__name:"UiTable",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>{var i;if(e.headers)return e.headers;if(e.columns)return(i=e.columns)==null?void 0:i.filter(s=>s.checked)}),n=c.useModel(r,"selection");return(i,s)=>(c.openBlock(),c.createBlock(nv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=l=>n.value=l),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:i.items,"items-length":i.items.length,loading:i.loading||!1,"item-value":"_id","return-object":"","show-select":"","sort-by":i.sortBy,class:"customize-table"},{top:c.withCtx(()=>s[1]||(s[1]=[c.createElementVNode("span",{class:"mt-5"},null,-1)])),"item.avatar":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"avatar",{item:l})]),"item.active":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"active",{item:l})]),"item.image":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"image",{item:l})]),"item.picture":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"picture",{item:l})]),"item.icon":c.withCtx(({item:l})=>[c.renderSlot(i.$slots,"icon",{item:l})]),"item.actions":c.withCtx(({item:l})=>[c.createElementVNode("div",_O,[c.renderSlot(i.$slots,"actions",{item:l})])]),"no-data":c.withCtx(()=>[!i.loading&&i.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode(" This table is empty.")],64)):c.createCommentVNode("",!0)]),_:3},8,["modelValue","headers","items","items-length","loading","sort-by"]))}}),qv=6048e5,TO=864e5,Im=Symbol.for("constructDateFrom");function Wr(r,e){return typeof r=="function"?r(e):r&&typeof r=="object"&&Im in r?r[Im](e):r instanceof Date?new r.constructor(e):new Date(e)}function $n(r,e){return Wr(e||r,r)}let EO={};function Ac(){return EO}function ga(r,e){var d,f,g,m;const t=Ac(),n=(e==null?void 0:e.weekStartsOn)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??t.weekStartsOn??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.weekStartsOn)??0,i=$n(r,e==null?void 0:e.in),s=i.getDay(),l=(s<n?7:0)+s-n;return i.setDate(i.getDate()-l),i.setHours(0,0,0,0),i}function ec(r,e){return ga(r,{...e,weekStartsOn:1})}function Gv(r,e){const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=Wr(t,0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);const s=ec(i),l=Wr(t,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const d=ec(l);return t.getTime()>=s.getTime()?n+1:t.getTime()>=d.getTime()?n:n-1}function km(r){const e=$n(r),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+r-+t}function SO(r,...e){const t=Wr.bind(null,e.find(n=>typeof n=="object"));return e.map(t)}function Rm(r,e){const t=$n(r,e==null?void 0:e.in);return t.setHours(0,0,0,0),t}function AO(r,e,t){const[n,i]=SO(t==null?void 0:t.in,r,e),s=Rm(n),l=Rm(i),d=+s-km(s),f=+l-km(l);return Math.round((d-f)/TO)}function bO(r,e){const t=Gv(r,e),n=Wr(r,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ec(n)}function IO(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function kO(r){return!(!IO(r)&&typeof r!="number"||isNaN(+$n(r)))}function RO(r,e){const t=$n(r,e==null?void 0:e.in);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}const OO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},NO=(r,e,t)=>{let n;const i=OO[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:n+" ago":n};function An(r){return(e={})=>{const t=e.width?String(e.width):r.defaultWidth;return r.formats[t]||r.formats[r.defaultWidth]}}const PO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},MO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},DO={date:An({formats:PO,defaultWidth:"full"}),time:An({formats:MO,defaultWidth:"full"}),dateTime:An({formats:xO,defaultWidth:"full"})},LO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},BO=(r,e,t,n)=>LO[r];function Ze(r){return(e,t)=>{const n=t!=null&&t.context?String(t.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const l=r.defaultFormattingWidth||r.defaultWidth,d=t!=null&&t.width?String(t.width):l;i=r.formattingValues[d]||r.formattingValues[l]}else{const l=r.defaultWidth,d=t!=null&&t.width?String(t.width):r.defaultWidth;i=r.values[d]||r.values[l]}const s=r.argumentCallback?r.argumentCallback(e):e;return i[s]}}const UO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},VO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},FO={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},HO={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$O={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},KO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zO=(r,e)=>{const t=Number(r),n=t%100;if(n>20||n<10)switch(n%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},WO={ordinalNumber:zO,era:Ze({values:UO,defaultWidth:"wide"}),quarter:Ze({values:VO,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:FO,defaultWidth:"wide"}),day:Ze({values:HO,defaultWidth:"wide"}),dayPeriod:Ze({values:$O,defaultWidth:"wide",formattingValues:KO,defaultFormattingWidth:"wide"})};function et(r){return(e,t={})=>{const n=t.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=e.match(i);if(!s)return null;const l=s[0],d=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(d)?GO(d,v=>v.test(l)):qO(d,v=>v.test(l));let g;g=r.valueCallback?r.valueCallback(f):f,g=t.valueCallback?t.valueCallback(g):g;const m=e.slice(l.length);return{value:g,rest:m}}}function qO(r,e){for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&e(r[t]))return t}function GO(r,e){for(let t=0;t<r.length;t++)if(e(r[t]))return t}function bc(r){return(e,t={})=>{const n=e.match(r.matchPattern);if(!n)return null;const i=n[0],s=e.match(r.parsePattern);if(!s)return null;let l=r.valueCallback?r.valueCallback(s[0]):s[0];l=t.valueCallback?t.valueCallback(l):l;const d=e.slice(i.length);return{value:l,rest:d}}}const jO=/^(\d+)(th|st|nd|rd)?/i,YO=/\d+/i,JO={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},QO={any:[/^b/i,/^(a|c)/i]},XO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ZO={any:[/1/i,/2/i,/3/i,/4/i]},eN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},rN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},oN={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},iN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},aN={ordinalNumber:bc({matchPattern:jO,parsePattern:YO,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:JO,defaultMatchWidth:"wide",parsePatterns:QO,defaultParseWidth:"any"}),quarter:et({matchPatterns:XO,defaultMatchWidth:"wide",parsePatterns:ZO,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:eN,defaultMatchWidth:"wide",parsePatterns:tN,defaultParseWidth:"any"}),day:et({matchPatterns:nN,defaultMatchWidth:"wide",parsePatterns:rN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:oN,defaultMatchWidth:"any",parsePatterns:iN,defaultParseWidth:"any"})},Bd={code:"en-US",formatDistance:NO,formatLong:DO,formatRelative:BO,localize:WO,match:aN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sN(r,e){const t=$n(r,e==null?void 0:e.in);return AO(t,RO(t))+1}function cN(r,e){const t=$n(r,e==null?void 0:e.in),n=+ec(t)-+bO(t);return Math.round(n/qv)+1}function jv(r,e){var m,v,C,S;const t=$n(r,e==null?void 0:e.in),n=t.getFullYear(),i=Ac(),s=(e==null?void 0:e.firstWeekContainsDate)??((v=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??i.firstWeekContainsDate??((S=(C=i.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=Wr((e==null?void 0:e.in)||r,0);l.setFullYear(n+1,0,s),l.setHours(0,0,0,0);const d=ga(l,e),f=Wr((e==null?void 0:e.in)||r,0);f.setFullYear(n,0,s),f.setHours(0,0,0,0);const g=ga(f,e);return+t>=+d?n+1:+t>=+g?n:n-1}function lN(r,e){var d,f,g,m;const t=Ac(),n=(e==null?void 0:e.firstWeekContainsDate)??((f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??t.firstWeekContainsDate??((m=(g=t.locale)==null?void 0:g.options)==null?void 0:m.firstWeekContainsDate)??1,i=jv(r,e),s=Wr((e==null?void 0:e.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),ga(s,e)}function uN(r,e){const t=$n(r,e==null?void 0:e.in),n=+ga(t,e)-+lN(t,e);return Math.round(n/qv)+1}function Re(r,e){const t=r<0?"-":"",n=Math.abs(r).toString().padStart(e,"0");return t+n}const Dr={y(r,e){const t=r.getFullYear(),n=t>0?t:1-t;return Re(e==="yy"?n%100:n,e.length)},M(r,e){const t=r.getMonth();return e==="M"?String(t+1):Re(t+1,2)},d(r,e){return Re(r.getDate(),e.length)},a(r,e){const t=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(r,e){return Re(r.getHours()%12||12,e.length)},H(r,e){return Re(r.getHours(),e.length)},m(r,e){return Re(r.getMinutes(),e.length)},s(r,e){return Re(r.getSeconds(),e.length)},S(r,e){const t=e.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,t-3));return Re(i,e.length)}},Ho={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Om={G:function(r,e,t){const n=r.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(n,{width:"abbreviated"});case"GGGGG":return t.era(n,{width:"narrow"});case"GGGG":default:return t.era(n,{width:"wide"})}},y:function(r,e,t){if(e==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return t.ordinalNumber(i,{unit:"year"})}return Dr.y(r,e)},Y:function(r,e,t,n){const i=jv(r,n),s=i>0?i:1-i;if(e==="YY"){const l=s%100;return Re(l,2)}return e==="Yo"?t.ordinalNumber(s,{unit:"year"}):Re(s,e.length)},R:function(r,e){const t=Gv(r);return Re(t,e.length)},u:function(r,e){const t=r.getFullYear();return Re(t,e.length)},Q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return Re(n,2);case"Qo":return t.ordinalNumber(n,{unit:"quarter"});case"QQQ":return t.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,e,t){const n=Math.ceil((r.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return Re(n,2);case"qo":return t.ordinalNumber(n,{unit:"quarter"});case"qqq":return t.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,e,t){const n=r.getMonth();switch(e){case"M":case"MM":return Dr.M(r,e);case"Mo":return t.ordinalNumber(n+1,{unit:"month"});case"MMM":return t.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(n,{width:"wide",context:"formatting"})}},L:function(r,e,t){const n=r.getMonth();switch(e){case"L":return String(n+1);case"LL":return Re(n+1,2);case"Lo":return t.ordinalNumber(n+1,{unit:"month"});case"LLL":return t.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(n,{width:"wide",context:"standalone"})}},w:function(r,e,t,n){const i=uN(r,n);return e==="wo"?t.ordinalNumber(i,{unit:"week"}):Re(i,e.length)},I:function(r,e,t){const n=cN(r);return e==="Io"?t.ordinalNumber(n,{unit:"week"}):Re(n,e.length)},d:function(r,e,t){return e==="do"?t.ordinalNumber(r.getDate(),{unit:"date"}):Dr.d(r,e)},D:function(r,e,t){const n=sN(r);return e==="Do"?t.ordinalNumber(n,{unit:"dayOfYear"}):Re(n,e.length)},E:function(r,e,t){const n=r.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(n,{width:"short",context:"formatting"});case"EEEE":default:return t.day(n,{width:"wide",context:"formatting"})}},e:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Re(s,2);case"eo":return t.ordinalNumber(s,{unit:"day"});case"eee":return t.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(i,{width:"short",context:"formatting"});case"eeee":default:return t.day(i,{width:"wide",context:"formatting"})}},c:function(r,e,t,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Re(s,e.length);case"co":return t.ordinalNumber(s,{unit:"day"});case"ccc":return t.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(i,{width:"narrow",context:"standalone"});case"cccccc":return t.day(i,{width:"short",context:"standalone"});case"cccc":default:return t.day(i,{width:"wide",context:"standalone"})}},i:function(r,e,t){const n=r.getDay(),i=n===0?7:n;switch(e){case"i":return String(i);case"ii":return Re(i,e.length);case"io":return t.ordinalNumber(i,{unit:"day"});case"iii":return t.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(n,{width:"short",context:"formatting"});case"iiii":default:return t.day(n,{width:"wide",context:"formatting"})}},a:function(r,e,t){const i=r.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,e,t){const n=r.getHours();let i;switch(n===12?i=Ho.noon:n===0?i=Ho.midnight:i=n/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,e,t){const n=r.getHours();let i;switch(n>=17?i=Ho.evening:n>=12?i=Ho.afternoon:n>=4?i=Ho.morning:i=Ho.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,e,t){if(e==="ho"){let n=r.getHours()%12;return n===0&&(n=12),t.ordinalNumber(n,{unit:"hour"})}return Dr.h(r,e)},H:function(r,e,t){return e==="Ho"?t.ordinalNumber(r.getHours(),{unit:"hour"}):Dr.H(r,e)},K:function(r,e,t){const n=r.getHours()%12;return e==="Ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},k:function(r,e,t){let n=r.getHours();return n===0&&(n=24),e==="ko"?t.ordinalNumber(n,{unit:"hour"}):Re(n,e.length)},m:function(r,e,t){return e==="mo"?t.ordinalNumber(r.getMinutes(),{unit:"minute"}):Dr.m(r,e)},s:function(r,e,t){return e==="so"?t.ordinalNumber(r.getSeconds(),{unit:"second"}):Dr.s(r,e)},S:function(r,e){return Dr.S(r,e)},X:function(r,e,t){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return Pm(n);case"XXXX":case"XX":return ao(n);case"XXXXX":case"XXX":default:return ao(n,":")}},x:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"x":return Pm(n);case"xxxx":case"xx":return ao(n);case"xxxxx":case"xxx":default:return ao(n,":")}},O:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Nm(n,":");case"OOOO":default:return"GMT"+ao(n,":")}},z:function(r,e,t){const n=r.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Nm(n,":");case"zzzz":default:return"GMT"+ao(n,":")}},t:function(r,e,t){const n=Math.trunc(+r/1e3);return Re(n,e.length)},T:function(r,e,t){return Re(+r,e.length)}};function Nm(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?t+String(i):t+String(i)+e+Re(s,2)}function Pm(r,e){return r%60===0?(r>0?"-":"+")+Re(Math.abs(r)/60,2):ao(r,e)}function ao(r,e=""){const t=r>0?"-":"+",n=Math.abs(r),i=Re(Math.trunc(n/60),2),s=Re(n%60,2);return t+i+e+s}const Mm=(r,e)=>{switch(r){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Yv=(r,e)=>{switch(r){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dN=(r,e)=>{const t=r.match(/(P+)(p+)?/)||[],n=t[1],i=t[2];if(!i)return Mm(r,e);let s;switch(n){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Mm(n,e)).replace("{{time}}",Yv(i,e))},hN={p:Yv,P:dN},fN=/^D+$/,gN=/^Y+$/,mN=["D","DD","YY","YYYY"];function pN(r){return fN.test(r)}function vN(r){return gN.test(r)}function yN(r,e,t){const n=CN(r,e,t);if(console.warn(n),mN.includes(r))throw new RangeError(n)}function CN(r,e,t){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${e}\`) for formatting ${n} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_N=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,TN=/^'([^]*?)'?$/,EN=/''/g,SN=/[a-zA-Z]/;function AN(r,e,t){var m,v,C,S,_,b,O,$;const n=Ac(),i=(t==null?void 0:t.locale)??n.locale??Bd,s=(t==null?void 0:t.firstWeekContainsDate)??((v=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:v.firstWeekContainsDate)??n.firstWeekContainsDate??((S=(C=n.locale)==null?void 0:C.options)==null?void 0:S.firstWeekContainsDate)??1,l=(t==null?void 0:t.weekStartsOn)??((b=(_=t==null?void 0:t.locale)==null?void 0:_.options)==null?void 0:b.weekStartsOn)??n.weekStartsOn??(($=(O=n.locale)==null?void 0:O.options)==null?void 0:$.weekStartsOn)??0,d=$n(r,t==null?void 0:t.in);if(!kO(d))throw new RangeError("Invalid time value");let f=e.match(_N).map(V=>{const U=V[0];if(U==="p"||U==="P"){const Q=hN[U];return Q(V,i.formatLong)}return V}).join("").match(wN).map(V=>{if(V==="''")return{isToken:!1,value:"'"};const U=V[0];if(U==="'")return{isToken:!1,value:bN(V)};if(Om[U])return{isToken:!0,value:V};if(U.match(SN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+U+"`");return{isToken:!1,value:V}});i.localize.preprocessor&&(f=i.localize.preprocessor(d,f));const g={firstWeekContainsDate:s,weekStartsOn:l,locale:i};return f.map(V=>{if(!V.isToken)return V.value;const U=V.value;(!(t!=null&&t.useAdditionalWeekYearTokens)&&vN(U)||!(t!=null&&t.useAdditionalDayOfYearTokens)&&pN(U))&&yN(U,e,String(r));const Q=Om[U[0]];return Q(d,U,i.localize,g)}).join("")}function bN(r){const e=r.match(TN);return e?e[1].replace(EN,"'"):r}const xm={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},IN=(r,e,t)=>{let n;const i=t!=null&&t.addSuffix?xm[r].withPreposition:xm[r].standalone;return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+n:"vor "+n:n},kN={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},RN={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ON={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},NN={date:An({formats:kN,defaultWidth:"full"}),time:An({formats:RN,defaultWidth:"full"}),dateTime:An({formats:ON,defaultWidth:"full"})},PN={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},MN=(r,e,t,n)=>PN[r],xN={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},DN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},nd={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},LN={narrow:nd.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:nd.wide},BN={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},UN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},VN={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},FN=r=>Number(r)+".",HN={ordinalNumber:FN,era:Ze({values:xN,defaultWidth:"wide"}),quarter:Ze({values:DN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:nd,formattingValues:LN,defaultWidth:"wide"}),day:Ze({values:BN,defaultWidth:"wide"}),dayPeriod:Ze({values:UN,defaultWidth:"wide",formattingValues:VN,defaultFormattingWidth:"wide"})},$N=/^(\d+)(\.)?/i,KN=/\d+/i,zN={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},WN={any:[/^v/i,/^n/i]},qN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},GN={any:[/1/i,/2/i,/3/i,/4/i]},jN={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},YN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},JN={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},QN={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},XN={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},ZN={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},e0={ordinalNumber:bc({matchPattern:$N,parsePattern:KN,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:zN,defaultMatchWidth:"wide",parsePatterns:WN,defaultParseWidth:"any"}),quarter:et({matchPatterns:qN,defaultMatchWidth:"wide",parsePatterns:GN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:jN,defaultMatchWidth:"wide",parsePatterns:YN,defaultParseWidth:"any"}),day:et({matchPatterns:JN,defaultMatchWidth:"wide",parsePatterns:QN,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:XN,defaultMatchWidth:"wide",parsePatterns:ZN,defaultParseWidth:"any"})},t0={code:"de",formatDistance:IN,formatLong:NN,formatRelative:MN,localize:HN,match:e0,options:{weekStartsOn:1,firstWeekContainsDate:4}},n0={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},r0=(r,e,t)=>{let n;const i=n0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"dans "+n:"il y a "+n:n},o0={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},i0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},a0={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},s0={date:An({formats:o0,defaultWidth:"full"}),time:An({formats:i0,defaultWidth:"full"}),dateTime:An({formats:a0,defaultWidth:"full"})},c0={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},l0=(r,e,t,n)=>c0[r],u0={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},d0={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},h0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},f0={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},g0={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},m0=(r,e)=>{const t=Number(r),n=e==null?void 0:e.unit;if(t===0)return"0";const i=["year","week","hour","minute","second"];let s;return t===1?s=n&&i.includes(n)?"ère":"er":s="ème",t+s},p0=["MMM","MMMM"],v0={preprocessor:(r,e)=>r.getDate()===1||!e.some(n=>n.isToken&&p0.includes(n.value))?e:e.map(n=>n.isToken&&n.value==="do"?{isToken:!0,value:"d"}:n),ordinalNumber:m0,era:Ze({values:u0,defaultWidth:"wide"}),quarter:Ze({values:d0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:h0,defaultWidth:"wide"}),day:Ze({values:f0,defaultWidth:"wide"}),dayPeriod:Ze({values:g0,defaultWidth:"wide"})},y0=/^(\d+)(ième|ère|ème|er|e)?/i,C0=/\d+/i,w0={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},_0={any:[/^av/i,/^ap/i]},T0={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},E0={any:[/1/i,/2/i,/3/i,/4/i]},S0={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},A0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},b0={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},I0={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},k0={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},R0={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},O0={ordinalNumber:bc({matchPattern:y0,parsePattern:C0,valueCallback:r=>parseInt(r)}),era:et({matchPatterns:w0,defaultMatchWidth:"wide",parsePatterns:_0,defaultParseWidth:"any"}),quarter:et({matchPatterns:T0,defaultMatchWidth:"wide",parsePatterns:E0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:S0,defaultMatchWidth:"wide",parsePatterns:A0,defaultParseWidth:"any"}),day:et({matchPatterns:b0,defaultMatchWidth:"wide",parsePatterns:I0,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:k0,defaultMatchWidth:"any",parsePatterns:R0,defaultParseWidth:"any"})},N0={code:"fr",formatDistance:r0,formatLong:s0,formatRelative:l0,localize:v0,match:O0,options:{weekStartsOn:1,firstWeekContainsDate:4}},P0={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},M0=(r,e,t)=>{let n;const i=P0[r];return typeof i=="string"?n=i:e===1?n=i.one:n=i.other.replace("{{count}}",String(e)),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"em "+n:"há "+n:n},x0={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},D0={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},L0={full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},B0={date:An({formats:x0,defaultWidth:"full"}),time:An({formats:D0,defaultWidth:"full"}),dateTime:An({formats:L0,defaultWidth:"full"})},U0={lastWeek:r=>{const e=r.getDay();return"'"+(e===0||e===6?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},V0=(r,e,t,n)=>{const i=U0[r];return typeof i=="function"?i(e):i},F0={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},H0={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},$0={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},K0={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},z0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},W0={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},q0=(r,e)=>{const t=Number(r);return(e==null?void 0:e.unit)==="week"?t+"ª":t+"º"},G0={ordinalNumber:q0,era:Ze({values:F0,defaultWidth:"wide"}),quarter:Ze({values:H0,defaultWidth:"wide",argumentCallback:r=>r-1}),month:Ze({values:$0,defaultWidth:"wide"}),day:Ze({values:K0,defaultWidth:"wide"}),dayPeriod:Ze({values:z0,defaultWidth:"wide",formattingValues:W0,defaultFormattingWidth:"wide"})},j0=/^(\d+)[ºªo]?/i,Y0=/\d+/i,J0={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},Q0={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},X0={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Z0={any:[/1/i,/2/i,/3/i,/4/i]},eP={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},tP={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},nP={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},rP={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},oP={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},iP={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},aP={ordinalNumber:bc({matchPattern:j0,parsePattern:Y0,valueCallback:r=>parseInt(r,10)}),era:et({matchPatterns:J0,defaultMatchWidth:"wide",parsePatterns:Q0,defaultParseWidth:"any"}),quarter:et({matchPatterns:X0,defaultMatchWidth:"wide",parsePatterns:Z0,defaultParseWidth:"any",valueCallback:r=>r+1}),month:et({matchPatterns:eP,defaultMatchWidth:"wide",parsePatterns:tP,defaultParseWidth:"any"}),day:et({matchPatterns:nP,defaultMatchWidth:"wide",parsePatterns:rP,defaultParseWidth:"any"}),dayPeriod:et({matchPatterns:oP,defaultMatchWidth:"any",parsePatterns:iP,defaultParseWidth:"any"})},sP={code:"pt-BR",formatDistance:M0,formatLong:B0,formatRelative:V0,localize:G0,match:aP,options:{weekStartsOn:0,firstWeekContainsDate:1}},cP={"en-US":Bd,"pt-BR":sP,"fr-FR":N0,"de-DE":t0};function Jv(r){if(!r)return"";const e=navigator.language,t=cP[e]||Bd;try{const n=typeof r=="string"||r===null?new Date(r||""):r;return isNaN(n.getTime())?"":AN(n,"MMMM dd yyyy, HH:mm:ss",{locale:t})}catch(n){return console.error("Error formatting date:",n),""}}const lP={class:"d-inline-flex"},uP={class:"d-inline-flex"},dP={class:"d-inline-flex"},Qv=c.defineComponent({__name:"TableAdvanced",props:c.mergeModels({headers:{},items:{default:()=>[]},actions:{},loading:{type:Boolean},columns:{default:()=>[]},sortBy:{},dateFields:{},customFields:{},search:{},filterKeys:{},selectOnRowClick:{type:Boolean}},{selection:{},selectionModifiers:{}}),emits:["update:selection"],setup(r){const e=r,t=c.computed(()=>e.headers?e.headers:e.columns?e.columns.filter(g=>g.checked):[]),n=c.useModel(r,"selection"),i=c.ref(!1),s=c.ref({x:0,y:0}),l=c.ref(null),d=(g,{item:m})=>{g.preventDefault(),l.value=m,s.value={x:g.clientX,y:g.clientY},i.value=!0};function f(g,{item:m}){var C;if(!e.selectOnRowClick||!((C=n.value)!=null&&C.length))return;const v=n.value.findIndex(S=>S===m);v!==-1?n.value.splice(v,1):n.value.push(m)}return(g,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(tv.VMenu,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=v=>i.value=v),style:c.normalizeStyle({top:`${s.value.y}px`,left:`${s.value.x}px`,position:"absolute"})},{default:c.withCtx(()=>[c.renderSlot(g.$slots,"contextmenu",{item:l.value})]),_:3},8,["modelValue","style"]),c.createVNode(nv.VDataTable,{modelValue:n.value,"onUpdate:modelValue":m[1]||(m[1]=v=>n.value=v),"fixed-header":"","fixed-footer":"","items-per-page":"10",headers:t.value,items:g.items,"items-length":g.items.length,loading:g.loading||!1,"return-object":"","show-select":"","sort-by":g.sortBy,search:g.search,"filter-keys":g.filterKeys,class:"customize-table","onContextmenu:row":d,"onClick:row":f},c.createSlots({top:c.withCtx(()=>[m[2]||(m[2]=c.createElementVNode("span",{class:"mt-4"},null,-1))]),"item.avatar":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"avatar",{item:v})]),"item.active":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"active",{item:v})]),"item.image":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"image",{item:v})]),"item.picture":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"picture",{item:v})]),"item.icon":c.withCtx(({item:v})=>[c.renderSlot(g.$slots,"icon",{item:v})]),"item.actions":c.withCtx(({item:v})=>[c.createElementVNode("div",lP,[c.renderSlot(g.$slots,"actions",{item:v})])]),"no-data":c.withCtx(()=>[!g.loading&&g.items.length===0?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createTextVNode("No records found.")],64)):c.createCommentVNode("",!0)]),_:2},[c.renderList(g.dateFields,v=>({name:`item.${v}`,fn:c.withCtx(({item:C})=>[c.createElementVNode("div",uP,c.toDisplayString(c.unref(Jv)(C[v])),1)])})),g.customFields?{name:`item.${customField}`,fn:c.withCtx(({item:v})=>[c.createElementVNode("div",dP,[c.renderSlot(g.$slots,customField,{item:v})])]),key:"0"}:void 0]),1032,["modelValue","headers","items","items-length","loading","sort-by","search","filter-keys"])],64))}}),Xv=c.defineComponent({__name:"SearchFilter",props:{search:{},searchModifiers:{}},emits:["update:search"],setup(r){const e=c.useModel(r,"search");return(t,n)=>{const i=c.resolveComponent("SearchIcon");return c.openBlock(),c.createBlock(kk.VTextField,{class:"bg-containerBg pa-1 rounded-sm elevation-1","persistent-placeholder":"",placeholder:"Search",variant:"plain","hide-details":"",density:"compact",modelValue:e.value,"onUpdate:modelValue":n[0]||(n[0]=s=>e.value=s)},{"prepend-inner":c.withCtx(()=>[c.createVNode(i,{size:"15",class:"ma-1 me-1"})]),_:1},8,["modelValue"])}}}),hP={class:"d-flex align-center"},fP={class:"d-flex align-center justify-end"},gP={class:"d-flex align-center"},mP={class:"d-flex align-center ms-1"},pP=c.defineComponent({__name:"TableHeader",props:c.mergeModels({columns:{},filters:{}},{filterKeys:{},filterKeysModifiers:{},search:{},searchModifiers:{},columns:{},columnsModifiers:{}}),emits:c.mergeModels(["refresh","remove"],["update:filterKeys","update:search","update:columns"]),setup(r,{emit:e}){var g,m;const t=e,n=c.useModel(r,"filterKeys"),i=c.useModel(r,"search"),s=c.useModel(r,"columns"),{openDialog:l}=ya("col-settings"),d=c.getCurrentInstance(),f=((g=d==null?void 0:d.vnode.props)==null?void 0:g.onRemove)!==void 0||((m=d==null?void 0:d.vnode.props)==null?void 0:m["onUpdate:remove"])!==void 0;return(v,C)=>{const S=c.resolveComponent("EraserIcon");return c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(c.unref(Hd),{modelValue:s.value,"onUpdate:modelValue":C[0]||(C[0]=_=>s.value=_)},null,8,["modelValue"]),c.createVNode(_e.VRow,{class:"align-center",justify:"space-between"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",hP,[c.createVNode(c.unref(bm),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(Xv,{modelValue:i.value,"onUpdate:modelValue":C[1]||(C[1]=_=>i.value=_)},null,8,["modelValue"])])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"3"},{default:c.withCtx(()=>[c.createElementVNode("div",fP,[c.renderSlot(v.$slots,"tleft-prepend",{},void 0,!0)])]),_:3}),c.createVNode(_e.VCol,null,{default:c.withCtx(()=>[c.createElementVNode("div",gP,[c.createVNode(ta.VSelect,{items:["Move data","Copy","Duplicate","Loop"],"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a filter",density:"compact",class:"min-w-75 me-2","prepend-inner-icon":c.unref(bm),"hide-details":"",multiple:""},null,8,["prepend-inner-icon"]),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(S,{color:"rgb(var(--v-theme-secondary))"})]),_:1}),c.createVNode(Be.VBtn,{icon:"",variant:"text"},{default:c.withCtx(()=>[c.createVNode(c.unref(vO),{onClick:C[2]||(C[2]=_=>t("refresh")),color:"rgb(var(--v-theme-secondary))"})]),_:1})])]),_:1})]),_:3}),c.createVNode(fo.VDivider,{class:"my-4"}),c.createVNode(_e.VRow,{justify:"space-between",class:"align-center"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto"},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"left-prepend",{},void 0,!0),c.unref(f)?(c.openBlock(),c.createBlock(c.unref(Ld),{key:0,onRemoveAll:C[3]||(C[3]=_=>t("remove"))})):c.createCommentVNode("",!0),c.renderSlot(v.$slots,"left-append",{},void 0,!0)]),_:3}),c.createVNode(_e.VSpacer),c.createVNode(_e.VRow,{justify:"end",class:"align-center me-2 min-h-_JTable-header","no-gutters":""},{default:c.withCtx(()=>[c.renderSlot(v.$slots,"right-prepend",{},void 0,!0),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center me-2"},{default:c.withCtx(()=>[c.createVNode(c.unref(yO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ta.VSelect,{items:v.filters,"item-value":"key",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Visualize",density:"compact",class:"min-w-50 me-2",modelValue:n.value,"onUpdate:modelValue":C[4]||(C[4]=_=>n.value=_),"hide-details":"",multiple:""},null,8,["items","modelValue"])]),_:1}),c.createVNode(_e.VCol,{cols:"4",class:"d-flex align-center ms-1"},{default:c.withCtx(()=>[c.createVNode(c.unref(mO),{class:"me-2",color:"rgb(var(--v-theme-secondary))"}),c.createVNode(ta.VSelect,{items:["Move data","Copy","Duplicate","Loop"],variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Actions",density:"compact",class:"min-w-50","hide-details":""})]),_:1}),c.createElementVNode("div",mP,[c.createVNode(Be.VBtn,{icon:"",flat:"",onClick:c.unref(l)},{default:c.withCtx(()=>[c.createVNode(c.unref(pO),{color:"rgb(var(--v-theme-secondary))"})]),_:1},8,["onClick"])])]),_:3})]),_:3})],64)}}}),Zv=vi(pP,[["__scopeId","data-v-ecaf75ac"]]);/*!
12
12
  * vue-draggable-next v2.2.0
13
13
  * (c) 2023 Anish George
14
14
  * @license MIT
@@ -17,58 +17,58 @@ This will fail in production.`);l=Qi,l._s.has(n)||(_m(n,i,l),process.env.NODE_EN
17
17
  * @author RubaXa <trash@rubaxa.org>
18
18
  * @author owenm <owen23355@gmail.com>
19
19
  * @license MIT
20
- */function Bm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function rr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bm(Object(t),!0).forEach(function(n){CP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Bm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Ws(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ws=function(e){return typeof e}:Ws=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ws(r)}function CP(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(){return Er=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Er.apply(this,arguments)}function wP(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function _P(r,e){if(r==null)return{};var t=wP(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var TP="1.14.0";function _r(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Ar=_r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ea=_r(/Edge/i),Um=_r(/firefox/i),oa=_r(/safari/i)&&!_r(/chrome/i)&&!_r(/android/i),ry=_r(/iP(ad|od|hone)/i),EP=_r(/chrome/i)&&_r(/android/i),oy={capture:!1,passive:!1};function Ae(r,e,t){r.addEventListener(e,t,!Ar&&oy)}function Ce(r,e,t){r.removeEventListener(e,t,!Ar&&oy)}function oc(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function SP(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Yn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&oc(r,e):oc(r,e))||n&&r===t)return r;if(r===t)break}while(r=SP(r))}return null}var Vm=/\s+/g;function Jt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Vm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Vm," ")}}function re(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ci(r,e){var t="";if(typeof r=="string")t=r;else do{var n=re(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function iy(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function tr(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,v;if(r!==window&&r.parentNode&&r!==tr()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,v=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,v=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Ar))do if(i&&i.getBoundingClientRect&&(re(i,"transform")!=="none"||t&&re(i,"position")!=="static")){var C=i.getBoundingClientRect();l-=C.top+parseInt(re(i,"border-top-width")),d-=C.left+parseInt(re(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=ci(i||r),_=S&&S.a,A=S&&S.d;S&&(l/=A,d/=_,v/=_,m/=A,f=l+m,g=d+v)}return{top:l,left:d,bottom:f,right:g,width:v,height:m}}}function Fm(r,e,t){for(var n=Kr(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===tr())break;n=Kr(n,!1)}return!1}function hi(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==oe.ghost&&(n||l[s]!==oe.dragged)&&Yn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Hd(r,e){for(var t=r.lastElementChild;t&&(t===oe.ghost||re(t,"display")==="none"||e&&!oc(t,e));)t=t.previousElementSibling;return t||null}function En(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==oe.clone&&(!e||oc(r,e))&&t++;return t}function Hm(r){var e=0,t=0,n=tr();if(r)do{var i=ci(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function AP(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Kr(r,e){if(!r||!r.getBoundingClientRect)return tr();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=re(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return tr();if(n||e)return t;n=!0}}while(t=t.parentNode);return tr()}function bP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Iu(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ia;function ay(r,e){return function(){if(!ia){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ia=setTimeout(function(){ia=void 0},e)}}}function IP(){clearTimeout(ia),ia=void 0}function sy(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function cy(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var rn="Sortable"+new Date().getTime();function kP(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(re(i,"display")==="none"||i===oe.ghost)){r.push({target:i,rect:it(i)});var s=rr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=ci(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(AP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,v=it(g),C=g.prevFromRect,S=g.prevToRect,_=d.rect,A=ci(g,!0);A&&(v.top-=A.f,v.left-=A.e),g.toRect=v,g.thisAnimationDuration&&Iu(C,v)&&!Iu(m,v)&&(_.top-v.top)/(_.left-v.left)===(m.top-v.top)/(m.left-v.left)&&(f=OP(_,C,S,i.options)),Iu(v,m)||(g.prevFromRect=m,g.prevToRect=v,f||(f=i.options.animation),i.animate(g,_,v,f)),f&&(s=!0,l=Math.max(l,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){re(n,"transition",""),re(n,"transform","");var d=ci(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),v=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!v,re(n,"transform","translate3d("+m+"px,"+v+"px,0)"),this.forRepaintDummy=RP(n),re(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),re(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){re(n,"transition",""),re(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function RP(r){return r.offsetWidth}function OP(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var $o=[],ku={initializeByDefault:!0},Sa={mount:function(e){for(var t in ku)ku.hasOwnProperty(t)&&!(t in e)&&(e[t]=ku[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](rr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](rr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Er(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.forEach(function(i){typeof i.eventProperties=="function"&&Er(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function NP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,v=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,_=r.extraEventProperties;if(e=e||t&&t[rn],!!e){var A,O=e.options,$="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ar&&!Ea?A=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(A=document.createEvent("Event"),A.initEvent(n,!0,!0)),A.to=l||t,A.from=d||t,A.item=i||t,A.clone=s,A.oldIndex=f,A.newIndex=g,A.oldDraggableIndex=m,A.newDraggableIndex=v,A.originalEvent=C,A.pullMode=S?S.lastPutMode:void 0;var V=rr(rr({},_),Sa.getEventProperties(n,e));for(var U in V)A[U]=V[U];t&&t.dispatchEvent(A),O[$]&&O[$].call(e,A)}}var PP=["evt"],Ut=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=_P(n,PP);Sa.pluginEvent.bind(oe)(e,t,rr({dragEl:H,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:qs,cloneEl:Ge,cloneHidden:Vr,dragStarted:Xi,putSortable:vt,activeSortable:oe.active,originalEvent:i,oldIndex:oi,oldDraggableIndex:aa,newIndex:Qt,newDraggableIndex:Ur,hideGhostForTarget:hy,unhideGhostForTarget:fy,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(d){Nt({sortable:t,name:d,originalEvent:i})}},s))};function Nt(r){NP(rr({putSortable:vt,cloneEl:Ge,targetEl:H,rootEl:Fe,oldIndex:oi,oldDraggableIndex:aa,newIndex:Qt,newDraggableIndex:Ur},r))}var H,qe,le,Fe,so,qs,Ge,Vr,oi,Qt,aa,Ur,Es,vt,Qo=!1,ic=!1,ac=[],ro,Pn,Ru,Ou,$m,Km,Xi,Ko,sa,ca=!1,Ss=!1,Gs,Et,Nu=[],sd=!1,sc=[],Oc=typeof document<"u",As=ry,zm=Ea||Ar?"cssFloat":"float",MP=Oc&&!EP&&!ry&&"draggable"in document.createElement("div"),ly=function(){if(Oc){if(Ar)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),uy=function(e,t){var n=re(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=hi(e,0,t),l=hi(e,1,t),d=s&&re(s),f=l&&re(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&d.float&&d.float!=="none"){var v=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===v)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[zm]==="none"||l&&n[zm]==="none"&&g+m>i)?"vertical":"horizontal"},xP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+l/2===d+g/2},DP=function(e,t){var n;return ac.some(function(i){var s=i[rn].options.emptyInsertThreshold;if(!(!s||Hd(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},dy=function(e){function t(s,l){return function(d,f,g,m){var v=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||v))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var C=(l?d:f).options.group.name;return s===!0||typeof s=="string"&&s===C||s.join&&s.indexOf(C)>-1}}var n={},i=e.group;(!i||Ws(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},hy=function(){!ly&&le&&re(le,"display","none")},fy=function(){!ly&&le&&re(le,"display","")};Oc&&document.addEventListener("click",function(r){if(ic)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),ic=!1,!1},!0);var oo=function(e){if(H){e=e.touches?e.touches[0]:e;var t=DP(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[rn]._onDragOver(n)}}},LP=function(e){H&&H.parentNode[rn]._isOutsideThisEl(e.target)};function oe(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Er({},e),r[rn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return uy(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:oe.supportPointer!==!1&&"PointerEvent"in window&&!oa,emptyInsertThreshold:5};Sa.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);dy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:MP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ae(r,"pointerdown",this._onTapStart):(Ae(r,"mousedown",this._onTapStart),Ae(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(r,"dragover",this),Ae(r,"dragenter",this)),ac.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Er(this,kP())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,H):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,m=i.filter;if(zP(n),!H&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&oa&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Yn(f,i.draggable,n,!1),!(f&&f.animated)&&qs!==f)){if(oi=En(f),aa=En(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Nt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Ut("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(v){if(v=Yn(g,v.trim(),n,!1),v)return Nt({sortable:t,rootEl:v,name:"filter",targetEl:f,fromEl:n,toEl:n}),Ut("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!Yn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!H&&n.parentNode===s){var g=it(n);if(Fe=s,H=n,qe=H.parentNode,so=H.nextSibling,qs=n,Es=l.group,oe.dragged=H,ro={target:H,clientX:(t||e).clientX,clientY:(t||e).clientY},$m=ro.clientX-g.left,Km=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,H.style["will-change"]="all",f=function(){if(Ut("delayEnded",i,{evt:e}),oe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Um&&i.nativeDraggable&&(H.draggable=!0),i._triggerDragStart(e,t),Nt({sortable:i,name:"choose",originalEvent:e}),Jt(H,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){iy(H,m.trim(),Pu)}),Ae(d,"dragover",oo),Ae(d,"mousemove",oo),Ae(d,"touchmove",oo),Ae(d,"mouseup",i._onDrop),Ae(d,"touchend",i._onDrop),Ae(d,"touchcancel",i._onDrop),Um&&this.nativeDraggable&&(this.options.touchStartThreshold=4,H.draggable=!0),Ut("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ea||Ar))){if(oe.eventCanceled){this._onDrop();return}Ae(d,"mouseup",i._disableDelayedDrag),Ae(d,"touchend",i._disableDelayedDrag),Ae(d,"touchcancel",i._disableDelayedDrag),Ae(d,"mousemove",i._delayedDragTouchMoveHandler),Ae(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Ae(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){H&&Pu(H),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Ae(document,"pointermove",this._onTouchMove):t?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(H,"dragend",this),Ae(Fe,"dragstart",this._onDragStart));try{document.selection?js(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Fe&&H){Ut("dragStarted",this,{evt:t}),this.nativeDraggable&&Ae(document,"dragover",LP);var n=this.options;!e&&Jt(H,n.dragClass,!1),Jt(H,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),Nt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Pn){this._lastX=Pn.clientX,this._lastY=Pn.clientY,hy();for(var e=document.elementFromPoint(Pn.clientX,Pn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Pn.clientX,Pn.clientY),e!==t);)t=e;if(H.parentNode[rn]._isOutsideThisEl(e),t)do{if(t[rn]){var n=void 0;if(n=t[rn]._onDragOver({clientX:Pn.clientX,clientY:Pn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);fy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&ci(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=As&&Et&&Hm(Et),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-Nu[0]:0)/(d||1),v=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-Nu[1]:0)/(f||1);if(!oe.active&&!Qo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){l?(l.e+=m-(Ru||0),l.f+=v-(Ou||0)):l={a:1,b:0,c:0,d:1,e:m,f:v};var C="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");re(le,"webkitTransform",C),re(le,"mozTransform",C),re(le,"msTransform",C),re(le,"transform",C),Ru=m,Ou=v,Pn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(H,!0,As,!0,e),n=this.options;if(As){for(Et=e;re(Et,"position")==="static"&&re(Et,"transform")==="none"&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=tr()),t.top+=Et.scrollTop,t.left+=Et.scrollLeft):Et=tr(),Nu=Hm(Et)}le=H.cloneNode(!0),Jt(le,n.ghostClass,!1),Jt(le,n.fallbackClass,!0),Jt(le,n.dragClass,!0),re(le,"transition",""),re(le,"transform",""),re(le,"box-sizing","border-box"),re(le,"margin",0),re(le,"top",t.top),re(le,"left",t.left),re(le,"width",t.width),re(le,"height",t.height),re(le,"opacity","0.8"),re(le,"position",As?"absolute":"fixed"),re(le,"zIndex","100000"),re(le,"pointerEvents","none"),oe.ghost=le,e.appendChild(le),re(le,"transform-origin",$m/parseInt(le.style.width)*100+"% "+Km/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Ut("dragStart",this,{evt:e}),oe.eventCanceled){this._onDrop();return}Ut("setupClone",this),oe.eventCanceled||(Ge=cy(H),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Jt(Ge,this.options.chosenClass,!1),oe.clone=Ge),n.cloneId=js(function(){Ut("clone",n),!oe.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,H),n._hideClone(),Nt({sortable:n,name:"clone"}))}),!t&&Jt(H,s.dragClass,!0),t?(ic=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,H)),Ae(document,"drop",n),re(H,"transform","translateZ(0)")),Qo=!0,n._dragStartId=js(n._dragStarted.bind(n,t,e)),Ae(document,"selectstart",n),Xi=!0,oa&&re(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=oe.active,m=Es===f,v=d.sort,C=vt||g,S,_=this,A=!1;if(sd)return;function O(Qe,wt){Ut(Qe,_,rr({evt:e,isOwner:m,axis:S?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:v,fromSortable:C,target:n,completed:V,onMove:function(Kt,el){return bs(Fe,t,H,i,Kt,it(Kt),e,el)},changed:U},wt))}function $(){O("dragOverAnimationCapture"),_.captureAnimationState(),_!==C&&C.captureAnimationState()}function V(Qe){return O("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(_),_!==C&&(Jt(H,vt?vt.options.ghostClass:g.options.ghostClass,!1),Jt(H,d.ghostClass,!0)),vt!==_&&_!==oe.active?vt=_:_===oe.active&&vt&&(vt=null),C===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){O("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===H&&!H.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(H.parentNode[rn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),A=!0}function U(){Qt=En(H),Ur=En(H,d.draggable),Nt({sortable:_,name:"change",toEl:t,newIndex:Qt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Yn(n,d.draggable,t,!0),O("dragOver"),oe.eventCanceled)return A;if(H.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return V(!1);if(ic=!1,g&&!d.disabled&&(m?v||(l=qe!==Fe):vt===this||(this.lastPutMode=Es.checkPull(this,g,H,e))&&f.checkPut(this,g,H,e))){if(S=this._getDirection(e,n)==="vertical",i=it(H),O("dragOverValid"),oe.eventCanceled)return A;if(l)return qe=Fe,$(),this._hideClone(),O("revert"),oe.eventCanceled||(so?Fe.insertBefore(H,so):Fe.appendChild(H)),V(!0);var Q=Hd(t,d.draggable);if(!Q||FP(e,S,this)&&!Q.animated){if(Q===H)return V(!1);if(Q&&t===e.target&&(n=Q),n&&(s=it(n)),bs(Fe,t,H,i,n,s,e,!!n)!==!1)return $(),t.appendChild(H),qe=t,U(),V(!0)}else if(Q&&VP(e,S,this)){var se=hi(t,0,d,!0);if(se===H)return V(!1);if(n=se,s=it(n),bs(Fe,t,H,i,n,s,e,!1)!==!1)return $(),t.insertBefore(H,se),qe=t,U(),V(!0)}else if(n.parentNode===t){s=it(n);var we=0,z,tt=H.parentNode!==t,Te=!xP(H.animated&&H.toRect||i,n.animated&&n.toRect||s,S),j=S?"top":"left",q=Fm(n,"top","top")||Fm(H,"top","top"),Ee=q?q.scrollTop:void 0;Ko!==n&&(z=s[j],ca=!1,Ss=!Te&&d.invertSwap||tt),we=HP(e,n,s,S,Te?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Ss,Ko===n);var Ue;if(we!==0){var Ct=En(H);do Ct-=we,Ue=qe.children[Ct];while(Ue&&(re(Ue,"display")==="none"||Ue===le))}if(we===0||Ue===n)return V(!1);Ko=n,sa=we;var An=n.nextElementSibling,sn=!1;sn=we===1;var Mt=bs(Fe,t,H,i,n,s,e,sn);if(Mt!==!1)return(Mt===1||Mt===-1)&&(sn=Mt===1),sd=!0,setTimeout(UP,30),$(),sn&&!An?t.appendChild(H):n.parentNode.insertBefore(H,sn?An:n),q&&sy(q,0,Ee-q.scrollTop),qe=H.parentNode,z!==void 0&&!Ss&&(Gs=Math.abs(z-it(n)[j])),U(),V(!0)}if(t.contains(H))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Qt=En(H),Ur=En(H,n.draggable),Ut("drop",this,{evt:e}),qe=H&&H.parentNode,Qt=En(H),Ur=En(H,n.draggable),oe.eventCanceled){this._nulling();return}Qo=!1,Ss=!1,ca=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),cd(this.cloneId),cd(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),oa&&re(document.body,"user-select",""),re(H,"transform",""),e&&(Xi&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),H&&(this.nativeDraggable&&Ce(H,"dragend",this),Pu(H),H.style["will-change"]="",Xi&&!Qo&&Jt(H,vt?vt.options.ghostClass:this.options.ghostClass,!1),Jt(H,this.options.chosenClass,!1),Nt({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Qt>=0&&(Nt({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Nt({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Qt!==oi&&Qt>=0&&(Nt({sortable:this,name:"update",toEl:qe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),oe.active&&((Qt==null||Qt===-1)&&(Qt=oi,Ur=aa),Nt({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Ut("nulling",this),Fe=H=qe=le=so=Ge=qs=Vr=ro=Pn=Xi=Qt=Ur=oi=aa=Ko=sa=vt=Es=oe.dragged=oe.ghost=oe.clone=oe.active=null,sc.forEach(function(e){e.checked=!0}),sc.length=Ru=Ou=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":H&&(this._onDragOver(e),BP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],Yn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||KP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];Yn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Yn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Sa.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&dy(n)},destroy:function(){Ut("destroy",this);var e=this.el;e[rn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),ac.splice(ac.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Vr){if(Ut("hideClone",this),oe.eventCanceled)return;re(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Vr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Vr){if(Ut("showClone",this),oe.eventCanceled)return;H.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,H):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(H,Ge),re(Ge,"display",""),Vr=!1}}};function BP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function bs(r,e,t,n,i,s,l,d){var f,g=r[rn],m=g.options.onMove,v;return window.CustomEvent&&!Ar&&!Ea?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(v=m.call(g,f,l)),v}function Pu(r){r.draggable=!1}function UP(){sd=!1}function VP(r,e,t){var n=it(hi(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function FP(r,e,t){var n=it(Hd(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function HP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,v=n?t.bottom:t.right,C=!1;if(!l){if(d&&Gs<g*i){if(!ca&&(sa===1?f>m+g*s/2:f<v-g*s/2)&&(ca=!0),ca)C=!0;else if(sa===1?f<m+Gs:f>v-Gs)return-sa}else if(f>m+g*(1-i)/2&&f<v-g*(1-i)/2)return $P(e)}return C=C||l,C&&(f<m+g*s/2||f>v-g*s/2)?f>m+g/2?1:-1:0}function $P(r){return En(H)<En(r)?1:-1}function KP(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function zP(r){sc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&sc.push(n)}}function js(r){return setTimeout(r,0)}function cd(r){return clearTimeout(r)}Oc&&Ae(document,"touchmove",function(r){(oe.active||Qo)&&r.cancelable&&r.preventDefault()});oe.utils={on:Ae,off:Ce,css:re,find:iy,is:function(e,t){return!!Yn(e,t,e,!1)},extend:bP,throttle:ay,closest:Yn,toggleClass:Jt,clone:cy,index:En,nextTick:js,cancelNextTick:cd,detectDirection:uy,getChild:hi};oe.get=function(r){return r[rn]};oe.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(oe.utils=rr(rr({},oe.utils),n.utils)),Sa.mount(n)})};oe.create=function(r,e){return new oe(r,e)};oe.version=TP;var Xe=[],Zi,ld,ud=!1,Mu,xu,cc,ea;function WP(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),Wm(),Ys(),IP()},nulling:function(){cc=ld=Zi=ud=ea=Mu=xu=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(cc=t,n||this.options.forceAutoScrollFallback||Ea||Ar||oa){Du(t,this.options,d,n);var f=Kr(d,!0);ud&&(!ea||s!==Mu||l!==xu)&&(ea&&Wm(),ea=setInterval(function(){var g=Kr(document.elementFromPoint(s,l),!0);g!==f&&(f=g,Ys()),Du(t,i.options,g,n)},10),Mu=s,xu=l)}else{if(!this.options.bubbleScroll||Kr(d,!0)===tr()){Ys();return}Du(t,this.options,Kr(d,!1),!1)}}},Er(r,{pluginName:"scroll",initializeByDefault:!0})}function Ys(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function Wm(){clearInterval(ea)}var Du=ay(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,f=tr(),g=!1,m;ld!==t&&(ld=t,Ys(),Zi=e.scroll,m=e.scrollFn,Zi===!0&&(Zi=Kr(t,!0)));var v=0,C=Zi;do{var S=C,_=it(S),A=_.top,O=_.bottom,$=_.left,V=_.right,U=_.width,Q=_.height,se=void 0,we=void 0,z=S.scrollWidth,tt=S.scrollHeight,Te=re(S),j=S.scrollLeft,q=S.scrollTop;S===f?(se=U<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"||Te.overflowX==="visible"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"||Te.overflowY==="visible")):(se=U<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"));var Ee=se&&(Math.abs(V-i)<=l&&j+U<z)-(Math.abs($-i)<=l&&!!j),Ue=we&&(Math.abs(O-s)<=l&&q+Q<tt)-(Math.abs(A-s)<=l&&!!q);if(!Xe[v])for(var Ct=0;Ct<=v;Ct++)Xe[Ct]||(Xe[Ct]={});(Xe[v].vx!=Ee||Xe[v].vy!=Ue||Xe[v].el!==S)&&(Xe[v].el=S,Xe[v].vx=Ee,Xe[v].vy=Ue,clearInterval(Xe[v].pid),(Ee!=0||Ue!=0)&&(g=!0,Xe[v].pid=setInterval((function(){n&&this.layer===0&&oe.active._onTouchMove(cc);var An=Xe[this.layer].vy?Xe[this.layer].vy*d:0,sn=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(oe.dragged.parentNode[rn],sn,An,r,cc,Xe[this.layer].el)!=="continue"||sy(Xe[this.layer].el,sn,An)}).bind({layer:v}),24))),v++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));ud=g}},30),gy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,v=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(v)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function $d(){}$d.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=hi(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:gy};Er($d,{pluginName:"revertOnSpill"});function Kd(){}Kd.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:gy};Er(Kd,{pluginName:"removeOnSpill"});oe.mount(new WP);oe.mount(Kd,$d);function qP(){return typeof window<"u"?window.console:global.console}const GP=qP();function jP(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const YP=/-(\w)/g,qm=jP(r=>r.replace(YP,(e,t)=>t?t.toUpperCase():""));function Lu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function Gm(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function JP(r,e){return Object.values(r).indexOf(e)}function QP(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function my(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function XP(r){return e=>{this.realList!==null&&this["onDrag"+r](e),my.call(this,r,e)}}function ZP(r){return["transition-group","TransitionGroup"].includes(r)}function e1(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?ZP(e.name):!1}function t1(r,e){return e?{...e.props,...e.attrs}:r}const dd=["Start","Add","Remove","Update","End"],hd=["Choose","Unchoose","Sort","Filter","Clone"],n1=["Move",...dd,...hd].map(r=>"on"+r);let Bu=null;const r1={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},o1=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...dd.map(r=>r.toLowerCase()),...hd.map(r=>r.toLowerCase())],props:r1,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=t1(this.$attrs,this.componentData);return r?(this.transitionMode=e1(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&GP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};dd.forEach(i=>{r["on"+i]=XP.call(this,i)}),hd.forEach(i=>{r["on"+i]=my.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[qm(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new oe(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=qm(e);n1.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=QP(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=JP(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),Bu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Lu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(Gm(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Lu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){Lu(r.item),Gm(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),Bu=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(Bu)!==-1||!e.willInsertAfter?i:i+1}}}),i1={class:"d-flex flex-row align-center"},zd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref("");return(n,i)=>{const s=c.resolveComponent("GripVerticalIcon"),l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(Ta,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(ty,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(o1),{list:e.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,d=>(c.openBlock(),c.createBlock(Vt.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",i1,[c.createVNode(s,{class:"mb-2"}),c.createVNode(Vt.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(Nk.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+"  ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(tc.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),a1=["src","height","width"],s1={key:0,class:"text-center text-h6"},c1={key:1,class:"text-center text-h5"},l1={key:0,class:"text-center"},u1={class:"d-flex justify-center align-center mt-4 ga-3"},Wd=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,a1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",s1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",c1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",l1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",u1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(Pk.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),d1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(_e.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(_e.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode(Wd,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),py=vi(d1,[["__scopeId","data-v-e1a4ccbc"]]),h1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},vy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",h1,c.toDisplayString(e.value),1))}}),f1={key:0,class:"mb-2 ms-1"},yy=c.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",f1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ha.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Ft.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(vy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),g1={class:"text-faded mt-7"},m1={class:"d-flex align-baseline mb-1"},p1={class:"me-1"},v1={class:"max-w-_form-metadataJ"},y1={key:0,class:"mb-1"},C1={key:1,class:"mb-1"},w1={class:"mb-1"},Nc=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",g1,[c.createVNode(_e.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",m1,[c.createElementVNode("b",p1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",v1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(Tc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(_e.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",y1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",C1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",w1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),_1={key:0,class:"mb-2 ms-1"},Cy=c.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",_1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(ha.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(vy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Ft.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field"},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density"]))],64))}}),T1={key:0,class:"mb-2 ms-1"},E1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},wy=c.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",T1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ha.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Mk.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",E1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),_y=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Be.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),Ty=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Be.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),S1={class:"mt-4"},Ey=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Ic,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",S1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(_e.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Nc,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(_y,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(Ty,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),A1={class:"d-flex align-items-center"},b1={key:0,class:"d-flex align-center"},I1={class:"ms-1"},k1={class:"d-flex"},R1={class:"d-flex mb-1 align-center"},O1={class:"min-w-100 relative"},Sy=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,v)=>(c.openBlock(),c.createElementBlock("div",A1,[m.id?(c.openBlock(),c.createElementBlock("div",b1,[v[0]||(v[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",I1,c.toDisplayString(m.id),1),c.createVNode(Tc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createElementVNode("div",k1,[c.createVNode(Be.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(mO),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(tc.VIcon,{class:"me-2"},{default:c.withCtx(()=>v[1]||(v[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",R1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",O1,[c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>v[2]||(v[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(tc.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>v[3]||(v[3]=[c.createTextVNode("mdi-close")])),_:1}),v[4]||(v[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),N1={class:"d-flex flex-column"},P1={class:"height d-flex flex-column"},M1={class:"d-flex justify-between align-end"},x1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Ic,null,{default:c.withCtx(()=>[c.createElementVNode("div",N1,[c.createElementVNode("div",P1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",M1,[c.createVNode(_e.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(Nc,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(_e.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(_y,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(Ty,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Ay=vi(x1,[["__scopeId","data-v-489d31c3"]]);/**
20
+ */function Dm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function rr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Dm(Object(t),!0).forEach(function(n){vP(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Dm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function $s(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?$s=function(e){return typeof e}:$s=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(r)}function vP(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Er(){return Er=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Er.apply(this,arguments)}function yP(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function CP(r,e){if(r==null)return{};var t=yP(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var wP="1.14.0";function _r(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Ar=_r(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_a=_r(/Edge/i),Lm=_r(/firefox/i),na=_r(/safari/i)&&!_r(/chrome/i)&&!_r(/android/i),ey=_r(/iP(ad|od|hone)/i),_P=_r(/chrome/i)&&_r(/android/i),ty={capture:!1,passive:!1};function Ae(r,e,t){r.addEventListener(e,t,!Ar&&ty)}function Ce(r,e,t){r.removeEventListener(e,t,!Ar&&ty)}function tc(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function TP(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Yn(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&tc(r,e):tc(r,e))||n&&r===t)return r;if(r===t)break}while(r=TP(r))}return null}var Bm=/\s+/g;function Jt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(Bm," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(Bm," ")}}function re(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ci(r,e){var t="";if(typeof r=="string")t=r;else do{var n=re(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function ny(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,s=n.length;if(t)for(;i<s;i++)t(n[i],i);return n}return[]}function tr(){var r=document.scrollingElement;return r||document.documentElement}function it(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var s,l,d,f,g,m,v;if(r!==window&&r.parentNode&&r!==tr()?(s=r.getBoundingClientRect(),l=s.top,d=s.left,f=s.bottom,g=s.right,m=s.height,v=s.width):(l=0,d=0,f=window.innerHeight,g=window.innerWidth,m=window.innerHeight,v=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Ar))do if(i&&i.getBoundingClientRect&&(re(i,"transform")!=="none"||t&&re(i,"position")!=="static")){var C=i.getBoundingClientRect();l-=C.top+parseInt(re(i,"border-top-width")),d-=C.left+parseInt(re(i,"border-left-width")),f=l+s.height,g=d+s.width;break}while(i=i.parentNode);if(n&&r!==window){var S=ci(i||r),_=S&&S.a,b=S&&S.d;S&&(l/=b,d/=_,v/=_,m/=b,f=l+m,g=d+v)}return{top:l,left:d,bottom:f,right:g,width:v,height:m}}}function Um(r,e,t){for(var n=Kr(r,!0),i=it(r)[e];n;){var s=it(n)[t],l=void 0;if(l=i>=s,!l)return n;if(n===tr())break;n=Kr(n,!1)}return!1}function hi(r,e,t,n){for(var i=0,s=0,l=r.children;s<l.length;){if(l[s].style.display!=="none"&&l[s]!==oe.ghost&&(n||l[s]!==oe.dragged)&&Yn(l[s],t.draggable,r,!1)){if(i===e)return l[s];i++}s++}return null}function Ud(r,e){for(var t=r.lastElementChild;t&&(t===oe.ghost||re(t,"display")==="none"||e&&!tc(t,e));)t=t.previousElementSibling;return t||null}function Sn(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==oe.clone&&(!e||tc(r,e))&&t++;return t}function Vm(r){var e=0,t=0,n=tr();if(r)do{var i=ci(r),s=i.a,l=i.d;e+=r.scrollLeft*s,t+=r.scrollTop*l}while(r!==n&&(r=r.parentNode));return[e,t]}function EP(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Kr(r,e){if(!r||!r.getBoundingClientRect)return tr();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=re(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return tr();if(n||e)return t;n=!0}}while(t=t.parentNode);return tr()}function SP(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Eu(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var ra;function ry(r,e){return function(){if(!ra){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),ra=setTimeout(function(){ra=void 0},e)}}}function AP(){clearTimeout(ra),ra=void 0}function oy(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function iy(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var rn="Sortable"+new Date().getTime();function bP(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(re(i,"display")==="none"||i===oe.ghost)){r.push({target:i,rect:it(i)});var s=rr({},r[r.length-1].rect);if(i.thisAnimationDuration){var l=ci(i,!0);l&&(s.top-=l.f,s.left-=l.e)}i.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(EP(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,l=0;r.forEach(function(d){var f=0,g=d.target,m=g.fromRect,v=it(g),C=g.prevFromRect,S=g.prevToRect,_=d.rect,b=ci(g,!0);b&&(v.top-=b.f,v.left-=b.e),g.toRect=v,g.thisAnimationDuration&&Eu(C,v)&&!Eu(m,v)&&(_.top-v.top)/(_.left-v.left)===(m.top-v.top)/(m.left-v.left)&&(f=kP(_,C,S,i.options)),Eu(v,m)||(g.prevFromRect=m,g.prevToRect=v,f||(f=i.options.animation),i.animate(g,_,v,f)),f&&(s=!0,l=Math.max(l,f),clearTimeout(g.animationResetTimer),g.animationResetTimer=setTimeout(function(){g.animationTime=0,g.prevFromRect=null,g.fromRect=null,g.prevToRect=null,g.thisAnimationDuration=null},f),g.thisAnimationDuration=f)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},l):typeof n=="function"&&n(),r=[]},animate:function(n,i,s,l){if(l){re(n,"transition",""),re(n,"transform","");var d=ci(this.el),f=d&&d.a,g=d&&d.d,m=(i.left-s.left)/(f||1),v=(i.top-s.top)/(g||1);n.animatingX=!!m,n.animatingY=!!v,re(n,"transform","translate3d("+m+"px,"+v+"px,0)"),this.forRepaintDummy=IP(n),re(n,"transition","transform "+l+"ms"+(this.options.easing?" "+this.options.easing:"")),re(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){re(n,"transition",""),re(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},l)}}}}function IP(r){return r.offsetWidth}function kP(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var $o=[],Su={initializeByDefault:!0},Ta={mount:function(e){for(var t in Su)Su.hasOwnProperty(t)&&!(t in e)&&(e[t]=Su[t]);$o.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),$o.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var s=e+"Global";$o.forEach(function(l){t[l.pluginName]&&(t[l.pluginName][s]&&t[l.pluginName][s](rr({sortable:t},n)),t.options[l.pluginName]&&t[l.pluginName][e]&&t[l.pluginName][e](rr({sortable:t},n)))})},initializePlugins:function(e,t,n,i){$o.forEach(function(d){var f=d.pluginName;if(!(!e.options[f]&&!d.initializeByDefault)){var g=new d(e,t,e.options);g.sortable=e,g.options=e.options,e[f]=g,Er(n,g.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var l=this.modifyOption(e,s,e.options[s]);typeof l<"u"&&(e.options[s]=l)}},getEventProperties:function(e,t){var n={};return $o.forEach(function(i){typeof i.eventProperties=="function"&&Er(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return $o.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(i=s.optionListeners[t].call(e[s.pluginName],n))}),i}};function RP(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,s=r.cloneEl,l=r.toEl,d=r.fromEl,f=r.oldIndex,g=r.newIndex,m=r.oldDraggableIndex,v=r.newDraggableIndex,C=r.originalEvent,S=r.putSortable,_=r.extraEventProperties;if(e=e||t&&t[rn],!!e){var b,O=e.options,$="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ar&&!_a?b=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(n,!0,!0)),b.to=l||t,b.from=d||t,b.item=i||t,b.clone=s,b.oldIndex=f,b.newIndex=g,b.oldDraggableIndex=m,b.newDraggableIndex=v,b.originalEvent=C,b.pullMode=S?S.lastPutMode:void 0;var V=rr(rr({},_),Ta.getEventProperties(n,e));for(var U in V)b[U]=V[U];t&&t.dispatchEvent(b),O[$]&&O[$].call(e,b)}}var OP=["evt"],Ut=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,s=CP(n,OP);Ta.pluginEvent.bind(oe)(e,t,rr({dragEl:H,parentEl:qe,ghostEl:le,rootEl:Fe,nextEl:so,lastDownEl:Ks,cloneEl:Ge,cloneHidden:Vr,dragStarted:Ji,putSortable:vt,activeSortable:oe.active,originalEvent:i,oldIndex:oi,oldDraggableIndex:oa,newIndex:Qt,newDraggableIndex:Ur,hideGhostForTarget:ly,unhideGhostForTarget:uy,cloneNowHidden:function(){Vr=!0},cloneNowShown:function(){Vr=!1},dispatchSortableEvent:function(d){Nt({sortable:t,name:d,originalEvent:i})}},s))};function Nt(r){RP(rr({putSortable:vt,cloneEl:Ge,targetEl:H,rootEl:Fe,oldIndex:oi,oldDraggableIndex:oa,newIndex:Qt,newDraggableIndex:Ur},r))}var H,qe,le,Fe,so,Ks,Ge,Vr,oi,Qt,oa,Ur,_s,vt,Qo=!1,nc=!1,rc=[],ro,Mn,Au,bu,Fm,Hm,Ji,Ko,ia,aa=!1,Ts=!1,zs,Et,Iu=[],rd=!1,oc=[],Ic=typeof document<"u",Es=ey,$m=_a||Ar?"cssFloat":"float",NP=Ic&&!_P&&!ey&&"draggable"in document.createElement("div"),ay=function(){if(Ic){if(Ar)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),sy=function(e,t){var n=re(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=hi(e,0,t),l=hi(e,1,t),d=s&&re(s),f=l&&re(l),g=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+it(s).width,m=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+it(l).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&d.float&&d.float!=="none"){var v=d.float==="left"?"left":"right";return l&&(f.clear==="both"||f.clear===v)?"vertical":"horizontal"}return s&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||g>=i&&n[$m]==="none"||l&&n[$m]==="none"&&g+m>i)?"vertical":"horizontal"},PP=function(e,t,n){var i=n?e.left:e.top,s=n?e.right:e.bottom,l=n?e.width:e.height,d=n?t.left:t.top,f=n?t.right:t.bottom,g=n?t.width:t.height;return i===d||s===f||i+l/2===d+g/2},MP=function(e,t){var n;return rc.some(function(i){var s=i[rn].options.emptyInsertThreshold;if(!(!s||Ud(i))){var l=it(i),d=e>=l.left-s&&e<=l.right+s,f=t>=l.top-s&&t<=l.bottom+s;if(d&&f)return n=i}}),n},cy=function(e){function t(s,l){return function(d,f,g,m){var v=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(s==null&&(l||v))return!0;if(s==null||s===!1)return!1;if(l&&s==="clone")return s;if(typeof s=="function")return t(s(d,f,g,m),l)(d,f,g,m);var C=(l?d:f).options.group.name;return s===!0||typeof s=="string"&&s===C||s.join&&s.indexOf(C)>-1}}var n={},i=e.group;(!i||$s(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},ly=function(){!ay&&le&&re(le,"display","none")},uy=function(){!ay&&le&&re(le,"display","")};Ic&&document.addEventListener("click",function(r){if(nc)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),nc=!1,!1},!0);var oo=function(e){if(H){e=e.touches?e.touches[0]:e;var t=MP(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[rn]._onDragOver(n)}}},xP=function(e){H&&H.parentNode[rn]._isOutsideThisEl(e.target)};function oe(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Er({},e),r[rn]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return sy(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(l,d){l.setData("Text",d.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:oe.supportPointer!==!1&&"PointerEvent"in window&&!na,emptyInsertThreshold:5};Ta.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);cy(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:NP,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Ae(r,"pointerdown",this._onTapStart):(Ae(r,"mousedown",this._onTapStart),Ae(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Ae(r,"dragover",this),Ae(r,"dragenter",this)),rc.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Er(this,bP())}oe.prototype={constructor:oe,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ko=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,H):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,s=i.preventOnFilter,l=e.type,d=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,f=(d||e).target,g=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||f,m=i.filter;if($P(n),!H&&!(/mousedown|pointerdown/.test(l)&&e.button!==0||i.disabled)&&!g.isContentEditable&&!(!this.nativeDraggable&&na&&f&&f.tagName.toUpperCase()==="SELECT")&&(f=Yn(f,i.draggable,n,!1),!(f&&f.animated)&&Ks!==f)){if(oi=Sn(f),oa=Sn(f,i.draggable),typeof m=="function"){if(m.call(this,e,f,this)){Nt({sortable:t,rootEl:g,name:"filter",targetEl:f,toEl:n,fromEl:n}),Ut("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(m&&(m=m.split(",").some(function(v){if(v=Yn(g,v.trim(),n,!1),v)return Nt({sortable:t,rootEl:v,name:"filter",targetEl:f,fromEl:n,toEl:n}),Ut("filter",t,{evt:e}),!0}),m)){s&&e.cancelable&&e.preventDefault();return}i.handle&&!Yn(g,i.handle,n,!1)||this._prepareDragStart(e,d,f)}}},_prepareDragStart:function(e,t,n){var i=this,s=i.el,l=i.options,d=s.ownerDocument,f;if(n&&!H&&n.parentNode===s){var g=it(n);if(Fe=s,H=n,qe=H.parentNode,so=H.nextSibling,Ks=n,_s=l.group,oe.dragged=H,ro={target:H,clientX:(t||e).clientX,clientY:(t||e).clientY},Fm=ro.clientX-g.left,Hm=ro.clientY-g.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,H.style["will-change"]="all",f=function(){if(Ut("delayEnded",i,{evt:e}),oe.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Lm&&i.nativeDraggable&&(H.draggable=!0),i._triggerDragStart(e,t),Nt({sortable:i,name:"choose",originalEvent:e}),Jt(H,l.chosenClass,!0)},l.ignore.split(",").forEach(function(m){ny(H,m.trim(),ku)}),Ae(d,"dragover",oo),Ae(d,"mousemove",oo),Ae(d,"touchmove",oo),Ae(d,"mouseup",i._onDrop),Ae(d,"touchend",i._onDrop),Ae(d,"touchcancel",i._onDrop),Lm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,H.draggable=!0),Ut("delayStart",this,{evt:e}),l.delay&&(!l.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(_a||Ar))){if(oe.eventCanceled){this._onDrop();return}Ae(d,"mouseup",i._disableDelayedDrag),Ae(d,"touchend",i._disableDelayedDrag),Ae(d,"touchcancel",i._disableDelayedDrag),Ae(d,"mousemove",i._delayedDragTouchMoveHandler),Ae(d,"touchmove",i._delayedDragTouchMoveHandler),l.supportPointer&&Ae(d,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(f,l.delay)}else f()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){H&&ku(H),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._disableDelayedDrag),Ce(e,"touchend",this._disableDelayedDrag),Ce(e,"touchcancel",this._disableDelayedDrag),Ce(e,"mousemove",this._delayedDragTouchMoveHandler),Ce(e,"touchmove",this._delayedDragTouchMoveHandler),Ce(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Ae(document,"pointermove",this._onTouchMove):t?Ae(document,"touchmove",this._onTouchMove):Ae(document,"mousemove",this._onTouchMove):(Ae(H,"dragend",this),Ae(Fe,"dragstart",this._onDragStart));try{document.selection?Ws(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Qo=!1,Fe&&H){Ut("dragStarted",this,{evt:t}),this.nativeDraggable&&Ae(document,"dragover",xP);var n=this.options;!e&&Jt(H,n.dragClass,!1),Jt(H,n.ghostClass,!0),oe.active=this,e&&this._appendGhost(),Nt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Mn){this._lastX=Mn.clientX,this._lastY=Mn.clientY,ly();for(var e=document.elementFromPoint(Mn.clientX,Mn.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Mn.clientX,Mn.clientY),e!==t);)t=e;if(H.parentNode[rn]._isOutsideThisEl(e),t)do{if(t[rn]){var n=void 0;if(n=t[rn]._onDragOver({clientX:Mn.clientX,clientY:Mn.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);uy()}},_onTouchMove:function(e){if(ro){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,s=e.touches?e.touches[0]:e,l=le&&ci(le,!0),d=le&&l&&l.a,f=le&&l&&l.d,g=Es&&Et&&Vm(Et),m=(s.clientX-ro.clientX+i.x)/(d||1)+(g?g[0]-Iu[0]:0)/(d||1),v=(s.clientY-ro.clientY+i.y)/(f||1)+(g?g[1]-Iu[1]:0)/(f||1);if(!oe.active&&!Qo){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){l?(l.e+=m-(Au||0),l.f+=v-(bu||0)):l={a:1,b:0,c:0,d:1,e:m,f:v};var C="matrix(".concat(l.a,",").concat(l.b,",").concat(l.c,",").concat(l.d,",").concat(l.e,",").concat(l.f,")");re(le,"webkitTransform",C),re(le,"mozTransform",C),re(le,"msTransform",C),re(le,"transform",C),Au=m,bu=v,Mn=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:Fe,t=it(H,!0,Es,!0,e),n=this.options;if(Es){for(Et=e;re(Et,"position")==="static"&&re(Et,"transform")==="none"&&Et!==document;)Et=Et.parentNode;Et!==document.body&&Et!==document.documentElement?(Et===document&&(Et=tr()),t.top+=Et.scrollTop,t.left+=Et.scrollLeft):Et=tr(),Iu=Vm(Et)}le=H.cloneNode(!0),Jt(le,n.ghostClass,!1),Jt(le,n.fallbackClass,!0),Jt(le,n.dragClass,!0),re(le,"transition",""),re(le,"transform",""),re(le,"box-sizing","border-box"),re(le,"margin",0),re(le,"top",t.top),re(le,"left",t.left),re(le,"width",t.width),re(le,"height",t.height),re(le,"opacity","0.8"),re(le,"position",Es?"absolute":"fixed"),re(le,"zIndex","100000"),re(le,"pointerEvents","none"),oe.ghost=le,e.appendChild(le),re(le,"transform-origin",Fm/parseInt(le.style.width)*100+"% "+Hm/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,s=n.options;if(Ut("dragStart",this,{evt:e}),oe.eventCanceled){this._onDrop();return}Ut("setupClone",this),oe.eventCanceled||(Ge=iy(H),Ge.draggable=!1,Ge.style["will-change"]="",this._hideClone(),Jt(Ge,this.options.chosenClass,!1),oe.clone=Ge),n.cloneId=Ws(function(){Ut("clone",n),!oe.eventCanceled&&(n.options.removeCloneOnHide||Fe.insertBefore(Ge,H),n._hideClone(),Nt({sortable:n,name:"clone"}))}),!t&&Jt(H,s.dragClass,!0),t?(nc=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Ce(document,"mouseup",n._onDrop),Ce(document,"touchend",n._onDrop),Ce(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(n,i,H)),Ae(document,"drop",n),re(H,"transform","translateZ(0)")),Qo=!0,n._dragStartId=Ws(n._dragStarted.bind(n,t,e)),Ae(document,"selectstart",n),Ji=!0,na&&re(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,s,l,d=this.options,f=d.group,g=oe.active,m=_s===f,v=d.sort,C=vt||g,S,_=this,b=!1;if(rd)return;function O(Qe,wt){Ut(Qe,_,rr({evt:e,isOwner:m,axis:S?"vertical":"horizontal",revert:l,dragRect:i,targetRect:s,canSort:v,fromSortable:C,target:n,completed:V,onMove:function(Kt,Jc){return Ss(Fe,t,H,i,Kt,it(Kt),e,Jc)},changed:U},wt))}function $(){O("dragOverAnimationCapture"),_.captureAnimationState(),_!==C&&C.captureAnimationState()}function V(Qe){return O("dragOverCompleted",{insertion:Qe}),Qe&&(m?g._hideClone():g._showClone(_),_!==C&&(Jt(H,vt?vt.options.ghostClass:g.options.ghostClass,!1),Jt(H,d.ghostClass,!0)),vt!==_&&_!==oe.active?vt=_:_===oe.active&&vt&&(vt=null),C===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){O("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==C&&(C.animateAll(),C._ignoreWhileAnimating=null)),(n===H&&!H.animated||n===t&&!n.animated)&&(Ko=null),!d.dragoverBubble&&!e.rootEl&&n!==document&&(H.parentNode[rn]._isOutsideThisEl(e.target),!Qe&&oo(e)),!d.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),b=!0}function U(){Qt=Sn(H),Ur=Sn(H,d.draggable),Nt({sortable:_,name:"change",toEl:t,newIndex:Qt,newDraggableIndex:Ur,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Yn(n,d.draggable,t,!0),O("dragOver"),oe.eventCanceled)return b;if(H.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return V(!1);if(nc=!1,g&&!d.disabled&&(m?v||(l=qe!==Fe):vt===this||(this.lastPutMode=_s.checkPull(this,g,H,e))&&f.checkPut(this,g,H,e))){if(S=this._getDirection(e,n)==="vertical",i=it(H),O("dragOverValid"),oe.eventCanceled)return b;if(l)return qe=Fe,$(),this._hideClone(),O("revert"),oe.eventCanceled||(so?Fe.insertBefore(H,so):Fe.appendChild(H)),V(!0);var Q=Ud(t,d.draggable);if(!Q||UP(e,S,this)&&!Q.animated){if(Q===H)return V(!1);if(Q&&t===e.target&&(n=Q),n&&(s=it(n)),Ss(Fe,t,H,i,n,s,e,!!n)!==!1)return $(),t.appendChild(H),qe=t,U(),V(!0)}else if(Q&&BP(e,S,this)){var se=hi(t,0,d,!0);if(se===H)return V(!1);if(n=se,s=it(n),Ss(Fe,t,H,i,n,s,e,!1)!==!1)return $(),t.insertBefore(H,se),qe=t,U(),V(!0)}else if(n.parentNode===t){s=it(n);var we=0,z,tt=H.parentNode!==t,Te=!PP(H.animated&&H.toRect||i,n.animated&&n.toRect||s,S),j=S?"top":"left",q=Um(n,"top","top")||Um(H,"top","top"),Ee=q?q.scrollTop:void 0;Ko!==n&&(z=s[j],aa=!1,Ts=!Te&&d.invertSwap||tt),we=VP(e,n,s,S,Te?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,Ts,Ko===n);var Ue;if(we!==0){var Ct=Sn(H);do Ct-=we,Ue=qe.children[Ct];while(Ue&&(re(Ue,"display")==="none"||Ue===le))}if(we===0||Ue===n)return V(!1);Ko=n,ia=we;var bn=n.nextElementSibling,sn=!1;sn=we===1;var Mt=Ss(Fe,t,H,i,n,s,e,sn);if(Mt!==!1)return(Mt===1||Mt===-1)&&(sn=Mt===1),rd=!0,setTimeout(LP,30),$(),sn&&!bn?t.appendChild(H):n.parentNode.insertBefore(H,sn?bn:n),q&&oy(q,0,Ee-q.scrollTop),qe=H.parentNode,z!==void 0&&!Ts&&(zs=Math.abs(z-it(n)[j])),U(),V(!0)}if(t.contains(H))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ce(document,"mousemove",this._onTouchMove),Ce(document,"touchmove",this._onTouchMove),Ce(document,"pointermove",this._onTouchMove),Ce(document,"dragover",oo),Ce(document,"mousemove",oo),Ce(document,"touchmove",oo)},_offUpEvents:function(){var e=this.el.ownerDocument;Ce(e,"mouseup",this._onDrop),Ce(e,"touchend",this._onDrop),Ce(e,"pointerup",this._onDrop),Ce(e,"touchcancel",this._onDrop),Ce(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(Qt=Sn(H),Ur=Sn(H,n.draggable),Ut("drop",this,{evt:e}),qe=H&&H.parentNode,Qt=Sn(H),Ur=Sn(H,n.draggable),oe.eventCanceled){this._nulling();return}Qo=!1,Ts=!1,aa=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),od(this.cloneId),od(this._dragStartId),this.nativeDraggable&&(Ce(document,"drop",this),Ce(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),na&&re(document.body,"user-select",""),re(H,"transform",""),e&&(Ji&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(Fe===qe||vt&&vt.lastPutMode!=="clone")&&Ge&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),H&&(this.nativeDraggable&&Ce(H,"dragend",this),ku(H),H.style["will-change"]="",Ji&&!Qo&&Jt(H,vt?vt.options.ghostClass:this.options.ghostClass,!1),Jt(H,this.options.chosenClass,!1),Nt({sortable:this,name:"unchoose",toEl:qe,newIndex:null,newDraggableIndex:null,originalEvent:e}),Fe!==qe?(Qt>=0&&(Nt({rootEl:qe,name:"add",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"remove",toEl:qe,originalEvent:e}),Nt({rootEl:qe,name:"sort",toEl:qe,fromEl:Fe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),vt&&vt.save()):Qt!==oi&&Qt>=0&&(Nt({sortable:this,name:"update",toEl:qe,originalEvent:e}),Nt({sortable:this,name:"sort",toEl:qe,originalEvent:e})),oe.active&&((Qt==null||Qt===-1)&&(Qt=oi,Ur=oa),Nt({sortable:this,name:"end",toEl:qe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Ut("nulling",this),Fe=H=qe=le=so=Ge=Ks=Vr=ro=Mn=Ji=Qt=Ur=oi=oa=Ko=ia=vt=_s=oe.dragged=oe.ghost=oe.clone=oe.active=null,oc.forEach(function(e){e.checked=!0}),oc.length=Au=bu=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":H&&(this._onDragOver(e),DP(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,s=n.length,l=this.options;i<s;i++)t=n[i],Yn(t,l.draggable,this.el,!1)&&e.push(t.getAttribute(l.dataIdAttr)||HP(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(s,l){var d=i.children[l];Yn(d,this.options.draggable,i,!1)&&(n[s]=d)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Yn(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=Ta.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&cy(n)},destroy:function(){Ut("destroy",this);var e=this.el;e[rn]=null,Ce(e,"mousedown",this._onTapStart),Ce(e,"touchstart",this._onTapStart),Ce(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ce(e,"dragover",this),Ce(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),rc.splice(rc.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Vr){if(Ut("hideClone",this),oe.eventCanceled)return;re(Ge,"display","none"),this.options.removeCloneOnHide&&Ge.parentNode&&Ge.parentNode.removeChild(Ge),Vr=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Vr){if(Ut("showClone",this),oe.eventCanceled)return;H.parentNode==Fe&&!this.options.group.revertClone?Fe.insertBefore(Ge,H):so?Fe.insertBefore(Ge,so):Fe.appendChild(Ge),this.options.group.revertClone&&this.animate(H,Ge),re(Ge,"display",""),Vr=!1}}};function DP(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function Ss(r,e,t,n,i,s,l,d){var f,g=r[rn],m=g.options.onMove,v;return window.CustomEvent&&!Ar&&!_a?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=e,f.from=r,f.dragged=t,f.draggedRect=n,f.related=i||e,f.relatedRect=s||it(e),f.willInsertAfter=d,f.originalEvent=l,r.dispatchEvent(f),m&&(v=m.call(g,f,l)),v}function ku(r){r.draggable=!1}function LP(){rd=!1}function BP(r,e,t){var n=it(hi(t.el,0,t.options,!0)),i=10;return e?r.clientX<n.left-i||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-i||r.clientY<n.bottom&&r.clientX<n.left}function UP(r,e,t){var n=it(Ud(t.el,t.options.draggable)),i=10;return e?r.clientX>n.right+i||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+i}function VP(r,e,t,n,i,s,l,d){var f=n?r.clientY:r.clientX,g=n?t.height:t.width,m=n?t.top:t.left,v=n?t.bottom:t.right,C=!1;if(!l){if(d&&zs<g*i){if(!aa&&(ia===1?f>m+g*s/2:f<v-g*s/2)&&(aa=!0),aa)C=!0;else if(ia===1?f<m+zs:f>v-zs)return-ia}else if(f>m+g*(1-i)/2&&f<v-g*(1-i)/2)return FP(e)}return C=C||l,C&&(f<m+g*s/2||f>v-g*s/2)?f>m+g/2?1:-1:0}function FP(r){return Sn(H)<Sn(r)?1:-1}function HP(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function $P(r){oc.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&oc.push(n)}}function Ws(r){return setTimeout(r,0)}function od(r){return clearTimeout(r)}Ic&&Ae(document,"touchmove",function(r){(oe.active||Qo)&&r.cancelable&&r.preventDefault()});oe.utils={on:Ae,off:Ce,css:re,find:ny,is:function(e,t){return!!Yn(e,t,e,!1)},extend:SP,throttle:ry,closest:Yn,toggleClass:Jt,clone:iy,index:Sn,nextTick:Ws,cancelNextTick:od,detectDirection:sy,getChild:hi};oe.get=function(r){return r[rn]};oe.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(oe.utils=rr(rr({},oe.utils),n.utils)),Ta.mount(n)})};oe.create=function(r,e){return new oe(r,e)};oe.version=wP;var Xe=[],Qi,id,ad=!1,Ru,Ou,ic,Xi;function KP(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Ae(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Ae(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Ae(document,"touchmove",this._handleFallbackAutoScroll):Ae(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Ce(document,"dragover",this._handleAutoScroll):(Ce(document,"pointermove",this._handleFallbackAutoScroll),Ce(document,"touchmove",this._handleFallbackAutoScroll),Ce(document,"mousemove",this._handleFallbackAutoScroll)),Km(),qs(),AP()},nulling:function(){ic=id=Qi=ad=Xi=Ru=Ou=null,Xe.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,s=(t.touches?t.touches[0]:t).clientX,l=(t.touches?t.touches[0]:t).clientY,d=document.elementFromPoint(s,l);if(ic=t,n||this.options.forceAutoScrollFallback||_a||Ar||na){Nu(t,this.options,d,n);var f=Kr(d,!0);ad&&(!Xi||s!==Ru||l!==Ou)&&(Xi&&Km(),Xi=setInterval(function(){var g=Kr(document.elementFromPoint(s,l),!0);g!==f&&(f=g,qs()),Nu(t,i.options,g,n)},10),Ru=s,Ou=l)}else{if(!this.options.bubbleScroll||Kr(d,!0)===tr()){qs();return}Nu(t,this.options,Kr(d,!1),!1)}}},Er(r,{pluginName:"scroll",initializeByDefault:!0})}function qs(){Xe.forEach(function(r){clearInterval(r.pid)}),Xe=[]}function Km(){clearInterval(Xi)}var Nu=ry(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,l=e.scrollSensitivity,d=e.scrollSpeed,f=tr(),g=!1,m;id!==t&&(id=t,qs(),Qi=e.scroll,m=e.scrollFn,Qi===!0&&(Qi=Kr(t,!0)));var v=0,C=Qi;do{var S=C,_=it(S),b=_.top,O=_.bottom,$=_.left,V=_.right,U=_.width,Q=_.height,se=void 0,we=void 0,z=S.scrollWidth,tt=S.scrollHeight,Te=re(S),j=S.scrollLeft,q=S.scrollTop;S===f?(se=U<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"||Te.overflowX==="visible"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"||Te.overflowY==="visible")):(se=U<z&&(Te.overflowX==="auto"||Te.overflowX==="scroll"),we=Q<tt&&(Te.overflowY==="auto"||Te.overflowY==="scroll"));var Ee=se&&(Math.abs(V-i)<=l&&j+U<z)-(Math.abs($-i)<=l&&!!j),Ue=we&&(Math.abs(O-s)<=l&&q+Q<tt)-(Math.abs(b-s)<=l&&!!q);if(!Xe[v])for(var Ct=0;Ct<=v;Ct++)Xe[Ct]||(Xe[Ct]={});(Xe[v].vx!=Ee||Xe[v].vy!=Ue||Xe[v].el!==S)&&(Xe[v].el=S,Xe[v].vx=Ee,Xe[v].vy=Ue,clearInterval(Xe[v].pid),(Ee!=0||Ue!=0)&&(g=!0,Xe[v].pid=setInterval((function(){n&&this.layer===0&&oe.active._onTouchMove(ic);var bn=Xe[this.layer].vy?Xe[this.layer].vy*d:0,sn=Xe[this.layer].vx?Xe[this.layer].vx*d:0;typeof m=="function"&&m.call(oe.dragged.parentNode[rn],sn,bn,r,ic,Xe[this.layer].el)!=="continue"||oy(Xe[this.layer].el,sn,bn)}).bind({layer:v}),24))),v++}while(e.bubbleScroll&&C!==f&&(C=Kr(C,!1)));ad=g}},30),dy=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,s=e.activeSortable,l=e.dispatchSortableEvent,d=e.hideGhostForTarget,f=e.unhideGhostForTarget;if(t){var g=n||s;d();var m=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,v=document.elementFromPoint(m.clientX,m.clientY);f(),g&&!g.el.contains(v)&&(l("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Vd(){}Vd.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=hi(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:dy};Er(Vd,{pluginName:"revertOnSpill"});function Fd(){}Fd.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:dy};Er(Fd,{pluginName:"removeOnSpill"});oe.mount(new KP);oe.mount(Fd,Vd);function zP(){return typeof window<"u"?window.console:global.console}const WP=zP();function qP(r){const e=Object.create(null);return function(n){return e[n]||(e[n]=r(n))}}const GP=/-(\w)/g,zm=qP(r=>r.replace(GP,(e,t)=>t?t.toUpperCase():""));function Pu(r){r.parentElement!==null&&r.parentElement.removeChild(r)}function Wm(r,e,t){const n=t===0?r.children[0]:r.children[t-1].nextSibling;r.insertBefore(e,n)}function jP(r,e){return Object.values(r).indexOf(e)}function YP(r,e,t,n){if(!r)return[];const i=Object.values(r),s=e.length-n;return[...e].map((d,f)=>f>=s?i.length:i.indexOf(d))}function hy(r,e){this.$nextTick(()=>this.$emit(r.toLowerCase(),e))}function JP(r){return e=>{this.realList!==null&&this["onDrag"+r](e),hy.call(this,r,e)}}function QP(r){return["transition-group","TransitionGroup"].includes(r)}function XP(r){if(!r||r.length!==1)return!1;const[{type:e}]=r;return e?QP(e.name):!1}function ZP(r,e){return e?{...e.props,...e.attrs}:r}const sd=["Start","Add","Remove","Update","End"],cd=["Choose","Unchoose","Sort","Filter","Clone"],e1=["Move",...sd,...cd].map(r=>"on"+r);let Mu=null;const t1={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:r=>r},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},n1=c.defineComponent({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...sd.map(r=>r.toLowerCase()),...cd.map(r=>r.toLowerCase())],props:t1,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const r=this.$slots.default?this.$slots.default():null,e=ZP(this.$attrs,this.componentData);return r?(this.transitionMode=XP(r),c.h(this.getTag(),e,r)):c.h(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&WP.error("list props are mutually exclusive! Please set one.")},mounted(){const r={};sd.forEach(i=>{r["on"+i]=JP.call(this,i)}),cd.forEach(i=>{r["on"+i]=hy.bind(this,i)});const e=Object.keys(this.$attrs).reduce((i,s)=>(i[zm(s)]=this.$attrs[s],i),{}),t=Object.assign({},e,r,{onMove:(i,s)=>this.onDragMove(i,s)});!("draggable"in t)&&(t.draggable=">*");const n=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new oe(n,t),n.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(r){this.updateOptions(r)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?c.resolveComponent(this.component):this.tag},updateOptions(r){for(var e in r){const t=zm(e);e1.indexOf(t)===-1&&this._sortable.option(t,r[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=YP(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(r){const e=jP(this.getChildrenNodes()||[],r);if(e===-1)return null;const t=this.realList[e];return{index:e,element:t}},emitChanges(r){this.$nextTick(()=>{this.$emit("change",r)})},alterList(r){if(this.list){r(this.list);return}const e=[...this.modelValue];r(e),this.$emit("update:modelValue",e)},spliceList(){const r=e=>e.splice(...arguments);this.alterList(r)},updatePosition(r,e){const t=n=>n.splice(e,0,n.splice(r,1)[0]);this.alterList(t)},getVmIndex(r){const e=this.visibleIndexes,t=e.length;return r>t-1?t:e[r]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(r){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[r].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(r){this.computeIndexes(),this.context=this.getUnderlyingVm(r.item),this.context&&(r.item._underlying_vm_=this.clone(this.context.element),Mu=r.item)},onDragAdd(r){const e=r.item._underlying_vm_;if(e===void 0)return;Pu(r.item);const t=this.getVmIndex(r.newIndex);this.spliceList(t,0,e),this.computeIndexes();const n={element:e,newIndex:t};this.emitChanges({added:n})},onDragRemove(r){if(Wm(this.$el,r.item,r.oldIndex),r.pullMode==="clone"){Pu(r.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const t={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:t})},onDragUpdate(r){Pu(r.item),Wm(r.from,r.item,r.oldIndex);const e=this.context.index,t=this.getVmIndex(r.newIndex);this.updatePosition(e,t);const n={element:this.context.element,oldIndex:e,newIndex:t};this.emitChanges({moved:n})},updateProperty(r,e){r.hasOwnProperty(e)&&(r[e]+=this.headerOffset)},onDragMove(r,e){const t=this.move;if(!t||!this.realList)return!0;const n=this.getRelatedContextFromMoveEvent(r),i=this.context,s=this.computeFutureIndex(n,r);Object.assign(i,{futureIndex:s});const l=Object.assign({},r,{relatedContext:n,draggedContext:i});return t(l,e)},onDragEnd(){this.computeIndexes(),Mu=null},getTrargetedComponent(r){return r.__draggable_component__},getRelatedContextFromMoveEvent({to:r,related:e}){const t=this.getTrargetedComponent(r);if(!t)return{component:t};const n=t.realList,i={list:n,component:t};if(r!==e&&n&&t.getUnderlyingVm){const s=t.getUnderlyingVm(e);if(s)return Object.assign(s,i)}return i},computeFutureIndex(r,e){const t=[...e.to.children].filter(l=>l.style.display!=="none");if(t.length===0)return 0;const n=t.indexOf(e.related),i=r.component.getVmIndex(n);return t.indexOf(Mu)!==-1||!e.willInsertAfter?i:i+1}}}),r1={class:"d-flex flex-row align-center"},Hd=c.defineComponent({__name:"ColumnSettingsDialog",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(r){const e=c.useModel(r,"modelValue"),t=c.ref("");return(n,i)=>{const s=c.resolveComponent("GripVerticalIcon"),l=c.resolveComponent("v-list-item-content");return c.openBlock(),c.createBlock(wa,{"dd-id":"col-settings",buttons:!1,title:"Column settings"},{default:c.withCtx(()=>[c.createVNode(Xv,{modelValue:t.value,"onUpdate:modelValue":i[0]||(i[0]=d=>t.value=d)},null,8,["modelValue"]),c.createVNode(Vt.VList,null,{default:c.withCtx(()=>[c.createVNode(c.unref(n1),{list:e.value,animation:200,"ghost-class":"ghost-card"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.value,d=>(c.openBlock(),c.createBlock(Vt.VListItem,{key:d.key,class:"pa-0"},{default:c.withCtx(()=>[c.createElementVNode("div",r1,[c.createVNode(s,{class:"mb-2"}),c.createVNode(Vt.VListItemAction,null,{default:c.withCtx(()=>[c.createVNode(Rk.VCheckbox,{modelValue:d.checked,"onUpdate:modelValue":f=>d.checked=f},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),c.createVNode(l,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,{class:"mb-1"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.title)+"  ",1)]),_:2},1024)]),_:2},1024),d.icon?(c.openBlock(),c.createBlock(Xs.VIcon,{key:0},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.icon),1)]),_:2},1024)):c.createCommentVNode("",!0)])]),_:2},1024))),128))]),_:1},8,["list"])]),_:1})]),_:1})}}}),o1=["src","height","width"],i1={key:0,class:"text-center text-h6"},a1={key:1,class:"text-center text-h5"},s1={key:0,class:"text-center"},c1={class:"d-flex justify-center align-center mt-4 ga-3"},$d=c.defineComponent({__name:"TableCard",props:{item:{},columns:{},size:{},image:{},tags:{},route:{},callback:{type:Function}},setup(r){const e=r,t=()=>{var i;return((i=e.columns.find(s=>s.isHeader))==null?void 0:i.key)||""},n=()=>{var i;return((i=e.columns.find(s=>s.isSubtitle))==null?void 0:i.key)||""};return(i,s)=>(c.openBlock(),c.createBlock(lt.VCard,{onClick:i.callback,ripple:"",class:"d-flex flex-column pa-4pa-4 bg-containerBg"},{default:c.withCtx(()=>[c.createVNode(lt.VCardActions,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"end"},{default:c.withCtx(()=>[c.renderSlot(i.$slots,"actions",{item:i.item})]),_:3})]),_:3}),c.createVNode(lt.VCardTitle,null,{default:c.withCtx(()=>[c.createVNode(_e.VRow,{"no-gutters":"",align:"center",justify:"center"},{default:c.withCtx(()=>[i.image?(c.openBlock(),c.createElementBlock("img",{key:0,src:i.image,height:i.size,width:i.size,alt:""},null,8,o1)):c.createCommentVNode("",!0)]),_:1})]),_:1}),t()?(c.openBlock(),c.createElementBlock("div",i1,c.toDisplayString(i.item[t()]),1)):c.createCommentVNode("",!0),n()?(c.openBlock(),c.createElementBlock("div",a1,c.toDisplayString(i.item[n()]),1)):c.createCommentVNode("",!0),c.createVNode(fo.VDivider,{class:"ma-3"}),c.createVNode(lt.VCardText,{class:"d-flex flex-column align-center pa-4 pt-1"},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(i.columns,l=>(c.openBlock(),c.createElementBlock(c.Fragment,{key:l.key},[i.item[l.key]&&!l.isHeader&&!l.isSubtitle?(c.openBlock(),c.createElementBlock("div",s1,c.toDisplayString(l.title)+": "+c.toDisplayString(i.item[l.key]),1)):c.createCommentVNode("",!0)],64))),128)),c.createElementVNode("div",c1,[i.tags?(c.openBlock(!0),c.createElementBlock(c.Fragment,{key:0},c.renderList(i.tags,l=>(c.openBlock(),c.createBlock(Ok.VChip,{class:"pa-3",key:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(l),1)]),_:2},1024))),128)):c.createCommentVNode("",!0)])]),_:1})]),_:3},8,["onClick"]))}}),l1=c.defineComponent({__name:"TableCardsView",props:{data:{},columns:{},size:{},itemKey:{}},setup(r){return(e,t)=>(c.openBlock(),c.createBlock(_e.VRow,{class:"mt-5 border tb-cards-h",wrap:""},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.data,n=>(c.openBlock(),c.createBlock(_e.VCol,{cols:"12",sm:"6",md:"4",lg:"3",class:"pa-2",key:n[e.itemKey]},{default:c.withCtx(()=>[c.createVNode($d,{item:n,columns:e.columns,size:e.size},{actions:c.withCtx(({item:i})=>[c.renderSlot(e.$slots,"actions",{item:i},void 0,!0)]),_:2},1032,["item","columns","size"])]),_:2},1024))),128))]),_:3}))}}),fy=vi(l1,[["__scopeId","data-v-e1a4ccbc"]]),u1={class:"j-field px-4 py-3 rounded-sm bg-containerBg"},gy=c.defineComponent({__name:"ReadOnlyField",props:{value:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",u1,c.toDisplayString(e.value),1))}}),d1={key:0,class:"mb-2 ms-1"},my=c.defineComponent({__name:"JTextField",props:{modelValue:{},name:{},label:{},type:{default:"text"},readonly:{type:Boolean},density:{},rules:{}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock("div",null,[s.name?(c.openBlock(),c.createElementBlock("p",d1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(c.unref(Ft.VTextField),{key:2,variant:i.value,color:"secondary","bg-color":"containerBg",rounded:"sm","hide-details":"auto",type:s.type,density:s.density,rules:s.rules,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),class:"j-field"},null,8,["variant","type","density","rules","value"])),s.readonly?(c.openBlock(),c.createBlock(gy,{key:3,value:s.modelValue},null,8,["value"])):c.createCommentVNode("",!0)]))}}),h1={class:"text-faded mt-7"},f1={class:"d-flex align-baseline mb-1"},g1={class:"me-1"},m1={class:"max-w-_form-metadataJ"},p1={key:0,class:"mb-1"},v1={key:1,class:"mb-1"},y1={class:"mb-1"},kc=c.defineComponent({__name:"FormMetadata",props:{meta:{},id:{}},setup(r){return(e,t)=>(c.openBlock(),c.createElementBlock("div",h1,[c.createVNode(_e.VRow,{"no-gutters":"",class:"align-end",align:"center",justify:"space-between"},{default:c.withCtx(()=>[c.renderSlot(e.$slots,"default"),e.id?(c.openBlock(),c.createBlock(_e.VCol,{key:0,cols:"auto",class:"pa-2"},{default:c.withCtx(()=>[c.createElementVNode("p",f1,[c.createElementVNode("b",g1,c.toDisplayString(e.id.title)+": ",1),c.createElementVNode("span",m1,c.toDisplayString(e.id.key||"-"),1),c.createElementVNode("span",null,[c.createVNode(Cc,{"content-to-copy":e.id.key,size:15},null,8,["content-to-copy"])])]),c.createElementVNode("p",null,[t[0]||(t[0]=c.createElementVNode("b",null,"Created: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.created_at)+" - "+c.toDisplayString(e.meta.created_by),1)])]),_:1})):c.createCommentVNode("",!0),c.createVNode(_e.VCol,{cols:"auto",class:"d-flex flex-column align-baseline px-2 mt-1"},{default:c.withCtx(()=>[e.meta.updated_at&&e.meta.updated_by?(c.openBlock(),c.createElementBlock("p",p1,[t[1]||(t[1]=c.createElementVNode("b",null,"Updated:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.updated_at)+" - "+c.toDisplayString(e.meta.updated_by),1)])):(c.openBlock(),c.createElementBlock("p",v1,[t[2]||(t[2]=c.createElementVNode("b",null,"Modified:  ",-1)),c.createTextVNode(c.toDisplayString(e.meta.modified_at)+" - "+c.toDisplayString(e.meta.modified_by),1)])),c.createElementVNode("p",y1,[t[3]||(t[3]=c.createElementVNode("b",null,"Delegated: ",-1)),c.createTextVNode(c.toDisplayString(e.meta.delegated_at)+" - "+c.toDisplayString(e.meta.delegated_by),1)])]),_:1})]),_:3})]))}}),C1={key:0,class:"mb-2 ms-1"},py=c.defineComponent({__name:"JSelect",props:{modelValue:{},name:{},label:{},placeholder:{},readonly:{type:Boolean},items:{},itemTitle:{},itemValue:{},density:{},loading:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled"),s=c.computed(()=>{if(Array.isArray(t.items)&&t.items.length>0)if(typeof t.items[0]=="object"&&t.itemValue&&t.itemTitle){const d=t.items.find(f=>f[t.itemValue]===t.modelValue);return d?d[t.itemTitle]:""}else{const d=t.items.indexOf(t.modelValue);return d!==-1?t.items[d]:""}return""}),l=d=>{n("update:modelValue",d)};return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[d.name?(c.openBlock(),c.createElementBlock("p",C1,c.toDisplayString(d.name),1)):c.createCommentVNode("",!0),d.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(d.label),1)]),_:1})):c.createCommentVNode("",!0),d.readonly?(c.openBlock(),c.createBlock(gy,{key:3,value:s.value},null,8,["value"])):(c.openBlock(),c.createBlock(c.unref(Ft.VSelect),{key:2,modelValue:t.modelValue,"onUpdate:modelValue":[f[0]||(f[0]=g=>t.modelValue=g),l],variant:i.value,items:d.items,"item-title":d.itemTitle,"item-value":d.itemValue,loading:d.loading,placeholder:d.placeholder,density:d.density,"bg-color":"containerBg",rounded:"false","hide-details":"",class:"j-field"},null,8,["modelValue","variant","items","item-title","item-value","loading","placeholder","density"]))],64))}}),w1={key:0,class:"mb-2 ms-1"},_1={key:3,class:"j-textarea px-4 py-3 rounded-sm bg-containerBg"},vy=c.defineComponent({__name:"JTextArea",props:{modelValue:{},name:{},label:{},readonly:{type:Boolean},rows:{},hideDetails:{type:Boolean}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=c.computed(()=>t.readonly?"solo":"solo-filled");return(s,l)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[s.name?(c.openBlock(),c.createElementBlock("p",w1,c.toDisplayString(s.name),1)):c.createCommentVNode("",!0),s.label?(c.openBlock(),c.createBlock(ua.VLabel,{key:1,class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(s.label),1)]),_:1})):c.createCommentVNode("",!0),s.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Nk.VTextarea,{key:2,variant:i.value,"bg-color":"containerBg",rounded:"false",rows:s.rows,hideDetails:s.hideDetails,value:s.modelValue,"onUpdate:modelValue":l[0]||(l[0]=d=>n("update:modelValue",d)),"no-resize":""},null,8,["variant","rows","hideDetails","value"])),s.readonly?(c.openBlock(),c.createElementBlock("div",_1,c.toDisplayString(s.modelValue),1)):c.createCommentVNode("",!0)],64))}}),yy=c.defineComponent({__name:"CancelButton",props:{title:{}},emits:["cancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Be.VBtn,{color:"secondary",variant:"outlined",onClick:i[0]||(i[0]=s=>t("cancel")),class:"me-2 j-btn-form"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.title?"Cancel":"Back"),1)]),_:1}))}}),Cy=c.defineComponent({__name:"SaveButton",props:{disabled:{type:Boolean}},emits:["onSave"],setup(r,{emit:e}){const t=e,n=c.ref(!1);async function i(){n.value=!0,await t("onSave"),n.value=!1}return(s,l)=>(c.openBlock(),c.createBlock(Be.VBtn,{disabled:s.disabled,loading:n.value,color:"secondary",onClick:i,onKeydown:c.withKeys(i,["enter"]),class:"j-btn-form"},{default:c.withCtx(()=>l[0]||(l[0]=[c.createTextVNode(" Save ")])),_:1},8,["disabled","loading"]))}}),T1={class:"mt-4"},wy=c.defineComponent({__name:"JForm",props:{title:{},metadata:{},id:{},cancelReturn:{type:Boolean}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e;return(n,i)=>(c.openBlock(),c.createBlock(Sc,{title:n.title,class:"d-flex flex-column ma-0"},{default:c.withCtx(()=>[n.title?(c.openBlock(),c.createBlock(fo.VDivider,{key:0})):c.createCommentVNode("",!0),c.createElementVNode("div",T1,[c.renderSlot(n.$slots,"default")]),c.createVNode(lt.VCardText,{class:"pa-0 mx-0 align-content-end"},{default:c.withCtx(()=>[c.createVNode(_e.VRow,{justify:"space-between",class:"mt-4"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(kc,{id:n.id,meta:n.metadata},null,8,["id","meta"])]),_:1}),c.createVNode(_e.VSpacer),c.createVNode(_e.VCol,{cols:"auto",class:"align-content-end"},{default:c.withCtx(()=>[c.createVNode(yy,{"cancel-return":n.cancelReturn,onCancel:i[0]||(i[0]=s=>t("onCancel"))},null,8,["cancel-return"]),c.createVNode(Cy,{onOnSave:i[1]||(i[1]=s=>t("onSave"))})]),_:1})]),_:1})]),_:1})]),_:3},8,["title"]))}}),E1={class:"d-flex align-items-center"},S1={key:0,class:"d-flex align-center"},A1={class:"ms-1"},b1={class:"d-flex"},I1={class:"d-flex mb-1 align-center"},k1={class:"min-w-100 relative"},_y=c.defineComponent({__name:"TabFormHeader",props:{id:{},readonly:{type:Boolean,default:!1}},emits:["update:isEdition","save","cancel","delete","disable"],setup(r,{emit:e}){var g;const t=r,n=e,i=c.getCurrentInstance(),s=((g=i==null?void 0:i.vnode.props)==null?void 0:g.onDisable)!==void 0,l=c.ref(t.readonly);function d(){l.value=!l.value,n("update:isEdition",l.value)}async function f(){n("delete"),n("disable")}return(m,v)=>(c.openBlock(),c.createElementBlock("div",E1,[m.id?(c.openBlock(),c.createElementBlock("div",S1,[v[0]||(v[0]=c.createElementVNode("b",null,"ID:",-1)),c.createElementVNode("span",A1,c.toDisplayString(m.id),1),c.createVNode(Cc,{"content-to-copy":m.id,size:20},null,8,["content-to-copy"])])):c.createCommentVNode("",!0),c.createVNode(_e.VSpacer),c.createElementVNode("div",b1,[c.createVNode(Be.VBtn,{onClick:f,variant:"text"},{default:c.withCtx(()=>[s?(c.openBlock(),c.createBlock(c.unref(fO),{key:0,size:"11",class:"me-2"})):c.createCommentVNode("",!0),c.createVNode(Xs.VIcon,{class:"me-2"},{default:c.withCtx(()=>v[1]||(v[1]=[c.createTextVNode("mdi-delete-outline")])),_:1}),c.createTextVNode(" "+c.toDisplayString(s?"Disable":"Delete"),1)]),_:1}),c.createElementVNode("div",I1,[c.createVNode(fo.VDivider,{class:"mx-2 my-1",vertical:""}),c.createElementVNode("div",k1,[c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary","prepend-icon":"mdi-pencil",width:"95"},{default:c.withCtx(()=>v[2]||(v[2]=[c.createTextVNode(" Edit ")])),_:1},512),[[c.vShow,!l.value]]),c.withDirectives(c.createVNode(Be.VBtn,{onClick:d,variant:"text",color:"secondary",width:"95"},{default:c.withCtx(()=>[c.createVNode(Xs.VIcon,{class:"pt-1 pe-2"},{default:c.withCtx(()=>v[3]||(v[3]=[c.createTextVNode("mdi-close")])),_:1}),v[4]||(v[4]=c.createTextVNode(" Cancel "))]),_:1},512),[[c.vShow,l.value]])])])])]))}}),R1={class:"d-flex flex-column"},O1={class:"height d-flex flex-column"},N1={class:"d-flex justify-between align-end"},P1=c.defineComponent({__name:"FormHeadless",props:{id:{},metadata:{},readonly:{type:Boolean,default:!1}},emits:["onSave","onCancel"],setup(r,{emit:e}){const t=e,n=c.useAttrs();return(i,s)=>(c.openBlock(),c.createBlock(Sc,null,{default:c.withCtx(()=>[c.createElementVNode("div",R1,[c.createElementVNode("div",O1,[c.renderSlot(i.$slots,"default",{},void 0,!0)])]),c.createElementVNode("div",N1,[c.createVNode(_e.VRow,{"no-gutters":"",justify:"space-between",class:"w-100"},{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"auto",class:"text-sm-subtitle-2 text-medium-emphasis"},{default:c.withCtx(()=>[c.createVNode(kc,{id:i.id,meta:i.metadata},null,8,["id","meta"])]),_:1}),i.readonly?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(_e.VCol,{key:0,class:"d-flex align-end",cols:"auto"},{default:c.withCtx(()=>["onCancel"in c.unref(n)?(c.openBlock(),c.createBlock(yy,{key:0,title:"Back",onCancel:s[0]||(s[0]=l=>t("onCancel"))})):c.createCommentVNode("",!0),"onSave"in c.unref(n)?(c.openBlock(),c.createBlock(Cy,{key:1,onOnSave:s[1]||(s[1]=l=>t("onSave"))})):c.createCommentVNode("",!0)]),_:1}))]),_:1})])]),_:3}))}}),Ty=vi(P1,[["__scopeId","data-v-489d31c3"]]);/**
21
21
  * @license @tabler/icons-vue v3.22.0 - MIT
22
22
  *
23
23
  * This source code is licensed under the MIT license.
24
24
  * See the LICENSE file in the root directory of this source tree.
25
- */var jm={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
25
+ */var qm={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};/**
26
26
  * @license @tabler/icons-vue v3.22.0 - MIT
27
27
  *
28
28
  * This source code is licensed under the MIT license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
- */const Pc=(r,e,t,n)=>({color:i="currentColor",size:s=24,stroke:l=2,title:d,class:f,...g},{attrs:m,slots:v})=>{let C=[...n.map(S=>c.h(...S)),...v.default?[v.default()]:[]];return d&&(C=[c.h("title",d),...C]),c.h("svg",{...jm[r],width:s,height:s,...m,class:["tabler-icon",`tabler-icon-${e}`],...r==="filled"?{fill:i}:{"stroke-width":l??jm[r]["stroke-width"],stroke:i},...g},C)};/**
30
+ */const Rc=(r,e,t,n)=>({color:i="currentColor",size:s=24,stroke:l=2,title:d,class:f,...g},{attrs:m,slots:v})=>{let C=[...n.map(S=>c.h(...S)),...v.default?[v.default()]:[]];return d&&(C=[c.h("title",d),...C]),c.h("svg",{...qm[r],width:s,height:s,...m,class:["tabler-icon",`tabler-icon-${e}`],...r==="filled"?{fill:i}:{"stroke-width":l??qm[r]["stroke-width"],stroke:i},...g},C)};/**
31
31
  * @license @tabler/icons-vue v3.22.0 - MIT
32
32
  *
33
33
  * This source code is licensed under the MIT license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
- */var D1=Pc("outline","buildings","IconBuildings",[["path",{d:"M4 21v-15c0 -1 1 -2 2 -2h5c1 0 2 1 2 2v15",key:"svg-0"}],["path",{d:"M16 8h2c1 0 2 1 2 2v11",key:"svg-1"}],["path",{d:"M3 21h18",key:"svg-2"}],["path",{d:"M10 12v0",key:"svg-3"}],["path",{d:"M10 16v0",key:"svg-4"}],["path",{d:"M10 8v0",key:"svg-5"}],["path",{d:"M7 12v0",key:"svg-6"}],["path",{d:"M7 16v0",key:"svg-7"}],["path",{d:"M7 8v0",key:"svg-8"}],["path",{d:"M17 12v0",key:"svg-9"}],["path",{d:"M17 16v0",key:"svg-10"}]]);/**
35
+ */var M1=Rc("outline","buildings","IconBuildings",[["path",{d:"M4 21v-15c0 -1 1 -2 2 -2h5c1 0 2 1 2 2v15",key:"svg-0"}],["path",{d:"M16 8h2c1 0 2 1 2 2v11",key:"svg-1"}],["path",{d:"M3 21h18",key:"svg-2"}],["path",{d:"M10 12v0",key:"svg-3"}],["path",{d:"M10 16v0",key:"svg-4"}],["path",{d:"M10 8v0",key:"svg-5"}],["path",{d:"M7 12v0",key:"svg-6"}],["path",{d:"M7 16v0",key:"svg-7"}],["path",{d:"M7 8v0",key:"svg-8"}],["path",{d:"M17 12v0",key:"svg-9"}],["path",{d:"M17 16v0",key:"svg-10"}]]);/**
36
36
  * @license @tabler/icons-vue v3.22.0 - MIT
37
37
  *
38
38
  * This source code is licensed under the MIT license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
- */var L1=Pc("outline","universe","IconUniverse",[["path",{d:"M7.027 11.477a5 5 0 1 0 5.496 -4.45a4.951 4.951 0 0 0 -3.088 .681",key:"svg-0"}],["path",{d:"M5.636 5.636a9 9 0 1 0 3.555 -2.188",key:"svg-1"}],["path",{d:"M18 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M9 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]]);/**
40
+ */var x1=Rc("outline","universe","IconUniverse",[["path",{d:"M7.027 11.477a5 5 0 1 0 5.496 -4.45a4.951 4.951 0 0 0 -3.088 .681",key:"svg-0"}],["path",{d:"M5.636 5.636a9 9 0 1 0 3.555 -2.188",key:"svg-1"}],["path",{d:"M18 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M9 16m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}]]);/**
41
41
  * @license @tabler/icons-vue v3.22.0 - MIT
42
42
  *
43
43
  * This source code is licensed under the MIT license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
- */var B1=Pc("outline","user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]);/**
45
+ */var D1=Rc("outline","user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]);/**
46
46
  * @license @tabler/icons-vue v3.22.0 - MIT
47
47
  *
48
48
  * This source code is licensed under the MIT license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
- */var U1=Pc("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/*! @azure/msal-common v14.16.0 2024-11-05 */const P={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Is={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},yi=[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE],Ym=[...yi,P.EMAIL_SCOPE],Pt={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},ct={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},zr={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},ks={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},dt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},Jm={PLAIN:"plain",S256:"S256"},Aa={QUERY:"query",FRAGMENT:"fragment"},V1={...Aa,FORM_POST:"form_post"},by={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},Rs={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},bt={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},ne={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},qd="appmetadata",F1="client_info",la="1",lc={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Xt={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},pt={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Oe={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},ua={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Qm={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Xm={username:"username",password:"password"},Os={httpSuccess:200,httpBadRequest:400},zo={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},Uu={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Br={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},H1={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},$1=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const Gd="unexpected_error",K1="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const Zm={[Gd]:"Unexpected error in authentication.",[K1]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class He extends Error{constructor(e,t,n){const i=t?`${e}: ${t}`:e;super(i),Object.setPrototypeOf(this,He.prototype),this.errorCode=e||P.EMPTY_STRING,this.errorMessage=t||P.EMPTY_STRING,this.subError=n||P.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function Iy(r,e){return new He(r,e?`${Zm[r]} ${e}`:Zm[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */const jd="client_info_decoding_error",ky="client_info_empty_error",Yd="token_parsing_error",Ry="null_or_empty_token",vr="endpoints_resolution_error",Oy="network_error",Ny="openid_config_error",Py="hash_not_deserialized",fi="invalid_state",My="state_mismatch",uc="state_not_found",xy="nonce_mismatch",Jd="auth_time_not_found",Dy="max_age_transpired",z1="multiple_matching_tokens",W1="multiple_matching_accounts",Ly="multiple_matching_appMetadata",By="request_cannot_be_made",Uy="cannot_remove_empty_scope",Vy="cannot_append_scopeset",fd="empty_input_scopeset",q1="device_code_polling_cancelled",G1="device_code_expired",j1="device_code_unknown_error",Qd="no_account_in_silent_request",Fy="invalid_cache_record",Xd="invalid_cache_environment",gd="no_account_found",md="no_crypto_object",pd="unexpected_credential_type",Y1="invalid_assertion",J1="invalid_client_credential",yr="token_refresh_required",Q1="user_timeout_reached",Hy="token_claims_cnf_required_for_signedjwt",$y="authorization_code_missing_from_server_response",Ky="binding_key_not_removed",zy="end_session_endpoint_not_supported",Zd="key_id_missing",X1="no_network_connectivity",Z1="user_canceled",eM="missing_tenant_id_error",ge="method_not_implemented",tM="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const ep={[jd]:"The client info could not be parsed/decoded correctly",[ky]:"The client info was empty",[Yd]:"Token cannot be parsed",[Ry]:"The token is null or empty",[vr]:"Endpoints cannot be resolved",[Oy]:"Network request failed",[Ny]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[Py]:"The hash parameters could not be deserialized",[fi]:"State was not the expected format",[My]:"State mismatch error",[uc]:"State not found",[xy]:"Nonce mismatch error",[Jd]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Dy]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[z1]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[W1]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Ly]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[By]:"Token request cannot be made without authorization code or refresh token.",[Uy]:"Cannot remove null or empty scope from ScopeSet",[Vy]:"Cannot append ScopeSet",[fd]:"Empty input ScopeSet cannot be processed",[q1]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[G1]:"Device code is expired.",[j1]:"Device code stopped polling for unknown reasons.",[Qd]:"Please pass an account object, silent flow is not supported without account information",[Fy]:"Cache record object was null or undefined.",[Xd]:"Invalid environment when attempting to create cache entry",[gd]:"No account found in cache for given key.",[md]:"No crypto object detected.",[pd]:"Unexpected credential type.",[Y1]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[J1]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[yr]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[Q1]:"User defined timeout for device code polling reached",[Hy]:"Cannot generate a POP jwt if the token_claims are not populated",[$y]:"Server response does not contain an authorization code to proceed",[Ky]:"Could not remove the credential's binding key from storage.",[zy]:"The provided authority does not support logout",[Zd]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[X1]:"No network connectivity. Check your internet connection.",[Z1]:"User cancelled the flow.",[eM]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ge]:"This method has not been implemented",[tM]:"The nested app auth bridge is disabled"};class Mc extends He{constructor(e,t){super(e,t?`${ep[e]}: ${t}`:ep[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Mc.prototype)}}function B(r,e){return new Mc(r,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const dc={createNewGuid:()=>{throw B(ge)},base64Decode:()=>{throw B(ge)},base64Encode:()=>{throw B(ge)},base64UrlEncode:()=>{throw B(ge)},encodeKid:()=>{throw B(ge)},async getPublicKeyThumbprint(){throw B(ge)},async removeTokenBindingKey(){throw B(ge)},async clearKeystore(){throw B(ge)},async signJwt(){throw B(ge)},async hashString(){throw B(ge)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var xe;(function(r){r[r.Error=0]="Error",r[r.Warning=1]="Warning",r[r.Info=2]="Info",r[r.Verbose=3]="Verbose",r[r.Trace=4]="Trace"})(xe||(xe={}));class qr{constructor(e,t,n){this.level=xe.Info;const i=()=>{},s=e||qr.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||i,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:xe.Info,this.correlationId=s.correlationId||P.EMPTY_STRING,this.packageName=t||P.EMPTY_STRING,this.packageVersion=n||P.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:xe.Info}}clone(e,t,n){return new qr({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const s=`${`[${new Date().toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${xe[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,s,t.containsPii||!1)}executeCallback(e,t,n){this.localCallback&&this.localCallback(e,t,n)}error(e,t){this.logMessage(e,{logLevel:xe.Error,containsPii:!1,correlationId:t||P.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:xe.Error,containsPii:!0,correlationId:t||P.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!1,correlationId:t||P.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!0,correlationId:t||P.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!1,correlationId:t||P.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!0,correlationId:t||P.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!1,correlationId:t||P.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!0,correlationId:t||P.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!1,correlationId:t||P.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!0,correlationId:t||P.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Wy="@azure/msal-common",eh="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const th={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};/*! @azure/msal-common v14.16.0 2024-11-05 */function wo(r,e){const t=nM(r);try{const n=e(t);return JSON.parse(n)}catch{throw B(Yd)}}function nM(r){if(!r)throw B(Ry);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(r);if(!t||t.length<4)throw B(Yd);return t[2]}function qy(r,e){if(e===0||Date.now()-3e5>r+e)throw B(Dy)}/*! @azure/msal-common v14.16.0 2024-11-05 */function or(){return Math.round(new Date().getTime()/1e3)}function vd(r,e){const t=Number(r)||0;return or()+e>t}function rM(r){return Number(r)>or()}/*! @azure/msal-common v14.16.0 2024-11-05 */function ii(r){return[oM(r),iM(r),aM(r),sM(r),cM(r)].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function xc(r,e,t,n,i){return{credentialType:ne.ID_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t,realm:i}}function Dc(r,e,t,n,i,s,l,d,f,g,m,v,C,S,_){var O,$;const A={homeAccountId:r,credentialType:ne.ACCESS_TOKEN,secret:t,cachedAt:or().toString(),expiresOn:l.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:n,realm:i,target:s,tokenType:m||Oe.BEARER};if(v&&(A.userAssertionHash=v),g&&(A.refreshOn=g.toString()),S&&(A.requestedClaims=S,A.requestedClaimsHash=_),((O=A.tokenType)==null?void 0:O.toLowerCase())!==Oe.BEARER.toLowerCase())switch(A.credentialType=ne.ACCESS_TOKEN_WITH_AUTH_SCHEME,A.tokenType){case Oe.POP:const V=wo(t,f);if(!(($=V==null?void 0:V.cnf)!=null&&$.kid))throw B(Hy);A.keyId=V.cnf.kid;break;case Oe.SSH:A.keyId=C}return A}function Gy(r,e,t,n,i,s,l){const d={credentialType:ne.REFRESH_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t};return s&&(d.userAssertionHash=s),i&&(d.familyId=i),l&&(d.expiresOn=l.toString()),d}function nh(r){return r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")}function tp(r){return r?nh(r)&&r.hasOwnProperty("realm")&&r.hasOwnProperty("target")&&(r.credentialType===ne.ACCESS_TOKEN||r.credentialType===ne.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function np(r){return r?nh(r)&&r.hasOwnProperty("realm")&&r.credentialType===ne.ID_TOKEN:!1}function rp(r){return r?nh(r)&&r.credentialType===ne.REFRESH_TOKEN:!1}function oM(r){return[r.homeAccountId,r.environment].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function iM(r){const e=r.credentialType===ne.REFRESH_TOKEN&&r.familyId||r.clientId;return[r.credentialType,e,r.realm||""].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function aM(r){return(r.target||"").toLowerCase()}function sM(r){return(r.requestedClaimsHash||"").toLowerCase()}function cM(r){return r.tokenType&&r.tokenType.toLowerCase()!==Oe.BEARER.toLowerCase()?r.tokenType.toLowerCase():""}function lM(r,e){const t=r.indexOf(pt.CACHE_KEY)===0;let n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&n}function uM(r,e){let t=!1;r&&(t=r.indexOf(ua.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),t&&n}function dM({environment:r,clientId:e}){return[qd,r,e].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function hM(r,e){return e?r.indexOf(qd)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function fM(r,e){return e?r.indexOf(lc.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function op(){return or()+lc.REFRESH_TIME_SECONDS}function Ns(r,e,t){r.authorization_endpoint=e.authorization_endpoint,r.token_endpoint=e.token_endpoint,r.end_session_endpoint=e.end_session_endpoint,r.issuer=e.issuer,r.endpointsFromNetwork=t,r.jwks_uri=e.jwks_uri}function Vu(r,e,t){r.aliases=e.aliases,r.preferred_cache=e.preferred_cache,r.preferred_network=e.preferred_network,r.aliasesFromNetwork=t}function ip(r){return r.expiresAt<=or()}/*! @azure/msal-common v14.16.0 2024-11-05 */const jy="redirect_uri_empty",gM="claims_request_parsing_error",Yy="authority_uri_insecure",ta="url_parse_error",Jy="empty_url_error",Qy="empty_input_scopes_error",Xy="invalid_prompt_value",rh="invalid_claims",Zy="token_request_empty",eC="logout_request_empty",tC="invalid_code_challenge_method",oh="pkce_params_missing",ih="invalid_cloud_discovery_metadata",nC="invalid_authority_metadata",rC="untrusted_authority",Lc="missing_ssh_jwk",oC="missing_ssh_kid",mM="missing_nonce_authentication_header",pM="invalid_authentication_header",iC="cannot_set_OIDCOptions",aC="cannot_allow_native_broker",sC="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const vM={[jy]:"A redirect URI is required for all calls, and none has been set.",[gM]:"Could not parse the given claims request object.",[Yy]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[ta]:"URL could not be parsed into appropriate segments.",[Jy]:"URL was empty or null.",[Qy]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Xy]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[rh]:"Given claims parameter must be a stringified JSON object.",[Zy]:"Token request was empty and not found in cache.",[eC]:"The logout request was null or undefined.",[tC]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[oh]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[ih]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[nC]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[rC]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Lc]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[oC]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[mM]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[pM]:"Invalid authentication header provided",[iC]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[aC]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[sC]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class ah extends He{constructor(e){super(e,vM[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,ah.prototype)}}function Pe(r){return new ah(r)}/*! @azure/msal-common v14.16.0 2024-11-05 */class Un{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0}static startsWith(e,t){return e.indexOf(t)===0}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},n=e.split("&"),i=s=>decodeURIComponent(s.replace(/\+/g," "));return n.forEach(s=>{if(s.trim()){const[l,d]=s.split(/=(.+)/g,2);l&&d&&(t[i(l)]=i(d))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Je{constructor(e){const t=e?Un.trimArrayEntries([...e]):[],n=t?Un.removeEmptyStringsFromArray(t):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach(i=>this.scopes.add(i))}static fromString(e){const n=(e||P.EMPTY_STRING).split(" ");return new Je(n)}static createSearchScopes(e){const t=new Je(e);return t.containsOnlyOIDCScopes()?t.removeScope(P.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Pe(Qy)}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new Je(t);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(t=>this.containsScope(t))}containsOnlyOIDCScopes(){let e=0;return Ym.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(t=>this.appendScope(t))}catch{throw B(Vy)}}removeScope(e){if(!e)throw B(Uy);this.scopes.delete(e.trim())}removeOIDCScopes(){Ym.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw B(fd);const t=new Set;return e.scopes.forEach(n=>t.add(n.toLowerCase())),this.scopes.forEach(n=>t.add(n.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw B(fd);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),n=e.getScopeCount(),i=this.getScopeCount();return t.size<i+n}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):P.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.16.0 2024-11-05 */function hc(r,e){if(!r)throw B(ky);try{const t=e(r);return JSON.parse(t)}catch{throw B(jd)}}function ai(r){if(!r)throw B(jd);const e=r.split(bt.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?P.EMPTY_STRING:e[1]}}/*! @azure/msal-common v14.16.0 2024-11-05 */function fc(r,e){return!!r&&!!e&&r===e.split(".")[1]}function sh(r,e,t,n){if(n){const{oid:i,sub:s,tid:l,name:d,tfp:f,acr:g}=n,m=l||f||g||"";return{tenantId:m,localAccountId:i||s||"",name:d,isHomeTenant:fc(m,r)}}else return{tenantId:t,localAccountId:e,isHomeTenant:fc(t,r)}}function ch(r,e,t,n){let i=r;if(e){const{isHomeTenant:s,...l}=e;i={...r,...l}}if(t){const{isHomeTenant:s,...l}=sh(r.homeAccountId,r.localAccountId,r.tenantId,t);return i={...i,...l,idTokenClaims:t,idToken:n},i}return i}/*! @azure/msal-common v14.16.0 2024-11-05 */const Dn={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function cC(r){return r&&(r.tid||r.tfp||r.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Tr={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class at{generateAccountId(){return[this.homeAccountId,this.environment].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return at.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,n){var g,m,v,C,S,_;const i=new at;t.authorityType===Dn.Adfs?i.authorityType=Rs.ADFS_ACCOUNT_TYPE:t.protocolMode===Tr.AAD?i.authorityType=Rs.MSSTS_ACCOUNT_TYPE:i.authorityType=Rs.GENERIC_ACCOUNT_TYPE;let s;e.clientInfo&&n&&(s=hc(e.clientInfo,n)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const l=e.environment||t&&t.getPreferredCache();if(!l)throw B(Xd);i.environment=l,i.realm=(s==null?void 0:s.utid)||cC(e.idTokenClaims)||"",i.localAccountId=(s==null?void 0:s.uid)||((g=e.idTokenClaims)==null?void 0:g.oid)||((m=e.idTokenClaims)==null?void 0:m.sub)||"";const d=((v=e.idTokenClaims)==null?void 0:v.preferred_username)||((C=e.idTokenClaims)==null?void 0:C.upn),f=(S=e.idTokenClaims)!=null&&S.emails?e.idTokenClaims.emails[0]:null;if(i.username=d||f||"",i.name=((_=e.idTokenClaims)==null?void 0:_.name)||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const A=sh(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[A]}return i}static createFromAccountInfo(e,t,n){var s;const i=new at;return i.authorityType=e.authorityType||Rs.GENERIC_ACCOUNT_TYPE,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=t,i.msGraphHost=n,i.tenantProfiles=Array.from(((s=e.tenantProfiles)==null?void 0:s.values())||[]),i}static generateHomeAccountId(e,t,n,i,s){if(!(t===Dn.Adfs||t===Dn.Dsts)){if(e)try{const l=hc(e,i.base64Decode);if(l.uid&&l.utid)return`${l.uid}.${l.utid}`}catch{}n.warning("No client info in response")}return(s==null?void 0:s.sub)||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,t,n){if(!e||!t)return!1;let i=!0;if(n){const s=e.idTokenClaims||{},l=t.idTokenClaims||{};i=s.iat===l.iat&&s.nonce===l.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&i}}/*! @azure/msal-common v14.16.0 2024-11-05 */function lC(r){return r.startsWith("#/")?r.substring(2):r.startsWith("#")||r.startsWith("?")?r.substring(1):r}function gc(r){if(!r||r.indexOf("=")<0)return null;try{const e=lC(r),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw B(Py)}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */class ye{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Pe(Jy);e.includes("#")||(this._urlString=ye.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Un.endsWith(t,"?")?t=t.slice(0,-1):Un.endsWith(t,"?/")&&(t=t.slice(0,-2)),Un.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Pe(ta)}if(!e.HostNameAndPort||!e.PathSegments)throw Pe(ta);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Pe(Yy)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return ye.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),n=t.PathSegments;return e&&n.length!==0&&(n[0]===zr.COMMON||n[0]===zr.ORGANIZATIONS)&&(n[0]=e),ye.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Pe(ta);const n={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=n.AbsolutePath.split("/");return i=i.filter(s=>s&&s.length>0),n.PathSegments=i,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(t);if(!n)throw Pe(ta);return n[2]}static getAbsoluteUrl(e,t){if(e[0]===P.FORWARD_SLASH){const i=new ye(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new ye(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!gc(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const uC={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},ap=uC.endpointMetadata,lh=uC.instanceDiscoveryMetadata,dC=new Set;lh.metadata.forEach(r=>{r.aliases.forEach(e=>{dC.add(e)})});function yM(r,e){var i;let t;const n=r.canonicalAuthority;if(n){const s=new ye(n).getUrlComponents().HostNameAndPort;t=sp(s,(i=r.cloudDiscoveryMetadata)==null?void 0:i.metadata,Xt.CONFIG,e)||sp(s,lh.metadata,Xt.HARDCODED_VALUES,e)||r.knownAuthorities}return t||[]}function sp(r,e,t,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${t}`),r&&e){const i=mc(e,r);if(i)return n==null||n.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${t}, returning aliases`),i.aliases;n==null||n.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${t}`)}return null}function CM(r){return mc(lh.metadata,r)}function mc(r,e){for(let t=0;t<r.length;t++){const n=r[t];if(n.aliases.includes(e))return n}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */const hC="cache_quota_exceeded",uh="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const Fu={[hC]:"Exceeded cache storage capacity.",[uh]:"Unexpected error occurred when using cache storage."};class li extends Error{constructor(e,t){const n=t||(Fu[e]?Fu[e]:Fu[uh]);super(`${e}: ${n}`),Object.setPrototypeOf(this,li.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=n}}/*! @azure/msal-common v14.16.0 2024-11-05 */class gi{constructor(e,t,n,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=n.clone(Wy,eh),this.staticAuthorityOptions=i}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort(i=>i.idTokenClaims?-1:1)[0]:t.length===1?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap(n=>this.getTenantProfilesFromAccountEntity(n,t==null?void 0:t.tenantId,t))}getTenantedAccountInfoByFilter(e,t,n,i){let s=null,l;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;const d=this.getIdToken(e,t,n.tenantId);return d&&(l=wo(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,i))?null:(s=ch(e,n,l,d==null?void 0:d.secret),s)}getTenantProfilesFromAccountEntity(e,t,n){const i=e.getAccountInfo();let s=i.tenantProfiles||new Map;const l=this.getTokenKeys();if(t){const f=s.get(t);if(f)s=new Map([[t,f]]);else return[]}const d=[];return s.forEach(f=>{const g=this.getTenantedAccountInfoByFilter(i,l,f,n);g&&d.push(g)}),d}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||t.isHomeTenant!==void 0&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){return!(t&&(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId)||t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint)||t.username&&!this.matchUsername(e.preferred_username,t.username)||t.name&&!this.matchName(e,t.name)||t.sid&&!this.matchSid(e,t.sid)))}async saveCacheRecord(e,t,n){var i,s,l,d;if(!e)throw B(Fy);try{e.account&&this.setAccount(e.account),e.idToken&&(t==null?void 0:t.idToken)!==!1&&this.setIdTokenCredential(e.idToken),e.accessToken&&(t==null?void 0:t.accessToken)!==!1&&await this.saveAccessToken(e.accessToken),e.refreshToken&&(t==null?void 0:t.refreshToken)!==!1&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(f){throw(i=this.commonLogger)==null||i.error("CacheManager.saveCacheRecord: failed"),f instanceof Error?((s=this.commonLogger)==null||s.errorPii(`CacheManager.saveCacheRecord: ${f.message}`,n),f.name==="QuotaExceededError"||f.name==="NS_ERROR_DOM_QUOTA_REACHED"||f.message.includes("exceeded the quota")?((l=this.commonLogger)==null||l.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new li(hC)):new li(f.name,f.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${f}`,n),new li(uh))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),i=Je.fromString(e.target),s=[];n.accessToken.forEach(l=>{if(!this.accessTokenKeyMatchesFilter(l,t,!1))return;const d=this.getAccessTokenCredential(l);d&&this.credentialMatchesFilter(d,t)&&Je.fromString(d.target).intersectingScopeSets(i)&&s.push(this.removeAccessToken(l))}),await Promise.all(s),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),n=[];return t.forEach(i=>{var f;if(!this.isAccountKey(i,e.homeAccountId))return;const s=this.getAccount(i,this.commonLogger);if(!s||e.homeAccountId&&!this.matchHomeAccountId(s,e.homeAccountId)||e.username&&!this.matchUsername(s.username,e.username)||e.environment&&!this.matchEnvironment(s,e.environment)||e.realm&&!this.matchRealm(s,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(s,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(s,e.authorityType))return;const l={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},d=(f=s.tenantProfiles)==null?void 0:f.filter(g=>this.tenantProfileMatchesFilter(g,l));d&&d.length===0||n.push(s)}),n}isAccountKey(e,t,n){return!(e.split(bt.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(bt.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(t.indexOf(ne.ID_TOKEN.toLowerCase())===-1&&t.indexOf(ne.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(ne.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(ne.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(ne.REFRESH_TOKEN.toLowerCase())>-1){const n=`${ne.REFRESH_TOKEN}${bt.CACHE_KEY_SEPARATOR}${this.clientId}${bt.CACHE_KEY_SEPARATOR}`,i=`${ne.REFRESH_TOKEN}${bt.CACHE_KEY_SEPARATOR}${la}${bt.CACHE_KEY_SEPARATOR}`;if(t.indexOf(n.toLowerCase())===-1&&t.indexOf(i.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===ne.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===Oe.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e){const t=this.getKeys(),n={};return t.forEach(i=>{if(!this.isAppMetadata(i))return;const s=this.getAppMetadata(i);s&&(e.environment&&!this.matchEnvironment(s,e.environment)||e.clientId&&!this.matchClientId(s,e.clientId)||(n[i]=s))}),n}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let n=null;return t.forEach(i=>{if(!this.isAuthorityMetadata(i)||i.indexOf(this.clientId)===-1)return;const s=this.getAuthorityMetadata(i);s&&s.aliases.indexOf(e)!==-1&&(n=s)}),n}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(n=>{t.push(this.removeAccount(n))}),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),n=e.generateAccountId(),i=[];t.idToken.forEach(s=>{s.indexOf(n)===0&&this.removeIdToken(s)}),t.accessToken.forEach(s=>{s.indexOf(n)===0&&i.push(this.removeAccessToken(s))}),t.refreshToken.forEach(s=>{s.indexOf(n)===0&&this.removeRefreshToken(s)}),await Promise.all(i)}updateOutdatedCachedAccount(e,t,n){var i;if(t&&t.isSingleTenant()){(i=this.commonLogger)==null||i.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const s=this.getAccountKeys().filter(m=>m.startsWith(t.homeAccountId)),l=[];s.forEach(m=>{const v=this.getCachedAccountEntity(m);v&&l.push(v)});const d=l.find(m=>fc(m.realm,m.homeAccountId))||l[0];d.tenantProfiles=l.map(m=>({tenantId:m.realm,localAccountId:m.localAccountId,name:m.name,isHomeTenant:fc(m.realm,m.homeAccountId)}));const f=gi.toObject(new at,{...d}),g=f.generateAccountKey();return s.forEach(m=>{m!==g&&this.removeOutdatedAccount(e)}),this.setAccount(f),n==null||n.verbose("Updated an outdated account entity in the cache"),f}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===ne.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===Oe.POP){const i=t.keyId;if(i)try{await this.cryptoImpl.removeTokenBindingKey(i)}catch{throw B(Ky)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=at.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getIdToken called");const l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ne.ID_TOKEN,clientId:this.clientId,realm:n},d=this.getIdTokensByFilter(l,t),f=d.size;if(f<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(f>1){let g=d;if(!n){const m=new Map;d.forEach((C,S)=>{C.realm===e.tenantId&&m.set(S,C)});const v=m.size;if(v<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),d.values().next().value;if(v===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),m.values().next().value;g=m}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),g.forEach((m,v)=>{this.removeIdToken(v)}),i&&s&&i.addFields({multiMatchedID:d.size},s),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(e,t){const n=t&&t.idToken||this.getTokenKeys().idToken,i=new Map;return n.forEach(s=>{if(!this.idTokenKeyMatchesFilter(s,{clientId:this.clientId,...e}))return;const l=this.getIdTokenCredential(s);l&&this.credentialMatchesFilter(l,e)&&i.set(s,l)}),i}idTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,n,i,s,l){this.commonLogger.trace("CacheManager - getAccessToken called");const d=Je.createSearchScopes(t.scopes),f=t.authenticationScheme||Oe.BEARER,g=f&&f.toLowerCase()!==Oe.BEARER.toLowerCase()?ne.ACCESS_TOKEN_WITH_AUTH_SCHEME:ne.ACCESS_TOKEN,m={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:g,clientId:this.clientId,realm:i||e.tenantId,target:d,tokenType:f,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},v=n&&n.accessToken||this.getTokenKeys().accessToken,C=[];v.forEach(_=>{if(this.accessTokenKeyMatchesFilter(_,m,!0)){const A=this.getAccessTokenCredential(_);A&&this.credentialMatchesFilter(A,m)&&C.push(A)}});const S=C.length;return S<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):S>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),C.forEach(_=>{this.removeAccessToken(ii(_))}),s&&l&&s.addFields({multiMatchedAT:C.length},l),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),C[0])}accessTokenKeyMatchesFilter(e,t,n){const i=e.toLowerCase();if(t.clientId&&i.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&i.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&i.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&i.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target){const s=t.target.asArray();for(let l=0;l<s.length;l++){if(n&&!i.includes(s[l].toLowerCase()))return!1;if(!n&&i.includes(s[l].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),n=[];return t.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const s=this.getAccessTokenCredential(i);s&&this.credentialMatchesFilter(s,e)&&n.push(s)}),n}getRefreshToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getRefreshToken called");const l=t?la:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ne.REFRESH_TOKEN,clientId:this.clientId,familyId:l},f=n&&n.refreshToken||this.getTokenKeys().refreshToken,g=[];f.forEach(v=>{if(this.refreshTokenKeyMatchesFilter(v,d)){const C=this.getRefreshTokenCredential(v);C&&this.credentialMatchesFilter(C,d)&&g.push(C)}});const m=g.length;return m<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(m>1&&i&&s&&i.addFields({multiMatchedRT:m},s),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),g[0])}refreshTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.familyId&&n.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(t),i=Object.keys(n).map(l=>n[l]),s=i.length;if(s<1)return null;if(s>1)throw B(Ly);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===la)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const n=e.oid||e.sub;return t===n}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var n;return t.toLowerCase()===((n=e.name)==null?void 0:n.toLowerCase())}matchUsername(e,t){return!!(e&&typeof e=="string"&&(t==null?void 0:t.toLowerCase())===e.toLowerCase())}matchUserAssertionHash(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=yM(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const n=this.getAuthorityMetadataByAlias(t);return!!(n&&n.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!!(e.clientId&&t===e.clientId)}matchFamilyId(e,t){return!!(e.familyId&&t===e.familyId)}matchRealm(e,t){var n;return((n=e.realm)==null?void 0:n.toLowerCase())===t.toLowerCase()}matchNativeAccountId(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!!(e.authorityType&&t.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,t){return e.credentialType!==ne.ACCESS_TOKEN&&e.credentialType!==ne.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:Je.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!!(e.tokenType&&e.tokenType===t)}matchKeyId(e,t){return!!(e.keyId&&e.keyId===t)}isAppMetadata(e){return e.indexOf(qd)!==-1}isAuthorityMetadata(e){return e.indexOf(lc.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${lc.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class wM extends gi{setAccount(){throw B(ge)}getAccount(){throw B(ge)}getCachedAccountEntity(){throw B(ge)}setIdTokenCredential(){throw B(ge)}getIdTokenCredential(){throw B(ge)}setAccessTokenCredential(){throw B(ge)}getAccessTokenCredential(){throw B(ge)}setRefreshTokenCredential(){throw B(ge)}getRefreshTokenCredential(){throw B(ge)}setAppMetadata(){throw B(ge)}getAppMetadata(){throw B(ge)}setServerTelemetry(){throw B(ge)}getServerTelemetry(){throw B(ge)}setAuthorityMetadata(){throw B(ge)}getAuthorityMetadata(){throw B(ge)}getAuthorityMetadataKeys(){throw B(ge)}setThrottlingCache(){throw B(ge)}getThrottlingCache(){throw B(ge)}removeItem(){throw B(ge)}getKeys(){throw B(ge)}getAccountKeys(){throw B(ge)}getTokenKeys(){throw B(ge)}updateCredentialCacheKey(){throw B(ge)}removeOutdatedAccount(){throw B(ge)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const fC={tokenRenewalOffsetSeconds:$1,preventCorsPreflight:!1},_M={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:xe.Info,correlationId:P.EMPTY_STRING},TM={claimsBasedCachingEnabled:!1},EM={async sendGetRequestAsync(){throw B(ge)},async sendPostRequestAsync(){throw B(ge)}},SM={sku:P.SKU,version:eh,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},AM={clientSecret:P.EMPTY_STRING,clientAssertion:void 0},bM={azureCloudInstance:th.None,tenant:`${P.DEFAULT_COMMON_TENANT}`},IM={application:{appName:"",appVersion:""}};function kM({authOptions:r,systemOptions:e,loggerOptions:t,cacheOptions:n,storageInterface:i,networkInterface:s,cryptoInterface:l,clientCredentials:d,libraryInfo:f,telemetry:g,serverTelemetryManager:m,persistencePlugin:v,serializableCache:C}){const S={..._M,...t};return{authOptions:RM(r),systemOptions:{...fC,...e},loggerOptions:S,cacheOptions:{...TM,...n},storageInterface:i||new wM(r.clientId,dc,new qr(S)),networkInterface:s||EM,cryptoInterface:l||dc,clientCredentials:d||AM,libraryInfo:{...SM,...f},telemetry:{...IM,...g},serverTelemetryManager:m||null,persistencePlugin:v||null,serializableCache:C||null}}function RM(r){return{clientCapabilities:[],azureCloudOptions:bM,skipAuthorityMetadataCache:!1,instanceAware:!1,...r}}function yd(r){return r.authOptions.authority.options.protocolMode===Tr.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const on={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const mo="client_id",gC="redirect_uri",cp="response_type",OM="response_mode",NM="grant_type",PM="claims",MM="scope",xM="refresh_token",DM="state",LM="nonce",BM="prompt",UM="code",VM="code_challenge",FM="code_challenge_method",HM="code_verifier",$M="client-request-id",KM="x-client-SKU",zM="x-client-VER",WM="x-client-OS",qM="x-client-CPU",GM="x-client-current-telemetry",jM="x-client-last-telemetry",YM="x-ms-lib-capability",JM="x-app-name",QM="x-app-ver",XM="post_logout_redirect_uri",ZM="id_token_hint",ex="device_code",tx="client_secret",nx="client_assertion",rx="client_assertion_type",lp="token_type",up="req_cnf",ox="assertion",ix="requested_token_use",dp="return_spa_code",ax="nativebroker",sx="logout_hint",cx="sid",lx="login_hint",ux="domain_hint",dx="x-client-xtra-sku",dh="brk_client_id",Cd="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class Xo{static validateRedirectUri(e){if(!e)throw Pe(jy)}static validatePrompt(e){const t=[];for(const n in dt)t.push(dt[n]);if(t.indexOf(e)<0)throw Pe(Xy)}static validateClaims(e){try{JSON.parse(e)}catch{throw Pe(rh)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Pe(oh);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([Jm.PLAIN,Jm.S256].indexOf(e)<0)throw Pe(tC)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function hx(r,e,t){if(!e)return;const n=r.get(mo);n&&r.has(dh)&&(t==null||t.addFields({embeddedClientId:n,embeddedRedirectUri:r.get(gC)},e))}class da{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(cp,encodeURIComponent(P.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(cp,encodeURIComponent(`${P.TOKEN_RESPONSE_TYPE} ${P.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(OM,encodeURIComponent(e||V1.QUERY))}addNativeBroker(){this.parameters.set(ax,encodeURIComponent("1"))}addScopes(e,t=!0,n=yi){t&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");const i=t?[...e||[],...n]:e||[],s=new Je(i);this.parameters.set(MM,encodeURIComponent(s.printScopes()))}addClientId(e){this.parameters.set(mo,encodeURIComponent(e))}addRedirectUri(e){Xo.validateRedirectUri(e),this.parameters.set(gC,encodeURIComponent(e))}addPostLogoutRedirectUri(e){Xo.validateRedirectUri(e),this.parameters.set(XM,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(ZM,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(ux,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(lx,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(Pt.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(Pt.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(cx,encodeURIComponent(e))}addClaims(e,t){const n=this.addClientCapabilitiesToClaims(e,t);Xo.validateClaims(n),this.parameters.set(PM,encodeURIComponent(n))}addCorrelationId(e){this.parameters.set($M,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(KM,e.sku),this.parameters.set(zM,e.version),e.os&&this.parameters.set(WM,e.os),e.cpu&&this.parameters.set(qM,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(JM,e.appName),e!=null&&e.appVersion&&this.parameters.set(QM,e.appVersion)}addPrompt(e){Xo.validatePrompt(e),this.parameters.set(`${BM}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(DM,encodeURIComponent(e))}addNonce(e){this.parameters.set(LM,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(Xo.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(VM,encodeURIComponent(e)),this.parameters.set(FM,encodeURIComponent(t));else throw Pe(oh)}addAuthorizationCode(e){this.parameters.set(UM,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(ex,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(xM,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(HM,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(tx,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(nx,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(rx,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(ox,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(ix,encodeURIComponent(e))}addGrantType(e){this.parameters.set(NM,encodeURIComponent(e))}addClientInfo(){this.parameters.set(F1,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([t,n])=>{!this.parameters.has(t)&&n&&this.parameters.set(t,n)})}addClientCapabilitiesToClaims(e,t){let n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw Pe(rh)}return t&&t.length>0&&(n.hasOwnProperty(ks.ACCESS_TOKEN)||(n[ks.ACCESS_TOKEN]={}),n[ks.ACCESS_TOKEN][ks.XMS_CC]={values:t}),JSON.stringify(n)}addUsername(e){this.parameters.set(Xm.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(Xm.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(lp,Oe.POP),this.parameters.set(up,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(lp,Oe.SSH),this.parameters.set(up,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(GM,e.generateCurrentRequestHeaderValue()),this.parameters.set(jM,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(YM,ua.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(sx,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[dh]=e.brokerClientId,t[Cd]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,n)=>{e.push(`${n}=${t}`)}),hx(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function fx(r){return r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.16.0 2024-11-05 */function gx(r){return r.hasOwnProperty("tenant_discovery_endpoint")&&r.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function mx(r){return r.hasOwnProperty("error")&&r.hasOwnProperty("error_description")}/*! @azure/msal-common v14.16.0 2024-11-05 */const k={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},px={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const _o=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}try{const d=r(...s);return l==null||l.end({success:!0}),t.trace(`Returning result from ${e}`),d}catch(d){t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d}},F=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}return n==null||n.setPreQueueTime(e,i),r(...s).then(d=>(t.trace(`Returning result from ${e}`),l==null||l.end({success:!0}),d)).catch(d=>{t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class Bc{constructor(e,t,n,i){this.networkInterface=e,this.logger=t,this.performanceClient=n,this.correlationId=i}async detectRegion(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RegionDiscoveryDetectRegion,this.correlationId);let n=e;if(n)t.region_source=zo.ENVIRONMENT_VARIABLE;else{const s=Bc.IMDS_OPTIONS;try{const l=await F(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(P.IMDS_VERSION,s);if(l.status===Os.httpSuccess&&(n=l.body,t.region_source=zo.IMDS),l.status===Os.httpBadRequest){const d=await F(this.getCurrentVersion.bind(this),k.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(s);if(!d)return t.region_source=zo.FAILED_AUTO_DETECTION,null;const f=await F(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,s);f.status===Os.httpSuccess&&(n=f.body,t.region_source=zo.IMDS)}}catch{return t.region_source=zo.FAILED_AUTO_DETECTION,null}}return n||(t.region_source=zo.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(e,t){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,P.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;(t=this.performanceClient)==null||t.addQueueMeasurement(k.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const n=await this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?format=json`,e);return n.status===Os.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}}}Bc.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class St{constructor(e,t,n,i,s,l,d,f){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=n,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=s,this.performanceClient=d,this.correlationId=l,this.managedIdentity=f||!1,this.regionDiscovery=new Bc(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(P.CIAM_AUTH_URL))return Dn.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case P.ADFS:return Dn.Adfs;case P.DSTS:return Dn.Dsts}return Dn.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new ye(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw B(vr)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw B(vr)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw B(vr)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw B(zy);return this.replacePath(this.metadata.end_session_endpoint)}else throw B(vr)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw B(vr)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw B(vr)}canReplaceTenant(e){return e.PathSegments.length===1&&!St.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Dn.Default&&this.protocolMode===Tr.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new ye(this.metadata.canonical_authority).getUrlComponents(),s=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,f)=>{let g=s[f];if(f===0&&this.canReplaceTenant(i)){const m=new ye(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];g!==m&&(this.logger.verbose(`Replacing tenant domain name ${g} with id ${m}`),g=m)}d!==g&&(t=t.replace(`/${g}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Dn.Adfs||this.protocolMode!==Tr.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await F(this.updateCloudDiscoveryMetadata.bind(this),k.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const n=await F(this.updateEndpointMetadata.bind(this),k.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:n}),(s=this.performanceClient)==null||s.addFields({cloudDiscoverySource:t,authorityEndpointSource:n},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:op(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==Xt.CACHE&&(n==null?void 0:n.source)!==Xt.CACHE&&(e.expiresAt=op(),e.canonical_authority=this.canonicalAuthority);const i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e}async updateEndpointMetadata(e){var i,s,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Xt.HARDCODED_VALUES&&(s=this.authorityOptions.azureRegionConfiguration)!=null&&s.azureRegion&&t.metadata){const d=await F(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);Ns(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let n=await F(this.getEndpointMetadataFromNetwork.bind(this),k.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return(l=this.authorityOptions.azureRegionConfiguration)!=null&&l.azureRegion&&(n=await F(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),Ns(e,n,!0),Xt.NETWORK;throw B(Ny,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Ns(e,t,!1),{source:Xt.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const i=this.getEndpointMetadataFromHardcodedValues();if(i)return Ns(e,i,!1),{source:Xt.HARDCODED_VALUES,metadata:i};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const n=ip(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Xt.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new ye(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Pe(nC)}return null}async getEndpointMetadataFromNetwork(){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e);return fx(i.body)?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(i){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${i}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in ap?ap[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var n,i,s;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const t=(i=this.authorityOptions.azureRegionConfiguration)==null?void 0:i.azureRegion;if(t){if(t!==P.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=Uu.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,St.replaceWithRegionalInformation(e,t);const l=await F(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),k.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((s=this.authorityOptions.azureRegionConfiguration)==null?void 0:s.environmentRegion,this.regionDiscoveryMetadata);if(l)return this.regionDiscoveryMetadata.region_outcome=Uu.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=l,St.replaceWithRegionalInformation(e,l);this.regionDiscoveryMetadata.region_outcome=Uu.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const n=await F(this.getCloudDiscoveryMetadataFromNetwork.bind(this),k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return Vu(e,n,!0),Xt.NETWORK;throw Pe(rC)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||P.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Vu(e,t,!1),Xt.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const i=CM(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Vu(e,i,!1),Xt.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}const n=ip(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),Xt.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Dn.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),St.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=mc(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Pe(ih)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),St.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${P.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let n=null;try{const s=await this.networkInterface.sendGetRequestAsync(e,t);let l,d;if(gx(s.body))l=s.body,d=l.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${l.tenant_discovery_endpoint}`);else if(mx(s.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${s.status}`),l=s.body,l.error===P.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${l.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${l.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),d=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=mc(d,this.hostnameAndPort)}catch(s){if(s instanceof He)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
50
+ */var L1=Rc("outline","users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]);/*! @azure/msal-common v14.16.0 2024-11-05 */const P={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",CACHE_PREFIX:"msal",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_RESPONSE_TYPE:"code",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",FRAGMENT_RESPONSE_MODE:"fragment",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],TOKEN_RESPONSE_TYPE:"token",ID_TOKEN_RESPONSE_TYPE:"id_token",SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},As={SUCCESS:200,SUCCESS_RANGE_START:200,SUCCESS_RANGE_END:299,REDIRECT:302,CLIENT_ERROR:400,CLIENT_ERROR_RANGE_START:400,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,REQUEST_TIMEOUT:408,TOO_MANY_REQUESTS:429,CLIENT_ERROR_RANGE_END:499,SERVER_ERROR:500,SERVER_ERROR_RANGE_START:500,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,SERVER_ERROR_RANGE_END:599,MULTI_SIDED_ERROR:600},yi=[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE],Gm=[...yi,P.EMAIL_SCOPE],Pt={CONTENT_TYPE:"Content-Type",CONTENT_LENGTH:"Content-Length",RETRY_AFTER:"Retry-After",CCS_HEADER:"X-AnchorMailbox",WWWAuthenticate:"WWW-Authenticate",AuthenticationInfo:"Authentication-Info",X_MS_REQUEST_ID:"x-ms-request-id",X_MS_HTTP_VERSION:"x-ms-httpver"},ct={ID_TOKEN:"idtoken",CLIENT_INFO:"client.info",ADAL_ID_TOKEN:"adal.idtoken",ERROR:"error",ERROR_DESC:"error.description",ACTIVE_ACCOUNT:"active-account",ACTIVE_ACCOUNT_FILTERS:"active-account-filters"},zr={COMMON:"common",ORGANIZATIONS:"organizations",CONSUMERS:"consumers"},bs={ACCESS_TOKEN:"access_token",XMS_CC:"xms_cc"},dt={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none",CREATE:"create",NO_SESSION:"no_session"},jm={PLAIN:"plain",S256:"S256"},Ea={QUERY:"query",FRAGMENT:"fragment"},B1={...Ea,FORM_POST:"form_post"},Ey={IMPLICIT_GRANT:"implicit",AUTHORIZATION_CODE_GRANT:"authorization_code",CLIENT_CREDENTIALS_GRANT:"client_credentials",RESOURCE_OWNER_PASSWORD_GRANT:"password",REFRESH_TOKEN_GRANT:"refresh_token",DEVICE_CODE_GRANT:"device_code",JWT_BEARER:"urn:ietf:params:oauth:grant-type:jwt-bearer"},Is={MSSTS_ACCOUNT_TYPE:"MSSTS",ADFS_ACCOUNT_TYPE:"ADFS",MSAV1_ACCOUNT_TYPE:"MSA",GENERIC_ACCOUNT_TYPE:"Generic"},bt={CACHE_KEY_SEPARATOR:"-",CLIENT_INFO_SEPARATOR:"."},ne={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},Kd="appmetadata",U1="client_info",sa="1",ac={CACHE_KEY:"authority-metadata",REFRESH_TIME_SECONDS:3600*24},Xt={CONFIG:"config",CACHE:"cache",NETWORK:"network",HARDCODED_VALUES:"hardcoded_values"},pt={SCHEMA_VERSION:5,MAX_CUR_HEADER_BYTES:80,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Oe={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},ca={DEFAULT_THROTTLE_TIME_SECONDS:60,DEFAULT_MAX_THROTTLE_TIME_SECONDS:3600,THROTTLING_PREFIX:"throttling",X_MS_LIB_CAPABILITY_VALUE:"retry-after, h429"},Ym={INVALID_GRANT_ERROR:"invalid_grant",CLIENT_MISMATCH_ERROR:"client_mismatch"},Jm={username:"username",password:"password"},ks={httpSuccess:200,httpBadRequest:400},zo={FAILED_AUTO_DETECTION:"1",INTERNAL_CACHE:"2",ENVIRONMENT_VARIABLE:"3",IMDS:"4"},xu={CONFIGURED_MATCHES_DETECTED:"1",CONFIGURED_NO_AUTO_DETECTION:"2",CONFIGURED_NOT_DETECTED:"3",AUTO_DETECTION_REQUESTED_SUCCESSFUL:"4",AUTO_DETECTION_REQUESTED_FAILED:"5"},Br={NOT_APPLICABLE:"0",FORCE_REFRESH_OR_CLAIMS:"1",NO_CACHED_ACCESS_TOKEN:"2",CACHED_ACCESS_TOKEN_EXPIRED:"3",PROACTIVELY_REFRESHED:"4"},V1={Jwt:"JWT",Jwk:"JWK",Pop:"pop"},F1=300;/*! @azure/msal-common v14.16.0 2024-11-05 */const zd="unexpected_error",H1="post_request_failed";/*! @azure/msal-common v14.16.0 2024-11-05 */const Qm={[zd]:"Unexpected error in authentication.",[H1]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class He extends Error{constructor(e,t,n){const i=t?`${e}: ${t}`:e;super(i),Object.setPrototypeOf(this,He.prototype),this.errorCode=e||P.EMPTY_STRING,this.errorMessage=t||P.EMPTY_STRING,this.subError=n||P.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function Sy(r,e){return new He(r,e?`${Qm[r]} ${e}`:Qm[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */const Wd="client_info_decoding_error",Ay="client_info_empty_error",qd="token_parsing_error",by="null_or_empty_token",vr="endpoints_resolution_error",Iy="network_error",ky="openid_config_error",Ry="hash_not_deserialized",fi="invalid_state",Oy="state_mismatch",sc="state_not_found",Ny="nonce_mismatch",Gd="auth_time_not_found",Py="max_age_transpired",$1="multiple_matching_tokens",K1="multiple_matching_accounts",My="multiple_matching_appMetadata",xy="request_cannot_be_made",Dy="cannot_remove_empty_scope",Ly="cannot_append_scopeset",ld="empty_input_scopeset",z1="device_code_polling_cancelled",W1="device_code_expired",q1="device_code_unknown_error",jd="no_account_in_silent_request",By="invalid_cache_record",Yd="invalid_cache_environment",ud="no_account_found",dd="no_crypto_object",hd="unexpected_credential_type",G1="invalid_assertion",j1="invalid_client_credential",yr="token_refresh_required",Y1="user_timeout_reached",Uy="token_claims_cnf_required_for_signedjwt",Vy="authorization_code_missing_from_server_response",Fy="binding_key_not_removed",Hy="end_session_endpoint_not_supported",Jd="key_id_missing",J1="no_network_connectivity",Q1="user_canceled",X1="missing_tenant_id_error",ge="method_not_implemented",Z1="nested_app_auth_bridge_disabled";/*! @azure/msal-common v14.16.0 2024-11-05 */const Xm={[Wd]:"The client info could not be parsed/decoded correctly",[Ay]:"The client info was empty",[qd]:"Token cannot be parsed",[by]:"The token is null or empty",[vr]:"Endpoints cannot be resolved",[Iy]:"Network request failed",[ky]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[Ry]:"The hash parameters could not be deserialized",[fi]:"State was not the expected format",[Oy]:"State mismatch error",[sc]:"State not found",[Ny]:"Nonce mismatch error",[Gd]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Py]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[$1]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[K1]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[My]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[xy]:"Token request cannot be made without authorization code or refresh token.",[Dy]:"Cannot remove null or empty scope from ScopeSet",[Ly]:"Cannot append ScopeSet",[ld]:"Empty input ScopeSet cannot be processed",[z1]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[W1]:"Device code is expired.",[q1]:"Device code stopped polling for unknown reasons.",[jd]:"Please pass an account object, silent flow is not supported without account information",[By]:"Cache record object was null or undefined.",[Yd]:"Invalid environment when attempting to create cache entry",[ud]:"No account found in cache for given key.",[dd]:"No crypto object detected.",[hd]:"Unexpected credential type.",[G1]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[j1]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[yr]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[Y1]:"User defined timeout for device code polling reached",[Uy]:"Cannot generate a POP jwt if the token_claims are not populated",[Vy]:"Server response does not contain an authorization code to proceed",[Fy]:"Could not remove the credential's binding key from storage.",[Hy]:"The provided authority does not support logout",[Jd]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[J1]:"No network connectivity. Check your internet connection.",[Q1]:"User cancelled the flow.",[X1]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[ge]:"This method has not been implemented",[Z1]:"The nested app auth bridge is disabled"};class Oc extends He{constructor(e,t){super(e,t?`${Xm[e]}: ${t}`:Xm[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Oc.prototype)}}function B(r,e){return new Oc(r,e)}/*! @azure/msal-common v14.16.0 2024-11-05 */const cc={createNewGuid:()=>{throw B(ge)},base64Decode:()=>{throw B(ge)},base64Encode:()=>{throw B(ge)},base64UrlEncode:()=>{throw B(ge)},encodeKid:()=>{throw B(ge)},async getPublicKeyThumbprint(){throw B(ge)},async removeTokenBindingKey(){throw B(ge)},async clearKeystore(){throw B(ge)},async signJwt(){throw B(ge)},async hashString(){throw B(ge)}};/*! @azure/msal-common v14.16.0 2024-11-05 */var xe;(function(r){r[r.Error=0]="Error",r[r.Warning=1]="Warning",r[r.Info=2]="Info",r[r.Verbose=3]="Verbose",r[r.Trace=4]="Trace"})(xe||(xe={}));class qr{constructor(e,t,n){this.level=xe.Info;const i=()=>{},s=e||qr.createDefaultLoggerOptions();this.localCallback=s.loggerCallback||i,this.piiLoggingEnabled=s.piiLoggingEnabled||!1,this.level=typeof s.logLevel=="number"?s.logLevel:xe.Info,this.correlationId=s.correlationId||P.EMPTY_STRING,this.packageName=t||P.EMPTY_STRING,this.packageVersion=n||P.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:xe.Info}}clone(e,t,n){return new qr({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:n||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const s=`${`[${new Date().toUTCString()}] : [${t.correlationId||this.correlationId||""}]`} : ${this.packageName}@${this.packageVersion} : ${xe[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,s,t.containsPii||!1)}executeCallback(e,t,n){this.localCallback&&this.localCallback(e,t,n)}error(e,t){this.logMessage(e,{logLevel:xe.Error,containsPii:!1,correlationId:t||P.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:xe.Error,containsPii:!0,correlationId:t||P.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!1,correlationId:t||P.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:xe.Warning,containsPii:!0,correlationId:t||P.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!1,correlationId:t||P.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:xe.Info,containsPii:!0,correlationId:t||P.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!1,correlationId:t||P.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:xe.Verbose,containsPii:!0,correlationId:t||P.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!1,correlationId:t||P.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:xe.Trace,containsPii:!0,correlationId:t||P.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}/*! @azure/msal-common v14.16.0 2024-11-05 */const $y="@azure/msal-common",Qd="14.16.0";/*! @azure/msal-common v14.16.0 2024-11-05 */const Xd={None:"none",AzurePublic:"https://login.microsoftonline.com",AzurePpe:"https://login.windows-ppe.net",AzureChina:"https://login.chinacloudapi.cn",AzureGermany:"https://login.microsoftonline.de",AzureUsGovernment:"https://login.microsoftonline.us"};/*! @azure/msal-common v14.16.0 2024-11-05 */function wo(r,e){const t=eM(r);try{const n=e(t);return JSON.parse(n)}catch{throw B(qd)}}function eM(r){if(!r)throw B(by);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(r);if(!t||t.length<4)throw B(qd);return t[2]}function Ky(r,e){if(e===0||Date.now()-3e5>r+e)throw B(Py)}/*! @azure/msal-common v14.16.0 2024-11-05 */function or(){return Math.round(new Date().getTime()/1e3)}function fd(r,e){const t=Number(r)||0;return or()+e>t}function tM(r){return Number(r)>or()}/*! @azure/msal-common v14.16.0 2024-11-05 */function ii(r){return[nM(r),rM(r),oM(r),iM(r),aM(r)].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function Nc(r,e,t,n,i){return{credentialType:ne.ID_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t,realm:i}}function Pc(r,e,t,n,i,s,l,d,f,g,m,v,C,S,_){var O,$;const b={homeAccountId:r,credentialType:ne.ACCESS_TOKEN,secret:t,cachedAt:or().toString(),expiresOn:l.toString(),extendedExpiresOn:d.toString(),environment:e,clientId:n,realm:i,target:s,tokenType:m||Oe.BEARER};if(v&&(b.userAssertionHash=v),g&&(b.refreshOn=g.toString()),S&&(b.requestedClaims=S,b.requestedClaimsHash=_),((O=b.tokenType)==null?void 0:O.toLowerCase())!==Oe.BEARER.toLowerCase())switch(b.credentialType=ne.ACCESS_TOKEN_WITH_AUTH_SCHEME,b.tokenType){case Oe.POP:const V=wo(t,f);if(!(($=V==null?void 0:V.cnf)!=null&&$.kid))throw B(Uy);b.keyId=V.cnf.kid;break;case Oe.SSH:b.keyId=C}return b}function zy(r,e,t,n,i,s,l){const d={credentialType:ne.REFRESH_TOKEN,homeAccountId:r,environment:e,clientId:n,secret:t};return s&&(d.userAssertionHash=s),i&&(d.familyId=i),l&&(d.expiresOn=l.toString()),d}function Zd(r){return r.hasOwnProperty("homeAccountId")&&r.hasOwnProperty("environment")&&r.hasOwnProperty("credentialType")&&r.hasOwnProperty("clientId")&&r.hasOwnProperty("secret")}function Zm(r){return r?Zd(r)&&r.hasOwnProperty("realm")&&r.hasOwnProperty("target")&&(r.credentialType===ne.ACCESS_TOKEN||r.credentialType===ne.ACCESS_TOKEN_WITH_AUTH_SCHEME):!1}function ep(r){return r?Zd(r)&&r.hasOwnProperty("realm")&&r.credentialType===ne.ID_TOKEN:!1}function tp(r){return r?Zd(r)&&r.credentialType===ne.REFRESH_TOKEN:!1}function nM(r){return[r.homeAccountId,r.environment].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function rM(r){const e=r.credentialType===ne.REFRESH_TOKEN&&r.familyId||r.clientId;return[r.credentialType,e,r.realm||""].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function oM(r){return(r.target||"").toLowerCase()}function iM(r){return(r.requestedClaimsHash||"").toLowerCase()}function aM(r){return r.tokenType&&r.tokenType.toLowerCase()!==Oe.BEARER.toLowerCase()?r.tokenType.toLowerCase():""}function sM(r,e){const t=r.indexOf(pt.CACHE_KEY)===0;let n=!0;return e&&(n=e.hasOwnProperty("failedRequests")&&e.hasOwnProperty("errors")&&e.hasOwnProperty("cacheHits")),t&&n}function cM(r,e){let t=!1;r&&(t=r.indexOf(ca.THROTTLING_PREFIX)===0);let n=!0;return e&&(n=e.hasOwnProperty("throttleTime")),t&&n}function lM({environment:r,clientId:e}){return[Kd,r,e].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}function uM(r,e){return e?r.indexOf(Kd)===0&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("environment"):!1}function dM(r,e){return e?r.indexOf(ac.CACHE_KEY)===0&&e.hasOwnProperty("aliases")&&e.hasOwnProperty("preferred_cache")&&e.hasOwnProperty("preferred_network")&&e.hasOwnProperty("canonical_authority")&&e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("aliasesFromNetwork")&&e.hasOwnProperty("endpointsFromNetwork")&&e.hasOwnProperty("expiresAt")&&e.hasOwnProperty("jwks_uri"):!1}function np(){return or()+ac.REFRESH_TIME_SECONDS}function Rs(r,e,t){r.authorization_endpoint=e.authorization_endpoint,r.token_endpoint=e.token_endpoint,r.end_session_endpoint=e.end_session_endpoint,r.issuer=e.issuer,r.endpointsFromNetwork=t,r.jwks_uri=e.jwks_uri}function Du(r,e,t){r.aliases=e.aliases,r.preferred_cache=e.preferred_cache,r.preferred_network=e.preferred_network,r.aliasesFromNetwork=t}function rp(r){return r.expiresAt<=or()}/*! @azure/msal-common v14.16.0 2024-11-05 */const Wy="redirect_uri_empty",hM="claims_request_parsing_error",qy="authority_uri_insecure",Zi="url_parse_error",Gy="empty_url_error",jy="empty_input_scopes_error",Yy="invalid_prompt_value",eh="invalid_claims",Jy="token_request_empty",Qy="logout_request_empty",Xy="invalid_code_challenge_method",th="pkce_params_missing",nh="invalid_cloud_discovery_metadata",Zy="invalid_authority_metadata",eC="untrusted_authority",Mc="missing_ssh_jwk",tC="missing_ssh_kid",fM="missing_nonce_authentication_header",gM="invalid_authentication_header",nC="cannot_set_OIDCOptions",rC="cannot_allow_native_broker",oC="authority_mismatch";/*! @azure/msal-common v14.16.0 2024-11-05 */const mM={[Wy]:"A redirect URI is required for all calls, and none has been set.",[hM]:"Could not parse the given claims request object.",[qy]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[Zi]:"URL could not be parsed into appropriate segments.",[Gy]:"URL was empty or null.",[jy]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Yy]:"Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest",[eh]:"Given claims parameter must be a stringified JSON object.",[Jy]:"Token request was empty and not found in cache.",[Qy]:"The logout request was null or undefined.",[Xy]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[th]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[nh]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[Zy]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[eC]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Mc]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[tC]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[fM]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[gM]:"Invalid authentication header provided",[nC]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[rC]:"Cannot set allowNativeBroker parameter to true when not in AAD protocol mode.",[oC]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority."};class rh extends He{constructor(e){super(e,mM[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,rh.prototype)}}function Pe(r){return new rh(r)}/*! @azure/msal-common v14.16.0 2024-11-05 */class Un{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return Object.keys(t).length===0}catch{}return!0}static startsWith(e,t){return e.indexOf(t)===0}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},n=e.split("&"),i=s=>decodeURIComponent(s.replace(/\+/g," "));return n.forEach(s=>{if(s.trim()){const[l,d]=s.split(/=(.+)/g,2);l&&d&&(t[i(l)]=i(d))}}),t}static trimArrayEntries(e){return e.map(t=>t.trim())}static removeEmptyStringsFromArray(e){return e.filter(t=>!!t)}static jsonParseHelper(e){try{return JSON.parse(e)}catch{return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Je{constructor(e){const t=e?Un.trimArrayEntries([...e]):[],n=t?Un.removeEmptyStringsFromArray(t):[];this.validateInputScopes(n),this.scopes=new Set,n.forEach(i=>this.scopes.add(i))}static fromString(e){const n=(e||P.EMPTY_STRING).split(" ");return new Je(n)}static createSearchScopes(e){const t=new Je(e);return t.containsOnlyOIDCScopes()?t.removeScope(P.OFFLINE_ACCESS_SCOPE):t.removeOIDCScopes(),t}validateInputScopes(e){if(!e||e.length<1)throw Pe(jy)}containsScope(e){const t=this.printScopesLowerCase().split(" "),n=new Je(t);return e?n.scopes.has(e.toLowerCase()):!1}containsScopeSet(e){return!e||e.scopes.size<=0?!1:this.scopes.size>=e.scopes.size&&e.asArray().every(t=>this.containsScope(t))}containsOnlyOIDCScopes(){let e=0;return Gm.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(t=>this.appendScope(t))}catch{throw B(Ly)}}removeScope(e){if(!e)throw B(Dy);this.scopes.delete(e.trim())}removeOIDCScopes(){Gm.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw B(ld);const t=new Set;return e.scopes.forEach(n=>t.add(n.toLowerCase())),this.scopes.forEach(n=>t.add(n.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw B(ld);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),n=e.getScopeCount(),i=this.getScopeCount();return t.size<i+n}getScopeCount(){return this.scopes.size}asArray(){const e=[];return this.scopes.forEach(t=>e.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):P.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}/*! @azure/msal-common v14.16.0 2024-11-05 */function lc(r,e){if(!r)throw B(Ay);try{const t=e(r);return JSON.parse(t)}catch{throw B(Wd)}}function ai(r){if(!r)throw B(Wd);const e=r.split(bt.CLIENT_INFO_SEPARATOR,2);return{uid:e[0],utid:e.length<2?P.EMPTY_STRING:e[1]}}/*! @azure/msal-common v14.16.0 2024-11-05 */function uc(r,e){return!!r&&!!e&&r===e.split(".")[1]}function oh(r,e,t,n){if(n){const{oid:i,sub:s,tid:l,name:d,tfp:f,acr:g}=n,m=l||f||g||"";return{tenantId:m,localAccountId:i||s||"",name:d,isHomeTenant:uc(m,r)}}else return{tenantId:t,localAccountId:e,isHomeTenant:uc(t,r)}}function ih(r,e,t,n){let i=r;if(e){const{isHomeTenant:s,...l}=e;i={...r,...l}}if(t){const{isHomeTenant:s,...l}=oh(r.homeAccountId,r.localAccountId,r.tenantId,t);return i={...i,...l,idTokenClaims:t,idToken:n},i}return i}/*! @azure/msal-common v14.16.0 2024-11-05 */const Dn={Default:0,Adfs:1,Dsts:2,Ciam:3};/*! @azure/msal-common v14.16.0 2024-11-05 */function iC(r){return r&&(r.tid||r.tfp||r.acr)||null}/*! @azure/msal-common v14.16.0 2024-11-05 */const Tr={AAD:"AAD",OIDC:"OIDC"};/*! @azure/msal-common v14.16.0 2024-11-05 */class at{generateAccountId(){return[this.homeAccountId,this.environment].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}generateAccountKey(){return at.generateAccountCacheKey({homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId})}getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static generateAccountCacheKey(e){const t=e.homeAccountId.split(".")[1];return[e.homeAccountId,e.environment||"",t||e.tenantId||""].join(bt.CACHE_KEY_SEPARATOR).toLowerCase()}static createAccount(e,t,n){var g,m,v,C,S,_;const i=new at;t.authorityType===Dn.Adfs?i.authorityType=Is.ADFS_ACCOUNT_TYPE:t.protocolMode===Tr.AAD?i.authorityType=Is.MSSTS_ACCOUNT_TYPE:i.authorityType=Is.GENERIC_ACCOUNT_TYPE;let s;e.clientInfo&&n&&(s=lc(e.clientInfo,n)),i.clientInfo=e.clientInfo,i.homeAccountId=e.homeAccountId,i.nativeAccountId=e.nativeAccountId;const l=e.environment||t&&t.getPreferredCache();if(!l)throw B(Yd);i.environment=l,i.realm=(s==null?void 0:s.utid)||iC(e.idTokenClaims)||"",i.localAccountId=(s==null?void 0:s.uid)||((g=e.idTokenClaims)==null?void 0:g.oid)||((m=e.idTokenClaims)==null?void 0:m.sub)||"";const d=((v=e.idTokenClaims)==null?void 0:v.preferred_username)||((C=e.idTokenClaims)==null?void 0:C.upn),f=(S=e.idTokenClaims)!=null&&S.emails?e.idTokenClaims.emails[0]:null;if(i.username=d||f||"",i.name=((_=e.idTokenClaims)==null?void 0:_.name)||"",i.cloudGraphHostName=e.cloudGraphHostName,i.msGraphHost=e.msGraphHost,e.tenantProfiles)i.tenantProfiles=e.tenantProfiles;else{const b=oh(e.homeAccountId,i.localAccountId,i.realm,e.idTokenClaims);i.tenantProfiles=[b]}return i}static createFromAccountInfo(e,t,n){var s;const i=new at;return i.authorityType=e.authorityType||Is.GENERIC_ACCOUNT_TYPE,i.homeAccountId=e.homeAccountId,i.localAccountId=e.localAccountId,i.nativeAccountId=e.nativeAccountId,i.realm=e.tenantId,i.environment=e.environment,i.username=e.username,i.name=e.name,i.cloudGraphHostName=t,i.msGraphHost=n,i.tenantProfiles=Array.from(((s=e.tenantProfiles)==null?void 0:s.values())||[]),i}static generateHomeAccountId(e,t,n,i,s){if(!(t===Dn.Adfs||t===Dn.Dsts)){if(e)try{const l=lc(e,i.base64Decode);if(l.uid&&l.utid)return`${l.uid}.${l.utid}`}catch{}n.warning("No client info in response")}return(s==null?void 0:s.sub)||""}static isAccountEntity(e){return e?e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType"):!1}static accountInfoIsEqual(e,t,n){if(!e||!t)return!1;let i=!0;if(n){const s=e.idTokenClaims||{},l=t.idTokenClaims||{};i=s.iat===l.iat&&s.nonce===l.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&i}}/*! @azure/msal-common v14.16.0 2024-11-05 */function aC(r){return r.startsWith("#/")?r.substring(2):r.startsWith("#")||r.startsWith("?")?r.substring(1):r}function dc(r){if(!r||r.indexOf("=")<0)return null;try{const e=aC(r),t=Object.fromEntries(new URLSearchParams(e));if(t.code||t.error||t.error_description||t.state)return t}catch{throw B(Ry)}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */class ye{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw Pe(Gy);e.includes("#")||(this._urlString=ye.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return Un.endsWith(t,"?")?t=t.slice(0,-1):Un.endsWith(t,"?/")&&(t=t.slice(0,-2)),Un.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch{throw Pe(Zi)}if(!e.HostNameAndPort||!e.PathSegments)throw Pe(Zi);if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw Pe(qy)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return ye.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),n=t.PathSegments;return e&&n.length!==0&&(n[0]===zr.COMMON||n[0]===zr.ORGANIZATIONS)&&(n[0]=e),ye.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw Pe(Zi);const n={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let i=n.AbsolutePath.split("/");return i=i.filter(s=>s&&s.length>0),n.PathSegments=i,n.QueryString&&n.QueryString.endsWith("/")&&(n.QueryString=n.QueryString.substring(0,n.QueryString.length-1)),n}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),n=e.match(t);if(!n)throw Pe(Zi);return n[2]}static getAbsoluteUrl(e,t){if(e[0]===P.FORWARD_SLASH){const i=new ye(t).getUrlComponents();return i.Protocol+"//"+i.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new ye(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!dc(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const sC={endpointMetadata:{"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},instanceDiscoveryMetadata:{tenant_discovery_endpoint:"https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]}},op=sC.endpointMetadata,ah=sC.instanceDiscoveryMetadata,cC=new Set;ah.metadata.forEach(r=>{r.aliases.forEach(e=>{cC.add(e)})});function pM(r,e){var i;let t;const n=r.canonicalAuthority;if(n){const s=new ye(n).getUrlComponents().HostNameAndPort;t=ip(s,(i=r.cloudDiscoveryMetadata)==null?void 0:i.metadata,Xt.CONFIG,e)||ip(s,ah.metadata,Xt.HARDCODED_VALUES,e)||r.knownAuthorities}return t||[]}function ip(r,e,t,n){if(n==null||n.trace(`getAliasesFromMetadata called with source: ${t}`),r&&e){const i=hc(e,r);if(i)return n==null||n.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${t}, returning aliases`),i.aliases;n==null||n.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${t}`)}return null}function vM(r){return hc(ah.metadata,r)}function hc(r,e){for(let t=0;t<r.length;t++){const n=r[t];if(n.aliases.includes(e))return n}return null}/*! @azure/msal-common v14.16.0 2024-11-05 */const lC="cache_quota_exceeded",sh="cache_error_unknown";/*! @azure/msal-common v14.16.0 2024-11-05 */const Lu={[lC]:"Exceeded cache storage capacity.",[sh]:"Unexpected error occurred when using cache storage."};class li extends Error{constructor(e,t){const n=t||(Lu[e]?Lu[e]:Lu[sh]);super(`${e}: ${n}`),Object.setPrototypeOf(this,li.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=n}}/*! @azure/msal-common v14.16.0 2024-11-05 */class gi{constructor(e,t,n,i){this.clientId=e,this.cryptoImpl=t,this.commonLogger=n.clone($y,Qd),this.staticAuthorityOptions=i}getAllAccounts(e){return this.buildTenantProfiles(this.getAccountsFilteredBy(e||{}),e)}getAccountInfoFilteredBy(e){const t=this.getAllAccounts(e);return t.length>1?t.sort(i=>i.idTokenClaims?-1:1)[0]:t.length===1?t[0]:null}getBaseAccountInfo(e){const t=this.getAccountsFilteredBy(e);return t.length>0?t[0].getAccountInfo():null}buildTenantProfiles(e,t){return e.flatMap(n=>this.getTenantProfilesFromAccountEntity(n,t==null?void 0:t.tenantId,t))}getTenantedAccountInfoByFilter(e,t,n,i){let s=null,l;if(i&&!this.tenantProfileMatchesFilter(n,i))return null;const d=this.getIdToken(e,t,n.tenantId);return d&&(l=wo(d.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(l,i))?null:(s=ih(e,n,l,d==null?void 0:d.secret),s)}getTenantProfilesFromAccountEntity(e,t,n){const i=e.getAccountInfo();let s=i.tenantProfiles||new Map;const l=this.getTokenKeys();if(t){const f=s.get(t);if(f)s=new Map([[t,f]]);else return[]}const d=[];return s.forEach(f=>{const g=this.getTenantedAccountInfoByFilter(i,l,f,n);g&&d.push(g)}),d}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||t.isHomeTenant!==void 0&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){return!(t&&(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId)||t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint)||t.username&&!this.matchUsername(e.preferred_username,t.username)||t.name&&!this.matchName(e,t.name)||t.sid&&!this.matchSid(e,t.sid)))}async saveCacheRecord(e,t,n){var i,s,l,d;if(!e)throw B(By);try{e.account&&this.setAccount(e.account),e.idToken&&(t==null?void 0:t.idToken)!==!1&&this.setIdTokenCredential(e.idToken),e.accessToken&&(t==null?void 0:t.accessToken)!==!1&&await this.saveAccessToken(e.accessToken),e.refreshToken&&(t==null?void 0:t.refreshToken)!==!1&&this.setRefreshTokenCredential(e.refreshToken),e.appMetadata&&this.setAppMetadata(e.appMetadata)}catch(f){throw(i=this.commonLogger)==null||i.error("CacheManager.saveCacheRecord: failed"),f instanceof Error?((s=this.commonLogger)==null||s.errorPii(`CacheManager.saveCacheRecord: ${f.message}`,n),f.name==="QuotaExceededError"||f.name==="NS_ERROR_DOM_QUOTA_REACHED"||f.message.includes("exceeded the quota")?((l=this.commonLogger)==null||l.error("CacheManager.saveCacheRecord: exceeded storage quota",n),new li(lC)):new li(f.name,f.message)):((d=this.commonLogger)==null||d.errorPii(`CacheManager.saveCacheRecord: ${f}`,n),new li(sh))}}async saveAccessToken(e){const t={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},n=this.getTokenKeys(),i=Je.fromString(e.target),s=[];n.accessToken.forEach(l=>{if(!this.accessTokenKeyMatchesFilter(l,t,!1))return;const d=this.getAccessTokenCredential(l);d&&this.credentialMatchesFilter(d,t)&&Je.fromString(d.target).intersectingScopeSets(i)&&s.push(this.removeAccessToken(l))}),await Promise.all(s),this.setAccessTokenCredential(e)}getAccountsFilteredBy(e){const t=this.getAccountKeys(),n=[];return t.forEach(i=>{var f;if(!this.isAccountKey(i,e.homeAccountId))return;const s=this.getAccount(i,this.commonLogger);if(!s||e.homeAccountId&&!this.matchHomeAccountId(s,e.homeAccountId)||e.username&&!this.matchUsername(s.username,e.username)||e.environment&&!this.matchEnvironment(s,e.environment)||e.realm&&!this.matchRealm(s,e.realm)||e.nativeAccountId&&!this.matchNativeAccountId(s,e.nativeAccountId)||e.authorityType&&!this.matchAuthorityType(s,e.authorityType))return;const l={localAccountId:e==null?void 0:e.localAccountId,name:e==null?void 0:e.name},d=(f=s.tenantProfiles)==null?void 0:f.filter(g=>this.tenantProfileMatchesFilter(g,l));d&&d.length===0||n.push(s)}),n}isAccountKey(e,t,n){return!(e.split(bt.CACHE_KEY_SEPARATOR).length<3||t&&!e.toLowerCase().includes(t.toLowerCase())||n&&!e.toLowerCase().includes(n.toLowerCase()))}isCredentialKey(e){if(e.split(bt.CACHE_KEY_SEPARATOR).length<6)return!1;const t=e.toLowerCase();if(t.indexOf(ne.ID_TOKEN.toLowerCase())===-1&&t.indexOf(ne.ACCESS_TOKEN.toLowerCase())===-1&&t.indexOf(ne.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase())===-1&&t.indexOf(ne.REFRESH_TOKEN.toLowerCase())===-1)return!1;if(t.indexOf(ne.REFRESH_TOKEN.toLowerCase())>-1){const n=`${ne.REFRESH_TOKEN}${bt.CACHE_KEY_SEPARATOR}${this.clientId}${bt.CACHE_KEY_SEPARATOR}`,i=`${ne.REFRESH_TOKEN}${bt.CACHE_KEY_SEPARATOR}${sa}${bt.CACHE_KEY_SEPARATOR}`;if(t.indexOf(n.toLowerCase())===-1&&t.indexOf(i.toLowerCase())===-1)return!1}else if(t.indexOf(this.clientId.toLowerCase())===-1)return!1;return!0}credentialMatchesFilter(e,t){return!(t.clientId&&!this.matchClientId(e,t.clientId)||t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash)||typeof t.homeAccountId=="string"&&!this.matchHomeAccountId(e,t.homeAccountId)||t.environment&&!this.matchEnvironment(e,t.environment)||t.realm&&!this.matchRealm(e,t.realm)||t.credentialType&&!this.matchCredentialType(e,t.credentialType)||t.familyId&&!this.matchFamilyId(e,t.familyId)||t.target&&!this.matchTarget(e,t.target)||(t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash||e.credentialType===ne.ACCESS_TOKEN_WITH_AUTH_SCHEME&&(t.tokenType&&!this.matchTokenType(e,t.tokenType)||t.tokenType===Oe.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId)))}getAppMetadataFilteredBy(e){const t=this.getKeys(),n={};return t.forEach(i=>{if(!this.isAppMetadata(i))return;const s=this.getAppMetadata(i);s&&(e.environment&&!this.matchEnvironment(s,e.environment)||e.clientId&&!this.matchClientId(s,e.clientId)||(n[i]=s))}),n}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let n=null;return t.forEach(i=>{if(!this.isAuthorityMetadata(i)||i.indexOf(this.clientId)===-1)return;const s=this.getAuthorityMetadata(i);s&&s.aliases.indexOf(e)!==-1&&(n=s)}),n}async removeAllAccounts(){const e=this.getAccountKeys(),t=[];e.forEach(n=>{t.push(this.removeAccount(n))}),await Promise.all(t)}async removeAccount(e){const t=this.getAccount(e,this.commonLogger);t&&(await this.removeAccountContext(t),this.removeItem(e))}async removeAccountContext(e){const t=this.getTokenKeys(),n=e.generateAccountId(),i=[];t.idToken.forEach(s=>{s.indexOf(n)===0&&this.removeIdToken(s)}),t.accessToken.forEach(s=>{s.indexOf(n)===0&&i.push(this.removeAccessToken(s))}),t.refreshToken.forEach(s=>{s.indexOf(n)===0&&this.removeRefreshToken(s)}),await Promise.all(i)}updateOutdatedCachedAccount(e,t,n){var i;if(t&&t.isSingleTenant()){(i=this.commonLogger)==null||i.verbose("updateOutdatedCachedAccount: Found a single-tenant (outdated) account entity in the cache, migrating to multi-tenant account entity");const s=this.getAccountKeys().filter(m=>m.startsWith(t.homeAccountId)),l=[];s.forEach(m=>{const v=this.getCachedAccountEntity(m);v&&l.push(v)});const d=l.find(m=>uc(m.realm,m.homeAccountId))||l[0];d.tenantProfiles=l.map(m=>({tenantId:m.realm,localAccountId:m.localAccountId,name:m.name,isHomeTenant:uc(m.realm,m.homeAccountId)}));const f=gi.toObject(new at,{...d}),g=f.generateAccountKey();return s.forEach(m=>{m!==g&&this.removeOutdatedAccount(e)}),this.setAccount(f),n==null||n.verbose("Updated an outdated account entity in the cache"),f}return t}async removeAccessToken(e){const t=this.getAccessTokenCredential(e);if(t){if(t.credentialType.toLowerCase()===ne.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()&&t.tokenType===Oe.POP){const i=t.keyId;if(i)try{await this.cryptoImpl.removeTokenBindingKey(i)}catch{throw B(Fy)}}return this.removeItem(e)}}removeAppMetadata(){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t)}),!0}readAccountFromCache(e){const t=at.generateAccountCacheKey(e);return this.getAccount(t,this.commonLogger)}getIdToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getIdToken called");const l={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ne.ID_TOKEN,clientId:this.clientId,realm:n},d=this.getIdTokensByFilter(l,t),f=d.size;if(f<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(f>1){let g=d;if(!n){const m=new Map;d.forEach((C,S)=>{C.realm===e.tenantId&&m.set(S,C)});const v=m.size;if(v<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),d.values().next().value;if(v===1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),m.values().next().value;g=m}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),g.forEach((m,v)=>{this.removeIdToken(v)}),i&&s&&i.addFields({multiMatchedID:d.size},s),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),d.values().next().value}getIdTokensByFilter(e,t){const n=t&&t.idToken||this.getTokenKeys().idToken,i=new Map;return n.forEach(s=>{if(!this.idTokenKeyMatchesFilter(s,{clientId:this.clientId,...e}))return;const l=this.getIdTokenCredential(s);l&&this.credentialMatchesFilter(l,e)&&i.set(s,l)}),i}idTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}removeIdToken(e){this.removeItem(e)}removeRefreshToken(e){this.removeItem(e)}getAccessToken(e,t,n,i,s,l){this.commonLogger.trace("CacheManager - getAccessToken called");const d=Je.createSearchScopes(t.scopes),f=t.authenticationScheme||Oe.BEARER,g=f&&f.toLowerCase()!==Oe.BEARER.toLowerCase()?ne.ACCESS_TOKEN_WITH_AUTH_SCHEME:ne.ACCESS_TOKEN,m={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:g,clientId:this.clientId,realm:i||e.tenantId,target:d,tokenType:f,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},v=n&&n.accessToken||this.getTokenKeys().accessToken,C=[];v.forEach(_=>{if(this.accessTokenKeyMatchesFilter(_,m,!0)){const b=this.getAccessTokenCredential(_);b&&this.credentialMatchesFilter(b,m)&&C.push(b)}});const S=C.length;return S<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found"),null):S>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them"),C.forEach(_=>{this.removeAccessToken(ii(_))}),s&&l&&s.addFields({multiMatchedAT:C.length},l),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token"),C[0])}accessTokenKeyMatchesFilter(e,t,n){const i=e.toLowerCase();if(t.clientId&&i.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&i.indexOf(t.homeAccountId.toLowerCase())===-1||t.realm&&i.indexOf(t.realm.toLowerCase())===-1||t.requestedClaimsHash&&i.indexOf(t.requestedClaimsHash.toLowerCase())===-1)return!1;if(t.target){const s=t.target.asArray();for(let l=0;l<s.length;l++){if(n&&!i.includes(s[l].toLowerCase()))return!1;if(!n&&i.includes(s[l].toLowerCase()))return!0}}return!0}getAccessTokensByFilter(e){const t=this.getTokenKeys(),n=[];return t.accessToken.forEach(i=>{if(!this.accessTokenKeyMatchesFilter(i,e,!0))return;const s=this.getAccessTokenCredential(i);s&&this.credentialMatchesFilter(s,e)&&n.push(s)}),n}getRefreshToken(e,t,n,i,s){this.commonLogger.trace("CacheManager - getRefreshToken called");const l=t?sa:void 0,d={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:ne.REFRESH_TOKEN,clientId:this.clientId,familyId:l},f=n&&n.refreshToken||this.getTokenKeys().refreshToken,g=[];f.forEach(v=>{if(this.refreshTokenKeyMatchesFilter(v,d)){const C=this.getRefreshTokenCredential(v);C&&this.credentialMatchesFilter(C,d)&&g.push(C)}});const m=g.length;return m<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(m>1&&i&&s&&i.addFields({multiMatchedRT:m},s),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),g[0])}refreshTokenKeyMatchesFilter(e,t){const n=e.toLowerCase();return!(t.familyId&&n.indexOf(t.familyId.toLowerCase())===-1||!t.familyId&&t.clientId&&n.indexOf(t.clientId.toLowerCase())===-1||t.homeAccountId&&n.indexOf(t.homeAccountId.toLowerCase())===-1)}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},n=this.getAppMetadataFilteredBy(t),i=Object.keys(n).map(l=>n[l]),s=i.length;if(s<1)return null;if(s>1)throw B(My);return i[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!!(t&&t.familyId===sa)}matchHomeAccountId(e,t){return typeof e.homeAccountId=="string"&&t===e.homeAccountId}matchLocalAccountIdFromTokenClaims(e,t){const n=e.oid||e.sub;return t===n}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){var n;return t.toLowerCase()===((n=e.name)==null?void 0:n.toLowerCase())}matchUsername(e,t){return!!(e&&typeof e=="string"&&(t==null?void 0:t.toLowerCase())===e.toLowerCase())}matchUserAssertionHash(e,t){return!!(e.userAssertionHash&&t===e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const i=pM(this.staticAuthorityOptions,this.commonLogger);if(i.includes(t)&&i.includes(e.environment))return!0}const n=this.getAuthorityMetadataByAlias(t);return!!(n&&n.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!!(e.clientId&&t===e.clientId)}matchFamilyId(e,t){return!!(e.familyId&&t===e.familyId)}matchRealm(e,t){var n;return((n=e.realm)==null?void 0:n.toLowerCase())===t.toLowerCase()}matchNativeAccountId(e,t){return!!(e.nativeAccountId&&t===e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!!(e.authorityType&&t.toLowerCase()===e.authorityType.toLowerCase())}matchTarget(e,t){return e.credentialType!==ne.ACCESS_TOKEN&&e.credentialType!==ne.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target?!1:Je.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!!(e.tokenType&&e.tokenType===t)}matchKeyId(e,t){return!!(e.keyId&&e.keyId===t)}isAppMetadata(e){return e.indexOf(Kd)!==-1}isAuthorityMetadata(e){return e.indexOf(ac.CACHE_KEY)!==-1}generateAuthorityMetadataCacheKey(e){return`${ac.CACHE_KEY}-${this.clientId}-${e}`}static toObject(e,t){for(const n in t)e[n]=t[n];return e}}class yM extends gi{setAccount(){throw B(ge)}getAccount(){throw B(ge)}getCachedAccountEntity(){throw B(ge)}setIdTokenCredential(){throw B(ge)}getIdTokenCredential(){throw B(ge)}setAccessTokenCredential(){throw B(ge)}getAccessTokenCredential(){throw B(ge)}setRefreshTokenCredential(){throw B(ge)}getRefreshTokenCredential(){throw B(ge)}setAppMetadata(){throw B(ge)}getAppMetadata(){throw B(ge)}setServerTelemetry(){throw B(ge)}getServerTelemetry(){throw B(ge)}setAuthorityMetadata(){throw B(ge)}getAuthorityMetadata(){throw B(ge)}getAuthorityMetadataKeys(){throw B(ge)}setThrottlingCache(){throw B(ge)}getThrottlingCache(){throw B(ge)}removeItem(){throw B(ge)}getKeys(){throw B(ge)}getAccountKeys(){throw B(ge)}getTokenKeys(){throw B(ge)}updateCredentialCacheKey(){throw B(ge)}removeOutdatedAccount(){throw B(ge)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const uC={tokenRenewalOffsetSeconds:F1,preventCorsPreflight:!1},CM={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:xe.Info,correlationId:P.EMPTY_STRING},wM={claimsBasedCachingEnabled:!1},_M={async sendGetRequestAsync(){throw B(ge)},async sendPostRequestAsync(){throw B(ge)}},TM={sku:P.SKU,version:Qd,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},EM={clientSecret:P.EMPTY_STRING,clientAssertion:void 0},SM={azureCloudInstance:Xd.None,tenant:`${P.DEFAULT_COMMON_TENANT}`},AM={application:{appName:"",appVersion:""}};function bM({authOptions:r,systemOptions:e,loggerOptions:t,cacheOptions:n,storageInterface:i,networkInterface:s,cryptoInterface:l,clientCredentials:d,libraryInfo:f,telemetry:g,serverTelemetryManager:m,persistencePlugin:v,serializableCache:C}){const S={...CM,...t};return{authOptions:IM(r),systemOptions:{...uC,...e},loggerOptions:S,cacheOptions:{...wM,...n},storageInterface:i||new yM(r.clientId,cc,new qr(S)),networkInterface:s||_M,cryptoInterface:l||cc,clientCredentials:d||EM,libraryInfo:{...TM,...f},telemetry:{...AM,...g},serverTelemetryManager:m||null,persistencePlugin:v||null,serializableCache:C||null}}function IM(r){return{clientCapabilities:[],azureCloudOptions:SM,skipAuthorityMetadataCache:!1,instanceAware:!1,...r}}function gd(r){return r.authOptions.authority.options.protocolMode===Tr.OIDC}/*! @azure/msal-common v14.16.0 2024-11-05 */const on={HOME_ACCOUNT_ID:"home_account_id",UPN:"UPN"};/*! @azure/msal-common v14.16.0 2024-11-05 */const mo="client_id",dC="redirect_uri",ap="response_type",kM="response_mode",RM="grant_type",OM="claims",NM="scope",PM="refresh_token",MM="state",xM="nonce",DM="prompt",LM="code",BM="code_challenge",UM="code_challenge_method",VM="code_verifier",FM="client-request-id",HM="x-client-SKU",$M="x-client-VER",KM="x-client-OS",zM="x-client-CPU",WM="x-client-current-telemetry",qM="x-client-last-telemetry",GM="x-ms-lib-capability",jM="x-app-name",YM="x-app-ver",JM="post_logout_redirect_uri",QM="id_token_hint",XM="device_code",ZM="client_secret",ex="client_assertion",tx="client_assertion_type",sp="token_type",cp="req_cnf",nx="assertion",rx="requested_token_use",lp="return_spa_code",ox="nativebroker",ix="logout_hint",ax="sid",sx="login_hint",cx="domain_hint",lx="x-client-xtra-sku",ch="brk_client_id",md="brk_redirect_uri";/*! @azure/msal-common v14.16.0 2024-11-05 */class Xo{static validateRedirectUri(e){if(!e)throw Pe(Wy)}static validatePrompt(e){const t=[];for(const n in dt)t.push(dt[n]);if(t.indexOf(e)<0)throw Pe(Yy)}static validateClaims(e){try{JSON.parse(e)}catch{throw Pe(eh)}}static validateCodeChallengeParams(e,t){if(!e||!t)throw Pe(th);this.validateCodeChallengeMethod(t)}static validateCodeChallengeMethod(e){if([jm.PLAIN,jm.S256].indexOf(e)<0)throw Pe(Xy)}}/*! @azure/msal-common v14.16.0 2024-11-05 */function ux(r,e,t){if(!e)return;const n=r.get(mo);n&&r.has(ch)&&(t==null||t.addFields({embeddedClientId:n,embeddedRedirectUri:r.get(dC)},e))}class la{constructor(e,t){this.parameters=new Map,this.performanceClient=t,this.correlationId=e}addResponseTypeCode(){this.parameters.set(ap,encodeURIComponent(P.CODE_RESPONSE_TYPE))}addResponseTypeForTokenAndIdToken(){this.parameters.set(ap,encodeURIComponent(`${P.TOKEN_RESPONSE_TYPE} ${P.ID_TOKEN_RESPONSE_TYPE}`))}addResponseMode(e){this.parameters.set(kM,encodeURIComponent(e||B1.QUERY))}addNativeBroker(){this.parameters.set(ox,encodeURIComponent("1"))}addScopes(e,t=!0,n=yi){t&&!n.includes("openid")&&!e.includes("openid")&&n.push("openid");const i=t?[...e||[],...n]:e||[],s=new Je(i);this.parameters.set(NM,encodeURIComponent(s.printScopes()))}addClientId(e){this.parameters.set(mo,encodeURIComponent(e))}addRedirectUri(e){Xo.validateRedirectUri(e),this.parameters.set(dC,encodeURIComponent(e))}addPostLogoutRedirectUri(e){Xo.validateRedirectUri(e),this.parameters.set(JM,encodeURIComponent(e))}addIdTokenHint(e){this.parameters.set(QM,encodeURIComponent(e))}addDomainHint(e){this.parameters.set(cx,encodeURIComponent(e))}addLoginHint(e){this.parameters.set(sx,encodeURIComponent(e))}addCcsUpn(e){this.parameters.set(Pt.CCS_HEADER,encodeURIComponent(`UPN:${e}`))}addCcsOid(e){this.parameters.set(Pt.CCS_HEADER,encodeURIComponent(`Oid:${e.uid}@${e.utid}`))}addSid(e){this.parameters.set(ax,encodeURIComponent(e))}addClaims(e,t){const n=this.addClientCapabilitiesToClaims(e,t);Xo.validateClaims(n),this.parameters.set(OM,encodeURIComponent(n))}addCorrelationId(e){this.parameters.set(FM,encodeURIComponent(e))}addLibraryInfo(e){this.parameters.set(HM,e.sku),this.parameters.set($M,e.version),e.os&&this.parameters.set(KM,e.os),e.cpu&&this.parameters.set(zM,e.cpu)}addApplicationTelemetry(e){e!=null&&e.appName&&this.parameters.set(jM,e.appName),e!=null&&e.appVersion&&this.parameters.set(YM,e.appVersion)}addPrompt(e){Xo.validatePrompt(e),this.parameters.set(`${DM}`,encodeURIComponent(e))}addState(e){e&&this.parameters.set(MM,encodeURIComponent(e))}addNonce(e){this.parameters.set(xM,encodeURIComponent(e))}addCodeChallengeParams(e,t){if(Xo.validateCodeChallengeParams(e,t),e&&t)this.parameters.set(BM,encodeURIComponent(e)),this.parameters.set(UM,encodeURIComponent(t));else throw Pe(th)}addAuthorizationCode(e){this.parameters.set(LM,encodeURIComponent(e))}addDeviceCode(e){this.parameters.set(XM,encodeURIComponent(e))}addRefreshToken(e){this.parameters.set(PM,encodeURIComponent(e))}addCodeVerifier(e){this.parameters.set(VM,encodeURIComponent(e))}addClientSecret(e){this.parameters.set(ZM,encodeURIComponent(e))}addClientAssertion(e){e&&this.parameters.set(ex,encodeURIComponent(e))}addClientAssertionType(e){e&&this.parameters.set(tx,encodeURIComponent(e))}addOboAssertion(e){this.parameters.set(nx,encodeURIComponent(e))}addRequestTokenUse(e){this.parameters.set(rx,encodeURIComponent(e))}addGrantType(e){this.parameters.set(RM,encodeURIComponent(e))}addClientInfo(){this.parameters.set(U1,"1")}addExtraQueryParameters(e){Object.entries(e).forEach(([t,n])=>{!this.parameters.has(t)&&n&&this.parameters.set(t,n)})}addClientCapabilitiesToClaims(e,t){let n;if(!e)n={};else try{n=JSON.parse(e)}catch{throw Pe(eh)}return t&&t.length>0&&(n.hasOwnProperty(bs.ACCESS_TOKEN)||(n[bs.ACCESS_TOKEN]={}),n[bs.ACCESS_TOKEN][bs.XMS_CC]={values:t}),JSON.stringify(n)}addUsername(e){this.parameters.set(Jm.username,encodeURIComponent(e))}addPassword(e){this.parameters.set(Jm.password,encodeURIComponent(e))}addPopToken(e){e&&(this.parameters.set(sp,Oe.POP),this.parameters.set(cp,encodeURIComponent(e)))}addSshJwk(e){e&&(this.parameters.set(sp,Oe.SSH),this.parameters.set(cp,encodeURIComponent(e)))}addServerTelemetry(e){this.parameters.set(WM,e.generateCurrentRequestHeaderValue()),this.parameters.set(qM,e.generateLastRequestHeaderValue())}addThrottling(){this.parameters.set(GM,ca.X_MS_LIB_CAPABILITY_VALUE)}addLogoutHint(e){this.parameters.set(ix,encodeURIComponent(e))}addBrokerParameters(e){const t={};t[ch]=e.brokerClientId,t[md]=e.brokerRedirectUri,this.addExtraQueryParameters(t)}createQueryString(){const e=new Array;return this.parameters.forEach((t,n)=>{e.push(`${n}=${t}`)}),ux(this.parameters,this.correlationId,this.performanceClient),e.join("&")}}/*! @azure/msal-common v14.16.0 2024-11-05 */function dx(r){return r.hasOwnProperty("authorization_endpoint")&&r.hasOwnProperty("token_endpoint")&&r.hasOwnProperty("issuer")&&r.hasOwnProperty("jwks_uri")}/*! @azure/msal-common v14.16.0 2024-11-05 */function hx(r){return r.hasOwnProperty("tenant_discovery_endpoint")&&r.hasOwnProperty("metadata")}/*! @azure/msal-common v14.16.0 2024-11-05 */function fx(r){return r.hasOwnProperty("error")&&r.hasOwnProperty("error_description")}/*! @azure/msal-common v14.16.0 2024-11-05 */const k={AcquireTokenByCode:"acquireTokenByCode",AcquireTokenByRefreshToken:"acquireTokenByRefreshToken",AcquireTokenSilent:"acquireTokenSilent",AcquireTokenSilentAsync:"acquireTokenSilentAsync",AcquireTokenPopup:"acquireTokenPopup",AcquireTokenPreRedirect:"acquireTokenPreRedirect",AcquireTokenRedirect:"acquireTokenRedirect",CryptoOptsGetPublicKeyThumbprint:"cryptoOptsGetPublicKeyThumbprint",CryptoOptsSignJwt:"cryptoOptsSignJwt",SilentCacheClientAcquireToken:"silentCacheClientAcquireToken",SilentIframeClientAcquireToken:"silentIframeClientAcquireToken",AwaitConcurrentIframe:"awaitConcurrentIframe",SilentRefreshClientAcquireToken:"silentRefreshClientAcquireToken",SsoSilent:"ssoSilent",StandardInteractionClientGetDiscoveredAuthority:"standardInteractionClientGetDiscoveredAuthority",FetchAccountIdWithNativeBroker:"fetchAccountIdWithNativeBroker",NativeInteractionClientAcquireToken:"nativeInteractionClientAcquireToken",BaseClientCreateTokenRequestHeaders:"baseClientCreateTokenRequestHeaders",NetworkClientSendPostRequestAsync:"networkClientSendPostRequestAsync",RefreshTokenClientExecutePostToTokenEndpoint:"refreshTokenClientExecutePostToTokenEndpoint",AuthorizationCodeClientExecutePostToTokenEndpoint:"authorizationCodeClientExecutePostToTokenEndpoint",BrokerHandhshake:"brokerHandshake",AcquireTokenByRefreshTokenInBroker:"acquireTokenByRefreshTokenInBroker",AcquireTokenByBroker:"acquireTokenByBroker",RefreshTokenClientExecuteTokenRequest:"refreshTokenClientExecuteTokenRequest",RefreshTokenClientAcquireToken:"refreshTokenClientAcquireToken",RefreshTokenClientAcquireTokenWithCachedRefreshToken:"refreshTokenClientAcquireTokenWithCachedRefreshToken",RefreshTokenClientAcquireTokenByRefreshToken:"refreshTokenClientAcquireTokenByRefreshToken",RefreshTokenClientCreateTokenRequestBody:"refreshTokenClientCreateTokenRequestBody",AcquireTokenFromCache:"acquireTokenFromCache",SilentFlowClientAcquireCachedToken:"silentFlowClientAcquireCachedToken",SilentFlowClientGenerateResultFromCacheRecord:"silentFlowClientGenerateResultFromCacheRecord",AcquireTokenBySilentIframe:"acquireTokenBySilentIframe",InitializeBaseRequest:"initializeBaseRequest",InitializeSilentRequest:"initializeSilentRequest",InitializeClientApplication:"initializeClientApplication",SilentIframeClientTokenHelper:"silentIframeClientTokenHelper",SilentHandlerInitiateAuthRequest:"silentHandlerInitiateAuthRequest",SilentHandlerMonitorIframeForHash:"silentHandlerMonitorIframeForHash",SilentHandlerLoadFrame:"silentHandlerLoadFrame",SilentHandlerLoadFrameSync:"silentHandlerLoadFrameSync",StandardInteractionClientCreateAuthCodeClient:"standardInteractionClientCreateAuthCodeClient",StandardInteractionClientGetClientConfiguration:"standardInteractionClientGetClientConfiguration",StandardInteractionClientInitializeAuthorizationRequest:"standardInteractionClientInitializeAuthorizationRequest",StandardInteractionClientInitializeAuthorizationCodeRequest:"standardInteractionClientInitializeAuthorizationCodeRequest",GetAuthCodeUrl:"getAuthCodeUrl",HandleCodeResponseFromServer:"handleCodeResponseFromServer",HandleCodeResponse:"handleCodeResponse",UpdateTokenEndpointAuthority:"updateTokenEndpointAuthority",AuthClientAcquireToken:"authClientAcquireToken",AuthClientExecuteTokenRequest:"authClientExecuteTokenRequest",AuthClientCreateTokenRequestBody:"authClientCreateTokenRequestBody",AuthClientCreateQueryString:"authClientCreateQueryString",PopTokenGenerateCnf:"popTokenGenerateCnf",PopTokenGenerateKid:"popTokenGenerateKid",HandleServerTokenResponse:"handleServerTokenResponse",DeserializeResponse:"deserializeResponse",AuthorityFactoryCreateDiscoveredInstance:"authorityFactoryCreateDiscoveredInstance",AuthorityResolveEndpointsAsync:"authorityResolveEndpointsAsync",AuthorityResolveEndpointsFromLocalSources:"authorityResolveEndpointsFromLocalSources",AuthorityGetCloudDiscoveryMetadataFromNetwork:"authorityGetCloudDiscoveryMetadataFromNetwork",AuthorityUpdateCloudDiscoveryMetadata:"authorityUpdateCloudDiscoveryMetadata",AuthorityGetEndpointMetadataFromNetwork:"authorityGetEndpointMetadataFromNetwork",AuthorityUpdateEndpointMetadata:"authorityUpdateEndpointMetadata",AuthorityUpdateMetadataWithRegionalInformation:"authorityUpdateMetadataWithRegionalInformation",RegionDiscoveryDetectRegion:"regionDiscoveryDetectRegion",RegionDiscoveryGetRegionFromIMDS:"regionDiscoveryGetRegionFromIMDS",RegionDiscoveryGetCurrentVersion:"regionDiscoveryGetCurrentVersion",AcquireTokenByCodeAsync:"acquireTokenByCodeAsync",GetEndpointMetadataFromNetwork:"getEndpointMetadataFromNetwork",GetCloudDiscoveryMetadataFromNetworkMeasurement:"getCloudDiscoveryMetadataFromNetworkMeasurement",HandleRedirectPromiseMeasurement:"handleRedirectPromise",HandleNativeRedirectPromiseMeasurement:"handleNativeRedirectPromise",UpdateCloudDiscoveryMetadataMeasurement:"updateCloudDiscoveryMetadataMeasurement",UsernamePasswordClientAcquireToken:"usernamePasswordClientAcquireToken",NativeMessageHandlerHandshake:"nativeMessageHandlerHandshake",NativeGenerateAuthResult:"nativeGenerateAuthResult",RemoveHiddenIframe:"removeHiddenIframe",ClearTokensAndKeysWithClaims:"clearTokensAndKeysWithClaims",CacheManagerGetRefreshToken:"cacheManagerGetRefreshToken",GeneratePkceCodes:"generatePkceCodes",GenerateCodeVerifier:"generateCodeVerifier",GenerateCodeChallengeFromVerifier:"generateCodeChallengeFromVerifier",Sha256Digest:"sha256Digest",GetRandomValues:"getRandomValues"},gx={NotStarted:0,InProgress:1,Completed:2};/*! @azure/msal-common v14.16.0 2024-11-05 */const _o=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}try{const d=r(...s);return l==null||l.end({success:!0}),t.trace(`Returning result from ${e}`),d}catch(d){t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d}},F=(r,e,t,n,i)=>(...s)=>{t.trace(`Executing function ${e}`);const l=n==null?void 0:n.startMeasurement(e,i);if(i){const d=e+"CallCount";n==null||n.incrementFields({[d]:1},i)}return n==null||n.setPreQueueTime(e,i),r(...s).then(d=>(t.trace(`Returning result from ${e}`),l==null||l.end({success:!0}),d)).catch(d=>{t.trace(`Error occurred in ${e}`);try{t.trace(JSON.stringify(d))}catch{t.trace("Unable to print error message.")}throw l==null||l.end({success:!1},d),d})};/*! @azure/msal-common v14.16.0 2024-11-05 */class xc{constructor(e,t,n,i){this.networkInterface=e,this.logger=t,this.performanceClient=n,this.correlationId=i}async detectRegion(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RegionDiscoveryDetectRegion,this.correlationId);let n=e;if(n)t.region_source=zo.ENVIRONMENT_VARIABLE;else{const s=xc.IMDS_OPTIONS;try{const l=await F(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(P.IMDS_VERSION,s);if(l.status===ks.httpSuccess&&(n=l.body,t.region_source=zo.IMDS),l.status===ks.httpBadRequest){const d=await F(this.getCurrentVersion.bind(this),k.RegionDiscoveryGetCurrentVersion,this.logger,this.performanceClient,this.correlationId)(s);if(!d)return t.region_source=zo.FAILED_AUTO_DETECTION,null;const f=await F(this.getRegionFromIMDS.bind(this),k.RegionDiscoveryGetRegionFromIMDS,this.logger,this.performanceClient,this.correlationId)(d,s);f.status===ks.httpSuccess&&(n=f.body,t.region_source=zo.IMDS)}}catch{return t.region_source=zo.FAILED_AUTO_DETECTION,null}}return n||(t.region_source=zo.FAILED_AUTO_DETECTION),n||null}async getRegionFromIMDS(e,t){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.RegionDiscoveryGetRegionFromIMDS,this.correlationId),this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,P.IMDS_TIMEOUT)}async getCurrentVersion(e){var t;(t=this.performanceClient)==null||t.addQueueMeasurement(k.RegionDiscoveryGetCurrentVersion,this.correlationId);try{const n=await this.networkInterface.sendGetRequestAsync(`${P.IMDS_ENDPOINT}?format=json`,e);return n.status===ks.httpBadRequest&&n.body&&n.body["newest-versions"]&&n.body["newest-versions"].length>0?n.body["newest-versions"][0]:null}catch{return null}}}xc.IMDS_OPTIONS={headers:{Metadata:"true"}};/*! @azure/msal-common v14.16.0 2024-11-05 */class St{constructor(e,t,n,i,s,l,d,f){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=n,this.authorityOptions=i,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=s,this.performanceClient=d,this.correlationId=l,this.managedIdentity=f||!1,this.regionDiscovery=new xc(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(P.CIAM_AUTH_URL))return Dn.Ciam;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case P.ADFS:return Dn.Adfs;case P.DSTS:return Dn.Dsts}return Dn.Default}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new ye(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw B(vr)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw B(vr)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw B(vr)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw B(Hy);return this.replacePath(this.metadata.end_session_endpoint)}else throw B(vr)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw B(vr)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw B(vr)}canReplaceTenant(e){return e.PathSegments.length===1&&!St.reservedTenantDomains.has(e.PathSegments[0])&&this.getAuthorityType(e)===Dn.Default&&this.protocolMode===Tr.AAD}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const i=new ye(this.metadata.canonical_authority).getUrlComponents(),s=i.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((d,f)=>{let g=s[f];if(f===0&&this.canReplaceTenant(i)){const m=new ye(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];g!==m&&(this.logger.verbose(`Replacing tenant domain name ${g} with id ${m}`),g=m)}d!==g&&(t=t.replace(`/${g}/`,`/${d}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||this.authorityType===Dn.Adfs||this.protocolMode!==Tr.AAD&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityResolveEndpointsAsync,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await F(this.updateCloudDiscoveryMetadata.bind(this),k.AuthorityUpdateCloudDiscoveryMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const n=await F(this.updateEndpointMetadata.bind(this),k.AuthorityUpdateEndpointMetadata,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:n}),(s=this.performanceClient)==null||s.addFields({cloudDiscoverySource:t,authorityEndpointSource:n},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:np(),jwks_uri:""}),e}updateCachedMetadata(e,t,n){t!==Xt.CACHE&&(n==null?void 0:n.source)!==Xt.CACHE&&(e.expiresAt=np(),e.canonical_authority=this.canonicalAuthority);const i=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(i,e),this.metadata=e}async updateEndpointMetadata(e){var i,s,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateEndpointMetadata,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t){if(t.source===Xt.HARDCODED_VALUES&&(s=this.authorityOptions.azureRegionConfiguration)!=null&&s.azureRegion&&t.metadata){const d=await F(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(t.metadata);Rs(e,d,!1),e.canonical_authority=this.canonicalAuthority}return t.source}let n=await F(this.getEndpointMetadataFromNetwork.bind(this),k.AuthorityGetEndpointMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return(l=this.authorityOptions.azureRegionConfiguration)!=null&&l.azureRegion&&(n=await F(this.updateMetadataWithRegionalInformation.bind(this),k.AuthorityUpdateMetadataWithRegionalInformation,this.logger,this.performanceClient,this.correlationId)(n)),Rs(e,n,!0),Xt.NETWORK;throw B(ky,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),Rs(e,t,!1),{source:Xt.CONFIG};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const i=this.getEndpointMetadataFromHardcodedValues();if(i)return Rs(e,i,!1),{source:Xt.HARDCODED_VALUES,metadata:i};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const n=rp(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!n?(this.logger.verbose("Found endpoint metadata in the cache."),{source:Xt.CACHE}):(n&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new ye(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch{throw Pe(Zy)}return null}async getEndpointMetadataFromNetwork(){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityGetEndpointMetadataFromNetwork,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const i=await this.networkInterface.sendGetRequestAsync(t,e);return dx(i.body)?i.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(i){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${i}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in op?op[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){var n,i,s;(n=this.performanceClient)==null||n.addQueueMeasurement(k.AuthorityUpdateMetadataWithRegionalInformation,this.correlationId);const t=(i=this.authorityOptions.azureRegionConfiguration)==null?void 0:i.azureRegion;if(t){if(t!==P.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome=xu.CONFIGURED_NO_AUTO_DETECTION,this.regionDiscoveryMetadata.region_used=t,St.replaceWithRegionalInformation(e,t);const l=await F(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),k.RegionDiscoveryDetectRegion,this.logger,this.performanceClient,this.correlationId)((s=this.authorityOptions.azureRegionConfiguration)==null?void 0:s.environmentRegion,this.regionDiscoveryMetadata);if(l)return this.regionDiscoveryMetadata.region_outcome=xu.AUTO_DETECTION_REQUESTED_SUCCESSFUL,this.regionDiscoveryMetadata.region_used=l,St.replaceWithRegionalInformation(e,l);this.regionDiscoveryMetadata.region_outcome=xu.AUTO_DETECTION_REQUESTED_FAILED}return e}async updateCloudDiscoveryMetadata(e){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityUpdateCloudDiscoveryMetadata,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const n=await F(this.getCloudDiscoveryMetadataFromNetwork.bind(this),k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.logger,this.performanceClient,this.correlationId)();if(n)return Du(e,n,!0),Xt.NETWORK;throw Pe(eC)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||P.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||P.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),Du(e,t,!1),Xt.CONFIG;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const i=vM(this.hostnameAndPort);if(i)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),Du(e,i,!1),Xt.HARDCODED_VALUES;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}const n=rp(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!n?(this.logger.verbose("Found cloud discovery metadata in the cache."),Xt.CACHE):(n&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(this.authorityType===Dn.Ciam)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),St.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=JSON.parse(this.authorityOptions.cloudDiscoveryMetadata),t=hc(e.metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),t)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),t;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch{throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),Pe(nh)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),St.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthorityGetCloudDiscoveryMetadataFromNetwork,this.correlationId);const e=`${P.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let n=null;try{const s=await this.networkInterface.sendGetRequestAsync(e,t);let l,d;if(hx(s.body))l=s.body,d=l.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${l.tenant_discovery_endpoint}`);else if(fx(s.body)){if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${s.status}`),l=s.body,l.error===P.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${l.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${l.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),d=[]}else return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),n=hc(d,this.hostnameAndPort)}catch(s){if(s instanceof He)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.
51
51
  Error: ${s.errorCode}
52
52
  Error Description: ${s.errorMessage}`);else{const l=s;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
53
53
  Error: ${l.name}
54
- Error Description: ${l.message}`)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=St.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&ye.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let n;if(t&&t.azureCloudInstance!==th.None){const i=t.tenant?t.tenant:P.DEFAULT_COMMON_TENANT;n=`${t.azureCloudInstance}/${i}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return P.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw B(vr)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return dC.has(e)}static isPublicCloudAuthority(e){return P.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,n){const i=new ye(e);i.validateAsUri();const s=i.getUrlComponents();let l=`${t}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(l=`${t}.${P.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=ye.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:l}).urlString;return n?`${d}?${n}`:d}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=St.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=St.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=St.buildRegionalAuthorityString(n.end_session_endpoint,t)),n}static transformCIAMAuthority(e){let t=e;const i=new ye(e).getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(P.CIAM_AUTH_URL)){const s=i.HostNameAndPort.split(".")[0];t=`${t}${s}${P.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}St.reservedTenantDomains=new Set(["{tenant}","{tenantid}",zr.COMMON,zr.CONSUMERS,zr.ORGANIZATIONS]);function vx(r){var i;const n=(i=new ye(r).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:i.toLowerCase();switch(n){case zr.COMMON:case zr.ORGANIZATIONS:case zr.CONSUMERS:return;default:return n}}function mC(r){return r.endsWith(P.FORWARD_SLASH)?r:`${r}${P.FORWARD_SLASH}`}function yx(r){const e=r.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Pe(ih)}return{canonicalAuthority:r.authority?mC(r.authority):void 0,knownAuthorities:r.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function pC(r,e,t,n,i,s,l){l==null||l.addQueueMeasurement(k.AuthorityFactoryCreateDiscoveredInstance,s);const d=St.transformCIAMAuthority(mC(r)),f=new St(d,e,t,n,i,s,l);try{return await F(f.resolveEndpointsAsync.bind(f),k.AuthorityResolveEndpointsAsync,i,l,s)(),f}catch{throw B(vr)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Gr extends He{constructor(e,t,n,i,s){super(e,t,n),this.name="ServerError",this.errorNo=i,this.status=s,Object.setPrototypeOf(this,Gr.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Jn{static generateThrottlingStorageKey(e){return`${ua.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var s;const n=Jn.generateThrottlingStorageKey(t),i=e.getThrottlingCache(n);if(i){if(i.throttleTime<Date.now()){e.removeItem(n);return}throw new Gr(((s=i.errorCodes)==null?void 0:s.join(" "))||P.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,n){if(Jn.checkResponseStatus(n)||Jn.checkResponseForRetryAfter(n)){const i={throttleTime:Jn.calculateThrottleTime(parseInt(n.headers[Pt.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(Jn.generateThrottlingStorageKey(t),i)}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(Pt.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(t||ua.DEFAULT_THROTTLE_TIME_SECONDS),n+ua.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,n,i){const s={clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:i,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},l=this.generateThrottlingStorageKey(s);e.removeItem(l)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Uc extends He{constructor(e,t,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,Uc.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=n}}function hp(r,e,t){return new Uc(r,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class hh{constructor(e,t){this.config=kM(e),this.logger=new qr(this.config.loggerOptions,Wy,eh),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[Pt.CONTENT_TYPE]=P.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case on.HOME_ACCOUNT_ID:try{const n=ai(e.credential);t[Pt.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case on.UPN:t[Pt.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,n,i,s,l){var f;l&&((f=this.performanceClient)==null||f.addQueueMeasurement(l,s));const d=await this.sendPostRequest(i,e,{body:t,headers:n},s);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async sendPostRequest(e,t,n,i){var l,d,f;Jn.preProcess(this.cacheManager,e);let s;try{s=await F(this.networkClient.sendPostRequestAsync.bind(this.networkClient),k.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,i)(t,n);const g=s.headers||{};(d=this.performanceClient)==null||d.addFields({refreshTokenSize:((l=s.body.refresh_token)==null?void 0:l.length)||0,httpVerToken:g[Pt.X_MS_HTTP_VERSION]||"",requestId:g[Pt.X_MS_REQUEST_ID]||""},i)}catch(g){if(g instanceof Uc){const m=g.responseHeaders;throw m&&((f=this.performanceClient)==null||f.addFields({httpVerToken:m[Pt.X_MS_HTTP_VERSION]||"",requestId:m[Pt.X_MS_REQUEST_ID]||"",contentTypeHeader:m[Pt.CONTENT_TYPE]||void 0,contentLengthHeader:m[Pt.CONTENT_LENGTH]||void 0,httpStatus:g.httpStatus},i)),g.error}throw g instanceof He?g:B(Oy)}return Jn.postProcess(this.cacheManager,e,s),s}async updateAuthority(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.UpdateTokenEndpointAuthority,t);const n=`https://${e}/${this.authority.tenant}/`,i=await pC(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new da(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */const pc="no_tokens_found",vC="native_account_unavailable",fh="refresh_token_expired",Cx="interaction_required",wx="consent_required",_x="login_required",Vc="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const fp=[Cx,wx,_x,Vc],Tx=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Ex={[pc]:"No refresh token found in the cache. Please sign-in.",[vC]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[fh]:"Refresh token has expired.",[Vc]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Fn extends He{constructor(e,t,n,i,s,l,d,f){super(e,t,n),Object.setPrototypeOf(this,Fn.prototype),this.timestamp=i||P.EMPTY_STRING,this.traceId=s||P.EMPTY_STRING,this.correlationId=l||P.EMPTY_STRING,this.claims=d||P.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=f}}function gp(r,e,t){const n=!!r&&fp.indexOf(r)>-1,i=!!t&&Tx.indexOf(t)>-1,s=!!e&&fp.some(l=>e.indexOf(l)>-1);return n||s||i}function wd(r){return new Fn(r,Ex[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Vn{static setRequestState(e,t,n){const i=Vn.generateLibraryState(e,n);return t?`${i}${P.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw B(md);const n={id:e.createNewGuid()};t&&(n.meta=t);const i=JSON.stringify(n);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw B(md);if(!t)throw B(fi);try{const n=t.split(P.RESOURCE_DELIM),i=n[0],s=n.length>1?n.slice(1).join(P.RESOURCE_DELIM):P.EMPTY_STRING,l=e.base64Decode(i),d=JSON.parse(l);return{userRequestState:s||P.EMPTY_STRING,libraryState:d}}catch{throw B(fi)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Sx={SW:"sw",UHW:"uhw"};class mi{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.PopTokenGenerateCnf,e.correlationId);const n=await F(this.generateKid.bind(this),k.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:i}}async generateKid(e){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Sx.SW}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,i){const{resourceRequestMethod:s,resourceRequestUri:l,shrClaims:d,shrNonce:f,shrOptions:g}=n,m=l?new ye(l):void 0,v=m==null?void 0:m.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:or(),m:s==null?void 0:s.toUpperCase(),u:v==null?void 0:v.HostNameAndPort,nonce:f||this.cryptoUtils.createNewGuid(),p:v==null?void 0:v.AbsolutePath,q:v!=null&&v.QueryString?[[],v.QueryString]:void 0,client_claims:d||void 0,...i},t,g,n.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ax{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.16.0 2024-11-05 */function bx(r){var n,i;const e="code=",t=(n=r.error_uri)==null?void 0:n.lastIndexOf(e);return t&&t>=0?(i=r.error_uri)==null?void 0:i.substring(t+e.length):void 0}class po{constructor(e,t,n,i,s,l,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=i,this.serializableCache=s,this.persistencePlugin=l,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?B(uc,"Cached State"):B(uc,"Server State");let n,i;try{n=decodeURIComponent(e.state)}catch{throw B(fi,e.state)}try{i=decodeURIComponent(t)}catch{throw B(fi,e.state)}if(n!==i)throw B(My);if(e.error||e.error_description||e.suberror){const s=bx(e);throw gp(e.error,e.error_description,e.suberror)?new Fn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):new Gr(e.error||"",e.error_description,e.suberror,s)}}validateTokenResponse(e,t){var n;if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||P.NOT_AVAILABLE} - Timestamp: ${e.timestamp||P.NOT_AVAILABLE} - Description: ${e.error_description||P.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||P.NOT_AVAILABLE} - Trace ID: ${e.trace_id||P.NOT_AVAILABLE}`,s=(n=e.error_codes)!=null&&n.length?e.error_codes[0]:void 0,l=new Gr(e.error,i,e.suberror,s,e.status);if(t&&e.status&&e.status>=Is.SERVER_ERROR_RANGE_START&&e.status<=Is.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
55
- ${l}`);return}else if(t&&e.status&&e.status>=Is.CLIENT_ERROR_RANGE_START&&e.status<=Is.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
56
- ${l}`);return}throw gp(e.error,e.error_description,e.suberror)?new Fn(e.error,e.error_description,e.suberror,e.timestamp||P.EMPTY_STRING,e.trace_id||P.EMPTY_STRING,e.correlation_id||P.EMPTY_STRING,e.claims||P.EMPTY_STRING,s):l}}async handleServerTokenResponse(e,t,n,i,s,l,d,f,g){var _;(_=this.performanceClient)==null||_.addQueueMeasurement(k.HandleServerTokenResponse,e.correlation_id);let m;if(e.id_token){if(m=wo(e.id_token||P.EMPTY_STRING,this.cryptoObj.base64Decode),s&&s.nonce&&m.nonce!==s.nonce)throw B(xy);if(i.maxAge||i.maxAge===0){const A=m.auth_time;if(!A)throw B(Jd);qy(A,i.maxAge)}}this.homeAccountIdentifier=at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,m);let v;s&&s.state&&(v=Vn.parseRequestState(this.cryptoObj,s.state)),e.key_id=e.key_id||i.sshKid||void 0;const C=this.generateCacheRecord(e,t,n,i,m,l,s);let S;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),S=new Ax(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(S)),d&&!f&&C.account){const A=C.account.generateAccountKey();if(!this.cacheStorage.getAccount(A,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,v,void 0,g)}await this.cacheStorage.saveCacheRecord(C,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&S&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(S))}return po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,v,e,g)}generateCacheRecord(e,t,n,i,s,l,d){const f=t.getPreferredCache();if(!f)throw B(Xd);const g=cC(s);let m,v;e.id_token&&s&&(m=xc(this.homeAccountIdentifier,f,e.id_token,this.clientId,g||""),v=gh(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,s,e.client_info,f,g,d,void 0,this.logger));let C=null;if(e.access_token){const A=e.scope?Je.fromString(e.scope):new Je(i.scopes||[]),O=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,$=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,V=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,U=n+O,Q=U+$,se=V&&V>0?n+V:void 0;C=Dc(this.homeAccountIdentifier,f,e.access_token,this.clientId,g||t.tenant||"",A.printScopes(),U,Q,this.cryptoObj.base64Decode,se,e.token_type,l,e.key_id,i.claims,i.requestedClaimsHash)}let S=null;if(e.refresh_token){let A;if(e.refresh_token_expires_in){const O=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;A=n+O}S=Gy(this.homeAccountIdentifier,f,e.refresh_token,this.clientId,e.foci,l,A)}let _=null;return e.foci&&(_={clientId:this.clientId,environment:f,familyId:e.foci}),{account:v,idToken:m,accessToken:C,refreshToken:S,appMetadata:_}}static async generateAuthenticationResult(e,t,n,i,s,l,d,f,g){var U,Q,se,we,z;let m=P.EMPTY_STRING,v=[],C=null,S,_,A=P.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===Oe.POP&&!s.popKid){const tt=new mi(e),{secret:Te,keyId:j}=n.accessToken;if(!j)throw B(Zd);m=await tt.signPopToken(Te,j,s)}else m=n.accessToken.secret;v=Je.fromString(n.accessToken.target).asArray(),C=new Date(Number(n.accessToken.expiresOn)*1e3),S=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),n.accessToken.refreshOn&&(_=new Date(Number(n.accessToken.refreshOn)*1e3))}n.appMetadata&&(A=n.appMetadata.familyId===la?la:"");const O=(l==null?void 0:l.oid)||(l==null?void 0:l.sub)||"",$=(l==null?void 0:l.tid)||"";f!=null&&f.spa_accountid&&n.account&&(n.account.nativeAccountId=f==null?void 0:f.spa_accountid);const V=n.account?ch(n.account.getAccountInfo(),void 0,l,(U=n.idToken)==null?void 0:U.secret):null;return{authority:t.canonicalAuthority,uniqueId:O,tenantId:$,scopes:v,account:V,idToken:((Q=n==null?void 0:n.idToken)==null?void 0:Q.secret)||"",idTokenClaims:l||{},accessToken:m,fromCache:i,expiresOn:C,extExpiresOn:S,refreshOn:_,correlationId:s.correlationId,requestId:g||P.EMPTY_STRING,familyId:A,tokenType:((se=n.accessToken)==null?void 0:se.tokenType)||P.EMPTY_STRING,state:d?d.userRequestState:P.EMPTY_STRING,cloudGraphHostName:((we=n.account)==null?void 0:we.cloudGraphHostName)||P.EMPTY_STRING,msGraphHost:((z=n.account)==null?void 0:z.msGraphHost)||P.EMPTY_STRING,code:f==null?void 0:f.spa_code,fromNativeBroker:!1}}}function gh(r,e,t,n,i,s,l,d,f,g,m){m==null||m.verbose("setCachedAccount called");const C=r.getAccountKeys().find($=>$.startsWith(t));let S=null;C&&(S=r.getAccount(C,m));const _=S||at.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:l,cloudGraphHostName:f==null?void 0:f.cloud_graph_host_name,msGraphHost:f==null?void 0:f.msgraph_host,nativeAccountId:g},e,n),A=_.tenantProfiles||[],O=d||_.realm;if(O&&!A.find($=>$.tenantId===O)){const $=sh(t,_.localAccountId,O,i);A.push($)}return _.tenantProfiles=A,_}/*! @azure/msal-common v14.16.0 2024-11-05 */async function yC(r,e,t){return typeof r=="string"?r:r({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class CC extends hh{constructor(e,t){var n;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(n=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:n.defaultScopes}async getAuthCodeUrl(e){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.GetAuthCodeUrl,e.correlationId);const t=await F(this.createAuthCodeUrlQueryString.bind(this),k.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return ye.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var d,f;if((d=this.performanceClient)==null||d.addQueueMeasurement(k.AuthClientAcquireToken,e.correlationId),!e.code)throw B(By);const n=or(),i=await F(this.executeTokenRequest.bind(this),k.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=(f=i.headers)==null?void 0:f[Pt.X_MS_REQUEST_ID],l=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return l.validateTokenResponse(i.body),F(l.handleServerTokenResponse.bind(l),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,n,e,t,void 0,void 0,void 0,s)}handleFragmentResponse(e,t){if(new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw B($y);return e}getLogoutUri(e){if(!e)throw Pe(eC);const t=this.createLogoutUrlQueryString(e);return ye.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var g,m;(g=this.performanceClient)==null||g.addQueueMeasurement(k.AuthClientExecuteTokenRequest,t.correlationId);const n=this.createTokenQueryParameters(t),i=ye.appendQueryString(e.tokenEndpoint,n),s=await F(this.createTokenRequestBody.bind(this),k.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let l;if(t.clientInfo)try{const v=hc(t.clientInfo,this.cryptoUtils.base64Decode);l={credential:`${v.uid}${bt.CLIENT_INFO_SEPARATOR}${v.utid}`,type:on.HOME_ACCOUNT_ID}}catch(v){this.logger.verbose("Could not parse client info for CCS Header: "+v)}const d=this.createTokenRequestHeaders(l||t.ccsCredential),f={clientId:((m=t.tokenBodyParameters)==null?void 0:m.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return F(this.executePostToTokenEndpoint.bind(this),k.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(i,s,d,f,t.correlationId,k.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthClientCreateTokenRequestBody,e.correlationId);const t=new da(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):Xo.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!yd(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const l=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await yC(l.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(l.assertionType)}if(t.addGrantType(by.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Oe.POP){const l=new mi(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await F(l.generateCnf.bind(l),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Pe(Lc);(!Un.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let n;if(e.clientInfo)try{const l=hc(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${l.uid}${bt.CLIENT_INFO_SEPARATOR}${l.utid}`,type:on.HOME_ACCOUNT_ID}}catch(l){this.logger.verbose("Could not parse client info for CCS Header: "+l)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case on.HOME_ACCOUNT_ID:try{const l=ai(n.credential);t.addCcsOid(l)}catch(l){this.logger.verbose("Could not parse home account ID for CCS Header: "+l)}break;case on.UPN:t.addCcsUpn(n.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[dp])&&t.addExtraQueryParameters({[dp]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var s,l;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(s=this.performanceClient)==null||s.addQueueMeasurement(k.AuthClientCreateQueryString,t);const n=new da(t,this.performanceClient);n.addClientId(e.embeddedClientId||((l=e.extraQueryParameters)==null?void 0:l[mo])||this.config.authOptions.clientId);const i=[...e.scopes||[],...e.extraScopesToConsent||[]];if(n.addScopes(i,!0,this.oidcDefaultScopes),n.addRedirectUri(e.redirectUri),n.addCorrelationId(t),n.addResponseMode(e.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),yd(this.config)||n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&n.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&n.addPrompt(e.prompt),e.domainHint&&n.addDomainHint(e.domainHint),e.prompt!==dt.SELECT_ACCOUNT)if(e.sid&&e.prompt===dt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(e.sid);else if(e.account){const d=this.extractAccountSid(e.account);let f=this.extractLoginHint(e.account);if(f&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),f=null),f){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(f);try{const g=ai(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&e.prompt===dt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(d);try{const g=ai(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(e.account.username);try{const g=ai(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&n.addNonce(e.nonce),e.state&&n.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,n),e.nativeBroker&&(n.addNativeBroker(),e.authenticationScheme===Oe.POP)){const d=new mi(this.cryptoUtils);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await F(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}return n.createQueryString()}createLogoutUrlQueryString(e){const t=new da(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ix=300;class _d extends hh{constructor(e,t){super(e,t)}async acquireToken(e){var l,d;(l=this.performanceClient)==null||l.addQueueMeasurement(k.RefreshTokenClientAcquireToken,e.correlationId);const t=or(),n=await F(this.executeTokenRequest.bind(this),k.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(d=n.headers)==null?void 0:d[Pt.X_MS_REQUEST_ID],s=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(n.body),F(s.handleServerTokenResponse.bind(s),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){var n;if(!e)throw Pe(Zy);if((n=this.performanceClient)==null||n.addQueueMeasurement(k.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw B(Qd);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await F(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){const s=i instanceof Fn&&i.errorCode===pc,l=i instanceof Gr&&i.errorCode===Qm.INVALID_GRANT_ERROR&&i.subError===Qm.CLIENT_MISMATCH_ERROR;if(s||l)return F(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return F(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const n=_o(this.cacheManager.getRefreshToken.bind(this.cacheManager),k.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!n)throw wd(pc);if(n.expiresOn&&vd(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||Ix))throw wd(fh);const i={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||Oe.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}};try{return await F(this.acquireToken.bind(this),k.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(l){if(l instanceof Fn&&l.subError===Vc){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=ii(n);this.cacheManager.removeRefreshToken(d)}throw l}}async executeTokenRequest(e,t){var f,g;(f=this.performanceClient)==null||f.addQueueMeasurement(k.RefreshTokenClientExecuteTokenRequest,e.correlationId);const n=this.createTokenQueryParameters(e),i=ye.appendQueryString(t.tokenEndpoint,n),s=await F(this.createTokenRequestBody.bind(this),k.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),l=this.createTokenRequestHeaders(e.ccsCredential),d={clientId:((g=e.tokenBodyParameters)==null?void 0:g.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return F(this.executePostToTokenEndpoint.bind(this),k.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,s,l,d,e.correlationId,k.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,n=new da(t,this.performanceClient);if(n.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||this.config.authOptions.clientId),e.redirectUri&&n.addRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,(l=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:l.defaultScopes),n.addGrantType(by.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!yd(this.config)&&n.addServerTelemetry(this.serverTelemetryManager),n.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const d=this.config.clientCredentials.clientAssertion;n.addClientAssertion(await yC(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===Oe.POP){const d=new mi(this.cryptoUtils,this.performanceClient);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await F(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)n.addSshJwk(e.sshJwk);else throw Pe(Lc);if((!Un.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case on.HOME_ACCOUNT_ID:try{const d=ai(e.ccsCredential.credential);n.addCcsOid(d)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case on.UPN:n.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&n.addExtraQueryParameters(e.tokenBodyParameters),n.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */class kx extends hh{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[n,i]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...yi]});return i===Br.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new _d(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),n}catch(n){if(n instanceof Mc&&n.errorCode===yr)return new _d(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw n}}async acquireCachedToken(e){var f;(f=this.performanceClient)==null||f.addQueueMeasurement(k.SilentFlowClientAcquireCachedToken,e.correlationId);let t=Br.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Un.isEmptyObj(e.claims))throw this.setCacheOutcome(Br.FORCE_REFRESH_OR_CLAIMS,e.correlationId),B(yr);if(!e.account)throw B(Qd);const n=e.account.tenantId||vx(e.authority),i=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(s){if(rM(s.cachedAt)||vd(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Br.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),B(yr);s.refreshOn&&vd(s.refreshOn,0)&&(t=Br.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Br.NO_CACHED_ACCESS_TOKEN,e.correlationId),B(yr);const l=e.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.readAccountFromCache(e.account),accessToken:s,idToken:this.cacheManager.getIdToken(e.account,i,n,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(l)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await F(this.generateResultFromCacheRecord.bind(this),k.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(d,e),t]}setCacheOutcome(e,t){var n,i;(n=this.serverTelemetryManager)==null||n.setCacheOutcome(e),(i=this.performanceClient)==null||i.addFields({cacheOutcome:e},t),e!==Br.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let n;if(e.idToken&&(n=wo(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const s=n==null?void 0:n.auth_time;if(!s)throw B(Jd);qy(s,t.maxAge)}return po.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Rx={sendGetRequestAsync:()=>Promise.reject(B(ge)),sendPostRequestAsync:()=>Promise.reject(B(ge))};/*! @azure/msal-common v14.16.0 2024-11-05 */const mp=",",wC="|";function Ox(r){const{skus:e,libraryName:t,libraryVersion:n,extensionName:i,extensionVersion:s}=r,l=new Map([[0,[t,n]],[2,[i,s]]]);let d=[];if(e!=null&&e.length){if(d=e.split(mp),d.length<4)return e}else d=Array.from({length:4},()=>wC);return l.forEach((f,g)=>{var m,v;f.length===2&&((m=f[0])!=null&&m.length)&&((v=f[1])!=null&&v.length)&&Nx({skuArr:d,index:g,skuName:f[0],skuVersion:f[1]})}),d.join(mp)}function Nx(r){const{skuArr:e,index:t,skuName:n,skuVersion:i}=r;t>=e.length||(e[t]=[n,i].join(wC))}class va{constructor(e,t){this.cacheOutcome=Br.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||P.EMPTY_STRING,this.wrapperVer=e.wrapperVer||P.EMPTY_STRING,this.telemetryCacheKey=pt.CACHE_KEY+bt.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${pt.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n!=null&&n.length&&t.push(`broker_error=${n}`);const i=t.join(pt.VALUE_SEPARATOR),s=this.getRegionDiscoveryFields(),l=[e,s].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,l,i].join(pt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=va.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(pt.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(pt.VALUE_SEPARATOR),s=e.errors.length,l=t<s?pt.OVERFLOW_TRUE:pt.OVERFLOW_FALSE,d=[s,l].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,e.cacheHits,n,i,d].join(pt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=pt.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof He?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(pt.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=va.maxErrorsToSend(e),n=e.errors.length;if(t===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{const i={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}}static maxErrorsToSend(e){let t,n=0,i=0;const s=e.errors.length;for(t=0;t<s;t++){const l=e.failedRequests[2*t]||P.EMPTY_STRING,d=e.failedRequests[2*t+1]||P.EMPTY_STRING,f=e.errors[t]||P.EMPTY_STRING;if(i+=l.toString().length+d.toString().length+f.length+3,i<pt.MAX_LAST_HEADER_BYTES)n+=1;else break}return n}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||P.EMPTY_STRING),e.push(this.regionSource||P.EMPTY_STRING),e.push(this.regionOutcome||P.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return Ox(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const _C="missing_kid_error",TC="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const Px={[_C]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[TC]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class mh extends He{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,mh.prototype)}}function pp(r){return new mh(r,Px[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class ph{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw pp(_C);if(!e.alg)throw pp(TC);const t=new ph({typ:e.typ||H1.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class vp{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Mx{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:px.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new vp}}startPerformanceMeasurement(){return new vp}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const vh="pkce_not_created",Td="crypto_nonexistent",Fc="empty_navigate_uri",EC="hash_empty_error",yh="no_state_in_hash",SC="hash_does_not_contain_known_properties",AC="unable_to_parse_state",bC="state_interaction_type_mismatch",IC="interaction_in_progress",kC="popup_window_error",RC="empty_window_error",vo="user_cancelled",xx="monitor_popup_timeout",OC="monitor_window_timeout",NC="redirect_in_iframe",PC="block_iframe_reload",MC="block_nested_popups",Dx="iframe_closed_prematurely",Hc="silent_logout_unsupported",xC="no_account_error",Lx="silent_prompt_value_error",DC="no_token_request_cache_error",LC="unable_to_parse_token_request_cache_error",Ch="no_cached_authority_error",Bx="auth_request_not_set_error",Ux="invalid_cache_type",$c="non_browser_environment",Zo="database_not_open",vc="no_network_connectivity",BC="post_request_failed",UC="get_request_failed",Ed="failed_to_parse_response",VC="unable_to_load_token",wh="crypto_key_not_found",FC="auth_code_required",HC="auth_code_or_nativeAccountId_required",$C="spa_code_and_nativeAccountId_present",_h="database_unavailable",KC="unable_to_acquire_token_from_native_platform",zC="native_handshake_timeout",WC="native_extension_not_installed",ba="native_connection_not_established",qC="uninitialized_public_client_application",GC="native_prompt_not_supported",jC="invalid_base64_string",YC="invalid_pop_token_request",JC="failed_to_build_headers",QC="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const pr="For more visit: aka.ms/msaljs/browser-errors",Vx={[vh]:"The PKCE code challenge and verifier could not be generated.",[Td]:"The crypto object or function is not available.",[Fc]:"Navigation URI is empty. Please check stack trace for more info.",[EC]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${pr}`,[yh]:"Hash does not contain state. Please verify that the request originated from msal.",[SC]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${pr}`,[AC]:"Unable to parse state. Please verify that the request originated from msal.",[bC]:"Hash contains state but the interaction type does not match the caller.",[IC]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${pr}`,[kC]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[RC]:"window.open returned null or undefined window object.",[vo]:"User cancelled the flow.",[xx]:`Token acquisition in popup failed due to timeout. ${pr}`,[OC]:`Token acquisition in iframe failed due to timeout. ${pr}`,[NC]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[PC]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${pr}`,[MC]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Dx]:"The iframe being monitored was closed prematurely.",[Hc]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[xC]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[Lx]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[DC]:"No token request found in cache.",[LC]:"The cached token request could not be parsed.",[Ch]:"No cached authority found.",[Bx]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Ux]:"Invalid cache type",[$c]:"Login and token requests are not supported in non-browser environments.",[Zo]:"Database is not open!",[vc]:"No network connectivity. Check your internet connection.",[BC]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[UC]:"Network request failed. Please check the network trace to determine root cause.",[Ed]:"Failed to parse network response. Check network trace.",[VC]:"Error loading token to cache.",[wh]:"Cryptographic Key or Keypair not found in browser storage.",[FC]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[HC]:"An authorization code or nativeAccountId must be provided to this flow.",[$C]:"Request cannot contain both spa code and native account id.",[_h]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[KC]:`Unable to acquire token from native platform. ${pr}`,[zC]:"Timed out while attempting to establish connection to browser extension",[WC]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[ba]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${pr}`,[qC]:`You must call and await the initialize function before attempting to call any other MSAL API. ${pr}`,[GC]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[jC]:"Invalid base64 encoded string.",[YC]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[JC]:"Failed to build request headers object.",[QC]:"Failed to parse response headers"};class Ia extends He{constructor(e,t){super(e,Vx[e],t),Object.setPrototypeOf(this,Ia.prototype),this.name="BrowserAuthError"}}function G(r,e){return new Ia(r,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const tn={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},si={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},uo={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},Ht={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},yp={GET:"GET",POST:"POST"},ke={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},Lr={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},Ps={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},Le={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var J;(function(r){r.Redirect="redirect",r.Popup="popup",r.Silent="silent",r.None="none"})(J||(J={}));const Cp={scopes:yi},XC="jwk",Sd="msal.db",Fx=1,Hx=`${Sd}.keys`,Zt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},$x=[Zt.Default,Zt.Skip,Zt.RefreshTokenAndNetwork],Kx="msal.browser.log.level",zx="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Ms(r){return encodeURIComponent(Th(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Kc(r){return ZC(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Th(r){return ZC(new TextEncoder().encode(r))}function ZC(r){const e=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Wx="RSASSA-PKCS1-v1_5",ew="SHA-256",qx=2048,Gx=new Uint8Array([1,0,1]),wp="0123456789abcdef",_p=new Uint32Array(1),jx="crypto_subtle_undefined",Eh={name:Wx,hash:ew,modulusLength:qx,publicExponent:Gx};function Yx(r){if(!window)throw G($c);if(!window.crypto)throw G(Td);if(!r&&!window.crypto.subtle)throw G(Td,jx)}async function tw(r,e,t){e==null||e.addQueueMeasurement(k.Sha256Digest,t);const i=new TextEncoder().encode(r);return window.crypto.subtle.digest(ew,i)}function Jx(r){return window.crypto.getRandomValues(r)}function Hu(){return window.crypto.getRandomValues(_p),_p[0]}function Sr(){const r=Date.now(),e=Hu()*1024+(Hu()&1023),t=new Uint8Array(16),n=Math.trunc(e/2**30),i=e&2**30-1,s=Hu();t[0]=r/2**40,t[1]=r/2**32,t[2]=r/2**24,t[3]=r/2**16,t[4]=r/2**8,t[5]=r,t[6]=112|n>>>8,t[7]=n,t[8]=128|i>>>24,t[9]=i>>>16,t[10]=i>>>8,t[11]=i,t[12]=s>>>24,t[13]=s>>>16,t[14]=s>>>8,t[15]=s;let l="";for(let d=0;d<t.length;d++)l+=wp.charAt(t[d]>>>4),l+=wp.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(l+="-");return l}async function Qx(r,e){return window.crypto.subtle.generateKey(Eh,r,e)}async function $u(r){return window.crypto.subtle.exportKey(XC,r)}async function Xx(r,e,t){return window.crypto.subtle.importKey(XC,r,Eh,e,t)}async function Zx(r,e){return window.crypto.subtle.sign(Eh,r,e)}async function nw(r){const e=await tw(r),t=new Uint8Array(e);return Kc(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ya="storage_not_supported",Ad="stubbed_public_client_application_called",yc="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const Js={[ya]:"Given storage configuration option was not supported.",[Ad]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[yc]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};Js[ya],Js[Ad],Js[yc];class Sh extends He{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,Sh.prototype)}}function Ah(r){return new Sh(r,Js[r])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function eD(r){r.location.hash="",typeof r.history.replaceState=="function"&&r.history.replaceState(null,"",`${r.location.origin}${r.location.pathname}${r.location.search}`)}function tD(r){const e=r.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function bh(){return window.parent!==window}function nD(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${tn.POPUP_NAME_PREFIX}.`)===0}function Cr(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function rD(){const e=new ye(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function oD(){if(ye.hashContainsKnownProperties(window.location.hash)&&bh())throw G(PC)}function iD(r){if(bh()&&!r)throw G(NC)}function aD(){if(nD())throw G(MC)}function rw(){if(typeof window>"u")throw G($c)}function ow(r){if(!r)throw G(qC)}function Ih(r){rw(),oD(),aD(),ow(r)}function Tp(r,e){if(Ih(r),iD(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ht.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw Ah(yc)}function iw(r){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(r).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function sD(){return Sr()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Cc{navigateInternal(e,t){return Cc.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Cc.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(n=>{setTimeout(()=>{n(!0)},t.timeout)})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class cD{async sendGetRequestAsync(e,t){let n,i={},s=0;const l=Ep(t);try{n=await fetch(e,{method:yp.GET,headers:l})}catch{throw G(window.navigator.onLine?UC:vc)}i=Sp(n.headers);try{return s=n.status,{headers:i,body:await n.json(),status:s}}catch{throw hp(G(Ed),s,i)}}async sendPostRequestAsync(e,t){const n=t&&t.body||"",i=Ep(t);let s,l=0,d={};try{s=await fetch(e,{method:yp.POST,headers:i,body:n})}catch{throw G(window.navigator.onLine?BC:vc)}d=Sp(s.headers);try{return l=s.status,{headers:d,body:await s.json(),status:l}}catch{throw hp(G(Ed),l,d)}}}function Ep(r){try{const e=new Headers;if(!(r&&r.headers))return e;const t=r.headers;return Object.entries(t).forEach(([n,i])=>{e.append(n,i)}),e}catch{throw G(JC)}}function Sp(r){try{const e={};return r.forEach((t,n)=>{e[n]=t}),e}catch{throw G(QC)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const lD=6e4,bd=1e4,uD=3e4,dD=2e3;function hD({auth:r,cache:e,system:t,telemetry:n},i){const s={clientId:P.EMPTY_STRING,authority:`${P.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:P.EMPTY_STRING,authorityMetadata:P.EMPTY_STRING,redirectUri:typeof window<"u"?Cr():"",postLogoutRedirectUri:P.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Tr.AAD,OIDCOptions:{serverResponseType:Aa.FRAGMENT,defaultScopes:[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:th.None,tenant:P.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},l={cacheLocation:Ht.SessionStorage,temporaryCacheLocation:Ht.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ht.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:xe.Info,piiLoggingEnabled:!1},g={...{...fC,loggerOptions:d,networkClient:i?new cD:Rx,navigationClient:new Cc,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||lD,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||bd,navigateFrameWait:0,redirectNavigationTimeout:uD,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||dD,pollIntervalMilliseconds:tn.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},m={application:{appName:P.EMPTY_STRING,appVersion:P.EMPTY_STRING},client:new Mx};if((r==null?void 0:r.protocolMode)!==Tr.OIDC&&(r!=null&&r.OIDCOptions)&&new qr(g.loggerOptions).warning(JSON.stringify(Pe(iC))),r!=null&&r.protocolMode&&r.protocolMode!==Tr.AAD&&(g!=null&&g.allowNativeBroker))throw Pe(aC);return{auth:{...s,...r,OIDCOptions:{...s.OIDCOptions,...r==null?void 0:r.OIDCOptions}},cache:{...l,...e},system:g,telemetry:{...m,...n}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const fD="@azure/msal-browser",zc="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class kh{static loggerCallback(e,t){switch(e){case xe.Error:console.error(t);return;case xe.Info:console.info(t);return;case xe.Verbose:console.debug(t);return;case xe.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var f;this.browserEnvironment=typeof window<"u",this.config=hD(e,this.browserEnvironment);let t;try{t=window[Ht.SessionStorage]}catch{}const n=t==null?void 0:t.getItem(Kx),i=(f=t==null?void 0:t.getItem(zx))==null?void 0:f.toLowerCase(),s=i==="true"?!0:i==="false"?!1:void 0,l={...this.config.system.loggerOptions},d=n&&Object.keys(xe).includes(n)?xe[n]:void 0;d&&(l.loggerCallback=kh.loggerCallback,l.logLevel=d),s!==void 0&&(l.piiLoggingEnabled=s),this.logger=new qr(l,fD,zc),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class yo extends kh{getModuleName(){return yo.MODULE_NAME}getId(){return yo.ID}async initialize(){return this.available=typeof window<"u",this.available}}yo.MODULE_NAME="";yo.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function nr(r){return new TextDecoder().decode(gD(r))}function gD(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw G(jC)}const t=atob(e);return Uint8Array.from(t,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class mD{constructor(){this.dbName=Sd,this.version=Fx,this.tableName=Hx,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",i=>{i.target.result.createObjectStore(this.tableName)}),n.addEventListener("success",i=>{const s=i;this.db=s.target.result,this.dbOpen=!0,e()}),n.addEventListener("error",()=>t(G(_h)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(G(Zo));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result)}),l.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((n,i)=>{if(!this.db)return i(G(Zo));const d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);d.addEventListener("success",()=>{this.closeConnection(),n()}),d.addEventListener("error",f=>{this.closeConnection(),i(f)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(G(Zo));const l=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);l.addEventListener("success",()=>{this.closeConnection(),t()}),l.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(G(Zo));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();s.addEventListener("success",l=>{const d=l;this.closeConnection(),e(d.target.result)}),s.addEventListener("error",l=>{this.closeConnection(),t(l)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(G(Zo));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result===1)}),l.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const n=window.indexedDB.deleteDatabase(Sd),i=setTimeout(()=>t(!1),200);n.addEventListener("success",()=>(clearTimeout(i),e(!0))),n.addEventListener("blocked",()=>(clearTimeout(i),e(!0))),n.addEventListener("error",()=>(clearTimeout(i),t(!1)))})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Id{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,n)=>{e.push(n)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class pD{constructor(e){this.inMemoryCache=new Id,this.indexedDBCache=new mD,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Ia&&e.errorCode===_h)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(n){this.handleDatabaseAccessError(n)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(n){this.handleDatabaseAccessError(n)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(n){this.handleDatabaseAccessError(n)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class pi{constructor(e,t,n){this.logger=e,Yx(n??!1),this.cache=new pD(this.logger),this.performanceClient=t}createNewGuid(){return Sr()}base64Encode(e){return Th(e)}base64Decode(e){return nr(e)}base64UrlEncode(e){return Ms(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var m;const t=(m=this.performanceClient)==null?void 0:m.startMeasurement(k.CryptoOptsGetPublicKeyThumbprint,e.correlationId),n=await Qx(pi.EXTRACTABLE,pi.POP_KEY_USAGES),i=await $u(n.publicKey),s={e:i.e,kty:i.kty,n:i.n},l=Ap(s),d=await this.hashString(l),f=await $u(n.privateKey),g=await Xx(f,!1,["sign"]);return await this.cache.setItem(d,{privateKey:g,publicKey:n.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),d}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,n,i){var U;const s=(U=this.performanceClient)==null?void 0:U.startMeasurement(k.CryptoOptsSignJwt,i),l=await this.cache.getItem(t);if(!l)throw G(wh);const d=await $u(l.publicKey),f=Ap(d),g=Ms(JSON.stringify({kid:t})),m=ph.getShrHeaderString({...n==null?void 0:n.header,alg:d.alg,kid:g}),v=Ms(m);e.cnf={jwk:JSON.parse(f)};const C=Ms(JSON.stringify(e)),S=`${v}.${C}`,A=new TextEncoder().encode(S),O=await Zx(l.privateKey,A),$=Kc(new Uint8Array(O)),V=`${S}.${$}`;return s&&s.end({success:!0}),V}async hashString(e){return nw(e)}}pi.POP_KEY_USAGES=["sign","verify"];pi.EXTRACTABLE=!0;function Ap(r){return JSON.stringify(r,Object.keys(r).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class vD{constructor(){if(!window.localStorage)throw Ah(ya)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class yD{constructor(){if(!window.sessionStorage)throw Ah(ya)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function aw(r,e){if(!e)return null;try{return Vn.parseRequestState(r,e).libraryState.meta}catch{throw B(fi)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const CD=24*60*60*1e3;class wD{getItem(e){const t=`${encodeURIComponent(e)}`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){const s=n[i],[l,...d]=decodeURIComponent(s).trim().split("="),f=d.join("=");if(l===t)return f}return""}setItem(e,t,n,i=!0){let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(n){const l=_D(n);s+=`expires=${l};`}i&&(s+="Secure;"),document.cookie=s}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(n=>{const i=decodeURIComponent(n).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function _D(r){const e=new Date;return new Date(e.getTime()+r*CD).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class kd extends gi{constructor(e,t,n,i,s,l){super(e,n,i,s),this.cacheConfig=t,this.logger=i,this.internalStorage=new Id,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new wD,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=l}setupBrowserStorage(e){try{switch(e){case Ht.LocalStorage:return new vD;case Ht.SessionStorage:return new yD;case Ht.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ht.MemoryStorage,new Id}migrateCacheEntries(){const e=`${P.CACHE_PREFIX}.${ct.ID_TOKEN}`,t=`${P.CACHE_PREFIX}.${ct.CLIENT_INFO}`,n=`${P.CACHE_PREFIX}.${ct.ERROR}`,i=`${P.CACHE_PREFIX}.${ct.ERROR_DESC}`,s=this.browserStorage.getItem(e),l=this.browserStorage.getItem(t),d=this.browserStorage.getItem(n),f=this.browserStorage.getItem(i),g=[s,l,d,f];[ct.ID_TOKEN,ct.CLIENT_INFO,ct.ERROR,ct.ERROR_DESC].forEach((v,C)=>{const S=g[C];S&&this.setTemporaryCache(v,S,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Lr.ACCOUNT_KEYS),t=this.getItem(`${Lr.TOKEN_KEYS}.${this.clientId}`);if(e&&t){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(i=>{if(this.isCredentialKey(i)){const s=this.getItem(i);if(s){const l=this.validateAndParseJson(s);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case ne.ID_TOKEN:if(np(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${i} found, saving key to token key map`);const d=l,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,ne.ID_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${i}`);break;case ne.ACCESS_TOKEN:case ne.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(tp(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${i} found, saving key to token key map`);const d=l,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,ne.ACCESS_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${i}`);break;case ne.REFRESH_TOKEN:if(rp(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${i} found, saving key to token key map`);const d=l,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,ne.REFRESH_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${i}`);break}}}if(this.isAccountKey(i)){const s=this.getItem(i);if(s){const l=this.validateAndParseJson(s);l&&at.isAccountEntity(l)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${i} found, saving key to account key map`),this.addAccountKeyToMap(i))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const n=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,n,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const n=this.validateAndParseJson(t);return!n||!at.isAccountEntity(n)?(this.removeAccountKeyFromMap(e),null):gi.toObject(new at,n)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(Lr.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();t.indexOf(e)===-1?(t.push(e),this.setItem(Lr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),n=t.indexOf(e);n>-1?(t.splice(n,1),this.setItem(Lr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,ne.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,ne.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,ne.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${Lr.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const n=this.getTokenKeys();switch(t){case ne.ID_TOKEN:n.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(e));break;case ne.ACCESS_TOKEN:n.accessToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),n.accessToken.push(e));break;case ne.REFRESH_TOKEN:n.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),B(pd)}this.setItem(`${Lr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const n=this.getTokenKeys();switch(t){case ne.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const i=n.idToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),n.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ne.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const s=n.accessToken.indexOf(e);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),n.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ne.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const l=n.refreshToken.indexOf(e);l>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(l,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),B(pd)}this.setItem(`${Lr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ID_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!np(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),n)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=ii(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ne.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ACCESS_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!tp(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),n)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=ii(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ne.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.REFRESH_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!rp(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),n)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=ii(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ne.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!hM(e,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),n)}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=dM(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!lM(e,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),n)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&fM(e,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),n):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(Ps.WRAPPER_SKU,e),this.internalStorage.setItem(Ps.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Ps.WRAPPER_SKU)||P.EMPTY_STRING,t=this.internalStorage.getItem(Ps.WRAPPER_VER)||P.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(ct.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const i=this.generateCacheKey(ct.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const l=this.getAccountInfoFilteredBy({localAccountId:s});return l?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(l),l):null}const n=this.validateAndParseJson(t);return n?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(ct.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(ct.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(i)),this.browserStorage.setItem(n,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(n)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!uM(e,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),n)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const n=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const s=this.cookieStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),s}const i=this.temporaryCacheStorage.getItem(n);if(!i){if(this.cacheConfig.cacheLocation===Ht.LocalStorage){const s=this.browserStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),i}setTemporaryCache(e,t,n){const i=n?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(i,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(i,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(k.ClearTokensAndKeysWithClaims,t);const n=this.getTokenKeys(),i=[];n.accessToken.forEach(s=>{const l=this.getAccessTokenCredential(s);l!=null&&l.requestedClaimsHash&&s.includes(l.requestedClaimsHash.toLowerCase())&&i.push(this.removeAccessToken(s))}),await Promise.all(i),i.length>0&&this.logger.warning(`${i.length} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Un.startsWith(e,P.CACHE_PREFIX)||Un.startsWith(e,ct.ADAL_ID_TOKEN)?e:`${P.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Vn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Vn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Vn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),n=this.getTemporaryCache(t);if(!n)return null;const i=this.generateAuthorityKey(n);return this.getTemporaryCache(i)}updateCacheEntries(e,t,n,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const l=this.generateStateKey(e);this.setTemporaryCache(l,e,!1);const d=this.generateNonceKey(e);this.setTemporaryCache(d,t,!1);const f=this.generateAuthorityKey(e);if(this.setTemporaryCache(f,n,!1),s){const g={credential:s.homeAccountId,type:on.HOME_ACCOUNT_ID};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(g),!0)}else if(i){const g={credential:i,type:on.UPN};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(g),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(ke.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),n=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n||P.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(ke.REQUEST_STATE)===-1)return;const n=this.temporaryCacheStorage.getItem(t);if(!n)return;const i=aw(this.cryptoImpl,n);i&&i.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=Th(JSON.stringify(e));this.setTemporaryCache(ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(ke.REQUEST_PARAMS,!0);if(!t)throw G(DC);let n;try{n=JSON.parse(nr(t))}catch(i){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${i}`),G(LC)}if(this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),!n.authority){const i=this.generateAuthorityKey(e),s=this.getTemporaryCache(i);if(!s)throw G(Ch);n.authority=s}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(ke.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${P.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${P.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw G(IC);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(ct.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(ct.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(ct.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(ct.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=t||e;if(n){const i=wo(n,nr);if(i.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.preferred_username;if(i.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const n=ii(t);if(e!==n){const i=this.getItem(e);if(i)return this.browserStorage.removeItem(e),this.setItem(n,i),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),n;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var d,f,g;const n=xc((d=e.account)==null?void 0:d.homeAccountId,(f=e.account)==null?void 0:f.environment,e.idToken,this.clientId,e.tenantId);let i;t.claims&&(i=await this.cryptoImpl.hashString(t.claims));const s=Dc((g=e.account)==null?void 0:g.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,nr,void 0,e.tokenType,void 0,t.sshKid,t.claims,i),l={idToken:n,accessToken:s};return this.saveCacheRecord(l)}async saveCacheRecord(e,t,n){try{await super.saveCacheRecord(e,t,n)}catch(i){if(i instanceof li&&this.performanceClient&&n)try{const s=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:s.refreshToken.length,cacheIdCount:s.idToken.length,cacheAtCount:s.accessToken.length},n)}catch{}throw i}}}const TD=(r,e)=>{const t={cacheLocation:Ht.MemoryStorage,temporaryCacheLocation:Ht.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new kd(r,t,dc,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function ED(r,e,t,n){return r.verbose("getAllAccounts called"),t?e.getAllAccounts(n):[]}function SD(r,e,t){if(e.trace("getAccount called"),Object.keys(r).length===0)return e.warning("getAccount: No accountFilter provided"),null;const n=t.getAccountInfoFilteredBy(r);return n?(e.verbose("getAccount: Account matching provided filter found, returning"),n):(e.verbose("getAccount: No matching account found, returning null"),null)}function AD(r,e,t){if(e.trace("getAccountByUsername called"),!r)return e.warning("getAccountByUsername: No username provided"),null;const n=t.getAccountInfoFilteredBy({username:r});return n?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${r}`),n):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function bD(r,e,t){if(e.trace("getAccountByHomeId called"),!r)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const n=t.getAccountInfoFilteredBy({homeAccountId:r});return n?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${r}`),n):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function ID(r,e,t){if(e.trace("getAccountByLocalId called"),!r)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const n=t.getAccountInfoFilteredBy({localAccountId:r});return n?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${r}`),n):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function kD(r,e){e.setActiveAccount(r)}function RD(r){return r.getActiveAccount()}/*! @azure/msal-browser v3.28.1 2025-01-14 */const te={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.28.1 2025-01-14 */class OD{constructor(e){this.eventCallbacks=new Map,this.logger=e||new qr({})}addEventCallback(e,t,n){if(typeof window<"u"){const i=n||sD();return this.eventCallbacks.has(i)?(this.logger.error(`Event callback with id: ${i} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(i,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${i}`),i)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,n,i){if(typeof window<"u"){const s={eventType:e,interactionType:t||null,payload:n||null,error:i||null,timestamp:Date.now()};this.eventCallbacks.forEach(([l,d],f)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${f}: ${e}`),l.apply(null,[s]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class sw{constructor(e,t,n,i,s,l,d,f,g){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=s,this.navigationClient=l,this.nativeMessageHandler=f,this.correlationId=g||Sr(),this.logger=i.clone(tn.MSAL_SKU,zc,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){at.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(at.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return ye.getAbsoluteUrl(t,Cr())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new va(n,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,n=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const i={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=e.requestAuthority||this.config.auth.authority,l=n!=null&&n.length?n==="true":this.config.auth.instanceAware,d=t&&l?this.config.auth.authority.replace(ye.getDomainFromUrl(s),t.environment):s,f=St.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),g=await F(pC,k.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(f,this.config.system.networkClient,this.browserStorage,i,this.logger,this.correlationId,this.performanceClient);if(t&&!g.isAlias(t.environment))throw Pe(sC);return g}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const ND=32;async function PD(r,e,t){r.addQueueMeasurement(k.GeneratePkceCodes,t);const n=_o(MD,k.GenerateCodeVerifier,e,r,t)(r,e,t),i=await F(xD,k.GenerateCodeChallengeFromVerifier,e,r,t)(n,r,e,t);return{verifier:n,challenge:i}}function MD(r,e,t){try{const n=new Uint8Array(ND);return _o(Jx,k.GetRandomValues,e,r,t)(n),Kc(n)}catch{throw G(vh)}}async function xD(r,e,t,n){e.addQueueMeasurement(k.GenerateCodeChallengeFromVerifier,n);try{const i=await F(tw,k.Sha256Digest,t,e,n)(r,e,n);return Kc(new Uint8Array(i))}catch{throw G(vh)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function Rh(r,e,t,n){t.addQueueMeasurement(k.InitializeBaseRequest,r.correlationId);const i=r.authority||e.auth.authority,s=[...r&&r.scopes||[]],l={...r,correlationId:r.correlationId,authority:i,scopes:s};if(!l.authenticationScheme)l.authenticationScheme=Oe.BEARER,n.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(l.authenticationScheme===Oe.SSH){if(!r.sshJwk)throw Pe(Lc);if(!r.sshKid)throw Pe(oC)}n.verbose(`Authentication Scheme set to "${l.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&r.claims&&!Un.isEmptyObj(r.claims)&&(l.requestedClaimsHash=await nw(r.claims)),l}async function DD(r,e,t,n,i){n.addQueueMeasurement(k.InitializeSilentRequest,r.correlationId);const s=await F(Rh,k.InitializeBaseRequest,i,n,r.correlationId)(r,t,n,i);return{...r,...s,account:e,forceRefresh:r.forceRefresh||!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ci extends sw{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await F(PD,k.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),n={...e,redirectUri:e.redirectUri,code:P.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=P.S256_CODE_CHALLENGE_METHOD,n}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||Sr(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const n=this.getLogoutHintFromIdTokenClaims(e.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(e.postLogoutRedirectUri,Cr())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Cr())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(Cr(),Cr())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new CC(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}=e;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await F(this.getDiscoveredAuthority.bind(this),k.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}),f=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:d,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:f.loggerCallback,piiLoggingEnabled:f.piiLoggingEnabled,logLevel:f.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:tn.MSAL_SKU,version:zc,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const n=this.getRedirectUri(e.redirectUri),i={interactionType:t},s=Vn.setRequestState(this.browserCrypto,e&&e.state||P.EMPTY_STRING,i),d={...await F(Rh,k.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:n,state:s,nonce:e.nonce||Sr(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return d;const f=e.account||this.browserStorage.getActiveAccount();if(f&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${f.homeAccountId}`,this.correlationId),d.account=f),!d.loginHint&&!f){const g=this.browserStorage.getLegacyLoginHint();g&&(d.loginHint=g)}return d}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const LD="ContentError",cw="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const BD="USER_INTERACTION_REQUIRED",UD="USER_CANCEL",VD="NO_NETWORK",FD="PERSISTENT_ERROR",HD="DISABLED",$D="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const KD=-2147186943,zD={[cw]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Qn extends He{constructor(e,t,n){super(e,t),Object.setPrototypeOf(this,Qn.prototype),this.name="NativeAuthError",this.ext=n}}function ei(r){if(r.ext&&r.ext.status&&(r.ext.status===FD||r.ext.status===HD)||r.ext&&r.ext.error&&r.ext.error===KD)return!0;switch(r.errorCode){case LD:return!0;default:return!1}}function Rd(r,e,t){if(t&&t.status)switch(t.status){case $D:return wd(vC);case BD:return new Fn(r,e);case UD:return G(vo);case VD:return G(vc)}return new Qn(r,zD[r]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class lw extends Ci{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(Le.acquireTokenSilent_silentFlow),n=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),i=new kx(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{const l=(await F(i.acquireCachedToken.bind(i),k.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),l}catch(s){throw s instanceof Ia&&s.errorCode===wh&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),s}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class ui extends sw{constructor(e,t,n,i,s,l,d,f,g,m,v,C){var _;super(e,t,n,i,s,l,f,g,C),this.apiId=d,this.accountId=m,this.nativeMessageHandler=g,this.nativeStorageManager=v,this.silentCacheClient=new lw(e,this.nativeStorageManager,n,i,s,l,f,g,C),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const S=this.nativeMessageHandler.getExtensionId()===si.PREFERRED_EXTENSION_ID?"chrome":(_=this.nativeMessageHandler.getExtensionId())!=null&&_.length?"unknown":void 0;this.skus=va.makeExtraSkuString({libraryName:tn.MSAL_SKU,libraryVersion:zc,extensionName:S,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[dx]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),n=or();try{const i=await this.initializeNativeRequest(e);try{const g=await this.acquireTokensFromCache(this.accountId,i);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),g}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...s}=i,l={method:uo.GetToken,request:s},d=await this.nativeMessageHandler.sendMessage(l),f=this.validateNativeResponse(d);return await this.handleNativeResponse(f,i,n).then(g=>(t.end({success:!0,isNativeBroker:!0,requestId:g.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),g)).catch(g=>{throw t.end({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})}catch(i){throw i instanceof Qn&&this.serverTelemetryManager.setNativeBrokerErrorCode(i.errorCode),i}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Je.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),B(gd);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!n)throw B(gd);try{const i=this.createSilentCacheRequest(t,n),s=await this.silentCacheClient.acquireToken(i),l={...n,idTokenClaims:s==null?void 0:s.idTokenClaims,idToken:s==null?void 0:s.idToken};return{...s,account:l}}catch(i){throw i}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...n}=e;delete n.onRedirectNavigate;const i=await this.initializeNativeRequest(n),s={method:uo.GetToken,request:i};try{const f=await this.nativeMessageHandler.sendMessage(s);this.validateNativeResponse(f)}catch(f){if(f instanceof Qn&&(this.serverTelemetryManager.setNativeBrokerErrorCode(f.errorCode),ei(f)))throw f}this.browserStorage.setTemporaryCache(ke.NATIVE_REQUEST,JSON.stringify(i),!0);const l={apiId:Le.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(d,l)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const n=this.browserStorage.getCachedNativeRequest();if(!n)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:i,...s}=n;i&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.NATIVE_REQUEST));const l={method:uo.GetToken,request:s},d=or();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const f=await this.nativeMessageHandler.sendMessage(l);this.validateNativeResponse(f);const g=this.handleNativeResponse(f,s,d);this.browserStorage.setInteractionInProgress(!1);const m=await g;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),m}catch(f){throw this.browserStorage.setInteractionInProgress(!1),f}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,n){var m;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=wo(e.id_token,nr),s=this.createHomeAccountIdentifier(e,i),l=(m=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:m.homeAccountId;if(s!==l&&e.account.id!==t.accountId)throw Rd(cw);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),f=gh(this.browserStorage,d,s,nr,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger),g=await this.generateAuthenticationResult(e,t,i,f,d.canonicalAuthority,n);return this.cacheAccount(f),this.cacheNativeTokens(e,t,s,i,e.access_token,g.tenantId,n),g}createHomeAccountIdentifier(e,t){return at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,Dn.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Je.fromString(e.scope):Je.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Oe.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const n=new mi(this.browserCrypto),i={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw B(Zd);return n.signPopToken(e.access_token,t.keyId,i)}else return e.access_token}async generateAuthenticationResult(e,t,n,i,s,l){const d=this.addTelemetryFromNativeResponse(e),f=e.scope?Je.fromString(e.scope):Je.fromString(t.scope),g=e.account.properties||{},m=g.UID||n.oid||n.sub||P.EMPTY_STRING,v=g.TenantId||n.tid||P.EMPTY_STRING,C=ch(i.getAccountInfo(),void 0,n,e.id_token);C.nativeAccountId!==e.account.id&&(C.nativeAccountId=e.account.id);const S=await this.generatePopAccessToken(e,t),_=t.tokenType===Oe.POP?Oe.POP:Oe.BEARER;return{authority:s,uniqueId:m,tenantId:v,scopes:f.asArray(),account:C,idToken:e.id_token,idTokenClaims:n,accessToken:S,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(l+e.expires_in)*1e3),tokenType:_,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,n,i,s,l,d){const f=xc(n,t.authority,e.id_token||"",t.clientId,i.tid||""),g=t.tokenType===Oe.POP?P.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,m=d+g,v=this.generateScopes(e,t),C=Dc(n,t.authority,s,t.clientId,i.tid||l,v.printScopes(),m,0,nr,void 0,t.tokenType,void 0,t.keyId),S={idToken:f,accessToken:C};this.nativeStorageManager.saveCacheRecord(S,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw Iy(Gd,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const n=new ye(t);n.validateAsUri();const{scopes:i,...s}=e,l=new Je(i||[]);l.appendScopes(yi);const d=()=>{switch(this.apiId){case Le.ssoSilent:case Le.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),dt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case dt.NONE:case dt.CONSENT:case dt.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),G(GC)}},f={...s,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:l.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:d(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(f.signPopToken&&e.popKid)throw G(YC);if(this.handleExtraBrokerParams(f),f.extraParameters=f.extraParameters||{},f.extraParameters.telemetry=si.MATS_TELEMETRY,e.authenticationScheme===Oe.POP){const g={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},m=new mi(this.browserCrypto);let v;if(f.keyId)v=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:f.keyId})),f.signPopToken=!1;else{const C=await F(m.generateCnf.bind(m),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(g,this.logger);v=C.reqCnfString,f.keyId=C.kid,f.signPopToken=!0}f.reqCnf=v}return this.addRequestSKUs(f),f}handleExtraBrokerParams(e){var s;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(dh)&&e.extraParameters.hasOwnProperty(Cd)&&e.extraParameters.hasOwnProperty(mo);if(!e.embeddedClientId&&!t)return;let n="";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,n=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[Cd],n=e.extraParameters[mo]),e.extraParameters={child_client_id:n,child_redirect_uri:i},(s=this.performanceClient)==null||s.addFields({embeddedClientId:n,embeddedRedirectUri:i},e.correlationId)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Xn{constructor(e,t,n,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(k.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:si.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((n,i)=>{this.resolvers.set(t.responseId,{resolve:n,reject:i})})}static async createProvider(e,t,n){e.trace("NativeMessageHandler - createProvider called.");try{const i=new Xn(e,t,n,si.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch{const s=new Xn(e,t,n);return await s.sendHandshakeRequest(),s}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:si.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:{method:uo.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,n)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:n}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),n(G(zC)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==si.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===uo.HandshakeRequest){const n=this.handshakeResolvers.get(t.responseId);if(!n){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),n.reject(G(WC))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,n=this.resolvers.get(t.responseId),i=this.handshakeResolvers.get(t.responseId);try{const s=t.body.method;if(s===uo.Response){if(!n)return;const l=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(l)}`),l.status!=="Success")n.reject(Rd(l.code,l.description,l.ext));else if(l.result)l.result.code&&l.result.description?n.reject(Rd(l.result.code,l.result.description,l.result.ext)):n.resolve(l.result);else throw Iy(Gd,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(s===uo.HandshakeResponse){if(!i){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),i.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${s}`),this.logger.errorPii(`Unable to parse ${e}`),n?n.reject(s):i&&i.reject(s)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,n,i){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case Oe.BEARER:case Oe.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Oh{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(k.HandleCodeResponse,t.correlationId);let n;try{n=this.authModule.handleFragmentResponse(e,t.state)}catch(i){throw i instanceof Gr&&i.subError===vo?G(vo):i}return F(this.handleCodeResponseFromServer.bind(this),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(n,t)}async handleCodeResponseFromServer(e,t,n=!0){if(this.performanceClient.addQueueMeasurement(k.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await F(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),n&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const s=this.createCcsCredentials(t);s&&(this.authCodeRequest.ccsCredential=s)}return await F(this.authModule.acquireToken.bind(this.authModule),k.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:on.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function uw(r,e,t){const n=gc(r);if(!n)throw lC(r)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${r}`),G(SC)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),G(EC));return n}function WD(r,e,t){if(!r.state)throw G(yh);const n=aw(e,r.state);if(!n)throw G(AC);if(n.interactionType!==t)throw G(bC)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class qD extends Ci{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=f}acquireToken(e){try{const n={popupName:this.generatePopupName(e.scopes||yi,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,n)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),n.popup=this.openSizedPopup("about:blank",n),this.acquireTokenPopupAsync(e,n))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),n={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},i=e&&e.authority,s=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,n,i,s)):(this.logger.verbose("asyncPopup set to false, opening popup"),n.popup=this.openSizedPopup("about:blank",n),this.logoutPopupAsync(t,n,i,s))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var s;this.logger.verbose("acquireTokenPopupAsync called");const n=this.initializeServerTelemetryManager(Le.acquireTokenPopup),i=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,J.Popup);iw(i.authority);try{const l=await F(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),d=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),f=Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let g;f&&(g=this.performanceClient.startMeasurement(k.FetchAccountIdWithNativeBroker,e.correlationId));const m=await d.getAuthCodeUrl({...i,nativeBroker:f}),v=new Oh(d,this.browserStorage,l,this.logger,this.performanceClient),C=this.initiateAuthRequest(m,t);this.eventHandler.emitEvent(te.POPUP_OPENED,J.Popup,{popupWindow:C},null);const S=await this.monitorPopupForHash(C,t.popupWindowParent),_=_o(uw,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(S,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,l),_.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw G(ba);const O=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,_.accountId,this.nativeStorage,i.correlationId),{userRequestState:$}=Vn.parseRequestState(this.browserCrypto,i.state);return await O.acquireToken({...i,state:$,prompt:void 0})}return await v.handleCodeResponse(_,i)}catch(l){throw(s=t.popup)==null||s.close(),l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),l}}async logoutPopupAsync(e,t,n,i){var l,d,f,g;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(te.LOGOUT_START,J.Popup,e);const s=this.initializeServerTelemetryManager(Le.logoutPopup);try{await this.clearCacheOnLogout(e.account);const m=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:s,requestAuthority:n,account:e.account||void 0});try{m.authority.endSessionEndpoint}catch{if((l=e.account)!=null&&l.homeAccountId&&e.postLogoutRedirectUri&&m.authority.protocolMode===Tr.OIDC){if(this.browserStorage.removeAccount((d=e.account)==null?void 0:d.homeAccountId),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Popup,e),i){const S={apiId:Le.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},_=ye.getAbsoluteUrl(i,Cr());await this.navigationClient.navigateInternal(_,S)}(f=t.popup)==null||f.close();return}}const v=m.getLogoutUri(e);this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Popup,e);const C=this.openPopup(v,t);if(this.eventHandler.emitEvent(te.POPUP_OPENED,J.Popup,{popupWindow:C},null),await this.monitorPopupForHash(C,t.popupWindowParent).catch(()=>{}),i){const S={apiId:Le.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},_=ye.getAbsoluteUrl(i,Cr());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${_}`),await this.navigationClient.navigateInternal(_,S)}else this.logger.verbose("No main window navigation requested")}catch(m){throw(g=t.popup)==null||g.close(),m instanceof He&&(m.setCorrelationId(this.correlationId),s.cacheFailedRequest(m)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,J.Popup,null,m),this.eventHandler.emitEvent(te.LOGOUT_END,J.Popup),m}this.eventHandler.emitEvent(te.LOGOUT_END,J.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),G(Fc)}monitorPopupForHash(e,t){return new Promise((n,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const s=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(s),i(G(vo));return}let l="";try{l=e.location.href}catch{}if(!l||l==="about:blank")return;clearInterval(s);let d="";const f=this.config.auth.OIDCOptions.serverResponseType;e&&(f===Aa.QUERY?d=e.location.search:d=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),n(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let n;if(t.popup?(n=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),n.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),n=this.openSizedPopup(e,t)),!n)throw G(RC);return n.focus&&n.focus(),this.currentWindow=n,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),n}catch(n){throw this.logger.error("error opening popup "+n.message),this.browserStorage.setInteractionInProgress(!1),G(kC)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:n,popupWindowParent:i}){var S,_,A,O;const s=i.screenLeft?i.screenLeft:i.screenX,l=i.screenTop?i.screenTop:i.screenY,d=i.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=i.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let g=(S=n.popupSize)==null?void 0:S.width,m=(_=n.popupSize)==null?void 0:_.height,v=(A=n.popupPosition)==null?void 0:A.top,C=(O=n.popupPosition)==null?void 0:O.left;return(!g||g<0||g>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),g=tn.POPUP_WIDTH),(!m||m<0||m>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=tn.POPUP_HEIGHT),(!v||v<0||v>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),v=Math.max(0,f/2-tn.POPUP_HEIGHT/2+l)),(!C||C<0||C>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),C=Math.max(0,d/2-tn.POPUP_WIDTH/2+s)),i.open(e,t,`width=${g}, height=${m}, top=${v}, left=${C}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(J.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${tn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${tn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class bp{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const n={apiId:Le.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,n);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,n);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),G(Fc)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const n=this.browserStorage.generateStateKey(t),i=this.browserStorage.getTemporaryCache(n);if(!i)throw B(uc,"Cached State");let s;try{s=this.authModule.handleFragmentResponse(e,i)}catch(g){throw g instanceof Gr&&g.subError===vo?G(vo):g}const l=this.browserStorage.generateNonceKey(i),d=this.browserStorage.getTemporaryCache(l);if(this.authCodeRequest.code=s.code,s.cloud_instance_host_name&&await F(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(s.cloud_instance_host_name,this.authCodeRequest.correlationId),s.nonce=d||void 0,s.state=i,s.client_info)this.authCodeRequest.clientInfo=s.client_info;else{const g=this.checkCcsCredentials();g&&(this.authCodeRequest.ccsCredential=g)}const f=await this.authModule.acquireToken(this.authCodeRequest,s);return this.browserStorage.cleanRequestByState(t),f}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(ke.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function GD(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const r=window.performance.getEntriesByType("navigation"),e=r.length?r[0]:void 0;return e==null?void 0:e.type}class jD extends Ci{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.nativeStorage=f}async acquireToken(e){const t=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,J.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const n=this.initializeServerTelemetryManager(Le.acquireTokenRedirect),i=s=>{s.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(te.RESTORE_FROM_BFCACHE,J.Redirect))};try{const s=await F(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),l=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),d=new bp(l,this.browserStorage,s,this.logger,this.performanceClient),f=await l.getAuthCodeUrl({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),g=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${g}`),window.addEventListener("pageshow",i),await d.initiateAuthRequest(f,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:g,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(s){throw s instanceof He&&(s.setCorrelationId(this.correlationId),n.cacheFailedRequest(s)),window.removeEventListener("pageshow",i),this.browserStorage.cleanRequestByState(t.state),s}}async handleRedirectPromise(e="",t){const n=this.initializeServerTelemetryManager(Le.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[i,s]=this.getRedirectResponse(e||"");if(!i)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(J.Redirect),GD()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const l=this.browserStorage.getTemporaryCache(ke.ORIGIN_URI,!0)||P.EMPTY_STRING,d=ye.removeHashFromUrl(l),f=ye.removeHashFromUrl(window.location.href);if(d===f&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),l.indexOf("#")>-1&&tD(l),await this.handleResponse(i,n);if(this.config.auth.navigateToLoginRequestUrl){if(!bh()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(ke.URL_HASH,s,!0);const g={apiId:Le.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let m=!0;if(!l||l==="null"){const v=rD();this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,v,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),m=await this.navigationClient.navigateInternal(v,g)}else this.logger.verbose(`Navigating to loginRequestUrl: ${l}`),m=await this.navigationClient.navigateInternal(l,g);if(!m)return await this.handleResponse(i,n)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(i,n);return null}catch(i){throw i instanceof He&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),this.browserStorage.cleanRequestByInteractionType(J.Redirect),i}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===Aa.QUERY?t=window.location.search:t=window.location.hash);let n=gc(t);if(n){try{WD(n,this.browserCrypto,J.Redirect)}catch(s){return s instanceof He&&this.logger.error(`Interaction type validation failed due to ${s.errorCode}: ${s.errorMessage}`),[null,""]}return eD(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,t]}const i=this.browserStorage.getTemporaryCache(ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.URL_HASH)),i&&(n=gc(i),n)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[n,i]):[null,""]}async handleResponse(e,t){const n=e.state;if(!n)throw G(yh);const i=this.browserStorage.getCachedRequest(n);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw G(ba);const f=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,i.correlationId),{userRequestState:g}=Vn.parseRequestState(this.browserCrypto,n);return f.acquireToken({...i,state:g,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(n)})}const s=this.browserStorage.getCachedAuthority(n);if(!s)throw G(Ch);const l=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:s});return Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,i),new bp(l,this.browserStorage,i,this.logger,this.performanceClient).handleCodeResponse(e,n)}async logout(e){var i,s;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),n=this.initializeServerTelemetryManager(Le.logout);try{this.eventHandler.emitEvent(te.LOGOUT_START,J.Redirect,e),await this.clearCacheOnLogout(t.account);const l={apiId:Le.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(d.authority.protocolMode===Tr.OIDC)try{d.authority.endSessionEndpoint}catch{if((i=t.account)!=null&&i.homeAccountId){this.browserStorage.removeAccount((s=t.account)==null?void 0:s.homeAccountId),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Redirect,t);return}}const f=d.getLogoutUri(t);if(this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(f)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,l);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,l);return}}catch(l){throw l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,J.Redirect,null,l),this.eventHandler.emitEvent(te.LOGOUT_END,J.Redirect),l}this.eventHandler.emitEvent(te.LOGOUT_END,J.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ye.getAbsoluteUrl(t,Cr())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function YD(r,e,t,n,i){if(e.addQueueMeasurement(k.SilentHandlerInitiateAuthRequest,n),!r)throw t.info("Navigate url is empty"),G(Fc);return i?F(QD,k.SilentHandlerLoadFrame,t,e,n)(r,i,e,n):_o(XD,k.SilentHandlerLoadFrameSync,t,e,n)(r)}async function JD(r,e,t,n,i,s,l){return n.addQueueMeasurement(k.SilentHandlerMonitorIframeForHash,s),new Promise((d,f)=>{e<bd&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${bd}ms). This may result in timeouts.`);const g=window.setTimeout(()=>{window.clearInterval(m),f(G(OC))},e),m=window.setInterval(()=>{let v="";const C=r.contentWindow;try{v=C?C.location.href:""}catch{}if(!v||v==="about:blank")return;let S="";C&&(l===Aa.QUERY?S=C.location.search:S=C.location.hash),window.clearTimeout(g),window.clearInterval(m),d(S)},t)}).finally(()=>{_o(ZD,k.RemoveHiddenIframe,i,n,s)(r)})}function QD(r,e,t,n){return t.addQueueMeasurement(k.SilentHandlerLoadFrame,n),new Promise((i,s)=>{const l=dw();window.setTimeout(()=>{if(!l){s("Unable to load iframe");return}l.src=r,i(l)},e)})}function XD(r){const e=dw();return e.src=r,e}function dw(){const r=document.createElement("iframe");return r.className="msalSilentIframe",r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(r),r}function ZD(r){document.body===r.parentNode&&document.body.removeChild(r)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class eL extends Ci{constructor(e,t,n,i,s,l,d,f,g,m,v){super(e,t,n,i,s,l,f,m,v),this.apiId=d,this.nativeStorage=g}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==dt.NONE&&t.prompt!==dt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${dt.NONE}`),t.prompt=dt.NONE):t.prompt=dt.NONE;const n=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,J.Silent);iw(n.authority);const i=this.initializeServerTelemetryManager(this.apiId);let s;try{return s=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),await F(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(s,n)}catch(l){if(l instanceof He&&(l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l)),!s||!(l instanceof He)||l.errorCode!==tn.INVALID_GRANT_ERROR)throw l;this.performanceClient.addFields({retryError:l.errorCode},this.correlationId);const d=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,J.Silent);return await F(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(s,d)}}logout(){return Promise.reject(G(Hc))}async silentTokenHelper(e,t){const n=t.correlationId;this.performanceClient.addQueueMeasurement(k.SilentIframeClientTokenHelper,n);const i=await F(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(t),s=await F(e.getAuthCodeUrl.bind(e),k.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),l=new Oh(e,this.browserStorage,i,this.logger,this.performanceClient),d=await F(YD,k.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(s,this.performanceClient,this.logger,n,this.config.system.navigateFrameWait),f=this.config.auth.OIDCOptions.serverResponseType,g=await F(JD,k.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,f),m=_o(uw,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,f,this.logger);if(m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw G(ba);const v=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,m.accountId,this.browserStorage,n),{userRequestState:C}=Vn.parseRequestState(this.browserCrypto,t.state);return F(v.acquireToken.bind(v),k.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...t,state:C,prompt:t.prompt||dt.NONE})}return F(l.handleCodeResponse.bind(l),k.HandleCodeResponse,this.logger,this.performanceClient,n)(m,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class tL extends Ci{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentRefreshClientAcquireToken,e.correlationId);const t=await F(Rh,k.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),n={...e,...t};e.redirectUri&&(n.redirectUri=this.getRedirectUri(e.redirectUri));const i=this.initializeServerTelemetryManager(Le.acquireTokenSilent_silentFlow),s=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return F(s.acquireTokenByRefreshToken.bind(s),k.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(n).catch(l=>{throw l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),l})}logout(){return Promise.reject(G(Hc))}async createRefreshTokenClient(e){const t=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new _d(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class nL{constructor(e,t,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=n,this.cryptoObj=i}loadExternalTokens(e,t,n){if(!this.isBrowserEnvironment)throw G($c);const i=t.id_token?wo(t.id_token,nr):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},l=e.authority?new St(St.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||Sr()):void 0,d=this.loadAccount(e,n.clientInfo||t.client_info||"",i,l),f=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),g=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,n),m=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:f,accessToken:g,refreshToken:m},i,l)}loadAccount(e,t,n,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const f=at.createFromAccountInfo(e.account);return this.storage.setAccount(f),f}else if(!i||!t&&!n)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),G(VC);const s=at.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,n),l=n==null?void 0:n.tid,d=gh(this.storage,i,s,nr,n,t,i.hostnameAndPort,l,void 0,void 0,this.logger);return this.storage.setAccount(d),d}loadIdToken(e,t,n,i){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const s=xc(t,n,e.id_token,this.config.auth.clientId,i);return this.storage.setIdTokenCredential(s),s}loadAccessToken(e,t,n,i,s,l){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const d=t.scope?Je.fromString(t.scope):new Je(e.scopes),f=l.expiresOn||t.expires_in+new Date().getTime()/1e3,g=l.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,m=Dc(n,i,t.access_token,this.config.auth.clientId,s,d.printScopes(),f,g,nr);return this.storage.setAccessTokenCredential(m),m}loadRefreshToken(e,t,n){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const i=Gy(t,n,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(i),i}generateAuthenticationResult(e,t,n,i){var m,v,C;let s="",l=[],d=null,f;t!=null&&t.accessToken&&(s=t.accessToken.secret,l=Je.fromString(t.accessToken.target).asArray(),d=new Date(Number(t.accessToken.expiresOn)*1e3),f=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const g=t.account;return{authority:i?i.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:l,account:g.getAccountInfo(),idToken:((m=t.idToken)==null?void 0:m.secret)||"",idTokenClaims:n||{},accessToken:s,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:f,familyId:((v=t.refreshToken)==null?void 0:v.familyId)||"",tokenType:((C=t==null?void 0:t.accessToken)==null?void 0:C.tokenType)||"",state:e.state||"",cloudGraphHostName:g.cloudGraphHostName||"",msGraphHost:g.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class rL extends CC{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class oL extends Ci{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,f,g,m),this.apiId=d}async acquireToken(e){if(!e.code)throw G(FC);const t=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,J.Silent),n=this.initializeServerTelemetryManager(this.apiId);try{const i={...t,code:e.code},s=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),l=new rL(s);this.logger.verbose("Auth code client created");const d=new Oh(l,this.browserStorage,i,this.logger,this.performanceClient);return await F(d.handleCodeResponseFromServer.bind(d),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(i){throw i instanceof He&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),i}}logout(){return Promise.reject(G(Hc))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Gn(r){const e=r==null?void 0:r.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function xs(r,e){try{Ih(r)}catch(t){throw e.end({success:!1},t),t}}class Wc{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new pi(this.logger,this.performanceClient):dc,this.eventHandler=new OD(this.logger),this.browserStorage=this.isBrowserEnvironment?new kd(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,yx(this.config.auth),this.performanceClient):TD(this.config.auth.clientId,this.logger);const t={cacheLocation:Ht.MemoryStorage,temporaryCacheLocation:Ht.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new kd(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new nL(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const n=new Wc(e);return await n.initialize(t),n}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),n=this.config.system.allowNativeBroker,i=this.performanceClient.startMeasurement(k.InitializeClientApplication,t);if(this.eventHandler.emitEvent(te.INITIALIZE_START),n)try{this.nativeExtensionProvider=await Xn.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(s){this.logger.verbose(s)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await F(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),k.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END),i.end({allowNativeBroker:n,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),ow(this.initialized),this.isBrowserEnvironment){const t=e||"";let n=this.redirectResponse.get(t);return typeof n>"u"?(n=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,n),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),n}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),n=this.browserStorage.getCachedNativeRequest(),i=n&&Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,s=i?n==null?void 0:n.correlationId:this.browserStorage.getTemporaryCache(ke.CORRELATION_ID,!0)||"",l=this.performanceClient.startMeasurement(k.AcquireTokenRedirect,s);this.eventHandler.emitEvent(te.HANDLE_REDIRECT_START,J.Redirect);let d;if(i&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const f=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,n.accountId,this.nativeInternalStorage,n.correlationId);d=F(f.handleRedirectPromise.bind(f),k.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(this.performanceClient,l.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const f=this.createRedirectClient(s);d=F(f.handleRedirectPromise.bind(f),k.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(e,l)}return d.then(f=>(f?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(te.LOGIN_SUCCESS,J.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,J.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),l.end({success:!0,accountType:Gn(f.account)})):l.event.errorCode?l.end({success:!1}):l.discard(),this.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,J.Redirect),f)).catch(f=>{const g=f;throw t.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Redirect,null,g):this.eventHandler.emitEvent(te.LOGIN_FAILURE,J.Redirect,null,g),this.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,J.Redirect),l.end({success:!1},g),f})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenPreRedirect,t);n.add({accountType:Gn(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=l=>{const d=typeof i=="function"?i(l):void 0;return d!==!1?n.end({success:!0}):n.discard(),d};else{const l=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const f=typeof l=="function"?l(d):void 0;return f!==!1?n.end({success:!0}):n.discard(),f}}const s=this.getAllAccounts().length>0;try{Tp(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),s?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,J.Redirect,e):this.eventHandler.emitEvent(te.LOGIN_START,J.Redirect,e);let l;return this.nativeExtensionProvider&&this.canUseNative(e)?l=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,n).catch(f=>{if(f instanceof Qn&&ei(f))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(f instanceof Fn)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),f}):l=this.createRedirectClient(t).acquireToken(e),await l}catch(l){throw n.end({success:!1},l),s?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Redirect,null,l):this.eventHandler.emitEvent(te.LOGIN_FAILURE,J.Redirect,null,l),l}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenPopup,t);n.add({scenarioId:e.scenarioId,accountType:Gn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),xs(this.initialized,n),this.browserStorage.setInteractionInProgress(!0)}catch(l){return Promise.reject(l)}const i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,J.Popup,e):this.eventHandler.emitEvent(te.LOGIN_START,J.Popup,e);let s;return this.canUseNative(e)?s=this.acquireTokenNative({...e,correlationId:t},Le.acquireTokenPopup).then(l=>(this.browserStorage.setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,accountType:Gn(l.account)}),l)).catch(l=>{if(l instanceof Qn&&ei(l))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(l instanceof Fn)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),l}):s=this.createPopupClient(t).acquireToken(e),s.then(l=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(te.LOGIN_SUCCESS,J.Popup,l):this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,J.Popup,l),n.end({success:!0,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Gn(l.account)}),l)).catch(l=>(i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Popup,null,l):this.eventHandler.emitEvent(te.LOGIN_FAILURE,J.Popup,null,l),n.end({success:!1},l),Promise.reject(l)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var s,l;const t=this.getRequestCorrelationId(e),n={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(k.SsoSilent,t),(s=this.ssoSilentMeasurement)==null||s.add({scenarioId:e.scenarioId,accountType:Gn(e.account)}),xs(this.initialized,this.ssoSilentMeasurement),(l=this.ssoSilentMeasurement)==null||l.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(te.SSO_SILENT_START,J.Silent,n);let i;return this.canUseNative(n)?i=this.acquireTokenNative(n,Le.ssoSilent).catch(d=>{if(d instanceof Qn&&ei(d))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(n.correlationId).acquireToken(n);throw d}):i=this.createSilentIframeClient(n.correlationId).acquireToken(n),i.then(d=>{var f;return this.eventHandler.emitEvent(te.SSO_SILENT_SUCCESS,J.Silent,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!0,isNativeBroker:d.fromNativeBroker,accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length,accountType:Gn(d.account)}),d}).catch(d=>{var f;throw this.eventHandler.emitEvent(te.SSO_SILENT_FAILURE,J.Silent,null,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!1},d),d}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenByCode,t);xs(this.initialized,n),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_START,J.Silent,e),n.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw G($C);if(e.code){const i=e.code;let s=this.hybridAuthCodeResponses.get(i);return s?(this.logger.verbose("Existing acquireTokenByCode request found",t),n.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),s=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(l=>(this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_SUCCESS,J.Silent,l),this.hybridAuthCodeResponses.delete(i),n.end({success:!0,isNativeBroker:l.fromNativeBroker,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Gn(l.account)}),l)).catch(l=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,J.Silent,null,l),n.end({success:!1},l),l}),this.hybridAuthCodeResponses.set(i,s)),await s}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const i=await this.acquireTokenNative({...e,correlationId:t},Le.acquireTokenByCode,e.nativeAccountId).catch(s=>{throw s instanceof Qn&&ei(s)&&(this.nativeExtensionProvider=void 0),s});return n.end({accountType:Gn(i.account),success:!0}),i}else throw G(KC);else throw G(HC)}catch(i){throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,J.Silent,null,i),n.end({success:!1},i),i}}async acquireTokenByCodeAsync(e){var i;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(k.AcquireTokenByCodeAsync,e.correlationId),(i=this.acquireTokenByCodeAsyncMeasurement)==null||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(s=>{var l;return(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker}),s}).catch(s=>{var l;throw(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!1},s),s}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenFromCache,e.correlationId),t){case Zt.Default:case Zt.AccessToken:case Zt.AccessTokenAndRefreshToken:const n=this.createSilentCacheClient(e.correlationId);return F(n.acquireToken.bind(n),k.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(yr)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenByRefreshToken,e.correlationId),t){case Zt.Default:case Zt.AccessTokenAndRefreshToken:case Zt.RefreshToken:case Zt.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(e.correlationId);return F(n.acquireToken.bind(n),k.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(yr)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(k.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return F(t.acquireToken.bind(t),k.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return Tp(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Ih(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return ED(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return SD(e,this.logger,this.browserStorage)}getAccountByUsername(e){return AD(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return bD(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return ID(e,this.logger,this.browserStorage)}setActiveAccount(e){kD(e,this.browserStorage)}getActiveAccount(){return RD(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const n=at.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(n),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,n){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw G(ba);return new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case dt.NONE:case dt.CONSENT:case dt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new qD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new jD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new eL(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new lw(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new tL(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new oL(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return rw(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(ct.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(te.ACTIVE_ACCOUNT_CHANGED);const n=e.newValue||e.oldValue;if(!n)return;const i=JSON.parse(n);if(typeof i!="object"||!at.isAccountEntity(i))return;const l=gi.toObject(new at,i).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(te.ACCOUNT_ADDED,void 0,l)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(te.ACCOUNT_REMOVED,void 0,l))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?Sr():P.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||Cp})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||Cp})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenSilent,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),xs(this.initialized,n),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw G(xC);n.add({accountType:Gn(i)});const s={clientId:this.config.auth.clientId,authority:e.authority||P.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:i.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},l=JSON.stringify(s),d=this.activeSilentTokenRequests.get(l);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const f=F(this.acquireTokenSilentAsync.bind(this),k.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},i).then(g=>(this.activeSilentTokenRequests.delete(l),n.end({success:!0,fromCache:g.fromCache,isNativeBroker:g.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:g.accessToken.length,idTokenSize:g.idToken.length}),g)).catch(g=>{throw this.activeSilentTokenRequests.delete(l),n.end({success:!1},g),g});return this.activeSilentTokenRequests.set(l,f),{...await f,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),n.discard(),{...await d,state:e.state}}async acquireTokenSilentAsync(e,t){const n=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(k.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,J.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",n);const i=await F(DD,k.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),s=e.cacheLookupPolicy||Zt.Default;return this.acquireTokenSilentNoIframe(i,s).catch(async d=>{if(iL(d,s))if(this.activeIframeRequest)if(s!==Zt.Skip){const[g,m]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${m}`,i.correlationId);const v=this.performanceClient.startMeasurement(k.AwaitConcurrentIframe,i.correlationId);v.add({awaitIframeCorrelationId:m});const C=await g;if(v.end({success:C}),C)return this.logger.verbose(`Parallel iframe request with correlationId: ${m} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,s);throw this.logger.info(`Iframe request with correlationId: ${m} failed. Interaction is required.`),d}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",i.correlationId),F(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i);else{let g;return this.activeIframeRequest=[new Promise(m=>{g=m}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),F(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i).then(m=>(g(!0),m)).catch(m=>{throw g(!1),m}).finally(()=>{this.activeIframeRequest=void 0})}else throw d}).then(d=>(this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,J.Silent,d),e.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker},e.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",n)})}async acquireTokenSilentNoIframe(e,t){return Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,Le.acquireTokenSilent_silentFlow).catch(async n=>{throw n instanceof Qn&&ei(n)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,B(yr)):n})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),F(this.acquireTokenFromCache.bind(this),k.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(n=>{if(t===Zt.AccessToken)throw n;return this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_NETWORK_START,J.Silent,e),F(this.acquireTokenByRefreshToken.bind(this),k.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function iL(r,e){const t=!(r instanceof Fn&&r.subError!==Vc),n=r.errorCode===tn.INVALID_GRANT_ERROR||r.errorCode===yr,i=t&&n||r.errorCode===pc||r.errorCode===fh,s=$x.includes(e);return i&&s}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function aL(r,e){const t=new yo(r);return await t.initialize(),Wc.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Nh{static async createPublicClientApplication(e){const t=await aL(e);return new Nh(e,t)}constructor(e,t){this.controller=t||new Wc(new yo(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const Ku=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",sL=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",cL=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",Ip=process.env.JPLAN_WEBAPP__URL_AUTH??process.env.JPLAN_WEBAPP__URL_BASE??"",lL={auth:{clientId:sL,authority:`https://${Ku}.b2clogin.com/${Ku}.onmicrosoft.com/${cL}`,knownAuthorities:[`${Ku}.b2clogin.com`],redirectUri:process.env.JPLAN_AUTOMATION_ENVIRONMENT?`${Ip}/_/dashboard`:Ip},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(r,e)=>{r===xe.Error&&console.error(e)},logLevel:xe.Warning}}},hw=r=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:"/_/dashboard",extraQueryParameters:r}),yt=new Nh(lL),kp=c.ref(null);function fw(){async function r(e){var t;if(e)try{const n=e.idTokenClaims;if(!(n!=null&&n.aud))throw new Error("User audience (aud) is missing in ID token claims");const i=localStorage.getItem(`msal.token.keys.${n.aud}`);if(!i)throw new Error(`Token keys para ${n.aud} não encontrados no localStorage`);const s=JSON.parse(i),l=(t=s==null?void 0:s.idToken)==null?void 0:t[0];if(!l)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(l);if(!d)throw new Error(`Dados do token para ID ${l} não encontrados no localStorage`);const f=JSON.parse(d),g=f==null?void 0:f.secret;if(!g)throw new Error("Secret não encontrado nos dados do token");sessionStorage.setItem("isAuthenticated","true"),kp.value=g}catch(n){console.error("Erro ao obter token de acesso:",n)}}return{jToken:kp,setJToken:r}}const uL=()=>process.env.JPLAN_WEBAPP__URL_AUTH||"http://localhost:5173/_/dashboard",Mn=c.ref(null),Wo=c.ref(null),ji=c.ref(null),Yi=c.ref(null),Ds=c.ref(Math.floor(Date.now()/1e3));function qc(){const{setJToken:r,jToken:e}=fw(),t=c.computed(()=>!!Mn.value),n=c.computed(()=>Mn.value);async function i(v){if(!t.value)switch(v){case"redirect":await d();break;case"tab":await s();break;default:await d();break}}const s=async()=>new Promise((v,C)=>{try{localStorage.clear();const S=window.open(uL());if(!S){console.error("Failed to open authentication window"),C("Failed to open authentication window");return}const _=Date.now(),A=6e4,O=setInterval(()=>{if(Date.now()-_>A||S.closed){clearInterval(O),console.error("Authentication canceled or timeout reached."),C("Authentication canceled or timeout reached.");return}Object.keys(localStorage).some(V=>V.startsWith("msal.account.keys"))&&(clearInterval(O),l(),S.close(),v())},500)}catch(S){console.error("Error in handleRedirect:",S),C(S)}}),l=async()=>{try{await yt.initialize();const v=yt.getActiveAccount();if(v)Mn.value=v;else{const C=await yt.handleRedirectPromise();C?(yt.setActiveAccount(C.account),Mn.value=yt.getActiveAccount()):console.error("Falha na autenticação")}}catch(v){console.error("Erro no processo de autenticação:",v)}Mn.value&&await r(Mn.value)},d=async()=>{try{await yt.initialize();const v=await yt.handleRedirectPromise();if(!v||yt.getAllAccounts().length===0){const C=hw();await yt.loginRedirect(C);return}yt.setActiveAccount(v.account),Mn.value=yt.getActiveAccount(),Mn.value&&await r(Mn.value),Wo.value="updated"}catch(v){console.error("handleRedirect failed",v)}};async function f(){Wo.value="updating";try{const v=await yt.acquireTokenSilent({scopes:["https://graph.microsoft.com/.default","openid","profile"]});yt.setActiveAccount(v.account),await r(Mn.value),Wo.value="updated"}catch(v){console.error("Falha ao renovar token, forçando novo login.",v),Wo.value="error",await i()}}const g=async()=>{try{await yt.initialize(),localStorage.clear(),await yt.logoutRedirect({postLogoutRedirectUri:"/"})}catch(v){console.error("Logout error",v)}};c.watch(Mn,async(v,C)=>{var S,_,A;console.log("Account changed:",v),Wo.value!=="updated"&&((S=v==null?void 0:v.idTokenClaims)==null?void 0:S.exp)!==((_=C==null?void 0:C.idTokenClaims)==null?void 0:_.exp)&&(ji.value=((A=v==null?void 0:v.idTokenClaims)==null?void 0:A.exp)||null,ji.value&&Ds.value&&(Yi.value=(ji.value-Ds.value-120)*1e3,console.log("Expiration Timestamp:",ji.value),console.log("Current Timestamp:",Ds.value),console.log("Timeout Duration:",Yi.value),Yi.value>0&&setTimeout(async()=>{await f()},Yi.value)))},{immediate:!0});const m=c.computed(()=>e.value);return{isAuthenticated:t,authState:Wo,account:n,token:m,refreshToken:f,handleRedirect:i,logout:g,expirationTimestamp:ji,timeoutDuration:Yi,currentTimestamp:Ds}}function gw(r,e){return function(){return r.apply(e,arguments)}}const{toString:dL}=Object.prototype,{getPrototypeOf:Ph}=Object,Gc=(r=>e=>{const t=dL.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=r=>(r=r.toLowerCase(),e=>Gc(e)===r),jc=r=>e=>typeof e===r,{isArray:wi}=Array,Ca=jc("undefined");function hL(r){return r!==null&&!Ca(r)&&r.constructor!==null&&!Ca(r.constructor)&&an(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const mw=Kn("ArrayBuffer");function fL(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&mw(r.buffer),e}const gL=jc("string"),an=jc("function"),pw=jc("number"),Yc=r=>r!==null&&typeof r=="object",mL=r=>r===!0||r===!1,Qs=r=>{if(Gc(r)!=="object")return!1;const e=Ph(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},pL=Kn("Date"),vL=Kn("File"),yL=Kn("Blob"),CL=Kn("FileList"),wL=r=>Yc(r)&&an(r.pipe),_L=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||an(r.append)&&((e=Gc(r))==="formdata"||e==="object"&&an(r.toString)&&r.toString()==="[object FormData]"))},TL=Kn("URLSearchParams"),[EL,SL,AL,bL]=["ReadableStream","Request","Response","Headers"].map(Kn),IL=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ka(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),wi(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const s=t?Object.getOwnPropertyNames(r):Object.keys(r),l=s.length;let d;for(n=0;n<l;n++)d=s[n],e.call(null,r[d],d,r)}}function vw(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yw=r=>!Ca(r)&&r!==ho;function Od(){const{caseless:r}=yw(this)&&this||{},e={},t=(n,i)=>{const s=r&&vw(e,i)||i;Qs(e[s])&&Qs(n)?e[s]=Od(e[s],n):Qs(n)?e[s]=Od({},n):wi(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ka(arguments[n],t);return e}const kL=(r,e,t,{allOwnKeys:n}={})=>(ka(e,(i,s)=>{t&&an(i)?r[s]=gw(i,t):r[s]=i},{allOwnKeys:n}),r),RL=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),OL=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},NL=(r,e,t,n)=>{let i,s,l;const d={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)l=i[s],(!n||n(l,r,e))&&!d[l]&&(e[l]=r[l],d[l]=!0);r=t!==!1&&Ph(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},PL=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},ML=r=>{if(!r)return null;if(wi(r))return r;let e=r.length;if(!pw(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},xL=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Ph(Uint8Array)),DL=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(r,s[0],s[1])}},LL=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},BL=Kn("HTMLFormElement"),UL=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),Rp=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),VL=Kn("RegExp"),Cw=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};ka(t,(i,s)=>{let l;(l=e(i,s,r))!==!1&&(n[s]=l||i)}),Object.defineProperties(r,n)},FL=r=>{Cw(r,(e,t)=>{if(an(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(an(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},HL=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return wi(r)?n(r):n(String(r).split(e)),t},$L=()=>{},KL=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,zu="abcdefghijklmnopqrstuvwxyz",Op="0123456789",ww={DIGIT:Op,ALPHA:zu,ALPHA_DIGIT:zu+zu.toUpperCase()+Op},zL=(r=16,e=ww.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function WL(r){return!!(r&&an(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const qL=r=>{const e=new Array(10),t=(n,i)=>{if(Yc(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=wi(n)?[]:{};return ka(n,(l,d)=>{const f=t(l,i+1);!Ca(f)&&(s[d]=f)}),e[i]=void 0,s}}return n};return t(r,0)},GL=Kn("AsyncFunction"),jL=r=>r&&(Yc(r)||an(r))&&an(r.then)&&an(r.catch),_w=((r,e)=>r?setImmediate:e?((t,n)=>(ho.addEventListener("message",({source:i,data:s})=>{i===ho&&s===t&&n.length&&n.shift()()},!1),i=>{n.push(i),ho.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",an(ho.postMessage)),YL=typeof queueMicrotask<"u"?queueMicrotask.bind(ho):typeof process<"u"&&process.nextTick||_w,N={isArray:wi,isArrayBuffer:mw,isBuffer:hL,isFormData:_L,isArrayBufferView:fL,isString:gL,isNumber:pw,isBoolean:mL,isObject:Yc,isPlainObject:Qs,isReadableStream:EL,isRequest:SL,isResponse:AL,isHeaders:bL,isUndefined:Ca,isDate:pL,isFile:vL,isBlob:yL,isRegExp:VL,isFunction:an,isStream:wL,isURLSearchParams:TL,isTypedArray:xL,isFileList:CL,forEach:ka,merge:Od,extend:kL,trim:IL,stripBOM:RL,inherits:OL,toFlatObject:NL,kindOf:Gc,kindOfTest:Kn,endsWith:PL,toArray:ML,forEachEntry:DL,matchAll:LL,isHTMLForm:BL,hasOwnProperty:Rp,hasOwnProp:Rp,reduceDescriptors:Cw,freezeMethods:FL,toObjectSet:HL,toCamelCase:UL,noop:$L,toFiniteNumber:KL,findKey:vw,global:ho,isContextDefined:yw,ALPHABET:ww,generateString:zL,isSpecCompliantForm:WL,toJSONObject:qL,isAsyncFn:GL,isThenable:jL,setImmediate:_w,asap:YL};function ue(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}N.inherits(ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.status}}});const Tw=ue.prototype,Ew={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Ew[r]={value:r}});Object.defineProperties(ue,Ew);Object.defineProperty(Tw,"isAxiosError",{value:!0});ue.from=(r,e,t,n,i,s)=>{const l=Object.create(Tw);return N.toFlatObject(r,l,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),ue.call(l,r.message,e,t,n,i),l.cause=r,l.name=r.name,s&&Object.assign(l,s),l};const JL=null;function Nd(r){return N.isPlainObject(r)||N.isArray(r)}function Sw(r){return N.endsWith(r,"[]")?r.slice(0,-2):r}function Np(r,e,t){return r?r.concat(e).map(function(i,s){return i=Sw(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function QL(r){return N.isArray(r)&&!r.some(Nd)}const XL=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function Jc(r,e,t){if(!N.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=N.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(A,O){return!N.isUndefined(O[A])});const n=t.metaTokens,i=t.visitor||m,s=t.dots,l=t.indexes,f=(t.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function g(_){if(_===null)return"";if(N.isDate(_))return _.toISOString();if(!f&&N.isBlob(_))throw new ue("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(_)||N.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,A,O){let $=_;if(_&&!O&&typeof _=="object"){if(N.endsWith(A,"{}"))A=n?A:A.slice(0,-2),_=JSON.stringify(_);else if(N.isArray(_)&&QL(_)||(N.isFileList(_)||N.endsWith(A,"[]"))&&($=N.toArray(_)))return A=Sw(A),$.forEach(function(U,Q){!(N.isUndefined(U)||U===null)&&e.append(l===!0?Np([A],Q,s):l===null?A:A+"[]",g(U))}),!1}return Nd(_)?!0:(e.append(Np(O,A,s),g(_)),!1)}const v=[],C=Object.assign(XL,{defaultVisitor:m,convertValue:g,isVisitable:Nd});function S(_,A){if(!N.isUndefined(_)){if(v.indexOf(_)!==-1)throw Error("Circular reference detected in "+A.join("."));v.push(_),N.forEach(_,function($,V){(!(N.isUndefined($)||$===null)&&i.call(e,$,N.isString(V)?V.trim():V,A,C))===!0&&S($,A?A.concat(V):[V])}),v.pop()}}if(!N.isObject(r))throw new TypeError("data must be an object");return S(r),e}function Pp(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Mh(r,e){this._pairs=[],r&&Jc(r,this,e)}const Aw=Mh.prototype;Aw.append=function(e,t){this._pairs.push([e,t])};Aw.toString=function(e){const t=e?function(n){return e.call(this,n,Pp)}:Pp;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function ZL(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function bw(r,e,t){if(!e)return r;const n=t&&t.encode||ZL;N.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=N.isURLSearchParams(e)?e.toString():new Mh(e,t).toString(n),s){const l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class Mp{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){N.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Iw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eB=typeof URLSearchParams<"u"?URLSearchParams:Mh,tB=typeof FormData<"u"?FormData:null,nB=typeof Blob<"u"?Blob:null,rB={isBrowser:!0,classes:{URLSearchParams:eB,FormData:tB,Blob:nB},protocols:["http","https","file","blob","url","data"]},xh=typeof window<"u"&&typeof document<"u",Pd=typeof navigator=="object"&&navigator||void 0,oB=xh&&(!Pd||["ReactNative","NativeScript","NS"].indexOf(Pd.product)<0),iB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aB=xh&&window.location.href||"http://localhost",sB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xh,hasStandardBrowserEnv:oB,hasStandardBrowserWebWorkerEnv:iB,navigator:Pd,origin:aB},Symbol.toStringTag,{value:"Module"})),It={...sB,...rB};function cB(r,e){return Jc(r,new It.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return It.isNode&&N.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function lB(r){return N.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function uB(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n<i;n++)s=t[n],e[s]=r[s];return e}function kw(r){function e(t,n,i,s){let l=t[s++];if(l==="__proto__")return!0;const d=Number.isFinite(+l),f=s>=t.length;return l=!l&&N.isArray(i)?i.length:l,f?(N.hasOwnProp(i,l)?i[l]=[i[l],n]:i[l]=n,!d):((!i[l]||!N.isObject(i[l]))&&(i[l]=[]),e(t,n,i[l],s)&&N.isArray(i[l])&&(i[l]=uB(i[l])),!d)}if(N.isFormData(r)&&N.isFunction(r.entries)){const t={};return N.forEachEntry(r,(n,i)=>{e(lB(n),i,t,0)}),t}return null}function dB(r,e,t){if(N.isString(r))try{return(e||JSON.parse)(r),N.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Ra={transitional:Iw,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=N.isObject(e);if(s&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i?JSON.stringify(kw(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e)||N.isReadableStream(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return cB(e,this.formSerializer).toString();if((d=N.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Jc(d?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),dB(e)):e}],transformResponse:[function(e){const t=this.transitional||Ra.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(e)||N.isReadableStream(e))return e;if(e&&N.isString(e)&&(n&&!this.responseType||i)){const l=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(d){if(l)throw d.name==="SyntaxError"?ue.from(d,ue.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],r=>{Ra.headers[r]={}});const hB=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fB=r=>{const e={};let t,n,i;return r&&r.split(`
57
- `).forEach(function(l){i=l.indexOf(":"),t=l.substring(0,i).trim().toLowerCase(),n=l.substring(i+1).trim(),!(!t||e[t]&&hB[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},xp=Symbol("internals");function Ji(r){return r&&String(r).trim().toLowerCase()}function Xs(r){return r===!1||r==null?r:N.isArray(r)?r.map(Xs):String(r)}function gB(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const mB=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Wu(r,e,t,n,i){if(N.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!N.isString(e)){if(N.isString(n))return e.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(e)}}function pB(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function vB(r,e){const t=N.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,l){return this[n].call(this,e,i,s,l)},configurable:!0})})}class $t{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(d,f,g){const m=Ji(f);if(!m)throw new Error("header name must be a non-empty string");const v=N.findKey(i,m);(!v||i[v]===void 0||g===!0||g===void 0&&i[v]!==!1)&&(i[v||f]=Xs(d))}const l=(d,f)=>N.forEach(d,(g,m)=>s(g,m,f));if(N.isPlainObject(e)||e instanceof this.constructor)l(e,t);else if(N.isString(e)&&(e=e.trim())&&!mB(e))l(fB(e),t);else if(N.isHeaders(e))for(const[d,f]of e.entries())s(f,d,n);else e!=null&&s(t,e,n);return this}get(e,t){if(e=Ji(e),e){const n=N.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return gB(i);if(N.isFunction(t))return t.call(this,i,n);if(N.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ji(e),e){const n=N.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Wu(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function s(l){if(l=Ji(l),l){const d=N.findKey(n,l);d&&(!t||Wu(n,n[d],d,t))&&(delete n[d],i=!0)}}return N.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const s=t[n];(!e||Wu(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return N.forEach(this,(i,s)=>{const l=N.findKey(n,s);if(l){t[l]=Xs(i),delete t[s];return}const d=e?pB(s):String(s).trim();d!==s&&delete t[s],t[d]=Xs(i),n[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return N.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&N.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
58
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[xp]=this[xp]={accessors:{}}).accessors,i=this.prototype;function s(l){const d=Ji(l);n[d]||(vB(i,l),n[d]=!0)}return N.isArray(e)?e.forEach(s):s(e),this}}$t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors($t.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}});N.freezeMethods($t);function qu(r,e){const t=this||Ra,n=e||t,i=$t.from(n.headers);let s=n.data;return N.forEach(r,function(d){s=d.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Rw(r){return!!(r&&r.__CANCEL__)}function _i(r,e,t){ue.call(this,r??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}N.inherits(_i,ue,{__CANCEL__:!0});function Ow(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new ue("Request failed with status code "+t.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function yB(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function CB(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,l;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),m=n[s];l||(l=g),t[i]=f,n[i]=g;let v=s,C=0;for(;v!==i;)C+=t[v++],v=v%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),g-l<e)return;const S=m&&g-m;return S?Math.round(C*1e3/S):void 0}}function wB(r,e){let t=0,n=1e3/e,i,s;const l=(g,m=Date.now())=>{t=m,i=null,s&&(clearTimeout(s),s=null),r.apply(null,g)};return[(...g)=>{const m=Date.now(),v=m-t;v>=n?l(g,m):(i=g,s||(s=setTimeout(()=>{s=null,l(i)},n-v)))},()=>i&&l(i)]}const wc=(r,e,t=3)=>{let n=0;const i=CB(50,250);return wB(s=>{const l=s.loaded,d=s.lengthComputable?s.total:void 0,f=l-n,g=i(f),m=l<=d;n=l;const v={loaded:l,total:d,progress:d?l/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&m?(d-l)/g:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};r(v)},t)},Dp=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},Lp=r=>(...e)=>N.asap(()=>r(...e)),_B=It.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,It.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0,TB=It.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const l=[r+"="+encodeURIComponent(e)];N.isNumber(t)&&l.push("expires="+new Date(t).toGMTString()),N.isString(n)&&l.push("path="+n),N.isString(i)&&l.push("domain="+i),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function EB(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function SB(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function Nw(r,e){return r&&!EB(e)?SB(r,e):e}const Bp=r=>r instanceof $t?{...r}:r;function Co(r,e){e=e||{};const t={};function n(g,m,v,C){return N.isPlainObject(g)&&N.isPlainObject(m)?N.merge.call({caseless:C},g,m):N.isPlainObject(m)?N.merge({},m):N.isArray(m)?m.slice():m}function i(g,m,v,C){if(N.isUndefined(m)){if(!N.isUndefined(g))return n(void 0,g,v,C)}else return n(g,m,v,C)}function s(g,m){if(!N.isUndefined(m))return n(void 0,m)}function l(g,m){if(N.isUndefined(m)){if(!N.isUndefined(g))return n(void 0,g)}else return n(void 0,m)}function d(g,m,v){if(v in e)return n(g,m);if(v in r)return n(void 0,g)}const f={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d,headers:(g,m,v)=>i(Bp(g),Bp(m),v,!0)};return N.forEach(Object.keys(Object.assign({},r,e)),function(m){const v=f[m]||i,C=v(r[m],e[m],m);N.isUndefined(C)&&v!==d||(t[m]=C)}),t}const Pw=r=>{const e=Co({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:l,auth:d}=e;e.headers=l=$t.from(l),e.url=bw(Nw(e.baseURL,e.url),r.params,r.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(N.isFormData(t)){if(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((f=l.getContentType())!==!1){const[g,...m]=f?f.split(";").map(v=>v.trim()).filter(Boolean):[];l.setContentType([g||"multipart/form-data",...m].join("; "))}}if(It.hasStandardBrowserEnv&&(n&&N.isFunction(n)&&(n=n(e)),n||n!==!1&&_B(e.url))){const g=i&&s&&TB.read(s);g&&l.set(i,g)}return e},AB=typeof XMLHttpRequest<"u",bB=AB&&function(r){return new Promise(function(t,n){const i=Pw(r);let s=i.data;const l=$t.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:g}=i,m,v,C,S,_;function A(){S&&S(),_&&_(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let O=new XMLHttpRequest;O.open(i.method.toUpperCase(),i.url,!0),O.timeout=i.timeout;function $(){if(!O)return;const U=$t.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),se={data:!d||d==="text"||d==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:U,config:r,request:O};Ow(function(z){t(z),A()},function(z){n(z),A()},se),O=null}"onloadend"in O?O.onloadend=$:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout($)},O.onabort=function(){O&&(n(new ue("Request aborted",ue.ECONNABORTED,r,O)),O=null)},O.onerror=function(){n(new ue("Network Error",ue.ERR_NETWORK,r,O)),O=null},O.ontimeout=function(){let Q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const se=i.transitional||Iw;i.timeoutErrorMessage&&(Q=i.timeoutErrorMessage),n(new ue(Q,se.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,r,O)),O=null},s===void 0&&l.setContentType(null),"setRequestHeader"in O&&N.forEach(l.toJSON(),function(Q,se){O.setRequestHeader(se,Q)}),N.isUndefined(i.withCredentials)||(O.withCredentials=!!i.withCredentials),d&&d!=="json"&&(O.responseType=i.responseType),g&&([C,_]=wc(g,!0),O.addEventListener("progress",C)),f&&O.upload&&([v,S]=wc(f),O.upload.addEventListener("progress",v),O.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(m=U=>{O&&(n(!U||U.type?new _i(null,r,O):U),O.abort(),O=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const V=yB(i.url);if(V&&It.protocols.indexOf(V)===-1){n(new ue("Unsupported protocol "+V+":",ue.ERR_BAD_REQUEST,r));return}O.send(s||null)})},IB=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,i;const s=function(g){if(!i){i=!0,d();const m=g instanceof Error?g:this.reason;n.abort(m instanceof ue?m:new _i(m instanceof Error?m.message:m))}};let l=e&&setTimeout(()=>{l=null,s(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const d=()=>{r&&(l&&clearTimeout(l),l=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(s):g.removeEventListener("abort",s)}),r=null)};r.forEach(g=>g.addEventListener("abort",s));const{signal:f}=n;return f.unsubscribe=()=>N.asap(d),f}},kB=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let n=0,i;for(;n<t;)i=n+e,yield r.slice(n,i),n=i},RB=async function*(r,e){for await(const t of OB(r))yield*kB(t,e)},OB=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},Up=(r,e,t,n)=>{const i=RB(r,e);let s=0,l,d=f=>{l||(l=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:g,value:m}=await i.next();if(g){d(),f.close();return}let v=m.byteLength;if(t){let C=s+=v;t(C)}f.enqueue(new Uint8Array(m))}catch(g){throw d(g),g}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},Qc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Mw=Qc&&typeof ReadableStream=="function",NB=Qc&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),xw=(r,...e)=>{try{return!!r(...e)}catch{return!1}},PB=Mw&&xw(()=>{let r=!1;const e=new Request(It.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),Vp=64*1024,Md=Mw&&xw(()=>N.isReadableStream(new Response("").body)),_c={stream:Md&&(r=>r.body)};Qc&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!_c[e]&&(_c[e]=N.isFunction(r[e])?t=>t[e]():(t,n)=>{throw new ue(`Response type '${e}' is not supported`,ue.ERR_NOT_SUPPORT,n)})})})(new Response);const MB=async r=>{if(r==null)return 0;if(N.isBlob(r))return r.size;if(N.isSpecCompliantForm(r))return(await new Request(It.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(N.isArrayBufferView(r)||N.isArrayBuffer(r))return r.byteLength;if(N.isURLSearchParams(r)&&(r=r+""),N.isString(r))return(await NB(r)).byteLength},xB=async(r,e)=>{const t=N.toFiniteNumber(r.getContentLength());return t??MB(e)},DB=Qc&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:l,onDownloadProgress:d,onUploadProgress:f,responseType:g,headers:m,withCredentials:v="same-origin",fetchOptions:C}=Pw(r);g=g?(g+"").toLowerCase():"text";let S=IB([i,s&&s.toAbortSignal()],l),_;const A=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let O;try{if(f&&PB&&t!=="get"&&t!=="head"&&(O=await xB(m,n))!==0){let se=new Request(e,{method:"POST",body:n,duplex:"half"}),we;if(N.isFormData(n)&&(we=se.headers.get("content-type"))&&m.setContentType(we),se.body){const[z,tt]=Dp(O,wc(Lp(f)));n=Up(se.body,Vp,z,tt)}}N.isString(v)||(v=v?"include":"omit");const $="credentials"in Request.prototype;_=new Request(e,{...C,signal:S,method:t.toUpperCase(),headers:m.normalize().toJSON(),body:n,duplex:"half",credentials:$?v:void 0});let V=await fetch(_);const U=Md&&(g==="stream"||g==="response");if(Md&&(d||U&&A)){const se={};["status","statusText","headers"].forEach(Te=>{se[Te]=V[Te]});const we=N.toFiniteNumber(V.headers.get("content-length")),[z,tt]=d&&Dp(we,wc(Lp(d),!0))||[];V=new Response(Up(V.body,Vp,z,()=>{tt&&tt(),A&&A()}),se)}g=g||"text";let Q=await _c[N.findKey(_c,g)||"text"](V,r);return!U&&A&&A(),await new Promise((se,we)=>{Ow(se,we,{data:Q,headers:$t.from(V.headers),status:V.status,statusText:V.statusText,config:r,request:_})})}catch($){throw A&&A(),$&&$.name==="TypeError"&&/fetch/i.test($.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,r,_),{cause:$.cause||$}):ue.from($,$&&$.code,r,_)}}),xd={http:JL,xhr:bB,fetch:DB};N.forEach(xd,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Fp=r=>`- ${r}`,LB=r=>N.isFunction(r)||r===null||r===!1,Dw={getAdapter:r=>{r=N.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s<e;s++){t=r[s];let l;if(n=t,!LB(t)&&(n=xd[(l=String(t)).toLowerCase()],n===void 0))throw new ue(`Unknown adapter '${l}'`);if(n)break;i[l||"#"+s]=n}if(!n){const s=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=e?s.length>1?`since :
59
- `+s.map(Fp).join(`
60
- `):" "+Fp(s[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n},adapters:xd};function Gu(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new _i(null,r)}function Hp(r){return Gu(r),r.headers=$t.from(r.headers),r.data=qu.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Dw.getAdapter(r.adapter||Ra.adapter)(r).then(function(n){return Gu(r),n.data=qu.call(r,r.transformResponse,n),n.headers=$t.from(n.headers),n},function(n){return Rw(n)||(Gu(r),n&&n.response&&(n.response.data=qu.call(r,r.transformResponse,n.response),n.response.headers=$t.from(n.response.headers))),Promise.reject(n)})}const Lw="1.7.9",Xc={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{Xc[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const $p={};Xc.transitional=function(e,t,n){function i(s,l){return"[Axios v"+Lw+"] Transitional option '"+s+"'"+l+(n?". "+n:"")}return(s,l,d)=>{if(e===!1)throw new ue(i(l," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!$p[l]&&($p[l]=!0,console.warn(i(l," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,l,d):!0}};Xc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function BB(r,e,t){if(typeof r!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],l=e[s];if(l){const d=r[s],f=d===void 0||l(d,s,r);if(f!==!0)throw new ue("option "+s+" must be "+f,ue.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ue("Unknown option "+s,ue.ERR_BAD_OPTION)}}const Zs={assertOptions:BB,validators:Xc},jn=Zs.validators;class go{constructor(e){this.defaults=e,this.interceptors={request:new Mp,response:new Mp}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
61
- `+s):n.stack=s}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Co(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&Zs.assertOptions(n,{silentJSONParsing:jn.transitional(jn.boolean),forcedJSONParsing:jn.transitional(jn.boolean),clarifyTimeoutError:jn.transitional(jn.boolean)},!1),i!=null&&(N.isFunction(i)?t.paramsSerializer={serialize:i}:Zs.assertOptions(i,{encode:jn.function,serialize:jn.function},!0)),Zs.assertOptions(t,{baseUrl:jn.spelling("baseURL"),withXsrfToken:jn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let l=s&&N.merge(s.common,s[t.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],_=>{delete s[_]}),t.headers=$t.concat(l,s);const d=[];let f=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(t)===!1||(f=f&&A.synchronous,d.unshift(A.fulfilled,A.rejected))});const g=[];this.interceptors.response.forEach(function(A){g.push(A.fulfilled,A.rejected)});let m,v=0,C;if(!f){const _=[Hp.bind(this),void 0];for(_.unshift.apply(_,d),_.push.apply(_,g),C=_.length,m=Promise.resolve(t);v<C;)m=m.then(_[v++],_[v++]);return m}C=d.length;let S=t;for(v=0;v<C;){const _=d[v++],A=d[v++];try{S=_(S)}catch(O){A.call(this,O);break}}try{m=Hp.call(this,S)}catch(_){return Promise.reject(_)}for(v=0,C=g.length;v<C;)m=m.then(g[v++],g[v++]);return m}getUri(e){e=Co(this.defaults,e);const t=Nw(e.baseURL,e.url);return bw(t,e.params,e.paramsSerializer)}}N.forEach(["delete","get","head","options"],function(e){go.prototype[e]=function(t,n){return this.request(Co(n||{},{method:e,url:t,data:(n||{}).data}))}});N.forEach(["post","put","patch"],function(e){function t(n){return function(s,l,d){return this.request(Co(d||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}go.prototype[e]=t(),go.prototype[e+"Form"]=t(!0)});class Dh{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const l=new Promise(d=>{n.subscribe(d),s=d}).then(i);return l.cancel=function(){n.unsubscribe(s)},l},e(function(s,l,d){n.reason||(n.reason=new _i(s,l,d),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Dh(function(i){e=i}),cancel:e}}}function UB(r){return function(t){return r.apply(null,t)}}function VB(r){return N.isObject(r)&&r.isAxiosError===!0}const Dd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Dd).forEach(([r,e])=>{Dd[e]=r});function Bw(r){const e=new go(r),t=gw(go.prototype.request,e);return N.extend(t,go.prototype,e,{allOwnKeys:!0}),N.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Bw(Co(r,i))},t}const Ke=Bw(Ra);Ke.Axios=go;Ke.CanceledError=_i;Ke.CancelToken=Dh;Ke.isCancel=Rw;Ke.VERSION=Lw;Ke.toFormData=Jc;Ke.AxiosError=ue;Ke.Cancel=Ke.CanceledError;Ke.all=function(e){return Promise.all(e)};Ke.spread=UB;Ke.isAxiosError=VB;Ke.mergeConfig=Co;Ke.AxiosHeaders=$t;Ke.formToJSON=r=>kw(N.isHTMLForm(r)?new FormData(r):r);Ke.getAdapter=Dw.getAdapter;Ke.HttpStatusCode=Dd;Ke.default=Ke;const FB={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-DWaM2TVa.js")),meta:{requiresAuth:!1}},HB={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-DmDcsRtX.js")),meta:{requiresAuth:!1}},{isAuthenticated:Kp,handleRedirect:$B}=qc(),KB=Zc();function zB(r,e){r.addRoute(FB),r.addRoute(HB),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!Kp.value){ie.value=!0;try{await $B(e),await KB.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}Kp.value&&i()})}const{jToken:zp}=fw();qc();const Lh=()=>{const r=Ke.create({headers:{"Content-Type":"application/json"}});c.watch(zp,i=>{r.interceptors.request.use(s=>(i&&(s.headers.Authorization=`Bearer ${i}`),s))},{immediate:!0});let e=1;r.interceptors.response.use(async i=>i,async i=>{var s;if(i.config&&i.config.headers){const l=i.config;if(((s=i.response)==null?void 0:s.status)===401&&e>0){e--;try{return l.headers.Authorization=`Bearer ${zp.value}`,await r(l)}catch(d){return Promise.reject(d)}}}return Promise.reject(i)});async function t({url:i,method:s,header:l={},body:d,baseURL:f}){try{return f&&(r.defaults.baseURL=f),(await r({url:i,method:s,headers:l,data:d})).data}catch(g){if(console.error(`Request error [${s} ${i}]:`,g),Ke.isAxiosError(g)){const{response:m,message:v}=g;throw new Error(`Axios error: ${v}, Status: ${m==null?void 0:m.status}, URL: ${i}`)}throw g}}async function n({url:i,method:s,header:l,body:d,baseURL:f}){try{f&&(r.defaults.baseURL=f);const g=await r({url:i,method:s,headers:l,data:d});return{status:g.status,header:g.headers,body:g.data}}catch(g){if(Ke.isAxiosError(g)){const{response:m,message:v}=g;console.error(`Raw Request Error: ${v}, Status: ${m==null?void 0:m.status}`)}return Promise.reject(g)}}return Object.assign(r,{_request:t,rawRequest:n})},{request:Wp}=Lh(),qp=c.ref(null),Gp=c.ref("default"),ju=c.ref(null),Yu=c.ref({scope_type:"org"});function Zc(){var C,S;const{handleRedirect:r,account:e,logout:t}=qc(),n=(S=(C=e.value)==null?void 0:C.idTokenClaims)==null?void 0:S.domain,i=c.computed(()=>({domain:n,environment:Gp.value,...Yu.value})),s=c.computed(()=>Yu.value);async function l(){var _;(!e.value||!((_=e.value.idTokenClaims)!=null&&_.email))&&await r();try{await d(),await f()}catch{}}async function d(){var _,A;try{const O=(A=(_=e.value)==null?void 0:_.idTokenClaims)==null?void 0:A.email;if(!O)throw new Error("Email is undefined");const $=await Wp({url:`https://api.jplan.com.br/platform/user/profile/?email=${O}`,method:"GET"});ju.value=$.data??null}catch(O){console.error("Failed to fetch user profile:",O)}}async function f(){var _;try{if(!((_=ju.value)!=null&&_.email))throw new Error("User email is undefined");const A=await Wp({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});qp.value=A.data??[]}catch(A){console.error("Failed to fetch user domains:",A)}}function g(_){Yu.value=_}function m(_){Gp.value=_,g(i.value)}async function v(_){const A=hw({request_domain:_});await yt.loginRedirect(A)}return{__init__:l,user:ju,userDomains:qp,setEnv:m,setScope:g,changeDomain:v,session:i,scope:s,logout:t}}var Ls=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function WB(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var na={exports:{}};/**
54
+ Error Description: ${l.message}`)}return null}return n||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),n=St.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),n}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(t=>t&&ye.getDomainFromUrl(t).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let n;if(t&&t.azureCloudInstance!==Xd.None){const i=t.tenant?t.tenant:P.DEFAULT_COMMON_TENANT;n=`${t.azureCloudInstance}/${i}/`}return n||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return P.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw B(vr)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return cC.has(e)}static isPublicCloudAuthority(e){return P.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,n){const i=new ye(e);i.validateAsUri();const s=i.getUrlComponents();let l=`${t}.${s.HostNameAndPort}`;this.isPublicCloudAuthority(s.HostNameAndPort)&&(l=`${t}.${P.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const d=ye.constructAuthorityUriFromObject({...i.getUrlComponents(),HostNameAndPort:l}).urlString;return n?`${d}?${n}`:d}static replaceWithRegionalInformation(e,t){const n={...e};return n.authorization_endpoint=St.buildRegionalAuthorityString(n.authorization_endpoint,t),n.token_endpoint=St.buildRegionalAuthorityString(n.token_endpoint,t),n.end_session_endpoint&&(n.end_session_endpoint=St.buildRegionalAuthorityString(n.end_session_endpoint,t)),n}static transformCIAMAuthority(e){let t=e;const i=new ye(e).getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(P.CIAM_AUTH_URL)){const s=i.HostNameAndPort.split(".")[0];t=`${t}${s}${P.AAD_TENANT_DOMAIN_SUFFIX}`}return t}}St.reservedTenantDomains=new Set(["{tenant}","{tenantid}",zr.COMMON,zr.CONSUMERS,zr.ORGANIZATIONS]);function mx(r){var i;const n=(i=new ye(r).getUrlComponents().PathSegments.slice(-1)[0])==null?void 0:i.toLowerCase();switch(n){case zr.COMMON:case zr.ORGANIZATIONS:case zr.CONSUMERS:return;default:return n}}function hC(r){return r.endsWith(P.FORWARD_SLASH)?r:`${r}${P.FORWARD_SLASH}`}function px(r){const e=r.cloudDiscoveryMetadata;let t;if(e)try{t=JSON.parse(e)}catch{throw Pe(nh)}return{canonicalAuthority:r.authority?hC(r.authority):void 0,knownAuthorities:r.knownAuthorities,cloudDiscoveryMetadata:t}}/*! @azure/msal-common v14.16.0 2024-11-05 */async function fC(r,e,t,n,i,s,l){l==null||l.addQueueMeasurement(k.AuthorityFactoryCreateDiscoveredInstance,s);const d=St.transformCIAMAuthority(hC(r)),f=new St(d,e,t,n,i,s,l);try{return await F(f.resolveEndpointsAsync.bind(f),k.AuthorityResolveEndpointsAsync,i,l,s)(),f}catch{throw B(vr)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Gr extends He{constructor(e,t,n,i,s){super(e,t,n),this.name="ServerError",this.errorNo=i,this.status=s,Object.setPrototypeOf(this,Gr.prototype)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Jn{static generateThrottlingStorageKey(e){return`${ca.THROTTLING_PREFIX}.${JSON.stringify(e)}`}static preProcess(e,t){var s;const n=Jn.generateThrottlingStorageKey(t),i=e.getThrottlingCache(n);if(i){if(i.throttleTime<Date.now()){e.removeItem(n);return}throw new Gr(((s=i.errorCodes)==null?void 0:s.join(" "))||P.EMPTY_STRING,i.errorMessage,i.subError)}}static postProcess(e,t,n){if(Jn.checkResponseStatus(n)||Jn.checkResponseForRetryAfter(n)){const i={throttleTime:Jn.calculateThrottleTime(parseInt(n.headers[Pt.RETRY_AFTER])),error:n.body.error,errorCodes:n.body.error_codes,errorMessage:n.body.error_description,subError:n.body.suberror};e.setThrottlingCache(Jn.generateThrottlingStorageKey(t),i)}}static checkResponseStatus(e){return e.status===429||e.status>=500&&e.status<600}static checkResponseForRetryAfter(e){return e.headers?e.headers.hasOwnProperty(Pt.RETRY_AFTER)&&(e.status<200||e.status>=300):!1}static calculateThrottleTime(e){const t=e<=0?0:e,n=Date.now()/1e3;return Math.floor(Math.min(n+(t||ca.DEFAULT_THROTTLE_TIME_SECONDS),n+ca.DEFAULT_MAX_THROTTLE_TIME_SECONDS)*1e3)}static removeThrottle(e,t,n,i){const s={clientId:t,authority:n.authority,scopes:n.scopes,homeAccountIdentifier:i,claims:n.claims,authenticationScheme:n.authenticationScheme,resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,sshKid:n.sshKid},l=this.generateThrottlingStorageKey(s);e.removeItem(l)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Dc extends He{constructor(e,t,n){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,Dc.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=n}}function up(r,e,t){return new Dc(r,e,t)}/*! @azure/msal-common v14.16.0 2024-11-05 */class lh{constructor(e,t){this.config=bM(e),this.logger=new qr(this.config.loggerOptions,$y,Qd),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[Pt.CONTENT_TYPE]=P.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case on.HOME_ACCOUNT_ID:try{const n=ai(e.credential);t[Pt.CCS_HEADER]=`Oid:${n.uid}@${n.utid}`}catch(n){this.logger.verbose("Could not parse home account ID for CCS Header: "+n)}break;case on.UPN:t[Pt.CCS_HEADER]=`UPN: ${e.credential}`;break}return t}async executePostToTokenEndpoint(e,t,n,i,s,l){var f;l&&((f=this.performanceClient)==null||f.addQueueMeasurement(l,s));const d=await this.sendPostRequest(i,e,{body:t,headers:n},s);return this.config.serverTelemetryManager&&d.status<500&&d.status!==429&&this.config.serverTelemetryManager.clearTelemetryCache(),d}async sendPostRequest(e,t,n,i){var l,d,f;Jn.preProcess(this.cacheManager,e);let s;try{s=await F(this.networkClient.sendPostRequestAsync.bind(this.networkClient),k.NetworkClientSendPostRequestAsync,this.logger,this.performanceClient,i)(t,n);const g=s.headers||{};(d=this.performanceClient)==null||d.addFields({refreshTokenSize:((l=s.body.refresh_token)==null?void 0:l.length)||0,httpVerToken:g[Pt.X_MS_HTTP_VERSION]||"",requestId:g[Pt.X_MS_REQUEST_ID]||""},i)}catch(g){if(g instanceof Dc){const m=g.responseHeaders;throw m&&((f=this.performanceClient)==null||f.addFields({httpVerToken:m[Pt.X_MS_HTTP_VERSION]||"",requestId:m[Pt.X_MS_REQUEST_ID]||"",contentTypeHeader:m[Pt.CONTENT_TYPE]||void 0,contentLengthHeader:m[Pt.CONTENT_LENGTH]||void 0,httpStatus:g.httpStatus},i)),g.error}throw g instanceof He?g:B(Iy)}return Jn.postProcess(this.cacheManager,e,s),s}async updateAuthority(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.UpdateTokenEndpointAuthority,t);const n=`https://${e}/${this.authority.tenant}/`,i=await fC(n,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=i}createTokenQueryParameters(e){const t=new la(e.correlationId,this.performanceClient);return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenQueryParameters&&t.addExtraQueryParameters(e.tokenQueryParameters),t.addCorrelationId(e.correlationId),t.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */const fc="no_tokens_found",gC="native_account_unavailable",uh="refresh_token_expired",vx="interaction_required",yx="consent_required",Cx="login_required",Lc="bad_token";/*! @azure/msal-common v14.16.0 2024-11-05 */const dp=[vx,yx,Cx,Lc],wx=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],_x={[fc]:"No refresh token found in the cache. Please sign-in.",[gC]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[uh]:"Refresh token has expired.",[Lc]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve."};class Fn extends He{constructor(e,t,n,i,s,l,d,f){super(e,t,n),Object.setPrototypeOf(this,Fn.prototype),this.timestamp=i||P.EMPTY_STRING,this.traceId=s||P.EMPTY_STRING,this.correlationId=l||P.EMPTY_STRING,this.claims=d||P.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=f}}function hp(r,e,t){const n=!!r&&dp.indexOf(r)>-1,i=!!t&&wx.indexOf(t)>-1,s=!!e&&dp.some(l=>e.indexOf(l)>-1);return n||s||i}function pd(r){return new Fn(r,_x[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class Vn{static setRequestState(e,t,n){const i=Vn.generateLibraryState(e,n);return t?`${i}${P.RESOURCE_DELIM}${t}`:i}static generateLibraryState(e,t){if(!e)throw B(dd);const n={id:e.createNewGuid()};t&&(n.meta=t);const i=JSON.stringify(n);return e.base64Encode(i)}static parseRequestState(e,t){if(!e)throw B(dd);if(!t)throw B(fi);try{const n=t.split(P.RESOURCE_DELIM),i=n[0],s=n.length>1?n.slice(1).join(P.RESOURCE_DELIM):P.EMPTY_STRING,l=e.base64Decode(i),d=JSON.parse(l);return{userRequestState:s||P.EMPTY_STRING,libraryState:d}}catch{throw B(fi)}}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Tx={SW:"sw",UHW:"uhw"};class mi{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.PopTokenGenerateCnf,e.correlationId);const n=await F(this.generateKid.bind(this),k.PopTokenGenerateCnf,t,this.performanceClient,e.correlationId)(e),i=this.cryptoUtils.base64UrlEncode(JSON.stringify(n));return{kid:n.kid,reqCnfString:i}}async generateKid(e){var n;return(n=this.performanceClient)==null||n.addQueueMeasurement(k.PopTokenGenerateKid,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:Tx.SW}}async signPopToken(e,t,n){return this.signPayload(e,t,n)}async signPayload(e,t,n,i){const{resourceRequestMethod:s,resourceRequestUri:l,shrClaims:d,shrNonce:f,shrOptions:g}=n,m=l?new ye(l):void 0,v=m==null?void 0:m.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:or(),m:s==null?void 0:s.toUpperCase(),u:v==null?void 0:v.HostNameAndPort,nonce:f||this.cryptoUtils.createNewGuid(),p:v==null?void 0:v.AbsolutePath,q:v!=null&&v.QueryString?[[],v.QueryString]:void 0,client_claims:d||void 0,...i},t,g,n.correlationId)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class Ex{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}/*! @azure/msal-common v14.16.0 2024-11-05 */function Sx(r){var n,i;const e="code=",t=(n=r.error_uri)==null?void 0:n.lastIndexOf(e);return t&&t>=0?(i=r.error_uri)==null?void 0:i.substring(t+e.length):void 0}class po{constructor(e,t,n,i,s,l,d){this.clientId=e,this.cacheStorage=t,this.cryptoObj=n,this.logger=i,this.serializableCache=s,this.persistencePlugin=l,this.performanceClient=d}validateServerAuthorizationCodeResponse(e,t){if(!e.state||!t)throw e.state?B(sc,"Cached State"):B(sc,"Server State");let n,i;try{n=decodeURIComponent(e.state)}catch{throw B(fi,e.state)}try{i=decodeURIComponent(t)}catch{throw B(fi,e.state)}if(n!==i)throw B(Oy);if(e.error||e.error_description||e.suberror){const s=Sx(e);throw hp(e.error,e.error_description,e.suberror)?new Fn(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",s):new Gr(e.error||"",e.error_description,e.suberror,s)}}validateTokenResponse(e,t){var n;if(e.error||e.error_description||e.suberror){const i=`Error(s): ${e.error_codes||P.NOT_AVAILABLE} - Timestamp: ${e.timestamp||P.NOT_AVAILABLE} - Description: ${e.error_description||P.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||P.NOT_AVAILABLE} - Trace ID: ${e.trace_id||P.NOT_AVAILABLE}`,s=(n=e.error_codes)!=null&&n.length?e.error_codes[0]:void 0,l=new Gr(e.error,i,e.suberror,s,e.status);if(t&&e.status&&e.status>=As.SERVER_ERROR_RANGE_START&&e.status<=As.SERVER_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.
55
+ ${l}`);return}else if(t&&e.status&&e.status>=As.CLIENT_ERROR_RANGE_START&&e.status<=As.CLIENT_ERROR_RANGE_END){this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.
56
+ ${l}`);return}throw hp(e.error,e.error_description,e.suberror)?new Fn(e.error,e.error_description,e.suberror,e.timestamp||P.EMPTY_STRING,e.trace_id||P.EMPTY_STRING,e.correlation_id||P.EMPTY_STRING,e.claims||P.EMPTY_STRING,s):l}}async handleServerTokenResponse(e,t,n,i,s,l,d,f,g){var _;(_=this.performanceClient)==null||_.addQueueMeasurement(k.HandleServerTokenResponse,e.correlation_id);let m;if(e.id_token){if(m=wo(e.id_token||P.EMPTY_STRING,this.cryptoObj.base64Decode),s&&s.nonce&&m.nonce!==s.nonce)throw B(Ny);if(i.maxAge||i.maxAge===0){const b=m.auth_time;if(!b)throw B(Gd);Ky(b,i.maxAge)}}this.homeAccountIdentifier=at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,m);let v;s&&s.state&&(v=Vn.parseRequestState(this.cryptoObj,s.state)),e.key_id=e.key_id||i.sshKid||void 0;const C=this.generateCacheRecord(e,t,n,i,m,l,s);let S;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),S=new Ex(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(S)),d&&!f&&C.account){const b=C.account.generateAccountKey();if(!this.cacheStorage.getAccount(b,this.logger))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,v,void 0,g)}await this.cacheStorage.saveCacheRecord(C,i.storeInCache,i.correlationId)}finally{this.persistencePlugin&&this.serializableCache&&S&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(S))}return po.generateAuthenticationResult(this.cryptoObj,t,C,!1,i,m,v,e,g)}generateCacheRecord(e,t,n,i,s,l,d){const f=t.getPreferredCache();if(!f)throw B(Yd);const g=iC(s);let m,v;e.id_token&&s&&(m=Nc(this.homeAccountIdentifier,f,e.id_token,this.clientId,g||""),v=dh(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,s,e.client_info,f,g,d,void 0,this.logger));let C=null;if(e.access_token){const b=e.scope?Je.fromString(e.scope):new Je(i.scopes||[]),O=(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,$=(typeof e.ext_expires_in=="string"?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,V=(typeof e.refresh_in=="string"?parseInt(e.refresh_in,10):e.refresh_in)||void 0,U=n+O,Q=U+$,se=V&&V>0?n+V:void 0;C=Pc(this.homeAccountIdentifier,f,e.access_token,this.clientId,g||t.tenant||"",b.printScopes(),U,Q,this.cryptoObj.base64Decode,se,e.token_type,l,e.key_id,i.claims,i.requestedClaimsHash)}let S=null;if(e.refresh_token){let b;if(e.refresh_token_expires_in){const O=typeof e.refresh_token_expires_in=="string"?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in;b=n+O}S=zy(this.homeAccountIdentifier,f,e.refresh_token,this.clientId,e.foci,l,b)}let _=null;return e.foci&&(_={clientId:this.clientId,environment:f,familyId:e.foci}),{account:v,idToken:m,accessToken:C,refreshToken:S,appMetadata:_}}static async generateAuthenticationResult(e,t,n,i,s,l,d,f,g){var U,Q,se,we,z;let m=P.EMPTY_STRING,v=[],C=null,S,_,b=P.EMPTY_STRING;if(n.accessToken){if(n.accessToken.tokenType===Oe.POP&&!s.popKid){const tt=new mi(e),{secret:Te,keyId:j}=n.accessToken;if(!j)throw B(Jd);m=await tt.signPopToken(Te,j,s)}else m=n.accessToken.secret;v=Je.fromString(n.accessToken.target).asArray(),C=new Date(Number(n.accessToken.expiresOn)*1e3),S=new Date(Number(n.accessToken.extendedExpiresOn)*1e3),n.accessToken.refreshOn&&(_=new Date(Number(n.accessToken.refreshOn)*1e3))}n.appMetadata&&(b=n.appMetadata.familyId===sa?sa:"");const O=(l==null?void 0:l.oid)||(l==null?void 0:l.sub)||"",$=(l==null?void 0:l.tid)||"";f!=null&&f.spa_accountid&&n.account&&(n.account.nativeAccountId=f==null?void 0:f.spa_accountid);const V=n.account?ih(n.account.getAccountInfo(),void 0,l,(U=n.idToken)==null?void 0:U.secret):null;return{authority:t.canonicalAuthority,uniqueId:O,tenantId:$,scopes:v,account:V,idToken:((Q=n==null?void 0:n.idToken)==null?void 0:Q.secret)||"",idTokenClaims:l||{},accessToken:m,fromCache:i,expiresOn:C,extExpiresOn:S,refreshOn:_,correlationId:s.correlationId,requestId:g||P.EMPTY_STRING,familyId:b,tokenType:((se=n.accessToken)==null?void 0:se.tokenType)||P.EMPTY_STRING,state:d?d.userRequestState:P.EMPTY_STRING,cloudGraphHostName:((we=n.account)==null?void 0:we.cloudGraphHostName)||P.EMPTY_STRING,msGraphHost:((z=n.account)==null?void 0:z.msGraphHost)||P.EMPTY_STRING,code:f==null?void 0:f.spa_code,fromNativeBroker:!1}}}function dh(r,e,t,n,i,s,l,d,f,g,m){m==null||m.verbose("setCachedAccount called");const C=r.getAccountKeys().find($=>$.startsWith(t));let S=null;C&&(S=r.getAccount(C,m));const _=S||at.createAccount({homeAccountId:t,idTokenClaims:i,clientInfo:s,environment:l,cloudGraphHostName:f==null?void 0:f.cloud_graph_host_name,msGraphHost:f==null?void 0:f.msgraph_host,nativeAccountId:g},e,n),b=_.tenantProfiles||[],O=d||_.realm;if(O&&!b.find($=>$.tenantId===O)){const $=oh(t,_.localAccountId,O,i);b.push($)}return _.tenantProfiles=b,_}/*! @azure/msal-common v14.16.0 2024-11-05 */async function mC(r,e,t){return typeof r=="string"?r:r({clientId:e,tokenEndpoint:t})}/*! @azure/msal-common v14.16.0 2024-11-05 */class pC extends lh{constructor(e,t){var n;super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=(n=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:n.defaultScopes}async getAuthCodeUrl(e){var n;(n=this.performanceClient)==null||n.addQueueMeasurement(k.GetAuthCodeUrl,e.correlationId);const t=await F(this.createAuthCodeUrlQueryString.bind(this),k.AuthClientCreateQueryString,this.logger,this.performanceClient,e.correlationId)(e);return ye.appendQueryString(this.authority.authorizationEndpoint,t)}async acquireToken(e,t){var d,f;if((d=this.performanceClient)==null||d.addQueueMeasurement(k.AuthClientAcquireToken,e.correlationId),!e.code)throw B(xy);const n=or(),i=await F(this.executeTokenRequest.bind(this),k.AuthClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(this.authority,e),s=(f=i.headers)==null?void 0:f[Pt.X_MS_REQUEST_ID],l=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return l.validateTokenResponse(i.body),F(l.handleServerTokenResponse.bind(l),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(i.body,this.authority,n,e,t,void 0,void 0,void 0,s)}handleFragmentResponse(e,t){if(new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,null,null).validateServerAuthorizationCodeResponse(e,t),!e.code)throw B(Vy);return e}getLogoutUri(e){if(!e)throw Pe(Qy);const t=this.createLogoutUrlQueryString(e);return ye.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){var g,m;(g=this.performanceClient)==null||g.addQueueMeasurement(k.AuthClientExecuteTokenRequest,t.correlationId);const n=this.createTokenQueryParameters(t),i=ye.appendQueryString(e.tokenEndpoint,n),s=await F(this.createTokenRequestBody.bind(this),k.AuthClientCreateTokenRequestBody,this.logger,this.performanceClient,t.correlationId)(t);let l;if(t.clientInfo)try{const v=lc(t.clientInfo,this.cryptoUtils.base64Decode);l={credential:`${v.uid}${bt.CLIENT_INFO_SEPARATOR}${v.utid}`,type:on.HOME_ACCOUNT_ID}}catch(v){this.logger.verbose("Could not parse client info for CCS Header: "+v)}const d=this.createTokenRequestHeaders(l||t.ccsCredential),f={clientId:((m=t.tokenBodyParameters)==null?void 0:m.clientId)||this.config.authOptions.clientId,authority:e.canonicalAuthority,scopes:t.scopes,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid};return F(this.executePostToTokenEndpoint.bind(this),k.AuthorizationCodeClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,t.correlationId)(i,s,d,f,t.correlationId,k.AuthorizationCodeClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s;(i=this.performanceClient)==null||i.addQueueMeasurement(k.AuthClientCreateTokenRequestBody,e.correlationId);const t=new la(e.correlationId,this.performanceClient);if(t.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||this.config.authOptions.clientId),this.includeRedirectUri?t.addRedirectUri(e.redirectUri):Xo.validateRedirectUri(e.redirectUri),t.addScopes(e.scopes,!0,this.oidcDefaultScopes),t.addAuthorizationCode(e.code),t.addLibraryInfo(this.config.libraryInfo),t.addApplicationTelemetry(this.config.telemetry.application),t.addThrottling(),this.serverTelemetryManager&&!gd(this.config)&&t.addServerTelemetry(this.serverTelemetryManager),e.codeVerifier&&t.addCodeVerifier(e.codeVerifier),this.config.clientCredentials.clientSecret&&t.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const l=this.config.clientCredentials.clientAssertion;t.addClientAssertion(await mC(l.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),t.addClientAssertionType(l.assertionType)}if(t.addGrantType(Ey.AUTHORIZATION_CODE_GRANT),t.addClientInfo(),e.authenticationScheme===Oe.POP){const l=new mi(this.cryptoUtils,this.performanceClient);let d;e.popKid?d=this.cryptoUtils.encodeKid(e.popKid):d=(await F(l.generateCnf.bind(l),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,t.addPopToken(d)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)t.addSshJwk(e.sshJwk);else throw Pe(Mc);(!Un.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&t.addClaims(e.claims,this.config.authOptions.clientCapabilities);let n;if(e.clientInfo)try{const l=lc(e.clientInfo,this.cryptoUtils.base64Decode);n={credential:`${l.uid}${bt.CLIENT_INFO_SEPARATOR}${l.utid}`,type:on.HOME_ACCOUNT_ID}}catch(l){this.logger.verbose("Could not parse client info for CCS Header: "+l)}else n=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&n)switch(n.type){case on.HOME_ACCOUNT_ID:try{const l=ai(n.credential);t.addCcsOid(l)}catch(l){this.logger.verbose("Could not parse home account ID for CCS Header: "+l)}break;case on.UPN:t.addCcsUpn(n.credential);break}return e.embeddedClientId&&t.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&t.addExtraQueryParameters(e.tokenBodyParameters),e.enableSpaAuthorizationCode&&(!e.tokenBodyParameters||!e.tokenBodyParameters[lp])&&t.addExtraQueryParameters({[lp]:"1"}),t.createQueryString()}async createAuthCodeUrlQueryString(e){var s,l;const t=e.correlationId||this.config.cryptoInterface.createNewGuid();(s=this.performanceClient)==null||s.addQueueMeasurement(k.AuthClientCreateQueryString,t);const n=new la(t,this.performanceClient);n.addClientId(e.embeddedClientId||((l=e.extraQueryParameters)==null?void 0:l[mo])||this.config.authOptions.clientId);const i=[...e.scopes||[],...e.extraScopesToConsent||[]];if(n.addScopes(i,!0,this.oidcDefaultScopes),n.addRedirectUri(e.redirectUri),n.addCorrelationId(t),n.addResponseMode(e.responseMode),n.addResponseTypeCode(),n.addLibraryInfo(this.config.libraryInfo),gd(this.config)||n.addApplicationTelemetry(this.config.telemetry.application),n.addClientInfo(),e.codeChallenge&&e.codeChallengeMethod&&n.addCodeChallengeParams(e.codeChallenge,e.codeChallengeMethod),e.prompt&&n.addPrompt(e.prompt),e.domainHint&&n.addDomainHint(e.domainHint),e.prompt!==dt.SELECT_ACCOUNT)if(e.sid&&e.prompt===dt.NONE)this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),n.addSid(e.sid);else if(e.account){const d=this.extractAccountSid(e.account);let f=this.extractLoginHint(e.account);if(f&&e.domainHint&&(this.logger.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),f=null),f){this.logger.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),n.addLoginHint(f);try{const g=ai(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(d&&e.prompt===dt.NONE){this.logger.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),n.addSid(d);try{const g=ai(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e.loginHint)this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint);else if(e.account.username){this.logger.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),n.addLoginHint(e.account.username);try{const g=ai(e.account.homeAccountId);n.addCcsOid(g)}catch{this.logger.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else e.loginHint&&(this.logger.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),n.addLoginHint(e.loginHint),n.addCcsUpn(e.loginHint));else this.logger.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");if(e.nonce&&n.addNonce(e.nonce),e.state&&n.addState(e.state),(e.claims||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),this.addExtraQueryParams(e,n),e.nativeBroker&&(n.addNativeBroker(),e.authenticationScheme===Oe.POP)){const d=new mi(this.cryptoUtils);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await F(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}return n.createQueryString()}createLogoutUrlQueryString(e){const t=new la(e.correlationId,this.performanceClient);return e.postLogoutRedirectUri&&t.addPostLogoutRedirectUri(e.postLogoutRedirectUri),e.correlationId&&t.addCorrelationId(e.correlationId),e.idTokenHint&&t.addIdTokenHint(e.idTokenHint),e.state&&t.addState(e.state),e.logoutHint&&t.addLogoutHint(e.logoutHint),this.addExtraQueryParams(e,t),t.createQueryString()}addExtraQueryParams(e,t){!(e.extraQueryParameters&&e.extraQueryParameters.hasOwnProperty("instance_aware"))&&this.config.authOptions.instanceAware&&(e.extraQueryParameters=e.extraQueryParameters||{},e.extraQueryParameters.instance_aware="true"),e.extraQueryParameters&&t.addExtraQueryParameters(e.extraQueryParameters)}extractAccountSid(e){var t;return((t=e.idTokenClaims)==null?void 0:t.sid)||null}extractLoginHint(e){var t;return((t=e.idTokenClaims)==null?void 0:t.login_hint)||null}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ax=300;class vd extends lh{constructor(e,t){super(e,t)}async acquireToken(e){var l,d;(l=this.performanceClient)==null||l.addQueueMeasurement(k.RefreshTokenClientAcquireToken,e.correlationId);const t=or(),n=await F(this.executeTokenRequest.bind(this),k.RefreshTokenClientExecuteTokenRequest,this.logger,this.performanceClient,e.correlationId)(e,this.authority),i=(d=n.headers)==null?void 0:d[Pt.X_MS_REQUEST_ID],s=new po(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return s.validateTokenResponse(n.body),F(s.handleServerTokenResponse.bind(s),k.HandleServerTokenResponse,this.logger,this.performanceClient,e.correlationId)(n.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,i)}async acquireTokenByRefreshToken(e){var n;if(!e)throw Pe(Jy);if((n=this.performanceClient)==null||n.addQueueMeasurement(k.RefreshTokenClientAcquireTokenByRefreshToken,e.correlationId),!e.account)throw B(jd);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await F(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(i){const s=i instanceof Fn&&i.errorCode===fc,l=i instanceof Gr&&i.errorCode===Ym.INVALID_GRANT_ERROR&&i.subError===Ym.CLIENT_MISMATCH_ERROR;if(s||l)return F(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1);throw i}return F(this.acquireTokenWithCachedRefreshToken.bind(this),k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){var s;(s=this.performanceClient)==null||s.addQueueMeasurement(k.RefreshTokenClientAcquireTokenWithCachedRefreshToken,e.correlationId);const n=_o(this.cacheManager.getRefreshToken.bind(this.cacheManager),k.CacheManagerGetRefreshToken,this.logger,this.performanceClient,e.correlationId)(e.account,t,void 0,this.performanceClient,e.correlationId);if(!n)throw pd(fc);if(n.expiresOn&&fd(n.expiresOn,e.refreshTokenExpirationOffsetSeconds||Ax))throw pd(uh);const i={...e,refreshToken:n.secret,authenticationScheme:e.authenticationScheme||Oe.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}};try{return await F(this.acquireToken.bind(this),k.RefreshTokenClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(i)}catch(l){if(l instanceof Fn&&l.subError===Lc){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const d=ii(n);this.cacheManager.removeRefreshToken(d)}throw l}}async executeTokenRequest(e,t){var f,g;(f=this.performanceClient)==null||f.addQueueMeasurement(k.RefreshTokenClientExecuteTokenRequest,e.correlationId);const n=this.createTokenQueryParameters(e),i=ye.appendQueryString(t.tokenEndpoint,n),s=await F(this.createTokenRequestBody.bind(this),k.RefreshTokenClientCreateTokenRequestBody,this.logger,this.performanceClient,e.correlationId)(e),l=this.createTokenRequestHeaders(e.ccsCredential),d={clientId:((g=e.tokenBodyParameters)==null?void 0:g.clientId)||this.config.authOptions.clientId,authority:t.canonicalAuthority,scopes:e.scopes,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid};return F(this.executePostToTokenEndpoint.bind(this),k.RefreshTokenClientExecutePostToTokenEndpoint,this.logger,this.performanceClient,e.correlationId)(i,s,l,d,e.correlationId,k.RefreshTokenClientExecutePostToTokenEndpoint)}async createTokenRequestBody(e){var i,s,l;(i=this.performanceClient)==null||i.addQueueMeasurement(k.RefreshTokenClientCreateTokenRequestBody,e.correlationId);const t=e.correlationId,n=new la(t,this.performanceClient);if(n.addClientId(e.embeddedClientId||((s=e.tokenBodyParameters)==null?void 0:s[mo])||this.config.authOptions.clientId),e.redirectUri&&n.addRedirectUri(e.redirectUri),n.addScopes(e.scopes,!0,(l=this.config.authOptions.authority.options.OIDCOptions)==null?void 0:l.defaultScopes),n.addGrantType(Ey.REFRESH_TOKEN_GRANT),n.addClientInfo(),n.addLibraryInfo(this.config.libraryInfo),n.addApplicationTelemetry(this.config.telemetry.application),n.addThrottling(),this.serverTelemetryManager&&!gd(this.config)&&n.addServerTelemetry(this.serverTelemetryManager),n.addRefreshToken(e.refreshToken),this.config.clientCredentials.clientSecret&&n.addClientSecret(this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const d=this.config.clientCredentials.clientAssertion;n.addClientAssertion(await mC(d.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),n.addClientAssertionType(d.assertionType)}if(e.authenticationScheme===Oe.POP){const d=new mi(this.cryptoUtils,this.performanceClient);let f;e.popKid?f=this.cryptoUtils.encodeKid(e.popKid):f=(await F(d.generateCnf.bind(d),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,n.addPopToken(f)}else if(e.authenticationScheme===Oe.SSH)if(e.sshJwk)n.addSshJwk(e.sshJwk);else throw Pe(Mc);if((!Un.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&n.addClaims(e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case on.HOME_ACCOUNT_ID:try{const d=ai(e.ccsCredential.credential);n.addCcsOid(d)}catch(d){this.logger.verbose("Could not parse home account ID for CCS Header: "+d)}break;case on.UPN:n.addCcsUpn(e.ccsCredential.credential);break}return e.embeddedClientId&&n.addBrokerParameters({brokerClientId:this.config.authOptions.clientId,brokerRedirectUri:this.config.authOptions.redirectUri}),e.tokenBodyParameters&&n.addExtraQueryParameters(e.tokenBodyParameters),n.createQueryString()}}/*! @azure/msal-common v14.16.0 2024-11-05 */class bx extends lh{constructor(e,t){super(e,t)}async acquireToken(e){var t;try{const[n,i]=await this.acquireCachedToken({...e,scopes:(t=e.scopes)!=null&&t.length?e.scopes:[...yi]});return i===Br.PROACTIVELY_REFRESHED&&(this.logger.info("SilentFlowClient:acquireCachedToken - Cached access token's refreshOn property has been exceeded'. It's not expired, but must be refreshed."),new vd(this.config,this.performanceClient).acquireTokenByRefreshToken(e).catch(()=>{})),n}catch(n){if(n instanceof Oc&&n.errorCode===yr)return new vd(this.config,this.performanceClient).acquireTokenByRefreshToken(e);throw n}}async acquireCachedToken(e){var f;(f=this.performanceClient)==null||f.addQueueMeasurement(k.SilentFlowClientAcquireCachedToken,e.correlationId);let t=Br.NOT_APPLICABLE;if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!Un.isEmptyObj(e.claims))throw this.setCacheOutcome(Br.FORCE_REFRESH_OR_CLAIMS,e.correlationId),B(yr);if(!e.account)throw B(jd);const n=e.account.tenantId||mx(e.authority),i=this.cacheManager.getTokenKeys(),s=this.cacheManager.getAccessToken(e.account,e,i,n,this.performanceClient,e.correlationId);if(s){if(tM(s.cachedAt)||fd(s.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome(Br.CACHED_ACCESS_TOKEN_EXPIRED,e.correlationId),B(yr);s.refreshOn&&fd(s.refreshOn,0)&&(t=Br.PROACTIVELY_REFRESHED)}else throw this.setCacheOutcome(Br.NO_CACHED_ACCESS_TOKEN,e.correlationId),B(yr);const l=e.authority||this.authority.getPreferredCache(),d={account:this.cacheManager.readAccountFromCache(e.account),accessToken:s,idToken:this.cacheManager.getIdToken(e.account,i,n,this.performanceClient,e.correlationId),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(l)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await F(this.generateResultFromCacheRecord.bind(this),k.SilentFlowClientGenerateResultFromCacheRecord,this.logger,this.performanceClient,e.correlationId)(d,e),t]}setCacheOutcome(e,t){var n,i;(n=this.serverTelemetryManager)==null||n.setCacheOutcome(e),(i=this.performanceClient)==null||i.addFields({cacheOutcome:e},t),e!==Br.NOT_APPLICABLE&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){var i;(i=this.performanceClient)==null||i.addQueueMeasurement(k.SilentFlowClientGenerateResultFromCacheRecord,t.correlationId);let n;if(e.idToken&&(n=wo(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||t.maxAge===0){const s=n==null?void 0:n.auth_time;if(!s)throw B(Gd);Ky(s,t.maxAge)}return po.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,n)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const Ix={sendGetRequestAsync:()=>Promise.reject(B(ge)),sendPostRequestAsync:()=>Promise.reject(B(ge))};/*! @azure/msal-common v14.16.0 2024-11-05 */const fp=",",vC="|";function kx(r){const{skus:e,libraryName:t,libraryVersion:n,extensionName:i,extensionVersion:s}=r,l=new Map([[0,[t,n]],[2,[i,s]]]);let d=[];if(e!=null&&e.length){if(d=e.split(fp),d.length<4)return e}else d=Array.from({length:4},()=>vC);return l.forEach((f,g)=>{var m,v;f.length===2&&((m=f[0])!=null&&m.length)&&((v=f[1])!=null&&v.length)&&Rx({skuArr:d,index:g,skuName:f[0],skuVersion:f[1]})}),d.join(fp)}function Rx(r){const{skuArr:e,index:t,skuName:n,skuVersion:i}=r;t>=e.length||(e[t]=[n,i].join(vC))}class ma{constructor(e,t){this.cacheOutcome=Br.NOT_APPLICABLE,this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||P.EMPTY_STRING,this.wrapperVer=e.wrapperVer||P.EMPTY_STRING,this.telemetryCacheKey=pt.CACHE_KEY+bt.CACHE_KEY_SEPARATOR+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${pt.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],n=this.getNativeBrokerErrorCode();n!=null&&n.length&&t.push(`broker_error=${n}`);const i=t.join(pt.VALUE_SEPARATOR),s=this.getRegionDiscoveryFields(),l=[e,s].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,l,i].join(pt.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=ma.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*t).join(pt.VALUE_SEPARATOR),i=e.errors.slice(0,t).join(pt.VALUE_SEPARATOR),s=e.errors.length,l=t<s?pt.OVERFLOW_TRUE:pt.OVERFLOW_FALSE,d=[s,l].join(pt.VALUE_SEPARATOR);return[pt.SCHEMA_VERSION,e.cacheHits,n,i,d].join(pt.CATEGORY_SEPARATOR)}cacheFailedRequest(e){const t=this.getLastRequests();t.errors.length>=pt.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof He?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(pt.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits}getLastRequests(){const e={failedRequests:[],errors:[],cacheHits:0};return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||e}clearTelemetryCache(){const e=this.getLastRequests(),t=ma.maxErrorsToSend(e),n=e.errors.length;if(t===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{const i={failedRequests:e.failedRequests.slice(t*2),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}}static maxErrorsToSend(e){let t,n=0,i=0;const s=e.errors.length;for(t=0;t<s;t++){const l=e.failedRequests[2*t]||P.EMPTY_STRING,d=e.failedRequests[2*t+1]||P.EMPTY_STRING,f=e.errors[t]||P.EMPTY_STRING;if(i+=l.toString().length+d.toString().length+f.length+3,i<pt.MAX_LAST_HEADER_BYTES)n+=1;else break}return n}getRegionDiscoveryFields(){const e=[];return e.push(this.regionUsed||P.EMPTY_STRING),e.push(this.regionSource||P.EMPTY_STRING),e.push(this.regionOutcome||P.EMPTY_STRING),e.join(",")}updateRegionDiscoveryMetadata(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome}setCacheOutcome(e){this.cacheOutcome=e}setNativeBrokerErrorCode(e){const t=this.getLastRequests();t.nativeBrokerErrorCode=e,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t)}getNativeBrokerErrorCode(){return this.getLastRequests().nativeBrokerErrorCode}clearNativeBrokerErrorCode(){const e=this.getLastRequests();delete e.nativeBrokerErrorCode,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e)}static makeExtraSkuString(e){return kx(e)}}/*! @azure/msal-common v14.16.0 2024-11-05 */const yC="missing_kid_error",CC="missing_alg_error";/*! @azure/msal-common v14.16.0 2024-11-05 */const Ox={[yC]:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided.",[CC]:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."};class hh extends He{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,hh.prototype)}}function gp(r){return new hh(r,Ox[r])}/*! @azure/msal-common v14.16.0 2024-11-05 */class fh{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw gp(yC);if(!e.alg)throw gp(CC);const t=new fh({typ:e.typ||V1.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(t)}}/*! @azure/msal-common v14.16.0 2024-11-05 */class mp{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class Nx{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:gx.InProgress,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new mp}}startPerformanceMeasurement(){return new mp}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const gh="pkce_not_created",yd="crypto_nonexistent",Bc="empty_navigate_uri",wC="hash_empty_error",mh="no_state_in_hash",_C="hash_does_not_contain_known_properties",TC="unable_to_parse_state",EC="state_interaction_type_mismatch",SC="interaction_in_progress",AC="popup_window_error",bC="empty_window_error",vo="user_cancelled",Px="monitor_popup_timeout",IC="monitor_window_timeout",kC="redirect_in_iframe",RC="block_iframe_reload",OC="block_nested_popups",Mx="iframe_closed_prematurely",Uc="silent_logout_unsupported",NC="no_account_error",xx="silent_prompt_value_error",PC="no_token_request_cache_error",MC="unable_to_parse_token_request_cache_error",ph="no_cached_authority_error",Dx="auth_request_not_set_error",Lx="invalid_cache_type",Vc="non_browser_environment",Zo="database_not_open",gc="no_network_connectivity",xC="post_request_failed",DC="get_request_failed",Cd="failed_to_parse_response",LC="unable_to_load_token",vh="crypto_key_not_found",BC="auth_code_required",UC="auth_code_or_nativeAccountId_required",VC="spa_code_and_nativeAccountId_present",yh="database_unavailable",FC="unable_to_acquire_token_from_native_platform",HC="native_handshake_timeout",$C="native_extension_not_installed",Sa="native_connection_not_established",KC="uninitialized_public_client_application",zC="native_prompt_not_supported",WC="invalid_base64_string",qC="invalid_pop_token_request",GC="failed_to_build_headers",jC="failed_to_parse_headers";/*! @azure/msal-browser v3.28.1 2025-01-14 */const pr="For more visit: aka.ms/msaljs/browser-errors",Bx={[gh]:"The PKCE code challenge and verifier could not be generated.",[yd]:"The crypto object or function is not available.",[Bc]:"Navigation URI is empty. Please check stack trace for more info.",[wC]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${pr}`,[mh]:"Hash does not contain state. Please verify that the request originated from msal.",[_C]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${pr}`,[TC]:"Unable to parse state. Please verify that the request originated from msal.",[EC]:"Hash contains state but the interaction type does not match the caller.",[SC]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${pr}`,[AC]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[bC]:"window.open returned null or undefined window object.",[vo]:"User cancelled the flow.",[Px]:`Token acquisition in popup failed due to timeout. ${pr}`,[IC]:`Token acquisition in iframe failed due to timeout. ${pr}`,[kC]:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs.",[RC]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${pr}`,[OC]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[Mx]:"The iframe being monitored was closed prematurely.",[Uc]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[NC]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[xx]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[PC]:"No token request found in cache.",[MC]:"The cached token request could not be parsed.",[ph]:"No cached authority found.",[Dx]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Lx]:"Invalid cache type",[Vc]:"Login and token requests are not supported in non-browser environments.",[Zo]:"Database is not open!",[gc]:"No network connectivity. Check your internet connection.",[xC]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[DC]:"Network request failed. Please check the network trace to determine root cause.",[Cd]:"Failed to parse network response. Check network trace.",[LC]:"Error loading token to cache.",[vh]:"Cryptographic Key or Keypair not found in browser storage.",[BC]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[UC]:"An authorization code or nativeAccountId must be provided to this flow.",[VC]:"Request cannot contain both spa code and native account id.",[yh]:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts.",[FC]:`Unable to acquire token from native platform. ${pr}`,[HC]:"Timed out while attempting to establish connection to browser extension",[$C]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Sa]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${pr}`,[KC]:`You must call and await the initialize function before attempting to call any other MSAL API. ${pr}`,[zC]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[WC]:"Invalid base64 encoded string.",[qC]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[GC]:"Failed to build request headers object.",[jC]:"Failed to parse response headers"};class Aa extends He{constructor(e,t){super(e,Bx[e],t),Object.setPrototypeOf(this,Aa.prototype),this.name="BrowserAuthError"}}function G(r,e){return new Aa(r,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const tn={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},si={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},uo={HandshakeRequest:"Handshake",HandshakeResponse:"HandshakeResponse",GetToken:"GetToken",Response:"Response"},Ht={LocalStorage:"localStorage",SessionStorage:"sessionStorage",MemoryStorage:"memoryStorage"},pp={GET:"GET",POST:"POST"},ke={AUTHORITY:"authority",ACQUIRE_TOKEN_ACCOUNT:"acquireToken.account",SESSION_STATE:"session.state",REQUEST_STATE:"request.state",NONCE_IDTOKEN:"nonce.id_token",ORIGIN_URI:"request.origin",RENEW_STATUS:"token.renew.status",URL_HASH:"urlHash",REQUEST_PARAMS:"request.params",SCOPES:"scopes",INTERACTION_STATUS_KEY:"interaction.status",CCS_CREDENTIAL:"ccs.credential",CORRELATION_ID:"request.correlationId",NATIVE_REQUEST:"request.native",REDIRECT_CONTEXT:"request.redirect.context"},Lr={ACCOUNT_KEYS:"msal.account.keys",TOKEN_KEYS:"msal.token.keys"},Os={WRAPPER_SKU:"wrapper.sku",WRAPPER_VER:"wrapper.version"},Le={acquireTokenRedirect:861,acquireTokenPopup:862,ssoSilent:863,acquireTokenSilent_authCode:864,handleRedirectPromise:865,acquireTokenByCode:866,acquireTokenSilent_silentFlow:61,logout:961,logoutPopup:962};var J;(function(r){r.Redirect="redirect",r.Popup="popup",r.Silent="silent",r.None="none"})(J||(J={}));const vp={scopes:yi},YC="jwk",wd="msal.db",Ux=1,Vx=`${wd}.keys`,Zt={Default:0,AccessToken:1,AccessTokenAndRefreshToken:2,RefreshToken:3,RefreshTokenAndNetwork:4,Skip:5},Fx=[Zt.Default,Zt.Skip,Zt.RefreshTokenAndNetwork],Hx="msal.browser.log.level",$x="msal.browser.log.pii";/*! @azure/msal-browser v3.28.1 2025-01-14 */function Ns(r){return encodeURIComponent(Ch(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Fc(r){return JC(r).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Ch(r){return JC(new TextEncoder().encode(r))}function JC(r){const e=Array.from(r,t=>String.fromCodePoint(t)).join("");return btoa(e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const Kx="RSASSA-PKCS1-v1_5",QC="SHA-256",zx=2048,Wx=new Uint8Array([1,0,1]),yp="0123456789abcdef",Cp=new Uint32Array(1),qx="crypto_subtle_undefined",wh={name:Kx,hash:QC,modulusLength:zx,publicExponent:Wx};function Gx(r){if(!window)throw G(Vc);if(!window.crypto)throw G(yd);if(!r&&!window.crypto.subtle)throw G(yd,qx)}async function XC(r,e,t){e==null||e.addQueueMeasurement(k.Sha256Digest,t);const i=new TextEncoder().encode(r);return window.crypto.subtle.digest(QC,i)}function jx(r){return window.crypto.getRandomValues(r)}function Bu(){return window.crypto.getRandomValues(Cp),Cp[0]}function Sr(){const r=Date.now(),e=Bu()*1024+(Bu()&1023),t=new Uint8Array(16),n=Math.trunc(e/2**30),i=e&2**30-1,s=Bu();t[0]=r/2**40,t[1]=r/2**32,t[2]=r/2**24,t[3]=r/2**16,t[4]=r/2**8,t[5]=r,t[6]=112|n>>>8,t[7]=n,t[8]=128|i>>>24,t[9]=i>>>16,t[10]=i>>>8,t[11]=i,t[12]=s>>>24,t[13]=s>>>16,t[14]=s>>>8,t[15]=s;let l="";for(let d=0;d<t.length;d++)l+=yp.charAt(t[d]>>>4),l+=yp.charAt(t[d]&15),(d===3||d===5||d===7||d===9)&&(l+="-");return l}async function Yx(r,e){return window.crypto.subtle.generateKey(wh,r,e)}async function Uu(r){return window.crypto.subtle.exportKey(YC,r)}async function Jx(r,e,t){return window.crypto.subtle.importKey(YC,r,wh,e,t)}async function Qx(r,e){return window.crypto.subtle.sign(wh,r,e)}async function ZC(r){const e=await XC(r),t=new Uint8Array(e);return Fc(t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */const pa="storage_not_supported",_d="stubbed_public_client_application_called",mc="in_mem_redirect_unavailable";/*! @azure/msal-browser v3.28.1 2025-01-14 */const Gs={[pa]:"Given storage configuration option was not supported.",[_d]:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors",[mc]:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."};Gs[pa],Gs[_d],Gs[mc];class _h extends He{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,_h.prototype)}}function Th(r){return new _h(r,Gs[r])}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Xx(r){r.location.hash="",typeof r.history.replaceState=="function"&&r.history.replaceState(null,"",`${r.location.origin}${r.location.pathname}${r.location.search}`)}function Zx(r){const e=r.split("#");e.shift(),window.location.hash=e.length>0?e.join("#"):""}function Eh(){return window.parent!==window}function eD(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(`${tn.POPUP_NAME_PREFIX}.`)===0}function Cr(){return typeof window<"u"&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function tD(){const e=new ye(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}function nD(){if(ye.hashContainsKnownProperties(window.location.hash)&&Eh())throw G(RC)}function rD(r){if(Eh()&&!r)throw G(kC)}function oD(){if(eD())throw G(OC)}function ew(){if(typeof window>"u")throw G(Vc)}function tw(r){if(!r)throw G(KC)}function Sh(r){ew(),nD(),oD(),tw(r)}function wp(r,e){if(Sh(r),rD(e.system.allowRedirectInIframe),e.cache.cacheLocation===Ht.MemoryStorage&&!e.cache.storeAuthStateInCookie)throw Th(mc)}function nw(r){const e=document.createElement("link");e.rel="preconnect",e.href=new URL(r).origin,e.crossOrigin="anonymous",document.head.appendChild(e),window.setTimeout(()=>{try{document.head.removeChild(e)}catch{}},1e4)}function iD(){return Sr()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class pc{navigateInternal(e,t){return pc.defaultNavigateWindow(e,t)}navigateExternal(e,t){return pc.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Promise(n=>{setTimeout(()=>{n(!0)},t.timeout)})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class aD{async sendGetRequestAsync(e,t){let n,i={},s=0;const l=_p(t);try{n=await fetch(e,{method:pp.GET,headers:l})}catch{throw G(window.navigator.onLine?DC:gc)}i=Tp(n.headers);try{return s=n.status,{headers:i,body:await n.json(),status:s}}catch{throw up(G(Cd),s,i)}}async sendPostRequestAsync(e,t){const n=t&&t.body||"",i=_p(t);let s,l=0,d={};try{s=await fetch(e,{method:pp.POST,headers:i,body:n})}catch{throw G(window.navigator.onLine?xC:gc)}d=Tp(s.headers);try{return l=s.status,{headers:d,body:await s.json(),status:l}}catch{throw up(G(Cd),l,d)}}}function _p(r){try{const e=new Headers;if(!(r&&r.headers))return e;const t=r.headers;return Object.entries(t).forEach(([n,i])=>{e.append(n,i)}),e}catch{throw G(GC)}}function Tp(r){try{const e={};return r.forEach((t,n)=>{e[n]=t}),e}catch{throw G(jC)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const sD=6e4,Td=1e4,cD=3e4,lD=2e3;function uD({auth:r,cache:e,system:t,telemetry:n},i){const s={clientId:P.EMPTY_STRING,authority:`${P.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:P.EMPTY_STRING,authorityMetadata:P.EMPTY_STRING,redirectUri:typeof window<"u"?Cr():"",postLogoutRedirectUri:P.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Tr.AAD,OIDCOptions:{serverResponseType:Ea.FRAGMENT,defaultScopes:[P.OPENID_SCOPE,P.PROFILE_SCOPE,P.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Xd.None,tenant:P.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1},l={cacheLocation:Ht.SessionStorage,temporaryCacheLocation:Ht.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(e&&e.cacheLocation===Ht.LocalStorage),claimsBasedCachingEnabled:!1},d={loggerCallback:()=>{},logLevel:xe.Info,piiLoggingEnabled:!1},g={...{...uC,loggerOptions:d,networkClient:i?new aD:Ix,navigationClient:new pc,loadFrameTimeout:0,windowHashTimeout:(t==null?void 0:t.loadFrameTimeout)||sD,iframeHashTimeout:(t==null?void 0:t.loadFrameTimeout)||Td,navigateFrameWait:0,redirectNavigationTimeout:cD,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(t==null?void 0:t.nativeBrokerHandshakeTimeout)||lD,pollIntervalMilliseconds:tn.DEFAULT_POLL_INTERVAL_MS},...t,loggerOptions:(t==null?void 0:t.loggerOptions)||d},m={application:{appName:P.EMPTY_STRING,appVersion:P.EMPTY_STRING},client:new Nx};if((r==null?void 0:r.protocolMode)!==Tr.OIDC&&(r!=null&&r.OIDCOptions)&&new qr(g.loggerOptions).warning(JSON.stringify(Pe(nC))),r!=null&&r.protocolMode&&r.protocolMode!==Tr.AAD&&(g!=null&&g.allowNativeBroker))throw Pe(rC);return{auth:{...s,...r,OIDCOptions:{...s.OIDCOptions,...r==null?void 0:r.OIDCOptions}},cache:{...l,...e},system:g,telemetry:{...m,...n}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const dD="@azure/msal-browser",Hc="3.28.1";/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ah{static loggerCallback(e,t){switch(e){case xe.Error:console.error(t);return;case xe.Info:console.info(t);return;case xe.Verbose:console.debug(t);return;case xe.Warning:console.warn(t);return;default:console.log(t);return}}constructor(e){var f;this.browserEnvironment=typeof window<"u",this.config=uD(e,this.browserEnvironment);let t;try{t=window[Ht.SessionStorage]}catch{}const n=t==null?void 0:t.getItem(Hx),i=(f=t==null?void 0:t.getItem($x))==null?void 0:f.toLowerCase(),s=i==="true"?!0:i==="false"?!1:void 0,l={...this.config.system.loggerOptions},d=n&&Object.keys(xe).includes(n)?xe[n]:void 0;d&&(l.loggerCallback=Ah.loggerCallback,l.logLevel=d),s!==void 0&&(l.piiLoggingEnabled=s),this.logger=new qr(l,dD,Hc),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class yo extends Ah{getModuleName(){return yo.MODULE_NAME}getId(){return yo.ID}async initialize(){return this.available=typeof window<"u",this.available}}yo.MODULE_NAME="";yo.ID="StandardOperatingContext";/*! @azure/msal-browser v3.28.1 2025-01-14 */function nr(r){return new TextDecoder().decode(hD(r))}function hD(r){let e=r.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw G(WC)}const t=atob(e);return Uint8Array.from(t,n=>n.codePointAt(0)||0)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class fD{constructor(){this.dbName=wd,this.version=Ux,this.tableName=Vx,this.dbOpen=!1}async open(){return new Promise((e,t)=>{const n=window.indexedDB.open(this.dbName,this.version);n.addEventListener("upgradeneeded",i=>{i.target.result.createObjectStore(this.tableName)}),n.addEventListener("success",i=>{const s=i;this.db=s.target.result,this.dbOpen=!0,e()}),n.addEventListener("error",()=>t(G(yh)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(G(Zo));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result)}),l.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Promise((n,i)=>{if(!this.db)return i(G(Zo));const d=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);d.addEventListener("success",()=>{this.closeConnection(),n()}),d.addEventListener("error",f=>{this.closeConnection(),i(f)})})}async removeItem(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(G(Zo));const l=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);l.addEventListener("success",()=>{this.closeConnection(),t()}),l.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async getKeys(){return await this.validateDbIsOpen(),new Promise((e,t)=>{if(!this.db)return t(G(Zo));const s=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();s.addEventListener("success",l=>{const d=l;this.closeConnection(),e(d.target.result)}),s.addEventListener("error",l=>{this.closeConnection(),t(l)})})}async containsKey(e){return await this.validateDbIsOpen(),new Promise((t,n)=>{if(!this.db)return n(G(Zo));const l=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);l.addEventListener("success",d=>{const f=d;this.closeConnection(),t(f.target.result===1)}),l.addEventListener("error",d=>{this.closeConnection(),n(d)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Promise((e,t)=>{const n=window.indexedDB.deleteDatabase(wd),i=setTimeout(()=>t(!1),200);n.addEventListener("success",()=>(clearTimeout(i),e(!0))),n.addEventListener("blocked",()=>(clearTimeout(i),e(!0))),n.addEventListener("error",()=>(clearTimeout(i),t(!1)))})}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ed{constructor(){this.cache=new Map}getItem(e){return this.cache.get(e)||null}setItem(e,t){this.cache.set(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,n)=>{e.push(n)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class gD{constructor(e){this.inMemoryCache=new Ed,this.indexedDBCache=new fD,this.logger=e}handleDatabaseAccessError(e){if(e instanceof Aa&&e.errorCode===yh)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(n){this.handleDatabaseAccessError(n)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(n){this.handleDatabaseAccessError(n)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(t){this.handleDatabaseAccessError(t)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(e.length===0)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(t){this.handleDatabaseAccessError(t)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(n){this.handleDatabaseAccessError(n)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class pi{constructor(e,t,n){this.logger=e,Gx(n??!1),this.cache=new gD(this.logger),this.performanceClient=t}createNewGuid(){return Sr()}base64Encode(e){return Ch(e)}base64Decode(e){return nr(e)}base64UrlEncode(e){return Ns(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){var m;const t=(m=this.performanceClient)==null?void 0:m.startMeasurement(k.CryptoOptsGetPublicKeyThumbprint,e.correlationId),n=await Yx(pi.EXTRACTABLE,pi.POP_KEY_USAGES),i=await Uu(n.publicKey),s={e:i.e,kty:i.kty,n:i.n},l=Ep(s),d=await this.hashString(l),f=await Uu(n.privateKey),g=await Jx(f,!1,["sign"]);return await this.cache.setItem(d,{privateKey:g,publicKey:n.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),d}async removeTokenBindingKey(e){return await this.cache.removeItem(e),!await this.cache.containsKey(e)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,n,i){var U;const s=(U=this.performanceClient)==null?void 0:U.startMeasurement(k.CryptoOptsSignJwt,i),l=await this.cache.getItem(t);if(!l)throw G(vh);const d=await Uu(l.publicKey),f=Ep(d),g=Ns(JSON.stringify({kid:t})),m=fh.getShrHeaderString({...n==null?void 0:n.header,alg:d.alg,kid:g}),v=Ns(m);e.cnf={jwk:JSON.parse(f)};const C=Ns(JSON.stringify(e)),S=`${v}.${C}`,b=new TextEncoder().encode(S),O=await Qx(l.privateKey,b),$=Fc(new Uint8Array(O)),V=`${S}.${$}`;return s&&s.end({success:!0}),V}async hashString(e){return ZC(e)}}pi.POP_KEY_USAGES=["sign","verify"];pi.EXTRACTABLE=!0;function Ep(r){return JSON.stringify(r,Object.keys(r).sort())}/*! @azure/msal-browser v3.28.1 2025-01-14 */class mD{constructor(){if(!window.localStorage)throw Th(pa)}getItem(e){return window.localStorage.getItem(e)}setItem(e,t){window.localStorage.setItem(e,t)}removeItem(e){window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class pD{constructor(){if(!window.sessionStorage)throw Th(pa)}getItem(e){return window.sessionStorage.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function rw(r,e){if(!e)return null;try{return Vn.parseRequestState(r,e).libraryState.meta}catch{throw B(fi)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const vD=24*60*60*1e3;class yD{getItem(e){const t=`${encodeURIComponent(e)}`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){const s=n[i],[l,...d]=decodeURIComponent(s).trim().split("="),f=d.join("=");if(l===t)return f}return""}setItem(e,t,n,i=!0){let s=`${encodeURIComponent(e)}=${encodeURIComponent(t)};path=/;SameSite=Lax;`;if(n){const l=CD(n);s+=`expires=${l};`}i&&(s+="Secure;"),document.cookie=s}removeItem(e){this.setItem(e,"",-1)}getKeys(){const e=document.cookie.split(";"),t=[];return e.forEach(n=>{const i=decodeURIComponent(n).trim().split("=");t.push(i[0])}),t}containsKey(e){return this.getKeys().includes(e)}}function CD(r){const e=new Date;return new Date(e.getTime()+r*vD).toUTCString()}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Sd extends gi{constructor(e,t,n,i,s,l){super(e,n,i,s),this.cacheConfig=t,this.logger=i,this.internalStorage=new Ed,this.browserStorage=this.setupBrowserStorage(this.cacheConfig.cacheLocation),this.temporaryCacheStorage=this.setupBrowserStorage(this.cacheConfig.temporaryCacheLocation),this.cookieStorage=new yD,t.cacheMigrationEnabled&&(this.migrateCacheEntries(),this.createKeyMaps()),this.performanceClient=l}setupBrowserStorage(e){try{switch(e){case Ht.LocalStorage:return new mD;case Ht.SessionStorage:return new pD;case Ht.MemoryStorage:default:break}}catch(t){this.logger.error(t)}return this.cacheConfig.cacheLocation=Ht.MemoryStorage,new Ed}migrateCacheEntries(){const e=`${P.CACHE_PREFIX}.${ct.ID_TOKEN}`,t=`${P.CACHE_PREFIX}.${ct.CLIENT_INFO}`,n=`${P.CACHE_PREFIX}.${ct.ERROR}`,i=`${P.CACHE_PREFIX}.${ct.ERROR_DESC}`,s=this.browserStorage.getItem(e),l=this.browserStorage.getItem(t),d=this.browserStorage.getItem(n),f=this.browserStorage.getItem(i),g=[s,l,d,f];[ct.ID_TOKEN,ct.CLIENT_INFO,ct.ERROR,ct.ERROR_DESC].forEach((v,C)=>{const S=g[C];S&&this.setTemporaryCache(v,S,!0)})}createKeyMaps(){this.logger.trace("BrowserCacheManager - createKeyMaps called.");const e=this.getItem(Lr.ACCOUNT_KEYS),t=this.getItem(`${Lr.TOKEN_KEYS}.${this.clientId}`);if(e&&t){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}this.browserStorage.getKeys().forEach(i=>{if(this.isCredentialKey(i)){const s=this.getItem(i);if(s){const l=this.validateAndParseJson(s);if(l&&l.hasOwnProperty("credentialType"))switch(l.credentialType){case ne.ID_TOKEN:if(ep(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - idToken with key: ${i} found, saving key to token key map`);const d=l,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,ne.ID_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed idToken validation on key: ${i}`);break;case ne.ACCESS_TOKEN:case ne.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Zm(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - accessToken with key: ${i} found, saving key to token key map`);const d=l,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,ne.ACCESS_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed accessToken validation on key: ${i}`);break;case ne.REFRESH_TOKEN:if(tp(l)){this.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - refreshToken with key: ${i} found, saving key to token key map`);const d=l,f=this.updateCredentialCacheKey(i,d);this.addTokenKey(f,ne.REFRESH_TOKEN);return}else this.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: ${i}`);break}}}if(this.isAccountKey(i)){const s=this.getItem(i);if(s){const l=this.validateAndParseJson(s);l&&at.isAccountEntity(l)&&(this.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),this.logger.tracePii(`BrowserCacheManager:createKeyMaps - account with key: ${i} found, saving key to account key map`),this.addAccountKeyToMap(i))}}})}validateAndParseJson(e){try{const t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}getItem(e){return this.browserStorage.getItem(e)}setItem(e,t){this.browserStorage.setItem(e,t)}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const n=this.getCachedAccountEntity(e);return this.updateOutdatedCachedAccount(e,n,t)}getCachedAccountEntity(e){const t=this.getItem(e);if(!t)return this.removeAccountKeyFromMap(e),null;const n=this.validateAndParseJson(t);return!n||!at.isAccountEntity(n)?(this.removeAccountKeyFromMap(e),null):gi.toObject(new at,n)}setAccount(e){this.logger.trace("BrowserCacheManager.setAccount called");const t=e.generateAccountKey();this.setItem(t,JSON.stringify(e)),this.addAccountKeyToMap(t)}getAccountKeys(){this.logger.trace("BrowserCacheManager.getAccountKeys called");const e=this.getItem(Lr.ACCOUNT_KEYS);return e?JSON.parse(e):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])}addAccountKeyToMap(e){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const t=this.getAccountKeys();t.indexOf(e)===-1?(t.push(e),this.setItem(Lr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")}removeAccountKeyFromMap(e){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const t=this.getAccountKeys(),n=t.indexOf(e);n>-1?(t.splice(n,1),this.setItem(Lr.ACCOUNT_KEYS,JSON.stringify(t)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}async removeAccount(e){super.removeAccount(e),this.removeAccountKeyFromMap(e)}removeOutdatedAccount(e){this.removeItem(e),this.removeAccountKeyFromMap(e)}removeIdToken(e){super.removeIdToken(e),this.removeTokenKey(e,ne.ID_TOKEN)}async removeAccessToken(e){super.removeAccessToken(e),this.removeTokenKey(e,ne.ACCESS_TOKEN)}removeRefreshToken(e){super.removeRefreshToken(e),this.removeTokenKey(e,ne.REFRESH_TOKEN)}getTokenKeys(){this.logger.trace("BrowserCacheManager.getTokenKeys called");const e=this.getItem(`${Lr.TOKEN_KEYS}.${this.clientId}`);if(e){const t=this.validateAndParseJson(e);if(t&&t.hasOwnProperty("idToken")&&t.hasOwnProperty("accessToken")&&t.hasOwnProperty("refreshToken"))return t;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}}addTokenKey(e,t){this.logger.trace("BrowserCacheManager addTokenKey called");const n=this.getTokenKeys();switch(t){case ne.ID_TOKEN:n.idToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(e));break;case ne.ACCESS_TOKEN:n.accessToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),n.accessToken.push(e));break;case ne.REFRESH_TOKEN:n.refreshToken.indexOf(e)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(e));break;default:throw this.logger.error(`BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: ${t}`),B(hd)}this.setItem(`${Lr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}removeTokenKey(e,t){this.logger.trace("BrowserCacheManager removeTokenKey called");const n=this.getTokenKeys();switch(t){case ne.ID_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: ${e} from map`);const i=n.idToken.indexOf(e);i>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),n.idToken.splice(i,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ne.ACCESS_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: ${e} from map`);const s=n.accessToken.indexOf(e);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),n.accessToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ne.REFRESH_TOKEN:this.logger.infoPii(`BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: ${e} from map`);const l=n.refreshToken.indexOf(e);l>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),n.refreshToken.splice(l,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:throw this.logger.error(`BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: ${t}`),B(hd)}this.setItem(`${Lr.TOKEN_KEYS}.${this.clientId}`,JSON.stringify(n))}getIdTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ID_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!ep(n)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),n)}setIdTokenCredential(e){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const t=ii(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ne.ID_TOKEN)}getAccessTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ACCESS_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!Zm(n)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),n)}setAccessTokenCredential(e){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const t=ii(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ne.ACCESS_TOKEN)}getRefreshTokenCredential(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.REFRESH_TOKEN),null;const n=this.validateAndParseJson(t);return!n||!tp(n)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(e,ne.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),n)}setRefreshTokenCredential(e){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const t=ii(e);this.setItem(t,JSON.stringify(e)),this.addTokenKey(t,ne.REFRESH_TOKEN)}getAppMetadata(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!uM(e,n)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),n)}setAppMetadata(e){this.logger.trace("BrowserCacheManager.setAppMetadata called");const t=lM(e);this.setItem(t,JSON.stringify(e))}getServerTelemetry(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!sM(e,n)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),n)}setServerTelemetry(e,t){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t))}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const n=this.validateAndParseJson(t);return n&&dM(e,n)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),n):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(t=>this.isAuthorityMetadata(t))}setWrapperMetadata(e,t){this.internalStorage.setItem(Os.WRAPPER_SKU,e),this.internalStorage.setItem(Os.WRAPPER_VER,t)}getWrapperMetadata(){const e=this.internalStorage.getItem(Os.WRAPPER_SKU)||P.EMPTY_STRING,t=this.internalStorage.getItem(Os.WRAPPER_VER)||P.EMPTY_STRING;return[e,t]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(){const e=this.generateCacheKey(ct.ACTIVE_ACCOUNT_FILTERS),t=this.getItem(e);if(!t){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");const i=this.generateCacheKey(ct.ACTIVE_ACCOUNT),s=this.getItem(i);if(!s)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;const l=this.getAccountInfoFilteredBy({localAccountId:s});return l?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(l),l):null}const n=this.validateAndParseJson(t);return n?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:n.homeAccountId,localAccountId:n.localAccountId,tenantId:n.tenantId})):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e){const t=this.generateCacheKey(ct.ACTIVE_ACCOUNT_FILTERS),n=this.generateCacheKey(ct.ACTIVE_ACCOUNT);if(e){this.logger.verbose("setActiveAccount: Active account set");const i={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId};this.browserStorage.setItem(t,JSON.stringify(i)),this.browserStorage.setItem(n,e.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(t),this.browserStorage.removeItem(n)}getThrottlingCache(e){const t=this.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const n=this.validateAndParseJson(t);return!n||!cM(e,n)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),n)}setThrottlingCache(e,t){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t))}getTemporaryCache(e,t){const n=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const s=this.cookieStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),s}const i=this.temporaryCacheStorage.getItem(n);if(!i){if(this.cacheConfig.cacheLocation===Ht.LocalStorage){const s=this.browserStorage.getItem(n);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),i}setTemporaryCache(e,t,n){const i=n?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(i,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(i,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}async clear(){await this.removeAllAccounts(),this.removeAppMetadata(),this.temporaryCacheStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{(e.indexOf(P.CACHE_PREFIX)!==-1||e.indexOf(this.clientId)!==-1)&&this.browserStorage.removeItem(e)}),this.internalStorage.clear()}async clearTokensAndKeysWithClaims(e,t){e.addQueueMeasurement(k.ClearTokensAndKeysWithClaims,t);const n=this.getTokenKeys(),i=[];n.accessToken.forEach(s=>{const l=this.getAccessTokenCredential(s);l!=null&&l.requestedClaimsHash&&s.includes(l.requestedClaimsHash.toLowerCase())&&i.push(this.removeAccessToken(s))}),await Promise.all(i),i.length>0&&this.logger.warning(`${i.length} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return this.validateAndParseJson(e)?JSON.stringify(e):Un.startsWith(e,P.CACHE_PREFIX)||Un.startsWith(e,ct.ADAL_ID_TOKEN)?e:`${P.CACHE_PREFIX}.${this.clientId}.${e}`}generateAuthorityKey(e){const{libraryState:{id:t}}=Vn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.AUTHORITY}.${t}`)}generateNonceKey(e){const{libraryState:{id:t}}=Vn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.NONCE_IDTOKEN}.${t}`)}generateStateKey(e){const{libraryState:{id:t}}=Vn.parseRequestState(this.cryptoImpl,e);return this.generateCacheKey(`${ke.REQUEST_STATE}.${t}`)}getCachedAuthority(e){const t=this.generateStateKey(e),n=this.getTemporaryCache(t);if(!n)return null;const i=this.generateAuthorityKey(n);return this.getTemporaryCache(i)}updateCacheEntries(e,t,n,i,s){this.logger.trace("BrowserCacheManager.updateCacheEntries called");const l=this.generateStateKey(e);this.setTemporaryCache(l,e,!1);const d=this.generateNonceKey(e);this.setTemporaryCache(d,t,!1);const f=this.generateAuthorityKey(e);if(this.setTemporaryCache(f,n,!1),s){const g={credential:s.homeAccountId,type:on.HOME_ACCOUNT_ID};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(g),!0)}else if(i){const g={credential:i,type:on.UPN};this.setTemporaryCache(ke.CCS_CREDENTIAL,JSON.stringify(g),!0)}}resetRequestCache(e){this.logger.trace("BrowserCacheManager.resetRequestCache called"),e&&(this.temporaryCacheStorage.getKeys().forEach(t=>{t.indexOf(e)!==-1&&this.removeTemporaryItem(t)}),this.removeTemporaryItem(this.generateStateKey(e)),this.removeTemporaryItem(this.generateNonceKey(e)),this.removeTemporaryItem(this.generateAuthorityKey(e))),this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),this.removeTemporaryItem(this.generateCacheKey(ke.ORIGIN_URI)),this.removeTemporaryItem(this.generateCacheKey(ke.URL_HASH)),this.removeTemporaryItem(this.generateCacheKey(ke.CORRELATION_ID)),this.removeTemporaryItem(this.generateCacheKey(ke.CCS_CREDENTIAL)),this.removeTemporaryItem(this.generateCacheKey(ke.NATIVE_REQUEST)),this.setInteractionInProgress(!1)}cleanRequestByState(e){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),e){const t=this.generateStateKey(e),n=this.temporaryCacheStorage.getItem(t);this.logger.infoPii(`BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n||P.EMPTY_STRING)}}cleanRequestByInteractionType(e){this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.temporaryCacheStorage.getKeys().forEach(t=>{if(t.indexOf(ke.REQUEST_STATE)===-1)return;const n=this.temporaryCacheStorage.getItem(t);if(!n)return;const i=rw(this.cryptoImpl,n);i&&i.interactionType===e&&(this.logger.infoPii(`BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: ${n}`),this.resetRequestCache(n))}),this.setInteractionInProgress(!1)}cacheCodeRequest(e){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");const t=Ch(JSON.stringify(e));this.setTemporaryCache(ke.REQUEST_PARAMS,t,!0)}getCachedRequest(e){this.logger.trace("BrowserCacheManager.getCachedRequest called");const t=this.getTemporaryCache(ke.REQUEST_PARAMS,!0);if(!t)throw G(PC);let n;try{n=JSON.parse(nr(t))}catch(i){throw this.logger.errorPii(`Attempted to parse: ${t}`),this.logger.error(`Parsing cached token request threw with error: ${i}`),G(MC)}if(this.removeTemporaryItem(this.generateCacheKey(ke.REQUEST_PARAMS)),!n.authority){const i=this.generateAuthorityKey(e),s=this.getTemporaryCache(i);if(!s)throw G(ph);n.authority=s}return n}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(ke.NATIVE_REQUEST,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;const t=this.validateAndParseJson(e);return t||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress();return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${P.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;return this.getTemporaryCache(e,!1)}setInteractionInProgress(e){const t=`${P.CACHE_PREFIX}.${ke.INTERACTION_STATUS_KEY}`;if(e){if(this.getInteractionInProgress())throw G(SC);this.setTemporaryCache(t,this.clientId,!1)}else!e&&this.getInteractionInProgress()===this.clientId&&this.removeTemporaryItem(t)}getLegacyLoginHint(){const e=this.getTemporaryCache(ct.ADAL_ID_TOKEN);e&&(this.browserStorage.removeItem(ct.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));const t=this.getTemporaryCache(ct.ID_TOKEN,!0);t&&(this.browserStorage.removeItem(this.generateCacheKey(ct.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));const n=t||e;if(n){const i=wo(n,nr);if(i.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),i.preferred_username;if(i.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),i.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null}updateCredentialCacheKey(e,t){const n=ii(t);if(e!==n){const i=this.getItem(e);if(i)return this.browserStorage.removeItem(e),this.setItem(n,i),this.logger.verbose(`Updated an outdated ${t.credentialType} cache key`),n;this.logger.error(`Attempted to update an outdated ${t.credentialType} cache key but no item matching the outdated key was found in storage`)}return e}async hydrateCache(e,t){var d,f,g;const n=Nc((d=e.account)==null?void 0:d.homeAccountId,(f=e.account)==null?void 0:f.environment,e.idToken,this.clientId,e.tenantId);let i;t.claims&&(i=await this.cryptoImpl.hashString(t.claims));const s=Pc((g=e.account)==null?void 0:g.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?e.expiresOn.getTime()/1e3:0,e.extExpiresOn?e.extExpiresOn.getTime()/1e3:0,nr,void 0,e.tokenType,void 0,t.sshKid,t.claims,i),l={idToken:n,accessToken:s};return this.saveCacheRecord(l)}async saveCacheRecord(e,t,n){try{await super.saveCacheRecord(e,t,n)}catch(i){if(i instanceof li&&this.performanceClient&&n)try{const s=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:s.refreshToken.length,cacheIdCount:s.idToken.length,cacheAtCount:s.accessToken.length},n)}catch{}throw i}}}const wD=(r,e)=>{const t={cacheLocation:Ht.MemoryStorage,temporaryCacheLocation:Ht.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};return new Sd(r,t,cc,e)};/*! @azure/msal-browser v3.28.1 2025-01-14 */function _D(r,e,t,n){return r.verbose("getAllAccounts called"),t?e.getAllAccounts(n):[]}function TD(r,e,t){if(e.trace("getAccount called"),Object.keys(r).length===0)return e.warning("getAccount: No accountFilter provided"),null;const n=t.getAccountInfoFilteredBy(r);return n?(e.verbose("getAccount: Account matching provided filter found, returning"),n):(e.verbose("getAccount: No matching account found, returning null"),null)}function ED(r,e,t){if(e.trace("getAccountByUsername called"),!r)return e.warning("getAccountByUsername: No username provided"),null;const n=t.getAccountInfoFilteredBy({username:r});return n?(e.verbose("getAccountByUsername: Account matching username found, returning"),e.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${r}`),n):(e.verbose("getAccountByUsername: No matching account found, returning null"),null)}function SD(r,e,t){if(e.trace("getAccountByHomeId called"),!r)return e.warning("getAccountByHomeId: No homeAccountId provided"),null;const n=t.getAccountInfoFilteredBy({homeAccountId:r});return n?(e.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),e.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${r}`),n):(e.verbose("getAccountByHomeId: No matching account found, returning null"),null)}function AD(r,e,t){if(e.trace("getAccountByLocalId called"),!r)return e.warning("getAccountByLocalId: No localAccountId provided"),null;const n=t.getAccountInfoFilteredBy({localAccountId:r});return n?(e.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),e.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${r}`),n):(e.verbose("getAccountByLocalId: No matching account found, returning null"),null)}function bD(r,e){e.setActiveAccount(r)}function ID(r){return r.getActiveAccount()}/*! @azure/msal-browser v3.28.1 2025-01-14 */const te={INITIALIZE_START:"msal:initializeStart",INITIALIZE_END:"msal:initializeEnd",ACCOUNT_ADDED:"msal:accountAdded",ACCOUNT_REMOVED:"msal:accountRemoved",ACTIVE_ACCOUNT_CHANGED:"msal:activeAccountChanged",LOGIN_START:"msal:loginStart",LOGIN_SUCCESS:"msal:loginSuccess",LOGIN_FAILURE:"msal:loginFailure",ACQUIRE_TOKEN_START:"msal:acquireTokenStart",ACQUIRE_TOKEN_SUCCESS:"msal:acquireTokenSuccess",ACQUIRE_TOKEN_FAILURE:"msal:acquireTokenFailure",ACQUIRE_TOKEN_NETWORK_START:"msal:acquireTokenFromNetworkStart",SSO_SILENT_START:"msal:ssoSilentStart",SSO_SILENT_SUCCESS:"msal:ssoSilentSuccess",SSO_SILENT_FAILURE:"msal:ssoSilentFailure",ACQUIRE_TOKEN_BY_CODE_START:"msal:acquireTokenByCodeStart",ACQUIRE_TOKEN_BY_CODE_SUCCESS:"msal:acquireTokenByCodeSuccess",ACQUIRE_TOKEN_BY_CODE_FAILURE:"msal:acquireTokenByCodeFailure",HANDLE_REDIRECT_START:"msal:handleRedirectStart",HANDLE_REDIRECT_END:"msal:handleRedirectEnd",POPUP_OPENED:"msal:popupOpened",LOGOUT_START:"msal:logoutStart",LOGOUT_SUCCESS:"msal:logoutSuccess",LOGOUT_FAILURE:"msal:logoutFailure",LOGOUT_END:"msal:logoutEnd",RESTORE_FROM_BFCACHE:"msal:restoreFromBFCache"};/*! @azure/msal-browser v3.28.1 2025-01-14 */class kD{constructor(e){this.eventCallbacks=new Map,this.logger=e||new qr({})}addEventCallback(e,t,n){if(typeof window<"u"){const i=n||iD();return this.eventCallbacks.has(i)?(this.logger.error(`Event callback with id: ${i} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(i,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${i}`),i)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,n,i){if(typeof window<"u"){const s={eventType:e,interactionType:t||null,payload:n||null,error:i||null,timestamp:Date.now()};this.eventCallbacks.forEach(([l,d],f)=>{(d.length===0||d.includes(e))&&(this.logger.verbose(`Emitting event to callback ${f}: ${e}`),l.apply(null,[s]))})}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class ow{constructor(e,t,n,i,s,l,d,f,g){this.config=e,this.browserStorage=t,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=s,this.navigationClient=l,this.nativeMessageHandler=f,this.correlationId=g||Sr(),this.logger=i.clone(tn.MSAL_SKU,Hc,this.correlationId),this.performanceClient=d}async clearCacheOnLogout(e){if(e){at.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null));try{await this.browserStorage.removeAccount(at.generateAccountCacheKey(e)),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch{this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),await this.browserStorage.clear(),await this.browserCrypto.clearKeystore()}catch{this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return ye.getAbsoluteUrl(t,Cr())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new ma(n,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,n=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetDiscoveredAuthority,this.correlationId);const i={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=e.requestAuthority||this.config.auth.authority,l=n!=null&&n.length?n==="true":this.config.auth.instanceAware,d=t&&l?this.config.auth.authority.replace(ye.getDomainFromUrl(s),t.environment):s,f=St.generateAuthority(d,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),g=await F(fC,k.AuthorityFactoryCreateDiscoveredInstance,this.logger,this.performanceClient,this.correlationId)(f,this.config.system.networkClient,this.browserStorage,i,this.logger,this.correlationId,this.performanceClient);if(t&&!g.isAlias(t.environment))throw Pe(oC);return g}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const RD=32;async function OD(r,e,t){r.addQueueMeasurement(k.GeneratePkceCodes,t);const n=_o(ND,k.GenerateCodeVerifier,e,r,t)(r,e,t),i=await F(PD,k.GenerateCodeChallengeFromVerifier,e,r,t)(n,r,e,t);return{verifier:n,challenge:i}}function ND(r,e,t){try{const n=new Uint8Array(RD);return _o(jx,k.GetRandomValues,e,r,t)(n),Fc(n)}catch{throw G(gh)}}async function PD(r,e,t,n){e.addQueueMeasurement(k.GenerateCodeChallengeFromVerifier,n);try{const i=await F(XC,k.Sha256Digest,t,e,n)(r,e,n);return Fc(new Uint8Array(i))}catch{throw G(gh)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function bh(r,e,t,n){t.addQueueMeasurement(k.InitializeBaseRequest,r.correlationId);const i=r.authority||e.auth.authority,s=[...r&&r.scopes||[]],l={...r,correlationId:r.correlationId,authority:i,scopes:s};if(!l.authenticationScheme)l.authenticationScheme=Oe.BEARER,n.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(l.authenticationScheme===Oe.SSH){if(!r.sshJwk)throw Pe(Mc);if(!r.sshKid)throw Pe(tC)}n.verbose(`Authentication Scheme set to "${l.authenticationScheme}" as configured in Auth request`)}return e.cache.claimsBasedCachingEnabled&&r.claims&&!Un.isEmptyObj(r.claims)&&(l.requestedClaimsHash=await ZC(r.claims)),l}async function MD(r,e,t,n,i){n.addQueueMeasurement(k.InitializeSilentRequest,r.correlationId);const s=await F(bh,k.InitializeBaseRequest,i,n,r.correlationId)(r,t,n,i);return{...r,...s,account:e,forceRefresh:r.forceRefresh||!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ci extends ow{async initializeAuthorizationCodeRequest(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.correlationId);const t=await F(OD,k.GeneratePkceCodes,this.logger,this.performanceClient,this.correlationId)(this.performanceClient,this.logger,this.correlationId),n={...e,redirectUri:e.redirectUri,code:P.EMPTY_STRING,codeVerifier:t.verifier};return e.codeChallenge=t.challenge,e.codeChallengeMethod=P.S256_CODE_CHALLENGE_METHOD,n}initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e==null?void 0:e.correlationId);const t={correlationId:this.correlationId||Sr(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const n=this.getLogoutHintFromIdTokenClaims(e.account);n&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=n)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!e||e.postLogoutRedirectUri!==null?e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(e.postLogoutRedirectUri,Cr())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Cr())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=ye.getAbsoluteUrl(Cr(),Cr())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientCreateAuthCodeClient,this.correlationId);const t=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)(e);return new pC(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}=e;this.performanceClient.addQueueMeasurement(k.StandardInteractionClientGetClientConfiguration,this.correlationId);const d=await F(this.getDiscoveredAuthority.bind(this),k.StandardInteractionClientGetDiscoveredAuthority,this.logger,this.performanceClient,this.correlationId)({requestAuthority:n,requestAzureCloudOptions:i,requestExtraQueryParameters:s,account:l}),f=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:d,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:f.loggerCallback,piiLoggingEnabled:f.piiLoggingEnabled,logLevel:f.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:tn.MSAL_SKU,version:Hc,cpu:P.EMPTY_STRING,os:P.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(k.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId);const n=this.getRedirectUri(e.redirectUri),i={interactionType:t},s=Vn.setRequestState(this.browserCrypto,e&&e.state||P.EMPTY_STRING,i),d={...await F(bh,k.InitializeBaseRequest,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:n,state:s,nonce:e.nonce||Sr(),responseMode:this.config.auth.OIDCOptions.serverResponseType};if(e.loginHint||e.sid)return d;const f=e.account||this.browserStorage.getActiveAccount();if(f&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${f.homeAccountId}`,this.correlationId),d.account=f),!d.loginHint&&!f){const g=this.browserStorage.getLegacyLoginHint();g&&(d.loginHint=g)}return d}}/*! @azure/msal-browser v3.28.1 2025-01-14 */const xD="ContentError",iw="user_switch";/*! @azure/msal-browser v3.28.1 2025-01-14 */const DD="USER_INTERACTION_REQUIRED",LD="USER_CANCEL",BD="NO_NETWORK",UD="PERSISTENT_ERROR",VD="DISABLED",FD="ACCOUNT_UNAVAILABLE";/*! @azure/msal-browser v3.28.1 2025-01-14 */const HD=-2147186943,$D={[iw]:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."};class Qn extends He{constructor(e,t,n){super(e,t),Object.setPrototypeOf(this,Qn.prototype),this.name="NativeAuthError",this.ext=n}}function ei(r){if(r.ext&&r.ext.status&&(r.ext.status===UD||r.ext.status===VD)||r.ext&&r.ext.error&&r.ext.error===HD)return!0;switch(r.errorCode){case xD:return!0;default:return!1}}function Ad(r,e,t){if(t&&t.status)switch(t.status){case FD:return pd(gC);case DD:return new Fn(r,e);case LD:return G(vo);case BD:return G(gc)}return new Qn(r,$D[r]||e,t)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class aw extends Ci{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentCacheClientAcquireToken,e.correlationId);const t=this.initializeServerTelemetryManager(Le.acquireTokenSilent_silentFlow),n=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),i=new bx(n,this.performanceClient);this.logger.verbose("Silent auth client created");try{const l=(await F(i.acquireCachedToken.bind(i),k.SilentFlowClientAcquireCachedToken,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),l}catch(s){throw s instanceof Aa&&s.errorCode===vh&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),s}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t==null?void 0:t.account)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class ui extends ow{constructor(e,t,n,i,s,l,d,f,g,m,v,C){var _;super(e,t,n,i,s,l,f,g,C),this.apiId=d,this.accountId=m,this.nativeMessageHandler=g,this.nativeStorageManager=v,this.silentCacheClient=new aw(e,this.nativeStorageManager,n,i,s,l,f,g,C),this.serverTelemetryManager=this.initializeServerTelemetryManager(this.apiId);const S=this.nativeMessageHandler.getExtensionId()===si.PREFERRED_EXTENSION_ID?"chrome":(_=this.nativeMessageHandler.getExtensionId())!=null&&_.length?"unknown":void 0;this.skus=ma.makeExtraSkuString({libraryName:tn.MSAL_SKU,libraryVersion:Hc,extensionName:S,extensionVersion:this.nativeMessageHandler.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[lx]:this.skus}}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const t=this.performanceClient.startMeasurement(k.NativeInteractionClientAcquireToken,e.correlationId),n=or();try{const i=await this.initializeNativeRequest(e);try{const g=await this.acquireTokensFromCache(this.accountId,i);return t.end({success:!0,isNativeBroker:!1,fromCache:!0}),g}catch{this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const{...s}=i,l={method:uo.GetToken,request:s},d=await this.nativeMessageHandler.sendMessage(l),f=this.validateNativeResponse(d);return await this.handleNativeResponse(f,i,n).then(g=>(t.end({success:!0,isNativeBroker:!0,requestId:g.requestId}),this.serverTelemetryManager.clearNativeBrokerErrorCode(),g)).catch(g=>{throw t.end({success:!1,errorCode:g.errorCode,subErrorCode:g.subError,isNativeBroker:!0}),g})}catch(i){throw i instanceof Qn&&this.serverTelemetryManager.setNativeBrokerErrorCode(i.errorCode),i}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:Je.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),B(ud);const n=this.browserStorage.getBaseAccountInfo({nativeAccountId:e});if(!n)throw B(ud);try{const i=this.createSilentCacheRequest(t,n),s=await this.silentCacheClient.acquireToken(i),l={...n,idTokenClaims:s==null?void 0:s.idTokenClaims,idToken:s==null?void 0:s.idToken};return{...s,account:l}}catch(i){throw i}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...n}=e;delete n.onRedirectNavigate;const i=await this.initializeNativeRequest(n),s={method:uo.GetToken,request:i};try{const f=await this.nativeMessageHandler.sendMessage(s);this.validateNativeResponse(f)}catch(f){if(f instanceof Qn&&(this.serverTelemetryManager.setNativeBrokerErrorCode(f.errorCode),ei(f)))throw f}this.browserStorage.setTemporaryCache(ke.NATIVE_REQUEST,JSON.stringify(i),!0);const l={apiId:Le.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(d,l)}async handleRedirectPromise(e,t){if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const n=this.browserStorage.getCachedNativeRequest();if(!n)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&(e==null||e.addFields({errorCode:"no_cached_request"},t)),null;const{prompt:i,...s}=n;i&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.NATIVE_REQUEST));const l={method:uo.GetToken,request:s},d=or();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const f=await this.nativeMessageHandler.sendMessage(l);this.validateNativeResponse(f);const g=this.handleNativeResponse(f,s,d);this.browserStorage.setInteractionInProgress(!1);const m=await g;return this.serverTelemetryManager.clearNativeBrokerErrorCode(),m}catch(f){throw this.browserStorage.setInteractionInProgress(!1),f}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")}async handleNativeResponse(e,t,n){var m;this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const i=wo(e.id_token,nr),s=this.createHomeAccountIdentifier(e,i),l=(m=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId}))==null?void 0:m.homeAccountId;if(s!==l&&e.account.id!==t.accountId)throw Ad(iw);const d=await this.getDiscoveredAuthority({requestAuthority:t.authority}),f=dh(this.browserStorage,d,s,nr,i,e.client_info,void 0,i.tid,void 0,e.account.id,this.logger),g=await this.generateAuthenticationResult(e,t,i,f,d.canonicalAuthority,n);return this.cacheAccount(f),this.cacheNativeTokens(e,t,s,i,e.access_token,g.tenantId,n),g}createHomeAccountIdentifier(e,t){return at.generateHomeAccountId(e.client_info||P.EMPTY_STRING,Dn.Default,this.logger,this.browserCrypto,t)}generateScopes(e,t){return e.scope?Je.fromString(e.scope):Je.fromString(t.scope)}async generatePopAccessToken(e,t){if(t.tokenType===Oe.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const n=new mi(this.browserCrypto),i={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw B(Jd);return n.signPopToken(e.access_token,t.keyId,i)}else return e.access_token}async generateAuthenticationResult(e,t,n,i,s,l){const d=this.addTelemetryFromNativeResponse(e),f=e.scope?Je.fromString(e.scope):Je.fromString(t.scope),g=e.account.properties||{},m=g.UID||n.oid||n.sub||P.EMPTY_STRING,v=g.TenantId||n.tid||P.EMPTY_STRING,C=ih(i.getAccountInfo(),void 0,n,e.id_token);C.nativeAccountId!==e.account.id&&(C.nativeAccountId=e.account.id);const S=await this.generatePopAccessToken(e,t),_=t.tokenType===Oe.POP?Oe.POP:Oe.BEARER;return{authority:s,uniqueId:m,tenantId:v,scopes:f.asArray(),account:C,idToken:e.id_token,idTokenClaims:n,accessToken:S,fromCache:d?this.isResponseFromCache(d):!1,expiresOn:new Date(Number(l+e.expires_in)*1e3),tokenType:_,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}cacheAccount(e){this.browserStorage.setAccount(e),this.browserStorage.removeAccountContext(e).catch(t=>{this.logger.error(`Error occurred while removing account context from browser storage. ${t}`)})}cacheNativeTokens(e,t,n,i,s,l,d){const f=Nc(n,t.authority,e.id_token||"",t.clientId,i.tid||""),g=t.tokenType===Oe.POP?P.SHR_NONCE_VALIDITY:(typeof e.expires_in=="string"?parseInt(e.expires_in,10):e.expires_in)||0,m=d+g,v=this.generateScopes(e,t),C=Pc(n,t.authority,s,t.clientId,i.tid||l,v.printScopes(),m,0,nr,void 0,t.tokenType,void 0,t.keyId),S={idToken:f,accessToken:C};this.nativeStorageManager.saveCacheRecord(S,t.storeInCache)}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}validateNativeResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw Sy(zd,"Response missing expected properties.")}getMATSFromResponse(e){if(e.properties.MATS)try{return JSON.parse(e.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return typeof e.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const n=new ye(t);n.validateAsUri();const{scopes:i,...s}=e,l=new Je(i||[]);l.appendScopes(yi);const d=()=>{switch(this.apiId){case Le.ssoSilent:case Le.acquireTokenSilent_silentFlow:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),dt.NONE}if(!e.prompt){this.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(e.prompt){case dt.NONE:case dt.CONSENT:case dt.LOGIN:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e.prompt;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e.prompt} is not compatible with native flow`),G(zC)}},f={...s,accountId:this.accountId,clientId:this.config.auth.clientId,authority:n.urlString,scope:l.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:d(),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(f.signPopToken&&e.popKid)throw G(qC);if(this.handleExtraBrokerParams(f),f.extraParameters=f.extraParameters||{},f.extraParameters.telemetry=si.MATS_TELEMETRY,e.authenticationScheme===Oe.POP){const g={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},m=new mi(this.browserCrypto);let v;if(f.keyId)v=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:f.keyId})),f.signPopToken=!1;else{const C=await F(m.generateCnf.bind(m),k.PopTokenGenerateCnf,this.logger,this.performanceClient,e.correlationId)(g,this.logger);v=C.reqCnfString,f.keyId=C.kid,f.signPopToken=!0}f.reqCnf=v}return this.addRequestSKUs(f),f}handleExtraBrokerParams(e){var s;const t=e.extraParameters&&e.extraParameters.hasOwnProperty(ch)&&e.extraParameters.hasOwnProperty(md)&&e.extraParameters.hasOwnProperty(mo);if(!e.embeddedClientId&&!t)return;let n="";const i=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,n=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[md],n=e.extraParameters[mo]),e.extraParameters={child_client_id:n,child_redirect_uri:i},(s=this.performanceClient)==null||s.addFields({embeddedClientId:n,embeddedRedirectUri:i},e.correlationId)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Xn{constructor(e,t,n,i){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(k.NativeMessageHandlerHandshake)}async sendMessage(e){this.logger.trace("NativeMessageHandler - sendMessage called.");const t={channel:si.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:e};return this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii(`NativeMessageHandler - Sending request to browser extension: ${JSON.stringify(t)}`),this.messageChannel.port1.postMessage(t),new Promise((n,i)=>{this.resolvers.set(t.responseId,{resolve:n,reject:i})})}static async createProvider(e,t,n){e.trace("NativeMessageHandler - createProvider called.");try{const i=new Xn(e,t,n,si.PREFERRED_EXTENSION_ID);return await i.sendHandshakeRequest(),i}catch{const s=new Xn(e,t,n);return await s.sendHandshakeRequest(),s}}async sendHandshakeRequest(){this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:si.CHANNEL_ID,extensionId:this.extensionId,responseId:Sr(),body:{method:uo.HandshakeRequest}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=t=>{this.onChannelMessage(t)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new Promise((t,n)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:n}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),n(G(HC)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source!==window)return;const t=e.data;if(!(!t.channel||t.channel!==si.CHANNEL_ID)&&!(t.extensionId&&t.extensionId!==this.extensionId)&&t.body.method===uo.HandshakeRequest){const n=this.handshakeResolvers.get(t.responseId);if(!n){this.logger.trace(`NativeMessageHandler.onWindowMessage - resolver can't be found for request ${t.responseId}`);return}this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),n.reject(G($C))}}onChannelMessage(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");const t=e.data,n=this.resolvers.get(t.responseId),i=this.handshakeResolvers.get(t.responseId);try{const s=t.body.method;if(s===uo.Response){if(!n)return;const l=t.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii(`NativeMessageHandler - Received response from browser extension: ${JSON.stringify(l)}`),l.status!=="Success")n.reject(Ad(l.code,l.description,l.ext));else if(l.result)l.result.code&&l.result.description?n.reject(Ad(l.result.code,l.result.description,l.result.ext)):n.resolve(l.result);else throw Sy(zd,"Event does not contain result.");this.resolvers.delete(t.responseId)}else if(s===uo.HandshakeResponse){if(!i){this.logger.trace(`NativeMessageHandler.onChannelMessage - resolver can't be found for request ${t.responseId}`);return}clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(`NativeMessageHandler - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),i.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${s}`),this.logger.errorPii(`Unable to parse ${e}`),n?n.reject(s):i&&i.reject(s)}}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}static isNativeAvailable(e,t,n,i){if(t.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return t.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return t.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case Oe.BEARER:case Oe.POP:return t.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return t.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Ih{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async handleCodeResponse(e,t){this.performanceClient.addQueueMeasurement(k.HandleCodeResponse,t.correlationId);let n;try{n=this.authModule.handleFragmentResponse(e,t.state)}catch(i){throw i instanceof Gr&&i.subError===vo?G(vo):i}return F(this.handleCodeResponseFromServer.bind(this),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,t.correlationId)(n,t)}async handleCodeResponseFromServer(e,t,n=!0){if(this.performanceClient.addQueueMeasurement(k.HandleCodeResponseFromServer,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await F(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),n&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const s=this.createCcsCredentials(t);s&&(this.authCodeRequest.ccsCredential=s)}return await F(this.authModule.acquireToken.bind(this.authModule),k.AuthClientAcquireToken,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:on.HOME_ACCOUNT_ID}:e.loginHint?{credential:e.loginHint,type:on.UPN}:null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function sw(r,e,t){const n=dc(r);if(!n)throw aC(r)?(t.error(`A ${e} is present in the iframe but it does not contain known properties. It's likely that the ${e} has been replaced by code running on the redirectUri page.`),t.errorPii(`The ${e} detected is: ${r}`),G(_C)):(t.error(`The request has returned to the redirectUri but a ${e} is not present. It's likely that the ${e} has been removed or the page has been redirected by code running on the redirectUri page.`),G(wC));return n}function KD(r,e,t){if(!r.state)throw G(mh);const n=rw(e,r.state);if(!n)throw G(TC);if(n.interactionType!==t)throw G(EC)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class zD extends Ci{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=f}acquireToken(e){try{const n={popupName:this.generatePopupName(e.scopes||yi,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window};return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,n)):(this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),n.popup=this.openSizedPopup("about:blank",n),this.acquireTokenPopupAsync(e,n))}catch(t){return Promise.reject(t)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),n={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:(e==null?void 0:e.popupWindowAttributes)||{},popupWindowParent:(e==null?void 0:e.popupWindowParent)??window},i=e&&e.authority,s=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,n,i,s)):(this.logger.verbose("asyncPopup set to false, opening popup"),n.popup=this.openSizedPopup("about:blank",n),this.logoutPopupAsync(t,n,i,s))}catch(t){return Promise.reject(t)}}async acquireTokenPopupAsync(e,t){var s;this.logger.verbose("acquireTokenPopupAsync called");const n=this.initializeServerTelemetryManager(Le.acquireTokenPopup),i=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,J.Popup);nw(i.authority);try{const l=await F(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(i),d=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),f=Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme);let g;f&&(g=this.performanceClient.startMeasurement(k.FetchAccountIdWithNativeBroker,e.correlationId));const m=await d.getAuthCodeUrl({...i,nativeBroker:f}),v=new Ih(d,this.browserStorage,l,this.logger,this.performanceClient),C=this.initiateAuthRequest(m,t);this.eventHandler.emitEvent(te.POPUP_OPENED,J.Popup,{popupWindow:C},null);const S=await this.monitorPopupForHash(C,t.popupWindowParent),_=_o(sw,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(S,this.config.auth.OIDCOptions.serverResponseType,this.logger);if(Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,l),_.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),g&&g.end({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw G(Sa);const O=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,_.accountId,this.nativeStorage,i.correlationId),{userRequestState:$}=Vn.parseRequestState(this.browserCrypto,i.state);return await O.acquireToken({...i,state:$,prompt:void 0})}return await v.handleCodeResponse(_,i)}catch(l){throw(s=t.popup)==null||s.close(),l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),l}}async logoutPopupAsync(e,t,n,i){var l,d,f,g;this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(te.LOGOUT_START,J.Popup,e);const s=this.initializeServerTelemetryManager(Le.logoutPopup);try{await this.clearCacheOnLogout(e.account);const m=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:s,requestAuthority:n,account:e.account||void 0});try{m.authority.endSessionEndpoint}catch{if((l=e.account)!=null&&l.homeAccountId&&e.postLogoutRedirectUri&&m.authority.protocolMode===Tr.OIDC){if(this.browserStorage.removeAccount((d=e.account)==null?void 0:d.homeAccountId),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Popup,e),i){const S={apiId:Le.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},_=ye.getAbsoluteUrl(i,Cr());await this.navigationClient.navigateInternal(_,S)}(f=t.popup)==null||f.close();return}}const v=m.getLogoutUri(e);this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Popup,e);const C=this.openPopup(v,t);if(this.eventHandler.emitEvent(te.POPUP_OPENED,J.Popup,{popupWindow:C},null),await this.monitorPopupForHash(C,t.popupWindowParent).catch(()=>{}),i){const S={apiId:Le.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},_=ye.getAbsoluteUrl(i,Cr());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${_}`),await this.navigationClient.navigateInternal(_,S)}else this.logger.verbose("No main window navigation requested")}catch(m){throw(g=t.popup)==null||g.close(),m instanceof He&&(m.setCorrelationId(this.correlationId),s.cacheFailedRequest(m)),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,J.Popup,null,m),this.eventHandler.emitEvent(te.LOGOUT_END,J.Popup),m}this.eventHandler.emitEvent(te.LOGOUT_END,J.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),G(Bc)}monitorPopupForHash(e,t){return new Promise((n,i)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const s=setInterval(()=>{if(e.closed){this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(s),i(G(vo));return}let l="";try{l=e.location.href}catch{}if(!l||l==="about:blank")return;clearInterval(s);let d="";const f=this.config.auth.OIDCOptions.serverResponseType;e&&(f===Ea.QUERY?d=e.location.search:d=e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),n(d)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let n;if(t.popup?(n=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),n.location.assign(e)):typeof t.popup>"u"&&(this.logger.verbosePii(`Opening popup window to: ${e}`),n=this.openSizedPopup(e,t)),!n)throw G(bC);return n.focus&&n.focus(),this.currentWindow=n,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),n}catch(n){throw this.logger.error("error opening popup "+n.message),this.browserStorage.setInteractionInProgress(!1),G(AC)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:n,popupWindowParent:i}){var S,_,b,O;const s=i.screenLeft?i.screenLeft:i.screenX,l=i.screenTop?i.screenTop:i.screenY,d=i.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=i.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let g=(S=n.popupSize)==null?void 0:S.width,m=(_=n.popupSize)==null?void 0:_.height,v=(b=n.popupPosition)==null?void 0:b.top,C=(O=n.popupPosition)==null?void 0:O.left;return(!g||g<0||g>d)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),g=tn.POPUP_WIDTH),(!m||m<0||m>f)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),m=tn.POPUP_HEIGHT),(!v||v<0||v>f)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),v=Math.max(0,f/2-tn.POPUP_HEIGHT/2+l)),(!C||C<0||C>d)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),C=Math.max(0,d/2-tn.POPUP_WIDTH/2+s)),i.open(e,t,`width=${g}, height=${m}, top=${v}, left=${C}, scrollbars=yes`)}unloadWindow(e){this.browserStorage.cleanRequestByInteractionType(J.Popup),this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)}generatePopupName(e,t){return`${tn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${tn.POPUP_NAME_PREFIX}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class Sp{constructor(e,t,n,i,s){this.authModule=e,this.browserStorage=t,this.authCodeRequest=n,this.logger=i,this.performanceClient=s}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){t.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,t.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(ke.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest),this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const n={apiId:Le.acquireTokenRedirect,timeout:t.redirectTimeout,noHistory:!1};if(typeof t.onRedirectNavigate=="function")if(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),t.onRedirectNavigate(e)!==!1){this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),await t.navigationClient.navigateExternal(e,n);return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation");return}else{this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),await t.navigationClient.navigateExternal(e,n);return}}else throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),G(Bc)}async handleCodeResponse(e,t){this.logger.verbose("RedirectHandler.handleCodeResponse called"),this.browserStorage.setInteractionInProgress(!1);const n=this.browserStorage.generateStateKey(t),i=this.browserStorage.getTemporaryCache(n);if(!i)throw B(sc,"Cached State");let s;try{s=this.authModule.handleFragmentResponse(e,i)}catch(g){throw g instanceof Gr&&g.subError===vo?G(vo):g}const l=this.browserStorage.generateNonceKey(i),d=this.browserStorage.getTemporaryCache(l);if(this.authCodeRequest.code=s.code,s.cloud_instance_host_name&&await F(this.authModule.updateAuthority.bind(this.authModule),k.UpdateTokenEndpointAuthority,this.logger,this.performanceClient,this.authCodeRequest.correlationId)(s.cloud_instance_host_name,this.authCodeRequest.correlationId),s.nonce=d||void 0,s.state=i,s.client_info)this.authCodeRequest.clientInfo=s.client_info;else{const g=this.checkCcsCredentials();g&&(this.authCodeRequest.ccsCredential=g)}const f=await this.authModule.acquireToken(this.authCodeRequest,s);return this.browserStorage.cleanRequestByState(t),f}checkCcsCredentials(){const e=this.browserStorage.getTemporaryCache(ke.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii(`Cache credential could not be parsed: ${e}`)}return null}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function WD(){if(typeof window>"u"||typeof window.performance>"u"||typeof window.performance.getEntriesByType!="function")return;const r=window.performance.getEntriesByType("navigation"),e=r.length?r[0]:void 0;return e==null?void 0:e.type}class qD extends Ci{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,d,g,m),this.nativeStorage=f}async acquireToken(e){const t=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,this.correlationId)(e,J.Redirect);this.browserStorage.updateCacheEntries(t.state,t.nonce,t.authority,t.loginHint||"",t.account||null);const n=this.initializeServerTelemetryManager(Le.acquireTokenRedirect),i=s=>{s.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.cleanRequestByState(t.state),this.eventHandler.emitEvent(te.RESTORE_FROM_BFCACHE,J.Redirect))};try{const s=await F(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,this.correlationId)(t),l=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),d=new Sp(l,this.browserStorage,s,this.logger,this.performanceClient),f=await l.getAuthCodeUrl({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,e.authenticationScheme)}),g=this.getRedirectStartPage(e.redirectStartPage);return this.logger.verbosePii(`Redirect start page: ${g}`),window.addEventListener("pageshow",i),await d.initiateAuthRequest(f,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:g,onRedirectNavigate:e.onRedirectNavigate||this.config.auth.onRedirectNavigate})}catch(s){throw s instanceof He&&(s.setCorrelationId(this.correlationId),n.cacheFailedRequest(s)),window.removeEventListener("pageshow",i),this.browserStorage.cleanRequestByState(t.state),s}}async handleRedirectPromise(e="",t){const n=this.initializeServerTelemetryManager(Le.handleRedirectPromise);try{if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const[i,s]=this.getRedirectResponse(e||"");if(!i)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(J.Redirect),WD()!=="back_forward"?t.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const l=this.browserStorage.getTemporaryCache(ke.ORIGIN_URI,!0)||P.EMPTY_STRING,d=ye.removeHashFromUrl(l),f=ye.removeHashFromUrl(window.location.href);if(d===f&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),l.indexOf("#")>-1&&Zx(l),await this.handleResponse(i,n);if(this.config.auth.navigateToLoginRequestUrl){if(!Eh()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(ke.URL_HASH,s,!0);const g={apiId:Le.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let m=!0;if(!l||l==="null"){const v=tD();this.browserStorage.setTemporaryCache(ke.ORIGIN_URI,v,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),m=await this.navigationClient.navigateInternal(v,g)}else this.logger.verbose(`Navigating to loginRequestUrl: ${l}`),m=await this.navigationClient.navigateInternal(l,g);if(!m)return await this.handleResponse(i,n)}}else return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(i,n);return null}catch(i){throw i instanceof He&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),this.browserStorage.cleanRequestByInteractionType(J.Redirect),i}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(this.config.auth.OIDCOptions.serverResponseType===Ea.QUERY?t=window.location.search:t=window.location.hash);let n=dc(t);if(n){try{KD(n,this.browserCrypto,J.Redirect)}catch(s){return s instanceof He&&this.logger.error(`Interaction type validation failed due to ${s.errorCode}: ${s.errorMessage}`),[null,""]}return Xx(window),this.logger.verbose("Hash contains known properties, returning response hash"),[n,t]}const i=this.browserStorage.getTemporaryCache(ke.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(ke.URL_HASH)),i&&(n=dc(i),n)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[n,i]):[null,""]}async handleResponse(e,t){const n=e.state;if(!n)throw G(mh);const i=this.browserStorage.getCachedRequest(n);if(this.logger.verbose("handleResponse called, retrieved cached request"),e.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw G(Sa);const f=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,e.accountId,this.nativeStorage,i.correlationId),{userRequestState:g}=Vn.parseRequestState(this.browserCrypto,n);return f.acquireToken({...i,state:g,prompt:void 0}).finally(()=>{this.browserStorage.cleanRequestByState(n)})}const s=this.browserStorage.getCachedAuthority(n);if(!s)throw G(ph);const l=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:s});return Jn.removeThrottle(this.browserStorage,this.config.auth.clientId,i),new Sp(l,this.browserStorage,i,this.logger,this.performanceClient).handleCodeResponse(e,n)}async logout(e){var i,s;this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),n=this.initializeServerTelemetryManager(Le.logout);try{this.eventHandler.emitEvent(te.LOGOUT_START,J.Redirect,e),await this.clearCacheOnLogout(t.account);const l={apiId:Le.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},d=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:e&&e.authority,requestExtraQueryParameters:e==null?void 0:e.extraQueryParameters,account:e&&e.account||void 0});if(d.authority.protocolMode===Tr.OIDC)try{d.authority.endSessionEndpoint}catch{if((i=t.account)!=null&&i.homeAccountId){this.browserStorage.removeAccount((s=t.account)==null?void 0:s.homeAccountId),this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Redirect,t);return}}const f=d.getLogoutUri(t);if(this.eventHandler.emitEvent(te.LOGOUT_SUCCESS,J.Redirect,t),e&&typeof e.onRedirectNavigate=="function")if(e.onRedirectNavigate(f)!==!1){this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,l);return}else this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation");else{this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),await this.navigationClient.navigateExternal(f,l);return}}catch(l){throw l instanceof He&&(l.setCorrelationId(this.correlationId),n.cacheFailedRequest(l)),this.eventHandler.emitEvent(te.LOGOUT_FAILURE,J.Redirect,null,l),this.eventHandler.emitEvent(te.LOGOUT_END,J.Redirect),l}this.eventHandler.emitEvent(te.LOGOUT_END,J.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return ye.getAbsoluteUrl(t,Cr())}}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function GD(r,e,t,n,i){if(e.addQueueMeasurement(k.SilentHandlerInitiateAuthRequest,n),!r)throw t.info("Navigate url is empty"),G(Bc);return i?F(YD,k.SilentHandlerLoadFrame,t,e,n)(r,i,e,n):_o(JD,k.SilentHandlerLoadFrameSync,t,e,n)(r)}async function jD(r,e,t,n,i,s,l){return n.addQueueMeasurement(k.SilentHandlerMonitorIframeForHash,s),new Promise((d,f)=>{e<Td&&i.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${e}ms) than the default (${Td}ms). This may result in timeouts.`);const g=window.setTimeout(()=>{window.clearInterval(m),f(G(IC))},e),m=window.setInterval(()=>{let v="";const C=r.contentWindow;try{v=C?C.location.href:""}catch{}if(!v||v==="about:blank")return;let S="";C&&(l===Ea.QUERY?S=C.location.search:S=C.location.hash),window.clearTimeout(g),window.clearInterval(m),d(S)},t)}).finally(()=>{_o(QD,k.RemoveHiddenIframe,i,n,s)(r)})}function YD(r,e,t,n){return t.addQueueMeasurement(k.SilentHandlerLoadFrame,n),new Promise((i,s)=>{const l=cw();window.setTimeout(()=>{if(!l){s("Unable to load iframe");return}l.src=r,i(l)},e)})}function JD(r){const e=cw();return e.src=r,e}function cw(){const r=document.createElement("iframe");return r.className="msalSilentIframe",r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(r),r}function QD(r){document.body===r.parentNode&&document.body.removeChild(r)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class XD extends Ci{constructor(e,t,n,i,s,l,d,f,g,m,v){super(e,t,n,i,s,l,f,m,v),this.apiId=d,this.nativeStorage=g}async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentIframeClientAcquireToken,e.correlationId),!e.loginHint&&!e.sid&&(!e.account||!e.account.username)&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==dt.NONE&&t.prompt!==dt.NO_SESSION&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${dt.NONE}`),t.prompt=dt.NONE):t.prompt=dt.NONE;const n=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,J.Silent);nw(n.authority);const i=this.initializeServerTelemetryManager(this.apiId);let s;try{return s=await F(this.createAuthCodeClient.bind(this),k.StandardInteractionClientCreateAuthCodeClient,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:i,requestAuthority:n.authority,requestAzureCloudOptions:n.azureCloudOptions,requestExtraQueryParameters:n.extraQueryParameters,account:n.account}),await F(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,e.correlationId)(s,n)}catch(l){if(l instanceof He&&(l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l)),!s||!(l instanceof He)||l.errorCode!==tn.INVALID_GRANT_ERROR)throw l;this.performanceClient.addFields({retryError:l.errorCode},this.correlationId);const d=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(t,J.Silent);return await F(this.silentTokenHelper.bind(this),k.SilentIframeClientTokenHelper,this.logger,this.performanceClient,this.correlationId)(s,d)}}logout(){return Promise.reject(G(Uc))}async silentTokenHelper(e,t){const n=t.correlationId;this.performanceClient.addQueueMeasurement(k.SilentIframeClientTokenHelper,n);const i=await F(this.initializeAuthorizationCodeRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationCodeRequest,this.logger,this.performanceClient,n)(t),s=await F(e.getAuthCodeUrl.bind(e),k.GetAuthCodeUrl,this.logger,this.performanceClient,n)({...t,nativeBroker:Xn.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,t.authenticationScheme)}),l=new Ih(e,this.browserStorage,i,this.logger,this.performanceClient),d=await F(GD,k.SilentHandlerInitiateAuthRequest,this.logger,this.performanceClient,n)(s,this.performanceClient,this.logger,n,this.config.system.navigateFrameWait),f=this.config.auth.OIDCOptions.serverResponseType,g=await F(jD,k.SilentHandlerMonitorIframeForHash,this.logger,this.performanceClient,n)(d,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,n,f),m=_o(sw,k.DeserializeResponse,this.logger,this.performanceClient,this.correlationId)(g,f,this.logger);if(m.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw G(Sa);const v=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,m.accountId,this.browserStorage,n),{userRequestState:C}=Vn.parseRequestState(this.browserCrypto,t.state);return F(v.acquireToken.bind(v),k.NativeInteractionClientAcquireToken,this.logger,this.performanceClient,n)({...t,state:C,prompt:t.prompt||dt.NONE})}return F(l.handleCodeResponse.bind(l),k.HandleCodeResponse,this.logger,this.performanceClient,n)(m,t)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class ZD extends Ci{async acquireToken(e){this.performanceClient.addQueueMeasurement(k.SilentRefreshClientAcquireToken,e.correlationId);const t=await F(bh,k.InitializeBaseRequest,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),n={...e,...t};e.redirectUri&&(n.redirectUri=this.getRedirectUri(e.redirectUri));const i=this.initializeServerTelemetryManager(Le.acquireTokenSilent_silentFlow),s=await this.createRefreshTokenClient({serverTelemetryManager:i,authorityUrl:n.authority,azureCloudOptions:n.azureCloudOptions,account:n.account});return F(s.acquireTokenByRefreshToken.bind(s),k.RefreshTokenClientAcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(n).catch(l=>{throw l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),l})}logout(){return Promise.reject(G(Uc))}async createRefreshTokenClient(e){const t=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new vd(t,this.performanceClient)}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class eL{constructor(e,t,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=t,this.logger=n,this.cryptoObj=i}loadExternalTokens(e,t,n){if(!this.isBrowserEnvironment)throw G(Vc);const i=t.id_token?wo(t.id_token,nr):void 0,s={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},l=e.authority?new St(St.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,s,this.logger,e.correlationId||Sr()):void 0,d=this.loadAccount(e,n.clientInfo||t.client_info||"",i,l),f=this.loadIdToken(t,d.homeAccountId,d.environment,d.realm),g=this.loadAccessToken(e,t,d.homeAccountId,d.environment,d.realm,n),m=this.loadRefreshToken(t,d.homeAccountId,d.environment);return this.generateAuthenticationResult(e,{account:d,idToken:f,accessToken:g,refreshToken:m},i,l)}loadAccount(e,t,n,i){if(this.logger.verbose("TokenCache - loading account"),e.account){const f=at.createFromAccountInfo(e.account);return this.storage.setAccount(f),f}else if(!i||!t&&!n)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),G(LC);const s=at.generateHomeAccountId(t,i.authorityType,this.logger,this.cryptoObj,n),l=n==null?void 0:n.tid,d=dh(this.storage,i,s,nr,n,t,i.hostnameAndPort,l,void 0,void 0,this.logger);return this.storage.setAccount(d),d}loadIdToken(e,t,n,i){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const s=Nc(t,n,e.id_token,this.config.auth.clientId,i);return this.storage.setIdTokenCredential(s),s}loadAccessToken(e,t,n,i,s,l){if(t.access_token)if(t.expires_in){if(!t.scope&&(!e.scopes||!e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null}else return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;else return this.logger.verbose("TokenCache - no access token found in response"),null;this.logger.verbose("TokenCache - loading access token");const d=t.scope?Je.fromString(t.scope):new Je(e.scopes),f=l.expiresOn||t.expires_in+new Date().getTime()/1e3,g=l.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+new Date().getTime()/1e3,m=Pc(n,i,t.access_token,this.config.auth.clientId,s,d.printScopes(),f,g,nr);return this.storage.setAccessTokenCredential(m),m}loadRefreshToken(e,t,n){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const i=zy(t,n,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return this.storage.setRefreshTokenCredential(i),i}generateAuthenticationResult(e,t,n,i){var m,v,C;let s="",l=[],d=null,f;t!=null&&t.accessToken&&(s=t.accessToken.secret,l=Je.fromString(t.accessToken.target).asArray(),d=new Date(Number(t.accessToken.expiresOn)*1e3),f=new Date(Number(t.accessToken.extendedExpiresOn)*1e3));const g=t.account;return{authority:i?i.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:l,account:g.getAccountInfo(),idToken:((m=t.idToken)==null?void 0:m.secret)||"",idTokenClaims:n||{},accessToken:s,fromCache:!0,expiresOn:d,correlationId:e.correlationId||"",requestId:"",extExpiresOn:f,familyId:((v=t.refreshToken)==null?void 0:v.familyId)||"",tokenType:((C=t==null?void 0:t.accessToken)==null?void 0:C.tokenType)||"",state:e.state||"",cloudGraphHostName:g.cloudGraphHostName||"",msGraphHost:g.msGraphHost||"",fromNativeBroker:!1}}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class tL extends pC{constructor(e){super(e),this.includeRedirectUri=!1}}/*! @azure/msal-browser v3.28.1 2025-01-14 */class nL extends Ci{constructor(e,t,n,i,s,l,d,f,g,m){super(e,t,n,i,s,l,f,g,m),this.apiId=d}async acquireToken(e){if(!e.code)throw G(BC);const t=await F(this.initializeAuthorizationRequest.bind(this),k.StandardInteractionClientInitializeAuthorizationRequest,this.logger,this.performanceClient,e.correlationId)(e,J.Silent),n=this.initializeServerTelemetryManager(this.apiId);try{const i={...t,code:e.code},s=await F(this.getClientConfiguration.bind(this),k.StandardInteractionClientGetClientConfiguration,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:n,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),l=new tL(s);this.logger.verbose("Auth code client created");const d=new Ih(l,this.browserStorage,i,this.logger,this.performanceClient);return await F(d.handleCodeResponseFromServer.bind(d),k.HandleCodeResponseFromServer,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(i){throw i instanceof He&&(i.setCorrelationId(this.correlationId),n.cacheFailedRequest(i)),i}}logout(){return Promise.reject(G(Uc))}}/*! @azure/msal-browser v3.28.1 2025-01-14 */function Gn(r){const e=r==null?void 0:r.idTokenClaims;if(e!=null&&e.tfp||e!=null&&e.acr)return"B2C";if(e!=null&&e.tid){if((e==null?void 0:e.tid)==="9188040d-6c67-4c5b-b112-36a304b66dad")return"MSA"}else return;return"AAD"}function Ps(r,e){try{Sh(r)}catch(t){throw e.end({success:!1},t),t}}class $c{constructor(e){this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new pi(this.logger,this.performanceClient):cc,this.eventHandler=new kD(this.logger),this.browserStorage=this.isBrowserEnvironment?new Sd(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,px(this.config.auth),this.performanceClient):wD(this.config.auth.clientId,this.logger);const t={cacheLocation:Ht.MemoryStorage,temporaryCacheLocation:Ht.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new Sd(this.config.auth.clientId,t,this.browserCrypto,this.logger,void 0,this.performanceClient),this.tokenCache=new eL(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this),this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}static async createController(e,t){const n=new $c(e);return await n.initialize(t),n}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e){if(this.logger.trace("initialize called"),this.initialized){this.logger.info("initialize has already been called, exiting early.");return}if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END);return}const t=(e==null?void 0:e.correlationId)||this.getRequestCorrelationId(),n=this.config.system.allowNativeBroker,i=this.performanceClient.startMeasurement(k.InitializeClientApplication,t);if(this.eventHandler.emitEvent(te.INITIALIZE_START),n)try{this.nativeExtensionProvider=await Xn.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)}catch(s){this.logger.verbose(s)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),await F(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),k.ClearTokensAndKeysWithClaims,this.logger,this.performanceClient,t)(this.performanceClient,t)),this.initialized=!0,this.eventHandler.emitEvent(te.INITIALIZE_END),i.end({allowNativeBroker:n,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),tw(this.initialized),this.isBrowserEnvironment){const t=e||"";let n=this.redirectResponse.get(t);return typeof n>"u"?(n=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,n),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),n}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){const t=this.getAllAccounts(),n=this.browserStorage.getCachedNativeRequest(),i=n&&Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e,s=i?n==null?void 0:n.correlationId:this.browserStorage.getTemporaryCache(ke.CORRELATION_ID,!0)||"",l=this.performanceClient.startMeasurement(k.AcquireTokenRedirect,s);this.eventHandler.emitEvent(te.HANDLE_REDIRECT_START,J.Redirect);let d;if(i&&this.nativeExtensionProvider){this.logger.trace("handleRedirectPromise - acquiring token from native platform");const f=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,n.accountId,this.nativeInternalStorage,n.correlationId);d=F(f.handleRedirectPromise.bind(f),k.HandleNativeRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(this.performanceClient,l.event.correlationId)}else{this.logger.trace("handleRedirectPromise - acquiring token from web flow");const f=this.createRedirectClient(s);d=F(f.handleRedirectPromise.bind(f),k.HandleRedirectPromiseMeasurement,this.logger,this.performanceClient,l.event.correlationId)(e,l)}return d.then(f=>(f?(t.length<this.getAllAccounts().length?(this.eventHandler.emitEvent(te.LOGIN_SUCCESS,J.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, login success")):(this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,J.Redirect,f),this.logger.verbose("handleRedirectResponse returned result, acquire token success")),l.end({success:!0,accountType:Gn(f.account)})):l.event.errorCode?l.end({success:!1}):l.discard(),this.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,J.Redirect),f)).catch(f=>{const g=f;throw t.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Redirect,null,g):this.eventHandler.emitEvent(te.LOGIN_FAILURE,J.Redirect,null,g),this.eventHandler.emitEvent(te.HANDLE_REDIRECT_END,J.Redirect),l.end({success:!1},g),f})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenPreRedirect,t);n.add({accountType:Gn(e.account),scenarioId:e.scenarioId});const i=e.onRedirectNavigate;if(i)e.onRedirectNavigate=l=>{const d=typeof i=="function"?i(l):void 0;return d!==!1?n.end({success:!0}):n.discard(),d};else{const l=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=d=>{const f=typeof l=="function"?l(d):void 0;return f!==!1?n.end({success:!0}):n.discard(),f}}const s=this.getAllAccounts().length>0;try{wp(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),s?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,J.Redirect,e):this.eventHandler.emitEvent(te.LOGIN_START,J.Redirect,e);let l;return this.nativeExtensionProvider&&this.canUseNative(e)?l=new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,n).catch(f=>{if(f instanceof Qn&&ei(f))return this.nativeExtensionProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(f instanceof Fn)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),f}):l=this.createRedirectClient(t).acquireToken(e),await l}catch(l){throw n.end({success:!1},l),s?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Redirect,null,l):this.eventHandler.emitEvent(te.LOGIN_FAILURE,J.Redirect,null,l),l}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenPopup,t);n.add({scenarioId:e.scenarioId,accountType:Gn(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Ps(this.initialized,n),this.browserStorage.setInteractionInProgress(!0)}catch(l){return Promise.reject(l)}const i=this.getAllAccounts();i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,J.Popup,e):this.eventHandler.emitEvent(te.LOGIN_START,J.Popup,e);let s;return this.canUseNative(e)?s=this.acquireTokenNative({...e,correlationId:t},Le.acquireTokenPopup).then(l=>(this.browserStorage.setInteractionInProgress(!1),n.end({success:!0,isNativeBroker:!0,accountType:Gn(l.account)}),l)).catch(l=>{if(l instanceof Qn&&ei(l))return this.nativeExtensionProvider=void 0,this.createPopupClient(t).acquireToken(e);if(l instanceof Fn)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e);throw this.browserStorage.setInteractionInProgress(!1),l}):s=this.createPopupClient(t).acquireToken(e),s.then(l=>(i.length<this.getAllAccounts().length?this.eventHandler.emitEvent(te.LOGIN_SUCCESS,J.Popup,l):this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,J.Popup,l),n.end({success:!0,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Gn(l.account)}),l)).catch(l=>(i.length>0?this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Popup,null,l):this.eventHandler.emitEvent(te.LOGIN_FAILURE,J.Popup,null,l),n.end({success:!1},l),Promise.reject(l)))}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){var s,l;const t=this.getRequestCorrelationId(e),n={...e,prompt:e.prompt,correlationId:t};this.ssoSilentMeasurement=this.performanceClient.startMeasurement(k.SsoSilent,t),(s=this.ssoSilentMeasurement)==null||s.add({scenarioId:e.scenarioId,accountType:Gn(e.account)}),Ps(this.initialized,this.ssoSilentMeasurement),(l=this.ssoSilentMeasurement)==null||l.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent(te.SSO_SILENT_START,J.Silent,n);let i;return this.canUseNative(n)?i=this.acquireTokenNative(n,Le.ssoSilent).catch(d=>{if(d instanceof Qn&&ei(d))return this.nativeExtensionProvider=void 0,this.createSilentIframeClient(n.correlationId).acquireToken(n);throw d}):i=this.createSilentIframeClient(n.correlationId).acquireToken(n),i.then(d=>{var f;return this.eventHandler.emitEvent(te.SSO_SILENT_SUCCESS,J.Silent,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!0,isNativeBroker:d.fromNativeBroker,accessTokenSize:d.accessToken.length,idTokenSize:d.idToken.length,accountType:Gn(d.account)}),d}).catch(d=>{var f;throw this.eventHandler.emitEvent(te.SSO_SILENT_FAILURE,J.Silent,null,d),(f=this.ssoSilentMeasurement)==null||f.end({success:!1},d),d}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const n=this.performanceClient.startMeasurement(k.AcquireTokenByCode,t);Ps(this.initialized,n),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_START,J.Silent,e),n.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw G(VC);if(e.code){const i=e.code;let s=this.hybridAuthCodeResponses.get(i);return s?(this.logger.verbose("Existing acquireTokenByCode request found",t),n.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),s=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(l=>(this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_SUCCESS,J.Silent,l),this.hybridAuthCodeResponses.delete(i),n.end({success:!0,isNativeBroker:l.fromNativeBroker,accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length,accountType:Gn(l.account)}),l)).catch(l=>{throw this.hybridAuthCodeResponses.delete(i),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,J.Silent,null,l),n.end({success:!1},l),l}),this.hybridAuthCodeResponses.set(i,s)),await s}else if(e.nativeAccountId)if(this.canUseNative(e,e.nativeAccountId)){const i=await this.acquireTokenNative({...e,correlationId:t},Le.acquireTokenByCode,e.nativeAccountId).catch(s=>{throw s instanceof Qn&&ei(s)&&(this.nativeExtensionProvider=void 0),s});return n.end({accountType:Gn(i.account),success:!0}),i}else throw G(FC);else throw G(UC)}catch(i){throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_BY_CODE_FAILURE,J.Silent,null,i),n.end({success:!1},i),i}}async acquireTokenByCodeAsync(e){var i;return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(k.AcquireTokenByCodeAsync,e.correlationId),(i=this.acquireTokenByCodeAsyncMeasurement)==null||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),await this.createSilentAuthCodeClient(e.correlationId).acquireToken(e).then(s=>{var l;return(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker}),s}).catch(s=>{var l;throw(l=this.acquireTokenByCodeAsyncMeasurement)==null||l.end({success:!1},s),s}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenFromCache,e.correlationId),t){case Zt.Default:case Zt.AccessToken:case Zt.AccessTokenAndRefreshToken:const n=this.createSilentCacheClient(e.correlationId);return F(n.acquireToken.bind(n),k.SilentCacheClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(yr)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(k.AcquireTokenByRefreshToken,e.correlationId),t){case Zt.Default:case Zt.AccessTokenAndRefreshToken:case Zt.RefreshToken:case Zt.RefreshTokenAndNetwork:const n=this.createSilentRefreshClient(e.correlationId);return F(n.acquireToken.bind(n),k.SilentRefreshClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e);default:throw B(yr)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(k.AcquireTokenBySilentIframe,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return F(t.acquireToken.bind(t),k.SilentIframeClientAcquireToken,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return wp(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Sh(this.initialized),this.browserStorage.setInteractionInProgress(!0),this.createPopupClient(t).logout(e)}catch(t){return Promise.reject(t)}}async clearCache(e){if(!this.isBrowserEnvironment){this.logger.info("in non-browser environment, returning early.");return}const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){return _D(this.logger,this.browserStorage,this.isBrowserEnvironment,e)}getAccount(e){return TD(e,this.logger,this.browserStorage)}getAccountByUsername(e){return ED(e,this.logger,this.browserStorage)}getAccountByHomeId(e){return SD(e,this.logger,this.browserStorage)}getAccountByLocalId(e){return AD(e,this.logger,this.browserStorage)}setActiveAccount(e){bD(e,this.browserStorage)}getActiveAccount(){return ID(this.browserStorage)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const n=at.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return this.browserStorage.setAccount(n),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,n){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw G(Sa);return new ui(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e)}canUseNative(e,t){if(this.logger.trace("canUseNative called"),!Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case dt.NONE:case dt.CONSENT:case dt.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace(`canUseNative: prompt = ${e.prompt} is not compatible with native flow, returning false`),!1}return!t&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new zD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createRedirectClient(e){return new qD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentIframeClient(e){return new XD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)}createSilentCacheClient(e){return new aw(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentRefreshClient(e){return new ZD(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)}createSilentAuthCodeClient(e){return new nL(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Le.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return ew(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))}disableAccountStorageEvents(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))}handleAccountCacheChange(e){var t;try{(t=e.key)!=null&&t.includes(ct.ACTIVE_ACCOUNT_FILTERS)&&this.eventHandler.emitEvent(te.ACTIVE_ACCOUNT_CHANGED);const n=e.newValue||e.oldValue;if(!n)return;const i=JSON.parse(n);if(typeof i!="object"||!at.isAccountEntity(i))return;const l=gi.toObject(new at,i).getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.eventHandler.emitEvent(te.ACCOUNT_ADDED,void 0,l)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.eventHandler.emitEvent(te.ACCOUNT_REMOVED,void 0,l))}catch{return}}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?Sr():P.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||vp})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||vp})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),n=this.performanceClient.startMeasurement(k.AcquireTokenSilent,t);n.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Ps(this.initialized,n),this.logger.verbose("acquireTokenSilent called",t);const i=e.account||this.getActiveAccount();if(!i)throw G(NC);n.add({accountType:Gn(i)});const s={clientId:this.config.auth.clientId,authority:e.authority||P.EMPTY_STRING,scopes:e.scopes,homeAccountIdentifier:i.homeAccountId,claims:e.claims,authenticationScheme:e.authenticationScheme,resourceRequestMethod:e.resourceRequestMethod,resourceRequestUri:e.resourceRequestUri,shrClaims:e.shrClaims,sshKid:e.sshKid,shrOptions:e.shrOptions},l=JSON.stringify(s),d=this.activeSilentTokenRequests.get(l);if(typeof d>"u"){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",t);const f=F(this.acquireTokenSilentAsync.bind(this),k.AcquireTokenSilentAsync,this.logger,this.performanceClient,t)({...e,correlationId:t},i).then(g=>(this.activeSilentTokenRequests.delete(l),n.end({success:!0,fromCache:g.fromCache,isNativeBroker:g.fromNativeBroker,cacheLookupPolicy:e.cacheLookupPolicy,accessTokenSize:g.accessToken.length,idTokenSize:g.idToken.length}),g)).catch(g=>{throw this.activeSilentTokenRequests.delete(l),n.end({success:!1},g),g});return this.activeSilentTokenRequests.set(l,f),{...await f,state:e.state}}else return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",t),n.discard(),{...await d,state:e.state}}async acquireTokenSilentAsync(e,t){const n=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(k.AcquireTokenSilentAsync,e.correlationId),this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_START,J.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",n);const i=await F(MD,k.InitializeSilentRequest,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),s=e.cacheLookupPolicy||Zt.Default;return this.acquireTokenSilentNoIframe(i,s).catch(async d=>{if(rL(d,s))if(this.activeIframeRequest)if(s!==Zt.Skip){const[g,m]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${m}`,i.correlationId);const v=this.performanceClient.startMeasurement(k.AwaitConcurrentIframe,i.correlationId);v.add({awaitIframeCorrelationId:m});const C=await g;if(v.end({success:C}),C)return this.logger.verbose(`Parallel iframe request with correlationId: ${m} succeeded. Retrying cache and/or RT redemption`,i.correlationId),this.acquireTokenSilentNoIframe(i,s);throw this.logger.info(`Iframe request with correlationId: ${m} failed. Interaction is required.`),d}else return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",i.correlationId),F(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i);else{let g;return this.activeIframeRequest=[new Promise(m=>{g=m}),i.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",i.correlationId),F(this.acquireTokenBySilentIframe.bind(this),k.AcquireTokenBySilentIframe,this.logger,this.performanceClient,i.correlationId)(i).then(m=>(g(!0),m)).catch(m=>{throw g(!1),m}).finally(()=>{this.activeIframeRequest=void 0})}else throw d}).then(d=>(this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_SUCCESS,J.Silent,d),e.correlationId&&this.performanceClient.addFields({fromCache:d.fromCache,isNativeBroker:d.fromNativeBroker},e.correlationId),d)).catch(d=>{throw this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_FAILURE,J.Silent,null,d),d}).finally(()=>{document.removeEventListener("visibilitychange",n)})}async acquireTokenSilentNoIframe(e,t){return Xn.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.acquireTokenNative(e,Le.acquireTokenSilent_silentFlow).catch(async n=>{throw n instanceof Qn&&ei(n)?(this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,B(yr)):n})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),F(this.acquireTokenFromCache.bind(this),k.AcquireTokenFromCache,this.logger,this.performanceClient,e.correlationId)(e,t).catch(n=>{if(t===Zt.AccessToken)throw n;return this.eventHandler.emitEvent(te.ACQUIRE_TOKEN_NETWORK_START,J.Silent,e),F(this.acquireTokenByRefreshToken.bind(this),k.AcquireTokenByRefreshToken,this.logger,this.performanceClient,e.correlationId)(e,t)}))}}function rL(r,e){const t=!(r instanceof Fn&&r.subError!==Lc),n=r.errorCode===tn.INVALID_GRANT_ERROR||r.errorCode===yr,i=t&&n||r.errorCode===fc||r.errorCode===uh,s=Fx.includes(e);return i&&s}/*! @azure/msal-browser v3.28.1 2025-01-14 */async function oL(r,e){const t=new yo(r);return await t.initialize(),$c.createController(t,e)}/*! @azure/msal-browser v3.28.1 2025-01-14 */class kh{static async createPublicClientApplication(e){const t=await oL(e);return new kh(e,t)}constructor(e,t){this.controller=t||new $c(new yo(e))}async initialize(e){return this.controller.initialize(e)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}const Vu=process.env.JPLAN_WEBAPP__APP_PROXY_TENANT_NAME??"",iL=process.env.JPLAN_WEBAPP__APP_PROXY_CLIENT_ID??"",aL=process.env.JPLAN_WEBAPP__APP_PROXY_USER_FLOW??"",Ap=process.env.JPLAN_WEBAPP__URL_AUTH??process.env.JPLAN_WEBAPP__URL_BASE??"",sL={auth:{clientId:iL,authority:`https://${Vu}.b2clogin.com/${Vu}.onmicrosoft.com/${aL}`,knownAuthorities:[`${Vu}.b2clogin.com`],redirectUri:process.env.JPLAN_AUTOMATION_ENVIRONMENT?`${Ap}/_/dashboard`:Ap},cache:{cacheLocation:"localStorage",storeAuthStateInCookie:!1},system:{loggerOptions:{loggerCallback:(r,e)=>{r===xe.Error&&console.error(e)},logLevel:xe.Warning}}},lw=r=>({scopes:["https://graph.microsoft.com/.default","openid","profile"],redirectStartPage:"/_/dashboard",extraQueryParameters:r}),yt=new kh(sL),bp=c.ref(null);function uw(){async function r(e){var t;if(e)try{const n=e.idTokenClaims;if(!(n!=null&&n.aud))throw new Error("User audience (aud) is missing in ID token claims");const i=localStorage.getItem(`msal.token.keys.${n.aud}`);if(!i)throw new Error(`Token keys para ${n.aud} não encontrados no localStorage`);const s=JSON.parse(i),l=(t=s==null?void 0:s.idToken)==null?void 0:t[0];if(!l)throw new Error("idToken não encontrado nos token keys");const d=localStorage.getItem(l);if(!d)throw new Error(`Dados do token para ID ${l} não encontrados no localStorage`);const f=JSON.parse(d),g=f==null?void 0:f.secret;if(!g)throw new Error("Secret não encontrado nos dados do token");sessionStorage.setItem("isAuthenticated","true"),bp.value=g}catch(n){console.error("Erro ao obter token de acesso:",n)}}return{jToken:bp,setJToken:r}}const cL=()=>process.env.JPLAN_WEBAPP__URL_AUTH||"http://localhost:5173/_/dashboard",En=c.ref(null),Wo=c.ref(null),dw=c.ref(Math.floor(Date.now()/1e3));Pd.useIntervalFn(()=>lL(),1e3);function lL(){var n,i;if(!((i=(n=En.value)==null?void 0:n.idTokenClaims)!=null&&i.exp))return;const r=Math.floor(Date.now()/1e3),e=300,t=En.value.idTokenClaims.exp;dw.value=t-r-e}function Rh(){const{setJToken:r,jToken:e}=uw(),t=c.computed(()=>!!En.value),n=c.computed(()=>En.value);async function i(v){if(!t.value)switch(v){case"redirect":await d();break;case"tab":await s();break;default:await d();break}}const s=async()=>new Promise((v,C)=>{try{localStorage.clear();const S=window.open(cL());if(!S){console.error("Failed to open authentication window"),C("Failed to open authentication window");return}const _=Date.now(),b=6e4,O=setInterval(()=>{if(Date.now()-_>b||S.closed){clearInterval(O),console.error("Authentication canceled or timeout reached."),C("Authentication canceled or timeout reached.");return}Object.keys(localStorage).some(V=>V.startsWith("msal.account.keys"))&&(clearInterval(O),l(),S.close(),v())},500)}catch(S){console.error("Error in handleRedirect:",S),C(S)}}),l=async()=>{try{await yt.initialize();const v=yt.getActiveAccount();if(v)En.value=v;else{const C=await yt.handleRedirectPromise();C?(yt.setActiveAccount(C.account),En.value=yt.getActiveAccount()):console.error("Falha na autenticação")}}catch(v){console.error("Erro no processo de autenticação:",v)}En.value&&await r(En.value)},d=async()=>{try{await yt.initialize();const v=await yt.handleRedirectPromise();if(!v||yt.getAllAccounts().length===0){const C=lw();await yt.loginRedirect(C);return}yt.setActiveAccount(v.account),En.value=yt.getActiveAccount(),En.value&&await r(En.value),Wo.value="updated"}catch(v){console.error("handleRedirect failed",v)}};async function f(){ie.value=!0,Wo.value="updating";try{const v=await yt.acquireTokenPopup({scopes:["https://graph.microsoft.com/.default","openid","profile"]});yt.setActiveAccount(v.account),await r(En.value),Wo.value="updated"}catch(v){console.error("Failed to refresh token, forcing new login.",v),Wo.value="error",await i()}ie.value=!1}const g=async()=>{try{await yt.initialize(),localStorage.clear(),await yt.logoutRedirect({postLogoutRedirectUri:"/"})}catch(v){console.error("Logout error",v)}};c.watch(dw,async v=>{v<=0&&Wo.value==="updated"&&await f()});const m=c.computed(()=>e.value);return{isAuthenticated:t,authState:Wo,account:n,token:m,refreshToken:f,handleRedirect:i,logout:g}}function hw(r,e){return function(){return r.apply(e,arguments)}}const{toString:uL}=Object.prototype,{getPrototypeOf:Oh}=Object,Kc=(r=>e=>{const t=uL.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=r=>(r=r.toLowerCase(),e=>Kc(e)===r),zc=r=>e=>typeof e===r,{isArray:wi}=Array,va=zc("undefined");function dL(r){return r!==null&&!va(r)&&r.constructor!==null&&!va(r.constructor)&&an(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const fw=Kn("ArrayBuffer");function hL(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&fw(r.buffer),e}const fL=zc("string"),an=zc("function"),gw=zc("number"),Wc=r=>r!==null&&typeof r=="object",gL=r=>r===!0||r===!1,js=r=>{if(Kc(r)!=="object")return!1;const e=Oh(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},mL=Kn("Date"),pL=Kn("File"),vL=Kn("Blob"),yL=Kn("FileList"),CL=r=>Wc(r)&&an(r.pipe),wL=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||an(r.append)&&((e=Kc(r))==="formdata"||e==="object"&&an(r.toString)&&r.toString()==="[object FormData]"))},_L=Kn("URLSearchParams"),[TL,EL,SL,AL]=["ReadableStream","Request","Response","Headers"].map(Kn),bL=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ba(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),wi(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const s=t?Object.getOwnPropertyNames(r):Object.keys(r),l=s.length;let d;for(n=0;n<l;n++)d=s[n],e.call(null,r[d],d,r)}}function mw(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const ho=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pw=r=>!va(r)&&r!==ho;function bd(){const{caseless:r}=pw(this)&&this||{},e={},t=(n,i)=>{const s=r&&mw(e,i)||i;js(e[s])&&js(n)?e[s]=bd(e[s],n):js(n)?e[s]=bd({},n):wi(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ba(arguments[n],t);return e}const IL=(r,e,t,{allOwnKeys:n}={})=>(ba(e,(i,s)=>{t&&an(i)?r[s]=hw(i,t):r[s]=i},{allOwnKeys:n}),r),kL=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),RL=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},OL=(r,e,t,n)=>{let i,s,l;const d={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)l=i[s],(!n||n(l,r,e))&&!d[l]&&(e[l]=r[l],d[l]=!0);r=t!==!1&&Oh(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},NL=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},PL=r=>{if(!r)return null;if(wi(r))return r;let e=r.length;if(!gw(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},ML=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Oh(Uint8Array)),xL=(r,e)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(r,s[0],s[1])}},DL=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},LL=Kn("HTMLFormElement"),BL=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,i){return n.toUpperCase()+i}),Ip=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),UL=Kn("RegExp"),vw=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};ba(t,(i,s)=>{let l;(l=e(i,s,r))!==!1&&(n[s]=l||i)}),Object.defineProperties(r,n)},VL=r=>{vw(r,(e,t)=>{if(an(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(an(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},FL=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return wi(r)?n(r):n(String(r).split(e)),t},HL=()=>{},$L=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e,Fu="abcdefghijklmnopqrstuvwxyz",kp="0123456789",yw={DIGIT:kp,ALPHA:Fu,ALPHA_DIGIT:Fu+Fu.toUpperCase()+kp},KL=(r=16,e=yw.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;r--;)t+=e[Math.random()*n|0];return t};function zL(r){return!!(r&&an(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const WL=r=>{const e=new Array(10),t=(n,i)=>{if(Wc(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=wi(n)?[]:{};return ba(n,(l,d)=>{const f=t(l,i+1);!va(f)&&(s[d]=f)}),e[i]=void 0,s}}return n};return t(r,0)},qL=Kn("AsyncFunction"),GL=r=>r&&(Wc(r)||an(r))&&an(r.then)&&an(r.catch),Cw=((r,e)=>r?setImmediate:e?((t,n)=>(ho.addEventListener("message",({source:i,data:s})=>{i===ho&&s===t&&n.length&&n.shift()()},!1),i=>{n.push(i),ho.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",an(ho.postMessage)),jL=typeof queueMicrotask<"u"?queueMicrotask.bind(ho):typeof process<"u"&&process.nextTick||Cw,N={isArray:wi,isArrayBuffer:fw,isBuffer:dL,isFormData:wL,isArrayBufferView:hL,isString:fL,isNumber:gw,isBoolean:gL,isObject:Wc,isPlainObject:js,isReadableStream:TL,isRequest:EL,isResponse:SL,isHeaders:AL,isUndefined:va,isDate:mL,isFile:pL,isBlob:vL,isRegExp:UL,isFunction:an,isStream:CL,isURLSearchParams:_L,isTypedArray:ML,isFileList:yL,forEach:ba,merge:bd,extend:IL,trim:bL,stripBOM:kL,inherits:RL,toFlatObject:OL,kindOf:Kc,kindOfTest:Kn,endsWith:NL,toArray:PL,forEachEntry:xL,matchAll:DL,isHTMLForm:LL,hasOwnProperty:Ip,hasOwnProp:Ip,reduceDescriptors:vw,freezeMethods:VL,toObjectSet:FL,toCamelCase:BL,noop:HL,toFiniteNumber:$L,findKey:mw,global:ho,isContextDefined:pw,ALPHABET:yw,generateString:KL,isSpecCompliantForm:zL,toJSONObject:WL,isAsyncFn:qL,isThenable:GL,setImmediate:Cw,asap:jL};function ue(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}N.inherits(ue,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.status}}});const ww=ue.prototype,_w={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{_w[r]={value:r}});Object.defineProperties(ue,_w);Object.defineProperty(ww,"isAxiosError",{value:!0});ue.from=(r,e,t,n,i,s)=>{const l=Object.create(ww);return N.toFlatObject(r,l,function(f){return f!==Error.prototype},d=>d!=="isAxiosError"),ue.call(l,r.message,e,t,n,i),l.cause=r,l.name=r.name,s&&Object.assign(l,s),l};const YL=null;function Id(r){return N.isPlainObject(r)||N.isArray(r)}function Tw(r){return N.endsWith(r,"[]")?r.slice(0,-2):r}function Rp(r,e,t){return r?r.concat(e).map(function(i,s){return i=Tw(i),!t&&s?"["+i+"]":i}).join(t?".":""):e}function JL(r){return N.isArray(r)&&!r.some(Id)}const QL=N.toFlatObject(N,{},null,function(e){return/^is[A-Z]/.test(e)});function qc(r,e,t){if(!N.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=N.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,O){return!N.isUndefined(O[b])});const n=t.metaTokens,i=t.visitor||m,s=t.dots,l=t.indexes,f=(t.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(e);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function g(_){if(_===null)return"";if(N.isDate(_))return _.toISOString();if(!f&&N.isBlob(_))throw new ue("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(_)||N.isTypedArray(_)?f&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,b,O){let $=_;if(_&&!O&&typeof _=="object"){if(N.endsWith(b,"{}"))b=n?b:b.slice(0,-2),_=JSON.stringify(_);else if(N.isArray(_)&&JL(_)||(N.isFileList(_)||N.endsWith(b,"[]"))&&($=N.toArray(_)))return b=Tw(b),$.forEach(function(U,Q){!(N.isUndefined(U)||U===null)&&e.append(l===!0?Rp([b],Q,s):l===null?b:b+"[]",g(U))}),!1}return Id(_)?!0:(e.append(Rp(O,b,s),g(_)),!1)}const v=[],C=Object.assign(QL,{defaultVisitor:m,convertValue:g,isVisitable:Id});function S(_,b){if(!N.isUndefined(_)){if(v.indexOf(_)!==-1)throw Error("Circular reference detected in "+b.join("."));v.push(_),N.forEach(_,function($,V){(!(N.isUndefined($)||$===null)&&i.call(e,$,N.isString(V)?V.trim():V,b,C))===!0&&S($,b?b.concat(V):[V])}),v.pop()}}if(!N.isObject(r))throw new TypeError("data must be an object");return S(r),e}function Op(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Nh(r,e){this._pairs=[],r&&qc(r,this,e)}const Ew=Nh.prototype;Ew.append=function(e,t){this._pairs.push([e,t])};Ew.toString=function(e){const t=e?function(n){return e.call(this,n,Op)}:Op;return this._pairs.map(function(i){return t(i[0])+"="+t(i[1])},"").join("&")};function XL(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sw(r,e,t){if(!e)return r;const n=t&&t.encode||XL;N.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=N.isURLSearchParams(e)?e.toString():new Nh(e,t).toString(n),s){const l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class Np{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){N.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Aw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ZL=typeof URLSearchParams<"u"?URLSearchParams:Nh,eB=typeof FormData<"u"?FormData:null,tB=typeof Blob<"u"?Blob:null,nB={isBrowser:!0,classes:{URLSearchParams:ZL,FormData:eB,Blob:tB},protocols:["http","https","file","blob","url","data"]},Ph=typeof window<"u"&&typeof document<"u",kd=typeof navigator=="object"&&navigator||void 0,rB=Ph&&(!kd||["ReactNative","NativeScript","NS"].indexOf(kd.product)<0),oB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",iB=Ph&&window.location.href||"http://localhost",aB=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ph,hasStandardBrowserEnv:rB,hasStandardBrowserWebWorkerEnv:oB,navigator:kd,origin:iB},Symbol.toStringTag,{value:"Module"})),It={...aB,...nB};function sB(r,e){return qc(r,new It.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return It.isNode&&N.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function cB(r){return N.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function lB(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n<i;n++)s=t[n],e[s]=r[s];return e}function bw(r){function e(t,n,i,s){let l=t[s++];if(l==="__proto__")return!0;const d=Number.isFinite(+l),f=s>=t.length;return l=!l&&N.isArray(i)?i.length:l,f?(N.hasOwnProp(i,l)?i[l]=[i[l],n]:i[l]=n,!d):((!i[l]||!N.isObject(i[l]))&&(i[l]=[]),e(t,n,i[l],s)&&N.isArray(i[l])&&(i[l]=lB(i[l])),!d)}if(N.isFormData(r)&&N.isFunction(r.entries)){const t={};return N.forEachEntry(r,(n,i)=>{e(cB(n),i,t,0)}),t}return null}function uB(r,e,t){if(N.isString(r))try{return(e||JSON.parse)(r),N.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Ia={transitional:Aw,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,s=N.isObject(e);if(s&&N.isHTMLForm(e)&&(e=new FormData(e)),N.isFormData(e))return i?JSON.stringify(bw(e)):e;if(N.isArrayBuffer(e)||N.isBuffer(e)||N.isStream(e)||N.isFile(e)||N.isBlob(e)||N.isReadableStream(e))return e;if(N.isArrayBufferView(e))return e.buffer;if(N.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return sB(e,this.formSerializer).toString();if((d=N.isFileList(e))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return qc(d?{"files[]":e}:e,f&&new f,this.formSerializer)}}return s||i?(t.setContentType("application/json",!1),uB(e)):e}],transformResponse:[function(e){const t=this.transitional||Ia.transitional,n=t&&t.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(e)||N.isReadableStream(e))return e;if(e&&N.isString(e)&&(n&&!this.responseType||i)){const l=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(d){if(l)throw d.name==="SyntaxError"?ue.from(d,ue.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:It.classes.FormData,Blob:It.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],r=>{Ia.headers[r]={}});const dB=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),hB=r=>{const e={};let t,n,i;return r&&r.split(`
57
+ `).forEach(function(l){i=l.indexOf(":"),t=l.substring(0,i).trim().toLowerCase(),n=l.substring(i+1).trim(),!(!t||e[t]&&dB[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},Pp=Symbol("internals");function ji(r){return r&&String(r).trim().toLowerCase()}function Ys(r){return r===!1||r==null?r:N.isArray(r)?r.map(Ys):String(r)}function fB(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const gB=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Hu(r,e,t,n,i){if(N.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!N.isString(e)){if(N.isString(n))return e.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(e)}}function mB(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function pB(r,e){const t=N.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,l){return this[n].call(this,e,i,s,l)},configurable:!0})})}class $t{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function s(d,f,g){const m=ji(f);if(!m)throw new Error("header name must be a non-empty string");const v=N.findKey(i,m);(!v||i[v]===void 0||g===!0||g===void 0&&i[v]!==!1)&&(i[v||f]=Ys(d))}const l=(d,f)=>N.forEach(d,(g,m)=>s(g,m,f));if(N.isPlainObject(e)||e instanceof this.constructor)l(e,t);else if(N.isString(e)&&(e=e.trim())&&!gB(e))l(hB(e),t);else if(N.isHeaders(e))for(const[d,f]of e.entries())s(f,d,n);else e!=null&&s(t,e,n);return this}get(e,t){if(e=ji(e),e){const n=N.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return fB(i);if(N.isFunction(t))return t.call(this,i,n);if(N.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ji(e),e){const n=N.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Hu(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function s(l){if(l=ji(l),l){const d=N.findKey(n,l);d&&(!t||Hu(n,n[d],d,t))&&(delete n[d],i=!0)}}return N.isArray(e)?e.forEach(s):s(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const s=t[n];(!e||Hu(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const t=this,n={};return N.forEach(this,(i,s)=>{const l=N.findKey(n,s);if(l){t[l]=Ys(i),delete t[s];return}const d=e?mB(s):String(s).trim();d!==s&&delete t[s],t[d]=Ys(i),n[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return N.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&N.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
58
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[Pp]=this[Pp]={accessors:{}}).accessors,i=this.prototype;function s(l){const d=ji(l);n[d]||(pB(i,l),n[d]=!0)}return N.isArray(e)?e.forEach(s):s(e),this}}$t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors($t.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(n){this[t]=n}}});N.freezeMethods($t);function $u(r,e){const t=this||Ia,n=e||t,i=$t.from(n.headers);let s=n.data;return N.forEach(r,function(d){s=d.call(t,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Iw(r){return!!(r&&r.__CANCEL__)}function _i(r,e,t){ue.call(this,r??"canceled",ue.ERR_CANCELED,e,t),this.name="CanceledError"}N.inherits(_i,ue,{__CANCEL__:!0});function kw(r,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?r(t):e(new ue("Request failed with status code "+t.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function vB(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function yB(r,e){r=r||10;const t=new Array(r),n=new Array(r);let i=0,s=0,l;return e=e!==void 0?e:1e3,function(f){const g=Date.now(),m=n[s];l||(l=g),t[i]=f,n[i]=g;let v=s,C=0;for(;v!==i;)C+=t[v++],v=v%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),g-l<e)return;const S=m&&g-m;return S?Math.round(C*1e3/S):void 0}}function CB(r,e){let t=0,n=1e3/e,i,s;const l=(g,m=Date.now())=>{t=m,i=null,s&&(clearTimeout(s),s=null),r.apply(null,g)};return[(...g)=>{const m=Date.now(),v=m-t;v>=n?l(g,m):(i=g,s||(s=setTimeout(()=>{s=null,l(i)},n-v)))},()=>i&&l(i)]}const vc=(r,e,t=3)=>{let n=0;const i=yB(50,250);return CB(s=>{const l=s.loaded,d=s.lengthComputable?s.total:void 0,f=l-n,g=i(f),m=l<=d;n=l;const v={loaded:l,total:d,progress:d?l/d:void 0,bytes:f,rate:g||void 0,estimated:g&&d&&m?(d-l)/g:void 0,event:s,lengthComputable:d!=null,[e?"download":"upload"]:!0};r(v)},t)},Mp=(r,e)=>{const t=r!=null;return[n=>e[0]({lengthComputable:t,total:r,loaded:n}),e[1]]},xp=r=>(...e)=>N.asap(()=>r(...e)),wB=It.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,It.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(It.origin),It.navigator&&/(msie|trident)/i.test(It.navigator.userAgent)):()=>!0,_B=It.hasStandardBrowserEnv?{write(r,e,t,n,i,s){const l=[r+"="+encodeURIComponent(e)];N.isNumber(t)&&l.push("expires="+new Date(t).toGMTString()),N.isString(n)&&l.push("path="+n),N.isString(i)&&l.push("domain="+i),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function TB(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function EB(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function Rw(r,e){return r&&!TB(e)?EB(r,e):e}const Dp=r=>r instanceof $t?{...r}:r;function Co(r,e){e=e||{};const t={};function n(g,m,v,C){return N.isPlainObject(g)&&N.isPlainObject(m)?N.merge.call({caseless:C},g,m):N.isPlainObject(m)?N.merge({},m):N.isArray(m)?m.slice():m}function i(g,m,v,C){if(N.isUndefined(m)){if(!N.isUndefined(g))return n(void 0,g,v,C)}else return n(g,m,v,C)}function s(g,m){if(!N.isUndefined(m))return n(void 0,m)}function l(g,m){if(N.isUndefined(m)){if(!N.isUndefined(g))return n(void 0,g)}else return n(void 0,m)}function d(g,m,v){if(v in e)return n(g,m);if(v in r)return n(void 0,g)}const f={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d,headers:(g,m,v)=>i(Dp(g),Dp(m),v,!0)};return N.forEach(Object.keys(Object.assign({},r,e)),function(m){const v=f[m]||i,C=v(r[m],e[m],m);N.isUndefined(C)&&v!==d||(t[m]=C)}),t}const Ow=r=>{const e=Co({},r);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:l,auth:d}=e;e.headers=l=$t.from(l),e.url=Sw(Rw(e.baseURL,e.url),r.params,r.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let f;if(N.isFormData(t)){if(It.hasStandardBrowserEnv||It.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((f=l.getContentType())!==!1){const[g,...m]=f?f.split(";").map(v=>v.trim()).filter(Boolean):[];l.setContentType([g||"multipart/form-data",...m].join("; "))}}if(It.hasStandardBrowserEnv&&(n&&N.isFunction(n)&&(n=n(e)),n||n!==!1&&wB(e.url))){const g=i&&s&&_B.read(s);g&&l.set(i,g)}return e},SB=typeof XMLHttpRequest<"u",AB=SB&&function(r){return new Promise(function(t,n){const i=Ow(r);let s=i.data;const l=$t.from(i.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:g}=i,m,v,C,S,_;function b(){S&&S(),_&&_(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let O=new XMLHttpRequest;O.open(i.method.toUpperCase(),i.url,!0),O.timeout=i.timeout;function $(){if(!O)return;const U=$t.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),se={data:!d||d==="text"||d==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:U,config:r,request:O};kw(function(z){t(z),b()},function(z){n(z),b()},se),O=null}"onloadend"in O?O.onloadend=$:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout($)},O.onabort=function(){O&&(n(new ue("Request aborted",ue.ECONNABORTED,r,O)),O=null)},O.onerror=function(){n(new ue("Network Error",ue.ERR_NETWORK,r,O)),O=null},O.ontimeout=function(){let Q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const se=i.transitional||Aw;i.timeoutErrorMessage&&(Q=i.timeoutErrorMessage),n(new ue(Q,se.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,r,O)),O=null},s===void 0&&l.setContentType(null),"setRequestHeader"in O&&N.forEach(l.toJSON(),function(Q,se){O.setRequestHeader(se,Q)}),N.isUndefined(i.withCredentials)||(O.withCredentials=!!i.withCredentials),d&&d!=="json"&&(O.responseType=i.responseType),g&&([C,_]=vc(g,!0),O.addEventListener("progress",C)),f&&O.upload&&([v,S]=vc(f),O.upload.addEventListener("progress",v),O.upload.addEventListener("loadend",S)),(i.cancelToken||i.signal)&&(m=U=>{O&&(n(!U||U.type?new _i(null,r,O):U),O.abort(),O=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const V=vB(i.url);if(V&&It.protocols.indexOf(V)===-1){n(new ue("Unsupported protocol "+V+":",ue.ERR_BAD_REQUEST,r));return}O.send(s||null)})},bB=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let n=new AbortController,i;const s=function(g){if(!i){i=!0,d();const m=g instanceof Error?g:this.reason;n.abort(m instanceof ue?m:new _i(m instanceof Error?m.message:m))}};let l=e&&setTimeout(()=>{l=null,s(new ue(`timeout ${e} of ms exceeded`,ue.ETIMEDOUT))},e);const d=()=>{r&&(l&&clearTimeout(l),l=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(s):g.removeEventListener("abort",s)}),r=null)};r.forEach(g=>g.addEventListener("abort",s));const{signal:f}=n;return f.unsubscribe=()=>N.asap(d),f}},IB=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let n=0,i;for(;n<t;)i=n+e,yield r.slice(n,i),n=i},kB=async function*(r,e){for await(const t of RB(r))yield*IB(t,e)},RB=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},Lp=(r,e,t,n)=>{const i=kB(r,e);let s=0,l,d=f=>{l||(l=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:g,value:m}=await i.next();if(g){d(),f.close();return}let v=m.byteLength;if(t){let C=s+=v;t(C)}f.enqueue(new Uint8Array(m))}catch(g){throw d(g),g}},cancel(f){return d(f),i.return()}},{highWaterMark:2})},Gc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nw=Gc&&typeof ReadableStream=="function",OB=Gc&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Pw=(r,...e)=>{try{return!!r(...e)}catch{return!1}},NB=Nw&&Pw(()=>{let r=!1;const e=new Request(It.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),Bp=64*1024,Rd=Nw&&Pw(()=>N.isReadableStream(new Response("").body)),yc={stream:Rd&&(r=>r.body)};Gc&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!yc[e]&&(yc[e]=N.isFunction(r[e])?t=>t[e]():(t,n)=>{throw new ue(`Response type '${e}' is not supported`,ue.ERR_NOT_SUPPORT,n)})})})(new Response);const PB=async r=>{if(r==null)return 0;if(N.isBlob(r))return r.size;if(N.isSpecCompliantForm(r))return(await new Request(It.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(N.isArrayBufferView(r)||N.isArrayBuffer(r))return r.byteLength;if(N.isURLSearchParams(r)&&(r=r+""),N.isString(r))return(await OB(r)).byteLength},MB=async(r,e)=>{const t=N.toFiniteNumber(r.getContentLength());return t??PB(e)},xB=Gc&&(async r=>{let{url:e,method:t,data:n,signal:i,cancelToken:s,timeout:l,onDownloadProgress:d,onUploadProgress:f,responseType:g,headers:m,withCredentials:v="same-origin",fetchOptions:C}=Ow(r);g=g?(g+"").toLowerCase():"text";let S=bB([i,s&&s.toAbortSignal()],l),_;const b=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let O;try{if(f&&NB&&t!=="get"&&t!=="head"&&(O=await MB(m,n))!==0){let se=new Request(e,{method:"POST",body:n,duplex:"half"}),we;if(N.isFormData(n)&&(we=se.headers.get("content-type"))&&m.setContentType(we),se.body){const[z,tt]=Mp(O,vc(xp(f)));n=Lp(se.body,Bp,z,tt)}}N.isString(v)||(v=v?"include":"omit");const $="credentials"in Request.prototype;_=new Request(e,{...C,signal:S,method:t.toUpperCase(),headers:m.normalize().toJSON(),body:n,duplex:"half",credentials:$?v:void 0});let V=await fetch(_);const U=Rd&&(g==="stream"||g==="response");if(Rd&&(d||U&&b)){const se={};["status","statusText","headers"].forEach(Te=>{se[Te]=V[Te]});const we=N.toFiniteNumber(V.headers.get("content-length")),[z,tt]=d&&Mp(we,vc(xp(d),!0))||[];V=new Response(Lp(V.body,Bp,z,()=>{tt&&tt(),b&&b()}),se)}g=g||"text";let Q=await yc[N.findKey(yc,g)||"text"](V,r);return!U&&b&&b(),await new Promise((se,we)=>{kw(se,we,{data:Q,headers:$t.from(V.headers),status:V.status,statusText:V.statusText,config:r,request:_})})}catch($){throw b&&b(),$&&$.name==="TypeError"&&/fetch/i.test($.message)?Object.assign(new ue("Network Error",ue.ERR_NETWORK,r,_),{cause:$.cause||$}):ue.from($,$&&$.code,r,_)}}),Od={http:YL,xhr:AB,fetch:xB};N.forEach(Od,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Up=r=>`- ${r}`,DB=r=>N.isFunction(r)||r===null||r===!1,Mw={getAdapter:r=>{r=N.isArray(r)?r:[r];const{length:e}=r;let t,n;const i={};for(let s=0;s<e;s++){t=r[s];let l;if(n=t,!DB(t)&&(n=Od[(l=String(t)).toLowerCase()],n===void 0))throw new ue(`Unknown adapter '${l}'`);if(n)break;i[l||"#"+s]=n}if(!n){const s=Object.entries(i).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=e?s.length>1?`since :
59
+ `+s.map(Up).join(`
60
+ `):" "+Up(s[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n},adapters:Od};function Ku(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new _i(null,r)}function Vp(r){return Ku(r),r.headers=$t.from(r.headers),r.data=$u.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Mw.getAdapter(r.adapter||Ia.adapter)(r).then(function(n){return Ku(r),n.data=$u.call(r,r.transformResponse,n),n.headers=$t.from(n.headers),n},function(n){return Iw(n)||(Ku(r),n&&n.response&&(n.response.data=$u.call(r,r.transformResponse,n.response),n.response.headers=$t.from(n.response.headers))),Promise.reject(n)})}const xw="1.7.9",jc={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{jc[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});const Fp={};jc.transitional=function(e,t,n){function i(s,l){return"[Axios v"+xw+"] Transitional option '"+s+"'"+l+(n?". "+n:"")}return(s,l,d)=>{if(e===!1)throw new ue(i(l," has been removed"+(t?" in "+t:"")),ue.ERR_DEPRECATED);return t&&!Fp[l]&&(Fp[l]=!0,console.warn(i(l," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,l,d):!0}};jc.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function LB(r,e,t){if(typeof r!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],l=e[s];if(l){const d=r[s],f=d===void 0||l(d,s,r);if(f!==!0)throw new ue("option "+s+" must be "+f,ue.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ue("Unknown option "+s,ue.ERR_BAD_OPTION)}}const Js={assertOptions:LB,validators:jc},jn=Js.validators;class go{constructor(e){this.defaults=e,this.interceptors={request:new Np,response:new Np}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
61
+ `+s):n.stack=s}catch{}}throw n}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Co(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:s}=t;n!==void 0&&Js.assertOptions(n,{silentJSONParsing:jn.transitional(jn.boolean),forcedJSONParsing:jn.transitional(jn.boolean),clarifyTimeoutError:jn.transitional(jn.boolean)},!1),i!=null&&(N.isFunction(i)?t.paramsSerializer={serialize:i}:Js.assertOptions(i,{encode:jn.function,serialize:jn.function},!0)),Js.assertOptions(t,{baseUrl:jn.spelling("baseURL"),withXsrfToken:jn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let l=s&&N.merge(s.common,s[t.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],_=>{delete s[_]}),t.headers=$t.concat(l,s);const d=[];let f=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(t)===!1||(f=f&&b.synchronous,d.unshift(b.fulfilled,b.rejected))});const g=[];this.interceptors.response.forEach(function(b){g.push(b.fulfilled,b.rejected)});let m,v=0,C;if(!f){const _=[Vp.bind(this),void 0];for(_.unshift.apply(_,d),_.push.apply(_,g),C=_.length,m=Promise.resolve(t);v<C;)m=m.then(_[v++],_[v++]);return m}C=d.length;let S=t;for(v=0;v<C;){const _=d[v++],b=d[v++];try{S=_(S)}catch(O){b.call(this,O);break}}try{m=Vp.call(this,S)}catch(_){return Promise.reject(_)}for(v=0,C=g.length;v<C;)m=m.then(g[v++],g[v++]);return m}getUri(e){e=Co(this.defaults,e);const t=Rw(e.baseURL,e.url);return Sw(t,e.params,e.paramsSerializer)}}N.forEach(["delete","get","head","options"],function(e){go.prototype[e]=function(t,n){return this.request(Co(n||{},{method:e,url:t,data:(n||{}).data}))}});N.forEach(["post","put","patch"],function(e){function t(n){return function(s,l,d){return this.request(Co(d||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}go.prototype[e]=t(),go.prototype[e+"Form"]=t(!0)});class Mh{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(s){t=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const l=new Promise(d=>{n.subscribe(d),s=d}).then(i);return l.cancel=function(){n.unsubscribe(s)},l},e(function(s,l,d){n.reason||(n.reason=new _i(s,l,d),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=n=>{e.abort(n)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Mh(function(i){e=i}),cancel:e}}}function BB(r){return function(t){return r.apply(null,t)}}function UB(r){return N.isObject(r)&&r.isAxiosError===!0}const Nd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Nd).forEach(([r,e])=>{Nd[e]=r});function Dw(r){const e=new go(r),t=hw(go.prototype.request,e);return N.extend(t,go.prototype,e,{allOwnKeys:!0}),N.extend(t,e,null,{allOwnKeys:!0}),t.create=function(i){return Dw(Co(r,i))},t}const Ke=Dw(Ia);Ke.Axios=go;Ke.CanceledError=_i;Ke.CancelToken=Mh;Ke.isCancel=Iw;Ke.VERSION=xw;Ke.toFormData=qc;Ke.AxiosError=ue;Ke.Cancel=Ke.CanceledError;Ke.all=function(e){return Promise.all(e)};Ke.spread=BB;Ke.isAxiosError=UB;Ke.mergeConfig=Co;Ke.AxiosHeaders=$t;Ke.formToJSON=r=>bw(N.isHTMLForm(r)?new FormData(r):r);Ke.getAdapter=Mw.getAdapter;Ke.HttpStatusCode=Nd;Ke.default=Ke;const{jToken:Hp}=uw(),xh=()=>{const r=Ke.create({headers:{"Content-Type":"application/json"}});c.watch(Hp,i=>{r.interceptors.request.use(s=>(i&&(s.headers.Authorization=`Bearer ${i}`),s))},{immediate:!0});let e=1;r.interceptors.response.use(async i=>i,async i=>{var s;if(i.config&&i.config.headers){const l=i.config;if(((s=i.response)==null?void 0:s.status)===401&&e>0){e--;try{return l.headers.Authorization=`Bearer ${Hp.value}`,await r(l)}catch(d){return Promise.reject(d)}}}return Promise.reject(i)});async function t({url:i,method:s,header:l={},body:d,baseURL:f}){try{return f&&(r.defaults.baseURL=f),(await r({url:i,method:s,headers:l,data:d})).data}catch(g){if(console.error(`Request error [${s} ${i}]:`,g),Ke.isAxiosError(g)){const{response:m,message:v}=g;throw new Error(`Axios error: ${v}, Status: ${m==null?void 0:m.status}, URL: ${i}`)}throw g}}async function n({url:i,method:s,header:l,body:d,baseURL:f}){try{f&&(r.defaults.baseURL=f);const g=await r({url:i,method:s,headers:l,data:d});return{status:g.status,header:g.headers,body:g.data}}catch(g){if(Ke.isAxiosError(g)){const{response:m,message:v}=g;console.error(`Raw Request Error: ${v}, Status: ${m==null?void 0:m.status}`)}return Promise.reject(g)}}return Object.assign(r,{_request:t,rawRequest:n})},{request:$p}=xh(),Kp=c.ref(null),zp=c.ref("default"),zu=c.ref(null),Wu=c.ref({scope_type:"org"});function Yc(){var C,S;const{handleRedirect:r,account:e,logout:t}=Rh(),n=(S=(C=e.value)==null?void 0:C.idTokenClaims)==null?void 0:S.domain,i=c.computed(()=>({domain:n,environment:zp.value,...Wu.value})),s=c.computed(()=>Wu.value);async function l(){var _;(!e.value||!((_=e.value.idTokenClaims)!=null&&_.email))&&await r();try{await d(),await f()}catch{}}async function d(){var _,b;try{const O=(b=(_=e.value)==null?void 0:_.idTokenClaims)==null?void 0:b.email;if(!O)throw new Error("Email is undefined");const $=await $p({url:`https://api.jplan.com.br/platform/user/profile/?email=${O}`,method:"GET"});zu.value=$.data??null}catch(O){console.error("Failed to fetch user profile:",O)}}async function f(){var _;try{if(!((_=zu.value)!=null&&_.email))throw new Error("User email is undefined");const b=await $p({url:"https://api.jplan.com.br/platform/user/domain/",method:"GET"});Kp.value=b.data??[]}catch(b){console.error("Failed to fetch user domains:",b)}}function g(_){Wu.value=_}function m(_){zp.value=_,g(i.value)}async function v(_){const b=lw({request_domain:_});await yt.loginRedirect(b)}return{__init__:l,user:zu,userDomains:Kp,setEnv:m,setScope:g,changeDomain:v,session:i,scope:s,logout:t}}var Ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function VB(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ea={exports:{}};/**
62
62
  * @license
63
63
  * Lodash <https://lodash.com/>
64
64
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
65
65
  * Released under MIT license <https://lodash.com/license>
66
66
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
67
67
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
68
- */var qB=na.exports,jp;function GB(){return jp||(jp=1,function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,m="__lodash_placeholder__",v=1,C=2,S=4,_=1,A=2,O=1,$=2,V=4,U=8,Q=16,se=32,we=64,z=128,tt=256,Te=512,j=30,q="...",Ee=800,Ue=16,Ct=1,An=2,sn=3,Mt=1/0,Qe=9007199254740991,wt=17976931348623157e292,Ai=NaN,Kt=4294967295,el=Kt-1,Kw=Kt>>>1,zw=[["ary",z],["bind",O],["bindKey",$],["curry",U],["curryRight",Q],["flip",Te],["partial",se],["partialRight",we],["rearg",tt]],To="[object Arguments]",Oa="[object Array]",Ww="[object AsyncFunction]",bi="[object Boolean]",Ii="[object Date]",qw="[object DOMException]",Na="[object Error]",Pa="[object Function]",Bh="[object GeneratorFunction]",bn="[object Map]",ki="[object Number]",Gw="[object Null]",ir="[object Object]",Uh="[object Promise]",jw="[object Proxy]",Ri="[object RegExp]",In="[object Set]",Oi="[object String]",Ma="[object Symbol]",Yw="[object Undefined]",Ni="[object WeakMap]",Jw="[object WeakSet]",Pi="[object ArrayBuffer]",Eo="[object DataView]",tl="[object Float32Array]",nl="[object Float64Array]",rl="[object Int8Array]",ol="[object Int16Array]",il="[object Int32Array]",al="[object Uint8Array]",sl="[object Uint8ClampedArray]",cl="[object Uint16Array]",ll="[object Uint32Array]",Qw=/\b__p \+= '';/g,Xw=/\b(__p \+=) '' \+/g,Zw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vh=/&(?:amp|lt|gt|quot|#39);/g,Fh=/[&<>"']/g,e_=RegExp(Vh.source),t_=RegExp(Fh.source),n_=/<%-([\s\S]+?)%>/g,r_=/<%([\s\S]+?)%>/g,Hh=/<%=([\s\S]+?)%>/g,o_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i_=/^\w*$/,a_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ul=/[\\^$.*+?()[\]{}|]/g,s_=RegExp(ul.source),dl=/^\s+/,c_=/\s/,l_=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,u_=/\{\n\/\* \[wrapped with (.+)\] \*/,d_=/,? & /,h_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,f_=/[()=,{}\[\]\/\s]/,g_=/\\(\\)?/g,m_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$h=/\w*$/,p_=/^[-+]0x[0-9a-f]+$/i,v_=/^0b[01]+$/i,y_=/^\[object .+?Constructor\]$/,C_=/^0o[0-7]+$/i,w_=/^(?:0|[1-9]\d*)$/,__=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xa=/($^)/,T_=/['\n\r\u2028\u2029\\]/g,Da="\\ud800-\\udfff",E_="\\u0300-\\u036f",S_="\\ufe20-\\ufe2f",A_="\\u20d0-\\u20ff",Kh=E_+S_+A_,zh="\\u2700-\\u27bf",Wh="a-z\\xdf-\\xf6\\xf8-\\xff",b_="\\xac\\xb1\\xd7\\xf7",I_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",k_="\\u2000-\\u206f",R_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qh="A-Z\\xc0-\\xd6\\xd8-\\xde",Gh="\\ufe0e\\ufe0f",jh=b_+I_+k_+R_,hl="['’]",O_="["+Da+"]",Yh="["+jh+"]",La="["+Kh+"]",Jh="\\d+",N_="["+zh+"]",Qh="["+Wh+"]",Xh="[^"+Da+jh+Jh+zh+Wh+qh+"]",fl="\\ud83c[\\udffb-\\udfff]",P_="(?:"+La+"|"+fl+")",Zh="[^"+Da+"]",gl="(?:\\ud83c[\\udde6-\\uddff]){2}",ml="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+qh+"]",ef="\\u200d",tf="(?:"+Qh+"|"+Xh+")",M_="(?:"+So+"|"+Xh+")",nf="(?:"+hl+"(?:d|ll|m|re|s|t|ve))?",rf="(?:"+hl+"(?:D|LL|M|RE|S|T|VE))?",of=P_+"?",af="["+Gh+"]?",x_="(?:"+ef+"(?:"+[Zh,gl,ml].join("|")+")"+af+of+")*",D_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",L_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sf=af+of+x_,B_="(?:"+[N_,gl,ml].join("|")+")"+sf,U_="(?:"+[Zh+La+"?",La,gl,ml,O_].join("|")+")",V_=RegExp(hl,"g"),F_=RegExp(La,"g"),pl=RegExp(fl+"(?="+fl+")|"+U_+sf,"g"),H_=RegExp([So+"?"+Qh+"+"+nf+"(?="+[Yh,So,"$"].join("|")+")",M_+"+"+rf+"(?="+[Yh,So+tf,"$"].join("|")+")",So+"?"+tf+"+"+nf,So+"+"+rf,L_,D_,Jh,B_].join("|"),"g"),$_=RegExp("["+ef+Da+Kh+Gh+"]"),K_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,z_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],W_=-1,De={};De[tl]=De[nl]=De[rl]=De[ol]=De[il]=De[al]=De[sl]=De[cl]=De[ll]=!0,De[To]=De[Oa]=De[Pi]=De[bi]=De[Eo]=De[Ii]=De[Na]=De[Pa]=De[bn]=De[ki]=De[ir]=De[Ri]=De[In]=De[Oi]=De[Ni]=!1;var Me={};Me[To]=Me[Oa]=Me[Pi]=Me[Eo]=Me[bi]=Me[Ii]=Me[tl]=Me[nl]=Me[rl]=Me[ol]=Me[il]=Me[bn]=Me[ki]=Me[ir]=Me[Ri]=Me[In]=Me[Oi]=Me[Ma]=Me[al]=Me[sl]=Me[cl]=Me[ll]=!0,Me[Na]=Me[Pa]=Me[Ni]=!1;var q_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},G_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},j_={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Y_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},J_=parseFloat,Q_=parseInt,cf=typeof Ls=="object"&&Ls&&Ls.Object===Object&&Ls,X_=typeof self=="object"&&self&&self.Object===Object&&self,ht=cf||X_||Function("return this")(),vl=e&&!e.nodeType&&e,jr=vl&&!0&&r&&!r.nodeType&&r,lf=jr&&jr.exports===vl,yl=lf&&cf.process,cn=function(){try{var b=jr&&jr.require&&jr.require("util").types;return b||yl&&yl.binding&&yl.binding("util")}catch{}}(),uf=cn&&cn.isArrayBuffer,df=cn&&cn.isDate,hf=cn&&cn.isMap,ff=cn&&cn.isRegExp,gf=cn&&cn.isSet,mf=cn&&cn.isTypedArray;function zt(b,M,R){switch(R.length){case 0:return b.call(M);case 1:return b.call(M,R[0]);case 2:return b.call(M,R[0],R[1]);case 3:return b.call(M,R[0],R[1],R[2])}return b.apply(M,R)}function Z_(b,M,R,W){for(var ae=-1,Se=b==null?0:b.length;++ae<Se;){var nt=b[ae];M(W,nt,R(nt),b)}return W}function ln(b,M){for(var R=-1,W=b==null?0:b.length;++R<W&&M(b[R],R,b)!==!1;);return b}function eT(b,M){for(var R=b==null?0:b.length;R--&&M(b[R],R,b)!==!1;);return b}function pf(b,M){for(var R=-1,W=b==null?0:b.length;++R<W;)if(!M(b[R],R,b))return!1;return!0}function br(b,M){for(var R=-1,W=b==null?0:b.length,ae=0,Se=[];++R<W;){var nt=b[R];M(nt,R,b)&&(Se[ae++]=nt)}return Se}function Ba(b,M){var R=b==null?0:b.length;return!!R&&Ao(b,M,0)>-1}function Cl(b,M,R){for(var W=-1,ae=b==null?0:b.length;++W<ae;)if(R(M,b[W]))return!0;return!1}function Ve(b,M){for(var R=-1,W=b==null?0:b.length,ae=Array(W);++R<W;)ae[R]=M(b[R],R,b);return ae}function Ir(b,M){for(var R=-1,W=M.length,ae=b.length;++R<W;)b[ae+R]=M[R];return b}function wl(b,M,R,W){var ae=-1,Se=b==null?0:b.length;for(W&&Se&&(R=b[++ae]);++ae<Se;)R=M(R,b[ae],ae,b);return R}function tT(b,M,R,W){var ae=b==null?0:b.length;for(W&&ae&&(R=b[--ae]);ae--;)R=M(R,b[ae],ae,b);return R}function _l(b,M){for(var R=-1,W=b==null?0:b.length;++R<W;)if(M(b[R],R,b))return!0;return!1}var nT=Tl("length");function rT(b){return b.split("")}function oT(b){return b.match(h_)||[]}function vf(b,M,R){var W;return R(b,function(ae,Se,nt){if(M(ae,Se,nt))return W=Se,!1}),W}function Ua(b,M,R,W){for(var ae=b.length,Se=R+(W?1:-1);W?Se--:++Se<ae;)if(M(b[Se],Se,b))return Se;return-1}function Ao(b,M,R){return M===M?pT(b,M,R):Ua(b,yf,R)}function iT(b,M,R,W){for(var ae=R-1,Se=b.length;++ae<Se;)if(W(b[ae],M))return ae;return-1}function yf(b){return b!==b}function Cf(b,M){var R=b==null?0:b.length;return R?Sl(b,M)/R:Ai}function Tl(b){return function(M){return M==null?t:M[b]}}function El(b){return function(M){return b==null?t:b[M]}}function wf(b,M,R,W,ae){return ae(b,function(Se,nt,Ne){R=W?(W=!1,Se):M(R,Se,nt,Ne)}),R}function aT(b,M){var R=b.length;for(b.sort(M);R--;)b[R]=b[R].value;return b}function Sl(b,M){for(var R,W=-1,ae=b.length;++W<ae;){var Se=M(b[W]);Se!==t&&(R=R===t?Se:R+Se)}return R}function Al(b,M){for(var R=-1,W=Array(b);++R<b;)W[R]=M(R);return W}function sT(b,M){return Ve(M,function(R){return[R,b[R]]})}function _f(b){return b&&b.slice(0,Af(b)+1).replace(dl,"")}function Wt(b){return function(M){return b(M)}}function bl(b,M){return Ve(M,function(R){return b[R]})}function Mi(b,M){return b.has(M)}function Tf(b,M){for(var R=-1,W=b.length;++R<W&&Ao(M,b[R],0)>-1;);return R}function Ef(b,M){for(var R=b.length;R--&&Ao(M,b[R],0)>-1;);return R}function cT(b,M){for(var R=b.length,W=0;R--;)b[R]===M&&++W;return W}var lT=El(q_),uT=El(G_);function dT(b){return"\\"+Y_[b]}function hT(b,M){return b==null?t:b[M]}function bo(b){return $_.test(b)}function fT(b){return K_.test(b)}function gT(b){for(var M,R=[];!(M=b.next()).done;)R.push(M.value);return R}function Il(b){var M=-1,R=Array(b.size);return b.forEach(function(W,ae){R[++M]=[ae,W]}),R}function Sf(b,M){return function(R){return b(M(R))}}function kr(b,M){for(var R=-1,W=b.length,ae=0,Se=[];++R<W;){var nt=b[R];(nt===M||nt===m)&&(b[R]=m,Se[ae++]=R)}return Se}function Va(b){var M=-1,R=Array(b.size);return b.forEach(function(W){R[++M]=W}),R}function mT(b){var M=-1,R=Array(b.size);return b.forEach(function(W){R[++M]=[W,W]}),R}function pT(b,M,R){for(var W=R-1,ae=b.length;++W<ae;)if(b[W]===M)return W;return-1}function vT(b,M,R){for(var W=R+1;W--;)if(b[W]===M)return W;return W}function Io(b){return bo(b)?CT(b):nT(b)}function kn(b){return bo(b)?wT(b):rT(b)}function Af(b){for(var M=b.length;M--&&c_.test(b.charAt(M)););return M}var yT=El(j_);function CT(b){for(var M=pl.lastIndex=0;pl.test(b);)++M;return M}function wT(b){return b.match(pl)||[]}function _T(b){return b.match(H_)||[]}var TT=function b(M){M=M==null?ht:ko.defaults(ht.Object(),M,ko.pick(ht,z_));var R=M.Array,W=M.Date,ae=M.Error,Se=M.Function,nt=M.Math,Ne=M.Object,kl=M.RegExp,ET=M.String,un=M.TypeError,Fa=R.prototype,ST=Se.prototype,Ro=Ne.prototype,Ha=M["__core-js_shared__"],$a=ST.toString,Ie=Ro.hasOwnProperty,AT=0,bf=function(){var o=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Ka=Ro.toString,bT=$a.call(Ne),IT=ht._,kT=kl("^"+$a.call(Ie).replace(ul,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),za=lf?M.Buffer:t,Rr=M.Symbol,Wa=M.Uint8Array,If=za?za.allocUnsafe:t,qa=Sf(Ne.getPrototypeOf,Ne),kf=Ne.create,Rf=Ro.propertyIsEnumerable,Ga=Fa.splice,Of=Rr?Rr.isConcatSpreadable:t,xi=Rr?Rr.iterator:t,Yr=Rr?Rr.toStringTag:t,ja=function(){try{var o=eo(Ne,"defineProperty");return o({},"",{}),o}catch{}}(),RT=M.clearTimeout!==ht.clearTimeout&&M.clearTimeout,OT=W&&W.now!==ht.Date.now&&W.now,NT=M.setTimeout!==ht.setTimeout&&M.setTimeout,Ya=nt.ceil,Ja=nt.floor,Rl=Ne.getOwnPropertySymbols,PT=za?za.isBuffer:t,Nf=M.isFinite,MT=Fa.join,xT=Sf(Ne.keys,Ne),rt=nt.max,_t=nt.min,DT=W.now,LT=M.parseInt,Pf=nt.random,BT=Fa.reverse,Ol=eo(M,"DataView"),Di=eo(M,"Map"),Nl=eo(M,"Promise"),Oo=eo(M,"Set"),Li=eo(M,"WeakMap"),Bi=eo(Ne,"create"),Qa=Li&&new Li,No={},UT=to(Ol),VT=to(Di),FT=to(Nl),HT=to(Oo),$T=to(Li),Xa=Rr?Rr.prototype:t,Ui=Xa?Xa.valueOf:t,Mf=Xa?Xa.toString:t;function y(o){if(ze(o)&&!ce(o)&&!(o instanceof pe)){if(o instanceof dn)return o;if(Ie.call(o,"__wrapped__"))return xg(o)}return new dn(o)}var Po=function(){function o(){}return function(a){if(!$e(a))return{};if(kf)return kf(a);o.prototype=a;var u=new o;return o.prototype=t,u}}();function Za(){}function dn(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}y.templateSettings={escape:n_,evaluate:r_,interpolate:Hh,variable:"",imports:{_:y}},y.prototype=Za.prototype,y.prototype.constructor=y,dn.prototype=Po(Za.prototype),dn.prototype.constructor=dn;function pe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Kt,this.__views__=[]}function KT(){var o=new pe(this.__wrapped__);return o.__actions__=xt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=xt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=xt(this.__views__),o}function zT(){if(this.__filtered__){var o=new pe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function WT(){var o=this.__wrapped__.value(),a=this.__dir__,u=ce(o),h=a<0,p=u?o.length:0,w=rS(0,p,this.__views__),T=w.start,E=w.end,I=E-T,x=h?E:T-1,D=this.__iteratees__,L=D.length,K=0,Y=_t(I,this.__takeCount__);if(!u||!h&&p==I&&Y==I)return rg(o,this.__actions__);var Z=[];e:for(;I--&&K<Y;){x+=a;for(var he=-1,ee=o[x];++he<L;){var me=D[he],ve=me.iteratee,jt=me.type,Ot=ve(ee);if(jt==An)ee=Ot;else if(!Ot){if(jt==Ct)continue e;break e}}Z[K++]=ee}return Z}pe.prototype=Po(Za.prototype),pe.prototype.constructor=pe;function Jr(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function qT(){this.__data__=Bi?Bi(null):{},this.size=0}function GT(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function jT(o){var a=this.__data__;if(Bi){var u=a[o];return u===f?t:u}return Ie.call(a,o)?a[o]:t}function YT(o){var a=this.__data__;return Bi?a[o]!==t:Ie.call(a,o)}function JT(o,a){var u=this.__data__;return this.size+=this.has(o)?0:1,u[o]=Bi&&a===t?f:a,this}Jr.prototype.clear=qT,Jr.prototype.delete=GT,Jr.prototype.get=jT,Jr.prototype.has=YT,Jr.prototype.set=JT;function ar(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function QT(){this.__data__=[],this.size=0}function XT(o){var a=this.__data__,u=es(a,o);if(u<0)return!1;var h=a.length-1;return u==h?a.pop():Ga.call(a,u,1),--this.size,!0}function ZT(o){var a=this.__data__,u=es(a,o);return u<0?t:a[u][1]}function eE(o){return es(this.__data__,o)>-1}function tE(o,a){var u=this.__data__,h=es(u,o);return h<0?(++this.size,u.push([o,a])):u[h][1]=a,this}ar.prototype.clear=QT,ar.prototype.delete=XT,ar.prototype.get=ZT,ar.prototype.has=eE,ar.prototype.set=tE;function sr(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function nE(){this.size=0,this.__data__={hash:new Jr,map:new(Di||ar),string:new Jr}}function rE(o){var a=hs(this,o).delete(o);return this.size-=a?1:0,a}function oE(o){return hs(this,o).get(o)}function iE(o){return hs(this,o).has(o)}function aE(o,a){var u=hs(this,o),h=u.size;return u.set(o,a),this.size+=u.size==h?0:1,this}sr.prototype.clear=nE,sr.prototype.delete=rE,sr.prototype.get=oE,sr.prototype.has=iE,sr.prototype.set=aE;function Qr(o){var a=-1,u=o==null?0:o.length;for(this.__data__=new sr;++a<u;)this.add(o[a])}function sE(o){return this.__data__.set(o,f),this}function cE(o){return this.__data__.has(o)}Qr.prototype.add=Qr.prototype.push=sE,Qr.prototype.has=cE;function Rn(o){var a=this.__data__=new ar(o);this.size=a.size}function lE(){this.__data__=new ar,this.size=0}function uE(o){var a=this.__data__,u=a.delete(o);return this.size=a.size,u}function dE(o){return this.__data__.get(o)}function hE(o){return this.__data__.has(o)}function fE(o,a){var u=this.__data__;if(u instanceof ar){var h=u.__data__;if(!Di||h.length<i-1)return h.push([o,a]),this.size=++u.size,this;u=this.__data__=new sr(h)}return u.set(o,a),this.size=u.size,this}Rn.prototype.clear=lE,Rn.prototype.delete=uE,Rn.prototype.get=dE,Rn.prototype.has=hE,Rn.prototype.set=fE;function xf(o,a){var u=ce(o),h=!u&&no(o),p=!u&&!h&&xr(o),w=!u&&!h&&!p&&Lo(o),T=u||h||p||w,E=T?Al(o.length,ET):[],I=E.length;for(var x in o)(a||Ie.call(o,x))&&!(T&&(x=="length"||p&&(x=="offset"||x=="parent")||w&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||dr(x,I)))&&E.push(x);return E}function Df(o){var a=o.length;return a?o[$l(0,a-1)]:t}function gE(o,a){return fs(xt(o),Xr(a,0,o.length))}function mE(o){return fs(xt(o))}function Pl(o,a,u){(u!==t&&!On(o[a],u)||u===t&&!(a in o))&&cr(o,a,u)}function Vi(o,a,u){var h=o[a];(!(Ie.call(o,a)&&On(h,u))||u===t&&!(a in o))&&cr(o,a,u)}function es(o,a){for(var u=o.length;u--;)if(On(o[u][0],a))return u;return-1}function pE(o,a,u,h){return Or(o,function(p,w,T){a(h,p,u(p),T)}),h}function Lf(o,a){return o&&Wn(a,st(a),o)}function vE(o,a){return o&&Wn(a,Lt(a),o)}function cr(o,a,u){a=="__proto__"&&ja?ja(o,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):o[a]=u}function Ml(o,a){for(var u=-1,h=a.length,p=R(h),w=o==null;++u<h;)p[u]=w?t:fu(o,a[u]);return p}function Xr(o,a,u){return o===o&&(u!==t&&(o=o<=u?o:u),a!==t&&(o=o>=a?o:a)),o}function hn(o,a,u,h,p,w){var T,E=a&v,I=a&C,x=a&S;if(u&&(T=p?u(o,h,p,w):u(o)),T!==t)return T;if(!$e(o))return o;var D=ce(o);if(D){if(T=iS(o),!E)return xt(o,T)}else{var L=Tt(o),K=L==Pa||L==Bh;if(xr(o))return ag(o,E);if(L==ir||L==To||K&&!p){if(T=I||K?{}:Ag(o),!E)return I?jE(o,vE(T,o)):GE(o,Lf(T,o))}else{if(!Me[L])return p?o:{};T=aS(o,L,E)}}w||(w=new Rn);var Y=w.get(o);if(Y)return Y;w.set(o,T),em(o)?o.forEach(function(ee){T.add(hn(ee,a,u,ee,o,w))}):Xg(o)&&o.forEach(function(ee,me){T.set(me,hn(ee,a,u,me,o,w))});var Z=x?I?Zl:Xl:I?Lt:st,he=D?t:Z(o);return ln(he||o,function(ee,me){he&&(me=ee,ee=o[me]),Vi(T,me,hn(ee,a,u,me,o,w))}),T}function yE(o){var a=st(o);return function(u){return Bf(u,o,a)}}function Bf(o,a,u){var h=u.length;if(o==null)return!h;for(o=Ne(o);h--;){var p=u[h],w=a[p],T=o[p];if(T===t&&!(p in o)||!w(T))return!1}return!0}function Uf(o,a,u){if(typeof o!="function")throw new un(l);return qi(function(){o.apply(t,u)},a)}function Fi(o,a,u,h){var p=-1,w=Ba,T=!0,E=o.length,I=[],x=a.length;if(!E)return I;u&&(a=Ve(a,Wt(u))),h?(w=Cl,T=!1):a.length>=i&&(w=Mi,T=!1,a=new Qr(a));e:for(;++p<E;){var D=o[p],L=u==null?D:u(D);if(D=h||D!==0?D:0,T&&L===L){for(var K=x;K--;)if(a[K]===L)continue e;I.push(D)}else w(a,L,h)||I.push(D)}return I}var Or=dg(zn),Vf=dg(Dl,!0);function CE(o,a){var u=!0;return Or(o,function(h,p,w){return u=!!a(h,p,w),u}),u}function ts(o,a,u){for(var h=-1,p=o.length;++h<p;){var w=o[h],T=a(w);if(T!=null&&(E===t?T===T&&!Gt(T):u(T,E)))var E=T,I=w}return I}function wE(o,a,u,h){var p=o.length;for(u=de(u),u<0&&(u=-u>p?0:p+u),h=h===t||h>p?p:de(h),h<0&&(h+=p),h=u>h?0:nm(h);u<h;)o[u++]=a;return o}function Ff(o,a){var u=[];return Or(o,function(h,p,w){a(h,p,w)&&u.push(h)}),u}function ft(o,a,u,h,p){var w=-1,T=o.length;for(u||(u=cS),p||(p=[]);++w<T;){var E=o[w];a>0&&u(E)?a>1?ft(E,a-1,u,h,p):Ir(p,E):h||(p[p.length]=E)}return p}var xl=hg(),Hf=hg(!0);function zn(o,a){return o&&xl(o,a,st)}function Dl(o,a){return o&&Hf(o,a,st)}function ns(o,a){return br(a,function(u){return hr(o[u])})}function Zr(o,a){a=Pr(a,o);for(var u=0,h=a.length;o!=null&&u<h;)o=o[qn(a[u++])];return u&&u==h?o:t}function $f(o,a,u){var h=a(o);return ce(o)?h:Ir(h,u(o))}function kt(o){return o==null?o===t?Yw:Gw:Yr&&Yr in Ne(o)?nS(o):mS(o)}function Ll(o,a){return o>a}function _E(o,a){return o!=null&&Ie.call(o,a)}function TE(o,a){return o!=null&&a in Ne(o)}function EE(o,a,u){return o>=_t(a,u)&&o<rt(a,u)}function Bl(o,a,u){for(var h=u?Cl:Ba,p=o[0].length,w=o.length,T=w,E=R(w),I=1/0,x=[];T--;){var D=o[T];T&&a&&(D=Ve(D,Wt(a))),I=_t(D.length,I),E[T]=!u&&(a||p>=120&&D.length>=120)?new Qr(T&&D):t}D=o[0];var L=-1,K=E[0];e:for(;++L<p&&x.length<I;){var Y=D[L],Z=a?a(Y):Y;if(Y=u||Y!==0?Y:0,!(K?Mi(K,Z):h(x,Z,u))){for(T=w;--T;){var he=E[T];if(!(he?Mi(he,Z):h(o[T],Z,u)))continue e}K&&K.push(Z),x.push(Y)}}return x}function SE(o,a,u,h){return zn(o,function(p,w,T){a(h,u(p),w,T)}),h}function Hi(o,a,u){a=Pr(a,o),o=Rg(o,a);var h=o==null?o:o[qn(gn(a))];return h==null?t:zt(h,o,u)}function Kf(o){return ze(o)&&kt(o)==To}function AE(o){return ze(o)&&kt(o)==Pi}function bE(o){return ze(o)&&kt(o)==Ii}function $i(o,a,u,h,p){return o===a?!0:o==null||a==null||!ze(o)&&!ze(a)?o!==o&&a!==a:IE(o,a,u,h,$i,p)}function IE(o,a,u,h,p,w){var T=ce(o),E=ce(a),I=T?Oa:Tt(o),x=E?Oa:Tt(a);I=I==To?ir:I,x=x==To?ir:x;var D=I==ir,L=x==ir,K=I==x;if(K&&xr(o)){if(!xr(a))return!1;T=!0,D=!1}if(K&&!D)return w||(w=new Rn),T||Lo(o)?Tg(o,a,u,h,p,w):eS(o,a,I,u,h,p,w);if(!(u&_)){var Y=D&&Ie.call(o,"__wrapped__"),Z=L&&Ie.call(a,"__wrapped__");if(Y||Z){var he=Y?o.value():o,ee=Z?a.value():a;return w||(w=new Rn),p(he,ee,u,h,w)}}return K?(w||(w=new Rn),tS(o,a,u,h,p,w)):!1}function kE(o){return ze(o)&&Tt(o)==bn}function Ul(o,a,u,h){var p=u.length,w=p,T=!h;if(o==null)return!w;for(o=Ne(o);p--;){var E=u[p];if(T&&E[2]?E[1]!==o[E[0]]:!(E[0]in o))return!1}for(;++p<w;){E=u[p];var I=E[0],x=o[I],D=E[1];if(T&&E[2]){if(x===t&&!(I in o))return!1}else{var L=new Rn;if(h)var K=h(x,D,I,o,a,L);if(!(K===t?$i(D,x,_|A,h,L):K))return!1}}return!0}function zf(o){if(!$e(o)||uS(o))return!1;var a=hr(o)?kT:y_;return a.test(to(o))}function RE(o){return ze(o)&&kt(o)==Ri}function OE(o){return ze(o)&&Tt(o)==In}function NE(o){return ze(o)&&Cs(o.length)&&!!De[kt(o)]}function Wf(o){return typeof o=="function"?o:o==null?Bt:typeof o=="object"?ce(o)?jf(o[0],o[1]):Gf(o):fm(o)}function Vl(o){if(!Wi(o))return xT(o);var a=[];for(var u in Ne(o))Ie.call(o,u)&&u!="constructor"&&a.push(u);return a}function PE(o){if(!$e(o))return gS(o);var a=Wi(o),u=[];for(var h in o)h=="constructor"&&(a||!Ie.call(o,h))||u.push(h);return u}function Fl(o,a){return o<a}function qf(o,a){var u=-1,h=Dt(o)?R(o.length):[];return Or(o,function(p,w,T){h[++u]=a(p,w,T)}),h}function Gf(o){var a=tu(o);return a.length==1&&a[0][2]?Ig(a[0][0],a[0][1]):function(u){return u===o||Ul(u,o,a)}}function jf(o,a){return ru(o)&&bg(a)?Ig(qn(o),a):function(u){var h=fu(u,o);return h===t&&h===a?gu(u,o):$i(a,h,_|A)}}function rs(o,a,u,h,p){o!==a&&xl(a,function(w,T){if(p||(p=new Rn),$e(w))ME(o,a,T,u,rs,h,p);else{var E=h?h(iu(o,T),w,T+"",o,a,p):t;E===t&&(E=w),Pl(o,T,E)}},Lt)}function ME(o,a,u,h,p,w,T){var E=iu(o,u),I=iu(a,u),x=T.get(I);if(x){Pl(o,u,x);return}var D=w?w(E,I,u+"",o,a,T):t,L=D===t;if(L){var K=ce(I),Y=!K&&xr(I),Z=!K&&!Y&&Lo(I);D=I,K||Y||Z?ce(E)?D=E:je(E)?D=xt(E):Y?(L=!1,D=ag(I,!0)):Z?(L=!1,D=sg(I,!0)):D=[]:Gi(I)||no(I)?(D=E,no(E)?D=rm(E):(!$e(E)||hr(E))&&(D=Ag(I))):L=!1}L&&(T.set(I,D),p(D,I,h,w,T),T.delete(I)),Pl(o,u,D)}function Yf(o,a){var u=o.length;if(u)return a+=a<0?u:0,dr(a,u)?o[a]:t}function Jf(o,a,u){a.length?a=Ve(a,function(w){return ce(w)?function(T){return Zr(T,w.length===1?w[0]:w)}:w}):a=[Bt];var h=-1;a=Ve(a,Wt(X()));var p=qf(o,function(w,T,E){var I=Ve(a,function(x){return x(w)});return{criteria:I,index:++h,value:w}});return aT(p,function(w,T){return qE(w,T,u)})}function xE(o,a){return Qf(o,a,function(u,h){return gu(o,h)})}function Qf(o,a,u){for(var h=-1,p=a.length,w={};++h<p;){var T=a[h],E=Zr(o,T);u(E,T)&&Ki(w,Pr(T,o),E)}return w}function DE(o){return function(a){return Zr(a,o)}}function Hl(o,a,u,h){var p=h?iT:Ao,w=-1,T=a.length,E=o;for(o===a&&(a=xt(a)),u&&(E=Ve(o,Wt(u)));++w<T;)for(var I=0,x=a[w],D=u?u(x):x;(I=p(E,D,I,h))>-1;)E!==o&&Ga.call(E,I,1),Ga.call(o,I,1);return o}function Xf(o,a){for(var u=o?a.length:0,h=u-1;u--;){var p=a[u];if(u==h||p!==w){var w=p;dr(p)?Ga.call(o,p,1):Wl(o,p)}}return o}function $l(o,a){return o+Ja(Pf()*(a-o+1))}function LE(o,a,u,h){for(var p=-1,w=rt(Ya((a-o)/(u||1)),0),T=R(w);w--;)T[h?w:++p]=o,o+=u;return T}function Kl(o,a){var u="";if(!o||a<1||a>Qe)return u;do a%2&&(u+=o),a=Ja(a/2),a&&(o+=o);while(a);return u}function fe(o,a){return au(kg(o,a,Bt),o+"")}function BE(o){return Df(Bo(o))}function UE(o,a){var u=Bo(o);return fs(u,Xr(a,0,u.length))}function Ki(o,a,u,h){if(!$e(o))return o;a=Pr(a,o);for(var p=-1,w=a.length,T=w-1,E=o;E!=null&&++p<w;){var I=qn(a[p]),x=u;if(I==="__proto__"||I==="constructor"||I==="prototype")return o;if(p!=T){var D=E[I];x=h?h(D,I,E):t,x===t&&(x=$e(D)?D:dr(a[p+1])?[]:{})}Vi(E,I,x),E=E[I]}return o}var Zf=Qa?function(o,a){return Qa.set(o,a),o}:Bt,VE=ja?function(o,a){return ja(o,"toString",{configurable:!0,enumerable:!1,value:pu(a),writable:!0})}:Bt;function FE(o){return fs(Bo(o))}function fn(o,a,u){var h=-1,p=o.length;a<0&&(a=-a>p?0:p+a),u=u>p?p:u,u<0&&(u+=p),p=a>u?0:u-a>>>0,a>>>=0;for(var w=R(p);++h<p;)w[h]=o[h+a];return w}function HE(o,a){var u;return Or(o,function(h,p,w){return u=a(h,p,w),!u}),!!u}function os(o,a,u){var h=0,p=o==null?h:o.length;if(typeof a=="number"&&a===a&&p<=Kw){for(;h<p;){var w=h+p>>>1,T=o[w];T!==null&&!Gt(T)&&(u?T<=a:T<a)?h=w+1:p=w}return p}return zl(o,a,Bt,u)}function zl(o,a,u,h){var p=0,w=o==null?0:o.length;if(w===0)return 0;a=u(a);for(var T=a!==a,E=a===null,I=Gt(a),x=a===t;p<w;){var D=Ja((p+w)/2),L=u(o[D]),K=L!==t,Y=L===null,Z=L===L,he=Gt(L);if(T)var ee=h||Z;else x?ee=Z&&(h||K):E?ee=Z&&K&&(h||!Y):I?ee=Z&&K&&!Y&&(h||!he):Y||he?ee=!1:ee=h?L<=a:L<a;ee?p=D+1:w=D}return _t(w,el)}function eg(o,a){for(var u=-1,h=o.length,p=0,w=[];++u<h;){var T=o[u],E=a?a(T):T;if(!u||!On(E,I)){var I=E;w[p++]=T===0?0:T}}return w}function tg(o){return typeof o=="number"?o:Gt(o)?Ai:+o}function qt(o){if(typeof o=="string")return o;if(ce(o))return Ve(o,qt)+"";if(Gt(o))return Mf?Mf.call(o):"";var a=o+"";return a=="0"&&1/o==-Mt?"-0":a}function Nr(o,a,u){var h=-1,p=Ba,w=o.length,T=!0,E=[],I=E;if(u)T=!1,p=Cl;else if(w>=i){var x=a?null:XE(o);if(x)return Va(x);T=!1,p=Mi,I=new Qr}else I=a?[]:E;e:for(;++h<w;){var D=o[h],L=a?a(D):D;if(D=u||D!==0?D:0,T&&L===L){for(var K=I.length;K--;)if(I[K]===L)continue e;a&&I.push(L),E.push(D)}else p(I,L,u)||(I!==E&&I.push(L),E.push(D))}return E}function Wl(o,a){return a=Pr(a,o),o=Rg(o,a),o==null||delete o[qn(gn(a))]}function ng(o,a,u,h){return Ki(o,a,u(Zr(o,a)),h)}function is(o,a,u,h){for(var p=o.length,w=h?p:-1;(h?w--:++w<p)&&a(o[w],w,o););return u?fn(o,h?0:w,h?w+1:p):fn(o,h?w+1:0,h?p:w)}function rg(o,a){var u=o;return u instanceof pe&&(u=u.value()),wl(a,function(h,p){return p.func.apply(p.thisArg,Ir([h],p.args))},u)}function ql(o,a,u){var h=o.length;if(h<2)return h?Nr(o[0]):[];for(var p=-1,w=R(h);++p<h;)for(var T=o[p],E=-1;++E<h;)E!=p&&(w[p]=Fi(w[p]||T,o[E],a,u));return Nr(ft(w,1),a,u)}function og(o,a,u){for(var h=-1,p=o.length,w=a.length,T={};++h<p;){var E=h<w?a[h]:t;u(T,o[h],E)}return T}function Gl(o){return je(o)?o:[]}function jl(o){return typeof o=="function"?o:Bt}function Pr(o,a){return ce(o)?o:ru(o,a)?[o]:Mg(be(o))}var $E=fe;function Mr(o,a,u){var h=o.length;return u=u===t?h:u,!a&&u>=h?o:fn(o,a,u)}var ig=RT||function(o){return ht.clearTimeout(o)};function ag(o,a){if(a)return o.slice();var u=o.length,h=If?If(u):new o.constructor(u);return o.copy(h),h}function Yl(o){var a=new o.constructor(o.byteLength);return new Wa(a).set(new Wa(o)),a}function KE(o,a){var u=a?Yl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.byteLength)}function zE(o){var a=new o.constructor(o.source,$h.exec(o));return a.lastIndex=o.lastIndex,a}function WE(o){return Ui?Ne(Ui.call(o)):{}}function sg(o,a){var u=a?Yl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.length)}function cg(o,a){if(o!==a){var u=o!==t,h=o===null,p=o===o,w=Gt(o),T=a!==t,E=a===null,I=a===a,x=Gt(a);if(!E&&!x&&!w&&o>a||w&&T&&I&&!E&&!x||h&&T&&I||!u&&I||!p)return 1;if(!h&&!w&&!x&&o<a||x&&u&&p&&!h&&!w||E&&u&&p||!T&&p||!I)return-1}return 0}function qE(o,a,u){for(var h=-1,p=o.criteria,w=a.criteria,T=p.length,E=u.length;++h<T;){var I=cg(p[h],w[h]);if(I){if(h>=E)return I;var x=u[h];return I*(x=="desc"?-1:1)}}return o.index-a.index}function lg(o,a,u,h){for(var p=-1,w=o.length,T=u.length,E=-1,I=a.length,x=rt(w-T,0),D=R(I+x),L=!h;++E<I;)D[E]=a[E];for(;++p<T;)(L||p<w)&&(D[u[p]]=o[p]);for(;x--;)D[E++]=o[p++];return D}function ug(o,a,u,h){for(var p=-1,w=o.length,T=-1,E=u.length,I=-1,x=a.length,D=rt(w-E,0),L=R(D+x),K=!h;++p<D;)L[p]=o[p];for(var Y=p;++I<x;)L[Y+I]=a[I];for(;++T<E;)(K||p<w)&&(L[Y+u[T]]=o[p++]);return L}function xt(o,a){var u=-1,h=o.length;for(a||(a=R(h));++u<h;)a[u]=o[u];return a}function Wn(o,a,u,h){var p=!u;u||(u={});for(var w=-1,T=a.length;++w<T;){var E=a[w],I=h?h(u[E],o[E],E,u,o):t;I===t&&(I=o[E]),p?cr(u,E,I):Vi(u,E,I)}return u}function GE(o,a){return Wn(o,nu(o),a)}function jE(o,a){return Wn(o,Eg(o),a)}function as(o,a){return function(u,h){var p=ce(u)?Z_:pE,w=a?a():{};return p(u,o,X(h,2),w)}}function Mo(o){return fe(function(a,u){var h=-1,p=u.length,w=p>1?u[p-1]:t,T=p>2?u[2]:t;for(w=o.length>3&&typeof w=="function"?(p--,w):t,T&&Rt(u[0],u[1],T)&&(w=p<3?t:w,p=1),a=Ne(a);++h<p;){var E=u[h];E&&o(a,E,h,w)}return a})}function dg(o,a){return function(u,h){if(u==null)return u;if(!Dt(u))return o(u,h);for(var p=u.length,w=a?p:-1,T=Ne(u);(a?w--:++w<p)&&h(T[w],w,T)!==!1;);return u}}function hg(o){return function(a,u,h){for(var p=-1,w=Ne(a),T=h(a),E=T.length;E--;){var I=T[o?E:++p];if(u(w[I],I,w)===!1)break}return a}}function YE(o,a,u){var h=a&O,p=zi(o);function w(){var T=this&&this!==ht&&this instanceof w?p:o;return T.apply(h?u:this,arguments)}return w}function fg(o){return function(a){a=be(a);var u=bo(a)?kn(a):t,h=u?u[0]:a.charAt(0),p=u?Mr(u,1).join(""):a.slice(1);return h[o]()+p}}function xo(o){return function(a){return wl(dm(um(a).replace(V_,"")),o,"")}}function zi(o){return function(){var a=arguments;switch(a.length){case 0:return new o;case 1:return new o(a[0]);case 2:return new o(a[0],a[1]);case 3:return new o(a[0],a[1],a[2]);case 4:return new o(a[0],a[1],a[2],a[3]);case 5:return new o(a[0],a[1],a[2],a[3],a[4]);case 6:return new o(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new o(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Po(o.prototype),h=o.apply(u,a);return $e(h)?h:u}}function JE(o,a,u){var h=zi(o);function p(){for(var w=arguments.length,T=R(w),E=w,I=Do(p);E--;)T[E]=arguments[E];var x=w<3&&T[0]!==I&&T[w-1]!==I?[]:kr(T,I);if(w-=x.length,w<u)return yg(o,a,ss,p.placeholder,t,T,x,t,t,u-w);var D=this&&this!==ht&&this instanceof p?h:o;return zt(D,this,T)}return p}function gg(o){return function(a,u,h){var p=Ne(a);if(!Dt(a)){var w=X(u,3);a=st(a),u=function(E){return w(p[E],E,p)}}var T=o(a,u,h);return T>-1?p[w?a[T]:T]:t}}function mg(o){return ur(function(a){var u=a.length,h=u,p=dn.prototype.thru;for(o&&a.reverse();h--;){var w=a[h];if(typeof w!="function")throw new un(l);if(p&&!T&&ds(w)=="wrapper")var T=new dn([],!0)}for(h=T?h:u;++h<u;){w=a[h];var E=ds(w),I=E=="wrapper"?eu(w):t;I&&ou(I[0])&&I[1]==(z|U|se|tt)&&!I[4].length&&I[9]==1?T=T[ds(I[0])].apply(T,I[3]):T=w.length==1&&ou(w)?T[E]():T.thru(w)}return function(){var x=arguments,D=x[0];if(T&&x.length==1&&ce(D))return T.plant(D).value();for(var L=0,K=u?a[L].apply(this,x):D;++L<u;)K=a[L].call(this,K);return K}})}function ss(o,a,u,h,p,w,T,E,I,x){var D=a&z,L=a&O,K=a&$,Y=a&(U|Q),Z=a&Te,he=K?t:zi(o);function ee(){for(var me=arguments.length,ve=R(me),jt=me;jt--;)ve[jt]=arguments[jt];if(Y)var Ot=Do(ee),Yt=cT(ve,Ot);if(h&&(ve=lg(ve,h,p,Y)),w&&(ve=ug(ve,w,T,Y)),me-=Yt,Y&&me<x){var Ye=kr(ve,Ot);return yg(o,a,ss,ee.placeholder,u,ve,Ye,E,I,x-me)}var Nn=L?u:this,gr=K?Nn[o]:o;return me=ve.length,E?ve=pS(ve,E):Z&&me>1&&ve.reverse(),D&&I<me&&(ve.length=I),this&&this!==ht&&this instanceof ee&&(gr=he||zi(gr)),gr.apply(Nn,ve)}return ee}function pg(o,a){return function(u,h){return SE(u,o,a(h),{})}}function cs(o,a){return function(u,h){var p;if(u===t&&h===t)return a;if(u!==t&&(p=u),h!==t){if(p===t)return h;typeof u=="string"||typeof h=="string"?(u=qt(u),h=qt(h)):(u=tg(u),h=tg(h)),p=o(u,h)}return p}}function Jl(o){return ur(function(a){return a=Ve(a,Wt(X())),fe(function(u){var h=this;return o(a,function(p){return zt(p,h,u)})})})}function ls(o,a){a=a===t?" ":qt(a);var u=a.length;if(u<2)return u?Kl(a,o):a;var h=Kl(a,Ya(o/Io(a)));return bo(a)?Mr(kn(h),0,o).join(""):h.slice(0,o)}function QE(o,a,u,h){var p=a&O,w=zi(o);function T(){for(var E=-1,I=arguments.length,x=-1,D=h.length,L=R(D+I),K=this&&this!==ht&&this instanceof T?w:o;++x<D;)L[x]=h[x];for(;I--;)L[x++]=arguments[++E];return zt(K,p?u:this,L)}return T}function vg(o){return function(a,u,h){return h&&typeof h!="number"&&Rt(a,u,h)&&(u=h=t),a=fr(a),u===t?(u=a,a=0):u=fr(u),h=h===t?a<u?1:-1:fr(h),LE(a,u,h,o)}}function us(o){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=mn(a),u=mn(u)),o(a,u)}}function yg(o,a,u,h,p,w,T,E,I,x){var D=a&U,L=D?T:t,K=D?t:T,Y=D?w:t,Z=D?t:w;a|=D?se:we,a&=~(D?we:se),a&V||(a&=~(O|$));var he=[o,a,p,Y,L,Z,K,E,I,x],ee=u.apply(t,he);return ou(o)&&Og(ee,he),ee.placeholder=h,Ng(ee,o,a)}function Ql(o){var a=nt[o];return function(u,h){if(u=mn(u),h=h==null?0:_t(de(h),292),h&&Nf(u)){var p=(be(u)+"e").split("e"),w=a(p[0]+"e"+(+p[1]+h));return p=(be(w)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return a(u)}}var XE=Oo&&1/Va(new Oo([,-0]))[1]==Mt?function(o){return new Oo(o)}:Cu;function Cg(o){return function(a){var u=Tt(a);return u==bn?Il(a):u==In?mT(a):sT(a,o(a))}}function lr(o,a,u,h,p,w,T,E){var I=a&$;if(!I&&typeof o!="function")throw new un(l);var x=h?h.length:0;if(x||(a&=~(se|we),h=p=t),T=T===t?T:rt(de(T),0),E=E===t?E:de(E),x-=p?p.length:0,a&we){var D=h,L=p;h=p=t}var K=I?t:eu(o),Y=[o,a,u,h,p,D,L,w,T,E];if(K&&fS(Y,K),o=Y[0],a=Y[1],u=Y[2],h=Y[3],p=Y[4],E=Y[9]=Y[9]===t?I?0:o.length:rt(Y[9]-x,0),!E&&a&(U|Q)&&(a&=~(U|Q)),!a||a==O)var Z=YE(o,a,u);else a==U||a==Q?Z=JE(o,a,E):(a==se||a==(O|se))&&!p.length?Z=QE(o,a,u,h):Z=ss.apply(t,Y);var he=K?Zf:Og;return Ng(he(Z,Y),o,a)}function wg(o,a,u,h){return o===t||On(o,Ro[u])&&!Ie.call(h,u)?a:o}function _g(o,a,u,h,p,w){return $e(o)&&$e(a)&&(w.set(a,o),rs(o,a,t,_g,w),w.delete(a)),o}function ZE(o){return Gi(o)?t:o}function Tg(o,a,u,h,p,w){var T=u&_,E=o.length,I=a.length;if(E!=I&&!(T&&I>E))return!1;var x=w.get(o),D=w.get(a);if(x&&D)return x==a&&D==o;var L=-1,K=!0,Y=u&A?new Qr:t;for(w.set(o,a),w.set(a,o);++L<E;){var Z=o[L],he=a[L];if(h)var ee=T?h(he,Z,L,a,o,w):h(Z,he,L,o,a,w);if(ee!==t){if(ee)continue;K=!1;break}if(Y){if(!_l(a,function(me,ve){if(!Mi(Y,ve)&&(Z===me||p(Z,me,u,h,w)))return Y.push(ve)})){K=!1;break}}else if(!(Z===he||p(Z,he,u,h,w))){K=!1;break}}return w.delete(o),w.delete(a),K}function eS(o,a,u,h,p,w,T){switch(u){case Eo:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case Pi:return!(o.byteLength!=a.byteLength||!w(new Wa(o),new Wa(a)));case bi:case Ii:case ki:return On(+o,+a);case Na:return o.name==a.name&&o.message==a.message;case Ri:case Oi:return o==a+"";case bn:var E=Il;case In:var I=h&_;if(E||(E=Va),o.size!=a.size&&!I)return!1;var x=T.get(o);if(x)return x==a;h|=A,T.set(o,a);var D=Tg(E(o),E(a),h,p,w,T);return T.delete(o),D;case Ma:if(Ui)return Ui.call(o)==Ui.call(a)}return!1}function tS(o,a,u,h,p,w){var T=u&_,E=Xl(o),I=E.length,x=Xl(a),D=x.length;if(I!=D&&!T)return!1;for(var L=I;L--;){var K=E[L];if(!(T?K in a:Ie.call(a,K)))return!1}var Y=w.get(o),Z=w.get(a);if(Y&&Z)return Y==a&&Z==o;var he=!0;w.set(o,a),w.set(a,o);for(var ee=T;++L<I;){K=E[L];var me=o[K],ve=a[K];if(h)var jt=T?h(ve,me,K,a,o,w):h(me,ve,K,o,a,w);if(!(jt===t?me===ve||p(me,ve,u,h,w):jt)){he=!1;break}ee||(ee=K=="constructor")}if(he&&!ee){var Ot=o.constructor,Yt=a.constructor;Ot!=Yt&&"constructor"in o&&"constructor"in a&&!(typeof Ot=="function"&&Ot instanceof Ot&&typeof Yt=="function"&&Yt instanceof Yt)&&(he=!1)}return w.delete(o),w.delete(a),he}function ur(o){return au(kg(o,t,Bg),o+"")}function Xl(o){return $f(o,st,nu)}function Zl(o){return $f(o,Lt,Eg)}var eu=Qa?function(o){return Qa.get(o)}:Cu;function ds(o){for(var a=o.name+"",u=No[a],h=Ie.call(No,a)?u.length:0;h--;){var p=u[h],w=p.func;if(w==null||w==o)return p.name}return a}function Do(o){var a=Ie.call(y,"placeholder")?y:o;return a.placeholder}function X(){var o=y.iteratee||vu;return o=o===vu?Wf:o,arguments.length?o(arguments[0],arguments[1]):o}function hs(o,a){var u=o.__data__;return lS(a)?u[typeof a=="string"?"string":"hash"]:u.map}function tu(o){for(var a=st(o),u=a.length;u--;){var h=a[u],p=o[h];a[u]=[h,p,bg(p)]}return a}function eo(o,a){var u=hT(o,a);return zf(u)?u:t}function nS(o){var a=Ie.call(o,Yr),u=o[Yr];try{o[Yr]=t;var h=!0}catch{}var p=Ka.call(o);return h&&(a?o[Yr]=u:delete o[Yr]),p}var nu=Rl?function(o){return o==null?[]:(o=Ne(o),br(Rl(o),function(a){return Rf.call(o,a)}))}:wu,Eg=Rl?function(o){for(var a=[];o;)Ir(a,nu(o)),o=qa(o);return a}:wu,Tt=kt;(Ol&&Tt(new Ol(new ArrayBuffer(1)))!=Eo||Di&&Tt(new Di)!=bn||Nl&&Tt(Nl.resolve())!=Uh||Oo&&Tt(new Oo)!=In||Li&&Tt(new Li)!=Ni)&&(Tt=function(o){var a=kt(o),u=a==ir?o.constructor:t,h=u?to(u):"";if(h)switch(h){case UT:return Eo;case VT:return bn;case FT:return Uh;case HT:return In;case $T:return Ni}return a});function rS(o,a,u){for(var h=-1,p=u.length;++h<p;){var w=u[h],T=w.size;switch(w.type){case"drop":o+=T;break;case"dropRight":a-=T;break;case"take":a=_t(a,o+T);break;case"takeRight":o=rt(o,a-T);break}}return{start:o,end:a}}function oS(o){var a=o.match(u_);return a?a[1].split(d_):[]}function Sg(o,a,u){a=Pr(a,o);for(var h=-1,p=a.length,w=!1;++h<p;){var T=qn(a[h]);if(!(w=o!=null&&u(o,T)))break;o=o[T]}return w||++h!=p?w:(p=o==null?0:o.length,!!p&&Cs(p)&&dr(T,p)&&(ce(o)||no(o)))}function iS(o){var a=o.length,u=new o.constructor(a);return a&&typeof o[0]=="string"&&Ie.call(o,"index")&&(u.index=o.index,u.input=o.input),u}function Ag(o){return typeof o.constructor=="function"&&!Wi(o)?Po(qa(o)):{}}function aS(o,a,u){var h=o.constructor;switch(a){case Pi:return Yl(o);case bi:case Ii:return new h(+o);case Eo:return KE(o,u);case tl:case nl:case rl:case ol:case il:case al:case sl:case cl:case ll:return sg(o,u);case bn:return new h;case ki:case Oi:return new h(o);case Ri:return zE(o);case In:return new h;case Ma:return WE(o)}}function sS(o,a){var u=a.length;if(!u)return o;var h=u-1;return a[h]=(u>1?"& ":"")+a[h],a=a.join(u>2?", ":" "),o.replace(l_,`{
68
+ */var FB=ea.exports,Wp;function HB(){return Wp||(Wp=1,function(r,e){(function(){var t,n="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",d="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",g=500,m="__lodash_placeholder__",v=1,C=2,S=4,_=1,b=2,O=1,$=2,V=4,U=8,Q=16,se=32,we=64,z=128,tt=256,Te=512,j=30,q="...",Ee=800,Ue=16,Ct=1,bn=2,sn=3,Mt=1/0,Qe=9007199254740991,wt=17976931348623157e292,Ai=NaN,Kt=4294967295,Jc=Kt-1,Hw=Kt>>>1,$w=[["ary",z],["bind",O],["bindKey",$],["curry",U],["curryRight",Q],["flip",Te],["partial",se],["partialRight",we],["rearg",tt]],To="[object Arguments]",ka="[object Array]",Kw="[object AsyncFunction]",bi="[object Boolean]",Ii="[object Date]",zw="[object DOMException]",Ra="[object Error]",Oa="[object Function]",Dh="[object GeneratorFunction]",In="[object Map]",ki="[object Number]",Ww="[object Null]",ir="[object Object]",Lh="[object Promise]",qw="[object Proxy]",Ri="[object RegExp]",kn="[object Set]",Oi="[object String]",Na="[object Symbol]",Gw="[object Undefined]",Ni="[object WeakMap]",jw="[object WeakSet]",Pi="[object ArrayBuffer]",Eo="[object DataView]",Qc="[object Float32Array]",Xc="[object Float64Array]",Zc="[object Int8Array]",el="[object Int16Array]",tl="[object Int32Array]",nl="[object Uint8Array]",rl="[object Uint8ClampedArray]",ol="[object Uint16Array]",il="[object Uint32Array]",Yw=/\b__p \+= '';/g,Jw=/\b(__p \+=) '' \+/g,Qw=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bh=/&(?:amp|lt|gt|quot|#39);/g,Uh=/[&<>"']/g,Xw=RegExp(Bh.source),Zw=RegExp(Uh.source),e_=/<%-([\s\S]+?)%>/g,t_=/<%([\s\S]+?)%>/g,Vh=/<%=([\s\S]+?)%>/g,n_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r_=/^\w*$/,o_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,al=/[\\^$.*+?()[\]{}|]/g,i_=RegExp(al.source),sl=/^\s+/,a_=/\s/,s_=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,c_=/\{\n\/\* \[wrapped with (.+)\] \*/,l_=/,? & /,u_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,d_=/[()=,{}\[\]\/\s]/,h_=/\\(\\)?/g,f_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fh=/\w*$/,g_=/^[-+]0x[0-9a-f]+$/i,m_=/^0b[01]+$/i,p_=/^\[object .+?Constructor\]$/,v_=/^0o[0-7]+$/i,y_=/^(?:0|[1-9]\d*)$/,C_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Pa=/($^)/,w_=/['\n\r\u2028\u2029\\]/g,Ma="\\ud800-\\udfff",__="\\u0300-\\u036f",T_="\\ufe20-\\ufe2f",E_="\\u20d0-\\u20ff",Hh=__+T_+E_,$h="\\u2700-\\u27bf",Kh="a-z\\xdf-\\xf6\\xf8-\\xff",S_="\\xac\\xb1\\xd7\\xf7",A_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",b_="\\u2000-\\u206f",I_=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",zh="A-Z\\xc0-\\xd6\\xd8-\\xde",Wh="\\ufe0e\\ufe0f",qh=S_+A_+b_+I_,cl="['’]",k_="["+Ma+"]",Gh="["+qh+"]",xa="["+Hh+"]",jh="\\d+",R_="["+$h+"]",Yh="["+Kh+"]",Jh="[^"+Ma+qh+jh+$h+Kh+zh+"]",ll="\\ud83c[\\udffb-\\udfff]",O_="(?:"+xa+"|"+ll+")",Qh="[^"+Ma+"]",ul="(?:\\ud83c[\\udde6-\\uddff]){2}",dl="[\\ud800-\\udbff][\\udc00-\\udfff]",So="["+zh+"]",Xh="\\u200d",Zh="(?:"+Yh+"|"+Jh+")",N_="(?:"+So+"|"+Jh+")",ef="(?:"+cl+"(?:d|ll|m|re|s|t|ve))?",tf="(?:"+cl+"(?:D|LL|M|RE|S|T|VE))?",nf=O_+"?",rf="["+Wh+"]?",P_="(?:"+Xh+"(?:"+[Qh,ul,dl].join("|")+")"+rf+nf+")*",M_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",x_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",of=rf+nf+P_,D_="(?:"+[R_,ul,dl].join("|")+")"+of,L_="(?:"+[Qh+xa+"?",xa,ul,dl,k_].join("|")+")",B_=RegExp(cl,"g"),U_=RegExp(xa,"g"),hl=RegExp(ll+"(?="+ll+")|"+L_+of,"g"),V_=RegExp([So+"?"+Yh+"+"+ef+"(?="+[Gh,So,"$"].join("|")+")",N_+"+"+tf+"(?="+[Gh,So+Zh,"$"].join("|")+")",So+"?"+Zh+"+"+ef,So+"+"+tf,x_,M_,jh,D_].join("|"),"g"),F_=RegExp("["+Xh+Ma+Hh+Wh+"]"),H_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$_=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],K_=-1,De={};De[Qc]=De[Xc]=De[Zc]=De[el]=De[tl]=De[nl]=De[rl]=De[ol]=De[il]=!0,De[To]=De[ka]=De[Pi]=De[bi]=De[Eo]=De[Ii]=De[Ra]=De[Oa]=De[In]=De[ki]=De[ir]=De[Ri]=De[kn]=De[Oi]=De[Ni]=!1;var Me={};Me[To]=Me[ka]=Me[Pi]=Me[Eo]=Me[bi]=Me[Ii]=Me[Qc]=Me[Xc]=Me[Zc]=Me[el]=Me[tl]=Me[In]=Me[ki]=Me[ir]=Me[Ri]=Me[kn]=Me[Oi]=Me[Na]=Me[nl]=Me[rl]=Me[ol]=Me[il]=!0,Me[Ra]=Me[Oa]=Me[Ni]=!1;var z_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},W_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},q_={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},G_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},j_=parseFloat,Y_=parseInt,af=typeof Ms=="object"&&Ms&&Ms.Object===Object&&Ms,J_=typeof self=="object"&&self&&self.Object===Object&&self,ht=af||J_||Function("return this")(),fl=e&&!e.nodeType&&e,jr=fl&&!0&&r&&!r.nodeType&&r,sf=jr&&jr.exports===fl,gl=sf&&af.process,cn=function(){try{var A=jr&&jr.require&&jr.require("util").types;return A||gl&&gl.binding&&gl.binding("util")}catch{}}(),cf=cn&&cn.isArrayBuffer,lf=cn&&cn.isDate,uf=cn&&cn.isMap,df=cn&&cn.isRegExp,hf=cn&&cn.isSet,ff=cn&&cn.isTypedArray;function zt(A,M,R){switch(R.length){case 0:return A.call(M);case 1:return A.call(M,R[0]);case 2:return A.call(M,R[0],R[1]);case 3:return A.call(M,R[0],R[1],R[2])}return A.apply(M,R)}function Q_(A,M,R,W){for(var ae=-1,Se=A==null?0:A.length;++ae<Se;){var nt=A[ae];M(W,nt,R(nt),A)}return W}function ln(A,M){for(var R=-1,W=A==null?0:A.length;++R<W&&M(A[R],R,A)!==!1;);return A}function X_(A,M){for(var R=A==null?0:A.length;R--&&M(A[R],R,A)!==!1;);return A}function gf(A,M){for(var R=-1,W=A==null?0:A.length;++R<W;)if(!M(A[R],R,A))return!1;return!0}function br(A,M){for(var R=-1,W=A==null?0:A.length,ae=0,Se=[];++R<W;){var nt=A[R];M(nt,R,A)&&(Se[ae++]=nt)}return Se}function Da(A,M){var R=A==null?0:A.length;return!!R&&Ao(A,M,0)>-1}function ml(A,M,R){for(var W=-1,ae=A==null?0:A.length;++W<ae;)if(R(M,A[W]))return!0;return!1}function Ve(A,M){for(var R=-1,W=A==null?0:A.length,ae=Array(W);++R<W;)ae[R]=M(A[R],R,A);return ae}function Ir(A,M){for(var R=-1,W=M.length,ae=A.length;++R<W;)A[ae+R]=M[R];return A}function pl(A,M,R,W){var ae=-1,Se=A==null?0:A.length;for(W&&Se&&(R=A[++ae]);++ae<Se;)R=M(R,A[ae],ae,A);return R}function Z_(A,M,R,W){var ae=A==null?0:A.length;for(W&&ae&&(R=A[--ae]);ae--;)R=M(R,A[ae],ae,A);return R}function vl(A,M){for(var R=-1,W=A==null?0:A.length;++R<W;)if(M(A[R],R,A))return!0;return!1}var eT=yl("length");function tT(A){return A.split("")}function nT(A){return A.match(u_)||[]}function mf(A,M,R){var W;return R(A,function(ae,Se,nt){if(M(ae,Se,nt))return W=Se,!1}),W}function La(A,M,R,W){for(var ae=A.length,Se=R+(W?1:-1);W?Se--:++Se<ae;)if(M(A[Se],Se,A))return Se;return-1}function Ao(A,M,R){return M===M?gT(A,M,R):La(A,pf,R)}function rT(A,M,R,W){for(var ae=R-1,Se=A.length;++ae<Se;)if(W(A[ae],M))return ae;return-1}function pf(A){return A!==A}function vf(A,M){var R=A==null?0:A.length;return R?wl(A,M)/R:Ai}function yl(A){return function(M){return M==null?t:M[A]}}function Cl(A){return function(M){return A==null?t:A[M]}}function yf(A,M,R,W,ae){return ae(A,function(Se,nt,Ne){R=W?(W=!1,Se):M(R,Se,nt,Ne)}),R}function oT(A,M){var R=A.length;for(A.sort(M);R--;)A[R]=A[R].value;return A}function wl(A,M){for(var R,W=-1,ae=A.length;++W<ae;){var Se=M(A[W]);Se!==t&&(R=R===t?Se:R+Se)}return R}function _l(A,M){for(var R=-1,W=Array(A);++R<A;)W[R]=M(R);return W}function iT(A,M){return Ve(M,function(R){return[R,A[R]]})}function Cf(A){return A&&A.slice(0,Ef(A)+1).replace(sl,"")}function Wt(A){return function(M){return A(M)}}function Tl(A,M){return Ve(M,function(R){return A[R]})}function Mi(A,M){return A.has(M)}function wf(A,M){for(var R=-1,W=A.length;++R<W&&Ao(M,A[R],0)>-1;);return R}function _f(A,M){for(var R=A.length;R--&&Ao(M,A[R],0)>-1;);return R}function aT(A,M){for(var R=A.length,W=0;R--;)A[R]===M&&++W;return W}var sT=Cl(z_),cT=Cl(W_);function lT(A){return"\\"+G_[A]}function uT(A,M){return A==null?t:A[M]}function bo(A){return F_.test(A)}function dT(A){return H_.test(A)}function hT(A){for(var M,R=[];!(M=A.next()).done;)R.push(M.value);return R}function El(A){var M=-1,R=Array(A.size);return A.forEach(function(W,ae){R[++M]=[ae,W]}),R}function Tf(A,M){return function(R){return A(M(R))}}function kr(A,M){for(var R=-1,W=A.length,ae=0,Se=[];++R<W;){var nt=A[R];(nt===M||nt===m)&&(A[R]=m,Se[ae++]=R)}return Se}function Ba(A){var M=-1,R=Array(A.size);return A.forEach(function(W){R[++M]=W}),R}function fT(A){var M=-1,R=Array(A.size);return A.forEach(function(W){R[++M]=[W,W]}),R}function gT(A,M,R){for(var W=R-1,ae=A.length;++W<ae;)if(A[W]===M)return W;return-1}function mT(A,M,R){for(var W=R+1;W--;)if(A[W]===M)return W;return W}function Io(A){return bo(A)?vT(A):eT(A)}function Rn(A){return bo(A)?yT(A):tT(A)}function Ef(A){for(var M=A.length;M--&&a_.test(A.charAt(M)););return M}var pT=Cl(q_);function vT(A){for(var M=hl.lastIndex=0;hl.test(A);)++M;return M}function yT(A){return A.match(hl)||[]}function CT(A){return A.match(V_)||[]}var wT=function A(M){M=M==null?ht:ko.defaults(ht.Object(),M,ko.pick(ht,$_));var R=M.Array,W=M.Date,ae=M.Error,Se=M.Function,nt=M.Math,Ne=M.Object,Sl=M.RegExp,_T=M.String,un=M.TypeError,Ua=R.prototype,TT=Se.prototype,Ro=Ne.prototype,Va=M["__core-js_shared__"],Fa=TT.toString,Ie=Ro.hasOwnProperty,ET=0,Sf=function(){var o=/[^.]+$/.exec(Va&&Va.keys&&Va.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""}(),Ha=Ro.toString,ST=Fa.call(Ne),AT=ht._,bT=Sl("^"+Fa.call(Ie).replace(al,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$a=sf?M.Buffer:t,Rr=M.Symbol,Ka=M.Uint8Array,Af=$a?$a.allocUnsafe:t,za=Tf(Ne.getPrototypeOf,Ne),bf=Ne.create,If=Ro.propertyIsEnumerable,Wa=Ua.splice,kf=Rr?Rr.isConcatSpreadable:t,xi=Rr?Rr.iterator:t,Yr=Rr?Rr.toStringTag:t,qa=function(){try{var o=eo(Ne,"defineProperty");return o({},"",{}),o}catch{}}(),IT=M.clearTimeout!==ht.clearTimeout&&M.clearTimeout,kT=W&&W.now!==ht.Date.now&&W.now,RT=M.setTimeout!==ht.setTimeout&&M.setTimeout,Ga=nt.ceil,ja=nt.floor,Al=Ne.getOwnPropertySymbols,OT=$a?$a.isBuffer:t,Rf=M.isFinite,NT=Ua.join,PT=Tf(Ne.keys,Ne),rt=nt.max,_t=nt.min,MT=W.now,xT=M.parseInt,Of=nt.random,DT=Ua.reverse,bl=eo(M,"DataView"),Di=eo(M,"Map"),Il=eo(M,"Promise"),Oo=eo(M,"Set"),Li=eo(M,"WeakMap"),Bi=eo(Ne,"create"),Ya=Li&&new Li,No={},LT=to(bl),BT=to(Di),UT=to(Il),VT=to(Oo),FT=to(Li),Ja=Rr?Rr.prototype:t,Ui=Ja?Ja.valueOf:t,Nf=Ja?Ja.toString:t;function y(o){if(ze(o)&&!ce(o)&&!(o instanceof pe)){if(o instanceof dn)return o;if(Ie.call(o,"__wrapped__"))return Pg(o)}return new dn(o)}var Po=function(){function o(){}return function(a){if(!$e(a))return{};if(bf)return bf(a);o.prototype=a;var u=new o;return o.prototype=t,u}}();function Qa(){}function dn(o,a){this.__wrapped__=o,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=t}y.templateSettings={escape:e_,evaluate:t_,interpolate:Vh,variable:"",imports:{_:y}},y.prototype=Qa.prototype,y.prototype.constructor=y,dn.prototype=Po(Qa.prototype),dn.prototype.constructor=dn;function pe(o){this.__wrapped__=o,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Kt,this.__views__=[]}function HT(){var o=new pe(this.__wrapped__);return o.__actions__=xt(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=xt(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=xt(this.__views__),o}function $T(){if(this.__filtered__){var o=new pe(this);o.__dir__=-1,o.__filtered__=!0}else o=this.clone(),o.__dir__*=-1;return o}function KT(){var o=this.__wrapped__.value(),a=this.__dir__,u=ce(o),h=a<0,p=u?o.length:0,w=tS(0,p,this.__views__),T=w.start,E=w.end,I=E-T,x=h?E:T-1,D=this.__iteratees__,L=D.length,K=0,Y=_t(I,this.__takeCount__);if(!u||!h&&p==I&&Y==I)return tg(o,this.__actions__);var Z=[];e:for(;I--&&K<Y;){x+=a;for(var he=-1,ee=o[x];++he<L;){var me=D[he],ve=me.iteratee,jt=me.type,Ot=ve(ee);if(jt==bn)ee=Ot;else if(!Ot){if(jt==Ct)continue e;break e}}Z[K++]=ee}return Z}pe.prototype=Po(Qa.prototype),pe.prototype.constructor=pe;function Jr(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function zT(){this.__data__=Bi?Bi(null):{},this.size=0}function WT(o){var a=this.has(o)&&delete this.__data__[o];return this.size-=a?1:0,a}function qT(o){var a=this.__data__;if(Bi){var u=a[o];return u===f?t:u}return Ie.call(a,o)?a[o]:t}function GT(o){var a=this.__data__;return Bi?a[o]!==t:Ie.call(a,o)}function jT(o,a){var u=this.__data__;return this.size+=this.has(o)?0:1,u[o]=Bi&&a===t?f:a,this}Jr.prototype.clear=zT,Jr.prototype.delete=WT,Jr.prototype.get=qT,Jr.prototype.has=GT,Jr.prototype.set=jT;function ar(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function YT(){this.__data__=[],this.size=0}function JT(o){var a=this.__data__,u=Xa(a,o);if(u<0)return!1;var h=a.length-1;return u==h?a.pop():Wa.call(a,u,1),--this.size,!0}function QT(o){var a=this.__data__,u=Xa(a,o);return u<0?t:a[u][1]}function XT(o){return Xa(this.__data__,o)>-1}function ZT(o,a){var u=this.__data__,h=Xa(u,o);return h<0?(++this.size,u.push([o,a])):u[h][1]=a,this}ar.prototype.clear=YT,ar.prototype.delete=JT,ar.prototype.get=QT,ar.prototype.has=XT,ar.prototype.set=ZT;function sr(o){var a=-1,u=o==null?0:o.length;for(this.clear();++a<u;){var h=o[a];this.set(h[0],h[1])}}function eE(){this.size=0,this.__data__={hash:new Jr,map:new(Di||ar),string:new Jr}}function tE(o){var a=us(this,o).delete(o);return this.size-=a?1:0,a}function nE(o){return us(this,o).get(o)}function rE(o){return us(this,o).has(o)}function oE(o,a){var u=us(this,o),h=u.size;return u.set(o,a),this.size+=u.size==h?0:1,this}sr.prototype.clear=eE,sr.prototype.delete=tE,sr.prototype.get=nE,sr.prototype.has=rE,sr.prototype.set=oE;function Qr(o){var a=-1,u=o==null?0:o.length;for(this.__data__=new sr;++a<u;)this.add(o[a])}function iE(o){return this.__data__.set(o,f),this}function aE(o){return this.__data__.has(o)}Qr.prototype.add=Qr.prototype.push=iE,Qr.prototype.has=aE;function On(o){var a=this.__data__=new ar(o);this.size=a.size}function sE(){this.__data__=new ar,this.size=0}function cE(o){var a=this.__data__,u=a.delete(o);return this.size=a.size,u}function lE(o){return this.__data__.get(o)}function uE(o){return this.__data__.has(o)}function dE(o,a){var u=this.__data__;if(u instanceof ar){var h=u.__data__;if(!Di||h.length<i-1)return h.push([o,a]),this.size=++u.size,this;u=this.__data__=new sr(h)}return u.set(o,a),this.size=u.size,this}On.prototype.clear=sE,On.prototype.delete=cE,On.prototype.get=lE,On.prototype.has=uE,On.prototype.set=dE;function Pf(o,a){var u=ce(o),h=!u&&no(o),p=!u&&!h&&xr(o),w=!u&&!h&&!p&&Lo(o),T=u||h||p||w,E=T?_l(o.length,_T):[],I=E.length;for(var x in o)(a||Ie.call(o,x))&&!(T&&(x=="length"||p&&(x=="offset"||x=="parent")||w&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||dr(x,I)))&&E.push(x);return E}function Mf(o){var a=o.length;return a?o[Ul(0,a-1)]:t}function hE(o,a){return ds(xt(o),Xr(a,0,o.length))}function fE(o){return ds(xt(o))}function kl(o,a,u){(u!==t&&!Nn(o[a],u)||u===t&&!(a in o))&&cr(o,a,u)}function Vi(o,a,u){var h=o[a];(!(Ie.call(o,a)&&Nn(h,u))||u===t&&!(a in o))&&cr(o,a,u)}function Xa(o,a){for(var u=o.length;u--;)if(Nn(o[u][0],a))return u;return-1}function gE(o,a,u,h){return Or(o,function(p,w,T){a(h,p,u(p),T)}),h}function xf(o,a){return o&&Wn(a,st(a),o)}function mE(o,a){return o&&Wn(a,Lt(a),o)}function cr(o,a,u){a=="__proto__"&&qa?qa(o,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):o[a]=u}function Rl(o,a){for(var u=-1,h=a.length,p=R(h),w=o==null;++u<h;)p[u]=w?t:lu(o,a[u]);return p}function Xr(o,a,u){return o===o&&(u!==t&&(o=o<=u?o:u),a!==t&&(o=o>=a?o:a)),o}function hn(o,a,u,h,p,w){var T,E=a&v,I=a&C,x=a&S;if(u&&(T=p?u(o,h,p,w):u(o)),T!==t)return T;if(!$e(o))return o;var D=ce(o);if(D){if(T=rS(o),!E)return xt(o,T)}else{var L=Tt(o),K=L==Oa||L==Dh;if(xr(o))return og(o,E);if(L==ir||L==To||K&&!p){if(T=I||K?{}:Eg(o),!E)return I?qE(o,mE(T,o)):WE(o,xf(T,o))}else{if(!Me[L])return p?o:{};T=oS(o,L,E)}}w||(w=new On);var Y=w.get(o);if(Y)return Y;w.set(o,T),Xg(o)?o.forEach(function(ee){T.add(hn(ee,a,u,ee,o,w))}):Jg(o)&&o.forEach(function(ee,me){T.set(me,hn(ee,a,u,me,o,w))});var Z=x?I?Yl:jl:I?Lt:st,he=D?t:Z(o);return ln(he||o,function(ee,me){he&&(me=ee,ee=o[me]),Vi(T,me,hn(ee,a,u,me,o,w))}),T}function pE(o){var a=st(o);return function(u){return Df(u,o,a)}}function Df(o,a,u){var h=u.length;if(o==null)return!h;for(o=Ne(o);h--;){var p=u[h],w=a[p],T=o[p];if(T===t&&!(p in o)||!w(T))return!1}return!0}function Lf(o,a,u){if(typeof o!="function")throw new un(l);return qi(function(){o.apply(t,u)},a)}function Fi(o,a,u,h){var p=-1,w=Da,T=!0,E=o.length,I=[],x=a.length;if(!E)return I;u&&(a=Ve(a,Wt(u))),h?(w=ml,T=!1):a.length>=i&&(w=Mi,T=!1,a=new Qr(a));e:for(;++p<E;){var D=o[p],L=u==null?D:u(D);if(D=h||D!==0?D:0,T&&L===L){for(var K=x;K--;)if(a[K]===L)continue e;I.push(D)}else w(a,L,h)||I.push(D)}return I}var Or=lg(zn),Bf=lg(Nl,!0);function vE(o,a){var u=!0;return Or(o,function(h,p,w){return u=!!a(h,p,w),u}),u}function Za(o,a,u){for(var h=-1,p=o.length;++h<p;){var w=o[h],T=a(w);if(T!=null&&(E===t?T===T&&!Gt(T):u(T,E)))var E=T,I=w}return I}function yE(o,a,u,h){var p=o.length;for(u=de(u),u<0&&(u=-u>p?0:p+u),h=h===t||h>p?p:de(h),h<0&&(h+=p),h=u>h?0:em(h);u<h;)o[u++]=a;return o}function Uf(o,a){var u=[];return Or(o,function(h,p,w){a(h,p,w)&&u.push(h)}),u}function ft(o,a,u,h,p){var w=-1,T=o.length;for(u||(u=aS),p||(p=[]);++w<T;){var E=o[w];a>0&&u(E)?a>1?ft(E,a-1,u,h,p):Ir(p,E):h||(p[p.length]=E)}return p}var Ol=ug(),Vf=ug(!0);function zn(o,a){return o&&Ol(o,a,st)}function Nl(o,a){return o&&Vf(o,a,st)}function es(o,a){return br(a,function(u){return hr(o[u])})}function Zr(o,a){a=Pr(a,o);for(var u=0,h=a.length;o!=null&&u<h;)o=o[qn(a[u++])];return u&&u==h?o:t}function Ff(o,a,u){var h=a(o);return ce(o)?h:Ir(h,u(o))}function kt(o){return o==null?o===t?Gw:Ww:Yr&&Yr in Ne(o)?eS(o):fS(o)}function Pl(o,a){return o>a}function CE(o,a){return o!=null&&Ie.call(o,a)}function wE(o,a){return o!=null&&a in Ne(o)}function _E(o,a,u){return o>=_t(a,u)&&o<rt(a,u)}function Ml(o,a,u){for(var h=u?ml:Da,p=o[0].length,w=o.length,T=w,E=R(w),I=1/0,x=[];T--;){var D=o[T];T&&a&&(D=Ve(D,Wt(a))),I=_t(D.length,I),E[T]=!u&&(a||p>=120&&D.length>=120)?new Qr(T&&D):t}D=o[0];var L=-1,K=E[0];e:for(;++L<p&&x.length<I;){var Y=D[L],Z=a?a(Y):Y;if(Y=u||Y!==0?Y:0,!(K?Mi(K,Z):h(x,Z,u))){for(T=w;--T;){var he=E[T];if(!(he?Mi(he,Z):h(o[T],Z,u)))continue e}K&&K.push(Z),x.push(Y)}}return x}function TE(o,a,u,h){return zn(o,function(p,w,T){a(h,u(p),w,T)}),h}function Hi(o,a,u){a=Pr(a,o),o=Ig(o,a);var h=o==null?o:o[qn(gn(a))];return h==null?t:zt(h,o,u)}function Hf(o){return ze(o)&&kt(o)==To}function EE(o){return ze(o)&&kt(o)==Pi}function SE(o){return ze(o)&&kt(o)==Ii}function $i(o,a,u,h,p){return o===a?!0:o==null||a==null||!ze(o)&&!ze(a)?o!==o&&a!==a:AE(o,a,u,h,$i,p)}function AE(o,a,u,h,p,w){var T=ce(o),E=ce(a),I=T?ka:Tt(o),x=E?ka:Tt(a);I=I==To?ir:I,x=x==To?ir:x;var D=I==ir,L=x==ir,K=I==x;if(K&&xr(o)){if(!xr(a))return!1;T=!0,D=!1}if(K&&!D)return w||(w=new On),T||Lo(o)?wg(o,a,u,h,p,w):XE(o,a,I,u,h,p,w);if(!(u&_)){var Y=D&&Ie.call(o,"__wrapped__"),Z=L&&Ie.call(a,"__wrapped__");if(Y||Z){var he=Y?o.value():o,ee=Z?a.value():a;return w||(w=new On),p(he,ee,u,h,w)}}return K?(w||(w=new On),ZE(o,a,u,h,p,w)):!1}function bE(o){return ze(o)&&Tt(o)==In}function xl(o,a,u,h){var p=u.length,w=p,T=!h;if(o==null)return!w;for(o=Ne(o);p--;){var E=u[p];if(T&&E[2]?E[1]!==o[E[0]]:!(E[0]in o))return!1}for(;++p<w;){E=u[p];var I=E[0],x=o[I],D=E[1];if(T&&E[2]){if(x===t&&!(I in o))return!1}else{var L=new On;if(h)var K=h(x,D,I,o,a,L);if(!(K===t?$i(D,x,_|b,h,L):K))return!1}}return!0}function $f(o){if(!$e(o)||cS(o))return!1;var a=hr(o)?bT:p_;return a.test(to(o))}function IE(o){return ze(o)&&kt(o)==Ri}function kE(o){return ze(o)&&Tt(o)==kn}function RE(o){return ze(o)&&vs(o.length)&&!!De[kt(o)]}function Kf(o){return typeof o=="function"?o:o==null?Bt:typeof o=="object"?ce(o)?qf(o[0],o[1]):Wf(o):dm(o)}function Dl(o){if(!Wi(o))return PT(o);var a=[];for(var u in Ne(o))Ie.call(o,u)&&u!="constructor"&&a.push(u);return a}function OE(o){if(!$e(o))return hS(o);var a=Wi(o),u=[];for(var h in o)h=="constructor"&&(a||!Ie.call(o,h))||u.push(h);return u}function Ll(o,a){return o<a}function zf(o,a){var u=-1,h=Dt(o)?R(o.length):[];return Or(o,function(p,w,T){h[++u]=a(p,w,T)}),h}function Wf(o){var a=Ql(o);return a.length==1&&a[0][2]?Ag(a[0][0],a[0][1]):function(u){return u===o||xl(u,o,a)}}function qf(o,a){return Zl(o)&&Sg(a)?Ag(qn(o),a):function(u){var h=lu(u,o);return h===t&&h===a?uu(u,o):$i(a,h,_|b)}}function ts(o,a,u,h,p){o!==a&&Ol(a,function(w,T){if(p||(p=new On),$e(w))NE(o,a,T,u,ts,h,p);else{var E=h?h(tu(o,T),w,T+"",o,a,p):t;E===t&&(E=w),kl(o,T,E)}},Lt)}function NE(o,a,u,h,p,w,T){var E=tu(o,u),I=tu(a,u),x=T.get(I);if(x){kl(o,u,x);return}var D=w?w(E,I,u+"",o,a,T):t,L=D===t;if(L){var K=ce(I),Y=!K&&xr(I),Z=!K&&!Y&&Lo(I);D=I,K||Y||Z?ce(E)?D=E:je(E)?D=xt(E):Y?(L=!1,D=og(I,!0)):Z?(L=!1,D=ig(I,!0)):D=[]:Gi(I)||no(I)?(D=E,no(E)?D=tm(E):(!$e(E)||hr(E))&&(D=Eg(I))):L=!1}L&&(T.set(I,D),p(D,I,h,w,T),T.delete(I)),kl(o,u,D)}function Gf(o,a){var u=o.length;if(u)return a+=a<0?u:0,dr(a,u)?o[a]:t}function jf(o,a,u){a.length?a=Ve(a,function(w){return ce(w)?function(T){return Zr(T,w.length===1?w[0]:w)}:w}):a=[Bt];var h=-1;a=Ve(a,Wt(X()));var p=zf(o,function(w,T,E){var I=Ve(a,function(x){return x(w)});return{criteria:I,index:++h,value:w}});return oT(p,function(w,T){return zE(w,T,u)})}function PE(o,a){return Yf(o,a,function(u,h){return uu(o,h)})}function Yf(o,a,u){for(var h=-1,p=a.length,w={};++h<p;){var T=a[h],E=Zr(o,T);u(E,T)&&Ki(w,Pr(T,o),E)}return w}function ME(o){return function(a){return Zr(a,o)}}function Bl(o,a,u,h){var p=h?rT:Ao,w=-1,T=a.length,E=o;for(o===a&&(a=xt(a)),u&&(E=Ve(o,Wt(u)));++w<T;)for(var I=0,x=a[w],D=u?u(x):x;(I=p(E,D,I,h))>-1;)E!==o&&Wa.call(E,I,1),Wa.call(o,I,1);return o}function Jf(o,a){for(var u=o?a.length:0,h=u-1;u--;){var p=a[u];if(u==h||p!==w){var w=p;dr(p)?Wa.call(o,p,1):Hl(o,p)}}return o}function Ul(o,a){return o+ja(Of()*(a-o+1))}function xE(o,a,u,h){for(var p=-1,w=rt(Ga((a-o)/(u||1)),0),T=R(w);w--;)T[h?w:++p]=o,o+=u;return T}function Vl(o,a){var u="";if(!o||a<1||a>Qe)return u;do a%2&&(u+=o),a=ja(a/2),a&&(o+=o);while(a);return u}function fe(o,a){return nu(bg(o,a,Bt),o+"")}function DE(o){return Mf(Bo(o))}function LE(o,a){var u=Bo(o);return ds(u,Xr(a,0,u.length))}function Ki(o,a,u,h){if(!$e(o))return o;a=Pr(a,o);for(var p=-1,w=a.length,T=w-1,E=o;E!=null&&++p<w;){var I=qn(a[p]),x=u;if(I==="__proto__"||I==="constructor"||I==="prototype")return o;if(p!=T){var D=E[I];x=h?h(D,I,E):t,x===t&&(x=$e(D)?D:dr(a[p+1])?[]:{})}Vi(E,I,x),E=E[I]}return o}var Qf=Ya?function(o,a){return Ya.set(o,a),o}:Bt,BE=qa?function(o,a){return qa(o,"toString",{configurable:!0,enumerable:!1,value:hu(a),writable:!0})}:Bt;function UE(o){return ds(Bo(o))}function fn(o,a,u){var h=-1,p=o.length;a<0&&(a=-a>p?0:p+a),u=u>p?p:u,u<0&&(u+=p),p=a>u?0:u-a>>>0,a>>>=0;for(var w=R(p);++h<p;)w[h]=o[h+a];return w}function VE(o,a){var u;return Or(o,function(h,p,w){return u=a(h,p,w),!u}),!!u}function ns(o,a,u){var h=0,p=o==null?h:o.length;if(typeof a=="number"&&a===a&&p<=Hw){for(;h<p;){var w=h+p>>>1,T=o[w];T!==null&&!Gt(T)&&(u?T<=a:T<a)?h=w+1:p=w}return p}return Fl(o,a,Bt,u)}function Fl(o,a,u,h){var p=0,w=o==null?0:o.length;if(w===0)return 0;a=u(a);for(var T=a!==a,E=a===null,I=Gt(a),x=a===t;p<w;){var D=ja((p+w)/2),L=u(o[D]),K=L!==t,Y=L===null,Z=L===L,he=Gt(L);if(T)var ee=h||Z;else x?ee=Z&&(h||K):E?ee=Z&&K&&(h||!Y):I?ee=Z&&K&&!Y&&(h||!he):Y||he?ee=!1:ee=h?L<=a:L<a;ee?p=D+1:w=D}return _t(w,Jc)}function Xf(o,a){for(var u=-1,h=o.length,p=0,w=[];++u<h;){var T=o[u],E=a?a(T):T;if(!u||!Nn(E,I)){var I=E;w[p++]=T===0?0:T}}return w}function Zf(o){return typeof o=="number"?o:Gt(o)?Ai:+o}function qt(o){if(typeof o=="string")return o;if(ce(o))return Ve(o,qt)+"";if(Gt(o))return Nf?Nf.call(o):"";var a=o+"";return a=="0"&&1/o==-Mt?"-0":a}function Nr(o,a,u){var h=-1,p=Da,w=o.length,T=!0,E=[],I=E;if(u)T=!1,p=ml;else if(w>=i){var x=a?null:JE(o);if(x)return Ba(x);T=!1,p=Mi,I=new Qr}else I=a?[]:E;e:for(;++h<w;){var D=o[h],L=a?a(D):D;if(D=u||D!==0?D:0,T&&L===L){for(var K=I.length;K--;)if(I[K]===L)continue e;a&&I.push(L),E.push(D)}else p(I,L,u)||(I!==E&&I.push(L),E.push(D))}return E}function Hl(o,a){return a=Pr(a,o),o=Ig(o,a),o==null||delete o[qn(gn(a))]}function eg(o,a,u,h){return Ki(o,a,u(Zr(o,a)),h)}function rs(o,a,u,h){for(var p=o.length,w=h?p:-1;(h?w--:++w<p)&&a(o[w],w,o););return u?fn(o,h?0:w,h?w+1:p):fn(o,h?w+1:0,h?p:w)}function tg(o,a){var u=o;return u instanceof pe&&(u=u.value()),pl(a,function(h,p){return p.func.apply(p.thisArg,Ir([h],p.args))},u)}function $l(o,a,u){var h=o.length;if(h<2)return h?Nr(o[0]):[];for(var p=-1,w=R(h);++p<h;)for(var T=o[p],E=-1;++E<h;)E!=p&&(w[p]=Fi(w[p]||T,o[E],a,u));return Nr(ft(w,1),a,u)}function ng(o,a,u){for(var h=-1,p=o.length,w=a.length,T={};++h<p;){var E=h<w?a[h]:t;u(T,o[h],E)}return T}function Kl(o){return je(o)?o:[]}function zl(o){return typeof o=="function"?o:Bt}function Pr(o,a){return ce(o)?o:Zl(o,a)?[o]:Ng(be(o))}var FE=fe;function Mr(o,a,u){var h=o.length;return u=u===t?h:u,!a&&u>=h?o:fn(o,a,u)}var rg=IT||function(o){return ht.clearTimeout(o)};function og(o,a){if(a)return o.slice();var u=o.length,h=Af?Af(u):new o.constructor(u);return o.copy(h),h}function Wl(o){var a=new o.constructor(o.byteLength);return new Ka(a).set(new Ka(o)),a}function HE(o,a){var u=a?Wl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.byteLength)}function $E(o){var a=new o.constructor(o.source,Fh.exec(o));return a.lastIndex=o.lastIndex,a}function KE(o){return Ui?Ne(Ui.call(o)):{}}function ig(o,a){var u=a?Wl(o.buffer):o.buffer;return new o.constructor(u,o.byteOffset,o.length)}function ag(o,a){if(o!==a){var u=o!==t,h=o===null,p=o===o,w=Gt(o),T=a!==t,E=a===null,I=a===a,x=Gt(a);if(!E&&!x&&!w&&o>a||w&&T&&I&&!E&&!x||h&&T&&I||!u&&I||!p)return 1;if(!h&&!w&&!x&&o<a||x&&u&&p&&!h&&!w||E&&u&&p||!T&&p||!I)return-1}return 0}function zE(o,a,u){for(var h=-1,p=o.criteria,w=a.criteria,T=p.length,E=u.length;++h<T;){var I=ag(p[h],w[h]);if(I){if(h>=E)return I;var x=u[h];return I*(x=="desc"?-1:1)}}return o.index-a.index}function sg(o,a,u,h){for(var p=-1,w=o.length,T=u.length,E=-1,I=a.length,x=rt(w-T,0),D=R(I+x),L=!h;++E<I;)D[E]=a[E];for(;++p<T;)(L||p<w)&&(D[u[p]]=o[p]);for(;x--;)D[E++]=o[p++];return D}function cg(o,a,u,h){for(var p=-1,w=o.length,T=-1,E=u.length,I=-1,x=a.length,D=rt(w-E,0),L=R(D+x),K=!h;++p<D;)L[p]=o[p];for(var Y=p;++I<x;)L[Y+I]=a[I];for(;++T<E;)(K||p<w)&&(L[Y+u[T]]=o[p++]);return L}function xt(o,a){var u=-1,h=o.length;for(a||(a=R(h));++u<h;)a[u]=o[u];return a}function Wn(o,a,u,h){var p=!u;u||(u={});for(var w=-1,T=a.length;++w<T;){var E=a[w],I=h?h(u[E],o[E],E,u,o):t;I===t&&(I=o[E]),p?cr(u,E,I):Vi(u,E,I)}return u}function WE(o,a){return Wn(o,Xl(o),a)}function qE(o,a){return Wn(o,_g(o),a)}function os(o,a){return function(u,h){var p=ce(u)?Q_:gE,w=a?a():{};return p(u,o,X(h,2),w)}}function Mo(o){return fe(function(a,u){var h=-1,p=u.length,w=p>1?u[p-1]:t,T=p>2?u[2]:t;for(w=o.length>3&&typeof w=="function"?(p--,w):t,T&&Rt(u[0],u[1],T)&&(w=p<3?t:w,p=1),a=Ne(a);++h<p;){var E=u[h];E&&o(a,E,h,w)}return a})}function lg(o,a){return function(u,h){if(u==null)return u;if(!Dt(u))return o(u,h);for(var p=u.length,w=a?p:-1,T=Ne(u);(a?w--:++w<p)&&h(T[w],w,T)!==!1;);return u}}function ug(o){return function(a,u,h){for(var p=-1,w=Ne(a),T=h(a),E=T.length;E--;){var I=T[o?E:++p];if(u(w[I],I,w)===!1)break}return a}}function GE(o,a,u){var h=a&O,p=zi(o);function w(){var T=this&&this!==ht&&this instanceof w?p:o;return T.apply(h?u:this,arguments)}return w}function dg(o){return function(a){a=be(a);var u=bo(a)?Rn(a):t,h=u?u[0]:a.charAt(0),p=u?Mr(u,1).join(""):a.slice(1);return h[o]()+p}}function xo(o){return function(a){return pl(lm(cm(a).replace(B_,"")),o,"")}}function zi(o){return function(){var a=arguments;switch(a.length){case 0:return new o;case 1:return new o(a[0]);case 2:return new o(a[0],a[1]);case 3:return new o(a[0],a[1],a[2]);case 4:return new o(a[0],a[1],a[2],a[3]);case 5:return new o(a[0],a[1],a[2],a[3],a[4]);case 6:return new o(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new o(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Po(o.prototype),h=o.apply(u,a);return $e(h)?h:u}}function jE(o,a,u){var h=zi(o);function p(){for(var w=arguments.length,T=R(w),E=w,I=Do(p);E--;)T[E]=arguments[E];var x=w<3&&T[0]!==I&&T[w-1]!==I?[]:kr(T,I);if(w-=x.length,w<u)return pg(o,a,is,p.placeholder,t,T,x,t,t,u-w);var D=this&&this!==ht&&this instanceof p?h:o;return zt(D,this,T)}return p}function hg(o){return function(a,u,h){var p=Ne(a);if(!Dt(a)){var w=X(u,3);a=st(a),u=function(E){return w(p[E],E,p)}}var T=o(a,u,h);return T>-1?p[w?a[T]:T]:t}}function fg(o){return ur(function(a){var u=a.length,h=u,p=dn.prototype.thru;for(o&&a.reverse();h--;){var w=a[h];if(typeof w!="function")throw new un(l);if(p&&!T&&ls(w)=="wrapper")var T=new dn([],!0)}for(h=T?h:u;++h<u;){w=a[h];var E=ls(w),I=E=="wrapper"?Jl(w):t;I&&eu(I[0])&&I[1]==(z|U|se|tt)&&!I[4].length&&I[9]==1?T=T[ls(I[0])].apply(T,I[3]):T=w.length==1&&eu(w)?T[E]():T.thru(w)}return function(){var x=arguments,D=x[0];if(T&&x.length==1&&ce(D))return T.plant(D).value();for(var L=0,K=u?a[L].apply(this,x):D;++L<u;)K=a[L].call(this,K);return K}})}function is(o,a,u,h,p,w,T,E,I,x){var D=a&z,L=a&O,K=a&$,Y=a&(U|Q),Z=a&Te,he=K?t:zi(o);function ee(){for(var me=arguments.length,ve=R(me),jt=me;jt--;)ve[jt]=arguments[jt];if(Y)var Ot=Do(ee),Yt=aT(ve,Ot);if(h&&(ve=sg(ve,h,p,Y)),w&&(ve=cg(ve,w,T,Y)),me-=Yt,Y&&me<x){var Ye=kr(ve,Ot);return pg(o,a,is,ee.placeholder,u,ve,Ye,E,I,x-me)}var Pn=L?u:this,gr=K?Pn[o]:o;return me=ve.length,E?ve=gS(ve,E):Z&&me>1&&ve.reverse(),D&&I<me&&(ve.length=I),this&&this!==ht&&this instanceof ee&&(gr=he||zi(gr)),gr.apply(Pn,ve)}return ee}function gg(o,a){return function(u,h){return TE(u,o,a(h),{})}}function as(o,a){return function(u,h){var p;if(u===t&&h===t)return a;if(u!==t&&(p=u),h!==t){if(p===t)return h;typeof u=="string"||typeof h=="string"?(u=qt(u),h=qt(h)):(u=Zf(u),h=Zf(h)),p=o(u,h)}return p}}function ql(o){return ur(function(a){return a=Ve(a,Wt(X())),fe(function(u){var h=this;return o(a,function(p){return zt(p,h,u)})})})}function ss(o,a){a=a===t?" ":qt(a);var u=a.length;if(u<2)return u?Vl(a,o):a;var h=Vl(a,Ga(o/Io(a)));return bo(a)?Mr(Rn(h),0,o).join(""):h.slice(0,o)}function YE(o,a,u,h){var p=a&O,w=zi(o);function T(){for(var E=-1,I=arguments.length,x=-1,D=h.length,L=R(D+I),K=this&&this!==ht&&this instanceof T?w:o;++x<D;)L[x]=h[x];for(;I--;)L[x++]=arguments[++E];return zt(K,p?u:this,L)}return T}function mg(o){return function(a,u,h){return h&&typeof h!="number"&&Rt(a,u,h)&&(u=h=t),a=fr(a),u===t?(u=a,a=0):u=fr(u),h=h===t?a<u?1:-1:fr(h),xE(a,u,h,o)}}function cs(o){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=mn(a),u=mn(u)),o(a,u)}}function pg(o,a,u,h,p,w,T,E,I,x){var D=a&U,L=D?T:t,K=D?t:T,Y=D?w:t,Z=D?t:w;a|=D?se:we,a&=~(D?we:se),a&V||(a&=~(O|$));var he=[o,a,p,Y,L,Z,K,E,I,x],ee=u.apply(t,he);return eu(o)&&kg(ee,he),ee.placeholder=h,Rg(ee,o,a)}function Gl(o){var a=nt[o];return function(u,h){if(u=mn(u),h=h==null?0:_t(de(h),292),h&&Rf(u)){var p=(be(u)+"e").split("e"),w=a(p[0]+"e"+(+p[1]+h));return p=(be(w)+"e").split("e"),+(p[0]+"e"+(+p[1]-h))}return a(u)}}var JE=Oo&&1/Ba(new Oo([,-0]))[1]==Mt?function(o){return new Oo(o)}:mu;function vg(o){return function(a){var u=Tt(a);return u==In?El(a):u==kn?fT(a):iT(a,o(a))}}function lr(o,a,u,h,p,w,T,E){var I=a&$;if(!I&&typeof o!="function")throw new un(l);var x=h?h.length:0;if(x||(a&=~(se|we),h=p=t),T=T===t?T:rt(de(T),0),E=E===t?E:de(E),x-=p?p.length:0,a&we){var D=h,L=p;h=p=t}var K=I?t:Jl(o),Y=[o,a,u,h,p,D,L,w,T,E];if(K&&dS(Y,K),o=Y[0],a=Y[1],u=Y[2],h=Y[3],p=Y[4],E=Y[9]=Y[9]===t?I?0:o.length:rt(Y[9]-x,0),!E&&a&(U|Q)&&(a&=~(U|Q)),!a||a==O)var Z=GE(o,a,u);else a==U||a==Q?Z=jE(o,a,E):(a==se||a==(O|se))&&!p.length?Z=YE(o,a,u,h):Z=is.apply(t,Y);var he=K?Qf:kg;return Rg(he(Z,Y),o,a)}function yg(o,a,u,h){return o===t||Nn(o,Ro[u])&&!Ie.call(h,u)?a:o}function Cg(o,a,u,h,p,w){return $e(o)&&$e(a)&&(w.set(a,o),ts(o,a,t,Cg,w),w.delete(a)),o}function QE(o){return Gi(o)?t:o}function wg(o,a,u,h,p,w){var T=u&_,E=o.length,I=a.length;if(E!=I&&!(T&&I>E))return!1;var x=w.get(o),D=w.get(a);if(x&&D)return x==a&&D==o;var L=-1,K=!0,Y=u&b?new Qr:t;for(w.set(o,a),w.set(a,o);++L<E;){var Z=o[L],he=a[L];if(h)var ee=T?h(he,Z,L,a,o,w):h(Z,he,L,o,a,w);if(ee!==t){if(ee)continue;K=!1;break}if(Y){if(!vl(a,function(me,ve){if(!Mi(Y,ve)&&(Z===me||p(Z,me,u,h,w)))return Y.push(ve)})){K=!1;break}}else if(!(Z===he||p(Z,he,u,h,w))){K=!1;break}}return w.delete(o),w.delete(a),K}function XE(o,a,u,h,p,w,T){switch(u){case Eo:if(o.byteLength!=a.byteLength||o.byteOffset!=a.byteOffset)return!1;o=o.buffer,a=a.buffer;case Pi:return!(o.byteLength!=a.byteLength||!w(new Ka(o),new Ka(a)));case bi:case Ii:case ki:return Nn(+o,+a);case Ra:return o.name==a.name&&o.message==a.message;case Ri:case Oi:return o==a+"";case In:var E=El;case kn:var I=h&_;if(E||(E=Ba),o.size!=a.size&&!I)return!1;var x=T.get(o);if(x)return x==a;h|=b,T.set(o,a);var D=wg(E(o),E(a),h,p,w,T);return T.delete(o),D;case Na:if(Ui)return Ui.call(o)==Ui.call(a)}return!1}function ZE(o,a,u,h,p,w){var T=u&_,E=jl(o),I=E.length,x=jl(a),D=x.length;if(I!=D&&!T)return!1;for(var L=I;L--;){var K=E[L];if(!(T?K in a:Ie.call(a,K)))return!1}var Y=w.get(o),Z=w.get(a);if(Y&&Z)return Y==a&&Z==o;var he=!0;w.set(o,a),w.set(a,o);for(var ee=T;++L<I;){K=E[L];var me=o[K],ve=a[K];if(h)var jt=T?h(ve,me,K,a,o,w):h(me,ve,K,o,a,w);if(!(jt===t?me===ve||p(me,ve,u,h,w):jt)){he=!1;break}ee||(ee=K=="constructor")}if(he&&!ee){var Ot=o.constructor,Yt=a.constructor;Ot!=Yt&&"constructor"in o&&"constructor"in a&&!(typeof Ot=="function"&&Ot instanceof Ot&&typeof Yt=="function"&&Yt instanceof Yt)&&(he=!1)}return w.delete(o),w.delete(a),he}function ur(o){return nu(bg(o,t,Dg),o+"")}function jl(o){return Ff(o,st,Xl)}function Yl(o){return Ff(o,Lt,_g)}var Jl=Ya?function(o){return Ya.get(o)}:mu;function ls(o){for(var a=o.name+"",u=No[a],h=Ie.call(No,a)?u.length:0;h--;){var p=u[h],w=p.func;if(w==null||w==o)return p.name}return a}function Do(o){var a=Ie.call(y,"placeholder")?y:o;return a.placeholder}function X(){var o=y.iteratee||fu;return o=o===fu?Kf:o,arguments.length?o(arguments[0],arguments[1]):o}function us(o,a){var u=o.__data__;return sS(a)?u[typeof a=="string"?"string":"hash"]:u.map}function Ql(o){for(var a=st(o),u=a.length;u--;){var h=a[u],p=o[h];a[u]=[h,p,Sg(p)]}return a}function eo(o,a){var u=uT(o,a);return $f(u)?u:t}function eS(o){var a=Ie.call(o,Yr),u=o[Yr];try{o[Yr]=t;var h=!0}catch{}var p=Ha.call(o);return h&&(a?o[Yr]=u:delete o[Yr]),p}var Xl=Al?function(o){return o==null?[]:(o=Ne(o),br(Al(o),function(a){return If.call(o,a)}))}:pu,_g=Al?function(o){for(var a=[];o;)Ir(a,Xl(o)),o=za(o);return a}:pu,Tt=kt;(bl&&Tt(new bl(new ArrayBuffer(1)))!=Eo||Di&&Tt(new Di)!=In||Il&&Tt(Il.resolve())!=Lh||Oo&&Tt(new Oo)!=kn||Li&&Tt(new Li)!=Ni)&&(Tt=function(o){var a=kt(o),u=a==ir?o.constructor:t,h=u?to(u):"";if(h)switch(h){case LT:return Eo;case BT:return In;case UT:return Lh;case VT:return kn;case FT:return Ni}return a});function tS(o,a,u){for(var h=-1,p=u.length;++h<p;){var w=u[h],T=w.size;switch(w.type){case"drop":o+=T;break;case"dropRight":a-=T;break;case"take":a=_t(a,o+T);break;case"takeRight":o=rt(o,a-T);break}}return{start:o,end:a}}function nS(o){var a=o.match(c_);return a?a[1].split(l_):[]}function Tg(o,a,u){a=Pr(a,o);for(var h=-1,p=a.length,w=!1;++h<p;){var T=qn(a[h]);if(!(w=o!=null&&u(o,T)))break;o=o[T]}return w||++h!=p?w:(p=o==null?0:o.length,!!p&&vs(p)&&dr(T,p)&&(ce(o)||no(o)))}function rS(o){var a=o.length,u=new o.constructor(a);return a&&typeof o[0]=="string"&&Ie.call(o,"index")&&(u.index=o.index,u.input=o.input),u}function Eg(o){return typeof o.constructor=="function"&&!Wi(o)?Po(za(o)):{}}function oS(o,a,u){var h=o.constructor;switch(a){case Pi:return Wl(o);case bi:case Ii:return new h(+o);case Eo:return HE(o,u);case Qc:case Xc:case Zc:case el:case tl:case nl:case rl:case ol:case il:return ig(o,u);case In:return new h;case ki:case Oi:return new h(o);case Ri:return $E(o);case kn:return new h;case Na:return KE(o)}}function iS(o,a){var u=a.length;if(!u)return o;var h=u-1;return a[h]=(u>1?"& ":"")+a[h],a=a.join(u>2?", ":" "),o.replace(s_,`{
69
69
  /* [wrapped with `+a+`] */
70
- `)}function cS(o){return ce(o)||no(o)||!!(Of&&o&&o[Of])}function dr(o,a){var u=typeof o;return a=a??Qe,!!a&&(u=="number"||u!="symbol"&&w_.test(o))&&o>-1&&o%1==0&&o<a}function Rt(o,a,u){if(!$e(u))return!1;var h=typeof a;return(h=="number"?Dt(u)&&dr(a,u.length):h=="string"&&a in u)?On(u[a],o):!1}function ru(o,a){if(ce(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||Gt(o)?!0:i_.test(o)||!o_.test(o)||a!=null&&o in Ne(a)}function lS(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function ou(o){var a=ds(o),u=y[a];if(typeof u!="function"||!(a in pe.prototype))return!1;if(o===u)return!0;var h=eu(u);return!!h&&o===h[0]}function uS(o){return!!bf&&bf in o}var dS=Ha?hr:_u;function Wi(o){var a=o&&o.constructor,u=typeof a=="function"&&a.prototype||Ro;return o===u}function bg(o){return o===o&&!$e(o)}function Ig(o,a){return function(u){return u==null?!1:u[o]===a&&(a!==t||o in Ne(u))}}function hS(o){var a=vs(o,function(h){return u.size===g&&u.clear(),h}),u=a.cache;return a}function fS(o,a){var u=o[1],h=a[1],p=u|h,w=p<(O|$|z),T=h==z&&u==U||h==z&&u==tt&&o[7].length<=a[8]||h==(z|tt)&&a[7].length<=a[8]&&u==U;if(!(w||T))return o;h&O&&(o[2]=a[2],p|=u&O?0:V);var E=a[3];if(E){var I=o[3];o[3]=I?lg(I,E,a[4]):E,o[4]=I?kr(o[3],m):a[4]}return E=a[5],E&&(I=o[5],o[5]=I?ug(I,E,a[6]):E,o[6]=I?kr(o[5],m):a[6]),E=a[7],E&&(o[7]=E),h&z&&(o[8]=o[8]==null?a[8]:_t(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=p,o}function gS(o){var a=[];if(o!=null)for(var u in Ne(o))a.push(u);return a}function mS(o){return Ka.call(o)}function kg(o,a,u){return a=rt(a===t?o.length-1:a,0),function(){for(var h=arguments,p=-1,w=rt(h.length-a,0),T=R(w);++p<w;)T[p]=h[a+p];p=-1;for(var E=R(a+1);++p<a;)E[p]=h[p];return E[a]=u(T),zt(o,this,E)}}function Rg(o,a){return a.length<2?o:Zr(o,fn(a,0,-1))}function pS(o,a){for(var u=o.length,h=_t(a.length,u),p=xt(o);h--;){var w=a[h];o[h]=dr(w,u)?p[w]:t}return o}function iu(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var Og=Pg(Zf),qi=NT||function(o,a){return ht.setTimeout(o,a)},au=Pg(VE);function Ng(o,a,u){var h=a+"";return au(o,sS(h,vS(oS(h),u)))}function Pg(o){var a=0,u=0;return function(){var h=DT(),p=Ue-(h-u);if(u=h,p>0){if(++a>=Ee)return arguments[0]}else a=0;return o.apply(t,arguments)}}function fs(o,a){var u=-1,h=o.length,p=h-1;for(a=a===t?h:a;++u<a;){var w=$l(u,p),T=o[w];o[w]=o[u],o[u]=T}return o.length=a,o}var Mg=hS(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(a_,function(u,h,p,w){a.push(p?w.replace(g_,"$1"):h||u)}),a});function qn(o){if(typeof o=="string"||Gt(o))return o;var a=o+"";return a=="0"&&1/o==-Mt?"-0":a}function to(o){if(o!=null){try{return $a.call(o)}catch{}try{return o+""}catch{}}return""}function vS(o,a){return ln(zw,function(u){var h="_."+u[0];a&u[1]&&!Ba(o,h)&&o.push(h)}),o.sort()}function xg(o){if(o instanceof pe)return o.clone();var a=new dn(o.__wrapped__,o.__chain__);return a.__actions__=xt(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function yS(o,a,u){(u?Rt(o,a,u):a===t)?a=1:a=rt(de(a),0);var h=o==null?0:o.length;if(!h||a<1)return[];for(var p=0,w=0,T=R(Ya(h/a));p<h;)T[w++]=fn(o,p,p+=a);return T}function CS(o){for(var a=-1,u=o==null?0:o.length,h=0,p=[];++a<u;){var w=o[a];w&&(p[h++]=w)}return p}function wS(){var o=arguments.length;if(!o)return[];for(var a=R(o-1),u=arguments[0],h=o;h--;)a[h-1]=arguments[h];return Ir(ce(u)?xt(u):[u],ft(a,1))}var _S=fe(function(o,a){return je(o)?Fi(o,ft(a,1,je,!0)):[]}),TS=fe(function(o,a){var u=gn(a);return je(u)&&(u=t),je(o)?Fi(o,ft(a,1,je,!0),X(u,2)):[]}),ES=fe(function(o,a){var u=gn(a);return je(u)&&(u=t),je(o)?Fi(o,ft(a,1,je,!0),t,u):[]});function SS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),fn(o,a<0?0:a,h)):[]}function AS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,fn(o,0,a<0?0:a)):[]}function bS(o,a){return o&&o.length?is(o,X(a,3),!0,!0):[]}function IS(o,a){return o&&o.length?is(o,X(a,3),!0):[]}function kS(o,a,u,h){var p=o==null?0:o.length;return p?(u&&typeof u!="number"&&Rt(o,a,u)&&(u=0,h=p),wE(o,a,u,h)):[]}function Dg(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),Ua(o,X(a,3),p)}function Lg(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h-1;return u!==t&&(p=de(u),p=u<0?rt(h+p,0):_t(p,h-1)),Ua(o,X(a,3),p,!0)}function Bg(o){var a=o==null?0:o.length;return a?ft(o,1):[]}function RS(o){var a=o==null?0:o.length;return a?ft(o,Mt):[]}function OS(o,a){var u=o==null?0:o.length;return u?(a=a===t?1:de(a),ft(o,a)):[]}function NS(o){for(var a=-1,u=o==null?0:o.length,h={};++a<u;){var p=o[a];h[p[0]]=p[1]}return h}function Ug(o){return o&&o.length?o[0]:t}function PS(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),Ao(o,a,p)}function MS(o){var a=o==null?0:o.length;return a?fn(o,0,-1):[]}var xS=fe(function(o){var a=Ve(o,Gl);return a.length&&a[0]===o[0]?Bl(a):[]}),DS=fe(function(o){var a=gn(o),u=Ve(o,Gl);return a===gn(u)?a=t:u.pop(),u.length&&u[0]===o[0]?Bl(u,X(a,2)):[]}),LS=fe(function(o){var a=gn(o),u=Ve(o,Gl);return a=typeof a=="function"?a:t,a&&u.pop(),u.length&&u[0]===o[0]?Bl(u,t,a):[]});function BS(o,a){return o==null?"":MT.call(o,a)}function gn(o){var a=o==null?0:o.length;return a?o[a-1]:t}function US(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h;return u!==t&&(p=de(u),p=p<0?rt(h+p,0):_t(p,h-1)),a===a?vT(o,a,p):Ua(o,yf,p,!0)}function VS(o,a){return o&&o.length?Yf(o,de(a)):t}var FS=fe(Vg);function Vg(o,a){return o&&o.length&&a&&a.length?Hl(o,a):o}function HS(o,a,u){return o&&o.length&&a&&a.length?Hl(o,a,X(u,2)):o}function $S(o,a,u){return o&&o.length&&a&&a.length?Hl(o,a,t,u):o}var KS=ur(function(o,a){var u=o==null?0:o.length,h=Ml(o,a);return Xf(o,Ve(a,function(p){return dr(p,u)?+p:p}).sort(cg)),h});function zS(o,a){var u=[];if(!(o&&o.length))return u;var h=-1,p=[],w=o.length;for(a=X(a,3);++h<w;){var T=o[h];a(T,h,o)&&(u.push(T),p.push(h))}return Xf(o,p),u}function su(o){return o==null?o:BT.call(o)}function WS(o,a,u){var h=o==null?0:o.length;return h?(u&&typeof u!="number"&&Rt(o,a,u)?(a=0,u=h):(a=a==null?0:de(a),u=u===t?h:de(u)),fn(o,a,u)):[]}function qS(o,a){return os(o,a)}function GS(o,a,u){return zl(o,a,X(u,2))}function jS(o,a){var u=o==null?0:o.length;if(u){var h=os(o,a);if(h<u&&On(o[h],a))return h}return-1}function YS(o,a){return os(o,a,!0)}function JS(o,a,u){return zl(o,a,X(u,2),!0)}function QS(o,a){var u=o==null?0:o.length;if(u){var h=os(o,a,!0)-1;if(On(o[h],a))return h}return-1}function XS(o){return o&&o.length?eg(o):[]}function ZS(o,a){return o&&o.length?eg(o,X(a,2)):[]}function eA(o){var a=o==null?0:o.length;return a?fn(o,1,a):[]}function tA(o,a,u){return o&&o.length?(a=u||a===t?1:de(a),fn(o,0,a<0?0:a)):[]}function nA(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,fn(o,a<0?0:a,h)):[]}function rA(o,a){return o&&o.length?is(o,X(a,3),!1,!0):[]}function oA(o,a){return o&&o.length?is(o,X(a,3)):[]}var iA=fe(function(o){return Nr(ft(o,1,je,!0))}),aA=fe(function(o){var a=gn(o);return je(a)&&(a=t),Nr(ft(o,1,je,!0),X(a,2))}),sA=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Nr(ft(o,1,je,!0),t,a)});function cA(o){return o&&o.length?Nr(o):[]}function lA(o,a){return o&&o.length?Nr(o,X(a,2)):[]}function uA(o,a){return a=typeof a=="function"?a:t,o&&o.length?Nr(o,t,a):[]}function cu(o){if(!(o&&o.length))return[];var a=0;return o=br(o,function(u){if(je(u))return a=rt(u.length,a),!0}),Al(a,function(u){return Ve(o,Tl(u))})}function Fg(o,a){if(!(o&&o.length))return[];var u=cu(o);return a==null?u:Ve(u,function(h){return zt(a,t,h)})}var dA=fe(function(o,a){return je(o)?Fi(o,a):[]}),hA=fe(function(o){return ql(br(o,je))}),fA=fe(function(o){var a=gn(o);return je(a)&&(a=t),ql(br(o,je),X(a,2))}),gA=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,ql(br(o,je),t,a)}),mA=fe(cu);function pA(o,a){return og(o||[],a||[],Vi)}function vA(o,a){return og(o||[],a||[],Ki)}var yA=fe(function(o){var a=o.length,u=a>1?o[a-1]:t;return u=typeof u=="function"?(o.pop(),u):t,Fg(o,u)});function Hg(o){var a=y(o);return a.__chain__=!0,a}function CA(o,a){return a(o),o}function gs(o,a){return a(o)}var wA=ur(function(o){var a=o.length,u=a?o[0]:0,h=this.__wrapped__,p=function(w){return Ml(w,o)};return a>1||this.__actions__.length||!(h instanceof pe)||!dr(u)?this.thru(p):(h=h.slice(u,+u+(a?1:0)),h.__actions__.push({func:gs,args:[p],thisArg:t}),new dn(h,this.__chain__).thru(function(w){return a&&!w.length&&w.push(t),w}))});function _A(){return Hg(this)}function TA(){return new dn(this.value(),this.__chain__)}function EA(){this.__values__===t&&(this.__values__=tm(this.value()));var o=this.__index__>=this.__values__.length,a=o?t:this.__values__[this.__index__++];return{done:o,value:a}}function SA(){return this}function AA(o){for(var a,u=this;u instanceof Za;){var h=xg(u);h.__index__=0,h.__values__=t,a?p.__wrapped__=h:a=h;var p=h;u=u.__wrapped__}return p.__wrapped__=o,a}function bA(){var o=this.__wrapped__;if(o instanceof pe){var a=o;return this.__actions__.length&&(a=new pe(this)),a=a.reverse(),a.__actions__.push({func:gs,args:[su],thisArg:t}),new dn(a,this.__chain__)}return this.thru(su)}function IA(){return rg(this.__wrapped__,this.__actions__)}var kA=as(function(o,a,u){Ie.call(o,u)?++o[u]:cr(o,u,1)});function RA(o,a,u){var h=ce(o)?pf:CE;return u&&Rt(o,a,u)&&(a=t),h(o,X(a,3))}function OA(o,a){var u=ce(o)?br:Ff;return u(o,X(a,3))}var NA=gg(Dg),PA=gg(Lg);function MA(o,a){return ft(ms(o,a),1)}function xA(o,a){return ft(ms(o,a),Mt)}function DA(o,a,u){return u=u===t?1:de(u),ft(ms(o,a),u)}function $g(o,a){var u=ce(o)?ln:Or;return u(o,X(a,3))}function Kg(o,a){var u=ce(o)?eT:Vf;return u(o,X(a,3))}var LA=as(function(o,a,u){Ie.call(o,u)?o[u].push(a):cr(o,u,[a])});function BA(o,a,u,h){o=Dt(o)?o:Bo(o),u=u&&!h?de(u):0;var p=o.length;return u<0&&(u=rt(p+u,0)),ws(o)?u<=p&&o.indexOf(a,u)>-1:!!p&&Ao(o,a,u)>-1}var UA=fe(function(o,a,u){var h=-1,p=typeof a=="function",w=Dt(o)?R(o.length):[];return Or(o,function(T){w[++h]=p?zt(a,T,u):Hi(T,a,u)}),w}),VA=as(function(o,a,u){cr(o,u,a)});function ms(o,a){var u=ce(o)?Ve:qf;return u(o,X(a,3))}function FA(o,a,u,h){return o==null?[]:(ce(a)||(a=a==null?[]:[a]),u=h?t:u,ce(u)||(u=u==null?[]:[u]),Jf(o,a,u))}var HA=as(function(o,a,u){o[u?0:1].push(a)},function(){return[[],[]]});function $A(o,a,u){var h=ce(o)?wl:wf,p=arguments.length<3;return h(o,X(a,4),u,p,Or)}function KA(o,a,u){var h=ce(o)?tT:wf,p=arguments.length<3;return h(o,X(a,4),u,p,Vf)}function zA(o,a){var u=ce(o)?br:Ff;return u(o,ys(X(a,3)))}function WA(o){var a=ce(o)?Df:BE;return a(o)}function qA(o,a,u){(u?Rt(o,a,u):a===t)?a=1:a=de(a);var h=ce(o)?gE:UE;return h(o,a)}function GA(o){var a=ce(o)?mE:FE;return a(o)}function jA(o){if(o==null)return 0;if(Dt(o))return ws(o)?Io(o):o.length;var a=Tt(o);return a==bn||a==In?o.size:Vl(o).length}function YA(o,a,u){var h=ce(o)?_l:HE;return u&&Rt(o,a,u)&&(a=t),h(o,X(a,3))}var JA=fe(function(o,a){if(o==null)return[];var u=a.length;return u>1&&Rt(o,a[0],a[1])?a=[]:u>2&&Rt(a[0],a[1],a[2])&&(a=[a[0]]),Jf(o,ft(a,1),[])}),ps=OT||function(){return ht.Date.now()};function QA(o,a){if(typeof a!="function")throw new un(l);return o=de(o),function(){if(--o<1)return a.apply(this,arguments)}}function zg(o,a,u){return a=u?t:a,a=o&&a==null?o.length:a,lr(o,z,t,t,t,t,a)}function Wg(o,a){var u;if(typeof a!="function")throw new un(l);return o=de(o),function(){return--o>0&&(u=a.apply(this,arguments)),o<=1&&(a=t),u}}var lu=fe(function(o,a,u){var h=O;if(u.length){var p=kr(u,Do(lu));h|=se}return lr(o,h,a,u,p)}),qg=fe(function(o,a,u){var h=O|$;if(u.length){var p=kr(u,Do(qg));h|=se}return lr(a,h,o,u,p)});function Gg(o,a,u){a=u?t:a;var h=lr(o,U,t,t,t,t,t,a);return h.placeholder=Gg.placeholder,h}function jg(o,a,u){a=u?t:a;var h=lr(o,Q,t,t,t,t,t,a);return h.placeholder=jg.placeholder,h}function Yg(o,a,u){var h,p,w,T,E,I,x=0,D=!1,L=!1,K=!0;if(typeof o!="function")throw new un(l);a=mn(a)||0,$e(u)&&(D=!!u.leading,L="maxWait"in u,w=L?rt(mn(u.maxWait)||0,a):w,K="trailing"in u?!!u.trailing:K);function Y(Ye){var Nn=h,gr=p;return h=p=t,x=Ye,T=o.apply(gr,Nn),T}function Z(Ye){return x=Ye,E=qi(me,a),D?Y(Ye):T}function he(Ye){var Nn=Ye-I,gr=Ye-x,gm=a-Nn;return L?_t(gm,w-gr):gm}function ee(Ye){var Nn=Ye-I,gr=Ye-x;return I===t||Nn>=a||Nn<0||L&&gr>=w}function me(){var Ye=ps();if(ee(Ye))return ve(Ye);E=qi(me,he(Ye))}function ve(Ye){return E=t,K&&h?Y(Ye):(h=p=t,T)}function jt(){E!==t&&ig(E),x=0,h=I=p=E=t}function Ot(){return E===t?T:ve(ps())}function Yt(){var Ye=ps(),Nn=ee(Ye);if(h=arguments,p=this,I=Ye,Nn){if(E===t)return Z(I);if(L)return ig(E),E=qi(me,a),Y(I)}return E===t&&(E=qi(me,a)),T}return Yt.cancel=jt,Yt.flush=Ot,Yt}var XA=fe(function(o,a){return Uf(o,1,a)}),ZA=fe(function(o,a,u){return Uf(o,mn(a)||0,u)});function eb(o){return lr(o,Te)}function vs(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new un(l);var u=function(){var h=arguments,p=a?a.apply(this,h):h[0],w=u.cache;if(w.has(p))return w.get(p);var T=o.apply(this,h);return u.cache=w.set(p,T)||w,T};return u.cache=new(vs.Cache||sr),u}vs.Cache=sr;function ys(o){if(typeof o!="function")throw new un(l);return function(){var a=arguments;switch(a.length){case 0:return!o.call(this);case 1:return!o.call(this,a[0]);case 2:return!o.call(this,a[0],a[1]);case 3:return!o.call(this,a[0],a[1],a[2])}return!o.apply(this,a)}}function tb(o){return Wg(2,o)}var nb=$E(function(o,a){a=a.length==1&&ce(a[0])?Ve(a[0],Wt(X())):Ve(ft(a,1),Wt(X()));var u=a.length;return fe(function(h){for(var p=-1,w=_t(h.length,u);++p<w;)h[p]=a[p].call(this,h[p]);return zt(o,this,h)})}),uu=fe(function(o,a){var u=kr(a,Do(uu));return lr(o,se,t,a,u)}),Jg=fe(function(o,a){var u=kr(a,Do(Jg));return lr(o,we,t,a,u)}),rb=ur(function(o,a){return lr(o,tt,t,t,t,a)});function ob(o,a){if(typeof o!="function")throw new un(l);return a=a===t?a:de(a),fe(o,a)}function ib(o,a){if(typeof o!="function")throw new un(l);return a=a==null?0:rt(de(a),0),fe(function(u){var h=u[a],p=Mr(u,0,a);return h&&Ir(p,h),zt(o,this,p)})}function ab(o,a,u){var h=!0,p=!0;if(typeof o!="function")throw new un(l);return $e(u)&&(h="leading"in u?!!u.leading:h,p="trailing"in u?!!u.trailing:p),Yg(o,a,{leading:h,maxWait:a,trailing:p})}function sb(o){return zg(o,1)}function cb(o,a){return uu(jl(a),o)}function lb(){if(!arguments.length)return[];var o=arguments[0];return ce(o)?o:[o]}function ub(o){return hn(o,S)}function db(o,a){return a=typeof a=="function"?a:t,hn(o,S,a)}function hb(o){return hn(o,v|S)}function fb(o,a){return a=typeof a=="function"?a:t,hn(o,v|S,a)}function gb(o,a){return a==null||Bf(o,a,st(a))}function On(o,a){return o===a||o!==o&&a!==a}var mb=us(Ll),pb=us(function(o,a){return o>=a}),no=Kf(function(){return arguments}())?Kf:function(o){return ze(o)&&Ie.call(o,"callee")&&!Rf.call(o,"callee")},ce=R.isArray,vb=uf?Wt(uf):AE;function Dt(o){return o!=null&&Cs(o.length)&&!hr(o)}function je(o){return ze(o)&&Dt(o)}function yb(o){return o===!0||o===!1||ze(o)&&kt(o)==bi}var xr=PT||_u,Cb=df?Wt(df):bE;function wb(o){return ze(o)&&o.nodeType===1&&!Gi(o)}function _b(o){if(o==null)return!0;if(Dt(o)&&(ce(o)||typeof o=="string"||typeof o.splice=="function"||xr(o)||Lo(o)||no(o)))return!o.length;var a=Tt(o);if(a==bn||a==In)return!o.size;if(Wi(o))return!Vl(o).length;for(var u in o)if(Ie.call(o,u))return!1;return!0}function Tb(o,a){return $i(o,a)}function Eb(o,a,u){u=typeof u=="function"?u:t;var h=u?u(o,a):t;return h===t?$i(o,a,t,u):!!h}function du(o){if(!ze(o))return!1;var a=kt(o);return a==Na||a==qw||typeof o.message=="string"&&typeof o.name=="string"&&!Gi(o)}function Sb(o){return typeof o=="number"&&Nf(o)}function hr(o){if(!$e(o))return!1;var a=kt(o);return a==Pa||a==Bh||a==Ww||a==jw}function Qg(o){return typeof o=="number"&&o==de(o)}function Cs(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Qe}function $e(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function ze(o){return o!=null&&typeof o=="object"}var Xg=hf?Wt(hf):kE;function Ab(o,a){return o===a||Ul(o,a,tu(a))}function bb(o,a,u){return u=typeof u=="function"?u:t,Ul(o,a,tu(a),u)}function Ib(o){return Zg(o)&&o!=+o}function kb(o){if(dS(o))throw new ae(s);return zf(o)}function Rb(o){return o===null}function Ob(o){return o==null}function Zg(o){return typeof o=="number"||ze(o)&&kt(o)==ki}function Gi(o){if(!ze(o)||kt(o)!=ir)return!1;var a=qa(o);if(a===null)return!0;var u=Ie.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&$a.call(u)==bT}var hu=ff?Wt(ff):RE;function Nb(o){return Qg(o)&&o>=-Qe&&o<=Qe}var em=gf?Wt(gf):OE;function ws(o){return typeof o=="string"||!ce(o)&&ze(o)&&kt(o)==Oi}function Gt(o){return typeof o=="symbol"||ze(o)&&kt(o)==Ma}var Lo=mf?Wt(mf):NE;function Pb(o){return o===t}function Mb(o){return ze(o)&&Tt(o)==Ni}function xb(o){return ze(o)&&kt(o)==Jw}var Db=us(Fl),Lb=us(function(o,a){return o<=a});function tm(o){if(!o)return[];if(Dt(o))return ws(o)?kn(o):xt(o);if(xi&&o[xi])return gT(o[xi]());var a=Tt(o),u=a==bn?Il:a==In?Va:Bo;return u(o)}function fr(o){if(!o)return o===0?o:0;if(o=mn(o),o===Mt||o===-Mt){var a=o<0?-1:1;return a*wt}return o===o?o:0}function de(o){var a=fr(o),u=a%1;return a===a?u?a-u:a:0}function nm(o){return o?Xr(de(o),0,Kt):0}function mn(o){if(typeof o=="number")return o;if(Gt(o))return Ai;if($e(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=$e(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=_f(o);var u=v_.test(o);return u||C_.test(o)?Q_(o.slice(2),u?2:8):p_.test(o)?Ai:+o}function rm(o){return Wn(o,Lt(o))}function Bb(o){return o?Xr(de(o),-Qe,Qe):o===0?o:0}function be(o){return o==null?"":qt(o)}var Ub=Mo(function(o,a){if(Wi(a)||Dt(a)){Wn(a,st(a),o);return}for(var u in a)Ie.call(a,u)&&Vi(o,u,a[u])}),om=Mo(function(o,a){Wn(a,Lt(a),o)}),_s=Mo(function(o,a,u,h){Wn(a,Lt(a),o,h)}),Vb=Mo(function(o,a,u,h){Wn(a,st(a),o,h)}),Fb=ur(Ml);function Hb(o,a){var u=Po(o);return a==null?u:Lf(u,a)}var $b=fe(function(o,a){o=Ne(o);var u=-1,h=a.length,p=h>2?a[2]:t;for(p&&Rt(a[0],a[1],p)&&(h=1);++u<h;)for(var w=a[u],T=Lt(w),E=-1,I=T.length;++E<I;){var x=T[E],D=o[x];(D===t||On(D,Ro[x])&&!Ie.call(o,x))&&(o[x]=w[x])}return o}),Kb=fe(function(o){return o.push(t,_g),zt(im,t,o)});function zb(o,a){return vf(o,X(a,3),zn)}function Wb(o,a){return vf(o,X(a,3),Dl)}function qb(o,a){return o==null?o:xl(o,X(a,3),Lt)}function Gb(o,a){return o==null?o:Hf(o,X(a,3),Lt)}function jb(o,a){return o&&zn(o,X(a,3))}function Yb(o,a){return o&&Dl(o,X(a,3))}function Jb(o){return o==null?[]:ns(o,st(o))}function Qb(o){return o==null?[]:ns(o,Lt(o))}function fu(o,a,u){var h=o==null?t:Zr(o,a);return h===t?u:h}function Xb(o,a){return o!=null&&Sg(o,a,_E)}function gu(o,a){return o!=null&&Sg(o,a,TE)}var Zb=pg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Ka.call(a)),o[a]=u},pu(Bt)),eI=pg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Ka.call(a)),Ie.call(o,a)?o[a].push(u):o[a]=[u]},X),tI=fe(Hi);function st(o){return Dt(o)?xf(o):Vl(o)}function Lt(o){return Dt(o)?xf(o,!0):PE(o)}function nI(o,a){var u={};return a=X(a,3),zn(o,function(h,p,w){cr(u,a(h,p,w),h)}),u}function rI(o,a){var u={};return a=X(a,3),zn(o,function(h,p,w){cr(u,p,a(h,p,w))}),u}var oI=Mo(function(o,a,u){rs(o,a,u)}),im=Mo(function(o,a,u,h){rs(o,a,u,h)}),iI=ur(function(o,a){var u={};if(o==null)return u;var h=!1;a=Ve(a,function(w){return w=Pr(w,o),h||(h=w.length>1),w}),Wn(o,Zl(o),u),h&&(u=hn(u,v|C|S,ZE));for(var p=a.length;p--;)Wl(u,a[p]);return u});function aI(o,a){return am(o,ys(X(a)))}var sI=ur(function(o,a){return o==null?{}:xE(o,a)});function am(o,a){if(o==null)return{};var u=Ve(Zl(o),function(h){return[h]});return a=X(a),Qf(o,u,function(h,p){return a(h,p[0])})}function cI(o,a,u){a=Pr(a,o);var h=-1,p=a.length;for(p||(p=1,o=t);++h<p;){var w=o==null?t:o[qn(a[h])];w===t&&(h=p,w=u),o=hr(w)?w.call(o):w}return o}function lI(o,a,u){return o==null?o:Ki(o,a,u)}function uI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:Ki(o,a,u,h)}var sm=Cg(st),cm=Cg(Lt);function dI(o,a,u){var h=ce(o),p=h||xr(o)||Lo(o);if(a=X(a,4),u==null){var w=o&&o.constructor;p?u=h?new w:[]:$e(o)?u=hr(w)?Po(qa(o)):{}:u={}}return(p?ln:zn)(o,function(T,E,I){return a(u,T,E,I)}),u}function hI(o,a){return o==null?!0:Wl(o,a)}function fI(o,a,u){return o==null?o:ng(o,a,jl(u))}function gI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:ng(o,a,jl(u),h)}function Bo(o){return o==null?[]:bl(o,st(o))}function mI(o){return o==null?[]:bl(o,Lt(o))}function pI(o,a,u){return u===t&&(u=a,a=t),u!==t&&(u=mn(u),u=u===u?u:0),a!==t&&(a=mn(a),a=a===a?a:0),Xr(mn(o),a,u)}function vI(o,a,u){return a=fr(a),u===t?(u=a,a=0):u=fr(u),o=mn(o),EE(o,a,u)}function yI(o,a,u){if(u&&typeof u!="boolean"&&Rt(o,a,u)&&(a=u=t),u===t&&(typeof a=="boolean"?(u=a,a=t):typeof o=="boolean"&&(u=o,o=t)),o===t&&a===t?(o=0,a=1):(o=fr(o),a===t?(a=o,o=0):a=fr(a)),o>a){var h=o;o=a,a=h}if(u||o%1||a%1){var p=Pf();return _t(o+p*(a-o+J_("1e-"+((p+"").length-1))),a)}return $l(o,a)}var CI=xo(function(o,a,u){return a=a.toLowerCase(),o+(u?lm(a):a)});function lm(o){return mu(be(o).toLowerCase())}function um(o){return o=be(o),o&&o.replace(__,lT).replace(F_,"")}function wI(o,a,u){o=be(o),a=qt(a);var h=o.length;u=u===t?h:Xr(de(u),0,h);var p=u;return u-=a.length,u>=0&&o.slice(u,p)==a}function _I(o){return o=be(o),o&&t_.test(o)?o.replace(Fh,uT):o}function TI(o){return o=be(o),o&&s_.test(o)?o.replace(ul,"\\$&"):o}var EI=xo(function(o,a,u){return o+(u?"-":"")+a.toLowerCase()}),SI=xo(function(o,a,u){return o+(u?" ":"")+a.toLowerCase()}),AI=fg("toLowerCase");function bI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;if(!a||h>=a)return o;var p=(a-h)/2;return ls(Ja(p),u)+o+ls(Ya(p),u)}function II(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?o+ls(a-h,u):o}function kI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?ls(a-h,u)+o:o}function RI(o,a,u){return u||a==null?a=0:a&&(a=+a),LT(be(o).replace(dl,""),a||0)}function OI(o,a,u){return(u?Rt(o,a,u):a===t)?a=1:a=de(a),Kl(be(o),a)}function NI(){var o=arguments,a=be(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var PI=xo(function(o,a,u){return o+(u?"_":"")+a.toLowerCase()});function MI(o,a,u){return u&&typeof u!="number"&&Rt(o,a,u)&&(a=u=t),u=u===t?Kt:u>>>0,u?(o=be(o),o&&(typeof a=="string"||a!=null&&!hu(a))&&(a=qt(a),!a&&bo(o))?Mr(kn(o),0,u):o.split(a,u)):[]}var xI=xo(function(o,a,u){return o+(u?" ":"")+mu(a)});function DI(o,a,u){return o=be(o),u=u==null?0:Xr(de(u),0,o.length),a=qt(a),o.slice(u,u+a.length)==a}function LI(o,a,u){var h=y.templateSettings;u&&Rt(o,a,u)&&(a=t),o=be(o),a=_s({},a,h,wg);var p=_s({},a.imports,h.imports,wg),w=st(p),T=bl(p,w),E,I,x=0,D=a.interpolate||xa,L="__p += '",K=kl((a.escape||xa).source+"|"+D.source+"|"+(D===Hh?m_:xa).source+"|"+(a.evaluate||xa).source+"|$","g"),Y="//# sourceURL="+(Ie.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++W_+"]")+`
71
- `;o.replace(K,function(ee,me,ve,jt,Ot,Yt){return ve||(ve=jt),L+=o.slice(x,Yt).replace(T_,dT),me&&(E=!0,L+=`' +
70
+ `)}function aS(o){return ce(o)||no(o)||!!(kf&&o&&o[kf])}function dr(o,a){var u=typeof o;return a=a??Qe,!!a&&(u=="number"||u!="symbol"&&y_.test(o))&&o>-1&&o%1==0&&o<a}function Rt(o,a,u){if(!$e(u))return!1;var h=typeof a;return(h=="number"?Dt(u)&&dr(a,u.length):h=="string"&&a in u)?Nn(u[a],o):!1}function Zl(o,a){if(ce(o))return!1;var u=typeof o;return u=="number"||u=="symbol"||u=="boolean"||o==null||Gt(o)?!0:r_.test(o)||!n_.test(o)||a!=null&&o in Ne(a)}function sS(o){var a=typeof o;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?o!=="__proto__":o===null}function eu(o){var a=ls(o),u=y[a];if(typeof u!="function"||!(a in pe.prototype))return!1;if(o===u)return!0;var h=Jl(u);return!!h&&o===h[0]}function cS(o){return!!Sf&&Sf in o}var lS=Va?hr:vu;function Wi(o){var a=o&&o.constructor,u=typeof a=="function"&&a.prototype||Ro;return o===u}function Sg(o){return o===o&&!$e(o)}function Ag(o,a){return function(u){return u==null?!1:u[o]===a&&(a!==t||o in Ne(u))}}function uS(o){var a=ms(o,function(h){return u.size===g&&u.clear(),h}),u=a.cache;return a}function dS(o,a){var u=o[1],h=a[1],p=u|h,w=p<(O|$|z),T=h==z&&u==U||h==z&&u==tt&&o[7].length<=a[8]||h==(z|tt)&&a[7].length<=a[8]&&u==U;if(!(w||T))return o;h&O&&(o[2]=a[2],p|=u&O?0:V);var E=a[3];if(E){var I=o[3];o[3]=I?sg(I,E,a[4]):E,o[4]=I?kr(o[3],m):a[4]}return E=a[5],E&&(I=o[5],o[5]=I?cg(I,E,a[6]):E,o[6]=I?kr(o[5],m):a[6]),E=a[7],E&&(o[7]=E),h&z&&(o[8]=o[8]==null?a[8]:_t(o[8],a[8])),o[9]==null&&(o[9]=a[9]),o[0]=a[0],o[1]=p,o}function hS(o){var a=[];if(o!=null)for(var u in Ne(o))a.push(u);return a}function fS(o){return Ha.call(o)}function bg(o,a,u){return a=rt(a===t?o.length-1:a,0),function(){for(var h=arguments,p=-1,w=rt(h.length-a,0),T=R(w);++p<w;)T[p]=h[a+p];p=-1;for(var E=R(a+1);++p<a;)E[p]=h[p];return E[a]=u(T),zt(o,this,E)}}function Ig(o,a){return a.length<2?o:Zr(o,fn(a,0,-1))}function gS(o,a){for(var u=o.length,h=_t(a.length,u),p=xt(o);h--;){var w=a[h];o[h]=dr(w,u)?p[w]:t}return o}function tu(o,a){if(!(a==="constructor"&&typeof o[a]=="function")&&a!="__proto__")return o[a]}var kg=Og(Qf),qi=RT||function(o,a){return ht.setTimeout(o,a)},nu=Og(BE);function Rg(o,a,u){var h=a+"";return nu(o,iS(h,mS(nS(h),u)))}function Og(o){var a=0,u=0;return function(){var h=MT(),p=Ue-(h-u);if(u=h,p>0){if(++a>=Ee)return arguments[0]}else a=0;return o.apply(t,arguments)}}function ds(o,a){var u=-1,h=o.length,p=h-1;for(a=a===t?h:a;++u<a;){var w=Ul(u,p),T=o[w];o[w]=o[u],o[u]=T}return o.length=a,o}var Ng=uS(function(o){var a=[];return o.charCodeAt(0)===46&&a.push(""),o.replace(o_,function(u,h,p,w){a.push(p?w.replace(h_,"$1"):h||u)}),a});function qn(o){if(typeof o=="string"||Gt(o))return o;var a=o+"";return a=="0"&&1/o==-Mt?"-0":a}function to(o){if(o!=null){try{return Fa.call(o)}catch{}try{return o+""}catch{}}return""}function mS(o,a){return ln($w,function(u){var h="_."+u[0];a&u[1]&&!Da(o,h)&&o.push(h)}),o.sort()}function Pg(o){if(o instanceof pe)return o.clone();var a=new dn(o.__wrapped__,o.__chain__);return a.__actions__=xt(o.__actions__),a.__index__=o.__index__,a.__values__=o.__values__,a}function pS(o,a,u){(u?Rt(o,a,u):a===t)?a=1:a=rt(de(a),0);var h=o==null?0:o.length;if(!h||a<1)return[];for(var p=0,w=0,T=R(Ga(h/a));p<h;)T[w++]=fn(o,p,p+=a);return T}function vS(o){for(var a=-1,u=o==null?0:o.length,h=0,p=[];++a<u;){var w=o[a];w&&(p[h++]=w)}return p}function yS(){var o=arguments.length;if(!o)return[];for(var a=R(o-1),u=arguments[0],h=o;h--;)a[h-1]=arguments[h];return Ir(ce(u)?xt(u):[u],ft(a,1))}var CS=fe(function(o,a){return je(o)?Fi(o,ft(a,1,je,!0)):[]}),wS=fe(function(o,a){var u=gn(a);return je(u)&&(u=t),je(o)?Fi(o,ft(a,1,je,!0),X(u,2)):[]}),_S=fe(function(o,a){var u=gn(a);return je(u)&&(u=t),je(o)?Fi(o,ft(a,1,je,!0),t,u):[]});function TS(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),fn(o,a<0?0:a,h)):[]}function ES(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,fn(o,0,a<0?0:a)):[]}function SS(o,a){return o&&o.length?rs(o,X(a,3),!0,!0):[]}function AS(o,a){return o&&o.length?rs(o,X(a,3),!0):[]}function bS(o,a,u,h){var p=o==null?0:o.length;return p?(u&&typeof u!="number"&&Rt(o,a,u)&&(u=0,h=p),yE(o,a,u,h)):[]}function Mg(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),La(o,X(a,3),p)}function xg(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h-1;return u!==t&&(p=de(u),p=u<0?rt(h+p,0):_t(p,h-1)),La(o,X(a,3),p,!0)}function Dg(o){var a=o==null?0:o.length;return a?ft(o,1):[]}function IS(o){var a=o==null?0:o.length;return a?ft(o,Mt):[]}function kS(o,a){var u=o==null?0:o.length;return u?(a=a===t?1:de(a),ft(o,a)):[]}function RS(o){for(var a=-1,u=o==null?0:o.length,h={};++a<u;){var p=o[a];h[p[0]]=p[1]}return h}function Lg(o){return o&&o.length?o[0]:t}function OS(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=u==null?0:de(u);return p<0&&(p=rt(h+p,0)),Ao(o,a,p)}function NS(o){var a=o==null?0:o.length;return a?fn(o,0,-1):[]}var PS=fe(function(o){var a=Ve(o,Kl);return a.length&&a[0]===o[0]?Ml(a):[]}),MS=fe(function(o){var a=gn(o),u=Ve(o,Kl);return a===gn(u)?a=t:u.pop(),u.length&&u[0]===o[0]?Ml(u,X(a,2)):[]}),xS=fe(function(o){var a=gn(o),u=Ve(o,Kl);return a=typeof a=="function"?a:t,a&&u.pop(),u.length&&u[0]===o[0]?Ml(u,t,a):[]});function DS(o,a){return o==null?"":NT.call(o,a)}function gn(o){var a=o==null?0:o.length;return a?o[a-1]:t}function LS(o,a,u){var h=o==null?0:o.length;if(!h)return-1;var p=h;return u!==t&&(p=de(u),p=p<0?rt(h+p,0):_t(p,h-1)),a===a?mT(o,a,p):La(o,pf,p,!0)}function BS(o,a){return o&&o.length?Gf(o,de(a)):t}var US=fe(Bg);function Bg(o,a){return o&&o.length&&a&&a.length?Bl(o,a):o}function VS(o,a,u){return o&&o.length&&a&&a.length?Bl(o,a,X(u,2)):o}function FS(o,a,u){return o&&o.length&&a&&a.length?Bl(o,a,t,u):o}var HS=ur(function(o,a){var u=o==null?0:o.length,h=Rl(o,a);return Jf(o,Ve(a,function(p){return dr(p,u)?+p:p}).sort(ag)),h});function $S(o,a){var u=[];if(!(o&&o.length))return u;var h=-1,p=[],w=o.length;for(a=X(a,3);++h<w;){var T=o[h];a(T,h,o)&&(u.push(T),p.push(h))}return Jf(o,p),u}function ru(o){return o==null?o:DT.call(o)}function KS(o,a,u){var h=o==null?0:o.length;return h?(u&&typeof u!="number"&&Rt(o,a,u)?(a=0,u=h):(a=a==null?0:de(a),u=u===t?h:de(u)),fn(o,a,u)):[]}function zS(o,a){return ns(o,a)}function WS(o,a,u){return Fl(o,a,X(u,2))}function qS(o,a){var u=o==null?0:o.length;if(u){var h=ns(o,a);if(h<u&&Nn(o[h],a))return h}return-1}function GS(o,a){return ns(o,a,!0)}function jS(o,a,u){return Fl(o,a,X(u,2),!0)}function YS(o,a){var u=o==null?0:o.length;if(u){var h=ns(o,a,!0)-1;if(Nn(o[h],a))return h}return-1}function JS(o){return o&&o.length?Xf(o):[]}function QS(o,a){return o&&o.length?Xf(o,X(a,2)):[]}function XS(o){var a=o==null?0:o.length;return a?fn(o,1,a):[]}function ZS(o,a,u){return o&&o.length?(a=u||a===t?1:de(a),fn(o,0,a<0?0:a)):[]}function eA(o,a,u){var h=o==null?0:o.length;return h?(a=u||a===t?1:de(a),a=h-a,fn(o,a<0?0:a,h)):[]}function tA(o,a){return o&&o.length?rs(o,X(a,3),!1,!0):[]}function nA(o,a){return o&&o.length?rs(o,X(a,3)):[]}var rA=fe(function(o){return Nr(ft(o,1,je,!0))}),oA=fe(function(o){var a=gn(o);return je(a)&&(a=t),Nr(ft(o,1,je,!0),X(a,2))}),iA=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,Nr(ft(o,1,je,!0),t,a)});function aA(o){return o&&o.length?Nr(o):[]}function sA(o,a){return o&&o.length?Nr(o,X(a,2)):[]}function cA(o,a){return a=typeof a=="function"?a:t,o&&o.length?Nr(o,t,a):[]}function ou(o){if(!(o&&o.length))return[];var a=0;return o=br(o,function(u){if(je(u))return a=rt(u.length,a),!0}),_l(a,function(u){return Ve(o,yl(u))})}function Ug(o,a){if(!(o&&o.length))return[];var u=ou(o);return a==null?u:Ve(u,function(h){return zt(a,t,h)})}var lA=fe(function(o,a){return je(o)?Fi(o,a):[]}),uA=fe(function(o){return $l(br(o,je))}),dA=fe(function(o){var a=gn(o);return je(a)&&(a=t),$l(br(o,je),X(a,2))}),hA=fe(function(o){var a=gn(o);return a=typeof a=="function"?a:t,$l(br(o,je),t,a)}),fA=fe(ou);function gA(o,a){return ng(o||[],a||[],Vi)}function mA(o,a){return ng(o||[],a||[],Ki)}var pA=fe(function(o){var a=o.length,u=a>1?o[a-1]:t;return u=typeof u=="function"?(o.pop(),u):t,Ug(o,u)});function Vg(o){var a=y(o);return a.__chain__=!0,a}function vA(o,a){return a(o),o}function hs(o,a){return a(o)}var yA=ur(function(o){var a=o.length,u=a?o[0]:0,h=this.__wrapped__,p=function(w){return Rl(w,o)};return a>1||this.__actions__.length||!(h instanceof pe)||!dr(u)?this.thru(p):(h=h.slice(u,+u+(a?1:0)),h.__actions__.push({func:hs,args:[p],thisArg:t}),new dn(h,this.__chain__).thru(function(w){return a&&!w.length&&w.push(t),w}))});function CA(){return Vg(this)}function wA(){return new dn(this.value(),this.__chain__)}function _A(){this.__values__===t&&(this.__values__=Zg(this.value()));var o=this.__index__>=this.__values__.length,a=o?t:this.__values__[this.__index__++];return{done:o,value:a}}function TA(){return this}function EA(o){for(var a,u=this;u instanceof Qa;){var h=Pg(u);h.__index__=0,h.__values__=t,a?p.__wrapped__=h:a=h;var p=h;u=u.__wrapped__}return p.__wrapped__=o,a}function SA(){var o=this.__wrapped__;if(o instanceof pe){var a=o;return this.__actions__.length&&(a=new pe(this)),a=a.reverse(),a.__actions__.push({func:hs,args:[ru],thisArg:t}),new dn(a,this.__chain__)}return this.thru(ru)}function AA(){return tg(this.__wrapped__,this.__actions__)}var bA=os(function(o,a,u){Ie.call(o,u)?++o[u]:cr(o,u,1)});function IA(o,a,u){var h=ce(o)?gf:vE;return u&&Rt(o,a,u)&&(a=t),h(o,X(a,3))}function kA(o,a){var u=ce(o)?br:Uf;return u(o,X(a,3))}var RA=hg(Mg),OA=hg(xg);function NA(o,a){return ft(fs(o,a),1)}function PA(o,a){return ft(fs(o,a),Mt)}function MA(o,a,u){return u=u===t?1:de(u),ft(fs(o,a),u)}function Fg(o,a){var u=ce(o)?ln:Or;return u(o,X(a,3))}function Hg(o,a){var u=ce(o)?X_:Bf;return u(o,X(a,3))}var xA=os(function(o,a,u){Ie.call(o,u)?o[u].push(a):cr(o,u,[a])});function DA(o,a,u,h){o=Dt(o)?o:Bo(o),u=u&&!h?de(u):0;var p=o.length;return u<0&&(u=rt(p+u,0)),ys(o)?u<=p&&o.indexOf(a,u)>-1:!!p&&Ao(o,a,u)>-1}var LA=fe(function(o,a,u){var h=-1,p=typeof a=="function",w=Dt(o)?R(o.length):[];return Or(o,function(T){w[++h]=p?zt(a,T,u):Hi(T,a,u)}),w}),BA=os(function(o,a,u){cr(o,u,a)});function fs(o,a){var u=ce(o)?Ve:zf;return u(o,X(a,3))}function UA(o,a,u,h){return o==null?[]:(ce(a)||(a=a==null?[]:[a]),u=h?t:u,ce(u)||(u=u==null?[]:[u]),jf(o,a,u))}var VA=os(function(o,a,u){o[u?0:1].push(a)},function(){return[[],[]]});function FA(o,a,u){var h=ce(o)?pl:yf,p=arguments.length<3;return h(o,X(a,4),u,p,Or)}function HA(o,a,u){var h=ce(o)?Z_:yf,p=arguments.length<3;return h(o,X(a,4),u,p,Bf)}function $A(o,a){var u=ce(o)?br:Uf;return u(o,ps(X(a,3)))}function KA(o){var a=ce(o)?Mf:DE;return a(o)}function zA(o,a,u){(u?Rt(o,a,u):a===t)?a=1:a=de(a);var h=ce(o)?hE:LE;return h(o,a)}function WA(o){var a=ce(o)?fE:UE;return a(o)}function qA(o){if(o==null)return 0;if(Dt(o))return ys(o)?Io(o):o.length;var a=Tt(o);return a==In||a==kn?o.size:Dl(o).length}function GA(o,a,u){var h=ce(o)?vl:VE;return u&&Rt(o,a,u)&&(a=t),h(o,X(a,3))}var jA=fe(function(o,a){if(o==null)return[];var u=a.length;return u>1&&Rt(o,a[0],a[1])?a=[]:u>2&&Rt(a[0],a[1],a[2])&&(a=[a[0]]),jf(o,ft(a,1),[])}),gs=kT||function(){return ht.Date.now()};function YA(o,a){if(typeof a!="function")throw new un(l);return o=de(o),function(){if(--o<1)return a.apply(this,arguments)}}function $g(o,a,u){return a=u?t:a,a=o&&a==null?o.length:a,lr(o,z,t,t,t,t,a)}function Kg(o,a){var u;if(typeof a!="function")throw new un(l);return o=de(o),function(){return--o>0&&(u=a.apply(this,arguments)),o<=1&&(a=t),u}}var iu=fe(function(o,a,u){var h=O;if(u.length){var p=kr(u,Do(iu));h|=se}return lr(o,h,a,u,p)}),zg=fe(function(o,a,u){var h=O|$;if(u.length){var p=kr(u,Do(zg));h|=se}return lr(a,h,o,u,p)});function Wg(o,a,u){a=u?t:a;var h=lr(o,U,t,t,t,t,t,a);return h.placeholder=Wg.placeholder,h}function qg(o,a,u){a=u?t:a;var h=lr(o,Q,t,t,t,t,t,a);return h.placeholder=qg.placeholder,h}function Gg(o,a,u){var h,p,w,T,E,I,x=0,D=!1,L=!1,K=!0;if(typeof o!="function")throw new un(l);a=mn(a)||0,$e(u)&&(D=!!u.leading,L="maxWait"in u,w=L?rt(mn(u.maxWait)||0,a):w,K="trailing"in u?!!u.trailing:K);function Y(Ye){var Pn=h,gr=p;return h=p=t,x=Ye,T=o.apply(gr,Pn),T}function Z(Ye){return x=Ye,E=qi(me,a),D?Y(Ye):T}function he(Ye){var Pn=Ye-I,gr=Ye-x,hm=a-Pn;return L?_t(hm,w-gr):hm}function ee(Ye){var Pn=Ye-I,gr=Ye-x;return I===t||Pn>=a||Pn<0||L&&gr>=w}function me(){var Ye=gs();if(ee(Ye))return ve(Ye);E=qi(me,he(Ye))}function ve(Ye){return E=t,K&&h?Y(Ye):(h=p=t,T)}function jt(){E!==t&&rg(E),x=0,h=I=p=E=t}function Ot(){return E===t?T:ve(gs())}function Yt(){var Ye=gs(),Pn=ee(Ye);if(h=arguments,p=this,I=Ye,Pn){if(E===t)return Z(I);if(L)return rg(E),E=qi(me,a),Y(I)}return E===t&&(E=qi(me,a)),T}return Yt.cancel=jt,Yt.flush=Ot,Yt}var JA=fe(function(o,a){return Lf(o,1,a)}),QA=fe(function(o,a,u){return Lf(o,mn(a)||0,u)});function XA(o){return lr(o,Te)}function ms(o,a){if(typeof o!="function"||a!=null&&typeof a!="function")throw new un(l);var u=function(){var h=arguments,p=a?a.apply(this,h):h[0],w=u.cache;if(w.has(p))return w.get(p);var T=o.apply(this,h);return u.cache=w.set(p,T)||w,T};return u.cache=new(ms.Cache||sr),u}ms.Cache=sr;function ps(o){if(typeof o!="function")throw new un(l);return function(){var a=arguments;switch(a.length){case 0:return!o.call(this);case 1:return!o.call(this,a[0]);case 2:return!o.call(this,a[0],a[1]);case 3:return!o.call(this,a[0],a[1],a[2])}return!o.apply(this,a)}}function ZA(o){return Kg(2,o)}var eb=FE(function(o,a){a=a.length==1&&ce(a[0])?Ve(a[0],Wt(X())):Ve(ft(a,1),Wt(X()));var u=a.length;return fe(function(h){for(var p=-1,w=_t(h.length,u);++p<w;)h[p]=a[p].call(this,h[p]);return zt(o,this,h)})}),au=fe(function(o,a){var u=kr(a,Do(au));return lr(o,se,t,a,u)}),jg=fe(function(o,a){var u=kr(a,Do(jg));return lr(o,we,t,a,u)}),tb=ur(function(o,a){return lr(o,tt,t,t,t,a)});function nb(o,a){if(typeof o!="function")throw new un(l);return a=a===t?a:de(a),fe(o,a)}function rb(o,a){if(typeof o!="function")throw new un(l);return a=a==null?0:rt(de(a),0),fe(function(u){var h=u[a],p=Mr(u,0,a);return h&&Ir(p,h),zt(o,this,p)})}function ob(o,a,u){var h=!0,p=!0;if(typeof o!="function")throw new un(l);return $e(u)&&(h="leading"in u?!!u.leading:h,p="trailing"in u?!!u.trailing:p),Gg(o,a,{leading:h,maxWait:a,trailing:p})}function ib(o){return $g(o,1)}function ab(o,a){return au(zl(a),o)}function sb(){if(!arguments.length)return[];var o=arguments[0];return ce(o)?o:[o]}function cb(o){return hn(o,S)}function lb(o,a){return a=typeof a=="function"?a:t,hn(o,S,a)}function ub(o){return hn(o,v|S)}function db(o,a){return a=typeof a=="function"?a:t,hn(o,v|S,a)}function hb(o,a){return a==null||Df(o,a,st(a))}function Nn(o,a){return o===a||o!==o&&a!==a}var fb=cs(Pl),gb=cs(function(o,a){return o>=a}),no=Hf(function(){return arguments}())?Hf:function(o){return ze(o)&&Ie.call(o,"callee")&&!If.call(o,"callee")},ce=R.isArray,mb=cf?Wt(cf):EE;function Dt(o){return o!=null&&vs(o.length)&&!hr(o)}function je(o){return ze(o)&&Dt(o)}function pb(o){return o===!0||o===!1||ze(o)&&kt(o)==bi}var xr=OT||vu,vb=lf?Wt(lf):SE;function yb(o){return ze(o)&&o.nodeType===1&&!Gi(o)}function Cb(o){if(o==null)return!0;if(Dt(o)&&(ce(o)||typeof o=="string"||typeof o.splice=="function"||xr(o)||Lo(o)||no(o)))return!o.length;var a=Tt(o);if(a==In||a==kn)return!o.size;if(Wi(o))return!Dl(o).length;for(var u in o)if(Ie.call(o,u))return!1;return!0}function wb(o,a){return $i(o,a)}function _b(o,a,u){u=typeof u=="function"?u:t;var h=u?u(o,a):t;return h===t?$i(o,a,t,u):!!h}function su(o){if(!ze(o))return!1;var a=kt(o);return a==Ra||a==zw||typeof o.message=="string"&&typeof o.name=="string"&&!Gi(o)}function Tb(o){return typeof o=="number"&&Rf(o)}function hr(o){if(!$e(o))return!1;var a=kt(o);return a==Oa||a==Dh||a==Kw||a==qw}function Yg(o){return typeof o=="number"&&o==de(o)}function vs(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Qe}function $e(o){var a=typeof o;return o!=null&&(a=="object"||a=="function")}function ze(o){return o!=null&&typeof o=="object"}var Jg=uf?Wt(uf):bE;function Eb(o,a){return o===a||xl(o,a,Ql(a))}function Sb(o,a,u){return u=typeof u=="function"?u:t,xl(o,a,Ql(a),u)}function Ab(o){return Qg(o)&&o!=+o}function bb(o){if(lS(o))throw new ae(s);return $f(o)}function Ib(o){return o===null}function kb(o){return o==null}function Qg(o){return typeof o=="number"||ze(o)&&kt(o)==ki}function Gi(o){if(!ze(o)||kt(o)!=ir)return!1;var a=za(o);if(a===null)return!0;var u=Ie.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&Fa.call(u)==ST}var cu=df?Wt(df):IE;function Rb(o){return Yg(o)&&o>=-Qe&&o<=Qe}var Xg=hf?Wt(hf):kE;function ys(o){return typeof o=="string"||!ce(o)&&ze(o)&&kt(o)==Oi}function Gt(o){return typeof o=="symbol"||ze(o)&&kt(o)==Na}var Lo=ff?Wt(ff):RE;function Ob(o){return o===t}function Nb(o){return ze(o)&&Tt(o)==Ni}function Pb(o){return ze(o)&&kt(o)==jw}var Mb=cs(Ll),xb=cs(function(o,a){return o<=a});function Zg(o){if(!o)return[];if(Dt(o))return ys(o)?Rn(o):xt(o);if(xi&&o[xi])return hT(o[xi]());var a=Tt(o),u=a==In?El:a==kn?Ba:Bo;return u(o)}function fr(o){if(!o)return o===0?o:0;if(o=mn(o),o===Mt||o===-Mt){var a=o<0?-1:1;return a*wt}return o===o?o:0}function de(o){var a=fr(o),u=a%1;return a===a?u?a-u:a:0}function em(o){return o?Xr(de(o),0,Kt):0}function mn(o){if(typeof o=="number")return o;if(Gt(o))return Ai;if($e(o)){var a=typeof o.valueOf=="function"?o.valueOf():o;o=$e(a)?a+"":a}if(typeof o!="string")return o===0?o:+o;o=Cf(o);var u=m_.test(o);return u||v_.test(o)?Y_(o.slice(2),u?2:8):g_.test(o)?Ai:+o}function tm(o){return Wn(o,Lt(o))}function Db(o){return o?Xr(de(o),-Qe,Qe):o===0?o:0}function be(o){return o==null?"":qt(o)}var Lb=Mo(function(o,a){if(Wi(a)||Dt(a)){Wn(a,st(a),o);return}for(var u in a)Ie.call(a,u)&&Vi(o,u,a[u])}),nm=Mo(function(o,a){Wn(a,Lt(a),o)}),Cs=Mo(function(o,a,u,h){Wn(a,Lt(a),o,h)}),Bb=Mo(function(o,a,u,h){Wn(a,st(a),o,h)}),Ub=ur(Rl);function Vb(o,a){var u=Po(o);return a==null?u:xf(u,a)}var Fb=fe(function(o,a){o=Ne(o);var u=-1,h=a.length,p=h>2?a[2]:t;for(p&&Rt(a[0],a[1],p)&&(h=1);++u<h;)for(var w=a[u],T=Lt(w),E=-1,I=T.length;++E<I;){var x=T[E],D=o[x];(D===t||Nn(D,Ro[x])&&!Ie.call(o,x))&&(o[x]=w[x])}return o}),Hb=fe(function(o){return o.push(t,Cg),zt(rm,t,o)});function $b(o,a){return mf(o,X(a,3),zn)}function Kb(o,a){return mf(o,X(a,3),Nl)}function zb(o,a){return o==null?o:Ol(o,X(a,3),Lt)}function Wb(o,a){return o==null?o:Vf(o,X(a,3),Lt)}function qb(o,a){return o&&zn(o,X(a,3))}function Gb(o,a){return o&&Nl(o,X(a,3))}function jb(o){return o==null?[]:es(o,st(o))}function Yb(o){return o==null?[]:es(o,Lt(o))}function lu(o,a,u){var h=o==null?t:Zr(o,a);return h===t?u:h}function Jb(o,a){return o!=null&&Tg(o,a,CE)}function uu(o,a){return o!=null&&Tg(o,a,wE)}var Qb=gg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Ha.call(a)),o[a]=u},hu(Bt)),Xb=gg(function(o,a,u){a!=null&&typeof a.toString!="function"&&(a=Ha.call(a)),Ie.call(o,a)?o[a].push(u):o[a]=[u]},X),Zb=fe(Hi);function st(o){return Dt(o)?Pf(o):Dl(o)}function Lt(o){return Dt(o)?Pf(o,!0):OE(o)}function eI(o,a){var u={};return a=X(a,3),zn(o,function(h,p,w){cr(u,a(h,p,w),h)}),u}function tI(o,a){var u={};return a=X(a,3),zn(o,function(h,p,w){cr(u,p,a(h,p,w))}),u}var nI=Mo(function(o,a,u){ts(o,a,u)}),rm=Mo(function(o,a,u,h){ts(o,a,u,h)}),rI=ur(function(o,a){var u={};if(o==null)return u;var h=!1;a=Ve(a,function(w){return w=Pr(w,o),h||(h=w.length>1),w}),Wn(o,Yl(o),u),h&&(u=hn(u,v|C|S,QE));for(var p=a.length;p--;)Hl(u,a[p]);return u});function oI(o,a){return om(o,ps(X(a)))}var iI=ur(function(o,a){return o==null?{}:PE(o,a)});function om(o,a){if(o==null)return{};var u=Ve(Yl(o),function(h){return[h]});return a=X(a),Yf(o,u,function(h,p){return a(h,p[0])})}function aI(o,a,u){a=Pr(a,o);var h=-1,p=a.length;for(p||(p=1,o=t);++h<p;){var w=o==null?t:o[qn(a[h])];w===t&&(h=p,w=u),o=hr(w)?w.call(o):w}return o}function sI(o,a,u){return o==null?o:Ki(o,a,u)}function cI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:Ki(o,a,u,h)}var im=vg(st),am=vg(Lt);function lI(o,a,u){var h=ce(o),p=h||xr(o)||Lo(o);if(a=X(a,4),u==null){var w=o&&o.constructor;p?u=h?new w:[]:$e(o)?u=hr(w)?Po(za(o)):{}:u={}}return(p?ln:zn)(o,function(T,E,I){return a(u,T,E,I)}),u}function uI(o,a){return o==null?!0:Hl(o,a)}function dI(o,a,u){return o==null?o:eg(o,a,zl(u))}function hI(o,a,u,h){return h=typeof h=="function"?h:t,o==null?o:eg(o,a,zl(u),h)}function Bo(o){return o==null?[]:Tl(o,st(o))}function fI(o){return o==null?[]:Tl(o,Lt(o))}function gI(o,a,u){return u===t&&(u=a,a=t),u!==t&&(u=mn(u),u=u===u?u:0),a!==t&&(a=mn(a),a=a===a?a:0),Xr(mn(o),a,u)}function mI(o,a,u){return a=fr(a),u===t?(u=a,a=0):u=fr(u),o=mn(o),_E(o,a,u)}function pI(o,a,u){if(u&&typeof u!="boolean"&&Rt(o,a,u)&&(a=u=t),u===t&&(typeof a=="boolean"?(u=a,a=t):typeof o=="boolean"&&(u=o,o=t)),o===t&&a===t?(o=0,a=1):(o=fr(o),a===t?(a=o,o=0):a=fr(a)),o>a){var h=o;o=a,a=h}if(u||o%1||a%1){var p=Of();return _t(o+p*(a-o+j_("1e-"+((p+"").length-1))),a)}return Ul(o,a)}var vI=xo(function(o,a,u){return a=a.toLowerCase(),o+(u?sm(a):a)});function sm(o){return du(be(o).toLowerCase())}function cm(o){return o=be(o),o&&o.replace(C_,sT).replace(U_,"")}function yI(o,a,u){o=be(o),a=qt(a);var h=o.length;u=u===t?h:Xr(de(u),0,h);var p=u;return u-=a.length,u>=0&&o.slice(u,p)==a}function CI(o){return o=be(o),o&&Zw.test(o)?o.replace(Uh,cT):o}function wI(o){return o=be(o),o&&i_.test(o)?o.replace(al,"\\$&"):o}var _I=xo(function(o,a,u){return o+(u?"-":"")+a.toLowerCase()}),TI=xo(function(o,a,u){return o+(u?" ":"")+a.toLowerCase()}),EI=dg("toLowerCase");function SI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;if(!a||h>=a)return o;var p=(a-h)/2;return ss(ja(p),u)+o+ss(Ga(p),u)}function AI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?o+ss(a-h,u):o}function bI(o,a,u){o=be(o),a=de(a);var h=a?Io(o):0;return a&&h<a?ss(a-h,u)+o:o}function II(o,a,u){return u||a==null?a=0:a&&(a=+a),xT(be(o).replace(sl,""),a||0)}function kI(o,a,u){return(u?Rt(o,a,u):a===t)?a=1:a=de(a),Vl(be(o),a)}function RI(){var o=arguments,a=be(o[0]);return o.length<3?a:a.replace(o[1],o[2])}var OI=xo(function(o,a,u){return o+(u?"_":"")+a.toLowerCase()});function NI(o,a,u){return u&&typeof u!="number"&&Rt(o,a,u)&&(a=u=t),u=u===t?Kt:u>>>0,u?(o=be(o),o&&(typeof a=="string"||a!=null&&!cu(a))&&(a=qt(a),!a&&bo(o))?Mr(Rn(o),0,u):o.split(a,u)):[]}var PI=xo(function(o,a,u){return o+(u?" ":"")+du(a)});function MI(o,a,u){return o=be(o),u=u==null?0:Xr(de(u),0,o.length),a=qt(a),o.slice(u,u+a.length)==a}function xI(o,a,u){var h=y.templateSettings;u&&Rt(o,a,u)&&(a=t),o=be(o),a=Cs({},a,h,yg);var p=Cs({},a.imports,h.imports,yg),w=st(p),T=Tl(p,w),E,I,x=0,D=a.interpolate||Pa,L="__p += '",K=Sl((a.escape||Pa).source+"|"+D.source+"|"+(D===Vh?f_:Pa).source+"|"+(a.evaluate||Pa).source+"|$","g"),Y="//# sourceURL="+(Ie.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++K_+"]")+`
71
+ `;o.replace(K,function(ee,me,ve,jt,Ot,Yt){return ve||(ve=jt),L+=o.slice(x,Yt).replace(w_,lT),me&&(E=!0,L+=`' +
72
72
  __e(`+me+`) +
73
73
  '`),Ot&&(I=!0,L+=`';
74
74
  `+Ot+`;
@@ -78,10 +78,10 @@ __p += '`),ve&&(L+=`' +
78
78
  `;var Z=Ie.call(a,"variable")&&a.variable;if(!Z)L=`with (obj) {
79
79
  `+L+`
80
80
  }
81
- `;else if(f_.test(Z))throw new ae(d);L=(I?L.replace(Qw,""):L).replace(Xw,"$1").replace(Zw,"$1;"),L="function("+(Z||"obj")+`) {
81
+ `;else if(d_.test(Z))throw new ae(d);L=(I?L.replace(Yw,""):L).replace(Jw,"$1").replace(Qw,"$1;"),L="function("+(Z||"obj")+`) {
82
82
  `+(Z?"":`obj || (obj = {});
83
83
  `)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
84
84
  function print() { __p += __j.call(arguments, '') }
85
85
  `:`;
86
86
  `)+L+`return __p
87
- }`;var he=hm(function(){return Se(w,Y+"return "+L).apply(t,T)});if(he.source=L,du(he))throw he;return he}function BI(o){return be(o).toLowerCase()}function UI(o){return be(o).toUpperCase()}function VI(o,a,u){if(o=be(o),o&&(u||a===t))return _f(o);if(!o||!(a=qt(a)))return o;var h=kn(o),p=kn(a),w=Tf(h,p),T=Ef(h,p)+1;return Mr(h,w,T).join("")}function FI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,Af(o)+1);if(!o||!(a=qt(a)))return o;var h=kn(o),p=Ef(h,kn(a))+1;return Mr(h,0,p).join("")}function HI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(dl,"");if(!o||!(a=qt(a)))return o;var h=kn(o),p=Tf(h,kn(a));return Mr(h,p).join("")}function $I(o,a){var u=j,h=q;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?qt(a.omission):h}o=be(o);var w=o.length;if(bo(o)){var T=kn(o);w=T.length}if(u>=w)return o;var E=u-Io(h);if(E<1)return h;var I=T?Mr(T,0,E).join(""):o.slice(0,E);if(p===t)return I+h;if(T&&(E+=I.length-E),hu(p)){if(o.slice(E).search(p)){var x,D=I;for(p.global||(p=kl(p.source,be($h.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?E:L)}}else if(o.indexOf(qt(p),E)!=E){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function KI(o){return o=be(o),o&&e_.test(o)?o.replace(Vh,yT):o}var zI=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),mu=fg("toUpperCase");function dm(o,a,u){return o=be(o),a=u?t:a,a===t?fT(o)?_T(o):oT(o):o.match(a)||[]}var hm=fe(function(o,a){try{return zt(o,t,a)}catch(u){return du(u)?u:new ae(u)}}),WI=ur(function(o,a){return ln(a,function(u){u=qn(u),cr(o,u,lu(o[u],o))}),o});function qI(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new un(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var w=o[p];if(zt(w[0],this,h))return zt(w[1],this,h)}})}function GI(o){return yE(hn(o,v))}function pu(o){return function(){return o}}function jI(o,a){return o==null||o!==o?a:o}var YI=mg(),JI=mg(!0);function Bt(o){return o}function vu(o){return Wf(typeof o=="function"?o:hn(o,v))}function QI(o){return Gf(hn(o,v))}function XI(o,a){return jf(o,hn(a,v))}var ZI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),ek=fe(function(o,a){return function(u){return Hi(o,u,a)}});function yu(o,a,u){var h=st(a),p=ns(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=ns(a,st(a)));var w=!($e(u)&&"chain"in u)||!!u.chain,T=hr(o);return ln(p,function(E){var I=a[E];o[E]=I,T&&(o.prototype[E]=function(){var x=this.__chain__;if(w||x){var D=o(this.__wrapped__),L=D.__actions__=xt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,Ir([this.value()],arguments))})}),o}function tk(){return ht._===this&&(ht._=IT),this}function Cu(){}function nk(o){return o=de(o),fe(function(a){return Yf(a,o)})}var rk=Jl(Ve),ok=Jl(pf),ik=Jl(_l);function fm(o){return ru(o)?Tl(qn(o)):DE(o)}function ak(o){return function(a){return o==null?t:Zr(o,a)}}var sk=vg(),ck=vg(!0);function wu(){return[]}function _u(){return!1}function lk(){return{}}function uk(){return""}function dk(){return!0}function hk(o,a){if(o=de(o),o<1||o>Qe)return[];var u=Kt,h=_t(o,Kt);a=X(a),o-=Kt;for(var p=Al(h,a);++u<o;)a(u);return p}function fk(o){return ce(o)?Ve(o,qn):Gt(o)?[o]:xt(Mg(be(o)))}function gk(o){var a=++AT;return be(o)+a}var mk=cs(function(o,a){return o+a},0),pk=Ql("ceil"),vk=cs(function(o,a){return o/a},1),yk=Ql("floor");function Ck(o){return o&&o.length?ts(o,Bt,Ll):t}function wk(o,a){return o&&o.length?ts(o,X(a,2),Ll):t}function _k(o){return Cf(o,Bt)}function Tk(o,a){return Cf(o,X(a,2))}function Ek(o){return o&&o.length?ts(o,Bt,Fl):t}function Sk(o,a){return o&&o.length?ts(o,X(a,2),Fl):t}var Ak=cs(function(o,a){return o*a},1),bk=Ql("round"),Ik=cs(function(o,a){return o-a},0);function kk(o){return o&&o.length?Sl(o,Bt):0}function Rk(o,a){return o&&o.length?Sl(o,X(a,2)):0}return y.after=QA,y.ary=zg,y.assign=Ub,y.assignIn=om,y.assignInWith=_s,y.assignWith=Vb,y.at=Fb,y.before=Wg,y.bind=lu,y.bindAll=WI,y.bindKey=qg,y.castArray=lb,y.chain=Hg,y.chunk=yS,y.compact=CS,y.concat=wS,y.cond=qI,y.conforms=GI,y.constant=pu,y.countBy=kA,y.create=Hb,y.curry=Gg,y.curryRight=jg,y.debounce=Yg,y.defaults=$b,y.defaultsDeep=Kb,y.defer=XA,y.delay=ZA,y.difference=_S,y.differenceBy=TS,y.differenceWith=ES,y.drop=SS,y.dropRight=AS,y.dropRightWhile=bS,y.dropWhile=IS,y.fill=kS,y.filter=OA,y.flatMap=MA,y.flatMapDeep=xA,y.flatMapDepth=DA,y.flatten=Bg,y.flattenDeep=RS,y.flattenDepth=OS,y.flip=eb,y.flow=YI,y.flowRight=JI,y.fromPairs=NS,y.functions=Jb,y.functionsIn=Qb,y.groupBy=LA,y.initial=MS,y.intersection=xS,y.intersectionBy=DS,y.intersectionWith=LS,y.invert=Zb,y.invertBy=eI,y.invokeMap=UA,y.iteratee=vu,y.keyBy=VA,y.keys=st,y.keysIn=Lt,y.map=ms,y.mapKeys=nI,y.mapValues=rI,y.matches=QI,y.matchesProperty=XI,y.memoize=vs,y.merge=oI,y.mergeWith=im,y.method=ZI,y.methodOf=ek,y.mixin=yu,y.negate=ys,y.nthArg=nk,y.omit=iI,y.omitBy=aI,y.once=tb,y.orderBy=FA,y.over=rk,y.overArgs=nb,y.overEvery=ok,y.overSome=ik,y.partial=uu,y.partialRight=Jg,y.partition=HA,y.pick=sI,y.pickBy=am,y.property=fm,y.propertyOf=ak,y.pull=FS,y.pullAll=Vg,y.pullAllBy=HS,y.pullAllWith=$S,y.pullAt=KS,y.range=sk,y.rangeRight=ck,y.rearg=rb,y.reject=zA,y.remove=zS,y.rest=ob,y.reverse=su,y.sampleSize=qA,y.set=lI,y.setWith=uI,y.shuffle=GA,y.slice=WS,y.sortBy=JA,y.sortedUniq=XS,y.sortedUniqBy=ZS,y.split=MI,y.spread=ib,y.tail=eA,y.take=tA,y.takeRight=nA,y.takeRightWhile=rA,y.takeWhile=oA,y.tap=CA,y.throttle=ab,y.thru=gs,y.toArray=tm,y.toPairs=sm,y.toPairsIn=cm,y.toPath=fk,y.toPlainObject=rm,y.transform=dI,y.unary=sb,y.union=iA,y.unionBy=aA,y.unionWith=sA,y.uniq=cA,y.uniqBy=lA,y.uniqWith=uA,y.unset=hI,y.unzip=cu,y.unzipWith=Fg,y.update=fI,y.updateWith=gI,y.values=Bo,y.valuesIn=mI,y.without=dA,y.words=dm,y.wrap=cb,y.xor=hA,y.xorBy=fA,y.xorWith=gA,y.zip=mA,y.zipObject=pA,y.zipObjectDeep=vA,y.zipWith=yA,y.entries=sm,y.entriesIn=cm,y.extend=om,y.extendWith=_s,yu(y,y),y.add=mk,y.attempt=hm,y.camelCase=CI,y.capitalize=lm,y.ceil=pk,y.clamp=pI,y.clone=ub,y.cloneDeep=hb,y.cloneDeepWith=fb,y.cloneWith=db,y.conformsTo=gb,y.deburr=um,y.defaultTo=jI,y.divide=vk,y.endsWith=wI,y.eq=On,y.escape=_I,y.escapeRegExp=TI,y.every=RA,y.find=NA,y.findIndex=Dg,y.findKey=zb,y.findLast=PA,y.findLastIndex=Lg,y.findLastKey=Wb,y.floor=yk,y.forEach=$g,y.forEachRight=Kg,y.forIn=qb,y.forInRight=Gb,y.forOwn=jb,y.forOwnRight=Yb,y.get=fu,y.gt=mb,y.gte=pb,y.has=Xb,y.hasIn=gu,y.head=Ug,y.identity=Bt,y.includes=BA,y.indexOf=PS,y.inRange=vI,y.invoke=tI,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=vb,y.isArrayLike=Dt,y.isArrayLikeObject=je,y.isBoolean=yb,y.isBuffer=xr,y.isDate=Cb,y.isElement=wb,y.isEmpty=_b,y.isEqual=Tb,y.isEqualWith=Eb,y.isError=du,y.isFinite=Sb,y.isFunction=hr,y.isInteger=Qg,y.isLength=Cs,y.isMap=Xg,y.isMatch=Ab,y.isMatchWith=bb,y.isNaN=Ib,y.isNative=kb,y.isNil=Ob,y.isNull=Rb,y.isNumber=Zg,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=hu,y.isSafeInteger=Nb,y.isSet=em,y.isString=ws,y.isSymbol=Gt,y.isTypedArray=Lo,y.isUndefined=Pb,y.isWeakMap=Mb,y.isWeakSet=xb,y.join=BS,y.kebabCase=EI,y.last=gn,y.lastIndexOf=US,y.lowerCase=SI,y.lowerFirst=AI,y.lt=Db,y.lte=Lb,y.max=Ck,y.maxBy=wk,y.mean=_k,y.meanBy=Tk,y.min=Ek,y.minBy=Sk,y.stubArray=wu,y.stubFalse=_u,y.stubObject=lk,y.stubString=uk,y.stubTrue=dk,y.multiply=Ak,y.nth=VS,y.noConflict=tk,y.noop=Cu,y.now=ps,y.pad=bI,y.padEnd=II,y.padStart=kI,y.parseInt=RI,y.random=yI,y.reduce=$A,y.reduceRight=KA,y.repeat=OI,y.replace=NI,y.result=cI,y.round=bk,y.runInContext=b,y.sample=WA,y.size=jA,y.snakeCase=PI,y.some=YA,y.sortedIndex=qS,y.sortedIndexBy=GS,y.sortedIndexOf=jS,y.sortedLastIndex=YS,y.sortedLastIndexBy=JS,y.sortedLastIndexOf=QS,y.startCase=xI,y.startsWith=DI,y.subtract=Ik,y.sum=kk,y.sumBy=Rk,y.template=LI,y.times=hk,y.toFinite=fr,y.toInteger=de,y.toLength=nm,y.toLower=BI,y.toNumber=mn,y.toSafeInteger=Bb,y.toString=be,y.toUpper=UI,y.trim=VI,y.trimEnd=FI,y.trimStart=HI,y.truncate=$I,y.unescape=KI,y.uniqueId=gk,y.upperCase=zI,y.upperFirst=mu,y.each=$g,y.eachRight=Kg,y.first=Ug,yu(y,function(){var o={};return zn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,ln(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),ln(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=_t(u,h.__takeCount__):h.__views__.push({size:_t(u,Kt),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),ln(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==sn;pe.prototype[o]=function(p){var w=this.clone();return w.__iteratees__.push({iteratee:X(p,3),type:u}),w.__filtered__=w.__filtered__||h,w}}),ln(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),ln(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Bt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(u){return Hi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(ys(X(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take(Kt)},zn(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=y[h?"take"+(a=="last"?"Right":""):a],w=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,E=h?[1]:arguments,I=T instanceof pe,x=E[0],D=I||ce(T),L=function(me){var ve=p.apply(y,Ir([me],E));return h&&K?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(I=D=!1);var K=this.__chain__,Y=!!this.__actions__.length,Z=w&&!K,he=I&&!Y;if(!w&&D){T=he?T:new pe(this);var ee=o.apply(T,E);return ee.__actions__.push({func:gs,args:[L],thisArg:t}),new dn(ee,K)}return Z&&he?o.apply(this,E):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),ln(["pop","push","shift","sort","splice","unshift"],function(o){var a=Fa[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return a.apply(ce(w)?w:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),zn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(No,h)||(No[h]=[]),No[h].push({name:a,func:u})}}),No[ss(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=KT,pe.prototype.reverse=zT,pe.prototype.value=WT,y.prototype.at=wA,y.prototype.chain=_A,y.prototype.commit=TA,y.prototype.next=EA,y.prototype.plant=AA,y.prototype.reverse=bA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=IA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=SA),y},ko=TT();jr?((jr.exports=ko)._=ko,vl._=ko):ht._=ko}).call(qB)}(na,na.exports)),na.exports}var Ti=GB();const ec=WB(Ti),{scope:Yp}=Zc();function jB(){const r=Lh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Yp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Yp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ei(r){const e=jB();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function YB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Hn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Fr=YB();function JB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Hn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Hr=JB();function QB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Hn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const en=QB();async function XB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Si(r,e,t=[]){const n=eU(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>ZB(s,i,t))}function ZB(r,e,t){return t.some(n=>{const i=ec.get(r,n);if(ec.isNil(i))return!1;const s=ec.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function eU(r){return ec.trim(r).toLowerCase().replace(/\s+/g," ")}let Bs=!1;const Ju=c.ref(!1),pn=c.ref([]),Jp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Uw=()=>{const r=Hn(),e=async _=>{Ju.value=!0;const A=_?`_active eq true and ${_}`:"_active eq true",O=await Fr.getOrgList(A);O&&(pn.value=O,Bs=!0),Ju.value=!1},t=async _=>{var A;return(A=pn.value)!=null&&A.length||await e(_),pn.value};function n(_){if(!pn.value)throw new Error("Data not stored yet");const A=Si(pn.value,_,["name","description"]);return _!==""?A:pn.value}const i=_=>{Jp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Fr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Fr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),Bs&&pn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Fr.updateOrg(We.value);if(Bs&&(_!=null&&_.data.__id)){const A=pn.value.findIndex(O=>O.__id===_.data.__id);return A!==-1?(pn.value[A]=_.data,r.success("Organization updated.")):r.error("Unable to update item"),ie.value=!1,_.data}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,We.value&&We.value.created_at){if(await Fr.deactivateOrg(We.value.__id),Bs){const _=pn.value.findIndex(A=>{var O;return A.__id===((O=We.value)==null?void 0:O.__id)});if(_!==-1)return pn.value.splice(_,1),We.value;r.error("Unable to deactivate organization")}ie.value=!1}};async function m(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await Hr.updateBranch(A)){ie.value=!1;return}if(qo.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Branch added successfully."),qo.value.push(A),A;r.info("Branch already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function v(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await Hr.updateBranch(A)){ie.value=!1;return}const $=qo.value.findIndex(V=>V.__id===_.__id);if($!==-1)return qo.value.splice($,1),ie.value=!1,qo.value;throw new Error("Item not found to remove")}ie.value=!1}async function C(_){ie.value=!0;try{if(We.value&&We.value.__id){const A={..._,organization:We.value.__id};if(!await en.updateTeam(A)){ie.value=!1;return}if(Go.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Team added successfully."),Go.value.push(A),A;r.info("Team already added.")}}catch(A){console.error(A)}finally{ie.value=!1}}async function S(_){if(ie.value=!0,We.value&&We.value.__id){const A={..._,organization:null};if(!await en.updateTeam(A)){ie.value=!1;return}const $=Go.value.findIndex(V=>V.__id===_.__id);if($!==-1)return Go.value.splice($,1),ie.value=!1,Go.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:Ju,columns:Jp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:qo,orgTeams:Go,linkBranch:m,unlinkBranch:v,linkTeam:C,unlinkTeam:S}};let Us=!1;const vn=c.ref([]),Qp=c.ref([]),ot=c.ref(null),Qu=c.ref(!1),jo=c.ref([]),Vw=()=>{const r=Hn(),e=async C=>{Qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await en.getTeamList(S);_&&(vn.value=_,Us=!0),Qu.value=!1},t=async C=>(vn.value.length||await e(C),vn.value);function n(C){if(!vn.value)throw new Error("Data not stored yet");const S=Si(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{Qp.value=C},s=C=>{ot.value=Ti.cloneDeep(C)},l=async C=>await en.getTeam(C),d=async()=>{if(ot.value!=null){const C=await en.createTeam(ot.value);return C!=null&&C.data.created_at&&(r.success("Team created."),Us&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const C=await en.updateTeam(ot.value);if(Us&&(C!=null&&C.data.__id)){const S=vn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(vn.value[S]=C.data,r.success("Team updated.")):r.error("Unable to update item"),C.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await en.deactivateTeam(ot.value.__id),Us)){const C=vn.value.findIndex(S=>{var _;return S.__id===((_=ot.value)==null?void 0:_.__id)});if(C!==-1)return vn.value.splice(C,1),ot.value;r.error("Unable to deactivate organization")}};async function m(C){var S;if(ie.value=!0,(S=ot.value)!=null&&S.__id)if(jo.value.findIndex(A=>A.__id===C.__id)===-1)try{const A=await en.linkManageUser(ot.value.__id,{team:ot.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),O=await en.getTeamUserList(ot.value.__id);return O&&(jo.value=O),r.success("User added successfully."),A}catch(A){console.error(A),r.error("Unable to add User.")}finally{ie.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");ie.value=!1}async function v(C){if(ie.value=!0,ot.value&&ot.value.__id){const S=jo.value.findIndex(_=>_.__id===C);if(S!==-1)return await en.unlinkManageUser(ot.value.__id,C),jo.value.splice(S,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:vn,loading:Qu,columns:Qp,item:ot,usersTeam:jo,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:v}},Fw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var A,O,$;const{openDialog:e}=wa("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Zc(),{getData:l,data:d}=Uw(),{getData:f,data:g}=Vw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const v=c.ref({scope_type:(A=n.value)==null?void 0:A.scope_type,organization:((O=n.value)==null?void 0:O.organization)??"org",team:($=n.value)==null?void 0:$.team});function C(){var V,U,Q;v.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((U=n.value)==null?void 0:U.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const S=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return B1;case"org":return D1;case"team":return U1;default:return L1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(v.value)}return(V,U)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Be.VBtn,{onClick:C,icon:"",class:"text-secondary ms-2",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(S.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(Ta),{loading:m.value,title:"Scope","dd-id":"global-scope__J-","on-save":_},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(_e.VRow,null,{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>U[3]||(U[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>U[4]||(U[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>U[5]||(U[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(xk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:v.value.scope_type,"onUpdate:modelValue":U[0]||(U[0]=Q=>v.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>U[6]||(U[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Be.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>U[7]||(U[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Be.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>U[8]||(U[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Be.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>U[9]||(U[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(ha.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[10]||(U[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ra.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:v.value.organization,"onUpdate:modelValue":U[1]||(U[1]=Q=>v.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ha.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[11]||(U[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ra.VSelect,{items:c.unref(g),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:v.value.team,"onUpdate:modelValue":U[2]||(U[2]=Q=>v.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),tU={},nU={class:"double-ring-spinner-container"};function rU(r,e){return c.openBlock(),c.createElementBlock("div",nU,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Hw=vi(tU,[["render",rU],["__scopeId","data-v-00d7a69f"]]),oU={key:0,class:"_jspinner-overlay_jj"},$w=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",oU,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),iU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:qv,ColumnSettingsDialog:zd,ConfirmDialog:zv,ContextMenu:Gv,CopyButton:Tc,DeleteAllBtn:Vd,DotsMenu:$v,DotsMenuV1:Kv,EditButton:Vv,FormHeadless:Ay,FormMetadata:Nc,GlobalScopeFilter:Fw,GlobalSpinner:$w,JAvatar:Wv,JBtn:sv,JDialog:Ta,JForm:Ey,JIconBtn:av,JSelect:Cy,JTextArea:wy,JTextField:yy,ParentCard:Ic,SpinnerLoader:Hw,TabFormHeader:Sy,TableAdvanced:ey,TableCard:Wd,TableCardsView:py,TableHeader:ny,UiTable:jv},Symbol.toStringTag,{value:"Module"})),aU=lR(),sU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let Xu=!1;const Zu=c.ref(!1),yn=c.ref([]),Xp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),cU=()=>{const r=Hn(),e=async C=>{Zu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await Hr.getBranchList(S);_&&(yn.value=_,Xu=!0),Zu.value=!1},t=async C=>(yn.value.length||await e(C),yn.value);function n(C){if(!yn.value)throw new Error("Data not stored yet");const S=Si(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{Xp.value=C},s=C=>{gt.value=Ti.cloneDeep(C)},l=async C=>await Hr.getBranch(C),d=async()=>{if(gt.value!=null){const C=await Hr.createBranch(gt.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),Xu&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(gt.value&&gt.value.__id){const C=await Hr.updateBranch(gt.value);if(Xu&&C){const S=yn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(yn.value[S]=C.data,r.success("Branch updated.")):r.error("Unable to update item"),C}}else r.error("Unable to update item")},g=async()=>{if(gt.value&&gt.value.created_at){await Hr.deactivateBranch(gt.value.__id);const C=yn.value.findIndex(S=>{var _;return S.__id===((_=gt.value)==null?void 0:_.__id)});if(C!==-1)return yn.value.splice(C,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(C){ie.value=!0;try{if(gt.value&&gt.value.__id){const S={...C,branch:gt.value.__id};if(!await en.updateTeam(S)){r.error("Unable to link team");return}if(Yo.value.findIndex(O=>O.__id===C.__id)===-1)return r.success("Team added successfully."),Yo.value.push(S),S;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,gt.value&&gt.value.__id){const S={...C,branch:null};if(!await en.updateTeam(S))return;const A=Yo.value.findIndex(O=>O.__id===C.__id);if(A!==-1)return Yo.value.splice(A,1),ie.value=!1,Yo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:yn,columns:Xp,item:gt,loading:Zu,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:v}};function lU(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Hn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ti=lU();let ed=!1;const td=c.ref(!1),Cn=c.ref([]),Zp=c.ref([]),mt=c.ref(null),Jo=c.ref([]),uU=()=>{const r=Hn(),e=async C=>{td.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await ti.getDivisionList(S);_&&(Cn.value=_,ed=!0),td.value=!1},t=async C=>(Cn.value.length||await e(C),Cn.value);function n(C){if(!Cn.value)throw new Error("Data not stored yet");const S=Si(Cn.value,C,["name","description"]);return C!==""?S:Cn.value}const i=C=>{Zp.value=C},s=C=>{mt.value=Ti.cloneDeep(C)},l=async C=>await ti.getDivision(C),d=async()=>{if(mt.value!=null){const C=await ti.createDivision(mt.value);return C!=null&&C.data.created_at&&(r.success("Division created."),ed&&Cn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const C=await ti.updateDivision(mt.value);if(ed&&(C!=null&&C.data.__id)){const S=Cn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(Cn.value[S]=C.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,C}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,mt.value&&mt.value.created_at){await ti.deactivateDivision(mt.value.__id);const C=Cn.value.findIndex(S=>{var _;return S.__id===((_=mt.value)==null?void 0:_.__id)});if(C!==-1)return Cn.value.splice(C,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(C){ie.value=!0;try{if(mt.value&&mt.value.__id){const S={...C,division:mt.value.__id};return await Fr.updateOrg(S)?(Jo.value.findIndex(O=>O.__id===C.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(S)):r.info("Organization already added."),S):void 0}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,mt.value&&mt.value.__id){const S={...C,division:null};if(!await Fr.updateOrg(S))return;const A=Jo.value.findIndex(O=>O.__id===C.__id);if(A!==-1)Jo.value.splice(A,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ie.value=!1,Jo.value}return{data:Cn,columns:Zp,item:mt,loading:td,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:v}};function dU(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Hn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ni=dU();let nd=!1,rd=c.ref(!1);const wn=c.ref([]),ev=c.ref([]),_n=c.ref(null),hU=c.ref(null),fU=c.ref([]),gU=()=>{const r=Hn(),e=async m=>{rd.value=!0;const v=m?`_active eq true and ${m}`:"_active eq true",C=await ni.getManageUserList(v);C&&(wn.value=C,nd=!0),rd.value=!1},t=async m=>(wn.value.length||await e(m),wn.value);function n(m){if(!wn.value)throw new Error("Data not stored yet");const v=Si(wn.value,m,["name","description"]);return m!==""?v:wn.value}return{data:wn,loading:rd,columns:ev,item:_n,filterData:n,__init__:e,getData:t,setColumns:m=>{ev.value=m},setItem:m=>{_n.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(_n.value!=null){const m=crypto.randomUUID(),v=await ni.createManageUser({..._n.value,__id:m});return v!=null&&v.data.created_at&&(r.success("User created."),nd&&wn.value.push(v.data)),v==null?void 0:v.data}},updateItem:async()=>{if(ie.value=!0,_n.value&&_n.value.created_at){const m=await ni.updateManageUser(_n.value);if(nd&&(m!=null&&m.data)){const v=wn.value.findIndex(C=>C.__id===(m==null?void 0:m.data.__id));if(v!==-1)wn.value[v]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ie.value=!1,m==null?void 0:m.data}},removeItem:async()=>{if(_n.value&&_n.value.created_at){try{await ni.deactivateManageUser(_n.value.__id)}catch{r.error("Unable to deactivate user");return}const m=wn.value.findIndex(v=>{var C;return v.__id===((C=_n.value)==null?void 0:C.__id)});if(m!==-1)return wn.value.splice(m,1),_n.value}},userOrg:hU,userTeams:fU}},mU=r=>{r.use(aU),r.use(dO,sU),Object.entries(iU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(Lk).forEach(([e,t])=>{r.provide(e,t)})},pU={install:mU};exports.ContextMenu=Gv;exports.EventBus=Ac;exports.FormHeadless=Ay;exports.HttpCore=XB;exports.SpinnerLoader=Hw;exports.TableCardsView=py;exports.TableHeader=ny;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=jv;exports._sfc_main$1=ey;exports._sfc_main$10=Vd;exports._sfc_main$11=Vv;exports._sfc_main$12=Ta;exports._sfc_main$13=av;exports._sfc_main$14=Cy;exports._sfc_main$15=wy;exports._sfc_main$16=yy;exports._sfc_main$17=Ey;exports._sfc_main$18=Sy;exports._sfc_main$19=Ic;exports._sfc_main$2=zd;exports._sfc_main$20=Wv;exports._sfc_main$21=qv;exports._sfc_main$22=Fw;exports._sfc_main$23=$w;exports._sfc_main$3=Wd;exports._sfc_main$4=zv;exports._sfc_main$5=Tc;exports._sfc_main$6=$v;exports._sfc_main$7=Kv;exports._sfc_main$8=Nc;exports._sfc_main$9=sv;exports.branchInstance=Hr;exports.coreClient=Lh;exports.createToastInterface=ma;exports.dateFormat=Zv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=Ud;exports.index=pU;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Fr;exports.provideToast=uO;exports.scopedClient=Ei;exports.setupAuthGuard=zB;exports.teamInstance=en;exports.toastInjectionKey=bc;exports.useAuth=qc;exports.useBranchStore=cU;exports.useCustomizer=gR;exports.useDialog=wa;exports.useDivisionStore=uU;exports.useManageUserStore=gU;exports.useOrganizationStore=Uw;exports.useSession=Zc;exports.useTeamStore=Vw;exports.useToast=Hn;
87
+ }`;var he=um(function(){return Se(w,Y+"return "+L).apply(t,T)});if(he.source=L,su(he))throw he;return he}function DI(o){return be(o).toLowerCase()}function LI(o){return be(o).toUpperCase()}function BI(o,a,u){if(o=be(o),o&&(u||a===t))return Cf(o);if(!o||!(a=qt(a)))return o;var h=Rn(o),p=Rn(a),w=wf(h,p),T=_f(h,p)+1;return Mr(h,w,T).join("")}function UI(o,a,u){if(o=be(o),o&&(u||a===t))return o.slice(0,Ef(o)+1);if(!o||!(a=qt(a)))return o;var h=Rn(o),p=_f(h,Rn(a))+1;return Mr(h,0,p).join("")}function VI(o,a,u){if(o=be(o),o&&(u||a===t))return o.replace(sl,"");if(!o||!(a=qt(a)))return o;var h=Rn(o),p=wf(h,Rn(a));return Mr(h,p).join("")}function FI(o,a){var u=j,h=q;if($e(a)){var p="separator"in a?a.separator:p;u="length"in a?de(a.length):u,h="omission"in a?qt(a.omission):h}o=be(o);var w=o.length;if(bo(o)){var T=Rn(o);w=T.length}if(u>=w)return o;var E=u-Io(h);if(E<1)return h;var I=T?Mr(T,0,E).join(""):o.slice(0,E);if(p===t)return I+h;if(T&&(E+=I.length-E),cu(p)){if(o.slice(E).search(p)){var x,D=I;for(p.global||(p=Sl(p.source,be(Fh.exec(p))+"g")),p.lastIndex=0;x=p.exec(D);)var L=x.index;I=I.slice(0,L===t?E:L)}}else if(o.indexOf(qt(p),E)!=E){var K=I.lastIndexOf(p);K>-1&&(I=I.slice(0,K))}return I+h}function HI(o){return o=be(o),o&&Xw.test(o)?o.replace(Bh,pT):o}var $I=xo(function(o,a,u){return o+(u?" ":"")+a.toUpperCase()}),du=dg("toUpperCase");function lm(o,a,u){return o=be(o),a=u?t:a,a===t?dT(o)?CT(o):nT(o):o.match(a)||[]}var um=fe(function(o,a){try{return zt(o,t,a)}catch(u){return su(u)?u:new ae(u)}}),KI=ur(function(o,a){return ln(a,function(u){u=qn(u),cr(o,u,iu(o[u],o))}),o});function zI(o){var a=o==null?0:o.length,u=X();return o=a?Ve(o,function(h){if(typeof h[1]!="function")throw new un(l);return[u(h[0]),h[1]]}):[],fe(function(h){for(var p=-1;++p<a;){var w=o[p];if(zt(w[0],this,h))return zt(w[1],this,h)}})}function WI(o){return pE(hn(o,v))}function hu(o){return function(){return o}}function qI(o,a){return o==null||o!==o?a:o}var GI=fg(),jI=fg(!0);function Bt(o){return o}function fu(o){return Kf(typeof o=="function"?o:hn(o,v))}function YI(o){return Wf(hn(o,v))}function JI(o,a){return qf(o,hn(a,v))}var QI=fe(function(o,a){return function(u){return Hi(u,o,a)}}),XI=fe(function(o,a){return function(u){return Hi(o,u,a)}});function gu(o,a,u){var h=st(a),p=es(a,h);u==null&&!($e(a)&&(p.length||!h.length))&&(u=a,a=o,o=this,p=es(a,st(a)));var w=!($e(u)&&"chain"in u)||!!u.chain,T=hr(o);return ln(p,function(E){var I=a[E];o[E]=I,T&&(o.prototype[E]=function(){var x=this.__chain__;if(w||x){var D=o(this.__wrapped__),L=D.__actions__=xt(this.__actions__);return L.push({func:I,args:arguments,thisArg:o}),D.__chain__=x,D}return I.apply(o,Ir([this.value()],arguments))})}),o}function ZI(){return ht._===this&&(ht._=AT),this}function mu(){}function ek(o){return o=de(o),fe(function(a){return Gf(a,o)})}var tk=ql(Ve),nk=ql(gf),rk=ql(vl);function dm(o){return Zl(o)?yl(qn(o)):ME(o)}function ok(o){return function(a){return o==null?t:Zr(o,a)}}var ik=mg(),ak=mg(!0);function pu(){return[]}function vu(){return!1}function sk(){return{}}function ck(){return""}function lk(){return!0}function uk(o,a){if(o=de(o),o<1||o>Qe)return[];var u=Kt,h=_t(o,Kt);a=X(a),o-=Kt;for(var p=_l(h,a);++u<o;)a(u);return p}function dk(o){return ce(o)?Ve(o,qn):Gt(o)?[o]:xt(Ng(be(o)))}function hk(o){var a=++ET;return be(o)+a}var fk=as(function(o,a){return o+a},0),gk=Gl("ceil"),mk=as(function(o,a){return o/a},1),pk=Gl("floor");function vk(o){return o&&o.length?Za(o,Bt,Pl):t}function yk(o,a){return o&&o.length?Za(o,X(a,2),Pl):t}function Ck(o){return vf(o,Bt)}function wk(o,a){return vf(o,X(a,2))}function _k(o){return o&&o.length?Za(o,Bt,Ll):t}function Tk(o,a){return o&&o.length?Za(o,X(a,2),Ll):t}var Ek=as(function(o,a){return o*a},1),Sk=Gl("round"),Ak=as(function(o,a){return o-a},0);function bk(o){return o&&o.length?wl(o,Bt):0}function Ik(o,a){return o&&o.length?wl(o,X(a,2)):0}return y.after=YA,y.ary=$g,y.assign=Lb,y.assignIn=nm,y.assignInWith=Cs,y.assignWith=Bb,y.at=Ub,y.before=Kg,y.bind=iu,y.bindAll=KI,y.bindKey=zg,y.castArray=sb,y.chain=Vg,y.chunk=pS,y.compact=vS,y.concat=yS,y.cond=zI,y.conforms=WI,y.constant=hu,y.countBy=bA,y.create=Vb,y.curry=Wg,y.curryRight=qg,y.debounce=Gg,y.defaults=Fb,y.defaultsDeep=Hb,y.defer=JA,y.delay=QA,y.difference=CS,y.differenceBy=wS,y.differenceWith=_S,y.drop=TS,y.dropRight=ES,y.dropRightWhile=SS,y.dropWhile=AS,y.fill=bS,y.filter=kA,y.flatMap=NA,y.flatMapDeep=PA,y.flatMapDepth=MA,y.flatten=Dg,y.flattenDeep=IS,y.flattenDepth=kS,y.flip=XA,y.flow=GI,y.flowRight=jI,y.fromPairs=RS,y.functions=jb,y.functionsIn=Yb,y.groupBy=xA,y.initial=NS,y.intersection=PS,y.intersectionBy=MS,y.intersectionWith=xS,y.invert=Qb,y.invertBy=Xb,y.invokeMap=LA,y.iteratee=fu,y.keyBy=BA,y.keys=st,y.keysIn=Lt,y.map=fs,y.mapKeys=eI,y.mapValues=tI,y.matches=YI,y.matchesProperty=JI,y.memoize=ms,y.merge=nI,y.mergeWith=rm,y.method=QI,y.methodOf=XI,y.mixin=gu,y.negate=ps,y.nthArg=ek,y.omit=rI,y.omitBy=oI,y.once=ZA,y.orderBy=UA,y.over=tk,y.overArgs=eb,y.overEvery=nk,y.overSome=rk,y.partial=au,y.partialRight=jg,y.partition=VA,y.pick=iI,y.pickBy=om,y.property=dm,y.propertyOf=ok,y.pull=US,y.pullAll=Bg,y.pullAllBy=VS,y.pullAllWith=FS,y.pullAt=HS,y.range=ik,y.rangeRight=ak,y.rearg=tb,y.reject=$A,y.remove=$S,y.rest=nb,y.reverse=ru,y.sampleSize=zA,y.set=sI,y.setWith=cI,y.shuffle=WA,y.slice=KS,y.sortBy=jA,y.sortedUniq=JS,y.sortedUniqBy=QS,y.split=NI,y.spread=rb,y.tail=XS,y.take=ZS,y.takeRight=eA,y.takeRightWhile=tA,y.takeWhile=nA,y.tap=vA,y.throttle=ob,y.thru=hs,y.toArray=Zg,y.toPairs=im,y.toPairsIn=am,y.toPath=dk,y.toPlainObject=tm,y.transform=lI,y.unary=ib,y.union=rA,y.unionBy=oA,y.unionWith=iA,y.uniq=aA,y.uniqBy=sA,y.uniqWith=cA,y.unset=uI,y.unzip=ou,y.unzipWith=Ug,y.update=dI,y.updateWith=hI,y.values=Bo,y.valuesIn=fI,y.without=lA,y.words=lm,y.wrap=ab,y.xor=uA,y.xorBy=dA,y.xorWith=hA,y.zip=fA,y.zipObject=gA,y.zipObjectDeep=mA,y.zipWith=pA,y.entries=im,y.entriesIn=am,y.extend=nm,y.extendWith=Cs,gu(y,y),y.add=fk,y.attempt=um,y.camelCase=vI,y.capitalize=sm,y.ceil=gk,y.clamp=gI,y.clone=cb,y.cloneDeep=ub,y.cloneDeepWith=db,y.cloneWith=lb,y.conformsTo=hb,y.deburr=cm,y.defaultTo=qI,y.divide=mk,y.endsWith=yI,y.eq=Nn,y.escape=CI,y.escapeRegExp=wI,y.every=IA,y.find=RA,y.findIndex=Mg,y.findKey=$b,y.findLast=OA,y.findLastIndex=xg,y.findLastKey=Kb,y.floor=pk,y.forEach=Fg,y.forEachRight=Hg,y.forIn=zb,y.forInRight=Wb,y.forOwn=qb,y.forOwnRight=Gb,y.get=lu,y.gt=fb,y.gte=gb,y.has=Jb,y.hasIn=uu,y.head=Lg,y.identity=Bt,y.includes=DA,y.indexOf=OS,y.inRange=mI,y.invoke=Zb,y.isArguments=no,y.isArray=ce,y.isArrayBuffer=mb,y.isArrayLike=Dt,y.isArrayLikeObject=je,y.isBoolean=pb,y.isBuffer=xr,y.isDate=vb,y.isElement=yb,y.isEmpty=Cb,y.isEqual=wb,y.isEqualWith=_b,y.isError=su,y.isFinite=Tb,y.isFunction=hr,y.isInteger=Yg,y.isLength=vs,y.isMap=Jg,y.isMatch=Eb,y.isMatchWith=Sb,y.isNaN=Ab,y.isNative=bb,y.isNil=kb,y.isNull=Ib,y.isNumber=Qg,y.isObject=$e,y.isObjectLike=ze,y.isPlainObject=Gi,y.isRegExp=cu,y.isSafeInteger=Rb,y.isSet=Xg,y.isString=ys,y.isSymbol=Gt,y.isTypedArray=Lo,y.isUndefined=Ob,y.isWeakMap=Nb,y.isWeakSet=Pb,y.join=DS,y.kebabCase=_I,y.last=gn,y.lastIndexOf=LS,y.lowerCase=TI,y.lowerFirst=EI,y.lt=Mb,y.lte=xb,y.max=vk,y.maxBy=yk,y.mean=Ck,y.meanBy=wk,y.min=_k,y.minBy=Tk,y.stubArray=pu,y.stubFalse=vu,y.stubObject=sk,y.stubString=ck,y.stubTrue=lk,y.multiply=Ek,y.nth=BS,y.noConflict=ZI,y.noop=mu,y.now=gs,y.pad=SI,y.padEnd=AI,y.padStart=bI,y.parseInt=II,y.random=pI,y.reduce=FA,y.reduceRight=HA,y.repeat=kI,y.replace=RI,y.result=aI,y.round=Sk,y.runInContext=A,y.sample=KA,y.size=qA,y.snakeCase=OI,y.some=GA,y.sortedIndex=zS,y.sortedIndexBy=WS,y.sortedIndexOf=qS,y.sortedLastIndex=GS,y.sortedLastIndexBy=jS,y.sortedLastIndexOf=YS,y.startCase=PI,y.startsWith=MI,y.subtract=Ak,y.sum=bk,y.sumBy=Ik,y.template=xI,y.times=uk,y.toFinite=fr,y.toInteger=de,y.toLength=em,y.toLower=DI,y.toNumber=mn,y.toSafeInteger=Db,y.toString=be,y.toUpper=LI,y.trim=BI,y.trimEnd=UI,y.trimStart=VI,y.truncate=FI,y.unescape=HI,y.uniqueId=hk,y.upperCase=$I,y.upperFirst=du,y.each=Fg,y.eachRight=Hg,y.first=Lg,gu(y,function(){var o={};return zn(y,function(a,u){Ie.call(y.prototype,u)||(o[u]=a)}),o}(),{chain:!1}),y.VERSION=n,ln(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){y[o].placeholder=y}),ln(["drop","take"],function(o,a){pe.prototype[o]=function(u){u=u===t?1:rt(de(u),0);var h=this.__filtered__&&!a?new pe(this):this.clone();return h.__filtered__?h.__takeCount__=_t(u,h.__takeCount__):h.__views__.push({size:_t(u,Kt),type:o+(h.__dir__<0?"Right":"")}),h},pe.prototype[o+"Right"]=function(u){return this.reverse()[o](u).reverse()}}),ln(["filter","map","takeWhile"],function(o,a){var u=a+1,h=u==Ct||u==sn;pe.prototype[o]=function(p){var w=this.clone();return w.__iteratees__.push({iteratee:X(p,3),type:u}),w.__filtered__=w.__filtered__||h,w}}),ln(["head","last"],function(o,a){var u="take"+(a?"Right":"");pe.prototype[o]=function(){return this[u](1).value()[0]}}),ln(["initial","tail"],function(o,a){var u="drop"+(a?"":"Right");pe.prototype[o]=function(){return this.__filtered__?new pe(this):this[u](1)}}),pe.prototype.compact=function(){return this.filter(Bt)},pe.prototype.find=function(o){return this.filter(o).head()},pe.prototype.findLast=function(o){return this.reverse().find(o)},pe.prototype.invokeMap=fe(function(o,a){return typeof o=="function"?new pe(this):this.map(function(u){return Hi(u,o,a)})}),pe.prototype.reject=function(o){return this.filter(ps(X(o)))},pe.prototype.slice=function(o,a){o=de(o);var u=this;return u.__filtered__&&(o>0||a<0)?new pe(u):(o<0?u=u.takeRight(-o):o&&(u=u.drop(o)),a!==t&&(a=de(a),u=a<0?u.dropRight(-a):u.take(a-o)),u)},pe.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},pe.prototype.toArray=function(){return this.take(Kt)},zn(pe.prototype,function(o,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),p=y[h?"take"+(a=="last"?"Right":""):a],w=h||/^find/.test(a);p&&(y.prototype[a]=function(){var T=this.__wrapped__,E=h?[1]:arguments,I=T instanceof pe,x=E[0],D=I||ce(T),L=function(me){var ve=p.apply(y,Ir([me],E));return h&&K?ve[0]:ve};D&&u&&typeof x=="function"&&x.length!=1&&(I=D=!1);var K=this.__chain__,Y=!!this.__actions__.length,Z=w&&!K,he=I&&!Y;if(!w&&D){T=he?T:new pe(this);var ee=o.apply(T,E);return ee.__actions__.push({func:hs,args:[L],thisArg:t}),new dn(ee,K)}return Z&&he?o.apply(this,E):(ee=this.thru(L),Z?h?ee.value()[0]:ee.value():ee)})}),ln(["pop","push","shift","sort","splice","unshift"],function(o){var a=Ua[o],u=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",h=/^(?:pop|shift)$/.test(o);y.prototype[o]=function(){var p=arguments;if(h&&!this.__chain__){var w=this.value();return a.apply(ce(w)?w:[],p)}return this[u](function(T){return a.apply(ce(T)?T:[],p)})}}),zn(pe.prototype,function(o,a){var u=y[a];if(u){var h=u.name+"";Ie.call(No,h)||(No[h]=[]),No[h].push({name:a,func:u})}}),No[is(t,$).name]=[{name:"wrapper",func:t}],pe.prototype.clone=HT,pe.prototype.reverse=$T,pe.prototype.value=KT,y.prototype.at=yA,y.prototype.chain=CA,y.prototype.commit=wA,y.prototype.next=_A,y.prototype.plant=EA,y.prototype.reverse=SA,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=AA,y.prototype.first=y.prototype.head,xi&&(y.prototype[xi]=TA),y},ko=wT();jr?((jr.exports=ko)._=ko,fl._=ko):ht._=ko}).call(FB)}(ea,ea.exports)),ea.exports}var Ti=HB();const Qs=VB(Ti),$B={path:"/_/dashboard",component:()=>Promise.resolve().then(()=>require("./AuthRoute-lhJCatuR.js")),meta:{requiresAuth:!1}},KB={path:"/jplan-auth-fail",component:()=>Promise.resolve().then(()=>require("./AuthFailRoute-C7gjZi-z.js")),meta:{requiresAuth:!1}},{isAuthenticated:qp,handleRedirect:zB}=Rh(),WB=Yc();function qB(r,e){r.addRoute($B),r.addRoute(KB),r.beforeEach(async(t,n,i)=>{function s(d){return d.matched.some(f=>f.meta.requiresAuth)}if(!s(t))return i();if(!qp.value){ie.value=!0;try{await zB(e),await WB.__init__()}catch(d){console.error("Fail to authenticate",d),await r.push("/jplan-auth-fail")}ie.value=!1}qp.value&&i()})}const{scope:Gp}=Yc();function GB(){const r=xh(),e=c.ref({scope_type:"org"});async function t(n){e.value=n}return c.watch(Gp,()=>{r.interceptors.request.use(n=>{const i=n.headers,s=i.Authorization;s&&(i.Authorization=s);const l=Gp.value;return l&&(l.scope_type&&(i["j-scope-type"]=l.scope_type,l.organization&&(i["j-scope-organization"]=l.organization),l.team&&(i["j-scope-team"]=l.team)),l.environment&&(i["j-scope-environment"]=l.environment)),n})},{immediate:!0}),Object.assign(r,{setScope:t,scope:e})}function Ei(r){const e=GB();e.defaults.baseURL=r;const t=c.ref({scope_type:"org"});async function n(i){t.value=i}return c.watch(t,()=>{e.interceptors.request.use(i=>{const s=t.value;return delete i.headers["j-scope-type"],delete i.headers["j-scope-organization"],delete i.headers["j-scope-team"],s!=null&&s.scope_type&&(i.headers["j-scope-type"]=s.scope_type),s!=null&&s.organization&&(i.headers["j-scope-organization"]=s.organization),s!=null&&s.team&&(i.headers["j-scope-team"]=s.team),i})},{immediate:!0}),Object.assign(e,{setScope:n,scope:t})}function jB(){const r=Ei("https://api.jplan.com.br/management/organization"),{error:e}=Hn();return{async getOrgList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Organization list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getOrgList:",n),e("Failed to fetch Organization list");return}},async createOrg(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Organization"),s}},async updateOrg(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Organization"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Organization"),s}},async getOrg(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Organization"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Organization"),s}},async activateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in activateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Organization"),s}},async deactivateOrg(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Organization"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateOrg:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Organization"),s}}}}const Fr=jB();function YB(){const r=Ei("https://api.jplan.com.br/management/branch/"),{error:e}=Hn();return{async getBranchList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error){e("Failed to fetch Branch list");return}return i.data.data}catch(n){console.error("Error in getBranchList:",n),e("Failed to fetch Branch list")}},async createBranch(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){console.error("Error in createBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Branch")}},async updateBranch(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error){e(s.data.error||"Failed to update Branch");return}return s}catch(s){console.error("Error in updateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Branch")}},async getBranch(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error){e(s.data.error||"Failed to fetch Branch");return}return s.data}catch(s){console.error("Error in getBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Branch")}},async activateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error){e(s.data.error||"Failed to activate Branch");return}}catch(s){console.error("Error in activateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Branch")}},async deactivateBranch(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error){e(s.data.error||"Failed to deactivate Branch");return}}catch(s){console.error("Error in deactivateBranch:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Branch")}}}}const Hr=YB();function JB(){const r=Ei("https://api.jplan.com.br/management/team"),{error:e}=Hn();return{async getTeamList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Team list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getTeamList:",n),e("Failed to fetch Team list");return}},async createTeam(t){var n,i;try{const s=await r.post("/item",t);if(s.data.error)throw e("Failed to create Team"),new Error(s.data.error);return s}catch(s){throw console.error("Error in createTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Team"),s}},async updateTeam(t){var n,i;try{const s=await r.patch("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in updateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Team"),s}},async getTeam(t){var n,i;try{const s=await r.get(`/item/${t}`);return s.data.error&&e("Failed to fetch Team"),s.data}catch(s){console.error("Error in getTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Team");return}},async activateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in activateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Team"),s}},async deactivateTeam(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Team"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateTeam:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Team"),s}},async getTeamUserList(t,n){try{const i=n?`?filter_query=${n}`:"",s=await r.get(`/item/${t}/user/list/${i}`);if(s.data.error)throw e("Failed to fetch Team User list"),new Error(s.data.error);return s.data.data}catch(i){console.error("Error in getTeamUserList:",i),e("Failed to fetch Team User list");return}},async linkManageUser(t,n){try{const i=await r.post(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to link User"),new Error(i.data.error);return i.data}catch(i){console.error("Error in link User:",i),e("Failed to link User");return}},async updateManageUser(t,n){try{const i=await r.patch(`/item/${t}/user/item/`,n);if(i.data.error)throw e("Failed to update User"),new Error(i.data.error);return i.data.data}catch(i){throw console.error("Error in update User:",i),e("Failed to update User"),i}},async getManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"",l=await r.get(`/item/${t}/user/item/${n}/${s}`);if(l.data.error)throw e("Failed to fetch User"),new Error(l.data.error);return l.data.data}catch(s){console.error("Error in getUser:",s),e("Failed to fetch User");return}},async unlinkManageUser(t,n,i){try{const s=i?`?filter_query=${i}`:"";await r.delete(`/item/${t}/user/item/${n}/${s}`)}catch(s){throw console.error("Error in unlink User:",s),e("Failed to unlink User"),s}}}}const en=JB();async function QB({url:r,method:e,header:t={},body:n,bearerToken:i}){const s=i?{Authorization:`Bearer ${i}`}:{};try{return(await Ke({url:r,method:e,headers:{...t,...s},data:n??{}})).data}catch(l){throw console.error(`Request failed for ${e} ${r}:`,l),l}}function Si(r,e,t=[]){const n=ZB(e);if(!n)return r;const i=n.split(" ");return r.filter(s=>XB(s,i,t))}function XB(r,e,t){return t.some(n=>{const i=Qs.get(r,n);if(Qs.isNil(i))return!1;const s=Qs.toString(i).toLowerCase();return e.every(l=>s.includes(l))})}function ZB(r){return Qs.trim(r).toLowerCase().replace(/\s+/g," ")}let xs=!1;const qu=c.ref(!1),pn=c.ref([]),jp=c.ref([]),We=c.ref(null),qo=c.ref([]),Go=c.ref([]),Lw=()=>{const r=Hn(),e=async _=>{qu.value=!0;const b=_?`_active eq true and ${_}`:"_active eq true",O=await Fr.getOrgList(b);O&&(pn.value=O,xs=!0),qu.value=!1},t=async _=>{var b;return(b=pn.value)!=null&&b.length||await e(_),pn.value};function n(_){if(!pn.value)throw new Error("Data not stored yet");const b=Si(pn.value,_,["name","description"]);return _!==""?b:pn.value}const i=_=>{jp.value=_},s=_=>{We.value=Ti.cloneDeep(_)},l=async _=>await Fr.getOrg(_),d=async()=>{if(We.value!=null){const _=await Fr.createOrg(We.value);return _!=null&&_.data.created_at&&(r.success("Organization created."),xs&&pn.value.push(_.data)),_==null?void 0:_.data}},f=async()=>{if(ie.value=!0,We.value&&We.value.__id){const _=await Fr.updateOrg(We.value);if(xs&&(_!=null&&_.data.__id)){const b=pn.value.findIndex(O=>O.__id===_.data.__id);return b!==-1?(pn.value[b]=_.data,r.success("Organization updated.")):r.error("Unable to update item"),ie.value=!1,_.data}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,We.value&&We.value.created_at){if(await Fr.deactivateOrg(We.value.__id),xs){const _=pn.value.findIndex(b=>{var O;return b.__id===((O=We.value)==null?void 0:O.__id)});if(_!==-1)return pn.value.splice(_,1),We.value;r.error("Unable to deactivate organization")}ie.value=!1}};async function m(_){ie.value=!0;try{if(We.value&&We.value.__id){const b={..._,organization:We.value.__id};if(!await Hr.updateBranch(b)){ie.value=!1;return}if(qo.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Branch added successfully."),qo.value.push(b),b;r.info("Branch already added.")}}catch(b){console.error(b)}finally{ie.value=!1}}async function v(_){if(ie.value=!0,We.value&&We.value.__id){const b={..._,organization:null};if(!await Hr.updateBranch(b)){ie.value=!1;return}const $=qo.value.findIndex(V=>V.__id===_.__id);if($!==-1)return qo.value.splice($,1),ie.value=!1,qo.value;throw new Error("Item not found to remove")}ie.value=!1}async function C(_){ie.value=!0;try{if(We.value&&We.value.__id){const b={..._,organization:We.value.__id};if(!await en.updateTeam(b)){ie.value=!1;return}if(Go.value.findIndex(V=>V.__id===_.__id)===-1)return r.success("Team added successfully."),Go.value.push(b),b;r.info("Team already added.")}}catch(b){console.error(b)}finally{ie.value=!1}}async function S(_){if(ie.value=!0,We.value&&We.value.__id){const b={..._,organization:null};if(!await en.updateTeam(b)){ie.value=!1;return}const $=Go.value.findIndex(V=>V.__id===_.__id);if($!==-1)return Go.value.splice($,1),ie.value=!1,Go.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:pn,loading:qu,columns:jp,item:We,filterData:n,__init__:e,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgBranches:qo,orgTeams:Go,linkBranch:m,unlinkBranch:v,linkTeam:C,unlinkTeam:S}};let Ds=!1;const vn=c.ref([]),Yp=c.ref([]),ot=c.ref(null),Gu=c.ref(!1),jo=c.ref([]),Bw=()=>{const r=Hn(),e=async C=>{Gu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await en.getTeamList(S);_&&(vn.value=_,Ds=!0),Gu.value=!1},t=async C=>(vn.value.length||await e(C),vn.value);function n(C){if(!vn.value)throw new Error("Data not stored yet");const S=Si(vn.value,C,["name","description"]);return C!==""?S:vn.value}const i=C=>{Yp.value=C},s=C=>{ot.value=Ti.cloneDeep(C)},l=async C=>await en.getTeam(C),d=async()=>{if(ot.value!=null){const C=await en.createTeam(ot.value);return C!=null&&C.data.created_at&&(r.success("Team created."),Ds&&vn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,ot.value&&ot.value.__id){const C=await en.updateTeam(ot.value);if(Ds&&(C!=null&&C.data.__id)){const S=vn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(vn.value[S]=C.data,r.success("Team updated.")):r.error("Unable to update item"),C.data}}else r.error("Unable to update item")},g=async()=>{if(ot.value&&ot.value.created_at&&(await en.deactivateTeam(ot.value.__id),Ds)){const C=vn.value.findIndex(S=>{var _;return S.__id===((_=ot.value)==null?void 0:_.__id)});if(C!==-1)return vn.value.splice(C,1),ot.value;r.error("Unable to deactivate organization")}};async function m(C){var S;if(ie.value=!0,(S=ot.value)!=null&&S.__id)if(jo.value.findIndex(b=>b.__id===C.__id)===-1)try{const b=await en.linkManageUser(ot.value.__id,{team:ot.value.__id,user:C.__id,role:"string",joined_at:"string",comments:"string"}),O=await en.getTeamUserList(ot.value.__id);return O&&(jo.value=O),r.success("User added successfully."),b}catch(b){console.error(b),r.error("Unable to add User.")}finally{ie.value=!1}else r.info("User already added.");else console.warn("No item selected or item ID is missing."),r.info("Please select a valid item.");ie.value=!1}async function v(C){if(ie.value=!0,ot.value&&ot.value.__id){const S=jo.value.findIndex(_=>_.__id===C);if(S!==-1)return await en.unlinkManageUser(ot.value.__id,C),jo.value.splice(S,1),ie.value=!1,jo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:vn,loading:Gu,columns:Yp,item:ot,usersTeam:jo,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,linkUser:m,unlinkUser:v}},Uw=c.defineComponent({__name:"GlobalScopeFilter",setup(r){var b,O,$;const{openDialog:e}=ya("global-scope__J-"),{user:t,scope:n,session:i,setScope:s}=Yc(),{getData:l,data:d}=Lw(),{getData:f,data:g}=Bw(),m=c.ref(!1);c.onBeforeMount(async()=>{m.value=!0,await l(),await f(),m.value=!1});const v=c.ref({scope_type:(b=n.value)==null?void 0:b.scope_type,organization:((O=n.value)==null?void 0:O.organization)??"org",team:($=n.value)==null?void 0:$.team});function C(){var V,U,Q;v.value={...n.value,scope_type:(V=n.value)==null?void 0:V.scope_type,organization:((U=n.value)==null?void 0:U.organization)??"",team:(Q=n.value)==null?void 0:Q.team},e()}const S=c.computed(()=>{var V;switch((V=n.value)==null?void 0:V.scope_type){case"user":return D1;case"org":return M1;case"team":return L1;default:return x1}});async function _(){var V;((V=n.value)==null?void 0:V.scope_type)!==""&&s(v.value)}return(V,U)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createVNode(Be.VBtn,{onClick:C,icon:"",class:"text-secondary ms-2",color:"surface",rounded:"sm",size:"small",variant:"flat"},{default:c.withCtx(()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(S.value),{size:"20"}))]),_:1}),c.createVNode(c.unref(wa),{loading:m.value,title:"Scope","dd-id":"global-scope__J-","on-save":_},{default:c.withCtx(()=>[c.createElementVNode("div",null,[c.createVNode(_e.VRow,null,{default:c.withCtx(()=>[c.createVNode(_e.VCol,{cols:"4",class:"d-flex flex-row align-center"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>U[3]||(U[3]=[c.createTextVNode(" User")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>{var Q;return[c.createTextVNode(c.toDisplayString(((Q=c.unref(t))==null?void 0:Q.name)||"Unknown"),1)]}),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>U[4]||(U[4]=[c.createTextVNode(" Domain")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).domain),1)]),_:1})]),_:1})]),_:1}),c.createVNode(_e.VCol,{cols:"4"},{default:c.withCtx(()=>[c.createVNode(Vt.VListItem,null,{default:c.withCtx(()=>[c.createVNode(Vt.VListItemTitle,null,{default:c.withCtx(()=>U[5]||(U[5]=[c.createTextVNode(" Environment")])),_:1}),c.createVNode(Vt.VListItemSubtitle,null,{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(c.unref(i).environment),1)]),_:1})]),_:1})]),_:1})]),_:1}),c.createVNode(Pk.VBtnToggle,{density:"compact",variant:"outlined",modelValue:v.value.scope_type,"onUpdate:modelValue":U[0]||(U[0]=Q=>v.value.scope_type=Q),class:"d-flex justify-center my-4"},{default:c.withCtx(()=>[c.createVNode(Be.VBtn,{value:"org",label:"Organizational",color:"secondary",class:""},{default:c.withCtx(()=>U[6]||(U[6]=[c.createTextVNode("Organizational")])),_:1}),c.createVNode(Be.VBtn,{value:"team",label:"Team",color:"secondary",class:""},{default:c.withCtx(()=>U[7]||(U[7]=[c.createTextVNode("Team")])),_:1}),c.createVNode(Be.VBtn,{value:"user",label:"User",color:"secondary",class:""},{default:c.withCtx(()=>U[8]||(U[8]=[c.createTextVNode("User")])),_:1}),c.createVNode(Be.VBtn,{value:"",label:"None",color:"lightext",class:""},{default:c.withCtx(()=>U[9]||(U[9]=[c.createTextVNode("None")])),_:1})]),_:1},8,["modelValue"]),c.createElementVNode("div",null,[c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[10]||(U[10]=[c.createTextVNode("Organization")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(d),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Organization",class:"min-w-50",modelValue:v.value.organization,"onUpdate:modelValue":U[1]||(U[1]=Q=>v.value.organization=Q)},null,8,["items","modelValue"]),c.createVNode(ua.VLabel,{class:"text-subtitle-1 text-high-emphasis mb-2"},{default:c.withCtx(()=>U[11]||(U[11]=[c.createTextVNode("Team")])),_:1}),c.createVNode(ta.VSelect,{items:c.unref(g),"item-title":"name","item-value":"__id",variant:"solo","bg-color":"containerBg",rounded:"false",placeholder:"Select a Team",class:"min-w-50",modelValue:v.value.team,"onUpdate:modelValue":U[2]||(U[2]=Q=>v.value.team=Q)},null,8,["items","modelValue"])])])]),_:1},8,["loading"])],64))}}),eU={},tU={class:"double-ring-spinner-container"};function nU(r,e){return c.openBlock(),c.createElementBlock("div",tU,e[0]||(e[0]=[c.createElementVNode("div",{class:"spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])],-1)]))}const Vw=vi(eU,[["render",nU],["__scopeId","data-v-00d7a69f"]]),rU={key:0,class:"_jspinner-overlay_jj"},Fw=c.defineComponent({__name:"GlobalSpinner",setup(r){return(e,t)=>c.unref(ie)?(c.openBlock(),c.createElementBlock("div",rU,t[0]||(t[0]=[c.createElementVNode("div",{class:"j-double-ring-spinner-container"},[c.createElementVNode("div",{class:"j-global-spinner-loading"},[c.createElementVNode("div"),c.createElementVNode("div"),c.createElementVNode("div",null,[c.createElementVNode("div")]),c.createElementVNode("div",null,[c.createElementVNode("div")])])],-1)]))):c.createCommentVNode("",!0)}}),oU=Object.freeze(Object.defineProperty({__proto__:null,AvatarPicture:Kv,ColumnSettingsDialog:Hd,ConfirmDialog:Hv,ContextMenu:zv,CopyButton:Cc,DeleteAllBtn:Ld,DotsMenu:Vv,DotsMenuV1:Fv,EditButton:Lv,FormHeadless:Ty,FormMetadata:kc,GlobalScopeFilter:Uw,GlobalSpinner:Fw,JAvatar:$v,JBtn:ov,JDialog:wa,JForm:wy,JIconBtn:rv,JSelect:py,JTextArea:vy,JTextField:my,ParentCard:Sc,SpinnerLoader:Vw,TabFormHeader:_y,TableAdvanced:Qv,TableCard:$d,TableCardsView:fy,TableHeader:Zv,UiTable:Wv},Symbol.toStringTag,{value:"Module"})),iU=sR(),aU={transition:"Vue-Toastification__fade",maxToasts:20,newestOnTop:!0};let ju=!1;const Yu=c.ref(!1),yn=c.ref([]),Jp=c.ref([]),gt=c.ref(null),Yo=c.ref([]),sU=()=>{const r=Hn(),e=async C=>{Yu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await Hr.getBranchList(S);_&&(yn.value=_,ju=!0),Yu.value=!1},t=async C=>(yn.value.length||await e(C),yn.value);function n(C){if(!yn.value)throw new Error("Data not stored yet");const S=Si(yn.value,C,["name","description"]);return C!==""?S:yn.value}const i=C=>{Jp.value=C},s=C=>{gt.value=Ti.cloneDeep(C)},l=async C=>await Hr.getBranch(C),d=async()=>{if(gt.value!=null){const C=await Hr.createBranch(gt.value);return C!=null&&C.data.created_at&&(r.success("Branch created."),ju&&yn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(gt.value&&gt.value.__id){const C=await Hr.updateBranch(gt.value);if(ju&&C){const S=yn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(yn.value[S]=C.data,r.success("Branch updated.")):r.error("Unable to update item"),C}}else r.error("Unable to update item")},g=async()=>{if(gt.value&&gt.value.created_at){await Hr.deactivateBranch(gt.value.__id);const C=yn.value.findIndex(S=>{var _;return S.__id===((_=gt.value)==null?void 0:_.__id)});if(C!==-1)return yn.value.splice(C,1),gt.value;r.error("Unable to deactivate Domain")}};async function m(C){ie.value=!0;try{if(gt.value&&gt.value.__id){const S={...C,branch:gt.value.__id};if(!await en.updateTeam(S)){r.error("Unable to link team");return}if(Yo.value.findIndex(O=>O.__id===C.__id)===-1)return r.success("Team added successfully."),Yo.value.push(S),S;r.info("Team already added.")}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,gt.value&&gt.value.__id){const S={...C,branch:null};if(!await en.updateTeam(S))return;const b=Yo.value.findIndex(O=>O.__id===C.__id);if(b!==-1)return Yo.value.splice(b,1),ie.value=!1,Yo.value;throw new Error("Item not found to remove")}ie.value=!1}return{data:yn,columns:Jp,item:gt,loading:Yu,__init__:e,getData:t,filterData:n,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,branchTeams:Yo,linkTeam:m,unlinkTeam:v}};function cU(){const r=Ei("https://api.jplan.com.br/management/division"),{error:e}=Hn();return{async getDivisionList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch Division list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getDivisionList:",n),e("Failed to fetch Division list");return}},async createDivision(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create Division"),s}},async updateDivision(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update Division"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update Division"),s}},async getDivision(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch Division"),new Error(s.data.error);return s.data}catch(s){throw console.error("Error in getDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch Division"),s}},async activateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in activateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate Division"),s}},async deactivateDivision(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate Division"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateDivision:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate Division"),s}}}}const ti=cU();let Ju=!1;const Qu=c.ref(!1),Cn=c.ref([]),Qp=c.ref([]),mt=c.ref(null),Jo=c.ref([]),lU=()=>{const r=Hn(),e=async C=>{Qu.value=!0;const S=C?`_active eq true and ${C}`:"_active eq true",_=await ti.getDivisionList(S);_&&(Cn.value=_,Ju=!0),Qu.value=!1},t=async C=>(Cn.value.length||await e(C),Cn.value);function n(C){if(!Cn.value)throw new Error("Data not stored yet");const S=Si(Cn.value,C,["name","description"]);return C!==""?S:Cn.value}const i=C=>{Qp.value=C},s=C=>{mt.value=Ti.cloneDeep(C)},l=async C=>await ti.getDivision(C),d=async()=>{if(mt.value!=null){const C=await ti.createDivision(mt.value);return C!=null&&C.data.created_at&&(r.success("Division created."),Ju&&Cn.value.push(C.data)),C==null?void 0:C.data}},f=async()=>{if(ie.value=!0,mt.value&&mt.value.__id){const C=await ti.updateDivision(mt.value);if(Ju&&(C!=null&&C.data.__id)){const S=Cn.value.findIndex(_=>_.__id===C.data.__id);return S!==-1?(Cn.value[S]=C.data,r.success("Updated Division.")):r.error("Unable to update item"),ie.value=!1,C}}else ie.value=!1,r.error("Unable to update item")},g=async()=>{if(ie.value=!0,mt.value&&mt.value.created_at){await ti.deactivateDivision(mt.value.__id);const C=Cn.value.findIndex(S=>{var _;return S.__id===((_=mt.value)==null?void 0:_.__id)});if(C!==-1)return Cn.value.splice(C,1),mt.value;r.error("Unable to deactivate Division")}ie.value=!1};async function m(C){ie.value=!0;try{if(mt.value&&mt.value.__id){const S={...C,division:mt.value.__id};return await Fr.updateOrg(S)?(Jo.value.findIndex(O=>O.__id===C.__id)===-1?(r.success("Organization added successfully."),Jo.value.push(S)):r.info("Organization already added."),S):void 0}else throw new Error("Item is not defined")}catch(S){console.error(S)}finally{ie.value=!1}}async function v(C){if(ie.value=!0,mt.value&&mt.value.__id){const S={...C,division:null};if(!await Fr.updateOrg(S))return;const b=Jo.value.findIndex(O=>O.__id===C.__id);if(b!==-1)Jo.value.splice(b,1);else throw new Error("Item não encontrado para remoção")}else throw new Error("Item não está definido");return ie.value=!1,Jo.value}return{data:Cn,columns:Qp,item:mt,loading:Qu,__init__:e,filterData:n,getData:t,setColumns:i,setItem:s,getItem:l,createItem:d,updateItem:f,removeItem:g,orgs:Jo,linkDivision:m,unlinkDivision:v}};function uU(){const r=Ei("https://api.jplan.com.br/management/user"),{error:e}=Hn();return{async getManageUserList(t){try{const n=t?`?filter_query=${t}`:"",i=await r.get(`/list/${n}`);if(i.data.error)throw e("Failed to fetch User list"),new Error(i.data.error);return i.data.data}catch(n){console.error("Error in getManageUserList:",n),e("Failed to fetch User list");return}},async createManageUser(t){var n,i;try{const s=await r.post("/item",t);return s.status>=200&&s.status<300?s:void 0}catch(s){throw console.error("Error in createManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to create User"),s}},async updateManageUser(t){var n,i;try{const s=await r.patch("/item",t);if(s.data.error)throw e("Failed to update User"),new Error(s.data.error);return s}catch(s){throw console.error("Error in updateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to update User"),s}},async getManageUser(t){var n,i;try{const s=await r.get(`/item/${t}`);if(s.data.error)throw e("Failed to fetch User"),new Error(s.data.error);return s.data}catch(s){console.error("Error in getManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to fetch User");return}},async activateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/activate`);if(s.data.error)throw e("Failed to activate User"),new Error(s.data.error)}catch(s){throw console.error("Error in activateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to activate User"),s}},async deactivateManageUser(t){var n,i;try{const s=await r.post(`/item/${t}/deactivate`);if(s.data.error)throw e("Failed to deactivate User"),new Error(s.data.error)}catch(s){throw console.error("Error in deactivateManageUser:",s),e(((i=(n=s.response)==null?void 0:n.data)==null?void 0:i.message)||"Failed to deactivate User"),s}}}}const ni=uU();let Xu=!1,Zu=c.ref(!1);const wn=c.ref([]),Xp=c.ref([]),_n=c.ref(null),dU=c.ref(null),hU=c.ref([]),fU=()=>{const r=Hn(),e=async m=>{Zu.value=!0;const v=m?`_active eq true and ${m}`:"_active eq true",C=await ni.getManageUserList(v);C&&(wn.value=C,Xu=!0),Zu.value=!1},t=async m=>(wn.value.length||await e(m),wn.value);function n(m){if(!wn.value)throw new Error("Data not stored yet");const v=Si(wn.value,m,["name","description"]);return m!==""?v:wn.value}return{data:wn,loading:Zu,columns:Xp,item:_n,filterData:n,__init__:e,getData:t,setColumns:m=>{Xp.value=m},setItem:m=>{_n.value=Ti.cloneDeep(m)},getItem:async m=>await ni.getManageUser(m),createItem:async()=>{if(_n.value!=null){const m=crypto.randomUUID(),v=await ni.createManageUser({..._n.value,__id:m});return v!=null&&v.data.created_at&&(r.success("User created."),Xu&&wn.value.push(v.data)),v==null?void 0:v.data}},updateItem:async()=>{if(ie.value=!0,_n.value&&_n.value.created_at){const m=await ni.updateManageUser(_n.value);if(Xu&&(m!=null&&m.data)){const v=wn.value.findIndex(C=>C.__id===(m==null?void 0:m.data.__id));if(v!==-1)wn.value[v]=m==null?void 0:m.data,r.success("User created.");else throw new Error("Unable to find item after update")}return ie.value=!1,m==null?void 0:m.data}},removeItem:async()=>{if(_n.value&&_n.value.created_at){try{await ni.deactivateManageUser(_n.value.__id)}catch{r.error("Unable to deactivate user");return}const m=wn.value.findIndex(v=>{var C;return v.__id===((C=_n.value)==null?void 0:C.__id)});if(m!==-1)return wn.value.splice(m,1),_n.value}},userOrg:dU,userTeams:hU}},gU=r=>{r.use(iU),r.use(lO,aU),Object.entries(oU).forEach(([e,t])=>{r.component(e,t)}),Object.entries(xk).forEach(([e,t])=>{r.provide(e,t)})},mU={install:gU};exports.ContextMenu=zv;exports.EventBus=Tc;exports.FormHeadless=Ty;exports.HttpCore=QB;exports.SpinnerLoader=Vw;exports.TableCardsView=fy;exports.TableHeader=Zv;exports.__spinner=ie;exports._export_sfc=vi;exports._sfc_main=Wv;exports._sfc_main$1=Qv;exports._sfc_main$10=Ld;exports._sfc_main$11=Lv;exports._sfc_main$12=wa;exports._sfc_main$13=rv;exports._sfc_main$14=py;exports._sfc_main$15=vy;exports._sfc_main$16=my;exports._sfc_main$17=wy;exports._sfc_main$18=_y;exports._sfc_main$19=Sc;exports._sfc_main$2=Hd;exports._sfc_main$20=$v;exports._sfc_main$21=Kv;exports._sfc_main$22=Uw;exports._sfc_main$23=Fw;exports._sfc_main$3=$d;exports._sfc_main$4=Hv;exports._sfc_main$5=Cc;exports._sfc_main$6=Vv;exports._sfc_main$7=Fv;exports._sfc_main$8=kc;exports._sfc_main$9=ov;exports.branchInstance=Hr;exports.coreClient=xh;exports.createToastInterface=fa;exports.dateFormat=Jv;exports.divisionInstance=ti;exports.filterQuery=Si;exports.globalEventBus=Dd;exports.index=mU;exports.manageUserInstance=ni;exports.msal=yt;exports.orgInstance=Fr;exports.provideToast=cO;exports.scopedClient=Ei;exports.setupAuthGuard=qB;exports.teamInstance=en;exports.toastInjectionKey=Ec;exports.useAuth=Rh;exports.useBranchStore=sU;exports.useCustomizer=hR;exports.useDialog=ya;exports.useDivisionStore=lU;exports.useManageUserStore=fU;exports.useOrganizationStore=Lw;exports.useSession=Yc;exports.useTeamStore=Bw;exports.useToast=Hn;