@luizleon/sf.prefeiturasp.vuecomponents 0.0.45 → 0.0.47

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,4 +1,4 @@
1
- (function(Z,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(Z=typeof globalThis<"u"?globalThis:Z||self,c((Z.sf=Z.sf||{},Z.sf.prefeiturasp=Z.sf.prefeiturasp||{},Z.sf.prefeiturasp.vuecomponents={}),Z.Vue))})(this,function(Z,c){"use strict";var ud=Object.defineProperty;var dd=(Z,c,Xe)=>c in Z?ud(Z,c,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Z[c]=Xe;var Be=(Z,c,Xe)=>(dd(Z,typeof c!="symbol"?c+"":c,Xe),Xe);class Xe{constructor(){Be(this,"_visible",c.ref(!1))}get IsVisible(){return this._visible.value===!0}Toggle(){this._visible.value=!this._visible.value}Close(){this._visible.value=!1}Open(){this._visible.value=!0}}const Cs=new Xe,fn=()=>Cs;class Ke{constructor(e){Be(this,"retorno");this.retorno=e??""}Concat(e){return e&&e.trim().length&&(this.retorno+=` ${e}`),this}AddClass(e,n=!0){return n?this.Concat(e):this}Build(){return this.retorno.trim()}}function fo(t=[]){let e="body *:not(style)";for(const n of t)e+=`, ${n}`;return Math.max(...Array.from(document.querySelectorAll(e)).map(n=>{const o=getComputedStyle(n).zIndex;return+o==+o?+o:0}))}let xs=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const po=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Ss={},_s={class:"sf-loading-circle"},vs=[c.createElementVNode("div",null,[c.createElementVNode("svg",{viewBox:"25 25 50 50"},[c.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function Ts(t,e){return c.openBlock(),c.createElementBlock("div",_s,vs)}const Ps=po(Ss,[["render",Ts]]),pn=c.defineComponent({__name:"Tooltip",props:{text:{}},setup(t){const e=t;class n{constructor(){Be(this,"zIndex");Be(this,"wrapper");Be(this,"inner");this.zIndex=fo()+1,this.Render()}Render(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("sf-tooltip-wrapper"),this.wrapper.style.zIndex=`${this.zIndex??0}`,this.inner=document.createElement("div"),this.inner.classList.add("sf-tooltip-inner"),this.wrapper.appendChild(this.inner)}Show(s){this.inner.textContent=e.text;const i=s.target;document.body.appendChild(this.wrapper),this.Position(i.getBoundingClientRect()),this.wrapper.classList.add("visible")}Hide(){this.wrapper.classList.remove("visible"),this.wrapper.remove()}Position(s){const f=s.top,u=s.bottom,w=s.left,E=s.right,b=s.width/2-15,j=this.wrapper;j.style.top=`${u+10}px`,j.style.left=`${w}px`,j.style.marginLeft=`${b}px`,this.OutOfBottom()&&(j.style.top=`${f-j.clientHeight-10}px`,j.classList.add("top")),this.OutOfRight()&&(j.style.left=`${E-j.clientWidth}px`,j.style.marginLeft=`-${b}px`,j.classList.add("left"))}OutOfBottom(){return this.wrapper.getBoundingClientRect().bottom>(window.innerHeight||document.documentElement.clientHeight)}OutOfRight(){return this.wrapper.getBoundingClientRect().right>(window.innerWidth||document.documentElement.clientWidth)}}const o=new n;return c.onBeforeUnmount(()=>{o.Hide()}),(r,s)=>(c.openBlock(),c.createElementBlock("div",{class:"sf-tooltip-anchor",onMouseenter:s[0]||(s[0]=(...i)=>c.unref(o).Show&&c.unref(o).Show(...i)),onMouseleave:s[1]||(s[1]=(...i)=>c.unref(o).Hide&&c.unref(o).Hide(...i)),onMousedown:s[2]||(s[2]=(...i)=>c.unref(o).Hide&&c.unref(o).Hide(...i))},[c.renderSlot(r.$slots,"default")],32))}}),Rs=["disabled","tabindex"],Ls=["data-color"],wt=c.defineComponent({__name:"Icon",props:{icon:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},size:{default:"md"},dot:{type:Boolean},dotColor:{default:"error"},filled:{type:Boolean},buttonProps:{},tooltip:{}},setup(t){const e=t,n=c.computed(()=>e.tooltip?pn:"div"),o=c.computed(()=>new Ke(`${e.class} sf-icon`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-icon-button",e.button).AddClass("sf-icon-small",e.size==="sm").AddClass("sf-icon-medium",e.size==="md").AddClass("sf-icon-large",e.size==="lg").AddClass("sf-ripple",e.button===!0).Build());return(r,s)=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.value),{text:e.tooltip},{default:c.withCtx(()=>[e.visible?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(e.style),class:c.normalizeClass(o.value)},[c.createElementVNode("button",c.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(c.openBlock(),c.createBlock(Ps,{key:0})):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(e.icon),1)],64))],16,Rs),e.dot?(c.openBlock(),c.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Ls)):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:1},8,["text"]))}}),Os=["id","onClick"],Is={class:"sf-drawer-header"},Bs={class:"sf-drawer-title"},Ns={class:"sf-drawer-content"},Fs={key:0,class:"sf-drawer-footer"},ho=c.defineComponent({__name:"Drawer",props:{visible:{type:Boolean,default:!1},position:{default:"left"},style:{}},emits:["update:visible","open","before-close"],setup(t,{emit:e}){const n=t,o=e,r=c.useSlots(),s=c.ref(n.visible),i=c.ref(!1),f=c.ref(0),u=xs();function w(){s.value=!1}function E(D){(D.key==="Escape"||D.code==="Escape")&&w()}function b(){o("open"),window.document.addEventListener("keydown",E,!0)}function j(D){f.value=fo(),D.style.zIndex=`${f.value}`}function $(D){var ee;o("before-close"),(ee=D==null?void 0:D.parentElement)==null||ee.classList.add("sf-mask-overlay-leave")}function B(){window.document.removeEventListener("keydown",E,!0),i.value=!1}function N(){return new Ke("sf-mask sf-mask-overlay").AddClass("right",n.position==="right").AddClass("bottom",n.position==="bottom").AddClass("full",n.position==="full").AddClass("sf-mask-overlay-enter",n.visible===!0).Build()}return c.watch(()=>n.visible,D=>{s.value=D}),c.watch(()=>s.value,D=>{o("update:visible",D),D&&(i.value=!0)}),(D,ee)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[i.value?(c.openBlock(),c.createElementBlock("div",{key:0,id:c.unref(u),class:c.normalizeClass(N()),style:c.normalizeStyle({zIndex:f.value-1}),onClick:c.withModifiers(w,["stop"])},[c.createVNode(c.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:j,onEnter:b,onBeforeLeave:$,onAfterLeave:B},{default:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!c.unref(r).footer}]),style:c.normalizeStyle(n.style),role:"dialog",onClick:ee[0]||(ee[0]=c.withModifiers(oe=>D.void,["stop"]))},[c.createElementVNode("div",Is,[c.createElementVNode("span",Bs,[c.renderSlot(D.$slots,"title")]),c.createVNode(wt,{button:!0,icon:"close",onClick:c.withModifiers(w,["stop"])},null,8,["onClick"])]),c.createElementVNode("div",Ns,[c.renderSlot(D.$slots,"default")]),c.unref(r).footer?(c.openBlock(),c.createElementBlock("div",Fs,[c.renderSlot(D.$slots,"footer")])):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:3})],14,Os)):c.createCommentVNode("",!0)]))}}),Us=["id","name","disabled","data-color","form","type"],Ms={class:"sf-button-label"},mo=c.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new Ke(`${e.class??""} sf-button`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-button-small",e.size==="sm").AddClass("sf-button-medium",e.size==="md").AddClass("sf-button-large",e.size==="lg").AddClass("sf-button-filled",e.variant==="filled").AddClass("sf-button-text",e.variant==="text").AddClass("sf-button-outlined",e.variant==="outlined").AddClass("sf-button-with-icon",!!e.icon).AddClass("sf-ripple").Build()}return(o,r)=>e.visible?(c.openBlock(),c.createElementBlock("button",{key:0,id:e.id,name:e.name,class:c.normalizeClass(n()),style:c.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(c.openBlock(),c.createBlock(wt,{key:0,filled:e.variant==="filled",icon:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["filled","icon","loading","size"])):e.loading?(c.openBlock(),c.createBlock(wt,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):c.createCommentVNode("",!0),c.createElementVNode("span",Ms,[c.renderSlot(o.$slots,"default")])],14,Us)):c.createCommentVNode("",!0)}}),go="SweetAlert2:",Ds=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},hn=t=>t.charAt(0).toUpperCase()+t.slice(1),_e=t=>Array.prototype.slice.call(t),Ee=t=>{console.warn(`${go} ${typeof t=="object"?t.join(" "):t}`)},Ze=t=>{console.error(`${go} ${t}`)},yo=[],$s=t=>{yo.includes(t)||(yo.push(t),Ee(t))},Hs=(t,e)=>{$s(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},Ht=t=>typeof t=="function"?t():t,mn=t=>t&&typeof t.toPromise=="function",Et=t=>mn(t)?t.toPromise():Promise.resolve(t),gn=t=>t&&Promise.resolve(t)===t,st={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},js=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Vs={},zs=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],bo=t=>Object.prototype.hasOwnProperty.call(st,t),wo=t=>js.indexOf(t)!==-1,yn=t=>Vs[t],Ws=t=>{bo(t)||Ee(`Unknown parameter "${t}"`)},qs=t=>{zs.includes(t)&&Ee(`The parameter "${t}" is incompatible with toasts`)},Ks=t=>{yn(t)&&Hs(t,yn(t))},Gs=t=>{!t.backdrop&&t.allowOutsideClick&&Ee('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Ws(e),t.toast&&qs(e),Ks(e)},Js="swal2-",Eo=t=>{const e={};for(const n in t)e[t[n]]=Js+t[n];return e},p=Eo(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),At=Eo(["success","warning","info","question","error"]),de=()=>document.body.querySelector(`.${p.container}`),kt=t=>{const e=de();return e?e.querySelector(t):null},Re=t=>kt(`.${t}`),Q=()=>Re(p.popup),Ct=()=>Re(p.icon),Ao=()=>Re(p.title),jt=()=>Re(p["html-container"]),ko=()=>Re(p.image),Co=()=>Re(p["progress-steps"]),Vt=()=>Re(p["validation-message"]),Ne=()=>kt(`.${p.actions} .${p.confirm}`),Ge=()=>kt(`.${p.actions} .${p.deny}`),Ys=()=>Re(p["input-label"]),it=()=>kt(`.${p.loader}`),Qe=()=>kt(`.${p.actions} .${p.cancel}`),xt=()=>Re(p.actions),xo=()=>Re(p.footer),zt=()=>Re(p["timer-progress-bar"]),bn=()=>Re(p.close),Xs=`
1
+ (function(Z,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(Z=typeof globalThis<"u"?globalThis:Z||self,c((Z.sf=Z.sf||{},Z.sf.prefeiturasp=Z.sf.prefeiturasp||{},Z.sf.prefeiturasp.vuecomponents={}),Z.Vue))})(this,function(Z,c){"use strict";var dd=Object.defineProperty;var fd=(Z,c,Xe)=>c in Z?dd(Z,c,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Z[c]=Xe;var Be=(Z,c,Xe)=>(fd(Z,typeof c!="symbol"?c+"":c,Xe),Xe);class Xe{constructor(){Be(this,"_visible",c.ref(!1))}get IsVisible(){return this._visible.value===!0}Toggle(){this._visible.value=!this._visible.value}Close(){this._visible.value=!1}Open(){this._visible.value=!0}}const Cs=new Xe,fn=()=>Cs;class Ke{constructor(e){Be(this,"retorno");this.retorno=e??""}Concat(e){return e&&e.trim().length&&(this.retorno+=` ${e}`),this}AddClass(e,n=!0){return n?this.Concat(e):this}Build(){return this.retorno.trim()}}function fo(t=[]){let e="body *:not(style)";for(const n of t)e+=`, ${n}`;return Math.max(...Array.from(document.querySelectorAll(e)).map(n=>{const o=getComputedStyle(n).zIndex;return+o==+o?+o:0}))}let xs=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const po=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},Ss={},_s={class:"sf-loading-circle"},vs=[c.createElementVNode("div",null,[c.createElementVNode("svg",{viewBox:"25 25 50 50"},[c.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function Ts(t,e){return c.openBlock(),c.createElementBlock("div",_s,vs)}const Ps=po(Ss,[["render",Ts]]),pn=c.defineComponent({__name:"Tooltip",props:{text:{}},setup(t){const e=t;class n{constructor(){Be(this,"zIndex");Be(this,"wrapper");Be(this,"inner");this.zIndex=fo()+1,this.Render()}Render(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("sf-tooltip-wrapper"),this.wrapper.style.zIndex=`${this.zIndex??0}`,this.inner=document.createElement("div"),this.inner.classList.add("sf-tooltip-inner"),this.wrapper.appendChild(this.inner)}Show(s){this.inner.textContent=e.text;const i=s.target;document.body.appendChild(this.wrapper),this.Position(i.getBoundingClientRect()),this.wrapper.classList.add("visible")}Hide(){this.wrapper.classList.remove("visible"),this.wrapper.remove()}Position(s){const f=s.top,u=s.bottom,w=s.left,E=s.right,b=s.width/2-15,j=this.wrapper;j.style.top=`${u+10}px`,j.style.left=`${w}px`,j.style.marginLeft=`${b}px`,this.OutOfBottom()&&(j.style.top=`${f-j.clientHeight-10}px`,j.classList.add("top")),this.OutOfRight()&&(j.style.left=`${E-j.clientWidth}px`,j.style.marginLeft=`-${b}px`,j.classList.add("left"))}OutOfBottom(){return this.wrapper.getBoundingClientRect().bottom>(window.innerHeight||document.documentElement.clientHeight)}OutOfRight(){return this.wrapper.getBoundingClientRect().right>(window.innerWidth||document.documentElement.clientWidth)}}const o=new n;return c.onBeforeUnmount(()=>{o.Hide()}),(r,s)=>(c.openBlock(),c.createElementBlock("div",{class:"sf-tooltip-anchor",onMouseenter:s[0]||(s[0]=(...i)=>c.unref(o).Show&&c.unref(o).Show(...i)),onMouseleave:s[1]||(s[1]=(...i)=>c.unref(o).Hide&&c.unref(o).Hide(...i)),onMousedown:s[2]||(s[2]=(...i)=>c.unref(o).Hide&&c.unref(o).Hide(...i))},[c.renderSlot(r.$slots,"default")],32))}}),Rs=["disabled","tabindex"],Ls=["data-color"],wt=c.defineComponent({__name:"Icon",props:{icon:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},size:{default:"md"},dot:{type:Boolean},dotColor:{default:"error"},filled:{type:Boolean},buttonProps:{},tooltip:{}},setup(t){const e=t,n=c.computed(()=>e.tooltip?pn:"div"),o=c.computed(()=>new Ke(`${e.class} sf-icon`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-icon-button",e.button).AddClass("sf-icon-small",e.size==="sm").AddClass("sf-icon-medium",e.size==="md").AddClass("sf-icon-large",e.size==="lg").AddClass("sf-ripple",e.button===!0).Build());return(r,s)=>(c.openBlock(),c.createBlock(c.resolveDynamicComponent(n.value),{text:e.tooltip},{default:c.withCtx(()=>[e.visible?(c.openBlock(),c.createElementBlock("div",{key:0,style:c.normalizeStyle(e.style),class:c.normalizeClass(o.value)},[c.createElementVNode("button",c.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(c.openBlock(),c.createBlock(Ps,{key:0})):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(e.icon),1)],64))],16,Rs),e.dot?(c.openBlock(),c.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Ls)):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:1},8,["text"]))}}),Os=["id","onClick"],Is={class:"sf-drawer-header"},Bs={class:"sf-drawer-title"},Ns={class:"sf-drawer-content"},Fs={key:0,class:"sf-drawer-footer"},ho=c.defineComponent({__name:"Drawer",props:{visible:{type:Boolean,default:!1},position:{default:"left"},style:{}},emits:["update:visible","open","before-close"],setup(t,{emit:e}){const n=t,o=e,r=c.useSlots(),s=c.ref(n.visible),i=c.ref(!1),f=c.ref(0),u=xs();function w(){s.value=!1}function E(D){(D.key==="Escape"||D.code==="Escape")&&w()}function b(){o("open"),window.document.addEventListener("keydown",E,!0)}function j(D){f.value=fo(),D.style.zIndex=`${f.value}`}function $(D){var ee;o("before-close"),(ee=D==null?void 0:D.parentElement)==null||ee.classList.add("sf-mask-overlay-leave")}function B(){window.document.removeEventListener("keydown",E,!0),i.value=!1}function N(){return new Ke("sf-mask sf-mask-overlay").AddClass("right",n.position==="right").AddClass("bottom",n.position==="bottom").AddClass("full",n.position==="full").AddClass("sf-mask-overlay-enter",n.visible===!0).Build()}return c.watch(()=>n.visible,D=>{s.value=D}),c.watch(()=>s.value,D=>{o("update:visible",D),D&&(i.value=!0)}),(D,ee)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[i.value?(c.openBlock(),c.createElementBlock("div",{key:0,id:c.unref(u),class:c.normalizeClass(N()),style:c.normalizeStyle({zIndex:f.value-1}),onClick:c.withModifiers(w,["stop"])},[c.createVNode(c.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:j,onEnter:b,onBeforeLeave:$,onAfterLeave:B},{default:c.withCtx(()=>[s.value?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!c.unref(r).footer}]),style:c.normalizeStyle(n.style),role:"dialog",onClick:ee[0]||(ee[0]=c.withModifiers(oe=>D.void,["stop"]))},[c.createElementVNode("div",Is,[c.createElementVNode("span",Bs,[c.renderSlot(D.$slots,"title")]),c.createVNode(wt,{button:!0,icon:"close",onClick:c.withModifiers(w,["stop"])},null,8,["onClick"])]),c.createElementVNode("div",Ns,[c.renderSlot(D.$slots,"default")]),c.unref(r).footer?(c.openBlock(),c.createElementBlock("div",Fs,[c.renderSlot(D.$slots,"footer")])):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:3})],14,Os)):c.createCommentVNode("",!0)]))}}),Us=["id","name","disabled","data-color","form","type"],Ms={class:"sf-button-label"},mo=c.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{},disabled:{type:Boolean},loading:{type:Boolean},color:{default:"primary"},size:{default:"md"},variant:{default:"filled"},autofocus:{type:Boolean},form:{},name:{},id:{},type:{default:"button"},value:{}},setup(t){const e=t;function n(){return new Ke(`${e.class??""} sf-button`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-button-small",e.size==="sm").AddClass("sf-button-medium",e.size==="md").AddClass("sf-button-large",e.size==="lg").AddClass("sf-button-filled",e.variant==="filled").AddClass("sf-button-text",e.variant==="text").AddClass("sf-button-outlined",e.variant==="outlined").AddClass("sf-button-with-icon",!!e.icon).AddClass("sf-ripple").Build()}return(o,r)=>e.visible?(c.openBlock(),c.createElementBlock("button",{key:0,id:e.id,name:e.name,class:c.normalizeClass(n()),style:c.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(c.openBlock(),c.createBlock(wt,{key:0,filled:e.variant==="filled",icon:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["filled","icon","loading","size"])):e.loading?(c.openBlock(),c.createBlock(wt,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):c.createCommentVNode("",!0),c.createElementVNode("span",Ms,[c.renderSlot(o.$slots,"default")])],14,Us)):c.createCommentVNode("",!0)}}),go="SweetAlert2:",Ds=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},hn=t=>t.charAt(0).toUpperCase()+t.slice(1),_e=t=>Array.prototype.slice.call(t),Ee=t=>{console.warn(`${go} ${typeof t=="object"?t.join(" "):t}`)},Ze=t=>{console.error(`${go} ${t}`)},yo=[],$s=t=>{yo.includes(t)||(yo.push(t),Ee(t))},Hs=(t,e)=>{$s(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},Ht=t=>typeof t=="function"?t():t,mn=t=>t&&typeof t.toPromise=="function",Et=t=>mn(t)?t.toPromise():Promise.resolve(t),gn=t=>t&&Promise.resolve(t)===t,st={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},js=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Vs={},zs=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],bo=t=>Object.prototype.hasOwnProperty.call(st,t),wo=t=>js.indexOf(t)!==-1,yn=t=>Vs[t],Ws=t=>{bo(t)||Ee(`Unknown parameter "${t}"`)},qs=t=>{zs.includes(t)&&Ee(`The parameter "${t}" is incompatible with toasts`)},Ks=t=>{yn(t)&&Hs(t,yn(t))},Gs=t=>{!t.backdrop&&t.allowOutsideClick&&Ee('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Ws(e),t.toast&&qs(e),Ks(e)},Js="swal2-",Eo=t=>{const e={};for(const n in t)e[t[n]]=Js+t[n];return e},p=Eo(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),At=Eo(["success","warning","info","question","error"]),de=()=>document.body.querySelector(`.${p.container}`),kt=t=>{const e=de();return e?e.querySelector(t):null},Re=t=>kt(`.${t}`),Q=()=>Re(p.popup),Ct=()=>Re(p.icon),Ao=()=>Re(p.title),jt=()=>Re(p["html-container"]),ko=()=>Re(p.image),Co=()=>Re(p["progress-steps"]),Vt=()=>Re(p["validation-message"]),Ne=()=>kt(`.${p.actions} .${p.confirm}`),Ge=()=>kt(`.${p.actions} .${p.deny}`),Ys=()=>Re(p["input-label"]),it=()=>kt(`.${p.loader}`),Qe=()=>kt(`.${p.actions} .${p.cancel}`),xt=()=>Re(p.actions),xo=()=>Re(p.footer),zt=()=>Re(p["timer-progress-bar"]),bn=()=>Re(p.close),Xs=`
2
2
  a[href],
3
3
  area[href],
4
4
  input:not([disabled]),
@@ -61,22 +61,22 @@ showLoaderOnConfirm should be used together with preConfirm, see usage example:
61
61
  https://sweetalert2.github.io/#ajax-request`),Qi(t),typeof t.title=="string"&&(t.title=t.title.split(`
62
62
  `).join("<br />")),di(t)}class ta{constructor(e,n){this.callback=e,this.remaining=n,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){const n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const na=()=>{at.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(at.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at.previousBodyPadding+hi()}px`)},oa=()=>{at.previousBodyPadding!==null&&(document.body.style.paddingRight=`${at.previousBodyPadding}px`,at.previousBodyPadding=null)},ra=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!Ve(document.body,p.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,Y(document.body,p.iosfix),ia(),sa()}},sa=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&Q().scrollHeight>window.innerHeight-44&&(de().style.paddingBottom="44px")},ia=()=>{const t=de();let e;t.ontouchstart=n=>{e=aa(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},aa=t=>{const e=t.target,n=de();return ca(t)||la(t)?!1:e===n||!To(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(To(jt())&&jt().contains(e))},ca=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",la=t=>t.touches&&t.touches.length>1,ua=()=>{if(Ve(document.body,p.iosfix)){const t=parseInt(document.body.style.top,10);Me(document.body,p.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},Do=10,da=t=>{const e=de(),n=Q();typeof t.willOpen=="function"&&t.willOpen(n);const r=window.getComputedStyle(document.body).overflowY;ha(e,n,t),setTimeout(()=>{fa(e,n)},Do),En()&&(pa(e,t.scrollbarPadding,r),Vi()),!Wt()&&!q.previousActiveElement&&(q.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Me(e,p["no-transition"])},$o=t=>{const e=Q();if(t.target!==e)return;const n=de();e.removeEventListener(_t,$o),n.style.overflowY="auto"},fa=(t,e)=>{_t&&Po(e)?(t.style.overflowY="hidden",e.addEventListener(_t,$o)):t.style.overflowY="auto"},pa=(t,e,n)=>{ra(),e&&n!=="hidden"&&na(),setTimeout(()=>{t.scrollTop=0})},ha=(t,e,n)=>{Y(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),le(e,"grid"),setTimeout(()=>{Y(e,n.showClass.popup),e.style.removeProperty("opacity")},Do),Y([document.documentElement,document.body],p.shown),n.heightAuto&&n.backdrop&&!n.toast&&Y([document.documentElement,document.body],p["height-auto"])},lt=t=>{let e=Q();e||new dt,e=Q();const n=it();Wt()?pe(Ct()):ma(e,t),le(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ma=(t,e)=>{const n=xt(),o=it();!e&&ve(Ne())&&(e=Ne()),le(n),e&&(pe(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),Y([t,n],p.loading)},ga=(t,e)=>{e.input==="select"||e.input==="radio"?Aa(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(mn(e.inputValue)||gn(e.inputValue))&&(lt(Ne()),ka(t,e))},ya=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return ba(n);case"radio":return wa(n);case"file":return Ea(n);default:return e.inputAutoTrim?n.value.trim():n.value}},ba=t=>t.checked?1:0,wa=t=>t.checked?t.value:null,Ea=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,Aa=(t,e)=>{const n=Q(),o=r=>Ca[e.input](n,_n(r),e);mn(e.inputOptions)||gn(e.inputOptions)?(lt(Ne()),Et(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Ze(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},ka=(t,e)=>{const n=t.getInput();pe(n),Et(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,le(n),n.focus(),t.hideLoading()}).catch(o=>{Ze(`Error in inputValue promise: ${o}`),n.value="",le(n),n.focus(),t.hideLoading()})},Ca={select:(t,e,n)=>{const o=Je(t,p.select),r=(s,i,f)=>{const u=document.createElement("option");u.value=f,fe(u,i),u.selected=Ho(f,n.inputValue),s.appendChild(u)};e.forEach(s=>{const i=s[0],f=s[1];if(Array.isArray(f)){const u=document.createElement("optgroup");u.label=i,u.disabled=!1,o.appendChild(u),f.forEach(w=>r(u,w[1],w[0]))}else r(o,f,i)}),o.focus()},radio:(t,e,n)=>{const o=Je(t,p.radio);e.forEach(s=>{const i=s[0],f=s[1],u=document.createElement("input"),w=document.createElement("label");u.type="radio",u.name=p.radio,u.value=i,Ho(i,n.inputValue)&&(u.checked=!0);const E=document.createElement("span");fe(E,f),E.className=p.label,w.appendChild(u),w.appendChild(E),o.appendChild(w)});const r=o.querySelectorAll("input");r.length&&r[0].focus()}},_n=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let r=n;typeof r=="object"&&(r=_n(r)),e.push([o,r])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=_n(o)),e.push([n,o])}),e},Ho=(t,e)=>e&&e.toString()===t.toString();function jo(){const t=K.innerParams.get(this);if(!t)return;const e=K.domCache.get(this);pe(e.loader),Wt()?t.icon&&le(Ct()):xa(e),Me([e.popup,e.actions],p.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const xa=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?le(e[0],"inline-block"):ei()&&pe(t.actions)};function Sa(t){const e=K.innerParams.get(t||this),n=K.domCache.get(t||this);return n?An(n.popup,e.input):null}const Tt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},_a=()=>ve(Q()),Vo=()=>Ne()&&Ne().click(),va=()=>Ge()&&Ge().click(),Ta=()=>Qe()&&Qe().click(),zo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Pa=(t,e,n,o)=>{zo(e),n.toast||(e.keydownHandler=r=>La(t,r,o),e.keydownTarget=n.keydownListenerCapture?window:Q(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},vn=(t,e,n)=>{const o=wn();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();Q().focus()},Wo=["ArrowRight","ArrowDown"],Ra=["ArrowLeft","ArrowUp"],La=(t,e,n)=>{const o=K.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Oa(t,e,o):e.key==="Tab"?Ia(e,o):[...Wo,...Ra].includes(e.key)?Ba(e.key):e.key==="Escape"&&Na(e,o,n)))},Oa=(t,e,n)=>{if(Ht(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Vo(),e.preventDefault()}},Ia=(t,e)=>{const n=t.target,o=wn();let r=-1;for(let s=0;s<o.length;s++)if(n===o[s]){r=s;break}t.shiftKey?vn(e,r,-1):vn(e,r,1),t.stopPropagation(),t.preventDefault()},Ba=t=>{const e=Ne(),n=Ge(),o=Qe();if(![e,n,o].includes(document.activeElement))return;const r=Wo.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let i=0;i<xt().children.length;i++){if(s=s[r],!s)return;if(ve(s)&&s instanceof HTMLButtonElement)break}s instanceof HTMLButtonElement&&s.focus()},Na=(t,e,n)=>{Ht(e.allowEscapeKey)&&(t.preventDefault(),n(ct.esc))};function qo(t,e,n,o){Wt()?Ko(t,o):(ri(n).then(()=>Ko(t,o)),zo(q)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),En()&&(oa(),ua(),Fo()),Fa()}function Fa(){Me([document.documentElement,document.body],[p.shown,p["height-auto"],p["no-backdrop"],p["toast-shown"]])}function Kt(t){t=$a(t);const e=Tt.swalPromiseResolve.get(this),n=Ma(this);this.isAwaitingPromise()?t.isDismissed||(Pt(this),e(t)):n&&e(t)}function Ua(){return!!K.awaitingPromise.get(this)}const Ma=t=>{const e=Q();if(!e)return!1;const n=K.innerParams.get(t);if(!n||Ve(e,n.hideClass.popup))return!1;Me(e,n.showClass.popup),Y(e,n.hideClass.popup);const o=de();return Me(o,n.showClass.backdrop),Y(o,n.hideClass.backdrop),Ha(t,e,n),!0};function Da(t){const e=Tt.swalPromiseReject.get(this);Pt(this),e&&e(t)}const Pt=t=>{t.isAwaitingPromise()&&(K.awaitingPromise.delete(t),K.innerParams.get(t)||t._destroy())},$a=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Ha=(t,e,n)=>{const o=de(),r=_t&&Po(e);typeof n.willClose=="function"&&n.willClose(e),r?ja(t,e,o,n.returnFocus,n.didClose):qo(t,o,n.returnFocus,n.didClose)},ja=(t,e,n,o,r)=>{q.swalCloseEventFinishedCallback=qo.bind(null,t,n,o,r),e.addEventListener(_t,function(s){s.target===e&&(q.swalCloseEventFinishedCallback(),delete q.swalCloseEventFinishedCallback)})},Ko=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function Go(t,e,n){const o=K.domCache.get(t);e.forEach(r=>{o[r].disabled=n})}function Jo(t,e){if(!t)return!1;if(t.type==="radio"){const o=t.parentNode.parentNode.querySelectorAll("input");for(let r=0;r<o.length;r++)o[r].disabled=e}else t.disabled=e}function Va(){Go(this,["confirmButton","denyButton","cancelButton"],!1)}function za(){Go(this,["confirmButton","denyButton","cancelButton"],!0)}function Wa(){return Jo(this.getInput(),!1)}function qa(){return Jo(this.getInput(),!0)}function Ka(t){const e=K.domCache.get(this),n=K.innerParams.get(this);fe(e.validationMessage,t),e.validationMessage.className=p["validation-message"],n.customClass&&n.customClass.validationMessage&&Y(e.validationMessage,n.customClass.validationMessage),le(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",p["validation-message"]),So(o),Y(o,p.inputerror))}function Ga(){const t=K.domCache.get(this);t.validationMessage&&pe(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Me(e,p.inputerror))}function Ja(){return K.domCache.get(this).progressSteps}function Ya(t){const e=Q(),n=K.innerParams.get(this);if(!e||Ve(e,n.hideClass.popup))return Ee("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=Xa(t),r=Object.assign({},n,o);No(this,r),K.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const Xa=t=>{const e={};return Object.keys(t).forEach(n=>{wo(n)?e[n]=t[n]:Ee(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
63
63
 
64
- If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`)}),e};function Za(){const t=K.domCache.get(this),e=K.innerParams.get(this);if(!e){Yo(this);return}t.popup&&q.swalCloseEventFinishedCallback&&(q.swalCloseEventFinishedCallback(),delete q.swalCloseEventFinishedCallback),q.deferDisposalTimer&&(clearTimeout(q.deferDisposalTimer),delete q.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Qa(this)}const Qa=t=>{Yo(t),delete t.params,delete q.keydownHandler,delete q.keydownTarget,delete q.currentInstance},Yo=t=>{t.isAwaitingPromise()?(Tn(K,t),K.awaitingPromise.set(t,!0)):(Tn(Tt,t),Tn(K,t))},Tn=(t,e)=>{for(const n in t)t[n].delete(e)},Xo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Za,close:Kt,closeModal:Kt,closePopup:Kt,closeToast:Kt,disableButtons:za,disableInput:qa,disableLoading:jo,enableButtons:Va,enableInput:Wa,getInput:Sa,getProgressSteps:Ja,handleAwaitingPromise:Pt,hideLoading:jo,isAwaitingPromise:Ua,rejectPromise:Da,resetValidationMessage:Ga,showValidationMessage:Ka,update:Ya},Symbol.toStringTag,{value:"Module"})),ec=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.input?Zo(t,"confirm"):Rn(t,!0)},tc=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Zo(t,"deny"):Pn(t,!1)},nc=(t,e)=>{t.disableButtons(),e(ct.cancel)},Zo=(t,e)=>{const n=K.innerParams.get(t);if(!n.input)return Ze(`The "input" parameter is needed to be set when using returnInputValueOn${hn(e)}`);const o=ya(t,n);n.inputValidator?oc(t,o,e):t.getInput().checkValidity()?e==="deny"?Pn(t,o):Rn(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},oc=(t,e,n)=>{const o=K.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>Et(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Pn(t,e):Rn(t,e)})},Pn=(t,e)=>{const n=K.innerParams.get(t||void 0);n.showLoaderOnDeny&&lt(Ge()),n.preDeny?(K.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Et(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),Pt(t)):t.closePopup({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>er(t||void 0,r))):t.closePopup({isDenied:!0,value:e})},Qo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},er=(t,e)=>{t.rejectPromise(e)},Rn=(t,e)=>{const n=K.innerParams.get(t||void 0);n.showLoaderOnConfirm&&lt(),n.preConfirm?(t.resetValidationMessage(),K.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Et(n.preConfirm(e,n.validationMessage))).then(r=>{ve(Vt())||r===!1?(t.hideLoading(),Pt(t)):Qo(t,typeof r>"u"?e:r)}).catch(r=>er(t||void 0,r))):Qo(t,e)},rc=(t,e,n)=>{K.innerParams.get(t).toast?sc(t,e,n):(ac(e),cc(e),lc(t,e,n))},sc=(t,e,n)=>{e.popup.onclick=()=>{const o=K.innerParams.get(t);o&&(ic(o)||o.timer||o.input)||n(ct.close)}},ic=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Gt=!1;const ac=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Gt=!0)}}},cc=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Gt=!0)}}},lc=(t,e,n)=>{e.container.onclick=o=>{const r=K.innerParams.get(t);if(Gt){Gt=!1;return}o.target===e.container&&Ht(r.allowOutsideClick)&&n(ct.backdrop)}},uc=t=>typeof t=="object"&&t.jquery,tr=t=>t instanceof Element||uc(t),dc=t=>{const e={};return typeof t[0]=="object"&&!tr(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const r=t[o];typeof r=="string"||tr(r)?e[n]=r:r!==void 0&&Ze(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};function fc(...t){const e=this;return new e(...t)}function pc(t){class e extends this{_main(o,r){return super._main(o,Object.assign({},t,r))}}return e}const hc=()=>q.timeout&&q.timeout.getTimerLeft(),nr=()=>{if(q.timeout)return ti(),q.timeout.stop()},or=()=>{if(q.timeout){const t=q.timeout.start();return kn(t),t}},mc=()=>{const t=q.timeout;return t&&(t.running?nr():or())},gc=t=>{if(q.timeout){const e=q.timeout.increase(t);return kn(e,!0),e}},yc=()=>q.timeout&&q.timeout.isRunning();let rr=!1;const Ln={};function bc(t="data-swal-template"){Ln[t]=this,rr||(document.body.addEventListener("click",wc),rr=!0)}const wc=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in Ln){const o=e.getAttribute(n);if(o){Ln[n].fire({template:o});return}}},Ec=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:dc,bindClickHandler:bc,clickCancel:Ta,clickConfirm:Vo,clickDeny:va,enableLoading:lt,fire:fc,getActions:xt,getCancelButton:Qe,getCloseButton:bn,getConfirmButton:Ne,getContainer:de,getDenyButton:Ge,getFocusableElements:wn,getFooter:xo,getHtmlContainer:jt,getIcon:Ct,getImage:ko,getInputLabel:Ys,getLoader:it,getPopup:Q,getTimerLeft:hc,getTimerProgressBar:zt,getTitle:Ao,getValidationMessage:Vt,increaseTimer:gc,isDeprecatedParameter:yn,isLoading:Zs,isTimerRunning:yc,isUpdatableParameter:wo,isValidParameter:bo,isVisible:_a,mixin:pc,resumeTimer:or,showLoading:lt,stopTimer:nr,toggleTimer:mc},Symbol.toStringTag,{value:"Module"}));let On;class ut{constructor(...e){if(typeof window>"u")return;On=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);K.promise.set(this,o)}_main(e,n={}){Gs(Object.assign({},n,e)),q.currentInstance&&(q.currentInstance._destroy(),En()&&Fo()),q.currentInstance=this;const o=kc(e,n);ea(o),Object.freeze(o),q.timeout&&(q.timeout.stop(),delete q.timeout),clearTimeout(q.restoreFocusTimeout);const r=Cc(this);return No(this,o),K.innerParams.set(this,o),Ac(this,r,o)}then(e){return K.promise.get(this).then(e)}finally(e){return K.promise.get(this).finally(e)}}const Ac=(t,e,n)=>new Promise((o,r)=>{const s=i=>{t.closePopup({isDismissed:!0,dismiss:i})};Tt.swalPromiseResolve.set(t,o),Tt.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>ec(t),e.denyButton.onclick=()=>tc(t),e.cancelButton.onclick=()=>nc(t,s),e.closeButton.onclick=()=>s(ct.close),rc(t,e,s),Pa(t,q,n,s),ga(t,n),da(n),xc(q,n,s),Sc(e,n),setTimeout(()=>{e.container.scrollTop=0})}),kc=(t,e)=>{const n=zi(t),o=Object.assign({},st,e,n,t);return o.showClass=Object.assign({},st.showClass,o.showClass),o.hideClass=Object.assign({},st.hideClass,o.hideClass),o},Cc=t=>{const e={popup:Q(),container:de(),actions:xt(),confirmButton:Ne(),denyButton:Ge(),cancelButton:Qe(),loader:it(),closeButton:bn(),validationMessage:Vt(),progressSteps:Co()};return K.domCache.set(t,e),e},xc=(t,e,n)=>{const o=zt();pe(o),e.timer&&(t.timeout=new ta(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(le(o),Le(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&kn(e.timer)})))},Sc=(t,e)=>{if(!e.toast){if(!Ht(e.allowEnterKey))return vc();_c(t,e)||vn(e,-1,1)}},_c=(t,e)=>e.focusDeny&&ve(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&ve(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&ve(t.confirmButton)?(t.confirmButton.focus(),!0):!1,vc=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(ut.prototype,Xo),Object.assign(ut,Ec),Object.keys(Xo).forEach(t=>{ut[t]=function(...e){if(On)return On[t](...e)}}),ut.DismissReason=ct,ut.version="11.4.8";const dt=ut;dt.default=dt;/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:sr,setPrototypeOf:ir,isFrozen:Tc,getPrototypeOf:Pc,getOwnPropertyDescriptor:Rc}=Object;let{freeze:ge,seal:Fe,create:ar}=Object,{apply:In,construct:Bn}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e}),Fe||(Fe=function(e){return e}),In||(In=function(e,n,o){return e.apply(n,o)}),Bn||(Bn=function(e,n){return new e(...n)});const Jt=Pe(Array.prototype.forEach),cr=Pe(Array.prototype.pop),Rt=Pe(Array.prototype.push),Yt=Pe(String.prototype.toLowerCase),Nn=Pe(String.prototype.toString),Lc=Pe(String.prototype.match),Lt=Pe(String.prototype.replace),Oc=Pe(String.prototype.indexOf),Ic=Pe(String.prototype.trim),Ue=Pe(Object.prototype.hasOwnProperty),Te=Pe(RegExp.prototype.test),Ot=Bc(TypeError);function Pe(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return In(t,e,o)}}function Bc(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Bn(t,n)}}function G(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yt;ir&&ir(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const s=n(r);s!==r&&(Tc(e)||(e[o]=s),r=s)}t[r]=!0}return t}function Nc(t){for(let e=0;e<t.length;e++)Ue(t,e)||(t[e]=null);return t}function nt(t){const e=ar(null);for(const[n,o]of sr(t))Ue(t,n)&&(Array.isArray(o)?e[n]=Nc(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=nt(o):e[n]=o);return e}function Xt(t,e){for(;t!==null;){const o=Rc(t,e);if(o){if(o.get)return Pe(o.get);if(typeof o.value=="function")return Pe(o.value)}t=Pc(t)}function n(){return null}return n}const lr=ge(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Fn=ge(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Un=ge(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fc=ge(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mn=ge(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Uc=ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ur=ge(["#text"]),dr=ge(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Dn=ge(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fr=ge(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zt=ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mc=Fe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Dc=Fe(/<%[\w\W]*|[\w\W]*%>/gm),$c=Fe(/\${[\w\W]*}/gm),Hc=Fe(/^data-[\-\w.\u00B7-\uFFFF]/),jc=Fe(/^aria-[\-\w]+$/),pr=Fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vc=Fe(/^(?:\w+script|data):/i),zc=Fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hr=Fe(/^html$/i);var mr=Object.freeze({__proto__:null,MUSTACHE_EXPR:Mc,ERB_EXPR:Dc,TMPLIT_EXPR:$c,DATA_ATTR:Hc,ARIA_ATTR:jc,IS_ALLOWED_URI:pr,IS_SCRIPT_OR_DATA:Vc,ATTR_WHITESPACE:zc,DOCTYPE_NAME:hr});const Wc=function(){return typeof window>"u"?null:window},qc=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function gr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wc();const e=F=>gr(F);if(e.version="3.0.9",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const o=n,r=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:f,Element:u,NodeFilter:w,NamedNodeMap:E=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:b,DOMParser:j,trustedTypes:$}=t,B=u.prototype,N=Xt(B,"cloneNode"),D=Xt(B,"nextSibling"),ee=Xt(B,"childNodes"),oe=Xt(B,"parentNode");if(typeof i=="function"){const F=n.createElement("template");F.content&&F.content.ownerDocument&&(n=F.content.ownerDocument)}let V,ye="";const{implementation:ae,createNodeIterator:g,createDocumentFragment:T,getElementsByTagName:U}=n,{importNode:P}=o;let v={};e.isSupported=typeof sr=="function"&&typeof oe=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_,ERB_EXPR:z,TMPLIT_EXPR:A,DATA_ATTR:W,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:se}=mr;let{IS_ALLOWED_URI:be}=mr,M=null;const ke=G({},[...lr,...Fn,...Un,...Mn,...ur]);let a=null;const d=G({},[...dr,...Dn,...fr,...Zt]);let m=Object.seal(ar(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),C=null,y=null,R=!0,k=!0,x=!1,O=!0,L=!1,H=!1,J=!1,Ce=!1,we=!1,ue=!1,je=!1,os=!0,rs=!1;const td="user-content-";let so=!0,Mt=!1,mt={},gt=null;const ss=G({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let is=null;const as=G({},["audio","video","img","source","image","track"]);let io=null;const cs=G({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),un="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let yt=We,ao=!1,co=null;const nd=G({},[un,dn,We],Nn);let Dt=null;const od=["application/xhtml+xml","text/html"],rd="text/html";let ce=null,bt=null;const sd=n.createElement("form"),ls=function(l){return l instanceof RegExp||l instanceof Function},lo=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(bt&&bt===l)){if((!l||typeof l!="object")&&(l={}),l=nt(l),Dt=od.indexOf(l.PARSER_MEDIA_TYPE)===-1?rd:l.PARSER_MEDIA_TYPE,ce=Dt==="application/xhtml+xml"?Nn:Yt,M=Ue(l,"ALLOWED_TAGS")?G({},l.ALLOWED_TAGS,ce):ke,a=Ue(l,"ALLOWED_ATTR")?G({},l.ALLOWED_ATTR,ce):d,co=Ue(l,"ALLOWED_NAMESPACES")?G({},l.ALLOWED_NAMESPACES,Nn):nd,io=Ue(l,"ADD_URI_SAFE_ATTR")?G(nt(cs),l.ADD_URI_SAFE_ATTR,ce):cs,is=Ue(l,"ADD_DATA_URI_TAGS")?G(nt(as),l.ADD_DATA_URI_TAGS,ce):as,gt=Ue(l,"FORBID_CONTENTS")?G({},l.FORBID_CONTENTS,ce):ss,C=Ue(l,"FORBID_TAGS")?G({},l.FORBID_TAGS,ce):{},y=Ue(l,"FORBID_ATTR")?G({},l.FORBID_ATTR,ce):{},mt=Ue(l,"USE_PROFILES")?l.USE_PROFILES:!1,R=l.ALLOW_ARIA_ATTR!==!1,k=l.ALLOW_DATA_ATTR!==!1,x=l.ALLOW_UNKNOWN_PROTOCOLS||!1,O=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=l.SAFE_FOR_TEMPLATES||!1,H=l.WHOLE_DOCUMENT||!1,we=l.RETURN_DOM||!1,ue=l.RETURN_DOM_FRAGMENT||!1,je=l.RETURN_TRUSTED_TYPE||!1,Ce=l.FORCE_BODY||!1,os=l.SANITIZE_DOM!==!1,rs=l.SANITIZE_NAMED_PROPS||!1,so=l.KEEP_CONTENT!==!1,Mt=l.IN_PLACE||!1,be=l.ALLOWED_URI_REGEXP||pr,yt=l.NAMESPACE||We,m=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&ls(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&ls(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(k=!1),ue&&(we=!0),mt&&(M=G({},ur),a=[],mt.html===!0&&(G(M,lr),G(a,dr)),mt.svg===!0&&(G(M,Fn),G(a,Dn),G(a,Zt)),mt.svgFilters===!0&&(G(M,Un),G(a,Dn),G(a,Zt)),mt.mathMl===!0&&(G(M,Mn),G(a,fr),G(a,Zt))),l.ADD_TAGS&&(M===ke&&(M=nt(M)),G(M,l.ADD_TAGS,ce)),l.ADD_ATTR&&(a===d&&(a=nt(a)),G(a,l.ADD_ATTR,ce)),l.ADD_URI_SAFE_ATTR&&G(io,l.ADD_URI_SAFE_ATTR,ce),l.FORBID_CONTENTS&&(gt===ss&&(gt=nt(gt)),G(gt,l.FORBID_CONTENTS,ce)),so&&(M["#text"]=!0),H&&G(M,["html","head","body"]),M.table&&(G(M,["tbody"]),delete C.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ot('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ot('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');V=l.TRUSTED_TYPES_POLICY,ye=V.createHTML("")}else V===void 0&&(V=qc($,r)),V!==null&&typeof ye=="string"&&(ye=V.createHTML(""));ge&&ge(l),bt=l}},us=G({},["mi","mo","mn","ms","mtext"]),ds=G({},["foreignobject","desc","title","annotation-xml"]),id=G({},["title","style","font","a","script"]),fs=G({},[...Fn,...Un,...Fc]),ps=G({},[...Mn,...Uc]),ad=function(l){let S=oe(l);(!S||!S.tagName)&&(S={namespaceURI:yt,tagName:"template"});const I=Yt(l.tagName),ne=Yt(S.tagName);return co[l.namespaceURI]?l.namespaceURI===dn?S.namespaceURI===We?I==="svg":S.namespaceURI===un?I==="svg"&&(ne==="annotation-xml"||us[ne]):!!fs[I]:l.namespaceURI===un?S.namespaceURI===We?I==="math":S.namespaceURI===dn?I==="math"&&ds[ne]:!!ps[I]:l.namespaceURI===We?S.namespaceURI===dn&&!ds[ne]||S.namespaceURI===un&&!us[ne]?!1:!ps[I]&&(id[I]||!fs[I]):!!(Dt==="application/xhtml+xml"&&co[l.namespaceURI]):!1},ot=function(l){Rt(e.removed,{element:l});try{l.parentNode.removeChild(l)}catch{l.remove()}},uo=function(l,S){try{Rt(e.removed,{attribute:S.getAttributeNode(l),from:S})}catch{Rt(e.removed,{attribute:null,from:S})}if(S.removeAttribute(l),l==="is"&&!a[l])if(we||ue)try{ot(S)}catch{}else try{S.setAttribute(l,"")}catch{}},hs=function(l){let S=null,I=null;if(Ce)l="<remove></remove>"+l;else{const me=Lc(l,/^[\r\n\t ]+/);I=me&&me[0]}Dt==="application/xhtml+xml"&&yt===We&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const ne=V?V.createHTML(l):l;if(yt===We)try{S=new j().parseFromString(ne,Dt)}catch{}if(!S||!S.documentElement){S=ae.createDocument(yt,"template",null);try{S.documentElement.innerHTML=ao?ye:ne}catch{}}const he=S.body||S.documentElement;return l&&I&&he.insertBefore(n.createTextNode(I),he.childNodes[0]||null),yt===We?U.call(S,H?"html":"body")[0]:H?S.documentElement:he},ms=function(l){return g.call(l.ownerDocument||l,l,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null)},cd=function(l){return l instanceof b&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof E)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},gs=function(l){return typeof f=="function"&&l instanceof f},qe=function(l,S,I){v[l]&&Jt(v[l],ne=>{ne.call(e,S,I,bt)})},ys=function(l){let S=null;if(qe("beforeSanitizeElements",l,null),cd(l))return ot(l),!0;const I=ce(l.nodeName);if(qe("uponSanitizeElement",l,{tagName:I,allowedTags:M}),l.hasChildNodes()&&!gs(l.firstElementChild)&&Te(/<[/\w]/g,l.innerHTML)&&Te(/<[/\w]/g,l.textContent))return ot(l),!0;if(!M[I]||C[I]){if(!C[I]&&ws(I)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I)))return!1;if(so&&!gt[I]){const ne=oe(l)||l.parentNode,he=ee(l)||l.childNodes;if(he&&ne){const me=he.length;for(let xe=me-1;xe>=0;--xe)ne.insertBefore(N(he[xe],!0),D(l))}}return ot(l),!0}return l instanceof u&&!ad(l)||(I==="noscript"||I==="noembed"||I==="noframes")&&Te(/<\/no(script|embed|frames)/i,l.innerHTML)?(ot(l),!0):(L&&l.nodeType===3&&(S=l.textContent,Jt([_,z,A],ne=>{S=Lt(S,ne," ")}),l.textContent!==S&&(Rt(e.removed,{element:l.cloneNode()}),l.textContent=S)),qe("afterSanitizeElements",l,null),!1)},bs=function(l,S,I){if(os&&(S==="id"||S==="name")&&(I in n||I in sd))return!1;if(!(k&&!y[S]&&Te(W,S))){if(!(R&&Te(te,S))){if(!a[S]||y[S]){if(!(ws(l)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,l)||m.tagNameCheck instanceof Function&&m.tagNameCheck(l))&&(m.attributeNameCheck instanceof RegExp&&Te(m.attributeNameCheck,S)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(S))||S==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I))))return!1}else if(!io[S]){if(!Te(be,Lt(I,se,""))){if(!((S==="src"||S==="xlink:href"||S==="href")&&l!=="script"&&Oc(I,"data:")===0&&is[l])){if(!(x&&!Te(ie,Lt(I,se,"")))){if(I)return!1}}}}}}return!0},ws=function(l){return l!=="annotation-xml"&&l.indexOf("-")>0},Es=function(l){qe("beforeSanitizeAttributes",l,null);const{attributes:S}=l;if(!S)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:a};let ne=S.length;for(;ne--;){const he=S[ne],{name:me,namespaceURI:xe,value:rt}=he,$t=ce(me);let Se=me==="value"?rt:Ic(rt);if(I.attrName=$t,I.attrValue=Se,I.keepAttr=!0,I.forceKeepAttr=void 0,qe("uponSanitizeAttribute",l,I),Se=I.attrValue,I.forceKeepAttr||(uo(me,l),!I.keepAttr))continue;if(!O&&Te(/\/>/i,Se)){uo(me,l);continue}L&&Jt([_,z,A],ks=>{Se=Lt(Se,ks," ")});const As=ce(l.nodeName);if(bs(As,$t,Se)){if(rs&&($t==="id"||$t==="name")&&(uo(me,l),Se=td+Se),V&&typeof $=="object"&&typeof $.getAttributeType=="function"&&!xe)switch($.getAttributeType(As,$t)){case"TrustedHTML":{Se=V.createHTML(Se);break}case"TrustedScriptURL":{Se=V.createScriptURL(Se);break}}try{xe?l.setAttributeNS(xe,me,Se):l.setAttribute(me,Se),cr(e.removed)}catch{}}}qe("afterSanitizeAttributes",l,null)},ld=function F(l){let S=null;const I=ms(l);for(qe("beforeSanitizeShadowDOM",l,null);S=I.nextNode();)qe("uponSanitizeShadowNode",S,null),!ys(S)&&(S.content instanceof s&&F(S.content),Es(S));qe("afterSanitizeShadowDOM",l,null)};return e.sanitize=function(F){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=null,I=null,ne=null,he=null;if(ao=!F,ao&&(F="<!-->"),typeof F!="string"&&!gs(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw Ot("dirty is not a string, aborting")}else throw Ot("toString is not a function");if(!e.isSupported)return F;if(J||lo(l),e.removed=[],typeof F=="string"&&(Mt=!1),Mt){if(F.nodeName){const rt=ce(F.nodeName);if(!M[rt]||C[rt])throw Ot("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof f)S=hs("<!---->"),I=S.ownerDocument.importNode(F,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?S=I:S.appendChild(I);else{if(!we&&!L&&!H&&F.indexOf("<")===-1)return V&&je?V.createHTML(F):F;if(S=hs(F),!S)return we?null:je?ye:""}S&&Ce&&ot(S.firstChild);const me=ms(Mt?F:S);for(;ne=me.nextNode();)ys(ne)||(ne.content instanceof s&&ld(ne.content),Es(ne));if(Mt)return F;if(we){if(ue)for(he=T.call(S.ownerDocument);S.firstChild;)he.appendChild(S.firstChild);else he=S;return(a.shadowroot||a.shadowrootmode)&&(he=P.call(o,he,!0)),he}let xe=H?S.outerHTML:S.innerHTML;return H&&M["!doctype"]&&S.ownerDocument&&S.ownerDocument.doctype&&S.ownerDocument.doctype.name&&Te(hr,S.ownerDocument.doctype.name)&&(xe="<!DOCTYPE "+S.ownerDocument.doctype.name+`>
65
- `+xe),L&&Jt([_,z,A],rt=>{xe=Lt(xe,rt," ")}),V&&je?V.createHTML(xe):xe},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lo(F),J=!0},e.clearConfig=function(){bt=null,J=!1},e.isValidAttribute=function(F,l,S){bt||lo({});const I=ce(F),ne=ce(l);return bs(I,ne,S)},e.addHook=function(F,l){typeof l=="function"&&(v[F]=v[F]||[],Rt(v[F],l))},e.removeHook=function(F){if(v[F])return cr(v[F])},e.removeHooks=function(F){v[F]&&(v[F]=[])},e.removeAllHooks=function(){v={}},e}var yr=gr();class br{get IsVisible(){return dt.isVisible()}}class Kc extends br{constructor(){super()}async CreateAlertAsync(e){let n="info",o,r;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",r=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(s=>{dt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${yr.sanitize(o)}</div>`}).then(()=>s(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}class Gc extends br{async CreateConfirmAsync(e){return new Promise(n=>{dt.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:yr.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async ConfirmAsync(e){return this.CreateConfirmAsync({text:e})}}const Jc=()=>new Kc,wr=()=>new Gc,Yc=["data-cor"],Xc={class:"sf-p-4"},Zc=c.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=wr(),o=c.ref("?"),r=e;async function s(){await n.CreateConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&r("logout")}function i(){const w=sessionStorage.getItem("name");let E="?";if(!w)return E;const b=w.split(" ").filter($=>$.length>0).map($=>$[0].toUpperCase()),j=Math.min(2,b.length);return E=b.slice(0,j).join(""),E.length>0?E:"?"}const f=c.computed(()=>{const w=o.value[0],E=w==="?"?0:(w.charCodeAt(0)-64)%19;return Math.max(E,0)}),u=c.ref(!1);return c.onMounted(()=>{o.value=i()}),(w,E)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{id:"sf-header-avatar","data-cor":f.value,onClick:E[0]||(E[0]=b=>u.value=!0)},c.toDisplayString(o.value),9,Yc),c.createVNode(ho,{visible:u.value,"onUpdate:visible":E[1]||(E[1]=b=>u.value=b),position:"right"},{title:c.withCtx(()=>[c.createTextVNode("Minha conta")]),default:c.withCtx(()=>[c.createElementVNode("div",Xc,[c.createVNode(mo,{color:"error",onClick:s},{default:c.withCtx(()=>[c.createTextVNode("Sair")]),_:1})])]),_:1},8,["visible"])],64))}}),Qc={},el={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},tl=[c.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function nl(t,e){return c.openBlock(),c.createElementBlock("svg",el,tl)}const ol=po(Qc,[["render",nl]]);class rl{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const $n=new rl,sl=[c.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],il=c.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(c.openBlock(),c.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>c.unref($n).Toggle&&c.unref($n).Toggle(...o))},sl))}}),al={id:"sf-layout"},cl=c.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),ll={class:"title"},ul={class:"sf-layout-nav-content"},dl=c.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),fl={id:"sf-layout-content"},pl=c.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=fn(),o=e;return c.onMounted(()=>{o("mounted")}),(r,s)=>(c.openBlock(),c.createElementBlock("div",al,[c.createElementVNode("header",null,[c.createElementVNode("div",{class:c.normalizeClass(["sf-layout-menu-toggler",{invert:c.unref(n).IsVisible}]),onClick:s[0]||(s[0]=i=>c.unref(n).Toggle())},[cl,c.createVNode(ol)],2),c.createElementVNode("div",ll,[c.renderSlot(r.$slots,"title")]),c.renderSlot(r.$slots,"action"),c.createVNode(pn,{text:"alternar tema"},{default:c.withCtx(()=>[c.createVNode(il)]),_:1}),c.createVNode(Zc,{onLogout:s[1]||(s[1]=i=>o("logout"))})]),c.createElementVNode("nav",{class:c.normalizeClass({visible:c.unref(n).IsVisible})},[c.createElementVNode("div",ul,[c.renderSlot(r.$slots,"menu")])],2),c.createElementVNode("main",{class:c.normalizeClass({"menu-visible":c.unref(n).IsVisible})},[dl,c.createElementVNode("section",fl,[c.renderSlot(r.$slots,"content")])],2)]))}}),hl=["href","data-active","onClick"],ml={class:"sf-navmenulink-text"},gl=c.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},iconFilled:{type:Boolean},exact:{type:Boolean}},setup(t){const e=t,n=fn();function o(r,s){r.preventDefault();const f=r.target.closest(".sf-layout-nav-content");s(),f&&f.clientWidth+10>document.body.clientWidth&&n.Close()}return(r,s)=>{const i=c.resolveComponent("router-link");return c.openBlock(),c.createBlock(i,{to:e.href,custom:""},{default:c.withCtx(({href:f,navigate:u,isExactActive:w,isActive:E})=>[c.createElementVNode("a",{class:"sf-navmenulink",href:f,"data-active":e.exact?w:E,onClick:b=>o(b,u)},[e.icon?(c.openBlock(),c.createBlock(wt,{key:0,icon:e.icon,filled:e.iconFilled,"button-props":{tabindex:-1}},null,8,["icon","filled"])):c.createCommentVNode("",!0),c.createElementVNode("span",ml,c.toDisplayString(e.text),1)],8,hl)]),_:1},8,["to"])}}}),yl=c.defineComponent({__name:"ScrollToTop",setup(t){const e=c.ref(!1),n=`--${+new Date}`;let o=null;function r(){o==null||o.scrollTo(0,0)}return c.onMounted(()=>{var s;o=((s=document.getElementById(n))==null?void 0:s.parentElement)??null,o&&o.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(s,i)=>(c.openBlock(),c.createElementBlock("button",{id:n,class:c.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:r},null,2))}}),bl=c.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Ke("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Ke("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function r(){return new Ke("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function s(){return new Ke("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(i,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n()),style:c.normalizeStyle(e.style)},[c.createElementVNode("div",{class:c.normalizeClass(r())},[c.renderSlot(i.$slots,"header")],2),c.createElementVNode("div",{class:c.normalizeClass(o())},[c.renderSlot(i.$slots,"default"),c.createVNode(yl)],2),c.createElementVNode("div",{class:c.normalizeClass(s())},[c.renderSlot(i.$slots,"footer")],2)],6))}}),wl={class:"sf-tab-navigation"},El=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],Al=["data-active"],kl=["href","onClick"],Cl=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],xl=c.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=c.ref(null),o=new ResizeObserver(u=>{f()}),r=c.ref(!1),s=c.ref(!1);function i(u=!1){const w=n.value.clientWidth;n.value.scrollLeft+=u?-w:w}function f(){const u=n.value.scrollWidth-n.value.clientWidth;r.value=n.value.scrollLeft>10,s.value=n.value.scrollLeft<u-10}return c.onMounted(()=>{n.value.addEventListener("scroll",f),o.observe(n.value)}),c.onBeforeUnmount(()=>{var u;try{(u=n.value)==null||u.removeEventListener("scroll",f),o.unobserve(n.value),o.disconnect()}catch{}}),(u,w)=>{const E=c.resolveComponent("RouterLink");return c.openBlock(),c.createElementBlock("div",wl,[c.createElementVNode("div",{class:c.normalizeClass(["left-arrow",{active:r.value}]),onClick:w[0]||(w[0]=b=>i(!0))},El,2),c.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.tabs,b=>(c.openBlock(),c.createBlock(E,{to:b.route,custom:!0},{default:c.withCtx(({navigate:j,isActive:$})=>[c.createElementVNode("li",{"data-active":$},[c.renderSlot(u.$slots,"item",{item:b,navigate:j,isActive:$},()=>[c.createElementVNode("a",{href:b.route,class:c.normalizeClass({active:$}),onClick:j},c.toDisplayString(b.text),11,kl)])],8,Al)]),_:2},1032,["to"]))),256))],512),c.createElementVNode("div",{class:c.normalizeClass(["right-arrow",{active:s.value}]),onClick:w[1]||(w[1]=b=>i())},Cl,2)])}}}),Sl=["data-icon"],_l=c.defineComponent({__name:"Message",props:{color:{default:"info"},class:{},style:{},icon:{}},setup(t){const e=t,n=c.computed(()=>{if(e.icon)return e.icon;switch(e.color){case"error":return"cancel";case"info":return"info";case"warn":return"warning";case"success":return"check";case"help":return"help";default:return null}}),o=c.computed(()=>new Ke("sf-message").AddClass("sf-message-error",e.color==="error").AddClass("sf-message-info",e.color==="info").AddClass("sf-message-warning",e.color==="warn").AddClass("sf-message-success",e.color==="success").AddClass("sf-message-help",e.color==="help").AddClass("sf-message-primary",e.color==="primary").AddClass("sf-message-secondary",e.color==="secondary").AddClass(e.class).Build());return(r,s)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(o.value),"data-icon":n.value},[c.renderSlot(r.$slots,"default")],10,Sl))}});var vl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Pl(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),n}var Qt={};Qt.byteLength=Ol,Qt.toByteArray=Bl,Qt.fromByteArray=Ul;for(var De=[],Oe=[],Rl=typeof Uint8Array<"u"?Uint8Array:Array,Hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft=0,Ll=Hn.length;ft<Ll;++ft)De[ft]=Hn[ft],Oe[Hn.charCodeAt(ft)]=ft;Oe[45]=62,Oe[95]=63;function Er(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var o=n===e?0:4-n%4;return[n,o]}function Ol(t){var e=Er(t),n=e[0],o=e[1];return(n+o)*3/4-o}function Il(t,e,n){return(e+n)*3/4-n}function Bl(t){var e,n=Er(t),o=n[0],r=n[1],s=new Rl(Il(t,o,r)),i=0,f=r>0?o-4:o,u;for(u=0;u<f;u+=4)e=Oe[t.charCodeAt(u)]<<18|Oe[t.charCodeAt(u+1)]<<12|Oe[t.charCodeAt(u+2)]<<6|Oe[t.charCodeAt(u+3)],s[i++]=e>>16&255,s[i++]=e>>8&255,s[i++]=e&255;return r===2&&(e=Oe[t.charCodeAt(u)]<<2|Oe[t.charCodeAt(u+1)]>>4,s[i++]=e&255),r===1&&(e=Oe[t.charCodeAt(u)]<<10|Oe[t.charCodeAt(u+1)]<<4|Oe[t.charCodeAt(u+2)]>>2,s[i++]=e>>8&255,s[i++]=e&255),s}function Nl(t){return De[t>>18&63]+De[t>>12&63]+De[t>>6&63]+De[t&63]}function Fl(t,e,n){for(var o,r=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),r.push(Nl(o));return r.join("")}function Ul(t){for(var e,n=t.length,o=n%3,r=[],s=16383,i=0,f=n-o;i<f;i+=s)r.push(Fl(t,i,i+s>f?f:i+s));return o===1?(e=t[n-1],r.push(De[e>>2]+De[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(De[e>>10]+De[e>>4&63]+De[e<<2&63]+"=")),r.join("")}var Ar={exports:{}};const kr=Pl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
64
+ If you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md`)}),e};function Za(){const t=K.domCache.get(this),e=K.innerParams.get(this);if(!e){Yo(this);return}t.popup&&q.swalCloseEventFinishedCallback&&(q.swalCloseEventFinishedCallback(),delete q.swalCloseEventFinishedCallback),q.deferDisposalTimer&&(clearTimeout(q.deferDisposalTimer),delete q.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Qa(this)}const Qa=t=>{Yo(t),delete t.params,delete q.keydownHandler,delete q.keydownTarget,delete q.currentInstance},Yo=t=>{t.isAwaitingPromise()?(Tn(K,t),K.awaitingPromise.set(t,!0)):(Tn(Tt,t),Tn(K,t))},Tn=(t,e)=>{for(const n in t)t[n].delete(e)},Xo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Za,close:Kt,closeModal:Kt,closePopup:Kt,closeToast:Kt,disableButtons:za,disableInput:qa,disableLoading:jo,enableButtons:Va,enableInput:Wa,getInput:Sa,getProgressSteps:Ja,handleAwaitingPromise:Pt,hideLoading:jo,isAwaitingPromise:Ua,rejectPromise:Da,resetValidationMessage:Ga,showValidationMessage:Ka,update:Ya},Symbol.toStringTag,{value:"Module"})),ec=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.input?Zo(t,"confirm"):Rn(t,!0)},tc=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Zo(t,"deny"):Pn(t,!1)},nc=(t,e)=>{t.disableButtons(),e(ct.cancel)},Zo=(t,e)=>{const n=K.innerParams.get(t);if(!n.input)return Ze(`The "input" parameter is needed to be set when using returnInputValueOn${hn(e)}`);const o=ya(t,n);n.inputValidator?oc(t,o,e):t.getInput().checkValidity()?e==="deny"?Pn(t,o):Rn(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},oc=(t,e,n)=>{const o=K.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>Et(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Pn(t,e):Rn(t,e)})},Pn=(t,e)=>{const n=K.innerParams.get(t||void 0);n.showLoaderOnDeny&&lt(Ge()),n.preDeny?(K.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Et(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),Pt(t)):t.closePopup({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>er(t||void 0,r))):t.closePopup({isDenied:!0,value:e})},Qo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},er=(t,e)=>{t.rejectPromise(e)},Rn=(t,e)=>{const n=K.innerParams.get(t||void 0);n.showLoaderOnConfirm&&lt(),n.preConfirm?(t.resetValidationMessage(),K.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>Et(n.preConfirm(e,n.validationMessage))).then(r=>{ve(Vt())||r===!1?(t.hideLoading(),Pt(t)):Qo(t,typeof r>"u"?e:r)}).catch(r=>er(t||void 0,r))):Qo(t,e)},rc=(t,e,n)=>{K.innerParams.get(t).toast?sc(t,e,n):(ac(e),cc(e),lc(t,e,n))},sc=(t,e,n)=>{e.popup.onclick=()=>{const o=K.innerParams.get(t);o&&(ic(o)||o.timer||o.input)||n(ct.close)}},ic=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Gt=!1;const ac=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Gt=!0)}}},cc=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(Gt=!0)}}},lc=(t,e,n)=>{e.container.onclick=o=>{const r=K.innerParams.get(t);if(Gt){Gt=!1;return}o.target===e.container&&Ht(r.allowOutsideClick)&&n(ct.backdrop)}},uc=t=>typeof t=="object"&&t.jquery,tr=t=>t instanceof Element||uc(t),dc=t=>{const e={};return typeof t[0]=="object"&&!tr(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const r=t[o];typeof r=="string"||tr(r)?e[n]=r:r!==void 0&&Ze(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};function fc(...t){const e=this;return new e(...t)}function pc(t){class e extends this{_main(o,r){return super._main(o,Object.assign({},t,r))}}return e}const hc=()=>q.timeout&&q.timeout.getTimerLeft(),nr=()=>{if(q.timeout)return ti(),q.timeout.stop()},or=()=>{if(q.timeout){const t=q.timeout.start();return kn(t),t}},mc=()=>{const t=q.timeout;return t&&(t.running?nr():or())},gc=t=>{if(q.timeout){const e=q.timeout.increase(t);return kn(e,!0),e}},yc=()=>q.timeout&&q.timeout.isRunning();let rr=!1;const Ln={};function bc(t="data-swal-template"){Ln[t]=this,rr||(document.body.addEventListener("click",wc),rr=!0)}const wc=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in Ln){const o=e.getAttribute(n);if(o){Ln[n].fire({template:o});return}}},Ec=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:dc,bindClickHandler:bc,clickCancel:Ta,clickConfirm:Vo,clickDeny:va,enableLoading:lt,fire:fc,getActions:xt,getCancelButton:Qe,getCloseButton:bn,getConfirmButton:Ne,getContainer:de,getDenyButton:Ge,getFocusableElements:wn,getFooter:xo,getHtmlContainer:jt,getIcon:Ct,getImage:ko,getInputLabel:Ys,getLoader:it,getPopup:Q,getTimerLeft:hc,getTimerProgressBar:zt,getTitle:Ao,getValidationMessage:Vt,increaseTimer:gc,isDeprecatedParameter:yn,isLoading:Zs,isTimerRunning:yc,isUpdatableParameter:wo,isValidParameter:bo,isVisible:_a,mixin:pc,resumeTimer:or,showLoading:lt,stopTimer:nr,toggleTimer:mc},Symbol.toStringTag,{value:"Module"}));let On;class ut{constructor(...e){if(typeof window>"u")return;On=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const o=this._main(this.params);K.promise.set(this,o)}_main(e,n={}){Gs(Object.assign({},n,e)),q.currentInstance&&(q.currentInstance._destroy(),En()&&Fo()),q.currentInstance=this;const o=kc(e,n);ea(o),Object.freeze(o),q.timeout&&(q.timeout.stop(),delete q.timeout),clearTimeout(q.restoreFocusTimeout);const r=Cc(this);return No(this,o),K.innerParams.set(this,o),Ac(this,r,o)}then(e){return K.promise.get(this).then(e)}finally(e){return K.promise.get(this).finally(e)}}const Ac=(t,e,n)=>new Promise((o,r)=>{const s=i=>{t.closePopup({isDismissed:!0,dismiss:i})};Tt.swalPromiseResolve.set(t,o),Tt.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>ec(t),e.denyButton.onclick=()=>tc(t),e.cancelButton.onclick=()=>nc(t,s),e.closeButton.onclick=()=>s(ct.close),rc(t,e,s),Pa(t,q,n,s),ga(t,n),da(n),xc(q,n,s),Sc(e,n),setTimeout(()=>{e.container.scrollTop=0})}),kc=(t,e)=>{const n=zi(t),o=Object.assign({},st,e,n,t);return o.showClass=Object.assign({},st.showClass,o.showClass),o.hideClass=Object.assign({},st.hideClass,o.hideClass),o},Cc=t=>{const e={popup:Q(),container:de(),actions:xt(),confirmButton:Ne(),denyButton:Ge(),cancelButton:Qe(),loader:it(),closeButton:bn(),validationMessage:Vt(),progressSteps:Co()};return K.domCache.set(t,e),e},xc=(t,e,n)=>{const o=zt();pe(o),e.timer&&(t.timeout=new ta(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(le(o),Le(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&kn(e.timer)})))},Sc=(t,e)=>{if(!e.toast){if(!Ht(e.allowEnterKey))return vc();_c(t,e)||vn(e,-1,1)}},_c=(t,e)=>e.focusDeny&&ve(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&ve(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&ve(t.confirmButton)?(t.confirmButton.focus(),!0):!1,vc=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(ut.prototype,Xo),Object.assign(ut,Ec),Object.keys(Xo).forEach(t=>{ut[t]=function(...e){if(On)return On[t](...e)}}),ut.DismissReason=ct,ut.version="11.4.8";const dt=ut;dt.default=dt;/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:sr,setPrototypeOf:ir,isFrozen:Tc,getPrototypeOf:Pc,getOwnPropertyDescriptor:Rc}=Object;let{freeze:ge,seal:Fe,create:ar}=Object,{apply:In,construct:Bn}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e}),Fe||(Fe=function(e){return e}),In||(In=function(e,n,o){return e.apply(n,o)}),Bn||(Bn=function(e,n){return new e(...n)});const Jt=Pe(Array.prototype.forEach),cr=Pe(Array.prototype.pop),Rt=Pe(Array.prototype.push),Yt=Pe(String.prototype.toLowerCase),Nn=Pe(String.prototype.toString),Lc=Pe(String.prototype.match),Lt=Pe(String.prototype.replace),Oc=Pe(String.prototype.indexOf),Ic=Pe(String.prototype.trim),Ue=Pe(Object.prototype.hasOwnProperty),Te=Pe(RegExp.prototype.test),Ot=Bc(TypeError);function Pe(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return In(t,e,o)}}function Bc(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Bn(t,n)}}function G(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yt;ir&&ir(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const s=n(r);s!==r&&(Tc(e)||(e[o]=s),r=s)}t[r]=!0}return t}function Nc(t){for(let e=0;e<t.length;e++)Ue(t,e)||(t[e]=null);return t}function nt(t){const e=ar(null);for(const[n,o]of sr(t))Ue(t,n)&&(Array.isArray(o)?e[n]=Nc(o):o&&typeof o=="object"&&o.constructor===Object?e[n]=nt(o):e[n]=o);return e}function Xt(t,e){for(;t!==null;){const o=Rc(t,e);if(o){if(o.get)return Pe(o.get);if(typeof o.value=="function")return Pe(o.value)}t=Pc(t)}function n(){return null}return n}const lr=ge(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Fn=ge(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Un=ge(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fc=ge(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Mn=ge(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Uc=ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ur=ge(["#text"]),dr=ge(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Dn=ge(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fr=ge(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zt=ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mc=Fe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Dc=Fe(/<%[\w\W]*|[\w\W]*%>/gm),$c=Fe(/\${[\w\W]*}/gm),Hc=Fe(/^data-[\-\w.\u00B7-\uFFFF]/),jc=Fe(/^aria-[\-\w]+$/),pr=Fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vc=Fe(/^(?:\w+script|data):/i),zc=Fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hr=Fe(/^html$/i);var mr=Object.freeze({__proto__:null,MUSTACHE_EXPR:Mc,ERB_EXPR:Dc,TMPLIT_EXPR:$c,DATA_ATTR:Hc,ARIA_ATTR:jc,IS_ALLOWED_URI:pr,IS_SCRIPT_OR_DATA:Vc,ATTR_WHITESPACE:zc,DOCTYPE_NAME:hr});const Wc=function(){return typeof window>"u"?null:window},qc=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let o=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(o=n.getAttribute(r));const s="dompurify"+(o?"#"+o:"");try{return e.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function gr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wc();const e=F=>gr(F);if(e.version="3.0.9",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const o=n,r=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:i,Node:f,Element:u,NodeFilter:w,NamedNodeMap:E=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:b,DOMParser:j,trustedTypes:$}=t,B=u.prototype,N=Xt(B,"cloneNode"),D=Xt(B,"nextSibling"),ee=Xt(B,"childNodes"),oe=Xt(B,"parentNode");if(typeof i=="function"){const F=n.createElement("template");F.content&&F.content.ownerDocument&&(n=F.content.ownerDocument)}let V,ye="";const{implementation:ae,createNodeIterator:g,createDocumentFragment:T,getElementsByTagName:U}=n,{importNode:P}=o;let v={};e.isSupported=typeof sr=="function"&&typeof oe=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_,ERB_EXPR:z,TMPLIT_EXPR:A,DATA_ATTR:W,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:se}=mr;let{IS_ALLOWED_URI:be}=mr,M=null;const ke=G({},[...lr,...Fn,...Un,...Mn,...ur]);let a=null;const d=G({},[...dr,...Dn,...fr,...Zt]);let m=Object.seal(ar(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),C=null,y=null,R=!0,k=!0,x=!1,O=!0,L=!1,H=!1,J=!1,Ce=!1,we=!1,ue=!1,je=!1,os=!0,rs=!1;const nd="user-content-";let so=!0,Mt=!1,mt={},gt=null;const ss=G({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let is=null;const as=G({},["audio","video","img","source","image","track"]);let io=null;const cs=G({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),un="http://www.w3.org/1998/Math/MathML",dn="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let yt=We,ao=!1,co=null;const od=G({},[un,dn,We],Nn);let Dt=null;const rd=["application/xhtml+xml","text/html"],sd="text/html";let ce=null,bt=null;const id=n.createElement("form"),ls=function(l){return l instanceof RegExp||l instanceof Function},lo=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(bt&&bt===l)){if((!l||typeof l!="object")&&(l={}),l=nt(l),Dt=rd.indexOf(l.PARSER_MEDIA_TYPE)===-1?sd:l.PARSER_MEDIA_TYPE,ce=Dt==="application/xhtml+xml"?Nn:Yt,M=Ue(l,"ALLOWED_TAGS")?G({},l.ALLOWED_TAGS,ce):ke,a=Ue(l,"ALLOWED_ATTR")?G({},l.ALLOWED_ATTR,ce):d,co=Ue(l,"ALLOWED_NAMESPACES")?G({},l.ALLOWED_NAMESPACES,Nn):od,io=Ue(l,"ADD_URI_SAFE_ATTR")?G(nt(cs),l.ADD_URI_SAFE_ATTR,ce):cs,is=Ue(l,"ADD_DATA_URI_TAGS")?G(nt(as),l.ADD_DATA_URI_TAGS,ce):as,gt=Ue(l,"FORBID_CONTENTS")?G({},l.FORBID_CONTENTS,ce):ss,C=Ue(l,"FORBID_TAGS")?G({},l.FORBID_TAGS,ce):{},y=Ue(l,"FORBID_ATTR")?G({},l.FORBID_ATTR,ce):{},mt=Ue(l,"USE_PROFILES")?l.USE_PROFILES:!1,R=l.ALLOW_ARIA_ATTR!==!1,k=l.ALLOW_DATA_ATTR!==!1,x=l.ALLOW_UNKNOWN_PROTOCOLS||!1,O=l.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=l.SAFE_FOR_TEMPLATES||!1,H=l.WHOLE_DOCUMENT||!1,we=l.RETURN_DOM||!1,ue=l.RETURN_DOM_FRAGMENT||!1,je=l.RETURN_TRUSTED_TYPE||!1,Ce=l.FORCE_BODY||!1,os=l.SANITIZE_DOM!==!1,rs=l.SANITIZE_NAMED_PROPS||!1,so=l.KEEP_CONTENT!==!1,Mt=l.IN_PLACE||!1,be=l.ALLOWED_URI_REGEXP||pr,yt=l.NAMESPACE||We,m=l.CUSTOM_ELEMENT_HANDLING||{},l.CUSTOM_ELEMENT_HANDLING&&ls(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=l.CUSTOM_ELEMENT_HANDLING.tagNameCheck),l.CUSTOM_ELEMENT_HANDLING&&ls(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),l.CUSTOM_ELEMENT_HANDLING&&typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(k=!1),ue&&(we=!0),mt&&(M=G({},ur),a=[],mt.html===!0&&(G(M,lr),G(a,dr)),mt.svg===!0&&(G(M,Fn),G(a,Dn),G(a,Zt)),mt.svgFilters===!0&&(G(M,Un),G(a,Dn),G(a,Zt)),mt.mathMl===!0&&(G(M,Mn),G(a,fr),G(a,Zt))),l.ADD_TAGS&&(M===ke&&(M=nt(M)),G(M,l.ADD_TAGS,ce)),l.ADD_ATTR&&(a===d&&(a=nt(a)),G(a,l.ADD_ATTR,ce)),l.ADD_URI_SAFE_ATTR&&G(io,l.ADD_URI_SAFE_ATTR,ce),l.FORBID_CONTENTS&&(gt===ss&&(gt=nt(gt)),G(gt,l.FORBID_CONTENTS,ce)),so&&(M["#text"]=!0),H&&G(M,["html","head","body"]),M.table&&(G(M,["tbody"]),delete C.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ot('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ot('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');V=l.TRUSTED_TYPES_POLICY,ye=V.createHTML("")}else V===void 0&&(V=qc($,r)),V!==null&&typeof ye=="string"&&(ye=V.createHTML(""));ge&&ge(l),bt=l}},us=G({},["mi","mo","mn","ms","mtext"]),ds=G({},["foreignobject","desc","title","annotation-xml"]),ad=G({},["title","style","font","a","script"]),fs=G({},[...Fn,...Un,...Fc]),ps=G({},[...Mn,...Uc]),cd=function(l){let S=oe(l);(!S||!S.tagName)&&(S={namespaceURI:yt,tagName:"template"});const I=Yt(l.tagName),ne=Yt(S.tagName);return co[l.namespaceURI]?l.namespaceURI===dn?S.namespaceURI===We?I==="svg":S.namespaceURI===un?I==="svg"&&(ne==="annotation-xml"||us[ne]):!!fs[I]:l.namespaceURI===un?S.namespaceURI===We?I==="math":S.namespaceURI===dn?I==="math"&&ds[ne]:!!ps[I]:l.namespaceURI===We?S.namespaceURI===dn&&!ds[ne]||S.namespaceURI===un&&!us[ne]?!1:!ps[I]&&(ad[I]||!fs[I]):!!(Dt==="application/xhtml+xml"&&co[l.namespaceURI]):!1},ot=function(l){Rt(e.removed,{element:l});try{l.parentNode.removeChild(l)}catch{l.remove()}},uo=function(l,S){try{Rt(e.removed,{attribute:S.getAttributeNode(l),from:S})}catch{Rt(e.removed,{attribute:null,from:S})}if(S.removeAttribute(l),l==="is"&&!a[l])if(we||ue)try{ot(S)}catch{}else try{S.setAttribute(l,"")}catch{}},hs=function(l){let S=null,I=null;if(Ce)l="<remove></remove>"+l;else{const me=Lc(l,/^[\r\n\t ]+/);I=me&&me[0]}Dt==="application/xhtml+xml"&&yt===We&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const ne=V?V.createHTML(l):l;if(yt===We)try{S=new j().parseFromString(ne,Dt)}catch{}if(!S||!S.documentElement){S=ae.createDocument(yt,"template",null);try{S.documentElement.innerHTML=ao?ye:ne}catch{}}const he=S.body||S.documentElement;return l&&I&&he.insertBefore(n.createTextNode(I),he.childNodes[0]||null),yt===We?U.call(S,H?"html":"body")[0]:H?S.documentElement:he},ms=function(l){return g.call(l.ownerDocument||l,l,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null)},ld=function(l){return l instanceof b&&(typeof l.nodeName!="string"||typeof l.textContent!="string"||typeof l.removeChild!="function"||!(l.attributes instanceof E)||typeof l.removeAttribute!="function"||typeof l.setAttribute!="function"||typeof l.namespaceURI!="string"||typeof l.insertBefore!="function"||typeof l.hasChildNodes!="function")},gs=function(l){return typeof f=="function"&&l instanceof f},qe=function(l,S,I){v[l]&&Jt(v[l],ne=>{ne.call(e,S,I,bt)})},ys=function(l){let S=null;if(qe("beforeSanitizeElements",l,null),ld(l))return ot(l),!0;const I=ce(l.nodeName);if(qe("uponSanitizeElement",l,{tagName:I,allowedTags:M}),l.hasChildNodes()&&!gs(l.firstElementChild)&&Te(/<[/\w]/g,l.innerHTML)&&Te(/<[/\w]/g,l.textContent))return ot(l),!0;if(!M[I]||C[I]){if(!C[I]&&ws(I)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I)))return!1;if(so&&!gt[I]){const ne=oe(l)||l.parentNode,he=ee(l)||l.childNodes;if(he&&ne){const me=he.length;for(let xe=me-1;xe>=0;--xe)ne.insertBefore(N(he[xe],!0),D(l))}}return ot(l),!0}return l instanceof u&&!cd(l)||(I==="noscript"||I==="noembed"||I==="noframes")&&Te(/<\/no(script|embed|frames)/i,l.innerHTML)?(ot(l),!0):(L&&l.nodeType===3&&(S=l.textContent,Jt([_,z,A],ne=>{S=Lt(S,ne," ")}),l.textContent!==S&&(Rt(e.removed,{element:l.cloneNode()}),l.textContent=S)),qe("afterSanitizeElements",l,null),!1)},bs=function(l,S,I){if(os&&(S==="id"||S==="name")&&(I in n||I in id))return!1;if(!(k&&!y[S]&&Te(W,S))){if(!(R&&Te(te,S))){if(!a[S]||y[S]){if(!(ws(l)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,l)||m.tagNameCheck instanceof Function&&m.tagNameCheck(l))&&(m.attributeNameCheck instanceof RegExp&&Te(m.attributeNameCheck,S)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(S))||S==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I))))return!1}else if(!io[S]){if(!Te(be,Lt(I,se,""))){if(!((S==="src"||S==="xlink:href"||S==="href")&&l!=="script"&&Oc(I,"data:")===0&&is[l])){if(!(x&&!Te(ie,Lt(I,se,"")))){if(I)return!1}}}}}}return!0},ws=function(l){return l!=="annotation-xml"&&l.indexOf("-")>0},Es=function(l){qe("beforeSanitizeAttributes",l,null);const{attributes:S}=l;if(!S)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:a};let ne=S.length;for(;ne--;){const he=S[ne],{name:me,namespaceURI:xe,value:rt}=he,$t=ce(me);let Se=me==="value"?rt:Ic(rt);if(I.attrName=$t,I.attrValue=Se,I.keepAttr=!0,I.forceKeepAttr=void 0,qe("uponSanitizeAttribute",l,I),Se=I.attrValue,I.forceKeepAttr||(uo(me,l),!I.keepAttr))continue;if(!O&&Te(/\/>/i,Se)){uo(me,l);continue}L&&Jt([_,z,A],ks=>{Se=Lt(Se,ks," ")});const As=ce(l.nodeName);if(bs(As,$t,Se)){if(rs&&($t==="id"||$t==="name")&&(uo(me,l),Se=nd+Se),V&&typeof $=="object"&&typeof $.getAttributeType=="function"&&!xe)switch($.getAttributeType(As,$t)){case"TrustedHTML":{Se=V.createHTML(Se);break}case"TrustedScriptURL":{Se=V.createScriptURL(Se);break}}try{xe?l.setAttributeNS(xe,me,Se):l.setAttribute(me,Se),cr(e.removed)}catch{}}}qe("afterSanitizeAttributes",l,null)},ud=function F(l){let S=null;const I=ms(l);for(qe("beforeSanitizeShadowDOM",l,null);S=I.nextNode();)qe("uponSanitizeShadowNode",S,null),!ys(S)&&(S.content instanceof s&&F(S.content),Es(S));qe("afterSanitizeShadowDOM",l,null)};return e.sanitize=function(F){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=null,I=null,ne=null,he=null;if(ao=!F,ao&&(F="<!-->"),typeof F!="string"&&!gs(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw Ot("dirty is not a string, aborting")}else throw Ot("toString is not a function");if(!e.isSupported)return F;if(J||lo(l),e.removed=[],typeof F=="string"&&(Mt=!1),Mt){if(F.nodeName){const rt=ce(F.nodeName);if(!M[rt]||C[rt])throw Ot("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof f)S=hs("<!---->"),I=S.ownerDocument.importNode(F,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?S=I:S.appendChild(I);else{if(!we&&!L&&!H&&F.indexOf("<")===-1)return V&&je?V.createHTML(F):F;if(S=hs(F),!S)return we?null:je?ye:""}S&&Ce&&ot(S.firstChild);const me=ms(Mt?F:S);for(;ne=me.nextNode();)ys(ne)||(ne.content instanceof s&&ud(ne.content),Es(ne));if(Mt)return F;if(we){if(ue)for(he=T.call(S.ownerDocument);S.firstChild;)he.appendChild(S.firstChild);else he=S;return(a.shadowroot||a.shadowrootmode)&&(he=P.call(o,he,!0)),he}let xe=H?S.outerHTML:S.innerHTML;return H&&M["!doctype"]&&S.ownerDocument&&S.ownerDocument.doctype&&S.ownerDocument.doctype.name&&Te(hr,S.ownerDocument.doctype.name)&&(xe="<!DOCTYPE "+S.ownerDocument.doctype.name+`>
65
+ `+xe),L&&Jt([_,z,A],rt=>{xe=Lt(xe,rt," ")}),V&&je?V.createHTML(xe):xe},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lo(F),J=!0},e.clearConfig=function(){bt=null,J=!1},e.isValidAttribute=function(F,l,S){bt||lo({});const I=ce(F),ne=ce(l);return bs(I,ne,S)},e.addHook=function(F,l){typeof l=="function"&&(v[F]=v[F]||[],Rt(v[F],l))},e.removeHook=function(F){if(v[F])return cr(v[F])},e.removeHooks=function(F){v[F]&&(v[F]=[])},e.removeAllHooks=function(){v={}},e}var yr=gr();class br{get IsVisible(){return dt.isVisible()}}class Kc extends br{constructor(){super()}async CreateAlertAsync(e){let n="info",o,r;return typeof e=="string"||Array.isArray(e)?o=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",r=e.title??"",o=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(s=>{dt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:r,html:`<div style="max-height: 50vh; overflow: auto">${yr.sanitize(o)}</div>`}).then(()=>s(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}class Gc extends br{async CreateConfirmAsync(e){return new Promise(n=>{dt.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:yr.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async ConfirmAsync(e){return this.CreateConfirmAsync({text:e})}}const Jc=()=>new Kc,wr=()=>new Gc,Yc=["data-cor"],Xc={class:"sf-p-4"},Zc=c.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=wr(),o=c.ref("?"),r=e;async function s(){await n.CreateConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&r("logout")}function i(){const w=sessionStorage.getItem("name");let E="?";if(!w)return E;const b=w.split(" ").filter($=>$.length>0).map($=>$[0].toUpperCase()),j=Math.min(2,b.length);return E=b.slice(0,j).join(""),E.length>0?E:"?"}const f=c.computed(()=>{const w=o.value[0],E=w==="?"?0:(w.charCodeAt(0)-64)%19;return Math.max(E,0)}),u=c.ref(!1);return c.onMounted(()=>{o.value=i()}),(w,E)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{id:"sf-header-avatar","data-cor":f.value,onClick:E[0]||(E[0]=b=>u.value=!0)},c.toDisplayString(o.value),9,Yc),c.createVNode(ho,{visible:u.value,"onUpdate:visible":E[1]||(E[1]=b=>u.value=b),position:"right"},{title:c.withCtx(()=>[c.createTextVNode("Minha conta")]),default:c.withCtx(()=>[c.createElementVNode("div",Xc,[c.createVNode(mo,{color:"error",onClick:s},{default:c.withCtx(()=>[c.createTextVNode("Sair")]),_:1})])]),_:1},8,["visible"])],64))}}),Qc={},el={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},tl=[c.createElementVNode("path",{d:"m307.231-83.463-54.999-55.23 343.923-343.922-343.923-343.539 54.999-54.614 398.153 398.153L307.231-83.462Z"},null,-1)];function nl(t,e){return c.openBlock(),c.createElementBlock("svg",el,tl)}const ol=po(Qc,[["render",nl]]);class rl{get storedTheme(){return localStorage.getItem("color-scheme")}get IsDark(){return document.documentElement.classList.contains("dark")}Toggle(){this.IsDark?this.EnableLightMode():this.EnableDarkMode()}EnableDarkMode(){document.documentElement.classList.add("dark"),document.documentElement.classList.remove("light"),localStorage.setItem("color-scheme","dark")}EnableLightMode(){document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),localStorage.setItem("color-scheme","light")}SetInitialTheme(){if(this.storedTheme==="light")return this.EnableLightMode();if(this.storedTheme==="dark")return this.EnableDarkMode();if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)return this.EnableDarkMode();this.EnableLightMode()}}const $n=new rl,sl=[c.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="472.39" height="472.39" viewBox="0 0 472.39 472.39"><g class="toggle-sun"><path d="M403.21,167V69.18H305.38L236.2,0,167,69.18H69.18V167L0,236.2l69.18,69.18v97.83H167l69.18,69.18,69.18-69.18h97.83V305.38l69.18-69.18Zm-167,198.17a129,129,0,1,1,129-129A129,129,0,0,1,236.2,365.19Z"></path></g><g class="toggle-circle"><circle class="cls-1" cx="236.2" cy="236.2" r="103.78"></circle></g></svg>',1)],il=c.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(c.openBlock(),c.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>c.unref($n).Toggle&&c.unref($n).Toggle(...o))},sl))}}),al={id:"sf-layout"},cl=c.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),ll={class:"title"},ul={class:"sf-layout-nav-content"},dl=c.createElementVNode("div",{class:"sf-layout-nav-footer"},[c.createElementVNode("div",{class:"sf-layout-nav-footer-logo"})],-1),fl=c.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),pl={id:"sf-layout-content"},hl=c.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=fn(),o=e;return c.onMounted(()=>{o("mounted")}),(r,s)=>(c.openBlock(),c.createElementBlock("div",al,[c.createElementVNode("header",null,[c.createElementVNode("div",{class:c.normalizeClass(["sf-layout-menu-toggler",{invert:c.unref(n).IsVisible}]),onClick:s[0]||(s[0]=i=>c.unref(n).Toggle())},[cl,c.createVNode(ol)],2),c.createElementVNode("div",ll,[c.renderSlot(r.$slots,"title")]),c.renderSlot(r.$slots,"action"),c.createVNode(pn,{text:"alternar tema"},{default:c.withCtx(()=>[c.createVNode(il)]),_:1}),c.createVNode(Zc,{onLogout:s[1]||(s[1]=i=>o("logout"))})]),c.createElementVNode("nav",{class:c.normalizeClass({visible:c.unref(n).IsVisible})},[c.createElementVNode("div",ul,[c.renderSlot(r.$slots,"menu")]),dl],2),c.createElementVNode("main",{class:c.normalizeClass({"menu-visible":c.unref(n).IsVisible})},[fl,c.createElementVNode("section",pl,[c.renderSlot(r.$slots,"content")])],2)]))}}),ml=["href","data-active","onClick"],gl={class:"sf-navmenulink-text"},yl=c.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},iconFilled:{type:Boolean},exact:{type:Boolean}},setup(t){const e=t,n=fn();function o(r,s){r.preventDefault();const f=r.target.closest(".sf-layout-nav-content");s(),f&&f.clientWidth+10>document.body.clientWidth&&n.Close()}return(r,s)=>{const i=c.resolveComponent("router-link");return c.openBlock(),c.createBlock(i,{to:e.href,custom:""},{default:c.withCtx(({href:f,navigate:u,isExactActive:w,isActive:E})=>[c.createElementVNode("a",{class:"sf-navmenulink",href:f,"data-active":e.exact?w:E,onClick:b=>o(b,u)},[e.icon?(c.openBlock(),c.createBlock(wt,{key:0,icon:e.icon,filled:e.iconFilled,"button-props":{tabindex:-1}},null,8,["icon","filled"])):c.createCommentVNode("",!0),c.createElementVNode("span",gl,c.toDisplayString(e.text),1)],8,ml)]),_:1},8,["to"])}}}),bl=c.defineComponent({__name:"ScrollToTop",setup(t){const e=c.ref(!1),n=`--${+new Date}`;let o=null;function r(){o==null||o.scrollTo(0,0)}return c.onMounted(()=>{var s;o=((s=document.getElementById(n))==null?void 0:s.parentElement)??null,o&&o.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(s,i)=>(c.openBlock(),c.createElementBlock("button",{id:n,class:c.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:r},null,2))}}),wl=c.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new Ke("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Ke("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function r(){return new Ke("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function s(){return new Ke("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(i,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n()),style:c.normalizeStyle(e.style)},[c.createElementVNode("div",{class:c.normalizeClass(r())},[c.renderSlot(i.$slots,"header")],2),c.createElementVNode("div",{class:c.normalizeClass(o())},[c.renderSlot(i.$slots,"default"),c.createVNode(bl)],2),c.createElementVNode("div",{class:c.normalizeClass(s())},[c.renderSlot(i.$slots,"footer")],2)],6))}}),El={class:"sf-tab-navigation"},Al=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],kl=["data-active"],Cl=["href","onClick"],xl=[c.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[c.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],Sl=c.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=c.ref(null),o=new ResizeObserver(u=>{f()}),r=c.ref(!1),s=c.ref(!1);function i(u=!1){const w=n.value.clientWidth;n.value.scrollLeft+=u?-w:w}function f(){const u=n.value.scrollWidth-n.value.clientWidth;r.value=n.value.scrollLeft>10,s.value=n.value.scrollLeft<u-10}return c.onMounted(()=>{n.value.addEventListener("scroll",f),o.observe(n.value)}),c.onBeforeUnmount(()=>{var u;try{(u=n.value)==null||u.removeEventListener("scroll",f),o.unobserve(n.value),o.disconnect()}catch{}}),(u,w)=>{const E=c.resolveComponent("RouterLink");return c.openBlock(),c.createElementBlock("div",El,[c.createElementVNode("div",{class:c.normalizeClass(["left-arrow",{active:r.value}]),onClick:w[0]||(w[0]=b=>i(!0))},Al,2),c.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.tabs,b=>(c.openBlock(),c.createBlock(E,{to:b.route,custom:!0},{default:c.withCtx(({navigate:j,isActive:$})=>[c.createElementVNode("li",{"data-active":$},[c.renderSlot(u.$slots,"item",{item:b,navigate:j,isActive:$},()=>[c.createElementVNode("a",{href:b.route,class:c.normalizeClass({active:$}),onClick:j},c.toDisplayString(b.text),11,Cl)])],8,kl)]),_:2},1032,["to"]))),256))],512),c.createElementVNode("div",{class:c.normalizeClass(["right-arrow",{active:s.value}]),onClick:w[1]||(w[1]=b=>i())},xl,2)])}}}),_l=["data-icon"],vl=c.defineComponent({__name:"Message",props:{color:{default:"info"},class:{},style:{},icon:{}},setup(t){const e=t,n=c.computed(()=>{if(e.icon)return e.icon;switch(e.color){case"error":return"cancel";case"info":return"info";case"warn":return"warning";case"success":return"check";case"help":return"help";default:return null}}),o=c.computed(()=>new Ke("sf-message").AddClass("sf-message-error",e.color==="error").AddClass("sf-message-info",e.color==="info").AddClass("sf-message-warning",e.color==="warn").AddClass("sf-message-success",e.color==="success").AddClass("sf-message-help",e.color==="help").AddClass("sf-message-primary",e.color==="primary").AddClass("sf-message-secondary",e.color==="secondary").AddClass(e.class).Build());return(r,s)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(o.value),"data-icon":n.value},[c.renderSlot(r.$slots,"default")],10,_l))}});var Tl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Rl(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function o(){return this instanceof o?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(o){var r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:function(){return t[o]}})}),n}var Qt={};Qt.byteLength=Il,Qt.toByteArray=Nl,Qt.fromByteArray=Ml;for(var De=[],Oe=[],Ll=typeof Uint8Array<"u"?Uint8Array:Array,Hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft=0,Ol=Hn.length;ft<Ol;++ft)De[ft]=Hn[ft],Oe[Hn.charCodeAt(ft)]=ft;Oe[45]=62,Oe[95]=63;function Er(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var o=n===e?0:4-n%4;return[n,o]}function Il(t){var e=Er(t),n=e[0],o=e[1];return(n+o)*3/4-o}function Bl(t,e,n){return(e+n)*3/4-n}function Nl(t){var e,n=Er(t),o=n[0],r=n[1],s=new Ll(Bl(t,o,r)),i=0,f=r>0?o-4:o,u;for(u=0;u<f;u+=4)e=Oe[t.charCodeAt(u)]<<18|Oe[t.charCodeAt(u+1)]<<12|Oe[t.charCodeAt(u+2)]<<6|Oe[t.charCodeAt(u+3)],s[i++]=e>>16&255,s[i++]=e>>8&255,s[i++]=e&255;return r===2&&(e=Oe[t.charCodeAt(u)]<<2|Oe[t.charCodeAt(u+1)]>>4,s[i++]=e&255),r===1&&(e=Oe[t.charCodeAt(u)]<<10|Oe[t.charCodeAt(u+1)]<<4|Oe[t.charCodeAt(u+2)]>>2,s[i++]=e>>8&255,s[i++]=e&255),s}function Fl(t){return De[t>>18&63]+De[t>>12&63]+De[t>>6&63]+De[t&63]}function Ul(t,e,n){for(var o,r=[],s=e;s<n;s+=3)o=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),r.push(Fl(o));return r.join("")}function Ml(t){for(var e,n=t.length,o=n%3,r=[],s=16383,i=0,f=n-o;i<f;i+=s)r.push(Ul(t,i,i+s>f?f:i+s));return o===1?(e=t[n-1],r.push(De[e>>2]+De[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(De[e>>10]+De[e>>4&63]+De[e<<2&63]+"=")),r.join("")}var Ar={exports:{}};const kr=Rl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
66
66
  * [js-sha256]{@link https://github.com/emn178/js-sha256}
67
67
  *
68
68
  * @version 0.10.1
69
69
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
70
70
  * @copyright Chen, Yi-Cyuan 2014-2023
71
71
  * @license MIT
72
- */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var r=!n&&typeof self=="object",s=!o.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?o=vl:r&&(o=self);var i=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,f=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[-2147483648,8388608,32768,128],E=[24,16,8,0],b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],j=["hex","array","digest","arrayBuffer"],$=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),f&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var B=function(g,T){return function(U){return new V(T,!0).update(U)[g]()}},N=function(g){var T=B("hex",g);s&&(T=D(T,g)),T.create=function(){return new V(g)},T.update=function(v){return T.create().update(v)};for(var U=0;U<j.length;++U){var P=j[U];T[P]=B(P,g)}return T},D=function(g,T){var U=kr,P=kr.Buffer,v=T?"sha224":"sha256",_;P.from&&!o.JS_SHA256_NO_BUFFER_FROM?_=P.from:_=function(A){return new P(A)};var z=function(A){if(typeof A=="string")return U.createHash(v).update(A,"utf8").digest("hex");if(A==null)throw new Error(e);return A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),Array.isArray(A)||ArrayBuffer.isView(A)||A.constructor===P?U.createHash(v).update(_(A)).digest("hex"):g(A)};return z},ee=function(g,T){return function(U,P){return new ye(U,T,!0).update(P)[g]()}},oe=function(g){var T=ee("hex",g);T.create=function(v){return new ye(v,g)},T.update=function(v,_){return T.create(v).update(_)};for(var U=0;U<j.length;++U){var P=j[U];T[P]=ee(P,g)}return T};function V(g,T){T?($[0]=$[16]=$[1]=$[2]=$[3]=$[4]=$[5]=$[6]=$[7]=$[8]=$[9]=$[10]=$[11]=$[12]=$[13]=$[14]=$[15]=0,this.blocks=$):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=g}V.prototype.update=function(g){if(!this.finalized){var T,U=typeof g;if(U!=="string"){if(U==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);T=!0}for(var P,v=0,_,z=g.length,A=this.blocks;v<z;){if(this.hashed&&(this.hashed=!1,A[0]=this.block,A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),T)for(_=this.start;v<z&&_<64;++v)A[_>>2]|=g[v]<<E[_++&3];else for(_=this.start;v<z&&_<64;++v)P=g.charCodeAt(v),P<128?A[_>>2]|=P<<E[_++&3]:P<2048?(A[_>>2]|=(192|P>>6)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]):P<55296||P>=57344?(A[_>>2]|=(224|P>>12)<<E[_++&3],A[_>>2]|=(128|P>>6&63)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]):(P=65536+((P&1023)<<10|g.charCodeAt(++v)&1023),A[_>>2]|=(240|P>>18)<<E[_++&3],A[_>>2]|=(128|P>>12&63)<<E[_++&3],A[_>>2]|=(128|P>>6&63)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]);this.lastByteIndex=_,this.bytes+=_-this.start,_>=64?(this.block=A[16],this.start=_-64,this.hash(),this.hashed=!0):this.start=_}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},V.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,T=this.lastByteIndex;g[16]=this.block,g[T>>2]|=w[T&3],this.block=g[16],T>=56&&(this.hashed||this.hash(),g[0]=this.block,g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0),g[14]=this.hBytes<<3|this.bytes>>>29,g[15]=this.bytes<<3,this.hash()}},V.prototype.hash=function(){var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,z=this.h6,A=this.h7,W=this.blocks,te,ie,se,be,M,ke,a,d,m,C,y;for(te=16;te<64;++te)M=W[te-15],ie=(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3,M=W[te-2],se=(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10,W[te]=W[te-16]+ie+W[te-7]+se<<0;for(y=T&U,te=0;te<64;te+=4)this.first?(this.is224?(d=300032,M=W[0]-1413257819,A=M-150054599<<0,P=M+24177077<<0):(d=704751109,M=W[0]-210244248,A=M-1521486534<<0,P=M+143694565<<0),this.first=!1):(ie=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),se=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),d=g&T,be=d^g&U^y,a=v&_^~v&z,M=A+se+a+b[te]+W[te],ke=ie+be,A=P+M<<0,P=M+ke<<0),ie=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),se=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7),m=P&g,be=m^P&T^d,a=A&v^~A&_,M=z+se+a+b[te+1]+W[te+1],ke=ie+be,z=U+M<<0,U=M+ke<<0,ie=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),se=(z>>>6|z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7),C=U&P,be=C^U&g^m,a=z&A^~z&v,M=_+se+a+b[te+2]+W[te+2],ke=ie+be,_=T+M<<0,T=M+ke<<0,ie=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),se=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),y=T&U,be=y^T&P^C,a=_&z^~_&A,M=v+se+a+b[te+3]+W[te+3],ke=ie+be,v=g+M<<0,g=M+ke<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+g<<0,this.h1=this.h1+T<<0,this.h2=this.h2+U<<0,this.h3=this.h3+P<<0,this.h4=this.h4+v<<0,this.h5=this.h5+_<<0,this.h6=this.h6+z<<0,this.h7=this.h7+A<<0},V.prototype.hex=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,z=this.h6,A=this.h7,W=u[g>>28&15]+u[g>>24&15]+u[g>>20&15]+u[g>>16&15]+u[g>>12&15]+u[g>>8&15]+u[g>>4&15]+u[g&15]+u[T>>28&15]+u[T>>24&15]+u[T>>20&15]+u[T>>16&15]+u[T>>12&15]+u[T>>8&15]+u[T>>4&15]+u[T&15]+u[U>>28&15]+u[U>>24&15]+u[U>>20&15]+u[U>>16&15]+u[U>>12&15]+u[U>>8&15]+u[U>>4&15]+u[U&15]+u[P>>28&15]+u[P>>24&15]+u[P>>20&15]+u[P>>16&15]+u[P>>12&15]+u[P>>8&15]+u[P>>4&15]+u[P&15]+u[v>>28&15]+u[v>>24&15]+u[v>>20&15]+u[v>>16&15]+u[v>>12&15]+u[v>>8&15]+u[v>>4&15]+u[v&15]+u[_>>28&15]+u[_>>24&15]+u[_>>20&15]+u[_>>16&15]+u[_>>12&15]+u[_>>8&15]+u[_>>4&15]+u[_&15]+u[z>>28&15]+u[z>>24&15]+u[z>>20&15]+u[z>>16&15]+u[z>>12&15]+u[z>>8&15]+u[z>>4&15]+u[z&15];return this.is224||(W+=u[A>>28&15]+u[A>>24&15]+u[A>>20&15]+u[A>>16&15]+u[A>>12&15]+u[A>>8&15]+u[A>>4&15]+u[A&15]),W},V.prototype.toString=V.prototype.hex,V.prototype.digest=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,z=this.h6,A=this.h7,W=[g>>24&255,g>>16&255,g>>8&255,g&255,T>>24&255,T>>16&255,T>>8&255,T&255,U>>24&255,U>>16&255,U>>8&255,U&255,P>>24&255,P>>16&255,P>>8&255,P&255,v>>24&255,v>>16&255,v>>8&255,v&255,_>>24&255,_>>16&255,_>>8&255,_&255,z>>24&255,z>>16&255,z>>8&255,z&255];return this.is224||W.push(A>>24&255,A>>16&255,A>>8&255,A&255),W},V.prototype.array=V.prototype.digest,V.prototype.arrayBuffer=function(){this.finalize();var g=new ArrayBuffer(this.is224?28:32),T=new DataView(g);return T.setUint32(0,this.h0),T.setUint32(4,this.h1),T.setUint32(8,this.h2),T.setUint32(12,this.h3),T.setUint32(16,this.h4),T.setUint32(20,this.h5),T.setUint32(24,this.h6),this.is224||T.setUint32(28,this.h7),g};function ye(g,T,U){var P,v=typeof g;if(v==="string"){var _=[],z=g.length,A=0,W;for(P=0;P<z;++P)W=g.charCodeAt(P),W<128?_[A++]=W:W<2048?(_[A++]=192|W>>6,_[A++]=128|W&63):W<55296||W>=57344?(_[A++]=224|W>>12,_[A++]=128|W>>6&63,_[A++]=128|W&63):(W=65536+((W&1023)<<10|g.charCodeAt(++P)&1023),_[A++]=240|W>>18,_[A++]=128|W>>12&63,_[A++]=128|W>>6&63,_[A++]=128|W&63);g=_}else if(v==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);g.length>64&&(g=new V(T,!0).update(g).array());var te=[],ie=[];for(P=0;P<64;++P){var se=g[P]||0;te[P]=92^se,ie[P]=54^se}V.call(this,T,U),this.update(ie),this.oKeyPad=te,this.inner=!0,this.sharedMemory=U}ye.prototype=new V,ye.prototype.finalize=function(){if(V.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();V.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),V.prototype.finalize.call(this)}};var ae=N();ae.sha256=ae,ae.sha224=N(!0),ae.sha256.hmac=oe(),ae.sha224.hmac=oe(!0),i?t.exports=ae:(o.sha256=ae.sha256,o.sha224=ae.sha224)})()})(Ar);var Ml=Ar.exports;const Dl=Tl(Ml);class It extends Error{}It.prototype.name="InvalidTokenError";function $l(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function Hl(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return $l(e)}catch{return atob(e)}}function jn(t,e){if(typeof t!="string")throw new It("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,o=t.split(".")[n];if(typeof o!="string")throw new It(`Invalid token specified: missing part #${n+1}`);let r;try{r=Hl(o)}catch(s){throw new It(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new It(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Cr(t){if(!(this instanceof Cr))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],r,s={enable:!0,callbackList:[],interval:5},i=document.getElementsByTagName("script"),f=0;f<i.length;f++)(i[f].src.indexOf("keycloak.js")!==-1||i[f].src.indexOf("keycloak.min.js")!==-1)&&i[f].src.indexOf("version=")!==-1&&(e.iframeVersion=i[f].src.substring(i[f].src.indexOf("version=")+8).split("&")[0]);var u=!0,w=ke(console.info),E=ke(console.warn);e.init=function(a){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,r=M();var d=["default","cordova","cordova-native"];if(a&&d.indexOf(a.adapter)>-1?n=ie(a.adapter):a&&typeof a.adapter=="object"?n=a.adapter:window.Cordova||window.cordova?n=ie("cordova"):n=ie(),a){if(typeof a.useNonce<"u"&&(u=a.useNonce),typeof a.checkLoginIframe<"u"&&(s.enable=a.checkLoginIframe),a.checkLoginIframeInterval&&(s.interval=a.checkLoginIframeInterval),a.onLoad==="login-required"&&(e.loginRequired=!0),a.responseMode)if(a.responseMode==="query"||a.responseMode==="fragment")e.responseMode=a.responseMode;else throw"Invalid value for responseMode";if(a.flow){switch(a.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=a.flow}if(a.timeSkew!=null&&(e.timeSkew=a.timeSkew),a.redirectUri&&(e.redirectUri=a.redirectUri),a.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=a.silentCheckSsoRedirectUri),typeof a.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=a.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,a.pkceMethod){if(a.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=a.pkceMethod}typeof a.enableLogging=="boolean"?e.enableLogging=a.enableLogging:e.enableLogging=!1,typeof a.scope=="string"&&(e.scope=a.scope),typeof a.acrValues=="string"&&(e.acrValues=a.acrValues),typeof a.messageReceiveTimeout=="number"&&a.messageReceiveTimeout>0?e.messageReceiveTimeout=a.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var m=v(),C=v();C.promise.then(function(){e.onReady&&e.onReady(e.authenticated),m.setSuccess(e.authenticated)}).catch(function(O){m.setError(O)});var y=V();function R(){var O=function(J){J||(H.prompt="none"),a&&a.locale&&(H.locale=a.locale),e.login(H).then(function(){C.setSuccess()}).catch(function(Ce){C.setError(Ce)})},L=function(){var J=document.createElement("iframe"),Ce=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});J.setAttribute("src",Ce),J.setAttribute("sandbox","allow-scripts allow-same-origin"),J.setAttribute("title","keycloak-silent-check-sso"),J.style.display="none",document.body.appendChild(J);var we=function(ue){if(!(ue.origin!==window.location.origin||J.contentWindow!==ue.source)){var je=T(ue.data);oe(je,C),document.body.removeChild(J),window.removeEventListener("message",we)}};window.addEventListener("message",we)},H={};switch(a.onLoad){case"check-sso":s.enable?z().then(function(){W().then(function(J){J?C.setSuccess():e.silentCheckSsoRedirectUri?L():O(!1)}).catch(function(J){C.setError(J)})}):e.silentCheckSsoRedirectUri?L():O(!1);break;case"login-required":O(!0);break;default:throw"Invalid value for onLoad"}}function k(){var O=T(window.location.href);if(O&&window.history.replaceState(window.history.state,null,O.newUrl),O&&O.valid)return z().then(function(){oe(O,C)}).catch(function(L){C.setError(L)});a?a.token&&a.refreshToken?(ae(a.token,a.refreshToken,a.idToken),s.enable?z().then(function(){W().then(function(L){L?(e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess(),A()):C.setSuccess()}).catch(function(L){C.setError(L)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess()}).catch(function(L){e.onAuthError&&e.onAuthError(),a.onLoad?R():C.setError(L)})):a.onLoad?R():C.setSuccess():C.setSuccess()}function x(){var O=v(),L=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",L),O.setSuccess())};return document.addEventListener("readystatechange",L),L(),O.promise}return y.then(function(){x().then(te).then(k).catch(function(O){m.setError(O)})}),y.catch(function(O){m.setError(O)}),m.promise},e.login=function(a){return n.login(a)};function b(a){var d=null,m=window.crypto||window.msCrypto;if(m&&m.getRandomValues&&window.Uint8Array)return d=new Uint8Array(a),m.getRandomValues(d),d;d=new Array(a);for(var C=0;C<d.length;C++)d[C]=Math.floor(256*Math.random());return d}function j(a){return $(a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function $(a,d){for(var m=b(a),C=new Array(a),y=0;y<a;y++)C[y]=d.charCodeAt(m[y]%d.length);return String.fromCharCode.apply(null,C)}function B(a,d){switch(a){case"S256":var m=new Uint8Array(Dl.arrayBuffer(d)),C=Qt.fromByteArray(m).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return C;default:throw"Invalid value for pkceMethod"}}function N(a){var d={id_token:{acr:a}};return JSON.stringify(d)}e.createLoginUrl=function(a){var d=g(),m=g(),C=n.redirectUri(a),y={state:d,nonce:m,redirectUri:encodeURIComponent(C)};a&&a.prompt&&(y.prompt=a.prompt);var R;a&&a.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var k=a&&a.scope||e.scope;k?k.indexOf("openid")===-1&&(k="openid "+k):k="openid";var x=R+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(C)+"&state="+encodeURIComponent(d)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(k);if(u&&(x=x+"&nonce="+encodeURIComponent(m)),a&&a.prompt&&(x+="&prompt="+encodeURIComponent(a.prompt)),a&&a.maxAge&&(x+="&max_age="+encodeURIComponent(a.maxAge)),a&&a.loginHint&&(x+="&login_hint="+encodeURIComponent(a.loginHint)),a&&a.idpHint&&(x+="&kc_idp_hint="+encodeURIComponent(a.idpHint)),a&&a.action&&a.action!="register"&&(x+="&kc_action="+encodeURIComponent(a.action)),a&&a.locale&&(x+="&ui_locales="+encodeURIComponent(a.locale)),a&&a.acr){var O=N(a.acr);x+="&claims="+encodeURIComponent(O)}if((a&&a.acrValues||e.acrValues)&&(x+="&acr_values="+encodeURIComponent(a.acrValues||e.acrValues)),e.pkceMethod){var L=j(96);y.pkceCodeVerifier=L;var H=B(e.pkceMethod,L);x+="&code_challenge="+H,x+="&code_challenge_method="+e.pkceMethod}return r.add(y),x},e.logout=function(a){return n.logout(a)},e.createLogoutUrl=function(a){var d=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(a,!1));return e.idToken&&(d+="&id_token_hint="+encodeURIComponent(e.idToken)),d},e.register=function(a){return n.register(a)},e.createRegisterUrl=function(a){return a||(a={}),a.action="register",e.createLoginUrl(a)},e.createAccountUrl=function(a){var d=D(),m=void 0;return typeof d<"u"&&(m=d+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(a))),m},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(a){var d=e.realmAccess;return!!d&&d.roles.indexOf(a)>=0},e.hasResourceRole=function(a,d){if(!e.resourceAccess)return!1;var m=e.resourceAccess[d||e.clientId];return!!m&&m.roles.indexOf(a)>=0},e.loadUserProfile=function(){var a=D()+"/account",d=new XMLHttpRequest;d.open("GET",a,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.profile=JSON.parse(d.responseText),m.setSuccess(e.profile)):m.setError())},d.send(),m.promise},e.loadUserInfo=function(){var a=e.endpoints.userinfo(),d=new XMLHttpRequest;d.open("GET",a,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.userInfo=JSON.parse(d.responseText),m.setSuccess(e.userInfo)):m.setError())},d.send(),m.promise},e.isTokenExpired=function(a){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return w("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var d=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(a){if(isNaN(a))throw"Invalid minValidity";d-=a}return d<0},e.updateToken=function(a){var d=v();if(!e.refreshToken)return d.setError(),d.promise;a=a||5;var m=function(){var y=!1;if(a==-1?(y=!0,w("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(a))&&(y=!0,w("[KEYCLOAK] Refreshing token: token expired")),!y)d.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,k=e.endpoints.token();if(o.push(d),o.length==1){var x=new XMLHttpRequest;x.open("POST",k,!0),x.setRequestHeader("Content-type","application/x-www-form-urlencoded"),x.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var O=new Date().getTime();x.onreadystatechange=function(){if(x.readyState==4)if(x.status==200){w("[KEYCLOAK] Token refreshed"),O=(O+new Date().getTime())/2;var L=JSON.parse(x.responseText);ae(L.access_token,L.refresh_token,L.id_token,O),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var H=o.pop();H!=null;H=o.pop())H.setSuccess(!0)}else{E("[KEYCLOAK] Failed to refresh token"),x.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var H=o.pop();H!=null;H=o.pop())H.setError(!0)}},x.send(R)}}};if(s.enable){var C=W();C.then(function(){m()}).catch(function(y){d.setError(y)})}else m();return d.promise},e.clearToken=function(){e.token&&(ae(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=ae;function D(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function ee(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function oe(a,d){var m=a.code,C=a.error,y=a.prompt,R=new Date().getTime();if(a.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(a.kc_action_status),C){if(y!="none"){var k={error:C,error_description:a.error_description};e.onAuthError&&e.onAuthError(k),d&&d.setError(k)}else d&&d.setSuccess();return}else e.flow!="standard"&&(a.access_token||a.id_token)&&H(a.access_token,null,a.id_token,!0);if(e.flow!="implicit"&&m){var x="code="+m+"&grant_type=authorization_code",O=e.endpoints.token(),L=new XMLHttpRequest;L.open("POST",O,!0),L.setRequestHeader("Content-type","application/x-www-form-urlencoded"),x+="&client_id="+encodeURIComponent(e.clientId),x+="&redirect_uri="+a.redirectUri,a.pkceCodeVerifier&&(x+="&code_verifier="+a.pkceCodeVerifier),L.withCredentials=!0,L.onreadystatechange=function(){if(L.readyState==4)if(L.status==200){var J=JSON.parse(L.responseText);H(J.access_token,J.refresh_token,J.id_token,e.flow==="standard"),A()}else e.onAuthError&&e.onAuthError(),d&&d.setError()},L.send(x)}function H(J,Ce,we,ue){R=(R+new Date().getTime())/2,ae(J,Ce,we,R),u&&(e.tokenParsed&&e.tokenParsed.nonce!=a.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=a.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=a.storedNonce)?(w("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),d&&d.setError()):ue&&(e.onAuthSuccess&&e.onAuthSuccess(),d&&d.setSuccess())}}function V(a){var d=v(),m;t?typeof t=="string"&&(m=t):m=location.origin+"/keycloak.json";function C(L){L?e.endpoints={authorize:function(){return L.authorization_endpoint},token:function(){return L.token_endpoint},logout:function(){if(!L.end_session_endpoint)throw"Not supported by the OIDC server";return L.end_session_endpoint},checkSessionIframe:function(){if(!L.check_session_iframe)throw"Not supported by the OIDC server";return L.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!L.userinfo_endpoint)throw"Not supported by the OIDC server";return L.userinfo_endpoint}}:e.endpoints={authorize:function(){return D()+"/protocol/openid-connect/auth"},token:function(){return D()+"/protocol/openid-connect/token"},logout:function(){return D()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var H=D()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},thirdPartyCookiesIframe:function(){var H=D()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},register:function(){return D()+"/protocol/openid-connect/registrations"},userinfo:function(){return D()+"/protocol/openid-connect/userinfo"}}}if(m){var y=new XMLHttpRequest;y.open("GET",m,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var L=JSON.parse(y.responseText);e.authServerUrl=L["auth-server-url"],e.realm=L.realm,e.clientId=L.resource,C(null),d.setSuccess()}else d.setError()},y.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var R=t.oidcProvider;if(R)if(typeof R=="string"){var O;R.charAt(R.length-1)=="/"?O=R+".well-known/openid-configuration":O=R+"/.well-known/openid-configuration";var y=new XMLHttpRequest;y.open("GET",O,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var H=JSON.parse(y.responseText);C(H),d.setSuccess()}else d.setError()},y.send()}else C(R),d.setSuccess();else{if(!t.url){for(var k=document.getElementsByTagName("script"),x=0;x<k.length;x++)if(k[x].src.match(/.*keycloak\.js/)){t.url=k[x].src.substr(0,k[x].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,C(null),d.setSuccess()}}return d.promise}function ye(a){return a.status==0&&a.responseText&&a.responseURL.startsWith("file:")}function ae(a,d,m,C){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),d?(e.refreshToken=d,e.refreshTokenParsed=jn(d)):(delete e.refreshToken,delete e.refreshTokenParsed),m?(e.idToken=m,e.idTokenParsed=jn(m)):(delete e.idToken,delete e.idTokenParsed),a){if(e.token=a,e.tokenParsed=jn(a),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,C&&(e.timeSkew=Math.floor(C/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(w("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var y=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;w("[KEYCLOAK] Token expires in "+Math.round(y/1e3)+" s"),y<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,y)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function g(){var a="0123456789abcdef",d=$(36,a).split("");d[14]="4",d[19]=a.substr(d[19]&3|8,1),d[8]=d[13]=d[18]=d[23]="-";var m=d.join("");return m}function T(a){var d=U(a);if(d){var m=r.get(d.state);return m&&(d.valid=!0,d.redirectUri=m.redirectUri,d.storedNonce=m.nonce,d.prompt=m.prompt,d.pkceCodeVerifier=m.pkceCodeVerifier),d}}function U(a){var d;switch(e.flow){case"standard":d=["code","state","session_state","kc_action_status","iss"];break;case"implicit":d=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":d=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}d.push("error"),d.push("error_description"),d.push("error_uri");var m=a.indexOf("?"),C=a.indexOf("#"),y,R;if(e.responseMode==="query"&&m!==-1?(y=a.substring(0,m),R=P(a.substring(m+1,C!==-1?C:a.length),d),R.paramsString!==""&&(y+="?"+R.paramsString),C!==-1&&(y+=a.substring(C))):e.responseMode==="fragment"&&C!==-1&&(y=a.substring(0,C),R=P(a.substring(C+1),d),R.paramsString!==""&&(y+="#"+R.paramsString)),R&&R.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((R.oauthParams.code||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}else if(e.flow==="implicit"&&(R.oauthParams.access_token||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}}function P(a,d){for(var m=a.split("&"),C={paramsString:"",oauthParams:{}},y=0;y<m.length;y++){var R=m[y].indexOf("="),k=m[y].slice(0,R);d.indexOf(k)!==-1?C.oauthParams[k]=m[y].slice(R+1):(C.paramsString!==""&&(C.paramsString+="&"),C.paramsString+=m[y])}return C}function v(){var a={setSuccess:function(d){a.resolve(d)},setError:function(d){a.reject(d)}};return a.promise=new Promise(function(d,m){a.resolve=d,a.reject=m}),a}function _(a,d,m){var C=null,y=new Promise(function(R,k){C=setTimeout(function(){k({error:m||"Promise is not settled within timeout of "+d+"ms"})},d)});return Promise.race([a,y]).finally(function(){clearTimeout(C)})}function z(){var a=v();if(!s.enable||s.iframe)return a.setSuccess(),a.promise;var d=document.createElement("iframe");s.iframe=d,d.onload=function(){var y=e.endpoints.authorize();y.charAt(0)==="/"?s.iframeOrigin=ee():s.iframeOrigin=y.substring(0,y.indexOf("/",8)),a.setSuccess()};var m=e.endpoints.checkSessionIframe();d.setAttribute("src",m),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-session-iframe"),d.style.display="none",document.body.appendChild(d);var C=function(y){if(!(y.origin!==s.iframeOrigin||s.iframe.contentWindow!==y.source)&&(y.data=="unchanged"||y.data=="changed"||y.data=="error")){y.data!="unchanged"&&e.clearToken();for(var R=s.callbackList.splice(0,s.callbackList.length),k=R.length-1;k>=0;--k){var x=R[k];y.data=="error"?x.setError():x.setSuccess(y.data=="unchanged")}}};return window.addEventListener("message",C,!1),a.promise}function A(){s.enable&&e.token&&setTimeout(function(){W().then(function(a){a&&A()})},s.interval*1e3)}function W(){var a=v();if(s.iframe&&s.iframeOrigin){var d=e.clientId+" "+(e.sessionId?e.sessionId:"");s.callbackList.push(a);var m=s.iframeOrigin;s.callbackList.length==1&&s.iframe.contentWindow.postMessage(d,m)}else a.setSuccess();return a.promise}function te(){var a=v();if(s.enable||e.silentCheckSsoRedirectUri){var d=document.createElement("iframe");d.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-3p-check-iframe"),d.style.display="none",document.body.appendChild(d);var m=function(C){d.contentWindow===C.source&&(C.data!=="supported"&&C.data!=="unsupported"||(C.data==="unsupported"&&(E(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
72
+ */(function(t){(function(){var e="input is invalid type",n=typeof window=="object",o=n?window:{};o.JS_SHA256_NO_WINDOW&&(n=!1);var r=!n&&typeof self=="object",s=!o.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?o=Tl:r&&(o=self);var i=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,f=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",u="0123456789abcdef".split(""),w=[-2147483648,8388608,32768,128],E=[24,16,8,0],b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],j=["hex","array","digest","arrayBuffer"],$=[];(o.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),f&&(o.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var B=function(g,T){return function(U){return new V(T,!0).update(U)[g]()}},N=function(g){var T=B("hex",g);s&&(T=D(T,g)),T.create=function(){return new V(g)},T.update=function(v){return T.create().update(v)};for(var U=0;U<j.length;++U){var P=j[U];T[P]=B(P,g)}return T},D=function(g,T){var U=kr,P=kr.Buffer,v=T?"sha224":"sha256",_;P.from&&!o.JS_SHA256_NO_BUFFER_FROM?_=P.from:_=function(A){return new P(A)};var z=function(A){if(typeof A=="string")return U.createHash(v).update(A,"utf8").digest("hex");if(A==null)throw new Error(e);return A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),Array.isArray(A)||ArrayBuffer.isView(A)||A.constructor===P?U.createHash(v).update(_(A)).digest("hex"):g(A)};return z},ee=function(g,T){return function(U,P){return new ye(U,T,!0).update(P)[g]()}},oe=function(g){var T=ee("hex",g);T.create=function(v){return new ye(v,g)},T.update=function(v,_){return T.create(v).update(_)};for(var U=0;U<j.length;++U){var P=j[U];T[P]=ee(P,g)}return T};function V(g,T){T?($[0]=$[16]=$[1]=$[2]=$[3]=$[4]=$[5]=$[6]=$[7]=$[8]=$[9]=$[10]=$[11]=$[12]=$[13]=$[14]=$[15]=0,this.blocks=$):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=g}V.prototype.update=function(g){if(!this.finalized){var T,U=typeof g;if(U!=="string"){if(U==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);T=!0}for(var P,v=0,_,z=g.length,A=this.blocks;v<z;){if(this.hashed&&(this.hashed=!1,A[0]=this.block,A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),T)for(_=this.start;v<z&&_<64;++v)A[_>>2]|=g[v]<<E[_++&3];else for(_=this.start;v<z&&_<64;++v)P=g.charCodeAt(v),P<128?A[_>>2]|=P<<E[_++&3]:P<2048?(A[_>>2]|=(192|P>>6)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]):P<55296||P>=57344?(A[_>>2]|=(224|P>>12)<<E[_++&3],A[_>>2]|=(128|P>>6&63)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]):(P=65536+((P&1023)<<10|g.charCodeAt(++v)&1023),A[_>>2]|=(240|P>>18)<<E[_++&3],A[_>>2]|=(128|P>>12&63)<<E[_++&3],A[_>>2]|=(128|P>>6&63)<<E[_++&3],A[_>>2]|=(128|P&63)<<E[_++&3]);this.lastByteIndex=_,this.bytes+=_-this.start,_>=64?(this.block=A[16],this.start=_-64,this.hash(),this.hashed=!0):this.start=_}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},V.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,T=this.lastByteIndex;g[16]=this.block,g[T>>2]|=w[T&3],this.block=g[16],T>=56&&(this.hashed||this.hash(),g[0]=this.block,g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0),g[14]=this.hBytes<<3|this.bytes>>>29,g[15]=this.bytes<<3,this.hash()}},V.prototype.hash=function(){var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,z=this.h6,A=this.h7,W=this.blocks,te,ie,se,be,M,ke,a,d,m,C,y;for(te=16;te<64;++te)M=W[te-15],ie=(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3,M=W[te-2],se=(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10,W[te]=W[te-16]+ie+W[te-7]+se<<0;for(y=T&U,te=0;te<64;te+=4)this.first?(this.is224?(d=300032,M=W[0]-1413257819,A=M-150054599<<0,P=M+24177077<<0):(d=704751109,M=W[0]-210244248,A=M-1521486534<<0,P=M+143694565<<0),this.first=!1):(ie=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),se=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),d=g&T,be=d^g&U^y,a=v&_^~v&z,M=A+se+a+b[te]+W[te],ke=ie+be,A=P+M<<0,P=M+ke<<0),ie=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),se=(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7),m=P&g,be=m^P&T^d,a=A&v^~A&_,M=z+se+a+b[te+1]+W[te+1],ke=ie+be,z=U+M<<0,U=M+ke<<0,ie=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),se=(z>>>6|z<<26)^(z>>>11|z<<21)^(z>>>25|z<<7),C=U&P,be=C^U&g^m,a=z&A^~z&v,M=_+se+a+b[te+2]+W[te+2],ke=ie+be,_=T+M<<0,T=M+ke<<0,ie=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),se=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),y=T&U,be=y^T&P^C,a=_&z^~_&A,M=v+se+a+b[te+3]+W[te+3],ke=ie+be,v=g+M<<0,g=M+ke<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+g<<0,this.h1=this.h1+T<<0,this.h2=this.h2+U<<0,this.h3=this.h3+P<<0,this.h4=this.h4+v<<0,this.h5=this.h5+_<<0,this.h6=this.h6+z<<0,this.h7=this.h7+A<<0},V.prototype.hex=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,z=this.h6,A=this.h7,W=u[g>>28&15]+u[g>>24&15]+u[g>>20&15]+u[g>>16&15]+u[g>>12&15]+u[g>>8&15]+u[g>>4&15]+u[g&15]+u[T>>28&15]+u[T>>24&15]+u[T>>20&15]+u[T>>16&15]+u[T>>12&15]+u[T>>8&15]+u[T>>4&15]+u[T&15]+u[U>>28&15]+u[U>>24&15]+u[U>>20&15]+u[U>>16&15]+u[U>>12&15]+u[U>>8&15]+u[U>>4&15]+u[U&15]+u[P>>28&15]+u[P>>24&15]+u[P>>20&15]+u[P>>16&15]+u[P>>12&15]+u[P>>8&15]+u[P>>4&15]+u[P&15]+u[v>>28&15]+u[v>>24&15]+u[v>>20&15]+u[v>>16&15]+u[v>>12&15]+u[v>>8&15]+u[v>>4&15]+u[v&15]+u[_>>28&15]+u[_>>24&15]+u[_>>20&15]+u[_>>16&15]+u[_>>12&15]+u[_>>8&15]+u[_>>4&15]+u[_&15]+u[z>>28&15]+u[z>>24&15]+u[z>>20&15]+u[z>>16&15]+u[z>>12&15]+u[z>>8&15]+u[z>>4&15]+u[z&15];return this.is224||(W+=u[A>>28&15]+u[A>>24&15]+u[A>>20&15]+u[A>>16&15]+u[A>>12&15]+u[A>>8&15]+u[A>>4&15]+u[A&15]),W},V.prototype.toString=V.prototype.hex,V.prototype.digest=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,_=this.h5,z=this.h6,A=this.h7,W=[g>>24&255,g>>16&255,g>>8&255,g&255,T>>24&255,T>>16&255,T>>8&255,T&255,U>>24&255,U>>16&255,U>>8&255,U&255,P>>24&255,P>>16&255,P>>8&255,P&255,v>>24&255,v>>16&255,v>>8&255,v&255,_>>24&255,_>>16&255,_>>8&255,_&255,z>>24&255,z>>16&255,z>>8&255,z&255];return this.is224||W.push(A>>24&255,A>>16&255,A>>8&255,A&255),W},V.prototype.array=V.prototype.digest,V.prototype.arrayBuffer=function(){this.finalize();var g=new ArrayBuffer(this.is224?28:32),T=new DataView(g);return T.setUint32(0,this.h0),T.setUint32(4,this.h1),T.setUint32(8,this.h2),T.setUint32(12,this.h3),T.setUint32(16,this.h4),T.setUint32(20,this.h5),T.setUint32(24,this.h6),this.is224||T.setUint32(28,this.h7),g};function ye(g,T,U){var P,v=typeof g;if(v==="string"){var _=[],z=g.length,A=0,W;for(P=0;P<z;++P)W=g.charCodeAt(P),W<128?_[A++]=W:W<2048?(_[A++]=192|W>>6,_[A++]=128|W&63):W<55296||W>=57344?(_[A++]=224|W>>12,_[A++]=128|W>>6&63,_[A++]=128|W&63):(W=65536+((W&1023)<<10|g.charCodeAt(++P)&1023),_[A++]=240|W>>18,_[A++]=128|W>>12&63,_[A++]=128|W>>6&63,_[A++]=128|W&63);g=_}else if(v==="object"){if(g===null)throw new Error(e);if(f&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!f||!ArrayBuffer.isView(g)))throw new Error(e)}else throw new Error(e);g.length>64&&(g=new V(T,!0).update(g).array());var te=[],ie=[];for(P=0;P<64;++P){var se=g[P]||0;te[P]=92^se,ie[P]=54^se}V.call(this,T,U),this.update(ie),this.oKeyPad=te,this.inner=!0,this.sharedMemory=U}ye.prototype=new V,ye.prototype.finalize=function(){if(V.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();V.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),V.prototype.finalize.call(this)}};var ae=N();ae.sha256=ae,ae.sha224=N(!0),ae.sha256.hmac=oe(),ae.sha224.hmac=oe(!0),i?t.exports=ae:(o.sha256=ae.sha256,o.sha224=ae.sha224)})()})(Ar);var Dl=Ar.exports;const $l=Pl(Dl);class It extends Error{}It.prototype.name="InvalidTokenError";function Hl(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let o=n.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}function jl(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Hl(e)}catch{return atob(e)}}function jn(t,e){if(typeof t!="string")throw new It("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,o=t.split(".")[n];if(typeof o!="string")throw new It(`Invalid token specified: missing part #${n+1}`);let r;try{r=jl(o)}catch(s){throw new It(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new It(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Cr(t){if(!(this instanceof Cr))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],r,s={enable:!0,callbackList:[],interval:5},i=document.getElementsByTagName("script"),f=0;f<i.length;f++)(i[f].src.indexOf("keycloak.js")!==-1||i[f].src.indexOf("keycloak.min.js")!==-1)&&i[f].src.indexOf("version=")!==-1&&(e.iframeVersion=i[f].src.substring(i[f].src.indexOf("version=")+8).split("&")[0]);var u=!0,w=ke(console.info),E=ke(console.warn);e.init=function(a){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,r=M();var d=["default","cordova","cordova-native"];if(a&&d.indexOf(a.adapter)>-1?n=ie(a.adapter):a&&typeof a.adapter=="object"?n=a.adapter:window.Cordova||window.cordova?n=ie("cordova"):n=ie(),a){if(typeof a.useNonce<"u"&&(u=a.useNonce),typeof a.checkLoginIframe<"u"&&(s.enable=a.checkLoginIframe),a.checkLoginIframeInterval&&(s.interval=a.checkLoginIframeInterval),a.onLoad==="login-required"&&(e.loginRequired=!0),a.responseMode)if(a.responseMode==="query"||a.responseMode==="fragment")e.responseMode=a.responseMode;else throw"Invalid value for responseMode";if(a.flow){switch(a.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=a.flow}if(a.timeSkew!=null&&(e.timeSkew=a.timeSkew),a.redirectUri&&(e.redirectUri=a.redirectUri),a.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=a.silentCheckSsoRedirectUri),typeof a.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=a.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,a.pkceMethod){if(a.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=a.pkceMethod}typeof a.enableLogging=="boolean"?e.enableLogging=a.enableLogging:e.enableLogging=!1,typeof a.scope=="string"&&(e.scope=a.scope),typeof a.acrValues=="string"&&(e.acrValues=a.acrValues),typeof a.messageReceiveTimeout=="number"&&a.messageReceiveTimeout>0?e.messageReceiveTimeout=a.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var m=v(),C=v();C.promise.then(function(){e.onReady&&e.onReady(e.authenticated),m.setSuccess(e.authenticated)}).catch(function(O){m.setError(O)});var y=V();function R(){var O=function(J){J||(H.prompt="none"),a&&a.locale&&(H.locale=a.locale),e.login(H).then(function(){C.setSuccess()}).catch(function(Ce){C.setError(Ce)})},L=function(){var J=document.createElement("iframe"),Ce=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});J.setAttribute("src",Ce),J.setAttribute("sandbox","allow-scripts allow-same-origin"),J.setAttribute("title","keycloak-silent-check-sso"),J.style.display="none",document.body.appendChild(J);var we=function(ue){if(!(ue.origin!==window.location.origin||J.contentWindow!==ue.source)){var je=T(ue.data);oe(je,C),document.body.removeChild(J),window.removeEventListener("message",we)}};window.addEventListener("message",we)},H={};switch(a.onLoad){case"check-sso":s.enable?z().then(function(){W().then(function(J){J?C.setSuccess():e.silentCheckSsoRedirectUri?L():O(!1)}).catch(function(J){C.setError(J)})}):e.silentCheckSsoRedirectUri?L():O(!1);break;case"login-required":O(!0);break;default:throw"Invalid value for onLoad"}}function k(){var O=T(window.location.href);if(O&&window.history.replaceState(window.history.state,null,O.newUrl),O&&O.valid)return z().then(function(){oe(O,C)}).catch(function(L){C.setError(L)});a?a.token&&a.refreshToken?(ae(a.token,a.refreshToken,a.idToken),s.enable?z().then(function(){W().then(function(L){L?(e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess(),A()):C.setSuccess()}).catch(function(L){C.setError(L)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess()}).catch(function(L){e.onAuthError&&e.onAuthError(),a.onLoad?R():C.setError(L)})):a.onLoad?R():C.setSuccess():C.setSuccess()}function x(){var O=v(),L=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",L),O.setSuccess())};return document.addEventListener("readystatechange",L),L(),O.promise}return y.then(function(){x().then(te).then(k).catch(function(O){m.setError(O)})}),y.catch(function(O){m.setError(O)}),m.promise},e.login=function(a){return n.login(a)};function b(a){var d=null,m=window.crypto||window.msCrypto;if(m&&m.getRandomValues&&window.Uint8Array)return d=new Uint8Array(a),m.getRandomValues(d),d;d=new Array(a);for(var C=0;C<d.length;C++)d[C]=Math.floor(256*Math.random());return d}function j(a){return $(a,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function $(a,d){for(var m=b(a),C=new Array(a),y=0;y<a;y++)C[y]=d.charCodeAt(m[y]%d.length);return String.fromCharCode.apply(null,C)}function B(a,d){switch(a){case"S256":var m=new Uint8Array($l.arrayBuffer(d)),C=Qt.fromByteArray(m).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return C;default:throw"Invalid value for pkceMethod"}}function N(a){var d={id_token:{acr:a}};return JSON.stringify(d)}e.createLoginUrl=function(a){var d=g(),m=g(),C=n.redirectUri(a),y={state:d,nonce:m,redirectUri:encodeURIComponent(C)};a&&a.prompt&&(y.prompt=a.prompt);var R;a&&a.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var k=a&&a.scope||e.scope;k?k.indexOf("openid")===-1&&(k="openid "+k):k="openid";var x=R+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(C)+"&state="+encodeURIComponent(d)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(k);if(u&&(x=x+"&nonce="+encodeURIComponent(m)),a&&a.prompt&&(x+="&prompt="+encodeURIComponent(a.prompt)),a&&a.maxAge&&(x+="&max_age="+encodeURIComponent(a.maxAge)),a&&a.loginHint&&(x+="&login_hint="+encodeURIComponent(a.loginHint)),a&&a.idpHint&&(x+="&kc_idp_hint="+encodeURIComponent(a.idpHint)),a&&a.action&&a.action!="register"&&(x+="&kc_action="+encodeURIComponent(a.action)),a&&a.locale&&(x+="&ui_locales="+encodeURIComponent(a.locale)),a&&a.acr){var O=N(a.acr);x+="&claims="+encodeURIComponent(O)}if((a&&a.acrValues||e.acrValues)&&(x+="&acr_values="+encodeURIComponent(a.acrValues||e.acrValues)),e.pkceMethod){var L=j(96);y.pkceCodeVerifier=L;var H=B(e.pkceMethod,L);x+="&code_challenge="+H,x+="&code_challenge_method="+e.pkceMethod}return r.add(y),x},e.logout=function(a){return n.logout(a)},e.createLogoutUrl=function(a){var d=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(a,!1));return e.idToken&&(d+="&id_token_hint="+encodeURIComponent(e.idToken)),d},e.register=function(a){return n.register(a)},e.createRegisterUrl=function(a){return a||(a={}),a.action="register",e.createLoginUrl(a)},e.createAccountUrl=function(a){var d=D(),m=void 0;return typeof d<"u"&&(m=d+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(a))),m},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(a){var d=e.realmAccess;return!!d&&d.roles.indexOf(a)>=0},e.hasResourceRole=function(a,d){if(!e.resourceAccess)return!1;var m=e.resourceAccess[d||e.clientId];return!!m&&m.roles.indexOf(a)>=0},e.loadUserProfile=function(){var a=D()+"/account",d=new XMLHttpRequest;d.open("GET",a,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.profile=JSON.parse(d.responseText),m.setSuccess(e.profile)):m.setError())},d.send(),m.promise},e.loadUserInfo=function(){var a=e.endpoints.userinfo(),d=new XMLHttpRequest;d.open("GET",a,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Authorization","bearer "+e.token);var m=v();return d.onreadystatechange=function(){d.readyState==4&&(d.status==200?(e.userInfo=JSON.parse(d.responseText),m.setSuccess(e.userInfo)):m.setError())},d.send(),m.promise},e.isTokenExpired=function(a){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return w("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var d=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(a){if(isNaN(a))throw"Invalid minValidity";d-=a}return d<0},e.updateToken=function(a){var d=v();if(!e.refreshToken)return d.setError(),d.promise;a=a||5;var m=function(){var y=!1;if(a==-1?(y=!0,w("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(a))&&(y=!0,w("[KEYCLOAK] Refreshing token: token expired")),!y)d.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,k=e.endpoints.token();if(o.push(d),o.length==1){var x=new XMLHttpRequest;x.open("POST",k,!0),x.setRequestHeader("Content-type","application/x-www-form-urlencoded"),x.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var O=new Date().getTime();x.onreadystatechange=function(){if(x.readyState==4)if(x.status==200){w("[KEYCLOAK] Token refreshed"),O=(O+new Date().getTime())/2;var L=JSON.parse(x.responseText);ae(L.access_token,L.refresh_token,L.id_token,O),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var H=o.pop();H!=null;H=o.pop())H.setSuccess(!0)}else{E("[KEYCLOAK] Failed to refresh token"),x.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var H=o.pop();H!=null;H=o.pop())H.setError(!0)}},x.send(R)}}};if(s.enable){var C=W();C.then(function(){m()}).catch(function(y){d.setError(y)})}else m();return d.promise},e.clearToken=function(){e.token&&(ae(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=ae;function D(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function ee(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function oe(a,d){var m=a.code,C=a.error,y=a.prompt,R=new Date().getTime();if(a.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(a.kc_action_status),C){if(y!="none"){var k={error:C,error_description:a.error_description};e.onAuthError&&e.onAuthError(k),d&&d.setError(k)}else d&&d.setSuccess();return}else e.flow!="standard"&&(a.access_token||a.id_token)&&H(a.access_token,null,a.id_token,!0);if(e.flow!="implicit"&&m){var x="code="+m+"&grant_type=authorization_code",O=e.endpoints.token(),L=new XMLHttpRequest;L.open("POST",O,!0),L.setRequestHeader("Content-type","application/x-www-form-urlencoded"),x+="&client_id="+encodeURIComponent(e.clientId),x+="&redirect_uri="+a.redirectUri,a.pkceCodeVerifier&&(x+="&code_verifier="+a.pkceCodeVerifier),L.withCredentials=!0,L.onreadystatechange=function(){if(L.readyState==4)if(L.status==200){var J=JSON.parse(L.responseText);H(J.access_token,J.refresh_token,J.id_token,e.flow==="standard"),A()}else e.onAuthError&&e.onAuthError(),d&&d.setError()},L.send(x)}function H(J,Ce,we,ue){R=(R+new Date().getTime())/2,ae(J,Ce,we,R),u&&(e.tokenParsed&&e.tokenParsed.nonce!=a.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=a.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=a.storedNonce)?(w("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),d&&d.setError()):ue&&(e.onAuthSuccess&&e.onAuthSuccess(),d&&d.setSuccess())}}function V(a){var d=v(),m;t?typeof t=="string"&&(m=t):m=location.origin+"/keycloak.json";function C(L){L?e.endpoints={authorize:function(){return L.authorization_endpoint},token:function(){return L.token_endpoint},logout:function(){if(!L.end_session_endpoint)throw"Not supported by the OIDC server";return L.end_session_endpoint},checkSessionIframe:function(){if(!L.check_session_iframe)throw"Not supported by the OIDC server";return L.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!L.userinfo_endpoint)throw"Not supported by the OIDC server";return L.userinfo_endpoint}}:e.endpoints={authorize:function(){return D()+"/protocol/openid-connect/auth"},token:function(){return D()+"/protocol/openid-connect/token"},logout:function(){return D()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var H=D()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},thirdPartyCookiesIframe:function(){var H=D()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},register:function(){return D()+"/protocol/openid-connect/registrations"},userinfo:function(){return D()+"/protocol/openid-connect/userinfo"}}}if(m){var y=new XMLHttpRequest;y.open("GET",m,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var L=JSON.parse(y.responseText);e.authServerUrl=L["auth-server-url"],e.realm=L.realm,e.clientId=L.resource,C(null),d.setSuccess()}else d.setError()},y.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var R=t.oidcProvider;if(R)if(typeof R=="string"){var O;R.charAt(R.length-1)=="/"?O=R+".well-known/openid-configuration":O=R+"/.well-known/openid-configuration";var y=new XMLHttpRequest;y.open("GET",O,!0),y.setRequestHeader("Accept","application/json"),y.onreadystatechange=function(){if(y.readyState==4)if(y.status==200||ye(y)){var H=JSON.parse(y.responseText);C(H),d.setSuccess()}else d.setError()},y.send()}else C(R),d.setSuccess();else{if(!t.url){for(var k=document.getElementsByTagName("script"),x=0;x<k.length;x++)if(k[x].src.match(/.*keycloak\.js/)){t.url=k[x].src.substr(0,k[x].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,C(null),d.setSuccess()}}return d.promise}function ye(a){return a.status==0&&a.responseText&&a.responseURL.startsWith("file:")}function ae(a,d,m,C){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),d?(e.refreshToken=d,e.refreshTokenParsed=jn(d)):(delete e.refreshToken,delete e.refreshTokenParsed),m?(e.idToken=m,e.idTokenParsed=jn(m)):(delete e.idToken,delete e.idTokenParsed),a){if(e.token=a,e.tokenParsed=jn(a),e.sessionId=e.tokenParsed.session_state,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,C&&(e.timeSkew=Math.floor(C/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(w("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var y=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;w("[KEYCLOAK] Token expires in "+Math.round(y/1e3)+" s"),y<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,y)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function g(){var a="0123456789abcdef",d=$(36,a).split("");d[14]="4",d[19]=a.substr(d[19]&3|8,1),d[8]=d[13]=d[18]=d[23]="-";var m=d.join("");return m}function T(a){var d=U(a);if(d){var m=r.get(d.state);return m&&(d.valid=!0,d.redirectUri=m.redirectUri,d.storedNonce=m.nonce,d.prompt=m.prompt,d.pkceCodeVerifier=m.pkceCodeVerifier),d}}function U(a){var d;switch(e.flow){case"standard":d=["code","state","session_state","kc_action_status","iss"];break;case"implicit":d=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":d=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}d.push("error"),d.push("error_description"),d.push("error_uri");var m=a.indexOf("?"),C=a.indexOf("#"),y,R;if(e.responseMode==="query"&&m!==-1?(y=a.substring(0,m),R=P(a.substring(m+1,C!==-1?C:a.length),d),R.paramsString!==""&&(y+="?"+R.paramsString),C!==-1&&(y+=a.substring(C))):e.responseMode==="fragment"&&C!==-1&&(y=a.substring(0,C),R=P(a.substring(C+1),d),R.paramsString!==""&&(y+="#"+R.paramsString)),R&&R.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((R.oauthParams.code||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}else if(e.flow==="implicit"&&(R.oauthParams.access_token||R.oauthParams.error)&&R.oauthParams.state)return R.oauthParams.newUrl=y,R.oauthParams}}function P(a,d){for(var m=a.split("&"),C={paramsString:"",oauthParams:{}},y=0;y<m.length;y++){var R=m[y].indexOf("="),k=m[y].slice(0,R);d.indexOf(k)!==-1?C.oauthParams[k]=m[y].slice(R+1):(C.paramsString!==""&&(C.paramsString+="&"),C.paramsString+=m[y])}return C}function v(){var a={setSuccess:function(d){a.resolve(d)},setError:function(d){a.reject(d)}};return a.promise=new Promise(function(d,m){a.resolve=d,a.reject=m}),a}function _(a,d,m){var C=null,y=new Promise(function(R,k){C=setTimeout(function(){k({error:m||"Promise is not settled within timeout of "+d+"ms"})},d)});return Promise.race([a,y]).finally(function(){clearTimeout(C)})}function z(){var a=v();if(!s.enable||s.iframe)return a.setSuccess(),a.promise;var d=document.createElement("iframe");s.iframe=d,d.onload=function(){var y=e.endpoints.authorize();y.charAt(0)==="/"?s.iframeOrigin=ee():s.iframeOrigin=y.substring(0,y.indexOf("/",8)),a.setSuccess()};var m=e.endpoints.checkSessionIframe();d.setAttribute("src",m),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-session-iframe"),d.style.display="none",document.body.appendChild(d);var C=function(y){if(!(y.origin!==s.iframeOrigin||s.iframe.contentWindow!==y.source)&&(y.data=="unchanged"||y.data=="changed"||y.data=="error")){y.data!="unchanged"&&e.clearToken();for(var R=s.callbackList.splice(0,s.callbackList.length),k=R.length-1;k>=0;--k){var x=R[k];y.data=="error"?x.setError():x.setSuccess(y.data=="unchanged")}}};return window.addEventListener("message",C,!1),a.promise}function A(){s.enable&&e.token&&setTimeout(function(){W().then(function(a){a&&A()})},s.interval*1e3)}function W(){var a=v();if(s.iframe&&s.iframeOrigin){var d=e.clientId+" "+(e.sessionId?e.sessionId:"");s.callbackList.push(a);var m=s.iframeOrigin;s.callbackList.length==1&&s.iframe.contentWindow.postMessage(d,m)}else a.setSuccess();return a.promise}function te(){var a=v();if(s.enable||e.silentCheckSsoRedirectUri){var d=document.createElement("iframe");d.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),d.setAttribute("sandbox","allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-3p-check-iframe"),d.style.display="none",document.body.appendChild(d);var m=function(C){d.contentWindow===C.source&&(C.data!=="supported"&&C.data!=="unsupported"||(C.data==="unsupported"&&(E(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
73
73
 
74
74
  - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
75
75
  - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
76
76
 
77
- For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),s.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(d),window.removeEventListener("message",m),a.setSuccess()))};window.addEventListener("message",m,!1)}else a.setSuccess();return _(a.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ie(a){if(!a||a=="default")return{login:function(k){return window.location.assign(e.createLoginUrl(k)),v().promise},logout:function(k){return window.location.replace(e.createLogoutUrl(k)),v().promise},register:function(k){return window.location.assign(e.createRegisterUrl(k)),v().promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.location.href=k;else throw"Not supported by the OIDC server";return v().promise},redirectUri:function(k,x){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(a=="cordova"){s.enable=!1;var d=function(k,x,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(k,x,O):window.open(k,x,O)},m=function(k){return k&&k.cordovaOptions?Object.keys(k.cordovaOptions).reduce(function(x,O){return x[O]=k.cordovaOptions[O],x},{}):{}},C=function(k){return Object.keys(k).reduce(function(x,O){return x.push(O+"="+k[O]),x},[]).join(",")},y=function(k){var x=m(k);return x.location="no",k&&k.prompt=="none"&&(x.hidden="yes"),C(x)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(k){var x=v(),O=y(k),L=e.createLoginUrl(k),H=d(L,"_blank",O),J=!1,Ce=!1,we=function(){Ce=!0,H.close()};return H.addEventListener("loadstart",function(ue){if(ue.url.indexOf(R())==0){var je=T(ue.url);oe(je,x),we(),J=!0}}),H.addEventListener("loaderror",function(ue){if(!J)if(ue.url.indexOf(R())==0){var je=T(ue.url);oe(je,x),we(),J=!0}else x.setError(),we()}),H.addEventListener("exit",function(ue){Ce||x.setError({reason:"closed_by_user"})}),x.promise},logout:function(k){var x=v(),O=e.createLogoutUrl(k),L=d(O,"_blank","location=no,hidden=yes,clearcache=yes"),H;return L.addEventListener("loadstart",function(J){J.url.indexOf(R())==0&&L.close()}),L.addEventListener("loaderror",function(J){J.url.indexOf(R())==0||(H=!0),L.close()}),L.addEventListener("exit",function(J){H?x.setError():(e.clearToken(),x.setSuccess())}),x.promise},register:function(k){var x=v(),O=e.createRegisterUrl(),L=y(k),H=d(O,"_blank",L);return H.addEventListener("loadstart",function(J){if(J.url.indexOf(R())==0){H.close();var Ce=T(J.url);oe(Ce,x)}}),x.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u"){var x=d(k,"_blank","location=no");x.addEventListener("loadstart",function(O){O.url.indexOf(R())==0&&x.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(k){return R()}}}if(a=="cordova-native")return s.enable=!1,{login:function(k){var x=v(),O=e.createLoginUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,x)}),window.cordova.plugins.browsertab.openUrl(O),x.promise},logout:function(k){var x=v(),O=e.createLogoutUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),x.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),x.promise},register:function(k){var x=v(),O=e.createRegisterUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,x)}),window.cordova.plugins.browsertab.openUrl(O),x.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.cordova.plugins.browsertab.openUrl(k);else throw"Not supported by the OIDC server"},redirectUri:function(k){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+a}var se=function(){if(!(this instanceof se))return new se;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var a=this;function d(){for(var m=new Date().getTime(),C=0;C<localStorage.length;C++){var y=localStorage.key(C);if(y&&y.indexOf("kc-callback-")==0){var R=localStorage.getItem(y);if(R)try{var k=JSON.parse(R).expires;(!k||k<m)&&localStorage.removeItem(y)}catch{localStorage.removeItem(y)}}}}a.get=function(m){if(m){var C="kc-callback-"+m,y=localStorage.getItem(C);return y&&(localStorage.removeItem(C),y=JSON.parse(y)),d(),y}},a.add=function(m){d();var C="kc-callback-"+m.state;m.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(C,JSON.stringify(m))}},be=function(){if(!(this instanceof be))return new be;var a=this;a.get=function(y){if(y){var R=m("kc-callback-"+y);if(C("kc-callback-"+y,"",d(-100)),R)return JSON.parse(R)}},a.add=function(y){C("kc-callback-"+y.state,JSON.stringify(y),d(60))},a.removeItem=function(y){C(y,"",d(-100))};var d=function(y){var R=new Date;return R.setTime(R.getTime()+y*60*1e3),R},m=function(y){for(var R=y+"=",k=document.cookie.split(";"),x=0;x<k.length;x++){for(var O=k[x];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(R)==0)return O.substring(R.length,O.length)}return""},C=function(y,R,k){var x=y+"="+R+"; expires="+k.toUTCString()+"; ";document.cookie=x}};function M(){try{return new se}catch{}return new be}function ke(a){return function(){e.enableLogging&&a.apply(console,Array.prototype.slice.call(arguments))}}}async function jl(){const t="silent-login.html",e=await fetch(location.origin+"/"+t).then(async n=>n.status!==200?!1:(await n.text()).includes("silent-login-iframe-result")).catch(()=>!1);if(!e){const n=`O arquivo ${t} não foi localizado no projeto ou não possui o conteúdo correto!`;console.warn(n),document.documentElement.setAttribute("data-app-message",n)}return e}function Vl(t){const e=new Cr(t),n={},o=async(i={},f)=>{if(await jl())return i.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(i).then(async w=>{w&&await r(),f&&typeof f=="function"&&f(),document.documentElement.classList.add("app-mounted")}).catch(w=>{console.error(w),document.documentElement.setAttribute("data-app-message","Não foi possível conectar no servidor de autenticação.")})},r=async()=>{const i=await e.loadUserInfo();n.email=i.email??"",n.emailVerified=i.email_verified===!0,n.firstName=i.given_name??"",n.lastName=i.family_name??"",n.name=i.name??"",n.sub=i.sub??"",n.username=i.preferred_username??"",n.roles=[...i.role??[]],n.groups=[...i.group??[]],n.IsInRole=f=>n.roles.includes(f),sessionStorage.setItem("name",n.name)};return{Instance:e,User:n,Init:o,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}}}const zl=t=>Vl(t);class Vn{constructor(e=null){Be(this,"errors",[]);Be(this,"_value",null);Be(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}function xr(t,e){return function(){return t.apply(e,arguments)}}const{toString:Wl}=Object.prototype,{getPrototypeOf:zn}=Object,en=(t=>e=>{const n=Wl.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$e=t=>(t=t.toLowerCase(),e=>en(e)===t),tn=t=>e=>typeof e===t,{isArray:pt}=Array,Bt=tn("undefined");function ql(t){return t!==null&&!Bt(t)&&t.constructor!==null&&!Bt(t.constructor)&&Ie(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Sr=$e("ArrayBuffer");function Kl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Sr(t.buffer),e}const Gl=tn("string"),Ie=tn("function"),_r=tn("number"),nn=t=>t!==null&&typeof t=="object",Jl=t=>t===!0||t===!1,on=t=>{if(en(t)!=="object")return!1;const e=zn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Yl=$e("Date"),Xl=$e("File"),Zl=$e("Blob"),Ql=$e("FileList"),eu=t=>nn(t)&&Ie(t.pipe),tu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ie(t.append)&&((e=en(t))==="formdata"||e==="object"&&Ie(t.toString)&&t.toString()==="[object FormData]"))},nu=$e("URLSearchParams"),ou=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),pt(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let f;for(o=0;o<i;o++)f=s[o],e.call(null,t[f],f,t)}}function vr(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Tr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pr=t=>!Bt(t)&&t!==Tr;function Wn(){const{caseless:t}=Pr(this)&&this||{},e={},n=(o,r)=>{const s=t&&vr(e,r)||r;on(e[s])&&on(o)?e[s]=Wn(e[s],o):on(o)?e[s]=Wn({},o):pt(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Nt(arguments[o],n);return e}const ru=(t,e,n,{allOwnKeys:o}={})=>(Nt(e,(r,s)=>{n&&Ie(r)?t[s]=xr(r,n):t[s]=r},{allOwnKeys:o}),t),su=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),iu=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},au=(t,e,n,o)=>{let r,s,i;const f={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)i=r[s],(!o||o(i,t,e))&&!f[i]&&(e[i]=t[i],f[i]=!0);t=n!==!1&&zn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},cu=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},lu=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!_r(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},uu=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&zn(Uint8Array)),du=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},fu=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},pu=$e("HTMLFormElement"),hu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Rr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),mu=$e("RegExp"),Lr=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Nt(n,(r,s)=>{let i;(i=e(r,s,t))!==!1&&(o[s]=i||r)}),Object.defineProperties(t,o)},gu=t=>{Lr(t,(e,n)=>{if(Ie(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(Ie(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yu=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return pt(t)?o(t):o(String(t).split(e)),n},bu=()=>{},wu=(t,e)=>(t=+t,Number.isFinite(t)?t:e),qn="abcdefghijklmnopqrstuvwxyz",Or="0123456789",Ir={DIGIT:Or,ALPHA:qn,ALPHA_DIGIT:qn+qn.toUpperCase()+Or},Eu=(t=16,e=Ir.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function Au(t){return!!(t&&Ie(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const ku=t=>{const e=new Array(10),n=(o,r)=>{if(nn(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=pt(o)?[]:{};return Nt(o,(i,f)=>{const u=n(i,r+1);!Bt(u)&&(s[f]=u)}),e[r]=void 0,s}}return o};return n(t,0)},Cu=$e("AsyncFunction"),h={isArray:pt,isArrayBuffer:Sr,isBuffer:ql,isFormData:tu,isArrayBufferView:Kl,isString:Gl,isNumber:_r,isBoolean:Jl,isObject:nn,isPlainObject:on,isUndefined:Bt,isDate:Yl,isFile:Xl,isBlob:Zl,isRegExp:mu,isFunction:Ie,isStream:eu,isURLSearchParams:nu,isTypedArray:uu,isFileList:Ql,forEach:Nt,merge:Wn,extend:ru,trim:ou,stripBOM:su,inherits:iu,toFlatObject:au,kindOf:en,kindOfTest:$e,endsWith:cu,toArray:lu,forEachEntry:du,matchAll:fu,isHTMLForm:pu,hasOwnProperty:Rr,hasOwnProp:Rr,reduceDescriptors:Lr,freezeMethods:gu,toObjectSet:yu,toCamelCase:hu,noop:bu,toFiniteNumber:wu,findKey:vr,global:Tr,isContextDefined:Pr,ALPHABET:Ir,generateString:Eu,isSpecCompliantForm:Au,toJSONObject:ku,isAsyncFn:Cu,isThenable:t=>t&&(nn(t)||Ie(t))&&Ie(t.then)&&Ie(t.catch)};function X(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}h.inherits(X,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:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Br=X.prototype,Nr={};["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(t=>{Nr[t]={value:t}}),Object.defineProperties(X,Nr),Object.defineProperty(Br,"isAxiosError",{value:!0}),X.from=(t,e,n,o,r,s)=>{const i=Object.create(Br);return h.toFlatObject(t,i,function(u){return u!==Error.prototype},f=>f!=="isAxiosError"),X.call(i,t.message,e,n,o,r),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};const xu=null;function Kn(t){return h.isPlainObject(t)||h.isArray(t)}function Fr(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function Ur(t,e,n){return t?t.concat(e).map(function(r,s){return r=Fr(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function Su(t){return h.isArray(t)&&!t.some(Kn)}const _u=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function rn(t,e,n){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,D){return!h.isUndefined(D[N])});const o=n.metaTokens,r=n.visitor||E,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(r))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(h.isDate(B))return B.toISOString();if(!u&&h.isBlob(B))throw new X("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(B)||h.isTypedArray(B)?u&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function E(B,N,D){let ee=B;if(B&&!D&&typeof B=="object"){if(h.endsWith(N,"{}"))N=o?N:N.slice(0,-2),B=JSON.stringify(B);else if(h.isArray(B)&&Su(B)||(h.isFileList(B)||h.endsWith(N,"[]"))&&(ee=h.toArray(B)))return N=Fr(N),ee.forEach(function(V,ye){!(h.isUndefined(V)||V===null)&&e.append(i===!0?Ur([N],ye,s):i===null?N:N+"[]",w(V))}),!1}return Kn(B)?!0:(e.append(Ur(D,N,s),w(B)),!1)}const b=[],j=Object.assign(_u,{defaultVisitor:E,convertValue:w,isVisitable:Kn});function $(B,N){if(!h.isUndefined(B)){if(b.indexOf(B)!==-1)throw Error("Circular reference detected in "+N.join("."));b.push(B),h.forEach(B,function(ee,oe){(!(h.isUndefined(ee)||ee===null)&&r.call(e,ee,h.isString(oe)?oe.trim():oe,N,j))===!0&&$(ee,N?N.concat(oe):[oe])}),b.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return $(t),e}function Mr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Gn(t,e){this._pairs=[],t&&rn(t,this,e)}const Dr=Gn.prototype;Dr.append=function(e,n){this._pairs.push([e,n])},Dr.toString=function(e){const n=e?function(o){return e.call(this,o,Mr)}:Mr;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function vu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $r(t,e,n){if(!e)return t;const o=n&&n.encode||vu,r=n&&n.serialize;let s;if(r?s=r(e,n):s=h.isURLSearchParams(e)?e.toString():new Gn(e,n).toString(o),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Hr{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(o){o!==null&&e(o)})}}const jr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Gn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vr=typeof window<"u"&&typeof document<"u",Pu=(t=>Vr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Ru=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vr,hasStandardBrowserEnv:Pu,hasStandardBrowserWebWorkerEnv:Ru},Symbol.toStringTag,{value:"Module"})),...Tu};function Lu(t,e){return rn(t,new He.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return He.isNode&&h.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Ou(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Iu(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function zr(t){function e(n,o,r,s){let i=n[s++];if(i==="__proto__")return!0;const f=Number.isFinite(+i),u=s>=n.length;return i=!i&&h.isArray(r)?r.length:i,u?(h.hasOwnProp(r,i)?r[i]=[r[i],o]:r[i]=o,!f):((!r[i]||!h.isObject(r[i]))&&(r[i]=[]),e(n,o,r[i],s)&&h.isArray(r[i])&&(r[i]=Iu(r[i])),!f)}if(h.isFormData(t)&&h.isFunction(t.entries)){const n={};return h.forEachEntry(t,(o,r)=>{e(Ou(o),r,n,0)}),n}return null}function Bu(t,e,n){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const Jn={transitional:jr,adapter:["xhr","http"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=h.isObject(e);if(s&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r&&r?JSON.stringify(zr(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Lu(e,this.formSerializer).toString();if((f=h.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return rn(f?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Bu(e)):e}],transformResponse:[function(e){const n=this.transitional||Jn.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&h.isString(e)&&(o&&!this.responseType||r)){const i=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(f){if(i)throw f.name==="SyntaxError"?X.from(f,X.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],t=>{Jn.headers[t]={}});const Yn=Jn,Nu=h.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"]),Fu=t=>{const e={};let n,o,r;return t&&t.split(`
78
- `).forEach(function(i){r=i.indexOf(":"),n=i.substring(0,r).trim().toLowerCase(),o=i.substring(r+1).trim(),!(!n||e[n]&&Nu[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},Wr=Symbol("internals");function Ft(t){return t&&String(t).trim().toLowerCase()}function sn(t){return t===!1||t==null?t:h.isArray(t)?t.map(sn):String(t)}function Uu(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Mu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Xn(t,e,n,o,r){if(h.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!h.isString(e)){if(h.isString(o))return e.indexOf(o)!==-1;if(h.isRegExp(o))return o.test(e)}}function Du(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function $u(t,e){const n=h.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,i){return this[o].call(this,e,r,s,i)},configurable:!0})})}class an{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(f,u,w){const E=Ft(u);if(!E)throw new Error("header name must be a non-empty string");const b=h.findKey(r,E);(!b||r[b]===void 0||w===!0||w===void 0&&r[b]!==!1)&&(r[b||u]=sn(f))}const i=(f,u)=>h.forEach(f,(w,E)=>s(w,E,u));return h.isPlainObject(e)||e instanceof this.constructor?i(e,n):h.isString(e)&&(e=e.trim())&&!Mu(e)?i(Fu(e),n):e!=null&&s(n,e,o),this}get(e,n){if(e=Ft(e),e){const o=h.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Uu(r);if(h.isFunction(n))return n.call(this,r,o);if(h.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ft(e),e){const o=h.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Xn(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(i){if(i=Ft(i),i){const f=h.findKey(o,i);f&&(!n||Xn(o,o[f],f,n))&&(delete o[f],r=!0)}}return h.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!e||Xn(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return h.forEach(this,(r,s)=>{const i=h.findKey(o,s);if(i){n[i]=sn(r),delete n[s];return}const f=e?Du(s):String(s).trim();f!==s&&delete n[s],n[f]=sn(r),o[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return h.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&h.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
79
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[Wr]=this[Wr]={accessors:{}}).accessors,r=this.prototype;function s(i){const f=Ft(i);o[f]||($u(r,i),o[f]=!0)}return h.isArray(e)?e.forEach(s):s(e),this}}an.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(an.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),h.freezeMethods(an);const ze=an;function Zn(t,e){const n=this||Yn,o=e||n,r=ze.from(o.headers);let s=o.data;return h.forEach(t,function(f){s=f.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function qr(t){return!!(t&&t.__CANCEL__)}function Ut(t,e,n){X.call(this,t??"canceled",X.ERR_CANCELED,e,n),this.name="CanceledError"}h.inherits(Ut,X,{__CANCEL__:!0});function Hu(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const ju=He.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const i=[t+"="+encodeURIComponent(e)];h.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),h.isString(o)&&i.push("path="+o),h.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vu(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zu(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Kr(t,e){return t&&!Vu(e)?zu(t,e):e}const Wu=He.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let i=s;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(i){const f=h.isString(i)?r(i):i;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}();function qu(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ku(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,i;return e=e!==void 0?e:1e3,function(u){const w=Date.now(),E=o[s];i||(i=w),n[r]=u,o[r]=w;let b=s,j=0;for(;b!==r;)j+=n[b++],b=b%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),w-i<e)return;const $=E&&w-E;return $?Math.round(j*1e3/$):void 0}}function Gr(t,e){let n=0;const o=Ku(50,250);return r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,f=s-n,u=o(f),w=s<=i;n=s;const E={loaded:s,total:i,progress:i?s/i:void 0,bytes:f,rate:u||void 0,estimated:u&&i&&w?(i-s)/u:void 0,event:r};E[e?"download":"upload"]=!0,t(E)}}const Qn={http:xu,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){let r=t.data;const s=ze.from(t.headers).normalize();let{responseType:i,withXSRFToken:f}=t,u;function w(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let E;if(h.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((E=s.getContentType())!==!1){const[N,...D]=E?E.split(";").map(ee=>ee.trim()).filter(Boolean):[];s.setContentType([N||"multipart/form-data",...D].join("; "))}}let b=new XMLHttpRequest;if(t.auth){const N=t.auth.username||"",D=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+D))}const j=Kr(t.baseURL,t.url);b.open(t.method.toUpperCase(),$r(j,t.params,t.paramsSerializer),!0),b.timeout=t.timeout;function $(){if(!b)return;const N=ze.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),ee={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:t,request:b};Hu(function(V){n(V),w()},function(V){o(V),w()},ee),b=null}if("onloadend"in b?b.onloadend=$:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout($)},b.onabort=function(){b&&(o(new X("Request aborted",X.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new X("Network Error",X.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let D=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const ee=t.transitional||jr;t.timeoutErrorMessage&&(D=t.timeoutErrorMessage),o(new X(D,ee.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,t,b)),b=null},He.hasStandardBrowserEnv&&(f&&h.isFunction(f)&&(f=f(t)),f||f!==!1&&Wu(j))){const N=t.xsrfHeaderName&&t.xsrfCookieName&&ju.read(t.xsrfCookieName);N&&s.set(t.xsrfHeaderName,N)}r===void 0&&s.setContentType(null),"setRequestHeader"in b&&h.forEach(s.toJSON(),function(D,ee){b.setRequestHeader(ee,D)}),h.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),i&&i!=="json"&&(b.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&b.addEventListener("progress",Gr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",Gr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=N=>{b&&(o(!N||N.type?new Ut(null,t,b):N),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const B=qu(j);if(B&&He.protocols.indexOf(B)===-1){o(new X("Unsupported protocol "+B+":",X.ERR_BAD_REQUEST,t));return}b.send(r||null)})}};h.forEach(Qn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jr=t=>`- ${t}`,Gu=t=>h.isFunction(t)||t===null||t===!1,Yr={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let i;if(o=n,!Gu(n)&&(o=Qn[(i=String(n)).toLowerCase()],o===void 0))throw new X(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=e?s.length>1?`since :
77
+ For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),s.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(d),window.removeEventListener("message",m),a.setSuccess()))};window.addEventListener("message",m,!1)}else a.setSuccess();return _(a.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ie(a){if(!a||a=="default")return{login:function(k){return window.location.assign(e.createLoginUrl(k)),v().promise},logout:function(k){return window.location.replace(e.createLogoutUrl(k)),v().promise},register:function(k){return window.location.assign(e.createRegisterUrl(k)),v().promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.location.href=k;else throw"Not supported by the OIDC server";return v().promise},redirectUri:function(k,x){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(a=="cordova"){s.enable=!1;var d=function(k,x,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(k,x,O):window.open(k,x,O)},m=function(k){return k&&k.cordovaOptions?Object.keys(k.cordovaOptions).reduce(function(x,O){return x[O]=k.cordovaOptions[O],x},{}):{}},C=function(k){return Object.keys(k).reduce(function(x,O){return x.push(O+"="+k[O]),x},[]).join(",")},y=function(k){var x=m(k);return x.location="no",k&&k.prompt=="none"&&(x.hidden="yes"),C(x)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(k){var x=v(),O=y(k),L=e.createLoginUrl(k),H=d(L,"_blank",O),J=!1,Ce=!1,we=function(){Ce=!0,H.close()};return H.addEventListener("loadstart",function(ue){if(ue.url.indexOf(R())==0){var je=T(ue.url);oe(je,x),we(),J=!0}}),H.addEventListener("loaderror",function(ue){if(!J)if(ue.url.indexOf(R())==0){var je=T(ue.url);oe(je,x),we(),J=!0}else x.setError(),we()}),H.addEventListener("exit",function(ue){Ce||x.setError({reason:"closed_by_user"})}),x.promise},logout:function(k){var x=v(),O=e.createLogoutUrl(k),L=d(O,"_blank","location=no,hidden=yes,clearcache=yes"),H;return L.addEventListener("loadstart",function(J){J.url.indexOf(R())==0&&L.close()}),L.addEventListener("loaderror",function(J){J.url.indexOf(R())==0||(H=!0),L.close()}),L.addEventListener("exit",function(J){H?x.setError():(e.clearToken(),x.setSuccess())}),x.promise},register:function(k){var x=v(),O=e.createRegisterUrl(),L=y(k),H=d(O,"_blank",L);return H.addEventListener("loadstart",function(J){if(J.url.indexOf(R())==0){H.close();var Ce=T(J.url);oe(Ce,x)}}),x.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u"){var x=d(k,"_blank","location=no");x.addEventListener("loadstart",function(O){O.url.indexOf(R())==0&&x.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(k){return R()}}}if(a=="cordova-native")return s.enable=!1,{login:function(k){var x=v(),O=e.createLoginUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,x)}),window.cordova.plugins.browsertab.openUrl(O),x.promise},logout:function(k){var x=v(),O=e.createLogoutUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),x.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),x.promise},register:function(k){var x=v(),O=e.createRegisterUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,x)}),window.cordova.plugins.browsertab.openUrl(O),x.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.cordova.plugins.browsertab.openUrl(k);else throw"Not supported by the OIDC server"},redirectUri:function(k){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+a}var se=function(){if(!(this instanceof se))return new se;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var a=this;function d(){for(var m=new Date().getTime(),C=0;C<localStorage.length;C++){var y=localStorage.key(C);if(y&&y.indexOf("kc-callback-")==0){var R=localStorage.getItem(y);if(R)try{var k=JSON.parse(R).expires;(!k||k<m)&&localStorage.removeItem(y)}catch{localStorage.removeItem(y)}}}}a.get=function(m){if(m){var C="kc-callback-"+m,y=localStorage.getItem(C);return y&&(localStorage.removeItem(C),y=JSON.parse(y)),d(),y}},a.add=function(m){d();var C="kc-callback-"+m.state;m.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(C,JSON.stringify(m))}},be=function(){if(!(this instanceof be))return new be;var a=this;a.get=function(y){if(y){var R=m("kc-callback-"+y);if(C("kc-callback-"+y,"",d(-100)),R)return JSON.parse(R)}},a.add=function(y){C("kc-callback-"+y.state,JSON.stringify(y),d(60))},a.removeItem=function(y){C(y,"",d(-100))};var d=function(y){var R=new Date;return R.setTime(R.getTime()+y*60*1e3),R},m=function(y){for(var R=y+"=",k=document.cookie.split(";"),x=0;x<k.length;x++){for(var O=k[x];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(R)==0)return O.substring(R.length,O.length)}return""},C=function(y,R,k){var x=y+"="+R+"; expires="+k.toUTCString()+"; ";document.cookie=x}};function M(){try{return new se}catch{}return new be}function ke(a){return function(){e.enableLogging&&a.apply(console,Array.prototype.slice.call(arguments))}}}async function Vl(){const t="silent-login.html",e=await fetch(location.origin+"/"+t).then(async n=>n.status!==200?!1:(await n.text()).includes("silent-login-iframe-result")).catch(()=>!1);if(!e){const n=`O arquivo ${t} não foi localizado no projeto ou não possui o conteúdo correto!`;console.warn(n),document.documentElement.setAttribute("data-app-message",n)}return e}function zl(t){const e=new Cr(t),n={},o=async(i={},f)=>{if(await Vl())return i.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(i).then(async w=>{w&&await r(),f&&typeof f=="function"&&f(),document.documentElement.classList.add("app-mounted")}).catch(w=>{console.error(w),document.documentElement.setAttribute("data-app-message","Não foi possível conectar no servidor de autenticação.")})},r=async()=>{const i=await e.loadUserInfo();n.email=i.email??"",n.emailVerified=i.email_verified===!0,n.firstName=i.given_name??"",n.lastName=i.family_name??"",n.name=i.name??"",n.sub=i.sub??"",n.username=i.preferred_username??"",n.roles=[...i.role??[]],n.groups=[...i.group??[]],n.IsInRole=f=>n.roles.includes(f),sessionStorage.setItem("name",n.name)};return{Instance:e,User:n,Init:o,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}}}const Wl=t=>zl(t);class Vn{constructor(e=null){Be(this,"errors",[]);Be(this,"_value",null);Be(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}function xr(t,e){return function(){return t.apply(e,arguments)}}const{toString:ql}=Object.prototype,{getPrototypeOf:zn}=Object,en=(t=>e=>{const n=ql.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$e=t=>(t=t.toLowerCase(),e=>en(e)===t),tn=t=>e=>typeof e===t,{isArray:pt}=Array,Bt=tn("undefined");function Kl(t){return t!==null&&!Bt(t)&&t.constructor!==null&&!Bt(t.constructor)&&Ie(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Sr=$e("ArrayBuffer");function Gl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Sr(t.buffer),e}const Jl=tn("string"),Ie=tn("function"),_r=tn("number"),nn=t=>t!==null&&typeof t=="object",Yl=t=>t===!0||t===!1,on=t=>{if(en(t)!=="object")return!1;const e=zn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Xl=$e("Date"),Zl=$e("File"),Ql=$e("Blob"),eu=$e("FileList"),tu=t=>nn(t)&&Ie(t.pipe),nu=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ie(t.append)&&((e=en(t))==="formdata"||e==="object"&&Ie(t.toString)&&t.toString()==="[object FormData]"))},ou=$e("URLSearchParams"),ru=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let o,r;if(typeof t!="object"&&(t=[t]),pt(t))for(o=0,r=t.length;o<r;o++)e.call(null,t[o],o,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let f;for(o=0;o<i;o++)f=s[o],e.call(null,t[f],f,t)}}function vr(t,e){e=e.toLowerCase();const n=Object.keys(t);let o=n.length,r;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const Tr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pr=t=>!Bt(t)&&t!==Tr;function Wn(){const{caseless:t}=Pr(this)&&this||{},e={},n=(o,r)=>{const s=t&&vr(e,r)||r;on(e[s])&&on(o)?e[s]=Wn(e[s],o):on(o)?e[s]=Wn({},o):pt(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Nt(arguments[o],n);return e}const su=(t,e,n,{allOwnKeys:o}={})=>(Nt(e,(r,s)=>{n&&Ie(r)?t[s]=xr(r,n):t[s]=r},{allOwnKeys:o}),t),iu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),au=(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},cu=(t,e,n,o)=>{let r,s,i;const f={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)i=r[s],(!o||o(i,t,e))&&!f[i]&&(e[i]=t[i],f[i]=!0);t=n!==!1&&zn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},lu=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return o!==-1&&o===n},uu=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!_r(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},du=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&zn(Uint8Array)),fu=(t,e)=>{const o=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=o.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},pu=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},hu=$e("HTMLFormElement"),mu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Rr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),gu=$e("RegExp"),Lr=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Nt(n,(r,s)=>{let i;(i=e(r,s,t))!==!1&&(o[s]=i||r)}),Object.defineProperties(t,o)},yu=t=>{Lr(t,(e,n)=>{if(Ie(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=t[n];if(Ie(o)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bu=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return pt(t)?o(t):o(String(t).split(e)),n},wu=()=>{},Eu=(t,e)=>(t=+t,Number.isFinite(t)?t:e),qn="abcdefghijklmnopqrstuvwxyz",Or="0123456789",Ir={DIGIT:Or,ALPHA:qn,ALPHA_DIGIT:qn+qn.toUpperCase()+Or},Au=(t=16,e=Ir.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function ku(t){return!!(t&&Ie(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Cu=t=>{const e=new Array(10),n=(o,r)=>{if(nn(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=pt(o)?[]:{};return Nt(o,(i,f)=>{const u=n(i,r+1);!Bt(u)&&(s[f]=u)}),e[r]=void 0,s}}return o};return n(t,0)},xu=$e("AsyncFunction"),h={isArray:pt,isArrayBuffer:Sr,isBuffer:Kl,isFormData:nu,isArrayBufferView:Gl,isString:Jl,isNumber:_r,isBoolean:Yl,isObject:nn,isPlainObject:on,isUndefined:Bt,isDate:Xl,isFile:Zl,isBlob:Ql,isRegExp:gu,isFunction:Ie,isStream:tu,isURLSearchParams:ou,isTypedArray:du,isFileList:eu,forEach:Nt,merge:Wn,extend:su,trim:ru,stripBOM:iu,inherits:au,toFlatObject:cu,kindOf:en,kindOfTest:$e,endsWith:lu,toArray:uu,forEachEntry:fu,matchAll:pu,isHTMLForm:hu,hasOwnProperty:Rr,hasOwnProp:Rr,reduceDescriptors:Lr,freezeMethods:yu,toObjectSet:bu,toCamelCase:mu,noop:wu,toFiniteNumber:Eu,findKey:vr,global:Tr,isContextDefined:Pr,ALPHABET:Ir,generateString:Au,isSpecCompliantForm:ku,toJSONObject:Cu,isAsyncFn:xu,isThenable:t=>t&&(nn(t)||Ie(t))&&Ie(t.then)&&Ie(t.catch)};function X(t,e,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r)}h.inherits(X,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:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Br=X.prototype,Nr={};["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(t=>{Nr[t]={value:t}}),Object.defineProperties(X,Nr),Object.defineProperty(Br,"isAxiosError",{value:!0}),X.from=(t,e,n,o,r,s)=>{const i=Object.create(Br);return h.toFlatObject(t,i,function(u){return u!==Error.prototype},f=>f!=="isAxiosError"),X.call(i,t.message,e,n,o,r),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};const Su=null;function Kn(t){return h.isPlainObject(t)||h.isArray(t)}function Fr(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function Ur(t,e,n){return t?t.concat(e).map(function(r,s){return r=Fr(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function _u(t){return h.isArray(t)&&!t.some(Kn)}const vu=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function rn(t,e,n){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,D){return!h.isUndefined(D[N])});const o=n.metaTokens,r=n.visitor||E,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(r))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(h.isDate(B))return B.toISOString();if(!u&&h.isBlob(B))throw new X("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(B)||h.isTypedArray(B)?u&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function E(B,N,D){let ee=B;if(B&&!D&&typeof B=="object"){if(h.endsWith(N,"{}"))N=o?N:N.slice(0,-2),B=JSON.stringify(B);else if(h.isArray(B)&&_u(B)||(h.isFileList(B)||h.endsWith(N,"[]"))&&(ee=h.toArray(B)))return N=Fr(N),ee.forEach(function(V,ye){!(h.isUndefined(V)||V===null)&&e.append(i===!0?Ur([N],ye,s):i===null?N:N+"[]",w(V))}),!1}return Kn(B)?!0:(e.append(Ur(D,N,s),w(B)),!1)}const b=[],j=Object.assign(vu,{defaultVisitor:E,convertValue:w,isVisitable:Kn});function $(B,N){if(!h.isUndefined(B)){if(b.indexOf(B)!==-1)throw Error("Circular reference detected in "+N.join("."));b.push(B),h.forEach(B,function(ee,oe){(!(h.isUndefined(ee)||ee===null)&&r.call(e,ee,h.isString(oe)?oe.trim():oe,N,j))===!0&&$(ee,N?N.concat(oe):[oe])}),b.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return $(t),e}function Mr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Gn(t,e){this._pairs=[],t&&rn(t,this,e)}const Dr=Gn.prototype;Dr.append=function(e,n){this._pairs.push([e,n])},Dr.toString=function(e){const n=e?function(o){return e.call(this,o,Mr)}:Mr;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Tu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $r(t,e,n){if(!e)return t;const o=n&&n.encode||Tu,r=n&&n.serialize;let s;if(r?s=r(e,n):s=h.isURLSearchParams(e)?e.toString():new Gn(e,n).toString(o),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Hr{constructor(){this.handlers=[]}use(e,n,o){return this.handlers.push({fulfilled:e,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(o){o!==null&&e(o)})}}const jr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Gn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vr=typeof window<"u"&&typeof document<"u",Ru=(t=>Vr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Lu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",He={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vr,hasStandardBrowserEnv:Ru,hasStandardBrowserWebWorkerEnv:Lu},Symbol.toStringTag,{value:"Module"})),...Pu};function Ou(t,e){return rn(t,new He.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return He.isNode&&h.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Iu(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Bu(t){const e={},n=Object.keys(t);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],e[s]=t[s];return e}function zr(t){function e(n,o,r,s){let i=n[s++];if(i==="__proto__")return!0;const f=Number.isFinite(+i),u=s>=n.length;return i=!i&&h.isArray(r)?r.length:i,u?(h.hasOwnProp(r,i)?r[i]=[r[i],o]:r[i]=o,!f):((!r[i]||!h.isObject(r[i]))&&(r[i]=[]),e(n,o,r[i],s)&&h.isArray(r[i])&&(r[i]=Bu(r[i])),!f)}if(h.isFormData(t)&&h.isFunction(t.entries)){const n={};return h.forEachEntry(t,(o,r)=>{e(Iu(o),r,n,0)}),n}return null}function Nu(t,e,n){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const Jn={transitional:jr,adapter:["xhr","http"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=h.isObject(e);if(s&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r&&r?JSON.stringify(zr(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let f;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Ou(e,this.formSerializer).toString();if((f=h.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return rn(f?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Nu(e)):e}],transformResponse:[function(e){const n=this.transitional||Jn.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&h.isString(e)&&(o&&!this.responseType||r)){const i=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(f){if(i)throw f.name==="SyntaxError"?X.from(f,X.ERR_BAD_RESPONSE,this,null,this.response):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],t=>{Jn.headers[t]={}});const Yn=Jn,Fu=h.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"]),Uu=t=>{const e={};let n,o,r;return t&&t.split(`
78
+ `).forEach(function(i){r=i.indexOf(":"),n=i.substring(0,r).trim().toLowerCase(),o=i.substring(r+1).trim(),!(!n||e[n]&&Fu[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},Wr=Symbol("internals");function Ft(t){return t&&String(t).trim().toLowerCase()}function sn(t){return t===!1||t==null?t:h.isArray(t)?t.map(sn):String(t)}function Mu(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}const Du=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Xn(t,e,n,o,r){if(h.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!h.isString(e)){if(h.isString(o))return e.indexOf(o)!==-1;if(h.isRegExp(o))return o.test(e)}}function $u(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function Hu(t,e){const n=h.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,i){return this[o].call(this,e,r,s,i)},configurable:!0})})}class an{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(f,u,w){const E=Ft(u);if(!E)throw new Error("header name must be a non-empty string");const b=h.findKey(r,E);(!b||r[b]===void 0||w===!0||w===void 0&&r[b]!==!1)&&(r[b||u]=sn(f))}const i=(f,u)=>h.forEach(f,(w,E)=>s(w,E,u));return h.isPlainObject(e)||e instanceof this.constructor?i(e,n):h.isString(e)&&(e=e.trim())&&!Du(e)?i(Uu(e),n):e!=null&&s(n,e,o),this}get(e,n){if(e=Ft(e),e){const o=h.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Mu(r);if(h.isFunction(n))return n.call(this,r,o);if(h.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ft(e),e){const o=h.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Xn(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(i){if(i=Ft(i),i){const f=h.findKey(o,i);f&&(!n||Xn(o,o[f],f,n))&&(delete o[f],r=!0)}}return h.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!e||Xn(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return h.forEach(this,(r,s)=>{const i=h.findKey(o,s);if(i){n[i]=sn(r),delete n[s];return}const f=e?$u(s):String(s).trim();f!==s&&delete n[s],n[f]=sn(r),o[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return h.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&h.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
79
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const o=new this(e);return n.forEach(r=>o.set(r)),o}static accessor(e){const o=(this[Wr]=this[Wr]={accessors:{}}).accessors,r=this.prototype;function s(i){const f=Ft(i);o[f]||(Hu(r,i),o[f]=!0)}return h.isArray(e)?e.forEach(s):s(e),this}}an.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(an.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),h.freezeMethods(an);const ze=an;function Zn(t,e){const n=this||Yn,o=e||n,r=ze.from(o.headers);let s=o.data;return h.forEach(t,function(f){s=f.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function qr(t){return!!(t&&t.__CANCEL__)}function Ut(t,e,n){X.call(this,t??"canceled",X.ERR_CANCELED,e,n),this.name="CanceledError"}h.inherits(Ut,X,{__CANCEL__:!0});function ju(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Vu=He.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const i=[t+"="+encodeURIComponent(e)];h.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),h.isString(o)&&i.push("path="+o),h.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function zu(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Wu(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Kr(t,e){return t&&!zu(e)?Wu(t,e):e}const qu=He.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let i=s;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=r(window.location.href),function(i){const f=h.isString(i)?r(i):i;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}();function Ku(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Gu(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,i;return e=e!==void 0?e:1e3,function(u){const w=Date.now(),E=o[s];i||(i=w),n[r]=u,o[r]=w;let b=s,j=0;for(;b!==r;)j+=n[b++],b=b%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),w-i<e)return;const $=E&&w-E;return $?Math.round(j*1e3/$):void 0}}function Gr(t,e){let n=0;const o=Gu(50,250);return r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,f=s-n,u=o(f),w=s<=i;n=s;const E={loaded:s,total:i,progress:i?s/i:void 0,bytes:f,rate:u||void 0,estimated:u&&i&&w?(i-s)/u:void 0,event:r};E[e?"download":"upload"]=!0,t(E)}}const Qn={http:Su,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){let r=t.data;const s=ze.from(t.headers).normalize();let{responseType:i,withXSRFToken:f}=t,u;function w(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let E;if(h.isFormData(r)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((E=s.getContentType())!==!1){const[N,...D]=E?E.split(";").map(ee=>ee.trim()).filter(Boolean):[];s.setContentType([N||"multipart/form-data",...D].join("; "))}}let b=new XMLHttpRequest;if(t.auth){const N=t.auth.username||"",D=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+D))}const j=Kr(t.baseURL,t.url);b.open(t.method.toUpperCase(),$r(j,t.params,t.paramsSerializer),!0),b.timeout=t.timeout;function $(){if(!b)return;const N=ze.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),ee={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:t,request:b};ju(function(V){n(V),w()},function(V){o(V),w()},ee),b=null}if("onloadend"in b?b.onloadend=$:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout($)},b.onabort=function(){b&&(o(new X("Request aborted",X.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new X("Network Error",X.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let D=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const ee=t.transitional||jr;t.timeoutErrorMessage&&(D=t.timeoutErrorMessage),o(new X(D,ee.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,t,b)),b=null},He.hasStandardBrowserEnv&&(f&&h.isFunction(f)&&(f=f(t)),f||f!==!1&&qu(j))){const N=t.xsrfHeaderName&&t.xsrfCookieName&&Vu.read(t.xsrfCookieName);N&&s.set(t.xsrfHeaderName,N)}r===void 0&&s.setContentType(null),"setRequestHeader"in b&&h.forEach(s.toJSON(),function(D,ee){b.setRequestHeader(ee,D)}),h.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),i&&i!=="json"&&(b.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&b.addEventListener("progress",Gr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",Gr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=N=>{b&&(o(!N||N.type?new Ut(null,t,b):N),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const B=Ku(j);if(B&&He.protocols.indexOf(B)===-1){o(new X("Unsupported protocol "+B+":",X.ERR_BAD_REQUEST,t));return}b.send(r||null)})}};h.forEach(Qn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jr=t=>`- ${t}`,Ju=t=>h.isFunction(t)||t===null||t===!1,Yr={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let i;if(o=n,!Ju(n)&&(o=Qn[(i=String(n)).toLowerCase()],o===void 0))throw new X(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=e?s.length>1?`since :
80
80
  `+s.map(Jr).join(`
81
- `):" "+Jr(s[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:Qn};function eo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function Xr(t){return eo(t),t.headers=ze.from(t.headers),t.data=Zn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yr.getAdapter(t.adapter||Yn.adapter)(t).then(function(o){return eo(t),o.data=Zn.call(t,t.transformResponse,o),o.headers=ze.from(o.headers),o},function(o){return qr(o)||(eo(t),o&&o.response&&(o.response.data=Zn.call(t,t.transformResponse,o.response),o.response.headers=ze.from(o.response.headers))),Promise.reject(o)})}const Zr=t=>t instanceof ze?t.toJSON():t;function ht(t,e){e=e||{};const n={};function o(w,E,b){return h.isPlainObject(w)&&h.isPlainObject(E)?h.merge.call({caseless:b},w,E):h.isPlainObject(E)?h.merge({},E):h.isArray(E)?E.slice():E}function r(w,E,b){if(h.isUndefined(E)){if(!h.isUndefined(w))return o(void 0,w,b)}else return o(w,E,b)}function s(w,E){if(!h.isUndefined(E))return o(void 0,E)}function i(w,E){if(h.isUndefined(E)){if(!h.isUndefined(w))return o(void 0,w)}else return o(void 0,E)}function f(w,E,b){if(b in e)return o(w,E);if(b in t)return o(void 0,w)}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:f,headers:(w,E)=>r(Zr(w),Zr(E),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(E){const b=u[E]||r,j=b(t[E],e[E],E);h.isUndefined(j)&&b!==f||(n[E]=j)}),n}const Qr="1.6.5",to={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{to[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const es={};to.transitional=function(e,n,o){function r(s,i){return"[Axios v"+Qr+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,f)=>{if(e===!1)throw new X(r(i," has been removed"+(n?" in "+n:"")),X.ERR_DEPRECATED);return n&&!es[i]&&(es[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,i,f):!0}};function Ju(t,e,n){if(typeof t!="object")throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],i=e[s];if(i){const f=t[s],u=f===void 0||i(f,s,t);if(u!==!0)throw new X("option "+s+" must be "+u,X.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}}const no={assertOptions:Ju,validators:to},Ye=no.validators;class cn{constructor(e){this.defaults=e,this.interceptors={request:new Hr,response:new Hr}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ht(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&no.assertOptions(o,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),r!=null&&(h.isFunction(r)?n.paramsSerializer={serialize:r}:no.assertOptions(r,{encode:Ye.function,serialize:Ye.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&h.merge(s.common,s[n.method]);s&&h.forEach(["delete","get","head","post","put","patch","common"],B=>{delete s[B]}),n.headers=ze.concat(i,s);const f=[];let u=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(u=u&&N.synchronous,f.unshift(N.fulfilled,N.rejected))});const w=[];this.interceptors.response.forEach(function(N){w.push(N.fulfilled,N.rejected)});let E,b=0,j;if(!u){const B=[Xr.bind(this),void 0];for(B.unshift.apply(B,f),B.push.apply(B,w),j=B.length,E=Promise.resolve(n);b<j;)E=E.then(B[b++],B[b++]);return E}j=f.length;let $=n;for(b=0;b<j;){const B=f[b++],N=f[b++];try{$=B($)}catch(D){N.call(this,D);break}}try{E=Xr.call(this,$)}catch(B){return Promise.reject(B)}for(b=0,j=w.length;b<j;)E=E.then(w[b++],w[b++]);return E}getUri(e){e=ht(this.defaults,e);const n=Kr(e.baseURL,e.url);return $r(n,e.params,e.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(e){cn.prototype[e]=function(n,o){return this.request(ht(o||{},{method:e,url:n,data:(o||{}).data}))}}),h.forEach(["post","put","patch"],function(e){function n(o){return function(s,i,f){return this.request(ht(f||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}cn.prototype[e]=n(),cn.prototype[e+"Form"]=n(!0)});const ln=cn;class oo{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(f=>{o.subscribe(f),s=f}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},e(function(s,i,f){o.reason||(o.reason=new Ut(s,i,f),n(o.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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new oo(function(r){e=r}),cancel:e}}}const Yu=oo;function Xu(t){return function(n){return t.apply(null,n)}}function Zu(t){return h.isObject(t)&&t.isAxiosError===!0}const ro={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(ro).forEach(([t,e])=>{ro[e]=t});const Qu=ro;function ts(t){const e=new ln(t),n=xr(ln.prototype.request,e);return h.extend(n,ln.prototype,e,{allOwnKeys:!0}),h.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ts(ht(t,r))},n}const re=ts(Yn);re.Axios=ln,re.CanceledError=Ut,re.CancelToken=Yu,re.isCancel=qr,re.VERSION=Qr,re.toFormData=rn,re.AxiosError=X,re.Cancel=re.CanceledError,re.all=function(e){return Promise.all(e)},re.spread=Xu,re.isAxiosError=Zu,re.mergeConfig=ht,re.AxiosHeaders=ze,re.formToJSON=t=>zr(h.isHTMLForm(t)?new FormData(t):t),re.getAdapter=Yr.getAdapter,re.HttpStatusCode=Qu,re.default=re;class ns{constructor(e){Be(this,"keycloak");Be(this,"axios");Be(this,"fileName","silent-login.html");this.keycloak=e,this.axios=re.create(),this.axios.defaults.baseURL="https://localhost:5001/api",this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async n=>{await this.SilentLogin();const o=this.keycloak.token;return n.headers.Authorization=`Bearer ${o}`,n})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",o=typeof e.hasError=="boolean",r=typeof e.httpStatusCode=="number",s=Array.isArray(e.errors);return n&&o&&r&&s?e:null}catch{return null}}HandleThen(e){const n=new Vn,o=this.ParseAppResult(e.data);return o===null?(n.value=e.data,n):o.hasError?(o.errors.forEach(r=>n.WithError(r)),n.httpStatusCode=o.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var r;const n=new Vn,o=this.ParseAppResult((r=e.response)==null?void 0:r.data);return o===null?n.WithError(e.message):(n.WithErrors(o.errors),n.httpStatusCode=o.httpStatusCode),n}async SilentLogin(){return new Promise(async e=>{if(!this.isTokenExpired){e(!0);return}const n=this.GenerateIframe(),o=r=>{if(document.body.removeChild(n),window.removeEventListener("message",o),r.origin!==location.origin){e(!1);return}const s=r.data.action,i=r.data.code,f=r.data.state,u=r.data.error;if(s!=="silent-login-iframe-result"||u==="login_required"||!i){e(!1);return}const w=new XMLHttpRequest;w.open("POST",this.tokenExchangeUrl,!0),w.setRequestHeader("Content-type","application/x-www-form-urlencoded"),w.onreadystatechange=()=>{if(w.readyState===4){if(w.status===200){const E=JSON.parse(w.responseText);this.keycloak.setToken(E.access_token,null,E.id_token,new Date().getTime()),e(!0);return}e(!1)}},w.send(this.TokenExchangeParams(i,f))};window.addEventListener("message",o)}).then(e=>(e||(this.keycloak.clearToken(),this.keycloak.login()),e))}GetCodeVerifierFromState(e){const n=`kc-callback-${e}`,o=localStorage.getItem(n);if(o)return localStorage.removeItem(n),JSON.parse(o).pkceCodeVerifier}TokenExchangeParams(e,n){let o=`code=${e}&grant_type=authorization_code`;return o+=`&client_id=${encodeURIComponent(this.keycloak.clientId)}`,o+=`&redirect_uri=${this.silentLoginRedirectUrl}`,o+=`&code_verifier=${this.GetCodeVerifierFromState(n)}`,o}GenerateIframe(){const e=document.createElement("iframe");return e.src=this.keycloak.createLoginUrl({prompt:"none",redirectUri:this.silentLoginRedirectUrl})??"",document.body.appendChild(e),e}get silentLoginRedirectUrl(){return`${location.origin}/${this.fileName}`}get tokenExchangeUrl(){return`${this.keycloak.authServerUrl}/realms/${this.keycloak.realm}/protocol/openid-connect/token`}get isTokenExpired(){const e=this.keycloak.tokenParsed,n=e?e.exp:null;return!e||!n?!0:n-Math.ceil(new Date().getTime()/1e3)+(this.keycloak.timeSkew??0)<10}}const ed=t=>new ns(t);$n.SetInitialTheme(),Z.AppResult=Vn,Z.AxiosClient=ns,Z.SfButton=mo,Z.SfContent=bl,Z.SfDrawer=ho,Z.SfIcon=wt,Z.SfLayout=pl,Z.SfMessage=_l,Z.SfNavMenuLink=gl,Z.SfTabNavigation=xl,Z.SfTooltip=pn,Z.UseAlertService=Jc,Z.UseAuthService=zl,Z.UseAxiosClient=ed,Z.UseConfirmService=wr,Z.UseNavMenuService=fn,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
81
+ `):" "+Jr(s[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:Qn};function eo(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function Xr(t){return eo(t),t.headers=ze.from(t.headers),t.data=Zn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yr.getAdapter(t.adapter||Yn.adapter)(t).then(function(o){return eo(t),o.data=Zn.call(t,t.transformResponse,o),o.headers=ze.from(o.headers),o},function(o){return qr(o)||(eo(t),o&&o.response&&(o.response.data=Zn.call(t,t.transformResponse,o.response),o.response.headers=ze.from(o.response.headers))),Promise.reject(o)})}const Zr=t=>t instanceof ze?t.toJSON():t;function ht(t,e){e=e||{};const n={};function o(w,E,b){return h.isPlainObject(w)&&h.isPlainObject(E)?h.merge.call({caseless:b},w,E):h.isPlainObject(E)?h.merge({},E):h.isArray(E)?E.slice():E}function r(w,E,b){if(h.isUndefined(E)){if(!h.isUndefined(w))return o(void 0,w,b)}else return o(w,E,b)}function s(w,E){if(!h.isUndefined(E))return o(void 0,E)}function i(w,E){if(h.isUndefined(E)){if(!h.isUndefined(w))return o(void 0,w)}else return o(void 0,E)}function f(w,E,b){if(b in e)return o(w,E);if(b in t)return o(void 0,w)}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:f,headers:(w,E)=>r(Zr(w),Zr(E),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(E){const b=u[E]||r,j=b(t[E],e[E],E);h.isUndefined(j)&&b!==f||(n[E]=j)}),n}const Qr="1.6.5",to={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{to[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const es={};to.transitional=function(e,n,o){function r(s,i){return"[Axios v"+Qr+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,f)=>{if(e===!1)throw new X(r(i," has been removed"+(n?" in "+n:"")),X.ERR_DEPRECATED);return n&&!es[i]&&(es[i]=!0,console.warn(r(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,i,f):!0}};function Yu(t,e,n){if(typeof t!="object")throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],i=e[s];if(i){const f=t[s],u=f===void 0||i(f,s,t);if(u!==!0)throw new X("option "+s+" must be "+u,X.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}}const no={assertOptions:Yu,validators:to},Ye=no.validators;class cn{constructor(e){this.defaults=e,this.interceptors={request:new Hr,response:new Hr}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ht(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&no.assertOptions(o,{silentJSONParsing:Ye.transitional(Ye.boolean),forcedJSONParsing:Ye.transitional(Ye.boolean),clarifyTimeoutError:Ye.transitional(Ye.boolean)},!1),r!=null&&(h.isFunction(r)?n.paramsSerializer={serialize:r}:no.assertOptions(r,{encode:Ye.function,serialize:Ye.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&h.merge(s.common,s[n.method]);s&&h.forEach(["delete","get","head","post","put","patch","common"],B=>{delete s[B]}),n.headers=ze.concat(i,s);const f=[];let u=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(u=u&&N.synchronous,f.unshift(N.fulfilled,N.rejected))});const w=[];this.interceptors.response.forEach(function(N){w.push(N.fulfilled,N.rejected)});let E,b=0,j;if(!u){const B=[Xr.bind(this),void 0];for(B.unshift.apply(B,f),B.push.apply(B,w),j=B.length,E=Promise.resolve(n);b<j;)E=E.then(B[b++],B[b++]);return E}j=f.length;let $=n;for(b=0;b<j;){const B=f[b++],N=f[b++];try{$=B($)}catch(D){N.call(this,D);break}}try{E=Xr.call(this,$)}catch(B){return Promise.reject(B)}for(b=0,j=w.length;b<j;)E=E.then(w[b++],w[b++]);return E}getUri(e){e=ht(this.defaults,e);const n=Kr(e.baseURL,e.url);return $r(n,e.params,e.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(e){cn.prototype[e]=function(n,o){return this.request(ht(o||{},{method:e,url:n,data:(o||{}).data}))}}),h.forEach(["post","put","patch"],function(e){function n(o){return function(s,i,f){return this.request(ht(f||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}cn.prototype[e]=n(),cn.prototype[e+"Form"]=n(!0)});const ln=cn;class oo{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(f=>{o.subscribe(f),s=f}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},e(function(s,i,f){o.reason||(o.reason=new Ut(s,i,f),n(o.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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new oo(function(r){e=r}),cancel:e}}}const Xu=oo;function Zu(t){return function(n){return t.apply(null,n)}}function Qu(t){return h.isObject(t)&&t.isAxiosError===!0}const ro={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(ro).forEach(([t,e])=>{ro[e]=t});const ed=ro;function ts(t){const e=new ln(t),n=xr(ln.prototype.request,e);return h.extend(n,ln.prototype,e,{allOwnKeys:!0}),h.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ts(ht(t,r))},n}const re=ts(Yn);re.Axios=ln,re.CanceledError=Ut,re.CancelToken=Xu,re.isCancel=qr,re.VERSION=Qr,re.toFormData=rn,re.AxiosError=X,re.Cancel=re.CanceledError,re.all=function(e){return Promise.all(e)},re.spread=Zu,re.isAxiosError=Qu,re.mergeConfig=ht,re.AxiosHeaders=ze,re.formToJSON=t=>zr(h.isHTMLForm(t)?new FormData(t):t),re.getAdapter=Yr.getAdapter,re.HttpStatusCode=ed,re.default=re;class ns{constructor(e){Be(this,"keycloak");Be(this,"axios");Be(this,"fileName","silent-login.html");this.keycloak=e,this.axios=re.create(),this.axios.defaults.baseURL="https://localhost:5001/api",this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async n=>{await this.SilentLogin();const o=this.keycloak.token;return n.headers.Authorization=`Bearer ${o}`,n})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",o=typeof e.hasError=="boolean",r=typeof e.httpStatusCode=="number",s=Array.isArray(e.errors);return n&&o&&r&&s?e:null}catch{return null}}HandleThen(e){const n=new Vn,o=this.ParseAppResult(e.data);return o===null?(n.value=e.data,n):o.hasError?(o.errors.forEach(r=>n.WithError(r)),n.httpStatusCode=o.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var r;const n=new Vn,o=this.ParseAppResult((r=e.response)==null?void 0:r.data);return o===null?n.WithError(e.message):(n.WithErrors(o.errors),n.httpStatusCode=o.httpStatusCode),n}async SilentLogin(){return new Promise(async e=>{if(!this.isTokenExpired){e(!0);return}const n=this.GenerateIframe(),o=r=>{if(document.body.removeChild(n),window.removeEventListener("message",o),r.origin!==location.origin){e(!1);return}const s=r.data.action,i=r.data.code,f=r.data.state,u=r.data.error;if(s!=="silent-login-iframe-result"||u==="login_required"||!i){e(!1);return}const w=new XMLHttpRequest;w.open("POST",this.tokenExchangeUrl,!0),w.setRequestHeader("Content-type","application/x-www-form-urlencoded"),w.onreadystatechange=()=>{if(w.readyState===4){if(w.status===200){const E=JSON.parse(w.responseText);this.keycloak.setToken(E.access_token,null,E.id_token,new Date().getTime()),e(!0);return}e(!1)}},w.send(this.TokenExchangeParams(i,f))};window.addEventListener("message",o)}).then(e=>(e||(this.keycloak.clearToken(),this.keycloak.login()),e))}GetCodeVerifierFromState(e){const n=`kc-callback-${e}`,o=localStorage.getItem(n);if(o)return localStorage.removeItem(n),JSON.parse(o).pkceCodeVerifier}TokenExchangeParams(e,n){let o=`code=${e}&grant_type=authorization_code`;return o+=`&client_id=${encodeURIComponent(this.keycloak.clientId)}`,o+=`&redirect_uri=${this.silentLoginRedirectUrl}`,o+=`&code_verifier=${this.GetCodeVerifierFromState(n)}`,o}GenerateIframe(){const e=document.createElement("iframe");return e.src=this.keycloak.createLoginUrl({prompt:"none",redirectUri:this.silentLoginRedirectUrl})??"",document.body.appendChild(e),e}get silentLoginRedirectUrl(){return`${location.origin}/${this.fileName}`}get tokenExchangeUrl(){return`${this.keycloak.authServerUrl}/realms/${this.keycloak.realm}/protocol/openid-connect/token`}get isTokenExpired(){const e=this.keycloak.tokenParsed,n=e?e.exp:null;return!e||!n?!0:n-Math.ceil(new Date().getTime()/1e3)+(this.keycloak.timeSkew??0)<10}}const td=t=>new ns(t);$n.SetInitialTheme(),Z.AppResult=Vn,Z.AxiosClient=ns,Z.SfButton=mo,Z.SfContent=wl,Z.SfDrawer=ho,Z.SfIcon=wt,Z.SfLayout=hl,Z.SfMessage=vl,Z.SfNavMenuLink=yl,Z.SfTabNavigation=Sl,Z.SfTooltip=pn,Z.UseAlertService=Jc,Z.UseAuthService=Wl,Z.UseAxiosClient=td,Z.UseConfirmService=wr,Z.UseNavMenuService=fn,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
82
82
  //# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.js.map