diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 13e42bb..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "./node_modules/gts/", - "rules": { - "node/no-unpublished-require": ["error", { - "allowModules": ["html-webpack-plugin", "mini-css-extract-plugin", "workbox-webpack-plugin"] - }] - }, - "plugins": ["react", "@typescript-eslint", "prettier"], - "settings": { - "react": { - "version": "detect" - } - } -} diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml new file mode 100644 index 0000000..3ac11b4 --- /dev/null +++ b/.github/workflows/build-tests.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: build-tests + +on: + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/.github/workflows/workflow-action.yml b/.github/workflows/workflow-action.yml new file mode 100644 index 0000000..86424b8 --- /dev/null +++ b/.github/workflows/workflow-action.yml @@ -0,0 +1,44 @@ +# This is a basic workflow to help you get started with Actions + +name: CI Workflow + +# Controls when the workflow will run +on: workflow_dispatch + # Triggers the workflow on push or pull request events but only for the "dev" branch + # push: + # branches: [ "dev" ] + # pull_request: + # branches: [ "dev" ] + + # Allows you to run this workflow manually from the Actions tab + # workflow_dispatch: workflow_dispatch + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + first-job: + runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Print greeting + run: | + echo "Hello World!" + echo "Second line! + - name: Print goodbye + run: echo "Done - goodbye!" + + # This workflow contains a single job called "build" + # build: + # # The type of runner that the job will run on + # runs-on: ubuntu-latest + + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + # - uses: actions/checkout@v4 + + + # # Runs a set of commands using the runners shell + # - name: Run a multi-line script + # run: | + # echo Add other actions to build, + # echo test, and deploy your project. diff --git a/README.md b/README.md index fa32788..ab20ba0 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,62 @@ -# 🚀 Welcome to your new awesome project! + -This project has been created using **webpack-cli**, you can now run +# 🚀 Welcome to flake guard! +### [Website](https://flake-guard.com/) [Npm*](https://flake-guard.com/) [Articles*](https://flake-guard.com/) +
+ + + + + + -``` -npm run build -``` +
-or +### Flake-Guard is a free, open-source tool that allows developers to run Jest tests to automatically detect, report, and manage flaky tests in software development. +--- +*flaky test +: a test that sometimes passes and sometimes fails for the same code, often due to nondeterministic factors like timing issues, network variability, or reliance on external systems.* -``` -yarn build -``` +**By identifying and handling these inconsistent tests, Flake-Guard helps maintain test reliability.** + +# DEMO SECTION WITH VIDEO + +### end of demo section +--- +# Getting Started +Installation: +```npm i flake-guard``` + +Installation as dev dependency: +```npm i flake-guard --save-dev``` + +To run FlakeGuard, simply execute the command +```npx flake-guard ``` +. *change `` to the name of the test file that you want to examine. + +👁️FlakeGuard will analyze your E2E tests for flakiness by executing multiple test runs and analyzing the results. _The default number of test runs is 10_, but this can be adjusted as described below. + +In general, there is a time versus accuracy tradeoff. More test executions increase accuracy but reduce speed. + +## Configuration: +To adjust FlakeGuard configuration variables, you can create a file in the root directory of your project called +fg.config.json +. Below are the defaults, which can be overridden in your local 'fg.config.json' file. + +# [Flake-guard.com](https://Flake-guard.com) +## Tracked Dashboard Metrics +
+ +
+ +## Contribution Guidelines +--- +# Authors +| Name (First, Last) | Connect with us | +| ------------- |:-------------:| +| Ashley Hannigan | [LinkedIn](https://www.linkedin.com/in/ashley-hannigan-88-/) `,` [Github](https://github.com/ashhannigan) +| Brendan Xiong | [LinkedIn](https://www.linkedin.com/in/brendanxiong/) `,` [Github](https://github.com/brendanxiong) +| Tommy Martinez | [LinkedIn](https://www.linkedin.com/in/tommy-martinez/) `,` [Github](https://github.com/tmm150) +| Paloma Reynolds | [LinkedIn](https://www.linkedin.com/in/palomareynolds/)`,` [Github](https://github.com/palomareynolds) +| Will Suto | [LinkedIn](https://www.linkedin.com/in/willsuto/) `,` [Github](https://github.com/willsuto) -to bundle your application diff --git a/dist/index.html b/dist/index.html deleted file mode 100644 index 721a7a4..0000000 --- a/dist/index.html +++ /dev/null @@ -1,12 +0,0 @@ -Webpack App
\ No newline at end of file diff --git a/dist/main.js b/dist/main.js deleted file mode 100644 index 6ae8716..0000000 --- a/dist/main.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.js.LICENSE.txt */ -(()=>{var e,t,n,r,i={4603:(e,t,n)=>{"use strict";e.exports=n(3853)},1244:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(){return(0,r.useState)(null)}},3713:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);const i=function(e){const t=(0,r.useRef)(e);return(0,r.useEffect)((()=>{t.current=e}),[e]),t}},7895:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),i=n(3713);function o(e){const t=(0,i.A)(e);return(0,r.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}},7876:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540),i=n(7895);function o(e,t,n,o=!1){const s=(0,i.A)(n);(0,r.useEffect)((()=>{const n="function"==typeof e?e():e;return n.addEventListener(t,s,o),()=>n.removeEventListener(t,s,o)}),[e])}},8342:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(){const[,e]=(0,r.useReducer)((e=>!e),!1);return e}},1706:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const i=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,o="undefined"!=typeof document||i?r.useLayoutEffect:r.useEffect},3804:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const i=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,o=function(e,t){return(0,r.useMemo)((()=>function(e,t){const n=i(e),r=i(t);return e=>{n&&n(e),r&&r(e)}}(e,t)),[e,t])}},8880:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(){const e=(0,r.useRef)(!0),t=(0,r.useRef)((()=>e.current));return(0,r.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}},4103:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);function i(e){const t=(0,r.useRef)(null);return(0,r.useEffect)((()=>{t.current=e})),t.current}},2571:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(6540),i=(n(1244),n(3713),n(7895));n(7876),n(8880),n(4103),n(1706),new WeakMap;var o=n(5753),s=n(4848);const a=["onKeyDown"],l=r.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,a);const[l]=(0,o.Am)(Object.assign({tagName:"a"},r)),c=(0,i.A)((e=>{l.onKeyDown(e),null==n||n(e)}));return(u=r.href)&&"#"!==u.trim()&&"button"!==r.role?(0,s.jsx)("a",Object.assign({ref:t},r,{onKeyDown:n})):(0,s.jsx)("a",Object.assign({ref:t},r,l,{onKeyDown:c}));var u}));l.displayName="Anchor";const c=l},5753:(e,t,n)=>{"use strict";n.d(t,{Am:()=>s,Ay:()=>l});var r=n(6540),i=n(4848);const o=["as","disabled"];function s({tagName:e,disabled:t,href:n,target:r,rel:i,role:o,onClick:s,tabIndex:a=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==s||s(r)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=o?o:"button",disabled:void 0,tabIndex:t?void 0:a,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 a=r.forwardRef(((e,t)=>{let{as:n,disabled:r}=e,a=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,o);const[l,{tagName:c}]=s(Object.assign({tagName:n,disabled:r},a));return(0,i.jsx)(c,Object.assign({},a,l,{ref:t}))}));a.displayName="Button";const l=a},5182:(e,t,n)=>{"use strict";n.d(t,{sE:()=>o,y:()=>s});const r="data-rr-ui-",i="rrUi";function o(e){return`${r}${e}`}function s(e){return`${i}${e}`}},9409:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=n(6540).createContext(null);r.displayName="NavContext";const i=r},2671:(e,t,n)=>{"use strict";n.d(t,{A:()=>p,M:()=>h});var r=n(6540),i=n(7895),o=n(9409),s=n(1406),a=n(5753),l=n(5182),c=n(7395),u=n(4848);const d=["as","active","eventKey"];function h({key:e,onClick:t,active:n,id:a,role:u,disabled:d}){const h=(0,r.useContext)(s.A),f=(0,r.useContext)(o.A),p=(0,r.useContext)(c.A);let g=n;const m={role:u};if(f){u||"tablist"!==f.role||(m.role="tab");const t=f.getControllerId(null!=e?e:null),r=f.getControlledId(null!=e?e:null);m[(0,l.sE)("event-key")]=e,m.id=t||a,g=null==n&&null!=e?f.activeKey===e:n,!g&&(null!=p&&p.unmountOnExit||null!=p&&p.mountOnEnter)||(m["aria-controls"]=r)}return"tab"===m.role&&(m["aria-selected"]=g,g||(m.tabIndex=-1),d&&(m.tabIndex=-1,m["aria-disabled"]=!0)),m.onClick=(0,i.A)((n=>{d||(null==t||t(n),null!=e&&h&&!n.isPropagationStopped()&&h(e,n))})),[m,{isActive:g}]}const f=r.forwardRef(((e,t)=>{let{as:n=a.Ay,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,d);const[c,f]=h(Object.assign({key:(0,s.u)(i,o.href),active:r},o));return c[(0,l.sE)("active")]=f.isActive,(0,u.jsx)(n,Object.assign({},o,c,{ref:t}))}));f.displayName="NavItem";const p=f},1406:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,u:()=>i});var r=n(6540);const i=(e,t=null)=>null!=e?String(e):t||null,o=r.createContext(null)},7395:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(6540).createContext(null)},2810:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(6540),i=n(7828);const o=(0,r.createContext)(i.A?window:void 0);function s(){return(0,r.useContext)(o)}o.Provider},907:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Headers:()=>s,Request:()=>a,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),s=r.Headers,a=r.Request,l=r.Response},6191:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AuthAdminApi:()=>_t,AuthApiError:()=>$e,AuthClient:()=>wt,AuthError:()=>ze,AuthImplicitGrantRedirectError:()=>Qe,AuthInvalidCredentialsError:()=>Ke,AuthInvalidTokenResponseError:()=>qe,AuthPKCEGrantCodeExchangeError:()=>Ye,AuthRetryableFetchError:()=>Ge,AuthSessionMissingError:()=>Ve,AuthUnknownError:()=>We,AuthWeakPasswordError:()=>Xe,CustomAuthError:()=>He,FunctionRegion:()=>a,FunctionsError:()=>r,FunctionsFetchError:()=>i,FunctionsHttpError:()=>s,FunctionsRelayError:()=>o,GoTrueAdminApi:()=>ut,GoTrueClient:()=>At,NavigatorLockAcquireTimeoutError:()=>gt,REALTIME_CHANNEL_STATES:()=>$,REALTIME_LISTEN_TYPES:()=>z,REALTIME_POSTGRES_CHANGES_LISTEN_EVENT:()=>F,REALTIME_PRESENCE_LISTEN_EVENTS:()=>x,REALTIME_SUBSCRIBE_STATES:()=>B,RealtimeChannel:()=>U,RealtimeClient:()=>V,RealtimePresence:()=>C,SupabaseClient:()=>kt,createClient:()=>Et,isAuthApiError:()=>Ue,isAuthError:()=>Be,isAuthRetryableFetchError:()=>Je,isAuthWeakPasswordError:()=>Ze,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 s extends r{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var a;!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"}(a||(a={}));class l{constructor(e,{headers:t={},customFetch:r,region:i=a.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,a,l,c;return r=this,a=void 0,c=function*(){try{const{headers:r,method:a,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:a||"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 s(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,a||[])).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,s=null,a=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&&(s=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,s=null,a=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,a=200,l="OK")}catch(n){404===e.status&&""===t?(a=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,a=200,l="OK"),i&&this.shouldThrowOnError)throw new u(i)}return{error:i,data:o,count:s,status:a,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",s=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${s?`${s},`:""}${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 s;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(s=this.headers.Accept)&&void 0!==s?s:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${l}"; options=${a};`,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 s=new URL(`${this.url}/rpc/${e}`);let a;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])=>{s.searchParams.append(e,t)}))):(o="POST",a=t);const l=Object.assign({},this.headers);return i&&(l.Prefer=`count=${i}`),new f({method:o,url:s,headers:l,schema:this.schemaName,body:a,fetch:this.fetch,allowEmpty:!1})}}const b={"X-Client-Info":"realtime-js/2.9.5"};var y,v,A,_,w,x,k;!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"}(A||(A={})),function(e){e.websocket="websocket"}(_||(_={})),function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"}(w||(w={}));class E{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 s=n.decode(e.slice(o,o+r));o+=r;const a=n.decode(e.slice(o,o+i));return o+=i,{ref:null,topic:s,event:a,payload:JSON.parse(n.decode(e.slice(o,e.byteLength)))}}}class O{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"}(x||(x={}));class C{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=C.syncState(this.state,e,t,n),this.pendingDiffs.forEach((e=>{this.state=C.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=C.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),s={},a={};return this.map(i,((e,t)=>{o[e]||(a[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&&(s[e]=o),l.length>0&&(a[e]=l)}else s[e]=t})),this.syncDiff(i,{joins:s,leaves:a},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"}(k||(k={}));const T=(e,t,n={})=>{var r;const i=null!==(r=n.skipTypes)&&void 0!==r?r:[];return Object.keys(t).reduce(((n,r)=>(n[r]=P(r,e,t,i),n)),{})},P=(e,t,n,r)=>{const i=t.find((t=>t.name===e)),o=null==i?void 0:i.type,s=n[e];return o&&!r.includes(o)?R(o,s):j(s)},R=(e,t)=>{if("_"===e.charAt(0)){const n=e.slice(1,e.length);return N(t,n)}switch(e){case k.bool:return M(t);case k.float4:case k.float8:case k.int2:case k.int4:case k.int8:case k.numeric:case k.oid:return D(t);case k.json:case k.jsonb:return L(t);case k.timestamp:return I(t);case k.abstime:case k.date:case k.daterange:case k.int4range:case k.int8range:case k.money:case k.reltime:case k.text:case k.time:case k.timestamptz:case k.timetz:case k.tsrange:case k.tstzrange:default:return j(t)}},j=e=>e,M=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},D=e=>{if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},L=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},N=(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=>R(t,e)))}return e},I=e=>"string"==typeof e?e.replace(" ","T"):e;var F,z,B;!function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"}(F||(F={})),function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"}(z||(z={})),function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"}(B||(B={}));const $=v;class U{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 O(this,A.join,this.params,this.timeout),this.rejoinTimer=new E((()=>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(A.reply,{},((e,t)=>{this._trigger(this._replyEventName(t),e)})),this.presence=new C(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 s={},a={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&&(s.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:a},s)),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 s=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"),s.receive("ok",(()=>n("ok"))),s.receive("error",(()=>n("error"))),s.receive("timeout",(()=>n("timed out")))}));{const{event:i,payload:o}=e,s={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,s,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(A.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise((n=>{const r=new O(this,A.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 O(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:s,error:a,leave:l,join:c}=A;if(n&&[s,a,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,s,a,l;if(["broadcast","presence","postgres_changes"].includes(o)){if("id"in e){const o=e.id,s=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))&&("*"===s||(null==s?void 0:s.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{const n=null===(a=null===(s=null==e?void 0:e.filter)||void 0===s?void 0:s.event)||void 0===a?void 0:a.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,s={schema:t,table:n,commit_timestamp:r,eventType:i,new:{},old:{},errors:o};u=Object.assign(Object.assign({},s),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&&U.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(A.close,{},e)}_onError(e){this._on(A.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=T(e.columns,e.record)),"UPDATE"!==e.type&&"DELETE"!==e.type||(t.old=T(e.columns,e.old_record)),t}}const W=()=>{},H="undefined"!=typeof WebSocket;class V{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}/${_.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 E((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(H)return this.conn=new WebSocket(this._endPointURL()),void this.setupConnection();this.conn=new q(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 w.Connecting;case y.open:return w.Open;case y.closing:return w.Closing;default:return w.Closed}}isConnected(){return this.connectionState()===w.Open}channel(e,t={config:{}}){const n=new U(`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(A.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(A.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 q{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 K extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Q(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class Y extends K{constructor(e,t){super(e),this.name="StorageApiError",this.status=t}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class G extends K{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}const J=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 s(e){try{l(r.next(e))}catch(e){o(e)}}function a(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(s,a)}l((r=r.apply(e,t||[])).next())}))};const Z=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,s=void 0,a=function*(){return"undefined"==typeof Response?(yield Promise.resolve().then(n.bind(n,907))).Response:Response},new(s||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function r(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}l((a=a.apply(i,o||[])).next())})));var i,o,s,a;e instanceof r?e.json().then((n=>{t(new Y(Z(n),e.status||500))})).catch((e=>{t(new G(Z(e),e))})):t(new G(Z(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(((s,a)=>{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=>s(e))).catch((e=>ee(e,a)))}))}))}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 se=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(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(s,a)}l((r=r.apply(e,t||[])).next())}))};const ae={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=J(r)}uploadOrUpdate(e,t,n,r){return se(this,void 0,void 0,(function*(){try{let i;const o=Object.assign(Object.assign({},le),r),s=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,s["cache-control"]=`max-age=${o.cacheControl}`,s["content-type"]=o.contentType);const a=this._removeEmptyFolders(t),l=this._getFinalPath(a),c=yield this.fetch(`${this.url}/object/${l}`,Object.assign({method:e,body:i,headers:s},(null==o?void 0:o.duplex)?{duplex:o.duplex}:{})),u=yield c.json();return c.ok?{data:{path:a,id:u.Id,fullPath:u.Key},error:null}:{data:null,error:u}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}upload(e,t,n){return se(this,void 0,void 0,(function*(){return this.uploadOrUpdate("POST",e,t,n)}))}uploadToSignedUrl(e,t,n,r){return se(this,void 0,void 0,(function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),s=new URL(this.url+`/object/upload/sign/${o}`);s.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 a=yield this.fetch(s.toString(),{method:"PUT",body:e,headers:o}),l=yield a.json();return a.ok?{data:{path:i,fullPath:l.Key},error:null}:{data:null,error:l}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}createSignedUploadUrl(e){return se(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 K("No token returned by API");return{data:{signedUrl:r.toString(),path:e,token:i},error:null}}catch(e){if(Q(e))return{data:null,error:e};throw e}}))}update(e,t,n){return se(this,void 0,void 0,(function*(){return this.uploadOrUpdate("PUT",e,t,n)}))}move(e,t){return se(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(Q(e))return{data:null,error:e};throw e}}))}copy(e,t){return se(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(Q(e))return{data:null,error:e};throw e}}))}createSignedUrl(e,t,n){return se(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(Q(e))return{data:null,error:e};throw e}}))}createSignedUrls(e,t,n){return se(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(Q(e))return{data:null,error:e};throw e}}))}download(e,t){return se(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(Q(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",s=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==s&&r.push(s);let a=r.join("&");return""!==a&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${n}${a}`)}}}remove(e){return se(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(Q(e))return{data:null,error:e};throw e}}))}list(e,t,n){return se(this,void 0,void 0,(function*(){try{const r=Object.assign(Object.assign(Object.assign({},ae),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(Q(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 s(e){try{l(r.next(e))}catch(e){o(e)}}function a(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(s,a)}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=J(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(Q(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(Q(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(Q(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(Q(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(Q(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(Q(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)},Ae=(e,t,n)=>{const r=ve(n),i="undefined"==typeof Headers?c.Headers:Headers;return(n,o)=>{return s=void 0,a=void 0,c=function*(){var s;const a=null!==(s=yield t())&&void 0!==s?s: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 ${a}`),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(s,a||[])).next())}));var s,a,l,c}},_e="2.64.2",we={"X-Client-Info":`gotrue-js/${_e}`},xe="X-Supabase-Api-Version",ke={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Ee=()=>"undefined"!=typeof document,Se={tested:!1,writable:!1},Oe=()=>{if(!Ee())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 Ce(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 Te=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)},Pe=e=>"object"==typeof e&&null!==e&&"status"in e&&"ok"in e&&"json"in e&&"function"==typeof e.json,Re=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},je=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(e){return n}},Me=async(e,t)=>{await e.removeItem(t)};class De{constructor(){this.promise=new De.promiseConstructor(((e,t)=>{this.resolve=e,this.reject=t}))}}function Le(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,s,a,l,c="",u=0;for(e=e.replace("-","+").replace("_","/");u>4,r=(15&s)<<4|a>>2,i=(3&a)<<6|l,c+=String.fromCharCode(n),64!=a&&0!=r&&(c+=String.fromCharCode(r)),64!=l&&0!=i&&(c+=String.fromCharCode(i));return c}(n))}function Ne(e){return("0"+e.toString(16)).substr(-2)}async function Ie(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,Ne).join("")}();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await Re(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"]}De.promiseConstructor=Promise;const Fe=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;class ze 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 $e extends ze{constructor(e,t,n){super(e,t,n),this.name="AuthApiError",this.status=t,this.code=n}}function Ue(e){return Be(e)&&"AuthApiError"===e.name}class We extends ze{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class He extends ze{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}}class Ve extends He{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class qe extends He{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ke extends He{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Qe extends He{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 Ye extends He{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 Ge extends He{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function Je(e){return Be(e)&&"AuthRetryableFetchError"===e.name}class Xe extends He{constructor(e,t,n){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=n}}function Ze(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(!Pe(e))throw new Ge(et(e),0);if(tt.includes(e.status))throw new Ge(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(xe);if(!t)return null;if(!t.match(Fe))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch(e){return null}}(e);if(i&&i.getTime()>=ke["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 $e(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[xe]||(o[xe]=ke["2024-01-01"].name),(null==r?void 0:r.jwt)&&(o.Authorization=`Bearer ${r.jwt}`);const s=null!==(i=null==r?void 0:r.query)&&void 0!==i?i:{};(null==r?void 0:r.redirectTo)&&(s.redirect_to=r.redirectTo);const a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await async function(e,t,n,r,i,o){const s=((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 a;try{a=await e(n,Object.assign({},s))}catch(e){throw console.error(e),new Ge(et(e),0)}if(a.ok||await nt(a),null==r?void 0:r.noResolveJson)return a;try{return await a.json()}catch(e){await nt(e)}}(e,t,n+a,{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 st(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function at(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,s=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:st})}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:st})}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:st})}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=>Oe()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Oe()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Oe()&&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&&Oe()&&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:we,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},yt=3e4;async function vt(e,t,n){return await n()}class At{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=At.nextInstanceID,At.nextInstanceID+=1,this.instanceID>0&&Ee()&&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=Te(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:Ee()&&(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:Oe()?this.storage=dt:(this.memoryStorage={},this.storage=ht(this.memoryStorage)):(this.memoryStorage={},this.storage=ht(this.memoryStorage)),Ee()&&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} (${_e}) ${(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=!!Ee()&&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:s}=i;if(s||!o)return{data:{user:null,session:null},error:s};const a=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:l,session:a},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 s=null,a=null;"pkce"===this.flowType&&([s,a]=await Ie(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:s,code_challenge_method:a},xform:it})}else{if(!("phone"in e))throw new Ke("You must provide either an email or phone number and a password");{const{phone:t,password:o,options:s}=e;i=await rt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:t,password:o,data:null!==(n=null==s?void 0:s.data)&&void 0!==n?n:{},channel:null!==(r=null==s?void 0:s.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}},xform:it})}}const{data:o,error:s}=i;if(s||!o)return{data:{user:null,session:null},error:s};const a=o.session,l=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:l,session:a},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 Ke("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 qe}}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 je(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 Me(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 qe}}async signInWithIdToken(e){await this._removeSession();try{const{options:t,provider:n,token:r,access_token:i,nonce:o}=e,s=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:a,error:l}=s;return l?{data:{user:null,session:null},error:l}:a&&a.session&&a.user?(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:a,error:l}):{data:{user:null,session:null},error:new qe}}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,s=null;"pkce"===this.flowType&&([o,s]=await Ie(this.storage,this.storageKey));const{error:a}=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:s},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:a}}if("phone"in e){const{phone:t,options:n}=e,{data:s,error:a}=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==s?void 0:s.message_id},error:a}}throw new Ke("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:s}=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(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const a=o.session,l=o.user;return(null==a?void 0:a.access_token)&&(await this._saveSession(a),await this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",a)),{data:{user:l,session:a},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 Ie(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:at})}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 Ve;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:s}=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:s}}throw new Ke("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 je(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:st}):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:st}):{data:{user:null},error:new Ve}}))}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 Ve;const o=r.session;let s=null,a=null;"pkce"===this.flowType&&null!=e.email&&([s,a]=await Ie(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:s,code_challenge_method:a}),jwt:o.access_token,xform:st});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 Le(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 Ve;const t=Date.now()/1e3;let n=t,r=!0,i=null;const o=Le(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 Ve;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(!Ee())throw new Qe("No browser detected.");if("implicit"===this.flowType&&!this._isImplicitGrantFlow())throw new Qe("Not a valid implicit grant flow url.");if("pkce"==this.flowType&&!e)throw new Ye("Not a valid PKCE flow url.");const t=Ce(window.location.href);if(e){if(!t.code)throw new Ye("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 Qe(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:s,expires_at:a,token_type:l}=t;if(!(i&&s&&o&&l))throw new Qe("No session defined in URL");const c=Math.round(Date.now()/1e3),u=parseInt(s);let d=c+u;a&&(d=parseInt(a));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=Ce(window.location.href);return!(!Ee()||!e.access_token&&!e.error_description)}async _isPKCEFlow(){const e=Ce(window.location.href),t=await je(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&&(!Ue(t)||404!==t.status&&401!==t.status&&403!==t.status))return{error:t}}return"others"!==e&&(await this._removeSession(),await Me(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 Ie(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,s;const{data:a,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!==(s=null===(o=a.session)||void 0===o?void 0:o.access_token)&&void 0!==s?s:void 0})}));if(r)throw r;return Ee()&&!(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&&Je(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),Ee()&&!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 je(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()"),!Ee()||!(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 Ie(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:s,error:a}=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 a?{data:null,error:a}:((null===(r=null==s?void 0:s.totp)||void 0===r?void 0:r.qr_code)&&(s.totp.qr_code=`data:image/svg+xml;utf-8,${s.totp.qr_code}`),{data:s,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:s}=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 s?{data:null,error:s}:(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:s})}))}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 s=null;o.aal&&(s=o.aal);let a=s;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&&(a="aal2"),{data:{currentLevel:s,nextLevel:a,currentAuthenticationMethods:o.amr||[]},error:null}}))))}}At.nextInstanceID=0;const _t=ut,wt=At;class xt extends wt{constructor(e){super(e)}}class kt{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 s=e.replace(/\/$/,"");this.realtimeUrl=`${s}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${s}/auth/v1`,this.storageUrl=`${s}/storage/v1`,this.functionsUrl=`${s}/functions/v1`;const a=`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:s,auth:a,realtime:l,global:c}=t;return{db:Object.assign(Object.assign({},s),n),auth:Object.assign(Object.assign({},a),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:a}),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=Ae(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},l.realtime)),this.rest=new m(`${s}/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 s(e){try{l(o.next(e))}catch(e){t(e)}}function a(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(s,a)}l((o=o.apply(n,r||[])).next())}))}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,storageKey:i,flowType:o,debug:s},a,l){var c;const u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new xt({url:this.authUrl,headers:Object.assign(Object.assign({},u),a),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,flowType:o,debug:s,fetch:l,hasCustomAuthorizationHeader:null!==(c="Authorization"in this.headers)&&void 0!==c&&c})}_initRealtimeClient(e){return new V(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 Et=(e,t,n)=>new kt(e,t,n)},8736:function(e){e.exports=function(){"use strict";const e=new Map,t={set(t,n,r){e.has(t)||e.set(t,new Map);const i=e.get(t);i.has(n)||0===i.size?i.set(n,r):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,n)=>e.has(t)&&e.get(t).get(n)||null,remove(t,n){if(!e.has(t))return;const r=e.get(t);r.delete(n),0===r.size&&e.delete(t)}},n="transitionend",r=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,((e,t)=>`#${CSS.escape(t)}`))),e),i=e=>{e.dispatchEvent(new Event(n))},o=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),s=e=>o(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(r(e)):null,a=e=>{if(!o(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},l=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),c=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?c(e.parentNode):null},u=()=>{},d=e=>{e.offsetHeight},h=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,g=e=>{var t;t=()=>{const t=h();if(t){const n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of f)e()})),f.push(t)):t()},m=(e,t=[],n=e)=>"function"==typeof e?e(...t):n,b=(e,t,r=!0)=>{if(!r)return void m(e);const o=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),i=Number.parseFloat(n);return r||i?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let s=!1;const a=({target:r})=>{r===t&&(s=!0,t.removeEventListener(n,a),m(e))};t.addEventListener(n,a),setTimeout((()=>{s||i(t)}),o)},y=(e,t,n,r)=>{const i=e.length;let o=e.indexOf(t);return-1===o?!n&&r?e[i-1]:e[0]:(o+=n?1:-1,r&&(o=(o+i)%i),e[Math.max(0,Math.min(o,i-1))])},v=/[^.]*(?=\..*)\.|.*/,A=/\..*/,_=/::\d+$/,w={};let x=1;const k={mouseenter:"mouseover",mouseleave:"mouseout"},E=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function S(e,t){return t&&`${t}::${x++}`||e.uidEvent||x++}function O(e){const t=S(e);return e.uidEvent=t,w[t]=w[t]||{},w[t]}function C(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function T(e,t,n){const r="string"==typeof t,i=r?n:t||n;let o=M(e);return E.has(o)||(o=e),[r,i,o]}function P(e,t,n,r,i){if("string"!=typeof t||!e)return;let[o,s,a]=T(t,n,r);if(t in k){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};s=e(s)}const l=O(e),c=l[a]||(l[a]={}),u=C(c,s,o?n:null);if(u)return void(u.oneOff=u.oneOff&&i);const d=S(s,t.replace(v,"")),h=o?function(e,t,n){return function r(i){const o=e.querySelectorAll(t);for(let{target:s}=i;s&&s!==this;s=s.parentNode)for(const a of o)if(a===s)return L(i,{delegateTarget:s}),r.oneOff&&D.off(e,i.type,t,n),n.apply(s,[i])}}(e,n,s):function(e,t){return function n(r){return L(r,{delegateTarget:e}),n.oneOff&&D.off(e,r.type,t),t.apply(e,[r])}}(e,s);h.delegationSelector=o?n:null,h.callable=s,h.oneOff=i,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function R(e,t,n,r,i){const o=C(t[n],r,i);o&&(e.removeEventListener(n,o,Boolean(i)),delete t[n][o.uidEvent])}function j(e,t,n,r){const i=t[n]||{};for(const[o,s]of Object.entries(i))o.includes(r)&&R(e,t,n,s.callable,s.delegationSelector)}function M(e){return e=e.replace(A,""),k[e]||e}const D={on(e,t,n,r){P(e,t,n,r,!1)},one(e,t,n,r){P(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[i,o,s]=T(t,n,r),a=s!==t,l=O(e),c=l[s]||{},u=t.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))j(e,l,n,t.slice(1));for(const[n,r]of Object.entries(c)){const i=n.replace(_,"");a&&!t.includes(i)||R(e,l,s,r.callable,r.delegationSelector)}}else{if(!Object.keys(c).length)return;R(e,l,s,o,i?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const r=h();let i=null,o=!0,s=!0,a=!1;t!==M(t)&&r&&(i=r.Event(t,n),r(e).trigger(i),o=!i.isPropagationStopped(),s=!i.isImmediatePropagationStopped(),a=i.isDefaultPrevented());const l=L(new Event(t,{bubbles:o,cancelable:!0}),n);return a&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&i&&i.preventDefault(),l}};function L(e,t={}){for(const[n,r]of Object.entries(t))try{e[n]=r}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>r})}return e}function N(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function I(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const F={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${I(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${I(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const r of n){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=N(e.dataset[r])}return t},getDataAttribute:(e,t)=>N(e.getAttribute(`data-bs-${I(t)}`))};class z{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=o(t)?F.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...o(t)?F.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,i]of Object.entries(t)){const t=e[r],s=o(t)?"element":null==(n=t)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(i).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${i}".`)}var n}}class B extends z{constructor(e,n){super(),(e=s(e))&&(this._element=e,this._config=this._getConfig(n),t.set(this._element,this.constructor.DATA_KEY,this))}dispose(){t.remove(this._element,this.constructor.DATA_KEY),D.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){b(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return t.get(s(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const $=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t?t.split(",").map((e=>r(e))).join(","):null},U={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(",");return this.find(t,e).filter((e=>!l(e)&&a(e)))},getSelectorFromElement(e){const t=$(e);return t&&U.findOne(t)?t:null},getElementFromSelector(e){const t=$(e);return t?U.findOne(t):null},getMultipleElementsFromSelector(e){const t=$(e);return t?U.find(t):[]}},W=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,r=e.NAME;D.on(document,n,`[data-bs-dismiss="${r}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),l(this))return;const i=U.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()}))},H=".bs.alert",V=`close${H}`,q=`closed${H}`;class K extends B{static get NAME(){return"alert"}close(){if(D.trigger(this._element,V).defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),D.trigger(this._element,q),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=K.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}W(K,"close"),g(K);const Q='[data-bs-toggle="button"]';class Y extends B{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=Y.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}D.on(document,"click.bs.button.data-api",Q,(e=>{e.preventDefault();const t=e.target.closest(Q);Y.getOrCreateInstance(t).toggle()})),g(Y);const G=".bs.swipe",J=`touchstart${G}`,X=`touchmove${G}`,Z=`touchend${G}`,ee=`pointerdown${G}`,te=`pointerup${G}`,ne={endCallback:null,leftCallback:null,rightCallback:null},re={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ie extends z{constructor(e,t){super(),this._element=e,e&&ie.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return ne}static get DefaultType(){return re}static get NAME(){return"swipe"}dispose(){D.off(this._element,G)}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),m(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&m(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(D.on(this._element,ee,(e=>this._start(e))),D.on(this._element,te,(e=>this._end(e))),this._element.classList.add("pointer-event")):(D.on(this._element,J,(e=>this._start(e))),D.on(this._element,X,(e=>this._move(e))),D.on(this._element,Z,(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const oe=".bs.carousel",se=".data-api",ae="next",le="prev",ce="left",ue="right",de=`slide${oe}`,he=`slid${oe}`,fe=`keydown${oe}`,pe=`mouseenter${oe}`,ge=`mouseleave${oe}`,me=`dragstart${oe}`,be=`load${oe}${se}`,ye=`click${oe}${se}`,ve="carousel",Ae="active",_e=".active",we=".carousel-item",xe=_e+we,ke={ArrowLeft:ue,ArrowRight:ce},Ee={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Se={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Oe extends B{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=U.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ve&&this.cycle()}static get Default(){return Ee}static get DefaultType(){return Se}static get NAME(){return"carousel"}next(){this._slide(ae)}nextWhenVisible(){!document.hidden&&a(this._element)&&this.next()}prev(){this._slide(le)}pause(){this._isSliding&&i(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?D.one(this._element,he,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void D.one(this._element,he,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const r=e>n?ae:le;this._slide(r,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&D.on(this._element,fe,(e=>this._keydown(e))),"hover"===this._config.pause&&(D.on(this._element,pe,(()=>this.pause())),D.on(this._element,ge,(()=>this._maybeEnableCycle()))),this._config.touch&&ie.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of U.find(".carousel-item img",this._element))D.on(e,me,(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(ce)),rightCallback:()=>this._slide(this._directionToOrder(ue)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new ie(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=ke[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=U.findOne(_e,this._indicatorsElement);t.classList.remove(Ae),t.removeAttribute("aria-current");const n=U.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(Ae),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),r=e===ae,i=t||y(this._getItems(),n,r,this._config.wrap);if(i===n)return;const o=this._getItemIndex(i),s=t=>D.trigger(this._element,t,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(s(de).defaultPrevented)return;if(!n||!i)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const l=r?"carousel-item-start":"carousel-item-end",c=r?"carousel-item-next":"carousel-item-prev";i.classList.add(c),d(i),n.classList.add(l),i.classList.add(l),this._queueCallback((()=>{i.classList.remove(l,c),i.classList.add(Ae),n.classList.remove(Ae,c,l),this._isSliding=!1,s(he)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return U.findOne(xe,this._element)}_getItems(){return U.find(we,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return p()?e===ce?le:ae:e===ce?ae:le}_orderToDirection(e){return p()?e===le?ce:ue:e===le?ue:ce}static jQueryInterface(e){return this.each((function(){const t=Oe.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}D.on(document,ye,"[data-bs-slide], [data-bs-slide-to]",(function(e){const t=U.getElementFromSelector(this);if(!t||!t.classList.contains(ve))return;e.preventDefault();const n=Oe.getOrCreateInstance(t),r=this.getAttribute("data-bs-slide-to");return r?(n.to(r),void n._maybeEnableCycle()):"next"===F.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),D.on(window,be,(()=>{const e=U.find('[data-bs-ride="carousel"]');for(const t of e)Oe.getOrCreateInstance(t)})),g(Oe);const Ce=".bs.collapse",Te=`show${Ce}`,Pe=`shown${Ce}`,Re=`hide${Ce}`,je=`hidden${Ce}`,Me=`click${Ce}.data-api`,De="show",Le="collapse",Ne="collapsing",Ie=`:scope .${Le} .${Le}`,Fe='[data-bs-toggle="collapse"]',ze={parent:null,toggle:!0},Be={parent:"(null|element)",toggle:"boolean"};class $e extends B{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=U.find(Fe);for(const e of n){const t=U.getSelectorFromElement(e),n=U.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ze}static get DefaultType(){return Be}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>$e.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(D.trigger(this._element,Te).defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(Le),this._element.classList.add(Ne),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ne),this._element.classList.add(Le,De),this._element.style[t]="",D.trigger(this._element,Pe)}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(D.trigger(this._element,Re).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,d(this._element),this._element.classList.add(Ne),this._element.classList.remove(Le,De);for(const e of this._triggerArray){const t=U.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(Ne),this._element.classList.add(Le),D.trigger(this._element,je)}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(De)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=s(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Fe);for(const t of e){const e=U.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=U.find(Ie,this._config.parent);return U.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=$e.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}D.on(document,Me,Fe,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();for(const e of U.getMultipleElementsFromSelector(this))$e.getOrCreateInstance(e,{toggle:!1}).toggle()})),g($e);var Ue="top",We="bottom",He="right",Ve="left",qe="auto",Ke=[Ue,We,He,Ve],Qe="start",Ye="end",Ge="clippingParents",Je="viewport",Xe="popper",Ze="reference",et=Ke.reduce((function(e,t){return e.concat([t+"-"+Qe,t+"-"+Ye])}),[]),tt=[].concat(Ke,[qe]).reduce((function(e,t){return e.concat([t,t+"-"+Qe,t+"-"+Ye])}),[]),nt="beforeRead",rt="read",it="afterRead",ot="beforeMain",st="main",at="afterMain",lt="beforeWrite",ct="write",ut="afterWrite",dt=[nt,rt,it,ot,st,at,lt,ct,ut];function ht(e){return e?(e.nodeName||"").toLowerCase():null}function ft(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pt(e){return e instanceof ft(e).Element||e instanceof Element}function gt(e){return e instanceof ft(e).HTMLElement||e instanceof HTMLElement}function mt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ft(e).ShadowRoot||e instanceof ShadowRoot)}const bt={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];gt(i)&&ht(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});gt(r)&&ht(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function yt(e){return e.split("-")[0]}var vt=Math.max,At=Math.min,_t=Math.round;function wt(){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 xt(){return!/^((?!chrome|android).)*safari/i.test(wt())}function kt(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&>(e)&&(i=e.offsetWidth>0&&_t(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&_t(r.height)/e.offsetHeight||1);var s=(pt(e)?ft(e):window).visualViewport,a=!xt()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.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 Et(e){var t=kt(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 St(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&mt(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ot(e){return ft(e).getComputedStyle(e)}function Ct(e){return["table","td","th"].indexOf(ht(e))>=0}function Tt(e){return((pt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Pt(e){return"html"===ht(e)?e:e.assignedSlot||e.parentNode||(mt(e)?e.host:null)||Tt(e)}function Rt(e){return gt(e)&&"fixed"!==Ot(e).position?e.offsetParent:null}function jt(e){for(var t=ft(e),n=Rt(e);n&&Ct(n)&&"static"===Ot(n).position;)n=Rt(n);return n&&("html"===ht(n)||"body"===ht(n)&&"static"===Ot(n).position)?t:n||function(e){var t=/firefox/i.test(wt());if(/Trident/i.test(wt())&>(e)&&"fixed"===Ot(e).position)return null;var n=Pt(e);for(mt(n)&&(n=n.host);gt(n)&&["html","body"].indexOf(ht(n))<0;){var r=Ot(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 Mt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Dt(e,t,n){return vt(e,At(t,n))}function Lt(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Nt(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}const It={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=yt(n.placement),l=Mt(a),c=[Ve,He].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return Lt("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Nt(e,Ke))}(i.padding,n),d=Et(o),h="y"===l?Ue:Ve,f="y"===l?We:He,p=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],g=s[l]-n.rects.reference[l],m=jt(o),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=p/2-g/2,v=u[h],A=b-d[c]-u[f],_=b/2-d[c]/2+y,w=Dt(v,_,A),x=l;n.modifiersData[r]=((t={})[x]=w,t.centerOffset=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)))&&St(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ft(e){return e.split("-")[1]}var zt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bt(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=s.x,f=void 0===h?0:h,p=s.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=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),v=Ve,A=Ue,_=window;if(c){var w=jt(n),x="clientHeight",k="clientWidth";w===ft(n)&&"static"!==Ot(w=Tt(n)).position&&"absolute"===a&&(x="scrollHeight",k="scrollWidth"),(i===Ue||(i===Ve||i===He)&&o===Ye)&&(A=We,g-=(d&&w===_&&_.visualViewport?_.visualViewport.height:w[x])-r.height,g*=l?1:-1),i!==Ve&&(i!==Ue&&i!==We||o!==Ye)||(v=He,f-=(d&&w===_&&_.visualViewport?_.visualViewport.width:w[k])-r.width,f*=l?1:-1)}var E,S=Object.assign({position:a},c&&zt),O=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:_t(n*i)/i||0,y:_t(r*i)/i||0}}({x:f,y:g},ft(n)):{x:f,y:g};return f=O.x,g=O.y,l?Object.assign({},S,((E={})[A]=y?"0":"",E[v]=b?"0":"",E.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",E)):Object.assign({},S,((t={})[A]=y?g+"px":"",t[v]=b?f+"px":"",t.transform="",t))}const $t={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,s=void 0===o||o,a=n.roundOffsets,l=void 0===a||a,c={placement:yt(t.placement),variation:Ft(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,Bt(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Bt(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 Ut={passive:!0};const Wt={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,s=r.resize,a=void 0===s||s,l=ft(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ut)})),a&&l.addEventListener("resize",n.update,Ut),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ut)})),a&&l.removeEventListener("resize",n.update,Ut)}},data:{}};var Ht={left:"right",right:"left",bottom:"top",top:"bottom"};function Vt(e){return e.replace(/left|right|bottom|top/g,(function(e){return Ht[e]}))}var qt={start:"end",end:"start"};function Kt(e){return e.replace(/start|end/g,(function(e){return qt[e]}))}function Qt(e){var t=ft(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Yt(e){return kt(Tt(e)).left+Qt(e).scrollLeft}function Gt(e){var t=Ot(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Jt(e){return["html","body","#document"].indexOf(ht(e))>=0?e.ownerDocument.body:gt(e)&&Gt(e)?e:Jt(Pt(e))}function Xt(e,t){var n;void 0===t&&(t=[]);var r=Jt(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=ft(r),s=i?[o].concat(o.visualViewport||[],Gt(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(Xt(Pt(s)))}function Zt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function en(e,t,n){return t===Je?Zt(function(e,t){var n=ft(e),r=Tt(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=xt();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+Yt(e),y:l}}(e,n)):pt(t)?function(e,t){var n=kt(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):Zt(function(e){var t,n=Tt(e),r=Qt(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=vt(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=vt(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+Yt(e),l=-r.scrollTop;return"rtl"===Ot(i||n).direction&&(a+=vt(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Tt(e)))}function tn(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?yt(i):null,s=i?Ft(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case Ue:t={x:a,y:n.y-r.height};break;case We:t={x:a,y:n.y+n.height};break;case He:t={x:n.x+n.width,y:l};break;case Ve:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?Mt(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case Qe:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Ye:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function nn(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?Ge:a,c=n.rootBoundary,u=void 0===c?Je:c,d=n.elementContext,h=void 0===d?Xe:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,b=Lt("number"!=typeof m?m:Nt(m,Ke)),y=h===Xe?Ze:Xe,v=e.rects.popper,A=e.elements[p?y:h],_=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=Xt(Pt(e)),n=["absolute","fixed"].indexOf(Ot(e).position)>=0&>(e)?jt(e):e;return pt(n)?t.filter((function(e){return pt(e)&&St(e,n)&&"body"!==ht(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=en(e,n,r);return t.top=vt(i.top,t.top),t.right=At(i.right,t.right),t.bottom=At(i.bottom,t.bottom),t.left=vt(i.left,t.left),t}),en(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(pt(A)?A:A.contextElement||Tt(e.elements.popper),l,u,s),w=kt(e.elements.reference),x=tn({reference:w,element:v,strategy:"absolute",placement:i}),k=Zt(Object.assign({},v,x)),E=h===Xe?k:w,S={top:_.top-E.top+b.top,bottom:E.bottom-_.bottom+b.bottom,left:_.left-E.left+b.left,right:E.right-_.right+b.right},O=e.modifiersData.offset;if(h===Xe&&O){var C=O[i];Object.keys(S).forEach((function(e){var t=[He,We].indexOf(e)>=0?1:-1,n=[Ue,We].indexOf(e)>=0?"y":"x";S[e]+=C[n]*t}))}return S}const rn={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,s=n.altAxis,a=void 0===s||s,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=yt(m),y=l||(b!==m&&p?function(e){if(yt(e)===qe)return[];var t=Vt(e);return[Kt(e),t,Kt(t)]}(m):[Vt(m)]),v=[m].concat(y).reduce((function(e,n){return e.concat(yt(n)===qe?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?tt:l,u=Ft(r),d=u?a?et:et.filter((function(e){return Ft(e)===u})):Ke,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]=nn(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[yt(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)}),[]),A=t.rects.reference,_=t.rects.popper,w=new Map,x=!0,k=v[0],E=0;E=0,P=T?"width":"height",R=nn(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),j=T?C?He:Ve:C?We:Ue;A[P]>_[P]&&(j=Vt(j));var M=Vt(j),D=[];if(o&&D.push(R[O]<=0),a&&D.push(R[j]<=0,R[M]<=0),D.every((function(e){return e}))){k=S,x=!1;break}w.set(S,D)}if(x)for(var L=function(e){var t=v.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},N=p?3:1;N>0&&"break"!==L(N);N--);t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function on(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 sn(e){return[Ue,He,We,Ve].some((function(t){return e[t]>=0}))}const an={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=nn(t,{elementContext:"reference"}),a=nn(t,{altBoundary:!0}),l=on(s,r),c=on(a,i,o),u=sn(l),d=sn(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},ln={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,s=tt.reduce((function(e,n){return e[n]=function(e,t,n){var r=yt(e),i=[Ve,Ue].indexOf(r)>=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[Ve,He].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}},cn={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=tn({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},un={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,s=n.altAxis,a=void 0!==s&&s,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=nn(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=yt(t.placement),y=Ft(t.placement),v=!y,A=Mt(b),_="x"===A?"y":"x",w=t.modifiersData.popperOffsets,x=t.rects.reference,k=t.rects.popper,E="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,S="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(w){if(o){var T,P="y"===A?Ue:Ve,R="y"===A?We:He,j="y"===A?"height":"width",M=w[A],D=M+m[P],L=M-m[R],N=f?-k[j]/2:0,I=y===Qe?x[j]:k[j],F=y===Qe?-k[j]:-x[j],z=t.elements.arrow,B=f&&z?Et(z):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},U=$[P],W=$[R],H=Dt(0,x[j],B[j]),V=v?x[j]/2-N-H-U-S.mainAxis:I-H-U-S.mainAxis,q=v?-x[j]/2+N+H+W+S.mainAxis:F+H+W+S.mainAxis,K=t.elements.arrow&&jt(t.elements.arrow),Q=K?"y"===A?K.clientTop||0:K.clientLeft||0:0,Y=null!=(T=null==O?void 0:O[A])?T:0,G=M+q-Y,J=Dt(f?At(D,M+V-Y-Q):D,M,f?vt(L,G):L);w[A]=J,C[A]=J-M}if(a){var X,Z="x"===A?Ue:Ve,ee="x"===A?We:He,te=w[_],ne="y"===_?"height":"width",re=te+m[Z],ie=te-m[ee],oe=-1!==[Ue,Ve].indexOf(b),se=null!=(X=null==O?void 0:O[_])?X:0,ae=oe?re:te-x[ne]-k[ne]-se+S.altAxis,le=oe?te+x[ne]+k[ne]-se-S.altAxis:ie,ce=f&&oe?function(e,t,n){var r=Dt(e,t,n);return r>n?n:r}(ae,te,le):Dt(f?ae:re,te,f?le:ie);w[_]=ce,C[_]=ce-te}t.modifiersData[r]=C}},requiresIfExists:["offset"]};function dn(e,t,n){void 0===n&&(n=!1);var r,i,o=gt(t),s=gt(t)&&function(e){var t=e.getBoundingClientRect(),n=_t(t.width)/e.offsetWidth||1,r=_t(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=Tt(t),l=kt(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==ht(t)||Gt(a))&&(c=(r=t)!==ft(r)&>(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:Qt(r)),gt(t)?((u=kt(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=Yt(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function hn(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 fn={placement:"bottom",modifiers:[],strategy:"absolute"};function pn(){for(var e=arguments.length,t=new Array(e),n=0;nNumber.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(F.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...m(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const n=U.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>a(e)));n.length&&y(n,t,e===kn,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Hn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=U.find(Dn);for(const n of t){const t=Hn.getInstance(n);if(!t||!1===t._config.autoClose)continue;const r=e.composedPath(),i=r.includes(t._menu);if(r.includes(t._element)||"inside"===t._config.autoClose&&!i||"outside"===t._config.autoClose&&i)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,r=[xn,kn].includes(e.key);if(!r&&!n)return;if(t&&!n)return;e.preventDefault();const i=this.matches(Mn)?this:U.prev(this,Mn)[0]||U.next(this,Mn)[0]||U.findOne(Mn,e.delegateTarget.parentNode),o=Hn.getOrCreateInstance(i);if(r)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),i.focus())}}D.on(document,Pn,Mn,Hn.dataApiKeydownHandler),D.on(document,Pn,Ln,Hn.dataApiKeydownHandler),D.on(document,Tn,Hn.clearMenus),D.on(document,Rn,Hn.clearMenus),D.on(document,Tn,Mn,(function(e){e.preventDefault(),Hn.getOrCreateInstance(this).toggle()})),g(Hn);const Vn="backdrop",qn="show",Kn=`mousedown.bs.${Vn}`,Qn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Yn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Gn extends z{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Qn}static get DefaultType(){return Yn}static get NAME(){return Vn}show(e){if(!this._config.isVisible)return void m(e);this._append();const t=this._getElement();this._config.isAnimated&&d(t),t.classList.add(qn),this._emulateAnimation((()=>{m(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(qn),this._emulateAnimation((()=>{this.dispose(),m(e)}))):m(e)}dispose(){this._isAppended&&(D.off(this._element,Kn),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=s(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),D.on(e,Kn,(()=>{m(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){b(e,this._getElement(),this._config.isAnimated)}}const Jn=".bs.focustrap",Xn=`focusin${Jn}`,Zn=`keydown.tab${Jn}`,er="backward",tr={autofocus:!0,trapElement:null},nr={autofocus:"boolean",trapElement:"element"};class rr extends z{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return tr}static get DefaultType(){return nr}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),D.off(document,Jn),D.on(document,Xn,(e=>this._handleFocusin(e))),D.on(document,Zn,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,D.off(document,Jn))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=U.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===er?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?er:"forward")}}const ir=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",or=".sticky-top",sr="padding-right",ar="margin-right";class lr{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,sr,(t=>t+e)),this._setElementAttributes(ir,sr,(t=>t+e)),this._setElementAttributes(or,ar,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,sr),this._resetElementAttributes(ir,sr),this._resetElementAttributes(or,ar)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const r=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+r)return;this._saveInitialAttribute(e,t);const i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(i))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&F.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=F.getDataAttribute(e,t);null!==n?(F.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(o(e))t(e);else for(const n of U.find(e,this._element))t(n)}}const cr=".bs.modal",ur=`hide${cr}`,dr=`hidePrevented${cr}`,hr=`hidden${cr}`,fr=`show${cr}`,pr=`shown${cr}`,gr=`resize${cr}`,mr=`click.dismiss${cr}`,br=`mousedown.dismiss${cr}`,yr=`keydown.dismiss${cr}`,vr=`click${cr}.data-api`,Ar="modal-open",_r="show",wr="modal-static",xr={backdrop:!0,focus:!0,keyboard:!0},kr={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Er extends B{constructor(e,t){super(e,t),this._dialog=U.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new lr,this._addEventListeners()}static get Default(){return xr}static get DefaultType(){return kr}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||D.trigger(this._element,fr,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Ar),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){this._isShown&&!this._isTransitioning&&(D.trigger(this._element,ur).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(_r),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){D.off(window,cr),D.off(this._dialog,cr),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Gn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new rr({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const t=U.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),d(this._element),this._element.classList.add(_r),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,D.trigger(this._element,pr,{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){D.on(this._element,yr,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())})),D.on(window,gr,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),D.on(this._element,br,(e=>{D.one(this._element,mr,(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Ar),this._resetAdjustments(),this._scrollBar.reset(),D.trigger(this._element,hr)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(D.trigger(this._element,dr).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(wr)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(wr),this._queueCallback((()=>{this._element.classList.remove(wr),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=p()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=p()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=Er.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}D.on(document,vr,'[data-bs-toggle="modal"]',(function(e){const t=U.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),D.one(t,fr,(e=>{e.defaultPrevented||D.one(t,hr,(()=>{a(this)&&this.focus()}))}));const n=U.findOne(".modal.show");n&&Er.getInstance(n).hide(),Er.getOrCreateInstance(t).toggle(this)})),W(Er),g(Er);const Sr=".bs.offcanvas",Or=".data-api",Cr=`load${Sr}${Or}`,Tr="show",Pr="showing",Rr="hiding",jr=".offcanvas.show",Mr=`show${Sr}`,Dr=`shown${Sr}`,Lr=`hide${Sr}`,Nr=`hidePrevented${Sr}`,Ir=`hidden${Sr}`,Fr=`resize${Sr}`,zr=`click${Sr}${Or}`,Br=`keydown.dismiss${Sr}`,$r={backdrop:!0,keyboard:!0,scroll:!1},Ur={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Wr extends B{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return $r}static get DefaultType(){return Ur}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||D.trigger(this._element,Mr,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new lr).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Pr),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Tr),this._element.classList.remove(Pr),D.trigger(this._element,Dr,{relatedTarget:e})}),this._element,!0))}hide(){this._isShown&&(D.trigger(this._element,Lr).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Rr),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(Tr,Rr),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new lr).reset(),D.trigger(this._element,Ir)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new Gn({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():D.trigger(this._element,Nr)}:null})}_initializeFocusTrap(){return new rr({trapElement:this._element})}_addEventListeners(){D.on(this._element,Br,(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():D.trigger(this._element,Nr))}))}static jQueryInterface(e){return this.each((function(){const t=Wr.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}D.on(document,zr,'[data-bs-toggle="offcanvas"]',(function(e){const t=U.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),l(this))return;D.one(t,Ir,(()=>{a(this)&&this.focus()}));const n=U.findOne(jr);n&&n!==t&&Wr.getInstance(n).hide(),Wr.getOrCreateInstance(t).toggle(this)})),D.on(window,Cr,(()=>{for(const e of U.find(jr))Wr.getOrCreateInstance(e).show()})),D.on(window,Fr,(()=>{for(const e of U.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&Wr.getOrCreateInstance(e).hide()})),W(Wr),g(Wr);const Hr={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Vr=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),qr=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Kr=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!Vr.has(n)||Boolean(qr.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))},Qr={allowList:Hr,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Yr={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Gr={entry:"(string|element|function|null)",selector:"(string|element)"};class Jr extends z{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Qr}static get DefaultType(){return Yr}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},Gr)}_setContent(e,t,n){const r=U.findOne(n,e);r&&((t=this._resolvePossibleFunction(t))?o(t)?this._putElementInTemplate(s(t),r):this._config.html?r.innerHTML=this._maybeSanitize(t):r.textContent=t:r.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const r=(new window.DOMParser).parseFromString(e,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const e of i){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const r=[].concat(...e.attributes),i=[].concat(t["*"]||[],t[n]||[]);for(const t of r)Kr(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return m(e,[this])}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const Xr=new Set(["sanitize","allowList","sanitizeFn"]),Zr="fade",ei="show",ti=".modal",ni="hide.bs.modal",ri="hover",ii="focus",oi={AUTO:"auto",TOP:"top",RIGHT:p()?"left":"right",BOTTOM:"bottom",LEFT:p()?"right":"left"},si={allowList:Hr,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},ai={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class li extends B{constructor(e,t){if(void 0===vn)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return si}static get DefaultType(){return ai}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),D.off(this._element.closest(ti),ni,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=D.trigger(this._element,this.constructor.eventName("show")),t=(c(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),D.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(ei),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))D.on(e,"mouseover",u);this._queueCallback((()=>{D.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!D.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ei),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))D.off(e,"mouseover",u);this._activeTrigger.click=!1,this._activeTrigger[ii]=!1,this._activeTrigger[ri]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),D.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Zr,ei),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Zr),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Jr({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Zr)}_isShown(){return this.tip&&this.tip.classList.contains(ei)}_createPopper(e){const t=m(this._config.placement,[this,e,this._element]),n=oi[t.toUpperCase()];return yn(this._element,e,this._getPopperConfig(n))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return m(e,[this._element])}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,...m(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)D.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===ri?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===ri?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");D.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?ii:ri]=!0,t._enter()})),D.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?ii:ri]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},D.on(this._element.closest(ti),ni,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=F.getDataAttributes(this._element);for(const e of Object.keys(t))Xr.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:s(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=li.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}g(li);const ci={...li.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},ui={...li.DefaultType,content:"(null|string|element|function)"};class di extends li{static get Default(){return ci}static get DefaultType(){return ui}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=di.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}g(di);const hi=".bs.scrollspy",fi=`activate${hi}`,pi=`click${hi}`,gi=`load${hi}.data-api`,mi="active",bi="[href]",yi=".nav-link",vi=`${yi}, .nav-item > ${yi}, .list-group-item`,Ai={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},_i={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class wi extends B{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ai}static get DefaultType(){return _i}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=s(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(D.off(this._config.target,pi),D.on(this._config.target,pi,bi,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,r=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:r,behavior:"smooth"});n.scrollTop=r}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(n(o),!r)return}else i||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=U.find(bi,this._config.target);for(const t of e){if(!t.hash||l(t))continue;const e=U.findOne(decodeURI(t.hash),this._element);a(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(mi),this._activateParents(e),D.trigger(this._element,fi,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))U.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(mi);else for(const t of U.parents(e,".nav, .list-group"))for(const e of U.prev(t,vi))e.classList.add(mi)}_clearActiveClass(e){e.classList.remove(mi);const t=U.find(`${bi}.${mi}`,e);for(const e of t)e.classList.remove(mi)}static jQueryInterface(e){return this.each((function(){const t=wi.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}D.on(window,gi,(()=>{for(const e of U.find('[data-bs-spy="scroll"]'))wi.getOrCreateInstance(e)})),g(wi);const xi=".bs.tab",ki=`hide${xi}`,Ei=`hidden${xi}`,Si=`show${xi}`,Oi=`shown${xi}`,Ci=`click${xi}`,Ti=`keydown${xi}`,Pi=`load${xi}`,Ri="ArrowLeft",ji="ArrowRight",Mi="ArrowUp",Di="ArrowDown",Li="Home",Ni="End",Ii="active",Fi="fade",zi="show",Bi=".dropdown-toggle",$i=`:not(${Bi})`,Ui='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Wi=`.nav-link${$i}, .list-group-item${$i}, [role="tab"]${$i}, ${Ui}`,Hi=`.${Ii}[data-bs-toggle="tab"], .${Ii}[data-bs-toggle="pill"], .${Ii}[data-bs-toggle="list"]`;class Vi extends B{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),D.on(this._element,Ti,(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?D.trigger(t,ki,{relatedTarget:e}):null;D.trigger(e,Si,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(Ii),this._activate(U.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),D.trigger(e,Oi,{relatedTarget:t})):e.classList.add(zi)}),e,e.classList.contains(Fi)))}_deactivate(e,t){e&&(e.classList.remove(Ii),e.blur(),this._deactivate(U.getElementFromSelector(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),D.trigger(e,Ei,{relatedTarget:t})):e.classList.remove(zi)}),e,e.classList.contains(Fi)))}_keydown(e){if(![Ri,ji,Mi,Di,Li,Ni].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=this._getChildren().filter((e=>!l(e)));let n;if([Li,Ni].includes(e.key))n=t[e.key===Li?0:t.length-1];else{const r=[ji,Di].includes(e.key);n=y(t,e.target,r,!0)}n&&(n.focus({preventScroll:!0}),Vi.getOrCreateInstance(n).show())}_getChildren(){return U.find(Wi,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=U.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const r=(e,r)=>{const i=U.findOne(e,n);i&&i.classList.toggle(r,t)};r(Bi,Ii),r(".dropdown-menu",zi),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(Ii)}_getInnerElement(e){return e.matches(Wi)?e:U.findOne(Wi,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Vi.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}D.on(document,Ci,Ui,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),l(this)||Vi.getOrCreateInstance(this).show()})),D.on(window,Pi,(()=>{for(const e of U.find(Hi))Vi.getOrCreateInstance(e)})),g(Vi);const qi=".bs.toast",Ki=`mouseover${qi}`,Qi=`mouseout${qi}`,Yi=`focusin${qi}`,Gi=`focusout${qi}`,Ji=`hide${qi}`,Xi=`hidden${qi}`,Zi=`show${qi}`,eo=`shown${qi}`,to="hide",no="show",ro="showing",io={animation:"boolean",autohide:"boolean",delay:"number"},oo={animation:!0,autohide:!0,delay:5e3};class so extends B{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return oo}static get DefaultType(){return io}static get NAME(){return"toast"}show(){D.trigger(this._element,Zi).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(to),d(this._element),this._element.classList.add(no,ro),this._queueCallback((()=>{this._element.classList.remove(ro),D.trigger(this._element,eo),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(D.trigger(this._element,Ji).defaultPrevented||(this._element.classList.add(ro),this._queueCallback((()=>{this._element.classList.add(to),this._element.classList.remove(ro,no),D.trigger(this._element,Xi)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(no),super.dispose()}isShown(){return this._element.classList.contains(no)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){D.on(this._element,Ki,(e=>this._onInteraction(e,!0))),D.on(this._element,Qi,(e=>this._onInteraction(e,!1))),D.on(this._element,Yi,(e=>this._onInteraction(e,!0))),D.on(this._element,Gi,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=so.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return W(so),g(so),{Alert:K,Button:Y,Carousel:Oe,Collapse:$e,Dropdown:Hn,Modal:Er,Offcanvas:Wr,Popover:di,ScrollSpy:wi,Tab:Vi,Toast:so,Tooltip:li}}()},8394:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var r=n(7828),i=!1,o=!1;try{var s={get passive(){return i=!0},get once(){return o=i=!0}};r.A&&(window.addEventListener("test",s,s),window.removeEventListener("test",s,!0))}catch(e){}const a=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!o){var s=r.once,a=r.capture,l=n;!o&&s&&(l=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=l),e.addEventListener(t,l,i?r:a)}e.addEventListener(t,n,r)}},7828:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=!("undefined"==typeof window||!window.document||!window.document.createElement)},6406:(e,t,n)=>{"use strict";function r(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}n.d(t,{A:()=>r})},9763:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(8394);const i=function(e,t,n,i){return(0,r.Ay)(e,t,n,i),function(){!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)}(e,t,n,i)}}},1625:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},5003:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=Function.prototype.bind.call(Function.prototype.call,[].slice);function i(e,t){return r(e.querySelectorAll(t))}},124:e=>{"use strict";var t,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s={};((e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})})(s,{Immer:()=>Y,applyPatches:()=>se,castDraft:()=>ce,castImmutable:()=>ue,createDraft:()=>ae,current:()=>J,enableMapSet:()=>ee,enablePatches:()=>Z,finishDraft:()=>le,freeze:()=>S,immerable:()=>l,isDraft:()=>h,isDraftable:()=>f,nothing:()=>a,original:()=>m,produce:()=>ne,produceWithPatches:()=>re,setAutoFreeze:()=>ie,setUseStrictShallowCopy:()=>oe}),e.exports=(t=s,((e,t,s,a)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))!o.call(e,s)&&undefined!==s&&n(e,s,{get:()=>t[s],enumerable:!(a=r(t,s))||a.enumerable});return e})(n({},"__esModule",{value:!0}),t));var a=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]||w(e)||x(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:w(e)?2:x(e)?3:0}function v(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function A(e,t){return 2===y(e)?e.get(t):e[t]}function _(e,t,n){let r=y(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function w(e){return e instanceof Map}function x(e){return e instanceof Set}function k(e){return e.e||e.t}function E(e,t){if(w(e))return new Map(e);if(x(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=O),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>S(t,!0)))),e}function O(){u(2)}function C(e){return Object.isFrozen(e)}var T,P={};function R(e){let t=P[e];return t||u(0),t}function j(e,t){P[e]||(P[e]=t)}function M(){return T}function D(e,t){t&&(R("Patches"),e.f=[],e.h=[],e.b=t)}function L(e){N(e),e.a.forEach(F),e.a=null}function N(e){e===T&&(T=e.i)}function I(e){return T=function(e,t){return{a:[],i:e,p:t,P:!0,d:0}}(T,e)}function F(e){let t=e[c];0===t.o||1===t.o?t.x():t.m=!0}function z(e,t){t.d=t.a.length;let n=t.a[0];return void 0!==e&&e!==n?(n[c].s&&(L(t),u(4)),f(e)&&(e=B(t,e),t.i||U(t,e)),t.f&&R("Patches").T(n[c].t,e,t.f,t.h)):e=B(t,n,[]),L(t),t.f&&t.b(t.f,t.h),e!==a?e:void 0}function B(e,t,n){if(C(t))return t;let r=t[c];if(!r)return b(t,((i,o)=>$(e,r,t,i,o,n))),t;if(r.n!==e)return t;if(!r.s)return U(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,s)=>$(e,r,t,i,s,n,o))),U(e,t,!1),n&&e.f&&R("Patches").g(r,n,e.f,e.h)}return r.e}function $(e,t,n,r,i,o,s){if(h(i)){let s=B(e,i,o&&t&&3!==t.o&&!v(t.r,r)?o.concat(r):void 0);if(_(n,r,s),!h(s))return;e.P=!1}else s&&n.add(i);if(f(i)&&!C(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)&&U(e,i)}}function U(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=k(e);if(!v(n,t))return function(e,t,n){let r=q(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===V(e.t,t)?(Q(e),e.e[t]=G(r,e)):r},has:(e,t)=>t in k(e),ownKeys:e=>Reflect.ownKeys(k(e)),set(e,t,n){let r=q(k(e),t);if(r?.set)return r.set.call(e.u,n),!0;if(!e.s){let r=V(k(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;Q(e),K(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!==V(e.t,t)||t in e.t?(e.r[t]=!1,Q(e),K(e)):delete e.r[t],e.e&&delete e.e[t],!0),getOwnPropertyDescriptor(e,t){let n=k(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)}},H={};function V(e,t){let n=e[c];return(n?k(n):e)[t]}function q(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 K(e){e.s||(e.s=!0,e.i&&K(e.i))}function Q(e){e.e||(e.e=E(e.t,e.n.p.S))}b(W,((e,t)=>{H[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),H.deleteProperty=function(e,t){return H.set.call(this,e,t,void 0)},H.set=function(e,t,n){return W.set.call(this,e[0],t,n,e[0])};var Y=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=I(this),o=G(e,void 0),s=!0;try{r=t(o),s=!1}finally{s?L(i):N(i)}return D(i,n),z(r,i)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===a&&(r=void 0),this.y&&S(r,!0),n){let t=[],i=[];R("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=J(e));let t=I(this),n=G(e,void 0);return n[c].l=!0,N(t),n}finishDraft(e,t){let n=e&&e[c];(!n||!n.l)&&u(9);let{n:r}=n;return D(r,t),z(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=R("Patches").A;return h(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function G(e,t){let n=w(e)?R("MapSet").I(e,t):x(e)?R("MapSet").D(e,t):function(e,t){let n=Array.isArray(e),r={o:n?1:0,n:t?t.n:M(),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=H);let{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.u=a,r.x=s,a}(e,t);return(t?t.n:M()).a.push(n),n}function J(e){return h(e)||u(10),X(e)}function X(e){if(!f(e)||C(e))return e;let t,n=e[c];if(n){if(!n.s)return n.t;n.c=!0,t=E(e,n.n.p.S)}else t=E(e,!0);return b(t,((e,n)=>{_(t,e,X(n))})),n&&(n.c=!1),t}function Z(){let e="replace",t="add",n="remove";function r(e){if(!f(e))return e;if(Array.isArray(e))return e.map(r);if(w(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,r(t)])));if(x(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}j("Patches",{A:function(i,o){return o.forEach((o=>{let{path:s,op:a}=o,l=i;for(let e=0;e{let d=A(l,r),h=A(c,r),f=u?v(l,r)?e:t:n;if(d===h&&f===e)return;let p=o.concat(r);s.push(f===n?{op:f,path:p}:{op:f,path:p,value:h}),a.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,s,a);case 1:return function(r,o,s,a){let{t:l,r:c}=r,u=r.e;u.length{if(!a.has(e)){let s=r.concat([l]);i.push({op:n,path:s,value:e}),o.unshift({op:t,path:s,value:e})}l++})),l=0,a.forEach((e=>{if(!s.has(e)){let s=r.concat([l]);i.push({op:t,path:s,value:e}),o.unshift({op:n,path:s,value:e})}l++}))}(r,o,s,a)}},T:function(t,n,r,i){r.push({op:e,path:[],value:n===a?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:M(),s:!1,c:!1,e:void 0,r:void 0,t:e,u:this,l:!1,m:!1}}get size(){return k(this[c]).size}has(e){return k(this[c]).has(e)}set(e,n){let r=this[c];return i(r),(!k(r).has(e)||k(r).get(e)!==n)&&(t(r),K(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),K(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),k(e).size&&(t(e),K(e),e.r=new Map,b(e.t,(t=>{e.r.set(t,!1)})),e.e.clear())}forEach(e,t){k(this[c]).forEach(((n,r,i)=>{e.call(t,this.get(r),r,this)}))}get(e){let n=this[c];i(n);let r=k(n).get(e);if(n.c||!f(r)||r!==n.t.get(e))return r;let o=G(r,n);return t(n),n.e.set(e,o),o}keys(){return k(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:M(),s:!1,c:!1,e:void 0,t:e,u:this,a:new Map,m:!1,l:!1}}get size(){return k(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),K(t),t.e.add(e)),this}delete(e){if(!this.has(e))return!1;let t=this[c];return i(t),r(t),K(t),t.e.delete(e)||!!t.a.has(e)&&t.e.delete(t.a.get(e))}clear(){let e=this[c];i(e),k(e).size&&(r(e),K(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=G(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(k(e)))}j("MapSet",{I:function(t,n){return new e(t,n)},D:function(e,t){return new n(e,t)}})}var te=new Y,ne=te.produce,re=te.produceWithPatches.bind(te),ie=te.setAutoFreeze.bind(te),oe=te.setUseStrictShallowCopy.bind(te),se=te.applyPatches.bind(te),ae=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,s,a){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,s,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},6425:(e,t,n)=>{"use strict";n.r(t)},1728:(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,s){var a=i||"<>",l=s||r;if(null==n[r])return t?new Error("Required "+o+" `"+l+"` was not specified in `"+a+"`."):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,s){if(s!==r){var a=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 a.name="Invariant Violation",a}}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"},3048:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(6942),i=n.n(r),o=n(6540),s=n(6519),a=n(4848);const l=o.forwardRef((({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...o},l)=>{const c=(0,s.oU)(e,"container"),u="string"==typeof t?`-${t}`:"-fluid";return(0,a.jsx)(n,{ref:l,...o,className:i()(r,t?`${c}${u}`:c)})}));l.displayName="Container";const c=l},9018:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var r=n(6942),i=n.n(r),o=(n(2816),n(6540)),s=n(6266),a=n(5003),l=n(8342),c=n(3804),u=n(9409),d=n(1406),h=n(7395),f=n(5182),p=n(2671),g=n(4848);const m=["as","onSelect","activeKey","role","onKeyDown"],b=()=>{},y=(0,f.sE)("event-key"),v=o.forwardRef(((e,t)=>{let{as:n="div",onSelect:r,activeKey:i,role:s,onKeyDown:p}=e,v=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,m);const A=(0,l.A)(),_=(0,o.useRef)(!1),w=(0,o.useContext)(d.A),x=(0,o.useContext)(h.A);let k,E;x&&(s=s||"tablist",i=x.activeKey,k=x.getControlledId,E=x.getControllerId);const S=(0,o.useRef)(null),O=e=>{const t=S.current;if(!t)return null;const n=(0,a.A)(t,`[${y}]: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]},C=(e,t)=>{null!=e&&(null==r||r(e,t),null==w||w(e,t))};(0,o.useEffect)((()=>{if(S.current&&_.current){const e=S.current.querySelector(`[${y}][aria-selected=true]`);null==e||e.focus()}_.current=!1}));const T=(0,c.A)(t,S);return(0,g.jsx)(d.A.Provider,{value:C,children:(0,g.jsx)(u.A.Provider,{value:{role:s,activeKey:(0,d.u)(i),getControlledId:k||b,getControllerId:E||b},children:(0,g.jsx)(n,Object.assign({},v,{onKeyDown:e=>{if(null==p||p(e),!x)return;let t;switch(e.key){case"ArrowLeft":case"ArrowUp":t=O(-1);break;case"ArrowRight":case"ArrowDown":t=O(1);break;default:return}t&&(e.preventDefault(),C(t.dataset[(0,f.y)("EventKey")]||null,e),_.current=!0,A())},ref:T,role:s}))})})}));v.displayName="Nav";const A=Object.assign(v,{Item:p.A});var _=n(6519),w=n(4778);const x=o.createContext(null);x.displayName="CardHeaderContext";const k=x,E=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=(0,_.oU)(t,"nav-item"),(0,g.jsx)(n,{ref:o,className:i()(e,t),...r}))));E.displayName="NavItem";const S=E;var O=n(3558);const C=o.forwardRef(((e,t)=>{const{as:n="div",bsPrefix:r,variant:a,fill:l=!1,justify:c=!1,navbar:u,navbarScroll:d,className:h,activeKey:f,...p}=(0,s.Zw)(e,{activeKey:"onSelect"}),m=(0,_.oU)(r,"nav");let b,y,v=!1;const x=(0,o.useContext)(w.A),E=(0,o.useContext)(k);return x?(b=x.bsPrefix,v=null==u||u):E&&({cardHeaderBsPrefix:y}=E),(0,g.jsx)(A,{as:n,ref:t,activeKey:f,className:i()(h,{[m]:!v,[`${b}-nav`]:v,[`${b}-nav-scroll`]:v&&d,[`${y}-${a}`]:!!y,[`${m}-${a}`]:!!a,[`${m}-fill`]:l,[`${m}-justified`]:c}),...p})}));C.displayName="Nav";const T=Object.assign(C,{Item:S,Link:O.A})},9949:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Qt});var r=n(6942),i=n.n(r),o=n(6540),s=n(6519),a=n(5003),l=n(8394);var c=n(4103),u=n(8342),d=n(7876),h=n(7895);const f=o.createContext(null);var p=n(1244),g=Object.prototype.hasOwnProperty;function m(e,t,n){for(n of e.keys())if(b(n,t))return n}function b(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--&&b(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=m(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=m(t,i)))return!1;if(!b(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(g.call(e,n)&&++r&&!g.call(t,n))return!1;if(!(n in t)||!b(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}var y=n(8880);function v(e){return e.split("-")[0]}function A(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _(e){return e instanceof A(e).Element||e instanceof Element}function w(e){return e instanceof A(e).HTMLElement||e instanceof HTMLElement}function x(e){return"undefined"!=typeof ShadowRoot&&(e instanceof A(e).ShadowRoot||e instanceof ShadowRoot)}var k=Math.max,E=Math.min,S=Math.round;function O(){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 C(){return!/^((?!chrome|android).)*safari/i.test(O())}function T(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&w(e)&&(i=e.offsetWidth>0&&S(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&S(r.height)/e.offsetHeight||1);var s=(_(e)?A(e):window).visualViewport,a=!C()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/i,c=(r.top+(a&&s?s.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 P(e){var t=T(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 R(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&x(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function j(e){return e?(e.nodeName||"").toLowerCase():null}function M(e){return A(e).getComputedStyle(e)}function D(e){return["table","td","th"].indexOf(j(e))>=0}function L(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function N(e){return"html"===j(e)?e:e.assignedSlot||e.parentNode||(x(e)?e.host:null)||L(e)}function I(e){return w(e)&&"fixed"!==M(e).position?e.offsetParent:null}function F(e){for(var t=A(e),n=I(e);n&&D(n)&&"static"===M(n).position;)n=I(n);return n&&("html"===j(n)||"body"===j(n)&&"static"===M(n).position)?t:n||function(e){var t=/firefox/i.test(O());if(/Trident/i.test(O())&&w(e)&&"fixed"===M(e).position)return null;var n=N(e);for(x(n)&&(n=n.host);w(n)&&["html","body"].indexOf(j(n))<0;){var r=M(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 z(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function B(e,t,n){return k(e,E(t,n))}function $(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function U(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var W="top",H="bottom",V="right",q="left",K="auto",Q=[W,H,V,q],Y="start",G="end",J="viewport",X="popper",Z=Q.reduce((function(e,t){return e.concat([t+"-"+Y,t+"-"+G])}),[]),ee=[].concat(Q,[K]).reduce((function(e,t){return e.concat([t,t+"-"+Y,t+"-"+G])}),[]),te=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ne(e){return e.split("-")[1]}var re={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ie(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=s.x,f=void 0===h?0:h,p=s.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=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),v=q,_=W,w=window;if(c){var x=F(n),k="clientHeight",E="clientWidth";x===A(n)&&"static"!==M(x=L(n)).position&&"absolute"===a&&(k="scrollHeight",E="scrollWidth"),(i===W||(i===q||i===V)&&o===G)&&(_=H,g-=(d&&x===w&&w.visualViewport?w.visualViewport.height:x[k])-r.height,g*=l?1:-1),i!==q&&(i!==W&&i!==H||o!==G)||(v=V,f-=(d&&x===w&&w.visualViewport?w.visualViewport.width:x[E])-r.width,f*=l?1:-1)}var O,C=Object.assign({position:a},c&&re),T=!0===u?function(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:S(n*i)/i||0,y:S(r*i)/i||0}}({x:f,y:g},A(n)):{x:f,y:g};return f=T.x,g=T.y,l?Object.assign({},C,((O={})[_]=y?"0":"",O[v]=b?"0":"",O.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",O)):Object.assign({},C,((t={})[_]=y?g+"px":"",t[v]=b?f+"px":"",t.transform="",t))}var oe={passive:!0},se={left:"right",right:"left",bottom:"top",top:"bottom"};function ae(e){return e.replace(/left|right|bottom|top/g,(function(e){return se[e]}))}var le={start:"end",end:"start"};function ce(e){return e.replace(/start|end/g,(function(e){return le[e]}))}function ue(e){var t=A(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function de(e){return T(L(e)).left+ue(e).scrollLeft}function he(e){var t=M(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function fe(e){return["html","body","#document"].indexOf(j(e))>=0?e.ownerDocument.body:w(e)&&he(e)?e:fe(N(e))}function pe(e,t){var n;void 0===t&&(t=[]);var r=fe(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=A(r),s=i?[o].concat(o.visualViewport||[],he(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(pe(N(s)))}function ge(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function me(e,t,n){return t===J?ge(function(e,t){var n=A(e),r=L(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;var c=C();(c||!c&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:s,x:a+de(e),y:l}}(e,n)):_(t)?function(e,t){var n=T(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):ge(function(e){var t,n=L(e),r=ue(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=k(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=k(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+de(e),l=-r.scrollTop;return"rtl"===M(i||n).direction&&(a+=k(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(L(e)))}function be(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?v(i):null,s=i?ne(i):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(o){case W:t={x:a,y:n.y-r.height};break;case H:t={x:a,y:n.y+n.height};break;case V:t={x:n.x+n.width,y:l};break;case q:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?z(o):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case Y:t[c]=t[c]-(n[u]/2-r[u]/2);break;case G:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function ye(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,s=void 0===o?e.strategy:o,a=n.boundary,l=void 0===a?"clippingParents":a,c=n.rootBoundary,u=void 0===c?J:c,d=n.elementContext,h=void 0===d?X:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,b=$("number"!=typeof m?m:U(m,Q)),y=h===X?"reference":X,v=e.rects.popper,A=e.elements[p?y:h],x=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=pe(N(e)),n=["absolute","fixed"].indexOf(M(e).position)>=0&&w(e)?F(e):e;return _(n)?t.filter((function(e){return _(e)&&R(e,n)&&"body"!==j(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),s=o[0],a=o.reduce((function(t,n){var i=me(e,n,r);return t.top=k(i.top,t.top),t.right=E(i.right,t.right),t.bottom=E(i.bottom,t.bottom),t.left=k(i.left,t.left),t}),me(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(_(A)?A:A.contextElement||L(e.elements.popper),l,u,s),S=T(e.elements.reference),O=be({reference:S,element:v,strategy:"absolute",placement:i}),C=ge(Object.assign({},v,O)),P=h===X?C:S,D={top:x.top-P.top+b.top,bottom:P.bottom-x.bottom+b.bottom,left:x.left-P.left+b.left,right:P.right-x.right+b.right},I=e.modifiersData.offset;if(h===X&&I){var z=I[i];Object.keys(D).forEach((function(e){var t=[V,H].indexOf(e)>=0?1:-1,n=[W,H].indexOf(e)>=0?"y":"x";D[e]+=z[n]*t}))}return D}function ve(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 Ae(e){return[W,V,H,q].some((function(t){return e[t]>=0}))}function _e(e,t,n){void 0===n&&(n=!1);var r,i,o=w(t),s=w(t)&&function(e){var t=e.getBoundingClientRect(),n=S(t.width)/e.offsetWidth||1,r=S(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=L(t),l=T(e,s,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==j(t)||he(a))&&(c=(r=t)!==A(r)&&w(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:ue(r)),w(t)?((u=T(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=de(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function we(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 xe={placement:"bottom",modifiers:[],strategy:"absolute"};function ke(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[q,V].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}},{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,s=n.altAxis,a=void 0===s||s,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=v(m),y=l||(b!==m&&p?function(e){if(v(e)===K)return[];var t=ae(e);return[ce(e),t,ce(t)]}(m):[ae(m)]),A=[m].concat(y).reduce((function(e,n){return e.concat(v(n)===K?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?ee:l,u=ne(r),d=u?a?Z:Z.filter((function(e){return ne(e)===u})):Q,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]=ye(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[v(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)}),[]),_=t.rects.reference,w=t.rects.popper,x=new Map,k=!0,E=A[0],S=0;S=0,R=P?"width":"height",j=ye(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),M=P?T?V:q:T?H:W;_[R]>w[R]&&(M=ae(M));var D=ae(M),L=[];if(o&&L.push(j[C]<=0),a&&L.push(j[M]<=0,j[D]<=0),L.every((function(e){return e}))){E=O,k=!1;break}x.set(O,L)}if(k)for(var N=function(e){var t=A.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},I=p?3:1;I>0&&"break"!==N(I);I--);t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{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,s=n.altAxis,a=void 0!==s&&s,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=ye(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=v(t.placement),y=ne(t.placement),A=!y,_=z(b),w="x"===_?"y":"x",x=t.modifiersData.popperOffsets,S=t.rects.reference,O=t.rects.popper,C="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,T="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(x){if(o){var M,D="y"===_?W:q,L="y"===_?H:V,N="y"===_?"height":"width",I=x[_],$=I+m[D],U=I-m[L],K=f?-O[N]/2:0,Q=y===Y?S[N]:O[N],G=y===Y?-O[N]:-S[N],J=t.elements.arrow,X=f&&J?P(J):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[D],te=Z[L],re=B(0,S[N],X[N]),ie=A?S[N]/2-K-re-ee-T.mainAxis:Q-re-ee-T.mainAxis,oe=A?-S[N]/2+K+re+te+T.mainAxis:G+re+te+T.mainAxis,se=t.elements.arrow&&F(t.elements.arrow),ae=se?"y"===_?se.clientTop||0:se.clientLeft||0:0,le=null!=(M=null==R?void 0:R[_])?M:0,ce=I+oe-le,ue=B(f?E($,I+ie-le-ae):$,I,f?k(U,ce):U);x[_]=ue,j[_]=ue-I}if(a){var de,he="x"===_?W:q,fe="x"===_?H:V,pe=x[w],ge="y"===w?"height":"width",me=pe+m[he],be=pe-m[fe],ve=-1!==[W,q].indexOf(b),Ae=null!=(de=null==R?void 0:R[w])?de:0,_e=ve?me:pe-S[ge]-O[ge]-Ae+T.altAxis,we=ve?pe+S[ge]+O[ge]-Ae-T.altAxis:be,xe=f&&ve?function(e,t,n){var r=B(e,t,n);return r>n?n:r}(_e,pe,we):B(f?_e:me,pe,f?we:be);x[w]=xe,j[w]=xe-pe}t.modifiersData[r]=j}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=v(n.placement),l=z(a),c=[q,V].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return $("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:U(e,Q))}(i.padding,n),d=P(o),h="y"===l?W:q,f="y"===l?H:V,p=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],g=s[l]-n.rects.reference[l],m=F(o),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=p/2-g/2,A=u[h],_=b-d[c]-u[f],w=b/2-d[c]/2+y,x=B(A,w,_),k=l;n.modifiersData[r]=((t={})[k]=x,t.centerOffset=x-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)))&&R(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}),Se=["enabled","placement","strategy","modifiers"],Oe={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ce={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)}}},Te=[],Pe=function(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:s="absolute",modifiers:a=Te}=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,Se);const c=(0,o.useRef)(a),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=(0,y.A)();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)((()=>(b(c.current,a)||(c.current=a),c.current)),[a]);return(0,o.useEffect)((()=>{u.current&&r&&u.current.setOptions({placement:i,strategy:s,modifiers:[...m,g,Oe]})}),[s,i,g,r,m]),(0,o.useEffect)((()=>{if(r&&null!=e&&null!=t)return u.current=Ee(e,t,Object.assign({},l,{placement:i,strategy:s,modifiers:[...m,Ce,g]})),()=>{null!=u.current&&(u.current.destroy(),u.current=void 0,p((e=>Object.assign({},e,{attributes:{},styles:{popper:{}}}))))}}),[r,e,t]),f};var Re=n(6406),je=n(9763),Me=n(1625),De=n(9771),Le=n.n(De);const Ne=()=>{},Ie=e=>e&&("current"in e?e.current:e),Fe={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},ze=function(e,t=Ne,{disabled:n,clickTrigger:r="click"}={}){const i=(0,o.useRef)(!1),s=(0,o.useRef)(!1),a=(0,o.useCallback)((t=>{const n=Ie(e);var r;Le()(!!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)||!!(0,Re.A)(n,t.target)||s.current,s.current=!1}),[e]),l=(0,h.A)((t=>{const n=Ie(e);n&&(0,Re.A)(n,t.target)&&(s.current=!0)})),c=(0,h.A)((e=>{i.current||t(e)}));(0,o.useEffect)((()=>{var t,i;if(n||null==e)return;const o=(0,Me.A)(Ie(e)),s=o.defaultView||window;let u=null!=(t=s.event)?t:null==(i=s.parent)?void 0:i.event,d=null;Fe[r]&&(d=(0,je.A)(o,Fe[r],l,!0));const h=(0,je.A)(o,r,a,!0),f=(0,je.A)(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=>(0,je.A)(e,"mousemove",Ne)))),()=>{null==d||d(),h(),f(),p.forEach((e=>e()))}}),[e,n,r,a,l,c])};function Be(e={}){return Array.isArray(e)?e:Object.keys(e).map((t=>(e[t].name=t,e[t])))}var $e=n(4848);const Ue=["children","usePopper"],We=()=>{};function He(e={}){const t=(0,o.useContext)(f),[n,r]=(0,p.A)(),i=(0,o.useRef)(!1),{flip:s,offset:a,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:h=!0,usePopper:g=!!t}=e,m=null==(null==t?void 0:t.show)?!!e.show:t.show;m&&!i.current&&(i.current=!0);const{placement:b,setMenu:y,menuElement:v,toggleElement:A}=t||{},_=Pe(A,v,function({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:o,containerPadding:s,arrowElement:a,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:Be(Object.assign({},p,{eventListeners:{enabled:t,options:null==(c=p.eventListeners)?void 0:c.options},preventOverflow:Object.assign({},p.preventOverflow,{options:s?Object.assign({padding:s},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:!!a,options:Object.assign({},null==(f=p.arrow)?void 0:f.options,{element:a})}),flip:Object.assign({enabled:!!r},p.flip)}))})}({placement:u||b||"bottom-start",enabled:g,enableEvents:null==h?m:h,offset:a,flip:s,fixed:c,arrowElement:n,popperConfig:d})),w=Object.assign({ref:y||We,"aria-labelledby":null==A?void 0:A.id},_.attributes.popper,{style:_.styles.popper}),x={show:m,placement:b,hasShown:i.current,toggle:null==t?void 0:t.toggle,popper:g?_:null,arrowProps:g?Object.assign({ref:r},_.attributes.arrow,{style:_.styles.arrow}):{}};return ze(v,(e=>{null==t||t.toggle(!1,e)}),{clickTrigger:l,disabled:!m}),[w,x]}function Ve(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,Ue);const[i,o]=He(Object.assign({},r,{usePopper:n}));return(0,$e.jsx)($e.Fragment,{children:t(i,o)})}Ve.displayName="DropdownMenu";const qe=Ve,Ke={prefix:String(Math.round(1e10*Math.random())),current:0},Qe=o.createContext(Ke),Ye=o.createContext(!1);let Ge=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement),Je=new WeakMap;const Xe="function"==typeof o.useId?function(e){let t=o.useId(),[n]=(0,o.useState)("function"==typeof o.useSyncExternalStore?o.useSyncExternalStore(tt,Ze,et):(0,o.useContext)(Ye));return e||`${n?"react-aria":`react-aria${Ke.prefix}`}-${t}`}:function(e){let t=(0,o.useContext)(Qe);t!==Ke||Ge||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=function(e=!1){let t=(0,o.useContext)(Qe),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=Je.get(e);null==n?Je.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,Je.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function Ze(){return!1}function et(){return!0}function tt(e){return()=>{}}const nt=e=>{var t;return"menu"===(null==(t=e.getAttribute("role"))?void 0:t.toLowerCase())},rt=()=>{};function it(){const e=Xe(),{show:t=!1,toggle:n=rt,setToggle:r,menuElement:i}=(0,o.useContext)(f)||{},s=(0,o.useCallback)((e=>{n(!t,e)}),[t,n]),a={id:e,ref:r||rt,onClick:s,"aria-expanded":!!t};return i&&nt(i)&&(a["aria-haspopup"]=!0),[a,{show:t,toggle:n}]}function ot({children:e}){const[t,n]=it();return(0,$e.jsx)($e.Fragment,{children:e(t,n)})}ot.displayName="DropdownToggle";const st=ot;var at=n(1406),lt=n(9409),ct=n(5753),ut=n(5182);const dt=["eventKey","disabled","onClick","active","as"];function ht({key:e,href:t,active:n,disabled:r,onClick:i}){const s=(0,o.useContext)(at.A),a=(0,o.useContext)(lt.A),{activeKey:l}=a||{},c=(0,at.u)(e,t),u=null==n&&null!=e?(0,at.u)(l)===c:n;return[{onClick:(0,h.A)((e=>{r||(null==i||i(e),s&&!e.isPropagationStopped()&&s(c,e))})),"aria-disabled":r||void 0,"aria-selected":u,[(0,ut.sE)("dropdown-item")]:""},{isActive:u}]}const ft=o.forwardRef(((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:o,as:s=ct.Ay}=e,a=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,dt);const[l]=ht({key:n,href:a.href,disabled:r,onClick:i,active:o});return(0,$e.jsx)(s,Object.assign({},a,{ref:t},l))}));ft.displayName="DropdownItem";const pt=ft;var gt=n(2810);function mt(){const e=(0,u.A)(),t=(0,o.useRef)(null),n=(0,o.useCallback)((n=>{t.current=n,e()}),[e]);return[t,n]}function bt({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${(0,ut.sE)("dropdown-item")}]`,focusFirstItemOnShow:s,placement:u="bottom-start",children:p}){const g=(0,gt.A)(),[m,b]=function(e,t,n){const r=(0,o.useRef)(void 0!==e),[i,s]=(0,o.useState)(t),a=void 0!==e,l=r.current;return r.current=a,!a&&l&&i!==t&&s(t),[a?e:i,(0,o.useCallback)(((...e)=>{const[t,...r]=e;let i=null==n?void 0:n(t,...r);return s(t),i}),[n])]}(t,e,r),[y,v]=mt(),A=y.current,[_,w]=mt(),x=_.current,k=(0,c.A)(m),E=(0,o.useRef)(null),S=(0,o.useRef)(!1),O=(0,o.useContext)(at.A),C=(0,o.useCallback)(((e,t,n=(null==t?void 0:t.type))=>{b(e,{originalEvent:t,source:n})}),[b]),T=(0,h.A)(((e,t)=>{null==n||n(e,t),C(!1,t,"select"),t.isPropagationStopped()||null==O||O(e,t)})),P=(0,o.useMemo)((()=>({toggle:C,placement:u,show:m,menuElement:A,toggleElement:x,setMenu:v,setToggle:w})),[C,u,m,A,x,v,w]);A&&k&&!m&&(S.current=A.contains(A.ownerDocument.activeElement));const R=(0,h.A)((()=>{x&&x.focus&&x.focus()})),j=(0,h.A)((()=>{const e=E.current;let t=s;if(null==t&&(t=!(!y.current||!nt(y.current))&&"keyboard"),!1===t||"keyboard"===t&&!/^key.+$/.test(e))return;const n=(0,a.A)(y.current,i)[0];n&&n.focus&&n.focus()}));(0,o.useEffect)((()=>{m?j():S.current&&(S.current=!1,R())}),[m,S,R,j]),(0,o.useEffect)((()=>{E.current=null}));const M=(e,t)=>{if(!y.current)return null;const n=(0,a.A)(y.current,i);let r=n.indexOf(e)+t;return r=Math.max(0,Math.min(r,n.length)),n[r]};return(0,d.A)((0,o.useCallback)((()=>g.document),[g]),"keydown",(e=>{var t,n;const{key:r}=e,i=e.target,o=null==(t=y.current)?void 0:t.contains(i),s=null==(n=_.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&&!s)return;if(!("Tab"!==r||y.current&&m))return;E.current=e.type;const a={originalEvent:e,source:e.type};switch(r){case"ArrowUp":{const t=M(i,-1);return t&&t.focus&&t.focus(),void e.preventDefault()}case"ArrowDown":if(e.preventDefault(),m){const e=M(i,1);e&&e.focus&&e.focus()}else b(!0,a);return;case"Tab":(0,l.Ay)(i.ownerDocument,"keyup",(e=>{var t;("Tab"!==e.key||e.target)&&null!=(t=y.current)&&t.contains(e.target)||b(!1,a)}),{once:!0});break;case"Escape":"Escape"===r&&(e.preventDefault(),e.stopPropagation()),b(!1,a)}})),(0,$e.jsx)(at.A.Provider,{value:T,children:(0,$e.jsx)(f.Provider,{value:P,children:p})})}bt.displayName="Dropdown",bt.Menu=qe,bt.Toggle=st,bt.Item=pt;const yt=bt;var vt=n(6266);const At=o.createContext({});At.displayName="DropdownContext";const _t=At,wt=o.forwardRef((({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},a)=>(t=(0,s.oU)(t,"dropdown-divider"),(0,$e.jsx)(n,{ref:a,className:i()(e,t),role:r,...o}))));wt.displayName="DropdownDivider";const xt=wt,kt=o.forwardRef((({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},a)=>(t=(0,s.oU)(t,"dropdown-header"),(0,$e.jsx)(n,{ref:a,className:i()(e,t),role:r,...o}))));kt.displayName="DropdownHeader";const Et=kt;var St=n(2571);const Ot=o.forwardRef((({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:a,as:l=St.A,...c},u)=>{const d=(0,s.oU)(e,"dropdown-item"),[h,f]=ht({key:n,href:c.href,disabled:r,onClick:o,active:a});return(0,$e.jsx)(l,{...c,...h,ref:u,className:i()(t,d,f.isActive&&"active",r&&"disabled")})}));Ot.displayName="DropdownItem";const Ct=Ot,Tt=o.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=(0,s.oU)(t,"dropdown-item-text"),(0,$e.jsx)(n,{ref:o,className:i()(e,t),...r}))));Tt.displayName="DropdownItemText";const Pt=Tt;var Rt=n(1706),jt=n(3804);const Mt=o.createContext(null);Mt.displayName="InputGroupContext";const Dt=Mt;var Lt=n(4778);function Nt(e,t){return e}function It(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}n(311);const Ft=o.forwardRef((({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:a=!0,show:l,renderOnMount:c,as:u="div",popperConfig:d,variant:h,...f},p)=>{let g=!1;const m=(0,o.useContext)(Lt.A),b=(0,s.oU)(e,"dropdown-menu"),{align:y,drop:v,isRTL:A}=(0,o.useContext)(_t);n=n||y;const _=(0,o.useContext)(Dt),w=[];if(n)if("object"==typeof n){const e=Object.keys(n);if(e.length){const t=e[0],r=n[t];g="start"===r,w.push(`${b}-${t}-${r}`)}}else"end"===n&&(g=!0);const x=It(g,v,A),[k,{hasShown:E,popper:S,show:O,toggle:C}]=He({flip:a,rootCloseEvent:r,show:l,usePopper:!m&&0===w.length,offset:[0,2],popperConfig:d,placement:x});if(k.ref=(0,jt.A)(Nt(p),k.ref),(0,Rt.A)((()=>{O&&(null==S||S.update())}),[O]),!E&&!c&&!_)return null;"string"!=typeof u&&(k.show=O,k.close=()=>null==C?void 0:C(!1),k.align=n);let T=f.style;return null!=S&&S.placement&&(T={...f.style,...k.style},f["x-placement"]=S.placement),(0,$e.jsx)(u,{...f,...k,style:T,...(w.length||m)&&{"data-bs-popper":"static"},className:i()(t,b,O&&"show",g&&`${b}-end`,h&&`${b}-${h}`,...w)})}));Ft.displayName="DropdownMenu";const zt=Ft,Bt=o.forwardRef((({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:a=!1,className:l,...c},u)=>{const d=(0,s.oU)(t,"btn"),[h,{tagName:f}]=(0,ct.Am)({tagName:e,disabled:a,...c}),p=f;return(0,$e.jsx)(p,{...h,...c,ref:u,disabled:a,className:i()(l,d,o&&"active",n&&`${d}-${n}`,r&&`${d}-${r}`,c.href&&a&&"disabled")})}));Bt.displayName="Button";const $t=Bt,Ut=o.forwardRef((({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:a=$t,...l},c)=>{const u=(0,s.oU)(e,"dropdown-toggle"),d=(0,o.useContext)(f);void 0!==r&&(l.bsPrefix=r);const[h]=it();return h.ref=(0,jt.A)(h.ref,Nt(c)),(0,$e.jsx)(a,{className:i()(n,u,t&&`${u}-split`,(null==d?void 0:d.show)&&"show"),...h,...l})}));Ut.displayName="DropdownToggle";const Wt=Ut,Ht=o.forwardRef(((e,t)=>{const{bsPrefix:n,drop:r="down",show:a,className:l,align:c="start",onSelect:u,onToggle:d,focusFirstItemOnShow:f,as:p="div",navbar:g,autoClose:m=!0,...b}=(0,vt.Zw)(e,{show:"onToggle"}),y=(0,o.useContext)(Dt),v=(0,s.oU)(n,"dropdown"),A=(0,s.Wz)(),_=(0,h.A)(((e,t)=>{var n,r,i;(null==(n=t.originalEvent)||null==(r=n.target)?void 0:r.classList.contains("dropdown-toggle"))&&"mousedown"===t.source||(t.originalEvent.currentTarget!==document||"keydown"===t.source&&"Escape"!==t.originalEvent.key||(t.source="rootClose"),i=t.source,(!1===m?"click"===i:"inside"===m?"rootClose"!==i:"outside"!==m||"select"!==i)&&(null==d||d(e,t)))})),w=It("end"===c,r,A),x=(0,o.useMemo)((()=>({align:c,drop:r,isRTL:A})),[c,r,A]),k={down:v,"down-centered":`${v}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return(0,$e.jsx)(_t.Provider,{value:x,children:(0,$e.jsx)(yt,{placement:w,show:a,onSelect:u,onToggle:_,focusFirstItemOnShow:f,itemSelector:`.${v}-item:not(.disabled):not(:disabled)`,children:y?b.children:(0,$e.jsx)(p,{...b,ref:t,className:i()(l,a&&"show",k[r])})})})}));Ht.displayName="Dropdown";const Vt=Object.assign(Ht,{Toggle:Wt,Menu:zt,Item:Ct,ItemText:Pt,Divider:xt,Header:Et});var qt=n(3558);const Kt=o.forwardRef((({id:e,title:t,children:n,bsPrefix:r,className:o,rootCloseEvent:a,menuRole:l,disabled:c,active:u,renderMenuOnMount:d,menuVariant:h,...f},p)=>{const g=(0,s.oU)(void 0,"nav-item");return(0,$e.jsxs)(Vt,{ref:p,...f,className:i()(o,g),children:[(0,$e.jsx)(Vt.Toggle,{id:e,eventKey:null,active:u,disabled:c,childBsPrefix:r,as:qt.A,children:t}),(0,$e.jsx)(Vt.Menu,{role:l,renderOnMount:d,rootCloseEvent:a,variant:h,children:n})]})}));Kt.displayName="NavDropdown";const Qt=Object.assign(Kt,{Item:Vt.Item,ItemText:Vt.ItemText,Divider:Vt.Divider,Header:Vt.Header})},3558:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(6942),i=n.n(r),o=n(6540),s=n(2571),a=n(2671),l=n(1406),c=n(6519),u=n(4848);const d=o.forwardRef((({bsPrefix:e,className:t,as:n=s.A,active:r,eventKey:o,disabled:d=!1,...h},f)=>{e=(0,c.oU)(e,"nav-link");const[p,g]=(0,a.M)({key:(0,l.u)(o,h.href),active:r,disabled:d,...h});return(0,u.jsx)(n,{...h,...p,ref:f,disabled:d,className:i()(t,e,d&&"disabled",g.isActive&&"active")})}));d.displayName="NavLink";const h=d},2627:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>nt});var r=n(6942),i=n.n(r),o=n(6540),s=n(1406),a=n(6266),l=n(6519),c=n(4848);const u=o.forwardRef((({bsPrefix:e,className:t,as:n,...r},o)=>{e=(0,l.oU)(e,"navbar-brand");const s=n||(r.href?"a":"span");return(0,c.jsx)(s,{...r,ref:o,className:i()(t,e)})}));u.displayName="NavbarBrand";const d=u;var h=n(1625);var f=/([A-Z])/g,p=/^ms-/;function g(e){return function(e){return e.replace(f,"-$1").toLowerCase()}(e).replace(p,"-ms-")}var m=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;const b=function(e,t){var n="",r="";if("string"==typeof t)return e.style.getPropertyValue(g(t))||function(e,t){return function(e){var t=(0,h.A)(e);return t&&t.defaultView||window}(e).getComputedStyle(e,t)}(e).getPropertyValue(g(t));Object.keys(t).forEach((function(i){var o=t[i];o||0===o?function(e){return!(!e||!m.test(e))}(i)?r+=i+"("+o+") ":n+=g(i)+": "+o+";":e.style.removeProperty(g(i))})),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n};var y=n(8587);function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var A=n(961);const _=o.createContext(null);var w="unmounted",x="exited",k="entering",E="entered",S="exiting",O=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=x,r.appearStatus=k):i=E:i=t.unmountOnExit||t.mountOnEnter?w:x,r.state={status:i},r.nextCallback=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,v(t,n),r.getDerivedStateFromProps=function(e,t){return e.in&&t.status===w?{status:x}: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!==k&&n!==E&&(t=k):n!==k&&n!==E||(t=S)}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===k){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:A.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===x&&this.setState({status:w})},i.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[A.findDOMNode(this),r],o=i[0],s=i[1],a=this.getTimeouts(),l=r?a.appear:a.enter;e||n?(this.props.onEnter(o,s),this.safeSetState({status:k},(function(){t.props.onEntering(o,s),t.onTransitionEnd(l,(function(){t.safeSetState({status:E},(function(){t.props.onEntered(o,s)}))}))}))):this.safeSetState({status:E},(function(){t.props.onEntered(o)}))},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:A.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:S},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:x},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:x},(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:A.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],s=i[1];this.props.addEndListener(o,s)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===w)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,(0,y.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return o.createElement(_.Provider,{value:null},"function"==typeof n?n(e,r):o.cloneElement(o.Children.only(n),r))},r}(o.Component);function C(){}O.contextType=_,O.propTypes={},O.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:C,onEntering:C,onEntered:C,onExit:C,onExiting:C,onExited:C},O.UNMOUNTED=w,O.EXITED=x,O.ENTERING=k,O.ENTERED=E,O.EXITING=S;const T=O;var P=n(9763);function R(e,t,n,r){var i,o;null==n&&(o=-1===(i=b(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(i)*o||0);var s=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=(0,P.A)(e,"transitionend",(function(){r=!0}),{once:!0});return function(){clearTimeout(i),o()}}(e,n,r),a=(0,P.A)(e,"transitionend",t);return function(){s(),a()}}function j(e,t){const n=b(e,t)||"",r=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*r}function M(e,t){const n=j(e,"transitionDuration"),r=j(e,"transitionDelay"),i=R(e,(n=>{n.target===e&&(i(),t(n))}),n+r)}const D=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 L(e){e.offsetHeight}var N=n(3804);const I=o.forwardRef((({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:s,addEndListener:a,children:l,childRef:u,...d},h)=>{const f=(0,o.useRef)(null),p=(0,N.A)(f,u),g=e=>{var t;p((t=e)&&"setState"in t?A.findDOMNode(t):null!=t?t:null)},m=e=>t=>{e&&f.current&&e(f.current,t)},b=(0,o.useCallback)(m(e),[e]),y=(0,o.useCallback)(m(t),[t]),v=(0,o.useCallback)(m(n),[n]),_=(0,o.useCallback)(m(r),[r]),w=(0,o.useCallback)(m(i),[i]),x=(0,o.useCallback)(m(s),[s]),k=(0,o.useCallback)(m(a),[a]);return(0,c.jsx)(T,{ref:h,...d,onEnter:b,onEntered:v,onEntering:y,onExit:_,onExited:x,onExiting:w,addEndListener:k,nodeRef:f,children:"function"==typeof l?(e,t)=>l(e,{...t,ref:g}):o.cloneElement(l,{ref:g})})})),F={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function z(e,t){const n=t[`offset${e[0].toUpperCase()}${e.slice(1)}`],r=F[e];return n+parseInt(b(t,r[0]),10)+parseInt(b(t,r[1]),10)}const B={[x]:"collapse",[S]:"collapsing",[k]:"collapsing",[E]:"collapse show"},$=o.forwardRef((({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:s,className:a,children:l,dimension:u="height",in:d=!1,timeout:h=300,mountOnEnter:f=!1,unmountOnExit:p=!1,appear:g=!1,getDimensionValue:m=z,...b},y)=>{const v="function"==typeof u?u():u,A=(0,o.useMemo)((()=>D((e=>{e.style[v]="0"}),e)),[v,e]),_=(0,o.useMemo)((()=>D((e=>{const t=`scroll${v[0].toUpperCase()}${v.slice(1)}`;e.style[v]=`${e[t]}px`}),t)),[v,t]),w=(0,o.useMemo)((()=>D((e=>{e.style[v]=null}),n)),[v,n]),x=(0,o.useMemo)((()=>D((e=>{e.style[v]=`${m(v,e)}px`,L(e)}),r)),[r,m,v]),k=(0,o.useMemo)((()=>D((e=>{e.style[v]=null}),s)),[v,s]);return(0,c.jsx)(I,{ref:y,addEndListener:M,...b,"aria-expanded":b.role?d:null,onEnter:A,onEntering:_,onEntered:w,onExit:x,onExiting:k,childRef:l.ref,in:d,timeout:h,mountOnEnter:f,unmountOnExit:p,appear:g,children:(e,t)=>o.cloneElement(l,{...t,className:i()(a,l.props.className,B[e],"width"===v&&"collapse-horizontal")})})})),U=$;var W=n(4778);const H=o.forwardRef((({children:e,bsPrefix:t,...n},r)=>{t=(0,l.oU)(t,"navbar-collapse");const i=(0,o.useContext)(W.A);return(0,c.jsx)(U,{in:!(!i||!i.expanded),...n,children:(0,c.jsx)("div",{ref:r,className:t,children:e})})}));H.displayName="NavbarCollapse";const V=H;var q=n(7895);const K=o.forwardRef((({bsPrefix:e,className:t,children:n,label:r="Toggle navigation",as:s="button",onClick:a,...u},d)=>{e=(0,l.oU)(e,"navbar-toggler");const{onToggle:h,expanded:f}=(0,o.useContext)(W.A)||{},p=(0,q.A)((e=>{a&&a(e),h&&h()}));return"button"===s&&(u.type="button"),(0,c.jsx)(s,{...u,ref:d,onClick:p,"aria-label":r,className:i()(t,e,!f&&"collapsed"),children:n||(0,c.jsx)("span",{className:`${e}-icon`})})}));K.displayName="NavbarToggle";const Q=K;var Y=n(1706);const G=new WeakMap,J=(e,t)=>{if(!e||!t)return;const n=G.get(t)||new Map;G.set(t,n);let r=n.get(e);return r||(r=t.matchMedia(e),r.refCount=0,n.set(r.media,r)),r};function X(e,t=("undefined"==typeof window?void 0:window)){const n=J(e,t),[r,i]=(0,o.useState)((()=>!!n&&n.matches));return(0,Y.A)((()=>{let n=J(e,t);if(!n)return i(!1);let r=G.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 Z=function(e){const t=Object.keys(e);function n(e,t){return e===t?t:e?`${e} and ${t}`:t}return function(r,i,s){let a;return"object"==typeof r?(a=r,s=i,i=!0):(i=i||!0,a={[r]:i}),X((0,o.useMemo)((()=>Object.entries(a).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(a)]),s)}}({xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400});function ee(e){void 0===e&&(e=(0,h.A)());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}var te=n(6406),ne=n(7828),re=n(8880);var ie=n(4103);const oe=(0,n(5182).sE)("modal-open"),se=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(b(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(oe,""),b(r,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(oe),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}};var ae=n(2810);const le=(e,t)=>ne.A?null==e?(t||(0,h.A)()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null,ce=function({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){const s=(0,o.useRef)(null),a=(0,o.useRef)(t),l=(0,q.A)(n);(0,o.useEffect)((()=>{t?a.current=!0:l(s.current)}),[t,l]);const c=(0,N.A)(s,e.ref),u=(0,o.cloneElement)(e,{ref:c});return t?u:i||!a.current&&r?null:u},ue=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];const de=["component"],he=o.forwardRef(((e,t)=>{let{component:n}=e;const r=function(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:s,onExited:a,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,ue);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=(0,N.A)(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]),A=(0,o.useCallback)(g(s),[s]),_=(0,o.useCallback)(g(a),[a]),w=(0,o.useCallback)(g(l),[l]);return Object.assign({},u,{nodeRef:f},t&&{onEnter:m},n&&{onEntering:b},r&&{onEntered:y},i&&{onExit:v},s&&{onExiting:A},a&&{onExited:_},l&&{addEndListener:w},{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,de));return(0,c.jsx)(n,Object.assign({ref:t},r))}));function fe({children:e,in:t,onExited:n,onEntered:r,transition:i}){const[s,a]=(0,o.useState)(!t);t&&s&&a(!1);const l=function({in:e,onTransition:t}){const n=(0,o.useRef)(null),r=(0,o.useRef)(!0),i=(0,q.A)(t);return(0,Y.A)((()=>{if(!n.current)return;let t=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}}),[e,i]),(0,Y.A)((()=>(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):(a(!0),null==n||n(e.element)))}),(t=>{throw e.in||a(!0),t}))}}),c=(0,N.A)(l,e.ref);return s&&!t?null:(0,o.cloneElement)(e,{ref:c})}function pe(e,t,n){return e?(0,c.jsx)(he,Object.assign({},n,{component:e})):t?(0,c.jsx)(fe,Object.assign({},n,{transition:t})):(0,c.jsx)(ce,Object.assign({},n))}const ge=["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 me;const be=(0,o.forwardRef)(((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:s,children:a,backdrop:l=!0,keyboard:u=!0,onBackdropClick:d,onEscapeKeyDown:h,transition:f,runTransition:p,backdropTransition:g,runBackdropTransition:m,autoFocus:b=!0,enforceFocus:y=!0,restoreFocus:v=!0,restoreFocusOptions:_,renderDialog:w,renderBackdrop:x=(e=>(0,c.jsx)("div",Object.assign({},e))),manager:k,container:E,onShow:S,onHide:O=(()=>{}),onExit:C,onExited:T,onExiting:R,onEnter:j,onEntering:M,onEntered:D}=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,ge);const N=(0,ae.A)(),I=function(e,t){const n=(0,ae.A)(),[r,i]=(0,o.useState)((()=>le(e,null==n?void 0:n.document)));if(!r){const t=le(e);t&&i(t)}return(0,o.useEffect)((()=>{}),[t,r]),(0,o.useEffect)((()=>{const t=le(e);t!==r&&i(t)}),[e,r]),r}(E),F=function(e){const t=(0,ae.A)(),n=e||function(e){return me||(me=new se({ownerDocument:null==e?void 0:e.document})),me}(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}),[])})}(k),z=(0,re.A)(),B=(0,ie.A)(n),[$,U]=(0,o.useState)(!n),W=(0,o.useRef)(null);(0,o.useImperativeHandle)(t,(()=>F),[F]),ne.A&&!B&&n&&(W.current=ee(null==N?void 0:N.document)),n&&$&&U(!1);const H=(0,q.A)((()=>{if(F.add(),J.current=(0,P.A)(document,"keydown",Y),G.current=(0,P.A)(document,"focus",(()=>setTimeout(K)),!0),S&&S(),b){var e,t;const n=ee(null!=(e=null==(t=F.dialog)?void 0:t.ownerDocument)?e:null==N?void 0:N.document);F.dialog&&n&&!(0,te.A)(F.dialog,n)&&(W.current=n,F.dialog.focus())}})),V=(0,q.A)((()=>{var e;F.remove(),null==J.current||J.current(),null==G.current||G.current(),v&&(null==(e=W.current)||null==e.focus||e.focus(_),W.current=null)}));(0,o.useEffect)((()=>{n&&I&&H()}),[n,I,H]),(0,o.useEffect)((()=>{$&&V()}),[$,V]),function(e){const t=function(e){const t=(0,o.useRef)(e);return t.current=e,t}(e);(0,o.useEffect)((()=>()=>t.current()),[])}((()=>{V()}));const K=(0,q.A)((()=>{if(!y||!z()||!F.isTopModal())return;const e=ee(null==N?void 0:N.document);F.dialog&&e&&!(0,te.A)(F.dialog,e)&&F.dialog.focus()})),Q=(0,q.A)((e=>{e.target===e.currentTarget&&(null==d||d(e),!0===l&&O())})),Y=(0,q.A)((e=>{u&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&F.isTopModal()&&(null==h||h(e),e.defaultPrevented||O())})),G=(0,o.useRef)(),J=(0,o.useRef)();if(!I)return null;const X=Object.assign({role:r,ref:F.setDialogRef,"aria-modal":"dialog"===r||void 0},L,{style:s,className:i,tabIndex:-1});let Z=w?w(X):(0,c.jsx)("div",Object.assign({},X,{children:o.cloneElement(a,{role:"document"})}));Z=pe(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:C,onExiting:R,onExited:(...e)=>{U(!0),null==T||T(...e)},onEnter:j,onEntering:M,onEntered:D,children:Z});let oe=null;return l&&(oe=x({ref:F.setBackdropRef,onClick:Q}),oe=pe(g,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:oe})),(0,c.jsx)(c.Fragment,{children:A.createPortal((0,c.jsxs)(c.Fragment,{children:[oe,Z]}),I)})}));be.displayName="Modal";const ye=Object.assign(be,{Manager:se}),ve={[k]:"show",[E]:"show"},Ae=o.forwardRef((({className:e,children:t,transitionClasses:n={},onEnter:r,...s},a)=>{const l={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...s},u=(0,o.useCallback)(((e,t)=>{L(e),null==r||r(e,t)}),[r]);return(0,c.jsx)(I,{ref:a,addEndListener:M,...l,onEnter:u,childRef:t.ref,children:(r,s)=>o.cloneElement(t,{...s,className:i()("fade",e,t.props.className,ve[r],n[r])})})}));Ae.displayName="Fade";const _e=Ae,we=o.forwardRef((({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=(0,l.oU)(t,"offcanvas-body"),(0,c.jsx)(n,{ref:o,className:i()(e,t),...r}))));we.displayName="OffcanvasBody";const xe=we,ke={[k]:"show",[E]:"show"},Ee=o.forwardRef((({bsPrefix:e,className:t,children:n,in:r=!1,mountOnEnter:s=!1,unmountOnExit:a=!1,appear:u=!1,...d},h)=>(e=(0,l.oU)(e,"offcanvas"),(0,c.jsx)(I,{ref:h,addEndListener:M,in:r,mountOnEnter:s,unmountOnExit:a,appear:u,...d,childRef:n.ref,children:(r,s)=>o.cloneElement(n,{...s,className:i()(t,n.props.className,(r===k||r===S)&&`${e}-toggling`,ke[r])})}))));Ee.displayName="OffcanvasToggling";const Se=Ee,Oe=o.createContext({onHide(){}});var Ce=n(5556),Te=n.n(Ce);const Pe={"aria-label":Te().string,onClick:Te().func,variant:Te().oneOf(["white"])},Re=o.forwardRef((({className:e,variant:t,"aria-label":n="Close",...r},o)=>(0,c.jsx)("button",{ref:o,type:"button",className:i()("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r})));Re.displayName="CloseButton",Re.propTypes=Pe;const je=Re,Me=o.forwardRef((({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:i,...s},a)=>{const l=(0,o.useContext)(Oe),u=(0,q.A)((()=>{null==l||l.onHide(),null==r||r()}));return(0,c.jsxs)("div",{ref:a,...s,children:[i,n&&(0,c.jsx)(je,{"aria-label":e,variant:t,onClick:u})]})})),De=o.forwardRef((({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=(0,l.oU)(e,"offcanvas-header"),(0,c.jsx)(Me,{ref:s,...o,className:i()(t,e),closeLabel:n,closeButton:r}))));De.displayName="OffcanvasHeader";const Le=De,Ne=("h5",o.forwardRef(((e,t)=>(0,c.jsx)("div",{...e,ref:t,className:i()(e.className,"h5")}))));const Ie=o.forwardRef((({className:e,bsPrefix:t,as:n=Ne,...r},o)=>(t=(0,l.oU)(t,"offcanvas-title"),(0,c.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ie.displayName="OffcanvasTitle";const Fe=Ie;var ze=n(5003);function Be(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}const $e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ue=".sticky-top",We=".navbar-toggler";class He extends se{adjustAndStore(e,t,n){const r=t.style[e];t.dataset[e]=r,b(t,{[e]:`${parseFloat(b(t,e))+n}px`})}restore(e,t){const n=t.dataset[e];void 0!==n&&(delete t.dataset[e],b(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const t=this.getElement();if(function(e,t){e.classList?e.classList.add(t):function(e,t){return e.classList?e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}(t,"modal-open"),!e.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";(0,ze.A)(t,$e).forEach((t=>this.adjustAndStore(n,t,e.scrollBarWidth))),(0,ze.A)(t,Ue).forEach((t=>this.adjustAndStore(r,t,-e.scrollBarWidth))),(0,ze.A)(t,We).forEach((t=>this.adjustAndStore(r,t,e.scrollBarWidth)))}removeContainerStyle(e){super.removeContainerStyle(e);const t=this.getElement();!function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=Be(e.className,t):e.setAttribute("class",Be(e.className&&e.className.baseVal||"",t))}(t,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";(0,ze.A)(t,$e).forEach((e=>this.restore(n,e))),(0,ze.A)(t,Ue).forEach((e=>this.restore(r,e))),(0,ze.A)(t,We).forEach((e=>this.restore(r,e)))}}let Ve;const qe=He;function Ke(e){return(0,c.jsx)(Se,{...e})}function Qe(e){return(0,c.jsx)(_e,{...e})}const Ye=o.forwardRef((({bsPrefix:e,className:t,children:n,"aria-labelledby":r,placement:s="start",responsive:a,show:u=!1,backdrop:d=!0,keyboard:h=!0,scroll:f=!1,onEscapeKeyDown:p,onShow:g,onHide:m,container:b,autoFocus:y=!0,enforceFocus:v=!0,restoreFocus:A=!0,restoreFocusOptions:_,onEntered:w,onExit:x,onExiting:k,onEnter:E,onEntering:S,onExited:O,backdropClassName:C,manager:T,renderStaticNode:P=!1,...R},j)=>{const M=(0,o.useRef)();e=(0,l.oU)(e,"offcanvas");const{onToggle:D}=(0,o.useContext)(W.A)||{},[L,N]=(0,o.useState)(!1),I=Z(a||"xs","up");(0,o.useEffect)((()=>{N(a?u&&!I:u)}),[u,a,I]);const F=(0,q.A)((()=>{null==D||D(),null==m||m()})),z=(0,o.useMemo)((()=>({onHide:F})),[F]),B=(0,o.useCallback)((t=>(0,c.jsx)("div",{...t,className:i()(`${e}-backdrop`,C)})),[C,e]),$=o=>(0,c.jsx)("div",{...o,...R,className:i()(t,a?`${e}-${a}`:e,`${e}-${s}`),"aria-labelledby":r,children:n});return(0,c.jsxs)(c.Fragment,{children:[!L&&(a||P)&&$({}),(0,c.jsx)(Oe.Provider,{value:z,children:(0,c.jsx)(ye,{show:L,ref:j,backdrop:d,container:b,keyboard:h,autoFocus:y,enforceFocus:v&&!f,restoreFocus:A,restoreFocusOptions:_,onEscapeKeyDown:p,onShow:g,onHide:F,onEnter:(e,...t)=>{e&&(e.style.visibility="visible"),null==E||E(e,...t)},onEntering:S,onEntered:w,onExit:x,onExiting:k,onExited:(e,...t)=>{e&&(e.style.visibility=""),null==O||O(...t)},manager:T||(f?(M.current||(M.current=new qe({handleContainerOverflow:!1})),M.current):(Ve||(Ve=new He(undefined)),Ve)),transition:Ke,backdropTransition:Qe,renderBackdrop:B,renderDialog:$})})]})}));Ye.displayName="Offcanvas";const Ge=Object.assign(Ye,{Body:xe,Header:Le,Title:Fe}),Je=o.forwardRef(((e,t)=>{const n=(0,o.useContext)(W.A);return(0,c.jsx)(Ge,{ref:t,show:!(null==n||!n.expanded),...e,renderStaticNode:!0})}));Je.displayName="NavbarOffcanvas";const Xe=Je,Ze=o.forwardRef((({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=(0,l.oU)(t,"navbar-text"),(0,c.jsx)(n,{ref:o,className:i()(e,t),...r}))));Ze.displayName="NavbarText";const et=Ze,tt=o.forwardRef(((e,t)=>{const{bsPrefix:n,expand:r=!0,variant:u="light",bg:d,fixed:h,sticky:f,className:p,as:g="nav",expanded:m,onToggle:b,onSelect:y,collapseOnSelect:v=!1,...A}=(0,a.Zw)(e,{expanded:"onToggle"}),_=(0,l.oU)(n,"navbar"),w=(0,o.useCallback)(((...e)=>{null==y||y(...e),v&&m&&(null==b||b(!1))}),[y,v,m,b]);void 0===A.role&&"nav"!==g&&(A.role="navigation");let x=`${_}-expand`;"string"==typeof r&&(x=`${x}-${r}`);const k=(0,o.useMemo)((()=>({onToggle:()=>null==b?void 0:b(!m),bsPrefix:_,expanded:!!m,expand:r})),[_,m,r,b]);return(0,c.jsx)(W.A.Provider,{value:k,children:(0,c.jsx)(s.A.Provider,{value:w,children:(0,c.jsx)(g,{ref:t,...A,className:i()(p,_,r&&x,u&&`${_}-${u}`,d&&`bg-${d}`,f&&`sticky-${f}`,h&&`fixed-${h}`)})})})}));tt.displayName="Navbar";const nt=Object.assign(tt,{Brand:d,Collapse:V,Offcanvas:Xe,Text:et,Toggle:Q})},4778:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=n(6540).createContext(null);r.displayName="NavbarContext";const i=r},6519:(e,t,n)=>{"use strict";n.d(t,{Wz:()=>l,oU:()=>a});var r=n(6540);n(4848);const i=r.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:o,Provider:s}=i;function a(e,t){const{prefixes:n}=(0,r.useContext)(i);return e||n[t]||t}function l(){const{dir:e}=(0,r.useContext)(i);return"rtl"===e}},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