@luizleon/sf.prefeiturasp.vuecomponents 0.0.37 → 0.0.38

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.
Files changed (40) hide show
  1. package/dist/components/drawer/Drawer.d.ts +55 -0
  2. package/dist/components/internal/ThemeToggle.d.ts +11 -8
  3. package/dist/components/internal/getMaxZindex.d.ts +2 -0
  4. package/dist/lib.es.js +2030 -1907
  5. package/dist/lib.es.js.map +1 -1
  6. package/dist/lib.umd.js +16 -16
  7. package/dist/lib.umd.js.map +1 -1
  8. package/dist/style.css +1 -1
  9. package/package.json +3 -2
  10. package/src/components/drawer/Drawer.d.ts +55 -0
  11. package/src/components/drawer/Drawer.vue +131 -0
  12. package/src/components/internal/HeaderAvatar.vue +18 -1
  13. package/src/components/internal/getMaxZindex.ts +14 -0
  14. package/src/components/layout/Layout.vue +1 -14
  15. package/src/index.ts +0 -1
  16. package/src/services/authService.ts +3 -4
  17. package/src/style/componentes.scss +1 -1
  18. package/src/style/src/_functions.scss +3 -170
  19. package/src/style/src/_mixins.scss +70 -553
  20. package/src/style/src/_variables.scss +1 -87
  21. package/src/style/src/components/_button.scss +22 -22
  22. package/src/style/src/components/_drawer.scss +29 -39
  23. package/src/style/src/components/_icon.scss +17 -20
  24. package/src/style/src/components/_layout.scss +5 -47
  25. package/src/style/src/components/_mask.scss +35 -0
  26. package/src/style/src/components/_themetoggle.scss +30 -3
  27. package/src/style/src/sweetalert/scss/_core.scss +13 -14
  28. package/src/style/src/sweetalert/scss/_variables.scss +17 -11
  29. package/src/style/src/_animation.scss +0 -441
  30. package/src/style/src/_display.scss +0 -10
  31. package/src/style/src/_flexbox.scss +0 -85
  32. package/src/style/src/_gap.scss +0 -8
  33. package/src/style/src/_grid.scss +0 -100
  34. package/src/style/src/_normalize.scss +0 -351
  35. package/src/style/src/_ripple.scss +0 -30
  36. package/src/style/src/_size.scss +0 -98
  37. package/src/style/src/_spacing.scss +0 -42
  38. package/src/style/src/_typography.scss +0 -43
  39. package/src/style/src/components/_internal-icon-button.scss +0 -5
  40. package/src/style/tema.scss +0 -171
