nectiasw 0.0.21 → 0.0.23
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/index.umd.js
CHANGED
|
@@ -4721,5 +4721,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4721
4721
|
`,ic=function(v,k){if(!(!k.icon&&!k.iconHtml)){var M=v.innerHTML,G="";if(k.iconHtml)G=Zs(k.iconHtml);else if(k.icon==="success")G=fr,M=M.replace(/ style=".*?"/g,"");else if(k.icon==="error")G=rs;else if(k.icon){var ae={question:"?",warning:"!",info:"i"};G=Zs(ae[k.icon])}M.trim()!==G.trim()&&An(v,G)}},Tu=function(v,k){if(k.iconColor){v.style.color=k.iconColor,v.style.borderColor=k.iconColor;for(var M=0,G=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];M<G.length;M++){var ae=G[M];Ni(v,ae,"background-color",k.iconColor)}Ni(v,".swal2-success-ring","border-color",k.iconColor)}},Zs=function(v){return'<div class="'.concat(j["icon-content"],'">').concat(v,"</div>")},is=function(v,k){var M=Qn();if(M){if(!k.imageUrl){yn(M);return}$t(M,""),M.setAttribute("src",k.imageUrl),M.setAttribute("alt",k.imageAlt||""),_n(M,"width",k.imageWidth),_n(M,"height",k.imageHeight),M.className=j.image,kn(M,k,"image")}},ga=function(v,k){var M=ft(),G=je();if(!(!M||!G)){if(k.toast){_n(M,"width",k.width),G.style.width="100%";var ae=dr();ae&&G.insertBefore(ae,It())}else _n(G,"width",k.width);_n(G,"padding",k.padding),k.color&&(G.style.color=k.color),k.background&&(G.style.background=k.background),yn(Kn()),oc(G,k)}},oc=function(v,k){var M=k.showClass||{};v.className="".concat(j.popup," ").concat(ee(v)?M.popup:""),k.toast?(vt([document.documentElement,document.body],j["toast-shown"]),vt(v,j.toast)):vt(v,j.modal),kn(v,k,"popup"),typeof k.customClass=="string"&&vt(v,k.customClass),k.icon&&vt(v,j["icon-".concat(k.icon)])},Pu=function(v,k){var M=vn();if(M){var G=k.progressSteps,ae=k.currentProgressStep;if(!G||G.length===0||ae===void 0){yn(M);return}$t(M),M.textContent="",ae>=G.length&&Ee("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),G.forEach(function(Te,ht){var ct=Mu(Te);if(M.appendChild(ct),ht===ae&&vt(ct,j["active-progress-step"]),ht!==G.length-1){var un=qs(k);M.appendChild(un)}})}},Mu=function(v){var k=document.createElement("li");return vt(k,j["progress-step"]),An(k,v),k},qs=function(v){var k=document.createElement("li");return vt(k,j["progress-step-line"]),v.progressStepsDistance&&_n(k,"width",v.progressStepsDistance),k},ow=function(v,k){var M=wr();M&&(Vr(M),Y(M,k.title||k.titleText,"block"),k.title&&ce(k.title,M),k.titleText&&(M.innerText=k.titleText),kn(M,k,"title"))},Qm=function(v,k){ga(v,k),Br(v,k),Pu(v,k),rc(v,k),is(v,k),ow(v,k),Tr(v,k),Nn(v,k),At(v,k),ns(v,k);var M=je();typeof k.didRender=="function"&&M&&k.didRender(M)},aw=function(){return ee(je())},Km=function(){var v;return(v=Cn())===null||v===void 0?void 0:v.click()},sw=function(){var v;return(v=bn())===null||v===void 0?void 0:v.click()},Dn=function(){var v;return(v=er())===null||v===void 0?void 0:v.click()},Yt=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),eg=function(v){v.keydownTarget&&v.keydownHandlerAdded&&(v.keydownTarget.removeEventListener("keydown",v.keydownHandler,{capture:v.keydownListenerCapture}),v.keydownHandlerAdded=!1)},lw=function(v,k,M){eg(v),k.toast||(v.keydownHandler=function(G){return uw(k,G,M)},v.keydownTarget=k.keydownListenerCapture?window:je(),v.keydownListenerCapture=k.keydownListenerCapture,v.keydownTarget.addEventListener("keydown",v.keydownHandler,{capture:v.keydownListenerCapture}),v.keydownHandlerAdded=!0)},Gf=function(v,k){var M,G=Or();if(G.length){v=v+k,v===G.length?v=0:v===-1&&(v=G.length-1),G[v].focus();return}(M=je())===null||M===void 0||M.focus()},tg=["ArrowRight","ArrowDown"],cw=["ArrowLeft","ArrowUp"],uw=function(v,k,M){v&&(k.isComposing||k.keyCode===229||(v.stopKeydownPropagation&&k.stopPropagation(),k.key==="Enter"?ng(k,v):k.key==="Tab"?dw(k):[].concat(tg,cw).includes(k.key)?Rr(k.key):k.key==="Escape"&&Xf(k,v,M)))},ng=function(v,k){if(Xe(k.allowEnterKey)){var M=vi(je(),k.input);if(v.target&&M&&v.target instanceof HTMLElement&&v.target.outerHTML===M.outerHTML){if(["textarea","file"].includes(k.input))return;Km(),v.preventDefault()}}},dw=function(v){for(var k=v.target,M=Or(),G=-1,ae=0;ae<M.length;ae++)if(k===M[ae]){G=ae;break}v.shiftKey?Gf(G,-1):Gf(G,1),v.stopPropagation(),v.preventDefault()},Rr=function(v){var k=ln(),M=Cn(),G=bn(),ae=er();if(!(!k||!M||!G||!ae)){var Te=[M,G,ae];if(!(document.activeElement instanceof HTMLElement&&!Te.includes(document.activeElement))){var ht=tg.includes(v)?"nextElementSibling":"previousElementSibling",ct=document.activeElement;if(ct){for(var un=0;un<k.children.length;un++){if(ct=ct[ht],!ct)return;if(ct instanceof HTMLButtonElement&&ee(ct))break}ct instanceof HTMLButtonElement&&ct.focus()}}}},Xf=function(v,k,M){Xe(k.allowEscapeKey)&&(v.preventDefault(),M(Yt.esc))},Li={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},rg=function(){var v=ft(),k=Array.from(document.body.children);k.forEach(function(M){M.contains(v)||(M.hasAttribute("aria-hidden")&&M.setAttribute("data-previous-aria-hidden",M.getAttribute("aria-hidden")||""),M.setAttribute("aria-hidden","true"))})},Fu=function(){var v=Array.from(document.body.children);v.forEach(function(k){k.hasAttribute("data-previous-aria-hidden")?(k.setAttribute("aria-hidden",k.getAttribute("data-previous-aria-hidden")||""),k.removeAttribute("data-previous-aria-hidden")):k.removeAttribute("aria-hidden")})},bi=typeof window<"u"&&!!window.GestureEvent,ig=function(){if(bi&&!Gn(document.body,j.iosfix)){var v=document.body.scrollTop;document.body.style.top="".concat(v*-1,"px"),vt(document.body,j.iosfix),og()}},og=function(){var v=ft();if(v){var k;v.ontouchstart=function(M){k=ag(M)},v.ontouchmove=function(M){k&&(M.preventDefault(),M.stopPropagation())}}},ag=function(v){var k=v.target,M=ft(),G=Hn();return!M||!G||sg(v)||lg(v)?!1:k===M||!Oe(M)&&k instanceof HTMLElement&&k.tagName!=="INPUT"&&k.tagName!=="TEXTAREA"&&!(Oe(G)&&G.contains(k))},sg=function(v){return v.touches&&v.touches.length&&v.touches[0].touchType==="stylus"},lg=function(v){return v.touches&&v.touches.length>1},cg=function(){if(Gn(document.body,j.iosfix)){var v=parseInt(document.body.style.top,10);tr(document.body,j.iosfix),document.body.style.top="",document.body.scrollTop=v*-1}},yi=function(){var v=document.createElement("div");v.className=j["scrollbar-measure"],document.body.appendChild(v);var k=v.getBoundingClientRect().width-v.clientWidth;return document.body.removeChild(v),k},Js=null,zi=function(v){Js===null&&(document.body.scrollHeight>window.innerHeight||v==="scroll")&&(Js=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Js+yi(),"px"))},fw=function(){Js!==null&&(document.body.style.paddingRight="".concat(Js,"px"),Js=null)};function Zf(F,v,k,M){Vn()?ug(F,M):(V(k).then(function(){return ug(F,M)}),eg(Q)),bi?(v.setAttribute("style","display:none !important"),v.removeAttribute("class"),v.innerHTML=""):v.remove(),$r()&&(fw(),cg(),Fu()),va()}function va(){tr([document.documentElement,document.body],[j.shown,j["height-auto"],j["no-backdrop"],j["toast-shown"]])}function to(F){F=Jf(F);var v=Li.swalPromiseResolve.get(this),k=qf(this);this.isAwaitingPromise?F.isDismissed||(ji(this),v(F)):k&&v(F)}var qf=function(v){var k=je();if(!k)return!1;var M=Ht.innerParams.get(v);if(!M||Gn(k,M.hideClass.popup))return!1;tr(k,M.showClass.popup),vt(k,M.hideClass.popup);var G=ft();return tr(G,M.showClass.backdrop),vt(G,M.hideClass.backdrop),hw(v,k,M),!0};function In(F){var v=Li.swalPromiseReject.get(this);ji(this),v&&v(F)}var ji=function(v){v.isAwaitingPromise&&(delete v.isAwaitingPromise,Ht.innerParams.get(v)||v._destroy())},Jf=function(v){return typeof v>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},v)},hw=function(v,k,M){var G=ft(),ae=tn&&We(k);typeof M.willClose=="function"&&M.willClose(k),ae?Qf(v,k,G,M.returnFocus,M.didClose):Zf(v,G,M.returnFocus,M.didClose)},Qf=function(v,k,M,G,ae){tn&&(Q.swalCloseEventFinishedCallback=Zf.bind(null,v,M,G,ae),k.addEventListener(tn,function(Te){Te.target===k&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback)}))},ug=function(v,k){setTimeout(function(){typeof k=="function"&&k.bind(v.params)(),v._destroy&&v._destroy()})},Qs=function(v){var k=je();if(k||new ya,k=je(),!!k){var M=dr();Vn()?yn(It()):pw(k,v),$t(M),k.setAttribute("data-loading","true"),k.setAttribute("aria-busy","true"),k.focus()}},pw=function(v,k){var M=ln(),G=dr();!M||!G||(!k&&ee(Cn())&&(k=Cn()),$t(M),k&&(yn(k),G.setAttribute("data-button-to-replace",k.className),M.insertBefore(G,k)),vt([v,M],j.loading))},dg=function(v,k){k.input==="select"||k.input==="radio"?hg(v,k):["text","email","number","tel","textarea"].some(function(M){return M===k.input})&&(St(k.inputValue)||Zt(k.inputValue))&&(Qs(Cn()),Kf(v,k))},Nu=function(v,k){var M=v.getInput();if(!M)return null;switch(k.input){case"checkbox":return Ks(M);case"radio":return mw(M);case"file":return fg(M);default:return k.inputAutoTrim?M.value.trim():M.value}},Ks=function(v){return v.checked?1:0},mw=function(v){return v.checked?v.value:null},fg=function(v){return v.files&&v.files.length?v.getAttribute("multiple")!==null?v.files:v.files[0]:null},hg=function(v,k){var M=je();if(M){var G=function(Te){k.input==="select"?e0(M,mg(Te),k):k.input==="radio"&&pg(M,mg(Te),k)};St(k.inputOptions)||Zt(k.inputOptions)?(Qs(Cn()),gn(k.inputOptions).then(function(ae){v.hideLoading(),G(ae)})):X(k.inputOptions)==="object"?G(k.inputOptions):Be("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(X(k.inputOptions)))}},Kf=function(v,k){var M=v.getInput();M&&(yn(M),gn(k.inputValue).then(function(G){M.value=k.input==="number"?"".concat(parseFloat(G)||0):"".concat(G),$t(M),M.focus(),v.hideLoading()}).catch(function(G){Be("Error in inputValue promise: ".concat(G)),M.value="",$t(M),M.focus(),v.hideLoading()}))};function e0(F,v,k){var M=en(F,j.select);if(M){var G=function(Te,ht,ct){var un=document.createElement("option");un.value=ct,An(un,ht),un.selected=Bu(ct,k.inputValue),Te.appendChild(un)};v.forEach(function(ae){var Te=ae[0],ht=ae[1];if(Array.isArray(ht)){var ct=document.createElement("optgroup");ct.label=Te,ct.disabled=!1,M.appendChild(ct),ht.forEach(function(un){return G(ct,un[1],un[0])})}else G(M,ht,Te)}),M.focus()}}function pg(F,v,k){var M=en(F,j.radio);if(M){v.forEach(function(ae){var Te=ae[0],ht=ae[1],ct=document.createElement("input"),un=document.createElement("label");ct.type="radio",ct.name=j.radio,ct.value=Te,Bu(Te,k.inputValue)&&(ct.checked=!0);var pc=document.createElement("span");An(pc,ht),pc.className=j.label,un.appendChild(ct),un.appendChild(pc),M.appendChild(un)});var G=M.querySelectorAll("input");G.length&&G[0].focus()}}var mg=function F(v){var k=[];return v instanceof Map?v.forEach(function(M,G){var ae=M;X(ae)==="object"&&(ae=F(ae)),k.push([G,ae])}):Object.keys(v).forEach(function(M){var G=v[M];X(G)==="object"&&(G=F(G)),k.push([M,G])}),k},Bu=function(v,k){return!!k&&k.toString()===v.toString()},el=void 0,gw=function(v){var k=Ht.innerParams.get(v);v.disableButtons(),k.input?Ru(v,"confirm"):n0(v,!0)},gg=function(v){var k=Ht.innerParams.get(v);v.disableButtons(),k.returnInputValueOnDeny?Ru(v,"deny"):Lu(v,!1)},xi=function(v,k){v.disableButtons(),k(Yt.cancel)},Ru=function(v,k){var M=Ht.innerParams.get(v);if(!M.input){Be('The "input" parameter is needed to be set when using returnInputValueOn'.concat(be(k)));return}var G=v.getInput(),ae=Nu(v,M);M.inputValidator?ac(v,ae,k):G&&!G.checkValidity()?(v.enableButtons(),v.showValidationMessage(M.validationMessage||G.validationMessage)):k==="deny"?Lu(v,ae):n0(v,ae)},ac=function(v,k,M){var G=Ht.innerParams.get(v);v.disableInput();var ae=Promise.resolve().then(function(){return gn(G.inputValidator(k,G.validationMessage))});ae.then(function(Te){v.enableButtons(),v.enableInput(),Te?v.showValidationMessage(Te):M==="deny"?Lu(v,k):n0(v,k)})},Lu=function(v,k){var M=Ht.innerParams.get(v||el);if(M.showLoaderOnDeny&&Qs(bn()),M.preDeny){v.isAwaitingPromise=!0;var G=Promise.resolve().then(function(){return gn(M.preDeny(k,M.validationMessage))});G.then(function(ae){ae===!1?(v.hideLoading(),ji(v)):v.close({isDenied:!0,value:typeof ae>"u"?k:ae})}).catch(function(ae){return vg(v||el,ae)})}else v.close({isDenied:!0,value:k})},t0=function(v,k){v.close({isConfirmed:!0,value:k})},vg=function(v,k){v.rejectPromise(k)},n0=function(v,k){var M=Ht.innerParams.get(v||el);if(M.showLoaderOnConfirm&&Qs(),M.preConfirm){v.resetValidationMessage(),v.isAwaitingPromise=!0;var G=Promise.resolve().then(function(){return gn(M.preConfirm(k,M.validationMessage))});G.then(function(ae){ee(Kn())||ae===!1?(v.hideLoading(),ji(v)):t0(v,typeof ae>"u"?k:ae)}).catch(function(ae){return vg(v||el,ae)})}else t0(v,k)};function zu(){var F=Ht.innerParams.get(this);if(F){var v=Ht.domCache.get(this);yn(v.loader),Vn()?F.icon&&$t(It()):vw(v),tr([v.popup,v.actions],j.loading),v.popup.removeAttribute("aria-busy"),v.popup.removeAttribute("data-loading"),v.confirmButton.disabled=!1,v.denyButton.disabled=!1,v.cancelButton.disabled=!1}}var vw=function(v){var k=v.popup.getElementsByClassName(v.loader.getAttribute("data-button-to-replace"));k.length?$t(k[0],"inline-block"):ge()&&yn(v.actions)};function bg(){var F=Ht.innerParams.get(this),v=Ht.domCache.get(this);return v?vi(v.popup,F.input):null}function os(F,v,k){var M=Ht.domCache.get(F);v.forEach(function(G){M[G].disabled=k})}function yg(F,v){var k=je();if(!(!k||!F))if(F.type==="radio")for(var M=k.querySelectorAll('[name="'.concat(j.radio,'"]')),G=0;G<M.length;G++)M[G].disabled=v;else F.disabled=v}function xg(){os(this,["confirmButton","denyButton","cancelButton"],!1)}function ju(){os(this,["confirmButton","denyButton","cancelButton"],!0)}function r0(){yg(this.getInput(),!1)}function zo(){yg(this.getInput(),!0)}function sc(F){var v=Ht.domCache.get(this),k=Ht.innerParams.get(this);An(v.validationMessage,F),v.validationMessage.className=j["validation-message"],k.customClass&&k.customClass.validationMessage&&vt(v.validationMessage,k.customClass.validationMessage),$t(v.validationMessage);var M=this.getInput();M&&(M.setAttribute("aria-invalid","true"),M.setAttribute("aria-describedby",j["validation-message"]),Qi(M),vt(M,j.inputerror))}function wg(){var F=Ht.domCache.get(this);F.validationMessage&&yn(F.validationMessage);var v=this.getInput();v&&(v.removeAttribute("aria-invalid"),v.removeAttribute("aria-describedby"),tr(v,j.inputerror))}var tl={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,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:{},inputAutoFocus:!0,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},bw=["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"],nl={allowEnterKey:void 0},no=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],i0=function(v){return Object.prototype.hasOwnProperty.call(tl,v)},Cg=function(v){return bw.indexOf(v)!==-1},_g=function(v){return nl[v]},yw=function(v){i0(v)||Ee('Unknown parameter "'.concat(v,'"'))},xw=function(v){no.includes(v)&&Ee('The parameter "'.concat(v,'" is incompatible with toasts'))},ww=function(v){var k=_g(v);k&&ot(v,k)},rl=function(v){v.backdrop===!1&&v.allowOutsideClick&&Ee('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(var k in v)yw(k),v.toast&&xw(k),ww(k)};function oe(F){var v=je(),k=Ht.innerParams.get(this);if(!v||Gn(v,k.hideClass.popup)){Ee("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");return}var M=fe(F),G=Object.assign({},k,M);Qm(this,G),Ht.innerParams.set(this,G),Object.defineProperties(this,{params:{value:Object.assign({},this.params,F),writable:!1,enumerable:!0}})}var fe=function(v){var k={};return Object.keys(v).forEach(function(M){Cg(M)?k[M]=v[M]:Ee("Invalid parameter to update: ".concat(M))}),k};function le(){var F=Ht.domCache.get(this),v=Ht.innerParams.get(this);if(!v){st(this);return}F.popup&&Q.swalCloseEventFinishedCallback&&(Q.swalCloseEventFinishedCallback(),delete Q.swalCloseEventFinishedCallback),typeof v.didDestroy=="function"&&v.didDestroy(),Re(this)}var Re=function(v){st(v),delete v.params,delete Q.keydownHandler,delete Q.keydownTarget,delete Q.currentInstance},st=function(v){v.isAwaitingPromise?(Rt(Ht,v),v.isAwaitingPromise=!0):(Rt(Li,v),Rt(Ht,v),delete v.isAwaitingPromise,delete v.disableButtons,delete v.enableButtons,delete v.getInput,delete v.disableInput,delete v.enableInput,delete v.hideLoading,delete v.disableLoading,delete v.showValidationMessage,delete v.resetValidationMessage,delete v.close,delete v.closePopup,delete v.closeModal,delete v.closeToast,delete v.rejectPromise,delete v.update,delete v._destroy)},Rt=function(v,k){for(var M in v)v[M].delete(k)},_r=Object.freeze({__proto__:null,_destroy:le,close:to,closeModal:to,closePopup:to,closeToast:to,disableButtons:ju,disableInput:zo,disableLoading:zu,enableButtons:xg,enableInput:r0,getInput:bg,handleAwaitingPromise:ji,hideLoading:zu,rejectPromise:In,resetValidationMessage:wg,showValidationMessage:sc,update:oe}),xn=function(v,k,M){v.toast?o0(v,k,M):(Wu(k),_w(k),il(v,k,M))},o0=function(v,k,M){k.popup.onclick=function(){v&&(Cw(v)||v.timer||v.input)||M(Yt.close)}},Cw=function(v){return!!(v.showConfirmButton||v.showDenyButton||v.showCancelButton||v.showCloseButton)},ti=!1,Wu=function(v){v.popup.onmousedown=function(){v.container.onmouseup=function(k){v.container.onmouseup=function(){},k.target===v.container&&(ti=!0)}}},_w=function(v){v.container.onmousedown=function(k){k.target===v.container&&k.preventDefault(),v.popup.onmouseup=function(M){v.popup.onmouseup=function(){},(M.target===v.popup||M.target instanceof HTMLElement&&v.popup.contains(M.target))&&(ti=!0)}}},il=function(v,k,M){k.container.onclick=function(G){if(ti){ti=!1;return}G.target===k.container&&Xe(v.allowOutsideClick)&&M(Yt.backdrop)}},Hu=function(v){return X(v)==="object"&&v.jquery},lc=function(v){return v instanceof Element||Hu(v)},nn=function(v){var k={};return X(v[0])==="object"&&!lc(v[0])?Object.assign(k,v[0]):["title","html","icon"].forEach(function(M,G){var ae=v[G];typeof ae=="string"||lc(ae)?k[M]=ae:ae!==void 0&&Be("Unexpected type of ".concat(M,'! Expected "string" or "Element", got ').concat(X(ae)))}),k};function Ew(){for(var F=this,v=arguments.length,k=new Array(v),M=0;M<v;M++)k[M]=arguments[M];return g(F,k)}function Eg(F){var v=function(k){function M(){return c(this,M),s(this,M,arguments)}return C(M,k),y(M,[{key:"_main",value:function(ae,Te){return b(w(M.prototype),"_main",this).call(this,ae,Object.assign({},F,Te))}}])}(this);return v}var Uu=function(){return Q.timeout&&Q.timeout.getTimerLeft()},Sg=function(){if(Q.timeout)return $e(),Q.timeout.stop()},Ag=function(){if(Q.timeout){var v=Q.timeout.start();return lt(v),v}},Sw=function(){var v=Q.timeout;return v&&(v.running?Sg():Ag())},$u=function(v){if(Q.timeout){var k=Q.timeout.increase(v);return lt(k,!0),k}},ba=function(){return!!(Q.timeout&&Q.timeout.isRunning())},cc=!1,Yu={};function Vu(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Yu[F]=this,cc||(document.body.addEventListener("click",kg),cc=!0)}var kg=function(v){for(var k=v.target;k&&k!==document;k=k.parentNode)for(var M in Yu){var G=k.getAttribute(M);if(G){Yu[M].fire({template:G});return}}},Dg=Object.freeze({__proto__:null,argsToParams:nn,bindClickHandler:Vu,clickCancel:Dn,clickConfirm:Km,clickDeny:sw,enableLoading:Qs,fire:Ew,getActions:ln,getCancelButton:er,getCloseButton:Sn,getConfirmButton:Cn,getContainer:ft,getDenyButton:bn,getFocusableElements:Or,getFooter:Un,getHtmlContainer:Hn,getIcon:It,getIconContent:Wn,getImage:Qn,getInputLabel:Cr,getLoader:dr,getPopup:je,getProgressSteps:vn,getTimerLeft:Uu,getTimerProgressBar:Fn,getTitle:wr,getValidationMessage:Kn,increaseTimer:$u,isDeprecatedParameter:_g,isLoading:Yr,isTimerRunning:ba,isUpdatableParameter:Cg,isValidParameter:i0,isVisible:aw,mixin:Eg,resumeTimer:Ag,showLoading:Qs,stopTimer:Sg,toggleTimer:Sw}),Gu=function(){function F(v,k){c(this,F),this.callback=v,this.remaining=k,this.running=!1,this.start()}return y(F,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(k){var M=this.running;return M&&this.stop(),this.remaining+=k,M&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}])}(),a0=["swal-title","swal-html","swal-footer"],uc=function(v){var k=typeof v.template=="string"?document.querySelector(v.template):v.template;if(!k)return{};var M=k.content;s0(M);var G=Object.assign(as(M),Xu(M),Aw(M),kw(M),Dw(M),Zu(M),qu(M,a0));return G},as=function(v){var k={},M=Array.from(v.querySelectorAll("swal-param"));return M.forEach(function(G){ss(G,["name","value"]);var ae=G.getAttribute("name"),Te=G.getAttribute("value");!ae||!Te||(typeof tl[ae]=="boolean"?k[ae]=Te!=="false":X(tl[ae])==="object"?k[ae]=JSON.parse(Te):k[ae]=Te)}),k},Xu=function(v){var k={},M=Array.from(v.querySelectorAll("swal-function-param"));return M.forEach(function(G){var ae=G.getAttribute("name"),Te=G.getAttribute("value");!ae||!Te||(k[ae]=new Function("return ".concat(Te))())}),k},Aw=function(v){var k={},M=Array.from(v.querySelectorAll("swal-button"));return M.forEach(function(G){ss(G,["type","color","aria-label"]);var ae=G.getAttribute("type");!ae||!["confirm","cancel","deny"].includes(ae)||(k["".concat(ae,"ButtonText")]=G.innerHTML,k["show".concat(be(ae),"Button")]=!0,G.hasAttribute("color")&&(k["".concat(ae,"ButtonColor")]=G.getAttribute("color")),G.hasAttribute("aria-label")&&(k["".concat(ae,"ButtonAriaLabel")]=G.getAttribute("aria-label")))}),k},kw=function(v){var k={},M=v.querySelector("swal-image");return M&&(ss(M,["src","width","height","alt"]),M.hasAttribute("src")&&(k.imageUrl=M.getAttribute("src")||void 0),M.hasAttribute("width")&&(k.imageWidth=M.getAttribute("width")||void 0),M.hasAttribute("height")&&(k.imageHeight=M.getAttribute("height")||void 0),M.hasAttribute("alt")&&(k.imageAlt=M.getAttribute("alt")||void 0)),k},Dw=function(v){var k={},M=v.querySelector("swal-icon");return M&&(ss(M,["type","color"]),M.hasAttribute("type")&&(k.icon=M.getAttribute("type")),M.hasAttribute("color")&&(k.iconColor=M.getAttribute("color")),k.iconHtml=M.innerHTML),k},Zu=function(v){var k={},M=v.querySelector("swal-input");M&&(ss(M,["type","label","placeholder","value"]),k.input=M.getAttribute("type")||"text",M.hasAttribute("label")&&(k.inputLabel=M.getAttribute("label")),M.hasAttribute("placeholder")&&(k.inputPlaceholder=M.getAttribute("placeholder")),M.hasAttribute("value")&&(k.inputValue=M.getAttribute("value")));var G=Array.from(v.querySelectorAll("swal-input-option"));return G.length&&(k.inputOptions={},G.forEach(function(ae){ss(ae,["value"]);var Te=ae.getAttribute("value");if(Te){var ht=ae.innerHTML;k.inputOptions[Te]=ht}})),k},qu=function(v,k){var M={};for(var G in k){var ae=k[G],Te=v.querySelector(ae);Te&&(ss(Te,[]),M[ae.replace(/^swal-/,"")]=Te.innerHTML.trim())}return M},s0=function(v){var k=a0.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(v.children).forEach(function(M){var G=M.tagName.toLowerCase();k.includes(G)||Ee("Unrecognized element <".concat(G,">"))})},ss=function(v,k){Array.from(v.attributes).forEach(function(M){k.indexOf(M.name)===-1&&Ee(['Unrecognized attribute "'.concat(M.name,'" on <').concat(v.tagName.toLowerCase(),">."),"".concat(k.length?"Allowed attributes are: ".concat(k.join(", ")):"To set the value, use HTML within the element.")])})},l0=10,Iw=function(v){var k=ft(),M=je();typeof v.willOpen=="function"&&v.willOpen(M);var G=window.getComputedStyle(document.body),ae=G.overflowY;Tw(k,M,v),setTimeout(function(){Er(k,M)},l0),$r()&&(Gr(k,v.scrollbarPadding,ae),rg()),!Vn()&&!Q.previousActiveElement&&(Q.previousActiveElement=document.activeElement),typeof v.didOpen=="function"&&setTimeout(function(){return v.didOpen(M)}),tr(k,j["no-transition"])},Ow=function F(v){var k=je();if(!(v.target!==k||!tn)){var M=ft();k.removeEventListener(tn,F),M.style.overflowY="auto"}},Er=function(v,k){tn&&We(k)?(v.style.overflowY="hidden",k.addEventListener(tn,Ow)):v.style.overflowY="auto"},Gr=function(v,k,M){ig(),k&&M!=="hidden"&&zi(M),setTimeout(function(){v.scrollTop=0})},Tw=function(v,k,M){vt(v,M.showClass.backdrop),M.animation?(k.style.setProperty("opacity","0","important"),$t(k,"grid"),setTimeout(function(){vt(k,M.showClass.popup),k.style.removeProperty("opacity")},l0)):$t(k,"grid"),vt([document.documentElement,document.body],j.shown),M.heightAuto&&M.backdrop&&!M.toast&&vt([document.documentElement,document.body],j["height-auto"])},Ig={email:function(v,k){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(v)?Promise.resolve():Promise.resolve(k||"Invalid email address")},url:function(v,k){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(v)?Promise.resolve():Promise.resolve(k||"Invalid URL")}};function Og(F){F.inputValidator||(F.input==="email"&&(F.inputValidator=Ig.email),F.input==="url"&&(F.inputValidator=Ig.url))}function Pw(F){(!F.target||typeof F.target=="string"&&!document.querySelector(F.target)||typeof F.target!="string"&&!F.target.appendChild)&&(Ee('Target parameter is not valid, defaulting to "body"'),F.target="body")}function c0(F){Og(F),F.showLoaderOnConfirm&&!F.preConfirm&&Ee(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
|
|
4722
4722
|
showLoaderOnConfirm should be used together with preConfirm, see usage example:
|
|
4723
4723
|
https://sweetalert2.github.io/#ajax-request`),Pw(F),typeof F.title=="string"&&(F.title=F.title.split(`
|
|
4724
|
-
`).join("<br />")),Ot(F)}var ui,ol=new WeakMap,En=function(){function F(){if(c(this,F),h(this,ol,void 0),!(typeof window>"u")){ui=this;for(var v=arguments.length,k=new Array(v),M=0;M<v;M++)k[M]=arguments[M];var G=Object.freeze(this.constructor.argsToParams(k));this.params=G,this.isAwaitingPromise=!1,m(ol,this,this._main(ui.params))}}return y(F,[{key:"_main",value:function(k){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(rl(Object.assign({},M,k)),Q.currentInstance){var G=Li.swalPromiseResolve.get(Q.currentInstance),ae=Q.currentInstance.isAwaitingPromise;Q.currentInstance._destroy(),ae||G({isDismissed:!0}),$r()&&Fu()}Q.currentInstance=ui;var Te=fc(k,M);c0(Te),Object.freeze(Te),Q.timeout&&(Q.timeout.stop(),delete Q.timeout),clearTimeout(Q.restoreFocusTimeout);var ht=Ju(ui);return Qm(ui,Te),Ht.innerParams.set(ui,Te),dc(ui,ht,Te)}},{key:"then",value:function(k){return d(ol,this).then(k)}},{key:"finally",value:function(k){return d(ol,this).finally(k)}}])}(),dc=function(v,k,M){return new Promise(function(G,ae){var Te=function(ct){v.close({isDismissed:!0,dismiss:ct})};Li.swalPromiseResolve.set(v,G),Li.swalPromiseReject.set(v,ae),k.confirmButton.onclick=function(){gw(v)},k.denyButton.onclick=function(){gg(v)},k.cancelButton.onclick=function(){xi(v,Te)},k.closeButton.onclick=function(){Te(Yt.close)},xn(M,k,Te),lw(Q,M,Te),dg(v,M),Iw(M),al(Q,M,Te),Mw(k,M),setTimeout(function(){k.container.scrollTop=0})})},fc=function(v,k){var M=uc(v),G=Object.assign({},tl,k,M,v);return G.showClass=Object.assign({},tl.showClass,G.showClass),G.hideClass=Object.assign({},tl.hideClass,G.hideClass),G.animation===!1&&(G.showClass={backdrop:"swal2-noanimation"},G.hideClass={}),G},Ju=function(v){var k={popup:je(),container:ft(),actions:ln(),confirmButton:Cn(),denyButton:bn(),cancelButton:er(),loader:dr(),closeButton:Sn(),validationMessage:Kn(),progressSteps:vn()};return Ht.domCache.set(v,k),k},al=function(v,k,M){var G=Fn();yn(G),k.timer&&(v.timeout=new Gu(function(){M("timer"),delete v.timeout},k.timer),k.timerProgressBar&&($t(G),kn(G,k,"timerProgressBar"),setTimeout(function(){v.timeout&&v.timeout.running&<(k.timer)})))},Mw=function(v,k){if(!k.toast){if(!Xe(k.allowEnterKey)){ot("allowEnterKey"),Bw();return}Fw(v)||Nw(v,k)||Gf(-1,1)}},Fw=function(v){var k=v.popup.querySelectorAll("[autofocus]"),M=f(k),G;try{for(M.s();!(G=M.n()).done;){var ae=G.value;if(ae instanceof HTMLElement&&ee(ae))return ae.focus(),!0}}catch(Te){M.e(Te)}finally{M.f()}return!1},Nw=function(v,k){return k.focusDeny&&ee(v.denyButton)?(v.denyButton.focus(),!0):k.focusCancel&&ee(v.cancelButton)?(v.cancelButton.focus(),!0):k.focusConfirm&&ee(v.confirmButton)?(v.confirmButton.focus(),!0):!1},Bw=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var Tg=new Date,hc=localStorage.getItem("swal-initiation");hc?(Tg.getTime()-Date.parse(hc))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var F=document.createElement("audio");F.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",F.loop=!0,document.body.appendChild(F),setTimeout(function(){F.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(Tg))}En.prototype.disableButtons=ju,En.prototype.enableButtons=xg,En.prototype.getInput=bg,En.prototype.disableInput=zo,En.prototype.enableInput=r0,En.prototype.hideLoading=zu,En.prototype.disableLoading=zu,En.prototype.showValidationMessage=sc,En.prototype.resetValidationMessage=wg,En.prototype.close=to,En.prototype.closePopup=to,En.prototype.closeModal=to,En.prototype.closeToast=to,En.prototype.rejectPromise=In,En.prototype.update=oe,En.prototype._destroy=le,Object.assign(En,Dg),Object.keys(_r).forEach(function(F){En[F]=function(){if(ui&&ui[F]){var v;return(v=ui)[F].apply(v,arguments)}return null}}),En.DismissReason=Yt,En.version="11.12.3";var ya=En;return ya.default=ya,ya}),typeof Qe<"u"&&Qe.Sweetalert2&&(Qe.swal=Qe.sweetAlert=Qe.Swal=Qe.SweetAlert=Qe.Sweetalert2),typeof document<"u"&&function(t,r){var i=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=r);else try{i.innerHTML=r}catch{i.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(SI);var xre=SI.exports;const AI=wc(xre);var Iu;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Iu||(Iu={}));var kI=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function wre(e,n){{typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}var DI="beforeunload",Cre="popstate";function _re(e){e===void 0&&(e={});var n=e,t=n.window,r=t===void 0?document.defaultView:t,i=r.history;function o(){var A=r.location,I=A.pathname,B=A.search,N=A.hash,L=i.state||{};return[L.idx,kI({pathname:I,search:B,hash:N,state:L.usr||null,key:L.key||"default"})]}var a=null;function s(){if(a)g.call(a),a=null;else{var A=Iu.Pop,I=o(),B=I[0],N=I[1];if(g.length)if(B!=null){var L=d-B;L&&(a={action:A,location:N,retry:function(){E(L*-1)}},E(L))}else process.env.NODE_ENV!=="production"&&wre(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else w(A)}}r.addEventListener(Cre,s);var l=Iu.Pop,c=o(),d=c[0],h=c[1],m=OI(),g=OI();d==null&&(d=0,i.replaceState(Ge({},i.state,{idx:d}),""));function x(A){return typeof A=="string"?A:Sre(A)}function y(A,I){return I===void 0&&(I=null),kI(Ge({pathname:h.pathname,hash:"",search:""},typeof A=="string"?Are(A):A,{state:I,key:Ere()}))}function f(A,I){return[{usr:A.state,key:A.key,idx:I},x(A)]}function b(A,I,B){return!g.length||(g.call({action:A,location:I,retry:B}),!1)}function w(A){l=A;var I=o();d=I[0],h=I[1],m.call({action:l,location:h})}function C(A,I){var B=Iu.Push,N=y(A,I);function L(){C(A,I)}if(b(B,N,L)){var z=f(N,d+1),U=z[0],q=z[1];try{i.pushState(U,"",q)}catch{r.location.assign(q)}w(B)}}function S(A,I){var B=Iu.Replace,N=y(A,I);function L(){S(A,I)}if(b(B,N,L)){var z=f(N,d),U=z[0],q=z[1];i.replaceState(U,"",q),w(B)}}function E(A){i.go(A)}var D={get action(){return l},get location(){return h},createHref:x,push:C,replace:S,go:E,back:function(){E(-1)},forward:function(){E(1)},listen:function(I){return m.push(I)},block:function(I){var B=g.push(I);return g.length===1&&r.addEventListener(DI,II),function(){B(),g.length||r.removeEventListener(DI,II)}}};return D}function II(e){e.preventDefault(),e.returnValue=""}function OI(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(r){return r!==t})}},call:function(t){e.forEach(function(r){return r&&r(t)})}}}function Ere(){return Math.random().toString(36).substr(2,8)}function Sre(e){var n=e.pathname,t=n===void 0?"/":n,r=e.search,i=r===void 0?"":r,o=e.hash,a=o===void 0?"":o;return i&&i!=="?"&&(t+=i.charAt(0)==="?"?i:"?"+i),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Are(e){var n={};if(e){var t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));var r=e.indexOf("?");r>=0&&(n.search=e.substr(r),e=e.substr(0,r)),e&&(n.pathname=e)}return n}var Q2=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Q2||{}),TI=(e=>(e.INFO="#4caf50",e.WARN="#ff9800",e.ERROR="#f44336",e.DEBUG="#2196f3",e))(TI||{});class K2{constructor(n=1,t=!1){ue(this,"logLevel");ue(this,"isDevelopment");ue(this,"logs");this.logLevel=n,this.isDevelopment=t,this.logs=[]}debug(n,...t){this.logLevel<=0&&this.log("🐛",n,"#2196f3",...t)}info(n,...t){this.logLevel<=1&&this.log("ℹ️",n,"#4caf50",...t)}warn(n,...t){this.logLevel<=2&&this.log("⚠️",n,"#ff9800",...t)}error(n,...t){this.logLevel<=3&&this.log("🚨",n,"#f44336",...t)}log(n,t,r,...i){const o=`${n} ${t}`,a=`%c ${o}`,s=[`color: ${r}`,...i];this.isDevelopment&&console.log(a,...s),this.logs.push(o)}getLogs(){return this.logs}}const kre=["otic","otec","empresa"],Dre=e=>{const n=kre.find(t=>e.includes(t));return(n==null?void 0:n.toLowerCase())==="empresa"?"cliente":n??""},PI=()=>Date.now()/1e3,Ire=e=>60*e*1e3,MI=e=>e??"",Ou=new K2(Q2.DEBUG,!0),Ore=T.memo(e=>{var A;const{app:n,layout:t=!0,navbar:r=()=>!0,sidebar:i=()=>!0,footer:o,navigation:a,environment:s,modalExpired:l,observerToken:c=!0,previousPath:d=!1,includeNavbarDropdown:h}=e,[m,g]=T.useState({}),[x,y]=T.useState(!0),f=T.useRef(_re()),b=T.useRef(0),w=T.useRef(!0);D8(Ys.ON_CONNECT_APP,()=>{y(!0)},n);const C=T.useCallback(I=>{I&&g(I)},[]),S=T.useCallback(async I=>{var B;w.current&&(w.current=!1,await AI.fire({icon:"warning",text:"No tiene permisos para acceder a este recurso",title:"Acceso denegado",showCloseButton:!0,showCancelButton:!1,showConfirmButton:!1}),(B=f.current)==null||B.push({pathname:I}),w.current=!0)},[]);T.useEffect(()=>{typeof e.loading=="boolean"&&y(e.loading)},[e.loading]),T.useEffect(()=>{var I,B,N,L;if(c){if((I=m==null?void 0:m.info)!=null&&I.exp){const z=PI();Ou.info("Token status",{now:z,expiresAt:(B=m==null?void 0:m.info)==null?void 0:B.exp,shouldExpire:((N=m==null?void 0:m.info)==null?void 0:N.exp)<z}),((L=m==null?void 0:m.info)==null?void 0:L.exp)<z&&(Ou.warn("Token expired",Ys.SSO_EXPIRED),Uf(Ys.SSO_EXPIRED,"Su sesión ha expirado, por favor vuelva a iniciar sesión"),l&&E()),b.current=setInterval(()=>{var q,H,X,te;const U=PI();(q=m==null?void 0:m.info)!=null&&q.exp&&(Ou.info("Token status",{expiresAt:(H=m==null?void 0:m.info)==null?void 0:H.exp,now:U,shouldExpire:((X=m==null?void 0:m.info)==null?void 0:X.exp)<U}),((te=m==null?void 0:m.info)==null?void 0:te.exp)<U&&(Ou.warn("Token expired",Ys.SSO_EXPIRED),Uf(Ys.SSO_EXPIRED,"Su sesión ha expirado, por favor vuelva a iniciar sesión"),l&&E()))},Ire(1))}return()=>{clearInterval(b.current),b.current=0}}},[(A=m==null?void 0:m.info)==null?void 0:A.exp,c,l]),T.useEffect(()=>{c&&(n2(Ys.SIGNAL,I=>{Ou.info("MicrofrontHost: useObserver: signal: ",I),g(I),y(!1)}),Ou.info("MicrofrontHost: useEffect: broadcast: ",n))},[n,c]);const E=async()=>{var I;await AI.fire({icon:"error",position:"top",text:"Tu sesión ha expirado, por favor inicia sesión nuevamente",showCloseButton:!0,showConfirmButton:!1}),(I=f.current)==null||I.push("/login")},D=T.useMemo(()=>{var I,B,N,L;return{...m,loading:x,onSignal:C,onAcessDenied:S,history:f.current,environment:s,ref:{lastName:MI((I=m==null?void 0:m.user)==null?void 0:I.lastName),firstName:MI((B=m==null?void 0:m.user)==null?void 0:B.firstName),role:Dre(((L=(N=m==null?void 0:m.info)==null?void 0:N.realm_access)==null?void 0:L.roles)??[])}}},[m,x,s,C,S]);return P.jsx(gu.Provider,{value:D,children:t?P.jsx(b6,{menu:a,includeNavbar:r==null?void 0:r(m,x),includeSidebar:i==null?void 0:i(m,x),includeNavbarDropdown:h,previousPath:d,includeFooter:o,children:x?P.jsx(hx,{status:!0}):e.children}):P.jsx(P.Fragment,{children:x?P.jsx(hx,{status:!0}):e.children})})});var FI=(e=>(e.IB="Integra Negocio",e.SP="Sistema de Perfilamiento v2",e))(FI||{});const NI=T.memo(({allow:e,grants:n,children:t})=>{var l;const r=T.useContext(gu),i=new K2(void 0,n==null?void 0:n.debug),[o,a]=T.useState(!1);T.useEffect(()=>{var c,d;(d=(c=r==null?void 0:r.user)==null?void 0:c.systems)!=null&&d.length&&s(r)},[(l=r==null?void 0:r.user)==null?void 0:l.systems]);const s=T.useCallback(async c=>{var h,m;const d=(m=(h=c==null?void 0:c.user)==null?void 0:h.systems)==null?void 0:m.find(g=>g.name===(n==null?void 0:n.system));i.debug("ref:",d),d!=null&&d.functions&&(d.functions.filter(x=>{const y=x==null?void 0:x.key;return e==null?void 0:e.includes(y)}).length===(e==null?void 0:e.length)?a(!0):(i.debug("denied"),r!=null&&r.onAcessDenied&&(r==null||r.onAcessDenied(n==null?void 0:n.redirect))))},[n==null?void 0:n.system,n==null?void 0:n.debug,e]);return P.jsx(P.Fragment,{children:o?t:null})});NI.defaultProps={allow:[],grants:{debug:!1,system:"Integra Negocio",redirect:"/dashboard",popup:{text:"You don't have the required permissions to access this page.",title:"Access Denied"}}};class ew{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){const t={listener:n};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const qm=typeof window>"u"||"Deno"in window;function Tre(){}function BI(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pre(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Mre(e,n,t){return Fre(e)?typeof n=="function"?{...t,queryKey:e,queryFn:n}:{...n,queryKey:e}:e}function RI(e,n){if(e===n)return e;const t=zI(e)&&zI(n);if(t||jI(e)&&jI(n)){const r=t?e.length:Object.keys(e).length,i=t?n:Object.keys(n),o=i.length,a=t?[]:{};let s=0;for(let l=0;l<o;l++){const c=t?l:i[l];a[c]=RI(e[c],n[c]),a[c]===e[c]&&s++}return r===o&&s===r?e:a}return n}function LI(e,n){if(e&&!n||n&&!e)return!1;for(const t in e)if(e[t]!==n[t])return!1;return!0}function zI(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jI(e){if(!WI(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const t=n.prototype;return!(!WI(t)||!t.hasOwnProperty("isPrototypeOf"))}function WI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fre(e){return Array.isArray(e)}function Nre(e){return new Promise(n=>{setTimeout(n,e)})}function HI(e){Nre(0).then(e)}function UI(e,n,t){return t.isDataEqual!=null&&t.isDataEqual(e,n)?e:typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?RI(e,n):n}class Bre extends ew{constructor(){super(),this.setup=n=>{if(!qm&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var n;(n=this.cleanup)==null||n.call(this),this.cleanup=void 0}}setEventListener(n){var t;this.setup=n,(t=this.cleanup)==null||t.call(this),this.cleanup=n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(n){this.focused!==n&&(this.focused=n,this.onFocus())}onFocus(){this.listeners.forEach(({listener:n})=>{n()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Rre=new Bre,$I=["online","offline"];class Lre extends ew{constructor(){super(),this.setup=n=>{if(!qm&&window.addEventListener){const t=()=>n();return $I.forEach(r=>{window.addEventListener(r,t,!1)}),()=>{$I.forEach(r=>{window.removeEventListener(r,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var n;(n=this.cleanup)==null||n.call(this),this.cleanup=void 0}}setEventListener(n){var t;this.setup=n,(t=this.cleanup)==null||t.call(this),this.cleanup=n(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(n){this.online!==n&&(this.online=n,this.onOnline())}onOnline(){this.listeners.forEach(({listener:n})=>{n()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const zre=new Lre;function jre(e){return(e??"online")==="online"?zre.isOnline():!0}class Wre{constructor(n){this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}}function Hre(e){return e instanceof Wre}function Ure(){let e=[],n=0,t=d=>{d()},r=d=>{d()};const i=d=>{let h;n++;try{h=d()}finally{n--,n||s()}return h},o=d=>{n?e.push(d):HI(()=>{t(d)})},a=d=>(...h)=>{o(()=>{d(...h)})},s=()=>{const d=e;e=[],d.length&&HI(()=>{r(()=>{d.forEach(h=>{t(h)})})})};return{batch:i,batchCalls:a,schedule:o,setNotifyFunction:d=>{t=d},setBatchNotifyFunction:d=>{r=d}}}const Vf=Ure();class $re extends ew{constructor(n,t){super(),this.client=n,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),YI(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tw(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tw(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(n,t){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(n),process.env.NODE_ENV!=="production"&&typeof(n==null?void 0:n.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),LI(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&VI(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(t),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(n){const t=this.client.getQueryCache().build(this.client,n),r=this.createResult(t,n);return Vre(this,r,n)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(n){const t={};return Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),n[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:n,...t}={}){return this.fetch({...t,meta:{refetchPage:n}})}fetchOptimistic(n){const t=this.client.defaultQueryOptions(n),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(n){var t;return this.executeFetch({...n,cancelRefetch:(t=n.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(n){this.updateQuery();let t=this.currentQuery.fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Tre)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),qm||this.currentResult.isStale||!BI(this.options.staleTime))return;const t=Pre(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var n;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(n=this.options.refetchInterval)!=null?n:!1}updateRefetchInterval(n){this.clearRefetchInterval(),this.currentRefetchInterval=n,!(qm||this.options.enabled===!1||!BI(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Rre.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(n,t){const r=this.currentQuery,i=this.options,o=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=n!==r,c=l?n.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:h}=n;let{dataUpdatedAt:m,error:g,errorUpdatedAt:x,fetchStatus:y,status:f}=h,b=!1,w=!1,C;if(t._optimisticResults){const I=this.hasListeners(),B=!I&&YI(n,t),N=I&&VI(n,r,t,i);(B||N)&&(y=jre(n.options.networkMode)?"fetching":"paused",m||(f="loading")),t._optimisticResults==="isRestoring"&&(y="idle")}if(t.keepPreviousData&&!h.dataUpdatedAt&&d!=null&&d.isSuccess&&f!=="error")C=d.data,m=d.dataUpdatedAt,f=d.status,b=!0;else if(t.select&&typeof h.data<"u")if(o&&h.data===(a==null?void 0:a.data)&&t.select===this.selectFn)C=this.selectResult;else try{this.selectFn=t.select,C=t.select(h.data),C=UI(o==null?void 0:o.data,C,t),this.selectResult=C,this.selectError=null}catch(I){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(I),this.selectError=I}else C=h.data;if(typeof t.placeholderData<"u"&&typeof C>"u"&&f==="loading"){let I;if(o!=null&&o.isPlaceholderData&&t.placeholderData===(s==null?void 0:s.placeholderData))I=o.data;else if(I=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof I<"u")try{I=t.select(I),this.selectError=null}catch(B){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(B),this.selectError=B}typeof I<"u"&&(f="success",C=UI(o==null?void 0:o.data,I,t),w=!0)}this.selectError&&(g=this.selectError,C=this.selectResult,x=Date.now(),f="error");const S=y==="fetching",E=f==="loading",D=f==="error";return{status:f,fetchStatus:y,isLoading:E,isSuccess:f==="success",isError:D,isInitialLoading:E&&S,data:C,dataUpdatedAt:m,error:g,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:S,isRefetching:S&&!E,isLoadingError:D&&h.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:w,isPreviousData:b,isRefetchError:D&&h.dataUpdatedAt!==0,isStale:nw(n,t),refetch:this.refetch,remove:this.remove}}updateResult(n){const t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,LI(r,t))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const d=c;return this.currentResult[d]!==t[d]&&l.has(d)})};(n==null?void 0:n.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...n})}updateQuery(){const n=this.client.getQueryCache().build(this.client,this.options);if(n===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=n,this.currentQueryInitialState=n.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))}onQueryUpdate(n){const t={};n.type==="success"?t.onSuccess=!n.manual:n.type==="error"&&!Hre(n.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(n){Vf.batch(()=>{if(n.onSuccess){var t,r,i,o;(t=(r=this.options).onSuccess)==null||t.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(n.onError){var a,s,l,c;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}n.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),n.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Yre(e,n){return n.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&n.retryOnMount===!1)}function YI(e,n){return Yre(e,n)||e.state.dataUpdatedAt>0&&tw(e,n,n.refetchOnMount)}function tw(e,n,t){if(n.enabled!==!1){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&nw(e,n)}return!1}function VI(e,n,t,r){return t.enabled!==!1&&(e!==n||r.enabled===!1)&&(!t.suspense||e.state.status!=="error")&&nw(e,t)}function nw(e,n){return e.isStaleByTime(n.staleTime)}function Vre(e,n,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?n.isPlaceholderData:e.getCurrentResult()!==n}var Gre=s2();const Xre=Gre.useSyncExternalStore,GI=$.createContext(void 0),Zre=$.createContext(!1);function qre(e,n){return e||(n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=GI),window.ReactQueryClientContext):GI)}const XI=({context:e}={})=>{const n=$.useContext(qre(e,$.useContext(Zre)));if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},ZI=$.createContext(!1),Jre=()=>$.useContext(ZI);ZI.Provider;function Qre(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Kre=$.createContext(Qre()),eie=()=>$.useContext(Kre);function tie(e,n){return typeof e=="function"?e(...n):!!e}const nie=(e,n)=>{(e.suspense||e.useErrorBoundary)&&(n.isReset()||(e.retryOnMount=!1))},rie=e=>{$.useEffect(()=>{e.clearReset()},[e])},iie=({result:e,errorResetBoundary:n,useErrorBoundary:t,query:r})=>e.isError&&!n.isReset()&&!e.isFetching&&tie(t,[e.error,r]),oie=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},aie=(e,n)=>e.isLoading&&e.isFetching&&!n,sie=(e,n,t)=>(e==null?void 0:e.suspense)&&aie(n,t),lie=(e,n,t)=>n.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{t.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function cie(e,n){const t=XI({context:e.context}),r=Jre(),i=eie(),o=t.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=Vf.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Vf.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Vf.batchCalls(o.onSettled)),oie(o),nie(o,i),rie(i);const[a]=$.useState(()=>new n(t,o)),s=a.getOptimisticResult(o);if(Xre($.useCallback(l=>{const c=r?()=>{}:a.subscribe(Vf.batchCalls(l));return a.updateResult(),c},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),$.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),sie(o,s,r))throw lie(o,a,i);if(iie({result:s,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return o.notifyOnChangeProps?s:a.trackResult(s)}function uie(e,n,t){const r=Mre(e,n,t);return cie(r,$re)}const rw={useQuery:null,useQueryClient:null};function die({defaultValue:e,sequence:n,cacheKey:t}){const r=rw.useQuery??uie,i=rw.useQueryClient??XI,o=r({enabled:!1,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,queryFn:d=>d,queryKey:t}),a=i(),s=!!o.data,l=d=>{a.setQueryData(t,d)},c=d=>{if(n){t.forEach(h=>{h&&a.resetQueries()});return}s&&a.resetQueries(t??d)};return T.useEffect(()=>{e&&l(e)},[]),{cache:o,defaultValue:e,isStored:s,store:l,purge:c}}function fie(e=!1){const[n,t]=T.useState(e),r=T.useCallback(()=>{t(o=>!o)},[]);return{forceTo:T.useCallback(o=>{t(o)},[]),isToggled:n,handleToggle:r}}function hie(e){const[n,t]=T.useState([]),[r,i]=T.useState(!1);return T.useEffect(()=>{const s=n==null?void 0:n.length,l=n==null?void 0:n.some(d=>d.checked===!1);if(s===0||l){i(!1);return}(n==null?void 0:n.every(d=>d.checked===!0))&&i(!0)},[n,e]),{checkboxList:n,checkboxHead:r,setCheckboxList:t,setCheckboxHead:i,handleChangeCheckbox:(s,l)=>{t(c=>c.map(d=>d[e]===l?{...d,checked:s}:d))},handleChangeCheckboxHead:s=>{const l=n.map(c=>({...c,checked:s}));t(l)}}}const pie={enabled:!1,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,queryFn:e=>e};function mie(e,n){const t=new Map;return t.set("DEFAULT","ASC"),t.set("ASC","DESC"),t.set("DESC","DEFAULT"),n.map(i=>e===i.title&&i.sort?{...i,sort:t.get(i.sort)}:Object.assign(i,{sort:"DEFAULT"}))}function gie(e,n,t=","){if(e.length!==0)return e.every(r=>typeof r=="object")?e.map(r=>r[n]).join(t):e.join(t)}function vie(e){return!e}function bie(e,n){return k6.map(e,t=>({to:n.valueAsHref?t[n.valueAsHref]:null,key:t[n.idAsKey],label:t[n.labelAsKey],value:t[n.valueAsKey]}))}function yie(e,n,t){const r=window==null?void 0:window.atob(n),i=new Array(r.length);for(let c=0;c<r.length;c++)i[c]=r.charCodeAt(c);const o=new Uint8Array(i),a=new Blob([o],{type:e}),s=document.createElement("a");document.body.appendChild(s);const l=window.URL||window.webkitURL;Object.assign(s,{download:t,style:"display:none",href:l.createObjectURL(a)}),s.click(),l.revokeObjectURL(s.href),s.remove()}function xie(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function wie(e,n){return Array.from({length:n??24},(t,r)=>({[e??"hour"]:r.toString().padStart(2,"0")+":00"}))}function Cie(e,n){return Array.from({length:(n??24)*2},(t,r)=>{const i=Math.floor(r/2),o=r%2*30,a=i.toString().padStart(2,"0"),s=o===0?"00":o.toString();return{[e??"hour"]:`${a}:${s}`}})}me.$channels=ec,me.$events=Ym,me.$observers=gne,me.AlertTitle=Iee,me.Badge=ED,me.BadgeStatus=mx,me.Box=tv,me.Button=pa,me.Card=Aee,me.Chart=IF,me.CheckTitle=Dee,me.Checkbox=O1,me.Collapse=oK,me.Color=dt,me.Colspan=Lk,me.Container=FJ,me.Counter=TJ,me.DangerTitle=kee,me.Datepicker=Dk,me.Description=sJ,me.Dropdown=Uh,me.Empty=zk,me.Error=cJ,me.EventMap=Ys,me.Flex=WE,me.FlexItem=qR,me.Footer=kD,me.GrantSystem=FI,me.Grid=Rk,me.HttpClient=Gx,me.IN_Permission=Jl,me.Input=pJ,me.InputMode=Oi,me.InputTable=yJ,me.Layout=b6,me.Loading=hx,me.LocalStorageKeys=O6,me.LogColors=TI,me.LogLevel=Q2,me.Logger=K2,me.Method=m8,me.MicrofrontHost=Ore,me.Modal=gB,me.Navbar=m6,me.Pagination=See,me.Permissions=Cm,me.Private=NI,me.RadioButton=Ny,me.Row=HT,me.SP_Permission=h6,me.ScrollSearch=_ee,me.Search=pee,me.Select=Db,me.Sidebar=p6,me.SignalContext=gu,me.SingleDeadlineChart=HQ,me.Subtitle=Ok,me.Success=lJ,me.Switch=tU,me.Table=C6,me.TableData=_6,me.TableInput=AJ,me.TableRow=lee,me.TableWrapper=cee,me.Text=cm,me.TextArea=OJ,me.Title=Ik,me.Tooltip=df,me.TotalHours=Oee,me.UrlSSOParams=T6,me.Wait=CD,me.authorization=bK,me.bearer=p8,me.broadcast=Uf,me.capitalize=xie,me.checkSystems=yK,me.createHalfTimeSlots=Cie,me.createObserver=Cne,me.createRef=bre,me.createSignal=xne,me.createTimeSlots=wie,me.defaultCacheQueryOptions=pie,me.defaultConfig=rw,me.destroy=_ne,me.destroySignal=yne,me.dispatch=wne,me.download=yie,me.formatHourTime=q1,me.initialState=J2,me.mapping=bie,me.observe=n2,me.removeHourFormat=$h,me.resetAllStores=yre,me.revert=vie,me.signalHttps=rne,me.sort=mie,me.stack=gie,me.takeSignal=bne,me.unsubscribeEvent=vne,me.useBroadcaster=D8,me.useCache=die,me.useCheckbox=hie,me.useObserver=mne,me.useSessionStore=vre,me.useSignal=wm,me.useToggle=fie,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})});
|
|
4724
|
+
`).join("<br />")),Ot(F)}var ui,ol=new WeakMap,En=function(){function F(){if(c(this,F),h(this,ol,void 0),!(typeof window>"u")){ui=this;for(var v=arguments.length,k=new Array(v),M=0;M<v;M++)k[M]=arguments[M];var G=Object.freeze(this.constructor.argsToParams(k));this.params=G,this.isAwaitingPromise=!1,m(ol,this,this._main(ui.params))}}return y(F,[{key:"_main",value:function(k){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(rl(Object.assign({},M,k)),Q.currentInstance){var G=Li.swalPromiseResolve.get(Q.currentInstance),ae=Q.currentInstance.isAwaitingPromise;Q.currentInstance._destroy(),ae||G({isDismissed:!0}),$r()&&Fu()}Q.currentInstance=ui;var Te=fc(k,M);c0(Te),Object.freeze(Te),Q.timeout&&(Q.timeout.stop(),delete Q.timeout),clearTimeout(Q.restoreFocusTimeout);var ht=Ju(ui);return Qm(ui,Te),Ht.innerParams.set(ui,Te),dc(ui,ht,Te)}},{key:"then",value:function(k){return d(ol,this).then(k)}},{key:"finally",value:function(k){return d(ol,this).finally(k)}}])}(),dc=function(v,k,M){return new Promise(function(G,ae){var Te=function(ct){v.close({isDismissed:!0,dismiss:ct})};Li.swalPromiseResolve.set(v,G),Li.swalPromiseReject.set(v,ae),k.confirmButton.onclick=function(){gw(v)},k.denyButton.onclick=function(){gg(v)},k.cancelButton.onclick=function(){xi(v,Te)},k.closeButton.onclick=function(){Te(Yt.close)},xn(M,k,Te),lw(Q,M,Te),dg(v,M),Iw(M),al(Q,M,Te),Mw(k,M),setTimeout(function(){k.container.scrollTop=0})})},fc=function(v,k){var M=uc(v),G=Object.assign({},tl,k,M,v);return G.showClass=Object.assign({},tl.showClass,G.showClass),G.hideClass=Object.assign({},tl.hideClass,G.hideClass),G.animation===!1&&(G.showClass={backdrop:"swal2-noanimation"},G.hideClass={}),G},Ju=function(v){var k={popup:je(),container:ft(),actions:ln(),confirmButton:Cn(),denyButton:bn(),cancelButton:er(),loader:dr(),closeButton:Sn(),validationMessage:Kn(),progressSteps:vn()};return Ht.domCache.set(v,k),k},al=function(v,k,M){var G=Fn();yn(G),k.timer&&(v.timeout=new Gu(function(){M("timer"),delete v.timeout},k.timer),k.timerProgressBar&&($t(G),kn(G,k,"timerProgressBar"),setTimeout(function(){v.timeout&&v.timeout.running&<(k.timer)})))},Mw=function(v,k){if(!k.toast){if(!Xe(k.allowEnterKey)){ot("allowEnterKey"),Bw();return}Fw(v)||Nw(v,k)||Gf(-1,1)}},Fw=function(v){var k=v.popup.querySelectorAll("[autofocus]"),M=f(k),G;try{for(M.s();!(G=M.n()).done;){var ae=G.value;if(ae instanceof HTMLElement&&ee(ae))return ae.focus(),!0}}catch(Te){M.e(Te)}finally{M.f()}return!1},Nw=function(v,k){return k.focusDeny&&ee(v.denyButton)?(v.denyButton.focus(),!0):k.focusCancel&&ee(v.cancelButton)?(v.cancelButton.focus(),!0):k.focusConfirm&&ee(v.confirmButton)?(v.confirmButton.focus(),!0):!1},Bw=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var Tg=new Date,hc=localStorage.getItem("swal-initiation");hc?(Tg.getTime()-Date.parse(hc))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var F=document.createElement("audio");F.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",F.loop=!0,document.body.appendChild(F),setTimeout(function(){F.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(Tg))}En.prototype.disableButtons=ju,En.prototype.enableButtons=xg,En.prototype.getInput=bg,En.prototype.disableInput=zo,En.prototype.enableInput=r0,En.prototype.hideLoading=zu,En.prototype.disableLoading=zu,En.prototype.showValidationMessage=sc,En.prototype.resetValidationMessage=wg,En.prototype.close=to,En.prototype.closePopup=to,En.prototype.closeModal=to,En.prototype.closeToast=to,En.prototype.rejectPromise=In,En.prototype.update=oe,En.prototype._destroy=le,Object.assign(En,Dg),Object.keys(_r).forEach(function(F){En[F]=function(){if(ui&&ui[F]){var v;return(v=ui)[F].apply(v,arguments)}return null}}),En.DismissReason=Yt,En.version="11.12.3";var ya=En;return ya.default=ya,ya}),typeof Qe<"u"&&Qe.Sweetalert2&&(Qe.swal=Qe.sweetAlert=Qe.Swal=Qe.SweetAlert=Qe.Sweetalert2),typeof document<"u"&&function(t,r){var i=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=r);else try{i.innerHTML=r}catch{i.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:0;padding:1em 1.6em .3em;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(SI);var xre=SI.exports;const AI=wc(xre);var Iu;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Iu||(Iu={}));var kI=process.env.NODE_ENV!=="production"?function(e){return Object.freeze(e)}:function(e){return e};function wre(e,n){{typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}var DI="beforeunload",Cre="popstate";function _re(e){e===void 0&&(e={});var n=e,t=n.window,r=t===void 0?document.defaultView:t,i=r.history;function o(){var A=r.location,I=A.pathname,B=A.search,N=A.hash,L=i.state||{};return[L.idx,kI({pathname:I,search:B,hash:N,state:L.usr||null,key:L.key||"default"})]}var a=null;function s(){if(a)g.call(a),a=null;else{var A=Iu.Pop,I=o(),B=I[0],N=I[1];if(g.length)if(B!=null){var L=d-B;L&&(a={action:A,location:N,retry:function(){E(L*-1)}},E(L))}else process.env.NODE_ENV!=="production"&&wre(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else w(A)}}r.addEventListener(Cre,s);var l=Iu.Pop,c=o(),d=c[0],h=c[1],m=OI(),g=OI();d==null&&(d=0,i.replaceState(Ge({},i.state,{idx:d}),""));function x(A){return typeof A=="string"?A:Sre(A)}function y(A,I){return I===void 0&&(I=null),kI(Ge({pathname:h.pathname,hash:"",search:""},typeof A=="string"?Are(A):A,{state:I,key:Ere()}))}function f(A,I){return[{usr:A.state,key:A.key,idx:I},x(A)]}function b(A,I,B){return!g.length||(g.call({action:A,location:I,retry:B}),!1)}function w(A){l=A;var I=o();d=I[0],h=I[1],m.call({action:l,location:h})}function C(A,I){var B=Iu.Push,N=y(A,I);function L(){C(A,I)}if(b(B,N,L)){var z=f(N,d+1),U=z[0],q=z[1];try{i.pushState(U,"",q)}catch{r.location.assign(q)}w(B)}}function S(A,I){var B=Iu.Replace,N=y(A,I);function L(){S(A,I)}if(b(B,N,L)){var z=f(N,d),U=z[0],q=z[1];i.replaceState(U,"",q),w(B)}}function E(A){i.go(A)}var D={get action(){return l},get location(){return h},createHref:x,push:C,replace:S,go:E,back:function(){E(-1)},forward:function(){E(1)},listen:function(I){return m.push(I)},block:function(I){var B=g.push(I);return g.length===1&&r.addEventListener(DI,II),function(){B(),g.length||r.removeEventListener(DI,II)}}};return D}function II(e){e.preventDefault(),e.returnValue=""}function OI(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter(function(r){return r!==t})}},call:function(t){e.forEach(function(r){return r&&r(t)})}}}function Ere(){return Math.random().toString(36).substr(2,8)}function Sre(e){var n=e.pathname,t=n===void 0?"/":n,r=e.search,i=r===void 0?"":r,o=e.hash,a=o===void 0?"":o;return i&&i!=="?"&&(t+=i.charAt(0)==="?"?i:"?"+i),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Are(e){var n={};if(e){var t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));var r=e.indexOf("?");r>=0&&(n.search=e.substr(r),e=e.substr(0,r)),e&&(n.pathname=e)}return n}var Q2=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Q2||{}),TI=(e=>(e.INFO="#4caf50",e.WARN="#ff9800",e.ERROR="#f44336",e.DEBUG="#2196f3",e))(TI||{});class K2{constructor(n=1,t=!1){ue(this,"logLevel");ue(this,"isDevelopment");ue(this,"logs");this.logLevel=n,this.isDevelopment=t,this.logs=[]}debug(n,...t){this.logLevel<=0&&this.log("🐛",n,"#2196f3",...t)}info(n,...t){this.logLevel<=1&&this.log("ℹ️",n,"#4caf50",...t)}warn(n,...t){this.logLevel<=2&&this.log("⚠️",n,"#ff9800",...t)}error(n,...t){this.logLevel<=3&&this.log("🚨",n,"#f44336",...t)}log(n,t,r,...i){const o=`${n} ${t}`,a=`%c ${o}`,s=[`color: ${r}`,...i];this.isDevelopment&&console.log(a,...s),this.logs.push(o)}getLogs(){return this.logs}}const kre=["otic","otec","empresa"],Dre=e=>{const n=kre.find(t=>e.includes(t));return(n==null?void 0:n.toLowerCase())==="empresa"?"cliente":n??""},PI=()=>Date.now()/1e3,Ire=e=>60*e*1e3,MI=e=>e??"",Ou=new K2(Q2.DEBUG,!0),Ore=T.memo(e=>{var A;const{app:n,layout:t=!0,navbar:r=()=>!0,sidebar:i=()=>!0,footer:o,navigation:a,environment:s,modalExpired:l,observerToken:c=!0,previousPath:d=!1,includeNavbarDropdown:h}=e,[m,g]=T.useState({}),[x,y]=T.useState(!0),f=T.useRef(_re()),b=T.useRef(0),w=T.useRef(!0);D8(Ys.ON_CONNECT_APP,()=>{y(!0)},n);const C=T.useCallback(I=>{I&&g(I)},[]),S=T.useCallback(async I=>{var B;w.current&&(w.current=!1,await AI.fire({icon:"warning",text:"No tiene permisos para acceder a este recurso",title:"Acceso denegado",showCloseButton:!0,showCancelButton:!1,showConfirmButton:!1}),(B=f.current)==null||B.push({pathname:I}),w.current=!0)},[]);T.useEffect(()=>{typeof e.loading=="boolean"&&y(e.loading)},[e.loading]),T.useEffect(()=>{var I,B,N,L;if(c){if((I=m==null?void 0:m.info)!=null&&I.exp){const z=PI();Ou.info("Token status",{now:z,expiresAt:(B=m==null?void 0:m.info)==null?void 0:B.exp,shouldExpire:((N=m==null?void 0:m.info)==null?void 0:N.exp)<z}),((L=m==null?void 0:m.info)==null?void 0:L.exp)<z&&(Ou.warn("Token expired",Ys.SSO_EXPIRED),Uf(Ys.SSO_EXPIRED,"Su sesión ha expirado, por favor vuelva a iniciar sesión"),l&&E()),b.current=setInterval(()=>{var q,H,X,te;const U=PI();(q=m==null?void 0:m.info)!=null&&q.exp&&(Ou.info("Token status",{expiresAt:(H=m==null?void 0:m.info)==null?void 0:H.exp,now:U,shouldExpire:((X=m==null?void 0:m.info)==null?void 0:X.exp)<U}),((te=m==null?void 0:m.info)==null?void 0:te.exp)<U&&(Ou.warn("Token expired",Ys.SSO_EXPIRED),Uf(Ys.SSO_EXPIRED,"Su sesión ha expirado, por favor vuelva a iniciar sesión"),l&&E()))},Ire(1))}return()=>{clearInterval(b.current),b.current=0}}},[(A=m==null?void 0:m.info)==null?void 0:A.exp,c,l]),T.useEffect(()=>{c&&(n2(Ys.SIGNAL,I=>{Ou.info("MicrofrontHost: useObserver: signal: ",I),g(I),y(!1)}),Ou.info("MicrofrontHost: useEffect: broadcast: ",n))},[n,c]);const E=async()=>{var I;await AI.fire({icon:"error",position:"top",text:"Tu sesión ha expirado, por favor inicia sesión nuevamente",showCloseButton:!0,showConfirmButton:!1}),(I=f.current)==null||I.push("/login")},D=T.useMemo(()=>{var I,B,N,L;return{...m,loading:x,onSignal:C,onAcessDenied:S,history:f.current,environment:s,ref:{lastName:MI((I=m==null?void 0:m.user)==null?void 0:I.lastName),firstName:MI((B=m==null?void 0:m.user)==null?void 0:B.firstName),role:Dre(((L=(N=m==null?void 0:m.info)==null?void 0:N.realm_access)==null?void 0:L.roles)??[])}}},[m,x,s,C,S]);return P.jsx(gu.Provider,{value:D,children:t?P.jsx(b6,{menu:a,includeNavbar:r==null?void 0:r(m,x),includeSidebar:i==null?void 0:i(m,x),includeNavbarDropdown:h,previousPath:d,includeFooter:o,children:x?P.jsx(hx,{status:!0}):e.children}):P.jsx(P.Fragment,{children:x?P.jsx(hx,{status:!0}):e.children})})});var FI=(e=>(e.IB="Integra Negocio",e.SP="Sistema de Perfilamiento v2",e))(FI||{});const NI=T.memo(({allow:e,grants:n,children:t})=>{var l;const r=T.useContext(gu),i=new K2(void 0,n==null?void 0:n.debug),[o,a]=T.useState(!1);T.useEffect(()=>{var c,d;(d=(c=r==null?void 0:r.user)==null?void 0:c.systems)!=null&&d.length&&s(r)},[(l=r==null?void 0:r.user)==null?void 0:l.systems]);const s=T.useCallback(async c=>{var h,m;const d=(m=(h=c==null?void 0:c.user)==null?void 0:h.systems)==null?void 0:m.find(g=>g.name===(n==null?void 0:n.system));i.debug("ref:",d),d!=null&&d.functions&&(d.functions.filter(x=>{const y=x==null?void 0:x.key;return e==null?void 0:e.includes(y)}).length===(e==null?void 0:e.length)?a(!0):(i.debug("denied"),r!=null&&r.onAcessDenied&&(r==null||r.onAcessDenied(n==null?void 0:n.redirect))))},[n==null?void 0:n.system,n==null?void 0:n.debug,e]);return P.jsx(P.Fragment,{children:o?t:null})});NI.defaultProps={allow:[],grants:{debug:!1,system:"Integra Negocio",redirect:"/dashboard",popup:{text:"You don't have the required permissions to access this page.",title:"Access Denied"}}};class ew{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){const t={listener:n};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const qm=typeof window>"u"||"Deno"in window;function Tre(){}function BI(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pre(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Mre(e,n,t){return Fre(e)?typeof n=="function"?{...t,queryKey:e,queryFn:n}:{...n,queryKey:e}:e}function RI(e,n){if(e===n)return e;const t=zI(e)&&zI(n);if(t||jI(e)&&jI(n)){const r=t?e.length:Object.keys(e).length,i=t?n:Object.keys(n),o=i.length,a=t?[]:{};let s=0;for(let l=0;l<o;l++){const c=t?l:i[l];a[c]=RI(e[c],n[c]),a[c]===e[c]&&s++}return r===o&&s===r?e:a}return n}function LI(e,n){if(e&&!n||n&&!e)return!1;for(const t in e)if(e[t]!==n[t])return!1;return!0}function zI(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jI(e){if(!WI(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const t=n.prototype;return!(!WI(t)||!t.hasOwnProperty("isPrototypeOf"))}function WI(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fre(e){return Array.isArray(e)}function Nre(e){return new Promise(n=>{setTimeout(n,e)})}function HI(e){Nre(0).then(e)}function UI(e,n,t){return t.isDataEqual!=null&&t.isDataEqual(e,n)?e:typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?RI(e,n):n}class Bre extends ew{constructor(){super(),this.setup=n=>{if(!qm&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var n;(n=this.cleanup)==null||n.call(this),this.cleanup=void 0}}setEventListener(n){var t;this.setup=n,(t=this.cleanup)==null||t.call(this),this.cleanup=n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(n){this.focused!==n&&(this.focused=n,this.onFocus())}onFocus(){this.listeners.forEach(({listener:n})=>{n()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Rre=new Bre,$I=["online","offline"];class Lre extends ew{constructor(){super(),this.setup=n=>{if(!qm&&window.addEventListener){const t=()=>n();return $I.forEach(r=>{window.addEventListener(r,t,!1)}),()=>{$I.forEach(r=>{window.removeEventListener(r,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var n;(n=this.cleanup)==null||n.call(this),this.cleanup=void 0}}setEventListener(n){var t;this.setup=n,(t=this.cleanup)==null||t.call(this),this.cleanup=n(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(n){this.online!==n&&(this.online=n,this.onOnline())}onOnline(){this.listeners.forEach(({listener:n})=>{n()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const zre=new Lre;function jre(e){return(e??"online")==="online"?zre.isOnline():!0}class Wre{constructor(n){this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}}function Hre(e){return e instanceof Wre}function Ure(){let e=[],n=0,t=d=>{d()},r=d=>{d()};const i=d=>{let h;n++;try{h=d()}finally{n--,n||s()}return h},o=d=>{n?e.push(d):HI(()=>{t(d)})},a=d=>(...h)=>{o(()=>{d(...h)})},s=()=>{const d=e;e=[],d.length&&HI(()=>{r(()=>{d.forEach(h=>{t(h)})})})};return{batch:i,batchCalls:a,schedule:o,setNotifyFunction:d=>{t=d},setBatchNotifyFunction:d=>{r=d}}}const Vf=Ure();class $re extends ew{constructor(n,t){super(),this.client=n,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),YI(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tw(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tw(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(n,t){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(n),process.env.NODE_ENV!=="production"&&typeof(n==null?void 0:n.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),LI(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&VI(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(t),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(n){const t=this.client.getQueryCache().build(this.client,n),r=this.createResult(t,n);return Vre(this,r,n)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(n){const t={};return Object.keys(n).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),n[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:n,...t}={}){return this.fetch({...t,meta:{refetchPage:n}})}fetchOptimistic(n){const t=this.client.defaultQueryOptions(n),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(n){var t;return this.executeFetch({...n,cancelRefetch:(t=n.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(n){this.updateQuery();let t=this.currentQuery.fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(Tre)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),qm||this.currentResult.isStale||!BI(this.options.staleTime))return;const t=Pre(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var n;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(n=this.options.refetchInterval)!=null?n:!1}updateRefetchInterval(n){this.clearRefetchInterval(),this.currentRefetchInterval=n,!(qm||this.options.enabled===!1||!BI(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Rre.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(n,t){const r=this.currentQuery,i=this.options,o=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=n!==r,c=l?n.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:h}=n;let{dataUpdatedAt:m,error:g,errorUpdatedAt:x,fetchStatus:y,status:f}=h,b=!1,w=!1,C;if(t._optimisticResults){const I=this.hasListeners(),B=!I&&YI(n,t),N=I&&VI(n,r,t,i);(B||N)&&(y=jre(n.options.networkMode)?"fetching":"paused",m||(f="loading")),t._optimisticResults==="isRestoring"&&(y="idle")}if(t.keepPreviousData&&!h.dataUpdatedAt&&d!=null&&d.isSuccess&&f!=="error")C=d.data,m=d.dataUpdatedAt,f=d.status,b=!0;else if(t.select&&typeof h.data<"u")if(o&&h.data===(a==null?void 0:a.data)&&t.select===this.selectFn)C=this.selectResult;else try{this.selectFn=t.select,C=t.select(h.data),C=UI(o==null?void 0:o.data,C,t),this.selectResult=C,this.selectError=null}catch(I){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(I),this.selectError=I}else C=h.data;if(typeof t.placeholderData<"u"&&typeof C>"u"&&f==="loading"){let I;if(o!=null&&o.isPlaceholderData&&t.placeholderData===(s==null?void 0:s.placeholderData))I=o.data;else if(I=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof I<"u")try{I=t.select(I),this.selectError=null}catch(B){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(B),this.selectError=B}typeof I<"u"&&(f="success",C=UI(o==null?void 0:o.data,I,t),w=!0)}this.selectError&&(g=this.selectError,C=this.selectResult,x=Date.now(),f="error");const S=y==="fetching",E=f==="loading",D=f==="error";return{status:f,fetchStatus:y,isLoading:E,isSuccess:f==="success",isError:D,isInitialLoading:E&&S,data:C,dataUpdatedAt:m,error:g,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:S,isRefetching:S&&!E,isLoadingError:D&&h.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:w,isPreviousData:b,isRefetchError:D&&h.dataUpdatedAt!==0,isStale:nw(n,t),refetch:this.refetch,remove:this.remove}}updateResult(n){const t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,LI(r,t))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const d=c;return this.currentResult[d]!==t[d]&&l.has(d)})};(n==null?void 0:n.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...n})}updateQuery(){const n=this.client.getQueryCache().build(this.client,this.options);if(n===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=n,this.currentQueryInitialState=n.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))}onQueryUpdate(n){const t={};n.type==="success"?t.onSuccess=!n.manual:n.type==="error"&&!Hre(n.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(n){Vf.batch(()=>{if(n.onSuccess){var t,r,i,o;(t=(r=this.options).onSuccess)==null||t.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(n.onError){var a,s,l,c;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}n.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),n.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Yre(e,n){return n.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&n.retryOnMount===!1)}function YI(e,n){return Yre(e,n)||e.state.dataUpdatedAt>0&&tw(e,n,n.refetchOnMount)}function tw(e,n,t){if(n.enabled!==!1){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&nw(e,n)}return!1}function VI(e,n,t,r){return t.enabled!==!1&&(e!==n||r.enabled===!1)&&(!t.suspense||e.state.status!=="error")&&nw(e,t)}function nw(e,n){return e.isStaleByTime(n.staleTime)}function Vre(e,n,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?n.isPlaceholderData:e.getCurrentResult()!==n}var Gre=s2();const Xre=Gre.useSyncExternalStore,GI=$.createContext(void 0),Zre=$.createContext(!1);function qre(e,n){return e||(n&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=GI),window.ReactQueryClientContext):GI)}const XI=({context:e}={})=>{const n=$.useContext(qre(e,$.useContext(Zre)));if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},ZI=$.createContext(!1),Jre=()=>$.useContext(ZI);ZI.Provider;function Qre(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Kre=$.createContext(Qre()),eie=()=>$.useContext(Kre);function tie(e,n){return typeof e=="function"?e(...n):!!e}const nie=(e,n)=>{(e.suspense||e.useErrorBoundary)&&(n.isReset()||(e.retryOnMount=!1))},rie=e=>{$.useEffect(()=>{e.clearReset()},[e])},iie=({result:e,errorResetBoundary:n,useErrorBoundary:t,query:r})=>e.isError&&!n.isReset()&&!e.isFetching&&tie(t,[e.error,r]),oie=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},aie=(e,n)=>e.isLoading&&e.isFetching&&!n,sie=(e,n,t)=>(e==null?void 0:e.suspense)&&aie(n,t),lie=(e,n,t)=>n.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{t.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function cie(e,n){const t=XI({context:e.context}),r=Jre(),i=eie(),o=t.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=Vf.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Vf.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Vf.batchCalls(o.onSettled)),oie(o),nie(o,i),rie(i);const[a]=$.useState(()=>new n(t,o)),s=a.getOptimisticResult(o);if(Xre($.useCallback(l=>{const c=r?()=>{}:a.subscribe(Vf.batchCalls(l));return a.updateResult(),c},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),$.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),sie(o,s,r))throw lie(o,a,i);if(iie({result:s,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return o.notifyOnChangeProps?s:a.trackResult(s)}function uie(e,n,t){const r=Mre(e,n,t);return cie(r,$re)}const rw={useQuery:null,useQueryClient:null};function die({defaultValue:e,sequence:n,cacheKey:t}){const r=rw.useQuery??uie,i=rw.useQueryClient??XI,o=r({enabled:!1,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,queryFn:d=>d,queryKey:t}),a=i(),s=!!o.data,l=d=>{a.setQueryData(t,d)},c=d=>{if(n){t.forEach(h=>{h&&a.resetQueries()});return}s&&a.resetQueries(t??d)};return T.useEffect(()=>{e&&l(e)},[]),{cache:o,defaultValue:e,isStored:s,store:l,purge:c}}function fie(e=!1){const[n,t]=T.useState(e),r=T.useCallback(()=>{t(o=>!o)},[]);return{forceTo:T.useCallback(o=>{t(o)},[]),isToggled:n,handleToggle:r}}function hie(e){const[n,t]=T.useState([]),[r,i]=T.useState(!1);return T.useEffect(()=>{const s=n==null?void 0:n.length,l=n==null?void 0:n.some(d=>d.checked===!1);if(s===0||l){i(!1);return}(n==null?void 0:n.every(d=>d.checked===!0))&&i(!0)},[n,e]),{checkboxList:n,checkboxHead:r,setCheckboxList:t,setCheckboxHead:i,handleChangeCheckbox:(s,l)=>{e&&t(d=>d.map(h=>h[e]===l?{...h,checked:s}:h));const c=l;t(d=>d.map(h=>h.detailId===c?{...h,checked:s}:h))},handleChangeCheckboxHead:s=>{const l=n.map(c=>({...c,checked:s}));t(l)}}}const pie={enabled:!1,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,queryFn:e=>e};function mie(e,n){const t=new Map;return t.set("DEFAULT","ASC"),t.set("ASC","DESC"),t.set("DESC","DEFAULT"),n.map(i=>e===i.title&&i.sort?{...i,sort:t.get(i.sort)}:Object.assign(i,{sort:"DEFAULT"}))}function gie(e,n,t=","){if(e.length!==0)return e.every(r=>typeof r=="object")?e.map(r=>r[n]).join(t):e.join(t)}function vie(e){return!e}function bie(e,n){return k6.map(e,t=>({to:n.valueAsHref?t[n.valueAsHref]:null,key:t[n.idAsKey],label:t[n.labelAsKey],value:t[n.valueAsKey]}))}function yie(e,n,t){const r=window==null?void 0:window.atob(n),i=new Array(r.length);for(let c=0;c<r.length;c++)i[c]=r.charCodeAt(c);const o=new Uint8Array(i),a=new Blob([o],{type:e}),s=document.createElement("a");document.body.appendChild(s);const l=window.URL||window.webkitURL;Object.assign(s,{download:t,style:"display:none",href:l.createObjectURL(a)}),s.click(),l.revokeObjectURL(s.href),s.remove()}function xie(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function wie(e,n){return Array.from({length:n??24},(t,r)=>({[e??"hour"]:r.toString().padStart(2,"0")+":00"}))}function Cie(e,n){return Array.from({length:(n??24)*2},(t,r)=>{const i=Math.floor(r/2),o=r%2*30,a=i.toString().padStart(2,"0"),s=o===0?"00":o.toString();return{[e??"hour"]:`${a}:${s}`}})}me.$channels=ec,me.$events=Ym,me.$observers=gne,me.AlertTitle=Iee,me.Badge=ED,me.BadgeStatus=mx,me.Box=tv,me.Button=pa,me.Card=Aee,me.Chart=IF,me.CheckTitle=Dee,me.Checkbox=O1,me.Collapse=oK,me.Color=dt,me.Colspan=Lk,me.Container=FJ,me.Counter=TJ,me.DangerTitle=kee,me.Datepicker=Dk,me.Description=sJ,me.Dropdown=Uh,me.Empty=zk,me.Error=cJ,me.EventMap=Ys,me.Flex=WE,me.FlexItem=qR,me.Footer=kD,me.GrantSystem=FI,me.Grid=Rk,me.HttpClient=Gx,me.IN_Permission=Jl,me.Input=pJ,me.InputMode=Oi,me.InputTable=yJ,me.Layout=b6,me.Loading=hx,me.LocalStorageKeys=O6,me.LogColors=TI,me.LogLevel=Q2,me.Logger=K2,me.Method=m8,me.MicrofrontHost=Ore,me.Modal=gB,me.Navbar=m6,me.Pagination=See,me.Permissions=Cm,me.Private=NI,me.RadioButton=Ny,me.Row=HT,me.SP_Permission=h6,me.ScrollSearch=_ee,me.Search=pee,me.Select=Db,me.Sidebar=p6,me.SignalContext=gu,me.SingleDeadlineChart=HQ,me.Subtitle=Ok,me.Success=lJ,me.Switch=tU,me.Table=C6,me.TableData=_6,me.TableInput=AJ,me.TableRow=lee,me.TableWrapper=cee,me.Text=cm,me.TextArea=OJ,me.Title=Ik,me.Tooltip=df,me.TotalHours=Oee,me.UrlSSOParams=T6,me.Wait=CD,me.authorization=bK,me.bearer=p8,me.broadcast=Uf,me.capitalize=xie,me.checkSystems=yK,me.createHalfTimeSlots=Cie,me.createObserver=Cne,me.createRef=bre,me.createSignal=xne,me.createTimeSlots=wie,me.defaultCacheQueryOptions=pie,me.defaultConfig=rw,me.destroy=_ne,me.destroySignal=yne,me.dispatch=wne,me.download=yie,me.formatHourTime=q1,me.initialState=J2,me.mapping=bie,me.observe=n2,me.removeHourFormat=$h,me.resetAllStores=yre,me.revert=vie,me.signalHttps=rne,me.sort=mie,me.stack=gie,me.takeSignal=bne,me.unsubscribeEvent=vne,me.useBroadcaster=D8,me.useCache=die,me.useCheckbox=hie,me.useObserver=mne,me.useSessionStore=vre,me.useSignal=wm,me.useToggle=fie,Object.defineProperty(me,Symbol.toStringTag,{value:"Module"})});
|
|
4725
4725
|
//# sourceMappingURL=index.umd.js.map
|