@college-africa/chat-ui 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,66 +1,11 @@
1
- "use strict";var Vy=Object.defineProperty;var Ky=(e,t,r)=>t in e?Vy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ar=(e,t,r)=>Ky(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react/jsx-runtime"),X=require("react"),J=require("@mui/material"),zy=require("@emotion/styled");require("@emotion/react");function Gy(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 mr=Gy(X);function np(e,t){return function(){return e.apply(t,arguments)}}const{toString:Wy}=Object.prototype,{getPrototypeOf:tc}=Object,{iterator:so,toStringTag:ip}=Symbol,ao=(e=>t=>{const r=Wy.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Lt=e=>(e=e.toLowerCase(),t=>ao(t)===e),uo=e=>t=>typeof t===e,{isArray:_n}=Array,mn=uo("undefined");function ei(e){return e!==null&&!mn(e)&&e.constructor!==null&&!mn(e.constructor)&&Et(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const op=Lt("ArrayBuffer");function Hy(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&op(e.buffer),t}const Yy=uo("string"),Et=uo("function"),sp=uo("number"),ti=e=>e!==null&&typeof e=="object",Jy=e=>e===!0||e===!1,Ki=e=>{if(ao(e)!=="object")return!1;const t=tc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ip in e)&&!(so in e)},Xy=e=>{if(!ti(e)||ei(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Zy=Lt("Date"),Qy=Lt("File"),eg=Lt("Blob"),tg=Lt("FileList"),rg=e=>ti(e)&&Et(e.pipe),ng=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Et(e.append)&&((t=ao(e))==="formdata"||t==="object"&&Et(e.toString)&&e.toString()==="[object FormData]"))},ig=Lt("URLSearchParams"),[og,sg,ag,ug]=["ReadableStream","Request","Response","Headers"].map(Lt),cg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ri(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),_n(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(ei(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let c;for(n=0;n<a;n++)c=s[n],t.call(null,e[c],c,e)}}function ap(e,t){if(ei(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const Pr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,up=e=>!mn(e)&&e!==Pr;function Du(){const{caseless:e,skipUndefined:t}=up(this)&&this||{},r={},n=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const a=e&&ap(r,s)||s;Ki(r[a])&&Ki(i)?r[a]=Du(r[a],i):Ki(i)?r[a]=Du({},i):_n(i)?r[a]=i.slice():(!t||!mn(i))&&(r[a]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&ri(arguments[i],n);return r}const lg=(e,t,r,{allOwnKeys:n}={})=>(ri(t,(i,s)=>{r&&Et(i)?Object.defineProperty(e,s,{value:np(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),fg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dg=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},hg=(e,t,r,n)=>{let i,s,a;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],(!n||n(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=r!==!1&&tc(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},pg=(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},mg=e=>{if(!e)return null;if(_n(e))return e;let t=e.length;if(!sp(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},yg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tc(Uint8Array)),gg=(e,t)=>{const n=(e&&e[so]).call(e);let i;for(;(i=n.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},bg=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},vg=Lt("HTMLFormElement"),_g=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),gl=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),wg=Lt("RegExp"),cp=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ri(r,(i,s)=>{let a;(a=t(i,s,e))!==!1&&(n[s]=a||i)}),Object.defineProperties(e,n)},xg=e=>{cp(e,(t,r)=>{if(Et(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Et(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+"'")})}})},Sg=(e,t)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return _n(e)?n(e):n(String(e).split(t)),r},Tg=()=>{},Eg=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Cg(e){return!!(e&&Et(e.append)&&e[ip]==="FormData"&&e[so])}const Og=e=>{const t=new Array(10),r=(n,i)=>{if(ti(n)){if(t.indexOf(n)>=0)return;if(ei(n))return n;if(!("toJSON"in n)){t[i]=n;const s=_n(n)?[]:{};return ri(n,(a,c)=>{const h=r(a,i+1);!mn(h)&&(s[c]=h)}),t[i]=void 0,s}}return n};return r(e,0)},Ag=Lt("AsyncFunction"),Rg=e=>e&&(ti(e)||Et(e))&&Et(e.then)&&Et(e.catch),lp=((e,t)=>e?setImmediate:t?((r,n)=>(Pr.addEventListener("message",({source:i,data:s})=>{i===Pr&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Pr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Et(Pr.postMessage)),kg=typeof queueMicrotask<"u"?queueMicrotask.bind(Pr):typeof process<"u"&&process.nextTick||lp,jg=e=>e!=null&&Et(e[so]),V={isArray:_n,isArrayBuffer:op,isBuffer:ei,isFormData:ng,isArrayBufferView:Hy,isString:Yy,isNumber:sp,isBoolean:Jy,isObject:ti,isPlainObject:Ki,isEmptyObject:Xy,isReadableStream:og,isRequest:sg,isResponse:ag,isHeaders:ug,isUndefined:mn,isDate:Zy,isFile:Qy,isBlob:eg,isRegExp:wg,isFunction:Et,isStream:rg,isURLSearchParams:ig,isTypedArray:yg,isFileList:tg,forEach:ri,merge:Du,extend:lg,trim:cg,stripBOM:fg,inherits:dg,toFlatObject:hg,kindOf:ao,kindOfTest:Lt,endsWith:pg,toArray:mg,forEachEntry:gg,matchAll:bg,isHTMLForm:vg,hasOwnProperty:gl,hasOwnProp:gl,reduceDescriptors:cp,freezeMethods:xg,toObjectSet:Sg,toCamelCase:_g,noop:Tg,toFiniteNumber:Eg,findKey:ap,global:Pr,isContextDefined:up,isSpecCompliantForm:Cg,toJSONObject:Og,isAsyncFn:Ag,isThenable:Rg,setImmediate:lp,asap:kg,isIterable:jg};let Ce=class fp extends Error{static from(t,r,n,i,s,a){const c=new fp(t.message,r||t.code,n,i,s);return c.cause=t,c.name=t.name,a&&Object.assign(c,a),c}constructor(t,r,n,i,s){super(t),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){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:V.toJSONObject(this.config),code:this.code,status:this.status}}};Ce.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ce.ERR_BAD_OPTION="ERR_BAD_OPTION";Ce.ECONNABORTED="ECONNABORTED";Ce.ETIMEDOUT="ETIMEDOUT";Ce.ERR_NETWORK="ERR_NETWORK";Ce.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ce.ERR_DEPRECATED="ERR_DEPRECATED";Ce.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ce.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ce.ERR_CANCELED="ERR_CANCELED";Ce.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ce.ERR_INVALID_URL="ERR_INVALID_URL";const Pg=null;function Fu(e){return V.isPlainObject(e)||V.isArray(e)}function dp(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function bl(e,t,r){return e?e.concat(t).map(function(i,s){return i=dp(i),!r&&s?"["+i+"]":i}).join(r?".":""):t}function Ig(e){return V.isArray(e)&&!e.some(Fu)}const $g=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function co(e,t,r){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=V.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,E){return!V.isUndefined(E[v])});const n=r.metaTokens,i=r.visitor||m,s=r.dots,a=r.indexes,h=(r.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(i))throw new TypeError("visitor must be a function");function p(S){if(S===null)return"";if(V.isDate(S))return S.toISOString();if(V.isBoolean(S))return S.toString();if(!h&&V.isBlob(S))throw new Ce("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(S)||V.isTypedArray(S)?h&&typeof Blob=="function"?new Blob([S]):Buffer.from(S):S}function m(S,v,E){let D=S;if(S&&!E&&typeof S=="object"){if(V.endsWith(v,"{}"))v=n?v:v.slice(0,-2),S=JSON.stringify(S);else if(V.isArray(S)&&Ig(S)||(V.isFileList(S)||V.endsWith(v,"[]"))&&(D=V.toArray(S)))return v=dp(v),D.forEach(function(K,G){!(V.isUndefined(K)||K===null)&&t.append(a===!0?bl([v],G,s):a===null?v:v+"[]",p(K))}),!1}return Fu(S)?!0:(t.append(bl(E,v,s),p(S)),!1)}const g=[],_=Object.assign($g,{defaultVisitor:m,convertValue:p,isVisitable:Fu});function O(S,v){if(!V.isUndefined(S)){if(g.indexOf(S)!==-1)throw Error("Circular reference detected in "+v.join("."));g.push(S),V.forEach(S,function(D,z){(!(V.isUndefined(D)||D===null)&&i.call(t,D,V.isString(z)?z.trim():z,v,_))===!0&&O(D,v?v.concat(z):[z])}),g.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return O(e),t}function vl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function rc(e,t){this._pairs=[],e&&co(e,this,t)}const hp=rc.prototype;hp.append=function(t,r){this._pairs.push([t,r])};hp.toString=function(t){const r=t?function(n){return t.call(this,n,vl)}:vl;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Dg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pp(e,t,r){if(!t)return e;const n=r&&r.encode||Dg,i=V.isFunction(r)?{serialize:r}:r,s=i&&i.serialize;let a;if(s?a=s(t,i):a=V.isURLSearchParams(t)?t.toString():new rc(t,i).toString(n),a){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class _l{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){V.forEach(this.handlers,function(n){n!==null&&t(n)})}}const nc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Fg=typeof URLSearchParams<"u"?URLSearchParams:rc,Mg=typeof FormData<"u"?FormData:null,Ng=typeof Blob<"u"?Blob:null,qg={isBrowser:!0,classes:{URLSearchParams:Fg,FormData:Mg,Blob:Ng},protocols:["http","https","file","blob","url","data"]},ic=typeof window<"u"&&typeof document<"u",Mu=typeof navigator=="object"&&navigator||void 0,Bg=ic&&(!Mu||["ReactNative","NativeScript","NS"].indexOf(Mu.product)<0),Lg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ug=ic&&window.location.href||"http://localhost",Vg=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ic,hasStandardBrowserEnv:Bg,hasStandardBrowserWebWorkerEnv:Lg,navigator:Mu,origin:Ug},Symbol.toStringTag,{value:"Module"})),vt={...Vg,...qg};function Kg(e,t){return co(e,new vt.classes.URLSearchParams,{visitor:function(r,n,i,s){return vt.isNode&&V.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function zg(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gg(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function mp(e){function t(r,n,i,s){let a=r[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),h=s>=r.length;return a=!a&&V.isArray(i)?i.length:a,h?(V.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!c):((!i[a]||!V.isObject(i[a]))&&(i[a]=[]),t(r,n,i[a],s)&&V.isArray(i[a])&&(i[a]=Gg(i[a])),!c)}if(V.isFormData(e)&&V.isFunction(e.entries)){const r={};return V.forEachEntry(e,(n,i)=>{t(zg(n),i,r,0)}),r}return null}function Wg(e,t,r){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const ni={transitional:nc,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=V.isObject(t);if(s&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return i?JSON.stringify(mp(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Kg(t,this.formSerializer).toString();if((c=V.isFileList(t))||n.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return co(c?{"files[]":t}:t,h&&new h,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),Wg(t)):t}],transformResponse:[function(t){const r=this.transitional||ni.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(n&&!this.responseType||i)){const a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(c){if(a)throw c.name==="SyntaxError"?Ce.from(c,Ce.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vt.classes.FormData,Blob:vt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],e=>{ni.headers[e]={}});const Hg=V.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"]),Yg=e=>{const t={};let r,n,i;return e&&e.split(`
2
- `).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||t[r]&&Hg[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},wl=Symbol("internals");function Mn(e){return e&&String(e).trim().toLowerCase()}function zi(e){return e===!1||e==null?e:V.isArray(e)?e.map(zi):String(e)}function Jg(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 Xg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ys(e,t,r,n,i){if(V.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!V.isString(t)){if(V.isString(n))return t.indexOf(n)!==-1;if(V.isRegExp(n))return n.test(t)}}function Zg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Qg(e,t){const r=V.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,a){return this[n].call(this,t,i,s,a)},configurable:!0})})}let Ct=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(c,h,p){const m=Mn(h);if(!m)throw new Error("header name must be a non-empty string");const g=V.findKey(i,m);(!g||i[g]===void 0||p===!0||p===void 0&&i[g]!==!1)&&(i[g||h]=zi(c))}const a=(c,h)=>V.forEach(c,(p,m)=>s(p,m,h));if(V.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(V.isString(t)&&(t=t.trim())&&!Xg(t))a(Yg(t),r);else if(V.isObject(t)&&V.isIterable(t)){let c={},h,p;for(const m of t){if(!V.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[p=m[0]]=(h=c[p])?V.isArray(h)?[...h,m[1]]:[h,m[1]]:m[1]}a(c,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Mn(t),t){const n=V.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return Jg(i);if(V.isFunction(r))return r.call(this,i,n);if(V.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Mn(t),t){const n=V.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||ys(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(a){if(a=Mn(a),a){const c=V.findKey(n,a);c&&(!r||ys(n,n[c],c,r))&&(delete n[c],i=!0)}}return V.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||ys(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return V.forEach(this,(i,s)=>{const a=V.findKey(n,s);if(a){r[a]=zi(i),delete r[s];return}const c=t?Zg(s):String(s).trim();c!==s&&delete r[s],r[c]=zi(i),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return V.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&V.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(i=>n.set(i)),n}static accessor(t){const n=(this[wl]=this[wl]={accessors:{}}).accessors,i=this.prototype;function s(a){const c=Mn(a);n[c]||(Qg(i,a),n[c]=!0)}return V.isArray(t)?t.forEach(s):s(t),this}};Ct.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(Ct.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});V.freezeMethods(Ct);function gs(e,t){const r=this||ni,n=t||r,i=Ct.from(n.headers);let s=n.data;return V.forEach(e,function(c){s=c.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function yp(e){return!!(e&&e.__CANCEL__)}let ii=class extends Ce{constructor(t,r,n){super(t??"canceled",Ce.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function gp(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ce("Request failed with status code "+r.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function eb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function tb(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(h){const p=Date.now(),m=n[s];a||(a=p),r[i]=h,n[i]=p;let g=s,_=0;for(;g!==i;)_+=r[g++],g=g%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),p-a<t)return;const O=m&&p-m;return O?Math.round(_*1e3/O):void 0}}function rb(e,t){let r=0,n=1e3/t,i,s;const a=(p,m=Date.now())=>{r=m,i=null,s&&(clearTimeout(s),s=null),e(...p)};return[(...p)=>{const m=Date.now(),g=m-r;g>=n?a(p,m):(i=p,s||(s=setTimeout(()=>{s=null,a(i)},n-g)))},()=>i&&a(i)]}const Xi=(e,t,r=3)=>{let n=0;const i=tb(50,250);return rb(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,h=a-n,p=i(h),m=a<=c;n=a;const g={loaded:a,total:c,progress:c?a/c:void 0,bytes:h,rate:p||void 0,estimated:p&&c&&m?(c-a)/p:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},r)},xl=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Sl=e=>(...t)=>V.asap(()=>e(...t)),nb=vt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,vt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(vt.origin),vt.navigator&&/(msie|trident)/i.test(vt.navigator.userAgent)):()=>!0,ib=vt.hasStandardBrowserEnv?{write(e,t,r,n,i,s,a){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];V.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),V.isString(n)&&c.push(`path=${n}`),V.isString(i)&&c.push(`domain=${i}`),s===!0&&c.push("secure"),V.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.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 ob(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function bp(e,t,r){let n=!ob(t);return e&&(n||r==!1)?sb(e,t):t}const Tl=e=>e instanceof Ct?{...e}:e;function Nr(e,t){t=t||{};const r={};function n(p,m,g,_){return V.isPlainObject(p)&&V.isPlainObject(m)?V.merge.call({caseless:_},p,m):V.isPlainObject(m)?V.merge({},m):V.isArray(m)?m.slice():m}function i(p,m,g,_){if(V.isUndefined(m)){if(!V.isUndefined(p))return n(void 0,p,g,_)}else return n(p,m,g,_)}function s(p,m){if(!V.isUndefined(m))return n(void 0,m)}function a(p,m){if(V.isUndefined(m)){if(!V.isUndefined(p))return n(void 0,p)}else return n(void 0,m)}function c(p,m,g){if(g in t)return n(p,m);if(g in e)return n(void 0,p)}const h={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(p,m,g)=>i(Tl(p),Tl(m),g,!0)};return V.forEach(Object.keys({...e,...t}),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const g=V.hasOwnProp(h,m)?h[m]:i,_=g(e[m],t[m],m);V.isUndefined(_)&&g!==c||(r[m]=_)}),r}const vp=e=>{const t=Nr({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=Ct.from(a),t.url=pp(bp(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),V.isFormData(r)){if(vt.hasStandardBrowserEnv||vt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(V.isFunction(r.getHeaders)){const h=r.getHeaders(),p=["content-type","content-length"];Object.entries(h).forEach(([m,g])=>{p.includes(m.toLowerCase())&&a.set(m,g)})}}if(vt.hasStandardBrowserEnv&&(n&&V.isFunction(n)&&(n=n(t)),n||n!==!1&&nb(t.url))){const h=i&&s&&ib.read(s);h&&a.set(i,h)}return t},ab=typeof XMLHttpRequest<"u",ub=ab&&function(e){return new Promise(function(r,n){const i=vp(e);let s=i.data;const a=Ct.from(i.headers).normalize();let{responseType:c,onUploadProgress:h,onDownloadProgress:p}=i,m,g,_,O,S;function v(){O&&O(),S&&S(),i.cancelToken&&i.cancelToken.unsubscribe(m),i.signal&&i.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(i.method.toUpperCase(),i.url,!0),E.timeout=i.timeout;function D(){if(!E)return;const K=Ct.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),T={data:!c||c==="text"||c==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:K,config:e,request:E};gp(function(H){r(H),v()},function(H){n(H),v()},T),E=null}"onloadend"in E?E.onloadend=D:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(D)},E.onabort=function(){E&&(n(new Ce("Request aborted",Ce.ECONNABORTED,e,E)),E=null)},E.onerror=function(G){const T=G&&G.message?G.message:"Network Error",N=new Ce(T,Ce.ERR_NETWORK,e,E);N.event=G||null,n(N),E=null},E.ontimeout=function(){let G=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const T=i.transitional||nc;i.timeoutErrorMessage&&(G=i.timeoutErrorMessage),n(new Ce(G,T.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,E)),E=null},s===void 0&&a.setContentType(null),"setRequestHeader"in E&&V.forEach(a.toJSON(),function(G,T){E.setRequestHeader(T,G)}),V.isUndefined(i.withCredentials)||(E.withCredentials=!!i.withCredentials),c&&c!=="json"&&(E.responseType=i.responseType),p&&([_,S]=Xi(p,!0),E.addEventListener("progress",_)),h&&E.upload&&([g,O]=Xi(h),E.upload.addEventListener("progress",g),E.upload.addEventListener("loadend",O)),(i.cancelToken||i.signal)&&(m=K=>{E&&(n(!K||K.type?new ii(null,e,E):K),E.abort(),E=null)},i.cancelToken&&i.cancelToken.subscribe(m),i.signal&&(i.signal.aborted?m():i.signal.addEventListener("abort",m)));const z=eb(i.url);if(z&&vt.protocols.indexOf(z)===-1){n(new Ce("Unsupported protocol "+z+":",Ce.ERR_BAD_REQUEST,e));return}E.send(s||null)})},cb=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const s=function(p){if(!i){i=!0,c();const m=p instanceof Error?p:this.reason;n.abort(m instanceof Ce?m:new ii(m instanceof Error?m.message:m))}};let a=t&&setTimeout(()=>{a=null,s(new Ce(`timeout of ${t}ms exceeded`,Ce.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(s):p.removeEventListener("abort",s)}),e=null)};e.forEach(p=>p.addEventListener("abort",s));const{signal:h}=n;return h.unsubscribe=()=>V.asap(c),h}},lb=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},fb=async function*(e,t){for await(const r of db(e))yield*lb(r,t)},db=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()}},El=(e,t,r,n)=>{const i=fb(e,t);let s=0,a,c=h=>{a||(a=!0,n&&n(h))};return new ReadableStream({async pull(h){try{const{done:p,value:m}=await i.next();if(p){c(),h.close();return}let g=m.byteLength;if(r){let _=s+=g;r(_)}h.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}},cancel(h){return c(h),i.return()}},{highWaterMark:2})},Cl=64*1024,{isFunction:$i}=V,hb=(({Request:e,Response:t})=>({Request:e,Response:t}))(V.global),{ReadableStream:Ol,TextEncoder:Al}=V.global,Rl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},pb=e=>{e=V.merge.call({skipUndefined:!0},hb,e);const{fetch:t,Request:r,Response:n}=e,i=t?$i(t):typeof fetch=="function",s=$i(r),a=$i(n);if(!i)return!1;const c=i&&$i(Ol),h=i&&(typeof Al=="function"?(S=>v=>S.encode(v))(new Al):async S=>new Uint8Array(await new r(S).arrayBuffer())),p=s&&c&&Rl(()=>{let S=!1;const v=new r(vt.origin,{body:new Ol,method:"POST",get duplex(){return S=!0,"half"}}).headers.has("Content-Type");return S&&!v}),m=a&&c&&Rl(()=>V.isReadableStream(new n("").body)),g={stream:m&&(S=>S.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!g[S]&&(g[S]=(v,E)=>{let D=v&&v[S];if(D)return D.call(v);throw new Ce(`Response type '${S}' is not supported`,Ce.ERR_NOT_SUPPORT,E)})});const _=async S=>{if(S==null)return 0;if(V.isBlob(S))return S.size;if(V.isSpecCompliantForm(S))return(await new r(vt.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(V.isArrayBufferView(S)||V.isArrayBuffer(S))return S.byteLength;if(V.isURLSearchParams(S)&&(S=S+""),V.isString(S))return(await h(S)).byteLength},O=async(S,v)=>{const E=V.toFiniteNumber(S.getContentLength());return E??_(v)};return async S=>{let{url:v,method:E,data:D,signal:z,cancelToken:K,timeout:G,onDownloadProgress:T,onUploadProgress:N,responseType:H,headers:te,withCredentials:pe="same-origin",fetchOptions:ke}=vp(S),oe=t||fetch;H=H?(H+"").toLowerCase():"text";let w=cb([z,K&&K.toAbortSignal()],G),Z=null;const ee=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let ve;try{if(N&&p&&E!=="get"&&E!=="head"&&(ve=await O(te,D))!==0){let ae=new r(v,{method:"POST",body:D,duplex:"half"}),be;if(V.isFormData(D)&&(be=ae.headers.get("content-type"))&&te.setContentType(be),ae.body){const[Oe,_e]=xl(ve,Xi(Sl(N)));D=El(ae.body,Cl,Oe,_e)}}V.isString(pe)||(pe=pe?"include":"omit");const ge=s&&"credentials"in r.prototype,ze={...ke,signal:w,method:E.toUpperCase(),headers:te.normalize().toJSON(),body:D,duplex:"half",credentials:ge?pe:void 0};Z=s&&new r(v,ze);let $e=await(s?oe(Z,ke):oe(v,ze));const ut=m&&(H==="stream"||H==="response");if(m&&(T||ut&&ee)){const ae={};["status","statusText","headers"].forEach(Ae=>{ae[Ae]=$e[Ae]});const be=V.toFiniteNumber($e.headers.get("content-length")),[Oe,_e]=T&&xl(be,Xi(Sl(T),!0))||[];$e=new n(El($e.body,Cl,Oe,()=>{_e&&_e(),ee&&ee()}),ae)}H=H||"text";let Q=await g[V.findKey(g,H)||"text"]($e,S);return!ut&&ee&&ee(),await new Promise((ae,be)=>{gp(ae,be,{data:Q,headers:Ct.from($e.headers),status:$e.status,statusText:$e.statusText,config:S,request:Z})})}catch(ge){throw ee&&ee(),ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,S,Z,ge&&ge.response),{cause:ge.cause||ge}):Ce.from(ge,ge&&ge.code,S,Z,ge&&ge.response)}}},mb=new Map,_p=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,s=[n,i,r];let a=s.length,c=a,h,p,m=mb;for(;c--;)h=s[c],p=m.get(h),p===void 0&&m.set(h,p=c?new Map:pb(t)),m=p;return p};_p();const oc={http:Pg,xhr:ub,fetch:{get:_p}};V.forEach(oc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const kl=e=>`- ${e}`,yb=e=>V.isFunction(e)||e===null||e===!1;function gb(e,t){e=V.isArray(e)?e:[e];const{length:r}=e;let n,i;const s={};for(let a=0;a<r;a++){n=e[a];let c;if(i=n,!yb(n)&&(i=oc[(c=String(n)).toLowerCase()],i===void 0))throw new Ce(`Unknown adapter '${c}'`);if(i&&(V.isFunction(i)||(i=i.get(t))))break;s[c||"#"+a]=i}if(!i){const a=Object.entries(s).map(([h,p])=>`adapter ${h} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=r?a.length>1?`since :
4
- `+a.map(kl).join(`
5
- `):" "+kl(a[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return i}const wp={getAdapter:gb,adapters:oc};function bs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ii(null,e)}function jl(e){return bs(e),e.headers=Ct.from(e.headers),e.data=gs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wp.getAdapter(e.adapter||ni.adapter,e)(e).then(function(n){return bs(e),n.data=gs.call(e,e.transformResponse,n),n.headers=Ct.from(n.headers),n},function(n){return yp(n)||(bs(e),n&&n.response&&(n.response.data=gs.call(e,e.transformResponse,n.response),n.response.headers=Ct.from(n.response.headers))),Promise.reject(n)})}const xp="1.13.5",lo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lo[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Pl={};lo.transitional=function(t,r,n){function i(s,a){return"[Axios v"+xp+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,c)=>{if(t===!1)throw new Ce(i(a," has been removed"+(r?" in "+r:"")),Ce.ERR_DEPRECATED);return r&&!Pl[a]&&(Pl[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,c):!0}};lo.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function bb(e,t,r){if(typeof e!="object")throw new Ce("options must be an object",Ce.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],a=t[s];if(a){const c=e[s],h=c===void 0||a(c,s,e);if(h!==!0)throw new Ce("option "+s+" must be "+h,Ce.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ce("Unknown option "+s,Ce.ERR_BAD_OPTION)}}const Gi={assertOptions:bb,validators:lo},Dt=Gi.validators;let $r=class{constructor(t){this.defaults=t||{},this.interceptors={request:new _l,response:new _l}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Nr(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&Gi.assertOptions(n,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean),legacyInterceptorReqResOrdering:Dt.transitional(Dt.boolean)},!1),i!=null&&(V.isFunction(i)?r.paramsSerializer={serialize:i}:Gi.assertOptions(i,{encode:Dt.function,serialize:Dt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Gi.assertOptions(r,{baseUrl:Dt.spelling("baseURL"),withXsrfToken:Dt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&V.merge(s.common,s[r.method]);s&&V.forEach(["delete","get","head","post","put","patch","common"],S=>{delete s[S]}),r.headers=Ct.concat(a,s);const c=[];let h=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(r)===!1)return;h=h&&v.synchronous;const E=r.transitional||nc;E&&E.legacyInterceptorReqResOrdering?c.unshift(v.fulfilled,v.rejected):c.push(v.fulfilled,v.rejected)});const p=[];this.interceptors.response.forEach(function(v){p.push(v.fulfilled,v.rejected)});let m,g=0,_;if(!h){const S=[jl.bind(this),void 0];for(S.unshift(...c),S.push(...p),_=S.length,m=Promise.resolve(r);g<_;)m=m.then(S[g++],S[g++]);return m}_=c.length;let O=r;for(;g<_;){const S=c[g++],v=c[g++];try{O=S(O)}catch(E){v.call(this,E);break}}try{m=jl.call(this,O)}catch(S){return Promise.reject(S)}for(g=0,_=p.length;g<_;)m=m.then(p[g++],p[g++]);return m}getUri(t){t=Nr(this.defaults,t);const r=bp(t.baseURL,t.url,t.allowAbsoluteUrls);return pp(r,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){$r.prototype[t]=function(r,n){return this.request(Nr(n||{},{method:t,url:r,data:(n||{}).data}))}});V.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,c){return this.request(Nr(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}$r.prototype[t]=r(),$r.prototype[t+"Form"]=r(!0)});let vb=class Sp{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(c=>{n.subscribe(c),s=c}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,c){n.reason||(n.reason=new ii(s,a,c),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 Sp(function(i){t=i}),cancel:t}}};function _b(e){return function(r){return e.apply(null,r)}}function wb(e){return V.isObject(e)&&e.isAxiosError===!0}const Nu={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(Nu).forEach(([e,t])=>{Nu[t]=e});function Tp(e){const t=new $r(e),r=np($r.prototype.request,t);return V.extend(r,$r.prototype,t,{allOwnKeys:!0}),V.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Tp(Nr(e,i))},r}const dt=Tp(ni);dt.Axios=$r;dt.CanceledError=ii;dt.CancelToken=vb;dt.isCancel=yp;dt.VERSION=xp;dt.toFormData=co;dt.AxiosError=Ce;dt.Cancel=dt.CanceledError;dt.all=function(t){return Promise.all(t)};dt.spread=_b;dt.isAxiosError=wb;dt.mergeConfig=Nr;dt.AxiosHeaders=Ct;dt.formToJSON=e=>mp(V.isHTMLForm(e)?new FormData(e):e);dt.getAdapter=wp.getAdapter;dt.HttpStatusCode=Nu;dt.default=dt;const{Axios:jC,AxiosError:PC,CanceledError:IC,isCancel:$C,CancelToken:DC,VERSION:FC,all:MC,Cancel:NC,isAxiosError:qC,spread:BC,toFormData:LC,AxiosHeaders:UC,HttpStatusCode:VC,formToJSON:KC,getAdapter:zC,mergeConfig:GC}=dt;var Bn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vs,Il;function xb(){if(Il)return vs;Il=1;function e(D){this._maxSize=D,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(D){return this._values[D]},e.prototype.set=function(D,z){return this._size>=this._maxSize&&this.clear(),D in this._values||this._size++,this._values[D]=z};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,a=512,c=new e(a),h=new e(a),p=new e(a);vs={Cache:e,split:g,normalizePath:m,setter:function(D){var z=m(D);return h.get(D)||h.set(D,function(G,T){for(var N=0,H=z.length,te=G;N<H-1;){var pe=z[N];if(pe==="__proto__"||pe==="constructor"||pe==="prototype")return G;te=te[z[N++]]}te[z[N]]=T})},getter:function(D,z){var K=m(D);return p.get(D)||p.set(D,function(T){for(var N=0,H=K.length;N<H;)if(T!=null||!z)T=T[K[N++]];else return;return T})},join:function(D){return D.reduce(function(z,K){return z+(O(K)||r.test(K)?"["+K+"]":(z?".":"")+K)},"")},forEach:function(D,z,K){_(Array.isArray(D)?D:g(D),z,K)}};function m(D){return c.get(D)||c.set(D,g(D).map(function(z){return z.replace(s,"$2")}))}function g(D){return D.match(t)||[""]}function _(D,z,K){var G=D.length,T,N,H,te;for(N=0;N<G;N++)T=D[N],T&&(E(T)&&(T='"'+T+'"'),te=O(T),H=!te&&/^\d+$/.test(T),z.call(K,T,te,H,N,D))}function O(D){return typeof D=="string"&&D&&["'",'"'].indexOf(D.charAt(0))!==-1}function S(D){return D.match(n)&&!D.match(r)}function v(D){return i.test(D)}function E(D){return!O(D)&&(S(D)||v(D))}return vs}var Dr=xb(),_s,$l;function Sb(){if($l)return _s;$l=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=m=>m.match(e)||[],r=m=>m[0].toUpperCase()+m.slice(1),n=(m,g)=>t(m).join(g).toLowerCase(),i=m=>t(m).reduce((g,_)=>`${g}${g?_[0].toUpperCase()+_.slice(1).toLowerCase():_.toLowerCase()}`,"");return _s={words:t,upperFirst:r,camelCase:i,pascalCase:m=>r(i(m)),snakeCase:m=>n(m,"_"),kebabCase:m=>n(m,"-"),sentenceCase:m=>r(n(m," ")),titleCase:m=>t(m).map(r).join(" ")},_s}var ws=Sb(),Di={exports:{}},Dl;function Tb(){if(Dl)return Di.exports;Dl=1,Di.exports=function(i){return e(t(i),i)},Di.exports.array=e;function e(i,s){var a=i.length,c=new Array(a),h={},p=a,m=r(s),g=n(i);for(s.forEach(function(O){if(!g.has(O[0])||!g.has(O[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});p--;)h[p]||_(i[p],p,new Set);return c;function _(O,S,v){if(v.has(O)){var E;try{E=", node was:"+JSON.stringify(O)}catch{E=""}throw new Error("Cyclic dependency"+E)}if(!g.has(O))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(O));if(!h[S]){h[S]=!0;var D=m.get(O)||new Set;if(D=Array.from(D),S=D.length){v.add(O);do{var z=D[--S];_(z,g.get(z),v)}while(S);v.delete(O)}c[--a]=O}}}function t(i){for(var s=new Set,a=0,c=i.length;a<c;a++){var h=i[a];s.add(h[0]),s.add(h[1])}return Array.from(s)}function r(i){for(var s=new Map,a=0,c=i.length;a<c;a++){var h=i[a];s.has(h[0])||s.set(h[0],new Set),s.has(h[1])||s.set(h[1],new Set),s.get(h[0]).add(h[1])}return s}function n(i){for(var s=new Map,a=0,c=i.length;a<c;a++)s.set(i[a],a);return s}return Di.exports}var Eb=Tb();const Cb=wn(Eb),Ob=Object.prototype.toString,Ab=Error.prototype.toString,Rb=RegExp.prototype.toString,kb=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",jb=/^Symbol\((.*)\)(.*)$/;function Pb(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Fl(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return Pb(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return kb.call(e).replace(jb,"Symbol($1)");const n=Ob.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Ab.call(e)+"]":n==="RegExp"?Rb.call(e):null}function pr(e,t){let r=Fl(e,t);return r!==null?r:JSON.stringify(e,function(n,i){let s=Fl(this[n],t);return s!==null?s:i},2)}function Ep(e){return e==null?[]:[].concat(e)}let Cp,Op,Ap,Ib=/\$\{\s*(\w+)\s*\}/g;Cp=Symbol.toStringTag;class Ml{constructor(t,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Cp]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],Ep(t).forEach(s=>{if(Rt.isError(s)){this.errors.push(...s.errors);const a=s.inner.length?s.inner:[s];this.inner.push(...a)}else this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Op=Symbol.hasInstance;Ap=Symbol.toStringTag;let Rt=class Rp extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Ib,(i,s)=>pr(r[s])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,i,s){const a=new Ml(t,r,n,i);if(s)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ap]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Rp)}static[Op](t){return Ml[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}},Wt={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${pr(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${pr(r,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${pr(r,!0)}\``+i}},St={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},dr={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},qu={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},$b={isValue:"${path} field must be ${value}"},Wi={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Db={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Fb={notType:e=>{const{path:t,value:r,spec:n}=e,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${pr(r,!0)}\``;if(r.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${pr(r,!0)}\``}return Rt.formatError(Wt.notType,e)}};Object.assign(Object.create(null),{mixed:Wt,string:St,number:dr,date:qu,object:Wi,array:Db,boolean:$b,tuple:Fb});const sc=e=>e&&e.__isYupSchema__;class Zi{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:s}=r,a=typeof n=="function"?n:(...c)=>c.every(h=>h===n);return new Zi(t,(c,h)=>{var p;let m=a(...c)?i:s;return(p=m==null?void 0:m(h))!=null?p:h})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(s=>s.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),i=this.fn(n,t,r);if(i===void 0||i===t)return t;if(!sc(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const Fi={context:"$",value:"."};class Ur{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Fi.context,this.isValue=this.key[0]===Fi.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Fi.context:this.isValue?Fi.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&Dr.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let i=this.isContext?n:this.isValue?t:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ur.prototype.__isYupRef=!0;const rr=e=>e==null;function sn(e){function t({value:r,path:n="",options:i,originalValue:s,schema:a},c,h){const{name:p,test:m,params:g,message:_,skipAbsent:O}=e;let{parent:S,context:v,abortEarly:E=a.spec.abortEarly,disableStackTrace:D=a.spec.disableStackTrace}=i;const z={value:r,parent:S,context:v};function K(oe={}){const w=kp(Object.assign({value:r,originalValue:s,label:a.spec.label,path:oe.path||n,spec:a.spec,disableStackTrace:oe.disableStackTrace||D},g,oe.params),z),Z=new Rt(Rt.formatError(oe.message||_,w),r,w.path,oe.type||p,w.disableStackTrace);return Z.params=w,Z}const G=E?c:h;let T={path:n,parent:S,type:p,from:i.from,createError:K,resolve(oe){return jp(oe,z)},options:i,originalValue:s,schema:a};const N=oe=>{Rt.isError(oe)?G(oe):oe?h(null):G(K())},H=oe=>{Rt.isError(oe)?G(oe):c(oe)};if(O&&rr(r))return N(!0);let pe;try{var ke;if(pe=m.call(T,r,T),typeof((ke=pe)==null?void 0:ke.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(pe).then(N,H)}}catch(oe){H(oe);return}N(pe)}return t.OPTIONS=e,t}function kp(e,t){if(!e)return e;for(const r of Object.keys(e))e[r]=jp(e[r],t);return e}function jp(e,t){return Ur.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Mb(e,t,r,n=r){let i,s,a;return t?(Dr.forEach(t,(c,h,p)=>{let m=h?c.slice(1,c.length-1):c;e=e.resolve({context:n,parent:i,value:r});let g=e.type==="tuple",_=p?parseInt(m,10):0;if(e.innerType||g){if(g&&!p)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&_>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);i=r,r=r&&r[_],e=g?e.spec.types[_]:e.innerType}if(!p){if(!e.fields||!e.fields[m])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);i=r,r=r&&r[m],e=e.fields[m]}s=m,a=h?"["+c+"]":"."+c}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Qi extends Set{describe(){const t=[];for(const r of this.values())t.push(Ur.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Qi(this.values())}merge(t,r){const n=this.clone();return t.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function dn(e,t=new Map){if(sc(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=dn(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,i]of e.entries())r.set(n,dn(i,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(dn(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,i]of Object.entries(e))r[n]=dn(i,t)}else throw Error(`Unable to clone ${e}`);return r}function Nb(e){if(!(e!=null&&e.length))return;const t=[];let r="",n=!1,i=!1;for(let s=0;s<e.length;s++){const a=e[s];if(a==="["&&!i){r&&(t.push(...r.split(".").filter(Boolean)),r=""),n=!0;continue}if(a==="]"&&!i){r&&(/^\d+$/.test(r)?t.push(r):t.push(r.replace(/^"|"$/g,"")),r=""),n=!1;continue}if(a==='"'){i=!i;continue}if(a==="."&&!n&&!i){r&&(t.push(r),r="");continue}r+=a}return r&&t.push(...r.split(".").filter(Boolean)),t}function qb(e,t){const r=t?`${t}.${e.path}`:e.path;return e.errors.map(n=>({message:n,path:Nb(r)}))}function Pp(e,t){var r;if(!((r=e.inner)!=null&&r.length)&&e.errors.length)return qb(e,t);const n=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(i=>Pp(i,n))}class Bt{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Qi,this._blacklist=new Qi,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Wt.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=dn(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(s=>{t.tests.forEach(a=>{s.test(a.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,s)=>s.resolve(i,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,i,s;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=t.recursive)!=null?i:this.spec.recursive,disableStackTrace:(s=t.disableStackTrace)!=null?s:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({},r,{value:t})),i=r.assert==="ignore-optionality",s=n._cast(t,r);if(r.assert!==!1&&!n.isType(s)){if(i&&rr(s))return s;let a=pr(t),c=pr(s);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
7
-
8
- attempted value: ${a}
9
- `+(c!==a?`result of cast: ${c}`:""))}return s}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((i,s)=>s.call(this,i,t,this,r),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,i){let{path:s,originalValue:a=t,strict:c=this.spec.strict}=r,h=t;c||(h=this._cast(h,Object.assign({assert:!1},r)));let p=[];for(let m of Object.values(this.internalTests))m&&p.push(m);this.runTests({path:s,value:h,originalValue:a,options:r,tests:p},n,m=>{if(m.length)return i(m,h);this.runTests({path:s,value:h,originalValue:a,options:r,tests:this.tests},n,i)})}runTests(t,r,n){let i=!1,{tests:s,value:a,originalValue:c,path:h,options:p}=t,m=v=>{i||(i=!0,r(v,a))},g=v=>{i||(i=!0,n(v,a))},_=s.length,O=[];if(!_)return g([]);let S={value:a,originalValue:c,path:h,options:p,schema:this};for(let v=0;v<s.length;v++){const E=s[v];E(S,m,function(z){z&&(Array.isArray(z)?O.push(...z):O.push(z)),--_<=0&&g(O)})}}asNestedTest({key:t,index:r,parent:n,parentPath:i,originalParent:s,options:a}){const c=t??r;if(c==null)throw TypeError("Must include `key` or `index` for nested validations");const h=typeof c=="number";let p=n[c];const m=Object.assign({},a,{strict:!0,parent:n,value:p,originalValue:s[c],key:void 0,[h?"index":"key"]:c,path:h||c.includes(".")?`${i||""}[${h?c:`"${c}"`}]`:(i?`${i}.`:"")+t});return(g,_,O)=>this.resolve(m)._validate(p,m,_,O)}validate(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),s=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((a,c)=>i._validate(t,r,(h,p)=>{Rt.isError(h)&&(h.value=p),c(h)},(h,p)=>{h.length?c(new Rt(h,p,void 0,void 0,s)):a(p)}))}validateSync(t,r){var n;let i=this.resolve(Object.assign({},r,{value:t})),s,a=(n=r==null?void 0:r.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(t,Object.assign({},r,{sync:!0}),(c,h)=>{throw Rt.isError(c)&&(c.value=h),c},(c,h)=>{if(c.length)throw new Rt(c,t,void 0,void 0,a);s=h}),s}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Rt.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Rt.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):dn(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=sn({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=sn({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Wt.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Wt.notNull){return this.nullability(!1,t)}required(t=Wt.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Wt.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=sn(r),s=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(a=>!(a.OPTIONS.name===r.name&&(s||a.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),i=Ep(t).map(s=>new Ur(s));return i.forEach(s=>{s.isSibling&&n.deps.push(s.key)}),n.conditions.push(typeof r=="function"?new Zi(i,r):Zi.fromOptions(i,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=sn({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Wt.oneOf){let n=this.clone();return t.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=sn({message:r,name:"oneOf",skipAbsent:!0,test(i){let s=this.schema._whitelist,a=s.resolveAll(this.resolve);return a.includes(i)?!0:this.createError({params:{values:Array.from(s).join(", "),resolved:a}})}}),n}notOneOf(t,r=Wt.notOneOf){let n=this.clone();return t.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=sn({message:r,name:"notOneOf",test(i){let s=this.schema._blacklist,a=s.resolveAll(this.resolve);return a.includes(i)?this.createError({params:{values:Array.from(s).join(", "),resolved:a}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:i,optional:s,nullable:a}=r.spec;return{meta:i,label:n,optional:s,nullable:a,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((h,p,m)=>m.findIndex(g=>g.OPTIONS.name===h.OPTIONS.name)===p).map(h=>{const p=h.OPTIONS.params&&t?kp(Object.assign({},h.OPTIONS.params),t):h.OPTIONS.params;return{name:h.OPTIONS.name,params:p}})}}get"~standard"(){const t=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await t.validate(n,{abortEarly:!1})}}catch(i){if(i instanceof Rt)return{issues:Pp(i)};throw i}}}}}Bt.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Bt.prototype[`${e}At`]=function(t,r,n={}){const{parent:i,parentPath:s,schema:a}=Mb(this,t,r,n.context);return a[e](i&&i[s],Object.assign({},n,{parent:i,path:t}))};for(const e of["equals","is"])Bt.prototype[e]=Bt.prototype.oneOf;for(const e of["not","nope"])Bt.prototype[e]=Bt.prototype.notOneOf;const Bb=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Lb(e){const t=Bu(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function Bu(e){var t,r;const n=Bb.exec(e);return n?{year:Zt(n[1]),month:Zt(n[2],1)-1,day:Zt(n[3],1),hour:Zt(n[4]),minute:Zt(n[5]),second:Zt(n[6]),millisecond:n[7]?Zt(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:Zt(n[10]),minuteOffset:Zt(n[11])}:null}function Zt(e,t=0){return Number(e)||t}let Ub=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Vb=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Kb=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,zb="^\\d{4}-\\d{2}-\\d{2}",Gb="\\d{2}:\\d{2}:\\d{2}",Wb="(([+-]\\d{2}(:?\\d{2})?)|Z)",Hb=new RegExp(`${zb}T${Gb}(\\.\\d+)?${Wb}$`),Yb=e=>rr(e)||e===e.trim(),Jb={}.toString();function Gn(){return new Ip}class Ip extends Bt{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r)=>{if(!this.spec.coerce||this.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===Jb?t:n})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Wt.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=St.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=St.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=St.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,i,s;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:s}=r:i=r),this.test({name:s||"matches",message:i||St.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&n||a.search(t)!==-1})}email(t=St.email){return this.matches(Ub,{name:"email",message:t,excludeEmptyString:!0})}url(t=St.url){return this.matches(Vb,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=St.uuid){return this.matches(Kb,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,i;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=t:r=t),this.matches(Hb,{name:"datetime",message:r||St.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||St.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:s=>{if(!s||n)return!0;const a=Bu(s);return a?!!a.z:!1}}).test({name:"datetime_precision",message:r||St.datetime_precision,params:{precision:i},skipAbsent:!0,test:s=>{if(!s||i==null)return!0;const a=Bu(s);return a?a.precision===i:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=St.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Yb})}lowercase(t=St.lowercase){return this.transform(r=>rr(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>rr(r)||r===r.toLowerCase()})}uppercase(t=St.uppercase){return this.transform(r=>rr(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>rr(r)||r===r.toUpperCase()})}}Gn.prototype=Ip.prototype;let Xb=e=>e!=+e;function $p(){return new Dp}class Dp extends Bt{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Xb(t)}}),this.withMutation(()=>{this.transform((t,r)=>{if(!this.spec.coerce)return t;let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)||n===null?n:parseFloat(n)})})}min(t,r=dr.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(t)}})}max(t,r=dr.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(t)}})}lessThan(t,r=dr.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(n){return n<this.resolve(t)}})}moreThan(t,r=dr.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(n){return n>this.resolve(t)}})}positive(t=dr.positive){return this.moreThan(0,t)}negative(t=dr.negative){return this.lessThan(0,t)}integer(t=dr.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>rr(t)?t:t|0)}round(t){var r;let n=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(n.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform(i=>rr(i)?i:Math[t](i))}}$p.prototype=Dp.prototype;let Zb=new Date(""),Qb=e=>Object.prototype.toString.call(e)==="[object Date]";class ac extends Bt{constructor(){super({type:"date",check(t){return Qb(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r)=>!this.spec.coerce||this.isType(t)||t===null?t:(t=Lb(t),isNaN(t)?ac.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ur.isRef(t))n=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(t,r=qu.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(t,r=qu.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}ac.INVALID_DATE=Zb;function ev(e,t=[]){let r=[],n=new Set,i=new Set(t.map(([a,c])=>`${a}-${c}`));function s(a,c){let h=Dr.split(a)[0];n.add(h),i.has(`${c}-${h}`)||r.push([c,h])}for(const a of Object.keys(e)){let c=e[a];n.add(a),Ur.isRef(c)&&c.isSibling?s(c.path,a):sc(c)&&"deps"in c&&c.deps.forEach(h=>s(h,a))}return Cb.array(Array.from(n),r).reverse()}function Nl(e,t){let r=1/0;return e.some((n,i)=>{var s;if((s=t.path)!=null&&s.includes(n))return r=i,!0}),r}function Fp(e){return(t,r)=>Nl(e,t)-Nl(e,r)}const tv=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Hi(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Hi(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Hi(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Hi)}):"optional"in e?e.optional():e}const rv=(e,t)=>{const r=[...Dr.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),i=Dr.getter(Dr.join(r),!0)(e);return!!(i&&n in i)};let ql=e=>Object.prototype.toString.call(e)==="[object Object]";function Bl(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const nv=Fp([]);function uc(e){return new Mp(e)}class Mp extends Bt{constructor(t){super({type:"object",check(r){return ql(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=nv,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let i=super._cast(t,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let s=this.fields,a=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,c=[].concat(this._nodes,Object.keys(i).filter(g=>!this._nodes.includes(g))),h={},p=Object.assign({},r,{parent:h,__validating:r.__validating||!1}),m=!1;for(const g of c){let _=s[g],O=g in i,S=i[g];if(_){let v;p.path=(r.path?`${r.path}.`:"")+g,_=_.resolve({value:S,context:r.context,parent:h});let E=_ instanceof Bt?_.spec:void 0,D=E==null?void 0:E.strict;if(E!=null&&E.strip){m=m||g in i;continue}v=!r.__validating||!D?_.cast(S,p):S,v!==void 0&&(h[g]=v)}else O&&!a&&(h[g]=S);(O!==g in h||h[g]!==S)&&(m=!0)}return m?h:i}_validate(t,r={},n,i){let{from:s=[],originalValue:a=t,recursive:c=this.spec.recursive}=r;r.from=[{schema:this,value:a},...s],r.__validating=!0,r.originalValue=a,super._validate(t,r,n,(h,p)=>{if(!c||!ql(p)){i(h,p);return}a=a||p;let m=[];for(let g of this._nodes){let _=this.fields[g];!_||Ur.isRef(_)||m.push(_.asNestedTest({options:r,key:g,parent:p,parentPath:r.path,originalParent:a}))}this.runTests({tests:m,value:p,originalValue:a,options:r},n,g=>{i(g.sort(this._sortErrors).concat(h),p)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[i,s]of Object.entries(this.fields)){const a=n[i];n[i]=a===void 0?s:a}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const s=this.fields[n];let a=t;(i=a)!=null&&i.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[n]})),r[n]=s&&"getDefault"in s?s.getDefault(a):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=ev(t,r),n._sortErrors=Fp(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),i)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Hi(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>t.includes(n)&&t.includes(i)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let i=Dr.getter(t,!0);return this.transform(s=>{if(!s)return s;let a=s;return rv(s,t)&&(a=Object.assign({},s),n||delete a[t],a[r]=i(s)),a})}json(){return this.transform(tv)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Wi.exact,test(r){if(r==null)return!0;const n=Bl(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=Wi.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const s=Bl(this.schema,i);return!t||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Wi.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[t(i)]=r[i];return n})}camelCase(){return this.transformKeys(ws.camelCase)}snakeCase(){return this.transformKeys(ws.snakeCase)}constantCase(){return this.transformKeys(t=>ws.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[s,a]of Object.entries(r.fields)){var i;let c=t;(i=c)!=null&&i.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[s]})),n.fields[s]=a.describe(c)}return n}}uc.prototype=Mp.prototype;class xt extends Error{constructor(t,r="CHAT_ERROR",n){super(t),this.name="ChatError",this.code=r,this.statusCode=n,Object.setPrototypeOf(this,xt.prototype)}}class cc extends xt{constructor(t="Authentication failed",r=401){super(t,"AUTH_ERROR",r),this.name="AuthError",Object.setPrototypeOf(this,cc.prototype)}}class lc extends xt{constructor(t="Network error occurred"){super(t,"NETWORK_ERROR"),this.name="NetworkError",Object.setPrototypeOf(this,lc.prototype)}}class fc extends xt{constructor(t="Validation failed"){super(t,"VALIDATION_ERROR",400),this.name="ValidationError",Object.setPrototypeOf(this,fc.prototype)}}class dc extends xt{constructor(t="Resource not found"){super(t,"NOT_FOUND",404),this.name="NotFoundError",Object.setPrototypeOf(this,dc.prototype)}}class hc extends xt{constructor(t="Permission denied"){super(t,"PERMISSION_ERROR",403),this.name="PermissionError",Object.setPrototypeOf(this,hc.prototype)}}function iv(e,t){switch(e){case 400:return new fc(t);case 401:return new cc(t);case 403:return new hc(t);case 404:return new dc(t);default:return new xt(t||"An error occurred","UNKNOWN_ERROR",e)}}const ov=uc().shape({baseURL:Gn().required(),timeout:$p().positive().optional(),authToken:Gn().optional(),extToken:Gn().optional()});function sv(e){const t={baseURL:e.baseURL,timeout:e.timeout||3e4,headers:{"Content-Type":"application/json"}},r=dt.create(t);return r.interceptors.request.use(n=>(e.authToken&&(n.headers.Authorization=`Bearer ${e.authToken}`),n),n=>Promise.reject(n)),r.interceptors.response.use(n=>n,n=>{if(!n.response)throw new lc(n.message||"Network error occurred");const{status:i,data:s}=n.response,a=(s==null?void 0:s.error)||(s==null?void 0:s.msg);throw iv(i,a)}),r}function av(e){try{const t=e.split(".");if(t.length!==3)return null;const n=t[1].replace(/-/g,"+").replace(/_/g,"/"),i=atob(n);return JSON.parse(i)}catch{return null}}function uv(e,t=0){if(!e)return!0;const r=av(e),n=(r==null?void 0:r.exp)??null;if(!n)return!0;const i=Math.floor(Date.now()/1e3);return n<=i+t}class cv{constructor(t){if(this.isRefreshing=!1,this.REFRESH_BEFORE_EXPIRY_SECONDS=600,!t.authToken&&!t.getAuthToken)throw new xt("Either authToken or getAuthToken must be provided in config","VALIDATION_ERROR");ov.validateSync(t),this.config=t,this.axiosInstance=sv(this.config)}setAuthToken(t){this.config.authToken=t}hasAuthToken(){return!!this.config.authToken}async ensureAuthToken(){if(!this.config.getAuthToken&&!this.config.authToken&&!this.config.extToken)throw new xt("No auth token set. Call exchangeToken() or setAuthToken() first.","AUTH_ERROR");if(!this.config.authToken&&this.config.extToken){this.exchangeToken(this.config.extToken);return}if(uv(this.config.authToken,this.REFRESH_BEFORE_EXPIRY_SECONDS)){await this.refreshAuthToken();return}}async refreshAuthToken(){if(!this.isRefreshing){if(!this.config.getAuthToken)throw new xt("Cannot refresh token: no getAuthToken function provided","AUTH_ERROR");this.isRefreshing=!0;try{const t=await this.config.getAuthToken();this.setAuthToken(t)}catch(t){throw this.isRefreshing=!1,t}this.isRefreshing=!1}}async exchangeToken(t,r){const n={token:t};if(r!=null&&r.deviceToken){if(n.device_token=r.deviceToken,!r.platform)throw new xt("platform is required when deviceToken is provided","VALIDATION_ERROR");n.platform=r.platform}const s=(await this.axiosInstance.post("/auth/token",n)).data.token;return this.setAuthToken(s),s}async getMe(){return await this.ensureAuthToken(),(await this.axiosInstance.get("/users/me")).data.user}async getUser(t){return await this.ensureAuthToken(),(await this.axiosInstance.get(`/users/${t}`)).data.user}async getUsers(t,r){if(await this.ensureAuthToken(),!t.length)return[];if(t.length>100)throw new xt("Cannot fetch more than 100 users at once","VALIDATION_ERROR",400);const n={ids:t.join(",")};return r!=null&&r.fields&&r.fields.length>0&&(n.fields=r.fields.join(",")),(await this.axiosInstance.get("/users",{params:n})).data.users}async searchUsers(t){await this.ensureAuthToken();const r={};return t!=null&&t.name&&(r.name=t.name),t!=null&&t.email&&(r.email=t.email),t!=null&&t.role&&(r.role=t.role),(await this.axiosInstance.get("/users/search",{params:r})).data.users}async sendDM(t,r){return await this.ensureAuthToken(),(await this.axiosInstance.post("/messages",{user:t,content:r})).data.message}async sendGroupMessage(t,r){return await this.ensureAuthToken(),(await this.axiosInstance.post("/messages",{group:t,content:r})).data.message}async getMessages(t){await this.ensureAuthToken();const r={};return t.group!==void 0&&(r.group=t.group),t.user!==void 0&&(r.user=t.user),t.cursorType&&(r.cursor_type=t.cursorType),t.cursorDatetime&&(r.cursor_datetime=t.cursorDatetime),t.limit&&(r.limit=t.limit),(await this.axiosInstance.get("/messages",{params:r})).data}async getMessagesSummary(t){await this.ensureAuthToken();const r={};return t!=null&&t.after&&(r.after=t.after),(await this.axiosInstance.get("/messages/summary",{params:r})).data.conversations}async createOrg(t){return await this.ensureAuthToken(),(await this.axiosInstance.post("/orgs",t)).data.org}async updateOrg(t,r){return await this.ensureAuthToken(),(await this.axiosInstance.patch(`/orgs/${t}`,r)).data.org}async deleteOrg(t){await this.ensureAuthToken(),await this.axiosInstance.delete(`/orgs/${t}`)}async getUserByExtId(t,r){return await this.ensureAuthToken(),(await this.axiosInstance.get(`/orgs/${t}/users/${r}`)).data.user}async createUser(t,r){return await this.ensureAuthToken(),(await this.axiosInstance.post(`/orgs/${t}/users`,r)).data.user}async deleteUser(t,r){await this.ensureAuthToken(),await this.axiosInstance.delete(`/orgs/${t}/users/${r}`)}async getGroups(t){return await this.ensureAuthToken(),(await this.axiosInstance.get(`/orgs/${t}/groups`)).data.groups}async getGroup(t,r){return await this.ensureAuthToken(),(await this.axiosInstance.get(`/orgs/${t}/groups/${r}`)).data.group}async createGroup(t,r){return await this.ensureAuthToken(),(await this.axiosInstance.post(`/orgs/${t}/groups`,r)).data.group}async updateGroup(t,r,n){return await this.ensureAuthToken(),(await this.axiosInstance.patch(`/orgs/${t}/groups/${r}`,n)).data.group}async deleteGroup(t,r){await this.ensureAuthToken(),await this.axiosInstance.delete(`/orgs/${t}/groups/${r}`)}async addGroupMembers(t,r,n){return await this.ensureAuthToken(),(await this.axiosInstance.post(`/orgs/${t}/groups/${r}/members`,{members:n})).data}async removeGroupMember(t,r,n){await this.ensureAuthToken(),await this.axiosInstance.delete(`/orgs/${t}/groups/${r}/members/${n}`)}async joinGroup(t,r,n="member"){return await this.ensureAuthToken(),(await this.axiosInstance.post(`/orgs/${t}/groups/${r}/join`,{role:n})).data}}var xs,Ll;function lv(){if(Ll)return xs;Ll=1;function e(){this.__data__=[],this.size=0}return xs=e,xs}var Ss,Ul;function fo(){if(Ul)return Ss;Ul=1;function e(t,r){return t===r||t!==t&&r!==r}return Ss=e,Ss}var Ts,Vl;function ho(){if(Vl)return Ts;Vl=1;var e=fo();function t(r,n){for(var i=r.length;i--;)if(e(r[i][0],n))return i;return-1}return Ts=t,Ts}var Es,Kl;function fv(){if(Kl)return Es;Kl=1;var e=ho(),t=Array.prototype,r=t.splice;function n(i){var s=this.__data__,a=e(s,i);if(a<0)return!1;var c=s.length-1;return a==c?s.pop():r.call(s,a,1),--this.size,!0}return Es=n,Es}var Cs,zl;function dv(){if(zl)return Cs;zl=1;var e=ho();function t(r){var n=this.__data__,i=e(n,r);return i<0?void 0:n[i][1]}return Cs=t,Cs}var Os,Gl;function hv(){if(Gl)return Os;Gl=1;var e=ho();function t(r){return e(this.__data__,r)>-1}return Os=t,Os}var As,Wl;function pv(){if(Wl)return As;Wl=1;var e=ho();function t(r,n){var i=this.__data__,s=e(i,r);return s<0?(++this.size,i.push([r,n])):i[s][1]=n,this}return As=t,As}var Rs,Hl;function po(){if(Hl)return Rs;Hl=1;var e=lv(),t=fv(),r=dv(),n=hv(),i=pv();function s(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var p=a[c];this.set(p[0],p[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=n,s.prototype.set=i,Rs=s,Rs}var ks,Yl;function mv(){if(Yl)return ks;Yl=1;var e=po();function t(){this.__data__=new e,this.size=0}return ks=t,ks}var js,Jl;function yv(){if(Jl)return js;Jl=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return js=e,js}var Ps,Xl;function gv(){if(Xl)return Ps;Xl=1;function e(t){return this.__data__.get(t)}return Ps=e,Ps}var Is,Zl;function bv(){if(Zl)return Is;Zl=1;function e(t){return this.__data__.has(t)}return Is=e,Is}var $s,Ql;function Np(){if(Ql)return $s;Ql=1;var e=typeof Bn=="object"&&Bn&&Bn.Object===Object&&Bn;return $s=e,$s}var Ds,ef;function xn(){if(ef)return Ds;ef=1;var e=Np(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Ds=r,Ds}var Fs,tf;function pc(){if(tf)return Fs;tf=1;var e=xn(),t=e.Symbol;return Fs=t,Fs}var Ms,rf;function vv(){if(rf)return Ms;rf=1;var e=pc(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function s(a){var c=r.call(a,i),h=a[i];try{a[i]=void 0;var p=!0}catch{}var m=n.call(a);return p&&(c?a[i]=h:delete a[i]),m}return Ms=s,Ms}var Ns,nf;function _v(){if(nf)return Ns;nf=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Ns=r,Ns}var qs,of;function oi(){if(of)return qs;of=1;var e=pc(),t=vv(),r=_v(),n="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function a(c){return c==null?c===void 0?i:n:s&&s in Object(c)?t(c):r(c)}return qs=a,qs}var Bs,sf;function Vr(){if(sf)return Bs;sf=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Bs=e,Bs}var Ls,af;function mc(){if(af)return Ls;af=1;var e=oi(),t=Vr(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function a(c){if(!t(c))return!1;var h=e(c);return h==n||h==i||h==r||h==s}return Ls=a,Ls}var Us,uf;function wv(){if(uf)return Us;uf=1;var e=xn(),t=e["__core-js_shared__"];return Us=t,Us}var Vs,cf;function xv(){if(cf)return Vs;cf=1;var e=wv(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return Vs=r,Vs}var Ks,lf;function Sv(){if(lf)return Ks;lf=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return Ks=r,Ks}var zs,ff;function Tv(){if(ff)return zs;ff=1;var e=mc(),t=xv(),r=Vr(),n=Sv(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,a=Function.prototype,c=Object.prototype,h=a.toString,p=c.hasOwnProperty,m=RegExp("^"+h.call(p).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function g(_){if(!r(_)||t(_))return!1;var O=e(_)?m:s;return O.test(n(_))}return zs=g,zs}var Gs,df;function Ev(){if(df)return Gs;df=1;function e(t,r){return t==null?void 0:t[r]}return Gs=e,Gs}var Ws,hf;function yc(){if(hf)return Ws;hf=1;var e=Tv(),t=Ev();function r(n,i){var s=t(n,i);return e(s)?s:void 0}return Ws=r,Ws}var Hs,pf;function qp(){if(pf)return Hs;pf=1;var e=yc(),t=xn(),r=e(t,"Map");return Hs=r,Hs}var Ys,mf;function mo(){if(mf)return Ys;mf=1;var e=yc(),t=e(Object,"create");return Ys=t,Ys}var Js,yf;function Cv(){if(yf)return Js;yf=1;var e=mo();function t(){this.__data__=e?e(null):{},this.size=0}return Js=t,Js}var Xs,gf;function Ov(){if(gf)return Xs;gf=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return Xs=e,Xs}var Zs,bf;function Av(){if(bf)return Zs;bf=1;var e=mo(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(s){var a=this.__data__;if(e){var c=a[s];return c===t?void 0:c}return n.call(a,s)?a[s]:void 0}return Zs=i,Zs}var Qs,vf;function Rv(){if(vf)return Qs;vf=1;var e=mo(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var s=this.__data__;return e?s[i]!==void 0:r.call(s,i)}return Qs=n,Qs}var ea,_f;function kv(){if(_f)return ea;_f=1;var e=mo(),t="__lodash_hash_undefined__";function r(n,i){var s=this.__data__;return this.size+=this.has(n)?0:1,s[n]=e&&i===void 0?t:i,this}return ea=r,ea}var ta,wf;function jv(){if(wf)return ta;wf=1;var e=Cv(),t=Ov(),r=Av(),n=Rv(),i=kv();function s(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var p=a[c];this.set(p[0],p[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=n,s.prototype.set=i,ta=s,ta}var ra,xf;function Pv(){if(xf)return ra;xf=1;var e=jv(),t=po(),r=qp();function n(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return ra=n,ra}var na,Sf;function Iv(){if(Sf)return na;Sf=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return na=e,na}var ia,Tf;function yo(){if(Tf)return ia;Tf=1;var e=Iv();function t(r,n){var i=r.__data__;return e(n)?i[typeof n=="string"?"string":"hash"]:i.map}return ia=t,ia}var oa,Ef;function $v(){if(Ef)return oa;Ef=1;var e=yo();function t(r){var n=e(this,r).delete(r);return this.size-=n?1:0,n}return oa=t,oa}var sa,Cf;function Dv(){if(Cf)return sa;Cf=1;var e=yo();function t(r){return e(this,r).get(r)}return sa=t,sa}var aa,Of;function Fv(){if(Of)return aa;Of=1;var e=yo();function t(r){return e(this,r).has(r)}return aa=t,aa}var ua,Af;function Mv(){if(Af)return ua;Af=1;var e=yo();function t(r,n){var i=e(this,r),s=i.size;return i.set(r,n),this.size+=i.size==s?0:1,this}return ua=t,ua}var ca,Rf;function Bp(){if(Rf)return ca;Rf=1;var e=Pv(),t=$v(),r=Dv(),n=Fv(),i=Mv();function s(a){var c=-1,h=a==null?0:a.length;for(this.clear();++c<h;){var p=a[c];this.set(p[0],p[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=r,s.prototype.has=n,s.prototype.set=i,ca=s,ca}var la,kf;function Nv(){if(kf)return la;kf=1;var e=po(),t=qp(),r=Bp(),n=200;function i(s,a){var c=this.__data__;if(c instanceof e){var h=c.__data__;if(!t||h.length<n-1)return h.push([s,a]),this.size=++c.size,this;c=this.__data__=new r(h)}return c.set(s,a),this.size=c.size,this}return la=i,la}var fa,jf;function qv(){if(jf)return fa;jf=1;var e=po(),t=mv(),r=yv(),n=gv(),i=bv(),s=Nv();function a(c){var h=this.__data__=new e(c);this.size=h.size}return a.prototype.clear=t,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=i,a.prototype.set=s,fa=a,fa}var da,Pf;function Lp(){if(Pf)return da;Pf=1;var e=yc(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return da=t,da}var ha,If;function gc(){if(If)return ha;If=1;var e=Lp();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return ha=t,ha}var pa,$f;function Up(){if($f)return pa;$f=1;var e=gc(),t=fo();function r(n,i,s){(s!==void 0&&!t(n[i],s)||s===void 0&&!(i in n))&&e(n,i,s)}return pa=r,pa}var ma,Df;function Bv(){if(Df)return ma;Df=1;function e(t){return function(r,n,i){for(var s=-1,a=Object(r),c=i(r),h=c.length;h--;){var p=c[t?h:++s];if(n(a[p],p,a)===!1)break}return r}}return ma=e,ma}var ya,Ff;function Lv(){if(Ff)return ya;Ff=1;var e=Bv(),t=e();return ya=t,ya}var Ln={exports:{}};Ln.exports;var Mf;function Uv(){return Mf||(Mf=1,(function(e,t){var r=xn(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s?r.Buffer:void 0,c=a?a.allocUnsafe:void 0;function h(p,m){if(m)return p.slice();var g=p.length,_=c?c(g):new p.constructor(g);return p.copy(_),_}e.exports=h})(Ln,Ln.exports)),Ln.exports}var ga,Nf;function Vv(){if(Nf)return ga;Nf=1;var e=xn(),t=e.Uint8Array;return ga=t,ga}var ba,qf;function Kv(){if(qf)return ba;qf=1;var e=Vv();function t(r){var n=new r.constructor(r.byteLength);return new e(n).set(new e(r)),n}return ba=t,ba}var va,Bf;function zv(){if(Bf)return va;Bf=1;var e=Kv();function t(r,n){var i=n?e(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return va=t,va}var _a,Lf;function Gv(){if(Lf)return _a;Lf=1;function e(t,r){var n=-1,i=t.length;for(r||(r=Array(i));++n<i;)r[n]=t[n];return r}return _a=e,_a}var wa,Uf;function Wv(){if(Uf)return wa;Uf=1;var e=Vr(),t=Object.create,r=(function(){function n(){}return function(i){if(!e(i))return{};if(t)return t(i);n.prototype=i;var s=new n;return n.prototype=void 0,s}})();return wa=r,wa}var xa,Vf;function Hv(){if(Vf)return xa;Vf=1;function e(t,r){return function(n){return t(r(n))}}return xa=e,xa}var Sa,Kf;function Vp(){if(Kf)return Sa;Kf=1;var e=Hv(),t=e(Object.getPrototypeOf,Object);return Sa=t,Sa}var Ta,zf;function Kp(){if(zf)return Ta;zf=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return Ta=t,Ta}var Ea,Gf;function Yv(){if(Gf)return Ea;Gf=1;var e=Wv(),t=Vp(),r=Kp();function n(i){return typeof i.constructor=="function"&&!r(i)?e(t(i)):{}}return Ea=n,Ea}var Ca,Wf;function Sn(){if(Wf)return Ca;Wf=1;function e(t){return t!=null&&typeof t=="object"}return Ca=e,Ca}var Oa,Hf;function Jv(){if(Hf)return Oa;Hf=1;var e=oi(),t=Sn(),r="[object Arguments]";function n(i){return t(i)&&e(i)==r}return Oa=n,Oa}var Aa,Yf;function zp(){if(Yf)return Aa;Yf=1;var e=Jv(),t=Sn(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(a){return t(a)&&n.call(a,"callee")&&!i.call(a,"callee")};return Aa=s,Aa}var Ra,Jf;function si(){if(Jf)return Ra;Jf=1;var e=Array.isArray;return Ra=e,Ra}var ka,Xf;function Gp(){if(Xf)return ka;Xf=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return ka=t,ka}var ja,Zf;function bc(){if(Zf)return ja;Zf=1;var e=mc(),t=Gp();function r(n){return n!=null&&t(n.length)&&!e(n)}return ja=r,ja}var Pa,Qf;function Xv(){if(Qf)return Pa;Qf=1;var e=bc(),t=Sn();function r(n){return t(n)&&e(n)}return Pa=r,Pa}var Un={exports:{}},Ia,ed;function Zv(){if(ed)return Ia;ed=1;function e(){return!1}return Ia=e,Ia}Un.exports;var td;function Wp(){return td||(td=1,(function(e,t){var r=xn(),n=Zv(),i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,c=a?r.Buffer:void 0,h=c?c.isBuffer:void 0,p=h||n;e.exports=p})(Un,Un.exports)),Un.exports}var $a,rd;function Qv(){if(rd)return $a;rd=1;var e=oi(),t=Vp(),r=Sn(),n="[object Object]",i=Function.prototype,s=Object.prototype,a=i.toString,c=s.hasOwnProperty,h=a.call(Object);function p(m){if(!r(m)||e(m)!=n)return!1;var g=t(m);if(g===null)return!0;var _=c.call(g,"constructor")&&g.constructor;return typeof _=="function"&&_ instanceof _&&a.call(_)==h}return $a=p,$a}var Da,nd;function e0(){if(nd)return Da;nd=1;var e=oi(),t=Gp(),r=Sn(),n="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",c="[object Error]",h="[object Function]",p="[object Map]",m="[object Number]",g="[object Object]",_="[object RegExp]",O="[object Set]",S="[object String]",v="[object WeakMap]",E="[object ArrayBuffer]",D="[object DataView]",z="[object Float32Array]",K="[object Float64Array]",G="[object Int8Array]",T="[object Int16Array]",N="[object Int32Array]",H="[object Uint8Array]",te="[object Uint8ClampedArray]",pe="[object Uint16Array]",ke="[object Uint32Array]",oe={};oe[z]=oe[K]=oe[G]=oe[T]=oe[N]=oe[H]=oe[te]=oe[pe]=oe[ke]=!0,oe[n]=oe[i]=oe[E]=oe[s]=oe[D]=oe[a]=oe[c]=oe[h]=oe[p]=oe[m]=oe[g]=oe[_]=oe[O]=oe[S]=oe[v]=!1;function w(Z){return r(Z)&&t(Z.length)&&!!oe[e(Z)]}return Da=w,Da}var Fa,id;function t0(){if(id)return Fa;id=1;function e(t){return function(r){return t(r)}}return Fa=e,Fa}var Vn={exports:{}};Vn.exports;var od;function r0(){return od||(od=1,(function(e,t){var r=Np(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,c=(function(){try{var h=i&&i.require&&i.require("util").types;return h||a&&a.binding&&a.binding("util")}catch{}})();e.exports=c})(Vn,Vn.exports)),Vn.exports}var Ma,sd;function Hp(){if(sd)return Ma;sd=1;var e=e0(),t=t0(),r=r0(),n=r&&r.isTypedArray,i=n?t(n):e;return Ma=i,Ma}var Na,ad;function Yp(){if(ad)return Na;ad=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Na=e,Na}var qa,ud;function n0(){if(ud)return qa;ud=1;var e=gc(),t=fo(),r=Object.prototype,n=r.hasOwnProperty;function i(s,a,c){var h=s[a];(!(n.call(s,a)&&t(h,c))||c===void 0&&!(a in s))&&e(s,a,c)}return qa=i,qa}var Ba,cd;function i0(){if(cd)return Ba;cd=1;var e=n0(),t=gc();function r(n,i,s,a){var c=!s;s||(s={});for(var h=-1,p=i.length;++h<p;){var m=i[h],g=a?a(s[m],n[m],m,s,n):void 0;g===void 0&&(g=n[m]),c?t(s,m,g):e(s,m,g)}return s}return Ba=r,Ba}var La,ld;function o0(){if(ld)return La;ld=1;function e(t,r){for(var n=-1,i=Array(t);++n<t;)i[n]=r(n);return i}return La=e,La}var Ua,fd;function Jp(){if(fd)return Ua;fd=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(n,i){var s=typeof n;return i=i??e,!!i&&(s=="number"||s!="symbol"&&t.test(n))&&n>-1&&n%1==0&&n<i}return Ua=r,Ua}var Va,dd;function s0(){if(dd)return Va;dd=1;var e=o0(),t=zp(),r=si(),n=Wp(),i=Jp(),s=Hp(),a=Object.prototype,c=a.hasOwnProperty;function h(p,m){var g=r(p),_=!g&&t(p),O=!g&&!_&&n(p),S=!g&&!_&&!O&&s(p),v=g||_||O||S,E=v?e(p.length,String):[],D=E.length;for(var z in p)(m||c.call(p,z))&&!(v&&(z=="length"||O&&(z=="offset"||z=="parent")||S&&(z=="buffer"||z=="byteLength"||z=="byteOffset")||i(z,D)))&&E.push(z);return E}return Va=h,Va}var Ka,hd;function a0(){if(hd)return Ka;hd=1;function e(t){var r=[];if(t!=null)for(var n in Object(t))r.push(n);return r}return Ka=e,Ka}var za,pd;function u0(){if(pd)return za;pd=1;var e=Vr(),t=Kp(),r=a0(),n=Object.prototype,i=n.hasOwnProperty;function s(a){if(!e(a))return r(a);var c=t(a),h=[];for(var p in a)p=="constructor"&&(c||!i.call(a,p))||h.push(p);return h}return za=s,za}var Ga,md;function Xp(){if(md)return Ga;md=1;var e=s0(),t=u0(),r=bc();function n(i){return r(i)?e(i,!0):t(i)}return Ga=n,Ga}var Wa,yd;function c0(){if(yd)return Wa;yd=1;var e=i0(),t=Xp();function r(n){return e(n,t(n))}return Wa=r,Wa}var Ha,gd;function l0(){if(gd)return Ha;gd=1;var e=Up(),t=Uv(),r=zv(),n=Gv(),i=Yv(),s=zp(),a=si(),c=Xv(),h=Wp(),p=mc(),m=Vr(),g=Qv(),_=Hp(),O=Yp(),S=c0();function v(E,D,z,K,G,T,N){var H=O(E,z),te=O(D,z),pe=N.get(te);if(pe){e(E,z,pe);return}var ke=T?T(H,te,z+"",E,D,N):void 0,oe=ke===void 0;if(oe){var w=a(te),Z=!w&&h(te),ee=!w&&!Z&&_(te);ke=te,w||Z||ee?a(H)?ke=H:c(H)?ke=n(H):Z?(oe=!1,ke=t(te,!0)):ee?(oe=!1,ke=r(te,!0)):ke=[]:g(te)||s(te)?(ke=H,s(H)?ke=S(H):(!m(H)||p(H))&&(ke=i(te))):oe=!1}oe&&(N.set(te,ke),G(ke,te,K,T,N),N.delete(te)),e(E,z,ke)}return Ha=v,Ha}var Ya,bd;function f0(){if(bd)return Ya;bd=1;var e=qv(),t=Up(),r=Lv(),n=l0(),i=Vr(),s=Xp(),a=Yp();function c(h,p,m,g,_){h!==p&&r(p,function(O,S){if(_||(_=new e),i(O))n(h,p,S,m,c,g,_);else{var v=g?g(a(h,S),O,S+"",h,p,_):void 0;v===void 0&&(v=O),t(h,S,v)}},s)}return Ya=c,Ya}var Ja,vd;function Zp(){if(vd)return Ja;vd=1;function e(t){return t}return Ja=e,Ja}var Xa,_d;function d0(){if(_d)return Xa;_d=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return Xa=e,Xa}var Za,wd;function h0(){if(wd)return Za;wd=1;var e=d0(),t=Math.max;function r(n,i,s){return i=t(i===void 0?n.length-1:i,0),function(){for(var a=arguments,c=-1,h=t(a.length-i,0),p=Array(h);++c<h;)p[c]=a[i+c];c=-1;for(var m=Array(i+1);++c<i;)m[c]=a[c];return m[i]=s(p),e(n,this,m)}}return Za=r,Za}var Qa,xd;function p0(){if(xd)return Qa;xd=1;function e(t){return function(){return t}}return Qa=e,Qa}var eu,Sd;function m0(){if(Sd)return eu;Sd=1;var e=p0(),t=Lp(),r=Zp(),n=t?function(i,s){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:r;return eu=n,eu}var tu,Td;function y0(){if(Td)return tu;Td=1;var e=800,t=16,r=Date.now;function n(i){var s=0,a=0;return function(){var c=r(),h=t-(c-a);if(a=c,h>0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return tu=n,tu}var ru,Ed;function g0(){if(Ed)return ru;Ed=1;var e=m0(),t=y0(),r=t(e);return ru=r,ru}var nu,Cd;function b0(){if(Cd)return nu;Cd=1;var e=Zp(),t=h0(),r=g0();function n(i,s){return r(t(i,s,e),i+"")}return nu=n,nu}var iu,Od;function v0(){if(Od)return iu;Od=1;var e=fo(),t=bc(),r=Jp(),n=Vr();function i(s,a,c){if(!n(c))return!1;var h=typeof a;return(h=="number"?t(c)&&r(a,c.length):h=="string"&&a in c)?e(c[a],s):!1}return iu=i,iu}var ou,Ad;function _0(){if(Ad)return ou;Ad=1;var e=b0(),t=v0();function r(n){return e(function(i,s){var a=-1,c=s.length,h=c>1?s[c-1]:void 0,p=c>2?s[2]:void 0;for(h=n.length>3&&typeof h=="function"?(c--,h):void 0,p&&t(s[0],s[1],p)&&(h=c<3?void 0:h,c=1),i=Object(i);++a<c;){var m=s[a];m&&n(i,m,a,h)}return i})}return ou=r,ou}var su,Rd;function w0(){if(Rd)return su;Rd=1;var e=f0(),t=_0(),r=t(function(n,i,s){e(n,i,s)});return su=r,su}var x0=w0();const S0=wn(x0);typeof CustomEvent>"u"&&(global.CustomEvent=class extends Event{constructor(t,r){super(t,r),this.detail=(r==null?void 0:r.detail)??null}});class T0 extends EventTarget{constructor(t){super(),this.ws=null,this.reconnectAttempt=0,this.reconnectTimer=null,this.intentionalClose=!1,this.WebSocketImpl=t.wsImplementation??this.getDefaultWebSocket(),this.config=S0({},t,{reconnection:{enabled:!0,maxRetries:5,initialDelay:1e3,maxDelay:3e4,backoffMultiplier:2},debug:!!t.logger})}async connect(){if(!this.isConnected())return this.connectionPromise?this.connectionPromise:(this.clearReconnectTimer(),this.connectionPromise=new Promise((t,r)=>{try{const n=this.buildWebSocketUrl();this.log(`Connecting to: ${n.replace(this.config.authToken,"***")}`),this.ws=new this.WebSocketImpl(n),this.ws.onopen=()=>{this.log("Connected"),this.reconnectAttempt=0,this.intentionalClose=!1,this.dispatchEvent(new Event("open")),t(),this.connectionPromise=void 0},this.ws.onmessage=i=>{try{const s=JSON.parse(i.data);this.dispatchEvent(new CustomEvent("message",{detail:s}))}catch(s){this.log("Failed to parse message",String(s)),this.dispatchEvent(new CustomEvent("error",{detail:new Error(`Failed to parse message: ${s instanceof Error?s.message:"Unknown error"}`)}))}},this.ws.onerror=()=>{this.dispatchEvent(new CustomEvent("error",{detail:new Error("WebSocket error occurred")})),r(new Error("WebSocket error occurred")),this.connectionPromise=void 0},this.ws.onclose=i=>{this.log(`Disconnected: code=${i.code}, reason="${i.reason}"`),this.dispatchEvent(new CustomEvent("close",{detail:{code:i.code,reason:i.reason}})),!this.intentionalClose&&this.config.reconnection.enabled&&this.scheduleReconnect()}}catch(n){r(new xt(`Failed to connect: ${n instanceof Error?n.message:"Unknown error"}`,"NETWORK_ERROR")),this.connectionPromise=void 0}}),this.connectionPromise)}disconnect(){this.intentionalClose=!0,this.clearReconnectTimer(),this.ws&&(this.ws.readyState===this.WebSocketImpl.OPEN&&this.ws.close(1e3,"Client closing connection"),this.ws=null)}async updateAuthToken(t){this.config.authToken=t,this.isConnected()&&(this.disconnect(),await this.connect())}isConnected(){var t;return((t=this.ws)==null?void 0:t.readyState)===this.WebSocketImpl.OPEN}send(t){if(!this.isConnected())throw new Error("WebSocket is not connected");const r=typeof t=="string"?t:JSON.stringify(t);this.ws.send(r)}on(t,r){return this.addEventListener(t,(n=>{n instanceof CustomEvent?r(n.detail):r()})),this}off(t,r){return this.removeEventListener(t,r),this}buildWebSocketUrl(){const{baseURL:t,authToken:r}=this.config;let n=t.replace(/^https?:\/\//,s=>s==="https://"?"wss://":"ws://");n=n.replace(/\/$/,"")+"/ws";const i=n.includes("?")?"&":"?";return n+=`${i}token=${encodeURIComponent(r)}`,n}scheduleReconnect(){const{maxRetries:t,initialDelay:r,maxDelay:n,backoffMultiplier:i}=this.config.reconnection;if(this.reconnectAttempt>=t){this.log(`Max reconnection attempts (${t}) reached`),this.dispatchEvent(new CustomEvent("reconnect_failed",{detail:new Error(`Max reconnection attempts (${t}) reached`)}));return}const s=Math.min(r*Math.pow(i,this.reconnectAttempt),n);this.reconnectAttempt++,this.log(`Reconnection attempt ${this.reconnectAttempt}/${t} in ${s}ms`),this.dispatchEvent(new CustomEvent("reconnect",{detail:{attempt:this.reconnectAttempt,delay:s}})),this.reconnectTimer=setTimeout(()=>{this.connect().catch(a=>{this.log(`Reconnection failed: ${a instanceof Error?a.message:String(a)}`)})},s)}clearReconnectTimer(){this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}log(t,r){if(!this.config.debug)return;const n=`[WSClient] ${t}`;r?console.error(n,r):console.log(n)}getDefaultWebSocket(){if(typeof WebSocket<"u")return WebSocket;try{return require("ws").WebSocket}catch{throw new xt("WebSocket not available. Install 'ws' package in Node.js: npm install ws","NETWORK_ERROR")}}}class E0 extends cv{constructor(t){super(t);const r={baseURL:t.baseURL,authToken:t.authToken||"",wsImplementation:t.wsImplementation};this.ws=new T0(r)}isConnected(){return this.ws.isConnected()}async setAuthToken(t){super.setAuthToken(t),await this.ws.updateAuthToken(t)}async connect(){return this.ws.connect()}disconnect(){this.ws.disconnect()}send(t){return this.ws.send(t)}on(...t){return this.ws.on(...t),this}off(...t){return this.ws.off(...t),this}}var kd;(function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.RECONNECTING="RECONNECTING"})(kd||(kd={}));const go=({type:e,id:t})=>`${e}:${t}`,C0=({group:e,user:t})=>`${e?"group":"user"}:${e||t}`,O0=(e,t)=>e.group?`group:${e.group}`:`dm:${e.sender===t?e.receiver:e.sender}`;var Yi={exports:{}},A0=Yi.exports,jd;function R0(){return jd||(jd=1,(function(e,t){((r,n)=>{e.exports=n()})(A0,function(){var r=function(o,u){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,f){l.__proto__=f}:function(l,f){for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&(l[d]=f[d])}))(o,u)},n=function(){return(n=Object.assign||function(o){for(var u,l=1,f=arguments.length;l<f;l++)for(var d in u=arguments[l])Object.prototype.hasOwnProperty.call(u,d)&&(o[d]=u[d]);return o}).apply(this,arguments)};function i(o,u,l){for(var f,d=0,y=u.length;d<y;d++)!f&&d in u||((f=f||Array.prototype.slice.call(u,0,d))[d]=u[d]);return o.concat(f||Array.prototype.slice.call(u))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Bn,a=Object.keys,c=Array.isArray;function h(o,u){return typeof u=="object"&&a(u).forEach(function(l){o[l]=u[l]}),o}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var p=Object.getPrototypeOf,m={}.hasOwnProperty;function g(o,u){return m.call(o,u)}function _(o,u){typeof u=="function"&&(u=u(p(o))),(typeof Reflect>"u"?a:Reflect.ownKeys)(u).forEach(function(l){S(o,l,u[l])})}var O=Object.defineProperty;function S(o,u,l,f){O(o,u,h(l&&g(l,"get")&&typeof l.get=="function"?{get:l.get,set:l.set,configurable:!0}:{value:l,configurable:!0,writable:!0},f))}function v(o){return{from:function(u){return o.prototype=Object.create(u.prototype),S(o.prototype,"constructor",o),{extend:_.bind(null,o.prototype)}}}}var E=Object.getOwnPropertyDescriptor,D=[].slice;function z(o,u,l){return D.call(o,u,l)}function K(o,u){return u(o)}function G(o){if(!o)throw new Error("Assertion Failed")}function T(o){s.setImmediate?setImmediate(o):setTimeout(o,0)}function N(o,u){if(typeof u=="string"&&g(o,u))return o[u];if(!u)return o;if(typeof u!="string"){for(var l=[],f=0,d=u.length;f<d;++f){var y=N(o,u[f]);l.push(y)}return l}var b,x=u.indexOf(".");return x===-1||(b=o[u.substr(0,x)])==null?void 0:N(b,u.substr(x+1))}function H(o,u,l){if(o&&u!==void 0&&!("isFrozen"in Object&&Object.isFrozen(o)))if(typeof u!="string"&&"length"in u){G(typeof l!="string"&&"length"in l);for(var f=0,d=u.length;f<d;++f)H(o,u[f],l[f])}else{var y,b,x=u.indexOf(".");x!==-1?(y=u.substr(0,x),(x=u.substr(x+1))===""?l===void 0?c(o)&&!isNaN(parseInt(y))?o.splice(y,1):delete o[y]:o[y]=l:H(b=(b=o[y])&&g(o,y)?b:o[y]={},x,l)):l===void 0?c(o)&&!isNaN(parseInt(u))?o.splice(u,1):delete o[u]:o[u]=l}}function te(o){var u,l={};for(u in o)g(o,u)&&(l[u]=o[u]);return l}var pe=[].concat;function ke(o){return pe.apply([],o)}var be="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ke([8,16,32,64].map(function(o){return["Int","Uint","Float"].map(function(u){return u+o+"Array"})}))).filter(function(o){return s[o]}),oe=new Set(be.map(function(o){return s[o]})),w=null;function Z(o){return w=new WeakMap,o=(function u(l){if(!l||typeof l!="object")return l;var f=w.get(l);if(f)return f;if(c(l)){f=[],w.set(l,f);for(var d=0,y=l.length;d<y;++d)f.push(u(l[d]))}else if(oe.has(l.constructor))f=l;else{var b,x=p(l);for(b in f=x===Object.prototype?{}:Object.create(x),w.set(l,f),l)g(l,b)&&(f[b]=u(l[b]))}return f})(o),w=null,o}var ee={}.toString;function ve(o){return ee.call(o).slice(8,-1)}var ge=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ze=typeof ge=="symbol"?function(o){var u;return o!=null&&(u=o[ge])&&u.apply(o)}:function(){return null};function $e(o,u){u=o.indexOf(u),0<=u&&o.splice(u,1)}var ut={};function Q(o){var u,l,f,d;if(arguments.length===1){if(c(o))return o.slice();if(this===ut&&typeof o=="string")return[o];if(d=ze(o))for(l=[];!(f=d.next()).done;)l.push(f.value);else{if(o==null)return[o];if(typeof(u=o.length)!="number")return[o];for(l=new Array(u);u--;)l[u]=o[u]}}else for(u=arguments.length,l=new Array(u);u--;)l[u]=arguments[u];return l}var ae=typeof Symbol<"u"?function(o){return o[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},be=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Se=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(be),Oe={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function _e(o,u){this.name=o,this.message=u}function Ae(o,u){return o+". Errors: "+Object.keys(u).map(function(l){return u[l].toString()}).filter(function(l,f,d){return d.indexOf(l)===f}).join(`
10
- `)}function Re(o,u,l,f){this.failures=u,this.failedKeys=f,this.successCount=l,this.message=Ae(o,u)}function Ee(o,u){this.name="BulkError",this.failures=Object.keys(u).map(function(l){return u[l]}),this.failuresByPos=u,this.message=Ae(o,this.failures)}v(_e).from(Error).extend({toString:function(){return this.name+": "+this.message}}),v(Re).from(_e),v(Ee).from(_e);var je=Se.reduce(function(o,u){return o[u]=u+"Error",o},{}),De=_e,ie=Se.reduce(function(o,u){var l=u+"Error";function f(d,y){this.name=l,d?typeof d=="string"?(this.message="".concat(d).concat(y?`
11
- `+y:""),this.inner=y||null):typeof d=="object"&&(this.message="".concat(d.name," ").concat(d.message),this.inner=d):(this.message=Oe[u]||l,this.inner=null)}return v(f).from(De),o[u]=f,o},{}),tt=(ie.Syntax=SyntaxError,ie.Type=TypeError,ie.Range=RangeError,be.reduce(function(o,u){return o[u+"Error"]=ie[u],o},{}));be=Se.reduce(function(o,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(o[u+"Error"]=ie[u]),o},{});function B(){}function rt(o){return o}function Ot(o,u){return o==null||o===rt?u:function(l){return u(o(l))}}function wt(o,u){return function(){o.apply(this,arguments),u.apply(this,arguments)}}function Fo(o,u){return o===B?u:function(){var l=o.apply(this,arguments),f=(l!==void 0&&(arguments[0]=l),this.onsuccess),d=this.onerror,y=(this.onsuccess=null,this.onerror=null,u.apply(this,arguments));return f&&(this.onsuccess=this.onsuccess?wt(f,this.onsuccess):f),d&&(this.onerror=this.onerror?wt(d,this.onerror):d),y!==void 0?y:l}}function Mo(o,u){return o===B?u:function(){o.apply(this,arguments);var l=this.onsuccess,f=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),l&&(this.onsuccess=this.onsuccess?wt(l,this.onsuccess):l),f&&(this.onerror=this.onerror?wt(f,this.onerror):f)}}function No(o,u){return o===B?u:function(d){var f=o.apply(this,arguments),d=(h(d,f),this.onsuccess),y=this.onerror,b=(this.onsuccess=null,this.onerror=null,u.apply(this,arguments));return d&&(this.onsuccess=this.onsuccess?wt(d,this.onsuccess):d),y&&(this.onerror=this.onerror?wt(y,this.onerror):y),f===void 0?b===void 0?void 0:b:h(f,b)}}function En(o,u){return o===B?u:function(){return u.apply(this,arguments)!==!1&&o.apply(this,arguments)}}function Cn(o,u){return o===B?u:function(){var l=o.apply(this,arguments);if(l&&typeof l.then=="function"){for(var f=this,d=arguments.length,y=new Array(d);d--;)y[d]=arguments[d];return l.then(function(){return u.apply(f,y)})}return u.apply(this,arguments)}}be.ModifyError=Re,be.DexieError=_e,be.BulkError=Ee;var It=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function U(o){It=o}var le={},ye=100,we=typeof Promise>"u"?[]:(Se=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[we=crypto.subtle.digest("SHA-512",new Uint8Array([0])),p(we),Se]:[Se,p(Se),Se]),Se=we[0],nn=we[1],nn=nn&&nn.then,Pe=Se&&Se.constructor,it=!!we[2],gt=function(o,u){On.push([o,u]),or&&(queueMicrotask(vy),or=!1)},_r=!0,or=!0,Yt=[],Hr=[],Yr=rt,Vt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:B,pgp:!1,env:{},finalize:B},xe=Vt,On=[],wr=0,fi=[];function fe(o){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=xe;if(typeof o!="function"){if(o!==le)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Bo(this,this._value)}else this._state=null,this._value=null,++u.ref,(function l(f,d){try{d(function(y){if(f._state===null){if(y===f)throw new TypeError("A promise cannot be resolved with itself.");var b=f._lib&&Jr();y&&typeof y.then=="function"?l(f,function(x,R){y instanceof fe?y._then(x,R):y.then(x,R)}):(f._state=!0,f._value=y,qc(f)),b&&Xr()}},Bo.bind(null,f))}catch(y){Bo(f,y)}})(this,o)}var qo={get:function(){var o=xe,u=mi;function l(f,d){var y=this,b=!o.global&&(o!==xe||u!==mi),x=b&&!ar(),R=new fe(function(M,k){Lo(y,new Nc(Lc(f,o,b,x),Lc(d,o,b,x),M,k,o))});return this._consoleTask&&(R._consoleTask=this._consoleTask),R}return l.prototype=le,l},set:function(o){S(this,"then",o&&o.prototype===le?qo:{get:function(){return o},set:qo.set})}};function Nc(o,u,l,f,d){this.onFulfilled=typeof o=="function"?o:null,this.onRejected=typeof u=="function"?u:null,this.resolve=l,this.reject=f,this.psd=d}function Bo(o,u){var l,f;Hr.push(u),o._state===null&&(l=o._lib&&Jr(),u=Yr(u),o._state=!1,o._value=u,f=o,Yt.some(function(d){return d._value===f._value})||Yt.push(f),qc(o),l)&&Xr()}function qc(o){var u=o._listeners;o._listeners=[];for(var l=0,f=u.length;l<f;++l)Lo(o,u[l]);var d=o._PSD;--d.ref||d.finalize(),wr===0&&(++wr,gt(function(){--wr==0&&Uo()},[]))}function Lo(o,u){if(o._state===null)o._listeners.push(u);else{var l=o._state?u.onFulfilled:u.onRejected;if(l===null)return(o._state?u.resolve:u.reject)(o._value);++u.psd.ref,++wr,gt(by,[l,o,u])}}function by(o,u,l){try{var f,d=u._value;!u._state&&Hr.length&&(Hr=[]),f=It&&u._consoleTask?u._consoleTask.run(function(){return o(d)}):o(d),u._state||Hr.indexOf(d)!==-1||(y=>{for(var b=Yt.length;b;)if(Yt[--b]._value===y._value)return Yt.splice(b,1)})(u),l.resolve(f)}catch(y){l.reject(y)}finally{--wr==0&&Uo(),--l.psd.ref||l.psd.finalize()}}function vy(){xr(Vt,function(){Jr()&&Xr()})}function Jr(){var o=_r;return or=_r=!1,o}function Xr(){var o,u,l;do for(;0<On.length;)for(o=On,On=[],l=o.length,u=0;u<l;++u){var f=o[u];f[0].apply(null,f[1])}while(0<On.length);or=_r=!0}function Uo(){for(var o=Yt,u=(Yt=[],o.forEach(function(f){f._PSD.onunhandled.call(null,f._value,f)}),fi.slice(0)),l=u.length;l;)u[--l]()}function di(o){return new fe(le,!1,o)}function Qe(o,u){var l=xe;return function(){var f=Jr(),d=xe;try{return ur(l,!0),o.apply(this,arguments)}catch(y){u&&u(y)}finally{ur(d,!1),f&&Xr()}}}_(fe.prototype,{then:qo,_then:function(o,u){Lo(this,new Nc(null,null,o,u,xe))},catch:function(o){var u,l;return arguments.length===1?this.then(null,o):(u=o,l=arguments[1],typeof u=="function"?this.then(null,function(f){return(f instanceof u?l:di)(f)}):this.then(null,function(f){return(f&&f.name===u?l:di)(f)}))},finally:function(o){return this.then(function(u){return fe.resolve(o()).then(function(){return u})},function(u){return fe.resolve(o()).then(function(){return di(u)})})},timeout:function(o,u){var l=this;return o<1/0?new fe(function(f,d){var y=setTimeout(function(){return d(new ie.Timeout(u))},o);l.then(f,d).finally(clearTimeout.bind(null,y))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&S(fe.prototype,Symbol.toStringTag,"Dexie.Promise"),Vt.env=Bc(),_(fe,{all:function(){var o=Q.apply(null,arguments).map(yi);return new fe(function(u,l){o.length===0&&u([]);var f=o.length;o.forEach(function(d,y){return fe.resolve(d).then(function(b){o[y]=b,--f||u(o)},l)})})},resolve:function(o){return o instanceof fe?o:o&&typeof o.then=="function"?new fe(function(u,l){o.then(u,l)}):new fe(le,!0,o)},reject:di,race:function(){var o=Q.apply(null,arguments).map(yi);return new fe(function(u,l){o.map(function(f){return fe.resolve(f).then(u,l)})})},PSD:{get:function(){return xe},set:function(o){return xe=o}},totalEchoes:{get:function(){return mi}},newPSD:sr,usePSD:xr,scheduler:{get:function(){return gt},set:function(o){gt=o}},rejectionMapper:{get:function(){return Yr},set:function(o){Yr=o}},follow:function(o,u){return new fe(function(l,f){return sr(function(d,y){var b=xe;b.unhandleds=[],b.onunhandled=y,b.finalize=wt(function(){var x,R=this;x=function(){R.unhandleds.length===0?d():y(R.unhandleds[0])},fi.push(function M(){x(),fi.splice(fi.indexOf(M),1)}),++wr,gt(function(){--wr==0&&Uo()},[])},b.finalize),o()},u,l,f)})}}),Pe&&(Pe.allSettled&&S(fe,"allSettled",function(){var o=Q.apply(null,arguments).map(yi);return new fe(function(u){o.length===0&&u([]);var l=o.length,f=new Array(l);o.forEach(function(d,y){return fe.resolve(d).then(function(b){return f[y]={status:"fulfilled",value:b}},function(b){return f[y]={status:"rejected",reason:b}}).then(function(){return--l||u(f)})})})}),Pe.any&&typeof AggregateError<"u"&&S(fe,"any",function(){var o=Q.apply(null,arguments).map(yi);return new fe(function(u,l){o.length===0&&l(new AggregateError([]));var f=o.length,d=new Array(f);o.forEach(function(y,b){return fe.resolve(y).then(function(x){return u(x)},function(x){d[b]=x,--f||l(new AggregateError(d))})})})}),Pe.withResolvers)&&(fe.withResolvers=Pe.withResolvers);var pt={awaits:0,echoes:0,id:0},_y=0,hi=[],pi=0,mi=0,wy=0;function sr(o,b,l,f){var d=xe,y=Object.create(d),b=(y.parent=d,y.ref=0,y.global=!1,y.id=++wy,Vt.env,y.env=it?{Promise:fe,PromiseProp:{value:fe,configurable:!0,writable:!0},all:fe.all,race:fe.race,allSettled:fe.allSettled,any:fe.any,resolve:fe.resolve,reject:fe.reject}:{},b&&h(y,b),++d.ref,y.finalize=function(){--this.parent.ref||this.parent.finalize()},xr(y,o,l,f));return y.ref===0&&y.finalize(),b}function Zr(){return pt.id||(pt.id=++_y),++pt.awaits,pt.echoes+=ye,pt.id}function ar(){return!!pt.awaits&&(--pt.awaits==0&&(pt.id=0),pt.echoes=pt.awaits*ye,!0)}function yi(o){return pt.echoes&&o&&o.constructor===Pe?(Zr(),o.then(function(u){return ar(),u},function(u){return ar(),ct(u)})):o}function xy(){var o=hi[hi.length-1];hi.pop(),ur(o,!1)}function ur(o,u){var l,f,d=xe;(u?!pt.echoes||pi++&&o===xe:!pi||--pi&&o===xe)||queueMicrotask(u?(function(y){++mi,pt.echoes&&--pt.echoes!=0||(pt.echoes=pt.awaits=pt.id=0),hi.push(xe),ur(y,!0)}).bind(null,o):xy),o!==xe&&(xe=o,d===Vt&&(Vt.env=Bc()),it)&&(l=Vt.env.Promise,f=o.env,d.global||o.global)&&(Object.defineProperty(s,"Promise",f.PromiseProp),l.all=f.all,l.race=f.race,l.resolve=f.resolve,l.reject=f.reject,f.allSettled&&(l.allSettled=f.allSettled),f.any)&&(l.any=f.any)}function Bc(){var o=s.Promise;return it?{Promise:o,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:o.all,race:o.race,allSettled:o.allSettled,any:o.any,resolve:o.resolve,reject:o.reject}:{}}function xr(o,u,l,f,d){var y=xe;try{return ur(o,!0),u(l,f,d)}finally{ur(y,!1)}}function Lc(o,u,l,f){return typeof o!="function"?o:function(){var d=xe;l&&Zr(),ur(u,!0);try{return o.apply(this,arguments)}finally{ur(d,!1),f&&queueMicrotask(ar)}}}function Vo(o){Promise===Pe&&pt.echoes===0?pi===0?o():enqueueNativeMicroTask(o):setTimeout(o,0)}(""+nn).indexOf("[native code]")===-1&&(Zr=ar=B);var ct=fe.reject,Sr="￿",Jt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Uc="String expected.",Qr=[],gi="__dbnames",Ko="readonly",zo="readwrite";function Tr(o,u){return o?u?function(){return o.apply(this,arguments)&&u.apply(this,arguments)}:o:u}var Vc={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function bi(o){return typeof o!="string"||/\./.test(o)?function(u){return u}:function(u){return u[o]===void 0&&o in u&&delete(u=Z(u))[o],u}}function Kc(){throw ie.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function Fe(o,u){try{var l=zc(o),f=zc(u);if(l!==f)return l==="Array"?1:f==="Array"?-1:l==="binary"?1:f==="binary"?-1:l==="string"?1:f==="string"?-1:l==="Date"?1:f!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return u<o?1:o<u?-1:0;case"binary":for(var d=Gc(o),y=Gc(u),b=d.length,x=y.length,R=b<x?b:x,M=0;M<R;++M)if(d[M]!==y[M])return d[M]<y[M]?-1:1;return b===x?0:b<x?-1:1;case"Array":for(var k=o,C=u,P=k.length,I=C.length,j=P<I?P:I,A=0;A<j;++A){var q=Fe(k[A],C[A]);if(q!==0)return q}return P===I?0:P<I?-1:1}}catch{}return NaN}function zc(o){var u=typeof o;return u=="object"&&(ArrayBuffer.isView(o)||(u=ve(o))==="ArrayBuffer")?"binary":u}function Gc(o){return o instanceof Uint8Array?o:ArrayBuffer.isView(o)?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):new Uint8Array(o)}function vi(o,u,l){var f=o.schema.yProps;return f?(u&&0<l.numFailures&&(u=u.filter(function(d,y){return!l.failures[y]})),Promise.all(f.map(function(d){return d=d.updatesTable,u?o.db.table(d).where("k").anyOf(u).delete():o.db.table(d).clear()})).then(function(){return l})):l}Wc.prototype.execute=function(o){var u=this["@@propmod"];if(u.add!==void 0){var l=u.add;if(c(l))return i(i([],c(o)?o:[],!0),l).sort();if(typeof l=="number")return(Number(o)||0)+l;if(typeof l=="bigint")try{return BigInt(o)+l}catch{return BigInt(0)+l}throw new TypeError("Invalid term ".concat(l))}if(u.remove!==void 0){var f=u.remove;if(c(f))return c(o)?o.filter(function(d){return!f.includes(d)}).sort():[];if(typeof f=="number")return Number(o)-f;if(typeof f=="bigint")try{return BigInt(o)-f}catch{return BigInt(0)-f}throw new TypeError("Invalid subtrahend ".concat(f))}return l=(l=u.replacePrefix)==null?void 0:l[0],l&&typeof o=="string"&&o.startsWith(l)?u.replacePrefix[1]+o.substring(l.length):o};var An=Wc;function Wc(o){this["@@propmod"]=o}function Hc(o,u){for(var l=a(u),f=l.length,d=!1,y=0;y<f;++y){var b=l[y],x=u[b],R=N(o,b);x instanceof An?(H(o,b,x.execute(R)),d=!0):R!==x&&(H(o,b,x),d=!0)}return d}Je.prototype._trans=function(o,u,l){var f=this._tx||xe.trans,d=this.name,y=It&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(o==="readonly"?"read":"write"," ").concat(this.name));function b(M,k,C){if(C.schema[d])return u(C.idbtrans,C);throw new ie.NotFound("Table "+d+" not part of transaction")}var x=Jr();try{var R=f&&f.db._novip===this.db._novip?f===xe.trans?f._promise(o,b,l):sr(function(){return f._promise(o,b,l)},{trans:f,transless:xe.transless||xe}):(function M(k,C,P,I){if(k.idbdb&&(k._state.openComplete||xe.letThrough||k._vip)){var j=k._createTransaction(C,P,k._dbSchema);try{j.create(),k._state.PR1398_maxLoop=3}catch(A){return A.name===je.InvalidState&&k.isOpen()&&0<--k._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),k.close({disableAutoOpen:!1}),k.open().then(function(){return M(k,C,P,I)})):ct(A)}return j._promise(C,function(A,q){return sr(function(){return xe.trans=j,I(A,q,j)})}).then(function(A){if(C==="readwrite")try{j.idbtrans.commit()}catch{}return C==="readonly"?A:j._completion.then(function(){return A})})}if(k._state.openComplete)return ct(new ie.DatabaseClosed(k._state.dbOpenError));if(!k._state.isBeingOpened){if(!k._state.autoOpen)return ct(new ie.DatabaseClosed);k.open().catch(B)}return k._state.dbReadyPromise.then(function(){return M(k,C,P,I)})})(this.db,o,[this.name],b);return y&&(R._consoleTask=y,R=R.catch(function(M){return console.trace(M),ct(M)})),R}finally{x&&Xr()}},Je.prototype.get=function(o,u){var l=this;return o&&o.constructor===Object?this.where(o).first(u):o==null?ct(new ie.Type("Invalid argument to Table.get()")):this._trans("readonly",function(f){return l.core.get({trans:f,key:o}).then(function(d){return l.hook.reading.fire(d)})}).then(u)},Je.prototype.where=function(o){if(typeof o=="string")return new this.db.WhereClause(this,o);if(c(o))return new this.db.WhereClause(this,"[".concat(o.join("+"),"]"));var u=a(o);if(u.length===1)return this.where(u[0]).equals(o[u[0]]);var l=this.schema.indexes.concat(this.schema.primKey).filter(function(x){if(x.compound&&u.every(function(M){return 0<=x.keyPath.indexOf(M)})){for(var R=0;R<u.length;++R)if(u.indexOf(x.keyPath[R])===-1)return!1;return!0}return!1}).sort(function(x,R){return x.keyPath.length-R.keyPath.length})[0];if(l&&this.db._maxKey!==Sr)return b=l.keyPath.slice(0,u.length),this.where(b).equals(b.map(function(x){return o[x]}));!l&&It&&console.warn("The query ".concat(JSON.stringify(o)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(u.join("+"),"]"));var f=this.schema.idxByName;function d(x,R){return Fe(x,R)===0}var b=u.reduce(function(k,R){var M=k[0],k=k[1],C=f[R],P=o[R];return[M||C,M||!C?Tr(k,C&&C.multi?function(I){return I=N(I,R),c(I)&&I.some(function(j){return d(P,j)})}:function(I){return d(P,N(I,R))}):k]},[null,null]),y=b[0],b=b[1];return y?this.where(y.name).equals(o[y.keyPath]).filter(b):l?this.filter(b):this.where(u).equals("")},Je.prototype.filter=function(o){return this.toCollection().and(o)},Je.prototype.count=function(o){return this.toCollection().count(o)},Je.prototype.offset=function(o){return this.toCollection().offset(o)},Je.prototype.limit=function(o){return this.toCollection().limit(o)},Je.prototype.each=function(o){return this.toCollection().each(o)},Je.prototype.toArray=function(o){return this.toCollection().toArray(o)},Je.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},Je.prototype.orderBy=function(o){return new this.db.Collection(new this.db.WhereClause(this,c(o)?"[".concat(o.join("+"),"]"):o))},Je.prototype.reverse=function(){return this.toCollection().reverse()},Je.prototype.mapToClass=function(o){for(var u=this.db,l=this.name,f=((this.schema.mappedClass=o).prototype instanceof Kc&&(o=(b=>{var x=k,R=b;if(typeof R!="function"&&R!==null)throw new TypeError("Class extends value "+String(R)+" is not a constructor or null");function M(){this.constructor=x}function k(){return b!==null&&b.apply(this,arguments)||this}return r(x,R),x.prototype=R===null?Object.create(R):(M.prototype=R.prototype,new M),Object.defineProperty(k.prototype,"db",{get:function(){return u},enumerable:!1,configurable:!0}),k.prototype.table=function(){return l},k})(o)),new Set),d=o.prototype;d;d=p(d))Object.getOwnPropertyNames(d).forEach(function(b){return f.add(b)});function y(b){if(!b)return b;var x,R=Object.create(o.prototype);for(x in b)if(!f.has(x))try{R[x]=b[x]}catch{}return R}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=y,this.hook("reading",y),o},Je.prototype.defineClass=function(){return this.mapToClass(function(o){h(this,o)})},Je.prototype.add=function(o,u){var l=this,f=this.schema.primKey,d=f.auto,y=f.keyPath,b=o;return y&&d&&(b=bi(y)(o)),this._trans("readwrite",function(x){return l.core.mutate({trans:x,type:"add",keys:u!=null?[u]:null,values:[b]})}).then(function(x){return x.numFailures?fe.reject(x.failures[0]):x.lastResult}).then(function(x){if(y)try{H(o,y,x)}catch{}return x})},Je.prototype.upsert=function(o,u){var l=this,f=this.schema.primKey.keyPath;return this._trans("readwrite",function(d){return l.core.get({trans:d,key:o}).then(function(y){var b=y??{};return Hc(b,u),f&&H(b,f,o),l.core.mutate({trans:d,type:"put",values:[b],keys:[o],upsert:!0,updates:{keys:[o],changeSpecs:[u]}}).then(function(x){return x.numFailures?fe.reject(x.failures[0]):!!y})})})},Je.prototype.update=function(o,u){return typeof o!="object"||c(o)?this.where(":id").equals(o).modify(u):(o=N(o,this.schema.primKey.keyPath))===void 0?ct(new ie.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(o).modify(u)},Je.prototype.put=function(o,u){var l=this,f=this.schema.primKey,d=f.auto,y=f.keyPath,b=o;return y&&d&&(b=bi(y)(o)),this._trans("readwrite",function(x){return l.core.mutate({trans:x,type:"put",values:[b],keys:u!=null?[u]:null})}).then(function(x){return x.numFailures?fe.reject(x.failures[0]):x.lastResult}).then(function(x){if(y)try{H(o,y,x)}catch{}return x})},Je.prototype.delete=function(o){var u=this;return this._trans("readwrite",function(l){return u.core.mutate({trans:l,type:"delete",keys:[o]}).then(function(f){return vi(u,[o],f)}).then(function(f){return f.numFailures?fe.reject(f.failures[0]):void 0})})},Je.prototype.clear=function(){var o=this;return this._trans("readwrite",function(u){return o.core.mutate({trans:u,type:"deleteRange",range:Vc}).then(function(l){return vi(o,null,l)})}).then(function(u){return u.numFailures?fe.reject(u.failures[0]):void 0})},Je.prototype.bulkGet=function(o){var u=this;return this._trans("readonly",function(l){return u.core.getMany({keys:o,trans:l}).then(function(f){return f.map(function(d){return u.hook.reading.fire(d)})})})},Je.prototype.bulkAdd=function(o,u,l){var f=this,d=Array.isArray(u)?u:void 0,y=(l=l||(d?void 0:u))?l.allKeys:void 0;return this._trans("readwrite",function(b){var x=f.schema.primKey,M=x.auto,x=x.keyPath;if(x&&d)throw new ie.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(d&&d.length!==o.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");var R=o.length,M=x&&M?o.map(bi(x)):o;return f.core.mutate({trans:b,type:"add",keys:d,values:M,wantResults:y}).then(function(k){var C=k.numFailures,P=k.failures;if(C===0)return y?k.results:k.lastResult;throw new Ee("".concat(f.name,".bulkAdd(): ").concat(C," of ").concat(R," operations failed"),P)})})},Je.prototype.bulkPut=function(o,u,l){var f=this,d=Array.isArray(u)?u:void 0,y=(l=l||(d?void 0:u))?l.allKeys:void 0;return this._trans("readwrite",function(b){var x=f.schema.primKey,M=x.auto,x=x.keyPath;if(x&&d)throw new ie.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(d&&d.length!==o.length)throw new ie.InvalidArgument("Arguments objects and keys must have the same length");var R=o.length,M=x&&M?o.map(bi(x)):o;return f.core.mutate({trans:b,type:"put",keys:d,values:M,wantResults:y}).then(function(k){var C=k.numFailures,P=k.failures;if(C===0)return y?k.results:k.lastResult;throw new Ee("".concat(f.name,".bulkPut(): ").concat(C," of ").concat(R," operations failed"),P)})})},Je.prototype.bulkUpdate=function(o){var u=this,l=this.core,f=o.map(function(b){return b.key}),d=o.map(function(b){return b.changes}),y=[];return this._trans("readwrite",function(b){return l.getMany({trans:b,keys:f,cache:"clone"}).then(function(x){var R=[],M=[],k=(o.forEach(function(C,P){var I=C.key,j=C.changes,A=x[P];if(A){for(var q=0,L=Object.keys(j);q<L.length;q++){var F=L[q],Y=j[F];if(F===u.schema.primKey.keyPath){if(Fe(Y,I)!==0)throw new ie.Constraint("Cannot update primary key in bulkUpdate()")}else H(A,F,Y)}y.push(P),R.push(I),M.push(A)}}),R.length);return l.mutate({trans:b,type:"put",keys:R,values:M,updates:{keys:f,changeSpecs:d}}).then(function(C){var P=C.numFailures,I=C.failures;if(P===0)return k;for(var j=0,A=Object.keys(I);j<A.length;j++){var q,L=A[j],F=y[Number(L)];F!=null&&(q=I[L],delete I[L],I[F]=q)}throw new Ee("".concat(u.name,".bulkUpdate(): ").concat(P," of ").concat(k," operations failed"),I)})})})},Je.prototype.bulkDelete=function(o){var u=this,l=o.length;return this._trans("readwrite",function(f){return u.core.mutate({trans:f,type:"delete",keys:o}).then(function(d){return vi(u,o,d)})}).then(function(f){var d=f.numFailures,y=f.failures;if(d===0)return f.lastResult;throw new Ee("".concat(u.name,".bulkDelete(): ").concat(d," of ").concat(l," operations failed"),y)})};var Yc=Je;function Je(){}function Rn(o){function u(b,x){if(x){for(var R=arguments.length,M=new Array(R-1);--R;)M[R-1]=arguments[R];return l[b].subscribe.apply(null,M),o}if(typeof b=="string")return l[b]}var l={};u.addEventType=y;for(var f=1,d=arguments.length;f<d;++f)y(arguments[f]);return u;function y(b,x,R){var M,k;if(typeof b!="object")return x=x||En,k={subscribers:[],fire:R=R||B,subscribe:function(C){k.subscribers.indexOf(C)===-1&&(k.subscribers.push(C),k.fire=x(k.fire,C))},unsubscribe:function(C){k.subscribers=k.subscribers.filter(function(P){return P!==C}),k.fire=k.subscribers.reduce(x,R)}},l[b]=u[b]=k;a(M=b).forEach(function(C){var P=M[C];if(c(P))y(C,M[C][0],M[C][1]);else{if(P!=="asap")throw new ie.InvalidArgument("Invalid event config");var I=y(C,rt,function(){for(var j=arguments.length,A=new Array(j);j--;)A[j]=arguments[j];I.subscribers.forEach(function(q){T(function(){q.apply(null,A)})})})}})}}function kn(o,u){return v(u).from({prototype:o}),u}function en(o,u){return!(o.filter||o.algorithm||o.or)&&(u?o.justLimit:!o.replayFilter)}function Go(o,u){o.filter=Tr(o.filter,u)}function Wo(o,u,l){var f=o.replayFilter;o.replayFilter=f?function(){return Tr(f(),u())}:u,o.justLimit=l&&!f}function _i(o,u){if(o.isPrimKey)return u.primaryKey;var l=u.getIndexByKeyPath(o.index);if(l)return l;throw new ie.Schema("KeyPath "+o.index+" on object store "+u.name+" is not indexed")}function Jc(o,u,l){var f=_i(o,u.schema);return u.openCursor({trans:l,values:!o.keysOnly,reverse:o.dir==="prev",unique:!!o.unique,query:{index:f,range:o.range}})}function wi(o,u,l,f){var d,y,b=o.replayFilter?Tr(o.filter,o.replayFilter()):o.filter;return o.or?(d={},y=function(x,R,M){var k,C;b&&!b(R,M,function(P){return R.stop(P)},function(P){return R.fail(P)})||((C=""+(k=R.primaryKey))=="[object ArrayBuffer]"&&(C=""+new Uint8Array(k)),g(d,C))||(d[C]=!0,u(x,R,M))},Promise.all([o.or._iterate(y,l),Xc(Jc(o,f,l),o.algorithm,y,!o.keysOnly&&o.valueMapper)])):Xc(Jc(o,f,l),Tr(o.algorithm,b),u,!o.keysOnly&&o.valueMapper)}function Xc(o,u,l,f){var d=Qe(f?function(y,b,x){return l(f(y),b,x)}:l);return o.then(function(y){if(y)return y.start(function(){var b=function(){return y.continue()};u&&!u(y,function(x){return b=x},function(x){y.stop(x),b=B},function(x){y.fail(x),b=B})||d(y.value,y,function(x){return b=x}),b()})})}Ne.prototype._read=function(o,u){var l=this._ctx;return l.error?l.table._trans(null,ct.bind(null,l.error)):l.table._trans("readonly",o).then(u)},Ne.prototype._write=function(o){var u=this._ctx;return u.error?u.table._trans(null,ct.bind(null,u.error)):u.table._trans("readwrite",o,"locked")},Ne.prototype._addAlgorithm=function(o){var u=this._ctx;u.algorithm=Tr(u.algorithm,o)},Ne.prototype._iterate=function(o,u){return wi(this._ctx,o,u,this._ctx.table.core)},Ne.prototype.clone=function(o){var u=Object.create(this.constructor.prototype),l=Object.create(this._ctx);return o&&h(l,o),u._ctx=l,u},Ne.prototype.raw=function(){return this._ctx.valueMapper=null,this},Ne.prototype.each=function(o){var u=this._ctx;return this._read(function(l){return wi(u,o,l,u.table.core)})},Ne.prototype.count=function(o){var u=this;return this._read(function(l){var f,d=u._ctx,y=d.table.core;return en(d,!0)?y.count({trans:l,query:{index:_i(d,y.schema),range:d.range}}).then(function(b){return Math.min(b,d.limit)}):(f=0,wi(d,function(){return++f,!1},l,y).then(function(){return f}))}).then(o)},Ne.prototype.sortBy=function(o,u){var l=o.split(".").reverse(),f=l[0],d=l.length-1;function y(R,M){return M?y(R[l[M]],M-1):R[f]}var b=this._ctx.dir==="next"?1:-1;function x(R,M){return Fe(y(R,d),y(M,d))*b}return this.toArray(function(R){return R.sort(x)}).then(u)},Ne.prototype.toArray=function(o){var u=this;return this._read(function(l){var f,d,y,b=u._ctx;return b.dir==="next"&&en(b,!0)&&0<b.limit?(f=b.valueMapper,d=_i(b,b.table.core.schema),b.table.core.query({trans:l,limit:b.limit,values:!0,query:{index:d,range:b.range}}).then(function(x){return x=x.result,f?x.map(f):x})):(y=[],wi(b,function(x){return y.push(x)},l,b.table.core).then(function(){return y}))},o)},Ne.prototype.offset=function(o){var u=this._ctx;return o<=0||(u.offset+=o,en(u)?Wo(u,function(){var l=o;return function(f,d){return l===0||(l===1?--l:d(function(){f.advance(l),l=0}),!1)}}):Wo(u,function(){var l=o;return function(){return--l<0}})),this},Ne.prototype.limit=function(o){return this._ctx.limit=Math.min(this._ctx.limit,o),Wo(this._ctx,function(){var u=o;return function(l,f,d){return--u<=0&&f(d),0<=u}},!0),this},Ne.prototype.until=function(o,u){return Go(this._ctx,function(l,f,d){return!o(l.value)||(f(d),u)}),this},Ne.prototype.first=function(o){return this.limit(1).toArray(function(u){return u[0]}).then(o)},Ne.prototype.last=function(o){return this.reverse().first(o)},Ne.prototype.filter=function(o){var u;return Go(this._ctx,function(l){return o(l.value)}),(u=this._ctx).isMatch=Tr(u.isMatch,o),this},Ne.prototype.and=function(o){return this.filter(o)},Ne.prototype.or=function(o){return new this.db.WhereClause(this._ctx.table,o,this)},Ne.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Ne.prototype.desc=function(){return this.reverse()},Ne.prototype.eachKey=function(o){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(l,f){o(f.key,f)})},Ne.prototype.eachUniqueKey=function(o){return this._ctx.unique="unique",this.eachKey(o)},Ne.prototype.eachPrimaryKey=function(o){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(l,f){o(f.primaryKey,f)})},Ne.prototype.keys=function(o){var u=this._ctx,l=(u.keysOnly=!u.isMatch,[]);return this.each(function(f,d){l.push(d.key)}).then(function(){return l}).then(o)},Ne.prototype.primaryKeys=function(o){var u=this._ctx;if(u.dir==="next"&&en(u,!0)&&0<u.limit)return this._read(function(f){var d=_i(u,u.table.core.schema);return u.table.core.query({trans:f,values:!1,limit:u.limit,query:{index:d,range:u.range}})}).then(function(f){return f.result}).then(o);u.keysOnly=!u.isMatch;var l=[];return this.each(function(f,d){l.push(d.primaryKey)}).then(function(){return l}).then(o)},Ne.prototype.uniqueKeys=function(o){return this._ctx.unique="unique",this.keys(o)},Ne.prototype.firstKey=function(o){return this.limit(1).keys(function(u){return u[0]}).then(o)},Ne.prototype.lastKey=function(o){return this.reverse().firstKey(o)},Ne.prototype.distinct=function(){var o,u=this._ctx,u=u.index&&u.table.schema.idxByName[u.index];return u&&u.multi&&(o={},Go(this._ctx,function(f){var f=f.primaryKey.toString(),d=g(o,f);return o[f]=!0,!d})),this},Ne.prototype.modify=function(o){var u=this,l=this._ctx;return this._write(function(f){function d(A,q){var L=q.failures;P+=A-q.numFailures;for(var F=0,Y=a(L);F<Y.length;F++){var re=Y[F];C.push(L[re])}}var y=typeof o=="function"?o:function(A){return Hc(A,o)},b=l.table.core,k=b.schema.primaryKey,x=k.outbound,R=k.extractKey,M=200,k=u.db._options.modifyChunkSize,C=(k&&(M=typeof k=="object"?k[b.name]||k["*"]||200:k),[]),P=0,I=[],j=o===Zc;return u.clone().primaryKeys().then(function(A){function q(F){var Y=Math.min(M,A.length-F),re=A.slice(F,F+Y);return(j?Promise.resolve([]):b.getMany({trans:f,keys:re,cache:"immutable"})).then(function(ue){var ce=[],ne=[],he=x?[]:null,de=j?re:[];if(!j)for(var se=0;se<Y;++se){var me=ue[se],Me={value:Z(me),primKey:A[F+se]};y.call(Me,Me.value,Me)!==!1&&(Me.value==null?de.push(A[F+se]):x||Fe(R(me),R(Me.value))===0?(ne.push(Me.value),x&&he.push(A[F+se])):(de.push(A[F+se]),ce.push(Me.value)))}return Promise.resolve(0<ce.length&&b.mutate({trans:f,type:"add",values:ce}).then(function(qe){for(var Te in qe.failures)de.splice(parseInt(Te),1);d(ce.length,qe)})).then(function(){return(0<ne.length||L&&typeof o=="object")&&b.mutate({trans:f,type:"put",keys:he,values:ne,criteria:L,changeSpec:typeof o!="function"&&o,isAdditionalChunk:0<F}).then(function(qe){return d(ne.length,qe)})}).then(function(){return(0<de.length||L&&j)&&b.mutate({trans:f,type:"delete",keys:de,criteria:L,isAdditionalChunk:0<F}).then(function(qe){return vi(l.table,de,qe)}).then(function(qe){return d(de.length,qe)})}).then(function(){return A.length>F+Y&&q(F+M)})})}var L=en(l)&&l.limit===1/0&&(typeof o!="function"||j)&&{index:l.index,range:l.range};return q(0).then(function(){if(0<C.length)throw new Re("Error modifying one or more objects",C,P,I);return A.length})})})},Ne.prototype.delete=function(){var o=this._ctx,u=o.range;return!en(o)||o.table.schema.yProps||!o.isPrimKey&&u.type!==3?this.modify(Zc):this._write(function(l){var f=o.table.core.schema.primaryKey,d=u;return o.table.core.count({trans:l,query:{index:f,range:d}}).then(function(y){return o.table.core.mutate({trans:l,type:"deleteRange",range:d}).then(function(R){var x=R.failures,R=R.numFailures;if(R)throw new Re("Could not delete some values",Object.keys(x).map(function(M){return x[M]}),y-R);return y-R})})})};var Sy=Ne;function Ne(){}var Zc=function(o,u){return u.value=null};function Ty(o,u){return o<u?-1:o===u?0:1}function Ey(o,u){return u<o?-1:o===u?0:1}function At(o,u,l){return o=o instanceof el?new o.Collection(o):o,o._ctx.error=new(l||TypeError)(u),o}function tn(o){return new o.Collection(o,function(){return Qc("")}).limit(0)}function xi(I,u,l,f){var d,y,b,x,R,M,k,C=l.length;if(!l.every(function(A){return typeof A=="string"}))return At(I,Uc);function P(A){d=A==="next"?function(L){return L.toUpperCase()}:function(L){return L.toLowerCase()},y=A==="next"?function(L){return L.toLowerCase()}:function(L){return L.toUpperCase()},b=A==="next"?Ty:Ey;var q=l.map(function(L){return{lower:y(L),upper:d(L)}}).sort(function(L,F){return b(L.lower,F.lower)});x=q.map(function(L){return L.upper}),R=q.map(function(L){return L.lower}),k=(M=A)==="next"?"":f}P("next");var I=new I.Collection(I,function(){return cr(x[0],R[C-1]+f)}),j=(I._ondirectionchange=function(A){P(A)},0);return I._addAlgorithm(function(A,q,L){var F=A.key;if(typeof F=="string"){var Y=y(F);if(u(Y,R,j))return!0;for(var re=null,ue=j;ue<C;++ue){var ce=((ne,he,de,se,me,Me)=>{for(var qe=Math.min(ne.length,se.length),Te=-1,Ie=0;Ie<qe;++Ie){var nt=he[Ie];if(nt!==se[Ie])return me(ne[Ie],de[Ie])<0?ne.substr(0,Ie)+de[Ie]+de.substr(Ie+1):me(ne[Ie],se[Ie])<0?ne.substr(0,Ie)+se[Ie]+de.substr(Ie+1):0<=Te?ne.substr(0,Te)+he[Te]+de.substr(Te+1):null;me(ne[Ie],nt)<0&&(Te=Ie)}return qe<se.length&&Me==="next"?ne+de.substr(ne.length):qe<ne.length&&Me==="prev"?ne.substr(0,de.length):Te<0?null:ne.substr(0,Te)+se[Te]+de.substr(Te+1)})(F,Y,x[ue],R[ue],b,M);ce===null&&re===null?j=ue+1:(re===null||0<b(re,ce))&&(re=ce)}q(re!==null?function(){A.continue(re+k)}:L)}return!1}),I}function cr(o,u,l,f){return{type:2,lower:o,upper:u,lowerOpen:l,upperOpen:f}}function Qc(o){return{type:1,lower:o,upper:o}}Object.defineProperty(mt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),mt.prototype.between=function(o,u,l,f){l=l!==!1,f=f===!0;try{return 0<this._cmp(o,u)||this._cmp(o,u)===0&&(l||f)&&(!l||!f)?tn(this):new this.Collection(this,function(){return cr(o,u,!l,!f)})}catch{return At(this,Jt)}},mt.prototype.equals=function(o){return o==null?At(this,Jt):new this.Collection(this,function(){return Qc(o)})},mt.prototype.above=function(o){return o==null?At(this,Jt):new this.Collection(this,function(){return cr(o,void 0,!0)})},mt.prototype.aboveOrEqual=function(o){return o==null?At(this,Jt):new this.Collection(this,function(){return cr(o,void 0,!1)})},mt.prototype.below=function(o){return o==null?At(this,Jt):new this.Collection(this,function(){return cr(void 0,o,!1,!0)})},mt.prototype.belowOrEqual=function(o){return o==null?At(this,Jt):new this.Collection(this,function(){return cr(void 0,o)})},mt.prototype.startsWith=function(o){return typeof o!="string"?At(this,Uc):this.between(o,o+Sr,!0,!0)},mt.prototype.startsWithIgnoreCase=function(o){return o===""?this.startsWith(o):xi(this,function(u,l){return u.indexOf(l[0])===0},[o],Sr)},mt.prototype.equalsIgnoreCase=function(o){return xi(this,function(u,l){return u===l[0]},[o],"")},mt.prototype.anyOfIgnoreCase=function(){var o=Q.apply(ut,arguments);return o.length===0?tn(this):xi(this,function(u,l){return l.indexOf(u)!==-1},o,"")},mt.prototype.startsWithAnyOfIgnoreCase=function(){var o=Q.apply(ut,arguments);return o.length===0?tn(this):xi(this,function(u,l){return l.some(function(f){return u.indexOf(f)===0})},o,Sr)},mt.prototype.anyOf=function(){var o,u,l=this,f=Q.apply(ut,arguments),d=this._cmp;try{f.sort(d)}catch{return At(this,Jt)}return f.length===0?tn(this):((o=new this.Collection(this,function(){return cr(f[0],f[f.length-1])}))._ondirectionchange=function(y){d=y==="next"?l._ascending:l._descending,f.sort(d)},u=0,o._addAlgorithm(function(y,b,x){for(var R=y.key;0<d(R,f[u]);)if(++u===f.length)return b(x),!1;return d(R,f[u])===0||(b(function(){y.continue(f[u])}),!1)}),o)},mt.prototype.notEqual=function(o){return this.inAnyRange([[-1/0,o],[o,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},mt.prototype.noneOf=function(){var o=Q.apply(ut,arguments);if(o.length===0)return new this.Collection(this);try{o.sort(this._ascending)}catch{return At(this,Jt)}var u=o.reduce(function(l,f){return l?l.concat([[l[l.length-1][1],f]]):[[-1/0,f]]},null);return u.push([o[o.length-1],this.db._maxKey]),this.inAnyRange(u,{includeLowers:!1,includeUppers:!1})},mt.prototype.inAnyRange=function(o,L){var l=this,f=this._cmp,d=this._ascending,y=this._descending,b=this._min,x=this._max;if(o.length===0)return tn(this);if(!o.every(function(F){return F[0]!==void 0&&F[1]!==void 0&&d(F[0],F[1])<=0}))return At(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ie.InvalidArgument);var R=!L||L.includeLowers!==!1,M=L&&L.includeUppers===!0,k,C=d;function P(F,Y){return C(F[0],Y[0])}try{(k=o.reduce(function(F,Y){for(var re=0,ue=F.length;re<ue;++re){var ce=F[re];if(f(Y[0],ce[1])<0&&0<f(Y[1],ce[0])){ce[0]=b(ce[0],Y[0]),ce[1]=x(ce[1],Y[1]);break}}return re===ue&&F.push(Y),F},[])).sort(P)}catch{return At(this,Jt)}var I=0,j=M?function(F){return 0<d(F,k[I][1])}:function(F){return 0<=d(F,k[I][1])},A=R?function(F){return 0<y(F,k[I][0])}:function(F){return 0<=y(F,k[I][0])},q=j,L=new this.Collection(this,function(){return cr(k[0][0],k[k.length-1][1],!R,!M)});return L._ondirectionchange=function(F){C=F==="next"?(q=j,d):(q=A,y),k.sort(P)},L._addAlgorithm(function(F,Y,re){for(var ue,ce=F.key;q(ce);)if(++I===k.length)return Y(re),!1;return!j(ue=ce)&&!A(ue)||(l._cmp(ce,k[I][1])===0||l._cmp(ce,k[I][0])===0||Y(function(){C===d?F.continue(k[I][0]):F.continue(k[I][1])}),!1)}),L},mt.prototype.startsWithAnyOf=function(){var o=Q.apply(ut,arguments);return o.every(function(u){return typeof u=="string"})?o.length===0?tn(this):this.inAnyRange(o.map(function(u){return[u,u+Sr]})):At(this,"startsWithAnyOf() only works with strings")};var el=mt;function mt(){}function Kt(o){return Qe(function(u){return jn(u),o(u.target.error),!1})}function jn(o){o.stopPropagation&&o.stopPropagation(),o.preventDefault&&o.preventDefault()}var Pn="storagemutated",Ho="x-storagemutated-1",lr=Rn(null,Pn),Cy=(zt.prototype._lock=function(){return G(!xe.global),++this._reculock,this._reculock!==1||xe.global||(xe.lockOwnerFor=this),this},zt.prototype._unlock=function(){if(G(!xe.global),--this._reculock==0)for(xe.global||(xe.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var o=this._blockedFuncs.shift();try{xr(o[1],o[0])}catch{}}return this},zt.prototype._locked=function(){return this._reculock&&xe.lockOwnerFor!==this},zt.prototype.create=function(o){var u=this;if(this.mode){var l=this.db.idbdb,f=this.db._state.dbOpenError;if(G(!this.idbtrans),!o&&!l)switch(f&&f.name){case"DatabaseClosedError":throw new ie.DatabaseClosed(f);case"MissingAPIError":throw new ie.MissingAPI(f.message,f);default:throw new ie.OpenFailed(f)}if(!this.active)throw new ie.TransactionInactive;G(this._completion._state===null),(o=this.idbtrans=o||(this.db.core||l).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Qe(function(d){jn(d),u._reject(o.error)}),o.onabort=Qe(function(d){jn(d),u.active&&u._reject(new ie.Abort(o.error)),u.active=!1,u.on("abort").fire(d)}),o.oncomplete=Qe(function(){u.active=!1,u._resolve(),"mutatedParts"in o&&lr.storagemutated.fire(o.mutatedParts)})}return this},zt.prototype._promise=function(o,u,l){var f,d=this;return o==="readwrite"&&this.mode!=="readwrite"?ct(new ie.ReadOnly("Transaction is readonly")):this.active?this._locked()?new fe(function(y,b){d._blockedFuncs.push([function(){d._promise(o,u,l).then(y,b)},xe])}):l?sr(function(){var y=new fe(function(b,x){d._lock();var R=u(b,x,d);R&&R.then&&R.then(b,x)});return y.finally(function(){return d._unlock()}),y._lib=!0,y}):((f=new fe(function(y,b){var x=u(y,b,d);x&&x.then&&x.then(y,b)}))._lib=!0,f):ct(new ie.TransactionInactive)},zt.prototype._root=function(){return this.parent?this.parent._root():this},zt.prototype.waitFor=function(o){var u,l=this._root(),f=fe.resolve(o),d=(l._waitingFor?l._waitingFor=l._waitingFor.then(function(){return f}):(l._waitingFor=f,l._waitingQueue=[],u=l.idbtrans.objectStore(l.storeNames[0]),(function y(){for(++l._spinCount;l._waitingQueue.length;)l._waitingQueue.shift()();l._waitingFor&&(u.get(-1/0).onsuccess=y)})()),l._waitingFor);return new fe(function(y,b){f.then(function(x){return l._waitingQueue.push(Qe(y.bind(null,x)))},function(x){return l._waitingQueue.push(Qe(b.bind(null,x)))}).finally(function(){l._waitingFor===d&&(l._waitingFor=null)})})},zt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ie.Abort))},zt.prototype.table=function(o){var u=this._memoizedTables||(this._memoizedTables={});if(g(u,o))return u[o];var l=this.schema[o];if(l)return(l=new this.db.Table(o,l,this)).core=this.db.core.table(o),u[o]=l;throw new ie.NotFound("Table "+o+" not part of transaction")},zt);function zt(){}function Yo(o,u,l,f,d,y,b,x){return{name:o,keyPath:u,unique:l,multi:f,auto:d,compound:y,src:(l&&!b?"&":"")+(f?"*":"")+(d?"++":"")+tl(u),type:x}}function tl(o){return typeof o=="string"?o:o?"["+[].join.call(o,"+")+"]":""}function Jo(o,u,l){return{name:o,primKey:u,indexes:l,mappedClass:null,idxByName:(f=function(d){return[d.name,d]},l.reduce(function(d,y,b){return y=f(y,b),y&&(d[y[0]]=y[1]),d},{}))};var f}var In=function(o){try{return o.only([[]]),In=function(){return[[]]},[[]]}catch{return In=function(){return Sr},Sr}};function Xo(o){return o==null?function(){}:typeof o=="string"?(u=o).split(".").length===1?function(l){return l[u]}:function(l){return N(l,u)}:function(l){return N(l,o)};var u}function rl(o){return[].slice.call(o)}var Oy=0;function $n(o){return o==null?":id":typeof o=="string"?o:"[".concat(o.join("+"),"]")}function Ay(o,u,R){function f(j){if(j.type===3)return null;if(j.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var C=j.lower,P=j.upper,I=j.lowerOpen,j=j.upperOpen;return C===void 0?P===void 0?null:u.upperBound(P,!!j):P===void 0?u.lowerBound(C,!!I):u.bound(C,P,!!I,!!j)}function d(k){var C,P=k.name;return{name:P,schema:k,mutate:function(I){var j=I.trans,A=I.type,q=I.keys,L=I.values,F=I.range;return new Promise(function(Y,re){Y=Qe(Y);var ue=j.objectStore(P),ce=ue.keyPath==null,ne=A==="put"||A==="add";if(!ne&&A!=="delete"&&A!=="deleteRange")throw new Error("Invalid operation type: "+A);var he,de=(q||L||{length:1}).length;if(q&&L&&q.length!==L.length)throw new Error("Given keys array must have same length as given values array.");if(de===0)return Y({numFailures:0,failures:{},results:[],lastResult:void 0});function se(ot){++qe,jn(ot)}var me=[],Me=[],qe=0;if(A==="deleteRange"){if(F.type===4)return Y({numFailures:qe,failures:Me,results:[],lastResult:void 0});F.type===3?me.push(he=ue.clear()):me.push(he=ue.delete(f(F)))}else{var ce=ne?ce?[L,q]:[L,null]:[q,null],Te=ce[0],Ie=ce[1];if(ne)for(var nt=0;nt<de;++nt)me.push(he=Ie&&Ie[nt]!==void 0?ue[A](Te[nt],Ie[nt]):ue[A](Te[nt])),he.onerror=se;else for(nt=0;nt<de;++nt)me.push(he=ue[A](Te[nt])),he.onerror=se}function $t(ot){ot=ot.target.result,me.forEach(function(Or,ms){return Or.error!=null&&(Me[ms]=Or.error)}),Y({numFailures:qe,failures:Me,results:A==="delete"?q:me.map(function(Or){return Or.result}),lastResult:ot})}he.onerror=function(ot){se(ot),$t(ot)},he.onsuccess=$t})},getMany:function(I){var j=I.trans,A=I.keys;return new Promise(function(q,L){q=Qe(q);for(var F,Y=j.objectStore(P),re=A.length,ue=new Array(re),ce=0,ne=0,he=function(me){me=me.target,ue[me._pos]=me.result,++ne===ce&&q(ue)},de=Kt(L),se=0;se<re;++se)A[se]!=null&&((F=Y.get(A[se]))._pos=se,F.onsuccess=he,F.onerror=de,++ce);ce===0&&q(ue)})},get:function(I){var j=I.trans,A=I.key;return new Promise(function(q,L){q=Qe(q);var F=j.objectStore(P).get(A);F.onsuccess=function(Y){return q(Y.target.result)},F.onerror=Kt(L)})},query:(C=x,function(I){return new Promise(function(j,A){j=Qe(j);var q,L,F,ne=I.trans,Y=I.values,re=I.limit,ce=I.query,ue=re===1/0?void 0:re,he=ce.index,ce=ce.range,ne=ne.objectStore(P),ne=he.isPrimaryKey?ne:ne.index(he.name),he=f(ce);if(re===0)return j({result:[]});C?((ce=Y?ne.getAll(he,ue):ne.getAllKeys(he,ue)).onsuccess=function(de){return j({result:de.target.result})},ce.onerror=Kt(A)):(q=0,L=!Y&&"openKeyCursor"in ne?ne.openKeyCursor(he):ne.openCursor(he),F=[],L.onsuccess=function(de){var se=L.result;return!se||(F.push(Y?se.value:se.primaryKey),++q===re)?j({result:F}):void se.continue()},L.onerror=Kt(A))})}),openCursor:function(I){var j=I.trans,A=I.values,q=I.query,L=I.reverse,F=I.unique;return new Promise(function(Y,re){Y=Qe(Y);var ne=q.index,ue=q.range,ce=j.objectStore(P),ce=ne.isPrimaryKey?ce:ce.index(ne.name),ne=L?F?"prevunique":"prev":F?"nextunique":"next",he=!A&&"openKeyCursor"in ce?ce.openKeyCursor(f(ue),ne):ce.openCursor(f(ue),ne);he.onerror=Kt(re),he.onsuccess=Qe(function(de){var se,me,Me,qe,Te=he.result;Te?(Te.___id=++Oy,Te.done=!1,se=Te.continue.bind(Te),me=(me=Te.continuePrimaryKey)&&me.bind(Te),Me=Te.advance.bind(Te),qe=function(){throw new Error("Cursor not stopped")},Te.trans=j,Te.stop=Te.continue=Te.continuePrimaryKey=Te.advance=function(){throw new Error("Cursor not started")},Te.fail=Qe(re),Te.next=function(){var Ie=this,nt=1;return this.start(function(){return nt--?Ie.continue():Ie.stop()}).then(function(){return Ie})},Te.start=function(Ie){function nt(){if(he.result)try{Ie()}catch(ot){Te.fail(ot)}else Te.done=!0,Te.start=function(){throw new Error("Cursor behind last entry")},Te.stop()}var $t=new Promise(function(ot,Or){ot=Qe(ot),he.onerror=Kt(Or),Te.fail=Or,Te.stop=function(ms){Te.stop=Te.continue=Te.continuePrimaryKey=Te.advance=qe,ot(ms)}});return he.onsuccess=Qe(function(ot){he.onsuccess=nt,nt()}),Te.continue=se,Te.continuePrimaryKey=me,Te.advance=Me,nt(),$t},Y(Te)):Y(null)},re)})},count:function(I){var j=I.query,A=I.trans,q=j.index,L=j.range;return new Promise(function(F,Y){var re=A.objectStore(P),re=q.isPrimaryKey?re:re.index(q.name),ue=f(L),ue=ue?re.count(ue):re.count();ue.onsuccess=Qe(function(ce){return F(ce.target.result)}),ue.onerror=Kt(Y)})}}}y=R,b=rl((R=o).objectStoreNames);var y,R={schema:{name:R.name,tables:b.map(function(k){return y.objectStore(k)}).map(function(k){var C=k.keyPath,P=k.autoIncrement,j=c(C),I={},j={name:k.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:C==null,compound:j,keyPath:C,autoIncrement:P,unique:!0,extractKey:Xo(C)},indexes:rl(k.indexNames).map(function(A){return k.index(A)}).map(function(F){var Y=F.name,q=F.unique,L=F.multiEntry,F=F.keyPath,Y={name:Y,compound:c(F),keyPath:F,unique:q,multiEntry:L,extractKey:Xo(F)};return I[$n(F)]=Y}),getIndexByKeyPath:function(A){return I[$n(A)]}};return I[":id"]=j.primaryKey,C!=null&&(I[$n(C)]=j.primaryKey),j})},hasGetAll:0<b.length&&"getAll"in y.objectStore(b[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)},b=R.schema,x=R.hasGetAll,R=b.tables.map(d),M={};return R.forEach(function(k){return M[k.name]=k}),{stack:"dbcore",transaction:o.transaction.bind(o),table:function(k){if(M[k])return M[k];throw new Error("Table '".concat(k,"' not found"))},MIN_KEY:-1/0,MAX_KEY:In(u),schema:b}}function Ry(o,u,l,f){return l=l.IDBKeyRange,u=Ay(u,l,f),{dbcore:o.dbcore.reduce(function(d,y){return y=y.create,n(n({},d),y(d))},u)}}function Si(o,u){var l=u.db,l=Ry(o._middlewares,l,o._deps,u);o.core=l.dbcore,o.tables.forEach(function(f){var d=f.name;o.core.schema.tables.some(function(y){return y.name===d})&&(f.core=o.core.table(d),o[d]instanceof o.Table)&&(o[d].core=f.core)})}function Ti(o,u,l,f){l.forEach(function(d){var y=f[d];u.forEach(function(b){var x=(function R(M,k){return E(M,k)||(M=p(M))&&R(M,k)})(b,d);(!x||"value"in x&&x.value===void 0)&&(b===o.Transaction.prototype||b instanceof o.Transaction?S(b,d,{get:function(){return this.table(d)},set:function(R){O(this,d,{value:R,writable:!0,configurable:!0,enumerable:!0})}}):b[d]=new o.Table(d,y))})})}function Zo(o,u){u.forEach(function(l){for(var f in l)l[f]instanceof o.Table&&delete l[f]})}function ky(o,u){return o._cfg.version-u._cfg.version}function jy(o,u,l,f){var d=o._dbSchema,y=(l.objectStoreNames.contains("$meta")&&!d.$meta&&(d.$meta=Jo("$meta",il("")[0],[]),o._storeNames.push("$meta")),o._createTransaction("readwrite",o._storeNames,d)),b=(y.create(l),y._completion.catch(f),y._reject.bind(y)),x=xe.transless||xe;sr(function(){if(xe.trans=y,xe.transless=x,u!==0)return Si(o,l),M=u,((R=y).storeNames.includes("$meta")?R.table("$meta").get("version").then(function(k){return k??M}):fe.resolve(M)).then(function(q){var C=o,P=q,I=y,j=l,A=[],q=C._versions,L=C._dbSchema=Ci(0,C.idbdb,j);return(q=q.filter(function(F){return F._cfg.version>=P})).length===0?fe.resolve():(q.forEach(function(F){A.push(function(){var Y,re,ue,ce=L,ne=F._cfg.dbschema,he=(Oi(C,ce,j),Oi(C,ne,j),L=C._dbSchema=ne,Qo(ce,ne)),de=(he.add.forEach(function(se){es(j,se[0],se[1].primKey,se[1].indexes)}),he.change.forEach(function(se){if(se.recreate)throw new ie.Upgrade("Not yet support for changing primary key");var me=j.objectStore(se.name);se.add.forEach(function(Me){return Ei(me,Me)}),se.change.forEach(function(Me){me.deleteIndex(Me.name),Ei(me,Me)}),se.del.forEach(function(Me){return me.deleteIndex(Me)})}),F._cfg.contentUpgrade);if(de&&F._cfg.version>P)return Si(C,j),I._memoizedTables={},Y=te(ne),he.del.forEach(function(se){Y[se]=ce[se]}),Zo(C,[C.Transaction.prototype]),Ti(C,[C.Transaction.prototype],a(Y),Y),I.schema=Y,(re=ae(de))&&Zr(),ne=fe.follow(function(){var se;(ue=de(I))&&re&&(se=ar.bind(null,null),ue.then(se,se))}),ue&&typeof ue.then=="function"?fe.resolve(ue):ne.then(function(){return ue})}),A.push(function(Y){var re,ue,ce=F._cfg.dbschema;re=ce,ue=Y,[].slice.call(ue.db.objectStoreNames).forEach(function(ne){return re[ne]==null&&ue.db.deleteObjectStore(ne)}),Zo(C,[C.Transaction.prototype]),Ti(C,[C.Transaction.prototype],C._storeNames,C._dbSchema),I.schema=C._dbSchema}),A.push(function(Y){C.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(C.idbdb.version/10)===F._cfg.version?(C.idbdb.deleteObjectStore("$meta"),delete C._dbSchema.$meta,C._storeNames=C._storeNames.filter(function(re){return re!=="$meta"})):Y.objectStore("$meta").put(F._cfg.version,"version"))})}),(function F(){return A.length?fe.resolve(A.shift()(I.idbtrans)).then(F):fe.resolve()})().then(function(){nl(L,j)}))}).catch(b);var R,M;a(d).forEach(function(k){es(l,k,d[k].primKey,d[k].indexes)}),Si(o,l),fe.follow(function(){return o.on.populate.fire(y)}).catch(b)})}function Py(o,u){nl(o._dbSchema,u),u.db.version%10!=0||u.objectStoreNames.contains("$meta")||u.db.createObjectStore("$meta").add(Math.ceil(u.db.version/10-1),"version");var l=Ci(0,o.idbdb,u);Oi(o,o._dbSchema,u);for(var f=0,d=Qo(l,o._dbSchema).change;f<d.length;f++){var y=(b=>{if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var x=u.objectStore(b.name);b.add.forEach(function(R){It&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(R.src)),Ei(x,R)})})(d[f]);if(typeof y=="object")return y.value}}function Qo(o,u){var l,f={del:[],add:[],change:[]};for(l in o)u[l]||f.del.push(l);for(l in u){var d=o[l],y=u[l];if(d){var b={name:l,def:y,recreate:!1,del:[],add:[],change:[]};if(""+(d.primKey.keyPath||"")!=""+(y.primKey.keyPath||"")||d.primKey.auto!==y.primKey.auto)b.recreate=!0,f.change.push(b);else{var x=d.idxByName,R=y.idxByName,M=void 0;for(M in x)R[M]||b.del.push(M);for(M in R){var k=x[M],C=R[M];k?k.src!==C.src&&b.change.push(C):b.add.push(C)}(0<b.del.length||0<b.add.length||0<b.change.length)&&f.change.push(b)}}else f.add.push([l,y])}return f}function es(o,u,l,f){var d=o.db.createObjectStore(u,l.keyPath?{keyPath:l.keyPath,autoIncrement:l.auto}:{autoIncrement:l.auto});f.forEach(function(y){return Ei(d,y)})}function nl(o,u){a(o).forEach(function(l){u.db.objectStoreNames.contains(l)||(It&&console.debug("Dexie: Creating missing table",l),es(u,l,o[l].primKey,o[l].indexes))})}function Ei(o,u){o.createIndex(u.name,u.keyPath,{unique:u.unique,multiEntry:u.multi})}function Ci(o,u,l){var f={};return z(u.objectStoreNames,0).forEach(function(d){for(var y=l.objectStore(d),b=Yo(tl(M=y.keyPath),M||"",!0,!1,!!y.autoIncrement,M&&typeof M!="string",!0),x=[],R=0;R<y.indexNames.length;++R){var k=y.index(y.indexNames[R]),M=k.keyPath,k=Yo(k.name,M,!!k.unique,!!k.multiEntry,!1,M&&typeof M!="string",!1);x.push(k)}f[d]=Jo(d,b,x)}),f}function Oi(o,u,l){for(var f=l.db.objectStoreNames,d=0;d<f.length;++d){var y=f[d],b=l.objectStore(y);o._hasGetAll="getAll"in b;for(var x=0;x<b.indexNames.length;++x){var R,M=b.indexNames[x],k=b.index(M).keyPath,k=typeof k=="string"?k:"["+z(k).join("+")+"]";u[y]&&(R=u[y].idxByName[k])&&(R.name=M,delete u[y].idxByName[k],u[y].idxByName[M]=R)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(o._hasGetAll=!1)}function il(o){return o.split(",").map(function(u,l){var d=u.split(":"),f=(f=d[1])==null?void 0:f.trim(),d=(u=d[0].trim()).replace(/([&*]|\+\+)/g,""),y=/^\[/.test(d)?d.match(/^\[(.*)\]$/)[1].split("+"):d;return Yo(d,y||null,/\&/.test(u),/\*/.test(u),/\+\+/.test(u),c(y),l===0,f)})}rn.prototype._createTableSchema=Jo,rn.prototype._parseIndexSyntax=il,rn.prototype._parseStoresSpec=function(o,u){var l=this;a(o).forEach(function(f){if(o[f]!==null){var d=l._parseIndexSyntax(o[f]),y=d.shift();if(!y)throw new ie.Schema("Invalid schema for table "+f+": "+o[f]);if(y.unique=!0,y.multi)throw new ie.Schema("Primary key cannot be multiEntry*");d.forEach(function(b){if(b.auto)throw new ie.Schema("Only primary key can be marked as autoIncrement (++)");if(!b.keyPath)throw new ie.Schema("Index must have a name and cannot be an empty string")}),y=l._createTableSchema(f,y,d),u[f]=y}})},rn.prototype.stores=function(l){var u=this.db,l=(this._cfg.storesSource=this._cfg.storesSource?h(this._cfg.storesSource,l):l,u._versions),f={},d={};return l.forEach(function(y){h(f,y._cfg.storesSource),d=y._cfg.dbschema={},y._parseStoresSpec(f,d)}),u._dbSchema=d,Zo(u,[u._allTables,u,u.Transaction.prototype]),Ti(u,[u._allTables,u,u.Transaction.prototype,this._cfg.tables],a(d),d),u._storeNames=a(d),this},rn.prototype.upgrade=function(o){return this._cfg.contentUpgrade=Cn(this._cfg.contentUpgrade||B,o),this};var Iy=rn;function rn(){}function ts(o,u){var l=o._dbNamesDB;return l||(l=o._dbNamesDB=new Xt(gi,{addons:[],indexedDB:o,IDBKeyRange:u})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function rs(o){return o&&typeof o.databases=="function"}function ns(o){return sr(function(){return xe.letThrough=!0,o()})}function is(o){return!("from"in o)}var bt=function(o,u){var l;if(!this)return l=new bt,o&&"d"in o&&h(l,o),l;h(this,arguments.length?{d:1,from:o,to:1<arguments.length?u:o}:{d:0})};function Dn(o,u,l){var f=Fe(u,l);if(!isNaN(f)){if(0<f)throw RangeError();if(is(o))return h(o,{from:u,to:l,d:1});var f=o.l,d=o.r;if(Fe(l,o.from)<0)return f?Dn(f,u,l):o.l={from:u,to:l,d:1,l:null,r:null},sl(o);if(0<Fe(u,o.to))return d?Dn(d,u,l):o.r={from:u,to:l,d:1,l:null,r:null},sl(o);Fe(u,o.from)<0&&(o.from=u,o.l=null,o.d=d?d.d+1:1),0<Fe(l,o.to)&&(o.to=l,o.r=null,o.d=o.l?o.l.d+1:1),u=!o.r,f&&!o.l&&Fn(o,f),d&&u&&Fn(o,d)}}function Fn(o,u){is(u)||(function l(f,d){var y=d.from,b=d.l,x=d.r;Dn(f,y,d.to),b&&l(f,b),x&&l(f,x)})(o,u)}function ol(o,u){var l=Ai(u),f=l.next();if(!f.done)for(var d=f.value,y=Ai(o),b=y.next(d.from),x=b.value;!f.done&&!b.done;){if(Fe(x.from,d.to)<=0&&0<=Fe(x.to,d.from))return!0;Fe(d.from,x.from)<0?d=(f=l.next(x.from)).value:x=(b=y.next(d.from)).value}return!1}function Ai(o){var u=is(o)?null:{s:0,n:o};return{next:function(l){for(var f=0<arguments.length;u;)switch(u.s){case 0:if(u.s=1,f)for(;u.n.l&&Fe(l,u.n.from)<0;)u={up:u,n:u.n.l,s:1};else for(;u.n.l;)u={up:u,n:u.n.l,s:1};case 1:if(u.s=2,!f||Fe(l,u.n.to)<=0)return{value:u.n,done:!1};case 2:if(u.n.r){u.s=3,u={up:u,n:u.n.r,s:0};continue}case 3:u=u.up}return{done:!0}}}}function sl(o){var u,l,f,d=(((d=o.r)==null?void 0:d.d)||0)-(((d=o.l)==null?void 0:d.d)||0),d=1<d?"r":d<-1?"l":"";d&&(u=d=="r"?"l":"r",l=n({},o),f=o[d],o.from=f.from,o.to=f.to,o[d]=f[d],l[d]=f[u],(o[u]=l).d=al(l)),o.d=al(o)}function al(l){var u=l.r,l=l.l;return(u?l?Math.max(u.d,l.d):u.d:l?l.d:0)+1}function Ri(o,u){return a(u).forEach(function(l){o[l]?Fn(o[l],u[l]):o[l]=(function f(d){var y,b,x={};for(y in d)g(d,y)&&(b=d[y],x[y]=!b||typeof b!="object"||oe.has(b.constructor)?b:f(b));return x})(u[l])}),o}function os(o,u){return o.all||u.all||Object.keys(o).some(function(l){return u[l]&&ol(u[l],o[l])})}_(bt.prototype,((Se={add:function(o){return Fn(this,o),this},addKey:function(o){return Dn(this,o,o),this},addKeys:function(o){var u=this;return o.forEach(function(l){return Dn(u,l,l)}),this},hasKey:function(o){var u=Ai(this).next(o).value;return u&&Fe(u.from,o)<=0&&0<=Fe(u.to,o)}})[ge]=function(){return Ai(this)},Se));var Er={},ss={},as=!1;function ki(o){Ri(ss,o),as||(as=!0,setTimeout(function(){as=!1,us(ss,!(ss={}))},0))}function us(o,u){u===void 0&&(u=!1);var l=new Set;if(o.all)for(var f=0,d=Object.values(Er);f<d.length;f++)ul(x=d[f],o,l,u);else for(var y in o){var b,x,y=/^idb\:\/\/(.*)\/(.*)\//.exec(y);y&&(b=y[1],y=y[2],x=Er["idb://".concat(b,"/").concat(y)])&&ul(x,o,l,u)}l.forEach(function(R){return R()})}function ul(o,u,l,f){for(var d=[],y=0,b=Object.entries(o.queries.query);y<b.length;y++){for(var x=b[y],R=x[0],M=[],k=0,C=x[1];k<C.length;k++){var P=C[k];os(u,P.obsSet)?P.subscribers.forEach(function(q){return l.add(q)}):f&&M.push(P)}f&&d.push([R,M])}if(f)for(var I=0,j=d;I<j.length;I++){var A=j[I],R=A[0],M=A[1];o.queries.query[R]=M}}function $y(o){var u=o._state,l=o._deps.indexedDB;if(u.isBeingOpened||o.idbdb)return u.dbReadyPromise.then(function(){return u.dbOpenError?ct(u.dbOpenError):o});u.isBeingOpened=!0,u.dbOpenError=null,u.openComplete=!1;var f=u.openCanceller,d=Math.round(10*o.verno),y=!1;function b(){if(u.openCanceller!==f)throw new ie.DatabaseClosed("db.open() was cancelled")}function x(){return new fe(function(P,I){if(b(),!l)throw new ie.MissingAPI;var j=o.name,A=u.autoSchema||!d?l.open(j):l.open(j,d);if(!A)throw new ie.MissingAPI;A.onerror=Kt(I),A.onblocked=Qe(o._fireOnBlocked),A.onupgradeneeded=Qe(function(q){var L;k=A.transaction,u.autoSchema&&!o._options.allowEmptyDB?(A.onerror=jn,k.abort(),A.result.close(),(L=l.deleteDatabase(j)).onsuccess=L.onerror=Qe(function(){I(new ie.NoSuchDatabase("Database ".concat(j," doesnt exist")))})):(k.onerror=Kt(I),L=q.oldVersion>Math.pow(2,62)?0:q.oldVersion,C=L<1,o.idbdb=A.result,y&&Py(o,k),jy(o,L/10,k,I))},I),A.onsuccess=Qe(function(){k=null;var q,L,F,Y,re,ue,ce=o.idbdb=A.result,ne=z(ce.objectStoreNames);if(0<ne.length)try{var he=ce.transaction((re=ne).length===1?re[0]:re,"readonly");if(u.autoSchema)ue=ce,Y=he,(F=o).verno=ue.version/10,Y=F._dbSchema=Ci(0,ue,Y),F._storeNames=z(ue.objectStoreNames,0),Ti(F,[F._allTables],a(Y),Y);else if(Oi(o,o._dbSchema,he),L=he,((L=Qo(Ci(0,(q=o).idbdb,L),q._dbSchema)).add.length||L.change.some(function(de){return de.add.length||de.change.length}))&&!y)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),ce.close(),d=ce.version+1,y=!0,P(x());Si(o,he)}catch{}Qr.push(o),ce.onversionchange=Qe(function(de){u.vcFired=!0,o.on("versionchange").fire(de)}),ce.onclose=Qe(function(){o.close({disableAutoOpen:!1})}),C&&(ne=o._deps,re=j,rs(ue=ne.indexedDB)||re===gi||ts(ue,ne.IDBKeyRange).put({name:re}).catch(B)),P()},I)}).catch(function(P){switch(P==null?void 0:P.name){case"UnknownError":if(0<u.PR1398_maxLoop)return u.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),x();break;case"VersionError":if(0<d)return d=0,x()}return fe.reject(P)})}var R,M=u.dbReadyResolve,k=null,C=!1;return fe.race([f,(typeof navigator>"u"?fe.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(P){function I(){return indexedDB.databases().finally(P)}R=setInterval(I,100),I()}).finally(function(){return clearInterval(R)}):Promise.resolve()).then(x)]).then(function(){return b(),u.onReadyBeingFired=[],fe.resolve(ns(function(){return o.on.ready.fire(o.vip)})).then(function P(){var I;if(0<u.onReadyBeingFired.length)return I=u.onReadyBeingFired.reduce(Cn,B),u.onReadyBeingFired=[],fe.resolve(ns(function(){return I(o.vip)})).then(P)})}).finally(function(){u.openCanceller===f&&(u.onReadyBeingFired=null,u.isBeingOpened=!1)}).catch(function(P){u.dbOpenError=P;try{k&&k.abort()}catch{}return f===u.openCanceller&&o._close(),ct(P)}).finally(function(){u.openComplete=!0,M()}).then(function(){var P;return C&&(P={},o.tables.forEach(function(I){I.schema.indexes.forEach(function(j){j.name&&(P["idb://".concat(o.name,"/").concat(I.name,"/").concat(j.name)]=new bt(-1/0,[[[]]]))}),P["idb://".concat(o.name,"/").concat(I.name,"/")]=P["idb://".concat(o.name,"/").concat(I.name,"/:dels")]=new bt(-1/0,[[[]]])}),lr(Pn).fire(P),us(P,!0)),o})}function cs(o){function u(y){return o.next(y)}var l=d(u),f=d(function(y){return o.throw(y)});function d(y){return function(x){var x=y(x),R=x.value;return x.done?R:R&&typeof R.then=="function"?R.then(l,f):c(R)?Promise.all(R).then(l,f):l(R)}}return d(u)()}function ji(o,u,l){for(var f=c(o)?o.slice():[o],d=0;d<l;++d)f.push(u);return f}var Dy={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(o){return n(n({},o),{table:function(f){var l=o.table(f),f=l.schema,d={},y=[];function b(P,I,j){var F=$n(P),A=d[F]=d[F]||[],q=P==null?0:typeof P=="string"?1:P.length,L=0<I,F=n(n({},j),{name:L?"".concat(F,"(virtual-from:").concat(j.name,")"):j.name,lowLevelIndex:j,isVirtual:L,keyTail:I,keyLength:q,extractKey:Xo(P),unique:!L&&j.unique});return A.push(F),F.isPrimaryKey||y.push(F),1<q&&b(q===2?P[0]:P.slice(0,q-1),I+1,j),A.sort(function(Y,re){return Y.keyTail-re.keyTail}),F}var x=b(f.primaryKey.keyPath,0,f.primaryKey);d[":id"]=[x];for(var R=0,M=f.indexes;R<M.length;R++){var k=M[R];b(k.keyPath,0,k)}function C(P){var I,j=P.query.index;return j.isVirtual?n(n({},P),{query:{index:j.lowLevelIndex,range:(I=P.query.range,j=j.keyTail,{type:I.type===1?2:I.type,lower:ji(I.lower,I.lowerOpen?o.MAX_KEY:o.MIN_KEY,j),lowerOpen:!0,upper:ji(I.upper,I.upperOpen?o.MIN_KEY:o.MAX_KEY,j),upperOpen:!0})}}):P}return n(n({},l),{schema:n(n({},f),{primaryKey:x,indexes:y,getIndexByKeyPath:function(P){return(P=d[$n(P)])&&P[0]}}),count:function(P){return l.count(C(P))},query:function(P){return l.query(C(P))},openCursor:function(P){var I=P.query.index,j=I.keyTail,A=I.keyLength;return I.isVirtual?l.openCursor(C(P)).then(function(L){return L&&q(L)}):l.openCursor(P);function q(L){return Object.create(L,{continue:{value:function(F){F!=null?L.continue(ji(F,P.reverse?o.MAX_KEY:o.MIN_KEY,j)):P.unique?L.continue(L.key.slice(0,A).concat(P.reverse?o.MIN_KEY:o.MAX_KEY,j)):L.continue()}},continuePrimaryKey:{value:function(F,Y){L.continuePrimaryKey(ji(F,o.MAX_KEY,j),Y)}},primaryKey:{get:function(){return L.primaryKey}},key:{get:function(){var F=L.key;return A===1?F[0]:F.slice(0,A)}},value:{get:function(){return L.value}}})}}})}})}};function ls(o,u,l,f){return l=l||{},f=f||"",a(o).forEach(function(d){var y,b,x;g(u,d)?(y=o[d],b=u[d],typeof y=="object"&&typeof b=="object"&&y&&b?(x=ve(y))!==ve(b)?l[f+d]=u[d]:x==="Object"?ls(y,b,l,f+d+"."):y!==b&&(l[f+d]=u[d]):y!==b&&(l[f+d]=u[d])):l[f+d]=void 0}),a(u).forEach(function(d){g(o,d)||(l[f+d]=u[d])}),l}function fs(o,u){return u.type==="delete"?u.keys:u.keys||u.values.map(o.extractKey)}var Fy={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(o){return n(n({},o),{table:function(u){var l=o.table(u),f=l.schema.primaryKey;return n(n({},l),{mutate:function(d){var y=xe.trans,b=y.table(u).hook,x=b.deleting,R=b.creating,M=b.updating;switch(d.type){case"add":if(R.fire===B)break;return y._promise("readwrite",function(){return k(d)},!0);case"put":if(R.fire===B&&M.fire===B)break;return y._promise("readwrite",function(){return k(d)},!0);case"delete":if(x.fire===B)break;return y._promise("readwrite",function(){return k(d)},!0);case"deleteRange":if(x.fire===B)break;return y._promise("readwrite",function(){return(function C(P,I,j){return l.query({trans:P,values:!1,query:{index:f,range:I},limit:j}).then(function(A){var q=A.result;return k({type:"delete",keys:q,trans:P}).then(function(L){return 0<L.numFailures?Promise.reject(L.failures[0]):q.length<j?{failures:[],numFailures:0,lastResult:void 0}:C(P,n(n({},I),{lower:q[q.length-1],lowerOpen:!0}),j)})})})(d.trans,d.range,1e4)},!0)}return l.mutate(d);function k(C){var P,I,j,A=xe.trans,q=C.keys||fs(f,C);if(q)return(C=C.type==="add"||C.type==="put"?n(n({},C),{keys:q}):n({},C)).type!=="delete"&&(C.values=i([],C.values)),C.keys&&(C.keys=i([],C.keys)),P=l,j=q,((I=C).type==="add"?Promise.resolve([]):P.getMany({trans:I.trans,keys:j,cache:"immutable"})).then(function(L){var F=q.map(function(Y,re){var ue,ce,ne,he=L[re],de={onerror:null,onsuccess:null};return C.type==="delete"?x.fire.call(de,Y,he,A):C.type==="add"||he===void 0?(ue=R.fire.call(de,Y,C.values[re],A),Y==null&&ue!=null&&(C.keys[re]=Y=ue,f.outbound||H(C.values[re],f.keyPath,Y))):(ue=ls(he,C.values[re]),(ce=M.fire.call(de,ue,Y,he,A))&&(ne=C.values[re],Object.keys(ce).forEach(function(se){g(ne,se)?ne[se]=ce[se]:H(ne,se,ce[se])}))),de});return l.mutate(C).then(function(Y){for(var re=Y.failures,ue=Y.results,ce=Y.numFailures,Y=Y.lastResult,ne=0;ne<q.length;++ne){var he=(ue||q)[ne],de=F[ne];he==null?de.onerror&&de.onerror(re[ne]):de.onsuccess&&de.onsuccess(C.type==="put"&&L[ne]?C.values[ne]:he)}return{failures:re,results:ue,numFailures:ce,lastResult:Y}}).catch(function(Y){return F.forEach(function(re){return re.onerror&&re.onerror(Y)}),Promise.reject(Y)})});throw new Error("Keys missing")}}})}})}};function cl(o,u,l){try{if(!u||u.keys.length<o.length)return null;for(var f=[],d=0,y=0;d<u.keys.length&&y<o.length;++d)Fe(u.keys[d],o[y])===0&&(f.push(l?Z(u.values[d]):u.values[d]),++y);return f.length===o.length?f:null}catch{return null}}var My={stack:"dbcore",level:-1,create:function(o){return{table:function(u){var l=o.table(u);return n(n({},l),{getMany:function(f){var d;return f.cache?(d=cl(f.keys,f.trans._cache,f.cache==="clone"))?fe.resolve(d):l.getMany(f).then(function(y){return f.trans._cache={keys:f.keys,values:f.cache==="clone"?Z(y):y},y}):l.getMany(f)},mutate:function(f){return f.type!=="add"&&(f.trans._cache=null),l.mutate(f)}})}}}};function ll(o,u){return o.trans.mode==="readonly"&&!!o.subscr&&!o.trans.explicit&&o.trans.db._options.cache!=="disabled"&&!u.schema.primaryKey.outbound}function fl(o,u){switch(o){case"query":return u.values&&!u.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Ny={stack:"dbcore",level:0,name:"Observability",create:function(o){var u=o.schema.name,l=new bt(o.MIN_KEY,o.MAX_KEY);return n(n({},o),{transaction:function(f,d,y){if(xe.subscr&&d!=="readonly")throw new ie.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(xe.querier));return o.transaction(f,d,y)},table:function(f){function d(q){var A,q=q.query;return[A=q.index,new bt((A=(q=q.range).lower)!=null?A:o.MIN_KEY,(A=q.upper)!=null?A:o.MAX_KEY)]}var y=o.table(f),b=y.schema,x=b.primaryKey,R=b.indexes,M=x.extractKey,k=x.outbound,C=x.autoIncrement&&R.filter(function(j){return j.compound&&j.keyPath.includes(x.keyPath)}),P=n(n({},y),{mutate:function(j){function A(me){return me="idb://".concat(u,"/").concat(f,"/").concat(me),re[me]||(re[me]=new bt)}var q,L,F,Y=j.trans,re=j.mutatedParts||(j.mutatedParts={}),ue=A(""),ce=A(":dels"),ne=j.type,de=j.type==="deleteRange"?[j.range]:j.type==="delete"?[j.keys]:j.values.length<50?[fs(x,j).filter(function(me){return me}),j.values]:[],he=de[0],de=de[1],se=j.trans._cache;return c(he)?(ue.addKeys(he),(ne=ne==="delete"||he.length===de.length?cl(he,se):null)||ce.addKeys(he),(ne||de)&&(q=A,L=ne,F=de,b.indexes.forEach(function(me){var Me=q(me.name||"");function qe(Ie){return Ie!=null?me.extractKey(Ie):null}function Te(Ie){me.multiEntry&&c(Ie)?Ie.forEach(function(nt){return Me.addKey(nt)}):Me.addKey(Ie)}(L||F).forEach(function(Ie,ot){var $t=L&&qe(L[ot]),ot=F&&qe(F[ot]);Fe($t,ot)!==0&&($t!=null&&Te($t),ot!=null)&&Te(ot)})}))):he?(de={from:(se=he.lower)!=null?se:o.MIN_KEY,to:(ne=he.upper)!=null?ne:o.MAX_KEY},ce.add(de),ue.add(de)):(ue.add(l),ce.add(l),b.indexes.forEach(function(me){return A(me.name).add(l)})),y.mutate(j).then(function(me){return!he||j.type!=="add"&&j.type!=="put"||(ue.addKeys(me.results),C&&C.forEach(function(Me){for(var qe=j.values.map(function($t){return Me.extractKey($t)}),Te=Me.keyPath.findIndex(function($t){return $t===x.keyPath}),Ie=0,nt=me.results.length;Ie<nt;++Ie)qe[Ie][Te]=me.results[Ie];A(Me.name).addKeys(qe)})),Y.mutatedParts=Ri(Y.mutatedParts||{},re),me})}}),I={get:function(j){return[x,new bt(j.key)]},getMany:function(j){return[x,new bt().addKeys(j.keys)]},count:d,query:d,openCursor:d};return a(I).forEach(function(j){P[j]=function(A){var q=xe.subscr,L=!!q,F=ll(xe,y)&&fl(j,A)?A.obsSet={}:q;if(L){var Y,q=function(de){return de="idb://".concat(u,"/").concat(f,"/").concat(de),F[de]||(F[de]=new bt)},re=q(""),ue=q(":dels"),L=I[j](A),ce=L[0],L=L[1];if((j==="query"&&ce.isPrimaryKey&&!A.values?ue:q(ce.name||"")).add(L),!ce.isPrimaryKey){if(j!=="count")return Y=j==="query"&&k&&A.values&&y.query(n(n({},A),{values:!1})),y[j].apply(this,arguments).then(function(de){if(j==="query"){if(k&&A.values)return Y.then(function(qe){return qe=qe.result,re.addKeys(qe),de});var se=A.values?de.result.map(M):de.result;(A.values?re:ue).addKeys(se)}else{var me,Me;if(j==="openCursor")return Me=A.values,(me=de)&&Object.create(me,{key:{get:function(){return ue.addKey(me.primaryKey),me.key}},primaryKey:{get:function(){var qe=me.primaryKey;return ue.addKey(qe),qe}},value:{get:function(){return Me&&re.addKey(me.primaryKey),me.value}}})}return de});ue.add(l)}}return y[j].apply(this,arguments)}}),P}})}};function dl(o,u,l){var f;return l.numFailures===0?u:u.type==="deleteRange"||(f=u.keys?u.keys.length:"values"in u&&u.values?u.values.length:1,l.numFailures===f)?null:(f=n({},u),c(f.keys)&&(f.keys=f.keys.filter(function(d,y){return!(y in l.failures)})),"values"in f&&c(f.values)&&(f.values=f.values.filter(function(d,y){return!(y in l.failures)})),f)}function ds(o,u){return l=o,((f=u).lower===void 0||(f.lowerOpen?0<Fe(l,f.lower):0<=Fe(l,f.lower)))&&(l=o,(f=u).upper===void 0||(f.upperOpen?Fe(l,f.upper)<0:Fe(l,f.upper)<=0));var l,f}function hl(o,u,l,f,d,y){var b,x,R,M,k,C;return!l||l.length===0||(b=u.query.index,x=b.multiEntry,R=u.query.range,M=f.schema.primaryKey.extractKey,k=b.extractKey,C=(b.lowLevelIndex||b).extractKey,(f=l.reduce(function(P,I){var j=P,A=[];if(I.type==="add"||I.type==="put")for(var q=new bt,L=I.values.length-1;0<=L;--L){var F,Y=I.values[L],re=M(Y);!q.hasKey(re)&&(F=k(Y),x&&c(F)?F.some(function(de){return ds(de,R)}):ds(F,R))&&(q.addKey(re),A.push(Y))}switch(I.type){case"add":var ue=new bt().addKeys(u.values?P.map(function(se){return M(se)}):P),j=P.concat(u.values?A.filter(function(se){return se=M(se),!ue.hasKey(se)&&(ue.addKey(se),!0)}):A.map(function(se){return M(se)}).filter(function(se){return!ue.hasKey(se)&&(ue.addKey(se),!0)}));break;case"put":var ce=new bt().addKeys(I.values.map(function(se){return M(se)}));j=P.filter(function(se){return!ce.hasKey(u.values?M(se):se)}).concat(u.values?A:A.map(function(se){return M(se)}));break;case"delete":var ne=new bt().addKeys(I.keys);j=P.filter(function(se){return!ne.hasKey(u.values?M(se):se)});break;case"deleteRange":var he=I.range;j=P.filter(function(se){return!ds(M(se),he)})}return j},o))===o)?o:(f.sort(function(P,I){return Fe(C(P),C(I))||Fe(M(P),M(I))}),u.limit&&u.limit<1/0&&(f.length>u.limit?f.length=u.limit:o.length===u.limit&&f.length<u.limit&&(d.dirty=!0)),y?Object.freeze(f):f)}function pl(o,u){return Fe(o.lower,u.lower)===0&&Fe(o.upper,u.upper)===0&&!!o.lowerOpen==!!u.lowerOpen&&!!o.upperOpen==!!u.upperOpen}function qy(o,u){return((l,f,d,y)=>{if(l===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((l=Fe(l,f))===0){if(d&&y)return 0;if(d)return 1;if(y)return-1}return l})(o.lower,u.lower,o.lowerOpen,u.lowerOpen)<=0&&0<=((l,f,d,y)=>{if(l===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((l=Fe(l,f))===0){if(d&&y)return 0;if(d)return-1;if(y)return 1}return l})(o.upper,u.upper,o.upperOpen,u.upperOpen)}function By(o,u,l,f){o.subscribers.add(l),f.addEventListener("abort",function(){var d,y;o.subscribers.delete(l),o.subscribers.size===0&&(d=o,y=u,setTimeout(function(){d.subscribers.size===0&&$e(y,d)},3e3))})}var Ly={stack:"dbcore",level:0,name:"Cache",create:function(o){var u=o.schema.name;return n(n({},o),{transaction:function(l,f,d){var y,b,x=o.transaction(l,f,d);return f==="readwrite"&&(d=(y=new AbortController).signal,x.addEventListener("abort",(b=function(R){return function(){if(y.abort(),f==="readwrite"){for(var M=new Set,k=0,C=l;k<C.length;k++){var P=C[k],I=Er["idb://".concat(u,"/").concat(P)];if(I){var j=o.table(P),A=I.optimisticOps.filter(function(me){return me.trans===x});if(x._explicit&&R&&x.mutatedParts)for(var q=0,L=Object.values(I.queries.query);q<L.length;q++)for(var F=0,Y=(ce=L[q]).slice();F<Y.length;F++)os((ne=Y[F]).obsSet,x.mutatedParts)&&($e(ce,ne),ne.subscribers.forEach(function(me){return M.add(me)}));else if(0<A.length){I.optimisticOps=I.optimisticOps.filter(function(me){return me.trans!==x});for(var re=0,ue=Object.values(I.queries.query);re<ue.length;re++)for(var ce,ne,he,de=0,se=(ce=ue[re]).slice();de<se.length;de++)(ne=se[de]).res!=null&&x.mutatedParts&&(R&&!ne.dirty?(he=Object.isFrozen(ne.res),he=hl(ne.res,ne.req,A,j,ne,he),ne.dirty?($e(ce,ne),ne.subscribers.forEach(function(me){return M.add(me)})):he!==ne.res&&(ne.res=he,ne.promise=fe.resolve({result:he}))):(ne.dirty&&$e(ce,ne),ne.subscribers.forEach(function(me){return M.add(me)})))}}}M.forEach(function(me){return me()})}}})(!1),{signal:d}),x.addEventListener("error",b(!1),{signal:d}),x.addEventListener("complete",b(!0),{signal:d})),x},table:function(l){var f=o.table(l),d=f.schema.primaryKey;return n(n({},f),{mutate:function(y){var b,x=xe.trans;return!d.outbound&&x.db._options.cache!=="disabled"&&!x.explicit&&x.idbtrans.mode==="readwrite"&&(b=Er["idb://".concat(u,"/").concat(l)])?(x=f.mutate(y),y.type!=="add"&&y.type!=="put"||!(50<=y.values.length||fs(d,y).some(function(R){return R==null}))?(b.optimisticOps.push(y),y.mutatedParts&&ki(y.mutatedParts),x.then(function(R){0<R.numFailures&&($e(b.optimisticOps,y),(R=dl(0,y,R))&&b.optimisticOps.push(R),y.mutatedParts)&&ki(y.mutatedParts)}),x.catch(function(){$e(b.optimisticOps,y),y.mutatedParts&&ki(y.mutatedParts)})):x.then(function(R){var M=dl(0,n(n({},y),{values:y.values.map(function(k,C){var P;return R.failures[C]?k:(H(P=(P=d.keyPath)!=null&&P.includes(".")?Z(k):n({},k),d.keyPath,R.results[C]),P)})}),R);b.optimisticOps.push(M),queueMicrotask(function(){return y.mutatedParts&&ki(y.mutatedParts)})}),x):f.mutate(y)},query:function(y){var b,x,R,M,k,C,P;return ll(xe,f)&&fl("query",y)?(b=((R=xe.trans)==null?void 0:R.db._options.cache)==="immutable",x=(R=xe).requery,R=R.signal,C=((I,j,A,q)=>{var L=Er["idb://".concat(I,"/").concat(j)];if(!L)return[];if(!(I=L.queries[A]))return[null,!1,L,null];var F=I[(q.query?q.query.index.name:null)||""];if(!F)return[null,!1,L,null];switch(A){case"query":var Y=F.find(function(re){return re.req.limit===q.limit&&re.req.values===q.values&&pl(re.req.query.range,q.query.range)});return Y?[Y,!0,L,F]:[F.find(function(re){return("limit"in re.req?re.req.limit:1/0)>=q.limit&&(!q.values||re.req.values)&&qy(re.req.query.range,q.query.range)}),!1,L,F];case"count":return Y=F.find(function(re){return pl(re.req.query.range,q.query.range)}),[Y,!!Y,L,F]}})(u,l,"query",y),P=C[0],M=C[2],k=C[3],P&&C[1]?P.obsSet=y.obsSet:(C=f.query(y).then(function(I){var j=I.result;if(P&&(P.res=j),b){for(var A=0,q=j.length;A<q;++A)Object.freeze(j[A]);Object.freeze(j)}else I.result=Z(j);return I}).catch(function(I){return k&&P&&$e(k,P),Promise.reject(I)}),P={obsSet:y.obsSet,promise:C,subscribers:new Set,type:"query",req:y,dirty:!1},k?k.push(P):(k=[P],(M=M||(Er["idb://".concat(u,"/").concat(l)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[y.query.index.name||""]=k)),By(P,k,x,R),P.promise.then(function(I){return{result:hl(I.result,y,M==null?void 0:M.optimisticOps,f,P,b)}})):f.query(y)}})}})}};function Pi(o,u){return new Proxy(o,{get:function(l,f,d){return f==="db"?u:Reflect.get(l,f,d)}})}lt.prototype.version=function(o){if(isNaN(o)||o<.1)throw new ie.Type("Given version is not a positive number");if(o=Math.round(10*o)/10,this.idbdb||this._state.isBeingOpened)throw new ie.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,o);var u=this._versions,l=u.filter(function(f){return f._cfg.version===o})[0];return l||(l=new this.Version(o),u.push(l),u.sort(ky),l.stores({}),this._state.autoSchema=!1),l},lt.prototype._whenReady=function(o){var u=this;return this.idbdb&&(this._state.openComplete||xe.letThrough||this._vip)?o():new fe(function(l,f){if(u._state.openComplete)return f(new ie.DatabaseClosed(u._state.dbOpenError));if(!u._state.isBeingOpened){if(!u._state.autoOpen)return void f(new ie.DatabaseClosed);u.open().catch(B)}u._state.dbReadyPromise.then(l,f)}).then(o)},lt.prototype.use=function(d){var u=d.stack,l=d.create,f=d.level,d=d.name,y=(d&&this.unuse({stack:u,name:d}),this._middlewares[u]||(this._middlewares[u]=[]));return y.push({stack:u,create:l,level:f??10,name:d}),y.sort(function(b,x){return b.level-x.level}),this},lt.prototype.unuse=function(o){var u=o.stack,l=o.name,f=o.create;return u&&this._middlewares[u]&&(this._middlewares[u]=this._middlewares[u].filter(function(d){return f?d.create!==f:!!l&&d.name!==l})),this},lt.prototype.open=function(){var o=this;return xr(Vt,function(){return $y(o)})},lt.prototype._close=function(){this.on.close.fire(new CustomEvent("close"));var o=this._state,u=Qr.indexOf(this);if(0<=u&&Qr.splice(u,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}o.isBeingOpened||(o.dbReadyPromise=new fe(function(l){o.dbReadyResolve=l}),o.openCanceller=new fe(function(l,f){o.cancelOpen=f}))},lt.prototype.close=function(u){var u=(u===void 0?{disableAutoOpen:!0}:u).disableAutoOpen,l=this._state;u?(l.isBeingOpened&&l.cancelOpen(new ie.DatabaseClosed),this._close(),l.autoOpen=!1,l.dbOpenError=new ie.DatabaseClosed):(this._close(),l.autoOpen=this._options.autoOpen||l.isBeingOpened,l.openComplete=!1,l.dbOpenError=null)},lt.prototype.delete=function(o){var u=this,l=(o===void 0&&(o={disableAutoOpen:!0}),0<arguments.length&&typeof arguments[0]!="object"),f=this._state;return new fe(function(d,y){function b(){u.close(o);var x=u._deps.indexedDB.deleteDatabase(u.name);x.onsuccess=Qe(function(){var R,M,k;R=u._deps,M=u.name,rs(k=R.indexedDB)||M===gi||ts(k,R.IDBKeyRange).delete(M).catch(B),d()}),x.onerror=Kt(y),x.onblocked=u._fireOnBlocked}if(l)throw new ie.InvalidArgument("Invalid closeOptions argument to db.delete()");f.isBeingOpened?f.dbReadyPromise.then(b):b()})},lt.prototype.backendDB=function(){return this.idbdb},lt.prototype.isOpen=function(){return this.idbdb!==null},lt.prototype.hasBeenClosed=function(){var o=this._state.dbOpenError;return o&&o.name==="DatabaseClosed"},lt.prototype.hasFailed=function(){return this._state.dbOpenError!==null},lt.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(lt.prototype,"tables",{get:function(){var o=this;return a(this._allTables).map(function(u){return o._allTables[u]})},enumerable:!1,configurable:!0}),lt.prototype.transaction=function(){var o=(function(u,l,f){var d=arguments.length;if(d<2)throw new ie.InvalidArgument("Too few arguments");for(var y=new Array(d-1);--d;)y[d-1]=arguments[d];return f=y.pop(),[u,ke(y),f]}).apply(this,arguments);return this._transaction.apply(this,o)},lt.prototype._transaction=function(o,u,l){var f,d,y=this,b=xe.trans,x=(b&&b.db===this&&o.indexOf("!")===-1||(b=null),o.indexOf("?")!==-1);o=o.replace("!","").replace("?","");try{if(d=u.map(function(M){if(M=M instanceof y.Table?M.name:M,typeof M!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return M}),o=="r"||o===Ko)f=Ko;else{if(o!="rw"&&o!=zo)throw new ie.InvalidArgument("Invalid transaction mode: "+o);f=zo}if(b){if(b.mode===Ko&&f===zo){if(!x)throw new ie.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");b=null}b&&d.forEach(function(M){if(b&&b.storeNames.indexOf(M)===-1){if(!x)throw new ie.SubTransaction("Table "+M+" not included in parent transaction.");b=null}}),x&&b&&!b.active&&(b=null)}}catch(M){return b?b._promise(null,function(k,C){C(M)}):ct(M)}var R=(function M(k,C,P,I,j){return fe.resolve().then(function(){var F=xe.transless||xe,A=k._createTransaction(C,P,k._dbSchema,I),F=(A.explicit=!0,{trans:A,transless:F});if(I)A.idbtrans=I.idbtrans;else try{A.create(),A.idbtrans._explicit=!0,k._state.PR1398_maxLoop=3}catch(Y){return Y.name===je.InvalidState&&k.isOpen()&&0<--k._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),k.close({disableAutoOpen:!1}),k.open().then(function(){return M(k,C,P,null,j)})):ct(Y)}var q,L=ae(j),F=(L&&Zr(),fe.follow(function(){var Y;(q=j.call(A,A))&&(L?(Y=ar.bind(null,null),q.then(Y,Y)):typeof q.next=="function"&&typeof q.throw=="function"&&(q=cs(q)))},F));return(q&&typeof q.then=="function"?fe.resolve(q).then(function(Y){return A.active?Y:ct(new ie.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):F.then(function(){return q})).then(function(Y){return I&&A._resolve(),A._completion.then(function(){return Y})}).catch(function(Y){return A._reject(Y),ct(Y)})})}).bind(null,this,f,d,b,l);return b?b._promise(f,R,"lock"):xe.trans?xr(xe.transless,function(){return y._whenReady(R)}):this._whenReady(R)},lt.prototype.table=function(o){if(g(this._allTables,o))return this._allTables[o];throw new ie.InvalidTable("Table ".concat(o," does not exist"))};var Xt=lt;function lt(o,u){var l,f,d,y,b,x=this,R=(this._middlewares={},this.verno=0,lt.dependencies),R=(this._options=u=n({addons:lt.addons,autoOpen:!0,indexedDB:R.indexedDB,IDBKeyRange:R.IDBKeyRange,cache:"cloned"},u),this._deps={indexedDB:u.indexedDB,IDBKeyRange:u.IDBKeyRange},u.addons),M=(this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this,{dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:B,dbReadyPromise:null,cancelOpen:B,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:u.autoOpen}),k=(M.dbReadyPromise=new fe(function(C){M.dbReadyResolve=C}),M.openCanceller=new fe(function(C,P){M.cancelOpen=P}),this._state=M,this.name=o,this.on=Rn(this,"populate","blocked","versionchange","close",{ready:[Cn,B]}),this.once=function(C,P){var I=function(){for(var j=[],A=0;A<arguments.length;A++)j[A]=arguments[A];x.on(C).unsubscribe(I),P.apply(x,j)};return x.on(C,I)},this.on.ready.subscribe=K(this.on.ready.subscribe,function(C){return function(P,I){lt.vip(function(){var j,A=x._state;A.openComplete?(A.dbOpenError||fe.resolve().then(P),I&&C(P)):A.onReadyBeingFired?(A.onReadyBeingFired.push(P),I&&C(P)):(C(P),j=x,I||C(function q(){j.on.ready.unsubscribe(P),j.on.ready.unsubscribe(q)}))})}}),this.Collection=(l=this,kn(Sy.prototype,function(q,A){this.db=l;var I=Vc,j=null;if(A)try{I=A()}catch(F){j=F}var A=q._ctx,q=A.table,L=q.hook.reading.fire;this._ctx={table:q,index:A.index,isPrimKey:!A.index||q.schema.primKey.keyPath&&A.index===q.schema.primKey.name,range:I,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:j,or:A.or,valueMapper:L!==rt?L:null}})),this.Table=(f=this,kn(Yc.prototype,function(C,P,I){this.db=f,this._tx=I,this.name=C,this.schema=P,this.hook=f._allTables[C]?f._allTables[C].hook:Rn(null,{creating:[Fo,B],reading:[Ot,rt],updating:[No,B],deleting:[Mo,B]})})),this.Transaction=(d=this,kn(Cy.prototype,function(C,P,I,j,A){var q=this;C!=="readonly"&&P.forEach(function(L){L=(L=I[L])==null?void 0:L.yProps,L&&(P=P.concat(L.map(function(F){return F.updatesTable})))}),this.db=d,this.mode=C,this.storeNames=P,this.schema=I,this.chromeTransactionDurability=j,this.idbtrans=null,this.on=Rn(this,"complete","error","abort"),this.parent=A||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new fe(function(L,F){q._resolve=L,q._reject=F}),this._completion.then(function(){q.active=!1,q.on.complete.fire()},function(L){var F=q.active;return q.active=!1,q.on.error.fire(L),q.parent?q.parent._reject(L):F&&q.idbtrans&&q.idbtrans.abort(),ct(L)})})),this.Version=(y=this,kn(Iy.prototype,function(C){this.db=y,this._cfg={version:C,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(b=this,kn(el.prototype,function(C,P,I){if(this.db=b,this._ctx={table:C,index:P===":id"?null:P,or:I},this._cmp=this._ascending=Fe,this._descending=function(j,A){return Fe(A,j)},this._max=function(j,A){return 0<Fe(j,A)?j:A},this._min=function(j,A){return Fe(j,A)<0?j:A},this._IDBKeyRange=b._deps.IDBKeyRange,!this._IDBKeyRange)throw new ie.MissingAPI})),this.on("versionchange",function(C){0<C.newVersion?console.warn("Another connection wants to upgrade database '".concat(x.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(x.name,"'. Closing db now to resume the delete request.")),x.close({disableAutoOpen:!1})}),this.on("blocked",function(C){!C.newVersion||C.newVersion<C.oldVersion?console.warn("Dexie.delete('".concat(x.name,"') was blocked")):console.warn("Upgrade '".concat(x.name,"' blocked by other connection holding version ").concat(C.oldVersion/10))}),this._maxKey=In(u.IDBKeyRange),this._createTransaction=function(C,P,I,j){return new x.Transaction(C,P,I,x._options.chromeTransactionDurability,j)},this._fireOnBlocked=function(C){x.on("blocked").fire(C),Qr.filter(function(P){return P.name===x.name&&P!==x&&!P._state.vcFired}).map(function(P){return P.on("versionchange").fire(C)})},this.use(My),this.use(Ly),this.use(Ny),this.use(Dy),this.use(Fy),new Proxy(this,{get:function(C,P,I){var j;return P==="_vip"||(P==="table"?function(A){return Pi(x.table(A),k)}:(j=Reflect.get(C,P,I))instanceof Yc?Pi(j,k):P==="tables"?j.map(function(A){return Pi(A,k)}):P==="_createTransaction"?function(){return Pi(j.apply(this,arguments),k)}:j)}}));this.vip=k,R.forEach(function(C){return C(x)})}var Ii,nn=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Uy=(hs.prototype.subscribe=function(o,u,l){return this._subscribe(o&&typeof o!="function"?o:{next:o,error:u,complete:l})},hs.prototype[nn]=function(){return this},hs);function hs(o){this._subscribe=o}try{Ii={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{Ii={indexedDB:null,IDBKeyRange:null}}function ml(o){var u,l=!1,f=new Uy(function(d){var y=ae(o),b,x=!1,R={},M={},k={get closed(){return x},unsubscribe:function(){x||(x=!0,b&&b.abort(),C&&lr.storagemutated.unsubscribe(I))}},C=(d.start&&d.start(k),!1),P=function(){return Vo(j)},I=function(A){Ri(R,A),os(M,R)&&P()},j=function(){var A,q,L;!x&&Ii.indexedDB&&(R={},A={},b&&b.abort(),b=new AbortController,L=(F=>{var Y=Jr();try{y&&Zr();var re=sr(o,F);return re=y?re.finally(ar):re}finally{Y&&Xr()}})(q={subscr:A,signal:b.signal,requery:P,querier:o,trans:null}),Promise.resolve(L).then(function(F){l=!0,u=F,x||q.signal.aborted||(R={},(Y=>{for(var re in Y)if(g(Y,re))return;return 1})(M=A)||C||(lr(Pn,I),C=!0),Vo(function(){return!x&&d.next&&d.next(F)}))},function(F){l=!1,["DatabaseClosedError","AbortError"].includes(F==null?void 0:F.name)||x||Vo(function(){x||d.error&&d.error(F)})}))};return setTimeout(P,0),k});return f.hasValue=function(){return l},f.getValue=function(){return u},f}var Cr=Xt;function ps(o){var u=fr;try{fr=!0,lr.storagemutated.fire(o),us(o,!0)}finally{fr=u}}_(Cr,n(n({},be),{delete:function(o){return new Cr(o,{addons:[]}).delete()},exists:function(o){return new Cr(o,{addons:[]}).open().then(function(u){return u.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(o){try{return u=Cr.dependencies,l=u.indexedDB,u=u.IDBKeyRange,(rs(l)?Promise.resolve(l.databases()).then(function(f){return f.map(function(d){return d.name}).filter(function(d){return d!==gi})}):ts(l,u).toCollection().primaryKeys()).then(o)}catch{return ct(new ie.MissingAPI)}var u,l},defineClass:function(){return function(o){h(this,o)}},ignoreTransaction:function(o){return xe.trans?xr(xe.transless,o):o()},vip:ns,async:function(o){return function(){try{var u=cs(o.apply(this,arguments));return u&&typeof u.then=="function"?u:fe.resolve(u)}catch(l){return ct(l)}}},spawn:function(o,u,l){try{var f=cs(o.apply(l,u||[]));return f&&typeof f.then=="function"?f:fe.resolve(f)}catch(d){return ct(d)}},currentTransaction:{get:function(){return xe.trans||null}},waitFor:function(o,u){return o=fe.resolve(typeof o=="function"?Cr.ignoreTransaction(o):o).timeout(u||6e4),xe.trans?xe.trans.waitFor(o):o},Promise:fe,debug:{get:function(){return It},set:function(o){U(o)}},derive:v,extend:h,props:_,override:K,Events:Rn,on:lr,liveQuery:ml,extendObservabilitySet:Ri,getByKeyPath:N,setByKeyPath:H,delByKeyPath:function(o,u){typeof u=="string"?H(o,u,void 0):"length"in u&&[].map.call(u,function(l){H(o,l,void 0)})},shallowClone:te,deepClone:Z,getObjectDiff:ls,cmp:Fe,asap:T,minKey:-1/0,addons:[],connections:Qr,errnames:je,dependencies:Ii,cache:Er,semVer:"4.3.0",version:"4.3.0".split(".").map(function(o){return parseInt(o)}).reduce(function(o,u,l){return o+u/Math.pow(10,2*l)})})),Cr.maxKey=In(Cr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(lr(Pn,function(o){fr||(o=new CustomEvent(Ho,{detail:o}),fr=!0,dispatchEvent(o),fr=!1)}),addEventListener(Ho,function(o){o=o.detail,fr||ps(o)}));var on,fr=!1,yl=function(){};return typeof BroadcastChannel<"u"&&((yl=function(){(on=new BroadcastChannel(Ho)).onmessage=function(o){return o.data&&ps(o.data)}})(),typeof on.unref=="function"&&on.unref(),lr(Pn,function(o){fr||on.postMessage(o)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(o){if(!Xt.disableBfCache&&o.persisted){It&&console.debug("Dexie: handling persisted pagehide"),on!=null&&on.close();for(var u=0,l=Qr;u<l.length;u++)l[u].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(o){!Xt.disableBfCache&&o.persisted&&(It&&console.debug("Dexie: handling persisted pageshow"),yl(),ps({all:new bt(-1/0,[[]])}))})),fe.rejectionMapper=function(o,u){return!o||o instanceof _e||o instanceof TypeError||o instanceof SyntaxError||!o.name||!tt[o.name]?o:(u=new tt[o.name](u||o.message,o),"stack"in o&&S(u,"stack",{get:function(){return this.inner.stack}}),u)},U(It),n(Xt,Object.freeze({__proto__:null,Dexie:Xt,Entity:Kc,PropModification:An,RangeSet:bt,add:function(o){return new An({add:o})},cmp:Fe,default:Xt,liveQuery:ml,mergeRanges:Fn,rangesOverlap:ol,remove:function(o){return new An({remove:o})},replacePrefix:function(o,u){return new An({replacePrefix:[o,u]})}}),{default:Xt}),Xt})})(Yi)),Yi.exports}var k0=R0();const Lu=wn(k0),Pd=Symbol.for("Dexie"),yn=globalThis[Pd]||(globalThis[Pd]=Lu);if(Lu.semVer!==yn.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Lu.semVer} and ${yn.semVer}`);const{liveQuery:HC,mergeRanges:YC,rangesOverlap:JC,RangeSet:XC,cmp:ZC,Entity:QC,PropModification:eO,replacePrefix:tO,add:rO,remove:nO,DexieYProvider:iO}=yn;class j0 extends yn{constructor(){super("chat_cache");Ar(this,"summaries");Ar(this,"users");Ar(this,"messages");Ar(this,"msgCursor");Ar(this,"groups");this.version(1).stores({summaries:"id",users:"id",messages:"id, conversationId",msgCursor:"id",groups:"id"})}async clearData(){await Promise.all([this.summaries.clear(),this.users.clear(),this.messages.clear(),this.msgCursor.clear(),this.groups.clear()])}}const ft=new j0,Qp=300*1e3;function P0(e,t=Qp){if(e.length===0)return[];const r=[];let n=null;for(const i of e){const s=new Date(i.created_at).getTime();if(!n)n={senderId:i.sender,messages:[i],timestamp:new Date(i.created_at)};else{const a=new Date(n.messages[n.messages.length-1].created_at).getTime(),c=s-a;n.senderId===i.sender&&c<=t?n.messages.push(i):(r.push(n),n={senderId:i.sender,messages:[i],timestamp:new Date(i.created_at)})}}return n&&r.push(n),r}function Uu(e,t,r=Qp){if(e.sender!==t.sender)return!1;const n=new Date(e.created_at).getTime(),i=new Date(t.created_at).getTime();return Math.abs(i-n)<=r}function I0(e=""){const t=e.trim().split(" ").filter(r=>r.length>0);if(t.length>=2){const r=t[0],n=t[t.length-1];if(r&&n&&r[0]&&n[0])return(r[0]+n[0]).toUpperCase()}return e.slice(0,2).toUpperCase()}const Id=async(e,t={})=>{const r=Ut(),n=go(e);e.type==="group"?t.group=e.id:t.user=e.id;const i=await r.getMessages(t);return i.messages.map(a=>({...a,conversationId:n})).forEach(a=>ft.messages.put(a)),ft.msgCursor.put({...i.cursor,id:n}),i},$0=async(e,t)=>{const{getActiveConversationId:r}=await Promise.resolve().then(()=>mC),n=O0(e,t),i={...e,conversationId:n};await ft.messages.put(i);const s=await ft.summaries.get(n);if(s){const{unread_count:a,message_count:c}=s,h=n===r(),p={message_count:c+1,last_message_at:e.created_at,unread_count:h?a:a+1};await ft.summaries.update(n,p)}};let kt=null;async function em(e){if(kt)return kt;kt=new E0(e),await kt.connect();const t=await kt.getMe();return kt.ws.on("message",r=>{r.type==="message"&&$0(r.data,t.id)}),kt}function Ut(){if(!kt)throw new Error("SDK not initialized. Call initSDK() first.");return kt}function tm(){kt&&(kt.disconnect(),kt=null)}function vc(){return kt!==null}const eo=(e,t)=>e instanceof Error?e:new Error(t),D0=()=>$.jsx(J.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",children:$.jsx(J.CircularProgress,{})}),F0=({error:e,retry:t})=>$.jsx(J.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",p:2,children:$.jsxs(J.Alert,{severity:"error",action:$.jsx(J.Button,{onClick:t,children:" Retry"}),children:[$.jsx(J.AlertTitle,{children:"Failed to initialize chat"}),e.message]})}),M0=({config:e,children:t,LoadingComponent:r=D0,ErrorComponent:n=F0})=>{const[i,s]=X.useState(!1),[a,c]=X.useState(null),h=X.useCallback(async()=>{s(!1),c(null);try{if(vc())return;await em(e),s(!0)}catch(p){c(eo(p,"Unknown error initializing SDK"))}},[e]);return X.useEffect(()=>(h(),()=>{tm()}),[h]),!i&&!a?$.jsx(r,{}):a?$.jsx(n,{error:a,retry:h}):$.jsx($.Fragment,{children:t})},$d=e=>e,N0=()=>{let e=$d;return{configure(t){e=t},generate(t){return e(t)},reset(){e=$d}}},q0=N0();function qr(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function Br(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":qr(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Mi={exports:{}},Ni={exports:{}},Le={};/** @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 Dd;function B0(){if(Dd)return Le;Dd=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,O=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function K(T){if(typeof T=="object"&&T!==null){var N=T.$$typeof;switch(N){case t:switch(T=T.type,T){case h:case p:case n:case s:case i:case g:return T;default:switch(T=T&&T.$$typeof,T){case c:case m:case S:case O:case a:return T;default:return N}}case r:return N}}}function G(T){return K(T)===p}return Le.AsyncMode=h,Le.ConcurrentMode=p,Le.ContextConsumer=c,Le.ContextProvider=a,Le.Element=t,Le.ForwardRef=m,Le.Fragment=n,Le.Lazy=S,Le.Memo=O,Le.Portal=r,Le.Profiler=s,Le.StrictMode=i,Le.Suspense=g,Le.isAsyncMode=function(T){return G(T)||K(T)===h},Le.isConcurrentMode=G,Le.isContextConsumer=function(T){return K(T)===c},Le.isContextProvider=function(T){return K(T)===a},Le.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Le.isForwardRef=function(T){return K(T)===m},Le.isFragment=function(T){return K(T)===n},Le.isLazy=function(T){return K(T)===S},Le.isMemo=function(T){return K(T)===O},Le.isPortal=function(T){return K(T)===r},Le.isProfiler=function(T){return K(T)===s},Le.isStrictMode=function(T){return K(T)===i},Le.isSuspense=function(T){return K(T)===g},Le.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===p||T===s||T===i||T===g||T===_||typeof T=="object"&&T!==null&&(T.$$typeof===S||T.$$typeof===O||T.$$typeof===a||T.$$typeof===c||T.$$typeof===m||T.$$typeof===E||T.$$typeof===D||T.$$typeof===z||T.$$typeof===v)},Le.typeOf=K,Le}var Ue={};/** @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 Fd;function L0(){return Fd||(Fd=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,O=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function K(B){return typeof B=="string"||typeof B=="function"||B===n||B===p||B===s||B===i||B===g||B===_||typeof B=="object"&&B!==null&&(B.$$typeof===S||B.$$typeof===O||B.$$typeof===a||B.$$typeof===c||B.$$typeof===m||B.$$typeof===E||B.$$typeof===D||B.$$typeof===z||B.$$typeof===v)}function G(B){if(typeof B=="object"&&B!==null){var rt=B.$$typeof;switch(rt){case t:var Ot=B.type;switch(Ot){case h:case p:case n:case s:case i:case g:return Ot;default:var wt=Ot&&Ot.$$typeof;switch(wt){case c:case m:case S:case O:case a:return wt;default:return rt}}case r:return rt}}}var T=h,N=p,H=c,te=a,pe=t,ke=m,oe=n,w=S,Z=O,ee=r,ve=s,ge=i,ze=g,$e=!1;function ut(B){return $e||($e=!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.")),Q(B)||G(B)===h}function Q(B){return G(B)===p}function ae(B){return G(B)===c}function be(B){return G(B)===a}function Oe(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function _e(B){return G(B)===m}function Ae(B){return G(B)===n}function Re(B){return G(B)===S}function Ee(B){return G(B)===O}function je(B){return G(B)===r}function De(B){return G(B)===s}function ie(B){return G(B)===i}function tt(B){return G(B)===g}Ue.AsyncMode=T,Ue.ConcurrentMode=N,Ue.ContextConsumer=H,Ue.ContextProvider=te,Ue.Element=pe,Ue.ForwardRef=ke,Ue.Fragment=oe,Ue.Lazy=w,Ue.Memo=Z,Ue.Portal=ee,Ue.Profiler=ve,Ue.StrictMode=ge,Ue.Suspense=ze,Ue.isAsyncMode=ut,Ue.isConcurrentMode=Q,Ue.isContextConsumer=ae,Ue.isContextProvider=be,Ue.isElement=Oe,Ue.isForwardRef=_e,Ue.isFragment=Ae,Ue.isLazy=Re,Ue.isMemo=Ee,Ue.isPortal=je,Ue.isProfiler=De,Ue.isStrictMode=ie,Ue.isSuspense=tt,Ue.isValidElementType=K,Ue.typeOf=G})()),Ue}var Md;function rm(){return Md||(Md=1,process.env.NODE_ENV==="production"?Ni.exports=B0():Ni.exports=L0()),Ni.exports}/*
26
- object-assign
27
- (c) Sindre Sorhus
28
- @license MIT
29
- */var au,Nd;function U0(){if(Nd)return au;Nd=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},c=0;c<10;c++)a["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(a).map(function(m){return a[m]});if(h.join("")!=="0123456789")return!1;var p={};return"abcdefghijklmnopqrst".split("").forEach(function(m){p[m]=m}),Object.keys(Object.assign({},p)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return au=i()?Object.assign:function(s,a){for(var c,h=n(s),p,m=1;m<arguments.length;m++){c=Object(arguments[m]);for(var g in c)t.call(c,g)&&(h[g]=c[g]);if(e){p=e(c);for(var _=0;_<p.length;_++)r.call(c,p[_])&&(h[p[_]]=c[p[_]])}}return h},au}var uu,qd;function _c(){if(qd)return uu;qd=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return uu=e,uu}var cu,Bd;function nm(){return Bd||(Bd=1,cu=Function.call.bind(Object.prototype.hasOwnProperty)),cu}var lu,Ld;function V0(){if(Ld)return lu;Ld=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=_c(),r={},n=nm();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(s,a,c,h,p){if(process.env.NODE_ENV!=="production"){for(var m in s)if(n(s,m)){var g;try{if(typeof s[m]!="function"){var _=Error((h||"React class")+": "+c+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _.name="Invariant Violation",_}g=s[m](a,m,h,c,null,t)}catch(S){g=S}if(g&&!(g instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof g+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),g instanceof Error&&!(g.message in r)){r[g.message]=!0;var O=p?p():"";e("Failed "+c+" type: "+g.message+(O??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},lu=i,lu}var fu,Ud;function K0(){if(Ud)return fu;Ud=1;var e=rm(),t=U0(),r=_c(),n=nm(),i=V0(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(c){var h="Warning: "+c;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function a(){return null}return fu=function(c,h){var p=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function g(Q){var ae=Q&&(p&&Q[p]||Q[m]);if(typeof ae=="function")return ae}var _="<<anonymous>>",O={array:D("array"),bigint:D("bigint"),bool:D("boolean"),func:D("function"),number:D("number"),object:D("object"),string:D("string"),symbol:D("symbol"),any:z(),arrayOf:K,element:G(),elementType:T(),instanceOf:N,node:ke(),objectOf:te,oneOf:H,oneOfType:pe,shape:w,exact:Z};function S(Q,ae){return Q===ae?Q!==0||1/Q===1/ae:Q!==Q&&ae!==ae}function v(Q,ae){this.message=Q,this.data=ae&&typeof ae=="object"?ae:{},this.stack=""}v.prototype=Error.prototype;function E(Q){if(process.env.NODE_ENV!=="production")var ae={},be=0;function Oe(Ae,Re,Ee,je,De,ie,tt){if(je=je||_,ie=ie||Ee,tt!==r){if(h){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var rt=je+":"+Ee;!ae[rt]&&be<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+je+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),ae[rt]=!0,be++)}}return Re[Ee]==null?Ae?Re[Ee]===null?new v("The "+De+" `"+ie+"` is marked as required "+("in `"+je+"`, but its value is `null`.")):new v("The "+De+" `"+ie+"` is marked as required in "+("`"+je+"`, but its value is `undefined`.")):null:Q(Re,Ee,je,De,ie)}var _e=Oe.bind(null,!1);return _e.isRequired=Oe.bind(null,!0),_e}function D(Q){function ae(be,Oe,_e,Ae,Re,Ee){var je=be[Oe],De=ge(je);if(De!==Q){var ie=ze(je);return new v("Invalid "+Ae+" `"+Re+"` of type "+("`"+ie+"` supplied to `"+_e+"`, expected ")+("`"+Q+"`."),{expectedType:Q})}return null}return E(ae)}function z(){return E(a)}function K(Q){function ae(be,Oe,_e,Ae,Re){if(typeof Q!="function")return new v("Property `"+Re+"` of component `"+_e+"` has invalid PropType notation inside arrayOf.");var Ee=be[Oe];if(!Array.isArray(Ee)){var je=ge(Ee);return new v("Invalid "+Ae+" `"+Re+"` of type "+("`"+je+"` supplied to `"+_e+"`, expected an array."))}for(var De=0;De<Ee.length;De++){var ie=Q(Ee,De,_e,Ae,Re+"["+De+"]",r);if(ie instanceof Error)return ie}return null}return E(ae)}function G(){function Q(ae,be,Oe,_e,Ae){var Re=ae[be];if(!c(Re)){var Ee=ge(Re);return new v("Invalid "+_e+" `"+Ae+"` of type "+("`"+Ee+"` supplied to `"+Oe+"`, expected a single ReactElement."))}return null}return E(Q)}function T(){function Q(ae,be,Oe,_e,Ae){var Re=ae[be];if(!e.isValidElementType(Re)){var Ee=ge(Re);return new v("Invalid "+_e+" `"+Ae+"` of type "+("`"+Ee+"` supplied to `"+Oe+"`, expected a single ReactElement type."))}return null}return E(Q)}function N(Q){function ae(be,Oe,_e,Ae,Re){if(!(be[Oe]instanceof Q)){var Ee=Q.name||_,je=ut(be[Oe]);return new v("Invalid "+Ae+" `"+Re+"` of type "+("`"+je+"` supplied to `"+_e+"`, expected ")+("instance of `"+Ee+"`."))}return null}return E(ae)}function H(Q){if(!Array.isArray(Q))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function ae(be,Oe,_e,Ae,Re){for(var Ee=be[Oe],je=0;je<Q.length;je++)if(S(Ee,Q[je]))return null;var De=JSON.stringify(Q,function(tt,B){var rt=ze(B);return rt==="symbol"?String(B):B});return new v("Invalid "+Ae+" `"+Re+"` of value `"+String(Ee)+"` "+("supplied to `"+_e+"`, expected one of "+De+"."))}return E(ae)}function te(Q){function ae(be,Oe,_e,Ae,Re){if(typeof Q!="function")return new v("Property `"+Re+"` of component `"+_e+"` has invalid PropType notation inside objectOf.");var Ee=be[Oe],je=ge(Ee);if(je!=="object")return new v("Invalid "+Ae+" `"+Re+"` of type "+("`"+je+"` supplied to `"+_e+"`, expected an object."));for(var De in Ee)if(n(Ee,De)){var ie=Q(Ee,De,_e,Ae,Re+"."+De,r);if(ie instanceof Error)return ie}return null}return E(ae)}function pe(Q){if(!Array.isArray(Q))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var ae=0;ae<Q.length;ae++){var be=Q[ae];if(typeof be!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$e(be)+" at index "+ae+"."),a}function Oe(_e,Ae,Re,Ee,je){for(var De=[],ie=0;ie<Q.length;ie++){var tt=Q[ie],B=tt(_e,Ae,Re,Ee,je,r);if(B==null)return null;B.data&&n(B.data,"expectedType")&&De.push(B.data.expectedType)}var rt=De.length>0?", expected one of type ["+De.join(", ")+"]":"";return new v("Invalid "+Ee+" `"+je+"` supplied to "+("`"+Re+"`"+rt+"."))}return E(Oe)}function ke(){function Q(ae,be,Oe,_e,Ae){return ee(ae[be])?null:new v("Invalid "+_e+" `"+Ae+"` supplied to "+("`"+Oe+"`, expected a ReactNode."))}return E(Q)}function oe(Q,ae,be,Oe,_e){return new v((Q||"React class")+": "+ae+" type `"+be+"."+Oe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+_e+"`.")}function w(Q){function ae(be,Oe,_e,Ae,Re){var Ee=be[Oe],je=ge(Ee);if(je!=="object")return new v("Invalid "+Ae+" `"+Re+"` of type `"+je+"` "+("supplied to `"+_e+"`, expected `object`."));for(var De in Q){var ie=Q[De];if(typeof ie!="function")return oe(_e,Ae,Re,De,ze(ie));var tt=ie(Ee,De,_e,Ae,Re+"."+De,r);if(tt)return tt}return null}return E(ae)}function Z(Q){function ae(be,Oe,_e,Ae,Re){var Ee=be[Oe],je=ge(Ee);if(je!=="object")return new v("Invalid "+Ae+" `"+Re+"` of type `"+je+"` "+("supplied to `"+_e+"`, expected `object`."));var De=t({},be[Oe],Q);for(var ie in De){var tt=Q[ie];if(n(Q,ie)&&typeof tt!="function")return oe(_e,Ae,Re,ie,ze(tt));if(!tt)return new v("Invalid "+Ae+" `"+Re+"` key `"+ie+"` supplied to `"+_e+"`.\nBad object: "+JSON.stringify(be[Oe],null," ")+`
30
- Valid keys: `+JSON.stringify(Object.keys(Q),null," "));var B=tt(Ee,ie,_e,Ae,Re+"."+ie,r);if(B)return B}return null}return E(ae)}function ee(Q){switch(typeof Q){case"number":case"string":case"undefined":return!0;case"boolean":return!Q;case"object":if(Array.isArray(Q))return Q.every(ee);if(Q===null||c(Q))return!0;var ae=g(Q);if(ae){var be=ae.call(Q),Oe;if(ae!==Q.entries){for(;!(Oe=be.next()).done;)if(!ee(Oe.value))return!1}else for(;!(Oe=be.next()).done;){var _e=Oe.value;if(_e&&!ee(_e[1]))return!1}}else return!1;return!0;default:return!1}}function ve(Q,ae){return Q==="symbol"?!0:ae?ae["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ae instanceof Symbol:!1}function ge(Q){var ae=typeof Q;return Array.isArray(Q)?"array":Q instanceof RegExp?"object":ve(ae,Q)?"symbol":ae}function ze(Q){if(typeof Q>"u"||Q===null)return""+Q;var ae=ge(Q);if(ae==="object"){if(Q instanceof Date)return"date";if(Q instanceof RegExp)return"regexp"}return ae}function $e(Q){var ae=ze(Q);switch(ae){case"array":case"object":return"an "+ae;case"boolean":case"date":case"regexp":return"a "+ae;default:return ae}}function ut(Q){return!Q.constructor||!Q.constructor.name?_:Q.constructor.name}return O.checkPropTypes=i,O.resetWarningCache=i.resetWarningCache,O.PropTypes=O,O},fu}var du,Vd;function z0(){if(Vd)return du;Vd=1;var e=_c();function t(){}function r(){}return r.resetWarningCache=t,du=function(){function n(a,c,h,p,m,g){if(g!==e){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}n.isRequired=n;function i(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},du}var Kd;function G0(){if(Kd)return Mi.exports;if(Kd=1,process.env.NODE_ENV!=="production"){var e=rm(),t=!0;Mi.exports=K0()(e.isElement,t)}else Mi.exports=z0()();return Mi.exports}var W0=G0();const Be=wn(W0);function im(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=im(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function om(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=im(e))&&(n&&(n+=" "),n+=t);return n}function H0(e,t,r=void 0){const n={};for(const i in e){const s=e[i];let a="",c=!0;for(let h=0;h<s.length;h+=1){const p=s[h];p&&(a+=(c===!0?"":" ")+t(p),c=!1,r&&r[p]&&(a+=" "+r[p]))}n[i]=a}return n}var qi={exports:{}},He={};/**
31
- * @license React
32
- * react-is.production.js
33
- *
34
- * Copyright (c) Meta Platforms, Inc. and affiliates.
35
- *
36
- * This source code is licensed under the MIT license found in the
37
- * LICENSE file in the root directory of this source tree.
38
- */var zd;function Y0(){if(zd)return He;zd=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),_=Symbol.for("react.view_transition"),O=Symbol.for("react.client.reference");function S(v){if(typeof v=="object"&&v!==null){var E=v.$$typeof;switch(E){case e:switch(v=v.type,v){case r:case i:case n:case h:case p:case _:return v;default:switch(v=v&&v.$$typeof,v){case a:case c:case g:case m:return v;case s:return v;default:return E}}case t:return E}}}return He.ContextConsumer=s,He.ContextProvider=a,He.Element=e,He.ForwardRef=c,He.Fragment=r,He.Lazy=g,He.Memo=m,He.Portal=t,He.Profiler=i,He.StrictMode=n,He.Suspense=h,He.SuspenseList=p,He.isContextConsumer=function(v){return S(v)===s},He.isContextProvider=function(v){return S(v)===a},He.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},He.isForwardRef=function(v){return S(v)===c},He.isFragment=function(v){return S(v)===r},He.isLazy=function(v){return S(v)===g},He.isMemo=function(v){return S(v)===m},He.isPortal=function(v){return S(v)===t},He.isProfiler=function(v){return S(v)===i},He.isStrictMode=function(v){return S(v)===n},He.isSuspense=function(v){return S(v)===h},He.isSuspenseList=function(v){return S(v)===p},He.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===i||v===n||v===h||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===m||v.$$typeof===a||v.$$typeof===s||v.$$typeof===c||v.$$typeof===O||v.getModuleId!==void 0)},He.typeOf=S,He}var Ye={};/**
39
- * @license React
40
- * react-is.development.js
41
- *
42
- * Copyright (c) Meta Platforms, Inc. and affiliates.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE file in the root directory of this source tree.
46
- */var Gd;function J0(){return Gd||(Gd=1,process.env.NODE_ENV!=="production"&&(function(){function e(v){if(typeof v=="object"&&v!==null){var E=v.$$typeof;switch(E){case t:switch(v=v.type,v){case n:case s:case i:case p:case m:case O:return v;default:switch(v=v&&v.$$typeof,v){case c:case h:case _:case g:return v;case a:return v;default:return E}}case r:return E}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),O=Symbol.for("react.view_transition"),S=Symbol.for("react.client.reference");Ye.ContextConsumer=a,Ye.ContextProvider=c,Ye.Element=t,Ye.ForwardRef=h,Ye.Fragment=n,Ye.Lazy=_,Ye.Memo=g,Ye.Portal=r,Ye.Profiler=s,Ye.StrictMode=i,Ye.Suspense=p,Ye.SuspenseList=m,Ye.isContextConsumer=function(v){return e(v)===a},Ye.isContextProvider=function(v){return e(v)===c},Ye.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},Ye.isForwardRef=function(v){return e(v)===h},Ye.isFragment=function(v){return e(v)===n},Ye.isLazy=function(v){return e(v)===_},Ye.isMemo=function(v){return e(v)===g},Ye.isPortal=function(v){return e(v)===r},Ye.isProfiler=function(v){return e(v)===s},Ye.isStrictMode=function(v){return e(v)===i},Ye.isSuspense=function(v){return e(v)===p},Ye.isSuspenseList=function(v){return e(v)===m},Ye.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===s||v===i||v===p||v===m||typeof v=="object"&&v!==null&&(v.$$typeof===_||v.$$typeof===g||v.$$typeof===c||v.$$typeof===a||v.$$typeof===h||v.$$typeof===S||v.getModuleId!==void 0)},Ye.typeOf=e})()),Ye}var Wd;function X0(){return Wd||(Wd=1,process.env.NODE_ENV==="production"?qi.exports=Y0():qi.exports=J0()),qi.exports}var to=X0();function tr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function sm(e){if(mr.isValidElement(e)||to.isValidElementType(e)||!tr(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=sm(e[r])}),t}function Pt(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return tr(e)&&tr(t)&&Object.keys(t).forEach(i=>{mr.isValidElement(t[i])||to.isValidElementType(t[i])?n[i]=t[i]:tr(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&tr(e[i])?n[i]=Pt(e[i],t[i],r):r.clone?n[i]=tr(t[i])?sm(t[i]):t[i]:n[i]=t[i]}),n}function Wn(e,t){return t?Pt(e,t,{clone:!1}):e}const br=process.env.NODE_ENV!=="production"?Be.oneOfType([Be.number,Be.string,Be.object,Be.array]):{};function Hd(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{var a,c;const s=/min-width:\s*([0-9.]+)/;return+(((a=n.match(s))==null?void 0:a[1])||0)-+(((c=i.match(s))==null?void 0:c[1])||0)});return r.length?r.reduce((n,i)=>{const s=t[i];return delete n[i],n[i]=s,n},{...t}):t}function Z0(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function Q0(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
47
- For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}const[,n,i]=r,s=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(s)}function e_(e){const t=(s,a)=>s.replace("@media",a?`@container ${a}`:"@container");function r(s,a){s.up=(...c)=>t(e.breakpoints.up(...c),a),s.down=(...c)=>t(e.breakpoints.down(...c),a),s.between=(...c)=>t(e.breakpoints.between(...c),a),s.only=(...c)=>t(e.breakpoints.only(...c),a),s.not=(...c)=>{const h=t(e.breakpoints.not(...c),a);return h.includes("not all and")?h.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):h}}const n={},i=s=>(r(n,s),n);return r(i),{...e,containerQueries:i}}const bo={xs:0,sm:600,md:900,lg:1200,xl:1536},Yd={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${bo[e]}px)`},t_={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:bo[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function nr(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const s=n.breakpoints||Yd;return t.reduce((a,c,h)=>(a[s.up(s.keys[h])]=r(t[h]),a),{})}if(typeof t=="object"){const s=n.breakpoints||Yd;return Object.keys(t).reduce((a,c)=>{if(Z0(s.keys,c)){const h=Q0(n.containerQueries?n:t_,c);h&&(a[h]=r(t[c],c))}else if(Object.keys(s.values||bo).includes(c)){const h=s.up(c);a[h]=r(t[c],c)}else{const h=c;a[h]=t[h]}return a},{})}return r(t)}function r_(e={}){var r;return((r=e.keys)==null?void 0:r.reduce((n,i)=>{const s=e.up(i);return n[s]={},n},{}))||{}}function Jd(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function vo(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function ro(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=vo(e,r)||n,t&&(i=t(i,n,e)),i}function ht(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,s=a=>{if(a[t]==null)return null;const c=a[t],h=a.theme,p=vo(h,n)||{};return nr(a,c,g=>{let _=ro(p,i,g);return g===_&&typeof g=="string"&&(_=ro(p,i,`${t}${g==="default"?"":Br(g)}`,g)),r===!1?_:{[r]:_}})};return s.propTypes=process.env.NODE_ENV!=="production"?{[t]:br}:{},s.filterProps=[t],s}function n_(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const i_={m:"margin",p:"padding"},o_={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Xd={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},s_=n_(e=>{if(e.length>2)if(Xd[e])e=Xd[e];else return[e];const[t,r]=e.split(""),n=i_[t],i=o_[r]||"";return Array.isArray(i)?i.map(s=>n+s):[n+i]}),_o=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],wo=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],a_=[..._o,...wo];function ai(e,t,r,n){const i=vo(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?s=>typeof s=="string"?s:(process.env.NODE_ENV!=="production"&&typeof s!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${s}.`),typeof i=="string"?i.startsWith("var(")&&s===0?0:i.startsWith("var(")&&s===1?i:`calc(${s} * ${i})`:i*s):Array.isArray(i)?s=>{if(typeof s=="string")return s;const a=Math.abs(s);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>i.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${a} > ${i.length-1}, you need to add the missing values.`].join(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./summaries-0iZfut4e.cjs`);let t=require(`react`),n=e._(t,1);t=e._(t);let r=require(`@mui/material`),i=require(`react/jsx-runtime`),a=require(`@emotion/styled`);a=e._(a),require(`@emotion/react`);var o=(e,t)=>e instanceof Error?e:Error(t),s=()=>(0,i.jsx)(r.Box,{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`,children:(0,i.jsx)(r.CircularProgress,{})}),c=({error:e,retry:t})=>(0,i.jsx)(r.Box,{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`,p:2,children:(0,i.jsxs)(r.Alert,{severity:`error`,action:(0,i.jsx)(r.Button,{onClick:t,children:` Retry`}),children:[(0,i.jsx)(r.AlertTitle,{children:`Failed to initialize chat`}),e.message]})}),l=({config:t,children:r,LoadingComponent:a=s,ErrorComponent:l=c})=>{let[u,d]=(0,n.useState)(!1),[f,p]=(0,n.useState)(null),m=(0,n.useCallback)(async()=>{d(!1),p(null);try{if(e.s())return;await e.o(t),d(!0)}catch(e){p(o(e,`Unknown error initializing SDK`))}},[t]);return(0,n.useEffect)(()=>(m(),()=>{e.i()}),[m]),!u&&!f?(0,i.jsx)(a,{}):f?(0,i.jsx)(l,{error:f,retry:m}):(0,i.jsx)(i.Fragment,{children:r})},u=e=>e,d=(()=>{let e=u;return{configure(t){e=t},generate(t){return e(t)},reset(){e=u}}})();function f(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function p(e){if(typeof e!=`string`)throw Error(process.env.NODE_ENV===`production`?f(7):"MUI: `capitalize(string)` expects a string argument.");return e.charAt(0).toUpperCase()+e.slice(1)}var m=p,h=e.g((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),g=e.g((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,ee=d,te=i,D=h,O=m,k=r,A=o,j=a,ne=f,M=!1;function N(e){return M||(M=!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(e)||x(e)===l}function re(e){return x(e)===u}function ie(e){return x(e)===c}function ae(e){return x(e)===s}function oe(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function P(e){return x(e)===d}function se(e){return x(e)===i}function ce(e){return x(e)===h}function F(e){return x(e)===m}function le(e){return x(e)===r}function ue(e){return x(e)===o}function de(e){return x(e)===a}function fe(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=ee,e.Fragment=te,e.Lazy=D,e.Memo=O,e.Portal=k,e.Profiler=A,e.StrictMode=j,e.Suspense=ne,e.isAsyncMode=N,e.isConcurrentMode=re,e.isContextConsumer=ie,e.isContextProvider=ae,e.isElement=oe,e.isForwardRef=P,e.isFragment=se,e.isLazy=ce,e.isMemo=F,e.isPortal=le,e.isProfiler=ue,e.isStrictMode=de,e.isSuspense=fe,e.isValidElementType=b,e.typeOf=x})()})),_=e.g(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=h():t.exports=g()})),v=e.g(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),y=e.g(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),b=e.g(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),x=e.g(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=y(),i={},a=b();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),S=e.g(((e,t)=>{var n=_(),r=v(),i=y(),a=b(),o=x(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:E(),objectOf:w,oneOf:C,oneOfType:T,shape:te,exact:D};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(A(s)!==e){var c=j(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=A(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=A(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=A(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=M(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return j(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function w(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=A(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function T(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+ne(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function E(){function e(e,t,n,r,i){return O(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function ee(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function te(e){function t(t,n,r,a,o){var s=t[n],c=A(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return ee(r,a,o,l,j(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function D(e){function t(t,n,o,s,c){var l=t[n],u=A(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return ee(o,s,c,d,j(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
2
+ Bad object: `+JSON.stringify(t[n],null,` `)+`
3
+ Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function O(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(O);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!O(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!O(a[1]))return!1}}else return!1;return!0;default:return!1}}function k(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function A(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:k(t,e)?`symbol`:t}function j(e){if(e==null)return``+e;var t=A(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function ne(e){var t=j(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function M(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),C=e.g(((e,t)=>{var n=y();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),w=e.g(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=_();t.exports=S()(n.isElement,!0)}else t.exports=C()()}));function T(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=T(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function E(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=T(e))&&(r&&(r+=` `),r+=t);return r}function ee(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}var te=e.g((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.suspense_list`),d=Symbol.for(`react.memo`),f=Symbol.for(`react.lazy`),p=Symbol.for(`react.view_transition`),m=Symbol.for(`react.client.reference`);function h(e){if(typeof e==`object`&&e){var m=e.$$typeof;switch(m){case t:switch(e=e.type,e){case r:case a:case i:case l:case u:case p:return e;default:switch(e&&=e.$$typeof,e){case s:case c:case f:case d:return e;case o:return e;default:return m}}case n:return m}}}e.ContextConsumer=o,e.ContextProvider=s,e.Element=t,e.ForwardRef=c,e.Fragment=r,e.Lazy=f,e.Memo=d,e.Portal=n,e.Profiler=a,e.StrictMode=i,e.Suspense=l,e.SuspenseList=u,e.isContextConsumer=function(e){return h(e)===o},e.isContextProvider=function(e){return h(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===t},e.isForwardRef=function(e){return h(e)===c},e.isFragment=function(e){return h(e)===r},e.isLazy=function(e){return h(e)===f},e.isMemo=function(e){return h(e)===d},e.isPortal=function(e){return h(e)===n},e.isProfiler=function(e){return h(e)===a},e.isStrictMode=function(e){return h(e)===i},e.isSuspense=function(e){return h(e)===l},e.isSuspenseList=function(e){return h(e)===u},e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===r||e===a||e===i||e===l||e===u||typeof e==`object`&&e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===s||e.$$typeof===o||e.$$typeof===c||e.$$typeof===m||e.getModuleId!==void 0))},e.typeOf=h})),D=e.g((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case i:case o:case a:case u:case d:case m:return e;default:switch(e&&=e.$$typeof,e){case c:case l:case p:case f:return e;case s:return e;default:return t}}case r:return t}}}var n=Symbol.for(`react.transitional.element`),r=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),a=Symbol.for(`react.strict_mode`),o=Symbol.for(`react.profiler`),s=Symbol.for(`react.consumer`),c=Symbol.for(`react.context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.view_transition`),h=Symbol.for(`react.client.reference`);e.ContextConsumer=s,e.ContextProvider=c,e.Element=n,e.ForwardRef=l,e.Fragment=i,e.Lazy=p,e.Memo=f,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=u,e.SuspenseList=d,e.isContextConsumer=function(e){return t(e)===s},e.isContextProvider=function(e){return t(e)===c},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return t(e)===l},e.isFragment=function(e){return t(e)===i},e.isLazy=function(e){return t(e)===p},e.isMemo=function(e){return t(e)===f},e.isPortal=function(e){return t(e)===r},e.isProfiler=function(e){return t(e)===o},e.isStrictMode=function(e){return t(e)===a},e.isSuspense=function(e){return t(e)===u},e.isSuspenseList=function(e){return t(e)===d},e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===i||e===o||e===a||e===u||e===d||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===c||e.$$typeof===s||e.$$typeof===l||e.$$typeof===h||e.getModuleId!==void 0))},e.typeOf=t})()})),O=e.g(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=te():t.exports=D()}))();function k(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function A(e){if(t.isValidElement(e)||(0,O.isValidElementType)(e)||!k(e))return e;let n={};return Object.keys(e).forEach(t=>{n[t]=A(e[t])}),n}function j(e,n,r={clone:!0}){let i=r.clone?{...e}:e;return k(e)&&k(n)&&Object.keys(n).forEach(a=>{t.isValidElement(n[a])||(0,O.isValidElementType)(n[a])?i[a]=n[a]:k(n[a])&&Object.prototype.hasOwnProperty.call(e,a)&&k(e[a])?i[a]=j(e[a],n[a],r):r.clone?i[a]=k(n[a])?A(n[a]):n[a]:i[a]=n[a]}),i}function ne(e,t){return t?j(e,t,{clone:!1}):e}var M=e._(w()),N=process.env.NODE_ENV===`production`?{}:M.default.oneOfType([M.default.number,M.default.string,M.default.object,M.default.array]);function re(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function ie(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function ae(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!==`production`)throw Error(`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`);return null}let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function oe(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var P={xs:0,sm:600,md:900,lg:1200,xl:1536},se={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${P[e]}px)`},ce={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:P[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function F(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||se;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||se;return Object.keys(t).reduce((i,a)=>{if(ie(e.keys,a)){let e=ae(r.containerQueries?r:ce,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||P).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function le(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function ue(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function de(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function fe(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:de(e,n)||r,t&&(i=t(i,r,e)),i}function I(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=de(o,r)||{};return F(e,a,e=>{let r=fe(s,i,e);return e===r&&typeof e==`string`&&(r=fe(s,i,`${t}${e===`default`?``:p(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes=process.env.NODE_ENV===`production`?{}:{[t]:N},a.filterProps=[t],a}function pe(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var me={m:`margin`,p:`padding`},he={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},ge={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},_e=pe(e=>{if(e.length>2)if(ge[e])e=ge[e];else return[e];let[t,n]=e.split(``),r=me[t],i=he[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),ve=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],ye=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],be=[...ve,...ye];function xe(e,t,n,r){let i=de(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:(process.env.NODE_ENV!==`production`&&typeof e!=`number`&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e):Array.isArray(i)?e=>{if(typeof e==`string`)return e;let n=Math.abs(e);process.env.NODE_ENV!==`production`&&(Number.isInteger(n)?n>i.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${n} > ${i.length-1}, you need to add the missing values.`].join(`
48
4
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
49
- `)));const c=i[a];return s>=0?c:typeof c=="number"?-c:typeof c=="string"&&c.startsWith("var(")?`calc(-1 * ${c})`:`-${c}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
50
- `)),()=>{})}function wc(e){return ai(e,"spacing",8,"spacing")}function ui(e,t){return typeof t=="string"||t==null?t:e(t)}function u_(e,t){return r=>e.reduce((n,i)=>(n[i]=ui(t,r),n),{})}function c_(e,t,r,n){if(!t.includes(r))return null;const i=s_(r),s=u_(i,n),a=e[r];return nr(e,a,s)}function am(e,t){const r=wc(e.theme);return Object.keys(e).map(n=>c_(e,t,n,r)).reduce(Wn,{})}function st(e){return am(e,_o)}st.propTypes=process.env.NODE_ENV!=="production"?_o.reduce((e,t)=>(e[t]=br,e),{}):{};st.filterProps=_o;function at(e){return am(e,wo)}at.propTypes=process.env.NODE_ENV!=="production"?wo.reduce((e,t)=>(e[t]=br,e),{}):{};at.filterProps=wo;process.env.NODE_ENV!=="production"&&a_.reduce((e,t)=>(e[t]=br,e),{});function xo(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(s=>{n[s]=i}),n),{}),r=n=>Object.keys(n).reduce((i,s)=>t[s]?Wn(i,t[s](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function Nt(e){return typeof e!="number"?e:`${e}px solid`}function qt(e,t){return ht({prop:e,themeKey:"borders",transform:t})}const l_=qt("border",Nt),f_=qt("borderTop",Nt),d_=qt("borderRight",Nt),h_=qt("borderBottom",Nt),p_=qt("borderLeft",Nt),m_=qt("borderColor"),y_=qt("borderTopColor"),g_=qt("borderRightColor"),b_=qt("borderBottomColor"),v_=qt("borderLeftColor"),__=qt("outline",Nt),w_=qt("outlineColor"),So=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ai(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ui(t,n)});return nr(e,e.borderRadius,r)}return null};So.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:br}:{};So.filterProps=["borderRadius"];xo(l_,f_,d_,h_,p_,m_,y_,g_,b_,v_,So,__,w_);const To=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ai(e.theme,"spacing",8,"gap"),r=n=>({gap:ui(t,n)});return nr(e,e.gap,r)}return null};To.propTypes=process.env.NODE_ENV!=="production"?{gap:br}:{};To.filterProps=["gap"];const Eo=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ai(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ui(t,n)});return nr(e,e.columnGap,r)}return null};Eo.propTypes=process.env.NODE_ENV!=="production"?{columnGap:br}:{};Eo.filterProps=["columnGap"];const Co=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ai(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ui(t,n)});return nr(e,e.rowGap,r)}return null};Co.propTypes=process.env.NODE_ENV!=="production"?{rowGap:br}:{};Co.filterProps=["rowGap"];const x_=ht({prop:"gridColumn"}),S_=ht({prop:"gridRow"}),T_=ht({prop:"gridAutoFlow"}),E_=ht({prop:"gridAutoColumns"}),C_=ht({prop:"gridAutoRows"}),O_=ht({prop:"gridTemplateColumns"}),A_=ht({prop:"gridTemplateRows"}),R_=ht({prop:"gridTemplateAreas"}),k_=ht({prop:"gridArea"});xo(To,Eo,Co,x_,S_,T_,E_,C_,O_,A_,R_,k_);function pn(e,t){return t==="grey"?t:e}const j_=ht({prop:"color",themeKey:"palette",transform:pn}),P_=ht({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:pn}),I_=ht({prop:"backgroundColor",themeKey:"palette",transform:pn});xo(j_,P_,I_);function jt(e){return e<=1&&e!==0?`${e*100}%`:e}const $_=ht({prop:"width",transform:jt}),xc=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{var i,s,a,c,h;const n=((a=(s=(i=e.theme)==null?void 0:i.breakpoints)==null?void 0:s.values)==null?void 0:a[r])||bo[r];return n?((h=(c=e.theme)==null?void 0:c.breakpoints)==null?void 0:h.unit)!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:jt(r)}};return nr(e,e.maxWidth,t)}return null};xc.filterProps=["maxWidth"];const D_=ht({prop:"minWidth",transform:jt}),F_=ht({prop:"height",transform:jt}),M_=ht({prop:"maxHeight",transform:jt}),N_=ht({prop:"minHeight",transform:jt});ht({prop:"size",cssProperty:"width",transform:jt});ht({prop:"size",cssProperty:"height",transform:jt});const q_=ht({prop:"boxSizing"});xo($_,xc,D_,F_,M_,N_,q_);const Oo={border:{themeKey:"borders",transform:Nt},borderTop:{themeKey:"borders",transform:Nt},borderRight:{themeKey:"borders",transform:Nt},borderBottom:{themeKey:"borders",transform:Nt},borderLeft:{themeKey:"borders",transform:Nt},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Nt},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:So},color:{themeKey:"palette",transform:pn},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:pn},backgroundColor:{themeKey:"palette",transform:pn},p:{style:at},pt:{style:at},pr:{style:at},pb:{style:at},pl:{style:at},px:{style:at},py:{style:at},padding:{style:at},paddingTop:{style:at},paddingRight:{style:at},paddingBottom:{style:at},paddingLeft:{style:at},paddingX:{style:at},paddingY:{style:at},paddingInline:{style:at},paddingInlineStart:{style:at},paddingInlineEnd:{style:at},paddingBlock:{style:at},paddingBlockStart:{style:at},paddingBlockEnd:{style:at},m:{style:st},mt:{style:st},mr:{style:st},mb:{style:st},ml:{style:st},mx:{style:st},my:{style:st},margin:{style:st},marginTop:{style:st},marginRight:{style:st},marginBottom:{style:st},marginLeft:{style:st},marginX:{style:st},marginY:{style:st},marginInline:{style:st},marginInlineStart:{style:st},marginInlineEnd:{style:st},marginBlock:{style:st},marginBlockStart:{style:st},marginBlockEnd:{style:st},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:To},rowGap:{style:Co},columnGap:{style:Eo},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:jt},maxWidth:{style:xc},minWidth:{transform:jt},height:{transform:jt},maxHeight:{transform:jt},minHeight:{transform:jt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function B_(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function L_(e,t){return typeof e=="function"?e(t):e}function U_(){function e(r,n,i,s){const a={[r]:n,theme:i},c=s[r];if(!c)return{[r]:n};const{cssProperty:h=r,themeKey:p,transform:m,style:g}=c;if(n==null)return null;if(p==="typography"&&n==="inherit")return{[r]:n};const _=vo(i,p)||{};return g?g(a):nr(a,n,S=>{let v=ro(_,m,S);return S===v&&typeof S=="string"&&(v=ro(_,m,`${r}${S==="default"?"":Br(S)}`,S)),h===!1?v:{[h]:v}})}function t(r){const{sx:n,theme:i={},nested:s}=r||{};if(!n)return null;const a=i.unstable_sxConfig??Oo;function c(h){let p=h;if(typeof h=="function")p=h(i);else if(typeof h!="object")return h;if(!p)return null;const m=r_(i.breakpoints),g=Object.keys(m);let _=m;return Object.keys(p).forEach(O=>{const S=L_(p[O],i);if(S!=null)if(typeof S=="object")if(a[O])_=Wn(_,e(O,S,i,a));else{const v=nr({theme:i},S,E=>({[O]:E}));B_(v,S)?_[O]=t({sx:S,theme:i,nested:!0}):_=Wn(_,v)}else _=Wn(_,e(O,S,i,a))}),!s&&i.modularCssLayers?{"@layer sx":Hd(i,Jd(g,_))}:Hd(i,Jd(g,_))}return Array.isArray(n)?n.map(c):c(n)}return t}const gn=U_();gn.filterProps=["sx"];function V_(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=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(i){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 K_={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,scale: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};function z_(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var G_=/[A-Z]|^ms/g,W_=/_EMO_([^_]+?)_([^]*?)_EMO_/g,um=function(t){return t.charCodeAt(1)===45},Zd=function(t){return t!=null&&typeof t!="boolean"},hu=z_(function(e){return um(e)?e:e.replace(G_,"-$&").toLowerCase()}),Qd=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(W_,function(n,i,s){return hr={name:i,styles:s,next:hr},i})}return K_[t]!==1&&!um(t)&&typeof r=="number"&&r!==0?r+"px":r};function no(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return hr={name:i.name,styles:i.styles,next:hr},i.name;var s=r;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)hr={name:a.name,styles:a.styles,next:hr},a=a.next;var c=s.styles+";";return c}return H_(e,t,r)}}var h=r;return h}function H_(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=no(e,t,r[i])+";";else for(var s in r){var a=r[s];if(typeof a!="object"){var c=a;Zd(c)&&(n+=hu(s)+":"+Qd(s,c)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var h=0;h<a.length;h++)Zd(a[h])&&(n+=hu(s)+":"+Qd(s,a[h])+";");else{var p=no(e,t,a);switch(s){case"animation":case"animationName":{n+=hu(s)+":"+p+";";break}default:n+=s+"{"+p+"}"}}}return n}var eh=/label:\s*([^\s;{]+)\s*(;|$)/g,hr;function Y_(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";hr=void 0;var s=e[0];if(s==null||s.raw===void 0)n=!1,i+=no(r,t,s);else{var a=s;i+=a[0]}for(var c=1;c<e.length;c++)if(i+=no(r,t,e[c]),n){var h=s;i+=h[c]}eh.lastIndex=0;for(var p="",m;(m=eh.exec(i))!==null;)p+="-"+m[1];var g=V_(i)+p;return{name:g,styles:i,next:hr}}/**
51
- * @mui/styled-engine v7.3.8
52
- *
53
- * @license MIT
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE file in the root directory of this source tree.
56
- */function J_(e,t){const r=zy(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
57
- `)):n.some(s=>s===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function X_(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const th=[];function Fr(e){return th[0]=e,Y_(th)}const Z_=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Q_(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,s=Z_(t),a=Object.keys(s);function c(_){return`@media (min-width:${typeof t[_]=="number"?t[_]:_}${r})`}function h(_){return`@media (max-width:${(typeof t[_]=="number"?t[_]:_)-n/100}${r})`}function p(_,O){const S=a.indexOf(O);return`@media (min-width:${typeof t[_]=="number"?t[_]:_}${r}) and (max-width:${(S!==-1&&typeof t[a[S]]=="number"?t[a[S]]:O)-n/100}${r})`}function m(_){return a.indexOf(_)+1<a.length?p(_,a[a.indexOf(_)+1]):c(_)}function g(_){const O=a.indexOf(_);return O===0?c(a[1]):O===a.length-1?h(a[O]):p(_,a[a.indexOf(_)+1]).replace("@media","@media not all and")}return{keys:a,values:s,up:c,down:h,between:p,only:m,not:g,unit:r,...i}}const ew={borderRadius:4};function cm(e=8,t=wc({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(s=>{const a=t(s);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function tw(e,t){var n;const r=this;if(r.vars){if(!((n=r.colorSchemes)!=null&&n[e])||typeof r.getColorSchemeSelector!="function")return{};let i=r.getColorSchemeSelector(e);return i==="&"?t:((i.includes("data-")||i.includes("."))&&(i=`*:where(${i.replace(/\s*&$/,"")}) &`),{[i]:t})}return r.palette.mode===e?t:{}}function lm(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:s={},...a}=e,c=Q_(r),h=cm(i);let p=Pt({breakpoints:c,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:h,shape:{...ew,...s}},a);return p=e_(p),p.applyStyles=tw,p=t.reduce((m,g)=>Pt(m,g),p),p.unstable_sxConfig={...Oo,...a==null?void 0:a.unstable_sxConfig},p.unstable_sx=function(g){return gn({sx:g,theme:this})},p}const rw={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Sc(e,t,r="Mui"){const n=rw[t];return n?`${r}-${n}`:`${q0.generate(e)}-${t}`}function nw(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=Sc(e,i,r)}),n}function fm(e,t=""){return e.displayName||e.name||t}function rh(e,t,r){const n=fm(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function iw(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return fm(e,"Component");if(typeof e=="object")switch(e.$$typeof){case to.ForwardRef:return rh(e,e.render,"ForwardRef");case to.Memo:return rh(e,e.type,"memo");default:return}}}function dm(e){const{variants:t,...r}=e,n={variants:t,style:Fr(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Fr(i.style))}),n}const ow=lm();function pu(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ir(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function sw(e){return e?(t,r)=>r[e]:null}function aw(e,t,r){e.theme=fw(e.theme)?r:e.theme[t]||e.theme}function Ji(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Ji(e,i,r));if(Array.isArray(n==null?void 0:n.variants)){let i;if(n.isProcessed)i=r?Ir(n.style,r):n.style;else{const{variants:s,...a}=n;i=r?Ir(Fr(a),r):a}return hm(e,n.variants,[i],r)}return n!=null&&n.isProcessed?r?Ir(Fr(n.style),r):n.style:r?Ir(Fr(n),r):n}function hm(e,t,r=[],n=void 0){var s;let i;e:for(let a=0;a<t.length;a+=1){const c=t[a];if(typeof c.props=="function"){if(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),!c.props(i))continue}else for(const h in c.props)if(e[h]!==c.props[h]&&((s=e.ownerState)==null?void 0:s[h])!==c.props[h])continue e;typeof c.style=="function"?(i??(i={...e,...e.ownerState,ownerState:e.ownerState}),r.push(n?Ir(Fr(c.style(i)),n):c.style(i))):r.push(n?Ir(Fr(c.style),n):c.style)}return r}function uw(e={}){const{themeId:t,defaultTheme:r=ow,rootShouldForwardProp:n=pu,slotShouldForwardProp:i=pu}=e;function s(c){aw(c,t,r)}return(c,h={})=>{X_(c,N=>N.filter(H=>H!==gn));const{name:p,slot:m,skipVariantsResolver:g,skipSx:_,overridesResolver:O=sw(pm(m)),...S}=h,v=p&&p.startsWith("Mui")||m?"components":"custom",E=g!==void 0?g:m&&m!=="Root"&&m!=="root"||!1,D=_||!1;let z=pu;m==="Root"||m==="root"?z=n:m?z=i:dw(c)&&(z=void 0);const K=J_(c,{shouldForwardProp:z,label:lw(p,m),...S}),G=N=>{if(N.__emotion_real===N)return N;if(typeof N=="function")return function(te){return Ji(te,N,te.theme.modularCssLayers?v:void 0)};if(tr(N)){const H=dm(N);return function(pe){return H.variants?Ji(pe,H,pe.theme.modularCssLayers?v:void 0):pe.theme.modularCssLayers?Ir(H.style,v):H.style}}return N},T=(...N)=>{const H=[],te=N.map(G),pe=[];if(H.push(s),p&&O&&pe.push(function(Z){var ze,$e;const ve=($e=(ze=Z.theme.components)==null?void 0:ze[p])==null?void 0:$e.styleOverrides;if(!ve)return null;const ge={};for(const ut in ve)ge[ut]=Ji(Z,ve[ut],Z.theme.modularCssLayers?"theme":void 0);return O(Z,ge)}),p&&!E&&pe.push(function(Z){var ge,ze;const ee=Z.theme,ve=(ze=(ge=ee==null?void 0:ee.components)==null?void 0:ge[p])==null?void 0:ze.variants;return ve?hm(Z,ve,[],Z.theme.modularCssLayers?"theme":void 0):null}),D||pe.push(gn),Array.isArray(te[0])){const w=te.shift(),Z=new Array(H.length).fill(""),ee=new Array(pe.length).fill("");let ve;ve=[...Z,...w,...ee],ve.raw=[...Z,...w.raw,...ee],H.unshift(ve)}const ke=[...H,...te,...pe],oe=K(...ke);return c.muiName&&(oe.muiName=c.muiName),process.env.NODE_ENV!=="production"&&(oe.displayName=cw(p,m,c)),oe};return K.withConfig&&(T.withConfig=K.withConfig),T}}function cw(e,t,r){return e?`${e}${Br(t||"")}`:`Styled(${iw(r)})`}function lw(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${pm(t||"Root")}`),r}function fw(e){for(const t in e)return!1;return!0}function dw(e){return typeof e=="string"&&e.charCodeAt(0)>96}function pm(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Vu(e,t,r=!1){const n={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const s=i;if(s==="components"||s==="slots")n[s]={...e[s],...n[s]};else if(s==="componentsProps"||s==="slotProps"){const a=e[s],c=t[s];if(!c)n[s]=a||{};else if(!a)n[s]=c;else{n[s]={...c};for(const h in a)if(Object.prototype.hasOwnProperty.call(a,h)){const p=h;n[s][p]=Vu(a[p],c[p],r)}}}else s==="className"&&r&&t.className?n.className=om(e==null?void 0:e.className,t==null?void 0:t.className):s==="style"&&r&&t.style?n.style={...e==null?void 0:e.style,...t==null?void 0:t.style}:n[s]===void 0&&(n[s]=e[s])}return n}function hw(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function Tc(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),hw(e,t,r)}function pw(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function yr(e){if(e.type)return e;if(e.charAt(0)==="#")return yr(pw(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
58
- The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:qr(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
59
- The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:qr(10,i))}else n=n.split(",");return n=n.map(s=>parseFloat(s)),{type:r,values:n,colorSpace:i}}const mw=e=>{const t=yr(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},Kn=(e,t)=>{try{return mw(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function Ao(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,s)=>s<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function mm(e){e=yr(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,s=n*Math.min(i,1-i),a=(p,m=(p+r/30)%12)=>i-s*Math.max(Math.min(m-3,9-m,1),-1);let c="rgb";const h=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(c+="a",h.push(t[3])),Ao({type:c,values:h})}function Ku(e){e=yr(e);let t=e.type==="hsl"||e.type==="hsla"?yr(mm(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function nh(e,t){const r=Ku(e),n=Ku(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function ym(e,t){return e=yr(e),t=Tc(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Ao(e)}function Rr(e,t,r){try{return ym(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function Ro(e,t){if(e=yr(e),t=Tc(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return Ao(e)}function Ge(e,t,r){try{return Ro(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function ko(e,t){if(e=yr(e),t=Tc(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return Ao(e)}function We(e,t,r){try{return ko(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function yw(e,t=.15){return Ku(e)>.5?Ro(e,t):ko(e,t)}function Bi(e,t,r){try{return yw(e,t)}catch{return e}}const gw=mr.createContext(void 0);process.env.NODE_ENV!=="production"&&(Be.node,Be.object);function bw(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?Vu(i.defaultProps,n,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Vu(i,n,t.components.mergeClassNameAndStyle):n}function vw({props:e,name:t}){const r=mr.useContext(gw);return bw({props:e,name:t,theme:{components:r}})}const ih={theme:void 0};function _w(e){let t,r;return function(i){let s=t;return(s===void 0||i.theme!==r)&&(ih.theme=i.theme,s=dm(e(ih)),t=s,r=i.theme),s}}function ww(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const oh=(e,t,r,n=[])=>{let i=e;t.forEach((s,a)=>{a===t.length-1?Array.isArray(i)?i[Number(s)]=r:i&&typeof i=="object"&&(i[s]=r):i&&typeof i=="object"&&(i[s]||(i[s]=n.includes(s)?[]:{}),i=i[s])})},xw=(e,t,r)=>{function n(i,s=[],a=[]){Object.entries(i).forEach(([c,h])=>{(!r||r&&!r([...s,c]))&&h!=null&&(typeof h=="object"&&Object.keys(h).length>0?n(h,[...s,c],Array.isArray(h)?[...a,c]:a):t([...s,c],h,a))})}n(e)},Sw=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function mu(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},s={},a={};return xw(e,(c,h,p)=>{if((typeof h=="string"||typeof h=="number")&&(!n||!n(c,h))){const m=`--${r?`${r}-`:""}${c.join("-")}`,g=Sw(c,h);Object.assign(i,{[m]:g}),oh(s,c,`var(${m})`,p),oh(a,c,`var(${m}, ${g})`,p)}},c=>c[0]==="vars"),{css:i,vars:s,varsWithDefaults:a}}function Tw(e,t={}){const{getSelector:r=D,disableCssColorScheme:n,colorSchemeSelector:i,enableContrastVars:s}=t,{colorSchemes:a={},components:c,defaultColorScheme:h="light",...p}=e,{vars:m,css:g,varsWithDefaults:_}=mu(p,t);let O=_;const S={},{[h]:v,...E}=a;if(Object.entries(E||{}).forEach(([G,T])=>{const{vars:N,css:H,varsWithDefaults:te}=mu(T,t);O=Pt(O,te),S[G]={css:H,vars:N}}),v){const{css:G,vars:T,varsWithDefaults:N}=mu(v,t);O=Pt(O,N),S[h]={css:G,vars:T}}function D(G,T){var H,te;let N=i;if(i==="class"&&(N=".%s"),i==="data"&&(N="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(N=`[${i}="%s"]`),G){if(N==="media")return e.defaultColorScheme===G?":root":{[`@media (prefers-color-scheme: ${((te=(H=a[G])==null?void 0:H.palette)==null?void 0:te.mode)||G})`]:{":root":T}};if(N)return e.defaultColorScheme===G?`:root, ${N.replace("%s",String(G))}`:N.replace("%s",String(G))}return":root"}return{vars:O,generateThemeVars:()=>{let G={...m};return Object.entries(S).forEach(([,{vars:T}])=>{G=Pt(G,T)}),G},generateStyleSheets:()=>{var pe,ke;const G=[],T=e.defaultColorScheme||"light";function N(oe,w){Object.keys(w).length&&G.push(typeof oe=="string"?{[oe]:{...w}}:oe)}N(r(void 0,{...g}),g);const{[T]:H,...te}=S;if(H){const{css:oe}=H,w=(ke=(pe=a[T])==null?void 0:pe.palette)==null?void 0:ke.mode,Z=!n&&w?{colorScheme:w,...oe}:{...oe};N(r(T,{...Z}),Z)}return Object.entries(te).forEach(([oe,{css:w}])=>{var ve,ge;const Z=(ge=(ve=a[oe])==null?void 0:ve.palette)==null?void 0:ge.mode,ee=!n&&Z?{colorScheme:Z,...w}:{...w};N(r(oe,{...ee}),ee)}),s&&G.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),G}}}function Ew(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Jn={black:"#000",white:"#fff"},Cw={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},an={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},un={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Nn={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},cn={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ln={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},fn={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function gm(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Jn.white,default:Jn.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const bm=gm();function vm(){return{text:{primary:Jn.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Jn.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const zu=vm();function sh(e,t,r,n){const i=n.light||n,s=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=ko(e.main,i):t==="dark"&&(e.dark=Ro(e.main,s)))}function ah(e,t,r,n,i){const s=i.light||i,a=i.dark||i*1.5;t[r]||(t.hasOwnProperty(n)?t[r]=t[n]:r==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:r==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function Ow(e="light"){return e==="dark"?{main:cn[200],light:cn[50],dark:cn[400]}:{main:cn[700],light:cn[400],dark:cn[800]}}function Aw(e="light"){return e==="dark"?{main:an[200],light:an[50],dark:an[400]}:{main:an[500],light:an[300],dark:an[700]}}function Rw(e="light"){return e==="dark"?{main:un[500],light:un[300],dark:un[700]}:{main:un[700],light:un[400],dark:un[800]}}function kw(e="light"){return e==="dark"?{main:ln[400],light:ln[300],dark:ln[700]}:{main:ln[700],light:ln[500],dark:ln[900]}}function jw(e="light"){return e==="dark"?{main:fn[400],light:fn[300],dark:fn[700]}:{main:fn[800],light:fn[500],dark:fn[900]}}function Pw(e="light"){return e==="dark"?{main:Nn[400],light:Nn[300],dark:Nn[700]}:{main:"#ed6c02",light:Nn[500],dark:Nn[900]}}function Iw(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Ec(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,colorSpace:i,...s}=e,a=e.primary||Ow(t),c=e.secondary||Aw(t),h=e.error||Rw(t),p=e.info||kw(t),m=e.success||jw(t),g=e.warning||Pw(t);function _(E){if(i)return Iw(E);const D=nh(E,zu.text.primary)>=r?zu.text.primary:bm.text.primary;if(process.env.NODE_ENV!=="production"){const z=nh(E,D);z<3&&console.error([`MUI: The contrast ratio of ${z}:1 for ${D} on ${E}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
60
- `))}return D}const O=({color:E,name:D,mainShade:z=500,lightShade:K=300,darkShade:G=700})=>{if(E={...E},!E.main&&E[z]&&(E.main=E[z]),!E.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${D?` (${D})`:""} provided to augmentColor(color) is invalid.
61
- The color object needs to have a \`main\` property or a \`${z}\` property.`:qr(11,D?` (${D})`:"",z));if(typeof E.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${D?` (${D})`:""} provided to augmentColor(color) is invalid.
62
- \`color.main\` should be a string, but \`${JSON.stringify(E.main)}\` was provided instead.
63
-
5
+ `)));let r=i[n];return e>=0?r:typeof r==`number`?-r:typeof r==`string`&&r.startsWith(`var(`)?`calc(-1 * ${r})`:`-${r}`}:typeof i==`function`?i:(process.env.NODE_ENV!==`production`&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,`It should be a number, an array or a function.`].join(`
6
+ `)),()=>void 0)}function Se(e){return xe(e,`spacing`,8,`spacing`)}function Ce(e,t){return typeof t==`string`||t==null?t:e(t)}function we(e,t){return n=>e.reduce((e,r)=>(e[r]=Ce(t,n),e),{})}function Te(e,t,n,r){if(!t.includes(n))return null;let i=we(_e(n),r),a=e[n];return F(e,a,i)}function Ee(e,t){let n=Se(e.theme);return Object.keys(e).map(r=>Te(e,t,r,n)).reduce(ne,{})}function L(e){return Ee(e,ve)}L.propTypes=process.env.NODE_ENV===`production`?{}:ve.reduce((e,t)=>(e[t]=N,e),{}),L.filterProps=ve;function R(e){return Ee(e,ye)}R.propTypes=process.env.NODE_ENV===`production`?{}:ye.reduce((e,t)=>(e[t]=N,e),{}),R.filterProps=ye;function De(e){return Ee(e,be)}De.propTypes=process.env.NODE_ENV===`production`?{}:be.reduce((e,t)=>(e[t]=N,e),{}),De.filterProps=be;function Oe(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?ne(n,t[r](e)):n,{});return n.propTypes=process.env.NODE_ENV===`production`?{}:e.reduce((e,t)=>Object.assign(e,t.propTypes),{}),n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function z(e){return typeof e==`number`?`${e}px solid`:e}function B(e,t){return I({prop:e,themeKey:`borders`,transform:t})}var ke=B(`border`,z),Ae=B(`borderTop`,z),je=B(`borderRight`,z),Me=B(`borderBottom`,z),Ne=B(`borderLeft`,z),Pe=B(`borderColor`),Fe=B(`borderTopColor`),Ie=B(`borderRightColor`),Le=B(`borderBottomColor`),Re=B(`borderLeftColor`),ze=B(`outline`,z),Be=B(`outlineColor`),Ve=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=xe(e.theme,`shape.borderRadius`,4,`borderRadius`);return F(e,e.borderRadius,e=>({borderRadius:Ce(t,e)}))}return null};Ve.propTypes=process.env.NODE_ENV===`production`?{}:{borderRadius:N},Ve.filterProps=[`borderRadius`],Oe(ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,Ve,ze,Be);var He=e=>{if(e.gap!==void 0&&e.gap!==null){let t=xe(e.theme,`spacing`,8,`gap`);return F(e,e.gap,e=>({gap:Ce(t,e)}))}return null};He.propTypes=process.env.NODE_ENV===`production`?{}:{gap:N},He.filterProps=[`gap`];var Ue=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=xe(e.theme,`spacing`,8,`columnGap`);return F(e,e.columnGap,e=>({columnGap:Ce(t,e)}))}return null};Ue.propTypes=process.env.NODE_ENV===`production`?{}:{columnGap:N},Ue.filterProps=[`columnGap`];var We=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=xe(e.theme,`spacing`,8,`rowGap`);return F(e,e.rowGap,e=>({rowGap:Ce(t,e)}))}return null};We.propTypes=process.env.NODE_ENV===`production`?{}:{rowGap:N},We.filterProps=[`rowGap`],Oe(He,Ue,We,I({prop:`gridColumn`}),I({prop:`gridRow`}),I({prop:`gridAutoFlow`}),I({prop:`gridAutoColumns`}),I({prop:`gridAutoRows`}),I({prop:`gridTemplateColumns`}),I({prop:`gridTemplateRows`}),I({prop:`gridTemplateAreas`}),I({prop:`gridArea`}));function Ge(e,t){return t===`grey`?t:e}Oe(I({prop:`color`,themeKey:`palette`,transform:Ge}),I({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:Ge}),I({prop:`backgroundColor`,themeKey:`palette`,transform:Ge}));function V(e){return e<=1&&e!==0?`${e*100}%`:e}var Ke=I({prop:`width`,transform:V}),qe=e=>e.maxWidth!==void 0&&e.maxWidth!==null?F(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||P[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:V(t)}}):null;qe.filterProps=[`maxWidth`];var Je=I({prop:`minWidth`,transform:V}),Ye=I({prop:`height`,transform:V}),Xe=I({prop:`maxHeight`,transform:V}),Ze=I({prop:`minHeight`,transform:V});I({prop:`size`,cssProperty:`width`,transform:V}),I({prop:`size`,cssProperty:`height`,transform:V}),Oe(Ke,qe,Je,Ye,Xe,Ze,I({prop:`boxSizing`}));var Qe={border:{themeKey:`borders`,transform:z},borderTop:{themeKey:`borders`,transform:z},borderRight:{themeKey:`borders`,transform:z},borderBottom:{themeKey:`borders`,transform:z},borderLeft:{themeKey:`borders`,transform:z},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:z},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Ve},color:{themeKey:`palette`,transform:Ge},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:Ge},backgroundColor:{themeKey:`palette`,transform:Ge},p:{style:R},pt:{style:R},pr:{style:R},pb:{style:R},pl:{style:R},px:{style:R},py:{style:R},padding:{style:R},paddingTop:{style:R},paddingRight:{style:R},paddingBottom:{style:R},paddingLeft:{style:R},paddingX:{style:R},paddingY:{style:R},paddingInline:{style:R},paddingInlineStart:{style:R},paddingInlineEnd:{style:R},paddingBlock:{style:R},paddingBlockStart:{style:R},paddingBlockEnd:{style:R},m:{style:L},mt:{style:L},mr:{style:L},mb:{style:L},ml:{style:L},mx:{style:L},my:{style:L},margin:{style:L},marginTop:{style:L},marginRight:{style:L},marginBottom:{style:L},marginLeft:{style:L},marginX:{style:L},marginY:{style:L},marginInline:{style:L},marginInlineStart:{style:L},marginInlineEnd:{style:L},marginBlock:{style:L},marginBlockStart:{style:L},marginBlockEnd:{style:L},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:He},rowGap:{style:We},columnGap:{style:Ue},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:V},maxWidth:{style:qe},minWidth:{transform:V},height:{transform:V},maxHeight:{transform:V},minHeight:{transform:V},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}};function $e(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function et(e,t){return typeof e==`function`?e(t):e}function tt(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=de(n,s)||{};return l?l(i):F(i,t,t=>{let n=fe(u,c,t);return t===n&&typeof t==`string`&&(n=fe(u,c,`${e}${t===`default`?``:p(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??Qe;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=le(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=et(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=ne(l,e(n,a,i,o));else{let e=F({theme:i},a,e=>({[n]:e}));$e(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=ne(l,e)}else l=ne(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":re(i,ue(c,l))}:re(i,ue(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var nt=tt();nt.filterProps=[`sx`];function rt(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 it={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,scale: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};function at(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var ot=!1,st=/[A-Z]|^ms/g,ct=/_EMO_([^_]+?)_([^]*?)_EMO_/g,lt=function(e){return e.charCodeAt(1)===45},ut=function(e){return e!=null&&typeof e!=`boolean`},dt=at(function(e){return lt(e)?e:e.replace(st,`-$&`).toLowerCase()}),ft=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(ct,function(e,t,n){return _t={name:t,styles:n,next:_t},t})}return it[e]!==1&&!lt(e)&&typeof t==`number`&&t!==0?t+`px`:t},pt=`Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.`;function mt(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return _t={name:i.name,styles:i.styles,next:_t},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)_t={name:o.name,styles:o.styles,next:_t},o=o.next;return a.styles+`;`}return ht(e,t,n);case`function`:if(e!==void 0){var s=_t,c=n(e);return _t=s,mt(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function ht(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=mt(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:ut(s)&&(r+=dt(a)+`:`+ft(a,s)+`;`)}else{if(a===`NO_COMPONENT_SELECTOR`&&ot)throw Error(pt);if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)ut(o[c])&&(r+=dt(a)+`:`+ft(a,o[c])+`;`);else{var l=mt(e,t,o);switch(a){case`animation`:case`animationName`:r+=dt(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}}return r}var gt=/label:\s*([^\s;{]+)\s*(;|$)/g,_t;function vt(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;_t=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=mt(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=mt(n,t,e[o]),r&&(i+=a[o]);gt.lastIndex=0;for(var s=``,c;(c=gt.exec(i))!==null;)s+=`-`+c[1];return{name:rt(i)+s,styles:i,next:_t}}function yt(e,t){let n=(0,a.default)(e,t);return process.env.NODE_ENV===`production`?n:(...t)=>{let r=typeof e==`string`?`"${e}"`:`component`;return t.length===0?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
7
+ `)):t.some(e=>e===void 0)&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}}function bt(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var xt=[];function St(e){return xt[0]=e,vt(xt)}var Ct=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function wt(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Ct(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}var Tt={borderRadius:4};function Et(e=8,t=Se({spacing:e})){if(e.mui)return e;let n=(...e)=>(process.env.NODE_ENV!==`production`&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `));return n.mui=!0,n}function Dt(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Ot(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=wt(n),c=Et(i),l=j({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...Tt,...a}},o);return l=oe(l),l.applyStyles=Dt,l=t.reduce((e,t)=>j(e,t),l),l.unstable_sxConfig={...Qe,...o?.unstable_sxConfig},l.unstable_sx=function(e){return nt({sx:e,theme:this})},l}var kt={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function At(e,t,n=`Mui`){let r=kt[t];return r?`${n}-${r}`:`${d.generate(e)}-${t}`}function jt(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=At(e,t,n)}),r}function Mt(e,t=``){return e.displayName||e.name||t}function Nt(e,t,n){let r=Mt(t);return e.displayName||(r===``?n:`${n}(${r})`)}function Pt(e){if(e!=null){if(typeof e==`string`)return e;if(typeof e==`function`)return Mt(e,`Component`);if(typeof e==`object`)switch(e.$$typeof){case O.ForwardRef:return Nt(e,e.render,`ForwardRef`);case O.Memo:return Nt(e,e.type,`memo`);default:return}}}function Ft(e){let{variants:t,...n}=e,r={variants:t,style:St(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=St(e.style))}),r}var It=Ot();function Lt(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function Rt(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function zt(e){return e?(t,n)=>n[e]:null}function Bt(e,t,n){e.theme=Kt(e.theme)?n:e.theme[t]||e.theme}function Vt(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Vt(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Rt(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?Rt(St(i),n):i}return Ht(e,r.variants,[t],n)}return r?.isProcessed?n?Rt(St(r.style),n):r.style:n?Rt(St(r),n):r}function Ht(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Rt(St(o.style(i)),r):o.style(i))):n.push(r?Rt(St(o.style),r):o.style)}return n}function Ut(e={}){let{themeId:t,defaultTheme:n=It,rootShouldForwardProp:r=Lt,slotShouldForwardProp:i=Lt}=e;function a(e){Bt(e,t,n)}return(e,t={})=>{bt(e,e=>e.filter(e=>e!==nt));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=zt(Jt(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Lt;o===`Root`||o===`root`?m=r:o?m=i:qt(e)&&(m=void 0);let h=yt(e,{shouldForwardProp:m,label:Gt(n,o),...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return Vt(t,e,t.theme.modularCssLayers?d:void 0)};if(k(e)){let t=Ft(e);return function(e){return t.variants?Vt(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Rt(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),s=[];if(r.push(a),n&&l&&s.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=Vt(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&s.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?Ht(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||s.push(nt),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(s.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let c=h(...r,...i,...s);return e.muiName&&(c.muiName=e.muiName),process.env.NODE_ENV!==`production`&&(c.displayName=Wt(n,o,e)),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function Wt(e,t,n){return e?`${e}${p(t||``)}`:`Styled(${Pt(n)})`}function Gt(e,t){let n;return process.env.NODE_ENV!==`production`&&e&&(n=`${e}-${Jt(t||`Root`)}`),n}function Kt(e){for(let t in e)return!1;return!0}function qt(e){return typeof e==`string`&&e.charCodeAt(0)>96}function Jt(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Yt(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=Yt(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=E(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}function Xt(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function Zt(e,t=0,n=1){return process.env.NODE_ENV!==`production`&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),Xt(e,t,n)}function Qt(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),process.env.NODE_ENV!==`production`&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function $t(e){if(e.type)return e;if(e.charAt(0)===`#`)return $t(Qt(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(process.env.NODE_ENV===`production`?f(9,e):`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`);let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(process.env.NODE_ENV===`production`?f(10,i):`MUI: unsupported \`${i}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`)}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var en=e=>{let t=$t(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},tn=(e,t)=>{try{return en(e)}catch{return t&&process.env.NODE_ENV!==`production`&&console.warn(t),e}};function nn(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function rn(e){e=$t(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),nn({type:s,values:c})}function an(e){e=$t(e);let t=e.type===`hsl`||e.type===`hsla`?$t(rn(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function on(e,t){let n=an(e),r=an(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function sn(e,t){return e=$t(e),t=Zt(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,nn(e)}function cn(e,t,n){try{return sn(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}function ln(e,t){if(e=$t(e),t=Zt(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return nn(e)}function H(e,t,n){try{return ln(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}function un(e,t){if(e=$t(e),t=Zt(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return nn(e)}function U(e,t,n){try{return un(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}function dn(e,t=.15){return an(e)>.5?ln(e,t):un(e,t)}function fn(e,t,n){try{return dn(e,t)}catch{return n&&process.env.NODE_ENV!==`production`&&console.warn(n),e}}var pn=t.createContext(void 0);function mn({value:e,children:t}){return(0,i.jsx)(pn.Provider,{value:e,children:t})}process.env.NODE_ENV!==`production`&&(mn.propTypes={children:M.default.node,value:M.default.object});function hn(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?Yt(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Yt(i,r,t.components.mergeClassNameAndStyle):r}function gn({props:e,name:n}){return hn({props:e,name:n,theme:{components:t.useContext(pn)}})}var _n={theme:void 0};function vn(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(_n.theme=r.theme,i=Ft(e(_n)),t=i,n=r.theme),i}}function yn(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var bn=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},xn=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},Sn=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function Cn(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return xn(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=Sn(e,t);Object.assign(i,{[r]:c}),bn(a,e,`var(${r})`,s),bn(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function wn(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=Cn(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=Cn(n,t);p=j(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=Cn(h,t);p=j(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=j(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function Tn(e){return function(t){return e===`media`?(process.env.NODE_ENV!==`production`&&t!==`light`&&t!==`dark`&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@media (prefers-color-scheme: ${t})`):e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}var En={black:`#000`,white:`#fff`},Dn={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`},On={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},kn={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},An={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},jn={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},Mn={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},Nn={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`};function Pn(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:En.white,default:En.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var Fn=Pn();function In(){return{text:{primary:En.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:En.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var Ln=In();function Rn(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=un(e.main,i):t===`dark`&&(e.dark=ln(e.main,a)))}function zn(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function Bn(e=`light`){return e===`dark`?{main:jn[200],light:jn[50],dark:jn[400]}:{main:jn[700],light:jn[400],dark:jn[800]}}function Vn(e=`light`){return e===`dark`?{main:On[200],light:On[50],dark:On[400]}:{main:On[500],light:On[300],dark:On[700]}}function Hn(e=`light`){return e===`dark`?{main:kn[500],light:kn[300],dark:kn[700]}:{main:kn[700],light:kn[400],dark:kn[800]}}function Un(e=`light`){return e===`dark`?{main:Mn[400],light:Mn[300],dark:Mn[700]}:{main:Mn[700],light:Mn[500],dark:Mn[900]}}function Wn(e=`light`){return e===`dark`?{main:Nn[400],light:Nn[300],dark:Nn[700]}:{main:Nn[800],light:Nn[500],dark:Nn[900]}}function Gn(e=`light`){return e===`dark`?{main:An[400],light:An[300],dark:An[700]}:{main:`#ed6c02`,light:An[500],dark:An[900]}}function Kn(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function qn(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||Bn(t),s=e.secondary||Vn(t),c=e.error||Hn(t),l=e.info||Un(t),u=e.success||Wn(t),d=e.warning||Gn(t);function p(e){if(i)return Kn(e);let t=on(e,Ln.text.primary)>=n?Ln.text.primary:Fn.text.primary;if(process.env.NODE_ENV!==`production`){let n=on(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,`falls below the WCAG recommended absolute minimum contrast ratio of 3:1.`,`https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast`].join(`
8
+ `))}return t}let m=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(process.env.NODE_ENV===`production`?f(11,t?` (${t})`:``,n):`MUI: The color${t?` (${t})`:``} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`);if(typeof e.main!=`string`)throw Error(process.env.NODE_ENV===`production`?f(12,t?` (${t})`:``,JSON.stringify(e.main)):`MUI: The color${t?` (${t})`:``} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n
64
9
  Did you intend to use one of the following approaches?
65
10
 
66
11
  import { green } from "@mui/material/colors";
@@ -71,30 +16,16 @@ const theme1 = createTheme({ palette: {
71
16
 
72
17
  const theme2 = createTheme({ palette: {
73
18
  primary: { main: green[500] },
74
- } });`:qr(12,D?` (${D})`:"",JSON.stringify(E.main)));return i?(ah(i,E,"light",K,n),ah(i,E,"dark",G,n)):(sh(E,"light",K,n),sh(E,"dark",G,n)),E.contrastText||(E.contrastText=_(E.main)),E};let S;return t==="light"?S=gm():t==="dark"&&(S=vm()),process.env.NODE_ENV!=="production"&&(S||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Pt({common:{...Jn},mode:t,primary:O({color:a,name:"primary"}),secondary:O({color:c,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:O({color:h,name:"error"}),warning:O({color:g,name:"warning"}),info:O({color:p,name:"info"}),success:O({color:m,name:"success"}),grey:Cw,contrastThreshold:r,getContrastText:_,augmentColor:O,tonalOffset:n,...S},s)}function $w(e){const t={};return Object.entries(e).forEach(n=>{const[i,s]=n;typeof s=="object"&&(t[i]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function Dw(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Fw(e){return Math.round(e*1e5)/1e5}const uh={textTransform:"uppercase"},ch='"Roboto", "Helvetica", "Arial", sans-serif';function Mw(e,t){const{fontFamily:r=ch,fontSize:n=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:c=700,htmlFontSize:h=16,allVariants:p,pxToRem:m,...g}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof h!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const _=n/14,O=m||(E=>`${E/h*_}rem`),S=(E,D,z,K,G)=>({fontFamily:r,fontWeight:E,fontSize:O(D),lineHeight:z,...r===ch?{letterSpacing:`${Fw(K/D)}em`}:{},...G,...p}),v={h1:S(i,96,1.167,-1.5),h2:S(i,60,1.2,-.5),h3:S(s,48,1.167,0),h4:S(s,34,1.235,.25),h5:S(s,24,1.334,0),h6:S(a,20,1.6,.15),subtitle1:S(s,16,1.75,.15),subtitle2:S(a,14,1.57,.1),body1:S(s,16,1.5,.15),body2:S(s,14,1.43,.15),button:S(a,14,1.75,.4,uh),caption:S(s,12,1.66,.4),overline:S(s,12,2.66,1,uh),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Pt({htmlFontSize:h,pxToRem:O,fontFamily:r,fontSize:n,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:c,...v},g,{clone:!1})}const Nw=.2,qw=.14,Bw=.12;function et(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Nw})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${qw})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Bw})`].join(",")}const Lw=["none",et(0,2,1,-1,0,1,1,0,0,1,3,0),et(0,3,1,-2,0,2,2,0,0,1,5,0),et(0,3,3,-2,0,3,4,0,0,1,8,0),et(0,2,4,-1,0,4,5,0,0,1,10,0),et(0,3,5,-1,0,5,8,0,0,1,14,0),et(0,3,5,-1,0,6,10,0,0,1,18,0),et(0,4,5,-2,0,7,10,1,0,2,16,1),et(0,5,5,-3,0,8,10,1,0,3,14,2),et(0,5,6,-3,0,9,12,1,0,3,16,2),et(0,6,6,-3,0,10,14,1,0,4,18,3),et(0,6,7,-4,0,11,15,1,0,4,20,3),et(0,7,8,-4,0,12,17,2,0,5,22,4),et(0,7,8,-4,0,13,19,2,0,5,24,4),et(0,7,9,-4,0,14,21,2,0,5,26,4),et(0,8,9,-5,0,15,22,2,0,6,28,5),et(0,8,10,-5,0,16,24,2,0,6,30,5),et(0,8,11,-5,0,17,26,2,0,6,32,5),et(0,9,11,-5,0,18,28,2,0,7,34,6),et(0,9,12,-6,0,19,29,2,0,7,36,6),et(0,10,13,-6,0,20,31,3,0,8,38,7),et(0,10,13,-6,0,21,33,3,0,8,40,7),et(0,10,14,-6,0,22,35,3,0,8,42,7),et(0,11,14,-7,0,23,36,3,0,9,44,8),et(0,11,15,-7,0,24,38,3,0,9,46,8)],Uw={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Vw={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function lh(e){return`${Math.round(e)}ms`}function Kw(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function zw(e){const t={...Uw,...e.easing},r={...Vw,...e.duration};return{getAutoHeightDuration:Kw,create:(i=["all"],s={})=>{const{duration:a=r.standard,easing:c=t.easeInOut,delay:h=0,...p}=s;if(process.env.NODE_ENV!=="production"){const m=_=>typeof _=="string",g=_=>!Number.isNaN(parseFloat(_));!m(i)&&!Array.isArray(i)&&console.error('MUI: Argument "props" must be a string or Array.'),!g(a)&&!m(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),m(c)||console.error('MUI: Argument "easing" must be a string.'),!g(h)&&!m(h)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof s!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
75
- `)),Object.keys(p).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(p).join(",")}].`)}return(Array.isArray(i)?i:[i]).map(m=>`${m} ${typeof a=="string"?a:lh(a)} ${c} ${typeof h=="string"?h:lh(h)}`).join(",")},...e,easing:t,duration:r}}const Gw={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ww(e){return tr(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function _m(e={}){const t={...e};function r(n){const i=Object.entries(n);for(let s=0;s<i.length;s++){const[a,c]=i[s];!Ww(c)||a.startsWith("unstable_")?delete n[a]:tr(c)&&(n[a]={...c},r(n[a]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
19
+ } });`);return i?(zn(i,e,`light`,a,r),zn(i,e,`dark`,o,r)):(Rn(e,`light`,a,r),Rn(e,`dark`,o,r)),e.contrastText||=p(e.main),e},h;return t===`light`?h=Pn():t===`dark`&&(h=In()),process.env.NODE_ENV!==`production`&&(h||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),j({common:{...En},mode:t,primary:m({color:o,name:`primary`}),secondary:m({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:m({color:c,name:`error`}),warning:m({color:d,name:`warning`}),info:m({color:l,name:`info`}),success:m({color:u,name:`success`}),grey:Dn,contrastThreshold:n,getContrastText:p,augmentColor:m,tonalOffset:r,...h},a)}function Jn(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function Yn(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function Xn(e){return Math.round(e*1e5)/1e5}var Zn={textTransform:`uppercase`},Qn=`"Roboto", "Helvetica", "Arial", sans-serif`;function $n(e,t){let{fontFamily:n=Qn,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t;process.env.NODE_ENV!==`production`&&(typeof r!=`number`&&console.error("MUI: `fontSize` is required to be a number."),typeof c!=`number`&&console.error("MUI: `htmlFontSize` is required to be a number."));let f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Qn?{letterSpacing:`${Xn(i/t)}em`}:{},...a,...l});return j({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,Zn),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Zn),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var er=.2,tr=.14,nr=.12;function W(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${er})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${tr})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${nr})`].join(`,`)}var rr=[`none`,W(0,2,1,-1,0,1,1,0,0,1,3,0),W(0,3,1,-2,0,2,2,0,0,1,5,0),W(0,3,3,-2,0,3,4,0,0,1,8,0),W(0,2,4,-1,0,4,5,0,0,1,10,0),W(0,3,5,-1,0,5,8,0,0,1,14,0),W(0,3,5,-1,0,6,10,0,0,1,18,0),W(0,4,5,-2,0,7,10,1,0,2,16,1),W(0,5,5,-3,0,8,10,1,0,3,14,2),W(0,5,6,-3,0,9,12,1,0,3,16,2),W(0,6,6,-3,0,10,14,1,0,4,18,3),W(0,6,7,-4,0,11,15,1,0,4,20,3),W(0,7,8,-4,0,12,17,2,0,5,22,4),W(0,7,8,-4,0,13,19,2,0,5,24,4),W(0,7,9,-4,0,14,21,2,0,5,26,4),W(0,8,9,-5,0,15,22,2,0,6,28,5),W(0,8,10,-5,0,16,24,2,0,6,30,5),W(0,8,11,-5,0,17,26,2,0,6,32,5),W(0,9,11,-5,0,18,28,2,0,7,34,6),W(0,9,12,-6,0,19,29,2,0,7,36,6),W(0,10,13,-6,0,20,31,3,0,8,38,7),W(0,10,13,-6,0,21,33,3,0,8,40,7),W(0,10,14,-6,0,22,35,3,0,8,42,7),W(0,11,14,-7,0,23,36,3,0,9,44,8),W(0,11,15,-7,0,24,38,3,0,9,46,8)],ir={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},ar={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function or(e){return`${Math.round(e)}ms`}function sr(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function cr(e){let t={...ir,...e.easing},n={...ar,...e.duration};return{getAutoHeightDuration:sr,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;if(process.env.NODE_ENV!==`production`){let t=e=>typeof e==`string`,n=e=>!Number.isNaN(parseFloat(e));!t(e)&&!Array.isArray(e)&&console.error(`MUI: Argument "props" must be a string or Array.`),!n(i)&&!t(i)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${i}.`),t(a)||console.error(`MUI: Argument "easing" must be a string.`),!n(o)&&!t(o)&&console.error(`MUI: Argument "delay" must be a number or a string.`),typeof r!=`object`&&console.error([`MUI: Secong argument of transition.create must be an object.`,"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
20
+ `)),Object.keys(s).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(s).join(`,`)}].`)}return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:or(i)} ${a} ${typeof o==`string`?o:or(o)}`).join(`,`)},...e,easing:t,duration:n}}var lr={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function ur(e){return k(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function dr(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!ur(a)||i.startsWith(`unstable_`)?delete e[i]:k(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
76
21
 
77
22
  const theme = ${JSON.stringify(t,null,2)};
78
23
 
79
24
  theme.breakpoints = createBreakpoints(theme.breakpoints || {});
80
25
  theme.transitions = createTransitions(theme.transitions || {});
81
26
 
82
- export default theme;`}function fh(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const Hw=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let r=0;for(let n=0;n<t.length;n+=1)r+=+t[n];return r};function Yw(e){Object.assign(e,{alpha(t,r){const n=this||e;return n.colorSpace?`oklch(from ${t} l c h / ${typeof r=="string"?`calc(${r})`:r})`:n.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:ym(t,Hw(r))},lighten(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${fh(r)})`:ko(t,r)},darken(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${fh(r)})`:Ro(t,r)}})}function Gu(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:s={},transitions:a={},typography:c={},shape:h,colorSpace:p,...m}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":qr(20));const g=Ec({...s,colorSpace:p}),_=lm(e);let O=Pt(_,{mixins:Dw(_.breakpoints,n),palette:g,shadows:Lw.slice(),typography:Mw(g,c),transitions:zw(a),zIndex:{...Gw}});if(O=Pt(O,m),O=t.reduce((S,v)=>Pt(S,v),O),process.env.NODE_ENV!=="production"){const S=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],v=(E,D)=>{let z;for(z in E){const K=E[z];if(S.includes(z)&&Object.keys(K).length>0){if(process.env.NODE_ENV!=="production"){const G=Sc("",z);console.error([`MUI: The \`${D}\` component increases the CSS specificity of the \`${z}\` internal state.`,"You can not override it like this: ",JSON.stringify(E,null,2),"",`Instead, you need to use the '&.${G}' syntax:`,JSON.stringify({root:{[`&.${G}`]:K}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
83
- `))}E[z]={}}}};Object.keys(O.components).forEach(E=>{const D=O.components[E].styleOverrides;D&&E.startsWith("Mui")&&v(D,E)})}return O.unstable_sxConfig={...Oo,...m==null?void 0:m.unstable_sxConfig},O.unstable_sx=function(v){return gn({sx:v,theme:this})},O.toRuntimeSource=_m,Yw(O),O}function Jw(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Xw=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=Jw(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function wm(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function xm(e){return e==="dark"?Xw:[]}function Zw(e){const{palette:t={mode:"light"},opacity:r,overlays:n,colorSpace:i,...s}=e,a=Ec({...t,colorSpace:i});return{palette:a,opacity:{...wm(a.mode),...r},overlays:n||xm(a.mode),...s}}function Qw(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const ex=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],tx=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let s=i;if(i==="class"&&(s=".%s"),i==="data"&&(s="[data-%s]"),i!=null&&i.startsWith("data-")&&!i.includes("%s")&&(s=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return ex(e.cssVarPrefix).forEach(c=>{a[c]=r[c],delete r[c]}),s==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:a}}:s?{[s.replace("%s",t)]:a,[`${n}, ${s.replace("%s",t)}`]:r}:{[n]:{...r,...a}}}if(s&&s!=="media")return`${n}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(s)return s.replace("%s",String(t))}return n};function rx(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function W(e,t,r){!e[t]&&r&&(e[t]=r)}function zn(e){return typeof e!="string"||!e.startsWith("hsl")?e:mm(e)}function Qt(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Kn(zn(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
84
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function nx(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Gt=e=>{try{return e()}catch{}},ix=(e="mui")=>ww(e);function yu(e,t,r,n,i){if(!r)return;r=r===!0?{}:r;const s=i==="dark"?"dark":"light";if(!n){t[i]=Zw({...r,palette:{mode:s,...r==null?void 0:r.palette},colorSpace:e});return}const{palette:a,...c}=Gu({...n,palette:{mode:s,...r==null?void 0:r.palette},colorSpace:e});return t[i]={...r,palette:a,opacity:{...wm(s),...r==null?void 0:r.opacity},overlays:(r==null?void 0:r.overlays)||xm(s)},c}function ox(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:s="mui",nativeColor:a=!1,shouldSkipGeneratingVar:c=Qw,colorSchemeSelector:h=r.light&&r.dark?"media":void 0,rootSelector:p=":root",...m}=e,g=Object.keys(r)[0],_=n||(r.light&&g!=="light"?"light":g),O=ix(s),{[_]:S,light:v,dark:E,...D}=r,z={...D};let K=S;if((_==="dark"&&!("dark"in r)||_==="light"&&!("light"in r))&&(K=!0),!K)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${_}\` option is either missing or invalid.`:qr(21,_));let G;a&&(G="oklch");const T=yu(G,z,K,m,_);v&&!z.light&&yu(G,z,v,void 0,"light"),E&&!z.dark&&yu(G,z,E,void 0,"dark");let N={defaultColorScheme:_,...T,cssVarPrefix:s,colorSchemeSelector:h,rootSelector:p,getCssVar:O,colorSchemes:z,font:{...$w(T.typography),...T.font},spacing:nx(m.spacing)};Object.keys(N.colorSchemes).forEach(oe=>{const w=N.colorSchemes[oe].palette,Z=ve=>{const ge=ve.split("-"),ze=ge[1],$e=ge[2];return O(ve,w[ze][$e])};w.mode==="light"&&(W(w.common,"background","#fff"),W(w.common,"onBackground","#000")),w.mode==="dark"&&(W(w.common,"background","#000"),W(w.common,"onBackground","#fff"));function ee(ve,ge,ze){if(G){let $e;return ve===Rr&&($e=`transparent ${((1-ze)*100).toFixed(0)}%`),ve===Ge&&($e=`#000 ${(ze*100).toFixed(0)}%`),ve===We&&($e=`#fff ${(ze*100).toFixed(0)}%`),`color-mix(in ${G}, ${ge}, ${$e})`}return ve(ge,ze)}if(rx(w,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),w.mode==="light"){W(w.Alert,"errorColor",ee(Ge,w.error.light,.6)),W(w.Alert,"infoColor",ee(Ge,w.info.light,.6)),W(w.Alert,"successColor",ee(Ge,w.success.light,.6)),W(w.Alert,"warningColor",ee(Ge,w.warning.light,.6)),W(w.Alert,"errorFilledBg",Z("palette-error-main")),W(w.Alert,"infoFilledBg",Z("palette-info-main")),W(w.Alert,"successFilledBg",Z("palette-success-main")),W(w.Alert,"warningFilledBg",Z("palette-warning-main")),W(w.Alert,"errorFilledColor",Gt(()=>w.getContrastText(w.error.main))),W(w.Alert,"infoFilledColor",Gt(()=>w.getContrastText(w.info.main))),W(w.Alert,"successFilledColor",Gt(()=>w.getContrastText(w.success.main))),W(w.Alert,"warningFilledColor",Gt(()=>w.getContrastText(w.warning.main))),W(w.Alert,"errorStandardBg",ee(We,w.error.light,.9)),W(w.Alert,"infoStandardBg",ee(We,w.info.light,.9)),W(w.Alert,"successStandardBg",ee(We,w.success.light,.9)),W(w.Alert,"warningStandardBg",ee(We,w.warning.light,.9)),W(w.Alert,"errorIconColor",Z("palette-error-main")),W(w.Alert,"infoIconColor",Z("palette-info-main")),W(w.Alert,"successIconColor",Z("palette-success-main")),W(w.Alert,"warningIconColor",Z("palette-warning-main")),W(w.AppBar,"defaultBg",Z("palette-grey-100")),W(w.Avatar,"defaultBg",Z("palette-grey-400")),W(w.Button,"inheritContainedBg",Z("palette-grey-300")),W(w.Button,"inheritContainedHoverBg",Z("palette-grey-A100")),W(w.Chip,"defaultBorder",Z("palette-grey-400")),W(w.Chip,"defaultAvatarColor",Z("palette-grey-700")),W(w.Chip,"defaultIconColor",Z("palette-grey-700")),W(w.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),W(w.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),W(w.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),W(w.LinearProgress,"primaryBg",ee(We,w.primary.main,.62)),W(w.LinearProgress,"secondaryBg",ee(We,w.secondary.main,.62)),W(w.LinearProgress,"errorBg",ee(We,w.error.main,.62)),W(w.LinearProgress,"infoBg",ee(We,w.info.main,.62)),W(w.LinearProgress,"successBg",ee(We,w.success.main,.62)),W(w.LinearProgress,"warningBg",ee(We,w.warning.main,.62)),W(w.Skeleton,"bg",G?ee(Rr,w.text.primary,.11):`rgba(${Z("palette-text-primaryChannel")} / 0.11)`),W(w.Slider,"primaryTrack",ee(We,w.primary.main,.62)),W(w.Slider,"secondaryTrack",ee(We,w.secondary.main,.62)),W(w.Slider,"errorTrack",ee(We,w.error.main,.62)),W(w.Slider,"infoTrack",ee(We,w.info.main,.62)),W(w.Slider,"successTrack",ee(We,w.success.main,.62)),W(w.Slider,"warningTrack",ee(We,w.warning.main,.62));const ve=G?ee(Ge,w.background.default,.6825):Bi(w.background.default,.8);W(w.SnackbarContent,"bg",ve),W(w.SnackbarContent,"color",Gt(()=>G?zu.text.primary:w.getContrastText(ve))),W(w.SpeedDialAction,"fabHoverBg",Bi(w.background.paper,.15)),W(w.StepConnector,"border",Z("palette-grey-400")),W(w.StepContent,"border",Z("palette-grey-400")),W(w.Switch,"defaultColor",Z("palette-common-white")),W(w.Switch,"defaultDisabledColor",Z("palette-grey-100")),W(w.Switch,"primaryDisabledColor",ee(We,w.primary.main,.62)),W(w.Switch,"secondaryDisabledColor",ee(We,w.secondary.main,.62)),W(w.Switch,"errorDisabledColor",ee(We,w.error.main,.62)),W(w.Switch,"infoDisabledColor",ee(We,w.info.main,.62)),W(w.Switch,"successDisabledColor",ee(We,w.success.main,.62)),W(w.Switch,"warningDisabledColor",ee(We,w.warning.main,.62)),W(w.TableCell,"border",ee(We,ee(Rr,w.divider,1),.88)),W(w.Tooltip,"bg",ee(Rr,w.grey[700],.92))}if(w.mode==="dark"){W(w.Alert,"errorColor",ee(We,w.error.light,.6)),W(w.Alert,"infoColor",ee(We,w.info.light,.6)),W(w.Alert,"successColor",ee(We,w.success.light,.6)),W(w.Alert,"warningColor",ee(We,w.warning.light,.6)),W(w.Alert,"errorFilledBg",Z("palette-error-dark")),W(w.Alert,"infoFilledBg",Z("palette-info-dark")),W(w.Alert,"successFilledBg",Z("palette-success-dark")),W(w.Alert,"warningFilledBg",Z("palette-warning-dark")),W(w.Alert,"errorFilledColor",Gt(()=>w.getContrastText(w.error.dark))),W(w.Alert,"infoFilledColor",Gt(()=>w.getContrastText(w.info.dark))),W(w.Alert,"successFilledColor",Gt(()=>w.getContrastText(w.success.dark))),W(w.Alert,"warningFilledColor",Gt(()=>w.getContrastText(w.warning.dark))),W(w.Alert,"errorStandardBg",ee(Ge,w.error.light,.9)),W(w.Alert,"infoStandardBg",ee(Ge,w.info.light,.9)),W(w.Alert,"successStandardBg",ee(Ge,w.success.light,.9)),W(w.Alert,"warningStandardBg",ee(Ge,w.warning.light,.9)),W(w.Alert,"errorIconColor",Z("palette-error-main")),W(w.Alert,"infoIconColor",Z("palette-info-main")),W(w.Alert,"successIconColor",Z("palette-success-main")),W(w.Alert,"warningIconColor",Z("palette-warning-main")),W(w.AppBar,"defaultBg",Z("palette-grey-900")),W(w.AppBar,"darkBg",Z("palette-background-paper")),W(w.AppBar,"darkColor",Z("palette-text-primary")),W(w.Avatar,"defaultBg",Z("palette-grey-600")),W(w.Button,"inheritContainedBg",Z("palette-grey-800")),W(w.Button,"inheritContainedHoverBg",Z("palette-grey-700")),W(w.Chip,"defaultBorder",Z("palette-grey-700")),W(w.Chip,"defaultAvatarColor",Z("palette-grey-300")),W(w.Chip,"defaultIconColor",Z("palette-grey-300")),W(w.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),W(w.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),W(w.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),W(w.LinearProgress,"primaryBg",ee(Ge,w.primary.main,.5)),W(w.LinearProgress,"secondaryBg",ee(Ge,w.secondary.main,.5)),W(w.LinearProgress,"errorBg",ee(Ge,w.error.main,.5)),W(w.LinearProgress,"infoBg",ee(Ge,w.info.main,.5)),W(w.LinearProgress,"successBg",ee(Ge,w.success.main,.5)),W(w.LinearProgress,"warningBg",ee(Ge,w.warning.main,.5)),W(w.Skeleton,"bg",G?ee(Rr,w.text.primary,.13):`rgba(${Z("palette-text-primaryChannel")} / 0.13)`),W(w.Slider,"primaryTrack",ee(Ge,w.primary.main,.5)),W(w.Slider,"secondaryTrack",ee(Ge,w.secondary.main,.5)),W(w.Slider,"errorTrack",ee(Ge,w.error.main,.5)),W(w.Slider,"infoTrack",ee(Ge,w.info.main,.5)),W(w.Slider,"successTrack",ee(Ge,w.success.main,.5)),W(w.Slider,"warningTrack",ee(Ge,w.warning.main,.5));const ve=G?ee(We,w.background.default,.985):Bi(w.background.default,.98);W(w.SnackbarContent,"bg",ve),W(w.SnackbarContent,"color",Gt(()=>G?bm.text.primary:w.getContrastText(ve))),W(w.SpeedDialAction,"fabHoverBg",Bi(w.background.paper,.15)),W(w.StepConnector,"border",Z("palette-grey-600")),W(w.StepContent,"border",Z("palette-grey-600")),W(w.Switch,"defaultColor",Z("palette-grey-300")),W(w.Switch,"defaultDisabledColor",Z("palette-grey-600")),W(w.Switch,"primaryDisabledColor",ee(Ge,w.primary.main,.55)),W(w.Switch,"secondaryDisabledColor",ee(Ge,w.secondary.main,.55)),W(w.Switch,"errorDisabledColor",ee(Ge,w.error.main,.55)),W(w.Switch,"infoDisabledColor",ee(Ge,w.info.main,.55)),W(w.Switch,"successDisabledColor",ee(Ge,w.success.main,.55)),W(w.Switch,"warningDisabledColor",ee(Ge,w.warning.main,.55)),W(w.TableCell,"border",ee(Ge,ee(Rr,w.divider,1),.68)),W(w.Tooltip,"bg",ee(Rr,w.grey[700],.92))}Qt(w.background,"default"),Qt(w.background,"paper"),Qt(w.common,"background"),Qt(w.common,"onBackground"),Qt(w,"divider"),Object.keys(w).forEach(ve=>{const ge=w[ve];ve!=="tonalOffset"&&ge&&typeof ge=="object"&&(ge.main&&W(w[ve],"mainChannel",Kn(zn(ge.main))),ge.light&&W(w[ve],"lightChannel",Kn(zn(ge.light))),ge.dark&&W(w[ve],"darkChannel",Kn(zn(ge.dark))),ge.contrastText&&W(w[ve],"contrastTextChannel",Kn(zn(ge.contrastText))),ve==="text"&&(Qt(w[ve],"primary"),Qt(w[ve],"secondary")),ve==="action"&&(ge.active&&Qt(w[ve],"active"),ge.selected&&Qt(w[ve],"selected")))})}),N=t.reduce((oe,w)=>Pt(oe,w),N);const H={prefix:s,disableCssColorScheme:i,shouldSkipGeneratingVar:c,getSelector:tx(N),enableContrastVars:a},{vars:te,generateThemeVars:pe,generateStyleSheets:ke}=Tw(N,H);return N.vars=te,Object.entries(N.colorSchemes[N.defaultColorScheme]).forEach(([oe,w])=>{N[oe]=w}),N.generateThemeVars=pe,N.generateStyleSheets=ke,N.generateSpacing=function(){return cm(m.spacing,wc(this))},N.getColorSchemeSelector=Ew(h),N.spacing=N.generateSpacing(),N.shouldSkipGeneratingVar=c,N.unstable_sxConfig={...Oo,...m==null?void 0:m.unstable_sxConfig},N.unstable_sx=function(w){return gn({sx:w,theme:this})},N.toRuntimeSource=_m,N}function dh(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:Ec({...r===!0?{}:r.palette,mode:t})})}function Sm(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:s=r==null?void 0:r.mode,...a}=e,c=s||"light",h=i==null?void 0:i[c],p={...i,...r?{[c]:{...typeof h!="boolean"&&h,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Gu(e,...t);let m=r;"palette"in e||p[c]&&(p[c]!==!0?m=p[c].palette:c==="dark"&&(m={mode:"dark"}));const g=Gu({...e,palette:m},...t);return g.defaultColorScheme=c,g.colorSchemes=p,g.palette.mode==="light"&&(g.colorSchemes.light={...p.light!==!0&&p.light,palette:g.palette},dh(g,"dark",p.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...p.dark!==!0&&p.dark,palette:g.palette},dh(g,"light",p.light)),g}return!r&&!("light"in p)&&c==="light"&&(p.light=!0),ox({...a,colorSchemes:p,defaultColorScheme:c,...typeof n!="boolean"&&n},...t)}const sx=Sm(),ax="$$material";function ux(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const cx=e=>ux(e)&&e!=="classes",lx=uw({themeId:ax,defaultTheme:sx,rootShouldForwardProp:cx}),fx=_w;process.env.NODE_ENV!=="production"&&(Be.node,Be.object.isRequired);function dx(e){return vw(e)}function hx(e){return Sc("MuiSvgIcon",e)}nw("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const px=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${Br(t)}`,`fontSize${Br(r)}`]};return H0(i,hx,n)},mx=lx("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Br(r.color)}`],t[`fontSize${Br(r.fontSize)}`]]}})(fx(({theme:e})=>{var t,r,n,i,s,a,c,h,p,m,g,_,O,S;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(i=(t=e.transitions)==null?void 0:t.create)==null?void 0:i.call(t,"fill",{duration:(n=(r=(e.vars??e).transitions)==null?void 0:r.duration)==null?void 0:n.shorter}),variants:[{props:v=>!v.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:a.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((h=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:h.call(c,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((m=(p=e.typography)==null?void 0:p.pxToRem)==null?void 0:m.call(p,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,v])=>v&&v.main).map(([v])=>{var E,D;return{props:{color:v},style:{color:(D=(E=(e.vars??e).palette)==null?void 0:E[v])==null?void 0:D.main}}}),{props:{color:"action"},style:{color:(_=(g=(e.vars??e).palette)==null?void 0:g.action)==null?void 0:_.active}},{props:{color:"disabled"},style:{color:(S=(O=(e.vars??e).palette)==null?void 0:O.action)==null?void 0:S.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),io=mr.forwardRef(function(t,r){const n=dx({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:a="inherit",component:c="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:m=!1,titleAccess:g,viewBox:_="0 0 24 24",...O}=n,S=mr.isValidElement(i)&&i.type==="svg",v={...n,color:a,component:c,fontSize:h,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:_,hasSvgAsChild:S},E={};m||(E.viewBox=_);const D=px(v);return $.jsxs(mx,{as:c,className:om(D.root,s),focusable:"false",color:p,"aria-hidden":g?void 0:!0,role:g?"img":void 0,ref:r,...E,...O,...S&&i.props,ownerState:v,children:[S?i.props.children:i,g?$.jsx("title",{children:g}):null]})});process.env.NODE_ENV!=="production"&&(io.propTypes={children:Be.node,classes:Be.object,className:Be.string,color:Be.oneOfType([Be.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Be.string]),component:Be.elementType,fontSize:Be.oneOfType([Be.oneOf(["inherit","large","medium","small"]),Be.string]),htmlColor:Be.string,inheritViewBox:Be.bool,shapeRendering:Be.string,sx:Be.oneOfType([Be.arrayOf(Be.oneOfType([Be.func,Be.object,Be.bool])),Be.func,Be.object]),titleAccess:Be.string,viewBox:Be.string});io.muiName="SvgIcon";function _t(e,t){function r(n,i){return $.jsx(io,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=io.muiName,mr.memo(mr.forwardRef(r))}const yx=_t($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),gx=_t($.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),bx=_t($.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),vx=_t($.jsx("path",{d:"M7.5 5.6 10 7 8.6 4.5 10 2 7.5 3.4 5 2l1.4 2.5L5 7zm12 9.8L17 14l1.4 2.5L17 19l2.5-1.4L22 19l-1.4-2.5L22 14zM22 2l-2.5 1.4L17 2l1.4 2.5L17 7l2.5-1.4L22 7l-1.4-2.5zm-7.63 5.29a.996.996 0 0 0-1.41 0L1.29 18.96c-.39.39-.39 1.02 0 1.41l2.34 2.34c.39.39 1.02.39 1.41 0L16.7 11.05c.39-.39.39-1.02 0-1.41zm-1.03 5.49-2.12-2.12 2.44-2.44 2.12 2.12z"}),"AutoFixHigh"),_x=_t($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),wx=_t($.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"}),"Done"),xx=_t($.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline"),Tm=_t($.jsx("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group"),Em=_t($.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"Person"),Sx=_t($.jsx("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd"),Tx=_t($.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Ex=_t([$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"Schedule"),Cx=_t($.jsx("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send"),Ox=_t($.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),Ax=_t($.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),Rx=_t($.jsx("path",{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0"}),"WifiOff");function kx(e){const t=new Date(e),n=new Date().getTime()-t.getTime(),i=Math.floor(n/6e4),s=Math.floor(n/36e5),a=Math.floor(n/864e5);return i<1?"now":i<60?`${i}m`:s<24?`${s}h`:a<7?`${a}d`:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}const Cm=X.memo(({conversation:e,displayName:t,selected:r,onClick:n,currentUser:i})=>{const s=!!e.group,a=e.unread_count,c=(i==null?void 0:i.role)==="admin";return $.jsx(J.ListItem,{disablePadding:!0,children:$.jsxs(J.ListItemButton,{selected:r,onClick:n,sx:{"&.Mui-selected":{backgroundColor:"action.selected","&:hover":{backgroundColor:"action.selected"}}},children:[$.jsx(J.ListItemAvatar,{children:$.jsx(J.Badge,{badgeContent:a,color:"primary",overlap:"circular",invisible:a===0,children:$.jsx(J.Avatar,{sx:{bgcolor:s?"primary.main":"secondary.main"},children:s?$.jsx(Tm,{}):$.jsx(Em,{})})})}),$.jsx(J.ListItemText,{primary:$.jsxs(J.Box,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[$.jsx(J.Typography,{variant:"subtitle2",noWrap:!0,sx:{fontWeight:a>0?600:400,flex:1},children:t}),$.jsx(J.Typography,{variant:"caption",color:"text.secondary",sx:{ml:1,flexShrink:0},children:kx(e.last_message_at)})]}),secondary:$.jsx(J.Typography,{variant:"body2",color:"text.secondary",noWrap:!0,sx:{fontWeight:a>0?500:400},children:e.message_count===0?c&&s?"View group":"No messages yet":`${e.message_count} message${e.message_count!==1?"s":""}`})})]})})}),Om=()=>$.jsxs(J.ListItem,{children:[$.jsx(J.ListItemAvatar,{children:$.jsx(J.Skeleton,{variant:"circular",width:40,height:40})}),$.jsx(J.ListItemText,{primary:$.jsxs(J.Box,{display:"flex",justifyContent:"space-between",children:[$.jsx(J.Skeleton,{variant:"text",width:"60%"}),$.jsx(J.Skeleton,{variant:"text",width:"15%"})]}),secondary:$.jsx(J.Skeleton,{variant:"text",width:"80%"})})]});var jx=function(t){return Px(t)&&!Ix(t)};function Px(e){return!!e&&typeof e=="object"}function Ix(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Fx(e)}var $x=typeof Symbol=="function"&&Symbol.for,Dx=$x?Symbol.for("react.element"):60103;function Fx(e){return e.$$typeof===Dx}function Mx(e){return Array.isArray(e)?[]:{}}function oo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Xn(Mx(e),e,t):e}function Nx(e,t,r){return e.concat(t).map(function(n){return oo(n,r)})}function qx(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(i){n[i]=oo(e[i],r)}),Object.keys(t).forEach(function(i){!r.isMergeableObject(t[i])||!e[i]?n[i]=oo(t[i],r):n[i]=Xn(e[i],t[i],r)}),n}function Xn(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Nx,r.isMergeableObject=r.isMergeableObject||jx;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):qx(e,t,r):oo(t,r)}Xn.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Xn(n,i,r)},{})};var Wu=Xn,Am=typeof global=="object"&&global&&global.Object===Object&&global,Bx=typeof self=="object"&&self&&self.Object===Object&&self,Ht=Am||Bx||Function("return this")(),gr=Ht.Symbol,Rm=Object.prototype,Lx=Rm.hasOwnProperty,Ux=Rm.toString,qn=gr?gr.toStringTag:void 0;function Vx(e){var t=Lx.call(e,qn),r=e[qn];try{e[qn]=void 0;var n=!0}catch{}var i=Ux.call(e);return n&&(t?e[qn]=r:delete e[qn]),i}var Kx=Object.prototype,zx=Kx.toString;function Gx(e){return zx.call(e)}var Wx="[object Null]",Hx="[object Undefined]",hh=gr?gr.toStringTag:void 0;function Kr(e){return e==null?e===void 0?Hx:Wx:hh&&hh in Object(e)?Vx(e):Gx(e)}function km(e,t){return function(r){return e(t(r))}}var Cc=km(Object.getPrototypeOf,Object);function zr(e){return e!=null&&typeof e=="object"}var Yx="[object Object]",Jx=Function.prototype,Xx=Object.prototype,jm=Jx.toString,Zx=Xx.hasOwnProperty,Qx=jm.call(Object);function ph(e){if(!zr(e)||Kr(e)!=Yx)return!1;var t=Cc(e);if(t===null)return!0;var r=Zx.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&jm.call(r)==Qx}function eS(){this.__data__=[],this.size=0}function Pm(e,t){return e===t||e!==e&&t!==t}function jo(e,t){for(var r=e.length;r--;)if(Pm(e[r][0],t))return r;return-1}var tS=Array.prototype,rS=tS.splice;function nS(e){var t=this.__data__,r=jo(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():rS.call(t,r,1),--this.size,!0}function iS(e){var t=this.__data__,r=jo(t,e);return r<0?void 0:t[r][1]}function oS(e){return jo(this.__data__,e)>-1}function sS(e,t){var r=this.__data__,n=jo(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ir(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ir.prototype.clear=eS;ir.prototype.delete=nS;ir.prototype.get=iS;ir.prototype.has=oS;ir.prototype.set=sS;function aS(){this.__data__=new ir,this.size=0}function uS(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function cS(e){return this.__data__.get(e)}function lS(e){return this.__data__.has(e)}function ci(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fS="[object AsyncFunction]",dS="[object Function]",hS="[object GeneratorFunction]",pS="[object Proxy]";function Im(e){if(!ci(e))return!1;var t=Kr(e);return t==dS||t==hS||t==fS||t==pS}var gu=Ht["__core-js_shared__"],mh=(function(){var e=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function mS(e){return!!mh&&mh in e}var yS=Function.prototype,gS=yS.toString;function Gr(e){if(e!=null){try{return gS.call(e)}catch{}try{return e+""}catch{}}return""}var bS=/[\\^$.*+?()[\]{}|]/g,vS=/^\[object .+?Constructor\]$/,_S=Function.prototype,wS=Object.prototype,xS=_S.toString,SS=wS.hasOwnProperty,TS=RegExp("^"+xS.call(SS).replace(bS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ES(e){if(!ci(e)||mS(e))return!1;var t=Im(e)?TS:vS;return t.test(Gr(e))}function CS(e,t){return e==null?void 0:e[t]}function Wr(e,t){var r=CS(e,t);return ES(r)?r:void 0}var Zn=Wr(Ht,"Map"),Qn=Wr(Object,"create");function OS(){this.__data__=Qn?Qn(null):{},this.size=0}function AS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var RS="__lodash_hash_undefined__",kS=Object.prototype,jS=kS.hasOwnProperty;function PS(e){var t=this.__data__;if(Qn){var r=t[e];return r===RS?void 0:r}return jS.call(t,e)?t[e]:void 0}var IS=Object.prototype,$S=IS.hasOwnProperty;function DS(e){var t=this.__data__;return Qn?t[e]!==void 0:$S.call(t,e)}var FS="__lodash_hash_undefined__";function MS(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Qn&&t===void 0?FS:t,this}function Lr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Lr.prototype.clear=OS;Lr.prototype.delete=AS;Lr.prototype.get=PS;Lr.prototype.has=DS;Lr.prototype.set=MS;function NS(){this.size=0,this.__data__={hash:new Lr,map:new(Zn||ir),string:new Lr}}function qS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Po(e,t){var r=e.__data__;return qS(t)?r[typeof t=="string"?"string":"hash"]:r.map}function BS(e){var t=Po(this,e).delete(e);return this.size-=t?1:0,t}function LS(e){return Po(this,e).get(e)}function US(e){return Po(this,e).has(e)}function VS(e,t){var r=Po(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function vr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}vr.prototype.clear=NS;vr.prototype.delete=BS;vr.prototype.get=LS;vr.prototype.has=US;vr.prototype.set=VS;var KS=200;function zS(e,t){var r=this.__data__;if(r instanceof ir){var n=r.__data__;if(!Zn||n.length<KS-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new vr(n)}return r.set(e,t),this.size=r.size,this}function Tn(e){var t=this.__data__=new ir(e);this.size=t.size}Tn.prototype.clear=aS;Tn.prototype.delete=uS;Tn.prototype.get=cS;Tn.prototype.has=lS;Tn.prototype.set=zS;function GS(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var yh=(function(){try{var e=Wr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function $m(e,t,r){t=="__proto__"&&yh?yh(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var WS=Object.prototype,HS=WS.hasOwnProperty;function Dm(e,t,r){var n=e[t];(!(HS.call(e,t)&&Pm(n,r))||r===void 0&&!(t in e))&&$m(e,t,r)}function Io(e,t,r,n){var i=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var c=t[s],h=void 0;h===void 0&&(h=e[c]),i?$m(r,c,h):Dm(r,c,h)}return r}function YS(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var JS="[object Arguments]";function gh(e){return zr(e)&&Kr(e)==JS}var Fm=Object.prototype,XS=Fm.hasOwnProperty,ZS=Fm.propertyIsEnumerable,QS=gh((function(){return arguments})())?gh:function(e){return zr(e)&&XS.call(e,"callee")&&!ZS.call(e,"callee")},li=Array.isArray;function e1(){return!1}var Mm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bh=Mm&&typeof module=="object"&&module&&!module.nodeType&&module,t1=bh&&bh.exports===Mm,vh=t1?Ht.Buffer:void 0,r1=vh?vh.isBuffer:void 0,Nm=r1||e1,n1=9007199254740991,i1=/^(?:0|[1-9]\d*)$/;function o1(e,t){var r=typeof e;return t=t??n1,!!t&&(r=="number"||r!="symbol"&&i1.test(e))&&e>-1&&e%1==0&&e<t}var s1=9007199254740991;function qm(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=s1}var a1="[object Arguments]",u1="[object Array]",c1="[object Boolean]",l1="[object Date]",f1="[object Error]",d1="[object Function]",h1="[object Map]",p1="[object Number]",m1="[object Object]",y1="[object RegExp]",g1="[object Set]",b1="[object String]",v1="[object WeakMap]",_1="[object ArrayBuffer]",w1="[object DataView]",x1="[object Float32Array]",S1="[object Float64Array]",T1="[object Int8Array]",E1="[object Int16Array]",C1="[object Int32Array]",O1="[object Uint8Array]",A1="[object Uint8ClampedArray]",R1="[object Uint16Array]",k1="[object Uint32Array]",Ze={};Ze[x1]=Ze[S1]=Ze[T1]=Ze[E1]=Ze[C1]=Ze[O1]=Ze[A1]=Ze[R1]=Ze[k1]=!0;Ze[a1]=Ze[u1]=Ze[_1]=Ze[c1]=Ze[w1]=Ze[l1]=Ze[f1]=Ze[d1]=Ze[h1]=Ze[p1]=Ze[m1]=Ze[y1]=Ze[g1]=Ze[b1]=Ze[v1]=!1;function j1(e){return zr(e)&&qm(e.length)&&!!Ze[Kr(e)]}function Oc(e){return function(t){return e(t)}}var Bm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hn=Bm&&typeof module=="object"&&module&&!module.nodeType&&module,P1=Hn&&Hn.exports===Bm,bu=P1&&Am.process,bn=(function(){try{var e=Hn&&Hn.require&&Hn.require("util").types;return e||bu&&bu.binding&&bu.binding("util")}catch{}})(),_h=bn&&bn.isTypedArray,I1=_h?Oc(_h):j1,$1=Object.prototype,D1=$1.hasOwnProperty;function Lm(e,t){var r=li(e),n=!r&&QS(e),i=!r&&!n&&Nm(e),s=!r&&!n&&!i&&I1(e),a=r||n||i||s,c=a?YS(e.length,String):[],h=c.length;for(var p in e)(t||D1.call(e,p))&&!(a&&(p=="length"||i&&(p=="offset"||p=="parent")||s&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||o1(p,h)))&&c.push(p);return c}var F1=Object.prototype;function Ac(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||F1;return e===r}var M1=km(Object.keys,Object),N1=Object.prototype,q1=N1.hasOwnProperty;function B1(e){if(!Ac(e))return M1(e);var t=[];for(var r in Object(e))q1.call(e,r)&&r!="constructor"&&t.push(r);return t}function Um(e){return e!=null&&qm(e.length)&&!Im(e)}function Rc(e){return Um(e)?Lm(e):B1(e)}function L1(e,t){return e&&Io(t,Rc(t),e)}function U1(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var V1=Object.prototype,K1=V1.hasOwnProperty;function z1(e){if(!ci(e))return U1(e);var t=Ac(e),r=[];for(var n in e)n=="constructor"&&(t||!K1.call(e,n))||r.push(n);return r}function kc(e){return Um(e)?Lm(e,!0):z1(e)}function G1(e,t){return e&&Io(t,kc(t),e)}var Vm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wh=Vm&&typeof module=="object"&&module&&!module.nodeType&&module,W1=wh&&wh.exports===Vm,xh=W1?Ht.Buffer:void 0,Sh=xh?xh.allocUnsafe:void 0;function H1(e,t){if(t)return e.slice();var r=e.length,n=Sh?Sh(r):new e.constructor(r);return e.copy(n),n}function Km(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Y1(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function zm(){return[]}var J1=Object.prototype,X1=J1.propertyIsEnumerable,Th=Object.getOwnPropertySymbols,jc=Th?function(e){return e==null?[]:(e=Object(e),Y1(Th(e),function(t){return X1.call(e,t)}))}:zm;function Z1(e,t){return Io(e,jc(e),t)}function Gm(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Q1=Object.getOwnPropertySymbols,Wm=Q1?function(e){for(var t=[];e;)Gm(t,jc(e)),e=Cc(e);return t}:zm;function eT(e,t){return Io(e,Wm(e),t)}function Hm(e,t,r){var n=t(e);return li(e)?n:Gm(n,r(e))}function tT(e){return Hm(e,Rc,jc)}function rT(e){return Hm(e,kc,Wm)}var Hu=Wr(Ht,"DataView"),Yu=Wr(Ht,"Promise"),Ju=Wr(Ht,"Set"),Xu=Wr(Ht,"WeakMap"),Eh="[object Map]",nT="[object Object]",Ch="[object Promise]",Oh="[object Set]",Ah="[object WeakMap]",Rh="[object DataView]",iT=Gr(Hu),oT=Gr(Zn),sT=Gr(Yu),aT=Gr(Ju),uT=Gr(Xu),er=Kr;(Hu&&er(new Hu(new ArrayBuffer(1)))!=Rh||Zn&&er(new Zn)!=Eh||Yu&&er(Yu.resolve())!=Ch||Ju&&er(new Ju)!=Oh||Xu&&er(new Xu)!=Ah)&&(er=function(e){var t=Kr(e),r=t==nT?e.constructor:void 0,n=r?Gr(r):"";if(n)switch(n){case iT:return Rh;case oT:return Eh;case sT:return Ch;case aT:return Oh;case uT:return Ah}return t});var cT=Object.prototype,lT=cT.hasOwnProperty;function fT(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&lT.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var kh=Ht.Uint8Array;function Pc(e){var t=new e.constructor(e.byteLength);return new kh(t).set(new kh(e)),t}function dT(e,t){var r=t?Pc(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var hT=/\w*$/;function pT(e){var t=new e.constructor(e.source,hT.exec(e));return t.lastIndex=e.lastIndex,t}var jh=gr?gr.prototype:void 0,Ph=jh?jh.valueOf:void 0;function mT(e){return Ph?Object(Ph.call(e)):{}}function yT(e,t){var r=t?Pc(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var gT="[object Boolean]",bT="[object Date]",vT="[object Map]",_T="[object Number]",wT="[object RegExp]",xT="[object Set]",ST="[object String]",TT="[object Symbol]",ET="[object ArrayBuffer]",CT="[object DataView]",OT="[object Float32Array]",AT="[object Float64Array]",RT="[object Int8Array]",kT="[object Int16Array]",jT="[object Int32Array]",PT="[object Uint8Array]",IT="[object Uint8ClampedArray]",$T="[object Uint16Array]",DT="[object Uint32Array]";function FT(e,t,r){var n=e.constructor;switch(t){case ET:return Pc(e);case gT:case bT:return new n(+e);case CT:return dT(e,r);case OT:case AT:case RT:case kT:case jT:case PT:case IT:case $T:case DT:return yT(e,r);case vT:return new n;case _T:case ST:return new n(e);case wT:return pT(e);case xT:return new n;case TT:return mT(e)}}var Ih=Object.create,MT=(function(){function e(){}return function(t){if(!ci(t))return{};if(Ih)return Ih(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function NT(e){return typeof e.constructor=="function"&&!Ac(e)?MT(Cc(e)):{}}var qT="[object Map]";function BT(e){return zr(e)&&er(e)==qT}var $h=bn&&bn.isMap,LT=$h?Oc($h):BT,UT="[object Set]";function VT(e){return zr(e)&&er(e)==UT}var Dh=bn&&bn.isSet,KT=Dh?Oc(Dh):VT,zT=1,GT=2,WT=4,Ym="[object Arguments]",HT="[object Array]",YT="[object Boolean]",JT="[object Date]",XT="[object Error]",Jm="[object Function]",ZT="[object GeneratorFunction]",QT="[object Map]",eE="[object Number]",Xm="[object Object]",tE="[object RegExp]",rE="[object Set]",nE="[object String]",iE="[object Symbol]",oE="[object WeakMap]",sE="[object ArrayBuffer]",aE="[object DataView]",uE="[object Float32Array]",cE="[object Float64Array]",lE="[object Int8Array]",fE="[object Int16Array]",dE="[object Int32Array]",hE="[object Uint8Array]",pE="[object Uint8ClampedArray]",mE="[object Uint16Array]",yE="[object Uint32Array]",Xe={};Xe[Ym]=Xe[HT]=Xe[sE]=Xe[aE]=Xe[YT]=Xe[JT]=Xe[uE]=Xe[cE]=Xe[lE]=Xe[fE]=Xe[dE]=Xe[QT]=Xe[eE]=Xe[Xm]=Xe[tE]=Xe[rE]=Xe[nE]=Xe[iE]=Xe[hE]=Xe[pE]=Xe[mE]=Xe[yE]=!0;Xe[XT]=Xe[Jm]=Xe[oE]=!1;function Yn(e,t,r,n,i,s){var a,c=t&zT,h=t&GT,p=t&WT;if(a!==void 0)return a;if(!ci(e))return e;var m=li(e);if(m){if(a=fT(e),!c)return Km(e,a)}else{var g=er(e),_=g==Jm||g==ZT;if(Nm(e))return H1(e,c);if(g==Xm||g==Ym||_&&!i){if(a=h||_?{}:NT(e),!c)return h?eT(e,G1(a,e)):Z1(e,L1(a,e))}else{if(!Xe[g])return i?e:{};a=FT(e,g,c)}}s||(s=new Tn);var O=s.get(e);if(O)return O;s.set(e,a),KT(e)?e.forEach(function(E){a.add(Yn(E,t,r,E,e,s))}):LT(e)&&e.forEach(function(E,D){a.set(D,Yn(E,t,r,D,e,s))});var S=p?h?rT:tT:h?kc:Rc,v=m?void 0:S(e);return GS(v||e,function(E,D){v&&(D=E,E=e[D]),Dm(a,D,Yn(E,t,r,D,e,s))}),a}var gE=1,bE=4;function Li(e){return Yn(e,gE|bE)}var vu,Fh;function vE(){if(Fh)return vu;Fh=1;var e=Array.isArray,t=Object.keys,r=Object.prototype.hasOwnProperty,n=typeof Element<"u";function i(s,a){if(s===a)return!0;if(s&&a&&typeof s=="object"&&typeof a=="object"){var c=e(s),h=e(a),p,m,g;if(c&&h){if(m=s.length,m!=a.length)return!1;for(p=m;p--!==0;)if(!i(s[p],a[p]))return!1;return!0}if(c!=h)return!1;var _=s instanceof Date,O=a instanceof Date;if(_!=O)return!1;if(_&&O)return s.getTime()==a.getTime();var S=s instanceof RegExp,v=a instanceof RegExp;if(S!=v)return!1;if(S&&v)return s.toString()==a.toString();var E=t(s);if(m=E.length,m!==t(a).length)return!1;for(p=m;p--!==0;)if(!r.call(a,E[p]))return!1;if(n&&s instanceof Element&&a instanceof Element)return s===a;for(p=m;p--!==0;)if(g=E[p],!(g==="_owner"&&s.$$typeof)&&!i(s[g],a[g]))return!1;return!0}return s!==s&&a!==a}return vu=function(a,c){try{return i(a,c)}catch(h){if(h.message&&h.message.match(/stack|recursion/i)||h.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",h.name,h.message),!1;throw h}},vu}var _E=vE();const jr=wn(_E);var wE=process.env.NODE_ENV==="production";function hn(e,t){if(!wE){var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}var xE=4;function Mh(e){return Yn(e,xE)}function Zm(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var SE="[object Symbol]";function Ic(e){return typeof e=="symbol"||zr(e)&&Kr(e)==SE}var TE="Expected a function";function $c(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(TE);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new($c.Cache||vr),r}$c.Cache=vr;var EE=500;function CE(e){var t=$c(e,function(n){return r.size===EE&&r.clear(),n}),r=t.cache;return t}var OE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AE=/\\(\\)?/g,RE=CE(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(OE,function(r,n,i,s){t.push(i?s.replace(AE,"$1"):n||r)}),t});function kE(e){if(typeof e=="string"||Ic(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Nh=gr?gr.prototype:void 0,qh=Nh?Nh.toString:void 0;function Qm(e){if(typeof e=="string")return e;if(li(e))return Zm(e,Qm)+"";if(Ic(e))return qh?qh.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function jE(e){return e==null?"":Qm(e)}function ey(e){return li(e)?Zm(e,kE):Ic(e)?[e]:Km(RE(jE(e)))}var Ui={exports:{}},Ve={};/** @license React v16.13.1
85
- * react-is.production.min.js
86
- *
87
- * Copyright (c) Facebook, Inc. and its affiliates.
88
- *
89
- * This source code is licensed under the MIT license found in the
90
- * LICENSE file in the root directory of this source tree.
91
- */var Bh;function PE(){if(Bh)return Ve;Bh=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,O=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function K(T){if(typeof T=="object"&&T!==null){var N=T.$$typeof;switch(N){case t:switch(T=T.type,T){case h:case p:case n:case s:case i:case g:return T;default:switch(T=T&&T.$$typeof,T){case c:case m:case S:case O:case a:return T;default:return N}}case r:return N}}}function G(T){return K(T)===p}return Ve.AsyncMode=h,Ve.ConcurrentMode=p,Ve.ContextConsumer=c,Ve.ContextProvider=a,Ve.Element=t,Ve.ForwardRef=m,Ve.Fragment=n,Ve.Lazy=S,Ve.Memo=O,Ve.Portal=r,Ve.Profiler=s,Ve.StrictMode=i,Ve.Suspense=g,Ve.isAsyncMode=function(T){return G(T)||K(T)===h},Ve.isConcurrentMode=G,Ve.isContextConsumer=function(T){return K(T)===c},Ve.isContextProvider=function(T){return K(T)===a},Ve.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},Ve.isForwardRef=function(T){return K(T)===m},Ve.isFragment=function(T){return K(T)===n},Ve.isLazy=function(T){return K(T)===S},Ve.isMemo=function(T){return K(T)===O},Ve.isPortal=function(T){return K(T)===r},Ve.isProfiler=function(T){return K(T)===s},Ve.isStrictMode=function(T){return K(T)===i},Ve.isSuspense=function(T){return K(T)===g},Ve.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===n||T===p||T===s||T===i||T===g||T===_||typeof T=="object"&&T!==null&&(T.$$typeof===S||T.$$typeof===O||T.$$typeof===a||T.$$typeof===c||T.$$typeof===m||T.$$typeof===E||T.$$typeof===D||T.$$typeof===z||T.$$typeof===v)},Ve.typeOf=K,Ve}var Ke={};/** @license React v16.13.1
92
- * react-is.development.js
93
- *
94
- * Copyright (c) Facebook, Inc. and its affiliates.
95
- *
96
- * This source code is licensed under the MIT license found in the
97
- * LICENSE file in the root directory of this source tree.
98
- */var Lh;function IE(){return Lh||(Lh=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,O=e?Symbol.for("react.memo"):60115,S=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,D=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function K(B){return typeof B=="string"||typeof B=="function"||B===n||B===p||B===s||B===i||B===g||B===_||typeof B=="object"&&B!==null&&(B.$$typeof===S||B.$$typeof===O||B.$$typeof===a||B.$$typeof===c||B.$$typeof===m||B.$$typeof===E||B.$$typeof===D||B.$$typeof===z||B.$$typeof===v)}function G(B){if(typeof B=="object"&&B!==null){var rt=B.$$typeof;switch(rt){case t:var Ot=B.type;switch(Ot){case h:case p:case n:case s:case i:case g:return Ot;default:var wt=Ot&&Ot.$$typeof;switch(wt){case c:case m:case S:case O:case a:return wt;default:return rt}}case r:return rt}}}var T=h,N=p,H=c,te=a,pe=t,ke=m,oe=n,w=S,Z=O,ee=r,ve=s,ge=i,ze=g,$e=!1;function ut(B){return $e||($e=!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.")),Q(B)||G(B)===h}function Q(B){return G(B)===p}function ae(B){return G(B)===c}function be(B){return G(B)===a}function Oe(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function _e(B){return G(B)===m}function Ae(B){return G(B)===n}function Re(B){return G(B)===S}function Ee(B){return G(B)===O}function je(B){return G(B)===r}function De(B){return G(B)===s}function ie(B){return G(B)===i}function tt(B){return G(B)===g}Ke.AsyncMode=T,Ke.ConcurrentMode=N,Ke.ContextConsumer=H,Ke.ContextProvider=te,Ke.Element=pe,Ke.ForwardRef=ke,Ke.Fragment=oe,Ke.Lazy=w,Ke.Memo=Z,Ke.Portal=ee,Ke.Profiler=ve,Ke.StrictMode=ge,Ke.Suspense=ze,Ke.isAsyncMode=ut,Ke.isConcurrentMode=Q,Ke.isContextConsumer=ae,Ke.isContextProvider=be,Ke.isElement=Oe,Ke.isForwardRef=_e,Ke.isFragment=Ae,Ke.isLazy=Re,Ke.isMemo=Ee,Ke.isPortal=je,Ke.isProfiler=De,Ke.isStrictMode=ie,Ke.isSuspense=tt,Ke.isValidElementType=K,Ke.typeOf=G})()),Ke}var Uh;function $E(){return Uh||(Uh=1,process.env.NODE_ENV==="production"?Ui.exports=PE():Ui.exports=IE()),Ui.exports}var _u,Vh;function DE(){if(Vh)return _u;Vh=1;var e=$E(),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},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=n,s[e.Memo]=i;function a(S){return e.isMemo(S)?i:s[S.$$typeof]||t}var c=Object.defineProperty,h=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,g=Object.getPrototypeOf,_=Object.prototype;function O(S,v,E){if(typeof v!="string"){if(_){var D=g(v);D&&D!==_&&O(S,D,E)}var z=h(v);p&&(z=z.concat(p(v)));for(var K=a(S),G=a(v),T=0;T<z.length;++T){var N=z[T];if(!r[N]&&!(E&&E[N])&&!(G&&G[N])&&!(K&&K[N])){var H=m(v,N);try{c(S,N,H)}catch{}}}}return S}return _u=O,_u}DE();function yt(){return yt=Object.assign||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},yt.apply(this,arguments)}function ty(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var $o=X.createContext(void 0);$o.displayName="FormikContext";$o.Provider;$o.Consumer;function FE(){var e=X.useContext($o);return e||(process.env.NODE_ENV!=="production"?hn(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):hn()),e}var Mt=function(t){return typeof t=="function"},Do=function(t){return t!==null&&typeof t=="object"},ME=function(t){return String(Math.floor(Number(t)))===t},wu=function(t){return Object.prototype.toString.call(t)==="[object String]"},xu=function(t){return Do(t)&&Mt(t.then)};function NE(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Tt(e,t,r,n){n===void 0&&(n=0);for(var i=ey(t);e&&n<i.length;)e=e[i[n++]];return n!==i.length&&!e||e===void 0?r:e}function Mr(e,t,r){for(var n=Mh(e),i=n,s=0,a=ey(t);s<a.length-1;s++){var c=a[s],h=Tt(e,a.slice(0,s+1));if(h&&(Do(h)||Array.isArray(h)))i=i[c]=Mh(h);else{var p=a[s+1];i=i[c]=ME(p)&&Number(p)>=0?[]:{}}}return(s===0?e:i)[a[s]]===r?e:(r===void 0?delete i[a[s]]:i[a[s]]=r,s===0&&r===void 0&&delete n[a[s]],n)}function ry(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var i=0,s=Object.keys(e);i<s.length;i++){var a=s[i],c=e[a];Do(c)?r.get(c)||(r.set(c,!0),n[a]=Array.isArray(c)?[]:{},ry(c,t,r,n[a])):n[a]=t}return n}function qE(e,t){switch(t.type){case"SET_VALUES":return yt({},e,{values:t.payload});case"SET_TOUCHED":return yt({},e,{touched:t.payload});case"SET_ERRORS":return jr(e.errors,t.payload)?e:yt({},e,{errors:t.payload});case"SET_STATUS":return yt({},e,{status:t.payload});case"SET_ISSUBMITTING":return yt({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return yt({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return yt({},e,{values:Mr(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return yt({},e,{touched:Mr(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return yt({},e,{errors:Mr(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return yt({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return yt({},e,{touched:ry(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":return yt({},e,{isSubmitting:!1});case"SUBMIT_SUCCESS":return yt({},e,{isSubmitting:!1});default:return e}}var kr={},Vi={};function BE(e){var t=e.validateOnChange,r=t===void 0?!0:t,n=e.validateOnBlur,i=n===void 0?!0:n,s=e.validateOnMount,a=s===void 0?!1:s,c=e.isInitialValid,h=e.enableReinitialize,p=h===void 0?!1:h,m=e.onSubmit,g=ty(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),_=yt({validateOnChange:r,validateOnBlur:i,validateOnMount:a,onSubmit:m},g),O=X.useRef(_.initialValues),S=X.useRef(_.initialErrors||kr),v=X.useRef(_.initialTouched||Vi),E=X.useRef(_.initialStatus),D=X.useRef(!1),z=X.useRef({});process.env.NODE_ENV!=="production"&&X.useEffect(function(){typeof c>"u"||(process.env.NODE_ENV!=="production"?hn(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):hn())},[]),X.useEffect(function(){return D.current=!0,function(){D.current=!1}},[]);var K=X.useState(0),G=K[1],T=X.useRef({values:Li(_.initialValues),errors:Li(_.initialErrors)||kr,touched:Li(_.initialTouched)||Vi,status:Li(_.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),N=T.current,H=X.useCallback(function(U){var le=T.current;T.current=qE(le,U),le!==T.current&&G(function(ye){return ye+1})},[]),te=X.useCallback(function(U,le){return new Promise(function(ye,we){var Se=_.validate(U,le);Se==null?ye(kr):xu(Se)?Se.then(function(Pe){ye(Pe||kr)},function(Pe){process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",Pe),we(Pe)}):ye(Se)})},[_.validate]),pe=X.useCallback(function(U,le){var ye=_.validationSchema,we=Mt(ye)?ye(le):ye,Se=le&&we.validateAt?we.validateAt(le,U):UE(U,we);return new Promise(function(Pe,it){Se.then(function(){Pe(kr)},function(gt){gt.name==="ValidationError"?Pe(LE(gt)):(process.env.NODE_ENV!=="production"&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",gt),it(gt))})})},[_.validationSchema]),ke=X.useCallback(function(U,le){return new Promise(function(ye){return ye(z.current[U].validate(le))})},[]),oe=X.useCallback(function(U){var le=Object.keys(z.current).filter(function(we){return Mt(z.current[we].validate)}),ye=le.length>0?le.map(function(we){return ke(we,Tt(U,we))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(ye).then(function(we){return we.reduce(function(Se,Pe,it){return Pe==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Pe&&(Se=Mr(Se,le[it],Pe)),Se},{})})},[ke]),w=X.useCallback(function(U){return Promise.all([oe(U),_.validationSchema?pe(U):{},_.validate?te(U):{}]).then(function(le){var ye=le[0],we=le[1],Se=le[2],Pe=Wu.all([ye,we,Se],{arrayMerge:VE});return Pe})},[_.validate,_.validationSchema,oe,te,pe]),Z=Ft(function(U){return U===void 0&&(U=N.values),H({type:"SET_ISVALIDATING",payload:!0}),w(U).then(function(le){return D.current&&(H({type:"SET_ISVALIDATING",payload:!1}),H({type:"SET_ERRORS",payload:le})),le})});X.useEffect(function(){a&&D.current===!0&&jr(O.current,_.initialValues)&&Z(O.current)},[a,Z]);var ee=X.useCallback(function(U){var le=U&&U.values?U.values:O.current,ye=U&&U.errors?U.errors:S.current?S.current:_.initialErrors||{},we=U&&U.touched?U.touched:v.current?v.current:_.initialTouched||{},Se=U&&U.status?U.status:E.current?E.current:_.initialStatus;O.current=le,S.current=ye,v.current=we,E.current=Se;var Pe=function(){H({type:"RESET_FORM",payload:{isSubmitting:!!U&&!!U.isSubmitting,errors:ye,touched:we,status:Se,values:le,isValidating:!!U&&!!U.isValidating,submitCount:U&&U.submitCount&&typeof U.submitCount=="number"?U.submitCount:0}})};if(_.onReset){var it=_.onReset(N.values,rt);xu(it)?it.then(Pe):Pe()}else Pe()},[_.initialErrors,_.initialStatus,_.initialTouched,_.onReset]);X.useEffect(function(){D.current===!0&&!jr(O.current,_.initialValues)&&p&&(O.current=_.initialValues,ee(),a&&Z(O.current))},[p,_.initialValues,ee,a,Z]),X.useEffect(function(){p&&D.current===!0&&!jr(S.current,_.initialErrors)&&(S.current=_.initialErrors||kr,H({type:"SET_ERRORS",payload:_.initialErrors||kr}))},[p,_.initialErrors]),X.useEffect(function(){p&&D.current===!0&&!jr(v.current,_.initialTouched)&&(v.current=_.initialTouched||Vi,H({type:"SET_TOUCHED",payload:_.initialTouched||Vi}))},[p,_.initialTouched]),X.useEffect(function(){p&&D.current===!0&&!jr(E.current,_.initialStatus)&&(E.current=_.initialStatus,H({type:"SET_STATUS",payload:_.initialStatus}))},[p,_.initialStatus,_.initialTouched]);var ve=Ft(function(U){if(z.current[U]&&Mt(z.current[U].validate)){var le=Tt(N.values,U),ye=z.current[U].validate(le);return xu(ye)?(H({type:"SET_ISVALIDATING",payload:!0}),ye.then(function(we){return we}).then(function(we){H({type:"SET_FIELD_ERROR",payload:{field:U,value:we}}),H({type:"SET_ISVALIDATING",payload:!1})})):(H({type:"SET_FIELD_ERROR",payload:{field:U,value:ye}}),Promise.resolve(ye))}else if(_.validationSchema)return H({type:"SET_ISVALIDATING",payload:!0}),pe(N.values,U).then(function(we){return we}).then(function(we){H({type:"SET_FIELD_ERROR",payload:{field:U,value:Tt(we,U)}}),H({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),ge=X.useCallback(function(U,le){var ye=le.validate;z.current[U]={validate:ye}},[]),ze=X.useCallback(function(U){delete z.current[U]},[]),$e=Ft(function(U,le){H({type:"SET_TOUCHED",payload:U});var ye=le===void 0?i:le;return ye?Z(N.values):Promise.resolve()}),ut=X.useCallback(function(U){H({type:"SET_ERRORS",payload:U})},[]),Q=Ft(function(U,le){var ye=Mt(U)?U(N.values):U;H({type:"SET_VALUES",payload:ye});var we=le===void 0?r:le;return we?Z(ye):Promise.resolve()}),ae=X.useCallback(function(U,le){H({type:"SET_FIELD_ERROR",payload:{field:U,value:le}})},[]),be=Ft(function(U,le,ye){var we=Mt(le)?le(Tt(N.values,U)):le;H({type:"SET_FIELD_VALUE",payload:{field:U,value:we}});var Se=ye===void 0?r:ye;return Se?Z(Mr(N.values,U,we)):Promise.resolve()}),Oe=X.useCallback(function(U,le){var ye=le,we=U,Se;if(!wu(U)){U.persist&&U.persist();var Pe=U.target?U.target:U.currentTarget,it=Pe.type,gt=Pe.name,_r=Pe.id,or=Pe.value,Yt=Pe.checked,Hr=Pe.outerHTML,Yr=Pe.options,Vt=Pe.multiple;ye=le||gt||_r,!ye&&process.env.NODE_ENV!=="production"&&Kh({htmlContent:Hr,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),we=/number|range/.test(it)?(Se=parseFloat(or),isNaN(Se)?"":Se):/checkbox/.test(it)?zE(Tt(N.values,ye),Yt,or):Yr&&Vt?KE(Yr):or}ye&&be(ye,we)},[be,N.values]),_e=Ft(function(U){if(wu(U))return function(le){return Oe(le,U)};Oe(U)}),Ae=Ft(function(U,le,ye){le===void 0&&(le=!0),H({type:"SET_FIELD_TOUCHED",payload:{field:U,value:le}});var we=ye===void 0?i:ye;return we?Z(N.values):Promise.resolve()}),Re=X.useCallback(function(U,le){U.persist&&U.persist();var ye=U.target,we=ye.name,Se=ye.id,Pe=ye.outerHTML,it=le||we||Se;!it&&process.env.NODE_ENV!=="production"&&Kh({htmlContent:Pe,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),Ae(it,!0)},[Ae]),Ee=Ft(function(U){if(wu(U))return function(le){return Re(le,U)};Re(U)}),je=X.useCallback(function(U){Mt(U)?H({type:"SET_FORMIK_STATE",payload:U}):H({type:"SET_FORMIK_STATE",payload:function(){return U}})},[]),De=X.useCallback(function(U){H({type:"SET_STATUS",payload:U})},[]),ie=X.useCallback(function(U){H({type:"SET_ISSUBMITTING",payload:U})},[]),tt=Ft(function(){return H({type:"SUBMIT_ATTEMPT"}),Z().then(function(U){var le=U instanceof Error,ye=!le&&Object.keys(U).length===0;if(ye){var we;try{if(we=Ot(),we===void 0)return}catch(Se){throw Se}return Promise.resolve(we).then(function(Se){return D.current&&H({type:"SUBMIT_SUCCESS"}),Se}).catch(function(Se){if(D.current)throw H({type:"SUBMIT_FAILURE"}),Se})}else if(D.current&&(H({type:"SUBMIT_FAILURE"}),le))throw U})}),B=Ft(function(U){if(U&&U.preventDefault&&Mt(U.preventDefault)&&U.preventDefault(),U&&U.stopPropagation&&Mt(U.stopPropagation)&&U.stopPropagation(),process.env.NODE_ENV!=="production"&&typeof document<"u"){var le=NE();le!==null&&le instanceof HTMLButtonElement&&(le.attributes&&le.attributes.getNamedItem("type")||(process.env.NODE_ENV!=="production"?hn(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):hn()))}tt().catch(function(ye){console.warn("Warning: An unhandled error was caught from submitForm()",ye)})}),rt={resetForm:ee,validateForm:Z,validateField:ve,setErrors:ut,setFieldError:ae,setFieldTouched:Ae,setFieldValue:be,setStatus:De,setSubmitting:ie,setTouched:$e,setValues:Q,setFormikState:je,submitForm:tt},Ot=Ft(function(){return m(N.values,rt)}),wt=Ft(function(U){U&&U.preventDefault&&Mt(U.preventDefault)&&U.preventDefault(),U&&U.stopPropagation&&Mt(U.stopPropagation)&&U.stopPropagation(),ee()}),Fo=X.useCallback(function(U){return{value:Tt(N.values,U),error:Tt(N.errors,U),touched:!!Tt(N.touched,U),initialValue:Tt(O.current,U),initialTouched:!!Tt(v.current,U),initialError:Tt(S.current,U)}},[N.errors,N.touched,N.values]),Mo=X.useCallback(function(U){return{setValue:function(ye,we){return be(U,ye,we)},setTouched:function(ye,we){return Ae(U,ye,we)},setError:function(ye){return ae(U,ye)}}},[be,Ae,ae]),No=X.useCallback(function(U){var le=Do(U),ye=le?U.name:U,we=Tt(N.values,ye),Se={name:ye,value:we,onChange:_e,onBlur:Ee};if(le){var Pe=U.type,it=U.value,gt=U.as,_r=U.multiple;Pe==="checkbox"?it===void 0?Se.checked=!!we:(Se.checked=!!(Array.isArray(we)&&~we.indexOf(it)),Se.value=it):Pe==="radio"?(Se.checked=we===it,Se.value=it):gt==="select"&&_r&&(Se.value=Se.value||[],Se.multiple=!0)}return Se},[Ee,_e,N.values]),En=X.useMemo(function(){return!jr(O.current,N.values)},[O.current,N.values]),Cn=X.useMemo(function(){return typeof c<"u"?En?N.errors&&Object.keys(N.errors).length===0:c!==!1&&Mt(c)?c(_):c:N.errors&&Object.keys(N.errors).length===0},[c,En,N.errors,_]),It=yt({},N,{initialValues:O.current,initialErrors:S.current,initialTouched:v.current,initialStatus:E.current,handleBlur:Ee,handleChange:_e,handleReset:wt,handleSubmit:B,resetForm:ee,setErrors:ut,setFormikState:je,setFieldTouched:Ae,setFieldValue:be,setFieldError:ae,setStatus:De,setSubmitting:ie,setTouched:$e,setValues:Q,submitForm:tt,validateForm:Z,validateField:ve,isValid:Cn,dirty:En,unregisterField:ze,registerField:ge,getFieldProps:No,getFieldMeta:Fo,getFieldHelpers:Mo,validateOnBlur:i,validateOnChange:r,validateOnMount:a});return It}function Kh(e){var t=e.htmlContent,r=e.documentationAnchorLink,n=e.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+`
99
- Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+r+`
100
- `)}function LE(e){var t={};if(e.inner){if(e.inner.length===0)return Mr(t,e.path,e.message);for(var i=e.inner,r=Array.isArray(i),n=0,i=r?i:i[Symbol.iterator]();;){var s;if(r){if(n>=i.length)break;s=i[n++]}else{if(n=i.next(),n.done)break;s=n.value}var a=s;Tt(t,a.path)||(t=Mr(t,a.path,a.message))}}return t}function UE(e,t,r,n){r===void 0&&(r=!1);var i=Zu(e);return t[r?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function Zu(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(i){return Array.isArray(i)===!0||ph(i)?Zu(i):i!==""?i:void 0}):ph(e[n])?t[n]=Zu(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function VE(e,t,r){var n=e.slice();return t.forEach(function(s,a){if(typeof n[a]>"u"){var c=r.clone!==!1,h=c&&r.isMergeableObject(s);n[a]=h?Wu(Array.isArray(s)?[]:{},s,r):s}else r.isMergeableObject(s)?n[a]=Wu(e[a],s,r):e.indexOf(s)===-1&&n.push(s)}),n}function KE(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function zE(e,t,r){if(typeof e=="boolean")return!!t;var n=[],i=!1,s=-1;if(Array.isArray(e))n=e,s=e.indexOf(r),i=s>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!i?n.concat(r):i?n.slice(0,s).concat(n.slice(s+1)):n}var GE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?X.useLayoutEffect:X.useEffect;function Ft(e){var t=X.useRef(e);return GE(function(){t.current=e}),X.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.current.apply(void 0,n)},[])}var WE=X.forwardRef(function(e,t){var r=e.action,n=ty(e,["action"]),i=r??"#",s=FE(),a=s.handleReset,c=s.handleSubmit;return X.createElement("form",yt({onSubmit:c,ref:t,onReset:a,action:i},n))});WE.displayName="Form";var Su,zh;function Dc(){if(zh)return Su;zh=1;var e=oi(),t=Sn(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return Su=n,Su}var Tu,Gh;function HE(){if(Gh)return Tu;Gh=1;var e=si(),t=Dc(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(s,a){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:n.test(s)||!r.test(s)||a!=null&&s in Object(a)}return Tu=i,Tu}var Eu,Wh;function YE(){if(Wh)return Eu;Wh=1;var e=Bp(),t="Expected a function";function r(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var s=function(){var a=arguments,c=i?i.apply(this,a):a[0],h=s.cache;if(h.has(c))return h.get(c);var p=n.apply(this,a);return s.cache=h.set(c,p)||h,p};return s.cache=new(r.Cache||e),s}return r.Cache=e,Eu=r,Eu}var Cu,Hh;function JE(){if(Hh)return Cu;Hh=1;var e=YE(),t=500;function r(n){var i=e(n,function(a){return s.size===t&&s.clear(),a}),s=i.cache;return i}return Cu=r,Cu}var Ou,Yh;function XE(){if(Yh)return Ou;Yh=1;var e=JE(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=e(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(t,function(a,c,h,p){s.push(h?p.replace(r,"$1"):c||a)}),s});return Ou=n,Ou}var Au,Jh;function ZE(){if(Jh)return Au;Jh=1;function e(t,r){for(var n=-1,i=t==null?0:t.length,s=Array(i);++n<i;)s[n]=r(t[n],n,t);return s}return Au=e,Au}var Ru,Xh;function QE(){if(Xh)return Ru;Xh=1;var e=pc(),t=ZE(),r=si(),n=Dc(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function a(c){if(typeof c=="string")return c;if(r(c))return t(c,a)+"";if(n(c))return s?s.call(c):"";var h=c+"";return h=="0"&&1/c==-1/0?"-0":h}return Ru=a,Ru}var ku,Zh;function eC(){if(Zh)return ku;Zh=1;var e=QE();function t(r){return r==null?"":e(r)}return ku=t,ku}var ju,Qh;function tC(){if(Qh)return ju;Qh=1;var e=si(),t=HE(),r=XE(),n=eC();function i(s,a){return e(s)?s:t(s,a)?[s]:r(n(s))}return ju=i,ju}var Pu,ep;function rC(){if(ep)return Pu;ep=1;var e=Dc();function t(r){if(typeof r=="string"||e(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return Pu=t,Pu}var Iu,tp;function nC(){if(tp)return Iu;tp=1;var e=tC(),t=rC();function r(n,i){i=e(i,n);for(var s=0,a=i.length;n!=null&&s<a;)n=n[t(i[s++])];return s&&s==a?n:void 0}return Iu=r,Iu}var $u,rp;function iC(){if(rp)return $u;rp=1;var e=nC();function t(r,n,i){var s=r==null?void 0:e(r,n);return s===void 0?i:s}return $u=t,$u}var oC=iC();const sC=wn(oC),aC=(e=16)=>{const t={upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",lower:"abcdefghijklmnopqrstuvwxyz",numbers:"0123456789",symbols:"!@%^&*()_+[]{}|;:,.<>?"},r=t.upper+t.lower+t.numbers+t.symbols,n=s=>{const a=crypto.getRandomValues(new Uint32Array(1));return s[a[0]%s.length]},i=[n(t.upper),n(t.lower),n(t.numbers),n(t.symbols)];for(let s=4;s<e;s++)i.push(n(r));for(let s=i.length-1;s>0;s--){const c=crypto.getRandomValues(new Uint32Array(1))[0]%(s+1),h=i[s];i[s]=i[c],i[c]=h}return i.join("")},uC=({showPassword:e,onToggleVisibility:t,onGenerate:r})=>$.jsxs(J.InputAdornment,{position:"end",children:[r&&$.jsx(J.Tooltip,{title:"Generate Password",children:$.jsx(J.IconButton,{onClick:r,edge:"end",size:"small",sx:{opacity:.7},"aria-label":"generate password",children:$.jsx(vx,{})})}),$.jsx(J.Tooltip,{title:e?"Hide password":"Show password",children:$.jsx(J.IconButton,{onClick:t,edge:"end",size:"small",sx:{opacity:.7},"aria-label":e?"hide password":"show password",children:e?$.jsx(Ax,{}):$.jsx(Ox,{})})})]}),cC=({type:e,autoGenerate:t=!1,formik:r,name:n})=>{const[i,s]=X.useState(!1),a={},c=i?"text":"password";if(e!=="password")return{inputType:e,inputProps:a};const h=()=>{s(!i)},p=()=>{if(!r||!n)return;const m=aC();r.setFieldValue(n,m),i||s(!0)};return a.endAdornment=uC({showPassword:i,onToggleVisibility:h,onGenerate:t?p:void 0}),{inputType:c,inputProps:a}},lC=({helperText:e,errorText:t,formik:r,name:n,defaultValue:i,onChange:s,type:a,fullWidth:c=!0,autoGenerate:h=!1,...p})=>{var O;const m=cC({type:a,autoGenerate:h,formik:r,name:n});let g={};const _=p.value??i;if(X.useEffect(()=>{!r||!n||_===void 0||r.setFieldValue(n,_)},[_]),n&&r){r.touched[n]&&(t??(t=r.errors[n]));let S=sC(r.values,n,"");a==="date"&&(S=fC(S)),g={value:S??"",onBlur:()=>r.setFieldTouched(n),onChange:v=>{let E=v.target.value;a==="date"&&E&&(E=new Date(E)),r.setFieldValue(n,E||null),s==null||s(v)},slotProps:{...p.slotProps,input:{...p.InputProps,...(O=p.slotProps)==null?void 0:O.input,...m.inputProps},inputLabel:a==="date"?{shrink:!0}:void 0}}}return $.jsx(J.TextField,{variant:"standard",onChange:s,...p,...g,name:n,type:m.inputType,fullWidth:c,helperText:t||e,error:!!t})},fC=e=>{if(!e)return"";const t=new Date(e),r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return`${r}-${n}-${i}`},dC=({multiple:e=!1,formik:t,name:r,label:n="Search users",disabled:i=!1,error:s,helperText:a,value:c,onChange:h})=>{const[p,m]=X.useState(!1),[g,_]=X.useState([]),[O,S]=X.useState(!1),[v,E]=X.useState(""),D=X.useCallback(async te=>{if(te.length<2){_([]);return}S(!0);try{const ke=await Ut().searchUsers({name:te});_(ke)}catch(pe){console.error("Failed to search users:",pe),_([])}finally{S(!1)}},[]),z=X.useCallback((te,pe)=>{E(pe),D(pe)},[D]),K=()=>c!==void 0?c:t&&r?t.values[r]:e?[]:null,G=(te,pe)=>{h?h(pe):t&&r&&t.setFieldValue(r,pe)},T=()=>{t&&r&&t.setFieldTouched(r)},N=()=>{if(s)return" ";if(t&&r&&t.touched[r]&&t.errors[r])return t.errors[r]},H=K();return $.jsx(J.Autocomplete,{open:p,onOpen:()=>m(!0),onClose:()=>m(!1),multiple:e,options:g,value:H,onChange:G,onBlur:T,onInputChange:z,getOptionLabel:te=>te.name,isOptionEqualToValue:(te,pe)=>te.id===pe.id,loading:O,noOptionsText:v.length<3?"Type at least 3 characters to search":"No users found",renderOption:(te,pe)=>X.createElement(J.Box,{component:"li",...te,key:pe.id},$.jsxs(J.Box,{children:[$.jsx(J.Typography,{variant:"body1",children:pe.name}),$.jsx(J.Typography,{variant:"body2",color:"text.secondary",children:pe.email})]})),renderInput:te=>$.jsx(J.TextField,{...te,label:n,disabled:i,error:!!N(),helperText:N()||a,InputProps:{...te.InputProps,endAdornment:$.jsxs($.Fragment,{children:[O?$.jsx(J.CircularProgress,{size:20}):null,te.InputProps.endAdornment]})}})})},hC=uc({name:Gn().trim().required("Group name is required").min(2,"Group name must be at least 2 characters").max(100,"Group name must be at most 100 characters")}),ny=({open:e,onClose:t,onSuccess:r,orgId:n})=>{const[i,s]=X.useState(null),a=BE({initialValues:{name:"",read_only:!1,members:[]},validationSchema:hC,onSubmit:async(g,{setSubmitting:_,resetForm:O})=>{s(null);try{const S=Ut(),v=await S.createGroup(n,{name:g.name.trim(),read_only:g.read_only});g.members&&g.members.length>0&&await S.addGroupMembers(n,v.id,g.members.map(E=>({user:E.userId,role:E.role}))),O(),r==null||r(),t()}catch(S){s(eo(S,"Failed to create group"))}_(!1)}}),c=g=>{const _=Array.isArray(g)?g:[];a.setFieldValue("members",_.map(O=>({userId:O.id,role:"member",user:O})))},h=(g,_)=>{const O=a.values.members.map(S=>S.userId===g?{...S,role:_}:S);a.setFieldValue("members",O)},p=g=>{const _=a.values.members.filter(O=>O.userId!==g);a.setFieldValue("members",_)},m=()=>{a.resetForm(),t()};return $.jsxs(J.Dialog,{open:e,onClose:m,maxWidth:"sm",fullWidth:!0,PaperProps:{component:"form",onSubmit:a.handleSubmit},children:[$.jsx(J.DialogTitle,{children:"Create New Group"}),$.jsx(J.DialogContent,{children:$.jsxs(J.Box,{sx:{display:"flex",flexDirection:"column",gap:2,pt:1},children:[i&&$.jsx(J.Alert,{severity:"error",onClose:()=>s(null),children:i.message}),$.jsx(lC,{label:"Group Name",name:"name",formik:a,required:!0,disabled:a.isSubmitting,placeholder:"e.g., Computer Science 101"}),$.jsx(J.FormControlLabel,{control:$.jsx(J.Switch,{name:"read_only",checked:a.values.read_only,onChange:a.handleChange,disabled:a.isSubmitting}),label:"Read-only group (only moderators can post)"}),$.jsx(J.Divider,{sx:{my:2}}),$.jsx(J.Typography,{color:"warning.main",fontWeight:500,children:"You cannot add members later. Only admins can join a group after it is created"}),$.jsxs(J.Box,{children:[$.jsx(J.Typography,{variant:"subtitle2",gutterBottom:!0,children:"Add Members"}),$.jsx(dC,{multiple:!0,label:"Search users to add",value:a.values.members.map(g=>g.user),onChange:c,disabled:a.isSubmitting})]}),a.values.members.length>0&&$.jsxs($.Fragment,{children:[$.jsx(J.Typography,{variant:"subtitle2",gutterBottom:!0,children:"Selected Members"}),a.values.members.map(g=>$.jsxs(J.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:1},children:[$.jsx(J.Box,{sx:{flex:1},children:g.user.name}),$.jsxs(J.Select,{value:g.role,onChange:_=>h(g.userId,_.target.value),size:"small",disabled:a.isSubmitting,sx:{mr:2},children:[$.jsx(J.MenuItem,{value:"member",children:"Member"}),$.jsx(J.MenuItem,{value:"moderator",children:"Moderator"})]}),$.jsx(J.IconButton,{size:"small",onClick:()=>p(g.userId),disabled:a.isSubmitting,color:"error",children:$.jsx(_x,{})})]},g.userId))]})]})}),$.jsxs(J.DialogActions,{sx:{p:3},children:[$.jsx(J.Button,{onClick:m,disabled:a.isSubmitting,children:"Cancel"}),$.jsx(J.Button,{type:"submit",variant:"contained",disabled:a.isSubmitting||!a.isValid,startIcon:a.isSubmitting&&$.jsx(J.CircularProgress,{size:16}),children:"Create Group"})]})]})};let iy=null;const Qu=e=>{iy=e},pC=()=>iy,Fc=async e=>{const n=(await Ut().getMessagesSummary(e)).map(i=>({...i,id:C0(i)}));return await ft.summaries.bulkPut(n),n},mC=Object.freeze(Object.defineProperty({__proto__:null,fetchSummaries:Fc,getActiveConversationId:pC,setActiveConversation:Qu},Symbol.toStringTag,{value:"Module"})),oy=async e=>{const r=await Ut().getGroups(e);return await ft.groups.clear(),await ft.groups.bulkPut(r),r};function yC(e,t,r){var n,i;typeof e=="function"?(n=t||[],i=r):(n=[],i=t);var s=X.useRef({hasResult:!1,result:i,error:null}),a=X.useReducer(function(p){return p+1},0);a[0];var c=a[1],h=X.useMemo(function(){var p=typeof e=="function"?e():e;if(!p||typeof p.subscribe!="function")throw e===p?new TypeError("Given argument to useObservable() was neither a valid observable nor a function."):new TypeError("Observable factory given to useObservable() did not return a valid observable.");if(!s.current.hasResult&&typeof window<"u"&&(typeof p.hasValue!="function"||p.hasValue()))if(typeof p.getValue=="function")s.current.result=p.getValue(),s.current.hasResult=!0;else{var m=p.subscribe(function(g){s.current.result=g,s.current.hasResult=!0});typeof m=="function"?m():m.unsubscribe()}return p},n);if(X.useDebugValue(s.current.result),X.useEffect(function(){var p=h.subscribe(function(m){var g=s.current;(g.error!==null||g.result!==m)&&(g.error=null,g.result=m,g.hasResult=!0,c())},function(m){var g=s.current;g.error!==m&&(g.error=m,c())});return typeof p=="function"?p:p.unsubscribe.bind(p)},n),s.current.error)throw s.current.error;return s.current.result}function vn(e,t,r){return yC(function(){return yn.liveQuery(e)},t||[],r)}typeof FinalizationRegistry<"u"&&new FinalizationRegistry(function(e){var t=yn.DexieYProvider;t&&t.release(e)});const sy=({selectedConversation:e,currentUser:t,onConversationSelect:r})=>{const[n,i]=X.useState(!0),[s,a]=X.useState(),[c,h]=X.useState(!1),p=vn(()=>ft.summaries.toArray(),[e])||[],m=vn(()=>ft.groups.toArray(),[])||[],g=(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="system",_=X.useCallback(async()=>{i(!0),t!=null&&t.org&&(await Promise.all([Fc({}),oy(t==null?void 0:t.org)]).catch(K=>{a(K instanceof Error?K:new Error(String(K)))}),i(!1))},[t==null?void 0:t.org]);X.useEffect(()=>{_();const K=setInterval(_,3*6e4);return()=>clearInterval(K)},[_]);const[O,S]=X.useState({});X.useEffect(()=>{const K=async()=>{if(!(t!=null&&t.org))return;const G=Ut(),T={};for(const N of p)try{if(N.user!==void 0&&!O[N.user]){const H=await G.getUser(N.user);T[N.user]=H.name}}catch(H){console.error("Failed to load conversation name:",H)}Object.keys(T).length>0&&S(N=>({...N,...T}))};p.length>0&&(t!=null&&t.org)&&K()},[p,t==null?void 0:t.org]);const v=K=>{if(K.user!==void 0)return O[K.user]||`User ${K.user}`;if(K.group!==void 0){const G=m.find(T=>T.id===K.group);return(G==null?void 0:G.name)||`Group ${K.group}`}return"Unknown"},E=K=>e?K.group!==void 0?e.type==="group"&&e.id===K.group:K.user!==void 0?e.type==="dm"&&e.id===K.user:!1:!1,D=K=>{K.group!==void 0?r({type:"group",id:K.group,name:v(K)}):K.user!==void 0&&r({type:"dm",id:K.user,name:v(K)})},z=async()=>{await _()};return $.jsxs(J.Box,{display:"flex",flexDirection:"column",height:"100%",children:[$.jsx(J.AppBar,{position:"static",elevation:0,sx:{backgroundColor:"background.default",color:"text.primary"},children:$.jsxs(J.Toolbar,{children:[$.jsx(J.Typography,{variant:"h6",component:"div",sx:{flexGrow:1},children:"Messages"}),g&&$.jsx(J.Tooltip,{title:"Create Group",children:$.jsx(J.IconButton,{color:"primary",onClick:()=>h(!0),size:"small",sx:{mr:-2},children:$.jsx(yx,{})})})]})}),g&&(t==null?void 0:t.org)&&$.jsx(ny,{open:c,onClose:()=>h(!1),onSuccess:z,orgId:t.org}),$.jsx(J.Box,{flex:1,overflow:"auto",children:n&&!p.length?$.jsx(J.List,{disablePadding:!0,children:[1,2,3,4,5].map(K=>$.jsx(Om,{},K))}):s?$.jsx(J.Box,{p:2,children:$.jsxs(J.Alert,{severity:"error",children:["Failed to load conversations: ",s.message]})}):p.length===0&&m.length===0?$.jsx(J.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",p:2,children:$.jsx(J.Typography,{color:"text.secondary",align:"center",children:"No conversations yet"})}):$.jsx(J.List,{disablePadding:!0,children:(()=>{const K=new Set(p.filter(te=>te.group!==void 0).map(te=>te.group)),T=m.filter(te=>!K.has(te.id)).map(te=>({group:te.id,last_message_at:te.created_at,message_count:0,unread_count:0}));return[...[...p].sort((te,pe)=>new Date(pe.last_message_at).getTime()-new Date(te.last_message_at).getTime()),...T].map(te=>$.jsx(Cm,{conversation:te,displayName:v(te),selected:E(te),onClick:()=>D(te),currentUser:t},te.group!==void 0?`group-${te.group}`:`user-${te.user}`))})()})})]})},ay=({displayName:e,type:t,subtitle:r,isConnected:n=!0,onBack:i,showJoinButton:s=!1,onJoin:a,joining:c=!1})=>{const h=t==="group",[p,m]=X.useState(null),g=S=>{m(S.currentTarget)},_=()=>{m(null)},O=S=>{a(S),_()};return $.jsx(J.AppBar,{position:"static",elevation:0,sx:{backgroundColor:"background.default",color:"text.primary"},children:$.jsxs(J.Toolbar,{children:[i&&$.jsx(J.IconButton,{edge:"start",color:"inherit",onClick:i,sx:{mr:2,display:{xs:"flex",sm:"flex",md:"none"}},children:$.jsx(gx,{})}),$.jsx(J.Avatar,{sx:{bgcolor:h?"primary.main":"secondary.main",mr:2},children:h?$.jsx(Tm,{}):$.jsx(Em,{})}),$.jsxs(J.Box,{flex:1,children:[$.jsx(J.Typography,{variant:"h6",component:"div",noWrap:!0,children:e}),r&&$.jsx(J.Typography,{variant:"caption",color:"inherit",sx:{opacity:.7},children:r})]}),s&&h&&$.jsxs(J.Box,{sx:{display:"flex",alignItems:"center",mr:1},children:[$.jsx(J.Button,{variant:"contained",color:"primary",startIcon:$.jsx(Sx,{}),endIcon:$.jsx(bx,{}),onClick:g,disabled:c,children:c?"Joining...":"Join"}),$.jsxs(J.Menu,{anchorEl:p,open:!!p,onClose:_,children:[$.jsx(J.MenuItem,{onClick:()=>O("member"),children:"Member"}),$.jsx(J.MenuItem,{onClick:()=>O("moderator"),children:"Moderator"})]})]}),!n&&$.jsx(J.Chip,{icon:$.jsx(Rx,{}),label:"Disconnected",size:"small",color:"warning",sx:{ml:1}})]})})};function gC(e){return(typeof e=="string"?new Date(e):e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})}const uy=X.memo(({message:e,isOwnMessage:t,senderName:r,showSenderName:n=!0,isFirstInGroup:i=!0,isLastInGroup:s=!0,status:a="sent"})=>{const c=e.id.startsWith("temp-"),h=()=>{if(!t||!s)return null;const m={fontSize:14,ml:.5,opacity:.7,verticalAlign:"middle"};return a==="failed"?$.jsx(xx,{sx:{...m,color:"error.main"}}):a==="sending"||c?$.jsx(Ex,{sx:m}):$.jsx(wx,{sx:m})},p=$.jsx(J.Avatar,{sx:{width:32,height:32,fontSize:"0.875rem",color:t?"primary.contrastText":"secondary.contrastText",bgcolor:t?"primary.main":"secondary.main",visibility:s?"visible":"hidden"},children:I0(r)});return $.jsxs(J.Box,{display:"flex",justifyContent:t?"flex-end":"flex-start",alignItems:"flex-end",mb:s?1:.25,gap:1,children:[!t&&p,$.jsxs(J.Paper,{elevation:1,sx:{maxWidth:"80%",p:1.5,backgroundColor:t?"primary.main":"background.paper",color:t?"primary.contrastText":"text.primary",borderTopLeftRadius:t||!i?void 0:4,borderTopRightRadius:!t||!i?void 0:4,borderBottomLeftRadius:t||!s?void 0:4,borderBottomRightRadius:!t||!s?void 0:4},children:[!t&&n&&i&&$.jsx(J.Typography,{variant:"caption",fontWeight:"bold",display:"block",mb:.5,children:r||`User ${e.sender}`}),$.jsx(J.Typography,{variant:"body1",sx:{whiteSpace:"pre-wrap"},children:e.content}),s&&$.jsxs(J.Box,{display:"flex",justifyContent:"flex-end",alignItems:"center",mt:.5,children:[$.jsx(J.Typography,{variant:"caption",color:t?"inherit":"text.secondary",sx:{opacity:.7},children:gC(new Date(e.created_at))}),$.jsx(h,{})]})]}),t&&p]})}),cy=({isOwnMessage:e=!1})=>$.jsx(J.Box,{display:"flex",justifyContent:e?"flex-end":"flex-start",mb:1,children:$.jsxs(J.Box,{maxWidth:"70%",children:[!e&&$.jsx(J.Skeleton,{variant:"text",width:80,sx:{mb:.5}}),$.jsx(J.Skeleton,{variant:"rounded",width:Math.random()*200+150,height:60,sx:{borderRadius:2,bgcolor:e?"primary.light":"background.main"}})]})}),ly=({hasMore:e,loading:t,onLoadMore:r,threshold:n=1,rootMargin:i="100px"})=>{const s=X.useRef(null),a=X.useRef(null);return X.useEffect(()=>{if(!e||t)return;const c=s.current;if(c)return a.current=new IntersectionObserver(h=>{const[p]=h;p&&p.isIntersecting&&e&&!t&&r()},{threshold:n,rootMargin:i}),a.current.observe(c),()=>{a.current&&c&&(a.current.unobserve(c),a.current.disconnect())}},[e,t,r,n,i]),e?$.jsx(J.Box,{ref:s,display:"flex",justifyContent:"center",alignItems:"center",py:2,children:t?$.jsx(J.CircularProgress,{size:24}):$.jsx(J.Typography,{variant:"caption",color:"text.secondary",children:"Scroll to load more"})}):null},Mc=(e,t,r)=>{X.useEffect(()=>((async()=>{await e()})(),r),t)};function bC(e){const t=e.map(n=>Number(n.sender));return new Set(t)}function fy(e){const t=Ut(),[r,n]=X.useState(()=>new Map),i=X.useCallback(async()=>{if(!e.length)return r;try{const s=bC(e),a=Array.from(s);if(console.log("[names] size:",s.size),!s.size)return r;const c=(await ft.users.bulkGet(a)).filter(_=>!!_),h=new Map;if(c.forEach(_=>{h.set(_.id,_.name)}),s.size===c.length)return h;const p=a.filter(_=>!h.has(_)),m=await t.getUsers(p,{fields:["id","name"]});await ft.users.bulkPut(m);const g=h;return m.forEach(_=>g.set(_.id,_.name)),g}catch(s){console.error("[useSenderNames] Failed to fetch users:",s)}return r},[e,r]);return Mc(async()=>{const s=await i();n(s)},[e]),r}const dy=({messages:e,currentUserId:t,loading:r=!1,error:n=null,autoScroll:i=!0,hasMore:s=!1,loadingMore:a=!1,onLoadMore:c})=>{const h=X.useRef(null),p=X.useRef(null),m=X.useRef(0),g=X.useRef(!0),[_,O]=X.useState(i),S=fy(e),v=()=>{if(!p.current)return!1;const{scrollTop:D,scrollHeight:z,clientHeight:K}=p.current;return z-D-K<100},E=()=>{g.current=v()};return X.useEffect(()=>{e.length>0&&h.current&&(h.current.scrollIntoView({behavior:"auto"}),g.current=!0)},[]),X.useEffect(()=>{!a||!e.length||(p.current&&(m.current=p.current.scrollHeight),O(!1))},[a]),X.useLayoutEffect(()=>{if(e.length){if(_&&h.current&&g.current)h.current.scrollIntoView({behavior:"smooth"});else if(!_&&p.current&&m.current>0){const z=p.current.scrollHeight-m.current;p.current.scrollTop=p.current.scrollTop+z,m.current=0,O(!0)}}},[e.length,i]),r&&!e.length?$.jsx(J.Box,{flex:1,overflow:"auto",p:2,children:[1,2,3,4,5].map(D=>$.jsx(cy,{isOwnMessage:D%3===0},D))}):n&&!e.length?$.jsx(J.Box,{display:"flex",justifyContent:"center",alignItems:"center",flex:1,p:2,children:$.jsxs(J.Alert,{severity:"error",children:[$.jsx("strong",{children:"Failed to load messages"}),$.jsx("br",{}),n.message]})}):e.length===0?$.jsx(J.Box,{display:"flex",justifyContent:"center",alignItems:"center",flex:1,children:$.jsx(J.Typography,{variant:"body2",color:"text.secondary",children:"No messages yet. Start the conversation!"})}):$.jsxs(J.Box,{ref:p,flex:1,overflow:"auto",p:2,display:"flex",flexDirection:"column",onScroll:E,children:[s&&c&&$.jsx(ly,{hasMore:s,loading:a,onLoadMore:c}),e.map((D,z)=>{const K=D.sender,G=D.sender===t,T=S.get(K),N=z>0?e[z-1]:null,H=z<e.length-1?e[z+1]:null,te=!N||!Uu(N,D),pe=!H||!Uu(D,H);return $.jsx(uy,{message:D,isOwnMessage:G,senderName:T,showSenderName:te,isFirstInGroup:te,isLastInGroup:pe},D.id)}),$.jsx("div",{ref:h})]})},hy=({onSend:e,sending:t=!1,placeholder:r="Type a message...",disabled:n=!1})=>{const[i,s]=X.useState(""),a=X.useRef(null),c=()=>{const p=i.trim();p&&!t&&!n&&(e(p),s(""),setTimeout(()=>{var m,g;(g=(m=a.current)==null?void 0:m.querySelector("textarea"))==null||g.focus()},300))},h=p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),c())};return $.jsxs(J.Box,{display:"flex",gap:1,p:2,borderTop:1,borderColor:"divider",children:[$.jsx(J.TextField,{ref:a,fullWidth:!0,multiline:!0,maxRows:4,value:i,onChange:p=>s(p.target.value),onKeyDown:h,placeholder:r,disabled:n||t,variant:"outlined",size:"small"}),$.jsx(J.IconButton,{color:"primary",onClick:c,disabled:!i.trim()||t||n,size:"large",children:t?$.jsx(J.CircularProgress,{size:24}):$.jsx(Cx,{})})]})};function py({conversation:e,limit:t=50}){const r=go(e),[n,i]=X.useState(!1),[s,a]=X.useState(!1),[c,h]=X.useState(),p=vn(()=>ft.messages.where("conversationId").equals(r).sortBy("created_at"),[r])||[],m=vn(()=>ft.msgCursor.where("id").equals(r).first(),[r]);Mc(async()=>{var O;const _={limit:t};p.length&&(_.cursorType="after",_.cursorDatetime=(O=p[p.length-1])==null?void 0:O.created_at),i(!0),await Id(e,_).catch(h),i(!1),await ft.summaries.update(r,{unread_count:0})},[e,t]),console.log("mw",p.length);const g=X.useCallback(async()=>{if(!(!m||s||n)){a(!0);try{const _={limit:t};if(!(m!=null&&m.datetime))return;_.cursorType="before",_.cursorDatetime=m.datetime,await Id(e,_)}catch(_){console.error("[useMessages] Failed to load more:",_)}a(!1)}},[m,t,e,s,n]);return{messages:p,cursor:m,loading:n,error:c,loadMore:g,loadingMore:s}}const my=({conversation:e,user:t,isConnected:r,onBack:n})=>{const i=Ut(),{messages:s,cursor:a,loading:c,error:h,loadMore:p,loadingMore:m}=py({conversation:e}),g=vn(async()=>e.type==="group"?await ft.groups.get(e.id):null,[e.id,e.type]),_=(t==null?void 0:t.role)==="admin",O=(g==null?void 0:g.is_member)??!0,S=_&&e.type==="group"&&!O,v=e.type==="group"&&!O,[E,D]=X.useState(!1),[z,K]=X.useState(!1),G=async w=>{if(e.type==="group"){D(!0);try{await i.joinGroup(t.org,e.id,w),K(!0),await oy(t.org),await Fc({}),setTimeout(()=>K(!1),3e3)}catch(Z){te(eo(Z,"Failed to join group"))}D(!1)}},[T,N]=X.useState(!1),[H,te]=X.useState(null),[pe,ke]=X.useState(!1),oe=async w=>{if(!w.trim())return;N(!0),te(null),ke(!0);const Z=`temp-${Date.now()}-${Math.random()}`,ee={id:Z,sender:t==null?void 0:t.id,receiver:e.type==="dm"?e.id:null,group:e.type==="group"?e.id:null,content:w,created_at:new Date().toISOString(),conversationId:go(e)};try{await ft.messages.put(ee),await(e.type==="group"?i.sendGroupMessage:i.sendDM).bind(i)(e.id,w),await ft.messages.delete(Z)}catch(ve){te(eo(ve,"Failed to send message"))}N(!1),setTimeout(()=>ke(!1),100)};return $.jsxs(J.Box,{display:"flex",flexDirection:"column",height:"100%",children:[$.jsx(ay,{displayName:e.name||"Chat",type:e.type,isConnected:r,onBack:n,showJoinButton:S,onJoin:G,joining:E}),$.jsx(J.Snackbar,{open:z,autoHideDuration:3e3,onClose:()=>K(!1),message:"Successfully joined group"}),H&&$.jsx(J.Alert,{severity:"error",onClose:()=>te(null),children:H.message}),$.jsx(dy,{messages:s,currentUserId:(t==null?void 0:t.id)||0,loading:c,error:h,autoScroll:!0,hasMore:!!(a!=null&&a.datetime),loadingMore:m,onLoadMore:p,forceScrollToBottom:pe}),v?$.jsx(J.Alert,{severity:"warning",sx:{m:2},children:"You must be a group member to send messages"}):$.jsx(hy,{onSend:oe,sending:T})]})};class ec extends X.Component{constructor(r){super(r);Ar(this,"handleReset",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var i,s;console.error("ErrorBoundary caught an error:",r,n),(s=(i=this.props).onError)==null||s.call(i,r,n)}render(){var r;return this.state.hasError?this.props.fallback?this.props.fallback:$.jsxs(J.Box,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%",p:3,children:[$.jsxs(J.Alert,{severity:"error",sx:{mb:2,maxWidth:500},children:[$.jsx(J.Typography,{variant:"h6",gutterBottom:!0,children:"Something went wrong"}),$.jsx(J.Typography,{variant:"body2",color:"text.secondary",children:((r=this.state.error)==null?void 0:r.message)||"An unexpected error occurred"})]}),$.jsx(J.Button,{variant:"contained",startIcon:$.jsx(Tx,{}),onClick:this.handleReset,children:"Try Again"})]}):this.props.children}}function yy({onMessage:e,onConnect:t,onDisconnect:r,onError:n}={}){const[i,s]=X.useState(!1),a=X.useCallback(m=>{e==null||e(m)},[e]),c=X.useCallback(()=>{s(!0),t==null||t()},[t]),h=X.useCallback(()=>{s(!1),r==null||r()},[r]),p=X.useCallback(m=>{n==null||n(m)},[n]);return X.useEffect(()=>{if(vc())try{const m=Ut();return s(m.isConnected()),m.on("message",a),m.on("open",c),m.on("close",h),m.on("error",p),()=>{m.off("message",a),m.off("open",c),m.off("close",h),m.off("error",p)}}catch(m){console.error("Failed to setup WebSocket listeners:",m)}},[a,c,h,p]),{isConnected:i}}const vC=({initialConversation:e})=>{const[t,r]=X.useState(e??null),[n,i]=X.useState(),[s,a]=X.useState(!0),c=X.useCallback(g=>()=>a(g),[]),h=Ut();Mc(async()=>{const g=await h.getMe();i(g),ft.users.put(g)},[]),yy({onError:c(!1),onConnect:c(!0),onDisconnect:c(!1)});const p=g=>{r(g),Qu(go(g))},m=()=>{r(null),Qu(null)};return $.jsxs(J.Box,{display:"flex",height:"100%",overflow:"hidden",children:[$.jsx(J.Box,{sx:{width:{xs:"100%",sm:"100%",md:"320px"},flexShrink:0,border:"0px solid",borderRightWidth:{xs:0,md:1},borderColor:"divider",overflow:"hidden",display:{xs:t?"none":"flex",sm:t?"none":"flex",md:"flex"},flexDirection:"column"},children:$.jsx(ec,{children:$.jsx(sy,{currentUser:n,selectedConversation:t,onConversationSelect:p})})}),$.jsx(J.Box,{sx:{flex:1,overflow:"hidden",display:{xs:t?"flex":"none",sm:t?"flex":"none",md:"flex"},flexDirection:"column"},children:t?$.jsx(ec,{children:$.jsx(my,{conversation:t,user:n,isConnected:s,onBack:m})}):$.jsx(J.Box,{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",color:"text.secondary",children:"Select a conversation to start chatting"})})]})},_C=({count:e,children:t,max:r=99})=>$.jsx(J.Badge,{badgeContent:e,color:"error",max:r,overlap:"rectangular",sx:{"& .MuiBadge-badge":{right:8,top:"50%",transform:"translateY(-50%)"}},children:t});function wC(){return vn(()=>ft.summaries.toArray().then(t=>t.reduce((r,n)=>r+n.unread_count,0)),[],void 0)}const xC={SUMMARIES:300*1e3,USER:3600*1e3,MESSAGES:1/0},SC=()=>typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches,TC={mode:"dark",background:{paper:"#3d3d43",default:"#333338"},text:{primary:"#eee",secondary:"#aaa"}},EC={mode:"light",background:{default:"#f5f5f5",paper:"#ffff"}},gy=e=>{const t=SC(),n=(e||(t?"dark":"light"))==="dark";return Sm({palette:{...n?TC:EC,primary:{main:"#E91E63",light:"#F48FB1",dark:"#AD1457",contrastText:"#fff"},secondary:{main:"#e4e6eb",light:"#f0f2f5",dark:"#b0b3b8",contrastText:"rgba(0, 0, 0, 0.87)"},error:{main:"#d32f2f",light:"#ef5350",dark:"#c62828",contrastText:"#fff"},warning:{main:"#ed6c02",light:"#ff9800",dark:"#e65100",contrastText:"#fff"},info:{main:"#0288d1",light:"#03a9f4",dark:"#01579b",contrastText:"#fff"},success:{main:"#2e7d32",light:"#4caf50",dark:"#1b5e20",contrastText:"#fff"}},typography:{fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),fontSize:14,h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500},body1:{fontSize:"0.9375rem",lineHeight:1.4},body2:{fontSize:"0.8125rem",lineHeight:1.4}},shape:{borderRadius:12},components:{MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500,borderRadius:20}}},MuiIconButton:{styleOverrides:{root:{borderRadius:"50%"}}},MuiPaper:{styleOverrides:{root:{backgroundImage:"none"},rounded:{borderRadius:12}}},MuiBadge:{styleOverrides:{badge:{fontSize:"0.6875rem",height:18,minWidth:18,borderRadius:9,fontWeight:600}}},MuiCssBaseline:{styleOverrides:{body:{"*::-webkit-scrollbar":{width:"8px",height:"8px"},"*::-webkit-scrollbar-track":{background:"undo",borderRadius:"4px"},"*::-webkit-scrollbar-thumb":{background:"undo",borderRadius:"4px","&:hover":{background:"undo"}},scrollbarWidth:"thin",scrollbarColor:n?"#6a6a6e #333338":"#c1c1c1 #f5f5f5"}}}}})},CC=gy();exports.CACHE_TTL=xC;exports.ChatApp=M0;exports.ChatContainer=vC;exports.ChatHeader=ay;exports.ChatWindow=my;exports.ConversationItem=Cm;exports.ConversationItemSkeleton=Om;exports.ConversationList=sy;exports.CreateGroupDialog=ny;exports.ErrorBoundary=ec;exports.LoadMoreTrigger=ly;exports.MessageBubble=uy;exports.MessageInput=hy;exports.MessageList=dy;exports.MessageSkeleton=cy;exports.UnreadBadge=_C;exports.db=ft;exports.disconnectSDK=tm;exports.getSDK=Ut;exports.getTheme=gy;exports.groupMessages=P0;exports.initSDK=em;exports.isSDKInitialized=vc;exports.shouldGroupMessages=Uu;exports.theme=CC;exports.useMessages=py;exports.useSenderNames=fy;exports.useUnreadCount=wC;exports.useWebSocket=yy;
27
+ export default theme;`}function fr(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var pr=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function mr(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:sn(t,pr(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${fr(n)})`:un(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${fr(n)})`:ln(t,n)}})}function hr(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,colorSpace:l,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(process.env.NODE_ENV===`production`?f(20):"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://v7.mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.");let d=qn({...a,colorSpace:l}),p=Ot(e),m=j(p,{mixins:Yn(p.breakpoints,r),palette:d,shadows:rr.slice(),typography:$n(d,s),transitions:cr(o),zIndex:{...lr}});if(m=j(m,u),m=t.reduce((e,t)=>j(e,t),m),process.env.NODE_ENV!==`production`){let e=[`active`,`checked`,`completed`,`disabled`,`error`,`expanded`,`focused`,`focusVisible`,`required`,`selected`],t=(t,n)=>{let r;for(r in t){let i=t[r];if(e.includes(r)&&Object.keys(i).length>0){if(process.env.NODE_ENV!==`production`){let e=At(``,r);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${r}\` internal state.`,`You can not override it like this: `,JSON.stringify(t,null,2),``,`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:i}},null,2),``,`https://mui.com/r/state-classes-guide`].join(`
28
+ `))}t[r]={}}}};Object.keys(m.components).forEach(e=>{let n=m.components[e].styleOverrides;n&&e.startsWith(`Mui`)&&t(n,e)})}return m.unstable_sxConfig={...Qe,...u?.unstable_sxConfig},m.unstable_sx=function(e){return nt({sx:e,theme:this})},m.toRuntimeSource=dr,mr(m),m}function gr(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var _r=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=gr(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function vr(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function yr(e){return e===`dark`?_r:[]}function br(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=qn({...t,colorSpace:i});return{palette:o,opacity:{...vr(o.mode),...n},overlays:r||yr(o.mode),...a}}function xr(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Sr=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],Cr=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return Sr(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function wr(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function G(e,t,n){!e[t]&&n&&(e[t]=n)}function Tr(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:rn(e)}function Er(e,t){`${t}Channel`in e||(e[`${t}Channel`]=tn(Tr(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
29
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Dr(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var K=e=>{try{return e()}catch{}},Or=(e=`mui`)=>yn(e);function kr(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=br({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=hr({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...vr(a),...n?.opacity},overlays:n?.overlays||yr(a)},s}function Ar(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=xr,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],p=r||(n.light&&d!==`light`?`light`:d),m=Or(a),{[p]:h,light:g,dark:_,...v}=n,y={...v},b=h;if((p===`dark`&&!(`dark`in n)||p===`light`&&!(`light`in n))&&(b=!0),!b)throw Error(process.env.NODE_ENV===`production`?f(21,p):`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`);let x;o&&(x=`oklch`);let S=kr(x,y,b,u,p);g&&!y.light&&kr(x,y,g,void 0,`light`),_&&!y.dark&&kr(x,y,_,void 0,`dark`);let C={defaultColorScheme:p,...S,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:m,colorSchemes:y,font:{...Jn(S.typography),...S.font},spacing:Dr(u.spacing)};Object.keys(C.colorSchemes).forEach(e=>{let t=C.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return m(e,t[r][i])};t.mode===`light`&&(G(t.common,`background`,`#fff`),G(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(G(t.common,`background`,`#000`),G(t.common,`onBackground`,`#fff`));function r(e,t,n){if(x){let r;return e===cn&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===H&&(r=`#000 ${(n*100).toFixed(0)}%`),e===U&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${x}, ${t}, ${r})`}return e(t,n)}if(wr(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){G(t.Alert,`errorColor`,r(H,o?m(`palette-error-light`):t.error.light,.6)),G(t.Alert,`infoColor`,r(H,o?m(`palette-info-light`):t.info.light,.6)),G(t.Alert,`successColor`,r(H,o?m(`palette-success-light`):t.success.light,.6)),G(t.Alert,`warningColor`,r(H,o?m(`palette-warning-light`):t.warning.light,.6)),G(t.Alert,`errorFilledBg`,n(`palette-error-main`)),G(t.Alert,`infoFilledBg`,n(`palette-info-main`)),G(t.Alert,`successFilledBg`,n(`palette-success-main`)),G(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),G(t.Alert,`errorFilledColor`,K(()=>t.getContrastText(t.error.main))),G(t.Alert,`infoFilledColor`,K(()=>t.getContrastText(t.info.main))),G(t.Alert,`successFilledColor`,K(()=>t.getContrastText(t.success.main))),G(t.Alert,`warningFilledColor`,K(()=>t.getContrastText(t.warning.main))),G(t.Alert,`errorStandardBg`,r(U,o?m(`palette-error-light`):t.error.light,.9)),G(t.Alert,`infoStandardBg`,r(U,o?m(`palette-info-light`):t.info.light,.9)),G(t.Alert,`successStandardBg`,r(U,o?m(`palette-success-light`):t.success.light,.9)),G(t.Alert,`warningStandardBg`,r(U,o?m(`palette-warning-light`):t.warning.light,.9)),G(t.Alert,`errorIconColor`,n(`palette-error-main`)),G(t.Alert,`infoIconColor`,n(`palette-info-main`)),G(t.Alert,`successIconColor`,n(`palette-success-main`)),G(t.Alert,`warningIconColor`,n(`palette-warning-main`)),G(t.AppBar,`defaultBg`,n(`palette-grey-100`)),G(t.Avatar,`defaultBg`,n(`palette-grey-400`)),G(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),G(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),G(t.Chip,`defaultBorder`,n(`palette-grey-400`)),G(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),G(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),G(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),G(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),G(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),G(t.LinearProgress,`primaryBg`,r(U,o?m(`palette-primary-main`):t.primary.main,.62)),G(t.LinearProgress,`secondaryBg`,r(U,o?m(`palette-secondary-main`):t.secondary.main,.62)),G(t.LinearProgress,`errorBg`,r(U,o?m(`palette-error-main`):t.error.main,.62)),G(t.LinearProgress,`infoBg`,r(U,o?m(`palette-info-main`):t.info.main,.62)),G(t.LinearProgress,`successBg`,r(U,o?m(`palette-success-main`):t.success.main,.62)),G(t.LinearProgress,`warningBg`,r(U,o?m(`palette-warning-light`):t.warning.main,.62)),G(t.Skeleton,`bg`,x?r(cn,o?m(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),G(t.Slider,`primaryTrack`,r(U,o?m(`palette-primary-main`):t.primary.main,.62)),G(t.Slider,`secondaryTrack`,r(U,o?m(`palette-secondary-main`):t.secondary.main,.62)),G(t.Slider,`errorTrack`,r(U,o?m(`palette-error-main`):t.error.main,.62)),G(t.Slider,`infoTrack`,r(U,o?m(`palette-info-main`):t.info.main,.62)),G(t.Slider,`successTrack`,r(U,o?m(`palette-success-main`):t.success.main,.62)),G(t.Slider,`warningTrack`,r(U,o?m(`palette-warning-main`):t.warning.main,.62));let e=x?r(H,o?m(`palette-background-default`):t.background.default,.6825):fn(t.background.default,.8);G(t.SnackbarContent,`bg`,e),G(t.SnackbarContent,`color`,K(()=>x?Ln.text.primary:t.getContrastText(e))),G(t.SpeedDialAction,`fabHoverBg`,fn(t.background.paper,.15)),G(t.StepConnector,`border`,n(`palette-grey-400`)),G(t.StepContent,`border`,n(`palette-grey-400`)),G(t.Switch,`defaultColor`,n(`palette-common-white`)),G(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),G(t.Switch,`primaryDisabledColor`,r(U,o?m(`palette-primary-main`):t.primary.main,.62)),G(t.Switch,`secondaryDisabledColor`,r(U,o?m(`palette-secondary-main`):t.secondary.main,.62)),G(t.Switch,`errorDisabledColor`,r(U,o?m(`palette-error-main`):t.error.main,.62)),G(t.Switch,`infoDisabledColor`,r(U,o?m(`palette-info-main`):t.info.main,.62)),G(t.Switch,`successDisabledColor`,r(U,o?m(`palette-success-main`):t.success.main,.62)),G(t.Switch,`warningDisabledColor`,r(U,o?m(`palette-warning-main`):t.warning.main,.62)),G(t.TableCell,`border`,r(U,cn(o?m(`palette-divider`):t.divider,1),.88)),G(t.Tooltip,`bg`,r(cn,o?m(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){G(t.Alert,`errorColor`,r(U,o?m(`palette-error-light`):t.error.light,.6)),G(t.Alert,`infoColor`,r(U,o?m(`palette-info-light`):t.info.light,.6)),G(t.Alert,`successColor`,r(U,o?m(`palette-success-light`):t.success.light,.6)),G(t.Alert,`warningColor`,r(U,o?m(`palette-warning-light`):t.warning.light,.6)),G(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),G(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),G(t.Alert,`successFilledBg`,n(`palette-success-dark`)),G(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),G(t.Alert,`errorFilledColor`,K(()=>t.getContrastText(t.error.dark))),G(t.Alert,`infoFilledColor`,K(()=>t.getContrastText(t.info.dark))),G(t.Alert,`successFilledColor`,K(()=>t.getContrastText(t.success.dark))),G(t.Alert,`warningFilledColor`,K(()=>t.getContrastText(t.warning.dark))),G(t.Alert,`errorStandardBg`,r(H,o?m(`palette-error-light`):t.error.light,.9)),G(t.Alert,`infoStandardBg`,r(H,o?m(`palette-info-light`):t.info.light,.9)),G(t.Alert,`successStandardBg`,r(H,o?m(`palette-success-light`):t.success.light,.9)),G(t.Alert,`warningStandardBg`,r(H,o?m(`palette-warning-light`):t.warning.light,.9)),G(t.Alert,`errorIconColor`,n(`palette-error-main`)),G(t.Alert,`infoIconColor`,n(`palette-info-main`)),G(t.Alert,`successIconColor`,n(`palette-success-main`)),G(t.Alert,`warningIconColor`,n(`palette-warning-main`)),G(t.AppBar,`defaultBg`,n(`palette-grey-900`)),G(t.AppBar,`darkBg`,n(`palette-background-paper`)),G(t.AppBar,`darkColor`,n(`palette-text-primary`)),G(t.Avatar,`defaultBg`,n(`palette-grey-600`)),G(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),G(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),G(t.Chip,`defaultBorder`,n(`palette-grey-700`)),G(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),G(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),G(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),G(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),G(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),G(t.LinearProgress,`primaryBg`,r(H,o?m(`palette-primary-main`):t.primary.main,.5)),G(t.LinearProgress,`secondaryBg`,r(H,o?m(`palette-secondary-main`):t.secondary.main,.5)),G(t.LinearProgress,`errorBg`,r(H,o?m(`palette-error-main`):t.error.main,.5)),G(t.LinearProgress,`infoBg`,r(H,o?m(`palette-info-main`):t.info.main,.5)),G(t.LinearProgress,`successBg`,r(H,o?m(`palette-success-main`):t.success.main,.5)),G(t.LinearProgress,`warningBg`,r(H,o?m(`palette-warning-main`):t.warning.main,.5)),G(t.Skeleton,`bg`,x?r(cn,o?m(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),G(t.Slider,`primaryTrack`,r(H,o?m(`palette-primary-main`):t.primary.main,.5)),G(t.Slider,`secondaryTrack`,r(H,o?m(`palette-secondary-main`):t.secondary.main,.5)),G(t.Slider,`errorTrack`,r(H,o?m(`palette-error-main`):t.error.main,.5)),G(t.Slider,`infoTrack`,r(H,o?m(`palette-info-main`):t.info.main,.5)),G(t.Slider,`successTrack`,r(H,o?m(`palette-success-main`):t.success.main,.5)),G(t.Slider,`warningTrack`,r(H,o?m(`palette-warning-light`):t.warning.main,.5));let e=x?r(U,o?m(`palette-background-default`):t.background.default,.985):fn(t.background.default,.98);G(t.SnackbarContent,`bg`,e),G(t.SnackbarContent,`color`,K(()=>x?Fn.text.primary:t.getContrastText(e))),G(t.SpeedDialAction,`fabHoverBg`,fn(t.background.paper,.15)),G(t.StepConnector,`border`,n(`palette-grey-600`)),G(t.StepContent,`border`,n(`palette-grey-600`)),G(t.Switch,`defaultColor`,n(`palette-grey-300`)),G(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),G(t.Switch,`primaryDisabledColor`,r(H,o?m(`palette-primary-main`):t.primary.main,.55)),G(t.Switch,`secondaryDisabledColor`,r(H,o?m(`palette-secondary-main`):t.secondary.main,.55)),G(t.Switch,`errorDisabledColor`,r(H,o?m(`palette-error-main`):t.error.main,.55)),G(t.Switch,`infoDisabledColor`,r(H,o?m(`palette-info-main`):t.info.main,.55)),G(t.Switch,`successDisabledColor`,r(H,o?m(`palette-success-main`):t.success.main,.55)),G(t.Switch,`warningDisabledColor`,r(H,o?m(`palette-warning-light`):t.warning.main,.55)),G(t.TableCell,`border`,r(H,cn(o?m(`palette-divider`):t.divider,1),.68)),G(t.Tooltip,`bg`,r(cn,o?m(`palette-grey-700`):t.grey[700],.92))}o||(Er(t.background,`default`),Er(t.background,`paper`),Er(t.common,`background`),Er(t.common,`onBackground`),Er(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&G(t[e],`mainChannel`,tn(Tr(n.main))),n.light&&G(t[e],`lightChannel`,tn(Tr(n.light))),n.dark&&G(t[e],`darkChannel`,tn(Tr(n.dark))),n.contrastText&&G(t[e],`contrastTextChannel`,tn(Tr(n.contrastText))),e===`text`&&(Er(t[e],`primary`),Er(t[e],`secondary`)),e===`action`&&(n.active&&Er(t[e],`active`),n.selected&&Er(t[e],`selected`)))})}),C=t.reduce((e,t)=>j(e,t),C);let w={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:Cr(C),enableContrastVars:o},{vars:T,generateThemeVars:E,generateStyleSheets:ee}=wn(C,w);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([e,t])=>{C[e]=t}),C.generateThemeVars=E,C.generateStyleSheets=ee,C.generateSpacing=function(){return Et(u.spacing,Se(this))},C.getColorSchemeSelector=Tn(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...Qe,...u?.unstable_sxConfig},C.unstable_sx=function(e){return nt({sx:e,theme:this})},C.toRuntimeSource=dr,C}function jr(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:qn({...n===!0?{}:n.palette,mode:t})})}function Mr(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return hr(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=hr({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},jr(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},jr(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),Ar({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var Nr=Mr(),Pr=`$$material`;function Fr(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var Ir=Ut({themeId:Pr,defaultTheme:Nr,rootShouldForwardProp:e=>Fr(e)&&e!==`classes`}),Lr=vn;function Rr(e){return(0,i.jsx)(mn,{...e})}process.env.NODE_ENV!==`production`&&(Rr.propTypes={children:M.default.node,value:M.default.object.isRequired});function zr(e){return gn(e)}function Br(e){return At(`MuiSvgIcon`,e)}jt(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var Vr=e=>{let{color:t,fontSize:n,classes:r}=e;return ee({root:[`root`,t!==`inherit`&&`color${m(t)}`,`fontSize${m(n)}`]},Br,r)},Hr=Ir(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${m(n.color)}`],t[`fontSize${m(n.fontSize)}`]]}})(Lr(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),Ur=t.forwardRef(function(e,n){let r=zr({props:e,name:`MuiSvgIcon`}),{children:a,className:o,color:s=`inherit`,component:c=`svg`,fontSize:l=`medium`,htmlColor:u,inheritViewBox:d=!1,titleAccess:f,viewBox:p=`0 0 24 24`,...m}=r,h=t.isValidElement(a)&&a.type===`svg`,g={...r,color:s,component:c,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:p,hasSvgAsChild:h},_={};return d||(_.viewBox=p),(0,i.jsxs)(Hr,{as:c,className:E(Vr(g).root,o),focusable:`false`,color:u,"aria-hidden":f?void 0:!0,role:f?`img`:void 0,ref:n,..._,...m,...h&&a.props,ownerState:g,children:[h?a.props.children:a,f?(0,i.jsx)(`title`,{children:f}):null]})});process.env.NODE_ENV!==`production`&&(Ur.propTypes={children:M.default.node,classes:M.default.object,className:M.default.string,color:M.default.oneOfType([M.default.oneOf([`inherit`,`action`,`disabled`,`primary`,`secondary`,`error`,`info`,`success`,`warning`]),M.default.string]),component:M.default.elementType,fontSize:M.default.oneOfType([M.default.oneOf([`inherit`,`large`,`medium`,`small`]),M.default.string]),htmlColor:M.default.string,inheritViewBox:M.default.bool,shapeRendering:M.default.string,sx:M.default.oneOfType([M.default.arrayOf(M.default.oneOfType([M.default.func,M.default.object,M.default.bool])),M.default.func,M.default.object]),titleAccess:M.default.string,viewBox:M.default.string}),Ur.muiName=`SvgIcon`;function q(e,n){function r(t,r){return(0,i.jsx)(Ur,{"data-testid":process.env.NODE_ENV===`production`?void 0:`${n}Icon`,ref:r,...t,children:e})}return process.env.NODE_ENV!==`production`&&(r.displayName=`${n}Icon`),r.muiName=Ur.muiName,t.memo(t.forwardRef(r))}var Wr=q((0,i.jsx)(`path`,{d:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z`}),`Add`),Gr=q((0,i.jsx)(`path`,{d:`M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z`}),`ArrowBack`),Kr=q((0,i.jsx)(`path`,{d:`m7 10 5 5 5-5z`}),`ArrowDropDown`),qr=q((0,i.jsx)(`path`,{d:`M7.5 5.6 10 7 8.6 4.5 10 2 7.5 3.4 5 2l1.4 2.5L5 7zm12 9.8L17 14l1.4 2.5L17 19l2.5-1.4L22 19l-1.4-2.5L22 14zM22 2l-2.5 1.4L17 2l1.4 2.5L17 7l2.5-1.4L22 7l-1.4-2.5zm-7.63 5.29a.996.996 0 0 0-1.41 0L1.29 18.96c-.39.39-.39 1.02 0 1.41l2.34 2.34c.39.39 1.02.39 1.41 0L16.7 11.05c.39-.39.39-1.02 0-1.41zm-1.03 5.49-2.12-2.12 2.44-2.44 2.12 2.12z`}),`AutoFixHigh`),Jr=q((0,i.jsx)(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Close`),Yr=q((0,i.jsx)(`path`,{d:`M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z`}),`Done`),Xr=q((0,i.jsx)(`path`,{d:`M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8`}),`ErrorOutline`),Zr=q((0,i.jsx)(`path`,{d:`M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5`}),`Group`),Qr=q((0,i.jsx)(`path`,{d:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4`}),`Person`),$r=q((0,i.jsx)(`path`,{d:`M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4`}),`PersonAdd`),ei=q((0,i.jsx)(`path`,{d:`M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z`}),`Refresh`),ti=q([(0,i.jsx)(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8`},`0`),(0,i.jsx)(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`},`1`)],`Schedule`),ni=q((0,i.jsx)(`path`,{d:`M2.01 21 23 12 2.01 3 2 10l15 2-15 2z`}),`Send`),ri=q((0,i.jsx)(`path`,{d:`M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3`}),`Visibility`),ii=q((0,i.jsx)(`path`,{d:`M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z`}),`VisibilityOff`),ai=q((0,i.jsx)(`path`,{d:`M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0`}),`WifiOff`);function oi(e){let t=new Date(e),n=new Date().getTime()-t.getTime(),r=Math.floor(n/6e4),i=Math.floor(n/36e5),a=Math.floor(n/864e5);return r<1?`now`:r<60?`${r}m`:i<24?`${i}h`:a<7?`${a}d`:t.toLocaleDateString(void 0,{month:`short`,day:`numeric`})}var si=n.default.memo(({conversation:e,displayName:t,selected:n,onClick:a,currentUser:o})=>{let s=!!e.group,c=e.unread_count,l=o?.role===`admin`;return(0,i.jsx)(r.ListItem,{disablePadding:!0,children:(0,i.jsxs)(r.ListItemButton,{selected:n,onClick:a,sx:{"&.Mui-selected":{backgroundColor:`action.selected`,"&:hover":{backgroundColor:`action.selected`}}},children:[(0,i.jsx)(r.ListItemAvatar,{children:(0,i.jsx)(r.Badge,{badgeContent:c,color:`primary`,overlap:`circular`,invisible:c===0,children:(0,i.jsx)(r.Avatar,{sx:{bgcolor:s?`primary.main`:`secondary.main`},children:s?(0,i.jsx)(Zr,{}):(0,i.jsx)(Qr,{})})})}),(0,i.jsx)(r.ListItemText,{primary:(0,i.jsxs)(r.Box,{display:`flex`,justifyContent:`space-between`,alignItems:`center`,children:[(0,i.jsx)(r.Typography,{variant:`subtitle2`,noWrap:!0,sx:{fontWeight:c>0?600:400,flex:1},children:t}),(0,i.jsx)(r.Typography,{variant:`caption`,color:`text.secondary`,sx:{ml:1,flexShrink:0},children:oi(e.last_message_at)})]}),secondary:(0,i.jsx)(r.Typography,{variant:`body2`,color:`text.secondary`,noWrap:!0,sx:{fontWeight:c>0?500:400},children:e.message_count===0?l&&s?`View group`:`No messages yet`:`${e.message_count} message${e.message_count===1?``:`s`}`})})]})})}),ci=()=>(0,i.jsxs)(r.ListItem,{children:[(0,i.jsx)(r.ListItemAvatar,{children:(0,i.jsx)(r.Skeleton,{variant:`circular`,width:40,height:40})}),(0,i.jsx)(r.ListItemText,{primary:(0,i.jsxs)(r.Box,{display:`flex`,justifyContent:`space-between`,children:[(0,i.jsx)(r.Skeleton,{variant:`text`,width:`60%`}),(0,i.jsx)(r.Skeleton,{variant:`text`,width:`15%`})]}),secondary:(0,i.jsx)(r.Skeleton,{variant:`text`,width:`80%`})})]}),li=function(e){return ui(e)&&!di(e)};function ui(e){return!!e&&typeof e==`object`}function di(e){var t=Object.prototype.toString.call(e);return t===`[object RegExp]`||t===`[object Date]`||pi(e)}var fi=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.element`):60103;function pi(e){return e.$$typeof===fi}function mi(e){return Array.isArray(e)?[]:{}}function hi(e,t){return t.clone!==!1&&t.isMergeableObject(e)?vi(mi(e),e,t):e}function gi(e,t,n){return e.concat(t).map(function(e){return hi(e,n)})}function _i(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){r[t]=hi(e[t],n)}),Object.keys(t).forEach(function(i){!n.isMergeableObject(t[i])||!e[i]?r[i]=hi(t[i],n):r[i]=vi(e[i],t[i],n)}),r}function vi(e,t,n){n||={},n.arrayMerge=n.arrayMerge||gi,n.isMergeableObject=n.isMergeableObject||li;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):_i(e,t,n):hi(t,n)}vi.all=function(e,t){if(!Array.isArray(e))throw Error(`first argument should be an array`);return e.reduce(function(e,n){return vi(e,n,t)},{})};var yi=vi,bi=typeof global==`object`&&global&&global.Object===Object&&global,xi=typeof self==`object`&&self&&self.Object===Object&&self,Si=bi||xi||Function(`return this`)(),Ci=Si.Symbol,wi=Object.prototype,Ti=wi.hasOwnProperty,Ei=wi.toString,Di=Ci?Ci.toStringTag:void 0;function Oi(e){var t=Ti.call(e,Di),n=e[Di];try{e[Di]=void 0;var r=!0}catch{}var i=Ei.call(e);return r&&(t?e[Di]=n:delete e[Di]),i}var ki=Object.prototype.toString;function Ai(e){return ki.call(e)}var ji=`[object Null]`,Mi=`[object Undefined]`,Ni=Ci?Ci.toStringTag:void 0;function Pi(e){return e==null?e===void 0?Mi:ji:Ni&&Ni in Object(e)?Oi(e):Ai(e)}function Fi(e,t){return function(n){return e(t(n))}}var Ii=Fi(Object.getPrototypeOf,Object);function Li(e){return typeof e==`object`&&!!e}var Ri=`[object Object]`,zi=Function.prototype,Bi=Object.prototype,Vi=zi.toString,Hi=Bi.hasOwnProperty,Ui=Vi.call(Object);function Wi(e){if(!Li(e)||Pi(e)!=Ri)return!1;var t=Ii(e);if(t===null)return!0;var n=Hi.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&Vi.call(n)==Ui}function Gi(){this.__data__=[],this.size=0}function Ki(e,t){return e===t||e!==e&&t!==t}function qi(e,t){for(var n=e.length;n--;)if(Ki(e[n][0],t))return n;return-1}var Ji=Array.prototype.splice;function Yi(e){var t=this.__data__,n=qi(t,e);return n<0?!1:(n==t.length-1?t.pop():Ji.call(t,n,1),--this.size,!0)}function Xi(e){var t=this.__data__,n=qi(t,e);return n<0?void 0:t[n][1]}function Zi(e){return qi(this.__data__,e)>-1}function Qi(e,t){var n=this.__data__,r=qi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function $i(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}$i.prototype.clear=Gi,$i.prototype.delete=Yi,$i.prototype.get=Xi,$i.prototype.has=Zi,$i.prototype.set=Qi;function ea(){this.__data__=new $i,this.size=0}function ta(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function na(e){return this.__data__.get(e)}function ra(e){return this.__data__.has(e)}function ia(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var aa=`[object AsyncFunction]`,oa=`[object Function]`,sa=`[object GeneratorFunction]`,ca=`[object Proxy]`;function la(e){if(!ia(e))return!1;var t=Pi(e);return t==oa||t==sa||t==aa||t==ca}var ua=Si[`__core-js_shared__`],da=function(){var e=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function fa(e){return!!da&&da in e}var pa=Function.prototype.toString;function ma(e){if(e!=null){try{return pa.call(e)}catch{}try{return e+``}catch{}}return``}var ha=/[\\^$.*+?()[\]{}|]/g,ga=/^\[object .+?Constructor\]$/,_a=Function.prototype,va=Object.prototype,ya=_a.toString,ba=va.hasOwnProperty,xa=RegExp(`^`+ya.call(ba).replace(ha,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Sa(e){return!ia(e)||fa(e)?!1:(la(e)?xa:ga).test(ma(e))}function Ca(e,t){return e?.[t]}function wa(e,t){var n=Ca(e,t);return Sa(n)?n:void 0}var Ta=wa(Si,`Map`),Ea=wa(Object,`create`);function Da(){this.__data__=Ea?Ea(null):{},this.size=0}function Oa(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var ka=`__lodash_hash_undefined__`,Aa=Object.prototype.hasOwnProperty;function ja(e){var t=this.__data__;if(Ea){var n=t[e];return n===ka?void 0:n}return Aa.call(t,e)?t[e]:void 0}var Ma=Object.prototype.hasOwnProperty;function Na(e){var t=this.__data__;return Ea?t[e]!==void 0:Ma.call(t,e)}var Pa=`__lodash_hash_undefined__`;function Fa(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Ea&&t===void 0?Pa:t,this}function Ia(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ia.prototype.clear=Da,Ia.prototype.delete=Oa,Ia.prototype.get=ja,Ia.prototype.has=Na,Ia.prototype.set=Fa;function La(){this.size=0,this.__data__={hash:new Ia,map:new(Ta||$i),string:new Ia}}function Ra(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function za(e,t){var n=e.__data__;return Ra(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Ba(e){var t=za(this,e).delete(e);return this.size-=+!!t,t}function Va(e){return za(this,e).get(e)}function Ha(e){return za(this,e).has(e)}function Ua(e,t){var n=za(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Wa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Wa.prototype.clear=La,Wa.prototype.delete=Ba,Wa.prototype.get=Va,Wa.prototype.has=Ha,Wa.prototype.set=Ua;var Ga=200;function Ka(e,t){var n=this.__data__;if(n instanceof $i){var r=n.__data__;if(!Ta||r.length<Ga-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wa(r)}return n.set(e,t),this.size=n.size,this}function qa(e){this.size=(this.__data__=new $i(e)).size}qa.prototype.clear=ea,qa.prototype.delete=ta,qa.prototype.get=na,qa.prototype.has=ra,qa.prototype.set=Ka;function Ja(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var Ya=function(){try{var e=wa(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function Xa(e,t,n){t==`__proto__`&&Ya?Ya(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Za=Object.prototype.hasOwnProperty;function Qa(e,t,n){var r=e[t];(!(Za.call(e,t)&&Ki(r,n))||n===void 0&&!(t in e))&&Xa(e,t,n)}function $a(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Xa(n,s,c):Qa(n,s,c)}return n}function eo(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var to=`[object Arguments]`;function no(e){return Li(e)&&Pi(e)==to}var ro=Object.prototype,io=ro.hasOwnProperty,ao=ro.propertyIsEnumerable,oo=no(function(){return arguments}())?no:function(e){return Li(e)&&io.call(e,`callee`)&&!ao.call(e,`callee`)},so=Array.isArray;function co(){return!1}var lo=typeof exports==`object`&&exports&&!exports.nodeType&&exports,uo=lo&&typeof module==`object`&&module&&!module.nodeType&&module,fo=uo&&uo.exports===lo?Si.Buffer:void 0,po=(fo?fo.isBuffer:void 0)||co,mo=9007199254740991,ho=/^(?:0|[1-9]\d*)$/;function go(e,t){var n=typeof e;return t??=mo,!!t&&(n==`number`||n!=`symbol`&&ho.test(e))&&e>-1&&e%1==0&&e<t}var _o=9007199254740991;function vo(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=_o}var yo=`[object Arguments]`,bo=`[object Array]`,xo=`[object Boolean]`,So=`[object Date]`,Co=`[object Error]`,wo=`[object Function]`,To=`[object Map]`,Eo=`[object Number]`,Do=`[object Object]`,Oo=`[object RegExp]`,ko=`[object Set]`,Ao=`[object String]`,jo=`[object WeakMap]`,Mo=`[object ArrayBuffer]`,No=`[object DataView]`,Po=`[object Float32Array]`,Fo=`[object Float64Array]`,Io=`[object Int8Array]`,Lo=`[object Int16Array]`,Ro=`[object Int32Array]`,zo=`[object Uint8Array]`,Bo=`[object Uint8ClampedArray]`,Vo=`[object Uint16Array]`,Ho=`[object Uint32Array]`,J={};J[Po]=J[Fo]=J[Io]=J[Lo]=J[Ro]=J[zo]=J[Bo]=J[Vo]=J[Ho]=!0,J[yo]=J[bo]=J[Mo]=J[xo]=J[No]=J[So]=J[Co]=J[wo]=J[To]=J[Eo]=J[Do]=J[Oo]=J[ko]=J[Ao]=J[jo]=!1;function Uo(e){return Li(e)&&vo(e.length)&&!!J[Pi(e)]}function Wo(e){return function(t){return e(t)}}var Go=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Ko=Go&&typeof module==`object`&&module&&!module.nodeType&&module,qo=Ko&&Ko.exports===Go&&bi.process,Jo=function(){try{return Ko&&Ko.require&&Ko.require(`util`).types||qo&&qo.binding&&qo.binding(`util`)}catch{}}(),Yo=Jo&&Jo.isTypedArray,Xo=Yo?Wo(Yo):Uo,Zo=Object.prototype.hasOwnProperty;function Qo(e,t){var n=so(e),r=!n&&oo(e),i=!n&&!r&&po(e),a=!n&&!r&&!i&&Xo(e),o=n||r||i||a,s=o?eo(e.length,String):[],c=s.length;for(var l in e)(t||Zo.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||go(l,c)))&&s.push(l);return s}var $o=Object.prototype;function es(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||$o)}var ts=Fi(Object.keys,Object),ns=Object.prototype.hasOwnProperty;function rs(e){if(!es(e))return ts(e);var t=[];for(var n in Object(e))ns.call(e,n)&&n!=`constructor`&&t.push(n);return t}function is(e){return e!=null&&vo(e.length)&&!la(e)}function as(e){return is(e)?Qo(e):rs(e)}function os(e,t){return e&&$a(t,as(t),e)}function ss(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var cs=Object.prototype.hasOwnProperty;function ls(e){if(!ia(e))return ss(e);var t=es(e),n=[];for(var r in e)r==`constructor`&&(t||!cs.call(e,r))||n.push(r);return n}function us(e){return is(e)?Qo(e,!0):ls(e)}function ds(e,t){return e&&$a(t,us(t),e)}var fs=typeof exports==`object`&&exports&&!exports.nodeType&&exports,ps=fs&&typeof module==`object`&&module&&!module.nodeType&&module,ms=ps&&ps.exports===fs?Si.Buffer:void 0,hs=ms?ms.allocUnsafe:void 0;function gs(e,t){if(t)return e.slice();var n=e.length,r=hs?hs(n):new e.constructor(n);return e.copy(r),r}function _s(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function vs(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function ys(){return[]}var bs=Object.prototype.propertyIsEnumerable,xs=Object.getOwnPropertySymbols,Ss=xs?function(e){return e==null?[]:(e=Object(e),vs(xs(e),function(t){return bs.call(e,t)}))}:ys;function Cs(e,t){return $a(e,Ss(e),t)}function ws(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ts=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)ws(t,Ss(e)),e=Ii(e);return t}:ys;function Es(e,t){return $a(e,Ts(e),t)}function Ds(e,t,n){var r=t(e);return so(e)?r:ws(r,n(e))}function Os(e){return Ds(e,as,Ss)}function ks(e){return Ds(e,us,Ts)}var As=wa(Si,`DataView`),js=wa(Si,`Promise`),Ms=wa(Si,`Set`),Ns=wa(Si,`WeakMap`),Ps=`[object Map]`,Fs=`[object Object]`,Is=`[object Promise]`,Ls=`[object Set]`,Rs=`[object WeakMap]`,zs=`[object DataView]`,Bs=ma(As),Vs=ma(Ta),Hs=ma(js),Us=ma(Ms),Ws=ma(Ns),Gs=Pi;(As&&Gs(new As(new ArrayBuffer(1)))!=zs||Ta&&Gs(new Ta)!=Ps||js&&Gs(js.resolve())!=Is||Ms&&Gs(new Ms)!=Ls||Ns&&Gs(new Ns)!=Rs)&&(Gs=function(e){var t=Pi(e),n=t==Fs?e.constructor:void 0,r=n?ma(n):``;if(r)switch(r){case Bs:return zs;case Vs:return Ps;case Hs:return Is;case Us:return Ls;case Ws:return Rs}return t});var Ks=Gs,qs=Object.prototype.hasOwnProperty;function Js(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&qs.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var Ys=Si.Uint8Array;function Xs(e){var t=new e.constructor(e.byteLength);return new Ys(t).set(new Ys(e)),t}function Zs(e,t){var n=t?Xs(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Qs=/\w*$/;function $s(e){var t=new e.constructor(e.source,Qs.exec(e));return t.lastIndex=e.lastIndex,t}var ec=Ci?Ci.prototype:void 0,tc=ec?ec.valueOf:void 0;function nc(e){return tc?Object(tc.call(e)):{}}function rc(e,t){var n=t?Xs(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ic=`[object Boolean]`,ac=`[object Date]`,oc=`[object Map]`,sc=`[object Number]`,cc=`[object RegExp]`,lc=`[object Set]`,uc=`[object String]`,dc=`[object Symbol]`,fc=`[object ArrayBuffer]`,pc=`[object DataView]`,mc=`[object Float32Array]`,hc=`[object Float64Array]`,gc=`[object Int8Array]`,_c=`[object Int16Array]`,vc=`[object Int32Array]`,yc=`[object Uint8Array]`,bc=`[object Uint8ClampedArray]`,xc=`[object Uint16Array]`,Sc=`[object Uint32Array]`;function Cc(e,t,n){var r=e.constructor;switch(t){case fc:return Xs(e);case ic:case ac:return new r(+e);case pc:return Zs(e,n);case mc:case hc:case gc:case _c:case vc:case yc:case bc:case xc:case Sc:return rc(e,n);case oc:return new r;case sc:case uc:return new r(e);case cc:return $s(e);case lc:return new r;case dc:return nc(e)}}var wc=Object.create,Tc=function(){function e(){}return function(t){if(!ia(t))return{};if(wc)return wc(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ec(e){return typeof e.constructor==`function`&&!es(e)?Tc(Ii(e)):{}}var Dc=`[object Map]`;function Oc(e){return Li(e)&&Ks(e)==Dc}var kc=Jo&&Jo.isMap,Ac=kc?Wo(kc):Oc,jc=`[object Set]`;function Mc(e){return Li(e)&&Ks(e)==jc}var Nc=Jo&&Jo.isSet,Pc=Nc?Wo(Nc):Mc,Fc=1,Ic=2,Lc=4,Rc=`[object Arguments]`,zc=`[object Array]`,Bc=`[object Boolean]`,Vc=`[object Date]`,Hc=`[object Error]`,Uc=`[object Function]`,Wc=`[object GeneratorFunction]`,Gc=`[object Map]`,Kc=`[object Number]`,qc=`[object Object]`,Jc=`[object RegExp]`,Yc=`[object Set]`,Xc=`[object String]`,Zc=`[object Symbol]`,Qc=`[object WeakMap]`,$c=`[object ArrayBuffer]`,el=`[object DataView]`,tl=`[object Float32Array]`,nl=`[object Float64Array]`,rl=`[object Int8Array]`,il=`[object Int16Array]`,al=`[object Int32Array]`,ol=`[object Uint8Array]`,sl=`[object Uint8ClampedArray]`,cl=`[object Uint16Array]`,ll=`[object Uint32Array]`,Y={};Y[Rc]=Y[zc]=Y[$c]=Y[el]=Y[Bc]=Y[Vc]=Y[tl]=Y[nl]=Y[rl]=Y[il]=Y[al]=Y[Gc]=Y[Kc]=Y[qc]=Y[Jc]=Y[Yc]=Y[Xc]=Y[Zc]=Y[ol]=Y[sl]=Y[cl]=Y[ll]=!0,Y[Hc]=Y[Uc]=Y[Qc]=!1;function ul(e,t,n,r,i,a){var o,s=t&Fc,c=t&Ic,l=t&Lc;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!ia(e))return e;var u=so(e);if(u){if(o=Js(e),!s)return _s(e,o)}else{var d=Ks(e),f=d==Uc||d==Wc;if(po(e))return gs(e,s);if(d==qc||d==Rc||f&&!i){if(o=c||f?{}:Ec(e),!s)return c?Es(e,ds(o,e)):Cs(e,os(o,e))}else{if(!Y[d])return i?e:{};o=Cc(e,d,s)}}a||=new qa;var p=a.get(e);if(p)return p;a.set(e,o),Pc(e)?e.forEach(function(r){o.add(ul(r,t,n,r,e,a))}):Ac(e)&&e.forEach(function(r,i){o.set(i,ul(r,t,n,i,e,a))});var m=u?void 0:(l?c?ks:Os:c?us:as)(e);return Ja(m||e,function(r,i){m&&(i=r,r=e[i]),Qa(o,i,ul(r,t,n,i,e,a))}),o}var dl=1,fl=4;function pl(e){return ul(e,dl|fl)}var ml=e.g(((e,t)=>{var n=Array.isArray,r=Object.keys,i=Object.prototype.hasOwnProperty,a=typeof Element<`u`;function o(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){var s=n(e),c=n(t),l,u,d;if(s&&c){if(u=e.length,u!=t.length)return!1;for(l=u;l--!==0;)if(!o(e[l],t[l]))return!1;return!0}if(s!=c)return!1;var f=e instanceof Date,p=t instanceof Date;if(f!=p)return!1;if(f&&p)return e.getTime()==t.getTime();var m=e instanceof RegExp,h=t instanceof RegExp;if(m!=h)return!1;if(m&&h)return e.toString()==t.toString();var g=r(e);if(u=g.length,u!==r(t).length)return!1;for(l=u;l--!==0;)if(!i.call(t,g[l]))return!1;if(a&&e instanceof Element&&t instanceof Element)return e===t;for(l=u;l--!==0;)if(d=g[l],!(d===`_owner`&&e.$$typeof)&&!o(e[d],t[d]))return!1;return!0}return e!==e&&t!==t}t.exports=function(e,t){try{return o(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||e.number===-2146828260)return console.warn(`Warning: react-fast-compare does not handle circular references.`,e.name,e.message),!1;throw e}}})),hl=e._(ml()),gl=process.env.NODE_ENV===`production`;function _l(e,t){if(!gl){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}var vl=4;function yl(e){return ul(e,vl)}function bl(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var xl=`[object Symbol]`;function Sl(e){return typeof e==`symbol`||Li(e)&&Pi(e)==xl}var Cl=`Expected a function`;function wl(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Cl);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(wl.Cache||Wa),n}wl.Cache=Wa;var Tl=500;function El(e){var t=wl(e,function(e){return n.size===Tl&&n.clear(),e}),n=t.cache;return t}var Dl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ol=/\\(\\)?/g,kl=El(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Dl,function(e,n,r,i){t.push(r?i.replace(Ol,`$1`):n||e)}),t}),Al=1/0;function jl(e){if(typeof e==`string`||Sl(e))return e;var t=e+``;return t==`0`&&1/e==-Al?`-0`:t}var Ml=1/0,Nl=Ci?Ci.prototype:void 0,Pl=Nl?Nl.toString:void 0;function Fl(e){if(typeof e==`string`)return e;if(so(e))return bl(e,Fl)+``;if(Sl(e))return Pl?Pl.call(e):``;var t=e+``;return t==`0`&&1/e==-Ml?`-0`:t}function Il(e){return e==null?``:Fl(e)}function Ll(e){return so(e)?bl(e,jl):Sl(e)?[e]:_s(kl(Il(e)))}var Rl=e.g((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),zl=e.g((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,ee=d,te=i,D=h,O=m,k=r,A=o,j=a,ne=f,M=!1;function N(e){return M||(M=!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(e)||x(e)===l}function re(e){return x(e)===u}function ie(e){return x(e)===c}function ae(e){return x(e)===s}function oe(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function P(e){return x(e)===d}function se(e){return x(e)===i}function ce(e){return x(e)===h}function F(e){return x(e)===m}function le(e){return x(e)===r}function ue(e){return x(e)===o}function de(e){return x(e)===a}function fe(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=ee,e.Fragment=te,e.Lazy=D,e.Memo=O,e.Portal=k,e.Profiler=A,e.StrictMode=j,e.Suspense=ne,e.isAsyncMode=N,e.isConcurrentMode=re,e.isContextConsumer=ie,e.isContextProvider=ae,e.isElement=oe,e.isForwardRef=P,e.isFragment=se,e.isLazy=ce,e.isMemo=F,e.isPortal=le,e.isProfiler=ue,e.isStrictMode=de,e.isSuspense=fe,e.isValidElementType=b,e.typeOf=x})()})),Bl=e.g(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Rl():t.exports=zl()}));e.g(((e,t)=>{var n=Bl(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}))();function X(){return X=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(this,arguments)}function Vl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Hl(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ul(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Wl=(0,t.createContext)(void 0);Wl.displayName=`FormikContext`,Wl.Provider,Wl.Consumer;function Gl(){var e=(0,t.useContext)(Wl);return!e&&(process.env.NODE_ENV===`production`?_l(!1):_l(!1,`Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component.`)),e}var Kl=function(e){return Array.isArray(e)&&e.length===0},Z=function(e){return typeof e==`function`},ql=function(e){return typeof e==`object`&&!!e},Jl=function(e){return String(Math.floor(Number(e)))===e},Yl=function(e){return Object.prototype.toString.call(e)===`[object String]`},Xl=function(e){return t.Children.count(e)===0},Zl=function(e){return ql(e)&&Z(e.then)};function Ql(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Q(e,t,n,r){r===void 0&&(r=0);for(var i=Ll(t);e&&r<i.length;)e=e[i[r++]];return r!==i.length&&!e||e===void 0?n:e}function $l(e,t,n){for(var r=yl(e),i=r,a=0,o=Ll(t);a<o.length-1;a++){var s=o[a],c=Q(e,o.slice(0,a+1));if(c&&(ql(c)||Array.isArray(c)))i=i[s]=yl(c);else{var l=o[a+1];i=i[s]=Jl(l)&&Number(l)>=0?[]:{}}}return(a===0?e:i)[o[a]]===n?e:(n===void 0?delete i[o[a]]:i[o[a]]=n,a===0&&n===void 0&&delete r[o[a]],r)}function eu(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],s=e[o];ql(s)?n.get(s)||(n.set(s,!0),r[o]=Array.isArray(s)?[]:{},eu(s,t,n,r[o])):r[o]=t}return r}function tu(e,t){switch(t.type){case`SET_VALUES`:return X({},e,{values:t.payload});case`SET_TOUCHED`:return X({},e,{touched:t.payload});case`SET_ERRORS`:return(0,hl.default)(e.errors,t.payload)?e:X({},e,{errors:t.payload});case`SET_STATUS`:return X({},e,{status:t.payload});case`SET_ISSUBMITTING`:return X({},e,{isSubmitting:t.payload});case`SET_ISVALIDATING`:return X({},e,{isValidating:t.payload});case`SET_FIELD_VALUE`:return X({},e,{values:$l(e.values,t.payload.field,t.payload.value)});case`SET_FIELD_TOUCHED`:return X({},e,{touched:$l(e.touched,t.payload.field,t.payload.value)});case`SET_FIELD_ERROR`:return X({},e,{errors:$l(e.errors,t.payload.field,t.payload.value)});case`RESET_FORM`:return X({},e,t.payload);case`SET_FORMIK_STATE`:return t.payload(e);case`SUBMIT_ATTEMPT`:return X({},e,{touched:eu(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case`SUBMIT_FAILURE`:return X({},e,{isSubmitting:!1});case`SUBMIT_SUCCESS`:return X({},e,{isSubmitting:!1});default:return e}}var nu={},ru={};function iu(e){var n=e.validateOnChange,r=n===void 0?!0:n,i=e.validateOnBlur,a=i===void 0?!0:i,o=e.validateOnMount,s=o===void 0?!1:o,c=e.isInitialValid,l=e.enableReinitialize,u=l===void 0?!1:l,d=e.onSubmit,f=Hl(e,[`validateOnChange`,`validateOnBlur`,`validateOnMount`,`isInitialValid`,`enableReinitialize`,`onSubmit`]),p=X({validateOnChange:r,validateOnBlur:a,validateOnMount:s,onSubmit:d},f),m=(0,t.useRef)(p.initialValues),h=(0,t.useRef)(p.initialErrors||nu),g=(0,t.useRef)(p.initialTouched||ru),_=(0,t.useRef)(p.initialStatus),v=(0,t.useRef)(!1),y=(0,t.useRef)({});process.env.NODE_ENV!==`production`&&(0,t.useEffect)(function(){c!==void 0&&(process.env.NODE_ENV===`production`?_l(!1):_l(!1,`isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead.`))},[]),(0,t.useEffect)(function(){return v.current=!0,function(){v.current=!1}},[]);var b=(0,t.useState)(0)[1],x=(0,t.useRef)({values:pl(p.initialValues),errors:pl(p.initialErrors)||nu,touched:pl(p.initialTouched)||ru,status:pl(p.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),S=x.current,C=(0,t.useCallback)(function(e){var t=x.current;x.current=tu(t,e),t!==x.current&&b(function(e){return e+1})},[]),w=(0,t.useCallback)(function(e,t){return new Promise(function(n,r){var i=p.validate(e,t);i==null?n(nu):Zl(i)?i.then(function(e){n(e||nu)},function(e){process.env.NODE_ENV!==`production`&&console.warn(`Warning: An unhandled error was caught during validation in <Formik validate />`,e),r(e)}):n(i)})},[p.validate]),T=(0,t.useCallback)(function(e,t){var n=p.validationSchema,r=Z(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):su(e,r);return new Promise(function(e,t){i.then(function(){e(nu)},function(n){n.name===`ValidationError`?e(ou(n)):(process.env.NODE_ENV!==`production`&&console.warn(`Warning: An unhandled error was caught during validation in <Formik validationSchema />`,n),t(n))})})},[p.validationSchema]),E=(0,t.useCallback)(function(e,t){return new Promise(function(n){return n(y.current[e].validate(t))})},[]),ee=(0,t.useCallback)(function(e){var t=Object.keys(y.current).filter(function(e){return Z(y.current[e].validate)}),n=t.length>0?t.map(function(t){return E(t,Q(e,t))}):[Promise.resolve(`DO_NOT_DELETE_YOU_WILL_BE_FIRED`)];return Promise.all(n).then(function(e){return e.reduce(function(e,n,r){return n===`DO_NOT_DELETE_YOU_WILL_BE_FIRED`||n&&(e=$l(e,t[r],n)),e},{})})},[E]),te=(0,t.useCallback)(function(e){return Promise.all([ee(e),p.validationSchema?T(e):{},p.validate?w(e):{}]).then(function(e){var t=e[0],n=e[1],r=e[2];return yi.all([t,n,r],{arrayMerge:lu})})},[p.validate,p.validationSchema,ee,w,T]),D=$(function(e){return e===void 0&&(e=S.values),C({type:`SET_ISVALIDATING`,payload:!0}),te(e).then(function(e){return v.current&&(C({type:`SET_ISVALIDATING`,payload:!1}),C({type:`SET_ERRORS`,payload:e})),e})});(0,t.useEffect)(function(){s&&v.current===!0&&(0,hl.default)(m.current,p.initialValues)&&D(m.current)},[s,D]);var O=(0,t.useCallback)(function(e){var t=e&&e.values?e.values:m.current,n=e&&e.errors?e.errors:h.current?h.current:p.initialErrors||{},r=e&&e.touched?e.touched:g.current?g.current:p.initialTouched||{},i=e&&e.status?e.status:_.current?_.current:p.initialStatus;m.current=t,h.current=n,g.current=r,_.current=i;var a=function(){C({type:`RESET_FORM`,payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&typeof e.submitCount==`number`?e.submitCount:0}})};if(p.onReset){var o=p.onReset(S.values,I);Zl(o)?o.then(a):a()}else a()},[p.initialErrors,p.initialStatus,p.initialTouched,p.onReset]);(0,t.useEffect)(function(){v.current===!0&&!(0,hl.default)(m.current,p.initialValues)&&u&&(m.current=p.initialValues,O(),s&&D(m.current))},[u,p.initialValues,O,s,D]),(0,t.useEffect)(function(){u&&v.current===!0&&!(0,hl.default)(h.current,p.initialErrors)&&(h.current=p.initialErrors||nu,C({type:`SET_ERRORS`,payload:p.initialErrors||nu}))},[u,p.initialErrors]),(0,t.useEffect)(function(){u&&v.current===!0&&!(0,hl.default)(g.current,p.initialTouched)&&(g.current=p.initialTouched||ru,C({type:`SET_TOUCHED`,payload:p.initialTouched||ru}))},[u,p.initialTouched]),(0,t.useEffect)(function(){u&&v.current===!0&&!(0,hl.default)(_.current,p.initialStatus)&&(_.current=p.initialStatus,C({type:`SET_STATUS`,payload:p.initialStatus}))},[u,p.initialStatus,p.initialTouched]);var k=$(function(e){if(y.current[e]&&Z(y.current[e].validate)){var t=Q(S.values,e),n=y.current[e].validate(t);return Zl(n)?(C({type:`SET_ISVALIDATING`,payload:!0}),n.then(function(e){return e}).then(function(t){C({type:`SET_FIELD_ERROR`,payload:{field:e,value:t}}),C({type:`SET_ISVALIDATING`,payload:!1})})):(C({type:`SET_FIELD_ERROR`,payload:{field:e,value:n}}),Promise.resolve(n))}else if(p.validationSchema)return C({type:`SET_ISVALIDATING`,payload:!0}),T(S.values,e).then(function(e){return e}).then(function(t){C({type:`SET_FIELD_ERROR`,payload:{field:e,value:Q(t,e)}}),C({type:`SET_ISVALIDATING`,payload:!1})});return Promise.resolve()}),A=(0,t.useCallback)(function(e,t){var n=t.validate;y.current[e]={validate:n}},[]),j=(0,t.useCallback)(function(e){delete y.current[e]},[]),ne=$(function(e,t){return C({type:`SET_TOUCHED`,payload:e}),(t===void 0?a:t)?D(S.values):Promise.resolve()}),M=(0,t.useCallback)(function(e){C({type:`SET_ERRORS`,payload:e})},[]),N=$(function(e,t){var n=Z(e)?e(S.values):e;return C({type:`SET_VALUES`,payload:n}),(t===void 0?r:t)?D(n):Promise.resolve()}),re=(0,t.useCallback)(function(e,t){C({type:`SET_FIELD_ERROR`,payload:{field:e,value:t}})},[]),ie=$(function(e,t,n){var i=Z(t)?t(Q(S.values,e)):t;return C({type:`SET_FIELD_VALUE`,payload:{field:e,value:i}}),(n===void 0?r:n)?D($l(S.values,e,i)):Promise.resolve()}),ae=(0,t.useCallback)(function(e,t){var n=t,r=e,i;if(!Yl(e)){e.persist&&e.persist();var a=e.target?e.target:e.currentTarget,o=a.type,s=a.name,c=a.id,l=a.value,u=a.checked,d=a.outerHTML,f=a.options,p=a.multiple;n=t||s||c,!n&&process.env.NODE_ENV!==`production`&&au({htmlContent:d,documentationAnchorLink:`handlechange-e-reactchangeeventany--void`,handlerName:`handleChange`}),r=/number|range/.test(o)?(i=parseFloat(l),isNaN(i)?``:i):/checkbox/.test(o)?du(Q(S.values,n),u,l):f&&p?uu(f):l}n&&ie(n,r)},[ie,S.values]),oe=$(function(e){if(Yl(e))return function(t){return ae(t,e)};ae(e)}),P=$(function(e,t,n){return t===void 0&&(t=!0),C({type:`SET_FIELD_TOUCHED`,payload:{field:e,value:t}}),(n===void 0?a:n)?D(S.values):Promise.resolve()}),se=(0,t.useCallback)(function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,a=n.outerHTML,o=t||r||i;!o&&process.env.NODE_ENV!==`production`&&au({htmlContent:a,documentationAnchorLink:`handleblur-e-any--void`,handlerName:`handleBlur`}),P(o,!0)},[P]),ce=$(function(e){if(Yl(e))return function(t){return se(t,e)};se(e)}),F=(0,t.useCallback)(function(e){Z(e)?C({type:`SET_FORMIK_STATE`,payload:e}):C({type:`SET_FORMIK_STATE`,payload:function(){return e}})},[]),le=(0,t.useCallback)(function(e){C({type:`SET_STATUS`,payload:e})},[]),ue=(0,t.useCallback)(function(e){C({type:`SET_ISSUBMITTING`,payload:e})},[]),de=$(function(){return C({type:`SUBMIT_ATTEMPT`}),D().then(function(e){var t=e instanceof Error;if(!t&&Object.keys(e).length===0){var n;try{if(n=pe(),n===void 0)return}catch(e){throw e}return Promise.resolve(n).then(function(e){return v.current&&C({type:`SUBMIT_SUCCESS`}),e}).catch(function(e){if(v.current)throw C({type:`SUBMIT_FAILURE`}),e})}else if(v.current&&(C({type:`SUBMIT_FAILURE`}),t))throw e})}),fe=$(function(e){if(e&&e.preventDefault&&Z(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Z(e.stopPropagation)&&e.stopPropagation(),process.env.NODE_ENV!==`production`&&typeof document<`u`){var t=Ql();t!==null&&t instanceof HTMLButtonElement&&!(t.attributes&&t.attributes.getNamedItem(`type`))&&(process.env.NODE_ENV===`production`?_l(!1):_l(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'))}de().catch(function(e){console.warn(`Warning: An unhandled error was caught from submitForm()`,e)})}),I={resetForm:O,validateForm:D,validateField:k,setErrors:M,setFieldError:re,setFieldTouched:P,setFieldValue:ie,setStatus:le,setSubmitting:ue,setTouched:ne,setValues:N,setFormikState:F,submitForm:de},pe=$(function(){return d(S.values,I)}),me=$(function(e){e&&e.preventDefault&&Z(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Z(e.stopPropagation)&&e.stopPropagation(),O()}),he=(0,t.useCallback)(function(e){return{value:Q(S.values,e),error:Q(S.errors,e),touched:!!Q(S.touched,e),initialValue:Q(m.current,e),initialTouched:!!Q(g.current,e),initialError:Q(h.current,e)}},[S.errors,S.touched,S.values]),ge=(0,t.useCallback)(function(e){return{setValue:function(t,n){return ie(e,t,n)},setTouched:function(t,n){return P(e,t,n)},setError:function(t){return re(e,t)}}},[ie,P,re]),_e=(0,t.useCallback)(function(e){var t=ql(e),n=t?e.name:e,r=Q(S.values,n),i={name:n,value:r,onChange:oe,onBlur:ce};if(t){var a=e.type,o=e.value,s=e.as,c=e.multiple;a===`checkbox`?o===void 0?i.checked=!!r:(i.checked=!!(Array.isArray(r)&&~r.indexOf(o)),i.value=o):a===`radio`?(i.checked=r===o,i.value=o):s===`select`&&c&&(i.value=i.value||[],i.multiple=!0)}return i},[ce,oe,S.values]),ve=(0,t.useMemo)(function(){return!(0,hl.default)(m.current,S.values)},[m.current,S.values]),ye=(0,t.useMemo)(function(){return c===void 0||ve?S.errors&&Object.keys(S.errors).length===0:c!==!1&&Z(c)?c(p):c},[c,ve,S.errors,p]);return X({},S,{initialValues:m.current,initialErrors:h.current,initialTouched:g.current,initialStatus:_.current,handleBlur:ce,handleChange:oe,handleReset:me,handleSubmit:fe,resetForm:O,setErrors:M,setFormikState:F,setFieldTouched:P,setFieldValue:ie,setFieldError:re,setStatus:le,setSubmitting:ue,setTouched:ne,setValues:N,submitForm:de,validateForm:D,validateField:k,isValid:ye,dirty:ve,unregisterField:j,registerField:A,getFieldProps:_e,getFieldMeta:he,getFieldHelpers:ge,validateOnBlur:a,validateOnChange:r,validateOnMount:s})}function au(e){var t=e.htmlContent,n=e.documentationAnchorLink,r=e.handlerName;console.warn("Warning: Formik called `"+r+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+t+`
30
+ Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#`+n+`
31
+ `)}function ou(e){var t={};if(e.inner){if(e.inner.length===0)return $l(t,e.path,e.message);for(var n=e.inner,r=Array.isArray(n),i=0,n=r?n:n[Symbol.iterator]();;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var o=a;Q(t,o.path)||(t=$l(t,o.path,o.message))}}return t}function su(e,t,n,r){n===void 0&&(n=!1);var i=cu(e);return t[n?`validateSync`:`validate`](i,{abortEarly:!1,context:r||i})}function cu(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(e){return Array.isArray(e)===!0||Wi(e)?cu(e):e===``?void 0:e}):Wi(e[r])?t[r]=cu(e[r]):t[r]=e[r]===``?void 0:e[r]}return t}function lu(e,t,n){var r=e.slice();return t.forEach(function(t,i){r[i]===void 0?r[i]=n.clone!==!1&&n.isMergeableObject(t)?yi(Array.isArray(t)?[]:{},t,n):t:n.isMergeableObject(t)?r[i]=yi(e[i],t,n):e.indexOf(t)===-1&&r.push(t)}),r}function uu(e){return Array.from(e).filter(function(e){return e.selected}).map(function(e){return e.value})}function du(e,t,n){if(typeof e==`boolean`)return!!t;var r=[],i=!1,a=-1;if(Array.isArray(e))r=e,a=e.indexOf(n),i=a>=0;else if(!n||n==`true`||n==`false`)return!!t;return t&&n&&!i?r.concat(n):i?r.slice(0,a).concat(r.slice(a+1)):r}var fu=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?t.useLayoutEffect:t.useEffect;function $(e){var n=(0,t.useRef)(e);return fu(function(){n.current=e}),(0,t.useCallback)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current.apply(void 0,t)},[])}var pu=(0,t.forwardRef)(function(e,n){var r=e.action,i=Hl(e,[`action`]),a=r??`#`,o=Gl(),s=o.handleReset,c=o.handleSubmit;return(0,t.createElement)(`form`,X({onSubmit:c,ref:n,onReset:s,action:a},i))});pu.displayName=`Form`;var mu=function(e,t,n){var r=vu(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r},hu=function(e,t,n){var r=vu(e),i=r[t];return r[t]=r[n],r[n]=i,r},gu=function(e,t,n){var r=vu(e);return r.splice(t,0,n),r},_u=function(e,t,n){var r=vu(e);return r[t]=n,r},vu=function(e){if(!e)return[];if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map(function(e){return parseInt(e)}).reduce(function(e,t){return t>e?t:e},0);return Array.from(X({},e,{length:t+1}))},yu=function(e,t){var n=typeof e==`function`?e:t;return function(e){return Array.isArray(e)||ql(e)?n(vu(e)):e}},bu=function(e){Vl(n,e);function n(t){var n=e.call(this,t)||this;return n.updateArrayField=function(e,t,r){var i=n.props,a=i.name,o=i.formik.setFormikState;o(function(n){var i=yu(r,e),o=yu(t,e),s=$l(n.values,a,e(Q(n.values,a))),c=r?i(Q(n.errors,a)):void 0,l=t?o(Q(n.touched,a)):void 0;return Kl(c)&&(c=void 0),Kl(l)&&(l=void 0),X({},n,{values:s,errors:r?$l(n.errors,a,c):n.errors,touched:t?$l(n.touched,a,l):n.touched})})},n.push=function(e){return n.updateArrayField(function(t){return[].concat(vu(t),[pl(e)])},!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField(function(n){return hu(n,e,t)},!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField(function(n){return mu(n,e,t)},!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField(function(n){return gu(n,e,t)},function(t){return gu(t,e,null)},function(t){return gu(t,e,null)})},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField(function(n){return _u(n,e,t)},!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField(function(n){var r=n?[e].concat(n):[e];return t=r.length,r},function(e){return e?[null].concat(e):[null]},function(e){return e?[null].concat(e):[null]}),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(Ul(n)),n.pop=n.pop.bind(Ul(n)),n}var r=n.prototype;return r.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!(0,hl.default)(Q(e.formik.values,e.name),Q(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(e){var t;return this.updateArrayField(function(n){var r=n?vu(n):[];return t||=r[e],Z(r.splice)&&r.splice(e,1),Z(r.every)&&r.every(function(e){return e===void 0})?[]:r},!0,!0),t},r.pop=function(){var e;return this.updateArrayField(function(t){var n=t.slice();return e||=n&&n.pop&&n.pop(),n},!0,!0),e},r.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},n=this.props,r=n.component,i=n.render,a=n.children,o=n.name,s=n.formik,c=Hl(s,[`validate`,`validationSchema`]),l=X({},e,{form:c,name:o});return r?(0,t.createElement)(r,l):i?i(l):a?typeof a==`function`?a(l):Xl(a)?null:t.Children.only(a):null},n}(t.Component);bu.defaultProps={validateOnChange:!0};var xu=e.g(((e,t)=>{t.exports=Array.isArray})),Su=e.g(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),Cu=e.g(((e,t)=>{var n=Su(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),wu=e.g(((e,t)=>{t.exports=Cu().Symbol})),Tu=e.g(((e,t)=>{var n=wu(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),Eu=e.g(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),Du=e.g(((e,t)=>{var n=wu(),r=Tu(),i=Eu(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),Ou=e.g(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),ku=e.g(((e,t)=>{var n=Du(),r=Ou(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),Au=e.g(((e,t)=>{var n=xu(),r=ku(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),ju=e.g(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),Mu=e.g(((e,t)=>{var n=Du(),r=ju(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Nu=e.g(((e,t)=>{t.exports=Cu()[`__core-js_shared__`]})),Pu=e.g(((e,t)=>{var n=Nu(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),Fu=e.g(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),Iu=e.g(((e,t)=>{var n=Mu(),r=Pu(),i=ju(),a=Fu(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),Lu=e.g(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Ru=e.g(((e,t)=>{var n=Iu(),r=Lu();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),zu=e.g(((e,t)=>{t.exports=Ru()(Object,`create`)})),Bu=e.g(((e,t)=>{var n=zu();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),Vu=e.g(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Hu=e.g(((e,t)=>{var n=zu(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Uu=e.g(((e,t)=>{var n=zu(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Wu=e.g(((e,t)=>{var n=zu(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),Gu=e.g(((e,t)=>{var n=Bu(),r=Vu(),i=Hu(),a=Uu(),o=Wu();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Ku=e.g(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),qu=e.g(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),Ju=e.g(((e,t)=>{var n=qu();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),Yu=e.g(((e,t)=>{var n=Ju(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),Xu=e.g(((e,t)=>{var n=Ju();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),Zu=e.g(((e,t)=>{var n=Ju();function r(e){return n(this.__data__,e)>-1}t.exports=r})),Qu=e.g(((e,t)=>{var n=Ju();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),$u=e.g(((e,t)=>{var n=Ku(),r=Yu(),i=Xu(),a=Zu(),o=Qu();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ed=e.g(((e,t)=>{t.exports=Ru()(Cu(),`Map`)})),td=e.g(((e,t)=>{var n=Gu(),r=$u(),i=ed();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),nd=e.g(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),rd=e.g(((e,t)=>{var n=nd();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),id=e.g(((e,t)=>{var n=rd();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),ad=e.g(((e,t)=>{var n=rd();function r(e){return n(this,e).get(e)}t.exports=r})),od=e.g(((e,t)=>{var n=rd();function r(e){return n(this,e).has(e)}t.exports=r})),sd=e.g(((e,t)=>{var n=rd();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),cd=e.g(((e,t)=>{var n=td(),r=id(),i=ad(),a=od(),o=sd();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),ld=e.g(((e,t)=>{var n=cd(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),ud=e.g(((e,t)=>{var n=ld(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),dd=e.g(((e,t)=>{var n=ud(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),fd=e.g(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),pd=e.g(((e,t)=>{var n=wu(),r=fd(),i=xu(),a=ku(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),md=e.g(((e,t)=>{var n=pd();function r(e){return e==null?``:n(e)}t.exports=r})),hd=e.g(((e,t)=>{var n=xu(),r=Au(),i=dd(),a=md();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),gd=e.g(((e,t)=>{var n=ku(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),_d=e.g(((e,t)=>{var n=hd(),r=gd();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),vd=e.g(((e,t)=>{var n=_d();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),yd=e._(vd(),1),bd=(e=16)=>{let t={upper:`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,lower:`abcdefghijklmnopqrstuvwxyz`,numbers:`0123456789`,symbols:`!@%^&*()_+[]{}|;:,.<>?`},n=t.upper+t.lower+t.numbers+t.symbols,r=e=>e[crypto.getRandomValues(new Uint32Array(1))[0]%e.length],i=[r(t.upper),r(t.lower),r(t.numbers),r(t.symbols)];for(let t=4;t<e;t++)i.push(r(n));for(let e=i.length-1;e>0;e--){let t=crypto.getRandomValues(new Uint32Array(1))[0]%(e+1),n=i[e];i[e]=i[t],i[t]=n}return i.join(``)},xd=({showPassword:e,onToggleVisibility:t,onGenerate:n})=>(0,i.jsxs)(r.InputAdornment,{position:`end`,children:[n&&(0,i.jsx)(r.Tooltip,{title:`Generate Password`,children:(0,i.jsx)(r.IconButton,{onClick:n,edge:`end`,size:`small`,sx:{opacity:.7},"aria-label":`generate password`,children:(0,i.jsx)(qr,{})})}),(0,i.jsx)(r.Tooltip,{title:e?`Hide password`:`Show password`,children:(0,i.jsx)(r.IconButton,{onClick:t,edge:`end`,size:`small`,sx:{opacity:.7},"aria-label":e?`hide password`:`show password`,children:e?(0,i.jsx)(ii,{}):(0,i.jsx)(ri,{})})})]}),Sd=({type:e,autoGenerate:t=!1,formik:r,name:i})=>{let[a,o]=(0,n.useState)(!1),s={},c=a?`text`:`password`;return e===`password`?(s.endAdornment=xd({showPassword:a,onToggleVisibility:()=>{o(!a)},onGenerate:t?()=>{if(!r||!i)return;let e=bd();r.setFieldValue(i,e),a||o(!0)}:void 0}),{inputType:c,inputProps:s}):{inputType:e,inputProps:s}},Cd=({helperText:e,errorText:t,formik:a,name:o,defaultValue:s,onChange:c,type:l,fullWidth:u=!0,autoGenerate:d=!1,...f})=>{let p=Sd({type:l,autoGenerate:d,formik:a,name:o}),m={},h=f.value??s;if((0,n.useEffect)(()=>{!a||!o||h===void 0||a.setFieldValue(o,h)},[h]),o&&a){a.touched[o]&&(t??=a.errors[o]);let e=(0,yd.default)(a.values,o,``);l===`date`&&(e=wd(e)),m={value:e??``,onBlur:()=>a.setFieldTouched(o),onChange:e=>{let t=e.target.value;l===`date`&&t&&(t=new Date(t)),a.setFieldValue(o,t||null),c?.(e)},slotProps:{...f.slotProps,input:{...f.InputProps,...f.slotProps?.input,...p.inputProps},inputLabel:l===`date`?{shrink:!0}:void 0}}}return(0,i.jsx)(r.TextField,{variant:`standard`,onChange:c,...f,...m,name:o,type:p.inputType,fullWidth:u,helperText:t||e,error:!!t})},wd=e=>{if(!e)return``;let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`},Td=({multiple:t=!1,formik:a,name:o,label:s=`Search users`,disabled:c=!1,error:l,helperText:u,value:d,onChange:f})=>{let[p,m]=(0,n.useState)(!1),[h,g]=(0,n.useState)([]),[_,v]=(0,n.useState)(!1),[y,b]=(0,n.useState)(``),x=(0,n.useCallback)(async t=>{if(t.length<2){g([]);return}v(!0);try{g(await e.a().searchUsers({name:t}))}catch(e){console.error(`Failed to search users:`,e),g([])}finally{v(!1)}},[]),S=(0,n.useCallback)((e,t)=>{b(t),x(t)},[x]),C=()=>d===void 0?a&&o?a.values[o]:t?[]:null:d,w=(e,t)=>{f?f(t):a&&o&&a.setFieldValue(o,t)},T=()=>{a&&o&&a.setFieldTouched(o)},E=()=>{if(l)return` `;if(a&&o&&a.touched[o]&&a.errors[o])return a.errors[o]};return(0,i.jsx)(r.Autocomplete,{open:p,onOpen:()=>m(!0),onClose:()=>m(!1),multiple:t,options:h,value:C(),onChange:w,onBlur:T,onInputChange:S,getOptionLabel:e=>e.name,isOptionEqualToValue:(e,t)=>e.id===t.id,loading:_,noOptionsText:y.length<3?`Type at least 3 characters to search`:`No users found`,renderOption:(e,t)=>(0,n.createElement)(r.Box,{component:`li`,...e,key:t.id},(0,i.jsxs)(r.Box,{children:[(0,i.jsx)(r.Typography,{variant:`body1`,children:t.name}),(0,i.jsx)(r.Typography,{variant:`body2`,color:`text.secondary`,children:t.email})]})),renderInput:e=>(0,i.jsx)(r.TextField,{...e,label:s,disabled:c,error:!!E(),helperText:E()||u,InputProps:{...e.InputProps,endAdornment:(0,i.jsxs)(i.Fragment,{children:[_?(0,i.jsx)(r.CircularProgress,{size:20}):null,e.InputProps.endAdornment]})}})})},Ed=e.m({name:e.h().trim().required(`Group name is required`).min(2,`Group name must be at least 2 characters`).max(100,`Group name must be at most 100 characters`)}),Dd=({open:t,onClose:a,onSuccess:s,orgId:c})=>{let[l,u]=(0,n.useState)(null),d=iu({initialValues:{name:``,read_only:!1,members:[]},validationSchema:Ed,onSubmit:async(t,{setSubmitting:n,resetForm:r})=>{u(null);try{let n=e.a(),i=await n.createGroup(c,{name:t.name.trim(),read_only:t.read_only});t.members&&t.members.length>0&&await n.addGroupMembers(c,i.id,t.members.map(e=>({user:e.userId,role:e.role}))),r(),s?.(),a()}catch(e){u(o(e,`Failed to create group`))}n(!1)}}),f=e=>{let t=Array.isArray(e)?e:[];d.setFieldValue(`members`,t.map(e=>({userId:e.id,role:`member`,user:e})))},p=(e,t)=>{let n=d.values.members.map(n=>n.userId===e?{...n,role:t}:n);d.setFieldValue(`members`,n)},m=e=>{let t=d.values.members.filter(t=>t.userId!==e);d.setFieldValue(`members`,t)},h=()=>{d.resetForm(),a()};return(0,i.jsxs)(r.Dialog,{open:t,onClose:h,maxWidth:`sm`,fullWidth:!0,PaperProps:{component:`form`,onSubmit:d.handleSubmit},children:[(0,i.jsx)(r.DialogTitle,{children:`Create New Group`}),(0,i.jsx)(r.DialogContent,{children:(0,i.jsxs)(r.Box,{sx:{display:`flex`,flexDirection:`column`,gap:2,pt:1},children:[l&&(0,i.jsx)(r.Alert,{severity:`error`,onClose:()=>u(null),children:l.message}),(0,i.jsx)(Cd,{label:`Group Name`,name:`name`,formik:d,required:!0,disabled:d.isSubmitting,placeholder:`e.g., Computer Science 101`}),(0,i.jsx)(r.FormControlLabel,{control:(0,i.jsx)(r.Switch,{name:`read_only`,checked:d.values.read_only,onChange:d.handleChange,disabled:d.isSubmitting}),label:`Read-only group (only moderators can post)`}),(0,i.jsx)(r.Divider,{sx:{my:2}}),(0,i.jsx)(r.Typography,{color:`warning.main`,fontWeight:500,children:`You cannot add members later. Only admins can join a group after it is created`}),(0,i.jsxs)(r.Box,{children:[(0,i.jsx)(r.Typography,{variant:`subtitle2`,gutterBottom:!0,children:`Add Members`}),(0,i.jsx)(Td,{multiple:!0,label:`Search users to add`,value:d.values.members.map(e=>e.user),onChange:f,disabled:d.isSubmitting})]}),d.values.members.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.Typography,{variant:`subtitle2`,gutterBottom:!0,children:`Selected Members`}),d.values.members.map(e=>(0,i.jsxs)(r.Box,{sx:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:1},children:[(0,i.jsx)(r.Box,{sx:{flex:1},children:e.user.name}),(0,i.jsxs)(r.Select,{value:e.role,onChange:t=>p(e.userId,t.target.value),size:`small`,disabled:d.isSubmitting,sx:{mr:2},children:[(0,i.jsx)(r.MenuItem,{value:`member`,children:`Member`}),(0,i.jsx)(r.MenuItem,{value:`moderator`,children:`Moderator`})]}),(0,i.jsx)(r.IconButton,{size:`small`,onClick:()=>m(e.userId),disabled:d.isSubmitting,color:`error`,children:(0,i.jsx)(Jr,{})})]},e.userId))]})]})}),(0,i.jsxs)(r.DialogActions,{sx:{p:3},children:[(0,i.jsx)(r.Button,{onClick:h,disabled:d.isSubmitting,children:`Cancel`}),(0,i.jsx)(r.Button,{type:`submit`,variant:`contained`,disabled:d.isSubmitting||!d.isValid,startIcon:d.isSubmitting&&(0,i.jsx)(r.CircularProgress,{size:16}),children:`Create Group`})]})]})},Od=async t=>{let n=await e.a().getGroups(t);return await e.d.groups.clear(),await e.d.groups.bulkPut(n),n};function kd(e,t,r){let i,a;typeof e==`function`?(i=t||[],a=r):(i=[],a=t);let o=n.default.useRef({hasResult:!1,result:a,error:null}),[s,c]=n.default.useReducer(e=>e+1,0),l=n.default.useMemo(()=>{let t=typeof e==`function`?e():e;if(!t||typeof t.subscribe!=`function`)throw TypeError(e===t?`Given argument to useObservable() was neither a valid observable nor a function.`:`Observable factory given to useObservable() did not return a valid observable.`);if(!o.current.hasResult&&typeof window<`u`&&(typeof t.hasValue!=`function`||t.hasValue()))if(typeof t.getValue==`function`)o.current.result=t.getValue(),o.current.hasResult=!0;else{let e=t.subscribe(e=>{o.current.result=e,o.current.hasResult=!0});typeof e==`function`?e():e.unsubscribe()}return t},i);if(n.default.useDebugValue(o.current.result),n.default.useEffect(()=>{let e=l.subscribe(e=>{let{current:t}=o;(t.error!==null||t.result!==e)&&(t.error=null,t.result=e,t.hasResult=!0,c())},e=>{let{current:t}=o;t.error!==e&&(t.error=e,c())});return typeof e==`function`?e:e.unsubscribe.bind(e)},i),o.current.error)throw o.current.error;return o.current.result}function Ad(t,n,r){return kd(()=>e.f.liveQuery(t),n||[],r)}typeof FinalizationRegistry<`u`&&new FinalizationRegistry(t=>{let n=e.f.DexieYProvider;n&&n.release(t)}),Reflect.get(n,`use`);var jd=({selectedConversation:t,currentUser:a,onConversationSelect:o})=>{let[s,c]=(0,n.useState)(!0),[l,u]=(0,n.useState)(),[d,f]=(0,n.useState)(!1),p=Ad(()=>e.d.summaries.toArray(),[t])||[],m=Ad(()=>e.d.groups.toArray(),[])||[],h=a?.role===`admin`||a?.role===`system`,g=(0,n.useCallback)(async()=>{c(!0),a?.org&&(await Promise.all([e.t({}),Od(a?.org)]).catch(e=>{u(e instanceof Error?e:Error(String(e)))}),c(!1))},[a?.org]);(0,n.useEffect)(()=>{g();let e=setInterval(g,3*6e4);return()=>clearInterval(e)},[g]);let[_,v]=(0,n.useState)({});(0,n.useEffect)(()=>{p.length>0&&a?.org&&(async()=>{if(!a?.org)return;let t=e.a(),n={};for(let e of p)try{if(e.user!==void 0&&!_[e.user]){let r=await t.getUser(e.user);n[e.user]=r.name}}catch(e){console.error(`Failed to load conversation name:`,e)}Object.keys(n).length>0&&v(e=>({...e,...n}))})()},[p,a?.org]);let y=e=>e.user===void 0?e.group===void 0?`Unknown`:m.find(t=>t.id===e.group)?.name||`Group ${e.group}`:_[e.user]||`User ${e.user}`,b=e=>t?e.group===void 0?e.user===void 0?!1:t.type===`dm`&&t.id===e.user:t.type===`group`&&t.id===e.group:!1,x=e=>{e.group===void 0?e.user!==void 0&&o({type:`dm`,id:e.user,name:y(e)}):o({type:`group`,id:e.group,name:y(e)})};return(0,i.jsxs)(r.Box,{display:`flex`,flexDirection:`column`,height:`100%`,children:[(0,i.jsx)(r.AppBar,{position:`static`,elevation:0,sx:{backgroundColor:`background.default`,color:`text.primary`},children:(0,i.jsxs)(r.Toolbar,{children:[(0,i.jsx)(r.Typography,{variant:`h6`,component:`div`,sx:{flexGrow:1},children:`Messages`}),h&&(0,i.jsx)(r.Tooltip,{title:`Create Group`,children:(0,i.jsx)(r.IconButton,{color:`primary`,onClick:()=>f(!0),size:`small`,sx:{mr:-2},children:(0,i.jsx)(Wr,{})})})]})}),h&&a?.org&&(0,i.jsx)(Dd,{open:d,onClose:()=>f(!1),onSuccess:async()=>{await g()},orgId:a.org}),(0,i.jsx)(r.Box,{flex:1,overflow:`auto`,children:s&&!p.length?(0,i.jsx)(r.List,{disablePadding:!0,children:[1,2,3,4,5].map(e=>(0,i.jsx)(ci,{},e))}):l?(0,i.jsx)(r.Box,{p:2,children:(0,i.jsxs)(r.Alert,{severity:`error`,children:[`Failed to load conversations: `,l.message]})}):p.length===0&&m.length===0?(0,i.jsx)(r.Box,{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`,p:2,children:(0,i.jsx)(r.Typography,{color:`text.secondary`,align:`center`,children:`No conversations yet`})}):(0,i.jsx)(r.List,{disablePadding:!0,children:(()=>{let e=new Set(p.filter(e=>e.group!==void 0).map(e=>e.group)),t=m.filter(t=>!e.has(t.id)).map(e=>({group:e.id,last_message_at:e.created_at,message_count:0,unread_count:0}));return[...[...p].sort((e,t)=>new Date(t.last_message_at).getTime()-new Date(e.last_message_at).getTime()),...t].map(e=>(0,i.jsx)(si,{conversation:e,displayName:y(e),selected:b(e),onClick:()=>x(e),currentUser:a},e.group===void 0?`user-${e.user}`:`group-${e.group}`))})()})})]})},Md=({displayName:e,type:t,subtitle:a,isConnected:o=!0,onBack:s,showJoinButton:c=!1,onJoin:l,joining:u=!1})=>{let d=t===`group`,[f,p]=(0,n.useState)(null),m=e=>{p(e.currentTarget)},h=()=>{p(null)},g=e=>{l(e),h()};return(0,i.jsx)(r.AppBar,{position:`static`,elevation:0,sx:{backgroundColor:`background.default`,color:`text.primary`},children:(0,i.jsxs)(r.Toolbar,{children:[s&&(0,i.jsx)(r.IconButton,{edge:`start`,color:`inherit`,onClick:s,sx:{mr:2,display:{xs:`flex`,sm:`flex`,md:`none`}},children:(0,i.jsx)(Gr,{})}),(0,i.jsx)(r.Avatar,{sx:{bgcolor:d?`primary.main`:`secondary.main`,mr:2},children:d?(0,i.jsx)(Zr,{}):(0,i.jsx)(Qr,{})}),(0,i.jsxs)(r.Box,{flex:1,children:[(0,i.jsx)(r.Typography,{variant:`h6`,component:`div`,noWrap:!0,children:e}),a&&(0,i.jsx)(r.Typography,{variant:`caption`,color:`inherit`,sx:{opacity:.7},children:a})]}),c&&d&&(0,i.jsxs)(r.Box,{sx:{display:`flex`,alignItems:`center`,mr:1},children:[(0,i.jsx)(r.Button,{variant:`contained`,color:`primary`,startIcon:(0,i.jsx)($r,{}),endIcon:(0,i.jsx)(Kr,{}),onClick:m,disabled:u,children:u?`Joining...`:`Join`}),(0,i.jsxs)(r.Menu,{anchorEl:f,open:!!f,onClose:h,children:[(0,i.jsx)(r.MenuItem,{onClick:()=>g(`member`),children:`Member`}),(0,i.jsx)(r.MenuItem,{onClick:()=>g(`moderator`),children:`Moderator`})]})]}),!o&&(0,i.jsx)(r.Chip,{icon:(0,i.jsx)(ai,{}),label:`Disconnected`,size:`small`,color:`warning`,sx:{ml:1}})]})})};function Nd(e){return(typeof e==`string`?new Date(e):e).toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0})}var Pd=n.default.memo(({message:t,isOwnMessage:n,senderName:a,showSenderName:o=!0,isFirstInGroup:s=!0,isLastInGroup:c=!0,status:l=`sent`})=>{let u=t.id.startsWith(`temp-`),d=()=>{if(!n||!c)return null;let e={fontSize:14,ml:.5,opacity:.7,verticalAlign:`middle`};return l===`failed`?(0,i.jsx)(Xr,{sx:{...e,color:`error.main`}}):l===`sending`||u?(0,i.jsx)(ti,{sx:e}):(0,i.jsx)(Yr,{sx:e})},f=(0,i.jsx)(r.Avatar,{sx:{width:32,height:32,fontSize:`0.875rem`,color:n?`primary.contrastText`:`secondary.contrastText`,bgcolor:n?`primary.main`:`secondary.main`,visibility:c?`visible`:`hidden`},children:e.l(a)});return(0,i.jsxs)(r.Box,{display:`flex`,justifyContent:n?`flex-end`:`flex-start`,alignItems:`flex-end`,mb:c?1:.25,gap:1,children:[!n&&f,(0,i.jsxs)(r.Paper,{elevation:1,sx:{maxWidth:`80%`,p:1.5,backgroundColor:n?`primary.main`:`background.paper`,color:n?`primary.contrastText`:`text.primary`,borderTopLeftRadius:n||!s?void 0:4,borderTopRightRadius:!n||!s?void 0:4,borderBottomLeftRadius:n||!c?void 0:4,borderBottomRightRadius:!n||!c?void 0:4},children:[!n&&o&&s&&(0,i.jsx)(r.Typography,{variant:`caption`,fontWeight:`bold`,display:`block`,mb:.5,children:a||`User ${t.sender}`}),(0,i.jsx)(r.Typography,{variant:`body1`,sx:{whiteSpace:`pre-wrap`},children:t.content}),c&&(0,i.jsxs)(r.Box,{display:`flex`,justifyContent:`flex-end`,alignItems:`center`,mt:.5,children:[(0,i.jsx)(r.Typography,{variant:`caption`,color:n?`inherit`:`text.secondary`,sx:{opacity:.7},children:Nd(new Date(t.created_at))}),(0,i.jsx)(d,{})]})]}),n&&f]})}),Fd=({isOwnMessage:e=!1})=>(0,i.jsx)(r.Box,{display:`flex`,justifyContent:e?`flex-end`:`flex-start`,mb:1,children:(0,i.jsxs)(r.Box,{maxWidth:`70%`,children:[!e&&(0,i.jsx)(r.Skeleton,{variant:`text`,width:80,sx:{mb:.5}}),(0,i.jsx)(r.Skeleton,{variant:`rounded`,width:Math.random()*200+150,height:60,sx:{borderRadius:2,bgcolor:e?`primary.light`:`background.main`}})]})}),Id=({hasMore:e,loading:t,onLoadMore:a,threshold:o=1,rootMargin:s=`100px`})=>{let c=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!e||t)return;let n=c.current;if(n)return l.current=new IntersectionObserver(n=>{let[r]=n;r&&r.isIntersecting&&e&&!t&&a()},{threshold:o,rootMargin:s}),l.current.observe(n),()=>{l.current&&n&&(l.current.unobserve(n),l.current.disconnect())}},[e,t,a,o,s]),e?(0,i.jsx)(r.Box,{ref:c,display:`flex`,justifyContent:`center`,alignItems:`center`,py:2,children:t?(0,i.jsx)(r.CircularProgress,{size:24}):(0,i.jsx)(r.Typography,{variant:`caption`,color:`text.secondary`,children:`Scroll to load more`})}):null},Ld=(e,t,r)=>{(0,n.useEffect)(()=>((async()=>{await e()})(),r),t)};function Rd(e){let t=e.map(e=>Number(e.sender));return new Set(t)}function zd(t){let r=e.a(),[i,a]=(0,n.useState)(()=>new Map),o=(0,n.useCallback)(async()=>{if(!t.length)return i;try{let n=Rd(t),a=Array.from(n);if(console.log(`[names] size:`,n.size),!n.size)return i;let o=(await e.d.users.bulkGet(a)).filter(e=>!!e),s=new Map;if(o.forEach(e=>{s.set(e.id,e.name)}),n.size===o.length)return s;let c=a.filter(e=>!s.has(e)),l=await r.getUsers(c,{fields:[`id`,`name`]});await e.d.users.bulkPut(l);let u=s;return l.forEach(e=>u.set(e.id,e.name)),u}catch(e){console.error(`[useSenderNames] Failed to fetch users:`,e)}return i},[t,i]);return Ld(async()=>{a(await o())},[t]),i}var Bd=({messages:t,currentUserId:a,loading:o=!1,error:s=null,autoScroll:c=!0,hasMore:l=!1,loadingMore:u=!1,onLoadMore:d})=>{let f=(0,n.useRef)(null),p=(0,n.useRef)(null),m=(0,n.useRef)(0),h=(0,n.useRef)(!0),[g,_]=(0,n.useState)(c),v=zd(t),y=()=>{if(!p.current)return!1;let{scrollTop:e,scrollHeight:t,clientHeight:n}=p.current;return t-e-n<100};return(0,n.useEffect)(()=>{t.length>0&&f.current&&(f.current.scrollIntoView({behavior:`auto`}),h.current=!0)},[]),(0,n.useEffect)(()=>{!u||!t.length||(p.current&&(m.current=p.current.scrollHeight),_(!1))},[u]),(0,n.useLayoutEffect)(()=>{if(t.length){if(g&&f.current&&h.current)f.current.scrollIntoView({behavior:`smooth`});else if(!g&&p.current&&m.current>0){let e=p.current.scrollHeight-m.current;p.current.scrollTop=p.current.scrollTop+e,m.current=0,_(!0)}}},[t.length,c]),o&&!t.length?(0,i.jsx)(r.Box,{flex:1,overflow:`auto`,p:2,children:[1,2,3,4,5].map(e=>(0,i.jsx)(Fd,{isOwnMessage:e%3==0},e))}):s&&!t.length?(0,i.jsx)(r.Box,{display:`flex`,justifyContent:`center`,alignItems:`center`,flex:1,p:2,children:(0,i.jsxs)(r.Alert,{severity:`error`,children:[(0,i.jsx)(`strong`,{children:`Failed to load messages`}),(0,i.jsx)(`br`,{}),s.message]})}):t.length===0?(0,i.jsx)(r.Box,{display:`flex`,justifyContent:`center`,alignItems:`center`,flex:1,children:(0,i.jsx)(r.Typography,{variant:`body2`,color:`text.secondary`,children:`No messages yet. Start the conversation!`})}):(0,i.jsxs)(r.Box,{ref:p,flex:1,overflow:`auto`,p:2,display:`flex`,flexDirection:`column`,onScroll:()=>{h.current=y()},children:[l&&d&&(0,i.jsx)(Id,{hasMore:l,loading:u,onLoadMore:d}),t.map((n,r)=>{let o=n.sender,s=n.sender===a,c=v.get(o),l=r>0?t[r-1]:null,u=r<t.length-1?t[r+1]:null,d=!l||!e.u(l,n);return(0,i.jsx)(Pd,{message:n,isOwnMessage:s,senderName:c,showSenderName:d,isFirstInGroup:d,isLastInGroup:!u||!e.u(n,u)},n.id)}),(0,i.jsx)(`div`,{ref:f})]})},Vd=({onSend:e,sending:t=!1,placeholder:a=`Type a message...`,disabled:o=!1})=>{let[s,c]=(0,n.useState)(``),l=(0,n.useRef)(null),u=()=>{let n=s.trim();n&&!t&&!o&&(e(n),c(``),setTimeout(()=>{l.current?.querySelector(`textarea`)?.focus()},300))};return(0,i.jsxs)(r.Box,{display:`flex`,gap:1,p:2,borderTop:1,borderColor:`divider`,children:[(0,i.jsx)(r.TextField,{ref:l,fullWidth:!0,multiline:!0,maxRows:4,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),u())},placeholder:a,disabled:o||t,variant:`outlined`,size:`small`}),(0,i.jsx)(r.IconButton,{color:`primary`,onClick:u,disabled:!s.trim()||t||o,size:`large`,children:t?(0,i.jsx)(r.CircularProgress,{size:24}):(0,i.jsx)(ni,{})})]})};function Hd({conversation:t,limit:r=50}){let i=e.p(t),[a,o]=(0,n.useState)(!1),[s,c]=(0,n.useState)(!1),[l,u]=(0,n.useState)(),d=Ad(()=>e.d.messages.where(`conversationId`).equals(i).sortBy(`created_at`),[i])||[],f=Ad(()=>e.d.msgCursor.where(`id`).equals(i).first(),[i]);return Ld(async()=>{let n={limit:r};d.length&&(n.cursorType=`after`,n.cursorDatetime=d[d.length-1]?.created_at),o(!0),await e.c(t,n).catch(u),o(!1),await e.d.summaries.update(i,{unread_count:0})},[t,r]),console.log(`mw`,d.length),{messages:d,cursor:f,loading:a,error:l,loadMore:(0,n.useCallback)(async()=>{if(!(!f||s||a)){c(!0);try{let n={limit:r};if(!f?.datetime)return;n.cursorType=`before`,n.cursorDatetime=f.datetime,await e.c(t,n)}catch(e){console.error(`[useMessages] Failed to load more:`,e)}c(!1)}},[f,r,t,s,a]),loadingMore:s}}var Ud=({conversation:t,user:a,isConnected:s,onBack:c})=>{let l=e.a(),{messages:u,cursor:d,loading:f,error:p,loadMore:m,loadingMore:h}=Hd({conversation:t}),g=Ad(async()=>t.type===`group`?await e.d.groups.get(t.id):null,[t.id,t.type]),_=a?.role===`admin`,v=g?.is_member??!0,y=_&&t.type===`group`&&!v,b=t.type===`group`&&!v,[x,S]=(0,n.useState)(!1),[C,w]=(0,n.useState)(!1),T=async n=>{if(t.type===`group`){S(!0);try{await l.joinGroup(a.org,t.id,n),w(!0),await Od(a.org),await e.t({}),setTimeout(()=>w(!1),3e3)}catch(e){D(o(e,`Failed to join group`))}S(!1)}},[E,ee]=(0,n.useState)(!1),[te,D]=(0,n.useState)(null),[O,k]=(0,n.useState)(!1);return(0,i.jsxs)(r.Box,{display:`flex`,flexDirection:`column`,height:`100%`,children:[(0,i.jsx)(Md,{displayName:t.name||`Chat`,type:t.type,isConnected:s,onBack:c,showJoinButton:y,onJoin:T,joining:x}),(0,i.jsx)(r.Snackbar,{open:C,autoHideDuration:3e3,onClose:()=>w(!1),message:`Successfully joined group`}),te&&(0,i.jsx)(r.Alert,{severity:`error`,onClose:()=>D(null),children:te.message}),(0,i.jsx)(Bd,{messages:u,currentUserId:a?.id||0,loading:f,error:p,autoScroll:!0,hasMore:!!d?.datetime,loadingMore:h,onLoadMore:m,forceScrollToBottom:O}),b?(0,i.jsx)(r.Alert,{severity:`warning`,sx:{m:2},children:`You must be a group member to send messages`}):(0,i.jsx)(Vd,{onSend:async n=>{if(!n.trim())return;ee(!0),D(null),k(!0);let r=`temp-${Date.now()}-${Math.random()}`,i={id:r,sender:a?.id,receiver:t.type===`dm`?t.id:null,group:t.type===`group`?t.id:null,content:n,created_at:new Date().toISOString(),conversationId:e.p(t)};try{await e.d.messages.put(i),await(t.type===`group`?l.sendGroupMessage:l.sendDM).bind(l)(t.id,n),await e.d.messages.delete(r)}catch(e){D(o(e,`Failed to send message`))}ee(!1),setTimeout(()=>k(!1),100)},sending:E})]})},Wd=class extends n.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`ErrorBoundary caught an error:`,e,t),this.props.onError?.(e,t)}handleReset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,i.jsxs)(r.Box,{display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,height:`100%`,p:3,children:[(0,i.jsxs)(r.Alert,{severity:`error`,sx:{mb:2,maxWidth:500},children:[(0,i.jsx)(r.Typography,{variant:`h6`,gutterBottom:!0,children:`Something went wrong`}),(0,i.jsx)(r.Typography,{variant:`body2`,color:`text.secondary`,children:this.state.error?.message||`An unexpected error occurred`})]}),(0,i.jsx)(r.Button,{variant:`contained`,startIcon:(0,i.jsx)(ei,{}),onClick:this.handleReset,children:`Try Again`})]}):this.props.children}};function Gd({onMessage:t,onConnect:r,onDisconnect:i,onError:a}={}){let[o,s]=(0,n.useState)(!1),c=(0,n.useCallback)(e=>{t?.(e)},[t]),l=(0,n.useCallback)(()=>{s(!0),r?.()},[r]),u=(0,n.useCallback)(()=>{s(!1),i?.()},[i]),d=(0,n.useCallback)(e=>{a?.(e)},[a]);return(0,n.useEffect)(()=>{if(e.s())try{let t=e.a();return s(t.isConnected()),t.on(`message`,c),t.on(`open`,l),t.on(`close`,u),t.on(`error`,d),()=>{t.off(`message`,c),t.off(`open`,l),t.off(`close`,u),t.off(`error`,d)}}catch(e){console.error(`Failed to setup WebSocket listeners:`,e)}},[c,l,u,d]),{isConnected:o}}var Kd=({initialConversation:t})=>{let[a,o]=(0,n.useState)(t??null),[s,c]=(0,n.useState)(),[l,u]=(0,n.useState)(!0),d=(0,n.useCallback)(e=>()=>u(e),[]),f=e.a();return Ld(async()=>{let t=await f.getMe();c(t),e.d.users.put(t)},[]),Gd({onError:d(!1),onConnect:d(!0),onDisconnect:d(!1)}),(0,i.jsxs)(r.Box,{display:`flex`,height:`100%`,overflow:`hidden`,children:[(0,i.jsx)(r.Box,{sx:{width:{xs:`100%`,sm:`100%`,md:`320px`},flexShrink:0,border:`0px solid`,borderRightWidth:{xs:0,md:1},borderColor:`divider`,overflow:`hidden`,display:{xs:a?`none`:`flex`,sm:a?`none`:`flex`,md:`flex`},flexDirection:`column`},children:(0,i.jsx)(Wd,{children:(0,i.jsx)(jd,{currentUser:s,selectedConversation:a,onConversationSelect:t=>{o(t),e.n(e.p(t))}})})}),(0,i.jsx)(r.Box,{sx:{flex:1,overflow:`hidden`,display:{xs:a?`flex`:`none`,sm:a?`flex`:`none`,md:`flex`},flexDirection:`column`},children:a?(0,i.jsx)(Wd,{children:(0,i.jsx)(Ud,{conversation:a,user:s,isConnected:l,onBack:()=>{o(null),e.n(null)}})}):(0,i.jsx)(r.Box,{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`,color:`text.secondary`,children:`Select a conversation to start chatting`})})]})},qd=({count:e,children:t,max:n=99})=>(0,i.jsx)(r.Badge,{badgeContent:e,color:`error`,max:n,overlap:`rectangular`,sx:{"& .MuiBadge-badge":{right:8,top:`50%`,transform:`translateY(-50%)`}},children:t});function Jd(){return Ad(()=>e.d.summaries.toArray().then(e=>e.reduce((e,t)=>e+t.unread_count,0)),[],void 0)}var Yd={SUMMARIES:300*1e3,USER:3600*1e3,MESSAGES:1/0},Xd=()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches,Zd={mode:`dark`,background:{paper:`#3d3d43`,default:`#333338`},text:{primary:`#eee`,secondary:`#aaa`}},Qd={mode:`light`,background:{default:`#f5f5f5`,paper:`#ffff`}},$d=e=>{let t=Xd(),n=(e||(t?`dark`:`light`))===`dark`;return Mr({palette:{...n?Zd:Qd,primary:{main:`#E91E63`,light:`#F48FB1`,dark:`#AD1457`,contrastText:`#fff`},secondary:{main:`#e4e6eb`,light:`#f0f2f5`,dark:`#b0b3b8`,contrastText:`rgba(0, 0, 0, 0.87)`},error:{main:`#d32f2f`,light:`#ef5350`,dark:`#c62828`,contrastText:`#fff`},warning:{main:`#ed6c02`,light:`#ff9800`,dark:`#e65100`,contrastText:`#fff`},info:{main:`#0288d1`,light:`#03a9f4`,dark:`#01579b`,contrastText:`#fff`},success:{main:`#2e7d32`,light:`#4caf50`,dark:`#1b5e20`,contrastText:`#fff`}},typography:{fontFamily:[`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`].join(`,`),fontSize:14,h1:{fontSize:`2.5rem`,fontWeight:500},h2:{fontSize:`2rem`,fontWeight:500},h3:{fontSize:`1.75rem`,fontWeight:500},h4:{fontSize:`1.5rem`,fontWeight:500},h5:{fontSize:`1.25rem`,fontWeight:500},h6:{fontSize:`1rem`,fontWeight:500},body1:{fontSize:`0.9375rem`,lineHeight:1.4},body2:{fontSize:`0.8125rem`,lineHeight:1.4}},shape:{borderRadius:12},components:{MuiButton:{styleOverrides:{root:{textTransform:`none`,fontWeight:500,borderRadius:20}}},MuiIconButton:{styleOverrides:{root:{borderRadius:`50%`}}},MuiPaper:{styleOverrides:{root:{backgroundImage:`none`},rounded:{borderRadius:12}}},MuiBadge:{styleOverrides:{badge:{fontSize:`0.6875rem`,height:18,minWidth:18,borderRadius:9,fontWeight:600}}},MuiCssBaseline:{styleOverrides:{body:{"*::-webkit-scrollbar":{width:`8px`,height:`8px`},"*::-webkit-scrollbar-track":{background:`undo`,borderRadius:`4px`},"*::-webkit-scrollbar-thumb":{background:`undo`,borderRadius:`4px`,"&:hover":{background:`undo`}},scrollbarWidth:`thin`,scrollbarColor:n?`#6a6a6e #333338`:`#c1c1c1 #f5f5f5`}}}}})},ef=$d();exports.CACHE_TTL=Yd,exports.ChatApp=l,exports.ChatContainer=Kd,exports.ChatHeader=Md,exports.ChatWindow=Ud,exports.ConversationItem=si,exports.ConversationItemSkeleton=ci,exports.ConversationList=jd,exports.CreateGroupDialog=Dd,exports.ErrorBoundary=Wd,exports.LoadMoreTrigger=Id,exports.MessageBubble=Pd,exports.MessageInput=Vd,exports.MessageList=Bd,exports.MessageSkeleton=Fd,exports.UnreadBadge=qd,exports.db=e.d,exports.disconnectSDK=e.i,exports.fetchSummaries=e.t,exports.getSDK=e.a,exports.getTheme=$d,exports.initSDK=e.o,exports.isSDKInitialized=e.s,exports.theme=ef,exports.useMessages=Hd,exports.useSenderNames=zd,exports.useUnreadCount=Jd,exports.useWebSocket=Gd;