@flarehr/salpac-finops-admin 1.0.13 → 1.0.14
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/var Q=typeof Symbol=="function"&&Symbol.for,en=Q?Symbol.for("react.element"):60103,tn=Q?Symbol.for("react.portal"):60106,Gt=Q?Symbol.for("react.fragment"):60107,Kt=Q?Symbol.for("react.strict_mode"):60108,Xt=Q?Symbol.for("react.profiler"):60114,Yt=Q?Symbol.for("react.provider"):60109,Zt=Q?Symbol.for("react.context"):60110,rn=Q?Symbol.for("react.async_mode"):60111,Qt=Q?Symbol.for("react.concurrent_mode"):60111,er=Q?Symbol.for("react.forward_ref"):60112,tr=Q?Symbol.for("react.suspense"):60113,Ea=Q?Symbol.for("react.suspense_list"):60120,rr=Q?Symbol.for("react.memo"):60115,nr=Q?Symbol.for("react.lazy"):60116,Ca=Q?Symbol.for("react.block"):60121,Aa=Q?Symbol.for("react.fundamental"):60117,Oa=Q?Symbol.for("react.responder"):60118,Ra=Q?Symbol.for("react.scope"):60119;function ue(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case en:switch(e=e.type,e){case rn:case Qt:case Gt:case Xt:case Kt:case tr:return e;default:switch(e=e&&e.$$typeof,e){case Zt:case er:case nr:case rr:case Yt:return e;default:return t}}case tn:return t}}}function Ai(e){return ue(e)===Qt}I.AsyncMode=rn;I.ConcurrentMode=Qt;I.ContextConsumer=Zt;I.ContextProvider=Yt;I.Element=en;I.ForwardRef=er;I.Fragment=Gt;I.Lazy=nr;I.Memo=rr;I.Portal=tn;I.Profiler=Xt;I.StrictMode=Kt;I.Suspense=tr;I.isAsyncMode=function(e){return Ai(e)||ue(e)===rn};I.isConcurrentMode=Ai;I.isContextConsumer=function(e){return ue(e)===Zt};I.isContextProvider=function(e){return ue(e)===Yt};I.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===en};I.isForwardRef=function(e){return ue(e)===er};I.isFragment=function(e){return ue(e)===Gt};I.isLazy=function(e){return ue(e)===nr};I.isMemo=function(e){return ue(e)===rr};I.isPortal=function(e){return ue(e)===tn};I.isProfiler=function(e){return ue(e)===Xt};I.isStrictMode=function(e){return ue(e)===Kt};I.isSuspense=function(e){return ue(e)===tr};I.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Gt||e===Qt||e===Xt||e===Kt||e===tr||e===Ea||typeof e=="object"&&e!==null&&(e.$$typeof===nr||e.$$typeof===rr||e.$$typeof===Yt||e.$$typeof===Zt||e.$$typeof===er||e.$$typeof===Aa||e.$$typeof===Oa||e.$$typeof===Ra||e.$$typeof===Ca)};I.typeOf=ue;Ci.exports=I;var Ta=Ci.exports,Oi=Ta,Pa={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Fa={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ri={};Ri[Oi.ForwardRef]=Pa;Ri[Oi.Memo]=Fa;var Na=!0;function Ti(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var nn=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Na===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},on=function(t,r,n){nn(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function $a(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Da={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},La=/[A-Z]|^ms/g,Va=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Pi=function(t){return t.charCodeAt(1)===45},no=function(t){return t!=null&&typeof t!="boolean"},mr=yi(function(e){return Pi(e)?e:e.replace(La,"-$&").toLowerCase()}),oo=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Va,function(n,o,i){return ve={name:o,styles:i,next:ve},o})}return Da[t]!==1&&!Pi(t)&&typeof r=="number"&&r!==0?r+"px":r};function lt(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return ve={name:r.name,styles:r.styles,next:ve},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)ve={name:n.name,styles:n.styles,next:ve},n=n.next;var o=r.styles+";";return o}return Ua(e,t,r)}case"function":{if(e!==void 0){var i=ve,s=r(e);return ve=i,lt(e,t,s)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function Ua(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=lt(e,t,r[o])+";";else for(var i in r){var s=r[i];if(typeof s!="object")t!=null&&t[s]!==void 0?n+=i+"{"+t[s]+"}":no(s)&&(n+=mr(i)+":"+oo(i,s)+";");else if(Array.isArray(s)&&typeof s[0]=="string"&&(t==null||t[s[0]]===void 0))for(var a=0;a<s.length;a++)no(s[a])&&(n+=mr(i)+":"+oo(i,s[a])+";");else{var l=lt(e,t,s);switch(i){case"animation":case"animationName":{n+=mr(i)+":"+l+";";break}default:n+=i+"{"+l+"}"}}}return n}var io=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ve,or=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,i="";ve=void 0;var s=t[0];s==null||s.raw===void 0?(o=!1,i+=lt(n,r,s)):i+=s[0];for(var a=1;a<t.length;a++)i+=lt(n,r,t[a]),o&&(i+=s[a]);io.lastIndex=0;for(var l="",f;(f=io.exec(i))!==null;)l+="-"+f[1];var d=$a(i)+l;return{name:d,styles:i,next:ve}},Ia=function(t){return t()},Fi=Qn["useInsertionEffect"]?Qn["useInsertionEffect"]:!1,Ni=Fi||Ia,so=Fi||Xe,sn={}.hasOwnProperty,$i=Ht(typeof HTMLElement<"u"?Ei({key:"css"}):null),Ma=$i.Provider,an=function(t){return jt(function(r,n){var o=Ye($i);return t(r,o,n)})},cn=Ht({}),$r="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ba=function(t,r){var n={};for(var o in r)sn.call(r,o)&&(n[o]=r[o]);return n[$r]=t,n},Ha=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return nn(r,n,o),Ni(function(){return on(r,n,o)}),null},za=an(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var o=e[$r],i=[n],s="";typeof e.className=="string"?s=Ti(t.registered,i,e.className):e.className!=null&&(s=e.className+" ");var a=or(i,void 0,Ye(cn));s+=t.key+"-"+a.name;var l={};for(var f in e)sn.call(e,f)&&f!=="css"&&f!==$r&&(l[f]=e[f]);return l.ref=r,l.className=s,W(ie,null,W(Ha,{cache:t,serialized:a,isStringTag:typeof o=="string"}),W(o,l))}),ja=za,V=function(t,r){var n=arguments;if(r==null||!sn.call(r,"css"))return W.apply(void 0,n);var o=n.length,i=new Array(o);i[0]=ja,i[1]=Ba(t,r);for(var s=2;s<o;s++)i[s]=n[s];return W.apply(null,i)},yr=an(function(e,t){var r=e.styles,n=or([r],void 0,Ye(cn)),o=Jr();return so(function(){var i=t.key+"-global",s=new t.sheet.constructor({key:i,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,l=document.querySelector('style[data-emotion="'+i+" "+n.name+'"]');return t.sheet.tags.length&&(s.before=t.sheet.tags[0]),l!==null&&(a=!0,l.setAttribute("data-emotion",i),s.hydrate([l])),o.current=[s,a],function(){s.flush()}},[t]),so(function(){var i=o.current,s=i[0],a=i[1];if(a){i[1]=!1;return}if(n.next!==void 0&&on(t,n.next,!0),s.tags.length){var l=s.tags[s.tags.length-1].nextElementSibling;s.before=l,s.flush()}t.insert("",n,s,!1)},[t,n.name]),null});function un(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return or(t)}var Wa=Xs,qa=function(t){return t!=="theme"},ao=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Wa:qa},co=function(t,r,n){var o;if(r){var i=r.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(s){return t.__emotion_forwardProp(s)&&i(s)}:i}return typeof o!="function"&&n&&(o=t.__emotion_forwardProp),o},Ja=function(t){var r=t.cache,n=t.serialized,o=t.isStringTag;return nn(r,n,o),Ni(function(){return on(r,n,o)}),null},ln=function e(t,r){var n=t.__emotion_real===t,o=n&&t.__emotion_base||t,i,s;r!==void 0&&(i=r.label,s=r.target);var a=co(t,r,n),l=a||ao(o),f=!l("as");return function(){var d=arguments,c=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&c.push("label:"+i+";"),d[0]==null||d[0].raw===void 0)c.push.apply(c,d);else{c.push(d[0][0]);for(var g=d.length,b=1;b<g;b++)c.push(d[b],d[0][b])}var p=an(function(y,T,k){var v=f&&y.as||o,R="",$=[],O=y;if(y.theme==null){O={};for(var z in y)O[z]=y[z];O.theme=Ye(cn)}typeof y.className=="string"?R=Ti(T.registered,$,y.className):y.className!=null&&(R=y.className+" ");var P=or(c.concat($),T.registered,O);R+=T.key+"-"+P.name,s!==void 0&&(R+=" "+s);var le=f&&a===void 0?ao(v):l,M={};for(var ee in y)f&&ee==="as"||le(ee)&&(M[ee]=y[ee]);return M.className=R,M.ref=k,W(ie,null,W(Ja,{cache:T,serialized:P,isStringTag:typeof v=="string"}),W(v,M))});return p.displayName=i!==void 0?i:"Styled("+(typeof o=="string"?o:o.displayName||o.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_styles=c,p.__emotion_forwardProp=a,Object.defineProperty(p,"toString",{value:function(){return"."+s}}),p.withComponent=function(y,T){return e(y,Tr({},r,T,{shouldForwardProp:co(p,T,!0)})).apply(void 0,c)},p}};const Ga=ln("div",{target:"e6o9g7s0"})("input[type='file']::-webkit-file-upload-button,input[type='file']::file-selector-button{",{cursor:"pointer",borderWidth:"0px",backgroundColor:"var(--fl-color-primary-600)",paddingTop:"0.625rem",paddingBottom:"0.625rem",paddingLeft:"2rem",paddingRight:"1rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))",":hover":{backgroundColor:"var(--fl-color-primary-700)"}},";margin-inline-start:-1rem;margin-inline-end:1rem;}"),Ka=jt(({onChange:e,error:t})=>{const r=n=>{const o=n.target;e(o.files&&o.files[0]||void 0)};return V(Ga,null,V("label",{css:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},for:"upload_file"},"Upload file"),V("input",{css:{display:"block",width:"100%",cursor:"pointer",borderRadius:"0.5rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity))","--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",":focus":{outlineColor:"var(--fl-color-primary-600)"}},"aria-describedby":"upload_file",id:"upload_file",type:"file",onChange:r}),V("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"}},t==null?void 0:t.message))});var _t=e=>e.type==="checkbox",je=e=>e instanceof Date,oe=e=>e==null;const Di=e=>typeof e=="object";var Z=e=>!oe(e)&&!Array.isArray(e)&&Di(e)&&!je(e),Li=e=>Z(e)&&e.target?_t(e.target)?e.target.checked:e.target.value:e,Xa=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vi=(e,t)=>e.has(Xa(t)),Ya=e=>{const t=e.constructor&&e.constructor.prototype;return Z(t)&&t.hasOwnProperty("isPrototypeOf")},fn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function he(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(fn&&(e instanceof Blob||e instanceof FileList))&&(r||Z(e)))if(t=r?[]:{},!r&&!Ya(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=he(e[n]));else return e;return t}var mt=e=>Array.isArray(e)?e.filter(Boolean):[],K=e=>e===void 0,S=(e,t,r)=>{if(!t||!Z(e))return r;const n=mt(t.split(/[,[\].]+?/)).reduce((o,i)=>oe(o)?o:o[i],e);return K(n)||n===e?K(e[t])?r:e[t]:n};const Dt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ee={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Za=j.createContext(null),dn=()=>j.useContext(Za);var Ui=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const s=i;return t._proxyFormState[s]!==_e.all&&(t._proxyFormState[s]=!n||_e.all),r&&(r[s]=!0),e[s]}});return o},de=e=>Z(e)&&!Object.keys(e).length,Ii=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return de(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(s=>t[s]===(!n||_e.all))},Et=e=>Array.isArray(e)?e:[e],Mi=(e,t,r)=>r&&t?e===t||Array.isArray(e)&&e.some(n=>n&&r&&n===t):!e||!t||e===t||Et(e).some(n=>n&&(n.startsWith(t)||t.startsWith(n)));function pn(e){const t=j.useRef(e);t.current=e,j.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function Qa(e){const t=dn(),{control:r=t.control,disabled:n,name:o,exact:i}=e||{},[s,a]=j.useState(r._formState),l=j.useRef(!0),f=j.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=j.useRef(o);return d.current=o,pn({disabled:n,next:c=>l.current&&Mi(d.current,c.name,i)&&Ii(c,f.current,r._updateFormState)&&a({...r._formState,...c}),subject:r._subjects.state}),j.useEffect(()=>(l.current=!0,f.current.isValid&&r._updateValid(!0),()=>{l.current=!1}),[r]),Ui(s,r,f.current,!1)}var we=e=>typeof e=="string",Bi=(e,t,r,n,o)=>we(e)?(n&&t.watch.add(e),S(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),S(r,i))):(n&&(t.watchAll=!0),r);function ec(e){const t=dn(),{control:r=t.control,name:n,defaultValue:o,disabled:i,exact:s}=e||{},a=j.useRef(n);a.current=n,pn({disabled:i,subject:r._subjects.values,next:d=>{Mi(a.current,d.name,s)&&f(he(Bi(a.current,r._names,d.values||r._formValues,!1,o)))}});const[l,f]=j.useState(r._getWatch(n,o));return j.useEffect(()=>r._removeUnmounted()),l}var hn=e=>/^\w*$/.test(e),Hi=e=>mt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function H(e,t,r){let n=-1;const o=hn(t)?[t]:Hi(t),i=o.length,s=i-1;for(;++n<i;){const a=o[n];let l=r;if(n!==s){const f=e[a];l=Z(f)||Array.isArray(f)?f:isNaN(+o[n+1])?{}:[]}e[a]=l,e=e[a]}return e}function tc(e){const t=dn(),{name:r,disabled:n,control:o=t.control,shouldUnregister:i}=e,s=Vi(o._names.array,r),a=ec({control:o,name:r,defaultValue:S(o._formValues,r,S(o._defaultValues,r,e.defaultValue)),exact:!0}),l=Qa({control:o,name:r}),f=j.useRef(o.register(r,{...e.rules,value:a}));return f.current=o.register(r,e.rules),j.useEffect(()=>{const d=o._options.shouldUnregister||i,c=(g,b)=>{const p=S(o._fields,g);p&&(p._f.mount=b)};if(c(r,!0),d){const g=he(S(o._options.defaultValues,r));H(o._defaultValues,r,g),K(S(o._formValues,r))&&H(o._formValues,r,g)}return()=>{(s?d&&!o._state.action:d)?o.unregister(r):c(r,!1)}},[r,o,s,i]),j.useEffect(()=>{o._updateDisabledField({disabled:n,fields:o._fields,name:r})},[n,r,o]),{field:{name:r,value:a,disabled:n,onChange:j.useCallback(d=>f.current.onChange({target:{value:Li(d),name:r},type:Dt.CHANGE}),[r]),onBlur:j.useCallback(()=>f.current.onBlur({target:{value:S(o._formValues,r),name:r},type:Dt.BLUR}),[r,o]),ref:d=>{const c=S(o._fields,r);c&&d&&(c._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:g=>d.setCustomValidity(g),reportValidity:()=>d.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!S(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!S(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!S(l.touchedFields,r)},error:{enumerable:!0,get:()=>S(l.errors,r)}})}}const rc=e=>e.render(tc(e));var nc=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{};const Dr=(e,t,r)=>{for(const n of r||Object.keys(e)){const o=S(e,n);if(o){const{_f:i,...s}=o;if(i&&t(i.name)){if(i.ref.focus){i.ref.focus();break}else if(i.refs&&i.refs[0].focus){i.refs[0].focus();break}}else Z(s)&&Dr(s,t)}}};var uo=e=>({isOnSubmit:!e||e===_e.onSubmit,isOnBlur:e===_e.onBlur,isOnChange:e===_e.onChange,isOnAll:e===_e.all,isOnTouch:e===_e.onTouched}),lo=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length)))),oc=(e,t,r)=>{const n=mt(S(e,r));return H(n,"root",t[r]),H(e,r,n),e},Ve=e=>typeof e=="boolean",_n=e=>e.type==="file",Fe=e=>typeof e=="function",Lt=e=>{if(!fn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ct=e=>we(e),mn=e=>e.type==="radio",Vt=e=>e instanceof RegExp;const fo={value:!1,isValid:!1},po={value:!0,isValid:!0};var zi=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!K(e[0].attributes.value)?K(e[0].value)||e[0].value===""?po:{value:e[0].value,isValid:!0}:po:fo}return fo};const ho={isValid:!1,value:null};var ji=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,ho):ho;function _o(e,t,r="validate"){if(Ct(e)||Array.isArray(e)&&e.every(Ct)||Ve(e)&&!e)return{type:r,message:Ct(e)?e:"",ref:t}}var He=e=>Z(e)&&!Vt(e)?e:{value:e,message:""},mo=async(e,t,r,n,o)=>{const{ref:i,refs:s,required:a,maxLength:l,minLength:f,min:d,max:c,pattern:g,validate:b,name:p,valueAsNumber:y,mount:T,disabled:k}=e._f,v=S(t,p);if(!T||k)return{};const R=s?s[0]:i,$=U=>{n&&R.reportValidity&&(R.setCustomValidity(Ve(U)?"":U||""),R.reportValidity())},O={},z=mn(i),P=_t(i),le=z||P,M=(y||_n(i))&&K(i.value)&&K(v)||Lt(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,ee=nc.bind(null,p,r,O),ke=(U,F,J,se=Ee.maxLength,fe=Ee.minLength)=>{const ge=U?F:J;O[p]={type:U?se:fe,message:ge,ref:i,...ee(U?se:fe,ge)}};if(o?!Array.isArray(v)||!v.length:a&&(!le&&(M||oe(v))||Ve(v)&&!v||P&&!zi(s).isValid||z&&!ji(s).isValid)){const{value:U,message:F}=Ct(a)?{value:!!a,message:a}:He(a);if(U&&(O[p]={type:Ee.required,message:F,ref:R,...ee(Ee.required,F)},!r))return $(F),O}if(!M&&(!oe(d)||!oe(c))){let U,F;const J=He(c),se=He(d);if(!oe(v)&&!isNaN(v)){const fe=i.valueAsNumber||v&&+v;oe(J.value)||(U=fe>J.value),oe(se.value)||(F=fe<se.value)}else{const fe=i.valueAsDate||new Date(v),ge=tt=>new Date(new Date().toDateString()+" "+tt),$e=i.type=="time",et=i.type=="week";we(J.value)&&v&&(U=$e?ge(v)>ge(J.value):et?v>J.value:fe>new Date(J.value)),we(se.value)&&v&&(F=$e?ge(v)<ge(se.value):et?v<se.value:fe<new Date(se.value))}if((U||F)&&(ke(!!U,J.message,se.message,Ee.max,Ee.min),!r))return $(O[p].message),O}if((l||f)&&!M&&(we(v)||o&&Array.isArray(v))){const U=He(l),F=He(f),J=!oe(U.value)&&v.length>+U.value,se=!oe(F.value)&&v.length<+F.value;if((J||se)&&(ke(J,U.message,F.message),!r))return $(O[p].message),O}if(g&&!M&&we(v)){const{value:U,message:F}=He(g);if(Vt(U)&&!v.match(U)&&(O[p]={type:Ee.pattern,message:F,ref:i,...ee(Ee.pattern,F)},!r))return $(F),O}if(b){if(Fe(b)){const U=await b(v,t),F=_o(U,R);if(F&&(O[p]={...F,...ee(Ee.validate,F.message)},!r))return $(F.message),O}else if(Z(b)){let U={};for(const F in b){if(!de(U)&&!r)break;const J=_o(await b[F](v,t),R,F);J&&(U={...J,...ee(F,J.message)},$(J.message),r&&(O[p]=U))}if(!de(U)&&(O[p]={ref:R,...U},!r))return O}}return $(!0),O};function ic(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=K(e)?n++:e[t[n++]];return e}function sc(e){for(const t in e)if(e.hasOwnProperty(t)&&!K(e[t]))return!1;return!0}function te(e,t){const r=Array.isArray(t)?t:hn(t)?[t]:Hi(t),n=r.length===1?e:ic(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(Z(n)&&de(n)||Array.isArray(n)&&sc(n))&&te(e,r.slice(0,-1)),e}function gr(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Ut=e=>oe(e)||!Di(e);function Ue(e,t){if(Ut(e)||Ut(t))return e===t;if(je(e)&&je(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const s=t[o];if(je(i)&&je(s)||Z(i)&&Z(s)||Array.isArray(i)&&Array.isArray(s)?!Ue(i,s):i!==s)return!1}}return!0}var Wi=e=>e.type==="select-multiple",ac=e=>mn(e)||_t(e),br=e=>Lt(e)&&e.isConnected,qi=e=>{for(const t in e)if(Fe(e[t]))return!0;return!1};function It(e,t={}){const r=Array.isArray(e);if(Z(e)||r)for(const n in e)Array.isArray(e[n])||Z(e[n])&&!qi(e[n])?(t[n]=Array.isArray(e[n])?[]:{},It(e[n],t[n])):oe(e[n])||(t[n]=!0);return t}function Ji(e,t,r){const n=Array.isArray(e);if(Z(e)||n)for(const o in e)Array.isArray(e[o])||Z(e[o])&&!qi(e[o])?K(t)||Ut(r[o])?r[o]=Array.isArray(e[o])?It(e[o],[]):{...It(e[o])}:Ji(e[o],oe(t)?{}:t[o],r[o]):r[o]=!Ue(e[o],t[o]);return r}var vr=(e,t)=>Ji(e,t,It(t)),Gi=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>K(e)?e:t?e===""?NaN:e&&+e:r&&we(e)?new Date(e):n?n(e):e;function wr(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return _n(t)?t.files:mn(t)?ji(e.refs).value:Wi(t)?[...t.selectedOptions].map(({value:r})=>r):_t(t)?zi(e.refs).value:Gi(K(t.value)?e.ref.value:t.value,e)}var cc=(e,t,r,n)=>{const o={};for(const i of e){const s=S(t,i);s&&H(o,i,s._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},nt=e=>K(e)?e:Vt(e)?e.source:Z(e)?Vt(e.value)?e.value.source:e.value:e,uc=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function yo(e,t,r){const n=S(e,r);if(n||hn(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),s=S(t,i),a=S(e,i);if(s&&!Array.isArray(s)&&r!==i)return{name:r};if(a&&a.type)return{name:i,error:a};o.pop()}return{name:r}}var lc=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,fc=(e,t)=>!mt(S(e,t)).length&&te(e,t);const dc={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function pc(e={},t){let r={...dc,...e},n={submitCount:0,isDirty:!1,isLoading:Fe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},i=Z(r.defaultValues)||Z(r.values)?he(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:he(i),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},f,d=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:gr(),array:gr(),state:gr()},b=e.resetOptions&&e.resetOptions.keepDirtyValues,p=uo(r.mode),y=uo(r.reValidateMode),T=r.criteriaMode===_e.all,k=u=>h=>{clearTimeout(d),d=setTimeout(u,h)},v=async u=>{if(c.isValid||u){const h=r.resolver?de((await M()).errors):await ke(o,!0);h!==n.isValid&&g.state.next({isValid:h})}},R=u=>c.isValidating&&g.state.next({isValidating:u}),$=(u,h=[],m,E,x=!0,w=!0)=>{if(E&&m){if(a.action=!0,w&&Array.isArray(S(o,u))){const A=m(S(o,u),E.argA,E.argB);x&&H(o,u,A)}if(w&&Array.isArray(S(n.errors,u))){const A=m(S(n.errors,u),E.argA,E.argB);x&&H(n.errors,u,A),fc(n.errors,u)}if(c.touchedFields&&w&&Array.isArray(S(n.touchedFields,u))){const A=m(S(n.touchedFields,u),E.argA,E.argB);x&&H(n.touchedFields,u,A)}c.dirtyFields&&(n.dirtyFields=vr(i,s)),g.state.next({name:u,isDirty:F(u,h),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else H(s,u,h)},O=(u,h)=>{H(n.errors,u,h),g.state.next({errors:n.errors})},z=(u,h,m,E)=>{const x=S(o,u);if(x){const w=S(s,u,K(m)?S(i,u):m);K(w)||E&&E.defaultChecked||h?H(s,u,h?w:wr(x._f)):fe(u,w),a.mount&&v()}},P=(u,h,m,E,x)=>{let w=!1,A=!1;const q={name:u};if(!m||E){c.isDirty&&(A=n.isDirty,n.isDirty=q.isDirty=F(),w=A!==q.isDirty);const G=Ue(S(i,u),h);A=S(n.dirtyFields,u),G?te(n.dirtyFields,u):H(n.dirtyFields,u,!0),q.dirtyFields=n.dirtyFields,w=w||c.dirtyFields&&A!==!G}if(m){const G=S(n.touchedFields,u);G||(H(n.touchedFields,u,m),q.touchedFields=n.touchedFields,w=w||c.touchedFields&&G!==m)}return w&&x&&g.state.next(q),w?q:{}},le=(u,h,m,E)=>{const x=S(n.errors,u),w=c.isValid&&Ve(h)&&n.isValid!==h;if(e.delayError&&m?(f=k(()=>O(u,m)),f(e.delayError)):(clearTimeout(d),f=null,m?H(n.errors,u,m):te(n.errors,u)),(m?!Ue(x,m):x)||!de(E)||w){const A={...E,...w&&Ve(h)?{isValid:h}:{},errors:n.errors,name:u};n={...n,...A},g.state.next(A)}R(!1)},M=async u=>r.resolver(s,r.context,cc(u||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),ee=async u=>{const{errors:h}=await M(u);if(u)for(const m of u){const E=S(h,m);E?H(n.errors,m,E):te(n.errors,m)}else n.errors=h;return h},ke=async(u,h,m={valid:!0})=>{for(const E in u){const x=u[E];if(x){const{_f:w,...A}=x;if(w){const q=l.array.has(w.name),G=await mo(x,s,T,r.shouldUseNativeValidation&&!h,q);if(G[w.name]&&(m.valid=!1,h))break;!h&&(S(G,w.name)?q?oc(n.errors,G,w.name):H(n.errors,w.name,G[w.name]):te(n.errors,w.name))}A&&await ke(A,h,m)}}return m.valid},U=()=>{for(const u of l.unMount){const h=S(o,u);h&&(h._f.refs?h._f.refs.every(m=>!br(m)):!br(h._f.ref))&&lr(u)}l.unMount=new Set},F=(u,h)=>(u&&h&&H(s,u,h),!Ue(Sn(),i)),J=(u,h,m)=>Bi(u,l,{...a.mount?s:K(h)?i:we(u)?{[u]:h}:h},m,h),se=u=>mt(S(a.mount?s:i,u,e.shouldUnregister?S(i,u,[]):[])),fe=(u,h,m={})=>{const E=S(o,u);let x=h;if(E){const w=E._f;w&&(!w.disabled&&H(s,u,Gi(h,w)),x=Lt(w.ref)&&oe(h)?"":h,Wi(w.ref)?[...w.ref.options].forEach(A=>A.selected=x.includes(A.value)):w.refs?_t(w.ref)?w.refs.length>1?w.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray(x)?!!x.find(q=>q===A.value):x===A.value)):w.refs[0]&&(w.refs[0].checked=!!x):w.refs.forEach(A=>A.checked=A.value===x):_n(w.ref)?w.ref.value="":(w.ref.value=x,w.ref.type||g.values.next({name:u,values:{...s}})))}(m.shouldDirty||m.shouldTouch)&&P(u,x,m.shouldTouch,m.shouldDirty,!0),m.shouldValidate&&tt(u)},ge=(u,h,m)=>{for(const E in h){const x=h[E],w=`${u}.${E}`,A=S(o,w);(l.array.has(u)||!Ut(x)||A&&!A._f)&&!je(x)?ge(w,x,m):fe(w,x,m)}},$e=(u,h,m={})=>{const E=S(o,u),x=l.array.has(u),w=he(h);H(s,u,w),x?(g.array.next({name:u,values:{...s}}),(c.isDirty||c.dirtyFields)&&m.shouldDirty&&g.state.next({name:u,dirtyFields:vr(i,s),isDirty:F(u,w)})):E&&!E._f&&!oe(w)?ge(u,w,m):fe(u,w,m),lo(u,l)&&g.state.next({...n}),g.values.next({name:u,values:{...s}}),!a.mount&&t()},et=async u=>{const h=u.target;let m=h.name,E=!0;const x=S(o,m),w=()=>h.type?wr(x._f):Li(u);if(x){let A,q;const G=w(),Be=u.type===Dt.BLUR||u.type===Dt.FOCUS_OUT,bs=!uc(x._f)&&!r.resolver&&!S(n.errors,m)&&!x._f.deps||lc(Be,S(n.touchedFields,m),n.isSubmitted,y,p),dr=lo(m,l,Be);H(s,m,G),Be?(x._f.onBlur&&x._f.onBlur(u),f&&f(0)):x._f.onChange&&x._f.onChange(u);const pr=P(m,G,Be,!1),vs=!de(pr)||dr;if(!Be&&g.values.next({name:m,type:u.type,values:{...s}}),bs)return c.isValid&&v(),vs&&g.state.next({name:m,...dr?{}:pr});if(!Be&&dr&&g.state.next({...n}),R(!0),r.resolver){const{errors:Pn}=await M([m]),ws=yo(n.errors,o,m),Fn=yo(Pn,o,ws.name||m);A=Fn.error,m=Fn.name,q=de(Pn)}else A=(await mo(x,s,T,r.shouldUseNativeValidation))[m],E=isNaN(G)||G===S(s,m,G),E&&(A?q=!1:c.isValid&&(q=await ke(o,!0)));E&&(x._f.deps&&tt(x._f.deps),le(m,q,A,pr))}},tt=async(u,h={})=>{let m,E;const x=Et(u);if(R(!0),r.resolver){const w=await ee(K(u)?u:x);m=de(w),E=u?!x.some(A=>S(w,A)):m}else u?(E=(await Promise.all(x.map(async w=>{const A=S(o,w);return await ke(A&&A._f?{[w]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&v()):E=m=await ke(o);return g.state.next({...!we(u)||c.isValid&&m!==n.isValid?{}:{name:u},...r.resolver||!u?{isValid:m}:{},errors:n.errors,isValidating:!1}),h.shouldFocus&&!E&&Dr(o,w=>w&&S(n.errors,w),u?x:l.mount),E},Sn=u=>{const h={...i,...a.mount?s:{}};return K(u)?h:we(u)?S(h,u):u.map(m=>S(h,m))},kn=(u,h)=>({invalid:!!S((h||n).errors,u),isDirty:!!S((h||n).dirtyFields,u),isTouched:!!S((h||n).touchedFields,u),error:S((h||n).errors,u)}),ms=u=>{u&&Et(u).forEach(h=>te(n.errors,h)),g.state.next({errors:u?n.errors:{}})},En=(u,h,m)=>{const E=(S(o,u,{_f:{}})._f||{}).ref;H(n.errors,u,{...h,ref:E}),g.state.next({name:u,errors:n.errors,isValid:!1}),m&&m.shouldFocus&&E&&E.focus&&E.focus()},ys=(u,h)=>Fe(u)?g.values.subscribe({next:m=>u(J(void 0,h),m)}):J(u,h,!0),lr=(u,h={})=>{for(const m of u?Et(u):l.mount)l.mount.delete(m),l.array.delete(m),h.keepValue||(te(o,m),te(s,m)),!h.keepError&&te(n.errors,m),!h.keepDirty&&te(n.dirtyFields,m),!h.keepTouched&&te(n.touchedFields,m),!r.shouldUnregister&&!h.keepDefaultValue&&te(i,m);g.values.next({values:{...s}}),g.state.next({...n,...h.keepDirty?{isDirty:F()}:{}}),!h.keepIsValid&&v()},Cn=({disabled:u,name:h,field:m,fields:E})=>{if(Ve(u)){const x=u?void 0:S(s,h,wr(m?m._f:S(E,h)._f));H(s,h,x),P(h,x,!1,!1,!0)}},fr=(u,h={})=>{let m=S(o,u);const E=Ve(h.disabled);return H(o,u,{...m||{},_f:{...m&&m._f?m._f:{ref:{name:u}},name:u,mount:!0,...h}}),l.mount.add(u),m?Cn({field:m,disabled:h.disabled,name:u}):z(u,!0,h.value),{...E?{disabled:h.disabled}:{},...r.progressive?{required:!!h.required,min:nt(h.min),max:nt(h.max),minLength:nt(h.minLength),maxLength:nt(h.maxLength),pattern:nt(h.pattern)}:{},name:u,onChange:et,onBlur:et,ref:x=>{if(x){fr(u,h),m=S(o,u);const w=K(x.value)&&x.querySelectorAll&&x.querySelectorAll("input,select,textarea")[0]||x,A=ac(w),q=m._f.refs||[];if(A?q.find(G=>G===w):w===m._f.ref)return;H(o,u,{_f:{...m._f,...A?{refs:[...q.filter(br),w,...Array.isArray(S(i,u))?[{}]:[]],ref:{type:w.type,name:u}}:{ref:w}}}),z(u,!1,void 0,w)}else m=S(o,u,{}),m._f&&(m._f.mount=!1),(r.shouldUnregister||h.shouldUnregister)&&!(Vi(l.array,u)&&a.action)&&l.unMount.add(u)}}},An=()=>r.shouldFocusError&&Dr(o,u=>u&&S(n.errors,u),l.mount),On=(u,h)=>async m=>{m&&(m.preventDefault&&m.preventDefault(),m.persist&&m.persist());let E=he(s);if(g.state.next({isSubmitting:!0}),r.resolver){const{errors:x,values:w}=await M();n.errors=x,E=w}else await ke(o);te(n.errors,"root"),de(n.errors)?(g.state.next({errors:{}}),await u(E,m)):(h&&await h({...n.errors},m),An(),setTimeout(An)),g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:de(n.errors),submitCount:n.submitCount+1,errors:n.errors})},gs=(u,h={})=>{S(o,u)&&(K(h.defaultValue)?$e(u,S(i,u)):($e(u,h.defaultValue),H(i,u,h.defaultValue)),h.keepTouched||te(n.touchedFields,u),h.keepDirty||(te(n.dirtyFields,u),n.isDirty=h.defaultValue?F(u,S(i,u)):F()),h.keepError||(te(n.errors,u),c.isValid&&v()),g.state.next({...n}))},Rn=(u,h={})=>{const m=u?he(u):i,E=he(m),x=u&&!de(u)?E:i;if(h.keepDefaultValues||(i=m),!h.keepValues){if(h.keepDirtyValues||b)for(const w of l.mount)S(n.dirtyFields,w)?H(x,w,S(s,w)):$e(w,S(x,w));else{if(fn&&K(u))for(const w of l.mount){const A=S(o,w);if(A&&A._f){const q=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Lt(q)){const G=q.closest("form");if(G){G.reset();break}}}}o={}}s=e.shouldUnregister?h.keepDefaultValues?he(i):{}:he(x),g.array.next({values:{...x}}),g.values.next({values:{...x}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!h.keepIsValid,a.watch=!!e.shouldUnregister,g.state.next({submitCount:h.keepSubmitCount?n.submitCount:0,isDirty:h.keepDirty?n.isDirty:!!(h.keepDefaultValues&&!Ue(u,i)),isSubmitted:h.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:h.keepDirtyValues?n.dirtyFields:h.keepDefaultValues&&u?vr(i,u):{},touchedFields:h.keepTouched?n.touchedFields:{},errors:h.keepErrors?n.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},Tn=(u,h)=>Rn(Fe(u)?u(s):u,h);return{control:{register:fr,unregister:lr,getFieldState:kn,handleSubmit:On,setError:En,_executeSchema:M,_getWatch:J,_getDirty:F,_updateValid:v,_removeUnmounted:U,_updateFieldArray:$,_updateDisabledField:Cn,_getFieldArray:se,_reset:Rn,_resetDefaultValues:()=>Fe(r.defaultValues)&&r.defaultValues().then(u=>{Tn(u,r.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:u=>{n={...n,...u}},_subjects:g,_proxyFormState:c,get _fields(){return o},get _formValues(){return s},get _state(){return a},set _state(u){a=u},get _defaultValues(){return i},get _names(){return l},set _names(u){l=u},get _formState(){return n},set _formState(u){n=u},get _options(){return r},set _options(u){r={...r,...u}}},trigger:tt,register:fr,handleSubmit:On,watch:ys,setValue:$e,getValues:Sn,reset:Tn,resetField:gs,clearErrors:ms,unregister:lr,setError:En,setFocus:(u,h={})=>{const m=S(o,u),E=m&&m._f;if(E){const x=E.refs?E.refs[0]:E.ref;x.focus&&(x.focus(),h.shouldSelect&&x.select())}},getFieldState:kn}}function hc(e={}){const t=j.useRef(),r=j.useRef(),[n,o]=j.useState({isDirty:!1,isValidating:!1,isLoading:Fe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Fe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...pc(e,()=>o(s=>({...s}))),formState:n});const i=t.current.control;return i._options=e,pn({subject:i._subjects.state,next:s=>{Ii(s,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),j.useEffect(()=>{e.values&&!Ue(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),j.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Ui(n,i),t.current}function Ki(e,t){return function(){return e.apply(t,arguments)}}const{toString:_c}=Object.prototype,{getPrototypeOf:yn}=Object,ir=(e=>t=>{const r=_c.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Se=e=>(e=e.toLowerCase(),t=>ir(t)===e),sr=e=>t=>typeof t===e,{isArray:Qe}=Array,ft=sr("undefined");function mc(e){return e!==null&&!ft(e)&&e.constructor!==null&&!ft(e.constructor)&&pe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Xi=Se("ArrayBuffer");function yc(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Xi(e.buffer),t}const gc=sr("string"),pe=sr("function"),Yi=sr("number"),ar=e=>e!==null&&typeof e=="object",bc=e=>e===!0||e===!1,At=e=>{if(ir(e)!=="object")return!1;const t=yn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},vc=Se("Date"),wc=Se("File"),xc=Se("Blob"),Sc=Se("FileList"),kc=e=>ar(e)&&pe(e.pipe),Ec=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pe(e.append)&&((t=ir(e))==="formdata"||t==="object"&&pe(e.toString)&&e.toString()==="[object FormData]"))},Cc=Se("URLSearchParams"),Ac=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function yt(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Qe(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{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 Zi(e,t){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 Qi=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),es=e=>!ft(e)&&e!==Qi;function Lr(){const{caseless:e}=es(this)&&this||{},t={},r=(n,o)=>{const i=e&&Zi(t,o)||o;At(t[i])&&At(n)?t[i]=Lr(t[i],n):At(n)?t[i]=Lr({},n):Qe(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&yt(arguments[n],r);return t}const Oc=(e,t,r,{allOwnKeys:n}={})=>(yt(t,(o,i)=>{r&&pe(o)?e[i]=Ki(o,r):e[i]=o},{allOwnKeys:n}),e),Rc=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Tc=(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)},Pc=(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&&yn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Fc=(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},Nc=e=>{if(!e)return null;if(Qe(e))return e;let t=e.length;if(!Yi(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},$c=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&yn(Uint8Array)),Dc=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Lc=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Vc=Se("HTMLFormElement"),Uc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),go=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Ic=Se("RegExp"),ts=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};yt(r,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(n[i]=s||o)}),Object.defineProperties(e,n)},Mc=e=>{ts(e,(t,r)=>{if(pe(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(pe(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+"'")})}})},Bc=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Qe(e)?n(e):n(String(e).split(t)),r},Hc=()=>{},zc=(e,t)=>(e=+e,Number.isFinite(e)?e:t),xr="abcdefghijklmnopqrstuvwxyz",bo="0123456789",rs={DIGIT:bo,ALPHA:xr,ALPHA_DIGIT:xr+xr.toUpperCase()+bo},jc=(e=16,t=rs.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function Wc(e){return!!(e&&pe(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const qc=e=>{const t=new Array(10),r=(n,o)=>{if(ar(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Qe(n)?[]:{};return yt(n,(s,a)=>{const l=r(s,o+1);!ft(l)&&(i[a]=l)}),t[o]=void 0,i}}return n};return r(e,0)},Jc=Se("AsyncFunction"),Gc=e=>e&&(ar(e)||pe(e))&&pe(e.then)&&pe(e.catch),_={isArray:Qe,isArrayBuffer:Xi,isBuffer:mc,isFormData:Ec,isArrayBufferView:yc,isString:gc,isNumber:Yi,isBoolean:bc,isObject:ar,isPlainObject:At,isUndefined:ft,isDate:vc,isFile:wc,isBlob:xc,isRegExp:Ic,isFunction:pe,isStream:kc,isURLSearchParams:Cc,isTypedArray:$c,isFileList:Sc,forEach:yt,merge:Lr,extend:Oc,trim:Ac,stripBOM:Rc,inherits:Tc,toFlatObject:Pc,kindOf:ir,kindOfTest:Se,endsWith:Fc,toArray:Nc,forEachEntry:Dc,matchAll:Lc,isHTMLForm:Vc,hasOwnProperty:go,hasOwnProp:go,reduceDescriptors:ts,freezeMethods:Mc,toObjectSet:Bc,toCamelCase:Uc,noop:Hc,toFiniteNumber:zc,findKey:Zi,global:Qi,isContextDefined:es,ALPHABET:rs,generateString:jc,isSpecCompliantForm:Wc,toJSONObject:qc,isAsyncFn:Jc,isThenable:Gc};function N(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)}_.inherits(N,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:_.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ns=N.prototype,os={};["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=>{os[e]={value:e}});Object.defineProperties(N,os);Object.defineProperty(ns,"isAxiosError",{value:!0});N.from=(e,t,r,n,o,i)=>{const s=Object.create(ns);return _.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),N.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Kc=null;function Vr(e){return _.isPlainObject(e)||_.isArray(e)}function is(e){return _.endsWith(e,"[]")?e.slice(0,-2):e}function vo(e,t,r){return e?e.concat(t).map(function(o,i){return o=is(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Xc(e){return _.isArray(e)&&!e.some(Vr)}const Yc=_.toFlatObject(_,{},null,function(t){return/^is[A-Z]/.test(t)});function cr(e,t,r){if(!_.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=_.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,T){return!_.isUndefined(T[y])});const n=r.metaTokens,o=r.visitor||d,i=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(t);if(!_.isFunction(o))throw new TypeError("visitor must be a function");function f(p){if(p===null)return"";if(_.isDate(p))return p.toISOString();if(!l&&_.isBlob(p))throw new N("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(p)||_.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,y,T){let k=p;if(p&&!T&&typeof p=="object"){if(_.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(_.isArray(p)&&Xc(p)||(_.isFileList(p)||_.endsWith(y,"[]"))&&(k=_.toArray(p)))return y=is(y),k.forEach(function(R,$){!(_.isUndefined(R)||R===null)&&t.append(s===!0?vo([y],$,i):s===null?y:y+"[]",f(R))}),!1}return Vr(p)?!0:(t.append(vo(T,y,i),f(p)),!1)}const c=[],g=Object.assign(Yc,{defaultVisitor:d,convertValue:f,isVisitable:Vr});function b(p,y){if(!_.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));c.push(p),_.forEach(p,function(k,v){(!(_.isUndefined(k)||k===null)&&o.call(t,k,_.isString(v)?v.trim():v,y,g))===!0&&b(k,y?y.concat(v):[v])}),c.pop()}}if(!_.isObject(e))throw new TypeError("data must be an object");return b(e),t}function wo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function gn(e,t){this._pairs=[],e&&cr(e,this,t)}const ss=gn.prototype;ss.append=function(t,r){this._pairs.push([t,r])};ss.toString=function(t){const r=t?function(n){return t.call(this,n,wo)}:wo;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Zc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function as(e,t,r){if(!t)return e;const n=r&&r.encode||Zc,o=r&&r.serialize;let i;if(o?i=o(t,r):i=_.isURLSearchParams(t)?t.toString():new gn(t,r).toString(n),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Qc{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){_.forEach(this.handlers,function(n){n!==null&&t(n)})}}const xo=Qc,cs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},eu=typeof URLSearchParams<"u"?URLSearchParams:gn,tu=typeof FormData<"u"?FormData:null,ru=typeof Blob<"u"?Blob:null,nu=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),ou=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),me={isBrowser:!0,classes:{URLSearchParams:eu,FormData:tu,Blob:ru},isStandardBrowserEnv:nu,isStandardBrowserWebWorkerEnv:ou,protocols:["http","https","file","blob","url","data"]};function iu(e,t){return cr(e,new me.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return me.isNode&&_.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function su(e){return _.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function au(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 us(e){function t(r,n,o,i){let s=r[i++];const a=Number.isFinite(+s),l=i>=r.length;return s=!s&&_.isArray(o)?o.length:s,l?(_.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!_.isObject(o[s]))&&(o[s]=[]),t(r,n,o[s],i)&&_.isArray(o[s])&&(o[s]=au(o[s])),!a)}if(_.isFormData(e)&&_.isFunction(e.entries)){const r={};return _.forEachEntry(e,(n,o)=>{t(su(n),o,r,0)}),r}return null}function cu(e,t,r){if(_.isString(e))try{return(t||JSON.parse)(e),_.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const bn={transitional:cs,adapter:me.isNode?"http":"xhr",transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=_.isObject(t);if(i&&_.isHTMLForm(t)&&(t=new FormData(t)),_.isFormData(t))return o&&o?JSON.stringify(us(t)):t;if(_.isArrayBuffer(t)||_.isBuffer(t)||_.isStream(t)||_.isFile(t)||_.isBlob(t))return t;if(_.isArrayBufferView(t))return t.buffer;if(_.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 iu(t,this.formSerializer).toString();if((a=_.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return cr(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),cu(t)):t}],transformResponse:[function(t){const r=this.transitional||bn.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&_.isString(t)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?N.from(a,N.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:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],e=>{bn.headers[e]={}});const vn=bn,uu=_.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"]),lu=e=>{const t={};let r,n,o;return e&&e.split(`
|
|
9
9
|
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||t[r]&&uu[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},So=Symbol("internals");function ot(e){return e&&String(e).trim().toLowerCase()}function Ot(e){return e===!1||e==null?e:_.isArray(e)?e.map(Ot):String(e)}function fu(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 du=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Sr(e,t,r,n,o){if(_.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!_.isString(t)){if(_.isString(n))return t.indexOf(n)!==-1;if(_.isRegExp(n))return n.test(t)}}function pu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function hu(e,t){const r=_.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})})}class ur{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(a,l,f){const d=ot(l);if(!d)throw new Error("header name must be a non-empty string");const c=_.findKey(o,d);(!c||o[c]===void 0||f===!0||f===void 0&&o[c]!==!1)&&(o[c||l]=Ot(a))}const s=(a,l)=>_.forEach(a,(f,d)=>i(f,d,l));return _.isPlainObject(t)||t instanceof this.constructor?s(t,r):_.isString(t)&&(t=t.trim())&&!du(t)?s(lu(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=ot(t),t){const n=_.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return fu(o);if(_.isFunction(r))return r.call(this,o,n);if(_.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ot(t),t){const n=_.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Sr(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(s){if(s=ot(s),s){const a=_.findKey(n,s);a&&(!r||Sr(n,n[a],a,r))&&(delete n[a],o=!0)}}return _.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||Sr(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return _.forEach(this,(o,i)=>{const s=_.findKey(n,i);if(s){r[s]=Ot(o),delete r[i];return}const a=t?pu(i):String(i).trim();a!==i&&delete r[i],r[a]=Ot(o),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return _.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&_.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(`
|
|
10
|
-
`)}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[So]=this[So]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ot(s);n[a]||(hu(o,s),n[a]=!0)}return _.isArray(t)?t.forEach(i):i(t),this}}ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(ur.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});_.freezeMethods(ur);const Re=ur;function kr(e,t){const r=this||vn,n=t||r,o=Re.from(n.headers);let i=n.data;return _.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ls(e){return!!(e&&e.__CANCEL__)}function gt(e,t,r){N.call(this,e??"canceled",N.ERR_CANCELED,t,r),this.name="CanceledError"}_.inherits(gt,N,{__CANCEL__:!0});function _u(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new N("Request failed with status code "+r.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const mu=me.isStandardBrowserEnv?function(){return{write:function(r,n,o,i,s,a){const l=[];l.push(r+"="+encodeURIComponent(n)),_.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),_.isString(i)&&l.push("path="+i),_.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function yu(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gu(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function fs(e,t){return e&&!yu(t)?gu(e,t):t}const bu=me.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let s=i;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(s){const a=_.isString(s)?o(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function vu(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function wu(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(l){const f=Date.now(),d=n[i];s||(s=f),r[o]=l,n[o]=f;let c=i,g=0;for(;c!==o;)g+=r[c++],c=c%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),f-s<t)return;const b=d&&f-d;return b?Math.round(g*1e3/b):void 0}}function ko(e,t){let r=0;const n=wu(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,l=n(a),f=i<=s;r=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&f?(s-i)/l:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const xu=typeof XMLHttpRequest<"u",Su=xu&&function(e){return new Promise(function(r,n){let o=e.data;const i=Re.from(e.headers).normalize(),s=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}_.isFormData(o)&&(me.isStandardBrowserEnv||me.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let f=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(b+":"+p))}const d=fs(e.baseURL,e.url);f.open(e.method.toUpperCase(),as(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function c(){if(!f)return;const b=Re.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),y={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};_u(function(k){r(k),l()},function(k){n(k),l()},y),f=null}if("onloadend"in f?f.onloadend=c:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(c)},f.onabort=function(){f&&(n(new N("Request aborted",N.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new N("Network Error",N.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||cs;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),n(new N(p,y.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,f)),f=null},me.isStandardBrowserEnv){const b=(e.withCredentials||bu(d))&&e.xsrfCookieName&&mu.read(e.xsrfCookieName);b&&i.set(e.xsrfHeaderName,b)}o===void 0&&i.setContentType(null),"setRequestHeader"in f&&_.forEach(i.toJSON(),function(p,y){f.setRequestHeader(y,p)}),_.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),s&&s!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",ko(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",ko(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=b=>{f&&(n(!b||b.type?new gt(null,e,f):b),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const g=vu(d);if(g&&me.protocols.indexOf(g)===-1){n(new N("Unsupported protocol "+g+":",N.ERR_BAD_REQUEST,e));return}f.send(o||null)})},Rt={http:Kc,xhr:Su};_.forEach(Rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ds={getAdapter:e=>{e=_.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=_.isString(r)?Rt[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new N(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(_.hasOwnProp(Rt,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!_.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Rt};function Er(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gt(null,e)}function Eo(e){return Er(e),e.headers=Re.from(e.headers),e.data=kr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ds.getAdapter(e.adapter||vn.adapter)(e).then(function(n){return Er(e),n.data=kr.call(e,e.transformResponse,n),n.headers=Re.from(n.headers),n},function(n){return ls(n)||(Er(e),n&&n.response&&(n.response.data=kr.call(e,e.transformResponse,n.response),n.response.headers=Re.from(n.response.headers))),Promise.reject(n)})}const Co=e=>e instanceof Re?e.toJSON():e;function Ke(e,t){t=t||{};const r={};function n(f,d,c){return _.isPlainObject(f)&&_.isPlainObject(d)?_.merge.call({caseless:c},f,d):_.isPlainObject(d)?_.merge({},d):_.isArray(d)?d.slice():d}function o(f,d,c){if(_.isUndefined(d)){if(!_.isUndefined(f))return n(void 0,f,c)}else return n(f,d,c)}function i(f,d){if(!_.isUndefined(d))return n(void 0,d)}function s(f,d){if(_.isUndefined(d)){if(!_.isUndefined(f))return n(void 0,f)}else return n(void 0,d)}function a(f,d,c){if(c in t)return n(f,d);if(c in e)return n(void 0,f)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials: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:(f,d)=>o(Co(f),Co(d),!0)};return _.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=l[d]||o,g=c(e[d],t[d],d);_.isUndefined(g)&&c!==a||(r[d]=g)}),r}const ps="1.5.0",wn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ao={};wn.transitional=function(t,r,n){function o(i,s){return"[Axios v"+ps+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new N(o(s," has been removed"+(r?" in "+r:"")),N.ERR_DEPRECATED);return r&&!Ao[s]&&(Ao[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}};function ku(e,t,r){if(typeof e!="object")throw new N("options must be an object",N.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],l=a===void 0||s(a,i,e);if(l!==!0)throw new N("option "+i+" must be "+l,N.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new N("Unknown option "+i,N.ERR_BAD_OPTION)}}const Ur={assertOptions:ku,validators:wn},Pe=Ur.validators;class Mt{constructor(t){this.defaults=t,this.interceptors={request:new xo,response:new xo}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ke(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Ur.assertOptions(n,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),o!=null&&(_.isFunction(o)?r.paramsSerializer={serialize:o}:Ur.assertOptions(o,{encode:Pe.function,serialize:Pe.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&_.merge(i.common,i[r.method]);i&&_.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=Re.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let d,c=0,g;if(!l){const p=[Eo.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,f),g=p.length,d=Promise.resolve(r);c<g;)d=d.then(p[c++],p[c++]);return d}g=a.length;let b=r;for(c=0;c<g;){const p=a[c++],y=a[c++];try{b=p(b)}catch(T){y.call(this,T);break}}try{d=Eo.call(this,b)}catch(p){return Promise.reject(p)}for(c=0,g=f.length;c<g;)d=d.then(f[c++],f[c++]);return d}getUri(t){t=Ke(this.defaults,t);const r=fs(t.baseURL,t.url);return as(r,t.params,t.paramsSerializer)}}_.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(r,n){return this.request(Ke(n||{},{method:t,url:r,data:(n||{}).data}))}});_.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(Ke(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Mt.prototype[t]=r(),Mt.prototype[t+"Form"]=r(!0)});const Tt=Mt;class xn{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 gt(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)}static source(){let t;return{token:new xn(function(o){t=o}),cancel:t}}}const Eu=xn;function Cu(e){return function(r){return e.apply(null,r)}}function Au(e){return _.isObject(e)&&e.isAxiosError===!0}const Ir={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ir).forEach(([e,t])=>{Ir[t]=e});const Ou=Ir;function hs(e){const t=new Tt(e),r=Ki(Tt.prototype.request,t);return _.extend(r,Tt.prototype,t,{allOwnKeys:!0}),_.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return hs(Ke(e,o))},r}const Y=hs(vn);Y.Axios=Tt;Y.CanceledError=gt;Y.CancelToken=Eu;Y.isCancel=ls;Y.VERSION=ps;Y.toFormData=cr;Y.AxiosError=N;Y.Cancel=Y.CanceledError;Y.all=function(t){return Promise.all(t)};Y.spread=Cu;Y.isAxiosError=Au;Y.mergeConfig=Ke;Y.AxiosHeaders=Re;Y.formToJSON=e=>us(_.isHTMLForm(e)?new FormData(e):e);Y.getAdapter=ds.getAdapter;Y.HttpStatusCode=Ou;Y.default=Y;const Ru=Y,Tu=(e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:o})=>{e.interceptors.request.use(async i=>(t&&await t(i),i),async i=>{throw r&&await r(i),i}),e.interceptors.response.use(async i=>(n&&await n(i),i),async i=>{throw o&&await o(i),i})},Pu=({request:e})=>console.error("[API] Request error:",e),Fu=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let Le;const Nu="/salary-packaging/_admin/v1.0/catche/receipt-batch",$u=async(e,t)=>{if(Le)return Le;const r=e.replace(/\/?$/,"");return Le=Ru.create({baseURL:`${r}`,timeout:15e3,headers:{Authorization:`Bearer ${t}`}}),Tu(Le,{onRequestError:Pu,onResponseError:Fu}),Le},Du=async e=>{if(!Le)throw new Error("Api has not been initialized");const t=new FormData;return t.append("source",e.source),t.append("transactionFile",e.transactionsFile),(await Le.post(`${Nu}`,t,{responseType:"blob"})).data},Lu=ln("button",{target:"ev353g40"})({borderRadius:"0.375rem",backgroundColor:"var(--fl-color-primary-600)",paddingLeft:"0.875rem",paddingRight:"0.875rem",paddingTop:"0.625rem",paddingBottom:"0.625rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{backgroundColor:"var(--fl-color-primary-700)"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"var(--fl-color-primary-600)"}},";"),_s=({as:e,download:t,href:r,children:n,onClick:o,type:i})=>V(Lu,{as:e||"button",download:t,href:r,type:i||"button",onClick:o},n),Vu=({blob:e,children:t,fileName:r})=>{const[n,o]=Oe();return Me(()=>{const i=URL.createObjectURL(e);return o(i),()=>{URL.revokeObjectURL(i),o(void 0)}},[e]),V(_s,{as:"a",href:n??"#",download:r},t)},Uu=ln("div",{target:"e7dk6uz0"})(()=>({height:"1.5rem",width:"1.5rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"var(--fl-color-primary-600)",borderLeftColor:"transparent",borderTopColor:"transparent"}),";");function Mr(){return Mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mr.apply(this,arguments)}const Iu=()=>{const[e,t]=Oe(),[r,n]=Oe(!1),[o,i]=Oe(),{control:s,handleSubmit:a,watch:l}=hc({mode:"onChange",defaultValues:{source:"goCardless"}});Me(()=>{const d=l(()=>{t(void 0),i(void 0)});return()=>d.unsubscribe()},[l]);const f=async d=>{i(void 0),n(!0);try{const c=await Du(d);t(c),n(!1)}catch{n(!1),i("Something went wrong. Please ensure the uploaded file is valid and in the correct format.")}};return V("div",{css:{marginLeft:"1rem",marginTop:"2.5rem",maxWidth:"28rem"}},V("div",{css:{marginBottom:"1.25rem"}},V("h1",{css:{fontSize:"1.25rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}},"Create Catch-E Reciept Batch")),V("form",{onSubmit:a(f)},V(rc,{name:"transactionsFile",control:s,rules:{validate:{validFile:d=>d.name.split(".")[1]==="csv"||"File must be a '.csv'"},required:"Please upload a csv"},render:({field:d,fieldState:c})=>V(Ka,Mr({},d,{error:c.error}))}),V("div",{css:{marginTop:"1rem"}},r?V(Uu,null):V(_s,{type:"submit"},"Submit"))),V("div",{css:{marginTop:"1.25rem",borderTopWidth:"1px","--tw-border-opacity":"1",borderTopColor:"rgb(156 163 175 / var(--tw-border-opacity))",paddingTop:"1.25rem"}},o&&V("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"}},o),e&&V(Vu,{blob:e,fileName:"reciept_batch.zip"},"Download")))},Mu=()=>V(Iu,null),Bu=e=>{const[t,r]=Oe();return Me(()=>{const o=document.getElementsByTagName(e)[0].shadowRoot,i=o==null?void 0:o.childNodes[0];r(Ei({container:i,key:e}))},[e]),{EmotionProvider:({children:o})=>t?V(Ma,{value:t},o):V(ie,null)}},Hu=un({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}}),zu=un`
|
|
10
|
+
`)}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[So]=this[So]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ot(s);n[a]||(hu(o,s),n[a]=!0)}return _.isArray(t)?t.forEach(i):i(t),this}}ur.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(ur.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});_.freezeMethods(ur);const Re=ur;function kr(e,t){const r=this||vn,n=t||r,o=Re.from(n.headers);let i=n.data;return _.forEach(e,function(a){i=a.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ls(e){return!!(e&&e.__CANCEL__)}function gt(e,t,r){N.call(this,e??"canceled",N.ERR_CANCELED,t,r),this.name="CanceledError"}_.inherits(gt,N,{__CANCEL__:!0});function _u(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new N("Request failed with status code "+r.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const mu=me.isStandardBrowserEnv?function(){return{write:function(r,n,o,i,s,a){const l=[];l.push(r+"="+encodeURIComponent(n)),_.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),_.isString(i)&&l.push("path="+i),_.isString(s)&&l.push("domain="+s),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function yu(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gu(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function fs(e,t){return e&&!yu(t)?gu(e,t):t}const bu=me.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let s=i;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(s){const a=_.isString(s)?o(s):s;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}();function vu(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function wu(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(l){const f=Date.now(),d=n[i];s||(s=f),r[o]=l,n[o]=f;let c=i,g=0;for(;c!==o;)g+=r[c++],c=c%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),f-s<t)return;const b=d&&f-d;return b?Math.round(g*1e3/b):void 0}}function ko(e,t){let r=0;const n=wu(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-r,l=n(a),f=i<=s;r=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&f?(s-i)/l:void 0,event:o};d[t?"download":"upload"]=!0,e(d)}}const xu=typeof XMLHttpRequest<"u",Su=xu&&function(e){return new Promise(function(r,n){let o=e.data;const i=Re.from(e.headers).normalize(),s=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}_.isFormData(o)&&(me.isStandardBrowserEnv||me.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let f=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",p=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(b+":"+p))}const d=fs(e.baseURL,e.url);f.open(e.method.toUpperCase(),as(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function c(){if(!f)return;const b=Re.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),y={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};_u(function(k){r(k),l()},function(k){n(k),l()},y),f=null}if("onloadend"in f?f.onloadend=c:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(c)},f.onabort=function(){f&&(n(new N("Request aborted",N.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new N("Network Error",N.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||cs;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),n(new N(p,y.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,f)),f=null},me.isStandardBrowserEnv){const b=(e.withCredentials||bu(d))&&e.xsrfCookieName&&mu.read(e.xsrfCookieName);b&&i.set(e.xsrfHeaderName,b)}o===void 0&&i.setContentType(null),"setRequestHeader"in f&&_.forEach(i.toJSON(),function(p,y){f.setRequestHeader(y,p)}),_.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),s&&s!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",ko(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",ko(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=b=>{f&&(n(!b||b.type?new gt(null,e,f):b),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const g=vu(d);if(g&&me.protocols.indexOf(g)===-1){n(new N("Unsupported protocol "+g+":",N.ERR_BAD_REQUEST,e));return}f.send(o||null)})},Rt={http:Kc,xhr:Su};_.forEach(Rt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ds={getAdapter:e=>{e=_.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=_.isString(r)?Rt[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new N(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(_.hasOwnProp(Rt,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!_.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Rt};function Er(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gt(null,e)}function Eo(e){return Er(e),e.headers=Re.from(e.headers),e.data=kr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ds.getAdapter(e.adapter||vn.adapter)(e).then(function(n){return Er(e),n.data=kr.call(e,e.transformResponse,n),n.headers=Re.from(n.headers),n},function(n){return ls(n)||(Er(e),n&&n.response&&(n.response.data=kr.call(e,e.transformResponse,n.response),n.response.headers=Re.from(n.response.headers))),Promise.reject(n)})}const Co=e=>e instanceof Re?e.toJSON():e;function Ke(e,t){t=t||{};const r={};function n(f,d,c){return _.isPlainObject(f)&&_.isPlainObject(d)?_.merge.call({caseless:c},f,d):_.isPlainObject(d)?_.merge({},d):_.isArray(d)?d.slice():d}function o(f,d,c){if(_.isUndefined(d)){if(!_.isUndefined(f))return n(void 0,f,c)}else return n(f,d,c)}function i(f,d){if(!_.isUndefined(d))return n(void 0,d)}function s(f,d){if(_.isUndefined(d)){if(!_.isUndefined(f))return n(void 0,f)}else return n(void 0,d)}function a(f,d,c){if(c in t)return n(f,d);if(c in e)return n(void 0,f)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials: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:(f,d)=>o(Co(f),Co(d),!0)};return _.forEach(Object.keys(Object.assign({},e,t)),function(d){const c=l[d]||o,g=c(e[d],t[d],d);_.isUndefined(g)&&c!==a||(r[d]=g)}),r}const ps="1.5.0",wn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ao={};wn.transitional=function(t,r,n){function o(i,s){return"[Axios v"+ps+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(t===!1)throw new N(o(s," has been removed"+(r?" in "+r:"")),N.ERR_DEPRECATED);return r&&!Ao[s]&&(Ao[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}};function ku(e,t,r){if(typeof e!="object")throw new N("options must be an object",N.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],l=a===void 0||s(a,i,e);if(l!==!0)throw new N("option "+i+" must be "+l,N.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new N("Unknown option "+i,N.ERR_BAD_OPTION)}}const Ur={assertOptions:ku,validators:wn},Pe=Ur.validators;class Mt{constructor(t){this.defaults=t,this.interceptors={request:new xo,response:new xo}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ke(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Ur.assertOptions(n,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),o!=null&&(_.isFunction(o)?r.paramsSerializer={serialize:o}:Ur.assertOptions(o,{encode:Pe.function,serialize:Pe.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&_.merge(i.common,i[r.method]);i&&_.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=Re.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(l=l&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let d,c=0,g;if(!l){const p=[Eo.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,f),g=p.length,d=Promise.resolve(r);c<g;)d=d.then(p[c++],p[c++]);return d}g=a.length;let b=r;for(c=0;c<g;){const p=a[c++],y=a[c++];try{b=p(b)}catch(T){y.call(this,T);break}}try{d=Eo.call(this,b)}catch(p){return Promise.reject(p)}for(c=0,g=f.length;c<g;)d=d.then(f[c++],f[c++]);return d}getUri(t){t=Ke(this.defaults,t);const r=fs(t.baseURL,t.url);return as(r,t.params,t.paramsSerializer)}}_.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(r,n){return this.request(Ke(n||{},{method:t,url:r,data:(n||{}).data}))}});_.forEach(["post","put","patch"],function(t){function r(n){return function(i,s,a){return this.request(Ke(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Mt.prototype[t]=r(),Mt.prototype[t+"Form"]=r(!0)});const Tt=Mt;class xn{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 gt(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)}static source(){let t;return{token:new xn(function(o){t=o}),cancel:t}}}const Eu=xn;function Cu(e){return function(r){return e.apply(null,r)}}function Au(e){return _.isObject(e)&&e.isAxiosError===!0}const Ir={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ir).forEach(([e,t])=>{Ir[t]=e});const Ou=Ir;function hs(e){const t=new Tt(e),r=Ki(Tt.prototype.request,t);return _.extend(r,Tt.prototype,t,{allOwnKeys:!0}),_.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return hs(Ke(e,o))},r}const Y=hs(vn);Y.Axios=Tt;Y.CanceledError=gt;Y.CancelToken=Eu;Y.isCancel=ls;Y.VERSION=ps;Y.toFormData=cr;Y.AxiosError=N;Y.Cancel=Y.CanceledError;Y.all=function(t){return Promise.all(t)};Y.spread=Cu;Y.isAxiosError=Au;Y.mergeConfig=Ke;Y.AxiosHeaders=Re;Y.formToJSON=e=>us(_.isHTMLForm(e)?new FormData(e):e);Y.getAdapter=ds.getAdapter;Y.HttpStatusCode=Ou;Y.default=Y;const Ru=Y,Tu=(e,{onRequest:t,onRequestError:r,onResponse:n,onResponseError:o})=>{e.interceptors.request.use(async i=>(t&&await t(i),i),async i=>{throw r&&await r(i),i}),e.interceptors.response.use(async i=>(n&&await n(i),i),async i=>{throw o&&await o(i),i})},Pu=({request:e})=>console.error("[API] Request error:",e),Fu=({response:e})=>{if(e){const{status:t,request:r,data:n}=e;console.error("[API] Response error:",t,r.responseURL,JSON.stringify(n))}};let Le;const Nu="/salary-packaging/admin/v1.0/catche/receipt-batch",$u=async(e,t)=>{if(Le)return Le;const r=e==null?void 0:e.replace(/\/?$/,"");return Le=Ru.create({baseURL:`${r}`,timeout:15e3,headers:{Authorization:`Bearer ${t}`}}),Tu(Le,{onRequestError:Pu,onResponseError:Fu}),Le},Du=async e=>{if(!Le)throw new Error("Api has not been initialized");const t=new FormData;return t.append("source",e.source),t.append("transactionFile",e.transactionsFile),(await Le.post(`${Nu}`,t,{responseType:"blob"})).data},Lu=ln("button",{target:"ev353g40"})({borderRadius:"0.375rem",backgroundColor:"var(--fl-color-primary-600)",paddingLeft:"0.875rem",paddingRight:"0.875rem",paddingTop:"0.625rem",paddingBottom:"0.625rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"400","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","--tw-shadow":"0 1px 2px 0 rgb(0 0 0 / 0.05)","--tw-shadow-colored":"0 1px 2px 0 var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",":hover":{backgroundColor:"var(--fl-color-primary-700)"},":focus-visible":{outlineStyle:"solid",outlineWidth:"2px",outlineOffset:"2px",outlineColor:"var(--fl-color-primary-600)"}},";"),_s=({as:e,download:t,href:r,children:n,onClick:o,type:i})=>V(Lu,{as:e||"button",download:t,href:r,type:i||"button",onClick:o},n),Vu=({blob:e,children:t,fileName:r})=>{const[n,o]=Oe();return Me(()=>{const i=URL.createObjectURL(e);return o(i),()=>{URL.revokeObjectURL(i),o(void 0)}},[e]),V(_s,{as:"a",href:n??"#",download:r},t)},Uu=ln("div",{target:"e7dk6uz0"})(()=>({height:"1.5rem",width:"1.5rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite",borderRadius:"9999px",borderWidth:"2px",borderColor:"var(--fl-color-primary-600)",borderLeftColor:"transparent",borderTopColor:"transparent"}),";");function Mr(){return Mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mr.apply(this,arguments)}const Iu=()=>{const[e,t]=Oe(),[r,n]=Oe(!1),[o,i]=Oe(),{control:s,handleSubmit:a,watch:l}=hc({mode:"onChange",defaultValues:{source:"goCardless"}});Me(()=>{const d=l(()=>{t(void 0),i(void 0)});return()=>d.unsubscribe()},[l]);const f=async d=>{i(void 0),n(!0);try{const c=await Du(d);t(c),n(!1)}catch{n(!1),i("Something went wrong. Please ensure the uploaded file is valid and in the correct format.")}};return V("div",{css:{marginLeft:"1rem",marginTop:"2.5rem",maxWidth:"28rem"}},V("div",{css:{marginBottom:"1.25rem"}},V("h1",{css:{fontSize:"1.25rem",lineHeight:"1.75rem",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}},"Create Catch-E Reciept Batch")),V("form",{onSubmit:a(f)},V(rc,{name:"transactionsFile",control:s,rules:{validate:{validFile:d=>d.name.split(".")[1]==="csv"||"File must be a '.csv'"},required:"Please upload a csv"},render:({field:d,fieldState:c})=>V(Ka,Mr({},d,{error:c.error}))}),V("div",{css:{marginTop:"1rem"}},r?V(Uu,null):V(_s,{type:"submit"},"Submit"))),V("div",{css:{marginTop:"1.25rem",borderTopWidth:"1px","--tw-border-opacity":"1",borderTopColor:"rgb(156 163 175 / var(--tw-border-opacity))",paddingTop:"1.25rem"}},o&&V("p",{css:{marginTop:"0.5rem",fontSize:"0.875rem",lineHeight:"1.25rem","--tw-text-opacity":"1",color:"rgb(220 38 38 / var(--tw-text-opacity))"}},o),e&&V(Vu,{blob:e,fileName:"reciept_batch.zip"},"Download")))},Mu=()=>V(Iu,null),Bu=e=>{const[t,r]=Oe();return Me(()=>{const o=document.getElementsByTagName(e);if(o&&o.length>0){const i=o[0].shadowRoot,s=i==null?void 0:i.childNodes[0];r(Ei({container:s,key:e}))}},[e]),{EmotionProvider:({children:o})=>t?V(Ma,{value:t},o):V(ie,null)}},Hu=un({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}}),zu=un`
|
|
11
11
|
:host {
|
|
12
12
|
--fl-color-primary-900: #000563;
|
|
13
13
|
--fl-color-primary-800: #031495;
|