package/dist/lib.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Q,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(Q=typeof globalThis<"u"?globalThis:Q||self,d(Q.Lib={},Q.Vue))})(this,function(Q,d){"use strict";var ed=Object.defineProperty;var td=(Q,d,Je)=>d in Q?ed(Q,d,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Q[d]=Je;var We=(Q,d,Je)=>(td(Q,typeof d!="symbol"?d+"":d,Je),Je);class Je{constructor(){We(this,"_visible",d.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 Es=new Je,hn=()=>Es;var pn=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Help="help",t.Warn="warn",t.Error="error",t))(pn||{}),ot=(t=>(t.Pequeno="sm",t.Medio="md",t.Grande="lg",t))(ot||{});const po=(t,e)=>{const n=t.__vccOpts||t;for(const[o,r]of e)n[o]=r;return n},ks={},As={class:"sf-loading-circle"},vs=[d.createElementVNode("div",null,[d.createElementVNode("svg",{viewBox:"25 25 50 50"},[d.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)];function Ss(t,e){return d.openBlock(),d.createElementBlock("div",As,vs)}const Cs=po(ks,[["render",Ss]]);class rt{constructor(e){We(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()}}const xs=["disabled","tabindex"],_s=["data-color"],Et=d.defineComponent({__name:"Icon",props:{icone:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},tamanho:{default:ot.Medio},dot:{type:Boolean},dotColor:{default:pn.Error},buttonProps:{}},setup(t){const e=t;function n(){return new rt(`${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.tamanho===ot.Pequeno).AddClass("sf-icon-medium",e.tamanho===ot.Medio).AddClass("sf-icon-large",e.tamanho===ot.Grande).AddClass("sf-ripple",e.button===!0).Build()}return(o,r)=>(d.openBlock(),d.createElementBlock("div",{style:d.normalizeStyle(e.style),class:d.normalizeClass(n())},[d.createElementVNode("button",d.mergeProps({class:"material-symbols-outlined",disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(d.openBlock(),d.createBlock(Cs,{key:0})):(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[d.createTextVNode(d.toDisplayString(e.icone),1)],64))],16,xs),e.dot?(d.openBlock(),d.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,_s)):d.createCommentVNode("",!0)],6))}}),mo="SweetAlert2:",Ts=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},mn=t=>t.charAt(0).toUpperCase()+t.slice(1),xe=t=>Array.prototype.slice.call(t),Ee=t=>{console.warn(`${mo} ${typeof t=="object"?t.join(" "):t}`)},Ye=t=>{console.error(`${mo} ${t}`)},go=[],Ps=t=>{go.includes(t)||(go.push(t),Ee(t))},Rs=(t,e)=>{Ps(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},Ht=t=>typeof t=="function"?t():t,gn=t=>t&&typeof t.toPromise=="function",kt=t=>gn(t)?t.toPromise():Promise.resolve(t),yn=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},Ls=["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"],Os={},Is=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],yo=t=>Object.prototype.hasOwnProperty.call(st,t),bo=t=>Ls.indexOf(t)!==-1,bn=t=>Os[t],Bs=t=>{yo(t)||Ee(`Unknown parameter "${t}"`)},Fs=t=>{Is.includes(t)&&Ee(`The parameter "${t}" is incompatible with toasts`)},Ns=t=>{bn(t)&&Rs(t,bn(t))},Us=t=>{!t.backdrop&&t.allowOutsideClick&&Ee('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Bs(e),t.toast&&Fs(e),Ns(e)},Ds="swal2-",wo=t=>{const e={};for(const n in t)e[t[n]]=Ds+t[n];return e},h=wo(["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=wo(["success","warning","info","question","error"]),de=()=>document.body.querySelector(`.${h.container}`),vt=t=>{const e=de();return e?e.querySelector(t):null},Pe=t=>vt(`.${t}`),Z=()=>Pe(h.popup),St=()=>Pe(h.icon),Eo=()=>Pe(h.title),jt=()=>Pe(h["html-container"]),ko=()=>Pe(h.image),Ao=()=>Pe(h["progress-steps"]),Vt=()=>Pe(h["validation-message"]),Be=()=>vt(`.${h.actions} .${h.confirm}`),qe=()=>vt(`.${h.actions} .${h.deny}`),Ms=()=>Pe(h["input-label"]),it=()=>vt(`.${h.loader}`),Xe=()=>vt(`.${h.actions} .${h.cancel}`),Ct=()=>Pe(h.actions),vo=()=>Pe(h.footer),zt=()=>Pe(h["timer-progress-bar"]),wn=()=>Pe(h.close),$s=`
1
+ (function(Q,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(Q=typeof globalThis<"u"?globalThis:Q||self,c(Q.Lib={},Q.Vue))})(this,function(Q,c){"use strict";var ad=Object.defineProperty;var cd=(Q,c,Je)=>c in Q?ad(Q,c,{enumerable:!0,configurable:!0,writable:!0,value:Je}):Q[c]=Je;var We=(Q,c,Je)=>(cd(Q,typeof c!="symbol"?c+"":c,Je),Je);class Je{constructor(){We(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 ks=new Je,pn=()=>ks;class Ye{constructor(e){We(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 As(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 Cs=(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),"");var Ht=(t=>(t.Primary="primary",t.Secondary="secondary",t.Info="info",t.Success="success",t.Help="help",t.Warn="warn",t.Error="error",t))(Ht||{}),rt=(t=>(t.Pequeno="sm",t.Medio="md",t.Grande="lg",t))(rt||{});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"},xs=[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 vs(t,e){return c.openBlock(),c.createElementBlock("div",_s,xs)}const Ts=po(Ss,[["render",vs]]),Ps=["disabled","tabindex"],Rs=["data-color"],Et=c.defineComponent({__name:"Icon",props:{icone:{},visible:{type:Boolean,default:!0},class:{default:""},style:{default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},tamanho:{default:rt.Medio},dot:{type:Boolean},dotColor:{default:Ht.Error},buttonProps:{}},setup(t){const e=t;function n(){return new Ye(`${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.tamanho===rt.Pequeno).AddClass("sf-icon-medium",e.tamanho===rt.Medio).AddClass("sf-icon-large",e.tamanho===rt.Grande).AddClass("sf-ripple",e.button===!0).Build()}return(o,r)=>(c.openBlock(),c.createElementBlock("div",{style:c.normalizeStyle(e.style),class:c.normalizeClass(n())},[c.createElementVNode("button",c.mergeProps({class:"material-symbols-outlined",disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(c.openBlock(),c.createBlock(Ts,{key:0})):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(e.icone),1)],64))],16,Ps),e.dot?(c.openBlock(),c.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Rs)):c.createCommentVNode("",!0)],6))}}),Ls=["id"],Os={class:"sf-drawer-header"},Is={class:"sf-drawer-title"},Bs={class:"sf-drawer-content"},Ns={key:0,class:"sf-drawer-footer"},Fs=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),a=c.ref(!1),f=c.ref(0),u=Cs();function w(){s.value=!1}function E($){($.key==="Escape"||$.code==="Escape")&&w()}function b(){o("open"),window.document.addEventListener("keydown",E,!0)}function X($){f.value=As(),$.style.zIndex=`${f.value}`}function M($){var ee;o("before-close"),(ee=$==null?void 0:$.parentElement)==null||ee.classList.add("sf-mask-overlay-leave")}function B(){window.document.removeEventListener("keydown",E,!0),a.value=!1}function N(){return new Ye("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,$=>{s.value=$}),c.watch(()=>s.value,$=>{o("update:visible",$),$&&(a.value=!0)}),($,ee)=>(c.openBlock(),c.createBlock(c.Teleport,{to:"body"},[a.value?(c.openBlock(),c.createElementBlock("div",{key:0,id:c.unref(u),class:c.normalizeClass(N())},[c.createVNode(c.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:X,onEnter:b,onBeforeLeave:M,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"},[c.createElementVNode("div",Os,[c.createElementVNode("span",Is,[c.renderSlot($.$slots,"title")]),c.createVNode(Et,{button:!0,icone:"close",onClick:c.withModifiers(w,["stop"])},null,8,["onClick"])]),c.createElementVNode("div",Bs,[c.renderSlot($.$slots,"default")]),c.unref(r).footer?(c.openBlock(),c.createElementBlock("div",Ns,[c.renderSlot($.$slots,"footer")])):c.createCommentVNode("",!0)],6)):c.createCommentVNode("",!0)]),_:3})],10,Ls)):c.createCommentVNode("",!0)]))}}),Us=["id","name","disabled","data-color","form","type"],Ds={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 Ye(`${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)=>(c.openBlock(),c.createElementBlock("button",{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(Et,{key:0,icone:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["icone","loading","size"])):e.loading?(c.openBlock(),c.createBlock(Et,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):c.createCommentVNode("",!0),c.createElementVNode("span",Ds,[c.renderSlot(o.$slots,"default")])],14,Us))}}),go="SweetAlert2:",Ms=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},mn=t=>t.charAt(0).toUpperCase()+t.slice(1),xe=t=>Array.prototype.slice.call(t),Ee=t=>{console.warn(`${go} ${typeof t=="object"?t.join(" "):t}`)},Xe=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.`)},jt=t=>typeof t=="function"?t():t,gn=t=>t&&typeof t.toPromise=="function",kt=t=>gn(t)?t.toPromise():Promise.resolve(t),yn=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,bn=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=>{bn(t)&&Hs(t,bn(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},h=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(`.${h.container}`),Ct=t=>{const e=de();return e?e.querySelector(t):null},Pe=t=>Ct(`.${t}`),Z=()=>Pe(h.popup),St=()=>Pe(h.icon),ko=()=>Pe(h.title),Vt=()=>Pe(h["html-container"]),Ao=()=>Pe(h.image),Co=()=>Pe(h["progress-steps"]),zt=()=>Pe(h["validation-message"]),Be=()=>Ct(`.${h.actions} .${h.confirm}`),qe=()=>Ct(`.${h.actions} .${h.deny}`),Ys=()=>Pe(h["input-label"]),it=()=>Ct(`.${h.loader}`),Ze=()=>Ct(`.${h.actions} .${h.cancel}`),_t=()=>Pe(h.actions),So=()=>Pe(h.footer),Wt=()=>Pe(h["timer-progress-bar"]),wn=()=>Pe(h.close),Xs=`
2
2
  a[href],
3
3
  area[href],
4
4
  input:not([disabled]),
@@ -13,7 +13,7 @@
13
13
  audio[controls],
14
14
  video[controls],
15
15
  summary
16
- `,En=()=>{const t=xe(Z().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,o)=>{const r=parseInt(n.getAttribute("tabindex")),s=parseInt(o.getAttribute("tabindex"));return r>s?1:r<s?-1:0}),e=xe(Z().querySelectorAll($s)).filter(n=>n.getAttribute("tabindex")!=="-1");return Ts(t.concat(e)).filter(n=>_e(n))},kn=()=>He(document.body,h.shown)&&!He(document.body,h["toast-shown"])&&!He(document.body,h["no-backdrop"]),Wt=()=>Z()&&He(Z(),h.toast),Hs=()=>Z().hasAttribute("data-loading"),at={previousBodyPadding:null},fe=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html");xe(o.querySelector("head").childNodes).forEach(r=>{t.appendChild(r)}),xe(o.querySelector("body").childNodes).forEach(r=>{t.appendChild(r)})}},He=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},js=(t,e)=>{xe(t.classList).forEach(n=>{!Object.values(h).includes(n)&&!Object.values(At).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Re=(t,e,n)=>{if(js(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return Ee(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);G(t,e.customClass[n])}},An=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${h.popup} > .${h[e]}`);case"checkbox":return t.querySelector(`.${h.popup} > .${h.checkbox} input`);case"radio":return t.querySelector(`.${h.popup} > .${h.radio} input:checked`)||t.querySelector(`.${h.popup} > .${h.radio} input:first-child`);case"range":return t.querySelector(`.${h.popup} > .${h.range} input`);default:return t.querySelector(`.${h.popup} > .${h.input}`)}},So=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Co=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(r=>{n?r.classList.add(o):r.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},G=(t,e)=>{Co(t,e,!0)},Ne=(t,e)=>{Co(t,e,!1)},Ke=(t,e)=>{const n=xe(t.childNodes);for(let o=0;o<n.length;o++)if(He(n[o],e))return n[o]},xt=(t,e,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?`${n}px`:n:t.style.removeProperty(e)},le=(t,e="flex")=>{t.style.display=e},he=t=>{t.style.display="none"},xo=(t,e,n,o)=>{const r=t.querySelector(e);r&&(r.style[n]=o)},qt=(t,e,n)=>{e?le(t,n):he(t)},_e=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),Vs=()=>!_e(Be())&&!_e(qe())&&!_e(Xe()),_o=t=>t.scrollHeight>t.clientHeight,To=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},vn=(t,e=!1)=>{const n=zt();_e(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},zs=()=>{const t=zt(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.removeProperty("transition"),t.style.width=`${o}%`},Po=()=>typeof window>"u"||typeof document>"u",Ws=100,z={},qs=()=>{z.previousActiveElement&&z.previousActiveElement.focus?(z.previousActiveElement.focus(),z.previousActiveElement=null):document.body&&document.body.focus()},Ks=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;z.restoreFocusTimeout=setTimeout(()=>{qs(),e()},Ws),window.scrollTo(n,o)}),Gs=`
16
+ `,En=()=>{const t=xe(Z().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,o)=>{const r=parseInt(n.getAttribute("tabindex")),s=parseInt(o.getAttribute("tabindex"));return r>s?1:r<s?-1:0}),e=xe(Z().querySelectorAll(Xs)).filter(n=>n.getAttribute("tabindex")!=="-1");return Ms(t.concat(e)).filter(n=>ve(n))},kn=()=>He(document.body,h.shown)&&!He(document.body,h["toast-shown"])&&!He(document.body,h["no-backdrop"]),qt=()=>Z()&&He(Z(),h.toast),Zs=()=>Z().hasAttribute("data-loading"),at={previousBodyPadding:null},fe=(t,e)=>{if(t.textContent="",e){const o=new DOMParser().parseFromString(e,"text/html");xe(o.querySelector("head").childNodes).forEach(r=>{t.appendChild(r)}),xe(o.querySelector("body").childNodes).forEach(r=>{t.appendChild(r)})}},He=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let o=0;o<n.length;o++)if(!t.classList.contains(n[o]))return!1;return!0},Qs=(t,e)=>{xe(t.classList).forEach(n=>{!Object.values(h).includes(n)&&!Object.values(At).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Re=(t,e,n)=>{if(Qs(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return Ee(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);J(t,e.customClass[n])}},An=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${h.popup} > .${h[e]}`);case"checkbox":return t.querySelector(`.${h.popup} > .${h.checkbox} input`);case"radio":return t.querySelector(`.${h.popup} > .${h.radio} input:checked`)||t.querySelector(`.${h.popup} > .${h.radio} input:first-child`);case"range":return t.querySelector(`.${h.popup} > .${h.range} input`);default:return t.querySelector(`.${h.popup} > .${h.input}`)}},_o=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},xo=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(r=>{n?r.classList.add(o):r.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},J=(t,e)=>{xo(t,e,!0)},Fe=(t,e)=>{xo(t,e,!1)},Ke=(t,e)=>{const n=xe(t.childNodes);for(let o=0;o<n.length;o++)if(He(n[o],e))return n[o]},xt=(t,e,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style[e]=typeof n=="number"?`${n}px`:n:t.style.removeProperty(e)},le=(t,e="flex")=>{t.style.display=e},he=t=>{t.style.display="none"},vo=(t,e,n,o)=>{const r=t.querySelector(e);r&&(r.style[n]=o)},Kt=(t,e,n)=>{e?le(t,n):he(t)},ve=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),ei=()=>!ve(Be())&&!ve(qe())&&!ve(Ze()),To=t=>t.scrollHeight>t.clientHeight,Po=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},Cn=(t,e=!1)=>{const n=Wt();ve(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},ti=()=>{const t=Wt(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.removeProperty("transition"),t.style.width=`${o}%`},Ro=()=>typeof window>"u"||typeof document>"u",ni=100,W={},oi=()=>{W.previousActiveElement&&W.previousActiveElement.focus?(W.previousActiveElement.focus(),W.previousActiveElement=null):document.body&&document.body.focus()},ri=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,o=window.scrollY;W.restoreFocusTimeout=setTimeout(()=>{oi(),e()},ni),window.scrollTo(n,o)}),si=`
17
17
  <div aria-labelledby="${h.title}" aria-describedby="${h["html-container"]}" class="${h.popup}" tabindex="-1">
18
18
  <button type="button" class="${h.close}"></button>
19
19
  <ul class="${h["progress-steps"]}"></ul>
@@ -46,39 +46,39 @@
46
46
  <div class="${h["timer-progress-bar"]}"></div>
47
47
  </div>
48
48
  </div>
49
- `.replace(/(^|\n)\s*/g,""),Js=()=>{const t=de();return t?(t.remove(),Ne([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0):!1},Ze=()=>{z.currentInstance.resetValidationMessage()},Ys=()=>{const t=Z(),e=Ke(t,h.input),n=Ke(t,h.file),o=t.querySelector(`.${h.range} input`),r=t.querySelector(`.${h.range} output`),s=Ke(t,h.select),a=t.querySelector(`.${h.checkbox} input`),f=Ke(t,h.textarea);e.oninput=Ze,n.onchange=Ze,s.onchange=Ze,a.onchange=Ze,f.oninput=Ze,o.oninput=()=>{Ze(),r.value=o.value},o.onchange=()=>{Ze(),o.nextSibling.value=o.value}},Xs=t=>typeof t=="string"?document.querySelector(t):t,Zs=t=>{const e=Z();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},Qs=t=>{window.getComputedStyle(t).direction==="rtl"&&G(de(),h.rtl)},ei=t=>{const e=Js();if(Po()){Ye("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=h.container,e&&G(n,h["no-transition"]),fe(n,Gs);const o=Xs(t.target);o.appendChild(n),Zs(t),Qs(o),Ys()},Sn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?ti(t,e):t&&fe(e,t)},ti=(t,e)=>{t.jquery?ni(e,t):fe(e,t.toString())},ni=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},_t=(()=>{if(Po())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&typeof t.style[n]<"u")return e[n];return!1})(),oi=()=>{const t=document.createElement("div");t.className=h["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},ri=(t,e)=>{const n=Ct(),o=it();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?he(n):le(n),Re(n,e,"actions"),si(n,o,e),fe(o,e.loaderHtml),Re(o,e,"loader")};function si(t,e,n){const o=Be(),r=qe(),s=Xe();Cn(o,"confirm",n),Cn(r,"deny",n),Cn(s,"cancel",n),ii(o,r,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(r,o)):(t.insertBefore(s,e),t.insertBefore(r,e),t.insertBefore(o,e)))}function ii(t,e,n,o){if(!o.buttonsStyling)return Ne([t,e,n],h.styled);G([t,e,n],h.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,G(t,h["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,G(e,h["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,G(n,h["default-outline"]))}function Cn(t,e,n){qt(t,n[`show${mn(e)}Button`],"inline-block"),fe(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=h[e],Re(t,n,`${e}Button`),G(t,n[`${e}ButtonClass`])}function ai(t,e){typeof e=="string"?t.style.background=e:e||G([document.documentElement,document.body],h["no-backdrop"])}function ci(t,e){e in h?G(t,h[e]):(Ee('The "position" parameter is not valid, defaulting to "center"'),G(t,h.center))}function li(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in h&&G(t,h[n])}}const ui=(t,e)=>{const n=de();n&&(ai(n,e.backdrop),ci(n,e.position),li(n,e.grow),Re(n,e,"container"))},q={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},di=["input","file","range","select","radio","checkbox","textarea"],fi=(t,e)=>{const n=Z(),o=q.innerParams.get(t),r=!o||e.input!==o.input;di.forEach(s=>{const a=h[s],f=Ke(n,a);mi(s,e.inputAttributes),f.className=a,r&&he(f)}),e.input&&(r&&hi(e),gi(e))},hi=t=>{if(!ke[t.input])return Ye(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=Ro(t.input),n=ke[t.input](e,t);le(n),setTimeout(()=>{So(n)})},pi=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},mi=(t,e)=>{const n=An(Z(),t);if(n){pi(n);for(const o in e)n.setAttribute(o,e[o])}},gi=t=>{const e=Ro(t.input);t.customClass&&G(e,t.customClass.input)},xn=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},Tt=(t,e,n)=>{if(n.inputLabel){t.id=h.input;const o=document.createElement("label"),r=h["input-label"];o.setAttribute("for",t.id),o.className=r,G(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Ro=t=>{const e=h[t]?h[t]:h.input;return Ke(Z(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:yn(e.inputValue)||Ee(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),Tt(t,t,e),xn(t,e),t.type=e.input,t),ke.file=(t,e)=>(Tt(t,t,e),xn(t,e),t),ke.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,Tt(n,t,e),t},ke.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");fe(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return Tt(t,t,e),t},ke.radio=t=>(t.textContent="",t),ke.checkbox=(t,e)=>{const n=An(Z(),"checkbox");n.value="1",n.id=h.checkbox,n.checked=!!e.inputValue;const o=t.querySelector("span");return fe(o,e.inputPlaceholder),t},ke.textarea=(t,e)=>{t.value=e.inputValue,xn(t,e),Tt(t,t,e);const n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(Z()).width),r=()=>{const s=t.offsetWidth+n(t);s>o?Z().style.width=`${s}px`:Z().style.width=null};new MutationObserver(r).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const yi=(t,e)=>{const n=jt();Re(n,e,"htmlContainer"),e.html?(Sn(e.html,n),le(n,"block")):e.text?(n.textContent=e.text,le(n,"block")):he(n),fi(t,e)},bi=(t,e)=>{const n=vo();qt(n,e.footer),e.footer&&Sn(e.footer,n),Re(n,e,"footer")},wi=(t,e)=>{const n=wn();fe(n,e.closeButtonHtml),Re(n,e,"closeButton"),qt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Ei=(t,e)=>{const n=q.innerParams.get(t),o=St();if(n&&e.icon===n.icon){Oo(o,e),Lo(o,e);return}if(!e.icon&&!e.iconHtml)return he(o);if(e.icon&&Object.keys(At).indexOf(e.icon)===-1)return Ye(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),he(o);le(o),Oo(o,e),Lo(o,e),G(o,e.showClass.icon)},Lo=(t,e)=>{for(const n in At)e.icon!==n&&Ne(t,At[n]);G(t,At[e.icon]),Si(t,e),ki(),Re(t,e,"icon")},ki=()=>{const t=Z(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},Ai=`
49
+ `.replace(/(^|\n)\s*/g,""),ii=()=>{const t=de();return t?(t.remove(),Fe([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0):!1},Qe=()=>{W.currentInstance.resetValidationMessage()},ai=()=>{const t=Z(),e=Ke(t,h.input),n=Ke(t,h.file),o=t.querySelector(`.${h.range} input`),r=t.querySelector(`.${h.range} output`),s=Ke(t,h.select),a=t.querySelector(`.${h.checkbox} input`),f=Ke(t,h.textarea);e.oninput=Qe,n.onchange=Qe,s.onchange=Qe,a.onchange=Qe,f.oninput=Qe,o.oninput=()=>{Qe(),r.value=o.value},o.onchange=()=>{Qe(),o.nextSibling.value=o.value}},ci=t=>typeof t=="string"?document.querySelector(t):t,li=t=>{const e=Z();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},ui=t=>{window.getComputedStyle(t).direction==="rtl"&&J(de(),h.rtl)},di=t=>{const e=ii();if(Ro()){Xe("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=h.container,e&&J(n,h["no-transition"]),fe(n,si);const o=ci(t.target);o.appendChild(n),li(t),ui(o),ai()},Sn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?fi(t,e):t&&fe(e,t)},fi=(t,e)=>{t.jquery?hi(e,t):fe(e,t.toString())},hi=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},vt=(()=>{if(Ro())return!1;const t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&typeof t.style[n]<"u")return e[n];return!1})(),pi=()=>{const t=document.createElement("div");t.className=h["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},mi=(t,e)=>{const n=_t(),o=it();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?he(n):le(n),Re(n,e,"actions"),gi(n,o,e),fe(o,e.loaderHtml),Re(o,e,"loader")};function gi(t,e,n){const o=Be(),r=qe(),s=Ze();_n(o,"confirm",n),_n(r,"deny",n),_n(s,"cancel",n),yi(o,r,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(r,o)):(t.insertBefore(s,e),t.insertBefore(r,e),t.insertBefore(o,e)))}function yi(t,e,n,o){if(!o.buttonsStyling)return Fe([t,e,n],h.styled);J([t,e,n],h.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,J(t,h["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,J(e,h["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,J(n,h["default-outline"]))}function _n(t,e,n){Kt(t,n[`show${mn(e)}Button`],"inline-block"),fe(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=h[e],Re(t,n,`${e}Button`),J(t,n[`${e}ButtonClass`])}function bi(t,e){typeof e=="string"?t.style.background=e:e||J([document.documentElement,document.body],h["no-backdrop"])}function wi(t,e){e in h?J(t,h[e]):(Ee('The "position" parameter is not valid, defaulting to "center"'),J(t,h.center))}function Ei(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in h&&J(t,h[n])}}const ki=(t,e)=>{const n=de();n&&(bi(n,e.backdrop),wi(n,e.position),Ei(n,e.grow),Re(n,e,"container"))},K={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ai=["input","file","range","select","radio","checkbox","textarea"],Ci=(t,e)=>{const n=Z(),o=K.innerParams.get(t),r=!o||e.input!==o.input;Ai.forEach(s=>{const a=h[s],f=Ke(n,a);xi(s,e.inputAttributes),f.className=a,r&&he(f)}),e.input&&(r&&Si(e),vi(e))},Si=t=>{if(!ke[t.input])return Xe(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=Lo(t.input),n=ke[t.input](e,t);le(n),setTimeout(()=>{_o(n)})},_i=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},xi=(t,e)=>{const n=An(Z(),t);if(n){_i(n);for(const o in e)n.setAttribute(o,e[o])}},vi=t=>{const e=Lo(t.input);t.customClass&&J(e,t.customClass.input)},xn=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},Tt=(t,e,n)=>{if(n.inputLabel){t.id=h.input;const o=document.createElement("label"),r=h["input-label"];o.setAttribute("for",t.id),o.className=r,J(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},Lo=t=>{const e=h[t]?h[t]:h.input;return Ke(Z(),e)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:yn(e.inputValue)||Ee(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),Tt(t,t,e),xn(t,e),t.type=e.input,t),ke.file=(t,e)=>(Tt(t,t,e),xn(t,e),t),ke.range=(t,e)=>{const n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,Tt(n,t,e),t},ke.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");fe(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return Tt(t,t,e),t},ke.radio=t=>(t.textContent="",t),ke.checkbox=(t,e)=>{const n=An(Z(),"checkbox");n.value="1",n.id=h.checkbox,n.checked=!!e.inputValue;const o=t.querySelector("span");return fe(o,e.inputPlaceholder),t},ke.textarea=(t,e)=>{t.value=e.inputValue,xn(t,e),Tt(t,t,e);const n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const o=parseInt(window.getComputedStyle(Z()).width),r=()=>{const s=t.offsetWidth+n(t);s>o?Z().style.width=`${s}px`:Z().style.width=null};new MutationObserver(r).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const Ti=(t,e)=>{const n=Vt();Re(n,e,"htmlContainer"),e.html?(Sn(e.html,n),le(n,"block")):e.text?(n.textContent=e.text,le(n,"block")):he(n),Ci(t,e)},Pi=(t,e)=>{const n=So();Kt(n,e.footer),e.footer&&Sn(e.footer,n),Re(n,e,"footer")},Ri=(t,e)=>{const n=wn();fe(n,e.closeButtonHtml),Re(n,e,"closeButton"),Kt(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Li=(t,e)=>{const n=K.innerParams.get(t),o=St();if(n&&e.icon===n.icon){Io(o,e),Oo(o,e);return}if(!e.icon&&!e.iconHtml)return he(o);if(e.icon&&Object.keys(At).indexOf(e.icon)===-1)return Xe(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),he(o);le(o),Io(o,e),Oo(o,e),J(o,e.showClass.icon)},Oo=(t,e)=>{for(const n in At)e.icon!==n&&Fe(t,At[n]);J(t,At[e.icon]),Ni(t,e),Oi(),Re(t,e,"icon")},Oi=()=>{const t=Z(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o<n.length;o++)n[o].style.backgroundColor=e},Ii=`
50
50
  <div class="swal2-success-circular-line-left"></div>
51
51
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
52
52
  <div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
53
53
  <div class="swal2-success-circular-line-right"></div>
54
- `,vi=`
54
+ `,Bi=`
55
55
  <span class="swal2-x-mark">
56
56
  <span class="swal2-x-mark-line-left"></span>
57
57
  <span class="swal2-x-mark-line-right"></span>
58
58
  </span>
59
- `,Oo=(t,e)=>{t.textContent="",e.iconHtml?fe(t,Io(e.iconHtml)):e.icon==="success"?fe(t,Ai):e.icon==="error"?fe(t,vi):fe(t,Io({question:"?",warning:"!",info:"i"}[e.icon]))},Si=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])xo(t,n,"backgroundColor",e.iconColor);xo(t,".swal2-success-ring","borderColor",e.iconColor)}},Io=t=>`<div class="${h["icon-content"]}">${t}</div>`,Ci=(t,e)=>{const n=ko();if(!e.imageUrl)return he(n);le(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),xt(n,"width",e.imageWidth),xt(n,"height",e.imageHeight),n.className=h.image,Re(n,e,"image")},xi=t=>{const e=document.createElement("li");return G(e,h["progress-step"]),fe(e,t),e},_i=t=>{const e=document.createElement("li");return G(e,h["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Ti=(t,e)=>{const n=Ao();if(!e.progressSteps||e.progressSteps.length===0)return he(n);le(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&Ee("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((o,r)=>{const s=xi(o);if(n.appendChild(s),r===e.currentProgressStep&&G(s,h["active-progress-step"]),r!==e.progressSteps.length-1){const a=_i(e);n.appendChild(a)}})},Pi=(t,e)=>{const n=Eo();qt(n,e.title||e.titleText,"block"),e.title&&Sn(e.title,n),e.titleText&&(n.innerText=e.titleText),Re(n,e,"title")},Ri=(t,e)=>{const n=de(),o=Z();e.toast?(xt(n,"width",e.width),o.style.width="100%",o.insertBefore(it(),St())):xt(o,"width",e.width),xt(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),he(Vt()),Li(o,e)},Li=(t,e)=>{t.className=`${h.popup} ${_e(t)?e.showClass.popup:""}`,e.toast?(G([document.documentElement,document.body],h["toast-shown"]),G(t,h.toast)):G(t,h.modal),Re(t,e,"popup"),typeof e.customClass=="string"&&G(t,e.customClass),e.icon&&G(t,h[`icon-${e.icon}`])},Bo=(t,e)=>{Ri(t,e),ui(t,e),Ti(t,e),Ei(t,e),Ci(t,e),Pi(t,e),wi(t,e),yi(t,e),ri(t,e),bi(t,e),typeof e.didRender=="function"&&e.didRender(Z())},ct=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Oi=()=>{xe(document.body.children).forEach(e=>{e===de()||e.contains(de())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},Fo=()=>{xe(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},No=["swal-title","swal-html","swal-footer"],Ii=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return $i(n),Object.assign(Bi(n),Fi(n),Ni(n),Ui(n),Di(n),Mi(n,No))},Bi=t=>{const e={};return xe(t.querySelectorAll("swal-param")).forEach(n=>{Qe(n,["name","value"]);const o=n.getAttribute("name"),r=n.getAttribute("value");typeof st[o]=="boolean"&&r==="false"&&(e[o]=!1),typeof st[o]=="object"&&(e[o]=JSON.parse(r))}),e},Fi=t=>{const e={};return xe(t.querySelectorAll("swal-button")).forEach(n=>{Qe(n,["type","color","aria-label"]);const o=n.getAttribute("type");e[`${o}ButtonText`]=n.innerHTML,e[`show${mn(o)}Button`]=!0,n.hasAttribute("color")&&(e[`${o}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${o}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},Ni=t=>{const e={},n=t.querySelector("swal-image");return n&&(Qe(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Ui=t=>{const e={},n=t.querySelector("swal-icon");return n&&(Qe(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Di=t=>{const e={},n=t.querySelector("swal-input");n&&(Qe(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},xe(o).forEach(r=>{Qe(r,["value"]);const s=r.getAttribute("value"),a=r.innerHTML;e.inputOptions[s]=a})),e},Mi=(t,e)=>{const n={};for(const o in e){const r=e[o],s=t.querySelector(r);s&&(Qe(s,[]),n[r.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},$i=t=>{const e=No.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);xe(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.indexOf(o)===-1&&Ee(`Unrecognized element <${o}>`)})},Qe=(t,e)=>{xe(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&Ee([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},Uo={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function Hi(t){t.inputValidator||Object.keys(Uo).forEach(e=>{t.input===e&&(t.inputValidator=Uo[e])})}function ji(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(Ee('Target parameter is not valid, defaulting to "body"'),t.target="body")}function Vi(t){Hi(t),t.showLoaderOnConfirm&&!t.preConfirm&&Ee(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
59
+ `,Io=(t,e)=>{t.textContent="",e.iconHtml?fe(t,Bo(e.iconHtml)):e.icon==="success"?fe(t,Ii):e.icon==="error"?fe(t,Bi):fe(t,Bo({question:"?",warning:"!",info:"i"}[e.icon]))},Ni=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])vo(t,n,"backgroundColor",e.iconColor);vo(t,".swal2-success-ring","borderColor",e.iconColor)}},Bo=t=>`<div class="${h["icon-content"]}">${t}</div>`,Fi=(t,e)=>{const n=Ao();if(!e.imageUrl)return he(n);le(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),xt(n,"width",e.imageWidth),xt(n,"height",e.imageHeight),n.className=h.image,Re(n,e,"image")},Ui=t=>{const e=document.createElement("li");return J(e,h["progress-step"]),fe(e,t),e},Di=t=>{const e=document.createElement("li");return J(e,h["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Mi=(t,e)=>{const n=Co();if(!e.progressSteps||e.progressSteps.length===0)return he(n);le(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&Ee("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((o,r)=>{const s=Ui(o);if(n.appendChild(s),r===e.currentProgressStep&&J(s,h["active-progress-step"]),r!==e.progressSteps.length-1){const a=Di(e);n.appendChild(a)}})},$i=(t,e)=>{const n=ko();Kt(n,e.title||e.titleText,"block"),e.title&&Sn(e.title,n),e.titleText&&(n.innerText=e.titleText),Re(n,e,"title")},Hi=(t,e)=>{const n=de(),o=Z();e.toast?(xt(n,"width",e.width),o.style.width="100%",o.insertBefore(it(),St())):xt(o,"width",e.width),xt(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),he(zt()),ji(o,e)},ji=(t,e)=>{t.className=`${h.popup} ${ve(t)?e.showClass.popup:""}`,e.toast?(J([document.documentElement,document.body],h["toast-shown"]),J(t,h.toast)):J(t,h.modal),Re(t,e,"popup"),typeof e.customClass=="string"&&J(t,e.customClass),e.icon&&J(t,h[`icon-${e.icon}`])},No=(t,e)=>{Hi(t,e),ki(t,e),Mi(t,e),Li(t,e),Fi(t,e),$i(t,e),Ri(t,e),Ti(t,e),mi(t,e),Pi(t,e),typeof e.didRender=="function"&&e.didRender(Z())},ct=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Vi=()=>{xe(document.body.children).forEach(e=>{e===de()||e.contains(de())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},Fo=()=>{xe(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},Uo=["swal-title","swal-html","swal-footer"],zi=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return Xi(n),Object.assign(Wi(n),qi(n),Ki(n),Gi(n),Ji(n),Yi(n,Uo))},Wi=t=>{const e={};return xe(t.querySelectorAll("swal-param")).forEach(n=>{et(n,["name","value"]);const o=n.getAttribute("name"),r=n.getAttribute("value");typeof st[o]=="boolean"&&r==="false"&&(e[o]=!1),typeof st[o]=="object"&&(e[o]=JSON.parse(r))}),e},qi=t=>{const e={};return xe(t.querySelectorAll("swal-button")).forEach(n=>{et(n,["type","color","aria-label"]);const o=n.getAttribute("type");e[`${o}ButtonText`]=n.innerHTML,e[`show${mn(o)}Button`]=!0,n.hasAttribute("color")&&(e[`${o}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${o}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},Ki=t=>{const e={},n=t.querySelector("swal-image");return n&&(et(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt"))),e},Gi=t=>{const e={},n=t.querySelector("swal-icon");return n&&(et(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},Ji=t=>{const e={},n=t.querySelector("swal-input");n&&(et(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));const o=t.querySelectorAll("swal-input-option");return o.length&&(e.inputOptions={},xe(o).forEach(r=>{et(r,["value"]);const s=r.getAttribute("value"),a=r.innerHTML;e.inputOptions[s]=a})),e},Yi=(t,e)=>{const n={};for(const o in e){const r=e[o],s=t.querySelector(r);s&&(et(s,[]),n[r.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},Xi=t=>{const e=Uo.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);xe(t.children).forEach(n=>{const o=n.tagName.toLowerCase();e.indexOf(o)===-1&&Ee(`Unrecognized element <${o}>`)})},et=(t,e)=>{xe(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&Ee([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},Do={email:(t,e)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};function Zi(t){t.inputValidator||Object.keys(Do).forEach(e=>{t.input===e&&(t.inputValidator=Do[e])})}function Qi(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(Ee('Target parameter is not valid, defaulting to "body"'),t.target="body")}function ea(t){Zi(t),t.showLoaderOnConfirm&&!t.preConfirm&&Ee(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
60
60
  showLoaderOnConfirm should be used together with preConfirm, see usage example:
61
- https://sweetalert2.github.io/#ajax-request`),ji(t),typeof t.title=="string"&&(t.title=t.title.split(`
62
- `).join("<br />")),ei(t)}class zi{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 Wi=()=>{at.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(at.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${at.previousBodyPadding+oi()}px`)},qi=()=>{at.previousBodyPadding!==null&&(document.body.style.paddingRight=`${at.previousBodyPadding}px`,at.previousBodyPadding=null)},Ki=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!He(document.body,h.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,G(document.body,h.iosfix),Ji(),Gi()}},Gi=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&Z().scrollHeight>window.innerHeight-44&&(de().style.paddingBottom="44px")},Ji=()=>{const t=de();let e;t.ontouchstart=n=>{e=Yi(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},Yi=t=>{const e=t.target,n=de();return Xi(t)||Zi(t)?!1:e===n||!_o(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(_o(jt())&&jt().contains(e))},Xi=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",Zi=t=>t.touches&&t.touches.length>1,Qi=()=>{if(He(document.body,h.iosfix)){const t=parseInt(document.body.style.top,10);Ne(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},Do=10,ea=t=>{const e=de(),n=Z();typeof t.willOpen=="function"&&t.willOpen(n);const r=window.getComputedStyle(document.body).overflowY;oa(e,n,t),setTimeout(()=>{ta(e,n)},Do),kn()&&(na(e,t.scrollbarPadding,r),Oi()),!Wt()&&!z.previousActiveElement&&(z.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Ne(e,h["no-transition"])},Mo=t=>{const e=Z();if(t.target!==e)return;const n=de();e.removeEventListener(_t,Mo),n.style.overflowY="auto"},ta=(t,e)=>{_t&&To(e)?(t.style.overflowY="hidden",e.addEventListener(_t,Mo)):t.style.overflowY="auto"},na=(t,e,n)=>{Ki(),e&&n!=="hidden"&&Wi(),setTimeout(()=>{t.scrollTop=0})},oa=(t,e,n)=>{G(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),le(e,"grid"),setTimeout(()=>{G(e,n.showClass.popup),e.style.removeProperty("opacity")},Do),G([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&G([document.documentElement,document.body],h["height-auto"])},lt=t=>{let e=Z();e||new dt,e=Z();const n=it();Wt()?he(St()):ra(e,t),le(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ra=(t,e)=>{const n=Ct(),o=it();!e&&_e(Be())&&(e=Be()),le(n),e&&(he(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),G([t,n],h.loading)},sa=(t,e)=>{e.input==="select"||e.input==="radio"?ua(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(gn(e.inputValue)||yn(e.inputValue))&&(lt(Be()),da(t,e))},ia=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return aa(n);case"radio":return ca(n);case"file":return la(n);default:return e.inputAutoTrim?n.value.trim():n.value}},aa=t=>t.checked?1:0,ca=t=>t.checked?t.value:null,la=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,ua=(t,e)=>{const n=Z(),o=r=>fa[e.input](n,_n(r),e);gn(e.inputOptions)||yn(e.inputOptions)?(lt(Be()),kt(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Ye(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},da=(t,e)=>{const n=t.getInput();he(n),kt(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,le(n),n.focus(),t.hideLoading()}).catch(o=>{Ye(`Error in inputValue promise: ${o}`),n.value="",le(n),n.focus(),t.hideLoading()})},fa={select:(t,e,n)=>{const o=Ke(t,h.select),r=(s,a,f)=>{const l=document.createElement("option");l.value=f,fe(l,a),l.selected=$o(f,n.inputValue),s.appendChild(l)};e.forEach(s=>{const a=s[0],f=s[1];if(Array.isArray(f)){const l=document.createElement("optgroup");l.label=a,l.disabled=!1,o.appendChild(l),f.forEach(w=>r(l,w[1],w[0]))}else r(o,f,a)}),o.focus()},radio:(t,e,n)=>{const o=Ke(t,h.radio);e.forEach(s=>{const a=s[0],f=s[1],l=document.createElement("input"),w=document.createElement("label");l.type="radio",l.name=h.radio,l.value=a,$o(a,n.inputValue)&&(l.checked=!0);const C=document.createElement("span");fe(C,f),C.className=h.label,w.appendChild(l),w.appendChild(C),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},$o=(t,e)=>e&&e.toString()===t.toString();function Ho(){const t=q.innerParams.get(this);if(!t)return;const e=q.domCache.get(this);he(e.loader),Wt()?t.icon&&le(St()):ha(e),Ne([e.popup,e.actions],h.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const ha=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?le(e[0],"inline-block"):Vs()&&he(t.actions)};function pa(t){const e=q.innerParams.get(t||this),n=q.domCache.get(t||this);return n?An(n.popup,e.input):null}const Pt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},ma=()=>_e(Z()),jo=()=>Be()&&Be().click(),ga=()=>qe()&&qe().click(),ya=()=>Xe()&&Xe().click(),Vo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},ba=(t,e,n,o)=>{Vo(e),n.toast||(e.keydownHandler=r=>Ea(t,r,o),e.keydownTarget=n.keydownListenerCapture?window:Z(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Tn=(t,e,n)=>{const o=En();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();Z().focus()},zo=["ArrowRight","ArrowDown"],wa=["ArrowLeft","ArrowUp"],Ea=(t,e,n)=>{const o=q.innerParams.get(t);o&&(e.isComposing||e.keyCode===229||(o.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?ka(t,e,o):e.key==="Tab"?Aa(e,o):[...zo,...wa].includes(e.key)?va(e.key):e.key==="Escape"&&Sa(e,o,n)))},ka=(t,e,n)=>{if(Ht(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;jo(),e.preventDefault()}},Aa=(t,e)=>{const n=t.target,o=En();let r=-1;for(let s=0;s<o.length;s++)if(n===o[s]){r=s;break}t.shiftKey?Tn(e,r,-1):Tn(e,r,1),t.stopPropagation(),t.preventDefault()},va=t=>{const e=Be(),n=qe(),o=Xe();if(![e,n,o].includes(document.activeElement))return;const r=zo.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let a=0;a<Ct().children.length;a++){if(s=s[r],!s)return;if(_e(s)&&s instanceof HTMLButtonElement)break}s instanceof HTMLButtonElement&&s.focus()},Sa=(t,e,n)=>{Ht(e.allowEscapeKey)&&(t.preventDefault(),n(ct.esc))};function Wo(t,e,n,o){Wt()?qo(t,o):(Ks(n).then(()=>qo(t,o)),Vo(z)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),kn()&&(qi(),Qi(),Fo()),Ca()}function Ca(){Ne([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function Kt(t){t=Pa(t);const e=Pt.swalPromiseResolve.get(this),n=_a(this);this.isAwaitingPromise()?t.isDismissed||(Rt(this),e(t)):n&&e(t)}function xa(){return!!q.awaitingPromise.get(this)}const _a=t=>{const e=Z();if(!e)return!1;const n=q.innerParams.get(t);if(!n||He(e,n.hideClass.popup))return!1;Ne(e,n.showClass.popup),G(e,n.hideClass.popup);const o=de();return Ne(o,n.showClass.backdrop),G(o,n.hideClass.backdrop),Ra(t,e,n),!0};function Ta(t){const e=Pt.swalPromiseReject.get(this);Rt(this),e&&e(t)}const Rt=t=>{t.isAwaitingPromise()&&(q.awaitingPromise.delete(t),q.innerParams.get(t)||t._destroy())},Pa=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Ra=(t,e,n)=>{const o=de(),r=_t&&To(e);typeof n.willClose=="function"&&n.willClose(e),r?La(t,e,o,n.returnFocus,n.didClose):Wo(t,o,n.returnFocus,n.didClose)},La=(t,e,n,o,r)=>{z.swalCloseEventFinishedCallback=Wo.bind(null,t,n,o,r),e.addEventListener(_t,function(s){s.target===e&&(z.swalCloseEventFinishedCallback(),delete z.swalCloseEventFinishedCallback)})},qo=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function Ko(t,e,n){const o=q.domCache.get(t);e.forEach(r=>{o[r].disabled=n})}function Go(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 Oa(){Ko(this,["confirmButton","denyButton","cancelButton"],!1)}function Ia(){Ko(this,["confirmButton","denyButton","cancelButton"],!0)}function Ba(){return Go(this.getInput(),!1)}function Fa(){return Go(this.getInput(),!0)}function Na(t){const e=q.domCache.get(this),n=q.innerParams.get(this);fe(e.validationMessage,t),e.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&G(e.validationMessage,n.customClass.validationMessage),le(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),So(o),G(o,h.inputerror))}function Ua(){const t=q.domCache.get(this);t.validationMessage&&he(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Ne(e,h.inputerror))}function Da(){return q.domCache.get(this).progressSteps}function Ma(t){const e=Z(),n=q.innerParams.get(this);if(!e||He(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=$a(t),r=Object.assign({},n,o);Bo(this,r),q.innerParams.set(this,r),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const $a=t=>{const e={};return Object.keys(t).forEach(n=>{bo(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
61
+ https://sweetalert2.github.io/#ajax-request`),Qi(t),typeof t.title=="string"&&(t.title=t.title.split(`
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+pi()}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)&&!He(document.body,h.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,J(document.body,h.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)&&Z().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(Vt())&&Vt().contains(e))},ca=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",la=t=>t.touches&&t.touches.length>1,ua=()=>{if(He(document.body,h.iosfix)){const t=parseInt(document.body.style.top,10);Fe(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},Mo=10,da=t=>{const e=de(),n=Z();typeof t.willOpen=="function"&&t.willOpen(n);const r=window.getComputedStyle(document.body).overflowY;pa(e,n,t),setTimeout(()=>{fa(e,n)},Mo),kn()&&(ha(e,t.scrollbarPadding,r),Vi()),!qt()&&!W.previousActiveElement&&(W.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Fe(e,h["no-transition"])},$o=t=>{const e=Z();if(t.target!==e)return;const n=de();e.removeEventListener(vt,$o),n.style.overflowY="auto"},fa=(t,e)=>{vt&&Po(e)?(t.style.overflowY="hidden",e.addEventListener(vt,$o)):t.style.overflowY="auto"},ha=(t,e,n)=>{ra(),e&&n!=="hidden"&&na(),setTimeout(()=>{t.scrollTop=0})},pa=(t,e,n)=>{J(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),le(e,"grid"),setTimeout(()=>{J(e,n.showClass.popup),e.style.removeProperty("opacity")},Mo),J([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast&&J([document.documentElement,document.body],h["height-auto"])},lt=t=>{let e=Z();e||new dt,e=Z();const n=it();qt()?he(St()):ma(e,t),le(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},ma=(t,e)=>{const n=_t(),o=it();!e&&ve(Be())&&(e=Be()),le(n),e&&(he(e),o.setAttribute("data-button-to-replace",e.className)),o.parentNode.insertBefore(o,e),J([t,n],h.loading)},ga=(t,e)=>{e.input==="select"||e.input==="radio"?ka(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(gn(e.inputValue)||yn(e.inputValue))&&(lt(Be()),Aa(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,ka=(t,e)=>{const n=Z(),o=r=>Ca[e.input](n,vn(r),e);gn(e.inputOptions)||yn(e.inputOptions)?(lt(Be()),kt(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Xe(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Aa=(t,e)=>{const n=t.getInput();he(n),kt(e.inputValue).then(o=>{n.value=e.input==="number"?parseFloat(o)||0:`${o}`,le(n),n.focus(),t.hideLoading()}).catch(o=>{Xe(`Error in inputValue promise: ${o}`),n.value="",le(n),n.focus(),t.hideLoading()})},Ca={select:(t,e,n)=>{const o=Ke(t,h.select),r=(s,a,f)=>{const u=document.createElement("option");u.value=f,fe(u,a),u.selected=Ho(f,n.inputValue),s.appendChild(u)};e.forEach(s=>{const a=s[0],f=s[1];if(Array.isArray(f)){const u=document.createElement("optgroup");u.label=a,u.disabled=!1,o.appendChild(u),f.forEach(w=>r(u,w[1],w[0]))}else r(o,f,a)}),o.focus()},radio:(t,e,n)=>{const o=Ke(t,h.radio);e.forEach(s=>{const a=s[0],f=s[1],u=document.createElement("input"),w=document.createElement("label");u.type="radio",u.name=h.radio,u.value=a,Ho(a,n.inputValue)&&(u.checked=!0);const E=document.createElement("span");fe(E,f),E.className=h.label,w.appendChild(u),w.appendChild(E),o.appendChild(w)});const r=o.querySelectorAll("input");r.length&&r[0].focus()}},vn=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,o)=>{let r=n;typeof r=="object"&&(r=vn(r)),e.push([o,r])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=vn(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);he(e.loader),qt()?t.icon&&le(St()):Sa(e),Fe([e.popup,e.actions],h.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Sa=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?le(e[0],"inline-block"):ei()&&he(t.actions)};function _a(t){const e=K.innerParams.get(t||this),n=K.domCache.get(t||this);return n?An(n.popup,e.input):null}const Pt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},xa=()=>ve(Z()),Vo=()=>Be()&&Be().click(),va=()=>qe()&&qe().click(),Ta=()=>Ze()&&Ze().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:Z(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Tn=(t,e,n)=>{const o=En();if(o.length)return e=e+n,e===o.length?e=0:e===-1&&(e=o.length-1),o[e].focus();Z().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(jt(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=En();let r=-1;for(let s=0;s<o.length;s++)if(n===o[s]){r=s;break}t.shiftKey?Tn(e,r,-1):Tn(e,r,1),t.stopPropagation(),t.preventDefault()},Ba=t=>{const e=Be(),n=qe(),o=Ze();if(![e,n,o].includes(document.activeElement))return;const r=Wo.includes(t)?"nextElementSibling":"previousElementSibling";let s=document.activeElement;for(let a=0;a<_t().children.length;a++){if(s=s[r],!s)return;if(ve(s)&&s instanceof HTMLButtonElement)break}s instanceof HTMLButtonElement&&s.focus()},Na=(t,e,n)=>{jt(e.allowEscapeKey)&&(t.preventDefault(),n(ct.esc))};function qo(t,e,n,o){qt()?Ko(t,o):(ri(n).then(()=>Ko(t,o)),zo(W)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),kn()&&(oa(),ua(),Fo()),Fa()}function Fa(){Fe([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function Gt(t){t=$a(t);const e=Pt.swalPromiseResolve.get(this),n=Da(this);this.isAwaitingPromise()?t.isDismissed||(Rt(this),e(t)):n&&e(t)}function Ua(){return!!K.awaitingPromise.get(this)}const Da=t=>{const e=Z();if(!e)return!1;const n=K.innerParams.get(t);if(!n||He(e,n.hideClass.popup))return!1;Fe(e,n.showClass.popup),J(e,n.hideClass.popup);const o=de();return Fe(o,n.showClass.backdrop),J(o,n.hideClass.backdrop),Ha(t,e,n),!0};function Ma(t){const e=Pt.swalPromiseReject.get(this);Rt(this),e&&e(t)}const Rt=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=vt&&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)=>{W.swalCloseEventFinishedCallback=qo.bind(null,t,n,o,r),e.addEventListener(vt,function(s){s.target===e&&(W.swalCloseEventFinishedCallback(),delete W.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=h["validation-message"],n.customClass&&n.customClass.validationMessage&&J(e.validationMessage,n.customClass.validationMessage),le(e.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),_o(o),J(o,h.inputerror))}function Ga(){const t=K.domCache.get(this);t.validationMessage&&he(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Fe(e,h.inputerror))}function Ja(){return K.domCache.get(this).progressSteps}function Ya(t){const e=Z(),n=K.innerParams.get(this);if(!e||He(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 Ha(){const t=q.domCache.get(this),e=q.innerParams.get(this);if(!e){Jo(this);return}t.popup&&z.swalCloseEventFinishedCallback&&(z.swalCloseEventFinishedCallback(),delete z.swalCloseEventFinishedCallback),z.deferDisposalTimer&&(clearTimeout(z.deferDisposalTimer),delete z.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),ja(this)}const ja=t=>{Jo(t),delete t.params,delete z.keydownHandler,delete z.keydownTarget,delete z.currentInstance},Jo=t=>{t.isAwaitingPromise()?(Pn(q,t),q.awaitingPromise.set(t,!0)):(Pn(Pt,t),Pn(q,t))},Pn=(t,e)=>{for(const n in t)t[n].delete(e)},Yo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Ha,close:Kt,closeModal:Kt,closePopup:Kt,closeToast:Kt,disableButtons:Ia,disableInput:Fa,disableLoading:Ho,enableButtons:Oa,enableInput:Ba,getInput:pa,getProgressSteps:Da,handleAwaitingPromise:Rt,hideLoading:Ho,isAwaitingPromise:xa,rejectPromise:Ta,resetValidationMessage:Ua,showValidationMessage:Na,update:Ma},Symbol.toStringTag,{value:"Module"})),Va=t=>{const e=q.innerParams.get(t);t.disableButtons(),e.input?Xo(t,"confirm"):Ln(t,!0)},za=t=>{const e=q.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Xo(t,"deny"):Rn(t,!1)},Wa=(t,e)=>{t.disableButtons(),e(ct.cancel)},Xo=(t,e)=>{const n=q.innerParams.get(t);if(!n.input)return Ye(`The "input" parameter is needed to be set when using returnInputValueOn${mn(e)}`);const o=ia(t,n);n.inputValidator?qa(t,o,e):t.getInput().checkValidity()?e==="deny"?Rn(t,o):Ln(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},qa=(t,e,n)=>{const o=q.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>kt(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Rn(t,e):Ln(t,e)})},Rn=(t,e)=>{const n=q.innerParams.get(t||globalThis);n.showLoaderOnDeny&&lt(qe()),n.preDeny?(q.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),Rt(t)):t.closePopup({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>Qo(t||globalThis,r))):t.closePopup({isDenied:!0,value:e})},Zo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},Qo=(t,e)=>{t.rejectPromise(e)},Ln=(t,e)=>{const n=q.innerParams.get(t||globalThis);n.showLoaderOnConfirm&&lt(),n.preConfirm?(t.resetValidationMessage(),q.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preConfirm(e,n.validationMessage))).then(r=>{_e(Vt())||r===!1?(t.hideLoading(),Rt(t)):Zo(t,typeof r>"u"?e:r)}).catch(r=>Qo(t||globalThis,r))):Zo(t,e)},Ka=(t,e,n)=>{q.innerParams.get(t).toast?Ga(t,e,n):(Ya(e),Xa(e),Za(t,e,n))},Ga=(t,e,n)=>{e.popup.onclick=()=>{const o=q.innerParams.get(t);o&&(Ja(o)||o.timer||o.input)||n(ct.close)}},Ja=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let Gt=!1;const Ya=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Gt=!0)}}},Xa=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)}}},Za=(t,e,n)=>{e.container.onclick=o=>{const r=q.innerParams.get(t);if(Gt){Gt=!1;return}o.target===e.container&&Ht(r.allowOutsideClick)&&n(ct.backdrop)}},Qa=t=>typeof t=="object"&&t.jquery,er=t=>t instanceof Element||Qa(t),ec=t=>{const e={};return typeof t[0]=="object"&&!er(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{const r=t[o];typeof r=="string"||er(r)?e[n]=r:r!==void 0&&Ye(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};function tc(...t){const e=this;return new e(...t)}function nc(t){class e extends this{_main(o,r){return super._main(o,Object.assign({},t,r))}}return e}const oc=()=>z.timeout&&z.timeout.getTimerLeft(),tr=()=>{if(z.timeout)return zs(),z.timeout.stop()},nr=()=>{if(z.timeout){const t=z.timeout.start();return vn(t),t}},rc=()=>{const t=z.timeout;return t&&(t.running?tr():nr())},sc=t=>{if(z.timeout){const e=z.timeout.increase(t);return vn(e,!0),e}},ic=()=>z.timeout&&z.timeout.isRunning();let or=!1;const On={};function ac(t="data-swal-template"){On[t]=this,or||(document.body.addEventListener("click",cc),or=!0)}const cc=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in On){const o=e.getAttribute(n);if(o){On[n].fire({template:o});return}}},lc=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:ec,bindClickHandler:ac,clickCancel:ya,clickConfirm:jo,clickDeny:ga,enableLoading:lt,fire:tc,getActions:Ct,getCancelButton:Xe,getCloseButton:wn,getConfirmButton:Be,getContainer:de,getDenyButton:qe,getFocusableElements:En,getFooter:vo,getHtmlContainer:jt,getIcon:St,getImage:ko,getInputLabel:Ms,getLoader:it,getPopup:Z,getTimerLeft:oc,getTimerProgressBar:zt,getTitle:Eo,getValidationMessage:Vt,increaseTimer:sc,isDeprecatedParameter:bn,isLoading:Hs,isTimerRunning:ic,isUpdatableParameter:bo,isValidParameter:yo,isVisible:ma,mixin:nc,resumeTimer:nr,showLoading:lt,stopTimer:tr,toggleTimer:rc},Symbol.toStringTag,{value:"Module"}));let In;class ut{constructor(...e){if(typeof window>"u")return;In=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);q.promise.set(this,o)}_main(e,n={}){Us(Object.assign({},n,e)),z.currentInstance&&(z.currentInstance._destroy(),kn()&&Fo()),z.currentInstance=this;const o=dc(e,n);Vi(o),Object.freeze(o),z.timeout&&(z.timeout.stop(),delete z.timeout),clearTimeout(z.restoreFocusTimeout);const r=fc(this);return Bo(this,o),q.innerParams.set(this,o),uc(this,r,o)}then(e){return q.promise.get(this).then(e)}finally(e){return q.promise.get(this).finally(e)}}const uc=(t,e,n)=>new Promise((o,r)=>{const s=a=>{t.closePopup({isDismissed:!0,dismiss:a})};Pt.swalPromiseResolve.set(t,o),Pt.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>Va(t),e.denyButton.onclick=()=>za(t),e.cancelButton.onclick=()=>Wa(t,s),e.closeButton.onclick=()=>s(ct.close),Ka(t,e,s),ba(t,z,n,s),sa(t,n),ea(n),hc(z,n,s),pc(e,n),setTimeout(()=>{e.container.scrollTop=0})}),dc=(t,e)=>{const n=Ii(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},fc=t=>{const e={popup:Z(),container:de(),actions:Ct(),confirmButton:Be(),denyButton:qe(),cancelButton:Xe(),loader:it(),closeButton:wn(),validationMessage:Vt(),progressSteps:Ao()};return q.domCache.set(t,e),e},hc=(t,e,n)=>{const o=zt();he(o),e.timer&&(t.timeout=new zi(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(le(o),Re(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&vn(e.timer)})))},pc=(t,e)=>{if(!e.toast){if(!Ht(e.allowEnterKey))return gc();mc(t,e)||Tn(e,-1,1)}},mc=(t,e)=>e.focusDeny&&_e(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&_e(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&_e(t.confirmButton)?(t.confirmButton.focus(),!0):!1,gc=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(ut.prototype,Yo),Object.assign(ut,lc),Object.keys(Yo).forEach(t=>{ut[t]=function(...e){if(In)return In[t](...e)}}),ut.DismissReason=ct,ut.version="11.4.8";const dt=ut;dt.default=dt;/*! @license DOMPurify 3.0.6 | (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.6/LICENSE */const{entries:rr,setPrototypeOf:sr,isFrozen:yc,getPrototypeOf:bc,getOwnPropertyDescriptor:ir}=Object;let{freeze:ge,seal:Fe,create:ar}=Object,{apply:Bn,construct:Fn}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e}),Fe||(Fe=function(e){return e}),Bn||(Bn=function(e,n,o){return e.apply(n,o)}),Fn||(Fn=function(e,n){return new e(...n)});const Jt=Le(Array.prototype.forEach),cr=Le(Array.prototype.pop),Lt=Le(Array.prototype.push),Yt=Le(String.prototype.toLowerCase),Nn=Le(String.prototype.toString),wc=Le(String.prototype.match),Ot=Le(String.prototype.replace),Ec=Le(String.prototype.indexOf),kc=Le(String.prototype.trim),Te=Le(RegExp.prototype.test),It=Ac(TypeError);function Le(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 Bn(t,e,o)}}function Ac(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Fn(t,n)}}function W(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yt;sr&&sr(t,null);let o=e.length;for(;o--;){let r=e[o];if(typeof r=="string"){const s=n(r);s!==r&&(yc(e)||(e[o]=s),r=s)}t[r]=!0}return t}function ft(t){const e=ar(null);for(const[n,o]of rr(t))ir(t,n)!==void 0&&(e[n]=o);return e}function Xt(t,e){for(;t!==null;){const o=ir(t,e);if(o){if(o.get)return Le(o.get);if(typeof o.value=="function")return Le(o.value)}t=bc(t)}function n(o){return console.warn("fallback value for",o),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"]),Un=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"]),Dn=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"]),vc=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"]),Sc=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"]),$n=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"]),Cc=Fe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xc=Fe(/<%[\w\W]*|[\w\W]*%>/gm),_c=Fe(/\${[\w\W]*}/gm),Tc=Fe(/^data-[\-\w.\u00B7-\uFFFF]/),Pc=Fe(/^aria-[\-\w]+$/),hr=Fe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rc=Fe(/^(?:\w+script|data):/i),Lc=Fe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pr=Fe(/^html$/i);var mr=Object.freeze({__proto__:null,MUSTACHE_EXPR:Cc,ERB_EXPR:xc,TMPLIT_EXPR:_c,DATA_ATTR:Tc,ARIA_ATTR:Pc,IS_ALLOWED_URI:hr,IS_SCRIPT_OR_DATA:Rc,ATTR_WHITESPACE:Lc,DOCTYPE_NAME:pr});const Oc=function(){return typeof window>"u"?null:window},Ic=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(a){return a},createScriptURL(a){return a}})}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]:Oc();const e=F=>gr(F);if(e.version="3.0.6",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:a,Node:f,Element:l,NodeFilter:w,NamedNodeMap:C=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:b,DOMParser:Y,trustedTypes:H}=t,B=l.prototype,N=Xt(B,"cloneNode"),X=Xt(B,"nextSibling"),oe=Xt(B,"childNodes"),ne=Xt(B,"parentNode");if(typeof a=="function"){const F=n.createElement("template");F.content&&F.content.ownerDocument&&(n=F.content.ownerDocument)}let $,ye="";const{implementation:ae,createNodeIterator:g,createDocumentFragment:T,getElementsByTagName:U}=n,{importNode:P}=o;let _={};e.isSupported=typeof rr=="function"&&typeof ne=="function"&&ae&&ae.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:x,ERB_EXPR:j,TMPLIT_EXPR:E,DATA_ATTR:V,ARIA_ATTR:ee,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:se}=mr;let{IS_ALLOWED_URI:be}=mr,D=null;const Ae=W({},[...lr,...Un,...Dn,...Mn,...ur]);let i=null;const u=W({},[...dr,...$n,...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}})),A=null,y=null,R=!0,k=!0,v=!1,O=!0,L=!1,M=!1,K=!1,ve=!1,we=!1,ue=!1,$e=!1,ns=!0,os=!1;const Wu="user-content-";let io=!0,Mt=!1,gt={},yt=null;const rs=W({},["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 ss=null;const is=W({},["audio","video","img","source","image","track"]);let ao=null;const as=W({},["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",Ve="http://www.w3.org/1999/xhtml";let bt=Ve,co=!1,lo=null;const qu=W({},[un,dn,Ve],Nn);let et=null;const Ku=["application/xhtml+xml","text/html"],Gu="text/html";let ce=null,wt=null;const Ju=n.createElement("form"),cs=function(c){return c instanceof RegExp||c instanceof Function},uo=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wt&&wt===c)){if((!c||typeof c!="object")&&(c={}),c=ft(c),et=Ku.indexOf(c.PARSER_MEDIA_TYPE)===-1?et=Gu:et=c.PARSER_MEDIA_TYPE,ce=et==="application/xhtml+xml"?Nn:Yt,D="ALLOWED_TAGS"in c?W({},c.ALLOWED_TAGS,ce):Ae,i="ALLOWED_ATTR"in c?W({},c.ALLOWED_ATTR,ce):u,lo="ALLOWED_NAMESPACES"in c?W({},c.ALLOWED_NAMESPACES,Nn):qu,ao="ADD_URI_SAFE_ATTR"in c?W(ft(as),c.ADD_URI_SAFE_ATTR,ce):as,ss="ADD_DATA_URI_TAGS"in c?W(ft(is),c.ADD_DATA_URI_TAGS,ce):is,yt="FORBID_CONTENTS"in c?W({},c.FORBID_CONTENTS,ce):rs,A="FORBID_TAGS"in c?W({},c.FORBID_TAGS,ce):{},y="FORBID_ATTR"in c?W({},c.FORBID_ATTR,ce):{},gt="USE_PROFILES"in c?c.USE_PROFILES:!1,R=c.ALLOW_ARIA_ATTR!==!1,k=c.ALLOW_DATA_ATTR!==!1,v=c.ALLOW_UNKNOWN_PROTOCOLS||!1,O=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=c.SAFE_FOR_TEMPLATES||!1,M=c.WHOLE_DOCUMENT||!1,we=c.RETURN_DOM||!1,ue=c.RETURN_DOM_FRAGMENT||!1,$e=c.RETURN_TRUSTED_TYPE||!1,ve=c.FORCE_BODY||!1,ns=c.SANITIZE_DOM!==!1,os=c.SANITIZE_NAMED_PROPS||!1,io=c.KEEP_CONTENT!==!1,Mt=c.IN_PLACE||!1,be=c.ALLOWED_URI_REGEXP||hr,bt=c.NAMESPACE||Ve,m=c.CUSTOM_ELEMENT_HANDLING||{},c.CUSTOM_ELEMENT_HANDLING&&cs(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(m.tagNameCheck=c.CUSTOM_ELEMENT_HANDLING.tagNameCheck),c.CUSTOM_ELEMENT_HANDLING&&cs(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(m.attributeNameCheck=c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(m.allowCustomizedBuiltInElements=c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(k=!1),ue&&(we=!0),gt&&(D=W({},[...ur]),i=[],gt.html===!0&&(W(D,lr),W(i,dr)),gt.svg===!0&&(W(D,Un),W(i,$n),W(i,Zt)),gt.svgFilters===!0&&(W(D,Dn),W(i,$n),W(i,Zt)),gt.mathMl===!0&&(W(D,Mn),W(i,fr),W(i,Zt))),c.ADD_TAGS&&(D===Ae&&(D=ft(D)),W(D,c.ADD_TAGS,ce)),c.ADD_ATTR&&(i===u&&(i=ft(i)),W(i,c.ADD_ATTR,ce)),c.ADD_URI_SAFE_ATTR&&W(ao,c.ADD_URI_SAFE_ATTR,ce),c.FORBID_CONTENTS&&(yt===rs&&(yt=ft(yt)),W(yt,c.FORBID_CONTENTS,ce)),io&&(D["#text"]=!0),M&&W(D,["html","head","body"]),D.table&&(W(D,["tbody"]),delete A.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=c.TRUSTED_TYPES_POLICY,ye=$.createHTML("")}else $===void 0&&($=Ic(H,r)),$!==null&&typeof ye=="string"&&(ye=$.createHTML(""));ge&&ge(c),wt=c}},ls=W({},["mi","mo","mn","ms","mtext"]),us=W({},["foreignobject","desc","title","annotation-xml"]),Yu=W({},["title","style","font","a","script"]),fn=W({},Un);W(fn,Dn),W(fn,vc);const fo=W({},Mn);W(fo,Sc);const Xu=function(c){let S=ne(c);(!S||!S.tagName)&&(S={namespaceURI:bt,tagName:"template"});const I=Yt(c.tagName),te=Yt(S.tagName);return lo[c.namespaceURI]?c.namespaceURI===dn?S.namespaceURI===Ve?I==="svg":S.namespaceURI===un?I==="svg"&&(te==="annotation-xml"||ls[te]):!!fn[I]:c.namespaceURI===un?S.namespaceURI===Ve?I==="math":S.namespaceURI===dn?I==="math"&&us[te]:!!fo[I]:c.namespaceURI===Ve?S.namespaceURI===dn&&!us[te]||S.namespaceURI===un&&!ls[te]?!1:!fo[I]&&(Yu[I]||!fn[I]):!!(et==="application/xhtml+xml"&&lo[c.namespaceURI]):!1},tt=function(c){Lt(e.removed,{element:c});try{c.parentNode.removeChild(c)}catch{c.remove()}},ho=function(c,S){try{Lt(e.removed,{attribute:S.getAttributeNode(c),from:S})}catch{Lt(e.removed,{attribute:null,from:S})}if(S.removeAttribute(c),c==="is"&&!i[c])if(we||ue)try{tt(S)}catch{}else try{S.setAttribute(c,"")}catch{}},ds=function(c){let S=null,I=null;if(ve)c="<remove></remove>"+c;else{const me=wc(c,/^[\r\n\t ]+/);I=me&&me[0]}et==="application/xhtml+xml"&&bt===Ve&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");const te=$?$.createHTML(c):c;if(bt===Ve)try{S=new Y().parseFromString(te,et)}catch{}if(!S||!S.documentElement){S=ae.createDocument(bt,"template",null);try{S.documentElement.innerHTML=co?ye:te}catch{}}const pe=S.body||S.documentElement;return c&&I&&pe.insertBefore(n.createTextNode(I),pe.childNodes[0]||null),bt===Ve?U.call(S,M?"html":"body")[0]:M?S.documentElement:pe},fs=function(c){return g.call(c.ownerDocument||c,c,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null)},Zu=function(c){return c instanceof b&&(typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||!(c.attributes instanceof C)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function")},hs=function(c){return typeof f=="function"&&c instanceof f},ze=function(c,S,I){_[c]&&Jt(_[c],te=>{te.call(e,S,I,wt)})},ps=function(c){let S=null;if(ze("beforeSanitizeElements",c,null),Zu(c))return tt(c),!0;const I=ce(c.nodeName);if(ze("uponSanitizeElement",c,{tagName:I,allowedTags:D}),c.hasChildNodes()&&!hs(c.firstElementChild)&&Te(/<[/\w]/g,c.innerHTML)&&Te(/<[/\w]/g,c.textContent))return tt(c),!0;if(!D[I]||A[I]){if(!A[I]&&gs(I)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I)))return!1;if(io&&!yt[I]){const te=ne(c)||c.parentNode,pe=oe(c)||c.childNodes;if(pe&&te){const me=pe.length;for(let Se=me-1;Se>=0;--Se)te.insertBefore(N(pe[Se],!0),X(c))}}return tt(c),!0}return c instanceof l&&!Xu(c)||(I==="noscript"||I==="noembed"||I==="noframes")&&Te(/<\/no(script|embed|frames)/i,c.innerHTML)?(tt(c),!0):(L&&c.nodeType===3&&(S=c.textContent,Jt([x,j,E],te=>{S=Ot(S,te," ")}),c.textContent!==S&&(Lt(e.removed,{element:c.cloneNode()}),c.textContent=S)),ze("afterSanitizeElements",c,null),!1)},ms=function(c,S,I){if(ns&&(S==="id"||S==="name")&&(I in n||I in Ju))return!1;if(!(k&&!y[S]&&Te(V,S))){if(!(R&&Te(ee,S))){if(!i[S]||y[S]){if(!(gs(c)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,c)||m.tagNameCheck instanceof Function&&m.tagNameCheck(c))&&(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(!ao[S]){if(!Te(be,Ot(I,se,""))){if(!((S==="src"||S==="xlink:href"||S==="href")&&c!=="script"&&Ec(I,"data:")===0&&ss[c])){if(!(v&&!Te(ie,Ot(I,se,"")))){if(I)return!1}}}}}}return!0},gs=function(c){return c.indexOf("-")>0},ys=function(c){ze("beforeSanitizeAttributes",c,null);const{attributes:S}=c;if(!S)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:i};let te=S.length;for(;te--;){const pe=S[te],{name:me,namespaceURI:Se,value:nt}=pe,$t=ce(me);let Ce=me==="value"?nt:kc(nt);if(I.attrName=$t,I.attrValue=Ce,I.keepAttr=!0,I.forceKeepAttr=void 0,ze("uponSanitizeAttribute",c,I),Ce=I.attrValue,I.forceKeepAttr||(ho(me,c),!I.keepAttr))continue;if(!O&&Te(/\/>/i,Ce)){ho(me,c);continue}L&&Jt([x,j,E],ws=>{Ce=Ot(Ce,ws," ")});const bs=ce(c.nodeName);if(ms(bs,$t,Ce)){if(os&&($t==="id"||$t==="name")&&(ho(me,c),Ce=Wu+Ce),$&&typeof H=="object"&&typeof H.getAttributeType=="function"&&!Se)switch(H.getAttributeType(bs,$t)){case"TrustedHTML":{Ce=$.createHTML(Ce);break}case"TrustedScriptURL":{Ce=$.createScriptURL(Ce);break}}try{Se?c.setAttributeNS(Se,me,Ce):c.setAttribute(me,Ce),cr(e.removed)}catch{}}}ze("afterSanitizeAttributes",c,null)},Qu=function F(c){let S=null;const I=fs(c);for(ze("beforeSanitizeShadowDOM",c,null);S=I.nextNode();)ze("uponSanitizeShadowNode",S,null),!ps(S)&&(S.content instanceof s&&F(S.content),ys(S));ze("afterSanitizeShadowDOM",c,null)};return e.sanitize=function(F){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=null,I=null,te=null,pe=null;if(co=!F,co&&(F="<!-->"),typeof F!="string"&&!hs(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw It("dirty is not a string, aborting")}else throw It("toString is not a function");if(!e.isSupported)return F;if(K||uo(c),e.removed=[],typeof F=="string"&&(Mt=!1),Mt){if(F.nodeName){const nt=ce(F.nodeName);if(!D[nt]||A[nt])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof f)S=ds("<!---->"),I=S.ownerDocument.importNode(F,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?S=I:S.appendChild(I);else{if(!we&&!L&&!M&&F.indexOf("<")===-1)return $&&$e?$.createHTML(F):F;if(S=ds(F),!S)return we?null:$e?ye:""}S&&ve&&tt(S.firstChild);const me=fs(Mt?F:S);for(;te=me.nextNode();)ps(te)||(te.content instanceof s&&Qu(te.content),ys(te));if(Mt)return F;if(we){if(ue)for(pe=T.call(S.ownerDocument);S.firstChild;)pe.appendChild(S.firstChild);else pe=S;return(i.shadowroot||i.shadowrootmode)&&(pe=P.call(o,pe,!0)),pe}let Se=M?S.outerHTML:S.innerHTML;return M&&D["!doctype"]&&S.ownerDocument&&S.ownerDocument.doctype&&S.ownerDocument.doctype.name&&Te(pr,S.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+S.ownerDocument.doctype.name+`>
65
- `+Se),L&&Jt([x,j,E],nt=>{Se=Ot(Se,nt," ")}),$&&$e?$.createHTML(Se):Se},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uo(F),K=!0},e.clearConfig=function(){wt=null,K=!1},e.isValidAttribute=function(F,c,S){wt||uo({});const I=ce(F),te=ce(c);return ms(I,te,S)},e.addHook=function(F,c){typeof c=="function"&&(_[F]=_[F]||[],Lt(_[F],c))},e.removeHook=function(F){if(_[F])return cr(_[F])},e.removeHooks=function(F){_[F]&&(_[F]=[])},e.removeAllHooks=function(){_={}},e}var yr=gr();class Bc{get IsVisible(){return dt.isVisible()}async ConfirmAsync(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 AlertAsync(e){const n=e.icon??"info";let o;return Array.isArray(e.text)?o=`<div style="max-height: 50vh; overflow: auto">
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&&W.swalCloseEventFinishedCallback&&(W.swalCloseEventFinishedCallback(),delete W.swalCloseEventFinishedCallback),W.deferDisposalTimer&&(clearTimeout(W.deferDisposalTimer),delete W.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Qa(this)}const Qa=t=>{Yo(t),delete t.params,delete W.keydownHandler,delete W.keydownTarget,delete W.currentInstance},Yo=t=>{t.isAwaitingPromise()?(Pn(K,t),K.awaitingPromise.set(t,!0)):(Pn(Pt,t),Pn(K,t))},Pn=(t,e)=>{for(const n in t)t[n].delete(e)},Xo=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Za,close:Gt,closeModal:Gt,closePopup:Gt,closeToast:Gt,disableButtons:za,disableInput:qa,disableLoading:jo,enableButtons:Va,enableInput:Wa,getInput:_a,getProgressSteps:Ja,handleAwaitingPromise:Rt,hideLoading:jo,isAwaitingPromise:Ua,rejectPromise:Ma,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"):Ln(t,!0)},tc=t=>{const e=K.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Zo(t,"deny"):Rn(t,!1)},nc=(t,e)=>{t.disableButtons(),e(ct.cancel)},Zo=(t,e)=>{const n=K.innerParams.get(t);if(!n.input)return Xe(`The "input" parameter is needed to be set when using returnInputValueOn${mn(e)}`);const o=ya(t,n);n.inputValidator?oc(t,o,e):t.getInput().checkValidity()?e==="deny"?Rn(t,o):Ln(t,o):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},oc=(t,e,n)=>{const o=K.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>kt(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Rn(t,e):Ln(t,e)})},Rn=(t,e)=>{const n=K.innerParams.get(t||globalThis);n.showLoaderOnDeny&&lt(qe()),n.preDeny?(K.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),Rt(t)):t.closePopup({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>er(t||globalThis,r))):t.closePopup({isDenied:!0,value:e})},Qo=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},er=(t,e)=>{t.rejectPromise(e)},Ln=(t,e)=>{const n=K.innerParams.get(t||globalThis);n.showLoaderOnConfirm&&lt(),n.preConfirm?(t.resetValidationMessage(),K.awaitingPromise.set(t||globalThis,!0),Promise.resolve().then(()=>kt(n.preConfirm(e,n.validationMessage))).then(r=>{ve(zt())||r===!1?(t.hideLoading(),Rt(t)):Qo(t,typeof r>"u"?e:r)}).catch(r=>er(t||globalThis,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 Jt=!1;const ac=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(Jt=!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))&&(Jt=!0)}}},lc=(t,e,n)=>{e.container.onclick=o=>{const r=K.innerParams.get(t);if(Jt){Jt=!1;return}o.target===e.container&&jt(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&&Xe(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};function fc(...t){const e=this;return new e(...t)}function hc(t){class e extends this{_main(o,r){return super._main(o,Object.assign({},t,r))}}return e}const pc=()=>W.timeout&&W.timeout.getTimerLeft(),nr=()=>{if(W.timeout)return ti(),W.timeout.stop()},or=()=>{if(W.timeout){const t=W.timeout.start();return Cn(t),t}},mc=()=>{const t=W.timeout;return t&&(t.running?nr():or())},gc=t=>{if(W.timeout){const e=W.timeout.increase(t);return Cn(e,!0),e}},yc=()=>W.timeout&&W.timeout.isRunning();let rr=!1;const On={};function bc(t="data-swal-template"){On[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 On){const o=e.getAttribute(n);if(o){On[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:_t,getCancelButton:Ze,getCloseButton:wn,getConfirmButton:Be,getContainer:de,getDenyButton:qe,getFocusableElements:En,getFooter:So,getHtmlContainer:Vt,getIcon:St,getImage:Ao,getInputLabel:Ys,getLoader:it,getPopup:Z,getTimerLeft:pc,getTimerProgressBar:Wt,getTitle:ko,getValidationMessage:zt,increaseTimer:gc,isDeprecatedParameter:bn,isLoading:Zs,isTimerRunning:yc,isUpdatableParameter:wo,isValidParameter:bo,isVisible:xa,mixin:hc,resumeTimer:or,showLoading:lt,stopTimer:nr,toggleTimer:mc},Symbol.toStringTag,{value:"Module"}));let In;class ut{constructor(...e){if(typeof window>"u")return;In=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)),W.currentInstance&&(W.currentInstance._destroy(),kn()&&Fo()),W.currentInstance=this;const o=Ac(e,n);ea(o),Object.freeze(o),W.timeout&&(W.timeout.stop(),delete W.timeout),clearTimeout(W.restoreFocusTimeout);const r=Cc(this);return No(this,o),K.innerParams.set(this,o),kc(this,r,o)}then(e){return K.promise.get(this).then(e)}finally(e){return K.promise.get(this).finally(e)}}const kc=(t,e,n)=>new Promise((o,r)=>{const s=a=>{t.closePopup({isDismissed:!0,dismiss:a})};Pt.swalPromiseResolve.set(t,o),Pt.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,W,n,s),ga(t,n),da(n),Sc(W,n,s),_c(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Ac=(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:Z(),container:de(),actions:_t(),confirmButton:Be(),denyButton:qe(),cancelButton:Ze(),loader:it(),closeButton:wn(),validationMessage:zt(),progressSteps:Co()};return K.domCache.set(t,e),e},Sc=(t,e,n)=>{const o=Wt();he(o),e.timer&&(t.timeout=new ta(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(le(o),Re(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Cn(e.timer)})))},_c=(t,e)=>{if(!e.toast){if(!jt(e.allowEnterKey))return vc();xc(t,e)||Tn(e,-1,1)}},xc=(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(In)return In[t](...e)}}),ut.DismissReason=ct,ut.version="11.4.8";const dt=ut;dt.default=dt;/*! @license DOMPurify 3.0.6 | (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.6/LICENSE */const{entries:sr,setPrototypeOf:ir,isFrozen:Tc,getPrototypeOf:Pc,getOwnPropertyDescriptor:ar}=Object;let{freeze:ge,seal:Ne,create:cr}=Object,{apply:Bn,construct:Nn}=typeof Reflect<"u"&&Reflect;ge||(ge=function(e){return e}),Ne||(Ne=function(e){return e}),Bn||(Bn=function(e,n,o){return e.apply(n,o)}),Nn||(Nn=function(e,n){return new e(...n)});const Yt=Le(Array.prototype.forEach),lr=Le(Array.prototype.pop),Lt=Le(Array.prototype.push),Xt=Le(String.prototype.toLowerCase),Fn=Le(String.prototype.toString),Rc=Le(String.prototype.match),Ot=Le(String.prototype.replace),Lc=Le(String.prototype.indexOf),Oc=Le(String.prototype.trim),Te=Le(RegExp.prototype.test),It=Ic(TypeError);function Le(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 Bn(t,e,o)}}function Ic(t){return function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return Nn(t,n)}}function q(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xt;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 ft(t){const e=cr(null);for(const[n,o]of sr(t))ar(t,n)!==void 0&&(e[n]=o);return e}function Zt(t,e){for(;t!==null;){const o=ar(t,e);if(o){if(o.get)return Le(o.get);if(typeof o.value=="function")return Le(o.value)}t=Pc(t)}function n(o){return console.warn("fallback value for",o),null}return n}const ur=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"]),Un=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"]),Dn=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"]),Bc=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"]),Nc=ge(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dr=ge(["#text"]),fr=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"]),$n=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"]),hr=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"]),Qt=ge(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Fc=Ne(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Uc=Ne(/<%[\w\W]*|[\w\W]*%>/gm),Dc=Ne(/\${[\w\W]*}/gm),Mc=Ne(/^data-[\-\w.\u00B7-\uFFFF]/),$c=Ne(/^aria-[\-\w]+$/),pr=Ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Hc=Ne(/^(?:\w+script|data):/i),jc=Ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),mr=Ne(/^html$/i);var gr=Object.freeze({__proto__:null,MUSTACHE_EXPR:Fc,ERB_EXPR:Uc,TMPLIT_EXPR:Dc,DATA_ATTR:Mc,ARIA_ATTR:$c,IS_ALLOWED_URI:pr,IS_SCRIPT_OR_DATA:Hc,ATTR_WHITESPACE:jc,DOCTYPE_NAME:mr});const Vc=function(){return typeof window>"u"?null:window},zc=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(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function yr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vc();const e=F=>yr(F);if(e.version="3.0.6",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:a,Node:f,Element:u,NodeFilter:w,NamedNodeMap:E=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:b,DOMParser:X,trustedTypes:M}=t,B=u.prototype,N=Zt(B,"cloneNode"),$=Zt(B,"nextSibling"),ee=Zt(B,"childNodes"),oe=Zt(B,"parentNode");if(typeof a=="function"){const F=n.createElement("template");F.content&&F.content.ownerDocument&&(n=F.content.ownerDocument)}let j,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:x,ERB_EXPR:V,TMPLIT_EXPR:k,DATA_ATTR:z,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:se}=gr;let{IS_ALLOWED_URI:be}=gr,D=null;const Ae=q({},[...ur,...Un,...Dn,...Mn,...dr]);let i=null;const d=q({},[...fr,...$n,...hr,...Qt]);let m=Object.seal(cr(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,A=!0,S=!1,O=!0,L=!1,H=!1,G=!1,Ce=!1,we=!1,ue=!1,$e=!1,os=!0,rs=!1;const Zu="user-content-";let io=!0,Mt=!1,gt={},yt=null;const ss=q({},["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=q({},["audio","video","img","source","image","track"]);let ao=null;const cs=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",fn="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let bt=Ve,co=!1,lo=null;const Qu=q({},[dn,fn,Ve],Fn);let tt=null;const ed=["application/xhtml+xml","text/html"],td="text/html";let ce=null,wt=null;const nd=n.createElement("form"),ls=function(l){return l instanceof RegExp||l instanceof Function},uo=function(){let l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wt&&wt===l)){if((!l||typeof l!="object")&&(l={}),l=ft(l),tt=ed.indexOf(l.PARSER_MEDIA_TYPE)===-1?tt=td:tt=l.PARSER_MEDIA_TYPE,ce=tt==="application/xhtml+xml"?Fn:Xt,D="ALLOWED_TAGS"in l?q({},l.ALLOWED_TAGS,ce):Ae,i="ALLOWED_ATTR"in l?q({},l.ALLOWED_ATTR,ce):d,lo="ALLOWED_NAMESPACES"in l?q({},l.ALLOWED_NAMESPACES,Fn):Qu,ao="ADD_URI_SAFE_ATTR"in l?q(ft(cs),l.ADD_URI_SAFE_ATTR,ce):cs,is="ADD_DATA_URI_TAGS"in l?q(ft(as),l.ADD_DATA_URI_TAGS,ce):as,yt="FORBID_CONTENTS"in l?q({},l.FORBID_CONTENTS,ce):ss,C="FORBID_TAGS"in l?q({},l.FORBID_TAGS,ce):{},y="FORBID_ATTR"in l?q({},l.FORBID_ATTR,ce):{},gt="USE_PROFILES"in l?l.USE_PROFILES:!1,R=l.ALLOW_ARIA_ATTR!==!1,A=l.ALLOW_DATA_ATTR!==!1,S=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,$e=l.RETURN_TRUSTED_TYPE||!1,Ce=l.FORCE_BODY||!1,os=l.SANITIZE_DOM!==!1,rs=l.SANITIZE_NAMED_PROPS||!1,io=l.KEEP_CONTENT!==!1,Mt=l.IN_PLACE||!1,be=l.ALLOWED_URI_REGEXP||pr,bt=l.NAMESPACE||Ve,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&&(A=!1),ue&&(we=!0),gt&&(D=q({},[...dr]),i=[],gt.html===!0&&(q(D,ur),q(i,fr)),gt.svg===!0&&(q(D,Un),q(i,$n),q(i,Qt)),gt.svgFilters===!0&&(q(D,Dn),q(i,$n),q(i,Qt)),gt.mathMl===!0&&(q(D,Mn),q(i,hr),q(i,Qt))),l.ADD_TAGS&&(D===Ae&&(D=ft(D)),q(D,l.ADD_TAGS,ce)),l.ADD_ATTR&&(i===d&&(i=ft(i)),q(i,l.ADD_ATTR,ce)),l.ADD_URI_SAFE_ATTR&&q(ao,l.ADD_URI_SAFE_ATTR,ce),l.FORBID_CONTENTS&&(yt===ss&&(yt=ft(yt)),q(yt,l.FORBID_CONTENTS,ce)),io&&(D["#text"]=!0),H&&q(D,["html","head","body"]),D.table&&(q(D,["tbody"]),delete C.tbody),l.TRUSTED_TYPES_POLICY){if(typeof l.TRUSTED_TYPES_POLICY.createHTML!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof l.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');j=l.TRUSTED_TYPES_POLICY,ye=j.createHTML("")}else j===void 0&&(j=zc(M,r)),j!==null&&typeof ye=="string"&&(ye=j.createHTML(""));ge&&ge(l),wt=l}},us=q({},["mi","mo","mn","ms","mtext"]),ds=q({},["foreignobject","desc","title","annotation-xml"]),od=q({},["title","style","font","a","script"]),hn=q({},Un);q(hn,Dn),q(hn,Bc);const fo=q({},Mn);q(fo,Nc);const rd=function(l){let _=oe(l);(!_||!_.tagName)&&(_={namespaceURI:bt,tagName:"template"});const I=Xt(l.tagName),ne=Xt(_.tagName);return lo[l.namespaceURI]?l.namespaceURI===fn?_.namespaceURI===Ve?I==="svg":_.namespaceURI===dn?I==="svg"&&(ne==="annotation-xml"||us[ne]):!!hn[I]:l.namespaceURI===dn?_.namespaceURI===Ve?I==="math":_.namespaceURI===fn?I==="math"&&ds[ne]:!!fo[I]:l.namespaceURI===Ve?_.namespaceURI===fn&&!ds[ne]||_.namespaceURI===dn&&!us[ne]?!1:!fo[I]&&(od[I]||!hn[I]):!!(tt==="application/xhtml+xml"&&lo[l.namespaceURI]):!1},nt=function(l){Lt(e.removed,{element:l});try{l.parentNode.removeChild(l)}catch{l.remove()}},ho=function(l,_){try{Lt(e.removed,{attribute:_.getAttributeNode(l),from:_})}catch{Lt(e.removed,{attribute:null,from:_})}if(_.removeAttribute(l),l==="is"&&!i[l])if(we||ue)try{nt(_)}catch{}else try{_.setAttribute(l,"")}catch{}},fs=function(l){let _=null,I=null;if(Ce)l="<remove></remove>"+l;else{const me=Rc(l,/^[\r\n\t ]+/);I=me&&me[0]}tt==="application/xhtml+xml"&&bt===Ve&&(l='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+l+"</body></html>");const ne=j?j.createHTML(l):l;if(bt===Ve)try{_=new X().parseFromString(ne,tt)}catch{}if(!_||!_.documentElement){_=ae.createDocument(bt,"template",null);try{_.documentElement.innerHTML=co?ye:ne}catch{}}const pe=_.body||_.documentElement;return l&&I&&pe.insertBefore(n.createTextNode(I),pe.childNodes[0]||null),bt===Ve?U.call(_,H?"html":"body")[0]:H?_.documentElement:pe},hs=function(l){return g.call(l.ownerDocument||l,l,w.SHOW_ELEMENT|w.SHOW_COMMENT|w.SHOW_TEXT,null)},sd=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")},ps=function(l){return typeof f=="function"&&l instanceof f},ze=function(l,_,I){v[l]&&Yt(v[l],ne=>{ne.call(e,_,I,wt)})},ms=function(l){let _=null;if(ze("beforeSanitizeElements",l,null),sd(l))return nt(l),!0;const I=ce(l.nodeName);if(ze("uponSanitizeElement",l,{tagName:I,allowedTags:D}),l.hasChildNodes()&&!ps(l.firstElementChild)&&Te(/<[/\w]/g,l.innerHTML)&&Te(/<[/\w]/g,l.textContent))return nt(l),!0;if(!D[I]||C[I]){if(!C[I]&&ys(I)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I)))return!1;if(io&&!yt[I]){const ne=oe(l)||l.parentNode,pe=ee(l)||l.childNodes;if(pe&&ne){const me=pe.length;for(let Se=me-1;Se>=0;--Se)ne.insertBefore(N(pe[Se],!0),$(l))}}return nt(l),!0}return l instanceof u&&!rd(l)||(I==="noscript"||I==="noembed"||I==="noframes")&&Te(/<\/no(script|embed|frames)/i,l.innerHTML)?(nt(l),!0):(L&&l.nodeType===3&&(_=l.textContent,Yt([x,V,k],ne=>{_=Ot(_,ne," ")}),l.textContent!==_&&(Lt(e.removed,{element:l.cloneNode()}),l.textContent=_)),ze("afterSanitizeElements",l,null),!1)},gs=function(l,_,I){if(os&&(_==="id"||_==="name")&&(I in n||I in nd))return!1;if(!(A&&!y[_]&&Te(z,_))){if(!(R&&Te(te,_))){if(!i[_]||y[_]){if(!(ys(l)&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,l)||m.tagNameCheck instanceof Function&&m.tagNameCheck(l))&&(m.attributeNameCheck instanceof RegExp&&Te(m.attributeNameCheck,_)||m.attributeNameCheck instanceof Function&&m.attributeNameCheck(_))||_==="is"&&m.allowCustomizedBuiltInElements&&(m.tagNameCheck instanceof RegExp&&Te(m.tagNameCheck,I)||m.tagNameCheck instanceof Function&&m.tagNameCheck(I))))return!1}else if(!ao[_]){if(!Te(be,Ot(I,se,""))){if(!((_==="src"||_==="xlink:href"||_==="href")&&l!=="script"&&Lc(I,"data:")===0&&is[l])){if(!(S&&!Te(ie,Ot(I,se,"")))){if(I)return!1}}}}}}return!0},ys=function(l){return l.indexOf("-")>0},bs=function(l){ze("beforeSanitizeAttributes",l,null);const{attributes:_}=l;if(!_)return;const I={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:i};let ne=_.length;for(;ne--;){const pe=_[ne],{name:me,namespaceURI:Se,value:ot}=pe,$t=ce(me);let _e=me==="value"?ot:Oc(ot);if(I.attrName=$t,I.attrValue=_e,I.keepAttr=!0,I.forceKeepAttr=void 0,ze("uponSanitizeAttribute",l,I),_e=I.attrValue,I.forceKeepAttr||(ho(me,l),!I.keepAttr))continue;if(!O&&Te(/\/>/i,_e)){ho(me,l);continue}L&&Yt([x,V,k],Es=>{_e=Ot(_e,Es," ")});const ws=ce(l.nodeName);if(gs(ws,$t,_e)){if(rs&&($t==="id"||$t==="name")&&(ho(me,l),_e=Zu+_e),j&&typeof M=="object"&&typeof M.getAttributeType=="function"&&!Se)switch(M.getAttributeType(ws,$t)){case"TrustedHTML":{_e=j.createHTML(_e);break}case"TrustedScriptURL":{_e=j.createScriptURL(_e);break}}try{Se?l.setAttributeNS(Se,me,_e):l.setAttribute(me,_e),lr(e.removed)}catch{}}}ze("afterSanitizeAttributes",l,null)},id=function F(l){let _=null;const I=hs(l);for(ze("beforeSanitizeShadowDOM",l,null);_=I.nextNode();)ze("uponSanitizeShadowNode",_,null),!ms(_)&&(_.content instanceof s&&F(_.content),bs(_));ze("afterSanitizeShadowDOM",l,null)};return e.sanitize=function(F){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=null,I=null,ne=null,pe=null;if(co=!F,co&&(F="<!-->"),typeof F!="string"&&!ps(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw It("dirty is not a string, aborting")}else throw It("toString is not a function");if(!e.isSupported)return F;if(G||uo(l),e.removed=[],typeof F=="string"&&(Mt=!1),Mt){if(F.nodeName){const ot=ce(F.nodeName);if(!D[ot]||C[ot])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof f)_=fs("<!---->"),I=_.ownerDocument.importNode(F,!0),I.nodeType===1&&I.nodeName==="BODY"||I.nodeName==="HTML"?_=I:_.appendChild(I);else{if(!we&&!L&&!H&&F.indexOf("<")===-1)return j&&$e?j.createHTML(F):F;if(_=fs(F),!_)return we?null:$e?ye:""}_&&Ce&&nt(_.firstChild);const me=hs(Mt?F:_);for(;ne=me.nextNode();)ms(ne)||(ne.content instanceof s&&id(ne.content),bs(ne));if(Mt)return F;if(we){if(ue)for(pe=T.call(_.ownerDocument);_.firstChild;)pe.appendChild(_.firstChild);else pe=_;return(i.shadowroot||i.shadowrootmode)&&(pe=P.call(o,pe,!0)),pe}let Se=H?_.outerHTML:_.innerHTML;return H&&D["!doctype"]&&_.ownerDocument&&_.ownerDocument.doctype&&_.ownerDocument.doctype.name&&Te(mr,_.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+_.ownerDocument.doctype.name+`>
65
+ `+Se),L&&Yt([x,V,k],ot=>{Se=Ot(Se,ot," ")}),j&&$e?j.createHTML(Se):Se},e.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};uo(F),G=!0},e.clearConfig=function(){wt=null,G=!1},e.isValidAttribute=function(F,l,_){wt||uo({});const I=ce(F),ne=ce(l);return gs(I,ne,_)},e.addHook=function(F,l){typeof l=="function"&&(v[F]=v[F]||[],Lt(v[F],l))},e.removeHook=function(F){if(v[F])return lr(v[F])},e.removeHooks=function(F){v[F]&&(v[F]=[])},e.removeAllHooks=function(){v={}},e}var br=yr();class Wc{get IsVisible(){return dt.isVisible()}async ConfirmAsync(e){return new Promise(n=>{dt.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:br.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(o=>{n(o.isConfirmed===!0)})})}async AlertAsync(e){const n=e.icon??"info";let o;return Array.isArray(e.text)?o=`<div style="max-height: 50vh; overflow: auto">
66
66
  ${e.text.join("<br />")}
67
- </div>`:o=e.text,new Promise(r=>{dt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:e.title,html:yr.sanitize(o)}).then(()=>r(!0))})}}const Fc=new Bc,br=()=>Fc,Nc=["data-cor"],Uc=d.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=br(),o=d.ref("?"),r=e;async function s(){await n.ConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&r("logout")}function a(){const l=sessionStorage.getItem("name");let w="?";if(!l)return w;const C=l.split(" ").filter(Y=>Y.length>0).map(Y=>Y[0].toUpperCase()),b=Math.min(2,C.length);return w=C.slice(0,b).join(""),w.length>0?w:"?"}const f=d.computed(()=>{const l=o.value[0],w=l==="?"?0:(l.charCodeAt(0)-64)%19;return Math.max(w,0)});return d.onMounted(()=>{o.value=a()}),(l,w)=>(d.openBlock(),d.createElementBlock("div",{id:"sf-header-avatar","data-cor":f.value,onClick:s},d.toDisplayString(o.value),9,Nc))}}),Dc={},Mc={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},$c=[d.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 Hc(t,e){return d.openBlock(),d.createElementBlock("svg",Mc,$c)}const jc=po(Dc,[["render",Hc]]);class Vc{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 Hn=(()=>new Vc)(),zc=[d.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)],Wc=d.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...o)=>d.unref(Hn).Toggle&&d.unref(Hn).Toggle(...o))},zc))}}),qc={id:"sf-layout"},Kc=d.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),Gc={class:"title"},Jc={class:"sf-layout-nav-header"},Yc=d.createElementVNode("span",null,"Menu",-1),Xc={class:"sf-layout-nav-content"},Zc=d.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),Qc={id:"sf-layout-content"},el=d.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=hn(),o=e;function r(){o("logout")}return d.onMounted(()=>{o("mounted")}),(s,a)=>(d.openBlock(),d.createElementBlock("div",qc,[d.createElementVNode("header",null,[d.createElementVNode("div",{class:d.normalizeClass(["sf-layout-menu-toggler",{invert:d.unref(n).IsVisible}]),onClick:a[0]||(a[0]=f=>d.unref(n).Toggle())},[Kc,d.createVNode(jc)],2),d.createElementVNode("div",Gc,[d.renderSlot(s.$slots,"title")]),d.renderSlot(s.$slots,"action"),d.createVNode(Wc),d.createVNode(Uc,{onLogout:r})]),d.createElementVNode("nav",{class:d.normalizeClass({visible:d.unref(n).IsVisible})},[d.createElementVNode("div",Jc,[Yc,d.createVNode(Et,{icone:"close",button:"",onClick:a[1]||(a[1]=f=>d.unref(n).Close())})]),d.createElementVNode("div",Xc,[d.renderSlot(s.$slots,"menu")])],2),d.createElementVNode("main",{class:d.normalizeClass({"menu-visible":d.unref(n).IsVisible})},[Zc,d.createElementVNode("section",Qc,[d.renderSlot(s.$slots,"content")])],2)]))}}),tl=["href","data-active","onClick"],nl={class:"sf-navmenulink-text"},ol=d.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},exact:{type:Boolean}},setup(t){const e=t,n=hn();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 a=d.resolveComponent("router-link");return d.openBlock(),d.createBlock(a,{to:e.href,custom:""},{default:d.withCtx(({href:f,navigate:l,isExactActive:w,isActive:C})=>[d.createElementVNode("a",{class:"sf-navmenulink",href:f,"data-active":e.exact?w:C,onClick:b=>o(b,l)},[e.icon?(d.openBlock(),d.createBlock(Et,{key:0,icone:e.icon,"button-props":{tabindex:-1}},null,8,["icone"])):d.createCommentVNode("",!0),d.createElementVNode("span",nl,d.toDisplayString(e.text),1)],8,tl)]),_:1},8,["to"])}}}),rl=d.defineComponent({__name:"ScrollToTop",setup(t){const e=d.ref(!1),n=`--${+new Date}`;let o=null;function r(){o==null||o.scrollTo(0,0)}return d.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,a)=>(d.openBlock(),d.createElementBlock("button",{id:n,class:d.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:r},null,2))}}),sl=d.defineComponent({__name:"Content",props:{class:{},style:{},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new rt("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new rt("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function r(){return new rt("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function s(){return new rt("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(a,f)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(n()),style:d.normalizeStyle(e.style)},[d.createElementVNode("div",{class:d.normalizeClass(r())},[d.renderSlot(a.$slots,"header")],2),d.createElementVNode("div",{class:d.normalizeClass(o())},[d.renderSlot(a.$slots,"default"),d.createVNode(rl)],2),d.createElementVNode("div",{class:d.normalizeClass(s())},[d.renderSlot(a.$slots,"footer")],2)],6))}}),il={class:"sf-tab-navigation"},al=[d.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"},[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)],cl=["data-active"],ll=["href","onClick"],ul=[d.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"},[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],dl=d.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=d.ref(null),o=new ResizeObserver(l=>{f()}),r=d.ref(!1),s=d.ref(!1);function a(l=!1){const w=n.value.clientWidth;n.value.scrollLeft+=l?-w:w}function f(){const l=n.value.scrollWidth-n.value.clientWidth;r.value=n.value.scrollLeft>10,s.value=n.value.scrollLeft<l-10}return d.onMounted(()=>{n.value.addEventListener("scroll",f),o.observe(n.value)}),d.onBeforeUnmount(()=>{var l;try{(l=n.value)==null||l.removeEventListener("scroll",f),o.unobserve(n.value),o.disconnect()}catch{}}),(l,w)=>{const C=d.resolveComponent("RouterLink");return d.openBlock(),d.createElementBlock("div",il,[d.createElementVNode("div",{class:d.normalizeClass(["left-arrow",{active:r.value}]),onClick:w[0]||(w[0]=b=>a(!0))},al,2),d.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(e.tabs,b=>(d.openBlock(),d.createBlock(C,{to:b.route,custom:!0},{default:d.withCtx(({navigate:Y,isActive:H})=>[d.createElementVNode("li",{"data-active":H},[d.renderSlot(l.$slots,"item",{item:b,navigate:Y,isActive:H},()=>[d.createElementVNode("a",{href:b.route,class:d.normalizeClass({active:H}),onClick:Y},d.toDisplayString(b.text),11,ll)])],8,cl)]),_:2},1032,["to"]))),256))],512),d.createElementVNode("div",{class:d.normalizeClass(["right-arrow",{active:s.value}]),onClick:w[1]||(w[1]=b=>a())},ul,2)])}}}),fl=["id","name","disabled","data-color","form","type"],hl={class:"sf-button-label"},pl=d.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 rt(`${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)=>(d.openBlock(),d.createElementBlock("button",{id:e.id,name:e.name,class:d.normalizeClass(n()),style:d.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(d.openBlock(),d.createBlock(Et,{key:0,icone:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["icone","loading","size"])):e.loading?(d.openBlock(),d.createBlock(Et,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):d.createCommentVNode("",!0),d.createElementVNode("span",hl,[d.renderSlot(o.$slots,"default")])],14,fl))}});var ml=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function yl(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=El,Qt.toByteArray=Al,Qt.fromByteArray=Cl;for(var Ue=[],Oe=[],bl=typeof Uint8Array<"u"?Uint8Array:Array,jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht=0,wl=jn.length;ht<wl;++ht)Ue[ht]=jn[ht],Oe[jn.charCodeAt(ht)]=ht;Oe["-".charCodeAt(0)]=62,Oe["_".charCodeAt(0)]=63;function wr(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 El(t){var e=wr(t),n=e[0],o=e[1];return(n+o)*3/4-o}function kl(t,e,n){return(e+n)*3/4-n}function Al(t){var e,n=wr(t),o=n[0],r=n[1],s=new bl(kl(t,o,r)),a=0,f=r>0?o-4:o,l;for(l=0;l<f;l+=4)e=Oe[t.charCodeAt(l)]<<18|Oe[t.charCodeAt(l+1)]<<12|Oe[t.charCodeAt(l+2)]<<6|Oe[t.charCodeAt(l+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return r===2&&(e=Oe[t.charCodeAt(l)]<<2|Oe[t.charCodeAt(l+1)]>>4,s[a++]=e&255),r===1&&(e=Oe[t.charCodeAt(l)]<<10|Oe[t.charCodeAt(l+1)]<<4|Oe[t.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function vl(t){return Ue[t>>18&63]+Ue[t>>12&63]+Ue[t>>6&63]+Ue[t&63]}function Sl(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(vl(o));return r.join("")}function Cl(t){for(var e,n=t.length,o=n%3,r=[],s=16383,a=0,f=n-o;a<f;a+=s)r.push(Sl(t,a,a+s>f?f:a+s));return o===1?(e=t[n-1],r.push(Ue[e>>2]+Ue[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(Ue[e>>10]+Ue[e>>4&63]+Ue[e<<2&63]+"=")),r.join("")}var Er={exports:{}};const kr=yl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
67
+ </div>`:o=e.text,new Promise(r=>{dt.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:e.title,html:br.sanitize(o)}).then(()=>r(!0))})}}const qc=new Wc,wr=()=>qc,Kc=["data-cor"],Gc={class:"sf-p-4"},Jc=c.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=wr(),o=c.ref("?"),r=e;async function s(){await n.ConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&r("logout")}function a(){const w=sessionStorage.getItem("name");let E="?";if(!w)return E;const b=w.split(" ").filter(M=>M.length>0).map(M=>M[0].toUpperCase()),X=Math.min(2,b.length);return E=b.slice(0,X).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=a()}),(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,Kc),c.createVNode(Fs,{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",Gc,[c.createVNode(mo,{color:c.unref(Ht).Error,onClick:s},{default:c.withCtx(()=>[c.createTextVNode("Sair")]),_:1},8,["color"])])]),_:1},8,["visible"])],64))}}),Yc={},Xc={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"},Zc=[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 Qc(t,e){return c.openBlock(),c.createElementBlock("svg",Xc,Zc)}const el=po(Yc,[["render",Qc]]);class tl{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 Hn=(()=>new tl)(),nl=[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)],ol=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(Hn).Toggle&&c.unref(Hn).Toggle(...o))},nl))}}),rl={id:"sf-layout"},sl=c.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1),il={class:"title"},al={class:"sf-layout-nav-content"},cl=c.createElementVNode("section",{id:"sf-layout-page-title"},null,-1),ll={id:"sf-layout-content"},ul=c.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=pn(),o=e;return c.onMounted(()=>{o("mounted")}),(r,s)=>(c.openBlock(),c.createElementBlock("div",rl,[c.createElementVNode("header",null,[c.createElementVNode("div",{class:c.normalizeClass(["sf-layout-menu-toggler",{invert:c.unref(n).IsVisible}]),onClick:s[0]||(s[0]=a=>c.unref(n).Toggle())},[sl,c.createVNode(el)],2),c.createElementVNode("div",il,[c.renderSlot(r.$slots,"title")]),c.renderSlot(r.$slots,"action"),c.createVNode(ol),c.createVNode(Jc,{onLogout:s[1]||(s[1]=a=>o("logout"))})]),c.createElementVNode("nav",{class:c.normalizeClass({visible:c.unref(n).IsVisible})},[c.createElementVNode("div",al,[c.renderSlot(r.$slots,"menu")])],2),c.createElementVNode("main",{class:c.normalizeClass({"menu-visible":c.unref(n).IsVisible})},[cl,c.createElementVNode("section",ll,[c.renderSlot(r.$slots,"content")])],2)]))}}),dl=["href","data-active","onClick"],fl={class:"sf-navmenulink-text"},hl=c.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},exact:{type:Boolean}},setup(t){const e=t,n=pn();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 a=c.resolveComponent("router-link");return c.openBlock(),c.createBlock(a,{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(Et,{key:0,icone:e.icon,"button-props":{tabindex:-1}},null,8,["icone"])):c.createCommentVNode("",!0),c.createElementVNode("span",fl,c.toDisplayString(e.text),1)],8,dl)]),_:1},8,["to"])}}}),pl=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,a)=>(c.openBlock(),c.createElementBlock("button",{id:n,class:c.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:r},null,2))}}),ml=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 Ye("sf-content").AddClass(e.class,!!e.class).Build()}function o(){return new Ye("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function r(){return new Ye("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function s(){return new Ye("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(a,f)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(n()),style:c.normalizeStyle(e.style)},[c.createElementVNode("div",{class:c.normalizeClass(r())},[c.renderSlot(a.$slots,"header")],2),c.createElementVNode("div",{class:c.normalizeClass(o())},[c.renderSlot(a.$slots,"default"),c.createVNode(pl)],2),c.createElementVNode("div",{class:c.normalizeClass(s())},[c.renderSlot(a.$slots,"footer")],2)],6))}}),gl={class:"sf-tab-navigation"},yl=[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)],bl=["data-active"],wl=["href","onClick"],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:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)],kl=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 a(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",gl,[c.createElementVNode("div",{class:c.normalizeClass(["left-arrow",{active:r.value}]),onClick:w[0]||(w[0]=b=>a(!0))},yl,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:X,isActive:M})=>[c.createElementVNode("li",{"data-active":M},[c.renderSlot(u.$slots,"item",{item:b,navigate:X,isActive:M},()=>[c.createElementVNode("a",{href:b.route,class:c.normalizeClass({active:M}),onClick:X},c.toDisplayString(b.text),11,wl)])],8,bl)]),_:2},1032,["to"]))),256))],512),c.createElementVNode("div",{class:c.normalizeClass(["right-arrow",{active:s.value}]),onClick:w[1]||(w[1]=b=>a())},El,2)])}}});var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Sl(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 en={};en.byteLength=vl,en.toByteArray=Pl,en.fromByteArray=Ol;for(var Ue=[],Oe=[],_l=typeof Uint8Array<"u"?Uint8Array:Array,jn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht=0,xl=jn.length;ht<xl;++ht)Ue[ht]=jn[ht],Oe[jn.charCodeAt(ht)]=ht;Oe["-".charCodeAt(0)]=62,Oe["_".charCodeAt(0)]=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 vl(t){var e=Er(t),n=e[0],o=e[1];return(n+o)*3/4-o}function Tl(t,e,n){return(e+n)*3/4-n}function Pl(t){var e,n=Er(t),o=n[0],r=n[1],s=new _l(Tl(t,o,r)),a=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[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return r===2&&(e=Oe[t.charCodeAt(u)]<<2|Oe[t.charCodeAt(u+1)]>>4,s[a++]=e&255),r===1&&(e=Oe[t.charCodeAt(u)]<<10|Oe[t.charCodeAt(u+1)]<<4|Oe[t.charCodeAt(u+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function Rl(t){return Ue[t>>18&63]+Ue[t>>12&63]+Ue[t>>6&63]+Ue[t&63]}function Ll(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(Rl(o));return r.join("")}function Ol(t){for(var e,n=t.length,o=n%3,r=[],s=16383,a=0,f=n-o;a<f;a+=s)r.push(Ll(t,a,a+s>f?f:a+s));return o===1?(e=t[n-1],r.push(Ue[e>>2]+Ue[e<<4&63]+"==")):o===2&&(e=(t[n-2]<<8)+t[n-1],r.push(Ue[e>>10]+Ue[e>>4&63]+Ue[e<<2&63]+"=")),r.join("")}var kr={exports:{}};const Ar=Sl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));/**
68
68
  * [js-sha256]{@link https://github.com/emn178/js-sha256}
69
69
  *
70
70
  * @version 0.10.1
71
71
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
72
72
  * @copyright Chen, Yi-Cyuan 2014-2023
73
73
  * @license MIT
74
- */(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=ml:r&&(o=self);var a=!o.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,f=!o.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",l="0123456789abcdef".split(""),w=[-2147483648,8388608,32768,128],C=[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],Y=["hex","array","digest","arrayBuffer"],H=[];(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 $(T,!0).update(U)[g]()}},N=function(g){var T=B("hex",g);s&&(T=X(T,g)),T.create=function(){return new $(g)},T.update=function(_){return T.create().update(_)};for(var U=0;U<Y.length;++U){var P=Y[U];T[P]=B(P,g)}return T},X=function(g,T){var U=kr,P=kr.Buffer,_=T?"sha224":"sha256",x;P.from&&!o.JS_SHA256_NO_BUFFER_FROM?x=P.from:x=function(E){return new P(E)};var j=function(E){if(typeof E=="string")return U.createHash(_).update(E,"utf8").digest("hex");if(E==null)throw new Error(e);return E.constructor===ArrayBuffer&&(E=new Uint8Array(E)),Array.isArray(E)||ArrayBuffer.isView(E)||E.constructor===P?U.createHash(_).update(x(E)).digest("hex"):g(E)};return j},oe=function(g,T){return function(U,P){return new ye(U,T,!0).update(P)[g]()}},ne=function(g){var T=oe("hex",g);T.create=function(_){return new ye(_,g)},T.update=function(_,x){return T.create(_).update(x)};for(var U=0;U<Y.length;++U){var P=Y[U];T[P]=oe(P,g)}return T};function $(g,T){T?(H[0]=H[16]=H[1]=H[2]=H[3]=H[4]=H[5]=H[6]=H[7]=H[8]=H[9]=H[10]=H[11]=H[12]=H[13]=H[14]=H[15]=0,this.blocks=H):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}$.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,_=0,x,j=g.length,E=this.blocks;_<j;){if(this.hashed&&(this.hashed=!1,E[0]=this.block,E[16]=E[1]=E[2]=E[3]=E[4]=E[5]=E[6]=E[7]=E[8]=E[9]=E[10]=E[11]=E[12]=E[13]=E[14]=E[15]=0),T)for(x=this.start;_<j&&x<64;++_)E[x>>2]|=g[_]<<C[x++&3];else for(x=this.start;_<j&&x<64;++_)P=g.charCodeAt(_),P<128?E[x>>2]|=P<<C[x++&3]:P<2048?(E[x>>2]|=(192|P>>6)<<C[x++&3],E[x>>2]|=(128|P&63)<<C[x++&3]):P<55296||P>=57344?(E[x>>2]|=(224|P>>12)<<C[x++&3],E[x>>2]|=(128|P>>6&63)<<C[x++&3],E[x>>2]|=(128|P&63)<<C[x++&3]):(P=65536+((P&1023)<<10|g.charCodeAt(++_)&1023),E[x>>2]|=(240|P>>18)<<C[x++&3],E[x>>2]|=(128|P>>12&63)<<C[x++&3],E[x>>2]|=(128|P>>6&63)<<C[x++&3],E[x>>2]|=(128|P&63)<<C[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=64?(this.block=E[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},$.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()}},$.prototype.hash=function(){var g=this.h0,T=this.h1,U=this.h2,P=this.h3,_=this.h4,x=this.h5,j=this.h6,E=this.h7,V=this.blocks,ee,ie,se,be,D,Ae,i,u,m,A,y;for(ee=16;ee<64;++ee)D=V[ee-15],ie=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,D=V[ee-2],se=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,V[ee]=V[ee-16]+ie+V[ee-7]+se<<0;for(y=T&U,ee=0;ee<64;ee+=4)this.first?(this.is224?(u=300032,D=V[0]-1413257819,E=D-150054599<<0,P=D+24177077<<0):(u=704751109,D=V[0]-210244248,E=D-1521486534<<0,P=D+143694565<<0),this.first=!1):(ie=(g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10),se=(_>>>6|_<<26)^(_>>>11|_<<21)^(_>>>25|_<<7),u=g&T,be=u^g&U^y,i=_&x^~_&j,D=E+se+i+b[ee]+V[ee],Ae=ie+be,E=P+D<<0,P=D+Ae<<0),ie=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),se=(E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7),m=P&g,be=m^P&T^u,i=E&_^~E&x,D=j+se+i+b[ee+1]+V[ee+1],Ae=ie+be,j=U+D<<0,U=D+Ae<<0,ie=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),se=(j>>>6|j<<26)^(j>>>11|j<<21)^(j>>>25|j<<7),A=U&P,be=A^U&g^m,i=j&E^~j&_,D=x+se+i+b[ee+2]+V[ee+2],Ae=ie+be,x=T+D<<0,T=D+Ae<<0,ie=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),se=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),y=T&U,be=y^T&P^A,i=x&j^~x&E,D=_+se+i+b[ee+3]+V[ee+3],Ae=ie+be,_=g+D<<0,g=D+Ae<<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+_<<0,this.h5=this.h5+x<<0,this.h6=this.h6+j<<0,this.h7=this.h7+E<<0},$.prototype.hex=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,_=this.h4,x=this.h5,j=this.h6,E=this.h7,V=l[g>>28&15]+l[g>>24&15]+l[g>>20&15]+l[g>>16&15]+l[g>>12&15]+l[g>>8&15]+l[g>>4&15]+l[g&15]+l[T>>28&15]+l[T>>24&15]+l[T>>20&15]+l[T>>16&15]+l[T>>12&15]+l[T>>8&15]+l[T>>4&15]+l[T&15]+l[U>>28&15]+l[U>>24&15]+l[U>>20&15]+l[U>>16&15]+l[U>>12&15]+l[U>>8&15]+l[U>>4&15]+l[U&15]+l[P>>28&15]+l[P>>24&15]+l[P>>20&15]+l[P>>16&15]+l[P>>12&15]+l[P>>8&15]+l[P>>4&15]+l[P&15]+l[_>>28&15]+l[_>>24&15]+l[_>>20&15]+l[_>>16&15]+l[_>>12&15]+l[_>>8&15]+l[_>>4&15]+l[_&15]+l[x>>28&15]+l[x>>24&15]+l[x>>20&15]+l[x>>16&15]+l[x>>12&15]+l[x>>8&15]+l[x>>4&15]+l[x&15]+l[j>>28&15]+l[j>>24&15]+l[j>>20&15]+l[j>>16&15]+l[j>>12&15]+l[j>>8&15]+l[j>>4&15]+l[j&15];return this.is224||(V+=l[E>>28&15]+l[E>>24&15]+l[E>>20&15]+l[E>>16&15]+l[E>>12&15]+l[E>>8&15]+l[E>>4&15]+l[E&15]),V},$.prototype.toString=$.prototype.hex,$.prototype.digest=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,_=this.h4,x=this.h5,j=this.h6,E=this.h7,V=[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,_>>24&255,_>>16&255,_>>8&255,_&255,x>>24&255,x>>16&255,x>>8&255,x&255,j>>24&255,j>>16&255,j>>8&255,j&255];return this.is224||V.push(E>>24&255,E>>16&255,E>>8&255,E&255),V},$.prototype.array=$.prototype.digest,$.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,_=typeof g;if(_==="string"){var x=[],j=g.length,E=0,V;for(P=0;P<j;++P)V=g.charCodeAt(P),V<128?x[E++]=V:V<2048?(x[E++]=192|V>>6,x[E++]=128|V&63):V<55296||V>=57344?(x[E++]=224|V>>12,x[E++]=128|V>>6&63,x[E++]=128|V&63):(V=65536+((V&1023)<<10|g.charCodeAt(++P)&1023),x[E++]=240|V>>18,x[E++]=128|V>>12&63,x[E++]=128|V>>6&63,x[E++]=128|V&63);g=x}else if(_==="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 $(T,!0).update(g).array());var ee=[],ie=[];for(P=0;P<64;++P){var se=g[P]||0;ee[P]=92^se,ie[P]=54^se}$.call(this,T,U),this.update(ie),this.oKeyPad=ee,this.inner=!0,this.sharedMemory=U}ye.prototype=new $,ye.prototype.finalize=function(){if($.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();$.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),$.prototype.finalize.call(this)}};var ae=N();ae.sha256=ae,ae.sha224=N(!0),ae.sha256.hmac=ne(),ae.sha224.hmac=ne(!0),a?t.exports=ae:(o.sha256=ae.sha256,o.sha224=ae.sha224)})()})(Er);var xl=Er.exports;const _l=gl(xl);class Bt extends Error{}Bt.prototype.name="InvalidTokenError";function Tl(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 Pl(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 Tl(e)}catch{return atob(e)}}function Vn(t,e){if(typeof t!="string")throw new Bt("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 Bt(`Invalid token specified: missing part #${n+1}`);let r;try{r=Pl(o)}catch(s){throw new Bt(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Bt(`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 Ar(t){if(!(this instanceof Ar))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");for(var e=this,n,o=[],r,s={enable:!0,callbackList:[],interval:5},a=document.getElementsByTagName("script"),f=0;f<a.length;f++)(a[f].src.indexOf("keycloak.js")!==-1||a[f].src.indexOf("keycloak.min.js")!==-1)&&a[f].src.indexOf("version=")!==-1&&(e.iframeVersion=a[f].src.substring(a[f].src.indexOf("version=")+8).split("&")[0]);var l=!0,w=Ae(console.info),C=Ae(console.warn);e.init=function(i){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,r=D();var u=["default","cordova","cordova-native"];if(i&&u.indexOf(i.adapter)>-1?n=ie(i.adapter):i&&typeof i.adapter=="object"?n=i.adapter:window.Cordova||window.cordova?n=ie("cordova"):n=ie(),i){if(typeof i.useNonce<"u"&&(l=i.useNonce),typeof i.checkLoginIframe<"u"&&(s.enable=i.checkLoginIframe),i.checkLoginIframeInterval&&(s.interval=i.checkLoginIframeInterval),i.onLoad==="login-required"&&(e.loginRequired=!0),i.responseMode)if(i.responseMode==="query"||i.responseMode==="fragment")e.responseMode=i.responseMode;else throw"Invalid value for responseMode";if(i.flow){switch(i.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=i.flow}if(i.timeSkew!=null&&(e.timeSkew=i.timeSkew),i.redirectUri&&(e.redirectUri=i.redirectUri),i.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=i.silentCheckSsoRedirectUri),typeof i.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=i.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,i.pkceMethod){if(i.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=i.pkceMethod}typeof i.enableLogging=="boolean"?e.enableLogging=i.enableLogging:e.enableLogging=!1,typeof i.scope=="string"&&(e.scope=i.scope),typeof i.acrValues=="string"&&(e.acrValues=i.acrValues),typeof i.messageReceiveTimeout=="number"&&i.messageReceiveTimeout>0?e.messageReceiveTimeout=i.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var m=_(),A=_();A.promise.then(function(){e.onReady&&e.onReady(e.authenticated),m.setSuccess(e.authenticated)}).catch(function(O){m.setError(O)});var y=$();function R(){var O=function(K){K||(M.prompt="none"),i&&i.locale&&(M.locale=i.locale),e.login(M).then(function(){A.setSuccess()}).catch(function(ve){A.setError(ve)})},L=function(){var K=document.createElement("iframe"),ve=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});K.setAttribute("src",ve),K.setAttribute("sandbox","allow-scripts allow-same-origin"),K.setAttribute("title","keycloak-silent-check-sso"),K.style.display="none",document.body.appendChild(K);var we=function(ue){if(!(ue.origin!==window.location.origin||K.contentWindow!==ue.source)){var $e=T(ue.data);ne($e,A),document.body.removeChild(K),window.removeEventListener("message",we)}};window.addEventListener("message",we)},M={};switch(i.onLoad){case"check-sso":s.enable?j().then(function(){V().then(function(K){K?A.setSuccess():e.silentCheckSsoRedirectUri?L():O(!1)}).catch(function(K){A.setError(K)})}):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 j().then(function(){ne(O,A)}).catch(function(L){A.setError(L)});i?i.token&&i.refreshToken?(ae(i.token,i.refreshToken,i.idToken),s.enable?j().then(function(){V().then(function(L){L?(e.onAuthSuccess&&e.onAuthSuccess(),A.setSuccess(),E()):A.setSuccess()}).catch(function(L){A.setError(L)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),A.setSuccess()}).catch(function(L){e.onAuthError&&e.onAuthError(),i.onLoad?R():A.setError(L)})):i.onLoad?R():A.setSuccess():A.setSuccess()}function v(){var O=_(),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(){v().then(ee).then(k).catch(function(O){m.setError(O)})}),y.catch(function(O){m.setError(O)}),m.promise},e.login=function(i){return n.login(i)};function b(i){var u=null,m=window.crypto||window.msCrypto;if(m&&m.getRandomValues&&window.Uint8Array)return u=new Uint8Array(i),m.getRandomValues(u),u;u=new Array(i);for(var A=0;A<u.length;A++)u[A]=Math.floor(256*Math.random());return u}function Y(i){return H(i,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function H(i,u){for(var m=b(i),A=new Array(i),y=0;y<i;y++)A[y]=u.charCodeAt(m[y]%u.length);return String.fromCharCode.apply(null,A)}function B(i,u){switch(i){case"S256":var m=new Uint8Array(_l.arrayBuffer(u)),A=Qt.fromByteArray(m).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return A;default:throw"Invalid value for pkceMethod"}}function N(i){var u={id_token:{acr:i}};return JSON.stringify(u)}e.createLoginUrl=function(i){var u=g(),m=g(),A=n.redirectUri(i),y={state:u,nonce:m,redirectUri:encodeURIComponent(A)};i&&i.prompt&&(y.prompt=i.prompt);var R;i&&i.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var k=i&&i.scope||e.scope;k?k.indexOf("openid")===-1&&(k="openid "+k):k="openid";var v=R+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(A)+"&state="+encodeURIComponent(u)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(k);if(l&&(v=v+"&nonce="+encodeURIComponent(m)),i&&i.prompt&&(v+="&prompt="+encodeURIComponent(i.prompt)),i&&i.maxAge&&(v+="&max_age="+encodeURIComponent(i.maxAge)),i&&i.loginHint&&(v+="&login_hint="+encodeURIComponent(i.loginHint)),i&&i.idpHint&&(v+="&kc_idp_hint="+encodeURIComponent(i.idpHint)),i&&i.action&&i.action!="register"&&(v+="&kc_action="+encodeURIComponent(i.action)),i&&i.locale&&(v+="&ui_locales="+encodeURIComponent(i.locale)),i&&i.acr){var O=N(i.acr);v+="&claims="+encodeURIComponent(O)}if((i&&i.acrValues||e.acrValues)&&(v+="&acr_values="+encodeURIComponent(i.acrValues||e.acrValues)),e.pkceMethod){var L=Y(96);y.pkceCodeVerifier=L;var M=B(e.pkceMethod,L);v+="&code_challenge="+M,v+="&code_challenge_method="+e.pkceMethod}return r.add(y),v},e.logout=function(i){return n.logout(i)},e.createLogoutUrl=function(i){var u=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(i,!1));return e.idToken&&(u+="&id_token_hint="+encodeURIComponent(e.idToken)),u},e.register=function(i){return n.register(i)},e.createRegisterUrl=function(i){return i||(i={}),i.action="register",e.createLoginUrl(i)},e.createAccountUrl=function(i){var u=X(),m=void 0;return typeof u<"u"&&(m=u+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(i))),m},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(i){var u=e.realmAccess;return!!u&&u.roles.indexOf(i)>=0},e.hasResourceRole=function(i,u){if(!e.resourceAccess)return!1;var m=e.resourceAccess[u||e.clientId];return!!m&&m.roles.indexOf(i)>=0},e.loadUserProfile=function(){var i=X()+"/account",u=new XMLHttpRequest;u.open("GET",i,!0),u.setRequestHeader("Accept","application/json"),u.setRequestHeader("Authorization","bearer "+e.token);var m=_();return u.onreadystatechange=function(){u.readyState==4&&(u.status==200?(e.profile=JSON.parse(u.responseText),m.setSuccess(e.profile)):m.setError())},u.send(),m.promise},e.loadUserInfo=function(){var i=e.endpoints.userinfo(),u=new XMLHttpRequest;u.open("GET",i,!0),u.setRequestHeader("Accept","application/json"),u.setRequestHeader("Authorization","bearer "+e.token);var m=_();return u.onreadystatechange=function(){u.readyState==4&&(u.status==200?(e.userInfo=JSON.parse(u.responseText),m.setSuccess(e.userInfo)):m.setError())},u.send(),m.promise},e.isTokenExpired=function(i){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 u=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(i){if(isNaN(i))throw"Invalid minValidity";u-=i}return u<0},e.updateToken=function(i){var u=_();if(!e.refreshToken)return u.setError(),u.promise;i=i||5;var m=function(){var y=!1;if(i==-1?(y=!0,w("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(i))&&(y=!0,w("[KEYCLOAK] Refreshing token: token expired")),!y)u.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,k=e.endpoints.token();if(o.push(u),o.length==1){var v=new XMLHttpRequest;v.open("POST",k,!0),v.setRequestHeader("Content-type","application/x-www-form-urlencoded"),v.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var O=new Date().getTime();v.onreadystatechange=function(){if(v.readyState==4)if(v.status==200){w("[KEYCLOAK] Token refreshed"),O=(O+new Date().getTime())/2;var L=JSON.parse(v.responseText);ae(L.access_token,L.refresh_token,L.id_token,O),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var M=o.pop();M!=null;M=o.pop())M.setSuccess(!0)}else{C("[KEYCLOAK] Failed to refresh token"),v.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var M=o.pop();M!=null;M=o.pop())M.setError(!0)}},v.send(R)}}};if(s.enable){var A=V();A.then(function(){m()}).catch(function(y){u.setError(y)})}else m();return u.promise},e.clearToken=function(){e.token&&(ae(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())},e.setToken=ae;function X(){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 oe(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function ne(i,u){var m=i.code,A=i.error,y=i.prompt,R=new Date().getTime();if(i.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(i.kc_action_status),A){if(y!="none"){var k={error:A,error_description:i.error_description};e.onAuthError&&e.onAuthError(k),u&&u.setError(k)}else u&&u.setSuccess();return}else e.flow!="standard"&&(i.access_token||i.id_token)&&M(i.access_token,null,i.id_token,!0);if(e.flow!="implicit"&&m){var v="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"),v+="&client_id="+encodeURIComponent(e.clientId),v+="&redirect_uri="+i.redirectUri,i.pkceCodeVerifier&&(v+="&code_verifier="+i.pkceCodeVerifier),L.withCredentials=!0,L.onreadystatechange=function(){if(L.readyState==4)if(L.status==200){var K=JSON.parse(L.responseText);M(K.access_token,K.refresh_token,K.id_token,e.flow==="standard"),E()}else e.onAuthError&&e.onAuthError(),u&&u.setError()},L.send(v)}function M(K,ve,we,ue){R=(R+new Date().getTime())/2,ae(K,ve,we,R),l&&(e.tokenParsed&&e.tokenParsed.nonce!=i.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=i.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=i.storedNonce)?(w("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),u&&u.setError()):ue&&(e.onAuthSuccess&&e.onAuthSuccess(),u&&u.setSuccess())}}function $(i){var u=_(),m;t?typeof t=="string"&&(m=t):m=location.origin+"/keycloak.json";function A(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 X()+"/protocol/openid-connect/auth"},token:function(){return X()+"/protocol/openid-connect/token"},logout:function(){return X()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var M=X()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(M=M+"?version="+e.iframeVersion),M},thirdPartyCookiesIframe:function(){var M=X()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(M=M+"?version="+e.iframeVersion),M},register:function(){return X()+"/protocol/openid-connect/registrations"},userinfo:function(){return X()+"/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,A(null),u.setSuccess()}else u.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 M=JSON.parse(y.responseText);A(M),u.setSuccess()}else u.setError()},y.send()}else A(R),u.setSuccess();else{if(!t.url){for(var k=document.getElementsByTagName("script"),v=0;v<k.length;v++)if(k[v].src.match(/.*keycloak\.js/)){t.url=k[v].src.substr(0,k[v].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,A(null),u.setSuccess()}}return u.promise}function ye(i){return i.status==0&&i.responseText&&i.responseURL.startsWith("file:")}function ae(i,u,m,A){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),u?(e.refreshToken=u,e.refreshTokenParsed=Vn(u)):(delete e.refreshToken,delete e.refreshTokenParsed),m?(e.idToken=m,e.idTokenParsed=Vn(m)):(delete e.idToken,delete e.idTokenParsed),i){if(e.token=i,e.tokenParsed=Vn(i),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,A&&(e.timeSkew=Math.floor(A/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 i="0123456789abcdef",u=H(36,i).split("");u[14]="4",u[19]=i.substr(u[19]&3|8,1),u[8]=u[13]=u[18]=u[23]="-";var m=u.join("");return m}function T(i){var u=U(i);if(u){var m=r.get(u.state);return m&&(u.valid=!0,u.redirectUri=m.redirectUri,u.storedNonce=m.nonce,u.prompt=m.prompt,u.pkceCodeVerifier=m.pkceCodeVerifier),u}}function U(i){var u;switch(e.flow){case"standard":u=["code","state","session_state","kc_action_status","iss"];break;case"implicit":u=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","iss"];break;case"hybrid":u=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","iss"];break}u.push("error"),u.push("error_description"),u.push("error_uri");var m=i.indexOf("?"),A=i.indexOf("#"),y,R;if(e.responseMode==="query"&&m!==-1?(y=i.substring(0,m),R=P(i.substring(m+1,A!==-1?A:i.length),u),R.paramsString!==""&&(y+="?"+R.paramsString),A!==-1&&(y+=i.substring(A))):e.responseMode==="fragment"&&A!==-1&&(y=i.substring(0,A),R=P(i.substring(A+1),u),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(i,u){for(var m=i.split("&"),A={paramsString:"",oauthParams:{}},y=0;y<m.length;y++){var R=m[y].indexOf("="),k=m[y].slice(0,R);u.indexOf(k)!==-1?A.oauthParams[k]=m[y].slice(R+1):(A.paramsString!==""&&(A.paramsString+="&"),A.paramsString+=m[y])}return A}function _(){var i={setSuccess:function(u){i.resolve(u)},setError:function(u){i.reject(u)}};return i.promise=new Promise(function(u,m){i.resolve=u,i.reject=m}),i}function x(i,u,m){var A=null,y=new Promise(function(R,k){A=setTimeout(function(){k({error:m||"Promise is not settled within timeout of "+u+"ms"})},u)});return Promise.race([i,y]).finally(function(){clearTimeout(A)})}function j(){var i=_();if(!s.enable||s.iframe)return i.setSuccess(),i.promise;var u=document.createElement("iframe");s.iframe=u,u.onload=function(){var y=e.endpoints.authorize();y.charAt(0)==="/"?s.iframeOrigin=oe():s.iframeOrigin=y.substring(0,y.indexOf("/",8)),i.setSuccess()};var m=e.endpoints.checkSessionIframe();u.setAttribute("src",m),u.setAttribute("sandbox","allow-scripts allow-same-origin"),u.setAttribute("title","keycloak-session-iframe"),u.style.display="none",document.body.appendChild(u);var A=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 v=R[k];y.data=="error"?v.setError():v.setSuccess(y.data=="unchanged")}}};return window.addEventListener("message",A,!1),i.promise}function E(){s.enable&&e.token&&setTimeout(function(){V().then(function(i){i&&E()})},s.interval*1e3)}function V(){var i=_();if(s.iframe&&s.iframeOrigin){var u=e.clientId+" "+(e.sessionId?e.sessionId:"");s.callbackList.push(i);var m=s.iframeOrigin;s.callbackList.length==1&&s.iframe.contentWindow.postMessage(u,m)}else i.setSuccess();return i.promise}function ee(){var i=_();if(s.enable||e.silentCheckSsoRedirectUri){var u=document.createElement("iframe");u.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),u.setAttribute("sandbox","allow-scripts allow-same-origin"),u.setAttribute("title","keycloak-3p-check-iframe"),u.style.display="none",document.body.appendChild(u);var m=function(A){u.contentWindow===A.source&&(A.data!=="supported"&&A.data!=="unsupported"||(A.data==="unsupported"&&(C(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
74
+ */(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=Al:r&&(o=self);var a=!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],X=["hex","array","digest","arrayBuffer"],M=[];(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 j(T,!0).update(U)[g]()}},N=function(g){var T=B("hex",g);s&&(T=$(T,g)),T.create=function(){return new j(g)},T.update=function(v){return T.create().update(v)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=B(P,g)}return T},$=function(g,T){var U=Ar,P=Ar.Buffer,v=T?"sha224":"sha256",x;P.from&&!o.JS_SHA256_NO_BUFFER_FROM?x=P.from:x=function(k){return new P(k)};var V=function(k){if(typeof k=="string")return U.createHash(v).update(k,"utf8").digest("hex");if(k==null)throw new Error(e);return k.constructor===ArrayBuffer&&(k=new Uint8Array(k)),Array.isArray(k)||ArrayBuffer.isView(k)||k.constructor===P?U.createHash(v).update(x(k)).digest("hex"):g(k)};return V},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,x){return T.create(v).update(x)};for(var U=0;U<X.length;++U){var P=X[U];T[P]=ee(P,g)}return T};function j(g,T){T?(M[0]=M[16]=M[1]=M[2]=M[3]=M[4]=M[5]=M[6]=M[7]=M[8]=M[9]=M[10]=M[11]=M[12]=M[13]=M[14]=M[15]=0,this.blocks=M):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}j.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,x,V=g.length,k=this.blocks;v<V;){if(this.hashed&&(this.hashed=!1,k[0]=this.block,k[16]=k[1]=k[2]=k[3]=k[4]=k[5]=k[6]=k[7]=k[8]=k[9]=k[10]=k[11]=k[12]=k[13]=k[14]=k[15]=0),T)for(x=this.start;v<V&&x<64;++v)k[x>>2]|=g[v]<<E[x++&3];else for(x=this.start;v<V&&x<64;++v)P=g.charCodeAt(v),P<128?k[x>>2]|=P<<E[x++&3]:P<2048?(k[x>>2]|=(192|P>>6)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]):P<55296||P>=57344?(k[x>>2]|=(224|P>>12)<<E[x++&3],k[x>>2]|=(128|P>>6&63)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]):(P=65536+((P&1023)<<10|g.charCodeAt(++v)&1023),k[x>>2]|=(240|P>>18)<<E[x++&3],k[x>>2]|=(128|P>>12&63)<<E[x++&3],k[x>>2]|=(128|P>>6&63)<<E[x++&3],k[x>>2]|=(128|P&63)<<E[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=64?(this.block=k[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},j.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()}},j.prototype.hash=function(){var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=this.blocks,te,ie,se,be,D,Ae,i,d,m,C,y;for(te=16;te<64;++te)D=z[te-15],ie=(D>>>7|D<<25)^(D>>>18|D<<14)^D>>>3,D=z[te-2],se=(D>>>17|D<<15)^(D>>>19|D<<13)^D>>>10,z[te]=z[te-16]+ie+z[te-7]+se<<0;for(y=T&U,te=0;te<64;te+=4)this.first?(this.is224?(d=300032,D=z[0]-1413257819,k=D-150054599<<0,P=D+24177077<<0):(d=704751109,D=z[0]-210244248,k=D-1521486534<<0,P=D+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,i=v&x^~v&V,D=k+se+i+b[te]+z[te],Ae=ie+be,k=P+D<<0,P=D+Ae<<0),ie=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),se=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),m=P&g,be=m^P&T^d,i=k&v^~k&x,D=V+se+i+b[te+1]+z[te+1],Ae=ie+be,V=U+D<<0,U=D+Ae<<0,ie=(U>>>2|U<<30)^(U>>>13|U<<19)^(U>>>22|U<<10),se=(V>>>6|V<<26)^(V>>>11|V<<21)^(V>>>25|V<<7),C=U&P,be=C^U&g^m,i=V&k^~V&v,D=x+se+i+b[te+2]+z[te+2],Ae=ie+be,x=T+D<<0,T=D+Ae<<0,ie=(T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10),se=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),y=T&U,be=y^T&P^C,i=x&V^~x&k,D=v+se+i+b[te+3]+z[te+3],Ae=ie+be,v=g+D<<0,g=D+Ae<<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+x<<0,this.h6=this.h6+V<<0,this.h7=this.h7+k<<0},j.prototype.hex=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=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[x>>28&15]+u[x>>24&15]+u[x>>20&15]+u[x>>16&15]+u[x>>12&15]+u[x>>8&15]+u[x>>4&15]+u[x&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];return this.is224||(z+=u[k>>28&15]+u[k>>24&15]+u[k>>20&15]+u[k>>16&15]+u[k>>12&15]+u[k>>8&15]+u[k>>4&15]+u[k&15]),z},j.prototype.toString=j.prototype.hex,j.prototype.digest=function(){this.finalize();var g=this.h0,T=this.h1,U=this.h2,P=this.h3,v=this.h4,x=this.h5,V=this.h6,k=this.h7,z=[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,x>>24&255,x>>16&255,x>>8&255,x&255,V>>24&255,V>>16&255,V>>8&255,V&255];return this.is224||z.push(k>>24&255,k>>16&255,k>>8&255,k&255),z},j.prototype.array=j.prototype.digest,j.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 x=[],V=g.length,k=0,z;for(P=0;P<V;++P)z=g.charCodeAt(P),z<128?x[k++]=z:z<2048?(x[k++]=192|z>>6,x[k++]=128|z&63):z<55296||z>=57344?(x[k++]=224|z>>12,x[k++]=128|z>>6&63,x[k++]=128|z&63):(z=65536+((z&1023)<<10|g.charCodeAt(++P)&1023),x[k++]=240|z>>18,x[k++]=128|z>>12&63,x[k++]=128|z>>6&63,x[k++]=128|z&63);g=x}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 j(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}j.call(this,T,U),this.update(ie),this.oKeyPad=te,this.inner=!0,this.sharedMemory=U}ye.prototype=new j,ye.prototype.finalize=function(){if(j.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();j.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(g),j.prototype.finalize.call(this)}};var ae=N();ae.sha256=ae,ae.sha224=N(!0),ae.sha256.hmac=oe(),ae.sha224.hmac=oe(!0),a?t.exports=ae:(o.sha256=ae.sha256,o.sha224=ae.sha224)})()})(kr);var Il=kr.exports;const Bl=Cl(Il);class Bt extends Error{}Bt.prototype.name="InvalidTokenError";function Nl(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 Fl(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 Nl(e)}catch{return atob(e)}}function Vn(t,e){if(typeof t!="string")throw new Bt("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 Bt(`Invalid token specified: missing part #${n+1}`);let r;try{r=Fl(o)}catch(s){throw new Bt(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(r)}catch(s){throw new Bt(`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},a=document.getElementsByTagName("script"),f=0;f<a.length;f++)(a[f].src.indexOf("keycloak.js")!==-1||a[f].src.indexOf("keycloak.min.js")!==-1)&&a[f].src.indexOf("version=")!==-1&&(e.iframeVersion=a[f].src.substring(a[f].src.indexOf("version=")+8).split("&")[0]);var u=!0,w=Ae(console.info),E=Ae(console.warn);e.init=function(i){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,r=D();var d=["default","cordova","cordova-native"];if(i&&d.indexOf(i.adapter)>-1?n=ie(i.adapter):i&&typeof i.adapter=="object"?n=i.adapter:window.Cordova||window.cordova?n=ie("cordova"):n=ie(),i){if(typeof i.useNonce<"u"&&(u=i.useNonce),typeof i.checkLoginIframe<"u"&&(s.enable=i.checkLoginIframe),i.checkLoginIframeInterval&&(s.interval=i.checkLoginIframeInterval),i.onLoad==="login-required"&&(e.loginRequired=!0),i.responseMode)if(i.responseMode==="query"||i.responseMode==="fragment")e.responseMode=i.responseMode;else throw"Invalid value for responseMode";if(i.flow){switch(i.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=i.flow}if(i.timeSkew!=null&&(e.timeSkew=i.timeSkew),i.redirectUri&&(e.redirectUri=i.redirectUri),i.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=i.silentCheckSsoRedirectUri),typeof i.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=i.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,i.pkceMethod){if(i.pkceMethod!=="S256")throw"Invalid value for pkceMethod";e.pkceMethod=i.pkceMethod}typeof i.enableLogging=="boolean"?e.enableLogging=i.enableLogging:e.enableLogging=!1,typeof i.scope=="string"&&(e.scope=i.scope),typeof i.acrValues=="string"&&(e.acrValues=i.acrValues),typeof i.messageReceiveTimeout=="number"&&i.messageReceiveTimeout>0?e.messageReceiveTimeout=i.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=j();function R(){var O=function(G){G||(H.prompt="none"),i&&i.locale&&(H.locale=i.locale),e.login(H).then(function(){C.setSuccess()}).catch(function(Ce){C.setError(Ce)})},L=function(){var G=document.createElement("iframe"),Ce=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});G.setAttribute("src",Ce),G.setAttribute("sandbox","allow-scripts allow-same-origin"),G.setAttribute("title","keycloak-silent-check-sso"),G.style.display="none",document.body.appendChild(G);var we=function(ue){if(!(ue.origin!==window.location.origin||G.contentWindow!==ue.source)){var $e=T(ue.data);oe($e,C),document.body.removeChild(G),window.removeEventListener("message",we)}};window.addEventListener("message",we)},H={};switch(i.onLoad){case"check-sso":s.enable?V().then(function(){z().then(function(G){G?C.setSuccess():e.silentCheckSsoRedirectUri?L():O(!1)}).catch(function(G){C.setError(G)})}):e.silentCheckSsoRedirectUri?L():O(!1);break;case"login-required":O(!0);break;default:throw"Invalid value for onLoad"}}function A(){var O=T(window.location.href);if(O&&window.history.replaceState(window.history.state,null,O.newUrl),O&&O.valid)return V().then(function(){oe(O,C)}).catch(function(L){C.setError(L)});i?i.token&&i.refreshToken?(ae(i.token,i.refreshToken,i.idToken),s.enable?V().then(function(){z().then(function(L){L?(e.onAuthSuccess&&e.onAuthSuccess(),C.setSuccess(),k()):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(),i.onLoad?R():C.setError(L)})):i.onLoad?R():C.setSuccess():C.setSuccess()}function S(){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(){S().then(te).then(A).catch(function(O){m.setError(O)})}),y.catch(function(O){m.setError(O)}),m.promise},e.login=function(i){return n.login(i)};function b(i){var d=null,m=window.crypto||window.msCrypto;if(m&&m.getRandomValues&&window.Uint8Array)return d=new Uint8Array(i),m.getRandomValues(d),d;d=new Array(i);for(var C=0;C<d.length;C++)d[C]=Math.floor(256*Math.random());return d}function X(i){return M(i,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function M(i,d){for(var m=b(i),C=new Array(i),y=0;y<i;y++)C[y]=d.charCodeAt(m[y]%d.length);return String.fromCharCode.apply(null,C)}function B(i,d){switch(i){case"S256":var m=new Uint8Array(Bl.arrayBuffer(d)),C=en.fromByteArray(m).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");return C;default:throw"Invalid value for pkceMethod"}}function N(i){var d={id_token:{acr:i}};return JSON.stringify(d)}e.createLoginUrl=function(i){var d=g(),m=g(),C=n.redirectUri(i),y={state:d,nonce:m,redirectUri:encodeURIComponent(C)};i&&i.prompt&&(y.prompt=i.prompt);var R;i&&i.action=="register"?R=e.endpoints.register():R=e.endpoints.authorize();var A=i&&i.scope||e.scope;A?A.indexOf("openid")===-1&&(A="openid "+A):A="openid";var S=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(A);if(u&&(S=S+"&nonce="+encodeURIComponent(m)),i&&i.prompt&&(S+="&prompt="+encodeURIComponent(i.prompt)),i&&i.maxAge&&(S+="&max_age="+encodeURIComponent(i.maxAge)),i&&i.loginHint&&(S+="&login_hint="+encodeURIComponent(i.loginHint)),i&&i.idpHint&&(S+="&kc_idp_hint="+encodeURIComponent(i.idpHint)),i&&i.action&&i.action!="register"&&(S+="&kc_action="+encodeURIComponent(i.action)),i&&i.locale&&(S+="&ui_locales="+encodeURIComponent(i.locale)),i&&i.acr){var O=N(i.acr);S+="&claims="+encodeURIComponent(O)}if((i&&i.acrValues||e.acrValues)&&(S+="&acr_values="+encodeURIComponent(i.acrValues||e.acrValues)),e.pkceMethod){var L=X(96);y.pkceCodeVerifier=L;var H=B(e.pkceMethod,L);S+="&code_challenge="+H,S+="&code_challenge_method="+e.pkceMethod}return r.add(y),S},e.logout=function(i){return n.logout(i)},e.createLogoutUrl=function(i){var d=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(i,!1));return e.idToken&&(d+="&id_token_hint="+encodeURIComponent(e.idToken)),d},e.register=function(i){return n.register(i)},e.createRegisterUrl=function(i){return i||(i={}),i.action="register",e.createLoginUrl(i)},e.createAccountUrl=function(i){var d=$(),m=void 0;return typeof d<"u"&&(m=d+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(i))),m},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(i){var d=e.realmAccess;return!!d&&d.roles.indexOf(i)>=0},e.hasResourceRole=function(i,d){if(!e.resourceAccess)return!1;var m=e.resourceAccess[d||e.clientId];return!!m&&m.roles.indexOf(i)>=0},e.loadUserProfile=function(){var i=$()+"/account",d=new XMLHttpRequest;d.open("GET",i,!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 i=e.endpoints.userinfo(),d=new XMLHttpRequest;d.open("GET",i,!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(i){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(i){if(isNaN(i))throw"Invalid minValidity";d-=i}return d<0},e.updateToken=function(i){var d=v();if(!e.refreshToken)return d.setError(),d.promise;i=i||5;var m=function(){var y=!1;if(i==-1?(y=!0,w("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(i))&&(y=!0,w("[KEYCLOAK] Refreshing token: token expired")),!y)d.setSuccess(!1);else{var R="grant_type=refresh_token&refresh_token="+e.refreshToken,A=e.endpoints.token();if(o.push(d),o.length==1){var S=new XMLHttpRequest;S.open("POST",A,!0),S.setRequestHeader("Content-type","application/x-www-form-urlencoded"),S.withCredentials=!0,R+="&client_id="+encodeURIComponent(e.clientId);var O=new Date().getTime();S.onreadystatechange=function(){if(S.readyState==4)if(S.status==200){w("[KEYCLOAK] Token refreshed"),O=(O+new Date().getTime())/2;var L=JSON.parse(S.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"),S.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var H=o.pop();H!=null;H=o.pop())H.setError(!0)}},S.send(R)}}};if(s.enable){var C=z();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 $(){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(i,d){var m=i.code,C=i.error,y=i.prompt,R=new Date().getTime();if(i.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(i.kc_action_status),C){if(y!="none"){var A={error:C,error_description:i.error_description};e.onAuthError&&e.onAuthError(A),d&&d.setError(A)}else d&&d.setSuccess();return}else e.flow!="standard"&&(i.access_token||i.id_token)&&H(i.access_token,null,i.id_token,!0);if(e.flow!="implicit"&&m){var S="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"),S+="&client_id="+encodeURIComponent(e.clientId),S+="&redirect_uri="+i.redirectUri,i.pkceCodeVerifier&&(S+="&code_verifier="+i.pkceCodeVerifier),L.withCredentials=!0,L.onreadystatechange=function(){if(L.readyState==4)if(L.status==200){var G=JSON.parse(L.responseText);H(G.access_token,G.refresh_token,G.id_token,e.flow==="standard"),k()}else e.onAuthError&&e.onAuthError(),d&&d.setError()},L.send(S)}function H(G,Ce,we,ue){R=(R+new Date().getTime())/2,ae(G,Ce,we,R),u&&(e.tokenParsed&&e.tokenParsed.nonce!=i.storedNonce||e.refreshTokenParsed&&e.refreshTokenParsed.nonce!=i.storedNonce||e.idTokenParsed&&e.idTokenParsed.nonce!=i.storedNonce)?(w("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),d&&d.setError()):ue&&(e.onAuthSuccess&&e.onAuthSuccess(),d&&d.setSuccess())}}function j(i){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 $()+"/protocol/openid-connect/auth"},token:function(){return $()+"/protocol/openid-connect/token"},logout:function(){return $()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var H=$()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},thirdPartyCookiesIframe:function(){var H=$()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(H=H+"?version="+e.iframeVersion),H},register:function(){return $()+"/protocol/openid-connect/registrations"},userinfo:function(){return $()+"/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 A=document.getElementsByTagName("script"),S=0;S<A.length;S++)if(A[S].src.match(/.*keycloak\.js/)){t.url=A[S].src.substr(0,A[S].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(i){return i.status==0&&i.responseText&&i.responseURL.startsWith("file:")}function ae(i,d,m,C){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),d?(e.refreshToken=d,e.refreshTokenParsed=Vn(d)):(delete e.refreshToken,delete e.refreshTokenParsed),m?(e.idToken=m,e.idTokenParsed=Vn(m)):(delete e.idToken,delete e.idTokenParsed),i){if(e.token=i,e.tokenParsed=Vn(i),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 i="0123456789abcdef",d=M(36,i).split("");d[14]="4",d[19]=i.substr(d[19]&3|8,1),d[8]=d[13]=d[18]=d[23]="-";var m=d.join("");return m}function T(i){var d=U(i);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(i){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=i.indexOf("?"),C=i.indexOf("#"),y,R;if(e.responseMode==="query"&&m!==-1?(y=i.substring(0,m),R=P(i.substring(m+1,C!==-1?C:i.length),d),R.paramsString!==""&&(y+="?"+R.paramsString),C!==-1&&(y+=i.substring(C))):e.responseMode==="fragment"&&C!==-1&&(y=i.substring(0,C),R=P(i.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(i,d){for(var m=i.split("&"),C={paramsString:"",oauthParams:{}},y=0;y<m.length;y++){var R=m[y].indexOf("="),A=m[y].slice(0,R);d.indexOf(A)!==-1?C.oauthParams[A]=m[y].slice(R+1):(C.paramsString!==""&&(C.paramsString+="&"),C.paramsString+=m[y])}return C}function v(){var i={setSuccess:function(d){i.resolve(d)},setError:function(d){i.reject(d)}};return i.promise=new Promise(function(d,m){i.resolve=d,i.reject=m}),i}function x(i,d,m){var C=null,y=new Promise(function(R,A){C=setTimeout(function(){A({error:m||"Promise is not settled within timeout of "+d+"ms"})},d)});return Promise.race([i,y]).finally(function(){clearTimeout(C)})}function V(){var i=v();if(!s.enable||s.iframe)return i.setSuccess(),i.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)),i.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),A=R.length-1;A>=0;--A){var S=R[A];y.data=="error"?S.setError():S.setSuccess(y.data=="unchanged")}}};return window.addEventListener("message",C,!1),i.promise}function k(){s.enable&&e.token&&setTimeout(function(){z().then(function(i){i&&k()})},s.interval*1e3)}function z(){var i=v();if(s.iframe&&s.iframeOrigin){var d=e.clientId+" "+(e.sessionId?e.sessionId:"");s.callbackList.push(i);var m=s.iframeOrigin;s.callbackList.length==1&&s.iframe.contentWindow.postMessage(d,m)}else i.setSuccess();return i.promise}function te(){var i=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:
75
75
 
76
76
  - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
77
77
  - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
78
78
 
79
- 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(u),window.removeEventListener("message",m),i.setSuccess()))};window.addEventListener("message",m,!1)}else i.setSuccess();return x(i.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ie(i){if(!i||i=="default")return{login:function(k){return window.location.assign(e.createLoginUrl(k)),_().promise},logout:function(k){return window.location.replace(e.createLogoutUrl(k)),_().promise},register:function(k){return window.location.assign(e.createRegisterUrl(k)),_().promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u")window.location.href=k;else throw"Not supported by the OIDC server";return _().promise},redirectUri:function(k,v){return k&&k.redirectUri?k.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(i=="cordova"){s.enable=!1;var u=function(k,v,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(k,v,O):window.open(k,v,O)},m=function(k){return k&&k.cordovaOptions?Object.keys(k.cordovaOptions).reduce(function(v,O){return v[O]=k.cordovaOptions[O],v},{}):{}},A=function(k){return Object.keys(k).reduce(function(v,O){return v.push(O+"="+k[O]),v},[]).join(",")},y=function(k){var v=m(k);return v.location="no",k&&k.prompt=="none"&&(v.hidden="yes"),A(v)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(k){var v=_(),O=y(k),L=e.createLoginUrl(k),M=u(L,"_blank",O),K=!1,ve=!1,we=function(){ve=!0,M.close()};return M.addEventListener("loadstart",function(ue){if(ue.url.indexOf(R())==0){var $e=T(ue.url);ne($e,v),we(),K=!0}}),M.addEventListener("loaderror",function(ue){if(!K)if(ue.url.indexOf(R())==0){var $e=T(ue.url);ne($e,v),we(),K=!0}else v.setError(),we()}),M.addEventListener("exit",function(ue){ve||v.setError({reason:"closed_by_user"})}),v.promise},logout:function(k){var v=_(),O=e.createLogoutUrl(k),L=u(O,"_blank","location=no,hidden=yes,clearcache=yes"),M;return L.addEventListener("loadstart",function(K){K.url.indexOf(R())==0&&L.close()}),L.addEventListener("loaderror",function(K){K.url.indexOf(R())==0||(M=!0),L.close()}),L.addEventListener("exit",function(K){M?v.setError():(e.clearToken(),v.setSuccess())}),v.promise},register:function(k){var v=_(),O=e.createRegisterUrl(),L=y(k),M=u(O,"_blank",L);return M.addEventListener("loadstart",function(K){if(K.url.indexOf(R())==0){M.close();var ve=T(K.url);ne(ve,v)}}),v.promise},accountManagement:function(){var k=e.createAccountUrl();if(typeof k<"u"){var v=u(k,"_blank","location=no");v.addEventListener("loadstart",function(O){O.url.indexOf(R())==0&&v.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(k){return R()}}}if(i=="cordova-native")return s.enable=!1,{login:function(k){var v=_(),O=e.createLoginUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var M=T(L.url);ne(M,v)}),window.cordova.plugins.browsertab.openUrl(O),v.promise},logout:function(k){var v=_(),O=e.createLogoutUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),v.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),v.promise},register:function(k){var v=_(),O=e.createRegisterUrl(k);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var M=T(L.url);ne(M,v)}),window.cordova.plugins.browsertab.openUrl(O),v.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: "+i}var se=function(){if(!(this instanceof se))return new se;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var i=this;function u(){for(var m=new Date().getTime(),A=0;A<localStorage.length;A++){var y=localStorage.key(A);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)}}}}i.get=function(m){if(m){var A="kc-callback-"+m,y=localStorage.getItem(A);return y&&(localStorage.removeItem(A),y=JSON.parse(y)),u(),y}},i.add=function(m){u();var A="kc-callback-"+m.state;m.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(A,JSON.stringify(m))}},be=function(){if(!(this instanceof be))return new be;var i=this;i.get=function(y){if(y){var R=m("kc-callback-"+y);if(A("kc-callback-"+y,"",u(-100)),R)return JSON.parse(R)}},i.add=function(y){A("kc-callback-"+y.state,JSON.stringify(y),u(60))},i.removeItem=function(y){A(y,"",u(-100))};var u=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(";"),v=0;v<k.length;v++){for(var O=k[v];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(R)==0)return O.substring(R.length,O.length)}return""},A=function(y,R,k){var v=y+"="+R+"; expires="+k.toUTCString()+"; ";document.cookie=v}};function D(){try{return new se}catch{}return new be}function Ae(i){return function(){e.enableLogging&&i.apply(console,Array.prototype.slice.call(arguments))}}}async function Rl(){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);return e||(console.warn(`Arquivo ${t} não localizado no projeto ou não possui o conteúdo correto!`),document.body.innerHTML=`<div style="padding: 3rem; display: flex; justify-content: center; align-items: center; height: 100vh; width: 100vw; font-size: 1.5rem;">O arquivo '${t}' não foi encontrado.</div>`),e}function Ll(t){const e=new Ar(t),n={},o=async(a={},f)=>{if(await Rl())return a.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(a).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 a=await e.loadUserInfo();n.email=a.email??"",n.emailVerified=a.email_verified===!0,n.firstName=a.given_name??"",n.lastName=a.family_name??"",n.name=a.name??"",n.sub=a.sub??"",n.username=a.preferred_username??"",n.roles=[...a.role??[]],n.groups=[...a.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 Ol=t=>Ll(t);class zn{constructor(e=null){We(this,"errors",[]);We(this,"_value",null);We(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))}}const ld="",ud="";function vr(t,e){return function(){return t.apply(e,arguments)}}const{toString:Il}=Object.prototype,{getPrototypeOf:Wn}=Object,en=(t=>e=>{const n=Il.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),De=t=>(t=t.toLowerCase(),e=>en(e)===t),tn=t=>e=>typeof e===t,{isArray:pt}=Array,Ft=tn("undefined");function Bl(t){return t!==null&&!Ft(t)&&t.constructor!==null&&!Ft(t.constructor)&&Ie(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Sr=De("ArrayBuffer");function Fl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Sr(t.buffer),e}const Nl=tn("string"),Ie=tn("function"),Cr=tn("number"),nn=t=>t!==null&&typeof t=="object",Ul=t=>t===!0||t===!1,on=t=>{if(en(t)!=="object")return!1;const e=Wn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Dl=De("Date"),Ml=De("File"),$l=De("Blob"),Hl=De("FileList"),jl=t=>nn(t)&&Ie(t.pipe),Vl=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]"))},zl=De("URLSearchParams"),Wl=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),a=s.length;let f;for(o=0;o<a;o++)f=s[o],e.call(null,t[f],f,t)}}function xr(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 _r=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Tr=t=>!Ft(t)&&t!==_r;function qn(){const{caseless:t}=Tr(this)&&this||{},e={},n=(o,r)=>{const s=t&&xr(e,r)||r;on(e[s])&&on(o)?e[s]=qn(e[s],o):on(o)?e[s]=qn({},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 ql=(t,e,n,{allOwnKeys:o}={})=>(Nt(e,(r,s)=>{n&&Ie(r)?t[s]=vr(r,n):t[s]=r},{allOwnKeys:o}),t),Kl=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Gl=(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)},Jl=(t,e,n,o)=>{let r,s,a;const f={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!f[a]&&(e[a]=t[a],f[a]=!0);t=n!==!1&&Wn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Yl=(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},Xl=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!Cr(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Zl=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wn(Uint8Array)),Ql=(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])}},eu=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},tu=De("HTMLFormElement"),nu=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),Pr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ou=De("RegExp"),Rr=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Nt(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},ru=t=>{Rr(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+"'")})}})},su=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return pt(t)?o(t):o(String(t).split(e)),n},iu=()=>{},au=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Kn="abcdefghijklmnopqrstuvwxyz",Lr="0123456789",Or={DIGIT:Lr,ALPHA:Kn,ALPHA_DIGIT:Kn+Kn.toUpperCase()+Lr},cu=(t=16,e=Or.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function lu(t){return!!(t&&Ie(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const uu=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,(a,f)=>{const l=n(a,r+1);!Ft(l)&&(s[f]=l)}),e[r]=void 0,s}}return o};return n(t,0)},du=De("AsyncFunction"),p={isArray:pt,isArrayBuffer:Sr,isBuffer:Bl,isFormData:Vl,isArrayBufferView:Fl,isString:Nl,isNumber:Cr,isBoolean:Ul,isObject:nn,isPlainObject:on,isUndefined:Ft,isDate:Dl,isFile:Ml,isBlob:$l,isRegExp:ou,isFunction:Ie,isStream:jl,isURLSearchParams:zl,isTypedArray:Zl,isFileList:Hl,forEach:Nt,merge:qn,extend:ql,trim:Wl,stripBOM:Kl,inherits:Gl,toFlatObject:Jl,kindOf:en,kindOfTest:De,endsWith:Yl,toArray:Xl,forEachEntry:Ql,matchAll:eu,isHTMLForm:tu,hasOwnProperty:Pr,hasOwnProp:Pr,reduceDescriptors:Rr,freezeMethods:ru,toObjectSet:su,toCamelCase:nu,noop:iu,toFiniteNumber:au,findKey:xr,global:_r,isContextDefined:Tr,ALPHABET:Or,generateString:cu,isSpecCompliantForm:lu,toJSONObject:uu,isAsyncFn:du,isThenable:t=>t&&(nn(t)||Ie(t))&&Ie(t.then)&&Ie(t.catch)};function J(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)}p.inherits(J,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:p.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ir=J.prototype,Br={};["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=>{Br[t]={value:t}}),Object.defineProperties(J,Br),Object.defineProperty(Ir,"isAxiosError",{value:!0}),J.from=(t,e,n,o,r,s)=>{const a=Object.create(Ir);return p.toFlatObject(t,a,function(l){return l!==Error.prototype},f=>f!=="isAxiosError"),J.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const fu=null;function Gn(t){return p.isPlainObject(t)||p.isArray(t)}function Fr(t){return p.endsWith(t,"[]")?t.slice(0,-2):t}function Nr(t,e,n){return t?t.concat(e).map(function(r,s){return r=Fr(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function hu(t){return p.isArray(t)&&!t.some(Gn)}const pu=p.toFlatObject(p,{},null,function(e){return/^is[A-Z]/.test(e)});function rn(t,e,n){if(!p.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,X){return!p.isUndefined(X[N])});const o=n.metaTokens,r=n.visitor||C,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(e);if(!p.isFunction(r))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(p.isDate(B))return B.toISOString();if(!l&&p.isBlob(B))throw new J("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(B)||p.isTypedArray(B)?l&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function C(B,N,X){let oe=B;if(B&&!X&&typeof B=="object"){if(p.endsWith(N,"{}"))N=o?N:N.slice(0,-2),B=JSON.stringify(B);else if(p.isArray(B)&&hu(B)||(p.isFileList(B)||p.endsWith(N,"[]"))&&(oe=p.toArray(B)))return N=Fr(N),oe.forEach(function($,ye){!(p.isUndefined($)||$===null)&&e.append(a===!0?Nr([N],ye,s):a===null?N:N+"[]",w($))}),!1}return Gn(B)?!0:(e.append(Nr(X,N,s),w(B)),!1)}const b=[],Y=Object.assign(pu,{defaultVisitor:C,convertValue:w,isVisitable:Gn});function H(B,N){if(!p.isUndefined(B)){if(b.indexOf(B)!==-1)throw Error("Circular reference detected in "+N.join("."));b.push(B),p.forEach(B,function(oe,ne){(!(p.isUndefined(oe)||oe===null)&&r.call(e,oe,p.isString(ne)?ne.trim():ne,N,Y))===!0&&H(oe,N?N.concat(ne):[ne])}),b.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return H(t),e}function Ur(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Jn(t,e){this._pairs=[],t&&rn(t,this,e)}const Dr=Jn.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,Ur)}:Ur;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function mu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mr(t,e,n){if(!e)return t;const o=n&&n.encode||mu,r=n&&n.serialize;let s;if(r?s=r(e,n):s=p.isURLSearchParams(e)?e.toString():new Jn(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class gu{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){p.forEach(this.handlers,function(o){o!==null&&e(o)})}}const $r=gu,Hr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yu={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Jn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},jr=typeof window<"u"&&typeof document<"u",bu=(t=>jr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),wu=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jr,hasStandardBrowserEnv:bu,hasStandardBrowserWebWorkerEnv:wu},Symbol.toStringTag,{value:"Module"})),...yu};function Eu(t,e){return rn(t,new Me.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Me.isNode&&p.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function ku(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Au(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 Vr(t){function e(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const f=Number.isFinite(+a),l=s>=n.length;return a=!a&&p.isArray(r)?r.length:a,l?(p.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!f):((!r[a]||!p.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&p.isArray(r[a])&&(r[a]=Au(r[a])),!f)}if(p.isFormData(t)&&p.isFunction(t.entries)){const n={};return p.forEachEntry(t,(o,r)=>{e(ku(o),r,n,0)}),n}return null}function vu(t,e,n){if(p.isString(t))try{return(e||JSON.parse)(t),p.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const Yn={transitional:Hr,adapter:["xhr","http"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=p.isObject(e);if(s&&p.isHTMLForm(e)&&(e=new FormData(e)),p.isFormData(e))return r&&r?JSON.stringify(Vr(e)):e;if(p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e))return e;if(p.isArrayBufferView(e))return e.buffer;if(p.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 Eu(e,this.formSerializer).toString();if((f=p.isFileList(e))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return rn(f?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),vu(e)):e}],transformResponse:[function(e){const n=this.transitional||Yn.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&p.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(f){if(a)throw f.name==="SyntaxError"?J.from(f,J.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:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{Yn.headers[t]={}});const Xn=Yn,Su=p.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"]),Cu=t=>{const e={};let n,o,r;return t&&t.split(`
80
- `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||e[n]&&Su[n])&&(n==="set-cookie"?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)}),e},zr=Symbol("internals");function Ut(t){return t&&String(t).trim().toLowerCase()}function sn(t){return t===!1||t==null?t:p.isArray(t)?t.map(sn):String(t)}function xu(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 _u=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zn(t,e,n,o,r){if(p.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!p.isString(e)){if(p.isString(o))return e.indexOf(o)!==-1;if(p.isRegExp(o))return o.test(e)}}function Tu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function Pu(t,e){const n=p.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}class an{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(f,l,w){const C=Ut(l);if(!C)throw new Error("header name must be a non-empty string");const b=p.findKey(r,C);(!b||r[b]===void 0||w===!0||w===void 0&&r[b]!==!1)&&(r[b||l]=sn(f))}const a=(f,l)=>p.forEach(f,(w,C)=>s(w,C,l));return p.isPlainObject(e)||e instanceof this.constructor?a(e,n):p.isString(e)&&(e=e.trim())&&!_u(e)?a(Cu(e),n):e!=null&&s(n,e,o),this}get(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return xu(r);if(p.isFunction(n))return n.call(this,r,o);if(p.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Zn(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(a){if(a=Ut(a),a){const f=p.findKey(o,a);f&&(!n||Zn(o,o[f],f,n))&&(delete o[f],r=!0)}}return p.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||Zn(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return p.forEach(this,(r,s)=>{const a=p.findKey(o,s);if(a){n[a]=sn(r),delete n[s];return}const f=e?Tu(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 p.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&p.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(`
81
- `)}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[zr]=this[zr]={accessors:{}}).accessors,r=this.prototype;function s(a){const f=Ut(a);o[f]||(Pu(r,a),o[f]=!0)}return p.isArray(e)?e.forEach(s):s(e),this}}an.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(an.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),p.freezeMethods(an);const je=an;function Qn(t,e){const n=this||Xn,o=e||n,r=je.from(o.headers);let s=o.data;return p.forEach(t,function(f){s=f.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Wr(t){return!!(t&&t.__CANCEL__)}function Dt(t,e,n){J.call(this,t??"canceled",J.ERR_CANCELED,e,n),this.name="CanceledError"}p.inherits(Dt,J,{__CANCEL__:!0});function Ru(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new J("Request failed with status code "+n.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Lu=Me.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];p.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),p.isString(o)&&a.push("path="+o),p.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.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 Ou(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Iu(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function qr(t,e){return t&&!Ou(e)?Iu(t,e):e}const Bu=Me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{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(a){const f=p.isString(a)?r(a):a;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}();function Fu(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Nu(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const w=Date.now(),C=o[s];a||(a=w),n[r]=l,o[r]=w;let b=s,Y=0;for(;b!==r;)Y+=n[b++],b=b%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),w-a<e)return;const H=C&&w-C;return H?Math.round(Y*1e3/H):void 0}}function Kr(t,e){let n=0;const o=Nu(50,250);return r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,f=s-n,l=o(f),w=s<=a;n=s;const C={loaded:s,total:a,progress:a?s/a:void 0,bytes:f,rate:l||void 0,estimated:l&&a&&w?(a-s)/l:void 0,event:r};C[e?"download":"upload"]=!0,t(C)}}const eo={http:fu,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){let r=t.data;const s=je.from(t.headers).normalize();let{responseType:a,withXSRFToken:f}=t,l;function w(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let C;if(p.isFormData(r)){if(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((C=s.getContentType())!==!1){const[N,...X]=C?C.split(";").map(oe=>oe.trim()).filter(Boolean):[];s.setContentType([N||"multipart/form-data",...X].join("; "))}}let b=new XMLHttpRequest;if(t.auth){const N=t.auth.username||"",X=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+X))}const Y=qr(t.baseURL,t.url);b.open(t.method.toUpperCase(),Mr(Y,t.params,t.paramsSerializer),!0),b.timeout=t.timeout;function H(){if(!b)return;const N=je.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),oe={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:t,request:b};Ru(function($){n($),w()},function($){o($),w()},oe),b=null}if("onloadend"in b?b.onloadend=H:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(H)},b.onabort=function(){b&&(o(new J("Request aborted",J.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new J("Network Error",J.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let X=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const oe=t.transitional||Hr;t.timeoutErrorMessage&&(X=t.timeoutErrorMessage),o(new J(X,oe.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,b)),b=null},Me.hasStandardBrowserEnv&&(f&&p.isFunction(f)&&(f=f(t)),f||f!==!1&&Bu(Y))){const N=t.xsrfHeaderName&&t.xsrfCookieName&&Lu.read(t.xsrfCookieName);N&&s.set(t.xsrfHeaderName,N)}r===void 0&&s.setContentType(null),"setRequestHeader"in b&&p.forEach(s.toJSON(),function(X,oe){b.setRequestHeader(oe,X)}),p.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),a&&a!=="json"&&(b.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&b.addEventListener("progress",Kr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",Kr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=N=>{b&&(o(!N||N.type?new Dt(null,t,b):N),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const B=Fu(Y);if(B&&Me.protocols.indexOf(B)===-1){o(new J("Unsupported protocol "+B+":",J.ERR_BAD_REQUEST,t));return}b.send(r||null)})}};p.forEach(eo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Gr=t=>`- ${t}`,Uu=t=>p.isFunction(t)||t===null||t===!1,Jr={getAdapter:t=>{t=p.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!Uu(n)&&(o=eo[(a=String(n)).toLowerCase()],o===void 0))throw new J(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([f,l])=>`adapter ${f} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
82
- `+s.map(Gr).join(`
83
- `):" "+Gr(s[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:eo};function to(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dt(null,t)}function Yr(t){return to(t),t.headers=je.from(t.headers),t.data=Qn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Jr.getAdapter(t.adapter||Xn.adapter)(t).then(function(o){return to(t),o.data=Qn.call(t,t.transformResponse,o),o.headers=je.from(o.headers),o},function(o){return Wr(o)||(to(t),o&&o.response&&(o.response.data=Qn.call(t,t.transformResponse,o.response),o.response.headers=je.from(o.response.headers))),Promise.reject(o)})}const Xr=t=>t instanceof je?t.toJSON():t;function mt(t,e){e=e||{};const n={};function o(w,C,b){return p.isPlainObject(w)&&p.isPlainObject(C)?p.merge.call({caseless:b},w,C):p.isPlainObject(C)?p.merge({},C):p.isArray(C)?C.slice():C}function r(w,C,b){if(p.isUndefined(C)){if(!p.isUndefined(w))return o(void 0,w,b)}else return o(w,C,b)}function s(w,C){if(!p.isUndefined(C))return o(void 0,C)}function a(w,C){if(p.isUndefined(C)){if(!p.isUndefined(w))return o(void 0,w)}else return o(void 0,C)}function f(w,C,b){if(b in e)return o(w,C);if(b in t)return o(void 0,w)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:f,headers:(w,C)=>r(Xr(w),Xr(C),!0)};return p.forEach(Object.keys(Object.assign({},t,e)),function(C){const b=l[C]||r,Y=b(t[C],e[C],C);p.isUndefined(Y)&&b!==f||(n[C]=Y)}),n}const Zr="1.6.5",no={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{no[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const Qr={};no.transitional=function(e,n,o){function r(s,a){return"[Axios v"+Zr+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,f)=>{if(e===!1)throw new J(r(a," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!Qr[a]&&(Qr[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,f):!0}};function Du(t,e,n){if(typeof t!="object")throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],a=e[s];if(a){const f=t[s],l=f===void 0||a(f,s,t);if(l!==!0)throw new J("option "+s+" must be "+l,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+s,J.ERR_BAD_OPTION)}}const oo={assertOptions:Du,validators:no},Ge=oo.validators;class cn{constructor(e){this.defaults=e,this.interceptors={request:new $r,response:new $r}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=mt(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&oo.assertOptions(o,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),r!=null&&(p.isFunction(r)?n.paramsSerializer={serialize:r}:oo.assertOptions(r,{encode:Ge.function,serialize:Ge.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],B=>{delete s[B]}),n.headers=je.concat(a,s);const f=[];let l=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(l=l&&N.synchronous,f.unshift(N.fulfilled,N.rejected))});const w=[];this.interceptors.response.forEach(function(N){w.push(N.fulfilled,N.rejected)});let C,b=0,Y;if(!l){const B=[Yr.bind(this),void 0];for(B.unshift.apply(B,f),B.push.apply(B,w),Y=B.length,C=Promise.resolve(n);b<Y;)C=C.then(B[b++],B[b++]);return C}Y=f.length;let H=n;for(b=0;b<Y;){const B=f[b++],N=f[b++];try{H=B(H)}catch(X){N.call(this,X);break}}try{C=Yr.call(this,H)}catch(B){return Promise.reject(B)}for(b=0,Y=w.length;b<Y;)C=C.then(w[b++],w[b++]);return C}getUri(e){e=mt(this.defaults,e);const n=qr(e.baseURL,e.url);return Mr(n,e.params,e.paramsSerializer)}}p.forEach(["delete","get","head","options"],function(e){cn.prototype[e]=function(n,o){return this.request(mt(o||{},{method:e,url:n,data:(o||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function n(o){return function(s,a,f){return this.request(mt(f||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}cn.prototype[e]=n(),cn.prototype[e+"Form"]=n(!0)});const ln=cn;class ro{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 a=new Promise(f=>{o.subscribe(f),s=f}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,f){o.reason||(o.reason=new Dt(s,a,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 ro(function(r){e=r}),cancel:e}}}const Mu=ro;function $u(t){return function(n){return t.apply(null,n)}}function Hu(t){return p.isObject(t)&&t.isAxiosError===!0}const so={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(so).forEach(([t,e])=>{so[e]=t});const ju=so;function es(t){const e=new ln(t),n=vr(ln.prototype.request,e);return p.extend(n,ln.prototype,e,{allOwnKeys:!0}),p.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return es(mt(t,r))},n}const re=es(Xn);re.Axios=ln,re.CanceledError=Dt,re.CancelToken=Mu,re.isCancel=Wr,re.VERSION=Zr,re.toFormData=rn,re.AxiosError=J,re.Cancel=re.CanceledError,re.all=function(e){return Promise.all(e)},re.spread=$u,re.isAxiosError=Hu,re.mergeConfig=mt,re.AxiosHeaders=je,re.formToJSON=t=>Vr(p.isHTMLForm(t)?new FormData(t):t),re.getAdapter=Jr.getAdapter,re.HttpStatusCode=ju,re.default=re;const Vu=re;class ts{constructor(e){We(this,"keycloak");We(this,"axios");We(this,"fileName","silent-login.html");this.keycloak=e,this.axios=Vu.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 zn,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 zn,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,a=r.data.code,f=r.data.state,l=r.data.error;if(s!=="silent-login-iframe-result"||l==="login_required"||!a){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 C=JSON.parse(w.responseText);this.keycloak.setToken(C.access_token,null,C.id_token,new Date().getTime()),e(!0);return}e(!1)}},w.send(this.TokenExchangeParams(a,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 zu=t=>new ts(t);Hn.SetInitialTheme(),Q.AppResult=zn,Q.AxiosClient=ts,Q.Cor=pn,Q.SfButton=pl,Q.SfContent=sl,Q.SfIcon=Et,Q.SfLayout=el,Q.SfNavMenuLink=ol,Q.SfTabNavigation=dl,Q.Tamanho=ot,Q.UseAuthService=Ol,Q.UseAxiosClient=zu,Q.UseDialogService=br,Q.UseNavMenuService=hn,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
79
+ 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),i.setSuccess()))};window.addEventListener("message",m,!1)}else i.setSuccess();return x(i.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function ie(i){if(!i||i=="default")return{login:function(A){return window.location.assign(e.createLoginUrl(A)),v().promise},logout:function(A){return window.location.replace(e.createLogoutUrl(A)),v().promise},register:function(A){return window.location.assign(e.createRegisterUrl(A)),v().promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u")window.location.href=A;else throw"Not supported by the OIDC server";return v().promise},redirectUri:function(A,S){return A&&A.redirectUri?A.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(i=="cordova"){s.enable=!1;var d=function(A,S,O){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(A,S,O):window.open(A,S,O)},m=function(A){return A&&A.cordovaOptions?Object.keys(A.cordovaOptions).reduce(function(S,O){return S[O]=A.cordovaOptions[O],S},{}):{}},C=function(A){return Object.keys(A).reduce(function(S,O){return S.push(O+"="+A[O]),S},[]).join(",")},y=function(A){var S=m(A);return S.location="no",A&&A.prompt=="none"&&(S.hidden="yes"),C(S)},R=function(){return e.redirectUri||"http://localhost"};return{login:function(A){var S=v(),O=y(A),L=e.createLoginUrl(A),H=d(L,"_blank",O),G=!1,Ce=!1,we=function(){Ce=!0,H.close()};return H.addEventListener("loadstart",function(ue){if(ue.url.indexOf(R())==0){var $e=T(ue.url);oe($e,S),we(),G=!0}}),H.addEventListener("loaderror",function(ue){if(!G)if(ue.url.indexOf(R())==0){var $e=T(ue.url);oe($e,S),we(),G=!0}else S.setError(),we()}),H.addEventListener("exit",function(ue){Ce||S.setError({reason:"closed_by_user"})}),S.promise},logout:function(A){var S=v(),O=e.createLogoutUrl(A),L=d(O,"_blank","location=no,hidden=yes,clearcache=yes"),H;return L.addEventListener("loadstart",function(G){G.url.indexOf(R())==0&&L.close()}),L.addEventListener("loaderror",function(G){G.url.indexOf(R())==0||(H=!0),L.close()}),L.addEventListener("exit",function(G){H?S.setError():(e.clearToken(),S.setSuccess())}),S.promise},register:function(A){var S=v(),O=e.createRegisterUrl(),L=y(A),H=d(O,"_blank",L);return H.addEventListener("loadstart",function(G){if(G.url.indexOf(R())==0){H.close();var Ce=T(G.url);oe(Ce,S)}}),S.promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u"){var S=d(A,"_blank","location=no");S.addEventListener("loadstart",function(O){O.url.indexOf(R())==0&&S.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(A){return R()}}}if(i=="cordova-native")return s.enable=!1,{login:function(A){var S=v(),O=e.createLoginUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},logout:function(A){var S=v(),O=e.createLogoutUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),S.setSuccess()}),window.cordova.plugins.browsertab.openUrl(O),S.promise},register:function(A){var S=v(),O=e.createRegisterUrl(A);return universalLinks.subscribe("keycloak",function(L){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var H=T(L.url);oe(H,S)}),window.cordova.plugins.browsertab.openUrl(O),S.promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u")window.cordova.plugins.browsertab.openUrl(A);else throw"Not supported by the OIDC server"},redirectUri:function(A){return A&&A.redirectUri?A.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+i}var se=function(){if(!(this instanceof se))return new se;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var i=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 A=JSON.parse(R).expires;(!A||A<m)&&localStorage.removeItem(y)}catch{localStorage.removeItem(y)}}}}i.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}},i.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 i=this;i.get=function(y){if(y){var R=m("kc-callback-"+y);if(C("kc-callback-"+y,"",d(-100)),R)return JSON.parse(R)}},i.add=function(y){C("kc-callback-"+y.state,JSON.stringify(y),d(60))},i.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+"=",A=document.cookie.split(";"),S=0;S<A.length;S++){for(var O=A[S];O.charAt(0)==" ";)O=O.substring(1);if(O.indexOf(R)==0)return O.substring(R.length,O.length)}return""},C=function(y,R,A){var S=y+"="+R+"; expires="+A.toUTCString()+"; ";document.cookie=S}};function D(){try{return new se}catch{}return new be}function Ae(i){return function(){e.enableLogging&&i.apply(console,Array.prototype.slice.call(arguments))}}}async function Ul(){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 Dl(t){const e=new Cr(t),n={},o=async(a={},f)=>{if(await Ul())return a.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(a).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 a=await e.loadUserInfo();n.email=a.email??"",n.emailVerified=a.email_verified===!0,n.firstName=a.given_name??"",n.lastName=a.family_name??"",n.name=a.name??"",n.sub=a.sub??"",n.username=a.preferred_username??"",n.roles=[...a.role??[]],n.groups=[...a.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 Ml=t=>Dl(t);class zn{constructor(e=null){We(this,"errors",[]);We(this,"_value",null);We(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))}}const gd="";function Sr(t,e){return function(){return t.apply(e,arguments)}}const{toString:$l}=Object.prototype,{getPrototypeOf:Wn}=Object,tn=(t=>e=>{const n=$l.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),De=t=>(t=t.toLowerCase(),e=>tn(e)===t),nn=t=>e=>typeof e===t,{isArray:pt}=Array,Nt=nn("undefined");function Hl(t){return t!==null&&!Nt(t)&&t.constructor!==null&&!Nt(t.constructor)&&Ie(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const _r=De("ArrayBuffer");function jl(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&_r(t.buffer),e}const Vl=nn("string"),Ie=nn("function"),xr=nn("number"),on=t=>t!==null&&typeof t=="object",zl=t=>t===!0||t===!1,rn=t=>{if(tn(t)!=="object")return!1;const e=Wn(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Wl=De("Date"),ql=De("File"),Kl=De("Blob"),Gl=De("FileList"),Jl=t=>on(t)&&Ie(t.pipe),Yl=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ie(t.append)&&((e=tn(t))==="formdata"||e==="object"&&Ie(t.toString)&&t.toString()==="[object FormData]"))},Xl=De("URLSearchParams"),Zl=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ft(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),a=s.length;let f;for(o=0;o<a;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=>!Nt(t)&&t!==Tr;function qn(){const{caseless:t}=Pr(this)&&this||{},e={},n=(o,r)=>{const s=t&&vr(e,r)||r;rn(e[s])&&rn(o)?e[s]=qn(e[s],o):rn(o)?e[s]=qn({},o):pt(o)?e[s]=o.slice():e[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Ft(arguments[o],n);return e}const Ql=(t,e,n,{allOwnKeys:o}={})=>(Ft(e,(r,s)=>{n&&Ie(r)?t[s]=Sr(r,n):t[s]=r},{allOwnKeys:o}),t),eu=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),tu=(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)},nu=(t,e,n,o)=>{let r,s,a;const f={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)a=r[s],(!o||o(a,t,e))&&!f[a]&&(e[a]=t[a],f[a]=!0);t=n!==!1&&Wn(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ou=(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},ru=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!xr(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},su=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wn(Uint8Array)),iu=(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])}},au=(t,e)=>{let n;const o=[];for(;(n=t.exec(e))!==null;)o.push(n);return o},cu=De("HTMLFormElement"),lu=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),uu=De("RegExp"),Lr=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};Ft(n,(r,s)=>{let a;(a=e(r,s,t))!==!1&&(o[s]=a||r)}),Object.defineProperties(t,o)},du=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+"'")})}})},fu=(t,e)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return pt(t)?o(t):o(String(t).split(e)),n},hu=()=>{},pu=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Kn="abcdefghijklmnopqrstuvwxyz",Or="0123456789",Ir={DIGIT:Or,ALPHA:Kn,ALPHA_DIGIT:Kn+Kn.toUpperCase()+Or},mu=(t=16,e=Ir.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n};function gu(t){return!!(t&&Ie(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const yu=t=>{const e=new Array(10),n=(o,r)=>{if(on(o)){if(e.indexOf(o)>=0)return;if(!("toJSON"in o)){e[r]=o;const s=pt(o)?[]:{};return Ft(o,(a,f)=>{const u=n(a,r+1);!Nt(u)&&(s[f]=u)}),e[r]=void 0,s}}return o};return n(t,0)},bu=De("AsyncFunction"),p={isArray:pt,isArrayBuffer:_r,isBuffer:Hl,isFormData:Yl,isArrayBufferView:jl,isString:Vl,isNumber:xr,isBoolean:zl,isObject:on,isPlainObject:rn,isUndefined:Nt,isDate:Wl,isFile:ql,isBlob:Kl,isRegExp:uu,isFunction:Ie,isStream:Jl,isURLSearchParams:Xl,isTypedArray:su,isFileList:Gl,forEach:Ft,merge:qn,extend:Ql,trim:Zl,stripBOM:eu,inherits:tu,toFlatObject:nu,kindOf:tn,kindOfTest:De,endsWith:ou,toArray:ru,forEachEntry:iu,matchAll:au,isHTMLForm:cu,hasOwnProperty:Rr,hasOwnProp:Rr,reduceDescriptors:Lr,freezeMethods:du,toObjectSet:fu,toCamelCase:lu,noop:hu,toFiniteNumber:pu,findKey:vr,global:Tr,isContextDefined:Pr,ALPHABET:Ir,generateString:mu,isSpecCompliantForm:gu,toJSONObject:yu,isAsyncFn:bu,isThenable:t=>t&&(on(t)||Ie(t))&&Ie(t.then)&&Ie(t.catch)};function Y(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)}p.inherits(Y,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:p.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Br=Y.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(Y,Nr),Object.defineProperty(Br,"isAxiosError",{value:!0}),Y.from=(t,e,n,o,r,s)=>{const a=Object.create(Br);return p.toFlatObject(t,a,function(u){return u!==Error.prototype},f=>f!=="isAxiosError"),Y.call(a,t.message,e,n,o,r),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const wu=null;function Gn(t){return p.isPlainObject(t)||p.isArray(t)}function Fr(t){return p.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 Eu(t){return p.isArray(t)&&!t.some(Gn)}const ku=p.toFlatObject(p,{},null,function(e){return/^is[A-Z]/.test(e)});function sn(t,e,n){if(!p.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=p.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,$){return!p.isUndefined($[N])});const o=n.metaTokens,r=n.visitor||E,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&p.isSpecCompliantForm(e);if(!p.isFunction(r))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(p.isDate(B))return B.toISOString();if(!u&&p.isBlob(B))throw new Y("Blob is not supported. Use a Buffer instead.");return p.isArrayBuffer(B)||p.isTypedArray(B)?u&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function E(B,N,$){let ee=B;if(B&&!$&&typeof B=="object"){if(p.endsWith(N,"{}"))N=o?N:N.slice(0,-2),B=JSON.stringify(B);else if(p.isArray(B)&&Eu(B)||(p.isFileList(B)||p.endsWith(N,"[]"))&&(ee=p.toArray(B)))return N=Fr(N),ee.forEach(function(j,ye){!(p.isUndefined(j)||j===null)&&e.append(a===!0?Ur([N],ye,s):a===null?N:N+"[]",w(j))}),!1}return Gn(B)?!0:(e.append(Ur($,N,s),w(B)),!1)}const b=[],X=Object.assign(ku,{defaultVisitor:E,convertValue:w,isVisitable:Gn});function M(B,N){if(!p.isUndefined(B)){if(b.indexOf(B)!==-1)throw Error("Circular reference detected in "+N.join("."));b.push(B),p.forEach(B,function(ee,oe){(!(p.isUndefined(ee)||ee===null)&&r.call(e,ee,p.isString(oe)?oe.trim():oe,N,X))===!0&&M(ee,N?N.concat(oe):[oe])}),b.pop()}}if(!p.isObject(t))throw new TypeError("data must be an object");return M(t),e}function Dr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(o){return e[o]})}function Jn(t,e){this._pairs=[],t&&sn(t,this,e)}const Mr=Jn.prototype;Mr.append=function(e,n){this._pairs.push([e,n])},Mr.toString=function(e){const n=e?function(o){return e.call(this,o,Dr)}:Dr;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Au(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||Au,r=n&&n.serialize;let s;if(r?s=r(e,n):s=p.isURLSearchParams(e)?e.toString():new Jn(e,n).toString(o),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Cu{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){p.forEach(this.handlers,function(o){o!==null&&e(o)})}}const Hr=Cu,jr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Su={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Jn,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",_u=(t=>Vr&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),xu=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Me={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vr,hasStandardBrowserEnv:_u,hasStandardBrowserWebWorkerEnv:xu},Symbol.toStringTag,{value:"Module"})),...Su};function vu(t,e){return sn(t,new Me.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Me.isNode&&p.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Tu(t){return p.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pu(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 a=n[s++];if(a==="__proto__")return!0;const f=Number.isFinite(+a),u=s>=n.length;return a=!a&&p.isArray(r)?r.length:a,u?(p.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!f):((!r[a]||!p.isObject(r[a]))&&(r[a]=[]),e(n,o,r[a],s)&&p.isArray(r[a])&&(r[a]=Pu(r[a])),!f)}if(p.isFormData(t)&&p.isFunction(t.entries)){const n={};return p.forEachEntry(t,(o,r)=>{e(Tu(o),r,n,0)}),n}return null}function Ru(t,e,n){if(p.isString(t))try{return(e||JSON.parse)(t),p.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(t)}const Yn={transitional:jr,adapter:["xhr","http"],transformRequest:[function(e,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=p.isObject(e);if(s&&p.isHTMLForm(e)&&(e=new FormData(e)),p.isFormData(e))return r&&r?JSON.stringify(zr(e)):e;if(p.isArrayBuffer(e)||p.isBuffer(e)||p.isStream(e)||p.isFile(e)||p.isBlob(e))return e;if(p.isArrayBufferView(e))return e.buffer;if(p.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 vu(e,this.formSerializer).toString();if((f=p.isFileList(e))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return sn(f?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),Ru(e)):e}],transformResponse:[function(e){const n=this.transitional||Yn.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&p.isString(e)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(f){if(a)throw f.name==="SyntaxError"?Y.from(f,Y.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:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};p.forEach(["delete","get","head","post","put","patch"],t=>{Yn.headers[t]={}});const Xn=Yn,Lu=p.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"]),Ou=t=>{const e={};let n,o,r;return t&&t.split(`
80
+ `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||e[n]&&Lu[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 Ut(t){return t&&String(t).trim().toLowerCase()}function an(t){return t===!1||t==null?t:p.isArray(t)?t.map(an):String(t)}function Iu(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 Bu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Zn(t,e,n,o,r){if(p.isFunction(o))return o.call(this,e,n);if(r&&(e=n),!!p.isString(e)){if(p.isString(o))return e.indexOf(o)!==-1;if(p.isRegExp(o))return o.test(e)}}function Nu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,o)=>n.toUpperCase()+o)}function Fu(t,e){const n=p.toCamelCase(" "+e);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+n,{value:function(r,s,a){return this[o].call(this,e,r,s,a)},configurable:!0})})}class cn{constructor(e){e&&this.set(e)}set(e,n,o){const r=this;function s(f,u,w){const E=Ut(u);if(!E)throw new Error("header name must be a non-empty string");const b=p.findKey(r,E);(!b||r[b]===void 0||w===!0||w===void 0&&r[b]!==!1)&&(r[b||u]=an(f))}const a=(f,u)=>p.forEach(f,(w,E)=>s(w,E,u));return p.isPlainObject(e)||e instanceof this.constructor?a(e,n):p.isString(e)&&(e=e.trim())&&!Bu(e)?a(Ou(e),n):e!=null&&s(n,e,o),this}get(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);if(o){const r=this[o];if(!n)return r;if(n===!0)return Iu(r);if(p.isFunction(n))return n.call(this,r,o);if(p.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ut(e),e){const o=p.findKey(this,e);return!!(o&&this[o]!==void 0&&(!n||Zn(this,this[o],o,n)))}return!1}delete(e,n){const o=this;let r=!1;function s(a){if(a=Ut(a),a){const f=p.findKey(o,a);f&&(!n||Zn(o,o[f],f,n))&&(delete o[f],r=!0)}}return p.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||Zn(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,o={};return p.forEach(this,(r,s)=>{const a=p.findKey(o,s);if(a){n[a]=an(r),delete n[s];return}const f=e?Nu(s):String(s).trim();f!==s&&delete n[s],n[f]=an(r),o[f]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return p.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=e&&p.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(`
81
+ `)}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(a){const f=Ut(a);o[f]||(Fu(r,a),o[f]=!0)}return p.isArray(e)?e.forEach(s):s(e),this}}cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(cn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(o){this[n]=o}}}),p.freezeMethods(cn);const je=cn;function Qn(t,e){const n=this||Xn,o=e||n,r=je.from(o.headers);let s=o.data;return p.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 Dt(t,e,n){Y.call(this,t??"canceled",Y.ERR_CANCELED,e,n),this.name="CanceledError"}p.inherits(Dt,Y,{__CANCEL__:!0});function Uu(t,e,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?t(n):e(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Du=Me.hasStandardBrowserEnv?{write(t,e,n,o,r,s){const a=[t+"="+encodeURIComponent(e)];p.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),p.isString(o)&&a.push("path="+o),p.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.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 Mu(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $u(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Kr(t,e){return t&&!Mu(e)?$u(t,e):e}const Hu=Me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function r(s){let a=s;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{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(a){const f=p.isString(a)?r(a):a;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}();function ju(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Vu(t,e){t=t||10;const n=new Array(t),o=new Array(t);let r=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const w=Date.now(),E=o[s];a||(a=w),n[r]=u,o[r]=w;let b=s,X=0;for(;b!==r;)X+=n[b++],b=b%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),w-a<e)return;const M=E&&w-E;return M?Math.round(X*1e3/M):void 0}}function Gr(t,e){let n=0;const o=Vu(50,250);return r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,f=s-n,u=o(f),w=s<=a;n=s;const E={loaded:s,total:a,progress:a?s/a:void 0,bytes:f,rate:u||void 0,estimated:u&&a&&w?(a-s)/u:void 0,event:r};E[e?"download":"upload"]=!0,t(E)}}const eo={http:wu,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,o){let r=t.data;const s=je.from(t.headers).normalize();let{responseType:a,withXSRFToken:f}=t,u;function w(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let E;if(p.isFormData(r)){if(Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv)s.setContentType(!1);else if((E=s.getContentType())!==!1){const[N,...$]=E?E.split(";").map(ee=>ee.trim()).filter(Boolean):[];s.setContentType([N||"multipart/form-data",...$].join("; "))}}let b=new XMLHttpRequest;if(t.auth){const N=t.auth.username||"",$=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(N+":"+$))}const X=Kr(t.baseURL,t.url);b.open(t.method.toUpperCase(),$r(X,t.params,t.paramsSerializer),!0),b.timeout=t.timeout;function M(){if(!b)return;const N=je.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),ee={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:N,config:t,request:b};Uu(function(j){n(j),w()},function(j){o(j),w()},ee),b=null}if("onloadend"in b?b.onloadend=M:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(M)},b.onabort=function(){b&&(o(new Y("Request aborted",Y.ECONNABORTED,t,b)),b=null)},b.onerror=function(){o(new Y("Network Error",Y.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let $=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const ee=t.transitional||jr;t.timeoutErrorMessage&&($=t.timeoutErrorMessage),o(new Y($,ee.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,t,b)),b=null},Me.hasStandardBrowserEnv&&(f&&p.isFunction(f)&&(f=f(t)),f||f!==!1&&Hu(X))){const N=t.xsrfHeaderName&&t.xsrfCookieName&&Du.read(t.xsrfCookieName);N&&s.set(t.xsrfHeaderName,N)}r===void 0&&s.setContentType(null),"setRequestHeader"in b&&p.forEach(s.toJSON(),function($,ee){b.setRequestHeader(ee,$)}),p.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),a&&a!=="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 Dt(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=ju(X);if(B&&Me.protocols.indexOf(B)===-1){o(new Y("Unsupported protocol "+B+":",Y.ERR_BAD_REQUEST,t));return}b.send(r||null)})}};p.forEach(eo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Jr=t=>`- ${t}`,zu=t=>p.isFunction(t)||t===null||t===!1,Yr={getAdapter:t=>{t=p.isArray(t)?t:[t];const{length:e}=t;let n,o;const r={};for(let s=0;s<e;s++){n=t[s];let a;if(o=n,!zu(n)&&(o=eo[(a=String(n)).toLowerCase()],o===void 0))throw new Y(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+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 a=e?s.length>1?`since :
82
+ `+s.map(Jr).join(`
83
+ `):" "+Jr(s[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:eo};function to(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dt(null,t)}function Xr(t){return to(t),t.headers=je.from(t.headers),t.data=Qn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Yr.getAdapter(t.adapter||Xn.adapter)(t).then(function(o){return to(t),o.data=Qn.call(t,t.transformResponse,o),o.headers=je.from(o.headers),o},function(o){return qr(o)||(to(t),o&&o.response&&(o.response.data=Qn.call(t,t.transformResponse,o.response),o.response.headers=je.from(o.response.headers))),Promise.reject(o)})}const Zr=t=>t instanceof je?t.toJSON():t;function mt(t,e){e=e||{};const n={};function o(w,E,b){return p.isPlainObject(w)&&p.isPlainObject(E)?p.merge.call({caseless:b},w,E):p.isPlainObject(E)?p.merge({},E):p.isArray(E)?E.slice():E}function r(w,E,b){if(p.isUndefined(E)){if(!p.isUndefined(w))return o(void 0,w,b)}else return o(w,E,b)}function s(w,E){if(!p.isUndefined(E))return o(void 0,E)}function a(w,E){if(p.isUndefined(E)){if(!p.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:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:f,headers:(w,E)=>r(Zr(w),Zr(E),!0)};return p.forEach(Object.keys(Object.assign({},t,e)),function(E){const b=u[E]||r,X=b(t[E],e[E],E);p.isUndefined(X)&&b!==f||(n[E]=X)}),n}const Qr="1.6.5",no={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{no[t]=function(o){return typeof o===t||"a"+(e<1?"n ":" ")+t}});const es={};no.transitional=function(e,n,o){function r(s,a){return"[Axios v"+Qr+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,f)=>{if(e===!1)throw new Y(r(a," has been removed"+(n?" in "+n:"")),Y.ERR_DEPRECATED);return n&&!es[a]&&(es[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,f):!0}};function Wu(t,e,n){if(typeof t!="object")throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let r=o.length;for(;r-- >0;){const s=o[r],a=e[s];if(a){const f=t[s],u=f===void 0||a(f,s,t);if(u!==!0)throw new Y("option "+s+" must be "+u,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y("Unknown option "+s,Y.ERR_BAD_OPTION)}}const oo={assertOptions:Wu,validators:no},Ge=oo.validators;class ln{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=mt(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&oo.assertOptions(o,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),r!=null&&(p.isFunction(r)?n.paramsSerializer={serialize:r}:oo.assertOptions(r,{encode:Ge.function,serialize:Ge.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&p.merge(s.common,s[n.method]);s&&p.forEach(["delete","get","head","post","put","patch","common"],B=>{delete s[B]}),n.headers=je.concat(a,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,X;if(!u){const B=[Xr.bind(this),void 0];for(B.unshift.apply(B,f),B.push.apply(B,w),X=B.length,E=Promise.resolve(n);b<X;)E=E.then(B[b++],B[b++]);return E}X=f.length;let M=n;for(b=0;b<X;){const B=f[b++],N=f[b++];try{M=B(M)}catch($){N.call(this,$);break}}try{E=Xr.call(this,M)}catch(B){return Promise.reject(B)}for(b=0,X=w.length;b<X;)E=E.then(w[b++],w[b++]);return E}getUri(e){e=mt(this.defaults,e);const n=Kr(e.baseURL,e.url);return $r(n,e.params,e.paramsSerializer)}}p.forEach(["delete","get","head","options"],function(e){ln.prototype[e]=function(n,o){return this.request(mt(o||{},{method:e,url:n,data:(o||{}).data}))}}),p.forEach(["post","put","patch"],function(e){function n(o){return function(s,a,f){return this.request(mt(f||{},{method:e,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ln.prototype[e]=n(),ln.prototype[e+"Form"]=n(!0)});const un=ln;class ro{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 a=new Promise(f=>{o.subscribe(f),s=f}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},e(function(s,a,f){o.reason||(o.reason=new Dt(s,a,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 ro(function(r){e=r}),cancel:e}}}const qu=ro;function Ku(t){return function(n){return t.apply(null,n)}}function Gu(t){return p.isObject(t)&&t.isAxiosError===!0}const so={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(so).forEach(([t,e])=>{so[e]=t});const Ju=so;function ts(t){const e=new un(t),n=Sr(un.prototype.request,e);return p.extend(n,un.prototype,e,{allOwnKeys:!0}),p.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ts(mt(t,r))},n}const re=ts(Xn);re.Axios=un,re.CanceledError=Dt,re.CancelToken=qu,re.isCancel=qr,re.VERSION=Qr,re.toFormData=sn,re.AxiosError=Y,re.Cancel=re.CanceledError,re.all=function(e){return Promise.all(e)},re.spread=Ku,re.isAxiosError=Gu,re.mergeConfig=mt,re.AxiosHeaders=je,re.formToJSON=t=>zr(p.isHTMLForm(t)?new FormData(t):t),re.getAdapter=Yr.getAdapter,re.HttpStatusCode=Ju,re.default=re;const Yu=re;class ns{constructor(e){We(this,"keycloak");We(this,"axios");We(this,"fileName","silent-login.html");this.keycloak=e,this.axios=Yu.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 zn,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 zn,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,a=r.data.code,f=r.data.state,u=r.data.error;if(s!=="silent-login-iframe-result"||u==="login_required"||!a){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(a,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 Xu=t=>new ns(t);Hn.SetInitialTheme(),Q.AppResult=zn,Q.AxiosClient=ns,Q.Cor=Ht,Q.SfButton=mo,Q.SfContent=ml,Q.SfIcon=Et,Q.SfLayout=ul,Q.SfNavMenuLink=hl,Q.SfTabNavigation=kl,Q.Tamanho=rt,Q.UseAuthService=Ml,Q.UseAxiosClient=Xu,Q.UseDialogService=wr,Q.UseNavMenuService=pn,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
84
84
  //# sourceMappingURL=lib.umd.js.map