@luizleon/sf.prefeiturasp.vuecomponents 0.0.66 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sf.prefeiturasp.vuecomponents.cjs +423 -0
- package/dist/sf.prefeiturasp.vuecomponents.cjs.map +1 -0
- package/dist/sf.prefeiturasp.vuecomponents.js +8953 -0
- package/dist/sf.prefeiturasp.vuecomponents.js.map +1 -0
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs +423 -0
- package/dist/sf.prefeiturasp.vuecomponents.umd.cjs.map +1 -0
- package/dist/{axios → src/axios}/axiosClient.d.ts +7 -0
- package/dist/{components/button/Button.d.ts → src/components/button/Button.vue.d.ts} +16 -16
- package/dist/{components/content/Content.d.ts → src/components/content/Content.vue.d.ts} +7 -7
- package/dist/{components/drawer/Drawer.d.ts → src/components/drawer/Drawer.vue.d.ts} +15 -15
- package/dist/{components/icon/Icon.d.ts → src/components/icon/Icon.vue.d.ts} +23 -24
- package/dist/{components/internal/HeaderAvatar.d.ts → src/components/internal/HeaderAvatar.vue.d.ts} +2 -2
- package/dist/src/components/internal/LoadingCircle.vue.d.ts +2 -0
- package/dist/src/components/internal/MenuIcon.vue.d.ts +2 -0
- package/dist/src/components/internal/ScrollToTop.vue.d.ts +2 -0
- package/dist/src/components/internal/ThemeToggle.d.ts +10 -0
- package/dist/src/components/internal/ThemeToggle.vue.d.ts +2 -0
- package/dist/{components/layout/Layout.d.ts → src/components/layout/Layout.vue.d.ts} +9 -2
- package/dist/{components/message/Message.d.ts → src/components/message/Message.vue.d.ts} +14 -14
- package/dist/src/components/navmenu/NavMenu.vue.d.ts +15 -0
- package/dist/{components/tabnavigation/TabNavigation.d.ts → src/components/tabnavigation/TabNavigation.vue.d.ts} +9 -9
- package/dist/{components/tooltip/Tooltip.d.ts → src/components/tooltip/Tooltip.vue.d.ts} +7 -7
- package/dist/src/index.d.ts +17 -0
- package/dist/{types → src/types}/index.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +10 -9
- package/src/axios/axiosClient.ts +111 -3
- package/src/components/button/Button.vue +1 -1
- package/src/components/icon/Icon.vue +12 -16
- package/src/components/internal/getMaxZindex.ts +3 -2
- package/src/components/layout/Layout.vue +8 -1
- package/src/components/navmenu/NavMenu.vue +109 -0
- package/src/index.ts +2 -4
- package/src/keycloak.js +1485 -1890
- package/src/services/authService.ts +13 -4
- package/src/style/componentes.scss +5 -1
- package/src/style/src/_functions.scss +17 -2
- package/src/style/src/_mixins.scss +51 -29
- package/src/style/src/_variables.scss +11 -0
- package/src/style/src/components/_button.scss +8 -11
- package/src/style/src/components/_icon.scss +49 -47
- package/src/style/src/components/_tooltip.scss +6 -7
- package/src/types/index.ts +24 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +5 -3
- package/vite.config.js +2 -4
- package/dist/components/internal/LoadingCircle.d.ts +0 -2
- package/dist/components/internal/MenuIcon.d.ts +0 -2
- package/dist/components/internal/ScrollToTop.d.ts +0 -2
- package/dist/components/internal/ThemeToggle.d.ts +0 -2
- package/dist/components/navmenulink/NavMenuLink.d.ts +0 -18
- package/dist/components/panelmenu/PanelMenu.d.ts +0 -16
- package/dist/index.d.ts +0 -18
- package/dist/keycloak.d.ts +0 -671
- package/dist/sf.prefeiturasp.vuecomponents.es.js +0 -8685
- package/dist/sf.prefeiturasp.vuecomponents.es.js.map +0 -1
- package/dist/sf.prefeiturasp.vuecomponents.umd.js +0 -153
- package/dist/sf.prefeiturasp.vuecomponents.umd.js.map +0 -1
- package/src/components/button/Button.d.ts +0 -26
- package/src/components/content/Content.d.ts +0 -28
- package/src/components/drawer/Drawer.d.ts +0 -50
- package/src/components/icon/Icon.d.ts +0 -23
- package/src/components/layout/Layout.d.ts +0 -44
- package/src/components/message/Message.d.ts +0 -28
- package/src/components/navmenulink/NavMenuLink.d.ts +0 -29
- package/src/components/navmenulink/NavMenuLink.vue +0 -49
- package/src/components/panelmenu/PanelMenu.d.ts +0 -26
- package/src/components/panelmenu/PanelMenu.vue +0 -101
- package/src/components/tabnavigation/TabNavigation.d.ts +0 -34
- package/src/components/tooltip/Tooltip.d.ts +0 -23
- package/src/ts-helpers.d.ts +0 -57
- /package/dist/{common → src/common}/appResult.d.ts +0 -0
- /package/dist/{components → src/components}/internal/cssClassBuilder.d.ts +0 -0
- /package/dist/{components → src/components}/internal/getMaxZindex.d.ts +0 -0
- /package/dist/{services → src/services}/authService.d.ts +0 -0
- /package/dist/{services → src/services}/dialogService.d.ts +0 -0
- /package/dist/{services → src/services}/navMenuService.d.ts +0 -0
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
(function(j,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],a):(j=typeof globalThis<"u"?globalThis:j||self,a((j.sf=j.sf||{},j.sf.prefeiturasp=j.sf.prefeiturasp||{},j.sf.prefeiturasp.vuecomponents={}),j.Vue,j.VueRouter))})(this,function(j,a,Ye){"use strict";var jm=Object.defineProperty;var Vm=(j,a,Ye)=>a in j?jm(j,a,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):j[a]=Ye;var xe=(j,a,Ye)=>(Vm(j,typeof a!="symbol"?a+"":a,Ye),Ye);class Cs{constructor(){xe(this,"_visible",a.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 As=new Cs,Tn=()=>As;class je{constructor(e){xe(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 Hr(t=[]){let e="body *:not(style)";for(const n of t)e+=`, ${n}`;return Math.max(...Array.from(document.querySelectorAll(e)).map(n=>{const r=getComputedStyle(n).zIndex;return+r==+r?+r:0}))}let ks=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const xn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},_s={},Is={class:"sf-loading-circle"};function Ps(t,e){return a.openBlock(),a.createElementBlock("div",Is,e[0]||(e[0]=[a.createElementVNode("div",null,[a.createElementVNode("svg",{viewBox:"25 25 50 50"},[a.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})])],-1)]))}const Ts=xn(_s,[["render",Ps]]),On=a.defineComponent({__name:"Tooltip",props:{text:{}},setup(t){const e=t;class n{constructor(){xe(this,"zIndex");xe(this,"wrapper");xe(this,"inner");this.zIndex=Hr()+1,this.Render()}Render(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("sf-tooltip-wrapper"),this.wrapper.style.zIndex=`${this.zIndex??0}`,this.inner=document.createElement("div"),this.inner.classList.add("sf-tooltip-inner"),this.wrapper.appendChild(this.inner)}Show(i){this.inner.textContent=e.text;const s=i.target;document.body.appendChild(this.wrapper),this.Position(s.getBoundingClientRect()),this.wrapper.classList.add("visible")}Hide(){this.wrapper.classList.remove("visible"),this.wrapper.remove()}Position(i){const l=i.top,c=i.bottom,u=i.left,f=i.right,m=i.width/2-15,y=this.wrapper;y.style.top=`${c+10}px`,y.style.left=`${u}px`,y.style.marginLeft=`${m}px`,this.OutOfBottom()&&(y.style.top=`${l-y.clientHeight-10}px`,y.classList.add("top")),this.OutOfRight()&&(y.style.left=`${f-y.clientWidth}px`,y.style.marginLeft=`-${m}px`,y.classList.add("left"))}OutOfBottom(){return this.wrapper.getBoundingClientRect().bottom>(window.innerHeight||document.documentElement.clientHeight)}OutOfRight(){return this.wrapper.getBoundingClientRect().right>(window.innerWidth||document.documentElement.clientWidth)}}const r=new n;return a.onBeforeUnmount(()=>{r.Hide()}),(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:"sf-tooltip-anchor",onMouseenter:i[0]||(i[0]=(...s)=>a.unref(r).Show&&a.unref(r).Show(...s)),onMouseleave:i[1]||(i[1]=(...s)=>a.unref(r).Hide&&a.unref(r).Hide(...s)),onMousedown:i[2]||(i[2]=(...s)=>a.unref(r).Hide&&a.unref(r).Hide(...s))},[a.renderSlot(o.$slots,"default")],32))}}),xs=["disabled","tabindex"],Os=["data-color"],Ve=xn(a.defineComponent({__name:"Icon",props:{icon:{},visible:{type:Boolean,default:!0},class:{default:""},style:{type:[Boolean,null,String,Object,Array],default:""},disabled:{type:Boolean},loading:{type:Boolean},button:{type:Boolean},size:{default:"md"},dot:{type:Boolean},dotColor:{default:"error"},filled:{type:Boolean},buttonProps:{},tooltip:{}},setup(t){const e=t,n=a.computed(()=>e.tooltip?On:"div"),r=a.computed(()=>e.tooltip?"":"display-content"),o=a.computed(()=>new je(`${e.class} sf-icon`).AddClass("sf-component-loading",e.loading).AddClass("sf-component-disabled",e.disabled).AddClass("sf-icon-button",e.button).AddClass("sf-icon-small",e.size==="sm").AddClass("sf-icon-medium",e.size==="md").AddClass("sf-icon-large",e.size==="lg").AddClass("sf-ripple",e.button===!0).Build());return(i,s)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.value),{text:e.tooltip,class:a.normalizeClass(r.value)},{default:a.withCtx(()=>[e.visible?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle(e.style),class:a.normalizeClass(o.value)},[a.createElementVNode("button",a.mergeProps({class:["material-symbols-outlined",{"icon-filled":!!e.filled}],disabled:e.disabled||e.loading},e.buttonProps,{tabindex:e.button?void 0:-1}),[e.loading?(a.openBlock(),a.createBlock(Ts,{key:0})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(e.icon),1)],64))],16,xs),e.dot?(a.openBlock(),a.createElementBlock("span",{key:0,"data-color":e.dotColor},null,8,Os)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0)]),_:1},8,["text","class"]))}}),[["__scopeId","data-v-5de5e7b2"]]),Ls=["id"],Bs={class:"sf-drawer-header"},Rs={class:"sf-drawer-title"},$s={class:"sf-drawer-content"},Ns={key:0,class:"sf-drawer-footer"},Fr=a.defineComponent({__name:"Drawer",props:{visible:{type:Boolean,default:!1},position:{default:"left"},style:{type:[Boolean,null,String,Object,Array]}},emits:["update:visible","open","before-close"],setup(t,{emit:e}){const n=t,r=e,o=a.useSlots(),i=a.ref(n.visible),s=a.ref(!1),l=a.ref(0),c=ks();function u(){i.value=!1}function f(S){(S.key==="Escape"||S.code==="Escape")&&u()}function m(){r("open"),window.document.addEventListener("keydown",f,!0)}function y(S){l.value=Hr(),S.style.zIndex=`${l.value}`}function E(S){var B;r("before-close"),(B=S==null?void 0:S.parentElement)==null||B.classList.add("sf-mask-overlay-leave")}function C(){window.document.removeEventListener("keydown",f,!0),s.value=!1}function k(){return new je("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 a.watch(()=>n.visible,S=>{i.value=S}),a.watch(()=>i.value,S=>{r("update:visible",S),S&&(s.value=!0)}),(S,B)=>(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[s.value?(a.openBlock(),a.createElementBlock("div",{key:0,id:a.unref(c),class:a.normalizeClass(k()),style:a.normalizeStyle({zIndex:l.value-1}),onClick:a.withModifiers(u,["stop"])},[a.createVNode(a.Transition,{name:"sf-drawer",appear:"",onBeforeEnter:y,onEnter:m,onBeforeLeave:E,onAfterLeave:C},{default:a.withCtx(()=>[i.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["sf-drawer",{"sf-drawer-with-footer":!!a.unref(o).footer}]),style:a.normalizeStyle(n.style),role:"dialog",onClick:B[0]||(B[0]=a.withModifiers(D=>S.void,["stop"]))},[a.createElementVNode("div",Bs,[a.createElementVNode("span",Rs,[a.renderSlot(S.$slots,"title")]),a.createVNode(Ve,{button:!0,icon:"close",onClick:a.withModifiers(u,["stop"])})]),a.createElementVNode("div",$s,[a.renderSlot(S.$slots,"default")]),a.unref(o).footer?(a.openBlock(),a.createElementBlock("div",Ns,[a.renderSlot(S.$slots,"footer")])):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0)]),_:3})],14,Ls)):a.createCommentVNode("",!0)]))}}),Ds=["id","name","disabled","data-color","form","type"],Ms={class:"sf-button-label"},jr=a.defineComponent({__name:"Button",props:{icon:{},visible:{type:Boolean,default:!0},class:{},style:{type:[Boolean,null,String,Object,Array]},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 je(`${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(r,o)=>e.visible?(a.openBlock(),a.createElementBlock("button",{key:0,id:e.id,name:e.name,class:a.normalizeClass(n()),style:a.normalizeStyle(e.style),disabled:e.disabled||e.loading,"data-color":e.color,form:e.form,type:e.type},[e.icon?(a.openBlock(),a.createBlock(Ve,{key:0,filled:e.variant==="filled",icon:e.icon,loading:e.loading,size:e.size,"button-props":{tabindex:-1}},null,8,["filled","icon","loading","size"])):e.loading?(a.openBlock(),a.createBlock(Ve,{key:1,loading:!0,size:e.size,"button-props":{tabindex:-1}},null,8,["size"])):a.createCommentVNode("",!0),a.createElementVNode("span",Ms,[a.renderSlot(r.$slots,"default")])],14,Ds)):a.createCommentVNode("",!0)}}),Vr="SweetAlert2:",Us=t=>{const e=[];for(let n=0;n<t.length;n++)e.indexOf(t[n])===-1&&e.push(t[n]);return e},Ln=t=>t.charAt(0).toUpperCase()+t.slice(1),ge=t=>Array.prototype.slice.call(t),de=t=>{console.warn(`${Vr} ${typeof t=="object"?t.join(" "):t}`)},Je=t=>{console.error(`${Vr} ${t}`)},Kr=[],Hs=t=>{Kr.includes(t)||(Kr.push(t),de(t))},Fs=(t,e)=>{Hs(`"${t}" is deprecated and will be removed in the next major release. Please use "${e}" instead.`)},on=t=>typeof t=="function"?t():t,Bn=t=>t&&typeof t.toPromise=="function",At=t=>Bn(t)?t.toPromise():Promise.resolve(t),Rn=t=>t&&Promise.resolve(t)===t,ct={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:"×",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={},Ks=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Wr=t=>Object.prototype.hasOwnProperty.call(ct,t),zr=t=>js.indexOf(t)!==-1,$n=t=>Vs[t],Ws=t=>{Wr(t)||de(`Unknown parameter "${t}"`)},zs=t=>{Ks.includes(t)&&de(`The parameter "${t}" is incompatible with toasts`)},qs=t=>{$n(t)&&Fs(t,$n(t))},Gs=t=>{!t.backdrop&&t.allowOutsideClick&&de('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const e in t)Ws(e),t.toast&&zs(e),qs(e)},Ys="swal2-",qr=t=>{const e={};for(const n in t)e[t[n]]=Ys+t[n];return e},g=qr(["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"]),kt=qr(["success","warning","info","question","error"]),oe=()=>document.body.querySelector(`.${g.container}`),_t=t=>{const e=oe();return e?e.querySelector(t):null},Ee=t=>_t(`.${t}`),Y=()=>Ee(g.popup),It=()=>Ee(g.icon),Gr=()=>Ee(g.title),sn=()=>Ee(g["html-container"]),Yr=()=>Ee(g.image),Jr=()=>Ee(g["progress-steps"]),an=()=>Ee(g["validation-message"]),Ie=()=>_t(`.${g.actions} .${g.confirm}`),Ke=()=>_t(`.${g.actions} .${g.deny}`),Js=()=>Ee(g["input-label"]),ut=()=>_t(`.${g.loader}`),Xe=()=>_t(`.${g.actions} .${g.cancel}`),Pt=()=>Ee(g.actions),Xr=()=>Ee(g.footer),ln=()=>Ee(g["timer-progress-bar"]),Nn=()=>Ee(g.close),Xs=`
|
|
2
|
-
a[href],
|
|
3
|
-
area[href],
|
|
4
|
-
input:not([disabled]),
|
|
5
|
-
select:not([disabled]),
|
|
6
|
-
textarea:not([disabled]),
|
|
7
|
-
button:not([disabled]),
|
|
8
|
-
iframe,
|
|
9
|
-
object,
|
|
10
|
-
embed,
|
|
11
|
-
[tabindex="0"],
|
|
12
|
-
[contenteditable],
|
|
13
|
-
audio[controls],
|
|
14
|
-
video[controls],
|
|
15
|
-
summary
|
|
16
|
-
`,Dn=()=>{const t=ge(Y().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((n,r)=>{const o=parseInt(n.getAttribute("tabindex")),i=parseInt(r.getAttribute("tabindex"));return o>i?1:o<i?-1:0}),e=ge(Y().querySelectorAll(Xs)).filter(n=>n.getAttribute("tabindex")!=="-1");return Us(t.concat(e)).filter(n=>ye(n))},Mn=()=>De(document.body,g.shown)&&!De(document.body,g["toast-shown"])&&!De(document.body,g["no-backdrop"]),cn=()=>Y()&&De(Y(),g.toast),Zs=()=>Y().hasAttribute("data-loading"),dt={previousBodyPadding:null},ie=(t,e)=>{if(t.textContent="",e){const r=new DOMParser().parseFromString(e,"text/html");ge(r.querySelector("head").childNodes).forEach(o=>{t.appendChild(o)}),ge(r.querySelector("body").childNodes).forEach(o=>{t.appendChild(o)})}},De=(t,e)=>{if(!e)return!1;const n=e.split(/\s+/);for(let r=0;r<n.length;r++)if(!t.classList.contains(n[r]))return!1;return!0},Qs=(t,e)=>{ge(t.classList).forEach(n=>{!Object.values(g).includes(n)&&!Object.values(kt).includes(n)&&!Object.values(e.showClass).includes(n)&&t.classList.remove(n)})},Se=(t,e,n)=>{if(Qs(t,e),e.customClass&&e.customClass[n]){if(typeof e.customClass[n]!="string"&&!e.customClass[n].forEach)return de(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof e.customClass[n]}"`);K(t,e.customClass[n])}},Un=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${g.popup} > .${g[e]}`);case"checkbox":return t.querySelector(`.${g.popup} > .${g.checkbox} input`);case"radio":return t.querySelector(`.${g.popup} > .${g.radio} input:checked`)||t.querySelector(`.${g.popup} > .${g.radio} input:first-child`);case"range":return t.querySelector(`.${g.popup} > .${g.range} input`);default:return t.querySelector(`.${g.popup} > .${g.input}`)}},Zr=t=>{if(t.focus(),t.type!=="file"){const e=t.value;t.value="",t.value=e}},Qr=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(r=>{Array.isArray(t)?t.forEach(o=>{n?o.classList.add(r):o.classList.remove(r)}):n?t.classList.add(r):t.classList.remove(r)}))},K=(t,e)=>{Qr(t,e,!0)},Oe=(t,e)=>{Qr(t,e,!1)},We=(t,e)=>{const n=ge(t.childNodes);for(let r=0;r<n.length;r++)if(De(n[r],e))return n[r]},Tt=(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)},ne=(t,e="flex")=>{t.style.display=e},se=t=>{t.style.display="none"},eo=(t,e,n,r)=>{const o=t.querySelector(e);o&&(o.style[n]=r)},un=(t,e,n)=>{e?ne(t,n):se(t)},ye=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),ea=()=>!ye(Ie())&&!ye(Ke())&&!ye(Xe()),to=t=>t.scrollHeight>t.clientHeight,no=t=>{const e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),r=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||r>0},Hn=(t,e=!1)=>{const n=ln();ye(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},ta=()=>{const t=ln(),e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";const n=parseInt(window.getComputedStyle(t).width),r=e/n*100;t.style.removeProperty("transition"),t.style.width=`${r}%`},ro=()=>typeof window>"u"||typeof document>"u",na=100,M={},ra=()=>{M.previousActiveElement&&M.previousActiveElement.focus?(M.previousActiveElement.focus(),M.previousActiveElement=null):document.body&&document.body.focus()},oa=t=>new Promise(e=>{if(!t)return e();const n=window.scrollX,r=window.scrollY;M.restoreFocusTimeout=setTimeout(()=>{ra(),e()},na),window.scrollTo(n,r)}),ia=`
|
|
17
|
-
<div aria-labelledby="${g.title}" aria-describedby="${g["html-container"]}" class="${g.popup}" tabindex="-1">
|
|
18
|
-
<button type="button" class="${g.close}"></button>
|
|
19
|
-
<ul class="${g["progress-steps"]}"></ul>
|
|
20
|
-
<div class="${g.icon}"></div>
|
|
21
|
-
<img class="${g.image}" />
|
|
22
|
-
<h2 class="${g.title}" id="${g.title}"></h2>
|
|
23
|
-
<div class="${g["html-container"]}" id="${g["html-container"]}"></div>
|
|
24
|
-
<input class="${g.input}" />
|
|
25
|
-
<input type="file" class="${g.file}" />
|
|
26
|
-
<div class="${g.range}">
|
|
27
|
-
<input type="range" />
|
|
28
|
-
<output></output>
|
|
29
|
-
</div>
|
|
30
|
-
<select class="${g.select}"></select>
|
|
31
|
-
<div class="${g.radio}"></div>
|
|
32
|
-
<label for="${g.checkbox}" class="${g.checkbox}">
|
|
33
|
-
<input type="checkbox" />
|
|
34
|
-
<span class="${g.label}"></span>
|
|
35
|
-
</label>
|
|
36
|
-
<textarea class="${g.textarea}"></textarea>
|
|
37
|
-
<div class="${g["validation-message"]}" id="${g["validation-message"]}"></div>
|
|
38
|
-
<div class="${g.actions}">
|
|
39
|
-
<div class="${g.loader}"></div>
|
|
40
|
-
<button type="button" class="${g.confirm}"></button>
|
|
41
|
-
<button type="button" class="${g.deny}"></button>
|
|
42
|
-
<button type="button" class="${g.cancel}"></button>
|
|
43
|
-
</div>
|
|
44
|
-
<div class="${g.footer}"></div>
|
|
45
|
-
<div class="${g["timer-progress-bar-container"]}">
|
|
46
|
-
<div class="${g["timer-progress-bar"]}"></div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
`.replace(/(^|\n)\s*/g,""),sa=()=>{const t=oe();return t?(t.remove(),Oe([document.documentElement,document.body],[g["no-backdrop"],g["toast-shown"],g["has-column"]]),!0):!1},Ze=()=>{M.currentInstance.resetValidationMessage()},aa=()=>{const t=Y(),e=We(t,g.input),n=We(t,g.file),r=t.querySelector(`.${g.range} input`),o=t.querySelector(`.${g.range} output`),i=We(t,g.select),s=t.querySelector(`.${g.checkbox} input`),l=We(t,g.textarea);e.oninput=Ze,n.onchange=Ze,i.onchange=Ze,s.onchange=Ze,l.oninput=Ze,r.oninput=()=>{Ze(),o.value=r.value},r.onchange=()=>{Ze(),r.nextSibling.value=r.value}},la=t=>typeof t=="string"?document.querySelector(t):t,ca=t=>{const e=Y();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},ua=t=>{window.getComputedStyle(t).direction==="rtl"&&K(oe(),g.rtl)},da=t=>{const e=sa();if(ro()){Je("SweetAlert2 requires document to initialize");return}const n=document.createElement("div");n.className=g.container,e&&K(n,g["no-transition"]),ie(n,ia);const r=la(t.target);r.appendChild(n),ca(t),ua(r),aa()},Fn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?fa(t,e):t&&ie(e,t)},fa=(t,e)=>{t.jquery?ma(e,t):ie(e,t.toString())},ma=(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))},xt=(()=>{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})(),pa=()=>{const t=document.createElement("div");t.className=g["scrollbar-measure"],document.body.appendChild(t);const e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},ha=(t,e)=>{const n=Pt(),r=ut();!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?se(n):ne(n),Se(n,e,"actions"),ga(n,r,e),ie(r,e.loaderHtml),Se(r,e,"loader")};function ga(t,e,n){const r=Ie(),o=Ke(),i=Xe();jn(r,"confirm",n),jn(o,"deny",n),jn(i,"cancel",n),ya(r,o,i,n),n.reverseButtons&&(n.toast?(t.insertBefore(i,r),t.insertBefore(o,r)):(t.insertBefore(i,e),t.insertBefore(o,e),t.insertBefore(r,e)))}function ya(t,e,n,r){if(!r.buttonsStyling)return Oe([t,e,n],g.styled);K([t,e,n],g.styled),r.confirmButtonColor&&(t.style.backgroundColor=r.confirmButtonColor,K(t,g["default-outline"])),r.denyButtonColor&&(e.style.backgroundColor=r.denyButtonColor,K(e,g["default-outline"])),r.cancelButtonColor&&(n.style.backgroundColor=r.cancelButtonColor,K(n,g["default-outline"]))}function jn(t,e,n){un(t,n[`show${Ln(e)}Button`],"inline-block"),ie(t,n[`${e}ButtonText`]),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]),t.className=g[e],Se(t,n,`${e}Button`),K(t,n[`${e}ButtonClass`])}function ba(t,e){typeof e=="string"?t.style.background=e:e||K([document.documentElement,document.body],g["no-backdrop"])}function va(t,e){e in g?K(t,g[e]):(de('The "position" parameter is not valid, defaulting to "center"'),K(t,g.center))}function wa(t,e){if(e&&typeof e=="string"){const n=`grow-${e}`;n in g&&K(t,g[n])}}const Ea=(t,e)=>{const n=oe();n&&(ba(n,e.backdrop),va(n,e.position),wa(n,e.grow),Se(n,e,"container"))},U={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Sa=["input","file","range","select","radio","checkbox","textarea"],Ca=(t,e)=>{const n=Y(),r=U.innerParams.get(t),o=!r||e.input!==r.input;Sa.forEach(i=>{const s=g[i],l=We(n,s);_a(i,e.inputAttributes),l.className=s,o&&se(l)}),e.input&&(o&&Aa(e),Ia(e))},Aa=t=>{if(!fe[t.input])return Je(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${t.input}"`);const e=oo(t.input),n=fe[t.input](e,t);ne(n),setTimeout(()=>{Zr(n)})},ka=t=>{for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;["type","value","style"].includes(n)||t.removeAttribute(n)}},_a=(t,e)=>{const n=Un(Y(),t);if(n){ka(n);for(const r in e)n.setAttribute(r,e[r])}},Ia=t=>{const e=oo(t.input);t.customClass&&K(e,t.customClass.input)},Vn=(t,e)=>{(!t.placeholder||e.inputPlaceholder)&&(t.placeholder=e.inputPlaceholder)},Ot=(t,e,n)=>{if(n.inputLabel){t.id=g.input;const r=document.createElement("label"),o=g["input-label"];r.setAttribute("for",t.id),r.className=o,K(r,n.customClass.inputLabel),r.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",r)}},oo=t=>{const e=g[t]?g[t]:g.input;return We(Y(),e)},fe={};fe.text=fe.email=fe.password=fe.number=fe.tel=fe.url=(t,e)=>(typeof e.inputValue=="string"||typeof e.inputValue=="number"?t.value=e.inputValue:Rn(e.inputValue)||de(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e.inputValue}"`),Ot(t,t,e),Vn(t,e),t.type=e.input,t),fe.file=(t,e)=>(Ot(t,t,e),Vn(t,e),t),fe.range=(t,e)=>{const n=t.querySelector("input"),r=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,r.value=e.inputValue,Ot(n,t,e),t},fe.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){const n=document.createElement("option");ie(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return Ot(t,t,e),t},fe.radio=t=>(t.textContent="",t),fe.checkbox=(t,e)=>{const n=Un(Y(),"checkbox");n.value="1",n.id=g.checkbox,n.checked=!!e.inputValue;const r=t.querySelector("span");return ie(r,e.inputPlaceholder),t},fe.textarea=(t,e)=>{t.value=e.inputValue,Vn(t,e),Ot(t,t,e);const n=r=>parseInt(window.getComputedStyle(r).marginLeft)+parseInt(window.getComputedStyle(r).marginRight);return setTimeout(()=>{if("MutationObserver"in window){const r=parseInt(window.getComputedStyle(Y()).width),o=()=>{const i=t.offsetWidth+n(t);i>r?Y().style.width=`${i}px`:Y().style.width=null};new MutationObserver(o).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};const Pa=(t,e)=>{const n=sn();Se(n,e,"htmlContainer"),e.html?(Fn(e.html,n),ne(n,"block")):e.text?(n.textContent=e.text,ne(n,"block")):se(n),Ca(t,e)},Ta=(t,e)=>{const n=Xr();un(n,e.footer),e.footer&&Fn(e.footer,n),Se(n,e,"footer")},xa=(t,e)=>{const n=Nn();ie(n,e.closeButtonHtml),Se(n,e,"closeButton"),un(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel)},Oa=(t,e)=>{const n=U.innerParams.get(t),r=It();if(n&&e.icon===n.icon){so(r,e),io(r,e);return}if(!e.icon&&!e.iconHtml)return se(r);if(e.icon&&Object.keys(kt).indexOf(e.icon)===-1)return Je(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),se(r);ne(r),so(r,e),io(r,e),K(r,e.showClass.icon)},io=(t,e)=>{for(const n in kt)e.icon!==n&&Oe(t,kt[n]);K(t,kt[e.icon]),$a(t,e),La(),Se(t,e,"icon")},La=()=>{const t=Y(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let r=0;r<n.length;r++)n[r].style.backgroundColor=e},Ba=`
|
|
50
|
-
<div class="swal2-success-circular-line-left"></div>
|
|
51
|
-
<span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
|
|
52
|
-
<div class="swal2-success-ring"></div> <div class="swal2-success-fix"></div>
|
|
53
|
-
<div class="swal2-success-circular-line-right"></div>
|
|
54
|
-
`,Ra=`
|
|
55
|
-
<span class="swal2-x-mark">
|
|
56
|
-
<span class="swal2-x-mark-line-left"></span>
|
|
57
|
-
<span class="swal2-x-mark-line-right"></span>
|
|
58
|
-
</span>
|
|
59
|
-
`,so=(t,e)=>{t.textContent="",e.iconHtml?ie(t,ao(e.iconHtml)):e.icon==="success"?ie(t,Ba):e.icon==="error"?ie(t,Ra):ie(t,ao({question:"?",warning:"!",info:"i"}[e.icon]))},$a=(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"])eo(t,n,"backgroundColor",e.iconColor);eo(t,".swal2-success-ring","borderColor",e.iconColor)}},ao=t=>`<div class="${g["icon-content"]}">${t}</div>`,Na=(t,e)=>{const n=Yr();if(!e.imageUrl)return se(n);ne(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt),Tt(n,"width",e.imageWidth),Tt(n,"height",e.imageHeight),n.className=g.image,Se(n,e,"image")},Da=t=>{const e=document.createElement("li");return K(e,g["progress-step"]),ie(e,t),e},Ma=t=>{const e=document.createElement("li");return K(e,g["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e},Ua=(t,e)=>{const n=Jr();if(!e.progressSteps||e.progressSteps.length===0)return se(n);ne(n),n.textContent="",e.currentProgressStep>=e.progressSteps.length&&de("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((r,o)=>{const i=Da(r);if(n.appendChild(i),o===e.currentProgressStep&&K(i,g["active-progress-step"]),o!==e.progressSteps.length-1){const s=Ma(e);n.appendChild(s)}})},Ha=(t,e)=>{const n=Gr();un(n,e.title||e.titleText,"block"),e.title&&Fn(e.title,n),e.titleText&&(n.innerText=e.titleText),Se(n,e,"title")},Fa=(t,e)=>{const n=oe(),r=Y();e.toast?(Tt(n,"width",e.width),r.style.width="100%",r.insertBefore(ut(),It())):Tt(r,"width",e.width),Tt(r,"padding",e.padding),e.color&&(r.style.color=e.color),e.background&&(r.style.background=e.background),se(an()),ja(r,e)},ja=(t,e)=>{t.className=`${g.popup} ${ye(t)?e.showClass.popup:""}`,e.toast?(K([document.documentElement,document.body],g["toast-shown"]),K(t,g.toast)):K(t,g.modal),Se(t,e,"popup"),typeof e.customClass=="string"&&K(t,e.customClass),e.icon&&K(t,g[`icon-${e.icon}`])},lo=(t,e)=>{Fa(t,e),Ea(t,e),Ua(t,e),Oa(t,e),Na(t,e),Ha(t,e),xa(t,e),Pa(t,e),ha(t,e),Ta(t,e),typeof e.didRender=="function"&&e.didRender(Y())},ft=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Va=()=>{ge(document.body.children).forEach(e=>{e===oe()||e.contains(oe())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})},co=()=>{ge(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"],Ka=t=>{const e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};const n=e.content;return Xa(n),Object.assign(Wa(n),za(n),qa(n),Ga(n),Ya(n),Ja(n,uo))},Wa=t=>{const e={};return ge(t.querySelectorAll("swal-param")).forEach(n=>{Qe(n,["name","value"]);const r=n.getAttribute("name"),o=n.getAttribute("value");typeof ct[r]=="boolean"&&o==="false"&&(e[r]=!1),typeof ct[r]=="object"&&(e[r]=JSON.parse(o))}),e},za=t=>{const e={};return ge(t.querySelectorAll("swal-button")).forEach(n=>{Qe(n,["type","color","aria-label"]);const r=n.getAttribute("type");e[`${r}ButtonText`]=n.innerHTML,e[`show${Ln(r)}Button`]=!0,n.hasAttribute("color")&&(e[`${r}ButtonColor`]=n.getAttribute("color")),n.hasAttribute("aria-label")&&(e[`${r}ButtonAriaLabel`]=n.getAttribute("aria-label"))}),e},qa=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},Ga=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},Ya=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 r=t.querySelectorAll("swal-input-option");return r.length&&(e.inputOptions={},ge(r).forEach(o=>{Qe(o,["value"]);const i=o.getAttribute("value"),s=o.innerHTML;e.inputOptions[i]=s})),e},Ja=(t,e)=>{const n={};for(const r in e){const o=e[r],i=t.querySelector(o);i&&(Qe(i,[]),n[o.replace(/^swal-/,"")]=i.innerHTML.trim())}return n},Xa=t=>{const e=uo.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);ge(t.children).forEach(n=>{const r=n.tagName.toLowerCase();e.indexOf(r)===-1&&de(`Unrecognized element <${r}>`)})},Qe=(t,e)=>{ge(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&de([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},fo={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 Za(t){t.inputValidator||Object.keys(fo).forEach(e=>{t.input===e&&(t.inputValidator=fo[e])})}function Qa(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(de('Target parameter is not valid, defaulting to "body"'),t.target="body")}function el(t){Za(t),t.showLoaderOnConfirm&&!t.preConfirm&&de(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
60
|
-
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
61
|
-
https://sweetalert2.github.io/#ajax-request`),Qa(t),typeof t.title=="string"&&(t.title=t.title.split(`
|
|
62
|
-
`).join("<br />")),da(t)}class tl{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 nl=()=>{dt.previousBodyPadding===null&&document.body.scrollHeight>window.innerHeight&&(dt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${dt.previousBodyPadding+pa()}px`)},rl=()=>{dt.previousBodyPadding!==null&&(document.body.style.paddingRight=`${dt.previousBodyPadding}px`,dt.previousBodyPadding=null)},ol=()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!De(document.body,g.iosfix)){const e=document.body.scrollTop;document.body.style.top=`${e*-1}px`,K(document.body,g.iosfix),sl(),il()}},il=()=>{const t=navigator.userAgent,e=!!t.match(/iPad/i)||!!t.match(/iPhone/i),n=!!t.match(/WebKit/i);e&&n&&!t.match(/CriOS/i)&&Y().scrollHeight>window.innerHeight-44&&(oe().style.paddingBottom="44px")},sl=()=>{const t=oe();let e;t.ontouchstart=n=>{e=al(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},al=t=>{const e=t.target,n=oe();return ll(t)||cl(t)?!1:e===n||!to(n)&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(to(sn())&&sn().contains(e))},ll=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",cl=t=>t.touches&&t.touches.length>1,ul=()=>{if(De(document.body,g.iosfix)){const t=parseInt(document.body.style.top,10);Oe(document.body,g.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},mo=10,dl=t=>{const e=oe(),n=Y();typeof t.willOpen=="function"&&t.willOpen(n);const o=window.getComputedStyle(document.body).overflowY;pl(e,n,t),setTimeout(()=>{fl(e,n)},mo),Mn()&&(ml(e,t.scrollbarPadding,o),Va()),!cn()&&!M.previousActiveElement&&(M.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),Oe(e,g["no-transition"])},po=t=>{const e=Y();if(t.target!==e)return;const n=oe();e.removeEventListener(xt,po),n.style.overflowY="auto"},fl=(t,e)=>{xt&&no(e)?(t.style.overflowY="hidden",e.addEventListener(xt,po)):t.style.overflowY="auto"},ml=(t,e,n)=>{ol(),e&&n!=="hidden"&&nl(),setTimeout(()=>{t.scrollTop=0})},pl=(t,e,n)=>{K(t,n.showClass.backdrop),e.style.setProperty("opacity","0","important"),ne(e,"grid"),setTimeout(()=>{K(e,n.showClass.popup),e.style.removeProperty("opacity")},mo),K([document.documentElement,document.body],g.shown),n.heightAuto&&n.backdrop&&!n.toast&&K([document.documentElement,document.body],g["height-auto"])},mt=t=>{let e=Y();e||new ht,e=Y();const n=ut();cn()?se(It()):hl(e,t),ne(n),e.setAttribute("data-loading",!0),e.setAttribute("aria-busy",!0),e.focus()},hl=(t,e)=>{const n=Pt(),r=ut();!e&&ye(Ie())&&(e=Ie()),ne(n),e&&(se(e),r.setAttribute("data-button-to-replace",e.className)),r.parentNode.insertBefore(r,e),K([t,n],g.loading)},gl=(t,e)=>{e.input==="select"||e.input==="radio"?El(t,e):["text","email","number","tel","textarea"].includes(e.input)&&(Bn(e.inputValue)||Rn(e.inputValue))&&(mt(Ie()),Sl(t,e))},yl=(t,e)=>{const n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return bl(n);case"radio":return vl(n);case"file":return wl(n);default:return e.inputAutoTrim?n.value.trim():n.value}},bl=t=>t.checked?1:0,vl=t=>t.checked?t.value:null,wl=t=>t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,El=(t,e)=>{const n=Y(),r=o=>Cl[e.input](n,Kn(o),e);Bn(e.inputOptions)||Rn(e.inputOptions)?(mt(Ie()),At(e.inputOptions).then(o=>{t.hideLoading(),r(o)})):typeof e.inputOptions=="object"?r(e.inputOptions):Je(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Sl=(t,e)=>{const n=t.getInput();se(n),At(e.inputValue).then(r=>{n.value=e.input==="number"?parseFloat(r)||0:`${r}`,ne(n),n.focus(),t.hideLoading()}).catch(r=>{Je(`Error in inputValue promise: ${r}`),n.value="",ne(n),n.focus(),t.hideLoading()})},Cl={select:(t,e,n)=>{const r=We(t,g.select),o=(i,s,l)=>{const c=document.createElement("option");c.value=l,ie(c,s),c.selected=ho(l,n.inputValue),i.appendChild(c)};e.forEach(i=>{const s=i[0],l=i[1];if(Array.isArray(l)){const c=document.createElement("optgroup");c.label=s,c.disabled=!1,r.appendChild(c),l.forEach(u=>o(c,u[1],u[0]))}else o(r,l,s)}),r.focus()},radio:(t,e,n)=>{const r=We(t,g.radio);e.forEach(i=>{const s=i[0],l=i[1],c=document.createElement("input"),u=document.createElement("label");c.type="radio",c.name=g.radio,c.value=s,ho(s,n.inputValue)&&(c.checked=!0);const f=document.createElement("span");ie(f,l),f.className=g.label,u.appendChild(c),u.appendChild(f),r.appendChild(u)});const o=r.querySelectorAll("input");o.length&&o[0].focus()}},Kn=t=>{const e=[];return typeof Map<"u"&&t instanceof Map?t.forEach((n,r)=>{let o=n;typeof o=="object"&&(o=Kn(o)),e.push([r,o])}):Object.keys(t).forEach(n=>{let r=t[n];typeof r=="object"&&(r=Kn(r)),e.push([n,r])}),e},ho=(t,e)=>e&&e.toString()===t.toString();function go(){const t=U.innerParams.get(this);if(!t)return;const e=U.domCache.get(this);se(e.loader),cn()?t.icon&&ne(It()):Al(e),Oe([e.popup,e.actions],g.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}const Al=t=>{const e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?ne(e[0],"inline-block"):ea()&&se(t.actions)};function kl(t){const e=U.innerParams.get(t||this),n=U.domCache.get(t||this);return n?Un(n.popup,e.input):null}const Lt={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},_l=()=>ye(Y()),yo=()=>Ie()&&Ie().click(),Il=()=>Ke()&&Ke().click(),Pl=()=>Xe()&&Xe().click(),bo=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Tl=(t,e,n,r)=>{bo(e),n.toast||(e.keydownHandler=o=>Ol(t,o,r),e.keydownTarget=n.keydownListenerCapture?window:Y(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Wn=(t,e,n)=>{const r=Dn();if(r.length)return e=e+n,e===r.length?e=0:e===-1&&(e=r.length-1),r[e].focus();Y().focus()},vo=["ArrowRight","ArrowDown"],xl=["ArrowLeft","ArrowUp"],Ol=(t,e,n)=>{const r=U.innerParams.get(t);r&&(e.isComposing||e.keyCode===229||(r.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?Ll(t,e,r):e.key==="Tab"?Bl(e,r):[...vo,...xl].includes(e.key)?Rl(e.key):e.key==="Escape"&&$l(e,r,n)))},Ll=(t,e,n)=>{if(on(n.allowEnterKey)&&e.target&&t.getInput()&&e.target.outerHTML===t.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;yo(),e.preventDefault()}},Bl=(t,e)=>{const n=t.target,r=Dn();let o=-1;for(let i=0;i<r.length;i++)if(n===r[i]){o=i;break}t.shiftKey?Wn(e,o,-1):Wn(e,o,1),t.stopPropagation(),t.preventDefault()},Rl=t=>{const e=Ie(),n=Ke(),r=Xe();if(![e,n,r].includes(document.activeElement))return;const o=vo.includes(t)?"nextElementSibling":"previousElementSibling";let i=document.activeElement;for(let s=0;s<Pt().children.length;s++){if(i=i[o],!i)return;if(ye(i)&&i instanceof HTMLButtonElement)break}i instanceof HTMLButtonElement&&i.focus()},$l=(t,e,n)=>{on(e.allowEscapeKey)&&(t.preventDefault(),n(ft.esc))};function wo(t,e,n,r){cn()?Eo(t,r):(oa(n).then(()=>Eo(t,r)),bo(M)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),Mn()&&(rl(),ul(),co()),Nl()}function Nl(){Oe([document.documentElement,document.body],[g.shown,g["height-auto"],g["no-backdrop"],g["toast-shown"]])}function dn(t){t=Hl(t);const e=Lt.swalPromiseResolve.get(this),n=Ml(this);this.isAwaitingPromise()?t.isDismissed||(Bt(this),e(t)):n&&e(t)}function Dl(){return!!U.awaitingPromise.get(this)}const Ml=t=>{const e=Y();if(!e)return!1;const n=U.innerParams.get(t);if(!n||De(e,n.hideClass.popup))return!1;Oe(e,n.showClass.popup),K(e,n.hideClass.popup);const r=oe();return Oe(r,n.showClass.backdrop),K(r,n.hideClass.backdrop),Fl(t,e,n),!0};function Ul(t){const e=Lt.swalPromiseReject.get(this);Bt(this),e&&e(t)}const Bt=t=>{t.isAwaitingPromise()&&(U.awaitingPromise.delete(t),U.innerParams.get(t)||t._destroy())},Hl=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),Fl=(t,e,n)=>{const r=oe(),o=xt&&no(e);typeof n.willClose=="function"&&n.willClose(e),o?jl(t,e,r,n.returnFocus,n.didClose):wo(t,r,n.returnFocus,n.didClose)},jl=(t,e,n,r,o)=>{M.swalCloseEventFinishedCallback=wo.bind(null,t,n,r,o),e.addEventListener(xt,function(i){i.target===e&&(M.swalCloseEventFinishedCallback(),delete M.swalCloseEventFinishedCallback)})},Eo=(t,e)=>{setTimeout(()=>{typeof e=="function"&&e.bind(t.params)(),t._destroy()})};function So(t,e,n){const r=U.domCache.get(t);e.forEach(o=>{r[o].disabled=n})}function Co(t,e){if(!t)return!1;if(t.type==="radio"){const r=t.parentNode.parentNode.querySelectorAll("input");for(let o=0;o<r.length;o++)r[o].disabled=e}else t.disabled=e}function Vl(){So(this,["confirmButton","denyButton","cancelButton"],!1)}function Kl(){So(this,["confirmButton","denyButton","cancelButton"],!0)}function Wl(){return Co(this.getInput(),!1)}function zl(){return Co(this.getInput(),!0)}function ql(t){const e=U.domCache.get(this),n=U.innerParams.get(this);ie(e.validationMessage,t),e.validationMessage.className=g["validation-message"],n.customClass&&n.customClass.validationMessage&&K(e.validationMessage,n.customClass.validationMessage),ne(e.validationMessage);const r=this.getInput();r&&(r.setAttribute("aria-invalid",!0),r.setAttribute("aria-describedby",g["validation-message"]),Zr(r),K(r,g.inputerror))}function Gl(){const t=U.domCache.get(this);t.validationMessage&&se(t.validationMessage);const e=this.getInput();e&&(e.removeAttribute("aria-invalid"),e.removeAttribute("aria-describedby"),Oe(e,g.inputerror))}function Yl(){return U.domCache.get(this).progressSteps}function Jl(t){const e=Y(),n=U.innerParams.get(this);if(!e||De(e,n.hideClass.popup))return de("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 r=Xl(t),o=Object.assign({},n,r);lo(this,o),U.innerParams.set(this,o),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}const Xl=t=>{const e={};return Object.keys(t).forEach(n=>{zr(n)?e[n]=t[n]:de(`Invalid parameter to update: "${n}". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js
|
|
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 Zl(){const t=U.domCache.get(this),e=U.innerParams.get(this);if(!e){Ao(this);return}t.popup&&M.swalCloseEventFinishedCallback&&(M.swalCloseEventFinishedCallback(),delete M.swalCloseEventFinishedCallback),M.deferDisposalTimer&&(clearTimeout(M.deferDisposalTimer),delete M.deferDisposalTimer),typeof e.didDestroy=="function"&&e.didDestroy(),Ql(this)}const Ql=t=>{Ao(t),delete t.params,delete M.keydownHandler,delete M.keydownTarget,delete M.currentInstance},Ao=t=>{t.isAwaitingPromise()?(zn(U,t),U.awaitingPromise.set(t,!0)):(zn(Lt,t),zn(U,t))},zn=(t,e)=>{for(const n in t)t[n].delete(e)},ko=Object.freeze(Object.defineProperty({__proto__:null,_destroy:Zl,close:dn,closeModal:dn,closePopup:dn,closeToast:dn,disableButtons:Kl,disableInput:zl,disableLoading:go,enableButtons:Vl,enableInput:Wl,getInput:kl,getProgressSteps:Yl,handleAwaitingPromise:Bt,hideLoading:go,isAwaitingPromise:Dl,rejectPromise:Ul,resetValidationMessage:Gl,showValidationMessage:ql,update:Jl},Symbol.toStringTag,{value:"Module"})),ec=t=>{const e=U.innerParams.get(t);t.disableButtons(),e.input?_o(t,"confirm"):Gn(t,!0)},tc=t=>{const e=U.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?_o(t,"deny"):qn(t,!1)},nc=(t,e)=>{t.disableButtons(),e(ft.cancel)},_o=(t,e)=>{const n=U.innerParams.get(t);if(!n.input)return Je(`The "input" parameter is needed to be set when using returnInputValueOn${Ln(e)}`);const r=yl(t,n);n.inputValidator?rc(t,r,e):t.getInput().checkValidity()?e==="deny"?qn(t,r):Gn(t,r):(t.enableButtons(),t.showValidationMessage(n.validationMessage))},rc=(t,e,n)=>{const r=U.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>At(r.inputValidator(e,r.validationMessage))).then(i=>{t.enableButtons(),t.enableInput(),i?t.showValidationMessage(i):n==="deny"?qn(t,e):Gn(t,e)})},qn=(t,e)=>{const n=U.innerParams.get(t||void 0);n.showLoaderOnDeny&&mt(Ke()),n.preDeny?(U.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>At(n.preDeny(e,n.validationMessage))).then(o=>{o===!1?(t.hideLoading(),Bt(t)):t.closePopup({isDenied:!0,value:typeof o>"u"?e:o})}).catch(o=>Po(t||void 0,o))):t.closePopup({isDenied:!0,value:e})},Io=(t,e)=>{t.closePopup({isConfirmed:!0,value:e})},Po=(t,e)=>{t.rejectPromise(e)},Gn=(t,e)=>{const n=U.innerParams.get(t||void 0);n.showLoaderOnConfirm&&mt(),n.preConfirm?(t.resetValidationMessage(),U.awaitingPromise.set(t||void 0,!0),Promise.resolve().then(()=>At(n.preConfirm(e,n.validationMessage))).then(o=>{ye(an())||o===!1?(t.hideLoading(),Bt(t)):Io(t,typeof o>"u"?e:o)}).catch(o=>Po(t||void 0,o))):Io(t,e)},oc=(t,e,n)=>{U.innerParams.get(t).toast?ic(t,e,n):(ac(e),lc(e),cc(t,e,n))},ic=(t,e,n)=>{e.popup.onclick=()=>{const r=U.innerParams.get(t);r&&(sc(r)||r.timer||r.input)||n(ft.close)}},sc=t=>t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton;let fn=!1;const ac=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=void 0,e.target===t.container&&(fn=!0)}}},lc=t=>{t.container.onmousedown=()=>{t.popup.onmouseup=function(e){t.popup.onmouseup=void 0,(e.target===t.popup||t.popup.contains(e.target))&&(fn=!0)}}},cc=(t,e,n)=>{e.container.onclick=r=>{const o=U.innerParams.get(t);if(fn){fn=!1;return}r.target===e.container&&on(o.allowOutsideClick)&&n(ft.backdrop)}},uc=t=>typeof t=="object"&&t.jquery,To=t=>t instanceof Element||uc(t),dc=t=>{const e={};return typeof t[0]=="object"&&!To(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,r)=>{const o=t[r];typeof o=="string"||To(o)?e[n]=o:o!==void 0&&Je(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof o}`)}),e};function fc(...t){const e=this;return new e(...t)}function mc(t){class e extends this{_main(r,o){return super._main(r,Object.assign({},t,o))}}return e}const pc=()=>M.timeout&&M.timeout.getTimerLeft(),xo=()=>{if(M.timeout)return ta(),M.timeout.stop()},Oo=()=>{if(M.timeout){const t=M.timeout.start();return Hn(t),t}},hc=()=>{const t=M.timeout;return t&&(t.running?xo():Oo())},gc=t=>{if(M.timeout){const e=M.timeout.increase(t);return Hn(e,!0),e}},yc=()=>M.timeout&&M.timeout.isRunning();let Lo=!1;const Yn={};function bc(t="data-swal-template"){Yn[t]=this,Lo||(document.body.addEventListener("click",vc),Lo=!0)}const vc=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const n in Yn){const r=e.getAttribute(n);if(r){Yn[n].fire({template:r});return}}},wc=Object.freeze(Object.defineProperty({__proto__:null,argsToParams:dc,bindClickHandler:bc,clickCancel:Pl,clickConfirm:yo,clickDeny:Il,enableLoading:mt,fire:fc,getActions:Pt,getCancelButton:Xe,getCloseButton:Nn,getConfirmButton:Ie,getContainer:oe,getDenyButton:Ke,getFocusableElements:Dn,getFooter:Xr,getHtmlContainer:sn,getIcon:It,getImage:Yr,getInputLabel:Js,getLoader:ut,getPopup:Y,getTimerLeft:pc,getTimerProgressBar:ln,getTitle:Gr,getValidationMessage:an,increaseTimer:gc,isDeprecatedParameter:$n,isLoading:Zs,isTimerRunning:yc,isUpdatableParameter:zr,isValidParameter:Wr,isVisible:_l,mixin:mc,resumeTimer:Oo,showLoading:mt,stopTimer:xo,toggleTimer:hc},Symbol.toStringTag,{value:"Module"}));let Jn;class pt{constructor(...e){if(typeof window>"u")return;Jn=this;const n=Object.freeze(this.constructor.argsToParams(e));Object.defineProperties(this,{params:{value:n,writable:!1,enumerable:!0,configurable:!0}});const r=this._main(this.params);U.promise.set(this,r)}_main(e,n={}){Gs(Object.assign({},n,e)),M.currentInstance&&(M.currentInstance._destroy(),Mn()&&co()),M.currentInstance=this;const r=Sc(e,n);el(r),Object.freeze(r),M.timeout&&(M.timeout.stop(),delete M.timeout),clearTimeout(M.restoreFocusTimeout);const o=Cc(this);return lo(this,r),U.innerParams.set(this,r),Ec(this,o,r)}then(e){return U.promise.get(this).then(e)}finally(e){return U.promise.get(this).finally(e)}}const Ec=(t,e,n)=>new Promise((r,o)=>{const i=s=>{t.closePopup({isDismissed:!0,dismiss:s})};Lt.swalPromiseResolve.set(t,r),Lt.swalPromiseReject.set(t,o),e.confirmButton.onclick=()=>ec(t),e.denyButton.onclick=()=>tc(t),e.cancelButton.onclick=()=>nc(t,i),e.closeButton.onclick=()=>i(ft.close),oc(t,e,i),Tl(t,M,n,i),gl(t,n),dl(n),Ac(M,n,i),kc(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Sc=(t,e)=>{const n=Ka(t),r=Object.assign({},ct,e,n,t);return r.showClass=Object.assign({},ct.showClass,r.showClass),r.hideClass=Object.assign({},ct.hideClass,r.hideClass),r},Cc=t=>{const e={popup:Y(),container:oe(),actions:Pt(),confirmButton:Ie(),denyButton:Ke(),cancelButton:Xe(),loader:ut(),closeButton:Nn(),validationMessage:an(),progressSteps:Jr()};return U.domCache.set(t,e),e},Ac=(t,e,n)=>{const r=ln();se(r),e.timer&&(t.timeout=new tl(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(ne(r),Se(r,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Hn(e.timer)})))},kc=(t,e)=>{if(!e.toast){if(!on(e.allowEnterKey))return Ic();_c(t,e)||Wn(e,-1,1)}},_c=(t,e)=>e.focusDeny&&ye(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&ye(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&ye(t.confirmButton)?(t.confirmButton.focus(),!0):!1,Ic=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};Object.assign(pt.prototype,ko),Object.assign(pt,wc),Object.keys(ko).forEach(t=>{pt[t]=function(...e){if(Jn)return Jn[t](...e)}}),pt.DismissReason=ft,pt.version="11.4.8";const ht=pt;ht.default=ht;/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:Bo,setPrototypeOf:Ro,isFrozen:Pc,getPrototypeOf:Tc,getOwnPropertyDescriptor:xc}=Object;let{freeze:ce,seal:Pe,create:$o}=Object,{apply:Xn,construct:Zn}=typeof Reflect<"u"&&Reflect;ce||(ce=function(e){return e}),Pe||(Pe=function(e){return e}),Xn||(Xn=function(e,n,r){return e.apply(n,r)}),Zn||(Zn=function(e,n){return new e(...n)});const mn=ve(Array.prototype.forEach),No=ve(Array.prototype.pop),Rt=ve(Array.prototype.push),pn=ve(String.prototype.toLowerCase),Qn=ve(String.prototype.toString),Oc=ve(String.prototype.match),$t=ve(String.prototype.replace),Lc=ve(String.prototype.indexOf),Bc=ve(String.prototype.trim),Te=ve(Object.prototype.hasOwnProperty),be=ve(RegExp.prototype.test),Nt=Rc(TypeError);function ve(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Xn(t,e,r)}}function Rc(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Zn(t,n)}}function H(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:pn;Ro&&Ro(t,null);let r=e.length;for(;r--;){let o=e[r];if(typeof o=="string"){const i=n(o);i!==o&&(Pc(e)||(e[r]=i),o=i)}t[o]=!0}return t}function $c(t){for(let e=0;e<t.length;e++)Te(t,e)||(t[e]=null);return t}function et(t){const e=$o(null);for(const[n,r]of Bo(t))Te(t,n)&&(Array.isArray(r)?e[n]=$c(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=et(r):e[n]=r);return e}function hn(t,e){for(;t!==null;){const r=xc(t,e);if(r){if(r.get)return ve(r.get);if(typeof r.value=="function")return ve(r.value)}t=Tc(t)}function n(){return null}return n}const Do=ce(["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"]),er=ce(["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"]),tr=ce(["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"]),Nc=ce(["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"]),nr=ce(["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"]),Dc=ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Mo=ce(["#text"]),Uo=ce(["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"]),rr=ce(["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"]),Ho=ce(["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"]),gn=ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Mc=Pe(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Uc=Pe(/<%[\w\W]*|[\w\W]*%>/gm),Hc=Pe(/\${[\w\W]*}/gm),Fc=Pe(/^data-[\-\w.\u00B7-\uFFFF]/),jc=Pe(/^aria-[\-\w]+$/),Fo=Pe(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vc=Pe(/^(?:\w+script|data):/i),Kc=Pe(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),jo=Pe(/^html$/i);var Vo=Object.freeze({__proto__:null,MUSTACHE_EXPR:Mc,ERB_EXPR:Uc,TMPLIT_EXPR:Hc,DATA_ATTR:Fc,ARIA_ATTR:jc,IS_ALLOWED_URI:Fo,IS_SCRIPT_OR_DATA:Vc,ATTR_WHITESPACE:Kc,DOCTYPE_NAME:jo});const Wc=function(){return typeof window>"u"?null:window},zc=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Ko(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wc();const e=$=>Ko($);if(e.version="3.0.9",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let{document:n}=t;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:f=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:m,DOMParser:y,trustedTypes:E}=t,C=c.prototype,k=hn(C,"cloneNode"),S=hn(C,"nextSibling"),B=hn(C,"childNodes"),D=hn(C,"parentNode");if(typeof s=="function"){const $=n.createElement("template");$.content&&$.content.ownerDocument&&(n=$.content.ownerDocument)}let q,we="";const{implementation:$e,createNodeIterator:rt,createDocumentFragment:ke,getElementsByTagName:Zt}=n,{importNode:ot}=r;let G={};e.isSupported=typeof Bo=="function"&&typeof D=="function"&&$e&&$e.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:it,ERB_EXPR:_e,TMPLIT_EXPR:Me,DATA_ATTR:Ue,ARIA_ATTR:Qt,IS_SCRIPT_OR_DATA:st,ATTR_WHITESPACE:bt}=Vo;let{IS_ALLOWED_URI:vt}=Vo,ee=null;const en=H({},[...Do,...er,...tr,...nr,...Mo]);let d=null;const h=H({},[...Uo,...rr,...Ho,...gn]);let v=Object.seal($o(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}})),P=null,w=null,T=!0,A=!0,_=!1,L=!0,x=!1,N=!1,V=!1,me=!1,ue=!1,re=!1,Ne=!1,rs=!0,os=!1;const Bm="user-content-";let Rr=!0,tn=!1,wt={},Et=null;const is=H({},["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 as=H({},["audio","video","img","source","image","track"]);let $r=null;const ls=H({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),In="http://www.w3.org/1998/Math/MathML",Pn="http://www.w3.org/2000/svg",He="http://www.w3.org/1999/xhtml";let St=He,Nr=!1,Dr=null;const Rm=H({},[In,Pn,He],Qn);let nn=null;const $m=["application/xhtml+xml","text/html"],Nm="text/html";let te=null,Ct=null;const Dm=n.createElement("form"),cs=function(p){return p instanceof RegExp||p instanceof Function},Mr=function(){let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ct&&Ct===p)){if((!p||typeof p!="object")&&(p={}),p=et(p),nn=$m.indexOf(p.PARSER_MEDIA_TYPE)===-1?Nm:p.PARSER_MEDIA_TYPE,te=nn==="application/xhtml+xml"?Qn:pn,ee=Te(p,"ALLOWED_TAGS")?H({},p.ALLOWED_TAGS,te):en,d=Te(p,"ALLOWED_ATTR")?H({},p.ALLOWED_ATTR,te):h,Dr=Te(p,"ALLOWED_NAMESPACES")?H({},p.ALLOWED_NAMESPACES,Qn):Rm,$r=Te(p,"ADD_URI_SAFE_ATTR")?H(et(ls),p.ADD_URI_SAFE_ATTR,te):ls,ss=Te(p,"ADD_DATA_URI_TAGS")?H(et(as),p.ADD_DATA_URI_TAGS,te):as,Et=Te(p,"FORBID_CONTENTS")?H({},p.FORBID_CONTENTS,te):is,P=Te(p,"FORBID_TAGS")?H({},p.FORBID_TAGS,te):{},w=Te(p,"FORBID_ATTR")?H({},p.FORBID_ATTR,te):{},wt=Te(p,"USE_PROFILES")?p.USE_PROFILES:!1,T=p.ALLOW_ARIA_ATTR!==!1,A=p.ALLOW_DATA_ATTR!==!1,_=p.ALLOW_UNKNOWN_PROTOCOLS||!1,L=p.ALLOW_SELF_CLOSE_IN_ATTR!==!1,x=p.SAFE_FOR_TEMPLATES||!1,N=p.WHOLE_DOCUMENT||!1,ue=p.RETURN_DOM||!1,re=p.RETURN_DOM_FRAGMENT||!1,Ne=p.RETURN_TRUSTED_TYPE||!1,me=p.FORCE_BODY||!1,rs=p.SANITIZE_DOM!==!1,os=p.SANITIZE_NAMED_PROPS||!1,Rr=p.KEEP_CONTENT!==!1,tn=p.IN_PLACE||!1,vt=p.ALLOWED_URI_REGEXP||Fo,St=p.NAMESPACE||He,v=p.CUSTOM_ELEMENT_HANDLING||{},p.CUSTOM_ELEMENT_HANDLING&&cs(p.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(v.tagNameCheck=p.CUSTOM_ELEMENT_HANDLING.tagNameCheck),p.CUSTOM_ELEMENT_HANDLING&&cs(p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(v.attributeNameCheck=p.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),p.CUSTOM_ELEMENT_HANDLING&&typeof p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(v.allowCustomizedBuiltInElements=p.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),x&&(A=!1),re&&(ue=!0),wt&&(ee=H({},Mo),d=[],wt.html===!0&&(H(ee,Do),H(d,Uo)),wt.svg===!0&&(H(ee,er),H(d,rr),H(d,gn)),wt.svgFilters===!0&&(H(ee,tr),H(d,rr),H(d,gn)),wt.mathMl===!0&&(H(ee,nr),H(d,Ho),H(d,gn))),p.ADD_TAGS&&(ee===en&&(ee=et(ee)),H(ee,p.ADD_TAGS,te)),p.ADD_ATTR&&(d===h&&(d=et(d)),H(d,p.ADD_ATTR,te)),p.ADD_URI_SAFE_ATTR&&H($r,p.ADD_URI_SAFE_ATTR,te),p.FORBID_CONTENTS&&(Et===is&&(Et=et(Et)),H(Et,p.FORBID_CONTENTS,te)),Rr&&(ee["#text"]=!0),N&&H(ee,["html","head","body"]),ee.table&&(H(ee,["tbody"]),delete P.tbody),p.TRUSTED_TYPES_POLICY){if(typeof p.TRUSTED_TYPES_POLICY.createHTML!="function")throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof p.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Nt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');q=p.TRUSTED_TYPES_POLICY,we=q.createHTML("")}else q===void 0&&(q=zc(E,o)),q!==null&&typeof we=="string"&&(we=q.createHTML(""));ce&&ce(p),Ct=p}},us=H({},["mi","mo","mn","ms","mtext"]),ds=H({},["foreignobject","desc","title","annotation-xml"]),Mm=H({},["title","style","font","a","script"]),fs=H({},[...er,...tr,...Nc]),ms=H({},[...nr,...Dc]),Um=function(p){let I=D(p);(!I||!I.tagName)&&(I={namespaceURI:St,tagName:"template"});const R=pn(p.tagName),J=pn(I.tagName);return Dr[p.namespaceURI]?p.namespaceURI===Pn?I.namespaceURI===He?R==="svg":I.namespaceURI===In?R==="svg"&&(J==="annotation-xml"||us[J]):!!fs[R]:p.namespaceURI===In?I.namespaceURI===He?R==="math":I.namespaceURI===Pn?R==="math"&&ds[J]:!!ms[R]:p.namespaceURI===He?I.namespaceURI===Pn&&!ds[J]||I.namespaceURI===In&&!us[J]?!1:!ms[R]&&(Mm[R]||!fs[R]):!!(nn==="application/xhtml+xml"&&Dr[p.namespaceURI]):!1},at=function(p){Rt(e.removed,{element:p});try{p.parentNode.removeChild(p)}catch{p.remove()}},Ur=function(p,I){try{Rt(e.removed,{attribute:I.getAttributeNode(p),from:I})}catch{Rt(e.removed,{attribute:null,from:I})}if(I.removeAttribute(p),p==="is"&&!d[p])if(ue||re)try{at(I)}catch{}else try{I.setAttribute(p,"")}catch{}},ps=function(p){let I=null,R=null;if(me)p="<remove></remove>"+p;else{const le=Oc(p,/^[\r\n\t ]+/);R=le&&le[0]}nn==="application/xhtml+xml"&&St===He&&(p='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+p+"</body></html>");const J=q?q.createHTML(p):p;if(St===He)try{I=new y().parseFromString(J,nn)}catch{}if(!I||!I.documentElement){I=$e.createDocument(St,"template",null);try{I.documentElement.innerHTML=Nr?we:J}catch{}}const ae=I.body||I.documentElement;return p&&R&&ae.insertBefore(n.createTextNode(R),ae.childNodes[0]||null),St===He?Zt.call(I,N?"html":"body")[0]:N?I.documentElement:ae},hs=function(p){return rt.call(p.ownerDocument||p,p,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},Hm=function(p){return p instanceof m&&(typeof p.nodeName!="string"||typeof p.textContent!="string"||typeof p.removeChild!="function"||!(p.attributes instanceof f)||typeof p.removeAttribute!="function"||typeof p.setAttribute!="function"||typeof p.namespaceURI!="string"||typeof p.insertBefore!="function"||typeof p.hasChildNodes!="function")},gs=function(p){return typeof l=="function"&&p instanceof l},Fe=function(p,I,R){G[p]&&mn(G[p],J=>{J.call(e,I,R,Ct)})},ys=function(p){let I=null;if(Fe("beforeSanitizeElements",p,null),Hm(p))return at(p),!0;const R=te(p.nodeName);if(Fe("uponSanitizeElement",p,{tagName:R,allowedTags:ee}),p.hasChildNodes()&&!gs(p.firstElementChild)&&be(/<[/\w]/g,p.innerHTML)&&be(/<[/\w]/g,p.textContent))return at(p),!0;if(!ee[R]||P[R]){if(!P[R]&&vs(R)&&(v.tagNameCheck instanceof RegExp&&be(v.tagNameCheck,R)||v.tagNameCheck instanceof Function&&v.tagNameCheck(R)))return!1;if(Rr&&!Et[R]){const J=D(p)||p.parentNode,ae=B(p)||p.childNodes;if(ae&&J){const le=ae.length;for(let pe=le-1;pe>=0;--pe)J.insertBefore(k(ae[pe],!0),S(p))}}return at(p),!0}return p instanceof c&&!Um(p)||(R==="noscript"||R==="noembed"||R==="noframes")&&be(/<\/no(script|embed|frames)/i,p.innerHTML)?(at(p),!0):(x&&p.nodeType===3&&(I=p.textContent,mn([it,_e,Me],J=>{I=$t(I,J," ")}),p.textContent!==I&&(Rt(e.removed,{element:p.cloneNode()}),p.textContent=I)),Fe("afterSanitizeElements",p,null),!1)},bs=function(p,I,R){if(rs&&(I==="id"||I==="name")&&(R in n||R in Dm))return!1;if(!(A&&!w[I]&&be(Ue,I))){if(!(T&&be(Qt,I))){if(!d[I]||w[I]){if(!(vs(p)&&(v.tagNameCheck instanceof RegExp&&be(v.tagNameCheck,p)||v.tagNameCheck instanceof Function&&v.tagNameCheck(p))&&(v.attributeNameCheck instanceof RegExp&&be(v.attributeNameCheck,I)||v.attributeNameCheck instanceof Function&&v.attributeNameCheck(I))||I==="is"&&v.allowCustomizedBuiltInElements&&(v.tagNameCheck instanceof RegExp&&be(v.tagNameCheck,R)||v.tagNameCheck instanceof Function&&v.tagNameCheck(R))))return!1}else if(!$r[I]){if(!be(vt,$t(R,bt,""))){if(!((I==="src"||I==="xlink:href"||I==="href")&&p!=="script"&&Lc(R,"data:")===0&&ss[p])){if(!(_&&!be(st,$t(R,bt,"")))){if(R)return!1}}}}}}return!0},vs=function(p){return p!=="annotation-xml"&&p.indexOf("-")>0},ws=function(p){Fe("beforeSanitizeAttributes",p,null);const{attributes:I}=p;if(!I)return;const R={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:d};let J=I.length;for(;J--;){const ae=I[J],{name:le,namespaceURI:pe,value:lt}=ae,rn=te(le);let he=le==="value"?lt:Bc(lt);if(R.attrName=rn,R.attrValue=he,R.keepAttr=!0,R.forceKeepAttr=void 0,Fe("uponSanitizeAttribute",p,R),he=R.attrValue,R.forceKeepAttr||(Ur(le,p),!R.keepAttr))continue;if(!L&&be(/\/>/i,he)){Ur(le,p);continue}x&&mn([it,_e,Me],Ss=>{he=$t(he,Ss," ")});const Es=te(p.nodeName);if(bs(Es,rn,he)){if(os&&(rn==="id"||rn==="name")&&(Ur(le,p),he=Bm+he),q&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!pe)switch(E.getAttributeType(Es,rn)){case"TrustedHTML":{he=q.createHTML(he);break}case"TrustedScriptURL":{he=q.createScriptURL(he);break}}try{pe?p.setAttributeNS(pe,le,he):p.setAttribute(le,he),No(e.removed)}catch{}}}Fe("afterSanitizeAttributes",p,null)},Fm=function $(p){let I=null;const R=hs(p);for(Fe("beforeSanitizeShadowDOM",p,null);I=R.nextNode();)Fe("uponSanitizeShadowNode",I,null),!ys(I)&&(I.content instanceof i&&$(I.content),ws(I));Fe("afterSanitizeShadowDOM",p,null)};return e.sanitize=function($){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,R=null,J=null,ae=null;if(Nr=!$,Nr&&($="<!-->"),typeof $!="string"&&!gs($))if(typeof $.toString=="function"){if($=$.toString(),typeof $!="string")throw Nt("dirty is not a string, aborting")}else throw Nt("toString is not a function");if(!e.isSupported)return $;if(V||Mr(p),e.removed=[],typeof $=="string"&&(tn=!1),tn){if($.nodeName){const lt=te($.nodeName);if(!ee[lt]||P[lt])throw Nt("root node is forbidden and cannot be sanitized in-place")}}else if($ instanceof l)I=ps("<!---->"),R=I.ownerDocument.importNode($,!0),R.nodeType===1&&R.nodeName==="BODY"||R.nodeName==="HTML"?I=R:I.appendChild(R);else{if(!ue&&!x&&!N&&$.indexOf("<")===-1)return q&&Ne?q.createHTML($):$;if(I=ps($),!I)return ue?null:Ne?we:""}I&&me&&at(I.firstChild);const le=hs(tn?$:I);for(;J=le.nextNode();)ys(J)||(J.content instanceof i&&Fm(J.content),ws(J));if(tn)return $;if(ue){if(re)for(ae=ke.call(I.ownerDocument);I.firstChild;)ae.appendChild(I.firstChild);else ae=I;return(d.shadowroot||d.shadowrootmode)&&(ae=ot.call(r,ae,!0)),ae}let pe=N?I.outerHTML:I.innerHTML;return N&&ee["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&be(jo,I.ownerDocument.doctype.name)&&(pe="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
65
|
-
`+pe),x&&mn([it,_e,Me],lt=>{pe=$t(pe,lt," ")}),q&&Ne?q.createHTML(pe):pe},e.setConfig=function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Mr($),V=!0},e.clearConfig=function(){Ct=null,V=!1},e.isValidAttribute=function($,p,I){Ct||Mr({});const R=te($),J=te(p);return bs(R,J,I)},e.addHook=function($,p){typeof p=="function"&&(G[$]=G[$]||[],Rt(G[$],p))},e.removeHook=function($){if(G[$])return No(G[$])},e.removeHooks=function($){G[$]&&(G[$]=[])},e.removeAllHooks=function(){G={}},e}var Wo=Ko();class zo{get IsVisible(){return ht.isVisible()}}class qc extends zo{constructor(){super()}async CreateAlertAsync(e){let n="info",r,o;return typeof e=="string"||Array.isArray(e)?r=Array.isArray(e)?e.join("<br />"):e:(n=e.icon??"info",o=e.title??"",r=Array.isArray(e.text)?e.text.join("<br />"):e.text),new Promise(i=>{ht.fire({allowEscapeKey:!1,allowOutsideClick:!1,icon:n,title:o,html:`<div style="max-height: 50vh; overflow: auto">${Wo.sanitize(r)}</div>`}).then(()=>i(!0))})}async AlertAsync(e){return this.CreateAlertAsync({text:e,icon:"info"})}async AlertErrorAsync(e){return this.CreateAlertAsync({text:e,icon:"error"})}async AlertSuccessAsync(e){return this.CreateAlertAsync({text:e,icon:"success"})}}class Gc extends zo{async CreateConfirmAsync(e){return new Promise(n=>{ht.fire({showCancelButton:!0,allowEscapeKey:!1,allowOutsideClick:!1,icon:"question",title:e.title,html:Wo.sanitize(e.text),confirmButtonText:e.confirmLabel??"confirmar",cancelButtonText:e.rejectLabel??"cancelar"}).then(r=>{n(r.isConfirmed===!0)})})}async ConfirmAsync(e){return this.CreateConfirmAsync({text:e})}}const Yc=()=>new qc,qo=()=>new Gc,Jc=["data-cor"],Xc={class:"sf-p-4"},Zc=a.defineComponent({__name:"HeaderAvatar",emits:["logout"],setup(t,{emit:e}){const n=qo(),r=a.ref("?"),o=e;async function i(){await n.CreateConfirmAsync({text:"Você deseja sair da conta?",confirmLabel:"sair"})&&o("logout")}function s(){const u=sessionStorage.getItem("name");let f="?";if(!u)return f;const m=u.split(" ").filter(E=>E.length>0).map(E=>E[0].toUpperCase()),y=Math.min(2,m.length);return f=m.slice(0,y).join(""),f.length>0?f:"?"}const l=a.computed(()=>{const u=r.value[0],f=u==="?"?0:(u.charCodeAt(0)-64)%19;return Math.max(f,0)}),c=a.ref(!1);return a.onMounted(()=>{r.value=s()}),(u,f)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{id:"sf-header-avatar","data-cor":l.value,onClick:f[0]||(f[0]=m=>c.value=!0)},a.toDisplayString(r.value),9,Jc),a.createVNode(Fr,{visible:c.value,"onUpdate:visible":f[1]||(f[1]=m=>c.value=m),position:"right"},{title:a.withCtx(()=>f[2]||(f[2]=[a.createTextVNode("Minha conta")])),default:a.withCtx(()=>[a.createElementVNode("div",Xc,[a.createVNode(jr,{color:"error",onClick:i},{default:a.withCtx(()=>f[3]||(f[3]=[a.createTextVNode("Sair")])),_:1})])]),_:1},8,["visible"])],64))}}),Qc={},eu={xmlns:"http://www.w3.org/2000/svg",height:"48",viewBox:"0 -960 960 960",width:"48",class:"sf-svg-icon"};function tu(t,e){return a.openBlock(),a.createElementBlock("svg",eu,e[0]||(e[0]=[a.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)]))}const nu=xn(Qc,[["render",tu]]);class ru{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 or=new ru,ou=a.defineComponent({__name:"ThemeToggle",setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("button",{id:"sf-theme-toggle",onClick:n[0]||(n[0]=(...r)=>a.unref(or).Toggle&&a.unref(or).Toggle(...r))},n[1]||(n[1]=[a.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)])))}}),iu={id:"sf-layout"},su={class:"title"},au={class:"sf-layout-nav-content"},lu={id:"sf-layout-content"},cu=a.defineComponent({__name:"Layout",emits:["mounted","logout"],setup(t,{emit:e}){const n=Tn(),r=e;return a.onMounted(()=>{r("mounted")}),(o,i)=>(a.openBlock(),a.createElementBlock("div",iu,[a.createElementVNode("header",null,[a.createElementVNode("div",{class:a.normalizeClass(["sf-layout-menu-toggler",{invert:a.unref(n).IsVisible}]),onClick:i[0]||(i[0]=s=>a.unref(n).Toggle())},[i[2]||(i[2]=a.createElementVNode("div",{class:"sf-layout-menu-toggler-logo"},null,-1)),a.createVNode(nu)],2),a.createElementVNode("div",su,[a.renderSlot(o.$slots,"title")]),a.renderSlot(o.$slots,"action"),a.createVNode(On,{text:"alternar tema"},{default:a.withCtx(()=>[a.createVNode(ou)]),_:1}),a.createVNode(Zc,{onLogout:i[1]||(i[1]=s=>r("logout"))})]),a.createElementVNode("nav",{class:a.normalizeClass({visible:a.unref(n).IsVisible})},[a.createElementVNode("div",au,[a.renderSlot(o.$slots,"menu")]),i[3]||(i[3]=a.createElementVNode("div",{class:"sf-layout-nav-footer"},[a.createElementVNode("div",{class:"sf-layout-nav-footer-logo"})],-1))],2),a.createElementVNode("main",{class:a.normalizeClass({"menu-visible":a.unref(n).IsVisible})},[i[4]||(i[4]=a.createElementVNode("section",{id:"sf-layout-page-title"},null,-1)),a.createElementVNode("section",lu,[a.renderSlot(o.$slots,"content")])],2)]))}}),uu=["href","data-active","onClick"],du={class:"sf-navmenulink-text"},fu=a.defineComponent({__name:"NavMenuLink",props:{href:{},text:{},icon:{},iconFilled:{type:Boolean},exact:{type:Boolean}},setup(t){const e=t,n=Tn();function r(o,i){o.preventDefault();const l=o.target.closest(".sf-layout-nav-content");i(),l&&l.clientWidth+10>document.body.clientWidth&&n.Close()}return(o,i)=>{const s=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(s,{to:e.href,custom:""},{default:a.withCtx(({href:l,navigate:c,isExactActive:u,isActive:f})=>[a.createElementVNode("a",{class:"sf-navmenulink",href:l,"data-active":e.exact?u:f,onClick:m=>r(m,c)},[e.icon?(a.openBlock(),a.createBlock(Ve,{key:0,icon:e.icon,filled:e.iconFilled,"button-props":{tabindex:-1}},null,8,["icon","filled"])):a.createCommentVNode("",!0),a.createElementVNode("span",du,a.toDisplayString(e.text),1)],8,uu)]),_:1},8,["to"])}}}),mu=a.defineComponent({__name:"ScrollToTop",setup(t){const e=a.ref(!1),n=`--${+new Date}`;let r=null;function o(){r==null||r.scrollTo(0,0)}return a.onMounted(()=>{var i;r=((i=document.getElementById(n))==null?void 0:i.parentElement)??null,r&&r.addEventListener("scroll",function(){e.value=this.scrollTop-this.clientHeight>0})}),(i,s)=>(a.openBlock(),a.createElementBlock("button",{id:n,class:a.normalizeClass(["sf-scrollToTop",{"sf-scrollToTop-visible":e.value}]),onClick:o},null,2))}}),pu=a.defineComponent({__name:"Content",props:{class:{},style:{type:[Boolean,null,String,Object,Array]},disableBodyPadding:{type:Boolean},disableHeaderPadding:{type:Boolean},disableFooterPadding:{type:Boolean}},setup(t){const e=t;function n(){return new je("sf-content").AddClass(e.class,!!e.class).Build()}function r(){return new je("sf-content-body").AddClass("sf-content-no-padding",e.disableBodyPadding).Build()}function o(){return new je("sf-content-header").AddClass("sf-content-no-padding",e.disableHeaderPadding).Build()}function i(){return new je("sf-content-footer").AddClass("sf-content-no-padding",e.disableFooterPadding).Build()}return(s,l)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(n()),style:a.normalizeStyle(e.style)},[a.createElementVNode("div",{class:a.normalizeClass(o())},[a.renderSlot(s.$slots,"header")],2),a.createElementVNode("div",{class:a.normalizeClass(r())},[a.renderSlot(s.$slots,"default"),a.createVNode(mu)],2),a.createElementVNode("div",{class:a.normalizeClass(i())},[a.renderSlot(s.$slots,"footer")],2)],6))}}),hu={class:"sf-tab-navigation"},gu=["data-active"],yu=["href","onClick"],bu=a.defineComponent({__name:"TabNavigation",props:{tabs:{}},setup(t){const e=t,n=a.ref(null),r=new ResizeObserver(c=>{l()}),o=a.ref(!1),i=a.ref(!1);function s(c=!1){const u=n.value.clientWidth;n.value.scrollLeft+=c?-u:u}function l(){const c=n.value.scrollWidth-n.value.clientWidth;o.value=n.value.scrollLeft>10,i.value=n.value.scrollLeft<c-10}return a.onMounted(()=>{n.value.addEventListener("scroll",l),r.observe(n.value)}),a.onBeforeUnmount(()=>{var c;try{(c=n.value)==null||c.removeEventListener("scroll",l),r.unobserve(n.value),r.disconnect()}catch{}}),(c,u)=>{const f=a.resolveComponent("RouterLink");return a.openBlock(),a.createElementBlock("div",hu,[a.createElementVNode("div",{class:a.normalizeClass(["left-arrow",{active:o.value}]),onClick:u[0]||(u[0]=m=>s(!0))},u[2]||(u[2]=[a.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"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})],-1)]),2),a.createElementVNode("ul",{ref_key:"trackerContainer",ref:n},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.tabs,m=>(a.openBlock(),a.createBlock(f,{to:m.route,custom:!0},{default:a.withCtx(({navigate:y,isActive:E})=>[a.createElementVNode("li",{"data-active":E},[a.renderSlot(c.$slots,"item",{item:m,navigate:y,isActive:E},()=>[a.createElementVNode("a",{href:m.route,class:a.normalizeClass({active:E}),onClick:y},a.toDisplayString(m.text),11,yu)])],8,gu)]),_:2},1032,["to"]))),256))],512),a.createElementVNode("div",{class:a.normalizeClass(["right-arrow",{active:i.value}]),onClick:u[1]||(u[1]=m=>s())},u[3]||(u[3]=[a.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"},[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})],-1)]),2)])}}}),vu=["data-icon"],wu=a.defineComponent({__name:"Message",props:{color:{default:"info"},class:{},style:{type:[Boolean,null,String,Object,Array]},icon:{}},setup(t){const e=t,n=a.computed(()=>{if(e.icon)return e.icon;switch(e.color){case"error":return"cancel";case"info":return"info";case"warn":return"warning";case"success":return"check";case"help":return"help";default:return null}}),r=a.computed(()=>new je("sf-message").AddClass("sf-message-error",e.color==="error").AddClass("sf-message-info",e.color==="info").AddClass("sf-message-warning",e.color==="warn").AddClass("sf-message-success",e.color==="success").AddClass("sf-message-help",e.color==="help").AddClass("sf-message-primary",e.color==="primary").AddClass("sf-message-secondary",e.color==="secondary").AddClass(e.class).Build());return(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(r.value),"data-icon":n.value},[a.renderSlot(o.$slots,"default")],10,vu))}});function ir(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ar(t))||e){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(u){throw u},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
66
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,l;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return i=u.done,u},e:function(u){s=!0,l=u},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}}}function Eu(t){return Au(t)||Cu(t)||ar(t)||Su()}function Su(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
67
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cu(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Au(t){if(Array.isArray(t))return lr(t)}function Dt(t){"@babel/helpers - typeof";return Dt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(t)}function sr(t,e){return Iu(t)||_u(t,e)||ar(t,e)||ku()}function ku(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
68
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ar(t,e){if(t){if(typeof t=="string")return lr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lr(t,e)}}function lr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function _u(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(f){u=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function Iu(t){if(Array.isArray(t))return t}var F={innerWidth:function(e){if(e){var n=e.offsetWidth,r=getComputedStyle(e);return n+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}return 0},width:function(e){if(e){var n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),n}return 0},getWindowScrollTop:function(){var e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)},getWindowScrollLeft:function(){var e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)},getOuterWidth:function(e,n){if(e){var r=e.offsetWidth;if(n){var o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}return 0},getOuterHeight:function(e,n){if(e){var r=e.offsetHeight;if(n){var o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}return 0},getClientHeight:function(e,n){if(e){var r=e.clientHeight;if(n){var o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}return 0},getViewport:function(){var e=window,n=document,r=n.documentElement,o=n.getElementsByTagName("body")[0],i=e.innerWidth||r.clientWidth||o.clientWidth,s=e.innerHeight||r.clientHeight||o.clientHeight;return{width:i,height:s}},getOffset:function(e){if(e){var n=e.getBoundingClientRect();return{top:n.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:n.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}return{top:"auto",left:"auto"}},index:function(e){if(e)for(var n,r=(n=this.getParentNode(e))===null||n===void 0?void 0:n.childNodes,o=0,i=0;i<r.length;i++){if(r[i]===e)return o;r[i].nodeType===1&&o++}return-1},addMultipleClasses:function(e,n){var r=this;e&&n&&[n].flat().filter(Boolean).forEach(function(o){return o.split(" ").forEach(function(i){return r.addClass(e,i)})})},removeMultipleClasses:function(e,n){var r=this;e&&n&&[n].flat().filter(Boolean).forEach(function(o){return o.split(" ").forEach(function(i){return r.removeClass(e,i)})})},addClass:function(e,n){e&&n&&!this.hasClass(e,n)&&(e.classList?e.classList.add(n):e.className+=" "+n)},removeClass:function(e,n){e&&n&&(e.classList?e.classList.remove(n):e.className=e.className.replace(new RegExp("(^|\\b)"+n.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function(e,n){return e?e.classList?e.classList.contains(n):new RegExp("(^| )"+n+"( |$)","gi").test(e.className):!1},addStyles:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e&&Object.entries(n).forEach(function(r){var o=sr(r,2),i=o[0],s=o[1];return e.style[i]=s})},find:function(e,n){return this.isElement(e)?e.querySelectorAll(n):[]},findSingle:function(e,n){return this.isElement(e)?e.querySelector(n):null},createElement:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e){var r=document.createElement(e);this.setAttributes(r,n);for(var o=arguments.length,i=new Array(o>2?o-2:0),s=2;s<o;s++)i[s-2]=arguments[s];return r.append.apply(r,i),r}},setAttribute:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;this.isElement(e)&&r!==null&&r!==void 0&&e.setAttribute(n,r)},setAttributes:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.isElement(e)){var o=function i(s,l){var c,u,f=e!=null&&(c=e.$attrs)!==null&&c!==void 0&&c[s]?[e==null||(u=e.$attrs)===null||u===void 0?void 0:u[s]]:[];return[l].flat().reduce(function(m,y){if(y!=null){var E=Dt(y);if(E==="string"||E==="number")m.push(y);else if(E==="object"){var C=Array.isArray(y)?i(s,y):Object.entries(y).map(function(k){var S=sr(k,2),B=S[0],D=S[1];return s==="style"&&(D||D===0)?"".concat(B.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(D):D?B:void 0});m=C.length?m.concat(C.filter(function(k){return!!k})):m}}return m},f)};Object.entries(r).forEach(function(i){var s=sr(i,2),l=s[0],c=s[1];if(c!=null){var u=l.match(/^on(.+)/);u?e.addEventListener(u[1].toLowerCase(),c):l==="p-bind"?n.setAttributes(e,c):(c=l==="class"?Eu(new Set(o("class",c))).join(" ").trim():l==="style"?o("style",c).join(";").trim():c,(e.$attrs=e.$attrs||{})&&(e.$attrs[l]=c),e.setAttribute(l,c))}})}},getAttribute:function(e,n){if(this.isElement(e)){var r=e.getAttribute(n);return isNaN(r)?r==="true"||r==="false"?r==="true":r:+r}},isAttributeEquals:function(e,n,r){return this.isElement(e)?this.getAttribute(e,n)===r:!1},isAttributeNotEquals:function(e,n,r){return!this.isAttributeEquals(e,n,r)},getHeight:function(e){if(e){var n=e.offsetHeight,r=getComputedStyle(e);return n-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),n}return 0},getWidth:function(e){if(e){var n=e.offsetWidth,r=getComputedStyle(e);return n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),n}return 0},absolutePosition:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e){var o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=o.height,s=o.width,l=n.offsetHeight,c=n.offsetWidth,u=n.getBoundingClientRect(),f=this.getWindowScrollTop(),m=this.getWindowScrollLeft(),y=this.getViewport(),E,C,k="top";u.top+l+i>y.height?(E=u.top+f-i,k="bottom",E<0&&(E=f)):E=l+u.top+f,u.left+s>y.width?C=Math.max(0,u.left+m+c-s):C=u.left+m,e.style.top=E+"px",e.style.left=C+"px",e.style.transformOrigin=k,r&&(e.style.marginTop=k==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},relativePosition:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e){var o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=n.offsetHeight,s=n.getBoundingClientRect(),l=this.getViewport(),c,u,f="top";s.top+i+o.height>l.height?(c=-1*o.height,f="bottom",s.top+c<0&&(c=-1*s.top)):c=i,o.width>l.width?u=s.left*-1:s.left+o.width>l.width?u=(s.left+o.width-l.width)*-1:u=0,e.style.top=c+"px",e.style.left=u+"px",e.style.transformOrigin=f,r&&(e.style.marginTop=f==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}},nestedPosition:function(e,n){if(e){var r=e.parentElement,o=this.getOffset(r),i=this.getViewport(),s=e.offsetParent?e.offsetWidth:this.getHiddenElementOuterWidth(e),l=this.getOuterWidth(r.children[0]),c;parseInt(o.left,10)+l+s>i.width-this.calculateScrollbarWidth()?parseInt(o.left,10)<s?n%2===1?c=parseInt(o.left,10)?"-"+parseInt(o.left,10)+"px":"100%":n%2===0&&(c=i.width-s-this.calculateScrollbarWidth()+"px"):c="-100%":c="100%",e.style.top="0px",e.style.left=c}},getParentNode:function(e){var n=e==null?void 0:e.parentNode;return n&&n instanceof ShadowRoot&&n.host&&(n=n.host),n},getParents:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=this.getParentNode(e);return r===null?n:this.getParents(r,n.concat([r]))},getScrollableParents:function(e){var n=[];if(e){var r=this.getParents(e),o=/(auto|scroll)/,i=function(S){try{var B=window.getComputedStyle(S,null);return o.test(B.getPropertyValue("overflow"))||o.test(B.getPropertyValue("overflowX"))||o.test(B.getPropertyValue("overflowY"))}catch{return!1}},s=ir(r),l;try{for(s.s();!(l=s.n()).done;){var c=l.value,u=c.nodeType===1&&c.dataset.scrollselectors;if(u){var f=u.split(","),m=ir(f),y;try{for(m.s();!(y=m.n()).done;){var E=y.value,C=this.findSingle(c,E);C&&i(C)&&n.push(C)}}catch(k){m.e(k)}finally{m.f()}}c.nodeType!==9&&i(c)&&n.push(c)}}catch(k){s.e(k)}finally{s.f()}}return n},getHiddenElementOuterHeight:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var n=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",n}return 0},getHiddenElementOuterWidth:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var n=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",n}return 0},getHiddenElementDimensions:function(e){if(e){var n={};return e.style.visibility="hidden",e.style.display="block",n.width=e.offsetWidth,n.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",n}return 0},fadeIn:function(e,n){if(e){e.style.opacity=0;var r=+new Date,o=0,i=function s(){o=+e.style.opacity+(new Date().getTime()-r)/n,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};i()}},fadeOut:function(e,n){if(e)var r=1,o=50,i=n,s=o/i,l=setInterval(function(){r-=s,r<=0&&(r=0,clearInterval(l)),e.style.opacity=r},o)},getUserAgent:function(){return navigator.userAgent},appendChild:function(e,n){if(this.isElement(n))n.appendChild(e);else if(n.el&&n.elElement)n.elElement.appendChild(e);else throw new Error("Cannot append "+n+" to "+e)},isElement:function(e){return(typeof HTMLElement>"u"?"undefined":Dt(HTMLElement))==="object"?e instanceof HTMLElement:e&&Dt(e)==="object"&&e!==null&&e.nodeType===1&&typeof e.nodeName=="string"},scrollInView:function(e,n){var r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,i=getComputedStyle(e).getPropertyValue("paddingTop"),s=i?parseFloat(i):0,l=e.getBoundingClientRect(),c=n.getBoundingClientRect(),u=c.top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-s,f=e.scrollTop,m=e.clientHeight,y=this.getOuterHeight(n);u<0?e.scrollTop=f+u:u+y>m&&(e.scrollTop=f+u-m+y)},clearSelection:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null},calculateScrollbarWidth:function(){if(this.calculatedScrollbarWidth!=null)return this.calculatedScrollbarWidth;var e=document.createElement("div");this.addStyles(e,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(e);var n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),this.calculatedScrollbarWidth=n,n},calculateBodyScrollbarWidth:function(){return window.innerWidth-document.documentElement.offsetWidth},getBrowser:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser},resolveUserAgent:function(){var e=navigator.userAgent.toLowerCase(),n=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:n[1]||"",version:n[2]||"0"}},isVisible:function(e){return e&&e.offsetParent!=null},invokeElementMethod:function(e,n,r){e[n].apply(e,r)},isExist:function(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&this.getParentNode(e))},isClient:function(){return!!(typeof window<"u"&&window.document&&window.document.createElement)},focus:function(e,n){e&&document.activeElement!==e&&e.focus(n)},isFocusableElement:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.isElement(e)?e.matches('button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(n,`,
|
|
69
|
-
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
70
|
-
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
71
|
-
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
72
|
-
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
73
|
-
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
74
|
-
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n)):!1},getFocusableElements:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=this.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(n,`,
|
|
75
|
-
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
76
|
-
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
77
|
-
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
78
|
-
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
79
|
-
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n,`,
|
|
80
|
-
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n)),o=[],i=ir(r),s;try{for(i.s();!(s=i.n()).done;){var l=s.value;getComputedStyle(l).display!="none"&&getComputedStyle(l).visibility!="hidden"&&o.push(l)}}catch(c){i.e(c)}finally{i.f()}return o},getFirstFocusableElement:function(e,n){var r=this.getFocusableElements(e,n);return r.length>0?r[0]:null},getLastFocusableElement:function(e,n){var r=this.getFocusableElements(e,n);return r.length>0?r[r.length-1]:null},getNextFocusableElement:function(e,n,r){var o=this.getFocusableElements(e,r),i=o.length>0?o.findIndex(function(l){return l===n}):-1,s=i>-1&&o.length>=i+1?i+1:-1;return s>-1?o[s]:null},getPreviousElementSibling:function(e,n){for(var r=e.previousElementSibling;r;){if(r.matches(n))return r;r=r.previousElementSibling}return null},getNextElementSibling:function(e,n){for(var r=e.nextElementSibling;r;){if(r.matches(n))return r;r=r.nextElementSibling}return null},isClickable:function(e){if(e){var n=e.nodeName,r=e.parentElement&&e.parentElement.nodeName;return n==="INPUT"||n==="TEXTAREA"||n==="BUTTON"||n==="A"||r==="INPUT"||r==="TEXTAREA"||r==="BUTTON"||r==="A"||!!e.closest(".p-button, .p-checkbox, .p-radiobutton")}return!1},applyStyle:function(e,n){if(typeof n=="string")e.style.cssText=n;else for(var r in n)e.style[r]=n[r]},isIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},isAndroid:function(){return/(android)/i.test(navigator.userAgent)},isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},hasCSSAnimation:function(e){if(e){var n=getComputedStyle(e),r=parseFloat(n.getPropertyValue("animation-duration")||"0");return r>0}return!1},hasCSSTransition:function(e){if(e){var n=getComputedStyle(e),r=parseFloat(n.getPropertyValue("transition-duration")||"0");return r>0}return!1},exportCSV:function(e,n){var r=new Blob([e],{type:"application/csv;charset=utf-8;"});if(window.navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(r,n+".csv");else{var o=document.createElement("a");o.download!==void 0?(o.setAttribute("href",URL.createObjectURL(r)),o.setAttribute("download",n+".csv"),o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o)):(e="data:text/csv;charset=utf-8,"+e,window.open(encodeURI(e)))}},blockBodyScroll:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)},unblockBodyScroll:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}};function Go(t,e){return xu(t)||Tu(t,e)||ur(t,e)||Pu()}function Pu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tu(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(f){u=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function xu(t){if(Array.isArray(t))return t}function Yo(t){return Bu(t)||Lu(t)||ur(t)||Ou()}function Ou(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
82
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Lu(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Bu(t){if(Array.isArray(t))return dr(t)}function cr(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ur(t))||e){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(u){throw u},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
83
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,l;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return i=u.done,u},e:function(u){s=!0,l=u},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw l}}}}function ur(t,e){if(t){if(typeof t=="string")return dr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dr(t,e)}}function dr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Mt(t){"@babel/helpers - typeof";return Mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt(t)}var O={equals:function(e,n,r){return r?this.resolveFieldData(e,r)===this.resolveFieldData(n,r):this.deepEquals(e,n)},deepEquals:function(e,n){if(e===n)return!0;if(e&&n&&Mt(e)=="object"&&Mt(n)=="object"){var r=Array.isArray(e),o=Array.isArray(n),i,s,l;if(r&&o){if(s=e.length,s!=n.length)return!1;for(i=s;i--!==0;)if(!this.deepEquals(e[i],n[i]))return!1;return!0}if(r!=o)return!1;var c=e instanceof Date,u=n instanceof Date;if(c!=u)return!1;if(c&&u)return e.getTime()==n.getTime();var f=e instanceof RegExp,m=n instanceof RegExp;if(f!=m)return!1;if(f&&m)return e.toString()==n.toString();var y=Object.keys(e);if(s=y.length,s!==Object.keys(n).length)return!1;for(i=s;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,y[i]))return!1;for(i=s;i--!==0;)if(l=y[i],!this.deepEquals(e[l],n[l]))return!1;return!0}return e!==e&&n!==n},resolveFieldData:function(e,n){if(!e||!n)return null;try{var r=e[n];if(this.isNotEmpty(r))return r}catch{}if(Object.keys(e).length){if(this.isFunction(n))return n(e);if(n.indexOf(".")===-1)return e[n];for(var o=n.split("."),i=e,s=0,l=o.length;s<l;++s){if(i==null)return null;i=i[o[s]]}return i}return null},getItemValue:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return this.isFunction(e)?e.apply(void 0,r):e},filter:function(e,n,r){var o=[];if(e){var i=cr(e),s;try{for(i.s();!(s=i.n()).done;){var l=s.value,c=cr(n),u;try{for(c.s();!(u=c.n()).done;){var f=u.value;if(String(this.resolveFieldData(l,f)).toLowerCase().indexOf(r.toLowerCase())>-1){o.push(l);break}}}catch(m){c.e(m)}finally{c.f()}}}catch(m){i.e(m)}finally{i.f()}}return o},reorderArray:function(e,n,r){e&&n!==r&&(r>=e.length&&(r%=e.length,n%=e.length),e.splice(r,0,e.splice(n,1)[0]))},findIndexInList:function(e,n){var r=-1;if(n){for(var o=0;o<n.length;o++)if(n[o]===e){r=o;break}}return r},contains:function(e,n){if(e!=null&&n&&n.length){var r=cr(n),o;try{for(r.s();!(o=r.n()).done;){var i=o.value;if(this.equals(e,i))return!0}}catch(s){r.e(s)}finally{r.f()}}return!1},insertIntoOrderedArray:function(e,n,r,o){if(r.length>0){for(var i=!1,s=0;s<r.length;s++){var l=this.findIndexInList(r[s],o);if(l>n){r.splice(s,0,e),i=!0;break}}i||r.push(e)}else r.push(e)},removeAccents:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e},getVNodeProp:function(e,n){if(e){var r=e.props;if(r){var o=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=Object.prototype.hasOwnProperty.call(r,o)?o:n;return e.type.extends.props[n].type===Boolean&&r[i]===""?!0:r[i]}}return null},toFlatCase:function(e){return this.isString(e)?e.replace(/(-|_)/g,"").toLowerCase():e},toKebabCase:function(e){return this.isString(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,function(n,r){return r===0?n:"-"+n.toLowerCase()}).toLowerCase():e},toCapitalCase:function(e){return this.isString(e,{empty:!1})?e[0].toUpperCase()+e.slice(1):e},isEmpty:function(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&Mt(e)==="object"&&Object.keys(e).length===0},isNotEmpty:function(e){return!this.isEmpty(e)},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},isObject:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e instanceof Object&&e.constructor===Object&&(n||Object.keys(e).length!==0)},isDate:function(e){return e instanceof Date&&e.constructor===Date},isArray:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Array.isArray(e)&&(n||e.length!==0)},isString:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return typeof e=="string"&&(n||e!=="")},isPrintableCharacter:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return this.isNotEmpty(e)&&e.length===1&&e.match(/\S| /)},findLast:function(e,n){var r;if(this.isNotEmpty(e))try{r=e.findLast(n)}catch{r=Yo(e).reverse().find(n)}return r},findLastIndex:function(e,n){var r=-1;if(this.isNotEmpty(e))try{r=e.findLastIndex(n)}catch{r=e.lastIndexOf(Yo(e).reverse().find(n))}return r},sort:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,s=this.compare(e,n,o,r),l=r;return(this.isEmpty(e)||this.isEmpty(n))&&(l=i===1?r:i),l*s},compare:function(e,n,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=-1,s=this.isEmpty(e),l=this.isEmpty(n);return s&&l?i=0:s?i=o:l?i=-o:typeof e=="string"&&typeof n=="string"?i=r(e,n):i=e<n?-1:e>n?1:0,i},localeComparator:function(){return new Intl.Collator(void 0,{numeric:!0}).compare},nestedKeys:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return Object.entries(n).reduce(function(o,i){var s=Go(i,2),l=s[0],c=s[1],u=r?"".concat(r,".").concat(l):l;return e.isObject(c)?o=o.concat(e.nestedKeys(c,u)):o.push(u),o},[])},stringify:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=" ".repeat(o),s=" ".repeat(o+r);return this.isArray(e)?"["+e.map(function(l){return n.stringify(l,r,o+r)}).join(", ")+"]":this.isDate(e)?e.toISOString():this.isFunction(e)?e.toString():this.isObject(e)?`{
|
|
84
|
-
`+Object.entries(e).map(function(l){var c=Go(l,2),u=c[0],f=c[1];return"".concat(s).concat(u,": ").concat(n.stringify(f,r,o+r))}).join(`,
|
|
85
|
-
`)+`
|
|
86
|
-
`.concat(i)+"}":JSON.stringify(e)}},Jo=0;function Xo(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"pv_id_";return Jo++,"".concat(t).concat(Jo)}function Ut(t){"@babel/helpers - typeof";return Ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(t)}function Zo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Qo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zo(Object(n),!0).forEach(function(r){Ru(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zo(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ru(t,e,n){return e=$u(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $u(t){var e=Nu(t,"string");return Ut(e)=="symbol"?e:String(e)}function Nu(t,e){if(Ut(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ut(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Du(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a.getCurrentInstance()?a.onMounted(t):e?t():a.nextTick(t)}var Mu=0;function ei(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.ref(!1),r=a.ref(t),o=a.ref(null),i=F.isClient()?window.document:void 0,s=e.document,l=s===void 0?i:s,c=e.immediate,u=c===void 0?!0:c,f=e.manual,m=f===void 0?!1:f,y=e.name,E=y===void 0?"style_".concat(++Mu):y,C=e.id,k=C===void 0?void 0:C,S=e.media,B=S===void 0?void 0:S,D=e.nonce,q=D===void 0?void 0:D,we=e.props,$e=we===void 0?{}:we,rt=function(){},ke=function(G){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(l){var _e=Qo(Qo({},$e),it),Me=_e.name||E,Ue=_e.id||k,Qt=_e.nonce||q;o.value=l.querySelector('style[data-primevue-style-id="'.concat(Me,'"]'))||l.getElementById(Ue)||l.createElement("style"),o.value.isConnected||(r.value=G||t,F.setAttributes(o.value,{type:"text/css",id:Ue,media:B,nonce:Qt}),l.head.appendChild(o.value),F.setAttribute(o.value,"data-primevue-style-id",E),F.setAttributes(o.value,_e)),!n.value&&(rt=a.watch(r,function(st){o.value.textContent=st},{immediate:!0}),n.value=!0)}},Zt=function(){!l||!n.value||(rt(),F.isExist(o.value)&&l.head.removeChild(o.value),n.value=!1)};return u&&!m&&Du(ke),{id:k,name:E,css:r,unload:Zt,load:ke,isLoaded:a.readonly(n)}}function Ht(t){"@babel/helpers - typeof";return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(t)}function Uu(t,e){return Vu(t)||ju(t,e)||Fu(t,e)||Hu()}function Hu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
87
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fu(t,e){if(t){if(typeof t=="string")return ti(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ti(t,e)}}function ti(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ju(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(f){u=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function Vu(t){if(Array.isArray(t))return t}function ni(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function fr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ni(Object(n),!0).forEach(function(r){Ku(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ni(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ku(t,e,n){return e=Wu(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wu(t){var e=zu(t,"string");return Ht(e)=="symbol"?e:String(e)}function zu(t,e){if(Ht(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ht(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qu=`
|
|
88
|
-
.p-hidden-accessible {
|
|
89
|
-
border: 0;
|
|
90
|
-
clip: rect(0 0 0 0);
|
|
91
|
-
height: 1px;
|
|
92
|
-
margin: -1px;
|
|
93
|
-
overflow: hidden;
|
|
94
|
-
padding: 0;
|
|
95
|
-
position: absolute;
|
|
96
|
-
width: 1px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.p-hidden-accessible input,
|
|
100
|
-
.p-hidden-accessible select {
|
|
101
|
-
transform: scale(0);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.p-overflow-hidden {
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
padding-right: var(--scrollbar-width);
|
|
107
|
-
}
|
|
108
|
-
`,Gu={},Yu={},tt={name:"base",css:qu,classes:Gu,inlineStyles:Yu,loadStyle:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.css?ei(this.css,fr({name:this.name},e)):{}},getStyleSheet:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var r=Object.entries(n).reduce(function(o,i){var s=Uu(i,2),l=s[0],c=s[1];return o.push("".concat(l,'="').concat(c,'"'))&&o},[]).join(" ");return'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(r,">").concat(this.css).concat(e,"</style>")}return""},extend:function(e){return fr(fr({},this),{},{css:void 0},e)}};function Ft(t){"@babel/helpers - typeof";return Ft=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(t)}function ri(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ju(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ri(Object(n),!0).forEach(function(r){Xu(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ri(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Xu(t,e,n){return e=Zu(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zu(t){var e=Qu(t,"string");return Ft(e)=="symbol"?e:String(e)}function Qu(t,e){if(Ft(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ft(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var mr=tt.extend({name:"common",loadGlobalStyle:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ei(e,Ju({name:"global"},n))}});function jt(t){"@babel/helpers - typeof";return jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jt(t)}function ed(t){return ai(t)||td(t)||ii(t)||oi()}function td(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yn(t,e){return ai(t)||nd(t,e)||ii(t,e)||oi()}function oi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
109
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ii(t,e){if(t){if(typeof t=="string")return si(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return si(t,e)}}function si(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function nd(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(f){u=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function ai(t){if(Array.isArray(t))return t}function li(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function X(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?li(Object(n),!0).forEach(function(r){bn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):li(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bn(t,e,n){return e=rd(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rd(t){var e=od(t,"string");return jt(e)=="symbol"?e:String(e)}function od(t,e){if(jt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(jt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vn={name:"BaseComponent",props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(e){if(!e){var n,r;mr.loadStyle({nonce:(n=this.$primevueConfig)===null||n===void 0||(n=n.csp)===null||n===void 0?void 0:n.nonce}),this.$options.style&&this.$style.loadStyle({nonce:(r=this.$primevueConfig)===null||r===void 0||(r=r.csp)===null||r===void 0?void 0:r.nonce})}}}},beforeCreate:function(){var e,n,r,o,i,s,l,c,u,f,m,y=(e=this.pt)===null||e===void 0?void 0:e._usept,E=y?(n=this.pt)===null||n===void 0||(n=n.originalValue)===null||n===void 0?void 0:n[this.$.type.name]:void 0,C=y?(r=this.pt)===null||r===void 0||(r=r.value)===null||r===void 0?void 0:r[this.$.type.name]:this.pt;(o=C||E)===null||o===void 0||(o=o.hooks)===null||o===void 0||(i=o.onBeforeCreate)===null||i===void 0||i.call(o);var k=(s=this.$primevueConfig)===null||s===void 0||(s=s.pt)===null||s===void 0?void 0:s._usept,S=k?(l=this.$primevue)===null||l===void 0||(l=l.config)===null||l===void 0||(l=l.pt)===null||l===void 0?void 0:l.originalValue:void 0,B=k?(c=this.$primevue)===null||c===void 0||(c=c.config)===null||c===void 0||(c=c.pt)===null||c===void 0?void 0:c.value:(u=this.$primevue)===null||u===void 0||(u=u.config)===null||u===void 0?void 0:u.pt;(f=B||S)===null||f===void 0||(f=f[this.$.type.name])===null||f===void 0||(f=f.hooks)===null||f===void 0||(m=f.onBeforeCreate)===null||m===void 0||m.call(f)},created:function(){this._hook("onCreated")},beforeMount:function(){var e;tt.loadStyle({nonce:(e=this.$primevueConfig)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce}),this._loadGlobalStyles(),this._hook("onBeforeMount")},mounted:function(){this._hook("onMounted")},beforeUpdate:function(){this._hook("onBeforeUpdate")},updated:function(){this._hook("onUpdated")},beforeUnmount:function(){this._hook("onBeforeUnmount")},unmounted:function(){this._hook("onUnmounted")},methods:{_hook:function(e){if(!this.$options.hostName){var n=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,"hooks.".concat(e)),r=this._useDefaultPT(this._getOptionValue,"hooks.".concat(e));n==null||n(),r==null||r()}},_mergeProps:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return O.isFunction(e)?e.apply(void 0,r):a.mergeProps.apply(void 0,r)},_loadGlobalStyles:function(){var e,n=this._useGlobalPT(this._getOptionValue,"global.css",this.$params);O.isNotEmpty(n)&&mr.loadGlobalStyle(n,{nonce:(e=this.$primevueConfig)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce})},_getHostInstance:function(e){return e?this.$options.hostName?e.$.type.name===this.$options.hostName?e:this._getHostInstance(e.$parentInstance):e.$parentInstance:void 0},_getPropValue:function(e){var n;return this[e]||((n=this._getHostInstance(this))===null||n===void 0?void 0:n[e])},_getOptionValue:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=O.toFlatCase(n).split("."),i=o.shift();return i?O.isObject(e)?this._getOptionValue(O.getItemValue(e[Object.keys(e).find(function(s){return O.toFlatCase(s)===i})||""],r),o.join("."),r):void 0:O.getItemValue(e,r)},_getPTValue:function(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=/./g.test(r)&&!!o[r.split(".")[0]],l=this._getPropValue("ptOptions")||((e=this.$primevueConfig)===null||e===void 0?void 0:e.ptOptions)||{},c=l.mergeSections,u=c===void 0?!0:c,f=l.mergeProps,m=f===void 0?!1:f,y=i?s?this._useGlobalPT(this._getPTClassValue,r,o):this._useDefaultPT(this._getPTClassValue,r,o):void 0,E=s?void 0:this._getPTSelf(n,this._getPTClassValue,r,X(X({},o),{},{global:y||{}})),C=this._getPTDatasets(r);return u||!u&&E?m?this._mergeProps(m,y,E,C):X(X(X({},y),E),C):X(X({},E),C)},_getPTSelf:function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return a.mergeProps(this._usePT.apply(this,[this._getPT(e,this.$name)].concat(r)),this._usePT.apply(this,[this.$_attrsPT].concat(r)))},_getPTDatasets:function(){var e,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o="data-pc-",i=r==="root"&&O.isNotEmpty((e=this.pt)===null||e===void 0?void 0:e["data-pc-section"]);return r!=="transition"&&X(X({},r==="root"&&X(bn({},"".concat(o,"name"),O.toFlatCase(i?(n=this.pt)===null||n===void 0?void 0:n["data-pc-section"]:this.$.type.name)),i&&bn({},"".concat(o,"extend"),O.toFlatCase(this.$.type.name)))),{},bn({},"".concat(o,"section"),O.toFlatCase(r)))},_getPTClassValue:function(){var e=this._getOptionValue.apply(this,arguments);return O.isString(e)||O.isArray(e)?{class:e}:e},_getPT:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0,i=function(l){var c,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=o?o(l):l,m=O.toFlatCase(r),y=O.toFlatCase(n.$name);return(c=u?m!==y?f==null?void 0:f[m]:void 0:f==null?void 0:f[m])!==null&&c!==void 0?c:f};return e!=null&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:i(e.originalValue),value:i(e.value)}:i(e,!0)},_usePT:function(e,n,r,o){var i=function(k){return n(k,r,o)};if(e!=null&&e.hasOwnProperty("_usept")){var s,l=e._usept||((s=this.$primevueConfig)===null||s===void 0?void 0:s.ptOptions)||{},c=l.mergeSections,u=c===void 0?!0:c,f=l.mergeProps,m=f===void 0?!1:f,y=i(e.originalValue),E=i(e.value);return y===void 0&&E===void 0?void 0:O.isString(E)?E:O.isString(y)?y:u||!u&&E?m?this._mergeProps(m,y,E):X(X({},y),E):E}return i(e)},_useGlobalPT:function(e,n,r){return this._usePT(this.globalPT,e,n,r)},_useDefaultPT:function(e,n,r){return this._usePT(this.defaultPT,e,n,r)},ptm:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,e,X(X({},this.$params),n))},ptmi:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a.mergeProps(this.$_attrsNoPT,this.ptm(e,n))},ptmo:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(e,n,X({instance:this},r),!1)},cx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,e,X(X({},this.$params),n))},sx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(n){var o=this._getOptionValue(this.$style.inlineStyles,e,X(X({},this.$params),r)),i=this._getOptionValue(mr.inlineStyles,e,X(X({},this.$params),r));return[i,o]}}},computed:{globalPT:function(){var e,n=this;return this._getPT((e=this.$primevueConfig)===null||e===void 0?void 0:e.pt,void 0,function(r){return O.getItemValue(r,{instance:n})})},defaultPT:function(){var e,n=this;return this._getPT((e=this.$primevueConfig)===null||e===void 0?void 0:e.pt,void 0,function(r){return n._getOptionValue(r,n.$name,X({},n.$params))||O.getItemValue(r,X({},n.$params))})},isUnstyled:function(){var e;return this.unstyled!==void 0?this.unstyled:(e=this.$primevueConfig)===null||e===void 0?void 0:e.unstyled},$params:function(){var e=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:e,props:e==null?void 0:e.$props,state:e==null?void 0:e.$data,attrs:e==null?void 0:e.$attrs},parentInstance:e}},$style:function(){return X(X({classes:void 0,inlineStyles:void 0,loadStyle:function(){},loadCustomStyle:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$primevueConfig:function(){var e;return(e=this.$primevue)===null||e===void 0?void 0:e.config},$name:function(){return this.$options.hostName||this.$.type.name},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=yn(e,1),r=n[0];return r==null?void 0:r.startsWith("pt:")}).reduce(function(e,n){var r=yn(n,2),o=r[0],i=r[1],s=o.split(":"),l=ed(s),c=l.slice(1);return c==null||c.reduce(function(u,f,m,y){return!u[f]&&(u[f]=m===y.length-1?i:{}),u[f]},e),e},{})},$_attrsNoPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var n=yn(e,1),r=n[0];return!(r!=null&&r.startsWith("pt:"))}).reduce(function(e,n){var r=yn(n,2),o=r[0],i=r[1];return e[o]=i,e},{})}}},id=`
|
|
110
|
-
.p-icon {
|
|
111
|
-
display: inline-block;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.p-icon-spin {
|
|
115
|
-
-webkit-animation: p-icon-spin 2s infinite linear;
|
|
116
|
-
animation: p-icon-spin 2s infinite linear;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@-webkit-keyframes p-icon-spin {
|
|
120
|
-
0% {
|
|
121
|
-
-webkit-transform: rotate(0deg);
|
|
122
|
-
transform: rotate(0deg);
|
|
123
|
-
}
|
|
124
|
-
100% {
|
|
125
|
-
-webkit-transform: rotate(359deg);
|
|
126
|
-
transform: rotate(359deg);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
@keyframes p-icon-spin {
|
|
131
|
-
0% {
|
|
132
|
-
-webkit-transform: rotate(0deg);
|
|
133
|
-
transform: rotate(0deg);
|
|
134
|
-
}
|
|
135
|
-
100% {
|
|
136
|
-
-webkit-transform: rotate(359deg);
|
|
137
|
-
transform: rotate(359deg);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
`,sd=tt.extend({name:"baseicon",css:id});function Vt(t){"@babel/helpers - typeof";return Vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vt(t)}function ci(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ui(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ci(Object(n),!0).forEach(function(r){ad(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ad(t,e,n){return e=ld(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ld(t){var e=cd(t,"string");return Vt(e)=="symbol"?e:String(e)}function cd(t,e){if(Vt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Vt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var di={name:"BaseIcon",extends:vn,props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},style:sd,methods:{pti:function(){var e=O.isEmpty(this.label);return ui(ui({},!this.isUnstyled&&{class:["p-icon",{"p-icon-spin":this.spin}]}),{},{role:e?void 0:"img","aria-label":e?void 0:this.label,"aria-hidden":e})}}},pr={name:"ChevronDownIcon",extends:di},ud=a.createElementVNode("path",{d:"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z",fill:"currentColor"},null,-1),dd=[ud];function fd(t,e,n,r,o,i){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),dd,16)}pr.render=fd;var hr={name:"ChevronRightIcon",extends:di},md=a.createElementVNode("path",{d:"M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z",fill:"currentColor"},null,-1),pd=[md];function hd(t,e,n,r,o,i){return a.openBlock(),a.createElementBlock("svg",a.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),pd,16)}hr.render=hd;var gd={root:"p-panelmenu p-component",panel:"p-panelmenu-panel",header:function(e){var n=e.instance,r=e.item;return["p-panelmenu-header",{"p-highlight":n.isItemActive(r)&&!!r.items,"p-disabled":n.isItemDisabled(r)}]},headerContent:"p-panelmenu-header-content",headerAction:"p-panelmenu-header-action",headerIcon:"p-menuitem-icon",headerLabel:"p-menuitem-text",toggleableContent:"p-toggleable-content",menuContent:"p-panelmenu-content",menu:"p-panelmenu-root-list",menuitem:function(e){var n=e.instance,r=e.processedItem;return["p-menuitem",{"p-focus":n.isItemFocused(r),"p-disabled":n.isItemDisabled(r)}]},content:"p-menuitem-content",action:"p-menuitem-link",icon:"p-menuitem-icon",label:"p-menuitem-text",submenuIcon:"p-submenu-icon",submenu:"p-submenu-list",separator:"p-menuitem-separator"},yd=tt.extend({name:"panelmenu",classes:gd});function Kt(t){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(t)}function fi(t,e){return Ed(t)||wd(t,e)||vd(t,e)||bd()}function bd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
141
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vd(t,e){if(t){if(typeof t=="string")return mi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mi(t,e)}}function mi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wd(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(f){u=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function Ed(t){if(Array.isArray(t))return t}function pi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?pi(Object(n),!0).forEach(function(r){gr(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function gr(t,e,n){return e=Sd(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sd(t){var e=Cd(t,"string");return Kt(e)=="symbol"?e:String(e)}function Cd(t,e){if(Kt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Kt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var z={_getMeta:function(){return[O.isObject(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],O.getItemValue(O.isObject(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getConfig:function(e,n){var r,o,i;return(r=(e==null||(o=e.instance)===null||o===void 0?void 0:o.$primevue)||(n==null||(i=n.ctx)===null||i===void 0||(i=i.appContext)===null||i===void 0||(i=i.config)===null||i===void 0||(i=i.globalProperties)===null||i===void 0?void 0:i.$primevue))===null||r===void 0?void 0:r.config},_getOptionValue:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=O.toFlatCase(n).split("."),i=o.shift();return i?O.isObject(e)?z._getOptionValue(O.getItemValue(e[Object.keys(e).find(function(s){return O.toFlatCase(s)===i})||""],r),o.join("."),r):void 0:O.getItemValue(e,r)},_getPTValue:function(){var e,n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,c=function(){var D=z._getOptionValue.apply(z,arguments);return O.isString(D)||O.isArray(D)?{class:D}:D},u=((e=r.binding)===null||e===void 0||(e=e.value)===null||e===void 0?void 0:e.ptOptions)||((n=r.$primevueConfig)===null||n===void 0?void 0:n.ptOptions)||{},f=u.mergeSections,m=f===void 0?!0:f,y=u.mergeProps,E=y===void 0?!1:y,C=l?z._useDefaultPT(r,r.defaultPT(),c,i,s):void 0,k=z._usePT(r,z._getPT(o,r.$name),c,i,Z(Z({},s),{},{global:C||{}})),S=z._getPTDatasets(r,i);return m||!m&&k?E?z._mergeProps(r,E,C,k,S):Z(Z(Z({},C),k),S):Z(Z({},k),S)},_getPTDatasets:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r="data-pc-";return Z(Z({},n==="root"&&gr({},"".concat(r,"name"),O.toFlatCase(e.$name))),{},gr({},"".concat(r,"section"),O.toFlatCase(n)))},_getPT:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,o=function(s){var l,c=r?r(s):s,u=O.toFlatCase(n);return(l=c==null?void 0:c[u])!==null&&l!==void 0?l:c};return e!=null&&e.hasOwnProperty("_usept")?{_usept:e._usept,originalValue:o(e.originalValue),value:o(e.value)}:o(e)},_usePT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,s=function(S){return r(S,o,i)};if(n!=null&&n.hasOwnProperty("_usept")){var l,c=n._usept||((l=e.$primevueConfig)===null||l===void 0?void 0:l.ptOptions)||{},u=c.mergeSections,f=u===void 0?!0:u,m=c.mergeProps,y=m===void 0?!1:m,E=s(n.originalValue),C=s(n.value);return E===void 0&&C===void 0?void 0:O.isString(C)?C:O.isString(E)?E:f||!f&&C?y?z._mergeProps(e,y,E,C):Z(Z({},E),C):C}return s(n)},_useDefaultPT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return z._usePT(e,n,r,o,i)},_hook:function(e,n,r,o,i,s){var l,c,u="on".concat(O.toCapitalCase(n)),f=z._getConfig(o,i),m=r==null?void 0:r.$instance,y=z._usePT(m,z._getPT(o==null||(l=o.value)===null||l===void 0?void 0:l.pt,e),z._getOptionValue,"hooks.".concat(u)),E=z._useDefaultPT(m,f==null||(c=f.pt)===null||c===void 0||(c=c.directives)===null||c===void 0?void 0:c[e],z._getOptionValue,"hooks.".concat(u)),C={el:r,binding:o,vnode:i,prevVnode:s};y==null||y(m,C),E==null||E(m,C)},_mergeProps:function(){for(var e=arguments.length>1?arguments[1]:void 0,n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return O.isFunction(e)?e.apply(void 0,r):a.mergeProps.apply(void 0,r)},_extend:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=function(i,s,l,c,u){var f,m;s._$instances=s._$instances||{};var y=z._getConfig(l,c),E=s._$instances[e]||{},C=O.isEmpty(E)?Z(Z({},n),n==null?void 0:n.methods):{};s._$instances[e]=Z(Z({},E),{},{$name:e,$host:s,$binding:l,$modifiers:l==null?void 0:l.modifiers,$value:l==null?void 0:l.value,$el:E.$el||s||void 0,$style:Z({classes:void 0,inlineStyles:void 0,loadStyle:function(){}},n==null?void 0:n.style),$primevueConfig:y,defaultPT:function(){return z._getPT(y==null?void 0:y.pt,void 0,function(S){var B;return S==null||(B=S.directives)===null||B===void 0?void 0:B[e]})},isUnstyled:function(){var S,B;return((S=s.$instance)===null||S===void 0||(S=S.$binding)===null||S===void 0||(S=S.value)===null||S===void 0?void 0:S.unstyled)!==void 0?(B=s.$instance)===null||B===void 0||(B=B.$binding)===null||B===void 0||(B=B.value)===null||B===void 0?void 0:B.unstyled:y==null?void 0:y.unstyled},ptm:function(){var S,B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return z._getPTValue(s.$instance,(S=s.$instance)===null||S===void 0||(S=S.$binding)===null||S===void 0||(S=S.value)===null||S===void 0?void 0:S.pt,B,Z({},D))},ptmo:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return z._getPTValue(s.$instance,S,B,D,!1)},cx:function(){var S,B,D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(S=s.$instance)!==null&&S!==void 0&&S.isUnstyled()?void 0:z._getOptionValue((B=s.$instance)===null||B===void 0||(B=B.$style)===null||B===void 0?void 0:B.classes,D,Z({},q))},sx:function(){var S,B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return D?z._getOptionValue((S=s.$instance)===null||S===void 0||(S=S.$style)===null||S===void 0?void 0:S.inlineStyles,B,Z({},q)):void 0}},C),s.$instance=s._$instances[e],(f=(m=s.$instance)[i])===null||f===void 0||f.call(m,s,l,c,u),s["$".concat(e)]=s.$instance,z._hook(e,i,s,l,c,u)};return{created:function(i,s,l,c){r("created",i,s,l,c)},beforeMount:function(i,s,l,c){var u,f,m,y,E=z._getConfig(s,l);tt.loadStyle({nonce:E==null||(u=E.csp)===null||u===void 0?void 0:u.nonce}),!((f=i.$instance)!==null&&f!==void 0&&f.isUnstyled())&&((m=i.$instance)===null||m===void 0||(m=m.$style)===null||m===void 0||m.loadStyle({nonce:E==null||(y=E.csp)===null||y===void 0?void 0:y.nonce})),r("beforeMount",i,s,l,c)},mounted:function(i,s,l,c){var u,f,m,y,E=z._getConfig(s,l);tt.loadStyle({nonce:E==null||(u=E.csp)===null||u===void 0?void 0:u.nonce}),!((f=i.$instance)!==null&&f!==void 0&&f.isUnstyled())&&((m=i.$instance)===null||m===void 0||(m=m.$style)===null||m===void 0||m.loadStyle({nonce:E==null||(y=E.csp)===null||y===void 0?void 0:y.nonce})),r("mounted",i,s,l,c)},beforeUpdate:function(i,s,l,c){r("beforeUpdate",i,s,l,c)},updated:function(i,s,l,c){r("updated",i,s,l,c)},beforeUnmount:function(i,s,l,c){r("beforeUnmount",i,s,l,c)},unmounted:function(i,s,l,c){r("unmounted",i,s,l,c)}}},extend:function(){var e=z._getMeta.apply(z,arguments),n=fi(e,2),r=n[0],o=n[1];return Z({extend:function(){var s=z._getMeta.apply(z,arguments),l=fi(s,2),c=l[0],u=l[1];return z.extend(c,Z(Z(Z({},o),o==null?void 0:o.methods),u))}},z._extend(r,o))}},Ad={root:"p-ink"},kd=tt.extend({name:"ripple",classes:Ad}),_d=z.extend({style:kd});function Id(t){return Od(t)||xd(t)||Td(t)||Pd()}function Pd(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
142
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Td(t,e){if(t){if(typeof t=="string")return yr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yr(t,e)}}function xd(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Od(t){if(Array.isArray(t))return yr(t)}function yr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ld=_d.extend("ripple",{mounted:function(e){var n,r=e==null||(n=e.$instance)===null||n===void 0?void 0:n.$primevueConfig;r&&r.ripple&&(this.create(e),this.bindEvents(e),e.setAttribute("data-pd-ripple",!0))},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener("mousedown",this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener("mousedown",this.onMouseDown.bind(this))},create:function(e){var n=F.createElement("span",{role:"presentation","aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx("root"),onAnimationEnd:this.onAnimationEnd.bind(this),"p-bind":this.ptm("root")});e.appendChild(n),this.$el=n},remove:function(e){var n=this.getInk(e);n&&(this.unbindEvents(e),n.removeEventListener("animationend",this.onAnimationEnd),n.remove())},onMouseDown:function(e){var n=this,r=e.currentTarget,o=this.getInk(r);if(!(!o||getComputedStyle(o,null).display==="none")){if(!this.isUnstyled()&&F.removeClass(o,"p-ink-active"),o.setAttribute("data-p-ink-active","false"),!F.getHeight(o)&&!F.getWidth(o)){var i=Math.max(F.getOuterWidth(r),F.getOuterHeight(r));o.style.height=i+"px",o.style.width=i+"px"}var s=F.getOffset(r),l=e.pageX-s.left+document.body.scrollTop-F.getWidth(o)/2,c=e.pageY-s.top+document.body.scrollLeft-F.getHeight(o)/2;o.style.top=c+"px",o.style.left=l+"px",!this.isUnstyled()&&F.addClass(o,"p-ink-active"),o.setAttribute("data-p-ink-active","true"),this.timeout=setTimeout(function(){o&&(!n.isUnstyled()&&F.removeClass(o,"p-ink-active"),o.setAttribute("data-p-ink-active","false"))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&F.removeClass(e.currentTarget,"p-ink-active"),e.currentTarget.setAttribute("data-p-ink-active","false")},getInk:function(e){return e&&e.children?Id(e.children).find(function(n){return F.getAttribute(n,"data-pc-name")==="ripple"}):void 0}}}),Bd={name:"BasePanelMenu",extends:vn,props:{model:{type:Array,default:null},expandedKeys:{type:Object,default:null},multiple:{type:Boolean,default:!1},tabindex:{type:Number,default:0}},style:yd,provide:function(){return{$parentInstance:this}}},hi={name:"PanelMenuSub",hostName:"PanelMenu",extends:vn,emits:["item-toggle","item-mousemove"],props:{panelId:{type:String,default:null},focusedItemId:{type:String,default:null},items:{type:Array,default:null},level:{type:Number,default:0},templates:{type:Object,default:null},activeItemPath:{type:Object,default:null},tabindex:{type:Number,default:-1}},methods:{getItemId:function(e){return"".concat(this.panelId,"_").concat(e.key)},getItemKey:function(e){return this.getItemId(e)},getItemProp:function(e,n,r){return e&&e.item?O.getItemValue(e.item[n],r):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,n,r){return this.ptm(e,{context:{item:n,index:r,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n)}})},isItemActive:function(e){return this.activeItemPath.some(function(n){return n.key===e.key})},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return this.focusedItemId===this.getItemId(e)},isItemGroup:function(e){return O.isNotEmpty(e.items)},onItemClick:function(e,n){this.getItemProp(n,"command",{originalEvent:e,item:n.item}),this.$emit("item-toggle",{processedItem:n,expanded:!this.isItemActive(n)})},onItemToggle:function(e){this.$emit("item-toggle",e)},onItemMouseMove:function(e,n){this.$emit("item-mousemove",{originalEvent:e,processedItem:n})},getAriaSetSize:function(){var e=this;return this.items.filter(function(n){return e.isItemVisible(n)&&!e.getItemProp(n,"separator")}).length},getAriaPosInset:function(e){var n=this;return e-this.items.slice(0,e).filter(function(r){return n.isItemVisible(r)&&n.getItemProp(r,"separator")}).length+1},getMenuItemProps:function(e,n){return{action:a.mergeProps({class:this.cx("action"),tabindex:-1,"aria-hidden":!0},this.getPTOptions("action",e,n)),icon:a.mergeProps({class:[this.cx("icon"),this.getItemProp(e,"icon")]},this.getPTOptions("icon",e,n)),label:a.mergeProps({class:this.cx("label")},this.getPTOptions("label",e,n)),submenuicon:a.mergeProps({class:this.cx("submenuIcon")},this.getPTOptions("submenuicon",e,n))}}},components:{ChevronRightIcon:hr,ChevronDownIcon:pr},directives:{ripple:Ld}},Rd=["tabindex"],$d=["id","aria-label","aria-expanded","aria-level","aria-setsize","aria-posinset","data-p-focused","data-p-disabled"],Nd=["onClick","onMousemove"],Dd=["href","target"];function Md(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuSub",!0),l=a.resolveDirective("ripple");return a.openBlock(),a.createElementBlock("ul",{class:a.normalizeClass(t.cx("submenu")),tabindex:n.tabindex},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n.items,function(c,u){return a.openBlock(),a.createElementBlock(a.Fragment,{key:i.getItemKey(c)},[i.isItemVisible(c)&&!i.getItemProp(c,"separator")?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:0,id:i.getItemId(c),class:[t.cx("menuitem",{processedItem:c}),i.getItemProp(c,"class")],style:i.getItemProp(c,"style"),role:"treeitem","aria-label":i.getItemLabel(c),"aria-expanded":i.isItemGroup(c)?i.isItemActive(c):void 0,"aria-level":n.level+1,"aria-setsize":i.getAriaSetSize(),"aria-posinset":i.getAriaPosInset(u)},i.getPTOptions("menuitem",c,u),{"data-p-focused":i.isItemFocused(c),"data-p-disabled":i.isItemDisabled(c)}),[a.createElementVNode("div",a.mergeProps({class:t.cx("content"),onClick:function(m){return i.onItemClick(m,c)},onMousemove:function(m){return i.onItemMouseMove(m,c)}},i.getPTOptions("content",c,u)),[n.templates.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.item),{key:1,item:c.item,root:!1,active:i.isItemActive(c),hasSubmenu:i.isItemGroup(c),label:i.getItemLabel(c),props:i.getMenuItemProps(c,u)},null,8,["item","active","hasSubmenu","label","props"])):a.withDirectives((a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:i.getItemProp(c,"url"),class:t.cx("action"),target:i.getItemProp(c,"target"),tabindex:"-1","aria-hidden":"true"},i.getPTOptions("action",c,u)),[i.isItemGroup(c)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[n.templates.submenuicon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.submenuicon),a.mergeProps({key:0,class:t.cx("submenuIcon"),active:i.isItemActive(c)},i.getPTOptions("submenuIcon",c,u)),null,16,["class","active"])):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.isItemActive(c)?"ChevronDownIcon":"ChevronRightIcon"),a.mergeProps({key:1,class:t.cx("submenuIcon")},i.getPTOptions("submenuIcon",c,u)),null,16,["class"]))],64)):a.createCommentVNode("",!0),n.templates.itemicon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(n.templates.itemicon),{key:1,item:c.item,class:a.normalizeClass(t.cx("icon"))},null,8,["item","class"])):i.getItemProp(c,"icon")?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:2,class:[t.cx("icon"),i.getItemProp(c,"icon")]},i.getPTOptions("icon",c,u)),null,16)):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:t.cx("label")},i.getPTOptions("label",c,u)),a.toDisplayString(i.getItemLabel(c)),17)],16,Dd)),[[l]])],16,Nd),a.createVNode(a.Transition,a.mergeProps({name:"p-toggleable-content"},t.ptm("transition")),{default:a.withCtx(function(){return[a.withDirectives(a.createElementVNode("div",a.mergeProps({class:t.cx("toggleableContent")},t.ptm("toggleableContent")),[i.isItemVisible(c)&&i.isItemGroup(c)?(a.openBlock(),a.createBlock(s,a.mergeProps({key:0,id:i.getItemId(c)+"_list",role:"group",panelId:n.panelId,focusedItemId:n.focusedItemId,items:c.items,level:n.level+1,templates:n.templates,activeItemPath:n.activeItemPath,onItemToggle:i.onItemToggle,onItemMousemove:e[0]||(e[0]=function(f){return t.$emit("item-mousemove",f)}),pt:t.pt,unstyled:t.unstyled},t.ptm("submenu")),null,16,["id","panelId","focusedItemId","items","level","templates","activeItemPath","onItemToggle","pt","unstyled"])):a.createCommentVNode("",!0)],16),[[a.vShow,i.isItemActive(c)]])]}),_:2},1040)],16,$d)):a.createCommentVNode("",!0),i.isItemVisible(c)&&i.getItemProp(c,"separator")?(a.openBlock(),a.createElementBlock("li",a.mergeProps({key:1,style:i.getItemProp(c,"style"),class:[t.cx("separator"),i.getItemProp(c,"class")],role:"separator"},t.ptm("separator")),null,16)):a.createCommentVNode("",!0)],64)}),128))],10,Rd)}hi.render=Md;function Ud(t,e){return Vd(t)||jd(t,e)||Fd(t,e)||Hd()}function Hd(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
143
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fd(t,e){if(t){if(typeof t=="string")return gi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gi(t,e)}}function gi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function jd(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,i,s,l=[],c=!0,u=!1;try{if(i=(n=n.call(t)).next,e!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);c=!0);}catch(f){u=!0,o=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return l}}function Vd(t){if(Array.isArray(t))return t}var yi={name:"PanelMenuList",hostName:"PanelMenu",extends:vn,emits:["item-toggle","header-focus"],props:{panelId:{type:String,default:null},items:{type:Array,default:null},templates:{type:Object,default:null},expandedKeys:{type:Object,default:null}},searchTimeout:null,searchValue:null,data:function(){return{focused:!1,focusedItem:null,activeItemPath:[]}},watch:{expandedKeys:function(e){this.autoUpdateActiveItemPath(e)}},mounted:function(){this.autoUpdateActiveItemPath(this.expandedKeys)},methods:{getItemProp:function(e,n){return e&&e.item?O.getItemValue(e.item[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemActive:function(e){return this.activeItemPath.some(function(n){return n.key===e.parentKey})},isItemGroup:function(e){return O.isNotEmpty(e.items)},onFocus:function(e){this.focused=!0,this.focusedItem=this.focusedItem||(this.isElementInPanel(e,e.relatedTarget)?this.findFirstItem():this.findLastItem())},onBlur:function(){this.focused=!1,this.focusedItem=null,this.searchValue=""},onKeyDown:function(e){var n=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":case"Tab":case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!n&&O.isPrintableCharacter(e.key)&&this.searchItems(e,e.key);break}},onArrowDownKey:function(e){var n=O.isNotEmpty(this.focusedItem)?this.findNextItem(this.focusedItem):this.findFirstItem();this.changeFocusedItem({originalEvent:e,processedItem:n,focusOnNext:!0}),e.preventDefault()},onArrowUpKey:function(e){var n=O.isNotEmpty(this.focusedItem)?this.findPrevItem(this.focusedItem):this.findLastItem();this.changeFocusedItem({originalEvent:e,processedItem:n,selfCheck:!0}),e.preventDefault()},onArrowLeftKey:function(e){var n=this;if(O.isNotEmpty(this.focusedItem)){var r=this.activeItemPath.some(function(o){return o.key===n.focusedItem.key});r?this.activeItemPath=this.activeItemPath.filter(function(o){return o.key!==n.focusedItem.key}):this.focusedItem=O.isNotEmpty(this.focusedItem.parent)?this.focusedItem.parent:this.focusedItem,e.preventDefault()}},onArrowRightKey:function(e){var n=this;if(O.isNotEmpty(this.focusedItem)){var r=this.isItemGroup(this.focusedItem);if(r){var o=this.activeItemPath.some(function(i){return i.key===n.focusedItem.key});o?this.onArrowDownKey(e):(this.activeItemPath=this.activeItemPath.filter(function(i){return i.parentKey!==n.focusedItem.parentKey}),this.activeItemPath.push(this.focusedItem))}e.preventDefault()}},onHomeKey:function(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findFirstItem(),allowHeaderFocus:!1}),e.preventDefault()},onEndKey:function(e){this.changeFocusedItem({originalEvent:e,processedItem:this.findLastItem(),focusOnNext:!0,allowHeaderFocus:!1}),e.preventDefault()},onEnterKey:function(e){if(O.isNotEmpty(this.focusedItem)){var n=F.findSingle(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]')),r=n&&(F.findSingle(n,'[data-pc-section="action"]')||F.findSingle(n,"a,button"));r?r.click():n&&n.click()}e.preventDefault()},onSpaceKey:function(e){this.onEnterKey(e)},onItemToggle:function(e){var n=e.processedItem,r=e.expanded;this.expandedKeys?this.$emit("item-toggle",{item:n.item,expanded:r}):(this.activeItemPath=this.activeItemPath.filter(function(o){return o.parentKey!==n.parentKey}),r&&this.activeItemPath.push(n)),this.focusedItem=n,F.focus(this.$el)},onItemMouseMove:function(e){this.focused&&(this.focusedItem=e.processedItem)},isElementInPanel:function(e,n){var r=e.currentTarget.closest('[data-pc-section="panel"]');return r&&r.contains(n)},isItemMatched:function(e){var n;return this.isValidItem(e)&&((n=this.getItemLabel(e))===null||n===void 0?void 0:n.toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue.toLocaleLowerCase(this.searchLocale)))},isVisibleItem:function(e){return!!e&&(e.level===0||this.isItemActive(e))&&this.isItemVisible(e)},isValidItem:function(e){return!!e&&!this.isItemDisabled(e)&&!this.getItemProp(e,"separator")},findFirstItem:function(){var e=this;return this.visibleItems.find(function(n){return e.isValidItem(n)})},findLastItem:function(){var e=this;return O.findLast(this.visibleItems,function(n){return e.isValidItem(n)})},findNextItem:function(e){var n=this,r=this.visibleItems.findIndex(function(i){return i.key===e.key}),o=r<this.visibleItems.length-1?this.visibleItems.slice(r+1).find(function(i){return n.isValidItem(i)}):void 0;return o||e},findPrevItem:function(e){var n=this,r=this.visibleItems.findIndex(function(i){return i.key===e.key}),o=r>0?O.findLast(this.visibleItems.slice(0,r),function(i){return n.isValidItem(i)}):void 0;return o||e},searchItems:function(e,n){var r=this;this.searchValue=(this.searchValue||"")+n;var o=null,i=!1;if(O.isNotEmpty(this.focusedItem)){var s=this.visibleItems.findIndex(function(l){return l.key===r.focusedItem.key});o=this.visibleItems.slice(s).find(function(l){return r.isItemMatched(l)}),o=O.isEmpty(o)?this.visibleItems.slice(0,s).find(function(l){return r.isItemMatched(l)}):o}else o=this.visibleItems.find(function(l){return r.isItemMatched(l)});return O.isNotEmpty(o)&&(i=!0),O.isEmpty(o)&&O.isEmpty(this.focusedItem)&&(o=this.findFirstItem()),O.isNotEmpty(o)&&this.changeFocusedItem({originalEvent:e,processedItem:o,allowHeaderFocus:!1}),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){r.searchValue="",r.searchTimeout=null},500),i},changeFocusedItem:function(e){var n=e.originalEvent,r=e.processedItem,o=e.focusOnNext,i=e.selfCheck,s=e.allowHeaderFocus,l=s===void 0?!0:s;O.isNotEmpty(this.focusedItem)&&this.focusedItem.key!==r.key?(this.focusedItem=r,this.scrollInView()):l&&this.$emit("header-focus",{originalEvent:n,focusOnNext:o,selfCheck:i})},scrollInView:function(){var e=F.findSingle(this.$el,'li[id="'.concat("".concat(this.focusedItemId),'"]'));e&&e.scrollIntoView&&e.scrollIntoView({block:"nearest",inline:"start"})},autoUpdateActiveItemPath:function(e){var n=this;this.activeItemPath=Object.entries(e||{}).reduce(function(r,o){var i=Ud(o,2),s=i[0],l=i[1];if(l){var c=n.findProcessedItemByItemKey(s);c&&r.push(c)}return r},[])},findProcessedItemByItemKey:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(n=n||r===0&&this.processedItems,!n)return null;for(var o=0;o<n.length;o++){var i=n[o];if(this.getItemProp(i,"key")===e)return i;var s=this.findProcessedItemByItemKey(e,i.items,r+1);if(s)return s}},createProcessedItems:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",s=[];return e&&e.forEach(function(l,c){var u=(i!==""?i+"_":"")+c,f={item:l,index:c,level:r,key:u,parent:o,parentKey:i};f.items=n.createProcessedItems(l.items,r+1,f,u),s.push(f)}),s},flatItems:function(e){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e&&e.forEach(function(o){n.isVisibleItem(o)&&(r.push(o),n.flatItems(o.items,r))}),r}},computed:{processedItems:function(){return this.createProcessedItems(this.items||[])},visibleItems:function(){return this.flatItems(this.processedItems)},focusedItemId:function(){return O.isNotEmpty(this.focusedItem)?"".concat(this.panelId,"_").concat(this.focusedItem.key):null}},components:{PanelMenuSub:hi}};function Kd(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuSub");return a.openBlock(),a.createBlock(s,a.mergeProps({id:n.panelId+"_list",class:t.cx("menu"),role:"tree",tabindex:-1,"aria-activedescendant":o.focused?i.focusedItemId:void 0,panelId:n.panelId,focusedItemId:o.focused?i.focusedItemId:void 0,items:i.processedItems,templates:n.templates,activeItemPath:o.activeItemPath,onFocus:i.onFocus,onBlur:i.onBlur,onKeydown:i.onKeyDown,onItemToggle:i.onItemToggle,onItemMousemove:i.onItemMouseMove,pt:t.pt,unstyled:t.unstyled},t.ptm("menu")),null,16,["id","class","aria-activedescendant","panelId","focusedItemId","items","templates","activeItemPath","onFocus","onBlur","onKeydown","onItemToggle","onItemMousemove","pt","unstyled"])}yi.render=Kd;function Wt(t){"@babel/helpers - typeof";return Wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wt(t)}function bi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Wd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bi(Object(n),!0).forEach(function(r){zd(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bi(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function zd(t,e,n){return e=qd(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qd(t){var e=Gd(t,"string");return Wt(e)=="symbol"?e:String(e)}function Gd(t,e){if(Wt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Wt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vi={name:"PanelMenu",extends:Bd,inheritAttrs:!1,emits:["update:expandedKeys","panel-open","panel-close"],data:function(){return{id:this.$attrs.id,activeItem:null,activeItems:[]}},watch:{"$attrs.id":function(e){this.id=e||Xo()}},mounted:function(){this.id=this.id||Xo()},methods:{getItemProp:function(e,n){return e?O.getItemValue(e[n]):void 0},getItemLabel:function(e){return this.getItemProp(e,"label")},getPTOptions:function(e,n,r){return this.ptm(e,{context:{index:r,active:this.isItemActive(n),focused:this.isItemFocused(n),disabled:this.isItemDisabled(n)}})},isItemActive:function(e){return this.expandedKeys?this.expandedKeys[this.getItemProp(e,"key")]:this.multiple?this.activeItems.some(function(n){return O.equals(e,n)}):O.equals(e,this.activeItem)},isItemVisible:function(e){return this.getItemProp(e,"visible")!==!1},isItemDisabled:function(e){return this.getItemProp(e,"disabled")},isItemFocused:function(e){return O.equals(e,this.activeItem)},getPanelId:function(e){return"".concat(this.id,"_").concat(e)},getPanelKey:function(e){return this.getPanelId(e)},getHeaderId:function(e){return"".concat(this.getPanelId(e),"_header")},getContentId:function(e){return"".concat(this.getPanelId(e),"_content")},onHeaderClick:function(e,n){if(this.isItemDisabled(n)){e.preventDefault();return}n.command&&n.command({originalEvent:e,item:n}),this.changeActiveItem(e,n),F.focus(e.currentTarget)},onHeaderKeyDown:function(e,n){switch(e.code){case"ArrowDown":this.onHeaderArrowDownKey(e);break;case"ArrowUp":this.onHeaderArrowUpKey(e);break;case"Home":this.onHeaderHomeKey(e);break;case"End":this.onHeaderEndKey(e);break;case"Enter":case"NumpadEnter":case"Space":this.onHeaderEnterKey(e,n);break}},onHeaderArrowDownKey:function(e){var n=F.getAttribute(e.currentTarget,"data-p-highlight")===!0?F.findSingle(e.currentTarget.nextElementSibling,'[data-pc-section="menu"]'):null;n?F.focus(n):this.updateFocusedHeader({originalEvent:e,focusOnNext:!0}),e.preventDefault()},onHeaderArrowUpKey:function(e){var n=this.findPrevHeader(e.currentTarget.parentElement)||this.findLastHeader(),r=F.getAttribute(n,"data-p-highlight")===!0?F.findSingle(n.nextElementSibling,'[data-pc-section="menu"]'):null;r?F.focus(r):this.updateFocusedHeader({originalEvent:e,focusOnNext:!1}),e.preventDefault()},onHeaderHomeKey:function(e){this.changeFocusedHeader(e,this.findFirstHeader()),e.preventDefault()},onHeaderEndKey:function(e){this.changeFocusedHeader(e,this.findLastHeader()),e.preventDefault()},onHeaderEnterKey:function(e,n){var r=F.findSingle(e.currentTarget,'[data-pc-section="headeraction"]');r?r.click():this.onHeaderClick(e,n),e.preventDefault()},findNextHeader:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?e:e.nextElementSibling,o=F.findSingle(r,'[data-pc-section="header"]');return o?F.getAttribute(o,"data-p-disabled")?this.findNextHeader(o.parentElement):o:null},findPrevHeader:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=n?e:e.previousElementSibling,o=F.findSingle(r,'[data-pc-section="header"]');return o?F.getAttribute(o,"data-p-disabled")?this.findPrevHeader(o.parentElement):o:null},findFirstHeader:function(){return this.findNextHeader(this.$el.firstElementChild,!0)},findLastHeader:function(){return this.findPrevHeader(this.$el.lastElementChild,!0)},updateFocusedHeader:function(e){var n=e.originalEvent,r=e.focusOnNext,o=e.selfCheck,i=n.currentTarget.closest('[data-pc-section="panel"]'),s=o?F.findSingle(i,'[data-pc-section="header"]'):r?this.findNextHeader(i):this.findPrevHeader(i);s?this.changeFocusedHeader(n,s):r?this.onHeaderHomeKey(n):this.onHeaderEndKey(n)},changeActiveItem:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!this.isItemDisabled(n)){var o=this.isItemActive(n),i=o?"panel-close":"panel-open";this.activeItem=r?n:this.activeItem&&O.equals(n,this.activeItem)?null:n,this.multiple&&(this.activeItems.some(function(s){return O.equals(n,s)})?this.activeItems=this.activeItems.filter(function(s){return!O.equals(n,s)}):this.activeItems.push(n)),this.changeExpandedKeys({item:n,expanded:!o}),this.$emit(i,{originalEvent:e,item:n})}},changeExpandedKeys:function(e){var n=e.item,r=e.expanded,o=r===void 0?!1:r;if(this.expandedKeys){var i=Wd({},this.expandedKeys);o?i[n.key]=!0:delete i[n.key],this.$emit("update:expandedKeys",i)}},changeFocusedHeader:function(e,n){n&&F.focus(n)},getMenuItemProps:function(e,n){return{icon:a.mergeProps({class:[this.cx("headerIcon"),this.getItemProp(e,"icon")]},this.getPTOptions("headerIcon",e,n)),label:a.mergeProps({class:this.cx("headerLabel")},this.getPTOptions("headerLabel",e,n))}}},components:{PanelMenuList:yi,ChevronRightIcon:hr,ChevronDownIcon:pr}},Yd=["id"],Jd=["id","tabindex","aria-label","aria-expanded","aria-controls","aria-disabled","onClick","onKeydown","data-p-highlight","data-p-disabled"],Xd=["href"],Zd=["id","aria-labelledby"];function Qd(t,e,n,r,o,i){var s=a.resolveComponent("PanelMenuList");return a.openBlock(),a.createElementBlock("div",a.mergeProps({id:o.id,class:t.cx("root")},t.ptmi("root")),[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.model,function(l,c){return a.openBlock(),a.createElementBlock(a.Fragment,{key:i.getPanelKey(c)},[i.isItemVisible(l)?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,style:i.getItemProp(l,"style"),class:[t.cx("panel"),i.getItemProp(l,"class")]},t.ptm("panel")),[a.createElementVNode("div",a.mergeProps({id:i.getHeaderId(c),class:[t.cx("header",{item:l}),i.getItemProp(l,"headerClass")],tabindex:i.isItemDisabled(l)?-1:t.tabindex,role:"button","aria-label":i.getItemLabel(l),"aria-expanded":i.isItemActive(l),"aria-controls":i.getContentId(c),"aria-disabled":i.isItemDisabled(l),onClick:function(f){return i.onHeaderClick(f,l)},onKeydown:function(f){return i.onHeaderKeyDown(f,l)}},i.getPTOptions("header",l,c),{"data-p-highlight":i.isItemActive(l),"data-p-disabled":i.isItemDisabled(l)}),[a.createElementVNode("div",a.mergeProps({class:t.cx("headerContent")},i.getPTOptions("headerContent",l,c)),[t.$slots.item?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.$slots.item),{key:1,item:l,root:!0,active:i.isItemActive(l),hasSubmenu:i.getItemProp(l,"items"),label:i.getItemLabel(l),props:i.getMenuItemProps(l,c)},null,8,["item","active","hasSubmenu","label","props"])):(a.openBlock(),a.createElementBlock("a",a.mergeProps({key:0,href:i.getItemProp(l,"url"),class:t.cx("headerAction"),tabindex:-1},i.getPTOptions("headerAction",l,c)),[i.getItemProp(l,"items")?a.renderSlot(t.$slots,"submenuicon",{key:0,active:i.isItemActive(l)},function(){return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(i.isItemActive(l)?"ChevronDownIcon":"ChevronRightIcon"),a.mergeProps({class:t.cx("submenuIcon")},i.getPTOptions("submenuIcon",l,c)),null,16,["class"]))]}):a.createCommentVNode("",!0),t.$slots.headericon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.$slots.headericon),{key:1,item:l,class:a.normalizeClass([t.cx("headerIcon"),i.getItemProp(l,"icon")])},null,8,["item","class"])):i.getItemProp(l,"icon")?(a.openBlock(),a.createElementBlock("span",a.mergeProps({key:2,class:[t.cx("headerIcon"),i.getItemProp(l,"icon")]},i.getPTOptions("headerIcon",l,c)),null,16)):a.createCommentVNode("",!0),a.createElementVNode("span",a.mergeProps({class:t.cx("headerLabel")},i.getPTOptions("headerLabel",l,c)),a.toDisplayString(i.getItemLabel(l)),17)],16,Xd))],16)],16,Jd),a.createVNode(a.Transition,a.mergeProps({name:"p-toggleable-content"},t.ptm("transition")),{default:a.withCtx(function(){return[a.withDirectives(a.createElementVNode("div",a.mergeProps({id:i.getContentId(c),class:t.cx("toggleableContent"),role:"region","aria-labelledby":i.getHeaderId(c)},t.ptm("toggleableContent")),[i.getItemProp(l,"items")?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,class:t.cx("menuContent")},t.ptm("menuContent")),[a.createVNode(s,{panelId:i.getPanelId(c),items:i.getItemProp(l,"items"),templates:t.$slots,expandedKeys:t.expandedKeys,onItemToggle:i.changeExpandedKeys,onHeaderFocus:i.updateFocusedHeader,pt:t.pt,unstyled:t.unstyled},null,8,["panelId","items","templates","expandedKeys","onItemToggle","onHeaderFocus","pt","unstyled"])],16)):a.createCommentVNode("",!0)],16,Zd),[[a.vShow,i.isItemActive(l)]])]}),_:2},1040)],16)):a.createCommentVNode("",!0)],64)}),128))],16,Yd)}vi.render=Qd;const ef=["data-active","href","onClick"],tf={class:"sf-ml-2"},nf=["href","target"],rf={class:"sf-ml-2"},of=a.defineComponent({__name:"PanelMenu",props:{items:{}},setup(t){const e=t,n=Ye.useRoute(),r=a.computed(()=>e.items);o(r.value);function o(l,c=void 0){l.forEach(u=>{c&&(u.parentKey=c),u.items&&o(u.items,u.key)})}const i=a.ref({});function s(l,c,u=void 0){l.forEach(f=>{f.routeName&&f.routeName===c&&u&&(i.value[u]=u===f.parentKey),f.items&&s(f.items,c,f.key)})}return a.watch(()=>n.name,l=>{l&&s(r.value,l.toString())}),(l,c)=>{const u=a.resolveComponent("router-link");return a.openBlock(),a.createBlock(a.unref(vi),{model:r.value,expandedKeys:i.value,"onUpdate:expandedKeys":c[0]||(c[0]=f=>i.value=f),multiple:!0,class:a.normalizeClass("sf-p-2")},{item:a.withCtx(({item:f,active:m})=>[f.routeName?(a.openBlock(),a.createBlock(u,{key:0,to:{name:f.routeName},custom:""},{default:a.withCtx(({href:y,navigate:E,isActive:C})=>[a.createElementVNode("a",{class:"sf-flex sf-align-items-center sf-px-3 sf-py-2 sf-ripple","data-active":C,href:y,onClick:E},[a.createVNode(Ve,{icon:f.icon??"chevron_right"},null,8,["icon"]),a.createElementVNode("span",tf,a.toDisplayString(f.label),1)],8,ef)]),_:2},1032,["to"])):(a.openBlock(),a.createElementBlock("a",{key:1,class:"sf-flex sf-align-items-center sf-pl-3 sf-py-2",href:f.url,target:f.target},[f.icon?(a.openBlock(),a.createBlock(Ve,{key:0,icon:f.icon},null,8,["icon"])):a.createCommentVNode("",!0),a.createElementVNode("span",rf,a.toDisplayString(f.label),1),c[1]||(c[1]=a.createElementVNode("div",{class:"sf-flex-grow-1"},null,-1)),a.createVNode(Ve,{icon:m?"expand_less":"expand_more"},null,8,["icon"])],8,nf))]),_:1},8,["model","expandedKeys"])}}});function sf(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function wi(t,...e){if(!sf(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function Ei(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function af(t,e){wi(t);const n=e.outputLen;if(t.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const br=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Le=(t,e)=>t<<32-e|t>>>e;new Uint8Array(new Uint32Array([287454020]).buffer)[0];function lf(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function Si(t){return typeof t=="string"&&(t=lf(t)),wi(t),t}class cf{clone(){return this._cloneInto()}}function uf(t){const e=r=>t().update(Si(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function df(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const o=BigInt(32),i=BigInt(4294967295),s=Number(n>>o&i),l=Number(n&i),c=r?4:0,u=r?0:4;t.setUint32(e+c,s,r),t.setUint32(e+u,l,r)}const ff=(t,e,n)=>t&e^~t&n,mf=(t,e,n)=>t&e^t&n^e&n;class pf extends cf{constructor(e,n,r,o){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=br(this.buffer)}update(e){Ei(this);const{view:n,buffer:r,blockLen:o}=this;e=Si(e);const i=e.length;for(let s=0;s<i;){const l=Math.min(o-this.pos,i-s);if(l===o){const c=br(e);for(;o<=i-s;s+=o)this.process(c,s);continue}r.set(e.subarray(s,s+l),this.pos),this.pos+=l,s+=l,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ei(this),af(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:i}=this;let{pos:s}=this;n[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>o-s&&(this.process(r,0),s=0);for(let m=s;m<o;m++)n[m]=0;df(r,o-8,BigInt(this.length*8),i),this.process(r,0);const l=br(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let m=0;m<u;m++)l.setUint32(4*m,f[m],i)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:i,destroyed:s,pos:l}=this;return e.length=o,e.pos=l,e.finished=i,e.destroyed=s,o%n&&e.buffer.set(r),e}}const hf=new Uint32Array([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]),ze=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),qe=new Uint32Array(64);class gf extends pf{constructor(){super(64,32,8,!1),this.A=ze[0]|0,this.B=ze[1]|0,this.C=ze[2]|0,this.D=ze[3]|0,this.E=ze[4]|0,this.F=ze[5]|0,this.G=ze[6]|0,this.H=ze[7]|0}get(){const{A:e,B:n,C:r,D:o,E:i,F:s,G:l,H:c}=this;return[e,n,r,o,i,s,l,c]}set(e,n,r,o,i,s,l,c){this.A=e|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=l|0,this.H=c|0}process(e,n){for(let m=0;m<16;m++,n+=4)qe[m]=e.getUint32(n,!1);for(let m=16;m<64;m++){const y=qe[m-15],E=qe[m-2],C=Le(y,7)^Le(y,18)^y>>>3,k=Le(E,17)^Le(E,19)^E>>>10;qe[m]=k+qe[m-7]+C+qe[m-16]|0}let{A:r,B:o,C:i,D:s,E:l,F:c,G:u,H:f}=this;for(let m=0;m<64;m++){const y=Le(l,6)^Le(l,11)^Le(l,25),E=f+y+ff(l,c,u)+hf[m]+qe[m]|0,k=(Le(r,2)^Le(r,13)^Le(r,22))+mf(r,o,i)|0;f=u,u=c,c=l,l=s+E|0,s=i,i=o,o=r,r=E+k|0}r=r+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,l=l+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(r,o,i,s,l,c,u,f)}roundClean(){qe.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const yf=uf(()=>new gf);class zt extends Error{}zt.prototype.name="InvalidTokenError";function bf(t){return decodeURIComponent(atob(t).replace(/(.)/g,(e,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function vf(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 bf(e)}catch{return atob(e)}}function vr(t,e){if(typeof t!="string")throw new zt("Invalid token specified: must be a string");e||(e={});const n=e.header===!0?0:1,r=t.split(".")[n];if(typeof r!="string")throw new zt(`Invalid token specified: missing part #${n+1}`);let o;try{o=vf(r)}catch(i){throw new zt(`Invalid token specified: invalid base64 for part #${n+1} (${i.message})`)}try{return JSON.parse(o)}catch(i){throw new zt(`Invalid token specified: invalid json for part #${n+1} (${i.message})`)}}if(typeof Promise>"u")throw Error("Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.");function Ci(t){if(!(this instanceof Ci))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");var e=this,n,r=[],o,i={enable:!0,callbackList:[],interval:5};e.didInitialize=!1;for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++)(s[l].src.indexOf("keycloak.js")!==-1||s[l].src.indexOf("keycloak.min.js")!==-1)&&s[l].src.indexOf("version=")!==-1&&(e.iframeVersion=s[l].src.substring(s[l].src.indexOf("version=")+8).split("&")[0]);var c=!0,u=en(console.info),f=en(console.warn);e.init=function(d){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,o=ee();var h=["default","cordova","cordova-native"];if(d&&h.indexOf(d.adapter)>-1?n=st(d.adapter):d&&typeof d.adapter=="object"?n=d.adapter:window.Cordova||window.cordova?n=st("cordova"):n=st(),d){if(typeof d.useNonce<"u"&&(c=d.useNonce),typeof d.checkLoginIframe<"u"&&(i.enable=d.checkLoginIframe),d.checkLoginIframeInterval&&(i.interval=d.checkLoginIframeInterval),d.onLoad==="login-required"&&(e.loginRequired=!0),d.responseMode)if(d.responseMode==="query"||d.responseMode==="fragment")e.responseMode=d.responseMode;else throw"Invalid value for responseMode";if(d.flow){switch(d.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=d.flow}if(d.timeSkew!=null&&(e.timeSkew=d.timeSkew),d.redirectUri&&(e.redirectUri=d.redirectUri),d.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=d.silentCheckSsoRedirectUri),typeof d.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=d.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,typeof d.pkceMethod<"u"){if(d.pkceMethod!=="S256"&&d.pkceMethod!==!1)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${d.pkceMethod}.`);e.pkceMethod=d.pkceMethod}else e.pkceMethod="S256";typeof d.enableLogging=="boolean"?e.enableLogging=d.enableLogging:e.enableLogging=!1,d.logoutMethod==="POST"?e.logoutMethod="POST":e.logoutMethod="GET",typeof d.scope=="string"&&(e.scope=d.scope),typeof d.acrValues=="string"&&(e.acrValues=d.acrValues),typeof d.messageReceiveTimeout=="number"&&d.messageReceiveTimeout>0?e.messageReceiveTimeout=d.messageReceiveTimeout:e.messageReceiveTimeout=1e4}e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var v=G(),P=G();P.promise.then(function(){e.onReady&&e.onReady(e.authenticated),v.setSuccess(e.authenticated)}).catch(function(L){v.setError(L)});var w=q();function T(){var L=function(V){V||(N.prompt="none"),d&&d.locale&&(N.locale=d.locale),e.login(N).then(function(){P.setSuccess()}).catch(function(me){P.setError(me)})},x=function(){var V=document.createElement("iframe"),me=e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});V.setAttribute("src",me),V.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),V.setAttribute("title","keycloak-silent-check-sso"),V.style.display="none",document.body.appendChild(V);var ue=function(re){if(!(re.origin!==window.location.origin||V.contentWindow!==re.source)){var Ne=ke(re.data);D(Ne,P),document.body.removeChild(V),window.removeEventListener("message",ue)}};window.addEventListener("message",ue)},N={};switch(d.onLoad){case"check-sso":i.enable?_e().then(function(){Ue().then(function(V){V?P.setSuccess():e.silentCheckSsoRedirectUri?x():L(!1)}).catch(function(V){P.setError(V)})}):e.silentCheckSsoRedirectUri?x():L(!1);break;case"login-required":L(!0);break;default:throw"Invalid value for onLoad"}}function A(){var L=ke(window.location.href);if(L&&window.history.replaceState(window.history.state,null,L.newUrl),L&&L.valid)return _e().then(function(){D(L,P)}).catch(function(x){P.setError(x)});d?d.token&&d.refreshToken?($e(d.token,d.refreshToken,d.idToken),i.enable?_e().then(function(){Ue().then(function(x){x?(e.onAuthSuccess&&e.onAuthSuccess(),P.setSuccess(),Me()):P.setSuccess()}).catch(function(x){P.setError(x)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),P.setSuccess()}).catch(function(x){e.onAuthError&&e.onAuthError(),d.onLoad?T():P.setError(x)})):d.onLoad?T():P.setSuccess():P.setSuccess()}function _(){var L=G(),x=function(){(document.readyState==="interactive"||document.readyState==="complete")&&(document.removeEventListener("readystatechange",x),L.setSuccess())};return document.addEventListener("readystatechange",x),x(),L.promise}return w.then(function(){_().then(Qt).then(A).catch(function(L){v.setError(L)})}),w.catch(function(L){v.setError(L)}),v.promise},e.login=function(d){return n.login(d)};function m(d){var h=null,v=window.crypto||window.msCrypto;if(v&&v.getRandomValues&&window.Uint8Array)return h=new Uint8Array(d),v.getRandomValues(h),h;h=new Array(d);for(var P=0;P<h.length;P++)h[P]=Math.floor(256*Math.random());return h}function y(d){return E(d,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function E(d,h){for(var v=m(d),P=new Array(d),w=0;w<d;w++)P[w]=h.charCodeAt(v[w]%h.length);return String.fromCharCode.apply(null,P)}function C(d,h){if(d!=="S256")throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${d}'.`);const v=yf(h);return wf(v).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}function k(d){var h={id_token:{acr:d}};return JSON.stringify(h)}e.createLoginUrl=function(d){var h=rt(),v=rt(),P=n.redirectUri(d),w={state:h,nonce:v,redirectUri:encodeURIComponent(P),loginOptions:d};d&&d.prompt&&(w.prompt=d.prompt);var T;d&&d.action=="register"?T=e.endpoints.register():T=e.endpoints.authorize();var A=d&&d.scope||e.scope;A?A.indexOf("openid")===-1&&(A="openid "+A):A="openid";var _=T+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(P)+"&state="+encodeURIComponent(h)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(A);if(c&&(_=_+"&nonce="+encodeURIComponent(v)),d&&d.prompt&&(_+="&prompt="+encodeURIComponent(d.prompt)),d&&d.maxAge&&(_+="&max_age="+encodeURIComponent(d.maxAge)),d&&d.loginHint&&(_+="&login_hint="+encodeURIComponent(d.loginHint)),d&&d.idpHint&&(_+="&kc_idp_hint="+encodeURIComponent(d.idpHint)),d&&d.action&&d.action!="register"&&(_+="&kc_action="+encodeURIComponent(d.action)),d&&d.locale&&(_+="&ui_locales="+encodeURIComponent(d.locale)),d&&d.acr){var L=k(d.acr);_+="&claims="+encodeURIComponent(L)}if((d&&d.acrValues||e.acrValues)&&(_+="&acr_values="+encodeURIComponent(d.acrValues||e.acrValues)),e.pkceMethod){var x=y(96);w.pkceCodeVerifier=x;var N=C(e.pkceMethod,x);_+="&code_challenge="+N,_+="&code_challenge_method="+e.pkceMethod}return o.add(w),_},e.logout=function(d){return n.logout(d)},e.createLogoutUrl=function(d){if(((d==null?void 0:d.logoutMethod)??e.logoutMethod)==="POST")return e.endpoints.logout();var v=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(n.redirectUri(d,!1));return e.idToken&&(v+="&id_token_hint="+encodeURIComponent(e.idToken)),v},e.register=function(d){return n.register(d)},e.createRegisterUrl=function(d){return d||(d={}),d.action="register",e.createLoginUrl(d)},e.createAccountUrl=function(d){var h=S(),v=void 0;return typeof h<"u"&&(v=h+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(n.redirectUri(d))),v},e.accountManagement=function(){return n.accountManagement()},e.hasRealmRole=function(d){var h=e.realmAccess;return!!h&&h.roles.indexOf(d)>=0},e.hasResourceRole=function(d,h){if(!e.resourceAccess)return!1;var v=e.resourceAccess[h||e.clientId];return!!v&&v.roles.indexOf(d)>=0},e.loadUserProfile=function(){var d=S()+"/account",h=new XMLHttpRequest;h.open("GET",d,!0),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Authorization","bearer "+e.token);var v=G();return h.onreadystatechange=function(){h.readyState==4&&(h.status==200?(e.profile=JSON.parse(h.responseText),v.setSuccess(e.profile)):v.setError())},h.send(),v.promise},e.loadUserInfo=function(){var d=e.endpoints.userinfo(),h=new XMLHttpRequest;h.open("GET",d,!0),h.setRequestHeader("Accept","application/json"),h.setRequestHeader("Authorization","bearer "+e.token);var v=G();return h.onreadystatechange=function(){h.readyState==4&&(h.status==200?(e.userInfo=JSON.parse(h.responseText),v.setSuccess(e.userInfo)):v.setError())},h.send(),v.promise},e.isTokenExpired=function(d){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return u("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var h=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(d){if(isNaN(d))throw"Invalid minValidity";h-=d}return h<0},e.updateToken=function(d){var h=G();if(!e.refreshToken)return h.setError(),h.promise;d=d||5;var v=function(){var w=!1;if(d==-1?(w=!0,u("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(d))&&(w=!0,u("[KEYCLOAK] Refreshing token: token expired")),!w)h.setSuccess(!1);else{var T="grant_type=refresh_token&refresh_token="+e.refreshToken,A=e.endpoints.token();if(r.push(h),r.length==1){var _=new XMLHttpRequest;_.open("POST",A,!0),_.setRequestHeader("Content-type","application/x-www-form-urlencoded"),_.withCredentials=!0,T+="&client_id="+encodeURIComponent(e.clientId);var L=new Date().getTime();_.onreadystatechange=function(){if(_.readyState==4)if(_.status==200){u("[KEYCLOAK] Token refreshed"),L=(L+new Date().getTime())/2;var x=JSON.parse(_.responseText);$e(x.access_token,x.refresh_token,x.id_token,L),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var N=r.pop();N!=null;N=r.pop())N.setSuccess(!0)}else{f("[KEYCLOAK] Failed to refresh token"),_.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var N=r.pop();N!=null;N=r.pop())N.setError(!0)}},_.send(T)}}};if(i.enable){var P=Ue();P.then(function(){v()}).catch(function(w){h.setError(w)})}else v();return h.promise},e.clearToken=function(){e.token&&($e(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())};function S(){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 B(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function D(d,h){var v=d.code,P=d.error,w=d.prompt,T=new Date().getTime();if(d.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(d.kc_action_status,d.kc_action),P){if(w!="none")if(d.error_description&&d.error_description==="authentication_expired")e.login(d.loginOptions);else{var A={error:P,error_description:d.error_description};e.onAuthError&&e.onAuthError(A),h&&h.setError(A)}else h&&h.setSuccess();return}else e.flow!="standard"&&(d.access_token||d.id_token)&&N(d.access_token,null,d.id_token,!0);if(e.flow!="implicit"&&v){var _="code="+v+"&grant_type=authorization_code",L=e.endpoints.token(),x=new XMLHttpRequest;x.open("POST",L,!0),x.setRequestHeader("Content-type","application/x-www-form-urlencoded"),_+="&client_id="+encodeURIComponent(e.clientId),_+="&redirect_uri="+d.redirectUri,d.pkceCodeVerifier&&(_+="&code_verifier="+d.pkceCodeVerifier),x.withCredentials=!0,x.onreadystatechange=function(){if(x.readyState==4)if(x.status==200){var V=JSON.parse(x.responseText);N(V.access_token,V.refresh_token,V.id_token,e.flow==="standard"),Me()}else e.onAuthError&&e.onAuthError(),h&&h.setError()},x.send(_)}function N(V,me,ue,re){T=(T+new Date().getTime())/2,$e(V,me,ue,T),c&&e.idTokenParsed&&e.idTokenParsed.nonce!=d.storedNonce?(u("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),h&&h.setError()):re&&(e.onAuthSuccess&&e.onAuthSuccess(),h&&h.setSuccess())}}function q(d){var h=G(),v;t?typeof t=="string"&&(v=t):v="keycloak.json";function P(x){x?e.endpoints={authorize:function(){return x.authorization_endpoint},token:function(){return x.token_endpoint},logout:function(){if(!x.end_session_endpoint)throw"Not supported by the OIDC server";return x.end_session_endpoint},checkSessionIframe:function(){if(!x.check_session_iframe)throw"Not supported by the OIDC server";return x.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!x.userinfo_endpoint)throw"Not supported by the OIDC server";return x.userinfo_endpoint}}:e.endpoints={authorize:function(){return S()+"/protocol/openid-connect/auth"},token:function(){return S()+"/protocol/openid-connect/token"},logout:function(){return S()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){var N=S()+"/protocol/openid-connect/login-status-iframe.html";return e.iframeVersion&&(N=N+"?version="+e.iframeVersion),N},thirdPartyCookiesIframe:function(){var N=S()+"/protocol/openid-connect/3p-cookies/step1.html";return e.iframeVersion&&(N=N+"?version="+e.iframeVersion),N},register:function(){return S()+"/protocol/openid-connect/registrations"},userinfo:function(){return S()+"/protocol/openid-connect/userinfo"}}}if(v){var w=new XMLHttpRequest;w.open("GET",v,!0),w.setRequestHeader("Accept","application/json"),w.onreadystatechange=function(){if(w.readyState==4)if(w.status==200||we(w)){var x=JSON.parse(w.responseText);e.authServerUrl=x["auth-server-url"],e.realm=x.realm,e.clientId=x.resource,P(null),h.setSuccess()}else h.setError()},w.send()}else{if(!t.clientId)throw"clientId missing";e.clientId=t.clientId;var T=t.oidcProvider;if(T)if(typeof T=="string"){var L;T.charAt(T.length-1)=="/"?L=T+".well-known/openid-configuration":L=T+"/.well-known/openid-configuration";var w=new XMLHttpRequest;w.open("GET",L,!0),w.setRequestHeader("Accept","application/json"),w.onreadystatechange=function(){if(w.readyState==4)if(w.status==200||we(w)){var N=JSON.parse(w.responseText);P(N),h.setSuccess()}else h.setError()},w.send()}else P(T),h.setSuccess();else{if(!t.url){for(var A=document.getElementsByTagName("script"),_=0;_<A.length;_++)if(A[_].src.match(/.*keycloak\.js/)){t.url=A[_].src.substr(0,A[_].src.indexOf("/js/keycloak.js"));break}}if(!t.realm)throw"realm missing";e.authServerUrl=t.url,e.realm=t.realm,P(null),h.setSuccess()}}return h.promise}function we(d){return d.status==0&&d.responseText&&d.responseURL.startsWith("file:")}function $e(d,h,v,P){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),h?(e.refreshToken=h,e.refreshTokenParsed=vr(h)):(delete e.refreshToken,delete e.refreshTokenParsed),v?(e.idToken=v,e.idTokenParsed=vr(v)):(delete e.idToken,delete e.idTokenParsed),d){if(e.token=d,e.tokenParsed=vr(d),e.sessionId=e.tokenParsed.sid,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,P&&(e.timeSkew=Math.floor(P/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(u("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var w=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;u("[KEYCLOAK] Token expires in "+Math.round(w/1e3)+" s"),w<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,w)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function rt(){var d="0123456789abcdef",h=E(36,d).split("");h[14]="4",h[19]=d.substr(h[19]&3|8,1),h[8]=h[13]=h[18]=h[23]="-";var v=h.join("");return v}function ke(d){var h=Zt(d);if(h){var v=o.get(h.state);return v&&(h.valid=!0,h.redirectUri=v.redirectUri,h.storedNonce=v.nonce,h.prompt=v.prompt,h.pkceCodeVerifier=v.pkceCodeVerifier,h.loginOptions=v.loginOptions),h}}function Zt(d){var h;switch(e.flow){case"standard":h=["code","state","session_state","kc_action_status","kc_action","iss"];break;case"implicit":h=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","kc_action","iss"];break;case"hybrid":h=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","kc_action","iss"];break}h.push("error"),h.push("error_description"),h.push("error_uri");var v=d.indexOf("?"),P=d.indexOf("#"),w,T;if(e.responseMode==="query"&&v!==-1?(w=d.substring(0,v),T=ot(d.substring(v+1,P!==-1?P:d.length),h),T.paramsString!==""&&(w+="?"+T.paramsString),P!==-1&&(w+=d.substring(P))):e.responseMode==="fragment"&&P!==-1&&(w=d.substring(0,P),T=ot(d.substring(P+1),h),T.paramsString!==""&&(w+="#"+T.paramsString)),T&&T.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((T.oauthParams.code||T.oauthParams.error)&&T.oauthParams.state)return T.oauthParams.newUrl=w,T.oauthParams}else if(e.flow==="implicit"&&(T.oauthParams.access_token||T.oauthParams.error)&&T.oauthParams.state)return T.oauthParams.newUrl=w,T.oauthParams}}function ot(d,h){for(var v=d.split("&"),P={paramsString:"",oauthParams:{}},w=0;w<v.length;w++){var T=v[w].indexOf("="),A=v[w].slice(0,T);h.indexOf(A)!==-1?P.oauthParams[A]=v[w].slice(T+1):(P.paramsString!==""&&(P.paramsString+="&"),P.paramsString+=v[w])}return P}function G(){var d={setSuccess:function(h){d.resolve(h)},setError:function(h){d.reject(h)}};return d.promise=new Promise(function(h,v){d.resolve=h,d.reject=v}),d}function it(d,h,v){var P=null,w=new Promise(function(T,A){P=setTimeout(function(){A({error:v})},h)});return Promise.race([d,w]).finally(function(){clearTimeout(P)})}function _e(){var d=G();if(!i.enable||i.iframe)return d.setSuccess(),d.promise;var h=document.createElement("iframe");i.iframe=h,h.onload=function(){var w=e.endpoints.authorize();w.charAt(0)==="/"?i.iframeOrigin=B():i.iframeOrigin=w.substring(0,w.indexOf("/",8)),d.setSuccess()};var v=e.endpoints.checkSessionIframe();h.setAttribute("src",v),h.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),h.setAttribute("title","keycloak-session-iframe"),h.style.display="none",document.body.appendChild(h);var P=function(w){if(!(w.origin!==i.iframeOrigin||i.iframe.contentWindow!==w.source)&&(w.data=="unchanged"||w.data=="changed"||w.data=="error")){w.data!="unchanged"&&e.clearToken();for(var T=i.callbackList.splice(0,i.callbackList.length),A=T.length-1;A>=0;--A){var _=T[A];w.data=="error"?_.setError():_.setSuccess(w.data=="unchanged")}}};return window.addEventListener("message",P,!1),d.promise}function Me(){i.enable&&e.token&&setTimeout(function(){Ue().then(function(d){d&&Me()})},i.interval*1e3)}function Ue(){var d=G();if(i.iframe&&i.iframeOrigin){var h=e.clientId+" "+(e.sessionId?e.sessionId:"");i.callbackList.push(d);var v=i.iframeOrigin;i.callbackList.length==1&&i.iframe.contentWindow.postMessage(h,v)}else d.setSuccess();return d.promise}function Qt(){var d=G();if(i.enable||e.silentCheckSsoRedirectUri){var h=document.createElement("iframe");h.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),h.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),h.setAttribute("title","keycloak-3p-check-iframe"),h.style.display="none",document.body.appendChild(h);var v=function(P){h.contentWindow===P.source&&(P.data!=="supported"&&P.data!=="unsupported"||(P.data==="unsupported"&&(f(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
|
|
144
|
-
|
|
145
|
-
- It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
|
|
146
|
-
- It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
|
|
147
|
-
|
|
148
|
-
For more information see: https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers`),i.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(h),window.removeEventListener("message",v),d.setSuccess()))};window.addEventListener("message",v,!1)}else d.setSuccess();return it(d.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function st(d){if(!d||d=="default")return{login:function(A){return window.location.assign(e.createLoginUrl(A)),G().promise},logout:async function(A){if(((A==null?void 0:A.logoutMethod)??e.logoutMethod)==="GET"){window.location.replace(e.createLogoutUrl(A));return}const L=e.createLogoutUrl(A),x=await fetch(L,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({id_token_hint:e.idToken,client_id:e.clientId,post_logout_redirect_uri:n.redirectUri(A,!1)})});if(x.redirected){window.location.href=x.url;return}if(x.ok){window.location.reload();return}throw new Error("Logout failed, request returned an error code.")},register:function(A){return window.location.assign(e.createRegisterUrl(A)),G().promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u")window.location.href=A;else throw"Not supported by the OIDC server";return G().promise},redirectUri:function(A,_){return A&&A.redirectUri?A.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(d=="cordova"){i.enable=!1;var h=function(A,_,L){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(A,_,L):window.open(A,_,L)},v=function(A){return A&&A.cordovaOptions?Object.keys(A.cordovaOptions).reduce(function(_,L){return _[L]=A.cordovaOptions[L],_},{}):{}},P=function(A){return Object.keys(A).reduce(function(_,L){return _.push(L+"="+A[L]),_},[]).join(",")},w=function(A){var _=v(A);return _.location="no",A&&A.prompt=="none"&&(_.hidden="yes"),P(_)},T=function(){return e.redirectUri||"http://localhost"};return{login:function(A){var _=G(),L=w(A),x=e.createLoginUrl(A),N=h(x,"_blank",L),V=!1,me=!1,ue=function(){me=!0,N.close()};return N.addEventListener("loadstart",function(re){if(re.url.indexOf(T())==0){var Ne=ke(re.url);D(Ne,_),ue(),V=!0}}),N.addEventListener("loaderror",function(re){if(!V)if(re.url.indexOf(T())==0){var Ne=ke(re.url);D(Ne,_),ue(),V=!0}else _.setError(),ue()}),N.addEventListener("exit",function(re){me||_.setError({reason:"closed_by_user"})}),_.promise},logout:function(A){var _=G(),L=e.createLogoutUrl(A),x=h(L,"_blank","location=no,hidden=yes,clearcache=yes"),N;return x.addEventListener("loadstart",function(V){V.url.indexOf(T())==0&&x.close()}),x.addEventListener("loaderror",function(V){V.url.indexOf(T())==0||(N=!0),x.close()}),x.addEventListener("exit",function(V){N?_.setError():(e.clearToken(),_.setSuccess())}),_.promise},register:function(A){var _=G(),L=e.createRegisterUrl(),x=w(A),N=h(L,"_blank",x);return N.addEventListener("loadstart",function(V){if(V.url.indexOf(T())==0){N.close();var me=ke(V.url);D(me,_)}}),_.promise},accountManagement:function(){var A=e.createAccountUrl();if(typeof A<"u"){var _=h(A,"_blank","location=no");_.addEventListener("loadstart",function(L){L.url.indexOf(T())==0&&_.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(A){return T()}}}if(d=="cordova-native")return i.enable=!1,{login:function(A){var _=G(),L=e.createLoginUrl(A);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var N=ke(x.url);D(N,_)}),window.cordova.plugins.browsertab.openUrl(L),_.promise},logout:function(A){var _=G(),L=e.createLogoutUrl(A);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),_.setSuccess()}),window.cordova.plugins.browsertab.openUrl(L),_.promise},register:function(A){var _=G(),L=e.createRegisterUrl(A);return universalLinks.subscribe("keycloak",function(x){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var N=ke(x.url);D(N,_)}),window.cordova.plugins.browsertab.openUrl(L),_.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: "+d}var bt=function(){if(!(this instanceof bt))return new bt;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var d=this;function h(){for(var v=new Date().getTime(),P=0;P<localStorage.length;P++){var w=localStorage.key(P);if(w&&w.indexOf("kc-callback-")==0){var T=localStorage.getItem(w);if(T)try{var A=JSON.parse(T).expires;(!A||A<v)&&localStorage.removeItem(w)}catch{localStorage.removeItem(w)}}}}d.get=function(v){if(v){var P="kc-callback-"+v,w=localStorage.getItem(P);return w&&(localStorage.removeItem(P),w=JSON.parse(w)),h(),w}},d.add=function(v){h();var P="kc-callback-"+v.state;v.expires=new Date().getTime()+60*60*1e3,localStorage.setItem(P,JSON.stringify(v))}},vt=function(){if(!(this instanceof vt))return new vt;var d=this;d.get=function(w){if(w){var T=v("kc-callback-"+w);if(P("kc-callback-"+w,"",h(-100)),T)return JSON.parse(T)}},d.add=function(w){P("kc-callback-"+w.state,JSON.stringify(w),h(60))},d.removeItem=function(w){P(w,"",h(-100))};var h=function(w){var T=new Date;return T.setTime(T.getTime()+w*60*1e3),T},v=function(w){for(var T=w+"=",A=document.cookie.split(";"),_=0;_<A.length;_++){for(var L=A[_];L.charAt(0)==" ";)L=L.substring(1);if(L.indexOf(T)==0)return L.substring(T.length,L.length)}return""},P=function(w,T,A){var _=w+"="+T+"; expires="+A.toUTCString()+"; ";document.cookie=_}};function ee(){try{return new bt}catch{}return new vt}function en(d){return function(){e.enableLogging&&d.apply(console,Array.prototype.slice.call(arguments))}}}function wf(t){const e=String.fromCodePoint(...t);return btoa(e)}async function Ef(){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}let wn;function Sf(t){if(!t)return wn;const e=new Ci(t),n={},r=async(s={},l)=>{if(await Ef())return s.onLoad==="login-required"&&document.documentElement.setAttribute("data-app-message","Autorizando..."),e.init(s).then(async u=>{u&&await o(),l&&typeof l=="function"&&l(),document.documentElement.classList.add("app-mounted")}).catch(u=>{console.error(u),document.documentElement.setAttribute("data-app-message","Não foi possível conectar no servidor de autenticação.")})},o=async()=>{const s=await e.loadUserInfo();n.email=s.email??"",n.emailVerified=s.email_verified===!0,n.firstName=s.given_name??"",n.lastName=s.family_name??"",n.name=s.name??"",n.sub=s.sub??"",n.username=s.preferred_username??"",n.roles=[...s.role??[]],n.groups=[...s.group??[]],n.IsInRole=l=>n.roles.includes(l),sessionStorage.setItem("name",n.name)};return wn={Instance:e,User:n,Init:r,Logout:()=>{e.logout({redirectUri:location.origin}).then(()=>{sessionStorage.removeItem("name")})}},wn}const Cf=()=>wn,Af=t=>Sf(t);class wr{constructor(e=null){xe(this,"errors",[]);xe(this,"_value",null);xe(this,"_httpStatusCode");this._value=e,this._httpStatusCode=200}get value(){return this._value}set value(e){this._value=e}get hasSuccess(){return!this.hasError}get hasError(){return this.errors.length>0}get httpStatusCode(){return this._httpStatusCode}set httpStatusCode(e){this._httpStatusCode=e}WithError(e){this.errors.push(e),this._httpStatusCode===200&&(this._httpStatusCode=400)}WithErrors(e){e.forEach(n=>this.WithError(n))}}function Ai(t,e){return function(){return t.apply(e,arguments)}}const{toString:kf}=Object.prototype,{getPrototypeOf:Er}=Object,En=(t=>e=>{const n=kf.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Be=t=>(t=t.toLowerCase(),e=>En(e)===t),Sn=t=>e=>typeof e===t,{isArray:gt}=Array,qt=Sn("undefined");function _f(t){return t!==null&&!qt(t)&&t.constructor!==null&&!qt(t.constructor)&&Ce(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ki=Be("ArrayBuffer");function If(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ki(t.buffer),e}const Pf=Sn("string"),Ce=Sn("function"),_i=Sn("number"),Cn=t=>t!==null&&typeof t=="object",Tf=t=>t===!0||t===!1,An=t=>{if(En(t)!=="object")return!1;const e=Er(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},xf=Be("Date"),Of=Be("File"),Lf=Be("Blob"),Bf=Be("FileList"),Rf=t=>Cn(t)&&Ce(t.pipe),$f=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ce(t.append)&&((e=En(t))==="formdata"||e==="object"&&Ce(t.toString)&&t.toString()==="[object FormData]"))},Nf=Be("URLSearchParams"),Df=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),gt(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let l;for(r=0;r<s;r++)l=i[r],e.call(null,t[l],l,t)}}function Ii(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const Pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ti=t=>!qt(t)&&t!==Pi;function Sr(){const{caseless:t}=Ti(this)&&this||{},e={},n=(r,o)=>{const i=t&&Ii(e,o)||o;An(e[i])&&An(r)?e[i]=Sr(e[i],r):An(r)?e[i]=Sr({},r):gt(r)?e[i]=r.slice():e[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Gt(arguments[r],n);return e}const Mf=(t,e,n,{allOwnKeys:r}={})=>(Gt(e,(o,i)=>{n&&Ce(o)?t[i]=Ai(o,n):t[i]=o},{allOwnKeys:r}),t),Uf=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hf=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Ff=(t,e,n,r)=>{let o,i,s;const l={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!l[s]&&(e[s]=t[s],l[s]=!0);t=n!==!1&&Er(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},jf=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Vf=t=>{if(!t)return null;if(gt(t))return t;let e=t.length;if(!_i(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Kf=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Er(Uint8Array)),Wf=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},zf=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},qf=Be("HTMLFormElement"),Gf=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),xi=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Yf=Be("RegExp"),Oi=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Gt(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},Jf=t=>{Oi(t,(e,n)=>{if(Ce(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Ce(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Xf=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return gt(t)?r(t):r(String(t).split(e)),n},Zf=()=>{},Qf=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Cr="abcdefghijklmnopqrstuvwxyz",Li="0123456789",Bi={DIGIT:Li,ALPHA:Cr,ALPHA_DIGIT:Cr+Cr.toUpperCase()+Li},em=(t=16,e=Bi.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function tm(t){return!!(t&&Ce(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const nm=t=>{const e=new Array(10),n=(r,o)=>{if(Cn(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const i=gt(r)?[]:{};return Gt(r,(s,l)=>{const c=n(s,o+1);!qt(c)&&(i[l]=c)}),e[o]=void 0,i}}return r};return n(t,0)},rm=Be("AsyncFunction"),b={isArray:gt,isArrayBuffer:ki,isBuffer:_f,isFormData:$f,isArrayBufferView:If,isString:Pf,isNumber:_i,isBoolean:Tf,isObject:Cn,isPlainObject:An,isUndefined:qt,isDate:xf,isFile:Of,isBlob:Lf,isRegExp:Yf,isFunction:Ce,isStream:Rf,isURLSearchParams:Nf,isTypedArray:Kf,isFileList:Bf,forEach:Gt,merge:Sr,extend:Mf,trim:Df,stripBOM:Uf,inherits:Hf,toFlatObject:Ff,kindOf:En,kindOfTest:Be,endsWith:jf,toArray:Vf,forEachEntry:Wf,matchAll:zf,isHTMLForm:qf,hasOwnProperty:xi,hasOwnProp:xi,reduceDescriptors:Oi,freezeMethods:Jf,toObjectSet:Xf,toCamelCase:Gf,noop:Zf,toFiniteNumber:Qf,findKey:Ii,global:Pi,isContextDefined:Ti,ALPHABET:Bi,generateString:em,isSpecCompliantForm:tm,toJSONObject:nm,isAsyncFn:rm,isThenable:t=>t&&(Cn(t)||Ce(t))&&Ce(t.then)&&Ce(t.catch)};function W(t,e,n,r,o){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),r&&(this.request=r),o&&(this.response=o)}b.inherits(W,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:b.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ri=W.prototype,$i={};["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=>{$i[t]={value:t}}),Object.defineProperties(W,$i),Object.defineProperty(Ri,"isAxiosError",{value:!0}),W.from=(t,e,n,r,o,i)=>{const s=Object.create(Ri);return b.toFlatObject(t,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),W.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const om=null;function Ar(t){return b.isPlainObject(t)||b.isArray(t)}function Ni(t){return b.endsWith(t,"[]")?t.slice(0,-2):t}function Di(t,e,n){return t?t.concat(e).map(function(o,i){return o=Ni(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function im(t){return b.isArray(t)&&!t.some(Ar)}const sm=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function kn(t,e,n){if(!b.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=b.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,S){return!b.isUndefined(S[k])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&b.isSpecCompliantForm(e);if(!b.isFunction(o))throw new TypeError("visitor must be a function");function u(C){if(C===null)return"";if(b.isDate(C))return C.toISOString();if(!c&&b.isBlob(C))throw new W("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(C)||b.isTypedArray(C)?c&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function f(C,k,S){let B=C;if(C&&!S&&typeof C=="object"){if(b.endsWith(k,"{}"))k=r?k:k.slice(0,-2),C=JSON.stringify(C);else if(b.isArray(C)&&im(C)||(b.isFileList(C)||b.endsWith(k,"[]"))&&(B=b.toArray(C)))return k=Ni(k),B.forEach(function(q,we){!(b.isUndefined(q)||q===null)&&e.append(s===!0?Di([k],we,i):s===null?k:k+"[]",u(q))}),!1}return Ar(C)?!0:(e.append(Di(S,k,i),u(C)),!1)}const m=[],y=Object.assign(sm,{defaultVisitor:f,convertValue:u,isVisitable:Ar});function E(C,k){if(!b.isUndefined(C)){if(m.indexOf(C)!==-1)throw Error("Circular reference detected in "+k.join("."));m.push(C),b.forEach(C,function(B,D){(!(b.isUndefined(B)||B===null)&&o.call(e,B,b.isString(D)?D.trim():D,k,y))===!0&&E(B,k?k.concat(D):[D])}),m.pop()}}if(!b.isObject(t))throw new TypeError("data must be an object");return E(t),e}function Mi(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function kr(t,e){this._pairs=[],t&&kn(t,this,e)}const Ui=kr.prototype;Ui.append=function(e,n){this._pairs.push([e,n])},Ui.toString=function(e){const n=e?function(r){return e.call(this,r,Mi)}:Mi;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function am(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hi(t,e,n){if(!e)return t;const r=n&&n.encode||am,o=n&&n.serialize;let i;if(o?i=o(e,n):i=b.isURLSearchParams(e)?e.toString():new kr(e,n).toString(r),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Fi{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(r){r!==null&&e(r)})}}const ji={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lm={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:kr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Vi=typeof window<"u"&&typeof document<"u",cm=(t=>Vi&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),um=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Re={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Vi,hasStandardBrowserEnv:cm,hasStandardBrowserWebWorkerEnv:um},Symbol.toStringTag,{value:"Module"})),...lm};function dm(t,e){return kn(t,new Re.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Re.isNode&&b.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function fm(t){return b.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function mm(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function Ki(t){function e(n,r,o,i){let s=n[i++];if(s==="__proto__")return!0;const l=Number.isFinite(+s),c=i>=n.length;return s=!s&&b.isArray(o)?o.length:s,c?(b.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!l):((!o[s]||!b.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&b.isArray(o[s])&&(o[s]=mm(o[s])),!l)}if(b.isFormData(t)&&b.isFunction(t.entries)){const n={};return b.forEachEntry(t,(r,o)=>{e(fm(r),o,n,0)}),n}return null}function pm(t,e,n){if(b.isString(t))try{return(e||JSON.parse)(t),b.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const Yt={transitional:ji,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=b.isObject(e);if(i&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return o&&o?JSON.stringify(Ki(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return dm(e,this.formSerializer).toString();if((l=b.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return kn(l?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),pm(e)):e}],transformResponse:[function(e){const n=this.transitional||Yt.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(e&&b.isString(e)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(l){if(s)throw l.name==="SyntaxError"?W.from(l,W.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Re.classes.FormData,Blob:Re.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],t=>{Yt.headers[t]={}});const hm=b.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"]),gm=t=>{const e={};let n,r,o;return t&&t.split(`
|
|
149
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&hm[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Wi=Symbol("internals");function Jt(t){return t&&String(t).trim().toLowerCase()}function _n(t){return t===!1||t==null?t:b.isArray(t)?t.map(_n):String(t)}function ym(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const bm=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function _r(t,e,n,r,o){if(b.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!b.isString(e)){if(b.isString(r))return e.indexOf(r)!==-1;if(b.isRegExp(r))return r.test(e)}}function vm(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function wm(t,e){const n=b.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}class Ae{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(l,c,u){const f=Jt(c);if(!f)throw new Error("header name must be a non-empty string");const m=b.findKey(o,f);(!m||o[m]===void 0||u===!0||u===void 0&&o[m]!==!1)&&(o[m||c]=_n(l))}const s=(l,c)=>b.forEach(l,(u,f)=>i(u,f,c));return b.isPlainObject(e)||e instanceof this.constructor?s(e,n):b.isString(e)&&(e=e.trim())&&!bm(e)?s(gm(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=Jt(e),e){const r=b.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return ym(o);if(b.isFunction(n))return n.call(this,o,r);if(b.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Jt(e),e){const r=b.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||_r(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(s){if(s=Jt(s),s){const l=b.findKey(r,s);l&&(!n||_r(r,r[l],l,n))&&(delete r[l],o=!0)}}return b.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||_r(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return b.forEach(this,(o,i)=>{const s=b.findKey(r,i);if(s){n[s]=_n(o),delete n[i];return}const l=e?vm(i):String(i).trim();l!==i&&delete n[i],n[l]=_n(o),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return b.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&b.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
150
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Wi]=this[Wi]={accessors:{}}).accessors,o=this.prototype;function i(s){const l=Jt(s);r[l]||(wm(o,s),r[l]=!0)}return b.isArray(e)?e.forEach(i):i(e),this}}Ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(Ae.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),b.freezeMethods(Ae);function Ir(t,e){const n=this||Yt,r=e||n,o=Ae.from(r.headers);let i=r.data;return b.forEach(t,function(l){i=l.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function zi(t){return!!(t&&t.__CANCEL__)}function Xt(t,e,n){W.call(this,t??"canceled",W.ERR_CANCELED,e,n),this.name="CanceledError"}b.inherits(Xt,W,{__CANCEL__:!0});function Em(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Sm=Re.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];b.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),b.isString(r)&&s.push("path="+r),b.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.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 Cm(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Am(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function qi(t,e){return t&&!Cm(e)?Am(t,e):e}const km=Re.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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 r=o(window.location.href),function(s){const l=b.isString(s)?o(s):s;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function _m(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Im(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),f=r[i];s||(s=u),n[o]=c,r[o]=u;let m=i,y=0;for(;m!==o;)y+=n[m++],m=m%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;const E=f&&u-f;return E?Math.round(y*1e3/E):void 0}}function Gi(t,e){let n=0;const r=Im(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,l=i-n,c=r(l),u=i<=s;n=i;const f={loaded:i,total:s,progress:s?i/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-i)/c:void 0,event:o};f[e?"download":"upload"]=!0,t(f)}}const Pr={http:om,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){let o=t.data;const i=Ae.from(t.headers).normalize();let{responseType:s,withXSRFToken:l}=t,c;function u(){t.cancelToken&&t.cancelToken.unsubscribe(c),t.signal&&t.signal.removeEventListener("abort",c)}let f;if(b.isFormData(o)){if(Re.hasStandardBrowserEnv||Re.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((f=i.getContentType())!==!1){const[k,...S]=f?f.split(";").map(B=>B.trim()).filter(Boolean):[];i.setContentType([k||"multipart/form-data",...S].join("; "))}}let m=new XMLHttpRequest;if(t.auth){const k=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(k+":"+S))}const y=qi(t.baseURL,t.url);m.open(t.method.toUpperCase(),Hi(y,t.params,t.paramsSerializer),!0),m.timeout=t.timeout;function E(){if(!m)return;const k=Ae.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),B={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:k,config:t,request:m};Em(function(q){n(q),u()},function(q){r(q),u()},B),m=null}if("onloadend"in m?m.onloadend=E:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(E)},m.onabort=function(){m&&(r(new W("Request aborted",W.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new W("Network Error",W.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const B=t.transitional||ji;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),r(new W(S,B.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,t,m)),m=null},Re.hasStandardBrowserEnv&&(l&&b.isFunction(l)&&(l=l(t)),l||l!==!1&&km(y))){const k=t.xsrfHeaderName&&t.xsrfCookieName&&Sm.read(t.xsrfCookieName);k&&i.set(t.xsrfHeaderName,k)}o===void 0&&i.setContentType(null),"setRequestHeader"in m&&b.forEach(i.toJSON(),function(S,B){m.setRequestHeader(B,S)}),b.isUndefined(t.withCredentials)||(m.withCredentials=!!t.withCredentials),s&&s!=="json"&&(m.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&m.addEventListener("progress",Gi(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",Gi(t.onUploadProgress)),(t.cancelToken||t.signal)&&(c=k=>{m&&(r(!k||k.type?new Xt(null,t,m):k),m.abort(),m=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c)));const C=_m(y);if(C&&Re.protocols.indexOf(C)===-1){r(new W("Unsupported protocol "+C+":",W.ERR_BAD_REQUEST,t));return}m.send(o||null)})}};b.forEach(Pr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Yi=t=>`- ${t}`,Pm=t=>b.isFunction(t)||t===null||t===!1,Ji={getAdapter:t=>{t=b.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){n=t[i];let s;if(r=n,!Pm(n)&&(r=Pr[(s=String(n)).toLowerCase()],r===void 0))throw new W(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+i]=r}if(!r){const i=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
|
|
151
|
-
`+i.map(Yi).join(`
|
|
152
|
-
`):" "+Yi(i[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Pr};function Tr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Xt(null,t)}function Xi(t){return Tr(t),t.headers=Ae.from(t.headers),t.data=Ir.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ji.getAdapter(t.adapter||Yt.adapter)(t).then(function(r){return Tr(t),r.data=Ir.call(t,t.transformResponse,r),r.headers=Ae.from(r.headers),r},function(r){return zi(r)||(Tr(t),r&&r.response&&(r.response.data=Ir.call(t,t.transformResponse,r.response),r.response.headers=Ae.from(r.response.headers))),Promise.reject(r)})}const Zi=t=>t instanceof Ae?t.toJSON():t;function yt(t,e){e=e||{};const n={};function r(u,f,m){return b.isPlainObject(u)&&b.isPlainObject(f)?b.merge.call({caseless:m},u,f):b.isPlainObject(f)?b.merge({},f):b.isArray(f)?f.slice():f}function o(u,f,m){if(b.isUndefined(f)){if(!b.isUndefined(u))return r(void 0,u,m)}else return r(u,f,m)}function i(u,f){if(!b.isUndefined(f))return r(void 0,f)}function s(u,f){if(b.isUndefined(f)){if(!b.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function l(u,f,m){if(m in e)return r(u,f);if(m in t)return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,f)=>o(Zi(u),Zi(f),!0)};return b.forEach(Object.keys(Object.assign({},t,e)),function(f){const m=c[f]||o,y=m(t[f],e[f],f);b.isUndefined(y)&&m!==l||(n[f]=y)}),n}const Qi="1.6.5",xr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{xr[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const es={};xr.transitional=function(e,n,r){function o(i,s){return"[Axios v"+Qi+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,l)=>{if(e===!1)throw new W(o(s," has been removed"+(n?" in "+n:"")),W.ERR_DEPRECATED);return n&&!es[s]&&(es[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,l):!0}};function Tm(t,e,n){if(typeof t!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const l=t[i],c=l===void 0||s(l,i,t);if(c!==!0)throw new W("option "+i+" must be "+c,W.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new W("Unknown option "+i,W.ERR_BAD_OPTION)}}const Or={assertOptions:Tm,validators:xr},Ge=Or.validators;class nt{constructor(e){this.defaults=e,this.interceptors={request:new Fi,response:new Fi}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=yt(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Or.assertOptions(r,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),o!=null&&(b.isFunction(o)?n.paramsSerializer={serialize:o}:Or.assertOptions(o,{encode:Ge.function,serialize:Ge.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&b.merge(i.common,i[n.method]);i&&b.forEach(["delete","get","head","post","put","patch","common"],C=>{delete i[C]}),n.headers=Ae.concat(s,i);const l=[];let c=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(n)===!1||(c=c&&k.synchronous,l.unshift(k.fulfilled,k.rejected))});const u=[];this.interceptors.response.forEach(function(k){u.push(k.fulfilled,k.rejected)});let f,m=0,y;if(!c){const C=[Xi.bind(this),void 0];for(C.unshift.apply(C,l),C.push.apply(C,u),y=C.length,f=Promise.resolve(n);m<y;)f=f.then(C[m++],C[m++]);return f}y=l.length;let E=n;for(m=0;m<y;){const C=l[m++],k=l[m++];try{E=C(E)}catch(S){k.call(this,S);break}}try{f=Xi.call(this,E)}catch(C){return Promise.reject(C)}for(m=0,y=u.length;m<y;)f=f.then(u[m++],u[m++]);return f}getUri(e){e=yt(this.defaults,e);const n=qi(e.baseURL,e.url);return Hi(n,e.params,e.paramsSerializer)}}b.forEach(["delete","get","head","options"],function(e){nt.prototype[e]=function(n,r){return this.request(yt(r||{},{method:e,url:n,data:(r||{}).data}))}}),b.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,l){return this.request(yt(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}nt.prototype[e]=n(),nt.prototype[e+"Form"]=n(!0)});class Lr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(l=>{r.subscribe(l),i=l}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,l){r.reason||(r.reason=new Xt(i,s,l),n(r.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 Lr(function(o){e=o}),cancel:e}}}function xm(t){return function(n){return t.apply(null,n)}}function Om(t){return b.isObject(t)&&t.isAxiosError===!0}const Br={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(Br).forEach(([t,e])=>{Br[e]=t});function ts(t){const e=new nt(t),n=Ai(nt.prototype.request,e);return b.extend(n,nt.prototype,e,{allOwnKeys:!0}),b.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return ts(yt(t,o))},n}const Q=ts(Yt);Q.Axios=nt,Q.CanceledError=Xt,Q.CancelToken=Lr,Q.isCancel=zi,Q.VERSION=Qi,Q.toFormData=kn,Q.AxiosError=W,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=xm,Q.isAxiosError=Om,Q.mergeConfig=yt,Q.AxiosHeaders=Ae,Q.formToJSON=t=>Ki(b.isHTMLForm(t)?new FormData(t):t),Q.getAdapter=Ji.getAdapter,Q.HttpStatusCode=Br,Q.default=Q;class ns{constructor(e,n){xe(this,"keycloak");xe(this,"axios");this.keycloak=e,this.axios=Q.create(),this.axios.defaults.baseURL=n,this.axios.defaults.headers.common["content-type"]="application/json",this.axios.defaults.timeout=1e3*60*5,this.axios.interceptors.request.use(async r=>{await this.SilentLogin();const o=this.keycloak.token;return r.headers.Authorization=`Bearer ${o}`,r})}ParseAppResult(e){try{const n=typeof e.hasSuccess=="boolean",r=typeof e.hasError=="boolean",o=typeof e.httpStatusCode=="number",i=Array.isArray(e.errors);return n&&r&&o&&i?e:null}catch{return null}}HandleThen(e){const n=new wr,r=this.ParseAppResult(e.data);return r===null?(n.value=e.data,n):r.hasError?(r.errors.forEach(o=>n.WithError(o)),n.httpStatusCode=r.httpStatusCode,n):(n.value=e.data.value,n)}HandleCatch(e){var o;const n=new wr,r=this.ParseAppResult((o=e.response)==null?void 0:o.data);return r===null?n.WithError(e.message):(n.WithErrors(r.errors),n.httpStatusCode=r.httpStatusCode),n}async SilentLogin(){return this.keycloak.updateToken(10).catch(e=>{this.keycloak.clearToken(),this.keycloak.login()})}}const Lm=(t,e)=>new ns(t,e);or.SetInitialTheme(),j.AppResult=wr,j.AxiosClient=ns,j.SfButton=jr,j.SfContent=pu,j.SfDrawer=Fr,j.SfIcon=Ve,j.SfLayout=cu,j.SfMessage=wu,j.SfNavMenuLink=fu,j.SfPanelMenu=of,j.SfTabNavigation=bu,j.SfTooltip=On,j.StartAuthService=Af,j.UseAlertService=Yc,j.UseAuthService=Cf,j.UseAxiosClient=Lm,j.UseConfirmService=qo,j.UseNavMenuService=Tn,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|
|
153
|
-
//# sourceMappingURL=sf.prefeiturasp.vuecomponents.umd.js.map
|