diff --git a/.github/workflows/test-push.yml b/.github/workflows/test-push.yml new file mode 100644 index 0000000..77d2387 --- /dev/null +++ b/.github/workflows/test-push.yml @@ -0,0 +1,17 @@ +name: Test PUSH action +on: push +jobs: + test: + runs-on: ubuntu-latest #nodejs preinstalled on the ubuntu runner + steps: + #action needs specific access to download the code from the repository onto this runner or this server + - name: Get code + uses: actions/checkout@v4 + - name: Install NodeJS + uses: actions/setup-node@v4 + with: + node-version: 18 + - name: Install dependencies + run: npm ci #npm ci is best practice over npm i + - name: Run tests + run: npm test \ No newline at end of file diff --git a/flake-guard-app/.gitignore b/flake-guard-app/.gitignore index a682e36..cec19d1 100644 --- a/flake-guard-app/.gitignore +++ b/flake-guard-app/.gitignore @@ -2,6 +2,7 @@ node_modules .env .DS_Store build/ -dist/ +dist/* coverage/ -package-lock.json \ No newline at end of file +package-lock.json +dist/ \ No newline at end of file diff --git a/flake-guard-app/dist/591.bundle.js b/flake-guard-app/dist/591.bundle.js new file mode 100644 index 0000000..080b45a --- /dev/null +++ b/flake-guard-app/dist/591.bundle.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflake_guard=self.webpackChunkflake_guard||[]).push([[591],{1591:e=>{e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}}]); \ No newline at end of file diff --git a/flake-guard-app/dist/bundle.js b/flake-guard-app/dist/bundle.js new file mode 100644 index 0000000..f8f4187 --- /dev/null +++ b/flake-guard-app/dist/bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see bundle.js.LICENSE.txt */ +(()=>{var e,t,n,r,i={4603:(e,t,n)=>{"use strict";e.exports=n(3853)},907:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Headers:()=>a,Request:()=>s,Response:()=>l,default:()=>o,fetch:()=>i});var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw new Error("unable to locate global object")}();const i=r.fetch,o=r.fetch.bind(r),a=r.Headers,s=r.Request,l=r.Response},6191:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AuthAdminApi:()=>wt,AuthApiError:()=>Ue,AuthClient:()=>kt,AuthError:()=>Fe,AuthImplicitGrantRedirectError:()=>Ke,AuthInvalidCredentialsError:()=>Je,AuthInvalidTokenResponseError:()=>Ge,AuthPKCEGrantCodeExchangeError:()=>$e,AuthRetryableFetchError:()=>Ze,AuthSessionMissingError:()=>Ye,AuthUnknownError:()=>We,AuthWeakPasswordError:()=>Xe,CustomAuthError:()=>Ve,FunctionRegion:()=>s,FunctionsError:()=>r,FunctionsFetchError:()=>i,FunctionsHttpError:()=>a,FunctionsRelayError:()=>o,GoTrueAdminApi:()=>ut,GoTrueClient:()=>xt,NavigatorLockAcquireTimeoutError:()=>gt,REALTIME_CHANNEL_STATES:()=>U,REALTIME_LISTEN_TYPES:()=>F,REALTIME_POSTGRES_CHANGES_LISTEN_EVENT:()=>z,REALTIME_PRESENCE_LISTEN_EVENTS:()=>_,REALTIME_SUBSCRIBE_STATES:()=>B,RealtimeChannel:()=>H,RealtimeClient:()=>Y,RealtimePresence:()=>P,SupabaseClient:()=>Ct,createClient:()=>At,isAuthApiError:()=>He,isAuthError:()=>Be,isAuthRetryableFetchError:()=>qe,isAuthWeakPasswordError:()=>Qe,lockInternals:()=>ft,navigatorLock:()=>mt});class r extends Error{constructor(e,t="FunctionsError",n){super(e),this.name=t,this.context=n}}class i extends r{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class o extends r{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class a extends r{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var s;!function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"}(s||(s={}));class l{constructor(e,{headers:t={},customFetch:r,region:i=s.Any}={}){this.url=e,this.headers=t,this.region=i,this.fetch=(e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)})(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,t={}){var n,r,s,l,c;return r=this,s=void 0,c=function*(){try{const{headers:r,method:s,body:l}=t;let c,u={},{region:d}=t;d||(d=this.region),d&&"any"!==d&&(u["x-region"]=d),l&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&("undefined"!=typeof Blob&&l instanceof Blob||l instanceof ArrayBuffer?(u["Content-Type"]="application/octet-stream",c=l):"string"==typeof l?(u["Content-Type"]="text/plain",c=l):"undefined"!=typeof FormData&&l instanceof FormData?c=l:(u["Content-Type"]="application/json",c=JSON.stringify(l)));const h=yield this.fetch(`${this.url}/${e}`,{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},u),this.headers),r),body:c}).catch((e=>{throw new i(e)})),f=h.headers.get("x-relay-error");if(f&&"true"===f)throw new o(h);if(!h.ok)throw new a(h);let p,g=(null!==(n=h.headers.get("Content-Type"))&&void 0!==n?n:"text/plain").split(";")[0].trim();return p="application/json"===g?yield h.json():"application/octet-stream"===g?yield h.blob():"text/event-stream"===g?h:"multipart/form-data"===g?yield h.formData():yield h.text(),{data:p,error:null}}catch(e){return{data:null,error:e}}},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{o(c.next(e))}catch(e){t(e)}}function i(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof l?r:new l((function(e){e(r)}))).then(n,i)}o((c=c.apply(r,s||[])).next())}))}}var c=n(907);class u extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}class d{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:"undefined"==typeof fetch?this.fetch=c.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),"GET"!==this.method&&"HEAD"!==this.method&&(this.headers["Content-Type"]="application/json");let n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then((async e=>{var t,n,r;let i=null,o=null,a=null,s=e.status,l=e.statusText;if(e.ok){if("HEAD"!==this.method){const t=await e.text();""===t||(o="text/csv"===this.headers.Accept||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?t:JSON.parse(t))}const r=null===(t=this.headers.Prefer)||void 0===t?void 0:t.match(/count=(exact|planned|estimated)/),c=null===(n=e.headers.get("content-range"))||void 0===n?void 0:n.split("/");r&&c&&c.length>1&&(a=parseInt(c[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(o)&&(o.length>1?(i={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,a=null,s=406,l="Not Acceptable"):o=1===o.length?o[0]:null)}else{const t=await e.text();try{i=JSON.parse(t),Array.isArray(i)&&404===e.status&&(o=[],i=null,s=200,l="OK")}catch(n){404===e.status&&""===t?(s=204,l="No Content"):i={message:t}}if(i&&this.isMaybeSingle&&(null===(r=null==i?void 0:i.details)||void 0===r?void 0:r.includes("0 rows"))&&(i=null,s=200,l="OK"),i&&this.shouldThrowOnError)throw new u(i)}return{error:i,data:o,count:a,status:s,statusText:l}}));return this.shouldThrowOnError||(n=n.catch((e=>{var t,n,r;return{error:{message:`${null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError"}: ${null==e?void 0:e.message}`,details:`${null!==(n=null==e?void 0:e.stack)&&void 0!==n?n:""}`,hint:"",code:`${null!==(r=null==e?void 0:e.code)&&void 0!==r?r:""}`},data:null,count:null,status:0,statusText:""}}))),n.then(e,t)}}class h extends d{select(e){let t=!1;const n=(null!=e?e:"*").split("").map((e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e))).join("");return this.url.searchParams.set("select",n),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${void 0===n?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=void 0===n?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const i=void 0===r?"offset":`${r}.offset`,o=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(o,""+(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return"GET"===this.method?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:o="text"}={}){var a;const s=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(a=this.headers.Accept)&&void 0!==a?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${l}"; options=${s};`,this}rollback(){var e;return(null!==(e=this.headers.Prefer)&&void 0!==e?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class f extends h{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map((e=>"string"==typeof e&&new RegExp("[,()]").test(e)?`"${e}"`:`${e}`)).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let i="";"plain"===r?i="pl":"phrase"===r?i="ph":"websearch"===r&&(i="w");const o=void 0===n?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach((([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)})),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}}class p{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=t,this.schema=n,this.fetch=r}select(e,{head:t=!1,count:n}={}){const r=t?"HEAD":"GET";let i=!1;const o=(null!=e?e:"*").split("").map((e=>/\s/.test(e)&&!i?"":('"'===e&&(i=!i),e))).join("");return this.url.searchParams.set("select",o),n&&(this.headers.Prefer=`count=${n}`),new f({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:t,defaultToNull:n=!0}={}){const r=[];if(this.headers.Prefer&&r.push(this.headers.Prefer),t&&r.push(`count=${t}`),n||r.push("missing=default"),this.headers.Prefer=r.join(","),Array.isArray(e)){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]);if(t.length>0){const e=[...new Set(t)].map((e=>`"${e}"`));this.url.searchParams.set("columns",e.join(","))}}return new f({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){const o=[`resolution=${n?"ignore":"merge"}-duplicates`];if(void 0!==t&&this.url.searchParams.set("on_conflict",t),this.headers.Prefer&&o.push(this.headers.Prefer),r&&o.push(`count=${r}`),i||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(e)){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]);if(t.length>0){const e=[...new Set(t)].map((e=>`"${e}"`));this.url.searchParams.set("columns",e.join(","))}}return new f({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:t}={}){const n=[];return this.headers.Prefer&&n.push(this.headers.Prefer),t&&n.push(`count=${t}`),this.headers.Prefer=n.join(","),new f({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const t=[];return e&&t.push(`count=${e}`),this.headers.Prefer&&t.unshift(this.headers.Prefer),this.headers.Prefer=t.join(","),new f({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const g={"X-Client-Info":"postgrest-js/1.15.2"};class m{constructor(e,{headers:t={},schema:n,fetch:r}={}){this.url=e,this.headers=Object.assign(Object.assign({},g),t),this.schemaName=n,this.fetch=r}from(e){const t=new URL(`${this.url}/${e}`);return new p(t,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new m(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let o;const a=new URL(`${this.url}/rpc/${e}`);let s;n||r?(o=n?"HEAD":"GET",Object.entries(t).filter((([e,t])=>void 0!==t)).map((([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`])).forEach((([e,t])=>{a.searchParams.append(e,t)}))):(o="POST",s=t);const l=Object.assign({},this.headers);return i&&(l.Prefer=`count=${i}`),new f({method:o,url:a,headers:l,schema:this.schemaName,body:s,fetch:this.fetch,allowEmpty:!1})}}const b={"X-Client-Info":"realtime-js/2.9.5"};var y,v,x,w,k,_,C;!function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"}(y||(y={})),function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"}(v||(v={})),function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"}(x||(x={})),function(e){e.websocket="websocket"}(w||(w={})),function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"}(k||(k={}));class A{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}}class S{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t("string"==typeof e?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,t,n)}_decodeBroadcast(e,t,n){const r=t.getUint8(1),i=t.getUint8(2);let o=this.HEADER_LENGTH+2;const a=n.decode(e.slice(o,o+r));o+=r;const s=n.decode(e.slice(o,o+i));return o+=i,{ref:null,topic:a,event:s,payload:JSON.parse(n.decode(e.slice(o,e.byteLength)))}}}class E{constructor(e,t,n={},r=1e4){this.channel=e,this.event=t,this.payload=n,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var n;return this._hasReceived(e)&&t(null===(n=this.receivedResp)||void 0===n?void 0:n.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){this.timeoutTimer||(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},(e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)})),this.timeoutTimer=setTimeout((()=>{this.trigger("timeout",{})}),this.timeout))}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter((t=>t.status===e)).forEach((e=>e.callback(t)))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}!function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"}(_||(_={}));class P{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},(e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.joinRef=this.channel._joinRef(),this.state=P.syncState(this.state,e,t,n),this.pendingDiffs.forEach((e=>{this.state=P.syncDiff(this.state,e,t,n)})),this.pendingDiffs=[],r()})),this.channel._on(n.diff,{},(e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=P.syncDiff(this.state,e,t,n),r())})),this.onJoin(((e,t,n)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:n})})),this.onLeave(((e,t,n)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:n})})),this.onSync((()=>{this.channel._trigger("presence",{event:"sync"})}))}static syncState(e,t,n,r){const i=this.cloneDeep(e),o=this.transformState(t),a={},s={};return this.map(i,((e,t)=>{o[e]||(s[e]=t)})),this.map(o,((e,t)=>{const n=i[e];if(n){const r=t.map((e=>e.presence_ref)),i=n.map((e=>e.presence_ref)),o=t.filter((e=>i.indexOf(e.presence_ref)<0)),l=n.filter((e=>r.indexOf(e.presence_ref)<0));o.length>0&&(a[e]=o),l.length>0&&(s[e]=l)}else a[e]=t})),this.syncDiff(i,{joins:a,leaves:s},n,r)}static syncDiff(e,t,n,r){const{joins:i,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return n||(n=()=>{}),r||(r=()=>{}),this.map(i,((t,r)=>{var i;const o=null!==(i=e[t])&&void 0!==i?i:[];if(e[t]=this.cloneDeep(r),o.length>0){const n=e[t].map((e=>e.presence_ref)),r=o.filter((e=>n.indexOf(e.presence_ref)<0));e[t].unshift(...r)}n(t,o,r)})),this.map(o,((t,n)=>{let i=e[t];if(!i)return;const o=n.map((e=>e.presence_ref));i=i.filter((e=>o.indexOf(e.presence_ref)<0)),e[t]=i,r(t,i,n),0===i.length&&delete e[t]})),e}static map(e,t){return Object.getOwnPropertyNames(e).map((n=>t(n,e[n])))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce(((t,n)=>{const r=e[n];return t[n]="metas"in r?r.metas.map((e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))):r,t}),{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}!function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"}(C||(C={}));const O=(e,t,n={})=>{var r;const i=null!==(r=n.skipTypes)&&void 0!==r?r:[];return Object.keys(t).reduce(((n,r)=>(n[r]=R(r,e,t,i),n)),{})},R=(e,t,n,r)=>{const i=t.find((t=>t.name===e)),o=null==i?void 0:i.type,a=n[e];return o&&!r.includes(o)?j(o,a):I(a)},j=(e,t)=>{if("_"===e.charAt(0)){const n=e.slice(1,e.length);return D(t,n)}switch(e){case C.bool:return T(t);case C.float4:case C.float8:case C.int2:case C.int4:case C.int8:case C.numeric:case C.oid:return M(t);case C.json:case C.jsonb:return N(t);case C.timestamp:return L(t);case C.abstime:case C.date:case C.daterange:case C.int4range:case C.int8range:case C.money:case C.reltime:case C.text:case C.time:case C.timestamptz:case C.timetz:case C.tsrange:case C.tstzrange:default:return I(t)}},I=e=>e,T=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},M=e=>{if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},N=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},D=(e,t)=>{if("string"!=typeof e)return e;const n=e.length-1,r=e[n];if("{"===e[0]&&"}"===r){let r;const i=e.slice(1,n);try{r=JSON.parse("["+i+"]")}catch(e){r=i?i.split(","):[]}return r.map((e=>j(t,e)))}return e},L=e=>"string"==typeof e?e.replace(" ","T"):e;var z,F,B;!function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"}(z||(z={})),function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"}(F||(F={})),function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"}(B||(B={}));const U=v;class H{constructor(e,t={config:{}},n){this.topic=e,this.params=t,this.socket=n,this.bindings={},this.state=v.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},t.config),this.timeout=this.socket.timeout,this.joinPush=new E(this,x.join,this.params,this.timeout),this.rejoinTimer=new A((()=>this._rejoinUntilConnected()),this.socket.reconnectAfterMs),this.joinPush.receive("ok",(()=>{this.state=v.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach((e=>e.send())),this.pushBuffer=[]})),this._onClose((()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=v.closed,this.socket._remove(this)})),this._onError((e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,e),this.state=v.errored,this.rejoinTimer.scheduleTimeout())})),this.joinPush.receive("timeout",(()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=v.errored,this.rejoinTimer.scheduleTimeout())})),this._on(x.reply,{},((e,t)=>{this._trigger(this._replyEventName(t),e)})),this.presence=new P(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(e,t=this.timeout){var n,r;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:i,presence:o}}=this.params;this._onError((t=>e&&e("CHANNEL_ERROR",t))),this._onClose((()=>e&&e("CLOSED")));const a={},s={broadcast:i,presence:o,postgres_changes:null!==(r=null===(n=this.bindings.postgres_changes)||void 0===n?void 0:n.map((e=>e.filter)))&&void 0!==r?r:[]};this.socket.accessToken&&(a.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:s},a)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",(({postgres_changes:t})=>{var n;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),void 0!==t){const r=this.bindings.postgres_changes,i=null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0,o=[];for(let n=0;n{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(t).join(", ")||"error")))})).receive("timeout",(()=>{e&&e("TIMED_OUT")}))}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,t,n){return this._on(e,t,n)}async send(e,t={}){var n,r;if(this._canPush()||"broadcast"!==e.type)return new Promise((n=>{var r,i,o;const a=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(o=null===(i=null===(r=this.params)||void 0===r?void 0:r.config)||void 0===i?void 0:i.broadcast)||void 0===o?void 0:o.ack)||n("ok"),a.receive("ok",(()=>n("ok"))),a.receive("error",(()=>n("error"))),a.receive("timeout",(()=>n("timed out")))}));{const{event:i,payload:o}=e,a={method:"POST",headers:{apikey:null!==(n=this.socket.apiKey)&&void 0!==n?n:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,a,null!==(r=t.timeout)&&void 0!==r?r:this.timeout)).ok?"ok":"error"}catch(e){return"AbortError"===e.name?"timed out":"error"}}}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=v.leaving;const t=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(x.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise((n=>{const r=new E(this,x.leave,{},e);r.receive("ok",(()=>{t(),n("ok")})).receive("timeout",(()=>{t(),n("timed out")})).receive("error",(()=>{n("error")})),r.send(),this._canPush()||r.trigger("ok",{})}))}_broadcastEndpointURL(){let e=this.socket.endPoint;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(e,t,n){const r=new AbortController,i=setTimeout((()=>r.abort()),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),o}_push(e,t,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new E(this,e,t,n);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,t,n){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,n){var r,i;const o=e.toLocaleLowerCase(),{close:a,error:s,leave:l,join:c}=x;if(n&&[a,s,l,c].indexOf(o)>=0&&n!==this._joinRef())return;let u=this._onMessage(o,t,n);if(t&&!u)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?null===(r=this.bindings.postgres_changes)||void 0===r||r.filter((e=>{var t,n,r;return"*"===(null===(t=e.filter)||void 0===t?void 0:t.event)||(null===(r=null===(n=e.filter)||void 0===n?void 0:n.event)||void 0===r?void 0:r.toLocaleLowerCase())===o})).map((e=>e.callback(u,n))):null===(i=this.bindings[o])||void 0===i||i.filter((e=>{var n,r,i,a,s,l;if(["broadcast","presence","postgres_changes"].includes(o)){if("id"in e){const o=e.id,a=null===(n=e.filter)||void 0===n?void 0:n.event;return o&&(null===(r=t.ids)||void 0===r?void 0:r.includes(o))&&("*"===a||(null==a?void 0:a.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{const n=null===(s=null===(a=null==e?void 0:e.filter)||void 0===a?void 0:a.event)||void 0===s?void 0:s.toLocaleLowerCase();return"*"===n||n===(null===(l=null==t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}return e.type.toLocaleLowerCase()===o})).map((e=>{if("object"==typeof u&&"ids"in u){const e=u.data,{schema:t,table:n,commit_timestamp:r,type:i,errors:o}=e,a={schema:t,table:n,commit_timestamp:r,eventType:i,new:{},old:{},errors:o};u=Object.assign(Object.assign({},a),this._getPayloadRecords(e))}e.callback(u,n)}))}_isClosed(){return this.state===v.closed}_isJoined(){return this.state===v.joined}_isJoining(){return this.state===v.joining}_isLeaving(){return this.state===v.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,n){const r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:n};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this}_off(e,t){const n=e.toLocaleLowerCase();return this.bindings[n]=this.bindings[n].filter((e=>{var r;return!((null===(r=e.type)||void 0===r?void 0:r.toLocaleLowerCase())===n&&H.isEqual(e.filter,t))})),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(x.close,{},e)}_onError(e){this._on(x.error,{},(t=>e(t)))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=v.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return"INSERT"!==e.type&&"UPDATE"!==e.type||(t.new=O(e.columns,e.record)),"UPDATE"!==e.type&&"DELETE"!==e.type||(t.old=O(e.columns,e.old_record)),t}}const W=()=>{},V="undefined"!=typeof WebSocket;class Y{constructor(e,t){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=b,this.params={},this.timeout=1e4,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=W,this.conn=null,this.sendBuffer=[],this.serializer=new S,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},this.endPoint=`${e}/${w.websocket}`,(null==t?void 0:t.transport)?this.transport=t.transport:this.transport=null,(null==t?void 0:t.params)&&(this.params=t.params),(null==t?void 0:t.headers)&&(this.headers=Object.assign(Object.assign({},this.headers),t.headers)),(null==t?void 0:t.timeout)&&(this.timeout=t.timeout),(null==t?void 0:t.logger)&&(this.logger=t.logger),(null==t?void 0:t.heartbeatIntervalMs)&&(this.heartbeatIntervalMs=t.heartbeatIntervalMs);const i=null===(r=null==t?void 0:t.params)||void 0===r?void 0:r.apikey;i&&(this.accessToken=i,this.apiKey=i),this.reconnectAfterMs=(null==t?void 0:t.reconnectAfterMs)?t.reconnectAfterMs:e=>[1e3,2e3,5e3,1e4][e-1]||1e4,this.encode=(null==t?void 0:t.encode)?t.encode:(e,t)=>t(JSON.stringify(e)),this.decode=(null==t?void 0:t.decode)?t.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new A((async()=>{this.disconnect(),this.connect()}),this.reconnectAfterMs),this.fetch=this._resolveFetch(null==t?void 0:t.fetch)}connect(){if(!this.conn)if(this.transport)this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});else{if(V)return this.conn=new WebSocket(this._endPointURL()),void this.setupConnection();this.conn=new G(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),n.e(591).then(n.t.bind(n,1591,23)).then((({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()}))}}disconnect(e,t){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,null!=t?t:""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const t=await e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t}async removeAllChannels(){const e=await Promise.all(this.channels.map((e=>e.unsubscribe())));return this.disconnect(),e}log(e,t,n){this.logger(e,t,n)}connectionState(){switch(this.conn&&this.conn.readyState){case y.connecting:return k.Connecting;case y.open:return k.Open;case y.closing:return k.Closing;default:return k.Closed}}isConnected(){return this.connectionState()===k.Open}channel(e,t={config:{}}){const n=new H(`realtime:${e}`,t,this);return this.channels.push(n),n}push(e){const{topic:t,event:n,payload:r,ref:i}=e,o=()=>{this.encode(e,(e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)}))};this.log("push",`${t} ${n} (${i})`,r),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e){this.accessToken=e,this.channels.forEach((t=>{e&&t.updateJoinPayload({access_token:e}),t.joinedOnce&&t._isJoined()&&t._push(x.access_token,{access_token:e})}))}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find((t=>t.topic===e&&(t._isJoined()||t._isJoining())));t&&(this.log("transport",`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter((t=>t._joinRef()!==e._joinRef()))}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}_onConnMessage(e){this.decode(e.data,(e=>{let{topic:t,event:n,payload:r,ref:i}=e;(i&&i===this.pendingHeartbeatRef||n===(null==r?void 0:r.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${r.status||""} ${t} ${n} ${i&&"("+i+")"||""}`,r),this.channels.filter((e=>e._isMember(t))).forEach((e=>e._trigger(n,r,i))),this.stateChangeCallbacks.message.forEach((t=>t(e)))}))}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((()=>this._sendHeartbeat()),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach((e=>e()))}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((t=>t(e)))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach((t=>t(e)))}_triggerChanError(){this.channels.forEach((e=>e._trigger(x.error)))}_appendParams(e,t){if(0===Object.keys(t).length)return e;const n=e.match(/\?/)?"&":"?";return`${e}${n}${new URLSearchParams(t)}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((e=>e())),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void(null===(e=this.conn)||void 0===e||e.close(1e3,"hearbeat timeout"));this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class G{constructor(e,t,n){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=y.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=n.close}}class J extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function K(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class $ extends J{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Z extends J{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}const q=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)};var X=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Q=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ee=(e,t)=>X(void 0,void 0,void 0,(function*(){const r=yield(i=void 0,o=void 0,a=void 0,s=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(n.bind(n,907))).Response:Response},new(a||(a=Promise))((function(e,t){function n(e){try{l(s.next(e))}catch(e){t(e)}}function r(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof a?i:new a((function(e){e(i)}))).then(n,r)}l((s=s.apply(i,o||[])).next())})));var i,o,a,s;e instanceof r?e.json().then((n=>{t(new $(Q(n),e.status||500))})).catch((e=>{t(new Z(Q(e),e))})):t(new Z(Q(e),e))})),te=(e,t,n,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};function ne(e,t,n,r,i,o){return X(this,void 0,void 0,(function*(){return new Promise(((a,s)=>{e(n,te(t,r,i,o)).then((e=>{if(!e.ok)throw e;return(null==r?void 0:r.noResolveJson)?e:e.json()})).then((e=>a(e))).catch((e=>ee(e,s)))}))}))}function re(e,t,n,r){return X(this,void 0,void 0,(function*(){return ne(e,"GET",t,n,r)}))}function ie(e,t,n,r,i){return X(this,void 0,void 0,(function*(){return ne(e,"POST",t,r,i,n)}))}function oe(e,t,n,r,i){return X(this,void 0,void 0,(function*(){return ne(e,"DELETE",t,r,i,n)}))}var ae=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const se={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},le={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class ce{constructor(e,t={},n,r){this.url=e,this.headers=t,this.bucketId=n,this.fetch=q(r)}uploadOrUpdate(e,t,n,r){return ae(this,void 0,void 0,(function*(){try{let i;const o=Object.assign(Object.assign({},le),r),a=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(o.upsert)});"undefined"!=typeof Blob&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),i.append("",n)):"undefined"!=typeof FormData&&n instanceof FormData?(i=n,i.append("cacheControl",o.cacheControl)):(i=n,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType);const s=this._removeEmptyFolders(t),l=this._getFinalPath(s),c=yield this.fetch(`${this.url}/object/${l}`,Object.assign({method:e,body:i,headers:a},(null==o?void 0:o.duplex)?{duplex:o.duplex}:{})),u=yield c.json();return c.ok?{data:{path:s,id:u.Id,fullPath:u.Key},error:null}:{data:null,error:u}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}upload(e,t,n){return ae(this,void 0,void 0,(function*(){return this.uploadOrUpdate("POST",e,t,n)}))}uploadToSignedUrl(e,t,n,r){return ae(this,void 0,void 0,(function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",t);try{let e;const t=Object.assign({upsert:le.upsert},r),o=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&n instanceof Blob?(e=new FormData,e.append("cacheControl",t.cacheControl),e.append("",n)):"undefined"!=typeof FormData&&n instanceof FormData?(e=n,e.append("cacheControl",t.cacheControl)):(e=n,o["cache-control"]=`max-age=${t.cacheControl}`,o["content-type"]=t.contentType);const s=yield this.fetch(a.toString(),{method:"PUT",body:e,headers:o}),l=yield s.json();return s.ok?{data:{path:i,fullPath:l.Key},error:null}:{data:null,error:l}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}createSignedUploadUrl(e){return ae(this,void 0,void 0,(function*(){try{let t=this._getFinalPath(e);const n=yield ie(this.fetch,`${this.url}/object/upload/sign/${t}`,{},{headers:this.headers}),r=new URL(this.url+n.url),i=r.searchParams.get("token");if(!i)throw new J("No token returned by API");return{data:{signedUrl:r.toString(),path:e,token:i},error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}update(e,t,n){return ae(this,void 0,void 0,(function*(){return this.uploadOrUpdate("PUT",e,t,n)}))}move(e,t){return ae(this,void 0,void 0,(function*(){try{return{data:yield ie(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers}),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}copy(e,t){return ae(this,void 0,void 0,(function*(){try{return{data:{path:(yield ie(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:t},{headers:this.headers})).Key},error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}createSignedUrl(e,t,n){return ae(this,void 0,void 0,(function*(){try{let r=this._getFinalPath(e),i=yield ie(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:t},(null==n?void 0:n.transform)?{transform:n.transform}:{}),{headers:this.headers});const o=(null==n?void 0:n.download)?`&download=${!0===n.download?"":n.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}createSignedUrls(e,t,n){return ae(this,void 0,void 0,(function*(){try{const r=yield ie(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:t,paths:e},{headers:this.headers}),i=(null==n?void 0:n.download)?`&download=${!0===n.download?"":n.download}`:"";return{data:r.map((e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI(`${this.url}${e.signedURL}${i}`):null}))),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}download(e,t){return ae(this,void 0,void 0,(function*(){const n=void 0!==(null==t?void 0:t.transform)?"render/image/authenticated":"object",r=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),i=r?`?${r}`:"";try{const t=this._getFinalPath(e),r=yield re(this.fetch,`${this.url}/${n}/${t}${i}`,{headers:this.headers,noResolveJson:!0});return{data:yield r.blob(),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],i=(null==t?void 0:t.download)?`download=${!0===t.download?"":t.download}`:"";""!==i&&r.push(i);const o=void 0!==(null==t?void 0:t.transform)?"render/image":"object",a=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==a&&r.push(a);let s=r.join("&");return""!==s&&(s=`?${s}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${s}`)}}}remove(e){return ae(this,void 0,void 0,(function*(){try{return{data:yield oe(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}list(e,t,n){return ae(this,void 0,void 0,(function*(){try{const r=Object.assign(Object.assign(Object.assign({},se),t),{prefix:e||""});return{data:yield ie(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},n),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}}const ue={"X-Client-Info":"storage-js/2.5.5"};var de=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};class he{constructor(e,t={},n){this.url=e,this.headers=Object.assign(Object.assign({},ue),t),this.fetch=q(n)}listBuckets(){return de(this,void 0,void 0,(function*(){try{return{data:yield re(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}getBucket(e){return de(this,void 0,void 0,(function*(){try{return{data:yield re(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}createBucket(e,t={public:!1}){return de(this,void 0,void 0,(function*(){try{return{data:yield ie(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}updateBucket(e,t){return de(this,void 0,void 0,(function*(){try{const n=yield function(e,t,n,r,i){return X(this,void 0,void 0,(function*(){return ne(e,"PUT",t,r,undefined,n)}))}(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers});return{data:n,error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}emptyBucket(e){return de(this,void 0,void 0,(function*(){try{return{data:yield ie(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}deleteBucket(e){return de(this,void 0,void 0,(function*(){try{return{data:yield oe(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(e){if(K(e))return{data:null,error:e};throw e}}))}}class fe extends he{constructor(e,t={},n){super(e,t,n)}from(e){return new ce(this.url,this.headers,e,this.fetch)}}let pe="";pe="undefined"!=typeof Deno?"deno":"undefined"!=typeof document?"web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?"react-native":"node";const ge={headers:{"X-Client-Info":`supabase-js-${pe}/2.43.4`}},me={schema:"public"},be={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},ye={};const ve=e=>{let t;return t=e||("undefined"==typeof fetch?c.default:fetch),(...e)=>t(...e)},xe=(e,t,n)=>{const r=ve(n),i="undefined"==typeof Headers?c.Headers:Headers;return(n,o)=>{return a=void 0,s=void 0,c=function*(){var a;const s=null!==(a=yield t())&&void 0!==a?a:e;let l=new i(null==o?void 0:o.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization",`Bearer ${s}`),r(n,Object.assign(Object.assign({},o),{headers:l}))},new((l=void 0)||(l=Promise))((function(e,t){function n(e){try{i(c.next(e))}catch(e){t(e)}}function r(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof l?i:new l((function(e){e(i)}))).then(n,r)}i((c=c.apply(a,s||[])).next())}));var a,s,l,c}},we="2.64.2",ke={"X-Client-Info":`gotrue-js/${we}`},_e="X-Supabase-Api-Version",Ce={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Ae=()=>"undefined"!=typeof document,Se={tested:!1,writable:!1},Ee=()=>{if(!Ae())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(e){return!1}if(Se.tested)return Se.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Se.tested=!0,Se.writable=!0}catch(e){Se.tested=!0,Se.writable=!1}return Se.writable};function Pe(e){const t={},n=new URL(e);if(n.hash&&"#"===n.hash[0])try{new URLSearchParams(n.hash.substring(1)).forEach(((e,n)=>{t[n]=e}))}catch(e){}return n.searchParams.forEach(((e,n)=>{t[n]=e})),t}const Oe=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>Promise.resolve().then(n.bind(n,907)).then((({default:t})=>t(...e))):fetch),(...e)=>t(...e)},Re=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,je=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Ie=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(e){return n}},Te=async(e,t)=>{await e.removeItem(t)};class Me{constructor(){this.promise=new Me.promiseConstructor(((e,t)=>{this.resolve=e,this.reject=t}))}}function Ne(e){const t=e.split(".");if(3!==t.length)throw new Error("JWT is not valid: not a JWT structure");if(!/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i.test(t[1]))throw new Error("JWT is not valid: payload is not in base64url format");const n=t[1];return JSON.parse(function(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n,r,i,o,a,s,l,c="",u=0;for(e=e.replace("-","+").replace("_","/");u>4,r=(15&a)<<4|s>>2,i=(3&s)<<6|l,c+=String.fromCharCode(n),64!=s&&0!=r&&(c+=String.fromCharCode(r)),64!=l&&0!=i&&(c+=String.fromCharCode(i));return c}(n))}function De(e){return("0"+e.toString(16)).substr(-2)}async function Le(e,t,n=!1){const r=function(){const e=new Uint32Array(56);if("undefined"==typeof crypto){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length;let n="";for(let r=0;r<56;r++)n+=e.charAt(Math.floor(Math.random()*t));return n}return crypto.getRandomValues(e),Array.from(e,De).join("")}();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await je(e,`${t}-code-verifier`,i);const o=await async function(e){if("undefined"==typeof crypto||void 0===crypto.subtle||"undefined"==typeof TextEncoder)return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const t=await async function(e){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t),r=new Uint8Array(n);return Array.from(r).map((e=>String.fromCharCode(e))).join("")}(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}(r);return[o,r===o?"plain":"s256"]}Me.promiseConstructor=Promise;const ze=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;class Fe extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=n}}function Be(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class Ue extends Fe{constructor(e,t,n){super(e,t,n),this.name="AuthApiError",this.status=t,this.code=n}}function He(e){return Be(e)&&"AuthApiError"===e.name}class We extends Fe{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class Ve extends Fe{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}}class Ye extends Ve{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class Ge extends Ve{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Je extends Ve{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Ke extends Ve{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class $e extends Ve{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Ze extends Ve{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function qe(e){return Be(e)&&"AuthRetryableFetchError"===e.name}class Xe extends Ve{constructor(e,t,n){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=n}}function Qe(e){return Be(e)&&"AuthWeakPasswordError"===e.name}const et=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),tt=[502,503,504];async function nt(e){var t;if(!Re(e))throw new Ze(et(e),0);if(tt.includes(e.status))throw new Ze(et(e),e.status);let n,r;try{n=await e.json()}catch(e){throw new We(et(e),e)}const i=function(e){const t=e.headers.get(_e);if(!t)return null;if(!t.match(ze))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(e){return null}}(e);if(i&&i.getTime()>=Ce["2024-01-01"].timestamp&&"object"==typeof n&&n&&"string"==typeof n.code?r=n.code:"object"==typeof n&&n&&"string"==typeof n.error_code&&(r=n.error_code),r){if("weak_password"===r)throw new Xe(et(n),e.status,(null===(t=n.weak_password)||void 0===t?void 0:t.reasons)||[])}else if("object"==typeof n&&n&&"object"==typeof n.weak_password&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce(((e,t)=>e&&"string"==typeof t),!0))throw new Xe(et(n),e.status,n.weak_password.reasons);throw new Ue(et(n),e.status||500,r)}async function rt(e,t,n,r){var i;const o=Object.assign({},null==r?void 0:r.headers);o[_e]||(o[_e]=Ce["2024-01-01"].name),(null==r?void 0:r.jwt)&&(o.Authorization=`Bearer ${r.jwt}`);const a=null!==(i=null==r?void 0:r.query)&&void 0!==i?i:{};(null==r?void 0:r.redirectTo)&&(a.redirect_to=r.redirectTo);const s=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await async function(e,t,n,r,i,o){const a=((e,t,n,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))})(t,r,{},o);let s;try{s=await e(n,Object.assign({},a))}catch(e){throw console.error(e),new Ze(et(e),0)}if(s.ok||await nt(s),null==r?void 0:r.noResolveJson)return s;try{return await s.json()}catch(e){await nt(e)}}(e,t,n+s,{headers:o,noResolveJson:null==r?void 0:r.noResolveJson},0,null==r?void 0:r.body);return(null==r?void 0:r.xform)?null==r?void 0:r.xform(l):{data:Object.assign({},l),error:null}}function it(e){var t;let n=null;var r;return function(e){return e.access_token&&e.refresh_token&&e.expires_in}(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=(r=e.expires_in,Math.round(Date.now()/1e3)+r))),{data:{session:n,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function ot(e){const t=it(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce(((e,t)=>e&&"string"==typeof t),!0)&&(t.data.weak_password=e.weak_password),t}function at(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function st(e){return{data:e,error:null}}function lt(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o}=e,a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i0&&(h.forEach((e=>{const t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),n=JSON.parse(e.split(";")[1].split("=")[1]);l[`${n}Page`]=t})),l.total=parseInt(d)),{data:Object.assign(Object.assign({},u),l),error:null}}catch(e){if(Be(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){try{return await rt(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:at})}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){try{return await rt(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:at})}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){try{return await rt(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:at})}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){try{const{data:t,error:n}=await rt(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _deleteFactor(e){try{return{data:await rt(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(Be(e))return{data:null,error:e};throw e}}}const dt={getItem:e=>Ee()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Ee()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Ee()&&globalThis.localStorage.removeItem(e)}};function ht(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const ft={debug:!!(globalThis&&Ee()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"))};class pt extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class gt extends pt{}async function mt(e,t,n){ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout((()=>{r.abort(),ft.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)}),t),await globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},(async r=>{if(!r){if(0===t)throw ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new gt(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(ft.debug)try{const e=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(e,null," "))}catch(e){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",e)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,r.name);try{return await n()}finally{ft.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,r.name)}}))}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(e){"undefined"!=typeof self&&(self.globalThis=self)}}();const bt={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ke,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},yt=3e4;async function vt(e,t,n){return await n()}class xt{constructor(e){var t,n;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=xt.nextInstanceID,xt.nextInstanceID+=1,this.instanceID>0&&Ae()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const r=Object.assign(Object.assign({},bt),e);if(this.logDebugMessages=!!r.debug,"function"==typeof r.debug&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new ut({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=Oe(r.fetch),this.lock=r.lock||vt,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:Ae()&&(null===(t=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=mt:this.lock=vt,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?r.storage?this.storage=r.storage:Ee()?this.storage=dt:(this.memoryStorage={},this.storage=ht(this.memoryStorage)):(this.memoryStorage={},this.storage=ht(this.memoryStorage)),Ae()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",e)}null===(n=this.broadcastChannel)||void 0===n||n.addEventListener("message",(async e=>{this._debug("received broadcast notification from other tab or client",e),await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}))}this.initialize()}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${we}) ${(new Date).toISOString()}`,...e),this}async initialize(){return this.initializePromise||(this.initializePromise=(async()=>await this._acquireLock(-1,(async()=>await this._initialize())))()),await this.initializePromise}async _initialize(){try{const e=!!Ae()&&await this._isPKCEFlow();if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:t,error:n}=await this._getSessionFromURL(e);if(n)return this._debug("#_initialize()","error detecting session from URL",n),"Identity is already linked"===(null==n?void 0:n.message)||"Identity is already linked to another user"===(null==n?void 0:n.message)||await this._removeSession(),{error:n};const{session:r,redirectType:i}=t;return this._debug("#_initialize()","detected session in URL",r,"redirect type",i),await this._saveSession(r),setTimeout((async()=>{"recovery"===i?await this._notifyAllSubscribers("PASSWORD_RECOVERY",r):await this._notifyAllSubscribers("SIGNED_IN",r)}),0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return Be(e)?{error:e}:{error:new We("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var t,n,r;try{await this._removeSession();const i=await rt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:null!==(n=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==n?n:{},gotrue_meta_security:{captcha_token:null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken}},xform:it}),{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const s=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",s)),{data:{user:l,session:s},error:null}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signUp(e){var t,n,r;try{let i;if(await this._removeSession(),"email"in e){const{email:n,password:r,options:o}=e;let a=null,s=null;"pkce"===this.flowType&&([a,s]=await Le(this.storage,this.storageKey)),i=await rt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:null==o?void 0:o.emailRedirectTo,body:{email:n,password:r,data:null!==(t=null==o?void 0:o.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken},code_challenge:a,code_challenge_method:s},xform:it})}else{if(!("phone"in e))throw new Je("You must provide either an email or phone number and a password");{const{phone:t,password:o,options:a}=e;i=await rt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:o,data:null!==(n=null==a?void 0:a.data)&&void 0!==n?n:{},channel:null!==(r=null==a?void 0:a.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null==a?void 0:a.captchaToken}},xform:it})}}const{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const s=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",s)),{data:{user:l,session:s},error:null}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithPassword(e){try{let t;if(await this._removeSession(),"email"in e){const{email:n,password:r,options:i}=e;t=await rt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ot})}else{if(!("phone"in e))throw new Je("You must provide either an email or phone number and a password");{const{phone:n,password:r,options:i}=e;t=await rt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:ot})}}const{data:n,error:r}=t;return r?{data:{user:null,session:null},error:r}:n&&n.session&&n.user?(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r}):{data:{user:null,session:null},error:new Ge}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOAuth(e){var t,n,r,i;return await this._removeSession(),await this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(n=e.options)||void 0===n?void 0:n.scopes,queryParams:null===(r=e.options)||void 0===r?void 0:r.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,(async()=>this._exchangeCodeForSession(e)))}async _exchangeCodeForSession(e){const t=await Ie(this.storage,`${this.storageKey}-code-verifier`),[n,r]=(null!=t?t:"").split("/"),{data:i,error:o}=await rt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:it});return await Te(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:i&&i.session&&i.user?(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:null!=r?r:null}),error:o}):{data:{user:null,session:null,redirectType:null},error:new Ge}}async signInWithIdToken(e){await this._removeSession();try{const{options:t,provider:n,token:r,access_token:i,nonce:o}=e,a=await rt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:it}),{data:s,error:l}=a;return l?{data:{user:null,session:null},error:l}:s&&s.session&&s.user?(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:s,error:l}):{data:{user:null,session:null},error:new Ge}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithOtp(e){var t,n,r,i,o;try{if(await this._removeSession(),"email"in e){const{email:r,options:i}=e;let o=null,a=null;"pkce"===this.flowType&&([o,a]=await Le(this.storage,this.storageKey));const{error:s}=await rt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:r,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{},create_user:null===(n=null==i?void 0:i.shouldCreateUser)||void 0===n||n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:o,code_challenge_method:a},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:s}}if("phone"in e){const{phone:t,options:n}=e,{data:a,error:s}=await rt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:null!==(r=null==n?void 0:n.data)&&void 0!==r?r:{},create_user:null===(i=null==n?void 0:n.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==n?void 0:n.captchaToken},channel:null!==(o=null==n?void 0:n.channel)&&void 0!==o?o:"sms"}});return{data:{user:null,session:null,messageId:null==a?void 0:a.message_id},error:s}}throw new Je("You must provide either an email or phone number.")}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async verifyOtp(e){var t,n;try{let r,i;"email_change"!==e.type&&"phone_change"!==e.type&&await this._removeSession(),"options"in e&&(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(n=e.options)||void 0===n?void 0:n.captchaToken);const{data:o,error:a}=await rt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:r,xform:it});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const s=o.session,l=o.user;return(null==s?void 0:s.access_token)&&(await this._saveSession(s),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",s)),{data:{user:l,session:s},error:null}}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async signInWithSSO(e){var t,n,r;try{await this._removeSession();let i=null,o=null;return"pkce"===this.flowType&&([i,o]=await Le(this.storage,this.storageKey)),await rt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(n=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==n?n:void 0}),(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:st})}catch(e){if(Be(e))return{data:null,error:e};throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._reauthenticate()))}async _reauthenticate(){try{return await this._useSession((async e=>{const{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new Ye;const{error:r}=await rt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}}))}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{"email_change"!=e.type&&"phone_change"!=e.type&&await this._removeSession();const t=`${this.url}/resend`;if("email"in e){const{email:n,type:r,options:i}=e,{error:o}=await rt(this.fetch,"POST",t,{headers:this.headers,body:{email:n,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}if("phone"in e){const{phone:n,type:r,options:i}=e,{data:o,error:a}=await rt(this.fetch,"POST",t,{headers:this.headers,body:{phone:n,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:null==o?void 0:o.message_id},error:a}}throw new Je("You must provide either an email or phone number and a type")}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,(async()=>this._useSession((async e=>e))))}async _acquireLock(e,t){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch(e){}})()),n}return await this.lock(`lock:${this.storageKey}`,e,(async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const e=t();for(this.pendingInLock.push((async()=>{try{await e}catch(e){}})()),await e;this.pendingInLock.length;){const e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const t=await this.__loadSession();return await e(t)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",(new Error).stack);try{let e=null;const t=await Ie(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=!!e.expires_at&&e.expires_at<=Date.now()/1e3;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.storage.isServer){const t=this.suppressGetSessionWarning;e=new Proxy(e,{get:(e,n,r)=>(t||"user"!==n||console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),Reflect.get(e,n,r))})}return{data:{session:e},error:null}}const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,(async()=>await this._getUser())))}async _getUser(e){try{return e?await rt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:at}):await this._useSession((async e=>{var t,n,r;const{data:i,error:o}=e;if(o)throw o;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?await rt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:null!==(r=null===(n=i.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0,xform:at}):{data:{user:null},error:new Ye}}))}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._updateUser(e,t)))}async _updateUser(e,t={}){try{return await this._useSession((async n=>{const{data:r,error:i}=n;if(i)throw i;if(!r.session)throw new Ye;const o=r.session;let a=null,s=null;"pkce"===this.flowType&&null!=e.email&&([a,s]=await Le(this.storage,this.storageKey));const{data:l,error:c}=await rt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:s}),jwt:o.access_token,xform:at});if(c)throw c;return o.user=l.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}}))}catch(e){if(Be(e))return{data:{user:null},error:e};throw e}}_decodeJWT(e){return Ne(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._setSession(e)))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Ye;const t=Date.now()/1e3;let n=t,r=!0,i=null;const o=Ne(e.access_token);if(o.exp&&(n=o.exp,r=n<=t),r){const{session:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return{data:{user:null,session:null},error:n};if(!t)return{data:{user:null,session:null},error:null};i=t}else{const{data:r,error:o}=await this._getUser(e.access_token);if(o)throw o;i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(e){if(Be(e))return{data:{session:null,user:null},error:e};throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._refreshSession(e)))}async _refreshSession(e){try{return await this._useSession((async t=>{var n;if(!e){const{data:r,error:i}=t;if(i)throw i;e=null!==(n=r.session)&&void 0!==n?n:void 0}if(!(null==e?void 0:e.refresh_token))throw new Ye;const{session:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}}))}catch(e){if(Be(e))return{data:{user:null,session:null},error:e};throw e}}async _getSessionFromURL(e){try{if(!Ae())throw new Ke("No browser detected.");if("implicit"===this.flowType&&!this._isImplicitGrantFlow())throw new Ke("Not a valid implicit grant flow url.");if("pkce"==this.flowType&&!e)throw new $e("Not a valid PKCE flow url.");const t=Pe(window.location.href);if(e){if(!t.code)throw new $e("No code detected.");const{data:e,error:n}=await this._exchangeCodeForSession(t.code);if(n)throw n;const r=new URL(window.location.href);return r.searchParams.delete("code"),window.history.replaceState(window.history.state,"",r.toString()),{data:{session:e.session,redirectType:null},error:null}}if(t.error||t.error_description||t.error_code)throw new Ke(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});const{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:o,expires_in:a,expires_at:s,token_type:l}=t;if(!(i&&a&&o&&l))throw new Ke("No session defined in URL");const c=Math.round(Date.now()/1e3),u=parseInt(a);let d=c+u;s&&(d=parseInt(s));const h=d-c;1e3*h<=yt&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${u}s`);const f=d-u;c-f>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",f,d,c):c-f<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",f,d,c);const{data:p,error:g}=await this._getUser(i);if(g)throw g;const m={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:o,token_type:l,user:p.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:m,redirectType:t.type},error:null}}catch(e){if(Be(e))return{data:{session:null,redirectType:null},error:e};throw e}}_isImplicitGrantFlow(){const e=Pe(window.location.href);return!(!Ae()||!e.access_token&&!e.error_description)}async _isPKCEFlow(){const e=Pe(window.location.href),t=await Ie(this.storage,`${this.storageKey}-code-verifier`);return!(!e.code||!t)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,(async()=>await this._signOut(e)))}async _signOut({scope:e}={scope:"global"}){return await this._useSession((async t=>{var n;const{data:r,error:i}=t;if(i)return{error:i};const o=null===(n=r.session)||void 0===n?void 0:n.access_token;if(o){const{error:t}=await this.admin.signOut(o,e);if(t&&(!He(t)||404!==t.status&&401!==t.status&&403!==t.status))return{error:t}}return"others"!==e&&(await this._removeSession(),await Te(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}}))}onAuthStateChange(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),n={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,await this._acquireLock(-1,(async()=>{this._emitInitialSession(t)}))})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession((async t=>{var n,r;try{const{data:{session:r},error:i}=t;if(i)throw i;await(null===(n=this.stateChangeEmitters.get(e))||void 0===n?void 0:n.callback("INITIAL_SESSION",r)),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(t){await(null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",t),console.error(t)}}))}async resetPasswordForEmail(e,t={}){let n=null,r=null;"pkce"===this.flowType&&([n,r]=await Le(this.storage,this.storageKey,!0));try{return await rt(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(Be(e))return{data:null,error:e};throw e}}async getUserIdentities(){var e;try{const{data:t,error:n}=await this.getUser();if(n)throw n;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(e){if(Be(e))return{data:null,error:e};throw e}}async linkIdentity(e){var t;try{const{data:n,error:r}=await this._useSession((async t=>{var n,r,i,o,a;const{data:s,error:l}=t;if(l)throw l;const c=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:null===(n=e.options)||void 0===n?void 0:n.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return await rt(this.fetch,"GET",c,{headers:this.headers,jwt:null!==(a=null===(o=s.session)||void 0===o?void 0:o.access_token)&&void 0!==a?a:void 0})}));if(r)throw r;return Ae()&&!(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)&&window.location.assign(null==n?void 0:n.url),{data:{provider:e.provider,url:null==n?void 0:n.url},error:null}}catch(t){if(Be(t))return{data:{provider:e.provider,url:null},error:t};throw t}}async unlinkIdentity(e){try{return await this._useSession((async t=>{var n,r;const{data:i,error:o}=t;if(o)throw o;return await rt(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:null!==(r=null===(n=i.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _refreshAccessToken(e){const t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,"begin");try{const i=Date.now();return await(n=async n=>(n>0&&await async function(e){return await new Promise((t=>{setTimeout((()=>t(null)),e)}))}(200*Math.pow(2,n-1)),this._debug(t,"refreshing attempt",n),await rt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:it})),r=(e,t)=>{const n=200*Math.pow(2,e);return t&&qe(t)&&Date.now()+n-i{(async()=>{for(let i=0;i<1/0;i++)try{const t=await n(i);if(!r(i,null))return void e(t)}catch(e){if(!r(i,e))return void t(e)}})()})))}catch(e){if(this._debug(t,"error",e),Be(e))return{data:{session:null,user:null},error:e};throw e}finally{this._debug(t,"end")}var n,r}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,t){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",n),Ae()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e;const t="#_recoverAndRefresh()";this._debug(t,"begin");try{const n=await Ie(this.storage,this.storageKey);if(this._debug(t,"session from storage",n),!this._isValidSession(n))return this._debug(t,"session is not valid"),void(null!==n&&await this._removeSession());const r=Math.round(Date.now()/1e3),i=(null!==(e=n.expires_at)&&void 0!==e?e:1/0){try{await n.callback(e,t)}catch(e){r.push(e)}}));if(await Promise.all(i),r.length>0){for(let e=0;ethis._autoRefreshTokenTick()),yt);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout((async()=>{await this.initializePromise,await this._autoRefreshTokenTick()}),0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,(async()=>{try{const e=Date.now();try{return await this._useSession((async t=>{const{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at)return void this._debug("#_autoRefreshTokenTick()","no session");const r=Math.floor((1e3*n.expires_at-e)/yt);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts 30000ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)}))}catch(e){console.error("Auto refresh tick failed with error. This is likely a transient error.",e)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(e){if(!(e.isAcquireTimeout||e instanceof pt))throw e;this._debug("auto refresh token tick lock not available")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ae()||!(null===window||void 0===window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),null===window||void 0===window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const t=`#_onVisibilityChanged(${e})`;this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,(async()=>{"visible"===document.visibilityState?await this._recoverAndRefresh():this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting")})))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){const r=[`provider=${encodeURIComponent(t)}`];if((null==n?void 0:n.redirectTo)&&r.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),(null==n?void 0:n.scopes)&&r.push(`scopes=${encodeURIComponent(n.scopes)}`),"pkce"===this.flowType){const[e,t]=await Le(this.storage,this.storageKey),n=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(n.toString())}if(null==n?void 0:n.queryParams){const e=new URLSearchParams(n.queryParams);r.push(e.toString())}return(null==n?void 0:n.skipBrowserRedirect)&&r.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession((async t=>{var n;const{data:r,error:i}=t;return i?{data:null,error:i}:await rt(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _enroll(e){try{return await this._useSession((async t=>{var n,r;const{data:i,error:o}=t;if(o)return{data:null,error:o};const{data:a,error:s}=await rt(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:null===(n=null==i?void 0:i.session)||void 0===n?void 0:n.access_token});return s?{data:null,error:s}:((null===(r=null==a?void 0:a.totp)||void 0===r?void 0:r.qr_code)&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}async _verify(e){return this._acquireLock(-1,(async()=>{try{return await this._useSession((async t=>{var n;const{data:r,error:i}=t;if(i)return{data:null,error:i};const{data:o,error:a}=await rt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}))}async _challenge(e){return this._acquireLock(-1,(async()=>{try{return await this._useSession((async t=>{var n;const{data:r,error:i}=t;return i?{data:null,error:i}:await rt(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token})}))}catch(e){if(Be(e))return{data:null,error:e};throw e}}))}async _challengeAndVerify(e){const{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){const{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};const n=(null==e?void 0:e.factors)||[],r=n.filter((e=>"totp"===e.factor_type&&"verified"===e.status));return{data:{all:n,totp:r},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,(async()=>await this._useSession((async e=>{var t,n;const{data:{session:r},error:i}=e;if(i)return{data:null,error:i};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(r.access_token);let a=null;o.aal&&(a=o.aal);let s=a;return(null!==(n=null===(t=r.user.factors)||void 0===t?void 0:t.filter((e=>"verified"===e.status)))&&void 0!==n?n:[]).length>0&&(s="aal2"),{data:{currentLevel:a,nextLevel:s,currentAuthenticationMethods:o.amr||[]},error:null}}))))}}xt.nextInstanceID=0;const wt=ut,kt=xt;class _t extends kt{constructor(e){super(e)}}class Ct{constructor(e,t,n){var r,i,o;if(this.supabaseUrl=e,this.supabaseKey=t,!e)throw new Error("supabaseUrl is required.");if(!t)throw new Error("supabaseKey is required.");const a=e.replace(/\/$/,"");this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;const s=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,l=function(e,t){const{db:n,auth:r,realtime:i,global:o}=e,{db:a,auth:s,realtime:l,global:c}=t;return{db:Object.assign(Object.assign({},a),n),auth:Object.assign(Object.assign({},s),r),realtime:Object.assign(Object.assign({},l),i),global:Object.assign(Object.assign({},c),o)}}(null!=n?n:{},{db:me,realtime:ye,auth:Object.assign(Object.assign({},be),{storageKey:s}),global:ge});this.storageKey=null!==(r=l.auth.storageKey)&&void 0!==r?r:"",this.headers=null!==(i=l.global.headers)&&void 0!==i?i:{},this.auth=this._initSupabaseAuthClient(null!==(o=l.auth)&&void 0!==o?o:{},this.headers,l.global.fetch),this.fetch=xe(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},l.realtime)),this.rest=new m(`${a}/rest/v1`,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new l(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new fe(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t,n,r,i,o;return n=this,r=void 0,o=function*(){const{data:n}=yield this.auth.getSession();return null!==(t=null===(e=n.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:null},new((i=void 0)||(i=Promise))((function(e,t){function a(e){try{l(o.next(e))}catch(e){t(e)}}function s(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}l((o=o.apply(n,r||[])).next())}))}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,storageKey:i,flowType:o,debug:a},s,l){var c;const u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new _t({url:this.authUrl,headers:Object.assign(Object.assign({},u),s),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,flowType:o,debug:a,fetch:l,hasCustomAuthorizationHeader:null!==(c="Authorization"in this.headers)&&void 0!==c&&c})}_initRealtimeClient(e){return new Y(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange(((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)}))}_handleTokenChanged(e,t,n){"TOKEN_REFRESHED"!==e&&"SIGNED_IN"!==e||this.changedAccessToken===n?"SIGNED_OUT"===e&&(this.realtime.setAuth(this.supabaseKey),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0):(this.realtime.setAuth(null!=n?n:null),this.changedAccessToken=n)}}const At=(e,t,n)=>new Ct(e,t,n)},1995:(e,t,n)=>{"use strict";function r(e){return e+.5|0}n.r(t),n.d(t,{default:()=>dt});const i=(e,t,n)=>Math.max(Math.min(e,n),t);function o(e){return i(r(2.55*e),0,255)}function a(e){return i(r(255*e),0,255)}function s(e){return i(r(e/2.55)/100,0,1)}function l(e){return i(r(100*e),0,100)}const c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},u=[..."0123456789ABCDEF"],d=e=>u[15&e],h=e=>u[(240&e)>>4]+u[15&e],f=e=>(240&e)>>4==(15&e);const p=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function g(e,t,n){const r=t*Math.min(n,1-n),i=(t,i=(t+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[i(0),i(8),i(4)]}function m(e,t,n){const r=(r,i=(r+e/60)%6)=>n-n*t*Math.max(Math.min(i,4-i,1),0);return[r(5),r(3),r(1)]}function b(e,t,n){const r=g(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function y(e){const t=e.r/255,n=e.g/255,r=e.b/255,i=Math.max(t,n,r),o=Math.min(t,n,r),a=(i+o)/2;let s,l,c;return i!==o&&(c=i-o,l=a>.5?c/(2-i-o):c/(i+o),s=function(e,t,n,r,i){return e===i?(t-n)/r+(te<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,E=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function P(e,t,n){if(e){let r=y(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=x(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function O(e,t){return e?Object.assign(t||{},e):e}function R(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=a(e[3]))):(t=O(e,{r:0,g:0,b:0,a:1})).a=a(t.a),t}function j(e){return"r"===e.charAt(0)?function(e){const t=A.exec(e);let n,r,a,s=255;if(t){if(t[7]!==n){const e=+t[7];s=t[8]?o(e):i(255*e,0,255)}return n=+t[1],r=+t[3],a=+t[5],n=255&(t[2]?o(n):i(n,0,255)),r=255&(t[4]?o(r):i(r,0,255)),a=255&(t[6]?o(a):i(a,0,255)),{r:n,g:r,b:a,a:s}}}(e):function(e){const t=p.exec(e);let n,r=255;if(!t)return;t[5]!==n&&(r=t[6]?o(+t[5]):a(+t[5]));const i=w(+t[2]),s=+t[3]/100,l=+t[4]/100;return n="hwb"===t[1]?function(e,t,n){return v(b,e,t,n)}(i,s,l):"hsv"===t[1]?function(e,t,n){return v(m,e,t,n)}(i,s,l):x(i,s,l),{r:n[0],g:n[1],b:n[2],a:r}}(e)}class I{constructor(e){if(e instanceof I)return e;const t=typeof e;let n;var r,i,o;"object"===t?n=R(e):"string"===t&&(o=(r=e).length,"#"===r[0]&&(4===o||5===o?i={r:255&17*c[r[1]],g:255&17*c[r[2]],b:255&17*c[r[3]],a:5===o?17*c[r[4]]:255}:7!==o&&9!==o||(i={r:c[r[1]]<<4|c[r[2]],g:c[r[3]]<<4|c[r[4]],b:c[r[5]]<<4|c[r[6]],a:9===o?c[r[7]]<<4|c[r[8]]:255})),n=i||function(e){C||(C=function(){const e={},t=Object.keys(_),n=Object.keys(k);let r,i,o,a,s;for(r=0;r>16&255,o>>8&255,255&o]}return e}(),C.transparent=[0,0,0,0]);const t=C[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}(e)||j(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=O(this._rgb);return e&&(e.a=s(e.a)),e}set rgb(e){this._rgb=R(e)}rgbString(){return this._valid?(e=this._rgb)&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${s(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`):void 0;var e}hexString(){return this._valid?(e=this._rgb,t=(e=>f(e.r)&&f(e.g)&&f(e.b)&&f(e.a))(e)?d:h,e?"#"+t(e.r)+t(e.g)+t(e.b)+((e,t)=>e<255?t(e):"")(e.a,t):void 0):void 0;var e,t}hslString(){return this._valid?function(e){if(!e)return;const t=y(e),n=t[0],r=l(t[1]),i=l(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${s(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}(this._rgb):void 0}mix(e,t){if(e){const n=this.rgb,r=e.rgb;let i;const o=t===i?.5:t,a=2*o-1,s=n.a-r.a,l=((a*s==-1?a:(a+s)/(1+a*s))+1)/2;i=1-l,n.r=255&l*n.r+i*r.r+.5,n.g=255&l*n.g+i*r.g+.5,n.b=255&l*n.b+i*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(e,t){return e&&(this._rgb=function(e,t,n){const r=E(s(e.r)),i=E(s(e.g)),o=E(s(e.b));return{r:a(S(r+n*(E(s(t.r))-r))),g:a(S(i+n*(E(s(t.g))-i))),b:a(S(o+n*(E(s(t.b))-o))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}clone(){return new I(this.rgb)}alpha(e){return this._rgb.a=a(e),this}clearer(e){return this._rgb.a*=1-e,this}greyscale(){const e=this._rgb,t=r(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}opaquer(e){return this._rgb.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return P(this._rgb,2,e),this}darken(e){return P(this._rgb,2,-e),this}saturate(e){return P(this._rgb,1,e),this}desaturate(e){return P(this._rgb,1,-e),this}rotate(e){return function(e,t){var n=y(e);n[0]=w(n[0]+t),n=x(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}function T(e){return null==e}function M(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function N(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function D(e,t){return void 0===e?t:e}function L(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)}function z(e,t,n,r){let i,o,a;if(M(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i=Math.min(t,n)-r&&e<=Math.max(t,n)+r}"undefined"==typeof window||window.requestAnimationFrame;function Q(e){return function(e){if(e&&"object"==typeof e){const t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}(e)?e:new I(e).saturate(.5).darken(.1).hexString()}const ee=["x","y","borderWidth","radius","tension"],te=["color","borderColor","backgroundColor"],ne=new Map;function re(e,t,n){return function(e,t){t=t||{};const n=e+JSON.stringify(t);let r=ne.get(n);return r||(r=new Intl.NumberFormat(e,t),ne.set(n,r)),r}(t,n).format(e)}const ie={values:e=>M(e)?e:""+e,numeric(e,t,n){if(0===e)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const t=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(t<1e-4||t>1e15)&&(i="scientific"),o=function(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}(e,n)}const a=K(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),re(e,r,l)},logarithmic(e,t,n){if(0===e)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor(K(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?ie.numeric.call(this,e,t,n):""}};var oe={formatters:ie};const ae=Object.create(null),se=Object.create(null);function le(e,t){if(!t)return e;const n=t.split(".");for(let t=0,r=n.length;te.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(e,t)=>Q(t.backgroundColor),this.hoverBorderColor=(e,t)=>Q(t.borderColor),this.hoverColor=(e,t)=>Q(t.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(t)}set(e,t){return ce(this,e,t)}get(e){return le(this,e)}describe(e,t){return ce(se,e,t)}override(e,t){return ce(ae,e,t)}route(e,t,n,r){const i=le(this,e),o=le(this,n),a="_"+t;Object.defineProperties(i,{[a]:{value:i[t],writable:!0},[t]:{enumerable:!0,get(){const e=this[a],t=o[r];return N(e)?Object.assign({},t,e):D(e,t)},set(e){this[a]=e}}})}apply(e){e.forEach((e=>e(this)))}}var de=new ue({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}),e.set("animations",{colors:{type:"color",properties:te},numbers:{type:"number",properties:ee}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>0|e}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,t)=>t.lineWidth,tickColor:(e,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:oe.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e,_indexable:e=>"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:e=>"backdropPadding"!==e&&"callback"!==e,_indexable:e=>"backdropPadding"!==e})}]);function he(e,t,n,r){!function(e,t,n,r,i){let o,a,s,l,c,u,d,h;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*V;if(f&&"object"==typeof f&&(o=f.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return e.save(),e.translate(n,r),e.rotate(m),e.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void e.restore();if(!(isNaN(g)||g<=0)){switch(e.beginPath(),f){default:i?e.ellipse(n,r,i/2,g,0,0,W):e.arc(n,r,g,0,W),e.closePath();break;case"triangle":u=i?i/2:g,e.moveTo(n+Math.sin(m)*u,r-Math.cos(m)*g),m+=J,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*g),m+=J,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*g),e.closePath();break;case"rectRounded":c=.516*g,l=g-c,a=Math.cos(m+G)*l,d=Math.cos(m+G)*(i?i/2-c:l),s=Math.sin(m+G)*l,h=Math.sin(m+G)*(i?i/2-c:l),e.arc(n-d,r-s,c,m-H,m-Y),e.arc(n+h,r-a,c,m-Y,m),e.arc(n+d,r+s,c,m,m+Y),e.arc(n-h,r+a,c,m+Y,m+H),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}m+=G;case"rectRot":d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-s),e.lineTo(n+h,r-a),e.lineTo(n+d,r+s),e.lineTo(n-h,r+a),e.closePath();break;case"crossRot":m+=G;case"cross":d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+h,r-a),e.lineTo(n-h,r+a);break;case"star":d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+h,r-a),e.lineTo(n-h,r+a),m+=G,d=Math.cos(m)*(i?i/2:g),a=Math.cos(m)*g,s=Math.sin(m)*g,h=Math.sin(m)*(i?i/2:g),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+h,r-a),e.lineTo(n-h,r+a);break;case"line":a=i?i/2:Math.cos(m)*g,s=Math.sin(m)*g,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(m)*(i?i/2:g),r+Math.sin(m)*g);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}(e,t,n,r,null)}function fe(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*H,H,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,H,Y,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Y,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Y,!0),e.lineTo(n+a.topLeft,r)}const pe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,ge=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function me(e,t){const n=(""+e).match(pe);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e}const be=e=>+e||0;function ye(e,t){const n={},r=N(t),i=r?Object.keys(t):t,o=N(e)?r?n=>D(e[n],e[t[n]]):t=>e[t]:()=>e;for(const e of i)n[e]=be(o(e));return n}function ve(e){return ye(e,{top:"y",right:"x",bottom:"y",left:"x"})}function xe(e){const t=ve(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function we(e,t){e=e||{},t=t||de.font;let n=D(e.size,t.size);"string"==typeof n&&(n=parseInt(n,10));let r=D(e.style,t.style);r&&!(""+r).match(ge)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:D(e.family,t.family),lineHeight:me(D(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:D(e.weight,t.weight),string:""};return i.string=function(e){return!e||T(e.size)||T(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i}function ke(e,t,n,r){let i,o,a,s=!0;for(i=0,o=e.length;i{r[e]=n[e]&&n[e].active()?n[e]._to:this[e]})),r}}function Ce(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Ae(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),h=u>0?u+r+n+c:0;let f=0;const p=i-l;if(r){const e=((u>0?u-r:0)+(d>0?d-r:0))/2;f=(p-(0!==e?p*e/(e+r):p))/2}const g=(p-Math.max(.001,p*d-n/H)/d)/2,m=l+g+f,b=i-g-f,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:w}=function(e,t,n,r){const i=ye(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),o=(n-t)/2,a=Math.min(o,r*t/2),s=e=>{const t=(n-Math.min(o,e))*r/2;return q(e,0,Math.min(o,t))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:q(i.innerStart,0,a),innerEnd:q(i.innerEnd,0,a)}}(t,h,d,b-m),k=d-y,_=d-v,C=m+y/k,A=b-v/_,S=h+x,E=h+w,P=m+x/S,O=b-w/E;if(e.beginPath(),o){const t=(C+A)/2;if(e.arc(a,s,d,C,t),e.arc(a,s,d,t,A),v>0){const t=Ce(_,A,a,s);e.arc(t.x,t.y,v,A,b+Y)}const n=Ce(E,b,a,s);if(e.lineTo(n.x,n.y),w>0){const t=Ce(E,O,a,s);e.arc(t.x,t.y,w,b+Y,O+Math.PI)}const r=(b-w/h+(m+x/h))/2;if(e.arc(a,s,h,b-w/h,r,!0),e.arc(a,s,h,r,m+x/h,!0),x>0){const t=Ce(S,P,a,s);e.arc(t.x,t.y,x,P+Math.PI,m-Y)}const i=Ce(k,m,a,s);if(e.lineTo(i.x,i.y),y>0){const t=Ce(k,C,a,s);e.arc(t.x,t.y,y,m-Y,C)}}else{e.moveTo(a,s);const t=Math.cos(C)*d+a,n=Math.sin(C)*d+s;e.lineTo(t,n);const r=Math.cos(A)*d+a,i=Math.sin(A)*d+s;e.lineTo(r,i)}e.closePath()}new Map,new Set;class Se extends _e{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:e=>"borderDash"!==e};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,t,n){const r=this.getProps(["x","y"],n),{angle:i,distance:o}=function(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*H&&(o+=W),{angle:o,distance:i}}(r,{x:e,y:t}),{startAngle:a,endAngle:s,innerRadius:l,outerRadius:c,circumference:u}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,h=D(u,s-a)>=W||function(e,t,n,r){const i=Z(e),o=Z(t),a=Z(n),s=Z(o-i),l=Z(a-i),c=Z(i-o),u=Z(i-a);return i===o||i===a||r&&o===a||s>l&&cW?Math.floor(n/W):0,0===n||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*r,Math.sin(a)*r);const s=r*(1-Math.sin(Math.min(H,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){Ae(e,t,n,r,l,i);for(let t=0;ti?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Y,r-Y),e.closePath(),e.clip()}(e,t,p),o||(Ae(e,t,n,r,p,i),e.stroke())}(e,this,s,i,o),e.restore()}}function Ee(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)t.left-n&&e.xt.top-n&&e.yn.right&&(r|=Ue),tn.bottom&&(r|=He),r}function Ye(e,t){var n,r,i=t.anchor,o=e;return t.clamp&&(o=function(e,t){for(var n,r,i,o=e.x0,a=e.y0,s=e.x1,l=e.y1,c=Ve(o,a,t),u=Ve(s,l,t);c|u&&!(c&u);)(n=c||u)&We?(r=o+(s-o)*(t.top-a)/(l-a),i=t.top):n&He?(r=o+(s-o)*(t.bottom-a)/(l-a),i=t.bottom):n&Ue?(i=a+(l-a)*(t.right-o)/(s-o),r=t.right):n&Be&&(i=a+(l-a)*(t.left-o)/(s-o),r=t.left),n===c?c=Ve(o=r,a=i,t):u=Ve(s=r,l=i,t);return{x0:o,x1:s,y0:a,y1:l}}(o,t.area)),"start"===i?(n=o.x0,r=o.y0):"end"===i?(n=o.x1,r=o.y1):(n=(o.x0+o.x1)/2,r=(o.y0+o.y1)/2),function(e,t,n,r,i){switch(i){case"center":n=r=0;break;case"bottom":n=0,r=1;break;case"right":n=1,r=0;break;case"left":n=-1,r=0;break;case"top":n=0,r=-1;break;case"start":n=-n,r=-r;break;case"end":break;default:i*=Math.PI/180,n=Math.cos(i),r=Math.sin(i)}return{x:e,y:t,vx:n,vy:r}}(n,r,e.vx,e.vy,t.align)}var Ge=function(e,t){var n=(e.startAngle+e.endAngle)/2,r=Math.cos(n),i=Math.sin(n),o=e.innerRadius,a=e.outerRadius;return Ye({x0:e.x+r*o,y0:e.y+i*o,x1:e.x+r*a,y1:e.y+i*a,vx:r,vy:i},t)},Je=function(e,t){var n=ze(e,t.origin),r=n.x*e.options.radius,i=n.y*e.options.radius;return Ye({x0:e.x-r,y0:e.y-i,x1:e.x+r,y1:e.y+i,vx:n.x,vy:n.y},t)},Ke=function(e,t){var n=ze(e,t.origin),r=e.x,i=e.y,o=0,a=0;return e.horizontal?(r=Math.min(e.x,e.base),o=Math.abs(e.base-e.x)):(i=Math.min(e.y,e.base),a=Math.abs(e.base-e.y)),Ye({x0:r,y0:i+a,x1:r+o,y1:i,vx:n.x,vy:n.y},t)},$e=function(e,t){var n=ze(e,t.origin);return Ye({x0:e.x,y0:e.y,x1:e.x+(e.width||0),y1:e.y+(e.height||0),vx:n.x,vy:n.y},t)},Ze=function(e){return Math.round(e*De)/De};function qe(e,t){var n=t.chart.getDatasetMeta(t.datasetIndex).vScale;if(!n)return null;if(void 0!==n.xCenter&&void 0!==n.yCenter)return{x:n.xCenter,y:n.yCenter};var r=n.getBasePixel();return e.horizontal?{x:r,y:null}:{x:null,y:r}}function Xe(e,t,n){var r=e.shadowBlur,i=n.stroked,o=Ze(n.x),a=Ze(n.y),s=Ze(n.w);i&&e.strokeText(t,o,a,s),n.filled&&(r&&i&&(e.shadowBlur=0),e.fillText(t,o,a,s),r&&i&&(e.shadowBlur=r))}var Qe=function(e,t,n,r){var i=this;i._config=e,i._index=r,i._model=null,i._rects=null,i._ctx=t,i._el=n};U(Qe.prototype,{_modelize:function(e,t,n,r){var i,o=this,a=o._index,s=we(ke([n.font,{}],r,a)),l=ke([n.color,de.color],r,a);return{align:ke([n.align,"center"],r,a),anchor:ke([n.anchor,"center"],r,a),area:r.chart.chartArea,backgroundColor:ke([n.backgroundColor,null],r,a),borderColor:ke([n.borderColor,null],r,a),borderRadius:ke([n.borderRadius,0],r,a),borderWidth:ke([n.borderWidth,0],r,a),clamp:ke([n.clamp,!1],r,a),clip:ke([n.clip,!1],r,a),color:l,display:e,font:s,lines:t,offset:ke([n.offset,4],r,a),opacity:ke([n.opacity,1],r,a),origin:qe(o._el,r),padding:xe(ke([n.padding,4],r,a)),positioner:(i=o._el,i instanceof Se?Ge:i instanceof Pe?Je:i instanceof Ne?Ke:$e),rotation:ke([n.rotation,0],r,a)*(Math.PI/180),size:Le(o._ctx,t,s),textAlign:ke([n.textAlign,"start"],r,a),textShadowBlur:ke([n.textShadowBlur,0],r,a),textShadowColor:ke([n.textShadowColor,l],r,a),textStrokeColor:ke([n.textStrokeColor,l],r,a),textStrokeWidth:ke([n.textStrokeWidth,0],r,a)}},update:function(e){var t,n,r,i=this,o=null,a=null,s=i._index,l=i._config,c=ke([l.display,!0],e,s);c&&(t=e.dataset.data[s],(r=T(n=D(L(l.formatter,[t,e]),t))?[]:function(e){var t,n=[];for(e=[].concat(e);e.length;)"string"==typeof(t=e.pop())?n.unshift.apply(n,t.split("\n")):Array.isArray(t)?e.push.apply(e,t):T(e)||n.unshift(""+t);return n}(n)).length&&(a=function(e){var t=e.borderWidth||0,n=e.padding,r=e.size.height,i=e.size.width,o=-i/2,a=-r/2;return{frame:{x:o-n.left-t,y:a-n.top-t,w:i+n.width+2*t,h:r+n.height+2*t},text:{x:o,y:a,w:i,h:r}}}(o=i._modelize(c,r,l,e)))),i._model=o,i._rects=a},geometry:function(){return this._rects?this._rects.frame:{}},rotation:function(){return this._model?this._model.rotation:0},visible:function(){return this._model&&this._model.opacity},model:function(){return this._model},draw:function(e,t){var n,r,i,o,a=e.ctx,s=this._model,l=this._rects;this.visible()&&(a.save(),s.clip&&(n=s.area,a.beginPath(),a.rect(n.left,n.top,n.right-n.left,n.bottom-n.top),a.clip()),a.globalAlpha=(r=0,i=s.opacity,o=1,Math.max(r,Math.min(i,o))),a.translate(Ze(t.x),Ze(t.y)),a.rotate(s.rotation),function(e,t,n){var r=n.backgroundColor,i=n.borderColor,o=n.borderWidth;(r||i&&o)&&(e.beginPath(),function(e,t,n,r,i,o){var a=Math.PI/2;if(o){var s=Math.min(o,i/2,r/2),l=t+s,c=n+s,u=t+r-s,d=n+i-s;e.moveTo(t,c),ln.x+n.w+2||e.y>n.y+n.h+2)},intersects:function(e){var t,n,r,i=this._points(),o=e._points(),a=[it(i[0],i[1]),it(i[0],i[3])];for(this._rotation!==e._rotation&&a.push(it(o[0],o[1]),it(o[0],o[3])),t=0;te.getProps([t],!0)[t]}),o=r.geometry(),a=at(s,r.model(),o),i._box.update(a,o,r.rotation()));!function(e,t){var n,r,i,o;for(n=e.length-1;n>=0;--n)for(i=e[n].$layout,r=n-1;r>=0&&i._visible;--r)(o=e[r].$layout)._visible&&i._box.intersects(o._box)&&t(i,o)}(e,(function(e,t){var n=e._hidable,r=t._hidable;n&&r||r?t._visible=!1:n&&(e._visible=!1)}))}(e)},lookup:function(e,t){var n,r;for(n=e.length-1;n>=0;--n)if((r=e[n].$layout)&&r._visible&&r._box.contains(t))return e[n];return null},draw:function(e,t){var n,r,i,o,a,s;for(n=0,r=t.length;n{"use strict";var t,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(a,{Immer:()=>$,applyPatches:()=>ae,castDraft:()=>ce,castImmutable:()=>ue,createDraft:()=>se,current:()=>q,enableMapSet:()=>ee,enablePatches:()=>Q,finishDraft:()=>le,freeze:()=>S,immerable:()=>l,isDraft:()=>h,isDraftable:()=>f,nothing:()=>s,original:()=>m,produce:()=>ne,produceWithPatches:()=>re,setAutoFreeze:()=>ie,setUseStrictShallowCopy:()=>oe}),e.exports=(t=a,((e,t,a,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of i(t))!o.call(e,a)&&undefined!==a&&n(e,a,{get:()=>t[a],enumerable:!(s=r(t,a))||s.enumerable});return e})(n({},"__esModule",{value:!0}),t));var s=Symbol.for("immer-nothing"),l=Symbol.for("immer-draftable"),c=Symbol.for("immer-state");function u(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var d=Object.getPrototypeOf;function h(e){return!!e&&!!e[c]}function f(e){return!!e&&(g(e)||Array.isArray(e)||!!e[l]||!!e.constructor?.[l]||k(e)||_(e))}var p=Object.prototype.constructor.toString();function g(e){if(!e||"object"!=typeof e)return!1;let t=d(e);if(null===t)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===p}function m(e){return h(e)||u(15),e[c].t}function b(e,t){0===y(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function y(e){let t=e[c];return t?t.o:Array.isArray(e)?1:k(e)?2:_(e)?3:0}function v(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function x(e,t){return 2===y(e)?e.get(t):e[t]}function w(e,t,n){let r=y(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function k(e){return e instanceof Map}function _(e){return e instanceof Set}function C(e){return e.e||e.t}function A(e,t){if(k(e))return new Map(e);if(_(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=g(e);if(!0===t||"class_only"===t&&!n){let t=Object.getOwnPropertyDescriptors(e);delete t[c];let n=Reflect.ownKeys(t);for(let r=0;r1&&(e.set=e.add=e.clear=e.delete=E),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>S(t,!0)))),e}function E(){u(2)}function P(e){return Object.isFrozen(e)}var O,R={};function j(e){let t=R[e];return t||u(0),t}function I(e,t){R[e]||(R[e]=t)}function T(){return O}function M(e,t){t&&(j("Patches"),e.f=[],e.h=[],e.b=t)}function N(e){D(e),e.a.forEach(z),e.a=null}function D(e){e===O&&(O=e.i)}function L(e){return O=function(e,t){return{a:[],i:e,p:t,P:!0,d:0}}(O,e)}function z(e){let t=e[c];0===t.o||1===t.o?t.x():t.m=!0}function F(e,t){t.d=t.a.length;let n=t.a[0];return void 0!==e&&e!==n?(n[c].s&&(N(t),u(4)),f(e)&&(e=B(t,e),t.i||H(t,e)),t.f&&j("Patches").T(n[c].t,e,t.f,t.h)):e=B(t,n,[]),N(t),t.f&&t.b(t.f,t.h),e!==s?e:void 0}function B(e,t,n){if(P(t))return t;let r=t[c];if(!r)return b(t,((i,o)=>U(e,r,t,i,o,n))),t;if(r.n!==e)return t;if(!r.s)return H(e,r.t,!0),r.t;if(!r.c){r.c=!0,r.n.d--;let t=r.e,i=t,o=!1;3===r.o&&(i=new Set(t),t.clear(),o=!0),b(i,((i,a)=>U(e,r,t,i,a,n,o))),H(e,t,!1),n&&e.f&&j("Patches").g(r,n,e.f,e.h)}return r.e}function U(e,t,n,r,i,o,a){if(h(i)){let a=B(e,i,o&&t&&3!==t.o&&!v(t.r,r)?o.concat(r):void 0);if(w(n,r,a),!h(a))return;e.P=!1}else a&&n.add(i);if(f(i)&&!P(i)){if(!e.p.y&&e.d<1)return;B(e,i),(!t||!t.n.i)&&"symbol"!=typeof r&&Object.prototype.propertyIsEnumerable.call(n,r)&&H(e,i)}}function H(e,t,n=!1){!e.i&&e.p.y&&e.P&&S(t,n)}var W={get(e,t){if(t===c)return e;let n=C(e);if(!v(n,t))return function(e,t,n){let r=G(t,n);return r?"value"in r?r.value:r.get?.call(e.u):void 0}(e,n,t);let r=n[t];return e.c||!f(r)?r:r===Y(e.t,t)?(K(e),e.e[t]=Z(r,e)):r},has:(e,t)=>t in C(e),ownKeys:e=>Reflect.ownKeys(C(e)),set(e,t,n){let r=G(C(e),t);if(r?.set)return r.set.call(e.u,n),!0;if(!e.s){let r=Y(C(e),t),i=r?.[c];if(i&&i.t===n)return e.e[t]=n,e.r[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||v(e.t,t)))return!0;K(e),J(e)}return e.e[t]===n&&(void 0!==n||t in e.e)||Number.isNaN(n)&&Number.isNaN(e.e[t])||(e.e[t]=n,e.r[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Y(e.t,t)||t in e.t?(e.r[t]=!1,K(e),J(e)):delete e.r[t],e.e&&delete e.e[t],!0),getOwnPropertyDescriptor(e,t){let n=C(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.o||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){u(11)},getPrototypeOf:e=>d(e.t),setPrototypeOf(){u(12)}},V={};function Y(e,t){let n=e[c];return(n?C(n):e)[t]}function G(e,t){if(!(t in e))return;let n=d(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=d(n)}}function J(e){e.s||(e.s=!0,e.i&&J(e.i))}function K(e){e.e||(e.e=A(e.t,e.n.p.S))}b(W,((e,t)=>{V[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),V.deleteProperty=function(e,t){return V.set.call(this,e,t,void 0)},V.set=function(e,t,n){return W.set.call(this,e[0],t,n,e[0])};var $=class{constructor(e){this.y=!0,this.S=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,(e=>t.call(this,e,...i)))}}let r;if("function"!=typeof t&&u(6),void 0!==n&&"function"!=typeof n&&u(7),f(e)){let i=L(this),o=Z(e,void 0),a=!0;try{r=t(o),a=!1}finally{a?N(i):D(i)}return M(i,n),F(r,i)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===s&&(r=void 0),this.y&&S(r,!0),n){let t=[],i=[];j("Patches").T(e,r,t,i),n(t,i)}return r}u(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){f(e)||u(8),h(e)&&(e=q(e));let t=L(this),n=Z(e,void 0);return n[c].l=!0,D(t),n}finishDraft(e,t){let n=e&&e[c];(!n||!n.l)&&u(9);let{n:r}=n;return M(r,t),F(void 0,r)}setAutoFreeze(e){this.y=e}setUseStrictShallowCopy(e){this.S=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=j("Patches").A;return h(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function Z(e,t){let n=k(e)?j("MapSet").I(e,t):_(e)?j("MapSet").D(e,t):function(e,t){let n=Array.isArray(e),r={o:n?1:0,n:t?t.n:T(),s:!1,c:!1,r:{},i:t,t:e,u:null,e:null,x:null,l:!1},i=r,o=W;n&&(i=[r],o=V);let{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.u=s,r.x=a,s}(e,t);return(t?t.n:T()).a.push(n),n}function q(e){return h(e)||u(10),X(e)}function X(e){if(!f(e)||P(e))return e;let t,n=e[c];if(n){if(!n.s)return n.t;n.c=!0,t=A(e,n.n.p.S)}else t=A(e,!0);return b(t,((e,n)=>{w(t,e,X(n))})),n&&(n.c=!1),t}function Q(){let e="replace",t="add",n="remove";function r(e){if(!f(e))return e;if(Array.isArray(e))return e.map(r);if(k(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,r(t)])));if(_(e))return new Set(Array.from(e).map(r));let t=Object.create(d(e));for(let n in e)t[n]=r(e[n]);return v(e,l)&&(t[l]=e[l]),t}function i(e){return h(e)?r(e):e}I("Patches",{A:function(i,o){return o.forEach((o=>{let{path:a,op:s}=o,l=i;for(let e=0;e{let d=x(l,r),h=x(c,r),f=u?v(l,r)?e:t:n;if(d===h&&f===e)return;let p=o.concat(r);a.push(f===n?{op:f,path:p}:{op:f,path:p,value:h}),s.push(f===t?{op:n,path:p}:f===n?{op:t,path:p,value:i(d)}:{op:e,path:p,value:i(d)})}))}(r,o,a,s);case 1:return function(r,o,a,s){let{t:l,r:c}=r,u=r.e;u.length{if(!s.has(e)){let a=r.concat([l]);i.push({op:n,path:a,value:e}),o.unshift({op:t,path:a,value:e})}l++})),l=0,s.forEach((e=>{if(!a.has(e)){let a=r.concat([l]);i.push({op:t,path:a,value:e}),o.unshift({op:n,path:a,value:e})}l++}))}(r,o,a,s)}},T:function(t,n,r,i){r.push({op:e,path:[],value:n===s?void 0:n}),i.push({op:e,path:[],value:t})}})}function ee(){class e extends Map{constructor(e,t){super(),this[c]={o:2,i:t,n:t?t.n:T(),s:!1,c:!1,e:void 0,r:void 0,t:e,u:this,l:!1,m:!1}}get size(){return C(this[c]).size}has(e){return C(this[c]).has(e)}set(e,n){let r=this[c];return i(r),(!C(r).has(e)||C(r).get(e)!==n)&&(t(r),J(r),r.r.set(e,!0),r.e.set(e,n),r.r.set(e,!0)),this}delete(e){if(!this.has(e))return!1;let n=this[c];return i(n),t(n),J(n),n.t.has(e)?n.r.set(e,!1):n.r.delete(e),n.e.delete(e),!0}clear(){let e=this[c];i(e),C(e).size&&(t(e),J(e),e.r=new Map,b(e.t,(t=>{e.r.set(t,!1)})),e.e.clear())}forEach(e,t){C(this[c]).forEach(((n,r,i)=>{e.call(t,this.get(r),r,this)}))}get(e){let n=this[c];i(n);let r=C(n).get(e);if(n.c||!f(r)||r!==n.t.get(e))return r;let o=Z(r,n);return t(n),n.e.set(e,o),o}keys(){return C(this[c]).keys()}values(){let e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{let t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){let e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{let t=e.next();if(t.done)return t;let n=this.get(t.value);return{done:!1,value:[t.value,n]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.e||(e.r=new Map,e.e=new Map(e.t))}class n extends Set{constructor(e,t){super(),this[c]={o:3,i:t,n:t?t.n:T(),s:!1,c:!1,e:void 0,t:e,u:this,a:new Map,m:!1,l:!1}}get size(){return C(this[c]).size}has(e){let t=this[c];return i(t),t.e?!!(t.e.has(e)||t.a.has(e)&&t.e.has(t.a.get(e))):t.t.has(e)}add(e){let t=this[c];return i(t),this.has(e)||(r(t),J(t),t.e.add(e)),this}delete(e){if(!this.has(e))return!1;let t=this[c];return i(t),r(t),J(t),t.e.delete(e)||!!t.a.has(e)&&t.e.delete(t.a.get(e))}clear(){let e=this[c];i(e),C(e).size&&(r(e),J(e),e.e.clear())}values(){let e=this[c];return i(e),r(e),e.e.values()}entries(){let e=this[c];return i(e),r(e),e.e.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){let n=this.values(),r=n.next();for(;!r.done;)e.call(t,r.value,r.value,this),r=n.next()}}function r(e){e.e||(e.e=new Set,e.t.forEach((t=>{if(f(t)){let n=Z(t,e);e.a.set(t,n),e.e.add(n)}else e.e.add(t)})))}function i(e){e.m&&u(3,JSON.stringify(C(e)))}I("MapSet",{I:function(t,n){return new e(t,n)},D:function(e,t){return new n(e,t)}})}var te=new $,ne=te.produce,re=te.produceWithPatches.bind(te),ie=te.setAutoFreeze.bind(te),oe=te.setUseStrictShallowCopy.bind(te),ae=te.applyPatches.bind(te),se=te.createDraft.bind(te),le=te.finishDraft.bind(te);function ce(e){return e}function ue(e){return e}},9407:(e,t,n)=>{"use strict";e.exports=n(124)},311:e=>{"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},7348:(e,t,n)=>{"use strict";n.r(t)},1728:(e,t,n)=>{"use strict";n.r(t)},4539:(e,t,n)=>{"use strict";n.r(t)},9151:(e,t,n)=>{"use strict";n.r(t)},733:(e,t,n)=>{"use strict";n.r(t)},8412:(e,t,n)=>{"use strict";n.r(t)},9512:(e,t,n)=>{"use strict";n.r(t)},9920:(e,t,n)=>{"use strict";n.r(t)},2816:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=arguments.length,t=Array(e),n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,i,o,a){var s=i||"<>",l=a||r;if(null==n[r])return t?new Error("Required "+o+" `"+l+"` was not specified in `"+s+"`."):null;for(var c=arguments.length,u=Array(c>6?c-6:0),d=6;d{"use strict";var r=n(6925);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={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:o,resetWarningCache:i};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5841:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Accordion:()=>Ae,AccordionBody:()=>me,AccordionButton:()=>ve,AccordionCollapse:()=>he,AccordionContext:()=>ue,AccordionHeader:()=>we,AccordionItem:()=>_e,Alert:()=>tt,AlertHeading:()=>je,AlertLink:()=>Ye,Anchor:()=>nt,Badge:()=>it,Breadcrumb:()=>lt,BreadcrumbItem:()=>at,Button:()=>ut,ButtonGroup:()=>ht,ButtonToolbar:()=>pt,Card:()=>zt,CardBody:()=>mt,CardFooter:()=>yt,CardGroup:()=>Bt,CardHeader:()=>kt,CardImg:()=>Ct,CardImgOverlay:()=>St,CardLink:()=>Pt,CardSubtitle:()=>jt,CardText:()=>Tt,CardTitle:()=>Dt,Carousel:()=>Xt,CarouselCaption:()=>Gt,CarouselItem:()=>Kt,CloseButton:()=>Qe,Col:()=>tn,Collapse:()=>se,Container:()=>rn,Dropdown:()=>Vi,DropdownButton:()=>$i,DropdownDivider:()=>Si,DropdownHeader:()=>Pi,DropdownItem:()=>Ri,DropdownItemText:()=>Ii,DropdownMenu:()=>Bi,DropdownToggle:()=>Hi,Fade:()=>Ke,Figure:()=>io,FigureCaption:()=>no,FigureImage:()=>eo,FloatingLabel:()=>To,Form:()=>Do,FormCheck:()=>go,FormControl:()=>bo,FormFloating:()=>vo,FormGroup:()=>wo,FormLabel:()=>_o,FormSelect:()=>Eo,FormText:()=>Oo,Image:()=>Xi,InputGroup:()=>Bo,ListGroup:()=>ea,ListGroupItem:()=>Xo,Modal:()=>Ya,ModalBody:()=>Oa,ModalDialog:()=>Ia,ModalFooter:()=>Ma,ModalHeader:()=>za,ModalTitle:()=>Ua,Nav:()=>qa,NavDropdown:()=>Os,NavItem:()=>Ja,NavLink:()=>$a,Navbar:()=>Es,NavbarBrand:()=>Qa,NavbarCollapse:()=>ts,NavbarOffcanvas:()=>_s,NavbarText:()=>As,NavbarToggle:()=>rs,Offcanvas:()=>ws,OffcanvasBody:()=>cs,OffcanvasHeader:()=>ps,OffcanvasTitle:()=>bs,OffcanvasToggling:()=>hs,Overlay:()=>Vs,OverlayTrigger:()=>Gs,PageItem:()=>Ks,Pagination:()=>nl,Placeholder:()=>sl,PlaceholderButton:()=>ol,Popover:()=>Bs,PopoverBody:()=>Ds,PopoverHeader:()=>Ms,ProgressBar:()=>hl,Ratio:()=>fl,Row:()=>gl,SSRProvider:()=>wl,Spinner:()=>bl,SplitButton:()=>xl,Stack:()=>Cl,Tab:()=>Hl,TabContainer:()=>Nl,TabContent:()=>Ll,TabPane:()=>Fl,Table:()=>Vl,Tabs:()=>Kl,ThemeProvider:()=>C,Toast:()=>ic,ToastBody:()=>nc,ToastContainer:()=>sc,ToastHeader:()=>ec,ToggleButton:()=>uc,ToggleButtonGroup:()=>hc,Tooltip:()=>Hs,useAccordionButton:()=>be});var r=n(6942),i=n.n(r),o=n(6540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}var l=n(311),c=n.n(l);function u(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function d(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function h(e,t,n){var r=(0,o.useRef)(void 0!==e),i=(0,o.useState)(t),a=i[0],s=i[1],l=void 0!==e,c=r.current;return r.current=l,!l&&c&&a!==t&&s(t),[l?e:a,(0,o.useCallback)((function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i({prefixes:{...e},breakpoints:t,minBreakpoint:n,dir:r})),[e,t,n,r]);return(0,p.jsx)(v,{value:a,children:i})};function A(e){return e&&e.ownerDocument||document}var S=/([A-Z])/g,E=/^ms-/;function P(e){return function(e){return e.replace(S,"-$1").toLowerCase()}(e).replace(E,"-ms-")}var O=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const R=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(P(t))||function(e,t){return function(e){var t=A(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}(e).getPropertyValue(P(t));Object.keys(t).forEach((function(i){var o=t[i];o||0===o?function(e){return!(!e||!O.test(e))}(i)?r+=i+"("+o+") ":n+=P(i)+": "+o+";":e.style.removeProperty(P(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var I=n(961);const T=o.createContext(null);var M="unmounted",N="exited",D="entering",L="entered",z="exiting",F=function(e){var t,n;function r(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=N,r.appearStatus=D):i=L:i=t.unmountOnExit||t.mountOnEnter?M:N,r.state={status:i},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,j(t,n),r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===M?{status:N}:null};var i=r.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==D&&n!==L&&(t=D):n!==D&&n!==L||(t=z)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===D){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:I.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===N&&this.setState({status:M})},i.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[I.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;e||n?(this.props.onEnter(o,a),this.safeSetState({status:D},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:L},(function(){t.props.onEntered(o,a)}))}))}))):this.safeSetState({status:L},(function(){t.props.onEntered(o)}))},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:I.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:z},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:N},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:N},(function(){e.props.onExited(r)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:I.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===M)return null;var t=this.props,n=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,s(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(T.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},r}(o.Component);function B(){}F.contextType=T,F.propTypes={},F.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:B,onEntering:B,onEntered:B,onExit:B,onExiting:B,onExited:B},F.UNMOUNTED=M,F.EXITED=N,F.ENTERING=D,F.ENTERED=L,F.EXITING=z;const U=F,H=!("undefined"==typeof window||!window.document||!window.document.createElement);var W=!1,V=!1;try{var Y={get passive(){return W=!0},get once(){return V=W=!0}};H&&(window.addEventListener("test",Y,Y),window.removeEventListener("test",Y,!0))}catch(e){}const G=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!V){var i=r.once,o=r.capture,a=n;!V&&i&&(a=n.__once||function e(r){this.removeEventListener(t,e,o),n.call(this,r)},n.__once=a),e.addEventListener(t,a,W?r:o)}e.addEventListener(t,n,r)},J=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)},K=function(e,t,n,r){return G(e,t,n,r),function(){J(e,t,n,r)}};function $(e,t,n,r){var i,o;null==n&&(o=-1===(i=R(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(i)*o||0);var a=function(e,t,n){void 0===n&&(n=5);var r=!1,i=setTimeout((function(){r||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent("transitionend",n,r),e.dispatchEvent(i)}}(e,0,!0)}),t+n),o=K(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),o()}}(e,n,r),s=K(e,"transitionend",t);return function(){a(),s()}}function Z(e,t){const n=R(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function q(e,t){const n=Z(e,"transitionDuration"),r=Z(e,"transitionDelay"),i=$(e,(n=>{n.target===e&&(i(),t(n))}),n+r)}const X=function(...e){return e.filter((e=>null!=e)).reduce(((e,t)=>{if("function"!=typeof t)throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return null===e?t:function(...n){e.apply(this,n),t.apply(this,n)}}),null)};function Q(e){e.offsetHeight}const ee=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,te=function(e,t){return(0,o.useMemo)((()=>function(e,t){const n=ee(e),r=ee(t);return e=>{n&&n(e),r&&r(e)}}(e,t)),[e,t])};function ne(e){return e&&"setState"in e?I.findDOMNode(e):null!=e?e:null}const re=o.forwardRef((({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:a,addEndListener:s,children:l,childRef:c,...u},d)=>{const h=(0,o.useRef)(null),f=te(h,c),g=e=>{f(ne(e))},m=e=>t=>{e&&h.current&&e(h.current,t)},b=(0,o.useCallback)(m(e),[e]),y=(0,o.useCallback)(m(t),[t]),v=(0,o.useCallback)(m(n),[n]),x=(0,o.useCallback)(m(r),[r]),w=(0,o.useCallback)(m(i),[i]),k=(0,o.useCallback)(m(a),[a]),_=(0,o.useCallback)(m(s),[s]);return(0,p.jsx)(U,{ref:d,...u,onEnter:b,onEntered:v,onEntering:y,onExit:x,onExited:k,onExiting:w,addEndListener:_,nodeRef:h,children:"function"==typeof l?(e,t)=>l(e,{...t,ref:g}):o.cloneElement(l,{ref:g})})})),ie={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function oe(e,t){const n=t[`offset${e[0].toUpperCase()}${e.slice(1)}`],r=ie[e];return n+parseInt(R(t,r[0]),10)+parseInt(R(t,r[1]),10)}const ae={[N]:"collapse",[z]:"collapsing",[D]:"collapsing",[L]:"collapse show"},se=o.forwardRef((({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:a,className:s,children:l,dimension:c="height",in:u=!1,timeout:d=300,mountOnEnter:h=!1,unmountOnExit:f=!1,appear:g=!1,getDimensionValue:m=oe,...b},y)=>{const v="function"==typeof c?c():c,x=(0,o.useMemo)((()=>X((e=>{e.style[v]="0"}),e)),[v,e]),w=(0,o.useMemo)((()=>X((e=>{const t=`scroll${v[0].toUpperCase()}${v.slice(1)}`;e.style[v]=`${e[t]}px`}),t)),[v,t]),k=(0,o.useMemo)((()=>X((e=>{e.style[v]=null}),n)),[v,n]),_=(0,o.useMemo)((()=>X((e=>{e.style[v]=`${m(v,e)}px`,Q(e)}),r)),[r,m,v]),C=(0,o.useMemo)((()=>X((e=>{e.style[v]=null}),a)),[v,a]);return(0,p.jsx)(re,{ref:y,addEndListener:q,...b,"aria-expanded":b.role?u:null,onEnter:x,onEntering:w,onEntered:k,onExit:_,onExiting:C,childRef:l.ref,in:u,timeout:d,mountOnEnter:h,unmountOnExit:f,appear:g,children:(e,t)=>o.cloneElement(l,{...t,className:i()(s,l.props.className,ae[e],"width"===v&&"collapse-horizontal")})})}));function le(e,t){return Array.isArray(e)?e.includes(t):e===t}const ce=o.createContext({});ce.displayName="AccordionContext";const ue=ce,de=o.forwardRef((({as:e="div",bsPrefix:t,className:n,children:r,eventKey:a,...s},l)=>{const{activeEventKey:c}=(0,o.useContext)(ue);return t=x(t,"accordion-collapse"),(0,p.jsx)(se,{ref:l,in:le(c,a),...s,className:i()(n,t),children:(0,p.jsx)(e,{children:o.Children.only(r)})})}));de.displayName="AccordionCollapse";const he=de,fe=o.createContext({eventKey:""});fe.displayName="AccordionItemContext";const pe=fe,ge=o.forwardRef((({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:a,onEntered:s,onExit:l,onExiting:c,onExited:u,...d},h)=>{t=x(t,"accordion-body");const{eventKey:f}=(0,o.useContext)(pe);return(0,p.jsx)(he,{eventKey:f,onEnter:r,onEntering:a,onEntered:s,onExit:l,onExiting:c,onExited:u,children:(0,p.jsx)(e,{ref:h,...d,className:i()(n,t)})})}));ge.displayName="AccordionBody";const me=ge;function be(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:i}=(0,o.useContext)(ue);return o=>{let a=e===n?null:e;i&&(a=Array.isArray(n)?n.includes(e)?n.filter((t=>t!==e)):[...n,e]:[e]),null==r||r(a,o),null==t||t(o)}}const ye=o.forwardRef((({as:e="button",bsPrefix:t,className:n,onClick:r,...a},s)=>{t=x(t,"accordion-button");const{eventKey:l}=(0,o.useContext)(pe),c=be(l,r),{activeEventKey:u}=(0,o.useContext)(ue);return"button"===e&&(a.type="button"),(0,p.jsx)(e,{ref:s,onClick:c,...a,"aria-expanded":Array.isArray(u)?u.includes(l):l===u,className:i()(n,t,!le(u,l)&&"collapsed")})}));ye.displayName="AccordionButton";const ve=ye,xe=o.forwardRef((({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...a},s)=>(t=x(t,"accordion-header"),(0,p.jsx)(e,{ref:s,...a,className:i()(n,t),children:(0,p.jsx)(ve,{onClick:o,children:r})}))));xe.displayName="AccordionHeader";const we=xe,ke=o.forwardRef((({as:e="div",bsPrefix:t,className:n,eventKey:r,...a},s)=>{t=x(t,"accordion-item");const l=(0,o.useMemo)((()=>({eventKey:r})),[r]);return(0,p.jsx)(pe.Provider,{value:l,children:(0,p.jsx)(e,{ref:s,...a,className:i()(n,t)})})}));ke.displayName="AccordionItem";const _e=ke,Ce=o.forwardRef(((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:a,className:s,onSelect:l,flush:c,alwaysOpen:u,...d}=f(e,{activeKey:"onSelect"}),h=x(a,"accordion"),g=(0,o.useMemo)((()=>({activeEventKey:r,onSelect:l,alwaysOpen:u})),[r,l,u]);return(0,p.jsx)(ue.Provider,{value:g,children:(0,p.jsx)(n,{ref:t,...d,className:i()(s,h,c&&`${h}-flush`)})})}));Ce.displayName="Accordion";const Ae=Object.assign(Ce,{Button:ve,Collapse:he,Item:_e,Header:we,Body:me}),Se=function(e){const t=(0,o.useRef)(e);return(0,o.useEffect)((()=>{t.current=e}),[e]),t};function Ee(e){const t=Se(e);return(0,o.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}const Pe=e=>o.forwardRef(((t,n)=>(0,p.jsx)("div",{...t,ref:n,className:i()(t.className,e)}))),Oe=Pe("h4");Oe.displayName="DivStyledAsH4";const Re=o.forwardRef((({className:e,bsPrefix:t,as:n=Oe,...r},o)=>(t=x(t,"alert-heading"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Re.displayName="AlertHeading";const je=Re;function Ie(){return(0,o.useState)(null)}function Te(){const e=(0,o.useRef)(!0),t=(0,o.useRef)((()=>e.current));return(0,o.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}function Me(e){const t=(0,o.useRef)(null);return(0,o.useEffect)((()=>{t.current=e})),t.current}const Ne=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,De="undefined"!=typeof document||Ne?o.useLayoutEffect:o.useEffect;new WeakMap;const Le=["as","disabled"];function ze({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:a,tabIndex:s=0,type:l}){e||(e=null!=n||null!=r||null!=i?"a":"button");const c={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},c];const u=r=>{(t||"a"===e&&function(e){return!e||"#"===e.trim()}(n))&&r.preventDefault(),t?r.stopPropagation():null==a||a(r)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=o?o:"button",disabled:void 0,tabIndex:t?void 0:s,href:n,target:"a"===e?r:void 0,"aria-disabled":t||void 0,rel:"a"===e?i:void 0,onClick:u,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),u(e))}},c]}const Fe=o.forwardRef(((e,t)=>{let{as:n,disabled:r}=e,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,Le);const[o,{tagName:a}]=ze(Object.assign({tagName:n,disabled:r},i));return(0,p.jsx)(a,Object.assign({},i,o,{ref:t}))}));Fe.displayName="Button";const Be=Fe,Ue=["onKeyDown"],He=o.forwardRef(((e,t)=>{let{onKeyDown:n}=e,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,Ue);const[i]=ze(Object.assign({tagName:"a"},r)),o=Ee((e=>{i.onKeyDown(e),null==n||n(e)}));return(a=r.href)&&"#"!==a.trim()&&"button"!==r.role?(0,p.jsx)("a",Object.assign({ref:t},r,{onKeyDown:n})):(0,p.jsx)("a",Object.assign({ref:t},r,i,{onKeyDown:o}));var a}));He.displayName="Anchor";const We=He,Ve=o.forwardRef((({className:e,bsPrefix:t,as:n=We,...r},o)=>(t=x(t,"alert-link"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ve.displayName="AlertLink";const Ye=Ve,Ge={[D]:"show",[L]:"show"},Je=o.forwardRef((({className:e,children:t,transitionClasses:n={},onEnter:r,...a},s)=>{const l={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...a},c=(0,o.useCallback)(((e,t)=>{Q(e),null==r||r(e,t)}),[r]);return(0,p.jsx)(re,{ref:s,addEndListener:q,...l,onEnter:c,childRef:t.ref,children:(r,a)=>o.cloneElement(t,{...a,className:i()("fade",e,t.props.className,Ge[r],n[r])})})}));Je.displayName="Fade";const Ke=Je;var $e=n(5556),Ze=n.n($e);const qe={"aria-label":Ze().string,onClick:Ze().func,variant:Ze().oneOf(["white"])},Xe=o.forwardRef((({className:e,variant:t,"aria-label":n="Close",...r},o)=>(0,p.jsx)("button",{ref:o,type:"button",className:i()("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r})));Xe.displayName="CloseButton",Xe.propTypes=qe;const Qe=Xe,et=o.forwardRef(((e,t)=>{const{bsPrefix:n,show:r=!0,closeLabel:o="Close alert",closeVariant:a,className:s,children:l,variant:c="primary",onClose:u,dismissible:d,transition:h=Ke,...g}=f(e,{show:"onClose"}),m=x(n,"alert"),b=Ee((e=>{u&&u(!1,e)})),y=!0===h?Ke:h,v=(0,p.jsxs)("div",{role:"alert",...y?void 0:g,ref:t,className:i()(s,m,c&&`${m}-${c}`,d&&`${m}-dismissible`),children:[d&&(0,p.jsx)(Qe,{onClick:b,"aria-label":o,variant:a}),l]});return y?(0,p.jsx)(y,{unmountOnExit:!0,...g,ref:void 0,in:r,children:v}):r?v:null}));et.displayName="Alert";const tt=Object.assign(et,{Link:Ye,Heading:je}),nt=We,rt=o.forwardRef((({bsPrefix:e,bg:t="primary",pill:n=!1,text:r,className:o,as:a="span",...s},l)=>{const c=x(e,"badge");return(0,p.jsx)(a,{ref:l,...s,className:i()(o,c,n&&"rounded-pill",r&&`text-${r}`,t&&`bg-${t}`)})}));rt.displayName="Badge";const it=rt,ot=o.forwardRef((({bsPrefix:e,active:t=!1,children:n,className:r,as:o="li",linkAs:a=We,linkProps:s={},href:l,title:c,target:u,...d},h)=>{const f=x(e,"breadcrumb-item");return(0,p.jsx)(o,{ref:h,...d,className:i()(f,r,{active:t}),"aria-current":t?"page":void 0,children:t?n:(0,p.jsx)(a,{...s,href:l,title:c,target:u,children:n})})}));ot.displayName="BreadcrumbItem";const at=ot,st=o.forwardRef((({bsPrefix:e,className:t,listProps:n={},children:r,label:o="breadcrumb",as:a="nav",...s},l)=>{const c=x(e,"breadcrumb");return(0,p.jsx)(a,{"aria-label":o,className:t,ref:l,...s,children:(0,p.jsx)("ol",{...n,className:i()(c,null==n?void 0:n.className),children:r})})}));st.displayName="Breadcrumb";const lt=Object.assign(st,{Item:at}),ct=o.forwardRef((({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:a=!1,className:s,...l},c)=>{const u=x(t,"btn"),[d,{tagName:h}]=ze({tagName:e,disabled:a,...l}),f=h;return(0,p.jsx)(f,{...d,...l,ref:c,disabled:a,className:i()(s,u,o&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&a&&"disabled")})}));ct.displayName="Button";const ut=ct,dt=o.forwardRef((({bsPrefix:e,size:t,vertical:n=!1,className:r,role:o="group",as:a="div",...s},l)=>{const c=x(e,"btn-group");let u=c;return n&&(u=`${c}-vertical`),(0,p.jsx)(a,{...s,ref:l,role:o,className:i()(r,u,t&&`${c}-${t}`)})}));dt.displayName="ButtonGroup";const ht=dt,ft=o.forwardRef((({bsPrefix:e,className:t,role:n="toolbar",...r},o)=>{const a=x(e,"btn-toolbar");return(0,p.jsx)("div",{...r,ref:o,className:i()(t,a),role:n})}));ft.displayName="ButtonToolbar";const pt=ft,gt=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"card-body"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));gt.displayName="CardBody";const mt=gt,bt=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"card-footer"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));bt.displayName="CardFooter";const yt=bt,vt=o.createContext(null);vt.displayName="CardHeaderContext";const xt=vt,wt=o.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},a)=>{const s=x(e,"card-header"),l=(0,o.useMemo)((()=>({cardHeaderBsPrefix:s})),[s]);return(0,p.jsx)(xt.Provider,{value:l,children:(0,p.jsx)(n,{ref:a,...r,className:i()(t,s)})})}));wt.displayName="CardHeader";const kt=wt,_t=o.forwardRef((({bsPrefix:e,className:t,variant:n,as:r="img",...o},a)=>{const s=x(e,"card-img");return(0,p.jsx)(r,{ref:a,className:i()(n?`${s}-${n}`:s,t),...o})}));_t.displayName="CardImg";const Ct=_t,At=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"card-img-overlay"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));At.displayName="CardImgOverlay";const St=At,Et=o.forwardRef((({className:e,bsPrefix:t,as:n="a",...r},o)=>(t=x(t,"card-link"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Et.displayName="CardLink";const Pt=Et,Ot=Pe("h6"),Rt=o.forwardRef((({className:e,bsPrefix:t,as:n=Ot,...r},o)=>(t=x(t,"card-subtitle"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Rt.displayName="CardSubtitle";const jt=Rt,It=o.forwardRef((({className:e,bsPrefix:t,as:n="p",...r},o)=>(t=x(t,"card-text"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));It.displayName="CardText";const Tt=It,Mt=Pe("h5"),Nt=o.forwardRef((({className:e,bsPrefix:t,as:n=Mt,...r},o)=>(t=x(t,"card-title"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Nt.displayName="CardTitle";const Dt=Nt,Lt=o.forwardRef((({bsPrefix:e,className:t,bg:n,text:r,border:o,body:a=!1,children:s,as:l="div",...c},u)=>{const d=x(e,"card");return(0,p.jsx)(l,{ref:u,...c,className:i()(t,d,n&&`bg-${n}`,r&&`text-${r}`,o&&`border-${o}`),children:a?(0,p.jsx)(mt,{children:s}):s})}));Lt.displayName="Card";const zt=Object.assign(Lt,{Img:Ct,Title:Dt,Subtitle:jt,Body:mt,Link:Pt,Text:Tt,Header:kt,Footer:yt,ImgOverlay:St}),Ft=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"card-group"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ft.displayName="CardGroup";const Bt=Ft;function Ut(e){const t=function(e){const t=(0,o.useRef)(e);return t.current=e,t}(e);(0,o.useEffect)((()=>()=>t.current()),[])}const Ht=2**31-1;function Wt(e,t,n){const r=n-Date.now();e.current=r<=Ht?setTimeout(t,r):setTimeout((()=>Wt(e,t,n)),Ht)}function Vt(){const e=Te(),t=(0,o.useRef)();return Ut((()=>clearTimeout(t.current))),(0,o.useMemo)((()=>{const n=()=>clearTimeout(t.current);return{set:function(r,i=0){e()&&(n(),i<=Ht?t.current=setTimeout(r,i):Wt(t,r,Date.now()+i))},clear:n,handleRef:t}}),[])}const Yt=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"carousel-caption"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Yt.displayName="CarouselCaption";const Gt=Yt,Jt=o.forwardRef((({as:e="div",bsPrefix:t,className:n,...r},o)=>{const a=i()(n,x(t,"carousel-item"));return(0,p.jsx)(e,{ref:o,...r,className:a})}));Jt.displayName="CarouselItem";const Kt=Jt;function $t(e,t){let n=0;return o.Children.map(e,(e=>o.isValidElement(e)?t(e,n++):e))}function Zt(e,t){let n=0;o.Children.forEach(e,(e=>{o.isValidElement(e)&&t(e,n++)}))}const qt=o.forwardRef((({defaultActiveIndex:e=0,...t},n)=>{const{as:r="div",bsPrefix:a,slide:s=!0,fade:l=!1,controls:c=!0,indicators:u=!0,indicatorLabels:d=[],activeIndex:h,onSelect:g,onSlide:m,onSlid:b,interval:y=5e3,keyboard:v=!0,onKeyDown:w,pause:k="hover",onMouseOver:C,onMouseOut:A,wrap:S=!0,touch:E=!0,onTouchStart:P,onTouchMove:O,onTouchEnd:R,prevIcon:j=(0,p.jsx)("span",{"aria-hidden":"true",className:"carousel-control-prev-icon"}),prevLabel:I="Previous",nextIcon:T=(0,p.jsx)("span",{"aria-hidden":"true",className:"carousel-control-next-icon"}),nextLabel:M="Next",variant:N,className:D,children:L,...z}=f({defaultActiveIndex:e,...t},{activeIndex:"onSelect"}),F=x(a,"carousel"),B=_(),U=(0,o.useRef)(null),[H,W]=(0,o.useState)("next"),[V,Y]=(0,o.useState)(!1),[G,J]=(0,o.useState)(!1),[K,$]=(0,o.useState)(h||0);(0,o.useEffect)((()=>{G||h===K||(U.current?W(U.current):W((h||0)>K?"next":"prev"),s&&J(!0),$(h||0))}),[h,G,K,s]),(0,o.useEffect)((()=>{U.current&&(U.current=null)}));let Z,X=0;Zt(L,((e,t)=>{++X,t===h&&(Z=e.props.interval)}));const ee=Se(Z),te=(0,o.useCallback)((e=>{if(G)return;let t=K-1;if(t<0){if(!S)return;t=X-1}U.current="prev",null==g||g(t,e)}),[G,K,g,S,X]),ne=Ee((e=>{if(G)return;let t=K+1;if(t>=X){if(!S)return;t=0}U.current="next",null==g||g(t,e)})),ie=(0,o.useRef)();(0,o.useImperativeHandle)(n,(()=>({element:ie.current,prev:te,next:ne})));const oe=Ee((()=>{!document.hidden&&function(e){if(!(e&&e.style&&e.parentNode&&e.parentNode.style))return!1;const t=getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&"none"!==getComputedStyle(e.parentNode).display}(ie.current)&&(B?te():ne())})),ae="next"===H?"start":"end";!function(e,t){const n=(0,o.useRef)(!0);(0,o.useEffect)((()=>{if(!n.current)return e();n.current=!1}),t)}((()=>{s||(null==m||m(K,ae),null==b||b(K,ae))}),[K]);const se=`${F}-item-${H}`,le=`${F}-item-${ae}`,ce=(0,o.useCallback)((e=>{Q(e),null==m||m(K,ae)}),[m,K,ae]),ue=(0,o.useCallback)((()=>{J(!1),null==b||b(K,ae)}),[b,K,ae]),de=(0,o.useCallback)((e=>{if(v&&!/input|textarea/i.test(e.target.tagName))switch(e.key){case"ArrowLeft":return e.preventDefault(),void(B?ne(e):te(e));case"ArrowRight":return e.preventDefault(),void(B?te(e):ne(e))}null==w||w(e)}),[v,w,te,ne,B]),he=(0,o.useCallback)((e=>{"hover"===k&&Y(!0),null==C||C(e)}),[k,C]),fe=(0,o.useCallback)((e=>{Y(!1),null==A||A(e)}),[A]),pe=(0,o.useRef)(0),ge=(0,o.useRef)(0),me=Vt(),be=(0,o.useCallback)((e=>{pe.current=e.touches[0].clientX,ge.current=0,"hover"===k&&Y(!0),null==P||P(e)}),[k,P]),ye=(0,o.useCallback)((e=>{e.touches&&e.touches.length>1?ge.current=0:ge.current=e.touches[0].clientX-pe.current,null==O||O(e)}),[O]),ve=(0,o.useCallback)((e=>{if(E){const t=ge.current;Math.abs(t)>40&&(t>0?te(e):ne(e))}"hover"===k&&me.set((()=>{Y(!1)}),y||void 0),null==R||R(e)}),[E,k,te,ne,me,y,R]),xe=null!=y&&!V&&!G,we=(0,o.useRef)();(0,o.useEffect)((()=>{var e,t;if(!xe)return;const n=B?te:ne;return we.current=window.setInterval(document.visibilityState?oe:n,null!=(e=null!=(t=ee.current)?t:y)?e:void 0),()=>{null!==we.current&&clearInterval(we.current)}}),[xe,te,ne,ee,y,oe,B]);const ke=(0,o.useMemo)((()=>u&&Array.from({length:X},((e,t)=>e=>{null==g||g(t,e)}))),[u,X,g]);return(0,p.jsxs)(r,{ref:ie,...z,onKeyDown:de,onMouseOver:he,onMouseOut:fe,onTouchStart:be,onTouchMove:ye,onTouchEnd:ve,className:i()(D,F,s&&"slide",l&&`${F}-fade`,N&&`${F}-${N}`),children:[u&&(0,p.jsx)("div",{className:`${F}-indicators`,children:$t(L,((e,t)=>(0,p.jsx)("button",{type:"button","data-bs-target":"","aria-label":null!=d&&d.length?d[t]:`Slide ${t+1}`,className:t===K?"active":void 0,onClick:ke?ke[t]:void 0,"aria-current":t===K},t)))}),(0,p.jsx)("div",{className:`${F}-inner`,children:$t(L,((e,t)=>{const n=t===K;return s?(0,p.jsx)(re,{in:n,onEnter:n?ce:void 0,onEntered:n?ue:void 0,addEndListener:q,children:(t,r)=>o.cloneElement(e,{...r,className:i()(e.props.className,n&&"entered"!==t&&se,("entered"===t||"exiting"===t)&&"active",("entering"===t||"exiting"===t)&&le)})}):o.cloneElement(e,{className:i()(e.props.className,n&&"active")})}))}),c&&(0,p.jsxs)(p.Fragment,{children:[(S||0!==h)&&(0,p.jsxs)(We,{className:`${F}-control-prev`,onClick:te,children:[j,I&&(0,p.jsx)("span",{className:"visually-hidden",children:I})]}),(S||h!==X-1)&&(0,p.jsxs)(We,{className:`${F}-control-next`,onClick:ne,children:[T,M&&(0,p.jsx)("span",{className:"visually-hidden",children:M})]})]})]})}));qt.displayName="Carousel";const Xt=Object.assign(qt,{Caption:Gt,Item:Kt});function Qt({as:e,bsPrefix:t,className:n,...r}){t=x(t,"col");const o=w(),a=k(),s=[],l=[];return o.forEach((e=>{const n=r[e];let i,o,c;delete r[e],"object"==typeof n&&null!=n?({span:i,offset:o,order:c}=n):i=n;const u=e!==a?`-${e}`:"";i&&s.push(!0===i?`${t}${u}`:`${t}${u}-${i}`),null!=c&&l.push(`order${u}-${c}`),null!=o&&l.push(`offset${u}-${o}`)})),[{...r,className:i()(n,...s,...l)},{as:e,bsPrefix:t,spans:s}]}const en=o.forwardRef(((e,t)=>{const[{className:n,...r},{as:o="div",bsPrefix:a,spans:s}]=Qt(e);return(0,p.jsx)(o,{...r,ref:t,className:i()(n,!s.length&&a)})}));en.displayName="Col";const tn=en,nn=o.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...o},a)=>{const s=x(e,"container"),l="string"==typeof t?`-${t}`:"-fluid";return(0,p.jsx)(n,{ref:a,...o,className:i()(r,t?`${s}${l}`:s)})}));nn.displayName="Container";const rn=nn;var on=Function.prototype.bind.call(Function.prototype.call,[].slice);function an(e,t){return on(e.querySelectorAll(t))}function sn(e,t,n){const r=(0,o.useRef)(void 0!==e),[i,a]=(0,o.useState)(t),s=void 0!==e,l=r.current;return r.current=s,!s&&l&&i!==t&&a(t),[s?e:i,(0,o.useCallback)(((...e)=>{const[t,...r]=e;let i=null==n?void 0:n(t,...r);return a(t),i}),[n])]}function ln(){const[,e]=(0,o.useReducer)((e=>!e),!1);return e}const cn=o.createContext(null);var un=Object.prototype.hasOwnProperty;function dn(e,t,n){for(n of e.keys())if(hn(n,t))return n}function hn(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&hn(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((i=r)&&"object"==typeof i&&!(i=dn(t,i)))return!1;if(!t.has(i))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((i=r[0])&&"object"==typeof i&&!(i=dn(t,i)))return!1;if(!hn(r[1],t.get(i)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(un.call(e,n)&&++r&&!un.call(t,n))return!1;if(!(n in t)||!hn(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function fn(e){return e.split("-")[0]}function pn(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function gn(e){return e instanceof pn(e).Element||e instanceof Element}function mn(e){return e instanceof pn(e).HTMLElement||e instanceof HTMLElement}function bn(e){return"undefined"!=typeof ShadowRoot&&(e instanceof pn(e).ShadowRoot||e instanceof ShadowRoot)}var yn=Math.max,vn=Math.min,xn=Math.round;function wn(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function kn(){return!/^((?!chrome|android).)*safari/i.test(wn())}function _n(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&mn(e)&&(i=e.offsetWidth>0&&xn(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&xn(r.height)/e.offsetHeight||1);var a=(gn(e)?pn(e):window).visualViewport,s=!kn()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,u=r.width/i,d=r.height/o;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function Cn(e){var t=_n(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function An(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Sn(e){return e?(e.nodeName||"").toLowerCase():null}function En(e){return pn(e).getComputedStyle(e)}function Pn(e){return["table","td","th"].indexOf(Sn(e))>=0}function On(e){return((gn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rn(e){return"html"===Sn(e)?e:e.assignedSlot||e.parentNode||(bn(e)?e.host:null)||On(e)}function jn(e){return mn(e)&&"fixed"!==En(e).position?e.offsetParent:null}function In(e){for(var t=pn(e),n=jn(e);n&&Pn(n)&&"static"===En(n).position;)n=jn(n);return n&&("html"===Sn(n)||"body"===Sn(n)&&"static"===En(n).position)?t:n||function(e){var t=/firefox/i.test(wn());if(/Trident/i.test(wn())&&mn(e)&&"fixed"===En(e).position)return null;var n=Rn(e);for(bn(n)&&(n=n.host);mn(n)&&["html","body"].indexOf(Sn(n))<0;){var r=En(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Tn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Mn(e,t,n){return yn(e,vn(t,n))}function Nn(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Dn(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Ln="top",zn="bottom",Fn="right",Bn="left",Un="auto",Hn=[Ln,zn,Fn,Bn],Wn="start",Vn="end",Yn="viewport",Gn="popper",Jn=Hn.reduce((function(e,t){return e.concat([t+"-"+Wn,t+"-"+Vn])}),[]),Kn=[].concat(Hn,[Un]).reduce((function(e,t){return e.concat([t,t+"-"+Wn,t+"-"+Vn])}),[]),$n=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];const Zn={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=fn(n.placement),l=Tn(s),c=[Bn,Fn].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(e,t){return Nn("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Dn(e,Hn))}(i.padding,n),d=Cn(o),h="y"===l?Ln:Bn,f="y"===l?zn:Fn,p=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],g=a[l]-n.rects.reference[l],m=In(o),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=p/2-g/2,v=u[h],x=b-d[c]-u[f],w=b/2-d[c]/2+y,k=Mn(v,w,x),_=l;n.modifiersData[r]=((t={})[_]=k,t.centerOffset=k-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&An(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qn(e){return e.split("-")[1]}var Xn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qn(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=a.x,f=void 0===h?0:h,p=a.y,g=void 0===p?0:p,m="function"==typeof u?u({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var b=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),v=Bn,x=Ln,w=window;if(c){var k=In(n),_="clientHeight",C="clientWidth";k===pn(n)&&"static"!==En(k=On(n)).position&&"absolute"===s&&(_="scrollHeight",C="scrollWidth"),(i===Ln||(i===Bn||i===Fn)&&o===Vn)&&(x=zn,g-=(d&&k===w&&w.visualViewport?w.visualViewport.height:k[_])-r.height,g*=l?1:-1),i!==Bn&&(i!==Ln&&i!==zn||o!==Vn)||(v=Fn,f-=(d&&k===w&&w.visualViewport?w.visualViewport.width:k[C])-r.width,f*=l?1:-1)}var A,S=Object.assign({position:s},c&&Xn),E=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:xn(n*i)/i||0,y:xn(r*i)/i||0}}({x:f,y:g},pn(n)):{x:f,y:g};return f=E.x,g=E.y,l?Object.assign({},S,((A={})[x]=y?"0":"",A[v]=b?"0":"",A.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",A)):Object.assign({},S,((t={})[x]=y?g+"px":"",t[v]=b?f+"px":"",t.transform="",t))}const er={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,l=void 0===s||s,c={placement:fn(t.placement),variation:qn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Qn(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Qn(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var tr={passive:!0};const nr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,l=pn(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,tr)})),s&&l.addEventListener("resize",n.update,tr),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,tr)})),s&&l.removeEventListener("resize",n.update,tr)}},data:{}};var rr={left:"right",right:"left",bottom:"top",top:"bottom"};function ir(e){return e.replace(/left|right|bottom|top/g,(function(e){return rr[e]}))}var or={start:"end",end:"start"};function ar(e){return e.replace(/start|end/g,(function(e){return or[e]}))}function sr(e){var t=pn(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function lr(e){return _n(On(e)).left+sr(e).scrollLeft}function cr(e){var t=En(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ur(e){return["html","body","#document"].indexOf(Sn(e))>=0?e.ownerDocument.body:mn(e)&&cr(e)?e:ur(Rn(e))}function dr(e,t){var n;void 0===t&&(t=[]);var r=ur(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=pn(r),a=i?[o].concat(o.visualViewport||[],cr(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(dr(Rn(a)))}function hr(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fr(e,t,n){return t===Yn?hr(function(e,t){var n=pn(e),r=On(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=kn();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+lr(e),y:l}}(e,n)):gn(t)?function(e,t){var n=_n(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):hr(function(e){var t,n=On(e),r=sr(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=yn(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=yn(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+lr(e),l=-r.scrollTop;return"rtl"===En(i||n).direction&&(s+=yn(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}(On(e)))}function pr(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?fn(i):null,a=i?qn(i):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Ln:t={x:s,y:n.y-r.height};break;case zn:t={x:s,y:n.y+n.height};break;case Fn:t={x:n.x+n.width,y:l};break;case Bn:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?Tn(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case Wn:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Vn:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function gr(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Yn:c,d=n.elementContext,h=void 0===d?Gn:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,b=Nn("number"!=typeof m?m:Dn(m,Hn)),y=h===Gn?"reference":Gn,v=e.rects.popper,x=e.elements[p?y:h],w=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=dr(Rn(e)),n=["absolute","fixed"].indexOf(En(e).position)>=0&&mn(e)?In(e):e;return gn(n)?t.filter((function(e){return gn(e)&&An(e,n)&&"body"!==Sn(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce((function(t,n){var i=fr(e,n,r);return t.top=yn(i.top,t.top),t.right=vn(i.right,t.right),t.bottom=vn(i.bottom,t.bottom),t.left=yn(i.left,t.left),t}),fr(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(gn(x)?x:x.contextElement||On(e.elements.popper),l,u,a),k=_n(e.elements.reference),_=pr({reference:k,element:v,strategy:"absolute",placement:i}),C=hr(Object.assign({},v,_)),A=h===Gn?C:k,S={top:w.top-A.top+b.top,bottom:A.bottom-w.bottom+b.bottom,left:w.left-A.left+b.left,right:A.right-w.right+b.right},E=e.modifiersData.offset;if(h===Gn&&E){var P=E[i];Object.keys(S).forEach((function(e){var t=[Fn,zn].indexOf(e)>=0?1:-1,n=[Ln,zn].indexOf(e)>=0?"y":"x";S[e]+=P[n]*t}))}return S}const mr={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=void 0===f||f,g=n.allowedAutoPlacements,m=t.options.placement,b=fn(m),y=l||(b!==m&&p?function(e){if(fn(e)===Un)return[];var t=ir(e);return[ar(e),t,ar(t)]}(m):[ir(m)]),v=[m].concat(y).reduce((function(e,n){return e.concat(fn(n)===Un?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Kn:l,u=qn(r),d=u?s?Jn:Jn.filter((function(e){return qn(e)===u})):Hn,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var f=h.reduce((function(t,n){return t[n]=gr(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[fn(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),x=t.rects.reference,w=t.rects.popper,k=new Map,_=!0,C=v[0],A=0;A=0,R=O?"width":"height",j=gr(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),I=O?P?Fn:Bn:P?zn:Ln;x[R]>w[R]&&(I=ir(I));var T=ir(I),M=[];if(o&&M.push(j[E]<=0),s&&M.push(j[I]<=0,j[T]<=0),M.every((function(e){return e}))){C=S,_=!1;break}k.set(S,M)}if(_)for(var N=function(e){var t=v.find((function(t){var n=k.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},D=p?3:1;D>0&&"break"!==N(D);D--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function br(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function yr(e){return[Ln,Fn,zn,Bn].some((function(t){return e[t]>=0}))}const vr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=Kn.reduce((function(e,n){return e[n]=function(e,t,n){var r=fn(e),i=[Bn,Ln].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Bn,Fn].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},xr={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,p=n.tetherOffset,g=void 0===p?0:p,m=gr(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=fn(t.placement),y=qn(t.placement),v=!y,x=Tn(b),w="x"===x?"y":"x",k=t.modifiersData.popperOffsets,_=t.rects.reference,C=t.rects.popper,A="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,S="number"==typeof A?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(k){if(o){var O,R="y"===x?Ln:Bn,j="y"===x?zn:Fn,I="y"===x?"height":"width",T=k[x],M=T+m[R],N=T-m[j],D=f?-C[I]/2:0,L=y===Wn?_[I]:C[I],z=y===Wn?-C[I]:-_[I],F=t.elements.arrow,B=f&&F?Cn(F):{width:0,height:0},U=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=U[R],W=U[j],V=Mn(0,_[I],B[I]),Y=v?_[I]/2-D-V-H-S.mainAxis:L-V-H-S.mainAxis,G=v?-_[I]/2+D+V+W+S.mainAxis:z+V+W+S.mainAxis,J=t.elements.arrow&&In(t.elements.arrow),K=J?"y"===x?J.clientTop||0:J.clientLeft||0:0,$=null!=(O=null==E?void 0:E[x])?O:0,Z=T+G-$,q=Mn(f?vn(M,T+Y-$-K):M,T,f?yn(N,Z):N);k[x]=q,P[x]=q-T}if(s){var X,Q="x"===x?Ln:Bn,ee="x"===x?zn:Fn,te=k[w],ne="y"===w?"height":"width",re=te+m[Q],ie=te-m[ee],oe=-1!==[Ln,Bn].indexOf(b),ae=null!=(X=null==E?void 0:E[w])?X:0,se=oe?re:te-_[ne]-C[ne]-ae+S.altAxis,le=oe?te+_[ne]+C[ne]-ae-S.altAxis:ie,ce=f&&oe?function(e,t,n){var r=Mn(e,t,n);return r>n?n:r}(se,te,le):Mn(f?se:re,te,f?le:ie);k[w]=ce,P[w]=ce-te}t.modifiersData[r]=P}},requiresIfExists:["offset"]};function wr(e,t,n){void 0===n&&(n=!1);var r,i,o=mn(t),a=mn(t)&&function(e){var t=e.getBoundingClientRect(),n=xn(t.width)/e.offsetWidth||1,r=xn(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=On(t),l=_n(e,a,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==Sn(t)||cr(s))&&(c=(r=t)!==pn(r)&&mn(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:sr(r)),mn(t)?((u=_n(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=lr(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function kr(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var _r={placement:"bottom",modifiers:[],strategy:"absolute"};function Cr(){for(var e=arguments.length,t=new Array(e),n=0;n{}},Pr={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const e=(t.getAttribute("aria-describedby")||"").split(",").filter((e=>e.trim()!==n.id));e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,i=null==(t=n.getAttribute("role"))?void 0:t.toLowerCase();if(n.id&&"tooltip"===i&&"setAttribute"in r){const e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(n.id))return;r.setAttribute("aria-describedby",e?`${e},${n.id}`:n.id)}}},Or=[],Rr=function(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:a="absolute",modifiers:s=Or}=n,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(n,Sr);const c=(0,o.useRef)(s),u=(0,o.useRef)(),d=(0,o.useCallback)((()=>{var e;null==(e=u.current)||e.update()}),[]),h=(0,o.useCallback)((()=>{var e;null==(e=u.current)||e.forceUpdate()}),[]),[f,p]=function(e){const t=Te();return[e[0],(0,o.useCallback)((n=>{if(t())return e[1](n)}),[t,e[1]])]}((0,o.useState)({placement:i,update:d,forceUpdate:h,attributes:{},styles:{popper:{},arrow:{}}})),g=(0,o.useMemo)((()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{const t={},n={};Object.keys(e.elements).forEach((r=>{t[r]=e.styles[r],n[r]=e.attributes[r]})),p({state:e,styles:t,attributes:n,update:d,forceUpdate:h,placement:e.placement})}})),[d,h,p]),m=(0,o.useMemo)((()=>(hn(c.current,s)||(c.current=s),c.current)),[s]);return(0,o.useEffect)((()=>{u.current&&r&&u.current.setOptions({placement:i,strategy:a,modifiers:[...m,g,Er]})}),[a,i,g,r,m]),(0,o.useEffect)((()=>{if(r&&null!=e&&null!=t)return u.current=Ar(e,t,Object.assign({},l,{placement:i,strategy:a,modifiers:[...m,Pr,g]})),()=>{null!=u.current&&(u.current.destroy(),u.current=void 0,p((e=>Object.assign({},e,{attributes:{},styles:{popper:{}}}))))}}),[r,e,t]),f};function jr(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var Ir=n(9771),Tr=n.n(Ir);const Mr=()=>{},Nr=e=>e&&("current"in e?e.current:e),Dr={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},Lr=function(e,t=Mr,{disabled:n,clickTrigger:r="click"}={}){const i=(0,o.useRef)(!1),a=(0,o.useRef)(!1),s=(0,o.useCallback)((t=>{const n=Nr(e);var r;Tr()(!!n,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!n||!!((r=t).metaKey||r.altKey||r.ctrlKey||r.shiftKey)||!function(e){return 0===e.button}(t)||!!jr(n,t.target)||a.current,a.current=!1}),[e]),l=Ee((t=>{const n=Nr(e);n&&jr(n,t.target)&&(a.current=!0)})),c=Ee((e=>{i.current||t(e)}));(0,o.useEffect)((()=>{var t,i;if(n||null==e)return;const o=A(Nr(e)),a=o.defaultView||window;let u=null!=(t=a.event)?t:null==(i=a.parent)?void 0:i.event,d=null;Dr[r]&&(d=K(o,Dr[r],l,!0));const h=K(o,r,s,!0),f=K(o,r,(e=>{e!==u?c(e):u=void 0}));let p=[];return"ontouchstart"in o.documentElement&&(p=[].slice.call(o.body.children).map((e=>K(e,"mousemove",Mr)))),()=>{null==d||d(),h(),f(),p.forEach((e=>e()))}}),[e,n,r,s,l,c])};function zr(e={}){return Array.isArray(e)?e:Object.keys(e).map((t=>(e[t].name=t,e[t])))}function Fr({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:o,containerPadding:a,arrowElement:s,popperConfig:l={}}){var c,u,d,h,f;const p=function(e){const t={};return Array.isArray(e)?(null==e||e.forEach((e=>{t[e.name]=e})),t):e||t}(l.modifiers);return Object.assign({},l,{placement:n,enabled:e,strategy:o?"fixed":l.strategy,modifiers:zr(Object.assign({},p,{eventListeners:{enabled:t,options:null==(c=p.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},p.preventOverflow,{options:a?Object.assign({padding:a},null==(u=p.preventOverflow)?void 0:u.options):null==(d=p.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:i},null==(h=p.offset)?void 0:h.options)},arrow:Object.assign({},p.arrow,{enabled:!!s,options:Object.assign({},null==(f=p.arrow)?void 0:f.options,{element:s})}),flip:Object.assign({enabled:!!r},p.flip)}))})}const Br=["children","usePopper"],Ur=()=>{};function Hr(e={}){const t=(0,o.useContext)(cn),[n,r]=Ie(),i=(0,o.useRef)(!1),{flip:a,offset:s,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:h=!0,usePopper:f=!!t}=e,p=null==(null==t?void 0:t.show)?!!e.show:t.show;p&&!i.current&&(i.current=!0);const{placement:g,setMenu:m,menuElement:b,toggleElement:y}=t||{},v=Rr(y,b,Fr({placement:u||g||"bottom-start",enabled:f,enableEvents:null==h?p:h,offset:s,flip:a,fixed:c,arrowElement:n,popperConfig:d})),x=Object.assign({ref:m||Ur,"aria-labelledby":null==y?void 0:y.id},v.attributes.popper,{style:v.styles.popper}),w={show:p,placement:g,hasShown:i.current,toggle:null==t?void 0:t.toggle,popper:f?v:null,arrowProps:f?Object.assign({ref:r},v.attributes.arrow,{style:v.styles.arrow}):{}};return Lr(b,(e=>{null==t||t.toggle(!1,e)}),{clickTrigger:l,disabled:!p}),[x,w]}function Wr(e){let{children:t,usePopper:n=!0}=e,r=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,Br);const[i,o]=Hr(Object.assign({},r,{usePopper:n}));return(0,p.jsx)(p.Fragment,{children:t(i,o)})}Wr.displayName="DropdownMenu";const Vr=Wr,Yr={prefix:String(Math.round(1e10*Math.random())),current:0},Gr=o.createContext(Yr),Jr=o.createContext(!1);function Kr(e){let t=(0,o.useContext)(Gr),n=Xr(t===Yr),[r,i]=(0,o.useState)(!0),a=(0,o.useMemo)((()=>({prefix:t===Yr?"":`${t.prefix}-${n}`,current:0})),[t,n]);return"undefined"!=typeof document&&(0,o.useLayoutEffect)((()=>{i(!1)}),[]),o.createElement(Gr.Provider,{value:a},o.createElement(Jr.Provider,{value:r},e.children))}let $r=!1,Zr=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),qr=new WeakMap;function Xr(e=!1){let t=(0,o.useContext)(Gr),n=(0,o.useRef)(null);if(null===n.current&&!e){var r,i;let e=null===(i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||void 0===i||null===(r=i.ReactCurrentOwner)||void 0===r?void 0:r.current;if(e){let n=qr.get(e);null==n?qr.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,qr.delete(e))}n.current=++t.current}return n.current}const Qr="function"==typeof o.useId?function(e){let t=o.useId(),[n]=(0,o.useState)("function"==typeof o.useSyncExternalStore?o.useSyncExternalStore(ni,ei,ti):(0,o.useContext)(Jr));return e||`${n?"react-aria":`react-aria${Yr.prefix}`}-${t}`}:function(e){let t=(0,o.useContext)(Gr);t!==Yr||Zr||console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=Xr(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function ei(){return!1}function ti(){return!0}function ni(e){return()=>{}}const ri=e=>{var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},ii=()=>{};function oi(){const e=Qr(),{show:t=!1,toggle:n=ii,setToggle:r,menuElement:i}=(0,o.useContext)(cn)||{},a=(0,o.useCallback)((e=>{n(!t,e)}),[t,n]),s={id:e,ref:r||ii,onClick:a,"aria-expanded":!!t};return i&&ri(i)&&(s["aria-haspopup"]=!0),[s,{show:t,toggle:n}]}function ai({children:e}){const[t,n]=oi();return(0,p.jsx)(p.Fragment,{children:e(t,n)})}ai.displayName="DropdownToggle";const si=ai,li=(e,t=null)=>null!=e?String(e):t||null,ci=o.createContext(null),ui=o.createContext(null);ui.displayName="NavContext";const di=ui,hi="data-rr-ui-";function fi(e){return`${hi}${e}`}const pi=["eventKey","disabled","onClick","active","as"];function gi({key:e,href:t,active:n,disabled:r,onClick:i}){const a=(0,o.useContext)(ci),s=(0,o.useContext)(di),{activeKey:l}=s||{},c=li(e,t),u=null==n&&null!=e?li(l)===c:n;return[{onClick:Ee((e=>{r||(null==i||i(e),a&&!e.isPropagationStopped()&&a(c,e))})),"aria-disabled":r||void 0,"aria-selected":u,[fi("dropdown-item")]:""},{isActive:u}]}const mi=o.forwardRef(((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:o,as:a=Be}=e,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,pi);const[l]=gi({key:n,href:s.href,disabled:r,onClick:i,active:o});return(0,p.jsx)(a,Object.assign({},s,{ref:t},l))}));mi.displayName="DropdownItem";const bi=mi,yi=(0,o.createContext)(H?window:void 0);function vi(){return(0,o.useContext)(yi)}function xi(){const e=ln(),t=(0,o.useRef)(null),n=(0,o.useCallback)((n=>{t.current=n,e()}),[e]);return[t,n]}function wi({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${fi("dropdown-item")}]`,focusFirstItemOnShow:a,placement:s="bottom-start",children:l}){const c=vi(),[u,d]=sn(t,e,r),[h,f]=xi(),g=h.current,[m,b]=xi(),y=m.current,v=Me(u),x=(0,o.useRef)(null),w=(0,o.useRef)(!1),k=(0,o.useContext)(ci),_=(0,o.useCallback)(((e,t,n=(null==t?void 0:t.type))=>{d(e,{originalEvent:t,source:n})}),[d]),C=Ee(((e,t)=>{null==n||n(e,t),_(!1,t,"select"),t.isPropagationStopped()||null==k||k(e,t)})),A=(0,o.useMemo)((()=>({toggle:_,placement:s,show:u,menuElement:g,toggleElement:y,setMenu:f,setToggle:b})),[_,s,u,g,y,f,b]);g&&v&&!u&&(w.current=g.contains(g.ownerDocument.activeElement));const S=Ee((()=>{y&&y.focus&&y.focus()})),E=Ee((()=>{const e=x.current;let t=a;if(null==t&&(t=!(!h.current||!ri(h.current))&&"keyboard"),!1===t||"keyboard"===t&&!/^key.+$/.test(e))return;const n=an(h.current,i)[0];n&&n.focus&&n.focus()}));(0,o.useEffect)((()=>{u?E():w.current&&(w.current=!1,S())}),[u,w,S,E]),(0,o.useEffect)((()=>{x.current=null}));const P=(e,t)=>{if(!h.current)return null;const n=an(h.current,i);let r=n.indexOf(e)+t;return r=Math.max(0,Math.min(r,n.length)),n[r]};return function(e,t,n,r=!1){const i=Ee(n);(0,o.useEffect)((()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,i,r),()=>n.removeEventListener(t,i,r)}),[e])}((0,o.useCallback)((()=>c.document),[c]),"keydown",(e=>{var t,n;const{key:r}=e,i=e.target,o=null==(t=h.current)?void 0:t.contains(i),a=null==(n=m.current)?void 0:n.contains(i);if(/input|textarea/i.test(i.tagName)&&(" "===r||"Escape"!==r&&o||"Escape"===r&&"search"===i.type))return;if(!o&&!a)return;if(!("Tab"!==r||h.current&&u))return;x.current=e.type;const s={originalEvent:e,source:e.type};switch(r){case"ArrowUp":{const t=P(i,-1);return t&&t.focus&&t.focus(),void e.preventDefault()}case"ArrowDown":if(e.preventDefault(),u){const e=P(i,1);e&&e.focus&&e.focus()}else d(!0,s);return;case"Tab":G(i.ownerDocument,"keyup",(e=>{var t;("Tab"!==e.key||e.target)&&null!=(t=h.current)&&t.contains(e.target)||d(!1,s)}),{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),d(!1,s)}})),(0,p.jsx)(ci.Provider,{value:C,children:(0,p.jsx)(cn.Provider,{value:A,children:l})})}yi.Provider,wi.displayName="Dropdown",wi.Menu=Vr,wi.Toggle=si,wi.Item=bi;const ki=wi,_i=o.createContext({});_i.displayName="DropdownContext";const Ci=_i,Ai=o.forwardRef((({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},a)=>(t=x(t,"dropdown-divider"),(0,p.jsx)(n,{ref:a,className:i()(e,t),role:r,...o}))));Ai.displayName="DropdownDivider";const Si=Ai,Ei=o.forwardRef((({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},a)=>(t=x(t,"dropdown-header"),(0,p.jsx)(n,{ref:a,className:i()(e,t),role:r,...o}))));Ei.displayName="DropdownHeader";const Pi=Ei,Oi=o.forwardRef((({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:a,as:s=We,...l},c)=>{const u=x(e,"dropdown-item"),[d,h]=gi({key:n,href:l.href,disabled:r,onClick:o,active:a});return(0,p.jsx)(s,{...l,...d,ref:c,className:i()(t,u,h.isActive&&"active",r&&"disabled")})}));Oi.displayName="DropdownItem";const Ri=Oi,ji=o.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=x(t,"dropdown-item-text"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));ji.displayName="DropdownItemText";const Ii=ji,Ti=o.createContext(null);Ti.displayName="InputGroupContext";const Mi=Ti,Ni=o.createContext(null);Ni.displayName="NavbarContext";const Di=Ni;function Li(e,t){return e}function zi(e,t,n){let r=e?n?"bottom-start":"bottom-end":n?"bottom-end":"bottom-start";return"up"===t?r=e?n?"top-start":"top-end":n?"top-end":"top-start":"end"===t?r=e?n?"left-end":"right-end":n?"left-start":"right-start":"start"===t?r=e?n?"right-end":"left-end":n?"right-start":"left-start":"down-centered"===t?r="bottom":"up-centered"===t&&(r="top"),r}const Fi=o.forwardRef((({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:a=!0,show:s,renderOnMount:l,as:c="div",popperConfig:u,variant:d,...h},f)=>{let g=!1;const m=(0,o.useContext)(Di),b=x(e,"dropdown-menu"),{align:y,drop:v,isRTL:w}=(0,o.useContext)(Ci);n=n||y;const k=(0,o.useContext)(Mi),_=[];if(n)if("object"==typeof n){const e=Object.keys(n);if(e.length){const t=e[0],r=n[t];g="start"===r,_.push(`${b}-${t}-${r}`)}}else"end"===n&&(g=!0);const C=zi(g,v,w),[A,{hasShown:S,popper:E,show:P,toggle:O}]=Hr({flip:a,rootCloseEvent:r,show:s,usePopper:!m&&0===_.length,offset:[0,2],popperConfig:u,placement:C});if(A.ref=te(Li(f),A.ref),De((()=>{P&&(null==E||E.update())}),[P]),!S&&!l&&!k)return null;"string"!=typeof c&&(A.show=P,A.close=()=>null==O?void 0:O(!1),A.align=n);let R=h.style;return null!=E&&E.placement&&(R={...h.style,...A.style},h["x-placement"]=E.placement),(0,p.jsx)(c,{...h,...A,style:R,...(_.length||m)&&{"data-bs-popper":"static"},className:i()(t,b,P&&"show",g&&`${b}-end`,d&&`${b}-${d}`,..._)})}));Fi.displayName="DropdownMenu";const Bi=Fi,Ui=o.forwardRef((({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:a=ut,...s},l)=>{const c=x(e,"dropdown-toggle"),u=(0,o.useContext)(cn);void 0!==r&&(s.bsPrefix=r);const[d]=oi();return d.ref=te(d.ref,Li(l)),(0,p.jsx)(a,{className:i()(n,c,t&&`${c}-split`,(null==u?void 0:u.show)&&"show"),...d,...s})}));Ui.displayName="DropdownToggle";const Hi=Ui,Wi=o.forwardRef(((e,t)=>{const{bsPrefix:n,drop:r="down",show:a,className:s,align:l="start",onSelect:c,onToggle:u,focusFirstItemOnShow:d,as:h="div",navbar:g,autoClose:m=!0,...b}=f(e,{show:"onToggle"}),y=(0,o.useContext)(Mi),v=x(n,"dropdown"),w=_(),k=Ee(((e,t)=>{var n,r;(null==(n=t.originalEvent)||null==(n=n.target)?void 0:n.classList.contains("dropdown-toggle"))&&"mousedown"===t.source||(t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),r=t.source,(!1===m?"click"===r:"inside"===m?"rootClose"!==r:"outside"!==m||"select"!==r)&&(null==u||u(e,t)))})),C=zi("end"===l,r,w),A=(0,o.useMemo)((()=>({align:l,drop:r,isRTL:w})),[l,r,w]),S={down:v,"down-centered":`${v}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return(0,p.jsx)(Ci.Provider,{value:A,children:(0,p.jsx)(ki,{placement:C,show:a,onSelect:c,onToggle:k,focusFirstItemOnShow:d,itemSelector:`.${v}-item:not(.disabled):not(:disabled)`,children:y?b.children:(0,p.jsx)(h,{...b,ref:t,className:i()(s,a&&"show",S[r])})})})}));Wi.displayName="Dropdown";const Vi=Object.assign(Wi,{Toggle:Hi,Menu:Bi,Item:Ri,ItemText:Ii,Divider:Si,Header:Pi}),Yi=Ze().oneOf(["start","end"]),Gi=Ze().oneOfType([Yi,Ze().shape({sm:Yi}),Ze().shape({md:Yi}),Ze().shape({lg:Yi}),Ze().shape({xl:Yi}),Ze().shape({xxl:Yi}),Ze().object]),Ji={id:Ze().string,href:Ze().string,onClick:Ze().func,title:Ze().node.isRequired,disabled:Ze().bool,align:Gi,menuRole:Ze().string,renderMenuOnMount:Ze().bool,rootCloseEvent:Ze().string,menuVariant:Ze().oneOf(["dark"]),flip:Ze().bool,bsPrefix:Ze().string,variant:Ze().string,size:Ze().string},Ki=o.forwardRef((({title:e,children:t,bsPrefix:n,rootCloseEvent:r,variant:i,size:o,menuRole:a,renderMenuOnMount:s,disabled:l,href:c,id:u,menuVariant:d,flip:h,...f},g)=>(0,p.jsxs)(Vi,{ref:g,...f,children:[(0,p.jsx)(Hi,{id:u,href:c,size:o,variant:i,disabled:l,childBsPrefix:n,children:e}),(0,p.jsx)(Bi,{role:a,renderOnMount:s,rootCloseEvent:r,variant:d,flip:h,children:t})]})));Ki.displayName="DropdownButton",Ki.propTypes=Ji;const $i=Ki,Zi={bsPrefix:Ze().string,fluid:Ze().bool,rounded:Ze().bool,roundedCircle:Ze().bool,thumbnail:Ze().bool},qi=o.forwardRef((({bsPrefix:e,className:t,fluid:n=!1,rounded:r=!1,roundedCircle:o=!1,thumbnail:a=!1,...s},l)=>(e=x(e,"img"),(0,p.jsx)("img",{ref:l,...s,className:i()(t,n&&`${e}-fluid`,r&&"rounded",o&&"rounded-circle",a&&`${e}-thumbnail`)}))));qi.displayName="Image";const Xi=qi,Qi=o.forwardRef((({className:e,fluid:t=!0,...n},r)=>(0,p.jsx)(Xi,{ref:r,...n,fluid:t,className:i()(e,"figure-img")})));Qi.displayName="FigureImage",Qi.propTypes=Zi;const eo=Qi,to=o.forwardRef((({className:e,bsPrefix:t,as:n="figcaption",...r},o)=>(t=x(t,"figure-caption"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));to.displayName="FigureCaption";const no=to,ro=o.forwardRef((({className:e,bsPrefix:t,as:n="figure",...r},o)=>(t=x(t,"figure"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));ro.displayName="Figure";const io=Object.assign(ro,{Image:eo,Caption:no}),oo={type:Ze().string,tooltip:Ze().bool,as:Ze().elementType},ao=o.forwardRef((({as:e="div",className:t,type:n="valid",tooltip:r=!1,...o},a)=>(0,p.jsx)(e,{...o,ref:a,className:i()(t,`${n}-${r?"tooltip":"feedback"}`)})));ao.displayName="Feedback",ao.propTypes=oo;const so=ao,lo=o.createContext({}),co=o.forwardRef((({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:a=!1,isInvalid:s=!1,as:l="input",...c},u)=>{const{controlId:d}=(0,o.useContext)(lo);return t=x(t,"form-check-input"),(0,p.jsx)(l,{...c,ref:u,type:r,id:e||d,className:i()(n,t,a&&"is-valid",s&&"is-invalid")})}));co.displayName="FormCheckInput";const uo=co,ho=o.forwardRef((({bsPrefix:e,className:t,htmlFor:n,...r},a)=>{const{controlId:s}=(0,o.useContext)(lo);return e=x(e,"form-check-label"),(0,p.jsx)("label",{...r,ref:a,htmlFor:n||s,className:i()(t,e)})}));ho.displayName="FormCheckLabel";const fo=ho,po=o.forwardRef((({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:r=!1,reverse:a=!1,disabled:s=!1,isValid:l=!1,isInvalid:c=!1,feedbackTooltip:u=!1,feedback:d,feedbackType:h,className:f,style:g,title:m="",type:b="checkbox",label:y,children:v,as:w="input",...k},_)=>{t=x(t,"form-check"),n=x(n,"form-switch");const{controlId:C}=(0,o.useContext)(lo),A=(0,o.useMemo)((()=>({controlId:e||C})),[C,e]),S=!v&&null!=y&&!1!==y||function(e,t){return o.Children.toArray(e).some((e=>o.isValidElement(e)&&e.type===t))}(v,fo),E=(0,p.jsx)(uo,{...k,type:"switch"===b?"checkbox":b,ref:_,isValid:l,isInvalid:c,disabled:s,as:w});return(0,p.jsx)(lo.Provider,{value:A,children:(0,p.jsx)("div",{style:g,className:i()(f,S&&t,r&&`${t}-inline`,a&&`${t}-reverse`,"switch"===b&&n),children:v||(0,p.jsxs)(p.Fragment,{children:[E,S&&(0,p.jsx)(fo,{title:m,children:y}),d&&(0,p.jsx)(so,{type:h,tooltip:u,children:d})]})})})}));po.displayName="FormCheck";const go=Object.assign(po,{Input:uo,Label:fo}),mo=o.forwardRef((({bsPrefix:e,type:t,size:n,htmlSize:r,id:a,className:s,isValid:l=!1,isInvalid:c=!1,plaintext:u,readOnly:d,as:h="input",...f},g)=>{const{controlId:m}=(0,o.useContext)(lo);return e=x(e,"form-control"),(0,p.jsx)(h,{...f,type:t,size:r,ref:g,readOnly:d,id:a||m,className:i()(s,u?`${e}-plaintext`:e,n&&`${e}-${n}`,"color"===t&&`${e}-color`,l&&"is-valid",c&&"is-invalid")})}));mo.displayName="FormControl";const bo=Object.assign(mo,{Feedback:so}),yo=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"form-floating"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));yo.displayName="FormFloating";const vo=yo,xo=o.forwardRef((({controlId:e,as:t="div",...n},r)=>{const i=(0,o.useMemo)((()=>({controlId:e})),[e]);return(0,p.jsx)(lo.Provider,{value:i,children:(0,p.jsx)(t,{...n,ref:r})})}));xo.displayName="FormGroup";const wo=xo,ko=o.forwardRef((({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:a,htmlFor:s,...l},c)=>{const{controlId:u}=(0,o.useContext)(lo);t=x(t,"form-label");let d="col-form-label";"string"==typeof n&&(d=`${d} ${d}-${n}`);const h=i()(a,t,r&&"visually-hidden",n&&d);return s=s||u,n?(0,p.jsx)(tn,{ref:c,as:"label",className:h,htmlFor:s,...l}):(0,p.jsx)(e,{ref:c,className:h,htmlFor:s,...l})}));ko.displayName="FormLabel";const _o=ko,Co=o.forwardRef((({bsPrefix:e,className:t,id:n,...r},a)=>{const{controlId:s}=(0,o.useContext)(lo);return e=x(e,"form-range"),(0,p.jsx)("input",{...r,type:"range",ref:a,className:i()(t,e),id:n||s})}));Co.displayName="FormRange";const Ao=Co,So=o.forwardRef((({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:a=!1,isInvalid:s=!1,id:l,...c},u)=>{const{controlId:d}=(0,o.useContext)(lo);return e=x(e,"form-select"),(0,p.jsx)("select",{...c,size:n,ref:u,className:i()(r,e,t&&`${e}-${t}`,a&&"is-valid",s&&"is-invalid"),id:l||d})}));So.displayName="FormSelect";const Eo=So,Po=o.forwardRef((({bsPrefix:e,className:t,as:n="small",muted:r,...o},a)=>(e=x(e,"form-text"),(0,p.jsx)(n,{...o,ref:a,className:i()(t,e,r&&"text-muted")}))));Po.displayName="FormText";const Oo=Po,Ro=o.forwardRef(((e,t)=>(0,p.jsx)(go,{...e,ref:t,type:"switch"})));Ro.displayName="Switch";const jo=Object.assign(Ro,{Input:go.Input,Label:go.Label}),Io=o.forwardRef((({bsPrefix:e,className:t,children:n,controlId:r,label:o,...a},s)=>(e=x(e,"form-floating"),(0,p.jsxs)(wo,{ref:s,className:i()(t,e),controlId:r,...a,children:[n,(0,p.jsx)("label",{htmlFor:r,children:o})]}))));Io.displayName="FloatingLabel";const To=Io,Mo={_ref:Ze().any,validated:Ze().bool,as:Ze().elementType},No=o.forwardRef((({className:e,validated:t,as:n="form",...r},o)=>(0,p.jsx)(n,{...r,ref:o,className:i()(e,t&&"was-validated")})));No.displayName="Form",No.propTypes=Mo;const Do=Object.assign(No,{Group:wo,Control:bo,Floating:vo,Check:go,Switch:jo,Label:_o,Text:Oo,Range:Ao,Select:Eo,FloatingLabel:To}),Lo=o.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=x(t,"input-group-text"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Lo.displayName="InputGroupText";const zo=Lo,Fo=o.forwardRef((({bsPrefix:e,size:t,hasValidation:n,className:r,as:a="div",...s},l)=>{e=x(e,"input-group");const c=(0,o.useMemo)((()=>({})),[]);return(0,p.jsx)(Mi.Provider,{value:c,children:(0,p.jsx)(a,{ref:l,...s,className:i()(r,e,t&&`${e}-${t}`,n&&"has-validation")})})}));Fo.displayName="InputGroup";const Bo=Object.assign(Fo,{Text:zo,Radio:e=>(0,p.jsx)(zo,{children:(0,p.jsx)(uo,{type:"radio",...e})}),Checkbox:e=>(0,p.jsx)(zo,{children:(0,p.jsx)(uo,{type:"checkbox",...e})})}),Uo=o.createContext(null),Ho=["as","active","eventKey"];function Wo({key:e,onClick:t,active:n,id:r,role:i,disabled:a}){const s=(0,o.useContext)(ci),l=(0,o.useContext)(di),c=(0,o.useContext)(Uo);let u=n;const d={role:i};if(l){i||"tablist"!==l.role||(d.role="tab");const t=l.getControllerId(null!=e?e:null),o=l.getControlledId(null!=e?e:null);d[fi("event-key")]=e,d.id=t||r,u=null==n&&null!=e?l.activeKey===e:n,!u&&(null!=c&&c.unmountOnExit||null!=c&&c.mountOnEnter)||(d["aria-controls"]=o)}return"tab"===d.role&&(d["aria-selected"]=u,u||(d.tabIndex=-1),a&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=Ee((n=>{a||(null==t||t(n),null!=e&&s&&!n.isPropagationStopped()&&s(e,n))})),[d,{isActive:u}]}const Vo=o.forwardRef(((e,t)=>{let{as:n=Be,active:r,eventKey:i}=e,o=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,Ho);const[a,s]=Wo(Object.assign({key:li(i,o.href),active:r},o));return a[fi("active")]=s.isActive,(0,p.jsx)(n,Object.assign({},o,a,{ref:t}))}));Vo.displayName="NavItem";const Yo=Vo,Go=["as","onSelect","activeKey","role","onKeyDown"],Jo=()=>{},Ko=fi("event-key"),$o=o.forwardRef(((e,t)=>{let{as:n="div",onSelect:r,activeKey:i,role:a,onKeyDown:s}=e,l=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,Go);const c=ln(),u=(0,o.useRef)(!1),d=(0,o.useContext)(ci),h=(0,o.useContext)(Uo);let f,g;h&&(a=a||"tablist",i=h.activeKey,f=h.getControlledId,g=h.getControllerId);const m=(0,o.useRef)(null),b=e=>{const t=m.current;if(!t)return null;const n=an(t,`[${Ko}]:not([aria-disabled=true])`),r=t.querySelector("[aria-selected=true]");if(!r||r!==document.activeElement)return null;const i=n.indexOf(r);if(-1===i)return null;let o=i+e;return o>=n.length&&(o=0),o<0&&(o=n.length-1),n[o]},y=(e,t)=>{null!=e&&(null==r||r(e,t),null==d||d(e,t))};(0,o.useEffect)((()=>{if(m.current&&u.current){const e=m.current.querySelector(`[${Ko}][aria-selected=true]`);null==e||e.focus()}u.current=!1}));const v=te(t,m);return(0,p.jsx)(ci.Provider,{value:y,children:(0,p.jsx)(di.Provider,{value:{role:a,activeKey:li(i),getControlledId:f||Jo,getControllerId:g||Jo},children:(0,p.jsx)(n,Object.assign({},l,{onKeyDown:e=>{if(null==s||s(e),!h)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=b(-1);break;case"ArrowRight":case"ArrowDown":t=b(1);break;default:return}t&&(e.preventDefault(),y(t.dataset[("EventKey","rrUiEventKey")]||null,e),u.current=!0,c())},ref:v,role:a}))})})}));$o.displayName="Nav";const Zo=Object.assign($o,{Item:Yo}),qo=o.forwardRef((({bsPrefix:e,active:t,disabled:n,eventKey:r,className:o,variant:a,action:s,as:l,...c},u)=>{e=x(e,"list-group-item");const[d,h]=Wo({key:li(r,c.href),active:t,...c}),f=Ee((e=>{if(n)return e.preventDefault(),void e.stopPropagation();d.onClick(e)}));n&&void 0===c.tabIndex&&(c.tabIndex=-1,c["aria-disabled"]=!0);const g=l||(s?c.href?"a":"button":"div");return(0,p.jsx)(g,{ref:u,...c,...d,onClick:f,className:i()(o,e,h.isActive&&"active",n&&"disabled",a&&`${e}-${a}`,s&&`${e}-action`)})}));qo.displayName="ListGroupItem";const Xo=qo,Qo=o.forwardRef(((e,t)=>{const{className:n,bsPrefix:r,variant:o,horizontal:a,numbered:s,as:l="div",...c}=f(e,{activeKey:"onSelect"}),u=x(r,"list-group");let d;return a&&(d=!0===a?"horizontal":`horizontal-${a}`),(0,p.jsx)(Zo,{ref:t,...c,as:l,className:i()(n,u,o&&`${u}-${o}`,d&&`${u}-${d}`,s&&`${u}-numbered`)})}));Qo.displayName="ListGroup";const ea=Object.assign(Qo,{Item:Xo});var ta;function na(e){if((!ta&&0!==ta||e)&&H){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),ta=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ta}function ra(e){void 0===e&&(e=A());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}const ia=fi("modal-open"),oa=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(R(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(ia,""),R(r,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(ia),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state))),t}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}},aa=(e,t)=>H?null==e?(t||A()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function sa(e,t){const n=vi(),[r,i]=(0,o.useState)((()=>aa(e,null==n?void 0:n.document)));if(!r){const t=aa(e);t&&i(t)}return(0,o.useEffect)((()=>{t&&r&&t(r)}),[t,r]),(0,o.useEffect)((()=>{const t=aa(e);t!==r&&i(t)}),[e,r]),r}const la=function({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){const a=(0,o.useRef)(null),s=(0,o.useRef)(t),l=Ee(n);(0,o.useEffect)((()=>{t?s.current=!0:l(a.current)}),[t,l]);const c=te(a,e.ref),u=(0,o.cloneElement)(e,{ref:c});return t?u:i||!s.current&&r?null:u};function ca(e){return"Escape"===e.code||27===e.keyCode}const ua=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];const da=["component"],ha=o.forwardRef(((e,t)=>{let{component:n}=e;const r=function(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:a,onExited:s,addEndListener:l,children:c}=e,u=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,ua);const{major:d}=function(){const e=o.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}(),h=d>=19?c.props.ref:c.ref,f=(0,o.useRef)(null),p=te(f,"function"==typeof c?null:h),g=e=>t=>{e&&f.current&&e(f.current,t)},m=(0,o.useCallback)(g(t),[t]),b=(0,o.useCallback)(g(n),[n]),y=(0,o.useCallback)(g(r),[r]),v=(0,o.useCallback)(g(i),[i]),x=(0,o.useCallback)(g(a),[a]),w=(0,o.useCallback)(g(s),[s]),k=(0,o.useCallback)(g(l),[l]);return Object.assign({},u,{nodeRef:f},t&&{onEnter:m},n&&{onEntering:b},r&&{onEntered:y},i&&{onExit:v},a&&{onExiting:x},s&&{onExited:w},l&&{addEndListener:k},{children:"function"==typeof c?(e,t)=>c(e,Object.assign({},t,{ref:p})):(0,o.cloneElement)(c,{ref:p})})}(function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,da));return(0,p.jsx)(n,Object.assign({ref:t},r))}));function fa({children:e,in:t,onExited:n,onEntered:r,transition:i}){const[a,s]=(0,o.useState)(!t);t&&a&&s(!1);const l=function({in:e,onTransition:t}){const n=(0,o.useRef)(null),r=(0,o.useRef)(!0),i=Ee(t);return De((()=>{if(!n.current)return;let t=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}}),[e,i]),De((()=>(r.current=!1,()=>{r.current=!0})),[]),n}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then((()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(s(!0),null==n||n(e.element)))}),(t=>{throw e.in||s(!0),t}))}}),c=te(l,e.ref);return a&&!t?null:(0,o.cloneElement)(e,{ref:c})}function pa(e,t,n){return e?(0,p.jsx)(ha,Object.assign({},n,{component:e})):t?(0,p.jsx)(fa,Object.assign({},n,{transition:t})):(0,p.jsx)(la,Object.assign({},n))}const ga=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let ma;const ba=(0,o.forwardRef)(((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:a,children:s,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:h,runTransition:f,backdropTransition:g,runBackdropTransition:m,autoFocus:b=!0,enforceFocus:y=!0,restoreFocus:v=!0,restoreFocusOptions:x,renderDialog:w,renderBackdrop:k=(e=>(0,p.jsx)("div",Object.assign({},e))),manager:_,container:C,onShow:A,onHide:S=(()=>{}),onExit:E,onExited:P,onExiting:O,onEnter:R,onEntering:j,onEntered:T}=e,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,ga);const N=vi(),D=sa(C),L=function(e){const t=vi(),n=e||function(e){return ma||(ma=new oa({ownerDocument:null==e?void 0:e.document})),ma}(t),r=(0,o.useRef)({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:(0,o.useCallback)((e=>{r.current.dialog=e}),[]),setBackdropRef:(0,o.useCallback)((e=>{r.current.backdrop=e}),[])})}(_),z=Te(),F=Me(n),[B,U]=(0,o.useState)(!n),W=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(()=>L),[L]),H&&!F&&n&&(W.current=ra(null==N?void 0:N.document)),n&&B&&U(!1);const V=Ee((()=>{if(L.add(),q.current=K(document,"keydown",$),Z.current=K(document,"focus",(()=>setTimeout(G)),!0),A&&A(),b){var e,t;const n=ra(null!=(e=null==(t=L.dialog)?void 0:t.ownerDocument)?e:null==N?void 0:N.document);L.dialog&&n&&!jr(L.dialog,n)&&(W.current=n,L.dialog.focus())}})),Y=Ee((()=>{var e;L.remove(),null==q.current||q.current(),null==Z.current||Z.current(),v&&(null==(e=W.current)||null==e.focus||e.focus(x),W.current=null)}));(0,o.useEffect)((()=>{n&&D&&V()}),[n,D,V]),(0,o.useEffect)((()=>{B&&Y()}),[B,Y]),Ut((()=>{Y()}));const G=Ee((()=>{if(!y||!z()||!L.isTopModal())return;const e=ra(null==N?void 0:N.document);L.dialog&&e&&!jr(L.dialog,e)&&L.dialog.focus()})),J=Ee((e=>{e.target===e.currentTarget&&(null==u||u(e),!0===l&&S())})),$=Ee((e=>{c&&ca(e)&&L.isTopModal()&&(null==d||d(e),e.defaultPrevented||S())})),Z=(0,o.useRef)(),q=(0,o.useRef)();if(!D)return null;const X=Object.assign({role:r,ref:L.setDialogRef,"aria-modal":"dialog"===r||void 0},M,{style:a,className:i,tabIndex:-1});let Q=w?w(X):(0,p.jsx)("div",Object.assign({},X,{children:o.cloneElement(s,{role:"document"})}));Q=pa(h,f,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:E,onExiting:O,onExited:(...e)=>{U(!0),null==P||P(...e)},onEnter:R,onEntering:j,onEntered:T,children:Q});let ee=null;return l&&(ee=k({ref:L.setBackdropRef,onClick:J}),ee=pa(g,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ee})),(0,p.jsx)(p.Fragment,{children:I.createPortal((0,p.jsxs)(p.Fragment,{children:[ee,Q]}),D)})}));ba.displayName="Modal";const ya=Object.assign(ba,{Manager:oa});function va(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}function xa(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const wa=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ka=".sticky-top",_a=".navbar-toggler";class Ca extends oa{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,R(t,{[e]:`${parseFloat(R(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],R(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();var n,r;if(r="modal-open",(n=t).classList?n.classList.add(r):va(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)),!e.scrollBarWidth)return;const i=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";an(t,wa).forEach((t=>this.adjustAndStore(i,t,e.scrollBarWidth))),an(t,ka).forEach((t=>this.adjustAndStore(o,t,-e.scrollBarWidth))),an(t,_a).forEach((t=>this.adjustAndStore(o,t,e.scrollBarWidth)))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();var n,r;r="modal-open",(n=t).classList?n.classList.remove(r):"string"==typeof n.className?n.className=xa(n.className,r):n.setAttribute("class",xa(n.className&&n.className.baseVal||"",r));const i=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";an(t,wa).forEach((e=>this.restore(i,e))),an(t,ka).forEach((e=>this.restore(o,e))),an(t,_a).forEach((e=>this.restore(o,e)))}}let Aa;function Sa(e){return Aa||(Aa=new Ca(e)),Aa}const Ea=Ca,Pa=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"modal-body"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Pa.displayName="ModalBody";const Oa=Pa,Ra=o.createContext({onHide(){}}),ja=o.forwardRef((({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:a,children:s,scrollable:l,...c},u)=>{const d=`${e=x(e,"modal")}-dialog`,h="string"==typeof a?`${e}-fullscreen-${a}`:`${e}-fullscreen`;return(0,p.jsx)("div",{...c,ref:u,className:i()(d,t,o&&`${e}-${o}`,r&&`${d}-centered`,l&&`${d}-scrollable`,a&&h),children:(0,p.jsx)("div",{className:i()(`${e}-content`,n),children:s})})}));ja.displayName="ModalDialog";const Ia=ja,Ta=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"modal-footer"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ta.displayName="ModalFooter";const Ma=Ta,Na=o.forwardRef((({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:i,...a},s)=>{const l=(0,o.useContext)(Ra),c=Ee((()=>{null==l||l.onHide(),null==r||r()}));return(0,p.jsxs)("div",{ref:s,...a,children:[i,n&&(0,p.jsx)(Qe,{"aria-label":e,variant:t,onClick:c})]})})),Da=Na,La=o.forwardRef((({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},a)=>(e=x(e,"modal-header"),(0,p.jsx)(Da,{ref:a,...o,className:i()(t,e),closeLabel:n,closeButton:r}))));La.displayName="ModalHeader";const za=La,Fa=Pe("h4"),Ba=o.forwardRef((({className:e,bsPrefix:t,as:n=Fa,...r},o)=>(t=x(t,"modal-title"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ba.displayName="ModalTitle";const Ua=Ba;function Ha(e){return(0,p.jsx)(Ke,{...e,timeout:null})}function Wa(e){return(0,p.jsx)(Ke,{...e,timeout:null})}const Va=o.forwardRef((({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:a,children:s,dialogAs:l=Ia,"data-bs-theme":c,"aria-labelledby":u,"aria-describedby":d,"aria-label":h,show:f=!1,animation:g=!0,backdrop:m=!0,keyboard:b=!0,onEscapeKeyDown:y,onShow:v,onHide:w,container:k,autoFocus:C=!0,enforceFocus:S=!0,restoreFocus:E=!0,restoreFocusOptions:P,onEntered:O,onExit:R,onExiting:j,onEnter:I,onEntering:T,onExited:M,backdropClassName:N,manager:D,...L},z)=>{const[F,B]=(0,o.useState)({}),[U,W]=(0,o.useState)(!1),V=(0,o.useRef)(!1),Y=(0,o.useRef)(!1),K=(0,o.useRef)(null),[Z,q]=Ie(),X=te(z,q),Q=Ee(w),ee=_();e=x(e,"modal");const ne=(0,o.useMemo)((()=>({onHide:Q})),[Q]);function re(){return D||Sa({isRTL:ee})}function ie(e){if(!H)return;const t=re().getScrollbarWidth()>0,n=e.scrollHeight>A(e).documentElement.clientHeight;B({paddingRight:t&&!n?na():void 0,paddingLeft:!t&&n?na():void 0})}const oe=Ee((()=>{Z&&ie(Z.dialog)}));Ut((()=>{J(window,"resize",oe),null==K.current||K.current()}));const ae=()=>{V.current=!0},se=e=>{V.current&&Z&&e.target===Z.dialog&&(Y.current=!0),V.current=!1},le=()=>{W(!0),K.current=$(Z.dialog,(()=>{W(!1)}))},ce=e=>{"static"!==m?Y.current||e.target!==e.currentTarget?Y.current=!1:null==w||w():(e=>{e.target===e.currentTarget&&le()})(e)},ue=(0,o.useCallback)((t=>(0,p.jsx)("div",{...t,className:i()(`${e}-backdrop`,N,!g&&"show")})),[g,N,e]),de={...n,...F};return de.display="block",(0,p.jsx)(Ra.Provider,{value:ne,children:(0,p.jsx)(ya,{show:f,ref:X,backdrop:m,container:k,keyboard:!0,autoFocus:C,enforceFocus:S,restoreFocus:E,restoreFocusOptions:P,onEscapeKeyDown:e=>{b?null==y||y(e):(e.preventDefault(),"static"===m&&le())},onShow:v,onHide:w,onEnter:(e,t)=>{e&&ie(e),null==I||I(e,t)},onEntering:(e,t)=>{null==T||T(e,t),G(window,"resize",oe)},onEntered:O,onExit:e=>{null==K.current||K.current(),null==R||R(e)},onExiting:j,onExited:e=>{e&&(e.style.display=""),null==M||M(e),J(window,"resize",oe)},manager:re(),transition:g?Ha:void 0,backdropTransition:g?Wa:void 0,renderBackdrop:ue,renderDialog:n=>(0,p.jsx)("div",{role:"dialog",...n,style:de,className:i()(t,e,U&&`${e}-static`,!g&&"show"),onClick:m?ce:void 0,onMouseUp:se,"data-bs-theme":c,"aria-label":h,"aria-labelledby":u,"aria-describedby":d,children:(0,p.jsx)(l,{...L,onMouseDown:ae,className:r,contentClassName:a,children:s})})})})}));Va.displayName="Modal";const Ya=Object.assign(Va,{Body:Oa,Header:za,Title:Ua,Footer:Ma,Dialog:Ia,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});n(2816);const Ga=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"nav-item"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ga.displayName="NavItem";const Ja=Ga,Ka=o.forwardRef((({bsPrefix:e,className:t,as:n=We,active:r,eventKey:o,disabled:a=!1,...s},l)=>{e=x(e,"nav-link");const[c,u]=Wo({key:li(o,s.href),active:r,disabled:a,...s});return(0,p.jsx)(n,{...s,...c,ref:l,disabled:a,className:i()(t,e,a&&"disabled",u.isActive&&"active")})}));Ka.displayName="NavLink";const $a=Ka,Za=o.forwardRef(((e,t)=>{const{as:n="div",bsPrefix:r,variant:a,fill:s=!1,justify:l=!1,navbar:c,navbarScroll:u,className:d,activeKey:h,...g}=f(e,{activeKey:"onSelect"}),m=x(r,"nav");let b,y,v=!1;const w=(0,o.useContext)(Di),k=(0,o.useContext)(xt);return w?(b=w.bsPrefix,v=null==c||c):k&&({cardHeaderBsPrefix:y}=k),(0,p.jsx)(Zo,{as:n,ref:t,activeKey:h,className:i()(d,{[m]:!v,[`${b}-nav`]:v,[`${b}-nav-scroll`]:v&&u,[`${y}-${a}`]:!!y,[`${m}-${a}`]:!!a,[`${m}-fill`]:s,[`${m}-justified`]:l}),...g})}));Za.displayName="Nav";const qa=Object.assign(Za,{Item:Ja,Link:$a}),Xa=o.forwardRef((({bsPrefix:e,className:t,as:n,...r},o)=>{e=x(e,"navbar-brand");const a=n||(r.href?"a":"span");return(0,p.jsx)(a,{...r,ref:o,className:i()(t,e)})}));Xa.displayName="NavbarBrand";const Qa=Xa,es=o.forwardRef((({children:e,bsPrefix:t,...n},r)=>{t=x(t,"navbar-collapse");const i=(0,o.useContext)(Di);return(0,p.jsx)(se,{in:!(!i||!i.expanded),...n,children:(0,p.jsx)("div",{ref:r,className:t,children:e})})}));es.displayName="NavbarCollapse";const ts=es,ns=o.forwardRef((({bsPrefix:e,className:t,children:n,label:r="Toggle navigation",as:a="button",onClick:s,...l},c)=>{e=x(e,"navbar-toggler");const{onToggle:u,expanded:d}=(0,o.useContext)(Di)||{},h=Ee((e=>{s&&s(e),u&&u()}));return"button"===a&&(l.type="button"),(0,p.jsx)(a,{...l,ref:c,onClick:h,"aria-label":r,className:i()(t,e,!d&&"collapsed"),children:n||(0,p.jsx)("span",{className:`${e}-icon`})})}));ns.displayName="NavbarToggle";const rs=ns,is=new WeakMap,os=(e,t)=>{if(!e||!t)return;const n=is.get(t)||new Map;is.set(t,n);let r=n.get(e);return r||(r=t.matchMedia(e),r.refCount=0,n.set(r.media,r)),r};function as(e,t=("undefined"==typeof window?void 0:window)){const n=os(e,t),[r,i]=(0,o.useState)((()=>!!n&&n.matches));return De((()=>{let n=os(e,t);if(!n)return i(!1);let r=is.get(t);const o=()=>{i(n.matches)};return n.refCount++,n.addListener(o),o(),()=>{n.removeListener(o),n.refCount--,n.refCount<=0&&(null==r||r.delete(n.media)),n=void 0}}),[e]),r}const ss=function(e){const t=Object.keys(e);function n(e,t){return e===t?t:e?`${e} and ${t}`:t}return function(r,i,a){let s;return"object"==typeof r?(s=r,a=i,i=!0):(i=i||!0,s={[r]:i}),as((0,o.useMemo)((()=>Object.entries(s).reduce(((r,[i,o])=>("up"!==o&&!0!==o||(r=n(r,function(t){let n=e[t];return"number"==typeof n&&(n=`${n}px`),`(min-width: ${n})`}(i))),"down"!==o&&!0!==o||(r=n(r,function(n){const r=function(e){return t[Math.min(t.indexOf(e)+1,t.length-1)]}(n);let i=e[r];return i="number"==typeof i?i-.2+"px":`calc(${i} - 0.2px)`,`(max-width: ${i})`}(i))),r)),"")),[JSON.stringify(s)]),a)}}({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400}),ls=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"offcanvas-body"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));ls.displayName="OffcanvasBody";const cs=ls,us={[D]:"show",[L]:"show"},ds=o.forwardRef((({bsPrefix:e,className:t,children:n,in:r=!1,mountOnEnter:a=!1,unmountOnExit:s=!1,appear:l=!1,...c},u)=>(e=x(e,"offcanvas"),(0,p.jsx)(re,{ref:u,addEndListener:q,in:r,mountOnEnter:a,unmountOnExit:s,appear:l,...c,childRef:n.ref,children:(r,a)=>o.cloneElement(n,{...a,className:i()(t,n.props.className,(r===D||r===z)&&`${e}-toggling`,us[r])})}))));ds.displayName="OffcanvasToggling";const hs=ds,fs=o.forwardRef((({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},a)=>(e=x(e,"offcanvas-header"),(0,p.jsx)(Da,{ref:a,...o,className:i()(t,e),closeLabel:n,closeButton:r}))));fs.displayName="OffcanvasHeader";const ps=fs,gs=Pe("h5"),ms=o.forwardRef((({className:e,bsPrefix:t,as:n=gs,...r},o)=>(t=x(t,"offcanvas-title"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));ms.displayName="OffcanvasTitle";const bs=ms;function ys(e){return(0,p.jsx)(hs,{...e})}function vs(e){return(0,p.jsx)(Ke,{...e})}const xs=o.forwardRef((({bsPrefix:e,className:t,children:n,"aria-labelledby":r,placement:a="start",responsive:s,show:l=!1,backdrop:c=!0,keyboard:u=!0,scroll:d=!1,onEscapeKeyDown:h,onShow:f,onHide:g,container:m,autoFocus:b=!0,enforceFocus:y=!0,restoreFocus:v=!0,restoreFocusOptions:w,onEntered:k,onExit:_,onExiting:C,onEnter:A,onEntering:S,onExited:E,backdropClassName:P,manager:O,renderStaticNode:R=!1,...j},I)=>{const T=(0,o.useRef)();e=x(e,"offcanvas");const{onToggle:M}=(0,o.useContext)(Di)||{},[N,D]=(0,o.useState)(!1),L=ss(s||"xs","up");(0,o.useEffect)((()=>{D(s?l&&!L:l)}),[l,s,L]);const z=Ee((()=>{null==M||M(),null==g||g()})),F=(0,o.useMemo)((()=>({onHide:z})),[z]),B=(0,o.useCallback)((t=>(0,p.jsx)("div",{...t,className:i()(`${e}-backdrop`,P)})),[P,e]),U=o=>(0,p.jsx)("div",{...o,...j,className:i()(t,s?`${e}-${s}`:e,`${e}-${a}`),"aria-labelledby":r,children:n});return(0,p.jsxs)(p.Fragment,{children:[!N&&(s||R)&&U({}),(0,p.jsx)(Ra.Provider,{value:F,children:(0,p.jsx)(ya,{show:N,ref:I,backdrop:c,container:m,keyboard:u,autoFocus:b,enforceFocus:y&&!d,restoreFocus:v,restoreFocusOptions:w,onEscapeKeyDown:h,onShow:f,onHide:z,onEnter:(e,...t)=>{e&&(e.style.visibility="visible"),null==A||A(e,...t)},onEntering:S,onEntered:k,onExit:_,onExiting:C,onExited:(e,...t)=>{e&&(e.style.visibility=""),null==E||E(...t)},manager:O||(d?(T.current||(T.current=new Ea({handleContainerOverflow:!1})),T.current):Sa()),transition:ys,backdropTransition:vs,renderBackdrop:B,renderDialog:U})})]})}));xs.displayName="Offcanvas";const ws=Object.assign(xs,{Body:cs,Header:ps,Title:bs}),ks=o.forwardRef(((e,t)=>{const n=(0,o.useContext)(Di);return(0,p.jsx)(ws,{ref:t,show:!(null==n||!n.expanded),...e,renderStaticNode:!0})}));ks.displayName="NavbarOffcanvas";const _s=ks,Cs=o.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=x(t,"navbar-text"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Cs.displayName="NavbarText";const As=Cs,Ss=o.forwardRef(((e,t)=>{const{bsPrefix:n,expand:r=!0,variant:a="light",bg:s,fixed:l,sticky:c,className:u,as:d="nav",expanded:h,onToggle:g,onSelect:m,collapseOnSelect:b=!1,...y}=f(e,{expanded:"onToggle"}),v=x(n,"navbar"),w=(0,o.useCallback)(((...e)=>{null==m||m(...e),b&&h&&(null==g||g(!1))}),[m,b,h,g]);void 0===y.role&&"nav"!==d&&(y.role="navigation");let k=`${v}-expand`;"string"==typeof r&&(k=`${k}-${r}`);const _=(0,o.useMemo)((()=>({onToggle:()=>null==g?void 0:g(!h),bsPrefix:v,expanded:!!h,expand:r})),[v,h,r,g]);return(0,p.jsx)(Di.Provider,{value:_,children:(0,p.jsx)(ci.Provider,{value:w,children:(0,p.jsx)(d,{ref:t,...y,className:i()(u,v,r&&k,a&&`${v}-${a}`,s&&`bg-${s}`,c&&`sticky-${c}`,l&&`fixed-${l}`)})})})}));Ss.displayName="Navbar";const Es=Object.assign(Ss,{Brand:Qa,Collapse:ts,Offcanvas:_s,Text:As,Toggle:rs}),Ps=o.forwardRef((({id:e,title:t,children:n,bsPrefix:r,className:o,rootCloseEvent:a,menuRole:s,disabled:l,active:c,renderMenuOnMount:u,menuVariant:d,...h},f)=>{const g=x(void 0,"nav-item");return(0,p.jsxs)(Vi,{ref:f,...h,className:i()(o,g),children:[(0,p.jsx)(Vi.Toggle,{id:e,eventKey:null,active:c,disabled:l,childBsPrefix:r,as:$a,children:t}),(0,p.jsx)(Vi.Menu,{role:s,renderOnMount:u,rootCloseEvent:a,variant:d,children:n})]})}));Ps.displayName="NavDropdown";const Os=Object.assign(Ps,{Item:Vi.Item,ItemText:Vi.ItemText,Divider:Vi.Divider,Header:Vi.Header}),Rs=()=>{},js=o.forwardRef(((e,t)=>{const{flip:n,offset:r,placement:i,containerPadding:a,popperConfig:s={},transition:l,runTransition:c}=e,[u,d]=Ie(),[h,f]=Ie(),p=te(d,t),g=sa(e.container),m=sa(e.target),[b,y]=(0,o.useState)(!e.show),v=Rr(m,u,Fr({placement:i,enableEvents:!!e.show,containerPadding:a||5,flip:n,offset:r,arrowElement:h,popperConfig:s}));e.show&&b&&y(!1);const x=e.show||!b;if(function(e,t,{disabled:n,clickTrigger:r}={}){const i=t||Rs;Lr(e,i,{disabled:n,clickTrigger:r});const a=Ee((e=>{ca(e)&&i(e)}));(0,o.useEffect)((()=>{if(n||null==e)return;const t=A(Nr(e));let r=(t.defaultView||window).event;const i=K(t,"keyup",(e=>{e!==r?a(e):r=void 0}));return()=>{i()}}),[e,n,a])}(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!x)return null;const{onExit:w,onExiting:k,onEnter:_,onEntering:C,onEntered:S}=e;let E=e.children(Object.assign({},v.attributes.popper,{style:v.styles.popper,ref:p}),{popper:v,placement:i,show:!!e.show,arrowProps:Object.assign({},v.attributes.arrow,{style:v.styles.arrow,ref:f})});return E=pa(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:E,onExit:w,onExiting:k,onExited:(...t)=>{y(!0),e.onExited&&e.onExited(...t)},onEnter:_,onEntering:C,onEntered:S}),g?I.createPortal(E,g):null}));js.displayName="Overlay";const Is=js,Ts=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"popover-header"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ts.displayName="PopoverHeader";const Ms=Ts,Ns=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"popover-body"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ns.displayName="PopoverBody";const Ds=Ns;function Ls(e,t){let n=e;return"left"===e?n=t?"end":"start":"right"===e&&(n=t?"start":"end"),n}function zs(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}o.Component;const Fs=o.forwardRef((({bsPrefix:e,placement:t="right",className:n,style:r,children:o,body:a,arrowProps:s,hasDoneInitialMeasure:l,popper:c,show:u,...d},h)=>{const f=x(e,"popover"),g=_(),[m]=(null==t?void 0:t.split("-"))||[],b=Ls(m,g);let y=r;return u&&!l&&(y={...r,...zs(null==c?void 0:c.strategy)}),(0,p.jsxs)("div",{ref:h,role:"tooltip",style:y,"x-placement":m,className:i()(n,f,m&&`bs-popover-${b}`),...d,children:[(0,p.jsx)("div",{className:"popover-arrow",...s}),a?(0,p.jsx)(Ds,{children:o}):o]})})),Bs=Object.assign(Fs,{Header:Ms,Body:Ds,POPPER_OFFSET:[0,8]}),Us=o.forwardRef((({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:a,hasDoneInitialMeasure:s,popper:l,show:c,...u},d)=>{e=x(e,"tooltip");const h=_(),[f]=(null==t?void 0:t.split("-"))||[],g=Ls(f,h);let m=r;return c&&!s&&(m={...r,...zs(null==l?void 0:l.strategy)}),(0,p.jsxs)("div",{ref:d,style:m,role:"tooltip","x-placement":f,className:i()(n,e,`bs-tooltip-${g}`),...u,children:[(0,p.jsx)("div",{className:"tooltip-arrow",...a}),(0,p.jsx)("div",{className:`${e}-inner`,children:o})]})}));Us.displayName="Tooltip";const Hs=Object.assign(Us,{TOOLTIP_OFFSET:[0,6]}),Ws=o.forwardRef((({children:e,transition:t=Ke,popperConfig:n={},rootClose:r=!1,placement:a="top",show:s=!1,...l},c)=>{const u=(0,o.useRef)({}),[d,h]=(0,o.useState)(null),[f,g]=function(e){const t=(0,o.useRef)(null),n=x(void 0,"popover"),r=x(void 0,"tooltip"),i=(0,o.useMemo)((()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(va(t.current,n))return Bs.POPPER_OFFSET;if(va(t.current,r))return Hs.TOOLTIP_OFFSET}return[0,0]}}})),[e,n,r]);return[t,[i]]}(l.offset),m=te(c,f),b=!0===t?Ke:t||void 0,y=Ee((e=>{h(e),null==n||null==n.onFirstUpdate||n.onFirstUpdate(e)}));return De((()=>{d&&l.target&&(null==u.current.scheduleUpdate||u.current.scheduleUpdate())}),[d,l.target]),(0,o.useEffect)((()=>{s||h(null)}),[s]),(0,p.jsx)(Is,{...l,ref:m,popperConfig:{...n,modifiers:g.concat(n.modifiers||[]),onFirstUpdate:y},transition:b,rootClose:r,placement:a,show:s,children:(r,{arrowProps:a,popper:s,show:l})=>{var c;!function(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=e=>n(ne(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(ne(e)))}(r,a);const h=null==s?void 0:s.placement,f=Object.assign(u.current,{state:null==s?void 0:s.state,scheduleUpdate:null==s?void 0:s.update,placement:h,outOfBoundaries:(null==s||null==(c=s.state)||null==(c=c.modifiersData.hide)?void 0:c.isReferenceHidden)||!1,strategy:n.strategy}),p=!!d;return"function"==typeof e?e({...r,placement:h,show:l,...!t&&l&&{className:"show"},popper:f,arrowProps:a,hasDoneInitialMeasure:p}):o.cloneElement(e,{...r,placement:h,arrowProps:a,popper:f,hasDoneInitialMeasure:p,className:i()(e.props.className,!t&&l&&"show"),style:{...e.props.style,...r.style}})}})}));Ws.displayName="Overlay";const Vs=Ws;function Ys(e,t,n){const[r]=t,i=r.currentTarget,o=r.relatedTarget||r.nativeEvent[n];o&&o===i||jr(i,o)||e(...t)}Ze().oneOf(["click","hover","focus"]);const Gs=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:i,defaultShow:a=!1,onToggle:s,delay:l,placement:c,flip:u=c&&-1!==c.indexOf("auto"),...d})=>{const f=(0,o.useRef)(null),g=te(f,n.ref),m=Vt(),b=(0,o.useRef)(""),[y,v]=h(i,a,s),x=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}}(l),{onFocus:w,onBlur:k,onClick:_}="function"!=typeof n?o.Children.only(n).props:{},C=(0,o.useCallback)((()=>{m.clear(),b.current="show",x.show?m.set((()=>{"show"===b.current&&v(!0)}),x.show):v(!0)}),[x.show,v,m]),A=(0,o.useCallback)((()=>{m.clear(),b.current="hide",x.hide?m.set((()=>{"hide"===b.current&&v(!1)}),x.hide):v(!1)}),[x.hide,v,m]),S=(0,o.useCallback)(((...e)=>{C(),null==w||w(...e)}),[C,w]),E=(0,o.useCallback)(((...e)=>{A(),null==k||k(...e)}),[A,k]),P=(0,o.useCallback)(((...e)=>{v(!y),null==_||_(...e)}),[_,v,y]),O=(0,o.useCallback)(((...e)=>{Ys(C,e,"fromElement")}),[C]),R=(0,o.useCallback)(((...e)=>{Ys(A,e,"toElement")}),[A]),j=null==e?[]:[].concat(e),I={ref:e=>{g(ne(e))}};return-1!==j.indexOf("click")&&(I.onClick=P),-1!==j.indexOf("focus")&&(I.onFocus=S,I.onBlur=E),-1!==j.indexOf("hover")&&(I.onMouseOver=O,I.onMouseOut=R),(0,p.jsxs)(p.Fragment,{children:["function"==typeof n?n(I):(0,o.cloneElement)(n,I),(0,p.jsx)(Vs,{...d,show:y,onHide:A,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},Js=o.forwardRef((({active:e=!1,disabled:t=!1,className:n,style:r,activeLabel:o="(current)",children:a,linkStyle:s,linkClassName:l,as:c=We,...u},d)=>{const h=e||t?"span":c;return(0,p.jsx)("li",{ref:d,style:r,className:i()(n,"page-item",{active:e,disabled:t}),children:(0,p.jsxs)(h,{className:i()("page-link",l),style:s,...u,children:[a,e&&o&&(0,p.jsx)("span",{className:"visually-hidden",children:o})]})})}));Js.displayName="PageItem";const Ks=Js;function $s(e,t,n=e){const r=o.forwardRef((({children:e,...r},i)=>(0,p.jsxs)(Js,{...r,ref:i,children:[(0,p.jsx)("span",{"aria-hidden":"true",children:e||t}),(0,p.jsx)("span",{className:"visually-hidden",children:n})]})));return r.displayName=e,r}const Zs=$s("First","«"),qs=$s("Prev","‹","Previous"),Xs=$s("Ellipsis","…","More"),Qs=$s("Next","›"),el=$s("Last","»"),tl=o.forwardRef((({bsPrefix:e,className:t,size:n,...r},o)=>{const a=x(e,"pagination");return(0,p.jsx)("ul",{ref:o,...r,className:i()(t,a,n&&`${a}-${n}`)})}));tl.displayName="Pagination";const nl=Object.assign(tl,{First:Zs,Prev:qs,Ellipsis:Xs,Item:Ks,Next:Qs,Last:el});function rl({animation:e,bg:t,bsPrefix:n,size:r,...o}){n=x(n,"placeholder");const[{className:a,...s}]=Qt(o);return{...s,className:i()(a,e?`${n}-${e}`:n,r&&`${n}-${r}`,t&&`bg-${t}`)}}const il=o.forwardRef(((e,t)=>{const n=rl(e);return(0,p.jsx)(ut,{...n,ref:t,disabled:!0,tabIndex:-1})}));il.displayName="PlaceholderButton";const ol=il,al=o.forwardRef((({as:e="span",...t},n)=>{const r=rl(t);return(0,p.jsx)(e,{...r,ref:n})}));al.displayName="Placeholder";const sl=Object.assign(al,{Button:ol}),ll=1e3;function cl(e,t,n){const r=(e-t)/(n-t)*100;return Math.round(r*ll)/ll}function ul({min:e,now:t,max:n,label:r,visuallyHidden:o,striped:a,animated:s,className:l,style:c,variant:u,bsPrefix:d,...h},f){return(0,p.jsx)("div",{ref:f,...h,role:"progressbar",className:i()(l,`${d}-bar`,{[`bg-${u}`]:u,[`${d}-bar-animated`]:s,[`${d}-bar-striped`]:s||a}),style:{width:`${cl(t,e,n)}%`,...c},"aria-valuenow":t,"aria-valuemin":e,"aria-valuemax":n,children:o?(0,p.jsx)("span",{className:"visually-hidden",children:r}):r})}const dl=o.forwardRef((({isChild:e=!1,...t},n)=>{const r={min:0,max:100,animated:!1,visuallyHidden:!1,striped:!1,...t};if(r.bsPrefix=x(r.bsPrefix,"progress"),e)return ul(r,n);const{min:a,now:s,max:l,label:c,visuallyHidden:u,striped:d,animated:h,bsPrefix:f,variant:g,className:m,children:b,...y}=r;return(0,p.jsx)("div",{ref:n,...y,className:i()(m,f),children:b?$t(b,(e=>(0,o.cloneElement)(e,{isChild:!0}))):ul({min:a,now:s,max:l,label:c,visuallyHidden:u,striped:d,animated:h,bsPrefix:f,variant:g},n)})}));dl.displayName="ProgressBar";const hl=dl,fl=o.forwardRef((({bsPrefix:e,className:t,children:n,aspectRatio:r="1x1",style:a,...s},l)=>{e=x(e,"ratio");const c="number"==typeof r;return(0,p.jsx)("div",{ref:l,...s,style:{...a,...c&&{"--bs-aspect-ratio":(u=r,u<=0?"100%":u<1?100*u+"%":`${u}%`)}},className:i()(e,t,!c&&`${e}-${r}`),children:o.Children.only(n)});var u})),pl=o.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},o)=>{const a=x(e,"row"),s=w(),l=k(),c=`${a}-cols`,u=[];return s.forEach((e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const i=e!==l?`-${e}`:"";null!=n&&u.push(`${c}${i}-${n}`)})),(0,p.jsx)(n,{ref:o,...r,className:i()(t,a,...u)})}));pl.displayName="Row";const gl=pl,ml=o.forwardRef((({bsPrefix:e,variant:t,animation:n="border",size:r,as:o="div",className:a,...s},l)=>{const c=`${e=x(e,"spinner")}-${n}`;return(0,p.jsx)(o,{ref:l,...s,className:i()(a,c,r&&`${c}-${r}`,t&&`text-${t}`)})}));ml.displayName="Spinner";const bl=ml,yl={id:Ze().string,toggleLabel:Ze().string,href:Ze().string,target:Ze().string,onClick:Ze().func,title:Ze().node.isRequired,type:Ze().string,disabled:Ze().bool,align:Gi,menuRole:Ze().string,renderMenuOnMount:Ze().bool,rootCloseEvent:Ze().string,flip:Ze().bool,bsPrefix:Ze().string,variant:Ze().string,size:Ze().string},vl=o.forwardRef((({id:e,bsPrefix:t,size:n,variant:r,title:i,type:o="button",toggleLabel:a="Toggle dropdown",children:s,onClick:l,href:c,target:u,menuRole:d,renderMenuOnMount:h,rootCloseEvent:f,flip:g,...m},b)=>(0,p.jsxs)(Vi,{ref:b,...m,as:ht,children:[(0,p.jsx)(ut,{size:n,variant:r,disabled:m.disabled,bsPrefix:t,href:c,target:u,onClick:l,type:o,children:i}),(0,p.jsx)(Vi.Toggle,{split:!0,id:e,size:n,variant:r,disabled:m.disabled,childBsPrefix:t,children:(0,p.jsx)("span",{className:"visually-hidden",children:a})}),(0,p.jsx)(Vi.Menu,{role:d,renderOnMount:h,rootCloseEvent:f,flip:g,children:s})]})));vl.propTypes=yl,vl.displayName="SplitButton";const xl=vl,wl=function(e){return"function"==typeof o.useId?($r||(console.warn("In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app."),$r=!0),o.createElement(o.Fragment,null,e.children)):o.createElement(Kr,e)};function kl(e,t=g,n=m){const r=[];return Object.entries(e).forEach((([e,i])=>{null!=i&&("object"==typeof i?t.forEach((t=>{const o=i[t];if(null!=o){const i=t!==n?`-${t}`:"";r.push(`${e}${i}-${o}`)}})):r.push(`${e}-${i}`))})),r}const _l=o.forwardRef((({as:e="div",bsPrefix:t,className:n,direction:r,gap:o,...a},s)=>{t=x(t,"horizontal"===r?"hstack":"vstack");const l=w(),c=k();return(0,p.jsx)(e,{...a,ref:s,className:i()(n,t,...kl({gap:o},l,c))})}));_l.displayName="Stack";const Cl=_l,Al=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],Sl=["activeKey","getControlledId","getControllerId"],El=["as"];function Pl(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}function Ol(e){let{active:t,eventKey:n,mountOnEnter:r,transition:i,unmountOnExit:a,role:s="tabpanel",onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:h,onExited:f}=e,p=Pl(e,Al);const g=(0,o.useContext)(Uo);if(!g)return[Object.assign({},p,{role:s}),{eventKey:n,isActive:t,mountOnEnter:r,transition:i,unmountOnExit:a,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:h,onExited:f}];const{activeKey:m,getControlledId:b,getControllerId:y}=g,v=Pl(g,Sl),x=li(n);return[Object.assign({},p,{role:s,id:b(n),"aria-labelledby":y(n)}),{eventKey:n,isActive:null==t&&null!=x?li(m)===x:t,transition:i||v.transition,mountOnEnter:null!=r?r:v.mountOnEnter,unmountOnExit:null!=a?a:v.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:h,onExited:f}]}const Rl=o.forwardRef(((e,t)=>{let{as:n="div"}=e,r=Pl(e,El);const[i,{isActive:o,onEnter:a,onEntering:s,onEntered:l,onExit:c,onExiting:u,onExited:d,mountOnEnter:h,unmountOnExit:f,transition:g=la}]=Ol(r);return(0,p.jsx)(Uo.Provider,{value:null,children:(0,p.jsx)(ci.Provider,{value:null,children:(0,p.jsx)(g,{in:o,onEnter:a,onEntering:s,onEntered:l,onExit:c,onExiting:u,onExited:d,mountOnEnter:h,unmountOnExit:f,children:(0,p.jsx)(n,Object.assign({},i,{ref:t,hidden:!o,"aria-hidden":!o}))})})})}));Rl.displayName="TabPanel";const jl=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:i,defaultActiveKey:a,transition:s,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,h]=sn(i,a,r),f=Qr(t),g=(0,o.useMemo)((()=>n||((e,t)=>f?`${f}-${t}-${e}`:null)),[f,n]),m=(0,o.useMemo)((()=>({onSelect:h,activeKey:d,transition:s,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:e=>g(e,"tabpane"),getControllerId:e=>g(e,"tab")})),[h,d,s,l,c,g]);return(0,p.jsx)(Uo.Provider,{value:m,children:(0,p.jsx)(ci.Provider,{value:h||null,children:u})})};jl.Panel=Rl;const Il=jl;function Tl(e){return"boolean"==typeof e?e?Ke:la:e}const Ml=({transition:e,...t})=>(0,p.jsx)(Il,{...t,transition:Tl(e)});Ml.displayName="TabContainer";const Nl=Ml,Dl=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"tab-content"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));Dl.displayName="TabContent";const Ll=Dl,zl=o.forwardRef((({bsPrefix:e,transition:t,...n},r)=>{const[{className:o,as:a="div",...s},{isActive:l,onEnter:c,onEntering:u,onEntered:d,onExit:h,onExiting:f,onExited:g,mountOnEnter:m,unmountOnExit:b,transition:y=Ke}]=Ol({...n,transition:Tl(t)}),v=x(e,"tab-pane");return(0,p.jsx)(Uo.Provider,{value:null,children:(0,p.jsx)(ci.Provider,{value:null,children:(0,p.jsx)(y,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:h,onExiting:f,onExited:g,mountOnEnter:m,unmountOnExit:b,children:(0,p.jsx)(a,{...s,ref:r,className:i()(o,v,l&&"active")})})})})}));zl.displayName="TabPane";const Fl=zl,Bl={eventKey:Ze().oneOfType([Ze().string,Ze().number]),title:Ze().node.isRequired,disabled:Ze().bool,tabClassName:Ze().string,tabAttrs:Ze().object},Ul=()=>{throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")};Ul.propTypes=Bl;const Hl=Object.assign(Ul,{Container:Nl,Content:Ll,Pane:Fl}),Wl=o.forwardRef((({bsPrefix:e,className:t,striped:n,bordered:r,borderless:o,hover:a,size:s,variant:l,responsive:c,...u},d)=>{const h=x(e,"table"),f=i()(t,h,l&&`${h}-${l}`,s&&`${h}-${s}`,n&&`${h}-${"string"==typeof n?`striped-${n}`:"striped"}`,r&&`${h}-bordered`,o&&`${h}-borderless`,a&&`${h}-hover`),g=(0,p.jsx)("table",{...u,className:f,ref:d});if(c){let e=`${h}-responsive`;return"string"==typeof c&&(e=`${e}-${c}`),(0,p.jsx)("div",{className:e,children:g})}return g})),Vl=Wl;function Yl(e){let t;return Zt(e,(e=>{null==t&&(t=e.props.eventKey)})),t}function Gl(e){const{title:t,eventKey:n,disabled:r,tabClassName:i,tabAttrs:o,id:a}=e.props;return null==t?null:(0,p.jsx)(Ja,{as:"li",role:"presentation",children:(0,p.jsx)($a,{as:"button",type:"button",eventKey:n,disabled:r,id:a,className:i,...o,children:t})})}const Jl=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:i=!1,unmountOnExit:o=!1,variant:a="tabs",children:s,activeKey:l=Yl(s),...c}=f(e,{activeKey:"onSelect"});return(0,p.jsxs)(Il,{id:t,activeKey:l,onSelect:n,transition:Tl(r),mountOnEnter:i,unmountOnExit:o,children:[(0,p.jsx)(qa,{id:t,...c,role:"tablist",as:"ul",variant:a,children:$t(s,Gl)}),(0,p.jsx)(Ll,{children:$t(s,(e=>{const t={...e.props};return delete t.title,delete t.disabled,delete t.tabClassName,delete t.tabAttrs,(0,p.jsx)(Fl,{...t})}))})]})};Jl.displayName="Tabs";const Kl=Jl,$l={[D]:"showing",[z]:"showing show"},Zl=o.forwardRef(((e,t)=>(0,p.jsx)(Ke,{...e,ref:t,transitionClasses:$l})));Zl.displayName="ToastFade";const ql=Zl,Xl=o.createContext({onClose(){}}),Ql=o.forwardRef((({bsPrefix:e,closeLabel:t="Close",closeVariant:n,closeButton:r=!0,className:a,children:s,...l},c)=>{e=x(e,"toast-header");const u=(0,o.useContext)(Xl),d=Ee((e=>{null==u||null==u.onClose||u.onClose(e)}));return(0,p.jsxs)("div",{ref:c,...l,className:i()(e,a),children:[s,r&&(0,p.jsx)(Qe,{"aria-label":t,variant:n,onClick:d,"data-dismiss":"toast"})]})}));Ql.displayName="ToastHeader";const ec=Ql,tc=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=x(t,"toast-body"),(0,p.jsx)(n,{ref:o,className:i()(e,t),...r}))));tc.displayName="ToastBody";const nc=tc,rc=o.forwardRef((({bsPrefix:e,className:t,transition:n=ql,show:r=!0,animation:a=!0,delay:s=5e3,autohide:l=!1,onClose:c,onEntered:u,onExit:d,onExiting:h,onEnter:f,onEntering:g,onExited:m,bg:b,...y},v)=>{e=x(e,"toast");const w=(0,o.useRef)(s),k=(0,o.useRef)(c);(0,o.useEffect)((()=>{w.current=s,k.current=c}),[s,c]);const _=Vt(),C=!(!l||!r),A=(0,o.useCallback)((()=>{C&&(null==k.current||k.current())}),[C]);(0,o.useEffect)((()=>{_.set(A,w.current)}),[_,A]);const S=(0,o.useMemo)((()=>({onClose:c})),[c]),E=!(!n||!a),P=(0,p.jsx)("div",{...y,ref:v,className:i()(e,t,b&&`bg-${b}`,!E&&(r?"show":"hide")),role:"alert","aria-live":"assertive","aria-atomic":"true"});return(0,p.jsx)(Xl.Provider,{value:S,children:E&&n?(0,p.jsx)(n,{in:r,onEnter:f,onEntering:g,onEntered:u,onExit:d,onExiting:h,onExited:m,unmountOnExit:!0,children:P}):P})}));rc.displayName="Toast";const ic=Object.assign(rc,{Body:nc,Header:ec}),oc={"top-start":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-end":"top-0 end-0","middle-start":"top-50 start-0 translate-middle-y","middle-center":"top-50 start-50 translate-middle","middle-end":"top-50 end-0 translate-middle-y","bottom-start":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-end":"bottom-0 end-0"},ac=o.forwardRef((({bsPrefix:e,position:t,containerPosition:n,className:r,as:o="div",...a},s)=>(e=x(e,"toast-container"),(0,p.jsx)(o,{ref:s,...a,className:i()(e,t&&oc[t],n&&`position-${n}`,r)}))));ac.displayName="ToastContainer";const sc=ac,lc=()=>{},cc=o.forwardRef((({bsPrefix:e,name:t,className:n,checked:r,type:o,onChange:a,value:s,disabled:l,id:c,inputRef:u,...d},h)=>(e=x(e,"btn-check"),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("input",{className:e,name:t,type:o,value:s,ref:u,autoComplete:"off",checked:!!r,disabled:!!l,onChange:a||lc,id:c}),(0,p.jsx)(ut,{...d,ref:h,className:i()(n,l&&"disabled"),type:void 0,role:void 0,as:"label",htmlFor:c})]}))));cc.displayName="ToggleButton";const uc=cc,dc=o.forwardRef(((e,t)=>{const{children:n,type:r="radio",name:i,value:a,onChange:s,vertical:l=!1,...u}=f(e,{value:"onChange"}),d=()=>null==a?[]:[].concat(a);return"radio"!==r||i||c()(!1),(0,p.jsx)(ht,{...u,ref:t,vertical:l,children:$t(n,(e=>{const t=d(),{value:n,onChange:a}=e.props;return o.cloneElement(e,{type:r,name:e.name||i,checked:-1!==t.indexOf(n),onChange:X(a,(e=>((e,t)=>{if(!s)return;const n=d(),i=-1!==n.indexOf(e);"radio"!==r?s(i?n.filter((t=>t!==e)):[...n,e],t):i||s(e,t)})(n,e)))})}))})})),hc=Object.assign(dc,{Button:uc})},2551:(e,t,n)=>{"use strict";var r=n(6540),i=n(9982);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n