diff --git a/android-chrome-192x192.png b/android-chrome-192x192.png new file mode 100644 index 000000000..95484d72b Binary files /dev/null and b/android-chrome-192x192.png differ diff --git a/android-chrome-512x512.png b/android-chrome-512x512.png new file mode 100644 index 000000000..d8f924415 Binary files /dev/null and b/android-chrome-512x512.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 000000000..7e196fe28 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 000000000..d740d2e16 --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,103 @@ +{ + "_Radio-VOSI1NDc.js": { + "file": "assets/Radio-VOSI1NDc.js", + "imports": [ + "index.html" + ] + }, + "_app-!~{006}~.js": { + "file": "assets/app-aK2W0DJR.css", + "src": "_app-!~{006}~.js" + }, + "_app-UFoL_ngB.js": { + "assets": [ + "assets/logo-11aZUo8k.png", + "assets/pdf.worker.min-ykChciii.js" + ], + "css": [ + "assets/app-aK2W0DJR.css" + ], + "file": "assets/app-UFoL_ngB.js", + "imports": [ + "index.html", + "_transaksjonstyperTypes-ucMukET5.js", + "_Radio-VOSI1NDc.js" + ] + }, + "_index-!~{009}~.js": { + "file": "assets/index-DAz-jswQ.css", + "src": "_index-!~{009}~.js" + }, + "_transaksjonstyperTypes-ucMukET5.js": { + "file": "assets/transaksjonstyperTypes-ucMukET5.js", + "imports": [ + "index.html" + ] + }, + "index.html": { + "dynamicImports": [ + "src/webcomponentWrapper.tsx", + "src/rootWrapper.tsx", + "src/mocks/index.ts", + "src/mocks/demo/DemoBanner.tsx" + ], + "file": "assets/index-pPRcGYyw.js", + "isEntry": true, + "src": "index.html" + }, + "node_modules/pdfjs-dist/build/pdf.worker.min.js": { + "file": "assets/pdf.worker.min-ykChciii.js", + "src": "node_modules/pdfjs-dist/build/pdf.worker.min.js" + }, + "src/mocks/demo/DemoBanner.tsx": { + "css": [ + "assets/DemoBanner-D5IJLili.css", + "assets/index-DAz-jswQ.css" + ], + "file": "assets/DemoBanner-XQkUFoVD.js", + "imports": [ + "index.html", + "_Radio-VOSI1NDc.js" + ], + "isDynamicEntry": true, + "src": "src/mocks/demo/DemoBanner.tsx" + }, + "src/mocks/index.ts": { + "file": "assets/index-GmBIzaa9.js", + "imports": [ + "index.html", + "_transaksjonstyperTypes-ucMukET5.js" + ], + "isDynamicEntry": true, + "src": "src/mocks/index.ts" + }, + "src/moduler/utskrift/ikoner/logo.png": { + "file": "assets/logo-11aZUo8k.png", + "src": "src/moduler/utskrift/ikoner/logo.png" + }, + "src/rootWrapper.tsx": { + "css": [ + "assets/index-DAz-jswQ.css" + ], + "file": "assets/rootWrapper-8yyBHI0Z.js", + "imports": [ + "index.html", + "_app-UFoL_ngB.js", + "_transaksjonstyperTypes-ucMukET5.js", + "_Radio-VOSI1NDc.js" + ], + "isDynamicEntry": true, + "src": "src/rootWrapper.tsx" + }, + "src/webcomponentWrapper.tsx": { + "file": "assets/webcomponentWrapper-drJNzlxL.js", + "imports": [ + "index.html", + "_app-UFoL_ngB.js", + "_transaksjonstyperTypes-ucMukET5.js", + "_Radio-VOSI1NDc.js" + ], + "isDynamicEntry": true, + "src": "src/webcomponentWrapper.tsx" + } +} \ No newline at end of file diff --git a/assets/DemoBanner-D5IJLili.css b/assets/DemoBanner-D5IJLili.css new file mode 100644 index 000000000..c6320ce95 --- /dev/null +++ b/assets/DemoBanner-D5IJLili.css @@ -0,0 +1 @@ +.demo-ikon{position:absolute;top:0;right:0;font-family:Source Sans Pro,Arial,sans-serif;font-weight:700;cursor:pointer;z-index:1}.demo-ikon polygon{fill:orange}.demo-ikon :hover{text-decoration:underline}.demo-ikon polygon:hover{fill:#ffb30f} diff --git a/assets/DemoBanner-XQkUFoVD.js b/assets/DemoBanner-XQkUFoVD.js new file mode 100644 index 000000000..6f54e552e --- /dev/null +++ b/assets/DemoBanner-XQkUFoVD.js @@ -0,0 +1,2 @@ +import{L as e,j as a,ac as k,Z as p,Y as A,X as R,a0 as I,_ as m,ad as x,Q as b,P as f,K as _,O as j,J as K,F as N,a5 as L,a7 as F,aa as B,a8 as O,a6 as V,a9 as P,ab as S,V as h,H as U,r as G}from"./index-pPRcGYyw.js";/* empty css */import{z as M,H as D,A as w,F as y,G as c,y as o,q as C}from"./Radio-VOSI1NDc.js";const v=[{id:"nyBrukerStdOrd",name:"Ny bruker - Standard innsats",avskrudd:[e.INGEN_OPPF_PERIODER,e.PRIVAT_BRUKER,e.MANUELL_BRUKER,e.ARENA_AKTIVITETER,e.TEST_AKTIVITETER],paskrudd:[e.AUTOMATISKE_AKTIVITETER]}],H=r=>{r.forEach(i=>k(i,!0))},z=r=>{r.forEach(i=>k(i,!1))},q=()=>a.jsxs("div",{className:"ml-2",children:[a.jsx("legend",{children:"Hurtigfilter"}),a.jsxs(M,{label:"",onChange:r=>{const i=v.find(n=>n.id===r.target.value);i!==void 0&&(H(i.paskrudd),z(i.avskrudd),window.location.reload())},children:[a.jsx("option",{children:"Ingen valgt"}),v.map(r=>a.jsx("option",{value:r.id,children:r.name},r.id))]})]}),s={ekstern:"eksternbruker",veileder:"veilederbruker"},E=r=>r.filter(i=>i.checked).map(i=>i.id),J=()=>{const r=[{label:"Veileder",id:s.veileder,value:s.veileder},{label:"Eksternbruker",id:s.ekstern,value:s.ekstern}],i=[{label:"Ikke under oppfølging",id:e.PRIVAT_BRUKER,checked:p()},{label:"Manuell",id:e.MANUELL_BRUKER,checked:A()},{label:"KRR",id:e.KRR_BRUKER,checked:R()},{label:"Ikke innlogget med nivå 4",id:e.INNLOGGET_NIVAA4,checked:I()},{label:"Ingen oppfølgingsperioder",id:e.INGEN_OPPF_PERIODER,checked:m()},{label:"Gammel eskaleringsvarsel",id:e.GAMMEL_ESKALERT_BRUKER,checked:x()},{label:"Eskaleringsvarsel",id:e.ESKALERT_BRUKER,checked:b()},{label:"Uleste dialoger",id:e.ULESTE_DIALOGER,checked:f()}],n=[{label:"Automatiske aktiviteter",id:e.AUTOMATISKE_AKTIVITETER,checked:_()},{label:"Arenaaktiviteter",id:e.ARENA_AKTIVITETER,checked:j()},{label:"Testaktiviteter",id:e.TEST_AKTIVITETER,checked:K()},{label:"Eksterne aktiviteter",id:e.EKSTERNE_AKTIVITETER,checked:N()}],u=[{label:"Oppfølging feiler",id:e.OPPF_FEILET,checked:L()},{label:"Dialog feiler",id:e.DIALOG_FEILET,checked:F()},{label:"Aktivitet feiler",id:e.AKTIVITET_FEILET,checked:B()},{label:"Arena feiler",id:e.ARENA_FEILET,checked:O()},{label:"Mål feiler",id:e.MAAL_FEILET,checked:V()},{label:"Kun oppdatering feiler",id:e.OPPDATERING_KUN_FEILER,checked:P()},{label:"Nivå 4 feiler",id:e.NIVAA4_FEILET,checked:S()}],d=l=>{const t=l.currentTarget;k(t.id,t.checked),window.location.reload()},T=l=>{const t=l===s.veileder;k(e.EKSTERN_BRUKER,!t),window.location.reload()},g=()=>U()?s.ekstern:s.veileder;return a.jsxs("div",{className:"flex flex-col justify-center items-center p-4 gap-4",children:[a.jsx(D,{level:"1",size:"large",children:"Demo innstillinger"}),a.jsxs("section",{className:"flex flex-wrap gap-4",children:[a.jsx(w,{legend:"Brukertype",name:"brukertype-rdio-panel",value:g(),onChange:T,children:r.map(({id:l,label:t})=>a.jsx(y,{id:l,value:l,children:t},l))}),a.jsx(c,{value:E(i),legend:"Brukers tilstand",children:i.map(({id:l,label:t})=>a.jsx(o,{value:l,id:l,onClick:d,children:t},l))}),a.jsx(c,{value:E(n),legend:"Aktivitet tilstand",children:n.map(({id:l,label:t})=>a.jsx(o,{value:l,id:l,onClick:d,children:t},l))}),a.jsx(c,{value:[h()],legend:"Ingen mål",children:[{label:"Ingen mål",id:e.INGEN_MAL,checked:h()}].map(({id:l,label:t})=>a.jsx(o,{value:l,id:l,onClick:d,children:t},l))}),a.jsx(c,{value:E(u),legend:"Feiltilstander",children:u.map(({id:l,label:t})=>a.jsx(o,{value:l,id:l,onClick:d,children:t},l))}),a.jsx(q,{})]})]})},Q=({onClick:r})=>a.jsxs("svg",{"aria-hidden":!0,role:"img",xmlns:"http://www.w3.org/2000/svg",height:110,width:110,className:"demo-ikon",onClick:r,children:[a.jsx("polygon",{points:"0,0 110,0 110,110"}),a.jsx("text",{x:40,y:10,transform:"rotate(45 20,40)",children:"DEMO"})]}),W=()=>{const[r,i]=G.useState(!1);return a.jsxs("div",{children:[a.jsx(Q,{onClick:()=>i(!0)}),a.jsx(C,{open:r,onClose:()=>i(!1),children:a.jsx(J,{})})]})};export{W as default}; +//# sourceMappingURL=DemoBanner-XQkUFoVD.js.map diff --git a/assets/DemoBanner-XQkUFoVD.js.map b/assets/DemoBanner-XQkUFoVD.js.map new file mode 100644 index 000000000..0c8b0576b --- /dev/null +++ b/assets/DemoBanner-XQkUFoVD.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DemoBanner-XQkUFoVD.js","sources":["../../src/mocks/demo/Hurtigfilter.tsx","../../src/mocks/demo/DemoDashboard.tsx","../../src/mocks/demo/DemoIkon.tsx","../../src/mocks/demo/DemoBanner.tsx"],"sourcesContent":["import { Select } from '@navikt/ds-react';\nimport React from 'react';\n\nimport { LocalStorageElement, settLocalStorage } from './localStorage';\n\nconst hurtigfilterType = [\n {\n id: 'nyBrukerStdOrd',\n name: 'Ny bruker - Standard innsats',\n avskrudd: [\n LocalStorageElement.INGEN_OPPF_PERIODER,\n LocalStorageElement.PRIVAT_BRUKER,\n LocalStorageElement.MANUELL_BRUKER,\n LocalStorageElement.ARENA_AKTIVITETER,\n LocalStorageElement.TEST_AKTIVITETER,\n ],\n paskrudd: [LocalStorageElement.AUTOMATISKE_AKTIVITETER],\n },\n];\n\nconst markerValg = (tilstander: LocalStorageElement[]) => {\n tilstander.forEach((tilstand) => settLocalStorage(tilstand, true));\n};\n\nconst skruAvValg = (tilstander: LocalStorageElement[]) => {\n tilstander.forEach((tilstand) => settLocalStorage(tilstand, false));\n};\n\nconst Hurtigfilter = () => {\n return (\n
\n Hurtigfilter\n {\n const valgtFilter = hurtigfilterType.find((x) => x.id === e.target.value);\n if (valgtFilter !== undefined) {\n markerValg(valgtFilter.paskrudd);\n skruAvValg(valgtFilter.avskrudd);\n window.location.reload();\n }\n }}\n >\n \n {hurtigfilterType.map((hurtigfilter) => (\n \n ))}\n \n
\n );\n};\n\nexport default Hurtigfilter;\n","import { Checkbox, CheckboxGroup, Heading, Radio, RadioGroup } from '@navikt/ds-react';\nimport React from 'react';\n\nimport Hurtigfilter from './Hurtigfilter';\nimport {\n LocalStorageElement,\n aktivitetFeilet,\n arenaFeilet,\n dialogFeilet,\n erEksternBruker,\n erEskalertBruker,\n erEskalertBrukerGammel,\n erKRRBruker,\n erManuellBruker,\n erPrivatBruker,\n ikkeLoggetInnNivaa4,\n ingenMal,\n ingenOppfPerioder,\n maalFeilet,\n nivaa4Feilet,\n oppdateringKunFeiler,\n oppfFeilet,\n settLocalStorage,\n ulesteDialoger,\n visArenaAktiviteter,\n visAutomatiskeAktiviteter,\n visEksterneAktiviteter,\n visTestAktiviteter,\n} from './localStorage';\n\nconst brukertype = {\n ekstern: 'eksternbruker',\n veileder: 'veilederbruker',\n};\n\ninterface Checkable {\n label: string;\n id: string;\n checked: boolean;\n}\n\nconst getChecked = (values: Checkable[]): string[] => {\n return values.filter((it) => it.checked).map((it) => it.id);\n};\n\nconst DemoDashboard = () => {\n const radios = [\n {\n label: 'Veileder',\n id: brukertype.veileder,\n value: brukertype.veileder,\n },\n {\n label: 'Eksternbruker',\n id: brukertype.ekstern,\n value: brukertype.ekstern,\n },\n ];\n const features = [\n {\n label: 'Ikke under oppfølging',\n id: LocalStorageElement.PRIVAT_BRUKER,\n checked: erPrivatBruker(),\n },\n {\n label: 'Manuell',\n id: LocalStorageElement.MANUELL_BRUKER,\n checked: erManuellBruker(),\n },\n {\n label: 'KRR',\n id: LocalStorageElement.KRR_BRUKER,\n checked: erKRRBruker(),\n },\n {\n label: 'Ikke innlogget med nivå 4',\n id: LocalStorageElement.INNLOGGET_NIVAA4,\n checked: ikkeLoggetInnNivaa4(),\n },\n {\n label: 'Ingen oppfølgingsperioder',\n id: LocalStorageElement.INGEN_OPPF_PERIODER,\n checked: ingenOppfPerioder(),\n },\n {\n label: 'Gammel eskaleringsvarsel',\n id: LocalStorageElement.GAMMEL_ESKALERT_BRUKER,\n checked: erEskalertBrukerGammel(),\n },\n {\n label: 'Eskaleringsvarsel',\n id: LocalStorageElement.ESKALERT_BRUKER,\n checked: erEskalertBruker(),\n },\n {\n label: 'Uleste dialoger',\n id: LocalStorageElement.ULESTE_DIALOGER,\n checked: ulesteDialoger(),\n },\n ];\n const aktivitetTilstand = [\n {\n label: 'Automatiske aktiviteter',\n id: LocalStorageElement.AUTOMATISKE_AKTIVITETER,\n checked: visAutomatiskeAktiviteter(),\n },\n {\n label: 'Arenaaktiviteter',\n id: LocalStorageElement.ARENA_AKTIVITETER,\n checked: visArenaAktiviteter(),\n },\n {\n label: 'Testaktiviteter',\n id: LocalStorageElement.TEST_AKTIVITETER,\n checked: visTestAktiviteter(),\n },\n {\n label: 'Eksterne aktiviteter',\n id: LocalStorageElement.EKSTERNE_AKTIVITETER,\n checked: visEksterneAktiviteter(),\n },\n ];\n const feiltilstander = [\n {\n label: 'Oppfølging feiler',\n id: LocalStorageElement.OPPF_FEILET,\n checked: oppfFeilet(),\n },\n {\n label: 'Dialog feiler',\n id: LocalStorageElement.DIALOG_FEILET,\n checked: dialogFeilet(),\n },\n {\n label: 'Aktivitet feiler',\n id: LocalStorageElement.AKTIVITET_FEILET,\n checked: aktivitetFeilet(),\n },\n {\n label: 'Arena feiler',\n id: LocalStorageElement.ARENA_FEILET,\n checked: arenaFeilet(),\n },\n {\n label: 'Mål feiler',\n id: LocalStorageElement.MAAL_FEILET,\n checked: maalFeilet(),\n },\n {\n label: 'Kun oppdatering feiler',\n id: LocalStorageElement.OPPDATERING_KUN_FEILER,\n checked: oppdateringKunFeiler(),\n },\n {\n label: 'Nivå 4 feiler',\n id: LocalStorageElement.NIVAA4_FEILET,\n checked: nivaa4Feilet(),\n },\n ];\n\n const endreTilstand = (e: React.MouseEvent) => {\n const checkbox = e.currentTarget;\n settLocalStorage(checkbox.id, checkbox.checked);\n window.location.reload();\n };\n\n const endreBrukerType = (value: 'eksternbruker' | 'veilederbruker') => {\n const erVeileder = value === brukertype.veileder;\n settLocalStorage(LocalStorageElement.EKSTERN_BRUKER, !erVeileder);\n window.location.reload();\n };\n\n const getBrukerType = () => {\n if (erEksternBruker()) {\n return brukertype.ekstern;\n } else return brukertype.veileder;\n };\n\n return (\n
\n \n Demo innstillinger\n \n
\n \n {radios.map(({ id, label }) => (\n \n {label}\n \n ))}\n \n \n {features.map(({ id, label }) => (\n \n {label}\n \n ))}\n \n \n {aktivitetTilstand.map(({ id, label }) => (\n \n {label}\n \n ))}\n \n \n {[\n {\n label: 'Ingen mål',\n id: LocalStorageElement.INGEN_MAL,\n checked: ingenMal(),\n },\n ].map(({ id, label }) => (\n \n {label}\n \n ))}\n \n \n {feiltilstander.map(({ id, label }) => (\n \n {label}\n \n ))}\n \n \n
\n
\n );\n};\n\nexport default DemoDashboard;\n","import './DemoIkon.less';\n\nimport React from 'react';\n\ninterface Props {\n onClick: () => void;\n}\n\nconst DemoIkon = ({ onClick }: Props) => {\n return (\n \n \n \n DEMO\n \n \n );\n};\n\nexport default DemoIkon;\n","import { Modal } from '@navikt/ds-react';\nimport React, { useState } from 'react';\n\n// CSS is imported twice when in demo mode to support switching between web-components and normal render\nimport '@navikt/ds-css';\nimport '../../tailwind.css';\nimport '../../index.less';\n\nimport DemoDashboard from './DemoDashboard';\nimport DemoIkon from './DemoIkon';\n\nconst DemoBanner = () => {\n const [open, setOpen] = useState(false);\n\n return (\n
\n setOpen(true)} />\n setOpen(false)}>\n \n \n
\n );\n};\n\nexport default DemoBanner;\n"],"names":["hurtigfilterType","LocalStorageElement","markerValg","tilstander","tilstand","settLocalStorage","skruAvValg","Hurtigfilter","jsxs","jsx","Select","e","valgtFilter","x","hurtigfilter","brukertype","getChecked","values","it","DemoDashboard","radios","features","erPrivatBruker","erManuellBruker","erKRRBruker","ikkeLoggetInnNivaa4","ingenOppfPerioder","erEskalertBrukerGammel","erEskalertBruker","ulesteDialoger","aktivitetTilstand","visAutomatiskeAktiviteter","visArenaAktiviteter","visTestAktiviteter","visEksterneAktiviteter","feiltilstander","oppfFeilet","dialogFeilet","aktivitetFeilet","arenaFeilet","maalFeilet","oppdateringKunFeiler","nivaa4Feilet","endreTilstand","checkbox","endreBrukerType","value","erVeileder","getBrukerType","erEksternBruker","Heading","RadioGroup","id","label","Radio","CheckboxGroup","Checkbox","ingenMal","DemoIkon","onClick","DemoBanner","open","setOpen","useState","Modal"],"mappings":"wUAKA,MAAMA,EAAmB,CACrB,CACI,GAAI,iBACJ,KAAM,+BACN,SAAU,CACNC,EAAoB,oBACpBA,EAAoB,cACpBA,EAAoB,eACpBA,EAAoB,kBACpBA,EAAoB,gBACxB,EACA,SAAU,CAACA,EAAoB,uBAAuB,CAC1D,CACJ,EAEMC,EAAcC,GAAsC,CACtDA,EAAW,QAASC,GAAaC,EAAiBD,EAAU,EAAI,CAAC,CACrE,EAEME,EAAcH,GAAsC,CACtDA,EAAW,QAASC,GAAaC,EAAiBD,EAAU,EAAK,CAAC,CACtE,EAEMG,EAAe,IAEbC,EAAA,KAAC,MAAI,CAAA,UAAU,OACX,SAAA,CAAAC,EAAAA,IAAC,UAAO,SAAY,cAAA,CAAA,EACpBD,EAAA,KAACE,EAAA,CACG,MAAM,GACN,SAAWC,GAAM,CACP,MAAAC,EAAcZ,EAAiB,KAAMa,GAAMA,EAAE,KAAOF,EAAE,OAAO,KAAK,EACpEC,IAAgB,SAChBV,EAAWU,EAAY,QAAQ,EAC/BN,EAAWM,EAAY,QAAQ,EAC/B,OAAO,SAAS,SAExB,EAEA,SAAA,CAAAH,EAAAA,IAAC,UAAO,SAAW,aAAA,CAAA,EAClBT,EAAiB,IAAKc,GAClBL,EAAAA,IAAA,SAAA,CAAO,MAAOK,EAAa,GACvB,SAAAA,EAAa,IADmB,EAAAA,EAAa,EAElD,CACH,CAAA,CAAA,CACL,CACJ,CAAA,CAAA,ECpBFC,EAAa,CACf,QAAS,gBACT,SAAU,gBACd,EAQMC,EAAcC,GACTA,EAAO,OAAQC,GAAOA,EAAG,OAAO,EAAE,IAAKA,GAAOA,EAAG,EAAE,EAGxDC,EAAgB,IAAM,CACxB,MAAMC,EAAS,CACX,CACI,MAAO,WACP,GAAIL,EAAW,SACf,MAAOA,EAAW,QACtB,EACA,CACI,MAAO,gBACP,GAAIA,EAAW,QACf,MAAOA,EAAW,OACtB,CAAA,EAEEM,EAAW,CACb,CACI,MAAO,wBACP,GAAIpB,EAAoB,cACxB,QAASqB,EAAe,CAC5B,EACA,CACI,MAAO,UACP,GAAIrB,EAAoB,eACxB,QAASsB,EAAgB,CAC7B,EACA,CACI,MAAO,MACP,GAAItB,EAAoB,WACxB,QAASuB,EAAY,CACzB,EACA,CACI,MAAO,4BACP,GAAIvB,EAAoB,iBACxB,QAASwB,EAAoB,CACjC,EACA,CACI,MAAO,4BACP,GAAIxB,EAAoB,oBACxB,QAASyB,EAAkB,CAC/B,EACA,CACI,MAAO,2BACP,GAAIzB,EAAoB,uBACxB,QAAS0B,EAAuB,CACpC,EACA,CACI,MAAO,oBACP,GAAI1B,EAAoB,gBACxB,QAAS2B,EAAiB,CAC9B,EACA,CACI,MAAO,kBACP,GAAI3B,EAAoB,gBACxB,QAAS4B,EAAe,CAC5B,CAAA,EAEEC,EAAoB,CACtB,CACI,MAAO,0BACP,GAAI7B,EAAoB,wBACxB,QAAS8B,EAA0B,CACvC,EACA,CACI,MAAO,mBACP,GAAI9B,EAAoB,kBACxB,QAAS+B,EAAoB,CACjC,EACA,CACI,MAAO,kBACP,GAAI/B,EAAoB,iBACxB,QAASgC,EAAmB,CAChC,EACA,CACI,MAAO,uBACP,GAAIhC,EAAoB,qBACxB,QAASiC,EAAuB,CACpC,CAAA,EAEEC,EAAiB,CACnB,CACI,MAAO,oBACP,GAAIlC,EAAoB,YACxB,QAASmC,EAAW,CACxB,EACA,CACI,MAAO,gBACP,GAAInC,EAAoB,cACxB,QAASoC,EAAa,CAC1B,EACA,CACI,MAAO,mBACP,GAAIpC,EAAoB,iBACxB,QAASqC,EAAgB,CAC7B,EACA,CACI,MAAO,eACP,GAAIrC,EAAoB,aACxB,QAASsC,EAAY,CACzB,EACA,CACI,MAAO,aACP,GAAItC,EAAoB,YACxB,QAASuC,EAAW,CACxB,EACA,CACI,MAAO,yBACP,GAAIvC,EAAoB,uBACxB,QAASwC,EAAqB,CAClC,EACA,CACI,MAAO,gBACP,GAAIxC,EAAoB,cACxB,QAASyC,EAAa,CAC1B,CAAA,EAGEC,EAAiBhC,GAA0C,CAC7D,MAAMiC,EAAWjC,EAAE,cACFN,EAAAuC,EAAS,GAAIA,EAAS,OAAO,EAC9C,OAAO,SAAS,QAAO,EAGrBC,EAAmBC,GAA8C,CAC7D,MAAAC,EAAaD,IAAU/B,EAAW,SACvBV,EAAAJ,EAAoB,eAAgB,CAAC8C,CAAU,EAChE,OAAO,SAAS,QAAO,EAGrBC,EAAgB,IACdC,IACOlC,EAAW,QACRA,EAAW,SAIzB,OAAAP,EAAA,KAAC,MAAI,CAAA,UAAU,sDACX,SAAA,CAAAC,MAACyC,EAAQ,CAAA,MAAM,IAAI,KAAK,QAAQ,SAEhC,qBAAA,EACA1C,EAAAA,KAAC,UAAQ,CAAA,UAAU,uBACf,SAAA,CAAAC,EAAA,IAAC0C,EAAA,CACG,OAAO,aACP,KAAK,wBACL,MAAOH,EAAc,EACrB,SAAUH,EAET,SAAOzB,EAAA,IAAI,CAAC,CAAE,GAAAgC,EAAI,MAAAC,CAAM,IACpB5C,EAAA,IAAA6C,EAAA,CAAe,GAAAF,EAAQ,MAAOA,EAC1B,SAAAC,CAAA,EADOD,CAEZ,CACH,CAAA,CACL,EACA3C,EAAAA,IAAC8C,EAAc,CAAA,MAAOvC,EAAWK,CAAQ,EAAG,OAAQ,mBAC/C,SAASA,EAAA,IAAI,CAAC,CAAE,GAAA+B,EAAI,MAAAC,CAAM,IACtB5C,EAAA,IAAA+C,EAAA,CAAkB,MAAOJ,EAAI,GAAAA,EAAQ,QAAST,EAC1C,SAAAU,CAAA,EADUD,CAEf,CACH,CACL,CAAA,EACA3C,EAAAA,IAAC8C,EAAc,CAAA,MAAOvC,EAAWc,CAAiB,EAAG,OAAQ,qBACxD,SAAkBA,EAAA,IAAI,CAAC,CAAE,GAAAsB,EAAI,MAAAC,CAAM,IAC/B5C,EAAA,IAAA+C,EAAA,CAAkB,MAAOJ,EAAI,GAAAA,EAAQ,QAAST,EAC1C,SAAAU,CAAA,EADUD,CAEf,CACH,CACL,CAAA,EACA3C,MAAC8C,GAAc,MAAO,CAACE,GAAU,EAAG,OAAQ,YACvC,SAAA,CACG,CACI,MAAO,YACP,GAAIxD,EAAoB,UACxB,QAASwD,EAAS,CACtB,CAAA,EACF,IAAI,CAAC,CAAE,GAAAL,EAAI,MAAAC,KACT5C,EAAA,IAAC+C,EAAkB,CAAA,MAAOJ,EAAI,GAAAA,EAAQ,QAAST,EAC1C,SADUU,GAAAD,CAEf,CACH,EACL,EACA3C,EAAAA,IAAC8C,EAAc,CAAA,MAAOvC,EAAWmB,CAAc,EAAG,OAAO,iBACpD,SAAeA,EAAA,IAAI,CAAC,CAAE,GAAAiB,EAAI,MAAAC,CAAM,IAC5B5C,EAAA,IAAA+C,EAAA,CAAkB,MAAOJ,EAAI,GAAAA,EAAQ,QAAST,EAC1C,SAAAU,CAAA,EADUD,CAEf,CACH,CACL,CAAA,QACC7C,EAAa,EAAA,CAAA,EAClB,CACJ,CAAA,CAAA,CAER,EClOMmD,EAAW,CAAC,CAAE,QAAAC,KAEZnD,EAAA,KAAC,MAAA,CACG,cAAa,GACb,KAAK,MACL,MAAM,6BACN,OAAQ,IACR,MAAO,IACP,UAAU,YACV,QAAAmD,EAEA,SAAA,CAAClD,EAAAA,IAAA,UAAA,CAAQ,OAAO,mBAAoB,CAAA,EACpCA,EAAAA,IAAC,QAAK,EAAG,GAAI,EAAG,GAAI,UAAU,mBAAmB,SAEjD,MAAA,CAAA,CAAA,CAAA,CAAA,ECXNmD,EAAa,IAAM,CACrB,KAAM,CAACC,EAAMC,CAAO,EAAIC,WAAS,EAAK,EAEtC,cACK,MACG,CAAA,SAAA,CAAAtD,EAAA,IAACiD,EAAS,CAAA,QAAS,IAAMI,EAAQ,EAAI,EAAG,EACxCrD,EAAAA,IAACuD,EAAM,CAAA,KAAAH,EAAY,QAAS,IAAMC,EAAQ,EAAK,EAC3C,SAACrD,EAAA,IAAAU,EAAA,CAAA,CAAc,CACnB,CAAA,CACJ,CAAA,CAAA,CAER"} \ No newline at end of file diff --git a/assets/Radio-VOSI1NDc.js b/assets/Radio-VOSI1NDc.js new file mode 100644 index 000000000..5086492db --- /dev/null +++ b/assets/Radio-VOSI1NDc.js @@ -0,0 +1,2 @@ +import{r as u,R as y,i as ct,$ as dt}from"./index-pPRcGYyw.js";function ut(e){var n,o,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e))for(n=0;nj({"navds-typo--spacing":e.spacing,"navds-typo--truncate":e.truncate,"navds-typo--semibold":e.weight==="semibold",[`navds-typo--align-${e.align}`]:e.align,[`navds-typo--color-${e.textColor}`]:e.textColor,"navds-typo--visually-hidden":e.visuallyHidden,"navds-typo--uppercase":e.uppercase});var $t=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{className:o,size:t="medium",as:r="p",spacing:i,truncate:a,weight:s="regular",align:l,visuallyHidden:d,textColor:f}=e,m=$t(e,["className","size","as","spacing","truncate","weight","align","visuallyHidden","textColor"]);return y.createElement(r,Object.assign({},m,{ref:n,className:j(o,"navds-body-short",`navds-body-short--${t}`,ce({spacing:i,truncate:a,weight:s,align:l,visuallyHidden:d,textColor:f}))}))}),oe=Ft;var zt=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{className:o,size:t="medium",spacing:r,uppercase:i,as:a="p",truncate:s,weight:l="regular",align:d,visuallyHidden:f,textColor:m}=e,h=zt(e,["className","size","spacing","uppercase","as","truncate","weight","align","visuallyHidden","textColor"]);return y.createElement(a,Object.assign({},h,{ref:n,className:j(o,"navds-detail",ce({spacing:r,truncate:s,weight:l,align:d,visuallyHidden:f,textColor:m,uppercase:i}),{"navds-detail--small":t==="small"})}))}),Ht=Bt;var Vt=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{className:o,size:t,spacing:r,as:i="p"}=e,a=Vt(e,["className","size","spacing","as"]);return y.createElement(i,Object.assign({},a,{ref:n,className:j("navds-error-message","navds-label",o,ce({spacing:r}),{"navds-label--small":t==="small"})}))}),ft=Kt;var Wt=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{level:o="1",size:t,className:r,as:i,spacing:a,align:s,visuallyHidden:l,textColor:d}=e,f=Wt(e,["level","size","className","as","spacing","align","visuallyHidden","textColor"]);const m=i??`h${o}`;return y.createElement(m,Object.assign({},f,{ref:n,className:j(r,"navds-heading",`navds-heading--${t}`,ce({spacing:a,align:s,visuallyHidden:l,textColor:d}))}))}),Gt=qt;var Ut=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{className:o,size:t="medium",as:r="label",spacing:i,visuallyHidden:a,textColor:s}=e,l=Ut(e,["className","size","as","spacing","visuallyHidden","textColor"]);return y.createElement(r,Object.assign({},l,{ref:n,className:j(o,"navds-label",ce({spacing:i,visuallyHidden:a,textColor:s}),{"navds-label--small":t==="small"})}))}),$e=Xt,K=(e,n)=>Object.entries(e).filter(([o])=>!n.includes(o)).reduce((o,[t,r])=>Object.assign(Object.assign({},o),{[t]:r}),{}),Yt=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{};let qe=0;function Zt(e){const[n,o]=u.useState(e),t=e||n;return u.useEffect(()=>{n==null&&(qe+=1,o(`aksel-id-${qe}`))},[n]),t}const Ge=y.useId;function U(e){var n;if(Ge!==void 0){const o=Ge();return e??o.replace(/(:)/g,"")}return(n=Zt(e))!==null&&n!==void 0?n:""}let Ue=0;function Jt(e){const[n,o]=u.useState(e),t=e||n;return u.useEffect(()=>{n==null&&(Ue+=1,o(`aksel-icon-${Ue}`))},[n]),t}const Xe=y.useId;function Fe(e){var n;if(Xe!==void 0){const o=Xe();return e??o.replace(/(:)/g,"")}return(n=Jt(e))!==null&&n!==void 0?n:""}var Qt=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{title:o,titleId:t}=e,r=Qt(e,["title","titleId"]);let i=Fe();return i=o?t||"title-"+i:void 0,u.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,role:"img",ref:n,"aria-labelledby":i},r),o?u.createElement("title",{id:i},o):null,u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.97 9.47a.75.75 0 0 1 1.06 0L12 14.44l4.97-4.97a.75.75 0 1 1 1.06 1.06l-5.5 5.5a.75.75 0 0 1-1.06 0l-5.5-5.5a.75.75 0 0 1 0-1.06Z",fill:"currentColor"}))}),tn=en;var nn=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{title:o,titleId:t}=e,r=nn(e,["title","titleId"]);let i=Fe();return i=o?t||"title-"+i:void 0,u.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,role:"img",ref:n,"aria-labelledby":i},r),o?u.createElement("title",{id:i},o):null,u.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2.25A4.75 4.75 0 0 0 7.25 7v2.25H7A1.75 1.75 0 0 0 5.25 11v9c0 .414.336.75.75.75h12a.75.75 0 0 0 .75-.75v-9A1.75 1.75 0 0 0 17 9.25h-.25V7A4.75 4.75 0 0 0 12 2.25Zm3.25 7V7a3.25 3.25 0 0 0-6.5 0v2.25h6.5ZM12 13a1.5 1.5 0 0 0-.75 2.8V17a.75.75 0 0 0 1.5 0v-1.2A1.5 1.5 0 0 0 12 13Z",fill:"currentColor"}))}),rn=on;var an=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{title:o,titleId:t}=e,r=an(e,["title","titleId"]);let i=Fe();return i=o?t||"title-"+i:void 0,u.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,role:"img",ref:n,"aria-labelledby":i},r),o?u.createElement("title",{id:i},o):null,u.createElement("path",{d:"M6.53 5.47a.75.75 0 0 0-1.06 1.06L10.94 12l-5.47 5.47a.75.75 0 1 0 1.06 1.06L12 13.06l5.47 5.47a.75.75 0 1 0 1.06-1.06L13.06 12l5.47-5.47a.75.75 0 0 0-1.06-1.06L12 10.94 6.53 5.47Z",fill:"currentColor"}))}),sn=ln;function Me(e,n,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e==null||e(r),o===!1||!r.defaultPrevented)return n==null?void 0:n(r)}}function cn(e){return n=>{e.forEach(o=>{typeof o=="function"?o(n):o!=null&&(o.current=n)})}}function mt(...e){return y.useCallback(cn(e),e)}var dn=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{className:o,size:t="medium",title:r="venter...",transparent:i=!1,variant:a="neutral",id:s}=e,l=dn(e,["className","size","title","transparent","variant","id"]);const d=U();return y.createElement("svg",Object.assign({"aria-labelledby":s??`loader-${d}`,ref:n,className:j("navds-loader",o,`navds-loader--${t}`,`navds-loader--${a}`,{"navds-loader--transparent":i}),focusable:"false",viewBox:"0 0 50 50",preserveAspectRatio:"xMidYMid"},K(l,["children"])),y.createElement("title",{id:s??`loader-${d}`},r),y.createElement("circle",{className:"navds-loader__background",xmlns:"http://www.w3.org/2000/svg",cx:"25",cy:"25",r:"20",fill:"none"}),y.createElement("circle",{className:"navds-loader__foreground",cx:"25",cy:"25",r:"20",fill:"none",strokeDasharray:"50 155"}))}),fn=un;var mn=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{as:o="button",variant:t="primary",className:r,children:i,size:a="medium",loading:s=!1,disabled:l,style:d,icon:f,iconPosition:m="left"}=e,h=mn(e,["as","variant","className","children","size","loading","disabled","style","icon","iconPosition"]);const c=u.useRef(null),[g,p]=u.useState(),b=mt(c,n);Yt(()=>{if(s){const _=window.requestAnimationFrame(()=>{var x,w;p((w=(x=c==null?void 0:c.current)===null||x===void 0?void 0:x.getBoundingClientRect())===null||w===void 0?void 0:w.width)});return()=>{p(void 0),cancelAnimationFrame(_)}}},[s,i]);const v=l??g?K(h,["href"]):h,O=_=>{_.key===" "&&!l&&!g&&_.currentTarget.click()};return y.createElement(o,Object.assign({},o!=="button"?{role:"button"}:{},v,{ref:b,onKeyUp:Me(v.onKeyUp,O),className:j(r,"navds-button",`navds-button--${t}`,`navds-button--${a}`,{"navds-button--loading":g,"navds-button--icon-only":!!f&&!i,"navds-button--disabled":l??g}),style:Object.assign(Object.assign({},d),{width:g}),disabled:l??g?!0:void 0}),g?y.createElement(fn,{size:a}):y.createElement(y.Fragment,null,f&&m==="left"&&y.createElement("span",{className:"navds-button__icon"},f),i&&y.createElement($e,{as:"span",size:a==="medium"?"medium":"small"},i),f&&m==="right"&&y.createElement("span",{className:"navds-button__icon"},f)))}),gn=hn,ht=u.createContext(null),Qo=()=>{const e=u.useContext(ht);return e||console.warn("useDateInputContext must be used with DateContext"),e},ze=({readOnly:e,nativeReadOnly:n=!0})=>e?y.createElement(rn,Object.assign({},n?{"aria-hidden":!0}:{title:"readonly"},{className:"navds-form-field__readonly-icon"})):null,se=u.createContext(null),Ee=(e,n)=>{var o,t,r;const{size:i,error:a,errorId:s}=e,l=u.useContext(se),d=U(),f=(o=e.id)!==null&&o!==void 0?o:`${n}-${d}`,m=s??`${n}-error-${d}`,h=`${n}-description-${d}`,c=(l==null?void 0:l.disabled)||e.disabled,g=((l==null?void 0:l.readOnly)||e.readOnly)&&!c||void 0,p=!c&&!g&&!!(a||l!=null&&l.error),b=!c&&!g&&!!a&&typeof a!="boolean",v=Object.assign({},p?{"aria-invalid":!0}:{});return e!=null&&e.required,{showErrorMsg:b,hasError:p,errorId:m,inputDescriptionId:h,size:(t=i??(l==null?void 0:l.size))!==null&&t!==void 0?t:"medium",readOnly:g,inputProps:Object.assign(Object.assign({id:f},v),{"aria-describedby":j(e["aria-describedby"],{[h]:!!(e!=null&&e.description)&&typeof(e==null?void 0:e.description)=="string",[m]:b,[(r=l==null?void 0:l.errorId)!==null&&r!==void 0?r:""]:p&&!!(l!=null&&l.error)})||void 0,disabled:c})}},re=Math.min,Z=Math.max,ye=Math.round,he=Math.floor,X=e=>({x:e,y:e}),vn={left:"right",right:"left",bottom:"top",top:"bottom"},pn={start:"end",end:"start"};function Ie(e,n,o){return Z(e,re(n,o))}function de(e,n){return typeof e=="function"?e(n):e}function J(e){return e.split("-")[0]}function ue(e){return e.split("-")[1]}function gt(e){return e==="x"?"y":"x"}function Be(e){return e==="y"?"height":"width"}function _e(e){return["top","bottom"].includes(J(e))?"y":"x"}function He(e){return gt(_e(e))}function yn(e,n,o){o===void 0&&(o=!1);const t=ue(e),r=He(e),i=Be(r);let a=r==="x"?t===(o?"end":"start")?"right":"left":t==="start"?"bottom":"top";return n.reference[i]>n.floating[i]&&(a=be(a)),[a,be(a)]}function bn(e){const n=be(e);return[Ae(e),n,Ae(n)]}function Ae(e){return e.replace(/start|end/g,n=>pn[n])}function wn(e,n,o){const t=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return o?n?r:t:n?t:r;case"left":case"right":return n?i:a;default:return[]}}function On(e,n,o,t){const r=ue(e);let i=wn(J(e),o==="start",t);return r&&(i=i.map(a=>a+"-"+r),n&&(i=i.concat(i.map(Ae)))),i}function be(e){return e.replace(/left|right|bottom|top/g,n=>vn[n])}function xn(e){return{top:0,right:0,bottom:0,left:0,...e}}function vt(e){return typeof e!="number"?xn(e):{top:e,right:e,bottom:e,left:e}}function we(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Y(e){return pt(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function W(e){var n;return(n=(pt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function pt(e){return e instanceof Node||e instanceof F(e).Node}function I(e){return e instanceof Element||e instanceof F(e).Element}function z(e){return e instanceof HTMLElement||e instanceof F(e).HTMLElement}function Le(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof F(e).ShadowRoot}function fe(e){const{overflow:n,overflowX:o,overflowY:t,display:r}=B(e);return/auto|scroll|overlay|hidden|clip/.test(n+t+o)&&!["inline","contents"].includes(r)}function En(e){return["table","td","th"].includes(Y(e))}function Ve(e){const n=Ke(),o=B(e);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!n&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!n&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(t=>(o.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(o.contain||"").includes(t))}function _n(e){let n=Q(e);for(;z(n)&&!me(n);){if(Ve(n))return n;n=Q(n)}return null}function Ke(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function me(e){return["html","body","#document"].includes(Y(e))}function B(e){return F(e).getComputedStyle(e)}function Ce(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Q(e){if(Y(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Le(e)&&e.host||W(e);return Le(n)?n.host:n}function yt(e){const n=Q(e);return me(n)?e.ownerDocument?e.ownerDocument.body:e.body:z(n)&&fe(n)?n:yt(n)}function G(e,n,o){var t;n===void 0&&(n=[]),o===void 0&&(o=!0);const r=yt(e),i=r===((t=e.ownerDocument)==null?void 0:t.body),a=F(r);return i?n.concat(a,a.visualViewport||[],fe(r)?r:[],a.frameElement&&o?G(a.frameElement):[]):n.concat(r,G(r,[],o))}function Ye(e,n){if(!e||!n)return!1;const o=n.getRootNode&&n.getRootNode();if(e.contains(n))return!0;if(o&&Le(o)){let t=n;for(;t;){if(e===t)return!0;t=t.parentNode||t.host}}return!1}function Cn(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Pn(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(n=>{let{brand:o,version:t}=n;return o+"/"+t}).join(" "):navigator.userAgent}function Rn(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const n=/Android/i;return(n.test(Cn())||n.test(Pn()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function kn(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function Ze(e,n){const o=["mouse","pen"];return n||o.push("",void 0),o.includes(e)}function Sn(e){return"nativeEvent"in e}function jn(e){return e.matches("html,body")}function Re(e){return(e==null?void 0:e.ownerDocument)||document}function ke(e,n){if(n==null)return!1;if("composedPath"in e)return e.composedPath().includes(n);const o=e;return o.target!=null&&n.contains(o.target)}function Nn(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Dn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Mn(e){return z(e)&&e.matches(Dn)}function Je(e,n,o){let{reference:t,floating:r}=e;const i=_e(n),a=He(n),s=Be(a),l=J(n),d=i==="y",f=t.x+t.width/2-r.width/2,m=t.y+t.height/2-r.height/2,h=t[s]/2-r[s]/2;let c;switch(l){case"top":c={x:f,y:t.y-r.height};break;case"bottom":c={x:f,y:t.y+t.height};break;case"right":c={x:t.x+t.width,y:m};break;case"left":c={x:t.x-r.width,y:m};break;default:c={x:t.x,y:t.y}}switch(ue(n)){case"start":c[a]-=h*(o&&d?-1:1);break;case"end":c[a]+=h*(o&&d?-1:1);break}return c}const In=async(e,n,o)=>{const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:a}=o,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(n));let d=await a.getElementRects({reference:e,floating:n,strategy:r}),{x:f,y:m}=Je(d,t,l),h=t,c={},g=0;for(let p=0;p({name:"arrow",options:e,async fn(n){const{x:o,y:t,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=n,{element:d,padding:f=0}=de(e,n)||{};if(d==null)return{};const m=vt(f),h={x:o,y:t},c=He(r),g=Be(c),p=await a.getDimensions(d),b=c==="y",v=b?"top":"left",O=b?"bottom":"right",_=b?"clientHeight":"clientWidth",x=i.reference[g]+i.reference[c]-h[c]-i.floating[g],w=h[c]-i.reference[c],D=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let M=D?D[_]:0;(!M||!await(a.isElement==null?void 0:a.isElement(D)))&&(M=s.floating[_]||i.floating[g]);const A=x/2-w/2,L=M/2-p[g]/2-1,$=re(m[v],L),P=re(m[O],L),S=$,E=M-p[g]-P,C=M/2-p[g]/2+A,N=Ie(S,C,E),R=!l.arrow&&ue(r)!=null&&C!=N&&i.reference[g]/2-(CS<=0)){var L,$;const S=(((L=i.flip)==null?void 0:L.index)||0)+1,E=w[S];if(E)return{data:{index:S,overflows:A},reset:{placement:E}};let C=($=A.filter(N=>N.overflows[0]<=0).sort((N,R)=>N.overflows[1]-R.overflows[1])[0])==null?void 0:$.placement;if(!C)switch(c){case"bestFit":{var P;const N=(P=A.map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:P[0];N&&(C=N);break}case"initialPlacement":C=s;break}if(r!==C)return{reset:{placement:C}}}return{}}}};async function An(e,n){const{placement:o,platform:t,elements:r}=e,i=await(t.isRTL==null?void 0:t.isRTL(r.floating)),a=J(o),s=ue(o),l=_e(o)==="y",d=["left","top"].includes(a)?-1:1,f=i&&l?-1:1,m=de(n,e);let{mainAxis:h,crossAxis:c,alignmentAxis:g}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return s&&typeof g=="number"&&(c=s==="end"?g*-1:g),l?{x:c*f,y:h*d}:{x:h*d,y:c*f}}const tr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){const{x:o,y:t}=n,r=await An(n,e);return{x:o+r.x,y:t+r.y,data:r}}}},nr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:o,y:t,placement:r}=n,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:v,y:O}=b;return{x:v,y:O}}},...l}=de(e,n),d={x:o,y:t},f=await bt(n,l),m=_e(J(r)),h=gt(m);let c=d[h],g=d[m];if(i){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",O=c+f[b],_=c-f[v];c=Ie(O,c,_)}if(a){const b=m==="y"?"top":"left",v=m==="y"?"bottom":"right",O=g+f[b],_=g-f[v];g=Ie(O,g,_)}const p=s.fn({...n,[h]:c,[m]:g});return{...p,data:{x:p.x-o,y:p.y-t}}}}};function wt(e){const n=B(e);let o=parseFloat(n.width)||0,t=parseFloat(n.height)||0;const r=z(e),i=r?e.offsetWidth:o,a=r?e.offsetHeight:t,s=ye(o)!==i||ye(t)!==a;return s&&(o=i,t=a),{width:o,height:t,$:s}}function We(e){return I(e)?e:e.contextElement}function ne(e){const n=We(e);if(!z(n))return X(1);const o=n.getBoundingClientRect(),{width:t,height:r,$:i}=wt(n);let a=(i?ye(o.width):o.width)/t,s=(i?ye(o.height):o.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Ln=X(0);function Ot(e){const n=F(e);return!Ke()||!n.visualViewport?Ln:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Tn(e,n,o){return n===void 0&&(n=!1),!o||n&&o!==F(e)?!1:n}function ee(e,n,o,t){n===void 0&&(n=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),i=We(e);let a=X(1);n&&(t?I(t)&&(a=ne(t)):a=ne(e));const s=Tn(i,o,t)?Ot(i):X(0);let l=(r.left+s.x)/a.x,d=(r.top+s.y)/a.y,f=r.width/a.x,m=r.height/a.y;if(i){const h=F(i),c=t&&I(t)?F(t):t;let g=h.frameElement;for(;g&&t&&c!==h;){const p=ne(g),b=g.getBoundingClientRect(),v=B(g),O=b.left+(g.clientLeft+parseFloat(v.paddingLeft))*p.x,_=b.top+(g.clientTop+parseFloat(v.paddingTop))*p.y;l*=p.x,d*=p.y,f*=p.x,m*=p.y,l+=O,d+=_,g=F(g).frameElement}}return we({width:f,height:m,x:l,y:d})}function $n(e){let{rect:n,offsetParent:o,strategy:t}=e;const r=z(o),i=W(o);if(o===i)return n;let a={scrollLeft:0,scrollTop:0},s=X(1);const l=X(0);if((r||!r&&t!=="fixed")&&((Y(o)!=="body"||fe(i))&&(a=Ce(o)),z(o))){const d=ee(o);s=ne(o),l.x=d.x+o.clientLeft,l.y=d.y+o.clientTop}return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-a.scrollLeft*s.x+l.x,y:n.y*s.y-a.scrollTop*s.y+l.y}}function Fn(e){return Array.from(e.getClientRects())}function xt(e){return ee(W(e)).left+Ce(e).scrollLeft}function zn(e){const n=W(e),o=Ce(e),t=e.ownerDocument.body,r=Z(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),i=Z(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight);let a=-o.scrollLeft+xt(e);const s=-o.scrollTop;return B(t).direction==="rtl"&&(a+=Z(n.clientWidth,t.clientWidth)-r),{width:r,height:i,x:a,y:s}}function Bn(e,n){const o=F(e),t=W(e),r=o.visualViewport;let i=t.clientWidth,a=t.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const d=Ke();(!d||d&&n==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}function Hn(e,n){const o=ee(e,!0,n==="fixed"),t=o.top+e.clientTop,r=o.left+e.clientLeft,i=z(e)?ne(e):X(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,d=t*i.y;return{width:a,height:s,x:l,y:d}}function et(e,n,o){let t;if(n==="viewport")t=Bn(e,o);else if(n==="document")t=zn(W(e));else if(I(n))t=Hn(n,o);else{const r=Ot(e);t={...n,x:n.x-r.x,y:n.y-r.y}}return we(t)}function Et(e,n){const o=Q(e);return o===n||!I(o)||me(o)?!1:B(o).position==="fixed"||Et(o,n)}function Vn(e,n){const o=n.get(e);if(o)return o;let t=G(e,[],!1).filter(s=>I(s)&&Y(s)!=="body"),r=null;const i=B(e).position==="fixed";let a=i?Q(e):e;for(;I(a)&&!me(a);){const s=B(a),l=Ve(a);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||fe(a)&&!l&&Et(e,a))?t=t.filter(f=>f!==a):r=s,a=Q(a)}return n.set(e,t),t}function Kn(e){let{element:n,boundary:o,rootBoundary:t,strategy:r}=e;const a=[...o==="clippingAncestors"?Vn(n,this._c):[].concat(o),t],s=a[0],l=a.reduce((d,f)=>{const m=et(n,f,r);return d.top=Z(m.top,d.top),d.right=re(m.right,d.right),d.bottom=re(m.bottom,d.bottom),d.left=Z(m.left,d.left),d},et(n,s,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Wn(e){return wt(e)}function qn(e,n,o){const t=z(n),r=W(n),i=o==="fixed",a=ee(e,!0,i,n);let s={scrollLeft:0,scrollTop:0};const l=X(0);if(t||!t&&!i)if((Y(n)!=="body"||fe(r))&&(s=Ce(n)),t){const d=ee(n,!0,i,n);l.x=d.x+n.clientLeft,l.y=d.y+n.clientTop}else r&&(l.x=xt(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function tt(e,n){return!z(e)||B(e).position==="fixed"?null:n?n(e):e.offsetParent}function _t(e,n){const o=F(e);if(!z(e))return o;let t=tt(e,n);for(;t&&En(t)&&B(t).position==="static";)t=tt(t,n);return t&&(Y(t)==="html"||Y(t)==="body"&&B(t).position==="static"&&!Ve(t))?o:t||_n(e)||o}const Gn=async function(e){let{reference:n,floating:o,strategy:t}=e;const r=this.getOffsetParent||_t,i=this.getDimensions;return{reference:qn(n,await r(o),t),floating:{x:0,y:0,...await i(o)}}};function Un(e){return B(e).direction==="rtl"}const Xn={convertOffsetParentRelativeRectToViewportRelativeRect:$n,getDocumentElement:W,getClippingRect:Kn,getOffsetParent:_t,getElementRects:Gn,getClientRects:Fn,getDimensions:Wn,getScale:ne,isElement:I,isRTL:Un};function Yn(e,n){let o=null,t;const r=W(e);function i(){clearTimeout(t),o&&o.disconnect(),o=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const{left:d,top:f,width:m,height:h}=e.getBoundingClientRect();if(s||n(),!m||!h)return;const c=he(f),g=he(r.clientWidth-(d+m)),p=he(r.clientHeight-(f+h)),b=he(d),O={rootMargin:-c+"px "+-g+"px "+-p+"px "+-b+"px",threshold:Z(0,re(1,l))||1};let _=!0;function x(w){const D=w[0].intersectionRatio;if(D!==l){if(!_)return a();D?a(!1,D):t=setTimeout(()=>{a(!1,1e-7)},100)}_=!1}try{o=new IntersectionObserver(x,{...O,root:r.ownerDocument})}catch{o=new IntersectionObserver(x,O)}o.observe(e)}return a(!0),i}function or(e,n,o,t){t===void 0&&(t={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=t,d=We(e),f=r||i?[...d?G(d):[],...G(n)]:[];f.forEach(v=>{r&&v.addEventListener("scroll",o,{passive:!0}),i&&v.addEventListener("resize",o)});const m=d&&s?Yn(d,o):null;let h=-1,c=null;a&&(c=new ResizeObserver(v=>{let[O]=v;O&&O.target===d&&c&&(c.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{c&&c.observe(n)})),o()}),d&&!l&&c.observe(d),c.observe(n));let g,p=l?ee(e):null;l&&b();function b(){const v=ee(e);p&&(v.x!==p.x||v.y!==p.y||v.width!==p.width||v.height!==p.height)&&o(),p=v,g=requestAnimationFrame(b)}return o(),()=>{f.forEach(v=>{r&&v.removeEventListener("scroll",o),i&&v.removeEventListener("resize",o)}),m&&m(),c&&c.disconnect(),c=null,l&&cancelAnimationFrame(g)}}const Zn=(e,n,o)=>{const t=new Map,r={platform:Xn,...o},i={...r.platform,_c:t};return In(e,n,{...r,platform:i})},rr=e=>{function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:t,padding:r}=typeof e=="function"?e(o):e;return t&&n(t)?t.current!=null?Qe({element:t.current,padding:r}).fn(o):{}:t?Qe({element:t,padding:r}).fn(o):{}}}};var ve=typeof document<"u"?u.useLayoutEffect:u.useEffect;function Oe(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let o,t,r;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!=n.length)return!1;for(t=o;t--!==0;)if(!Oe(e[t],n[t]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(n).length)return!1;for(t=o;t--!==0;)if(!{}.hasOwnProperty.call(n,r[t]))return!1;for(t=o;t--!==0;){const i=r[t];if(!(i==="_owner"&&e.$$typeof)&&!Oe(e[i],n[i]))return!1}return!0}return e!==e&&n!==n}function Ct(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nt(e,n){const o=Ct(e);return Math.round(n*o)/o}function ot(e){const n=u.useRef(e);return ve(()=>{n.current=e}),n}function Jn(e){e===void 0&&(e={});const{placement:n="bottom",strategy:o="absolute",middleware:t=[],platform:r,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:d}=e,[f,m]=u.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[h,c]=u.useState(t);Oe(h,t)||c(t);const[g,p]=u.useState(null),[b,v]=u.useState(null),O=u.useCallback(R=>{R!=D.current&&(D.current=R,p(R))},[p]),_=u.useCallback(R=>{R!==M.current&&(M.current=R,v(R))},[v]),x=i||g,w=a||b,D=u.useRef(null),M=u.useRef(null),A=u.useRef(f),L=ot(l),$=ot(r),P=u.useCallback(()=>{if(!D.current||!M.current)return;const R={placement:n,strategy:o,middleware:h};$.current&&(R.platform=$.current),Zn(D.current,M.current,R).then(T=>{const V={...T,isPositioned:!0};S.current&&!Oe(A.current,V)&&(A.current=V,ct.flushSync(()=>{m(V)}))})},[h,n,o,$]);ve(()=>{d===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,m(R=>({...R,isPositioned:!1})))},[d]);const S=u.useRef(!1);ve(()=>(S.current=!0,()=>{S.current=!1}),[]),ve(()=>{if(x&&(D.current=x),w&&(M.current=w),x&&w){if(L.current)return L.current(x,w,P);P()}},[x,w,P,L]);const E=u.useMemo(()=>({reference:D,floating:M,setReference:O,setFloating:_}),[O,_]),C=u.useMemo(()=>({reference:x,floating:w}),[x,w]),N=u.useMemo(()=>{const R={position:o,left:0,top:0};if(!C.floating)return R;const T=nt(C.floating,f.x),V=nt(C.floating,f.y);return s?{...R,transform:"translate("+T+"px, "+V+"px)",...Ct(C.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:T,top:V}},[o,s,C.floating,f.x,f.y]);return u.useMemo(()=>({...f,update:P,refs:E,elements:C,floatingStyles:N}),[f,P,E,C,N])}var xe=typeof document<"u"?u.useLayoutEffect:u.useEffect;let Se=!1,Qn=0;const rt=()=>"floating-ui-"+Qn++;function eo(){const[e,n]=u.useState(()=>Se?rt():void 0);return xe(()=>{e==null&&n(rt())},[]),u.useEffect(()=>{Se||(Se=!0)},[]),e}const to=dt.useId,Pt=to||eo;function no(){const e=new Map;return{emit(n,o){var t;(t=e.get(n))==null||t.forEach(r=>r(o))},on(n,o){e.set(n,[...e.get(n)||[],o])},off(n,o){var t;e.set(n,((t=e.get(n))==null?void 0:t.filter(r=>r!==o))||[])}}}const oo=u.createContext(null),ro=u.createContext(null),io=()=>{var e;return((e=u.useContext(oo))==null?void 0:e.id)||null},Rt=()=>u.useContext(ro);function kt(e){return"data-floating-ui-"+e}function je(e,n){let o=e.filter(r=>{var i;return r.parentId===n&&((i=r.context)==null?void 0:i.open)}),t=o;for(;t.length;)t=e.filter(r=>{var i;return(i=t)==null?void 0:i.some(a=>{var s;return r.parentId===a.id&&((s=r.context)==null?void 0:s.open)})}),o=o.concat(t);return o}const ao=u.createContext(null);function lo(e){let{id:n,root:o}=e===void 0?{}:e;const[t,r]=u.useState(null),i=Pt(),a=so(),s=u.useMemo(()=>({id:n,root:o,portalContext:a,uniqueId:i}),[n,o,a,i]),l=u.useRef();return xe(()=>()=>{t==null||t.remove()},[t,s]),xe(()=>{if(l.current===s)return;l.current=s;const{id:d,root:f,portalContext:m,uniqueId:h}=s,c=d?document.getElementById(d):null,g=kt("portal");if(c){const p=document.createElement("div");p.id=h,p.setAttribute(g,""),c.appendChild(p),r(p)}else{let p=f||(m==null?void 0:m.portalNode);p&&!I(p)&&(p=p.current),p=p||document.body;let b=null;d&&(b=document.createElement("div"),b.id=d,p.appendChild(b));const v=document.createElement("div");v.id=h,v.setAttribute(g,""),p=b||p,p.appendChild(v),r(v)}},[s]),t}const so=()=>u.useContext(ao);function it(e){return z(e.target)&&e.target.tagName==="BUTTON"}function at(e){return Mn(e)}function ir(e,n){n===void 0&&(n={});const{open:o,onOpenChange:t,dataRef:r,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:d=!1,keyboardHandlers:f=!0}=n,m=u.useRef(),h=u.useRef(!1);return u.useMemo(()=>a?{reference:{onPointerDown(c){m.current=c.pointerType},onMouseDown(c){c.button===0&&(Ze(m.current,!0)&&d||s!=="click"&&(o&&l&&(!r.current.openEvent||r.current.openEvent.type==="mousedown")?t(!1,c.nativeEvent):(c.preventDefault(),t(!0,c.nativeEvent))))},onClick(c){if(s==="mousedown"&&m.current){m.current=void 0;return}Ze(m.current,!0)&&d||(o&&l&&(!r.current.openEvent||r.current.openEvent.type==="click")?t(!1,c.nativeEvent):t(!0,c.nativeEvent))},onKeyDown(c){m.current=void 0,!(c.defaultPrevented||!f||it(c))&&(c.key===" "&&!at(i)&&(c.preventDefault(),h.current=!0),c.key==="Enter"&&t(!(o&&l),c.nativeEvent))},onKeyUp(c){c.defaultPrevented||!f||it(c)||at(i)||c.key===" "&&h.current&&(h.current=!1,t(!(o&&l),c.nativeEvent))}}}:{},[a,r,s,d,f,i,l,o,t])}const co=dt.useInsertionEffect,uo=co||(e=>e());function pe(e){const n=u.useRef(()=>{});return uo(()=>{n.current=e}),u.useCallback(function(){for(var o=arguments.length,t=new Array(o),r=0;r{var n,o;return{escapeKeyBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.escapeKey)!=null?n:!1,outsidePressBubbles:typeof e=="boolean"?e:(o=e==null?void 0:e.outsidePress)!=null?o:!0}};function ar(e,n){n===void 0&&(n={});const{open:o,onOpenChange:t,events:r,nodeId:i,elements:{reference:a,domReference:s,floating:l},dataRef:d}=e,{enabled:f=!0,escapeKey:m=!0,outsidePress:h=!0,outsidePressEvent:c="pointerdown",referencePress:g=!1,referencePressEvent:p="pointerdown",ancestorScroll:b=!1,bubbles:v}=n,O=Rt(),_=io()!=null,x=pe(typeof h=="function"?h:()=>!1),w=typeof h=="function"?x:h,D=u.useRef(!1),{escapeKeyBubbles:M,outsidePressBubbles:A}=ho(v),L=pe(P=>{if(!o||!f||!m||P.key!=="Escape")return;const S=O?je(O.nodesRef.current,i):[];if(!M&&(P.stopPropagation(),S.length>0)){let E=!0;if(S.forEach(C=>{var N;if((N=C.context)!=null&&N.open&&!C.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}r.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),t(!1,Sn(P)?P.nativeEvent:P)}),$=pe(P=>{const S=D.current;if(D.current=!1,S||typeof w=="function"&&!w(P))return;const E=Nn(P),C="["+kt("inert")+"]",N=Re(l).querySelectorAll(C);let R=I(E)?E:null;for(;R&&!me(R);){const H=Q(R);if(H===Re(l).body||!I(H))break;R=H}if(N.length&&I(E)&&!jn(E)&&!Ye(E,l)&&Array.from(N).every(H=>!Ye(R,H)))return;if(z(E)&&l){const H=E.clientWidth>0&&E.scrollWidth>E.clientWidth,q=E.clientHeight>0&&E.scrollHeight>E.clientHeight;let ie=q&&P.offsetX>E.clientWidth;if(q&&B(E).direction==="rtl"&&(ie=P.offsetX<=E.offsetWidth-E.clientWidth),ie||H&&P.offsetY>E.clientHeight)return}const T=O&&je(O.nodesRef.current,i).some(H=>{var q;return ke(P,(q=H.context)==null?void 0:q.elements.floating)});if(ke(P,l)||ke(P,s)||T)return;const V=O?je(O.nodesRef.current,i):[];if(V.length>0){let H=!0;if(V.forEach(q=>{var ie;if((ie=q.context)!=null&&ie.open&&!q.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}r.emit("dismiss",{type:"outsidePress",data:{returnFocus:_?{preventScroll:!0}:Rn(P)||kn(P)}}),t(!1,P)});return u.useEffect(()=>{if(!o||!f)return;d.current.__escapeKeyBubbles=M,d.current.__outsidePressBubbles=A;function P(C){t(!1,C)}const S=Re(l);m&&S.addEventListener("keydown",L),w&&S.addEventListener(c,$);let E=[];return b&&(I(s)&&(E=G(s)),I(l)&&(E=E.concat(G(l))),!I(a)&&a&&a.contextElement&&(E=E.concat(G(a.contextElement)))),E=E.filter(C=>{var N;return C!==((N=S.defaultView)==null?void 0:N.visualViewport)}),E.forEach(C=>{C.addEventListener("scroll",P,{passive:!0})}),()=>{m&&S.removeEventListener("keydown",L),w&&S.removeEventListener(c,$),E.forEach(C=>{C.removeEventListener("scroll",P)})}},[d,l,s,a,m,w,c,o,t,b,f,M,A,L,$]),u.useEffect(()=>{D.current=!1},[w,c]),u.useMemo(()=>f?{reference:{onKeyDown:L,[fo[p]]:P=>{g&&(r.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),t(!1,P.nativeEvent))}},floating:{onKeyDown:L,[mo[c]]:()=>{D.current=!0}}}:{},[f,r,g,c,p,t,L])}function lr(e){var n;e===void 0&&(e={});const{open:o=!1,onOpenChange:t,nodeId:r}=e,[i,a]=u.useState(null),s=((n=e.elements)==null?void 0:n.reference)||i,l=Jn(e),d=Rt(),f=pe((x,w)=>{x&&(h.current.openEvent=w),t==null||t(x,w)}),m=u.useRef(null),h=u.useRef({}),c=u.useState(()=>no())[0],g=Pt(),p=u.useCallback(x=>{const w=I(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l.refs.setReference(w)},[l.refs]),b=u.useCallback(x=>{(I(x)||x===null)&&(m.current=x,a(x)),(I(l.refs.reference.current)||l.refs.reference.current===null||x!==null&&!I(x))&&l.refs.setReference(x)},[l.refs]),v=u.useMemo(()=>({...l.refs,setReference:b,setPositionReference:p,domReference:m}),[l.refs,b,p]),O=u.useMemo(()=>({...l.elements,domReference:s}),[l.elements,s]),_=u.useMemo(()=>({...l,refs:v,elements:O,dataRef:h,nodeId:r,floatingId:g,events:c,open:o,onOpenChange:f}),[l,r,g,c,o,f,v,O]);return xe(()=>{const x=d==null?void 0:d.nodesRef.current.find(w=>w.id===r);x&&(x.context=_)}),u.useMemo(()=>({...l,context:_,refs:v,elements:O}),[l,v,O,_])}function Ne(e,n,o){const t=new Map;return{...o==="floating"&&{tabIndex:-1},...e,...n.map(r=>r?r[o]:null).concat(e).reduce((r,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(t.has(s)||t.set(s,[]),typeof l=="function"){var d;(d=t.get(s))==null||d.push(l),r[s]=function(){for(var f,m=arguments.length,h=new Array(m),c=0;cg(...h)).find(g=>g!==void 0)}}}else r[s]=l}),r),{})}}function sr(e){e===void 0&&(e=[]);const n=e,o=u.useCallback(i=>Ne(i,e,"reference"),n),t=u.useCallback(i=>Ne(i,e,"floating"),n),r=u.useCallback(i=>Ne(i,e,"item"),e.map(i=>i==null?void 0:i.item));return u.useMemo(()=>({getReferenceProps:o,getFloatingProps:t,getItemProps:r}),[o,t,r])}const go=u.createContext(void 0),vo=()=>u.useContext(go);var po=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{className:o}=e,t=po(e,["className"]);return y.createElement("div",Object.assign({},t,{ref:n,className:j("navds-modal__body",o)}))}),bo=yo,Te=y.createContext(null);var wo=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{className:o}=e,t=wo(e,["className"]);return y.createElement("div",Object.assign({},t,{ref:n,className:j("navds-modal__footer",o)}))}),xo=Oo;var Eo=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var{children:o,className:t,closeButton:r=!0}=e,i=Eo(e,["children","className","closeButton"]);const a=u.useContext(Te);return a===null?(console.error(" has to be used within a "),null):y.createElement("div",Object.assign({},i,{ref:n,className:j("navds-modal__header",t)}),a.closeHandler&&r&&y.createElement(gn,{type:"button",className:"navds-modal__button",size:"small",variant:"tertiary-neutral",onClick:a.closeHandler,icon:y.createElement(sn,{title:"Lukk modalvindu"})}),o)}),St=_o;function Co(e,n,o){if(!(n&&n.closeButton===!1))return o?()=>{var t;return o()!==!1&&((t=e.current)===null||t===void 0?void 0:t.close())}:()=>{var t;return(t=e.current)===null||t===void 0?void 0:t.close()}}const ge="navds-modal__document-body";function Po(e,n){y.useEffect(()=>{if(!e.current||!n)return;e.current.open&&document.body.classList.add(ge);const o=new MutationObserver(()=>{var t;!((t=e.current)===null||t===void 0)&&t.open?document.body.classList.add(ge):document.body.classList.remove(ge)});return o.observe(e.current,{attributes:!0,attributeFilter:["open"]}),()=>{o.disconnect(),document.body.classList.remove(ge)}},[e,n])}const ae=typeof window<"u"&&(window.HTMLDialogElement===void 0||navigator.userAgent.includes("jsdom"));function jt(e,n){var o="on"+n.type.toLowerCase();return typeof e[o]=="function"&&e[o](n),e.dispatchEvent(n)}function le(e){for(;e;){if(e.localName==="dialog")return e;e.parentElement?e=e.parentElement:e.parentNode?e=e.parentNode.host:e=null}return null}function Nt(e){for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;e&&e.blur&&e!==document.body&&e.blur()}function Ro(e,n){for(var o=0;o=0&&(e=this.dialog_),e||(e=Dt(this.dialog_)),Nt(document.activeElement),e&&e.focus()},updateZIndex:function(e,n){if(e, the polyfill may not work correctly",e),e.localName!=="dialog")throw new Error("Failed to register dialog: The element is not a dialog.");new It(e)};k.registerDialog=function(e){e.showModal||k.forceRegisterDialog(e)};k.DialogManager=function(){this.pendingDialogStack=[];var e=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",(function(n){this.forwardTab_=void 0,n.stopPropagation(),e([])}).bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(n){var o=[];n.forEach(function(t){for(var r=0,i;i=t.removedNodes[r];++r){if(i instanceof Element)i.localName==="dialog"&&o.push(i);else continue;o=o.concat(i.querySelectorAll("dialog"))}}),o.length&&e(o)}))};k.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})};k.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()};k.DialogManager.prototype.updateStacking=function(){for(var e=this.zIndexHigh_,n=0,o;o=this.pendingDialogStack[n];++n)o.updateZIndex(--e,--e),n===0&&(this.overlay.style.zIndex=--e);var t=this.pendingDialogStack[0];if(t){var r=t.dialog.parentNode||document.body;r.appendChild(this.overlay)}else this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)};k.DialogManager.prototype.containedByTopDialog_=function(e){for(;e=le(e);){for(var n=0,o;o=this.pendingDialogStack[n];++n)if(o.dialog===e)return n===0;e=e.parentElement}return!1};k.DialogManager.prototype.handleFocus_=function(e){var n=e.composedPath?e.composedPath()[0]:e.target;if(!this.containedByTopDialog_(n)&&document.activeElement!==document.documentElement&&(e.preventDefault(),e.stopPropagation(),Nt(n),this.forwardTab_!==void 0)){var o=this.pendingDialogStack[0],t=o.dialog,r=t.compareDocumentPosition(n);return r&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?o.focus_():n!==document.documentElement&&document.documentElement.focus()),!1}};k.DialogManager.prototype.handleKey_=function(e){if(this.forwardTab_=void 0,e.keyCode===27){e.preventDefault(),e.stopPropagation();var n=new window.CustomEvent("cancel",{bubbles:!1,cancelable:!0}),o=this.pendingDialogStack[0];o&&jt(o.dialog,n)&&o.dialog.close()}else e.keyCode===9&&(this.forwardTab_=!e.shiftKey)};k.DialogManager.prototype.checkDOM_=function(e){var n=this.pendingDialogStack.slice();n.forEach(function(o){e.indexOf(o.dialog)!==-1?o.downgradeModal():o.maybeHideModal()})};k.DialogManager.prototype.pushDialog=function(e){var n=(this.zIndexHigh_-this.zIndexLow_)/2-1;return this.pendingDialogStack.length>=n?!1:(this.pendingDialogStack.unshift(e)===1&&this.blockDocument(),this.updateStacking(),!0)};k.DialogManager.prototype.removeDialog=function(e){var n=this.pendingDialogStack.indexOf(e);n!==-1&&(this.pendingDialogStack.splice(n,1),this.pendingDialogStack.length===0&&this.unblockDocument(),this.updateStacking())};ae&&(k.dm=new k.DialogManager,k.formSubmitter=null,k.imagemapUseValue=null);if(ae){var st=document.createElement("form");if(st.setAttribute("method","dialog"),st.method!=="dialog"){var te=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(te){var So=te.get;te.get=function(){return De(this)?"dialog":So.call(this)};var jo=te.set;te.set=function(e){return typeof e=="string"&&e.toLowerCase()==="dialog"?this.setAttribute("method",e):jo.call(this,e)},Object.defineProperty(HTMLFormElement.prototype,"method",te)}}document.addEventListener("click",function(e){if(k.formSubmitter=null,k.imagemapUseValue=null,!e.defaultPrevented){var n=e.target;if("composedPath"in e){var o=e.composedPath();n=o.shift()||n}if(!(!n||!De(n.form))){var t=n.type==="submit"&&["button","input"].indexOf(n.localName)>-1;if(!t){if(!(n.localName==="input"&&n.type==="image"))return;k.imagemapUseValue=e.offsetX+","+e.offsetY}var r=le(n);r&&(k.formSubmitter=n)}}},!1),document.addEventListener("submit",function(e){var n=e.target,o=le(n);if(!o){var t=Mt(e),r=t&&t.getAttribute("formmethod")||n.getAttribute("method");r==="dialog"&&e.preventDefault()}});var No=HTMLFormElement.prototype.submit,Do=function(){if(!De(this))return No.call(this);var e=le(this);e&&e.close()};HTMLFormElement.prototype.submit=Do}const Mo=k;var Io=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var o,t,{header:r,children:i,open:a,onBeforeClose:s,onCancel:l,closeOnBackdropClick:d,width:f,portal:m,className:h,"aria-labelledby":c,style:g,onClick:p}=e,b=Io(e,["header","children","open","onBeforeClose","onCancel","closeOnBackdropClick","width","portal","className","aria-labelledby","style","onClick"]);const v=u.useRef(null),O=mt(v,n),_=U(),x=(o=vo())===null||o===void 0?void 0:o.rootElement,w=lo({root:x}),D=u.useContext(ht);u.useContext(Te)&&!D&&console.error("Modals should not be nested"),u.useEffect(()=>{ae&&v.current&&w&&Mo.registerDialog(v.current),v.current&&w&&(v.current.autofocus=!0)},[v,w]),u.useEffect(()=>{v.current&&w&&a!==void 0&&(a&&!v.current.open?v.current.showModal():!a&&v.current.open&&v.current.close())},[v,w,a]),Po(v,w);const A=typeof f=="string"&&["small","medium"].includes(f),L=j("navds-modal",h,{"navds-modal--polyfilled":ae,"navds-modal--autowidth":!f,[`navds-modal--${f}`]:A}),$=Object.assign(Object.assign({},g),A?{}:{width:f}),P=N=>{d&&!ae&&N.target===v.current&&(!s||s()!==!1)&&v.current.close()},S=N=>{s&&s()===!1&&N.preventDefault()},E=!c&&!b["aria-label"]&&r?_:c,C=y.createElement("dialog",Object.assign({},b,{ref:O,className:L,style:$,onCancel:Me(l,S),onClick:Me(p,P),"aria-labelledby":E}),y.createElement(Te.Provider,{value:{closeHandler:Co(v,r,s),ref:v}},r&&y.createElement(St,null,r.label&&y.createElement(Ht,{className:"navds-modal__label"},r.label),y.createElement(Gt,{size:(t=r.size)!==null&&t!==void 0?t:"medium",level:"1",id:_},y.createElement("span",{className:"navds-modal__header-icon"},r.icon),r.heading)),i));return m?w?ct.createPortal(C,w):null:C});Pe.Header=St;Pe.Body=bo;Pe.Footer=xo;const cr=Pe;var Ao=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{const{inputProps:o,errorId:t,showErrorMsg:r,hasError:i,size:a,inputDescriptionId:s,readOnly:l}=Ee(e,"select"),{children:d,label:f,className:m,description:h,htmlSize:c,hideLabel:g=!1,style:p}=e,b=Ao(e,["children","label","className","description","htmlSize","hideLabel","style"]),v={onMouseDown:O=>{l&&(O.preventDefault(),O.target.focus())},onKeyDown:O=>{l&&["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"," "].includes(O.key)&&O.preventDefault()}};return y.createElement("div",{className:j(m,"navds-form-field",`navds-form-field--${a}`,{"navds-form-field--disabled":!!o.disabled,"navds-form-field--readonly":l,"navds-select--error":i,"navds-select--readonly":l})},y.createElement($e,{htmlFor:o.id,size:a,className:j("navds-form-field__label",{"navds-sr-only":g})},y.createElement(ze,{readOnly:l,nativeReadOnly:!1}),f),!!h&&y.createElement(oe,{className:j("navds-form-field__description",{"navds-sr-only":g}),id:s,size:a,as:"div"},h),y.createElement("div",{className:"navds-select__container",style:p},y.createElement("select",Object.assign({},K(b,["error","errorId","size","readOnly"]),o,v,{ref:n,className:j("navds-select__input","navds-body-short",`navds-body-short--${a??"medium"}`),size:c}),d),y.createElement(tn,{className:"navds-select__chevron","aria-hidden":!0})),y.createElement("div",{className:"navds-form-field__error",id:t,"aria-relevant":"additions removals","aria-live":"polite"},r&&y.createElement(ft,{size:a},e.error)))}),dr=Lo,To=e=>{const n=Ee(e,"fieldset"),{inputProps:o}=n;return Object.assign(Object.assign({},n),{inputProps:{"aria-invalid":o["aria-invalid"],"aria-describedby":o["aria-describedby"]}})};var $o=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var o,t,r;const{inputProps:i,errorId:a,showErrorMsg:s,hasError:l,size:d,readOnly:f,inputDescriptionId:m}=To(e),h=u.useContext(se),{children:c,className:g,errorPropagation:p=!0,legend:b,description:v,hideLegend:O,nativeReadOnly:_=!0}=e,x=$o(e,["children","className","errorPropagation","legend","description","hideLegend","nativeReadOnly"]);return y.createElement(se.Provider,{value:{error:p?(o=e.error)!==null&&o!==void 0?o:h==null?void 0:h.error:void 0,errorId:j({[a]:s,[(t=h==null?void 0:h.errorId)!==null&&t!==void 0?t:""]:!!(h!=null&&h.error)}),size:d,disabled:(r=e.disabled)!==null&&r!==void 0?r:!1,readOnly:f}},y.createElement("fieldset",Object.assign({},K(x,["errorId","error","size","readOnly"]),K(i,["aria-describedby","aria-invalid"]),{ref:n,className:j(g,"navds-fieldset",`navds-fieldset--${d}`,{"navds-fieldset--error":l,"navds-fieldset--readonly":f})}),y.createElement($e,{size:d,as:"legend",className:j("navds-fieldset__legend",{"navds-sr-only":!!O})},y.createElement(ze,{readOnly:f,nativeReadOnly:_}),b),!!v&&y.createElement(oe,{className:j("navds-fieldset__description",{"navds-sr-only":!!O}),id:m,size:d??"medium",as:"div"},e.description),c,y.createElement("div",{id:a,"aria-relevant":"additions removals","aria-live":"polite",className:"navds-fieldset__error"},s&&y.createElement(ft,{size:d},e.error))))}),At=Fo;var zo=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var o,t,{value:r,defaultValue:i,onChange:a=()=>{},children:s,className:l}=e,d=zo(e,["value","defaultValue","onChange","children","className"]);const f=u.useContext(se),[m,h]=u.useState(i??[]),c=g=>{const p=r??m,b=p.includes(g)?p.filter(v=>v!==g):[...p,g];r===void 0&&h(b),a(b)};return y.createElement(At,Object.assign({},d,{ref:n,className:j(l,"navds-checkbox-group",`navds-checkbox-group--${(t=(o=d.size)!==null&&o!==void 0?o:f==null?void 0:f.size)!==null&&t!==void 0?t:"medium"}`),nativeReadOnly:!1}),y.createElement(Lt.Provider,{value:{value:r,defaultValue:i,toggleValue:c}},y.createElement("div",{className:"navds-checkboxes"},s)))}),ur=Bo;var Ho=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{const n=u.useContext(Lt),o=Ee(K(e,["description","children"]),"checkbox"),{inputProps:t,readOnly:r}=o,i=Ho(o,["inputProps","readOnly"]);return n&&(e.checked&&console.warn("`checked` is unsupported on elements within a . Please set a `value` or `defaultValue` on instead."),e.value===void 0&&console.warn("A element within a requires a `value` property.")),Object.assign(Object.assign({},i),{readOnly:r,nested:!!n,inputProps:Object.assign(Object.assign({},t),{checked:n!=null&&n.value?n.value.includes(e.value):e.checked,defaultChecked:n!=null&&n.defaultValue?n.defaultValue.includes(e.value):e.defaultChecked,onChange:a=>{r||(e.onChange&&e.onChange(a),n&&n.toggleValue(e.value))},onClick:a=>{var s;if(r){a.preventDefault();return}(s=e==null?void 0:e.onClick)===null||s===void 0||s.call(e,a)}})})},Ko=Vo,Wo=u.forwardRef((e,n)=>{const{inputProps:o,hasError:t,size:r,readOnly:i,nested:a}=Ko(e),s=U(),l=U();return y.createElement("div",{className:j(e.className,"navds-checkbox",`navds-checkbox--${r}`,{"navds-checkbox--error":t,"navds-checkbox--disabled":o.disabled,"navds-checkbox--readonly":i})},y.createElement("input",Object.assign({},K(e,["children","size","error","description","hideLabel","indeterminate","errorId","readOnly"]),K(o,["aria-invalid"]),{type:"checkbox",className:"navds-checkbox__input","aria-checked":e.indeterminate?"mixed":o.checked,ref:d=>{var f;d&&(d.indeterminate=(f=e.indeterminate)!==null&&f!==void 0?f:!1),typeof n=="function"?n(d):n!=null&&(n.current=d)},"aria-labelledby":j(s,!!e["aria-labelledby"]&&e["aria-labelledby"],{[l]:e.description})})),y.createElement("label",{htmlFor:o.id,className:"navds-checkbox__label"},y.createElement("span",{className:"navds-checkbox__icon"},y.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"0.8125rem",height:"0.625rem",viewBox:"0 0 13 10",fill:"none",focusable:!1,role:"img","aria-hidden":!0},y.createElement("path",{d:"M4.03524 6.41478L10.4752 0.404669C11.0792 -0.160351 12.029 -0.130672 12.5955 0.47478C13.162 1.08027 13.1296 2.03007 12.5245 2.59621L5.02111 9.59934C4.74099 9.85904 4.37559 10 4.00025 10C3.60651 10 3.22717 9.84621 2.93914 9.56111L0.439143 7.06111C-0.146381 6.47558 -0.146381 5.52542 0.439143 4.93989C1.02467 4.35437 1.97483 4.35437 2.56036 4.93989L4.03524 6.41478Z",fill:"currentColor"}))),y.createElement("span",{className:j("navds-checkbox__content",{"navds-sr-only":e.hideLabel})},y.createElement(oe,{as:"span",id:s,size:r,className:"navds-checkbox__label-text","aria-hidden":!0},!a&&y.createElement(ze,{readOnly:i,nativeReadOnly:!1}),e.children),e.description&&y.createElement(oe,{as:"span",id:l,size:r,className:"navds-form-field__subdescription navds-checkbox__description","aria-hidden":!0},e.description))))}),fr=Wo;var qo=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{var o,t,{children:r,className:i,name:a,defaultValue:s,value:l,onChange:d=()=>{},required:f,readOnly:m}=e,h=qo(e,["children","className","name","defaultValue","value","onChange","required","readOnly"]);const c=u.useContext(se),g=U();return y.createElement(At,Object.assign({},h,{readOnly:m,ref:n,className:j(i,"navds-radio-group",`navds-radio-group--${(t=(o=h.size)!==null&&o!==void 0?o:c==null?void 0:c.size)!==null&&t!==void 0?t:"medium"}`),nativeReadOnly:!1}),y.createElement(Tt.Provider,{value:{name:a??`radioGroupName-${g}`,defaultValue:s,value:l,onChange:d,required:f}},y.createElement("div",{className:"navds-radio-buttons"},r)))}),mr=Go;var Uo=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(e);r{const n=u.useContext(Tt),o=Ee(K(e,["description"]),"radio"),{inputProps:t,readOnly:r}=o,i=Uo(o,["inputProps","readOnly"]);return n||console.warn(" must be used inside ."),(e==null?void 0:e.required)!==void 0&&console.warn("required is only supported on ."),Object.assign(Object.assign({},i),{readOnly:r,inputProps:Object.assign(Object.assign({},t),{name:n==null?void 0:n.name,defaultChecked:(n==null?void 0:n.defaultValue)===void 0?void 0:(n==null?void 0:n.defaultValue)===e.value,checked:(n==null?void 0:n.value)===void 0?void 0:(n==null?void 0:n.value)===e.value,onChange:a=>{r||(e.onChange&&e.onChange(a),n!=null&&n.onChange&&n.onChange(e.value))},onClick:a=>{var s;if(r){a.preventDefault();return}(s=e==null?void 0:e.onClick)===null||s===void 0||s.call(e,a)},required:n==null?void 0:n.required,type:"radio"})})},Yo=u.forwardRef((e,n)=>{const{inputProps:o,size:t,hasError:r,readOnly:i}=Xo(e),a=U(),s=U();return y.createElement("div",{className:j(e.className,"navds-radio",`navds-radio--${t}`,{"navds-radio--error":r,"navds-radio--disabled":o.disabled,"navds-radio--readonly":i})},y.createElement("input",Object.assign({},K(e,["children","size","description","readOnly"]),K(o,["aria-invalid"]),{"aria-labelledby":j(a,!!e["aria-labelledby"]&&e["aria-labelledby"],{[s]:e.description}),className:"navds-radio__input",ref:n})),y.createElement("label",{htmlFor:o.id,className:"navds-radio__label"},y.createElement("span",{className:"navds-radio__content"},y.createElement(oe,{as:"span",id:a,size:t,"aria-hidden":!0},e.children),e.description&&y.createElement(oe,{as:"span",id:s,size:t,className:"navds-form-field__subdescription navds-radio__description","aria-hidden":!0},e.description))))}),hr=Yo;export{mr as A,gn as B,tn as C,ht as D,ft as E,hr as F,ur as G,Gt as H,$e as L,Te as M,ze as R,Lo as S,sn as X,Me as a,Qo as b,j as c,Ee as d,oe as e,lr as f,sr as g,ir as h,ar as i,Yt as j,mt as k,or as l,tr as m,er as n,K as o,rr as p,cr as q,cn as r,nr as s,ce as t,Fe as u,U as v,Ht as w,fn as x,fr as y,dr as z}; +//# sourceMappingURL=Radio-VOSI1NDc.js.map diff --git a/assets/Radio-VOSI1NDc.js.map b/assets/Radio-VOSI1NDc.js.map new file mode 100644 index 000000000..01ccf0768 --- /dev/null +++ b/assets/Radio-VOSI1NDc.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Radio-VOSI1NDc.js","sources":["../../node_modules/clsx/dist/clsx.m.js","../../node_modules/@navikt/ds-react/esm/typography/util.js","../../node_modules/@navikt/ds-react/esm/typography/BodyShort.js","../../node_modules/@navikt/ds-react/esm/typography/Detail.js","../../node_modules/@navikt/ds-react/esm/typography/ErrorMessage.js","../../node_modules/@navikt/ds-react/esm/typography/Heading.js","../../node_modules/@navikt/ds-react/esm/typography/Label.js","../../node_modules/@navikt/ds-react/esm/util/omit.js","../../node_modules/@navikt/ds-react/esm/util/hooks/useClientLayoutEffect.js","../../node_modules/@navikt/ds-react/esm/util/hooks/useId.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/util/useId.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/ChevronDown.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/PadlockLockedFill.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/XMark.js","../../node_modules/@navikt/ds-react/esm/util/composeEventHandlers.js","../../node_modules/@navikt/ds-react/esm/util/hooks/useMergeRefs.js","../../node_modules/@navikt/ds-react/esm/loader/Loader.js","../../node_modules/@navikt/ds-react/esm/button/Button.js","../../node_modules/@navikt/ds-react/esm/date/context/useDateInputContext.js","../../node_modules/@navikt/ds-react/esm/form/ReadOnlyIcon.js","../../node_modules/@navikt/ds-react/esm/form/Fieldset/context.js","../../node_modules/@navikt/ds-react/esm/form/useFormField.js","../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs","../../node_modules/@floating-ui/utils/react/dist/floating-ui.utils.react.mjs","../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../../node_modules/@floating-ui/react/dist/floating-ui.react.mjs","../../node_modules/@navikt/ds-react/esm/provider/Provider.js","../../node_modules/@navikt/ds-react/esm/modal/ModalBody.js","../../node_modules/@navikt/ds-react/esm/modal/ModalContext.js","../../node_modules/@navikt/ds-react/esm/modal/ModalFooter.js","../../node_modules/@navikt/ds-react/esm/modal/ModalHeader.js","../../node_modules/@navikt/ds-react/esm/modal/ModalUtils.js","../../node_modules/@navikt/ds-react/esm/modal/dialog-polyfill.js","../../node_modules/@navikt/ds-react/esm/modal/Modal.js","../../node_modules/@navikt/ds-react/esm/form/Select.js","../../node_modules/@navikt/ds-react/esm/form/Fieldset/useFieldset.js","../../node_modules/@navikt/ds-react/esm/form/Fieldset/Fieldset.js","../../node_modules/@navikt/ds-react/esm/form/checkbox/CheckboxGroup.js","../../node_modules/@navikt/ds-react/esm/form/checkbox/useCheckbox.js","../../node_modules/@navikt/ds-react/esm/form/checkbox/Checkbox.js","../../node_modules/@navikt/ds-react/esm/form/radio/RadioGroup.js","../../node_modules/@navikt/ds-react/esm/form/radio/useRadio.js","../../node_modules/@navikt/ds-react/esm/form/radio/Radio.js"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t {\n return cl({\n \"navds-typo--spacing\": props.spacing,\n \"navds-typo--truncate\": props.truncate,\n \"navds-typo--semibold\": props.weight === \"semibold\",\n [`navds-typo--align-${props.align}`]: props.align,\n [`navds-typo--color-${props.textColor}`]: props.textColor,\n \"navds-typo--visually-hidden\": props.visuallyHidden,\n \"navds-typo--uppercase\": props.uppercase,\n });\n};\n//# sourceMappingURL=util.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { typoClassNames } from \"./util\";\n/**\n * Part of a set of components for displaying text with consistent typography.\n *\n * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/typography)\n * @see 🏷️ {@link BodyShortProps}\n * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support\n *\n * @example\n * ```jsx\n * \n * Du må gjøre en filtrering for å se brukere i listen.\n * \n * ```\n */\nexport const BodyShort = forwardRef((_a, ref) => {\n var { className, size = \"medium\", as: Component = \"p\", spacing, truncate, weight = \"regular\", align, visuallyHidden, textColor } = _a, rest = __rest(_a, [\"className\", \"size\", \"as\", \"spacing\", \"truncate\", \"weight\", \"align\", \"visuallyHidden\", \"textColor\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(className, \"navds-body-short\", `navds-body-short--${size}`, typoClassNames({\n spacing,\n truncate,\n weight,\n align,\n visuallyHidden,\n textColor,\n })) })));\n});\nexport default BodyShort;\n//# sourceMappingURL=BodyShort.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { typoClassNames } from \"./util\";\n/**\n * Part of a set of components for displaying text with consistent typography.\n *\n * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/typography)\n * @see 🏷️ {@link DetailProps}\n * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support\n *\n * @example\n * ```jsx\n * \n * Du må gjøre en filtrering for å se brukere i listen.\n * \n * ```\n */\nexport const Detail = forwardRef((_a, ref) => {\n var { className, size = \"medium\", spacing, uppercase, as: Component = \"p\", truncate, weight = \"regular\", align, visuallyHidden, textColor } = _a, rest = __rest(_a, [\"className\", \"size\", \"spacing\", \"uppercase\", \"as\", \"truncate\", \"weight\", \"align\", \"visuallyHidden\", \"textColor\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(className, \"navds-detail\", typoClassNames({\n spacing,\n truncate,\n weight,\n align,\n visuallyHidden,\n textColor,\n uppercase,\n }), {\n \"navds-detail--small\": size === \"small\",\n }) })));\n});\nexport default Detail;\n//# sourceMappingURL=Detail.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { typoClassNames } from \"./util\";\n/**\n * Part of a set of components for displaying text with consistent typography.\n *\n * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/typography)\n * @see 🏷️ {@link ErrorMessageProps}\n * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support\n *\n * @example\n * ```jsx\n * \n * Du må fylle ut: Oppgi årsaken til at du har ventet mer enn 6 måneder med å søke om refusjon\n * \n * ```\n */\nexport const ErrorMessage = forwardRef((_a, ref) => {\n var { className, size, spacing, as: Component = \"p\" } = _a, rest = __rest(_a, [\"className\", \"size\", \"spacing\", \"as\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(\"navds-error-message\", \"navds-label\", className, typoClassNames({\n spacing,\n }), {\n \"navds-label--small\": size === \"small\",\n }) })));\n});\nexport default ErrorMessage;\n//# sourceMappingURL=ErrorMessage.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { typoClassNames } from \"./util\";\n/**\n * Part of a set of components for displaying text with consistent typography.\n *\n * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/typography)\n * @see 🏷️ {@link HeadingProps}\n * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support\n *\n * @example\n * ```jsx\n * \n * Hva kan vi hjelpe deg med?\n * \n * ```\n */\nexport const Heading = forwardRef((_a, ref) => {\n var { level = \"1\", size, className, as, spacing, align, visuallyHidden, textColor } = _a, rest = __rest(_a, [\"level\", \"size\", \"className\", \"as\", \"spacing\", \"align\", \"visuallyHidden\", \"textColor\"]);\n const HeadingTag = as !== null && as !== void 0 ? as : `h${level}`;\n return (React.createElement(HeadingTag, Object.assign({}, rest, { ref: ref, className: cl(className, \"navds-heading\", `navds-heading--${size}`, typoClassNames({\n spacing,\n align,\n visuallyHidden,\n textColor,\n })) })));\n});\nexport default Heading;\n//# sourceMappingURL=Heading.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { typoClassNames } from \"./util\";\n/**\n * Part of a set of components for displaying text with consistent typography.\n *\n * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/typography)\n * @see 🏷️ {@link LabelProps}\n * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support\n *\n * @example\n * ```jsx\n * \n * ```\n */\nexport const Label = forwardRef((_a, ref) => {\n var { className, size = \"medium\", as: Component = \"label\", spacing, visuallyHidden, textColor } = _a, rest = __rest(_a, [\"className\", \"size\", \"as\", \"spacing\", \"visuallyHidden\", \"textColor\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(className, \"navds-label\", typoClassNames({\n spacing,\n visuallyHidden,\n textColor,\n }), {\n \"navds-label--small\": size === \"small\",\n }) })));\n});\nexport default Label;\n//# sourceMappingURL=Label.js.map","export const omit = (obj, props) => Object.entries(obj)\n .filter(([key]) => !props.includes(key))\n .reduce((prevObj, [key, value]) => (Object.assign(Object.assign({}, prevObj), { [key]: value })), {});\n//# sourceMappingURL=omit.js.map","import { useLayoutEffect } from \"react\";\nexport const useClientLayoutEffect = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.document)\n ? useLayoutEffect\n : () => { };\n//# sourceMappingURL=useClientLayoutEffect.js.map","//https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/useId.ts\nimport React, { useEffect, useState } from \"react\";\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = useState(idOverride);\n const id = idOverride || defaultId;\n useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`aksel-id-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\nconst maybeReactUseId = React[\"useId\" + \"\" // Workaround for https://github.com/webpack/webpack/issues/14814\n];\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride) {\n var _a;\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride !== null && idOverride !== void 0 ? idOverride : reactId.replace(/(:)/g, \"\");\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `useId` is invariant at runtime.\n return (_a = useGlobalId(idOverride)) !== null && _a !== void 0 ? _a : \"\";\n}\n//# sourceMappingURL=useId.js.map","//https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/useId.ts\nimport React, { useEffect, useState } from \"react\";\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = useState(idOverride);\n const id = idOverride || defaultId;\n useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`aksel-icon-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\nconst maybeReactUseId = React[\"useId\" + \"\" // Workaround for https://github.com/webpack/webpack/issues/14814\n];\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport function useId(idOverride) {\n var _a;\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride !== null && idOverride !== void 0 ? idOverride : reactId.replace(/(:)/g, \"\");\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `useId` is invariant at runtime.\n return (_a = useGlobalId(idOverride)) !== null && _a !== void 0 ? _a : \"\";\n}\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgChevronDown = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M5.97 9.47a.75.75 0 0 1 1.06 0L12 14.44l4.97-4.97a.75.75 0 1 1 1.06 1.06l-5.5 5.5a.75.75 0 0 1-1.06 0l-5.5-5.5a.75.75 0 0 1 0-1.06Z\", fill: \"currentColor\" }));\n});\nexport default SvgChevronDown;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgPadlockLockedFill = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M12 2.25A4.75 4.75 0 0 0 7.25 7v2.25H7A1.75 1.75 0 0 0 5.25 11v9c0 .414.336.75.75.75h12a.75.75 0 0 0 .75-.75v-9A1.75 1.75 0 0 0 17 9.25h-.25V7A4.75 4.75 0 0 0 12 2.25Zm3.25 7V7a3.25 3.25 0 0 0-6.5 0v2.25h6.5ZM12 13a1.5 1.5 0 0 0-.75 2.8V17a.75.75 0 0 0 1.5 0v-1.2A1.5 1.5 0 0 0 12 13Z\", fill: \"currentColor\" }));\n});\nexport default SvgPadlockLockedFill;\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgXMark = forwardRef((_a, ref) => {\n var { title, titleId: _titleId } = _a, props = __rest(_a, [\"title\", \"titleId\"]);\n let titleId = useId();\n titleId = title ? _titleId ? _titleId : \"title-\" + titleId : undefined;\n return React.createElement(\"svg\", Object.assign({ width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", focusable: false, role: \"img\", ref: ref, \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { d: \"M6.53 5.47a.75.75 0 0 0-1.06 1.06L10.94 12l-5.47 5.47a.75.75 0 1 0 1.06 1.06L12 13.06l5.47 5.47a.75.75 0 1 0 1.06-1.06L13.06 12l5.47-5.47a.75.75 0 0 0-1.06-1.06L12 10.94 6.53 5.47Z\", fill: \"currentColor\" }));\n});\nexport default SvgXMark;\n","/* https://github.com/radix-ui/primitives/blob/main/packages/core/primitive/src/primitive.tsx#L1 */\n/**\n * Utility to consistently call original eventhandler, often from props and internal eventhandler\n * @internal\n */\nexport function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler === null || originalEventHandler === void 0 ? void 0 : originalEventHandler(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);\n }\n };\n}\n//# sourceMappingURL=composeEventHandlers.js.map","/* https://github.com/radix-ui/primitives/blob/main/packages/react/compose-refs/src/composeRefs.tsx */\nimport React from \"react\";\n// https://github.com/gregberge/react-merge-refs\n/**\n * Use `useMergeRefs`\n * @internal\n */\nexport function mergeRefs(refs) {\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n }\n else if (ref !== null && ref !== undefined) {\n ref.current = value;\n }\n });\n };\n}\n/**\n * Merges refs within useCallback\n * @internal\n * @param ...refs: React.Ref | undefined\n * @returns React.useCallback(mergeRefs(refs), refs)\n */\nexport function useMergeRefs(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(mergeRefs(refs), refs);\n}\n//# sourceMappingURL=useMergeRefs.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { omit } from \"../util\";\nimport { useId } from \"../util/hooks\";\n/**\n * A component that displays a loading spinner.\n *\n * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/loader)\n * @see 🏷️ {@link LoaderProps}\n *\n * @example\n * ```jsx\n * \n * ```\n */\nexport const Loader = forwardRef((_a, ref) => {\n var { className, size = \"medium\", title = \"venter...\", transparent = false, variant = \"neutral\", id } = _a, rest = __rest(_a, [\"className\", \"size\", \"title\", \"transparent\", \"variant\", \"id\"]);\n const internalId = useId();\n return (React.createElement(\"svg\", Object.assign({ \"aria-labelledby\": id !== null && id !== void 0 ? id : `loader-${internalId}`, ref: ref, className: cl(\"navds-loader\", className, `navds-loader--${size}`, `navds-loader--${variant}`, {\n \"navds-loader--transparent\": transparent,\n }), focusable: \"false\", viewBox: \"0 0 50 50\", preserveAspectRatio: \"xMidYMid\" }, omit(rest, [\"children\"])),\n React.createElement(\"title\", { id: id !== null && id !== void 0 ? id : `loader-${internalId}` }, title),\n React.createElement(\"circle\", { className: \"navds-loader__background\", xmlns: \"http://www.w3.org/2000/svg\", cx: \"25\", cy: \"25\", r: \"20\", fill: \"none\" }),\n React.createElement(\"circle\", { className: \"navds-loader__foreground\", cx: \"25\", cy: \"25\", r: \"20\", fill: \"none\", strokeDasharray: \"50 155\" })));\n});\nexport default Loader;\n//# sourceMappingURL=Loader.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport cl from \"clsx\";\nimport React, { forwardRef, useRef, useState } from \"react\";\nimport { Loader } from \"../loader\";\nimport { Label } from \"../typography\";\nimport { omit } from \"../util\";\nimport { composeEventHandlers } from \"../util/composeEventHandlers\";\nimport { useClientLayoutEffect } from \"../util/hooks\";\nimport { useMergeRefs } from \"../util/hooks/useMergeRefs\";\n/**\n * A button component\n * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/button)\n * @see 🏷️ {@link ButtonProps}\n * @see [🤖 OverridableComponent](https://aksel.nav.no/grunnleggende/kode/overridablecomponent) support\n * @example\n * ```jsx\n * \n * ```\n */\nexport const Button = forwardRef((_a, ref) => {\n var { as: Component = \"button\", variant = \"primary\", className, children, size = \"medium\", loading = false, disabled, style, icon, iconPosition = \"left\" } = _a, rest = __rest(_a, [\"as\", \"variant\", \"className\", \"children\", \"size\", \"loading\", \"disabled\", \"style\", \"icon\", \"iconPosition\"]);\n const buttonRef = useRef(null);\n const [widthOverride, setWidthOverride] = useState();\n const mergedRef = useMergeRefs(buttonRef, ref);\n useClientLayoutEffect(() => {\n if (loading) {\n const requestID = window.requestAnimationFrame(() => {\n var _a, _b;\n setWidthOverride((_b = (_a = buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width);\n });\n return () => {\n setWidthOverride(undefined);\n cancelAnimationFrame(requestID);\n };\n }\n }, [loading, children]);\n const filterProps = (disabled !== null && disabled !== void 0 ? disabled : widthOverride) ? omit(rest, [\"href\"]) : rest;\n const handleKeyUp = (e) => {\n if (e.key === \" \" && !disabled && !widthOverride) {\n e.currentTarget.click();\n }\n };\n return (React.createElement(Component, Object.assign({}, (Component !== \"button\" ? { role: \"button\" } : {}), filterProps, { ref: mergedRef, onKeyUp: composeEventHandlers(filterProps.onKeyUp, handleKeyUp), className: cl(className, \"navds-button\", `navds-button--${variant}`, `navds-button--${size}`, {\n \"navds-button--loading\": widthOverride,\n \"navds-button--icon-only\": !!icon && !children,\n \"navds-button--disabled\": disabled !== null && disabled !== void 0 ? disabled : widthOverride,\n }), style: Object.assign(Object.assign({}, style), { width: widthOverride }), disabled: (disabled !== null && disabled !== void 0 ? disabled : widthOverride) ? true : undefined }), widthOverride ? (React.createElement(Loader, { size: size })) : (React.createElement(React.Fragment, null,\n icon && iconPosition === \"left\" && (React.createElement(\"span\", { className: \"navds-button__icon\" }, icon)),\n children && (React.createElement(Label, { as: \"span\", size: size === \"medium\" ? \"medium\" : \"small\" }, children)),\n icon && iconPosition === \"right\" && (React.createElement(\"span\", { className: \"navds-button__icon\" }, icon))))));\n});\nexport default Button;\n//# sourceMappingURL=Button.js.map","import { createContext, useContext } from \"react\";\nexport const DateContext = createContext(null);\nexport const useDateInputContext = () => {\n const context = useContext(DateContext);\n if (!context) {\n console.warn(\"useDateInputContext must be used with DateContext\");\n }\n return context;\n};\n//# sourceMappingURL=useDateInputContext.js.map","import React from \"react\";\nimport { PadlockLockedFillIcon } from \"@navikt/aksel-icons\";\nexport const ReadOnlyIcon = ({ readOnly, nativeReadOnly = true, }) => {\n if (readOnly) {\n return (React.createElement(PadlockLockedFillIcon, Object.assign({}, (nativeReadOnly ? { \"aria-hidden\": true } : { title: \"readonly\" }), { className: \"navds-form-field__readonly-icon\" })));\n }\n return null;\n};\n//# sourceMappingURL=ReadOnlyIcon.js.map","import { createContext } from \"react\";\nexport const FieldsetContext = createContext(null);\n//# sourceMappingURL=context.js.map","import cl from \"clsx\";\nimport { useContext } from \"react\";\nimport { useId } from \"../util/hooks\";\nimport { FieldsetContext } from \"./Fieldset/context\";\n/**\n * Handles props and their state for various form-fields in context with Fieldset\n */\nexport const useFormField = (props, prefix) => {\n var _a, _b, _c;\n const { size, error, errorId: propErrorId } = props;\n const fieldset = useContext(FieldsetContext);\n const genId = useId();\n const id = (_a = props.id) !== null && _a !== void 0 ? _a : `${prefix}-${genId}`;\n const errorId = propErrorId !== null && propErrorId !== void 0 ? propErrorId : `${prefix}-error-${genId}`;\n const inputDescriptionId = `${prefix}-description-${genId}`;\n const disabled = (fieldset === null || fieldset === void 0 ? void 0 : fieldset.disabled) || props.disabled;\n const readOnly = (((fieldset === null || fieldset === void 0 ? void 0 : fieldset.readOnly) || props.readOnly) && !disabled) || undefined;\n const hasError = !disabled && !readOnly && !!(error || (fieldset === null || fieldset === void 0 ? void 0 : fieldset.error));\n const showErrorMsg = !disabled && !readOnly && !!error && typeof error !== \"boolean\";\n const ariaInvalid = Object.assign({}, (hasError ? { \"aria-invalid\": true } : {}));\n if ((props === null || props === void 0 ? void 0 : props.required) && process.env.NODE_ENV !== \"production\") {\n console.warn(\"Aksel: Use of 'required' in form-elements is heavily discuouraged. Docs about why here:\");\n console.warn(\"https://aksel.nav.no/god-praksis/artikler/obligatoriske-og-valgfrie-skjemafelter#h3bfe00453471\");\n }\n return {\n showErrorMsg,\n hasError,\n errorId,\n inputDescriptionId,\n size: (_b = size !== null && size !== void 0 ? size : fieldset === null || fieldset === void 0 ? void 0 : fieldset.size) !== null && _b !== void 0 ? _b : \"medium\",\n readOnly,\n inputProps: Object.assign(Object.assign({ id }, ariaInvalid), { \"aria-describedby\": cl(props[\"aria-describedby\"], {\n [inputDescriptionId]: !!(props === null || props === void 0 ? void 0 : props.description) && typeof (props === null || props === void 0 ? void 0 : props.description) === \"string\",\n [errorId]: showErrorMsg,\n [(_c = fieldset === null || fieldset === void 0 ? void 0 : fieldset.errorId) !== null && _c !== void 0 ? _c : \"\"]: hasError && !!(fieldset === null || fieldset === void 0 ? void 0 : fieldset.error),\n }) || undefined, disabled }),\n };\n};\n//# sourceMappingURL=useFormField.js.map","const sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n return {\n ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n const webkit = isWebKit();\n const css = getComputedStyle(element);\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = getParentNode(currentNode);\n }\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isWebKit };\n","import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';\n\nfunction activeElement(doc) {\n let activeElement = doc.activeElement;\n while (((_activeElement = activeElement) == null ? void 0 : (_activeElement$shadow = _activeElement.shadowRoot) == null ? void 0 : _activeElement$shadow.activeElement) != null) {\n var _activeElement, _activeElement$shadow;\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode && child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\n// Avoid Chrome DevTools blue warning.\nfunction getPlatform() {\n const uaData = navigator.userAgentData;\n if (uaData != null && uaData.platform) {\n return uaData.platform;\n }\n return navigator.platform;\n}\nfunction getUserAgent() {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(_ref => {\n let {\n brand,\n version\n } = _ref;\n return brand + \"/\" + version;\n }).join(' ');\n }\n return navigator.userAgent;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nfunction isVirtualClick(event) {\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n const androidRe = /Android/i;\n if ((androidRe.test(getPlatform()) || androidRe.test(getUserAgent())) && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nfunction isVirtualPointerEvent(event) {\n return event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType !== 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0;\n}\nfunction isSafari() {\n // Chrome DevTools does not complain about navigator.vendor\n return /apple/i.test(navigator.vendor);\n}\nfunction isMac() {\n return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\n}\nfunction isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\nfunction isReactEvent(event) {\n return 'nativeEvent' in event;\n}\nfunction isRootElement(element) {\n return element.matches('html,body');\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\nfunction isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const e = event;\n return e.target != null && node.contains(e.target);\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nconst TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nfunction isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nexport { TYPEABLE_SELECTOR, activeElement, contains, getDocument, getPlatform, getTarget, getUserAgent, isEventTargetWithin, isMac, isMouseLikePointerType, isReactEvent, isRootElement, isSafari, isTypeableElement, isVirtualClick, isVirtualPointerEvent, stopEvent };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a reference element when it is given a certain positioning strategy.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n continue;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n ...rects.floating,\n x,\n y\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$map$so;\n const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n const {\n x,\n y\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: diffCoords\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const overflowAvailableHeight = height - overflow[heightSide];\n const overflowAvailableWidth = width - overflow[widthSide];\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n const maximumClippingWidth = width - overflow.left - overflow.right;\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","import { rectToClientRect, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { arrow, autoPlacement, detectOverflow, flip, hide, inline, limitShift, offset, shift, size } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getDocumentElement, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentIFrame = win.frameElement;\n while (currentIFrame && offsetParent && offsetWin !== win) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentIFrame = getWindow(currentIFrame).frameElement;\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n if (offsetParent === documentElement) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n return getCssDimensions(element);\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const window = getWindow(element);\n if (!isHTMLElement(element)) {\n return window;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n return offsetParent || getContainingBlock(element) || window;\n}\n\nconst getElementRects = async function (_ref) {\n let {\n reference,\n floating,\n strategy\n } = _ref;\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n return {\n reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),\n floating: {\n x: 0,\n y: 0,\n ...(await getDimensionsFn(floating))\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n clearTimeout(timeoutId);\n io && io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 100);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle