react-luminus-components 2.1.8 → 2.1.10
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/.vite/manifest.json +191 -50
- package/dist/Alert-BApdinGX.cjs +1 -0
- package/dist/Alert-D2Bw906t.js +495 -0
- package/dist/DelegationContext-B1WXROG2.cjs +201 -0
- package/dist/DelegationContext-CCnk58PI.js +3156 -0
- package/dist/HelmetContext-ChKPef74.js +49 -0
- package/dist/HelmetContext-DDQ-Phg7.cjs +1 -0
- package/dist/PrimaryButton-D7r0m8xi.js +742 -0
- package/dist/PrimaryButton-D91b3Dmv.cjs +1 -0
- package/dist/SimpleTooltip-B00uLuVM.cjs +1 -0
- package/dist/SimpleTooltip-dwOOgecT.js +1642 -0
- package/dist/Typography-C5KJzU5O.js +1627 -0
- package/dist/Typography-Fo21SeyJ.cjs +20 -0
- package/dist/UserContext-45ZxeQHB.cjs +1 -0
- package/dist/UserContext-ZsTsf5Xe.js +270 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +1773 -852
- package/dist/dateUtils-CXm9PEh6.cjs +1 -0
- package/dist/dateUtils-ayErBYbI.js +1488 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +118 -123
- package/dist/index-4IYT9u10.js +95 -0
- package/dist/index-jmbq5h95.cjs +25 -0
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +97 -98
- package/dist/localStorageUtils-BSATUi5m.cjs +1 -0
- package/dist/localStorageUtils-DNgjNynk.js +1070 -0
- package/dist/main.cjs.js +56 -7
- package/dist/main.es.js +36401 -11370
- package/dist/models/texts/SubstitutionsTexts.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/useIsFormDirty-76y8Dca-.cjs +1 -0
- package/dist/useIsFormDirty-Ba5uhPH7.js +3257 -0
- package/dist/useWindowSize-7W91GsJQ.js +56 -0
- package/dist/useWindowSize-CLoDaEYh.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +79 -85
- package/package.json +10 -1
- package/dist/FormDisabledProvider-D-DRODSt.js +0 -51
- package/dist/FormDisabledProvider-Dt39yr7W.cjs +0 -1
- package/dist/localStorageUtils-CVwJ9FKd.cjs +0 -1
- package/dist/localStorageUtils-TeLq8MHE.js +0 -59
- package/dist/nivo-bar-D6NJLYWS.js +0 -39616
- package/dist/nivo-bar-SBWBmyeI.cjs +0 -293
- package/dist/useIsFormDirty-CZ4jNRFn.js +0 -117
- package/dist/useIsFormDirty-Crsu8mjo.cjs +0 -1
- package/dist/useLocalStorageState-Ca7olZgH.cjs +0 -1
- package/dist/useLocalStorageState-DtBc-C2W.js +0 -25
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";const M=require("./index-jmbq5h95.cjs"),C=require("react"),Z=require("./UserContext-45ZxeQHB.cjs"),Y=require("./dateUtils-CXm9PEh6.cjs"),Pr=require("@azure/msal-browser"),pt=require("@azure/msal-react"),G=require("react/jsx-runtime");function _r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const D=_r(C);function jt(e,t){const r=+Y.toDate(e);return Y.constructFrom(e,r+t)}function Ft(e,t){return jt(e,t*Y.millisecondsInHour)}function It(e){return+Y.toDate(e)<Date.now()}const Mt=C.createContext({show:!1,text:"",textSm:!1,showConfirm:(e,t)=>{},hideConfirm:()=>{}}),Ut=C.createContext({isShown:!1,text:"",hidePrompt:()=>{},showPrompt:()=>{},resolveRef:{current:()=>{}},options:{input:"textarea",type:"text"},setOptions:()=>{}}),kr=()=>{const e=M.compilerRuntimeExports.c(12),{isShown:t,text:r,showPrompt:n,hidePrompt:o,resolveRef:i,setOptions:s}=C.useContext(Ut);let a;e[0]!==o||e[1]!==i?(a=b=>{o(),i.current(b)},e[0]=o,e[1]=i,e[2]=a):a=e[2];const f=a;let c;e[3]!==i||e[4]!==s||e[5]!==n?(c=async(b,y)=>(s(d=>({...d,...y})),n(b),new Promise(d=>{i.current=d})),e[3]=i,e[4]=s,e[5]=n,e[6]=c):c=e[6];const l=c;let p;return e[7]!==t||e[8]!==f||e[9]!==l||e[10]!==r?(p={isShown:t,text:r,prompt:l,onFinish:f},e[7]=t,e[8]=f,e[9]=l,e[10]=r,e[11]=p):p=e[11],p};function Bt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Nr}=Object.prototype,{getPrototypeOf:st}=Object,{iterator:Me,toStringTag:zt}=Symbol,Ue=(e=>t=>{const r=Nr.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),z=e=>(e=e.toLowerCase(),t=>Ue(t)===e),Be=e=>t=>typeof t===e,{isArray:ue}=Array,le=Be("undefined");function ye(e){return e!==null&&!le(e)&&e.constructor!==null&&!le(e.constructor)&&j(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qt=z("ArrayBuffer");function Dr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&qt(e.buffer),t}const Lr=Be("string"),j=Be("function"),Ht=Be("number"),ge=e=>e!==null&&typeof e=="object",$r=e=>e===!0||e===!1,Ne=e=>{if(Ue(e)!=="object")return!1;const t=st(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(zt in e)&&!(Me in e)},jr=e=>{if(!ge(e)||ye(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Fr=z("Date"),Ir=z("File"),Mr=z("Blob"),Ur=z("FileList"),Br=e=>ge(e)&&j(e.pipe),zr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||j(e.append)&&((t=Ue(e))==="formdata"||t==="object"&&j(e.toString)&&e.toString()==="[object FormData]"))},qr=z("URLSearchParams"),[Hr,Vr,Jr,Wr]=["ReadableStream","Request","Response","Headers"].map(z),Yr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function be(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),ue(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(ye(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let a;for(n=0;n<s;n++)a=i[n],t.call(null,e[a],a,e)}}function Vt(e,t){if(ye(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const re=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Jt=e=>!le(e)&&e!==re;function Qe(){const{caseless:e,skipUndefined:t}=Jt(this)&&this||{},r={},n=(o,i)=>{const s=e&&Vt(r,i)||i;Ne(r[s])&&Ne(o)?r[s]=Qe(r[s],o):Ne(o)?r[s]=Qe({},o):ue(o)?r[s]=o.slice():(!t||!le(o))&&(r[s]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&be(arguments[o],n);return r}const Kr=(e,t,r,{allOwnKeys:n}={})=>(be(t,(o,i)=>{r&&j(o)?e[i]=Bt(o,r):e[i]=o},{allOwnKeys:n}),e),Xr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gr=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Zr=(e,t,r,n)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&st(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Qr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},en=e=>{if(!e)return null;if(ue(e))return e;let t=e.length;if(!Ht(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},tn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&st(Uint8Array)),rn=(e,t)=>{const n=(e&&e[Me]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},nn=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},on=z("HTMLFormElement"),sn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),mt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),an=z("RegExp"),Wt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};be(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},cn=e=>{Wt(e,(t,r)=>{if(j(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(j(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ln=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return ue(e)?n(e):n(String(e).split(t)),r},un=()=>{},fn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dn(e){return!!(e&&j(e.append)&&e[zt]==="FormData"&&e[Me])}const pn=e=>{const t=new Array(10),r=(n,o)=>{if(ge(n)){if(t.indexOf(n)>=0)return;if(ye(n))return n;if(!("toJSON"in n)){t[o]=n;const i=ue(n)?[]:{};return be(n,(s,a)=>{const f=r(s,o+1);!le(f)&&(i[a]=f)}),t[o]=void 0,i}}return n};return r(e,0)},mn=z("AsyncFunction"),hn=e=>e&&(ge(e)||j(e))&&j(e.then)&&j(e.catch),Yt=((e,t)=>e?setImmediate:t?((r,n)=>(re.addEventListener("message",({source:o,data:i})=>{o===re&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),re.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",j(re.postMessage)),yn=typeof queueMicrotask<"u"?queueMicrotask.bind(re):typeof process<"u"&&process.nextTick||Yt,gn=e=>e!=null&&j(e[Me]),u={isArray:ue,isArrayBuffer:qt,isBuffer:ye,isFormData:zr,isArrayBufferView:Dr,isString:Lr,isNumber:Ht,isBoolean:$r,isObject:ge,isPlainObject:Ne,isEmptyObject:jr,isReadableStream:Hr,isRequest:Vr,isResponse:Jr,isHeaders:Wr,isUndefined:le,isDate:Fr,isFile:Ir,isBlob:Mr,isRegExp:an,isFunction:j,isStream:Br,isURLSearchParams:qr,isTypedArray:tn,isFileList:Ur,forEach:be,merge:Qe,extend:Kr,trim:Yr,stripBOM:Xr,inherits:Gr,toFlatObject:Zr,kindOf:Ue,kindOfTest:z,endsWith:Qr,toArray:en,forEachEntry:rn,matchAll:nn,isHTMLForm:on,hasOwnProperty:mt,hasOwnProp:mt,reduceDescriptors:Wt,freezeMethods:cn,toObjectSet:ln,toCamelCase:sn,noop:un,toFiniteNumber:fn,findKey:Vt,global:re,isContextDefined:Jt,isSpecCompliantForm:dn,toJSONObject:pn,isAsyncFn:mn,isThenable:hn,setImmediate:Yt,asap:yn,isIterable:gn};function A(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}u.inherits(A,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});const Kt=A.prototype,Xt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Xt[e]={value:e}});Object.defineProperties(A,Xt);Object.defineProperty(Kt,"isAxiosError",{value:!0});A.from=(e,t,r,n,o,i)=>{const s=Object.create(Kt);u.toFlatObject(e,s,function(l){return l!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return A.call(s,a,f,r,n,o),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};const bn=null;function et(e){return u.isPlainObject(e)||u.isArray(e)}function Gt(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function ht(e,t,r){return e?e.concat(t).map(function(o,i){return o=Gt(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function wn(e){return u.isArray(e)&&!e.some(et)}const En=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function ze(e,t,r){if(!u.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=u.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!u.isUndefined(g[h])});const n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(t);if(!u.isFunction(o))throw new TypeError("visitor must be a function");function c(d){if(d===null)return"";if(u.isDate(d))return d.toISOString();if(u.isBoolean(d))return d.toString();if(!f&&u.isBlob(d))throw new A("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(d)||u.isTypedArray(d)?f&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function l(d,h,g){let R=d;if(d&&!g&&typeof d=="object"){if(u.endsWith(h,"{}"))h=n?h:h.slice(0,-2),d=JSON.stringify(d);else if(u.isArray(d)&&wn(d)||(u.isFileList(d)||u.endsWith(h,"[]"))&&(R=u.toArray(d)))return h=Gt(h),R.forEach(function(w,S){!(u.isUndefined(w)||w===null)&&t.append(s===!0?ht([h],S,i):s===null?h:h+"[]",c(w))}),!1}return et(d)?!0:(t.append(ht(g,h,i),c(d)),!1)}const p=[],b=Object.assign(En,{defaultVisitor:l,convertValue:c,isVisitable:et});function y(d,h){if(!u.isUndefined(d)){if(p.indexOf(d)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(d),u.forEach(d,function(R,E){(!(u.isUndefined(R)||R===null)&&o.call(t,R,u.isString(E)?E.trim():E,h,b))===!0&&y(R,h?h.concat(E):[E])}),p.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return y(e),t}function yt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function it(e,t){this._pairs=[],e&&ze(e,this,t)}const Zt=it.prototype;Zt.append=function(t,r){this._pairs.push([t,r])};Zt.toString=function(t){const r=t?function(n){return t.call(this,n,yt)}:yt;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Sn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Qt(e,t,r){if(!t)return e;const n=r&&r.encode||Sn;u.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=u.isURLSearchParams(t)?t.toString():new it(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class gt{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){u.forEach(this.handlers,function(n){n!==null&&t(n)})}}const er={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xn=typeof URLSearchParams<"u"?URLSearchParams:it,Cn=typeof FormData<"u"?FormData:null,On=typeof Blob<"u"?Blob:null,Rn={isBrowser:!0,classes:{URLSearchParams:xn,FormData:Cn,Blob:On},protocols:["http","https","file","blob","url","data"]},at=typeof window<"u"&&typeof document<"u",tt=typeof navigator=="object"&&navigator||void 0,An=at&&(!tt||["ReactNative","NativeScript","NS"].indexOf(tt.product)<0),Tn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vn=at&&window.location.href||"http://localhost",Pn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:at,hasStandardBrowserEnv:An,hasStandardBrowserWebWorkerEnv:Tn,navigator:tt,origin:vn},Symbol.toStringTag,{value:"Module"})),$={...Pn,...Rn};function _n(e,t){return ze(e,new $.classes.URLSearchParams,{visitor:function(r,n,o,i){return $.isNode&&u.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function kn(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Nn(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function tr(e){function t(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),f=i>=r.length;return s=!s&&u.isArray(o)?o.length:s,f?(u.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!u.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&u.isArray(o[s])&&(o[s]=Nn(o[s])),!a)}if(u.isFormData(e)&&u.isFunction(e.entries)){const r={};return u.forEachEntry(e,(n,o)=>{t(kn(n),o,r,0)}),r}return null}function Dn(e,t,r){if(u.isString(e))try{return(t||JSON.parse)(e),u.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const we={transitional:er,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=u.isObject(t);if(i&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return o?JSON.stringify(tr(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return _n(t,this.formSerializer).toString();if((a=u.isFileList(t))||n.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return ze(a?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),Dn(t)):t}],transformResponse:[function(t){const r=this.transitional||we.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?A.from(a,A.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],e=>{we.headers[e]={}});const Ln=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$n=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&Ln[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},bt=Symbol("internals");function pe(e){return e&&String(e).trim().toLowerCase()}function De(e){return e===!1||e==null?e:u.isArray(e)?e.map(De):String(e)}function jn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Fn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ye(e,t,r,n,o){if(u.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!u.isString(t)){if(u.isString(n))return t.indexOf(n)!==-1;if(u.isRegExp(n))return n.test(t)}}function In(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Mn(e,t){const r=u.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,s){return this[n].call(this,t,o,i,s)},configurable:!0})})}let F=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,f,c){const l=pe(f);if(!l)throw new Error("header name must be a non-empty string");const p=u.findKey(o,l);(!p||o[p]===void 0||c===!0||c===void 0&&o[p]!==!1)&&(o[p||f]=De(a))}const s=(a,f)=>u.forEach(a,(c,l)=>i(c,l,f));if(u.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(u.isString(t)&&(t=t.trim())&&!Fn(t))s($n(t),r);else if(u.isObject(t)&&u.isIterable(t)){let a={},f,c;for(const l of t){if(!u.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(f=a[c])?u.isArray(f)?[...f,l[1]]:[f,l[1]]:l[1]}s(a,r)}else t!=null&&i(r,t,n);return this}get(t,r){if(t=pe(t),t){const n=u.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return jn(o);if(u.isFunction(r))return r.call(this,o,n);if(u.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=pe(t),t){const n=u.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ye(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=pe(s),s){const a=u.findKey(n,s);a&&(!r||Ye(n,n[a],a,r))&&(delete n[a],o=!0)}}return u.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||Ye(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return u.forEach(this,(o,i)=>{const s=u.findKey(n,i);if(s){r[s]=De(o),delete r[i];return}const a=t?In(i):String(i).trim();a!==i&&delete r[i],r[a]=De(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return u.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&u.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[bt]=this[bt]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=pe(s);n[a]||(Mn(o,s),n[a]=!0)}return u.isArray(t)?t.forEach(i):i(t),this}};F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);u.reduceDescriptors(F.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});u.freezeMethods(F);function Ke(e,t){const r=this||we,n=t||r,o=F.from(n.headers);let i=n.data;return u.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function rr(e){return!!(e&&e.__CANCEL__)}function fe(e,t,r){A.call(this,e??"canceled",A.ERR_CANCELED,t,r),this.name="CanceledError"}u.inherits(fe,A,{__CANCEL__:!0});function nr(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new A("Request failed with status code "+r.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Un(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Bn(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),l=n[i];s||(s=c),r[o]=f,n[o]=c;let p=i,b=0;for(;p!==o;)b+=r[p++],p=p%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-s<t)return;const y=l&&c-l;return y?Math.round(b*1e3/y):void 0}}function zn(e,t){let r=0,n=1e3/t,o,i;const s=(c,l=Date.now())=>{r=l,o=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const l=Date.now(),p=l-r;p>=n?s(c,l):(o=c,i||(i=setTimeout(()=>{i=null,s(o)},n-p)))},()=>o&&s(o)]}const Fe=(e,t,r=3)=>{let n=0;const o=Bn(50,250);return zn(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,f=s-n,c=o(f),l=s<=a;n=s;const p={loaded:s,total:a,progress:a?s/a:void 0,bytes:f,rate:c||void 0,estimated:c&&a&&l?(a-s)/c:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(p)},r)},wt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Et=e=>(...t)=>u.asap(()=>e(...t)),qn=$.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,$.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL($.origin),$.navigator&&/(msie|trident)/i.test($.navigator.userAgent)):()=>!0,Hn=$.hasStandardBrowserEnv?{write(e,t,r,n,o,i,s){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];u.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),u.isString(n)&&a.push(`path=${n}`),u.isString(o)&&a.push(`domain=${o}`),i===!0&&a.push("secure"),u.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function or(e,t,r){let n=!Vn(t);return e&&(n||r==!1)?Jn(e,t):t}const St=e=>e instanceof F?{...e}:e;function oe(e,t){t=t||{};const r={};function n(c,l,p,b){return u.isPlainObject(c)&&u.isPlainObject(l)?u.merge.call({caseless:b},c,l):u.isPlainObject(l)?u.merge({},l):u.isArray(l)?l.slice():l}function o(c,l,p,b){if(u.isUndefined(l)){if(!u.isUndefined(c))return n(void 0,c,p,b)}else return n(c,l,p,b)}function i(c,l){if(!u.isUndefined(l))return n(void 0,l)}function s(c,l){if(u.isUndefined(l)){if(!u.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,p){if(p in t)return n(c,l);if(p in e)return n(void 0,c)}const f={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,l,p)=>o(St(c),St(l),p,!0)};return u.forEach(Object.keys({...e,...t}),function(l){const p=f[l]||o,b=p(e[l],t[l],l);u.isUndefined(b)&&p!==a||(r[l]=b)}),r}const sr=e=>{const t=oe({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=F.from(s),t.url=Qt(or(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),u.isFormData(r)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(u.isFunction(r.getHeaders)){const f=r.getHeaders(),c=["content-type","content-length"];Object.entries(f).forEach(([l,p])=>{c.includes(l.toLowerCase())&&s.set(l,p)})}}if($.hasStandardBrowserEnv&&(n&&u.isFunction(n)&&(n=n(t)),n||n!==!1&&qn(t.url))){const f=o&&i&&Hn.read(i);f&&s.set(o,f)}return t},Wn=typeof XMLHttpRequest<"u",Yn=Wn&&function(e){return new Promise(function(r,n){const o=sr(e);let i=o.data;const s=F.from(o.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:c}=o,l,p,b,y,d;function h(){y&&y(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function R(){if(!g)return;const w=F.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),m={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:e,request:g};nr(function(P){r(P),h()},function(P){n(P),h()},m),g=null}"onloadend"in g?g.onloadend=R:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(R)},g.onabort=function(){g&&(n(new A("Request aborted",A.ECONNABORTED,e,g)),g=null)},g.onerror=function(S){const m=S&&S.message?S.message:"Network Error",O=new A(m,A.ERR_NETWORK,e,g);O.event=S||null,n(O),g=null},g.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const m=o.transitional||er;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),n(new A(S,m.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,g)),g=null},i===void 0&&s.setContentType(null),"setRequestHeader"in g&&u.forEach(s.toJSON(),function(S,m){g.setRequestHeader(m,S)}),u.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),a&&a!=="json"&&(g.responseType=o.responseType),c&&([b,d]=Fe(c,!0),g.addEventListener("progress",b)),f&&g.upload&&([p,y]=Fe(f),g.upload.addEventListener("progress",p),g.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(l=w=>{g&&(n(!w||w.type?new fe(null,e,g):w),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const E=Un(o.url);if(E&&$.protocols.indexOf(E)===-1){n(new A("Unsupported protocol "+E+":",A.ERR_BAD_REQUEST,e));return}g.send(i||null)})},Kn=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,o;const i=function(c){if(!o){o=!0,a();const l=c instanceof Error?c:this.reason;n.abort(l instanceof A?l:new fe(l instanceof Error?l.message:l))}};let s=t&&setTimeout(()=>{s=null,i(new A(`timeout ${t} of ms exceeded`,A.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:f}=n;return f.unsubscribe=()=>u.asap(a),f}},Xn=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},Gn=async function*(e,t){for await(const r of Zn(e))yield*Xn(r,t)},Zn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},xt=(e,t,r,n)=>{const o=Gn(e,t);let i=0,s,a=f=>{s||(s=!0,n&&n(f))};return new ReadableStream({async pull(f){try{const{done:c,value:l}=await o.next();if(c){a(),f.close();return}let p=l.byteLength;if(r){let b=i+=p;r(b)}f.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(f){return a(f),o.return()}},{highWaterMark:2})},Ct=64*1024,{isFunction:ve}=u,Qn=(({Request:e,Response:t})=>({Request:e,Response:t}))(u.global),{ReadableStream:Ot,TextEncoder:Rt}=u.global,At=(e,...t)=>{try{return!!e(...t)}catch{return!1}},eo=e=>{e=u.merge.call({skipUndefined:!0},Qn,e);const{fetch:t,Request:r,Response:n}=e,o=t?ve(t):typeof fetch=="function",i=ve(r),s=ve(n);if(!o)return!1;const a=o&&ve(Ot),f=o&&(typeof Rt=="function"?(d=>h=>d.encode(h))(new Rt):async d=>new Uint8Array(await new r(d).arrayBuffer())),c=i&&a&&At(()=>{let d=!1;const h=new r($.origin,{body:new Ot,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!h}),l=s&&a&&At(()=>u.isReadableStream(new n("").body)),p={stream:l&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!p[d]&&(p[d]=(h,g)=>{let R=h&&h[d];if(R)return R.call(h);throw new A(`Response type '${d}' is not supported`,A.ERR_NOT_SUPPORT,g)})});const b=async d=>{if(d==null)return 0;if(u.isBlob(d))return d.size;if(u.isSpecCompliantForm(d))return(await new r($.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(u.isArrayBufferView(d)||u.isArrayBuffer(d))return d.byteLength;if(u.isURLSearchParams(d)&&(d=d+""),u.isString(d))return(await f(d)).byteLength},y=async(d,h)=>{const g=u.toFiniteNumber(d.getContentLength());return g??b(h)};return async d=>{let{url:h,method:g,data:R,signal:E,cancelToken:w,timeout:S,onDownloadProgress:m,onUploadProgress:O,responseType:P,headers:N,withCredentials:k="same-origin",fetchOptions:I}=sr(d),Se=t||fetch;P=P?(P+"").toLowerCase():"text";let se=Kn([E,w&&w.toAbortSignal()],S),te=null;const J=se&&se.unsubscribe&&(()=>{se.unsubscribe()});let xe;try{if(O&&c&&g!=="get"&&g!=="head"&&(xe=await y(N,R))!==0){let q=new r(h,{method:"POST",body:R,duplex:"half"}),X;if(u.isFormData(R)&&(X=q.headers.get("content-type"))&&N.setContentType(X),q.body){const[de,ie]=wt(xe,Fe(Et(O)));R=xt(q.body,Ct,de,ie)}}u.isString(k)||(k=k?"include":"omit");const U=i&&"credentials"in r.prototype,Ce={...I,signal:se,method:g.toUpperCase(),headers:N.normalize().toJSON(),body:R,duplex:"half",credentials:U?k:void 0};te=i&&new r(h,Ce);let B=await(i?Se(te,I):Se(h,Ce));const Oe=l&&(P==="stream"||P==="response");if(l&&(m||Oe&&J)){const q={};["status","statusText","headers"].forEach(Ae=>{q[Ae]=B[Ae]});const X=u.toFiniteNumber(B.headers.get("content-length")),[de,ie]=m&&wt(X,Fe(Et(m),!0))||[];B=new n(xt(B.body,Ct,de,()=>{ie&&ie(),J&&J()}),q)}P=P||"text";let Re=await p[u.findKey(p,P)||"text"](B,d);return!Oe&&J&&J(),await new Promise((q,X)=>{nr(q,X,{data:Re,headers:F.from(B.headers),status:B.status,statusText:B.statusText,config:d,request:te})})}catch(U){throw J&&J(),U&&U.name==="TypeError"&&/Load failed|fetch/i.test(U.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,d,te),{cause:U.cause||U}):A.from(U,U&&U.code,d,te)}}},to=new Map,ir=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let s=i.length,a=s,f,c,l=to;for(;a--;)f=i[a],c=l.get(f),c===void 0&&l.set(f,c=a?new Map:eo(t)),l=c;return c};ir();const ct={http:bn,xhr:Yn,fetch:{get:ir}};u.forEach(ct,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Tt=e=>`- ${e}`,ro=e=>u.isFunction(e)||e===null||e===!1;function no(e,t){e=u.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let s=0;s<r;s++){n=e[s];let a;if(o=n,!ro(n)&&(o=ct[(a=String(n)).toLowerCase()],o===void 0))throw new A(`Unknown adapter '${a}'`);if(o&&(u.isFunction(o)||(o=o.get(t))))break;i[a||"#"+s]=o}if(!o){const s=Object.entries(i).map(([f,c])=>`adapter ${f} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=r?s.length>1?`since :
|
|
4
|
+
`+s.map(Tt).join(`
|
|
5
|
+
`):" "+Tt(s[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const ar={getAdapter:no,adapters:ct};function Xe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fe(null,e)}function vt(e){return Xe(e),e.headers=F.from(e.headers),e.data=Ke.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ar.getAdapter(e.adapter||we.adapter,e)(e).then(function(n){return Xe(e),n.data=Ke.call(e,e.transformResponse,n),n.headers=F.from(n.headers),n},function(n){return rr(n)||(Xe(e),n&&n.response&&(n.response.data=Ke.call(e,e.transformResponse,n.response),n.response.headers=F.from(n.response.headers))),Promise.reject(n)})}const cr="1.13.2",qe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Pt={};qe.transitional=function(t,r,n){function o(i,s){return"[Axios v"+cr+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new A(o(s," has been removed"+(r?" in "+r:"")),A.ERR_DEPRECATED);return r&&!Pt[s]&&(Pt[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,s,a):!0}};qe.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function oo(e,t,r){if(typeof e!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const a=e[i],f=a===void 0||s(a,i,e);if(f!==!0)throw new A("option "+i+" must be "+f,A.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new A("Unknown option "+i,A.ERR_BAD_OPTION)}}const Le={assertOptions:oo,validators:qe},H=Le.validators;let ne=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gt,response:new gt}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=oe(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Le.assertOptions(n,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),o!=null&&(u.isFunction(o)?r.paramsSerializer={serialize:o}:Le.assertOptions(o,{encode:H.function,serialize:H.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Le.assertOptions(r,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&u.merge(i.common,i[r.method]);i&&u.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=F.concat(s,i);const a=[];let f=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(f=f&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let l,p=0,b;if(!f){const d=[vt.bind(this),void 0];for(d.unshift(...a),d.push(...c),b=d.length,l=Promise.resolve(r);p<b;)l=l.then(d[p++],d[p++]);return l}b=a.length;let y=r;for(;p<b;){const d=a[p++],h=a[p++];try{y=d(y)}catch(g){h.call(this,g);break}}try{l=vt.call(this,y)}catch(d){return Promise.reject(d)}for(p=0,b=c.length;p<b;)l=l.then(c[p++],c[p++]);return l}getUri(t){t=oe(this.defaults,t);const r=or(t.baseURL,t.url,t.allowAbsoluteUrls);return Qt(r,t.params,t.paramsSerializer)}};u.forEach(["delete","get","head","options"],function(t){ne.prototype[t]=function(r,n){return this.request(oe(n||{},{method:t,url:r,data:(n||{}).data}))}});u.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(oe(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}ne.prototype[t]=r(),ne.prototype[t+"Form"]=r(!0)});let so=class lr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},t(function(i,s,a){n.reason||(n.reason=new fe(i,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new lr(function(o){t=o}),cancel:t}}};function io(e){return function(r){return e.apply(null,r)}}function ao(e){return u.isObject(e)&&e.isAxiosError===!0}const rt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(rt).forEach(([e,t])=>{rt[t]=e});function ur(e){const t=new ne(e),r=Bt(ne.prototype.request,t);return u.extend(r,ne.prototype,t,{allOwnKeys:!0}),u.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return ur(oe(e,o))},r}const _=ur(we);_.Axios=ne;_.CanceledError=fe;_.CancelToken=so;_.isCancel=rr;_.VERSION=cr;_.toFormData=ze;_.AxiosError=A;_.Cancel=_.CanceledError;_.all=function(t){return Promise.all(t)};_.spread=io;_.isAxiosError=ao;_.mergeConfig=oe;_.AxiosHeaders=F;_.formToJSON=e=>tr(u.isHTMLForm(e)?new FormData(e):e);_.getAdapter=ar.getAdapter;_.HttpStatusCode=rt;_.default=_;const{Axios:Ts,AxiosError:vs,CanceledError:Ps,isCancel:_s,CancelToken:ks,VERSION:Ns,all:Ds,Cancel:Ls,isAxiosError:$s,spread:js,toFormData:Fs,AxiosHeaders:Is,HttpStatusCode:Ms,formToJSON:Us,getAdapter:Bs,mergeConfig:zs}=_;var Pe={};/*!
|
|
7
|
+
* cookie
|
|
8
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
9
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
10
|
+
* MIT Licensed
|
|
11
|
+
*/var _t;function co(){if(_t)return Pe;_t=1,Pe.parse=s,Pe.serialize=c;var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,r=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,n=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/;function s(y,d){if(typeof y!="string")throw new TypeError("argument str must be a string");var h={},g=y.length;if(g<2)return h;var R=d&&d.decode||l,E=0,w=0,S=0;do{if(w=y.indexOf("=",E),w===-1)break;if(S=y.indexOf(";",E),S===-1)S=g;else if(w>S){E=y.lastIndexOf(";",w-1)+1;continue}var m=a(y,E,w),O=f(y,w,m),P=y.slice(m,O);if(!t.call(h,P)){var N=a(y,w+1,S),k=f(y,S,N);y.charCodeAt(N)===34&&y.charCodeAt(k-1)===34&&(N++,k--);var I=y.slice(N,k);h[P]=b(I,R)}E=S+1}while(E<g);return h}function a(y,d,h){do{var g=y.charCodeAt(d);if(g!==32&&g!==9)return d}while(++d<h);return h}function f(y,d,h){for(;d>h;){var g=y.charCodeAt(--d);if(g!==32&&g!==9)return d+1}return h}function c(y,d,h){var g=h&&h.encode||encodeURIComponent;if(typeof g!="function")throw new TypeError("option encode is invalid");if(!r.test(y))throw new TypeError("argument name is invalid");var R=g(d);if(!n.test(R))throw new TypeError("argument val is invalid");var E=y+"="+R;if(!h)return E;if(h.maxAge!=null){var w=Math.floor(h.maxAge);if(!isFinite(w))throw new TypeError("option maxAge is invalid");E+="; Max-Age="+w}if(h.domain){if(!o.test(h.domain))throw new TypeError("option domain is invalid");E+="; Domain="+h.domain}if(h.path){if(!i.test(h.path))throw new TypeError("option path is invalid");E+="; Path="+h.path}if(h.expires){var S=h.expires;if(!p(S)||isNaN(S.valueOf()))throw new TypeError("option expires is invalid");E+="; Expires="+S.toUTCString()}if(h.httpOnly&&(E+="; HttpOnly"),h.secure&&(E+="; Secure"),h.partitioned&&(E+="; Partitioned"),h.priority){var m=typeof h.priority=="string"?h.priority.toLowerCase():h.priority;switch(m){case"low":E+="; Priority=Low";break;case"medium":E+="; Priority=Medium";break;case"high":E+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(h.sameSite){var O=typeof h.sameSite=="string"?h.sameSite.toLowerCase():h.sameSite;switch(O){case!0:E+="; SameSite=Strict";break;case"lax":E+="; SameSite=Lax";break;case"strict":E+="; SameSite=Strict";break;case"none":E+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return E}function l(y){return y.indexOf("%")!==-1?decodeURIComponent(y):y}function p(y){return e.call(y)==="[object Date]"}function b(y,d){try{return d(y)}catch{return y}}return Pe}var $e=co();function lo(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function uo(e){return typeof e=="string"?$e.parse(e):typeof e=="object"&&e!==null?e:{}}function Ge(e,t={}){const r=fo(e);if(!t.doNotParse)try{return JSON.parse(r)}catch{}return e}function fo(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class po{constructor(t,r={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const o=this.cookies;this.cookies=$e.parse(document.cookie),this._checkChanges(o)};const n=typeof document>"u"?"":document.cookie;this.cookies=uo(t||n),this.defaultSetOptions=r,this.HAS_DOCUMENT_COOKIE=lo()}_emitChange(t){for(let r=0;r<this.changeListeners.length;++r)this.changeListeners[r](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:Ge(this.cookies[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,r={}){return r.doNotUpdate||this.update(),Ge(this.cookies[t],r)}getAll(t={}){t.doNotUpdate||this.update();const r={};for(let n in this.cookies)r[n]=Ge(this.cookies[n],t);return r}set(t,r,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const o=typeof r=="string"?r:JSON.stringify(r);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=$e.serialize(t,o,n)),this._emitChange({name:t,value:r,options:n})}remove(t,r){const n=r=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),r),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=$e.serialize(t,"",n)),this._emitChange({name:t,value:void 0,options:r})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const r=this.changeListeners.indexOf(t);r>=0&&this.changeListeners.splice(r,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}const fr=D.createContext(new po),{Provider:qs,Consumer:Hs}=fr;var _e={exports:{}},T={};/** @license React v16.13.1
|
|
12
|
+
* react-is.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var kt;function mo(){if(kt)return T;kt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function w(m){if(typeof m=="object"&&m!==null){var O=m.$$typeof;switch(O){case t:switch(m=m.type,m){case f:case c:case n:case i:case o:case p:return m;default:switch(m=m&&m.$$typeof,m){case a:case l:case d:case y:case s:return m;default:return O}}case r:return O}}}function S(m){return w(m)===c}return T.AsyncMode=f,T.ConcurrentMode=c,T.ContextConsumer=a,T.ContextProvider=s,T.Element=t,T.ForwardRef=l,T.Fragment=n,T.Lazy=d,T.Memo=y,T.Portal=r,T.Profiler=i,T.StrictMode=o,T.Suspense=p,T.isAsyncMode=function(m){return S(m)||w(m)===f},T.isConcurrentMode=S,T.isContextConsumer=function(m){return w(m)===a},T.isContextProvider=function(m){return w(m)===s},T.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===t},T.isForwardRef=function(m){return w(m)===l},T.isFragment=function(m){return w(m)===n},T.isLazy=function(m){return w(m)===d},T.isMemo=function(m){return w(m)===y},T.isPortal=function(m){return w(m)===r},T.isProfiler=function(m){return w(m)===i},T.isStrictMode=function(m){return w(m)===o},T.isSuspense=function(m){return w(m)===p},T.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===c||m===i||m===o||m===p||m===b||typeof m=="object"&&m!==null&&(m.$$typeof===d||m.$$typeof===y||m.$$typeof===s||m.$$typeof===a||m.$$typeof===l||m.$$typeof===g||m.$$typeof===R||m.$$typeof===E||m.$$typeof===h)},T.typeOf=w,T}var v={};/** @license React v16.13.1
|
|
19
|
+
* react-is.development.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Nt;function ho(){return Nt||(Nt=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,l=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function w(x){return typeof x=="string"||typeof x=="function"||x===n||x===c||x===i||x===o||x===p||x===b||typeof x=="object"&&x!==null&&(x.$$typeof===d||x.$$typeof===y||x.$$typeof===s||x.$$typeof===a||x.$$typeof===l||x.$$typeof===g||x.$$typeof===R||x.$$typeof===E||x.$$typeof===h)}function S(x){if(typeof x=="object"&&x!==null){var We=x.$$typeof;switch(We){case t:var Te=x.type;switch(Te){case f:case c:case n:case i:case o:case p:return Te;default:var dt=Te&&Te.$$typeof;switch(dt){case a:case l:case d:case y:case s:return dt;default:return We}}case r:return We}}}var m=f,O=c,P=a,N=s,k=t,I=l,Se=n,se=d,te=y,J=r,xe=i,U=o,Ce=p,B=!1;function Oe(x){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Re(x)||S(x)===f}function Re(x){return S(x)===c}function q(x){return S(x)===a}function X(x){return S(x)===s}function de(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function ie(x){return S(x)===l}function Ae(x){return S(x)===n}function Cr(x){return S(x)===d}function Or(x){return S(x)===y}function Rr(x){return S(x)===r}function Ar(x){return S(x)===i}function Tr(x){return S(x)===o}function vr(x){return S(x)===p}v.AsyncMode=m,v.ConcurrentMode=O,v.ContextConsumer=P,v.ContextProvider=N,v.Element=k,v.ForwardRef=I,v.Fragment=Se,v.Lazy=se,v.Memo=te,v.Portal=J,v.Profiler=xe,v.StrictMode=U,v.Suspense=Ce,v.isAsyncMode=Oe,v.isConcurrentMode=Re,v.isContextConsumer=q,v.isContextProvider=X,v.isElement=de,v.isForwardRef=ie,v.isFragment=Ae,v.isLazy=Cr,v.isMemo=Or,v.isPortal=Rr,v.isProfiler=Ar,v.isStrictMode=Tr,v.isSuspense=vr,v.isValidElementType=w,v.typeOf=S}()),v}var Dt;function yo(){return Dt||(Dt=1,process.env.NODE_ENV==="production"?_e.exports=mo():_e.exports=ho()),_e.exports}var Ze,Lt;function go(){if(Lt)return Ze;Lt=1;var e=yo(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=n,i[e.Memo]=o;function s(d){return e.isMemo(d)?o:i[d.$$typeof]||t}var a=Object.defineProperty,f=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,b=Object.prototype;function y(d,h,g){if(typeof h!="string"){if(b){var R=p(h);R&&R!==b&&y(d,R,g)}var E=f(h);c&&(E=E.concat(c(h)));for(var w=s(d),S=s(h),m=0;m<E.length;++m){var O=E[m];if(!r[O]&&!(g&&g[O])&&!(S&&S[O])&&!(w&&w[O])){var P=l(h,O);try{a(d,O,P)}catch{}}}}return d}return Ze=y,Ze}go();function bo(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function lt(e,t){const r=C.useContext(fr);if(!r)throw new Error("Missing <CookiesProvider>");const o=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[i,s]=C.useState(()=>r.getAll(o));bo()&&C.useLayoutEffect(()=>{function l(){const p=r.getAll(o);wo(e||null,p,i)&&s(p)}return r.addChangeListener(l),()=>{r.removeChangeListener(l)}},[r,i]);const a=C.useMemo(()=>r.set.bind(r),[r]),f=C.useMemo(()=>r.remove.bind(r),[r]),c=C.useMemo(()=>r.update.bind(r),[r]);return[i,a,f,c]}function wo(e,t,r){if(!e)return!0;for(let n of e)if(t[n]!==r[n])return!0;return!1}const Eo=()=>{const e=M.compilerRuntimeExports.c(12),{axiosOptions:t,cookieDomain:r}=C.useContext(Z.LuminusComponentsContext);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["Authorization"],e[0]=n):n=e[0];const[,o,i]=lt(n);let s;e[1]!==t?(s=_.create(t),e[1]=t,e[2]=s):s=e[2];const a=s,f=So;let c;e[3]!==a||e[4]!==r||e[5]!==o?(c=async(d,h)=>a.post("/user/login",{kid:d,password:h}).then(g=>(localStorage.setItem("token",g.data),window.dispatchEvent(new Event("dev-auth-change")),o("Authorization",g.data,{path:"/",secure:window.location.protocol==="https:",sameSite:"none",domain:r,expires:Ft(new Date(Date.now()),24)}),g.data)).catch(xo),e[3]=a,e[4]=r,e[5]=o,e[6]=c):c=e[6];const l=c;let p;e[7]!==i?(p=()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),window.dispatchEvent(new Event("dev-auth-change")),i("Authorization")},e[7]=i,e[8]=p):p=e[8];const b=p;let y;return e[9]!==l||e[10]!==b?(y={isAuthenticated:f,login:l,logout:b},e[9]=l,e[10]=b,e[11]=y):y=e[11],y};function So(){const e=localStorage.getItem("token");return e!==null&&e.length>0}function xo(e){return console.log(e),null}const Co=()=>{const e=M.compilerRuntimeExports.c(18);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=["Authorization"],e[0]=t):t=e[0];const[,,r]=lt(t),{msalScopes:n,msalExtraScopes:o}=C.useContext(Je),{instance:i,inProgress:s}=pt.useMsal(),a=pt.useIsAuthenticated();let f;e[1]!==a?(f=()=>a,e[1]=a,e[2]=f):f=e[2];const c=f;let l;e[3]!==c||e[4]!==s?(l=()=>!c()&&s!==Pr.InteractionStatus.None,e[3]=c,e[4]=s,e[5]=l):l=e[5];const p=l;let b;e[6]!==i||e[7]!==o||e[8]!==n?(b=async()=>i.loginRedirect({scopes:n,extraScopesToConsent:o}).then(Oo).catch(Ro),e[6]=i,e[7]=o,e[8]=n,e[9]=b):b=e[9];const y=b;let d;e[10]!==i||e[11]!==r?(d=()=>{i.logout(),localStorage.removeItem("user"),r("Authorization")},e[10]=i,e[11]=r,e[12]=d):d=e[12];const h=d;let g;return e[13]!==c||e[14]!==p||e[15]!==y||e[16]!==h?(g={isAuthenticated:c,isAuthenticating:p,login:y,logout:h},e[13]=c,e[14]=p,e[15]=y,e[16]=h,e[17]=g):g=e[17],g};function Oo(){return""}function Ro(){return null}const ut=()=>{const e=M.compilerRuntimeExports.c(12),{useMsal:t}=C.useContext(Je),r=Eo(),n=Co();let o;e[0]!==r||e[1]!==n||e[2]!==t?(o=(l,p)=>t?n.login():r.login(l,p),e[0]=r,e[1]=n,e[2]=t,e[3]=o):o=e[3];const i=o,s=t?n.isAuthenticated:r.isAuthenticated;let a;e[4]!==n||e[5]!==t?(a=t?n.isAuthenticating:Ao,e[4]=n,e[5]=t,e[6]=a):a=e[6];const f=t?n.logout:r.logout;let c;return e[7]!==s||e[8]!==a||e[9]!==f||e[10]!==i?(c={isAuthenticated:s,isAuthenticating:a,login:i,logout:f},e[7]=s,e[8]=a,e[9]=f,e[10]=i,e[11]=c):c=e[11],c};function Ao(){return!1}let To={data:""},vo=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||To},Po=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,_o=/\/\*[^]*?\*\/| +/g,$t=/\n+/g,Q=(e,t)=>{let r="",n="",o="";for(let i in e){let s=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+s+";":n+=i[1]=="f"?Q(s,i):i+"{"+Q(s,i[1]=="k"?"":t)+"}":typeof s=="object"?n+=Q(s,t?t.replace(/([^,])+/g,a=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,f=>/&/.test(f)?f.replace(/&/g,a):a?a+" "+f:f)):i):s!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=Q.p?Q.p(i,s):i+":"+s+";")}return r+(t&&o?t+"{"+o+"}":o)+n},W={},dr=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+dr(e[r]);return t}return e},ko=(e,t,r,n,o)=>{let i=dr(e),s=W[i]||(W[i]=(f=>{let c=0,l=11;for(;c<f.length;)l=101*l+f.charCodeAt(c++)>>>0;return"go"+l})(i));if(!W[s]){let f=i!==e?e:(c=>{let l,p,b=[{}];for(;l=Po.exec(c.replace(_o,""));)l[4]?b.shift():l[3]?(p=l[3].replace($t," ").trim(),b.unshift(b[0][p]=b[0][p]||{})):b[0][l[1]]=l[2].replace($t," ").trim();return b[0]})(e);W[s]=Q(o?{["@keyframes "+s]:f}:f,r?"":"."+s)}let a=r&&W.g?W.g:null;return r&&(W.g=W[s]),((f,c,l,p)=>{p?c.data=c.data.replace(p,f):c.data.indexOf(f)===-1&&(c.data=l?f+c.data:c.data+f)})(W[s],t,n,a),s},No=(e,t,r)=>e.reduce((n,o,i)=>{let s=t[i];if(s&&s.call){let a=s(r),f=a&&a.props&&a.props.className||/^go/.test(a)&&a;s=f?"."+f:a&&typeof a=="object"?a.props?"":Q(a,""):a===!1?"":a}return n+o+(s??"")},"");function He(e){let t=this||{},r=e.call?e(t.p):e;return ko(r.unshift?r.raw?No(r,[].slice.call(arguments,1),t.p):r.reduce((n,o)=>Object.assign(n,o&&o.call?o(t.p):o),{}):r,vo(t.target),t.g,t.o,t.k)}let pr,nt,ot;He.bind({g:1});let K=He.bind({k:1});function Do(e,t,r,n){Q.p=t,pr=e,nt=r,ot=n}function ee(e,t){let r=this||{};return function(){let n=arguments;function o(i,s){let a=Object.assign({},i),f=a.className||o.className;r.p=Object.assign({theme:nt&&nt()},a),r.o=/ *go\d+/.test(f),a.className=He.apply(r,n)+(f?" "+f:"");let c=e;return e[0]&&(c=a.as||e,delete a.as),ot&&c[0]&&ot(a),pr(c,a)}return o}}var Lo=e=>typeof e=="function",Ie=(e,t)=>Lo(e)?e(t):e,$o=(()=>{let e=0;return()=>(++e).toString()})(),mr=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),jo=20,ft="default",hr=(e,t)=>{let{toastLimit:r}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,r)};case 1:return{...e,toasts:e.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case 2:let{toast:n}=t;return hr(e,{type:e.toasts.find(s=>s.id===n.id)?1:0,toast:n});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(s=>s.id===o||o===void 0?{...s,dismissed:!0,visible:!1}:s)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(s=>({...s,pauseDuration:s.pauseDuration+i}))}}},je=[],yr={toasts:[],pausedAt:void 0,settings:{toastLimit:jo}},V={},gr=(e,t=ft)=>{V[t]=hr(V[t]||yr,e),je.forEach(([r,n])=>{r===t&&n(V[t])})},br=e=>Object.keys(V).forEach(t=>gr(e,t)),Fo=e=>Object.keys(V).find(t=>V[t].toasts.some(r=>r.id===e)),Ve=(e=ft)=>t=>{gr(t,e)},Io={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Mo=(e={},t=ft)=>{let[r,n]=C.useState(V[t]||yr),o=C.useRef(V[t]);C.useEffect(()=>(o.current!==V[t]&&n(V[t]),je.push([t,n]),()=>{let s=je.findIndex(([a])=>a===t);s>-1&&je.splice(s,1)}),[t]);let i=r.toasts.map(s=>{var a,f,c;return{...e,...e[s.type],...s,removeDelay:s.removeDelay||((a=e[s.type])==null?void 0:a.removeDelay)||(e==null?void 0:e.removeDelay),duration:s.duration||((f=e[s.type])==null?void 0:f.duration)||(e==null?void 0:e.duration)||Io[s.type],style:{...e.style,...(c=e[s.type])==null?void 0:c.style,...s.style}}});return{...r,toasts:i}},Uo=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||$o()}),Ee=e=>(t,r)=>{let n=Uo(t,e,r);return Ve(n.toasterId||Fo(n.id))({type:2,toast:n}),n.id},L=(e,t)=>Ee("blank")(e,t);L.error=Ee("error");L.success=Ee("success");L.loading=Ee("loading");L.custom=Ee("custom");L.dismiss=(e,t)=>{let r={type:3,toastId:e};t?Ve(t)(r):br(r)};L.dismissAll=e=>L.dismiss(void 0,e);L.remove=(e,t)=>{let r={type:4,toastId:e};t?Ve(t)(r):br(r)};L.removeAll=e=>L.remove(void 0,e);L.promise=(e,t,r)=>{let n=L.loading(t.loading,{...r,...r==null?void 0:r.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let i=t.success?Ie(t.success,o):void 0;return i?L.success(i,{id:n,...r,...r==null?void 0:r.success}):L.dismiss(n),o}).catch(o=>{let i=t.error?Ie(t.error,o):void 0;i?L.error(i,{id:n,...r,...r==null?void 0:r.error}):L.dismiss(n)}),e};var Bo=1e3,zo=(e,t="default")=>{let{toasts:r,pausedAt:n}=Mo(e,t),o=C.useRef(new Map).current,i=C.useCallback((p,b=Bo)=>{if(o.has(p))return;let y=setTimeout(()=>{o.delete(p),s({type:4,toastId:p})},b);o.set(p,y)},[]);C.useEffect(()=>{if(n)return;let p=Date.now(),b=r.map(y=>{if(y.duration===1/0)return;let d=(y.duration||0)+y.pauseDuration-(p-y.createdAt);if(d<0){y.visible&&L.dismiss(y.id);return}return setTimeout(()=>L.dismiss(y.id,t),d)});return()=>{b.forEach(y=>y&&clearTimeout(y))}},[r,n,t]);let s=C.useCallback(Ve(t),[t]),a=C.useCallback(()=>{s({type:5,time:Date.now()})},[s]),f=C.useCallback((p,b)=>{s({type:1,toast:{id:p,height:b}})},[s]),c=C.useCallback(()=>{n&&s({type:6,time:Date.now()})},[n,s]),l=C.useCallback((p,b)=>{let{reverseOrder:y=!1,gutter:d=8,defaultPosition:h}=b||{},g=r.filter(w=>(w.position||h)===(p.position||h)&&w.height),R=g.findIndex(w=>w.id===p.id),E=g.filter((w,S)=>S<R&&w.visible).length;return g.filter(w=>w.visible).slice(...y?[E+1]:[0,E]).reduce((w,S)=>w+(S.height||0)+d,0)},[r]);return C.useEffect(()=>{r.forEach(p=>{if(p.dismissed)i(p.id,p.removeDelay);else{let b=o.get(p.id);b&&(clearTimeout(b),o.delete(p.id))}})},[r,i]),{toasts:r,handlers:{updateHeight:f,startPause:a,endPause:c,calculateOffset:l}}},qo=K`
|
|
26
|
+
from {
|
|
27
|
+
transform: scale(0) rotate(45deg);
|
|
28
|
+
opacity: 0;
|
|
29
|
+
}
|
|
30
|
+
to {
|
|
31
|
+
transform: scale(1) rotate(45deg);
|
|
32
|
+
opacity: 1;
|
|
33
|
+
}`,Ho=K`
|
|
34
|
+
from {
|
|
35
|
+
transform: scale(0);
|
|
36
|
+
opacity: 0;
|
|
37
|
+
}
|
|
38
|
+
to {
|
|
39
|
+
transform: scale(1);
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}`,Vo=K`
|
|
42
|
+
from {
|
|
43
|
+
transform: scale(0) rotate(90deg);
|
|
44
|
+
opacity: 0;
|
|
45
|
+
}
|
|
46
|
+
to {
|
|
47
|
+
transform: scale(1) rotate(90deg);
|
|
48
|
+
opacity: 1;
|
|
49
|
+
}`,Jo=ee("div")`
|
|
50
|
+
width: 20px;
|
|
51
|
+
opacity: 0;
|
|
52
|
+
height: 20px;
|
|
53
|
+
border-radius: 10px;
|
|
54
|
+
background: ${e=>e.primary||"#ff4b4b"};
|
|
55
|
+
position: relative;
|
|
56
|
+
transform: rotate(45deg);
|
|
57
|
+
|
|
58
|
+
animation: ${qo} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
59
|
+
forwards;
|
|
60
|
+
animation-delay: 100ms;
|
|
61
|
+
|
|
62
|
+
&:after,
|
|
63
|
+
&:before {
|
|
64
|
+
content: '';
|
|
65
|
+
animation: ${Ho} 0.15s ease-out forwards;
|
|
66
|
+
animation-delay: 150ms;
|
|
67
|
+
position: absolute;
|
|
68
|
+
border-radius: 3px;
|
|
69
|
+
opacity: 0;
|
|
70
|
+
background: ${e=>e.secondary||"#fff"};
|
|
71
|
+
bottom: 9px;
|
|
72
|
+
left: 4px;
|
|
73
|
+
height: 2px;
|
|
74
|
+
width: 12px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:before {
|
|
78
|
+
animation: ${Vo} 0.15s ease-out forwards;
|
|
79
|
+
animation-delay: 180ms;
|
|
80
|
+
transform: rotate(90deg);
|
|
81
|
+
}
|
|
82
|
+
`,Wo=K`
|
|
83
|
+
from {
|
|
84
|
+
transform: rotate(0deg);
|
|
85
|
+
}
|
|
86
|
+
to {
|
|
87
|
+
transform: rotate(360deg);
|
|
88
|
+
}
|
|
89
|
+
`,Yo=ee("div")`
|
|
90
|
+
width: 12px;
|
|
91
|
+
height: 12px;
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
border: 2px solid;
|
|
94
|
+
border-radius: 100%;
|
|
95
|
+
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
96
|
+
border-right-color: ${e=>e.primary||"#616161"};
|
|
97
|
+
animation: ${Wo} 1s linear infinite;
|
|
98
|
+
`,Ko=K`
|
|
99
|
+
from {
|
|
100
|
+
transform: scale(0) rotate(45deg);
|
|
101
|
+
opacity: 0;
|
|
102
|
+
}
|
|
103
|
+
to {
|
|
104
|
+
transform: scale(1) rotate(45deg);
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}`,Xo=K`
|
|
107
|
+
0% {
|
|
108
|
+
height: 0;
|
|
109
|
+
width: 0;
|
|
110
|
+
opacity: 0;
|
|
111
|
+
}
|
|
112
|
+
40% {
|
|
113
|
+
height: 0;
|
|
114
|
+
width: 6px;
|
|
115
|
+
opacity: 1;
|
|
116
|
+
}
|
|
117
|
+
100% {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
height: 10px;
|
|
120
|
+
}`,Go=ee("div")`
|
|
121
|
+
width: 20px;
|
|
122
|
+
opacity: 0;
|
|
123
|
+
height: 20px;
|
|
124
|
+
border-radius: 10px;
|
|
125
|
+
background: ${e=>e.primary||"#61d345"};
|
|
126
|
+
position: relative;
|
|
127
|
+
transform: rotate(45deg);
|
|
128
|
+
|
|
129
|
+
animation: ${Ko} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
130
|
+
forwards;
|
|
131
|
+
animation-delay: 100ms;
|
|
132
|
+
&:after {
|
|
133
|
+
content: '';
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
animation: ${Xo} 0.2s ease-out forwards;
|
|
136
|
+
opacity: 0;
|
|
137
|
+
animation-delay: 200ms;
|
|
138
|
+
position: absolute;
|
|
139
|
+
border-right: 2px solid;
|
|
140
|
+
border-bottom: 2px solid;
|
|
141
|
+
border-color: ${e=>e.secondary||"#fff"};
|
|
142
|
+
bottom: 6px;
|
|
143
|
+
left: 6px;
|
|
144
|
+
height: 10px;
|
|
145
|
+
width: 6px;
|
|
146
|
+
}
|
|
147
|
+
`,Zo=ee("div")`
|
|
148
|
+
position: absolute;
|
|
149
|
+
`,Qo=ee("div")`
|
|
150
|
+
position: relative;
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
align-items: center;
|
|
154
|
+
min-width: 20px;
|
|
155
|
+
min-height: 20px;
|
|
156
|
+
`,es=K`
|
|
157
|
+
from {
|
|
158
|
+
transform: scale(0.6);
|
|
159
|
+
opacity: 0.4;
|
|
160
|
+
}
|
|
161
|
+
to {
|
|
162
|
+
transform: scale(1);
|
|
163
|
+
opacity: 1;
|
|
164
|
+
}`,ts=ee("div")`
|
|
165
|
+
position: relative;
|
|
166
|
+
transform: scale(0.6);
|
|
167
|
+
opacity: 0.4;
|
|
168
|
+
min-width: 20px;
|
|
169
|
+
animation: ${es} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
170
|
+
forwards;
|
|
171
|
+
`,rs=({toast:e})=>{let{icon:t,type:r,iconTheme:n}=e;return t!==void 0?typeof t=="string"?D.createElement(ts,null,t):t:r==="blank"?null:D.createElement(Qo,null,D.createElement(Yo,{...n}),r!=="loading"&&D.createElement(Zo,null,r==="error"?D.createElement(Jo,{...n}):D.createElement(Go,{...n})))},ns=e=>`
|
|
172
|
+
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
173
|
+
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
174
|
+
`,os=e=>`
|
|
175
|
+
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
176
|
+
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
177
|
+
`,ss="0%{opacity:0;} 100%{opacity:1;}",is="0%{opacity:1;} 100%{opacity:0;}",as=ee("div")`
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
background: #fff;
|
|
181
|
+
color: #363636;
|
|
182
|
+
line-height: 1.3;
|
|
183
|
+
will-change: transform;
|
|
184
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
185
|
+
max-width: 350px;
|
|
186
|
+
pointer-events: auto;
|
|
187
|
+
padding: 8px 10px;
|
|
188
|
+
border-radius: 8px;
|
|
189
|
+
`,cs=ee("div")`
|
|
190
|
+
display: flex;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
margin: 4px 10px;
|
|
193
|
+
color: inherit;
|
|
194
|
+
flex: 1 1 auto;
|
|
195
|
+
white-space: pre-line;
|
|
196
|
+
`,ls=(e,t)=>{let r=e.includes("top")?1:-1,[n,o]=mr()?[ss,is]:[ns(r),os(r)];return{animation:t?`${K(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${K(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},us=D.memo(({toast:e,position:t,style:r,children:n})=>{let o=e.height?ls(e.position||t||"top-center",e.visible):{opacity:0},i=D.createElement(rs,{toast:e}),s=D.createElement(cs,{...e.ariaProps},Ie(e.message,e));return D.createElement(as,{className:e.className,style:{...o,...r,...e.style}},typeof n=="function"?n({icon:i,message:s}):D.createElement(D.Fragment,null,i,s))});Do(D.createElement);var fs=({id:e,className:t,style:r,onHeightUpdate:n,children:o})=>{let i=D.useCallback(s=>{if(s){let a=()=>{let f=s.getBoundingClientRect().height;n(e,f)};a(),new MutationObserver(a).observe(s,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return D.createElement("div",{ref:i,className:t,style:r},o)},ds=(e,t)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:mr()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(r?1:-1)}px)`,...n,...o}},ps=He`
|
|
197
|
+
z-index: 9999;
|
|
198
|
+
> * {
|
|
199
|
+
pointer-events: auto;
|
|
200
|
+
}
|
|
201
|
+
`,ke=16,ms=({reverseOrder:e,position:t="top-center",toastOptions:r,gutter:n,children:o,toasterId:i,containerStyle:s,containerClassName:a})=>{let{toasts:f,handlers:c}=zo(r,i);return D.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:ke,left:ke,right:ke,bottom:ke,pointerEvents:"none",...s},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},f.map(l=>{let p=l.position||t,b=c.calculateOffset(l,{reverseOrder:e,gutter:n,defaultPosition:t}),y=ds(p,b);return D.createElement(fs,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?ps:"",style:y},l.type==="custom"?Ie(l.message,l):o?o(l):D.createElement(us,{toast:l,position:p}))}))},ae=L;const hs="_toast_1s57i_1",me={toast:hs},ys=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},wr=()=>{const e=M.compilerRuntimeExports.c(1),t=gs;let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r={addNotification:t},e[0]=r):r=e[0],r};function gs(e,t){const r=Y.truncateText(e),n=ys(t),o=G.jsxs(G.Fragment,{children:[r,G.jsx(Z.MdOutlineClose,{onClick:()=>ae.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});e:switch(t){case"success":{ae(o,{id:r,duration:n,position:"top-center",icon:G.jsx(Z.MdOutlineCheck,{size:12}),className:M.classNames("luminus-toast-success rounded shadow bg-success",me.toast)});break e}case"danger":{ae(o,{id:r,duration:n,position:"top-center",icon:G.jsx(Z.MdOutlineError,{size:12}),className:M.classNames("luminus-toast-danger rounded shadow bg-danger",me.toast)});break e}case"warning":{ae(o,{id:r,duration:n,position:"top-center",icon:G.jsx(Z.MdOutlineBugReport,{size:12}),className:M.classNames("luminus-toast-warning rounded shadow bg-warning",me.toast)});break e}case"info":{ae(o,{id:r,duration:n,position:"top-center",icon:G.jsx(Z.MdOutlineQuestionMark,{size:12}),className:M.classNames("luminus-toast-info rounded shadow bg-info",me.toast)});break e}case"prompt":{ae(o,{id:r,duration:n,position:"top-center",icon:G.jsx(Z.MdOutlineTerminal,{size:12}),className:M.classNames("luminus-toast-prompt rounded shadow bg-light",me.toast)});break e}}}const bs=_.CancelToken,Er=e=>{const{authenticated:t=!0,differentBaseUrl:r,silent:n=!1,customToken:o,ignoreDelegation:i,noToastOnStatus:s}={...e},{language:a,axiosOptions:f,texts:{axios:c}}=C.useContext(Z.LuminusComponentsContext),{delegation:l}=C.useContext(xr),{getToken:p}=C.useContext(Je),b=C.useMemo(()=>(l==null?void 0:l.id)??null,[l==null?void 0:l.id]),{addNotification:y}=wr(),{isAuthenticating:d,isAuthenticated:h}=ut(),g=C.useRef(null),R=C.useRef(null),E=C.useMemo(()=>{const m=_.create(f);return m.interceptors.request.use(O=>g.current(O),O=>Promise.reject(O)),m.interceptors.response.use(O=>O,O=>R.current(O)),m},[f]),w=C.useCallback(async m=>{var P,N,k;if(t&&!m.headers.Authorization){if(d())return Promise.reject(new Error("Authentication in progress"));if(!h())return Promise.reject(new Error("Not authenticated"));const I=o?{token:o,expiresOn:Ft(new Date(Date.now()),1)}:await p();if(!I)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(It(I.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));m.headers.Authorization=`Bearer ${I.token}`}b!==null&&!i&&(m.headers.DelegationId=b.toString());const O=localStorage.getItem("search-use-asterisk")!=="false";return m.headers["Search-Use-Asterisk"]=O?"true":"false",(P=m.url)!=null&&P.includes("culture=")?m.url=(N=m.url)==null?void 0:N.replace(/culture=[a-z]{2}/,`culture=${a}`):m.url=`${m.url}${(k=m.url)!=null&&k.includes("?")?"&":"?"}culture=${a}`,m},[t,p,a,o,b,i,d,h]),S=C.useCallback(async m=>{if(_.isCancel(m)||m.message==="Authentication in progress"||m.message==="No bearer token"||m.message==="Token expired")return Promise.reject(m);if(!m.response)return m.message==="Network Error"?!n&&y(c.networkError,"danger"):!n&&y(c.unexpectedError,"danger"),Promise.reject(m);let O;if(m.response.data instanceof Blob?O=await Y.extractErrorsFromBlobResponse(m.response.data):O=Y.extractErrorsFromResponse(m.response.data),O.length>0){const N=O.find(k=>k.name.toLowerCase()==="others");return N?(!n&&y(N.errors,"danger"),Promise.reject(m)):(!n&&y(c.validationError,"warning"),Promise.reject(m))}const P=Y.extractPermissionsFromResponse(m);return P!==null?(!n&&y(`${c.permissionError}: ${Y.joinStrings(", ",...P)}`,"danger"),Promise.reject(m)):(s??[]).includes(m.response.status)?Promise.reject(m):m.response.status===403?(!n&&y(c.forbiddenError,"danger"),Promise.reject(m)):(!n&&y(c.unexpectedError,"danger"),Promise.reject(m))},[y,c.forbiddenError,c.networkError,c.permissionError,c.unexpectedError,c.validationError,n,s]);return g.current=w,R.current=S,C.useEffect(()=>{r&&(E.defaults.baseURL=r)},[r,E.defaults]),E};let he;const ws=()=>{const e=M.compilerRuntimeExports.c(15),{show:t,text:r,showConfirm:n,hideConfirm:o,textSm:i}=C.useContext(Mt);let s;e[0]!==o?(s=()=>{o()},e[0]=o,e[1]=s):s=e[1];const a=s;let f;e[2]!==a?(f=()=>{a(),he&&he(!0)},e[2]=a,e[3]=f):f=e[3];const c=f;let l;e[4]!==a?(l=()=>{a(),he&&he(!1)},e[4]=a,e[5]=l):l=e[5];const p=l;let b;e[6]!==n?(b=async(h,g)=>(n(h,g),new Promise(Es)),e[6]=n,e[7]=b):b=e[7];const y=b;let d;return e[8]!==y||e[9]!==p||e[10]!==c||e[11]!==t||e[12]!==r||e[13]!==i?(d={confirm:y,onConfirm:c,onCancel:p,show:t,text:r,textSm:i},e[8]=y,e[9]=p,e[10]=c,e[11]=t,e[12]=r,e[13]=i,e[14]=d):d=e[14],d};function Es(e){he=e}const Ss=(e,t)=>{const r=M.compilerRuntimeExports.c(6);let n,o;r[0]!==e?(n=()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),o=[e],r[0]=e,r[1]=n,r[2]=o):(n=r[1],o=r[2]),C.useEffect(n,o);let i,s;r[3]!==t?(i=()=>t===void 0?xs:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),s=[t],r[3]=t,r[4]=i,r[5]=s):(i=r[4],s=r[5]),C.useEffect(i,s)};function xs(){}const ce={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},Cs=(e,{loadOnInit:t=ce.loadOnInit,enabled:r=ce.enabled,silent:n=ce.silent,nullStateBeforeLoad:o=ce.nullStateBeforeLoad,nullStateOnFail:i=ce.nullStateOnFail,customApiUrl:s,customBearerToken:a,dataTransformer:f}=ce)=>{const c=Er({silent:n,customToken:a,differentBaseUrl:s}),[l,p]=C.useState(0),{startLoading:b,stopLoading:y}=C.useContext(Sr),d=C.useRef(0),{isAuthenticated:h}=ut(),[g,R]=C.useState(null),E=C.useRef(t??!1),w=C.useCallback(async(O,P)=>{if(!h()||r===!1)return null;p(k=>k+1),!n&&b(`loadData-${e}-${P}`),o&&R(null);let N;try{const k=await c.get(e,{signal:O}),I=f?f(k.data):k.data;R(I),N=I}catch(k){throw i&&R(null),k}finally{E.current=!1,p(k=>k-1),!n&&y(`loadData-${e}-${P}`)}return N},[h,r,n,b,e,o,c,f,i,y]),S=C.useCallback(async()=>{w()},[w]),m=C.useCallback(async()=>w(),[w]);return C.useEffect(()=>{if(t===!1)return;const O=new AbortController;return w(O.signal,++d.current),()=>{O.abort()}},[w,t]),{data:g,setData:R,reloadData:S,isLoading:E.current||l>0,reloadDataWithReturn:m}},Os=(e,t)=>{const r=M.compilerRuntimeExports.c(12);let n;r[0]!==t||r[1]!==e?(n=()=>{const b=localStorage.getItem(e);return b!=null&&b!=="undefined"?JSON.parse(b):t},r[0]=t,r[1]=e,r[2]=n):n=r[2];const o=n,[i,s]=C.useState(o);let a,f;r[3]!==e||r[4]!==i?(a=()=>{localStorage.setItem(e,JSON.stringify(i))},f=[e,i],r[3]=e,r[4]=i,r[5]=a,r[6]=f):(a=r[5],f=r[6]),C.useEffect(a,f);let c;r[7]!==o?(c=()=>{s(o)},r[7]=o,r[8]=c):c=r[8];const l=c;let p;return r[9]!==l||r[10]!==i?(p=[i,s,l],r[9]=l,r[10]=i,r[11]=p):p=r[11],p},Sr=C.createContext({isLoading:!1,startLoading:e=>{},stopLoading:e=>{}}),Je=C.createContext({useMsal:!1,msalInstance:null,msalScopes:[],msalExtraScopes:[],getToken:async()=>null,authState:"NO_AUTH"}),xr=C.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}});exports.AuthContext=Je;exports.ConfirmContext=Mt;exports.DelegationContext=xr;exports.Fe=ms;exports.LoadingContext=Sr;exports.PromptContext=Ut;exports.addMilliseconds=jt;exports.axios=_;exports.cancelToken=bs;exports.isPast=It;exports.useAuth=ut;exports.useAxios=Er;exports.useConfirm=ws;exports.useCookies=lt;exports.useGetApiData=Cs;exports.useKeyPress=Ss;exports.useLocalStorageState=Os;exports.useNotifications=wr;exports.usePrompt=kr;
|