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..ae92e5ee2
--- /dev/null
+++ b/asset-manifest.json
@@ -0,0 +1,90 @@
+{
+ "_app-b395e4c7.js": {
+ "assets": [
+ "assets/logo-8f085720.png"
+ ],
+ "css": [
+ "assets/app-17143de7.css"
+ ],
+ "file": "assets/app-b395e4c7.js",
+ "imports": [
+ "index.html",
+ "_transaksjonstyperTypes-edba52a6.js"
+ ]
+ },
+ "_transaksjonstyperTypes-edba52a6.js": {
+ "file": "assets/transaksjonstyperTypes-edba52a6.js",
+ "imports": [
+ "index.html"
+ ]
+ },
+ "app.css": {
+ "file": "assets/app-17143de7.css",
+ "src": "app.css"
+ },
+ "index.css": {
+ "file": "assets/index-caa3b0ba.css",
+ "src": "index.css"
+ },
+ "index.html": {
+ "css": [
+ "assets/index-caa3b0ba.css"
+ ],
+ "dynamicImports": [
+ "src/webcomponentWrapper.tsx",
+ "src/rootWrapper.tsx",
+ "src/mocks/index.ts"
+ ],
+ "file": "assets/index-5ef17528.js",
+ "isEntry": true,
+ "src": "index.html"
+ },
+ "src/hovedside/tavle/obs.svg": {
+ "file": "assets/obs-7e4d4686.svg",
+ "src": "src/hovedside/tavle/obs.svg"
+ },
+ "src/mocks/index.ts": {
+ "file": "assets/index-bd7f2715.js",
+ "imports": [
+ "index.html",
+ "_transaksjonstyperTypes-edba52a6.js"
+ ],
+ "isDynamicEntry": true,
+ "src": "src/mocks/index.ts"
+ },
+ "src/moduler/mal-linje/Aktivitetsplan_maal.svg": {
+ "file": "assets/Aktivitetsplan_maal-117bd5a1.svg",
+ "src": "src/moduler/mal-linje/Aktivitetsplan_maal.svg"
+ },
+ "src/moduler/utskrift/ikoner/logo.png": {
+ "file": "assets/logo-8f085720.png",
+ "src": "src/moduler/utskrift/ikoner/logo.png"
+ },
+ "src/rootWrapper.css": {
+ "file": "assets/rootWrapper-a4151217.css",
+ "src": "src/rootWrapper.css"
+ },
+ "src/rootWrapper.tsx": {
+ "css": [
+ "assets/rootWrapper-a4151217.css"
+ ],
+ "file": "assets/rootWrapper-ee3035b6.js",
+ "imports": [
+ "index.html",
+ "_app-b395e4c7.js",
+ "_transaksjonstyperTypes-edba52a6.js"
+ ],
+ "isDynamicEntry": true,
+ "src": "src/rootWrapper.tsx"
+ },
+ "src/webcomponentWrapper.tsx": {
+ "file": "assets/webcomponentWrapper-293de22b.js",
+ "imports": [
+ "index.html",
+ "_app-b395e4c7.js",
+ "_transaksjonstyperTypes-edba52a6.js"
+ ],
+ "isDynamicEntry": true,
+ "src": "src/webcomponentWrapper.tsx"
+ }
+}
\ No newline at end of file
diff --git a/assets/Aktivitetsplan_maal-117bd5a1.svg b/assets/Aktivitetsplan_maal-117bd5a1.svg
new file mode 100644
index 000000000..73b2a629e
--- /dev/null
+++ b/assets/Aktivitetsplan_maal-117bd5a1.svg
@@ -0,0 +1,12 @@
+
diff --git a/assets/app-17143de7.css b/assets/app-17143de7.css
new file mode 100644
index 000000000..205c22412
--- /dev/null
+++ b/assets/app-17143de7.css
@@ -0,0 +1 @@
+a.mitt-maal{z-index:0}a.mitt-maal:hover #mittmal_header{text-decoration:underline;color:var(--a-blue-500)}.mitt-maal{display:block;border-radius:4px;padding:1rem 1rem .75rem;text-decoration:none;background-color:var(--a-white);color:var(--a-gray-900);margin-bottom:1rem}.mitt-maal.empty{background-color:var(--a-white);border-style:dashed;border-color:var(--a-gray-600);border-width:2px}.mitt-maal.empty:hover,.mitt-maal.empty--hover{box-shadow:var(--a-gray-300) 0 0 5px 0}#mittmal_header{margin:0 1rem;color:var(--a-gray-900);display:flex;text-transform:uppercase}.mittmal_content{margin:0 1rem}.mittmal_callToAction{padding:1rem 0 0}@media (min-width: 992px){.mitt-maal{margin-bottom:2rem;display:flex;align-items:center;min-height:5rem}#mittmal_header{margin-left:2rem;width:20%}.mittmal_content{width:70%;margin:0 0 0 1.5rem}.mittmal_callToAction{padding:0 0 0 6rem}.mittmal_knapp{margin-left:1.5rem}}._aktivitetskort_pnkum_1{margin-bottom:.5rem;display:block;background-color:var(--a-white);color:var(--a-gray-900);position:relative;text-align:left;text-decoration:none;padding:.75rem 1rem 1rem;cursor:pointer}._aktivitetskort_pnkum_1:focus{outline:0;box-shadow:0 0 0 3px var(--a-blue-800)}._aktivitetskort_pnkum_1:hover{box-shadow:1px 1px 3px 0 var(--a-gray-600)}._aktivitetskort_pnkum_1:hover ._tittel_pnkum_19{color:var(--a-blue-500);text-decoration:underline}._sistVist_pnkum_23{background-color:var(--a-blue-50);box-shadow:0 0 0 1px var(--a-blue-500)}._type_pnkum_27{text-transform:uppercase}._drag_pnkum_30{background-color:var(--a-gray-300)}._tittel_pnkum_19{display:inline-block;margin-bottom:4px}._frist_pnkum_37{font-style:italic;color:#a13a28}._fristUtgaat_pnkum_41{font-style:italic}._ikon_pnkum_44{height:0;align-self:flex-end}._flyttbar_pnkum_48{cursor:move;cursor:grab}._dialogIkonUtenUleste_pnkum_52{position:relative;float:right;top:-1.25rem;left:.25rem}._dialogIkonMedUleste_pnkum_58{position:relative;float:right;top:-1.75rem;left:.25rem;font-size:14px}._invertedLesMer_1ppb9_1 .ReactCollapse--collapse{transition:height .15s}._invertedLesMer_1ppb9_1 ._toggle_1ppb9_4 .lesMerPanel__toggle{margin-top:0;padding-bottom:.5rem}._invertedLesMer_1ppb9_1 ._toggle_1ppb9_4 .lesMerPanel__toggle .lesMerPanel__togglelink{color:var(--a-gray-900)}._invertedLesMer_1ppb9_1 ._toggle_1ppb9_4 .lesMerPanel__toggle .lesMerPanel__toggleChevron{margin-top:.3rem}._invertedLesMer_1ppb9_1 ._toggle_1ppb9_4 .lesMerPanel__toggle .lesMerPanel__togglelink--erApen .lesMerPanel__toggleChevron{margin-bottom:.3rem}._avtaltTekstEtikett_rgh1a_1{float:left;text-transform:uppercase;color:var(--a-gray-600)}._maxWidth300_rgh1a_6{max-width:300px}._button_1b5vd_1{border:inherit!important;font-weight:inherit!important;letter-spacing:inherit!important;margin-left:.2rem!important;margin-right:inherit!important;min-height:inherit!important;justify-content:inherit!important;padding:inherit!important;padding-left:.1rem!important;text-transform:inherit!important;vertical-align:inherit!important}._button_1b5vd_1:hover{box-shadow:inherit!important;background:inherit!important;color:var(--a-blue-500)!important;text-decoration:underline!important}._content_1b5vd_20{white-space:pre-wrap}._forhaandsorientering_bkwf6_1{margin:.3rem 0}._lestTekst_bkwf6_4{font-style:italic}._tittel_bkwf6_7{color:var(--a-gray-600)}
diff --git a/assets/app-b395e4c7.js b/assets/app-b395e4c7.js
new file mode 100644
index 000000000..cb8804d6b
--- /dev/null
+++ b/assets/app-b395e4c7.js
@@ -0,0 +1,92 @@
+var qx=Object.defineProperty;var Yx=(e,t,r)=>t in e?qx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ho=(e,t,r)=>(Yx(e,typeof t!="symbol"?t+"":t,r),r);import{b as ae,g as Tr,c as on,d as Ar,e as xk,f as Cr,a as v,R as k,h as ve,B as Sk,u as Ht,H as Gx,E as Xp,C as Zx,i as oa,k as oe,l as ce,m as wu,o as di,L as xu,D as mn,n as Jp,p as qd,q as Xx,s as Wn,t as cn,v as Qp,w as Jx,x as Ne,S as Nn,r as jk,y as tl,z as Qx,A as ev,j as l,M as Gi,F,G as tv,I as Su,J as io,T as rv,K as ju,U as nv,N as Tu,O as aa,Q as Yt,V as ar,W as iv,X as ov,Y as Yd,Z as Ja,_ as eS,$ as tS,a0 as rS,a1 as av,a2 as nS,a3 as Tk,a4 as iS,a5 as oo,a6 as _r,a7 as oS,a8 as aS,a9 as sS}from"./index-5ef17528.js";import{t as ue,a as Ce,b as Zt,c as lS,s as Mo,d as sv,A as pe,e as uS,V as lv,f as xt,g as fe,i as $t,h as sa,S as Vr,j as Ok,E as Io,J as Gd,K as Fr,k as uv,l as Ek,m as Va,n as cS,F as Qn,o as Zc,M as Fa,p as Fi,L as dS}from"./transaksjonstyperTypes-edba52a6.js";function wr(e,t){ae(2,arguments);var r=ue(e),n=Ce(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var i=r.getDate(),o=new Date(r.getTime());o.setMonth(r.getMonth()+n+1,0);var a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}function gr(e){ae(1,arguments);var t=ue(e),r=t.getDay();return r===0||r===6}function Wr(e,t){var r,n,i,o,a,s,u,c;ae(1,arguments);var d=Tr(),f=Ce((r=(n=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=ue(e),m=p.getDay(),g=(m=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function pS(e){ae(1,arguments);var t=fS(e),r=new Date(0);r.setFullYear(t,0,4),r.setHours(0,0,0,0);var n=fi(r);return n}function Pn(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function zt(e){ae(1,arguments);var t=ue(e);return t.setHours(0,0,0,0),t}var vS=864e5;function kt(e,t){ae(2,arguments);var r=zt(e),n=zt(t),i=r.getTime()-Pn(r),o=n.getTime()-Pn(n);return Math.round((i-o)/vS)}function Zd(e,t){ae(2,arguments);var r=Ce(t),n=r*7;return Zt(e,n)}function mS(e,t){ae(2,arguments);var r=Ce(t);return wr(e,r*12)}function Qa(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qa=function(r){return typeof r}:Qa=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qa(e)}function gS(e){ae(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Qa(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var r;return t.forEach(function(n){var i=ue(n);(r===void 0||ri||isNaN(i.getDate()))&&(r=i)}),r||new Date(NaN)}function ts(e,t){ae(2,arguments);var r=ue(e),n=ue(t),i=r.getTime()-n.getTime();return i<0?-1:i>0?1:i}var Ou=6e4,cv=36e5,yS=1e3,kS=60,bS=60;function or(e,t){ae(2,arguments);var r=zt(e),n=zt(t);return r.getTime()===n.getTime()}function rs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rs=function(r){return typeof r}:rs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},rs(e)}function Eu(e){return ae(1,arguments),e instanceof Date||rs(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Kt(e){if(ae(1,arguments),!Eu(e)&&typeof e!="number")return!1;var t=ue(e);return!isNaN(Number(t))}function Zi(e,t){ae(2,arguments);var r=ue(e),n=ue(t),i=r.getFullYear()-n.getFullYear(),o=r.getMonth()-n.getMonth();return i*12+o}var _S=6048e5;function wS(e,t,r){ae(2,arguments);var n=Wr(e,r),i=Wr(t,r),o=n.getTime()-Pn(n),a=i.getTime()-Pn(i);return Math.round((o-a)/_S)}function Zm(e,t){var r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}function Dk(e,t){ae(2,arguments);var r=ue(e),n=ue(t),i=Zm(r,n),o=Math.abs(kt(r,n));r.setDate(r.getDate()-i*o);var a=+(Zm(r,n)===-i),s=i*(o-a);return s===0?0:s}function Du(e,t){return ae(2,arguments),ue(e).getTime()-ue(t).getTime()}var Xm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},xS="trunc";function Ik(e){return e?Xm[e]:Xm[xS]}function SS(e,t,r){ae(2,arguments);var n=Du(e,t)/Ou;return Ik(r==null?void 0:r.roundingMethod)(n)}function Rk(e){ae(1,arguments);var t=ue(e);return t.setHours(23,59,59,999),t}function Iu(e){ae(1,arguments);var t=ue(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function jS(e){ae(1,arguments);var t=ue(e);return Rk(t).getTime()===Iu(t).getTime()}function TS(e,t){ae(2,arguments);var r=ue(e),n=ue(t),i=ts(r,n),o=Math.abs(Zi(r,n)),a;if(o<1)a=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);var s=ts(r,n)===-i;jS(ue(e))&&o===1&&ts(e,n)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function Nk(e,t,r){ae(2,arguments);var n=Du(e,t)/1e3;return Ik(r==null?void 0:r.roundingMethod)(n)}function vt(e){ae(1,arguments);var t=ue(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Pk(e){ae(1,arguments);var t=ue(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function dv(e,t){var r,n,i,o,a,s,u,c;ae(1,arguments);var d=Tr(),f=Ce((r=(n=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=ue(e),m=p.getDay(),g=(m=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function DS(e){ae(1,arguments);var t=Lk(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=Xi(r);return n}var IS=6048e5;function $k(e){ae(1,arguments);var t=ue(e),r=Xi(t).getTime()-DS(t).getTime();return Math.round(r/IS)+1}function pi(e,t){var r,n,i,o,a,s,u,c;ae(1,arguments);var d=Tr(),f=Ce((r=(n=(i=(o=t==null?void 0:t.weekStartsOn)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&i!==void 0?i:d.weekStartsOn)!==null&&n!==void 0?n:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=ue(e),m=p.getUTCDay(),g=(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(f+1,0,m),g.setUTCHours(0,0,0,0);var h=pi(g,t),b=new Date(0);b.setUTCFullYear(f,0,m),b.setUTCHours(0,0,0,0);var _=pi(b,t);return d.getTime()>=h.getTime()?f+1:d.getTime()>=_.getTime()?f:f-1}function RS(e,t){var r,n,i,o,a,s,u,c;ae(1,arguments);var d=Tr(),f=Ce((r=(n=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),p=fv(e,t),m=new Date(0);m.setUTCFullYear(p,0,f),m.setUTCHours(0,0,0,0);var g=pi(m,t);return g}var NS=6048e5;function Vk(e,t){ae(1,arguments);var r=ue(e),n=pi(r,t).getTime()-RS(r,t).getTime();return Math.round(n/NS)+1}function Ke(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return Ke(r==="yy"?i%100:i,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):Ke(n+1,2)},d:function(t,r){return Ke(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return Ke(t.getUTCHours()%12||12,r.length)},H:function(t,r){return Ke(t.getUTCHours(),r.length)},m:function(t,r){return Ke(t.getUTCMinutes(),r.length)},s:function(t,r){return Ke(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,i=t.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,n-3));return Ke(o,r.length)}};const bn=PS;var Ni={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},AS={G:function(t,r,n){var i=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var i=t.getUTCFullYear(),o=i>0?i:1-i;return n.ordinalNumber(o,{unit:"year"})}return bn.y(t,r)},Y:function(t,r,n,i){var o=fv(t,i),a=o>0?o:1-o;if(r==="YY"){var s=a%100;return Ke(s,2)}return r==="Yo"?n.ordinalNumber(a,{unit:"year"}):Ke(a,r.length)},R:function(t,r){var n=Lk(t);return Ke(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return Ke(n,r.length)},Q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(i);case"QQ":return Ke(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,r,n){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(i);case"qq":return Ke(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,r,n){var i=t.getUTCMonth();switch(r){case"M":case"MM":return bn.M(t,r);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,r,n){var i=t.getUTCMonth();switch(r){case"L":return String(i+1);case"LL":return Ke(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,r,n,i){var o=Vk(t,i);return r==="wo"?n.ordinalNumber(o,{unit:"week"}):Ke(o,r.length)},I:function(t,r,n){var i=$k(t);return r==="Io"?n.ordinalNumber(i,{unit:"week"}):Ke(i,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):bn.d(t,r)},D:function(t,r,n){var i=ES(t);return r==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Ke(i,r.length)},E:function(t,r,n){var i=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"e":return String(a);case"ee":return Ke(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,r,n,i){var o=t.getUTCDay(),a=(o-i.weekStartsOn+8)%7||7;switch(r){case"c":return String(a);case"cc":return Ke(a,r.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,r,n){var i=t.getUTCDay(),o=i===0?7:i;switch(r){case"i":return String(o);case"ii":return Ke(o,r.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,r,n){var i=t.getUTCHours(),o=i/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,r,n){var i=t.getUTCHours(),o;switch(i===12?o=Ni.noon:i===0?o=Ni.midnight:o=i/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,r,n){var i=t.getUTCHours(),o;switch(i>=17?o=Ni.evening:i>=12?o=Ni.afternoon:i>=4?o=Ni.morning:o=Ni.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return bn.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):bn.H(t,r)},K:function(t,r,n){var i=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Ke(i,r.length)},k:function(t,r,n){var i=t.getUTCHours();return i===0&&(i=24),r==="ko"?n.ordinalNumber(i,{unit:"hour"}):Ke(i,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):bn.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):bn.s(t,r)},S:function(t,r){return bn.S(t,r)},X:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();if(a===0)return"Z";switch(r){case"X":return Qm(a);case"XXXX":case"XX":return ri(a);case"XXXXX":case"XXX":default:return ri(a,":")}},x:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"x":return Qm(a);case"xxxx":case"xx":return ri(a);case"xxxxx":case"xxx":default:return ri(a,":")}},O:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Jm(a,":");case"OOOO":default:return"GMT"+ri(a,":")}},z:function(t,r,n,i){var o=i._originalDate||t,a=o.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Jm(a,":");case"zzzz":default:return"GMT"+ri(a,":")}},t:function(t,r,n,i){var o=i._originalDate||t,a=Math.floor(o.getTime()/1e3);return Ke(a,r.length)},T:function(t,r,n,i){var o=i._originalDate||t,a=o.getTime();return Ke(a,r.length)}};function Jm(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(o===0)return r+String(i);var a=t||"";return r+String(i)+a+Ke(o,2)}function Qm(e,t){if(e%60===0){var r=e>0?"-":"+";return r+Ke(Math.abs(e)/60,2)}return ri(e,t)}function ri(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e),o=Ke(Math.floor(i/60),2),a=Ke(i%60,2);return n+o+r+a}const CS=AS;var eg=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Fk=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},MS=function(t,r){var n=t.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return eg(t,r);var a;switch(i){case"P":a=r.dateTime({width:"short"});break;case"PP":a=r.dateTime({width:"medium"});break;case"PPP":a=r.dateTime({width:"long"});break;case"PPPP":default:a=r.dateTime({width:"full"});break}return a.replace("{{date}}",eg(i,r)).replace("{{time}}",Fk(o,r))},LS={p:Fk,P:MS};const Xd=LS;var $S=["D","DD"],VS=["YY","YYYY"];function Hk(e){return $S.indexOf(e)!==-1}function Uk(e){return VS.indexOf(e)!==-1}function rl(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var FS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},HS=function(t,r,n){var i,o=FS[t];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const Bk=HS;var US={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},KS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},WS={date:on({formats:US,defaultWidth:"full"}),time:on({formats:BS,defaultWidth:"full"}),dateTime:on({formats:KS,defaultWidth:"full"})};const zS=WS;var qS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YS=function(t,r,n,i){return qS[t]};const Kk=YS;var GS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ZS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},XS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},JS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},QS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ej={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},tj=function(t,r){var n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},rj={ordinalNumber:tj,era:Ar({values:GS,defaultWidth:"wide"}),quarter:Ar({values:ZS,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ar({values:XS,defaultWidth:"wide"}),day:Ar({values:JS,defaultWidth:"wide"}),dayPeriod:Ar({values:QS,defaultWidth:"wide",formattingValues:ej,defaultFormattingWidth:"wide"})};const Wk=rj;var nj=/^(\d+)(th|st|nd|rd)?/i,ij=/\d+/i,oj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},aj={any:[/^b/i,/^(a|c)/i]},sj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lj={any:[/1/i,/2/i,/3/i,/4/i]},uj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},cj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},vj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mj={ordinalNumber:xk({matchPattern:nj,parsePattern:ij,valueCallback:function(t){return parseInt(t,10)}}),era:Cr({matchPatterns:oj,defaultMatchWidth:"wide",parsePatterns:aj,defaultParseWidth:"any"}),quarter:Cr({matchPatterns:sj,defaultMatchWidth:"wide",parsePatterns:lj,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Cr({matchPatterns:uj,defaultMatchWidth:"wide",parsePatterns:cj,defaultParseWidth:"any"}),day:Cr({matchPatterns:dj,defaultMatchWidth:"wide",parsePatterns:fj,defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:pj,defaultMatchWidth:"any",parsePatterns:vj,defaultParseWidth:"any"})};const zk=mj;var gj={code:"en-US",formatDistance:Bk,formatLong:zS,formatRelative:Kk,localize:Wk,match:zk,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ru=gj;var hj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,kj=/^'([^]*?)'?$/,bj=/''/g,_j=/[a-zA-Z]/;function Ct(e,t,r){var n,i,o,a,s,u,c,d,f,p,m,g,h,b,_,y,S,O;ae(2,arguments);var I=String(t),T=Tr(),V=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:T.locale)!==null&&n!==void 0?n:Ru,K=Ce((o=(a=(s=(u=r==null?void 0:r.firstWeekContainsDate)!==null&&u!==void 0?u:r==null||(c=r.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&s!==void 0?s:T.firstWeekContainsDate)!==null&&a!==void 0?a:(f=T.locale)===null||f===void 0||(p=f.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(K>=1&&K<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var Y=Ce((m=(g=(h=(b=r==null?void 0:r.weekStartsOn)!==null&&b!==void 0?b:r==null||(_=r.locale)===null||_===void 0||(y=_.options)===null||y===void 0?void 0:y.weekStartsOn)!==null&&h!==void 0?h:T.weekStartsOn)!==null&&g!==void 0?g:(S=T.locale)===null||S===void 0||(O=S.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&m!==void 0?m:0);if(!(Y>=0&&Y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!V.localize)throw new RangeError("locale must contain localize property");if(!V.formatLong)throw new RangeError("locale must contain formatLong property");var z=ue(e);if(!Kt(z))throw new RangeError("Invalid time value");var G=Pn(z),M=Mk(z,G),N={firstWeekContainsDate:K,weekStartsOn:Y,locale:V,_originalDate:z},R=I.match(yj).map(function(w){var E=w[0];if(E==="p"||E==="P"){var B=Xd[E];return B(w,V.formatLong)}return w}).join("").match(hj).map(function(w){if(w==="''")return"'";var E=w[0];if(E==="'")return wj(w);var B=CS[E];if(B)return!(r!=null&&r.useAdditionalWeekYearTokens)&&Uk(w)&&rl(w,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&Hk(w)&&rl(w,t,String(e)),B(M,w,V.localize,N);if(E.match(_j))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return w}).join("");return R}function wj(e){var t=e.match(kj);return t?t[1].replace(bj,"'"):e}function pv(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function xj(e){return pv({},e)}var tg=1440,Sj=2520,Xc=43200,jj=86400;function Tj(e,t,r){var n,i;ae(2,arguments);var o=Tr(),a=(n=(i=r==null?void 0:r.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:Ru;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=ts(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var u=pv(xj(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),c,d;s>0?(c=ue(t),d=ue(e)):(c=ue(e),d=ue(t));var f=Nk(d,c),p=(Pn(d)-Pn(c))/1e3,m=Math.round((f-p)/60),g;if(m<2)return r!=null&&r.includeSeconds?f<5?a.formatDistance("lessThanXSeconds",5,u):f<10?a.formatDistance("lessThanXSeconds",10,u):f<20?a.formatDistance("lessThanXSeconds",20,u):f<40?a.formatDistance("halfAMinute",0,u):f<60?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",1,u):m===0?a.formatDistance("lessThanXMinutes",1,u):a.formatDistance("xMinutes",m,u);if(m<45)return a.formatDistance("xMinutes",m,u);if(m<90)return a.formatDistance("aboutXHours",1,u);if(m=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setFullYear(f+1,0,m),g.setHours(0,0,0,0);var h=Wr(g,t),b=new Date(0);b.setFullYear(f,0,m),b.setHours(0,0,0,0);var _=Wr(b,t);return d.getTime()>=h.getTime()?f+1:d.getTime()>=_.getTime()?f:f-1}function Pj(e,t){var r,n,i,o,a,s,u,c;ae(1,arguments);var d=Tr(),f=Ce((r=(n=(i=(o=t==null?void 0:t.firstWeekContainsDate)!==null&&o!==void 0?o:t==null||(a=t.locale)===null||a===void 0||(s=a.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&i!==void 0?i:d.firstWeekContainsDate)!==null&&n!==void 0?n:(u=d.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&r!==void 0?r:1),p=Nj(e,t),m=new Date(0);m.setFullYear(p,0,f),m.setHours(0,0,0,0);var g=Wr(m,t);return g}var Aj=6048e5;function Cj(e,t){ae(1,arguments);var r=ue(e),n=Wr(r,t).getTime()-Pj(r,t).getTime();return Math.round(n/Aj)+1}function Mj(e){ae(1,arguments);var t=ue(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(0,0,0,0),t}function Lj(e,t){return ae(1,arguments),wS(Mj(e),vt(e),t)+1}function Or(e,t){ae(2,arguments);var r=ue(e),n=ue(t);return r.getTime()>n.getTime()}function zr(e,t){ae(2,arguments);var r=ue(e),n=ue(t);return r.getTime()"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},nl(e)}function vv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},il(e)}function og(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xj=function(e){qj(r,e);var t=Yj(r);function r(){var n;Wj(this,r);for(var i=arguments.length,o=new Array(i),a=0;a0,n=r?t:1-t,i;if(n<=50)i=e||100;else{var o=n+50,a=Math.floor(o/100)*100,s=e>=o%100;i=e+a-(s?100:0)}return r?i:1-i}function Jk(e){return e%400===0||e%4===0&&e%100!==0}function os(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?os=function(r){return typeof r}:os=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},os(e)}function Jj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ag(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function al(e){return al=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},al(e)}function sg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var iT=function(e){eT(r,e);var t=tT(r);function r(){var n;Jj(this,r);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(i,o,a){var s=i.getUTCFullYear();if(a.isTwoDigitYear){var u=Xk(a.year,s);return i.setUTCFullYear(u,0,1),i.setUTCHours(0,0,0,0),i}var c=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(c,0,1),i.setUTCHours(0,0,0,0),i}}]),r}(He);function as(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?as=function(r){return typeof r}:as=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},as(e)}function oT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},sl(e)}function ug(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var dT=function(e){sT(r,e);var t=lT(r);function r(){var n;oT(this,r);for(var i=arguments.length,o=new Array(i),a=0;a0}},{key:"set",value:function(i,o,a,s){var u=fv(i,s);if(a.isTwoDigitYear){var c=Xk(a.year,u);return i.setUTCFullYear(c,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),pi(i,s)}var d=!("era"in o)||o.era===1?a.year:1-a.year;return i.setUTCFullYear(d,0,s.firstWeekContainsDate),i.setUTCHours(0,0,0,0),pi(i,s)}}]),r}(He);function ss(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ss=function(r){return typeof r}:ss=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ss(e)}function fT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ll(e){return ll=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ll(e)}function dg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yT=function(e){vT(r,e);var t=mT(r);function r(){var n;fT(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ul(e){return ul=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ul(e)}function pg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var jT=function(e){_T(r,e);var t=wT(r);function r(){var n;kT(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cl(e){return cl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},cl(e)}function mg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var NT=function(e){ET(r,e);var t=DT(r);function r(){var n;TT(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(He);function cs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cs=function(r){return typeof r}:cs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},cs(e)}function PT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dl(e){return dl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},dl(e)}function hg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var VT=function(e){CT(r,e);var t=MT(r);function r(){var n;PT(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=4}},{key:"set",value:function(i,o,a){return i.setUTCMonth((a-1)*3,1),i.setUTCHours(0,0,0,0),i}}]),r}(He);function ds(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ds=function(r){return typeof r}:ds=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ds(e)}function FT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fl(e){return fl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},fl(e)}function kg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zT=function(e){UT(r,e);var t=BT(r);function r(){var n;FT(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(He);function fs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fs=function(r){return typeof r}:fs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fs(e)}function qT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pl(e){return pl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pl(e)}function _g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var QT=function(e){GT(r,e);var t=ZT(r);function r(){var n;qT(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){return i.setUTCMonth(a,1),i.setUTCHours(0,0,0,0),i}}]),r}(He);function eO(e,t,r){ae(2,arguments);var n=ue(e),i=Ce(t),o=Vk(n,r)-i;return n.setUTCDate(n.getUTCDate()-o*7),n}function ps(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ps=function(r){return typeof r}:ps=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ps(e)}function tO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vl(e){return vl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},vl(e)}function xg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var sO=function(e){nO(r,e);var t=iO(r);function r(){var n;tO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=53}},{key:"set",value:function(i,o,a,s){return pi(eO(i,a,s),s)}}]),r}(He);function lO(e,t){ae(2,arguments);var r=ue(e),n=Ce(t),i=$k(r)-n;return r.setUTCDate(r.getUTCDate()-i*7),r}function vs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vs=function(r){return typeof r}:vs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vs(e)}function uO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ml(e){return ml=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ml(e)}function jg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var mO=function(e){dO(r,e);var t=fO(r);function r(){var n;uO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=53}},{key:"set",value:function(i,o,a){return Xi(lO(i,a))}}]),r}(He);function ms(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ms=function(r){return typeof r}:ms=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ms(e)}function gO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gl(e){return gl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},gl(e)}function Jc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wO=[31,28,31,30,31,30,31,31,30,31,30,31],xO=[31,29,31,30,31,30,31,31,30,31,30,31],SO=function(e){yO(r,e);var t=kO(r);function r(){var n;gO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=xO[u]:o>=1&&o<=wO[u]}},{key:"set",value:function(i,o,a){return i.setUTCDate(a),i.setUTCHours(0,0,0,0),i}}]),r}(He);function hs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hs=function(r){return typeof r}:hs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},hs(e)}function jO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Og(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hl(e){return hl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hl(e)}function Qc(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var RO=function(e){OO(r,e);var t=EO(r);function r(){var n;jO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(i,o,a){return i.setUTCMonth(0,a),i.setUTCHours(0,0,0,0),i}}]),r}(He);function hv(e,t,r){var n,i,o,a,s,u,c,d;ae(2,arguments);var f=Tr(),p=Ce((n=(i=(o=(a=r==null?void 0:r.weekStartsOn)!==null&&a!==void 0?a:r==null||(s=r.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&i!==void 0?i:(c=f.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&n!==void 0?n:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=ue(e),g=Ce(t),h=m.getUTCDay(),b=g%7,_=(b+7)%7,y=(_
"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function yl(e){return yl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},yl(e)}function Dg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var $O=function(e){AO(r,e);var t=CO(r);function r(){var n;NO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=hv(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(He);function bs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?bs=function(r){return typeof r}:bs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},bs(e)}function VO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ig(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kl(e){return kl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},kl(e)}function Rg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var WO=function(e){HO(r,e);var t=UO(r);function r(){var n;VO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=hv(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(He);function _s(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_s=function(r){return typeof r}:_s=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_s(e)}function zO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ng(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},bl(e)}function Pg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var JO=function(e){YO(r,e);var t=GO(r);function r(){var n;zO(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=6}},{key:"set",value:function(i,o,a,s){return i=hv(i,a,s),i.setUTCHours(0,0,0,0),i}}]),r}(He);function QO(e,t){ae(2,arguments);var r=Ce(t);r%7===0&&(r=r-7);var n=1,i=ue(e),o=i.getUTCDay(),a=r%7,s=(a+7)%7,u=(s"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _l(e){return _l=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},_l(e)}function Cg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var aE=function(e){rE(r,e);var t=nE(r);function r(){var n;eE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=7}},{key:"set",value:function(i,o,a){return i=QO(i,a),i.setUTCHours(0,0,0,0),i}}]),r}(He);function xs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xs=function(r){return typeof r}:xs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xs(e)}function sE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wl(e){return wl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},wl(e)}function Lg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var pE=function(e){uE(r,e);var t=cE(r);function r(){var n;sE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},xl(e)}function Vg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bE=function(e){gE(r,e);var t=hE(r);function r(){var n;vE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Sl(e){return Sl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Sl(e)}function Hg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var OE=function(e){xE(r,e);var t=SE(r);function r(){var n;_E(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function jl(e){return jl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},jl(e)}function Bg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var AE=function(e){IE(r,e);var t=RE(r);function r(){var n;EE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=12}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):!s&&a===12?i.setUTCHours(0,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(He);function Os(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Os=function(r){return typeof r}:Os=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Os(e)}function CE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Tl(e){return Tl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Tl(e)}function Wg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var HE=function(e){LE(r,e);var t=$E(r);function r(){var n;CE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=23}},{key:"set",value:function(i,o,a){return i.setUTCHours(a,0,0,0),i}}]),r}(He);function Es(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Es=function(r){return typeof r}:Es=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Es(e)}function UE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ol(e){return Ol=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ol(e)}function qg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var YE=function(e){KE(r,e);var t=WE(r);function r(){var n;UE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=11}},{key:"set",value:function(i,o,a){var s=i.getUTCHours()>=12;return s&&a<12?i.setUTCHours(a+12,0,0,0):i.setUTCHours(a,0,0,0),i}}]),r}(He);function Ds(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ds=function(r){return typeof r}:Ds=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ds(e)}function GE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function El(e){return El=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},El(e)}function Gg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var t2=function(e){XE(r,e);var t=JE(r);function r(){var n;GE(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=1&&o<=24}},{key:"set",value:function(i,o,a){var s=a<=24?a%24:a;return i.setUTCHours(s,0,0,0),i}}]),r}(He);function Is(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Is=function(r){return typeof r}:Is=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Is(e)}function r2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Dl(e){return Dl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Dl(e)}function Xg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l2=function(e){i2(r,e);var t=o2(r);function r(){var n;r2(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCMinutes(a,0,0),i}}]),r}(He);function Rs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Rs=function(r){return typeof r}:Rs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Rs(e)}function u2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jg(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Il(e){return Il=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Il(e)}function Qg(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m2=function(e){d2(r,e);var t=f2(r);function r(){var n;u2(this,r);for(var i=arguments.length,o=new Array(i),a=0;a=0&&o<=59}},{key:"set",value:function(i,o,a){return i.setUTCSeconds(a,0),i}}]),r}(He);function Ns(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ns=function(r){return typeof r}:Ns=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ns(e)}function g2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eh(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rl(e){return Rl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Rl(e)}function th(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var w2=function(e){y2(r,e);var t=k2(r);function r(){var n;g2(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Nl(e){return Nl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Nl(e)}function nh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var D2=function(e){j2(r,e);var t=T2(r);function r(){var n;x2(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pl(e){return Pl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Pl(e)}function oh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var M2=function(e){N2(r,e);var t=P2(r);function r(){var n;I2(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Al(e){return Al=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Al(e)}function sh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var B2=function(e){V2(r,e);var t=F2(r);function r(){var n;L2(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cl(e){return Cl=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Cl(e)}function uh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Z2=function(e){z2(r,e);var t=q2(r);function r(){var n;K2(this,r);for(var i=arguments.length,o=new Array(i),a=0;a"u"||e[Symbol.iterator]==null){if(Array.isArray(e)||(r=J2(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=e[Symbol.iterator]()},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function J2(e,t){if(e){if(typeof e=="string")return dh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dh(e,t)}}function dh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=1&&z<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var G=Ce((g=(h=(b=(_=n==null?void 0:n.weekStartsOn)!==null&&_!==void 0?_:n==null||(y=n.locale)===null||y===void 0||(S=y.options)===null||S===void 0?void 0:S.weekStartsOn)!==null&&b!==void 0?b:K.weekStartsOn)!==null&&h!==void 0?h:(O=K.locale)===null||O===void 0||(I=O.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&g!==void 0?g:0);if(!(G>=0&&G<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(V==="")return T===""?ue(r):new Date(NaN);var M={firstWeekContainsDate:z,weekStartsOn:G,locale:Y},N=[new Uj],R=V.match(eD).map(function(ke){var ge=ke[0];if(ge in Xd){var Ae=Xd[ge];return Ae(ke,Y.formatLong)}return ke}).join("").match(Q2),w=[],E=ch(R),B;try{var Q=function(){var ge=B.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&Uk(ge)&&rl(ge,V,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Hk(ge)&&rl(ge,V,e);var Ae=ge[0],Xe=X2[Ae];if(Xe){var $e=Xe.incompatibleTokens;if(Array.isArray($e)){var H=w.find(function(Ee){return $e.includes(Ee.token)||Ee.token===Ae});if(H)throw new RangeError("The format string mustn't contain `".concat(H.fullToken,"` and `").concat(ge,"` at the same time"))}else if(Xe.incompatibleTokens==="*"&&w.length>0)throw new RangeError("The format string mustn't contain `".concat(ge,"` and any other token at the same time"));w.push({token:Ae,fullToken:ge});var de=Xe.run(T,ge,Y.match,M);if(!de)return{v:new Date(NaN)};N.push(de.setter),T=de.rest}else{if(Ae.match(iD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ae+"`");if(ge==="''"?ge="'":Ae==="'"&&(ge=oD(ge)),T.indexOf(ge)===0)T=T.slice(ge.length);else return{v:new Date(NaN)}}};for(E.s();!(B=E.n()).done;){var A=Q();if(Ls(A)==="object")return A.v}}catch(ke){E.e(ke)}finally{E.f()}if(T.length>0&&nD.test(T))return new Date(NaN);var be=N.map(function(ke){return ke.priority}).sort(function(ke,ge){return ge-ke}).filter(function(ke,ge,Ae){return Ae.indexOf(ke)===ge}).map(function(ke){return N.filter(function(ge){return ge.priority===ke}).sort(function(ge,Ae){return Ae.subPriority-ge.subPriority})}).map(function(ke){return ke[0]}),D=ue(r);if(isNaN(D.getTime()))return new Date(NaN);var L=Mk(D,Pn(D)),P={},W=ch(be),re;try{for(W.s();!(re=W.n()).done;){var he=re.value;if(!he.validate(L,M))return new Date(NaN);var me=he.set(L,P,M);Array.isArray(me)?(L=me[0],pv(P,me[1])):L=me}}catch(ke){W.e(ke)}finally{W.f()}return L}function oD(e){return e.match(tD)[1].replace(rD,"'")}function yv(e,t){ae(2,arguments);var r=ue(e),n=ue(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function $s(e,t){ae(2,arguments);var r=ue(e),n=ue(t);return r.getFullYear()===n.getFullYear()}function aD(e,t){ae(2,arguments);var r=ue(e).getTime(),n=ue(t.start).getTime(),i=ue(t.end).getTime();if(!(n<=i))throw new RangeError("Invalid interval");return r>=n&&r<=i}function sD(e){ae(1,arguments);var t=e/kS;return Math.floor(t)}function ut(e,t){var r;ae(1,arguments);var n=Ce((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var i=dD(e),o;if(i.date){var a=fD(i.date,n);o=pD(a.restDateString,a.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var s=o.getTime(),u=0,c;if(i.time&&(u=vD(i.time),isNaN(u)))return new Date(NaN);if(i.timezone){if(c=mD(i.timezone),isNaN(c))return new Date(NaN)}else{var d=new Date(s+u),f=new Date(0);return f.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),f.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),f}return new Date(s+u+c)}var Ha={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},lD=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,uD=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,cD=/^([+-])(\d{2})(?::?(\d{2}))?$/;function dD(e){var t={},r=e.split(Ha.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],Ha.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Ha.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var i=Ha.timezone.exec(n);i?(t.time=n.replace(i[1],""),t.timezone=i[1]):t.time=n}return t}function fD(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var i=n[1]?parseInt(n[1]):null,o=n[2]?parseInt(n[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((n[1]||n[2]).length)}}function pD(e,t){if(t===null)return new Date(NaN);var r=e.match(lD);if(!r)return new Date(NaN);var n=!!r[4],i=yo(r[1]),o=yo(r[2])-1,a=yo(r[3]),s=yo(r[4]),u=yo(r[5])-1;if(n)return bD(t,s,u)?gD(t,s,u):new Date(NaN);var c=new Date(0);return!yD(t,o,a)||!kD(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}function yo(e){return e?parseInt(e):1}function vD(e){var t=e.match(uD);if(!t)return NaN;var r=ed(t[1]),n=ed(t[2]),i=ed(t[3]);return _D(r,n,i)?r*cv+n*Ou+i*1e3:NaN}function ed(e){return e&&parseFloat(e.replace(",","."))||0}function mD(e){if(e==="Z")return 0;var t=e.match(cD);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return wD(n,i)?r*(n*cv+i*Ou):NaN}function gD(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var i=n.getUTCDay()||7,o=(t-1)*7+r+1-i;return n.setUTCDate(n.getUTCDate()+o),n}var hD=[31,null,31,30,31,30,31,31,30,31,30,31];function Qk(e){return e%400===0||e%4===0&&e%100!==0}function yD(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(hD[t]||(Qk(e)?29:28))}function kD(e,t){return t>=1&&t<=(Qk(e)?366:365)}function bD(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function _D(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function wD(e,t){return t>=0&&t<=59}function xD(e){ae(1,arguments);var t=e/bS;return Math.floor(t)}function Sn(e,t){ae(2,arguments);var r=ue(e),n=Ce(t),i=r.getFullYear(),o=r.getDate(),a=new Date(0);a.setFullYear(i,n,15),a.setHours(0,0,0,0);var s=Oj(a);return r.setMonth(n,Math.min(o,s)),r}function SD(e,t){ae(2,arguments);var r=ue(e),n=Ce(t);return r.setHours(n),r}function jD(e,t){ae(2,arguments);var r=ue(e),n=Ce(t);return r.setMinutes(n),r}function Ml(e,t){ae(2,arguments);var r=ue(e),n=Ce(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function eb(e,t){ae(2,arguments);var r=Ce(t);return wr(e,-r)}function Vs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(r){return typeof r}:Vs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vs(e)}function TD(e,t){if(ae(2,arguments),!t||Vs(t)!=="object")return new Date(NaN);var r=t.years?Ce(t.years):0,n=t.months?Ce(t.months):0,i=t.weeks?Ce(t.weeks):0,o=t.days?Ce(t.days):0,a=t.hours?Ce(t.hours):0,s=t.minutes?Ce(t.minutes):0,u=t.seconds?Ce(t.seconds):0,c=eb(e,n+r*12),d=Mo(c,o+i*7),f=s+a*60,p=u+f*60,m=p*1e3,g=new Date(d.getTime()-m);return g}function OD(e,t){ae(2,arguments);var r=Ce(t);return sv(e,-r)}var lp=function(e,t){return lp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},lp(e,t)};function la(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");lp(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var je=function(){return je=Object.assign||function(t){for(var r,n=1,i=arguments.length;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rt(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function Pr(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;nND)return!1;for(var t in e){var r=e[t];if(!rb(t,r))return!1}return!0},rb=function(e,t){var r,n;if(typeof e!="string")return!1;if(Array.isArray(t)){var i=!0;try{for(var o=Ji(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(Array.isArray(s))return!1;if(typeof s=="object")i=i&&cp(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(u){r={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else{if(t==null)return!1;if(typeof t=="object")return cp(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},Ll=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return je({},this._properties)},e.prototype.set=function(t,r){return this._safeSet(wt.SET,t,r),this},e.prototype.setOnce=function(t,r){return this._safeSet(wt.SET_ONCE,t,r),this},e.prototype.append=function(t,r){return this._safeSet(wt.APPEND,t,r),this},e.prototype.prepend=function(t,r){return this._safeSet(wt.PREPEND,t,r),this},e.prototype.postInsert=function(t,r){return this._safeSet(wt.POSTINSERT,t,r),this},e.prototype.preInsert=function(t,r){return this._safeSet(wt.PREINSERT,t,r),this},e.prototype.remove=function(t,r){return this._safeSet(wt.REMOVE,t,r),this},e.prototype.add=function(t,r){return this._safeSet(wt.ADD,t,r),this},e.prototype.unset=function(t){return this._safeSet(wt.UNSET,t,fh),this},e.prototype.clearAll=function(){return this._properties={},this._properties[wt.CLEAR_ALL]=fh,this},e.prototype._safeSet=function(t,r,n){if(this._validate(t,r,n)){var i=this._properties[t];return i===void 0&&(i={},this._properties[t]=i),i[r]=n,this._propertySet.add(r),!0}return!1},e.prototype._validate=function(t,r,n){return this._properties[wt.CLEAR_ALL]!==void 0||this._propertySet.has(r)?!1:t===wt.ADD?typeof n=="number":t!==wt.UNSET&&t!==wt.REMOVE?rb(r,n):!0},e}(),PD=function(e,t,r){var n=typeof e=="string"?{event_type:e}:e;return je(je(je({},n),r),t&&{event_properties:t})},nb=function(e,t){var r=je(je({},t),{event_type:Qi.IDENTIFY,user_properties:e.getUserProperties()});return r},AD=function(e,t,r,n){var i,o=je(je({},n),{event_type:Qi.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:(i={},i[e]=t,i)});return o},CD=function(e,t,r){var n,i=new Ll;i.set(e,t);var o=je(je({},r),{event_type:Qi.IDENTIFY,user_properties:i.getUserProperties(),groups:(n={},n[e]=t,n)});return o},MD=function(e,t){return je(je({},t),{event_type:Qi.REVENUE,event_properties:e.getEventProperties()})},Ro=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=yt.Unknown),{event:e,code:t,message:r}},ua=function(e){return e?(e^Math.random()*16>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,ua)},LD=function(){function e(t){this.client=t,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(t,r){var n,i,o;return we(this,void 0,void 0,function(){return xe(this,function(a){switch(a.label){case 0:return t.name=(n=t.name)!==null&&n!==void 0?n:ua(),t.type=(i=t.type)!==null&&i!==void 0?i:"enrichment",[4,(o=t.setup)===null||o===void 0?void 0:o.call(t,r,this.client)];case 1:return a.sent(),this.plugins.push(t),[2]}})})},e.prototype.deregister=function(t){return this.plugins.splice(this.plugins.findIndex(function(r){return r.name===t}),1),Promise.resolve()},e.prototype.reset=function(t){this.applying=!1,this.plugins=[],this.client=t},e.prototype.push=function(t){var r=this;return new Promise(function(n){r.queue.push([t,n]),r.scheduleApply(0)})},e.prototype.scheduleApply=function(t){var r=this;this.applying||(this.applying=!0,setTimeout(function(){r.apply(r.queue.shift()).then(function(){r.applying=!1,r.queue.length>0&&r.scheduleApply(0)})},t))},e.prototype.apply=function(t){return we(this,void 0,void 0,function(){var r,n,i,o,a,s,u,m,g,c,d,f,p,m,g,h,b,_,y,S,O,I;return xe(this,function(T){switch(T.label){case 0:if(!t)return[2];r=Rt(t,1),n=r[0],i=Rt(t,2),o=i[1],a=this.plugins.filter(function(V){return V.type==="before"}),T.label=1;case 1:T.trys.push([1,6,7,8]),s=Ji(a),u=s.next(),T.label=2;case 2:return u.done?[3,5]:(m=u.value,m.execute?[4,m.execute(je({},n))]:[3,4]);case 3:if(g=T.sent(),g===null)return o({event:n,code:0,message:""}),[2];n=g,T.label=4;case 4:return u=s.next(),[3,2];case 5:return[3,8];case 6:return c=T.sent(),y={error:c},[3,8];case 7:try{u&&!u.done&&(S=s.return)&&S.call(s)}finally{if(y)throw y.error}return[7];case 8:d=this.plugins.filter(function(V){return V.type==="enrichment"||V.type===void 0}),T.label=9;case 9:T.trys.push([9,14,15,16]),f=Ji(d),p=f.next(),T.label=10;case 10:return p.done?[3,13]:(m=p.value,m.execute?[4,m.execute(je({},n))]:[3,12]);case 11:if(g=T.sent(),g===null)return o({event:n,code:0,message:""}),[2];n=g,T.label=12;case 12:return p=f.next(),[3,10];case 13:return[3,16];case 14:return h=T.sent(),O={error:h},[3,16];case 15:try{p&&!p.done&&(I=f.return)&&I.call(f)}finally{if(O)throw O.error}return[7];case 16:return b=this.plugins.filter(function(V){return V.type==="destination"}),_=b.map(function(V){var K=je({},n);return V.execute(K).catch(function(Y){return Ro(K,0,String(Y))})}),Promise.all(_).then(function(V){var K=Rt(V,1),Y=K[0];o(Y)}),[2]}})})},e.prototype.flush=function(){return we(this,void 0,void 0,function(){var t,r,n,i=this;return xe(this,function(o){switch(o.label){case 0:return t=this.queue,this.queue=[],[4,Promise.all(t.map(function(a){return i.apply(a)}))];case 1:return o.sent(),r=this.plugins.filter(function(a){return a.type==="destination"}),n=r.map(function(a){return a.flush&&a.flush()}),[4,Promise.all(n)];case 2:return o.sent(),[2]}})})},e}(),$D="Event tracked successfully",VD="Unexpected error occurred",FD="Event rejected due to exceeded retry count",HD="Event skipped due to optOut config",UD="Event rejected due to missing API key",BD="Invalid API key",KD="Client not initialized",dr=function(e){return{promise:e||Promise.resolve()}},WD=function(){function e(t){t===void 0&&(t="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new LD(this),this.name=t}return e.prototype._init=function(t){return we(this,void 0,void 0,function(){return xe(this,function(r){switch(r.label){case 0:return this.config=t,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return r.sent(),[2]}})})},e.prototype.runQueuedFunctions=function(t){return we(this,void 0,void 0,function(){var r,n,i,o,a,s,u;return xe(this,function(c){switch(c.label){case 0:r=this[t],this[t]=[],c.label=1;case 1:c.trys.push([1,6,7,8]),n=Ji(r),i=n.next(),c.label=2;case 2:return i.done?[3,5]:(o=i.value,[4,o()]);case 3:c.sent(),c.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return a=c.sent(),s={error:a},[3,8];case 7:try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(s)throw s.error}return[7];case 8:return[2]}})})},e.prototype.track=function(t,r,n){var i=PD(t,r,n);return dr(this.dispatch(i))},e.prototype.identify=function(t,r){var n=nb(t,r);return dr(this.dispatch(n))},e.prototype.groupIdentify=function(t,r,n,i){var o=AD(t,r,n,i);return dr(this.dispatch(o))},e.prototype.setGroup=function(t,r,n){var i=CD(t,r,n);return dr(this.dispatch(i))},e.prototype.revenue=function(t,r){var n=MD(t,r);return dr(this.dispatch(n))},e.prototype.add=function(t){return this.config?dr(this.timeline.register(t,this.config)):(this.q.push(this.add.bind(this,t)),dr())},e.prototype.remove=function(t){return this.config?dr(this.timeline.deregister(t)):(this.q.push(this.remove.bind(this,t)),dr())},e.prototype.dispatchWithCallback=function(t,r){if(!this.config)return r(Ro(t,0,KD));this.process(t).then(r)},e.prototype.dispatch=function(t){return we(this,void 0,void 0,function(){var r=this;return xe(this,function(n){return this.config?[2,this.process(t)]:[2,new Promise(function(i){r.dispatchQ.push(r.dispatchWithCallback.bind(r,t,i))})]})})},e.prototype.process=function(t){return we(this,void 0,void 0,function(){var i,r,n,i;return xe(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,Ro(t,0,HD)]:[4,this.timeline.push(t)];case 1:return i=o.sent(),i.code===200?this.config.loggerProvider.log(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return r=o.sent(),n=String(r),this.config.loggerProvider.error(n),i=Ro(t,0,n),[2,i];case 3:return[2]}})})},e.prototype.setOptOut=function(t){if(!this.config){this.q.push(this.setOptOut.bind(this,!!t));return}this.config.optOut=!!t},e.prototype.flush=function(){return dr(this.timeline.flush())},e}(),zD=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(t){return this.productId=t,this},e.prototype.setQuantity=function(t){return t>0&&(this.quantity=t),this},e.prototype.setPrice=function(t){return this.price=t,this},e.prototype.setRevenueType=function(t){return this.revenueType=t,this},e.prototype.setRevenue=function(t){return this.revenue=t,this},e.prototype.setEventProperties=function(t){return cp(t)&&(this.properties=t),this},e.prototype.getEventProperties=function(){var t=this.properties?je({},this.properties):{};return t[ii.REVENUE_PRODUCT_ID]=this.productId,t[ii.REVENUE_QUANTITY]=this.quantity,t[ii.REVENUE_PRICE]=this.price,t[ii.REVENUE_TYPE]=this.revenueType,t[ii.REVENUE]=this.revenue,t},e}(),qD=function(e,t){var r=Math.max(t,1);return e.reduce(function(n,i,o){var a=Math.floor(o/r);return n[a]||(n[a]=[]),n[a].push(i),n},[])},Ua="Amplitude Logger ",ib=function(){function e(){this.logLevel=nr.None}return e.prototype.disable=function(){this.logLevel=nr.None},e.prototype.enable=function(t){t===void 0&&(t=nr.Warn),this.logLevel=t},e.prototype.log=function(){for(var t=[],r=0;r0&&Promise.all(n.map(function(a){return i.execute(a)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(t){var r=this;return new Promise(function(n){var i={event:t,attempts:0,callback:function(o){return n(o)},timeout:0};r.addToQueue(i)})},e.prototype.addToQueue=function(){for(var t=this,r=[],n=0;n0&&r.schedule(t)})},t))},e.prototype.flush=function(t){return t===void 0&&(t=!1),we(this,void 0,void 0,function(){var r,n,i,o=this;return xe(this,function(a){switch(a.label){case 0:return r=[],n=[],this.queue.forEach(function(s){return s.timeout===0?r.push(s):n.push(s)}),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=qD(r,this.config.flushQueueSize),[4,Promise.all(i.map(function(s){return o.send(s,t)}))];case 1:return a.sent(),[2]}})})},e.prototype.send=function(t,r){return r===void 0&&(r=!0),we(this,void 0,void 0,function(){var n,i,o,a,s;return xe(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(t,400,UD)];n={api_key:this.config.apiKey,events:t.map(function(c){var d=c.event;d.extra;var f=up(d,["extra"]);return f}),options:{min_id_length:this.config.minIdLength}},u.label=1;case 1:return u.trys.push([1,3,,4]),i=ob(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,n)];case 2:return o=u.sent(),o===null?(this.fulfillRequest(t,0,VD),[2]):r?(this.handleResponse(o,t),[3,4]):("body"in o?this.fulfillRequest(t,o.statusCode,"".concat(o.status,": ").concat(Ba(o))):this.fulfillRequest(t,o.statusCode,o.status),[2]);case 3:return a=u.sent(),s=ZD(a),this.config.loggerProvider.error(s),this.fulfillRequest(t,0,s),[3,4];case 4:return[2]}})})},e.prototype.handleResponse=function(t,r){var n=t.status;switch(n){case yt.Success:{this.handleSuccessResponse(t,r);break}case yt.Invalid:{this.handleInvalidResponse(t,r);break}case yt.PayloadTooLarge:{this.handlePayloadTooLargeResponse(t,r);break}case yt.RateLimit:{this.handleRateLimitResponse(t,r);break}default:{this.config.loggerProvider.warn(`{code: 0, error: "Status '`.concat(n,"' provided for ").concat(r.length,' events"}')),this.handleOtherResponse(r);break}}},e.prototype.handleSuccessResponse=function(t,r){this.fulfillRequest(r,t.statusCode,$D)},e.prototype.handleInvalidResponse=function(t,r){var n=this;if(t.body.missingField||t.body.error.startsWith(BD)){this.fulfillRequest(r,t.statusCode,t.body.error);return}var i=Pr(Pr(Pr(Pr([],Rt(Object.values(t.body.eventsWithInvalidFields)),!1),Rt(Object.values(t.body.eventsWithMissingFields)),!1),Rt(Object.values(t.body.eventsWithInvalidIdLengths)),!1),Rt(t.body.silencedEvents),!1).flat(),o=new Set(i),a=r.filter(function(s,u){if(o.has(u)){n.fulfillRequest([s],t.statusCode,t.body.error);return}return!0});a.length>0&&this.config.loggerProvider.warn(Ba(t)),this.addToQueue.apply(this,Pr([],Rt(a),!1))},e.prototype.handlePayloadTooLargeResponse=function(t,r){if(r.length===1){this.fulfillRequest(r,t.statusCode,t.body.error);return}this.config.loggerProvider.warn(Ba(t)),this.config.flushQueueSize/=2,this.addToQueue.apply(this,Pr([],Rt(r),!1))},e.prototype.handleRateLimitResponse=function(t,r){var n=this,i=Object.keys(t.body.exceededDailyQuotaUsers),o=Object.keys(t.body.exceededDailyQuotaDevices),a=t.body.throttledEvents,s=new Set(i),u=new Set(o),c=new Set(a),d=r.filter(function(f,p){if(f.event.user_id&&s.has(f.event.user_id)||f.event.device_id&&u.has(f.event.device_id)){n.fulfillRequest([f],t.statusCode,t.body.error);return}return c.has(p)&&(f.timeout=n.throttleTimeout),!0});d.length>0&&this.config.loggerProvider.warn(Ba(t)),this.addToQueue.apply(this,Pr([],Rt(d),!1))},e.prototype.handleOtherResponse=function(t){var r=this;this.addToQueue.apply(this,Pr([],Rt(t.map(function(n){return n.timeout=n.attempts*r.retryTimeout,n})),!1))},e.prototype.fulfillRequest=function(t,r,n){this.saveEvents(),t.forEach(function(i){return i.callback(Ro(i.event,r,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var t=Array.from(this.queue.map(function(r){return r.event}));this.config.storageProvider.set(this.storageKey,t)}},e}(),JD=function(e){e===void 0&&(e=0);var t=new Error().stack||"";return t.split(`
+`).slice(2+e).map(function(r){return r.trim()})},dt=function(e){return function(){var t=je({},e.config),r=t.loggerProvider,n=t.logLevel;return{logger:r,logLevel:n}}},QD=function(e,t){var r,n;t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,"");try{for(var i=Ji(t.split(".")),o=i.next();!o.done;o=i.next()){var a=o.value;if(a in e)e=e[a];else return}}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return e},ft=function(e,t){return function(){var r,n,i={};try{for(var o=Ji(t),a=o.next();!a.done;a=o.next()){var s=a.value;i[s]=QD(e,s)}}catch(u){r={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},pt=function(e,t,r,n,i){return i===void 0&&(i=null),function(){for(var o=[],a=0;a=200&&t<300?yt.Success:t===429?yt.RateLimit:t===413?yt.PayloadTooLarge:t===408?yt.Timeout:t>=400&&t<500?yt.Invalid:t>=500?yt.Failed:yt.Unknown},e}(),fr=function(){if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global},dp=function(){var e,t=fr();if(!(!((e=t==null?void 0:t.location)===null||e===void 0)&&e.search))return{};var r=t.location.search.substring(1).split("&").filter(Boolean),n=r.reduce(function(i,o){var a=o.split("=",2),s=ph(a[0]),u=ph(a[1]);return u&&(i[s]=u),i},{});return n},ph=function(e){e===void 0&&(e="");try{return decodeURIComponent(e)}catch{return""}},eI="utm_campaign",tI="utm_content",rI="utm_id",nI="utm_medium",iI="utm_source",oI="utm_term",vh="dclid",mh="fbclid",gh="gbraid",hh="gclid",yh="ko_click_id",kh="li_fat_id",bh="msclkid",_h="rtd_cid",wh="ttclid",xh="twclid",Sh="wbraid",bv={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},sb=function(){function e(){}return e.prototype.parse=function(){return we(this,void 0,void 0,function(){return xe(this,function(t){return[2,je(je(je(je({},bv),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var t=dp(),r=t[eI],n=t[tI],i=t[rI],o=t[nI],a=t[iI],s=t[oI];return{utm_campaign:r,utm_content:n,utm_id:i,utm_medium:o,utm_source:a,utm_term:s}},e.prototype.getReferrer=function(){var t,r,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=(r=(t=n.referrer)===null||t===void 0?void 0:t.split("/")[2])!==null&&r!==void 0?r:void 0}catch{}return n},e.prototype.getClickIds=function(){var t,r=dp();return t={},t[vh]=r[vh],t[mh]=r[mh],t[gh]=r[gh],t[hh]=r[hh],t[yh]=r[yh],t[kh]=r[kh],t[bh]=r[bh],t[_h]=r[_h],t[wh]=r[wh],t[xh]=r[xh],t[Sh]=r[Sh],t},e}(),lb=function(e,t,r){return t===void 0&&(t=""),r===void 0&&(r=10),[Nu,t,e.substring(0,r)].filter(Boolean).join("_")},aI=function(e){return"".concat(Nu.toLowerCase(),"_").concat(e.substring(0,6))},fp=function(){function e(t){this.options=je({},t)}return e.prototype.isEnabled=function(){return we(this,void 0,void 0,function(){var t,r,n,i;return xe(this,function(o){switch(o.label){case 0:if(!fr())return[2,!1];t=String(Date.now()),r=new e(this.options),n="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,r.set(n,t)];case 2:return o.sent(),[4,r.get(n)];case 3:return i=o.sent(),[2,i===t];case 4:return o.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return o.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(t){return we(this,void 0,void 0,function(){var r;return xe(this,function(n){switch(n.label){case 0:return[4,this.getRaw(t)];case 1:if(r=n.sent(),!r)return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch{}return[2,JSON.parse(r)]}catch{return[2,void 0]}return[2]}})})},e.prototype.getRaw=function(t){var r;return we(this,void 0,void 0,function(){var n,i,o;return xe(this,function(a){return n=fr(),i=(r=n==null?void 0:n.document.cookie.split("; "))!==null&&r!==void 0?r:[],o=i.find(function(s){return s.indexOf(t+"=")===0}),o?[2,o.substring(t.length+1)]:[2,void 0]})})},e.prototype.set=function(t,r){var n;return we(this,void 0,void 0,function(){var i,o,a,s,u,c;return xe(this,function(d){try{i=(n=this.options.expirationDays)!==null&&n!==void 0?n:0,o=r!==null?i:-1,a=void 0,o&&(s=new Date,s.setTime(s.getTime()+o*24*60*60*1e3),a=s),u="".concat(t,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),a&&(u+="; expires=".concat(a.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),c=fr(),c&&(c.document.cookie=u)}catch{}return[2]})})},e.prototype.remove=function(t){return we(this,void 0,void 0,function(){return xe(this,function(r){switch(r.label){case 0:return[4,this.set(t,null)];case 1:return r.sent(),[2]}})})},e.prototype.reset=function(){return we(this,void 0,void 0,function(){return xe(this,function(t){return[2]})})},e}(),sI=function(e){la(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(r,n){return we(this,void 0,void 0,function(){var i,o,a;return xe(this,function(s){switch(s.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(n),method:"POST"},[4,fetch(r,i)];case 1:return o=s.sent(),[4,o.json()];case 2:return a=s.sent(),[2,this.buildResponse(a)]}})})},t}(kv),lI=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:uI(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),uI=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},cI=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(t){this.receiver?this.receiver(t):this.queue.length<512&&this.queue.push(t)},e.prototype.setEventReceiver=function(t){this.receiver=t,this.queue.length>0&&(this.queue.forEach(function(r){t(r)}),this.queue=[])},e}(),_n=function(){return _n=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return"";var i=navigator.userLanguage;return(n=(r=(t=(e=navigator.languages)===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:navigator.language)!==null&&r!==void 0?r:i)!==null&&n!==void 0?n:""},ca=function(e,t){return typeof e=="boolean"?e:(e==null?void 0:e[t])!==!1},ub=function(e){return ca(e,"attribution")},bI=function(e){return ca(e,"fileDownloads")},_I=function(e){return ca(e,"formInteractions")},wI=function(e){return ca(e,"pageViews")},xI=function(e){return ca(e,"sessions")},SI=function(e){var t=function(){return!1},r=void 0,n,i=wI(e.defaultTracking);return i&&(t=void 0,n=void 0,e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.pageViews&&typeof e.defaultTracking.pageViews=="object"&&("trackOn"in e.defaultTracking.pageViews&&(t=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(n=e.defaultTracking.pageViews.eventType))),{trackOn:t,trackHistoryChanges:r,eventType:n}},jI=function(e){return ub(e.defaultTracking)&&e.defaultTracking&&typeof e.defaultTracking=="object"&&e.defaultTracking.attribution&&typeof e.defaultTracking.attribution=="object"?je({},e.defaultTracking.attribution):{}},td=function(e,t){for(var r=0;r"u"&&s(new Error("XHRTransport is not supported."));var u=new XMLHttpRequest;u.open("POST",r,!0),u.onreadystatechange=function(){if(u.readyState===i.state.done)try{var c=u.responseText,d=JSON.parse(c),f=i.buildResponse(d);a(f)}catch(p){s(p)}},u.setRequestHeader("Content-Type","application/json"),u.setRequestHeader("Accept","*/*"),u.send(JSON.stringify(n))})]})})},t}(kv),RI=function(e){la(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.send=function(r,n){return we(this,void 0,void 0,function(){var i=this;return xe(this,function(o){return[2,new Promise(function(a,s){var u=fr();if(!(u!=null&&u.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var c=JSON.stringify(n),d=u.navigator.sendBeacon(r,JSON.stringify(n));return a(d?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:c.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(f){s(f)}})]})})},t}(kv),NI=function(e,t,r){return r===void 0&&(r=!0),we(void 0,void 0,void 0,function(){var n,i,o,a,s,u,c,d,f;return xe(this,function(p){switch(p.label){case 0:return n=aI(e),[4,t.getRaw(n)];case 1:return i=p.sent(),i?r?[4,t.remove(n)]:[3,3]:[2,{optOut:!1}];case 2:p.sent(),p.label=3;case 3:return o=Rt(i.split("."),6),a=o[0],s=o[1],u=o[2],c=o[3],d=o[4],f=o[5],[2,{deviceId:a,userId:PI(s),sessionId:nd(c),lastEventId:nd(f),lastEventTime:nd(d),optOut:!!u}]}})})},nd=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},PI=function(e){if(!(!atob||!escape||!e))try{return decodeURIComponent(escape(atob(e)))}catch{return}},Er="[Amplitude]",jh="".concat(Er," Form Started"),AI="".concat(Er," Form Submitted"),CI="".concat(Er," File Downloaded"),Th="session_start",Oh="session_end",MI="".concat(Er," File Extension"),LI="".concat(Er," File Name"),$I="".concat(Er," Link ID"),VI="".concat(Er," Link Text"),FI="".concat(Er," Link URL"),id="".concat(Er," Form ID"),od="".concat(Er," Form Name"),ad="".concat(Er," Form Destination"),$l="cookie",HI="US",UI=function(e){la(t,e);function t(r,n,i,o,a,s,u,c,d,f,p,m,g,h,b,_,y,S,O,I,T,V,K,Y,z,G,M,N,R){i===void 0&&(i=new ab),o===void 0&&(o={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),a===void 0&&(a=!0),u===void 0&&(u=1e3),c===void 0&&(c=5),d===void 0&&(d=30),f===void 0&&(f=$l),b===void 0&&(b=new ib),_===void 0&&(_=nr.Warn),S===void 0&&(S=!1),T===void 0&&(T=""),V===void 0&&(V=HI),Y===void 0&&(Y=30*60*1e3),z===void 0&&(z=new cb),G===void 0&&(G={ipAddress:!0,language:!0,platform:!0}),M===void 0&&(M="fetch"),N===void 0&&(N=!1);var w=e.call(this,{apiKey:r,storageProvider:z,transportProvider:db(M)})||this;return w.apiKey=r,w.appVersion=n,w.cookieOptions=o,w.defaultTracking=a,w.flushIntervalMillis=u,w.flushMaxRetries=c,w.flushQueueSize=d,w.identityStorage=f,w.ingestionMetadata=p,w.instanceName=m,w.loggerProvider=b,w.logLevel=_,w.minIdLength=y,w.partnerId=O,w.plan=I,w.serverUrl=T,w.serverZone=V,w.sessionTimeout=Y,w.storageProvider=z,w.trackingOptions=G,w.transport=M,w.useBatch=N,w._optOut=!1,w._cookieStorage=i,w.deviceId=s,w.lastEventId=g,w.lastEventTime=h,w.optOut=S,w.sessionId=K,w.userId=R,w.loggerProvider.enable(w.logLevel),w}return Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(r){this._cookieStorage!==r&&(this._cookieStorage=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(r){this._deviceId!==r&&(this._deviceId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(r){this._userId!==r&&(this._userId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(r){this._sessionId!==r&&(this._sessionId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(r){this._optOut!==r&&(this._optOut=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(r){this._lastEventTime!==r&&(this._lastEventTime=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(r){this._lastEventId!==r&&(this._lastEventId=r,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var r={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId};this.cookieStorage.set(lb(this.apiKey),r)},t}(YD),BI=function(e,t,r){return t===void 0&&(t={}),we(void 0,void 0,void 0,function(){var n,i,o,a,s,u,c,d,f,p,m,g,h,b,_,y,S,O,I,T,V,K,Y,z,G,M,N,R,w,E,B,Q,A,be;return xe(this,function(D){switch(D.label){case 0:return n=t.identityStorage||$l,o=[je({},t.cookieOptions)],S={},n===$l?[3,1]:(a="",[3,5]);case 1:return(I=(O=t.cookieOptions)===null||O===void 0?void 0:O.domain)!==null&&I!==void 0?(s=I,[3,4]):[3,2];case 2:return[4,WI()];case 3:s=D.sent(),D.label=4;case 4:a=s,D.label=5;case 5:return i=je.apply(void 0,o.concat([(S.domain=a,S.expiration=365,S.sameSite="Lax",S.secure=!1,S.upgrade=!0,S)])),u=KI(t.identityStorage,i),[4,NI(e,u,(V=(T=t.cookieOptions)===null||T===void 0?void 0:T.upgrade)!==null&&V!==void 0?V:!0)];case 6:return c=D.sent(),[4,u.get(lb(e))];case 7:return d=D.sent(),f=dp(),p=(G=(z=(Y=(K=t.deviceId)!==null&&K!==void 0?K:f.deviceId)!==null&&Y!==void 0?Y:d==null?void 0:d.deviceId)!==null&&z!==void 0?z:c.deviceId)!==null&&G!==void 0?G:ua(),m=(M=d==null?void 0:d.lastEventId)!==null&&M!==void 0?M:c.lastEventId,g=(N=d==null?void 0:d.lastEventTime)!==null&&N!==void 0?N:c.lastEventTime,h=(w=(R=t.optOut)!==null&&R!==void 0?R:d==null?void 0:d.optOut)!==null&&w!==void 0?w:c.optOut,b=(E=d==null?void 0:d.sessionId)!==null&&E!==void 0?E:c.sessionId,_=(Q=(B=t.userId)!==null&&B!==void 0?B:d==null?void 0:d.userId)!==null&&Q!==void 0?Q:c.userId,r.previousSessionDeviceId=(A=d==null?void 0:d.deviceId)!==null&&A!==void 0?A:c.deviceId,r.previousSessionUserId=(be=d==null?void 0:d.userId)!==null&&be!==void 0?be:c.userId,y=je(je({},t.trackingOptions),{ipAddress:!0,language:!0,platform:!0}),[2,new UI(e,t.appVersion,u,i,t.defaultTracking,p,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,n,t.ingestionMetadata,t.instanceName,m,g,t.loggerProvider,t.logLevel,t.minIdLength,h,t.partnerId,t.plan,t.serverUrl,t.serverZone,b,t.sessionTimeout,t.storageProvider,y,t.transport,t.useBatch,_)]}})})},KI=function(e,t){switch(e===void 0&&(e=$l),t===void 0&&(t={}),e){case"localStorage":return new cb;case"none":return new ab;case"cookie":default:return new fp(je(je({},t),{expirationDays:t.expiration}))}},db=function(e){return e==="xhr"?new II:e==="beacon"?new RI:new sI},WI=function(e){return we(void 0,void 0,void 0,function(){var t,r,n,i,o,o,a,s,u,c;return xe(this,function(d){switch(d.label){case 0:return[4,new fp().isEnabled()];case 1:if(!d.sent()||!e&&typeof location>"u")return[2,""];for(t=e??location.hostname,r=t.split("."),n=[],i="AMP_TLDTEST",o=r.length-2;o>=0;--o)n.push(r.slice(o).join("."));o=0,d.label=2;case 2:return o"u"||typeof e.trackOn=="function"&&e.trackOn()},a=typeof location<"u"?location.href:null,s=function(){return we(void 0,void 0,void 0,function(){var c,d,f;return xe(this,function(p){switch(p.label){case 0:return c=location.href,r5(e.trackHistoryChanges,c,a||"")&&o()?(n==null||n.log("Tracking page view event"),t!=null?[3,1]:[3,3]):[3,4];case 1:return f=(d=t).track,[4,i()];case 2:f.apply(d,[p.sent()]),p.label=3;case 3:p.label=4;case 4:return a=c,[2]}})})},u={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(c,d){return we(void 0,void 0,void 0,function(){var f,p;return xe(this,function(m){switch(m.label){case 0:return t=d,n=c.loggerProvider,n.log("Installing @amplitude/plugin-page-view-tracking-browser"),r&&(r.addEventListener("popstate",function(){s()}),r.history.pushState=new Proxy(r.history.pushState,{apply:function(g,h,b){var _=Rt(b,3),y=_[0],S=_[1],O=_[2];g.apply(h,[y,S,O]),s()}})),o()?(n.log("Tracking page view event"),p=(f=t).track,[4,i()]):[3,2];case 1:p.apply(f,[m.sent()]),m.label=2;case 2:return[2]}})})},execute:function(c){return we(void 0,void 0,void 0,function(){var d;return xe(this,function(f){switch(f.label){case 0:return e.trackOn==="attribution"&&t5(c)?(n==null||n.log("Enriching campaign event to page view event with campaign parameters"),[4,i()]):[3,2];case 1:d=f.sent(),c.event_type=d.event_type,c.event_properties=je(je({},c.event_properties),d.event_properties),f.label=2;case 2:return[2,c]}})})}};return u},e5=function(){return we(void 0,void 0,void 0,function(){var e;return xe(this,function(t){switch(t.label){case 0:return e=JI,[4,new sb().parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},t5=function(e){if(e.event_type==="$identify"&&e.user_properties){var t=e.user_properties,r=t[wt.SET]||{},n=t[wt.UNSET]||{},i=Pr(Pr([],Rt(Object.keys(r)),!1),Rt(Object.keys(n)),!1);return Object.keys(bv).every(function(o){return i.includes(o)})}return!1},r5=function(e,t,r){switch(e){case"pathOnly":return t.split("?")[0]!==r.split("?")[0];default:return t!==r}},n5=function(){var e="@amplitude/plugin-form-interaction-tracking-browser",t="enrichment",r=function(i,o){return we(void 0,void 0,void 0,function(){var a,s,u;return xe(this,function(c){return o?(a=function(d){var f=!1;d.addEventListener("change",function(){var p;f||o.track(jh,(p={},p[id]=d.id,p[od]=d.name,p[ad]=d.action,p)),f=!0},{}),d.addEventListener("submit",function(){var p,m;f||o.track(jh,(p={},p[id]=d.id,p[od]=d.name,p[ad]=d.action,p)),o.track(AI,(m={},m[id]=d.id,m[od]=d.name,m[ad]=d.action,m)),f=!1})},s=Array.from(document.getElementsByTagName("form")),s.forEach(a),typeof MutationObserver<"u"&&(u=new MutationObserver(function(d){d.forEach(function(f){f.addedNodes.forEach(function(p){p.nodeName==="FORM"&&a(p),"querySelectorAll"in p&&typeof p.querySelectorAll=="function"&&Array.from(p.querySelectorAll("form")).map(a)})})}),u.observe(document.body,{subtree:!0,childList:!0})),[2]):(i.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked."),[2])})})},n=function(i){return we(void 0,void 0,void 0,function(){return xe(this,function(o){return[2,i]})})};return{name:e,type:t,setup:r,execute:n}},i5=function(){var e="@amplitude/plugin-file-download-tracking-browser",t="enrichment",r=function(i,o){return we(void 0,void 0,void 0,function(){var a,s,u,c;return xe(this,function(d){return o?(a=function(f){var p;try{p=new URL(f.href,window.location.href)}catch{return}var m=s.exec(p.href),g=m==null?void 0:m[1];g&&f.addEventListener("click",function(){var h;g&&o.track(CI,(h={},h[MI]=g,h[LI]=p.pathname,h[$I]=f.id,h[VI]=f.text,h[FI]=f.href,h))})},s=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)$/,u=Array.from(document.getElementsByTagName("a")),u.forEach(a),typeof MutationObserver<"u"&&(c=new MutationObserver(function(f){f.forEach(function(p){p.addedNodes.forEach(function(m){m.nodeName==="A"&&a(m),"querySelectorAll"in m&&typeof m.querySelectorAll=="function"&&Array.from(m.querySelectorAll("a")).map(a)})})}),c.observe(document.body,{subtree:!0,childList:!0})),[2]):(i.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked."),[2])})})},n=function(i){return we(void 0,void 0,void 0,function(){return xe(this,function(o){return[2,i]})})};return{name:e,type:t,setup:r,execute:n}},o5=function(e){la(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(r,n,i){r===void 0&&(r="");var o,a;return arguments.length>2?(o=n,a=i):typeof n=="string"?(o=n,a=void 0):(o=n==null?void 0:n.userId,a=n),dr(this._init(je(je({},a),{userId:o,apiKey:r})))},t.prototype._init=function(r){var n,i;return we(this,void 0,void 0,function(){var o,a,s,u,c=this;return xe(this,function(d){switch(d.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,BI(r.apiKey,r,this)]);case 1:return o=d.sent(),[4,e.prototype._init.call(this,o)];case 2:return d.sent(),this.setSessionId((i=(n=r.sessionId)!==null&&n!==void 0?n:this.config.sessionId)!==null&&i!==void 0?i:Date.now()),a=Lo(r.instanceName),a.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new XD).promise];case 3:return d.sent(),[4,this.add(new DI).promise];case 4:return d.sent(),[4,this.add(new yI).promise];case 5:return d.sent(),bI(this.config.defaultTracking)?[4,this.add(i5()).promise]:[3,7];case 6:d.sent(),d.label=7;case 7:return _I(this.config.defaultTracking)?[4,this.add(n5()).promise]:[3,9];case 8:d.sent(),d.label=9;case 9:return ub(this.config.defaultTracking)?(s=jI(this.config),u=XI(s),[4,this.add(u).promise]):[3,11];case 10:d.sent(),d.label=11;case 11:return[4,this.add(QI(SI(this.config))).promise];case 12:return d.sent(),this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 13:return d.sent(),a.eventBridge.setEventReceiver(function(f){c.track(f.eventType,f.eventProperties)}),[2]}})})},t.prototype.getUserId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.userId},t.prototype.setUserId=function(r){if(!this.config){this.q.push(this.setUserId.bind(this,r));return}(r!==this.config.userId||r===void 0)&&(this.config.userId=r,gI(r,this.config.instanceName))},t.prototype.getDeviceId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.deviceId},t.prototype.setDeviceId=function(r){if(!this.config){this.q.push(this.setDeviceId.bind(this,r));return}this.config.deviceId=r,hI(r,this.config.instanceName)},t.prototype.reset=function(){this.setDeviceId(ua()),this.setUserId(void 0)},t.prototype.getSessionId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.sessionId},t.prototype.setSessionId=function(r){var n;if(!this.config){this.q.push(this.setSessionId.bind(this,r));return}if(r!==this.config.sessionId){var i=this.getSessionId(),o=this.config.lastEventTime,a=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1;this.config.sessionId=r,this.config.lastEventTime=void 0,xI(this.config.defaultTracking)&&(i&&o&&this.track(Oh,void 0,{device_id:this.previousSessionDeviceId,event_id:++a,session_id:i,time:o+1,user_id:this.previousSessionUserId}),this.config.lastEventTime=this.config.sessionId,this.track(Th,void 0,{event_id:++a,session_id:this.config.sessionId,time:this.config.lastEventTime})),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId}},t.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},t.prototype.setTransport=function(r){if(!this.config){this.q.push(this.setTransport.bind(this,r));return}this.config.transportProvider=db(r)},t.prototype.identify=function(r,n){if(rd(r)){var i=r._q;r._q=[],r=td(new Ll,i)}return n!=null&&n.user_id&&this.setUserId(n.user_id),n!=null&&n.device_id&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,r,n)},t.prototype.groupIdentify=function(r,n,i,o){if(rd(i)){var a=i._q;i._q=[],i=td(new Ll,a)}return e.prototype.groupIdentify.call(this,r,n,i,o)},t.prototype.revenue=function(r,n){if(rd(r)){var i=r._q;r._q=[],r=td(new zD,i)}return e.prototype.revenue.call(this,r,n)},t.prototype.process=function(r){return we(this,void 0,void 0,function(){var n,i,o;return xe(this,function(a){return n=Date.now(),i=this.config.lastEventTime||Date.now(),o=n-i,r.event_type!==Th&&r.event_type!==Oh&&(!r.session_id||r.session_id===this.getSessionId())&&o>this.config.sessionTimeout&&this.setSessionId(n),[2,e.prototype.process.call(this,r)]})})},t}(WD),a5=function(){var e=new o5;return{init:pt(e.init.bind(e),"init",dt(e),ft(e,["config"])),add:pt(e.add.bind(e),"add",dt(e),ft(e,["config.apiKey","timeline.plugins"])),remove:pt(e.remove.bind(e),"remove",dt(e),ft(e,["config.apiKey","timeline.plugins"])),track:pt(e.track.bind(e),"track",dt(e),ft(e,["config.apiKey","timeline.queue.length"])),logEvent:pt(e.logEvent.bind(e),"logEvent",dt(e),ft(e,["config.apiKey","timeline.queue.length"])),identify:pt(e.identify.bind(e),"identify",dt(e),ft(e,["config.apiKey","timeline.queue.length"])),groupIdentify:pt(e.groupIdentify.bind(e),"groupIdentify",dt(e),ft(e,["config.apiKey","timeline.queue.length"])),setGroup:pt(e.setGroup.bind(e),"setGroup",dt(e),ft(e,["config.apiKey","timeline.queue.length"])),revenue:pt(e.revenue.bind(e),"revenue",dt(e),ft(e,["config.apiKey","timeline.queue.length"])),flush:pt(e.flush.bind(e),"flush",dt(e),ft(e,["config.apiKey","timeline.queue.length"])),getUserId:pt(e.getUserId.bind(e),"getUserId",dt(e),ft(e,["config","config.userId"])),setUserId:pt(e.setUserId.bind(e),"setUserId",dt(e),ft(e,["config","config.userId"])),getDeviceId:pt(e.getDeviceId.bind(e),"getDeviceId",dt(e),ft(e,["config","config.deviceId"])),setDeviceId:pt(e.setDeviceId.bind(e),"setDeviceId",dt(e),ft(e,["config","config.deviceId"])),reset:pt(e.reset.bind(e),"reset",dt(e),ft(e,["config","config.userId","config.deviceId"])),getSessionId:pt(e.getSessionId.bind(e),"getSessionId",dt(e),ft(e,["config"])),setSessionId:pt(e.setSessionId.bind(e),"setSessionId",dt(e),ft(e,["config"])),extendSession:pt(e.extendSession.bind(e),"extendSession",dt(e),ft(e,["config"])),setOptOut:pt(e.setOptOut.bind(e),"setOptOut",dt(e),ft(e,["config"])),setTransport:pt(e.setTransport.bind(e),"setTransport",dt(e),ft(e,["config"]))}};const ht=a5();ht.add;ht.extendSession;ht.flush;ht.getDeviceId;ht.getSessionId;ht.getUserId;ht.groupIdentify;ht.identify;ht.init;ht.logEvent;ht.remove;ht.reset;ht.revenue;ht.setDeviceId;ht.setGroup;ht.setOptOut;ht.setSessionId;ht.setTransport;ht.setUserId;var s5=ht.track;async function fb(e,t){try{s5(e.name,{..."data"in e?e.data:{},...t})}catch(r){console.error(r)}}function pb(e){return fb({name:"toggle",data:{text:"Slå på klarspråkhjelp",enabled:e}})}function pp(e,t,r,n){const i=l5(e);return fb({name:"referat lagret",data:{analysis:i,referatPublisert:t,spraksjekkEnabled:r}},{variant:n})}function l5(e){return{longParagraphs:e.longParagraphs.length,longSentences:e.longSentences.length,longWords:e.longWords.length,duplicateWords:e.duplicateWords.length,kansellisten:e.kansellisten.length,nrkOrd:e.nrkOrd.length,avloeserord:e.avloeserord.avloeserordMatches.length+e.avloeserord.datatermerMatches.length,comma:e.comma,personalData:{emails:e.personalData.emails.length,names:e.personalData.names.length,phonenumbers:e.personalData.phonenumbers.length},tools:{lix:e.tools.lix,wordCount:e.tools.wordCount}}}var u5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,className:n,open:i,defaultOpen:o=!1,onClick:a,id:s}=e,u=u5(e,["children","className","open","defaultOpen","onClick","id"]);const[c,d]=v.useState(o);return k.createElement("div",Object.assign({className:ve("navds-accordion__item",n,{"navds-accordion__item--open":i??c}),ref:t},u),k.createElement(_v.Provider,{value:{open:i??c,toggleOpen:()=>{i===void 0&&d(f=>!f)}}},r))}),d5=c5;var f5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:t,className:r,innerClassName:n,duration:i=250,easing:o="ease",height:a}=e,s=f5(e,["children","className","innerClassName","duration","easing","height"]);const u=v.useRef(a),c=v.useRef(null),d=v.useRef(),f=v.useRef(),p=typeof window<"u",g=v.useRef(p&&window.matchMedia?window.matchMedia("(prefers-reduced-motion)").matches:!1).current?0:i;let h=a,b="visible";typeof h=="number"?(h=a<0?0:a,b="hidden"):Dh(h)&&(h=a==="0%"?0:a,b="hidden");const[_,y]=v.useState(h),[S,O]=v.useState(b),[I,T]=v.useState(!1);v.useEffect(()=>{sd(c.current,_)},[]),v.useEffect(()=>{if(a!==u.current&&c.current){v5(c.current,u.current),c.current.style.overflow="hidden";const z=c.current.offsetHeight;c.current.style.overflow="";const G=g;let M,N,R="hidden",w;const E=u.current==="auto";typeof a=="number"?(M=a<0?0:a,N=M):Dh(a)?(M=a==="0%"?0:a,N=M):(M=z,N="auto",R=void 0),E&&(N=M,M=z),y(M),O("hidden"),T(!E),clearTimeout(f.current),clearTimeout(d.current),E?(w=!0,f.current=setTimeout(()=>{y(N),O(R),T(w)},50),d.current=setTimeout(()=>{T(!1),sd(c.current,N)},G)):f.current=setTimeout(()=>{y(N),O(R),T(!1),a!=="auto"&&sd(c.current,M)},G)}return u.current=a,()=>{clearTimeout(f.current),clearTimeout(d.current)}},[a]);const V={height:_,overflow:S};I&&(V.transition=`height ${g}ms ${o} 0ms`,V.WebkitTransition=V.transition);const Y=typeof s["aria-hidden"]<"u"?s["aria-hidden"]:a===0;return k.createElement("div",Object.assign({},s,{className:r,style:V}),k.createElement("div",{"aria-hidden":Y,className:n,ref:c},t))},wv=m5;var g5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,className:n}=e,i=g5(e,["children","className"]);const o=v.useContext(_v);return o===null?(console.error(" has to be used within an "),null):k.createElement(wv,{height:o.open?"auto":0,duration:250},k.createElement(Sk,Object.assign({},i,{as:"div",ref:t,className:ve("navds-accordion__content",n)}),r))}),y5=h5;var k5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=k5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m6.586 12 7.707-7.707 1.414 1.414L9.414 12l6.293 6.293-1.414 1.414L6.586 12Z",fill:"currentColor"}))}),_5=b5;var w5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=w5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7V5H2v5h20V5h-4v2a1 1 0 1 1-2 0V5H8v2a1 1 0 1 1-2 0Zm10-4H8V1a1 1 0 1 0-2 0v2H2a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-4V1a1 1 0 1 0-2 0v2ZM2 12v10h20V12H2Zm6 3a1 1 0 0 0-1-1H5a1 1 0 1 0 0 2h2a1 1 0 0 0 1-1Zm-1 3a1 1 0 1 1 0 2H5a1 1 0 1 1 0-2h2Zm6-4h-2a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2Zm-2 4h2a1 1 0 1 1 0 2h-2a1 1 0 1 1 0-2Zm9-3a1 1 0 0 0-1-1h-2a1 1 0 1 0 0 2h2a1 1 0 0 0 1-1Zm-4 4a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2h-2a1 1 0 0 1-1-1Z",fill:"currentColor"}))}),S5=x5;var j5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=j5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12 22-7.707-7.707 1.414-1.414L11 18.172V1.586h2v16.586l5.293-5.293 1.414 1.414L12 22Z",fill:"currentColor"}))}),O5=T5;var E5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=E5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 11.976C.013 5.372 5.395 0 11.999 0 18.639.013 24.012 5.406 24 12.022 23.986 18.627 18.603 24 12 24h-.023a11.924 11.924 0 0 1-8.48-3.531A11.923 11.923 0 0 1 0 11.976Zm17-3.547L15.571 7 12 10.572 8.429 7 7 8.429 10.572 12 7 15.571 8.429 17 12 13.428 15.571 17 17 15.571 13.428 12 17 8.429Z",fill:"#C30000"}))}),I5=D5;var R5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=R5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12 18.121-8.06-8.06 2.12-2.122L12 13.88l5.94-5.94 2.12 2.122L12 18.12Z",fill:"currentColor"}))}),xv=N5;var P5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=P5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0Zm0 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 14a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0-11c2.205 0 4 1.657 4 3.693 0 .986-.416 1.914-1.172 2.612l-.593.54-.294.28c-.477.466-.869.94-.936 1.417l-.01.144v.814h-1.991v-.814c0-1.254.84-2.214 1.675-3.002l.74-.68c.38-.35.59-.816.59-1.31 0-1.024-.901-1.856-2.01-1.856-1.054 0-1.922.755-2.002 1.71l-.006.145H8C8 6.657 9.794 5 12 5Z",fill:"currentColor"}))}),C5=A5;var M5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=M5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0Zm0 16a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0-11c2.205 0 4 1.657 4 3.693 0 .986-.416 1.914-1.172 2.612l-.593.54-.294.28c-.477.466-.869.94-.936 1.417l-.01.144v.814h-1.991v-.814c0-1.254.84-2.214 1.675-3.002l.74-.68c.38-.35.59-.816.59-1.31 0-1.024-.901-1.856-2.01-1.856-1.054 0-1.922.755-2.002 1.71l-.006.145H8C8 6.657 9.794 5 12 5Z",fill:"currentColor"}))}),$5=L5;var V5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=V5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 12C0 5.382 5.382 0 12 0c6.617 0 12 5.382 12 12s-5.383 12-12 12C5.382 24 0 18.618 0 12Zm12-7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM9 19v-2h2v-5H9v-2h4v7h2v2H9Z",fill:"#368DA8"}))}),H5=F5;var U5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=U5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.793 11.793 9.5 4.086 10.914 5.5l-5.293 5.293h16.586v2H5.621l5.293 5.293L9.5 19.5l-7.707-7.707Z",fill:"currentColor"}))}),vb=B5;var K5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=K5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m17.414 12-7.707 7.707-1.414-1.414L14.586 12 8.293 5.707l1.414-1.414L17.414 12Z",fill:"currentColor"}))}),mb=W5;var z5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=z5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.207 11.793 14.5 19.5l-1.414-1.414 5.293-5.293H1.793v-2h16.586L13.086 5.5 14.5 4.086l7.707 7.707Z",fill:"currentColor"}))}),gb=q5;var Y5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=Y5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24 12c0-6.627-5.373-12-12-12S0 5.373 0 12s5.373 12 12 12 12-5.373 12-12Zm-5.554-2.9-1.4-1.429-7.332 7.032-2.319-2.118L6 14.018 9.718 17.5 18.446 9.1Z",fill:"#007C2E"}))}),Z5=G5;var X5=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=X5(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.201 6 20 7.89 8.78 19 4 14.396 5.794 12.5l2.98 2.802L18.201 6Z",fill:"currentColor"}))}),Q5=J5;var eR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=eR(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12 1.586 7.707 7.707-1.414 1.414L13 5.414V22h-2V5.414l-5.293 5.293-1.414-1.414L12 1.586Z",fill:"currentColor"}))}),rR=tR;var nR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=nR(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.999 5.957 5.997 0 0 5.953l1.409 1.42L4.997 3.81v11.192h2V3.81l3.593 3.566 1.409-1.42ZM12 18.043 18.003 24 24 18.047l-1.409-1.42-3.588 3.562V8.997h-2V20.19l-3.593-3.566-1.409 1.42Z",fill:"currentColor"}))}),oR=iR;var aR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=aR(e,["title","titleId"]);let o=Ht();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.126.564a.962.962 0 0 1 1.741-.021l11.011 21.912c.358.695-.117 1.54-.865 1.54H.987c-.738 0-1.215-.826-.876-1.519L11.126.564ZM11 7.996h2v7h-2v-7Zm1 12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",fill:"#D47B00"}))}),lR=sR;var uR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,className:n,onClick:i}=e,o=uR(e,["children","className","onClick"]);const a=v.useContext(_v);if(a===null)return console.error(" has to be used within an "),null;const s=u=>{a.toggleOpen(),i&&i(u)};return k.createElement("button",Object.assign({},o,{ref:t,className:ve("navds-accordion__header",n),type:"button",onClick:s,"aria-expanded":a.open}),k.createElement(Gx,{size:"small",as:"span",className:"navds-accordion__header-content"},r),k.createElement(Xp,{"aria-hidden":!0,className:"navds-accordion__expand-icon"}),k.createElement(xv,{"aria-hidden":!0,className:"navds-accordion__expand-icon navds-accordion__expand-icon--filled"}))}),dR=cR;var fR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r}=e,n=fR(e,["className"]);return k.createElement("div",Object.assign({},n,{className:ve("navds-accordion",r),ref:t}))});Pu.Header=dR;Pu.Content=y5;Pu.Item=d5;const ee=Pu;var hb=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{variant:t}=e,r=hb(e,["variant"]);switch(t){case"error":return k.createElement(I5,Object.assign({title:"Feil"},r));case"warning":return k.createElement(lR,Object.assign({title:"Advarsel"},r));case"info":return k.createElement(H5,Object.assign({title:"Informasjon"},r));case"success":return k.createElement(Z5,Object.assign({title:"Suksess"},r));default:return null}},vR=v.forwardRef((e,t)=>{var{children:r,className:n,variant:i,size:o="medium",fullWidth:a=!1,inline:s=!1}=e,u=hb(e,["children","className","variant","size","fullWidth","inline"]);return k.createElement("div",Object.assign({},u,{ref:t,className:ve(n,"navds-alert",`navds-alert--${i}`,`navds-alert--${o}`,{"navds-alert--full-width":a,"navds-alert--inline":s})}),k.createElement(pR,{variant:i,className:"navds-alert__icon"}),k.createElement(Sk,{as:"div",size:o,className:"navds-alert__wrapper"},r))}),Ge=vR;function mR(e,t=166){let r;function n(...i){const o=()=>{e.apply(this,i)};clearTimeout(r),r=setTimeout(o,t)}return n.clear=()=>{clearTimeout(r)},n}var gR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,children:n,selected:i,as:o="button"}=e,a=gR(e,["className","children","selected","as"]);return k.createElement(o,Object.assign({},a,{ref:t,className:ve("navds-chips__chip navds-chips__toggle",r,{"navds-chips--icon-left":i}),"aria-pressed":i}),i&&k.createElement(Q5,{"aria-hidden":!0,className:"navds-chips__toggle-icon"}),k.createElement("span",{className:"navds-chips__chip-text"},n))}),yR=hR;var kR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,children:n,variant:i="action",as:o="button",removeLabel:a="slett",onDelete:s}=e,u=kR(e,["className","children","variant","as","removeLabel","onDelete"]);return k.createElement(o,Object.assign({},u,{ref:t,className:ve("navds-chips__chip navds-chips__removable navds-chips--icon-right",r,`navds-chips__removable--${i}`),"aria-label":`${n} ${a}`,onClick:c=>{var d;s==null||s(),(d=u==null?void 0:u.onClick)===null||d===void 0||d.call(u,c)}}),k.createElement("span",{className:"navds-chips__chip-text"},n),k.createElement("span",{className:"navds-chips__removable-icon"},k.createElement(Zx,{"aria-hidden":!0})))}),_R=bR;var wR=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,size:n="medium",children:i}=e,o=wR(e,["className","size","children"]);return k.createElement("ul",Object.assign({},o,{ref:t,className:ve("navds-chips",r,`navds-chips--${n}`,{"navds-body-short navds-body-short--small":n==="medium","navds-detail navds-detail--small":n==="small"})}),k.Children.map(i,(a,s)=>{var u;return k.createElement("li",{key:s+((u=a==null?void 0:a.toString())!==null&&u!==void 0?u:"")},a)}))});Sv.Toggle=yR;Sv.Removable=_R;const yb=Sv;var Oe=function(){return Oe=Object.assign||function(t){for(var r,n=1,i=arguments.length;n1&&(m||!g),b=i>1&&(g||!m),_=function(){u&&d(u)},y=function(){c&&d(c)},S=(r=a==null?void 0:a.CaptionLabel)!==null&&r!==void 0?r:jv,O=k.createElement(S,{id:e.id,displayMonth:e.displayMonth});return k.createElement(k.Fragment,null,O,k.createElement(nN,{displayMonth:e.displayMonth,hideNext:h,hidePrevious:b,nextMonth:c,previousMonth:u,onPreviousClick:_,onNextClick:y}))}function oN(e){var t,r=ze(),n=r.classNames,i=r.disableNavigation,o=r.styles,a=r.captionLayout,s=r.components,u=(t=s==null?void 0:s.CaptionLabel)!==null&&t!==void 0?t:jv,c;return i?c=k.createElement(u,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?c=k.createElement(eN,{displayMonth:e.displayMonth,id:e.id}):c=k.createElement(iN,{displayMonth:e.displayMonth,id:e.id}),k.createElement("div",{className:n.caption,style:o.caption},c)}function aN(){var e=ze(),t=e.footer,r=e.styles,n=e.classNames.tfoot;return t?k.createElement("tfoot",{className:n,style:r.tfoot},k.createElement("tr",null,k.createElement("td",{colSpan:8},t))):k.createElement(k.Fragment,null)}function sN(e,t,r){for(var n=r?fi(new Date):Wr(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Zt(n,o);i.push(a)}return i}function wb(){var e=ze(),t=e.classNames,r=e.styles,n=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,c=sN(i,o,a);return k.createElement("tr",{style:r.head_row,className:t.head_row},n&&k.createElement("th",{scope:"col",style:r.head_cell,className:t.head_cell}),c.map(function(d,f){return k.createElement("th",{key:f,scope:"col",className:t.head_cell,style:r.head_cell},k.createElement("span",{"aria-hidden":!0},s(d,{locale:i})),k.createElement("span",{className:t.vhidden},u(d,{locale:i})))}))}function lN(){var e,t=ze(),r=t.classNames,n=t.styles,i=t.components,o=(e=i==null?void 0:i.HeadRow)!==null&&e!==void 0?e:wb;return k.createElement("thead",{style:n.head,className:r.head},k.createElement(o,null))}function uN(e){var t=ze(),r=t.locale,n=t.formatters.formatDay;return k.createElement(k.Fragment,null,n(e.date,{locale:r}))}var Tv=v.createContext(void 0);function cN(e){if(!da(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return k.createElement(Tv.Provider,{value:t},e.children)}return k.createElement(dN,{initialProps:e.initialProps,children:e.children})}function dN(e){var t=e.initialProps,r=e.children,n=t.selected,i=t.min,o=t.max,a=function(c,d,f){var p,m;(p=t.onDayClick)===null||p===void 0||p.call(t,c,d,f);var g=!!(d.selected&&i&&(n==null?void 0:n.length)===i);if(!g){var h=!!(!d.selected&&o&&(n==null?void 0:n.length)===o);if(!h){var b=n?SR([],n,!0):[];if(d.selected){var _=b.findIndex(function(y){return or(c,y)});b.splice(_,1)}else b.push(c);(m=t.onSelect)===null||m===void 0||m.call(t,b,c,d,f)}}},s={disabled:[]};n&&s.disabled.push(function(c){var d=o&&n.length>o-1,f=n.some(function(p){return or(p,c)});return!!(d&&!f)});var u={selected:n,onDayClick:a,modifiers:s};return k.createElement(Tv.Provider,{value:u},r)}function Ov(){var e=v.useContext(Tv);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function fN(e,t){var r=t||{},n=r.from,i=r.to;if(!n)return{from:e,to:void 0};if(!i&&or(n,e))return{from:n,to:e};if(!i&&zr(e,n))return{from:e,to:n};if(!i)return{from:n,to:e};if(!(or(i,e)&&or(n,e))){if(or(i,e))return{from:i,to:void 0};if(!or(n,e))return Or(n,e)?{from:e,to:i}:{from:n,to:e}}}var Ev=v.createContext(void 0);function pN(e){if(!fa(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return k.createElement(Ev.Provider,{value:t},e.children)}return k.createElement(vN,{initialProps:e.initialProps,children:e.children})}function vN(e){var t=e.initialProps,r=e.children,n=t.selected,i=n||{},o=i.from,a=i.to,s=t.min,u=t.max,c=function(m,g,h){var b,_;(b=t.onDayClick)===null||b===void 0||b.call(t,m,g,h);var y=fN(m,n);(_=t.onSelect)===null||_===void 0||_.call(t,y,m,g,h)},d={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o&&(d.range_start=[o],a?(d.range_end=[a],d.range_middle=[{after:o,before:a}]):d.range_end=[o]),s&&(o&&!a&&d.disabled.push({after:Mo(o,s-1),before:Zt(o,s-1)}),o&&a&&d.disabled.push({after:o,before:Zt(o,s-1)})),u&&(o&&!a&&(d.disabled.push({before:Zt(o,-u+1)}),d.disabled.push({after:Zt(o,u-1)})),o&&a)){var f=kt(a,o)+1,p=u-f;d.disabled.push({before:Mo(o,p)}),d.disabled.push({after:Zt(a,p)})}return k.createElement(Ev.Provider,{value:{selected:n,onDayClick:c,modifiers:d}},r)}function Dv(){var e=v.useContext(Ev);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function Us(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function mN(e){var t={};return Object.entries(e).forEach(function(r){var n=r[0],i=r[1];t[n]=Us(i)}),t}var xr;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(xr||(xr={}));var gN=xr.Selected,Qr=xr.Disabled,hN=xr.Hidden,yN=xr.Today,ld=xr.RangeEnd,ud=xr.RangeMiddle,cd=xr.RangeStart,kN=xr.Outside;function bN(e,t,r){var n,i=(n={},n[gN]=Us(e.selected),n[Qr]=Us(e.disabled),n[hN]=Us(e.hidden),n[yN]=[e.today],n[ld]=[],n[ud]=[],n[cd]=[],n[kN]=[],n);return e.fromDate&&i[Qr].push({before:e.fromDate}),e.toDate&&i[Qr].push({after:e.toDate}),da(e)?i[Qr]=i[Qr].concat(t.modifiers[Qr]):fa(e)&&(i[Qr]=i[Qr].concat(r.modifiers[Qr]),i[cd]=r.modifiers[cd],i[ud]=r.modifiers[ud],i[ld]=r.modifiers[ld]),i}var xb=v.createContext(void 0);function _N(e){var t=ze(),r=Ov(),n=Dv(),i=bN(t,r,n),o=mN(t.modifiers),a=Oe(Oe({},i),o);return k.createElement(xb.Provider,{value:a},e.children)}function Sb(){var e=v.useContext(xb);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function wN(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function xN(e){return!!(e&&typeof e=="object"&&"from"in e)}function SN(e){return!!(e&&typeof e=="object"&&"after"in e)}function jN(e){return!!(e&&typeof e=="object"&&"before"in e)}function TN(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ON(e,t){var r,n=t.from,i=t.to;if(!n)return!1;if(!i&&or(n,e))return!0;if(!i)return!1;var o=kt(i,n)<0;return i&&o&&(r=[i,n],n=r[0],i=r[1]),kt(e,n)>=0&&kt(i,e)>=0}function EN(e){return Eu(e)}function DN(e){return Array.isArray(e)&&e.every(Eu)}function Ur(e,t){return t.some(function(r){if(typeof r=="boolean")return r;if(EN(r))return or(e,r);if(DN(r))return r.includes(e);if(xN(r))return ON(e,r);if(TN(r))return r.dayOfWeek.includes(e.getDay());if(wN(r)){var n=kt(r.before,e),i=kt(r.after,e),o=n>0,a=i<0,s=Or(r.before,r.after);return s?a&&o:o||a}return SN(r)?kt(e,r.after)>0:jN(r)?kt(r.before,e)>0:typeof r=="function"?r(e):!1})}function Iv(e,t,r){var n=Object.keys(t).reduce(function(o,a){var s=t[a];return Ur(e,s)&&o.push(a),o},[]),i={};return n.forEach(function(o){return i[o]=!0}),r&&!yv(e,r)&&(i.outside=!0),i}function IN(e,t){for(var r=vt(e[0]),n=Iu(e[e.length-1]),i,o,a=r;a<=n;){var s=Iv(a,t),u=!s.disabled&&!s.hidden;if(!u){a=Zt(a,1);continue}if(s.selected)return a;s.today&&!o&&(o=a),i||(i=a),a=Zt(a,1)}return o||i}var RN=365;function jb(e,t){var r=t.moveBy,n=t.direction,i=t.context,o=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,u=i.weekStartsOn,c=i.fromDate,d=i.toDate,f=i.locale,p={day:Zt,week:Zd,month:wr,year:mS,startOfWeek:function(b){return i.ISOWeek?fi(b):Wr(b,{locale:f,weekStartsOn:u})},endOfWeek:function(b){return i.ISOWeek?Ak(b):dv(b,{locale:f,weekStartsOn:u})}},m=p[r](e,n==="after"?1:-1);n==="before"&&c?m=gS([c,m]):n==="after"&&d&&(m=hS([d,m]));var g=!0;if(o){var h=Iv(m,o);g=!h.disabled&&!h.hidden}return g?m:s.count>RN?s.lastFocused:jb(m,{moveBy:r,direction:n,context:i,modifiers:o,retry:Oe(Oe({},s),{count:s.count+1})})}var Tb=v.createContext(void 0);function NN(e){var t=wi(),r=Sb(),n=v.useState(),i=n[0],o=n[1],a=v.useState(),s=a[0],u=a[1],c=IN(t.displayMonths,r),d=i??(s&&t.isDateDisplayed(s))?s:c,f=function(){u(i),o(void 0)},p=function(b){o(b)},m=ze(),g=function(b,_){if(i){var y=jb(i,{moveBy:b,direction:_,context:m,modifiers:r});or(i,y)||(t.goToDate(y,i),p(y))}},h={focusedDay:i,focusTarget:d,blur:f,focus:p,focusDayAfter:function(){return g("day","after")},focusDayBefore:function(){return g("day","before")},focusWeekAfter:function(){return g("week","after")},focusWeekBefore:function(){return g("week","before")},focusMonthBefore:function(){return g("month","before")},focusMonthAfter:function(){return g("month","after")},focusYearBefore:function(){return g("year","before")},focusYearAfter:function(){return g("year","after")},focusStartOfWeek:function(){return g("startOfWeek","before")},focusEndOfWeek:function(){return g("endOfWeek","after")}};return k.createElement(Tb.Provider,{value:h},e.children)}function Rv(){var e=v.useContext(Tb);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function PN(e,t){var r=Sb(),n=Iv(e,r,t);return n}var Nv=v.createContext(void 0);function AN(e){if(!Au(e.initialProps)){var t={selected:void 0};return k.createElement(Nv.Provider,{value:t},e.children)}return k.createElement(CN,{initialProps:e.initialProps,children:e.children})}function CN(e){var t=e.initialProps,r=e.children,n=function(o,a,s){var u,c,d;if((u=t.onDayClick)===null||u===void 0||u.call(t,o,a,s),a.selected&&!t.required){(c=t.onSelect)===null||c===void 0||c.call(t,void 0,o,a,s);return}(d=t.onSelect)===null||d===void 0||d.call(t,o,o,a,s)},i={selected:t.selected,onDayClick:n};return k.createElement(Nv.Provider,{value:i},r)}function Ob(){var e=v.useContext(Nv);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function MN(e,t){var r=ze(),n=Ob(),i=Ov(),o=Dv(),a=Rv(),s=a.focusDayAfter,u=a.focusDayBefore,c=a.focusWeekAfter,d=a.focusWeekBefore,f=a.blur,p=a.focus,m=a.focusMonthBefore,g=a.focusMonthAfter,h=a.focusYearBefore,b=a.focusYearAfter,_=a.focusStartOfWeek,y=a.focusEndOfWeek,S=function(w){var E,B,Q,A;Au(r)?(E=n.onDayClick)===null||E===void 0||E.call(n,e,t,w):da(r)?(B=i.onDayClick)===null||B===void 0||B.call(i,e,t,w):fa(r)?(Q=o.onDayClick)===null||Q===void 0||Q.call(o,e,t,w):(A=r.onDayClick)===null||A===void 0||A.call(r,e,t,w)},O=function(w){var E;p(e),(E=r.onDayFocus)===null||E===void 0||E.call(r,e,t,w)},I=function(w){var E;f(),(E=r.onDayBlur)===null||E===void 0||E.call(r,e,t,w)},T=function(w){var E;(E=r.onDayMouseEnter)===null||E===void 0||E.call(r,e,t,w)},V=function(w){var E;(E=r.onDayMouseLeave)===null||E===void 0||E.call(r,e,t,w)},K=function(w){var E;(E=r.onDayTouchCancel)===null||E===void 0||E.call(r,e,t,w)},Y=function(w){var E;(E=r.onDayTouchEnd)===null||E===void 0||E.call(r,e,t,w)},z=function(w){var E;(E=r.onDayTouchMove)===null||E===void 0||E.call(r,e,t,w)},G=function(w){var E;(E=r.onDayTouchStart)===null||E===void 0||E.call(r,e,t,w)},M=function(w){var E;(E=r.onDayKeyUp)===null||E===void 0||E.call(r,e,t,w)},N=function(w){var E;switch(w.key){case"ArrowLeft":w.preventDefault(),w.stopPropagation(),r.dir==="rtl"?s():u();break;case"ArrowRight":w.preventDefault(),w.stopPropagation(),r.dir==="rtl"?u():s();break;case"ArrowDown":w.preventDefault(),w.stopPropagation(),c();break;case"ArrowUp":w.preventDefault(),w.stopPropagation(),d();break;case"PageUp":w.preventDefault(),w.stopPropagation(),w.shiftKey?h():m();break;case"PageDown":w.preventDefault(),w.stopPropagation(),w.shiftKey?b():g();break;case"Home":w.preventDefault(),w.stopPropagation(),_();break;case"End":w.preventDefault(),w.stopPropagation(),y();break}(E=r.onDayKeyDown)===null||E===void 0||E.call(r,e,t,w)},R={onClick:S,onFocus:O,onBlur:I,onKeyDown:N,onKeyUp:M,onMouseEnter:T,onMouseLeave:V,onTouchCancel:K,onTouchEnd:Y,onTouchMove:z,onTouchStart:G};return R}function LN(){var e=ze(),t=Ob(),r=Ov(),n=Dv(),i=Au(e)?t.selected:da(e)?r.selected:fa(e)?n.selected:void 0;return i}function $N(e){return Object.values(xr).includes(e)}function VN(e,t){var r=[e.classNames.day];return Object.keys(t).forEach(function(n){var i=e.modifiersClassNames[n];if(i)r.push(i);else if($N(n)){var o=e.classNames["day_".concat(n)];o&&r.push(o)}}),r}function FN(e,t){var r=Oe({},e.styles.day);return Object.keys(t).forEach(function(n){var i;r=Oe(Oe({},r),(i=e.modifiersStyles)===null||i===void 0?void 0:i[n])}),r}function Eb(e,t,r){var n,i,o,a=ze(),s=Rv(),u=PN(e,t),c=MN(e,u),d=LN(),f=!!(a.onDayClick||a.mode!=="default");v.useEffect(function(){var T;u.outside||s.focusedDay&&f&&or(s.focusedDay,e)&&((T=r.current)===null||T===void 0||T.focus())},[s.focusedDay,e,r,f,u.outside]);var p=VN(a,u).join(" "),m=FN(a,u),g=a.labels.labelDay(e,u,{locale:a.locale}),h=!!(u.outside&&!a.showOutsideDays||u.hidden),b=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:uN,_=k.createElement(b,{date:e,displayMonth:t,activeModifiers:u}),y={style:m,className:p,children:_,"aria-label":g},S=s.focusTarget&&or(s.focusTarget,e)&&!u.outside,O=Oe(Oe(Oe({},y),(n={disabled:u.disabled},n["aria-pressed"]=u.selected,n["aria-label"]=g,n.tabIndex=S?0:-1,n)),c),I={isButton:f,isHidden:h,activeModifiers:u,selectedDays:d,buttonProps:O,divProps:y};return I}function HN(e){var t=v.useRef(null),r=Eb(e.date,e.displayMonth,t);return r.isHidden?k.createElement(k.Fragment,null):r.isButton?k.createElement($o,Oe({name:"day",ref:t},r.buttonProps)):k.createElement("div",Oe({},r.divProps))}function UN(e){var t=e.number,r=e.dates,n=ze(),i=n.onWeekNumberClick,o=n.styles,a=n.classNames,s=n.locale,u=n.labels.labelWeekNumber,c=n.formatters.formatWeekNumber,d=c(Number(t),{locale:s});if(!i)return k.createElement("span",{className:a.weeknumber,style:o.weeknumber},d);var f=u(Number(t),{locale:s}),p=function(m){i(t,r,m)};return k.createElement($o,{name:"week-number","aria-label":f,className:a.weeknumber,style:o.weeknumber,onClick:p},d)}function BN(e){var t,r,n=ze(),i=n.styles,o=n.classNames,a=n.showWeekNumber,s=n.components,u=(t=s==null?void 0:s.Day)!==null&&t!==void 0?t:HN,c=(r=s==null?void 0:s.WeekNumber)!==null&&r!==void 0?r:UN,d;return a&&(d=k.createElement("td",{className:o.cell,style:i.cell},k.createElement(c,{number:e.weekNumber,dates:e.dates}))),k.createElement("tr",{className:o.row,style:i.row},d,e.dates.map(function(f){return k.createElement("td",{className:o.cell,style:i.cell,key:Rj(f)},k.createElement(u,{displayMonth:e.displayMonth,date:f}))}))}function Ih(e,t,r){for(var n=r!=null&&r.ISOWeek?Ak(t):dv(t,r),i=r!=null&&r.ISOWeek?fi(e):Wr(e,r),o=kt(n,i),a=[],s=0;s<=o;s++)a.push(Zt(i,s));var u=a.reduce(function(c,d){var f=r!=null&&r.ISOWeek?Dj(d):Cj(d,r),p=c.find(function(m){return m.weekNumber===f});return p?(p.dates.push(d),c):(c.push({weekNumber:f,dates:[d]}),c)},[]);return u}function KN(e,t){var r=Ih(vt(e),Iu(e),t);if(t!=null&&t.useFixedWeeks){var n=Lj(e,t);if(n<6){var i=r[r.length-1],o=i.dates[i.dates.length-1],a=Zd(o,6-n),s=Ih(Zd(o,1),a,t);r.push.apply(r,s)}}return r}function WN(e){var t,r,n,i=ze(),o=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,c=i.fixedWeeks,d=i.components,f=i.weekStartsOn,p=i.firstWeekContainsDate,m=i.ISOWeek,g=KN(e.displayMonth,{useFixedWeeks:!!c,ISOWeek:m,locale:o,weekStartsOn:f,firstWeekContainsDate:p}),h=(t=d==null?void 0:d.Head)!==null&&t!==void 0?t:lN,b=(r=d==null?void 0:d.Row)!==null&&r!==void 0?r:BN,_=(n=d==null?void 0:d.Footer)!==null&&n!==void 0?n:aN;return k.createElement("table",{className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"]},!u&&k.createElement(h,null),k.createElement("tbody",{className:a.tbody,style:s.tbody},g.map(function(y){return k.createElement(b,{displayMonth:e.displayMonth,key:y.weekNumber,dates:y.dates,weekNumber:y.weekNumber})})),k.createElement(_,null))}function zN(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var qN=zN()?v.useLayoutEffect:v.useEffect,dd=!1,YN=0;function Rh(){return"react-day-picker-".concat(++YN)}function GN(e){var t,r=e??(dd?Rh():null),n=v.useState(r),i=n[0],o=n[1];return qN(function(){i===null&&o(Rh())},[]),v.useEffect(function(){dd===!1&&(dd=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function ZN(e){var t,r,n=ze(),i=n.dir,o=n.classNames,a=n.styles,s=n.components,u=wi().displayMonths,c=GN(n.id?"".concat(n.id,"-").concat(e.displayIndex):void 0),d=[o.month],f=a.month,p=e.displayIndex===0,m=e.displayIndex===u.length-1,g=!p&&!m;i==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(d.push(o.caption_start),f=Oe(Oe({},f),a.caption_start)),m&&(d.push(o.caption_end),f=Oe(Oe({},f),a.caption_end)),g&&(d.push(o.caption_between),f=Oe(Oe({},f),a.caption_between));var h=(r=s==null?void 0:s.Caption)!==null&&r!==void 0?r:oN;return k.createElement("div",{key:e.displayIndex,className:d.join(" "),style:f},k.createElement(h,{id:c,displayMonth:e.displayMonth}),k.createElement(WN,{"aria-labelledby":c,displayMonth:e.displayMonth}))}function XN(){var e=ze(),t=Rv(),r=wi(),n=v.useState(!1),i=n[0],o=n[1];v.useEffect(function(){e.initialFocus&&t.focusTarget&&(i||(t.focus(t.focusTarget),o(!0)))},[e.initialFocus,i,t.focus,t.focusTarget,t]);var a=[e.classNames.root,e.className];e.numberOfMonths>1&&a.push(e.classNames.multiple_months),e.showWeekNumber&&a.push(e.classNames.with_weeknumber);var s=Oe(Oe({},e.styles.root),e.style);return k.createElement("div",{className:a.join(" "),style:s,dir:e.dir},k.createElement("div",{className:e.classNames.months,style:e.styles.months},r.displayMonths.map(function(u,c){return k.createElement(ZN,{key:c,displayIndex:c,displayMonth:u})})))}function JN(e){var t=e.children,r=xR(e,["children"]);return k.createElement(BR,{initialProps:r},k.createElement(QR,null,k.createElement(AN,{initialProps:r},k.createElement(cN,{initialProps:r},k.createElement(pN,{initialProps:r},k.createElement(_N,null,k.createElement(NN,null,t)))))))}function Db(e){return k.createElement(JN,Oe({},e),k.createElement(XN,null))}var QN=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,as:n="a",className:i}=e,o=QN(e,["children","as","className"]);return k.createElement(n,Object.assign({},o,{ref:t,className:ve(i,"navds-error-summary__item","navds-link")}),r)}),tP=eP;var rP=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,className:n,size:i="medium",headingTag:o="h2",heading:a}=e,s=rP(e,["children","className","size","headingTag","heading"]);const u=oa();return k.createElement("section",Object.assign({ref:t},s,{className:ve(n,"navds-error-summary",`navds-error-summary--${i}`),tabIndex:-1,"aria-live":"polite","aria-relevant":"all","aria-labelledby":u}),k.createElement(oe,{className:"navds-error-summary__heading",as:o,size:"small",id:u},a),k.createElement(ce,{as:"ul",size:i,className:"navds-error-summary__list"},k.Children.map(r,c=>k.createElement("li",{key:c==null?void 0:c.toString()},c))))});Ib.Item=tP;const fd=Ib;var nP=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);ik.createElement("svg",{width:"12px",height:"12px",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:!1,role:"img","aria-hidden":!0,"aria-label":"Deaktiver valg"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.01386 8L10.25 2L11 2.75L4.01386 9.5L1 6.5L1.75 5.75L4.01386 8Z",fill:"currentColor",stroke:"currentColor"})),oP=v.forwardRef((e,t)=>{var r,n,i;const{inputProps:o,size:a}=wu(e,"switch"),{children:s,className:u,description:c,hideLabel:d=!1,loading:f,checked:p,defaultChecked:m,position:g="left"}=e,h=nP(e,["children","className","description","hideLabel","loading","checked","defaultChecked","position"]),b=a==="medium"?ce:mn,[_,y]=v.useState((r=m??p)!==null&&r!==void 0?r:!1);v.useEffect(()=>{p!==void 0&&y(p)},[p]);const S=O=>{y(O.target.checked),e.onChange&&e.onChange(O)};return k.createElement("div",{className:ve("navds-switch",e.className,`navds-switch--${a}`,`navds-switch--${g}`,{"navds-switch--loading":f,"navds-switch--disabled":(n=o.disabled)!==null&&n!==void 0?n:f})},k.createElement("input",Object.assign({},di(h,["size"]),di(o,["aria-invalid","aria-describedby"]),{disabled:(i=o.disabled)!==null&&i!==void 0?i:f,checked:p,defaultChecked:m,ref:t,type:"checkbox",onChange:O=>S(O),className:ve(u,"navds-switch__input")})),k.createElement("span",{className:"navds-switch__track"},k.createElement("span",{className:"navds-switch__thumb"},f?k.createElement(xu,{size:"xsmall","aria-live":"polite"}):_?k.createElement(iP,null):null)),k.createElement("label",{htmlFor:o.id,className:"navds-switch__label-wrapper"},k.createElement("div",{className:ve("navds-switch__content",{"navds-sr-only":d,"navds-switch--with-description":!!c&&!d})},k.createElement(ce,{as:"div",size:a,className:"navds-switch__label"},s),c&&k.createElement(b,{as:"div",size:"small",className:"navds-switch__description"},c))))}),Rb=oP;var aP=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i(e&&e.ownerDocument||document).defaultView||window;function Ka(e,t){return parseInt(e[t],10)||0}const sP=v.forwardRef((e,t)=>{var{className:r,onChange:n,maxRows:i,minRows:o=1,style:a,value:s}=e,u=aP(e,["className","onChange","maxRows","minRows","style","value"]);const{current:c}=v.useRef(s!=null),d=v.useRef(null),f=v.useMemo(()=>Jp([d,t]),[t]),p=v.useRef(null),m=v.useRef(0),[g,h]=v.useState({}),b=k.useCallback(()=>{if(!d.current||!p.current)return;const I=d.current,V=Nh(I).getComputedStyle(I);if(V.width==="0px")return;const K=p.current;K.style.width=V.width,K.value=I.value||(u==null?void 0:u.placeholder)||"x",K.value.slice(-1)===`
+`&&(K.value+=" ");const Y=V["box-sizing"],z=Ka(V,"padding-bottom")+Ka(V,"padding-top"),G=Ka(V,"border-bottom-width")+Ka(V,"border-top-width"),M=K.scrollHeight-z;K.value="x";const N=K.scrollHeight-z;let R=M;o&&(R=Math.max(Number(o)*N,R)),i&&(R=Math.min(Number(i)*N,R)),R=Math.max(R,N);const w=R+(Y==="border-box"?z+G:0),E=Math.abs(R-M)<=1;return{outerHeightStyle:w,overflow:E}},[i,o,u==null?void 0:u.placeholder]),_=k.useCallback(()=>{const I=b();Ph(I)||h(T=>y(T,I))},[b]),y=(I,T)=>{const{outerHeightStyle:V,overflow:K}=T;return m.current<20&&(V>0&&Math.abs((I.outerHeightStyle||0)-V)>1||I.overflow!==K)?(m.current+=1,{overflow:K,outerHeightStyle:V}):I},S=()=>{const I=b();Ph(I)||Xx.flushSync(()=>{h(T=>y(T,I))})};k.useEffect(()=>{const I=mR(()=>{m.current=0,d.current&&S()});let T;const V=d.current,K=Nh(V);return K.addEventListener("resize",I),typeof ResizeObserver<"u"&&(T=new ResizeObserver(I),T.observe(V)),()=>{I.clear(),K.removeEventListener("resize",I),T&&T.disconnect()}}),qd(()=>{_()}),v.useEffect(()=>{m.current=0},[s]);const O=I=>{m.current=0,c||_(),n&&n(I)};return k.createElement(k.Fragment,null,k.createElement("textarea",Object.assign({value:s,onChange:O,ref:f,rows:o,style:Object.assign(Object.assign({height:g.outerHeightStyle},g.overflow?{overflow:"hidden"}:{}),a)},u,{className:r})),k.createElement("textarea",{"aria-hidden":!0,className:r,readOnly:!0,ref:p,tabIndex:-1,style:Object.assign({visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},a)}))});function Ph(e){return e==null||Object.keys(e).length===0||(e==null?void 0:e.outerHeightStyle)===0&&!(e!=null&&e.overflow)}const lP=sP;var uP=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var r,n,i;const{inputProps:o,errorId:a,showErrorMsg:s,hasError:u,size:c,inputDescriptionId:d}=wu(e,"textarea"),{label:f,className:p,description:m,maxLength:g,hideLabel:h=!1,resize:b}=e,_=uP(e,["label","className","description","maxLength","hideLabel","resize"]),y=oa(),S=g!==void 0&&g>0,[O,I]=v.useState((r=e==null?void 0:e.defaultValue)!==null&&r!==void 0?r:""),T=()=>{let K=_!=null&&_.minRows?_==null?void 0:_.minRows:3;return c==="small"&&(K=_!=null&&_.minRows?_==null?void 0:_.minRows:2),K},V=ve(o["aria-describedby"],{[y??""]:S});return k.createElement("div",{className:ve(p,"navds-form-field",`navds-form-field--${c}`,{"navds-form-field--disabled":!!o.disabled,"navds-textarea--error":u,"navds-textarea--resize":b})},k.createElement(Wn,{htmlFor:o.id,size:c,className:ve("navds-form-field__label",{"navds-sr-only":h})},f),!!m&&k.createElement(k.Fragment,null,c==="medium"?k.createElement(cn,{className:ve("navds-form-field__description",{"navds-sr-only":h}),id:d,size:"small",as:"div"},m):k.createElement(mn,{className:ve("navds-form-field__description",{"navds-sr-only":h}),id:d,size:"small",as:"div"},m)),k.createElement("div",{className:"navds-textarea__wrapper"},k.createElement(lP,Object.assign({},di(_,["error","errorId","size"]),o,{onChange:K=>e.onChange?e.onChange(K):I(K.target.value),minRows:T(),ref:t,className:ve("navds-textarea__input","navds-body-short",`navds-body-${c??"medium"}`,{"navds-textarea--counter":S})},V?{"aria-describedby":V}:{})),S&&k.createElement(k.Fragment,null,k.createElement("span",{id:y,className:"navds-sr-only"},"Tekstområde med plass til ",g," tegn."),k.createElement(dP,{maxLength:g,currentLength:(i=(n=e.value)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:O==null?void 0:O.length,size:c}))),k.createElement("div",{className:"navds-form-field__error",id:a,"aria-relevant":"additions removals","aria-live":"polite"},s&&k.createElement(Qp,{size:c},e.error)))}),dP=({maxLength:e,currentLength:t,size:r})=>{const n=e-t;return k.createElement(ce,{className:ve("navds-textarea__counter",{"navds-textarea__counter--error":n<0}),"aria-live":n<20?"polite":"off",size:r},n<0?`Antall tegn for mye ${Math.abs(n)}`:`Antall tegn igjen ${n}`)},Vt=cP;var fP=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{inputProps:r,errorId:n,showErrorMsg:i,hasError:o,size:a,inputDescriptionId:s}=wu(e,"textField"),{label:u,className:c,description:d,htmlSize:f,hideLabel:p=!1,type:m="text"}=e,g=fP(e,["label","className","description","htmlSize","hideLabel","type"]);return k.createElement("div",{className:ve(c,"navds-form-field",`navds-form-field--${a}`,{"navds-text-field--error":o,"navds-text-field--disabled":!!r.disabled,"navds-form-field--disabled":!!r.disabled})},k.createElement(Wn,{htmlFor:r.id,size:a,className:ve("navds-form-field__label",{"navds-sr-only":p})},u),!!d&&k.createElement(k.Fragment,null,a==="medium"?k.createElement(cn,{className:ve("navds-form-field__description",{"navds-sr-only":p}),id:s,size:"small",as:"div"},d):k.createElement(mn,{className:ve("navds-form-field__description",{"navds-sr-only":p}),id:s,size:"small",as:"div"},d)),k.createElement("input",Object.assign({},di(g,["error","errorId","size"]),r,{ref:t,type:m,className:ve("navds-text-field__input","navds-body-short",`navds-body-${a??"medium"}`),size:f})),k.createElement("div",{className:"navds-form-field__error",id:n,"aria-relevant":"additions removals","aria-live":"polite"},i&&k.createElement(Qp,{size:a},e.error)))}),nt=pP,Nb="dd.MM.yyyy",Pb="MMMM yyyy",Ab=[Nb,"ddMMyyyy","dd/MM/yyyy","dd-MM-yyyy"],vP=["M/yyyy","MM/yyyy","M-yyyy","MM-yyyy","MM.yyyy",Pb,...Ab],To=(e,t,r,n,i)=>{let o;const a=n==="date"?Ab:vP;if(i){for(const s of a)if(o=Hi(e,s,t,{locale:r}),Nt(o)&&!pd(e,t,r,a))return o;for(const s of[...a.map(u=>u.replace("yyyy","yy"))])if(o=Hi(e,s,t,{locale:r}),Nt(o)&&pd(e,t,r,a)){const u=mP(e,s,t,r);return Nt(new Date(u))?new Date(u):new Date("Invalid date")}return new Date("Invalid date")}else{for(const s of a)if(o=Hi(e,s,t,{locale:r}),Nt(o)&&!pd(e,t,r,a))return o;return new Date("Invalid date")}};function pd(e,t,r,n){let i;const o=n.map(a=>a.replace("yyyy","yy"));for(const a of o)if(i=Hi(e,a,t,{locale:r}),Nt(i))return!0;return!1}function mP(e,t,r,n){const i=Hi(Ah(e,"19"),t.replace("yy","yyyy"),r,{locale:n}),o=Hi(Ah(e,"20"),t.replace("yy","yyyy"),r,{locale:n});return Nt(i)&&Nt(o)?zr(i,TD(new Date,{years:80}))?o:i:new Date("Invalid date")}function Ah(e,t){const r=e.slice(-2);return`${e.slice(0,e.length-2)}${t}${r}`}const Gt=(e,t,r,n)=>Ct(e,n??(r==="date"?Nb:Pb),{locale:t}),gP=(e,t,r)=>{const n=[];if($s(e,t)){const i=vt(e);for(let o=e.getMonth();o<=t.getMonth();o++)n.push(Sn(i,o))}else if($s(r,t)){const i=vt(new Date);for(let o=0;o<=t.getMonth();o++)n.push(Sn(i,o))}else if($s(r,e)){const i=vt(e);for(let o=i.getMonth();o<=11;o++)n.push(Sn(i,o))}else{const i=vt(new Date);for(let o=0;o<=11;o++)n.push(Sn(i,o))}return n},hP=(e,t)=>{const r=[],n=e.getFullYear(),i=t.getFullYear();for(let o=n;o<=i;o++)r.push(Ml(Pk(new Date),o));return r},yP=(e,t)=>{var r;switch((r=t==null?void 0:t.locale)===null||r===void 0?void 0:r.code){case"nb":return"Gå til neste måned";case"nn":return"Gå til neste månad";case"en":return"Go to next month";default:return"Gå til neste måned"}},kP=(e,t)=>{var r;switch((r=t==null?void 0:t.locale)===null||r===void 0?void 0:r.code){case"nb":return"Gå til forrige måned";case"nn":return"Gå til førre månad";case"en":return"Go to previous month";default:return"Gå til forrige måned"}},bP=e=>{switch(e==null?void 0:e.code){case"nb":return"År";case"nn":return"År";case"en":return"Year";default:return"År"}},_P=e=>{switch(e==null?void 0:e.code){case"nb":return"Måned";case"nn":return"Månad";case"en":return"Month";default:return"Måned"}},Cb={labelNext:yP,labelPrevious:kP};var wP={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},xP={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},SP={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jP={date:on({formats:wP,defaultWidth:"full"}),time:on({formats:xP,defaultWidth:"full"}),dateTime:on({formats:SP,defaultWidth:"full"})};const TP=jP;var OP={code:"en-GB",formatDistance:Bk,formatLong:TP,formatRelative:Kk,localize:Wk,match:zk,options:{weekStartsOn:1,firstWeekContainsDate:4}};const EP=OP;var DP={lessThanXSeconds:{one:"mindre enn ett sekund",other:"mindre enn {{count}} sekunder"},xSeconds:{one:"ett sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minutt",lessThanXMinutes:{one:"mindre enn ett minutt",other:"mindre enn {{count}} minutter"},xMinutes:{one:"ett minutt",other:"{{count}} minutter"},aboutXHours:{one:"omtrent en time",other:"omtrent {{count}} timer"},xHours:{one:"en time",other:"{{count}} timer"},xDays:{one:"en dag",other:"{{count}} dager"},aboutXWeeks:{one:"omtrent en uke",other:"omtrent {{count}} uker"},xWeeks:{one:"en uke",other:"{{count}} uker"},aboutXMonths:{one:"omtrent en måned",other:"omtrent {{count}} måneder"},xMonths:{one:"en måned",other:"{{count}} måneder"},aboutXYears:{one:"omtrent ett år",other:"omtrent {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"over ett år",other:"over {{count}} år"},almostXYears:{one:"nesten ett år",other:"nesten {{count}} år"}},IP=function(t,r,n){var i,o=DP[t];return typeof o=="string"?i=o:r===1?i=o.one:i=o.other.replace("{{count}}",String(r)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"om "+i:i+" siden":i};const RP=IP;var NP={full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},PP={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},AP={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},CP={date:on({formats:NP,defaultWidth:"full"}),time:on({formats:PP,defaultWidth:"full"}),dateTime:on({formats:AP,defaultWidth:"full"})};const MP=CP;var LP={lastWeek:"'forrige' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},$P=function(t,r,n,i){return LP[t]};const VP=$P;var FP={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},HP={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},UP={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},BP={narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn","man","tir","ons","tor","fre","lør"],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},KP={narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgenen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natten"}},WP=function(t,r){var n=Number(t);return n+"."},zP={ordinalNumber:WP,era:Ar({values:FP,defaultWidth:"wide"}),quarter:Ar({values:HP,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Ar({values:UP,defaultWidth:"wide"}),day:Ar({values:BP,defaultWidth:"wide"}),dayPeriod:Ar({values:KP,defaultWidth:"wide"})};const qP=zP;var YP=/^(\d+)\.?/i,GP=/\d+/i,ZP={narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},XP={any:[/^f/i,/^e/i]},JP={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},QP={any:[/1/i,/2/i,/3/i,/4/i]},eA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},tA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},rA={narrow:/^[smtofl]/i,short:/^(sø|ma|ti|on|to|fr|lø)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},nA={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},iA={narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},oA={any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgen/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},aA={ordinalNumber:xk({matchPattern:YP,parsePattern:GP,valueCallback:function(t){return parseInt(t,10)}}),era:Cr({matchPatterns:ZP,defaultMatchWidth:"wide",parsePatterns:XP,defaultParseWidth:"any"}),quarter:Cr({matchPatterns:JP,defaultMatchWidth:"wide",parsePatterns:QP,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Cr({matchPatterns:eA,defaultMatchWidth:"wide",parsePatterns:tA,defaultParseWidth:"any"}),day:Cr({matchPatterns:rA,defaultMatchWidth:"wide",parsePatterns:nA,defaultParseWidth:"any"}),dayPeriod:Cr({matchPatterns:iA,defaultMatchWidth:"any",parsePatterns:oA,defaultParseWidth:"any"})};const sA=aA;var lA={code:"nb",formatDistance:RP,formatLong:MP,formatRelative:VP,localize:qP,match:sA,options:{weekStartsOn:1,firstWeekContainsDate:4}};const Pv=lA,Cu=(e="nb")=>{switch(e){case"nn":return Jx;case"en":return EP;default:return Pv}};function Nt(e){return e&&!isNaN(e==null?void 0:e.getTime())&&e.getFullYear()>999}const vp=(e={},t={})=>({from:Object.assign({isDisabled:!1,isWeekend:!1,isEmpty:!1,isInvalid:!1,isBefore:!1,isAfter:!1,isValidDate:!0},e),to:Object.assign({isDisabled:!1,isWeekend:!1,isEmpty:!1,isInvalid:!1,isBefore:!1,isAfter:!1,isBeforeFrom:!1,isValidDate:!0},t)}),Nr={FROM:"FROM",TO:"TO"},uA=(e,t)=>{const r=(t==null?void 0:t.fromDate)&&e&&kt(t==null?void 0:t.fromDate,e)>0,n=(t==null?void 0:t.toDate)&&e&&kt(e,t==null?void 0:t.toDate)>0;if(Nt(e)&&!(t!=null&&t.disableWeekends&&gr(e))&&!(t!=null&&t.disabled&&Ur(e,t.disabled)))return{isValidDate:!1,isInvalid:!Nt(e),isWeekend:(t==null?void 0:t.disableWeekends)&&gr(e),isDisabled:(t==null?void 0:t.disabled)&&Ur(e,t.disabled),isBefore:r,isAfter:n};if(r||n)return{isValidDate:!1,isBefore:r,isAfter:n}},cA=(e,t,r)=>{var n;const i=(r==null?void 0:r.fromDate)&&e&&kt(r==null?void 0:r.fromDate,e)>0,o=(r==null?void 0:r.toDate)&&e&&kt(e,r==null?void 0:r.toDate)>0,a=(n=t&&kt(t,e)>0)!==null&&n!==void 0?n:!1;if(Nt(e)&&!(r!=null&&r.disableWeekends&&gr(e))&&!(r!=null&&r.disabled&&Ur(e,r.disabled)))return{isValidDate:!1,isInvalid:!Nt(e),isWeekend:(r==null?void 0:r.disableWeekends)&&gr(e),isDisabled:(r==null?void 0:r.disabled)&&Ur(e,r.disabled),isBefore:i,isAfter:o,isBeforeFrom:a};if(i||o||a)return{isValidDate:!1,isBefore:i,isAfter:o,isBeforeFrom:a}},vd=(e,t)=>{if(!e||!(e!=null&&e.from))return vp({isEmpty:!0,isValidDate:!1},{isEmpty:!0,isValidDate:!1});const r=uA(e.from,t),n=e.to?cA(e.to,e.from,t):{isEmpty:!0,isValidDate:!1};return vp(Object.assign({},r),Object.assign({},n))},dA=(e={})=>{const{locale:t="nb",defaultSelected:r,today:n=new Date,fromDate:i,toDate:o,disabled:a,disableWeekends:s,onRangeChange:u,inputFormat:c,onValidate:d,defaultMonth:f,allowTwoDigitYear:p=!0,openOnFocus:m=!0}=e,g=Cu(t),h=v.useRef(null),b=v.useRef(null),_=v.useRef(null),[y,S]=v.useState(r),[O,I]=v.useState(y?y==null?void 0:y.from:f??n),[T,V]=v.useState(y??{from:void 0,to:void 0}),[K,Y]=v.useState(y!=null&&y.from?Gt(y.from,g,"date",c):""),[z,G]=v.useState(y!=null&&y.to?Gt(y.to,g,"date",c):""),[M,N]=v.useState(vd(T,e)),[R,w]=v.useState(!1),E=H=>{u==null||u(H),V(H)},B=(H={},de={})=>{const Ee=vp(H,de);N(Ee),d==null||d(Ee)},Q=v.useCallback(H=>{var de,Ee,j,$,U;const ie=(Ee=(de=H.composedPath)===null||de===void 0?void 0:de.call(H))===null||Ee===void 0?void 0:Ee[0];!(H!=null&&H.target)||!(!((j=H==null?void 0:H.target)===null||j===void 0)&&j.nodeType)||!ie||![_.current,h.current,b.current,($=h.current)===null||$===void 0?void 0:$.nextSibling,(U=b.current)===null||U===void 0?void 0:U.nextSibling].some(Z=>(Z==null?void 0:Z.contains(H.target))||(Z==null?void 0:Z.contains(ie)))&&R&&w(!1)},[R]);v.useEffect(()=>(window.addEventListener("focusin",Q),window.addEventListener("pointerdown",Q),()=>{var H,de;(H=window==null?void 0:window.removeEventListener)===null||H===void 0||H.call(window,"focusin",Q),(de=window==null?void 0:window.removeEventListener)===null||de===void 0||de.call(window,"pointerdown",Q)}),[Q]);const A=()=>{E(y??{from:void 0,to:void 0}),I(y?y==null?void 0:y.from:f??n),N(vd(y??{from:void 0,to:void 0},e)),Y(y!=null&&y.from?Gt(y.from,g,"date",c):""),G(y!=null&&y.to?Gt(y.to,g,"date",c):""),S(r)},be=H=>{E(H),Y(H!=null&&H.from?Gt(H.from,g,"date",c):""),G(H!=null&&H.to?Gt(H==null?void 0:H.to,g,"date",c):""),N(vd(H,e))},D=(H,de)=>{!R&&m&&w(!0);let Ee=To(H.target.value,n,g,"date",p);Nt(Ee)&&(I(Ee),de===Nr.FROM?Y(Gt(Ee,g,"date",c)):G(Gt(Ee,g,"date",c)))},L=(H,de)=>{let Ee=To(H.target.value,n,g,"date",p);Nt(Ee)&&(de===Nr.FROM?Y(Gt(Ee,g,"date",c)):de===Nr.TO&&G(Gt(Ee,g,"date",c)))},P=H=>Nt(H)&&!(s&&gr(H))&&!(a&&Ur(H,a)),W=H=>{H!=null&&H.from&&(H!=null&&H.to)&&w(!1);let de=!(T!=null&&T.from)&&(T!=null&&T.to)?T==null?void 0:T.to:H==null?void 0:H.to;const Ee=zr(de,H==null?void 0:H.from);H!=null&&H.from?Y(Gt(H==null?void 0:H.from,g,"date",c)):Y(""),G(de&&!Ee?Gt(de,g,"date",c):""),E({from:H==null?void 0:H.from,to:Ee?void 0:de}),B({isValidDate:!!(H!=null&&H.from),isEmpty:!(H!=null&&H.from)},{isValidDate:!!(H!=null&&H.to),isEmpty:!de||Ee})},re=(H="",de,Ee=!1,j=!1)=>{if(Y(H),!P(de)){E(Object.assign(Object.assign({},T),{from:void 0})),B({isEmpty:!H,isValidDate:!1,isInvalid:!Nt(de),isWeekend:s&&gr(de),isDisabled:a&&Ur(de,a),isBefore:Ee,isAfter:j},M.to);return}if(Ee||j){E(Object.assign(Object.assign({},T),{from:void 0})),B({isValidDate:!1,isBefore:Ee,isAfter:j},M.to);return}if(T!=null&&T.to&&kt(de,T==null?void 0:T.to)>0){E({to:de,from:de}),G(Gt(de,g,"date",c)),I(de),B();return}if(z&&!(T!=null&&T.to)){const $=To(z,n,g,"date",p);if(P($)){E({from:de,to:$}),I(de),B();return}}E(Object.assign(Object.assign({},T),{from:de})),B({},M.to),I(de)},he=(H="",de,Ee=!1,j=!1)=>{if(G(H),!P(de)){E({from:T==null?void 0:T.from,to:void 0}),B(M.from,{isEmpty:!H,isValidDate:!1,isInvalid:!Nt(de),isWeekend:s&&gr(de),isDisabled:a&&Ur(de,a),isBefore:Ee,isAfter:j});return}if(Ee||j){E({from:T==null?void 0:T.from,to:void 0}),B(M.from,{isValidDate:!1,isBefore:Ee,isAfter:j});return}if(T!=null&&T.from&&kt(T==null?void 0:T.from,de)>0){E({from:T==null?void 0:T.from,to:void 0}),B(M.from,{isValidDate:!1,isBeforeFrom:!0});return}E({from:T==null?void 0:T.from,to:de}),B(M.from,{}),I(de)},me=(H,de)=>{const Ee=To(H.target.value,n,g,"date",p),j=i&&kt(i,Ee)>0,$=o&&kt(Ee,o)>0;return de===Nr.FROM?re(H.target.value,Ee,j,$):he(H.target.value,Ee,j,$)},ke=v.useCallback(()=>{var H,de;w(!1),T!=null&&T.from&&!(T!=null&&T.to)?(H=h==null?void 0:h.current)===null||H===void 0||H.focus():(de=b==null?void 0:b.current)===null||de===void 0||de.focus()},[T]),ge=v.useCallback(H=>R&&H.key==="Escape"&&ke(),[ke,R]);return v.useEffect(()=>(window.addEventListener("keydown",ge,!1),()=>{window.removeEventListener("keydown",ge,!1)}),[ge]),{datepickerProps:{month:O,onMonthChange:H=>I(H),onSelect:W,selected:T,locale:t,fromDate:i,toDate:o,today:n,mode:"range",open:R,onOpenToggle:()=>w(H=>!H),disabled:a,disableWeekends:s,ref:_},fromInputProps:{onChange:H=>me(H,Nr.FROM),onFocus:H=>D(H,Nr.FROM),onBlur:H=>L(H,Nr.FROM),value:K,ref:b},toInputProps:{onChange:H=>me(H,Nr.TO),onFocus:H=>D(H,Nr.TO),onBlur:H=>L(H,Nr.TO),value:z,ref:h},reset:A,selectedRange:T,setSelected:be}},Mb=v.createContext({open:!1,onOpen:()=>null,ariaId:void 0}),fA=()=>{const e=v.useContext(Mb);return e||console.warn("useDateInputContext must be used with DateContext"),e};var pA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{const{className:r,hideLabel:n=!1,label:i,description:o,variant:a="datepicker"}=e,s=pA(e,["className","hideLabel","label","description","variant"]),u=a==="datepicker",c={prefix:u?"datepicker-input":"monthpicker-input",iconTitle:{open:u?"Åpne datovelger":"Åpne månedsvelger",close:u?"Lukk datovelger":"Lukk månedsvelger"}},{onOpen:d,ariaId:f,open:p}=fA(),{inputProps:m,size:g="medium",inputDescriptionId:h,errorId:b,showErrorMsg:_,hasError:y}=wu(e,c.prefix);return k.createElement("div",{className:ve(r,"navds-form-field",`navds-form-field--${g}`,"navds-date__field",{"navds-text-field--error":y,"navds-date__field--error":y,"navds-form-field--disabled":!!m.disabled,"navds-text-field--disabled":!!m.disabled})},k.createElement(Wn,{htmlFor:m.id,size:g,className:ve("navds-form-field__label",{"navds-sr-only":n})},i),!!o&&k.createElement(ce,{as:"div",className:ve("navds-form-field__description",{"navds-sr-only":n}),id:h,size:g},o),k.createElement("div",{className:"navds-date__field-wrapper"},k.createElement("input",Object.assign({ref:t},di(s,["error","errorId","size"]),m,{autoComplete:"off","aria-controls":f,className:ve("navds-date__field-input","navds-text-field__input","navds-body-short",`navds-body-${g}`),size:14})),k.createElement(Ne,{variant:"tertiary",type:"button",size:"small",onClick:()=>d(),className:"navds-date__field-button",tabIndex:p?-1:0,disabled:m.disabled,icon:k.createElement(S5,{title:p?c.iconTitle.close:c.iconTitle.open})})),k.createElement("div",{className:"navds-form-field__error",id:b,"aria-relevant":"additions removals","aria-live":"polite"},_&&k.createElement(Qp,{size:g},e.error)))}),vA=v.forwardRef((e,t)=>k.createElement(Lb,Object.assign({},e,{ref:t})));v.forwardRef((e,t)=>k.createElement(Lb,Object.assign({},e,{variant:"monthpicker",ref:t})));const mA=({displayMonth:e,id:t})=>{const{goToMonth:r,nextMonth:n,previousMonth:i}=wi(),{labels:{labelPrevious:o,labelNext:a},formatters:{formatCaption:s},locale:u}=ze(),c=o(i,{locale:u}),d=a(n,{locale:u});return k.createElement("div",{className:"navds-date__caption"},k.createElement(Wn,{as:"span","aria-live":"polite","aria-atomic":"true",id:t,className:"navds-date__caption-label"},s(e,{locale:u})),k.createElement("div",{className:"navds-date__caption__month-wrapper"},k.createElement(Ne,{"aria-label":c,variant:"tertiary",disabled:!i,onClick:()=>i&&r(i),icon:k.createElement(vb,{title:"velg forrige måned"}),className:"navds-date__caption-button",type:"button"}),k.createElement(Ne,{"aria-label":d,icon:k.createElement(gb,{title:"velg neste måned"}),onClick:()=>n&&r(n),disabled:!n,variant:"tertiary",className:"navds-date__caption-button",type:"button"})))},$b=mA,gA=({displayMonth:e,id:t})=>{const{goToMonth:r,nextMonth:n,previousMonth:i}=wi(),{fromDate:o,toDate:a,formatters:{formatYearCaption:s,formatMonthCaption:u,formatCaption:c},labels:{labelPrevious:d,labelNext:f},locale:p}=ze();if(!o||!a)return console.warn("Using dropdownCaption required fromDate and toDate"),null;const m=I=>r(Ml(vt(e),Number(I.target.value))),g=I=>r(Sn(vt(e),Number(I.target.value))),h=hP(o,a),b=gP(o,a,e),_=d(i,{locale:p}),y=f(n,{locale:p}),S=bP(p),O=_P(p);return k.createElement("div",{className:"navds-date__caption-dropdown"},k.createElement("span",{"aria-live":"polite","aria-atomic":"true",id:t,className:"navds-sr-only"},c(e,{locale:p})),k.createElement(Ne,{"aria-label":_,variant:"tertiary",disabled:!i,onClick:()=>i&&r(i),icon:k.createElement(vb,{title:"velg forrige måned"}),className:"navds-date__caption-button",type:"button"}),k.createElement("div",{className:"navds-date__caption__month-wrapper"},k.createElement(Nn,{label:O,hideLabel:!0,className:"navds-date__caption__month",value:e.getMonth(),onChange:g},b.map(I=>k.createElement("option",{key:I.getMonth(),value:I.getMonth()},u(I,{locale:p})))),k.createElement(Nn,{label:S,hideLabel:!0,value:e.getFullYear(),onChange:m,className:"navds-date__caption__year"},h.map(I=>k.createElement("option",{key:I.getFullYear(),value:I.getFullYear()},s(I,{locale:p}))))),k.createElement(Ne,{"aria-label":y,icon:k.createElement(gb,{title:"velg neste måned"}),onClick:()=>n&&r(n),disabled:!n,variant:"tertiary",className:"navds-date__caption-button",type:"button"}))},Vb=gA;function Fb(){var e;const{classNames:t,styles:r,components:n}=ze(),i=(e=n==null?void 0:n.HeadRow)!==null&&e!==void 0?e:wb;return k.createElement("thead",{style:r.head,className:t.head,"aria-hidden":!0},k.createElement(i,null))}var hA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var r,{children:n,className:i,locale:o="nb",dropdownCaption:a,disabled:s=[],disableWeekends:u=!1,showWeekNumber:c=!1,selected:d,id:f,defaultSelected:p,onSelect:m,fixedWeeks:g=!0}=e,h=hA(e,["children","className","locale","dropdownCaption","disabled","disableWeekends","showWeekNumber","selected","id","defaultSelected","onSelect","fixedWeeks"]);const[b,_]=k.useState(p),y=T=>{_(T),m&&m(T)},S=T=>{_(T),m&&m(T)},O=T=>{_(T),m&&m(T)},I={mode:(r=h.mode)!==null&&r!==void 0?r:"single",onSelect:(h==null?void 0:h.mode)==="single"?y:(h==null?void 0:h.mode)==="multiple"?S:O};return k.createElement("div",{ref:t,className:ve("navds-date__standalone-wrapper",i)},k.createElement(Db,Object.assign({locale:Cu(o)},I,{selected:d??b,components:{Caption:a?Vb:$b,Head:Fb},className:"navds-date",classNames:{vhidden:"navds-sr-only"},disabled:T=>u&&gr(T)||Ur(T,s),weekStartsOn:1,initialFocus:!1,labels:Cb,modifiers:{weekend:T=>u&&gr(T)},modifiersClassNames:{weekend:"rdp-day__weekend"},showWeekNumber:c,fixedWeeks:g,showOutsideDays:!0},di(h,["onSelect"]))))}),kA=yA,bA=e=>{const t=v.useRef(null),r=Eb(e.date,e.displayMonth,t),{locale:n}=ze(),i=Ct(e.date,"cccc d",{locale:n});return r.isHidden?k.createElement(k.Fragment,null):r.isButton?k.createElement($o,Object.assign({name:"day",ref:t},r.buttonProps,{"aria-label":i,"aria-hidden":r.activeModifiers.outside})):k.createElement("div",Object.assign({},r.divProps))};var _A=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var r,{children:n,locale:i="nb",dropdownCaption:o,disabled:a=[],disableWeekends:s=!1,showWeekNumber:u=!1,selected:c,id:d,defaultSelected:f,className:p,wrapperClassName:m,open:g,onClose:h,onOpenToggle:b,strategy:_="absolute"}=e,y=_A(e,["children","locale","dropdownCaption","disabled","disableWeekends","showWeekNumber","selected","id","defaultSelected","className","wrapperClassName","open","onClose","onOpenToggle","strategy"]);const S=oa(d),[O,I]=v.useState(g??!1),T=v.useRef(null),[V,K]=k.useState(f),Y=N=>{var R;K(N),N&&((R=h==null?void 0:h())!==null&&R!==void 0||I(!1)),y!=null&&y.onSelect&&(y==null?void 0:y.onSelect)(N)},z=N=>{K(N),y!=null&&y.onSelect&&(y==null?void 0:y.onSelect)(N)},G=N=>{var R;K(N),N!=null&&N.from&&(N!=null&&N.to)&&((R=h==null?void 0:h())!==null&&R!==void 0||I(!1)),y!=null&&y.onSelect&&(y==null?void 0:y.onSelect)(N)},M={mode:(r=y.mode)!==null&&r!==void 0?r:"single",onSelect:(y==null?void 0:y.mode)==="single"?Y:(y==null?void 0:y.mode)==="multiple"?z:G};return k.createElement(Mb.Provider,{value:{open:g??O,onOpen:()=>{I(N=>!N),b==null||b()},ariaId:S}},k.createElement("div",{ref:T,className:ve("navds-date__wrapper",m)},n,(g??O)&&k.createElement(kp,{arrow:!1,anchorEl:T.current,open:g??O,onClose:()=>{var N;(N=h==null?void 0:h())!==null&&N!==void 0||I(!1)},placement:"bottom-start",id:S,role:"dialog",ref:t,strategy:_},k.createElement(Db,Object.assign({locale:Cu(i)},M,{selected:c??V,components:{Caption:o?Vb:$b,Day:bA,Head:Fb},className:ve("navds-date",p),classNames:{vhidden:"navds-sr-only"},disabled:N=>s&&gr(N)||Ur(N,a),weekStartsOn:1,initialFocus:!1,labels:Cb,modifiers:{weekend:N=>s&&gr(N)},modifiersClassNames:{weekend:"rdp-day__weekend"},showWeekNumber:u,fixedWeeks:!0,showOutsideDays:!0},di(y,["onSelect"]))))))});Av.Standalone=kA;Av.Input=vA;const No=Av;var wA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:t,titleId:r}=e,n=wA(e,["title","titleId"]);let i=oa();return i=t?r||"title-"+i:void 0,k.createElement("svg",Object.assign({width:"42",height:"64",viewBox:"0 0 42 64",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"NAV veileder illustrasjon",focusable:!1,role:"img","aria-labelledby":i},n),t?k.createElement("title",{id:i},t):null,k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.8313 30.4421C31.7718 33.868 29.6975 36.7117 27.0391 38.452L27.1752 39.9777L27.1745 40.0397L25.7375 52.6154H16.6236L16.5857 52.3512L14.8238 40.0181L14.8891 38.4756C12.2173 36.7398 10.1312 33.8914 9.06565 30.4564C9.02952 30.4598 8.99291 30.4616 8.95588 30.4616C8.26662 30.4616 7.72058 29.8614 7.72058 29.1343V25.0202C7.72058 24.5328 7.96592 24.1022 8.33526 23.8712C8.9115 16.1905 14.3251 10.1539 20.946 10.1539C27.5491 10.1539 32.9517 16.1579 33.5525 23.8089C33.9838 24.0179 34.2794 24.4845 34.2794 25.0202V29.1343C34.2794 29.8618 33.7341 30.4616 33.0441 30.4616C32.9714 30.4616 32.9003 30.4549 32.8313 30.4421Z",fill:"#F1F1F1"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.7182 38.8777C26.6663 41.624 24.1261 44.4415 21 44.4415C17.8604 44.4415 15.3116 41.5994 15.2813 38.8419C13.6546 39.2527 11.1714 40.4917 9.12177 42.5623C7.13699 44.5674 5.55884 47.5814 5.55884 49.9194V64H36.4412V49.9194C36.4412 47.5766 34.829 44.5575 32.8075 42.5501C30.7861 40.5427 28.3553 39.3204 26.7182 38.8777Z",fill:"#0056B4"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1786 38.9372C13.6802 39.4793 11.1664 40.6641 9.2647 42.4632C3.70588 41.2308 1.23529 38.3022 1.23529 38.3022C1.23529 38.3022 6.35673 33.325 6.35982 24.6197V24.6105C6.35982 14.4173 11.8831 7.38464 20.9827 7.38464C30.0836 7.38464 35.6068 14.4173 35.6068 24.6105H35.6396C35.6396 33.3219 40.7647 38.3022 40.7647 38.3022C40.7647 38.3022 38.2941 41.2308 32.7353 42.4616L32.7269 42.4632C30.8901 40.7984 28.2262 39.5144 26.7769 38.9715L26.7785 38.971L26.7209 38.3257L26.7521 38.2722C29.4867 36.5294 31.6086 33.5933 32.6316 30.0454C32.7569 30.1148 32.8983 30.1539 33.048 30.1539C33.5601 30.1539 33.9746 29.6984 33.9746 29.1343V25.0202C33.9746 24.5375 33.6712 24.134 33.2628 24.0275C33.2624 24.0219 33.262 24.0164 33.2616 24.0108C20.3323 25.4483 15.6749 16.616 15.2926 16.6154C15.2926 16.6154 10.9987 19.6923 8.94657 23.3506C8.94657 23.3506 8.6338 24.0412 8.63228 24.0644C8.28095 24.2092 8.03035 24.5821 8.03035 25.0202V29.1343C8.03035 29.6984 8.44586 30.1539 8.95693 30.1539C9.07019 30.1539 9.17868 30.1316 9.27895 30.0908C10.3132 33.6404 12.4486 36.5733 15.1961 38.3046L15.2063 38.3257L15.1804 38.9372H15.1786Z",fill:"#D05C4A"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.584 26.9976C15.7859 27.062 15.5625 25.8029 15.803 24.9807C15.8482 24.8249 16.1124 24.1154 16.5802 24.1154C17.0473 24.1154 17.2536 24.5032 17.2823 24.5699C17.6259 25.3715 17.4571 26.9268 16.584 26.9976",fill:"#262626"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.8405 26.9976C26.6386 27.062 26.862 25.8029 26.6215 24.9807C26.5763 24.8249 26.3121 24.1154 25.8444 24.1154C25.3772 24.1154 25.171 24.5032 25.1423 24.5699C24.7987 25.3715 24.9674 26.9268 25.8405 26.9976",fill:"#262626"}),k.createElement("path",{d:"M21.5081 28.2384C21.9854 28.157 22.3113 28.2081 22.428 28.3669C22.8687 28.9672 22.7277 29.6023 21.9718 30.1237C21.5744 30.3977 21.0273 30.4942 20.7377 30.3521C20.596 30.2826 20.4304 30.3536 20.3677 30.5106C20.3051 30.6676 20.3691 30.8512 20.5107 30.9207C20.9894 31.1555 21.7255 31.0257 22.268 30.6517C23.2953 29.9431 23.5304 28.8837 22.863 27.9743C22.5805 27.59 22.0806 27.5116 21.4228 27.6239C21.2697 27.65 21.1647 27.8088 21.1883 27.9784C21.2118 28.1481 21.355 28.2645 21.5081 28.2384Z",fill:"#262626"}),k.createElement("path",{d:"M24.9595 32.3642C24.9315 32.4234 24.8672 32.5367 24.7639 32.686C24.589 32.9386 24.3694 33.1919 24.1027 33.4281C23.3079 34.1319 22.2735 34.5389 20.9568 34.5017C19.673 34.4654 18.6432 34.0647 17.8358 33.4185C17.5393 33.1813 17.2946 32.9272 17.0989 32.6739C16.9836 32.5246 16.9115 32.4114 16.88 32.3523C16.8043 32.2104 16.618 32.152 16.464 32.2218C16.31 32.2917 16.2466 32.4634 16.3224 32.6053C16.3681 32.6908 16.4569 32.8304 16.5927 33.0062C16.8156 33.2948 17.0928 33.5826 17.4283 33.8511C18.3398 34.5805 19.5046 35.0338 20.9378 35.0743C22.4302 35.1165 23.6233 34.6471 24.5333 33.8412C24.8376 33.5717 25.0877 33.2832 25.2878 32.9941C25.4095 32.8183 25.4887 32.6787 25.5291 32.5934C25.5977 32.4485 25.5259 32.2796 25.3686 32.2163C25.2113 32.153 25.0282 32.2192 24.9595 32.3642Z",fill:"#262626"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.1651 58H21.8343C21.3733 58 21 57.621 21 57.153V51.5143C21 51.0462 21.3733 50.6667 21.8343 50.6667H32.1651C32.6261 50.6667 33 51.0462 33 51.5143V57.153C33 57.621 32.6261 58 32.1651 58",fill:"white"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.6207 51.8307H26.5502C26.4709 51.8307 26.407 51.7671 26.407 51.6882V51.5086C26.407 51.4303 26.4709 51.3661 26.5502 51.3661H27.6207C27.7 51.3661 27.764 51.4303 27.764 51.5086V51.6882C27.764 51.7671 27.7 51.8307 27.6207 51.8307",fill:"#262626"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.7756 51.6667H27.3958V50H26.7756V51.6667Z",fill:"#6A6A6A"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.1269 56.6651C25.839 56.6651 24.7947 55.6208 24.7947 54.3327C24.7947 53.0444 25.839 52 27.1269 52C28.4153 52 29.4597 53.0444 29.4597 54.3327C29.4597 55.6208 28.4153 56.6651 27.1269 56.6651Z",fill:"#C30000"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.6667 55.3511L24.1434 54.1712H24.6015L24.1254 55.3511H23.6667Z",fill:"#C30000"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.5496 55.3511L30.0202 54.1712H30.2699L29.7993 55.3511H29.5496Z",fill:"#C30000"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M30.4752 55.3511L30.9457 54.1712H31.0783L30.6077 55.3511H30.4752Z",fill:"#C30000"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.1165 54.1712H28.7019C28.7019 54.1712 28.6733 54.1712 28.6632 54.1964L28.4337 54.8989L28.2044 54.1964C28.1943 54.1712 28.1656 54.1712 28.1656 54.1712H27.3683C27.3511 54.1712 27.3366 54.1856 27.3366 54.2028V54.4413C27.3366 54.2521 27.1352 54.1712 27.0173 54.1712C26.7533 54.1712 26.5765 54.3451 26.5215 54.6095C26.5185 54.4341 26.5039 54.3713 26.4567 54.3069C26.435 54.2754 26.4036 54.2489 26.3695 54.2269C26.2991 54.1857 26.236 54.1712 26.1003 54.1712H25.9409C25.9409 54.1712 25.9121 54.1712 25.9019 54.1964L25.7569 54.5558V54.2028C25.7569 54.1856 25.7426 54.1712 25.7253 54.1712H25.3566C25.3566 54.1712 25.3281 54.1712 25.3178 54.1964L25.167 54.5701C25.167 54.5701 25.152 54.6074 25.1864 54.6074H25.3281V55.3194C25.3281 55.3371 25.342 55.3511 25.3598 55.3511H25.7253C25.7426 55.3511 25.7569 55.3371 25.7569 55.3194V54.6074H25.8994C25.9812 54.6074 25.9985 54.6097 26.0303 54.6245C26.0495 54.6317 26.0667 54.6464 26.0762 54.6632C26.0954 54.6995 26.1003 54.7431 26.1003 54.8716V55.3194C26.1003 55.3371 26.1145 55.3511 26.132 55.3511H26.4823C26.4823 55.3511 26.5219 55.3511 26.5376 55.312L26.6152 55.1201C26.7185 55.2647 26.8884 55.3511 27.0996 55.3511H27.1458C27.1458 55.3511 27.1856 55.3511 27.2014 55.312L27.3366 54.9771V55.3194C27.3366 55.3371 27.3511 55.3511 27.3683 55.3511H27.726C27.726 55.3511 27.7654 55.3511 27.7813 55.312C27.7813 55.312 27.9243 54.9569 27.9249 54.9542H27.9251C27.9306 54.9246 27.8933 54.9246 27.8933 54.9246H27.7656V54.3153L28.1672 55.312C28.1829 55.3511 28.2225 55.3511 28.2225 55.3511H28.645C28.645 55.3511 28.6847 55.3511 28.7004 55.312L29.1457 54.2094C29.1611 54.1712 29.1165 54.1712 29.1165 54.1712V54.1712ZM27.3366 54.9246H27.0964C27.0007 54.9246 26.9229 54.8472 26.9229 54.7515C26.9229 54.6559 27.0007 54.578 27.0964 54.578H27.1635C27.2589 54.578 27.3366 54.6559 27.3366 54.7515V54.9246Z",fill:"white"}))};var SA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,illustration:n,size:i="medium",color:o}=e,a=SA(e,["className","illustration","size","color"]);return k.createElement("div",Object.assign({ref:t,className:ve("navds-guide",r)},a),k.createElement("div",{className:ve("navds-guide__illustration",`navds-guide__illustration--${i}`)},n??k.createElement(xA,null)))}),TA=jA;var OA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,className:n,illustration:i,poster:o=!1,color:a}=e,s=OA(e,["children","className","illustration","poster","color"]);return k.createElement("div",Object.assign({},s,{ref:t,className:ve("navds-guide-panel",n,{"navds-guide-panel--poster":o})}),k.createElement(TA,{size:o?"medium":"small",illustration:i}),k.createElement("div",{className:"navds-guide-panel__content"},r))}),DA=EA;var IA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,children:n,placement:i="top",strategy:o="absolute",title:a="hjelp",onClick:s}=e,u=IA(e,["className","children","placement","strategy","title","onClick"]);const c=v.useRef(null),d=v.useMemo(()=>Jp([c,t]),[t]),[f,p]=v.useState(!1);return k.createElement("div",{className:"navds-help-text"},k.createElement("button",Object.assign({},u,{ref:d,onClick:m=>{p(g=>!g),s==null||s(m)},className:ve(r,"navds-help-text__button"),type:"button","aria-expanded":f}),k.createElement(C5,{className:"navds-help-text__icon",title:a}),k.createElement($5,{className:"navds-help-text__icon navds-help-text__icon--filled",title:a})),k.createElement(kp,{onClose:()=>p(!1),className:"navds-help-text__popover",open:f,anchorEl:c.current,placement:i,strategy:o},k.createElement(kp.Content,{className:"navds-body-short"},n)))}),Mu=RA;var NA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{as:r="a",className:n}=e,i=NA(e,["as","className"]);return k.createElement(r,Object.assign({},i,{ref:t,className:ve("navds-link",n)}))}),ct=PA;var AA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,as:n="div"}=e,i=AA(e,["className","as"]);return k.createElement(n,Object.assign({},i,{ref:t,className:ve("navds-link-panel__title","navds-heading","navds-heading--medium",r)}))});var MA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r}=e,n=MA(e,["className"]);return k.createElement(cn,Object.assign({},n,{as:"div",ref:t,className:ve("navds-link-panel__description",r)}))});var $A=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,as:n="a",border:i=!0,className:o}=e,a=$A(e,["children","as","border","className"]);return k.createElement(zA,Object.assign({},a,{as:n,border:i,ref:t,className:ve("navds-link-panel",o)}),k.createElement("div",{className:"navds-link-panel__content"},r),k.createElement(mb,{className:"navds-link-panel__chevron","aria-hidden":!0}))}),Cv=VA;Cv.Title=CA;Cv.Description=LA;const mp=Cv;var FA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,as:n="button",selected:i=!1,className:o}=e,a=FA(e,["children","as","selected","className"]);return k.createElement(Ne,Object.assign({as:n,variant:"tertiary","aria-current":i,ref:t,className:ve("navds-pagination__item",o,{"navds-pagination__item--selected":i})},n==="button"&&{type:"button"},a),r)}),Hb=HA;var UA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var i,o;const a=(f,p)=>Array.from({length:p-f+1},(m,g)=>f+g);if(t<=(r+n)*2+3)return a(1,t);const s=a(1,r),u=a(t-r+1,t),c=Math.max(Math.min(e-n,t-r-n*2-1),r+2),d=c+n*2;return[...s,c-((i=s[s.length-1])!==null&&i!==void 0?i:0)===2?c-1:"ellipsis",...a(c,d),((o=u[0])!==null&&o!==void 0?o:t+1)-d===2?d+1:"ellipsis",...u]},Ub=v.forwardRef((e,t)=>{var{page:r,onPageChange:n,count:i,boundaryCount:o=1,siblingCount:a=1,className:s,size:u="medium",prevNextTexts:c=!1,renderItem:d=p=>k.createElement(Hb,Object.assign({},p))}=e,f=UA(e,["page","onPageChange","count","boundaryCount","siblingCount","className","size","prevNextTexts","renderItem"]);return r<1?(console.error("page cannot be less than 1"),null):i<1?(console.error("count cannot be less than 1"),null):o<0?(console.error("boundaryCount cannot be less than 0"),null):a<0?(console.error("siblingCount cannot be less than 0"),null):k.createElement("nav",Object.assign({ref:t},f,{className:ve("navds-pagination",`navds-pagination--${u}`,s)}),k.createElement("ul",{className:"navds-pagination__list"},k.createElement("li",null,k.createElement(d,{className:ve("navds-pagination__prev-next",{"navds-pagination--invisible":r===1,"navds-pagination--prev-next--with-text":c}),disabled:r===1,onClick:()=>n==null?void 0:n(r-1),page:r-1,size:u,icon:k.createElement(_5,Object.assign({className:"navds-pagination__prev-next-icon"},c?{"aria-hidden":!0}:{title:"Forrige"}))},c&&k.createElement(ce,{size:u==="xsmall"?"small":u,className:"navds-pagination__prev-text"},"Forrige"))),BA({page:r,count:i,siblingCount:a,boundaryCount:o}).map((p,m)=>{const g=Number(p);return isNaN(g)?k.createElement("li",{className:"navds-pagination__ellipsis",key:`${p}${m}`},k.createElement(ce,{size:u==="xsmall"?"small":u},"...")):k.createElement("li",{key:p},k.createElement(d,{onClick:()=>n==null?void 0:n(g),selected:r===g,page:g,size:u},k.createElement(ce,{size:u==="xsmall"?"small":u},g)))}),k.createElement("li",null,k.createElement(d,{className:ve("navds-pagination__prev-next",{"navds-pagination--invisible":r===i,"navds-pagination--prev-next--with-text":c}),disabled:r===i,onClick:()=>n==null?void 0:n(r+1),page:r+1,size:u,icon:k.createElement(mb,Object.assign({className:"navds-pagination__prev-next-icon"},c?{"aria-hidden":!0}:{title:"Neste"})),iconPosition:"right"},c&&k.createElement(ce,{size:u==="xsmall"?"small":u,className:"navds-pagination__next-text"},"Neste")))))});Ub.Item=Hb;const Lu=Ub;var KA=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{children:r,className:n,border:i=!1,as:o="div"}=e,a=KA(e,["children","className","border","as"]);return k.createElement(o,Object.assign({ref:t,className:ve("navds-panel",n,{"navds-panel--border":i})},a),r)}),zA=WA;function pa(e){return e.split("-")[1]}function Mv(e){return e==="y"?"height":"width"}function li(e){return e.split("-")[0]}function va(e){return["top","bottom"].includes(li(e))?"x":"y"}function Ch(e,t,r){let{reference:n,floating:i}=e;const o=n.x+n.width/2-i.width/2,a=n.y+n.height/2-i.height/2,s=va(t),u=Mv(s),c=n[u]/2-i[u]/2,d=s==="x";let f;switch(li(t)){case"top":f={x:o,y:n.y-i.height};break;case"bottom":f={x:o,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:a};break;case"left":f={x:n.x-i.width,y:a};break;default:f={x:n.x,y:n.y}}switch(pa(t)){case"start":f[s]-=c*(r&&d?-1:1);break;case"end":f[s]+=c*(r&&d?-1:1)}return f}const qA=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=Ch(c,n,u),p=n,m={},g=0;for(let h=0;h({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:i,y:o,placement:a,rects:s,platform:u,elements:c}=t;if(r==null)return{};const d=Bb(n),f={x:i,y:o},p=va(a),m=Mv(p),g=await u.getDimensions(r),h=p==="y",b=h?"top":"left",_=h?"bottom":"right",y=h?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[p]-f[p]-s.floating[m],O=f[p]-s.reference[p],I=await(u.getOffsetParent==null?void 0:u.getOffsetParent(r));let T=I?I[y]:0;T&&await(u.isElement==null?void 0:u.isElement(I))||(T=c.floating[y]||s.floating[m]);const V=S/2-O/2,K=d[b],Y=T-g[m]-d[_],z=T/2-g[m]/2+V,G=gp(K,z,Y),M=pa(a)!=null&&z!=G&&s.reference[m]/2-(ze.concat(t,t+"-start",t+"-end"),[]);const XA={left:"right",right:"left",bottom:"top",top:"bottom"};function Fl(e){return e.replace(/left|right|bottom|top/g,t=>XA[t])}function JA(e,t,r){r===void 0&&(r=!1);const n=pa(e),i=va(e),o=Mv(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Fl(a)),{main:a,cross:Fl(a)}}const QA={start:"end",end:"start"};function md(e){return e.replace(/start|end/g,t=>QA[t])}const eC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...h}=e,b=li(n),_=li(a)===a,y=await(s.isRTL==null?void 0:s.isRTL(u.floating)),S=f||(_||!g?[Fl(a)]:function(G){const M=Fl(G);return[md(G),M,md(M)]}(a));f||m==="none"||S.push(...function(G,M,N,R){const w=pa(G);let E=function(B,Q,A){const be=["left","right"],D=["right","left"],L=["top","bottom"],P=["bottom","top"];switch(B){case"top":case"bottom":return A?Q?D:be:Q?be:D;case"left":case"right":return Q?L:P;default:return[]}}(li(G),N==="start",R);return w&&(E=E.map(B=>B+"-"+w),M&&(E=E.concat(E.map(md)))),E}(a,g,m,y));const O=[a,...S],I=await Kb(t,h),T=[];let V=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(I[b]),d){const{main:G,cross:M}=JA(n,o,y);T.push(I[G],I[M])}if(V=[...V,{placement:n,overflows:T}],!T.every(G=>G<=0)){var K,Y;const G=(((K=i.flip)==null?void 0:K.index)||0)+1,M=O[G];if(M)return{data:{index:G,overflows:V},reset:{placement:M}};let N=(Y=V.filter(R=>R.overflows[0]<=0).sort((R,w)=>R.overflows[1]-w.overflows[1])[0])==null?void 0:Y.placement;if(!N)switch(p){case"bestFit":{var z;const R=(z=V.map(w=>[w.placement,w.overflows.filter(E=>E>0).reduce((E,B)=>E+B,0)]).sort((w,E)=>w[1]-E[1])[0])==null?void 0:z[0];R&&(N=R);break}case"initialPlacement":N=a}if(n!==N)return{reset:{placement:N}}}return{}}}},tC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,i=await async function(o,a){const{placement:s,platform:u,elements:c}=o,d=await(u.isRTL==null?void 0:u.isRTL(c.floating)),f=li(s),p=pa(s),m=va(s)==="x",g=["left","top"].includes(f)?-1:1,h=d&&m?-1:1,b=typeof a=="function"?a(o):a;let{mainAxis:_,crossAxis:y,alignmentAxis:S}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return p&&typeof S=="number"&&(y=p==="end"?-1*S:S),m?{x:y*h,y:_*g}:{x:_*g,y:y*h}}(t,e);return{x:r+i.x,y:n+i.y,data:i}}}};function rC(e){return e==="x"?"y":"x"}const nC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:_,y}=b;return{x:_,y}}},...u}=e,c={x:r,y:n},d=await Kb(t,u),f=va(li(i)),p=rC(f);let m=c[f],g=c[p];if(o){const b=f==="y"?"bottom":"right";m=gp(m+d[f==="y"?"top":"left"],m,m-d[b])}if(a){const b=p==="y"?"bottom":"right";g=gp(g+d[p==="y"?"top":"left"],g,g-d[b])}const h=s.fn({...t,[f]:m,[p]:g});return{...h,data:{x:h.x-r,y:h.y-n}}}}};function Xt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Br(e){return Xt(e).getComputedStyle(e)}const Lh=Math.min,Po=Math.max,Hl=Math.round;function Wb(e){const t=Br(e);let r=parseFloat(t.width),n=parseFloat(t.height);const i=e.offsetWidth,o=e.offsetHeight,a=Hl(r)!==i||Hl(n)!==o;return a&&(r=i,n=o),{width:r,height:n,fallback:a}}function An(e){return qb(e)?(e.nodeName||"").toLowerCase():""}let Wa;function zb(){if(Wa)return Wa;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Wa=e.brands.map(t=>t.brand+"/"+t.version).join(" "),Wa):navigator.userAgent}function hr(e){return e instanceof Xt(e).HTMLElement}function yr(e){return e instanceof Xt(e).Element}function qb(e){return e instanceof Xt(e).Node}function $h(e){return typeof ShadowRoot>"u"?!1:e instanceof Xt(e).ShadowRoot||e instanceof ShadowRoot}function $u(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=Br(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function iC(e){return["table","td","th"].includes(An(e))}function hp(e){const t=/firefox/i.test(zb()),r=Br(e),n=r.backdropFilter||r.WebkitBackdropFilter;return r.transform!=="none"||r.perspective!=="none"||!!n&&n!=="none"||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"||["transform","perspective"].some(i=>r.willChange.includes(i))||["paint","layout","strict","content"].some(i=>{const o=r.contain;return o!=null&&o.includes(i)})}function yp(){return/^((?!chrome|android).)*safari/i.test(zb())}function Lv(e){return["html","body","#document"].includes(An(e))}function Yb(e){return yr(e)?e:e.contextElement}const Gb={x:1,y:1};function Ui(e){const t=Yb(e);if(!hr(t))return Gb;const r=t.getBoundingClientRect(),{width:n,height:i,fallback:o}=Wb(t);let a=(o?Hl(r.width):r.width)/n,s=(o?Hl(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function vi(e,t,r,n){var i,o;t===void 0&&(t=!1),r===void 0&&(r=!1);const a=e.getBoundingClientRect(),s=Yb(e);let u=Gb;t&&(n?yr(n)&&(u=Ui(n)):u=Ui(e));const c=s?Xt(s):window,d=yp()&&r;let f=(a.left+(d&&((i=c.visualViewport)==null?void 0:i.offsetLeft)||0))/u.x,p=(a.top+(d&&((o=c.visualViewport)==null?void 0:o.offsetTop)||0))/u.y,m=a.width/u.x,g=a.height/u.y;if(s){const h=Xt(s),b=n&&yr(n)?Xt(n):n;let _=h.frameElement;for(;_&&n&&b!==h;){const y=Ui(_),S=_.getBoundingClientRect(),O=getComputedStyle(_);S.x+=(_.clientLeft+parseFloat(O.paddingLeft))*y.x,S.y+=(_.clientTop+parseFloat(O.paddingTop))*y.y,f*=y.x,p*=y.y,m*=y.x,g*=y.y,f+=S.x,p+=S.y,_=Xt(_).frameElement}}return Vl({width:m,height:g,x:f,y:p})}function On(e){return((qb(e)?e.ownerDocument:e.document)||window.document).documentElement}function Vu(e){return yr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Zb(e){return vi(On(e)).left+Vu(e).scrollLeft}function Vo(e){if(An(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$h(e)&&e.host||On(e);return $h(t)?t.host:t}function Xb(e){const t=Vo(e);return Lv(t)?t.ownerDocument.body:hr(t)&&$u(t)?t:Xb(t)}function En(e,t){var r;t===void 0&&(t=[]);const n=Xb(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Xt(n);return i?t.concat(o,o.visualViewport||[],$u(n)?n:[]):t.concat(n,En(n))}function Vh(e,t,r){let n;if(t==="viewport")n=function(a,s){const u=Xt(a),c=On(a),d=u.visualViewport;let f=c.clientWidth,p=c.clientHeight,m=0,g=0;if(d){f=d.width,p=d.height;const h=yp();(!h||h&&s==="fixed")&&(m=d.offsetLeft,g=d.offsetTop)}return{width:f,height:p,x:m,y:g}}(e,r);else if(t==="document")n=function(a){const s=On(a),u=Vu(a),c=a.ownerDocument.body,d=Po(s.scrollWidth,s.clientWidth,c.scrollWidth,c.clientWidth),f=Po(s.scrollHeight,s.clientHeight,c.scrollHeight,c.clientHeight);let p=-u.scrollLeft+Zb(a);const m=-u.scrollTop;return Br(c).direction==="rtl"&&(p+=Po(s.clientWidth,c.clientWidth)-d),{width:d,height:f,x:p,y:m}}(On(e));else if(yr(t))n=function(a,s){const u=vi(a,!0,s==="fixed"),c=u.top+a.clientTop,d=u.left+a.clientLeft,f=hr(a)?Ui(a):{x:1,y:1};return{width:a.clientWidth*f.x,height:a.clientHeight*f.y,x:d*f.x,y:c*f.y}}(t,r);else{const a={...t};if(yp()){var i,o;const s=Xt(e);a.x-=((i=s.visualViewport)==null?void 0:i.offsetLeft)||0,a.y-=((o=s.visualViewport)==null?void 0:o.offsetTop)||0}n=a}return Vl(n)}function Fh(e,t){return hr(e)&&Br(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Hh(e,t){const r=Xt(e);if(!hr(e))return r;let n=Fh(e,t);for(;n&&iC(n)&&Br(n).position==="static";)n=Fh(n,t);return n&&(An(n)==="html"||An(n)==="body"&&Br(n).position==="static"&&!hp(n))?r:n||function(i){let o=Vo(i);for(;hr(o)&&!Lv(o);){if(hp(o))return o;o=Vo(o)}return null}(e)||r}function oC(e,t,r){const n=hr(t),i=On(t),o=vi(e,!0,r==="fixed",t);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((An(t)!=="body"||$u(i))&&(a=Vu(t)),hr(t)){const u=vi(t,!0);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else i&&(s.x=Zb(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}const aC={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=r==="clippingAncestors"?function(c,d){const f=d.get(c);if(f)return f;let p=En(c).filter(b=>yr(b)&&An(b)!=="body"),m=null;const g=Br(c).position==="fixed";let h=g?Vo(c):c;for(;yr(h)&&!Lv(h);){const b=Br(h),_=hp(h);b.position==="fixed"?m=null:(g?_||m:_||b.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=b:p=p.filter(y=>y!==h),h=Vo(h)}return d.set(c,p),p}(t,this._c):[].concat(r),a=[...o,n],s=a[0],u=a.reduce((c,d)=>{const f=Vh(t,d,i);return c.top=Po(f.top,c.top),c.right=Lh(f.right,c.right),c.bottom=Lh(f.bottom,c.bottom),c.left=Po(f.left,c.left),c},Vh(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const i=hr(r),o=On(r);if(r===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const u={x:0,y:0};if((i||!i&&n!=="fixed")&&((An(r)!=="body"||$u(o))&&(a=Vu(r)),hr(r))){const c=vi(r);s=Ui(r),u.x=c.x+r.clientLeft,u.y=c.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+u.x,y:t.y*s.y-a.scrollTop*s.y+u.y}},isElement:yr,getDimensions:function(e){return hr(e)?Wb(e):e.getBoundingClientRect()},getOffsetParent:Hh,getDocumentElement:On,getScale:Ui,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const i=this.getOffsetParent||Hh,o=this.getDimensions;return{reference:oC(t,await i(r),n),floating:{x:0,y:0,...await o(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Br(e).direction==="rtl"};function sC(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=n,u=i&&!s,c=u||o?[...yr(e)?En(e):e.contextElement?En(e.contextElement):[],...En(t)]:[];c.forEach(m=>{u&&m.addEventListener("scroll",r,{passive:!0}),o&&m.addEventListener("resize",r)});let d,f=null;if(a){let m=!0;f=new ResizeObserver(()=>{m||r(),m=!1}),yr(e)&&!s&&f.observe(e),yr(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t)}let p=s?vi(e):null;return s&&function m(){const g=vi(e);!p||g.x===p.x&&g.y===p.y&&g.width===p.width&&g.height===p.height||r(),p=g,d=requestAnimationFrame(m)}(),r(),()=>{var m;c.forEach(g=>{u&&g.removeEventListener("scroll",r),o&&g.removeEventListener("resize",r)}),(m=f)==null||m.disconnect(),f=null,s&&cancelAnimationFrame(d)}}const lC=(e,t,r)=>{const n=new Map,i={platform:aC,...r},o={...i.platform,_c:n};return qA(e,t,{...i,platform:o})},uC=e=>{const{element:t,padding:r}=e;function n(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return n(t)?t.current!=null?Mh({element:t.current,padding:r}).fn(i):{}:t?Mh({element:t,padding:r}).fn(i):{}}}};var Bs=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Ul(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ul(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!Ul(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Uh(e){const t=v.useRef(e);return Bs(()=>{t.current=e}),t}function cC(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,whileElementsMounted:o,open:a}=e,[s,u]=v.useState({x:null,y:null,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[c,d]=v.useState(n);Ul(c,n)||d(n);const f=v.useRef(null),p=v.useRef(null),m=v.useRef(s),g=Uh(o),h=Uh(i),[b,_]=v.useState(null),[y,S]=v.useState(null),O=v.useCallback(z=>{f.current!==z&&(f.current=z,_(z))},[]),I=v.useCallback(z=>{p.current!==z&&(p.current=z,S(z))},[]),T=v.useCallback(()=>{if(!f.current||!p.current)return;const z={placement:t,strategy:r,middleware:c};h.current&&(z.platform=h.current),lC(f.current,p.current,z).then(G=>{const M={...G,isPositioned:!0};V.current&&!Ul(m.current,M)&&(m.current=M,jk.flushSync(()=>{u(M)}))})},[c,t,r,h]);Bs(()=>{a===!1&&m.current.isPositioned&&(m.current.isPositioned=!1,u(z=>({...z,isPositioned:!1})))},[a]);const V=v.useRef(!1);Bs(()=>(V.current=!0,()=>{V.current=!1}),[]),Bs(()=>{if(b&&y){if(g.current)return g.current(b,y,T);T()}},[b,y,T,g]);const K=v.useMemo(()=>({reference:f,floating:p,setReference:O,setFloating:I}),[O,I]),Y=v.useMemo(()=>({reference:b,floating:y}),[b,y]);return v.useMemo(()=>({...s,update:T,refs:K,elements:Y,reference:O,floating:I}),[s,T,K,Y,O,I])}var dC=typeof document<"u"?v.useLayoutEffect:v.useEffect;function fC(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(i=>i(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){e.set(t,(e.get(t)||[]).filter(n=>n!==r))}}}const pC=v.createContext(null),vC=v.createContext(null),mC=()=>{var e;return((e=v.useContext(pC))==null?void 0:e.id)||null},Jb=()=>v.useContext(vC);function Qb(e){return(e==null?void 0:e.ownerDocument)||document}function gC(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function hC(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function e0(e){return Qb(e).defaultView||window}function oi(e){return e?e instanceof e0(e).Element:!1}function $v(e){return e?e instanceof e0(e).HTMLElement:!1}function yC(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(gC())||t.test(hC()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function kC(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 Bh(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function gd(e,t){let r=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)})||[],n=r;for(;n.length;)n=e.filter(i=>{var o;return(o=n)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})})||[],r=r.concat(n);return r}function bC(e){return"composedPath"in e?e.composedPath()[0]:e.target}const _C="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function wC(e){return $v(e)&&e.matches(_C)}const xC=tl["useInsertionEffect".toString()],SC=xC||(e=>e());function t0(e){const t=v.useRef(()=>{});return SC(()=>{t.current=e}),v.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;ia?{reference:{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){p.button===0&&(Bh(f.current,!0)&&c||s!=="click"&&(r?u&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")&&n(!1):(p.preventDefault(),n(!0)),i.current.openEvent=p.nativeEvent))},onClick(p){if(!i.current.__syncReturnFocus){if(s==="mousedown"&&f.current){f.current=void 0;return}Bh(f.current,!0)&&c||(r?u&&(!i.current.openEvent||i.current.openEvent.type==="click")&&n(!1):n(!0),i.current.openEvent=p.nativeEvent)}},onKeyDown(p){f.current=void 0,d&&(Kh(p)||(p.key===" "&&!Wh(o.domReference.current)&&p.preventDefault(),p.key==="Enter"&&(r?u&&n(!1):n(!0))))},onKeyUp(p){d&&(Kh(p)||Wh(o.domReference.current)||p.key===" "&&(r?u&&n(!1):n(!0)))}}}:{},[a,i,s,c,d,o,u,r,n])};function hd(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}const TC={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},OC={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},EC=function(e){var t,r;return e===void 0&&(e=!0),{escapeKeyBubbles:typeof e=="boolean"?e:(t=e.escapeKey)!=null?t:!0,outsidePressBubbles:typeof e=="boolean"?e:(r=e.outsidePress)!=null?r:!0}},DC=function(e,t){let{open:r,onOpenChange:n,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:u}}=e,{enabled:c=!0,escapeKey:d=!0,outsidePress:f=!0,outsidePressEvent:p="pointerdown",referencePress:m=!1,referencePressEvent:g="pointerdown",ancestorScroll:h=!1,bubbles:b=!0}=t===void 0?{}:t;const _=Jb(),y=mC()!=null,S=t0(typeof f=="function"?f:()=>!1),O=typeof f=="function"?S:f,I=v.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:V}=EC(b);return v.useEffect(()=>{if(!r||!c)return;function K(N){if(N.key==="Escape"){if(!T&&_&&gd(_.nodesRef.current,o).length>0)return;i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1)}}function Y(N){const R=I.current;if(I.current=!1,R||typeof O=="function"&&!O(N))return;const w=bC(N);if($v(w)&&u){const B=u.ownerDocument.defaultView||window,Q=w.scrollWidth>w.clientWidth,A=w.scrollHeight>w.clientHeight;let be=A&&N.offsetX>w.clientWidth;if(A&&B.getComputedStyle(w).direction==="rtl"&&(be=N.offsetX<=w.offsetWidth-w.clientWidth),be||Q&&N.offsetY>w.clientHeight)return}const E=_&&gd(_.nodesRef.current,o).some(B=>{var Q;return hd(N,(Q=B.context)==null?void 0:Q.elements.floating)});hd(N,u)||hd(N,s)||E||!V&&_&&gd(_.nodesRef.current,o).length>0||(i.emit("dismiss",{type:"outsidePress",data:{returnFocus:y?{preventScroll:!0}:yC(N)||kC(N)}}),n(!1))}function z(){n(!1)}const G=Qb(u);d&&G.addEventListener("keydown",K),O&&G.addEventListener(p,Y);let M=[];return h&&(oi(s)&&(M=En(s)),oi(u)&&(M=M.concat(En(u))),!oi(a)&&a&&a.contextElement&&(M=M.concat(En(a.contextElement)))),M=M.filter(N=>{var R;return N!==((R=G.defaultView)==null?void 0:R.visualViewport)}),M.forEach(N=>{N.addEventListener("scroll",z,{passive:!0})}),()=>{d&&G.removeEventListener("keydown",K),O&&G.removeEventListener(p,Y),M.forEach(N=>{N.removeEventListener("scroll",z)})}},[u,s,a,d,O,p,i,_,o,r,n,h,c,T,V,y]),v.useEffect(()=>{I.current=!1},[O,p]),v.useMemo(()=>c?{reference:{[TC[g]]:()=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1))}},floating:{[OC[p]]:()=>{I.current=!0}}}:{},[c,i,m,p,g,n])};function IC(e){e===void 0&&(e={});const{open:t=!1,onOpenChange:r,nodeId:n}=e,i=cC(e),o=Jb(),a=v.useRef(null),s=v.useRef({}),u=v.useState(()=>fC())[0],[c,d]=v.useState(null),f=v.useCallback(_=>{const y=oi(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;i.refs.setReference(y)},[i.refs]),p=v.useCallback(_=>{(oi(_)||_===null)&&(a.current=_,d(_)),(oi(i.refs.reference.current)||i.refs.reference.current===null||_!==null&&!oi(_))&&i.refs.setReference(_)},[i.refs]),m=v.useMemo(()=>({...i.refs,setReference:p,setPositionReference:f,domReference:a}),[i.refs,p,f]),g=v.useMemo(()=>({...i.elements,domReference:c}),[i.elements,c]),h=t0(r),b=v.useMemo(()=>({...i,refs:m,elements:g,dataRef:s,nodeId:n,events:u,open:t,onOpenChange:h}),[i,n,u,t,h,m,g]);return dC(()=>{const _=o==null?void 0:o.nodesRef.current.find(y=>y.id===n);_&&(_.context=b)}),v.useMemo(()=>({...i,context:b,refs:m,reference:p,positionReference:f}),[i,m,b,p,f])}function yd(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[r]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,u]=a;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof u=="function"){var c;(c=n.get(s))==null||c.push(u),i[s]=function(){for(var d,f=arguments.length,p=new Array(f),m=0;mg(...p))}}}else i[s]=u}),i),{})}}const RC=function(e){e===void 0&&(e=[]);const t=e,r=v.useCallback(o=>yd(o,e,"reference"),t),n=v.useCallback(o=>yd(o,e,"floating"),t),i=v.useCallback(o=>yd(o,e,"item"),t);return v.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:i}),[r,n,i])};var NC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r}=e,n=NC(e,["className"]);return k.createElement("div",Object.assign({},n,{ref:t,className:ve("navds-popover__content",r)}))}),AC=PC;var CC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,children:n,anchorEl:i,arrow:o=!0,open:a,onClose:s,placement:u="top",offset:c,strategy:d="absolute"}=e,f=CC(e,["className","children","anchorEl","arrow","open","onClose","placement","offset","strategy"]);const p=v.useRef(null),{x:m,y:g,reference:h,floating:b,strategy:_,context:y,update:S,refs:O,placement:I,middlewareData:{arrow:{x:T,y:V}={}}}=IC({strategy:d,placement:u,open:a,onOpenChange:s,middleware:[tC(c??(o?16:4)),nC(),eC({padding:5,fallbackPlacements:["bottom","top"]}),uC({element:p,padding:8})]}),{getFloatingProps:K}=RC([jC(y),DC(y)]);qd(()=>{h(i)},[i]);const Y=v.useMemo(()=>Jp([b,t]),[b,t]);qd(()=>{if(!O.reference.current||!O.floating.current||!a)return;const G=sC(O.reference.current,O.floating.current,S);return()=>G()},[O.floating,O.reference,S,a,i]),Qx("focusin",v.useCallback(G=>{var M;[i,(M=O==null?void 0:O.floating)===null||M===void 0?void 0:M.current].some(N=>N==null?void 0:N.contains(G.target))||a&&s()},[i,O,a,s]));const z={top:"bottom",right:"left",bottom:"top",left:"right"}[I.split("-")[0]];return k.createElement("div",Object.assign({className:ve("navds-popover",r,{"navds-popover--hidden":!a||!i}),"data-placement":I,"aria-hidden":!a||!i,tabIndex:-1},K({ref:Y,style:{position:_,top:g??0,left:m??0}}),f),n,o&&k.createElement("div",{ref:G=>{p.current=G},style:Object.assign(Object.assign(Object.assign({},T!=null?{left:T}:{}),V!=null?{top:V}:{}),z?{[z]:"-0.5rem"}:{}),className:"navds-popover__arrow"}))});r0.Content=AC;const kp=r0;var MC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,header:n,children:i,open:o,defaultOpen:a=!1,onClick:s,size:u="medium"}=e,c=MC(e,["className","header","children","open","defaultOpen","onClick","size"]);const[d,f]=v.useState(a),p=o??d;return k.createElement("div",{className:ve("navds-read-more",`navds-read-more--${u}`,r,{"navds-read-more--open":p})},k.createElement("button",Object.assign({},c,{ref:t,type:"button",className:ve("navds-read-more__button","navds-body-short",{"navds-body-short--small":u==="small"}),onClick:m=>{o===void 0&&f(g=>!g),s==null||s(m)},"aria-expanded":p}),k.createElement(Xp,{className:"navds-read-more__expand-icon","aria-hidden":!0}),k.createElement(xv,{className:"navds-read-more__expand-icon navds-read-more__expand-icon--filled","aria-hidden":!0}),k.createElement("span",null,n)),k.createElement(wv,{height:p?"auto":0,duration:250},k.createElement(cn,{as:"div",className:"navds-read-more__content",size:u},i)))}),Fu=LC;var $C=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r}=e,n=$C(e,["className"]);return k.createElement("thead",Object.assign({},n,{ref:t,className:ve("navds-table__header",r)}))}),FC=VC;var HC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r}=e,n=HC(e,["className"]);return k.createElement("tbody",Object.assign({},n,{ref:t,className:ve("navds-table__body",r)}))}),BC=UC;var KC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,selected:n=!1,shadeOnHover:i=!0}=e,o=KC(e,["className","selected","shadeOnHover"]);return k.createElement("tr",Object.assign({},o,{ref:t,className:ve("navds-table__row",r,{"navds-table__row--selected":n,"navds-table__row--shade-on-hover":i})}))}),n0=WC;var zC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,children:n,align:i}=e,o=zC(e,["className","children","align"]);const a=v.useContext(Hu);return k.createElement("th",Object.assign({ref:t,className:ve("navds-table__header-cell","navds-label",r,{[`navds-table__header-cell--align-${i}`]:i,"navds-label--small":(a==null?void 0:a.size)==="small"})},o),n)}),i0=qC;var YC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var r,n,i,o,{className:a,children:s,sortable:u=!1,sortKey:c}=e,d=YC(e,["className","children","sortable","sortKey"]);const f=v.useContext(Hu);return u&&!c&&console.warn("ColumnHeader with `sortable=true` must have a sortKey."),k.createElement(i0,Object.assign({scope:"col",ref:t,className:a,"aria-sort":u?((r=f==null?void 0:f.sort)===null||r===void 0?void 0:r.orderBy)===c?(n=f==null?void 0:f.sort)===null||n===void 0?void 0:n.direction:"none":void 0},d),u?k.createElement("button",{type:"button",className:"navds-table__sort-button",onClick:u&&c?()=>{var p;return(p=f==null?void 0:f.onSortChange)===null||p===void 0?void 0:p.call(f,c)}:void 0},s,((i=f==null?void 0:f.sort)===null||i===void 0?void 0:i.orderBy)===c?((o=f==null?void 0:f.sort)===null||o===void 0?void 0:o.direction)==="descending"?k.createElement(O5,{"aria-hidden":!0}):k.createElement(rR,{"aria-hidden":!0}):k.createElement(oR,{"aria-hidden":!0})):s)}),ZC=GC;var XC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,children:n="",align:i}=e,o=XC(e,["className","children","align"]);const a=v.useContext(Hu);return k.createElement(ce,Object.assign({as:"td",ref:t,className:ve("navds-table__data-cell",r,{[`navds-table__data-cell--align-${i}`]:i}),size:a==null?void 0:a.size},o),n)}),o0=JC;var QC=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,children:n,content:i,togglePlacement:o="left",defaultOpen:a=!1,open:s,onOpenChange:u,expansionDisabled:c=!1,colSpan:d=999}=e,f=QC(e,["className","children","content","togglePlacement","defaultOpen","open","onOpenChange","expansionDisabled","colSpan"]);const[p,m]=v.useState(a),g=oa(),h=s??p;return k.createElement(k.Fragment,null,k.createElement(n0,Object.assign({},f,{ref:t,className:ve("navds-table__expandable-row",r,{"navds-table__expandable-row--open":h})}),o==="right"&&n,k.createElement(o0,{className:ve("navds-table__toggle-expand-cell",{"navds-table__toggle-expand-cell--open":h})},!c&&k.createElement("button",{type:"button",className:"navds-table__toggle-expand-button","aria-controls":g,"aria-expanded":h,onClick:()=>{u==null||u(!h),s===void 0&&m(b=>!b)}},k.createElement(Xp,{className:"navds-table__expandable-icon",title:h?"Vis mindre":"Vis mer"}),k.createElement(xv,{className:"navds-table__expandable-icon navds-table__expandable-icon--filled",title:h?"Vis mindre":"Vis mer"}))),o==="left"&&n),k.createElement("tr",{className:"navds-table__expanded-row","aria-hidden":!h,id:g},k.createElement("td",{colSpan:d,className:"navds-table__expanded-row-cell"},k.createElement(wv,{className:"navds-table__expanded-row-collapse",innerClassName:"navds-table__expanded-row-content",height:h?"auto":0,duration:250},i))))}),t4=e4;var r4=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{className:r,zebraStripes:n=!1,size:i="medium",onSortChange:o,sort:a}=e,s=r4(e,["className","zebraStripes","size","onSortChange","sort"]);return k.createElement(Hu.Provider,{value:{size:i,onSortChange:o,sort:a}},k.createElement("table",Object.assign({},s,{ref:t,className:ve("navds-table",`navds-table--${i}`,r,{"navds-table--zebra-stripes":n})})))});zn.Header=FC;zn.Body=BC;zn.Row=n0;zn.ColumnHeader=ZC;zn.HeaderCell=i0;zn.DataCell=o0;zn.ExpandableRow=t4;const St=zn;function Bi(){return Bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var{className:r,variant:n,size:i="medium"}=e,o=n4(e,["className","variant","size"]);const a=i==="medium"?ce:mn;return k.createElement(a,Object.assign({},o,{ref:t,as:"span",size:i==="medium"?"medium":"small",className:ve("navds-tag",r,`navds-tag--${n}`,`navds-tag--${i}`)}))}),ao=i4;/**
+ * @remix-run/router v1.4.0
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Uu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function a4(){return Math.random().toString(36).substr(2,8)}function qh(e,t){return{usr:e.state,key:e.key,idx:t}}function bp(e,t,r,n){return r===void 0&&(r=null),Fo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?xi(t):t,{state:r,key:t&&t.key||n||a4()})}function Bl(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function xi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function s4(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=jn.Pop,u=null,c=d();c==null&&(c=0,a.replaceState(Fo({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){s=jn.Pop;let b=d(),_=b==null?null:b-c;c=b,u&&u({action:s,location:h.location,delta:_})}function p(b,_){s=jn.Push;let y=bp(h.location,b,_);r&&r(y,b),c=d()+1;let S=qh(y,c),O=h.createHref(y);try{a.pushState(S,"",O)}catch{i.location.assign(O)}o&&u&&u({action:s,location:h.location,delta:1})}function m(b,_){s=jn.Replace;let y=bp(h.location,b,_);r&&r(y,b),c=d();let S=qh(y,c),O=h.createHref(y);a.replaceState(S,"",O),o&&u&&u({action:s,location:h.location,delta:0})}function g(b){let _=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof b=="string"?b:Bl(b);return gt(_,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,_)}let h={get action(){return s},get location(){return e(i,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(zh,f),u=b,()=>{i.removeEventListener(zh,f),u=null}},createHref(b){return t(i,b)},createURL:g,encodeLocation(b){let _=g(b);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:p,replace:m,go(b){return a.go(b)}};return h}var Yh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Yh||(Yh={}));function l4(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?xi(t):t,i=Vv(n.pathname||"/",r);if(i==null)return null;let o=a0(e);u4(o);let a=null;for(let s=0;a==null&&s{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(gt(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let c=Dn([n,u.relativePath]),d=r.concat(u);o.children&&o.children.length>0&&(gt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),a0(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:g4(c,o.index),routesMeta:d})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of s0(o.path))i(o,a,u)}),t}function s0(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=s0(n.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function u4(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:h4(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const c4=/^:\w+$/,d4=3,f4=2,p4=1,v4=10,m4=-2,Gh=e=>e==="*";function g4(e,t){let r=e.split("/"),n=r.length;return r.some(Gh)&&(n+=m4),t&&(n+=f4),r.filter(i=>!Gh(i)).reduce((i,o)=>i+(c4.test(o)?d4:o===""?p4:v4),n)}function h4(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function y4(e,t){let{routesMeta:r}=e,n={},i="/",o=[];for(let a=0;a{if(d==="*"){let p=s[f]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}return c[d]=w4(s[f]||"",d),c},{}),pathname:o,pathnameBase:a,pattern:e}}function b4(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Uu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function _4(e){try{return decodeURI(e)}catch(t){return Uu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function w4(e,t){try{return decodeURIComponent(e)}catch(r){return Uu(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function Vv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function x4(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?xi(e):e;return{pathname:r?r.startsWith("/")?r:S4(r,t):t,search:T4(n),hash:O4(i)}}function S4(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function kd(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function l0(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function u0(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=xi(e):(i=Fo({},e),gt(!i.pathname||!i.pathname.includes("?"),kd("?","pathname","search",i)),gt(!i.pathname||!i.pathname.includes("#"),kd("#","pathname","hash",i)),gt(!i.search||!i.search.includes("#"),kd("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(n||a==null)s=r;else{let f=t.length-1;if(a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}s=f>=0?t[f]:"/"}let u=x4(i,s),c=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const Dn=e=>e.join("/").replace(/\/\/+/g,"/"),j4=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),T4=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,O4=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function E4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}/**
+ * React Router v6.9.0
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function D4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const I4=typeof Object.is=="function"?Object.is:D4,{useState:R4,useEffect:N4,useLayoutEffect:P4,useDebugValue:A4}=tl;function C4(e,t,r){const n=t(),[{inst:i},o]=R4({inst:{value:n,getSnapshot:t}});return P4(()=>{i.value=n,i.getSnapshot=t,bd(i)&&o({inst:i})},[e,n,t]),N4(()=>(bd(i)&&o({inst:i}),e(()=>{bd(i)&&o({inst:i})})),[e]),A4(n),n}function bd(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!I4(r,n)}catch{return!0}}function M4(e,t,r){return t()}const L4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$4=!L4,V4=$4?M4:C4;"useSyncExternalStore"in tl&&(e=>e.useSyncExternalStore)(tl);const c0=v.createContext(null),Fv=v.createContext(null),ma=v.createContext(null),ga=v.createContext(null),qn=v.createContext({outlet:null,matches:[]}),d0=v.createContext(null);function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;ts.pathnameBase)),o=v.useRef(!1);return v.useEffect(()=>{o.current=!0}),v.useCallback(function(s,u){if(u===void 0&&(u={}),!o.current)return;if(typeof s=="number"){t.go(s);return}let c=u0(s,JSON.parse(i),n,u.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Dn([e,c.pathname])),(u.replace?t.replace:t.push)(c,u.state,u)},[e,t,i,n])}const H4=v.createContext(null);function U4(e){let t=v.useContext(qn).outlet;return t&&v.createElement(H4.Provider,{value:e},t)}function Bu(){let{matches:e}=v.useContext(qn),t=e[e.length-1];return t?t.params:{}}function f0(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=v.useContext(qn),{pathname:i}=lo(),o=JSON.stringify(l0(n).map(a=>a.pathnameBase));return v.useMemo(()=>u0(e,JSON.parse(o),i,r==="path"),[e,o,i,r])}function B4(e,t){so()||gt(!1);let{navigator:r}=v.useContext(ma),n=v.useContext(Fv),{matches:i}=v.useContext(qn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let u=lo(),c;if(t){var d;let h=typeof t=="string"?xi(t):t;s==="/"||(d=h.pathname)!=null&&d.startsWith(s)||gt(!1),c=h}else c=u;let f=c.pathname||"/",p=s==="/"?f:f.slice(s.length)||"/",m=l4(e,{pathname:p}),g=q4(m&&m.map(h=>Object.assign({},h,{params:Object.assign({},a,h.params),pathname:Dn([s,r.encodeLocation?r.encodeLocation(h.pathname).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?s:Dn([s,r.encodeLocation?r.encodeLocation(h.pathnameBase).pathname:h.pathnameBase])})),i,n||void 0);return t&&g?v.createElement(ga.Provider,{value:{location:_p({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:jn.Pop}},g):g}function K4(){let e=X4(),t=E4(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:i},r):null,o)}class W4 extends v.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?v.createElement(qn.Provider,{value:this.props.routeContext},v.createElement(d0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function z4(e){let{routeContext:t,match:r,children:n}=e,i=v.useContext(c0);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),v.createElement(qn.Provider,{value:t},n)}function q4(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let n=e,i=r==null?void 0:r.errors;if(i!=null){let o=n.findIndex(a=>a.route.id&&(i==null?void 0:i[a.route.id]));o>=0||gt(!1),n=n.slice(0,Math.min(n.length,o+1))}return n.reduceRight((o,a,s)=>{let u=a.route.id?i==null?void 0:i[a.route.id]:null,c=null;r&&(a.route.ErrorBoundary?c=v.createElement(a.route.ErrorBoundary,null):a.route.errorElement?c=a.route.errorElement:c=v.createElement(K4,null));let d=t.concat(n.slice(0,s+1)),f=()=>{let p=o;return u?p=c:a.route.Component?p=v.createElement(a.route.Component,null):a.route.element&&(p=a.route.element),v.createElement(z4,{match:a,routeContext:{outlet:o,matches:d},children:p})};return r&&(a.route.ErrorBoundary||a.route.errorElement||s===0)?v.createElement(W4,{location:r.location,component:c,error:u,children:f(),routeContext:{outlet:null,matches:d}}):f()},null)}var Zh;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(Zh||(Zh={}));var Kl;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Kl||(Kl={}));function Y4(e){let t=v.useContext(Fv);return t||gt(!1),t}function G4(e){let t=v.useContext(qn);return t||gt(!1),t}function Z4(e){let t=G4(),r=t.matches[t.matches.length-1];return r.route.id||gt(!1),r.route.id}function X4(){var e;let t=v.useContext(d0),r=Y4(Kl.UseRouteError),n=Z4(Kl.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Ku(e){let{to:t,replace:r,state:n,relative:i}=e;so()||gt(!1);let o=v.useContext(Fv),a=_t();return v.useEffect(()=>{o&&o.navigation.state!=="idle"||a(t,{replace:r,state:n,relative:i})}),null}function J4(e){return U4(e.context)}function ot(e){gt(!1)}function Q4(e){let{basename:t="/",children:r=null,location:n,navigationType:i=jn.Pop,navigator:o,static:a=!1}=e;so()&>(!1);let s=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:s,navigator:o,static:a}),[s,o,a]);typeof n=="string"&&(n=xi(n));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:m="default"}=n,g=v.useMemo(()=>{let h=Vv(c,s);return h==null?null:{location:{pathname:h,search:d,hash:f,state:p,key:m},navigationType:i}},[s,c,d,f,p,m,i]);return g==null?null:v.createElement(ma.Provider,{value:u},v.createElement(ga.Provider,{children:r,value:g}))}function e3(e){let{children:t,location:r}=e,n=v.useContext(c0),i=n&&!t?n.router.routes:wp(t);return B4(i,r)}var Xh;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Xh||(Xh={}));new Promise(()=>{});function wp(e,t){t===void 0&&(t=[]);let r=[];return v.Children.forEach(e,(n,i)=>{if(!v.isValidElement(n))return;if(n.type===v.Fragment){r.push.apply(r,wp(n.props.children,t));return}n.type!==ot&>(!1),!n.props.index||!n.props.children||gt(!1);let o=[...t,i],a={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(a.children=wp(n.props.children,o)),r.push(a)}),r}/**
+ * React Router DOM v6.9.0
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function xp(){return xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function r3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function n3(e,t){return e.button===0&&(!t||t==="_self")&&!r3(e)}const i3=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function o3(e){let{basename:t,children:r,window:n}=e,i=v.useRef();i.current==null&&(i.current=o4({window:n,v5Compat:!0}));let o=i.current,[a,s]=v.useState({action:o.action,location:o.location});return v.useLayoutEffect(()=>o.listen(s),[o]),v.createElement(Q4,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:o})}const a3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",s3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sp=v.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:o,replace:a,state:s,target:u,to:c,preventScrollReset:d}=t,f=t3(t,i3),{basename:p}=v.useContext(ma),m,g=!1;if(typeof c=="string"&&s3.test(c)&&(m=c,a3)){let y=new URL(window.location.href),S=c.startsWith("//")?new URL(y.protocol+c):new URL(c),O=Vv(S.pathname,p);S.origin===y.origin&&O!=null?c=O+S.search+S.hash:g=!0}let h=F4(c,{relative:i}),b=l3(c,{replace:a,state:s,target:u,preventScrollReset:d,relative:i});function _(y){n&&n(y),y.defaultPrevented||b(y)}return v.createElement("a",xp({},f,{href:m||h,onClick:g||o?n:_,ref:r,target:u}))});var Jh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Jh||(Jh={}));var Qh;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Qh||(Qh={}));function l3(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:a}=t===void 0?{}:t,s=_t(),u=lo(),c=f0(e,{relative:a});return v.useCallback(d=>{if(n3(d,r)){d.preventDefault();let f=n!==void 0?n:Bl(u)===Bl(c);s(e,{replace:f,state:i,preventScrollReset:o,relative:a})}},[u,s,c,n,i,r,e,o,a])}var p0={exports:{}},v0={};/**
+ * @license React
+ * use-sync-external-store-shim.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var eo=v;function u3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var c3=typeof Object.is=="function"?Object.is:u3,d3=eo.useState,f3=eo.useEffect,p3=eo.useLayoutEffect,v3=eo.useDebugValue;function m3(e,t){var r=t(),n=d3({inst:{value:r,getSnapshot:t}}),i=n[0].inst,o=n[1];return p3(function(){i.value=r,i.getSnapshot=t,_d(i)&&o({inst:i})},[e,r,t]),f3(function(){return _d(i)&&o({inst:i}),e(function(){_d(i)&&o({inst:i})})},[e]),v3(r),r}function _d(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!c3(e,r)}catch{return!0}}function g3(e,t){return t()}var h3=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g3:m3;v0.useSyncExternalStore=eo.useSyncExternalStore!==void 0?eo.useSyncExternalStore:h3;p0.exports=v0;var m0=p0.exports,g0={exports:{}},h0={};/**
+ * @license React
+ * use-sync-external-store-shim/with-selector.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var Wu=v,y3=m0;function k3(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var b3=typeof Object.is=="function"?Object.is:k3,_3=y3.useSyncExternalStore,w3=Wu.useRef,x3=Wu.useEffect,S3=Wu.useMemo,j3=Wu.useDebugValue;h0.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var o=w3(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=S3(function(){function u(m){if(!c){if(c=!0,d=m,m=n(m),i!==void 0&&a.hasValue){var g=a.value;if(i(g,m))return f=g}return f=m}if(g=f,b3(d,m))return g;var h=n(m);return i!==void 0&&i(g,h)?g:(d=m,f=h)}var c=!1,d,f,p=r===void 0?null:r;return[function(){return u(t())},p===null?void 0:function(){return u(p())}]},[t,r,n,i]);var s=_3(e,o[0],o[1]);return x3(function(){a.hasValue=!0,a.value=s},[s]),j3(s),s};g0.exports=h0;var T3=g0.exports;function O3(e){e()}let y0=O3;const E3=e=>y0=e,D3=()=>y0,dn=v.createContext(null);function k0(){return v.useContext(dn)}const b0=()=>{throw new Error("uSES not initialized!")};let _0=b0;const I3=e=>{_0=e},R3=(e,t)=>e===t;function N3(e=dn){const t=e===dn?k0:()=>v.useContext(e);return function(n,i=R3){const{store:o,subscription:a,getServerState:s}=t(),u=_0(a.addNestedSub,o.getState,s||o.getState,n,i);return v.useDebugValue(u),u}}const C=N3();function w0(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}var x0={exports:{}},qe={};/** @license React v16.13.1
+ * react-is.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var jt=typeof Symbol=="function"&&Symbol.for,Hv=jt?Symbol.for("react.element"):60103,Uv=jt?Symbol.for("react.portal"):60106,zu=jt?Symbol.for("react.fragment"):60107,qu=jt?Symbol.for("react.strict_mode"):60108,Yu=jt?Symbol.for("react.profiler"):60114,Gu=jt?Symbol.for("react.provider"):60109,Zu=jt?Symbol.for("react.context"):60110,Bv=jt?Symbol.for("react.async_mode"):60111,Xu=jt?Symbol.for("react.concurrent_mode"):60111,Ju=jt?Symbol.for("react.forward_ref"):60112,Qu=jt?Symbol.for("react.suspense"):60113,P3=jt?Symbol.for("react.suspense_list"):60120,ec=jt?Symbol.for("react.memo"):60115,tc=jt?Symbol.for("react.lazy"):60116,A3=jt?Symbol.for("react.block"):60121,C3=jt?Symbol.for("react.fundamental"):60117,M3=jt?Symbol.for("react.responder"):60118,L3=jt?Symbol.for("react.scope"):60119;function Qt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Hv:switch(e=e.type,e){case Bv:case Xu:case zu:case Yu:case qu:case Qu:return e;default:switch(e=e&&e.$$typeof,e){case Zu:case Ju:case tc:case ec:case Gu:return e;default:return t}}case Uv:return t}}}function S0(e){return Qt(e)===Xu}qe.AsyncMode=Bv;qe.ConcurrentMode=Xu;qe.ContextConsumer=Zu;qe.ContextProvider=Gu;qe.Element=Hv;qe.ForwardRef=Ju;qe.Fragment=zu;qe.Lazy=tc;qe.Memo=ec;qe.Portal=Uv;qe.Profiler=Yu;qe.StrictMode=qu;qe.Suspense=Qu;qe.isAsyncMode=function(e){return S0(e)||Qt(e)===Bv};qe.isConcurrentMode=S0;qe.isContextConsumer=function(e){return Qt(e)===Zu};qe.isContextProvider=function(e){return Qt(e)===Gu};qe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hv};qe.isForwardRef=function(e){return Qt(e)===Ju};qe.isFragment=function(e){return Qt(e)===zu};qe.isLazy=function(e){return Qt(e)===tc};qe.isMemo=function(e){return Qt(e)===ec};qe.isPortal=function(e){return Qt(e)===Uv};qe.isProfiler=function(e){return Qt(e)===Yu};qe.isStrictMode=function(e){return Qt(e)===qu};qe.isSuspense=function(e){return Qt(e)===Qu};qe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zu||e===Xu||e===Yu||e===qu||e===Qu||e===P3||typeof e=="object"&&e!==null&&(e.$$typeof===tc||e.$$typeof===ec||e.$$typeof===Gu||e.$$typeof===Zu||e.$$typeof===Ju||e.$$typeof===C3||e.$$typeof===M3||e.$$typeof===L3||e.$$typeof===A3)};qe.typeOf=Qt;x0.exports=qe;var $3=x0.exports,Kv=$3,V3={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},F3={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},H3={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},j0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Wv={};Wv[Kv.ForwardRef]=H3;Wv[Kv.Memo]=j0;function ey(e){return Kv.isMemo(e)?j0:Wv[e.$$typeof]||V3}var U3=Object.defineProperty,B3=Object.getOwnPropertyNames,ty=Object.getOwnPropertySymbols,K3=Object.getOwnPropertyDescriptor,W3=Object.getPrototypeOf,ry=Object.prototype;function T0(e,t,r){if(typeof t!="string"){if(ry){var n=W3(t);n&&n!==ry&&T0(e,n,r)}var i=B3(t);ty&&(i=i.concat(ty(t)));for(var o=ey(e),a=ey(t),s=0;st(i(...o)))}return r}function jp(e){return function(r){const n=e(r);function i(){return n}return i.dependsOnOwnProps=!1,i}}function iy(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function D0(e,t){return function(n,{displayName:i}){const o=function(s,u){return o.dependsOnOwnProps?o.mapToProps(s,u):o.mapToProps(s,void 0)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,u){o.mapToProps=e,o.dependsOnOwnProps=iy(e);let c=o(s,u);return typeof c=="function"&&(o.mapToProps=c,o.dependsOnOwnProps=iy(c),c=o(s,u)),c},o}}function Yv(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function eM(e){return e&&typeof e=="object"?jp(t=>Q3(e,t)):e?typeof e=="function"?D0(e):Yv(e,"mapDispatchToProps"):jp(t=>({dispatch:t}))}function tM(e){return e?typeof e=="function"?D0(e):Yv(e,"mapStateToProps"):jp(()=>({}))}function rM(e,t,r){return Bi({},r,e,t)}function nM(e){return function(r,{displayName:n,areMergedPropsEqual:i}){let o=!1,a;return function(u,c,d){const f=e(u,c,d);return o?i(f,a)||(a=f):(o=!0,a=f),a}}}function iM(e){return e?typeof e=="function"?nM(e):Yv(e,"mergeProps"):()=>rM}function oM(){const e=D3();let t=null,r=null;return{clear(){t=null,r=null},notify(){e(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){let n=[],i=t;for(;i;)n.push(i),i=i.next;return n},subscribe(n){let i=!0,o=r={callback:n,next:null,prev:r};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const oy={notify(){},get:()=>[]};function I0(e,t){let r,n=oy;function i(f){return u(),n.subscribe(f)}function o(){n.notify()}function a(){d.onStateChange&&d.onStateChange()}function s(){return!!r}function u(){r||(r=t?t.addNestedSub(a):e.subscribe(a),n=oM())}function c(){r&&(r(),r=void 0,n.clear(),n=oy)}const d={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:u,tryUnsubscribe:c,getListeners:()=>n};return d}const aM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Wl=aM?v.useLayoutEffect:v.useEffect;function ay(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Se(e,t){if(ay(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i{R0=e},uM=[null,null];function cM(e,t,r){Wl(()=>e(...t),r)}function dM(e,t,r,n,i,o){e.current=n,r.current=!1,i.current&&(i.current=null,o())}function fM(e,t,r,n,i,o,a,s,u,c,d){if(!e)return()=>{};let f=!1,p=null;const m=()=>{if(f||!s.current)return;const h=t.getState();let b,_;try{b=n(h,i.current)}catch(y){_=y,p=y}_||(p=null),b===o.current?a.current||c():(o.current=b,u.current=b,a.current=!0,d())};return r.onStateChange=m,r.trySubscribe(),m(),()=>{if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}function pM(e,t){return e===t}function fc(e,t,r,{pure:n,areStatesEqual:i=pM,areOwnPropsEqual:o=Se,areStatePropsEqual:a=Se,areMergedPropsEqual:s=Se,forwardRef:u=!1,context:c=dn}={}){const d=c,f=tM(e),p=eM(t),m=iM(r),g=!!e;return b=>{const _=b.displayName||b.name||"Component",y=`Connect(${_})`,S={shouldHandleStateChanges:g,displayName:y,wrappedComponentName:_,WrappedComponent:b,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function O(V){const[K,Y,z]=v.useMemo(()=>{const{reactReduxForwardedRef:$e}=V,H=w0(V,sM);return[V.context,$e,H]},[V]),G=v.useMemo(()=>K&&K.Consumer&&G3.isContextConsumer(k.createElement(K.Consumer,null))?K:d,[K,d]),M=v.useContext(G),N=!!V.store&&!!V.store.getState&&!!V.store.dispatch,R=!!M&&!!M.store,w=N?V.store:M.store,E=R?M.getServerState:w.getState,B=v.useMemo(()=>J3(w.dispatch,S),[w]),[Q,A]=v.useMemo(()=>{if(!g)return uM;const $e=I0(w,N?void 0:M.subscription),H=$e.notifyNestedSubs.bind($e);return[$e,H]},[w,N,M]),be=v.useMemo(()=>N?M:Bi({},M,{subscription:Q}),[N,M,Q]),D=v.useRef(),L=v.useRef(z),P=v.useRef(),W=v.useRef(!1);v.useRef(!1);const re=v.useRef(!1),he=v.useRef();Wl(()=>(re.current=!0,()=>{re.current=!1}),[]);const me=v.useMemo(()=>()=>P.current&&z===L.current?P.current:B(w.getState(),z),[w,z]),ke=v.useMemo(()=>H=>Q?fM(g,w,Q,B,L,D,W,re,P,A,H):()=>{},[Q]);cM(dM,[L,D,W,z,P,A]);let ge;try{ge=R0(ke,me,E?()=>B(E(),z):me)}catch($e){throw he.current&&($e.message+=`
+The error may be correlated with this previous error:
+${he.current.stack}
+
+`),$e}Wl(()=>{he.current=void 0,P.current=void 0,D.current=ge});const Ae=v.useMemo(()=>k.createElement(b,Bi({},ge,{ref:Y})),[Y,b,ge]);return v.useMemo(()=>g?k.createElement(G.Provider,{value:be},Ae):Ae,[G,Ae,be])}const T=k.memo(O);if(T.WrappedComponent=b,T.displayName=O.displayName=y,u){const K=k.forwardRef(function(z,G){return k.createElement(T,Bi({},z,{reactReduxForwardedRef:G}))});return K.displayName=y,K.WrappedComponent=b,ny(K,b)}return ny(T,b)}}function vM({store:e,context:t,children:r,serverState:n}){const i=v.useMemo(()=>{const s=I0(e);return{store:e,subscription:s,getServerState:n?()=>n:void 0}},[e,n]),o=v.useMemo(()=>e.getState(),[e]);Wl(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]);const a=t||dn;return k.createElement(a.Provider,{value:i},r)}function N0(e=dn){const t=e===dn?k0:()=>v.useContext(e);return function(){const{store:n}=t();return n}}const mM=N0();function gM(e=dn){const t=e===dn?mM:N0(e);return function(){return t().dispatch}}const hM=gM();I3(T3.useSyncExternalStoreWithSelector);lM(m0.useSyncExternalStore);E3(jk.unstable_batchedUpdates);const Le=hM;function yM(e){return e.data.auth}function kM(e){return yM(e).data}function bM(e){var t;return(t=kM(e))==null?void 0:t.expirationTime}function pr(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n3?t.i-4:t.i:Array.isArray(e)?1:Gv(e)?2:Zv(e)?3:0}function Ki(e,t){return uo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function _M(e,t){return uo(e)===2?e.get(t):e[t]}function P0(e,t,r){var n=uo(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function A0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Gv(e){return OM&&e instanceof Map}function Zv(e){return EM&&e instanceof Set}function ni(e){return e.o||e.t}function Xv(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=M0(e);delete t[et];for(var r=Wi(t),n=0;n1&&(e.set=e.add=e.clear=e.delete=wM),Object.freeze(e),t&&mi(e,function(r,n){return Jv(n,!0)},!0)),e}function wM(){pr(2)}function Qv(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Kr(e){var t=Dp[e];return t||pr(18,e),t}function xM(e,t){Dp[e]||(Dp[e]=t)}function Tp(){return Ho}function wd(e,t){t&&(Kr("Patches"),e.u=[],e.s=[],e.v=t)}function zl(e){Op(e),e.p.forEach(SM),e.p=null}function Op(e){e===Ho&&(Ho=e.l)}function sy(e){return Ho={p:[],l:Ho,h:e,m:!0,_:0}}function SM(e){var t=e[et];t.i===0||t.i===1?t.j():t.g=!0}function xd(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||Kr("ES5").S(t,e,n),n?(r[et].P&&(zl(t),pr(4)),fn(e)&&(e=ql(t,e),t.l||Yl(t,e)),t.u&&Kr("Patches").M(r[et].t,e,t.u,t.s)):e=ql(t,r,[]),zl(t),t.u&&t.v(t.u,t.s),e!==C0?e:void 0}function ql(e,t,r){if(Qv(t))return t;var n=t[et];if(!n)return mi(t,function(s,u){return ly(e,n,t,s,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Yl(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=Xv(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),mi(o,function(s,u){return ly(e,n,i,s,u,r,a)}),Yl(e,i,!1),r&&e.u&&Kr("Patches").N(n,r,e.u,e.s)}return n.o}function ly(e,t,r,n,i,o,a){if(Cn(i)){var s=ql(e,i,o&&t&&t.i!==3&&!Ki(t.R,n)?o.concat(n):void 0);if(P0(r,n,s),!Cn(s))return;e.m=!1}else a&&r.add(i);if(fn(i)&&!Qv(i)){if(!e.h.D&&e._<1)return;ql(e,i),t&&t.A.l||Yl(e,i)}}function Yl(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&Jv(t,r)}function Sd(e,t){var r=e[et];return(r?ni(r):e)[t]}function uy(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function wn(e){e.P||(e.P=!0,e.l&&wn(e.l))}function jd(e){e.o||(e.o=Xv(e.t))}function Ep(e,t,r){var n=Gv(t)?Kr("MapSet").F(t,r):Zv(t)?Kr("MapSet").T(t,r):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Tp(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=s,c=Uo;a&&(u=[s],c=Oo);var d=Proxy.revocable(u,c),f=d.revoke,p=d.proxy;return s.k=p,s.j=f,p}(t,r):Kr("ES5").J(t,r);return(r?r.A:Tp()).p.push(n),n}function jM(e){return Cn(e)||pr(22,e),function t(r){if(!fn(r))return r;var n,i=r[et],o=uo(r);if(i){if(!i.P&&(i.i<4||!Kr("ES5").K(i)))return i.t;i.I=!0,n=cy(r,o),i.I=!1}else n=cy(r,o);return mi(n,function(a,s){i&&_M(i.t,a)===s||P0(n,a,t(s))}),o===3?new Set(n):n}(e)}function cy(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Xv(e)}function TM(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var u=this[et];return Uo.get(u,o)},set:function(u){var c=this[et];Uo.set(c,o,u)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][et];if(!s.P)switch(s.i){case 5:n(s)&&wn(s);break;case 4:r(s)&&wn(s)}}}function r(o){for(var a=o.t,s=o.k,u=Wi(s),c=u.length-1;c>=0;c--){var d=u[c];if(d!==et){var f=a[d];if(f===void 0&&!Ki(a,d))return!0;var p=s[d],m=p&&p[et];if(m?m.t!==f:!A0(p,f))return!0}}var g=!!a[et];return u.length!==Wi(a).length+(g?0:1)}function n(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var u=0;u1?_-1:0),S=1;S<_;S++)y[S-1]=arguments[S];return u.produce(h,function(O){var I;return(I=o).call.apply(I,[b,O].concat(y))})}}var c;if(typeof o!="function"&&pr(6),a!==void 0&&typeof a!="function"&&pr(7),fn(i)){var d=sy(n),f=Ep(n,i,void 0),p=!0;try{c=o(f),p=!1}finally{p?zl(d):Op(d)}return typeof Promise<"u"&&c instanceof Promise?c.then(function(h){return wd(d,a),xd(h,d)},function(h){throw zl(d),h}):(wd(d,a),xd(c,d))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===C0&&(c=void 0),n.D&&Jv(c,!0),a){var m=[],g=[];Kr("Patches").M(i,c,m,g),a(m,g)}return c}pr(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var d=arguments.length,f=Array(d>1?d-1:0),p=1;p=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=Kr("Patches").$;return Cn(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},e}(),Jt=new IM,L0=Jt.produce;Jt.produceWithPatches.bind(Jt);Jt.setAutoFreeze.bind(Jt);Jt.setUseProxies.bind(Jt);Jt.applyPatches.bind(Jt);Jt.createDraft.bind(Jt);Jt.finishDraft.bind(Jt);function Bo(e){return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bo(e)}function RM(e,t){if(Bo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Bo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NM(e){var t=RM(e,"string");return Bo(t)==="symbol"?t:String(t)}function PM(e,t,r){return t=NM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function my(e){for(var t=1;t"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(At(1));return r(tm)(e,t)}if(typeof e!="function")throw new Error(At(2));var i=e,o=t,a=[],s=a,u=!1;function c(){s===a&&(s=a.slice())}function d(){if(u)throw new Error(At(3));return o}function f(h){if(typeof h!="function")throw new Error(At(4));if(u)throw new Error(At(5));var b=!0;return c(),s.push(h),function(){if(b){if(u)throw new Error(At(6));b=!1,c();var y=s.indexOf(h);s.splice(y,1),a=null}}}function p(h){if(!AM(h))throw new Error(At(7));if(typeof h.type>"u")throw new Error(At(8));if(u)throw new Error(At(9));try{u=!0,o=i(o,h)}finally{u=!1}for(var b=a=s,_=0;_"u")throw new Error(At(12));if(typeof r(void 0,{type:Gl.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(At(13))})}function Ip(e){for(var t=Object.keys(e),r={},n=0;n"u")throw c&&c.type,new Error(At(14));f[m]=b,d=d||b!==h}return d=d||o.length!==Object.keys(u).length,d?f:u}}function Zl(){for(var e=arguments.length,t=new Array(e),r=0;r-1){var c=r[u];return u>0&&(r.splice(u,1),r.unshift(c)),c.value}return Xl}function i(s,u){n(s)===Xl&&(r.unshift({key:s,value:u}),r.length>e&&r.pop())}function o(){return r}function a(){r=[]}return{get:n,put:i,getEntries:o,clear:a}}var VM=function(t,r){return t===r};function FM(e){return function(r,n){if(r===null||n===null||r.length!==n.length)return!1;for(var i=r.length,o=0;o1?t-1:0),n=1;n0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]-1;return r&&n}function mc(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function H0(){for(var e=[],t=0;t{const t=window.location.pathname.match(hL);if(t&&t.length===1)return t[0]},B0={credentials:"same-origin"},wy={ERROR:5,NOT_STARTED:4,PENDING:3,RELOADING:2,OK:1};function yL(...e){return e.reduce((t,r)=>{const n=t&&(t.status||t),i=r&&(r.status||r);return(wy[n]||0)>(wy[i]||0)?n:i})}async function K0(e){if(e.status>=200&&e.status<300&&e.ok)return e;const t={code:e.status.toString(),message:`${e.url}`,name:`${e.statusText} (${e.status})`};return Promise.reject(t)}function W0(e){return e.status!==204?e.json():e}const kL=e=>{const r=new RegExp(`${e}=([^;]+)`).exec(document.cookie);return r!==null?r[1]:""},nm={"Content-Type":"application/json",NAV_CSRF_PROTECTION:kL("NAV_CSRF_PROTECTION"),"Nav-Consumer-Id":"aktivitetsplan"};function z0(e,t={headers:nm}){const r={...B0,...t};return fetch(e,r).then(K0).then(W0)}function Tt(e,t={headers:nm}){const r={...B0,...t},n=ha();let i=e;return n&&(i=`${e}${e.indexOf("?")>=0?"&":"?"}fnr=${n}`),fetch(i,r).then(K0).then(W0)}function q0(e,t,r,n){return Tt(t,{method:e,headers:nm,body:JSON.stringify(r),...n})}function ya(e,t={},r={}){return q0("post",e,t,r)}function lr(e,t={},r={}){return q0("put",e,t,r)}const bL=()=>Tt("/auth/info");var te=(e=>(e.NOT_STARTED="NOT_STARTED",e.PENDING="PENDING",e.OK="OK",e.RELOADING="RELOADING",e.ERROR="ERROR",e))(te||{});const gn=({name:e,initialState:t={status:"NOT_STARTED"},reducers:r})=>Dr({name:e,initialState:t,reducers:{...r},extraReducers:n=>{n.addMatcher(i=>i.type.startsWith(`${e}/`)&&i.type.endsWith("/pending"),i=>{i.status=i.status==="NOT_STARTED"?"PENDING":"RELOADING"}),n.addMatcher(i=>i.type.startsWith(`${e}/`)&&i.type.endsWith("/fulfilled"),(i,o)=>{i.data=o.payload||t.data,i.status="OK"}),n.addMatcher(i=>i.type.startsWith(`${e}/`)&&i.type.endsWith("/rejected"),i=>{i.status="ERROR"})}}),Y0=gn({name:"auth",reducers:{}}),_L=Be(`${Y0.name}/fetchAuthInfo`,async()=>await bL()),wL=Y0.reducer,xL=e=>{const{expirationTimestamp:t}=e,[r,n]=v.useState(Nk(ut(t),new Date));if(v.useEffect(()=>{const a=setInterval(()=>{n(r-1)},1e3);return()=>clearInterval(a)},[r]),r<=0)return l.jsxs(Gi.Content,{children:[l.jsx(oe,{level:"1",size:"large",spacing:!0,children:"Obs!"}),l.jsx(ce,{spacing:!0,children:"Sesjonen har utløpt. Du må logge inn igjen for å fortsette."}),l.jsx(Ne,{variant:"primary",className:"mt-2",onClick:()=>window.location.reload(),children:"Last siden på nytt"})]});const i=xD(r),o=i===0?`${r} sekunder`:`${i} minutter`;return l.jsxs(Gi.Content,{children:[l.jsx(oe,{id:"modal-heading",className:"blokk-s",level:"1",size:"large",spacing:!0,children:"Obs!"}),l.jsx(cn,{className:"blokk-xxs",spacing:!0,children:`Din sesjon vil utløpe om ${o}. Dersom du ikke laster siden på nytt, vil du bli logget ut. Ta vare på alt ulagret arbeid. For å laste siden på nytt, vennligst trykk "Last siden på nytt".`}),l.jsx(Ne,{className:"mr-4",onClick:()=>window.location.reload(),children:"Last siden på nytt"}),l.jsx(Ne,{variant:"secondary",onClick:()=>document.querySelector("#login-knapp-id").click(),children:"Logg ut"})]})},SL=()=>{const e=Le(),[t,r]=v.useState(!1),[n,i]=v.useState(!1);v.useEffect(()=>{e(_L())},[]);const o=C(bM),a=OD(ut(o),5);return v.useEffect(()=>{let s;if(o){const u=Du(a,new Date);s=setTimeout(()=>{i(!0)},u+100)}return()=>clearTimeout(s)},[o]),o?l.jsx(Gi,{open:n&&!t,className:"max-w-2xl",shouldCloseOnOverlayClick:!1,overlayClassName:"aktivitet-modal__overlay",onClose:()=>{r(!0)},children:l.jsx(xL,{expirationTimestamp:o})}):null};function im(e,t){const r=v.useCallback(n=>{if(n&&"detail"in n)return t(n)},[t]);v.useEffect(()=>(window.addEventListener(e,r),()=>window.removeEventListener(e,r)),[r,e])}const jL=e=>{if(e.length<2)return e;const t=e.replace("https://","").replace("http://","").split("/");return t.length===1?"/":[...t.slice(1)].join("/")},Dd=jL("https://aktivitetsplan.ekstern.dev.nav.no"),Yn=e=>"",om=Yn()+"/veilarbdialog/api",Pt=Yn()+"/veilarbaktivitet/api",Gn=Yn()+"/veilarboppfolging/api",G0=Yn()+"/veilarblest/api",am=Yn()+"/veilarbperson/api",TL=Yn()+"/veilarbmalverk/api",OL=Yn()+"/veilarbveileder/api",EL=Yn()+"/veilarbpersonflatefs/api",DL=()=>Tt(`${om}/dialog`),IL=()=>Tt(`${om}/dialog/sistOppdatert`),RL=()=>Tt(`${om}/eskaleringsvarsel/gjeldende`),NL={data:[],status:te.NOT_STARTED,sistOppdatert:new Date().toISOString()},Z0=Dr({name:"dialog",initialState:NL,reducers:{},extraReducers:e=>{e.addCase(qr.fulfilled,(t,r)=>{t.data=r.payload,t.status=te.OK,t.sistOppdatert=new Date().toISOString()}),e.addCase(qr.rejected,(t,r)=>{t.status=te.ERROR})}}),qr=Be(`${Z0.name}/fetchDialoger`,async(e,t)=>await DL()),PL=Z0.reducer,AL=e=>Tt(`${Pt}/aktivitet/${e}`),CL=()=>Tt(`${Pt}/aktivitet`),ML=e=>ya(`${Pt}/aktivitet/ny`,e),LL=e=>lr(`${Pt}/aktivitet/${e.id}`,e),X0=(e,t,r)=>lr(`${Pt}/avtaltMedNav?aktivitetId=${e}`,{aktivitetVersjon:t,forhaandsorientering:r}),$L=(e,t)=>lr(`${Pt}/avtaltMedNav/lest`,{aktivitetId:e,aktivitetVersion:t}),VL=(e,t,r,n)=>lr(`${Pt}/stillingFraNav/kanDeleCV?aktivitetId=${e}`,{aktivitetVersjon:t,kanDeles:r,avtaltDato:n}),FL=e=>lr(`${Pt}/aktivitet/${e.id}/status`,e),HL=e=>lr(`${Pt}/aktivitet/${e.id}/etikett`,e),UL=e=>lr(`${Pt}/aktivitet/${e.id}/referat/publiser`,e),BL=e=>lr(`${Pt}/aktivitet/${e.id}/referat`,e),KL=e=>Tt(`${Pt}/aktivitet/${e.id}/versjoner`),WL=(e,t,r)=>lr(`${Pt}/stillingFraNav/soknadStatus?aktivitetId=${e}`,{aktivitetVersjon:t,soknadsstatus:r}),zL=()=>Tt(`${Pt}/arena/tiltak`),qL=(e,t)=>lr(`${Pt}/arena/forhaandsorientering?arenaaktivitetId=${e}`,t),YL=e=>lr(`${Pt}/arena/forhaandsorientering/lest?aktivitetId=${e}`),Mn=Be("aktiviteter/hent",async()=>await CL()),Ko=Be("aktivitet/hent",async e=>await AL(e)),co=Be("aktivitet-etikett/oppdater",async e=>await HL(e)),hc=Be("aktivitet/oppdater",async e=>await LL(e)),fo=Be("aktivitet/fho",async({aktivitet:e,forhaandsorientering:t})=>await X0(e.id,e.versjon,t)),yc=Be("aktivitet/fho/lest",async e=>await $L(e.id,e.versjon)),Ir=Be("aktivitet/flytt",async({aktivitet:e,status:t})=>await FL({...e,status:t}));function GL(e,t,r){const n={...e,avsluttetKommentar:r};return Ir({aktivitet:n,status:t})}function ZL(e,t){const r={...e,avsluttetKommentar:t};return Ir({aktivitet:r,status:pe.AVBRUTT})}function XL(e,t){const r={...e,avsluttetKommentar:t};return Ir({aktivitet:r,status:pe.FULLFOERT})}const kc=Be("aktivitet/oppdaterCvSvar",async({aktivitetId:e,aktivitetVersjon:t,kanDeles:r,avtaltDato:n})=>await VL(e,t,r,n)),po=Be("aktivitet-stilling-fra-nav-status/oppdater",async({aktivitetId:e,aktivitetVersjon:t,soknadsstatus:r})=>await WL(e,t,r)),bc=Be("aktivitet/opprett",async e=>await ML(e)),ka=Be("referat/oppdater",async e=>await BL(e)),Zn=Be("referat/publiser",async e=>await UL({...e,erReferatPublisert:!0})),JL=()=>Tt(`${Gn}/oppfolging/me`),QL=()=>ya(`${Gn}/oppfolging/settDigital`),e7=()=>Tt(`${Gn}/oppfolging`),t7=()=>Tt(`${Gn}/oppfolging/mal`),r7=()=>Tt(`${Gn}/oppfolging/malListe`),n7=e=>ya(`${Gn}/oppfolging/mal`,e),i7=()=>Tt(`${Gn}/oppfolging/harFlereAktorIderMedOppfolging`),o7=()=>{const e=ha();return ya(`${Gn}/${e}/lestaktivitetsplan`)},sm=gn({name:"oppfolging",initialState:{data:void 0,status:te.NOT_STARTED},reducers:{}}),_c=Be(`${sm.name}/fetchOppfolging`,async()=>await e7()),a7=Be(`${sm.name}/settDigital`,async()=>await QL()),s7=sm.reducer;var ai=(e=>(e.Dialog="DIALOG",e.Oppfolging="OPPFOLGING",e.Aktivitet="AKTIVITET",e))(ai||{});const J0="uppdate";function $i(e){window.dispatchEvent(new CustomEvent(J0,{detail:{uppdate:e,avsender:"aktivitetsplan"}}))}function l7(){const e=Le();return im(J0,t=>{const r=t.detail.uppdate;if(t.detail.avsender!=="aktivitetsplan")switch(r){case"AKTIVITET":return e(Mn());case"DIALOG":return e(qr());case"OPPFOLGING":return e(_c())}}),l.jsx(l.Fragment,{})}const u7={data:[],status:te.NOT_STARTED},xy=(e,t)=>{const r=e.data.findIndex(i=>i.id===t.id),n=[...e.data];return n[r]=t,{...e,data:n}},wc=Dr({name:"arenaAktivitet",initialState:u7,reducers:{},extraReducers:e=>{e.addCase(Ln.fulfilled,(t,r)=>{t.data=r.payload,t.status=te.OK}),e.addCase(Ln.rejected,t=>{t.status=te.ERROR}),e.addCase(Q0.fulfilled,(t,r)=>($i(ai.Aktivitet),xy({...t},r.payload))),e.addCase(e_.fulfilled,(t,r)=>($i(ai.Aktivitet),xy({...t},r.payload)))}}),Ln=Be(`${wc.name}/fetchArenaAktiviteter`,async()=>await zL()),c7=["TA","UA","GA","ARENATA","ARENAUA","ARENAGA"],d7=e=>c7.some(t=>e.startsWith(t)),Q0=Be(`${wc.name}/oppdater`,async({arenaAktivitet:e,forhaandsorientering:t})=>d7(e.id)?await qL(e.id,t):await X0(e.id,e.versjon.toString(),t)),e_=Be(`${wc.name}/fho/lest`,async e=>await YL(e.id)),f7=wc.reducer,t_=gn({name:"identitet",initialState:{data:{},status:te.NOT_STARTED},reducers:{}}),lm=Be(`${t_.name}/fetchIdentitet`,async()=>await JL()),p7=t_.reducer,v7=()=>Tt(`${G0}/aktivitetsplan/les`),m7=e=>lr(`${G0}/informasjon/les?versjon=${e}`),r_=gn({name:"lest",initialState:{data:[],status:te.NOT_STARTED},reducers:{}}),n_=Be(`${r_.name}/fetchSisteLest`,async()=>await v7()),g7=r_.reducer,h7={data:{},status:te.NOT_STARTED},um=Dr({name:"mal",initialState:h7,reducers:{},extraReducers:e=>{e.addCase(ui.pending,t=>{t.status=t.status===te.NOT_STARTED?te.PENDING:te.RELOADING}),e.addCase(ui.fulfilled,(t,r)=>{t.status=te.OK,t.data=r.payload}),e.addCase(ui.rejected,t=>{t.status=te.ERROR}),e.addCase(ba.fulfilled,(t,r)=>{t.data=r.payload})}}),ui=Be(`${um.name}/fetchMal`,async()=>await t7()),ba=Be(`${um.name}/oppdaterMal`,async e=>await n7(e)),y7=um.reducer,i_=gn({name:"malListe",initialState:{data:[],status:te.NOT_STARTED},reducers:{}}),xc=Be(`${i_.name}/fetchMalListe`,async()=>await r7()),k7=i_.reducer,b7=e=>z0(`${am}/v2/person?fnr=${e}`),_7=e=>z0(`${am}/v2/person/postadresse?fnr=${e}`),w7=e=>Tt(`${am}/person/${e}/harNivaa4`),o_=gn({name:"tilgang",reducers:{}}),_a=Be(`${o_.name}/fetchHarNivaa4`,async e=>await w7(e)),x7=o_.reducer,mt=(...e)=>t=>Object.entries(t.data.errors).filter(([r,n])=>e.includes(r)).map(([r,n])=>n),S7=e=>mt(_c.rejected.type,lm.rejected.type,Mn.rejected.type,Ln.rejected.type,n_.rejected.type,qr.rejected.type,_a.rejected.type,Ir.rejected.type)(e),j7=e=>mt(bc.rejected.type)(e),T7=e=>mt(Ir.rejected.type)(e),O7=e=>mt(co.rejected.type)(e),E7=e=>mt(po.rejected.type)(e),D7=e=>mt(kc.rejected.type)(e),I7=e=>mt(fo.rejected.type)(e),R7=e=>mt(Mn.rejected.type,qr.rejected.type)(e).length===0,N7=e=>mt(ui.rejected.type,xc.rejected.type)(e),P7=e=>mt(ba.rejected.type)(e),A7=e=>mt(Zn.rejected.type)(e),C7=e=>mt(Zn.rejected.type,ka.rejected.type)(e);var a_={exports:{}};/*!
+ Copyright (c) 2018 Jed Watson.
+ Licensed under the MIT License (MIT), see
+ http://jedwatson.github.io/classnames
+*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i{const t=e.length,r=e[0];switch(r.code){case"401":return"Du er blitt logget ut. Ta vare på alt ulagret arbeid før du logger inn ved å laste siden på nytt.";case"403":return"Noe gikk dessverre galt med aktivitetsplanen. Du har ikke tilgang til å se dette"}if(t>1)return"Noe gikk dessverre galt med aktivitetsplanen. Prøv igjen senere.";switch(r.type){case Mn.rejected.type:case Ko.rejected.type:case Ln.rejected.type:return"Noe gikk galt, og du får dessverre ikke sett alle aktiviteter. Prøv igjen senere.";case _a.rejected.type:return"Noe gikk galt, og du får dessverre ikke sende forhåndsorientering. Prøv igjen senere.";case qr.rejected.type:return"Noe gikk galt, og du får dessverre ikke sett dialogmeldinger. Prøv igjen senere.";case Ir.rejected.type:return"Noe gikk galt, og du får dessverre ikke oppdatert status på aktiviteten. Prøv igjen senere.";case ba.rejected.type:return"Noe gikk galt, og du får dessverre ikke oppdatert mål. Prøv igjen senere.";case Zn.rejected.type:return"Noe gikk dessverre galt med deling av referat. Prøv igjen senere.";default:return"Noe gikk dessverre galt med aktivitetsplanen. Prøv igjen senere."}};function ur(e){const{feilmeldinger:t,inline:r=!1}=e;if(t.length===0)return null;const n=L7(t);return l.jsx("div",{className:Mt("my-4"),children:l.jsx(Ge,{variant:"error",inline:r,children:n})})}const Np=(e,t=0)=>{if(e===void 0)return;let r=3735928559^t,n=1103547991^t;for(let i=0,o;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(r^r>>>13,3266489909),(4294967296*(2097151&n)+(r>>>0)).toString()};function Fe(e,t,r){const n={name:e,fields:t,tags:r},i=`${Pt}/logger/event`,o={headers:{"Nav-Consumer-Id":"aktivitetsplan","Content-Type":"application/json"},credentials:"same-origin",method:"post",body:JSON.stringify(n)};return fetch(i,o)}const Ks="aktivitetsplan.forhandsorientering",$7="avtaltMedNavKrrKvpManuell",V7="avtaltMedNavMindreEnnSyvDager",F7="tilltakSpesialTilltakBruker",H7="aktivitetsplan.mittmal.klikk",U7="aktivitetsplan.mittmal.lagre",s_="tidbrukt.gainnpa.planen",B7="aktivitetsplan.stillingfranav.stillingslenke.klikk",K7="aktivitetsplan.antallSluttBrukere",W7="aktivitetsplan.antallVeiledere",z7="aktivitetsplan.antallBrukerIkkeOppfolging",q7="aktivitetsplan.printmodal",Y7="aktivitetsplan.printmodalprint",G7="aktivitetsplan.nyAktivitet.trykk",Z7="aktivitetsplan.omTjenesten.trykk",X7="aktivitetsplan.endreAktivitet.trykk",J7="aktivitetsplan.aktivitetfilter.opne",Q7="aktivitetsplan.vis.historisk",wa="aktivitetsplan.filter.",e6=`${wa}aktivitestype`,t6=`${wa}status`,r6=`${wa}avtalt`,n6=`${wa}etikett`,i6=`${wa}arenatEtikett`,o6="aktivitetsplan.aktivitet.flyttet",a6="aktivitetsplan.forhaandsorientering.lest";function s6(e,t){Fe(a6,{},{aktivitetType:e,lestKnappTrykket:t})}function l6(e){const t=!e||window.defaultSelectedTab==="AKTIVITETSPLAN";if(!window.aktivitesplanTimeToAktivitestavlePaint&&t){const r=performance.now();window.aktivitesplanTimeToAktivitestavlePaint=r,Fe("aktivitetsplan.timeToAktivitestavlePaintv3",{timeToAktivitestavlePaint:r},{erVeileder:e})}}function u6(e,t,r,n){const i={underOppfolging:t,veileder:Np(r),bruker:Np(n)};Fe(W7,i,{servicegruppe:e})}function c6(e,t,r){t?Fe(K7,{bruker:Np(r)},{servicegruppe:e}):Fe(z7,{},{servicegruppe:e})}function d6(){Fe(Ks,{forhandsorienteringType:F7})}function f6(e){Fe("aktivitetsplan.aktivitet.forste.avtalt.v2",{tidSidenOppfolging:e})}function l_(e,t,r){Fe(o6,{fraStatus:t.status,tilStatus:r,aktivitetType:t.type,flytteMetode:e})}function p6(e,t,r,n){return e?Fe(Ks,{forhandsorienteringType:$7,aktivitettype:n}):t?Fe(Ks,{forhandsorienteringType:V7,aktivitettype:n}):Fe(Ks,{forhandsorienteringType:r,aktivitettype:n})}function v6(e){Fe(H7,{erVeileder:e})}function m6(e){Fe(U7,{erVeileder:e})}function g6(e){Fe(B7,{erVeileder:e})}const h6="aktivitetsplan.innsikt.harBruktNivaa4",y6="aktivitetsplan.innsikt.ikkeRegistrertIKrr";function k6(e){Fe(h6,{harBruktNivaa4:e})}function b6(){Fe(y6)}function u_(e,t){const r=t?new Date(t).getTime():new Date().getTime();return Math.ceil(Math.abs(new Date(e).getTime()-r)/(1e3*3600*24))}function Sy(e){Fe(s_,{tidBruktFraRegistrert:u_(e)})}function _6(e,t){const r=t.find(n=>n.sluttDato===null);if(r){if(e.length===0){const n=r.startDato,i=new Date("2019-02-01").getTime(),o=new Date(n).getTime();ii.ressurs==="aktivitetsplan");if(n){const i=new Date(r.startDato).getTime(),o=new Date(n.tidspunkt).getTime();i{x6(e,t),S6(e,r)},[e])}function x6(e,t){const r=e.map(n=>c_(n));new Set(r).forEach(n=>{t.current.has(n)||(t.current.add(n),Fe("aktivitetsplan.feil",{feil_kategori:n},{feil_kategori_tag:n}))})}function S6(e,t){const r=e.filter(n=>n.code!=="403"&&n.code!=="401");new Set(r).forEach(n=>{const i=n.type;t.current.has(i)||(t.current.add(i),Fe("aktivitetsplan.feiltype",{feil:i,feil_kategori:c_(n)}))})}function c_(e){if(e.code==="403")return"forbidden";if(e.code==="401")return"unauthorized";switch(e.type){case lm.rejected.type:case Mn.rejected.type:case _c.rejected.type:return"critical";case Ln.rejected.type:case qr.rejected.type:case _a.rejected.type:return"degraded";default:return"unknown"}}function j6(){const e=C(S7);return w6(e),l.jsx(ur,{feilmeldinger:e})}const d_=v.createContext({dragDropManager:void 0});function Ie(e,t,...r){if(T6()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=new Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function T6(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function O6(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function E6(e,t){return e.filter(r=>r!==t)}function f_(e){return typeof e=="object"}function D6(e,t){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};e.forEach(n),t.forEach(n);const i=[];return r.forEach((o,a)=>{o===1&&i.push(a)}),i}function I6(e,t){return e.filter(r=>t.indexOf(r)>-1)}const cm="dnd-core/INIT_COORDS",Sc="dnd-core/BEGIN_DRAG",dm="dnd-core/PUBLISH_DRAG_SOURCE",jc="dnd-core/HOVER",Tc="dnd-core/DROP",Oc="dnd-core/END_DRAG";function jy(e,t){return{type:cm,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const R6={type:cm,payload:{clientOffset:null,sourceClientOffset:null}};function N6(e){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:a}=n,s=e.getMonitor(),u=e.getRegistry();e.dispatch(jy(o)),P6(r,s,u);const c=M6(r,s);if(c==null){e.dispatch(R6);return}let d=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");A6(a),d=a(c)}e.dispatch(jy(o,d));const p=u.getSource(c).beginDrag(s,c);if(p==null)return;C6(p),u.pinSource(c);const m=u.getSourceType(c);return{type:Sc,payload:{itemType:m,item:p,sourceId:c,clientOffset:o||null,sourceClientOffset:d||null,isSourcePublic:!!i}}}}function P6(e,t,r){Ie(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){Ie(r.getSource(n),"Expected sourceIds to be registered.")})}function A6(e){Ie(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function C6(e){Ie(f_(e),"Item must be an object.")}function M6(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function L6(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $6(e){for(var t=1;t{const u=H6(a,s,i,n),c={type:Tc,payload:{dropResult:$6({},r,u)}};e.dispatch(c)})}}function F6(e){Ie(e.isDragging(),"Cannot call drop while not dragging."),Ie(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function H6(e,t,r,n){const i=r.getTarget(e);let o=i?i.drop(n,e):void 0;return U6(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function U6(e){Ie(typeof e>"u"||f_(e),"Drop result must either be an object or undefined.")}function B6(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function K6(e){return function(){const r=e.getMonitor(),n=e.getRegistry();W6(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:Oc}}}function W6(e){Ie(e.isDragging(),"Cannot call endDrag while not dragging.")}function Pp(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function z6(e){return function(r,{clientOffset:n}={}){q6(r);const i=r.slice(0),o=e.getMonitor(),a=e.getRegistry(),s=o.getItemType();return G6(i,a,s),Y6(i,o,a),Z6(i,o,a),{type:jc,payload:{targetIds:i,clientOffset:n||null}}}}function q6(e){Ie(Array.isArray(e),"Expected targetIds to be an array.")}function Y6(e,t,r){Ie(t.isDragging(),"Cannot call hover while not dragging."),Ie(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n=0;n--){const i=e[n],o=t.getTargetType(i);Pp(o,r)||e.splice(n,1)}}function Z6(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function X6(e){return function(){if(e.getMonitor().isDragging())return{type:dm}}}function J6(e){return{beginDrag:N6(e),publishDragSource:X6(e),hover:z6(e),drop:V6(e),endDrag:K6(e)}}class Q6{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:r}=this.store;function n(o){return(...a)=>{const s=o.apply(t,a);typeof s<"u"&&r(s)}}const i=J6(this);return Object.keys(i).reduce((o,a)=>{const s=i[a];return o[a]=n(s),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=r,t.subscribe(this.handleRefCountChange)}}function e$(e,t){return{x:e.x+t.x,y:e.y+t.y}}function p_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function t$(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:p_(e$(t,n),r)}function r$(e){const{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:p_(t,r)}const Ao=[],fm=[];Ao.__IS_NONE__=!0;fm.__IS_ALL__=!0;function n$(e,t){return e===Ao?!1:e===fm||typeof t>"u"?!0:I6(t,e).length>0}class i${subscribeToStateChange(t,r={}){const{handlerIds:n}=r;Ie(typeof t=="function","listener must be a function."),Ie(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const a=this.store.getState(),s=a.stateId;try{s===i||s===i+1&&!n$(a.dirtyHandlerIds,n)||t()}finally{i=s}};return this.store.subscribe(o)}subscribeToOffsetChange(t){Ie(typeof t=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const r=this.registry.getSource(t);return Ie(r,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:r.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const r=this.registry.getTarget(t);if(Ie(r,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),i=this.getItemType();return Pp(n,i)&&r.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const r=this.registry.getSource(t,!0);if(Ie(r,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),i=this.getItemType();return n!==i?!1:r.isDragging(this,t)}isOverTarget(t,r={shallow:!1}){if(!t)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!Pp(i,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const s=a.indexOf(t);return n?s===a.length-1:s>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return t$(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return r$(this.store.getState().dragOffset)}constructor(t,r){this.store=t,this.registry=r}}const Ty=typeof global<"u"?global:self,v_=Ty.MutationObserver||Ty.WebKitMutationObserver;function m_(e){return function(){const r=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(r),clearInterval(n),e()}}}function o$(e){let t=1;const r=new v_(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const a$=typeof v_=="function"?o$:m_;class s${enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let n=0,i=t.length-this.index;n{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=a$(this.flush),this.requestErrorThrow=m_(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class l${call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class u${create(t){const r=this.freeTasks,n=r.length?r.pop():new l$(this.onError,i=>r[r.length]=i);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const g_=new s$,c$=new u$(g_.registerPendingError);function d$(e){g_.enqueueTask(c$.create(e))}const pm="dnd-core/ADD_SOURCE",vm="dnd-core/ADD_TARGET",mm="dnd-core/REMOVE_SOURCE",Ec="dnd-core/REMOVE_TARGET";function f$(e){return{type:pm,payload:{sourceId:e}}}function p$(e){return{type:vm,payload:{targetId:e}}}function v$(e){return{type:mm,payload:{sourceId:e}}}function m$(e){return{type:Ec,payload:{targetId:e}}}function g$(e){Ie(typeof e.canDrag=="function","Expected canDrag to be a function."),Ie(typeof e.beginDrag=="function","Expected beginDrag to be a function."),Ie(typeof e.endDrag=="function","Expected endDrag to be a function.")}function h$(e){Ie(typeof e.canDrop=="function","Expected canDrop to be a function."),Ie(typeof e.hover=="function","Expected hover to be a function."),Ie(typeof e.drop=="function","Expected beginDrag to be a function.")}function Ap(e,t){if(t&&Array.isArray(e)){e.forEach(r=>Ap(r,!1));return}Ie(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ir;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(ir||(ir={}));let y$=0;function k$(){return y$++}function b$(e){const t=k$().toString();switch(e){case ir.SOURCE:return`S${t}`;case ir.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Oy(e){switch(e[0]){case"S":return ir.SOURCE;case"T":return ir.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Ey(e,t){const r=e.entries();let n=!1;do{const{done:i,value:[,o]}=r.next();if(o===t)return!0;n=!!i}while(!n);return!1}class _${addSource(t,r){Ap(t),g$(r);const n=this.addHandler(ir.SOURCE,t,r);return this.store.dispatch(f$(n)),n}addTarget(t,r){Ap(t,!0),h$(r);const n=this.addHandler(ir.TARGET,t,r);return this.store.dispatch(p$(n)),n}containsHandler(t){return Ey(this.dragSources,t)||Ey(this.dropTargets,t)}getSource(t,r=!1){return Ie(this.isSourceId(t),"Expected a valid source ID."),r&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return Ie(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return Ie(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return Ie(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Oy(t)===ir.SOURCE}isTargetId(t){return Oy(t)===ir.TARGET}removeSource(t){Ie(this.getSource(t),"Expected an existing source."),this.store.dispatch(v$(t)),d$(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){Ie(this.getTarget(t),"Expected an existing target."),this.store.dispatch(m$(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const r=this.getSource(t);Ie(r,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=r}unpinSource(){Ie(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,r,n){const i=b$(t);return this.types.set(i,r),t===ir.SOURCE?this.dragSources.set(i,n):t===ir.TARGET&&this.dropTargets.set(i,n),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const w$=(e,t)=>e===t;function x$(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function S$(e,t,r=w$){if(e.length!==t.length)return!1;for(let n=0;n0||!S$(r,n)))return Ao;const a=n[n.length-1],s=r[r.length-1];return a!==s&&(a&&i.push(a),s&&i.push(s)),i}function T$(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O$(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function F$(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}let Iy=0;const Ws=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var H$=v.memo(function(t){var{children:r}=t,n=V$(t,["children"]);const[i,o]=U$(n);return v.useEffect(()=>{if(o){const a=h_();return++Iy,()=>{--Iy===0&&(a[Ws]=null)}}},[]),l.jsx(d_.Provider,{value:i,children:r})});function U$(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=B$(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}function B$(e,t=h_(),r,n){const i=t;return i[Ws]||(i[Ws]={dragDropManager:L$(e,t,r,n)}),i[Ws]}function h_(){return typeof global<"u"?global:window}var K$=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r};const W$=ev(K$),gi=typeof window<"u"?v.useLayoutEffect:v.useEffect;function z$(e,t,r){const[n,i]=v.useState(()=>t(e)),o=v.useCallback(()=>{const a=t(e);W$(n,a)||(i(a),r&&r())},[n,e,r]);return gi(o),[n,o]}function q$(e,t,r){const[n,i]=z$(e,t,r);return gi(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(i,{handlerIds:[a]})},[e,i]),n}function y_(e,t,r){return q$(t,e||(()=>({})),()=>r.reconnect())}function k_(e,t){const r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),v.useMemo(()=>typeof e=="function"?e():e,r)}function Y$(e){return v.useMemo(()=>e.hooks.dragSource(),[e])}function G$(e){return v.useMemo(()=>e.hooks.dragPreview(),[e])}let Id=!1,Rd=!1;class Z${receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Ie(!Id,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Id=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Id=!1}}isDragging(){if(!this.sourceId)return!1;Ie(!Rd,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Rd=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Rd=!1}}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,r){return this.internalMonitor.isOverTarget(t,r)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Nd=!1;class X${receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,r){return this.internalMonitor.subscribeToStateChange(t,r)}canDrop(){if(!this.targetId)return!1;Ie(!Nd,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Nd=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Nd=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function J$(e,t,r){const n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function Q$(e,t,r){const n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Cp(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u, or turn it into a drag source or a drop target itself.`)}function tV(e){return(t=null,r=null)=>{if(!v.isValidElement(t)){const o=t;return e(o,r),o}const n=t;return eV(n),rV(n,r?o=>e(o,r):e)}}function b_(e){const t={};return Object.keys(e).forEach(r=>{const n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const i=tV(n);t[r]=()=>i}}),t}function Ry(e,t){typeof e=="function"?e(t):e.current=t}function rV(e,t){const r=e.ref;return Ie(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?v.cloneElement(e,{ref:n=>{Ry(r,n),Ry(t,n)}}):v.cloneElement(e,{ref:t})}class nV{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,r=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return r&&this.disconnectDragSource(),this.handlerId?t?(r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),r):(this.lastConnectedDragSource=t,r):r}reconnectDragPreview(t=!1){const r=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!r){this.lastConnectedDragPreview=r;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=r,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,r,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Cp(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Cp(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=b_({dragSource:(r,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,Mp(r)?this.dragSourceRef=r:this.dragSourceNode=r,this.reconnectDragSource()},dragPreview:(r,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,Mp(r)?this.dragPreviewRef=r:this.dragPreviewNode=r,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class iV{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const r=this.dropTarget;if(this.handlerId){if(!r){this.lastConnectedDropTarget=r;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=r,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,r,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Cp(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=b_({dropTarget:(r,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,Mp(r)?this.dropTargetRef=r:this.dropTargetNode=r,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function vo(){const{dragDropManager:e}=v.useContext(d_);return Ie(e!=null,"Expected drag drop context"),e}function oV(e,t){const r=vo(),n=v.useMemo(()=>new nV(r.getBackend()),[r]);return gi(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),gi(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function aV(){const e=vo();return v.useMemo(()=>new Z$(e),[e])}class sV{beginDrag(){const t=this.spec,r=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(r):n={},n??null}canDrag(){const t=this.spec,r=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(r):!0}isDragging(t,r){const n=this.spec,i=this.monitor,{isDragging:o}=n;return o?o(i):r===t.getSourceId()}endDrag(){const t=this.spec,r=this.monitor,n=this.connector,{end:i}=t;i&&i(r.getItem(),r),n.reconnect()}constructor(t,r,n){this.spec=t,this.monitor=r,this.connector=n}}function lV(e,t,r){const n=v.useMemo(()=>new sV(e,t,r),[t,r]);return v.useEffect(()=>{n.spec=e},[e]),n}function uV(e){return v.useMemo(()=>{const t=e.type;return Ie(t!=null,"spec.type must be defined"),t},[e])}function cV(e,t,r){const n=vo(),i=lV(e,t,r),o=uV(e);gi(function(){if(o!=null){const[s,u]=Q$(o,i,n);return t.receiveHandlerId(s),r.receiveHandlerId(s),u}},[n,t,r,i,o])}function dV(e,t){const r=k_(e,t);Ie(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=aV(),i=oV(r.options,r.previewOptions);return cV(r,n,i),[y_(r.collect,n,i),Y$(i),G$(i)]}function fV(e){return v.useMemo(()=>e.hooks.dropTarget(),[e])}function pV(e){const t=vo(),r=v.useMemo(()=>new iV(t.getBackend()),[t]);return gi(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function vV(){const e=vo();return v.useMemo(()=>new X$(e),[e])}function mV(e){const{accept:t}=e;return v.useMemo(()=>(Ie(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class gV{canDrop(){const t=this.spec,r=this.monitor;return t.canDrop?t.canDrop(r.getItem(),r):!0}hover(){const t=this.spec,r=this.monitor;t.hover&&t.hover(r.getItem(),r)}drop(){const t=this.spec,r=this.monitor;if(t.drop)return t.drop(r.getItem(),r)}constructor(t,r){this.spec=t,this.monitor=r}}function hV(e,t){const r=v.useMemo(()=>new gV(e,t),[t]);return v.useEffect(()=>{r.spec=e},[e]),r}function yV(e,t,r){const n=vo(),i=hV(e,t),o=mV(e);gi(function(){const[s,u]=J$(o,i,n);return t.receiveHandlerId(s),r.receiveHandlerId(s),u},[n,t,i,r,o.map(a=>a.toString()).join("|")])}function kV(e,t){const r=k_(e,t),n=vV(),i=pV(r.options);return yV(r,n,i),[y_(r.collect,n,i),fV(i)]}function __(e){let t=null;return()=>(t==null&&(t=e()),t)}function bV(e,t){return e.filter(r=>r!==t)}function _V(e,t){const r=new Set,n=o=>r.add(o);e.forEach(n),t.forEach(n);const i=[];return r.forEach(o=>i.push(o)),i}class wV{enter(t){const r=this.entered.length,n=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=_V(this.entered.filter(n),[t]),r===0&&this.entered.length>0}leave(t){const r=this.entered.length;return this.entered=bV(this.entered.filter(this.isNodeInDocument),t),r>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class xV{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const r={};Object.keys(this.config.exposeProperties).forEach(n=>{const i=this.config.exposeProperties[n];i!=null&&(r[n]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,r)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,r){return r===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const w_="__NATIVE_FILE__",x_="__NATIVE_URL__",S_="__NATIVE_TEXT__",j_="__NATIVE_HTML__",Ny=Object.freeze(Object.defineProperty({__proto__:null,FILE:w_,HTML:j_,TEXT:S_,URL:x_},Symbol.toStringTag,{value:"Module"}));function Pd(e,t,r){const n=t.reduce((i,o)=>i||e.getData(o),"");return n??r}const Lp={[w_]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[j_]:{exposeProperties:{html:(e,t)=>Pd(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[x_]:{exposeProperties:{urls:(e,t)=>Pd(e,t,"").split(`
+`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[S_]:{exposeProperties:{text:(e,t)=>Pd(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function SV(e,t){const r=Lp[e];if(!r)throw new Error(`native type ${e} has no configuration`);const n=new xV(r);return n.loadDataTransfer(t),n}function Ad(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Lp).filter(r=>{const n=Lp[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const jV=__(()=>/firefox/i.test(navigator.userAgent)),T_=__(()=>!!window.safari);class Py{interpolate(t){const{xs:r,ys:n,c1s:i,c2s:o,c3s:a}=this;let s=r.length-1;if(t===r[s])return n[s];let u=0,c=a.length-1,d;for(;u<=c;){d=Math.floor(.5*(u+c));const m=r[d];if(mt)c=d-1;else return n[d]}s=Math.max(0,c);const f=t-r[s],p=f*f;return n[s]+i[s]*f+o[s]*p+a[s]*f*p}constructor(t,r){const{length:n}=t,i=[];for(let m=0;mt[m]{let T=new Py([0,.5,1],[u.y,u.y/d*g,u.y+g-d]).interpolate(p);return T_()&&o&&(T+=(window.devicePixelRatio-1)*g),T},b=()=>new Py([0,.5,1],[u.x,u.x/c*m,u.x+m-c]).interpolate(f),{offsetX:_,offsetY:y}=i,S=_===0||_,O=y===0||y;return{x:S?_:b(),y:O?y:h()}}class IV{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,r){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=r}}function RV(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ay(e){for(var t=1;t{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,r,n){this.sourceNodes.set(t,r),this.sourceNodeOptions.set(t,n);const i=a=>this.handleDragStart(a,t),o=a=>this.handleSelectStart(a);return r.setAttribute("draggable","true"),r.addEventListener("dragstart",i),r.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),r.removeEventListener("dragstart",i),r.removeEventListener("selectstart",o),r.setAttribute("draggable","false")}}connectDropTarget(t,r){const n=a=>this.handleDragEnter(a,t),i=a=>this.handleDragOver(a,t),o=a=>this.handleDrop(a,t);return r.addEventListener("dragenter",n),r.addEventListener("dragover",i),r.addEventListener("drop",o),()=>{r.removeEventListener("dragenter",n),r.removeEventListener("dragover",i),r.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourceNodeOptions.get(t);return Ay({dropEffect:this.altKeyPressed?"copy":"move"},r||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),r=this.sourcePreviewNodeOptions.get(t);return Ay({anchorX:.5,anchorY:.5,captureDraggingState:!1},r||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Ny).some(r=>Ny[r]===t)}beginDragNativeItem(t,r){this.clearCurrentDragSourceNode(),this.currentNativeSource=SV(t,r),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const r=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},r)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,r){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(r))}handleDragEnter(t,r){this.dragEnterTargetIds.unshift(r)}handleDragOver(t,r){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(r)}handleDrop(t,r){this.dropTargetIds.unshift(r)}constructor(t,r,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&O_(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const a=za(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:s}=i,u=Ad(s);if(this.monitor.isDragging()){if(s&&typeof s.setDragImage=="function"){const d=this.monitor.getSourceId(),f=this.sourceNodes.get(d),p=this.sourcePreviewNodes.get(d)||f;if(p){const{anchorX:m,anchorY:g,offsetX:h,offsetY:b}=this.getCurrentSourcePreviewNodeOptions(),S=DV(f,p,a,{anchorX:m,anchorY:g},{offsetX:h,offsetY:b});s.setDragImage(p,S.x,S.y)}}try{s==null||s.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(s&&!s.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:s}=i,u=Ad(s);u&&this.beginDragNativeItem(u,s)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:za(i)}),o.some(s=>this.monitor.canDropOnTarget(s))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=za(i),this.scheduleHover(o),(o||[]).some(s=>this.monitor.canDropOnTarget(s))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else Ad(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:za(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new IV(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new wV(this.isNodeInDocument)}}const PV=function(t,r,n){return new NV(t,r,n)};function AV(){return Tt(`${EL}/feature?${uS}`)}const CV={[lv]:!1},E_=gn({name:"feature",initialState:{data:CV,status:te.NOT_STARTED},reducers:{}}),MV=Be(`${E_.name}/fetchFeatures`,async()=>await AV()),LV=E_.reducer,$V=({children:e})=>{const t=Le(),r=Ue();return v.useEffect(()=>{r&&t(MV())},[]),l.jsx(l.Fragment,{children:e})},VV={dragging:!1,aktivitet:void 0},D_=Dr({name:"drag",initialState:VV,reducers:{startDragging:(e,t)=>{e.dragging=!0,e.aktivitet=t.payload},stopDragging:e=>{e.dragging=!1,e.aktivitet=void 0}}}),FV=e=>e.view.dragAndDrop,I_=e=>FV(e).aktivitet,{startDragging:HV,stopDragging:UV}=D_.actions,BV=D_.reducer,KV={data:[],status:te.NOT_STARTED};function qa(e,t,r){const n=e.data.findIndex(o=>o.id===t.id),i=[...e.data];return i[n]={...t,...r},{...e,data:i}}const WV=Dr({name:"aktivitet",initialState:KV,reducers:{},extraReducers:e=>{e.addCase(Mn.fulfilled,(t,r)=>{t.status=te.OK,t.data=r.payload.aktiviteter}),e.addCase(Ko.fulfilled,(t,r)=>{t.status=te.OK,t.data=t.data.filter(n=>n.id!==r.payload.id).concat(r.payload)}),e.addCase(bc.fulfilled,(t,r)=>{$i(ai.Aktivitet),t.status=te.OK,t.data=[...t.data,r.payload]}),e.addCase(yc.fulfilled,(t,r)=>($i(ai.Aktivitet),qa({...t},r.payload))),e.addCase(fo.fulfilled,(t,r)=>($i(ai.Aktivitet),qa({...t},r.payload))),e.addMatcher(an(kc.fulfilled,co.fulfilled,po.fulfilled),(t,r)=>qa({...t},r.payload)),e.addMatcher(an(Ir.fulfilled,ka.fulfilled,Zn.fulfilled),(t,r)=>($i(ai.Aktivitet),qa({...t},r.payload))),e.addMatcher(an(Mn.rejected,Ko.rejected),t=>{t.status=te.ERROR})}}),zV=WV.reducer,Cy={data:[],status:te.NOT_STARTED},gm=Dr({name:"versjoner",initialState:Cy,reducers:{fjernVersjoner:()=>Cy},extraReducers:e=>{e.addCase(zs.pending,t=>{t.status=t.status===te.NOT_STARTED?te.PENDING:te.RELOADING}),e.addCase(zs.fulfilled,(t,r)=>{t.data=r.payload,t.status=te.OK}),e.addCase(zs.rejected,t=>{t.status=te.ERROR}),e.addMatcher(an(co.fulfilled,hc.fulfilled,po.fulfilled,ka.fulfilled,Zn.fulfilled,yc.fulfilled,fo.fulfilled,Ir.fulfilled),(t,r)=>t.status===te.NOT_STARTED?t:{...t,data:[r.payload,...t.data]})}}),zs=Be(`${gm.name}/fetchVersjonerForAktivitet`,async e=>await KL(e)),{fjernVersjoner:My}=gm.actions,qV=gm.reducer,YV={data:[]},R_=Dr({name:"aktivitetsview",initialState:YV,reducers:{settAktivitetSomVist:(e,t)=>{e.data=[...e.data,t.payload]}}}),{settAktivitetSomVist:GV}=R_.actions,ZV=R_.reducer,XV=[Ir.rejected.type,bc.rejected.type,hc.rejected.type,co.rejected.type,po.rejected.type,fo.rejected.type,ka.rejected.type,Zn.rejected.type,kc.rejected.type,yc.rejected.type,ba.rejected.type],N_=Dr({name:"feil",initialState:{},reducers:{fjernDismissableErrors:e=>{XV.forEach(t=>{delete e[t]})}},extraReducers:e=>{e.addMatcher(t=>U0(t)&&gc(t),(t,r)=>{t[r.type]={...r.error,type:r.type}}),e.addMatcher(an(Si,H0),(t,r)=>{const n=r.type.replace("pending","rejected").replace("fulfilled","rejected");delete t[n]})}}),{fjernDismissableErrors:JV}=N_.actions,QV=N_.reducer,eF={aktivitetTyper:{ARENA_TILTAK:!1,BEHANDLING:!1,EGEN:!1,GRUPPEAKTIVITET:!1,IJOBB:!1,MIDLERTIDIG_LONNSTILSKUDD:!1,MOTE:!1,SAMTALEREFERAT:!1,SOKEAVTALE:!1,STILLING:!1,STILLING_FRA_NAV:!1,TILTAKSAKTIVITET:!1,UTDANNINGSAKTIVITET:!1,VARIG_LONNSTILSKUDD:!1},aktivitetEtiketter:{AVSLAG:!1,CV_DELT:!1,IKKE_FATT_JOBBEN:!1,INGEN_VALGT:!1,INNKALT_TIL_INTERVJU:!1,JOBBTILBUD:!1,SKAL_PAA_INTERVJU:!1,SOKNAD_SENDT:!1,VENTER:!1},arenaAktivitetEtiketter:{AKTUELL:!1,AVSLAG:!1,IKKAKTUELL:!1,IKKEM:!1,INFOMOETE:!1,JATAKK:!1,NEITAKK:!1,TILBUD:!1,VENTELISTE:!1},aktivitetStatus:{AVBRUTT:!1,BRUKER_ER_INTERESSERT:!1,FULLFORT:!1,GJENNOMFORES:!1,PLANLAGT:!1},aktivitetAvtaltMedNav:{AVTALT_MED_NAV:!1,IKKE_AVTALT_MED_NAV:!1},historiskPeriode:null},P_=Dr({name:"filter",initialState:eF,reducers:{toggleAktivitetsType:(e,t)=>{e.aktivitetTyper[t.payload]=!e.aktivitetTyper[t.payload]},toggleAktivitetsEtikett:(e,t)=>{e.aktivitetEtiketter[t.payload]=!e.aktivitetEtiketter[t.payload]},toggleArenaAktivitetsEtikett:(e,t)=>{e.arenaAktivitetEtiketter[t.payload]=!e.arenaAktivitetEtiketter[t.payload]},velgHistoriskPeriode:(e,t)=>{e.historiskPeriode=t.payload},toggleAktivitetsStatus:(e,t)=>{e.aktivitetStatus[t.payload]=!e.aktivitetStatus[t.payload]},toggleAktivitetAvtaltMedNav:(e,t)=>{e.aktivitetAvtaltMedNav[t.payload]=!e.aktivitetAvtaltMedNav[t.payload]}}}),{toggleAktivitetsEtikett:A_,toggleAktivitetsStatus:C_,toggleArenaAktivitetsEtikett:M_,toggleAktivitetsType:L_,toggleAktivitetAvtaltMedNav:$_,velgHistoriskPeriode:tF}=P_.actions,rF=P_.reducer,nF=e=>ya(`${TL}/mal`,{type:e}),hm=Dr({name:"malverk",initialState:{malverker:[],valgtMalverk:{},status:te.NOT_STARTED},reducers:{settValgtMalverk:(e,t)=>{e.valgtMalverk=t.payload},slettValgtMalverk:e=>{e.valgtMalverk={}}},extraReducers:e=>{e.addCase(qs.pending,t=>{t.status=t.status===te.NOT_STARTED?te.PENDING:te.RELOADING}),e.addCase(qs.fulfilled,(t,r)=>{t.malverker=r.payload,t.status=te.OK}),e.addCase(qs.rejected,t=>{t.status=te.ERROR})}}),qs=Be(`${hm.name}/fetchMalverkMedType`,async e=>await nF(e)),{settValgtMalverk:iF,slettValgtMalverk:oF}=hm.actions,aF=hm.reducer,V_=gn({name:"eskaleringsvarsel",reducers:{}}),sF=Be(`${V_.name}/fetchEskaleringsvarsel`,async()=>await RL()),lF=V_.reducer,uF=()=>Tt(`${OL}/veileder/me`),F_=gn({name:"veileder",reducers:{}}),cF=Be(`${F_.name}/fetchVeilederInfo`,async()=>await uF()),dF=F_.reducer,fF={data:Ip({aktiviteter:zV,arenaAktiviteter:f7,dialog:PL,filter:rF,identitet:p7,mal:y7,malListe:k7,oppfolging:s7,tilgang:x7,versjoner:qV,malverk:aF,lest:g7,auth:wL,veileder:dF,eskaleringsvarsel:lF,feature:LV,errors:QV}),view:Ip({visteAktiviteterMedEndringer:ZV,dragAndDrop:BV})},pF=()=>oL({reducer:fF}),H_=k.createContext(!1),Ue=()=>v.useContext(H_),U_=k.createContext(void 0),B_=()=>v.useContext(U_),wY=({children:e,setFnrRef:t,fnr:r})=>{const[n,i]=v.useState(r);v.useEffect(()=>{t&&t(i)},[]);const o=v.useMemo(pF,[n]);return l.jsx(U_.Provider,{value:n,children:l.jsx(H_.Provider,{value:n!==void 0,children:l.jsx(vM,{store:o,children:l.jsx(H$,{backend:PV,children:l.jsx($V,{children:e})})})})})};function ji(e){return e.data.filter}function xa(e){return ji(e).historiskPeriode}function K_(e){return ji(e).aktivitetTyper}function W_(e){return ji(e).aktivitetEtiketter}function z_(e){return ji(e).arenaAktivitetEtiketter}function q_(e){return ji(e).aktivitetStatus}function Y_(e){return ji(e).aktivitetAvtaltMedNav}function ym(e){return!xa(e)}function Sa(e){return!ym(e)}function km(e){return e.data.oppfolging}function Rr(e){return km(e).data}function Ti(e){return km(e).status}const ja=e=>{var t;return(t=Rr(e))==null?void 0:t.reservasjonKRR};function vF(e){var t;return(t=Rr(e))==null?void 0:t.servicegruppe}function mo(e){var t;return((t=Rr(e))==null?void 0:t.oppfolgingsPerioder)||[]}function mF(e){return mo(e).find(t=>!t.sluttDato)}function bm(e){let t=new Date().toISOString();return Z_(e).sort((r,n)=>r.sluttDato.localeCompare(n.sluttDato)).map(r=>{const{sluttDato:n}=r,i=t;return t=n,{...r,fra:i,til:n}}).reverse()}function gF(e){let t=xa(e);t||(t=mF(e)??bm(e)[0]);const r=t&&t.uuid,n=mo(e).find(i=>i.uuid===r);return n&&n.kvpPerioder}function Ut(e){var t;return((t=Rr(e))==null?void 0:t.underOppfolging)||!1}function Ta(e){var t;return(t=Rr(e))==null?void 0:t.manuell}function hF(e){var t;return(t=Rr(e))==null?void 0:t.aktorId}function _m(e){var t;return(t=Rr(e))==null?void 0:t.underOppfolging}function G_(e){var t;return(t=Rr(e))==null?void 0:t.underKvp}function Oa(e){var t;return(t=Rr(e))==null?void 0:t.harSkriveTilgang}function yF(e){var t;return(t=Rr(e))==null?void 0:t.kanReaktiveres}function kF(e){var t;return(t=Rr(e))==null?void 0:t.inaktiveringsdato}const Z_=pc(mo,e=>e.filter(t=>t.sluttDato)),X_=pc(Z_,e=>e.map(t=>t.sluttDato).sort().reverse()[0]);function wm(e){return e.data.tilgang}function Ly(e){return wm(e).data}function xm(e){return Ly(e)?Ly(e).harbruktnivaa4:!1}function bF(e){return J_(e)===te.OK}function J_(e){return wm(e).status}function _F(e){return wm(e).status===te.ERROR?mt(_a.rejected.type)(e):[]}const wF=()=>l.jsxs(Mu,{placement:"bottom",children:["Denne brukeren har ikke vært innlogget de siste 18 månedene med nivå 4 (for eksempel BankID). ",l.jsx("br",{}),"Du kan derfor ikke sende forhåndsorientering, varsel og meldinger."]}),xF=()=>{const e=C(xm),t=C(bF),r=C(ja),n=Ue(),i=C(Ta),o=C(km).data,a=C(Ti)===te.OK;return v.useEffect(()=>{if(a&&n){const{reservasjonKRR:s,manuell:u,kanVarsles:c}=o;!s&&!u&&!c&&b6()}},[o,n,a]),v.useEffect(()=>{t&&n&&k6(e)},[e,n,t]),e||!t||i||r?null:l.jsx("div",{className:"m-4",children:l.jsxs(Ge,{variant:"warning",children:["Denne brukeren kan ikke logge inn i aktivitetsplan og dialog.",l.jsx(wF,{})]})})},Oi=e=>e?`/${e}`:"",SF=(e,t)=>Oi(t)+`/aktivitet/vis/${e}`,jF=e=>`${Oi(e)}/aktivitet/ny`,TF=(e,t)=>Oi(t)+`/aktivitet/endre/${e}`,OF=(e,t)=>Oi(t)+`/aktivitet/fullfor/${e}`,EF=(e,t)=>Oi(t)+`/aktivitet/avbryt/${e}`,DF=e=>`${e?`/${e}`:"/"}`,IF=e=>Oi(e)+"/mal",RF=e=>Oi(e)+"/informasjon",Ot=()=>{const e=B_();return{aktivitetRoute:t=>SF(t,e),nyAktivitetRoute:()=>jF(e),endreAktivitetRoute:t=>TF(t,e),fullforAktivitetRoute:t=>OF(t,e),avbrytAktivitetRoute:t=>EF(t,e),hovedsideRoute:()=>DF(e),malRoute:()=>IF(e),informasjonRoute:()=>RF(e)}};function Q_(e){return e.data.identitet}function Dc(e){return Q_(e).data}function cr(e){return Dc(e).erBruker}function NF(e){return Dc(e).id}function Ic(e){return Q_(e).status}function e1(e){return e.data.lest}function PF(e){return e1(e).data}function t1(e,t){return PF(e).filter(r=>r.ressurs===t)[0]}function r1(e){return t1(e,"informasjon")}function n1(e){return t1(e,"aktivitetsplan")}function i1(e){return e1(e).status}function o1(e){return Array.isArray(e)?e:[e]}const Rc=(...e)=>t=>o1(e).includes(t),$y=e=>e.some(Rc(te.ERROR)),a1=e=>e.some(Rc(te.OK)),AF=e=>e.every(Rc(te.OK,te.RELOADING)),CF=e=>e.every(Rc(te.OK)),s1=e=>e?o1(e).map(t=>!t||typeof t=="string"?t:t.status).map(t=>t||"NOT_SETT"):[],Wt=e=>{const{avhengigheter:t,spinnerSize:r="2xlarge",className:n,children:i,minstEn:o=!1,visChildrenVedFeil:a=!1,alleOK:s=!1,...u}=e,c=s1(t);return(s?CF(c):AF(c)||o&&a1(c)||a&&$y(c))?typeof i=="function"?i(t,u):(Array.isArray(i),i):$y(c)?null:l.jsx("div",{className:"flex-1 flex items-center justify-center",children:l.jsx(xu,{size:r,className:Mt(n,"m-3")})})};let Vy=0;function MF(e){const[t,r]=v.useState(e),n=e||t;return v.useEffect(()=>{t==null&&(Vy+=1,r(`aksel-icon-${Vy}`))},[t]),n}const Fy=k["useId"];function er(e){var t;if(Fy!==void 0){const r=Fy();return e??r.replace(/(:)/g,"")}return(t=MF(e))!==null&&t!==void 0?t:""}var LF=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=LF(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.25 5a.25.25 0 0 1 .25-.25h5a.25.25 0 0 1 .25.25v1.25h-5.5V5Zm-1.5 1.25V5c0-.966.784-1.75 1.75-1.75h5c.966 0 1.75.784 1.75 1.75v1.25h4.25c.69 0 1.25.56 1.25 1.25v5c0 .69-.56 1.25-1.25 1.25h-.25v4.75c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25v-4.75H3.5c-.69 0-1.25-.56-1.25-1.25v-5c0-.69.56-1.25 1.25-1.25h4.25Zm5 7.5h6v4.5H5.25v-4.5h6V15a.75.75 0 0 0 1.5 0v-1.25Zm0-2.75v1.25h7.5v-4.5H3.75v4.5h7.5V11a.75.75 0 0 1 1.5 0Z",fill:"currentColor"}))}),VF=$F;var FF=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=FF(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.75 6c0-.69.56-1.25 1.25-1.25h12c.69 0 1.25.56 1.25 1.25v9c0 .69-.56 1.25-1.25 1.25H9a.75.75 0 0 0-.386.107L4.75 18.675V6ZM6 3.25A2.75 2.75 0 0 0 3.25 6v14a.75.75 0 0 0 1.136.643l4.822-2.893H18A2.75 2.75 0 0 0 20.75 15V6A2.75 2.75 0 0 0 18 3.25H6Zm3 6.5a.75.75 0 0 0 0 1.5h.01a.75.75 0 0 0 0-1.5H9Zm2.25.75a.75.75 0 0 1 .75-.75h.01a.75.75 0 0 1 0 1.5H12a.75.75 0 0 1-.75-.75ZM15 9.75a.75.75 0 0 0 0 1.5h.01a.75.75 0 0 0 0-1.5H15Z",fill:"currentColor"}))}),UF=HF;var BF=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=BF(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.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"}))}),WF=KF;var zF=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=zF(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.53 5.97a.75.75 0 0 1 0 1.06L9.56 12l4.97 4.97a.75.75 0 1 1-1.06 1.06l-5.5-5.5a.75.75 0 0 1 0-1.06l5.5-5.5a.75.75 0 0 1 1.06 0Z",fill:"currentColor"}))}),YF=qF;var GF=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=GF(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.47 5.97a.75.75 0 0 1 1.06 0l5.5 5.5a.75.75 0 0 1 0 1.06l-5.5 5.5a.75.75 0 1 1-1.06-1.06L14.44 12 9.47 7.03a.75.75 0 0 1 0-1.06Z",fill:"currentColor"}))}),XF=ZF;var JF=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=JF(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.47 7.97a.75.75 0 0 1 1.06 0l5.5 5.5a.75.75 0 1 1-1.06 1.06L12 9.56l-4.97 4.97a.75.75 0 0 1-1.06-1.06l5.5-5.5Z",fill:"currentColor"}))}),e9=QF;var t9=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=t9(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.5 1.75a.75.75 0 0 1 .75.75v2.464a9.75 9.75 0 1 1 12.342 15.023.75.75 0 1 1-.86-1.229A8.251 8.251 0 1 0 6.084 6.25H9a.75.75 0 0 1 0 1.5H4.5A.75.75 0 0 1 3.75 7V2.5a.75.75 0 0 1 .75-.75Zm7.5 3.5a.75.75 0 0 1 .75.75v5.69l2.28 2.28a.75.75 0 1 1-1.06 1.06l-2.5-2.5a.75.75 0 0 1-.22-.53V6a.75.75 0 0 1 .75-.75Zm-9 6a.75.75 0 0 1 .75.75c0 .439.035.877.105 1.31a.75.75 0 0 1-1.481.24A9.75 9.75 0 0 1 2.25 12a.75.75 0 0 1 .75-.75Zm1.855 4.875a.75.75 0 0 0-1.299.75c.26.45.555.877.882 1.28a.75.75 0 1 0 1.163-.947 8.252 8.252 0 0 1-.746-1.083Zm1.995 3.294a.75.75 0 0 1 1.025-.274c.38.22.777.408 1.188.564a.75.75 0 0 1-.535 1.402 9.738 9.738 0 0 1-1.403-.667.75.75 0 0 1-.275-1.025Zm6.7 2.207a.75.75 0 0 0-.24-1.48c-.433.069-.871.104-1.31.104a.75.75 0 0 0 0 1.5c.519 0 1.037-.041 1.55-.124Z",fill:"currentColor"}))}),n9=r9;var i9=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=i9(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.5 2.25a.75.75 0 0 1 .75.75v2.25H17a.75.75 0 0 1 .6.3l3 4c.2.267.2.633 0 .9l-3 4a.75.75 0 0 1-.6.3h-4.75V21a.75.75 0 0 1-1.5 0v-6.25H4a.75.75 0 0 1-.6-1.2L6.063 10 3.4 6.45a.75.75 0 0 1 .6-1.2h6.75V3a.75.75 0 0 1 .75-.75Zm0 11h5.125L19.063 10l-2.438-3.25H5.5l2.1 2.8c.2.267.2.633 0 .9l-2.1 2.8h6Z",fill:"currentColor"}))}),a9=o9;var s9=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=s9(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.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.5ZM6.75 11a.25.25 0 0 1 .25-.25h10a.25.25 0 0 1 .25.25v8.25H6.75V11ZM12 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"}))}),u9=l9;var c9=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=c9(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.638 4.418a3.252 3.252 0 0 0-4.608-.009l-9.378 9.379a.75.75 0 0 0-.191.324l-1.414 4.95a.75.75 0 0 0 .925.927l4.94-1.398a.75.75 0 0 0 .327-.191l9.39-9.391a3.252 3.252 0 0 0 .009-4.591ZM16.09 5.47a1.752 1.752 0 0 1 2.478 2.478l-.23.23-2.478-2.479.23-.23ZM14.8 6.76 6.85 14.71l-.991 3.47 3.457-.979 7.963-7.963L14.8 6.76Z",fill:"currentColor"}))}),f9=d9;var p9=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=p9(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 3.75v16.5h12.5V3.75H5.75Zm-1.5-.25c0-.69.56-1.25 1.25-1.25h13c.69 0 1.25.56 1.25 1.25v17c0 .69-.56 1.25-1.25 1.25h-13c-.69 0-1.25-.56-1.25-1.25v-17ZM12 7.25a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5ZM8.25 9.5a3.75 3.75 0 1 1 7.5 0 3.75 3.75 0 0 1-7.5 0Zm1.805 7.055a2.75 2.75 0 0 1 4.667 1.552.75.75 0 1 0 1.484-.214 4.25 4.25 0 0 0-8.413 0 .75.75 0 0 0 1.485.214 2.75 2.75 0 0 1 .777-1.552Z",fill:"currentColor"}))}),m9=v9;var g9=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=g9(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 5.5a.75.75 0 0 0-1.5 0v5.75H5.5a.75.75 0 0 0 0 1.5h5.75v5.75a.75.75 0 0 0 1.5 0v-5.75h5.75a.75.75 0 0 0 0-1.5h-5.75V5.5Z",fill:"currentColor"}))}),y9=h9;var k9=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i{var{title:r,titleId:n}=e,i=k9(e,["title","titleId"]);let o=er();return o=r?n||"title-"+o:void 0,v.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:t,"aria-labelledby":o},i),r?v.createElement("title",{id:o},r):null,v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.25 3A.75.75 0 0 1 7 2.25h10a.75.75 0 0 1 .75.75v4.25H20c.966 0 1.75.784 1.75 1.75v9a.75.75 0 0 1-.75.75h-3.25V21a.75.75 0 0 1-.75.75H7a.75.75 0 0 1-.75-.75v-2.25H3a.75.75 0 0 1-.75-.75V9c0-.966.784-1.75 1.75-1.75h2.25V3Zm0 14.25V12a.75.75 0 0 1 .75-.75h10a.75.75 0 0 1 .75.75v5.25h2.5V9a.25.25 0 0 0-.25-.25H4a.25.25 0 0 0-.25.25v8.25h2.5Zm10-13.5v3.5h-8.5v-3.5h8.5Zm-8.5 16.5v-7.5h8.5v7.5h-8.5ZM9.25 15a.75.75 0 0 1 .75-.75h4a.75.75 0 0 1 0 1.5h-4a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h2.5a.75.75 0 0 0 0-1.5H10Z",fill:"currentColor"}))}),_9=b9,w9=e=>{const{tekst:t,onClick:r}=e;return l.jsx(ct,{onClick:r,className:"hover:cursor-pointer",children:t})},Ea=e=>{const{tilbakeTekst:t,headerTekst:r,className:n,onTilbakeClick:i,aktivitetErLaast:o=!1,...a}=e;return l.jsxs("div",{className:Mt("flex space-x-2",n),...a,children:[o?l.jsxs("div",{className:"flex items-center",children:[l.jsx(u9,{fontSize:"1.5rem"}),l.jsx("span",{"aria-live":"assertive",className:"sr-only",children:o?"Denne aktiviteten kan ikke redigeres.":""})]}):null,t&&i&&l.jsx(w9,{tekst:t,onClick:i}),r&&l.jsx(ce,{children:r})]})},Xn=e=>{const{header:t=l.jsx(Ea,{}),children:r,avhengigheter:n,onRequestClose:i,className:o,minstEnAvhengighet:a=!1,feilmeldinger:s,contentClass:u,ariaLabelledby:c,contentLabel:d}=e,f=_t(),{hovedsideRoute:p}=Ot(),m=()=>{if(i){i();return}f(p())};return l.jsx(Gi,{open:!0,"aria-label":d,"aria-labelledby":d?void 0:c||"modal-heading",className:Mt("aktivitet-modal lg:w-120 p-4 md:p-8 max-h-full overscroll-contain w-full rounded-none lg:rounded",o,u),overlayClassName:"p-0 items-stretch lg:items-center lg:py-10",onClose:m,children:l.jsxs("div",{className:"flex flex-col max-w-2xl mx-auto",children:[t,s&&l.jsx(ur,{feilmeldinger:s}),l.jsx(Wt,{className:"flex m-auto my-8",minstEn:a,avhengigheter:n,children:r})]})})},l1=e=>{const{className:t,children:r}=e;return l.jsx("div",{className:Mt(t,"modal-container"),children:r})},x9=F.shape({tittel:F.string,fraDato:F.string,tilDato:F.string,opprettetDato:F.string.isRequired,endretDato:F.string,historisk:F.bool,endretAvType:F.string,detaljer:F.object,beskrivelse:F.string,avtalt:F.bool,tiltaksarrangor:F.string,deltakelsesprosent:F.number,dagerPerUke:F.number});F.arrayOf(x9);const S9=F.shape({dialogId:F.string.isRequired,tekst:F.string.isRequired,avsender:F.string.isRequired,avsenderId:F.string,sendt:F.string.isRequired,lest:F.bool.isRequired});F.shape({id:F.string.isRequired,overskrift:F.string.isRequired,aktivitetId:F.string,lest:F.bool,sisteDato:F.string,sisteTekst:F.string,erLestAvBruker:F.bool,venterPaSvar:F.bool,ferdigBehandlet:F.bool,henvendelser:F.arrayOf(S9).isRequired,egenskaper:F.arrayOf(F.string)});F.shape({id:F.string,type:F.string,visningsTekst:F.string});const j9=F.shape({status:F.string,data:F.any}),T9=F.oneOf(Object.keys(te)),O9=F.oneOfType([j9,T9]),E9=F.arrayOf(O9),D9=F.shape({kanAvslutte:F.bool,underOppfolging:F.bool,harYtelser:F.bool,harTiltak:F.bool,underKvp:F.bool,inaktiveringsDato:F.string}),I9=F.shape({varselId:F.number,aktorId:F.string,opprettetAv:F.string,opprettetDato:F.string,avsluttetDato:F.string,tilhorendeDialogId:F.number});F.shape({status:F.string,data:F.shape({fnr:F.string,veileder:F.string,reservasjonKRR:F.bool,manuell:F.bool,underOppfolging:F.bool,oppfolgingUtgang:F.string,gjeldendeEkskaleringsvarsel:I9,kanStarteOppfolging:F.bool,underKvp:F.bool,avslutningStatus:D9,oppfolgingsPerioder:F.arrayOf(F.object),harSkriveTilgang:F.bool})});const R9=F.shape({mal:F.string,endretAv:F.string,dato:F.string});F.arrayOf(R9);F.shape({status:F.string,data:F.shape({navn:F.string})});F.shape({id:F.string,fra:F.string,vistFra:F.string,til:F.string});F.shape({type:F.string,httpStatus:F.number,melding:F.shape({id:F.string,type:F.string.isRequired,detaljer:F.object})});F.shape({etternavn:F.string,fornavn:F.string,ident:F.string,navn:F.string});F.shape({overskrift:F.string,beskrivelse:F.string});F.oneOf([tv,Su,io,rv,ju,nv,Tu,aa,Yt,ar]);const N9=F.shape({type:F.string,tittel:F.string,hensikt:F.string,antallStillingerSokes:F.number,avtaleOppfolging:F.string,oppfolging:F.string,beskrivelse:F.string,lenke:F.string,status:F.string,fraDato:F.string,tilDato:F.string}),P9=F.shape({tidspunkt:F.string.isRequired,verdi:F.string,ressurs:F.string.isRequired}),A9=()=>l.jsxs(ee.Item,{className:"first:border-t-2 first:border-border-divider",children:[l.jsx(ee.Header,{children:l.jsx(oe,{level:"2",size:"small",children:"Slik bruker du aktivitetsplanen"})}),l.jsxs(ee.Content,{children:[l.jsx(ce,{className:"pb-4",children:"Bestem deg først for hva som er målet ditt. Du kan endre dette senere. Vurder så hvilke aktiviteter du ønsker å gjøre for å nå målet, for eksempel å søke jobber, gjennomføre et kurs eller arbeidstrening."}),l.jsx(ce,{children:"I aktivitetsplanen kan du og veilederen din samarbeide om hva som skal til for at du skal komme i aktivitet eller jobb. Du og veilederen din ser den samme planen."}),l.jsx(oe,{level:"3",size:"xsmall",className:"pt-4",children:"Avtalt med NAV"}),l.jsx(ce,{children:"Når du har avtalt å gjennomføre en aktivitet med veilederen din, vil veilederen merke den «Avtalt med NAV». Du må gjennomføre slike aktiviteter. Hvis du ikke følger opp avtalte aktiviteter, kan du risikere å miste pengestøtte fra NAV."}),l.jsx(oe,{level:"3",size:"xsmall",className:"pt-4",children:"Flytte på en aktivitet"}),l.jsx(ce,{children:"Aktivitetsplanen har fem kolonner med statusene forslag, planlegger, gjennomfører, fullført og avbrutt. Statusen på aktiviteten viser til hvor langt du har kommet i gjennomføringen. Du kan oppdatere statusen inne i aktiviteten, for eksempel fra «gjennomfører» til «fullført»."}),l.jsx(oe,{level:"3",size:"xsmall",className:"pt-4",children:"Blå prikk"}),l.jsx(ce,{children:"Hvis du ser at en aktivitet er merket med blå prikk, er det veilederen din som har gjort noe nytt siden sist du var inne i aktiviteten."}),l.jsx(oe,{level:"3",size:"xsmall",className:"pt-4",children:"Tidligere planer"}),l.jsx(ce,{children:"Hvis du har vært registrert hos NAV før, kan du se aktivitetsplanen fra denne perioden."})]})]}),C9=()=>l.jsxs(ee.Item,{children:[l.jsx(ee.Header,{children:l.jsx(oe,{level:"2",size:"small",children:"Aktivitetsplanen handler ikke om økonomi"})}),l.jsxs(ee.Content,{children:[l.jsx(ce,{children:"Aktivitetsplanen og dialogen skal bare handle om jobbrettede aktiviteter. Har du spørsmål om økonomisk støtte, økonomisk sosialhjelp, boligsituasjon eller andre ting som ikke handler om å komme i jobb, kan du"}),l.jsxs("ul",{className:"list-disc mt-4 pl-8",children:[l.jsx("li",{children:l.jsxs(ce,{children:["kontakte NAV i tjenesten"," ",l.jsx(ct,{href:"https://www.nav.no/person/kontakt-oss/skriv-til-oss",children:"«Skriv til oss»"})]})}),l.jsxs("li",{children:[l.jsx(ce,{children:"ringe NAV på 55 55 33 33"})," "]})]})]})]});function M9(){return l.jsxs(ee.Item,{children:[l.jsx(ee.Header,{children:l.jsx(oe,{level:"2",size:"small",children:"Rettigheter og personvern"})}),l.jsxs(ee.Content,{children:[l.jsx(ce,{children:"Du har rett til å få en aktivitetsplan når du har registrert deg hos NAV. Informasjonen i aktivitetsplanen og annen informasjon du gir til veilederen din brukes til å vurdere ditt behov for hjelp fra NAV."}),l.jsx(oe,{level:"3",size:"xsmall",className:"pt-4",children:"Manuell oppfølging"}),l.jsx(ce,{children:"NAV henter informasjon om deg fra Folkeregisteret og sjekker mot Kontakt- og reservasjonsregisteret for å se om du har reservert deg mot digital kommunikasjon med det offentlige. Hvis du har reservert deg, eller ikke er i stand til å bruke aktivitetsplanen, vil NAV følge deg opp manuelt. Det betyr at en veileder følger deg opp, uten at du selv bruker den digitale aktivitetsplanen. Du får aktivitetsplanen skrevet ut på papir."}),l.jsx(oe,{level:"3",size:"xsmall",className:"pt-4",children:"Deling og lagring"}),l.jsx(ce,{className:"pb-4",children:"Opplysningene i aktivitetsplanen blir ikke delt med andre offentlige etater, med mindre de har rett til å hente slike opplysninger."}),l.jsx(ce,{className:"pb-4",children:"Opplysningene i aktivitetsplanen din blir lagret og oppbevart etter arkivloven. Aktiviteter og meldinger i dialogen kan ikke slettes når de først er opprettet."}),l.jsxs(ce,{children:["Les mer om"," ",l.jsx(ct,{href:"https://www.nav.no/no/NAV+og+samfunn/Om+NAV/personvern-i-arbeids-og-velferdsetaten",children:"hvordan NAV behandler personopplysninger"}),"."]})]})]})}const L9=()=>l.jsx("div",{children:l.jsx("iframe",{title:"Video: Aktivitetsplanen",src:"https://video.qbrick.com/play2/embed/qbrick-player?accountId=763558&mediaId=ddf118c6-00015227-86825a7e&configId=qbrick-player&pageStyling=adaptive&autoplay=false&repeat=false&sharing=false&download=false&volume",allow:"fullscreen",className:"pt-8 w-full h-300px"})}),$p="v1",Sm=({erBruker:e,underOppfolging:t,lestInfo:r})=>{const n=_t(),{hovedsideRoute:i}=Ot();return v.useEffect(()=>{e&&t&&(!r||r.verdi!==$p)&&m7($p)},[]),l.jsx(Xn,{className:"informasjon-visning",onRequestClose:()=>{n(i())},children:l.jsxs(l1,{className:"max-w-2xl",children:[l.jsx(oe,{id:"modal-heading",level:"1",size:"large",className:"mb-4",children:"Hva er aktivitetsplanen?"}),l.jsx(ce,{className:"pb-4",children:"I aktivitetsplanen holder du oversikt over det du gjør for å komme i jobb eller annen aktivitet. Både du og veilederen din kan se og endre aktivitetsplanen."}),l.jsxs(ce,{children:["Du kan legge inn målet ditt, aktiviteter du skal gjøre og stillinger du vil søke på. Veilederen kan blant annet legge inn forslag til aktiviteter eller skrive referat fra et møte dere har hatt. Du kan kommunisere med veilederen din om aktivitetene i"," ",l.jsx(ct,{href:"https://pto.ekstern.dev.nav.no/arbeid/dialog",children:"dialogen"}),"."]}),l.jsxs(ee,{className:"mt-4",children:[l.jsx(A9,{}),l.jsx(C9,{}),l.jsx(M9,{})]}),l.jsx(L9,{})]})})};Sm.defaultProps={lestInfo:null,erBruker:!1,underOppfolging:!1};Sm.propTypes={erBruker:F.bool,underOppfolging:F.bool,lestInfo:P9};const $9=e=>({lestInfo:r1(e),erBruker:cr(e),underOppfolging:Ut(e)}),V9=fc($9)(Sm);let Hy=!1;function F9(){const e=C(Ut,Se),t=C(i1,Se),r=C(r1,Se),n=C(cr,Se),i=C(mo,Se),o=Le();v.useEffect(()=>{i7(),e&&o(n_()).then(f=>{Si(f)&&_6(f.payload,i)})},[]);const{informasjonRoute:a,hovedsideRoute:s}=Ot(),{pathname:u}=lo(),c=u===s();return t===te.OK&&(!r||r.verdi!==$p)&&c&&n&&!Hy?(Hy=!0,l.jsx(Ku,{to:a()})):null}const u1=({visible:e})=>e?l.jsx("div",{className:"mr-2 h-2.5 w-2.5 inline bg-[#0067c5] rounded-full"}):null,H9=/((?:[\w-]+:\/\/?|www(?:-\w+)?\.)[^\s()<>]+)/g,$n=e=>{const{children:t,className:r,size:n="medium",formatLinks:i=!1,formatLinebreaks:o=!1}=e;if(!t)return null;let a=[t];i&&(a=a.flatMap(u=>typeof u=="string"?U9(u,H9,(c,d)=>{const f=c.toLowerCase().startsWith("www.")?`https://${c}`:c;return l.jsx(ct,{target:"_blank",href:f,children:`${c} (åpnes i ny fane)`},`link-${d}`)}):u));const s=Mt(r,o&&"whitespace-pre-wrap");return l.jsx(cn,{className:s,size:n,children:a})},U9=(e,t,r)=>{const n=e.match(t),i=e.split(t);return n!==null?i.map((o,a)=>n.includes(o)?r(o,a):o):[e]},Nc=e=>e.type===fe.EKSTERN_AKTIVITET_TYPE?Ql[e.eksternAktivitet.type]:Ql[e.type],Ql={EGEN:"Jobbrettet egenaktivitet",STILLING:"Stilling",TILTAKSAKTIVITET:"Tiltak gjennom NAV",GRUPPEAKTIVITET:"Gruppeaktivitet",UTDANNINGSAKTIVITET:"Utdanning",SOKEAVTALE:"Jobbsøking",IJOBB:"Jobb jeg har nå",BEHANDLING:"Behandling",MOTE:"Møte med NAV",SAMTALEREFERAT:"Samtalereferat",STILLING_FRA_NAV:"Stilling fra NAV",ARENA_TILTAK:"Tiltak gjennom NAV",MIDLERTIDIG_LONNSTILSKUDD:"Avtale midlertidig lønnstilskudd",VARIG_LONNSTILSKUDD:"Avtale varig lønnstilskudd"},hi={PLANLAGT:"Planlegger",BRUKER_ER_INTERESSERT:"Forslag",GJENNOMFORES:"Gjennomfører",FULLFORT:"Fullført",AVBRUTT:"Avbrutt"},B9={DELTID:"Deltid",HELTID:"Heltid"},c1={INTERNETT:"Videomøte",OPPMOTE:"Oppmøte",TELEFON:"Telefonmøte"},d1={AVTALT_MED_NAV:"Avtalt med NAV",IKKE_AVTALT_MED_NAV:"Ikke avtalt med NAV"},f1={INGEN_VALGT:"Ingen",SOKNAD_SENDT:"Søknaden er sendt",INNKALT_TIL_INTERVJU:"Skal på intervju",AVSLAG:"Ikke fått jobben",JOBBTILBUD:"Fått jobbtilbud"},Vp={VENTER:"Venter på å bli kontaktet",CV_DELT:"CV er delt med arbeidsgiver",SKAL_PAA_INTERVJU:"Skal på intervju",JOBBTILBUD:"Fått jobbtilbud",AVSLAG:"Ikke fått jobben",IKKE_FATT_JOBBEN:"Ikke fått jobben",FATT_JOBBEN:"Fått jobben"},p1={...f1,...Vp},v1={[xt.AKTUELL]:"Søkt inn på tiltaket",[xt.AVSLAG]:"Fått avslag",[xt.IKKAKTUELL]:"Ikke aktuell for tiltaket",[xt.IKKEM]:"Ikke møtt på tiltaket",[xt.INFOMOETE]:"Infomøte før tiltaket",[xt.JATAKK]:"Takket ja til tilbud",[xt.NEITAKK]:"Takket nei til tilbud",[xt.TILBUD]:"Fått plass på tiltaket",[xt.VENTELISTE]:"På venteliste"},K9={SOKT_INN:"Søkt inn på tiltaket",AVSLAG:"Fått avslag",IKKE_AKTUELL:"Ikke aktuell for tiltaket",IKKE_MOETT:"Ikke møtt på tiltaket",INFOMOETE:"Infomøte før tiltaket",TAKKET_JA:"Takket ja til tilbud",TAKKET_NEI:"Takket nei til tilbud",FATT_PLASS:"Fått plass på tiltaket",VENTELISTE:"På venteliste"},m1={...v1,...K9};function g1(e){return e.data.aktiviteter}function h1(e){return g1(e).data.filter(t=>t)||[]}function Zr(e){return g1(e).status}function W9(e){return Zr(e)===te.OK}function jm(e){return Zr(e)!==te.OK}const Tm=e=>Zr(e)===te.ERROR?mt(Ko.rejected.type)(e):[],z9=e=>{const t=mt(hc.rejected.type)(e),r=mt(co.rejected.type)(e),n=mt(po.rejected.type)(e),i=mt(Ir.rejected.type)(e);return[...t,...r,...n,...i]},y1=e=>e.data.arenaAktiviteter,q9=e=>y1(e).data,Pc=e=>y1(e).status,Y9=e=>Pc(e)===te.ERROR?mt(Ln.rejected.type)(e):[],k1=pc([h1,q9],(e,t)=>e.concat(t)),Ei=e=>k1(e).filter(t=>E1(t.opprettetDato,e)),Ac=e=>Ei(e).filter(t=>p8(t,e)),Cc=(e,t)=>k1(e).find(r=>r.id===t),G9=e=>({status:yL(Ti(e),Ic(e),Zr(e)),data:Ac(e)}),Mc=e=>G9(e).status,b1=(e,t)=>{if(!e)return!1;const{historisk:r,status:n,type:i}=e;return!r&&i!==fe.EKSTERN_AKTIVITET_TYPE&&(t||i!==Yt)&&n!==pe.AVBRUTT&&n!==pe.FULLFOERT},Z9=(e,t)=>{if(!e)return!1;const{historisk:r,type:n}=e;return!r&&(t||n!==Yt)},X9=(e,t)=>{if(!e||$t(e))return!1;const{avtalt:r,type:n}=e;return b1(e,t)&&(t||n!==ar)&&n!==iv&&(!r||t||n===aa)};function _1(e){return typeof e=="function"?e:()=>e}function J9(e){Object.getOwnPropertyNames(e.constructor.prototype).filter(t=>typeof e[t]=="function").forEach(t=>{e[t]=e[t].bind(e)})}function Q9(...e){return e.filter(r=>r).join(" ").split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join(" ")}function e8({hidden:e,children:t}){return e?null:t}function w1(e){return class extends k.Component{render(){const{visible:r,...n}=this.props,i=_1(r)(n);return i||i===void 0?k.createElement(e,n):null}}}function x1(e){const{children:t}=e;return l.jsx("div",{...e,children:t})}x1.propTypes={children:F.node.isRequired};const Vn=w1(x1),t8=e=>{const{filterTekst:t,nokkel:r,metrikkNavn:n,filter:i,doToggle:o}=e,[a,s]=v.useState(!1);v.useEffect(()=>{s(!!i[r])},[i,r]);const u=()=>{!i[r]&&n&&Fe(n,{filter:r}),o(r)};return l.jsx(ov,{onChange:u,checked:a,children:t})},r8={avtalt:Y_,aktivitet:K_,arenaEtikett:z_,etikett:W_,status:q_},n8={avtalt:$_,aktivitet:L_,arenaEtikett:M_,etikett:A_,status:C_},i8=e=>{const t=C(r8[e]),r=Le(),n=n8[e];return{filterState:t,toggle:o=>r(n(o))}};function Da(e){const{tekst:t,metrikkNavn:r,className:n,textMapper:i,filterKategori:o,filters:a}=e,{toggle:s,filterState:u}=i8(o),c=(a||[]).length>0,d=(a||[]).map((f,p)=>l.jsx(t8,{filterTekst:i[f],filter:u,nokkel:f,metrikkNavn:r,doToggle:s},p));return l.jsx(Vn,{visible:c,className:Mt(n,"filter"),children:l.jsxs("form",{children:[l.jsx(oe,{level:"2",size:"small",className:"filter__tittel",children:t}),d]})})}const S1=e=>e.type===fe.EKSTERN_AKTIVITET_TYPE?e.eksternAktivitet.type:e.type,o8=e=>[S1(e)];function a8(){const e=C(Ei),t=Array.from(new Set(e.flatMap(o8)));return l.jsx(Da,{filterKategori:"aktivitet",filters:t,tekst:"Aktivitetstype",metrikkNavn:e6,textMapper:Ql})}const s8=e=>e.type===fe.EKSTERN_AKTIVITET_TYPE,j1=e=>{var t,r;return((r=(t=e.eksternAktivitet)==null?void 0:t.etiketter)==null?void 0:r.map(n=>n.kode))||[]},T1=e=>[e.etikett].filter(t=>!!t),l8=()=>{const e=C(Ei),t=e.filter(s8).flatMap(j1),r=e.filter($t).flatMap(T1),n=new Set([...t,...r]);return l.jsx(Da,{filters:Array.from(n),filterKategori:"arenaEtikett",tekst:"Tiltaksstatus",metrikkNavn:i6,textMapper:m1})};function Uy(e){return!!e}const O1=e=>e.type===fe.STILLING_FRA_NAV_TYPE?[e.stillingFraNavData.soknadsstatus].map(t=>t===Vr.AVSLAG?Vr.IKKE_FATT_JOBBEN:t).filter(Uy):[e.etikett].filter(Uy),u8=()=>{const e=C(Ei),t=Array.from(new Set(e.filter(sa).flatMap(O1)));return l.jsx(Da,{filters:t,filterKategori:"etikett",tekst:"Stillingsstatus",metrikkNavn:n6,textMapper:p1})};function Ya(e){return Object.values(e).indexOf(!0)>=0}function E1(e,t){const r=xa(t),n=X_(t);return D1(e,r,n)}const c8=(e,t)=>!zr(e,t);function D1(e,t,r){const n=new Date(e);if(t){const i={start:new Date(t.startDato),end:new Date(t.sluttDato)};return aD(n,i)}return!r||c8(n,new Date(r))}const By=(e,t)=>e.every(r=>!t.includes(r)),d8=e=>Object.entries(e).filter(([t,r])=>r).map(([t,r])=>t),f8=e=>$t(e)?T1(e):Ok(e)?j1(e):[];function p8(e,t){const r=K_(t),n=S1(e);if(Ya(r)&&!r[n])return!1;const i=W_(t);if(Ya(i))return!(!sa(e)||By(O1(e),d8(i)));const o=z_(t);if(Ya(o)){const m=Object.entries(o).filter(([h,b])=>!!b).map(([h,b])=>h),g=f8(e);if(By(g,m))return!1}const a=q_(t);if(Ya(a)&&!a[e.status])return!1;const s=Y_(t),u=s.AVTALT_MED_NAV,c=s.IKKE_AVTALT_MED_NAV,{avtalt:d}=e;return!([u,c].filter(m=>m).length===1&&(u&&!d||c&&d))}function I1(e){return e.data.malListe}function v8(e){return I1(e).data}function m8(e){return I1(e).status}function Lc(e){var t;return((t=v8(e))==null?void 0:t.filter(r=>r.dato?E1(r.dato,e):!0))||[]}const R1=e=>e.data.mal,g8=e=>R1(e).data,Om=e=>R1(e).status;function $c(e){return ym(e)?g8(e):Lc(e)[0]}const h8=e=>v.createElement("svg",{width:96,height:96,viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("g",{clipPath:"url(#clip0_5085_99244)"},v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M46 0H50V12H46V0ZM46 84H50V96H46V84ZM12 50V46H0V50H12ZM96 46V50H84V46H96ZM35.1846 81.7012L31.5304 80.0742L26.6496 91.0368L30.3037 92.6637L35.1846 81.7012ZM65.6963 3.33643L69.3505 4.96337L64.4696 15.9259L60.8154 14.299L65.6963 3.33643ZM23.4931 74.4462L20.7145 71.5688L12.0824 79.9047L14.861 82.7821L23.4931 74.4462ZM81.139 13.2178L83.9177 16.0951L75.2856 24.431L72.507 21.5537L81.139 13.2178ZM15.3706 63.3401L13.8722 59.6313L2.74599 64.1266L4.24441 67.8354L15.3706 63.3401ZM91.7556 28.1646L93.254 31.8733L82.1278 36.3686L80.6294 32.6598L91.7556 28.1646ZM13.9625 35.1845L15.5895 31.5303L4.62693 26.6494L2.99999 30.3036L13.9625 35.1845ZM92.3273 65.6963L90.7003 69.3505L79.7378 64.4696L81.3647 60.8154L92.3273 65.6963ZM21.2174 23.4935L24.0947 20.7148L15.7588 12.0828L12.8815 14.8614L21.2174 23.4935ZM82.446 81.1392L79.5687 83.9178L71.2328 75.2857L74.1101 72.5071L82.446 81.1392ZM32.3236 15.371L36.0323 13.8726L31.5371 2.74635L27.8283 4.24478L32.3236 15.371ZM67.4994 91.7559L63.7907 93.2543L59.2954 82.1281L63.0041 80.6297L67.4994 91.7559ZM47 73C61.3594 73 73 61.3594 73 47C73 32.6406 61.3594 21 47 21C32.6406 21 21 32.6406 21 47C21 61.3594 32.6406 73 47 73Z",fill:"#CCF1D6"}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26 53V59.1307H39.7392C40.4227 59.1307 41.061 59.4725 41.4399 60.0414L49 71.3916L41.4399 82.7418C41.061 83.3107 40.4227 83.6524 39.7392 83.6524H26V100H23V83.6524H1.90822C1.09235 83.6524 0.605567 82.7433 1.05785 82.0643L8.16669 71.3916L1.05785 60.7188C0.605567 60.0398 1.09235 59.1307 1.90822 59.1307H23V53C23 52.1716 23.6716 51.5 24.5 51.5C25.3284 51.5 26 52.1716 26 53ZM5.60282 62.1307L11.7713 71.3916L5.60282 80.6524H39.227L45.3955 71.3916L39.227 62.1307H5.60282Z",fill:"#262626"}),v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M73 3H63C62.4477 3 62 3.44772 62 4V9H74V4C74 3.44772 73.5523 3 73 3ZM59 4V9H42C40.8954 9 40 9.89543 40 11V26C40 27.6569 41.3431 29 43 29L43 43C43 44.6569 44.3431 46 46 46H90C91.6569 46 93 44.6569 93 43V29C94.6569 29 96 27.6569 96 26V11C96 9.89543 95.1046 9 94 9H77V4C77 1.79086 75.2091 0 73 0H63C60.7909 0 59 1.79086 59 4ZM59 12H77H93V26H92H69.5V23C69.5 22.1716 68.8284 21.5 68 21.5C67.1716 21.5 66.5 22.1716 66.5 23V26H44H43L43 12H59ZM66.5 29H46V43H90V29H69.5V31C69.5 31.8284 68.8284 32.5 68 32.5C67.1716 32.5 66.5 31.8284 66.5 31V29Z",fill:"#262626"})),v.createElement("defs",null,v.createElement("clipPath",{id:"clip0_5085_99244"},v.createElement("rect",{width:96,height:96,fill:"white"}))));function y8(e){return e.disabled?l.jsx(l.Fragment,{children:"Trykk her for å se dine tidligere mål"}):e.mal?l.jsx($n,{formatLinebreaks:!0,children:e.mal}):l.jsx(l.Fragment,{children:"Du har ikke skrevet hva målet ditt er. Beskriv målet ditt, gjerne både kortsiktige og langsiktige mål og hva slags arbeidsoppgaver du ønsker deg."})}function k8(e){const{disabled:t,mal:r}=e,n=Ue(),i=_t(),{malRoute:o}=Ot(),a=()=>{i(o()),v6(n)},s=C(ym,Se);return!r&&!t?l.jsxs("div",{children:[l.jsx(ce,{children:"Skriv litt om hva som er målet ditt slik at vi kan hjelpe deg bedre."}),l.jsxs("ul",{className:"list-disc ml-6 mb-4",children:[l.jsx("li",{children:l.jsx(ce,{children:"Hva er målet på kort og på lang sikt?"})}),l.jsx("li",{children:l.jsx(ce,{children:"Hva slags jobb ønsker du deg?"})})]}),l.jsx(Ne,{onClick:a,variant:"secondary",size:"small",children:"Sett et mål"})]}):l.jsxs("div",{className:"flex flex-col items-start gap-4",children:[l.jsx(y8,{disabled:t,mal:r}),l.jsx(Ne,{onClick:a,variant:"secondary",size:"small",children:s?"Endre målet":"Se tidligere mål"})]})}function b8(){const e=Le();v.useEffect(()=>{e(ui())},[]);const t=C(Om,Se),r=C($c,Se),n=r&&r.mal,i=C(Ut,Se),o=C(Sa,Se),a=C(Oa,Se),s=!i||o||!a,u=_8(r,C(n1),C(Dc))&&a,c=t==="ERROR";return l.jsxs(l.Fragment,{children:[l.jsx(Wt,{avhengigheter:t,children:l.jsx("div",{className:Mt("border-border-default flex rounded-md p-4",{"border-2 border-dashed ":!n&&!s,border:n||s}),children:l.jsxs("div",{className:"flex sm:flex-row items-center gap-6",children:[l.jsx(h8,{"aria-hidden":!0,role:"img",className:"hidden sm:block mx-4 min-w-fit"}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex mb-2 items-center",children:[l.jsx(u1,{visible:u}),l.jsx(oe,{level:"2",size:"medium",className:"flex",children:"Mitt mål"})]}),l.jsx(k8,{disabled:s,mal:n})]})]})})}),c?l.jsx(Ge,{variant:"error",children:"Kunne ikke hente mål"}):null]})}function _8(e,t,r){if(!(e!=null&&e.mal))return!1;const n=!t,i=e.endretAv==="BRUKER"&&r.erBruker||e.endretAv==="VEILEDER"&&r.erVeileder;if(n)return!i;const o=Or(ut(e.dato),ut(t.tidspunkt));return!i&&!e.lest&&o}function Em(e){function t({hidden:r,...n}){return _1(r)(n)?null:k.createElement(e,n)}return t.defaultProps={hidden:!1},t.propTypes={hidden:F.oneOfType([F.bool,F.func])},t}function Ia(e){return Em(t=>k.createElement(e,t,t.children))}const $r=Ia("div");Ia("span");Ia("hr");const w8=Ia("section");Ia("button");const Dm=Em(Ne),x8=e=>{const{reservertIKRR:t,settDigitalFeilet:r}=e;return r?l.jsx(Ge,{variant:"warning",className:"mx-2 mb-5 max-w-2xl",children:"Feilet. Prøv igjen senere!"}):t?l.jsxs(Ge,{variant:"warning",className:"mx-2 mb-5 max-w-2xl",children:["For å ta i bruk aktivitetsplanen, må du fjerne reservasjonen din mot digital kommunikasjon. ",l.jsx(ct,{href:"https://www.norge.no/nb/digital-borgar/reservasjon",children:"Gå til Norge.no for å fjerne reservasjonen"})]}):l.jsx(Ge,{variant:"warning",className:"mx-2 mb-5 max-w-2xl",children:"Du har ikke digital oppfølging fra NAV. Du har derfor ikke en digital aktivitetsplan."})},S8=()=>{const e=C(Ti),t=C(ja),r=e===te.ERROR,n=e===te.PENDING||e===te.RELOADING,i=Le();return l.jsxs("div",{className:"flex items-center flex-col",children:[l.jsx(x8,{reservertIKRR:t,settDigitalFeilet:r}),l.jsx(Dm,{disabled:n,hidden:t,onClick:()=>i(a7()),children:"Endre til digital oppfølging"})]})},j8=e=>{const{erVeileder:t}=e,r=t?"Denne brukeren har ikke en tidligere aktivitetsplan i Modia.":"Du må være registrert hos NAV for å bruke aktivitetsplanen.";return l.jsx("div",{className:"flex items-center flex-col",children:l.jsxs(Ge,{variant:"warning",children:[l.jsx(ce,{children:r}),!t&&l.jsx(ct,{href:Yd,children:"Register deg hos NAV"})]})})},T8=e=>{const{servicegruppe:t,underOppfolging:r,ident:n,aktorId:i,children:o,manuell:a,oppfolgingsPerioder:s,reservasjonKRR:u}=e,c=Ue(),d=u||a;return v.useEffect(()=>{c?u6(t,r,n,i):c6(t,r,i)},[n,i,t,r,c]),!r&&s.length===0?l.jsx(j8,{erVeileder:c}):!c&&d?l.jsx(S8,{}):l.jsx(l.Fragment,{children:o})},O8=({children:e})=>{const t=Le(),r=[C(Ti),C(Ic)],n=Ue(),i=C(Ut),o=C(mo),a=C(Ta),s=C(ja),u=C(vF),c=C(hF),d=C(NF),f={erVeileder:n,underOppfolging:i,oppfolgingsPerioder:o,manuell:a,reservasjonKRR:s,servicegruppe:u,aktorId:c,ident:d};return v.useEffect(()=>{t(_c()),t(lm())},[]),l.jsx(Wt,{className:"mt-8",avhengigheter:r,children:l.jsx("div",{className:"w-full",children:l.jsx(T8,{...f,children:e})})})},N1=(e,t,r)=>{e.preventDefault(),window.history.pushState("","Dialog",Im(!0,t,r)),window.dispatchEvent(new CustomEvent("visDialog",{detail:{dialogId:r,aktivitetId:t}}))},Im=(e,t,r)=>{if(e){const n=ha();return r?`${Dd}${n}/${r}`:t?`${Dd}${n}/ny?aktivitetId=${t}`:`${Dd}${n}`}return r?`${Ja}/${r}`:t?`${Ja}/ny?aktivitetId=${t}`:`${Ja}`},P1=e=>{const{className:t,dialogId:r,aktivitetId:n,hidden:i,children:o}=e,a=_t(),s=Ue(),{hovedsideRoute:u}=Ot(),c=d=>{s&&(a(u(),{replace:!0}),N1(d,n,r))};return i?null:l.jsx("a",{href:Im(s,n,r),onClick:c,className:t,children:o})},E8=e=>{const{lenkeTekst:t,tekst:r,hidden:n,dialogId:i}=e;return n?null:l.jsx(Ge,{variant:"warning",className:"mb-5 mt-4",children:l.jsxs(ce,{children:[r," ",l.jsx(P1,{dialogId:i,children:t})]})})},Ky=e=>{const{hidden:t,tekst:r,lenkeTekst:n,href:i}=e;return t?null:l.jsxs(Ge,{variant:"warning",className:"mb-5 mt-4",children:[r," ",l.jsx(ct,{href:i,children:n})]})},D8=e=>{if(!e)return'Du er ikke lenger registrert hos NAV og din tidligere aktivitetsplan er lagt under "Tidligere plan". Hvis du fortsatt skal motta ytelser og få oppfølging fra NAV må du være registrert.';const t=e<=28&&e>=10,r=e<10&&e>=1;return t?"Du er ikke lenger registrert hos NAV. Hvis du fortsatt skal motta ytelser, få oppfølging fra NAV og bruke aktivitetsplanen må du være registrert.":r?`Du er ikke lenger registrert hos NAV. Hvis du fortsatt skal motta ytelser, få oppfølging fra NAV og bruke aktivitetsplanen må du være registrert. Om ${e} dager vil denne aktivitetsplanen bli avsluttet.`:'Du er ikke lenger registrert hos NAV og din tidligere aktivitetsplan er lagt under "Tidligere plan". Hvis du fortsatt skal motta ytelser og få oppfølging fra NAV må du være registrert.'},I8=e=>{const{tilhorendeDialogId:t,erEskalert:r}=e,n=C(kF,Se),i=C(Ut),o=C(yF),a=zt(new Date),s=Zt(ut(n),28),u=Dk(s,a);return l.jsxs("div",{className:"container",children:[l.jsx(E8,{lenkeTekst:"Les hva du må gjøre.",tekst:"Du har fått en viktig melding fra NAV.",dialogId:t,hidden:!r}),l.jsx(Ky,{hidden:!o,tekst:D8(u),lenkeTekst:"Gå til registrering",href:Yd}),l.jsx(Ky,{hidden:i,tekst:'Du er ikke lenger registrert hos NAV og din tidligere aktivitetsplan er lagt under "Tidligere planer". Hvis du fortsatt skal motta ytelser, få oppfølging fra NAV og bruke aktivitetsplanen må du være registrert.',lenkeTekst:"Register deg hos NAV",href:Yd})]})},A1=e=>e.data.eskaleringsvarsel,C1=e=>A1(e).data,R8=e=>A1(e).status,N8=e=>{var t;return!!((t=C1(e))!=null&&t.id)},P8=e=>!!(e&&Kt(ut(e)));function Vc(e,t){if(e){const r=typeof e=="string"?ut(e):e;return Kt(r)?Ct(r,t,{locale:Pv}):void 0}}function sn(e){return Vc(e,"PPP")}function Lt(e){return Vc(e,"PP")}function M1(e){return Vc(e,"PP 'kl' HH:mm")}function Wy(e){return Vc(e,"HH:mm")}function A8(e){const t=ut(e);return Kt(t)?Tj(t,new Date,{addSuffix:!0,locale:Pv}):void 0}function C8(e){const t=ut(e),r=Mo(Ck(),2);return Kt(t)?zr(t,r):!1}function Rm(e){const t=ut(e);return Kt(t)?Or(t,zt(Zt(new Date,7))):!1}function L1(e){const t=ut(e);if(Kt(t))return C8(e)?M1(e):A8(e)}const M8=e=>Du(new Date,ut(e)),zy=e=>e?1:0;function $1(e,t){const r=ut(e),n=ut(t);return Kt(r)&&Kt(n)?r.getTime()-n.getTime():zy(e)-zy(t)}function L8(e){return Dk(zt(ut(e)),zt(new Date))}const $8=e=>{const{tilhorendeDialogId:t,opprettetDato:r,erEskalert:n}=e;if(!n)return null;const i=Lt(r);return l.jsx("div",{className:"container",children:l.jsx(Ge,{variant:"warning",className:"mb-5",children:l.jsxs(ce,{children:["NAV har sendt varsel ",i," ",l.jsx(P1,{dialogId:t,children:"Les meldingen"})]})})})},V8=()=>{const e=C(Ic,Se),t=C(cr),r=C(R8,Se),n=C(C1,Se),i=C(N8),o=C(Ti,Se),a=t?l.jsx(I8,{tilhorendeDialogId:n==null?void 0:n.tilhorendeDialogId,erEskalert:i}):l.jsx($8,{tilhorendeDialogId:n==null?void 0:n.tilhorendeDialogId,opprettetDato:n==null?void 0:n.opprettetDato,erEskalert:i});return l.jsx(Wt,{avhengigheter:[o,e,r],children:a})},Fc=e=>e.data.dialog,Nm=e=>Fc(e).status,V1=e=>Fc(e).data,F8=e=>Fc(e).sistOppdatert,H8=pc([V1,xa,X_],(e,t,r)=>e.filter(n=>D1(n.opprettetDato,t??void 0,r))),Pm=e=>t=>V1(t).find(r=>r.aktivitetId===e);function U8(e){return Fc(e).status===te.ERROR?mt(qr.rejected.type)(e):[]}function B8(){const e=Ue(),t=C(F8,Se),r=Le();v.useEffect(()=>{const i=()=>r(qr());if(!e){let o;return o=setInterval(()=>IL().then(s=>{const u=new Date(t),c=s.sistOppdatert;s.sistOppdatert&&Or(c,u)&&i()}).catch(()=>clearInterval(o)),1e4),()=>clearInterval(o)}},[r,e,t]);const n=C(R7);return l.jsxs("div",{className:"flex flex-col gap-y-2",children:[l.jsxs("div",{className:"flex gap-y-2 gap-x-8 flex-col sm:flex-row mt-8 mb-4",children:[e?null:l.jsxs(l.Fragment,{children:[l.jsx(ct,{href:eS,children:"Min side"}),l.jsx(ct,{href:Ja,children:l.jsx("span",{children:"Min dialog med veileder"})})]}),l.jsx(Sp,{to:"informasjon",className:"text-text-action underline hover:no-underline",onClick:()=>Fe(Z7),children:"Hva er aktivitetsplanen?"}),n&&l.jsx(Sp,{to:"utskrift",className:"text-text-action underline hover:no-underline",children:"Skriv ut"})]}),l.jsx(oe,{level:"1",size:"xlarge",children:"Aktivitetsplan"})]})}function Ai(e){return t=>{e.filter(r=>r).forEach(r=>r(t))}}const Eo=e=>{if(!(e===void 0||e===""||e===null))return typeof e=="string"?new Date(e):e},Am=(e,t)=>{v.useEffect(()=>(e&&window.addEventListener("click",t),()=>window.removeEventListener("click",t)),[t])},Cm=e=>{e.stopPropagation()},K8=[pe.BRUKER_ER_INTRESSERT,pe.PLANLAGT,pe.GJENNOMFOERT,pe.FULLFOERT,pe.AVBRUTT],W8=e=>[e.status],qy=e=>K8.indexOf(e);function F1({className:e}){const t=C(Ei),r=Array.from(new Set(t.flatMap(W8))).sort((n,i)=>qy(n)-qy(i));return l.jsx(Da,{filters:r,filterKategori:"status",tekst:"Status",metrikkNavn:t6,className:e,textMapper:hi})}F1.defaultProps={className:""};function z8(){const e=C(Ei),n=e.filter(i=>i.avtalt).length>0&&e.filter(i=>!i.avtalt).length>0?["AVTALT_MED_NAV","IKKE_AVTALT_MED_NAV"]:[];return l.jsx(Da,{filterKategori:"avtalt",filters:n,tekst:"Avtalt aktivitet",metrikkNavn:r6,textMapper:d1})}const H1=()=>{const[e,t]=v.useState(!1),n=C(Ei).length>1,i=[C(Mc)],o=s1(i),a=a1(o);return Am(e,()=>t(!1)),n?l.jsxs("div",{onClick:Cm,className:"self-stretch sm:self-auto",children:[l.jsx(Ne,{disabled:!a,variant:"secondary",name:"filter",className:"relative w-full",onClick:()=>{t(!e),Fe(J7)},children:"Filtrer"}),e?l.jsxs("div",{className:"scroll-auto max-h-screen-h-1/2 rounded-md absolute p-4 bg-white border z-10 w-96 max-h-screen-h-1/2 overflow-auto flex flex-col gap-y-4",children:[l.jsx(z8,{}),l.jsx(u8,{}),l.jsx(l8,{}),l.jsx(F1,{}),l.jsx(a8,{})]}):null]}):null},U1=({harHistoriskePerioder:e,historiskPeriode:t,historiskePerioder:r,doVelgHistoriskPeriode:n,skjulInneverende:i})=>{const o=C(Ut),a=C(bm);if(v.useEffect(()=>{if(!o&&e){const u=a[0];n(u)}},[]),!e)return null;const s=u=>{const c=u.target.value;if(c==="inneverende")n(null);else{const d=r.find(f=>f.uuid===c);if(!d)return;Fe(Q7),n(d)}};return l.jsx("div",{className:"flex items-start",children:l.jsxs(Nn,{className:"w-full sm:w-64",hideLabel:!0,autoComplete:"on",defaultValue:t?t.uuid:"inneverende",label:"Periode",onChange:s,children:[i?null:l.jsx("option",{value:"inneverende",className:"filter__radio--periode",children:"Nåværende periode"}),r.map((u,c)=>{const d=Ct(new Date(u.startDato),"dd. MMM yyyy"),f=Ct(new Date(u.sluttDato),"dd. MMM yyyy");return l.jsx("option",{value:u.uuid,children:`${d} - ${f}`},c)})]})})};U1.defaultProps={historiskPeriode:null};const q8=e=>{const t=bm(e);return{historiskePerioder:t,historiskPeriode:xa(e),harHistoriskePerioder:t.length>0}},Y8=e=>({doVelgHistoriskPeriode:t=>e(tF(t))}),G8=fc(q8,Y8)(U1),Z8=({label:e,slettFilter:t})=>l.jsx(yb.Removable,{variant:"neutral","aria-label":"slett-filter",onClick:t,children:e}),B1=()=>{const e=C(ji),t=Le(),r=c=>t(A_(c)),n=c=>t(M_(c)),i=c=>t(C_(c)),o=c=>t(L_(c)),a=c=>t($_(c)),s=(c,d)=>{switch(c){case"aktivitetTyper":return{tekst:Ql[d],func:o};case"aktivitetEtiketter":return{tekst:p1[d],func:r};case"arenaAktivitetEtiketter":return{tekst:m1[d],func:n};case"aktivitetStatus":return{tekst:hi[d],func:i};case"aktivitetAvtaltMedNav":return{tekst:d1[d],func:a};default:return c}};return Object.values(e).some(c=>c?Object.values(c).some(d=>d===!0):!1)?l.jsxs("div",{className:"flex flex-wrap flex-col",children:[l.jsx(Wn,{className:"mb-2",children:"Valgte filter"}),l.jsx(yb,{children:Object.entries(e).map(([c,d])=>d===null||c==="historiskPeriode"?null:Object.entries(d).filter(([f,p])=>p).map(([f,p])=>{const m=s(c,f);return typeof m=="string"?null:l.jsx(Z8,{label:m.tekst,slettFilter:()=>{m.func(f)}},f)}))})]}):null},X8=()=>{const e=C(Ut),t=C(Sa),r=C(Oa),n=C(W9),i=_t(),{nyAktivitetRoute:o}=Ot(),a=t||!e||!r;return l.jsxs("div",{className:"flex flex-col gap-y-6",children:[l.jsxs("div",{className:"flex gap-y-4 sm:flex-row flex-col-reverse ",children:[l.jsxs("div",{className:"flex gap-4 items-start flex-col sm:flex-row w-full",children:[a?null:l.jsx(Ne,{className:"self-stretch sm:self-auto",icon:l.jsx(y9,{role:"img","aria-hidden":!0,fontSize:"1.5rem"}),disabled:!n,onClick:()=>{Fe(G7),i(o())},children:"Legg til aktivitet"}),l.jsx(H1,{})]}),l.jsx(G8,{skjulInneverende:!e})]}),l.jsx(B1,{})]})},J8=()=>{const e=Ue(),t=window.innerWidth>=992,r=!e&&!tS&&rS&&t;return v.useEffect(()=>{if(r){const n=document.createElement("script");return n.async=!0,n.src="https://uxsignals-frontend.uxsignals.app.iterate.no/embed.js",document.body.appendChild(n),()=>{try{document.body.removeChild(n)}catch{}}}},[r]),r?l.jsx("div",{"data-uxsignals-embed":"study-b6mh8y7gdw",className:"uxsignalswidget max-w-[620px] mx-auto pb-8"}):null},Q8=e=>{const{to:t,children:r,id:n,className:i,ariaLabel:o,onClick:a}=e,s=_t();return l.jsx("div",{role:"link","aria-label":o,id:n,className:i,tabIndex:0,onClick:()=>{s(t),a()},onKeyPress:u=>{u.key==="Enter"&&(s(t),a())},children:r})};function eH(e,t){return e!=null&&t==null?-1:e==null&&t!=null?1:0}function tH(e,t){return!e||!t?eH(e,t):t.localeCompare(e)}function K1(e,t){const r=$t(e)?e.fraDato:e.endretDato,n=$t(t)?t.fraDato:t.endretDato;return tH(r,n)}function rH(e){var a;const t=e.type===fe.STILLING_FRA_NAV_TYPE,r=!((a=e.stillingFraNavData)!=null&&a.cvKanDelesData),n=e.status,i=e.historisk,o=n===pe.FULLFOERT||n===pe.AVBRUTT||!!i;return t&&r&&!o}function nH(e,t,r){if(e.endretAvType==="BRUKER"&&r.erBruker||e.endretAvType==="NAV"&&r.erVeileder&&e.endretAv===r.id)return!1;if(!t)return!0;const i=ut(e.endretDato||e.opprettetDato),o=ut(t.tidspunkt);return Kt(i)&&Kt(o)?Or(i,o)&&zr(i,sv(new Date,5)):!1}function W1(e){const{fraDato:t,tilDato:r}=e;if(t&&r){const n=new Date(t),i=new Date(r),o=SS(i,n),a=Ct(n,"HH:mm");return{dato:zt(n),klokkeslett:a,varighet:o}}}const iH=e=>Eu(e)?e:new Date(e),z1=e=>{const t=e.split(":");if(t.length!=2)return!1;const[r,n]=t,i=parseInt(r),o=parseInt(n);return!isNaN(i)&&!isNaN(o)&&o<60&&i<24&&o>-1&&i>-1},eu=e=>{if(typeof e!="number"){const[t,r]=e.split(":").map(n=>parseInt(n));return{hour:t,minute:r}}else{const t=parseInt(e.toString()),r=sD(t),n=t-60*r;return{hour:r,minute:n}}};function oH(e){const{dato:t,klokkeslett:r,varighet:n}=e;if(t&&r&&z1(r)&&n!==void 0&&n!==null){const{hour:i,minute:o}=eu(r),a=jD(SD(zt(iH(t)),i),o),{hour:s,minute:u}=eu(n),c=sv(a,s*60+u);return{fraDato:a.toISOString(),tilDato:c.toISOString()}}return{}}function q1(e){if(e)if(typeof e=="number"||!isNaN(parseInt(e))){const{hour:t,minute:r}=eu(e);return`${tu(t.toString())}:${tu(r.toString())}`}else return e}const tu=e=>e.length===1?"0"+e:e;function aH(e){if(!e||!z1(e))return;const{hour:t,minute:r}=eu(e);return`${tu(t.toString())}:${tu(r.toString())}`}function sH(e,t){return e===fe.MOTE_TYPE&&!t}function lH(e,t){return e===fe.SAMTALEREFERAT_TYPE&&!t}function Y1(e,t){const{type:r,erReferatPublisert:n}=e;return!r||sH(r,n)&&t!==pe.AVBRUTT||lH(r,n)}function uH(e,t){return e===pe.AVBRUTT&&t===Yt}function cH(e,t){return e&&t===pe.AVBRUTT}function dH(e,t,r){return e&&t===pe.FULLFOERT&&r!==ar&&r!==Yt}function Mm(e,t,r){return cH(e,t)||dH(e,t,r)||uH(t,r)}function G1(e,t){return e.filter(r=>r.nesteStatus?r.nesteStatus===t:r.status===t).sort(K1)}function fH(e){const t=[e.endretDato,e.tilDato,e.fraDato].filter(n=>n!=null).find(n=>n&&Kt(ut(n))),r=t?ut(t):void 0;return r===void 0||Or(r,eb(zt(new Date),1))}const pH=e=>e.reduce((t,r)=>fH(r)?{...t,nyereAktiviteter:[...t.nyereAktiviteter,r]}:{...t,eldreAktiviteter:[...t.eldreAktiviteter,r]},{nyereAktiviteter:[],eldreAktiviteter:[]}),Z1=e=>e.view.visteAktiviteterMedEndringer.data,X1=e=>{const t=Z1(e);return t.length===0?t[t.length-1]:void 0},vH="_aktivitetskort_pnkum_1",mH="_tittel_pnkum_19",gH="_sistVist_pnkum_23",hH="_type_pnkum_27",yH="_drag_pnkum_30",kH="_frist_pnkum_37",bH="_fristUtgaat_pnkum_41",_H="_ikon_pnkum_44",wH="_flyttbar_pnkum_48",xH="_dialogIkonUtenUleste_pnkum_52",SH="_dialogIkonMedUleste_pnkum_58",pn={aktivitetskort:vH,tittel:mH,sistVist:gH,type:hH,drag:yH,frist:kH,fristUtgaat:bH,ikon:_H,flyttbar:wH,dialogIkonUtenUleste:xH,dialogIkonMedUleste:SH};function jH(e){return e<0?pn.fristUtgaat:e<14?pn.frist:""}function TH(e,t){return e===0?"Søknadsfristen går ut i dag":e===1?"Søknadsfristen går ut i morgen":e>14?`Søknadsfrist: ${Lt(t)}`:e<0?"Søknadsfristen har gått ut":`Søknadsfristen går ut om ${e} dager`}function OH({aktivitet:e}){const{tilDato:t,etikett:r}=e;if(r||!t)return null;const n=L8(t);return l.jsx(ce,{className:jH(n),children:TH(n,t)})}function EH({aktivitet:e,id:t}){const{type:r,fraDato:n,tilDato:i}=e;if(r===fe.STILLING_FRA_NAV_TYPE)return null;if(r===fe.STILLING_AKTIVITET_TYPE)return l.jsx(OH,{aktivitet:e});const o=Lt(n),a=Lt(i);function s(){return r===Yt||r===ar||r===ju&&a&&o===a?o:!n&&i?`Til: ${a}`:!i&&n?`Fra: ${o}`:[o,a].filter(u=>u).join(" - ")}return l.jsx(ce,{id:t,children:s()})}const J1=e=>l.jsx(Ge,{variant:"warning",inline:!0,className:"gap-x-2",children:e.tekst}),DH=e=>{const t=C(cr),r=rH(e);return t&&r},IH=()=>l.jsx(J1,{tekst:"Venter på svar fra deg"}),RH={SOKT_INN:{tekst:"Søkt inn på tiltaket",variant:"info"},AVSLAG:{tekst:"Fått avslag",variant:"info"},IKKE_AKTUELL:{tekst:"Ikke aktuell for tiltaket",variant:"neutral"},IKKE_MOETT:{tekst:"Ikke møtt på tiltaket",variant:"warning"},INFOMOETE:{tekst:"Infomøte før tiltaket",variant:"info"},TAKKET_JA:{tekst:"Takket ja til tilbud",variant:"info"},TAKKET_NEI:{tekst:"Takket nei til tilbud",variant:"warning"},FATT_PLASS:{tekst:"Fått plass på tiltaket",variant:"info"},VENTELISTE:{tekst:"På venteliste",variant:"info"}},NH=(e,t)=>{switch(e){case Io.ARENA_TILTAK_TYPE:return RH[t];default:return}},PH=({aktivitet:e})=>{const{etiketter:t,type:r}=e.eksternAktivitet;return t?l.jsx(l.Fragment,{children:t.map(n=>NH(r,n.kode)).map((n,i)=>n?l.jsx(ao,{variant:n.variant,size:"small",children:n.tekst},i):null)}):null},AH={SOKNAD_SENDT:{text:"Sendt søknad og venter på svar",variant:"success"},INNKALT_TIL_INTERVJU:{text:"Skal på intervju",variant:"info"},JOBBTILBUD:{text:"Fått jobbtilbud 🎉",variant:"warning"},AVSLAG:{text:"Ikke fått jobben",variant:"neutral"},INGEN_VALGT:{text:"Ikke fått jobben",variant:"neutral"}},Lm=e=>{const{aktivitet:t}=e,r=t.etikett;if(!r)return null;const{text:n,variant:i}=AH[r];return l.jsx(ao,{className:"mr-2",variant:i,size:"small",children:n})},CH={VENTER:{text:"Venter på å bli kontaktet",variant:"success"},CV_DELT:{text:"CV er delt med arbeidsgiver",variant:"info"},SKAL_PAA_INTERVJU:{text:"Skal på intervju",variant:"info"},JOBBTILBUD:{text:"Fått jobbtilbud 🎉",variant:"neutral"},AVSLAG:{text:"Ikke fått jobben",variant:"neutral"},IKKE_FATT_JOBBEN:{text:"Ikke fått jobben",variant:"neutral"},FATT_JOBBEN:{text:"Fått jobben 🎉",variant:"neutral"}},Q1=e=>{const{soknadsstatus:t}=e;if(!t)return null;const{text:r,variant:n}=CH[t];return l.jsx(ao,{variant:n,size:"small",children:r})},MH=e=>{switch(e){case xt.JATAKK:case xt.AKTUELL:case xt.TILBUD:case xt.VENTELISTE:case xt.INFOMOETE:return"info";case xt.AVSLAG:case xt.IKKAKTUELL:return"neutral";case xt.IKKEM:case xt.NEITAKK:return"warning"}},LH=e=>v1[e],ew=e=>{const{aktivitet:t}=e,r=t.etikett;if(!r)return null;const n=MH(r),i=LH(r);return l.jsx(ao,{className:"mr-2",variant:n,size:"small",children:i})},tw=e=>{const{type:t,referat:r,erReferatPublisert:n}=e;return t===ar&&!n||t===Yt&&!!r&&!n},rw=()=>{const t=C(cr)?"Samtalereferatet er ikke ferdig":"Samtalereferatet er ikke delt";return l.jsx(ao,{variant:"warning",size:"small",className:"mt-0.5",children:t})};function $H(e){const{className:t}=e;return l.jsx("svg",{"aria-label":"Ingen uleste meldinger",className:t,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",role:"img",children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 13.518L4.602 12H6v-1a4 4 0 014-4h6V4a2 2 0 00-2-2H4a2 2 0 00-2 2v9.518zM5.143 14H6v3a4 4 0 004 4h8.857L24 24V11a4 4 0 00-4-4h-2V4a4 4 0 00-4-4H4a4 4 0 00-4 4v13l5.143-3zm14.255 5L22 20.518V11a2 2 0 00-2-2H10a2 2 0 00-2 2v6a2 2 0 002 2h9.398zM11 15a1 1 0 100-2 1 1 0 000 2zm5-1a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2z",fill:"#0067C5"})})}function VH(e){const{antallUleste:t,className:r}=e,n=t>9?23:26.8;return l.jsxs("div",{children:[l.jsxs("svg",{"aria-label":"Aktiviteten har uleste meldinger",className:r,xmlns:"http://www.w3.org/2000/svg",width:"40",height:"32",focusable:"false",role:"img",children:[l.jsx("svg",{y:"8",children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 13.518L4.602 12H6v-1a4 4 0 014-4h6V4a2 2 0 00-2-2H4a2 2 0 00-2 2v9.518zM5.143 14H6v3a4 4 0 004 4h8.857L24 24V11a4 4 0 00-4-4h-2V4a4 4 0 00-4-4H4a4 4 0 00-4 4v13l5.143-3zm14.255 5L22 20.518V11a2 2 0 00-2-2H10a2 2 0 00-2 2v6a2 2 0 002 2h9.398zM11 15a1 1 0 100-2 1 1 0 000 2zm5-1a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2z",fill:"#0067C5"})}),l.jsx("circle",{opacity:"1",fill:"#c30000",cx:"30",cy:"10",r:"10"}),l.jsx("text",{x:n,y:"14.4",fill:"#fff",opacity:"1",children:t})]}),l.jsx("div",{className:"sr-only",children:"Aktiviteten har en dialog"})]})}function FH(e){const{antallUleste:t,classNameUtenUleste:r,classNameMedUleste:n}=e;return t===0?l.jsx($H,{className:r}):l.jsx(VH,{antallUleste:t,className:n})}const $m=e=>{const{hidden:t}=e;return t?null:l.jsx(ao,{className:"mr-2",variant:"alt3-filled",size:"small",children:"Avtalt med NAV"})},HH=e=>{const{hidden:t}=e;return t?null:l.jsx(J1,{tekst:"Ulest"})};var We=(e=>(e.SEND_STANDARD="SEND_FORHAANDSORIENTERING",e.SEND_PARAGRAF_11_9="SEND_PARAGRAF_11_9",e.IKKE_SEND="IKKE_SEND_FORHAANDSORIENTERING",e))(We||{});const UH=e=>{switch(e.forhaandsorienteringType){case We.SEND_STANDARD:return e.avtaltText;case We.SEND_PARAGRAF_11_9:return e.avtaltText119;case We.IKKE_SEND:return"";default:throw new Error("Ukjent avtalttype")}},Ra="Det er viktig at du gjennomfører denne aktiviteten med NAV. Gjør du ikke det, kan det medføre at stønaden du mottar fra NAV bortfaller for en periode eller stanses. Hvis du ikke kan gjennomføre aktiviteten, ber vi deg ta kontakt med veilederen din så snart som mulig.",nw="Du kan få redusert utbetaling av arbeidsavklaringspenger med én stønadsdag hvis du lar være å [komme på møtet vi har innkalt deg til [dato]/ møte på … /levere ... innen [dato]] uten rimelig grunn. Dette går fram av folketrygdloven § 11-9.",Hc=(e,t)=>{if(t===void 0)return!1;const r=t==null?void 0:t.forhaandsorientering,n=sa(t)?!t.historisk:!0;return!!(r!=null&&r.type)&&!r.lestDato&&r.type!==We.IKKE_SEND&&e&&n&&(t==null?void 0:t.status)!==pe.FULLFOERT&&(t==null?void 0:t.status)!==pe.AVBRUTT},BH=e=>{const{aktivitet:t}=e,r=C(cr),n=Hc(r,t);return!n&&!t.avtalt?null:l.jsxs("div",{children:[l.jsx(HH,{hidden:!n}),l.jsx($m,{hidden:!t.avtalt})]})},KH=({aktivitet:e})=>{const{avtalt:t,etikett:r}=e,n=C(Pm(e.id),Se),i=n?n.henvendelser:[],o=i.filter(m=>!m.lest).length,s=e.type===fe.SAMTALEREFERAT_TYPE||e.type===fe.MOTE_TYPE?tw(e):!1,u=e.type===fe.STILLING_FRA_NAV_TYPE,c=u?DH(e):!1,d=u?e.stillingFraNavData.soknadsstatus:void 0,p=e.type===fe.EKSTERN_AKTIVITET_TYPE?e.eksternAktivitet.etiketter:void 0;return t||r||n||s||c||d||p?l.jsxs("div",{className:"flex justify-between mt-2 w-full",children:[l.jsxs("div",{children:[c?l.jsx(IH,{}):null,l.jsxs("div",{className:"flex flex-col gap-y-1 items-start",children:[l.jsx(BH,{aktivitet:e}),s?l.jsx(rw,{}):null,e.type===io?l.jsx(Lm,{aktivitet:e}):null,$t(e)?l.jsx(ew,{aktivitet:e}):null,d?l.jsx(Q1,{soknadsstatus:d}):null,e.type===fe.EKSTERN_AKTIVITET_TYPE?l.jsx(PH,{aktivitet:e}):null]})]}),l.jsx($r,{hidden:!n&&i.length<=0,className:"h-0 self-end",children:l.jsx(FH,{antallUleste:o,classNameMedUleste:pn.dialogIkonMedUleste,classNameUtenUleste:pn.dialogIkonUtenUleste})})]}):null};function WH({aktivitet:e,harEndring:t,id:r}){return l.jsxs("div",{className:"flex items-baseline",children:[l.jsx(u1,{visible:t}),l.jsx(oe,{level:"3",id:r,size:"xsmall",children:e.tittel})]})}const zH=({aktivitet:e})=>l.jsx(mn,{as:"p",className:pn.type,"data-testid":e.type,children:Nc(e)});function qH({aktivitet:e}){const{arbeidsgiver:t}=e;return t?l.jsx(ce,{children:t}):null}function YH({aktivitet:e}){const{antallStillingerSokes:t,antallStillingerIUken:r}=e;return l.jsxs("div",{children:[l.jsxs(Vn,{visible:!!t&&t>0,children:["Antall søknader i perioden ",t]}),l.jsxs(Vn,{visible:!!r&&r>0,children:["Antall søknader i uken ",r]})]})}const Vm=e=>`aktivitetskort-${e.id}`,GH=e=>{var _;const{aktivitet:t,className:r}=e,{id:n,type:i}=t,o=Le(),a=C(n1,Se),s=C(i1),c=!C(Z1,Se).find(y=>t.id===y.id),d=t.id===((_=C(y=>X1(y)))==null?void 0:_.id),f=C(Dc,Se),p=s===te.OK&&sa(t)&&nH(t,a,f)&&c,{aktivitetRoute:m}=Ot(),g=`aktivitetskort__header__${n}`,h=`aktivitetskort__dato__${n}`,b=`${Nc(t)}: ${t.tittel}`;return l.jsx(Q8,{id:Vm(t),className:Mt("rounded-md",pn.aktivitetskort,r,{[pn.sistVist]:d,["border-gray-400 border"]:!d}),to:m(n),ariaLabel:b,onClick:()=>o(GV(t)),children:l.jsxs("article",{children:[l.jsx(zH,{aktivitet:t}),l.jsx(WH,{id:g,aktivitet:t,harEndring:p}),i===fe.STILLING_AKTIVITET_TYPE?l.jsx(qH,{aktivitet:t}):null,l.jsx(EH,{id:h,aktivitet:t}),i===fe.SOKEAVTALE_AKTIVITET_TYPE?l.jsx(YH,{aktivitet:t}):null,l.jsx(KH,{aktivitet:t})]})})},ZH=e=>{const[t,r]=v.useState(!1),n=new IntersectionObserver(([i])=>r(i.isIntersecting));return v.useEffect(()=>{if(e)return n.observe(e),()=>{n.disconnect()}},[]),t};function iw(e,t,r){const{type:n,status:i,nesteStatus:o}=e,a=$t(e),s=n===fe.EKSTERN_AKTIVITET_TYPE,u=a?!1:e.historisk,c=[pe.FULLFOERT,pe.AVBRUTT].includes(i),d=[ar,Yt].includes(n)&&t;return r&&!o&&!u&&!c&&!a&&!d&&!s}const Fp="AktivitetsKort";function ow({status:e,children:t}){const r=Le(),n=_t(),i=C(cr,Se),o=C(Ut,Se),a=C(I_,Se),{avbrytAktivitetRoute:s,fullforAktivitetRoute:u}=Ot(),[c,d]=kV({accept:Fp,canDrop:({aktivitet:m})=>e!==m.status&&iw(m,i,o),drop:({aktivitet:m})=>{l_("dragAndDrop",m,e),e===pe.FULLFOERT?n(u(m.id)):e===pe.AVBRUTT?n(s(m.id)):r(Ir({aktivitet:m,status:e}))},collect:m=>({canDrop:m.canDrop(),isOver:m.isOver()})}),f=!!a,p=c.canDrop&&c.isOver;return l.jsx("div",{ref:d,className:"z-50 h-full",children:l.jsx("div",{className:Mt("bg-bg-subtle border-t border-border-divider rounded-none p-4 sm:p-2 m-0 sm:border-t-0 sm:rounded-md aktivitetstavle__kolonne",{"opacity-50":f&&!p,"bg-surface-action-subtle-hover ":p}),children:t})})}function Fm(e){const{aktivitet:t}=e,r=Le(),[n,i]=dV({type:Fp,item:()=>(setTimeout(()=>r(HV(t))),{aktivitet:t,type:Fp}),end:()=>r(UV()),collect:a=>({isDragging:a.isDragging()})}),o=Mt(n.isDragging&&pn.drag,pn.flyttbar);return l.jsx("div",{ref:i,children:l.jsx(GH,{aktivitet:t,className:o})})}const XH={BRUKER_ER_INTERESSERT:{tittel:"Informasjon om statusen Forslag",innhold:'Her kan du legge til en aktivitet du tror du kommer til å gjøre. Dra aktiviteten til "Planlegger" når du bestemmer deg for å gjøre aktiviteten.'},PLANLAGT:{tittel:"Informasjon om statusen Planlegger",innhold:'Her kan du legge til en aktivitet du tror du kommer til å gjøre. Dra aktiviteten til "Planlegger" når du bestemmer deg for å gjøre aktiviteten.'},GJENNOMFORES:{tittel:"Informasjon om statusen Gjennomfører",innhold:'Aktiviteter som du holder på med, kan du sette til "Gjennomfører".'},FULLFORT:{tittel:"Informasjon om statusen Fullført",innhold:'Dra aktiviteter hit som du er ferdig med. Flytter du en aktivitet til "Fullført", blir den låst og kan ikke redigeres. Hvis du angrer, kan du legge til en ny aktivitet.'},AVBRUTT:{tittel:"Informasjon om statusen Avbrutt",innhold:'Dra aktiviteter hit som du avslutter eller ikke begynner på. Flytter du en aktivitet til "Avbrutt", blir den låst og kan ikke redigeres. Hvis du angrer, kan du legge til en ny aktivitet.'}},JH=({status:e})=>{const t=XH[e],{tittel:r,innhold:n}=t;return l.jsx(Mu,{placement:"bottom-end",id:e,"aria-label":r,title:r,children:l.jsx("div",{className:"w-80",children:n})})},aw=e=>{const{status:t}=e;return l.jsxs("div",{className:"flex justify-between pb-2",children:[l.jsx(oe,{className:"text-left",level:"2",size:"small",children:hi[t]}),l.jsx(JH,{status:t})]})},Cd=({status:e})=>{const t=C(Ac,Se),n=G1(t,e).map(i=>l.jsx(Fm,{aktivitet:i},i.id));return l.jsxs(ow,{status:e,children:[l.jsx(aw,{status:e}),n]})};var Na={};function Ys(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ys=function(r){return typeof r}:Ys=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ys(e)}Object.defineProperty(Na,"__esModule",{value:!0});Na.Collapse=void 0;var Md=QH(v);function QH(e){return e&&e.__esModule?e:{default:e}}function eU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yy(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ru(e)}function rn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var sw=function(e){rU(r,e);var t=nU(r);function r(n){var i;return eU(this,r),i=t.call(this,n),rn(tn(i),"timeout",void 0),rn(tn(i),"container",void 0),rn(tn(i),"content",void 0),rn(tn(i),"onResize",function(){if(clearTimeout(i.timeout),!(!i.container||!i.content)){var o=i.props,a=o.isOpened,s=o.checkTimeout,u=Math.floor(i.container.clientHeight),c=Math.floor(i.content.clientHeight),d=a&&Math.abs(c-u)<=1,f=!a&&Math.abs(u)<=1;d||f?i.onRest({isFullyOpened:d,isFullyClosed:f,isOpened:a,containerHeight:u,contentHeight:c}):(i.onWork({isFullyOpened:d,isFullyClosed:f,isOpened:a,containerHeight:u,contentHeight:c}),i.timeout=setTimeout(function(){return i.onResize()},s))}}),rn(tn(i),"onRest",function(o){var a=o.isFullyOpened,s=o.isFullyClosed,u=o.isOpened,c=o.containerHeight,d=o.contentHeight;if(!(!i.container||!i.content)){var f=u&&i.container.style.height==="".concat(d,"px"),p=!u&&i.container.style.height==="0px";if(f||p){i.container.style.overflow=u?"initial":"hidden",i.container.style.height=u?"auto":"0px";var m=i.props.onRest;m&&m({isFullyOpened:a,isFullyClosed:s,isOpened:u,containerHeight:c,contentHeight:d})}}}),rn(tn(i),"onWork",function(o){var a=o.isFullyOpened,s=o.isFullyClosed,u=o.isOpened,c=o.containerHeight,d=o.contentHeight;if(!(!i.container||!i.content)){var f=u&&i.container.style.height==="".concat(d,"px"),p=!u&&i.container.style.height==="0px";if(!(f||p)){i.container.style.overflow="hidden",i.container.style.height=u?"".concat(d,"px"):"0px";var m=i.props.onWork;m&&m({isFullyOpened:a,isFullyClosed:s,isOpened:u,containerHeight:c,contentHeight:d})}}}),rn(tn(i),"onRefContainer",function(o){i.container=o}),rn(tn(i),"onRefContent",function(o){i.content=o}),n.initialStyle?i.initialStyle=n.initialStyle:i.initialStyle=n.isOpened?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"},i}return tU(r,[{key:"componentDidMount",value:function(){this.onResize()}},{key:"shouldComponentUpdate",value:function(i){var o=this.props,a=o.theme,s=o.isOpened,u=o.children;return u!==i.children||s!==i.isOpened||Object.keys(a).some(function(c){return a[c]!==i.theme[c]})}},{key:"getSnapshotBeforeUpdate",value:function(){if(!this.container||!this.content)return null;if(this.container.style.height==="auto"){var i=this.content.clientHeight;this.container.style.height="".concat(i,"px")}return null}},{key:"componentDidUpdate",value:function(){this.onResize()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var i=this.props,o=i.theme,a=i.children,s=i.isOpened;return Md.default.createElement("div",{ref:this.onRefContainer,className:o.collapse,style:this.initialStyle,"aria-hidden":!s},Md.default.createElement("div",{ref:this.onRefContent,className:o.content},a))}}]),r}(Md.default.Component);Na.Collapse=sw;rn(sw,"defaultProps",{theme:{collapse:"ReactCollapse--collapse",content:"ReactCollapse--content"},initialStyle:void 0,onRest:void 0,onWork:void 0,checkTimeout:50});var Uc={};function Gs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gs=function(r){return typeof r}:Gs=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Gs(e)}Object.defineProperty(Uc,"__esModule",{value:!0});Uc.UnmountClosed=void 0;var Gy=uU(v),aU=Na,sU=["isOpened"],lU=["isOpened"];function uU(e){return e&&e.__esModule?e:{default:e}}function Up(){return Up=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cU(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o=0)&&(r[i]=e[i]);return r}function dU(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qy(e,t){for(var r=0;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nu(e){return nu=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},nu(e)}function Co(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var lw=function(e){pU(r,e);var t=vU(r);function r(n){var i;return dU(this,r),i=t.call(this,n),Co(Zs(i),"onWork",function(o){var a=o.isOpened,s=Jy(o,sU);i.setState({isResting:!1,isOpened:a});var u=i.props.onWork;u&&u(Xy({isOpened:a},s))}),Co(Zs(i),"onRest",function(o){var a=o.isOpened,s=Jy(o,lU);i.setState({isResting:!0,isOpened:a,isInitialRender:!1});var u=i.props.onRest;u&&u(Xy({isOpened:a},s))}),Co(Zs(i),"getInitialStyle",function(){var o=i.state,a=o.isOpened,s=o.isInitialRender;return s?a?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"}:{height:"0px",overflow:"hidden"}}),i.state={isResting:!0,isOpened:n.isOpened,isInitialRender:!0},i}return fU(r,[{key:"componentDidUpdate",value:function(i){var o=this.props.isOpened;i.isOpened!==o&&this.setState({isResting:!1,isOpened:o,isInitialRender:!1})}},{key:"render",value:function(){var i=this.state,o=i.isResting,a=i.isOpened;return o&&!a?null:Gy.default.createElement(aU.Collapse,Up({},this.props,{initialStyle:this.getInitialStyle(),onWork:this.onWork,onRest:this.onRest}))}}]),r}(Gy.default.PureComponent);Uc.UnmountClosed=lw;Co(lw,"defaultProps",{onWork:void 0,onRest:void 0});var hU=Na,yU=hU.Collapse,kU=Uc,iu=kU.UnmountClosed,bU=iu;iu.Collapse=yU;iu.UnmountClosed=iu;const _U="_invertedLesMer_1ppb9_1",wU="_toggle_1ppb9_4",xU={invertedLesMer:_U,toggle:wU},SU=e=>{const[t,r]=v.useState(!1),n=()=>{t?e.onClose&&e.onClose():e.onOpen&&e.onOpen(),r(!t)},{apneTekst:i,lukkTekst:o,hidden:a,children:s}=e;return a?null:l.jsxs("div",{className:xU.invertedLesMer,children:[l.jsx("div",{children:l.jsx(Fu,{open:t,onClick:n,header:t?o:i,children:null})}),l.jsx(bU.Collapse,{isOpened:t,children:t?s:null})]})},jU="aktivitetsplan.viseldreaktiviter",TU="aktivitetsplan.skjuleldreaktiviter",OU=e=>{const t=Ue(),r=e.aktiviteteterTilDatoMerEnnToManederSiden,n=r.length===0,{aktivitetTekst:i}=e,o=r.map(a=>l.jsx(Fm,{aktivitet:a},a.id));return l.jsx(SU,{hidden:n,onOpen:()=>Fe(jU,{erVeileder:t}),onClose:()=>Fe(TU,{erVeileder:t}),apneTekst:`Vis ${i}`,lukkTekst:`Skjul ${i}`,children:o})},ek=({status:e})=>{const t=C(Ac,Se),r=G1(t,e),{nyereAktiviteter:n,eldreAktiviteter:i}=pH(r),o=n.map(s=>l.jsx(Fm,{aktivitet:s},s.id)),a=e===pe.FULLFOERT?"eldre fullførte aktiviteter":"eldre avbrutte aktiviteter";return l.jsxs(ow,{status:e,children:[l.jsx(aw,{status:e}),l.jsxs("div",{children:[o,l.jsx(OU,{aktivitetTekst:a,aktiviteteterTilDatoMerEnnToManederSiden:i})]})]})};var uw={},cw={},Bc={exports:{}},Do={exports:{}};(function(){var e,t,r,n,i,o;typeof performance<"u"&&performance!==null&&performance.now?Do.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Do.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var a;return a=t(),a[0]*1e9+a[1]},n=e(),o=process.uptime()*1e9,i=n-o):Date.now?(Do.exports=function(){return Date.now()-r},r=Date.now()):(Do.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(av);var EU=Do.exports,DU=EU,ln=typeof window>"u"?av:window,Ga=["moz","webkit"],zi="AnimationFrame",to=ln["request"+zi],Wo=ln["cancel"+zi]||ln["cancelRequest"+zi];for(var bo=0;!to&&bo=0;i--){var o=rk[i]+n;if(o in r)return o}return!1},PU=LU,AU=/\s/,CU=/(_|-|\.|:)/,MU=/([a-z][A-Z]|[A-Z][a-z])/;function LU(e){return AU.test(e)?e.toLowerCase():CU.test(e)?(VU(e)||e).toLowerCase():MU.test(e)?HU(e).toLowerCase():e.toLowerCase()}var $U=/[\W_]+(.|$)/g;function VU(e){return e.replace($U,function(t,r){return r?" "+r:""})}var FU=/(.)([A-Z]+)/g;function HU(e){return e.replace(FU,function(t,r,n){return r+" "+n.toLowerCase().split("").join(" ")})}var UU=PU,BU=KU;function KU(e){return UU(e).replace(/[\W_]+(.|$)/g,function(t,r){return r?" "+r:""}).trim()}var WU=BU,zU=qU;function qU(e){return WU(e).replace(/\s(\w)/g,function(t,r){return r.toUpperCase()})}var YU={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},GU=function(e,t){return typeof t=="number"&&!YU[e]?t+"px":t},ZU=NU,XU=zU,Xs={float:"cssFloat"},JU=GU;function ou(e,t,r){var n=Xs[t];if(typeof n>"u"&&(n=eB(t)),n){if(r===void 0)return e.style[n];e.style[n]=JU(n,r)}}function QU(e,t){for(var r in t)t.hasOwnProperty(r)&&ou(e,r,t[r])}function eB(e){var t=XU(e),r=ZU(t);return Xs[t]=Xs[e]=Xs[r]=r,r}function dw(){arguments.length===2?typeof arguments[1]=="string"?arguments[0].style.cssText=arguments[1]:QU(arguments[0],arguments[1]):ou(arguments[0],arguments[1],arguments[2])}Kc.exports=dw;Kc.exports.set=dw;Kc.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(r,n){return r[n]=ou(e,n||""),r},{}):ou(e,t||"")};var fw=Kc.exports,pw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(r){return typeof r=="string"}})(pw);var vw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=fw,r=n(t);function n(a){return a&&a.__esModule?a:{default:a}}var i=!1;function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(a&&i!==!1)return i;if(typeof document<"u"){var s=document.createElement("div");(0,r.default)(s,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(s),i=s.offsetWidth-s.clientWidth,document.body.removeChild(s)}else i=0;return i||0}})(vw);var mw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!1}})(mw);var gw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(r){var n=r.clientWidth,i=getComputedStyle(r),o=i.paddingLeft,a=i.paddingRight;return n-parseFloat(o)-parseFloat(a)}})(gw);var hw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(r){var n=r.clientHeight,i=getComputedStyle(r),o=i.paddingTop,a=i.paddingBottom;return n-parseFloat(o)-parseFloat(a)}})(hw);var tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"};tr.containerStyleAutoHeight={height:"auto"};tr.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"};tr.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0};tr.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0};tr.trackHorizontalStyleDefault={position:"absolute",height:6};tr.trackVerticalStyleDefault={position:"absolute",width:6};tr.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"};tr.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"};tr.disableSelectStyle={userSelect:"none"};tr.disableSelectStyleReset={userSelect:""};var Di={};Object.defineProperty(Di,"__esModule",{value:!0});var Fn=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function nB(e){return Pa.default.createElement("div",e)}function iB(e){var t=e.style,r=Wc(e,["style"]),n=Fn({},t,{right:2,bottom:2,left:2,borderRadius:3});return Pa.default.createElement("div",Fn({style:n},r))}function oB(e){var t=e.style,r=Wc(e,["style"]),n=Fn({},t,{right:2,bottom:2,top:2,borderRadius:3});return Pa.default.createElement("div",Fn({style:n},r))}function aB(e){var t=e.style,r=Wc(e,["style"]),n=Fn({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return Pa.default.createElement("div",Fn({style:n},r))}function sB(e){var t=e.style,r=Wc(e,["style"]),n=Fn({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return Pa.default.createElement("div",Fn({style:n},r))}(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(M){for(var N=1;N=0||Object.prototype.hasOwnProperty.call(M,w)&&(R[w]=M[w]);return R}function K(M,N){if(!(M instanceof N))throw new TypeError("Cannot call a class as a function")}function Y(M,N){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:M}function z(M,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);M.prototype=Object.create(N&&N.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(M,N):M.__proto__=N)}var G=function(M){z(N,M);function N(R){var w;K(this,N);for(var E=arguments.length,B=Array(E>1?E-1:0),Q=1;Q0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollLeft=w)}},{key:"scrollTop",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollTop=w)}},{key:"scrollToLeft",value:function(){this.view&&(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){this.view&&(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if(!(typeof document>"u"||!this.view)){var w=this.view,E=this.trackHorizontal,B=this.trackVertical,Q=this.thumbHorizontal,A=this.thumbVertical;w.addEventListener("scroll",this.handleScroll),(0,m.default)()&&(E.addEventListener("mouseenter",this.handleTrackMouseEnter),E.addEventListener("mouseleave",this.handleTrackMouseLeave),E.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),B.addEventListener("mouseenter",this.handleTrackMouseEnter),B.addEventListener("mouseleave",this.handleTrackMouseLeave),B.addEventListener("mousedown",this.handleVerticalTrackMouseDown),Q.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),A.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if(!(typeof document>"u"||!this.view)){var w=this.view,E=this.trackHorizontal,B=this.trackVertical,Q=this.thumbHorizontal,A=this.thumbVertical;w.removeEventListener("scroll",this.handleScroll),(0,m.default)()&&(E.removeEventListener("mouseenter",this.handleTrackMouseEnter),E.removeEventListener("mouseleave",this.handleTrackMouseLeave),E.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),B.removeEventListener("mouseenter",this.handleTrackMouseEnter),B.removeEventListener("mouseleave",this.handleTrackMouseLeave),B.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),Q.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),A.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(w){var E=this,B=this.props,Q=B.onScroll,A=B.onScrollFrame;Q&&Q(w),this.update(function(be){var D=be.scrollLeft,L=be.scrollTop;E.viewScrollLeft=D,E.viewScrollTop=L,A&&A(be)}),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var w=this.props.onScrollStart;w&&w(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){var w=this.props.autoHide;w&&this.showTracks()}},{key:"handleScrollStop",value:function(){var w=this.props.onScrollStop;w&&w(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){var w=this.props.autoHide;w&&this.hideTracks()}},{key:"handleWindowResize",value:function(){(0,m.default)(!1),this.forceUpdate()}},{key:"handleHorizontalTrackMouseDown",value:function(w){w.preventDefault();var E=w.target,B=w.clientX,Q=E.getBoundingClientRect(),A=Q.left,be=this.getThumbHorizontalWidth(),D=Math.abs(A-B)-be/2;this.view.scrollLeft=this.getScrollLeftForOffset(D)}},{key:"handleVerticalTrackMouseDown",value:function(w){w.preventDefault();var E=w.target,B=w.clientY,Q=E.getBoundingClientRect(),A=Q.top,be=this.getThumbVerticalHeight(),D=Math.abs(A-B)-be/2;this.view.scrollTop=this.getScrollTopForOffset(D)}},{key:"handleHorizontalThumbMouseDown",value:function(w){w.preventDefault(),this.handleDragStart(w);var E=w.target,B=w.clientX,Q=E.offsetWidth,A=E.getBoundingClientRect(),be=A.left;this.prevPageX=Q-(B-be)}},{key:"handleVerticalThumbMouseDown",value:function(w){w.preventDefault(),this.handleDragStart(w);var E=w.target,B=w.clientY,Q=E.offsetHeight,A=E.getBoundingClientRect(),be=A.top;this.prevPageY=Q-(B-be)}},{key:"setupDragging",value:function(){(0,a.default)(document.body,O.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=h.default}},{key:"teardownDragging",value:function(){(0,a.default)(document.body,O.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(w){this.dragging=!0,w.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(w){if(this.prevPageX){var E=w.clientX,B=this.trackHorizontal.getBoundingClientRect(),Q=B.left,A=this.getThumbHorizontalWidth(),be=A-this.prevPageX,D=-Q+E-be;this.view.scrollLeft=this.getScrollLeftForOffset(D)}if(this.prevPageY){var L=w.clientY,P=this.trackVertical.getBoundingClientRect(),W=P.top,re=this.getThumbVerticalHeight(),he=re-this.prevPageY,me=-W+L-he;this.view.scrollTop=this.getScrollTopForOffset(me)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){var w=this.props.autoHide;w&&this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){var w=this.props.autoHide;w&&this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){var w=this.props.autoHide;w&&this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,a.default)(this.trackHorizontal,{opacity:1}),(0,a.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var w=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var E=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,a.default)(w.trackHorizontal,{opacity:0}),(0,a.default)(w.trackVertical,{opacity:0})},E)}}},{key:"detectScrolling",value:function(){var w=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){w.lastViewScrollLeft===w.viewScrollLeft&&w.lastViewScrollTop===w.viewScrollTop&&(clearInterval(w.detectScrollingInterval),w.scrolling=!1,w.handleScrollStop()),w.lastViewScrollLeft=w.viewScrollLeft,w.lastViewScrollTop=w.viewScrollTop},100))}},{key:"raf",value:function(w){var E=this;this.requestFrame&&i.default.cancel(this.requestFrame),this.requestFrame=(0,i.default)(function(){E.requestFrame=void 0,w()})}},{key:"update",value:function(w){var E=this;this.raf(function(){return E._update(w)})}},{key:"_update",value:function(w){var E=this.props,B=E.onUpdate,Q=E.hideTracksWhenNotNeeded,A=this.getValues();if((0,m.default)()){var be=A.scrollLeft,D=A.clientWidth,L=A.scrollWidth,P=(0,_.default)(this.trackHorizontal),W=this.getThumbHorizontalWidth(),re=be/(L-D)*(P-W),he={width:W,transform:"translateX("+re+"px)"},me=A.scrollTop,ke=A.clientHeight,ge=A.scrollHeight,Ae=(0,S.default)(this.trackVertical),Xe=this.getThumbVerticalHeight(),$e=me/(ge-ke)*(Ae-Xe),H={height:Xe,transform:"translateY("+$e+"px)"};if(Q){var de={visibility:L>D?"visible":"hidden"},Ee={visibility:ge>ke?"visible":"hidden"};(0,a.default)(this.trackHorizontal,de),(0,a.default)(this.trackVertical,Ee)}(0,a.default)(this.thumbHorizontal,he),(0,a.default)(this.thumbVertical,H)}B&&B(A),typeof w=="function"&&w(A)}},{key:"render",value:function(){var w=this,E=(0,m.default)(),B=this.props;B.onScroll,B.onScrollFrame,B.onScrollStart,B.onScrollStop,B.onUpdate;var Q=B.renderView,A=B.renderTrackHorizontal,be=B.renderTrackVertical,D=B.renderThumbHorizontal,L=B.renderThumbVertical,P=B.tagName;B.hideTracksWhenNotNeeded;var W=B.autoHide;B.autoHideTimeout;var re=B.autoHideDuration;B.thumbSize,B.thumbMinSize;var he=B.universal,me=B.autoHeight,ke=B.autoHeightMin,ge=B.autoHeightMax,Ae=B.style,Xe=B.children,$e=V(B,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),H=this.state.didMountUniversal,de=t({},O.containerStyleDefault,me&&t({},O.containerStyleAutoHeight,{minHeight:ke,maxHeight:ge}),Ae),Ee=t({},O.viewStyleDefault,{marginRight:E?-E:0,marginBottom:E?-E:0},me&&t({},O.viewStyleAutoHeight,{minHeight:(0,f.default)(ke)?"calc("+ke+" + "+E+"px)":ke+E,maxHeight:(0,f.default)(ge)?"calc("+ge+" + "+E+"px)":ge+E}),me&&he&&!H&&{minHeight:ke,maxHeight:ge},he&&!H&&O.viewStyleUniversalInitial),j={transition:"opacity "+re+"ms",opacity:0},$=t({},O.trackHorizontalStyleDefault,W&&j,(!E||he&&!H)&&{display:"none"}),U=t({},O.trackVerticalStyleDefault,W&&j,(!E||he&&!H)&&{display:"none"});return(0,s.createElement)(P,t({},$e,{style:de,ref:function(Z){w.container=Z}}),[(0,s.cloneElement)(Q({style:Ee}),{key:"view",ref:function(Z){w.view=Z}},Xe),(0,s.cloneElement)(A({style:$}),{key:"trackHorizontal",ref:function(Z){w.trackHorizontal=Z}},(0,s.cloneElement)(D({style:O.thumbHorizontalStyleDefault}),{ref:function(Z){w.thumbHorizontal=Z}})),(0,s.cloneElement)(be({style:U}),{key:"trackVertical",ref:function(Z){w.trackVertical=Z}},(0,s.cloneElement)(L({style:O.thumbVerticalStyleDefault}),{ref:function(Z){w.thumbVertical=Z}}))])}}]),N}(s.Component);e.default=G,G.propTypes={onScroll:c.default.func,onScrollFrame:c.default.func,onScrollStart:c.default.func,onScrollStop:c.default.func,onUpdate:c.default.func,renderView:c.default.func,renderTrackHorizontal:c.default.func,renderTrackVertical:c.default.func,renderThumbHorizontal:c.default.func,renderThumbVertical:c.default.func,tagName:c.default.string,thumbSize:c.default.number,thumbMinSize:c.default.number,hideTracksWhenNotNeeded:c.default.bool,autoHide:c.default.bool,autoHideTimeout:c.default.number,autoHideDuration:c.default.number,autoHeight:c.default.bool,autoHeightMin:c.default.oneOfType([c.default.number,c.default.string]),autoHeightMax:c.default.oneOfType([c.default.number,c.default.string]),universal:c.default.bool,style:c.default.object,children:c.default.node},G.defaultProps={renderView:I.renderViewDefault,renderTrackHorizontal:I.renderTrackHorizontalDefault,renderTrackVertical:I.renderTrackVerticalDefault,renderThumbHorizontal:I.renderThumbHorizontalDefault,renderThumbVertical:I.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}})(cw);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=cw,r=n(t);function n(i){return i&&i.__esModule?i:{default:i}}e.default=r.default,e.Scrollbars=r.default})(uw);var yw={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(av,function(){var r=void 0;typeof window<"u"&&(r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),!r&&typeof process<"u"&&process.title==="node"&&(r=setImmediate),r=r||function(D){window.setTimeout(D,1e3/60)};var n=r,i=Array.prototype.concat,o=Array.prototype.slice;function a(D,L){for(var P=arguments.length,W=Array(P>2?P-2:0),re=2;re
3&&arguments[3]!==void 0?arguments[3]:0,re=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,he=arguments[5],me=f(L),ke=f(P),ge=Math.floor(g(D,W,re,me.r,ke.r)),Ae=Math.floor(g(D,W,re,me.g,ke.g)),Xe=Math.floor(g(D,W,re,me.b,ke.b));return he?"rgb("+ge+","+Ae+","+Xe+")":p(ge,Ae,Xe)}function b(D){return D*Math.PI/180}function _(D){return D*180/Math.PI}var y=Object.freeze({mapValueInRange:g,interpolateColor:h,degreesToRadians:b,radiansToDegrees:_});function S(D){return(D-30)*3.62+194}function O(D){return(D-194)/3.62+30}function I(D){return(D-8)*3+25}function T(D){return(D-25)/3+8}var V=Object.freeze({tensionFromOrigamiValue:S,origamiValueFromTension:O,frictionFromOrigamiValue:I,origamiFromFriction:T}),K=function(D,L){if(!(D instanceof L))throw new TypeError("Cannot call a class as a function")},Y=Object.assign||function(D){for(var L=1;L18&&P<=44?W=this.b3Friction2(P):W=this.b3Friction3(P),W},D}(),E=function(){D.fromOrigamiTensionAndFriction=function(P,W){return new D(S(P),I(W))},D.fromBouncinessAndSpeed=function(P,W){var re=new w(P,W);return D.fromOrigamiTensionAndFriction(re.bouncyTension,re.bouncyFriction)},D.coastingConfigWithOrigamiFriction=function(P){return new D(0,I(P))};function D(L,P){K(this,D),this.tension=L,this.friction=P}return D}();E.DEFAULT_ORIGAMI_SPRING_CONFIG=E.fromOrigamiTensionAndFriction(40,7);var B=function D(){K(this,D),this.position=0,this.velocity=0},Q=function(){function D(L){K(this,D),this.listeners=[],this._startValue=0,this._currentState=new B,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new B,this._restSpeedThreshold=.001,this._tempState=new B,this._timeAccumulator=0,this._wasAtRest=!0,this._id="s"+D._ID++,this._springSystem=L}return D.prototype.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this)},D.prototype.getId=function(){return this._id},D.prototype.setSpringConfig=function(P){return this._springConfig=P,this},D.prototype.getSpringConfig=function(){return this._springConfig},D.prototype.setCurrentValue=function(P,W){return this._startValue=P,this._currentState.position=P,W||this.setAtRest(),this.notifyPositionUpdated(!1,!1),this},D.prototype.getStartValue=function(){return this._startValue},D.prototype.getCurrentValue=function(){return this._currentState.position},D.prototype.getCurrentDisplacementDistance=function(){return this.getDisplacementDistanceForState(this._currentState)},D.prototype.getDisplacementDistanceForState=function(P){return Math.abs(this._endValue-P.position)},D.prototype.setEndValue=function(P){if(this._endValue===P&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=P,this._springSystem.activateSpring(this.getId());for(var W=0,re=this.listeners.length;W0&&(PW||P>W&&this.getCurrentValue()D.MAX_DELTA_TIME_SEC&&(he=D.MAX_DELTA_TIME_SEC),this._timeAccumulator+=he;for(var me=this._springConfig.tension,ke=this._springConfig.friction,ge=this._currentState.position,Ae=this._currentState.velocity,Xe=this._tempState.position,$e=this._tempState.velocity,H=void 0,de=void 0,Ee=void 0,j=void 0,$=void 0,U=void 0,ie=void 0,Z=void 0,X=void 0,ye=void 0;this._timeAccumulator>=D.SOLVER_TIMESTEP_SEC;)this._timeAccumulator-=D.SOLVER_TIMESTEP_SEC,this._timeAccumulator0&&this._interpolate(this._timeAccumulator/D.SOLVER_TIMESTEP_SEC),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),re=!0);var Je=!1;this._wasAtRest&&(this._wasAtRest=!1,Je=!0);var Qe=!1;re&&(this._wasAtRest=!0,Qe=!0),this.notifyPositionUpdated(Je,Qe)}},D.prototype.notifyPositionUpdated=function(P,W){for(var re=0,he=this.listeners.length;re0;)this._idleSpringIndices.pop();for(var re=0,he=this._activeSprings.length;re0;){var ke=this._idleSpringIndices.pop();ke>=0&&this._activeSprings.splice(ke,1)}},D.prototype.loop=function(P){var W=void 0;this._lastTimeMillis===-1&&(this._lastTimeMillis=P-1);var re=P-this._lastTimeMillis;this._lastTimeMillis=P;var he=0,me=this.listeners.length;for(he=0;hel.jsx("div",{}),renderTrackVertical:()=>l.jsx("div",{}),hidden:!1,autoHeight:n,autoHeightMax:r,onScrollFrame:i,children:this.props.children,ref:o=>{this.scrollbars=o}})}}const Za=325,cB=10,dB=e=>{const{children:t,dragging:r}=e,[n,i]=v.useState(0),[o,a]=v.useState(0),[s,u]=v.useState(!0),[c,d]=v.useState(!1),f=v.useRef(null),p=()=>{var O;const y=Math.min(n,o)-1,S=y*Za;(O=f.current)==null||O.scrollLeft(S),a(y)},m=()=>{var y;if(f.current){const S=f.current.getClientWidth(),O=f.current.getScrollLeft(),I=S+cB,T=Math.floor((I+O)/Za),V=Math.max(T,o)+1,K=V*Za-I;(y=f.current)==null||y.scrollLeft(K),a(V)}else return},g=y=>{i(Math.ceil(y.scrollLeft/Za)),u(y.left===0),d(y.left>=.99)},h=t.map((y,S)=>l.jsx("section",{className:"min-w-[300px] lg:max-w-[300px]","data-testid":`aktivitetstavle.${y.props.status}`,children:y},y.key||S)),b=l.jsx("button",{type:"button",className:Mt("tavle__scrollknapp knapp-forrige border",{invisible:s}),onClick:p,disabled:s,"aria-label":"Flytt visning en kolonne til venstre",children:l.jsx(YF,{titleId:"flytt-venstre",title:"Forrige kolonne","aria-hidden":!0,fontSize:"4rem"})}),_=l.jsx("button",{type:"button",className:Mt("tavle__scrollknapp knapp-neste border",{invisible:c}),onClick:m,hidden:c,"aria-label":"Flytt visning en kolonne til høyre",children:l.jsx(XF,{titleId:"flytt-hoyre",title:"Neste kolonne","aria-hidden":!0,fontSize:"4rem"})});return l.jsxs("section",{className:Mt("tavle aktivitetstavle lg:w-full"),tabIndex:-1,children:[b,l.jsx(uB,{autoHeight:!0,autoHeightMax:9999,onScrollFrame:g,ref:f,children:l.jsx("div",{className:`kolonner flex flex-col sm:gap-y-6 sm:mx-8 sm:max-w-[624px] sm:mx-auto md:max-w-[720px]
+ lg:flex-row lg:gap-x-5 lg:mx-4 lg:max-w-full tavle-max-width:justify-center`,children:h})}),_]})},fB=e=>v.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"25 10 47 85",...e},v.createElement("path",{fill:"#515658",d:"M68.609 25.398H30.507c-1.573 0-2.845 1.284-2.845 2.871v48.488a2.88 2.88 0 0 0 1.038 2.214 2.815 2.815 0 0 0 1.807.656h38.102c1.572 0 2.846-1.286 2.846-2.87V28.269c0-1.587-1.274-2.871-2.846-2.871"}),v.createElement("path",{fill:"#FFF",d:"M31.186 35.997v37.305a2.397 2.397 0 0 0 2.388 2.408h31.968a2.397 2.397 0 0 0 2.388-2.408V30.47c0-1.33-1.07-2.408-2.388-2.408H39.497l-8.311 7.935z"}),v.createElement("path",{fill:"#C0C0BE",d:"M39.497 28.063v5.524a2.399 2.399 0 0 1-2.387 2.41h-5.924l8.311-7.934z"}),v.createElement("path",{fill:"#2F3237",d:"M49.56 26.746a.923.923 0 0 1-.922-.927c0-.514.412-.93.921-.93.507 0 .92.416.92.93a.924.924 0 0 1-.92.927m5.688-3.796h-3.428v-.639a2.27 2.27 0 0 0-2.26-2.279 2.27 2.27 0 0 0-2.262 2.28v.638H43.87c-1.69 0-3.06 1.382-3.06 3.086v3.712h17.497v-3.712c0-1.704-1.371-3.086-3.06-3.086"}),v.createElement("path",{d:"M53.634 52.768v2.898H45.35V38.007h8.284v2.898zM49.601 68.83c2.763 0 5.003-2.257 5.003-5.042 0-2.786-2.24-5.044-5.003-5.044s-5.003 2.258-5.003 5.044c0 2.785 2.24 5.043 5.003 5.043",fill:"#515658"})),pB=(e,t)=>{if(e.status===pe.FULLFOERT)return"Aktiviteten er fullført og kan ikke endres.";if(e.status===pe.AVBRUTT)return"Aktiviteten er avbrutt og kan ikke endres.";if(e.type===Yt)return"Du kan ikke endre status på møtet. Ta kontakt med veilederen din for å endre møtet.";if(e.type===ar)return"Du kan ikke endre status på samtalereferatet. Ta kontakt med veilederen din for å endre dette.";if([nv,ju,rv].includes(e.type))return t?"For å endre aktiviteten må du gå til Arena.":"Du kan ikke endre denne aktiviteten selv. Send en melding til veilederen din hvis aktiviteten skal endres.";if(e.type===fe.EKSTERN_AKTIVITET_TYPE){if(t)switch(e.eksternAktivitet.type){case Io.ARENA_TILTAK_TYPE:return"For å endre aktiviteten må du gå til Arena.";case Io.MIDL_LONNSTILSKUDD_TYPE:case Io.VARIG_LONNSTILSKUDD_TYPE:return"Denne aktiviteten kan ikke endres fra aktivitetsplanen. Gå til avtalen for å endre status"}return"Du kan ikke endre denne aktiviteten selv. Send en melding til veilederen din hvis aktiviteten skal endres."}return"Du kan ikke endre status på denne aktiviteten. Ta kontakt med veilederen din for å gjøre endringer."},vB=e=>{const{hidden:t,draggingAktivitet:r,erVeileder:n}=e;return t||!r?null:l.jsx("div",{className:"fixed z-50 left-0 right-0 max-w-lg mx-auto",children:l.jsx(DA,{illustration:l.jsx(fB,{}),poster:!0,children:l.jsx(ce,{children:pB(r,n)})})})};function mB(e){return v.useEffect(()=>{l6(e.erVeileder)},[e.erVeileder]),null}const gB=()=>{const e=Le(),t=C(Zr),r=C(Pc),n=Ue(),i=C(I_,Se),o=C(_m),a=t===te.NOT_STARTED&&r===te.NOT_STARTED,s=[t,r];v.useEffect(()=>{a&&(n&&(o7(),e(_a(ha())),e(cF())),e(Mn()),e(Ln()))},[a,n,e]);const u=!!i,c=!!i&&iw(i,!n,o),d=!u||c,f=C(h=>{const b=X1(h);return b?Vm(b):"no-element"}),p=ZH(document.getElementById(Tk)),[m,g]=v.useState(!1);return im("veilarbpersonflatefs.tab-clicked",h=>{var b;iS.AKTIVITETSPLAN===((b=h.detail)==null?void 0:b.tabId)&&g(!0)}),v.useEffect(()=>{const h=document.getElementById(f);h&&m&&p&&(h.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),g(!1))},[f,m,p]),l.jsxs(Wt,{className:"flex m-auto mt-8",minstEn:!0,avhengigheter:s,children:[l.jsx(vB,{hidden:d,draggingAktivitet:i,erVeileder:n}),l.jsx(mB,{erVeileder:n}),l.jsxs(dB,{dragging:u,children:[l.jsx(Cd,{status:pe.BRUKER_ER_INTRESSERT}),l.jsx(Cd,{status:pe.PLANLAGT}),l.jsx(Cd,{status:pe.GJENNOMFOERT}),l.jsx(ek,{status:pe.FULLFOERT}),l.jsx(ek,{status:pe.AVBRUTT})]}),l.jsx(J8,{})]})},hB=()=>{const e=_t(),{aktivitetRoute:t}=Ot();im("visAktivitetsplan",n=>{const i=n.detail;i&&e(t(i))});const r=Le();return v.useEffect(()=>{r(qr()),r(sF())},[]),l.jsx("main",{id:"main",className:"hovedside",children:l.jsxs("div",{className:"flex items-center flex-col h-full",children:[l.jsx(j6,{}),l.jsx(xF,{}),l.jsxs(O8,{children:[l.jsx(F9,{}),l.jsx(V8,{}),l.jsxs("div",{className:"container flex flex-col gap-y-6",children:[l.jsx(B8,{}),l.jsx(b8,{}),l.jsx(X8,{})]}),l.jsx(gB,{})]}),l.jsx(J4,{})]})})};var Aa=e=>e.type==="checkbox",Vi=e=>e instanceof Date,Bt=e=>e==null;const kw=e=>typeof e=="object";var bt=e=>!Bt(e)&&!Array.isArray(e)&&kw(e)&&!Vi(e),bw=e=>bt(e)&&e.target?Aa(e.target)?e.target.checked:e.target.value:e,yB=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,_w=(e,t)=>e.has(yB(t)),kB=e=>{const t=e.constructor&&e.constructor.prototype;return bt(t)&&t.hasOwnProperty("isPrototypeOf")},Hm=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function nn(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Hm&&(e instanceof Blob||e instanceof FileList))&&(r||bt(e)))if(t=r?[]:{},!Array.isArray(e)&&!kB(e))t=e;else for(const n in e)t[n]=nn(e[n]);else return e;return t}var Ca=e=>Array.isArray(e)?e.filter(Boolean):[],at=e=>e===void 0,ne=(e,t,r)=>{if(!t||!bt(e))return r;const n=Ca(t.split(/[,[\].]+?/)).reduce((i,o)=>Bt(i)?i:i[o],e);return at(n)||n===e?at(e[t])?r:e[t]:n};const au={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},vr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},en={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},ww=k.createContext(null),Ma=()=>k.useContext(ww),Jn=e=>{const{children:t,...r}=e;return k.createElement(ww.Provider,{value:r},t)};var xw=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==vr.all&&(t._proxyFormState[a]=!n||vr.all),r&&(r[a]=!0),e[a]}});return i},rr=e=>bt(e)&&!Object.keys(e).length,Sw=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return rr(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!n||vr.all))},Js=e=>Array.isArray(e)?e:[e],jw=(e,t,r)=>r&&t?e===t:!e||!t||e===t||Js(e).some(n=>n&&(n.startsWith(t)||t.startsWith(n)));function Um(e){const t=k.useRef(e);t.current=e,k.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}function bB(e){const t=Ma(),{control:r=t.control,disabled:n,name:i,exact:o}=e||{},[a,s]=k.useState(r._formState),u=k.useRef(!0),c=k.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=k.useRef(i);return d.current=i,Um({disabled:n,next:f=>u.current&&jw(d.current,f.name,o)&&Sw(f,c.current,r._updateFormState)&&s({...r._formState,...f}),subject:r._subjects.state}),k.useEffect(()=>(u.current=!0,c.current.isValid&&r._updateValid(!0),()=>{u.current=!1}),[r]),xw(a,r,c.current,!1)}var Hr=e=>typeof e=="string",Tw=(e,t,r,n,i)=>Hr(e)?(n&&t.watch.add(e),ne(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),ne(r,o))):(n&&(t.watchAll=!0),r);function _B(e){const t=Ma(),{control:r=t.control,name:n,defaultValue:i,disabled:o,exact:a}=e||{},s=k.useRef(n);s.current=n,Um({disabled:o,subject:r._subjects.values,next:d=>{jw(s.current,d.name,a)&&c(nn(Tw(s.current,r._names,d.values||r._formValues,!1,i)))}});const[u,c]=k.useState(r._getWatch(n,i));return k.useEffect(()=>r._removeUnmounted()),u}var Bm=e=>/^\w*$/.test(e),Ow=e=>Ca(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Ze(e,t,r){let n=-1;const i=Bm(t)?[t]:Ow(t),o=i.length,a=o-1;for(;++n{const c=n._options.shouldUnregister||i,d=(f,p)=>{const m=ne(n._fields,f);m&&(m._f.mount=p)};if(d(r,!0),c){const f=nn(ne(n._options.defaultValues,r));Ze(n._defaultValues,r,f),at(ne(n._formValues,r))&&Ze(n._formValues,r,f)}return()=>{(o?c&&!n._state.action:c)?n.unregister(r):d(r,!1)}},[r,n,o,i]),{field:{name:r,value:a,onChange:k.useCallback(c=>u.current.onChange({target:{value:bw(c),name:r},type:au.CHANGE}),[r]),onBlur:k.useCallback(()=>u.current.onBlur({target:{value:ne(n._formValues,r),name:r},type:au.BLUR}),[r,n]),ref:c=>{const d=ne(n._fields,r);d&&c&&(d._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:f=>c.setCustomValidity(f),reportValidity:()=>c.reportValidity()})}},formState:s,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!ne(s.errors,r)},isDirty:{enumerable:!0,get:()=>!!ne(s.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!ne(s.touchedFields,r)},error:{enumerable:!0,get:()=>ne(s.errors,r)}})}}const wB=e=>e.render(zo(e));var Ew=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{};const Kp=(e,t,r)=>{for(const n of r||Object.keys(e)){const i=ne(e,n);if(i){const{_f:o,...a}=i;if(o&&t(o.name)){if(o.ref.focus){o.ref.focus();break}else if(o.refs&&o.refs[0].focus){o.refs[0].focus();break}}else bt(a)&&Kp(a,t)}}};var nk=e=>({isOnSubmit:!e||e===vr.onSubmit,isOnBlur:e===vr.onBlur,isOnChange:e===vr.onChange,isOnAll:e===vr.all,isOnTouch:e===vr.onTouched}),ik=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length)))),xB=(e,t,r)=>{const n=Ca(ne(e,r));return Ze(n,"root",t[r]),Ze(e,r,n),e},qi=e=>typeof e=="boolean",Km=e=>e.type==="file",Tn=e=>typeof e=="function",su=e=>{if(!Hm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Qs=e=>Hr(e),Wm=e=>e.type==="radio",lu=e=>e instanceof RegExp;const ok={value:!1,isValid:!1},ak={value:!0,isValid:!0};var Dw=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!at(e[0].attributes.value)?at(e[0].value)||e[0].value===""?ak:{value:e[0].value,isValid:!0}:ak:ok}return ok};const sk={isValid:!1,value:null};var Iw=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,sk):sk;function lk(e,t,r="validate"){if(Qs(e)||Array.isArray(e)&&e.every(Qs)||qi(e)&&!e)return{type:r,message:Qs(e)?e:"",ref:t}}var Ci=e=>bt(e)&&!lu(e)?e:{value:e,message:""},uk=async(e,t,r,n,i)=>{const{ref:o,refs:a,required:s,maxLength:u,minLength:c,min:d,max:f,pattern:p,validate:m,name:g,valueAsNumber:h,mount:b,disabled:_}=e._f,y=ne(t,g);if(!b||_)return{};const S=a?a[0]:o,O=M=>{n&&S.reportValidity&&(S.setCustomValidity(qi(M)?"":M||""),S.reportValidity())},I={},T=Wm(o),V=Aa(o),K=T||V,Y=(h||Km(o))&&at(o.value)&&at(y)||su(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,z=Ew.bind(null,g,r,I),G=(M,N,R,w=en.maxLength,E=en.minLength)=>{const B=M?N:R;I[g]={type:M?w:E,message:B,ref:o,...z(M?w:E,B)}};if(i?!Array.isArray(y)||!y.length:s&&(!K&&(Y||Bt(y))||qi(y)&&!y||V&&!Dw(a).isValid||T&&!Iw(a).isValid)){const{value:M,message:N}=Qs(s)?{value:!!s,message:s}:Ci(s);if(M&&(I[g]={type:en.required,message:N,ref:S,...z(en.required,N)},!r))return O(N),I}if(!Y&&(!Bt(d)||!Bt(f))){let M,N;const R=Ci(f),w=Ci(d);if(!Bt(y)&&!isNaN(y)){const E=o.valueAsNumber||y&&+y;Bt(R.value)||(M=E>R.value),Bt(w.value)||(N=Enew Date(new Date().toDateString()+" "+be),Q=o.type=="time",A=o.type=="week";Hr(R.value)&&y&&(M=Q?B(y)>B(R.value):A?y>R.value:E>new Date(R.value)),Hr(w.value)&&y&&(N=Q?B(y)+M.value,w=!Bt(N.value)&&y.length<+N.value;if((R||w)&&(G(R,M.message,N.message),!r))return O(I[g].message),I}if(p&&!Y&&Hr(y)){const{value:M,message:N}=Ci(p);if(lu(M)&&!y.match(M)&&(I[g]={type:en.pattern,message:N,ref:o,...z(en.pattern,N)},!r))return O(N),I}if(m){if(Tn(m)){const M=await m(y,t),N=lk(M,S);if(N&&(I[g]={...N,...z(en.validate,N.message)},!r))return O(N.message),I}else if(bt(m)){let M={};for(const N in m){if(!rr(M)&&!r)break;const R=lk(await m[N](y,t),S,N);R&&(M={...R,...z(N,R.message)},O(R.message),r&&(I[g]=M))}if(!rr(M)&&(I[g]={ref:S,...M},!r))return I}}return O(!0),I};function SB(e,t){const r=t.slice(0,-1).length;let n=0;for(;n{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var uu=e=>Bt(e)||!kw(e);function si(e,t){if(uu(e)||uu(t))return e===t;if(Vi(e)&&Vi(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const a=t[i];if(Vi(o)&&Vi(a)||bt(o)&&bt(a)||Array.isArray(o)&&Array.isArray(a)?!si(o,a):o!==a)return!1}}return!0}var Rw=e=>e.type==="select-multiple",TB=e=>Wm(e)||Aa(e),Fd=e=>su(e)&&e.isConnected,Nw=e=>{for(const t in e)if(Tn(e[t]))return!0;return!1};function cu(e,t={}){const r=Array.isArray(e);if(bt(e)||r)for(const n in e)Array.isArray(e[n])||bt(e[n])&&!Nw(e[n])?(t[n]=Array.isArray(e[n])?[]:{},cu(e[n],t[n])):Bt(e[n])||(t[n]=!0);return t}function Pw(e,t,r){const n=Array.isArray(e);if(bt(e)||n)for(const i in e)Array.isArray(e[i])||bt(e[i])&&!Nw(e[i])?at(t)||uu(r[i])?r[i]=Array.isArray(e[i])?cu(e[i],[]):{...cu(e[i])}:Pw(e[i],Bt(t)?{}:t[i],r[i]):r[i]=!si(e[i],t[i]);return r}var Hd=(e,t)=>Pw(e,t,cu(t)),Aw=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>at(e)?e:t?e===""?NaN:e&&+e:r&&Hr(e)?new Date(e):n?n(e):e;function Ud(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return Km(t)?t.files:Wm(t)?Iw(e.refs).value:Rw(t)?[...t.selectedOptions].map(({value:r})=>r):Aa(t)?Dw(e.refs).value:Aw(at(t.value)?e.ref.value:t.value,e)}var OB=(e,t,r,n)=>{const i={};for(const o of e){const a=ne(t,o);a&&Ze(i,o,a._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},_o=e=>at(e)?e:lu(e)?e.source:bt(e)?lu(e.value)?e.value.source:e.value:e,EB=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ck(e,t,r){const n=ne(e,r);if(n||Bm(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),a=ne(t,o),s=ne(e,o);if(a&&!Array.isArray(a)&&r!==o)return{name:r};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:r}}var DB=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,IB=(e,t)=>!Ca(ne(e,t)).length&&It(e,t);const RB={mode:vr.onSubmit,reValidateMode:vr.onChange,shouldFocusError:!0};function NB(e={},t){let r={...RB,...e},n={submitCount:0,isDirty:!1,isLoading:Tn(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=bt(r.defaultValues)||bt(r.values)?nn(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:nn(o),s={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:Vd(),array:Vd(),state:Vd()},m=e.resetOptions&&e.resetOptions.keepDirtyValues,g=nk(r.mode),h=nk(r.reValidateMode),b=r.criteriaMode===vr.all,_=j=>$=>{clearTimeout(d),d=setTimeout(j,$)},y=async j=>{if(f.isValid||j){const $=r.resolver?rr((await Y()).errors):await G(i,!0);$!==n.isValid&&p.state.next({isValid:$})}},S=j=>f.isValidating&&p.state.next({isValidating:j}),O=(j,$=[],U,ie,Z=!0,X=!0)=>{if(ie&&U){if(s.action=!0,X&&Array.isArray(ne(i,j))){const ye=U(ne(i,j),ie.argA,ie.argB);Z&&Ze(i,j,ye)}if(X&&Array.isArray(ne(n.errors,j))){const ye=U(ne(n.errors,j),ie.argA,ie.argB);Z&&Ze(n.errors,j,ye),IB(n.errors,j)}if(f.touchedFields&&X&&Array.isArray(ne(n.touchedFields,j))){const ye=U(ne(n.touchedFields,j),ie.argA,ie.argB);Z&&Ze(n.touchedFields,j,ye)}f.dirtyFields&&(n.dirtyFields=Hd(o,a)),p.state.next({name:j,isDirty:N(j,$),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ze(a,j,$)},I=(j,$)=>{Ze(n.errors,j,$),p.state.next({errors:n.errors})},T=(j,$,U,ie)=>{const Z=ne(i,j);if(Z){const X=ne(a,j,at(U)?ne(o,j):U);at(X)||ie&&ie.defaultChecked||$?Ze(a,j,$?X:Ud(Z._f)):E(j,X),s.mount&&y()}},V=(j,$,U,ie,Z)=>{let X=!1,ye=!1;const Je={name:j};if(!U||ie){f.isDirty&&(ye=n.isDirty,n.isDirty=Je.isDirty=N(),X=ye!==Je.isDirty);const Qe=si(ne(o,j),$);ye=ne(n.dirtyFields,j),Qe?It(n.dirtyFields,j):Ze(n.dirtyFields,j,!0),Je.dirtyFields=n.dirtyFields,X=X||f.dirtyFields&&ye!==!Qe}if(U){const Qe=ne(n.touchedFields,j);Qe||(Ze(n.touchedFields,j,U),Je.touchedFields=n.touchedFields,X=X||f.touchedFields&&Qe!==U)}return X&&Z&&p.state.next(Je),X?Je:{}},K=(j,$,U,ie)=>{const Z=ne(n.errors,j),X=f.isValid&&qi($)&&n.isValid!==$;if(e.delayError&&U?(c=_(()=>I(j,U)),c(e.delayError)):(clearTimeout(d),c=null,U?Ze(n.errors,j,U):It(n.errors,j)),(U?!si(Z,U):Z)||!rr(ie)||X){const ye={...ie,...X&&qi($)?{isValid:$}:{},errors:n.errors,name:j};n={...n,...ye},p.state.next(ye)}S(!1)},Y=async j=>r.resolver(a,r.context,OB(j||u.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),z=async j=>{const{errors:$}=await Y();if(j)for(const U of j){const ie=ne($,U);ie?Ze(n.errors,U,ie):It(n.errors,U)}else n.errors=$;return $},G=async(j,$,U={valid:!0})=>{for(const ie in j){const Z=j[ie];if(Z){const{_f:X,...ye}=Z;if(X){const Je=u.array.has(X.name),Qe=await uk(Z,a,b,r.shouldUseNativeValidation&&!$,Je);if(Qe[X.name]&&(U.valid=!1,$))break;!$&&(ne(Qe,X.name)?Je?xB(n.errors,Qe,X.name):Ze(n.errors,X.name,Qe[X.name]):It(n.errors,X.name))}ye&&await G(ye,$,U)}}return U.valid},M=()=>{for(const j of u.unMount){const $=ne(i,j);$&&($._f.refs?$._f.refs.every(U=>!Fd(U)):!Fd($._f.ref))&&he(j)}u.unMount=new Set},N=(j,$)=>(j&&$&&Ze(a,j,$),!si(D(),o)),R=(j,$,U)=>Tw(j,u,{...s.mount?a:at($)?o:Hr(j)?{[j]:$}:$},U,$),w=j=>Ca(ne(s.mount?a:o,j,e.shouldUnregister?ne(o,j,[]):[])),E=(j,$,U={})=>{const ie=ne(i,j);let Z=$;if(ie){const X=ie._f;X&&(!X.disabled&&Ze(a,j,Aw($,X)),Z=su(X.ref)&&Bt($)?"":$,Rw(X.ref)?[...X.ref.options].forEach(ye=>ye.selected=Z.includes(ye.value)):X.refs?Aa(X.ref)?X.refs.length>1?X.refs.forEach(ye=>(!ye.defaultChecked||!ye.disabled)&&(ye.checked=Array.isArray(Z)?!!Z.find(Je=>Je===ye.value):Z===ye.value)):X.refs[0]&&(X.refs[0].checked=!!Z):X.refs.forEach(ye=>ye.checked=ye.value===Z):Km(X.ref)?X.ref.value="":(X.ref.value=Z,X.ref.type||p.values.next({name:j,values:{...a}})))}(U.shouldDirty||U.shouldTouch)&&V(j,Z,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&be(j)},B=(j,$,U)=>{for(const ie in $){const Z=$[ie],X=`${j}.${ie}`,ye=ne(i,X);(u.array.has(j)||!uu(Z)||ye&&!ye._f)&&!Vi(Z)?B(X,Z,U):E(X,Z,U)}},Q=(j,$,U={})=>{const ie=ne(i,j),Z=u.array.has(j),X=nn($);Ze(a,j,X),Z?(p.array.next({name:j,values:{...a}}),(f.isDirty||f.dirtyFields)&&U.shouldDirty&&p.state.next({name:j,dirtyFields:Hd(o,a),isDirty:N(j,X)})):ie&&!ie._f&&!Bt(X)?B(j,X,U):E(j,X,U),ik(j,u)&&p.state.next({...n}),p.values.next({name:j,values:{...a}}),!s.mount&&t()},A=async j=>{const $=j.target;let U=$.name,ie=!0;const Z=ne(i,U),X=()=>$.type?Ud(Z._f):bw(j);if(Z){let ye,Je;const Qe=X(),Ri=j.type===au.BLUR||j.type===au.FOCUS_OUT,Kx=!EB(Z._f)&&!r.resolver&&!ne(n.errors,U)&&!Z._f.deps||DB(Ri,ne(n.touchedFields,U),n.isSubmitted,h,g),Yc=ik(U,u,Ri);Ze(a,U,Qe),Ri?(Z._f.onBlur&&Z._f.onBlur(j),c&&c(0)):Z._f.onChange&&Z._f.onChange(j);const Gc=V(U,Qe,Ri,!1),Wx=!rr(Gc)||Yc;if(!Ri&&p.values.next({name:U,type:j.type,values:{...a}}),Kx)return f.isValid&&y(),Wx&&p.state.next({name:U,...Yc?{}:Gc});if(!Ri&&Yc&&p.state.next({...n}),S(!0),r.resolver){const{errors:Ym}=await Y([U]),zx=ck(n.errors,i,U),Gm=ck(Ym,i,zx.name||U);ye=Gm.error,U=Gm.name,Je=rr(Ym)}else ye=(await uk(Z,a,b,r.shouldUseNativeValidation))[U],ie=isNaN(Qe)||Qe===ne(a,U,Qe),ie&&(ye?Je=!1:f.isValid&&(Je=await G(i,!0)));ie&&(Z._f.deps&&be(Z._f.deps),K(U,Je,ye,Gc))}},be=async(j,$={})=>{let U,ie;const Z=Js(j);if(S(!0),r.resolver){const X=await z(at(j)?j:Z);U=rr(X),ie=j?!Z.some(ye=>ne(X,ye)):U}else j?(ie=(await Promise.all(Z.map(async X=>{const ye=ne(i,X);return await G(ye&&ye._f?{[X]:ye}:ye)}))).every(Boolean),!(!ie&&!n.isValid)&&y()):ie=U=await G(i);return p.state.next({...!Hr(j)||f.isValid&&U!==n.isValid?{}:{name:j},...r.resolver||!j?{isValid:U}:{},errors:n.errors,isValidating:!1}),$.shouldFocus&&!ie&&Kp(i,X=>X&&ne(n.errors,X),j?Z:u.mount),ie},D=j=>{const $={...o,...s.mount?a:{}};return at(j)?$:Hr(j)?ne($,j):j.map(U=>ne($,U))},L=(j,$)=>({invalid:!!ne(($||n).errors,j),isDirty:!!ne(($||n).dirtyFields,j),isTouched:!!ne(($||n).touchedFields,j),error:ne(($||n).errors,j)}),P=j=>{j&&Js(j).forEach($=>It(n.errors,$)),p.state.next({errors:j?n.errors:{}})},W=(j,$,U)=>{const ie=(ne(i,j,{_f:{}})._f||{}).ref;Ze(n.errors,j,{...$,ref:ie}),p.state.next({name:j,errors:n.errors,isValid:!1}),U&&U.shouldFocus&&ie&&ie.focus&&ie.focus()},re=(j,$)=>Tn(j)?p.values.subscribe({next:U=>j(R(void 0,$),U)}):R(j,$,!0),he=(j,$={})=>{for(const U of j?Js(j):u.mount)u.mount.delete(U),u.array.delete(U),$.keepValue||(It(i,U),It(a,U)),!$.keepError&&It(n.errors,U),!$.keepDirty&&It(n.dirtyFields,U),!$.keepTouched&&It(n.touchedFields,U),!r.shouldUnregister&&!$.keepDefaultValue&&It(o,U);p.values.next({values:{...a}}),p.state.next({...n,...$.keepDirty?{isDirty:N()}:{}}),!$.keepIsValid&&y()},me=(j,$={})=>{let U=ne(i,j);const ie=qi($.disabled);return Ze(i,j,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:j}},name:j,mount:!0,...$}}),u.mount.add(j),U?ie&&Ze(a,j,$.disabled?void 0:ne(a,j,Ud(U._f))):T(j,!0,$.value),{...ie?{disabled:$.disabled}:{},...r.shouldUseNativeValidation?{required:!!$.required,min:_o($.min),max:_o($.max),minLength:_o($.minLength),maxLength:_o($.maxLength),pattern:_o($.pattern)}:{},name:j,onChange:A,onBlur:A,ref:Z=>{if(Z){me(j,$),U=ne(i,j);const X=at(Z.value)&&Z.querySelectorAll&&Z.querySelectorAll("input,select,textarea")[0]||Z,ye=TB(X),Je=U._f.refs||[];if(ye?Je.find(Qe=>Qe===X):X===U._f.ref)return;Ze(i,j,{_f:{...U._f,...ye?{refs:[...Je.filter(Fd),X,...Array.isArray(ne(o,j))?[{}]:[]],ref:{type:X.type,name:j}}:{ref:X}}}),T(j,!1,void 0,X)}else U=ne(i,j,{}),U._f&&(U._f.mount=!1),(r.shouldUnregister||$.shouldUnregister)&&!(_w(u.array,j)&&s.action)&&u.unMount.add(j)}}},ke=()=>r.shouldFocusError&&Kp(i,j=>j&&ne(n.errors,j),u.mount),ge=(j,$)=>async U=>{U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let ie=nn(a);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:Z,values:X}=await Y();n.errors=Z,ie=X}else await G(i);It(n.errors,"root"),rr(n.errors)?(p.state.next({errors:{}}),await j(ie,U)):($&&await $({...n.errors},U),ke(),setTimeout(ke)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:rr(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Ae=(j,$={})=>{ne(i,j)&&(at($.defaultValue)?Q(j,ne(o,j)):(Q(j,$.defaultValue),Ze(o,j,$.defaultValue)),$.keepTouched||It(n.touchedFields,j),$.keepDirty||(It(n.dirtyFields,j),n.isDirty=$.defaultValue?N(j,ne(o,j)):N()),$.keepError||(It(n.errors,j),f.isValid&&y()),p.state.next({...n}))},Xe=(j,$={})=>{const U=j||o,ie=nn(U),Z=j&&!rr(j)?ie:o;if($.keepDefaultValues||(o=U),!$.keepValues){if($.keepDirtyValues||m)for(const X of u.mount)ne(n.dirtyFields,X)?Ze(Z,X,ne(a,X)):Q(X,ne(Z,X));else{if(Hm&&at(j))for(const X of u.mount){const ye=ne(i,X);if(ye&&ye._f){const Je=Array.isArray(ye._f.refs)?ye._f.refs[0]:ye._f.ref;if(su(Je)){const Qe=Je.closest("form");if(Qe){Qe.reset();break}}}}i={}}a=e.shouldUnregister?$.keepDefaultValues?nn(o):{}:ie,p.array.next({values:{...Z}}),p.values.next({values:{...Z}})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!f.isValid||!!$.keepIsValid,s.watch=!!e.shouldUnregister,p.state.next({submitCount:$.keepSubmitCount?n.submitCount:0,isDirty:$.keepDirty?n.isDirty:!!($.keepDefaultValues&&!si(j,o)),isSubmitted:$.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:$.keepDirtyValues?n.dirtyFields:$.keepDefaultValues&&j?Hd(o,j):{},touchedFields:$.keepTouched?n.touchedFields:{},errors:$.keepErrors?n.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},$e=(j,$)=>Xe(Tn(j)?j(a):j,$);return{control:{register:me,unregister:he,getFieldState:L,_executeSchema:Y,_getWatch:R,_getDirty:N,_updateValid:y,_removeUnmounted:M,_updateFieldArray:O,_getFieldArray:w,_reset:Xe,_resetDefaultValues:()=>Tn(r.defaultValues)&&r.defaultValues().then(j=>{$e(j,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:j=>{n={...n,...j}},_subjects:p,_proxyFormState:f,get _fields(){return i},get _formValues(){return a},get _state(){return s},set _state(j){s=j},get _defaultValues(){return o},get _names(){return u},set _names(j){u=j},get _formState(){return n},set _formState(j){n=j},get _options(){return r},set _options(j){r={...r,...j}}},trigger:be,register:me,handleSubmit:ge,watch:re,setValue:Q,getValues:D,reset:$e,resetField:Ae,clearErrors:P,unregister:he,setError:W,setFocus:(j,$={})=>{const U=ne(i,j),ie=U&&U._f;if(ie){const Z=ie.refs?ie.refs[0]:ie.ref;Z.focus&&(Z.focus(),$.shouldSelect&&Z.select())}},getFieldState:L}}function Et(e={}){const t=k.useRef(),[r,n]=k.useState({isDirty:!1,isValidating:!1,isLoading:Tn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Tn(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...NB(e,()=>n(o=>({...o}))),formState:r});const i=t.current.control;return i._options=e,Um({subject:i._subjects.state,next:o=>{Sw(o,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),k.useEffect(()=>{e.values&&!si(e.values,i._defaultValues)?i._reset(e.values,i._options.resetOptions):i._resetDefaultValues()},[e.values,i]),k.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=xw(r,i),t.current}var dk=function(e,t,r){if(e&&"reportValidity"in e){var n=ne(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Cw=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?dk(o.ref,i,e):o.refs&&o.refs.forEach(function(a){return dk(a,i,e)})};for(var n in t.fields)r(n)},PB=function(e,t){t.shouldUseNativeValidation&&Cw(e,t);var r={};for(var n in e){var i=ne(t.fields,n);Ze(r,n,Object.assign(e[n],{ref:i&&i.ref}))}return r},AB=function(e,t){for(var r={};e.length;){var n=e[0],i=n.code,o=n.message,a=n.path.join(".");if(!r[a])if("unionErrors"in n){var s=n.unionErrors[0].errors[0];r[a]={message:s.message,type:s.code}}else r[a]={message:o,type:i};if("unionErrors"in n&&n.unionErrors.forEach(function(d){return d.errors.forEach(function(f){return e.push(f)})}),t){var u=r[a].types,c=u&&u[n.code];r[a]=Ew(a,t,r,i,c?[].concat(c,n.message):n.message)}e.shift()}return r},Dt=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(a,s){try{var u=Promise.resolve(e[r.mode==="sync"?"parse":"parseAsync"](n,t)).then(function(c){return o.shouldUseNativeValidation&&Cw({},o),{errors:{},values:r.rawValues?n:c}})}catch(c){return s(c)}return u&&u.then?u.then(void 0,s):u}(0,function(a){return{values:{},errors:a.isEmpty?{}:PB(AB(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)}}))}catch(a){return Promise.reject(a)}}},Ve;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=n,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Ve||(Ve={}));var Wp;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Wp||(Wp={}));const se=Ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xn=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},J=Ve.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),CB=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class kr extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(o){return o.message},n={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,u=0;for(;ur.message){const r={},n=[];for(const i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}kr.create=e=>new kr(e);const qo=(e,t)=>{let r;switch(e.code){case J.invalid_type:e.received===se.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ve.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ve.joinValues(e.keys,", ")}`;break;case J.invalid_union:r="Invalid input";break;case J.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ve.joinValues(e.options)}`;break;case J.invalid_enum_value:r=`Invalid enum value. Expected ${Ve.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:r="Invalid function arguments";break;case J.invalid_return_type:r="Invalid function return type";break;case J.invalid_date:r="Invalid date";break;case J.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ve.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case J.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case J.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case J.custom:r="Invalid input";break;case J.invalid_intersection_types:r="Intersection results could not be merged";break;case J.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ve.assertNever(e)}return{message:r}};let Mw=qo;function MB(e){Mw=e}function du(){return Mw}const fu=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,o=[...r,...i.path||[]],a={...i,path:o};let s="";const u=n.filter(c=>!!c).slice().reverse();for(const c of u)s=c(a,{data:t,defaultError:s}).message;return{...i,path:o,message:i.message||s}},LB=[];function le(e,t){const r=fu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,du(),qo].filter(n=>!!n)});e.common.issues.push(r)}class Ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const i of r){if(i.status==="aborted")return De;i.status==="dirty"&&t.dirty(),n.push(i.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const i of r)n.push({key:await i.key,value:await i.value});return Ft.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const i of r){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return De;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:t.value,value:n}}}const De=Object.freeze({status:"aborted"}),Lw=e=>({status:"dirty",value:e}),qt=e=>({status:"valid",value:e}),zp=e=>e.status==="aborted",qp=e=>e.status==="dirty",pu=e=>e.status==="valid",vu=e=>typeof Promise<"u"&&e instanceof Promise;var _e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(_e||(_e={}));class Yr{constructor(t,r,n,i){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fk=(e,t)=>{if(pu(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new kr(e.common.issues);return this._error=r,this._error}}};function Re(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:n??s.defaultError}:{message:r??s.defaultError},description:i}}class Pe{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return xn(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:xn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ft,ctx:{common:t.parent.common,data:t.data,parsedType:xn(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(vu(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const i={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xn(t)},o=this._parseSync({data:t,path:i.path,parent:i});return fk(i,o)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:xn(t)},i=this._parse({data:t,path:n.path,parent:n}),o=await(vu(i)?i:Promise.resolve(i));return fk(n,o)}refine(t,r){const n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:J.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,i)=>t(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(t){return new Sr({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return un.create(this,this._def)}nullable(){return bi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return br.create(this,this._def)}promise(){return no.create(this,this._def)}or(t){return Xo.create([this,t],this._def)}and(t){return Jo.create(this,t,this._def)}transform(t){return new Sr({...Re(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new na({...Re(this._def),innerType:this,defaultValue:r,typeName:Te.ZodDefault})}brand(){return new Vw({typeName:Te.ZodBranded,type:this,...Re(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new yu({...Re(this._def),innerType:this,catchValue:r,typeName:Te.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return La.create(this,t)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $B=/^c[^\s-]{8,}$/i,VB=/^[a-z][a-z0-9]*$/,FB=/[0-9A-HJKMNP-TV-Z]{26}/,HB=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,UB=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,BB=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,KB=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,WB=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,zB=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function qB(e,t){return!!((t==="v4"||!t)&&KB.test(e)||(t==="v6"||!t)&&WB.test(e))}class mr extends Pe{constructor(){super(...arguments),this._regex=(t,r,n)=>this.refinement(i=>t.test(i),{validation:r,code:J.invalid_string,..._e.errToObj(n)}),this.nonempty=t=>this.min(1,_e.errToObj(t)),this.trim=()=>new mr({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new mr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new mr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const o=this._getOrReturnCtx(t);return le(o,{code:J.invalid_type,expected:se.string,received:o.parsedType}),De}const n=new Ft;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),le(i,{code:J.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.length"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,..._e.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,..._e.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,..._e.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,..._e.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,..._e.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,..._e.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,..._e.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,..._e.errToObj(r)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new mr({checks:[],typeName:Te.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Re(e)})};function YB(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Hn extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const o=this._getOrReturnCtx(t);return le(o,{code:J.invalid_type,expected:se.number,received:o.parsedType}),De}let n;const i=new Ft;for(const o of this._def.checks)o.kind==="int"?Ve.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),le(n,{code:J.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),le(n,{code:J.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?YB(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),le(n,{code:J.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),le(n,{code:J.not_finite,message:o.message}),i.dirty()):Ve.assertNever(o);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,n,i){return new Hn({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:_e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:_e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:_e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:_e.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuet.kind==="int"||t.kind==="multipleOf"&&Ve.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.valuenew Hn({checks:[],typeName:Te.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Re(e)});class Un extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==se.bigint){const o=this._getOrReturnCtx(t);return le(o,{code:J.invalid_type,expected:se.bigint,received:o.parsedType}),De}let n;const i=new Ft;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),le(n,{code:J.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),le(n,{code:J.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Ve.assertNever(o);return{status:i.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,_e.toString(r))}gt(t,r){return this.setLimit("min",t,!1,_e.toString(r))}lte(t,r){return this.setLimit("max",t,!0,_e.toString(r))}lt(t,r){return this.setLimit("max",t,!1,_e.toString(r))}setLimit(t,r,n,i){return new Un({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:_e.toString(i)}]})}_addCheck(t){return new Un({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:_e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:_e.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:_e.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value{var t;return new Un({checks:[],typeName:Te.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Re(e)})};class Yo extends Pe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const n=this._getOrReturnCtx(t);return le(n,{code:J.invalid_type,expected:se.boolean,received:n.parsedType}),De}return qt(t.data)}}Yo.create=e=>new Yo({typeName:Te.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Re(e)});class yi extends Pe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const o=this._getOrReturnCtx(t);return le(o,{code:J.invalid_type,expected:se.date,received:o.parsedType}),De}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return le(o,{code:J.invalid_date}),De}const n=new Ft;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),le(i,{code:J.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Ve.assertNever(o);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new yi({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:_e.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:_e.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.valuenew yi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Te.ZodDate,...Re(e)});class mu extends Pe{_parse(t){if(this._getType(t)!==se.symbol){const n=this._getOrReturnCtx(t);return le(n,{code:J.invalid_type,expected:se.symbol,received:n.parsedType}),De}return qt(t.data)}}mu.create=e=>new mu({typeName:Te.ZodSymbol,...Re(e)});class Go extends Pe{_parse(t){if(this._getType(t)!==se.undefined){const n=this._getOrReturnCtx(t);return le(n,{code:J.invalid_type,expected:se.undefined,received:n.parsedType}),De}return qt(t.data)}}Go.create=e=>new Go({typeName:Te.ZodUndefined,...Re(e)});class Zo extends Pe{_parse(t){if(this._getType(t)!==se.null){const n=this._getOrReturnCtx(t);return le(n,{code:J.invalid_type,expected:se.null,received:n.parsedType}),De}return qt(t.data)}}Zo.create=e=>new Zo({typeName:Te.ZodNull,...Re(e)});class ro extends Pe{constructor(){super(...arguments),this._any=!0}_parse(t){return qt(t.data)}}ro.create=e=>new ro({typeName:Te.ZodAny,...Re(e)});class ci extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return qt(t.data)}}ci.create=e=>new ci({typeName:Te.ZodUnknown,...Re(e)});class vn extends Pe{_parse(t){const r=this._getOrReturnCtx(t);return le(r,{code:J.invalid_type,expected:se.never,received:r.parsedType}),De}}vn.create=e=>new vn({typeName:Te.ZodNever,...Re(e)});class gu extends Pe{_parse(t){if(this._getType(t)!==se.undefined){const n=this._getOrReturnCtx(t);return le(n,{code:J.invalid_type,expected:se.void,received:n.parsedType}),De}return qt(t.data)}}gu.create=e=>new gu({typeName:Te.ZodVoid,...Re(e)});class br extends Pe{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),i=this._def;if(r.parsedType!==se.array)return le(r,{code:J.invalid_type,expected:se.array,received:r.parsedType}),De;if(i.exactLength!==null){const a=r.data.length>i.exactLength.value,s=r.data.lengthi.maxLength.value&&(le(r,{code:J.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new Yr(r,a,r.path,s)))).then(a=>Ft.mergeArray(n,a));const o=[...r.data].map((a,s)=>i.type._parseSync(new Yr(r,a,r.path,s)));return Ft.mergeArray(n,o)}get element(){return this._def.type}min(t,r){return new br({...this._def,minLength:{value:t,message:_e.toString(r)}})}max(t,r){return new br({...this._def,maxLength:{value:t,message:_e.toString(r)}})}length(t,r){return new br({...this._def,exactLength:{value:t,message:_e.toString(r)}})}nonempty(t){return this.min(1,t)}}br.create=(e,t)=>new br({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Re(t)});function Mi(e){if(e instanceof tt){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=un.create(Mi(n))}return new tt({...e._def,shape:()=>t})}else return e instanceof br?new br({...e._def,type:Mi(e.element)}):e instanceof un?un.create(Mi(e.unwrap())):e instanceof bi?bi.create(Mi(e.unwrap())):e instanceof Gr?Gr.create(e.items.map(t=>Mi(t))):e}class tt extends Pe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Ve.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==se.object){const c=this._getOrReturnCtx(t);return le(c,{code:J.invalid_type,expected:se.object,received:c.parsedType}),De}const{status:n,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof vn&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||s.push(c);const u=[];for(const c of a){const d=o[c],f=i.data[c];u.push({key:{status:"valid",value:c},value:d._parse(new Yr(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof vn){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of s)u.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(c==="strict")s.length>0&&(le(i,{code:J.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of s){const f=i.data[d];u.push({key:{status:"valid",value:d},value:c._parse(new Yr(i,f,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of u){const f=await d.key;c.push({key:f,value:await d.value,alwaysSet:d.alwaysSet})}return c}).then(c=>Ft.mergeObjectSync(n,c)):Ft.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return _e.errToObj,new tt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=_e.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new tt({...this._def,unknownKeys:"strip"})}passthrough(){return new tt({...this._def,unknownKeys:"passthrough"})}extend(t){return new tt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new tt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Te.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new tt({...this._def,catchall:t})}pick(t){const r={};return Ve.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new tt({...this._def,shape:()=>r})}omit(t){const r={};return Ve.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new tt({...this._def,shape:()=>r})}deepPartial(){return Mi(this)}partial(t){const r={};return Ve.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];t&&!t[n]?r[n]=i:r[n]=i.optional()}),new tt({...this._def,shape:()=>r})}required(t){const r={};return Ve.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof un;)o=o._def.innerType;r[n]=o}}),new tt({...this._def,shape:()=>r})}keyof(){return $w(Ve.objectKeys(this.shape))}}tt.create=(e,t)=>new tt({shape:()=>e,unknownKeys:"strip",catchall:vn.create(),typeName:Te.ZodObject,...Re(t)});tt.strictCreate=(e,t)=>new tt({shape:()=>e,unknownKeys:"strict",catchall:vn.create(),typeName:Te.ZodObject,...Re(t)});tt.lazycreate=(e,t)=>new tt({shape:e,unknownKeys:"strip",catchall:vn.create(),typeName:Te.ZodObject,...Re(t)});class Xo extends Pe{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new kr(s.ctx.common.issues));return le(r,{code:J.invalid_union,unionErrors:a}),De}if(r.common.async)return Promise.all(n.map(async o=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of n){const c={...r,common:{...r.common,issues:[]},parent:null},d=u._parseSync({data:r.data,path:r.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!o&&(o={result:d,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new kr(u));return le(r,{code:J.invalid_union,unionErrors:s}),De}}get options(){return this._def.options}}Xo.create=(e,t)=>new Xo({options:e,typeName:Te.ZodUnion,...Re(t)});const el=e=>e instanceof ea?el(e.schema):e instanceof Sr?el(e.innerType()):e instanceof ta?[e.value]:e instanceof Bn?e.options:e instanceof ra?Object.keys(e.enum):e instanceof na?el(e._def.innerType):e instanceof Go?[void 0]:e instanceof Zo?[null]:null;class zc extends Pe{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==se.object)return le(r,{code:J.invalid_type,expected:se.object,received:r.parsedType}),De;const n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(le(r,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),De)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const i=new Map;for(const o of r){const a=el(o.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new zc({typeName:Te.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:i,...Re(n)})}}function Yp(e,t){const r=xn(e),n=xn(t);if(e===t)return{valid:!0,data:e};if(r===se.object&&n===se.object){const i=Ve.objectKeys(t),o=Ve.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=Yp(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(r===se.array&&n===se.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(zp(o)||zp(a))return De;const s=Yp(o.value,a.value);return s.valid?((qp(o)||qp(a))&&r.dirty(),{status:r.value,value:s.data}):(le(n,{code:J.invalid_intersection_types}),De)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Jo.create=(e,t,r)=>new Jo({left:e,right:t,typeName:Te.ZodIntersection,...Re(r)});class Gr extends Pe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==se.array)return le(n,{code:J.invalid_type,expected:se.array,received:n.parsedType}),De;if(n.data.lengththis._def.items.length&&(le(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...n.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new Yr(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>Ft.mergeArray(r,a)):Ft.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new Gr({...this._def,rest:t})}}Gr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gr({items:e,typeName:Te.ZodTuple,rest:null,...Re(t)})};class Qo extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==se.object)return le(n,{code:J.invalid_type,expected:se.object,received:n.parsedType}),De;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in n.data)i.push({key:o._parse(new Yr(n,s,n.path,s)),value:a._parse(new Yr(n,n.data[s],n.path,s))});return n.common.async?Ft.mergeObjectAsync(r,i):Ft.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof Pe?new Qo({keyType:t,valueType:r,typeName:Te.ZodRecord,...Re(n)}):new Qo({keyType:mr.create(),valueType:t,typeName:Te.ZodRecord,...Re(r)})}}class hu extends Pe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==se.map)return le(n,{code:J.invalid_type,expected:se.map,received:n.parsedType}),De;const i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,u],c)=>({key:i._parse(new Yr(n,s,n.path,[c,"key"])),value:o._parse(new Yr(n,u,n.path,[c,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const c=await u.key,d=await u.value;if(c.status==="aborted"||d.status==="aborted")return De;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(c.value,d.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const u of a){const c=u.key,d=u.value;if(c.status==="aborted"||d.status==="aborted")return De;(c.status==="dirty"||d.status==="dirty")&&r.dirty(),s.set(c.value,d.value)}return{status:r.value,value:s}}}}hu.create=(e,t,r)=>new hu({valueType:t,keyType:e,typeName:Te.ZodMap,...Re(r)});class ki extends Pe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==se.set)return le(n,{code:J.invalid_type,expected:se.set,received:n.parsedType}),De;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(le(n,{code:J.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());const o=this._def.valueType;function a(u){const c=new Set;for(const d of u){if(d.status==="aborted")return De;d.status==="dirty"&&r.dirty(),c.add(d.value)}return{status:r.value,value:c}}const s=[...n.data.values()].map((u,c)=>o._parse(new Yr(n,u,n.path,c)));return n.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,r){return new ki({...this._def,minSize:{value:t,message:_e.toString(r)}})}max(t,r){return new ki({...this._def,maxSize:{value:t,message:_e.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}ki.create=(e,t)=>new ki({valueType:e,minSize:null,maxSize:null,typeName:Te.ZodSet,...Re(t)});class Yi extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==se.function)return le(r,{code:J.invalid_type,expected:se.function,received:r.parsedType}),De;function n(s,u){return fu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,du(),qo].filter(c=>!!c),issueData:{code:J.invalid_arguments,argumentsError:u}})}function i(s,u){return fu({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,du(),qo].filter(c=>!!c),issueData:{code:J.invalid_return_type,returnTypeError:u}})}const o={errorMap:r.common.contextualErrorMap},a=r.data;return this._def.returns instanceof no?qt(async(...s)=>{const u=new kr([]),c=await this._def.args.parseAsync(s,o).catch(p=>{throw u.addIssue(n(s,p)),u}),d=await a(...c);return await this._def.returns._def.type.parseAsync(d,o).catch(p=>{throw u.addIssue(i(d,p)),u})}):qt((...s)=>{const u=this._def.args.safeParse(s,o);if(!u.success)throw new kr([n(s,u.error)]);const c=a(...u.data),d=this._def.returns.safeParse(c,o);if(!d.success)throw new kr([i(c,d.error)]);return d.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Yi({...this._def,args:Gr.create(t).rest(ci.create())})}returns(t){return new Yi({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Yi({args:t||Gr.create([]).rest(ci.create()),returns:r||ci.create(),typeName:Te.ZodFunction,...Re(n)})}}class ea extends Pe{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}ea.create=(e,t)=>new ea({getter:e,typeName:Te.ZodLazy,...Re(t)});class ta extends Pe{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return le(r,{received:r.data,code:J.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}}ta.create=(e,t)=>new ta({value:e,typeName:Te.ZodLiteral,...Re(t)});function $w(e,t){return new Bn({values:e,typeName:Te.ZodEnum,...Re(t)})}class Bn extends Pe{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return le(r,{expected:Ve.joinValues(n),received:r.parsedType,code:J.invalid_type}),De}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return le(r,{received:r.data,code:J.invalid_enum_value,options:n}),De}return qt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return Bn.create(t)}exclude(t){return Bn.create(this.options.filter(r=>!t.includes(r)))}}Bn.create=$w;class ra extends Pe{_parse(t){const r=Ve.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==se.string&&n.parsedType!==se.number){const i=Ve.objectValues(r);return le(n,{expected:Ve.joinValues(i),received:n.parsedType,code:J.invalid_type}),De}if(r.indexOf(t.data)===-1){const i=Ve.objectValues(r);return le(n,{received:n.data,code:J.invalid_enum_value,options:i}),De}return qt(t.data)}get enum(){return this._def.values}}ra.create=(e,t)=>new ra({values:e,typeName:Te.ZodNativeEnum,...Re(t)});class no extends Pe{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==se.promise&&r.common.async===!1)return le(r,{code:J.invalid_type,expected:se.promise,received:r.parsedType}),De;const n=r.parsedType===se.promise?r.data:Promise.resolve(r.data);return qt(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}}no.create=(e,t)=>new no({type:e,typeName:Te.ZodPromise,...Re(t)});class Sr extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),i=this._def.effect||null;if(i.type==="preprocess"){const a=i.transform(n.data);return n.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}const o={addIssue:a=>{le(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?De:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?De:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!pu(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>pu(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):a);Ve.assertNever(i)}}Sr.create=(e,t,r)=>new Sr({schema:e,typeName:Te.ZodEffects,effect:t,...Re(r)});Sr.createWithPreprocess=(e,t,r)=>new Sr({schema:t,effect:{type:"preprocess",transform:e},typeName:Te.ZodEffects,...Re(r)});class un extends Pe{_parse(t){return this._getType(t)===se.undefined?qt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}un.create=(e,t)=>new un({innerType:e,typeName:Te.ZodOptional,...Re(t)});class bi extends Pe{_parse(t){return this._getType(t)===se.null?qt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}bi.create=(e,t)=>new bi({innerType:e,typeName:Te.ZodNullable,...Re(t)});class na extends Pe{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===se.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}na.create=(e,t)=>new na({innerType:e,typeName:Te.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Re(t)});class yu extends Pe{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return vu(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new kr(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new kr(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}yu.create=(e,t)=>new yu({innerType:e,typeName:Te.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Re(t)});class ku extends Pe{_parse(t){if(this._getType(t)!==se.nan){const n=this._getOrReturnCtx(t);return le(n,{code:J.invalid_type,expected:se.nan,received:n.parsedType}),De}return{status:"valid",value:t.data}}}ku.create=e=>new ku({typeName:Te.ZodNaN,...Re(e)});const GB=Symbol("zod_brand");class Vw extends Pe{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class La extends Pe{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?De:o.status==="dirty"?(r.dirty(),Lw(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?De:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(t,r){return new La({in:t,out:r,typeName:Te.ZodPipeline})}}const Fw=(e,t={},r)=>e?ro.create().superRefine((n,i)=>{var o,a;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:r)!==null&&a!==void 0?a:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:u})}}):ro.create(),ZB={object:tt.lazycreate};var Te;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline"})(Te||(Te={}));const XB=(e,t={message:`Input not instance of ${e.name}`})=>Fw(r=>r instanceof e,t),Hw=mr.create,Uw=Hn.create,JB=ku.create,QB=Un.create,Bw=Yo.create,eK=yi.create,tK=mu.create,rK=Go.create,nK=Zo.create,iK=ro.create,oK=ci.create,aK=vn.create,sK=gu.create,lK=br.create,uK=tt.create,cK=tt.strictCreate,dK=Xo.create,fK=zc.create,pK=Jo.create,vK=Gr.create,mK=Qo.create,gK=hu.create,hK=ki.create,yK=Yi.create,kK=ea.create,bK=ta.create,_K=Bn.create,wK=ra.create,xK=no.create,pk=Sr.create,SK=un.create,jK=bi.create,TK=Sr.createWithPreprocess,OK=La.create,EK=()=>Hw().optional(),DK=()=>Uw().optional(),IK=()=>Bw().optional(),RK={string:e=>mr.create({...e,coerce:!0}),number:e=>Hn.create({...e,coerce:!0}),boolean:e=>Yo.create({...e,coerce:!0}),bigint:e=>Un.create({...e,coerce:!0}),date:e=>yi.create({...e,coerce:!0})},NK=De;var q=Object.freeze({__proto__:null,defaultErrorMap:qo,setErrorMap:MB,getErrorMap:du,makeIssue:fu,EMPTY_PATH:LB,addIssueToContext:le,ParseStatus:Ft,INVALID:De,DIRTY:Lw,OK:qt,isAborted:zp,isDirty:qp,isValid:pu,isAsync:vu,get util(){return Ve},get objectUtil(){return Wp},ZodParsedType:se,getParsedType:xn,ZodType:Pe,ZodString:mr,ZodNumber:Hn,ZodBigInt:Un,ZodBoolean:Yo,ZodDate:yi,ZodSymbol:mu,ZodUndefined:Go,ZodNull:Zo,ZodAny:ro,ZodUnknown:ci,ZodNever:vn,ZodVoid:gu,ZodArray:br,ZodObject:tt,ZodUnion:Xo,ZodDiscriminatedUnion:zc,ZodIntersection:Jo,ZodTuple:Gr,ZodRecord:Qo,ZodMap:hu,ZodSet:ki,ZodFunction:Yi,ZodLazy:ea,ZodLiteral:ta,ZodEnum:Bn,ZodNativeEnum:ra,ZodPromise:no,ZodEffects:Sr,ZodTransformer:Sr,ZodOptional:un,ZodNullable:bi,ZodDefault:na,ZodCatch:yu,ZodNaN:ku,BRAND:GB,ZodBranded:Vw,ZodPipeline:La,custom:Fw,Schema:Pe,ZodSchema:Pe,late:ZB,get ZodFirstPartyTypeKind(){return Te},coerce:RK,any:iK,array:lK,bigint:QB,boolean:Bw,date:eK,discriminatedUnion:fK,effect:pk,enum:_K,function:yK,instanceof:XB,intersection:pK,lazy:kK,literal:bK,map:gK,nan:JB,nativeEnum:wK,never:aK,null:nK,nullable:jK,number:Uw,object:uK,oboolean:IK,onumber:DK,optional:SK,ostring:EK,pipeline:OK,preprocess:TK,promise:xK,record:mK,set:hK,strictObject:cK,string:Hw,symbol:tK,transformer:pk,tuple:vK,undefined:rK,union:dK,unknown:oK,void:sK,NEVER:NK,ZodIssueCode:J,quotelessJson:CB,ZodError:kr});const Xr=e=>{const{heading:t,errors:r}=e,n=v.useRef(null);return v.useEffect(()=>{var i;n!=null&&n.current&&((i=n.current)==null||i.focus())},[r]),Object.keys(r).length===0?null:l.jsx(fd,{ref:n,heading:t||"For å gå videre må du rette opp følgende:",children:Object.entries(r).map(([i,o],a)=>{if(o.type===q.ZodIssueCode.custom)return l.jsx(fd.Item,{children:o.message},a);const s=o.ref.id??o.ref.name;return l.jsx(fd.Item,{href:`#${s}`,children:o.message},a)})})},PK=q.object({begrunnelse:q.string().min(1,"Du må fylle ut tema begrunnelse").max(255,"Du må korte ned teksten til 255 tegn")}),Kw=e=>{const{beskrivelseLabel:t,headerTekst:r,lagrer:n,onSubmit:i}=e,o={begrunnelse:""},{register:a,handleSubmit:s,watch:u,formState:{errors:c}}=Et({defaultValues:o,resolver:Dt(PK),shouldFocusError:!1}),d=u("begrunnelse");return l.jsx("form",{onSubmit:s(i),children:l.jsxs("div",{children:[l.jsx(oe,{level:"1",size:"large",children:r}),l.jsx(Vt,{label:t,maxLength:255,disabled:n,...a("begrunnelse"),error:c.begrunnelse&&c.begrunnelse.message,value:d}),l.jsx(Xr,{errors:c}),l.jsx(Ne,{className:"mt-4",loading:n,children:"Lagre"})]})})},AK=e=>{switch(e.type){case fe.SAMTALEREFERAT_TYPE:return"Du må dele referatet med brukeren før du kan sette aktiviteten til fullført eller avbrutt";case fe.MOTE_TYPE:return"Du må dele referatet med brukeren før du kan sette aktiviteten til fullført"}},Ww=({aktivitet:e,nyStatus:t,children:r})=>Y1(e,t)?l.jsx(Ge,{variant:"error",children:AK(e)}):r,zw=({onSubmit:e,headerTekst:t})=>l.jsxs("div",{className:"flex flex-col gap-8",children:[l.jsx(oe,{level:"1",size:"large",children:t}),l.jsx(Ge,{variant:"warning",children:"Når du lagrer, blir aktiviteten låst og du kan ikke lenger endre innholdet."}),l.jsx(Ne,{className:"self-baseline",onClick:e,children:"Lagre"})]}),vk="Avbrutt aktivitet",CK="Skriv en kort begrunnelse under om hvorfor du avbrøt aktiviteten. Når du lagrer blir aktiviteten låst, og du kan ikke lenger redigere innholdet.",MK=()=>{const{id:e}=Bu(),t=C(f=>e?Cc(f,e):void 0),r=C(Mc),n=_t(),{hovedsideRoute:i}=Ot(),o=Le(),a=(f,p)=>o(ZL(t,p)),s=r!==te.OK,u=t?l.jsx(Kw,{headerTekst:vk,beskrivelseLabel:CK,lagrer:s,onSubmit:async f=>{n(i(),{replace:!0}),a(t,f.begrunnelse)}}):null,c=t?l.jsx(zw,{headerTekst:vk,onSubmit:()=>{a(t,null),n(i())}}):null,d=t&&Mm(t.avtalt,pe.AVBRUTT,t.type);return l.jsx(Xn,{contentLabel:"Avbryt aktivitet",children:t?l.jsx(Ww,{aktivitet:t,nyStatus:pe.AVBRUTT,children:d?u:c}):l.jsx(xu,{})})},mk="Fullført aktivitet",LK="Skriv en kort kommentar om hvordan det har gått, eller noe NAV bør kjenne til. Når du lagrer, blir aktiviteten låst og du kan ikke lenger endre innholdet.",$K=()=>{const{id:e}=Bu(),t=C(c=>e?Cc(c,e):void 0),r=C(c=>Mc(c))!==te.OK,n=Le(),i=(c,d)=>n(XL(c,d)),o=_t(),{hovedsideRoute:a}=Ot(),s=l.jsx(Kw,{headerTekst:mk,beskrivelseLabel:LK,lagrer:r,onSubmit:async c=>{o(a(),{replace:!0}),t&&i(t,c.begrunnelse)}}),u=l.jsx(zw,{headerTekst:mk,onSubmit:()=>{t&&i(t,null),o(a(),{replace:!0})}});return t?l.jsx(Xn,{header:l.jsx(Ea,{}),contentLabel:"Fullfør aktivitet",children:l.jsx(Ww,{aktivitet:t,nyStatus:pe.FULLFOERT,children:t.avtalt&&t.type!==ar&&t.type!==Yt?s:u})}):l.jsx(Ku,{to:a()})},ti=({children:e,href:t})=>l.jsx(Sp,{to:t,children:l.jsx(mp,{as:"div",children:l.jsx(mp.Title,{children:e})})}),VK=()=>{const e=Ue(),t=C(Tm),{nyAktivitetRoute:r}=Ot(),n=r();return l.jsxs(Xn,{contentClass:"ny-aktivitet-visning",feilmeldinger:t,children:[l.jsxs("div",{className:"mb-4",children:[l.jsx(oe,{id:"modal-heading",level:"1",size:"large",children:"Legg til en aktivitet"}),e?null:l.jsx(ce,{className:"mt-6",children:"Her kan du legge til ulike aktiviteter du gjør for å nå målet ditt."})]}),e?l.jsxs("div",{className:"space-y-3 flex flex-col bg-surface-alt-3-subtle -mx-8 px-8 py-4",children:[l.jsx(oe,{level:"2",size:"medium",children:"For NAV-ansatt"}),l.jsx(ti,{href:`${n}/sokeavtale`,children:"Avtale om å søke jobber"}),l.jsx(ti,{href:`${n}/mote`,children:"Møte med NAV"}),l.jsx(ti,{href:`${n}/samtalereferat`,children:"Samtalereferat"})]}):null,l.jsxs("div",{className:"mt-8",children:[e?l.jsx(oe,{level:"2",size:"medium",className:"mb-4",children:"For bruker og NAV-ansatt"}):null,l.jsxs("div",{className:"space-y-3 flex flex-col",children:[l.jsx(ti,{href:`${n}/stilling`,children:"En jobb jeg vil søke på"}),l.jsx(ti,{href:`${n}/ijobb`,children:"Jobb jeg har nå"}),l.jsx(ti,{href:`${n}/egen`,children:"Jobbrettet egenaktivitet"}),l.jsx(ti,{href:`${n}/behandling`,children:"Medisinsk behandling"})]})]})]})},_i="Alle endringer blir borte hvis du ikke lagrer. Er du sikker på at du vil lukke siden?",qw=e=>v.useEffect(()=>(window.onbeforeunload=t=>{if(e.current)return t.returnValue=_i,_i},()=>{window.onbeforeunload=null}),[e]),Yw=e=>Object.entries(e).reduce((t,[r,n])=>(n!==null&&typeof n=="string"&&n.length<=0||n===void 0?t[r]=null:t[r]=n,t),{}),FK=Cu("nb"),ia=({field:{disabled:e,name:t,defaultValue:r,required:n=!1,label:i},disabledDays:o})=>{const[a,s]=v.useState(!1),u=()=>s(!1);Am(a,u);const{control:c,setValue:d,clearErrors:f}=Ma(),{field:p,fieldState:{error:m}}=zo({control:c,defaultValue:r,name:t}),[g,h]=v.useState(r?Ct(r,"dd.M.y"):""),b=O=>{const I=To(O.target.value,new Date,FK,"date",!0);Nt(I)?d(t,I):d(t,void 0),h(O.target.value),Kt(I)&&(u(),f(t))},_=O=>{d(t,O,{shouldDirty:!0}),h(O?Ct(O,"dd.M.y"):""),O&&(u(),f(t))},y=()=>{p.onBlur(),Kt(p.value)&&h(Ct(p.value,"dd.M.y"))},S=()=>{s(!a)};return l.jsx("div",{className:"flex",children:l.jsx("div",{onClick:Cm,children:l.jsx(No,{onSelect:_,selected:Kt(p.value)?p.value:void 0,disabled:o,onOpenToggle:S,open:a,children:l.jsx(No.Input,{disabled:e,className:"flex-1",error:m==null?void 0:m.message,label:i??"Dato"+(n?" (obligatorisk)":""),name:t,value:g,onFocus:()=>s(!0),onBlur:y,onChange:b,ref:p.ref})})})})},HK=({from:e,to:t,disabledDays:r})=>{var z,G,M,N;const[n,i]=v.useState(!1),o=()=>i(!1);Am(n,o);const{setError:a,clearErrors:s,control:u,setValue:c}=Ma(),{field:d,fieldState:f}=zo({control:u,name:e.name,defaultValue:e.defaultValue??void 0}),{field:p,fieldState:m}=zo({control:u,name:t.name,defaultValue:t.defaultValue??void 0}),[g,h]=v.useState(void 0),b=R=>{R&&((R.from.isValidDate||!e.required&&R.from.isEmpty)&&s([e.name]),(R.to.isValidDate||!t.required&&R.to.isEmpty)&&s(t.name))},_=()=>{g&&(f.isTouched&&!g.from.isEmpty&&g.from.isInvalid&&a(e.name,{message:"Ikke en gyldig dato"}),m.isTouched&&!g.to.isEmpty&&g.to.isInvalid&&a(t.name,{message:"Ikke en gyldig dato"}),b(g))},{datepickerProps:y,toInputProps:S,fromInputProps:O,reset:I,setSelected:T}=dA({defaultSelected:{from:e.defaultValue,to:t.defaultValue},disabled:r,onValidate:R=>{h(R),b(R)},onRangeChange:R=>{c(t.name,Eo(R==null?void 0:R.to),{shouldDirty:!0}),c(e.name,Eo(R==null?void 0:R.from),{shouldDirty:!0})}}),V=v.useMemo(()=>({fromDefaultValue:e.defaultValue,toDefaultValue:t.defaultValue}),[(z=e.defaultValue)==null?void 0:z.getTime(),(G=t.defaultValue)==null?void 0:G.getTime()]);v.useEffect(()=>{I(),T({from:V.fromDefaultValue,to:V.toDefaultValue})},[V]);const K=R=>{c(e.name,Eo(R.target.value))},Y=R=>{c(e.name,Eo(R.target.value))};return l.jsx("div",{className:"flex flex-1",onClick:Cm,children:l.jsx(No,{...y,open:n,onOpenToggle:()=>i(!n),onClose:o,wrapperClassName:"flex flex-1",children:l.jsxs("div",{className:"flex flex-1 items-start gap-y-8 gap-x-6 flex-wrap",children:[l.jsx(No.Input,{disabled:e.disabled,className:"flex-1",error:(M=f.error)==null?void 0:M.message,label:(e==null?void 0:e.label)??`Fra dato ${e.required?"(obligatorisk)":"(valgfri)"}`,...O,name:d.name,onFocus:Ai([O.onFocus]),onBlur:Ai([d.onBlur,O.onBlur,_,o]),onChange:Ai([K,O.onChange]),ref:R=>{O.ref.current=R,d.ref(R)}}),l.jsx(No.Input,{className:"flex-1",error:(N=m.error)==null?void 0:N.message,label:(t==null?void 0:t.label)??`Til dato ${t.required?"(obligatorisk)":"(valgfri)"}`,...S,name:p.name,onFocus:Ai([S.onFocus]),onBlur:Ai([p.onBlur,S.onBlur,_,o]),onChange:Ai([Y,S.onChange]),ref:R=>{S.ref.current=R,p.ref(R)}})]})})})};function $a({aktivitet:e,from:t,to:r}){const n=e!=null&&e.tilDato?new Date(e.tilDato):r.defaultValue,i=e!=null&&e.fraDato?new Date(e.fraDato):t.defaultValue;return e&&e.avtalt&&e.fraDato?l.jsxs("div",{className:"flex gap-4",children:[l.jsx(ia,{field:{...t,disabled:!0,defaultValue:i}}),l.jsx(ia,{field:{...r,defaultValue:n},disabledDays:[{before:i}]})]}):l.jsx(HK,{from:{defaultValue:i,...t},to:{defaultValue:n,...r}})}function UK(e,t,r){return async(n,i,o)=>{const a=await r(n,i,o);if(!e)return a;const s=Object.entries(a.errors).filter(([c,d])=>t.includes(c)).reduce((c,[d,f])=>({...c,[d]:f}),{});return{values:Object.keys(s).length>0?{}:n,errors:s}}}const BK={BEHANDLING:l.jsxs("div",{className:"mt-4",children:[l.jsx(ce,{children:"Her kan du legge inn medisinsk behandling som påvirker muligheten din til å jobbe eller være på kurs og tiltak."}),l.jsx(ce,{children:"Eksempler:"}),l.jsxs("ul",{className:"list-disc ml-4",children:[l.jsx("li",{children:"Oppfølging hos fastlege"}),l.jsx("li",{children:"Behandling og veiledning hos fysioterapaut"}),l.jsx("li",{children:"Behandling hos psykolog"}),l.jsx("li",{children:" Behandling hos spesialist"})]})]}),EGEN:"Her kan du eller veilederen din legge inn aktiviteter som hjelper deg når du skal komme i arbeid. Eksempler kan være å registrere deg hos bemannings- og rekrutteringsbyråer, jobbe godt med CV-en, eller lage oversikt over personer som kan være nyttig å kontakte når du er på jakt etter jobb.",GRUPPEAKTIVITET:"Her ser du informasjon om en gruppeaktivitet NAV har meldt deg på",IJOBB:"Her kan du informere om der du jobber nå, for eksempel en deltidsjobb eller en midlertidig stilling. Hvis du sender inn meldekort, så må du også huske å føre opp de timene du har jobbet på meldekortet.",MOTE:"NAV ønsker et møte med deg. Du må gi beskjed så raskt som mulig hvis tidspunktet ikke passer.",SAMTALEREFERAT:"Her finner du referat fra en samtale du har hatt med NAV.",SOKEAVTALE:'Her ser du hvor mange jobber NAV forventer at du søker. Legg inn stillinger du søker på i aktivitetsplanen ved å klikke på "Legg til aktivitet". ',STILLING:"Her kan du legge til informasjon om en stilling du har lyst å søke på. Du kan også legge til en stilling du allerede har søkt på.",TILTAKSAKTIVITET:"Her finner du informasjon om et tiltak NAV har søkt deg inn på. ",UTDANNINGSAKTIVITET:"Her ser du informasjon om en utdanningsaktivitet eller et kurs NAV har registrert at du skal gjennomføre.",STILLING_FRA_NAV:"NAV hjelper en arbeidsgiver med å finne kandidater til en stilling, og tror den kan passe for deg.",EKSTERNAKTIVITET:void 0},Gw=({aktivitetstype:e})=>{const t=BK[e];return t?typeof t=="string"?l.jsx("section",{className:"aktivitetingress mt-4",children:l.jsx($n,{className:"aktivitetingress__tekst",children:t})}):l.jsx("section",{children:t}):null},Ii=({tittel:e,aktivitetstype:t})=>l.jsxs("div",{className:"mb-8 mt-4",children:[l.jsx(oe,{level:"1",size:"xlarge",children:e}),l.jsx(Gw,{aktivitetstype:t})]}),go=e=>{const{disabled:t,loading:r=!1}=e,n=C(Ut);return l.jsx(l.Fragment,{children:l.jsx(Ne,{className:"mt-4",loading:r,disabled:t||!n,children:"Lagre"})})},KK=q.object({tittel:q.string().min(1,"Du må fylle ut stillingstittel").max(100,"Du må korte ned teksten til 100 tegn"),fraDato:q.date({required_error:"Fra dato må fylles ut",invalid_type_error:"Ikke en gyldig dato"}),tilDato:q.date({invalid_type_error:"Ikke en gyldig dato"}).optional().nullable(),jobbStatus:q.nativeEnum(Gd,{required_error:"Du må velge heltid eller deltid"}),ansettelsesforhold:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional().nullable(),arbeidstid:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional().nullable(),beskrivelse:q.string().max(5e3,"Du må korte ned teksten til 5000 tegn").optional().nullable()}),jr=e=>{if(e!=null)return new Date(e)},Zw=e=>{const{onSubmit:t,dirtyRef:r,aktivitet:n}=e,i={tittel:n==null?void 0:n.tittel,fraDato:jr(n==null?void 0:n.fraDato),tilDato:jr(n==null?void 0:n.tilDato),jobbStatus:n==null?void 0:n.jobbStatus,ansettelsesforhold:n==null?void 0:n.ansettelsesforhold,arbeidstid:n==null?void 0:n.arbeidstid,beskrivelse:n==null?void 0:n.beskrivelse},o=(n==null?void 0:n.avtalt)||!1,a=Et({defaultValues:i,resolver:Dt(KK),shouldFocusError:!1}),{register:s,setValue:u,handleSubmit:c,watch:d,control:f,formState:{errors:p,isDirty:m,isSubmitting:g}}=a;r&&(r.current=m);const h=d("beskrivelse"),b=_=>{u("jobbStatus",_,{shouldValidate:!0})};return l.jsx("form",{autoComplete:"off",noValidate:!0,onSubmit:c(_=>t(_)),children:l.jsx(Jn,{...a,children:l.jsxs("div",{className:"space-y-8",children:[l.jsx(Ii,{tittel:"Jobb jeg har nå",aktivitetstype:fe.IJOBB_AKTIVITET_TYPE}),l.jsx(nt,{disabled:o,label:"Stillingstittel (obligatorisk)",id:"tittel",...s("tittel"),error:p.tittel&&p.tittel.message}),l.jsx($a,{aktivitet:n,from:{name:"fraDato",required:!0},to:{name:"tilDato"}}),l.jsx(wB,{name:"jobbStatus",control:f,render:()=>l.jsxs(oo,{defaultValue:i.jobbStatus,disabled:o,id:"jobbStatus",legend:"Stillingsandel (obligatorisk)",onChange:b,error:p.jobbStatus&&p.jobbStatus.message,children:[l.jsx(_r,{value:Gd.HELTID,children:"Heltid"}),l.jsx(_r,{value:Gd.DELTID,children:"Deltid"})]})}),l.jsx(nt,{disabled:o,label:"Arbeidsgiver (valgfri)",id:"ansettelsesforhold",...s("ansettelsesforhold"),error:p.ansettelsesforhold&&p.ansettelsesforhold.message}),l.jsx(nt,{disabled:o,label:"Ansettelsesforhold (valgfri)",description:"For eksempel fast, midlertidig, vikariat",id:"arbeidstid",...s("arbeidstid"),error:p.arbeidstid&&p.arbeidstid.message}),l.jsx(Vt,{disabled:o,label:"Kort beskrivelse av stillingen (valgfri)",description:"For eksempel dag, kveld, helg, stillingsprosent eller oppgaver",maxLength:5e3,...s("beskrivelse"),error:p.beskrivelse&&p.beskrivelse.message,value:h||""}),l.jsx(Xr,{errors:p}),l.jsx(go,{loading:g})]})})})},WK=q.object({tittel:q.string(),fraDato:q.date({required_error:"Fra dato må fylles ut",invalid_type_error:"Ikke en gyldig dato"}),tilDato:q.date({required_error:"Til dato må fylles ut",invalid_type_error:"Ikke en gyldig dato"}),behandlingType:q.string().min(1,"Du må fylle ut type behandling").max(100,"Du må korte ned teksten til 100 tegn"),behandlingSted:q.string().min(1,"Du må fylle ut behandlingssted").max(255,"Du må korte ned teksten til 100 tegn"),effekt:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),behandlingOppfolging:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),beskrivelse:q.string().max(400,"Du må korte ned teksten til 400 tegn").optional()}).superRefine((e,t)=>{Or(e.fraDato,e.tilDato)&&t.addIssue({path:["tilDato"],code:q.ZodIssueCode.custom,message:"Til dato kan ikke være før fra dato"})}),zK=Dt(WK),Xw=e=>{const{onSubmit:t,dirtyRef:r,aktivitet:n}=e,i={tittel:(n==null?void 0:n.tittel)||"Medisinsk behandling",behandlingType:(n==null?void 0:n.behandlingType)||"",behandlingSted:(n==null?void 0:n.behandlingSted)||"",fraDato:jr(n==null?void 0:n.fraDato),tilDato:jr(n==null?void 0:n.tilDato),effekt:(n==null?void 0:n.effekt)||"",beskrivelse:(n==null?void 0:n.beskrivelse)||"",behandlingOppfolging:(n==null?void 0:n.behandlingOppfolging)||""},o=(n==null?void 0:n.avtalt)||!1,a=Et({defaultValues:i,resolver:UK(o,["tilDato"],zK),shouldFocusError:!1}),{register:s,handleSubmit:u,watch:c,formState:{errors:d,isDirty:f,isSubmitting:p}}=a;r&&(r.current=f);const m=c("beskrivelse");return l.jsx("form",{autoComplete:"off",noValidate:!0,onSubmit:u(g=>t(g)),children:l.jsx(Jn,{...a,children:l.jsxs("div",{className:"space-y-8",children:[l.jsx(Ii,{tittel:"Medisinsk behandling",aktivitetstype:fe.BEHANDLING_AKTIVITET_TYPE}),l.jsx(nt,{disabled:o,label:"Type behandling (obligatorisk)",id:"behandlingstype",...s("behandlingType"),error:d.behandlingType&&d.behandlingType.message}),l.jsx(nt,{disabled:o,label:"Behandlingssted (obligatorisk)",id:"behandlingssted",...s("behandlingSted"),error:d.behandlingSted&&d.behandlingSted.message}),l.jsx($a,{aktivitet:n,from:{name:"fraDato",required:!0,label:"Fra dato"},to:{name:"tilDato",required:!0,label:"Til dato"}}),l.jsx(nt,{disabled:o,label:"Mål for behandlingen (valgfri)",id:"effekt",...s("effekt"),error:d.effekt&&d.effekt.message}),l.jsx(nt,{disabled:o,label:"Oppfølging fra NAV (valgfri)",id:"behandlingoppfolging",...s("behandlingOppfolging"),error:d.behandlingOppfolging&&d.behandlingOppfolging.message}),l.jsx(Vt,{disabled:o,label:"Kort beskrivelse av behandlingen (valgfri)",maxLength:400,...s("beskrivelse"),error:d.beskrivelse&&d.beskrivelse.message,value:m}),l.jsx(Xr,{errors:d}),l.jsx(go,{loading:p})]})})})};function Jw(e){return e.data.malverk}function Qw(e){return Jw(e).malverker}function qK(e,t){return Qw(e).filter(r=>r.tittel===t)}function YK(e){return Jw(e).status}function GK(e){return l.jsx("option",{value:e.tittel,children:e.tittel},e.tittel)}class zm extends v.Component{constructor(){super(...arguments);ho(this,"onChangeMalverk",r=>{const{doHentMalverkMedTittel:n,doSettValgtMalverk:i,onChange:o}=this.props;r.preventDefault();const a=n(r.target.value);i(a),o(a[0])})}componentDidMount(){const{doHentMalverMedType:r,endre:n,type:i}=this.props;n||r(i)}componentWillUnmount(){const{doSlettValgtMalverk:r}=this.props;r()}render(){const{malverk:r,avhengigheter:n,endre:i}=this.props,o=Object.values(r).map(GK),a="malverk";return!i&&l.jsx("div",{className:"skjemaelement",children:l.jsx(Wt,{className:"flex m-auto",avhengigheter:n,spinnerSize:"large",children:l.jsxs(Nn,{id:a,name:"malverk",label:"Ferdig utfylt aktivitet",onChange:this.onChangeMalverk,children:[l.jsx("option",{value:"ingen",children:"Ingen ferdig utfylt aktivitet valgt"}),o]})})})}}zm.propTypes={avhengigheter:E9.isRequired,malverk:F.arrayOf(N9),doHentMalverkMedTittel:F.func.isRequired,doHentMalverMedType:F.func.isRequired,doSettValgtMalverk:F.func.isRequired,doSlettValgtMalverk:F.func.isRequired,onChange:F.func,endre:F.bool,type:F.string.isRequired};zm.defaultProps={endre:!1,malverk:void 0,onChange:()=>null};const ZK=e=>({doHentMalverMedType:t=>{e(qs(t))},doSettValgtMalverk:t=>{e(iF(t))},doSlettValgtMalverk:()=>{e(oF())}}),XK=e=>({malverk:Qw(e),avhengigheter:[YK(e)],doHentMalverkMedTittel:t=>qK(e,t)}),ex=w1(fc(XK,ZK)(zm)),JK=q.object({tittel:q.string().min(1,"Du må fylle ut navn på aktiviteten").max(100,"Du må korte ned teksten til 100 tegn"),fraDato:q.date({required_error:"Fra dato må fylles ut",invalid_type_error:"Ikke en gyldig dato"}),tilDato:q.date({required_error:"Fra dato må fylles ut",invalid_type_error:"Ikke en gyldig dato"}),hensikt:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),beskrivelse:q.string().max(5e3,"Du må korte ned teksten til 5000 tegn").optional(),oppfolging:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),lenke:q.string().max(2e3,"Du må korte ned lenken til 2000 tegn").optional()}).superRefine((e,t)=>{Or(e.fraDato,e.tilDato)&&t.addIssue({path:["tilDato"],code:q.ZodIssueCode.custom,message:"Til dato kan ikke være før fra dato"})}),tx=e=>{const{onSubmit:t,dirtyRef:r,aktivitet:n}=e,i=Ue(),o={tittel:(n==null?void 0:n.tittel)||"",fraDato:jr(n==null?void 0:n.fraDato),tilDato:jr(n==null?void 0:n.tilDato),hensikt:(n==null?void 0:n.hensikt)||"",beskrivelse:(n==null?void 0:n.beskrivelse)||"",oppfolging:(n==null?void 0:n.oppfolging)||"",lenke:(n==null?void 0:n.lenke)||""},a=(n==null?void 0:n.avtalt)===!0,s=Et({defaultValues:o,resolver:Dt(JK),shouldFocusError:!1}),{register:u,setValue:c,handleSubmit:d,reset:f,watch:p,formState:{errors:m,isDirty:g,isSubmitting:h}}=s;r&&(r.current=g);const b=p("beskrivelse"),_=y=>{y?Object.entries(y).forEach(([S,O],I)=>{c(S,O)}):f()};return l.jsx("form",{autoComplete:"off",noValidate:!0,onSubmit:d(y=>t(y)),children:l.jsx(Jn,{...s,children:l.jsxs("div",{className:"space-y-8",children:[l.jsx(Ii,{tittel:"Jobbrettet egenaktivitet",aktivitetstype:fe.EGEN_AKTIVITET_TYPE}),l.jsx(ex,{visible:i,endre:!!n,onChange:_,type:"EGEN"}),l.jsx(nt,{disabled:a,label:"Navn på aktiviteten (obligatorisk)",id:"tittel",...u("tittel"),error:m.tittel&&m.tittel.message}),l.jsx($a,{aktivitet:n,from:{name:"fraDato",required:!0},to:{name:"tilDato",required:!0}}),l.jsx(nt,{disabled:a,label:"Mål med aktiviteten (valgfri)",id:"hensikt",...u("hensikt"),error:m.hensikt&&m.hensikt.message}),l.jsx(Vt,{disabled:a,label:"Kort beskrivelse av aktiviteten (valgfri)",maxLength:5e3,...u("beskrivelse"),error:m.beskrivelse&&m.beskrivelse.message,value:b}),l.jsx(nt,{disabled:a,label:"Min huskeliste for denne aktiviteten (valgfri)",id:"huskeliste",...u("oppfolging"),error:m.oppfolging&&m.oppfolging.message}),l.jsx(nt,{disabled:a,label:"Lenke til en aktuell nettside (valgfri)",id:"lenke",...u("lenke"),error:m.lenke&&m.lenke.message}),l.jsx(Xr,{errors:m}),l.jsx(go,{loading:h})]})})})},QK=({avtalt:e,endre:t})=>!e||!t?null:l.jsx(Ge,{variant:"warning",className:"mb-8",children:"Husk å sende en dialogmelding til brukeren om endringen du gjør."}),eW=()=>l.jsx("span",{className:"eksternlenkeIkonBoks",children:l.jsx("svg",{className:"EksternLenkeIkon",height:"14px",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",focusable:"false",children:l.jsx("g",{id:"ikon_external_link",fill:"none",fillRule:"evenodd",strokeLinecap:"round",children:l.jsx("g",{id:"LINE/interface/-external-link",transform:"translate(2 2)",stroke:"#0067C5",children:l.jsxs("g",{id:"external-link",children:[l.jsx("path",{d:"M10,7.07712912 L10,8.33333333 C10,9.25380792 9.25380792,10 8.33333333,10 L1.66666667,10 C0.746192084,10 0,9.25380792 0,8.33333333 L0,1.66666667 C0,0.746192084 0.746192084,0 1.66666667,0 L2.94199316,0",id:"Rectangle-6"}),l.jsxs("g",{id:"Group-7",transform:"translate(4)",children:[l.jsx("path",{d:"M0,6 L6,0",id:"Line-6"}),l.jsx("polyline",{id:"Path-2",points:"2.00719286 0 6 0 6 4.06130668"})]})]})})})})}),tW=({kanal:e})=>e===Fr.INTERNET?l.jsxs(ce,{className:"mote-aktivitet-form__video-info",children:["Les om"," ",l.jsxs(ct,{href:"https://navno.sharepoint.com/sites/intranett-it/SitePages/Videom%C3%B8te-med-brukere.aspx",target:"_blank",rel:"noopener noreferrer",children:["rutiner for videomøte her ",l.jsx(eW,{})]})]}):null,rW=q.object({tittel:q.string().min(1,"Du må fylle ut tema for møtet").max(100,"Du må korte ned teksten til 100 tegn"),dato:q.date({required_error:"Dato må fylles ut",invalid_type_error:"Ikke en gyldig dato"}),klokkeslett:q.string().min(1,"Du må fylle ut klokkeslett"),varighet:q.string().min(1,"Du må fylle ut varighet"),kanal:q.nativeEnum(Fr,{errorMap:e=>{switch(e.code){case"invalid_enum_value":return{message:"Du må velge møteform"};default:return{message:"Noe har gått galt"}}}}),adresse:q.string().min(1,"Du må fylle ut møtested eller annen praktisk informasjon").max(255,"Du må korte ned teksten til 255 tegn"),beskrivelse:q.string().min(1,"Du må fylle ut hensikten med møtet").max(5e3,"Du må korte ned teksten til 5000 tegn"),forberedelser:q.string().max(500,"Du må korte ned teksten til 500 tegn").optional()}),rx=e=>{const{aktivitet:t,dirtyRef:r,onSubmit:n}=e,i=t?W1(t):void 0,o={tittel:t==null?void 0:t.tittel,klokkeslett:i==null?void 0:i.klokkeslett,varighet:q1(i==null?void 0:i.varighet),kanal:t==null?void 0:t.kanal,adresse:t==null?void 0:t.adresse,beskrivelse:t==null?void 0:t.beskrivelse,forberedelser:(t==null?void 0:t.forberedelser)??void 0,dato:Eo(t==null?void 0:t.fraDato)},a=(t==null?void 0:t.avtalt)||!1,s=Et({defaultValues:o,resolver:Dt(rW),shouldFocusError:!1}),{register:u,handleSubmit:c,watch:d,formState:{errors:f,isDirty:p,isSubmitting:m}}=s;r&&(r.current=p);const g=d("beskrivelse"),h=d("forberedelser");return l.jsx("form",{autoComplete:"off",noValidate:!0,onSubmit:c(b=>n({...b,...oH(b),status:pe.PLANLAGT,avtalt:!1})),children:l.jsx(Jn,{...s,children:l.jsxs("div",{className:"space-y-8",children:[l.jsx(Ii,{tittel:"Møte med NAV",aktivitetstype:fe.MOTE_TYPE}),l.jsx(QK,{avtalt:a,endre:!!t}),l.jsx(nt,{disabled:a,label:"Tema for møtet (obligatorisk)",id:"tittel",...u("tittel"),error:f.tittel&&f.tittel.message}),l.jsx(ia,{field:{name:"dato",required:!0,defaultValue:jr(t==null?void 0:t.fraDato)}}),l.jsx(nt,{label:"Klokkeslett (obligatorisk)",...u("klokkeslett"),type:"time",step:"300",error:f.klokkeslett&&f.klokkeslett.message}),l.jsx(nt,{label:"Varighet (obligatorisk)",...u("varighet"),type:"time",step:"900",error:f.varighet&&f.varighet.message}),l.jsxs(Nn,{label:"Møteform (obligatorisk)",...u("kanal"),error:f.kanal&&f.kanal.message,children:[l.jsx("option",{value:"",children:"Velg møteform"}),l.jsx("option",{value:Fr.OPPMOTE,children:"Oppmøte"}),l.jsx("option",{value:Fr.TELEFON,children:"Telefonmøte"}),l.jsx("option",{value:Fr.INTERNET,children:"Videomøte"})]}),l.jsx(tW,{kanal:d("kanal")}),l.jsx(nt,{label:"Møtested eller annen praktisk informasjon (obligatorisk)",id:"adresse",...u("adresse"),error:f.adresse&&f.adresse.message}),l.jsx(Vt,{disabled:a,label:"Hensikt med møtet (obligatorisk)",maxLength:5e3,...u("beskrivelse"),error:f.beskrivelse&&f.beskrivelse.message,value:g}),l.jsx(Vt,{disabled:a,label:"Forberedelser til møtet (valgfri)",maxLength:500,...u("forberedelser"),error:f.forberedelser&&f.forberedelser.message,value:h}),l.jsx(Xr,{errors:f}),l.jsx(go,{loading:m})]})})})},nx=e=>e.data.veileder,Bd=e=>nx(e).data,nW=e=>{var t,r,n;return((t=Bd(e))==null?void 0:t.fornavn)&&`${(r=Bd(e))==null?void 0:r.fornavn} ${(n=Bd(e))==null?void 0:n.etternavn}`},iW=e=>nx(e).status;var ix={exports:{}},wo={};/**
+ * @license React
+ * react-jsx-runtime.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var gk;function oW(){if(gk)return wo;gk=1;var e=k,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,u,c){var d,f={},p=null,m=null;c!==void 0&&(p=""+c),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(m=u.ref);for(d in u)n.call(u,d)&&!o.hasOwnProperty(d)&&(f[d]=u[d]);if(s&&s.defaultProps)for(d in u=s.defaultProps,u)f[d]===void 0&&(f[d]=u[d]);return{$$typeof:t,type:s,key:p,ref:m,props:f,_owner:i.current}}return wo.Fragment=r,wo.jsx=a,wo.jsxs=a,wo}ix.exports=oW();var x=ix.exports;const Kn=e=>v.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},v.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.75 4C11.75 3.58579 12.0858 3.25 12.5 3.25H20C20.1017 3.25 20.1987 3.27024 20.2871 3.30691C20.3755 3.34351 20.4584 3.39776 20.5303 3.46967C20.6022 3.54158 20.6565 3.62445 20.6931 3.71291C20.7251 3.79009 20.7446 3.87376 20.749 3.96141C20.7497 3.97419 20.75 3.98706 20.75 4V11.5C20.75 11.9142 20.4142 12.25 20 12.25C19.5858 12.25 19.25 11.9142 19.25 11.5V5.81066L10.5303 14.5303C10.2374 14.8232 9.76256 14.8232 9.46967 14.5303C9.17678 14.2374 9.17678 13.7626 9.46967 13.4697L18.1893 4.75H12.5C12.0858 4.75 11.75 4.41421 11.75 4ZM5 8.75C4.86193 8.75 4.75 8.86193 4.75 9V19C4.75 19.1381 4.86193 19.25 5 19.25H15C15.1381 19.25 15.25 19.1381 15.25 19V12C15.25 11.5858 15.5858 11.25 16 11.25C16.4142 11.25 16.75 11.5858 16.75 12V19C16.75 19.9665 15.9665 20.75 15 20.75H5C4.0335 20.75 3.25 19.9665 3.25 19V9C3.25 8.0335 4.0335 7.25 5 7.25H12C12.4142 7.25 12.75 7.58579 12.75 8C12.75 8.41421 12.4142 8.75 12 8.75H5Z",fill:"#262626"})),ox=e=>e.replaceAll("Kopier lenke","").split(`
+`).map(t=>t.length>0&&![".",":","!","?"].includes(t.slice(-1))?t+".":t).join(`
+`).split(/\n/).sort((t,r)=>r.replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|").length-t.replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|").length).reduce((t,r)=>r.replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|").length>=4?[...t,r]:[...t],[]);function aW({value:e}){const t=ox(e);if(t.length===0)return null;const[r,n]=v.useState(1),[i,o]=v.useState([]),a=/^[^.!?]*[.!?]/,s=3,u=r*s,c=u-s,d=Object.entries(t).slice(c,u).map(p=>({index:parseInt(p[0]),paragraph:p[1],firstSentence:p[1].match(a)[0]})),f=Math.ceil(t.length/s);return x.jsx(x.Fragment,{children:x.jsxs(ee.Item,{children:[x.jsxs(ee.Header,{children:[t.length," ",t.length===1?x.jsx(x.Fragment,{children:"langt avsnitt"}):x.jsx(x.Fragment,{children:"lange avsnitt"})]}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Skriv korte og enkle avsnitt"}),'"Et avsnitt bør ha ett hovedbudskap og ikke ha mer enn to til tre setninger." -'," ",x.jsxs(ct,{target:"_blank",href:"https://aksel.nav.no/artikkel/sprakarbeid?tema=innholdsarbeid",children:["Aksel",x.jsx(Kn,{})]}),x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Avsnitt med over tre setninger"}),x.jsx("ul",{children:d.map(({index:p,paragraph:m,firstSentence:g})=>x.jsxs("li",{children:[i[p]?x.jsxs(x.Fragment,{children:['"',m," "]}):x.jsxs(x.Fragment,{children:['"',g," "]}),x.jsx(Ne,{size:"xsmall",variant:"secondary",type:"button","aria-expanded":i[p],onClick:()=>{o(h=>{const b=[...h];return b[p]=!b[p],b})},children:i[p]?"Vis mindre":"Les mer"}),'"'," ",x.jsxs("b",{children:["(",m.replace(/([.?!])\s*(?=[A-Z])/g,"$1|").split("|").length," setninger)"]})]},p))}),t.length>s&&x.jsx("div",{children:x.jsx(Lu,{page:r,onPageChange:n,count:f,size:"small",siblingCount:0,boundaryCount:1})})]})]})})}const ax=e=>e.replaceAll("Kopier lenke","").split(`
+`).map(t=>t.length>0&&![".",":","!","?","*"].includes(t.slice(-1))?t+".":t).join(`
+`).replace(/([.?!–"“:*])\s*(?=[A-ZÆØÅ.*«»0-9"“–\d])/g,"$1|").split("|").sort((t,r)=>r.split(/\s+/).length-t.split(/\s+/).length).reduce((t,r)=>r.split(/\s+/).length>=21?[...t,r]:[...t],[]);function sW({value:e}){const t=ax(e);if(t.length===0)return null;const[r,n]=v.useState(1),i=3,o=r*i,a=o-i,s=Object.entries(t).slice(a,o),u=Math.ceil(t.length/i);return x.jsx(x.Fragment,{children:x.jsxs(ee.Item,{children:[x.jsxs(ee.Header,{children:[t.length," ",t.length===1?x.jsx(x.Fragment,{children:"lang setning"}):x.jsx(x.Fragment,{children:"lange setninger"})]}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Skriv korte og enkle setninger"}),"Ifølge studier kan setninger med over 20 ord anses som vanskelige å lese -"," ",x.jsxs(ct,{target:"_blank",href:"https://strainindex.wordpress.com/2012/04/30/longer-the-sentence-greater-the-strain/",children:["Nirmaldasan",x.jsx(Kn,{})]}),x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Setninger med over 20 ord"}),x.jsx("ul",{children:s.map(c=>x.jsxs("li",{children:['"',c[1],'" ',x.jsxs("b",{children:["(",c[1].split(/\s+/).length," ord)"]})]},c[0]))}),t.length>i&&x.jsx("div",{children:x.jsx(Lu,{page:r,onPageChange:n,count:u,size:"small",siblingCount:0,boundaryCount:1})})]})]})})}const sx=e=>e.replaceAll("Kopier lenke","").replaceAll("/"," / ").replaceAll(/(.*)\.+[A-Za-z]{2,6}/g,"").replaceAll(/http(.*)/g,"").split(`
+`).map(t=>t.length>0&&![".",":","!","?"," "].includes(t.slice(-1))?t+".":t).join(`
+`).toLowerCase().split(/\s+/).map(t=>t.replace(/[.,:?()!"«»]+/g,"")).filter(t=>!t.match(/\d/)).filter(t=>!t.match(/[-_>]/)).reduce((t,r)=>t.includes(r)?[...t]:[...t,r],[]).filter(t=>t.length>=7).sort((t,r)=>r.length-t.length);function lW({value:e}){const t=sx(e);if(t.length===0)return null;const[r,n]=v.useState(1),i=10,o=r*i,a=o-i,s=Object.entries(t).slice(a,o),u=Math.ceil(t.length/i);return x.jsxs(ee.Item,{children:[x.jsxs(ee.Header,{children:[t.length===1?x.jsx(x.Fragment,{children:"1 unikt langt"}):x.jsxs(x.Fragment,{children:[t.length," unike lange"]})," ord"]}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Velg korte og enkle ord"}),"Ifølge lesbarhetsindeksen Liks anses ord med over seks bokstaver som lange -"," ",x.jsxs(ct,{target:"_blank",href:"https://no.wikipedia.org/wiki/Lesbarhetsindeks",children:["Wikipedia",x.jsx(Kn,{})]}),x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Ord med over seks bokstaver"}),x.jsx("div",{children:x.jsxs(St,{zebraStripes:!0,size:"small",children:[x.jsx(St.Header,{children:x.jsxs(St.Row,{children:[x.jsx(St.HeaderCell,{scope:"col",children:"Ord"}),x.jsx(St.HeaderCell,{scope:"col",children:"Bokstaver"})]})}),x.jsx(St.Body,{children:s.map(c=>x.jsxs(St.Row,{children:[x.jsx(St.HeaderCell,{scope:"row",children:c[1]}),x.jsx(St.DataCell,{children:c[1].length})]},c[0]))})]})}),t.length>i&&x.jsx("div",{children:x.jsx(Lu,{page:r,onPageChange:n,count:u,size:"small",siblingCount:0,boundaryCount:1})})]})]})}const lx=e=>{var t;return((t=e.replaceAll("Kontakt","").replaceAll(/\d+(?: \d+)/g,"").toLowerCase().match(/\b(\w{2,5})\s+\1\b/g))==null?void 0:t.map(r=>r))??[]};function uW({value:e}){const t=lx(e);return t.length===0?null:x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:t.length===1?x.jsx(x.Fragment,{children:"1 gjentakelse av like ord"}):x.jsxs(x.Fragment,{children:[t.length," gjentakelser av like ord"]})}),x.jsxs(ee.Content,{children:["Like ord som er gjentatt etter hverandre:",x.jsx("ul",{children:t.map((r,n)=>x.jsxs("li",{children:['"',r,'"']},n))})]})]})}const cW=[{id:"1",ord:"abnorm",bruk:"1",bokmaal:"«Abnorm» ble tidligere brukt om mennesker man mente var avvikende fra flertallet. Det ble skilt mellom «åndelig abnorme» og «andre abnorme». Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"2",ord:"blindehund",bruk:"1",bokmaal:"Bruk heller «førerhund». Hunden er utdannet til å føre en person med synshemminger, derfor er det mer korrekt å bruke betegnelsen «førerhund». Blindehund er et ord som ikke skal brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"3",ord:"blindeskrift",bruk:"1",bokmaal:"Bruk heller «punktskrift». Punktskrift viser direkte til hvordan skrifttypen er bygget opp, nemlig med opphøyde punkter. «Blindeskrift» skal ikke brukes som begrep. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"4",ord:"blindestokk",bruk:"1",bokmaal:"Bruk heller «Hvit stokk» eller «mobilitetsstokk». «Blindestokk» skal ikke brukes som begrep. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"6",ord:"brukere",bruk:"2",bokmaal:"Skal bare brukes når det henvises til hva man er bruker av, ikke som synonym/alternativ til ordet funksjonshemmet. Ordet «bruker» kan oppleves som stigmatiserende. Bruk gjerne «person», «menneske», eller navnet på vedkommende. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"7",ord:"bundet til rullestolen",bruk:"1",bokmaal:"Uttrykket «bundet/lenket til rullestolen» formidler en holdning om bruk av hjelpemidler som noe tragisk. Bruk heller «sitter i rullestol», «bruker rullestol», «får hjelp av rullestolen» eller lignende. Uttrykket «bundet/lenket til rullestolen» skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"8",ord:"lenket til rullestolen",bruk:"1",bokmaal:"Uttrykket «bundet/lenket til rullestolen» formidler en holdning om bruk av hjelpemidler som noe tragisk. Bruk heller «sitter i rullestol», «bruker rullestol», «får hjelp av rullestolen» eller lignende. Uttrykket «bundet/lenket til rullestolen» skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"9",ord:"de funksjonshemmede",bruk:"2",bokmaal:"Funksjonshemmede er en stor og variert gruppe. Det er best å spesifisere hvem man snakker om. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"10",ord:"dverg",bruk:"1",bokmaal:"Tidligere ble betegnelsen «dverg» brukt om kortvokste, spesielt om mennesker med diagnosen akondroplasi. I dag anses betegnelsen som svært nedverdigende og skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"11",ord:"døv",bruk:"2",bokmaal:"Å være døv vil si at man ikke hører lyd og tale, eller at man hører veldig lite. De fleste døve bruker tegnspråk og opplever at de tilhører en språklig/kulturell gruppe med liten vekt på selve hørselshemmingen. For mange er døvheten mer en identitetsmarkør. «Døv» blir av enkelte brukt som adjektiv eller adverb («døvt») om noe som er kjedelig, tregt eller uattraktivt, og i denne betydningen skal ordet ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"12",ord:"døvespråk",bruk:"1",bokmaal:"Språket heter tegnspråk. Begrepet «døvespråk» skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"13",ord:"døvetolk",bruk:"1",bokmaal:"Det heter tegnspråktolk. Begrepet «døvetolk» skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"14",ord:"døvstum",bruk:"1",bokmaal:"Nesten ingen døve er stumme (uten taleevne). Begrepet oppleves av mange døve som negativt fordi det gir et inntrykk av at døve ikke kan produsere meningsbærende ytringer, noe som er fullt mulig på tegnspråk. Begrepet døvstum skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"15",ord:"evneveik",bruk:"1",bokmaal:"Betegnelsen «evneveik» ble brukt fram til 1960-tallet om mennesker med kognitiv utviklingshemming. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"16",ord:"funksjonsfrisk",bruk:"2",bokmaal:"Begrepet blir ofte brukt som motpol til funksjonshemmet, men kan bli oppfattet som støtende fordi det motsatte av det å være frisk, er å være syk. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"17",ord:"gladjenta",bruk:"1",bokmaal:" Kreative adjektiv blir av og til brukt om utviklingshemmede. Kan oppleves som umyndiggjørende maktspråk. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"18",ord:"gladgutten",bruk:"1",bokmaal:"Kreative adjektiv blir av og til brukt om utviklingshemmede. Kan oppleves som umyndiggjørende maktspråk. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"19",ord:"handikappet",bruk:"2",bokmaal:"Handikappet ble tidligere brukt ved omtale av mennesker med fysisk funksjonshemming. Dette er et begrep som ikke bør benyttes om personer, siden det kan bli oppfattet som nedsettende. Ordet blir derimot brukt i ulike sammensetninger som HC-parkering, handikaptoalett, Handikapforbundet osv. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"20",ord:"hemma",bruk:"2",bokmaal:"Hemma er en nedsettende betegnelse på det å ha en utviklingshemming eller funksjonsnedsettelse, og ordet bør ikke brukes om personer og grupper. Derimot er det greit å bruke begrepet når det er snakk om å være hemma/hemmet i betydningene ‘hindret’, ‘lagt bånd på’ i forhold til noe. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"21",ord:"hjelpesløs",bruk:"2",bokmaal:"«Hjelpeløs» er en nedsettende betegnelse på det å ha en utviklingshemming eller funksjonsnedsettelse, og ordet bør ikke brukes om personer og grupper. Derimot er det greit å bruke begrepet ellers. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"22",ord:"hjerneskade",bruk:"2",bokmaal:"En felles betegnelse for skader på hjernen. Man kan være født med en hjerneskade eller få den senere i livet. Ordet «hjerneskadet» skal ikke brukes som nedsettende adjektiv. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"23",ord:"invalid",bruk:"1",bokmaal:"Invalid er et utdatert ord som signaliserer at personer med nedsatt funksjonsevne har mindre verdi enn andre. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"24",ord:"krøpling",bruk:"1",bokmaal:"Krøpling er et nedsettende og støtende begrep som blir brukt om personer med nedsatt funksjonsevne. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"25",ord:"mongo",bruk:"1",bokmaal:"Mongo er et slanguttrykk for «mongoloid», som tidligere var en betegnelse på personer med Downs syndrom. Betegnelsen oppleves i dag svært nedsettende. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"26",ord:"mongoloid",bruk:"1",bokmaal:"Mongo er et slanguttrykk for «mongoloid», som tidligere var en betegnelse på personer med Downs syndrom. Betegnelsen oppleves i dag svært nedsettende. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"27",ord:"psykisk utviklingshemming",bruk:"1",bokmaal:"I helseforvaltningen blir begrepet «psykisk utviklingshemming» fremdeles brukt som en spesifikk diagnoseterm, men det kan være misvisende, da det ikke er snakk om psykisk helse. Begrepet kan oppleves som krenkende og upresist. Skal ikke brukes. Foreslått alternativ: utviklingshemming / utviklingshemmet. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"28",ord:"psykisk utviklingshemmet",bruk:"1",bokmaal:"I helseforvaltningen blir begrepet «psykisk utviklingshemming» fremdeles brukt som en spesifikk diagnoseterm, men det kan være misvisende, da det ikke er snakk om psykisk helse. Begrepet kan oppleves som krenkende og upresist. Skal ikke brukes. Foreslått alternativ: utviklingshemming / utviklingshemmet. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"29",ord:"psykopat",bruk:"1",bokmaal:"En psykopat er en person som lider av varig personlighets- og karakterforstyrrelse, oftest kjennetegnet av mangelfull kontroll av driftsimpulser, følelseskulde og manglende evne til lojalitet og identifikasjon med andre. I allmennspråket er ordet brukt dels som skjellsord og dels i en videre betydning enn den medisinske. Det skal ikke brukes slik i NRK. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"30",ord:"sinnssyk",bruk:"1",bokmaal:"Begrepet ble tidligere brukt om personer med psykiske diagnoser. I dag blir ordet ofte brukt forsterkende. Skal ikke brukes ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"31",ord:"spesielle behov",bruk:"2",bokmaal:"Hvis en person som lever med funksjonsnedsettelse trenger hjelp eller tilrettelegging, sier man ofte at personen har «spesielle behov». Men behovene er som regel ikke så spesielle, som å spise, kle på seg, lese e-post og lignende. Det som varierer, er hvilke verktøy, virkemidler og løsninger man benytter for å fylle ulike behov. Det at man stadig understreker at noen har spesielle behov, kan bidra til at personen føler seg utenfor og er en belastning. Beskriv heller det aktuelle behovet. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"32",ord:"tilrettelegging",bruk:"2",bokmaal:"Tilrettelegging, det å legge til rette, er å planlegge eller tilpasse produkter og tjenester til en gruppe eller til enkeltpersoner. Hensikten med tilrettelegging er å gjøre det mulig for en person eller en gruppe å klare seg selv uten bistand. Tilrettelegging kan være å kjøpe et spesialtastatur til en ansatt eller å tilby bestilling av flybilletter over telefon for dem som ikke klarer å gjøre det over nett. Det er bedre å bruke begrepet «tilgjengelighet» eller «universell utforming» der det er mulig. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"33",ord:"tunghørt",bruk:"2",bokmaal:"Dette er en folkelig betegnelse om dem som hører dårlig eller som begynner å høre dårlig. Noen oppfatter begrepet nedsettende, og det kan gi assosiasjoner til det å ha kognitive utfordringer. Bruk gjerne begreper som «nedsatt hørsel» eller liknende. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"34",ord:"ufør",bruk:"2",bokmaal:"«Ufør» ble tidligere brukt for å beskrive personer med nedsatt funksjonsevne. Begrepet brukes i dag i forbindelse med arbeidsevne, for eksempel «medisinsk uførhet», «uførepensjon» og «uføretrygd». Ufør skal ikke brukes som en generell merkelapp på personer med funksjonsnedsettelse. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"35",ord:"vanfør",bruk:"1",bokmaal:"Nedsettende gammelt uttrykk om personer med bevegelseshemming. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"36",ord:"vansiret",bruk:"1",bokmaal:"Tidligere brukt om kroppsdel som var skadet, ødelagt eller ansett som stygg. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"37",ord:"yrkeshemmet",bruk:"1",bokmaal:"Tidligere brukt som et alternativ/synonym til ordet funksjonshemmet. Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"38",ord:"åndssvak",bruk:"1",bokmaal:"Frem til 1960-tallet brukt om mennesker med utviklingshemming . Skal ikke brukes. ",kilde:"NRKs ordliste for funksjonsmangfold",lenke:"https://info.nrk.no/sprak/funksjonsmangfold/"},{id:"39",ord:"mulatt",bruk:"1",bokmaal:"Ordet oppfattes ofte nedsettende og ekskluderende og bør unngås.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"40",ord:"muslimsk utseende",bruk:"1",bokmaal:"Muslimer i Norge kommer fra mange forskjellige land og ser svært forskjellige ut. Vær mer presis.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"41",ord:"neger",bruk:"1",bokmaal:"Ordet oppfattes ofte nedsettende og ekskluderende og bør unngås.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"42",ord:"omreisende",bruk:"1",bokmaal:"Bør unngås i norsk sammenheng, men i enkelte situasjoner der vi omtaler f.eks. britiske romer (sigøynere) som ønsker å bli kalt reisende, kan begrepet likevel brukes.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"43",ord:"omstreifer",bruk:"1",bokmaal:"Bør unngås i norsk sammenheng, men i enkelte situasjoner der vi omtaler f.eks. britiske romer (sigøynere) som ønsker å bli kalt reisende, kan begrepet likevel brukes.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"44",ord:"politisk asyl",bruk:"1",bokmaal:"Bruk bare «asyl». Juridisk sett er det ingenting som heter politisk asyl. Behovet for vern er det sentrale, ikke grunnlaget for at man risikerer forfølgelse.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"45",ord:"romfolk",bruk:"1",bokmaal:"«Romfolk» er en kunstig konstruksjon, som kan bli oppfattet negativt. Begrepet har oppstått fordi mange har vært usikre på hvordan ordet «rom» skal bøyes. Det er ikke snakk om en helhetlig gruppe, men ulike folkegrupper. Bruk heller flertallsformen av ordet «rom» (en rom - romen - romer - romene).",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"46",ord:"utenlandsk bakgrunn",bruk:"1",bokmaal:"Helt upresist. Vær så konkret som mulig.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"47",ord:"utenlandsk opprinnelse",bruk:"1",bokmaal:"Helt upresist. Vær så konkret som mulig.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"48",ord:"utenlandsk utseende",bruk:"1",bokmaal:"Helt upresist. Vær så konkret som mulig.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"49",ord:"våre nye landsmenn",bruk:"1",bokmaal:"Brukes stort sett ironisk og anbefales ikke.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"50",ord:"andregenerasjons innvandrer",bruk:"1",bokmaal:"Den primære identiteten til noen som er født og oppvokst i Norge er gjerne norsk, og det blir derfor feil å kalle vedkommende en andregenerasjons innvandrer.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"51",ord:"tredjegenerasjons innvandrer",bruk:"1",bokmaal:"Den primære identiteten til noen som er født og oppvokst i Norge er gjerne norsk, og det blir derfor feil å kalle vedkommende en andregenerasjons innvandrer.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"52",ord:"eksotisk",bruk:"1",bokmaal:"Mange forbinder noe positivt med begrepet, men det er subjektivt og upresist. Vær mer konkret.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"53",ord:"etnisk opprinnelse",bruk:"1",bokmaal:"Er et meningsløst begrep. Vi har alle etnisk opprinnelse.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"54",ord:"fargerik",bruk:"1",bokmaal:"Er meningsløse begreper når de brukes om mennesker eller en forsamling av individer.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"55",ord:"fremmedkulturell",bruk:"1",bokmaal:"Disse begrepene er i utgangspunktet negative fordi de brukes til å skape distanse eller å ekskludere. Bruken av «fremmedspråklig» om barn med et annet morsmål enn norsk, skal erstattes av «flerspråklig». I stedet for «asiatiske fremmedarbeidere», bør man bruke «asiatiske arbeidere». Men: «Fremmedspråk» brukes fortsatt om valg av undervisning i språk som tysk, spansk, fransk.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"56",ord:"fremmedspråklig",bruk:"1",bokmaal:"Disse begrepene er i utgangspunktet negative fordi de brukes til å skape distanse eller å ekskludere. Bruken av «fremmedspråklig» om barn med et annet morsmål enn norsk, skal erstattes av «flerspråklig». I stedet for «asiatiske fremmedarbeidere», bør man bruke «asiatiske arbeidere». Men: «Fremmedspråk» brukes fortsatt om valg av undervisning i språk som tysk, spansk, fransk.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"57",ord:"fremmedarbeider",bruk:"1",bokmaal:"Disse begrepene er i utgangspunktet negative fordi de brukes til å skape distanse eller å ekskludere. Bruken av «fremmedspråklig» om barn med et annet morsmål enn norsk, skal erstattes av «flerspråklig». I stedet for «asiatiske fremmedarbeidere», bør man bruke «asiatiske arbeidere». Men: «Fremmedspråk» brukes fortsatt om valg av undervisning i språk som tysk, spansk, fransk.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"58",ord:"innvandringsmiljø",bruk:"1",bokmaal:"Lite presist, bruk andre begreper. Husk at også svenske kvinner bosatt i Norge er «innvandrerkvinner».",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"59",ord:"innvandringsbefolkning",bruk:"1",bokmaal:"Lite presist, bruk andre begreper. Husk at også svenske kvinner bosatt i Norge er «innvandrerkvinner».",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"60",ord:"innvandringskvinner",bruk:"1",bokmaal:"Lite presist, bruk andre begreper. Husk at også svenske kvinner bosatt i Norge er «innvandrerkvinner».",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"},{id:"61",ord:"kvoteflykning",bruk:"1",bokmaal:"Er en overføringsflyktning (se egen definisjon). Begrepet «kvoteflyktning» er utdatert.",kilde:"NRKs flerkulturelle ordliste",lenke:"https://fido.nrk.no/22d22e5cb682284d0e8f7cb5b5f5addd3aad59fc3c4765bb807b7de9c13a9c2d/svartelista%20a5%20bokm%C3%A5l.pdf"}],dW=[{kanselliord:"anbringe",alternativ_1:"sette, legge, plassere, feste",alternativ_2:"@"},{kanselliord:"anbringelse",alternativ_1:"plassering",alternativ_2:"@"},{kanselliord:"anføre",alternativ_1:"oppgi, føre opp",alternativ_2:"vise til, bemerke, nevne, påpeke; hevde, argumentere med"},{kanselliord:"anførsel",alternativ_1:"merknad, opplysning, påstand; innvending, ankepunkt",alternativ_2:"@"},{kanselliord:"angjeldende",alternativ_1:"vedkommende, den det gjelder, de(n) aktuelle, denne, dette",alternativ_2:"@"},{kanselliord:"angående",alternativ_1:"om",alternativ_2:"@"},{kanselliord:"anses som",alternativ_1:"regnes som",alternativ_2:"@"},{kanselliord:"anvendelse",alternativ_1:"bruk",alternativ_2:"@"},{kanselliord:"avgi",alternativ_1:"Ofte: gi (fra seg)",alternativ_2:"@"},{kanselliord:"avhende",alternativ_1:"avstå fra, skille seg av med ved salg; selge; overføre, overdra",alternativ_2:"@"},{kanselliord:"avhending",alternativ_1:"salg (det at noe skifter eier, oftest ved kjøp og salg)",alternativ_2:"@"},{kanselliord:"befatning",alternativ_1:"Ofte: tilknytning, medansvar",alternativ_2:"@"},{kanselliord:"befordre",alternativ_1:"frakte, transportere",alternativ_2:"@"},{kanselliord:"befordring",alternativ_1:"frakt, transport",alternativ_2:"@"},{kanselliord:"beføye",alternativ_1:"råde over, ha råderett over, ha fullmakt til",alternativ_2:"@"},{kanselliord:"beføyelse",alternativ_1:"grunn, berettigelse",alternativ_2:"(del av) rettighet, rett til å rå over (greie med, gjennomføre. Ofte: fullmakt, mandat, anledning. I noen sammenhenger: kompensasjon"},{kanselliord:"begjære",alternativ_1:"anmode om, be om; kreve, gjøre krav på",alternativ_2:"@"},{kanselliord:"begjæring",alternativ_1:"anmodning; krav",alternativ_2:"@"},{kanselliord:"begunstige",alternativ_1:"tilgodese, gi fordeler",alternativ_2:"@"},{kanselliord:"begunstigelse",alternativ_1:"fordel, særrett, velvilje",alternativ_2:"@"},{kanselliord:"bekjentgjøre",alternativ_1:"kunngjøre, gjøre kjent",alternativ_2:"@"},{kanselliord:"beliggende",alternativ_1:"som ligger, som holder til",alternativ_2:"@"},{kanselliord:"besiktige",alternativ_1:"ta i øyesyn for å kontrollere, undersøke",alternativ_2:"@"},{kanselliord:"besiktigelse",alternativ_1:"ettersyn, undersøkelse, kontroll",alternativ_2:"@"},{kanselliord:"besitte",alternativ_1:"ha (til rådighet), sitte inne med. I visse tilfeller: ha på seg eller hos seg.",alternativ_2:"@"},{kanselliord:"komme i besittelse av",alternativ_1:"blir eier av",alternativ_2:"@"},{kanselliord:"være i besittelse av",alternativ_1:"ha, eie",alternativ_2:"@"},{kanselliord:"ta i besittelse",alternativ_1:"ta, overta",alternativ_2:"@"},{kanselliord:"for besittelse av",alternativ_1:"Eksempel: Han ble arrestert fordi han hadde narkotika på seg / hos seg.",alternativ_2:"@"},{kanselliord:"beskaffenhet",alternativ_1:"slag, art, type, karakter",alternativ_2:"@"},{kanselliord:"beskikke",alternativ_1:"utnevne, oppnevne",alternativ_2:"@"},{kanselliord:"beskikkelse",alternativ_1:"utnevning, oppnevning",alternativ_2:"@"},{kanselliord:"besørge",alternativ_1:"sørge for å utføre noe, ordne med, ta hånd om, påta seg",alternativ_2:"@"},{kanselliord:"bevirke",alternativ_1:"føre til, forårsake; få i stand, få til",alternativ_2:"@"},{kanselliord:"bortta",alternativ_1:"fjerne (urettmessig), ta med seg (uten lov)",alternativ_2:"@"},{kanselliord:"erlegge",alternativ_1:"betale",alternativ_2:"@"},{kanselliord:"erleggelse",alternativ_1:"betaling",alternativ_2:"@"},{kanselliord:"erverv",alternativ_1:"inntektsgivende arbeid; yrke",alternativ_2:"anskaffelse, det å skaffe seg. Ofte: kjøpe. "},{kanselliord:"erverve",alternativ_1:"skaffe (seg), anskaffe, tilegne (seg), få. Ofte: kjøpe. I noen sammenhenger: tjene.",alternativ_2:"@"},{kanselliord:"etterleve",alternativ_1:"følge, rette seg etter, lyde",alternativ_2:"@"},{kanselliord:"finne å ",alternativ_1:"Ofte: kunne, ville, finne grunnlag for",alternativ_2:"@"},{kanselliord:"forefinnes",alternativ_1:"finnes, være",alternativ_2:"@"},{kanselliord:"foregi",alternativ_1:"opplyse noe usannferdig (som grunn, unnskyldning), påstå, hevde (uten grunn), gi seg ut for (å være), bruke som påskudd, påstå",alternativ_2:"@"},{kanselliord:"forehavende",alternativ_1:"gjøremål, handling, formål, oppgave, plan",alternativ_2:"@"},{kanselliord:"foreholde noen noe",alternativ_1:"gjøre noen kjent med noe, påpeke (noe betenkelig, uheldig), fortelle noen noe, gjøre oppmerksom på (gjerne med et snev av irettesettelse eller advarsel)",alternativ_2:"@"},{kanselliord:"foreleggelse",alternativ_1:"Ofte: varsel, orientering",alternativ_2:"@"},{kanselliord:"foreligge",alternativ_1:"Ofte: finnes, være, eksistere",alternativ_2:"@"},{kanselliord:"foreliggende",alternativ_1:"Ofte: den aktuelle, dette, denne, disse, som finnes",alternativ_2:"@"},{kanselliord:"forestå",alternativ_1:"stå for; lede; sørge for",alternativ_2:"@"},{kanselliord:"forevise",alternativ_1:"vise (frem)",alternativ_2:"@"},{kanselliord:"forføye over",alternativ_1:"råde over, disponere over; forvalte, bruke",alternativ_2:"@"},{kanselliord:"forføyning",alternativ_1:"råderett, rådighet",alternativ_2:"bestemmelse; tiltak; vedtak"},{kanselliord:"formentlig",alternativ_1:"antatt, påstått",alternativ_2:"antakelig, trolig"},{kanselliord:"forsendelse",alternativ_1:"sending",alternativ_2:"@"},{kanselliord:"forsorg",alternativ_1:"hjelp; i visse sammenhenger: det å sørge for; bekostning. Merk: Det er bedre å skrive om.",alternativ_2:"@"},{kanselliord:"for så vidt gjelder",alternativ_1:"når det gjelder, for",alternativ_2:"@"},{kanselliord:"for så vidt som",alternativ_1:"i og med (at), fordi, siden",alternativ_2:"@"},{kanselliord:"fravike",alternativ_1:"I visse sammenhenger: avstå fra, gi avkall på, forlate, flytte fra",alternativ_2:"@"},{kanselliord:"fravikelse",alternativ_1:"I visse sammenhenger: avståelse, det å forlate. Ofte: utkastelse, flytting.",alternativ_2:"@"},{kanselliord:"fremgå",alternativ_1:"Ofte: være, stå (om noe i tekst), omtales",alternativ_2:"@"},{kanselliord:"fremholde",alternativ_1:"påpeke, fremheve, gjøre oppmerksom på",alternativ_2:"@"},{kanselliord:"fremkomme",alternativ_1:"komme frem, oppstå; i visse sammenhenger: være (med). Merk: Noen ganger kan dette verbet sløyfes, jf. to av eksemplene nedenfor.",alternativ_2:"@"},{kanselliord:"fullbyrde",alternativ_1:"fullføre, sette i verk",alternativ_2:"@"},{kanselliord:"fullbyrdelse",alternativ_1:"fullføring, iverksetting",alternativ_2:"@"},{kanselliord:"ha som følge",alternativ_1:"føre til, føre med seg",alternativ_2:"@"},{kanselliord:"ha til følge",alternativ_1:"føre til, føre med seg",alternativ_2:"@"},{kanselliord:"som en følge av at",alternativ_1:"i og med at, fordi, siden, på grunn av",alternativ_2:"@"},{kanselliord:"som følge av at",alternativ_1:"i og med at, fordi, siden, på grunn av",alternativ_2:"@"},{kanselliord:"gitt",alternativ_1:"på grunn av, i og med, fordi",alternativ_2:"@"},{kanselliord:"gjøre gjeldende",alternativ_1:"vise til, bruke som argument, hevde, påstå",alternativ_2:"@"},{kanselliord:"gjorde gjeldende at",alternativ_1:"viste til / brukte som argument at ...",alternativ_2:"@"},{kanselliord:"gjenstand",alternativ_1:"Ofte: ting, sak",alternativ_2:"@"},{kanselliord:"godtgjøre",alternativ_1:"betale, dekke, erstatte, refundere, tilbakebetale",alternativ_2:"dokumentere, bevise"},{kanselliord:"henhøre",alternativ_1:"høre inn under, høre (med) til; ha forbindelse med",alternativ_2:"@"},{kanselliord:"henhørende",alternativ_1:"som hører til",alternativ_2:"@"},{kanselliord:"henregne",alternativ_1:"regne for å høre med til",alternativ_2:"@"},{kanselliord:"hense",alternativ_1:"i betraktning av, med tanke på, på bakgrunn av",alternativ_2:"@"},{kanselliord:"hensett til",alternativ_1:"i betraktning av, med tanke på, på bakgrunn av",alternativ_2:"@"},{kanselliord:"se hen til",alternativ_1:"i betraktning av, med tanke på, på bakgrunn av",alternativ_2:"@"},{kanselliord:"henseende",alternativ_1:"måte, mening, sammenheng",alternativ_2:"@"},{kanselliord:"hensette",alternativ_1:"sette (fra seg), plassere; parkere (om kjøretøy)",alternativ_2:"@"},{kanselliord:"henstand",alternativ_1:"utsettelse",alternativ_2:"@"},{kanselliord:"henstille til",alternativ_1:"be om, anmode om, oppfordre til",alternativ_2:"@"},{kanselliord:"henstilling",alternativ_1:"anmodning, oppfordring, påminnelse",alternativ_2:"@"},{kanselliord:"henstå",alternativ_1:"vente, bli foreløpig utsatt",alternativ_2:"@"},{kanselliord:"stå hen",alternativ_1:"vente, bli foreløpig utsatt",alternativ_2:"@"},{kanselliord:"hensynta",alternativ_1:"ta hensyn til; ta i betraktning",alternativ_2:"@"},{kanselliord:"hensyntagen",alternativ_1:"med tanke på",alternativ_2:"@"},{kanselliord:"herunder",alternativ_1:"under dette, i den forbindelse",alternativ_2:"blant annet, medregnet, inklusive"},{kanselliord:"herværende",alternativ_1:"lokal, her på stedet, som er her, denne/dette",alternativ_2:"@"},{kanselliord:"hitsette",alternativ_1:"gjengi, oppgi, sitere",alternativ_2:"@"},{kanselliord:"hjemmehørende",alternativ_1:"som hører hjemme i/på, som ligger i/på, som bor i/på, som kommer fra ",alternativ_2:"@"},{kanselliord:"hva gjelder",alternativ_1:"når det gjelder",alternativ_2:"@"},{kanselliord:"hvoretter",alternativ_1:"og deretter",alternativ_2:"ifølge, etter"},{kanselliord:"imøtese",alternativ_1:"se frem til at noe (ventet) vil skje",alternativ_2:"@"},{kanselliord:"inneværende",alternativ_1:"dette, denne",alternativ_2:"@"},{kanselliord:"likeledes",alternativ_1:"også, likeså",alternativ_2:"@"},{kanselliord:"likevel slik at",alternativ_1:"Merk: Dette kan ofte erstattes med men. En mulighet er å dele setningen i to og eventuelt innlede neste setning med men eller NN skal likevel (ikke) ...",alternativ_2:"@"},{kanselliord:"likevel ikke slik at",alternativ_1:"Merk: Dette kan ofte erstattes med men. En mulighet er å dele setningen i to og eventuelt innlede neste setning med men eller NN skal likevel (ikke) ...",alternativ_2:"@"},{kanselliord:"meddele",alternativ_1:"gi",alternativ_2:"@"},{kanselliord:"medføre",alternativ_1:"innebære; være; føre med seg, føre til",alternativ_2:"@"},{kanselliord:"i medhold av",alternativ_1:"i samsvar med, med hjemmel i, etter",alternativ_2:"@"},{kanselliord:"med videre",alternativ_1:"og så videre",alternativ_2:"@"},{kanselliord:"medvirke",alternativ_1:"delta, hjelpe til med, bidra til, støtte, gjøre sitt",alternativ_2:"@"},{kanselliord:"nærværende",alternativ_1:"denne, dette",alternativ_2:"@"},{kanselliord:"omfattes av",alternativ_1:"faller inn under. Merk: I stedet for «X omfattes av Y» kan du skrive «Y gjelder for X».",alternativ_2:"@"},{kanselliord:"omfattet av",alternativ_1:"faller inn under. Merk: I stedet for «X omfattes av Y» kan du skrive «Y gjelder for X».",alternativ_2:"@"},{kanselliord:"oppebære",alternativ_1:"få, ha, motta, innkassere",alternativ_2:"@"},{kanselliord:"opphold",alternativ_1:"avbrudd, pause, forsinkelse i visse sammenhenger: stans",alternativ_2:"@"},{kanselliord:"opphør",alternativ_1:"stans, slutt, avbrudd; i visse sammenhenger: nedleggelse",alternativ_2:"@"},{kanselliord:"opphøre",alternativ_1:"ta slutt, slutte, bli nedlagt",alternativ_2:"@"},{kanselliord:"oppsette",alternativ_1:"I visse sammenhenger: utsette; vente med (å gjøre noe)",alternativ_2:"@"},{kanselliord:"oppstille",alternativ_1:"I visse sammenhenger: sette, stille, etablere",alternativ_2:"@"},{kanselliord:"ovenfornevnte",alternativ_1:"nevnte, som nevnes / er nevnt ovenfor",alternativ_2:"@"},{kanselliord:"ovennevnte",alternativ_1:"nevnte, som nevnes / er nevnt ovenfor",alternativ_2:"@"},{kanselliord:"påberope seg",alternativ_1:"vise til, unnskylde seg med, argumentere med",alternativ_2:"@"},{kanselliord:"påkrevd",alternativ_1:"nødvendig, om å gjøre",alternativ_2:"@"},{kanselliord:"påkrevet",alternativ_1:"nødvendig, om å gjøre",alternativ_2:"@"},{kanselliord:"påregne",alternativ_1:"regne med, vente seg",alternativ_2:"@"},{kanselliord:"riket",alternativ_1:"Oftest: landet, Norge",alternativ_2:"@"},{kanselliord:"samtlige",alternativ_1:"alle",alternativ_2:"@"},{kanselliord:"så fremt",alternativ_1:"hvis, om, dersom",alternativ_2:"@"},{kanselliord:"således",alternativ_1:"slik; dermed",alternativ_2:"@"},{kanselliord:"tarv",alternativ_1:"behov, trang, interesse",alternativ_2:"@"},{kanselliord:"tilflyte",alternativ_1:"komme til, bli til del",alternativ_2:"@"},{kanselliord:"tilkjenne",alternativ_1:"Oftest: tildele (ved dom)",alternativ_2:"@"},{kanselliord:"tilkomme",alternativ_1:"I visse sammenhenger: tilfalle (med rett), få, ha rett til, ha krav på; være (ens) sak/oppgave, være opp til",alternativ_2:"@"},{kanselliord:"tillegge",alternativ_1:"gi, tildele, pålegge (oftest om ansvar, oppgaver og plikter)",alternativ_2:"@"},{kanselliord:"tilligge",alternativ_1:"være ens plikt/oppgave; høre inn under",alternativ_2:"@"},{kanselliord:"tillike",alternativ_1:"også, i tillegg, dessuten",alternativ_2:"@"},{kanselliord:"tilstille",alternativ_1:"(over)sende, sende til",alternativ_2:"@"},{kanselliord:"tilstå",alternativ_1:"I visse sammenhenger: gi, bevilge",alternativ_2:"@"},{kanselliord:"ubesørget",alternativ_1:"ikke utført, ikke ordnet",alternativ_2:"@"},{kanselliord:"uleilighet",alternativ_1:"problem, ulempe, besvær",alternativ_2:"@"},{kanselliord:"undergi",alternativ_1:"innordne under; i visse sammenhenger: gjøre til gjenstand for, la gjennomgå. Merk: Ofte er dette verbet uten eget innhold: undergi behandling = behandle. Det er bedre å skrive om og bruke konkrete verb.",alternativ_2:"@"},{kanselliord:"undergå",alternativ_1:"gjennomgå, oppleve ",alternativ_2:"@"},{kanselliord:"underrette",alternativ_1:"gi beskjed/informasjon om, informere",alternativ_2:"@"},{kanselliord:"underretning",alternativ_1:"beskjed, informasjon, melding",alternativ_2:"@"},{kanselliord:"undertegnede",alternativ_1:"jeg",alternativ_2:"@"},{kanselliord:"unnlate",alternativ_1:"la være. Merk: Ofte er det bedre å erstatte unnlate å / unnlatt å + infinitiv med ikke + fortidsformen av det aktuelle verbet, jf. eksempelet nedenfor.",alternativ_2:"@"},{kanselliord:"unnlatelse",alternativ_1:"Merk: Ofte er det bedre å skrive om. Eksempel: Hvis du ikke...",alternativ_2:"@"},{kanselliord:"utgjøre",alternativ_1:"Ofte: være",alternativ_2:"@"},{kanselliord:"utøve",alternativ_1:"drive med; praktisere. Ofte: bruke",alternativ_2:"@"},{kanselliord:"utøvelse",alternativ_1:"gjennomføring, iverksetting. Ofte: bruk.",alternativ_2:"@"},{kanselliord:"vedrøre",alternativ_1:"angå, gjelde, ha sammenheng med",alternativ_2:"@"},{kanselliord:"vedrørende",alternativ_1:"om, i forbindelse med, som gjelder, som henger sammen med",alternativ_2:"@"},{kanselliord:"vesentlig",alternativ_1:"hovedsakelig, stort sett, for det meste, fortrinnvis",alternativ_2:"@"},{kanselliord:"vitterlig",alternativ_1:"kjent, åpenlys(t)",alternativ_2:"@"},{kanselliord:"yte",alternativ_1:"gi, bidra med. Ofte: betale",alternativ_2:"@"},{kanselliord:"ytterligere",alternativ_1:"enda (en/mer/flere), nærmere, flere",alternativ_2:"@"}],fW=[{importord:"@",avloeserord:"krøllalfa"},{importord:"abort",avloeserord:"(IKT) programbrot/programbrudd, programavbrot/programavbrudd"},{importord:"access",avloeserord:"tilgang"},{importord:"access code",avloeserord:"tilgangskode"},{importord:"access point",avloeserord:"tilgangspunkt"},{importord:"account manager",avloeserord:"kundeleiar/kundeleder, kundeansvarleg/kundeansvarlig, kundekontakt, jf. key account manager"},{importord:"accountability",avloeserord:"ansvarsutkreving, ansvarleggjering/ansvarliggjøring"},{importord:"actionfilm",avloeserord:"spenningsfilm, valdsfilm/voldsfilm"},{importord:"adde",avloeserord:"(IKT) leggje til, leggje inn / legge til, legge inn"},{importord:"advocacy campaign",avloeserord:"påverknadskampanje/påvirkningskampanje"},{importord:"aftershave",avloeserord:"etterbarberingsvatn/etterbarberingsvann"},{importord:"agenda",avloeserord:"sakliste, dagsorden; (tids)planleggjar/(tids)planlegger, sjuande sans / sjuende sans"},{importord:"aircondition(ing)",avloeserord:"klimaanlegg, luftkondisjonering"},{importord:"allround-",avloeserord:"altmogleg-/altmulig-, allsidig, allmenn-, universal-"},{importord:"allrounder",avloeserord:"allsidig person, altmoglegperson/altmuligperson, mangkunnig person, faktotum, «potet»"},{importord:"amplifier",avloeserord:"forsterkar/forsterker"},{importord:"approach",avloeserord:"tilnærming(småte), framgangsmåte, (innfalls)vinkel"},{importord:"art director (AD)",avloeserord:"kunstnarleg leiar/kunstnerisk leder (teater m.m.); grafisk formgjevar/formgiver (rekl.); reklamesjef (arb.liv)"},{importord:"artist in residence",avloeserord:"gjestekunstnar/gjestekunstner"},{importord:"assist",avloeserord:"målgjevande pasning / målgivende pasning (fotball)"},{importord:"att: (av eng. «attention»)",avloeserord:"ved, v/ (ev. skriv ein berre namnet på ny linje)"},{importord:"attach",avloeserord:"leggje/legge ved, sende med"},{importord:"attachment",avloeserord:"vedlegg"},{importord:"audition",avloeserord:"prøvespel/prøvespill, rolleprøve, opptaksprøve"},{importord:"auditory icon",avloeserord:"lydikon, lydlogo, auditivt ikon, jf. earcon"},{importord:"babyboom",avloeserord:"babybølgje/babybølge, fødselsbølgje/fødselsbølge, jf. boom"},{importord:"backbone",avloeserord:"stamnett (IKT)"},{importord:"backing",avloeserord:"støtte, hjelp, oppfølging (allment); komp, akkompagnement, støtte (mus.); jf. oppbacking, backup"},{importord:"backlash",avloeserord:"tilbakeslag, motreaksjon"},{importord:"backlist",avloeserord:"portefølje"},{importord:"backlog",avloeserord:"restanse, etterslep"},{importord:"back-office",avloeserord:"kontortenar(program)/kontortjener(program) (IKT); kontorstøtte (adm.); jf. front-office"},{importord:"backpacker",avloeserord:"ryggsekkturist"},{importord:"backslash",avloeserord:"omvend skråstrek / omvendt skråstrek"},{importord:"backstage",avloeserord:"bak scenen, bakscenes"},{importord:"backtracking",avloeserord:"tilbakesporing (IKT)"},{importord:"backup",avloeserord:"reservekopi, tryggingskopi/sikkerhetskopi (IKT); støtte, hjelp, oppfølging (allment); jf. backing"},{importord:"bake-off",avloeserord:"ferdigheva/ferdighevet, halvsteikt/halvstekt (bakverk som er klargjord for heving og steiking); ferdigsteikt/ferdigstekt; bakekonkurranse (tv-program)"},{importord:"balanced scorecard (BSC)",avloeserord:"balansert målstyring (BMS)"},{importord:"barbecue",avloeserord:"(hage)grill; grillmat; grillfest"},{importord:"base camp",avloeserord:"baseleir"},{importord:"beacon",avloeserord:"mobilfyr"},{importord:"beacon technology",avloeserord:"mobilfyrteknologi, nettvardeteknologi"},{importord:"bear market",avloeserord:"bjørnemarknad/bjørnemarked "},{importord:"benchmark",avloeserord:"referansenivå, -norm, -verdi, styringsmål, (allment/nær.liv); fastmerke (landmåling)"},{importord:"benchmark test",avloeserord:"yteprøve (IKT)"},{importord:"benchmarking",avloeserord:"referansemåling, referansenormering, styringsnormering"},{importord:"best practice",avloeserord:"mønsterpraksis, bestepraksis, beste praksis"},{importord:"bias",avloeserord:"slagside"},{importord:"binge watching",avloeserord:"seriemaraton, seriefråtsing, tv-fråtsing"},{importord:"blackout",avloeserord:"jernteppe, minnesvinn (allment); mellombels medvitstap / midlertidig bevissthetstap (med.); stort straumbrot / stort strømbrudd (tekn.)"},{importord:"blame game",avloeserord:"skuldspel/skyldspill, syndebukkspel/syndebukkspill"},{importord:"board(s) (reklame)",avloeserord:"(reklame)tavle, reklame(skilt)"},{importord:"bodybuilder",avloeserord:"kroppsbyggjar/kroppsbygger"},{importord:"bodybuilding",avloeserord:"kroppsbygging"},{importord:"bodyguard",avloeserord:"livvakt"},{importord:"booke (inn)",avloeserord:"bestille, tinge; reservere; skrive seg inn"},{importord:"booking",avloeserord:"bestilling, tinging; reservasjon"},{importord:"bookmark",avloeserord:"bokmerke, favoritt"},{importord:"boom",avloeserord:"høgkonjunktur/høykonjunktur (økon.), brå oppgang, brå oppsving (allment); i ordsammensetninger gjerne -bølgje/-bølge, jf. babyboom"},{importord:"booster",avloeserord:"forsterkar/forsterker, effektforsterkar/effektforsterker, sluttforsterkar/sluttforsterker"},{importord:"boote",avloeserord:"starte (datamaskin), kaldstarte, jf. restart"},{importord:"brain drain",avloeserord:"hjerneflukt"},{importord:"brainstorming",avloeserord:"idédugnad, idémyldring"},{importord:"branding",avloeserord:"merkevarebygging (nær.liv); brennemerking (tatoveringsteknikk)"},{importord:"breakdown",avloeserord:"samanbrot/sammenbrudd, havari, driftsfeil, oppdeling, spesifikasjon"},{importord:"breaking news",avloeserord:"siste nytt, nyhendevarsel/nyhetsvarsel, akkurat no / akkurat nå, no:/nå, siste"},{importord:"browse",avloeserord:"bla, bla igjennom, lese"},{importord:"browse path",avloeserord:"katalogstig/katalogsti, filstig/filsti (IKT), jf. search path"},{importord:"browser / web browser",avloeserord:"nettlesar/nettleser"},{importord:"bucket list",avloeserord:"kisteliste"},{importord:"bug",avloeserord:"programfeil, jf. debug"},{importord:"bull market",avloeserord:"oksemarknad/oksemarked "},{importord:"business-to-government (B2G)/ business-to-administration (B2A)",avloeserord:"handel med offentleg sektor / handel med offentlig sektor"},{importord:"business-to-business (B2B)",avloeserord:"handel mellom næringsdrivande / handel mellom næringsdrivende, handel mellom bedrifter"},{importord:"business-to-consumer (B2C)",avloeserord:"detaljhandel"},{importord:"business-to-government (B2G)",avloeserord:"sal til det offentlege / salg til det offentlige (= business-to-administration (B2A))"},{importord:"business case",avloeserord:"prosjektgrunngjeving/prosjektbegrunnelse, verksemdsscenario/virksomhetsscenario, forretningsgrunnlag, konseptgrunnlag"},{importord:"button",avloeserord:"(jakke)merke (allment); knapp (IKT)"},{importord:"by-line (byline)",avloeserord:"signatur"},{importord:"byline picture",avloeserord:"signaturbilete/signaturbilde"},{importord:"cageball",avloeserord:"burball, burfotball"},{importord:"call center (call centre)",avloeserord:"kundesenter, kundetelefon, jf. help desk"},{importord:"calling",avloeserord:"dørtelefon (på hus)"},{importord:"canyon",avloeserord:"gjel, kløft, juv"},{importord:"canyoning",avloeserord:"juving, juvvandring"},{importord:"cap",avloeserord:"skyggelue, kaps"},{importord:"carjacking",avloeserord:"bilkapring"},{importord:"carport",avloeserord:"open garasje / åpen garasje, bilbås"},{importord:"case",avloeserord:"(jf. case study:) kasus, tilfelle, sak, emne, eksempeltilfelle (-person osv.), døme(tilfelle), typeeksempel, typedøme; undersøkelsesobjekt, granskingsemne"},{importord:"case study",avloeserord:"kasusstudie, tilfellestudie, eksempelstudie, dømestudie"},{importord:"cash management",avloeserord:"likviditetsstyring"},{importord:"catering",avloeserord:"matlevering; selskapsmat"},{importord:"catwalk",avloeserord:"motemolo"},{importord:"chat",avloeserord:"nettprat"},{importord:"chatbot",avloeserord:"samtalerobot, praterobot"},{importord:"chatte",avloeserord:"prate på nettet, nettprate, (humor.:) tjatte, tjatre"},{importord:"child grooming",avloeserord:"barnelokking"},{importord:"chip",avloeserord:"(data)brikke, integrert krins / integrert krets, jf. integrated circuit, microchip"},{importord:"chips",avloeserord:"potetgull, potetlauv/potetløv; (mer allment:) flak, spon"},{importord:"chunk",avloeserord:"klump, bit"},{importord:"citizen science",avloeserord:"folkeforsking, grasrotforsking"},{importord:"clickbait",avloeserord:"klikkagn, klikkfang"},{importord:"clou (frå fransk)",avloeserord:"høgdepunkt/høydepunkt, glansnummer"},{importord:"cloud computing",avloeserord:"nettsky (IKT)"},{importord:"clue",avloeserord:"nøkkel, kjerne, poeng"},{importord:"clutch",avloeserord:"koplingspedal, kløtsj"},{importord:"coach",avloeserord:"trenar/trener, rettleiar/veileder, leiar/leder, rådgjevar/rådgiver"},{importord:"coache",avloeserord:"trene, rettleie/veilede"},{importord:"co-branded",avloeserord:"samprodukt"},{importord:"co-branding",avloeserord:"merkevaresamarbeid, merkesamarbeid"},{importord:"cole slaw",avloeserord:"kålsalat"},{importord:"comeback",avloeserord:"tilbakekomst"},{importord:"common sense",avloeserord:"sunn fornuft, folkevett/folkevit"},{importord:"community",avloeserord:"lokalsamfunn, nettgruppe, nettsamfunn"},{importord:"community-ansvarleg",avloeserord:"nettvert, redaktør, nettstammeansvarleg/-ansvarlig, nettgruppe-, nettsamfunn- (på Internett)"},{importord:"competitive edge",avloeserord:"konkurransefordel, konkurranseforsprang"},{importord:"compliance",avloeserord:"etterleving, regeletterleving/regeletterlevelse, regeloppfylling/regeloppfyllelse, samsvar"},{importord:"compliance auditing",avloeserord:"etterlevingsrevisjon/etterlevelsesrevisjon, samsvarsrevisjon"},{importord:"connector",avloeserord:"port, utgang, kontakt, koplingspunkt (maskinvare); portnar/portner, bindeledd (programvare)"},{importord:"content management",avloeserord:"innhaldsstyring/innholdsstyring"},{importord:"content marketing",avloeserord:"innhaldsmarknadsføring/innholdsmarkedsføring"},{importord:"controller",avloeserord:"rekneskapsleiar/regnskapsleder, økonomioppfølgjar/økonomioppfølger, kontrollar/kontroller"},{importord:"cookie",avloeserord:"informasjonskapsel, infokapsel, kjeks (IKT)"},{importord:"copyright",avloeserord:"opphavsrett"},{importord:"corner",avloeserord:"hjørnespark, hjørnekast (idr.)"},{importord:"corporate governance",avloeserord:"eigarstyring og selskapsleiing / eierstyring og selskapsledelse"},{importord:"corporate social responsibility (CSR)",avloeserord:"samfunnsansvaret til bedrifta / bedriftens samfunnsansvar"},{importord:"cottage cheese",avloeserord:"hytteost"},{importord:"cover charge",avloeserord:"inngangspengar/inngangspenger, kuvertavgift, entré"},{importord:"crabsticks",avloeserord:"krabbepinnar/krabbepinner"},{importord:"cracker",avloeserord:"datapirat"},{importord:"crew",avloeserord:"stab, arbeidslag, gruppe, besetning, mannskap"},{importord:"cross media publishing",avloeserord:"tverrpublisering, tverrmedial publisering"},{importord:"crowd funding",avloeserord:"kronerulling (på nett), pengeinnsamling, folkefinansiering"},{importord:"crowdsourcing",avloeserord:"(nett)dugnad"},{importord:"cruise control",avloeserord:"fartshaldar/fartsholder"},{importord:"cyber-",avloeserord:"kyber- (brukt om datamaskiner og Internett-universet)"},{importord:"cyberstalking",avloeserord:"nettforfølging/nettforfølgelse, nett-elting, nettsjikane, netterror"},{importord:"data mart",avloeserord:"datatorg, datamarknad/datamarked"},{importord:"data warehouse",avloeserord:"datavarehus"},{importord:"deadline",avloeserord:"leveringsfrist, tidsfrist, frist"},{importord:"debug",avloeserord:"avluse; feilsøkje/feilsøke; rette programfeil, fjerne programlus; jf. bug"},{importord:"dedicated",avloeserord:"engasjert, ihuga, heilhjarta/helhjertet (allment); dedisert (litt.); dedikert, (særskilt) tilordna/tilordnet og tilpassa/tilpasset (IKT), laga/laget for"},{importord:"default",avloeserord:"standard(verdi), standardinnstilling (grunn-, forhånds-, normal-, leverandør-, produsent-)"},{importord:"degrowth",avloeserord:"nedvekst"},{importord:"design",avloeserord:`\r
+(med vekt på estetikk og funksjon, som i moderne design:) formgjeving/formgivning, (estetisk/kunstnarleg/kunstnerisk) utforming; (i tekniske fag også:) konstruksjon\r
+`},{importord:"designer",avloeserord:"formgjevar/formgiver"},{importord:"desktop publishing (DTP)",avloeserord:"skrivebordssetjing/skrivebordssetting"},{importord:"direct mail",avloeserord:"direktereklame"},{importord:"disc-at-once",avloeserord:"heilbrenning/helbrenning, einøktsbrenning/enøktsbrenning, jf. session-at-once"},{importord:"disc-jockey (DJ)",avloeserord:"plateprater, platesnurrer, platekusk, plateryttar/platerytter, diskjockey"},{importord:"disclaimer",avloeserord:"ansvarsfråskriving, atterhald / ansvarsfraskrivelse, forbehold"},{importord:"display",avloeserord:"skjerm, teiknrute/tegnrute, (tekst)vindauge/(tekst)vindu (t.d. på telefonen)"},{importord:"disruptive technology",avloeserord:"brytningsteknologi"},{importord:"docu-soap",avloeserord:"dokumentarsåpe, dokusåpe"},{importord:"dot (uttalt «dått» etter eng.)",avloeserord:"punktum (i Internett- og e-postadresser)"},{importord:"dotcom-selskap",avloeserord:"nettselskap"},{importord:"double backslash",avloeserord:"dobbel omvend skråstrek / dobbelt omvendt skråstrek, jf. backslash"},{importord:"double slash",avloeserord:"dobbel skråstrek / dobbelt skråstrek, jf. slash"},{importord:"doughnut",avloeserord:"(amerikansk) smultring"},{importord:"downlight",avloeserord:"(innfelt) nedlys"},{importord:"drawback",avloeserord:"ulempe, bakdel, mangel"},{importord:"driver",avloeserord:"drivar/driver (norsk uttale), styreprogram"},{importord:"dummy",avloeserord:"modell, prototyp, falsk, uekte, skinn-"},{importord:"e(-)",avloeserord:"e- (= elektronisk) (IKT)"},{importord:"earcon",avloeserord:"lydikon, lydlogo, jf. auditory icon"},{importord:"e-book reader, e-book device",avloeserord:"lesebrett"},{importord:"e-business",avloeserord:"e-forretningar/e-forretninger, e-forretningsdrift; e-forretning (om det enkelte firmaet)"},{importord:"e-commerce",avloeserord:"e-handel, netthandel"},{importord:"economies of agglomeration",avloeserord:"samlokaliseringsfordelar/samlokaliseringsfordeler"},{importord:"editor",avloeserord:"redigeringsprogram (IKT)"},{importord:"e-mail",avloeserord:"jf. mail"},{importord:"embed",avloeserord:"bygge inn / byggje inn, setje/sette, felle"},{importord:"employer branding",avloeserord:"arbeidsgjevarprofilering/arbeidsgiverprofilering"},{importord:"empower",avloeserord:"myndiggjere/myndiggjøre, styrke, gje/gi styrke, setje i stand / sette i stand"},{importord:"empowerment",avloeserord:"myndiggjering/myndiggjøring, styrking (f.eks. pasientstyrking)"},{importord:"enter(tast)",avloeserord:"linjeskift(tast), retur(tast)"},{importord:"entertainer",avloeserord:"underhaldar/underholder, underhaldningsartist/underholdningsartist, enterteinar/enterteiner"},{importord:"equalizer",avloeserord:"tonekontroll; utjamnar/utjevner, utjamningsfilter/utjevningsfilter, jf. graphic equalizer"},{importord:"e-reader",avloeserord:"lesebrett"},{importord:"establishment, the",avloeserord:"det beståande / det bestående (samfunnet), etablissementet"},{importord:"e-tailer",avloeserord:"e-taljist, nettkjøpmann"},{importord:"eyeliner",avloeserord:"kajal, augeblyant/øyeblyant, jf. lipliner"},{importord:"facility management",avloeserord:"næringsforvaltning, eigedomsforvaltning/eiendomsforvaltning, bygningsforvaltning"},{importord:"faction",avloeserord:"faksjon (fakta + fiksjon)"},{importord:"factoring",avloeserord:"faktoring, fakturakreditt"},{importord:"fair",avloeserord:"rimeleg/rimelig, rettferdig, real, ærleg/ærlig"},{importord:"fair play",avloeserord:"ærleg spel /ærlig spill, rettferdig behandling"},{importord:"fan",avloeserord:"tilhengjar/tilhenger, beundrar/beundrer"},{importord:"fanklubb",avloeserord:"beundrarklubb/beundrerklubb, venelag"},{importord:"fast food",avloeserord:"kjappmat, hurtigmat, snøggmat, gatekjøkkenmat, jf. junk food"},{importord:"fatbike",avloeserord:"tjukksykkel"},{importord:"feature",avloeserord:"preg-, bakgrunns-, dokumentar-, interesse-, tema- (i ymse samansetjingar, t.d. med -artikkel , -journalistikk)"},{importord:"feed",avloeserord:"straum/strøm (i sosiale medium/sosiale medier)"},{importord:"feedback",avloeserord:"tilbakemelding, respons, reaksjon, tilbakekopling, svar"},{importord:"fight",avloeserord:"(hard eller intens) kamp, hardt oppgjer / hardt oppgjør, fait"},{importord:"fighte",avloeserord:"slåss/slåst, kjempe, konkurrere, faite"},{importord:"fighter",avloeserord:"kjempar/kjemper, faitar/faiter"},{importord:"fighting spirit",avloeserord:"kampånd, kampglød, gå-på-humør"},{importord:"file server",avloeserord:"filtenar/filtjener"},{importord:"finish",avloeserord:"sluttspurt; finpuss; finisj"},{importord:"fintech",avloeserord:"finansteknologi"},{importord:"flight",avloeserord:"(fly)avgang, (fly)rute, flyging/flygning, flytur"},{importord:"flight recorder",avloeserord:"ferd(s)skrivar/ferd(s)skriver"},{importord:"flip-over",avloeserord:"arktavle, papirtavle, stativblokk, flippover"},{importord:"flop",avloeserord:"fiasko, flopp"},{importord:"flow",avloeserord:"strøm; (psyk.:) flyt"},{importord:"flow chart",avloeserord:"flytskjema, flytdiagram"},{importord:"food processor",avloeserord:"kjøkkenmaskin, matmølle, matprosessor, matkvern"},{importord:"food truck",avloeserord:"matvogn, matbil"},{importord:"footer",avloeserord:"botntekst/bunntekst, jf. header (IKT)"},{importord:"franchise",avloeserord:"forhandlarrett/forhandlerrett, agentur"},{importord:"franchising",avloeserord:"forhandlarrettssamarbeid/forhandlerrettssamarbeid, forhandlaravtale/forhandleravtale"},{importord:"freelance",avloeserord:"frilans (adj.); frilansar/frilanser (subst.)"},{importord:"frisbee",avloeserord:"disk, skjenebrett, sendeplate"},{importord:"front-office",avloeserord:"kontorklient(program), jf. backoffice"},{importord:"frozen shoulder",avloeserord:"frosen skulder / frossen skulder (med.)"},{importord:"fun fact",avloeserord:"morofakta"},{importord:"fund raising",avloeserord:"pengeinnsamling, innsamlingsaksjon"},{importord:"fuzzy logic",avloeserord:"ullen logikk, flytande / flytende logikk, lodden logikk, linn logikk"},{importord:"gadget",avloeserord:"dings"},{importord:"gate",avloeserord:"utgang (på flyplass)"},{importord:"geek",avloeserord:"fagidiot; særling; dust"},{importord:"General Data Protection Regulation (GDPR)",avloeserord:"personvernforordningen (PVF)"},{importord:"ghost writer",avloeserord:"skyggeforfatter / skuggeforfattar"},{importord:"Global Positioning System (GPS)",avloeserord:"globalt posisjonsystem (GPS)"},{importord:"golden goal",avloeserord:"førstemålssiger/førstemålsseier, «første målet vinn» / «første målet vinner»"},{importord:"goodwill",avloeserord:"velvilje, godvilje"},{importord:"governance",avloeserord:"styring (og ettersyn); delaktighetsstyring; styresett"},{importord:"graphic equalizer",avloeserord:"grafisk tonekontroll, jf. equalizer"},{importord:"gründer",avloeserord:"grunnleggjar/grunnlegger (nøytralt); jobbar/jobber (negativt); jobbskapar/jobbskaper (positivt)"},{importord:"guide",avloeserord:"omvisar/omviser, turleder/turleiar, reiseleiar/reiseleder, gaid"},{importord:"guts",avloeserord:"(ha) mot, pågangsmot, vågemot, karakter(styrke), tæl, nerk; (være/vere) modig, djerv, uredd, ikke/ikkje skvetten"},{importord:"hacker",avloeserord:"datasnok"},{importord:"handout",avloeserord:"støtteark"},{importord:"handsfree",avloeserord:"handfri/håndfri (mobiltelefon)"},{importord:"hanggliding",avloeserord:"hengeflyging, hengegliding"},{importord:"hangover",avloeserord:"fyllesjuke, tømmermenn, bakrus"},{importord:"hard disk",avloeserord:"platelager, harddisk"},{importord:"hardware",avloeserord:"maskinvare"},{importord:"hashtag",avloeserord:"emneknagg"},{importord:"heade",avloeserord:"nikke, skalle, stange, hedde"},{importord:"header",avloeserord:"topptekst, jf. footer (IKT)"},{importord:"heading",avloeserord:"(fotball) hovudstøyt/hodestøt"},{importord:"headhunte",avloeserord:"handplukke/håndplukke, drive hovudjakt / drive hodejakt"},{importord:"headhunting",avloeserord:"handplukking/håndplukking, hovudjakt/hodejakt, utveljing/utvelging"},{importord:"heading",avloeserord:"overskrift, tittel (media); nikking, hedding (idr.)"},{importord:"heavy rock",avloeserord:"tungrock"},{importord:"help desk",avloeserord:"hjelpesentral, hjelpeteneste/hjelpetjeneste, kundehjelp, svarteneste/svartjeneste, jf. call center og support"},{importord:"hibernation mode",avloeserord:"dvalemodus (IKT)"},{importord:"highlight",avloeserord:"høgdepunkt/høydepunkt"},{importord:"hi-tech",avloeserord:"høgteknologisk/høyteknologisk"},{importord:"holding company",avloeserord:"eigarselskap/eierselskap, holdingselskap"},{importord:"horrorfilm",avloeserord:"grøssar/grøsser, skrekkfilm"},{importord:"host (med eng. uttale)",avloeserord:"(web)hotell, vert, vertsteneste/vertstjeneste (IKT)"},{importord:"hoste (med eng. uttale)",avloeserord:"drifte, leige ut / leie ut [plass til] programvare og bruk av programvare på datamaskiner over Internett, jf. web hotel"},{importord:"hosted (med eng. uttale)",avloeserord:"utleigd/utleid"},{importord:"hosting (med eng. uttale)",avloeserord:"netthotell, utleige/utleie"},{importord:"hostmaster",avloeserord:"namnemeister/navnemester, namneforvaltar/navneforvalter (for særskilde Internett-tenester)"},{importord:"hotlist",avloeserord:"favorittliste, yndlingsbokmerke/yndlingsbokmerker (IKT)"},{importord:"house",avloeserord:"huse (andres operative maskinvare i eigne lokale mot betaling), jf. hoste"},{importord:"housed",avloeserord:"husa/huset"},{importord:"housing",avloeserord:"husing"},{importord:"human resource (HR)",avloeserord:"personalressurs"},{importord:"human resource management (HRM)",avloeserord:"leiing av personalressursar / ledelse av personalressurser, leiing av menneskelege ressursar (LMR) / Ledelse av menneskelige ressurser (LMR)"},{importord:"human resource manager",avloeserord:"personalsjef"},{importord:"image",avloeserord:"uttrykk, (personleg/personlig) stil, profil, omdømme, ry"},{importord:"impact",avloeserord:"samfunnsbidrag"},{importord:"implementere",avloeserord:"setje i verk/iverksette, setje ut i livet / sette ut i livet, gjennomføre"},{importord:"India pale ale",avloeserord:"indiaøl"},{importord:"influencer",avloeserord:"påverkar/påvirker"},{importord:"infotainment",avloeserord:"nyheitsunderhaldning/nyhetsunderholdning, tabloid-"},{importord:"in-house",avloeserord:"intern-, firma- (i samansetjingar), sjølv/selv, på huset"},{importord:"inline skates",avloeserord:"(«linjeskøyter», dvs. rulleskøyter med hjulene på rekke:) rulleskøyter"},{importord:"inside trading",avloeserord:"innsidehandel"},{importord:"insider",avloeserord:"innsidar/innsider"},{importord:"instant coffee",avloeserord:"pulverkaffi/pulverkaffe"},{importord:"instant message",avloeserord:"direktemelding, hurtigmelding, snøggmelding"},{importord:"instant messaging (IM)",avloeserord:"direktemeldingst(j)eneste, snøggmeldingsteneste/hurtigmeldingstjeneste"},{importord:"integrated circuit",avloeserord:"integrert krins / integrert krets, (data)brikke, jf. chip"},{importord:"interface",avloeserord:"grensesnitt"},{importord:"Internet service provider (ISP)",avloeserord:"internettilbydar/internettilbyder"},{importord:"jetlag",avloeserord:"jet(t)sjuke/jet(t)syke, døgnville/døgnvillhet"},{importord:"jingle",avloeserord:"lydvignett, lydlogo"},{importord:"joint venture",avloeserord:"samføretak/samforetak, fellesføretak/fellesforetak, samarbeidsprosjekt"},{importord:"joystick",avloeserord:"styrespak, kontrollspak"},{importord:"junk food",avloeserord:"søppelmat, usunn mat, gatekjøkkenmat, jf. fast food"},{importord:"just-in-time-prinsippet",avloeserord:"i-rett(e)-tid-prinsippet, der-og-da-prinsippet"},{importord:"keeper",avloeserord:"målvakt"},{importord:"key account manager",avloeserord:"hovudkundeansvarleg/hovedkundeansvarlig, nøkkelkundeleiar/nøkkelkundeleder, nøkkelkundekonsulent"},{importord:"keyboard",avloeserord:"tangentbrett (mus.); tastatur (IKT)"},{importord:"kick-off",avloeserord:"avspark (idr.); oppstart, start (allment)"},{importord:"killer application («killer app»)",avloeserord:"tetprogram, vinnarprogram/vinnerprogram (IKT)"},{importord:"knowhow",avloeserord:"fagkunnskap, faginnsikt, ekspertise"},{importord:"knowledge management",avloeserord:"kunnskapsleiing/kunnskapsledelse, kompetanseleiing/kompetanseledelse"},{importord:"laptop",avloeserord:"berbar (datamaskin, pc) / bærbar (datamaskin, pc) (IKT)"},{importord:"layout",avloeserord:"grafisk utforming, oppsett, bladbunad, jf. design"},{importord:"leading zero",avloeserord:"leiande null / ledende null, førestilt null / foranstilt null"},{importord:"leasing",avloeserord:"leigefinansiering/leiefinansiering"},{importord:"leisure wear",avloeserord:"fritidsklede/fritidsklær"},{importord:"lighter",avloeserord:"(sigarett-)tennar/(sigarett-)tenner"},{importord:"link",avloeserord:"lenkje/lenke, peikar/peker, kopling (IKT)"},{importord:"lipgloss",avloeserord:"leppeglans"},{importord:"lipliner",avloeserord:"leppeblyant, leppekajal, jf. eyeliner"},{importord:"literacy",avloeserord:"skriftkultur, skriftkunne/skriftkyndighet, tekstkompetanse, litterasitet"},{importord:"literature review",avloeserord:"litteraturgjennomgang"},{importord:"live",avloeserord:"direktesend/direktesendt, direkte"},{importord:"loin",avloeserord:"(om fisk:) rygg (f.eks. torskerygg), ryggstykke, ryggfilet (uten halestykket)"},{importord:"mail",avloeserord:"e-post, e-brev, e-melding, jf. e-mail"},{importord:"maile",avloeserord:"sende e-post, e-poste"},{importord:"mailing list",avloeserord:"e-postliste"},{importord:"mainstream-",avloeserord:"hovudstraums-/hovedstrøms-, midtstims-, midtstraums-/midtstrøms-"},{importord:"makerspace",avloeserord:"folkeverkstad/folkeverksted"},{importord:"makeup",avloeserord:"sminke"},{importord:"management",avloeserord:"leiing/ledelse (bedrifts-), styring"},{importord:"management consultant",avloeserord:"bedriftsrådgjevar/bedriftsrådgiver, strategirådgjevar/strategirådgiver"},{importord:"manager",avloeserord:"leiar/leder, sjef, forretningsførar/forretningsfører, impresario, arrangør"},{importord:"manual",avloeserord:"handbok/håndbok, bruksrettleiing/bruksanvisning"},{importord:"marketing",avloeserord:"marknadsføring/markedsføring"},{importord:"mashup",avloeserord:"nettfletting (IKT)"},{importord:"match",avloeserord:"kamp (idr.); jambyrdig motstandar / jevnbyrdig motstander, make; (full) klaff"},{importord:"matche",avloeserord:"passe saman med / passe sammen med, stå til; komme opp mot, måle seg med"},{importord:"m-commerce (mobile commerce)",avloeserord:"m-handel, mobilhandel"},{importord:"memory card",avloeserord:"minnekort"},{importord:"memory stick",avloeserord:"minnepinne"},{importord:"metallic",avloeserord:"(med) metallglans"},{importord:"microchip",avloeserord:"(data)brikke, mikrobrikke, integrert krins / integrert krets, jf. chip, integrated circuit"},{importord:"mindfulness",avloeserord:"oppmerksomt nærvær / merksamt nærvær, ans"},{importord:"mnemonic",avloeserord:"hugsesymbol/huskesymbol, hugseregel/huskeregel"},{importord:"mnemonics",avloeserord:"hugsekunst/huskekunst, hugseteknikk/husketeknikk"},{importord:"moderator",avloeserord:"debattleder, ordstyrer"},{importord:"mountain bike",avloeserord:"terrengsykkel, jf. offroad-sykkel"},{importord:"mountain biking",avloeserord:"terrengsykling, jf. offroad-sykkel"},{importord:"multiple choice (question)",avloeserord:"fleirvalsoppgåve/flervalgsoppgave"},{importord:"multitasking",avloeserord:"fleiroppgåvekjøring/fleroppgavekjøring (IKT)"},{importord:"multi touch-screen",avloeserord:"fleirtrykksskjerm/flertrykksskjerm (IKT)"},{importord:"musical",avloeserord:"musikkspel/musikkspill, musikal"},{importord:"must",avloeserord:"nødvendigheit/nødvendighet"},{importord:"mute",avloeserord:"dempar/demper"},{importord:"network governance",avloeserord:"nettverksstyring"},{importord:"news on demand",avloeserord:"nyheiter etter (ved) behov, på bestilling / nyheter etter (ved) behov, på bestilling, jf. on demand"},{importord:"newsfeed",avloeserord:"nyheitsvarsling/nyhetsvarsling, -mating, -straum/strøm"},{importord:"newsgroup",avloeserord:"temagruppe, nyheitsgruppe/nyhetsgruppe, diskusjonsgruppe (IKT)"},{importord:"no-platform",avloeserord:"scenenekt"},{importord:"notebook",avloeserord:"berbar (datamaskin) / bærbar (datamaskin) (IKT)"},{importord:"offline (off-line)",avloeserord:"nedkopla/nedkoplet, fråkopla/frakoplet, jf. online"},{importord:"off-piste",avloeserord:"laussnøkjøring/løssnøkjøring, frikjøring"},{importord:"offroad-sykkel",avloeserord:"terrengsykkel, jf. mountain bike"},{importord:"on demand",avloeserord:"etter behov, behovs-, -bestillings-, tingings-, på førespurnad / på forespørsel, jf. news, print, publishing og video on demand"},{importord:"on-hook dialing",avloeserord:"rørlaus oppringing / rørløs oppringing"},{importord:"online (on-line)",avloeserord:"oppkopla/oppkoplet, tilkopla/tilkoplet, på nettet (IKT); tilgjengeleg/tilgjengelig eller «med» (sjargong), jf. offline"},{importord:"open access",avloeserord:"open/åpen tilgang"},{importord:"oppbacking",avloeserord:"oppbakking, jf. backing"},{importord:"option",avloeserord:"val/valg, alternativ, moglegheit/mulighet (allment); opsjon (økon./pol.); funksjonsval/funksjonsvalg (IKT)"},{importord:"outlet",avloeserord:"fabrikkutsalg, merkevareutsalg"},{importord:"outsider",avloeserord:"utsidar/utsider"},{importord:"out-of-office message",avloeserord:"fråværsmelding/fraværsmelding"},{importord:"outsourcing",avloeserord:"utkontraktering, tenesteutsetjing/tjenesteutsetting "},{importord:"overhead",avloeserord:"skriftprosjektør, lysarkvisar/lysarkviser (tekn.); lysark, transparent (tekn.); administrasjonskostnader, felleskostnader (økon.)"},{importord:"overheadprojektor",avloeserord:"skriftprosjektør, lysarkvisar/lysarkviser"},{importord:"pager",avloeserord:"personsøkjar/personsøker"},{importord:"paper",avloeserord:"forskingsartikkel/forskningsartikkel, vitskapleg innlegg/vitenskapelig innlegg"},{importord:"paramedic",avloeserord:"paramedisinar/paramedisiner (person)"},{importord:"paring",avloeserord:"(mobil) parkopling, paring"},{importord:"patch",avloeserord:"reparasjonsfil, programfiks, feilfiks (IKT)"},{importord:"patchwork",avloeserord:"lappeteknikk, jf. quilt"},{importord:"patient (care) pathway",avloeserord:"pasientforløp/pasientløype"},{importord:"peer review",avloeserord:"fagfellevurdering, kollegavurdering"},{importord:"peer-to-peer (P2P) network",avloeserord:"likenett, jambyrdsnett/jevnbyrdsnett"},{importord:"peptalk",avloeserord:"peppreik, pepprat, kveikpreik, piffprat"},{importord:"performance-kunst",avloeserord:"framføringskunst"},{importord:"phishing",avloeserord:"nettfisking"},{importord:"pink",avloeserord:"rosa, lyseraud/lyserød"},{importord:"pitch",avloeserord:"innsal/innsalg"},{importord:"plug-in",avloeserord:"programtillegg"},{importord:"podcast",avloeserord:"podkast, poddkast"},{importord:"pole position",avloeserord:"beste startspor"},{importord:"policy",avloeserord:"politikk, taktikk, retningslinjer"},{importord:"polish",avloeserord:"poler(ings)middel, pussemiddel, polisj"},{importord:"pop-up menu",avloeserord:"oppsprettsmeny, sprettoppmeny, hurtigmeny, snøggmeny"},{importord:"poster",avloeserord:"plakat"},{importord:"preset",avloeserord:"førehandssetje/forhåndssette, førehandsinnstille/forhåndsinnstille"},{importord:"prime time",avloeserord:"beste sendetid"},{importord:"print on demand (POD)",avloeserord:"trykk etter behov (TEB), bestillingstrykk, tingingstrykk, jf. publishing on demand"},{importord:"printe (ut)",avloeserord:"skrive ut"},{importord:"printer",avloeserord:"skrivar/skriver"},{importord:"process flow",avloeserord:"prosessflyt"},{importord:"producer",avloeserord:"produsent, produksjonsleiar/produksjonsleder, produksjonsansvarleg/produksjonsansvarlig"},{importord:"promotion",avloeserord:"salsframstøyt/salgsframstøt; (fram)hjelp, fremming, promotering"},{importord:"proof of concept (POC)",avloeserord:"konseptprov/konseptbevis"},{importord:"proxy server",avloeserord:"mellom(ledds)tenar/mellom(ledds)tjener"},{importord:"public service (broadcasting)",avloeserord:"allmennkringkasting"},{importord:"publishing on demand",avloeserord:"medieuavhengig publisering, medienøytral publisering, jf. print on demand og on demand"},{importord:"pulled pork",avloeserord:"plukksvin"},{importord:"push-up",avloeserord:"armheving"},{importord:"quilt",avloeserord:"(vattert) lappeteppe, jf. patchwork"},{importord:"quilte",avloeserord:"sy (vattert) lappeteppe, jf. patchwork"},{importord:"rack",avloeserord:"reol (mus., IKT, allment)"},{importord:"rail",avloeserord:"takreling, takhaldar/takholder (tekn.); reling (allment)"},{importord:"ransomware",avloeserord:"løysepengevirus/løsepengevirus, utpressingsvirus, gisselskadevare"},{importord:"raw food",avloeserord:"råmat"},{importord:"reality-TV",avloeserord:"røyndoms-TV/virkelighets-TV, dokusåpe"},{importord:"recovery",avloeserord:"(helse) tilfrisking/tilfriskning"},{importord:"referee",avloeserord:"fagkonsulent (i tidsskrift)"},{importord:"refill",avloeserord:"påfyll"},{importord:"release",avloeserord:"plateslepp/plateslipp"},{importord:"release notes",avloeserord:"produktmerknader, versjonsmerknader (IKT)"},{importord:"release party",avloeserord:"(plate)sleppfest/(plate)slippfest"},{importord:"research",avloeserord:"(for)undersøking/(for)undersøkelse, kjeldearbeid/kildearbeid"},{importord:"reset",avloeserord:"tilbakestille, nullstille"},{importord:"restart",avloeserord:"omstart, varmstart, jf. boote (IKT)"},{importord:"retail version",avloeserord:"forhandlarversjon/forhandlerversjon, salsversjon/salgsversjon (IKT)"},{importord:"retweet",avloeserord:"gjentvitre/oppattvitre, retvitre"},{importord:"reverse engineering",avloeserord:"omvend/omvendt utvikling, tilbakevikling, inversutvikling"},{importord:"road-movie",avloeserord:"landevegsfilm/landeveisfilm"},{importord:"roaming",avloeserord:"nettveksling, nett(om)streifing, nettgjesting"},{importord:"rockhopping",avloeserord:"(i havpadling:) brot(t)leik, brot(t)padling"},{importord:"roller blades",avloeserord:"(eg. inline skates «linjeskøyter») rulleskøyter"},{importord:"roll-on",avloeserord:"(kule)deodorant, (uformelt:) rulledeo"},{importord:"roll-up",avloeserord:"rullebanner, rulleplakat"},{importord:"RSS feed",avloeserord:"nyheitsvarsling/nyhetsvarsling, -mating"},{importord:"sample",avloeserord:"punktprøve (tekn.); lydsnutt, videosnutt (mus., media); utval/utvalg (samf.vit.)"},{importord:"sampling",avloeserord:"punktprøving (tekn.); digitalisering (mus., media); direkte utdeling av vareprøver (nær.liv)"},{importord:"scanne",avloeserord:"skanne, avlese"},{importord:"scanner",avloeserord:"skannar/skanner, avlesar/avleser"},{importord:"scoop",avloeserord:"varp, nyheitskupp/nyhetskupp, skup"},{importord:"scrapie",avloeserord:"skrapesjuke/skrapesyke (hos sau)"},{importord:"screen dump",avloeserord:"skjermdump, skjermbiletkopi/skjermbildekopi"},{importord:"screen shot",avloeserord:"skjermdump, skjermbiletkopi/skjermbildekopi"},{importord:"screening",avloeserord:"masseundersøking"},{importord:"scroll bar",avloeserord:"rullefelt, rullesjakt (IKT)"},{importord:"search path",avloeserord:"søkjebane/søkebane, søkjeveg/søkevei (i operativsystem), jf. browse path"},{importord:"segway",avloeserord:"ståhjuling"},{importord:"selfie",avloeserord:"sjølis, selvis / sjølvis, selvportrett, sjølportrett / sjølvportrett"},{importord:"server",avloeserord:"tenar/tjener, jf. webserver"},{importord:"session-at-once",avloeserord:"delbrenning, øktbrenning, fleirøktsbrenning/flerøktsbrenning, jf. disc-at-once"},{importord:"shoppe",avloeserord:"handle, gå på handletur, gå i butikkar / gå i butikker"},{importord:"shoppingsenter",avloeserord:"kjøpesenter, butikksenter"},{importord:"short message system (SMS)",avloeserord:"kortmeldingsteneste/kortmeldingstjeneste (for SMS-meldingar, dss. tekstmeldingar)"},{importord:"sidebar",avloeserord:"sidestolpe, infostolpe (IKT)"},{importord:"single touch-screen",avloeserord:"enkelttrykksskjerm/eittrykksskjerm (IKT)"},{importord:"site (web -)",avloeserord:"vevstad/vevsted, nettstad/nettsted"},{importord:"skateboard",avloeserord:"rullebrett"},{importord:"skins",avloeserord:"drakt, tema, ham (IKT), jf. themes"},{importord:"skippe",avloeserord:"late vere / la være, hoppe over, sløyfe, kutte ut"},{importord:"slash (/)",avloeserord:"skråstrek"},{importord:"slippery slope",avloeserord:"(overført:) skråplan"},{importord:"slow motion",avloeserord:"sakte film, langsam kino / langsom kino"},{importord:"smoothie",avloeserord:"smudi"},{importord:"snowboard",avloeserord:"snøbrett"},{importord:"software",avloeserord:"programvare"},{importord:"sound",avloeserord:"klangfarge, lydstil"},{importord:"soundtrack",avloeserord:"lydspor"},{importord:"sous vide",avloeserord:"vakuumlaga mat / vakuumlaget mat, vakuumtilverka mat / vakuumtilberedt mat, vakuumtrekt mat / vakuumtrukket mat, vakuumtilverking / vakuumtilberedelse"},{importord:"space management",avloeserord:"varestyring"},{importord:"space manager",avloeserord:"vareansvarleg/vareansvarlig"},{importord:"spam",avloeserord:"søppelpost"},{importord:"speaking notes",avloeserord:"handnotat/håndnotat, foredragsmanus, talemanus, talenotat/talenotater"},{importord:"spin-off",avloeserord:"avspinn, sideverknad/sidevirkning, sideeffekt"},{importord:"spoiler alert",avloeserord:"plottblottar/plottblotter, røpealarm, røpevarsel"},{importord:"spotlight",avloeserord:"punktlys, punktlampe, spotlys, rampelys"},{importord:"stakeholder",avloeserord:"interessent"},{importord:"stalker",avloeserord:"forfølger/forfølgjar, (nyno. òg:) eltar"},{importord:"standby",avloeserord:"klar, parat, i beredskap (allment); beredskaps- (-fartøy, -troppar o.a.) (mil.)"},{importord:"standbybillett",avloeserord:"sjansebillett"},{importord:"standbymodus",avloeserord:"ventemodus, kvilemodus/hvilemodus (tekn., IKT)"},{importord:"stand-in",avloeserord:"reserve"},{importord:"stand-up-komikar/stand-up-komiker",avloeserord:"spontankomikar/spontankomiker, ståoppkomikar/ståoppkomiker"},{importord:"stashe (seg opp)",avloeserord:"stase (seg opp), pynte (seg)"},{importord:"storyboard",avloeserord:"dreiebok"},{importord:"stout",avloeserord:"stautøl"},{importord:"streaming",avloeserord:"strøyming/strømming (direkteavspeling/direkteavspilling av video og lyd over Internett) (IKT)"},{importord:"street credibility",avloeserord:"gatetruverd/gatetroverdighet"},{importord:"stretchlaken",avloeserord:"strekklaken"},{importord:"sub-woofer",avloeserord:"sub-bass(høgtalar)/sub-bass(høyttaler)"},{importord:"sudden death",avloeserord:"førstemålsspel/førstemålsspill"},{importord:"sunk cost",avloeserord:"tapt kostnad, irreversibel kostnad"},{importord:"supply-båt",avloeserord:"forsyningsbåt"},{importord:"support",avloeserord:"brukarstøtte/brukerstøtte (IKT); støtte (allment); jf. help desk"},{importord:"supporter",avloeserord:"tilhengjar/tilhenger, støttemedlem"},{importord:"supporterklubb",avloeserord:"støtteklubb, tilhengjarklubb/tilhengerklubb, jf. fanklubb"},{importord:"surround sound",avloeserord:"kringlyd"},{importord:"swimming pool",avloeserord:"symjebasseng/svømmebasseng"},{importord:"system(s) engineering",avloeserord:"systemutvikling"},{importord:"tab",avloeserord:"arkfane, fane, flik; etikett, merkelapp; tabb"},{importord:"tablet (PC)",avloeserord:"nettbrett"},{importord:"take-away-food",avloeserord:"hentemat, ta-med-mat"},{importord:"talkshow",avloeserord:"prateprogram"},{importord:"tap screen",avloeserord:"trykkskjerm"},{importord:"tape (s.)",avloeserord:"limband/limbånd, lydband/lydbånd, videoband/videobånd, teip"},{importord:"tape (v.)",avloeserord:"ta opp, teipe"},{importord:"target man",avloeserord:"oppspelspunkt/oppspillspunkt (idr.)"},{importord:"team",avloeserord:"(arbeids)lag, (samarbeids)gruppe"},{importord:"teambuilding",avloeserord:"lagutvikling, lagbygging"},{importord:"teamwork",avloeserord:"lagarbeid, samarbeid"},{importord:"teaser",avloeserord:"smakebit"},{importord:"telemarketing",avloeserord:"telefonsal/telefonsalg, marknadsføring/markedsføring (over telefon)"},{importord:"themes",avloeserord:"tema, drakt, ham (IKT), jf. skins"},{importord:"think-tank",avloeserord:"tenkjesmie/tenkesmie, tenkjetank/tenketank"},{importord:"throbber",avloeserord:"puls-ikon (ikon i nettlesarar som er animert under søk el. nedlasting)"},{importord:"thumbnail",avloeserord:"miniatyrbilete/miniatyrbilde, knøttbilete/knøttbilde (IKT)"},{importord:"time",avloeserord:"berekne/beregne, planleggje/planlegge, taime"},{importord:"time manager",avloeserord:"tidsplanleggjar/tidsplanlegger"},{importord:"time-outtime outtimeout",avloeserord:"det å gå i tenkjeboksen / det å gå i tenkeboksen, pause (ped.), tidsavbrot / tidsavbrudd (IKT)"},{importord:"timeshare",avloeserord:"tidspart, deltids(bruks)rett; parts-/andels- (t.d. -båt, -hytte)"},{importord:"timesharing",avloeserord:"tidsdeling, deltidsbruk; deltids(l)eige/deltids(l)eie"},{importord:"toastmaster",avloeserord:"visevert, kjøkemeister/kjøkemester"},{importord:"to-do-liste",avloeserord:"gjereliste/gjøreliste, gjeremålsliste/gjøremålsliste"},{importord:"tooltip",avloeserord:"verktøyhjelp (IKT)"},{importord:"touch screen",avloeserord:"trykkskjerm"},{importord:"touchpad",avloeserord:"styreplate, peikeplate/pekeplate (IKT)"},{importord:"trainee",avloeserord:"opplæringstilsett/opplæringsansatt, opplæringskandidat, aspirant, praktikant"},{importord:"trick or treat",avloeserord:"knask eller knep, godteri eller fanteri, snask eller snusk, grøss eller godteri"},{importord:"trigge",avloeserord:"setje i gang / sette i gang, utløyse/utløse"},{importord:"trigger",avloeserord:"utløysande faktor / utløsende faktor, inspirasjonskjelde/inspirasjonskilde"},{importord:"true crime",avloeserord:"krim frå røyndomen / krim fra virkeligheten, røyndomskrim/virkelighetskrim, krimdokumentar, dokukrim"},{importord:"turnover",avloeserord:"gjennomtrekk, utskifting, gjennomstrøyming/gjennomstrømming "},{importord:"tutorial",avloeserord:"rettleiing/veiledning"},{importord:"tweet",avloeserord:"(verb:) tvitre, kvitre"},{importord:"tweet",avloeserord:"(substantiv:) tvitring, tvitt, twittermelding, kvitter, kvitring"},{importord:"twitter",avloeserord:"se tweet"},{importord:"underscore",avloeserord:"understrek, understreking"},{importord:"understatement",avloeserord:"underdriving/underdrivelse"},{importord:"urbanist",avloeserord:"byplanleggjar/byplanlegger"},{importord:"video on demand",avloeserord:"video på førespurnad / video på forespørsel; videotorg, tingingsvideo/bestillingsvideo"},{importord:"voice actor",avloeserord:"stemmelegger"},{importord:"voice mail",avloeserord:"talepost"},{importord:"voice over",avloeserord:"fortellerstemme, kommentatorstemme"},{importord:"voice response",avloeserord:"talesvar, innvalssørvis/innvalgssørvis, talerespons"},{importord:"voucher",avloeserord:"studiebillett, studiesertifikat (utd.); (hotell)kupong"},{importord:"walkover",avloeserord:"autoopprykk; gratissiger/gratisseier"},{importord:"weasel",avloeserord:"beltebil"},{importord:"web designer",avloeserord:"vevutformar/vevutformer, nettskreddar/nettskredder, vevarkitekt, nettsidearkitekt"},{importord:"web hotel",avloeserord:"vevhotell"},{importord:"web pad",avloeserord:"nettbrett"},{importord:"webinar",avloeserord:"nettseminar"},{importord:"webmaster",avloeserord:"nettredaktør, nettadministrator, nettmeister/nettmester"},{importord:"webserver",avloeserord:"nettenar/nettjener, vevtenar/vevtjener"},{importord:"webside",avloeserord:"nettside"},{importord:"weekend",avloeserord:"helg, vekeslutt/ukeslutt"},{importord:"whiplash",avloeserord:"nakkesleng"},{importord:"whistleblower",avloeserord:"varslar/varsler"},{importord:"whiteboard",avloeserord:"tusjtavle"},{importord:"whiteboard-tusj",avloeserord:"tavletusj"},{importord:"wicked problem",avloeserord:"gjenstridig problem"},{importord:"widescreen",avloeserord:"breiskjerm/bredskjerm"},{importord:"windsurfing",avloeserord:"brettsegling/brettseiling"},{importord:"wizard",avloeserord:"vegvisar/veiviser, los (i dataprogram)"},{importord:"workflow",avloeserord:"arbeidsflyt, arbeidsgang"},{importord:"workshop",avloeserord:"arbeidsseminar, arbeidsmøte, verkstad/verksted (f.eks. idéverkstad/idéverksted)"},{importord:"workspace",avloeserord:"arbeidsområde, arbeidsflate (IKT)"},{importord:"World Wide Web",avloeserord:"Verdsveven/Verdensveven"},{importord:"worst case scenario",avloeserord:"i verste fall, verste fall-scenario, verste tilfelle-scenario"},{importord:"zero waste",avloeserord:"null avfall, nullavfall, null svinn, nullsvinn"}],pW=[{ord:"antivirus software, antivirus program",bokmaal:"antivirusprogramvare",nynorsk:"antivirusprogramvare",definisjon:"program på en datamaskin som forsøker å identifisere, motarbeide og fjerne datavirus og liknende skadevare"},{ord:"application",bokmaal:"applikasjon",nynorsk:"applikasjon",definisjon:"programvare som benytter datamaskinens ressurser til oppgaver som brukeren ønsker utført"},{ord:"CRT monitor, CRT display",bokmaal:"bilderørskjerm",nynorsk:"biletrøyrskjerm",definisjon:"skjerm med katodestrålerøyr"},{ord:"blogosphere",bokmaal:"bloggsfære",nynorsk:"bloggsfære",definisjon:"alle blogger på Internett og koblingene mellom disse"},{ord:"user interface",bokmaal:"brukergrensesnitt",nynorsk:"brukargrensesnitt",definisjon:"grenseflata eller kommunikasjonen mellom brukar og datamaskin (Kjelde: Norsk dataordbok)"},{ord:"embed",bokmaal:"bygge inn",nynorsk:"byggje inn",definisjon:"inkorporere et selvstendig element i et system / en struktur slik at det fremstår som en enhet"},{ord:"laptop, notebook",bokmaal:"bærbar datamaskin",nynorsk:"berbar datamaskin",definisjon:"datamaskin som er konstruert for mobil bruk, er liten og lett nok til å ha på fanget, har integrert skjerm og kan ha integrert fysisk eller virtuelt tastatur og pekeenhet"},{ord:"crowd computing",bokmaal:"datadugnad",nynorsk:"datadugnad",definisjon:"verktøy som gjør det mulig å utveksle ideer og ta beslutninger ved hjelp av og via data"},{ord:"computer monitor, computer screen",bokmaal:"dataskjerm",nynorsk:"dataskjerm",definisjon:"eining som syner den visuelle delen av brukargrensesnittet på ein datamaskin"},{ord:"digital ink",bokmaal:"digitalt blekk",nynorsk:"digitalt blekk",definisjon:"teknologi som digitalt avbilder håndskrift i dens naturlige form på en LCD-skjerm"},{ord:"digital paper",bokmaal:"digitalt papir",nynorsk:"digitalt papir",definisjon:"rastra blank side som vert vist på ein skjerm, og som vert nytta saman med ein digital penn til å lage handskrivne, digitale dokument"},{ord:"swipe",bokmaal:"dra",nynorsk:"dra",definisjon:"rørsle der ein beveger ein finger raskt over ein trykkskjerm"},{ord:"flick",bokmaal:"dra fort",nynorsk:"dra fort",definisjon:"rask rørsle med éin finger for å bla på ein trykkskjerm"},{ord:"e-book",bokmaal:"e-bok",nynorsk:"e-bok",definisjon:"digital tekst som skal tilsvare en tradisjonell, trykt boktekst"},{ord:"extranet",bokmaal:"ekstranett",nynorsk:"ekstranett",definisjon:"deler av et intranett som er delvis tilgjengelige for utenforstående med begrenset tilgang"},{ord:"electronic paper, e-paper",bokmaal:"elektronisk papir",nynorsk:"elektronisk papir",definisjon:"skjermteknologi som er utforma for å likne trykksverte på papir"},{ord:"hashtag",bokmaal:"emneknagg",nynorsk:"emneknagg",definisjon:"Blir gjerne brukt i sosiale medium for å utheve tema eller gjere det lettare å søkje"},{ord:"single-touch screen",bokmaal:"enkelttrykksskjerm",nynorsk:"enkelttrykksskjerm",definisjon:"trykkskjerm der ein kan nytte berre ein peikereiskap om gongen"},{ord:"firmware",bokmaal:"fastvare",nynorsk:"fastvare",definisjon:"programvare som er innebygd i ein datamaskin, og som styrer elektriske einingar internt"},{ord:"multi-touch screen",bokmaal:"flertrykksskjerm",nynorsk:"fleirtrykksskjerm",definisjon:"trykkskjerm der ein kan nytte fleire fingrar eller peikereiskapar på skjermen samtidig"},{ord:"crowdfunding",bokmaal:"folkefinansiering",nynorsk:"folkefinansiering",definisjon:"den samlede innsatsen til enkeltpersoner som danner et nettverk og bidrar med penger, vanligvis via Internett, for å støtte tiltak som er startet av andre personer eller organisasjoner"},{ord:"bloatware",bokmaal:"gjøkeprogram",nynorsk:"gaukeprogram",definisjon:"program som tek mykje minne på eininga det er installert på"},{ord:"freeware",bokmaal:"gratisprogramvare",nynorsk:"gratisprogramvare",definisjon:"programvare som kan benyttes uten vederlag, men der utvikleren beholder opphavsretten til programkoden, som ikke kan endres eller brukes i andre sammenhenger"},{ord:"home page",bokmaal:"hjemmeside",nynorsk:"heimeside",definisjon:"nettside som fungerer som forside for et nettsted"},{ord:"PDA (Personal Digital Assistent), hand-held computer, palm",bokmaal:"håndholdt datamaskin",nynorsk:"handhalden datamaskin",definisjon:"datamaskin som er liten nok til å holdes i hånden"},{ord:"Internet",bokmaal:"Internett",nynorsk:"Internett",definisjon:"verdensomspennende nettverk av elektroniske kommunikasjonsnett som er knyttet sammen av et felles sett av grunnleggende kommunikasjonsprotokoller (TCP, UDP, IP mfl.)"},{ord:"intranet",bokmaal:"intranett",nynorsk:"intranett",definisjon:"et internt datanettverk som bruker IP-teknologi til å dele informasjon, operasjonelle systemer eller datatjenester innenfor en organisasjon og til å hindre tilgang for eksterne"},{ord:"client",bokmaal:"klient",nynorsk:"klient",definisjon:"maskinvare eller programvare som bruker ei teneste på ein tenar"},{ord:"front end",bokmaal:"klientdel",nynorsk:"klientdel",definisjon:"delen av eit klient-/tenarprogram som køyrer på klienten"},{ord:"jailbreaking",bokmaal:"knekking",nynorsk:"knekking",definisjon:"prosedyre for mobiltelefoner o.l. som gir full tilgang til alle egenskaper ved operativsystemet, og som dermed fjerner begrensninger satt av produsenten"},{ord:"pinch",bokmaal:"knipe",nynorsk:"knipe",definisjon:"rørsle der ein plasserer to fingrar på ein trykkskjerm og drar dei mot kvarandre"},{ord:"Liquid crystal display",bokmaal:"LCD-skjerm",nynorsk:"LCD-skjerm",definisjon:"tynn skjerm som er samansett av eit panel med flytande krystallar som vert lyste opp av lysrøyr"},{ord:"LED display",bokmaal:"LED-skjerm",nynorsk:"LED-skjerm",definisjon:"tynn skjerm som er samansett av eit panel med flytande krystallar som vert lyste opp av lysdiodar"},{ord:"linked data",bokmaal:"lenkede data",nynorsk:"lenkja data",definisjon:"metode for å offentliggjøre, dele og knytte sammen data på vebben ved hjelp av unike URI-er"},{ord:"e-book reader, e-book device, e-reader",bokmaal:"lesebrett",nynorsk:"lesebrett",definisjon:"elektronisk eining som er utvikla primært for lesing av digitale tekster, inntil no helst bøker og tidsskrift"},{ord:"hardware",bokmaal:"maskinvare",nynorsk:"maskinvare",definisjon:"dei fysiske delane ein datamaskin eller anna teknologisk innretning består av"},{ord:"big data",bokmaal:"massedata",nynorsk:"massedata",definisjon:"data i så store mengder at tradisjonelle database- og behandlingsteknikker ikke makter å analysere dem på en formålstjenlig måte"},{ord:"netbook",bokmaal:"minibærbar datamaskin",nynorsk:"miniberbar datamaskin",definisjon:"liten berbar datamaskin som er utforma for trådlaus kommunikasjon og tilgang til Internett, og som nyttar mindre straum og har mindre prosesseringskraft enn ein vanleg berbar datamaskin"},{ord:"widget, gadget, plugin",bokmaal:"miniprogram",nynorsk:"miniprogram",definisjon:"flyttbar kode som kan installeres og kjøres på en eller flere programvareplattformer"},{ord:"crowdsourcing",bokmaal:"nettdugnad",nynorsk:"nettdugnad",definisjon:"prosess der man får nødvendige tjenester, ideer eller innhold ved å hente inn bidrag fra en stor gruppe mennesker, særlig fra nettsamfunn"},{ord:"mashup",bokmaal:"nettfletting",nynorsk:"nettfletting",definisjon:"vebbapplikasjon som sammenstiller data fra flere forskjellige kilder og presenterer disse på en felles side"},{ord:"web page",bokmaal:"nettside",nynorsk:"nettside",definisjon:"en enkelt ressurs som kan inneholde tekst, lyd, bilde, animasjon, film og annet, som har en unik adresse (URL), og som er tilgjengelig gjennom en nettleser"},{ord:"cloud computing",bokmaal:"nettsky",nynorsk:"nettsky",definisjon:"samlebetegnelse på datatjenester som ytes over Internett og som er satt opp for å kunne samvirke med andre datatjenester"},{ord:"web site",bokmaal:"nettsted",nynorsk:"nettstad",definisjon:"samling av relaterte nettsider, bilder, videoer eller andre digitale ressurser som oppfattes som en naturlig enhet"},{ord:"RSS feed, news feed",bokmaal:"nyhetsvarsling",nynorsk:"nyheitsvarsling",definisjon:"automatisk nettjeneste som overvåker forvalgte nettsider og registrerer nytt stoff som blir publisert der, og som varsler om det nye stoffet i en kortform som inneholder noen tekstrader og en tilhørende klikkbar lenke til fullversjonen av det aktuelle stoffet"},{ord:"OLED display",bokmaal:"OLED-skjerm",nynorsk:"OLED-skjerm",definisjon:"tynn skjerm som bruker organiske lysdiodar som teknologi"},{ord:"organic light emitting diode (oled)",bokmaal:"organisk lysdiode",nynorsk:"organisk lysdiode",definisjon:"lysdiode der lyskjelda er eit organisk materiale som under påverknad av elektrisk straum sender ut farga lys"},{ord:"pan",bokmaal:"panorere",nynorsk:"panorere",definisjon:"rørsle der ein drar éin finger frå side til side på ein trykkskjerm"},{ord:"plasma display, plasma screen",bokmaal:"plasmaskjerm",nynorsk:"plasmaskjerm",definisjon:"tynn skjerm der biletelementa er samansette av gassfylte celler belagde med raudt, grønt eller blått"},{ord:"native app",bokmaal:"plattformavhengig app",nynorsk:"plattformavhengig app",definisjon:"applikasjon som bare kan kjøres på den teknologiske plattformen den ble laget for"},{ord:"podcast",bokmaal:"poddkast, podkast",nynorsk:"poddkast, podkast",definisjon:"ei multimediefil som blir distribuert over Internett for avspeling på mobile einingar og datamaskiner"},{ord:"podcasting",bokmaal:"poddkasting, podkasting",nynorsk:"poddkasting, podkasting",definisjon:"distribusjon av podkaster"},{ord:"software",bokmaal:"programvare",nynorsk:"programvare",definisjon:"dei binære filene med instruksjonar som gjer det mogleg å bruke ein datamaskin eller annan elektronikk"},{ord:"software-as-a-service",bokmaal:"programvare som tjeneste",nynorsk:"programvare som teneste",definisjon:"programvare som er tilgjengeleg som ei nettbasert teneste"},{ord:"pull technology",bokmaal:"pullteknologi",nynorsk:"pullteknologi",definisjon:"teknologi for distribusjon av data og program der brukaren sjølv må ta initiativ til levering til eige datautstyr"},{ord:"push technology",bokmaal:"pushteknologi",nynorsk:"pushteknologi",definisjon:"teknologi for distribusjon av data og program der dei blir leverte automatisk til datautstyret til brukaren i sanntid eller med gitte tidsintervall"},{ord:"adware",bokmaal:"reklameprogramvare",nynorsk:"reklameprogramvare",definisjon:"programvare med innebygd reklame som gis til brukere"},{ord:"scroll",bokmaal:"rulle",nynorsk:"rulle",definisjon:"rørsle der ein beveger biletet på ein skjerm i ønskt retning med fingrar eller mus"},{ord:"malware",bokmaal:"skadevare",nynorsk:"skadevare",definisjon:"fellesbetegnelse på programvare som er laget for å ødelegge eller avbryte datasystemer, hente ut informasjon uten brukers samtykke eller få tilgang til private datasystemer"},{ord:"wearable technology, computer wearables, wearable computing",bokmaal:"smartklær",nynorsk:"smartklede",definisjon:"datautstyr i form av klesplagg som en bruker kan ha på seg"},{ord:"interactive whiteboard",bokmaal:"smarttavle",nynorsk:"smarttavle",definisjon:"tavle som kan koplast til ein datamaskin, og som fungerer som ein stor trykkskjerm"},{ord:"wearable technology, computer wearables, wearable computing",bokmaal:"smarttilbehør",nynorsk:"smarttilbehøyr",definisjon:"datautstyr som en bruker kan ha på seg, i form av tilbehør som for eksempel klokker, briller og armbånd"},{ord:"social medium",bokmaal:"sosialt medium",nynorsk:"sosialt medium",definisjon:"system på vebben som tillater kommunikasjon eller samhandling mellom to eller flere personer"},{ord:"spyware",bokmaal:"spionprogramvare",nynorsk:"spionprogramvare",definisjon:"skadevare som installeres (ofte skjult) på en datamaskin for å overvåke brukerens anvendelse av datamaskinen, uten at det foreligger informert samtykke til dette fra brukerens side"},{ord:"spread",bokmaal:"spre",nynorsk:"spreie",definisjon:"rørsle der ein plasserer to fingrar på ein trykkskjerm og drar dei frå kvarandre"},{ord:"solid state drive (SSD)",bokmaal:"SSD-disk",nynorsk:"SSD-disk",definisjon:"datalagringsenhet som bruker integrerte kretskort som minne til varig lagring av data"},{ord:"start page",bokmaal:"startside",nynorsk:"startside",definisjon:"nettsiden som vises straks en nettleser åpnes"},{ord:"streaming",bokmaal:"strømming",nynorsk:"strøyming",definisjon:"overføring av lyd eller video over Internett hvor avspillingen foregår samtidig med nedlastingen uten at mottakeren trenger å vente til hele datamengden er overført"},{ord:"pullprint",bokmaal:"styrt utskrift",nynorsk:"styrt utskrift",definisjon:"skrivarfunksjon der utskriftsjobben til ein brukar blir værande på skrivaren til brukaren frigir den med kode, kort e.l."},{ord:"tap",bokmaal:"tappe",nynorsk:"tappe",definisjon:"rørsle der éin finger blir pressa lett mot ein trykkskjerm og så blir sloppe raskt opp"},{ord:"tablet-PC",bokmaal:"tavle-pc",nynorsk:"tavle-pc",definisjon:"bærbar datamaskin som betjenes med trykkskjerm eller stylus"},{ord:"server",bokmaal:"tjener",nynorsk:"tenar",definisjon:"funksjonsenhet som sørger for tjenester til arbeidsstasjoner i et datanett"},{ord:"back end",bokmaal:"tjenerdel",nynorsk:"tenardel",definisjon:"delen av eit klient-/tenarprogram som køyrer på tenaren"},{ord:"touch screen",bokmaal:"trykkskjerm",nynorsk:"trykkskjerm",definisjon:"skjerm som reagerer på berøring, og som fungerer som både styreeining og visningseining"},{ord:"tweet (verb)",bokmaal:"tvitre",nynorsk:"tvitre",definisjon:"sende ei twittermelding"},{ord:"tweet (substantiv)",bokmaal:"twittermelding",nynorsk:"twittermelding",definisjon:"melding skriven på nettenesta Twitter"},{ord:"subnotebook",bokmaal:"ultrabærbar datamaskin",nynorsk:"ultraberbar datamaskin",definisjon:"svært liten bærbar datamaskin med få porter eller avtakbar diskstasjon"},{ord:"host (substantiv)",bokmaal:"vert",nynorsk:"vert",definisjon:"datamaskin som er koblet til et nettverk, og som gir et tilgangspunkt til nettverket"},{ord:"viral",bokmaal:"viral",nynorsk:"viral",definisjon:"som er veldig populær og som spreier seg raskt, særleg på Internett"},{ord:"World Wide Web",bokmaal:"weben, vebben",nynorsk:"weben, vebben",definisjon:"verdensomspennende informasjonsnett bygget på Internett som består av nettsider som bruker versjoner av html for å uttrykke og lenke sammen informasjon"},{ord:"web host",bokmaal:"webhotell, vebbhotell",nynorsk:"webhotell, vebbhotell",definisjon:"tjeneste hvor tjenestetilbyderen lagrer data (og ev. programvare) på kundens vegne og gjør dette tilgjengelig på Internett"},{ord:"open access",bokmaal:"åpen tilgang",nynorsk:"open tilgang",definisjon:"ubegrenset nettilgang til artikler som er publisert i vitenskapelige tidsskrifte"}],ux=e=>e===""?[]:dW.filter(t=>e.toLowerCase().match("\\b"+t.kanselliord.toLowerCase()+"\\b"));function vW({value:e}){const t=ux(e);return t.length===0?null:x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:t.length==1?x.jsx(x.Fragment,{children:"1 ord som kan byttes ut"}):x.jsxs(x.Fragment,{children:[t.length," ord som kan byttes ut"]})}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Velg enkle ord"}),x.jsx("div",{children:"Ord og uttrykk som er utdaterte eller sier noe på en vanskeligere måte enn nødvendig:"}),t.length>=1&&x.jsx(ee,{children:t.map(r=>x.jsx(x.Fragment,{children:x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:x.jsxs("span",{children:['"',r.kanselliord,'"']})}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Forslag"}),"Skriv heller: ",r.alternativ_1,x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Kilde"}),x.jsxs(ct,{target:"_blank",href:"https://www.sprakradet.no/klarsprak/om-skriving/kansellisten/",children:["Kansellisten",x.jsx(Kn,{})]})]})]},"{kansellisten.id}")}))})]})]})}const cx=e=>e===""?[]:cW.filter(t=>e.toLowerCase().match("\\b"+t.ord.toLowerCase()+"\\b"));function mW({value:e}){const t=cx(e);return t.length===0?null:x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:t.length==1?x.jsx(x.Fragment,{children:"1 mulig støtende ord"}):x.jsxs(x.Fragment,{children:[t.length," mulige støtende ord"]})}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Vær varsom"}),"Ord i teksten som kan være støtende, eller som bør brukes med varsomhet:",x.jsx(ee,{children:t.map(r=>x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:x.jsxs("span",{children:['"',r.ord,'"']})}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Forklaring"}),x.jsx("p",{children:r.bokmaal}),x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Kilde"}),x.jsxs(ct,{target:"_blank",href:r.lenke,children:[r.kilde,x.jsx(Kn,{})]})]})]},r.id))})]})]})}const dx=e=>{if(e==="")return{avloeserordMatches:[],datatermerMatches:[]};const t=fW.filter(n=>e.toLowerCase().match("\\b"+n.importord.toLowerCase()+"\\b")),r=pW.filter(n=>e.toLowerCase().match("\\b"+n.ord.toLowerCase()+"\\b"));return{avloeserordMatches:t,datatermerMatches:r}};function gW({value:e}){const{avloeserordMatches:t,datatermerMatches:r}=dx(e);return t.length===0&&r.length===0?null:x.jsx(x.Fragment,{children:x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:t.length+r.length==1?x.jsx(x.Fragment,{children:"1 mulig avløserord"}):x.jsx(x.Fragment,{children:`${t.length+r.length} mulige avløserord`})}),x.jsxs(ee.Content,{children:["Norske ord som kan brukes i stedet for de tilsvarende engelske:",t.length>0&&x.jsx(ee,{children:t.map(n=>x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:x.jsxs("span",{children:['"',n.importord,'"']})}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Avløserord"}),x.jsx("p",{children:n.avloeserord}),x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Kilde"}),x.jsxs(ct,{target:"_blank",href:"https://www.sprakradet.no/sprakhjelp/Skriverad/Avloeysarord/",children:["På godt norsk – avløserord",x.jsx(Kn,{})]})]})]},`ordliste-${n.importord}`))}),r.length>0&&x.jsx(ee,{children:r.map(n=>x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:x.jsxs("span",{children:['"',n.ord,'"']})}),x.jsxs(ee.Content,{children:[x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Avløserord"}),x.jsx("p",{children:n.bokmaal}),x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Definisjon/forklaring"}),x.jsx("p",{children:n.definisjon}),x.jsx(oe,{spacing:!0,level:"4",size:"xsmall",children:"Kilde"}),x.jsxs(ct,{target:"_blank",href:"https://www.sprakradet.no/sprakhjelp/Skriverad/Ordlister/Datatermar/",children:["Språkrådets datatermer ",x.jsx(Kn,{})]})]})]},`dataterm-${n.ord}`))})]})]})})}const fx=e=>{var t;return((t=e.replaceAll("Kontakt","").replaceAll(/\d+(?: \d+)/g,"").toLowerCase().match(/\b( men)\b/g))==null?void 0:t.length)??0};function hW({value:e}){const t=fx(e);return x.jsx(x.Fragment,{children:t!=0&&x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:t==1?x.jsx(x.Fragment,{children:"1 tilfelle av manglende komma"}):x.jsxs(x.Fragment,{children:[t," tilfeller av manglende komma"]})}),x.jsxs(ee.Content,{className:"",children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:'Alltid komma foran "men"'}),"Det er ",t==1?x.jsx(x.Fragment,{children:"ett tilfelle"}):x.jsxs(x.Fragment,{children:[t," tilfeller"]}),' i teksten der det mangler komma foran "men".']})]})})}const px=e=>{const t=e.replaceAll("Kopier lenke",""),r=o=>o.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi)??[],n=o=>o.match(/(\s*[0-9]+){8,11}/gi)??[],i=o=>{var a;return((a=o.match(/([A-Z][a-z][a-z]*(?: [A-Z][a-z][a-z]*){1,2})/g))==null?void 0:a.filter((s,u)=>o.indexOf(s)===u))??[]};return{emails:r(t),phonenumbers:n(t),names:i(t)}};function yW({value:e}){const{emails:t,names:r,phonenumbers:n}=px(e);return t.length===0&&r.length===0&&n.length===0?null:x.jsxs(ee.Item,{children:[x.jsxs(ee.Header,{children:[t.length+n.length+r.length," ",t.length+n.length+r.length===1?x.jsx(x.Fragment,{children:" mulig personopplysning"}):x.jsx(x.Fragment,{children:"mulige personopplysninger"})]}),x.jsxs(ee.Content,{children:[t.length>=1&&x.jsxs(x.Fragment,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"E-postadresser"}),x.jsx("ul",{children:t.map((i,o)=>x.jsxs("li",{children:['"',i,'"']},o))})]}),n.length>=1&&x.jsxs(x.Fragment,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Telefonnummer"}),x.jsx("ul",{children:n.map((i,o)=>x.jsxs("li",{children:['"',i,'"']},o))})]}),r.length>=1&&x.jsxs(x.Fragment,{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Navn"}),x.jsx("ul",{children:r.map((i,o)=>x.jsxs("li",{children:['"',i,'"']},o))})]})]})]})}const vx=e=>{const t="!;.*?",r=e.split(/\s+/),n=e.split("").reduce((o,a)=>t.includes(a)?o+1:o,0),i=r.reduce((o,a)=>a.length>=7?o+1:o,0);return n===0?void 0:Math.round(r.length/n+i*100/r.length)},kW=e=>e<=33?"Enkel å lese":e>33&&e<44?"Middels å lese":"Vanskelig å lese";function bW({value:e}){const t=vx(e);if(!t)return x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:"Liks: For lite tekst"}),x.jsx(ee.Content,{children:"Sett inn minst én setning for å få opp resultater."})]});const r=kW(t);return x.jsxs(ee.Item,{children:[x.jsxs(ee.Header,{children:["Liks: ",t,". ",r]}),x.jsxs(ee.Content,{children:[x.jsxs(ce,{style:{textTransform:"initial"},children:["Liks: ",t,". Teksten er ",x.jsx("span",{style:{textTransform:"lowercase"},children:r})," ifølge"," ",x.jsxs(ct,{target:"_blank",href:"https://no.wikipedia.org/wiki/Lesbarhetsindeks",children:["lesbarhetsindeksen",x.jsx(Kn,{})]}),"."]}),x.jsxs("div",{children:[x.jsx(oe,{spacing:!0,level:"3",size:"xsmall",children:"Skriveråd"}),x.jsxs("ul",{children:[x.jsx("li",{children:"Skriv korte og enkle setninger"}),x.jsx("li",{children:"Velg korte og enkle ord"}),x.jsx("li",{children:"Skriv det viktigste først"})]})]})]})]})}const mx=e=>{var t;const r=e.split(/\s+/).length,n=e.split(`
+
+`).reduce((u,c)=>c.replace(/\s+/gi,"").length>1?u+1:u,0),i="!.?",o=e.split("").reduce((u,c)=>i.includes(c)?u+1:u,0),a=e.length,s=a-(((t=e.match(/\s/g))==null?void 0:t.length)??0);return{totalWords:r,totalSentences:o,totalParagraphs:n,totalCharacters:a,totalCharactersWithoutSpaces:s}};function _W({value:e}){const{totalWords:t,totalParagraphs:r,totalSentences:n,totalCharacters:i,totalCharactersWithoutSpaces:o}=mx(e);return x.jsxs(ee.Item,{children:[x.jsxs(ee.Header,{children:["Ordtelling: ",t," ord"]}),x.jsx(ee.Content,{children:x.jsxs("ul",{children:[x.jsxs("li",{children:["Ord: ",t]}),x.jsxs("li",{children:["Setninger: ",n]}),x.jsxs("li",{children:["Avsnitt: ",r]}),x.jsxs("li",{children:["Tegn: ",i," ",i!=o&&x.jsxs(x.Fragment,{children:["(",o," uten mellomrom)"]})]})]})})]})}const gx=e=>e.replaceAll(/\<\/(.?)\>/g,"").replaceAll(/\<(.?)\>/g,"").replaceAll(/\s+/g," ").replace(/[^\w\sÆØÅæøå\/\\é-]/g,"").toLowerCase().split(/\s+/).map(t=>t.replace(/[.,:?()!"]+/g,"")).reduce((t,r)=>r===""?t:{...t,[r]:(t[r]??0)+1},{});function wW(e){const t=gx(e.value);if(Object.keys(t).length===0)return null;const[r,n]=v.useState(1),i=10,o=r*10,a=o-10,s=Object.entries(t).sort((c,d)=>d[1]-c[1]).slice(a,o),u=Math.ceil(Object.keys(t).length/i);return x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:"Frekvensordliste"}),x.jsxs(ee.Content,{children:[x.jsx("div",{children:x.jsxs(St,{zebraStripes:!0,size:"small",children:[x.jsx(St.Header,{children:x.jsxs(St.Row,{children:[x.jsx(St.HeaderCell,{scope:"col",children:"Ord"}),x.jsx(St.HeaderCell,{scope:"col",children:"Frekvens"})]})}),x.jsx(St.Body,{children:s.map(c=>x.jsxs(St.Row,{children:[x.jsx(St.HeaderCell,{scope:"row",children:c[0]}),x.jsx(St.DataCell,{children:c[1]})]},c[0]))})]})}),u>1&&x.jsx("div",{children:x.jsx(Lu,{page:r,onPageChange:n,count:u,size:"small",siblingCount:0,boundaryCount:1})})]})]})}function xW({value:e}){return x.jsxs(ee.Item,{children:[x.jsx(ee.Header,{children:"Liks og ordtelling"}),x.jsx(ee.Content,{children:x.jsxs(ee,{children:[x.jsx(bW,{value:e}),x.jsx(_W,{value:e}),x.jsx(wW,{value:e})]})})]})}const hx=({value:e,open:t,options:r={}})=>{const{longParagraphs:n=!0,longSentences:i=!0,longWords:o=!0,duplicateWords:a=!0,kansellistenDictionary:s=!0,nrkDictionary:u=!0,avloeserordDictionary:c=!0,commaCheck:d=!0,personalData:f=!0,tools:p=!0}=r;return!e||!t?null:x.jsxs(ee,{children:[n&&x.jsx(aW,{value:e}),i&&x.jsx(sW,{value:e}),o&&x.jsx(lW,{value:e}),a&&x.jsx(uW,{value:e}),s&&x.jsx(vW,{value:e}),u&&x.jsx(mW,{value:e}),c&&x.jsx(gW,{value:e}),d&&x.jsx(hW,{value:e}),f&&x.jsx(yW,{value:e}),p&&x.jsx(xW,{value:e})]})},Gp=e=>({longParagraphs:ox(e),longSentences:ax(e),longWords:sx(e),duplicateWords:lx(e),kansellisten:ux(e),nrkOrd:cx(e),avloeserord:dx(e),comma:fx(e),personalData:px(e),tools:{lix:vx(e),wordCount:mx(e),wordFrequency:gx(e)}}),SW=e=>e.data.feature,jW=e=>SW(e).data,yx=e=>t=>jW(t)[e],kx=()=>{const e=C(nW);return e?`
+Hilsen ${e}`:""},TW=q.object({tittel:q.string().min(1,"Du må fylle ut tema for samtalen").max(100,"Du må korte ned teksten til 100 tegn"),fraDato:q.date({required_error:"Fra dato må fylles ut",invalid_type_error:"Ikke en gyldig dato"}),kanal:q.nativeEnum(Fr),referat:q.string().min(1,"Du må fylle ut samtalereferat").max(5e3,"Du må korte ned teksten til 5000 tegn")}),OW=e=>{const{onSubmit:t,dirtyRef:r,aktivitet:n}=e,[i,o]=v.useState(!1),a=C(yx(lv)),s=kx(),u=!n,c={tittel:(n==null?void 0:n.tittel)||"",fraDato:jr(n==null?void 0:n.fraDato),kanal:(n==null?void 0:n.kanal)||Fr.TELEFON,referat:(n==null?void 0:n.referat)||s},d=Et({defaultValues:c,resolver:Dt(TW),shouldFocusError:!1}),{register:f,handleSubmit:p,watch:m,formState:{errors:g,isSubmitting:h,isDirty:b}}=d;r&&(r.current=b);const _=m("referat"),y=S=>p(O=>t({...O,status:pe.GJENNOMFOERT,avtalt:!1,erReferatPublisert:S}).then(()=>{const I=Gp(O.referat);pp(I,S,i,a?"B":"A")}));return l.jsx("form",{autoComplete:"off",noValidate:!0,children:l.jsxs(Jn,{...d,children:[l.jsxs("div",{className:"space-y-8",children:[l.jsx(Ii,{tittel:"Samtalereferat",aktivitetstype:fe.SAMTALEREFERAT_TYPE}),l.jsx(nt,{label:"Tema for samtalen (obligatorisk)",id:"tittel",...f("tittel"),error:g.tittel&&g.tittel.message}),l.jsx(ia,{field:{name:"fraDato",required:!0,defaultValue:jr(n==null?void 0:n.fraDato)}}),l.jsxs(Nn,{label:"Møteform (obligatorisk)",...f("kanal"),children:[l.jsx("option",{value:Fr.OPPMOTE,children:"Oppmøte"}),l.jsx("option",{value:Fr.TELEFON,children:"Telefonmøte"}),l.jsx("option",{value:Fr.INTERNET,children:"Videomøte"})]}),u&&l.jsxs(l.Fragment,{children:[l.jsx(Vt,{label:"Samtalereferat (obligatorisk)",maxLength:5e3,...f("referat"),error:g.referat&&g.referat.message,value:_}),a&&l.jsxs(l.Fragment,{children:[l.jsx(Rb,{checked:i,onChange:()=>{o(!i),pb(!i)},children:"Klarspråkhjelpen"}),l.jsx(hx,{value:_,open:i,options:{tools:!1}})]})]}),l.jsx(Xr,{errors:g})]}),l.jsx(EW,{isLoading:h,isNy:u,lagreOgDel:y})]})})},EW=e=>{const{isLoading:t,isNy:r,lagreOgDel:n}=e;return r?l.jsxs("div",{className:"mt-4",children:[l.jsx(Ne,{loading:t,className:"mr-4",onClick:n(!0),children:"Del med bruker"}),l.jsx(Ne,{variant:"secondary",loading:t,onClick:n(!1),children:"Lagre utkast"})]}):l.jsx(Ne,{className:"mt-4",loading:t,onClick:n(!1),children:"Lagre"})},bx=e=>{const t=C(iW),[r,n]=v.useState(!1);return v.useEffect(()=>{const i=setTimeout(()=>{t===te.PENDING&&n(!0)},400);return clearTimeout(i)},[]),t===te.PENDING&&!r?null:l.jsx(OW,{...e})},_x={required_error:"Antall stillinger må fylles ut",invalid_type_error:"Antall stillinger må fylles ut"},wx={tittel:q.string(),fraDato:q.date({required_error:"Fra dato må fylles ut"}),tilDato:q.date({required_error:"Til dato må fylles ut"}),avtaleOppfolging:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),beskrivelse:q.string().max(5e3,"Du må korte ned teksten til 5000 tegn").optional()},DW=q.object({...wx,skjemaVersjon:q.literal("gammel"),antallStillingerSokes:q.number(_x).lt(100,"Antall søknader må ikke være høyere enn 99")}),IW=q.object({...wx,skjemaVersjon:q.literal("ny"),antallStillingerIUken:q.number(_x).lt(100,"Antall søknader må ikke være høyere enn 99")}),RW=q.discriminatedUnion("skjemaVersjon",[DW,IW]),NW=e=>{const t=e?!!e.antallStillingerIUken:!0,r={tittel:(e==null?void 0:e.tittel)||"Avtale om å søke jobber",fraDato:e!=null&&e.fraDato?new Date(e.fraDato):void 0,tilDato:e!=null&&e.tilDato?new Date(e.tilDato):void 0,avtaleOppfolging:(e==null?void 0:e.avtaleOppfolging)||"",beskrivelse:(e==null?void 0:e.beskrivelse)||""};return t?{skjemaVersjon:"ny",...r,antallStillingerIUken:(e==null?void 0:e.antallStillingerIUken)??void 0}:{skjemaVersjon:"gammel",...r,antallStillingerSokes:(e==null?void 0:e.antallStillingerSokes)??void 0}},xx=e=>{const{aktivitet:t,dirtyRef:r,onSubmit:n}=e,i=Ue(),o=t?!!t.antallStillingerIUken:!0,a=NW(t),s=(t==null?void 0:t.avtalt)||!1,[u,c]=v.useState({from:a.fraDato,to:a==null?void 0:a.tilDato}),d=Et({defaultValues:a,resolver:Dt(RW),shouldFocusError:!1}),{register:f,handleSubmit:p,watch:m,setValue:g,reset:h,formState:{errors:b,isDirty:_,isSubmitting:y}}=d;r&&(r.current=_);const S=o?{errors:b,skjemaVersjon:"ny"}:{errors:b,skjemaVersjon:"gammel"},O=m("beskrivelse"),I=m("avtaleOppfolging"),T=V=>{V?(Object.entries(V).forEach(([K,Y])=>{["fraDato","tilDato"].includes(K)?g(K,new Date(Y)):g(K,Y)}),c({from:new Date(V.fraDato),to:new Date(V.tilDato)})):(c(void 0),h())};return l.jsx("form",{autoComplete:"off",noValidate:!0,onSubmit:p(V=>n(V)),children:l.jsx(Jn,{...d,children:l.jsxs("div",{className:"space-y-8",children:[l.jsx(Ii,{tittel:"Avtale om å søke jobber",aktivitetstype:fe.SOKEAVTALE_AKTIVITET_TYPE}),l.jsx(ex,{visible:i,endre:!!t,onChange:T,type:"SOKEAVTALE"}),l.jsx("div",{className:"dato-container",children:l.jsx($a,{aktivitet:t,from:{name:"fraDato",required:!0,defaultValue:u==null?void 0:u.from},to:{name:"tilDato",required:!0,defaultValue:u==null?void 0:u.to}})}),S.skjemaVersjon==="ny"?l.jsx(nt,{disabled:s,type:"number",label:"Antall søknader i uken (obligatorisk)",id:"antallStillingerIUken",...f("antallStillingerIUken",{valueAsNumber:!0}),error:S.errors.antallStillingerIUken&&S.errors.antallStillingerIUken.message}):l.jsx(nt,{disabled:s,type:"number",label:"Antall søknader i perioden (obligatorisk)",id:"antallStillingerSokes",...f("antallStillingerSokes",{valueAsNumber:!0}),error:S.errors.antallStillingerSokes&&S.errors.antallStillingerSokes.message}),l.jsx(Vt,{disabled:s,label:"Oppfølging fra NAV (valgfri)",maxLength:255,...f("avtaleOppfolging"),error:S.errors.avtaleOppfolging&&S.errors.avtaleOppfolging.message,value:I}),l.jsx(Vt,{disabled:s,label:"Beskrivelse (valgfri)",maxLength:5e3,...f("beskrivelse"),error:S.errors.beskrivelse&&S.errors.beskrivelse.message,value:O}),l.jsx(Xr,{errors:S.errors}),l.jsx(go,{loading:y})]})})})},PW=q.object({tittel:q.string().min(1,"Du må fylle ut stillingstittel").max(100,"Du må korte ned teksten til 100 tegn"),fraDato:q.date({required_error:"Fra dato må fylles ut"}),tilDato:q.date().optional(),arbeidsgiver:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),kontaktperson:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),arbeidssted:q.string().max(255,"Du må korte ned teksten til 255 tegn").optional(),beskrivelse:q.string().max(5e3,"Du må korte ned teksten til 5000 tegn").optional(),lenke:q.string().max(2e3,"Du må korte ned lenken til 2000 tegn").optional()}),Sx=e=>{const{onSubmit:t,dirtyRef:r,aktivitet:n}=e,i={tittel:(n==null?void 0:n.tittel)||"",fraDato:jr(n==null?void 0:n.fraDato)??zt(new Date),tilDato:jr(n==null?void 0:n.tilDato),beskrivelse:(n==null?void 0:n.beskrivelse)||"",arbeidssted:(n==null?void 0:n.arbeidssted)||"",arbeidsgiver:(n==null?void 0:n.arbeidsgiver)||"",kontaktperson:(n==null?void 0:n.kontaktperson)||"",lenke:(n==null?void 0:n.lenke)||""},o=(n==null?void 0:n.avtalt)||!1,a=Et({defaultValues:i,resolver:Dt(PW),shouldFocusError:!1}),{register:s,handleSubmit:u,watch:c,formState:{errors:d,isDirty:f,isSubmitting:p}}=a;r&&(r.current=f);const m=c("beskrivelse");return l.jsx("form",{autoComplete:"off",noValidate:!0,onSubmit:u(g=>t(g)),children:l.jsx(Jn,{...a,children:l.jsxs("div",{className:"space-y-8",children:[l.jsx(Ii,{tittel:"En jobb jeg vil søke på",aktivitetstype:fe.STILLING_AKTIVITET_TYPE}),l.jsx(nt,{disabled:o,label:"Stillingstittel (obligatorisk)",id:"tittel",...s("tittel"),error:d.tittel&&d.tittel.message}),l.jsx($a,{aktivitet:n,from:{name:"fraDato",required:!0,defaultValue:i.fraDato},to:{name:"tilDato",required:!0,label:"Frist (valgfri)"}}),l.jsx(nt,{disabled:o,label:"Arbeidsgiver (valgfri)",id:"arbeidsgiver",...s("arbeidsgiver"),error:d.arbeidsgiver&&d.arbeidsgiver.message}),l.jsx(nt,{disabled:o,label:"Kontaktperson hos arbeidsgiver (valgfri)",id:"kontaktperson",...s("kontaktperson"),error:d.kontaktperson&&d.kontaktperson.message}),l.jsx(nt,{disabled:o,label:"Arbeidssted (valgfri)",id:"arbeidssted",...s("arbeidssted"),error:d.arbeidssted&&d.arbeidssted.message}),l.jsx(Vt,{disabled:o,label:"Kort beskrivelse av stillingen (valgfri)",maxLength:5e3,...s("beskrivelse"),error:d.beskrivelse&&d.beskrivelse.message,value:m}),l.jsx(nt,{disabled:o,label:"Lenke til stillingsannonse (valgfri)",id:"lenke",...s("lenke"),error:d.lenke&&d.lenke.message}),l.jsx(Xr,{errors:d}),l.jsx(go,{loading:p})]})})})},AW=()=>{const e=_t(),t=Le(),{aktivitetRoute:r,hovedsideRoute:n,nyAktivitetRoute:i}=Ot(),o=C(j7),a=C(Ut),s=v.useRef(!1);qw(s);const u=p=>m=>{const g=Yw(m),h={status:pe.PLANLAGT,type:p,...g};return t(bc(h)).then(b=>{Si(b)&&e(r(b.payload.id))})};function c(){(!s.current||window.confirm(_i))&&e(n())}const d=p=>{p.preventDefault(),(!s.current||window.confirm(_i))&&e(i())},f=l.jsx(Ea,{tilbakeTekst:"Tilbake til kategorier",onTilbakeClick:d});return a?l.jsxs(Xn,{header:f,onRequestClose:c,contentLabel:"Ny aktivitetstype",children:[l.jsx("article",{children:l.jsxs(e3,{children:[l.jsx(ot,{path:"mote",element:l.jsx(rx,{onSubmit:u(fe.MOTE_TYPE),dirtyRef:s})}),l.jsx(ot,{path:"samtalereferat",element:l.jsx(bx,{onSubmit:u(fe.SAMTALEREFERAT_TYPE),dirtyRef:s})}),l.jsx(ot,{path:"stilling",element:l.jsx(Sx,{onSubmit:u(fe.STILLING_AKTIVITET_TYPE),dirtyRef:s})}),l.jsx(ot,{path:"sokeavtale",element:l.jsx(xx,{onSubmit:u(fe.SOKEAVTALE_AKTIVITET_TYPE),dirtyRef:s})}),l.jsx(ot,{path:"behandling",element:l.jsx(Xw,{onSubmit:u(fe.BEHANDLING_AKTIVITET_TYPE),dirtyRef:s})}),l.jsx(ot,{path:"egen",element:l.jsx(tx,{onSubmit:u(fe.EGEN_AKTIVITET_TYPE),dirtyRef:s})}),l.jsx(ot,{path:"ijobb",element:l.jsx(Zw,{onSubmit:u(fe.IJOBB_AKTIVITET_TYPE),dirtyRef:s})})]})}),l.jsx(ur,{feilmeldinger:o})]}):null};function CW(e,t){if(!e)return null;switch(e.type){case io:return l.jsx(Sx,{...t});case Su:return l.jsx(tx,{...t});case tv:return l.jsx(xx,{...t});case aa:return l.jsx(Xw,{...t});case Yt:return l.jsx(rx,{...t});case ar:return l.jsx(bx,{...t});case Tu:return l.jsx(Zw,{...t});default:return null}}function MW(){const e=Le(),t=y=>e(hc(y)),r=v.useRef(!1);qw(r);const n=_t(),{id:i}=Bu(),o=C(y=>i?Cc(y,i):void 0),a=[o?te.OK:te.PENDING],s=C(Tm),c=[...C(z9),...s],d=C(y=>Zr(y))!==te.OK,{aktivitetRoute:f}=Ot();function p(y){if(!o)return Promise.resolve();const S=Yw(y),O={...o,...S};return t(O).then(I=>{Si(I)&&n(f(o.id))})}const m=()=>{(!r.current||window.confirm(_i))&&n("/")},g=y=>{y.preventDefault(),(!r.current||window.confirm(_i))&&n(-1)},h=l.jsx(Ea,{tilbakeTekst:"Tilbake",onTilbakeClick:g}),b={onSubmit:p,endre:!0,dirtyRef:r,lagrer:d},_=o&&sa(o)?CW(o,{...b,aktivitet:o}):null;return l.jsxs(Xn,{header:h,onRequestClose:m,contentLabel:"Endre aktivitet",children:[l.jsx("article",{children:l.jsx(Wt,{avhengigheter:a,children:l.jsx(l1,{children:_})})}),l.jsx(ur,{feilmeldinger:c})]})}const Jr=k.createContext({isDirty:!1,setFormIsDirty:(e,t)=>{}});function LW(e){return Object.values(e).some(t=>t===!0)}function jx(e){const[t,r]=v.useState(!1),[,n]=v.useState({}),i=v.useCallback((a,s)=>{n(u=>{const c={...u,[a]:s};return r(LW(c)),c})},[n,r]),o=v.useMemo(()=>({isDirty:t,setFormIsDirty:i}),[t,i]);return l.jsx(Jr.Provider,{value:o,children:e.children})}jx.propTypes={children:F.object.isRequired};const qm=e=>{const{tittel:t,content:r,subtittel:n,open:i,onClick:o,icon:a}=e;return l.jsx(l.Fragment,{children:l.jsxs(ee.Item,{open:i,className:"first:border-t-2 first:border-border-divider",children:[l.jsx(ee.Header,{onClick:o,className:"items-center",children:l.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[a,l.jsxs("div",{children:[l.jsx(oe,{size:"small",level:"2",children:t}),l.jsx("div",{children:n})]})]})}),l.jsx(ee.Content,{children:r})]})})},$W=q.object({etikettstatus:q.nativeEnum(uv)}),VW={INGEN_VALGT:"Ikke startet",SOKNAD_SENDT:"Sendt søknad og venter på svar",INNKALT_TIL_INTERVJU:"Skal på intervju",JOBBTILBUD:"Fått jobbtilbud",AVSLAG:"Ikke fått jobben"},FW=e=>{const{aktivitet:t,disabled:r,onSubmit:n}=e,i={etikettstatus:t.etikett||uv.INGEN_VALGT},{handleSubmit:o,setValue:a,formState:{isDirty:s,isSubmitting:u}}=Et({defaultValues:i,resolver:Dt($W),shouldFocusError:!0}),{setFormIsDirty:c}=v.useContext(Jr);v.useEffect(()=>{c("etikett",s)},[c,s]);const d=u||r,f=p=>{a("etikettstatus",p)};return l.jsxs("form",{onSubmit:o(p=>n(p)),children:[l.jsx("div",{className:"mb-4",children:l.jsx(oo,{legend:"Hvor langt har du kommet i søknadsprosessen?",hideLegend:!0,defaultValue:i.etikettstatus,onChange:f,disabled:d,children:Object.entries(VW).map(([p,m])=>l.jsx(_r,{value:p,children:m},p))})}),l.jsx(ur,{feilmeldinger:C(O7)}),l.jsx(Ne,{className:"oppdater-status",disabled:d,loading:u,children:"Lagre"})]})},HW=e=>{const{aktivitet:t}=e,r=Ue(),n=C(jm,Se),i=!Z9(t,r),o=!C(Ut),[a,s]=v.useState(!1),u=Le(),c=async g=>{const{etikettstatus:h}=g;if(h===t.etikett){s(!1);return}const b=h===uv.INGEN_VALGT?void 0:h;return u(co({...t,etikett:b})).then(_=>{var y;gc(_)||(s(!1),(y=document.querySelector(".aktivitet-modal"))==null||y.focus())})},d=g=>(p("etikett",!1),c(g)),f=n||i||o,{setFormIsDirty:p}=v.useContext(Jr),m=l.jsx(FW,{disabled:f,aktivitet:t,onSubmit:d});return l.jsx(qm,{icon:l.jsx(VF,{fontSize:"1.5rem"}),onClick:()=>{a&&p("etikett",!1),s(!a)},open:a,tittel:"Hvor langt har du kommet i søknadsprosessen?",subtittel:l.jsx(Lm,{aktivitet:t}),content:m})},UW={VENTER:"Venter på å bli kontaktet av NAV eller arbeidsgiver",SKAL_PAA_INTERVJU:"Skal på intervju",JOBBTILBUD:"Fått jobbtilbud",AVSLAG:"Ikke fått jobben"},BW=q.object({soknadsstatus:q.enum([Vr.VENTER,Vr.SKAL_PAA_INTERVJU,Vr.JOBBTILBUD,Vr.AVSLAG])}),KW=e=>{const{soknadsstatus:t,disabled:r,onSubmit:n}=e,i={soknadsstatus:t||Vr.VENTER},{handleSubmit:o,setValue:a,formState:{isDirty:s,isSubmitting:u}}=Et({defaultValues:i,resolver:Dt(BW),shouldFocusError:!0}),{setFormIsDirty:c}=v.useContext(Jr);v.useEffect(()=>(c("soknadsstatus",s),()=>{c("soknadsstatus",!1)}),[c,s]);const d=u||r,f=p=>{a("soknadsstatus",p)};return l.jsxs("form",{onSubmit:o(p=>n(p)),children:[l.jsx("div",{className:"pb-4",children:l.jsx(oo,{legend:"",defaultValue:i.soknadsstatus,onChange:f,disabled:d,children:Object.entries(UW).map(([p,m])=>l.jsx(_r,{value:p,children:m},p))})}),l.jsx(ur,{feilmeldinger:C(E7)}),l.jsx(Ne,{className:"oppdater-status",disabled:d,loading:u,children:"Lagre"})]})},WW=e=>{const{historisk:t}=e,r=C(jm),n=C(Ut),i=!t&&e.status!==pe.FULLFOERT&&e.status!==pe.AVBRUTT;return r||!n||!i},zW=(e,t,r)=>{var i;const{soknadsstatus:n}=t;return n===((i=r.stillingFraNavData)==null?void 0:i.soknadsstatus)?Promise.resolve():e(po({aktivitetId:r.id,aktivitetVersjon:r.versjon,soknadsstatus:n}))},qW=({stillingFraNavData:e})=>{const{soknadsstatus:t,detaljer:r}=e;return t?t===Vr.IKKE_FATT_JOBBEN&&r==="KANDIDATLISTE_LUKKET_NOEN_ANDRE_FIKK_JOBBEN"?"Vi har fått beskjed om at arbeidsgiver har ansatt en person. Dessverre var det ikke deg denne gangen. Ansettelsesprosessen er ferdig.":t===Vr.IKKE_FATT_JOBBEN&&r==="KANDIDATLISTE_LUKKET_INGEN_FIKK_JOBBEN"?"Vi har fått beskjed om at arbeidsgiveren ikke skal ansatte en person allikevel. Vi beklager at det ikke ble en jobbmulighet denne gangen. Lykke til videre med jobbsøkingen.":t===Vr.FATT_JOBBEN?"Ansettelsesprosessen er ferdig.":null:null},YW=e=>{var d;const{aktivitet:t}=e,r=Le(),[n,i]=v.useState(!1),o=WW(t),a=qW(t),{setFormIsDirty:s}=v.useContext(Jr),u=f=>(s("soknadsstatus",!1),zW(r,f,t).then(()=>{var p;i(!1),(p=document.querySelector(".aktivitet-modal"))==null||p.focus()})),c=l.jsxs(l.Fragment,{children:[a?l.jsx(Ge,{variant:"info",className:"mt-4",children:a}):null,l.jsx(KW,{disabled:o,soknadsstatus:t.stillingFraNavData.soknadsstatus,onSubmit:u})]});return l.jsx(qm,{icon:l.jsx(m9,{fontSize:"1.5rem"}),onClick:()=>{n&&s("soknadsstatus",!1),i(!n)},open:n,tittel:"Hvor er du i søknadsprosessen?",subtittel:l.jsx(Q1,{soknadsstatus:(d=t.stillingFraNavData)==null?void 0:d.soknadsstatus}),content:c})},GW=(e,t)=>{const r=[pe.FULLFOERT,pe.AVBRUTT].includes(t);if(Ek(e)&&r&&Y1(e,t))return"Samtalereferatet må deles før du kan sette aktiviteten til denne statusen"},ZW=e=>e===pe.FULLFOERT?"Skriv en kort kommentar om hvordan det har gått med aktiviteten, eller noe NAV bør kjenne til.":"Skriv en kort begrunnelse om hvorfor du avbryter aktiviteten.",XW={BRUKER_ER_INTERESSERT:"Forslag",PLANLAGT:"Planlegger",GJENNOMFORES:"Gjennomfører",FULLFORT:"Fullført",AVBRUTT:"Avbrutt"},JW=q.discriminatedUnion("should_validate_begrunnelse",[q.object({should_validate_begrunnelse:q.literal(!1),aktivitetstatus:q.nativeEnum(pe),aktivitet:q.any()}),q.object({should_validate_begrunnelse:q.literal(!0),aktivitetstatus:q.nativeEnum(pe),begrunnelse:q.string().min(1,"Du må fylle ut en begrunnelse").max(255,"Du må korte ned teksten til 255 tegn"),aktivitet:q.any()})]).superRefine((e,t)=>{const r=GW(e.aktivitet,e.aktivitetstatus);r&&t.addIssue({code:q.ZodIssueCode.custom,message:r})}),QW=e=>{const{aktivitet:t,onSubmit:r,disabled:n}=e,i={should_validate_begrunnelse:!1,aktivitetstatus:t.status,aktivitet:t},{register:o,handleSubmit:a,reset:s,setValue:u,watch:c,formState:{errors:d,isDirty:f,isSubmitting:p}}=Et({defaultValues:i,resolver:Dt(JW),shouldFocusError:!0});v.useEffect(()=>{s(),u("aktivitet",t)},[t]);const{setFormIsDirty:m}=v.useContext(Jr);v.useEffect(()=>(m("status",f),()=>{m("status",!1)}),[m,f]);const g=c("aktivitetstatus"),h=g===pe.FULLFOERT||g===pe.AVBRUTT,b=Mm(t.avtalt,g,t.type),_=S=>{u("aktivitetstatus",S)},y=c("begrunnelse");return v.useEffect(()=>{b?u("should_validate_begrunnelse",!0):u("should_validate_begrunnelse",!1)},[b]),l.jsxs("form",{onSubmit:a(S=>r(S)),className:"space-y-4",children:[l.jsx(oo,{legend:"Hva er status på aktiviteten?",hideLegend:!0,value:g,onChange:_,disabled:n,children:Object.entries(XW).map(([S,O])=>l.jsx(_r,{value:S,children:O},S))}),h?l.jsx(Ge,{variant:"warning",children:'Hvis du endrer til "Fullført" eller "Avbrutt", blir aktiviteten låst og du kan ikke lenger endre innholdet.'}):null,b?l.jsx(Vt,{disabled:n,label:ZW(g),maxLength:255,...o("begrunnelse"),error:d.begrunnelse&&d.begrunnelse.message,value:y}):null,l.jsx(Xr,{errors:d}),l.jsx(ur,{feilmeldinger:C(T7)}),l.jsx(Ne,{loading:p,className:"mt-4",disabled:n,children:"Lagre"})]})},ez=(e,t)=>{const r=C(jm),n=C(Ut),i=b1(e,t);return r||!n||!i},tz=(e,t,r)=>t.aktivitetstatus===r.status?Promise.resolve():(l_("submit",r,t.aktivitetstatus),e(GL(r,t.aktivitetstatus,t.begrunnelse))),Xa=e=>{const{aktivitet:t}=e,[r,n]=v.useState(!1),i=Le(),o=Ue(),a=ez(t,o),s=f=>(c("status",!1),tz(i,f,t).then(p=>{var m;if(gc(p))return null;n(!1),(m=document.querySelector(".aktivitet-modal"))==null||m.focus()})),u=l.jsx(ce,{children:hi[t.status]}),{setFormIsDirty:c}=v.useContext(Jr),d=l.jsx(QW,{disabled:a,onSubmit:s,aktivitet:t});return l.jsx(qm,{icon:l.jsx(a9,{"aria-hidden":!0,fontSize:"1.5rem"}),onClick:()=>{r&&c("status",!1),n(!r)},open:r,tittel:"Hva er status på aktiviteten?",subtittel:u,content:d})},Tx=e=>e.data.versjoner,rz=e=>Tx(e).data,nz=e=>Tx(e).status,iz=e=>[...rz(e)].sort((r,n)=>n.endretDato.localeCompare(r.endretDato));function oz(e){switch(e){case"BRUKER":return"Du";case"NAV":case"SYSTEM":case"ARENAIDENT":return"NAV";case"ARBEIDSGIVER":return"Arbeidsgiver";case"TILTAKSARRANGOER":return"Tiltaksarrangør"}}function az(e,t){switch(e){case"BRUKER":return"Bruker";case"SYSTEM":return"NAV";case"NAV":case"ARENAIDENT":return t||"NAV";case"ARBEIDSGIVER":return"Arbeidsgiver "+(t||"");case"TILTAKSARRANGOER":return"Tiltaksarrangør "+(t||"")}}const sz=(e,t,r)=>e?oz(t):az(t,r),lz=e=>{var o,a,s;const{aktivitet:t,forrigeAktivitet:r}=e,n=C(cr),i=l.jsx(Wn,{className:"inline",children:sz(n,t.endretAvType,t.endretAv)});switch(t.transaksjonsType){case Fa.MOTE_TID_OG_STED_ENDRET:return l.jsxs(l.Fragment,{children:[i," endret tid eller sted for møtet"]});case Fa.REFERAT_OPPRETTET:case Zc.REFERAT_OPPRETTET:return l.jsxs(l.Fragment,{children:[i," opprettet referat"]});case Fa.REFERAT_ENDRET:case Zc.REFERAT_ENDRET:return l.jsxs(l.Fragment,{children:[i," endret referatet"]});case Fa.REFERAT_PUBLISERT:case Zc.REFERAT_PUBLISERT:return l.jsxs(l.Fragment,{children:[i," delte referatet"]});case Qn.BLE_HISTORISK:return l.jsx(l.Fragment,{children:"Aktiviteten ble automatisk arkivert"});case Qn.DETALJER_ENDRET:return l.jsxs(l.Fragment,{children:[i," endret detaljer på aktiviteten"]});case Qn.AVTALT:return l.jsxs(l.Fragment,{children:[i,' merket aktiviteten som "Avtalt med NAV"']});case Qn.OPPRETTET:return l.jsxs(l.Fragment,{children:[i," opprettet aktiviteten"]});case Qn.FORHAANDSORIENTERING_LEST:{const u=n?"ditt":"sitt";return l.jsxs(l.Fragment,{children:[i," bekreftet å ha lest informasjon om ansvaret ",u]})}case Qn.AVTALT_DATO_ENDRET:{const u=Lt(r!=null&&r.tilDato?r.tilDato:"ingen dato"),c=Lt(t.tilDato);return l.jsxs(l.Fragment,{children:[i," endret til dato på aktiviteten fra ",u," til ",c]})}case Qn.STATUS_ENDRET:{const u=r?hi[r==null?void 0:r.status]:"ingen",c=hi[t==null?void 0:t.status];return l.jsxs(l.Fragment,{children:[i," flyttet aktiviteten fra ",u," til ",c]})}case cS.ETIKETT_ENDRET:{const u=t.etikett?f1[t.etikett]:"Ingen";return l.jsxs(l.Fragment,{children:[i," endret tilstand til ",u]})}case Va.DEL_CV_SVART:{const u=(o=t.stillingFraNavData.cvKanDelesData)!=null&&o.kanDeles?"Ja":"Nei";return l.jsxs(l.Fragment,{children:[i,' svarte "',u,'" på spørsmålet "Er du interessert i denne stillingen?"']})}case Va.SOKNADSSTATUS_ENDRET:{const u=(a=t.stillingFraNavData)!=null&&a.soknadsstatus?Vp[t.stillingFraNavData.soknadsstatus]:"Ingen";return l.jsxs(l.Fragment,{children:[i," endret tilstand til ",u]})}case Va.IKKE_FATT_JOBBEN:case Va.FATT_JOBBEN:{const u=(s=t.stillingFraNavData)!=null&&s.soknadsstatus?Vp[t.stillingFraNavData.soknadsstatus]:"Ingen";return l.jsxs(l.Fragment,{children:[i," avsluttet aktiviteten fordi kandidaten har ",u]})}default:return l.jsxs(l.Fragment,{children:[i," gjorde noe"]})}},hk=e=>{const{aktivitet:t,forrigeAktivitet:r}=e;return l.jsxs("div",{className:"m-0 pb-4",children:[l.jsx(lz,{aktivitet:t,forrigeAktivitet:r}),l.jsx(ce,{children:L1(t.endretDato)})]})},Kd=10,uz=e=>{const{aktivitet:t}=e,r=Le(),n=C(iz),i=C(nz);v.useEffect(()=>(r(My()),r(zs(t)),()=>{r(My())}),[]);const o=n.slice(0,Kd).map((s,u)=>l.jsx(hk,{aktivitet:s,forrigeAktivitet:n[u+1]},s.endretDato)),a=l.jsx(Fu,{header:"Vis mer",children:n.slice(Kd).map((s,u)=>l.jsx(hk,{aktivitet:s,forrigeAktivitet:n[u+1]},s.endretDato))});return l.jsx(Wt,{className:"flex m-auto my-4",avhengigheter:i,spinnerSize:"xlarge",children:l.jsxs("section",{children:[o,l.jsx(Vn,{visible:n.length>Kd,children:a})]})})},xo=e=>{const{aktivitet:t}=e;return l.jsxs(ee.Item,{className:"first:border-t-2 first:border-border-divider",children:[l.jsx(ee.Header,{children:l.jsxs("div",{className:"flex gap-4 items-center",children:[l.jsx(n9,{"aria-hidden":!0,fontSize:"1.5rem"}),"Historikk"]})}),l.jsx(ee.Content,{children:l.jsx(uz,{aktivitet:t})})]})},cz=(e,t)=>{var r;switch(e.type){case fe.STILLING_AKTIVITET_TYPE:return l.jsxs(l.Fragment,{children:[l.jsx(HW,{aktivitet:e}),l.jsx(Xa,{aktivitet:e}),l.jsx(xo,{aktivitet:e})]});case fe.STILLING_FRA_NAV_TYPE:return l.jsxs(l.Fragment,{children:[(r=e.stillingFraNavData.cvKanDelesData)!=null&&r.kanDeles?l.jsx(YW,{aktivitet:e}):null,l.jsx(Xa,{aktivitet:e}),l.jsx(xo,{aktivitet:e})]});case fe.BEHANDLING_AKTIVITET_TYPE:case fe.EGEN_AKTIVITET_TYPE:case fe.IJOBB_AKTIVITET_TYPE:case fe.SOKEAVTALE_AKTIVITET_TYPE:return l.jsxs(l.Fragment,{children:[l.jsx(Xa,{aktivitet:e}),l.jsx(xo,{aktivitet:e})]});case fe.MOTE_TYPE:case fe.SAMTALEREFERAT_TYPE:return l.jsxs(l.Fragment,{children:[t?l.jsx(Xa,{aktivitet:e}):null,l.jsx(xo,{aktivitet:e})]});case fe.EKSTERN_AKTIVITET_TYPE:return l.jsx(xo,{aktivitet:e});case Fi.GRUPPEAKTIVITET:case Fi.TILTAKSAKTIVITET:case Fi.UTDANNINGSAKTIVITET:return}},dz=({aktivitet:e})=>{const t=Ue(),r=cz(e,t);return r?l.jsx(ee,{children:r}):null},Ox="Nei, og jeg vil ikke at NAV skal dele CV-en min med arbeidsgiveren",Ex="Ja, og NAV kan dele CV-en min med denne arbeidsgiveren",Zp="Er du interessert i denne stillingen?",fz=(e,t,r,n)=>e===pe.AVBRUTT&&t===dS.AVBRUTT_AV_SYSTEM?`Du kan ikke svare på spørsmålet fordi svarfristen gikk ut ${sn(n)}`:e===pe.AVBRUTT?"Du kan ikke svare på spørsmålet fordi aktiviteten er avbrutt":e===pe.FULLFOERT?"Du kan ikke svare på spørsmålet fordi aktiviteten er fullført":r?"Du kan ikke svare på spørsmålet fordi oppfølgingsperioden er avsluttet":"Noe er feil, kontakt brukerstøtte",pz=e=>{const{status:t,livslopsstatus:r,erHistorisk:n,svarfrist:i}=e,o=fz(t,r,n,i);return l.jsxs("div",{className:"p-4 bg-surface-subtle border-border-default border rounded-md",children:[l.jsx(oe,{size:"medium",className:"mb-4",children:Zp}),l.jsx(Ge,{variant:"info",inline:!0,children:o})]})},vz=({cvKanDelesData:e})=>{const t=e.kanDeles;let r,n;return e.endretAvType==="BRUKER"?(r=t?Ex:Ox,n=`Du svarte ${sn(e.endretTidspunkt)}`):(r=`NAV var i kontakt med deg ${sn(e.avtaltDato)}. Du sa ${t?"ja":"nei"} til at CV-en din deles med arbeidsgiver.`,n=`NAV svarte på vegne av deg ${sn(e.endretTidspunkt)}.`),l.jsxs("div",{className:"p-4 bg-surface-subtle border-border-default border rounded-md",children:[l.jsx(oe,{size:"medium",className:"mb-4",children:t?"Du svarte at du er interessert":"Du svarte at du ikke er interessert"}),l.jsx(ce,{children:r}),l.jsx(ce,{className:"mt-4",children:n}),t?l.jsx(ce,{className:"mt-4",children:"Arbeidsgiveren eller NAV vil kontakte deg hvis du er aktuell for stillingen"}):null]})},mz=({datoBegrensninger:e})=>l.jsxs("div",{className:"mb-4 bg-surface-alt-3-subtle border-border-alt-3 border rounded-md p-4 space-y-4",children:[l.jsxs("div",{className:"flex justify-between",children:[l.jsx(oe,{size:"small",level:"3",children:"Svar på vegne av brukeren"}),l.jsx(mn,{children:"FOR NAV-ANSATT"})]}),l.jsx(ce,{children:"Når var du i dialog med brukeren om å dele CV-en deres med denne arbeidsgiveren"}),l.jsx(ia,{field:{label:"Dato (obligatorisk)",required:!0,name:"avtaltDato"},disabledDays:[e]})]});var Dx=(e=>(e.JA="ja",e.NEI="nei",e))(Dx||{});const gz={invalid_type:"Du må fylle ut datoen for når du var i dialog med brukeren",invalid_date:"Ikke en gyldig dato"},hz=e=>({message:gz[e.code]}),yk=q.nativeEnum(Dx,{required_error:"Du må svare ja eller nei",invalid_type_error:"Ikke en gyldig dato"}),yz=({before:e,after:t},r)=>r?q.object({kanDeles:yk,avtaltDato:q.date({errorMap:hz}).min(e,{message:"Dato for dialog kan ikke være mer enn syv dager før kortet ble opprettet"}).max(t,{message:"Dato for dialog kan ikke være frem i tid"})}):q.object({kanDeles:yk}),kz=({aktivitet:e})=>{var _,y;const[t,r]=v.useState(void 0),n=Le(),i=Ue(),o=e.opprettetDato,a=Mo(zt(ut(o)),7),s=(_=e.stillingFraNavData)==null?void 0:_.svarfrist,u={before:a,after:Ck()},c=Et({resolver:Dt(yz(u,i)),defaultValues:{kanDeles:void 0}}),{handleSubmit:d,control:f,formState:{errors:p,isSubmitting:m}}=c,{field:g}=zo({name:"kanDeles",control:f});v.useEffect(()=>{g.value==="ja"&&r('Stillingen flyttes til "Gjennomfører"'),g.value==="nei"&&r('Stillingen flyttes til "Avbrutt"')},[g.value]);const h=S=>(n(kc({aktivitetId:e.id,aktivitetVersjon:e.versjon,kanDeles:S.kanDeles==="ja",avtaltDato:S.avtaltDato})),Promise.resolve()),b=C(D7);return l.jsx("form",{className:"bg-surface-subtle rounded-md border-border-default border p-4 space-y-8",onSubmit:d(h),noValidate:!0,children:l.jsxs(Jn,{...c,children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx(oe,{size:"medium",level:"2",children:Zp}),l.jsx(bz,{className:"mt-1"}),l.jsxs(ce,{className:"mt-1",children:["Svar før: ",sn(s)]})]}),i?l.jsx(mz,{datoBegrensninger:u}):null,l.jsxs(oo,{legend:Zp,hideLegend:!0,value:g.value??null,name:g.name,onChange:g.onChange,ref:g.ref,role:"radiogroup",error:(y=p.kanDeles)==null?void 0:y.message,children:[l.jsx(_r,{id:"kanDeles",value:"ja".toString(),children:Ex}),l.jsx(_r,{value:"nei".toString(),children:Ox})]}),l.jsx(Xr,{errors:p}),l.jsx(ur,{feilmeldinger:b}),l.jsxs("div",{className:"flex gap-4 items-center mt-8",children:[l.jsx(Ne,{disabled:m,children:"Lagre"}),t&&l.jsx(Ge,{variant:"info",inline:!0,children:t})]})]})})},bz=({className:e})=>l.jsx(ce,{className:e,children:"Du bestemmer selv om NAV kan dele CV-en din for denne stillingen."}),_z=({aktivitet:e})=>{const t=e.stillingFraNavData,r=t&&(t==null?void 0:t.cvKanDelesData),n=e.historisk;return r?l.jsx(vz,{cvKanDelesData:r}):n||e.status===pe.FULLFOERT||e.status===pe.AVBRUTT?l.jsx(pz,{status:e.status,livslopsstatus:t.livslopsstatus,erHistorisk:n,svarfrist:t.svarfrist}):l.jsx(kz,{aktivitet:e})},wz=()=>{const t=C(cr)?"Du kan ikke endre denne aktiviteten selv. Send en melding til veilederen din hvis aktiviteten skal endres.":"For å endre aktiviteten må du gå til Arena.";return l.jsx(Ge,{variant:"info",className:"w-full mt-4",children:t})},xz=({aktivitet:e})=>{const{handlinger:t}=e.eksternAktivitet,r=Ue();return t?l.jsx("div",{className:"space-y-4 flex flex-col self-end justify-self-end w-full mb-8",children:t.flatMap((n,i)=>n.lenkeType==="EKSTERN"&&r||n.lenkeType==="INTERN"&&!r?null:l.jsxs(mp,{href:n.url,target:"_blank",children:[l.jsx(oe,{size:"small",children:n.tekst}),l.jsx(ce,{children:n.subtekst})]},i))}):null},Wd=e=>{const{id:t,tillatEndring:r,laster:n,underOppfolging:i}=e,o=_t(),{endreAktivitetRoute:a}=Ot();if(!r)return null;const s=()=>{Fe(X7),o(a(t))};return l.jsx(Ne,{disabled:n||!i,onClick:s,variant:"secondary",icon:l.jsx(f9,{"aria-hidden":!0,fontSize:"1.5rem"}),children:"Endre på aktiviteten"})},Sz=({aktivitet:e})=>{const t=Ue(),r=`${oS}${e.stillingFraNavData.stillingsId}`;return l.jsx(Ne,{variant:"secondary",as:"a",href:r,onClick:()=>g6(t),target:"_blank",children:"Les mer om stillingen"})},So=e=>{var u;const{aktivitet:t}=e,r=Ue(),n=C(Pm(t.id)),i=((u=n==null?void 0:n.henvendelser)==null?void 0:u.reduce((c,d)=>d.lest?c:c+1,0))||0,o=_t(),{hovedsideRoute:a}=Ot(),s=c=>{r&&(o(a(),{replace:!0}),N1(c,t.id,n==null?void 0:n.id))};return l.jsxs("div",{className:"relative",children:[l.jsx(Ne,{variant:"secondary",as:"a",href:Im(r,t.id,n==null?void 0:n.id),icon:l.jsx(UF,{"aria-hidden":!0,fontSize:"1.5rem"}),onClick:s,children:i>0?`Du har ${i} ${i===1?"ulest melding":"uleste meldinger"}`:"Send en melding"}),i?l.jsx("div",{className:"absolute bg-red-500 rounded-full flex justify-center items-center w-3 h-3 text-white left-8 top-6"}):null]})},jz=({aktivitet:e,tillatEndring:t,laster:r,underOppfolging:n,erVeileder:i})=>{switch(e.type){case fe.MOTE_TYPE:case fe.BEHANDLING_AKTIVITET_TYPE:case fe.EGEN_AKTIVITET_TYPE:case fe.IJOBB_AKTIVITET_TYPE:case fe.STILLING_AKTIVITET_TYPE:case fe.SOKEAVTALE_AKTIVITET_TYPE:return l.jsxs(l.Fragment,{children:[l.jsx(Wd,{id:e.id,tillatEndring:t,laster:r,underOppfolging:n}),l.jsx(So,{aktivitet:e})]});case fe.SAMTALEREFERAT_TYPE:return l.jsxs(l.Fragment,{children:[i?l.jsx(Wd,{id:e.id,tillatEndring:t,laster:r,underOppfolging:n}):null,l.jsx(So,{aktivitet:e})]});case fe.STILLING_FRA_NAV_TYPE:return l.jsxs(l.Fragment,{children:[l.jsx(Sz,{aktivitet:e}),l.jsx(Wd,{id:e.id,tillatEndring:t,laster:r,underOppfolging:n}),l.jsx(So,{aktivitet:e})]});case fe.EKSTERN_AKTIVITET_TYPE:return l.jsxs(l.Fragment,{children:[l.jsx(xz,{aktivitet:e}),l.jsx(So,{aktivitet:e})]});case Fi.GRUPPEAKTIVITET:case Fi.TILTAKSAKTIVITET:case Fi.UTDANNINGSAKTIVITET:return l.jsxs(l.Fragment,{children:[l.jsx(So,{aktivitet:e}),l.jsx(wz,{})]})}},Tz=e=>{const t=Ue(),r=jz({...e,erVeileder:t});return l.jsx("div",{className:"my-4 gap-4 flex flex-wrap",children:r})},Oz=e=>{const{lasterData:t,onClick:r}=e;return l.jsx(Ne,{variant:"secondary",onClick:r,className:"mt-5",loading:t,size:"medium",children:"Ok, jeg har lest beskjeden"})},kk="Informasjon om ansvaret ditt",Ix=e=>{const{aktivitet:t,startAapen:r=!1}=e,n=$t(t),i=t.forhaandsorientering,o=i==null?void 0:i.tekst,a=i==null?void 0:i.lestDato,s=!!a,u=C(cr),c=Le(),d=Hc(u,t),[f,p]=v.useState(r),[m,g]=v.useState(!1);if(!o)return null;const h=()=>{g(!0),n?c(e_(t)).then(_=>g(!1)):c(yc(t)).then(_=>g(!1)),s6(t.type,!0)},b=()=>{h&&h(),p(!1)};return!s&&d?l.jsxs(Ge,{variant:"warning",children:[l.jsx(oe,{size:"xsmall",level:"2",children:kk}),l.jsx(cn,{children:o}),l.jsx(Oz,{onClick:b,lasterData:m})]}):l.jsxs(Fu,{header:kk,open:f,onClick:()=>p(!f),children:[l.jsx(cn,{children:o}),s?l.jsxs(ce,{className:"mt-4",children:["Lest ",sn(a)]}):null]})},Ez=({aktivitet:e,erBruker:t})=>l.jsx(Ix,{aktivitet:e,startAapen:Hc(t,e)}),Rx=()=>l.jsx(Ge,{variant:"info",children:"Du kan ikke legge til forhåndsorientering fordi sluttdatoen er færre enn 7 dager frem i tid."}),Nx=()=>{const e=C(Ta),t=C(ja),r=C(xm);return!(e||t||!r)},qc=()=>{const e=C(G_);return Nx()&&!e},Dz=()=>{const e=C(h1).filter(n=>n.avtalt).filter(n=>!n.historisk).length!==0,t=C(mo).filter(n=>!n.sluttDato)[0],r=qc();return(n,i,o)=>{p6(!r,o,n,i),!e&&t&&P8(t.startDato)&&f6(M8(t.startDato))}},Iz="_avtaltTekstEtikett_rgh1a_1",Rz="_maxWidth300_rgh1a_6",Nz={avtaltTekstEtikett:Iz,maxWidth300:Rz},bu=()=>l.jsxs("div",{className:"flex mb-2",children:[l.jsx(Wn,{children:"Teksten som blir lagt til aktiviteten:"}),l.jsx(Mu,{className:"ml-2",children:l.jsxs("div",{className:Nz.maxWidth300,children:["Brukeren mottar sms eller e-post (se KRR) med en lenke til aktiviteten. ",l.jsx("br",{}),l.jsx("br",{}),"På aktiviteten vil bruker se forhåndsorienteringen og en knapp for å bekrefte at en har lest. ",l.jsx("br",{}),l.jsx("br",{}),"Hvis ikke brukeren leser beskjeden innen 7 dager, så blir de revarslet."]})})]}),Pz=e=>{const{register:t,oppdaterer:r,forhaandsorienteringType:n,avtaltText119:i,errors:o}=e;return l.jsxs(l.Fragment,{children:[l.jsxs(Nn,{label:"Velg type forhåndsorientering",disabled:r,className:"mt-4",...t("forhaandsorienteringType"),children:[l.jsx("option",{value:We.SEND_STANDARD,children:"Forhåndsorientering (standard melding)"}),l.jsx("option",{value:We.SEND_PARAGRAF_11_9,children:"Forhåndsorientering for §11-9 (AAP)"}),l.jsx("option",{value:We.IKKE_SEND,children:"Ingen forhåndsorientering"})]}),l.jsxs(Vn,{visible:n===We.SEND_STANDARD,children:[l.jsx(bu,{}),l.jsx(ce,{className:"blokk-xs",children:Ra})]}),l.jsx(Vn,{visible:n===We.SEND_PARAGRAF_11_9,children:l.jsx(Vt,{label:l.jsx(bu,{}),maxLength:500,value:i,...t("avtaltText119"),error:o.avtaltText119&&o.avtaltText119.message})})]})},Az=(e,t,r,n,i,o)=>{if(t)return"Du kan ikke legge til forhåndsorientering fordi brukeren deltar i kvalifiseringsprogrammet.";if(r)return"Du kan ikke legge til forhåndsorientering fordi brukeren har reservert seg i kontakt- og reservasjonsregisteret. Du skal ha orientert brukeren om mulig konsekvens for ytelse, og dokumentert dette.";if(!n)return"Du kan ikke legge til forhåndsorientering fordi brukeren ikke har vært innlogget de siste 18 månedene med nivå 4 (for eksempel BankID). Du skal ha orientert brukeren om mulig konsekvens for ytelse, og dokumentert dette.";if(e)return"Du kan ikke legge til forhåndsorientering fordi brukeren har manuell oppfølging. Du skal ha orientert brukeren om mulig konsekvens for ytelse, og dokumentert dette.";if(o)return'Du kan ikke sende forhåndsorientering fordi aktiviteten ikke har "til dato". Hvis du har hatt muntlig dialog med brukeren om mulige konsekvenser for ytelse og dokumentert dette i et samtalereferat, så kan du sette aktiviteten til "Avtalt med NAV"';if(i)return'Du kan ikke legge til forhåndsorientering fordi sluttdatoen er færre enn 7 dager frem i tid. Hvis du har hatt muntlig dialog med brukeren om mulige konsekvenser for ytelse og dokumentert dette i et samtalereferat, så kan du sette aktiviteten til “Avtalt med NAV".'},Cz=e=>{const t=C(Ta),r=C(G_),n=C(ja),i=C(xm),o=Az(t,r,n,i,e.mindreEnnSyvDagerTil,e.manglerTilDato);return o?l.jsx(Ge,{variant:"warning",children:o}):null},Mz=q.discriminatedUnion("forhaandsorienteringType",[q.object({forhaandsorienteringType:q.literal(We.SEND_STANDARD),avtaltText:q.literal(Ra)}),q.object({forhaandsorienteringType:q.literal(We.SEND_PARAGRAF_11_9),avtaltText119:q.string().min(1,"Tekst til brukeren er påkrevd").max(500,"Du må korte ned teksten til 500 tegn")}),q.object({forhaandsorienteringType:q.literal(We.IKKE_SEND)})]),Lz=e=>{const{aktivitet:t,lasterData:r,mindreEnnSyvDagerTil:n,setSendtAtErAvtaltMedNav:i,setForhandsorienteringType:o}=e,[a,s]=v.useState(!1),u=Le(),c=Dz(),d=C(J_),f=(Y,z)=>u(fo({aktivitet:Y,forhaandsorientering:z})),p=Y=>{const z=Y.forhaandsorienteringType;i();const G=UH(Y);return f(t,{type:z,tekst:G}),o(z),c(z,t.type,n),Promise.resolve()},m=qc()&&!n,g={forhaandsorienteringType:m?We.SEND_STANDARD:We.IKKE_SEND,avtaltText:Ra,avtaltText119:nw},{register:h,handleSubmit:b,watch:_,formState:{errors:y,isDirty:S,isSubmitting:O}}=Et({defaultValues:g,resolver:Dt(Mz)}),I=_("forhaandsorienteringType"),T=_("avtaltText119"),{setFormIsDirty:V}=v.useContext(Jr),K=C(I7);return v.useEffect(()=>(V("avtalt",S),()=>V("avtalt",!1)),[V,S]),l.jsxs("form",{autoComplete:"off",noValidate:!0,onSubmit:b(Y=>p(Y)),className:"bg-surface-alt-3-subtle py-2 px-4 my-4 border border-border-alt-3 rounded-md",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx(ov,{onChange:()=>s(!a),children:"Avtalt med NAV"}),l.jsx(Mu,{"aria-label":"Informasjon om avtalt med NAV",title:"Informasjon om avtalt med NAV",id:"hjelp",className:"ml-2 justify-self-start",children:l.jsx("div",{className:"max-w-[300px]",children:'Aktiviteter som oppfyller brukerens aktivitets- og medvirkningsplikt skal settes som "Avtalt med NAV"'})}),l.jsx(mn,{className:"text-right flex-grow",children:"FOR NAV-ANSATT"})]}),l.jsx(Wt,{avhengigheter:d,visChildrenVedFeil:!0,children:a&&l.jsxs("div",{className:"space-y-4 mb-2",children:[l.jsx(Cz,{mindreEnnSyvDagerTil:n,manglerTilDato:!t.tilDato}),m?l.jsx(Pz,{register:h,forhaandsorienteringType:I,avtaltText119:T,oppdaterer:O,errors:y}):null,l.jsx(ur,{feilmeldinger:K}),l.jsx(Ne,{loading:O,disabled:r,children:"Bekreft"})]})})]})},bk=e=>{const{lasterData:t,register:r,watch:n}=e,i=n("forhaandsorienteringType"),o=n("avtaltText119");return l.jsxs("div",{className:"space-y-8",children:[l.jsxs(Nn,{label:"Velg type forhåndsorientering",disabled:t,className:"mt-4",...r("forhaandsorienteringType"),children:[l.jsx("option",{value:We.SEND_STANDARD,children:"Forhåndsorientering (standard melding)"}),l.jsx("option",{value:We.SEND_PARAGRAF_11_9,children:"Forhåndsorientering for §11-9 (AAP)"})]}),l.jsxs(Vn,{visible:i===We.SEND_STANDARD,children:[l.jsx(bu,{}),l.jsx(ce,{className:"blokk-xs",children:Ra})]}),l.jsx(Vn,{visible:i===We.SEND_PARAGRAF_11_9,children:l.jsx(Vt,{label:l.jsx(bu,{}),maxLength:500,value:o,...r("avtaltText119")})}),l.jsx(Ne,{loading:t,children:"Bekreft"})]})},$z=q.discriminatedUnion("forhaandsorienteringType",[q.object({forhaandsorienteringType:q.literal(We.SEND_STANDARD)}),q.object({forhaandsorienteringType:q.literal(We.SEND_PARAGRAF_11_9),avtaltText119:q.string().min(1,"Du må fylle ut teksten").max(500,"Du må korte ned teksten til 500 tegn")})]),Px=e=>{const{aktivitet:t,setSendtAtErAvtaltMedNav:r,setForhandsorienteringType:n}=e,[i,o]=v.useState(!1),a=C(Nm),s=C(Pc),u=Le(),c={forhaandsorienteringType:We.SEND_STANDARD,avtaltText119:nw},d=$t(t),{register:f,handleSubmit:p,watch:m}=Et({defaultValues:c,resolver:Dt($z)}),g=_=>{const y=_.forhaandsorienteringType===We.SEND_STANDARD?Ra:_.avtaltText119,S={type:_.forhaandsorienteringType,tekst:y};return n(_.forhaandsorienteringType),u(d?Q0({arenaAktivitet:t,forhaandsorientering:S}):fo({aktivitet:t,forhaandsorientering:S})).then(()=>{var I;r(),d6(),(I=document.querySelector(".aktivitet-modal"))==null||I.focus()})},h=a!==te.OK||s===te.RELOADING||s===te.PENDING,b=Ok(t)?[Io.ARENA_TILTAK_TYPE].includes(t.eksternAktivitet.type):!1;return l.jsxs("form",{onSubmit:p(_=>g(_)),className:"bg-surface-alt-3-subtle py-2 px-4 border border-border-alt-3 rounded-md",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx(ov,{disabled:h,onChange:()=>o(!i),children:"Legg til forhåndsorientering"}),l.jsx(mn,{children:"FOR NAV-ANSATT"})]}),b||d?l.jsx(Ge,{variant:"info",className:"mt-2",inline:!0,children:'Tiltaket er automatisk merket "Avtalt med NAV"'}):null,b&&i?l.jsx(bk,{lasterData:h,register:f,watch:m}):null,d&&i?l.jsx(bk,{lasterData:h,register:f,watch:m}):null]})},Vz=e=>{const{aktivitet:t}=e,r=C(Zr),n=!Rm(t.tilDato);return l.jsx(l.Fragment,{children:t.type===fe.EKSTERN_AKTIVITET_TYPE&&t.avtalt?n?l.jsx(Rx,{}):l.jsx(Px,{...e,aktivitet:t}):l.jsx(Lz,{lasterData:r!==te.OK,mindreEnnSyvDagerTil:n,...e})})},Fz=e=>{const{aktivitet:t,setSendtAtErAvtaltMedNav:r,setForhandsorienteringType:n}=e,i=Rm(t.tilDato)||!t.tilDato;return qc()?l.jsx(l.Fragment,{children:l.jsx("div",{className:"my-4",children:i?l.jsx(Px,{aktivitet:t,setSendtAtErAvtaltMedNav:r,setForhandsorienteringType:n}):l.jsx(Rx,{})})}):null},Hz=e=>{const{aktivitet:t,...r}=e;return $t(t)?l.jsx(Fz,{aktivitet:t,...r}):l.jsx(Vz,{aktivitet:t,...r})},Uz=(e,t,r,n)=>{if(!e||!r)return'Aktiviteten er merket "Avtalt med NAV". Forhåndsorientering er ikke lagt til. Du skal ha informert bruker om mulige konsekvenser for ytelse og dokumentert dette i et samtalereferat.';if(t)return'Aktiviteten er merket "Avtalt med NAV". Forhåndsorientering er ikke lagt til fordi sluttdatoen er færre enn 7 dager frem i tid. Du skal ha informert bruker om mulige konsekvenser for ytelse og dokumentert dette i et samtalereferat.';switch(n){case We.IKKE_SEND:return'Aktiviteten er merket "Avtalt med NAV" og forhåndsorientering om konsekvens for ytelse er ikke lagt til aktiviteten.';case We.SEND_STANDARD:return"Forhåndsorientering (standard melding) er lagt til aktiviteten. Bruker får sms eller e-post.";case We.SEND_PARAGRAF_11_9:return"Forhåndsorientering for §11-9 (AAP) er lagt til aktiviteten. Bruker får sms eller e-post."}return"Noe er feil, kontakt brukerstøtte"},Bz=e=>{const t=qc(),{mindreEnnSyvDagerTil:r,harTilDato:n,forhaandsorienteringstype:i}=e,o=Uz(t,r,n,i);return l.jsx(Ge,{variant:"success",children:o})},Kz=e=>{const{aktivitet:t,forhaandsorienteringstype:r}=e,n=!Rm(t.tilDato);return r?l.jsxs(l.Fragment,{children:[l.jsx(Bz,{mindreEnnSyvDagerTil:n,harTilDato:t.tilDato!=null,forhaandsorienteringstype:r}),l.jsx(Ix,{aktivitet:t,startAapen:!0})]}):null},Wz=e=>{const{underOppfolging:t,aktivitet:r}=e,{type:n,status:i,avtalt:o}=r,a="historisk"in r?r.historisk:!1,[s,u]=v.useState(!1),[c,d]=v.useState(We.IKKE_SEND),f=Ue(),p=C(cr),m=r.forhaandsorientering&&r.forhaandsorientering.type!==We.IKKE_SEND,g=s,h=$t(r),b=!a&&t&&i!==pe.FULLFOERT&&i!==pe.AVBRUTT,S=!(h||r.type===fe.EKSTERN_AKTIVITET_TYPE?r.forhaandsorientering:o)&&f&&b&&(n!==iv&&n!==ar);return!m&&!S&&!g?null:S?l.jsx(Hz,{setSendtAtErAvtaltMedNav:()=>u(!0),aktivitet:r,setForhandsorienteringType:d}):g?l.jsx(Kz,{forhaandsorienteringstype:c,aktivitet:r}):l.jsx(Ez,{aktivitet:r,erBruker:p})},Ax=e=>{const{tittel:t,children:r,fullbredde:n,beskrivelse:i}=e;return l.jsxs("div",{className:Mt("w-1/2 min-w-52 overflow-hidden overflow-ellipsis",{"w-full":n,"flex-auto break-words":i}),children:[l.jsx(oe,{level:"2",size:"xsmall",children:t}),r]})},zz=e=>{const{children:t,formattertTekst:r}=e;return r?l.jsx($n,{formatLinks:!0,formatLinebreaks:!0,children:t}):typeof t!="string"?t:l.jsx(ce,{children:t})},Me=e=>{const{tittel:t,innhold:r,fullbredde:n,formattertTekst:i,beskrivelse:o}=e;return r===null||!r?null:l.jsx(Ax,{tittel:t,fullbredde:n,beskrivelse:o,children:l.jsx(zz,{formattertTekst:i,children:r})})},zd=Em(Me),Cx=(e,t)=>t&&!e?"Dato ikke satt":sn(e),hn=({aktivitet:e,tittel:t,visIkkeSatt:r})=>l.jsx(Me,{tittel:t||"Fra dato",innhold:Cx(e.fraDato,r)},"fradato"),yn=({aktivitet:e,tittel:t,visIkkeSatt:r})=>l.jsx(Me,{tittel:t||"Til dato",innhold:Cx(e.tilDato,r)},"tildato"),kn=({aktivitet:e})=>l.jsx(Me,{tittel:"Beskrivelse",innhold:e.beskrivelse,beskrivelse:!0,fullbredde:!0,formattertTekst:!0}),qz=({aktivitet:e})=>e.type!==aa?null:l.jsxs(l.Fragment,{children:[l.jsx(Me,{tittel:"Type behandling",innhold:e.behandlingType},"behandlingtype"),l.jsx(Me,{tittel:"Behandlingssted",innhold:e.behandlingSted},"behandlingsted"),l.jsx(hn,{aktivitet:e}),l.jsx(yn,{aktivitet:e}),l.jsx(Me,{tittel:"Mål for behandlingen",innhold:e.effekt,fullbredde:!0},"effekt"),l.jsx(Me,{tittel:"Oppfølging fra NAV",innhold:e.behandlingOppfolging,fullbredde:!0},"behandlingOppfolging"),l.jsx(kn,{aktivitet:e})]}),Yz=/^(https?):\/\/.*$/,Gz=e=>{const t=e==null?void 0:e.trim();return t&&t.match(Yz)?t:`http://${e}`},Mx=e=>{var n;const t=(n=e.lenke)==null?void 0:n.trim();if(!t)return null;let r;try{r=new URL(t.startsWith("http")?t:"http://"+t).hostname}catch{r=t}return l.jsx(Ax,{tittel:"Lenke",fullbredde:!0,children:l.jsxs(ct,{target:"_blank",href:Gz(t),className:"block",children:[r," (åpnes i ny fane)"]})},"lenke")},Zz=({aktivitet:e})=>e.type!==Su?null:l.jsxs(l.Fragment,{children:[l.jsx(hn,{aktivitet:e}),l.jsx(yn,{aktivitet:e}),l.jsx(Me,{fullbredde:!0,tittel:"Mål med aktiviteten",innhold:e.hensikt},"hensikt"),l.jsx(Me,{fullbredde:!0,tittel:"Min huskeliste",innhold:e.oppfolging},"oppfolging"),l.jsx(kn,{aktivitet:e}),l.jsx(Mx,{lenke:e.lenke})]}),Xz=({detaljer:e})=>e?l.jsx(l.Fragment,{children:e.map(t=>l.jsx(Me,{tittel:t.label,innhold:t.verdi},"EKSTERN-"+t.label))}):null,_k=e=>l.jsxs(Ge,{variant:"warning",fullWidth:!0,children:[l.jsx(oe,{spacing:!0,size:"small",level:"3",children:e.tekst}),e.subtekst,l.jsx(Ne,{variant:"primary",as:"a",href:e.url,target:"_blank",className:"flex w-fit mt-4",children:e.knapptekst})]}),Jz=({oppgave:e})=>{const t=Ue();return e?t&&e.intern?_k(e.intern):!t&&e.ekstern?_k(e.ekstern):null:null},Qz=({aktivitet:e})=>e.type!==fe.EKSTERN_AKTIVITET_TYPE?null:l.jsxs(l.Fragment,{children:[l.jsx(Jz,{oppgave:e.eksternAktivitet.oppgave}),l.jsx(hn,{aktivitet:e}),l.jsx(yn,{aktivitet:e}),l.jsx(Xz,{detaljer:e.eksternAktivitet.detaljer}),l.jsx(kn,{aktivitet:e})]}),eq=e=>l.jsx("ul",{className:"list-disc list-inside",children:e.map((t,r)=>l.jsx("li",{className:"",children:l.jsxs(ce,{className:"inline",children:[M1(t.startDato),Wy(t.sluttDato)==="00:00"?"":` - ${Wy(t.sluttDato)}`,",",` ${t.sted}`]})},r))}),tq=({aktivitet:e})=>{if(e.type!==ju)return null;const{fraDato:t,tilDato:r,moeteplanListe:n}=e,i=Lt(t)===Lt(r);return l.jsxs(l.Fragment,{children:[i?l.jsx(Me,{tittel:"Dato",innhold:Lt(t)||"Dato ikke satt"}):l.jsxs(l.Fragment,{children:[l.jsx(hn,{aktivitet:e,visIkkeSatt:!0}),l.jsx(yn,{aktivitet:e,visIkkeSatt:!0})]}),l.jsx(Me,{fullbredde:!0,tittel:"Tidspunkt og sted",beskrivelse:!0,innhold:eq(n)},"moteplanutenslutteklokke"),l.jsx(kn,{aktivitet:e})]})},rq=({aktivitet:e})=>e.type!==Tu?null:l.jsxs(l.Fragment,{children:[l.jsx(hn,{aktivitet:e}),l.jsx(yn,{aktivitet:e,visIkkeSatt:!0}),l.jsx(Me,{tittel:"Stillingsandel",innhold:B9[e.jobbStatus]},"jobbstatus"),l.jsx(Me,{tittel:"Arbeidsgiver",innhold:e.ansettelsesforhold},"ansettelsesforhold"),l.jsx(Me,{tittel:"Ansettelsesforhold",innhold:e.arbeidstid},"arbeidstid"),l.jsx(kn,{aktivitet:e})]}),nq=({aktivitet:e})=>{if(e.type!==Yt)return null;const t=W1(e);return l.jsxs(l.Fragment,{children:[l.jsx(Me,{tittel:"Dato",innhold:sn(e.fraDato)},"dato"),l.jsx(Me,{tittel:"Klokkeslett",innhold:aH(t==null?void 0:t.klokkeslett)},"klokkeslett"),l.jsx(Me,{tittel:"Møteform",innhold:e.kanal&&c1[e.kanal]},"kanal"),l.jsx(Me,{tittel:"Varighet",innhold:q1(t==null?void 0:t.varighet)},"varighet"),l.jsx(Me,{tittel:"Møtested eller annen praktisk informasjon",innhold:e.adresse,formattertTekst:!0,fullbredde:!0},"adresse"),l.jsx(Me,{tittel:"Hensikt med møtet",innhold:e.beskrivelse,formattertTekst:!0,fullbredde:!0},"bakgrunn"),l.jsx(Me,{tittel:"Forberedelser til møtet",innhold:e.forberedelser,formattertTekst:!0,fullbredde:!0},"forberedelser")]})},iq=({aktivitet:e})=>e.type!==ar?null:l.jsxs(l.Fragment,{children:[l.jsx(Me,{tittel:"Dato",innhold:Lt(e.fraDato)},"dato"),l.jsx(Me,{tittel:"Møteform",innhold:e.kanal&&c1[e.kanal]},"kanal")]}),oq=({aktivitet:e})=>e.type!==tv?null:l.jsxs(l.Fragment,{children:[l.jsx(hn,{aktivitet:e}),l.jsx(yn,{aktivitet:e}),l.jsx(zd,{tittel:"Antall søknader i perioden",innhold:`${e.antallStillingerSokes}`,hidden:!e.antallStillingerSokes||e.antallStillingerSokes<1},"antallStillinger"),l.jsx(zd,{tittel:"Antall søknader i uken",innhold:`${e.antallStillingerIUken}`,hidden:!e.antallStillingerIUken||e.antallStillingerIUken<1},"antallStillingerIUken"),l.jsx(zd,{tittel:"Oppfølging fra NAV",beskrivelse:!0,formattertTekst:!0,hidden:!e.avtaleOppfolging,innhold:e.avtaleOppfolging},"avtaleOppfolging"),l.jsx(kn,{aktivitet:e})]}),aq=({aktivitet:e})=>e.type!==io?null:l.jsxs(l.Fragment,{children:[l.jsx(hn,{aktivitet:e}),l.jsx(yn,{tittel:"Frist",aktivitet:e,visIkkeSatt:!0}),l.jsx(Me,{tittel:"Arbeidsgiver",innhold:e.arbeidsgiver},"arbeidsgiver"),l.jsx(Me,{tittel:"Kontaktperson",innhold:e.kontaktperson},"kontaktperson"),l.jsx(Me,{tittel:"Arbeidssted",innhold:e.arbeidssted},"arbeidssted"),l.jsx(kn,{aktivitet:e}),l.jsx(Mx,{lenke:e.lenke})]}),sq=({aktivitet:e})=>{if(e.type!==iv)return null;const t=e.stillingFraNavData;return l.jsxs(l.Fragment,{children:[l.jsx(Me,{tittel:"Arbeidsgiver",innhold:t.arbeidsgiver},"arbeidsgiver"),l.jsx(Me,{tittel:"Arbeidssted",innhold:t.arbeidssted},"arbeidssted")]})},lq=({aktivitet:e})=>e.type!==rv?null:l.jsxs(l.Fragment,{children:[l.jsx(hn,{aktivitet:e,visIkkeSatt:!0}),l.jsx(yn,{aktivitet:e,visIkkeSatt:!0}),l.jsx(Me,{tittel:"Arrangør",innhold:e.arrangoer},"arrangoer"),l.jsx(Me,{tittel:"Deltakelse",innhold:!!e.deltakelseProsent&&`${e.deltakelseProsent}%`},"deltakelsesprosent"),l.jsx(Me,{tittel:"Antall dager per uke",innhold:!!e.antallDagerPerUke&&`${e.antallDagerPerUke}`},"dagerPerUke"),l.jsx(kn,{aktivitet:e})]}),uq=({aktivitet:e})=>e.type!==nv?null:l.jsxs(l.Fragment,{children:[l.jsx(hn,{aktivitet:e,visIkkeSatt:!0}),l.jsx(yn,{aktivitet:e,visIkkeSatt:!0}),l.jsx(kn,{aktivitet:e})]}),Lx=({valgtAktivitet:e})=>l.jsx("section",{children:l.jsxs("div",{className:"flex flex-row flex-wrap w-full gap-y-4",children:[l.jsx(qz,{aktivitet:e}),l.jsx(Zz,{aktivitet:e}),l.jsx(tq,{aktivitet:e}),l.jsx(rq,{aktivitet:e}),l.jsx(nq,{aktivitet:e}),l.jsx(iq,{aktivitet:e}),l.jsx(oq,{aktivitet:e}),l.jsx(aq,{aktivitet:e}),l.jsx(lq,{aktivitet:e}),l.jsx(uq,{aktivitet:e}),l.jsx(sq,{aktivitet:e}),l.jsx(Qz,{aktivitet:e})]})}),cq=({aktivitetstype:e})=>[Su,Tu,io,aa,aS].includes(e)?null:l.jsx(Gw,{aktivitetstype:e}),dq=e=>{const{valgtAktivitet:t,underOppfolging:r}=e,{tittel:n,type:i,avtalt:o}=t,a=Ek(t)?tw(t):!1;return l.jsxs("div",{className:"space-y-8 mb-8",children:[l.jsxs("div",{className:"space-y-8",children:[l.jsx(oe,{level:"1",className:"my-4",size:"large",id:"modal-heading",children:n}),l.jsx(cq,{aktivitetstype:i}),l.jsx($m,{hidden:!o}),a?l.jsx(rw,{}):null]}),l.jsx(Wz,{underOppfolging:r,aktivitet:t}),l.jsx(Lx,{valgtAktivitet:t})]})},fq=({begrunnelse:e})=>l.jsx(Ge,{variant:"info",children:l.jsx(ce,{className:"tilDittNavTekst",children:e})}),pq=({aktivitet:e})=>{const t=C(Ic),r=C(Nm),n=[t,r],i=Ue(),o=C(Pm(e.id)),a=Nx(),s=e.avtalt&&e.forhaandsorientering&&e.forhaandsorientering.type!==We.IKKE_SEND,u=e.type===Yt&&i&&!o&&a&&!s;return l.jsx($r,{hidden:!u,children:l.jsx(Wt,{avhengigheter:n,children:l.jsx($r,{hidden:!u,children:l.jsxs(Ge,{variant:"warning",children:["Brukeren får ikke automatisk beskjed om at aktiviteten er opprettet. ",l.jsx("br",{}),"Send en dialogmelding slik at bruker får informasjon om møtet."]})})})})},vq=q.object({referat:q.string().min(0).max(5e3)}),mq=e=>{const{aktivitet:t,onFerdig:r}=e,[n,i]=v.useState(!1),o=C(yx(lv)),a=kx(),s=Le(),u=C(Zr),c=t.erReferatPublisert,{watch:d,formState:{isDirty:f,isSubmitting:p},register:m,handleSubmit:g}=Et({resolver:Dt(vq),defaultValues:{referat:t.referat||a}}),h=p||u===te.PENDING||u===te.RELOADING,{setFormIsDirty:b}=v.useContext(Jr);v.useEffect(()=>(b("referat",f),()=>b("referat",!1)),[b,f]);const _=(I,T=!0)=>{const V={...t,referat:I.referat};return s(ka(V)).then(K=>{if(T){const Y=Gp(I.referat);pp(Y,t.erReferatPublisert,n,o?"B":"A")}return Si(K)&&r(),K})},y=g(I=>_(I,!1).then(T=>{T.payload&&s(Zn(T.payload)).then(()=>{const V=Gp(I.referat);pp(V,!0,n,o?"B":"A")})})),S=C(C7),O=d("referat");return l.jsxs("form",{onSubmit:g(I=>_(I)),className:"space-y-4 bg-surface-alt-3-subtle p-4 border border-border-alt-3 rounded-md",children:[l.jsx(Vt,{label:"Samtalereferat",disabled:h,maxLength:5e3,placeholder:"Skriv samtalereferatet her",...m("referat"),value:O}),o&&l.jsxs(l.Fragment,{children:[l.jsx(Rb,{checked:n,onChange:()=>{i(!n),pb(!n)},children:"Klarspråkhjelpen"}),l.jsx(hx,{value:O,open:n,options:{tools:!1}})]}),l.jsx(ur,{feilmeldinger:S}),l.jsxs("div",{className:"space-x-4",children:[l.jsx(Dm,{loading:h,disabled:h,hidden:c,onClick:y,children:"Del med bruker"}),l.jsx(Ne,{variant:c?"primary":"secondary",loading:h,disabled:h,children:c?"Del endring":"Lagre utkast"}),t.referat&&l.jsx(Ne,{variant:"tertiary",onClick:r,children:"Avbryt"})]})]})},gq="_button_1b5vd_1",hq="_content_1b5vd_20",yq={button:gq,content:hq},kq=e=>{const{className:t,text:r,maxCharacters:n}=e,i=Mt("mb-4",t),[o,a]=v.useState(!0),s=()=>{a(!o)};return r.length>n?l.jsxs("div",{className:i,children:[l.jsx($n,{className:"inline",formatLinks:!0,formatLinebreaks:!0,children:o?r.slice(0,n)+" ... ":r+" "}),l.jsxs(Ne,{variant:"tertiary",onClick:s,className:yq.button,children:[o?"Les mer":"Vis mindre",o?l.jsx(WF,{fontSize:"1.5rem",className:"inline"}):l.jsx(e9,{fontSize:"1.5rem",className:"inline"})]})]}):l.jsx("div",{className:i,children:l.jsx($n,{formatLinks:!0,formatLinebreaks:!0,children:r})})},bq=e=>{const{className:t,tekst:r,antallTegn:n}=e;return l.jsx(kq,{className:t,text:r,maxCharacters:n})},_q=e=>{const t=Ue(),{erAktivAktivitet:r,referat:n,dispatchPubliserReferat:i,publiserer:o,erReferatPublisert:a,startOppdaterReferat:s}=e,u=C(A7);return l.jsxs("section",{className:"my-4 border-t pt-8",children:[l.jsx(oe,{level:"2",size:"large",className:"mb-4",children:"Samtalereferat"}),l.jsx(bq,{tekst:n,antallTegn:275}),l.jsxs($r,{hidden:!t||!r,className:"flex flex-col mt-8 space-y-4",children:[a?l.jsx(Ge,{variant:"success",inline:!0,children:"Delt med bruker"}):null,l.jsx(ur,{feilmeldinger:u}),l.jsxs("div",{className:"space-x-4",children:[l.jsx(Ne,{hidden:a,onClick:i,loading:o,children:"Del med bruker"}),l.jsx(Ne,{variant:"secondary",onClick:s,children:"Endre referat"})]})]})]})},wq=e=>{const{aktivitet:t}=e,r=Le(),[n,i]=v.useState(!1),o=C(Zr)===(te.PENDING||te.RELOADING),a=Ue(),s=C(_m),{referat:u,erReferatPublisert:c,type:d}=t,f=d===Yt&&Or(new Date,ut(t.fraDato))||d===ar,p=!t.historisk&&s&&t.status!==pe.AVBRUTT&&t.status!==pe.FULLFOERT;return f?a&&!u&&p||n?l.jsx(mq,{aktivitet:t,onFerdig:()=>i(!1)}):u?l.jsx(_q,{referat:u,erAktivAktivitet:p,dispatchPubliserReferat:()=>r(Zn(t)),publiserer:o,erReferatPublisert:c,startOppdaterReferat:()=>i(!0)}):null:null},xq=e=>{const{aktivitet:t,tillatEndring:r,laster:n,underOppfolging:i}=e,a=!$t(t)&&Mm(t.avtalt,t.status,t.type);return l.jsxs("div",{className:"mt-4 space-y-8",children:[l.jsx(pq,{aktivitet:t}),a&&t.avsluttetKommentar?l.jsx(fq,{begrunnelse:t.avsluttetKommentar}):null,l.jsx(dq,{valgtAktivitet:t,underOppfolging:i}),t.type===fe.STILLING_FRA_NAV_TYPE?l.jsx(_z,{aktivitet:t}):null,l.jsx(Tz,{aktivitet:t,tillatEndring:r,laster:n,underOppfolging:i}),t.type===fe.MOTE_TYPE||t.type===fe.SAMTALEREFERAT_TYPE?l.jsx(wq,{aktivitet:t}):null,l.jsx(dz,{aktivitet:t})]})},Sq=e=>{if(!e)return null;const t=e.status===pe.FULLFOERT||e.status===pe.AVBRUTT;return l.jsx(Ea,{headerTekst:`${hi[e.status]} / ${Nc(e)}`,aktivitetErLaast:t})},jq="Alle endringer blir borte hvis du ikke lagrer. Er du sikker på at du vil lukke siden?",Tq=()=>[],Oq=e=>{const{aktivitet:t,avhengigheter:r,children:n}=e,i=v.useContext(Jr),o=_t(),{hovedsideRoute:a}=Ot(),u=t===void 0?Tq:(b=>$t(b)?Y9:Tm)(t),c=C(u,Se),d=C(_F,Se),f=C(U8,Se),p=[...c,...f,...d],m=C(cr),g=t==null?void 0:t.forhaandsorientering,h=Hc(m,t);return l.jsx(Xn,{contentClass:"aktivitetsvisning",contentLabel:"Aktivitetvisning",avhengigheter:r,header:Sq(t),onRequestClose:()=>{if(!(i.isDirty&&!window.confirm(jq))){if(h&&g){window.alert("Det er en viktig beskjed om ansvaret ditt som du må lese.");return}o(a())}},feilmeldinger:p,children:n})},Eq=()=>{const{id:e}=Bu(),t=e,r=Le(),n=Ue(),i=C(d=>t?Cc(d,t):void 0),o=C(d=>i?$t(i)?Pc(d):Zr(d):te.NOT_STARTED),a=o!==te.OK,s=C(d=>[Ti(d),o]),u=X9(i,n),c=C(Ut);return v.useEffect(()=>(i&&($t(i)?r(Ln()):r(Ko(i.id))),()=>{const d=i&&document.querySelector(`#${Vm(i)}`);d&&(d==null||d.focus())}),[]),l.jsx(jx,{children:l.jsx(Oq,{aktivitet:i,avhengigheter:s,children:i?l.jsx(xq,{aktivitet:i,tillatEndring:u,underOppfolging:c,laster:a}):l.jsx(Ku,{replace:!0,to:"/"})})})},Dq=e=>{const{onClick:t}=e,r=C($c,Se),n=C(Lc,Se),i=C(Sa,Se),o=C(Oa,Se),a=C(Ut,Se),s=r&&r.mal,u=i&&n.length===0||!s?"Det ble ikke skrevet mål i denne perioden":s;return l.jsxs("div",{className:"mb-8",children:[l.jsx(cn,{className:"mb-8",children:u}),l.jsx(Dm,{onClick:t,hidden:i,disabled:!o||!a,children:"Rediger"})]})},Iq=q.object({mal:q.string().min(1,"Feltet må fylles ut").max(500,"Du må korte ned teksten til 500 tegn")}),Rq=e=>{const{mal:t,dirtyRef:r,handleComplete:n}=e,i=Le(),o=v.useRef(null);v.useLayoutEffect(()=>{const h=o.current;h&&(h==null||h.focus(),h.selectionStart=h.selectionEnd=h.value.length)},[]);const a=h=>{h.mal!==e.mal?i(ba({mal:h.mal})).then(_=>{Si(_)&&i(xc()).then(()=>n())}):n();const b=document.querySelector(".aktivitet-modal");return b&&(b==null||b.focus()),Promise.resolve()},s={mal:t||""},{register:u,handleSubmit:c,watch:d,formState:{errors:f,isDirty:p}}=Et({defaultValues:s,resolver:Dt(Iq),shouldFocusError:!0});r&&(r.current=p);const m=d("mal"),g=C(P7);return console.log(g),l.jsxs("form",{className:"my-4 space-y-8",onSubmit:c(h=>a(h)),children:[l.jsx(Vt,{label:"Mitt mål (obligatorisk)",maxLength:500,"aria-label":"Mitt mål",...u("mal"),error:f.mal&&f.mal.message,value:m}),l.jsx(ur,{feilmeldinger:g}),l.jsx(Ne,{children:"Lagre"})]})},Nq=e=>{const t=C(Sa,Se),r=C($c,Se),n=C(Ut,Se),i=Ue(),o=C(Oa,Se),a=r&&r.mal,[s,u]=v.useState(!t&&!a&&n&&o);return s?l.jsx(Rq,{mal:a,dirtyRef:e.dirtyRef,handleComplete:()=>{u(!1),e.dirtyRef.current=!1,m6(i)}}):l.jsx(Dq,{onClick:()=>u(!0)})},Pq=(e,t)=>e?t==="BRUKER"?"bruker":"NAV":t==="BRUKER"?"deg":"NAV";function Aq(e,t){return l.jsxs("article",{children:[l.jsxs("span",{className:"font-bold",children:[e.mal?"Skrevet av ":"Mål slettet av ",l.jsx("span",{children:Pq(t,e.endretAv)})]}),` ${L1(e.dato)}`,l.jsx($n,{formatLinebreaks:!0,formatLinks:!0,children:e.mal})]},e.dato)}const Cq=()=>{const e=C(Lc,Se),t=Ue();return e.length===0?null:l.jsx(ee,{children:l.jsxs(ee.Item,{className:"first:border-t-2 first:border-border-divider",children:[l.jsx(ee.Header,{children:l.jsx(oe,{level:"2",size:"small",children:"Tidligere lagrede mål"})}),l.jsx(ee.Content,{children:e.map(r=>Aq(r,t))})]})})};function Mq(e){const{children:t}=e,r=C(N7);return l.jsx(Xn,{onRequestClose:e.onRequestClosed,feilmeldinger:r,header:null,contentLabel:"Mitt mål",children:t})}const Lq=()=>{const e=C(Om,Se),t=C(m8,Se),r=C(Sa,Se),n=C(_m,Se),i=C(Oa,Se),o=C(Lc,Se),a=v.useRef(!1),s=Le(),u=_t(),{hovedsideRoute:c}=Ot();v.useEffect(()=>{s(ui()),s(xc())},[]);const d=[e,t],f=()=>{a.current?window.confirm(_i)&&u(c()):u(c())};return l.jsx(Mq,{onRequestClosed:f,children:l.jsxs("div",{children:[l.jsx(oe,{id:"modal-heading",level:"1",size:"large",className:"mb-8",children:r||!n||!i?"Mitt mål fra en tidligere periode":"Mitt mål"}),l.jsxs(Fu,{className:"mb-8",header:"Tips til mål",defaultOpen:o.length===0,children:["Skriv noen ord om hva som er målet ditt slik at vi kan veilede deg bedre.",l.jsxs("ul",{className:"list-disc mt-4 pl-8",children:[l.jsx("li",{children:"Hva er målet på kort sikt? Hva er målet på lengre sikt?"}),l.jsx("li",{children:"Hva slags arbeidsoppgaver ønsker du deg?"})]})]}),l.jsx(Wt,{className:"flex m-auto",avhengigheter:d,alleOK:!0,children:l.jsxs("section",{children:[l.jsx(Nq,{dirtyRef:a}),l.jsx(Cq,{})]})})]})})};function $q(e){const{avhengigheter:t,tilbake:r,kanSkriveUt:n}=e;return l.jsxs(Wt,{avhengigheter:t,children:[l.jsx(oe,{className:"print:hidden",spacing:!0,size:"large",children:"Skriv ut aktivitetsplanen"}),l.jsxs("div",{className:"print:hidden self-start flex flex-row gap-x-10 mb-8",children:[r?l.jsx(ct,{className:"hover:cursor-pointer",onClick:r,tabIndex:0,children:"Tilbake"}):null,n?l.jsx(Ne,{icon:l.jsx(_9,{}),onClick:()=>{window.print(),Fe(Y7)},children:"Skriv ut"}):null,l.jsx(H1,{})]}),l.jsx("div",{className:"print:hidden mb-8",children:l.jsx(B1,{})})]})}function Li(e){const{tag:t,children:r}=e;return k.createElement(t||"span",null,Q9(r))}const Vq="/aktivitetsplan/assets/logo-8f085720.png";function Fq({adresse:e}){const t=e.adresselinje1;return t?l.jsxs("div",{children:[l.jsx(Li,{tag:"div",children:`${t}`}),e.adresselinje2&&l.jsx(Li,{tag:"div",children:`${e.adresselinje2}`}),e.adresselinje3&&l.jsx(Li,{tag:"div",children:`${e.adresselinje3}`}),e.postnummer&&e.poststed&&l.jsx(Li,{tag:"div",children:`${e.postnummer} ${e.poststed}`}),e.land&&e.type!=="NORSKPOSTADRESSE"&&l.jsx(Li,{tag:"div",children:`${e.land}`})]}):l.jsx("div",{})}function Hq(e,t){return e==="VEILEDER"?t||"NAV":"BRUKER"}function Uq(e){const t=e.dialog;return t.aktivitetId?l.jsx(oe,{level:"2",size:"medium",className:"printmodal-body__statusgruppe--overskrift",children:"Dialog"}):l.jsx(oe,{level:"2",size:"small",className:"printmodal-body__statusgruppe--overskrift",children:t.overskrift})}function $x(e){const{dialog:t}=e;if(!t)return l.jsx("div",{});const{henvendelser:r}=t,n=r&&[...r].sort((i,o)=>$1(i.sendt,o.sendt));return l.jsxs("div",{hidden:!n,className:"mt-4 pt-4 border-t border-border-divider",children:[l.jsx(Uq,{dialog:t}),n&&n.map(i=>l.jsxs("div",{className:"my-4",children:[l.jsx(Wn,{className:"",children:`${Hq(i.avsender,i.avsenderId)} - ${Lt(i.sendt)}`}),l.jsx($n,{formatLinebreaks:!0,formatLinks:!0,children:i.tekst})]},i.id))]})}function Bq(e){const{dialoger:t}=e,r=t&&t.filter(i=>i.aktivitetId===null);if(!r||r.length===0)return null;const n=r.sort((i,o)=>$1(i.opprettetDato,o.opprettetDato));return l.jsxs("section",{className:"mt-10",children:[l.jsx(oe,{level:"1",size:"large",className:"mb-2",children:"Dialogen med veileder"}),n.map(i=>l.jsx($x,{dialog:i},i.id))]})}const Kq=e=>{const{referat:t,erReferatPublisert:r,historisk:n}=e.aktivitet,o=r&&(!!t||!n);return l.jsx($r,{hidden:!o,className:"printmodal-body__aktivitetreferat",children:l.jsx(Me,{tittel:"Samtalereferat",innhold:t,formattertTekst:!0},"referat")})},Wq="_forhaandsorientering_bkwf6_1",zq="_lestTekst_bkwf6_4",qq="_tittel_bkwf6_7",wk={forhaandsorientering:Wq,lestTekst:zq,tittel:qq},Yq=e=>{const{forhaandsorienteringTekst:t,forhaandsorienteringLest:r}=e;return t?l.jsxs("div",{className:"mt-8",children:[l.jsx(oe,{level:"2",size:"xsmall",children:"Informasjon om ansvaret ditt"}),l.jsx($n,{className:wk.forhaandsorientering,children:t}),r&&l.jsxs(ce,{size:"small",className:wk.lestTekst,children:["Lest ",sn(r)]})]}):null},Gq=e=>{const{aktivitet:t,dialog:r}=e,{id:n,tittel:i}=t,o=t.forhaandsorientering;return l.jsxs("div",{className:"p-4 border border-border-default rounded-md print:break-inside-avoid-page",children:[l.jsx(mn,{className:"uppercase",children:Nc(t)}),l.jsx(oe,{level:"2",size:"medium",className:"mb-4",children:i}),l.jsx(Lx,{valgtAktivitet:t}),t.type===fe.MOTE_TYPE||t.type===fe.SAMTALEREFERAT_TYPE?l.jsx(Kq,{aktivitet:t}):null,l.jsx($m,{hidden:!t.avtalt}),l.jsx(Yq,{forhaandsorienteringTekst:o==null?void 0:o.tekst,forhaandsorienteringLest:o==null?void 0:o.lestDato}),t.type===io?l.jsx(Lm,{aktivitet:t}):null,$t(t)?l.jsx(ew,{aktivitet:t}):null,l.jsx($x,{dialog:r})]},n)},jo=e=>{const{tittel:t,aktiviteter:r,dialoger:n}=e;if(!r)return null;const i=[...r].sort(K1);return l.jsxs("section",{className:"mt-12",children:[l.jsx(oe,{level:"1",size:"large",className:"mb-2",children:t}),l.jsx("div",{className:"space-y-4",children:i.map(o=>{const a=n&&n.find(s=>s.aktivitetId===o.id);return l.jsx(Gq,{aktivitet:o,dialog:a},o.id)})})]})},Zq=e=>{const{aktiviteter:t,dialoger:r}=e;if(!t)return null;const n=t.reduce((i,o)=>{const a=i[o.status];return a?a.push(o):i[o.status]=[o],i},{});return l.jsxs(l.Fragment,{children:[l.jsx(jo,{tittel:"Aktiviteter jeg gjennomfører nå",aktiviteter:n[pe.GJENNOMFOERT],dialoger:r}),l.jsx(jo,{tittel:"Planlagte aktiviteter",aktiviteter:n[pe.PLANLAGT],dialoger:r}),l.jsx(jo,{tittel:"Forslag til aktiviteter",aktiviteter:n[pe.BRUKER_ER_INTRESSERT],dialoger:r}),l.jsx(jo,{tittel:"Fullførte aktiviteter",aktiviteter:n[pe.FULLFOERT],dialoger:r}),l.jsx(jo,{tittel:"Avbrutte aktiviteter",aktiviteter:n[pe.AVBRUTT],dialoger:r})]})};function Vx(e,t){const r=new Date(e.opprettetDato),n=new Date(t.opprettetDato);return Or(r,n)&&(!t.avsluttetDato||zr(r,new Date(t.avsluttetDato)))}function Xq(e,t){return t.every(r=>!Vx(e,r))}function Jq(e,t,r,n){if(n)return r?n.filter(i=>Vx(i,r)):e==="aktivitetsplan"&&t?n.filter(i=>Xq(i,t)):n}function Fx(e,t){const r=new Date(e.sisteDato),n=new Date(t.opprettetDato),i=new Date(e.opprettetDato);return zr(r,n)?!1:!t.avsluttetDato||zr(i,new Date(t.avsluttetDato))}function Qq(e,t){return t.every(r=>!Fx(e,r))}function eY(e,t,r,n){if(!(!n||!e))return r?n.filter(i=>Fx(i,r)):e==="aktivitetsplan"&&t?n.filter(i=>Qq(i,t)):n}function tY(e){const t=e.mittMal&&e.mittMal.mal;return t?l.jsxs("section",{className:"my-8",children:[l.jsx(oe,{level:"1",size:"large",children:"Mitt mål"}),l.jsx(ce,{children:t})]}):null}function rY(e){const{aktiviteter:t,bruker:r,adresse:n,printMelding:i,mittMal:o,erVeileder:a,dialoger:s,utskriftPlanType:u,kvpPerioder:c,hidden:d}=e,{fodselsnummer:f,fornavn:p,etternavn:m,geografiskEnhet:g}=r,h=g&&g.navn,b=u!==void 0&&u!=="helePlanen"&&u!=="aktivitetsplan",_=c&&c.find(V=>V.opprettetDato===u),y=Jq(u,c,_,t),S=eY(u,c,_,s),O=_?Lt(_.opprettetDato):void 0,I=_?Lt(_.avsluttetDato):void 0,T=new URL(Vq,import.meta.url).href;return l.jsxs("div",{id:"printarea",className:"printmodal-body w-[670px]",hidden:d,children:[l.jsx("img",{className:"my-8",src:T,alt:"Logo NAV"}),l.jsxs("div",{className:"flex justify-between mb-8",children:[l.jsx("div",{className:"",children:l.jsxs($r,{hidden:!a,children:[l.jsx(Li,{children:`${p} ${m}`}),n&&l.jsx(Fq,{adresse:n})]})}),l.jsxs("div",{children:[l.jsx($r,{hidden:!a,children:h}),"Dato: ",Lt(Date.now()),l.jsxs($r,{hidden:!f,children:["Fødselsnummer:",` ${f}`]}),l.jsx($r,{hidden:!b,children:"Modia Arbeidsrettet Oppfølging"}),l.jsxs($r,{hidden:!b,children:["Periode: ",O," - ",I]})]})]}),l.jsx(oe,{level:"1",size:"xlarge",children:"Aktivitetsplan"}),l.jsx(w8,{hidden:i==="",children:l.jsx("p",{children:i})}),l.jsx(tY,{mittMal:o}),l.jsx(Zq,{aktiviteter:y,dialoger:S}),l.jsx(Bq,{dialoger:S})]})}const nY="Her finner du avtalte aktiviteter med NAV som du skal gjennomføre for å nå målet ditt. Gi beskjed til NAV hvis det skjer endringer i situasjonen din eller hvis du ikke kan gjennomføre en aktivitet.",iY=q.object({beskrivelse:q.string().max(2e3,"Du må korte ned teksten til 2000 tegn")}),oY=e=>{const{bruker:t,onSubmit:r}=e,n={beskrivelse:nY},{register:i,handleSubmit:o,watch:a,formState:{errors:s}}=Et({defaultValues:n,resolver:Dt(iY),shouldFocusError:!0}),u=d=>r(d),c=a("beskrivelse");return l.jsxs("form",{onSubmit:o(d=>u(d)),className:"p-4 space-y-8",children:[l.jsxs("div",{className:"space-y-8",children:[l.jsx(oe,{size:"large",level:"1",children:`Aktivitetsplan for ${t.fornavn}`}),l.jsx(Vt,{label:"Rediger teksten under så den passer til brukeren.",maxLength:2e3,...i("beskrivelse"),value:c,error:s.beskrivelse&&s.beskrivelse.message})]}),l.jsx(Ne,{children:"Velg"})]})},_u=({tittelId:e,tekstId:t})=>l.jsxs("div",{children:[l.jsx(oe,{level:"2",size:"small",children:e}),l.jsx(ce,{children:t})]}),aY=e=>{const{kvpPerioder:t}=e;return t?t.length===1?l.jsx(sY,{kvpPeriode:t[0]}):l.jsx(lY,{kvpPerioder:t}):null},sY=({kvpPeriode:e})=>l.jsx(_r,{value:e.opprettetDato,disabled:!e.avsluttetDato,children:l.jsx(_u,{tittelId:"KVP-perioden",tekstId:"Du skriver ut innholdet i KVP-perioden"})}),lY=e=>{const{kvpPerioder:t}=e;return l.jsxs("div",{className:"pl-6",children:[l.jsx(_u,{tittelId:"KVP-perioden",tekstId:"Du skriver ut innholdet i KVP-perioden"}),t&&t.map(r=>l.jsx(_r,{className:"pt-2",value:r.opprettetDato,disabled:!r.avsluttetDato,children:l.jsx(ce,{children:`${Lt(r.opprettetDato)} - ${r.avsluttetDato?Lt(r.avsluttetDato):"nå"}`})},r.opprettetDato))]})},uY=q.object({utskritPlanType:q.string()}),cY=e=>{const{kvpPerioder:t,onSubmit:r}=e,n={utskritPlanType:"helePlanen"},{handleSubmit:i,setValue:o}=Et({defaultValues:n,resolver:Dt(uY)}),a=s=>{o("utskritPlanType",s)};return l.jsxs("form",{onSubmit:i(s=>r(s)),className:"p-4 space-y-8",children:[l.jsxs(oo,{legend:l.jsx(oe,{className:"mb-4",level:"1",size:"medium",children:"Velg hva du ønsker å skrive ut"}),defaultValue:"helePlanen",onChange:a,children:[l.jsx(_r,{value:"helePlanen",id:"id--helePlanen",children:l.jsx(_u,{tittelId:"Hele oppfølgingsperioden",tekstId:"Du skriver ut alt innholdet du ser i aktivitetsplan, også KVP-perioden"})}),l.jsx(_r,{value:"aktivitetsplan",id:"id--aktivitetsplan",children:l.jsx(_u,{tittelId:"Oppfølgingsperioden uten KVP-perioden",tekstId:"Du skriver ut alt innholdet du ser i aktivitetsplan, uten om KVP-perioden"})}),l.jsx(aY,{kvpPerioder:t})]}),l.jsx(Ne,{children:"Velg"})]})},Hx="VELG_PLAN",Ux="MELDING_FORM",Bx="UTSKRIFT";function dY(e,t){const r=[];return e&&r.push(Hx),t&&r.push(Ux),r.push(Bx),r}const fY=e=>{const{doHentMal:t,doHentMalListe:r,avhengigheter:n,kvpPerioder:i,dialoger:o,mittMal:a,aktiviteter:s,erManuell:u}=e,c=Ue();v.useEffect(()=>{t(),r(),Fe(q7)},[]);const d=ha(),[f,p]=v.useState(null),[m,g]=v.useState({}),[h,b]=v.useState(!0),[_,y]=v.useState(!0);v.useEffect(()=>{d&&(b7(d).then(A=>g(A)).finally(()=>y(!1)),_7(d).then(A=>p(A==null?void 0:A.adresse)).finally(()=>b(!1)))},[d]);const[S,O]=v.useState(0),[I,T]=v.useState(""),[V,K]=v.useState("helePlanen"),Y=()=>O(S+1),z=A=>(T(A.beskrivelse),Y(),Promise.resolve()),G=A=>(K(A.utskritPlanType),Y(),Promise.resolve()),M=i&&i.length>0&&c,R=dY(M,u&&c),w=_t(),E=()=>w(-1);if(d&&(h||_))return l.jsx(xu,{});const Q=(()=>{if(R[S]===Ux)return l.jsx(Gi,{onClose:E,open:!0,children:l.jsx(Wt,{avhengigheter:n,children:l.jsx(oY,{bruker:m,onSubmit:z})})});if(R[S]===Hx)return l.jsx(Gi,{onClose:E,open:!0,children:l.jsx(Wt,{avhengigheter:n,children:l.jsx(cY,{kvpPerioder:i,onSubmit:G})})})})();return l.jsx("section",{className:"flex flex-col justify-center items-center p-8",children:l.jsxs("div",{className:"aktivitetsplanprint flex justify-center items-center",children:[Q,l.jsx($q,{avhengigheter:n,tilbake:E,kanSkriveUt:R[S]===Bx}),l.jsx(Wt,{avhengigheter:n,children:l.jsx("div",{className:"border px-12 print:border-none",children:l.jsx(rY,{dialoger:o,bruker:m,adresse:f,printMelding:I,aktiviteter:s,mittMal:a,erVeileder:c,utskriftPlanType:V,kvpPerioder:i})})})]})})},pY=e=>{const t=Ac(e),r=gF(e),n=H8(e),i=$c(e),o=Ta(e);return{avhengigheter:[Om(e),Ti(e),Mc(e),Nm(e)],aktiviteter:t,dialoger:n,mittMal:i,erManuell:o,kvpPerioder:r}};function vY(e){return{doHentMal:()=>e(ui()),doHentMalListe:()=>e(xc())}}const mY=fc(pY,vY)(fY),gY=({children:e})=>l.jsx(o3,{children:e}),hY=()=>{const e=lo(),t=Le();return v.useEffect(()=>{t(JV())},[e]),null};function SY({Routes:e}){const t=Ue(),r=B_();return l.jsxs("div",{className:"aktivitetsplanfs",id:Tk,children:[l.jsxs("div",{className:"aktivitetsplan-wrapper w-full",children:[l.jsxs(gY,{children:[l.jsxs(e,{children:[l.jsxs(ot,{path:`/${r??""}`,children:[l.jsx(ot,{path:"utskrift",element:l.jsx(mY,{})}),l.jsxs(ot,{path:"",element:l.jsx(hB,{}),children:[l.jsx(ot,{path:"mal",element:l.jsx(Lq,{})}),l.jsx(ot,{path:"informasjon",element:l.jsx(V9,{})}),l.jsxs(ot,{path:"aktivitet",children:[l.jsx(ot,{path:"ny",element:l.jsx(VK,{})}),l.jsx(ot,{path:"ny/*",element:l.jsx(AW,{})}),l.jsx(ot,{path:"vis/:id",element:l.jsx(Eq,{})}),l.jsx(ot,{path:"endre/:id",element:l.jsx(MW,{})}),l.jsx(ot,{path:"avbryt/:id",element:l.jsx(MK,{})}),l.jsx(ot,{path:"fullfor/:id",element:l.jsx($K,{})})]})]})]}),t?l.jsx(ot,{path:"*",element:l.jsx(Ku,{replace:!0,to:`/${r??""}`})}):null]}),l.jsx(hY,{})]}),l.jsx(e8,{hidden:sS,children:l.jsx(SL,{})})]}),l.jsx(l7,{})]})}export{SY as A,wY as P,e3 as R,lo as a,Np as b,wp as c,ny as h,l4 as m,_Y as u};
+//# sourceMappingURL=app-b395e4c7.js.map
diff --git a/assets/app-b395e4c7.js.map b/assets/app-b395e4c7.js.map
new file mode 100644
index 000000000..295d6ec54
--- /dev/null
+++ b/assets/app-b395e4c7.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"app-b395e4c7.js","sources":["../../node_modules/date-fns/esm/addMonths/index.js","../../node_modules/date-fns/esm/isWeekend/index.js","../../node_modules/date-fns/esm/startOfWeek/index.js","../../node_modules/date-fns/esm/startOfISOWeek/index.js","../../node_modules/date-fns/esm/getISOWeekYear/index.js","../../node_modules/date-fns/esm/startOfISOWeekYear/index.js","../../node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","../../node_modules/date-fns/esm/startOfDay/index.js","../../node_modules/date-fns/esm/differenceInCalendarDays/index.js","../../node_modules/date-fns/esm/addWeeks/index.js","../../node_modules/date-fns/esm/addYears/index.js","../../node_modules/date-fns/esm/max/index.js","../../node_modules/date-fns/esm/min/index.js","../../node_modules/date-fns/esm/compareAsc/index.js","../../node_modules/date-fns/esm/constants/index.js","../../node_modules/date-fns/esm/isSameDay/index.js","../../node_modules/date-fns/esm/isDate/index.js","../../node_modules/date-fns/esm/isValid/index.js","../../node_modules/date-fns/esm/differenceInCalendarMonths/index.js","../../node_modules/date-fns/esm/differenceInCalendarWeeks/index.js","../../node_modules/date-fns/esm/differenceInDays/index.js","../../node_modules/date-fns/esm/differenceInMilliseconds/index.js","../../node_modules/date-fns/esm/_lib/roundingMethods/index.js","../../node_modules/date-fns/esm/differenceInMinutes/index.js","../../node_modules/date-fns/esm/endOfDay/index.js","../../node_modules/date-fns/esm/endOfMonth/index.js","../../node_modules/date-fns/esm/isLastDayOfMonth/index.js","../../node_modules/date-fns/esm/differenceInMonths/index.js","../../node_modules/date-fns/esm/differenceInSeconds/index.js","../../node_modules/date-fns/esm/startOfMonth/index.js","../../node_modules/date-fns/esm/startOfYear/index.js","../../node_modules/date-fns/esm/endOfWeek/index.js","../../node_modules/date-fns/esm/endOfISOWeek/index.js","../../node_modules/date-fns/esm/endOfToday/index.js","../../node_modules/date-fns/esm/subMilliseconds/index.js","../../node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","../../node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","../../node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","../../node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","../../node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","../../node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","../../node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","../../node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","../../node_modules/date-fns/esm/_lib/getUTCWeek/index.js","../../node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","../../node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","../../node_modules/date-fns/esm/_lib/format/formatters/index.js","../../node_modules/date-fns/esm/_lib/format/longFormatters/index.js","../../node_modules/date-fns/esm/_lib/protectedTokens/index.js","../../node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","../../node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","../../node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","../../node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","../../node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","../../node_modules/date-fns/esm/locale/en-US/index.js","../../node_modules/date-fns/esm/format/index.js","../../node_modules/date-fns/esm/_lib/assign/index.js","../../node_modules/date-fns/esm/_lib/cloneObject/index.js","../../node_modules/date-fns/esm/formatDistance/index.js","../../node_modules/date-fns/esm/getDaysInMonth/index.js","../../node_modules/date-fns/esm/getISOWeek/index.js","../../node_modules/date-fns/esm/getTime/index.js","../../node_modules/date-fns/esm/getUnixTime/index.js","../../node_modules/date-fns/esm/getWeekYear/index.js","../../node_modules/date-fns/esm/startOfWeekYear/index.js","../../node_modules/date-fns/esm/getWeek/index.js","../../node_modules/date-fns/esm/lastDayOfMonth/index.js","../../node_modules/date-fns/esm/getWeeksInMonth/index.js","../../node_modules/date-fns/esm/isAfter/index.js","../../node_modules/date-fns/esm/isBefore/index.js","../../node_modules/date-fns/esm/parse/_lib/Setter.js","../../node_modules/date-fns/esm/parse/_lib/Parser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js","../../node_modules/date-fns/esm/parse/_lib/constants.js","../../node_modules/date-fns/esm/parse/_lib/utils.js","../../node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js","../../node_modules/date-fns/esm/_lib/setUTCWeek/index.js","../../node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js","../../node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js","../../node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js","../../node_modules/date-fns/esm/_lib/setUTCDay/index.js","../../node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js","../../node_modules/date-fns/esm/_lib/setUTCISODay/index.js","../../node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js","../../node_modules/date-fns/esm/parse/_lib/parsers/index.js","../../node_modules/date-fns/esm/parse/index.js","../../node_modules/date-fns/esm/isSameMonth/index.js","../../node_modules/date-fns/esm/isSameYear/index.js","../../node_modules/date-fns/esm/isWithinInterval/index.js","../../node_modules/date-fns/esm/minutesToHours/index.js","../../node_modules/date-fns/esm/parseISO/index.js","../../node_modules/date-fns/esm/secondsToMinutes/index.js","../../node_modules/date-fns/esm/setMonth/index.js","../../node_modules/date-fns/esm/setHours/index.js","../../node_modules/date-fns/esm/setMinutes/index.js","../../node_modules/date-fns/esm/setYear/index.js","../../node_modules/date-fns/esm/subMonths/index.js","../../node_modules/date-fns/esm/sub/index.js","../../node_modules/date-fns/esm/subMinutes/index.js","../../node_modules/tslib/tslib.es6.js","../../node_modules/@amplitude/analytics-types/lib/esm/event.js","../../node_modules/@amplitude/analytics-types/lib/esm/logger.js","../../node_modules/@amplitude/analytics-types/lib/esm/status.js","../../node_modules/@amplitude/analytics-core/lib/esm/constants.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/valid-properties.js","../../node_modules/@amplitude/analytics-core/lib/esm/identify.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/event-builder.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/result-builder.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/uuid.js","../../node_modules/@amplitude/analytics-core/lib/esm/timeline.js","../../node_modules/@amplitude/analytics-core/lib/esm/messages.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/return-wrapper.js","../../node_modules/@amplitude/analytics-core/lib/esm/core-client.js","../../node_modules/@amplitude/analytics-core/lib/esm/revenue.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/chunk.js","../../node_modules/@amplitude/analytics-core/lib/esm/logger.js","../../node_modules/@amplitude/analytics-core/lib/esm/config.js","../../node_modules/@amplitude/analytics-core/lib/esm/plugins/destination.js","../../node_modules/@amplitude/analytics-core/lib/esm/utils/debug.js","../../node_modules/@amplitude/analytics-core/lib/esm/storage/memory.js","../../node_modules/@amplitude/analytics-core/lib/esm/transports/base.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/global-scope.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/query-params.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/attribution/constants.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/attribution/campaign-parser.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/cookie-name.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/storage/cookie.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/transports/fetch.js","../../node_modules/@amplitude/analytics-connector/dist/analytics-connector.esm.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/analytics-connector.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/plugins/identity.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/language.js","../../node_modules/@amplitude/analytics-client-common/lib/esm/default-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/utils/snippet-helper.js","../../node_modules/@amplitude/analytics-browser/lib/esm/version.js","../../node_modules/@amplitude/analytics-browser/lib/esm/plugins/context.js","../../node_modules/@amplitude/analytics-browser/lib/esm/storage/local-storage.js","../../node_modules/@amplitude/analytics-browser/lib/esm/transports/xhr.js","../../node_modules/@amplitude/analytics-browser/lib/esm/transports/send-beacon.js","../../node_modules/@amplitude/analytics-browser/lib/esm/cookie-migration/index.js","../../node_modules/@amplitude/analytics-browser/lib/esm/constants.js","../../node_modules/@amplitude/analytics-browser/lib/esm/config.js","../../node_modules/@amplitude/plugin-web-attribution-browser/lib/esm/helpers.js","../../node_modules/@amplitude/plugin-web-attribution-browser/lib/esm/web-attribution.js","../../node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/utils.js","../../node_modules/@amplitude/plugin-page-view-tracking-browser/lib/esm/page-view-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/plugins/form-interaction-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/plugins/file-download-tracking.js","../../node_modules/@amplitude/analytics-browser/lib/esm/browser-client.js","../../node_modules/@amplitude/analytics-browser/lib/esm/browser-client-factory.js","../../node_modules/@amplitude/analytics-browser/lib/esm/index.js","../../src/amplitude/amplitude.ts","../../node_modules/@navikt/ds-react/esm/accordion/AccordionItem.js","../../node_modules/@navikt/ds-react/esm/util/AnimateHeight.js","../../node_modules/@navikt/ds-react/esm/accordion/AccordionContent.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Back.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Calender.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Down.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/ErrorColored.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/ExpandFilled.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Helptext.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/HelptextFilled.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/InformationColored.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Left.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Next.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Right.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/SuccessColored.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/SuccessStroke.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/Up.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/UpDown.js","../../node_modules/@navikt/ds-react/node_modules/@navikt/ds-icons/esm/WarningColored.js","../../node_modules/@navikt/ds-react/esm/accordion/AccordionHeader.js","../../node_modules/@navikt/ds-react/esm/accordion/Accordion.js","../../node_modules/@navikt/ds-react/esm/alert/Alert.js","../../node_modules/@navikt/ds-react/esm/util/debounce.js","../../node_modules/@navikt/ds-react/esm/chips/Toggle.js","../../node_modules/@navikt/ds-react/esm/chips/Removable.js","../../node_modules/@navikt/ds-react/esm/chips/Chips.js","../../node_modules/@navikt/ds-react/node_modules/react-day-picker/dist/index.esm.js","../../node_modules/@navikt/ds-react/esm/form/error-summary/ErrorSummaryItem.js","../../node_modules/@navikt/ds-react/esm/form/error-summary/ErrorSummary.js","../../node_modules/@navikt/ds-react/esm/form/Switch.js","../../node_modules/@navikt/ds-react/esm/util/TextareaAutoSize.js","../../node_modules/@navikt/ds-react/esm/form/Textarea.js","../../node_modules/@navikt/ds-react/esm/form/TextField.js","../../node_modules/@navikt/ds-react/esm/date/utils/parse-date.js","../../node_modules/@navikt/ds-react/esm/date/utils/format-date.js","../../node_modules/@navikt/ds-react/esm/date/utils/get-dates.js","../../node_modules/@navikt/ds-react/esm/date/utils/labels.js","../../node_modules/date-fns/esm/locale/en-GB/_lib/formatLong/index.js","../../node_modules/date-fns/esm/locale/en-GB/index.js","../../node_modules/date-fns/esm/locale/nb/_lib/formatDistance/index.js","../../node_modules/date-fns/esm/locale/nb/_lib/formatLong/index.js","../../node_modules/date-fns/esm/locale/nb/_lib/formatRelative/index.js","../../node_modules/date-fns/esm/locale/nb/_lib/localize/index.js","../../node_modules/date-fns/esm/locale/nb/_lib/match/index.js","../../node_modules/date-fns/esm/locale/nb/index.js","../../node_modules/@navikt/ds-react/esm/date/utils/locale.js","../../node_modules/@navikt/ds-react/esm/date/utils/check-dates.js","../../node_modules/@navikt/ds-react/esm/date/hooks/useRangeDatepicker.js","../../node_modules/@navikt/ds-react/esm/date/hooks/useDateInputContext.js","../../node_modules/@navikt/ds-react/esm/date/DateInput.js","../../node_modules/@navikt/ds-react/esm/date/datepicker/caption/Caption.js","../../node_modules/@navikt/ds-react/esm/date/datepicker/caption/DropdownCaption.js","../../node_modules/@navikt/ds-react/esm/date/datepicker/Head.js","../../node_modules/@navikt/ds-react/esm/date/datepicker/DatePickerStandalone.js","../../node_modules/@navikt/ds-react/esm/date/datepicker/DayButton.js","../../node_modules/@navikt/ds-react/esm/date/datepicker/DatePicker.js","../../node_modules/@navikt/ds-react/esm/guide-panel/Illustration.js","../../node_modules/@navikt/ds-react/esm/guide-panel/Guide.js","../../node_modules/@navikt/ds-react/esm/guide-panel/GuidePanel.js","../../node_modules/@navikt/ds-react/esm/help-text/HelpText.js","../../node_modules/@navikt/ds-react/esm/link/Link.js","../../node_modules/@navikt/ds-react/esm/link-panel/LinkPanelTitle.js","../../node_modules/@navikt/ds-react/esm/link-panel/LinkPanelDescription.js","../../node_modules/@navikt/ds-react/esm/link-panel/LinkPanel.js","../../node_modules/@navikt/ds-react/esm/pagination/PaginationItem.js","../../node_modules/@navikt/ds-react/esm/pagination/Pagination.js","../../node_modules/@navikt/ds-react/esm/panel/Panel.js","../../node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs","../../node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs","../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js","../../node_modules/@floating-ui/react/dist/floating-ui.react.esm.js","../../node_modules/@navikt/ds-react/esm/popover/PopoverContent.js","../../node_modules/@navikt/ds-react/esm/popover/Popover.js","../../node_modules/@navikt/ds-react/esm/read-more/ReadMore.js","../../node_modules/@navikt/ds-react/esm/table/Header.js","../../node_modules/@navikt/ds-react/esm/table/Body.js","../../node_modules/@navikt/ds-react/esm/table/Row.js","../../node_modules/@navikt/ds-react/esm/table/HeaderCell.js","../../node_modules/@navikt/ds-react/esm/table/ColumnHeader.js","../../node_modules/@navikt/ds-react/esm/table/DataCell.js","../../node_modules/@navikt/ds-react/esm/table/ExpandableRow.js","../../node_modules/@navikt/ds-react/esm/table/Table.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@navikt/ds-react/esm/tag/Tag.js","../../node_modules/@remix-run/router/dist/router.js","../../node_modules/react-router/dist/index.js","../../node_modules/react-router-dom/dist/index.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","../../node_modules/use-sync-external-store/shim/index.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","../../node_modules/use-sync-external-store/shim/with-selector.js","../../node_modules/react-redux/es/utils/batch.js","../../node_modules/react-redux/es/components/Context.js","../../node_modules/react-redux/es/hooks/useReduxContext.js","../../node_modules/react-redux/es/utils/useSyncExternalStore.js","../../node_modules/react-redux/es/hooks/useSelector.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/react-redux/node_modules/react-is/index.js","../../node_modules/react-redux/es/connect/selectorFactory.js","../../node_modules/react-redux/es/utils/bindActionCreators.js","../../node_modules/react-redux/es/connect/wrapMapToProps.js","../../node_modules/react-redux/es/connect/invalidArgFactory.js","../../node_modules/react-redux/es/connect/mapDispatchToProps.js","../../node_modules/react-redux/es/connect/mapStateToProps.js","../../node_modules/react-redux/es/connect/mergeProps.js","../../node_modules/react-redux/es/utils/Subscription.js","../../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","../../node_modules/react-redux/es/utils/shallowEqual.js","../../node_modules/react-redux/es/components/connect.js","../../node_modules/react-redux/es/components/Provider.js","../../node_modules/react-redux/es/hooks/useStore.js","../../node_modules/react-redux/es/hooks/useDispatch.js","../../node_modules/react-redux/es/index.js","../../src/felles-komponenter/hooks/useAppDispatch.ts","../../src/felles-komponenter/timeoutbox/auth-selector.ts","../../node_modules/immer/dist/immer.esm.mjs","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../../node_modules/redux/es/redux.js","../../node_modules/reselect/es/defaultMemoize.js","../../node_modules/reselect/es/index.js","../../node_modules/redux-thunk/es/index.js","../../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js","../../src/utils/fnr-util.ts","../../src/api/utils.ts","../../src/api/authAPI.ts","../../src/createGenericSlice.ts","../../src/felles-komponenter/timeoutbox/auth-slice.ts","../../src/felles-komponenter/timeoutbox/TimeoutboxNedtelling.tsx","../../src/felles-komponenter/timeoutbox/Timeoutbox.tsx","../../src/felles-komponenter/hooks/useEventListner.ts","../../src/environment.ts","../../src/api/dialogAPI.ts","../../src/moduler/dialog/dialog-slice.ts","../../src/api/aktivitetAPI.ts","../../src/moduler/aktivitet/aktivitet-actions.ts","../../src/api/oppfolgingAPI.ts","../../src/moduler/oppfolging-status/oppfolging-slice.ts","../../src/utils/UpdateHandler.tsx","../../src/moduler/aktivitet/arena-aktiviteter-slice.ts","../../src/moduler/identitet/identitet-slice.ts","../../src/api/lestAPI.ts","../../src/moduler/lest/lest-slice.ts","../../src/moduler/mal/aktivitetsmal-slice.ts","../../src/moduler/mal/malliste-slice.ts","../../src/api/personAPI.ts","../../src/moduler/tilgang/tilgang-slice.ts","../../src/moduler/feilmelding/feil-selector.ts","../../node_modules/classnames/index.js","../../src/moduler/feilmelding/Feilmelding.tsx","../../src/felles-komponenter/utils/hash.ts","../../src/felles-komponenter/utils/logging.ts","../../src/moduler/feilmelding/useFeilMetrikker.ts","../../src/moduler/feilmelding/HovedsideFeilmelding.tsx","../../node_modules/react-dnd/dist/core/DndContext.js","../../node_modules/@react-dnd/invariant/dist/index.js","../../node_modules/dnd-core/dist/utils/js_utils.js","../../node_modules/dnd-core/dist/actions/dragDrop/types.js","../../node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js","../../node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js","../../node_modules/dnd-core/dist/actions/dragDrop/drop.js","../../node_modules/dnd-core/dist/actions/dragDrop/endDrag.js","../../node_modules/dnd-core/dist/utils/matchesType.js","../../node_modules/dnd-core/dist/actions/dragDrop/hover.js","../../node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js","../../node_modules/dnd-core/dist/actions/dragDrop/index.js","../../node_modules/dnd-core/dist/classes/DragDropManagerImpl.js","../../node_modules/dnd-core/dist/utils/coords.js","../../node_modules/dnd-core/dist/utils/dirtiness.js","../../node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js","../../node_modules/@react-dnd/asap/dist/makeRequestCall.js","../../node_modules/@react-dnd/asap/dist/AsapQueue.js","../../node_modules/@react-dnd/asap/dist/RawTask.js","../../node_modules/@react-dnd/asap/dist/TaskFactory.js","../../node_modules/@react-dnd/asap/dist/asap.js","../../node_modules/dnd-core/dist/actions/registry.js","../../node_modules/dnd-core/dist/contracts.js","../../node_modules/dnd-core/dist/interfaces.js","../../node_modules/dnd-core/dist/utils/getNextUniqueId.js","../../node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js","../../node_modules/dnd-core/dist/utils/equality.js","../../node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js","../../node_modules/dnd-core/dist/reducers/dragOffset.js","../../node_modules/dnd-core/dist/reducers/dragOperation.js","../../node_modules/dnd-core/dist/reducers/refCount.js","../../node_modules/dnd-core/dist/reducers/stateId.js","../../node_modules/dnd-core/dist/reducers/index.js","../../node_modules/dnd-core/dist/createDragDropManager.js","../../node_modules/react-dnd/dist/core/DndProvider.js","../../node_modules/fast-deep-equal/index.js","../../node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js","../../node_modules/react-dnd/dist/hooks/useCollector.js","../../node_modules/react-dnd/dist/hooks/useMonitorOutput.js","../../node_modules/react-dnd/dist/hooks/useCollectedProps.js","../../node_modules/react-dnd/dist/hooks/useOptionalFactory.js","../../node_modules/react-dnd/dist/hooks/useDrag/connectors.js","../../node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js","../../node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js","../../node_modules/react-dnd/dist/internals/registration.js","../../node_modules/@react-dnd/shallowequal/dist/index.js","../../node_modules/react-dnd/dist/internals/isRef.js","../../node_modules/react-dnd/dist/internals/wrapConnectorHooks.js","../../node_modules/react-dnd/dist/internals/SourceConnector.js","../../node_modules/react-dnd/dist/internals/TargetConnector.js","../../node_modules/react-dnd/dist/hooks/useDragDropManager.js","../../node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js","../../node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js","../../node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js","../../node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js","../../node_modules/react-dnd/dist/hooks/useDrag/useDragType.js","../../node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js","../../node_modules/react-dnd/dist/hooks/useDrag/useDrag.js","../../node_modules/react-dnd/dist/hooks/useDrop/connectors.js","../../node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js","../../node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js","../../node_modules/react-dnd/dist/hooks/useDrop/useAccept.js","../../node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js","../../node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js","../../node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js","../../node_modules/react-dnd/dist/hooks/useDrop/useDrop.js","../../node_modules/react-dnd-html5-backend/dist/utils/js_utils.js","../../node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js","../../node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js","../../node_modules/react-dnd-html5-backend/dist/NativeTypes.js","../../node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js","../../node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js","../../node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js","../../node_modules/react-dnd-html5-backend/dist/BrowserDetector.js","../../node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js","../../node_modules/react-dnd-html5-backend/dist/OffsetUtils.js","../../node_modules/react-dnd-html5-backend/dist/OptionsReader.js","../../node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js","../../node_modules/react-dnd-html5-backend/dist/index.js","../../src/api/featureAPI.ts","../../src/moduler/feature/feature-slice.ts","../../src/moduler/feature/FeatureToggle.tsx","../../src/moduler/aktivitet/aktivitet-kort/dragAndDropSlice.ts","../../src/moduler/aktivitet/aktivitet-slice.ts","../../src/moduler/aktivitet/aktivitet-versjoner/aktivitet-versjoner-slice.ts","../../src/moduler/aktivitet/aktivitetview-slice.ts","../../src/moduler/feilmelding/feil-slice.ts","../../src/moduler/filtrering/filter/filter-slice.ts","../../src/api/malverkAPI.ts","../../src/moduler/malverk/malverk-slice.ts","../../src/moduler/varslinger/eskaleringsvarsel-slice.ts","../../src/api/veilederAPI.ts","../../src/moduler/veileder/veileder-slice.ts","../../src/reducer.ts","../../src/store.ts","../../src/Provider.tsx","../../src/moduler/filtrering/filter/filter-selector.ts","../../src/moduler/oppfolging-status/oppfolging-selector.ts","../../src/moduler/tilgang/tilgang-selector.ts","../../src/moduler/feilmelding/IkkeNiva4.tsx","../../src/routes.ts","../../src/moduler/identitet/identitet-selector.ts","../../src/moduler/lest/lest-selector.ts","../../src/felles-komponenter/utils/Innholdslaster.tsx","../../node_modules/@navikt/aksel-icons/dist/react/esm/util/useId.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/Briefcase.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/ChatElipsis.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/ChevronDown.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/ChevronLeft.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/ChevronRight.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/ChevronUp.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/ClockDashed.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/HikingTrailSign.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/PadlockLocked.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/Pencil.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/PersonRectangle.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/Plus.js","../../node_modules/@navikt/aksel-icons/dist/react/esm/PrinterSmall.js","../../src/felles-komponenter/modal/Tilbakeknapp.tsx","../../src/felles-komponenter/modal/ModalHeader.tsx","../../src/felles-komponenter/modal/Modal.tsx","../../src/felles-komponenter/modal/ModalContainer.tsx","../../src/proptypes.js","../../src/moduler/informasjon/brukePlanenPanel.tsx","../../src/moduler/informasjon/okonomiskStottePanel.tsx","../../src/moduler/informasjon/rettigheterPanel.tsx","../../src/moduler/informasjon/Video.tsx","../../src/moduler/informasjon/informasjon-modal.tsx","../../src/moduler/informasjon/informasjonHenting.tsx","../../src/felles-komponenter/utils/NotifikasjonMarkering.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/CustomBodyLong.tsx","../../src/utils/textMappers.ts","../../src/moduler/aktivitet/aktivitet-selector.ts","../../src/moduler/aktivitet/arena-aktivitet-selector.ts","../../src/moduler/aktivitet/aktivitetlisteSelector.ts","../../src/utils/utils.ts","../../src/hocs/visible-if.ts","../../src/felles-komponenter/utils/visible-if-div.jsx","../../src/moduler/filtrering/filter/FilterCheckbox.tsx","../../src/moduler/filtrering/filter/FilterVisning.tsx","../../src/moduler/filtrering/filter/AktivitetTypeFilter.tsx","../../src/moduler/filtrering/filter/ArenaEtikettFilter.tsx","../../src/moduler/filtrering/filter/EtikettFilter.tsx","../../src/moduler/filtrering/filter/filter-utils.ts","../../src/moduler/mal/malliste-selector.ts","../../src/moduler/mal/aktivitetsmal-selector.ts","../../src/moduler/mal-linje/Aktivitetsplan_maal.svg","../../src/moduler/mal-linje/MittMaal.tsx","../../src/felles-komponenter/hidden-if/hidden-if.jsx","../../src/felles-komponenter/hidden-if/HiddenIfHovedknapp.jsx","../../src/moduler/aktiver-digital-oppfolging/AktiverDigitalOppfolgingVarsel.tsx","../../src/moduler/aktiver-digital-oppfolging/AktiverDigitalOppfolging.tsx","../../src/moduler/oppfolging-status/HarIkkeAktivitetsplan.tsx","../../src/moduler/oppfolging-status/VidereSendBrukereEllerRenderChildren.tsx","../../src/moduler/oppfolging-status/OppfolgingStatus.tsx","../../src/moduler/dialog/DialogFlateUtils.ts","../../src/moduler/dialog/DialogLink.tsx","../../src/moduler/varslinger/AdvarselMedDialogLenke.tsx","../../src/moduler/varslinger/AdvarselMedLenkeVarsling.tsx","../../src/moduler/varslinger/BrukerVarslinger.tsx","../../src/moduler/varslinger/eskaleringsvarsel-selector.ts","../../src/utils/dateUtils.ts","../../src/moduler/varslinger/VeilederVarsel.tsx","../../src/moduler/varslinger/Varslinger.tsx","../../src/moduler/dialog/dialog-selector.ts","../../src/moduler/verktoylinje/Navigasjonslinje.tsx","../../src/felles-komponenter/skjema/datovelger/common.ts","../../src/moduler/filtrering/filter/AktivitetStatusFilter.tsx","../../src/moduler/filtrering/filter/AvtaltFilter.tsx","../../src/moduler/filtrering/Filter.tsx","../../src/moduler/filtrering/filter/PeriodeFilter.tsx","../../src/moduler/filtrering/filteringslabel/FiltreringLabel.tsx","../../src/moduler/filtrering/VisValgtFilter.tsx","../../src/moduler/verktoylinje/Verktoylinje.tsx","../../src/felles-komponenter/UxSignalsWidget.tsx","../../src/felles-komponenter/LinkAsDiv.tsx","../../src/moduler/aktivitet/aktivitet-util.ts","../../src/moduler/aktivitet/aktivitetview-selector.ts","../../src/moduler/aktivitet/aktivitet-kort/Soknadsfrist.tsx","../../src/moduler/aktivitet/aktivitet-kort/AktivitetskortPeriode.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/CustomAlertstripe.tsx","../../src/moduler/aktivitet/del-cv-ikke-svart/DelCvIkkeSvart.tsx","../../src/moduler/aktivitet/etikett/EksterneEtikett.tsx","../../src/moduler/aktivitet/etikett/StillingEtikett.tsx","../../src/moduler/aktivitet/etikett/StillingFraNavEtikett.tsx","../../src/moduler/aktivitet/etikett/TiltakEtikett.tsx","../../src/moduler/aktivitet/ikke-delt-ferdig-markering/IkkeDeltFerdigMarkering.tsx","../../src/moduler/aktivitet/visning/underelement-for-aktivitet/dialog/DialogIkon.tsx","../../src/moduler/aktivitet/avtalt-markering/AvtaltMarkering.tsx","../../src/moduler/aktivitet/ulest-markering/UlestMarkering.tsx","../../src/datatypes/forhaandsorienteringTypes.ts","../../src/moduler/aktivitet/visning/avtalt-container/utilsForhaandsorientering.ts","../../src/moduler/aktivitet/aktivitet-kort/UlestAvtaltMarkering.tsx","../../src/moduler/aktivitet/aktivitet-kort/AktivitetskortTillegg.tsx","../../src/moduler/aktivitet/aktivitet-kort/AktivitetskortTittel.tsx","../../src/moduler/aktivitet/aktivitet-kort/Aktivitetstype.tsx","../../src/moduler/aktivitet/aktivitet-kort/Arbeidsgiver.tsx","../../src/moduler/aktivitet/aktivitet-kort/SokeAvtaleAntall.tsx","../../src/moduler/aktivitet/aktivitet-kort/Aktivitetskort.tsx","../../src/utils/useIsVisible.ts","../../src/hovedside/tavle/tavleUtils.ts","../../src/hovedside/tavle/kolonne/DropTargetKolonne.tsx","../../src/moduler/aktivitet/aktivitet-kort/DragbartAktivitetskort.tsx","../../src/moduler/hjelpetekst/AktivitetsplanHjelpetekst.tsx","../../src/hovedside/tavle/kolonne/KolonneHeader.tsx","../../src/hovedside/tavle/kolonne/Kolonne.tsx","../../node_modules/react-collapse/lib/Collapse.js","../../node_modules/react-collapse/lib/UnmountClosed.js","../../node_modules/react-collapse/lib/index.js","../../src/hovedside/tavle/kolonne/InvertedLesMer.tsx","../../src/hovedside/tavle/kolonne/SkjulEldreAktiviteterFraKolonne.tsx","../../src/hovedside/tavle/kolonne/KolonneSomSkjulerEldreAktiviteter.tsx","../../node_modules/performance-now/lib/performance-now.js","../../node_modules/raf/index.js","../../node_modules/prefix-style/index.js","../../node_modules/to-no-case/index.js","../../node_modules/to-space-case/index.js","../../node_modules/to-camel-case/index.js","../../node_modules/add-px-to-style/index.js","../../node_modules/dom-css/index.js","../../node_modules/react-custom-scrollbars-2/lib/utils/isString.js","../../node_modules/react-custom-scrollbars-2/lib/utils/getScrollbarWidth.js","../../node_modules/react-custom-scrollbars-2/lib/utils/returnFalse.js","../../node_modules/react-custom-scrollbars-2/lib/utils/getInnerWidth.js","../../node_modules/react-custom-scrollbars-2/lib/utils/getInnerHeight.js","../../node_modules/react-custom-scrollbars-2/lib/Scrollbars/styles.js","../../node_modules/react-custom-scrollbars-2/lib/Scrollbars/defaultRenderElements.js","../../node_modules/react-custom-scrollbars-2/lib/Scrollbars/index.js","../../node_modules/react-custom-scrollbars-2/lib/index.js","../../node_modules/rebound/dist/rebound.js","../../src/hovedside/tavle/sprettende-scrollbars.tsx","../../src/hovedside/tavle/Tavle.tsx","../../src/hovedside/tavle/obs.svg","../../src/hovedside/tavle/Tavleadvarsel.tsx","../../src/hovedside/tavle/Aktivitetstavle.tsx","../../src/hovedside/Hovedside.tsx","../../node_modules/react-hook-form/dist/index.esm.mjs","../../node_modules/@hookform/resolvers/dist/resolvers.mjs","../../node_modules/@hookform/resolvers/zod/dist/zod.mjs","../../node_modules/zod/lib/index.mjs","../../src/moduler/aktivitet/aktivitet-forms/CustomErrorSummary.tsx","../../src/moduler/aktivitet/avslutt/BegrunnelseForm.tsx","../../src/moduler/aktivitet/avslutt/PubliserReferat.tsx","../../src/moduler/aktivitet/avslutt/vis-advarsel.tsx","../../src/moduler/aktivitet/avslutt/AvbrytAktivitet.tsx","../../src/moduler/aktivitet/avslutt/FullforAktivitet.tsx","../../src/felles-komponenter/Lenkepanel.tsx","../../src/moduler/aktivitet/ny-aktivitet/LeggTilForm.tsx","../../src/felles-komponenter/hooks/useConfirmOnBeforeUnload.ts","../../src/utils/object.ts","../../src/felles-komponenter/skjema/datovelger/ControlledDatePicker.tsx","../../src/felles-komponenter/skjema/datovelger/ControlledDateRangePicker.tsx","../../src/felles-komponenter/skjema/datovelger/MaybeAvtaltDateRangePicker.tsx","../../src/utils/avtaltResolver.ts","../../src/moduler/aktivitet/visning/aktivitetingress/AktivitetIngress.tsx","../../src/moduler/aktivitet/aktivitet-forms/AktivitetFormHeader.tsx","../../src/moduler/aktivitet/aktivitet-forms/LagreAktivitetKnapp.tsx","../../src/moduler/aktivitet/aktivitet-forms/ijobb/AktivitetIjobbForm.tsx","../../src/moduler/aktivitet/aktivitet-forms/behandling/MedisinskBehandlingForm.tsx","../../src/moduler/malverk/malverk-selector.ts","../../src/moduler/malverk/malverk.tsx","../../src/moduler/aktivitet/aktivitet-forms/egen/AktivitetEgenForm.tsx","../../src/moduler/aktivitet/aktivitet-forms/mote/HuskVarsleBruker.tsx","../../src/felles-komponenter/utils/EksternLenkeIkon.tsx","../../src/moduler/aktivitet/aktivitet-forms/mote/VideoInfo.tsx","../../src/moduler/aktivitet/aktivitet-forms/mote/MoteAktivitetForm.tsx","../../src/moduler/veileder/veileder-selector.ts","../../node_modules/@navikt/dab-spraksjekk/dist/spraksjekk.es.js","../../src/moduler/feature/feature-selector.ts","../../src/moduler/aktivitet/aktivitet-forms/samtalereferat/useReferatStartTekst.ts","../../src/moduler/aktivitet/aktivitet-forms/samtalereferat/InnerSamtalereferatForm.tsx","../../src/moduler/aktivitet/aktivitet-forms/samtalereferat/SamtalereferatForm.tsx","../../src/moduler/aktivitet/aktivitet-forms/sokeavtale/AktivitetSokeavtaleForm.tsx","../../src/moduler/aktivitet/aktivitet-forms/stilling/AktivitetStillingForm.tsx","../../src/moduler/aktivitet/ny-aktivitet/NyAktivitetForm.tsx","../../src/moduler/aktivitet/rediger/EndreAktivitet.tsx","../../src/moduler/context/dirty-context.tsx","../../src/moduler/aktivitet/visning/endre-linje/EndreLinje.tsx","../../src/moduler/aktivitet/visning/etikett-oppdatering/StillingEtikettForm.tsx","../../src/moduler/aktivitet/visning/etikett-oppdatering/OppdaterAktivitetEtikett.tsx","../../src/moduler/aktivitet/visning/soknadsstatus-oppdatering/SoknadsstatusForm.tsx","../../src/moduler/aktivitet/visning/soknadsstatus-oppdatering/OppdaterSoknadsstatus.tsx","../../src/moduler/aktivitet/visning/status-oppdatering/valideringUtils.ts","../../src/moduler/aktivitet/visning/status-oppdatering/AktivitetStatusForm.tsx","../../src/moduler/aktivitet/visning/status-oppdatering/OppdaterAktivitetStatus.tsx","../../src/moduler/aktivitet/aktivitet-versjoner/aktivitet-versjoner-selector.ts","../../src/moduler/aktivitet/visning/versjoner/brukeravhengigTekst.ts","../../src/moduler/aktivitet/visning/versjoner/Endringstekst.tsx","../../src/moduler/aktivitet/visning/versjoner/VersjonInnslag.tsx","../../src/moduler/aktivitet/visning/versjoner/VersjonerForAktivitet.tsx","../../src/moduler/aktivitet/visning/underelement-for-aktivitet/EndringsLogg.tsx","../../src/moduler/aktivitet/visning/AktivitetvisningAccordion.tsx","../../src/moduler/aktivitet/visning/dele-cv/tekster.ts","../../src/moduler/aktivitet/visning/dele-cv/DeleCVAvbruttVisning.tsx","../../src/moduler/aktivitet/visning/dele-cv/DeleCvSvarVisning.tsx","../../src/moduler/aktivitet/visning/dele-cv/SvarPaaVegneAvBruker.tsx","../../src/moduler/aktivitet/visning/dele-cv/MeldInteresseForStilling.tsx","../../src/moduler/aktivitet/visning/dele-cv/DeleCvContainer.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/ArenaStatusAdministrasjon.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/EksternAktivitetHandlingerKnapper.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/EndreAktivitetKnapp.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/LesMerOmStillingenKnapp.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/SendEnMeldingKnapp.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/ActionRad.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/forhaandsorientering/LestKnapp.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/forhaandsorientering/Forhaandsorienteringsvisning.tsx","../../src/moduler/aktivitet/visning/avtalt-container/ForhaandsorienteringsVisningsLinje.tsx","../../src/moduler/aktivitet/visning/avtalt-container/arena-aktivitet/KanIkkeLeggeTilForhaandsorienteringInfotekst.tsx","../../src/felles-komponenter/hooks/useBrukerDigital.ts","../../src/moduler/aktivitet/visning/avtalt-container/avtaltHooks.ts","../../src/moduler/aktivitet/visning/avtalt-container/VarslingInfo.tsx","../../src/moduler/aktivitet/visning/avtalt-container/aktivitet/ForhaandsorienteringsMelding.tsx","../../src/moduler/aktivitet/visning/avtalt-container/aktivitet/KanIkkeSendeForhaandsorienteringInfotekst.tsx","../../src/moduler/aktivitet/visning/avtalt-container/aktivitet/AvtaltForm.tsx","../../src/moduler/aktivitet/visning/avtalt-container/arena-aktivitet/ForhaandsorienteringsMeldingArenaaktivitet.tsx","../../src/moduler/aktivitet/visning/avtalt-container/aktivitet/ForhaandsorienteringForm.tsx","../../src/moduler/aktivitet/visning/avtalt-container/aktivitet/AvtaltFormContainer.tsx","../../src/moduler/aktivitet/visning/avtalt-container/arena-aktivitet/ArenaForhaandsorienteringFormKomponent.tsx","../../src/moduler/aktivitet/visning/avtalt-container/FormContainer.tsx","../../src/moduler/aktivitet/visning/avtalt-container/SattTilAvtaltInfotekst.tsx","../../src/moduler/aktivitet/visning/avtalt-container/SattTilAvtaltVisning.tsx","../../src/moduler/aktivitet/visning/avtalt-container/AvtaltContainer.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/DetaljFelt.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/Informasjonsfelt.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/standard-felt.tsx","../../src/moduler/aktivitet/visning/detaljer/BehandlingsDetaljer.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/DetaljvisningLenke.tsx","../../src/moduler/aktivitet/visning/detaljer/EgenAktivitetDetaljer.tsx","../../src/moduler/aktivitet/visning/eksternaktivitet/Detaljer.tsx","../../src/moduler/aktivitet/visning/eksternaktivitet/OppgaveBoks.tsx","../../src/moduler/aktivitet/visning/detaljer/EksternAktivitetDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/GruppeDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/IjobbDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/MoteDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/SamtalereferatDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/SokeDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/StillingDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/StillingFraNavDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/TiltakDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/UtdanningDetaljer.tsx","../../src/moduler/aktivitet/visning/detaljer/Aktivitetsdetaljer.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/AktivitetinformasjonVisning.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/begrunnelse-boks.tsx","../../src/moduler/aktivitet/visning/hjelpekomponenter/VarslingBoks.tsx","../../src/moduler/aktivitet/visning/referat/OppdaterReferatForm.tsx","../../src/felles-komponenter/EkspanderbartTekstomrade.tsx","../../src/moduler/aktivitet/visning/referat/ReferatVisning.tsx","../../src/moduler/aktivitet/visning/referat/ReferatContainer.tsx","../../src/moduler/aktivitet/visning/Aktivitetvisning.tsx","../../src/moduler/aktivitet/visning/AktivitetvisningModal.tsx","../../src/moduler/aktivitet/visning/AktivitetvisningContainer.tsx","../../src/moduler/mal/mal-visning.tsx","../../src/moduler/mal/MalForm.tsx","../../src/moduler/mal/mal-container.tsx","../../src/moduler/mal/mal-historikk.tsx","../../src/moduler/mal/mal-modal.tsx","../../src/moduler/mal/mal.tsx","../../src/moduler/utskrift/modalHeader.tsx","../../src/felles-komponenter/utils/StoreForbokstaver.tsx","../../src/moduler/utskrift/ikoner/logo.png","../../src/moduler/utskrift/print/adresse.tsx","../../src/moduler/utskrift/print/dialoger.tsx","../../src/moduler/utskrift/print/aktiviteter/AktivitetReferat.tsx","../../src/moduler/utskrift/print/aktiviteter/ForhaandsorienteringPrint.tsx","../../src/moduler/utskrift/print/aktiviteter/AktivitetPrint.tsx","../../src/moduler/utskrift/print/aktiviteter/Gruppe.tsx","../../src/moduler/utskrift/print/aktiviteter/Aktiviteter.tsx","../../src/moduler/utskrift/print/filter-utils.tsx","../../src/moduler/utskrift/print/malPrint.tsx","../../src/moduler/utskrift/print/print.tsx","../../src/moduler/utskrift/PrintMeldingForm.tsx","../../src/moduler/utskrift/velgPlan/utskriftValg.tsx","../../src/moduler/utskrift/velgPlan/KvpPlanValg.tsx","../../src/moduler/utskrift/velgPlan/VelgPlanUtskriftForm.tsx","../../src/moduler/utskrift/AktivitetsplanPrint.tsx","../../src/app.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isWeekend\n * @category Weekday Helpers\n * @summary Does the given date fall on a weekend?\n *\n * @description\n * Does the given date fall on a weekend?\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date falls on a weekend\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Does 5 October 2014 fall on a weekend?\n * const result = isWeekend(new Date(2014, 9, 5))\n * //=> true\n */\n\nexport default function isWeekend(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day === 0 || day === 6;\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setDate(date.getDate() - diff);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of an ISO week\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n return startOfWeek(dirtyDate, {\n weekStartsOn: 1\n });\n}","import toDate from \"../toDate/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the ISO week-numbering year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\n\nexport default function getISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getISOWeekYear from \"../getISOWeekYear/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of an ISO week-numbering year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\n\nexport default function startOfISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n var date = startOfISOWeek(fourthOfJanuary);\n return date;\n}","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n utcDate.setUTCFullYear(date.getFullYear());\n return date.getTime() - utcDate.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\n\nexport default function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var startOfDayLeft = startOfDay(dirtyDateLeft);\n var startOfDayRight = startOfDay(dirtyDateRight);\n var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight); // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n var days = amount * 7;\n return addDays(dirtyDate, days);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name max\n * @category Common Helpers\n * @summary Return the latest of the given dates.\n *\n * @description\n * Return the latest of the given dates.\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} the latest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the latest?\n * const result = max([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Sun Jul 02 1995 00:00:00\n */\n\nexport default function max(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (_typeof(dirtyDatesArray) === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n\n if (result === undefined || result < currentDate || isNaN(Number(currentDate))) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name min\n * @category Common Helpers\n * @summary Returns the earliest of the given dates.\n *\n * @description\n * Returns the earliest of the given dates.\n *\n * @param {Date[]|Number[]} datesArray - the dates to compare\n * @returns {Date} - the earliest of the dates\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which of these dates is the earliest?\n * const result = min([\n * new Date(1989, 6, 10),\n * new Date(1987, 1, 11),\n * new Date(1995, 6, 2),\n * new Date(1990, 0, 1)\n * ])\n * //=> Wed Feb 11 1987 00:00:00\n */\n\nexport default function min(dirtyDatesArray) {\n requiredArgs(1, arguments);\n var datesArray; // `dirtyDatesArray` is Array, Set or Map, or object with custom `forEach` method\n\n if (dirtyDatesArray && typeof dirtyDatesArray.forEach === 'function') {\n datesArray = dirtyDatesArray; // If `dirtyDatesArray` is Array-like Object, convert to Array.\n } else if (_typeof(dirtyDatesArray) === 'object' && dirtyDatesArray !== null) {\n datesArray = Array.prototype.slice.call(dirtyDatesArray);\n } else {\n // `dirtyDatesArray` is non-iterable, return Invalid Date\n return new Date(NaN);\n }\n\n var result;\n datesArray.forEach(function (dirtyDate) {\n var currentDate = toDate(dirtyDate);\n\n if (result === undefined || result > currentDate || isNaN(currentDate.getDate())) {\n result = currentDate;\n }\n });\n return result || new Date(NaN);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\n\nexport default function compareAsc(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var diff = dateLeft.getTime() - dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var daysInYear = 365.2425;\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInMinute = 60000;\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInHour = 3600000;\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInSecond = 1000;\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minTime = -maxTime;\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minutesInHour = 60;\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInQuarter = 3;\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInYear = 12;\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var quartersInYear = 4;\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInHour = 3600;\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMinute = 60;\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInDay = secondsInHour * 24;\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInWeek = secondsInDay * 7;\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInYear = secondsInDay * daysInYear;\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMonth = secondsInYear / 12;\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInQuarter = secondsInMonth * 3;","import startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameDay\n * @category Day Helpers\n * @summary Are the given dates in the same day (and year and month)?\n *\n * @description\n * Are the given dates in the same day (and year and month)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same day (and year and month)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))\n * //=> true\n *\n * @example\n * // Are 4 September and 4 October in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2014, 9, 4))\n * //=> false\n *\n * @example\n * // Are 4 September, 2014 and 4 September, 2015 in the same day?\n * const result = isSameDay(new Date(2014, 8, 4), new Date(2015, 8, 4))\n * //=> false\n */\n\nexport default function isSameDay(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeftStartOfDay = startOfDay(dirtyDateLeft);\n var dateRightStartOfDay = startOfDay(dirtyDateRight);\n return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n requiredArgs(1, arguments);\n return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n requiredArgs(1, arguments);\n\n if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n return false;\n }\n\n var date = toDate(dirtyDate);\n return !isNaN(Number(date));\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n return yearDiff * 12 + monthDiff;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @name differenceInCalendarWeeks\n * @category Week Helpers\n * @summary Get the number of calendar weeks between the given dates.\n *\n * @description\n * Get the number of calendar weeks between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // How many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5)\n * )\n * //=> 3\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInCalendarWeeks(\n * new Date(2014, 6, 20),\n * new Date(2014, 6, 5),\n * { weekStartsOn: 1 }\n * )\n * //=> 2\n */\n\nexport default function differenceInCalendarWeeks(dirtyDateLeft, dirtyDateRight, options) {\n requiredArgs(2, arguments);\n var startOfWeekLeft = startOfWeek(dirtyDateLeft, options);\n var startOfWeekRight = startOfWeek(dirtyDateRight, options);\n var timestampLeft = startOfWeekLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfWeekLeft);\n var timestampRight = startOfWeekRight.getTime() - getTimezoneOffsetInMilliseconds(startOfWeekRight); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_WEEK);\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarDays from \"../differenceInCalendarDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\n\nfunction compareLocalAsc(dateLeft, dateRight) {\n var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full days according to the local timezone\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n//=> 92\n */\n\n\nexport default function differenceInDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareLocalAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));\n dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);\n var result = sign * (difference - isLastDayNotFull); // Prevent negative zero\n\n return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n requiredArgs(2, arguments);\n return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n ceil: Math.ceil,\n round: Math.round,\n floor: Math.floor,\n trunc: function trunc(value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import { millisecondsInMinute } from \"../constants/index.js\";\nimport differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInMinutes\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the signed number of full (rounded towards 0) minutes between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of minutes\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * const result = differenceInMinutes(\n * new Date(2014, 6, 2, 12, 20, 0),\n * new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n *\n * @example\n * // How many minutes are between 10:01:59 and 10:00:00\n * const result = differenceInMinutes(\n * new Date(2000, 0, 1, 10, 0, 0),\n * new Date(2000, 0, 1, 10, 1, 59)\n * )\n * //=> -1\n */\n\nexport default function differenceInMinutes(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\nexport default function isLastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\n\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n var result; // Check for the difference of less than month\n\n if (difference < 1) {\n result = 0;\n } else {\n if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n dateLeft.setDate(30);\n }\n\n dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month\n\n if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n } // Prevent negative zero\n\n\n return result === 0 ? 0 : result;\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n requiredArgs(2, arguments);\n var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\n\nexport default function startOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var cleanDate = toDate(dirtyDate);\n var date = new Date(0);\n date.setFullYear(cleanDate.getFullYear(), 0, 1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\nexport default function endOfWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getDay();\n var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n date.setDate(date.getDate() + diff);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import endOfWeek from \"../endOfWeek/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the end of an ISO week for the given date.\n *\n * @description\n * Return the end of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of an ISO week\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of an ISO week for 2 September 2014 11:55:00:\n * const result = endOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Sep 07 2014 23:59:59.999\n */\n\nexport default function endOfISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n return endOfWeek(dirtyDate, {\n weekStartsOn: 1\n });\n}","import endOfDay from \"../endOfDay/index.js\";\n/**\n * @name endOfToday\n * @category Day Helpers\n * @summary Return the end of today.\n * @pure false\n *\n * @description\n * Return the end of today.\n *\n * > ⚠️ Please note that this function is not present in the FP submodule as\n * > it uses `Date.now()` internally hence impure and can't be safely curried.\n *\n * @returns {Date} the end of today\n *\n * @example\n * // If today is 6 October 2014:\n * const result = endOfToday()\n * //=> Mon Oct 6 2014 23:59:59.999\n */\n\nexport default function endOfToday() {\n return endOfDay(Date.now());\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var fourthOfJanuaryOfNextYear = new Date(0);\n fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n var fourthOfJanuaryOfThisYear = new Date(0);\n fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getUTCFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getUTCWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, options);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function M(date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function d(date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function a(date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function h(date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function H(date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function m(date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function s(date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function S(date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\nvar formatters = {\n // Era\n G: function G(date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function y(date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function Y(date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function R(date, token) {\n var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function u(date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function Q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function q(date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function M(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function L(date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function w(date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function I(date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function d(date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function D(date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function E(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function e(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function c(date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function i(date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function a(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function b(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function B(date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function h(date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function H(date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function K(date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function k(date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function m(date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return lightFormatters.m(date, token);\n },\n // Second\n s: function s(date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function S(date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function X(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function x(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function O(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function z(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function t(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function T(date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'P':\n return formatLong.date({\n width: 'short'\n });\n\n case 'PP':\n return formatLong.date({\n width: 'medium'\n });\n\n case 'PPP':\n return formatLong.date({\n width: 'long'\n });\n\n case 'PPPP':\n default:\n return formatLong.date({\n width: 'full'\n });\n }\n};\n\nvar timeLongFormatter = function timeLongFormatter(pattern, formatLong) {\n switch (pattern) {\n case 'p':\n return formatLong.time({\n width: 'short'\n });\n\n case 'pp':\n return formatLong.time({\n width: 'medium'\n });\n\n case 'ppp':\n return formatLong.time({\n width: 'long'\n });\n\n case 'pppp':\n default:\n return formatLong.time({\n width: 'full'\n });\n }\n};\n\nvar dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {\n var matchResult = pattern.match(/(P+)(p+)?/) || [];\n var datePattern = matchResult[1];\n var timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n var dateTimeFormat;\n\n switch (datePattern) {\n case 'P':\n dateTimeFormat = formatLong.dateTime({\n width: 'short'\n });\n break;\n\n case 'PP':\n dateTimeFormat = formatLong.dateTime({\n width: 'medium'\n });\n break;\n\n case 'PPP':\n dateTimeFormat = formatLong.dateTime({\n width: 'long'\n });\n break;\n\n case 'PPPP':\n default:\n dateTimeFormat = formatLong.dateTime({\n width: 'full'\n });\n break;\n }\n\n return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\n\nvar longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter\n};\nexport default longFormatters;","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n if (token === 'YYYY') {\n throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'YY') {\n throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'D') {\n throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n } else if (token === 'DD') {\n throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n }\n}","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'less than a second',\n other: 'less than {{count}} seconds'\n },\n xSeconds: {\n one: '1 second',\n other: '{{count}} seconds'\n },\n halfAMinute: 'half a minute',\n lessThanXMinutes: {\n one: 'less than a minute',\n other: 'less than {{count}} minutes'\n },\n xMinutes: {\n one: '1 minute',\n other: '{{count}} minutes'\n },\n aboutXHours: {\n one: 'about 1 hour',\n other: 'about {{count}} hours'\n },\n xHours: {\n one: '1 hour',\n other: '{{count}} hours'\n },\n xDays: {\n one: '1 day',\n other: '{{count}} days'\n },\n aboutXWeeks: {\n one: 'about 1 week',\n other: 'about {{count}} weeks'\n },\n xWeeks: {\n one: '1 week',\n other: '{{count}} weeks'\n },\n aboutXMonths: {\n one: 'about 1 month',\n other: 'about {{count}} months'\n },\n xMonths: {\n one: '1 month',\n other: '{{count}} months'\n },\n aboutXYears: {\n one: 'about 1 year',\n other: 'about {{count}} years'\n },\n xYears: {\n one: '1 year',\n other: '{{count}} years'\n },\n overXYears: {\n one: 'over 1 year',\n other: 'over {{count}} years'\n },\n almostXYears: {\n one: 'almost 1 year',\n other: 'almost {{count}} years'\n }\n};\n\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', count.toString());\n }\n\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'in ' + result;\n } else {\n return result + ' ago';\n }\n }\n\n return result;\n};\n\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, MMMM do, y',\n long: 'MMMM do, y',\n medium: 'MMM d, y',\n short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n full: 'h:mm:ss a zzzz',\n long: 'h:mm:ss a z',\n medium: 'h:mm:ss a',\n short: 'h:mm a'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: 'P'\n};\n\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['B', 'A'],\n abbreviated: ['BC', 'AD'],\n wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n }\n};\nvar formattingDayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'mi',\n noon: 'n',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n abbreviated: {\n am: 'AM',\n pm: 'PM',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'in the morning',\n afternoon: 'in the afternoon',\n evening: 'in the evening',\n night: 'at night'\n }\n};\n\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n var rem100 = number % 100;\n\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + 'st';\n\n case 2:\n return number + 'nd';\n\n case 3:\n return number + 'rd';\n }\n }\n\n return number + 'th';\n};\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide',\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: 'wide'\n })\n};\nexport default localize;","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\nvar locale = {\n code: 'en-US',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0\n /* Sunday */\n ,\n firstWeekContainsDate: 1\n }\n};\nexport default locale;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = formatters[firstCharacter];\n\n if (formatter) {\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n var matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","export default function assign(target, object) {\n if (target == null) {\n throw new TypeError('assign requires that input parameter not be null or undefined');\n }\n\n for (var property in object) {\n if (Object.prototype.hasOwnProperty.call(object, property)) {\n ;\n target[property] = object[property];\n }\n }\n\n return target;\n}","import assign from \"../assign/index.js\";\nexport default function cloneObject(object) {\n return assign({}, object);\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport differenceInMonths from \"../differenceInMonths/index.js\";\nimport differenceInSeconds from \"../differenceInSeconds/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport cloneObject from \"../_lib/cloneObject/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MINUTES_IN_DAY = 1440;\nvar MINUTES_IN_ALMOST_TWO_DAYS = 2520;\nvar MINUTES_IN_MONTH = 43200;\nvar MINUTES_IN_TWO_MONTHS = 86400;\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @param {Date|Number} date - the date\n * @param {Date|Number} baseDate - the date to compare with\n * @param {Object} [options] - an object with options.\n * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed\n * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @returns {String} the distance in words\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `baseDate` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport default function formatDistance(dirtyDate, dirtyBaseDate, options) {\n var _ref, _options$locale;\n\n requiredArgs(2, arguments);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n\n if (!locale.formatDistance) {\n throw new RangeError('locale must contain formatDistance property');\n }\n\n var comparison = compareAsc(dirtyDate, dirtyBaseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError('Invalid time value');\n }\n\n var localizeOptions = assign(cloneObject(options), {\n addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix),\n comparison: comparison\n });\n var dateLeft;\n var dateRight;\n\n if (comparison > 0) {\n dateLeft = toDate(dirtyBaseDate);\n dateRight = toDate(dirtyDate);\n } else {\n dateLeft = toDate(dirtyDate);\n dateRight = toDate(dirtyBaseDate);\n }\n\n var seconds = differenceInSeconds(dateRight, dateLeft);\n var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;\n var minutes = Math.round((seconds - offsetInSeconds) / 60);\n var months; // 0 up to 2 mins\n\n if (minutes < 2) {\n if (options !== null && options !== void 0 && options.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance('lessThanXSeconds', 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance('lessThanXSeconds', 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance('lessThanXSeconds', 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance('halfAMinute', 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance('lessThanXMinutes', 1, localizeOptions);\n } else {\n return locale.formatDistance('xMinutes', minutes, localizeOptions);\n }\n } // 2 mins up to 0.75 hrs\n\n } else if (minutes < 45) {\n return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs\n } else if (minutes < MINUTES_IN_DAY) {\n var hours = Math.round(minutes / 60);\n return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days\n } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {\n return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days\n } else if (minutes < MINUTES_IN_MONTH) {\n var days = Math.round(minutes / MINUTES_IN_DAY);\n return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months\n } else if (minutes < MINUTES_IN_TWO_MONTHS) {\n months = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('aboutXMonths', months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months\n\n if (months < 12) {\n var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);\n return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date\n } else {\n var monthsSinceStartOfYear = months % 12;\n var years = Math.floor(months / 12); // N years up to 1 years 3 months\n\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance('almostXYears', years + 1, localizeOptions);\n }\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport startOfISOWeek from \"../startOfISOWeek/index.js\";\nimport startOfISOWeekYear from \"../startOfISOWeekYear/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the ISO week\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\n\nexport default function getISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfISOWeek(date).getTime() - startOfISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getTime\n * @category Timestamp Helpers\n * @summary Get the milliseconds timestamp of the given date.\n *\n * @description\n * Get the milliseconds timestamp of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the timestamp\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05.123:\n * const result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))\n * //=> 1330515905123\n */\n\nexport default function getTime(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n return timestamp;\n}","import getTime from \"../getTime/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getUnixTime\n * @category Timestamp Helpers\n * @summary Get the seconds timestamp of the given date.\n *\n * @description\n * Get the seconds timestamp of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the timestamp\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Get the timestamp of 29 February 2012 11:45:05 CET:\n * const result = getUnixTime(new Date(2012, 1, 29, 11, 45, 5))\n * //=> 1330512305\n */\n\nexport default function getUnixTime(dirtyDate) {\n requiredArgs(1, arguments);\n return Math.floor(getTime(dirtyDate) / 1000);\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Number} the local week-numbering year\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\n\nexport default function getWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var firstWeekOfNextYear = new Date(0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n var startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n var firstWeekOfThisYear = new Date(0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n var startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}","import getWeekYear from \"../getWeekYear/index.js\";\nimport startOfWeek from \"../startOfWeek/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Date} the start of a week-numbering year\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\n\nexport default function startOfWeekYear(dirtyDate, options) {\n var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(1, arguments);\n var defaultOptions = getDefaultOptions();\n var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n var year = getWeekYear(dirtyDate, options);\n var firstWeek = new Date(0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n var date = startOfWeek(firstWeek, options);\n return date;\n}","import startOfWeek from \"../startOfWeek/index.js\";\nimport startOfWeekYear from \"../startOfWeekYear/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#Week_numbering\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @returns {Number} the week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\n\nexport default function getWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfWeek(date, options).getTime() - startOfWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name lastDayOfMonth\n * @category Month Helpers\n * @summary Return the last day of a month for the given date.\n *\n * @description\n * Return the last day of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The last day of a month for 2 September 2014 11:55:00:\n * const result = lastDayOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 00:00:00\n */\n\nexport default function lastDayOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import differenceInCalendarWeeks from \"../differenceInCalendarWeeks/index.js\";\nimport lastDayOfMonth from \"../lastDayOfMonth/index.js\";\nimport startOfMonth from \"../startOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name getWeeksInMonth\n * @category Week Helpers\n * @summary Get the number of calendar weeks a month spans.\n *\n * @description\n * Get the number of calendar weeks the month in the given date spans.\n *\n * @param {Date|Number} date - the given date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Number} the number of calendar weeks\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // How many calendar weeks does February 2015 span?\n * const result = getWeeksInMonth(new Date(2015, 1, 8))\n * //=> 4\n *\n * @example\n * // If the week starts on Monday,\n * // how many calendar weeks does July 2017 span?\n * const result = getWeeksInMonth(new Date(2017, 6, 5), { weekStartsOn: 1 })\n * //=> 6\n */\nexport default function getWeeksInMonth(date, options) {\n requiredArgs(1, arguments);\n return differenceInCalendarWeeks(lastDayOfMonth(date), startOfMonth(date), options) + 1;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\n\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isBefore\n * @category Common Helpers\n * @summary Is the first date before the second one?\n *\n * @description\n * Is the first date before the second one?\n *\n * @param {Date|Number} date - the date that should be before the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is before the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 before 11 February 1987?\n * const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> false\n */\n\nexport default function isBefore(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() < dateToCompare.getTime();\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar TIMEZONE_UNIT_PRIORITY = 10;\nexport var Setter = /*#__PURE__*/function () {\n function Setter() {\n _classCallCheck(this, Setter);\n\n _defineProperty(this, \"subPriority\", 0);\n }\n\n _createClass(Setter, [{\n key: \"validate\",\n value: function validate(_utcDate, _options) {\n return true;\n }\n }]);\n\n return Setter;\n}();\nexport var ValueSetter = /*#__PURE__*/function (_Setter) {\n _inherits(ValueSetter, _Setter);\n\n var _super = _createSuper(ValueSetter);\n\n function ValueSetter(value, validateValue, setValue, priority, subPriority) {\n var _this;\n\n _classCallCheck(this, ValueSetter);\n\n _this = _super.call(this);\n _this.value = value;\n _this.validateValue = validateValue;\n _this.setValue = setValue;\n _this.priority = priority;\n\n if (subPriority) {\n _this.subPriority = subPriority;\n }\n\n return _this;\n }\n\n _createClass(ValueSetter, [{\n key: \"validate\",\n value: function validate(utcDate, options) {\n return this.validateValue(utcDate, this.value, options);\n }\n }, {\n key: \"set\",\n value: function set(utcDate, flags, options) {\n return this.setValue(utcDate, flags, this.value, options);\n }\n }]);\n\n return ValueSetter;\n}(Setter);\nexport var DateToSystemTimezoneSetter = /*#__PURE__*/function (_Setter2) {\n _inherits(DateToSystemTimezoneSetter, _Setter2);\n\n var _super2 = _createSuper(DateToSystemTimezoneSetter);\n\n function DateToSystemTimezoneSetter() {\n var _this2;\n\n _classCallCheck(this, DateToSystemTimezoneSetter);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2 = _super2.call.apply(_super2, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this2), \"priority\", TIMEZONE_UNIT_PRIORITY);\n\n _defineProperty(_assertThisInitialized(_this2), \"subPriority\", -1);\n\n return _this2;\n }\n\n _createClass(DateToSystemTimezoneSetter, [{\n key: \"set\",\n value: function set(date, flags) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n var convertedDate = new Date(0);\n convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n return convertedDate;\n }\n }]);\n\n return DateToSystemTimezoneSetter;\n}(Setter);","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport { ValueSetter } from \"./Setter.js\";\nexport var Parser = /*#__PURE__*/function () {\n function Parser() {\n _classCallCheck(this, Parser);\n }\n\n _createClass(Parser, [{\n key: \"run\",\n value: function run(dateString, token, match, options) {\n var result = this.parse(dateString, token, match, options);\n\n if (!result) {\n return null;\n }\n\n return {\n setter: new ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority),\n rest: result.rest\n };\n }\n }, {\n key: \"validate\",\n value: function validate(_utcDate, _value, _options) {\n return true;\n }\n }]);\n\n return Parser;\n}();","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nexport var EraParser = /*#__PURE__*/function (_Parser) {\n _inherits(EraParser, _Parser);\n\n var _super = _createSuper(EraParser);\n\n function EraParser() {\n var _this;\n\n _classCallCheck(this, EraParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 140);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['R', 'u', 't', 'T']);\n\n return _this;\n }\n\n _createClass(EraParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n // A, B\n\n case 'GGGGG':\n return match.era(dateString, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return match.era(dateString, {\n width: 'wide'\n }) || match.era(dateString, {\n width: 'abbreviated'\n }) || match.era(dateString, {\n width: 'narrow'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n flags.era = value;\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return EraParser;\n}(Parser);","export var numericPatterns = {\n month: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n date: /^(3[0-1]|[0-2]?\\d)/,\n // 0 to 31\n dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/,\n // 0 to 366\n week: /^(5[0-3]|[0-4]?\\d)/,\n // 0 to 53\n hour23h: /^(2[0-3]|[0-1]?\\d)/,\n // 0 to 23\n hour24h: /^(2[0-4]|[0-1]?\\d)/,\n // 0 to 24\n hour11h: /^(1[0-1]|0?\\d)/,\n // 0 to 11\n hour12h: /^(1[0-2]|0?\\d)/,\n // 0 to 12\n minute: /^[0-5]?\\d/,\n // 0 to 59\n second: /^[0-5]?\\d/,\n // 0 to 59\n singleDigit: /^\\d/,\n // 0 to 9\n twoDigits: /^\\d{1,2}/,\n // 0 to 99\n threeDigits: /^\\d{1,3}/,\n // 0 to 999\n fourDigits: /^\\d{1,4}/,\n // 0 to 9999\n anyDigitsSigned: /^-?\\d+/,\n singleDigitSigned: /^-?\\d/,\n // 0 to 9, -0 to -9\n twoDigitsSigned: /^-?\\d{1,2}/,\n // 0 to 99, -0 to -99\n threeDigitsSigned: /^-?\\d{1,3}/,\n // 0 to 999, -0 to -999\n fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n\n};\nexport var timezonePatterns = {\n basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};","import { millisecondsInHour, millisecondsInMinute, millisecondsInSecond } from \"../../constants/index.js\";\nimport { numericPatterns } from \"./constants.js\";\nexport function mapValue(parseFnResult, mapFn) {\n if (!parseFnResult) {\n return parseFnResult;\n }\n\n return {\n value: mapFn(parseFnResult.value),\n rest: parseFnResult.rest\n };\n}\nexport function parseNumericPattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n }\n\n return {\n value: parseInt(matchResult[0], 10),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseTimezonePattern(pattern, dateString) {\n var matchResult = dateString.match(pattern);\n\n if (!matchResult) {\n return null;\n } // Input is 'Z'\n\n\n if (matchResult[0] === 'Z') {\n return {\n value: 0,\n rest: dateString.slice(1)\n };\n }\n\n var sign = matchResult[1] === '+' ? 1 : -1;\n var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n return {\n value: sign * (hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond),\n rest: dateString.slice(matchResult[0].length)\n };\n}\nexport function parseAnyDigitsSigned(dateString) {\n return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\nexport function parseNDigits(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigit, dateString);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigits, dateString);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigits, dateString);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigits, dateString);\n\n default:\n return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function parseNDigitsSigned(n, dateString) {\n switch (n) {\n case 1:\n return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n\n case 2:\n return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n\n case 3:\n return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n\n case 4:\n return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n\n default:\n return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), dateString);\n }\n}\nexport function dayPeriodEnumToHours(dayPeriod) {\n switch (dayPeriod) {\n case 'morning':\n return 4;\n\n case 'evening':\n return 17;\n\n case 'pm':\n case 'noon':\n case 'afternoon':\n return 12;\n\n case 'am':\n case 'midnight':\n case 'night':\n default:\n return 0;\n }\n}\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n var isCommonEra = currentYear > 0; // Absolute number of the current year:\n // 1 -> 1 AC\n // 0 -> 1 BC\n // -1 -> 2 BC\n\n var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n var result;\n\n if (absCurrentYear <= 50) {\n result = twoDigitYear || 100;\n } else {\n var rangeEnd = absCurrentYear + 50;\n var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n }\n\n return isCommonEra ? result : 1 - result;\n}\nexport function isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\";\n// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year | y | yy | yyy | yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\nexport var YearParser = /*#__PURE__*/function (_Parser) {\n _inherits(YearParser, _Parser);\n\n var _super = _createSuper(YearParser);\n\n function YearParser() {\n var _this;\n\n _classCallCheck(this, YearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(YearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'yy'\n };\n };\n\n switch (token) {\n case 'y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n\n case 'yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n var currentYear = date.getUTCFullYear();\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return YearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits, normalizeTwoDigitYear, mapValue } from \"../utils.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\";\n// Local week-numbering year\nexport var LocalWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekYearParser, _Parser);\n\n var _super = _createSuper(LocalWeekYearParser);\n\n function LocalWeekYearParser() {\n var _this;\n\n _classCallCheck(this, LocalWeekYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n\n return _this;\n }\n\n _createClass(LocalWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(year) {\n return {\n year: year,\n isTwoDigitYear: token === 'YY'\n };\n };\n\n switch (token) {\n case 'Y':\n return mapValue(parseNDigits(4, dateString), valueCallback);\n\n case 'Yo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'year'\n }), valueCallback);\n\n default:\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value.isTwoDigitYear || value.year > 0;\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value, options) {\n var currentYear = getUTCWeekYear(date, options);\n\n if (value.isTwoDigitYear) {\n var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n\n var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n date.setUTCHours(0, 0, 0, 0);\n return startOfUTCWeek(date, options);\n }\n }]);\n\n return LocalWeekYearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week-numbering year\n\nexport var ISOWeekYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekYearParser, _Parser);\n\n var _super = _createSuper(ISOWeekYearParser);\n\n function ISOWeekYearParser() {\n var _this;\n\n _classCallCheck(this, ISOWeekYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ISOWeekYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'R') {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n var firstWeekOfYear = new Date(0);\n firstWeekOfYear.setUTCFullYear(value, 0, 4);\n firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n return startOfUTCISOWeek(firstWeekOfYear);\n }\n }]);\n\n return ISOWeekYearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nexport var ExtendedYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(ExtendedYearParser, _Parser);\n\n var _super = _createSuper(ExtendedYearParser);\n\n function ExtendedYearParser() {\n var _this;\n\n _classCallCheck(this, ExtendedYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 130);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ExtendedYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n if (token === 'u') {\n return parseNDigitsSigned(4, dateString);\n }\n\n return parseNDigitsSigned(token.length, dateString);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCFullYear(value, 0, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return ExtendedYearParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var QuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(QuarterParser, _Parser);\n\n var _super = _createSuper(QuarterParser);\n\n function QuarterParser() {\n var _this;\n\n _classCallCheck(this, QuarterParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(QuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n case 'QQ':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return QuarterParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport var StandAloneQuarterParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneQuarterParser, _Parser);\n\n var _super = _createSuper(StandAloneQuarterParser);\n\n function StandAloneQuarterParser() {\n var _this;\n\n _classCallCheck(this, StandAloneQuarterParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 120);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(StandAloneQuarterParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n case 'qq':\n // 01, 02, 03, 04\n return parseNDigits(token.length, dateString);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return match.ordinalNumber(dateString, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return match.quarter(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.quarter(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 4;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth((value - 1) * 3, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return StandAloneQuarterParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nexport var MonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(MonthParser, _Parser);\n\n var _super = _createSuper(MonthParser);\n\n function MonthParser() {\n var _this;\n\n _classCallCheck(this, MonthParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n\n return _this;\n }\n\n _createClass(MonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'M':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n\n case 'MM':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return MonthParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, mapValue } from \"../utils.js\";\nexport var StandAloneMonthParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneMonthParser, _Parser);\n\n var _super = _createSuper(StandAloneMonthParser);\n\n function StandAloneMonthParser() {\n var _this;\n\n _classCallCheck(this, StandAloneMonthParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 110);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(StandAloneMonthParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n return value - 1;\n };\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n // 01, 02, ..., 12\n\n case 'LL':\n return mapValue(parseNDigits(2, dateString), valueCallback);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'month'\n }), valueCallback);\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return match.month(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.month(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(value, 1);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return StandAloneMonthParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCWeek from \"../getUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCWeek(dirtyDate, dirtyWeek, options) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var week = toInteger(dirtyWeek);\n var diff = getUTCWeek(date, options) - week;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCWeek from \"../../../_lib/setUTCWeek/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\"; // Local week of year\n\nexport var LocalWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalWeekParser, _Parser);\n\n var _super = _createSuper(LocalWeekParser);\n\n function LocalWeekParser() {\n var _this;\n\n _classCallCheck(this, LocalWeekParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n\n return _this;\n }\n\n _createClass(LocalWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'w':\n return parseNumericPattern(numericPatterns.week, dateString);\n\n case 'wo':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n return startOfUTCWeek(setUTCWeek(date, value, options), options);\n }\n }]);\n\n return LocalWeekParser;\n}(Parser);","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCISOWeek from \"../getUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var isoWeek = toInteger(dirtyISOWeek);\n var diff = getUTCISOWeek(date) - isoWeek;\n date.setUTCDate(date.getUTCDate() - diff * 7);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCISOWeek from \"../../../_lib/setUTCISOWeek/index.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week of year\n\nexport var ISOWeekParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOWeekParser, _Parser);\n\n var _super = _createSuper(ISOWeekParser);\n\n function ISOWeekParser() {\n var _this;\n\n _classCallCheck(this, ISOWeekParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 100);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ISOWeekParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'I':\n return parseNumericPattern(numericPatterns.week, dateString);\n\n case 'Io':\n return match.ordinalNumber(dateString, {\n unit: 'week'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 53;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n return startOfUTCISOWeek(setUTCISOWeek(date, value));\n }\n }]);\n\n return ISOWeekParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { isLeapYearIndex, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // Day of the month\n\nexport var DateParser = /*#__PURE__*/function (_Parser) {\n _inherits(DateParser, _Parser);\n\n var _super = _createSuper(DateParser);\n\n function DateParser() {\n var _this;\n\n _classCallCheck(this, DateParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"subPriority\", 1);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DateParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'd':\n return parseNumericPattern(numericPatterns.date, dateString);\n\n case 'do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n var month = date.getUTCMonth();\n\n if (isLeapYear) {\n return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n } else {\n return value >= 1 && value <= DAYS_IN_MONTH[month];\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCDate(value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return DateParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, isLeapYearIndex } from \"../utils.js\";\nexport var DayOfYearParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayOfYearParser, _Parser);\n\n var _super = _createSuper(DayOfYearParser);\n\n function DayOfYearParser() {\n var _this;\n\n _classCallCheck(this, DayOfYearParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"subpriority\", 1);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DayOfYearParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'D':\n case 'DD':\n return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n\n case 'Do':\n return match.ordinalNumber(dateString, {\n unit: 'date'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(date, value) {\n var year = date.getUTCFullYear();\n var isLeapYear = isLeapYearIndex(year);\n\n if (isLeapYear) {\n return value >= 1 && value <= 366;\n } else {\n return value >= 1 && value <= 365;\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMonth(0, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return DayOfYearParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function setUTCDay(dirtyDate, dirtyDay, options) {\n var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n requiredArgs(2, arguments);\n var defaultOptions = getDefaultOptions();\n var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = toDate(dirtyDate);\n var day = toInteger(dirtyDay);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Day of week\n\nexport var DayParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayParser, _Parser);\n\n var _super = _createSuper(DayParser);\n\n function DayParser() {\n var _this;\n\n _classCallCheck(this, DayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['D', 'i', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return DayParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Local day of week\n\nexport var LocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(LocalDayParser, _Parser);\n\n var _super = _createSuper(LocalDayParser);\n\n function LocalDayParser() {\n var _this;\n\n _classCallCheck(this, LocalDayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(LocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'e':\n case 'ee':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n\n case 'eo':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n\n case 'eee':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return LocalDayParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Stand-alone local day of week\n\nexport var StandAloneLocalDayParser = /*#__PURE__*/function (_Parser) {\n _inherits(StandAloneLocalDayParser, _Parser);\n\n var _super = _createSuper(StandAloneLocalDayParser);\n\n function StandAloneLocalDayParser() {\n var _this;\n\n _classCallCheck(this, StandAloneLocalDayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']);\n\n return _this;\n }\n\n _createClass(StandAloneLocalDayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match, options) {\n var valueCallback = function valueCallback(value) {\n var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n };\n\n switch (token) {\n // 3\n case 'c':\n case 'cc':\n // 03\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n // 3rd\n\n case 'co':\n return mapValue(match.ordinalNumber(dateString, {\n unit: 'day'\n }), valueCallback);\n // Tue\n\n case 'ccc':\n return match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return match.day(dateString, {\n width: 'wide',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'short',\n context: 'standalone'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'standalone'\n });\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 6;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value, options) {\n date = setUTCDay(date, value, options);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return StandAloneLocalDayParser;\n}(Parser);","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nexport default function setUTCISODay(dirtyDate, dirtyDay) {\n requiredArgs(2, arguments);\n var day = toInteger(dirtyDay);\n\n if (day % 7 === 0) {\n day = day - 7;\n }\n\n var weekStartsOn = 1;\n var date = toDate(dirtyDate);\n var currentDay = date.getUTCDay();\n var remainder = day % 7;\n var dayIndex = (remainder + 7) % 7;\n var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCISODay from \"../../../_lib/setUTCISODay/index.js\"; // ISO day of week\n\nexport var ISODayParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISODayParser, _Parser);\n\n var _super = _createSuper(ISODayParser);\n\n function ISODayParser() {\n var _this;\n\n _classCallCheck(this, ISODayParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 90);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']);\n\n return _this;\n }\n\n _createClass(ISODayParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n var valueCallback = function valueCallback(value) {\n if (value === 0) {\n return 7;\n }\n\n return value;\n };\n\n switch (token) {\n // 2\n case 'i':\n case 'ii':\n // 02\n return parseNDigits(token.length, dateString);\n // 2nd\n\n case 'io':\n return match.ordinalNumber(dateString, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return mapValue(match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // T\n\n case 'iiiii':\n return mapValue(match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tu\n\n case 'iiiiii':\n return mapValue(match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n // Tuesday\n\n case 'iiii':\n default:\n return mapValue(match.day(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'short',\n context: 'formatting'\n }) || match.day(dateString, {\n width: 'narrow',\n context: 'formatting'\n }), valueCallback);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 7;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date = setUTCISODay(date, value);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n }\n }]);\n\n return ISODayParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMParser, _Parser);\n\n var _super = _createSuper(AMPMParser);\n\n function AMPMParser() {\n var _this;\n\n _classCallCheck(this, AMPMParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['b', 'B', 'H', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(AMPMParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'a':\n case 'aa':\n case 'aaa':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaaa':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n\n return AMPMParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport var AMPMMidnightParser = /*#__PURE__*/function (_Parser) {\n _inherits(AMPMMidnightParser, _Parser);\n\n var _super = _createSuper(AMPMMidnightParser);\n\n function AMPMMidnightParser() {\n var _this;\n\n _classCallCheck(this, AMPMMidnightParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'B', 'H', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(AMPMMidnightParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'b':\n case 'bb':\n case 'bbb':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbbb':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n\n return AMPMMidnightParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\"; // in the morning, in the afternoon, in the evening, at night\n\nexport var DayPeriodParser = /*#__PURE__*/function (_Parser) {\n _inherits(DayPeriodParser, _Parser);\n\n var _super = _createSuper(DayPeriodParser);\n\n function DayPeriodParser() {\n var _this;\n\n _classCallCheck(this, DayPeriodParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 80);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 't', 'T']);\n\n return _this;\n }\n\n _createClass(DayPeriodParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return match.dayPeriod(dateString, {\n width: 'wide',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'abbreviated',\n context: 'formatting'\n }) || match.dayPeriod(dateString, {\n width: 'narrow',\n context: 'formatting'\n });\n }\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n return date;\n }\n }]);\n\n return DayPeriodParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1to12Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1to12Parser, _Parser);\n\n var _super = _createSuper(Hour1to12Parser);\n\n function Hour1to12Parser() {\n var _this;\n\n _classCallCheck(this, Hour1to12Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['H', 'K', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour1to12Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'h':\n return parseNumericPattern(numericPatterns.hour12h, dateString);\n\n case 'ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 12;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else if (!isPM && value === 12) {\n date.setUTCHours(0, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n }\n }]);\n\n return Hour1to12Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0to23Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0to23Parser, _Parser);\n\n var _super = _createSuper(Hour0to23Parser);\n\n function Hour0to23Parser() {\n var _this;\n\n _classCallCheck(this, Hour0to23Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'K', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour0to23Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'H':\n return parseNumericPattern(numericPatterns.hour23h, dateString);\n\n case 'Ho':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 23;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCHours(value, 0, 0, 0);\n return date;\n }\n }]);\n\n return Hour0to23Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour0To11Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour0To11Parser, _Parser);\n\n var _super = _createSuper(Hour0To11Parser);\n\n function Hour0To11Parser() {\n var _this;\n\n _classCallCheck(this, Hour0To11Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['h', 'H', 'k', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour0To11Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'K':\n return parseNumericPattern(numericPatterns.hour11h, dateString);\n\n case 'Ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 11;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var isPM = date.getUTCHours() >= 12;\n\n if (isPM && value < 12) {\n date.setUTCHours(value + 12, 0, 0, 0);\n } else {\n date.setUTCHours(value, 0, 0, 0);\n }\n\n return date;\n }\n }]);\n\n return Hour0To11Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var Hour1To24Parser = /*#__PURE__*/function (_Parser) {\n _inherits(Hour1To24Parser, _Parser);\n\n var _super = _createSuper(Hour1To24Parser);\n\n function Hour1To24Parser() {\n var _this;\n\n _classCallCheck(this, Hour1To24Parser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 70);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['a', 'b', 'h', 'H', 'K', 't', 'T']);\n\n return _this;\n }\n\n _createClass(Hour1To24Parser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'k':\n return parseNumericPattern(numericPatterns.hour24h, dateString);\n\n case 'ko':\n return match.ordinalNumber(dateString, {\n unit: 'hour'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 1 && value <= 24;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n var hours = value <= 24 ? value % 24 : value;\n date.setUTCHours(hours, 0, 0, 0);\n return date;\n }\n }]);\n\n return Hour1To24Parser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var MinuteParser = /*#__PURE__*/function (_Parser) {\n _inherits(MinuteParser, _Parser);\n\n var _super = _createSuper(MinuteParser);\n\n function MinuteParser() {\n var _this;\n\n _classCallCheck(this, MinuteParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 60);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n\n return _this;\n }\n\n _createClass(MinuteParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 'm':\n return parseNumericPattern(numericPatterns.minute, dateString);\n\n case 'mo':\n return match.ordinalNumber(dateString, {\n unit: 'minute'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMinutes(value, 0, 0);\n return date;\n }\n }]);\n\n return MinuteParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport var SecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(SecondParser, _Parser);\n\n var _super = _createSuper(SecondParser);\n\n function SecondParser() {\n var _this;\n\n _classCallCheck(this, SecondParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 50);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n\n return _this;\n }\n\n _createClass(SecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token, match) {\n switch (token) {\n case 's':\n return parseNumericPattern(numericPatterns.second, dateString);\n\n case 'so':\n return match.ordinalNumber(dateString, {\n unit: 'second'\n });\n\n default:\n return parseNDigits(token.length, dateString);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(_date, value) {\n return value >= 0 && value <= 59;\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCSeconds(value, 0);\n return date;\n }\n }]);\n\n return SecondParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nexport var FractionOfSecondParser = /*#__PURE__*/function (_Parser) {\n _inherits(FractionOfSecondParser, _Parser);\n\n var _super = _createSuper(FractionOfSecondParser);\n\n function FractionOfSecondParser() {\n var _this;\n\n _classCallCheck(this, FractionOfSecondParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 30);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T']);\n\n return _this;\n }\n\n _createClass(FractionOfSecondParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n var valueCallback = function valueCallback(value) {\n return Math.floor(value * Math.pow(10, -token.length + 3));\n };\n\n return mapValue(parseNDigits(token.length, dateString), valueCallback);\n }\n }, {\n key: \"set\",\n value: function set(date, _flags, value) {\n date.setUTCMilliseconds(value);\n return date;\n }\n }]);\n\n return FractionOfSecondParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601. +00:00 is `'Z'`)\n\nexport var ISOTimezoneWithZParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneWithZParser, _Parser);\n\n var _super = _createSuper(ISOTimezoneWithZParser);\n\n function ISOTimezoneWithZParser() {\n var _this;\n\n _classCallCheck(this, ISOTimezoneWithZParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'x']);\n\n return _this;\n }\n\n _createClass(ISOTimezoneWithZParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'X':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n\n case 'XX':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n\n case 'XXXX':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n\n case 'XXXXX':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n\n case 'XXX':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n }\n }]);\n\n return ISOTimezoneWithZParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601)\n\nexport var ISOTimezoneParser = /*#__PURE__*/function (_Parser) {\n _inherits(ISOTimezoneParser, _Parser);\n\n var _super = _createSuper(ISOTimezoneParser);\n\n function ISOTimezoneParser() {\n var _this;\n\n _classCallCheck(this, ISOTimezoneParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 10);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", ['t', 'T', 'X']);\n\n return _this;\n }\n\n _createClass(ISOTimezoneParser, [{\n key: \"parse\",\n value: function parse(dateString, token) {\n switch (token) {\n case 'x':\n return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n\n case 'xx':\n return parseTimezonePattern(timezonePatterns.basic, dateString);\n\n case 'xxxx':\n return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n\n case 'xxxxx':\n return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n\n case 'xxx':\n default:\n return parseTimezonePattern(timezonePatterns.extended, dateString);\n }\n }\n }, {\n key: \"set\",\n value: function set(date, flags, value) {\n if (flags.timestampIsSet) {\n return date;\n }\n\n return new Date(date.getTime() - value);\n }\n }]);\n\n return ISOTimezoneParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampSecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampSecondsParser, _Parser);\n\n var _super = _createSuper(TimestampSecondsParser);\n\n function TimestampSecondsParser() {\n var _this;\n\n _classCallCheck(this, TimestampSecondsParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 40);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n\n return _this;\n }\n\n _createClass(TimestampSecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value * 1000), {\n timestampIsSet: true\n }];\n }\n }]);\n\n return TimestampSecondsParser;\n}(Parser);","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport var TimestampMillisecondsParser = /*#__PURE__*/function (_Parser) {\n _inherits(TimestampMillisecondsParser, _Parser);\n\n var _super = _createSuper(TimestampMillisecondsParser);\n\n function TimestampMillisecondsParser() {\n var _this;\n\n _classCallCheck(this, TimestampMillisecondsParser);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"priority\", 20);\n\n _defineProperty(_assertThisInitialized(_this), \"incompatibleTokens\", '*');\n\n return _this;\n }\n\n _createClass(TimestampMillisecondsParser, [{\n key: \"parse\",\n value: function parse(dateString) {\n return parseAnyDigitsSigned(dateString);\n }\n }, {\n key: \"set\",\n value: function set(_date, _flags, value) {\n return [new Date(value), {\n timestampIsSet: true\n }];\n }\n }]);\n\n return TimestampMillisecondsParser;\n}(Parser);","import { EraParser } from \"./EraParser.js\";\nimport { YearParser } from \"./YearParser.js\";\nimport { LocalWeekYearParser } from \"./LocalWeekYearParser.js\";\nimport { ISOWeekYearParser } from \"./ISOWeekYearParser.js\";\nimport { ExtendedYearParser } from \"./ExtendedYearParser.js\";\nimport { QuarterParser } from \"./QuarterParser.js\";\nimport { StandAloneQuarterParser } from \"./StandAloneQuarterParser.js\";\nimport { MonthParser } from \"./MonthParser.js\";\nimport { StandAloneMonthParser } from \"./StandAloneMonthParser.js\";\nimport { LocalWeekParser } from \"./LocalWeekParser.js\";\nimport { ISOWeekParser } from \"./ISOWeekParser.js\";\nimport { DateParser } from \"./DateParser.js\";\nimport { DayOfYearParser } from \"./DayOfYearParser.js\";\nimport { DayParser } from \"./DayParser.js\";\nimport { LocalDayParser } from \"./LocalDayParser.js\";\nimport { StandAloneLocalDayParser } from \"./StandAloneLocalDayParser.js\";\nimport { ISODayParser } from \"./ISODayParser.js\";\nimport { AMPMParser } from \"./AMPMParser.js\";\nimport { AMPMMidnightParser } from \"./AMPMMidnightParser.js\";\nimport { DayPeriodParser } from \"./DayPeriodParser.js\";\nimport { Hour1to12Parser } from \"./Hour1to12Parser.js\";\nimport { Hour0to23Parser } from \"./Hour0to23Parser.js\";\nimport { Hour0To11Parser } from \"./Hour0To11Parser.js\";\nimport { Hour1To24Parser } from \"./Hour1To24Parser.js\";\nimport { MinuteParser } from \"./MinuteParser.js\";\nimport { SecondParser } from \"./SecondParser.js\";\nimport { FractionOfSecondParser } from \"./FractionOfSecondParser.js\";\nimport { ISOTimezoneWithZParser } from \"./ISOTimezoneWithZParser.js\";\nimport { ISOTimezoneParser } from \"./ISOTimezoneParser.js\";\nimport { TimestampSecondsParser } from \"./TimestampSecondsParser.js\";\nimport { TimestampMillisecondsParser } from \"./TimestampMillisecondsParser.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O* | Timezone (GMT) |\n * | p | | P | |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z* | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n */\n\nexport var parsers = {\n G: new EraParser(),\n y: new YearParser(),\n Y: new LocalWeekYearParser(),\n R: new ISOWeekYearParser(),\n u: new ExtendedYearParser(),\n Q: new QuarterParser(),\n q: new StandAloneQuarterParser(),\n M: new MonthParser(),\n L: new StandAloneMonthParser(),\n w: new LocalWeekParser(),\n I: new ISOWeekParser(),\n d: new DateParser(),\n D: new DayOfYearParser(),\n E: new DayParser(),\n e: new LocalDayParser(),\n c: new StandAloneLocalDayParser(),\n i: new ISODayParser(),\n a: new AMPMParser(),\n b: new AMPMMidnightParser(),\n B: new DayPeriodParser(),\n h: new Hour1to12Parser(),\n H: new Hour0to23Parser(),\n K: new Hour0To11Parser(),\n k: new Hour1To24Parser(),\n m: new MinuteParser(),\n s: new SecondParser(),\n S: new FractionOfSecondParser(),\n X: new ISOTimezoneWithZParser(),\n x: new ISOTimezoneParser(),\n t: new TimestampSecondsParser(),\n T: new TimestampMillisecondsParser()\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { DateToSystemTimezoneSetter } from \"./_lib/Setter.js\";\nimport { parsers } from \"./_lib/parsers/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar notWhitespaceRegExp = /\\S/;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit |Prior| Pattern | Result examples | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era | 140 | G..GGG | AD, BC | |\n * | | | GGGG | Anno Domini, Before Christ | 2 |\n * | | | GGGGG | A, B | |\n * | Calendar year | 130 | y | 44, 1, 1900, 2017, 9999 | 4 |\n * | | | yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | yy | 44, 01, 00, 17 | 4 |\n * | | | yyy | 044, 001, 123, 999 | 4 |\n * | | | yyyy | 0044, 0001, 1900, 2017 | 4 |\n * | | | yyyyy | ... | 2,4 |\n * | Local week-numbering year | 130 | Y | 44, 1, 1900, 2017, 9000 | 4 |\n * | | | Yo | 44th, 1st, 1900th, 9999999th | 4,5 |\n * | | | YY | 44, 01, 00, 17 | 4,6 |\n * | | | YYY | 044, 001, 123, 999 | 4 |\n * | | | YYYY | 0044, 0001, 1900, 2017 | 4,6 |\n * | | | YYYYY | ... | 2,4 |\n * | ISO week-numbering year | 130 | R | -43, 1, 1900, 2017, 9999, -9999 | 4,5 |\n * | | | RR | -43, 01, 00, 17 | 4,5 |\n * | | | RRR | -043, 001, 123, 999, -999 | 4,5 |\n * | | | RRRR | -0043, 0001, 2017, 9999, -9999 | 4,5 |\n * | | | RRRRR | ... | 2,4,5 |\n * | Extended year | 130 | u | -43, 1, 1900, 2017, 9999, -999 | 4 |\n * | | | uu | -43, 01, 99, -99 | 4 |\n * | | | uuu | -043, 001, 123, 999, -999 | 4 |\n * | | | uuuu | -0043, 0001, 2017, 9999, -9999 | 4 |\n * | | | uuuuu | ... | 2,4 |\n * | Quarter (formatting) | 120 | Q | 1, 2, 3, 4 | |\n * | | | Qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | QQ | 01, 02, 03, 04 | |\n * | | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | 120 | q | 1, 2, 3, 4 | |\n * | | | qo | 1st, 2nd, 3rd, 4th | 5 |\n * | | | qq | 01, 02, 03, 04 | |\n * | | | qqq | Q1, Q2, Q3, Q4 | |\n * | | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | | qqqqq | 1, 2, 3, 4 | 3 |\n * | Month (formatting) | 110 | M | 1, 2, ..., 12 | |\n * | | | Mo | 1st, 2nd, ..., 12th | 5 |\n * | | | MM | 01, 02, ..., 12 | |\n * | | | MMM | Jan, Feb, ..., Dec | |\n * | | | MMMM | January, February, ..., December | 2 |\n * | | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | 110 | L | 1, 2, ..., 12 | |\n * | | | Lo | 1st, 2nd, ..., 12th | 5 |\n * | | | LL | 01, 02, ..., 12 | |\n * | | | LLL | Jan, Feb, ..., Dec | |\n * | | | LLLL | January, February, ..., December | 2 |\n * | | | LLLLL | J, F, ..., D | |\n * | Local week of year | 100 | w | 1, 2, ..., 53 | |\n * | | | wo | 1st, 2nd, ..., 53th | 5 |\n * | | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | 100 | I | 1, 2, ..., 53 | 5 |\n * | | | Io | 1st, 2nd, ..., 53th | 5 |\n * | | | II | 01, 02, ..., 53 | 5 |\n * | Day of month | 90 | d | 1, 2, ..., 31 | |\n * | | | do | 1st, 2nd, ..., 31st | 5 |\n * | | | dd | 01, 02, ..., 31 | |\n * | Day of year | 90 | D | 1, 2, ..., 365, 366 | 7 |\n * | | | Do | 1st, 2nd, ..., 365th, 366th | 5 |\n * | | | DD | 01, 02, ..., 365, 366 | 7 |\n * | | | DDD | 001, 002, ..., 365, 366 | |\n * | | | DDDD | ... | 2 |\n * | Day of week (formatting) | 90 | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | | EEEEE | M, T, W, T, F, S, S | |\n * | | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | 90 | i | 1, 2, 3, ..., 7 | 5 |\n * | | | io | 1st, 2nd, ..., 7th | 5 |\n * | | | ii | 01, 02, ..., 07 | 5 |\n * | | | iii | Mon, Tue, Wed, ..., Sun | 5 |\n * | | | iiii | Monday, Tuesday, ..., Sunday | 2,5 |\n * | | | iiiii | M, T, W, T, F, S, S | 5 |\n * | | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 5 |\n * | Local day of week (formatting) | 90 | e | 2, 3, 4, ..., 1 | |\n * | | | eo | 2nd, 3rd, ..., 1st | 5 |\n * | | | ee | 02, 03, ..., 01 | |\n * | | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | | eeeee | M, T, W, T, F, S, S | |\n * | | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | 90 | c | 2, 3, 4, ..., 1 | |\n * | | | co | 2nd, 3rd, ..., 1st | 5 |\n * | | | cc | 02, 03, ..., 01 | |\n * | | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | | ccccc | M, T, W, T, F, S, S | |\n * | | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | 80 | a..aaa | AM, PM | |\n * | | | aaaa | a.m., p.m. | 2 |\n * | | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | 80 | b..bbb | AM, PM, noon, midnight | |\n * | | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | | bbbbb | a, p, n, mi | |\n * | Flexible day period | 80 | B..BBB | at night, in the morning, ... | |\n * | | | BBBB | at night, in the morning, ... | 2 |\n * | | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | 70 | h | 1, 2, ..., 11, 12 | |\n * | | | ho | 1st, 2nd, ..., 11th, 12th | 5 |\n * | | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | 70 | H | 0, 1, 2, ..., 23 | |\n * | | | Ho | 0th, 1st, 2nd, ..., 23rd | 5 |\n * | | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | 70 | K | 1, 2, ..., 11, 0 | |\n * | | | Ko | 1st, 2nd, ..., 11th, 0th | 5 |\n * | | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | 70 | k | 24, 1, 2, ..., 23 | |\n * | | | ko | 24th, 1st, 2nd, ..., 23rd | 5 |\n * | | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | 60 | m | 0, 1, ..., 59 | |\n * | | | mo | 0th, 1st, ..., 59th | 5 |\n * | | | mm | 00, 01, ..., 59 | |\n * | Second | 50 | s | 0, 1, ..., 59 | |\n * | | | so | 0th, 1st, ..., 59th | 5 |\n * | | | ss | 00, 01, ..., 59 | |\n * | Seconds timestamp | 40 | t | 512969520 | |\n * | | | tt | ... | 2 |\n * | Fraction of second | 30 | S | 0, 1, ..., 9 | |\n * | | | SS | 00, 01, ..., 99 | |\n * | | | SSS | 000, 001, ..., 999 | |\n * | | | SSSS | ... | 2 |\n * | Milliseconds timestamp | 20 | T | 512969520900 | |\n * | | | TT | ... | 2 |\n * | Timezone (ISO-8601 w/ Z) | 10 | X | -08, +0530, Z | |\n * | | | XX | -0800, +0530, Z | |\n * | | | XXX | -08:00, +05:30, Z | |\n * | | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | 10 | x | -08, +0530, +00 | |\n * | | | xx | -0800, +0530, +0000 | |\n * | | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Long localized date | NA | P | 05/29/1453 | 5,8 |\n * | | | PP | May 29, 1453 | |\n * | | | PPP | May 29th, 1453 | |\n * | | | PPPP | Sunday, May 29th, 1453 | 2,5,8 |\n * | Long localized time | NA | p | 12:00 AM | 5,8 |\n * | | | pp | 12:00:00 AM | |\n * | Combination of date and time | NA | Pp | 05/29/1453, 12:00 AM | |\n * | | | PPpp | May 29, 1453, 12:00:00 AM | |\n * | | | PPPpp | May 29th, 1453 at ... | |\n * | | | PPPPpp | Sunday, May 29th, 1453 at ... | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular.\n * In `format` function, they will produce different result:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table:\n * - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n * as wide as the sequence\n * - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n * These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n * `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n * `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n * while `uu` will just assign the year as is:\n *\n * `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n * `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n * and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n * on the given locale.\n *\n * using `en-US` locale: `P` => `MM/dd/yyyy`\n * using `en-US` locale: `p` => `hh:mm a`\n * using `pt-BR` locale: `P` => `dd/MM/yyyy`\n * using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|Number} referenceDate - defines values missing from the parsed dateString\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n * locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\n\nexport default function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) {\n var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n requiredArgs(3, arguments);\n var dateString = String(dirtyDateString);\n var formatString = String(dirtyFormatString);\n var defaultOptions = getDefaultOptions();\n var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n\n if (!locale.match) {\n throw new RangeError('locale must contain match property');\n }\n\n var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (formatString === '') {\n if (dateString === '') {\n return toDate(dirtyReferenceDate);\n } else {\n return new Date(NaN);\n }\n }\n\n var subFnOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale\n }; // If timezone isn't specified, it will be set to the system timezone\n\n var setters = [new DateToSystemTimezoneSetter()];\n var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter in longFormatters) {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp);\n var usedTokens = [];\n\n var _iterator = _createForOfIteratorHelper(tokens),\n _step;\n\n try {\n var _loop = function _loop() {\n var token = _step.value;\n\n if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {\n throwProtectedError(token, formatString, dirtyDateString);\n }\n\n var firstCharacter = token[0];\n var parser = parsers[firstCharacter];\n\n if (parser) {\n var incompatibleTokens = parser.incompatibleTokens;\n\n if (Array.isArray(incompatibleTokens)) {\n var incompatibleToken = usedTokens.find(function (usedToken) {\n return incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter;\n });\n\n if (incompatibleToken) {\n throw new RangeError(\"The format string mustn't contain `\".concat(incompatibleToken.fullToken, \"` and `\").concat(token, \"` at the same time\"));\n }\n } else if (parser.incompatibleTokens === '*' && usedTokens.length > 0) {\n throw new RangeError(\"The format string mustn't contain `\".concat(token, \"` and any other token at the same time\"));\n }\n\n usedTokens.push({\n token: firstCharacter,\n fullToken: token\n });\n var parseResult = parser.run(dateString, token, locale.match, subFnOptions);\n\n if (!parseResult) {\n return {\n v: new Date(NaN)\n };\n }\n\n setters.push(parseResult.setter);\n dateString = parseResult.rest;\n } else {\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n } // Replace two single quote characters with one single quote character\n\n\n if (token === \"''\") {\n token = \"'\";\n } else if (firstCharacter === \"'\") {\n token = cleanEscapedString(token);\n } // Cut token from string, or, if string doesn't match the token, return Invalid Date\n\n\n if (dateString.indexOf(token) === 0) {\n dateString = dateString.slice(token.length);\n } else {\n return {\n v: new Date(NaN)\n };\n }\n }\n };\n\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ret = _loop();\n\n if (_typeof(_ret) === \"object\") return _ret.v;\n } // Check if the remaining input contains something other than whitespace\n\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n return new Date(NaN);\n }\n\n var uniquePrioritySetters = setters.map(function (setter) {\n return setter.priority;\n }).sort(function (a, b) {\n return b - a;\n }).filter(function (priority, index, array) {\n return array.indexOf(priority) === index;\n }).map(function (priority) {\n return setters.filter(function (setter) {\n return setter.priority === priority;\n }).sort(function (a, b) {\n return b.subPriority - a.subPriority;\n });\n }).map(function (setterArray) {\n return setterArray[0];\n });\n var date = toDate(dirtyReferenceDate);\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n\n\n var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n var flags = {};\n\n var _iterator2 = _createForOfIteratorHelper(uniquePrioritySetters),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var setter = _step2.value;\n\n if (!setter.validate(utcDate, subFnOptions)) {\n return new Date(NaN);\n }\n\n var result = setter.set(utcDate, flags, subFnOptions); // Result is tuple (date, flags)\n\n if (Array.isArray(result)) {\n utcDate = result[0];\n assign(flags, result[1]); // Result is date\n } else {\n utcDate = result;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return utcDate;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n\n/**\n * @name isWithinInterval\n * @category Interval Helpers\n * @summary Is the given date within the interval?\n *\n * @description\n * Is the given date within the interval? (Including start and end.)\n *\n * @param {Date|Number} date - the date to check\n * @param {Interval} interval - the interval to check\n * @returns {Boolean} the date is within the interval\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} The start of an interval cannot be after its end\n * @throws {RangeError} Date in interval cannot be `Invalid Date`\n *\n * @example\n * // For the date within the interval:\n * isWithinInterval(new Date(2014, 0, 3), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> true\n *\n * @example\n * // For the date outside of the interval:\n * isWithinInterval(new Date(2014, 0, 10), {\n * start: new Date(2014, 0, 1),\n * end: new Date(2014, 0, 7)\n * })\n * //=> false\n *\n * @example\n * // For date equal to interval start:\n * isWithinInterval(date, { start, end: date }) // => true\n *\n * @example\n * // For date equal to interval end:\n * isWithinInterval(date, { start: date, end }) // => true\n */\nexport default function isWithinInterval(dirtyDate, interval) {\n requiredArgs(2, arguments);\n var time = toDate(dirtyDate).getTime();\n var startTime = toDate(interval.start).getTime();\n var endTime = toDate(interval.end).getTime(); // Throw an exception if start date is after end date or if any date is `Invalid Date`\n\n if (!(startTime <= endTime)) {\n throw new RangeError('Invalid interval');\n }\n\n return time >= startTime && time <= endTime;\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { minutesInHour } from \"../constants/index.js\";\n/**\n * @name minutesToHours\n * @category Conversion Helpers\n * @summary Convert minutes to hours.\n *\n * @description\n * Convert a number of minutes to a full number of hours.\n *\n * @param {number} minutes - number of minutes to be converted\n *\n * @returns {number} the number of minutes converted in hours\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Convert 140 minutes to hours:\n * const result = minutesToHours(120)\n * //=> 2\n *\n * @example\n * // It uses floor rounding:\n * const result = minutesToHours(179)\n * //=> 2\n */\n\nexport default function minutesToHours(minutes) {\n requiredArgs(1, arguments);\n var hours = minutes / minutesInHour;\n return Math.floor(hours);\n}","import { millisecondsInHour, millisecondsInMinute } from \"../constants/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * @param {String} argument - the value to convert\n * @param {Object} [options] - an object with options.\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\n\nexport default function parseISO(argument, options) {\n var _options$additionalDi;\n\n requiredArgs(1, arguments);\n var additionalDigits = toInteger((_options$additionalDi = options === null || options === void 0 ? void 0 : options.additionalDigits) !== null && _options$additionalDi !== void 0 ? _options$additionalDi : 2);\n\n if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n throw new RangeError('additionalDigits must be 0, 1 or 2');\n }\n\n if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n return new Date(NaN);\n }\n\n var dateStrings = splitDateString(argument);\n var date;\n\n if (dateStrings.date) {\n var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n\n if (!date || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n var timestamp = date.getTime();\n var time = 0;\n var offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n\n if (isNaN(time)) {\n return new Date(NaN);\n }\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n } else {\n var dirtyDate = new Date(timestamp + time); // js parsed string assuming it's in UTC timezone\n // but we need it to be parsed in our timezone\n // so we use utc values to build date in our timezone.\n // Year values from 0 to 99 map to the years 1900 to 1999\n // so set year explicitly with setFullYear.\n\n var result = new Date(0);\n result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate());\n result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds());\n return result;\n }\n\n return new Date(timestamp + time + offset);\n}\nvar patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/\n};\nvar dateRegex = /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nvar timeRegex = /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nvar timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n var dateStrings = {};\n var array = dateString.split(patterns.dateTimeDelimiter);\n var timeString; // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n\n if (array.length > 2) {\n return dateStrings;\n }\n\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(dateStrings.date.length, dateString.length);\n }\n }\n\n if (timeString) {\n var token = patterns.timezone.exec(timeString);\n\n if (token) {\n dateStrings.time = timeString.replace(token[1], '');\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n var regex = new RegExp('^(?:(\\\\d{4}|[+-]\\\\d{' + (4 + additionalDigits) + '})|(\\\\d{2}|[+-]\\\\d{' + (2 + additionalDigits) + '})$)');\n var captures = dateString.match(regex); // Invalid ISO-formatted year\n\n if (!captures) return {\n year: NaN,\n restDateString: ''\n };\n var year = captures[1] ? parseInt(captures[1]) : null;\n var century = captures[2] ? parseInt(captures[2]) : null; // either year or century is null, not both\n\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length)\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n var captures = dateString.match(dateRegex); // Invalid ISO-formatted string\n\n if (!captures) return new Date(NaN);\n var isWeekDate = !!captures[4];\n var dayOfYear = parseDateUnit(captures[1]);\n var month = parseDateUnit(captures[2]) - 1;\n var day = parseDateUnit(captures[3]);\n var week = parseDateUnit(captures[4]);\n var dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n var date = new Date(0);\n\n if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {\n return new Date(NaN);\n }\n\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\n\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n var captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n var hours = parseTimeUnit(captures[1]);\n var minutes = parseTimeUnit(captures[2]);\n var seconds = parseTimeUnit(captures[3]);\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000;\n}\n\nfunction parseTimeUnit(value) {\n return value && parseFloat(value.replace(',', '.')) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n if (timezoneString === 'Z') return 0;\n var captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n var sign = captures[1] === '+' ? -1 : 1;\n var hours = parseInt(captures[2]);\n var minutes = captures[3] && parseInt(captures[3]) || 0;\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n var date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n var fourthOfJanuaryDay = date.getUTCDay() || 7;\n var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n} // Validation functions\n// February is null to handle the leap year (using ||)\n\n\nvar daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n\nfunction validateDate(year, month, date) {\n return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n\n return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;\n}\n\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { secondsInMinute } from \"../constants/index.js\";\n/**\n * @name secondsToMinutes\n * @category Conversion Helpers\n * @summary Convert seconds to minutes.\n *\n * @description\n * Convert a number of seconds to a full number of minutes.\n *\n * @param {number} seconds - number of seconds to be converted\n *\n * @returns {number} the number of seconds converted in minutes\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Convert 120 seconds into minutes\n * const result = secondsToMinutes(120)\n * //=> 2\n *\n * @example\n * // It uses floor rounding:\n * const result = secondsToMinutes(119)\n * //=> 1\n */\n\nexport default function secondsToMinutes(seconds) {\n requiredArgs(1, arguments);\n var minutes = seconds / secondsInMinute;\n return Math.floor(minutes);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * const result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\nexport default function setHours(dirtyDate, dirtyHours) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var hours = toInteger(dirtyHours);\n date.setHours(hours);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\n\nexport default function setMinutes(dirtyDate, dirtyMinutes) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var minutes = toInteger(dirtyMinutes);\n date.setMinutes(minutes);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n date.setFullYear(year);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMonths\n * @category Month Helpers\n * @summary Subtract the specified number of months from the given date.\n *\n * @description\n * Subtract the specified number of months from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 5 months from 1 February 2015:\n * const result = subMonths(new Date(2015, 1, 1), 5)\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function subMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, -amount);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport subDays from \"../subDays/index.js\";\nimport subMonths from \"../subMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name sub\n * @category Common Helpers\n * @summary Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @description\n * Subtract the specified years, months, weeks, days, hours, minutes and seconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Duration} duration - the object with years, months, weeks, days, hours, minutes and seconds to be subtracted\n *\n * | Key | Description |\n * |---------|------------------------------------|\n * | years | Amount of years to be subtracted |\n * | months | Amount of months to be subtracted |\n * | weeks | Amount of weeks to be subtracted |\n * | days | Amount of days to be subtracted |\n * | hours | Amount of hours to be subtracted |\n * | minutes | Amount of minutes to be subtracted |\n * | seconds | Amount of seconds to be subtracted |\n *\n * All values default to 0\n *\n * @returns {Date} the new date with the seconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract the following duration from 15 June 2017 15:29:20\n * const result = sub(new Date(2017, 5, 15, 15, 29, 20), {\n * years: 2,\n * months: 9,\n * weeks: 1,\n * days: 7,\n * hours: 5,\n * minutes: 9,\n * seconds: 30\n * })\n * //=> Mon Sep 1 2014 10:19:50\n */\n\nexport default function sub(date, duration) {\n requiredArgs(2, arguments);\n if (!duration || _typeof(duration) !== 'object') return new Date(NaN);\n var years = duration.years ? toInteger(duration.years) : 0;\n var months = duration.months ? toInteger(duration.months) : 0;\n var weeks = duration.weeks ? toInteger(duration.weeks) : 0;\n var days = duration.days ? toInteger(duration.days) : 0;\n var hours = duration.hours ? toInteger(duration.hours) : 0;\n var minutes = duration.minutes ? toInteger(duration.minutes) : 0;\n var seconds = duration.seconds ? toInteger(duration.seconds) : 0; // Subtract years and months\n\n var dateWithoutMonths = subMonths(date, months + years * 12); // Subtract weeks and days\n\n var dateWithoutDays = subDays(dateWithoutMonths, days + weeks * 7); // Subtract hours, minutes and seconds\n\n var minutestoSub = minutes + hours * 60;\n var secondstoSub = seconds + minutestoSub * 60;\n var mstoSub = secondstoSub * 1000;\n var finalDate = new Date(dateWithoutDays.getTime() - mstoSub);\n return finalDate;\n}","import addMinutes from \"../addMinutes/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMinutes\n * @category Minute Helpers\n * @summary Subtract the specified number of minutes from the given date.\n *\n * @description\n * Subtract the specified number of minutes from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the minutes subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 30 minutes from 10 July 2014 12:00:00:\n * const result = subMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 11:30:00\n */\n\nexport default function subMinutes(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMinutes(dirtyDate, -amount);\n}","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export var IdentifyOperation;\n(function (IdentifyOperation) {\n // Base Operations to set values\n IdentifyOperation[\"SET\"] = \"$set\";\n IdentifyOperation[\"SET_ONCE\"] = \"$setOnce\";\n // Operations around modifying existing values\n IdentifyOperation[\"ADD\"] = \"$add\";\n IdentifyOperation[\"APPEND\"] = \"$append\";\n IdentifyOperation[\"PREPEND\"] = \"$prepend\";\n IdentifyOperation[\"REMOVE\"] = \"$remove\";\n // Operations around appending values *if* they aren't present\n IdentifyOperation[\"PREINSERT\"] = \"$preInsert\";\n IdentifyOperation[\"POSTINSERT\"] = \"$postInsert\";\n // Operations around removing properties/values\n IdentifyOperation[\"UNSET\"] = \"$unset\";\n IdentifyOperation[\"CLEAR_ALL\"] = \"$clearAll\";\n})(IdentifyOperation || (IdentifyOperation = {}));\nexport var RevenueProperty;\n(function (RevenueProperty) {\n RevenueProperty[\"REVENUE_PRODUCT_ID\"] = \"$productId\";\n RevenueProperty[\"REVENUE_QUANTITY\"] = \"$quantity\";\n RevenueProperty[\"REVENUE_PRICE\"] = \"$price\";\n RevenueProperty[\"REVENUE_TYPE\"] = \"$revenueType\";\n RevenueProperty[\"REVENUE\"] = \"$revenue\";\n})(RevenueProperty || (RevenueProperty = {}));\n/**\n * Strings that have special meaning when used as an event's type\n * and have different specifications.\n */\nexport var SpecialEventType;\n(function (SpecialEventType) {\n SpecialEventType[\"IDENTIFY\"] = \"$identify\";\n SpecialEventType[\"GROUP_IDENTIFY\"] = \"$groupidentify\";\n SpecialEventType[\"REVENUE\"] = \"revenue_amount\";\n})(SpecialEventType || (SpecialEventType = {}));\n//# sourceMappingURL=event.js.map","export var LogLevel;\n(function (LogLevel) {\n LogLevel[LogLevel[\"None\"] = 0] = \"None\";\n LogLevel[LogLevel[\"Error\"] = 1] = \"Error\";\n LogLevel[LogLevel[\"Warn\"] = 2] = \"Warn\";\n LogLevel[LogLevel[\"Verbose\"] = 3] = \"Verbose\";\n LogLevel[LogLevel[\"Debug\"] = 4] = \"Debug\";\n})(LogLevel || (LogLevel = {}));\n//# sourceMappingURL=logger.js.map","/** The status of an event. */\nexport var Status;\n(function (Status) {\n /** The status could not be determined. */\n Status[\"Unknown\"] = \"unknown\";\n /** The event was skipped due to configuration or callbacks. */\n Status[\"Skipped\"] = \"skipped\";\n /** The event was sent successfully. */\n Status[\"Success\"] = \"success\";\n /** A user or device in the payload is currently rate limited and should try again later. */\n Status[\"RateLimit\"] = \"rate_limit\";\n /** The sent payload was too large to be processed. */\n Status[\"PayloadTooLarge\"] = \"payload_too_large\";\n /** The event could not be processed. */\n Status[\"Invalid\"] = \"invalid\";\n /** A server-side error ocurred during submission. */\n Status[\"Failed\"] = \"failed\";\n /** a server or client side error occuring when a request takes too long and is cancelled */\n Status[\"Timeout\"] = \"Timeout\";\n /** NodeJS runtime environment error.. E.g. disconnected from network */\n Status[\"SystemError\"] = \"SystemError\";\n})(Status || (Status = {}));\n//# sourceMappingURL=status.js.map","export var UNSET_VALUE = '-';\nexport var AMPLITUDE_PREFIX = 'AMP';\nexport var STORAGE_PREFIX = \"\".concat(AMPLITUDE_PREFIX, \"_unsent\");\nexport var AMPLITUDE_SERVER_URL = 'https://api2.amplitude.com/2/httpapi';\nexport var EU_AMPLITUDE_SERVER_URL = 'https://api.eu.amplitude.com/2/httpapi';\nexport var AMPLITUDE_BATCH_SERVER_URL = 'https://api2.amplitude.com/batch';\nexport var EU_AMPLITUDE_BATCH_SERVER_URL = 'https://api.eu.amplitude.com/batch';\n//# sourceMappingURL=constants.js.map","import { __values } from \"tslib\";\nvar MAX_PROPERTY_KEYS = 1000;\nexport var isValidObject = function (properties) {\n if (Object.keys(properties).length > MAX_PROPERTY_KEYS) {\n return false;\n }\n for (var key in properties) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var value = properties[key];\n if (!isValidProperties(key, value))\n return false;\n }\n return true;\n};\nexport var isValidProperties = function (property, value) {\n var e_1, _a;\n if (typeof property !== 'string')\n return false;\n if (Array.isArray(value)) {\n var isValid = true;\n try {\n for (var value_1 = __values(value), value_1_1 = value_1.next(); !value_1_1.done; value_1_1 = value_1.next()) {\n var valueElement = value_1_1.value;\n if (Array.isArray(valueElement)) {\n return false;\n }\n else if (typeof valueElement === 'object') {\n isValid = isValid && isValidObject(valueElement);\n }\n else if (!['number', 'string'].includes(typeof valueElement)) {\n return false;\n }\n if (!isValid) {\n return false;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (value_1_1 && !value_1_1.done && (_a = value_1.return)) _a.call(value_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else if (value === null || value === undefined) {\n return false;\n }\n else if (typeof value === 'object') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return isValidObject(value);\n }\n else if (!['number', 'string', 'boolean'].includes(typeof value)) {\n return false;\n }\n return true;\n};\n//# sourceMappingURL=valid-properties.js.map","import { __assign } from \"tslib\";\nimport { IdentifyOperation, } from '@amplitude/analytics-types';\nimport { UNSET_VALUE } from './constants';\nimport { isValidProperties } from './utils/valid-properties';\nvar Identify = /** @class */ (function () {\n function Identify() {\n this._propertySet = new Set();\n this._properties = {};\n }\n Identify.prototype.getUserProperties = function () {\n return __assign({}, this._properties);\n };\n Identify.prototype.set = function (property, value) {\n this._safeSet(IdentifyOperation.SET, property, value);\n return this;\n };\n Identify.prototype.setOnce = function (property, value) {\n this._safeSet(IdentifyOperation.SET_ONCE, property, value);\n return this;\n };\n Identify.prototype.append = function (property, value) {\n this._safeSet(IdentifyOperation.APPEND, property, value);\n return this;\n };\n Identify.prototype.prepend = function (property, value) {\n this._safeSet(IdentifyOperation.PREPEND, property, value);\n return this;\n };\n Identify.prototype.postInsert = function (property, value) {\n this._safeSet(IdentifyOperation.POSTINSERT, property, value);\n return this;\n };\n Identify.prototype.preInsert = function (property, value) {\n this._safeSet(IdentifyOperation.PREINSERT, property, value);\n return this;\n };\n Identify.prototype.remove = function (property, value) {\n this._safeSet(IdentifyOperation.REMOVE, property, value);\n return this;\n };\n Identify.prototype.add = function (property, value) {\n this._safeSet(IdentifyOperation.ADD, property, value);\n return this;\n };\n Identify.prototype.unset = function (property) {\n this._safeSet(IdentifyOperation.UNSET, property, UNSET_VALUE);\n return this;\n };\n Identify.prototype.clearAll = function () {\n // When clear all happens, all properties are unset. Reset the entire object.\n this._properties = {};\n this._properties[IdentifyOperation.CLEAR_ALL] = UNSET_VALUE;\n return this;\n };\n // Returns whether or not this set actually worked.\n Identify.prototype._safeSet = function (operation, property, value) {\n if (this._validate(operation, property, value)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var userPropertyMap = this._properties[operation];\n if (userPropertyMap === undefined) {\n userPropertyMap = {};\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this._properties[operation] = userPropertyMap;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n userPropertyMap[property] = value;\n this._propertySet.add(property);\n return true;\n }\n return false;\n };\n Identify.prototype._validate = function (operation, property, value) {\n if (this._properties[IdentifyOperation.CLEAR_ALL] !== undefined) {\n // clear all already set. Skipping operation;\n return false;\n }\n if (this._propertySet.has(property)) {\n // Property already used. Skipping operation\n return false;\n }\n if (operation === IdentifyOperation.ADD) {\n return typeof value === 'number';\n }\n if (operation !== IdentifyOperation.UNSET && operation !== IdentifyOperation.REMOVE) {\n return isValidProperties(property, value);\n }\n return true;\n };\n return Identify;\n}());\nexport { Identify };\n//# sourceMappingURL=identify.js.map","import { __assign } from \"tslib\";\nimport { SpecialEventType, } from '@amplitude/analytics-types';\nimport { Identify } from '../identify';\nexport var createTrackEvent = function (eventInput, eventProperties, eventOptions) {\n var baseEvent = typeof eventInput === 'string' ? { event_type: eventInput } : eventInput;\n return __assign(__assign(__assign({}, baseEvent), eventOptions), (eventProperties && { event_properties: eventProperties }));\n};\nexport var createIdentifyEvent = function (identify, eventOptions) {\n var identifyEvent = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties() });\n return identifyEvent;\n};\nexport var createGroupIdentifyEvent = function (groupType, groupName, identify, eventOptions) {\n var _a;\n var groupIdentify = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.GROUP_IDENTIFY, group_properties: identify.getUserProperties(), groups: (_a = {},\n _a[groupType] = groupName,\n _a) });\n return groupIdentify;\n};\nexport var createGroupEvent = function (groupType, groupName, eventOptions) {\n var _a;\n var identify = new Identify();\n identify.set(groupType, groupName);\n var groupEvent = __assign(__assign({}, eventOptions), { event_type: SpecialEventType.IDENTIFY, user_properties: identify.getUserProperties(), groups: (_a = {},\n _a[groupType] = groupName,\n _a) });\n return groupEvent;\n};\nexport var createRevenueEvent = function (revenue, eventOptions) {\n return __assign(__assign({}, eventOptions), { event_type: SpecialEventType.REVENUE, event_properties: revenue.getEventProperties() });\n};\n//# sourceMappingURL=event-builder.js.map","import { Status } from '@amplitude/analytics-types';\nexport var buildResult = function (event, code, message) {\n if (code === void 0) { code = 0; }\n if (message === void 0) { message = Status.Unknown; }\n return { event: event, code: code, message: message };\n};\n//# sourceMappingURL=result-builder.js.map","/**\n * Source: [jed's gist]{@link https://gist.github.com/982883}.\n * Returns a random v4 UUID of the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,\n * where each x is replaced with a random hexadecimal digit from 0 to f, and\n * y is replaced with a random hexadecimal digit from 8 to b.\n * Used to generate UUIDs for deviceIds.\n * @private\n */\nexport var UUID = function (a) {\n return a // if the placeholder was passed, return\n ? // a random number from 0 to 15\n (a ^ // unless b is 8,\n ((Math.random() * // in which case\n 16) >> // a random number from\n (a / 4))) // 8 to 11\n .toString(16) // in hexadecimal\n : // or otherwise a concatenated string:\n (String(1e7) + // 10000000 +\n String(-1e3) + // -1000 +\n String(-4e3) + // -4000 +\n String(-8e3) + // -80000000 +\n String(-1e11)) // -100000000000,\n .replace(\n // replacing\n /[018]/g, // zeroes, ones, and eights with\n UUID);\n};\n//# sourceMappingURL=uuid.js.map","import { __assign, __awaiter, __generator, __read, __values } from \"tslib\";\nimport { buildResult } from './utils/result-builder';\nimport { UUID } from './utils/uuid';\nvar Timeline = /** @class */ (function () {\n function Timeline(client) {\n this.client = client;\n this.queue = [];\n // Flag to guarantee one schedule apply is running\n this.applying = false;\n // Flag indicates whether timeline is ready to process event\n // Events collected before timeline is ready will stay in the queue to be processed later\n this.plugins = [];\n }\n Timeline.prototype.register = function (plugin, config) {\n var _a, _b, _c;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n plugin.name = (_a = plugin.name) !== null && _a !== void 0 ? _a : UUID();\n plugin.type = (_b = plugin.type) !== null && _b !== void 0 ? _b : 'enrichment';\n return [4 /*yield*/, ((_c = plugin.setup) === null || _c === void 0 ? void 0 : _c.call(plugin, config, this.client))];\n case 1:\n _d.sent();\n this.plugins.push(plugin);\n return [2 /*return*/];\n }\n });\n });\n };\n Timeline.prototype.deregister = function (pluginName) {\n this.plugins.splice(this.plugins.findIndex(function (plugin) { return plugin.name === pluginName; }), 1);\n return Promise.resolve();\n };\n Timeline.prototype.reset = function (client) {\n this.applying = false;\n this.plugins = [];\n this.client = client;\n };\n Timeline.prototype.push = function (event) {\n var _this = this;\n return new Promise(function (resolve) {\n _this.queue.push([event, resolve]);\n _this.scheduleApply(0);\n });\n };\n Timeline.prototype.scheduleApply = function (timeout) {\n var _this = this;\n if (this.applying)\n return;\n this.applying = true;\n setTimeout(function () {\n void _this.apply(_this.queue.shift()).then(function () {\n _this.applying = false;\n if (_this.queue.length > 0) {\n _this.scheduleApply(0);\n }\n });\n }, timeout);\n };\n Timeline.prototype.apply = function (item) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, event, _b, resolve, before, before_1, before_1_1, plugin, e, e_1_1, enrichment, enrichment_1, enrichment_1_1, plugin, e, e_2_1, destination, executeDestinations;\n var e_1, _c, e_2, _d;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (!item) {\n return [2 /*return*/];\n }\n _a = __read(item, 1), event = _a[0];\n _b = __read(item, 2), resolve = _b[1];\n before = this.plugins.filter(function (plugin) { return plugin.type === 'before'; });\n _e.label = 1;\n case 1:\n _e.trys.push([1, 6, 7, 8]);\n before_1 = __values(before), before_1_1 = before_1.next();\n _e.label = 2;\n case 2:\n if (!!before_1_1.done) return [3 /*break*/, 5];\n plugin = before_1_1.value;\n /* istanbul ignore if */\n if (!plugin.execute) {\n // do nothing\n return [3 /*break*/, 4];\n }\n return [4 /*yield*/, plugin.execute(__assign({}, event))];\n case 3:\n e = _e.sent();\n if (e === null) {\n resolve({ event: event, code: 0, message: '' });\n return [2 /*return*/];\n }\n else {\n event = e;\n }\n _e.label = 4;\n case 4:\n before_1_1 = before_1.next();\n return [3 /*break*/, 2];\n case 5: return [3 /*break*/, 8];\n case 6:\n e_1_1 = _e.sent();\n e_1 = { error: e_1_1 };\n return [3 /*break*/, 8];\n case 7:\n try {\n if (before_1_1 && !before_1_1.done && (_c = before_1.return)) _c.call(before_1);\n }\n finally { if (e_1) throw e_1.error; }\n return [7 /*endfinally*/];\n case 8:\n enrichment = this.plugins.filter(function (plugin) { return plugin.type === 'enrichment' || plugin.type === undefined; });\n _e.label = 9;\n case 9:\n _e.trys.push([9, 14, 15, 16]);\n enrichment_1 = __values(enrichment), enrichment_1_1 = enrichment_1.next();\n _e.label = 10;\n case 10:\n if (!!enrichment_1_1.done) return [3 /*break*/, 13];\n plugin = enrichment_1_1.value;\n /* istanbul ignore if */\n if (!plugin.execute) {\n // do nothing\n return [3 /*break*/, 12];\n }\n return [4 /*yield*/, plugin.execute(__assign({}, event))];\n case 11:\n e = _e.sent();\n if (e === null) {\n resolve({ event: event, code: 0, message: '' });\n return [2 /*return*/];\n }\n else {\n event = e;\n }\n _e.label = 12;\n case 12:\n enrichment_1_1 = enrichment_1.next();\n return [3 /*break*/, 10];\n case 13: return [3 /*break*/, 16];\n case 14:\n e_2_1 = _e.sent();\n e_2 = { error: e_2_1 };\n return [3 /*break*/, 16];\n case 15:\n try {\n if (enrichment_1_1 && !enrichment_1_1.done && (_d = enrichment_1.return)) _d.call(enrichment_1);\n }\n finally { if (e_2) throw e_2.error; }\n return [7 /*endfinally*/];\n case 16:\n destination = this.plugins.filter(function (plugin) { return plugin.type === 'destination'; });\n executeDestinations = destination.map(function (plugin) {\n var eventClone = __assign({}, event);\n return plugin.execute(eventClone).catch(function (e) { return buildResult(eventClone, 0, String(e)); });\n });\n void Promise.all(executeDestinations).then(function (_a) {\n var _b = __read(_a, 1), result = _b[0];\n resolve(result);\n });\n return [2 /*return*/];\n }\n });\n });\n };\n Timeline.prototype.flush = function () {\n return __awaiter(this, void 0, void 0, function () {\n var queue, destination, executeDestinations;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n queue = this.queue;\n this.queue = [];\n return [4 /*yield*/, Promise.all(queue.map(function (item) { return _this.apply(item); }))];\n case 1:\n _a.sent();\n destination = this.plugins.filter(function (plugin) { return plugin.type === 'destination'; });\n executeDestinations = destination.map(function (plugin) {\n return plugin.flush && plugin.flush();\n });\n return [4 /*yield*/, Promise.all(executeDestinations)];\n case 2:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n return Timeline;\n}());\nexport { Timeline };\n//# sourceMappingURL=timeline.js.map","export var SUCCESS_MESSAGE = 'Event tracked successfully';\nexport var UNEXPECTED_ERROR_MESSAGE = 'Unexpected error occurred';\nexport var MAX_RETRIES_EXCEEDED_MESSAGE = 'Event rejected due to exceeded retry count';\nexport var OPT_OUT_MESSAGE = 'Event skipped due to optOut config';\nexport var MISSING_API_KEY_MESSAGE = 'Event rejected due to missing API key';\nexport var INVALID_API_KEY = 'Invalid API key';\nexport var CLIENT_NOT_INITIALIZED = 'Client not initialized';\n//# sourceMappingURL=messages.js.map","export var returnWrapper = function (awaitable) { return ({\n promise: awaitable || Promise.resolve(),\n}); };\n//# sourceMappingURL=return-wrapper.js.map","import { __awaiter, __generator, __values } from \"tslib\";\nimport { createGroupIdentifyEvent, createIdentifyEvent, createTrackEvent, createRevenueEvent, createGroupEvent, } from './utils/event-builder';\nimport { Timeline } from './timeline';\nimport { buildResult } from './utils/result-builder';\nimport { CLIENT_NOT_INITIALIZED, OPT_OUT_MESSAGE } from './messages';\nimport { returnWrapper } from './utils/return-wrapper';\nvar AmplitudeCore = /** @class */ (function () {\n function AmplitudeCore(name) {\n if (name === void 0) { name = '$default'; }\n this.initializing = false;\n this.q = [];\n this.dispatchQ = [];\n this.logEvent = this.track.bind(this);\n this.timeline = new Timeline(this);\n this.name = name;\n }\n AmplitudeCore.prototype._init = function (config) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n this.config = config;\n this.timeline.reset(this);\n return [4 /*yield*/, this.runQueuedFunctions('q')];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeCore.prototype.runQueuedFunctions = function (queueName) {\n return __awaiter(this, void 0, void 0, function () {\n var queuedFunctions, queuedFunctions_1, queuedFunctions_1_1, queuedFunction, e_1_1;\n var e_1, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n queuedFunctions = this[queueName];\n this[queueName] = [];\n _b.label = 1;\n case 1:\n _b.trys.push([1, 6, 7, 8]);\n queuedFunctions_1 = __values(queuedFunctions), queuedFunctions_1_1 = queuedFunctions_1.next();\n _b.label = 2;\n case 2:\n if (!!queuedFunctions_1_1.done) return [3 /*break*/, 5];\n queuedFunction = queuedFunctions_1_1.value;\n return [4 /*yield*/, queuedFunction()];\n case 3:\n _b.sent();\n _b.label = 4;\n case 4:\n queuedFunctions_1_1 = queuedFunctions_1.next();\n return [3 /*break*/, 2];\n case 5: return [3 /*break*/, 8];\n case 6:\n e_1_1 = _b.sent();\n e_1 = { error: e_1_1 };\n return [3 /*break*/, 8];\n case 7:\n try {\n if (queuedFunctions_1_1 && !queuedFunctions_1_1.done && (_a = queuedFunctions_1.return)) _a.call(queuedFunctions_1);\n }\n finally { if (e_1) throw e_1.error; }\n return [7 /*endfinally*/];\n case 8: return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeCore.prototype.track = function (eventInput, eventProperties, eventOptions) {\n var event = createTrackEvent(eventInput, eventProperties, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.identify = function (identify, eventOptions) {\n var event = createIdentifyEvent(identify, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions) {\n var event = createGroupIdentifyEvent(groupType, groupName, identify, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.setGroup = function (groupType, groupName, eventOptions) {\n var event = createGroupEvent(groupType, groupName, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.revenue = function (revenue, eventOptions) {\n var event = createRevenueEvent(revenue, eventOptions);\n return returnWrapper(this.dispatch(event));\n };\n AmplitudeCore.prototype.add = function (plugin) {\n if (!this.config) {\n this.q.push(this.add.bind(this, plugin));\n return returnWrapper();\n }\n return returnWrapper(this.timeline.register(plugin, this.config));\n };\n AmplitudeCore.prototype.remove = function (pluginName) {\n if (!this.config) {\n this.q.push(this.remove.bind(this, pluginName));\n return returnWrapper();\n }\n return returnWrapper(this.timeline.deregister(pluginName));\n };\n AmplitudeCore.prototype.dispatchWithCallback = function (event, callback) {\n if (!this.config) {\n return callback(buildResult(event, 0, CLIENT_NOT_INITIALIZED));\n }\n void this.process(event).then(callback);\n };\n AmplitudeCore.prototype.dispatch = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n if (!this.config) {\n return [2 /*return*/, new Promise(function (resolve) {\n _this.dispatchQ.push(_this.dispatchWithCallback.bind(_this, event, resolve));\n })];\n }\n return [2 /*return*/, this.process(event)];\n });\n });\n };\n AmplitudeCore.prototype.process = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n var result, e_2, message, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 3]);\n // skip event processing if opt out\n if (this.config.optOut) {\n return [2 /*return*/, buildResult(event, 0, OPT_OUT_MESSAGE)];\n }\n return [4 /*yield*/, this.timeline.push(event)];\n case 1:\n result = _a.sent();\n result.code === 200\n ? this.config.loggerProvider.log(result.message)\n : this.config.loggerProvider.error(result.message);\n return [2 /*return*/, result];\n case 2:\n e_2 = _a.sent();\n message = String(e_2);\n this.config.loggerProvider.error(message);\n result = buildResult(event, 0, message);\n return [2 /*return*/, result];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeCore.prototype.setOptOut = function (optOut) {\n if (!this.config) {\n this.q.push(this.setOptOut.bind(this, Boolean(optOut)));\n return;\n }\n this.config.optOut = Boolean(optOut);\n };\n AmplitudeCore.prototype.flush = function () {\n return returnWrapper(this.timeline.flush());\n };\n return AmplitudeCore;\n}());\nexport { AmplitudeCore };\n//# sourceMappingURL=core-client.js.map","import { __assign } from \"tslib\";\nimport { RevenueProperty, } from '@amplitude/analytics-types';\nimport { isValidObject } from './utils/valid-properties';\nvar Revenue = /** @class */ (function () {\n function Revenue() {\n this.productId = '';\n this.quantity = 1;\n this.price = 0.0;\n }\n Revenue.prototype.setProductId = function (productId) {\n this.productId = productId;\n return this;\n };\n Revenue.prototype.setQuantity = function (quantity) {\n if (quantity > 0) {\n this.quantity = quantity;\n }\n return this;\n };\n Revenue.prototype.setPrice = function (price) {\n this.price = price;\n return this;\n };\n Revenue.prototype.setRevenueType = function (revenueType) {\n this.revenueType = revenueType;\n return this;\n };\n Revenue.prototype.setRevenue = function (revenue) {\n this.revenue = revenue;\n return this;\n };\n Revenue.prototype.setEventProperties = function (properties) {\n if (isValidObject(properties)) {\n this.properties = properties;\n }\n return this;\n };\n Revenue.prototype.getEventProperties = function () {\n var eventProperties = this.properties ? __assign({}, this.properties) : {};\n eventProperties[RevenueProperty.REVENUE_PRODUCT_ID] = this.productId;\n eventProperties[RevenueProperty.REVENUE_QUANTITY] = this.quantity;\n eventProperties[RevenueProperty.REVENUE_PRICE] = this.price;\n eventProperties[RevenueProperty.REVENUE_TYPE] = this.revenueType;\n eventProperties[RevenueProperty.REVENUE] = this.revenue;\n return eventProperties;\n };\n return Revenue;\n}());\nexport { Revenue };\n//# sourceMappingURL=revenue.js.map","// Creates an array of elements split into groups the length of size.\n// If array can't be split evenly, the final chunk will be the remaining elements.\n// Works similary as https://lodash.com/docs/4.17.15#chunk\nexport var chunk = function (arr, size) {\n var chunkSize = Math.max(size, 1);\n return arr.reduce(function (chunks, element, index) {\n var chunkIndex = Math.floor(index / chunkSize);\n if (!chunks[chunkIndex]) {\n chunks[chunkIndex] = [];\n }\n chunks[chunkIndex].push(element);\n return chunks;\n }, []);\n};\n//# sourceMappingURL=chunk.js.map","import { LogLevel } from '@amplitude/analytics-types';\nvar PREFIX = 'Amplitude Logger ';\nvar Logger = /** @class */ (function () {\n function Logger() {\n this.logLevel = LogLevel.None;\n }\n Logger.prototype.disable = function () {\n this.logLevel = LogLevel.None;\n };\n Logger.prototype.enable = function (logLevel) {\n if (logLevel === void 0) { logLevel = LogLevel.Warn; }\n this.logLevel = logLevel;\n };\n Logger.prototype.log = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Verbose) {\n return;\n }\n console.log(\"\".concat(PREFIX, \"[Log]: \").concat(args.join(' ')));\n };\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Warn) {\n return;\n }\n console.warn(\"\".concat(PREFIX, \"[Warn]: \").concat(args.join(' ')));\n };\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Error) {\n return;\n }\n console.error(\"\".concat(PREFIX, \"[Error]: \").concat(args.join(' ')));\n };\n Logger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this.logLevel < LogLevel.Debug) {\n return;\n }\n // console.debug output is hidden by default in chrome\n console.log(\"\".concat(PREFIX, \"[Debug]: \").concat(args.join(' ')));\n };\n return Logger;\n}());\nexport { Logger };\n//# sourceMappingURL=logger.js.map","import { LogLevel, } from '@amplitude/analytics-types';\nimport { AMPLITUDE_SERVER_URL, AMPLITUDE_BATCH_SERVER_URL, EU_AMPLITUDE_SERVER_URL, EU_AMPLITUDE_BATCH_SERVER_URL, } from './constants';\nimport { Logger } from './logger';\nexport var getDefaultConfig = function () { return ({\n flushMaxRetries: 12,\n flushQueueSize: 200,\n flushIntervalMillis: 10000,\n instanceName: '$default_instance',\n logLevel: LogLevel.Warn,\n loggerProvider: new Logger(),\n optOut: false,\n serverUrl: AMPLITUDE_SERVER_URL,\n serverZone: 'US',\n useBatch: false,\n}); };\nvar Config = /** @class */ (function () {\n function Config(options) {\n var _a, _b, _c, _d;\n this._optOut = false;\n var defaultConfig = getDefaultConfig();\n this.apiKey = options.apiKey;\n this.flushIntervalMillis = (_a = options.flushIntervalMillis) !== null && _a !== void 0 ? _a : defaultConfig.flushIntervalMillis;\n this.flushMaxRetries = options.flushMaxRetries || defaultConfig.flushMaxRetries;\n this.flushQueueSize = options.flushQueueSize || defaultConfig.flushQueueSize;\n this.instanceName = options.instanceName || defaultConfig.instanceName;\n this.loggerProvider = options.loggerProvider || defaultConfig.loggerProvider;\n this.logLevel = (_b = options.logLevel) !== null && _b !== void 0 ? _b : defaultConfig.logLevel;\n this.minIdLength = options.minIdLength;\n this.plan = options.plan;\n this.ingestionMetadata = options.ingestionMetadata;\n this.optOut = (_c = options.optOut) !== null && _c !== void 0 ? _c : defaultConfig.optOut;\n this.serverUrl = options.serverUrl;\n this.serverZone = options.serverZone || defaultConfig.serverZone;\n this.storageProvider = options.storageProvider;\n this.transportProvider = options.transportProvider;\n this.useBatch = (_d = options.useBatch) !== null && _d !== void 0 ? _d : defaultConfig.useBatch;\n this.loggerProvider.enable(this.logLevel);\n var serverConfig = createServerConfig(options.serverUrl, options.serverZone, options.useBatch);\n this.serverZone = serverConfig.serverZone;\n this.serverUrl = serverConfig.serverUrl;\n }\n Object.defineProperty(Config.prototype, \"optOut\", {\n get: function () {\n return this._optOut;\n },\n set: function (optOut) {\n this._optOut = optOut;\n },\n enumerable: false,\n configurable: true\n });\n return Config;\n}());\nexport { Config };\nexport var getServerUrl = function (serverZone, useBatch) {\n if (serverZone === 'EU') {\n return useBatch ? EU_AMPLITUDE_BATCH_SERVER_URL : EU_AMPLITUDE_SERVER_URL;\n }\n return useBatch ? AMPLITUDE_BATCH_SERVER_URL : AMPLITUDE_SERVER_URL;\n};\nexport var createServerConfig = function (serverUrl, serverZone, useBatch) {\n if (serverUrl === void 0) { serverUrl = ''; }\n if (serverZone === void 0) { serverZone = getDefaultConfig().serverZone; }\n if (useBatch === void 0) { useBatch = getDefaultConfig().useBatch; }\n if (serverUrl) {\n return { serverUrl: serverUrl, serverZone: undefined };\n }\n var _serverZone = ['US', 'EU'].includes(serverZone) ? serverZone : getDefaultConfig().serverZone;\n return {\n serverZone: _serverZone,\n serverUrl: getServerUrl(_serverZone, useBatch),\n };\n};\n//# sourceMappingURL=config.js.map","import { __awaiter, __generator, __read, __rest, __spreadArray } from \"tslib\";\nimport { Status, } from '@amplitude/analytics-types';\nimport { INVALID_API_KEY, MAX_RETRIES_EXCEEDED_MESSAGE, MISSING_API_KEY_MESSAGE, SUCCESS_MESSAGE, UNEXPECTED_ERROR_MESSAGE, } from '../messages';\nimport { STORAGE_PREFIX } from '../constants';\nimport { chunk } from '../utils/chunk';\nimport { buildResult } from '../utils/result-builder';\nimport { createServerConfig } from '../config';\nfunction getErrorMessage(error) {\n if (error instanceof Error)\n return error.message;\n return String(error);\n}\nexport function getResponseBodyString(res) {\n var responseBodyString = '';\n try {\n if ('body' in res) {\n responseBodyString = JSON.stringify(res.body, null, 2);\n }\n }\n catch (_a) {\n // to avoid crash, but don't care about the error, add comment to avoid empty block lint error\n }\n return responseBodyString;\n}\nvar Destination = /** @class */ (function () {\n function Destination() {\n this.name = 'amplitude';\n this.type = 'destination';\n this.retryTimeout = 1000;\n this.throttleTimeout = 30000;\n this.storageKey = '';\n this.scheduled = null;\n this.queue = [];\n }\n Destination.prototype.setup = function (config) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var unsent;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n this.config = config;\n this.storageKey = \"\".concat(STORAGE_PREFIX, \"_\").concat(this.config.apiKey.substring(0, 10));\n return [4 /*yield*/, ((_a = this.config.storageProvider) === null || _a === void 0 ? void 0 : _a.get(this.storageKey))];\n case 1:\n unsent = _b.sent();\n this.saveEvents(); // sets storage to '[]'\n if (unsent && unsent.length > 0) {\n void Promise.all(unsent.map(function (event) { return _this.execute(event); })).catch();\n }\n return [2 /*return*/, Promise.resolve(undefined)];\n }\n });\n });\n };\n Destination.prototype.execute = function (event) {\n var _this = this;\n return new Promise(function (resolve) {\n var context = {\n event: event,\n attempts: 0,\n callback: function (result) { return resolve(result); },\n timeout: 0,\n };\n void _this.addToQueue(context);\n });\n };\n Destination.prototype.addToQueue = function () {\n var _this = this;\n var list = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n list[_i] = arguments[_i];\n }\n var tryable = list.filter(function (context) {\n if (context.attempts < _this.config.flushMaxRetries) {\n context.attempts += 1;\n return true;\n }\n void _this.fulfillRequest([context], 500, MAX_RETRIES_EXCEEDED_MESSAGE);\n return false;\n });\n tryable.forEach(function (context) {\n _this.queue = _this.queue.concat(context);\n if (context.timeout === 0) {\n _this.schedule(_this.config.flushIntervalMillis);\n return;\n }\n setTimeout(function () {\n context.timeout = 0;\n _this.schedule(0);\n }, context.timeout);\n });\n this.saveEvents();\n };\n Destination.prototype.schedule = function (timeout) {\n var _this = this;\n if (this.scheduled)\n return;\n this.scheduled = setTimeout(function () {\n void _this.flush(true).then(function () {\n if (_this.queue.length > 0) {\n _this.schedule(timeout);\n }\n });\n }, timeout);\n };\n Destination.prototype.flush = function (useRetry) {\n if (useRetry === void 0) { useRetry = false; }\n return __awaiter(this, void 0, void 0, function () {\n var list, later, batches;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n list = [];\n later = [];\n this.queue.forEach(function (context) { return (context.timeout === 0 ? list.push(context) : later.push(context)); });\n this.queue = later;\n if (this.scheduled) {\n clearTimeout(this.scheduled);\n this.scheduled = null;\n }\n batches = chunk(list, this.config.flushQueueSize);\n return [4 /*yield*/, Promise.all(batches.map(function (batch) { return _this.send(batch, useRetry); }))];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n Destination.prototype.send = function (list, useRetry) {\n if (useRetry === void 0) { useRetry = true; }\n return __awaiter(this, void 0, void 0, function () {\n var payload, serverUrl, res, e_1, errorMessage;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this.config.apiKey) {\n return [2 /*return*/, this.fulfillRequest(list, 400, MISSING_API_KEY_MESSAGE)];\n }\n payload = {\n api_key: this.config.apiKey,\n events: list.map(function (context) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _a = context.event, extra = _a.extra, eventWithoutExtra = __rest(_a, [\"extra\"]);\n return eventWithoutExtra;\n }),\n options: {\n min_id_length: this.config.minIdLength,\n },\n };\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n serverUrl = createServerConfig(this.config.serverUrl, this.config.serverZone, this.config.useBatch).serverUrl;\n return [4 /*yield*/, this.config.transportProvider.send(serverUrl, payload)];\n case 2:\n res = _a.sent();\n if (res === null) {\n this.fulfillRequest(list, 0, UNEXPECTED_ERROR_MESSAGE);\n return [2 /*return*/];\n }\n if (!useRetry) {\n if ('body' in res) {\n this.fulfillRequest(list, res.statusCode, \"\".concat(res.status, \": \").concat(getResponseBodyString(res)));\n }\n else {\n this.fulfillRequest(list, res.statusCode, res.status);\n }\n return [2 /*return*/];\n }\n this.handleResponse(res, list);\n return [3 /*break*/, 4];\n case 3:\n e_1 = _a.sent();\n errorMessage = getErrorMessage(e_1);\n this.config.loggerProvider.error(errorMessage);\n this.fulfillRequest(list, 0, errorMessage);\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n });\n };\n Destination.prototype.handleResponse = function (res, list) {\n var status = res.status;\n switch (status) {\n case Status.Success: {\n this.handleSuccessResponse(res, list);\n break;\n }\n case Status.Invalid: {\n this.handleInvalidResponse(res, list);\n break;\n }\n case Status.PayloadTooLarge: {\n this.handlePayloadTooLargeResponse(res, list);\n break;\n }\n case Status.RateLimit: {\n this.handleRateLimitResponse(res, list);\n break;\n }\n default: {\n // log intermediate event status before retry\n this.config.loggerProvider.warn(\"{code: 0, error: \\\"Status '\".concat(status, \"' provided for \").concat(list.length, \" events\\\"}\"));\n this.handleOtherResponse(list);\n break;\n }\n }\n };\n Destination.prototype.handleSuccessResponse = function (res, list) {\n this.fulfillRequest(list, res.statusCode, SUCCESS_MESSAGE);\n };\n Destination.prototype.handleInvalidResponse = function (res, list) {\n var _this = this;\n if (res.body.missingField || res.body.error.startsWith(INVALID_API_KEY)) {\n this.fulfillRequest(list, res.statusCode, res.body.error);\n return;\n }\n var dropIndex = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(Object.values(res.body.eventsWithInvalidFields)), false), __read(Object.values(res.body.eventsWithMissingFields)), false), __read(Object.values(res.body.eventsWithInvalidIdLengths)), false), __read(res.body.silencedEvents), false).flat();\n var dropIndexSet = new Set(dropIndex);\n var retry = list.filter(function (context, index) {\n if (dropIndexSet.has(index)) {\n _this.fulfillRequest([context], res.statusCode, res.body.error);\n return;\n }\n return true;\n });\n if (retry.length > 0) {\n // log intermediate event status before retry\n this.config.loggerProvider.warn(getResponseBodyString(res));\n }\n this.addToQueue.apply(this, __spreadArray([], __read(retry), false));\n };\n Destination.prototype.handlePayloadTooLargeResponse = function (res, list) {\n if (list.length === 1) {\n this.fulfillRequest(list, res.statusCode, res.body.error);\n return;\n }\n // log intermediate event status before retry\n this.config.loggerProvider.warn(getResponseBodyString(res));\n this.config.flushQueueSize /= 2;\n this.addToQueue.apply(this, __spreadArray([], __read(list), false));\n };\n Destination.prototype.handleRateLimitResponse = function (res, list) {\n var _this = this;\n var dropUserIds = Object.keys(res.body.exceededDailyQuotaUsers);\n var dropDeviceIds = Object.keys(res.body.exceededDailyQuotaDevices);\n var throttledIndex = res.body.throttledEvents;\n var dropUserIdsSet = new Set(dropUserIds);\n var dropDeviceIdsSet = new Set(dropDeviceIds);\n var throttledIndexSet = new Set(throttledIndex);\n var retry = list.filter(function (context, index) {\n if ((context.event.user_id && dropUserIdsSet.has(context.event.user_id)) ||\n (context.event.device_id && dropDeviceIdsSet.has(context.event.device_id))) {\n _this.fulfillRequest([context], res.statusCode, res.body.error);\n return;\n }\n if (throttledIndexSet.has(index)) {\n context.timeout = _this.throttleTimeout;\n }\n return true;\n });\n if (retry.length > 0) {\n // log intermediate event status before retry\n this.config.loggerProvider.warn(getResponseBodyString(res));\n }\n this.addToQueue.apply(this, __spreadArray([], __read(retry), false));\n };\n Destination.prototype.handleOtherResponse = function (list) {\n var _this = this;\n this.addToQueue.apply(this, __spreadArray([], __read(list.map(function (context) {\n context.timeout = context.attempts * _this.retryTimeout;\n return context;\n })), false));\n };\n Destination.prototype.fulfillRequest = function (list, code, message) {\n this.saveEvents();\n list.forEach(function (context) { return context.callback(buildResult(context.event, code, message)); });\n };\n /**\n * Saves events to storage\n * This is called on\n * 1) new events are added to queue; or\n * 2) response comes back for a request\n */\n Destination.prototype.saveEvents = function () {\n if (!this.config.storageProvider) {\n return;\n }\n var events = Array.from(this.queue.map(function (context) { return context.event; }));\n void this.config.storageProvider.set(this.storageKey, events);\n };\n return Destination;\n}());\nexport { Destination };\n//# sourceMappingURL=destination.js.map","import { __assign, __values } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { LogLevel } from '@amplitude/analytics-types';\nexport var getStacktrace = function (ignoreDepth) {\n if (ignoreDepth === void 0) { ignoreDepth = 0; }\n var trace = new Error().stack || '';\n return trace\n .split('\\n')\n .slice(2 + ignoreDepth)\n .map(function (text) { return text.trim(); });\n};\n// This hook makes sure we always get the latest logger and logLevel.\nexport var getClientLogConfig = function (client) { return function () {\n var _a = __assign({}, client.config), logger = _a.loggerProvider, logLevel = _a.logLevel;\n return {\n logger: logger,\n logLevel: logLevel,\n };\n}; };\n// This is a convenient function to get the attribute from object with string path, similar to lodash '#get'.\nexport var getValueByStringPath = function (obj, path) {\n var e_1, _a;\n path = path.replace(/\\[(\\w+)\\]/g, '.$1'); // convert indexes to properties\n path = path.replace(/^\\./, ''); // strip a leading dot\n try {\n for (var _b = __values(path.split('.')), _c = _b.next(); !_c.done; _c = _b.next()) {\n var attr = _c.value;\n if (attr in obj) {\n obj = obj[attr];\n }\n else {\n return;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return obj;\n};\nexport var getClientStates = function (client, paths) { return function () {\n var e_2, _a;\n var res = {};\n try {\n for (var paths_1 = __values(paths), paths_1_1 = paths_1.next(); !paths_1_1.done; paths_1_1 = paths_1.next()) {\n var path = paths_1_1.value;\n res[path] = getValueByStringPath(client, path);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (paths_1_1 && !paths_1_1.done && (_a = paths_1.return)) _a.call(paths_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n}; };\nexport var debugWrapper = function (fn, fnName, getLogConfig, getStates, fnContext) {\n if (fnContext === void 0) { fnContext = null; }\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var _a = getLogConfig(), logger = _a.logger, logLevel = _a.logLevel;\n // return early if possible to reduce overhead\n if ((logLevel && logLevel < LogLevel.Debug) || !logLevel || !logger) {\n return fn.apply(fnContext, args);\n }\n var debugContext = {\n type: 'invoke public method',\n name: fnName,\n args: args,\n stacktrace: getStacktrace(1),\n time: {\n start: new Date().toISOString(),\n },\n states: {},\n };\n if (getStates && debugContext.states) {\n debugContext.states.before = getStates();\n }\n var result = fn.apply(fnContext, args);\n if (result && result.promise) {\n // if result is a promise, add the callback\n result.promise.then(function () {\n if (getStates && debugContext.states) {\n debugContext.states.after = getStates();\n }\n if (debugContext.time) {\n debugContext.time.end = new Date().toISOString();\n }\n logger.debug(JSON.stringify(debugContext, null, 2));\n });\n }\n else {\n if (getStates && debugContext.states) {\n debugContext.states.after = getStates();\n }\n if (debugContext.time) {\n debugContext.time.end = new Date().toISOString();\n }\n logger.debug(JSON.stringify(debugContext, null, 2));\n }\n return result;\n };\n};\n//# sourceMappingURL=debug.js.map","import { __awaiter, __generator } from \"tslib\";\nvar MemoryStorage = /** @class */ (function () {\n function MemoryStorage() {\n this.memoryStorage = new Map();\n }\n MemoryStorage.prototype.isEnabled = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, true];\n });\n });\n };\n MemoryStorage.prototype.get = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.memoryStorage.get(key)];\n });\n });\n };\n MemoryStorage.prototype.getRaw = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n var value;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.get(key)];\n case 1:\n value = _a.sent();\n return [2 /*return*/, value ? JSON.stringify(value) : undefined];\n }\n });\n });\n };\n MemoryStorage.prototype.set = function (key, value) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.memoryStorage.set(key, value);\n return [2 /*return*/];\n });\n });\n };\n MemoryStorage.prototype.remove = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.memoryStorage.delete(key);\n return [2 /*return*/];\n });\n });\n };\n MemoryStorage.prototype.reset = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n this.memoryStorage.clear();\n return [2 /*return*/];\n });\n });\n };\n return MemoryStorage;\n}());\nexport { MemoryStorage };\n//# sourceMappingURL=memory.js.map","/* eslint-disable @typescript-eslint/no-unsafe-argument */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-call */\nimport { Status } from '@amplitude/analytics-types';\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport() {\n }\n BaseTransport.prototype.send = function (_serverUrl, _payload) {\n return Promise.resolve(null);\n };\n BaseTransport.prototype.buildResponse = function (responseJSON) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;\n if (typeof responseJSON !== 'object') {\n return null;\n }\n var statusCode = responseJSON.code || 0;\n var status = this.buildStatus(statusCode);\n switch (status) {\n case Status.Success:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n eventsIngested: (_a = responseJSON.events_ingested) !== null && _a !== void 0 ? _a : 0,\n payloadSizeBytes: (_b = responseJSON.payload_size_bytes) !== null && _b !== void 0 ? _b : 0,\n serverUploadTime: (_c = responseJSON.server_upload_time) !== null && _c !== void 0 ? _c : 0,\n },\n };\n case Status.Invalid:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n error: (_d = responseJSON.error) !== null && _d !== void 0 ? _d : '',\n missingField: (_e = responseJSON.missing_field) !== null && _e !== void 0 ? _e : '',\n eventsWithInvalidFields: (_f = responseJSON.events_with_invalid_fields) !== null && _f !== void 0 ? _f : {},\n eventsWithMissingFields: (_g = responseJSON.events_with_missing_fields) !== null && _g !== void 0 ? _g : {},\n eventsWithInvalidIdLengths: (_h = responseJSON.events_with_invalid_id_lengths) !== null && _h !== void 0 ? _h : {},\n epsThreshold: (_j = responseJSON.eps_threshold) !== null && _j !== void 0 ? _j : 0,\n exceededDailyQuotaDevices: (_k = responseJSON.exceeded_daily_quota_devices) !== null && _k !== void 0 ? _k : {},\n silencedDevices: (_l = responseJSON.silenced_devices) !== null && _l !== void 0 ? _l : [],\n silencedEvents: (_m = responseJSON.silenced_events) !== null && _m !== void 0 ? _m : [],\n throttledDevices: (_o = responseJSON.throttled_devices) !== null && _o !== void 0 ? _o : {},\n throttledEvents: (_p = responseJSON.throttled_events) !== null && _p !== void 0 ? _p : [],\n },\n };\n case Status.PayloadTooLarge:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n error: (_q = responseJSON.error) !== null && _q !== void 0 ? _q : '',\n },\n };\n case Status.RateLimit:\n return {\n status: status,\n statusCode: statusCode,\n body: {\n error: (_r = responseJSON.error) !== null && _r !== void 0 ? _r : '',\n epsThreshold: (_s = responseJSON.eps_threshold) !== null && _s !== void 0 ? _s : 0,\n throttledDevices: (_t = responseJSON.throttled_devices) !== null && _t !== void 0 ? _t : {},\n throttledUsers: (_u = responseJSON.throttled_users) !== null && _u !== void 0 ? _u : {},\n exceededDailyQuotaDevices: (_v = responseJSON.exceeded_daily_quota_devices) !== null && _v !== void 0 ? _v : {},\n exceededDailyQuotaUsers: (_w = responseJSON.exceeded_daily_quota_users) !== null && _w !== void 0 ? _w : {},\n throttledEvents: (_x = responseJSON.throttled_events) !== null && _x !== void 0 ? _x : [],\n },\n };\n case Status.Timeout:\n default:\n return {\n status: status,\n statusCode: statusCode,\n };\n }\n };\n BaseTransport.prototype.buildStatus = function (code) {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n if (code === 429) {\n return Status.RateLimit;\n }\n if (code === 413) {\n return Status.PayloadTooLarge;\n }\n if (code === 408) {\n return Status.Timeout;\n }\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n if (code >= 500) {\n return Status.Failed;\n }\n return Status.Unknown;\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","/* eslint-disable no-restricted-globals */\n/* Only file allowed to access to globalThis, window, self */\nexport var getGlobalScope = function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n return undefined;\n};\n//# sourceMappingURL=global-scope.js.map","import { getGlobalScope } from './global-scope';\nexport var getQueryParams = function () {\n var _a;\n var globalScope = getGlobalScope();\n /* istanbul ignore if */\n if (!((_a = globalScope === null || globalScope === void 0 ? void 0 : globalScope.location) === null || _a === void 0 ? void 0 : _a.search)) {\n return {};\n }\n var pairs = globalScope.location.search.substring(1).split('&').filter(Boolean);\n var params = pairs.reduce(function (acc, curr) {\n var query = curr.split('=', 2);\n var key = tryDecodeURIComponent(query[0]);\n var value = tryDecodeURIComponent(query[1]);\n if (!value) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n return params;\n};\nexport var tryDecodeURIComponent = function (value) {\n if (value === void 0) { value = ''; }\n try {\n return decodeURIComponent(value);\n }\n catch (_a) {\n return '';\n }\n};\n//# sourceMappingURL=query-params.js.map","export var UTM_CAMPAIGN = 'utm_campaign';\nexport var UTM_CONTENT = 'utm_content';\nexport var UTM_ID = 'utm_id';\nexport var UTM_MEDIUM = 'utm_medium';\nexport var UTM_SOURCE = 'utm_source';\nexport var UTM_TERM = 'utm_term';\nexport var DCLID = 'dclid';\nexport var FBCLID = 'fbclid';\nexport var GBRAID = 'gbraid';\nexport var GCLID = 'gclid';\nexport var KO_CLICK_ID = 'ko_click_id';\nexport var LI_FAT_ID = 'li_fat_id';\nexport var MSCLKID = 'msclkid';\nexport var RDT_CID = 'rtd_cid';\nexport var TTCLID = 'ttclid';\nexport var TWCLID = 'twclid';\nexport var WBRAID = 'wbraid';\nexport var EMPTY_VALUE = 'EMPTY';\nexport var BASE_CAMPAIGN = {\n utm_campaign: undefined,\n utm_content: undefined,\n utm_id: undefined,\n utm_medium: undefined,\n utm_source: undefined,\n utm_term: undefined,\n referrer: undefined,\n referring_domain: undefined,\n dclid: undefined,\n gbraid: undefined,\n gclid: undefined,\n fbclid: undefined,\n ko_click_id: undefined,\n li_fat_id: undefined,\n msclkid: undefined,\n rtd_cid: undefined,\n ttclid: undefined,\n twclid: undefined,\n wbraid: undefined,\n};\nexport var MKTG = 'MKTG';\n//# sourceMappingURL=constants.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { getQueryParams } from '../query-params';\nimport { UTM_CAMPAIGN, UTM_CONTENT, UTM_MEDIUM, UTM_SOURCE, UTM_TERM, GCLID, FBCLID, BASE_CAMPAIGN, DCLID, MSCLKID, RDT_CID, TWCLID, TTCLID, KO_CLICK_ID, LI_FAT_ID, GBRAID, WBRAID, UTM_ID, } from './constants';\nvar CampaignParser = /** @class */ (function () {\n function CampaignParser() {\n }\n CampaignParser.prototype.parse = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, __assign(__assign(__assign(__assign({}, BASE_CAMPAIGN), this.getUtmParam()), this.getReferrer()), this.getClickIds())];\n });\n });\n };\n CampaignParser.prototype.getUtmParam = function () {\n var params = getQueryParams();\n var utmCampaign = params[UTM_CAMPAIGN];\n var utmContent = params[UTM_CONTENT];\n var utmId = params[UTM_ID];\n var utmMedium = params[UTM_MEDIUM];\n var utmSource = params[UTM_SOURCE];\n var utmTerm = params[UTM_TERM];\n return {\n utm_campaign: utmCampaign,\n utm_content: utmContent,\n utm_id: utmId,\n utm_medium: utmMedium,\n utm_source: utmSource,\n utm_term: utmTerm,\n };\n };\n CampaignParser.prototype.getReferrer = function () {\n var _a, _b;\n var data = {\n referrer: undefined,\n referring_domain: undefined,\n };\n try {\n data.referrer = document.referrer || undefined;\n data.referring_domain = (_b = (_a = data.referrer) === null || _a === void 0 ? void 0 : _a.split('/')[2]) !== null && _b !== void 0 ? _b : undefined;\n }\n catch (_c) {\n // nothing to track\n }\n return data;\n };\n CampaignParser.prototype.getClickIds = function () {\n var _a;\n var params = getQueryParams();\n return _a = {},\n _a[DCLID] = params[DCLID],\n _a[FBCLID] = params[FBCLID],\n _a[GBRAID] = params[GBRAID],\n _a[GCLID] = params[GCLID],\n _a[KO_CLICK_ID] = params[KO_CLICK_ID],\n _a[LI_FAT_ID] = params[LI_FAT_ID],\n _a[MSCLKID] = params[MSCLKID],\n _a[RDT_CID] = params[RDT_CID],\n _a[TTCLID] = params[TTCLID],\n _a[TWCLID] = params[TWCLID],\n _a[WBRAID] = params[WBRAID],\n _a;\n };\n return CampaignParser;\n}());\nexport { CampaignParser };\n//# sourceMappingURL=campaign-parser.js.map","import { AMPLITUDE_PREFIX } from '@amplitude/analytics-core';\nexport var getCookieName = function (apiKey, postKey, limit) {\n if (postKey === void 0) { postKey = ''; }\n if (limit === void 0) { limit = 10; }\n return [AMPLITUDE_PREFIX, postKey, apiKey.substring(0, limit)].filter(Boolean).join('_');\n};\nexport var getOldCookieName = function (apiKey) {\n return \"\".concat(AMPLITUDE_PREFIX.toLowerCase(), \"_\").concat(apiKey.substring(0, 6));\n};\n//# sourceMappingURL=cookie-name.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { getGlobalScope } from '../global-scope';\nvar CookieStorage = /** @class */ (function () {\n function CookieStorage(options) {\n this.options = __assign({}, options);\n }\n CookieStorage.prototype.isEnabled = function () {\n return __awaiter(this, void 0, void 0, function () {\n var random, testStrorage, testKey, value, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n /* istanbul ignore if */\n if (!getGlobalScope()) {\n return [2 /*return*/, false];\n }\n random = String(Date.now());\n testStrorage = new CookieStorage(this.options);\n testKey = 'AMP_TEST';\n _b.label = 1;\n case 1:\n _b.trys.push([1, 4, 5, 7]);\n return [4 /*yield*/, testStrorage.set(testKey, random)];\n case 2:\n _b.sent();\n return [4 /*yield*/, testStrorage.get(testKey)];\n case 3:\n value = _b.sent();\n return [2 /*return*/, value === random];\n case 4:\n _a = _b.sent();\n /* istanbul ignore next */\n return [2 /*return*/, false];\n case 5: return [4 /*yield*/, testStrorage.remove(testKey)];\n case 6:\n _b.sent();\n return [7 /*endfinally*/];\n case 7: return [2 /*return*/];\n }\n });\n });\n };\n CookieStorage.prototype.get = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n var value;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.getRaw(key)];\n case 1:\n value = _a.sent();\n if (!value) {\n return [2 /*return*/, undefined];\n }\n try {\n try {\n value = decodeURIComponent(atob(value));\n }\n catch (_b) {\n // value not encoded\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return [2 /*return*/, JSON.parse(value)];\n }\n catch (_c) {\n /* istanbul ignore next */\n return [2 /*return*/, undefined];\n }\n return [2 /*return*/];\n }\n });\n });\n };\n CookieStorage.prototype.getRaw = function (key) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var globalScope, cookie, match;\n return __generator(this, function (_b) {\n globalScope = getGlobalScope();\n cookie = (_a = globalScope === null || globalScope === void 0 ? void 0 : globalScope.document.cookie.split('; ')) !== null && _a !== void 0 ? _a : [];\n match = cookie.find(function (c) { return c.indexOf(key + '=') === 0; });\n if (!match) {\n return [2 /*return*/, undefined];\n }\n return [2 /*return*/, match.substring(key.length + 1)];\n });\n });\n };\n CookieStorage.prototype.set = function (key, value) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var expirationDays, expires, expireDate, date, str, globalScope;\n return __generator(this, function (_b) {\n try {\n expirationDays = (_a = this.options.expirationDays) !== null && _a !== void 0 ? _a : 0;\n expires = value !== null ? expirationDays : -1;\n expireDate = undefined;\n if (expires) {\n date = new Date();\n date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000);\n expireDate = date;\n }\n str = \"\".concat(key, \"=\").concat(btoa(encodeURIComponent(JSON.stringify(value))));\n if (expireDate) {\n str += \"; expires=\".concat(expireDate.toUTCString());\n }\n str += '; path=/';\n if (this.options.domain) {\n str += \"; domain=\".concat(this.options.domain);\n }\n if (this.options.secure) {\n str += '; Secure';\n }\n if (this.options.sameSite) {\n str += \"; SameSite=\".concat(this.options.sameSite);\n }\n globalScope = getGlobalScope();\n if (globalScope) {\n globalScope.document.cookie = str;\n }\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n CookieStorage.prototype.remove = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.set(key, null)];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n CookieStorage.prototype.reset = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/];\n });\n });\n };\n return CookieStorage;\n}());\nexport { CookieStorage };\n//# sourceMappingURL=cookie.js.map","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { BaseTransport } from '@amplitude/analytics-core';\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n FetchTransport.prototype.send = function (serverUrl, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var options, response, responsePayload;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n /* istanbul ignore if */\n if (typeof fetch === 'undefined') {\n throw new Error('FetchTransport is not supported');\n }\n options = {\n headers: {\n 'Content-Type': 'application/json',\n Accept: '*/*',\n },\n body: JSON.stringify(payload),\n method: 'POST',\n };\n return [4 /*yield*/, fetch(serverUrl, options)];\n case 1:\n response = _a.sent();\n return [4 /*yield*/, response.json()];\n case 2:\n responsePayload = _a.sent();\n return [2 /*return*/, this.buildResponse(responsePayload)];\n }\n });\n });\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","var ApplicationContextProviderImpl = /** @class */ (function () {\n function ApplicationContextProviderImpl() {\n }\n ApplicationContextProviderImpl.prototype.getApplicationContext = function () {\n return {\n versionName: this.versionName,\n language: getLanguage(),\n platform: 'Web',\n os: undefined,\n deviceModel: undefined,\n };\n };\n return ApplicationContextProviderImpl;\n}());\nvar getLanguage = function () {\n return ((typeof navigator !== 'undefined' &&\n ((navigator.languages && navigator.languages[0]) ||\n navigator.language)) ||\n '');\n};\n\nvar EventBridgeImpl = /** @class */ (function () {\n function EventBridgeImpl() {\n this.queue = [];\n }\n EventBridgeImpl.prototype.logEvent = function (event) {\n if (!this.receiver) {\n if (this.queue.length < 512) {\n this.queue.push(event);\n }\n }\n else {\n this.receiver(event);\n }\n };\n EventBridgeImpl.prototype.setEventReceiver = function (receiver) {\n this.receiver = receiver;\n if (this.queue.length > 0) {\n this.queue.forEach(function (event) {\n receiver(event);\n });\n this.queue = [];\n }\n };\n return EventBridgeImpl;\n}());\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\nvar __assign = function () {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nvar isEqual = function (obj1, obj2) {\n var primitive = ['string', 'number', 'boolean', 'undefined'];\n var typeA = typeof obj1;\n var typeB = typeof obj2;\n if (typeA !== typeB) {\n return false;\n }\n for (var _i = 0, primitive_1 = primitive; _i < primitive_1.length; _i++) {\n var p = primitive_1[_i];\n if (p === typeA) {\n return obj1 === obj2;\n }\n }\n // check null\n if (obj1 == null && obj2 == null) {\n return true;\n }\n else if (obj1 == null || obj2 == null) {\n return false;\n }\n // if got here - objects\n if (obj1.length !== obj2.length) {\n return false;\n }\n //check if arrays\n var isArrayA = Array.isArray(obj1);\n var isArrayB = Array.isArray(obj2);\n if (isArrayA !== isArrayB) {\n return false;\n }\n if (isArrayA && isArrayB) {\n //arrays\n for (var i = 0; i < obj1.length; i++) {\n if (!isEqual(obj1[i], obj2[i])) {\n return false;\n }\n }\n }\n else {\n //objects\n var sorted1 = Object.keys(obj1).sort();\n var sorted2 = Object.keys(obj2).sort();\n if (!isEqual(sorted1, sorted2)) {\n return false;\n }\n //compare object values\n var result_1 = true;\n Object.keys(obj1).forEach(function (key) {\n if (!isEqual(obj1[key], obj2[key])) {\n result_1 = false;\n }\n });\n return result_1;\n }\n return true;\n};\n\nvar ID_OP_SET = '$set';\nvar ID_OP_UNSET = '$unset';\nvar ID_OP_CLEAR_ALL = '$clearAll';\n// Polyfill for Object.entries\nif (!Object.entries) {\n Object.entries = function (obj) {\n var ownProps = Object.keys(obj);\n var i = ownProps.length;\n var resArray = new Array(i);\n while (i--) {\n resArray[i] = [ownProps[i], obj[ownProps[i]]];\n }\n return resArray;\n };\n}\nvar IdentityStoreImpl = /** @class */ (function () {\n function IdentityStoreImpl() {\n this.identity = { userProperties: {} };\n this.listeners = new Set();\n }\n IdentityStoreImpl.prototype.editIdentity = function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var self = this;\n var actingUserProperties = __assign({}, this.identity.userProperties);\n var actingIdentity = __assign(__assign({}, this.identity), { userProperties: actingUserProperties });\n return {\n setUserId: function (userId) {\n actingIdentity.userId = userId;\n return this;\n },\n setDeviceId: function (deviceId) {\n actingIdentity.deviceId = deviceId;\n return this;\n },\n setUserProperties: function (userProperties) {\n actingIdentity.userProperties = userProperties;\n return this;\n },\n updateUserProperties: function (actions) {\n var actingProperties = actingIdentity.userProperties || {};\n for (var _i = 0, _a = Object.entries(actions); _i < _a.length; _i++) {\n var _b = _a[_i], action = _b[0], properties = _b[1];\n switch (action) {\n case ID_OP_SET:\n for (var _c = 0, _d = Object.entries(properties); _c < _d.length; _c++) {\n var _e = _d[_c], key = _e[0], value = _e[1];\n actingProperties[key] = value;\n }\n break;\n case ID_OP_UNSET:\n for (var _f = 0, _g = Object.keys(properties); _f < _g.length; _f++) {\n var key = _g[_f];\n delete actingProperties[key];\n }\n break;\n case ID_OP_CLEAR_ALL:\n actingProperties = {};\n break;\n }\n }\n actingIdentity.userProperties = actingProperties;\n return this;\n },\n commit: function () {\n self.setIdentity(actingIdentity);\n return this;\n },\n };\n };\n IdentityStoreImpl.prototype.getIdentity = function () {\n return __assign({}, this.identity);\n };\n IdentityStoreImpl.prototype.setIdentity = function (identity) {\n var originalIdentity = __assign({}, this.identity);\n this.identity = __assign({}, identity);\n if (!isEqual(originalIdentity, this.identity)) {\n this.listeners.forEach(function (listener) {\n listener(identity);\n });\n }\n };\n IdentityStoreImpl.prototype.addIdentityListener = function (listener) {\n this.listeners.add(listener);\n };\n IdentityStoreImpl.prototype.removeIdentityListener = function (listener) {\n this.listeners.delete(listener);\n };\n return IdentityStoreImpl;\n}());\n\nvar safeGlobal = typeof globalThis !== 'undefined'\n ? globalThis\n : typeof global !== 'undefined'\n ? global\n : self;\n\nvar AnalyticsConnector = /** @class */ (function () {\n function AnalyticsConnector() {\n this.identityStore = new IdentityStoreImpl();\n this.eventBridge = new EventBridgeImpl();\n this.applicationContextProvider = new ApplicationContextProviderImpl();\n }\n AnalyticsConnector.getInstance = function (instanceName) {\n if (!safeGlobal['analyticsConnectorInstances']) {\n safeGlobal['analyticsConnectorInstances'] = {};\n }\n if (!safeGlobal['analyticsConnectorInstances'][instanceName]) {\n safeGlobal['analyticsConnectorInstances'][instanceName] =\n new AnalyticsConnector();\n }\n return safeGlobal['analyticsConnectorInstances'][instanceName];\n };\n return AnalyticsConnector;\n}());\n\nexport { AnalyticsConnector };\n","import { AnalyticsConnector } from '@amplitude/analytics-connector';\nexport var getAnalyticsConnector = function (instanceName) {\n if (instanceName === void 0) { instanceName = '$default_instance'; }\n return AnalyticsConnector.getInstance(instanceName);\n};\nexport var setConnectorUserId = function (userId, instanceName) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n getAnalyticsConnector(instanceName).identityStore.editIdentity().setUserId(userId).commit();\n};\nexport var setConnectorDeviceId = function (deviceId, instanceName) {\n getAnalyticsConnector(instanceName).identityStore.editIdentity().setDeviceId(deviceId).commit();\n};\n//# sourceMappingURL=analytics-connector.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { getAnalyticsConnector } from '../analytics-connector';\nvar IdentityEventSender = /** @class */ (function () {\n function IdentityEventSender() {\n this.name = 'identity';\n this.type = 'before';\n this.identityStore = getAnalyticsConnector().identityStore;\n }\n IdentityEventSender.prototype.execute = function (context) {\n return __awaiter(this, void 0, void 0, function () {\n var userProperties;\n return __generator(this, function (_a) {\n userProperties = context.user_properties;\n if (userProperties) {\n this.identityStore.editIdentity().updateUserProperties(userProperties).commit();\n }\n return [2 /*return*/, context];\n });\n });\n };\n IdentityEventSender.prototype.setup = function (config) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (config.instanceName) {\n this.identityStore = getAnalyticsConnector(config.instanceName).identityStore;\n }\n return [2 /*return*/];\n });\n });\n };\n return IdentityEventSender;\n}());\nexport { IdentityEventSender };\n//# sourceMappingURL=identity.js.map","export var getLanguage = function () {\n var _a, _b, _c, _d;\n if (typeof navigator === 'undefined')\n return '';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var userLanguage = navigator.userLanguage;\n return (_d = (_c = (_b = (_a = navigator.languages) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : navigator.language) !== null && _c !== void 0 ? _c : userLanguage) !== null && _d !== void 0 ? _d : '';\n};\n//# sourceMappingURL=language.js.map","import { __assign } from \"tslib\";\n/**\n * Returns false if defaultTracking === false or if defaultTracking[event],\n * otherwise returns true\n */\nvar isTrackingEnabled = function (defaultTracking, event) {\n if (typeof defaultTracking === 'boolean') {\n return defaultTracking;\n }\n if ((defaultTracking === null || defaultTracking === void 0 ? void 0 : defaultTracking[event]) === false) {\n return false;\n }\n return true;\n};\nexport var isAttributionTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'attribution');\n};\nexport var isFileDownloadTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'fileDownloads');\n};\nexport var isFormInteractionTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'formInteractions');\n};\nexport var isPageViewTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'pageViews');\n};\nexport var isSessionTrackingEnabled = function (defaultTracking) {\n return isTrackingEnabled(defaultTracking, 'sessions');\n};\nexport var getPageViewTrackingConfig = function (config) {\n var trackOn = function () { return false; };\n var trackHistoryChanges = undefined;\n var eventType;\n var isDefaultPageViewTrackingEnabled = isPageViewTrackingEnabled(config.defaultTracking);\n if (isDefaultPageViewTrackingEnabled) {\n trackOn = undefined;\n eventType = undefined;\n if (config.defaultTracking &&\n typeof config.defaultTracking === 'object' &&\n config.defaultTracking.pageViews &&\n typeof config.defaultTracking.pageViews === 'object') {\n if ('trackOn' in config.defaultTracking.pageViews) {\n trackOn = config.defaultTracking.pageViews.trackOn;\n }\n if ('trackHistoryChanges' in config.defaultTracking.pageViews) {\n trackHistoryChanges = config.defaultTracking.pageViews.trackHistoryChanges;\n }\n if ('eventType' in config.defaultTracking.pageViews && config.defaultTracking.pageViews.eventType) {\n eventType = config.defaultTracking.pageViews.eventType;\n }\n }\n }\n return {\n trackOn: trackOn,\n trackHistoryChanges: trackHistoryChanges,\n eventType: eventType,\n };\n};\nexport var getAttributionTrackingConfig = function (config) {\n if (isAttributionTrackingEnabled(config.defaultTracking) &&\n config.defaultTracking &&\n typeof config.defaultTracking === 'object' &&\n config.defaultTracking.attribution &&\n typeof config.defaultTracking.attribution === 'object') {\n return __assign({}, config.defaultTracking.attribution);\n }\n return {};\n};\n//# sourceMappingURL=default-tracking.js.map","/**\n * Applies the proxied functions on the proxied amplitude snippet to an instance of the real object.\n * @ignore\n */\nexport var runQueuedFunctions = function (instance, queue) {\n convertProxyObjectToRealObject(instance, queue);\n};\n/**\n * Applies the proxied functions on the proxied object to an instance of the real object.\n * Used to convert proxied Identify and Revenue objects.\n */\nexport var convertProxyObjectToRealObject = function (instance, queue) {\n for (var i = 0; i < queue.length; i++) {\n var _a = queue[i], name_1 = _a.name, args = _a.args, resolve = _a.resolve;\n var fn = instance && instance[name_1];\n if (typeof fn === 'function') {\n var result = fn.apply(instance, args);\n if (typeof resolve === 'function') {\n resolve(result === null || result === void 0 ? void 0 : result.promise);\n }\n }\n }\n return instance;\n};\n/**\n * Check if the param is snippet proxy\n */\nexport var isInstanceProxy = function (instance) {\n var instanceProxy = instance;\n return instanceProxy && instanceProxy._q !== undefined;\n};\n//# sourceMappingURL=snippet-helper.js.map","export var VERSION = '2.0.0';\n//# sourceMappingURL=version.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { UUID } from '@amplitude/analytics-core';\nimport { getLanguage } from '@amplitude/analytics-client-common';\nimport { VERSION } from '../version';\nvar BROWSER_PLATFORM = 'Web';\nvar IP_ADDRESS = '$remote';\nvar Context = /** @class */ (function () {\n function Context() {\n this.name = '@amplitude/plugin-context-browser';\n this.type = 'before';\n this.library = \"amplitude-ts/\".concat(VERSION);\n /* istanbul ignore else */\n if (typeof navigator !== 'undefined') {\n this.userAgent = navigator.userAgent;\n }\n }\n Context.prototype.setup = function (config) {\n this.config = config;\n return Promise.resolve(undefined);\n };\n Context.prototype.execute = function (context) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n var time, lastEventId, nextEventId, event;\n return __generator(this, function (_c) {\n time = new Date().getTime();\n lastEventId = (_a = this.config.lastEventId) !== null && _a !== void 0 ? _a : -1;\n nextEventId = (_b = context.event_id) !== null && _b !== void 0 ? _b : lastEventId + 1;\n this.config.lastEventId = nextEventId;\n if (!context.time) {\n this.config.lastEventTime = time;\n }\n event = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({ user_id: this.config.userId, device_id: this.config.deviceId, session_id: this.config.sessionId, time: time }, (this.config.appVersion && { app_version: this.config.appVersion })), (this.config.trackingOptions.platform && { platform: BROWSER_PLATFORM })), (this.config.trackingOptions.language && { language: getLanguage() })), (this.config.trackingOptions.ipAddress && { ip: IP_ADDRESS })), { insert_id: UUID(), partner_id: this.config.partnerId, plan: this.config.plan }), (this.config.ingestionMetadata && {\n ingestion_metadata: {\n source_name: this.config.ingestionMetadata.sourceName,\n source_version: this.config.ingestionMetadata.sourceVersion,\n },\n })), context), { event_id: nextEventId, library: this.library, user_agent: this.userAgent });\n return [2 /*return*/, event];\n });\n });\n };\n return Context;\n}());\nexport { Context };\n//# sourceMappingURL=context.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { getGlobalScope } from '@amplitude/analytics-client-common';\nvar LocalStorage = /** @class */ (function () {\n function LocalStorage() {\n }\n LocalStorage.prototype.isEnabled = function () {\n return __awaiter(this, void 0, void 0, function () {\n var random, testStorage, testKey, value, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n /* istanbul ignore if */\n if (!getGlobalScope()) {\n return [2 /*return*/, false];\n }\n random = String(Date.now());\n testStorage = new LocalStorage();\n testKey = 'AMP_TEST';\n _b.label = 1;\n case 1:\n _b.trys.push([1, 4, 5, 7]);\n return [4 /*yield*/, testStorage.set(testKey, random)];\n case 2:\n _b.sent();\n return [4 /*yield*/, testStorage.get(testKey)];\n case 3:\n value = _b.sent();\n return [2 /*return*/, value === random];\n case 4:\n _a = _b.sent();\n /* istanbul ignore next */\n return [2 /*return*/, false];\n case 5: return [4 /*yield*/, testStorage.remove(testKey)];\n case 6:\n _b.sent();\n return [7 /*endfinally*/];\n case 7: return [2 /*return*/];\n }\n });\n });\n };\n LocalStorage.prototype.get = function (key) {\n return __awaiter(this, void 0, void 0, function () {\n var value, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, this.getRaw(key)];\n case 1:\n value = _b.sent();\n if (!value) {\n return [2 /*return*/, undefined];\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return [2 /*return*/, JSON.parse(value)];\n case 2:\n _a = _b.sent();\n /* istanbul ignore next */\n return [2 /*return*/, undefined];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n LocalStorage.prototype.getRaw = function (key) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n return [2 /*return*/, ((_a = getGlobalScope()) === null || _a === void 0 ? void 0 : _a.localStorage.getItem(key)) || undefined];\n });\n });\n };\n LocalStorage.prototype.set = function (key, value) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n try {\n (_a = getGlobalScope()) === null || _a === void 0 ? void 0 : _a.localStorage.setItem(key, JSON.stringify(value));\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n LocalStorage.prototype.remove = function (key) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n try {\n (_a = getGlobalScope()) === null || _a === void 0 ? void 0 : _a.localStorage.removeItem(key);\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n LocalStorage.prototype.reset = function () {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_b) {\n try {\n (_a = getGlobalScope()) === null || _a === void 0 ? void 0 : _a.localStorage.clear();\n }\n catch (_c) {\n //\n }\n return [2 /*return*/];\n });\n });\n };\n return LocalStorage;\n}());\nexport { LocalStorage };\n//# sourceMappingURL=local-storage.js.map","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { BaseTransport } from '@amplitude/analytics-core';\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n done: 4,\n };\n return _this;\n }\n XHRTransport.prototype.send = function (serverUrl, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n /* istanbul ignore if */\n if (typeof XMLHttpRequest === 'undefined') {\n reject(new Error('XHRTransport is not supported.'));\n }\n var xhr = new XMLHttpRequest();\n xhr.open('POST', serverUrl, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === _this.state.done) {\n try {\n var responsePayload = xhr.responseText;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n var parsedResponsePayload = JSON.parse(responsePayload);\n var result = _this.buildResponse(parsedResponsePayload);\n resolve(result);\n }\n catch (e) {\n reject(e);\n }\n }\n };\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.setRequestHeader('Accept', '*/*');\n xhr.send(JSON.stringify(payload));\n })];\n });\n });\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","import { __awaiter, __extends, __generator } from \"tslib\";\nimport { getGlobalScope } from '@amplitude/analytics-client-common';\nimport { BaseTransport } from '@amplitude/analytics-core';\nvar SendBeaconTransport = /** @class */ (function (_super) {\n __extends(SendBeaconTransport, _super);\n function SendBeaconTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SendBeaconTransport.prototype.send = function (serverUrl, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var globalScope = getGlobalScope();\n /* istanbul ignore if */\n if (!(globalScope === null || globalScope === void 0 ? void 0 : globalScope.navigator.sendBeacon)) {\n throw new Error('SendBeaconTransport is not supported');\n }\n try {\n var data = JSON.stringify(payload);\n var success = globalScope.navigator.sendBeacon(serverUrl, JSON.stringify(payload));\n if (success) {\n return resolve(_this.buildResponse({\n code: 200,\n events_ingested: payload.events.length,\n payload_size_bytes: data.length,\n server_upload_time: Date.now(),\n }));\n }\n return resolve(_this.buildResponse({ code: 500 }));\n }\n catch (e) {\n reject(e);\n }\n })];\n });\n });\n };\n return SendBeaconTransport;\n}(BaseTransport));\nexport { SendBeaconTransport };\n//# sourceMappingURL=send-beacon.js.map","import { __awaiter, __generator, __read } from \"tslib\";\nimport { getOldCookieName } from '@amplitude/analytics-client-common';\nexport var parseLegacyCookies = function (apiKey, cookieStorage, deleteLegacyCookies) {\n if (deleteLegacyCookies === void 0) { deleteLegacyCookies = true; }\n return __awaiter(void 0, void 0, void 0, function () {\n var cookieName, cookies, _a, deviceId, userId, optOut, sessionId, lastEventTime, lastEventId;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n cookieName = getOldCookieName(apiKey);\n return [4 /*yield*/, cookieStorage.getRaw(cookieName)];\n case 1:\n cookies = _b.sent();\n if (!cookies) {\n return [2 /*return*/, {\n optOut: false,\n }];\n }\n if (!deleteLegacyCookies) return [3 /*break*/, 3];\n return [4 /*yield*/, cookieStorage.remove(cookieName)];\n case 2:\n _b.sent();\n _b.label = 3;\n case 3:\n _a = __read(cookies.split('.'), 6), deviceId = _a[0], userId = _a[1], optOut = _a[2], sessionId = _a[3], lastEventTime = _a[4], lastEventId = _a[5];\n return [2 /*return*/, {\n deviceId: deviceId,\n userId: decode(userId),\n sessionId: parseTime(sessionId),\n lastEventId: parseTime(lastEventId),\n lastEventTime: parseTime(lastEventTime),\n optOut: Boolean(optOut),\n }];\n }\n });\n });\n};\nexport var parseTime = function (num) {\n var integer = parseInt(num, 32);\n if (isNaN(integer)) {\n return undefined;\n }\n return integer;\n};\nexport var decode = function (value) {\n if (!atob || !escape || !value) {\n return undefined;\n }\n try {\n return decodeURIComponent(escape(atob(value)));\n }\n catch (_a) {\n return undefined;\n }\n};\n//# sourceMappingURL=index.js.map","export var DEFAULT_EVENT_PREFIX = '[Amplitude]';\nexport var DEFAULT_PAGE_VIEW_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Page Viewed\");\nexport var DEFAULT_FORM_START_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Started\");\nexport var DEFAULT_FORM_SUBMIT_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Submitted\");\nexport var DEFAULT_FILE_DOWNLOAD_EVENT = \"\".concat(DEFAULT_EVENT_PREFIX, \" File Downloaded\");\nexport var DEFAULT_SESSION_START_EVENT = 'session_start';\nexport var DEFAULT_SESSION_END_EVENT = 'session_end';\nexport var FILE_EXTENSION = \"\".concat(DEFAULT_EVENT_PREFIX, \" File Extension\");\nexport var FILE_NAME = \"\".concat(DEFAULT_EVENT_PREFIX, \" File Name\");\nexport var LINK_ID = \"\".concat(DEFAULT_EVENT_PREFIX, \" Link ID\");\nexport var LINK_TEXT = \"\".concat(DEFAULT_EVENT_PREFIX, \" Link Text\");\nexport var LINK_URL = \"\".concat(DEFAULT_EVENT_PREFIX, \" Link URL\");\nexport var FORM_ID = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form ID\");\nexport var FORM_NAME = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Name\");\nexport var FORM_DESTINATION = \"\".concat(DEFAULT_EVENT_PREFIX, \" Form Destination\");\nexport var DEFAULT_IDENTITY_STORAGE = 'cookie';\nexport var DEFAULT_SERVER_ZONE = 'US';\n//# sourceMappingURL=constants.js.map","import { __assign, __awaiter, __extends, __generator } from \"tslib\";\nimport { LogLevel, } from '@amplitude/analytics-types';\nimport { Config, Logger, MemoryStorage, UUID } from '@amplitude/analytics-core';\nimport { CookieStorage, getCookieName, FetchTransport, getQueryParams } from '@amplitude/analytics-client-common';\nimport { LocalStorage } from './storage/local-storage';\nimport { XHRTransport } from './transports/xhr';\nimport { SendBeaconTransport } from './transports/send-beacon';\nimport { parseLegacyCookies } from './cookie-migration';\nimport { DEFAULT_IDENTITY_STORAGE, DEFAULT_SERVER_ZONE } from './constants';\n// Exported for testing purposes only. Do not expose to public interface.\nvar BrowserConfig = /** @class */ (function (_super) {\n __extends(BrowserConfig, _super);\n function BrowserConfig(apiKey, appVersion, cookieStorage, cookieOptions, defaultTracking, deviceId, flushIntervalMillis, flushMaxRetries, flushQueueSize, identityStorage, ingestionMetadata, instanceName, lastEventId, lastEventTime, loggerProvider, logLevel, minIdLength, optOut, partnerId, plan, serverUrl, serverZone, sessionId, sessionTimeout, storageProvider, trackingOptions, transport, useBatch, userId) {\n if (cookieStorage === void 0) { cookieStorage = new MemoryStorage(); }\n if (cookieOptions === void 0) { cookieOptions = {\n domain: '',\n expiration: 365,\n sameSite: 'Lax',\n secure: false,\n upgrade: true,\n }; }\n if (defaultTracking === void 0) { defaultTracking = true; }\n if (flushIntervalMillis === void 0) { flushIntervalMillis = 1000; }\n if (flushMaxRetries === void 0) { flushMaxRetries = 5; }\n if (flushQueueSize === void 0) { flushQueueSize = 30; }\n if (identityStorage === void 0) { identityStorage = DEFAULT_IDENTITY_STORAGE; }\n if (loggerProvider === void 0) { loggerProvider = new Logger(); }\n if (logLevel === void 0) { logLevel = LogLevel.Warn; }\n if (optOut === void 0) { optOut = false; }\n if (serverUrl === void 0) { serverUrl = ''; }\n if (serverZone === void 0) { serverZone = DEFAULT_SERVER_ZONE; }\n if (sessionTimeout === void 0) { sessionTimeout = 30 * 60 * 1000; }\n if (storageProvider === void 0) { storageProvider = new LocalStorage(); }\n if (trackingOptions === void 0) { trackingOptions = {\n ipAddress: true,\n language: true,\n platform: true,\n }; }\n if (transport === void 0) { transport = 'fetch'; }\n if (useBatch === void 0) { useBatch = false; }\n var _this = _super.call(this, { apiKey: apiKey, storageProvider: storageProvider, transportProvider: createTransport(transport) }) || this;\n _this.apiKey = apiKey;\n _this.appVersion = appVersion;\n _this.cookieOptions = cookieOptions;\n _this.defaultTracking = defaultTracking;\n _this.flushIntervalMillis = flushIntervalMillis;\n _this.flushMaxRetries = flushMaxRetries;\n _this.flushQueueSize = flushQueueSize;\n _this.identityStorage = identityStorage;\n _this.ingestionMetadata = ingestionMetadata;\n _this.instanceName = instanceName;\n _this.loggerProvider = loggerProvider;\n _this.logLevel = logLevel;\n _this.minIdLength = minIdLength;\n _this.partnerId = partnerId;\n _this.plan = plan;\n _this.serverUrl = serverUrl;\n _this.serverZone = serverZone;\n _this.sessionTimeout = sessionTimeout;\n _this.storageProvider = storageProvider;\n _this.trackingOptions = trackingOptions;\n _this.transport = transport;\n _this.useBatch = useBatch;\n _this._optOut = false;\n _this._cookieStorage = cookieStorage;\n _this.deviceId = deviceId;\n _this.lastEventId = lastEventId;\n _this.lastEventTime = lastEventTime;\n _this.optOut = optOut;\n _this.sessionId = sessionId;\n _this.userId = userId;\n _this.loggerProvider.enable(_this.logLevel);\n return _this;\n }\n Object.defineProperty(BrowserConfig.prototype, \"cookieStorage\", {\n get: function () {\n return this._cookieStorage;\n },\n set: function (cookieStorage) {\n if (this._cookieStorage !== cookieStorage) {\n this._cookieStorage = cookieStorage;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"deviceId\", {\n get: function () {\n return this._deviceId;\n },\n set: function (deviceId) {\n if (this._deviceId !== deviceId) {\n this._deviceId = deviceId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"userId\", {\n get: function () {\n return this._userId;\n },\n set: function (userId) {\n if (this._userId !== userId) {\n this._userId = userId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"sessionId\", {\n get: function () {\n return this._sessionId;\n },\n set: function (sessionId) {\n if (this._sessionId !== sessionId) {\n this._sessionId = sessionId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"optOut\", {\n get: function () {\n return this._optOut;\n },\n set: function (optOut) {\n if (this._optOut !== optOut) {\n this._optOut = optOut;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"lastEventTime\", {\n get: function () {\n return this._lastEventTime;\n },\n set: function (lastEventTime) {\n if (this._lastEventTime !== lastEventTime) {\n this._lastEventTime = lastEventTime;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BrowserConfig.prototype, \"lastEventId\", {\n get: function () {\n return this._lastEventId;\n },\n set: function (lastEventId) {\n if (this._lastEventId !== lastEventId) {\n this._lastEventId = lastEventId;\n this.updateStorage();\n }\n },\n enumerable: false,\n configurable: true\n });\n BrowserConfig.prototype.updateStorage = function () {\n var cache = {\n deviceId: this._deviceId,\n userId: this._userId,\n sessionId: this._sessionId,\n optOut: this._optOut,\n lastEventTime: this._lastEventTime,\n lastEventId: this._lastEventId,\n };\n void this.cookieStorage.set(getCookieName(this.apiKey), cache);\n };\n return BrowserConfig;\n}(Config));\nexport { BrowserConfig };\nexport var useBrowserConfig = function (apiKey, options, amplitudeInstance) {\n if (options === void 0) { options = {}; }\n return __awaiter(void 0, void 0, void 0, function () {\n var identityStorage, cookieOptions, _a, _b, _c, cookieStorage, legacyCookies, previousCookies, queryParams, deviceId, lastEventId, lastEventTime, optOut, sessionId, userId, trackingOptions;\n var _d;\n var _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;\n return __generator(this, function (_x) {\n switch (_x.label) {\n case 0:\n identityStorage = options.identityStorage || DEFAULT_IDENTITY_STORAGE;\n _a = [__assign({}, options.cookieOptions)];\n _d = {};\n if (!(identityStorage !== DEFAULT_IDENTITY_STORAGE)) return [3 /*break*/, 1];\n _b = '';\n return [3 /*break*/, 5];\n case 1:\n if (!((_f = (_e = options.cookieOptions) === null || _e === void 0 ? void 0 : _e.domain) !== null && _f !== void 0)) return [3 /*break*/, 2];\n _c = _f;\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, getTopLevelDomain()];\n case 3:\n _c = (_x.sent());\n _x.label = 4;\n case 4:\n _b = _c;\n _x.label = 5;\n case 5:\n cookieOptions = __assign.apply(void 0, _a.concat([(_d.domain = _b, _d.expiration = 365, _d.sameSite = 'Lax', _d.secure = false, _d.upgrade = true, _d)]));\n cookieStorage = createCookieStorage(options.identityStorage, cookieOptions);\n return [4 /*yield*/, parseLegacyCookies(apiKey, cookieStorage, (_h = (_g = options.cookieOptions) === null || _g === void 0 ? void 0 : _g.upgrade) !== null && _h !== void 0 ? _h : true)];\n case 6:\n legacyCookies = _x.sent();\n return [4 /*yield*/, cookieStorage.get(getCookieName(apiKey))];\n case 7:\n previousCookies = _x.sent();\n queryParams = getQueryParams();\n deviceId = (_m = (_l = (_k = (_j = options.deviceId) !== null && _j !== void 0 ? _j : queryParams.deviceId) !== null && _k !== void 0 ? _k : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.deviceId) !== null && _l !== void 0 ? _l : legacyCookies.deviceId) !== null && _m !== void 0 ? _m : UUID();\n lastEventId = (_o = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventId) !== null && _o !== void 0 ? _o : legacyCookies.lastEventId;\n lastEventTime = (_p = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.lastEventTime) !== null && _p !== void 0 ? _p : legacyCookies.lastEventTime;\n optOut = (_r = (_q = options.optOut) !== null && _q !== void 0 ? _q : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.optOut) !== null && _r !== void 0 ? _r : legacyCookies.optOut;\n sessionId = (_s = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.sessionId) !== null && _s !== void 0 ? _s : legacyCookies.sessionId;\n userId = (_u = (_t = options.userId) !== null && _t !== void 0 ? _t : previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _u !== void 0 ? _u : legacyCookies.userId;\n amplitudeInstance.previousSessionDeviceId = (_v = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.deviceId) !== null && _v !== void 0 ? _v : legacyCookies.deviceId;\n amplitudeInstance.previousSessionUserId = (_w = previousCookies === null || previousCookies === void 0 ? void 0 : previousCookies.userId) !== null && _w !== void 0 ? _w : legacyCookies.userId;\n trackingOptions = __assign(__assign({}, options.trackingOptions), { ipAddress: true, language: true, platform: true });\n return [2 /*return*/, new BrowserConfig(apiKey, options.appVersion, cookieStorage, cookieOptions, options.defaultTracking, deviceId, options.flushIntervalMillis, options.flushMaxRetries, options.flushQueueSize, identityStorage, options.ingestionMetadata, options.instanceName, lastEventId, lastEventTime, options.loggerProvider, options.logLevel, options.minIdLength, optOut, options.partnerId, options.plan, options.serverUrl, options.serverZone, sessionId, options.sessionTimeout, options.storageProvider, trackingOptions, options.transport, options.useBatch, userId)];\n }\n });\n });\n};\nexport var createCookieStorage = function (identityStorage, cookieOptions) {\n if (identityStorage === void 0) { identityStorage = DEFAULT_IDENTITY_STORAGE; }\n if (cookieOptions === void 0) { cookieOptions = {}; }\n switch (identityStorage) {\n case 'localStorage':\n return new LocalStorage();\n case 'none':\n return new MemoryStorage();\n case 'cookie':\n default:\n return new CookieStorage(__assign(__assign({}, cookieOptions), { expirationDays: cookieOptions.expiration }));\n }\n};\nexport var createTransport = function (transport) {\n if (transport === 'xhr') {\n return new XHRTransport();\n }\n if (transport === 'beacon') {\n return new SendBeaconTransport();\n }\n return new FetchTransport();\n};\nexport var getTopLevelDomain = function (url) { return __awaiter(void 0, void 0, void 0, function () {\n var host, parts, levels, storageKey, i, i, domain, options, storage, value;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, new CookieStorage().isEnabled()];\n case 1:\n if (!(_a.sent()) || (!url && typeof location === 'undefined')) {\n return [2 /*return*/, ''];\n }\n host = url !== null && url !== void 0 ? url : location.hostname;\n parts = host.split('.');\n levels = [];\n storageKey = 'AMP_TLDTEST';\n for (i = parts.length - 2; i >= 0; --i) {\n levels.push(parts.slice(i).join('.'));\n }\n i = 0;\n _a.label = 2;\n case 2:\n if (!(i < levels.length)) return [3 /*break*/, 7];\n domain = levels[i];\n options = { domain: '.' + domain };\n storage = new CookieStorage(options);\n return [4 /*yield*/, storage.set(storageKey, 1)];\n case 3:\n _a.sent();\n return [4 /*yield*/, storage.get(storageKey)];\n case 4:\n value = _a.sent();\n if (!value) return [3 /*break*/, 6];\n return [4 /*yield*/, storage.remove(storageKey)];\n case 5:\n _a.sent();\n return [2 /*return*/, '.' + domain];\n case 6:\n i++;\n return [3 /*break*/, 2];\n case 7: return [2 /*return*/, ''];\n }\n });\n}); };\n//# sourceMappingURL=config.js.map","import { __assign, __read, __rest } from \"tslib\";\nimport { BASE_CAMPAIGN } from '@amplitude/analytics-client-common';\nimport { AMPLITUDE_PREFIX, createIdentifyEvent, Identify } from '@amplitude/analytics-core';\nexport var getStorageKey = function (apiKey, postKey, limit) {\n if (postKey === void 0) { postKey = ''; }\n if (limit === void 0) { limit = 10; }\n return [AMPLITUDE_PREFIX, postKey, apiKey.substring(0, limit)].filter(Boolean).join('_');\n};\nvar domainWithoutSubdomain = function (domain) {\n var parts = domain.split('.');\n if (parts.length <= 2) {\n return domain;\n }\n return parts.slice(parts.length - 2, parts.length).join('.');\n};\nexport var isNewCampaign = function (current, previous, options) {\n var referrer = current.referrer, referring_domain = current.referring_domain, currentCampaign = __rest(current, [\"referrer\", \"referring_domain\"]);\n var _a = previous || {}, _previous_referrer = _a.referrer, prevReferringDomain = _a.referring_domain, previousCampaign = __rest(_a, [\"referrer\", \"referring_domain\"]);\n if (isExcludedReferrer(options.excludeReferrers, current.referring_domain)) {\n return false;\n }\n var hasNewCampaign = JSON.stringify(currentCampaign) !== JSON.stringify(previousCampaign);\n var hasNewDomain = domainWithoutSubdomain(referring_domain || '') !== domainWithoutSubdomain(prevReferringDomain || '');\n return !previous || hasNewCampaign || hasNewDomain;\n};\nexport var isExcludedReferrer = function (excludeReferrers, referringDomain) {\n if (excludeReferrers === void 0) { excludeReferrers = []; }\n if (referringDomain === void 0) { referringDomain = ''; }\n return excludeReferrers.some(function (value) {\n return value instanceof RegExp ? value.test(referringDomain) : value === referringDomain;\n });\n};\nexport var createCampaignEvent = function (campaign, options) {\n var campaignParameters = __assign(__assign({}, BASE_CAMPAIGN), campaign);\n var identifyEvent = Object.entries(campaignParameters).reduce(function (identify, _a) {\n var _b;\n var _c = __read(_a, 2), key = _c[0], value = _c[1];\n identify.setOnce(\"initial_\".concat(key), (_b = value !== null && value !== void 0 ? value : options.initialEmptyValue) !== null && _b !== void 0 ? _b : 'EMPTY');\n if (value) {\n return identify.set(key, value);\n }\n return identify.unset(key);\n }, new Identify());\n return createIdentifyEvent(identifyEvent);\n};\nexport var getDefaultExcludedReferrers = function (cookieDomain) {\n var domain = cookieDomain;\n if (domain) {\n if (domain.startsWith('.')) {\n domain = domain.substring(1);\n }\n return [new RegExp(\"\".concat(domain.replace('.', '\\\\.'), \"$\"))];\n }\n return [];\n};\n//# sourceMappingURL=helpers.js.map","import { __assign, __awaiter, __generator, __read } from \"tslib\";\nimport { CampaignParser } from '@amplitude/analytics-client-common';\nimport { createCampaignEvent, getDefaultExcludedReferrers, getStorageKey, isNewCampaign } from './helpers';\nexport var webAttributionPlugin = function (options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var plugin = {\n name: '@amplitude/plugin-web-attribution-browser',\n type: 'before',\n setup: function (config, amplitude) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var pluginConfig, storage, storageKey, _b, currentCampaign, previousCampaign, campaignEvent;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n pluginConfig = __assign({ initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: false, excludeReferrers: getDefaultExcludedReferrers((_a = config.cookieOptions) === null || _a === void 0 ? void 0 : _a.domain) }, options);\n config.loggerProvider.log('Installing @amplitude/plugin-web-attribution-browser.');\n storage = config.cookieStorage;\n storageKey = getStorageKey(config.apiKey, 'MKTG');\n return [4 /*yield*/, Promise.all([\n new CampaignParser().parse(),\n storage.get(storageKey),\n ])];\n case 1:\n _b = __read.apply(void 0, [_c.sent(), 2]), currentCampaign = _b[0], previousCampaign = _b[1];\n if (isNewCampaign(currentCampaign, previousCampaign, pluginConfig)) {\n if (pluginConfig.resetSessionOnNewCampaign) {\n amplitude.setSessionId(Date.now());\n config.loggerProvider.log('Created a new session for new campaign.');\n }\n config.loggerProvider.log('Tracking attribution.');\n campaignEvent = createCampaignEvent(currentCampaign, pluginConfig);\n amplitude.track(campaignEvent);\n void storage.set(storageKey, currentCampaign);\n }\n return [2 /*return*/];\n }\n });\n });\n },\n execute: function (event) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, event];\n }); }); },\n };\n return plugin;\n};\n//# sourceMappingURL=web-attribution.js.map","export var omitUndefined = function (input) {\n var obj = {};\n for (var key in input) {\n var val = input[key];\n if (val) {\n obj[key] = val;\n }\n }\n return obj;\n};\n//# sourceMappingURL=utils.js.map","import { __assign, __awaiter, __generator, __read, __spreadArray } from \"tslib\";\nimport { CampaignParser, getGlobalScope } from '@amplitude/analytics-client-common';\nimport { IdentifyOperation, } from '@amplitude/analytics-types';\nimport { BASE_CAMPAIGN } from '@amplitude/analytics-client-common';\nimport { omitUndefined } from './utils';\nexport var pageViewTrackingPlugin = function (options) {\n if (options === void 0) { options = {}; }\n var amplitude;\n var globalScope = getGlobalScope();\n var loggerProvider = undefined;\n var createPageViewEvent = function () { return __awaiter(void 0, void 0, void 0, function () {\n var _a;\n var _b;\n var _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n _b = {\n event_type: (_c = options.eventType) !== null && _c !== void 0 ? _c : '[Amplitude] Page Viewed'\n };\n _a = [{}];\n return [4 /*yield*/, getCampaignParams()];\n case 1: return [2 /*return*/, (_b.event_properties = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([(_d.sent())])), { '[Amplitude] Page Domain': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.hostname) || '', '[Amplitude] Page Location': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.href) || '', '[Amplitude] Page Path': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.pathname) || '', '[Amplitude] Page Title': /* istanbul ignore next */ (typeof document !== 'undefined' && document.title) || '', '[Amplitude] Page URL': \n /* istanbul ignore next */ (typeof location !== 'undefined' && location.href.split('?')[0]) || '' }]),\n _b)];\n }\n });\n }); };\n var shouldTrackOnPageLoad = function () {\n return typeof options.trackOn === 'undefined' || (typeof options.trackOn === 'function' && options.trackOn());\n };\n /* istanbul ignore next */\n var previousURL = typeof location !== 'undefined' ? location.href : null;\n var trackHistoryPageView = function () { return __awaiter(void 0, void 0, void 0, function () {\n var newURL, _a, _b, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n newURL = location.href;\n if (!(shouldTrackHistoryPageView(options.trackHistoryChanges, newURL, previousURL || '') && shouldTrackOnPageLoad())) return [3 /*break*/, 4];\n /* istanbul ignore next */\n loggerProvider === null || loggerProvider === void 0 ? void 0 : loggerProvider.log('Tracking page view event');\n if (!(amplitude === null || amplitude === void 0)) return [3 /*break*/, 1];\n _a = void 0;\n return [3 /*break*/, 3];\n case 1:\n _c = (_b = amplitude).track;\n return [4 /*yield*/, createPageViewEvent()];\n case 2:\n _a = _c.apply(_b, [_d.sent()]);\n _d.label = 3;\n case 3:\n _a;\n _d.label = 4;\n case 4:\n previousURL = newURL;\n return [2 /*return*/];\n }\n });\n }); };\n var plugin = {\n name: '@amplitude/plugin-page-view-tracking-browser',\n type: 'enrichment',\n setup: function (config, client) { return __awaiter(void 0, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n amplitude = client;\n loggerProvider = config.loggerProvider;\n loggerProvider.log('Installing @amplitude/plugin-page-view-tracking-browser');\n if (globalScope) {\n /* istanbul ignore next */\n globalScope.addEventListener('popstate', function () {\n void trackHistoryPageView();\n });\n /* istanbul ignore next */\n // There is no global browser listener for changes to history, so we have\n // to modify pushState directly.\n // https://stackoverflow.com/a/64927639\n // eslint-disable-next-line @typescript-eslint/unbound-method\n globalScope.history.pushState = new Proxy(globalScope.history.pushState, {\n apply: function (target, thisArg, _a) {\n var _b = __read(_a, 3), state = _b[0], unused = _b[1], url = _b[2];\n target.apply(thisArg, [state, unused, url]);\n void trackHistoryPageView();\n },\n });\n }\n if (!shouldTrackOnPageLoad()) return [3 /*break*/, 2];\n loggerProvider.log('Tracking page view event');\n _b = (_a = amplitude).track;\n return [4 /*yield*/, createPageViewEvent()];\n case 1:\n _b.apply(_a, [_c.sent()]);\n _c.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n }); },\n execute: function (event) { return __awaiter(void 0, void 0, void 0, function () {\n var pageViewEvent;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(options.trackOn === 'attribution' && isCampaignEvent(event))) return [3 /*break*/, 2];\n /* istanbul ignore next */ // loggerProvider should be defined by the time execute is invoked\n loggerProvider === null || loggerProvider === void 0 ? void 0 : loggerProvider.log('Enriching campaign event to page view event with campaign parameters');\n return [4 /*yield*/, createPageViewEvent()];\n case 1:\n pageViewEvent = _a.sent();\n event.event_type = pageViewEvent.event_type;\n event.event_properties = __assign(__assign({}, event.event_properties), pageViewEvent.event_properties);\n _a.label = 2;\n case 2: return [2 /*return*/, event];\n }\n });\n }); },\n };\n return plugin;\n};\nvar getCampaignParams = function () { return __awaiter(void 0, void 0, void 0, function () { var _a; return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = omitUndefined;\n return [4 /*yield*/, new CampaignParser().parse()];\n case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];\n }\n}); }); };\nvar isCampaignEvent = function (event) {\n if (event.event_type === '$identify' && event.user_properties) {\n var properties = event.user_properties;\n var $set = properties[IdentifyOperation.SET] || {};\n var $unset = properties[IdentifyOperation.UNSET] || {};\n var userProperties_1 = __spreadArray(__spreadArray([], __read(Object.keys($set)), false), __read(Object.keys($unset)), false);\n return Object.keys(BASE_CAMPAIGN).every(function (value) { return userProperties_1.includes(value); });\n }\n return false;\n};\nexport var shouldTrackHistoryPageView = function (trackingOption, newURL, oldURL) {\n switch (trackingOption) {\n case 'pathOnly':\n return newURL.split('?')[0] !== oldURL.split('?')[0];\n default:\n return newURL !== oldURL;\n }\n};\n//# sourceMappingURL=page-view-tracking.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { DEFAULT_FORM_START_EVENT, DEFAULT_FORM_SUBMIT_EVENT, FORM_ID, FORM_NAME, FORM_DESTINATION, } from '../constants';\nexport var formInteractionTracking = function () {\n var name = '@amplitude/plugin-form-interaction-tracking-browser';\n var type = 'enrichment';\n var setup = function (config, amplitude) { return __awaiter(void 0, void 0, void 0, function () {\n var addFormInteractionListener, forms, observer;\n return __generator(this, function (_a) {\n /* istanbul ignore if */\n if (!amplitude) {\n // TODO: Add required minimum version of @amplitude/analytics-browser\n config.loggerProvider.warn('Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.');\n return [2 /*return*/];\n }\n addFormInteractionListener = function (form) {\n var hasFormChanged = false;\n form.addEventListener('change', function () {\n var _a;\n if (!hasFormChanged) {\n amplitude.track(DEFAULT_FORM_START_EVENT, (_a = {},\n _a[FORM_ID] = form.id,\n _a[FORM_NAME] = form.name,\n _a[FORM_DESTINATION] = form.action,\n _a));\n }\n hasFormChanged = true;\n }, {});\n form.addEventListener('submit', function () {\n var _a, _b;\n if (!hasFormChanged) {\n amplitude.track(DEFAULT_FORM_START_EVENT, (_a = {},\n _a[FORM_ID] = form.id,\n _a[FORM_NAME] = form.name,\n _a[FORM_DESTINATION] = form.action,\n _a));\n }\n amplitude.track(DEFAULT_FORM_SUBMIT_EVENT, (_b = {},\n _b[FORM_ID] = form.id,\n _b[FORM_NAME] = form.name,\n _b[FORM_DESTINATION] = form.action,\n _b));\n hasFormChanged = false;\n });\n };\n forms = Array.from(document.getElementsByTagName('form'));\n forms.forEach(addFormInteractionListener);\n // Adds listener to anchor tags added after initial load\n /* istanbul ignore else */\n if (typeof MutationObserver !== 'undefined') {\n observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n mutation.addedNodes.forEach(function (node) {\n if (node.nodeName === 'FORM') {\n addFormInteractionListener(node);\n }\n if ('querySelectorAll' in node && typeof node.querySelectorAll === 'function') {\n Array.from(node.querySelectorAll('form')).map(addFormInteractionListener);\n }\n });\n });\n });\n observer.observe(document.body, {\n subtree: true,\n childList: true,\n });\n }\n return [2 /*return*/];\n });\n }); };\n var execute = function (event) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, event];\n }); }); };\n return {\n name: name,\n type: type,\n setup: setup,\n execute: execute,\n };\n};\n//# sourceMappingURL=form-interaction-tracking.js.map","import { __awaiter, __generator } from \"tslib\";\nimport { DEFAULT_FILE_DOWNLOAD_EVENT, FILE_EXTENSION, FILE_NAME, LINK_ID, LINK_TEXT, LINK_URL } from '../constants';\nexport var fileDownloadTracking = function () {\n var name = '@amplitude/plugin-file-download-tracking-browser';\n var type = 'enrichment';\n var setup = function (config, amplitude) { return __awaiter(void 0, void 0, void 0, function () {\n var addFileDownloadListener, ext, links, observer;\n return __generator(this, function (_a) {\n /* istanbul ignore if */\n if (!amplitude) {\n // TODO: Add required minimum version of @amplitude/analytics-browser\n config.loggerProvider.warn('File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.');\n return [2 /*return*/];\n }\n addFileDownloadListener = function (a) {\n var url;\n try {\n // eslint-disable-next-line no-restricted-globals\n url = new URL(a.href, window.location.href);\n }\n catch (_a) {\n /* istanbul ignore next */\n return;\n }\n var result = ext.exec(url.href);\n var fileExtension = result === null || result === void 0 ? void 0 : result[1];\n if (fileExtension) {\n a.addEventListener('click', function () {\n var _a;\n if (fileExtension) {\n amplitude.track(DEFAULT_FILE_DOWNLOAD_EVENT, (_a = {},\n _a[FILE_EXTENSION] = fileExtension,\n _a[FILE_NAME] = url.pathname,\n _a[LINK_ID] = a.id,\n _a[LINK_TEXT] = a.text,\n _a[LINK_URL] = a.href,\n _a));\n }\n });\n }\n };\n ext = /\\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)$/;\n links = Array.from(document.getElementsByTagName('a'));\n links.forEach(addFileDownloadListener);\n // Adds listener to anchor tags added after initial load\n /* istanbul ignore else */\n if (typeof MutationObserver !== 'undefined') {\n observer = new MutationObserver(function (mutations) {\n mutations.forEach(function (mutation) {\n mutation.addedNodes.forEach(function (node) {\n if (node.nodeName === 'A') {\n addFileDownloadListener(node);\n }\n if ('querySelectorAll' in node && typeof node.querySelectorAll === 'function') {\n Array.from(node.querySelectorAll('a')).map(addFileDownloadListener);\n }\n });\n });\n });\n observer.observe(document.body, {\n subtree: true,\n childList: true,\n });\n }\n return [2 /*return*/];\n });\n }); };\n var execute = function (event) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, event];\n }); }); };\n return {\n name: name,\n type: type,\n setup: setup,\n execute: execute,\n };\n};\n//# sourceMappingURL=file-download-tracking.js.map","import { __assign, __awaiter, __extends, __generator } from \"tslib\";\nimport { AmplitudeCore, Destination, Identify, returnWrapper, Revenue, UUID } from '@amplitude/analytics-core';\nimport { getAnalyticsConnector, getAttributionTrackingConfig, getPageViewTrackingConfig, IdentityEventSender, isAttributionTrackingEnabled, isSessionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, setConnectorDeviceId, setConnectorUserId, } from '@amplitude/analytics-client-common';\nimport { convertProxyObjectToRealObject, isInstanceProxy } from './utils/snippet-helper';\nimport { Context } from './plugins/context';\nimport { useBrowserConfig, createTransport } from './config';\nimport { webAttributionPlugin } from '@amplitude/plugin-web-attribution-browser';\nimport { pageViewTrackingPlugin } from '@amplitude/plugin-page-view-tracking-browser';\nimport { formInteractionTracking } from './plugins/form-interaction-tracking';\nimport { fileDownloadTracking } from './plugins/file-download-tracking';\nimport { DEFAULT_SESSION_END_EVENT, DEFAULT_SESSION_START_EVENT } from './constants';\nvar AmplitudeBrowser = /** @class */ (function (_super) {\n __extends(AmplitudeBrowser, _super);\n function AmplitudeBrowser() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AmplitudeBrowser.prototype.init = function (apiKey, userIdOrOptions, maybeOptions) {\n if (apiKey === void 0) { apiKey = ''; }\n var userId;\n var options;\n if (arguments.length > 2) {\n userId = userIdOrOptions;\n options = maybeOptions;\n }\n else {\n if (typeof userIdOrOptions === 'string') {\n userId = userIdOrOptions;\n options = undefined;\n }\n else {\n userId = userIdOrOptions === null || userIdOrOptions === void 0 ? void 0 : userIdOrOptions.userId;\n options = userIdOrOptions;\n }\n }\n return returnWrapper(this._init(__assign(__assign({}, options), { userId: userId, apiKey: apiKey })));\n };\n AmplitudeBrowser.prototype._init = function (options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n var browserOptions, connector, attributionTrackingOptions, webAttribution;\n var _this = this;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n // Step 1: Block concurrent initialization\n if (this.initializing) {\n return [2 /*return*/];\n }\n this.initializing = true;\n return [4 /*yield*/, useBrowserConfig(options.apiKey, options, this)];\n case 1:\n browserOptions = _c.sent();\n return [4 /*yield*/, _super.prototype._init.call(this, browserOptions)];\n case 2:\n _c.sent();\n // Step 3: Set session ID\n // Priority 1: `options.sessionId`\n // Priority 2: last known sessionId from user identity storage\n // Default: `Date.now()`\n // Session ID is handled differently than device ID and user ID due to session events\n this.setSessionId((_b = (_a = options.sessionId) !== null && _a !== void 0 ? _a : this.config.sessionId) !== null && _b !== void 0 ? _b : Date.now());\n connector = getAnalyticsConnector(options.instanceName);\n connector.identityStore.setIdentity({\n userId: this.config.userId,\n deviceId: this.config.deviceId,\n });\n // Step 4: Install plugins\n // Do not track any events before this\n return [4 /*yield*/, this.add(new Destination()).promise];\n case 3:\n // Step 4: Install plugins\n // Do not track any events before this\n _c.sent();\n return [4 /*yield*/, this.add(new Context()).promise];\n case 4:\n _c.sent();\n return [4 /*yield*/, this.add(new IdentityEventSender()).promise];\n case 5:\n _c.sent();\n if (!isFileDownloadTrackingEnabled(this.config.defaultTracking)) return [3 /*break*/, 7];\n return [4 /*yield*/, this.add(fileDownloadTracking()).promise];\n case 6:\n _c.sent();\n _c.label = 7;\n case 7:\n if (!isFormInteractionTrackingEnabled(this.config.defaultTracking)) return [3 /*break*/, 9];\n return [4 /*yield*/, this.add(formInteractionTracking()).promise];\n case 8:\n _c.sent();\n _c.label = 9;\n case 9:\n if (!isAttributionTrackingEnabled(this.config.defaultTracking)) return [3 /*break*/, 11];\n attributionTrackingOptions = getAttributionTrackingConfig(this.config);\n webAttribution = webAttributionPlugin(attributionTrackingOptions);\n return [4 /*yield*/, this.add(webAttribution).promise];\n case 10:\n _c.sent();\n _c.label = 11;\n case 11: \n // Add page view plugin\n return [4 /*yield*/, this.add(pageViewTrackingPlugin(getPageViewTrackingConfig(this.config))).promise];\n case 12:\n // Add page view plugin\n _c.sent();\n this.initializing = false;\n // Step 6: Run queued dispatch functions\n return [4 /*yield*/, this.runQueuedFunctions('dispatchQ')];\n case 13:\n // Step 6: Run queued dispatch functions\n _c.sent();\n // Step 7: Add the event receiver after running remaining queued functions.\n connector.eventBridge.setEventReceiver(function (event) {\n void _this.track(event.eventType, event.eventProperties);\n });\n return [2 /*return*/];\n }\n });\n });\n };\n AmplitudeBrowser.prototype.getUserId = function () {\n var _a;\n return (_a = this.config) === null || _a === void 0 ? void 0 : _a.userId;\n };\n AmplitudeBrowser.prototype.setUserId = function (userId) {\n if (!this.config) {\n this.q.push(this.setUserId.bind(this, userId));\n return;\n }\n if (userId !== this.config.userId || userId === undefined) {\n this.config.userId = userId;\n setConnectorUserId(userId, this.config.instanceName);\n }\n };\n AmplitudeBrowser.prototype.getDeviceId = function () {\n var _a;\n return (_a = this.config) === null || _a === void 0 ? void 0 : _a.deviceId;\n };\n AmplitudeBrowser.prototype.setDeviceId = function (deviceId) {\n if (!this.config) {\n this.q.push(this.setDeviceId.bind(this, deviceId));\n return;\n }\n this.config.deviceId = deviceId;\n setConnectorDeviceId(deviceId, this.config.instanceName);\n };\n AmplitudeBrowser.prototype.reset = function () {\n this.setDeviceId(UUID());\n this.setUserId(undefined);\n };\n AmplitudeBrowser.prototype.getSessionId = function () {\n var _a;\n return (_a = this.config) === null || _a === void 0 ? void 0 : _a.sessionId;\n };\n AmplitudeBrowser.prototype.setSessionId = function (sessionId) {\n var _a;\n if (!this.config) {\n this.q.push(this.setSessionId.bind(this, sessionId));\n return;\n }\n // Prevents starting a new session with the same session ID\n if (sessionId === this.config.sessionId) {\n return;\n }\n var previousSessionId = this.getSessionId();\n var lastEventTime = this.config.lastEventTime;\n var lastEventId = (_a = this.config.lastEventId) !== null && _a !== void 0 ? _a : -1;\n this.config.sessionId = sessionId;\n this.config.lastEventTime = undefined;\n if (isSessionTrackingEnabled(this.config.defaultTracking)) {\n if (previousSessionId && lastEventTime) {\n this.track(DEFAULT_SESSION_END_EVENT, undefined, {\n device_id: this.previousSessionDeviceId,\n event_id: ++lastEventId,\n session_id: previousSessionId,\n time: lastEventTime + 1,\n user_id: this.previousSessionUserId,\n });\n }\n this.config.lastEventTime = this.config.sessionId;\n this.track(DEFAULT_SESSION_START_EVENT, undefined, {\n event_id: ++lastEventId,\n session_id: this.config.sessionId,\n time: this.config.lastEventTime,\n });\n }\n this.previousSessionDeviceId = this.config.deviceId;\n this.previousSessionUserId = this.config.userId;\n };\n AmplitudeBrowser.prototype.extendSession = function () {\n if (!this.config) {\n this.q.push(this.extendSession.bind(this));\n return;\n }\n this.config.lastEventTime = Date.now();\n };\n AmplitudeBrowser.prototype.setTransport = function (transport) {\n if (!this.config) {\n this.q.push(this.setTransport.bind(this, transport));\n return;\n }\n this.config.transportProvider = createTransport(transport);\n };\n AmplitudeBrowser.prototype.identify = function (identify, eventOptions) {\n if (isInstanceProxy(identify)) {\n var queue = identify._q;\n identify._q = [];\n identify = convertProxyObjectToRealObject(new Identify(), queue);\n }\n if (eventOptions === null || eventOptions === void 0 ? void 0 : eventOptions.user_id) {\n this.setUserId(eventOptions.user_id);\n }\n if (eventOptions === null || eventOptions === void 0 ? void 0 : eventOptions.device_id) {\n this.setDeviceId(eventOptions.device_id);\n }\n return _super.prototype.identify.call(this, identify, eventOptions);\n };\n AmplitudeBrowser.prototype.groupIdentify = function (groupType, groupName, identify, eventOptions) {\n if (isInstanceProxy(identify)) {\n var queue = identify._q;\n identify._q = [];\n identify = convertProxyObjectToRealObject(new Identify(), queue);\n }\n return _super.prototype.groupIdentify.call(this, groupType, groupName, identify, eventOptions);\n };\n AmplitudeBrowser.prototype.revenue = function (revenue, eventOptions) {\n if (isInstanceProxy(revenue)) {\n var queue = revenue._q;\n revenue._q = [];\n revenue = convertProxyObjectToRealObject(new Revenue(), queue);\n }\n return _super.prototype.revenue.call(this, revenue, eventOptions);\n };\n AmplitudeBrowser.prototype.process = function (event) {\n return __awaiter(this, void 0, void 0, function () {\n var currentTime, lastEventTime, timeSinceLastEvent;\n return __generator(this, function (_a) {\n currentTime = Date.now();\n lastEventTime = this.config.lastEventTime || Date.now();\n timeSinceLastEvent = currentTime - lastEventTime;\n if (event.event_type !== DEFAULT_SESSION_START_EVENT &&\n event.event_type !== DEFAULT_SESSION_END_EVENT &&\n (!event.session_id || event.session_id === this.getSessionId()) &&\n timeSinceLastEvent > this.config.sessionTimeout) {\n this.setSessionId(currentTime);\n }\n return [2 /*return*/, _super.prototype.process.call(this, event)];\n });\n });\n };\n return AmplitudeBrowser;\n}(AmplitudeCore));\nexport { AmplitudeBrowser };\n//# sourceMappingURL=browser-client.js.map","import { debugWrapper, getClientLogConfig, getClientStates } from '@amplitude/analytics-core';\nimport { AmplitudeBrowser } from './browser-client';\nexport var createInstance = function () {\n var client = new AmplitudeBrowser();\n return {\n init: debugWrapper(client.init.bind(client), 'init', getClientLogConfig(client), getClientStates(client, ['config'])),\n add: debugWrapper(client.add.bind(client), 'add', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),\n remove: debugWrapper(client.remove.bind(client), 'remove', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins'])),\n track: debugWrapper(client.track.bind(client), 'track', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n logEvent: debugWrapper(client.logEvent.bind(client), 'logEvent', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n identify: debugWrapper(client.identify.bind(client), 'identify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n groupIdentify: debugWrapper(client.groupIdentify.bind(client), 'groupIdentify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n setGroup: debugWrapper(client.setGroup.bind(client), 'setGroup', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n revenue: debugWrapper(client.revenue.bind(client), 'revenue', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n flush: debugWrapper(client.flush.bind(client), 'flush', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length'])),\n getUserId: debugWrapper(client.getUserId.bind(client), 'getUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId'])),\n setUserId: debugWrapper(client.setUserId.bind(client), 'setUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId'])),\n getDeviceId: debugWrapper(client.getDeviceId.bind(client), 'getDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId'])),\n setDeviceId: debugWrapper(client.setDeviceId.bind(client), 'setDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId'])),\n reset: debugWrapper(client.reset.bind(client), 'reset', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId', 'config.deviceId'])),\n getSessionId: debugWrapper(client.getSessionId.bind(client), 'getSessionId', getClientLogConfig(client), getClientStates(client, ['config'])),\n setSessionId: debugWrapper(client.setSessionId.bind(client), 'setSessionId', getClientLogConfig(client), getClientStates(client, ['config'])),\n extendSession: debugWrapper(client.extendSession.bind(client), 'extendSession', getClientLogConfig(client), getClientStates(client, ['config'])),\n setOptOut: debugWrapper(client.setOptOut.bind(client), 'setOptOut', getClientLogConfig(client), getClientStates(client, ['config'])),\n setTransport: debugWrapper(client.setTransport.bind(client), 'setTransport', getClientLogConfig(client), getClientStates(client, ['config'])),\n };\n};\nexport default createInstance();\n//# sourceMappingURL=browser-client-factory.js.map","/* eslint-disable @typescript-eslint/unbound-method */\nimport client from './browser-client-factory';\nexport { createInstance } from './browser-client-factory';\nexport var add = client.add, extendSession = client.extendSession, flush = client.flush, getDeviceId = client.getDeviceId, getSessionId = client.getSessionId, getUserId = client.getUserId, groupIdentify = client.groupIdentify, identify = client.identify, init = client.init, logEvent = client.logEvent, remove = client.remove, reset = client.reset, revenue = client.revenue, setDeviceId = client.setDeviceId, setGroup = client.setGroup, setOptOut = client.setOptOut, setSessionId = client.setSessionId, setTransport = client.setTransport, setUserId = client.setUserId, track = client.track;\nexport { runQueuedFunctions } from './utils/snippet-helper';\nexport { Revenue, Identify } from '@amplitude/analytics-core';\nimport * as Types_1 from '@amplitude/analytics-types';\nexport { Types_1 as Types };\n//# sourceMappingURL=index.js.map","import * as amplitude from '@amplitude/analytics-browser';\nimport { track } from '@amplitude/analytics-browser';\nimport { TextCheckerResult } from '@navikt/dab-spraksjekk';\n\nimport { AmplitudeEvent } from './taxonomy-events';\n\nexport function initAmplitude() {\n const apiKey = import.meta.env.VITE_AMPLITUDE_KEY ?? 'default';\n\n amplitude.init(apiKey, undefined, {\n serverUrl: import.meta.env.VITE_AMPLITUDE_API_URL,\n ingestionMetadata: {\n sourceName: window.location.toString(),\n },\n });\n}\n\nasync function logAmplitudeEvent(event: AmplitudeEvent, extraData?: Record): Promise {\n try {\n track(event.name, { ...('data' in event ? event.data : {}), ...extraData });\n } catch (e) {\n console.error(e);\n }\n}\n\nexport function logToggleSpraksjekkToggle(enabled: boolean) {\n return logAmplitudeEvent({ name: 'toggle', data: { text: 'Slå på klarspråkhjelp', enabled: enabled } });\n}\n\nexport function logReferatFullfort(\n analysis: TextCheckerResult,\n referatPublisert: boolean,\n spraksjekkEnabled: boolean,\n variant: 'A' | 'B'\n) {\n const mappedAnalysis = mapSpraksjekkAnalysis(analysis);\n\n return logAmplitudeEvent(\n {\n name: 'referat lagret',\n data: { analysis: mappedAnalysis, referatPublisert, spraksjekkEnabled },\n },\n { variant }\n );\n}\n\ntype Modify = Omit & U;\nexport type TextCheckerAmplitudeAnalysis = Omit<\n Modify<\n TextCheckerResult,\n {\n longParagraphs: number;\n longSentences: number;\n longWords: number;\n duplicateWords: number;\n kansellisten: number;\n nrkOrd: number;\n avloeserord: number;\n personalData: {\n emails: number;\n names: number;\n phonenumbers: number;\n };\n }\n >,\n 'tools'\n> & { tools: Omit };\n\nfunction mapSpraksjekkAnalysis(analysis: TextCheckerResult): TextCheckerAmplitudeAnalysis {\n return {\n longParagraphs: analysis.longParagraphs.length,\n longSentences: analysis.longSentences.length,\n longWords: analysis.longWords.length,\n duplicateWords: analysis.duplicateWords.length,\n kansellisten: analysis.kansellisten.length,\n nrkOrd: analysis.nrkOrd.length,\n avloeserord: analysis.avloeserord.avloeserordMatches.length + analysis.avloeserord.datatermerMatches.length,\n comma: analysis.comma,\n personalData: {\n emails: analysis.personalData.emails.length,\n names: analysis.personalData.names.length,\n phonenumbers: analysis.personalData.phonenumbers.length,\n },\n tools: { lix: analysis.tools.lix, wordCount: analysis.tools.wordCount },\n };\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 cl from \"clsx\";\nimport React, { createContext, forwardRef, useState } from \"react\";\nexport const AccordionItemContext = createContext(null);\nconst AccordionItem = forwardRef((_a, ref) => {\n var { children, className, open, defaultOpen = false, onClick, id } = _a, rest = __rest(_a, [\"children\", \"className\", \"open\", \"defaultOpen\", \"onClick\", \"id\"]);\n const [internalOpen, setInternalOpen] = useState(defaultOpen);\n return (React.createElement(\"div\", Object.assign({ className: cl(\"navds-accordion__item\", className, {\n \"navds-accordion__item--open\": open !== null && open !== void 0 ? open : internalOpen,\n }), ref: ref }, rest),\n React.createElement(AccordionItemContext.Provider, { value: {\n open: open !== null && open !== void 0 ? open : internalOpen,\n toggleOpen: () => {\n if (open === undefined) {\n setInternalOpen((iOpen) => !iOpen);\n }\n },\n } }, children)));\n});\nexport default AccordionItem;\n//# sourceMappingURL=AccordionItem.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};\n/* https://github.com/Stanko/react-animate-height/blob/v3/src/index.tsx */\nimport React, { useEffect, useRef, useState } from \"react\";\n// ------------------ Helpers\nfunction isNumber(n) {\n const number = parseFloat(n);\n return !isNaN(number) && isFinite(number);\n}\nfunction isPercentage(height) {\n // Percentage height\n return (typeof height === \"string\" &&\n height[height.length - 1] === \"%\" &&\n isNumber(height.substring(0, height.length - 1)));\n}\nfunction hideContent(element, height) {\n // Check for element?.style is added cause this would fail in tests (react-test-renderer)\n // Read more here: https://github.com/Stanko/react-animate-height/issues/17\n if (height === 0 && (element === null || element === void 0 ? void 0 : element.style)) {\n element.style.display = \"none\";\n }\n}\nfunction showContent(element, height) {\n // Check for element?.style is added cause this would fail in tests (react-test-renderer)\n // Read more here: https://github.com/Stanko/react-animate-height/issues/17\n if (height === 0 && (element === null || element === void 0 ? void 0 : element.style)) {\n element.style.display = \"\";\n }\n}\nconst AnimateHeight = (_a) => {\n var { children, className, innerClassName, duration: userDuration = 250, easing = \"ease\", height } = _a, props = __rest(_a, [\"children\", \"className\", \"innerClassName\", \"duration\", \"easing\", \"height\"]);\n // ------------------ Initialization\n const prevHeight = useRef(height);\n const contentElement = useRef(null);\n const animationClassesTimeoutID = useRef();\n const timeoutID = useRef();\n const isBrowser = typeof window !== \"undefined\";\n const prefersReducedMotion = useRef(isBrowser && window.matchMedia\n ? window.matchMedia(\"(prefers-reduced-motion)\").matches\n : false);\n const duration = prefersReducedMotion.current ? 0 : userDuration;\n let initHeight = height;\n let initOverflow = \"visible\";\n if (typeof initHeight === \"number\") {\n // Reset negative height to 0\n initHeight = height < 0 ? 0 : height;\n initOverflow = \"hidden\";\n }\n else if (isPercentage(initHeight)) {\n // If value is string \"0%\" make sure we convert it to number 0\n initHeight = height === \"0%\" ? 0 : height;\n initOverflow = \"hidden\";\n }\n const [currentHeight, setCurrentHeight] = useState(initHeight);\n const [overflow, setOverflow] = useState(initOverflow);\n const [useTransitions, setUseTransitions] = useState(false);\n // ------------------ Did mount\n useEffect(() => {\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, currentHeight);\n // This should be explicitly run only on mount\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n // ------------------ Height update\n useEffect(() => {\n if (height !== prevHeight.current && contentElement.current) {\n showContent(contentElement.current, prevHeight.current);\n // Cache content height\n contentElement.current.style.overflow = \"hidden\";\n const contentHeight = contentElement.current.offsetHeight;\n contentElement.current.style.overflow = \"\";\n // set total animation time\n const totalDuration = duration;\n let newHeight;\n let timeoutHeight;\n let timeoutOverflow = \"hidden\";\n let timeoutUseTransitions;\n const isCurrentHeightAuto = prevHeight.current === \"auto\";\n if (typeof height === \"number\") {\n // Reset negative height to 0\n newHeight = height < 0 ? 0 : height;\n timeoutHeight = newHeight;\n }\n else if (isPercentage(height)) {\n // If value is string \"0%\" make sure we convert it to number 0\n newHeight = height === \"0%\" ? 0 : height;\n timeoutHeight = newHeight;\n }\n else {\n // If not, animate to content height\n // and then reset to auto\n newHeight = contentHeight; // TODO solve contentHeight = 0\n timeoutHeight = \"auto\";\n timeoutOverflow = undefined;\n }\n if (isCurrentHeightAuto) {\n // This is the height to be animated to\n timeoutHeight = newHeight;\n // If previous height was 'auto'\n // set starting height explicitly to be able to use transition\n newHeight = contentHeight;\n }\n // Set starting height and animating classes\n // When animating from 'auto' we first need to set fixed height\n // that change should be animated\n setCurrentHeight(newHeight);\n setOverflow(\"hidden\");\n setUseTransitions(!isCurrentHeightAuto);\n // Clear timeouts\n clearTimeout(timeoutID.current);\n clearTimeout(animationClassesTimeoutID.current);\n if (isCurrentHeightAuto) {\n // When animating from 'auto' we use a short timeout to start animation\n // after setting fixed height above\n timeoutUseTransitions = true;\n // Short timeout to allow rendering of the initial animation state first\n timeoutID.current = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(timeoutUseTransitions);\n }, 50);\n // Set static classes and remove transitions when animation ends\n animationClassesTimeoutID.current = setTimeout(() => {\n setUseTransitions(false);\n // ANIMATION ENDS\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, timeoutHeight);\n }, totalDuration);\n }\n else {\n // Set end height, classes and remove transitions when animation is complete\n timeoutID.current = setTimeout(() => {\n setCurrentHeight(timeoutHeight);\n setOverflow(timeoutOverflow);\n setUseTransitions(false);\n // ANIMATION ENDS\n // If height is auto, don't hide the content\n // (case when element is empty, therefore height is 0)\n if (height !== \"auto\") {\n // Hide content if height is 0 (to prevent tabbing into it)\n hideContent(contentElement.current, newHeight); // TODO solve newHeight = 0\n }\n }, totalDuration);\n }\n }\n prevHeight.current = height;\n return () => {\n clearTimeout(timeoutID.current);\n clearTimeout(animationClassesTimeoutID.current);\n };\n // This should be explicitly run only on height change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [height]);\n // ------------------ Render\n const componentStyle = {\n height: currentHeight,\n overflow: overflow,\n };\n if (useTransitions) {\n componentStyle.transition = `height ${duration}ms ${easing} 0ms`;\n // Add webkit vendor prefix still used by opera, blackberry...\n componentStyle.WebkitTransition = componentStyle.transition;\n }\n // Check if user passed aria-hidden prop\n const hasAriaHiddenProp = typeof props[\"aria-hidden\"] !== \"undefined\";\n const ariaHidden = hasAriaHiddenProp ? props[\"aria-hidden\"] : height === 0;\n return (React.createElement(\"div\", Object.assign({}, props, { className: className, style: componentStyle }),\n React.createElement(\"div\", { \"aria-hidden\": ariaHidden, className: innerClassName, ref: contentElement }, children)));\n};\nexport default AnimateHeight;\n//# sourceMappingURL=AnimateHeight.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, useContext } from \"react\";\nimport AnimateHeight from \"../util/AnimateHeight\";\nimport { BodyLong } from \"../typography/BodyLong\";\nimport { AccordionItemContext } from \"./AccordionItem\";\nconst AccordionContent = forwardRef((_a, ref) => {\n var { children, className } = _a, rest = __rest(_a, [\"children\", \"className\"]);\n const context = useContext(AccordionItemContext);\n if (context === null) {\n console.error(\" has to be used within an \");\n return null;\n }\n return (React.createElement(AnimateHeight, { height: context.open ? \"auto\" : 0, duration: 250 },\n React.createElement(BodyLong, Object.assign({}, rest, { as: \"div\", ref: ref, className: cl(\"navds-accordion__content\", className) }), children)));\n});\nexport default AccordionContent;\n//# sourceMappingURL=AccordionContent.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgBack = 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: \"m6.586 12 7.707-7.707 1.414 1.414L9.414 12l6.293 6.293-1.414 1.414L6.586 12Z\", fill: \"currentColor\" })));\n});\nexport default SvgBack;\n//# sourceMappingURL=Back.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgCalender = 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: \"M6 7V5H2v5h20V5h-4v2a1 1 0 1 1-2 0V5H8v2a1 1 0 1 1-2 0Zm10-4H8V1a1 1 0 1 0-2 0v2H2a2 2 0 0 0-2 2v17a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-4V1a1 1 0 1 0-2 0v2ZM2 12v10h20V12H2Zm6 3a1 1 0 0 0-1-1H5a1 1 0 1 0 0 2h2a1 1 0 0 0 1-1Zm-1 3a1 1 0 1 1 0 2H5a1 1 0 1 1 0-2h2Zm6-4h-2a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2Zm-2 4h2a1 1 0 1 1 0 2h-2a1 1 0 1 1 0-2Zm9-3a1 1 0 0 0-1-1h-2a1 1 0 1 0 0 2h2a1 1 0 0 0 1-1Zm-4 4a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2h-2a1 1 0 0 1-1-1Z\", fill: \"currentColor\" })));\n});\nexport default SvgCalender;\n//# sourceMappingURL=Calender.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgDown = 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 22-7.707-7.707 1.414-1.414L11 18.172V1.586h2v16.586l5.293-5.293 1.414 1.414L12 22Z\", fill: \"currentColor\" })));\n});\nexport default SvgDown;\n//# sourceMappingURL=Down.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgErrorColored = 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: \"M0 11.976C.013 5.372 5.395 0 11.999 0 18.639.013 24.012 5.406 24 12.022 23.986 18.627 18.603 24 12 24h-.023a11.924 11.924 0 0 1-8.48-3.531A11.923 11.923 0 0 1 0 11.976Zm17-3.547L15.571 7 12 10.572 8.429 7 7 8.429 10.572 12 7 15.571 8.429 17 12 13.428 15.571 17 17 15.571 13.428 12 17 8.429Z\", fill: \"#C30000\" })));\n});\nexport default SvgErrorColored;\n//# sourceMappingURL=ErrorColored.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgExpandFilled = 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 18.121-8.06-8.06 2.12-2.122L12 13.88l5.94-5.94 2.12 2.122L12 18.12Z\", fill: \"currentColor\" })));\n});\nexport default SvgExpandFilled;\n//# sourceMappingURL=ExpandFilled.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgHelptext = 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 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0Zm0 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 14a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0-11c2.205 0 4 1.657 4 3.693 0 .986-.416 1.914-1.172 2.612l-.593.54-.294.28c-.477.466-.869.94-.936 1.417l-.01.144v.814h-1.991v-.814c0-1.254.84-2.214 1.675-3.002l.74-.68c.38-.35.59-.816.59-1.31 0-1.024-.901-1.856-2.01-1.856-1.054 0-1.922.755-2.002 1.71l-.006.145H8C8 6.657 9.794 5 12 5Z\", fill: \"currentColor\" })));\n});\nexport default SvgHelptext;\n//# sourceMappingURL=Helptext.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgHelptextFilled = 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 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0Zm0 16a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0-11c2.205 0 4 1.657 4 3.693 0 .986-.416 1.914-1.172 2.612l-.593.54-.294.28c-.477.466-.869.94-.936 1.417l-.01.144v.814h-1.991v-.814c0-1.254.84-2.214 1.675-3.002l.74-.68c.38-.35.59-.816.59-1.31 0-1.024-.901-1.856-2.01-1.856-1.054 0-1.922.755-2.002 1.71l-.006.145H8C8 6.657 9.794 5 12 5Z\", fill: \"currentColor\" })));\n});\nexport default SvgHelptextFilled;\n//# sourceMappingURL=HelptextFilled.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgInformationColored = 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: \"M0 12C0 5.382 5.382 0 12 0c6.617 0 12 5.382 12 12s-5.383 12-12 12C5.382 24 0 18.618 0 12Zm12-7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM9 19v-2h2v-5H9v-2h4v7h2v2H9Z\", fill: \"#368DA8\" })));\n});\nexport default SvgInformationColored;\n//# sourceMappingURL=InformationColored.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgLeft = 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: \"M1.793 11.793 9.5 4.086 10.914 5.5l-5.293 5.293h16.586v2H5.621l5.293 5.293L9.5 19.5l-7.707-7.707Z\", fill: \"currentColor\" })));\n});\nexport default SvgLeft;\n//# sourceMappingURL=Left.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgNext = 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: \"m17.414 12-7.707 7.707-1.414-1.414L14.586 12 8.293 5.707l1.414-1.414L17.414 12Z\", fill: \"currentColor\" })));\n});\nexport default SvgNext;\n//# sourceMappingURL=Next.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgRight = 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: \"M22.207 11.793 14.5 19.5l-1.414-1.414 5.293-5.293H1.793v-2h16.586L13.086 5.5 14.5 4.086l7.707 7.707Z\", fill: \"currentColor\" })));\n});\nexport default SvgRight;\n//# sourceMappingURL=Right.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgSuccessColored = 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: \"M24 12c0-6.627-5.373-12-12-12S0 5.373 0 12s5.373 12 12 12 12-5.373 12-12Zm-5.554-2.9-1.4-1.429-7.332 7.032-2.319-2.118L6 14.018 9.718 17.5 18.446 9.1Z\", fill: \"#007C2E\" })));\n});\nexport default SvgSuccessColored;\n//# sourceMappingURL=SuccessColored.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgSuccessStroke = 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: \"M18.201 6 20 7.89 8.78 19 4 14.396 5.794 12.5l2.98 2.802L18.201 6Z\", fill: \"currentColor\" })));\n});\nexport default SvgSuccessStroke;\n//# sourceMappingURL=SuccessStroke.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgUp = 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 1.586 7.707 7.707-1.414 1.414L13 5.414V22h-2V5.414l-5.293 5.293-1.414-1.414L12 1.586Z\", fill: \"currentColor\" })));\n});\nexport default SvgUp;\n//# sourceMappingURL=Up.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgUpDown = 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: \"M11.999 5.957 5.997 0 0 5.953l1.409 1.42L4.997 3.81v11.192h2V3.81l3.593 3.566 1.409-1.42ZM12 18.043 18.003 24 24 18.047l-1.409-1.42-3.588 3.562V8.997h-2V20.19l-3.593-3.566-1.409 1.42Z\", fill: \"currentColor\" })));\n});\nexport default SvgUpDown;\n//# sourceMappingURL=UpDown.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 * as React from \"react\";\nimport { forwardRef } from \"react\";\nimport { useId } from \"./util/useId\";\nconst SvgWarningColored = 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: \"M11.126.564a.962.962 0 0 1 1.741-.021l11.011 21.912c.358.695-.117 1.54-.865 1.54H.987c-.738 0-1.215-.826-.876-1.519L11.126.564ZM11 7.996h2v7h-2v-7Zm1 12a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\", fill: \"#D47B00\" })));\n});\nexport default SvgWarningColored;\n//# sourceMappingURL=WarningColored.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 { Expand, ExpandFilled } from \"@navikt/ds-icons\";\nimport cl from \"clsx\";\nimport React, { forwardRef, useContext } from \"react\";\nimport { Heading } from \"../typography/Heading\";\nimport { AccordionItemContext } from \"./AccordionItem\";\nconst AccordionHeader = forwardRef((_a, ref) => {\n var { children, className, onClick } = _a, rest = __rest(_a, [\"children\", \"className\", \"onClick\"]);\n const context = useContext(AccordionItemContext);\n if (context === null) {\n console.error(\" has to be used within an \");\n return null;\n }\n const handleClick = (e) => {\n context.toggleOpen();\n onClick && onClick(e);\n };\n return (React.createElement(\"button\", Object.assign({}, rest, { ref: ref, className: cl(\"navds-accordion__header\", className), type: \"button\", onClick: handleClick, \"aria-expanded\": context.open }),\n React.createElement(Heading, { size: \"small\", as: \"span\", className: \"navds-accordion__header-content\" }, children),\n React.createElement(Expand, { \"aria-hidden\": true, className: \"navds-accordion__expand-icon\" }),\n React.createElement(ExpandFilled, { \"aria-hidden\": true, className: \"navds-accordion__expand-icon navds-accordion__expand-icon--filled\" })));\n});\nexport default AccordionHeader;\n//# sourceMappingURL=AccordionHeader.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 AccordionItem from \"./AccordionItem\";\nimport AccordionContent from \"./AccordionContent\";\nimport AccordionHeader from \"./AccordionHeader\";\nexport const Accordion = forwardRef((_a, ref) => {\n var { className } = _a, rest = __rest(_a, [\"className\"]);\n return (React.createElement(\"div\", Object.assign({}, rest, { className: cl(\"navds-accordion\", className), ref: ref })));\n});\nAccordion.Header = AccordionHeader;\nAccordion.Content = AccordionContent;\nAccordion.Item = AccordionItem;\nexport default Accordion;\n//# sourceMappingURL=Accordion.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 { ErrorColored, InformationColored, SuccessColored, WarningColored, } from \"@navikt/ds-icons\";\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { BodyLong } from \"../typography/BodyLong\";\nconst Icon = (_a) => {\n var { variant } = _a, props = __rest(_a, [\"variant\"]);\n switch (variant) {\n case \"error\":\n return React.createElement(ErrorColored, Object.assign({ title: \"Feil\" }, props));\n case \"warning\":\n return React.createElement(WarningColored, Object.assign({ title: \"Advarsel\" }, props));\n case \"info\":\n return React.createElement(InformationColored, Object.assign({ title: \"Informasjon\" }, props));\n case \"success\":\n return React.createElement(SuccessColored, Object.assign({ title: \"Suksess\" }, props));\n default:\n return null;\n }\n};\nexport const Alert = forwardRef((_a, ref) => {\n var { children, className, variant, size = \"medium\", fullWidth = false, inline = false } = _a, rest = __rest(_a, [\"children\", \"className\", \"variant\", \"size\", \"fullWidth\", \"inline\"]);\n return (React.createElement(\"div\", Object.assign({}, rest, { ref: ref, className: cl(className, \"navds-alert\", `navds-alert--${variant}`, `navds-alert--${size}`, { \"navds-alert--full-width\": fullWidth, \"navds-alert--inline\": inline }) }),\n React.createElement(Icon, { variant: variant, className: \"navds-alert__icon\" }),\n React.createElement(BodyLong, { as: \"div\", size: size, className: \"navds-alert__wrapper\" }, children)));\n});\nexport default Alert;\n//# sourceMappingURL=Alert.js.map","// https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/debounce.js\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}\n//# sourceMappingURL=debounce.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 { SuccessStroke } from \"@navikt/ds-icons\";\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nexport const ToggleChips = forwardRef((_a, ref) => {\n var { className, children, selected, as: Component = \"button\" } = _a, rest = __rest(_a, [\"className\", \"children\", \"selected\", \"as\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(\"navds-chips__chip navds-chips__toggle\", className, {\n \"navds-chips--icon-left\": selected,\n }), \"aria-pressed\": selected }),\n selected && (React.createElement(SuccessStroke, { \"aria-hidden\": true, className: \"navds-chips__toggle-icon\" })),\n React.createElement(\"span\", { className: \"navds-chips__chip-text\" }, children)));\n});\nexport default ToggleChips;\n//# sourceMappingURL=Toggle.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 { Close } from \"@navikt/ds-icons\";\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nexport const RemovableChips = forwardRef((_a, ref) => {\n var { className, children, variant = \"action\", as: Component = \"button\", removeLabel = \"slett\", onDelete } = _a, rest = __rest(_a, [\"className\", \"children\", \"variant\", \"as\", \"removeLabel\", \"onDelete\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(\"navds-chips__chip navds-chips__removable navds-chips--icon-right\", className, `navds-chips__removable--${variant}`), \"aria-label\": `${children} ${removeLabel}`, onClick: (e) => {\n var _a;\n onDelete === null || onDelete === void 0 ? void 0 : onDelete();\n (_a = rest === null || rest === void 0 ? void 0 : rest.onClick) === null || _a === void 0 ? void 0 : _a.call(rest, e);\n } }),\n React.createElement(\"span\", { className: \"navds-chips__chip-text\" }, children),\n React.createElement(\"span\", { className: \"navds-chips__removable-icon\" },\n React.createElement(Close, { \"aria-hidden\": true }))));\n});\nexport default RemovableChips;\n//# sourceMappingURL=Removable.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 ToggleChips from \"./Toggle\";\nimport RemovableChips from \"./Removable\";\nexport const Chips = forwardRef((_a, ref) => {\n var { className, size = \"medium\", children } = _a, rest = __rest(_a, [\"className\", \"size\", \"children\"]);\n return (React.createElement(\"ul\", Object.assign({}, rest, { ref: ref, className: cl(\"navds-chips\", className, `navds-chips--${size}`, {\n \"navds-body-short navds-body-short--small\": size === \"medium\",\n \"navds-detail navds-detail--small\": size === \"small\",\n }) }), React.Children.map(children, (chip, index) => {\n var _a;\n return React.createElement(\"li\", { key: index + ((_a = chip === null || chip === void 0 ? void 0 : chip.toString()) !== null && _a !== void 0 ? _a : \"\") }, chip);\n })));\n});\nChips.Toggle = ToggleChips;\nChips.Removable = RemovableChips;\nexport default Chips;\n//# sourceMappingURL=Chips.js.map","import * as React from 'react';\nimport React__default, { createContext, useContext, useState, forwardRef, useEffect, useRef } from 'react';\nimport enUS from 'date-fns/locale/en-US';\nimport format from 'date-fns/format';\nimport endOfMonth from 'date-fns/endOfMonth';\nimport startOfDay from 'date-fns/startOfDay';\nimport startOfMonth from 'date-fns/startOfMonth';\nimport isSameYear from 'date-fns/isSameYear';\nimport setMonth from 'date-fns/setMonth';\nimport setYear from 'date-fns/setYear';\nimport startOfYear from 'date-fns/startOfYear';\nimport addMonths from 'date-fns/addMonths';\nimport isBefore from 'date-fns/isBefore';\nimport isSameMonth from 'date-fns/isSameMonth';\nimport differenceInCalendarMonths from 'date-fns/differenceInCalendarMonths';\nimport addDays from 'date-fns/addDays';\nimport startOfISOWeek from 'date-fns/startOfISOWeek';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport getUnixTime from 'date-fns/getUnixTime';\nimport isSameDay from 'date-fns/isSameDay';\nimport differenceInCalendarDays from 'date-fns/differenceInCalendarDays';\nimport subDays from 'date-fns/subDays';\nimport isAfter from 'date-fns/isAfter';\nimport { isAfter as isAfter$1 } from 'date-fns';\nimport isDate from 'date-fns/isDate';\nimport addWeeks from 'date-fns/addWeeks';\nimport addYears from 'date-fns/addYears';\nimport endOfISOWeek from 'date-fns/endOfISOWeek';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport max from 'date-fns/max';\nimport min from 'date-fns/min';\nimport getWeeksInMonth from 'date-fns/getWeeksInMonth';\nimport getISOWeek from 'date-fns/getISOWeek';\nimport getWeek from 'date-fns/getWeek';\nimport parse from 'date-fns/parse';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\n\n/** Returns true when the props are of type {@link DayPickerMultipleProps}. */\nfunction isDayPickerMultiple(props) {\n return props.mode === 'multiple';\n}\n\n/** Returns true when the props are of type {@link DayPickerRangeProps}. */\nfunction isDayPickerRange(props) {\n return props.mode === 'range';\n}\n\n/** Returns true when the props are of type {@link DayPickerSingleProps}. */\nfunction isDayPickerSingle(props) {\n return props.mode === 'single';\n}\n\n/**\n * The name of the default CSS classes.\n */\nvar defaultClassNames = {\n root: 'rdp',\n multiple_months: 'rdp-multiple_months',\n with_weeknumber: 'rdp-with_weeknumber',\n vhidden: 'rdp-vhidden',\n button_reset: 'rdp-button_reset',\n button: 'rdp-button',\n caption: 'rdp-caption',\n caption_start: 'rdp-caption_start',\n caption_end: 'rdp-caption_end',\n caption_between: 'rdp-caption_between',\n caption_label: 'rdp-caption_label',\n caption_dropdowns: 'rdp-caption_dropdowns',\n dropdown: 'rdp-dropdown',\n dropdown_month: 'rdp-dropdown_month',\n dropdown_year: 'rdp-dropdown_year',\n dropdown_icon: 'rdp-dropdown_icon',\n months: 'rdp-months',\n month: 'rdp-month',\n table: 'rdp-table',\n tbody: 'rdp-tbody',\n tfoot: 'rdp-tfoot',\n head: 'rdp-head',\n head_row: 'rdp-head_row',\n head_cell: 'rdp-head_cell',\n nav: 'rdp-nav',\n nav_button: 'rdp-nav_button',\n nav_button_previous: 'rdp-nav_button_previous',\n nav_button_next: 'rdp-nav_button_next',\n nav_icon: 'rdp-nav_icon',\n row: 'rdp-row',\n weeknumber: 'rdp-weeknumber',\n cell: 'rdp-cell',\n day: 'rdp-day',\n day_today: 'rdp-day_today',\n day_outside: 'rdp-day_outside',\n day_selected: 'rdp-day_selected',\n day_disabled: 'rdp-day_disabled',\n day_hidden: 'rdp-day_hidden',\n day_range_start: 'rdp-day_range_start',\n day_range_end: 'rdp-day_range_end',\n day_range_middle: 'rdp-day_range_middle'\n};\n\n/**\n * The default formatter for the caption.\n */\nfunction formatCaption(month, options) {\n return format(month, 'LLLL y', options);\n}\n\n/**\n * The default formatter for the Day button.\n */\nfunction formatDay(day, options) {\n return format(day, 'd', options);\n}\n\n/**\n * The default formatter for the Month caption.\n */\nfunction formatMonthCaption(month, options) {\n return format(month, 'LLLL', options);\n}\n\n/**\n * The default formatter for the week number.\n */\nfunction formatWeekNumber(weekNumber) {\n return \"\".concat(weekNumber);\n}\n\n/**\n * The default formatter for the name of the weekday.\n */\nfunction formatWeekdayName(weekday, options) {\n return format(weekday, 'cccccc', options);\n}\n\n/**\n * The default formatter for the Year caption.\n */\nfunction formatYearCaption(year, options) {\n return format(year, 'yyyy', options);\n}\n\nvar formatters = /*#__PURE__*/Object.freeze({\n __proto__: null,\n formatCaption: formatCaption,\n formatDay: formatDay,\n formatMonthCaption: formatMonthCaption,\n formatWeekNumber: formatWeekNumber,\n formatWeekdayName: formatWeekdayName,\n formatYearCaption: formatYearCaption\n});\n\n/**\n * The default ARIA label for the day button.\n */\nvar labelDay = function (day, activeModifiers, options) {\n return format(day, 'do MMMM (EEEE)', options);\n};\n\n/**\n * The default ARIA label for the WeekNumber element.\n */\nvar labelMonthDropdown = function () {\n return 'Month: ';\n};\n\n/**\n * The default ARIA label for next month button in navigation\n */\nvar labelNext = function () {\n return 'Go to next month';\n};\n\n/**\n * The default ARIA label for previous month button in navigation\n */\nvar labelPrevious = function () {\n return 'Go to previous month';\n};\n\n/**\n * The default ARIA label for the Weekday element.\n */\nvar labelWeekday = function (day, options) {\n return format(day, 'cccc', options);\n};\n\n/**\n * The default ARIA label for the WeekNumber element.\n */\nvar labelWeekNumber = function (n) {\n return \"Week n. \".concat(n);\n};\n\n/**\n * The default ARIA label for the WeekNumber element.\n */\nvar labelYearDropdown = function () {\n return 'Year: ';\n};\n\nvar labels = /*#__PURE__*/Object.freeze({\n __proto__: null,\n labelDay: labelDay,\n labelMonthDropdown: labelMonthDropdown,\n labelNext: labelNext,\n labelPrevious: labelPrevious,\n labelWeekday: labelWeekday,\n labelWeekNumber: labelWeekNumber,\n labelYearDropdown: labelYearDropdown\n});\n\n/**\n * Returns the default values to use in the DayPickerContext, in case they are\n * not passed down with the DayPicker initial props.\n */\nfunction getDefaultContextValues() {\n var captionLayout = 'buttons';\n var classNames = defaultClassNames;\n var locale = enUS;\n var modifiersClassNames = {};\n var modifiers = {};\n var numberOfMonths = 1;\n var styles = {};\n var today = new Date();\n return {\n captionLayout: captionLayout,\n classNames: classNames,\n formatters: formatters,\n labels: labels,\n locale: locale,\n modifiersClassNames: modifiersClassNames,\n modifiers: modifiers,\n numberOfMonths: numberOfMonths,\n styles: styles,\n today: today,\n mode: 'default'\n };\n}\n\n/** Return the `fromDate` and `toDate` prop values values parsing the DayPicker props. */\nfunction parseFromToProps(props) {\n var fromYear = props.fromYear, toYear = props.toYear, fromMonth = props.fromMonth, toMonth = props.toMonth;\n var fromDate = props.fromDate, toDate = props.toDate;\n if (fromMonth) {\n fromDate = startOfMonth(fromMonth);\n }\n else if (fromYear) {\n fromDate = new Date(fromYear, 0, 1);\n }\n if (toMonth) {\n toDate = endOfMonth(toMonth);\n }\n else if (toYear) {\n toDate = new Date(toYear, 11, 31);\n }\n return {\n fromDate: fromDate ? startOfDay(fromDate) : undefined,\n toDate: toDate ? startOfDay(toDate) : undefined\n };\n}\n\n/**\n * The DayPicker context shares the props passed to DayPicker within internal\n * and custom components. It is used to set the default values and perform\n * one-time calculations required to render the days.\n *\n * Access to this context from the {@link useDayPicker} hook.\n */\nvar DayPickerContext = createContext(undefined);\n/**\n * The provider for the {@link DayPickerContext}, assigning the defaults from the\n * initial DayPicker props.\n */\nfunction DayPickerProvider(props) {\n var _a;\n var initialProps = props.initialProps;\n var defaultContextValues = getDefaultContextValues();\n var _b = parseFromToProps(initialProps), fromDate = _b.fromDate, toDate = _b.toDate;\n var captionLayout = (_a = initialProps.captionLayout) !== null && _a !== void 0 ? _a : defaultContextValues.captionLayout;\n if (captionLayout !== 'buttons' && (!fromDate || !toDate)) {\n // When no from/to dates are set, the caption is always buttons\n captionLayout = 'buttons';\n }\n var onSelect;\n if (isDayPickerSingle(initialProps) ||\n isDayPickerMultiple(initialProps) ||\n isDayPickerRange(initialProps)) {\n onSelect = initialProps.onSelect;\n }\n var value = __assign(__assign(__assign({}, defaultContextValues), initialProps), { captionLayout: captionLayout, classNames: __assign(__assign({}, defaultContextValues.classNames), initialProps.classNames), components: __assign({}, initialProps.components), formatters: __assign(__assign({}, defaultContextValues.formatters), initialProps.formatters), fromDate: fromDate, labels: __assign(__assign({}, defaultContextValues.labels), initialProps.labels), mode: initialProps.mode || defaultContextValues.mode, modifiers: __assign(__assign({}, defaultContextValues.modifiers), initialProps.modifiers), modifiersClassNames: __assign(__assign({}, defaultContextValues.modifiersClassNames), initialProps.modifiersClassNames), onSelect: onSelect, styles: __assign(__assign({}, defaultContextValues.styles), initialProps.styles), toDate: toDate });\n return (React__default.createElement(DayPickerContext.Provider, { value: value }, props.children));\n}\n/**\n * Hook to access the {@link DayPickerContextValue}.\n *\n * Use the DayPicker context to access to the props passed to DayPicker inside\n * internal or custom components.\n */\nfunction useDayPicker() {\n var context = useContext(DayPickerContext);\n if (!context) {\n throw new Error(\"useDayPicker must be used within a DayPickerProvider.\");\n }\n return context;\n}\n\n/** Render the caption for the displayed month. This component is used when `captionLayout=\"buttons\"`. */\nfunction CaptionLabel(props) {\n var _a = useDayPicker(), locale = _a.locale, classNames = _a.classNames, styles = _a.styles, formatCaption = _a.formatters.formatCaption;\n return (React__default.createElement(\"h2\", { className: classNames.caption_label, style: styles.caption_label, \"aria-live\": \"polite\", \"aria-atomic\": \"true\", id: props.id }, formatCaption(props.displayMonth, { locale: locale })));\n}\n\n/**\n * Render the icon in the styled drop-down.\n */\nfunction IconDropdown(props) {\n return (React__default.createElement(\"svg\", __assign({ width: \"8px\", height: \"8px\", viewBox: \"0 0 120 120\", \"data-testid\": \"iconDropdown\" }, props),\n React__default.createElement(\"path\", { d: \"M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\n}\n\n/**\n * Render a styled select component – displaying a caption and a custom\n * drop-down icon.\n */\nfunction Dropdown(props) {\n var _a, _b;\n var onChange = props.onChange, value = props.value, children = props.children, caption = props.caption, className = props.className, style = props.style;\n var dayPicker = useDayPicker();\n var IconDropdownComponent = (_b = (_a = dayPicker.components) === null || _a === void 0 ? void 0 : _a.IconDropdown) !== null && _b !== void 0 ? _b : IconDropdown;\n return (React__default.createElement(\"div\", { className: className, style: style },\n React__default.createElement(\"span\", { className: dayPicker.classNames.vhidden }, props['aria-label']),\n React__default.createElement(\"select\", { name: props.name, \"aria-label\": props['aria-label'], className: dayPicker.classNames.dropdown, style: dayPicker.styles.dropdown, value: value, onChange: onChange }, children),\n React__default.createElement(\"div\", { className: dayPicker.classNames.caption_label, style: dayPicker.styles.caption_label, \"aria-hidden\": \"true\" },\n caption,\n React__default.createElement(IconDropdownComponent, { className: dayPicker.classNames.dropdown_icon, style: dayPicker.styles.dropdown_icon }))));\n}\n\n/** Render the dropdown to navigate between months. */\nfunction MonthsDropdown(props) {\n var _a;\n var _b = useDayPicker(), fromDate = _b.fromDate, toDate = _b.toDate, styles = _b.styles, locale = _b.locale, formatMonthCaption = _b.formatters.formatMonthCaption, classNames = _b.classNames, components = _b.components, labelMonthDropdown = _b.labels.labelMonthDropdown;\n // Dropdown should appear only when both from/toDate is set\n if (!fromDate)\n return React__default.createElement(React__default.Fragment, null);\n if (!toDate)\n return React__default.createElement(React__default.Fragment, null);\n var dropdownMonths = [];\n if (isSameYear(fromDate, toDate)) {\n // only display the months included in the range\n var date = startOfMonth(fromDate);\n for (var month = fromDate.getMonth(); month <= toDate.getMonth(); month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n else {\n // display all the 12 months\n var date = startOfMonth(new Date()); // Any date should be OK, as we just need the year\n for (var month = 0; month <= 11; month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n var handleChange = function (e) {\n var selectedMonth = Number(e.target.value);\n var newMonth = setMonth(startOfMonth(props.displayMonth), selectedMonth);\n props.onChange(newMonth);\n };\n var DropdownComponent = (_a = components === null || components === void 0 ? void 0 : components.Dropdown) !== null && _a !== void 0 ? _a : Dropdown;\n return (React__default.createElement(DropdownComponent, { name: \"months\", \"aria-label\": labelMonthDropdown(), className: classNames.dropdown_month, style: styles.dropdown_month, onChange: handleChange, value: props.displayMonth.getMonth(), caption: formatMonthCaption(props.displayMonth, { locale: locale }) }, dropdownMonths.map(function (m) { return (React__default.createElement(\"option\", { key: m.getMonth(), value: m.getMonth() }, formatMonthCaption(m, { locale: locale }))); })));\n}\n\n/**\n * Render a dropdown to change the year. Take in account the `nav.fromDate` and\n * `toDate` from context.\n */\nfunction YearsDropdown(props) {\n var _a;\n var displayMonth = props.displayMonth;\n var _b = useDayPicker(), fromDate = _b.fromDate, toDate = _b.toDate, locale = _b.locale, styles = _b.styles, classNames = _b.classNames, components = _b.components, formatYearCaption = _b.formatters.formatYearCaption, labelYearDropdown = _b.labels.labelYearDropdown;\n var years = [];\n // Dropdown should appear only when both from/toDate is set\n if (!fromDate)\n return React__default.createElement(React__default.Fragment, null);\n if (!toDate)\n return React__default.createElement(React__default.Fragment, null);\n var fromYear = fromDate.getFullYear();\n var toYear = toDate.getFullYear();\n for (var year = fromYear; year <= toYear; year++) {\n years.push(setYear(startOfYear(new Date()), year));\n }\n var handleChange = function (e) {\n var newMonth = setYear(startOfMonth(displayMonth), Number(e.target.value));\n props.onChange(newMonth);\n };\n var DropdownComponent = (_a = components === null || components === void 0 ? void 0 : components.Dropdown) !== null && _a !== void 0 ? _a : Dropdown;\n return (React__default.createElement(DropdownComponent, { name: \"years\", \"aria-label\": labelYearDropdown(), className: classNames.dropdown_year, style: styles.dropdown_year, onChange: handleChange, value: displayMonth.getFullYear(), caption: formatYearCaption(displayMonth, { locale: locale }) }, years.map(function (year) { return (React__default.createElement(\"option\", { key: year.getFullYear(), value: year.getFullYear() }, formatYearCaption(year, { locale: locale }))); })));\n}\n\n/**\n * Helper hook for using controlled/uncontrolled values from a component props.\n *\n * When the value is not controlled, pass `undefined` as `controlledValue` and\n * use the returned setter to update it.\n *\n * When the value is controlled, pass the controlled value as second\n * argument, which will be always returned as `value`.\n */\nfunction useControlledValue(defaultValue, controlledValue) {\n var _a = useState(defaultValue), uncontrolledValue = _a[0], setValue = _a[1];\n var value = controlledValue === undefined ? uncontrolledValue : controlledValue;\n return [value, setValue];\n}\n\n/** Return the initial month according to the given options. */\nfunction getInitialMonth(context) {\n var month = context.month, defaultMonth = context.defaultMonth, today = context.today;\n var initialMonth = month || defaultMonth || today || new Date();\n var toDate = context.toDate, fromDate = context.fromDate, _a = context.numberOfMonths, numberOfMonths = _a === void 0 ? 1 : _a;\n // Fix the initialMonth if is after the to-date\n if (toDate && differenceInCalendarMonths(toDate, initialMonth) < 0) {\n var offset = -1 * (numberOfMonths - 1);\n initialMonth = addMonths(toDate, offset);\n }\n // Fix the initialMonth if is before the from-date\n if (fromDate && differenceInCalendarMonths(initialMonth, fromDate) < 0) {\n initialMonth = fromDate;\n }\n return startOfMonth(initialMonth);\n}\n\n/** Controls the navigation state. */\nfunction useNavigationState() {\n var context = useDayPicker();\n var initialMonth = getInitialMonth(context);\n var _a = useControlledValue(initialMonth, context.month), month = _a[0], setMonth = _a[1];\n var goToMonth = function (date) {\n var _a;\n if (context.disableNavigation)\n return;\n var month = startOfMonth(date);\n setMonth(month);\n (_a = context.onMonthChange) === null || _a === void 0 ? void 0 : _a.call(context, month);\n };\n return [month, goToMonth];\n}\n\n/**\n * Return the months to display in the component according to the number of\n * months and the from/to date.\n */\nfunction getDisplayMonths(month, _a) {\n var reverseMonths = _a.reverseMonths, numberOfMonths = _a.numberOfMonths;\n var start = startOfMonth(month);\n var end = startOfMonth(addMonths(start, numberOfMonths));\n var monthsDiff = differenceInCalendarMonths(end, start);\n var months = [];\n for (var i = 0; i < monthsDiff; i++) {\n var nextMonth = addMonths(start, i);\n months.push(nextMonth);\n }\n if (reverseMonths)\n months = months.reverse();\n return months;\n}\n\n/**\n * Returns the next month the user can navigate to according to the given\n * options.\n *\n * Please note that the next month is not always the next calendar month:\n *\n * - if after the `toDate` range, is undefined;\n * - if the navigation is paged, is the number of months displayed ahead.\n *\n */\nfunction getNextMonth(startingMonth, options) {\n if (options.disableNavigation) {\n return undefined;\n }\n var toDate = options.toDate, pagedNavigation = options.pagedNavigation, _a = options.numberOfMonths, numberOfMonths = _a === void 0 ? 1 : _a;\n var offset = pagedNavigation ? numberOfMonths : 1;\n var month = startOfMonth(startingMonth);\n if (!toDate) {\n return addMonths(month, offset);\n }\n var monthsDiff = differenceInCalendarMonths(toDate, startingMonth);\n if (monthsDiff < numberOfMonths) {\n return undefined;\n }\n // Jump forward as the number of months when paged navigation\n return addMonths(month, offset);\n}\n\n/**\n * Returns the next previous the user can navigate to, according to the given\n * options.\n *\n * Please note that the previous month is not always the previous calendar\n * month:\n *\n * - if before the `fromDate` date, is `undefined`;\n * - if the navigation is paged, is the number of months displayed before.\n *\n */\nfunction getPreviousMonth(startingMonth, options) {\n if (options.disableNavigation) {\n return undefined;\n }\n var fromDate = options.fromDate, pagedNavigation = options.pagedNavigation, _a = options.numberOfMonths, numberOfMonths = _a === void 0 ? 1 : _a;\n var offset = pagedNavigation ? numberOfMonths : 1;\n var month = startOfMonth(startingMonth);\n if (!fromDate) {\n return addMonths(month, -offset);\n }\n var monthsDiff = differenceInCalendarMonths(month, fromDate);\n if (monthsDiff <= 0) {\n return undefined;\n }\n // Jump back as the number of months when paged navigation\n return addMonths(month, -offset);\n}\n\n/**\n * The Navigation context shares details and methods to navigate the months in DayPicker.\n * Access this context from the {@link useNavigation} hook.\n */\nvar NavigationContext = createContext(undefined);\n/** Provides the values for the {@link NavigationContext}. */\nfunction NavigationProvider(props) {\n var dayPicker = useDayPicker();\n var _a = useNavigationState(), currentMonth = _a[0], goToMonth = _a[1];\n var displayMonths = getDisplayMonths(currentMonth, dayPicker);\n var nextMonth = getNextMonth(currentMonth, dayPicker);\n var previousMonth = getPreviousMonth(currentMonth, dayPicker);\n var isDateDisplayed = function (date) {\n return displayMonths.some(function (displayMonth) {\n return isSameMonth(date, displayMonth);\n });\n };\n var goToDate = function (date, refDate) {\n if (isDateDisplayed(date)) {\n return;\n }\n if (refDate && isBefore(date, refDate)) {\n goToMonth(addMonths(date, 1 + dayPicker.numberOfMonths * -1));\n }\n else {\n goToMonth(date);\n }\n };\n var value = {\n currentMonth: currentMonth,\n displayMonths: displayMonths,\n goToMonth: goToMonth,\n goToDate: goToDate,\n previousMonth: previousMonth,\n nextMonth: nextMonth,\n isDateDisplayed: isDateDisplayed\n };\n return (React__default.createElement(NavigationContext.Provider, { value: value }, props.children));\n}\n/**\n * Hook to access the {@link NavigationContextValue}. Use this hook to navigate\n * between months or years in DayPicker.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useNavigation() {\n var context = useContext(NavigationContext);\n if (!context) {\n throw new Error('useNavigation must be used within a NavigationProvider');\n }\n return context;\n}\n\n/**\n * Render a caption with the dropdowns to navigate between months and years.\n */\nfunction CaptionDropdowns(props) {\n var _a;\n var _b = useDayPicker(), classNames = _b.classNames, styles = _b.styles, components = _b.components;\n var goToMonth = useNavigation().goToMonth;\n var handleMonthChange = function (newMonth) {\n goToMonth(newMonth);\n };\n var CaptionLabelComponent = (_a = components === null || components === void 0 ? void 0 : components.CaptionLabel) !== null && _a !== void 0 ? _a : CaptionLabel;\n var captionLabel = (React__default.createElement(CaptionLabelComponent, { id: props.id, displayMonth: props.displayMonth }));\n return (React__default.createElement(\"div\", { className: classNames.caption_dropdowns, style: styles.caption_dropdowns },\n React__default.createElement(\"div\", { className: classNames.vhidden }, captionLabel),\n React__default.createElement(MonthsDropdown, { onChange: handleMonthChange, displayMonth: props.displayMonth }),\n React__default.createElement(YearsDropdown, { onChange: handleMonthChange, displayMonth: props.displayMonth })));\n}\n\n/**\n * Render the \"previous month\" button in the navigation.\n */\nfunction IconLeft(props) {\n return (React__default.createElement(\"svg\", __assign({ width: \"16px\", height: \"16px\", viewBox: \"0 0 120 120\" }, props),\n React__default.createElement(\"path\", { d: \"M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z\", fill: \"currentColor\", fillRule: \"nonzero\" })));\n}\n\n/**\n * Render the \"next month\" button in the navigation.\n */\nfunction IconRight(props) {\n return (React__default.createElement(\"svg\", __assign({ width: \"16px\", height: \"16px\", viewBox: \"0 0 120 120\" }, props),\n React__default.createElement(\"path\", { d: \"M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z\", fill: \"currentColor\" })));\n}\n\n/**\n * Render a button HTML element applying the reset class name.\n */\nvar Button = forwardRef(function (props, ref) {\n var _a = useDayPicker(), classNames = _a.classNames, styles = _a.styles;\n var classNamesArr = [classNames.button_reset, classNames.button];\n if (props.className) {\n classNamesArr.push(props.className);\n }\n var className = classNamesArr.join(' ');\n var style = __assign(__assign({}, styles.button_reset), styles.button);\n if (props.style) {\n Object.assign(style, props.style);\n }\n return (React__default.createElement(\"button\", __assign({}, props, { ref: ref, type: \"button\", className: className, style: style })));\n});\n\n/** A component rendering the navigation buttons or the drop-downs. */\nfunction Navigation(props) {\n var _a, _b;\n var _c = useDayPicker(), dir = _c.dir, locale = _c.locale, classNames = _c.classNames, styles = _c.styles, _d = _c.labels, labelPrevious = _d.labelPrevious, labelNext = _d.labelNext, components = _c.components;\n if (!props.nextMonth && !props.previousMonth) {\n return React__default.createElement(React__default.Fragment, null);\n }\n var previousLabel = labelPrevious(props.previousMonth, { locale: locale });\n var previousClassName = [\n classNames.nav_button,\n classNames.nav_button_previous\n ].join(' ');\n var nextLabel = labelNext(props.nextMonth, { locale: locale });\n var nextClassName = [\n classNames.nav_button,\n classNames.nav_button_next\n ].join(' ');\n var IconRightComponent = (_a = components === null || components === void 0 ? void 0 : components.IconRight) !== null && _a !== void 0 ? _a : IconRight;\n var IconLeftComponent = (_b = components === null || components === void 0 ? void 0 : components.IconLeft) !== null && _b !== void 0 ? _b : IconLeft;\n return (React__default.createElement(\"div\", { className: classNames.nav, style: styles.nav },\n !props.hidePrevious && (React__default.createElement(Button, { name: \"previous-month\", \"aria-label\": previousLabel, className: previousClassName, style: styles.nav_button_previous, disabled: !props.previousMonth, onClick: props.onPreviousClick }, dir === 'rtl' ? (React__default.createElement(IconRightComponent, { className: classNames.nav_icon, style: styles.nav_icon })) : (React__default.createElement(IconLeftComponent, { className: classNames.nav_icon, style: styles.nav_icon })))),\n !props.hideNext && (React__default.createElement(Button, { name: \"next-month\", \"aria-label\": nextLabel, className: nextClassName, style: styles.nav_button_next, disabled: !props.nextMonth, onClick: props.onNextClick }, dir === 'rtl' ? (React__default.createElement(IconLeftComponent, { className: classNames.nav_icon, style: styles.nav_icon })) : (React__default.createElement(IconRightComponent, { className: classNames.nav_icon, style: styles.nav_icon }))))));\n}\n\n/**\n * Render a caption with a button-based navigation.\n */\nfunction CaptionNavigation(props) {\n var _a;\n var _b;\n var _c = useDayPicker(), numberOfMonths = _c.numberOfMonths, dir = _c.dir, components = _c.components;\n var _d = useNavigation(), previousMonth = _d.previousMonth, nextMonth = _d.nextMonth, goToMonth = _d.goToMonth, displayMonths = _d.displayMonths;\n var displayIndex = displayMonths.findIndex(function (month) {\n return isSameMonth(props.displayMonth, month);\n });\n var isFirst = displayIndex === 0;\n var isLast = displayIndex === displayMonths.length - 1;\n if (dir === 'rtl') {\n _a = [isFirst, isLast], isLast = _a[0], isFirst = _a[1];\n }\n var hideNext = numberOfMonths > 1 && (isFirst || !isLast);\n var hidePrevious = numberOfMonths > 1 && (isLast || !isFirst);\n var handlePreviousClick = function () {\n if (!previousMonth)\n return;\n goToMonth(previousMonth);\n };\n var handleNextClick = function () {\n if (!nextMonth)\n return;\n goToMonth(nextMonth);\n };\n var CaptionLabelComponent = (_b = components === null || components === void 0 ? void 0 : components.CaptionLabel) !== null && _b !== void 0 ? _b : CaptionLabel;\n var captionLabel = (React__default.createElement(CaptionLabelComponent, { id: props.id, displayMonth: props.displayMonth }));\n return (React__default.createElement(React__default.Fragment, null,\n captionLabel,\n React__default.createElement(Navigation, { displayMonth: props.displayMonth, hideNext: hideNext, hidePrevious: hidePrevious, nextMonth: nextMonth, previousMonth: previousMonth, onPreviousClick: handlePreviousClick, onNextClick: handleNextClick })));\n}\n\n/**\n * Render the caption of a month. The caption has a different layout when\n * setting the {@link DayPickerBase.captionLayout} prop.\n */\nfunction Caption(props) {\n var _a;\n var _b = useDayPicker(), classNames = _b.classNames, disableNavigation = _b.disableNavigation, styles = _b.styles, captionLayout = _b.captionLayout, components = _b.components;\n var CaptionLabelComponent = (_a = components === null || components === void 0 ? void 0 : components.CaptionLabel) !== null && _a !== void 0 ? _a : CaptionLabel;\n var caption;\n if (disableNavigation) {\n caption = (React__default.createElement(CaptionLabelComponent, { id: props.id, displayMonth: props.displayMonth }));\n }\n else if (captionLayout === 'dropdown') {\n caption = (React__default.createElement(CaptionDropdowns, { displayMonth: props.displayMonth, id: props.id }));\n }\n else {\n caption = (React__default.createElement(CaptionNavigation, { displayMonth: props.displayMonth, id: props.id }));\n }\n return (React__default.createElement(\"div\", { className: classNames.caption, style: styles.caption }, caption));\n}\n\n/** Render the Footer component (empty as default).*/\nfunction Footer() {\n var _a = useDayPicker(), footer = _a.footer, styles = _a.styles, tfoot = _a.classNames.tfoot;\n if (!footer)\n return React__default.createElement(React__default.Fragment, null);\n return (React__default.createElement(\"tfoot\", { className: tfoot, style: styles.tfoot },\n React__default.createElement(\"tr\", null,\n React__default.createElement(\"td\", { colSpan: 8 }, footer))));\n}\n\n/**\n * Generate a series of 7 days, starting from the week, to use for formatting\n * the weekday names (Monday, Tuesday, etc.).\n */\nfunction getWeekdays(locale, \n/** The index of the first day of the week (0 - Sunday). */\nweekStartsOn, \n/** Use ISOWeek instead of locale/ */\nISOWeek) {\n var start = ISOWeek\n ? startOfISOWeek(new Date())\n : startOfWeek(new Date(), { locale: locale, weekStartsOn: weekStartsOn });\n var days = [];\n for (var i = 0; i < 7; i++) {\n var day = addDays(start, i);\n days.push(day);\n }\n return days;\n}\n\n/**\n * Render the HeadRow component - i.e. the table head row with the weekday names.\n */\nfunction HeadRow() {\n var _a = useDayPicker(), classNames = _a.classNames, styles = _a.styles, showWeekNumber = _a.showWeekNumber, locale = _a.locale, weekStartsOn = _a.weekStartsOn, ISOWeek = _a.ISOWeek, formatWeekdayName = _a.formatters.formatWeekdayName, labelWeekday = _a.labels.labelWeekday;\n var weekdays = getWeekdays(locale, weekStartsOn, ISOWeek);\n return (React__default.createElement(\"tr\", { style: styles.head_row, className: classNames.head_row },\n showWeekNumber && (React__default.createElement(\"th\", { scope: \"col\", style: styles.head_cell, className: classNames.head_cell })),\n weekdays.map(function (weekday, i) { return (React__default.createElement(\"th\", { key: i, scope: \"col\", className: classNames.head_cell, style: styles.head_cell },\n React__default.createElement(\"span\", { \"aria-hidden\": true }, formatWeekdayName(weekday, { locale: locale })),\n React__default.createElement(\"span\", { className: classNames.vhidden }, labelWeekday(weekday, { locale: locale })))); })));\n}\n\n/** Render the table head. */\nfunction Head() {\n var _a;\n var _b = useDayPicker(), classNames = _b.classNames, styles = _b.styles, components = _b.components;\n var HeadRowComponent = (_a = components === null || components === void 0 ? void 0 : components.HeadRow) !== null && _a !== void 0 ? _a : HeadRow;\n return (React__default.createElement(\"thead\", { style: styles.head, className: classNames.head },\n React__default.createElement(HeadRowComponent, null)));\n}\n\n/** Render the content of the day cell. */\nfunction DayContent(props) {\n var _a = useDayPicker(), locale = _a.locale, formatDay = _a.formatters.formatDay;\n return React__default.createElement(React__default.Fragment, null, formatDay(props.date, { locale: locale }));\n}\n\n/**\n * The SelectMultiple context shares details about the selected days when in\n * multiple selection mode.\n *\n * Access this context from the {@link useSelectMultiple} hook.\n */\nvar SelectMultipleContext = createContext(undefined);\n/** Provides the values for the {@link SelectMultipleContext}. */\nfunction SelectMultipleProvider(props) {\n if (!isDayPickerMultiple(props.initialProps)) {\n var emptyContextValue = {\n selected: undefined,\n modifiers: {\n disabled: []\n }\n };\n return (React__default.createElement(SelectMultipleContext.Provider, { value: emptyContextValue }, props.children));\n }\n return (React__default.createElement(SelectMultipleProviderInternal, { initialProps: props.initialProps, children: props.children }));\n}\nfunction SelectMultipleProviderInternal(_a) {\n var initialProps = _a.initialProps, children = _a.children;\n var selected = initialProps.selected, min = initialProps.min, max = initialProps.max;\n var onDayClick = function (day, activeModifiers, e) {\n var _a, _b;\n (_a = initialProps.onDayClick) === null || _a === void 0 ? void 0 : _a.call(initialProps, day, activeModifiers, e);\n var isMinSelected = Boolean(activeModifiers.selected && min && (selected === null || selected === void 0 ? void 0 : selected.length) === min);\n if (isMinSelected) {\n return;\n }\n var isMaxSelected = Boolean(!activeModifiers.selected && max && (selected === null || selected === void 0 ? void 0 : selected.length) === max);\n if (isMaxSelected) {\n return;\n }\n var selectedDays = selected ? __spreadArray([], selected, true) : [];\n if (activeModifiers.selected) {\n var index = selectedDays.findIndex(function (selectedDay) {\n return isSameDay(day, selectedDay);\n });\n selectedDays.splice(index, 1);\n }\n else {\n selectedDays.push(day);\n }\n (_b = initialProps.onSelect) === null || _b === void 0 ? void 0 : _b.call(initialProps, selectedDays, day, activeModifiers, e);\n };\n var modifiers = {\n disabled: []\n };\n if (selected) {\n modifiers.disabled.push(function (day) {\n var isMaxSelected = max && selected.length > max - 1;\n var isSelected = selected.some(function (selectedDay) {\n return isSameDay(selectedDay, day);\n });\n return Boolean(isMaxSelected && !isSelected);\n });\n }\n var contextValue = {\n selected: selected,\n onDayClick: onDayClick,\n modifiers: modifiers\n };\n return (React__default.createElement(SelectMultipleContext.Provider, { value: contextValue }, children));\n}\n/**\n * Hook to access the {@link SelectMultipleContextValue}.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useSelectMultiple() {\n var context = useContext(SelectMultipleContext);\n if (!context) {\n throw new Error('useSelectMultiple must be used within a SelectMultipleProvider');\n }\n return context;\n}\n\n/**\n * Add a day to an existing range.\n *\n * The returned range takes in account the `undefined` values and if the added\n * day is already present in the range.\n */\nfunction addToRange(day, range) {\n var _a = range || {}, from = _a.from, to = _a.to;\n if (!from) {\n return { from: day, to: undefined };\n }\n if (!to && isSameDay(from, day)) {\n return { from: from, to: day };\n }\n if (!to && isBefore(day, from)) {\n return { from: day, to: from };\n }\n if (!to) {\n return { from: from, to: day };\n }\n if (isSameDay(to, day) && isSameDay(from, day)) {\n return undefined;\n }\n if (isSameDay(to, day)) {\n return { from: to, to: undefined };\n }\n if (isSameDay(from, day)) {\n return undefined;\n }\n if (isAfter(from, day)) {\n return { from: day, to: to };\n }\n return { from: from, to: day };\n}\n\n/**\n * The SelectRange context shares details about the selected days when in\n * range selection mode.\n *\n * Access this context from the {@link useSelectRange} hook.\n */\nvar SelectRangeContext = createContext(undefined);\n/** Provides the values for the {@link SelectRangeProvider}. */\nfunction SelectRangeProvider(props) {\n if (!isDayPickerRange(props.initialProps)) {\n var emptyContextValue = {\n selected: undefined,\n modifiers: {\n range_start: [],\n range_end: [],\n range_middle: [],\n disabled: []\n }\n };\n return (React__default.createElement(SelectRangeContext.Provider, { value: emptyContextValue }, props.children));\n }\n return (React__default.createElement(SelectRangeProviderInternal, { initialProps: props.initialProps, children: props.children }));\n}\nfunction SelectRangeProviderInternal(_a) {\n var initialProps = _a.initialProps, children = _a.children;\n var selected = initialProps.selected;\n var _b = selected || {}, selectedFrom = _b.from, selectedTo = _b.to;\n var min = initialProps.min;\n var max = initialProps.max;\n var onDayClick = function (day, activeModifiers, e) {\n var _a, _b;\n (_a = initialProps.onDayClick) === null || _a === void 0 ? void 0 : _a.call(initialProps, day, activeModifiers, e);\n var newRange = addToRange(day, selected);\n (_b = initialProps.onSelect) === null || _b === void 0 ? void 0 : _b.call(initialProps, newRange, day, activeModifiers, e);\n };\n var modifiers = {\n range_start: [],\n range_end: [],\n range_middle: [],\n disabled: []\n };\n if (selectedFrom) {\n modifiers.range_start = [selectedFrom];\n if (!selectedTo) {\n modifiers.range_end = [selectedFrom];\n }\n else {\n modifiers.range_end = [selectedTo];\n modifiers.range_middle = [\n {\n after: selectedFrom,\n before: selectedTo\n }\n ];\n }\n }\n if (min) {\n if (selectedFrom && !selectedTo) {\n modifiers.disabled.push({\n after: subDays(selectedFrom, min - 1),\n before: addDays(selectedFrom, min - 1)\n });\n }\n if (selectedFrom && selectedTo) {\n modifiers.disabled.push({\n after: selectedFrom,\n before: addDays(selectedFrom, min - 1)\n });\n }\n }\n if (max) {\n if (selectedFrom && !selectedTo) {\n modifiers.disabled.push({\n before: addDays(selectedFrom, -max + 1)\n });\n modifiers.disabled.push({\n after: addDays(selectedFrom, max - 1)\n });\n }\n if (selectedFrom && selectedTo) {\n var selectedCount = differenceInCalendarDays(selectedTo, selectedFrom) + 1;\n var offset = max - selectedCount;\n modifiers.disabled.push({\n before: subDays(selectedFrom, offset)\n });\n modifiers.disabled.push({\n after: addDays(selectedTo, offset)\n });\n }\n }\n return (React__default.createElement(SelectRangeContext.Provider, { value: { selected: selected, onDayClick: onDayClick, modifiers: modifiers } }, children));\n}\n/**\n * Hook to access the {@link SelectRangeContextValue}.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useSelectRange() {\n var context = useContext(SelectRangeContext);\n if (!context) {\n throw new Error('useSelectRange must be used within a SelectRangeProvider');\n }\n return context;\n}\n\n/** Normalize to array a matcher input. */\nfunction matcherToArray(matcher) {\n if (Array.isArray(matcher)) {\n return matcher;\n }\n else if (matcher !== undefined) {\n return [matcher];\n }\n else {\n return [];\n }\n}\n\n/** Create CustomModifiers from dayModifiers */\nfunction getCustomModifiers(dayModifiers) {\n var customModifiers = {};\n Object.entries(dayModifiers).forEach(function (_a) {\n var modifier = _a[0], matcher = _a[1];\n customModifiers[modifier] = matcherToArray(matcher);\n });\n return customModifiers;\n}\n\n/** The name of the modifiers that are used internally by DayPicker. */\nvar InternalModifier;\n(function (InternalModifier) {\n InternalModifier[\"Outside\"] = \"outside\";\n /** Name of the modifier applied to the disabled days, using the `disabled` prop. */\n InternalModifier[\"Disabled\"] = \"disabled\";\n /** Name of the modifier applied to the selected days using the `selected` prop). */\n InternalModifier[\"Selected\"] = \"selected\";\n /** Name of the modifier applied to the hidden days using the `hidden` prop). */\n InternalModifier[\"Hidden\"] = \"hidden\";\n /** Name of the modifier applied to the day specified using the `today` prop). */\n InternalModifier[\"Today\"] = \"today\";\n /** The modifier applied to the day starting a selected range, when in range selection mode. */\n InternalModifier[\"RangeStart\"] = \"range_start\";\n /** The modifier applied to the day ending a selected range, when in range selection mode. */\n InternalModifier[\"RangeEnd\"] = \"range_end\";\n /** The modifier applied to the days between the start and the end of a selected range, when in range selection mode. */\n InternalModifier[\"RangeMiddle\"] = \"range_middle\";\n})(InternalModifier || (InternalModifier = {}));\n\nvar Selected = InternalModifier.Selected, Disabled = InternalModifier.Disabled, Hidden = InternalModifier.Hidden, Today = InternalModifier.Today, RangeEnd = InternalModifier.RangeEnd, RangeMiddle = InternalModifier.RangeMiddle, RangeStart = InternalModifier.RangeStart, Outside = InternalModifier.Outside;\n/** Return the {@link InternalModifiers} from the DayPicker and select contexts. */\nfunction getInternalModifiers(dayPicker, selectMultiple, selectRange) {\n var _a;\n var internalModifiers = (_a = {},\n _a[Selected] = matcherToArray(dayPicker.selected),\n _a[Disabled] = matcherToArray(dayPicker.disabled),\n _a[Hidden] = matcherToArray(dayPicker.hidden),\n _a[Today] = [dayPicker.today],\n _a[RangeEnd] = [],\n _a[RangeMiddle] = [],\n _a[RangeStart] = [],\n _a[Outside] = [],\n _a);\n if (dayPicker.fromDate) {\n internalModifiers[Disabled].push({ before: dayPicker.fromDate });\n }\n if (dayPicker.toDate) {\n internalModifiers[Disabled].push({ after: dayPicker.toDate });\n }\n if (isDayPickerMultiple(dayPicker)) {\n internalModifiers[Disabled] = internalModifiers[Disabled].concat(selectMultiple.modifiers[Disabled]);\n }\n else if (isDayPickerRange(dayPicker)) {\n internalModifiers[Disabled] = internalModifiers[Disabled].concat(selectRange.modifiers[Disabled]);\n internalModifiers[RangeStart] = selectRange.modifiers[RangeStart];\n internalModifiers[RangeMiddle] = selectRange.modifiers[RangeMiddle];\n internalModifiers[RangeEnd] = selectRange.modifiers[RangeEnd];\n }\n return internalModifiers;\n}\n\n/** The Modifiers context store the modifiers used in DayPicker. To access the value of this context, use {@link useModifiers}. */\nvar ModifiersContext = createContext(undefined);\n/** Provide the value for the {@link ModifiersContext}. */\nfunction ModifiersProvider(props) {\n var dayPicker = useDayPicker();\n var selectMultiple = useSelectMultiple();\n var selectRange = useSelectRange();\n var internalModifiers = getInternalModifiers(dayPicker, selectMultiple, selectRange);\n var customModifiers = getCustomModifiers(dayPicker.modifiers);\n var modifiers = __assign(__assign({}, internalModifiers), customModifiers);\n return (React__default.createElement(ModifiersContext.Provider, { value: modifiers }, props.children));\n}\n/**\n * Return the modifiers used by DayPicker.\n *\n * This hook is meant to be used inside internal or custom components.\n * Requires to be wrapped into {@link ModifiersProvider}.\n *\n */\nfunction useModifiers() {\n var context = useContext(ModifiersContext);\n if (!context) {\n throw new Error('useModifiers must be used within a ModifiersProvider');\n }\n return context;\n}\n\n/** Returns true if `matcher` is of type {@link DateInterval}. */\nfunction isDateInterval(matcher) {\n return Boolean(matcher &&\n typeof matcher === 'object' &&\n 'before' in matcher &&\n 'after' in matcher);\n}\n/** Returns true if `value` is a {@link DateRange} type. */\nfunction isDateRange(value) {\n return Boolean(value && typeof value === 'object' && 'from' in value);\n}\n/** Returns true if `value` is of type {@link DateAfter}. */\nfunction isDateAfterType(value) {\n return Boolean(value && typeof value === 'object' && 'after' in value);\n}\n/** Returns true if `value` is of type {@link DateBefore}. */\nfunction isDateBeforeType(value) {\n return Boolean(value && typeof value === 'object' && 'before' in value);\n}\n/** Returns true if `value` is a {@link DayOfWeek} type. */\nfunction isDayOfWeekType(value) {\n return Boolean(value && typeof value === 'object' && 'dayOfWeek' in value);\n}\n\n/** Return `true` whether `date` is inside `range`. */\nfunction isDateInRange(date, range) {\n var _a;\n var from = range.from, to = range.to;\n if (!from) {\n return false;\n }\n if (!to && isSameDay(from, date)) {\n return true;\n }\n if (!to) {\n return false;\n }\n var isToBeforeFrom = differenceInCalendarDays(to, from) < 0;\n if (to && isToBeforeFrom) {\n _a = [to, from], from = _a[0], to = _a[1];\n }\n return (differenceInCalendarDays(date, from) >= 0 &&\n differenceInCalendarDays(to, date) >= 0);\n}\n\n/** Returns true if `value` is a Date type. */\nfunction isDateType(value) {\n return isDate(value);\n}\n/** Returns true if `value` is an array of valid dates. */\nfunction isArrayOfDates(value) {\n return Array.isArray(value) && value.every(isDate);\n}\n/**\n * Returns whether a day matches against at least one of the given Matchers.\n *\n * ```\n * const day = new Date(2022, 5, 19);\n * const matcher1: DateRange = {\n * from: new Date(2021, 12, 21),\n * to: new Date(2021, 12, 30)\n * }\n * const matcher2: DateRange = {\n * from: new Date(2022, 5, 1),\n * to: new Date(2022, 5, 23)\n * }\n *\n * const isMatch(day, [matcher1, matcher2]); // true, since day is in the matcher1 range.\n * ```\n * */\nfunction isMatch(day, matchers) {\n return matchers.some(function (matcher) {\n if (typeof matcher === 'boolean') {\n return matcher;\n }\n if (isDateType(matcher)) {\n return isSameDay(day, matcher);\n }\n if (isArrayOfDates(matcher)) {\n return matcher.includes(day);\n }\n if (isDateRange(matcher)) {\n return isDateInRange(day, matcher);\n }\n if (isDayOfWeekType(matcher)) {\n return matcher.dayOfWeek.includes(day.getDay());\n }\n if (isDateInterval(matcher)) {\n var diffBefore = differenceInCalendarDays(matcher.before, day);\n var diffAfter = differenceInCalendarDays(matcher.after, day);\n var isDayBefore = diffBefore > 0;\n var isDayAfter = diffAfter < 0;\n var isClosedInterval = isAfter$1(matcher.before, matcher.after);\n if (isClosedInterval) {\n return isDayAfter && isDayBefore;\n }\n else {\n return isDayBefore || isDayAfter;\n }\n }\n if (isDateAfterType(matcher)) {\n return differenceInCalendarDays(day, matcher.after) > 0;\n }\n if (isDateBeforeType(matcher)) {\n return differenceInCalendarDays(matcher.before, day) > 0;\n }\n if (typeof matcher === 'function') {\n return matcher(day);\n }\n return false;\n });\n}\n\n/** Return the active modifiers for the given day. */\nfunction getActiveModifiers(day, \n/** The modifiers to match for the given date. */\nmodifiers, \n/** The month where the day is displayed, to add the \"outside\" modifiers. */\ndisplayMonth) {\n var matchedModifiers = Object.keys(modifiers).reduce(function (result, key) {\n var modifier = modifiers[key];\n if (isMatch(day, modifier)) {\n result.push(key);\n }\n return result;\n }, []);\n var activeModifiers = {};\n matchedModifiers.forEach(function (modifier) { return (activeModifiers[modifier] = true); });\n if (displayMonth && !isSameMonth(day, displayMonth)) {\n activeModifiers.outside = true;\n }\n return activeModifiers;\n}\n\n/**\n * Returns the day that should be the target of the focus when DayPicker is\n * rendered the first time.\n *\n * TODO: this function doesn't consider if the day is outside the month. We\n * implemented this check in `useDayRender` but it should probably go here. See\n * https://github.com/gpbl/react-day-picker/pull/1576\n */\nfunction getInitialFocusTarget(displayMonths, modifiers) {\n var firstDayInMonth = startOfMonth(displayMonths[0]);\n var lastDayInMonth = endOfMonth(displayMonths[displayMonths.length - 1]);\n // TODO: cleanup code\n var firstFocusableDay;\n var today;\n var date = firstDayInMonth;\n while (date <= lastDayInMonth) {\n var activeModifiers = getActiveModifiers(date, modifiers);\n var isFocusable = !activeModifiers.disabled && !activeModifiers.hidden;\n if (!isFocusable) {\n date = addDays(date, 1);\n continue;\n }\n if (activeModifiers.selected) {\n return date;\n }\n if (activeModifiers.today && !today) {\n today = date;\n }\n if (!firstFocusableDay) {\n firstFocusableDay = date;\n }\n date = addDays(date, 1);\n }\n if (today) {\n return today;\n }\n else {\n return firstFocusableDay;\n }\n}\n\nvar MAX_RETRY = 365;\n/** Return the next date to be focused. */\nfunction getNextFocus(focusedDay, options) {\n var moveBy = options.moveBy, direction = options.direction, context = options.context, modifiers = options.modifiers, _a = options.retry, retry = _a === void 0 ? { count: 0, lastFocused: focusedDay } : _a;\n var weekStartsOn = context.weekStartsOn, fromDate = context.fromDate, toDate = context.toDate, locale = context.locale;\n var moveFns = {\n day: addDays,\n week: addWeeks,\n month: addMonths,\n year: addYears,\n startOfWeek: function (date) {\n return context.ISOWeek\n ? startOfISOWeek(date)\n : startOfWeek(date, { locale: locale, weekStartsOn: weekStartsOn });\n },\n endOfWeek: function (date) {\n return context.ISOWeek\n ? endOfISOWeek(date)\n : endOfWeek(date, { locale: locale, weekStartsOn: weekStartsOn });\n }\n };\n var newFocusedDay = moveFns[moveBy](focusedDay, direction === 'after' ? 1 : -1);\n if (direction === 'before' && fromDate) {\n newFocusedDay = max([fromDate, newFocusedDay]);\n }\n else if (direction === 'after' && toDate) {\n newFocusedDay = min([toDate, newFocusedDay]);\n }\n var isFocusable = true;\n if (modifiers) {\n var activeModifiers = getActiveModifiers(newFocusedDay, modifiers);\n isFocusable = !activeModifiers.disabled && !activeModifiers.hidden;\n }\n if (isFocusable) {\n return newFocusedDay;\n }\n else {\n if (retry.count > MAX_RETRY) {\n return retry.lastFocused;\n }\n return getNextFocus(newFocusedDay, {\n moveBy: moveBy,\n direction: direction,\n context: context,\n modifiers: modifiers,\n retry: __assign(__assign({}, retry), { count: retry.count + 1 })\n });\n }\n}\n\n/**\n * The Focus context shares details about the focused day for the keyboard\n *\n * Access this context from the {@link useFocusContext} hook.\n */\nvar FocusContext = createContext(undefined);\n/** The provider for the {@link FocusContext}. */\nfunction FocusProvider(props) {\n var navigation = useNavigation();\n var modifiers = useModifiers();\n var _a = useState(), focusedDay = _a[0], setFocusedDay = _a[1];\n var _b = useState(), lastFocused = _b[0], setLastFocused = _b[1];\n var initialFocusTarget = getInitialFocusTarget(navigation.displayMonths, modifiers);\n // TODO: cleanup and test obscure code below\n var focusTarget = (focusedDay !== null && focusedDay !== void 0 ? focusedDay : (lastFocused && navigation.isDateDisplayed(lastFocused)))\n ? lastFocused\n : initialFocusTarget;\n var blur = function () {\n setLastFocused(focusedDay);\n setFocusedDay(undefined);\n };\n var focus = function (date) {\n setFocusedDay(date);\n };\n var context = useDayPicker();\n var moveFocus = function (moveBy, direction) {\n if (!focusedDay)\n return;\n var nextFocused = getNextFocus(focusedDay, {\n moveBy: moveBy,\n direction: direction,\n context: context,\n modifiers: modifiers\n });\n if (isSameDay(focusedDay, nextFocused))\n return undefined;\n navigation.goToDate(nextFocused, focusedDay);\n focus(nextFocused);\n };\n var value = {\n focusedDay: focusedDay,\n focusTarget: focusTarget,\n blur: blur,\n focus: focus,\n focusDayAfter: function () { return moveFocus('day', 'after'); },\n focusDayBefore: function () { return moveFocus('day', 'before'); },\n focusWeekAfter: function () { return moveFocus('week', 'after'); },\n focusWeekBefore: function () { return moveFocus('week', 'before'); },\n focusMonthBefore: function () { return moveFocus('month', 'before'); },\n focusMonthAfter: function () { return moveFocus('month', 'after'); },\n focusYearBefore: function () { return moveFocus('year', 'before'); },\n focusYearAfter: function () { return moveFocus('year', 'after'); },\n focusStartOfWeek: function () { return moveFocus('startOfWeek', 'before'); },\n focusEndOfWeek: function () { return moveFocus('endOfWeek', 'after'); }\n };\n return (React__default.createElement(FocusContext.Provider, { value: value }, props.children));\n}\n/**\n * Hook to access the {@link FocusContextValue}. Use this hook to handle the\n * focus state of the elements.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useFocusContext() {\n var context = useContext(FocusContext);\n if (!context) {\n throw new Error('useFocusContext must be used within a FocusProvider');\n }\n return context;\n}\n\n/**\n * Return the active modifiers for the specified day.\n *\n * This hook is meant to be used inside internal or custom components.\n *\n * @param day\n * @param displayMonth\n */\nfunction useActiveModifiers(day, \n/**\n * The month where the date is displayed. If not the same as `date`, the day\n * is an \"outside day\".\n */\ndisplayMonth) {\n var modifiers = useModifiers();\n var activeModifiers = getActiveModifiers(day, modifiers, displayMonth);\n return activeModifiers;\n}\n\n/**\n * The SelectSingle context shares details about the selected days when in\n * single selection mode.\n *\n * Access this context from the {@link useSelectSingle} hook.\n */\nvar SelectSingleContext = createContext(undefined);\n/** Provides the values for the {@link SelectSingleProvider}. */\nfunction SelectSingleProvider(props) {\n if (!isDayPickerSingle(props.initialProps)) {\n var emptyContextValue = {\n selected: undefined\n };\n return (React__default.createElement(SelectSingleContext.Provider, { value: emptyContextValue }, props.children));\n }\n return (React__default.createElement(SelectSingleProviderInternal, { initialProps: props.initialProps, children: props.children }));\n}\nfunction SelectSingleProviderInternal(_a) {\n var initialProps = _a.initialProps, children = _a.children;\n var onDayClick = function (day, activeModifiers, e) {\n var _a, _b, _c;\n (_a = initialProps.onDayClick) === null || _a === void 0 ? void 0 : _a.call(initialProps, day, activeModifiers, e);\n if (activeModifiers.selected && !initialProps.required) {\n (_b = initialProps.onSelect) === null || _b === void 0 ? void 0 : _b.call(initialProps, undefined, day, activeModifiers, e);\n return;\n }\n (_c = initialProps.onSelect) === null || _c === void 0 ? void 0 : _c.call(initialProps, day, day, activeModifiers, e);\n };\n var contextValue = {\n selected: initialProps.selected,\n onDayClick: onDayClick\n };\n return (React__default.createElement(SelectSingleContext.Provider, { value: contextValue }, children));\n}\n/**\n * Hook to access the {@link SelectSingleContextValue}.\n *\n * This hook is meant to be used inside internal or custom components.\n */\nfunction useSelectSingle() {\n var context = useContext(SelectSingleContext);\n if (!context) {\n throw new Error('useSelectSingle must be used within a SelectSingleProvider');\n }\n return context;\n}\n\n/**\n * This hook returns details about the content to render in the day cell.\n *\n *\n * When a day cell is rendered in the table, DayPicker can either:\n *\n * - render nothing: when the day is outside the month or has matched the\n * \"hidden\" modifier.\n * - render a button when `onDayClick` or a selection mode is set.\n * - render a non-interactive element: when no selection mode is set, the day\n * cell shouldn’t respond to any interaction. DayPicker should render a `div`\n * or a `span`.\n *\n * ### Usage\n *\n * Use this hook to customize the behavior of the {@link Day} component. Create a\n * new `Day` component using this hook and pass it to the `components` prop.\n * The source of {@link Day} can be a good starting point.\n *\n */\nfunction useDayEventHandlers(date, activeModifiers) {\n var dayPicker = useDayPicker();\n var single = useSelectSingle();\n var multiple = useSelectMultiple();\n var range = useSelectRange();\n var _a = useFocusContext(), focusDayAfter = _a.focusDayAfter, focusDayBefore = _a.focusDayBefore, focusWeekAfter = _a.focusWeekAfter, focusWeekBefore = _a.focusWeekBefore, blur = _a.blur, focus = _a.focus, focusMonthBefore = _a.focusMonthBefore, focusMonthAfter = _a.focusMonthAfter, focusYearBefore = _a.focusYearBefore, focusYearAfter = _a.focusYearAfter, focusStartOfWeek = _a.focusStartOfWeek, focusEndOfWeek = _a.focusEndOfWeek;\n var onClick = function (e) {\n var _a, _b, _c, _d;\n if (isDayPickerSingle(dayPicker)) {\n (_a = single.onDayClick) === null || _a === void 0 ? void 0 : _a.call(single, date, activeModifiers, e);\n }\n else if (isDayPickerMultiple(dayPicker)) {\n (_b = multiple.onDayClick) === null || _b === void 0 ? void 0 : _b.call(multiple, date, activeModifiers, e);\n }\n else if (isDayPickerRange(dayPicker)) {\n (_c = range.onDayClick) === null || _c === void 0 ? void 0 : _c.call(range, date, activeModifiers, e);\n }\n else {\n (_d = dayPicker.onDayClick) === null || _d === void 0 ? void 0 : _d.call(dayPicker, date, activeModifiers, e);\n }\n };\n var onFocus = function (e) {\n var _a;\n focus(date);\n (_a = dayPicker.onDayFocus) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onBlur = function (e) {\n var _a;\n blur();\n (_a = dayPicker.onDayBlur) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onMouseEnter = function (e) {\n var _a;\n (_a = dayPicker.onDayMouseEnter) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onMouseLeave = function (e) {\n var _a;\n (_a = dayPicker.onDayMouseLeave) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchCancel = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchCancel) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchEnd = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchEnd) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchMove = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchMove) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onTouchStart = function (e) {\n var _a;\n (_a = dayPicker.onDayTouchStart) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onKeyUp = function (e) {\n var _a;\n (_a = dayPicker.onDayKeyUp) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var onKeyDown = function (e) {\n var _a;\n switch (e.key) {\n case 'ArrowLeft':\n e.preventDefault();\n e.stopPropagation();\n dayPicker.dir === 'rtl' ? focusDayAfter() : focusDayBefore();\n break;\n case 'ArrowRight':\n e.preventDefault();\n e.stopPropagation();\n dayPicker.dir === 'rtl' ? focusDayBefore() : focusDayAfter();\n break;\n case 'ArrowDown':\n e.preventDefault();\n e.stopPropagation();\n focusWeekAfter();\n break;\n case 'ArrowUp':\n e.preventDefault();\n e.stopPropagation();\n focusWeekBefore();\n break;\n case 'PageUp':\n e.preventDefault();\n e.stopPropagation();\n e.shiftKey ? focusYearBefore() : focusMonthBefore();\n break;\n case 'PageDown':\n e.preventDefault();\n e.stopPropagation();\n e.shiftKey ? focusYearAfter() : focusMonthAfter();\n break;\n case 'Home':\n e.preventDefault();\n e.stopPropagation();\n focusStartOfWeek();\n break;\n case 'End':\n e.preventDefault();\n e.stopPropagation();\n focusEndOfWeek();\n break;\n }\n (_a = dayPicker.onDayKeyDown) === null || _a === void 0 ? void 0 : _a.call(dayPicker, date, activeModifiers, e);\n };\n var eventHandlers = {\n onClick: onClick,\n onFocus: onFocus,\n onBlur: onBlur,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onTouchCancel: onTouchCancel,\n onTouchEnd: onTouchEnd,\n onTouchMove: onTouchMove,\n onTouchStart: onTouchStart\n };\n return eventHandlers;\n}\n\n/**\n * Return the current selected days when DayPicker is in selection mode. Days\n * selected by the custom selection mode are not returned.\n *\n * This hook is meant to be used inside internal or custom components.\n *\n */\nfunction useSelectedDays() {\n var dayPicker = useDayPicker();\n var single = useSelectSingle();\n var multiple = useSelectMultiple();\n var range = useSelectRange();\n var selectedDays = isDayPickerSingle(dayPicker)\n ? single.selected\n : isDayPickerMultiple(dayPicker)\n ? multiple.selected\n : isDayPickerRange(dayPicker)\n ? range.selected\n : undefined;\n return selectedDays;\n}\n\nfunction isInternalModifier(modifier) {\n return Object.values(InternalModifier).includes(modifier);\n}\n/**\n * Return the class names for the Day element, according to the given active\n * modifiers.\n *\n * Custom class names are set via `modifiersClassNames` or `classNames`,\n * where the first have the precedence.\n */\nfunction getDayClassNames(dayPicker, activeModifiers) {\n var classNames = [dayPicker.classNames.day];\n Object.keys(activeModifiers).forEach(function (modifier) {\n var customClassName = dayPicker.modifiersClassNames[modifier];\n if (customClassName) {\n classNames.push(customClassName);\n }\n else if (isInternalModifier(modifier)) {\n var internalClassName = dayPicker.classNames[\"day_\".concat(modifier)];\n if (internalClassName) {\n classNames.push(internalClassName);\n }\n }\n });\n return classNames;\n}\n\n/** Return the style for the Day element, according to the given active modifiers. */\nfunction getDayStyle(dayPicker, activeModifiers) {\n var style = __assign({}, dayPicker.styles.day);\n Object.keys(activeModifiers).forEach(function (modifier) {\n var _a;\n style = __assign(__assign({}, style), (_a = dayPicker.modifiersStyles) === null || _a === void 0 ? void 0 : _a[modifier]);\n });\n return style;\n}\n\n/**\n * Return props and data used to render the {@link Day} component.\n *\n * Use this hook when creating a component to replace the built-in `Day`\n * component.\n */\nfunction useDayRender(\n/** The date to render. */\nday, \n/** The month where the date is displayed (if not the same as `date`, it means it is an \"outside\" day). */\ndisplayMonth, \n/** A ref to the button element that will be target of focus when rendered (if required). */\nbuttonRef) {\n var _a;\n var _b, _c;\n var dayPicker = useDayPicker();\n var focusContext = useFocusContext();\n var activeModifiers = useActiveModifiers(day, displayMonth);\n var eventHandlers = useDayEventHandlers(day, activeModifiers);\n var selectedDays = useSelectedDays();\n var isButton = Boolean(dayPicker.onDayClick || dayPicker.mode !== 'default');\n // Focus the button if the day is focused according to the focus context\n useEffect(function () {\n var _a;\n if (activeModifiers.outside)\n return;\n if (!focusContext.focusedDay)\n return;\n if (!isButton)\n return;\n if (isSameDay(focusContext.focusedDay, day)) {\n (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n }, [\n focusContext.focusedDay,\n day,\n buttonRef,\n isButton,\n activeModifiers.outside\n ]);\n var className = getDayClassNames(dayPicker, activeModifiers).join(' ');\n var style = getDayStyle(dayPicker, activeModifiers);\n var ariaLabel = dayPicker.labels.labelDay(day, activeModifiers, {\n locale: dayPicker.locale\n });\n var isHidden = Boolean((activeModifiers.outside && !dayPicker.showOutsideDays) ||\n activeModifiers.hidden);\n var DayContentComponent = (_c = (_b = dayPicker.components) === null || _b === void 0 ? void 0 : _b.DayContent) !== null && _c !== void 0 ? _c : DayContent;\n var children = (React__default.createElement(DayContentComponent, { date: day, displayMonth: displayMonth, activeModifiers: activeModifiers }));\n var divProps = {\n style: style,\n className: className,\n children: children,\n 'aria-label': ariaLabel\n };\n var isFocusTarget = focusContext.focusTarget &&\n isSameDay(focusContext.focusTarget, day) &&\n !activeModifiers.outside;\n var buttonProps = __assign(__assign(__assign({}, divProps), (_a = { disabled: activeModifiers.disabled }, _a['aria-pressed'] = activeModifiers.selected, _a['aria-label'] = ariaLabel, _a.tabIndex = isFocusTarget ? 0 : -1, _a)), eventHandlers);\n var dayRender = {\n isButton: isButton,\n isHidden: isHidden,\n activeModifiers: activeModifiers,\n selectedDays: selectedDays,\n buttonProps: buttonProps,\n divProps: divProps\n };\n return dayRender;\n}\n\n/**\n * The content of a day cell – as a button or span element according to its\n * modifiers.\n */\nfunction Day(props) {\n var buttonRef = useRef(null);\n var dayRender = useDayRender(props.date, props.displayMonth, buttonRef);\n if (dayRender.isHidden) {\n return React__default.createElement(React__default.Fragment, null);\n }\n if (!dayRender.isButton) {\n return React__default.createElement(\"div\", __assign({}, dayRender.divProps));\n }\n return React__default.createElement(Button, __assign({ name: \"day\", ref: buttonRef }, dayRender.buttonProps));\n}\n\n/**\n * Render the week number element. If `onWeekNumberClick` is passed to DayPicker, it\n * renders a button, otherwise a span element.\n */\nfunction WeekNumber(props) {\n var weekNumber = props.number, dates = props.dates;\n var _a = useDayPicker(), onWeekNumberClick = _a.onWeekNumberClick, styles = _a.styles, classNames = _a.classNames, locale = _a.locale, labelWeekNumber = _a.labels.labelWeekNumber, formatWeekNumber = _a.formatters.formatWeekNumber;\n var content = formatWeekNumber(Number(weekNumber), { locale: locale });\n if (!onWeekNumberClick) {\n return (React__default.createElement(\"span\", { className: classNames.weeknumber, style: styles.weeknumber }, content));\n }\n var label = labelWeekNumber(Number(weekNumber), { locale: locale });\n var handleClick = function (e) {\n onWeekNumberClick(weekNumber, dates, e);\n };\n return (React__default.createElement(Button, { name: \"week-number\", \"aria-label\": label, className: classNames.weeknumber, style: styles.weeknumber, onClick: handleClick }, content));\n}\n\n/** Render a row in the calendar, with the days and the week number. */\nfunction Row(props) {\n var _a, _b;\n var _c = useDayPicker(), styles = _c.styles, classNames = _c.classNames, showWeekNumber = _c.showWeekNumber, components = _c.components;\n var DayComponent = (_a = components === null || components === void 0 ? void 0 : components.Day) !== null && _a !== void 0 ? _a : Day;\n var WeeknumberComponent = (_b = components === null || components === void 0 ? void 0 : components.WeekNumber) !== null && _b !== void 0 ? _b : WeekNumber;\n var weekNumberCell;\n if (showWeekNumber) {\n weekNumberCell = (React__default.createElement(\"td\", { className: classNames.cell, style: styles.cell },\n React__default.createElement(WeeknumberComponent, { number: props.weekNumber, dates: props.dates })));\n }\n return (React__default.createElement(\"tr\", { className: classNames.row, style: styles.row },\n weekNumberCell,\n props.dates.map(function (date) { return (React__default.createElement(\"td\", { className: classNames.cell, style: styles.cell, key: getUnixTime(date) },\n React__default.createElement(DayComponent, { displayMonth: props.displayMonth, date: date }))); })));\n}\n\n/** Return the weeks between two dates. */\nfunction daysToMonthWeeks(fromDate, toDate, options) {\n var toWeek = (options === null || options === void 0 ? void 0 : options.ISOWeek)\n ? endOfISOWeek(toDate)\n : endOfWeek(toDate, options);\n var fromWeek = (options === null || options === void 0 ? void 0 : options.ISOWeek)\n ? startOfISOWeek(fromDate)\n : startOfWeek(fromDate, options);\n var nOfDays = differenceInCalendarDays(toWeek, fromWeek);\n var days = [];\n for (var i = 0; i <= nOfDays; i++) {\n days.push(addDays(fromWeek, i));\n }\n var weeksInMonth = days.reduce(function (result, date) {\n var weekNumber = (options === null || options === void 0 ? void 0 : options.ISOWeek)\n ? getISOWeek(date)\n : getWeek(date, options);\n var existingWeek = result.find(function (value) { return value.weekNumber === weekNumber; });\n if (existingWeek) {\n existingWeek.dates.push(date);\n return result;\n }\n result.push({\n weekNumber: weekNumber,\n dates: [date]\n });\n return result;\n }, []);\n return weeksInMonth;\n}\n\n/**\n * Return the weeks belonging to the given month, adding the \"outside days\" to\n * the first and last week.\n */\nfunction getMonthWeeks(month, options) {\n var weeksInMonth = daysToMonthWeeks(startOfMonth(month), endOfMonth(month), options);\n if (options === null || options === void 0 ? void 0 : options.useFixedWeeks) {\n // Add extra weeks to the month, up to 6 weeks\n var nrOfMonthWeeks = getWeeksInMonth(month, options);\n if (nrOfMonthWeeks < 6) {\n var lastWeek = weeksInMonth[weeksInMonth.length - 1];\n var lastDate = lastWeek.dates[lastWeek.dates.length - 1];\n var toDate = addWeeks(lastDate, 6 - nrOfMonthWeeks);\n var extraWeeks = daysToMonthWeeks(addWeeks(lastDate, 1), toDate, options);\n weeksInMonth.push.apply(weeksInMonth, extraWeeks);\n }\n }\n return weeksInMonth;\n}\n\n/** Render the table with the calendar. */\nfunction Table(props) {\n var _a, _b, _c;\n var _d = useDayPicker(), locale = _d.locale, classNames = _d.classNames, styles = _d.styles, hideHead = _d.hideHead, fixedWeeks = _d.fixedWeeks, components = _d.components, weekStartsOn = _d.weekStartsOn, firstWeekContainsDate = _d.firstWeekContainsDate, ISOWeek = _d.ISOWeek;\n var weeks = getMonthWeeks(props.displayMonth, {\n useFixedWeeks: Boolean(fixedWeeks),\n ISOWeek: ISOWeek,\n locale: locale,\n weekStartsOn: weekStartsOn,\n firstWeekContainsDate: firstWeekContainsDate\n });\n var HeadComponent = (_a = components === null || components === void 0 ? void 0 : components.Head) !== null && _a !== void 0 ? _a : Head;\n var RowComponent = (_b = components === null || components === void 0 ? void 0 : components.Row) !== null && _b !== void 0 ? _b : Row;\n var FooterComponent = (_c = components === null || components === void 0 ? void 0 : components.Footer) !== null && _c !== void 0 ? _c : Footer;\n return (React__default.createElement(\"table\", { className: classNames.table, style: styles.table, role: \"grid\", \"aria-labelledby\": props['aria-labelledby'] },\n !hideHead && React__default.createElement(HeadComponent, null),\n React__default.createElement(\"tbody\", { className: classNames.tbody, style: styles.tbody }, weeks.map(function (week) { return (React__default.createElement(RowComponent, { displayMonth: props.displayMonth, key: week.weekNumber, dates: week.dates, weekNumber: week.weekNumber })); })),\n React__default.createElement(FooterComponent, null)));\n}\n\n/*\nThe MIT License (MIT)\n\nCopyright (c) 2018-present, React Training LLC\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\nfunction canUseDOM() {\n return !!(typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement);\n}\n/**\n * React currently throws a warning when using useLayoutEffect on the server. To\n * get around it, we can conditionally useEffect on the server (no-op) and\n * useLayoutEffect in the browser. We occasionally need useLayoutEffect to\n * ensure we don't get a render flash for certain operations, but we may also\n * need affected components to render on the server. One example is when setting\n * a component's descendants to retrieve their index values.\n *\n * Important to note that using this hook as an escape hatch will break the\n * eslint dependency warnings unless you rename the import to `useLayoutEffect`.\n * Use sparingly only when the effect won't effect the rendered HTML to avoid\n * any server/client mismatch.\n *\n * If a useLayoutEffect is needed and the result would create a mismatch, it's\n * likely that the component in question shouldn't be rendered on the server at\n * all, so a better approach would be to lazily render those in a parent\n * component after client-side hydration.\n *\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\n *\n * @param effect\n * @param deps\n */\nvar useIsomorphicLayoutEffect = canUseDOM()\n ? React.useLayoutEffect\n : React.useEffect;\nvar serverHandoffComplete = false;\nvar id = 0;\nfunction genId() {\n return \"react-day-picker-\".concat(++id);\n}\nfunction useId(providedId) {\n // TODO: Remove error flag when updating internal deps to React 18. None of\n // our tricks will play well with concurrent rendering anyway.\n var _a;\n // If this instance isn't part of the initial render, we don't have to do the\n // double render/patch-up dance. We can just generate the ID and return it.\n var initialId = providedId !== null && providedId !== void 0 ? providedId : (serverHandoffComplete ? genId() : null);\n var _b = React.useState(initialId), id = _b[0], setId = _b[1];\n useIsomorphicLayoutEffect(function () {\n if (id === null) {\n // Patch the ID after render. We do this in `useLayoutEffect` to avoid any\n // rendering flicker, though it'll make the first render slower (unlikely\n // to matter, but you're welcome to measure your app and let us know if\n // it's a problem).\n setId(genId());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(function () {\n if (serverHandoffComplete === false) {\n // Flag all future uses of `useId` to skip the update dance. This is in\n // `useEffect` because it goes after `useLayoutEffect`, ensuring we don't\n // accidentally bail out of the patch-up dance prematurely.\n serverHandoffComplete = true;\n }\n }, []);\n return (_a = providedId !== null && providedId !== void 0 ? providedId : id) !== null && _a !== void 0 ? _a : undefined;\n}\n\n/** Render a month. */\nfunction Month(props) {\n var _a;\n var _b;\n var dayPicker = useDayPicker();\n var dir = dayPicker.dir, classNames = dayPicker.classNames, styles = dayPicker.styles, components = dayPicker.components;\n var displayMonths = useNavigation().displayMonths;\n var captionId = useId(dayPicker.id ? \"\".concat(dayPicker.id, \"-\").concat(props.displayIndex) : undefined);\n var className = [classNames.month];\n var style = styles.month;\n var isStart = props.displayIndex === 0;\n var isEnd = props.displayIndex === displayMonths.length - 1;\n var isCenter = !isStart && !isEnd;\n if (dir === 'rtl') {\n _a = [isStart, isEnd], isEnd = _a[0], isStart = _a[1];\n }\n if (isStart) {\n className.push(classNames.caption_start);\n style = __assign(__assign({}, style), styles.caption_start);\n }\n if (isEnd) {\n className.push(classNames.caption_end);\n style = __assign(__assign({}, style), styles.caption_end);\n }\n if (isCenter) {\n className.push(classNames.caption_between);\n style = __assign(__assign({}, style), styles.caption_between);\n }\n var CaptionComponent = (_b = components === null || components === void 0 ? void 0 : components.Caption) !== null && _b !== void 0 ? _b : Caption;\n return (React__default.createElement(\"div\", { key: props.displayIndex, className: className.join(' '), style: style },\n React__default.createElement(CaptionComponent, { id: captionId, displayMonth: props.displayMonth }),\n React__default.createElement(Table, { \"aria-labelledby\": captionId, displayMonth: props.displayMonth })));\n}\n\n/** Render the container with the months according to the number of months to display. */\nfunction Root() {\n var dayPicker = useDayPicker();\n var focusContext = useFocusContext();\n var navigation = useNavigation();\n var _a = useState(false), hasInitialFocus = _a[0], setHasInitialFocus = _a[1];\n // Focus the focus target when initialFocus is passed in\n useEffect(function () {\n if (!dayPicker.initialFocus)\n return;\n if (!focusContext.focusTarget)\n return;\n if (hasInitialFocus)\n return;\n focusContext.focus(focusContext.focusTarget);\n setHasInitialFocus(true);\n }, [\n dayPicker.initialFocus,\n hasInitialFocus,\n focusContext.focus,\n focusContext.focusTarget,\n focusContext\n ]);\n // Apply classnames according to props\n var classNames = [dayPicker.classNames.root, dayPicker.className];\n if (dayPicker.numberOfMonths > 1) {\n classNames.push(dayPicker.classNames.multiple_months);\n }\n if (dayPicker.showWeekNumber) {\n classNames.push(dayPicker.classNames.with_weeknumber);\n }\n var style = __assign(__assign({}, dayPicker.styles.root), dayPicker.style);\n return (React__default.createElement(\"div\", { className: classNames.join(' '), style: style, dir: dayPicker.dir },\n React__default.createElement(\"div\", { className: dayPicker.classNames.months, style: dayPicker.styles.months }, navigation.displayMonths.map(function (month, i) { return (React__default.createElement(Month, { key: i, displayIndex: i, displayMonth: month })); }))));\n}\n\n/** Provide the value for all the context providers. */\nfunction RootProvider(props) {\n var children = props.children, initialProps = __rest(props, [\"children\"]);\n return (React__default.createElement(DayPickerProvider, { initialProps: initialProps },\n React__default.createElement(NavigationProvider, null,\n React__default.createElement(SelectSingleProvider, { initialProps: initialProps },\n React__default.createElement(SelectMultipleProvider, { initialProps: initialProps },\n React__default.createElement(SelectRangeProvider, { initialProps: initialProps },\n React__default.createElement(ModifiersProvider, null,\n React__default.createElement(FocusProvider, null, children))))))));\n}\n\n/**\n * DayPicker render a date picker component to let users pick dates from a\n * calendar. See http://react-day-picker.js.org for updated documentation and\n * examples.\n *\n * ### Customization\n *\n * DayPicker offers different customization props. For example,\n *\n * - show multiple months using `numberOfMonths`\n * - display a dropdown to navigate the months via `captionLayout`\n * - display the week numbers with `showWeekNumbers`\n * - disable or hide days with `disabled` or `hidden`\n *\n * ### Controlling the months\n *\n * Change the initially displayed month using the `defaultMonth` prop. The\n * displayed months are controlled by DayPicker and stored in its internal\n * state. To control the months yourself, use `month` instead of `defaultMonth`\n * and use the `onMonthChange` event to set it.\n *\n * To limit the months the user can navigate to, use\n * `fromDate`/`fromMonth`/`fromYear` or `toDate`/`toMonth`/`toYear`.\n *\n * ### Selection modes\n *\n * DayPicker supports different selection mode that can be toggled using the\n * `mode` prop:\n *\n * - `mode=\"single\"`: only one day can be selected. Use `required` to make the\n * selection required. Use the `onSelect` event handler to get the selected\n * days.\n * - `mode=\"multiple\"`: users can select one or more days. Limit the amount of\n * days that can be selected with the `min` or the `max` props.\n * - `mode=\"range\"`: users can select a range of days. Limit the amount of days\n * in the range with the `min` or the `max` props.\n * - `mode=\"default\"` (default): the built-in selections are disabled. Implement\n * your own selection mode with `onDayClick`.\n *\n * The selection modes should cover the most common use cases. In case you\n * need a more refined way of selecting days, use `mode=\"default\"`. Use the\n * `selected` props and add the day event handlers to add/remove days from the\n * selection.\n *\n * ### Modifiers\n *\n * A _modifier_ represents different styles or states for the days displayed in\n * the calendar (like \"selected\" or \"disabled\"). Define custom modifiers using\n * the `modifiers` prop.\n *\n * ### Formatters and custom component\n *\n * You can customize how the content is displayed in the date picker by using\n * either the formatters or replacing the internal components.\n *\n * For the most common cases you want to use the `formatters` prop to change how\n * the content is formatted in the calendar. Use the `components` prop to\n * replace the internal components, like the navigation icons.\n *\n * ### Styling\n *\n * DayPicker comes with a default, basic style in `react-day-picker/style` – use\n * it as template for your own style.\n *\n * If you are using CSS modules, pass the imported styles object the\n * `classNames` props.\n *\n * You can also style the elements via inline-styles using the `styles` prop.\n *\n * ### Form fields\n *\n * If you need to bind the date picker to a form field, you can use the\n * `useInput` hooks for a basic behavior. See the `useInput` source as an\n * example to bind the date picker with form fields.\n *\n * ### Localization\n *\n * To localize DayPicker, import the locale from `date-fns` package and use the\n * `locale` prop.\n *\n * For example, to use Spanish locale:\n *\n * ```\n * import es from 'date-fns/locale/es';\n * \n * ```\n */\nfunction DayPicker(props) {\n return (React__default.createElement(RootProvider, __assign({}, props),\n React__default.createElement(Root, null)));\n}\n\n/** @private */\nfunction isValidDate(day) {\n return !isNaN(day.getTime());\n}\n\n/** Return props and setters for binding an input field to DayPicker. */\nfunction useInput(options) {\n if (options === void 0) { options = {}; }\n var _a = options.locale, locale = _a === void 0 ? enUS : _a, required = options.required, _b = options.format, format$1 = _b === void 0 ? 'PP' : _b, defaultSelected = options.defaultSelected, _c = options.today, today = _c === void 0 ? new Date() : _c;\n var _d = parseFromToProps(options), fromDate = _d.fromDate, toDate = _d.toDate;\n // Shortcut to the DateFns functions\n var parseValue = function (value) { return parse(value, format$1, today, { locale: locale }); };\n // Initialize states\n var _e = useState(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : today), month = _e[0], setMonth = _e[1];\n var _f = useState(defaultSelected), selectedDay = _f[0], setSelectedDay = _f[1];\n var defaultInputValue = defaultSelected\n ? format(defaultSelected, format$1, { locale: locale })\n : '';\n var _g = useState(defaultInputValue), inputValue = _g[0], setInputValue = _g[1];\n var reset = function () {\n setSelectedDay(defaultSelected);\n setMonth(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : today);\n setInputValue(defaultInputValue !== null && defaultInputValue !== void 0 ? defaultInputValue : '');\n };\n var setSelected = function (date) {\n setSelectedDay(date);\n setMonth(date !== null && date !== void 0 ? date : today);\n setInputValue(date ? format(date, format$1, { locale: locale }) : '');\n };\n var handleDayClick = function (day, _a) {\n var selected = _a.selected;\n if (!required && selected) {\n setSelectedDay(undefined);\n setInputValue('');\n return;\n }\n setSelectedDay(day);\n setInputValue(day ? format(day, format$1, { locale: locale }) : '');\n };\n var handleMonthChange = function (month) {\n setMonth(month);\n };\n // When changing the input field, save its value in state and check if the\n // string is a valid date. If it is a valid day, set it as selected and update\n // the calendar’s month.\n var handleChange = function (e) {\n setInputValue(e.target.value);\n var day = parseValue(e.target.value);\n var isBefore = fromDate && differenceInCalendarDays(fromDate, day) > 0;\n var isAfter = toDate && differenceInCalendarDays(day, toDate) > 0;\n if (!isValidDate(day) || isBefore || isAfter) {\n setSelectedDay(undefined);\n return;\n }\n setSelectedDay(day);\n setMonth(day);\n };\n // Special case for _required_ fields: on blur, if the value of the input is not\n // a valid date, reset the calendar and the input value.\n var handleBlur = function (e) {\n var day = parseValue(e.target.value);\n if (!isValidDate(day)) {\n reset();\n }\n };\n // When focusing, make sure DayPicker visualizes the month of the date in the\n // input field.\n var handleFocus = function (e) {\n if (!e.target.value) {\n reset();\n return;\n }\n var day = parseValue(e.target.value);\n if (isValidDate(day)) {\n setMonth(day);\n }\n };\n var dayPickerProps = {\n month: month,\n onDayClick: handleDayClick,\n onMonthChange: handleMonthChange,\n selected: selectedDay,\n locale: locale,\n fromDate: fromDate,\n toDate: toDate,\n today: today\n };\n var inputProps = {\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus,\n value: inputValue,\n placeholder: format(new Date(), format$1, { locale: locale })\n };\n return { dayPickerProps: dayPickerProps, inputProps: inputProps, reset: reset, setSelected: setSelected };\n}\n\n/** Returns true when the props are of type {@link DayPickerDefaultProps}. */\nfunction isDayPickerDefault(props) {\n return props.mode === undefined || props.mode === 'default';\n}\n\nexport { Button, Caption, CaptionDropdowns, CaptionLabel, CaptionNavigation, Day, DayContent, DayPicker, DayPickerContext, DayPickerProvider, Dropdown, FocusContext, FocusProvider, Footer, Head, HeadRow, IconDropdown, IconLeft, IconRight, InternalModifier, NavigationContext, NavigationProvider, RootProvider, Row, SelectMultipleContext, SelectMultipleProvider, SelectMultipleProviderInternal, SelectRangeContext, SelectRangeProvider, SelectRangeProviderInternal, SelectSingleContext, SelectSingleProvider, SelectSingleProviderInternal, WeekNumber, addToRange, isDateAfterType, isDateBeforeType, isDateInterval, isDateRange, isDayOfWeekType, isDayPickerDefault, isDayPickerMultiple, isDayPickerRange, isDayPickerSingle, isMatch, useActiveModifiers, useDayPicker, useDayRender, useFocusContext, useInput, useNavigation, useSelectMultiple, useSelectRange, useSelectSingle };\n//# sourceMappingURL=index.esm.js.map\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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nexport const ErrorSummaryItem = forwardRef((_a, ref) => {\n var { children, as: Component = \"a\", className } = _a, rest = __rest(_a, [\"children\", \"as\", \"className\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(className, \"navds-error-summary__item\", \"navds-link\") }), children));\n});\nexport default ErrorSummaryItem;\n//# sourceMappingURL=ErrorSummaryItem.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nimport { Heading, BodyShort } from \"../..\";\nimport ErrorSummaryItem from \"./ErrorSummaryItem\";\nimport { useId } from \"../../util\";\nexport const ErrorSummary = forwardRef((_a, ref) => {\n var { children, className, size = \"medium\", headingTag = \"h2\", heading } = _a, rest = __rest(_a, [\"children\", \"className\", \"size\", \"headingTag\", \"heading\"]);\n const headingId = useId();\n return (React.createElement(\"section\", Object.assign({ ref: ref }, rest, { className: cl(className, \"navds-error-summary\", `navds-error-summary--${size}`), tabIndex: -1, \"aria-live\": \"polite\", \"aria-relevant\": \"all\", \"aria-labelledby\": headingId }),\n React.createElement(Heading, { className: \"navds-error-summary__heading\", as: headingTag, size: \"small\", id: headingId }, heading),\n React.createElement(BodyShort, { as: \"ul\", size: size, className: \"navds-error-summary__list\" }, React.Children.map(children, (child) => {\n return React.createElement(\"li\", { key: child === null || child === void 0 ? void 0 : child.toString() }, child);\n }))));\n});\nErrorSummary.Item = ErrorSummaryItem;\nexport default ErrorSummary;\n//# sourceMappingURL=ErrorSummary.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, useEffect, useState, } from \"react\";\nimport { BodyShort, Detail, Loader, omit } from \"..\";\nimport { useFormField } from \"./useFormField\";\nconst SelectedIcon = () => (React.createElement(\"svg\", { width: \"12px\", height: \"12px\", viewBox: \"0 0 12 12\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", focusable: false, role: \"img\", \"aria-hidden\": true, \"aria-label\": \"Deaktiver valg\" },\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M4.01386 8L10.25 2L11 2.75L4.01386 9.5L1 6.5L1.75 5.75L4.01386 8Z\", fill: \"currentColor\", stroke: \"currentColor\" })));\nexport const Switch = forwardRef((props, ref) => {\n var _a, _b, _c;\n const { inputProps, size } = useFormField(props, \"switch\");\n const { children, className, description, hideLabel = false, loading, checked: checkedProp, defaultChecked, position = \"left\" } = props, rest = __rest(props, [\"children\", \"className\", \"description\", \"hideLabel\", \"loading\", \"checked\", \"defaultChecked\", \"position\"]);\n const Description = size === \"medium\" ? BodyShort : Detail;\n const [checked, setChecked] = useState((_a = defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : checkedProp) !== null && _a !== void 0 ? _a : false);\n useEffect(() => {\n checkedProp !== undefined && setChecked(checkedProp);\n }, [checkedProp]);\n const handleChange = (e) => {\n setChecked(e.target.checked);\n props.onChange && props.onChange(e);\n };\n return (React.createElement(\"div\", { className: cl(\"navds-switch\", props.className, `navds-switch--${size}`, `navds-switch--${position}`, {\n \"navds-switch--loading\": loading,\n \"navds-switch--disabled\": (_b = inputProps.disabled) !== null && _b !== void 0 ? _b : loading,\n }) },\n React.createElement(\"input\", Object.assign({}, omit(rest, [\"size\"]), omit(inputProps, [\"aria-invalid\", \"aria-describedby\"]), { disabled: (_c = inputProps.disabled) !== null && _c !== void 0 ? _c : loading, checked: checkedProp, defaultChecked: defaultChecked, ref: ref, type: \"checkbox\", onChange: (e) => handleChange(e), className: cl(className, \"navds-switch__input\") })),\n React.createElement(\"span\", { className: \"navds-switch__track\" },\n React.createElement(\"span\", { className: \"navds-switch__thumb\" }, loading ? (React.createElement(Loader, { size: \"xsmall\", \"aria-live\": \"polite\" })) : checked ? (React.createElement(SelectedIcon, null)) : null)),\n React.createElement(\"label\", { htmlFor: inputProps.id, className: \"navds-switch__label-wrapper\" },\n React.createElement(\"div\", { className: cl(\"navds-switch__content\", {\n \"navds-sr-only\": hideLabel,\n \"navds-switch--with-description\": !!description && !hideLabel,\n }) },\n React.createElement(BodyShort, { as: \"div\", size: size, className: \"navds-switch__label\" }, children),\n description && (React.createElement(Description, { as: \"div\", size: \"small\", className: \"navds-switch__description\" }, description))))));\n});\nexport default Switch;\n//# sourceMappingURL=Switch.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};\n/* https://github.com/mui/material-ui/blob/master/packages/mui-base/src/TextareaAutosize/TextareaAutosize.js */\nimport React, { forwardRef, useEffect, useMemo, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { debounce, mergeRefs, useClientLayoutEffect } from \"..\";\n/**\n * https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/ownerDocument.ts\n * https://github.com/mui/material-ui/blob/master/packages/mui-utils/src/ownerWindow.ts\n */\nconst ownerWindow = (node) => {\n const doc = (node && node.ownerDocument) || document;\n return doc.defaultView || window;\n};\nfunction getStyleValue(computedStyle, property) {\n return parseInt(computedStyle[property], 10) || 0;\n}\nconst TextareaAutosize = forwardRef((_a, ref) => {\n var { className, onChange, maxRows, minRows = 1, style, value } = _a, other = __rest(_a, [\"className\", \"onChange\", \"maxRows\", \"minRows\", \"style\", \"value\"]);\n const { current: isControlled } = useRef(value != null);\n const inputRef = useRef(null);\n const handleRef = useMemo(() => mergeRefs([inputRef, ref]), [ref]);\n const shadowRef = useRef(null);\n const renders = useRef(0);\n const [state, setState] = useState({});\n const getUpdatedState = React.useCallback(() => {\n if (!inputRef.current || !shadowRef.current)\n return;\n const input = inputRef.current;\n const containerWindow = ownerWindow(input);\n const computedStyle = containerWindow.getComputedStyle(input);\n // If input's width is shrunk and it's not visible, don't sync height.\n if (computedStyle.width === \"0px\") {\n return;\n }\n const inputShallow = shadowRef.current;\n inputShallow.style.width = computedStyle.width;\n inputShallow.value = input.value || (other === null || other === void 0 ? void 0 : other.placeholder) || \"x\";\n if (inputShallow.value.slice(-1) === \"\\n\") {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n inputShallow.value += \" \";\n }\n const boxSizing = computedStyle[\"box-sizing\"];\n const padding = getStyleValue(computedStyle, \"padding-bottom\") +\n getStyleValue(computedStyle, \"padding-top\");\n const border = getStyleValue(computedStyle, \"border-bottom-width\") +\n getStyleValue(computedStyle, \"border-top-width\");\n // The height of the inner content\n const innerHeight = inputShallow.scrollHeight - padding;\n // Measure height of a textarea with a single row\n inputShallow.value = \"x\";\n const singleRowHeight = inputShallow.scrollHeight - padding;\n // The height of the outer content\n let outerHeight = innerHeight;\n if (minRows) {\n outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n }\n if (maxRows) {\n outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n }\n outerHeight = Math.max(outerHeight, singleRowHeight);\n // Take the box sizing into account for applying this value as a style.\n const outerHeightStyle = outerHeight + (boxSizing === \"border-box\" ? padding + border : 0);\n const overflow = Math.abs(outerHeight - innerHeight) <= 1;\n return { outerHeightStyle, overflow };\n }, [maxRows, minRows, other === null || other === void 0 ? void 0 : other.placeholder]);\n const syncHeight = React.useCallback(() => {\n const newState = getUpdatedState();\n if (isEmpty(newState)) {\n return;\n }\n setState((prevState) => {\n return updateState(prevState, newState);\n });\n }, [getUpdatedState]);\n const updateState = (prevState, newState) => {\n const { outerHeightStyle, overflow } = newState;\n // Need a large enough difference to update the height.\n // This prevents infinite rendering loop.\n if (renders.current < 20 &&\n ((outerHeightStyle > 0 &&\n Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1) ||\n prevState.overflow !== overflow)) {\n renders.current += 1;\n return {\n overflow,\n outerHeightStyle,\n };\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (renders.current === 20) {\n console.error([\n \"Textarea: Too many re-renders. The layout is unstable.\",\n \"TextareaAutosize limits the number of renders to prevent an infinite loop.\",\n ].join(\"\\n\"));\n }\n }\n return prevState;\n };\n const withFlushSync = () => {\n const newState = getUpdatedState();\n if (isEmpty(newState)) {\n return;\n }\n // In React 18, state updates in a ResizeObserver's callback are happening after the paint which causes flickering\n // when doing some visual updates in it. Using flushSync ensures that the dom will be painted after the states updates happen\n // Related issue - https://github.com/facebook/react/issues/24331\n ReactDOM.flushSync(() => {\n setState((prevState) => {\n return updateState(prevState, newState);\n });\n });\n };\n React.useEffect(() => {\n const handleResize = debounce(() => {\n renders.current = 0;\n if (inputRef.current) {\n withFlushSync();\n }\n });\n let resizeObserver;\n const input = inputRef.current;\n const containerWindow = ownerWindow(input);\n containerWindow.addEventListener(\"resize\", handleResize);\n if (typeof ResizeObserver !== \"undefined\") {\n resizeObserver = new ResizeObserver(handleResize);\n resizeObserver.observe(input);\n }\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener(\"resize\", handleResize);\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n });\n useClientLayoutEffect(() => {\n syncHeight();\n });\n useEffect(() => {\n renders.current = 0;\n }, [value]);\n const handleChange = (event) => {\n renders.current = 0;\n if (!isControlled) {\n syncHeight();\n }\n if (onChange) {\n onChange(event);\n }\n };\n return (React.createElement(React.Fragment, null,\n React.createElement(\"textarea\", Object.assign({ value: value, onChange: handleChange, ref: handleRef, \n // Apply the rows prop to get a \"correct\" first SSR paint\n rows: minRows, style: Object.assign(Object.assign({ height: state.outerHeightStyle }, (state.overflow ? { overflow: \"hidden\" } : {})), style) }, other, { className: className })),\n React.createElement(\"textarea\", { \"aria-hidden\": true, className: className, readOnly: true, ref: shadowRef, tabIndex: -1, style: Object.assign({ \n // Visibility needed to hide the extra text area on iPads\n visibility: \"hidden\", \n // Remove from the content flow\n position: \"absolute\", \n // Ignore the scrollbar width\n overflow: \"hidden\", height: 0, top: 0, left: 0, \n // Create a new layer, increase the isolation of the computed values\n transform: \"translateZ(0)\" }, style) })));\n});\nfunction isEmpty(obj) {\n return (obj === undefined ||\n obj === null ||\n Object.keys(obj).length === 0 ||\n ((obj === null || obj === void 0 ? void 0 : obj.outerHeightStyle) === 0 && !(obj === null || obj === void 0 ? void 0 : obj.overflow)));\n}\nexport default TextareaAutosize;\n//# sourceMappingURL=TextareaAutoSize.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 React, { forwardRef, useState } from \"react\";\nimport cl from \"clsx\";\nimport { BodyShort, BodyLong, Label, ErrorMessage, omit, Detail } from \"..\";\nimport { useFormField } from \"./useFormField\";\nimport { useId } from \"..\";\nimport TextareaAutosize from \"../util/TextareaAutoSize\";\nexport const Textarea = forwardRef((props, ref) => {\n var _a, _b, _c;\n const { inputProps, errorId, showErrorMsg, hasError, size, inputDescriptionId, } = useFormField(props, \"textarea\");\n const { label, className, description, maxLength, hideLabel = false, resize } = props, rest = __rest(props, [\"label\", \"className\", \"description\", \"maxLength\", \"hideLabel\", \"resize\"]);\n const maxLengthId = useId();\n const hasMaxLength = maxLength !== undefined && maxLength > 0;\n const [controlledValue, setControlledValue] = useState((_a = props === null || props === void 0 ? void 0 : props.defaultValue) !== null && _a !== void 0 ? _a : \"\");\n const getMinRows = () => {\n let rows = (rest === null || rest === void 0 ? void 0 : rest.minRows) ? rest === null || rest === void 0 ? void 0 : rest.minRows : 3;\n if (size === \"small\") {\n rows = (rest === null || rest === void 0 ? void 0 : rest.minRows) ? rest === null || rest === void 0 ? void 0 : rest.minRows : 2;\n }\n return rows;\n };\n const describedBy = cl(inputProps[\"aria-describedby\"], {\n [maxLengthId !== null && maxLengthId !== void 0 ? maxLengthId : \"\"]: hasMaxLength,\n });\n return (React.createElement(\"div\", { className: cl(className, \"navds-form-field\", `navds-form-field--${size}`, {\n \"navds-form-field--disabled\": !!inputProps.disabled,\n \"navds-textarea--error\": hasError,\n \"navds-textarea--resize\": resize,\n }) },\n React.createElement(Label, { htmlFor: inputProps.id, size: size, className: cl(\"navds-form-field__label\", {\n \"navds-sr-only\": hideLabel,\n }) }, label),\n !!description && (React.createElement(React.Fragment, null, size === \"medium\" ? (React.createElement(BodyLong, { className: cl(\"navds-form-field__description\", {\n \"navds-sr-only\": hideLabel,\n }), id: inputDescriptionId, size: \"small\", as: \"div\" }, description)) : (React.createElement(Detail, { className: cl(\"navds-form-field__description\", {\n \"navds-sr-only\": hideLabel,\n }), id: inputDescriptionId, size: \"small\", as: \"div\" }, description)))),\n React.createElement(\"div\", { className: \"navds-textarea__wrapper\" },\n React.createElement(TextareaAutosize, Object.assign({}, omit(rest, [\"error\", \"errorId\", \"size\"]), inputProps, { onChange: (e) => props.onChange\n ? props.onChange(e)\n : setControlledValue(e.target.value), minRows: getMinRows(), ref: ref, className: cl(\"navds-textarea__input\", \"navds-body-short\", `navds-body-${size !== null && size !== void 0 ? size : \"medium\"}`, {\n \"navds-textarea--counter\": hasMaxLength,\n }) }, (describedBy ? { \"aria-describedby\": describedBy } : {}))),\n hasMaxLength && (React.createElement(React.Fragment, null,\n React.createElement(\"span\", { id: maxLengthId, className: \"navds-sr-only\" },\n \"Tekstomr\\u00E5de med plass til \",\n maxLength,\n \" tegn.\"),\n React.createElement(Counter, { maxLength: maxLength, currentLength: (_c = (_b = props.value) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : controlledValue === null || controlledValue === void 0 ? void 0 : controlledValue.length, size: size })))),\n React.createElement(\"div\", { className: \"navds-form-field__error\", id: errorId, \"aria-relevant\": \"additions removals\", \"aria-live\": \"polite\" }, showErrorMsg && (React.createElement(ErrorMessage, { size: size }, props.error)))));\n});\nexport const Counter = ({ maxLength, currentLength, size }) => {\n const difference = maxLength - currentLength;\n return (React.createElement(BodyShort, { className: cl(\"navds-textarea__counter\", {\n \"navds-textarea__counter--error\": difference < 0,\n }), \"aria-live\": difference < 20 ? \"polite\" : \"off\", size: size }, difference < 0\n ? `Antall tegn for mye ${Math.abs(difference)}`\n : `Antall tegn igjen ${difference}`));\n};\nexport default Textarea;\n//# sourceMappingURL=Textarea.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nimport { BodyLong, Detail, Label, ErrorMessage, omit } from \"..\";\nimport { useFormField } from \"./useFormField\";\nexport const TextField = forwardRef((props, ref) => {\n const { inputProps, errorId, showErrorMsg, hasError, size, inputDescriptionId, } = useFormField(props, \"textField\");\n const { label, className, description, htmlSize, hideLabel = false, type = \"text\" } = props, rest = __rest(props, [\"label\", \"className\", \"description\", \"htmlSize\", \"hideLabel\", \"type\"]);\n return (React.createElement(\"div\", { className: cl(className, \"navds-form-field\", `navds-form-field--${size}`, {\n \"navds-text-field--error\": hasError,\n \"navds-text-field--disabled\": !!inputProps.disabled,\n \"navds-form-field--disabled\": !!inputProps.disabled,\n }) },\n React.createElement(Label, { htmlFor: inputProps.id, size: size, className: cl(\"navds-form-field__label\", {\n \"navds-sr-only\": hideLabel,\n }) }, label),\n !!description && (React.createElement(React.Fragment, null, size === \"medium\" ? (React.createElement(BodyLong, { className: cl(\"navds-form-field__description\", {\n \"navds-sr-only\": hideLabel,\n }), id: inputDescriptionId, size: \"small\", as: \"div\" }, description)) : (React.createElement(Detail, { className: cl(\"navds-form-field__description\", {\n \"navds-sr-only\": hideLabel,\n }), id: inputDescriptionId, size: \"small\", as: \"div\" }, description)))),\n React.createElement(\"input\", Object.assign({}, omit(rest, [\"error\", \"errorId\", \"size\"]), inputProps, { ref: ref, type: type, className: cl(\"navds-text-field__input\", \"navds-body-short\", `navds-body-${size !== null && size !== void 0 ? size : \"medium\"}`), size: htmlSize })),\n React.createElement(\"div\", { className: \"navds-form-field__error\", id: errorId, \"aria-relevant\": \"additions removals\", \"aria-live\": \"polite\" }, showErrorMsg && (React.createElement(ErrorMessage, { size: size }, props.error)))));\n});\nexport default TextField;\n//# sourceMappingURL=TextField.js.map","import parse from \"date-fns/parse\";\nimport isBefore from \"date-fns/isBefore\";\nimport sub from \"date-fns/sub\";\nimport { isValidDate } from \".\";\nexport const INPUT_DATE_STRING_FORMAT_DATE = \"dd.MM.yyyy\";\nexport const INPUT_DATE_STRING_FORMAT_MONTH = \"MMMM yyyy\";\nconst ALLOWED_INPUT_FORMATS_DATE = [\n INPUT_DATE_STRING_FORMAT_DATE,\n \"ddMMyyyy\",\n \"dd/MM/yyyy\",\n \"dd-MM-yyyy\",\n];\nconst ALLOWED_INPUT_FORMATS_MONTH = [\n \"M/yyyy\",\n \"MM/yyyy\",\n \"M-yyyy\",\n \"MM-yyyy\",\n \"MM.yyyy\",\n INPUT_DATE_STRING_FORMAT_MONTH,\n ...ALLOWED_INPUT_FORMATS_DATE,\n];\nexport const parseDate = (date, today, locale, type, allowTwoDigitYear) => {\n let parsed;\n const ALLOWED_FORMATS = type === \"date\" ? ALLOWED_INPUT_FORMATS_DATE : ALLOWED_INPUT_FORMATS_MONTH;\n if (allowTwoDigitYear) {\n for (const format of ALLOWED_FORMATS) {\n parsed = parse(date, format, today, { locale });\n if (isValidDate(parsed) &&\n !isTwoDigitYear(date, today, locale, ALLOWED_FORMATS)) {\n return parsed;\n }\n }\n for (const format of [\n ...ALLOWED_FORMATS.map((x) => x.replace(\"yyyy\", \"yy\")),\n ]) {\n parsed = parse(date, format, today, { locale });\n if (isValidDate(parsed) &&\n isTwoDigitYear(date, today, locale, ALLOWED_FORMATS)) {\n const convertedDate = assignCenturyToDate(date, format, today, locale);\n if (isValidDate(new Date(convertedDate))) {\n return new Date(convertedDate);\n }\n else {\n return new Date(\"Invalid date\");\n }\n }\n }\n return new Date(\"Invalid date\");\n }\n else {\n for (const format of ALLOWED_FORMATS) {\n parsed = parse(date, format, today, { locale });\n if (isValidDate(parsed) &&\n !isTwoDigitYear(date, today, locale, ALLOWED_FORMATS)) {\n return parsed;\n }\n }\n return new Date(\"Invalid date\");\n }\n};\nfunction isTwoDigitYear(dateString, today, locale, formats) {\n let parsed;\n const newFormat = formats.map((x) => x.replace(\"yyyy\", \"yy\"));\n for (const format of newFormat) {\n parsed = parse(dateString, format, today, { locale });\n if (isValidDate(parsed)) {\n return true;\n }\n }\n return false;\n}\nfunction assignCenturyToDate(dateStr, format, today, locale) {\n const date20Century = parse(appendCenturyToTwoYearDigitDateString(dateStr, \"19\"), format.replace(\"yy\", \"yyyy\"), today, { locale });\n const date21Century = parse(appendCenturyToTwoYearDigitDateString(dateStr, \"20\"), format.replace(\"yy\", \"yyyy\"), today, { locale });\n if (isValidDate(date20Century) && isValidDate(date21Century)) {\n return isBefore(date20Century, sub(new Date(), {\n years: 80,\n }))\n ? date21Century\n : date20Century;\n }\n return new Date(\"Invalid date\");\n}\nfunction appendCenturyToTwoYearDigitDateString(dateString, century) {\n const twoDigitYear = dateString.slice(-2);\n return `${dateString.slice(0, dateString.length - 2)}${century}${twoDigitYear}`;\n}\n//# sourceMappingURL=parse-date.js.map","import format from \"date-fns/format\";\nimport { INPUT_DATE_STRING_FORMAT_DATE, INPUT_DATE_STRING_FORMAT_MONTH, } from \"./parse-date\";\nexport const formatDateForInput = (date, locale, type, inputFormat) => {\n const INPUT_DATE_STRING_FORMAT = inputFormat !== null && inputFormat !== void 0 ? inputFormat : (type === \"date\"\n ? INPUT_DATE_STRING_FORMAT_DATE\n : INPUT_DATE_STRING_FORMAT_MONTH);\n return format(date, INPUT_DATE_STRING_FORMAT, { locale });\n};\n//# sourceMappingURL=format-date.js.map","import isSameYear from \"date-fns/isSameYear\";\nimport setMonth from \"date-fns/setMonth\";\nimport setYear from \"date-fns/setYear\";\nimport startOfMonth from \"date-fns/startOfMonth\";\nimport startOfYear from \"date-fns/startOfYear\";\nexport const getMonths = (start, end, current) => {\n const dropdownMonths = [];\n if (isSameYear(start, end)) {\n const date = startOfMonth(start);\n for (let month = start.getMonth(); month <= end.getMonth(); month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n else if (isSameYear(current, end)) {\n const date = startOfMonth(new Date());\n for (let month = 0; month <= end.getMonth(); month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n else if (isSameYear(current, start)) {\n const date = startOfMonth(start);\n for (let month = date.getMonth(); month <= 11; month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n else {\n const date = startOfMonth(new Date());\n for (let month = 0; month <= 11; month++) {\n dropdownMonths.push(setMonth(date, month));\n }\n }\n return dropdownMonths;\n};\nexport const getYears = (start, end) => {\n const years = [];\n const fromYear = start.getFullYear();\n const toYear = end.getFullYear();\n for (let year = fromYear; year <= toYear; year++) {\n years.push(setYear(startOfYear(new Date()), year));\n }\n return years;\n};\n//# sourceMappingURL=get-dates.js.map","const labelNext = (date, options) => {\n var _a;\n switch ((_a = options === null || options === void 0 ? void 0 : options.locale) === null || _a === void 0 ? void 0 : _a.code) {\n case \"nb\":\n return \"Gå til neste måned\";\n case \"nn\":\n return \"Gå til neste månad\";\n case \"en\":\n return \"Go to next month\";\n default:\n return \"Gå til neste måned\";\n }\n};\nconst labelPrevious = (date, options) => {\n var _a;\n switch ((_a = options === null || options === void 0 ? void 0 : options.locale) === null || _a === void 0 ? void 0 : _a.code) {\n case \"nb\":\n return \"Gå til forrige måned\";\n case \"nn\":\n return \"Gå til førre månad\";\n case \"en\":\n return \"Go to previous month\";\n default:\n return \"Gå til forrige måned\";\n }\n};\nexport const labelYearDropdown = (locale) => {\n switch (locale === null || locale === void 0 ? void 0 : locale.code) {\n case \"nb\":\n return \"År\";\n case \"nn\":\n return \"År\";\n case \"en\":\n return \"Year\";\n default:\n return \"År\";\n }\n};\nexport const labelMonthDropdown = (locale) => {\n switch (locale === null || locale === void 0 ? void 0 : locale.code) {\n case \"nb\":\n return \"Måned\";\n case \"nn\":\n return \"Månad\";\n case \"en\":\n return \"Month\";\n default:\n return \"Måned\";\n }\n};\nexport const labelNextYear = (localeCode) => {\n switch (localeCode) {\n case \"nb\":\n return \"Gå til neste år\";\n case \"nn\":\n return \"Gå til neste år\";\n case \"en-GB\":\n return \"Go to next year\";\n default:\n return \"Gå til neste måned\";\n }\n};\nexport const labelPrevYear = (localeCode) => {\n switch (localeCode) {\n case \"nb\":\n return \"Gå til forrige år\";\n case \"nn\":\n return \"Gå til førre år\";\n case \"en-GB\":\n return \"Go to next year\";\n default:\n return \"Gå til neste år\";\n }\n};\nexport const labels = {\n labelNext,\n labelPrevious,\n};\n//# sourceMappingURL=labels.js.map","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE, d MMMM yyyy',\n long: 'd MMMM yyyy',\n medium: 'd MMM yyyy',\n short: 'dd/MM/yyyy'\n};\nvar timeFormats = {\n full: 'HH:mm:ss zzzz',\n long: 'HH:mm:ss z',\n medium: 'HH:mm:ss',\n short: 'HH:mm'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: '{{date}}, {{time}}',\n short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","import formatDistance from \"../en-US/_lib/formatDistance/index.js\";\nimport formatRelative from \"../en-US/_lib/formatRelative/index.js\";\nimport localize from \"../en-US/_lib/localize/index.js\";\nimport match from \"../en-US/_lib/match/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United Kingdom).\n * @language English\n * @iso-639-2 eng\n * @author Alex [@glintik]{@link https://github.com/glintik}\n */\n\nvar locale = {\n code: 'en-GB',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1\n /* Monday */\n ,\n firstWeekContainsDate: 4\n }\n};\nexport default locale;","var formatDistanceLocale = {\n lessThanXSeconds: {\n one: 'mindre enn ett sekund',\n other: 'mindre enn {{count}} sekunder'\n },\n xSeconds: {\n one: 'ett sekund',\n other: '{{count}} sekunder'\n },\n halfAMinute: 'et halvt minutt',\n lessThanXMinutes: {\n one: 'mindre enn ett minutt',\n other: 'mindre enn {{count}} minutter'\n },\n xMinutes: {\n one: 'ett minutt',\n other: '{{count}} minutter'\n },\n aboutXHours: {\n one: 'omtrent en time',\n other: 'omtrent {{count}} timer'\n },\n xHours: {\n one: 'en time',\n other: '{{count}} timer'\n },\n xDays: {\n one: 'en dag',\n other: '{{count}} dager'\n },\n aboutXWeeks: {\n one: 'omtrent en uke',\n other: 'omtrent {{count}} uker'\n },\n xWeeks: {\n one: 'en uke',\n other: '{{count}} uker'\n },\n aboutXMonths: {\n one: 'omtrent en måned',\n other: 'omtrent {{count}} måneder'\n },\n xMonths: {\n one: 'en måned',\n other: '{{count}} måneder'\n },\n aboutXYears: {\n one: 'omtrent ett år',\n other: 'omtrent {{count}} år'\n },\n xYears: {\n one: 'ett år',\n other: '{{count}} år'\n },\n overXYears: {\n one: 'over ett år',\n other: 'over {{count}} år'\n },\n almostXYears: {\n one: 'nesten ett år',\n other: 'nesten {{count}} år'\n }\n};\n\nvar formatDistance = function formatDistance(token, count, options) {\n var result;\n var tokenValue = formatDistanceLocale[token];\n\n if (typeof tokenValue === 'string') {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace('{{count}}', String(count));\n }\n\n if (options !== null && options !== void 0 && options.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return 'om ' + result;\n } else {\n return result + ' siden';\n }\n }\n\n return result;\n};\n\nexport default formatDistance;","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n full: 'EEEE d. MMMM y',\n long: 'd. MMMM y',\n medium: 'd. MMM y',\n short: 'dd.MM.y'\n};\nvar timeFormats = {\n full: \"'kl'. HH:mm:ss zzzz\",\n long: 'HH:mm:ss z',\n medium: 'HH:mm:ss',\n short: 'HH:mm'\n};\nvar dateTimeFormats = {\n full: \"{{date}} 'kl.' {{time}}\",\n long: \"{{date}} 'kl.' {{time}}\",\n medium: '{{date}} {{time}}',\n short: '{{date}} {{time}}'\n};\nvar formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: 'full'\n }),\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: 'full'\n }),\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: 'full'\n })\n};\nexport default formatLong;","var formatRelativeLocale = {\n lastWeek: \"'forrige' eeee 'kl.' p\",\n yesterday: \"'i går kl.' p\",\n today: \"'i dag kl.' p\",\n tomorrow: \"'i morgen kl.' p\",\n nextWeek: \"EEEE 'kl.' p\",\n other: 'P'\n};\n\nvar formatRelative = function formatRelative(token, _date, _baseDate, _options) {\n return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n narrow: ['f.Kr.', 'e.Kr.'],\n abbreviated: ['f.Kr.', 'e.Kr.'],\n wide: ['før Kristus', 'etter Kristus']\n};\nvar quarterValues = {\n narrow: ['1', '2', '3', '4'],\n abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n wide: ['1. kvartal', '2. kvartal', '3. kvartal', '4. kvartal']\n};\nvar monthValues = {\n narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n abbreviated: ['jan.', 'feb.', 'mars', 'apr.', 'mai', 'juni', 'juli', 'aug.', 'sep.', 'okt.', 'nov.', 'des.'],\n wide: ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember']\n};\nvar dayValues = {\n narrow: ['S', 'M', 'T', 'O', 'T', 'F', 'L'],\n short: ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'],\n abbreviated: ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'],\n wide: ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag']\n};\nvar dayPeriodValues = {\n narrow: {\n am: 'a',\n pm: 'p',\n midnight: 'midnatt',\n noon: 'middag',\n morning: 'på morg.',\n afternoon: 'på etterm.',\n evening: 'på kvelden',\n night: 'på natten'\n },\n abbreviated: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnatt',\n noon: 'middag',\n morning: 'på morg.',\n afternoon: 'på etterm.',\n evening: 'på kvelden',\n night: 'på natten'\n },\n wide: {\n am: 'a.m.',\n pm: 'p.m.',\n midnight: 'midnatt',\n noon: 'middag',\n morning: 'på morgenen',\n afternoon: 'på ettermiddagen',\n evening: 'på kvelden',\n night: 'på natten'\n }\n};\n\nvar ordinalNumber = function ordinalNumber(dirtyNumber, _options) {\n var number = Number(dirtyNumber);\n return number + '.';\n};\n\nvar localize = {\n ordinalNumber: ordinalNumber,\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: 'wide'\n }),\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: 'wide',\n argumentCallback: function argumentCallback(quarter) {\n return quarter - 1;\n }\n }),\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: 'wide'\n }),\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: 'wide'\n }),\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: 'wide'\n })\n};\nexport default localize;","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)\\.?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n narrow: /^(f\\.? ?Kr\\.?|fvt\\.?|e\\.? ?Kr\\.?|evt\\.?)/i,\n abbreviated: /^(f\\.? ?Kr\\.?|fvt\\.?|e\\.? ?Kr\\.?|evt\\.?)/i,\n wide: /^(før Kristus|før vår tid|etter Kristus|vår tid)/i\n};\nvar parseEraPatterns = {\n any: [/^f/i, /^e/i]\n};\nvar matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](\\.)? kvartal/i\n};\nvar parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\\.?/i,\n wide: /^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i\n};\nvar parseMonthPatterns = {\n narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^mai/i, /^jun/i, /^jul/i, /^aug/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n narrow: /^[smtofl]/i,\n short: /^(sø|ma|ti|on|to|fr|lø)/i,\n abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,\n wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i\n};\nvar parseDayPatterns = {\n any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i]\n};\nvar matchDayPeriodPatterns = {\n narrow: /^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,\n any: /^([ap]\\.?\\s?m\\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i\n};\nvar parseDayPeriodPatterns = {\n any: {\n am: /^a(\\.?\\s?m\\.?)?$/i,\n pm: /^p(\\.?\\s?m\\.?)?$/i,\n midnight: /^midn/i,\n noon: /^midd/i,\n morning: /morgen/i,\n afternoon: /ettermiddag/i,\n evening: /kveld/i,\n night: /natt/i\n }\n};\nvar match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: function valueCallback(value) {\n return parseInt(value, 10);\n }\n }),\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseEraPatterns,\n defaultParseWidth: 'any'\n }),\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: 'any',\n valueCallback: function valueCallback(index) {\n return index + 1;\n }\n }),\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: 'any'\n }),\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: 'wide',\n parsePatterns: parseDayPatterns,\n defaultParseWidth: 'any'\n }),\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: 'any',\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: 'any'\n })\n};\nexport default match;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary Norwegian Bokmål locale.\n * @language Norwegian Bokmål\n * @iso-639-2 nob\n * @author Hans-Kristian Koren [@Hanse]{@link https://github.com/Hanse}\n * @author Mikolaj Grzyb [@mikolajgrzyb]{@link https://github.com/mikolajgrzyb}\n * @author Dag Stuan [@dagstuan]{@link https://github.com/dagstuan}\n */\n\nvar locale = {\n code: 'nb',\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 1\n /* Monday */\n ,\n firstWeekContainsDate: 4\n }\n};\nexport default locale;","import enGB from \"date-fns/locale/en-GB\";\nimport nb from \"date-fns/locale/nb\";\nimport nn from \"date-fns/locale/nn\";\n/** @private */\nexport const getLocaleFromString = (locale = \"nb\") => {\n switch (locale) {\n case \"nn\":\n return nn;\n case \"en\":\n return enGB;\n default:\n return nb;\n }\n};\n//# sourceMappingURL=locale.js.map","import setYear from \"date-fns/setYear\";\nimport isThisMonth from \"date-fns/isThisMonth\";\nexport const dateIsInCurrentMonth = (date, dateToCompare) => {\n return isThisMonth(setYear(date, Number(dateToCompare.getFullYear())));\n};\n/** @private */\nexport function isValidDate(day) {\n return day && !isNaN(day === null || day === void 0 ? void 0 : day.getTime()) && day.getFullYear() > 999;\n}\nexport const hasNextYear = (year, years, val) => {\n return years.some((x) => year.getFullYear() + val === x.getFullYear());\n};\n//# sourceMappingURL=check-dates.js.map","import differenceInCalendarDays from \"date-fns/differenceInCalendarDays\";\nimport isBefore from \"date-fns/isBefore\";\nimport isWeekend from \"date-fns/isWeekend\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { isMatch } from \"react-day-picker\";\nimport { formatDateForInput, getLocaleFromString, isValidDate, parseDate, } from \"../utils\";\nconst getValidationMessage = (from = {}, to = {}) => ({\n from: Object.assign({ isDisabled: false, isWeekend: false, isEmpty: false, isInvalid: false, isBefore: false, isAfter: false, isValidDate: true }, from),\n to: Object.assign({ isDisabled: false, isWeekend: false, isEmpty: false, isInvalid: false, isBefore: false, isAfter: false, isBeforeFrom: false, isValidDate: true }, to),\n});\nconst RANGE = {\n FROM: \"FROM\",\n TO: \"TO\",\n};\nconst fromValidation = (day, opt) => {\n const isBefore = (opt === null || opt === void 0 ? void 0 : opt.fromDate) && day && differenceInCalendarDays(opt === null || opt === void 0 ? void 0 : opt.fromDate, day) > 0;\n const isAfter = (opt === null || opt === void 0 ? void 0 : opt.toDate) && day && differenceInCalendarDays(day, opt === null || opt === void 0 ? void 0 : opt.toDate) > 0;\n if (isValidDate(day) &&\n !((opt === null || opt === void 0 ? void 0 : opt.disableWeekends) && isWeekend(day)) &&\n !((opt === null || opt === void 0 ? void 0 : opt.disabled) && isMatch(day, opt.disabled))) {\n return {\n isValidDate: false,\n isInvalid: !isValidDate(day),\n isWeekend: (opt === null || opt === void 0 ? void 0 : opt.disableWeekends) && isWeekend(day),\n isDisabled: (opt === null || opt === void 0 ? void 0 : opt.disabled) && isMatch(day, opt.disabled),\n isBefore: isBefore,\n isAfter: isAfter,\n };\n }\n if (isBefore || isAfter) {\n return {\n isValidDate: false,\n isBefore: isBefore,\n isAfter: isAfter,\n };\n }\n};\nconst toValidation = (day, from, opt) => {\n var _a;\n const isBefore = (opt === null || opt === void 0 ? void 0 : opt.fromDate) && day && differenceInCalendarDays(opt === null || opt === void 0 ? void 0 : opt.fromDate, day) > 0;\n const isAfter = (opt === null || opt === void 0 ? void 0 : opt.toDate) && day && differenceInCalendarDays(day, opt === null || opt === void 0 ? void 0 : opt.toDate) > 0;\n const isBeforeFrom = (_a = (from && differenceInCalendarDays(from, day) > 0)) !== null && _a !== void 0 ? _a : false;\n if (isValidDate(day) &&\n !((opt === null || opt === void 0 ? void 0 : opt.disableWeekends) && isWeekend(day)) &&\n !((opt === null || opt === void 0 ? void 0 : opt.disabled) && isMatch(day, opt.disabled))) {\n return {\n isValidDate: false,\n isInvalid: !isValidDate(day),\n isWeekend: (opt === null || opt === void 0 ? void 0 : opt.disableWeekends) && isWeekend(day),\n isDisabled: (opt === null || opt === void 0 ? void 0 : opt.disabled) && isMatch(day, opt.disabled),\n isBefore,\n isAfter,\n isBeforeFrom,\n };\n }\n if (isBefore || isAfter || isBeforeFrom) {\n return {\n isValidDate: false,\n isBefore,\n isAfter,\n isBeforeFrom,\n };\n }\n};\nconst initialValidation = (range, opt) => {\n if (!range || !(range === null || range === void 0 ? void 0 : range.from)) {\n return getValidationMessage({ isEmpty: true, isValidDate: false }, { isEmpty: true, isValidDate: false });\n }\n const fromVal = fromValidation(range.from, opt);\n const toVal = range.to\n ? toValidation(range.to, range.from, opt)\n : { isEmpty: true, isValidDate: false };\n return getValidationMessage(Object.assign({}, fromVal), Object.assign({}, toVal));\n};\nexport const useRangeDatepicker = (opt = {}) => {\n const { locale: _locale = \"nb\", defaultSelected: _defaultSelected, today = new Date(), fromDate, toDate, disabled, disableWeekends, onRangeChange, inputFormat, onValidate, defaultMonth, allowTwoDigitYear = true, openOnFocus = true, } = opt;\n const locale = getLocaleFromString(_locale);\n const inputRefTo = useRef(null);\n const inputRefFrom = useRef(null);\n const datePickerRef = useRef(null);\n const [defaultSelected, setDefaultSelected] = useState(_defaultSelected);\n // Initialize states\n const [month, setMonth] = useState(defaultSelected ? defaultSelected === null || defaultSelected === void 0 ? void 0 : defaultSelected.from : defaultMonth !== null && defaultMonth !== void 0 ? defaultMonth : today);\n const [selectedRange, setSelectedRange] = useState(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : { from: undefined, to: undefined });\n const [fromInputValue, setFromInputValue] = useState((defaultSelected === null || defaultSelected === void 0 ? void 0 : defaultSelected.from)\n ? formatDateForInput(defaultSelected.from, locale, \"date\", inputFormat)\n : \"\");\n const [toInputValue, setToInputValue] = useState((defaultSelected === null || defaultSelected === void 0 ? void 0 : defaultSelected.to)\n ? formatDateForInput(defaultSelected.to, locale, \"date\", inputFormat)\n : \"\");\n const [validation, setValidation] = useState(initialValidation(selectedRange, opt));\n const [open, setOpen] = useState(false);\n const updateRange = (range) => {\n onRangeChange === null || onRangeChange === void 0 ? void 0 : onRangeChange(range);\n setSelectedRange(range);\n };\n const updateValidation = (from = {}, to = {}) => {\n const msg = getValidationMessage(from, to);\n setValidation(msg);\n onValidate === null || onValidate === void 0 ? void 0 : onValidate(msg);\n };\n const handleFocusIn = useCallback((e) => {\n var _a, _b, _c, _d, _e;\n /* Workaround for shadow-dom users (open) */\n const composed = (_b = (_a = e.composedPath) === null || _a === void 0 ? void 0 : _a.call(e)) === null || _b === void 0 ? void 0 : _b[0];\n if (!(e === null || e === void 0 ? void 0 : e.target) || !((_c = e === null || e === void 0 ? void 0 : e.target) === null || _c === void 0 ? void 0 : _c.nodeType) || !composed) {\n return;\n }\n ![\n datePickerRef.current,\n inputRefTo.current,\n inputRefFrom.current,\n (_d = inputRefTo.current) === null || _d === void 0 ? void 0 : _d.nextSibling,\n (_e = inputRefFrom.current) === null || _e === void 0 ? void 0 : _e.nextSibling,\n ].some((element) => (element === null || element === void 0 ? void 0 : element.contains(e.target)) || (element === null || element === void 0 ? void 0 : element.contains(composed))) &&\n open &&\n setOpen(false);\n }, [open]);\n useEffect(() => {\n window.addEventListener(\"focusin\", handleFocusIn);\n window.addEventListener(\"pointerdown\", handleFocusIn);\n return () => {\n var _a, _b;\n (_a = window === null || window === void 0 ? void 0 : window.removeEventListener) === null || _a === void 0 ? void 0 : _a.call(window, \"focusin\", handleFocusIn);\n (_b = window === null || window === void 0 ? void 0 : window.removeEventListener) === null || _b === void 0 ? void 0 : _b.call(window, \"pointerdown\", handleFocusIn);\n };\n }, [handleFocusIn]);\n const reset = () => {\n updateRange(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : { from: undefined, to: undefined });\n setMonth(defaultSelected ? defaultSelected === null || defaultSelected === void 0 ? void 0 : defaultSelected.from : defaultMonth !== null && defaultMonth !== void 0 ? defaultMonth : today);\n setValidation(initialValidation(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : { from: undefined, to: undefined }, opt));\n setFromInputValue((defaultSelected === null || defaultSelected === void 0 ? void 0 : defaultSelected.from)\n ? formatDateForInput(defaultSelected.from, locale, \"date\", inputFormat)\n : \"\");\n setToInputValue((defaultSelected === null || defaultSelected === void 0 ? void 0 : defaultSelected.to)\n ? formatDateForInput(defaultSelected.to, locale, \"date\", inputFormat)\n : \"\");\n setDefaultSelected(_defaultSelected);\n };\n const setSelected = (range) => {\n updateRange(range);\n setFromInputValue((range === null || range === void 0 ? void 0 : range.from)\n ? formatDateForInput(range.from, locale, \"date\", inputFormat)\n : \"\");\n setToInputValue((range === null || range === void 0 ? void 0 : range.to)\n ? formatDateForInput(range === null || range === void 0 ? void 0 : range.to, locale, \"date\", inputFormat)\n : \"\");\n setValidation(initialValidation(range, opt));\n };\n const handleFocus = (e, src) => {\n !open && openOnFocus && setOpen(true);\n let day = parseDate(e.target.value, today, locale, \"date\", allowTwoDigitYear);\n if (isValidDate(day)) {\n setMonth(day);\n src === RANGE.FROM\n ? setFromInputValue(formatDateForInput(day, locale, \"date\", inputFormat))\n : setToInputValue(formatDateForInput(day, locale, \"date\", inputFormat));\n }\n };\n const handleBlur = (e, src) => {\n let day = parseDate(e.target.value, today, locale, \"date\", allowTwoDigitYear);\n if (!isValidDate(day)) {\n return;\n }\n if (src === RANGE.FROM) {\n setFromInputValue(formatDateForInput(day, locale, \"date\", inputFormat));\n }\n else if (src === RANGE.TO) {\n setToInputValue(formatDateForInput(day, locale, \"date\", inputFormat));\n }\n };\n const validateDay = (day) => {\n return (isValidDate(day) &&\n !(disableWeekends && isWeekend(day)) &&\n !(disabled && isMatch(day, disabled)));\n };\n const handleSelect = (range) => {\n if ((range === null || range === void 0 ? void 0 : range.from) && (range === null || range === void 0 ? void 0 : range.to)) {\n setOpen(false);\n }\n let prevToRange = !(selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from) && (selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.to) ? selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.to : range === null || range === void 0 ? void 0 : range.to;\n const resetTo = isBefore(prevToRange, range === null || range === void 0 ? void 0 : range.from);\n (range === null || range === void 0 ? void 0 : range.from)\n ? setFromInputValue(formatDateForInput(range === null || range === void 0 ? void 0 : range.from, locale, \"date\", inputFormat))\n : setFromInputValue(\"\");\n prevToRange && !resetTo\n ? setToInputValue(formatDateForInput(prevToRange, locale, \"date\", inputFormat))\n : setToInputValue(\"\");\n updateRange({ from: range === null || range === void 0 ? void 0 : range.from, to: resetTo ? undefined : prevToRange });\n updateValidation({ isValidDate: !!(range === null || range === void 0 ? void 0 : range.from), isEmpty: !(range === null || range === void 0 ? void 0 : range.from) }, { isValidDate: !!(range === null || range === void 0 ? void 0 : range.to), isEmpty: !prevToRange || resetTo });\n };\n const fromChange = (val = \"\", day, isBefore = false, isAfter = false) => {\n setFromInputValue(val);\n if (!validateDay(day)) {\n updateRange(Object.assign(Object.assign({}, selectedRange), { from: undefined }));\n updateValidation({\n isEmpty: !val,\n isValidDate: false,\n isInvalid: !isValidDate(day),\n isWeekend: disableWeekends && isWeekend(day),\n isDisabled: disabled && isMatch(day, disabled),\n isBefore,\n isAfter,\n }, validation.to);\n return;\n }\n if (isBefore || isAfter) {\n updateRange(Object.assign(Object.assign({}, selectedRange), { from: undefined }));\n updateValidation({\n isValidDate: false,\n isBefore,\n isAfter,\n }, validation.to);\n return;\n }\n if ((selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.to) &&\n differenceInCalendarDays(day, selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.to) > 0) {\n updateRange({ to: day, from: day });\n setToInputValue(formatDateForInput(day, locale, \"date\", inputFormat));\n setMonth(day);\n updateValidation();\n return;\n }\n if (toInputValue && !(selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.to)) {\n const toDay = parseDate(toInputValue, today, locale, \"date\", allowTwoDigitYear);\n if (validateDay(toDay)) {\n updateRange({ from: day, to: toDay });\n setMonth(day);\n updateValidation();\n return;\n }\n }\n updateRange(Object.assign(Object.assign({}, selectedRange), { from: day }));\n updateValidation({}, validation.to);\n setMonth(day);\n };\n const toChange = (val = \"\", day, isBefore = false, isAfter = false) => {\n setToInputValue(val);\n if (!validateDay(day)) {\n updateRange({ from: selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from, to: undefined });\n updateValidation(validation.from, {\n isEmpty: !val,\n isValidDate: false,\n isInvalid: !isValidDate(day),\n isWeekend: disableWeekends && isWeekend(day),\n isDisabled: disabled && isMatch(day, disabled),\n isBefore,\n isAfter,\n });\n return;\n }\n if (isBefore || isAfter) {\n updateRange({ from: selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from, to: undefined });\n updateValidation(validation.from, {\n isValidDate: false,\n isBefore,\n isAfter,\n });\n return;\n }\n /* If to-value < from-value */\n if ((selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from) &&\n differenceInCalendarDays(selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from, day) > 0) {\n updateRange({ from: selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from, to: undefined });\n updateValidation(validation.from, {\n isValidDate: false,\n isBeforeFrom: true,\n });\n return;\n }\n updateRange({ from: selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from, to: day });\n updateValidation(validation.from, {});\n setMonth(day);\n };\n /* live-update datepicker based on changes in inputfields */\n const handleChange = (e, src) => {\n const day = parseDate(e.target.value, today, locale, \"date\", allowTwoDigitYear);\n const isBefore = fromDate && differenceInCalendarDays(fromDate, day) > 0;\n const isAfter = toDate && differenceInCalendarDays(day, toDate) > 0;\n return src === RANGE.FROM\n ? fromChange(e.target.value, day, isBefore, isAfter)\n : toChange(e.target.value, day, isBefore, isAfter);\n };\n const handleClose = useCallback(() => {\n var _a, _b;\n setOpen(false);\n if ((selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.from) && !(selectedRange === null || selectedRange === void 0 ? void 0 : selectedRange.to)) {\n (_a = inputRefTo === null || inputRefTo === void 0 ? void 0 : inputRefTo.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n else {\n (_b = inputRefFrom === null || inputRefFrom === void 0 ? void 0 : inputRefFrom.current) === null || _b === void 0 ? void 0 : _b.focus();\n }\n }, [selectedRange]);\n const escape = useCallback((e) => open && e.key === \"Escape\" && handleClose(), [handleClose, open]);\n useEffect(() => {\n window.addEventListener(\"keydown\", escape, false);\n return () => {\n window.removeEventListener(\"keydown\", escape, false);\n };\n }, [escape]);\n const datepickerProps = {\n month: month,\n onMonthChange: (month) => setMonth(month),\n onSelect: handleSelect,\n selected: selectedRange,\n locale: _locale,\n fromDate,\n toDate,\n today,\n mode: \"range\",\n open,\n onOpenToggle: () => setOpen((x) => !x),\n disabled,\n disableWeekends,\n ref: datePickerRef,\n };\n const fromInputProps = {\n onChange: (e) => handleChange(e, RANGE.FROM),\n onFocus: (e) => handleFocus(e, RANGE.FROM),\n onBlur: (e) => handleBlur(e, RANGE.FROM),\n value: fromInputValue,\n ref: inputRefFrom,\n };\n const toInputProps = {\n onChange: (e) => handleChange(e, RANGE.TO),\n onFocus: (e) => handleFocus(e, RANGE.TO),\n onBlur: (e) => handleBlur(e, RANGE.TO),\n value: toInputValue,\n ref: inputRefTo,\n };\n return {\n datepickerProps,\n fromInputProps,\n toInputProps,\n reset,\n selectedRange,\n setSelected,\n };\n};\n//# sourceMappingURL=useRangeDatepicker.js.map","import { createContext, useContext } from \"react\";\nexport const DateContext = createContext({\n open: false,\n onOpen: () => null,\n ariaId: undefined,\n});\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","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 { Calender } from \"@navikt/ds-icons\";\nimport cl from \"clsx\";\nimport React, { forwardRef } from \"react\";\nimport { BodyShort, Button, ErrorMessage, Label, omit } from \"..\";\nimport { useFormField } from \"../form/useFormField\";\nimport { useDateInputContext } from \"./hooks\";\nconst DateInput = forwardRef((props, ref) => {\n const { className, hideLabel = false, label, description, variant = \"datepicker\" } = props, rest = __rest(props, [\"className\", \"hideLabel\", \"label\", \"description\", \"variant\"]);\n const isDatepickerVariant = variant === \"datepicker\";\n const conditionalVariables = {\n prefix: isDatepickerVariant ? \"datepicker-input\" : \"monthpicker-input\",\n iconTitle: {\n open: isDatepickerVariant ? \"Åpne datovelger\" : \"Åpne månedsvelger\",\n close: isDatepickerVariant ? \"Lukk datovelger\" : \"Lukk månedsvelger\",\n },\n };\n const { onOpen, ariaId, open } = useDateInputContext();\n const { inputProps, size = \"medium\", inputDescriptionId, errorId, showErrorMsg, hasError, } = useFormField(props, conditionalVariables.prefix);\n return (React.createElement(\"div\", { className: cl(className, \"navds-form-field\", `navds-form-field--${size}`, \"navds-date__field\", {\n \"navds-text-field--error\": hasError,\n \"navds-date__field--error\": hasError,\n \"navds-form-field--disabled\": !!inputProps.disabled,\n \"navds-text-field--disabled\": !!inputProps.disabled,\n }) },\n React.createElement(Label, { htmlFor: inputProps.id, size: size, className: cl(\"navds-form-field__label\", {\n \"navds-sr-only\": hideLabel,\n }) }, label),\n !!description && (React.createElement(BodyShort, { as: \"div\", className: cl(\"navds-form-field__description\", {\n \"navds-sr-only\": hideLabel,\n }), id: inputDescriptionId, size: size }, description)),\n React.createElement(\"div\", { className: \"navds-date__field-wrapper\" },\n React.createElement(\"input\", Object.assign({ ref: ref }, omit(rest, [\"error\", \"errorId\", \"size\"]), inputProps, { autoComplete: \"off\", \"aria-controls\": ariaId, className: cl(\"navds-date__field-input\", \"navds-text-field__input\", \"navds-body-short\", `navds-body-${size}`), size: 14 })),\n React.createElement(Button, { variant: \"tertiary\", type: \"button\", size: \"small\", onClick: () => onOpen(), className: \"navds-date__field-button\", tabIndex: open ? -1 : 0, disabled: inputProps.disabled, icon: React.createElement(Calender, { title: open\n ? conditionalVariables.iconTitle.close\n : conditionalVariables.iconTitle.open }) })),\n React.createElement(\"div\", { className: \"navds-form-field__error\", id: errorId, \"aria-relevant\": \"additions removals\", \"aria-live\": \"polite\" }, showErrorMsg && (React.createElement(ErrorMessage, { size: size }, props.error)))));\n});\nexport const DatePickerInput = forwardRef((props, ref) => React.createElement(DateInput, Object.assign({}, props, { ref: ref })));\nexport const MonthPickerInput = forwardRef((props, ref) => React.createElement(DateInput, Object.assign({}, props, { variant: \"monthpicker\", ref: ref })));\n//# sourceMappingURL=DateInput.js.map","import { Left, Right } from \"@navikt/ds-icons\";\nimport React from \"react\";\nimport { useDayPicker, useNavigation } from \"react-day-picker\";\nimport { Button, Label } from \"../../..\";\nexport const DatePickerCaption = ({ displayMonth, id }) => {\n const { goToMonth, nextMonth, previousMonth } = useNavigation();\n const { labels: { labelPrevious, labelNext }, formatters: { formatCaption }, locale, } = useDayPicker();\n const previousLabel = labelPrevious(previousMonth, { locale });\n const nextLabel = labelNext(nextMonth, { locale });\n return (React.createElement(\"div\", { className: \"navds-date__caption\" },\n React.createElement(Label, { as: \"span\", \"aria-live\": \"polite\", \"aria-atomic\": \"true\", id: id, className: \"navds-date__caption-label\" }, formatCaption(displayMonth, { locale })),\n React.createElement(\"div\", { className: \"navds-date__caption__month-wrapper\" },\n React.createElement(Button, { \"aria-label\": previousLabel, variant: \"tertiary\", disabled: !previousMonth, onClick: () => previousMonth && goToMonth(previousMonth), icon: React.createElement(Left, { title: \"velg forrige m\\u00E5ned\" }), className: \"navds-date__caption-button\", type: \"button\" }),\n React.createElement(Button, { \"aria-label\": nextLabel, icon: React.createElement(Right, { title: \"velg neste m\\u00E5ned\" }), onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, variant: \"tertiary\", className: \"navds-date__caption-button\", type: \"button\" }))));\n};\nexport default DatePickerCaption;\n//# sourceMappingURL=Caption.js.map","import { Left, Right } from \"@navikt/ds-icons\";\nimport setMonth from \"date-fns/setMonth\";\nimport setYear from \"date-fns/setYear\";\nimport startOfMonth from \"date-fns/startOfMonth\";\nimport React from \"react\";\nimport { useDayPicker, useNavigation } from \"react-day-picker\";\nimport { Button, Select } from \"../../..\";\nimport { getMonths, getYears } from \"../../utils/get-dates\";\nimport { labelMonthDropdown, labelYearDropdown } from \"../../utils/labels\";\nexport const DropdownCaption = ({ displayMonth, id }) => {\n const { goToMonth, nextMonth, previousMonth } = useNavigation();\n const { fromDate, toDate, formatters: { formatYearCaption, formatMonthCaption, formatCaption }, labels: { labelPrevious, labelNext }, locale, } = useDayPicker();\n if (!fromDate || !toDate) {\n console.warn(\"Using dropdownCaption required fromDate and toDate\");\n return null;\n }\n const handleYearChange = (e) => goToMonth(setYear(startOfMonth(displayMonth), Number(e.target.value)));\n const handleMonthChange = (e) => goToMonth(setMonth(startOfMonth(displayMonth), Number(e.target.value)));\n const years = getYears(fromDate, toDate);\n const months = getMonths(fromDate, toDate, displayMonth);\n const previousLabel = labelPrevious(previousMonth, { locale });\n const nextLabel = labelNext(nextMonth, { locale });\n const yearDropdownLabel = labelYearDropdown(locale);\n const MonthDropdownLabel = labelMonthDropdown(locale);\n return (React.createElement(\"div\", { className: \"navds-date__caption-dropdown\" },\n React.createElement(\"span\", { \"aria-live\": \"polite\", \"aria-atomic\": \"true\", id: id, className: \"navds-sr-only\" }, formatCaption(displayMonth, { locale })),\n React.createElement(Button, { \"aria-label\": previousLabel, variant: \"tertiary\", disabled: !previousMonth, onClick: () => previousMonth && goToMonth(previousMonth), icon: React.createElement(Left, { title: \"velg forrige m\\u00E5ned\" }), className: \"navds-date__caption-button\", type: \"button\" }),\n React.createElement(\"div\", { className: \"navds-date__caption__month-wrapper\" },\n React.createElement(Select, { label: MonthDropdownLabel, hideLabel: true, className: \"navds-date__caption__month\", value: displayMonth.getMonth(), onChange: handleMonthChange }, months.map((m) => (React.createElement(\"option\", { key: m.getMonth(), value: m.getMonth() }, formatMonthCaption(m, { locale }))))),\n React.createElement(Select, { label: yearDropdownLabel, hideLabel: true, value: displayMonth.getFullYear(), onChange: handleYearChange, className: \"navds-date__caption__year\" }, years.map((year) => (React.createElement(\"option\", { key: year.getFullYear(), value: year.getFullYear() }, formatYearCaption(year, { locale })))))),\n React.createElement(Button, { \"aria-label\": nextLabel, icon: React.createElement(Right, { title: \"velg neste m\\u00E5ned\" }), onClick: () => nextMonth && goToMonth(nextMonth), disabled: !nextMonth, variant: \"tertiary\", className: \"navds-date__caption-button\", type: \"button\" })));\n};\nexport default DropdownCaption;\n//# sourceMappingURL=DropdownCaption.js.map","import React from \"react\";\nimport { HeadRow, useDayPicker } from \"react-day-picker\";\n/** Render the table head. */\nexport function Head() {\n var _a;\n const { classNames, styles, components } = useDayPicker();\n const HeadRowComponent = (_a = components === null || components === void 0 ? void 0 : components.HeadRow) !== null && _a !== void 0 ? _a : HeadRow;\n return (React.createElement(\"thead\", { style: styles.head, className: classNames.head, \"aria-hidden\": true },\n React.createElement(HeadRowComponent, null)));\n}\n//# sourceMappingURL=Head.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 isWeekend from \"date-fns/isWeekend\";\nimport React, { forwardRef } from \"react\";\nimport { DayPicker, isMatch, } from \"react-day-picker\";\nimport { omit } from \"../..\";\nimport { getLocaleFromString, labels } from \"../utils\";\nimport { Caption, DropdownCaption } from \"./caption\";\nimport { Head } from \"./Head\";\nexport const DatePickerStandalone = forwardRef((_a, ref) => {\n var _b;\n var { children, className, locale = \"nb\", dropdownCaption, disabled = [], disableWeekends = false, showWeekNumber = false, selected, id, defaultSelected, onSelect, fixedWeeks = true } = _a, rest = __rest(_a, [\"children\", \"className\", \"locale\", \"dropdownCaption\", \"disabled\", \"disableWeekends\", \"showWeekNumber\", \"selected\", \"id\", \"defaultSelected\", \"onSelect\", \"fixedWeeks\"]);\n const [selectedDates, setSelectedDates] = React.useState(defaultSelected);\n const handleSingleSelect = (selectedDay) => {\n setSelectedDates(selectedDay);\n onSelect && onSelect(selectedDay);\n };\n const handleMultipleSelect = (selectedDays) => {\n setSelectedDates(selectedDays);\n onSelect && onSelect(selectedDays);\n };\n const handleRangeSelect = (selectedDays) => {\n setSelectedDates(selectedDays);\n onSelect && onSelect(selectedDays);\n };\n const overrideProps = {\n mode: (_b = rest.mode) !== null && _b !== void 0 ? _b : \"single\",\n onSelect: (rest === null || rest === void 0 ? void 0 : rest.mode) === \"single\"\n ? handleSingleSelect\n : (rest === null || rest === void 0 ? void 0 : rest.mode) === \"multiple\"\n ? handleMultipleSelect\n : handleRangeSelect,\n };\n return (React.createElement(\"div\", { ref: ref, className: cl(\"navds-date__standalone-wrapper\", className) },\n React.createElement(DayPicker, Object.assign({ locale: getLocaleFromString(locale) }, overrideProps, { selected: selected !== null && selected !== void 0 ? selected : selectedDates, components: {\n Caption: dropdownCaption ? DropdownCaption : Caption,\n Head: Head,\n }, className: \"navds-date\", classNames: { vhidden: \"navds-sr-only\" }, disabled: (day) => {\n return ((disableWeekends && isWeekend(day)) || isMatch(day, disabled));\n }, weekStartsOn: 1, initialFocus: false, labels: labels, modifiers: {\n weekend: (day) => disableWeekends && isWeekend(day),\n }, modifiersClassNames: {\n weekend: \"rdp-day__weekend\",\n }, showWeekNumber: showWeekNumber, fixedWeeks: fixedWeeks, showOutsideDays: true }, omit(rest, [\"onSelect\"])))));\n});\nexport default DatePickerStandalone;\n//# sourceMappingURL=DatePickerStandalone.js.map","import format from \"date-fns/format\";\nimport React, { useRef } from \"react\";\nimport { Button, useDayPicker, useDayRender } from \"react-day-picker\";\nexport const DayButton = (props) => {\n const buttonRef = useRef(null);\n const dayRender = useDayRender(props.date, props.displayMonth, buttonRef);\n const { locale } = useDayPicker();\n const dateTime = format(props.date, \"cccc d\", { locale });\n if (dayRender.isHidden) {\n return React.createElement(React.Fragment, null);\n }\n if (!dayRender.isButton) {\n return React.createElement(\"div\", Object.assign({}, dayRender.divProps));\n }\n return (React.createElement(Button, Object.assign({ name: \"day\", ref: buttonRef }, dayRender.buttonProps, { \"aria-label\": dateTime, \"aria-hidden\": dayRender.activeModifiers.outside })));\n};\n//# sourceMappingURL=DayButton.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 isWeekend from \"date-fns/isWeekend\";\nimport React, { forwardRef, useRef, useState } from \"react\";\nimport { DayPicker, isMatch, } from \"react-day-picker\";\nimport { omit, Popover, useId } from \"../..\";\nimport { DatePickerInput } from \"../DateInput\";\nimport { DateContext } from \"../hooks\";\nimport { getLocaleFromString, labels } from \"../utils\";\nimport { Caption, DropdownCaption } from \"./caption\";\nimport DatePickerStandalone from \"./DatePickerStandalone\";\nimport { DayButton } from \"./DayButton\";\nimport { Head } from \"./Head\";\nexport const DatePicker = forwardRef((_a, ref) => {\n var _b;\n var { children, locale = \"nb\", dropdownCaption, disabled = [], disableWeekends = false, showWeekNumber = false, selected, id, defaultSelected, className, wrapperClassName, open: _open, onClose, onOpenToggle, strategy = \"absolute\" } = _a, rest = __rest(_a, [\"children\", \"locale\", \"dropdownCaption\", \"disabled\", \"disableWeekends\", \"showWeekNumber\", \"selected\", \"id\", \"defaultSelected\", \"className\", \"wrapperClassName\", \"open\", \"onClose\", \"onOpenToggle\", \"strategy\"]);\n const ariaId = useId(id);\n const [open, setOpen] = useState(_open !== null && _open !== void 0 ? _open : false);\n const wrapperRef = useRef(null);\n const [selectedDates, setSelectedDates] = React.useState(defaultSelected);\n const handleSingleSelect = (selectedDay) => {\n var _a;\n setSelectedDates(selectedDay);\n selectedDay && ((_a = onClose === null || onClose === void 0 ? void 0 : onClose()) !== null && _a !== void 0 ? _a : setOpen(false));\n (rest === null || rest === void 0 ? void 0 : rest.onSelect) && (rest === null || rest === void 0 ? void 0 : rest.onSelect)(selectedDay);\n };\n const handleMultipleSelect = (selectedDays) => {\n setSelectedDates(selectedDays);\n (rest === null || rest === void 0 ? void 0 : rest.onSelect) &&\n (rest === null || rest === void 0 ? void 0 : rest.onSelect)(selectedDays);\n };\n const handleRangeSelect = (selectedDays) => {\n var _a;\n setSelectedDates(selectedDays);\n (selectedDays === null || selectedDays === void 0 ? void 0 : selectedDays.from) && (selectedDays === null || selectedDays === void 0 ? void 0 : selectedDays.to) && ((_a = onClose === null || onClose === void 0 ? void 0 : onClose()) !== null && _a !== void 0 ? _a : setOpen(false));\n (rest === null || rest === void 0 ? void 0 : rest.onSelect) &&\n (rest === null || rest === void 0 ? void 0 : rest.onSelect)(selectedDays);\n };\n const overrideProps = {\n mode: (_b = rest.mode) !== null && _b !== void 0 ? _b : \"single\",\n onSelect: (rest === null || rest === void 0 ? void 0 : rest.mode) === \"single\"\n ? handleSingleSelect\n : (rest === null || rest === void 0 ? void 0 : rest.mode) === \"multiple\"\n ? handleMultipleSelect\n : handleRangeSelect,\n };\n return (React.createElement(DateContext.Provider, { value: {\n open: _open !== null && _open !== void 0 ? _open : open,\n onOpen: () => {\n setOpen((x) => !x);\n onOpenToggle === null || onOpenToggle === void 0 ? void 0 : onOpenToggle();\n },\n ariaId,\n } },\n React.createElement(\"div\", { ref: wrapperRef, className: cl(\"navds-date__wrapper\", wrapperClassName) },\n children,\n (_open !== null && _open !== void 0 ? _open : open) && (React.createElement(Popover, { arrow: false, anchorEl: wrapperRef.current, open: _open !== null && _open !== void 0 ? _open : open, onClose: () => {\n var _a;\n (_a = onClose === null || onClose === void 0 ? void 0 : onClose()) !== null && _a !== void 0 ? _a : setOpen(false);\n }, placement: \"bottom-start\", id: ariaId, role: \"dialog\", ref: ref, strategy: strategy },\n React.createElement(DayPicker, Object.assign({ locale: getLocaleFromString(locale) }, overrideProps, { selected: selected !== null && selected !== void 0 ? selected : selectedDates, components: {\n Caption: dropdownCaption ? DropdownCaption : Caption,\n Day: DayButton,\n Head: Head,\n }, className: cl(\"navds-date\", className), classNames: {\n vhidden: \"navds-sr-only\",\n }, disabled: (day) => {\n return ((disableWeekends && isWeekend(day)) ||\n isMatch(day, disabled));\n }, weekStartsOn: 1, initialFocus: false, labels: labels, modifiers: {\n weekend: (day) => disableWeekends && isWeekend(day),\n }, modifiersClassNames: {\n weekend: \"rdp-day__weekend\",\n }, showWeekNumber: showWeekNumber, fixedWeeks: true, showOutsideDays: true }, omit(rest, [\"onSelect\"]))))))));\n});\nDatePicker.Standalone = DatePickerStandalone;\nDatePicker.Input = DatePickerInput;\nexport default DatePicker;\n//# sourceMappingURL=DatePicker.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 React from \"react\";\nimport { useId } from \"..\";\nexport const DefaultIllustration = (_a) => {\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: \"42\", height: \"64\", viewBox: \"0 0 42 64\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", \"aria-label\": \"NAV veileder illustrasjon\", focusable: false, role: \"img\", \"aria-labelledby\": titleId }, props),\n title ? React.createElement(\"title\", { id: titleId }, title) : null,\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M32.8313 30.4421C31.7718 33.868 29.6975 36.7117 27.0391 38.452L27.1752 39.9777L27.1745 40.0397L25.7375 52.6154H16.6236L16.5857 52.3512L14.8238 40.0181L14.8891 38.4756C12.2173 36.7398 10.1312 33.8914 9.06565 30.4564C9.02952 30.4598 8.99291 30.4616 8.95588 30.4616C8.26662 30.4616 7.72058 29.8614 7.72058 29.1343V25.0202C7.72058 24.5328 7.96592 24.1022 8.33526 23.8712C8.9115 16.1905 14.3251 10.1539 20.946 10.1539C27.5491 10.1539 32.9517 16.1579 33.5525 23.8089C33.9838 24.0179 34.2794 24.4845 34.2794 25.0202V29.1343C34.2794 29.8618 33.7341 30.4616 33.0441 30.4616C32.9714 30.4616 32.9003 30.4549 32.8313 30.4421Z\", fill: \"#F1F1F1\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M26.7182 38.8777C26.6663 41.624 24.1261 44.4415 21 44.4415C17.8604 44.4415 15.3116 41.5994 15.2813 38.8419C13.6546 39.2527 11.1714 40.4917 9.12177 42.5623C7.13699 44.5674 5.55884 47.5814 5.55884 49.9194V64H36.4412V49.9194C36.4412 47.5766 34.829 44.5575 32.8075 42.5501C30.7861 40.5427 28.3553 39.3204 26.7182 38.8777Z\", fill: \"#0056B4\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M15.1786 38.9372C13.6802 39.4793 11.1664 40.6641 9.2647 42.4632C3.70588 41.2308 1.23529 38.3022 1.23529 38.3022C1.23529 38.3022 6.35673 33.325 6.35982 24.6197V24.6105C6.35982 14.4173 11.8831 7.38464 20.9827 7.38464C30.0836 7.38464 35.6068 14.4173 35.6068 24.6105H35.6396C35.6396 33.3219 40.7647 38.3022 40.7647 38.3022C40.7647 38.3022 38.2941 41.2308 32.7353 42.4616L32.7269 42.4632C30.8901 40.7984 28.2262 39.5144 26.7769 38.9715L26.7785 38.971L26.7209 38.3257L26.7521 38.2722C29.4867 36.5294 31.6086 33.5933 32.6316 30.0454C32.7569 30.1148 32.8983 30.1539 33.048 30.1539C33.5601 30.1539 33.9746 29.6984 33.9746 29.1343V25.0202C33.9746 24.5375 33.6712 24.134 33.2628 24.0275C33.2624 24.0219 33.262 24.0164 33.2616 24.0108C20.3323 25.4483 15.6749 16.616 15.2926 16.6154C15.2926 16.6154 10.9987 19.6923 8.94657 23.3506C8.94657 23.3506 8.6338 24.0412 8.63228 24.0644C8.28095 24.2092 8.03035 24.5821 8.03035 25.0202V29.1343C8.03035 29.6984 8.44586 30.1539 8.95693 30.1539C9.07019 30.1539 9.17868 30.1316 9.27895 30.0908C10.3132 33.6404 12.4486 36.5733 15.1961 38.3046L15.2063 38.3257L15.1804 38.9372H15.1786Z\", fill: \"#D05C4A\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M16.584 26.9976C15.7859 27.062 15.5625 25.8029 15.803 24.9807C15.8482 24.8249 16.1124 24.1154 16.5802 24.1154C17.0473 24.1154 17.2536 24.5032 17.2823 24.5699C17.6259 25.3715 17.4571 26.9268 16.584 26.9976\", fill: \"#262626\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M25.8405 26.9976C26.6386 27.062 26.862 25.8029 26.6215 24.9807C26.5763 24.8249 26.3121 24.1154 25.8444 24.1154C25.3772 24.1154 25.171 24.5032 25.1423 24.5699C24.7987 25.3715 24.9674 26.9268 25.8405 26.9976\", fill: \"#262626\" }),\n React.createElement(\"path\", { d: \"M21.5081 28.2384C21.9854 28.157 22.3113 28.2081 22.428 28.3669C22.8687 28.9672 22.7277 29.6023 21.9718 30.1237C21.5744 30.3977 21.0273 30.4942 20.7377 30.3521C20.596 30.2826 20.4304 30.3536 20.3677 30.5106C20.3051 30.6676 20.3691 30.8512 20.5107 30.9207C20.9894 31.1555 21.7255 31.0257 22.268 30.6517C23.2953 29.9431 23.5304 28.8837 22.863 27.9743C22.5805 27.59 22.0806 27.5116 21.4228 27.6239C21.2697 27.65 21.1647 27.8088 21.1883 27.9784C21.2118 28.1481 21.355 28.2645 21.5081 28.2384Z\", fill: \"#262626\" }),\n React.createElement(\"path\", { d: \"M24.9595 32.3642C24.9315 32.4234 24.8672 32.5367 24.7639 32.686C24.589 32.9386 24.3694 33.1919 24.1027 33.4281C23.3079 34.1319 22.2735 34.5389 20.9568 34.5017C19.673 34.4654 18.6432 34.0647 17.8358 33.4185C17.5393 33.1813 17.2946 32.9272 17.0989 32.6739C16.9836 32.5246 16.9115 32.4114 16.88 32.3523C16.8043 32.2104 16.618 32.152 16.464 32.2218C16.31 32.2917 16.2466 32.4634 16.3224 32.6053C16.3681 32.6908 16.4569 32.8304 16.5927 33.0062C16.8156 33.2948 17.0928 33.5826 17.4283 33.8511C18.3398 34.5805 19.5046 35.0338 20.9378 35.0743C22.4302 35.1165 23.6233 34.6471 24.5333 33.8412C24.8376 33.5717 25.0877 33.2832 25.2878 32.9941C25.4095 32.8183 25.4887 32.6787 25.5291 32.5934C25.5977 32.4485 25.5259 32.2796 25.3686 32.2163C25.2113 32.153 25.0282 32.2192 24.9595 32.3642Z\", fill: \"#262626\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M32.1651 58H21.8343C21.3733 58 21 57.621 21 57.153V51.5143C21 51.0462 21.3733 50.6667 21.8343 50.6667H32.1651C32.6261 50.6667 33 51.0462 33 51.5143V57.153C33 57.621 32.6261 58 32.1651 58\", fill: \"white\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M27.6207 51.8307H26.5502C26.4709 51.8307 26.407 51.7671 26.407 51.6882V51.5086C26.407 51.4303 26.4709 51.3661 26.5502 51.3661H27.6207C27.7 51.3661 27.764 51.4303 27.764 51.5086V51.6882C27.764 51.7671 27.7 51.8307 27.6207 51.8307\", fill: \"#262626\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M26.7756 51.6667H27.3958V50H26.7756V51.6667Z\", fill: \"#6A6A6A\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M27.1269 56.6651C25.839 56.6651 24.7947 55.6208 24.7947 54.3327C24.7947 53.0444 25.839 52 27.1269 52C28.4153 52 29.4597 53.0444 29.4597 54.3327C29.4597 55.6208 28.4153 56.6651 27.1269 56.6651Z\", fill: \"#C30000\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M23.6667 55.3511L24.1434 54.1712H24.6015L24.1254 55.3511H23.6667Z\", fill: \"#C30000\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M29.5496 55.3511L30.0202 54.1712H30.2699L29.7993 55.3511H29.5496Z\", fill: \"#C30000\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M30.4752 55.3511L30.9457 54.1712H31.0783L30.6077 55.3511H30.4752Z\", fill: \"#C30000\" }),\n React.createElement(\"path\", { fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M29.1165 54.1712H28.7019C28.7019 54.1712 28.6733 54.1712 28.6632 54.1964L28.4337 54.8989L28.2044 54.1964C28.1943 54.1712 28.1656 54.1712 28.1656 54.1712H27.3683C27.3511 54.1712 27.3366 54.1856 27.3366 54.2028V54.4413C27.3366 54.2521 27.1352 54.1712 27.0173 54.1712C26.7533 54.1712 26.5765 54.3451 26.5215 54.6095C26.5185 54.4341 26.5039 54.3713 26.4567 54.3069C26.435 54.2754 26.4036 54.2489 26.3695 54.2269C26.2991 54.1857 26.236 54.1712 26.1003 54.1712H25.9409C25.9409 54.1712 25.9121 54.1712 25.9019 54.1964L25.7569 54.5558V54.2028C25.7569 54.1856 25.7426 54.1712 25.7253 54.1712H25.3566C25.3566 54.1712 25.3281 54.1712 25.3178 54.1964L25.167 54.5701C25.167 54.5701 25.152 54.6074 25.1864 54.6074H25.3281V55.3194C25.3281 55.3371 25.342 55.3511 25.3598 55.3511H25.7253C25.7426 55.3511 25.7569 55.3371 25.7569 55.3194V54.6074H25.8994C25.9812 54.6074 25.9985 54.6097 26.0303 54.6245C26.0495 54.6317 26.0667 54.6464 26.0762 54.6632C26.0954 54.6995 26.1003 54.7431 26.1003 54.8716V55.3194C26.1003 55.3371 26.1145 55.3511 26.132 55.3511H26.4823C26.4823 55.3511 26.5219 55.3511 26.5376 55.312L26.6152 55.1201C26.7185 55.2647 26.8884 55.3511 27.0996 55.3511H27.1458C27.1458 55.3511 27.1856 55.3511 27.2014 55.312L27.3366 54.9771V55.3194C27.3366 55.3371 27.3511 55.3511 27.3683 55.3511H27.726C27.726 55.3511 27.7654 55.3511 27.7813 55.312C27.7813 55.312 27.9243 54.9569 27.9249 54.9542H27.9251C27.9306 54.9246 27.8933 54.9246 27.8933 54.9246H27.7656V54.3153L28.1672 55.312C28.1829 55.3511 28.2225 55.3511 28.2225 55.3511H28.645C28.645 55.3511 28.6847 55.3511 28.7004 55.312L29.1457 54.2094C29.1611 54.1712 29.1165 54.1712 29.1165 54.1712V54.1712ZM27.3366 54.9246H27.0964C27.0007 54.9246 26.9229 54.8472 26.9229 54.7515C26.9229 54.6559 27.0007 54.578 27.0964 54.578H27.1635C27.2589 54.578 27.3366 54.6559 27.3366 54.7515V54.9246Z\", fill: \"white\" })));\n};\n//# sourceMappingURL=Illustration.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nimport { DefaultIllustration } from \"./Illustration\";\nconst Guide = forwardRef((_a, ref) => {\n var { className, illustration, size = \"medium\", color } = _a, rest = __rest(_a, [\"className\", \"illustration\", \"size\", \"color\"]);\n return (React.createElement(\"div\", Object.assign({ ref: ref, className: cl(\"navds-guide\", className) }, rest),\n React.createElement(\"div\", { className: cl(\"navds-guide__illustration\", `navds-guide__illustration--${size}`) }, illustration !== null && illustration !== void 0 ? illustration : React.createElement(DefaultIllustration, null))));\n});\nexport default Guide;\n//# sourceMappingURL=Guide.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 React, { forwardRef } from \"react\";\nimport Guide from \"./Guide\";\nimport cl from \"clsx\";\nexport const GuidePanel = forwardRef((_a, ref) => {\n var { children, className, illustration, poster = false, color } = _a, rest = __rest(_a, [\"children\", \"className\", \"illustration\", \"poster\", \"color\"]);\n return (React.createElement(\"div\", Object.assign({}, rest, { ref: ref, className: cl(\"navds-guide-panel\", className, {\n \"navds-guide-panel--poster\": poster,\n }) }),\n React.createElement(Guide, { size: poster ? \"medium\" : \"small\", illustration: illustration }),\n React.createElement(\"div\", { className: \"navds-guide-panel__content\" }, children)));\n});\nexport default GuidePanel;\n//# sourceMappingURL=GuidePanel.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 { Helptext as HelpTextIcon, HelptextFilled } from \"@navikt/ds-icons\";\nimport cl from \"clsx\";\nimport React, { forwardRef, useMemo, useRef, useState } from \"react\";\nimport { Popover, mergeRefs } from \"..\";\nexport const HelpText = forwardRef((_a, ref) => {\n var { className, children, placement = \"top\", strategy = \"absolute\", title = \"hjelp\", onClick } = _a, rest = __rest(_a, [\"className\", \"children\", \"placement\", \"strategy\", \"title\", \"onClick\"]);\n const buttonRef = useRef(null);\n const mergedRef = useMemo(() => mergeRefs([buttonRef, ref]), [ref]);\n const [open, setOpen] = useState(false);\n return (React.createElement(\"div\", { className: \"navds-help-text\" },\n React.createElement(\"button\", Object.assign({}, rest, { ref: mergedRef, onClick: (e) => {\n setOpen((x) => !x);\n onClick === null || onClick === void 0 ? void 0 : onClick(e);\n }, className: cl(className, \"navds-help-text__button\"), type: \"button\", \"aria-expanded\": open }),\n React.createElement(HelpTextIcon, { className: \"navds-help-text__icon\", title: title }),\n React.createElement(HelptextFilled, { className: \"navds-help-text__icon navds-help-text__icon--filled\", title: title })),\n React.createElement(Popover, { onClose: () => setOpen(false), className: \"navds-help-text__popover\", open: open, anchorEl: buttonRef.current, placement: placement, strategy: strategy },\n React.createElement(Popover.Content, { className: \"navds-body-short\" }, children))));\n});\nexport default HelpText;\n//# sourceMappingURL=HelpText.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nexport const Link = forwardRef((_a, ref) => {\n var { as: Component = \"a\", className } = _a, rest = __rest(_a, [\"as\", \"className\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(\"navds-link\", className) })));\n});\nexport default Link;\n//# sourceMappingURL=Link.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nexport const LinkPanelTitle = forwardRef((_a, ref) => {\n var { className, as: Component = \"div\" } = _a, rest = __rest(_a, [\"className\", \"as\"]);\n return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl(\"navds-link-panel__title\", \"navds-heading\", \"navds-heading--medium\", className) })));\n});\n//# sourceMappingURL=LinkPanelTitle.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nimport { BodyLong } from \"..\";\nexport const LinkPanelDescription = forwardRef((_a, ref) => {\n var { className } = _a, rest = __rest(_a, [\"className\"]);\n return (React.createElement(BodyLong, Object.assign({}, rest, { as: \"div\", ref: ref, className: cl(\"navds-link-panel__description\", className) })));\n});\n//# sourceMappingURL=LinkPanelDescription.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 React, { forwardRef } from \"react\";\nimport { Panel } from \"..\";\nimport { Next } from \"@navikt/ds-icons\";\nimport cl from \"clsx\";\nimport { LinkPanelTitle } from \"./LinkPanelTitle\";\nimport { LinkPanelDescription, } from \"./LinkPanelDescription\";\nexport const LinkPanelComponent = forwardRef((_a, ref) => {\n var { children, as = \"a\", border = true, className } = _a, rest = __rest(_a, [\"children\", \"as\", \"border\", \"className\"]);\n return (React.createElement(Panel, Object.assign({}, rest, { as: as, border: border, ref: ref, className: cl(\"navds-link-panel\", className) }),\n React.createElement(\"div\", { className: \"navds-link-panel__content\" }, children),\n React.createElement(Next, { className: \"navds-link-panel__chevron\", \"aria-hidden\": true })));\n});\nconst LinkPanel = LinkPanelComponent;\nLinkPanel.Title = LinkPanelTitle;\nLinkPanel.Description = LinkPanelDescription;\nexport default LinkPanel;\n//# sourceMappingURL=LinkPanel.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nimport { Button } from \"..\";\nexport const Item = forwardRef((_a, ref) => {\n var { children, as: Component = \"button\", selected = false, className } = _a, rest = __rest(_a, [\"children\", \"as\", \"selected\", \"className\"]);\n return (React.createElement(Button, Object.assign({ as: Component, variant: \"tertiary\", \"aria-current\": selected, ref: ref, className: cl(\"navds-pagination__item\", className, {\n \"navds-pagination__item--selected\": selected,\n }) }, (Component === \"button\" && { type: \"button\" }), rest), children));\n});\nexport default Item;\n//# sourceMappingURL=PaginationItem.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nimport { Back, Next } from \"@navikt/ds-icons\";\nimport { BodyShort } from \"..\";\nimport PaginationItem from \"./PaginationItem\";\nexport const getSteps = ({ page, count, boundaryCount = 1, siblingCount = 1, }) => {\n var _a, _b;\n const range = (start, end) => Array.from({ length: end - start + 1 }, (_, i) => start + i);\n if (count <= (boundaryCount + siblingCount) * 2 + 3)\n return range(1, count);\n const startPages = range(1, boundaryCount);\n const endPages = range(count - boundaryCount + 1, count);\n const siblingsStart = Math.max(Math.min(page - siblingCount, count - boundaryCount - siblingCount * 2 - 1), boundaryCount + 2);\n const siblingsEnd = siblingsStart + siblingCount * 2;\n return [\n ...startPages,\n siblingsStart - ((_a = startPages[startPages.length - 1]) !== null && _a !== void 0 ? _a : 0) === 2\n ? siblingsStart - 1\n : \"ellipsis\",\n ...range(siblingsStart, siblingsEnd),\n ((_b = endPages[0]) !== null && _b !== void 0 ? _b : count + 1) - siblingsEnd === 2\n ? siblingsEnd + 1\n : \"ellipsis\",\n ...endPages,\n ];\n};\nexport const Pagination = forwardRef((_a, ref) => {\n var { page, onPageChange, count, boundaryCount = 1, siblingCount = 1, className, size = \"medium\", prevNextTexts = false, renderItem: Item = (item) => (React.createElement(PaginationItem, Object.assign({}, item))) } = _a, rest = __rest(_a, [\"page\", \"onPageChange\", \"count\", \"boundaryCount\", \"siblingCount\", \"className\", \"size\", \"prevNextTexts\", \"renderItem\"]);\n if (page < 1) {\n console.error(\"page cannot be less than 1\");\n return null;\n }\n if (count < 1) {\n console.error(\"count cannot be less than 1\");\n return null;\n }\n if (boundaryCount < 0) {\n console.error(\"boundaryCount cannot be less than 0\");\n return null;\n }\n if (siblingCount < 0) {\n console.error(\"siblingCount cannot be less than 0\");\n return null;\n }\n return (React.createElement(\"nav\", Object.assign({ ref: ref }, rest, { className: cl(\"navds-pagination\", `navds-pagination--${size}`, className) }),\n React.createElement(\"ul\", { className: \"navds-pagination__list\" },\n React.createElement(\"li\", null,\n React.createElement(Item, { className: cl(\"navds-pagination__prev-next\", {\n \"navds-pagination--invisible\": page === 1,\n \"navds-pagination--prev-next--with-text\": prevNextTexts,\n }), disabled: page === 1, onClick: () => onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(page - 1), page: page - 1, size: size, icon: React.createElement(Back, Object.assign({ className: \"navds-pagination__prev-next-icon\" }, (prevNextTexts\n ? { \"aria-hidden\": true }\n : { title: \"Forrige\" }))) }, prevNextTexts && (React.createElement(BodyShort, { size: size === \"xsmall\" ? \"small\" : size, className: \"navds-pagination__prev-text\" }, \"Forrige\")))),\n getSteps({ page, count, siblingCount, boundaryCount }).map((step, i) => {\n const n = Number(step);\n return isNaN(n) ? (React.createElement(\"li\", { className: \"navds-pagination__ellipsis\", key: `${step}${i}` },\n React.createElement(BodyShort, { size: size === \"xsmall\" ? \"small\" : size }, \"...\"))) : (React.createElement(\"li\", { key: step },\n React.createElement(Item, { onClick: () => onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(n), selected: page === n, page: n, size: size },\n React.createElement(BodyShort, { size: size === \"xsmall\" ? \"small\" : size }, n))));\n }),\n React.createElement(\"li\", null,\n React.createElement(Item, { className: cl(\"navds-pagination__prev-next\", {\n \"navds-pagination--invisible\": page === count,\n \"navds-pagination--prev-next--with-text\": prevNextTexts,\n }), disabled: page === count, onClick: () => onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(page + 1), page: page + 1, size: size, icon: React.createElement(Next, Object.assign({ className: \"navds-pagination__prev-next-icon\" }, (prevNextTexts\n ? { \"aria-hidden\": true }\n : { title: \"Neste\" }))), iconPosition: \"right\" }, prevNextTexts && (React.createElement(BodyShort, { size: size === \"xsmall\" ? \"small\" : size, className: \"navds-pagination__next-text\" }, \"Neste\")))))));\n});\nPagination.Item = PaginationItem;\nexport default Pagination;\n//# sourceMappingURL=Pagination.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 React, { forwardRef } from \"react\";\nimport cl from \"clsx\";\nexport const Panel = forwardRef((_a, ref) => {\n var { children, className, border = false, as: Component = \"div\" } = _a, rest = __rest(_a, [\"children\", \"className\", \"border\", \"as\"]);\n return (React.createElement(Component, Object.assign({ ref: ref, className: cl(\"navds-panel\", className, {\n \"navds-panel--border\": border,\n }) }, rest), children));\n});\nexport default Panel;\n//# sourceMappingURL=Panel.js.map","function t(t){return t.split(\"-\")[1]}function e(t){return\"y\"===t?\"height\":\"width\"}function n(t){return t.split(\"-\")[0]}function o(t){return[\"top\",\"bottom\"].includes(n(t))?\"x\":\"y\"}function i(i,r,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,m=o(r),u=e(m),g=l[u]/2-s[u]/2,d=\"x\"===m;let p;switch(n(r)){case\"top\":p={x:c,y:l.y-s.height};break;case\"bottom\":p={x:c,y:l.y+l.height};break;case\"right\":p={x:l.x+l.width,y:f};break;case\"left\":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y}}switch(t(r)){case\"start\":p[m]-=g*(a&&d?-1:1);break;case\"end\":p[m]+=g*(a&&d?-1:1)}return p}const r=async(t,e,n)=>{const{placement:o=\"bottom\",strategy:r=\"absolute\",middleware:a=[],platform:l}=n,s=a.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:r}),{x:m,y:u}=i(f,o,c),g=o,d={},p=0;for(let n=0;n({name:\"arrow\",options:n,async fn(i){const{element:r,padding:l=0}=n||{},{x:s,y:c,placement:f,rects:u,platform:g,elements:d}=i;if(null==r)return{};const p=a(l),h={x:s,y:c},y=o(f),x=e(y),w=await g.getDimensions(r),v=\"y\"===y,b=v?\"top\":\"left\",R=v?\"bottom\":\"right\",A=v?\"clientHeight\":\"clientWidth\",P=u.reference[x]+u.reference[y]-h[y]-u.floating[x],T=h[y]-u.reference[y],O=await(null==g.getOffsetParent?void 0:g.getOffsetParent(r));let E=O?O[A]:0;E&&await(null==g.isElement?void 0:g.isElement(O))||(E=d.floating[A]||u.floating[x]);const D=P/2-T/2,L=p[b],k=E-w[x]-p[R],B=E/2-w[x]/2+D,C=m(L,B,k),H=null!=t(f)&&B!=C&&u.reference[x]/2-(Bt.concat(e,e+\"-start\",e+\"-end\")),[]),p={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"};function h(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}function y(n,i,r){void 0===r&&(r=!1);const a=t(n),l=o(n),s=e(l);let c=\"x\"===l?a===(r?\"end\":\"start\")?\"right\":\"left\":\"start\"===a?\"bottom\":\"top\";return i.reference[s]>i.floating[s]&&(c=h(c)),{main:c,cross:h(c)}}const x={start:\"end\",end:\"start\"};function w(t){return t.replace(/start|end/g,(t=>x[t]))}const v=function(e){return void 0===e&&(e={}),{name:\"autoPlacement\",options:e,async fn(o){var i,r,a;const{rects:l,middlewareData:c,placement:f,platform:m,elements:u}=o,{crossAxis:g=!1,alignment:p,allowedPlacements:h=d,autoAlignment:x=!0,...v}=e,b=void 0!==p||h===d?function(e,o,i){return(e?[...i.filter((n=>t(n)===e)),...i.filter((n=>t(n)!==e))]:i.filter((t=>n(t)===t))).filter((n=>!e||t(n)===e||!!o&&w(n)!==n))}(p||null,x,h):h,R=await s(o,v),A=(null==(i=c.autoPlacement)?void 0:i.index)||0,P=b[A];if(null==P)return{};const{main:T,cross:O}=y(P,l,await(null==m.isRTL?void 0:m.isRTL(u.floating)));if(f!==P)return{reset:{placement:b[0]}};const E=[R[n(P)],R[T],R[O]],D=[...(null==(r=c.autoPlacement)?void 0:r.overflows)||[],{placement:P,overflows:E}],L=b[A+1];if(L)return{data:{index:A+1,overflows:D},reset:{placement:L}};const k=D.map((e=>{const n=t(e.placement);return[e.placement,n&&g?e.overflows.slice(0,2).reduce(((t,e)=>t+e),0):e.overflows[0],e.overflows]})).sort(((t,e)=>t[1]-e[1])),B=(null==(a=k.filter((e=>e[2].slice(0,t(e[0])?2:3).every((t=>t<=0))))[0])?void 0:a[0])||k[0][0];return B!==f?{data:{index:A+1,overflows:D},reset:{placement:B}}:{}}}};const b=function(e){return void 0===e&&(e={}),{name:\"flip\",options:e,async fn(o){var i;const{placement:r,middlewareData:a,rects:l,initialPlacement:c,platform:f,elements:m}=o,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:d,fallbackStrategy:p=\"bestFit\",fallbackAxisSideDirection:x=\"none\",flipAlignment:v=!0,...b}=e,R=n(r),A=n(c)===c,P=await(null==f.isRTL?void 0:f.isRTL(m.floating)),T=d||(A||!v?[h(c)]:function(t){const e=h(t);return[w(t),e,w(e)]}(c));d||\"none\"===x||T.push(...function(e,o,i,r){const a=t(e);let l=function(t,e,n){const o=[\"left\",\"right\"],i=[\"right\",\"left\"],r=[\"top\",\"bottom\"],a=[\"bottom\",\"top\"];switch(t){case\"top\":case\"bottom\":return n?e?i:o:e?o:i;case\"left\":case\"right\":return e?r:a;default:return[]}}(n(e),\"start\"===i,r);return a&&(l=l.map((t=>t+\"-\"+a)),o&&(l=l.concat(l.map(w)))),l}(c,v,x,P));const O=[c,...T],E=await s(o,b),D=[];let L=(null==(i=a.flip)?void 0:i.overflows)||[];if(u&&D.push(E[R]),g){const{main:t,cross:e}=y(r,l,P);D.push(E[t],E[e])}if(L=[...L,{placement:r,overflows:D}],!D.every((t=>t<=0))){var k,B;const t=((null==(k=a.flip)?void 0:k.index)||0)+1,e=O[t];if(e)return{data:{index:t,overflows:L},reset:{placement:e}};let n=null==(B=L.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:B.placement;if(!n)switch(p){case\"bestFit\":{var C;const t=null==(C=L.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:C[0];t&&(n=t);break}case\"initialPlacement\":n=c}if(r!==n)return{reset:{placement:n}}}return{}}}};function R(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function A(t){return g.some((e=>t[e]>=0))}const P=function(t){return void 0===t&&(t={}),{name:\"hide\",options:t,async fn(e){const{strategy:n=\"referenceHidden\",...o}=t,{rects:i}=e;switch(n){case\"referenceHidden\":{const t=R(await s(e,{...o,elementContext:\"reference\"}),i.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:A(t)}}}case\"escaped\":{const t=R(await s(e,{...o,altBoundary:!0}),i.floating);return{data:{escapedOffsets:t,escaped:A(t)}}}default:return{}}}}},T=function(t){return void 0===t&&(t={}),{name:\"inline\",options:t,async fn(e){const{placement:i,elements:r,rects:s,platform:m,strategy:u}=e,{padding:g=2,x:d,y:p}=t,h=l(m.convertOffsetParentRelativeRectToViewportRelativeRect?await m.convertOffsetParentRelativeRectToViewportRelativeRect({rect:s.reference,offsetParent:await(null==m.getOffsetParent?void 0:m.getOffsetParent(r.floating)),strategy:u}):s.reference),y=await(null==m.getClientRects?void 0:m.getClientRects(r.reference))||[],x=a(g);const w=await m.getElementRects({reference:{getBoundingClientRect:function(){if(2===y.length&&y[0].left>y[1].right&&null!=d&&null!=p)return y.find((t=>d>t.left-x.left&&dt.top-x.top&&p=2){if(\"x\"===o(i)){const t=y[0],e=y[y.length-1],o=\"top\"===n(i),r=t.top,a=e.bottom,l=o?t.left:e.left,s=o?t.right:e.right;return{top:r,bottom:a,left:l,right:s,width:s-l,height:a-r,x:l,y:r}}const t=\"left\"===n(i),e=f(...y.map((t=>t.right))),r=c(...y.map((t=>t.left))),a=y.filter((n=>t?n.left===r:n.right===e)),l=a[0].top,s=a[a.length-1].bottom;return{top:l,bottom:s,left:r,right:e,width:e-r,height:s-l,x:r,y:l}}return h}},floating:r.floating,strategy:u});return s.reference.x!==w.reference.x||s.reference.y!==w.reference.y||s.reference.width!==w.reference.width||s.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}};const O=function(e){return void 0===e&&(e=0),{name:\"offset\",options:e,async fn(i){const{x:r,y:a}=i,l=await async function(e,i){const{placement:r,platform:a,elements:l}=e,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=n(r),f=t(r),m=\"x\"===o(r),u=[\"left\",\"top\"].includes(c)?-1:1,g=s&&m?-1:1,d=\"function\"==typeof i?i(e):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}=\"number\"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&\"number\"==typeof y&&(h=\"end\"===f?-1*y:y),m?{x:h*g,y:p*u}:{x:p*u,y:h*g}}(i,e);return{x:r+l.x,y:a+l.y,data:l}}}};function E(t){return\"x\"===t?\"y\":\"x\"}const D=function(t){return void 0===t&&(t={}),{name:\"shift\",options:t,async fn(e){const{x:i,y:r,placement:a}=e,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...u}=t,g={x:i,y:r},d=await s(e,u),p=o(n(a)),h=E(p);let y=g[p],x=g[h];if(l){const t=\"y\"===p?\"bottom\":\"right\";y=m(y+d[\"y\"===p?\"top\":\"left\"],y,y-d[t])}if(c){const t=\"y\"===h?\"bottom\":\"right\";x=m(x+d[\"y\"===h?\"top\":\"left\"],x,x-d[t])}const w=f.fn({...e,[p]:y,[h]:x});return{...w,data:{x:w.x-i,y:w.y-r}}}}},L=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:i,y:r,placement:a,rects:l,middlewareData:s}=e,{offset:c=0,mainAxis:f=!0,crossAxis:m=!0}=t,u={x:i,y:r},g=o(a),d=E(g);let p=u[g],h=u[d];const y=\"function\"==typeof c?c(e):c,x=\"number\"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const t=\"y\"===g?\"height\":\"width\",e=l.reference[g]-l.floating[t]+x.mainAxis,n=l.reference[g]+l.reference[t]-x.mainAxis;pn&&(p=n)}if(m){var w,v;const t=\"y\"===g?\"width\":\"height\",e=[\"top\",\"left\"].includes(n(a)),o=l.reference[d]-l.floating[t]+(e&&(null==(w=s.offset)?void 0:w[d])||0)+(e?0:x.crossAxis),i=l.reference[d]+l.reference[t]+(e?0:(null==(v=s.offset)?void 0:v[d])||0)-(e?x.crossAxis:0);hi&&(h=i)}return{[g]:p,[d]:h}}}},k=function(e){return void 0===e&&(e={}),{name:\"size\",options:e,async fn(i){const{placement:r,rects:a,platform:l,elements:m}=i,{apply:u=(()=>{}),...g}=e,d=await s(i,g),p=n(r),h=t(r),y=\"x\"===o(r),{width:x,height:w}=a.floating;let v,b;\"top\"===p||\"bottom\"===p?(v=p,b=h===(await(null==l.isRTL?void 0:l.isRTL(m.floating))?\"start\":\"end\")?\"left\":\"right\"):(b=p,v=\"end\"===h?\"top\":\"bottom\");const R=w-d[v],A=x-d[b];let P=R,T=A;if(y?T=c(x-d.right-d.left,A):P=c(w-d.bottom-d.top,R),!i.middlewareData.shift&&!h){const t=f(d.left,0),e=f(d.right,0),n=f(d.top,0),o=f(d.bottom,0);y?T=x-2*(0!==t||0!==e?t+e:f(d.left,d.right)):P=w-2*(0!==n||0!==o?n+o:f(d.top,d.bottom))}await u({...i,availableWidth:T,availableHeight:P});const O=await l.getDimensions(m.floating);return x!==O.width||w!==O.height?{reset:{rects:!0}}:{}}}};export{u as arrow,v as autoPlacement,r as computePosition,s as detectOverflow,b as flip,P as hide,T as inline,L as limitShift,O as offset,l as rectToClientRect,D as shift,k as size};\n","import{rectToClientRect as t,computePosition as e}from\"@floating-ui/core\";export{arrow,autoPlacement,detectOverflow,flip,hide,inline,limitShift,offset,shift,size}from\"@floating-ui/core\";function n(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function o(t){return n(t).getComputedStyle(t)}const i=Math.min,r=Math.max,l=Math.round;function c(t){const e=o(t);let n=parseFloat(e.width),i=parseFloat(e.height);const r=t.offsetWidth,c=t.offsetHeight,s=l(n)!==r||l(i)!==c;return s&&(n=r,i=c),{width:n,height:i,fallback:s}}function s(t){return h(t)?(t.nodeName||\"\").toLowerCase():\"\"}let f;function u(){if(f)return f;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(f=t.brands.map((t=>t.brand+\"/\"+t.version)).join(\" \"),f):navigator.userAgent}function a(t){return t instanceof n(t).HTMLElement}function d(t){return t instanceof n(t).Element}function h(t){return t instanceof n(t).Node}function p(t){if(\"undefined\"==typeof ShadowRoot)return!1;return t instanceof n(t).ShadowRoot||t instanceof ShadowRoot}function g(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=o(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&![\"inline\",\"contents\"].includes(r)}function m(t){return[\"table\",\"td\",\"th\"].includes(s(t))}function y(t){const e=/firefox/i.test(u()),n=o(t),i=n.backdropFilter||n.WebkitBackdropFilter;return\"none\"!==n.transform||\"none\"!==n.perspective||!!i&&\"none\"!==i||e&&\"filter\"===n.willChange||e&&!!n.filter&&\"none\"!==n.filter||[\"transform\",\"perspective\"].some((t=>n.willChange.includes(t)))||[\"paint\",\"layout\",\"strict\",\"content\"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function x(){return/^((?!chrome|android).)*safari/i.test(u())}function w(t){return[\"html\",\"body\",\"#document\"].includes(s(t))}function v(t){return d(t)?t:t.contextElement}const b={x:1,y:1};function L(t){const e=v(t);if(!a(e))return b;const n=e.getBoundingClientRect(),{width:o,height:i,fallback:r}=c(e);let s=(r?l(n.width):n.width)/o,f=(r?l(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),f&&Number.isFinite(f)||(f=1),{x:s,y:f}}function E(e,o,i,r){var l,c;void 0===o&&(o=!1),void 0===i&&(i=!1);const s=e.getBoundingClientRect(),f=v(e);let u=b;o&&(r?d(r)&&(u=L(r)):u=L(e));const a=f?n(f):window,h=x()&&i;let p=(s.left+(h&&(null==(l=a.visualViewport)?void 0:l.offsetLeft)||0))/u.x,g=(s.top+(h&&(null==(c=a.visualViewport)?void 0:c.offsetTop)||0))/u.y,m=s.width/u.x,y=s.height/u.y;if(f){const t=n(f),e=r&&d(r)?n(r):r;let o=t.frameElement;for(;o&&r&&e!==t;){const t=L(o),e=o.getBoundingClientRect(),i=getComputedStyle(o);e.x+=(o.clientLeft+parseFloat(i.paddingLeft))*t.x,e.y+=(o.clientTop+parseFloat(i.paddingTop))*t.y,p*=t.x,g*=t.y,m*=t.x,y*=t.y,p+=e.x,g+=e.y,o=n(o).frameElement}}return t({width:m,height:y,x:p,y:g})}function R(t){return((h(t)?t.ownerDocument:t.document)||window.document).documentElement}function T(t){return d(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function C(t){return E(R(t)).left+T(t).scrollLeft}function F(t){if(\"html\"===s(t))return t;const e=t.assignedSlot||t.parentNode||p(t)&&t.host||R(t);return p(e)?e.host:e}function W(t){const e=F(t);return w(e)?e.ownerDocument.body:a(e)&&g(e)?e:W(e)}function D(t,e){var o;void 0===e&&(e=[]);const i=W(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),l=n(i);return r?e.concat(l,l.visualViewport||[],g(i)?i:[]):e.concat(i,D(i))}function S(e,i,l){let c;if(\"viewport\"===i)c=function(t,e){const o=n(t),i=R(t),r=o.visualViewport;let l=i.clientWidth,c=i.clientHeight,s=0,f=0;if(r){l=r.width,c=r.height;const t=x();(!t||t&&\"fixed\"===e)&&(s=r.offsetLeft,f=r.offsetTop)}return{width:l,height:c,x:s,y:f}}(e,l);else if(\"document\"===i)c=function(t){const e=R(t),n=T(t),i=t.ownerDocument.body,l=r(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),c=r(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+C(t);const f=-n.scrollTop;return\"rtl\"===o(i).direction&&(s+=r(e.clientWidth,i.clientWidth)-l),{width:l,height:c,x:s,y:f}}(R(e));else if(d(i))c=function(t,e){const n=E(t,!0,\"fixed\"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=a(t)?L(t):{x:1,y:1};return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(i,l);else{const t={...i};if(x()){var s,f;const o=n(e);t.x-=(null==(s=o.visualViewport)?void 0:s.offsetLeft)||0,t.y-=(null==(f=o.visualViewport)?void 0:f.offsetTop)||0}c=t}return t(c)}function A(t,e){return a(t)&&\"fixed\"!==o(t).position?e?e(t):t.offsetParent:null}function H(t,e){const i=n(t);if(!a(t))return i;let r=A(t,e);for(;r&&m(r)&&\"static\"===o(r).position;)r=A(r,e);return r&&(\"html\"===s(r)||\"body\"===s(r)&&\"static\"===o(r).position&&!y(r))?i:r||function(t){let e=F(t);for(;a(e)&&!w(e);){if(y(e))return e;e=F(e)}return null}(t)||i}function V(t,e,n){const o=a(e),i=R(e),r=E(t,!0,\"fixed\"===n,e);let l={scrollLeft:0,scrollTop:0};const c={x:0,y:0};if(o||!o&&\"fixed\"!==n)if((\"body\"!==s(e)||g(i))&&(l=T(e)),a(e)){const t=E(e,!0);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&(c.x=C(i));return{x:r.left+l.scrollLeft-c.x,y:r.top+l.scrollTop-c.y,width:r.width,height:r.height}}const O={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:l,strategy:c}=t;const f=\"clippingAncestors\"===n?function(t,e){const n=e.get(t);if(n)return n;let i=D(t).filter((t=>d(t)&&\"body\"!==s(t))),r=null;const l=\"fixed\"===o(t).position;let c=l?F(t):t;for(;d(c)&&!w(c);){const t=o(c),e=y(c);\"fixed\"===t.position?r=null:(l?e||r:e||\"static\"!==t.position||!r||![\"absolute\",\"fixed\"].includes(r.position))?r=t:i=i.filter((t=>t!==c)),c=F(c)}return e.set(t,i),i}(e,this._c):[].concat(n),u=[...f,l],a=u[0],h=u.reduce(((t,n)=>{const o=S(e,n,c);return t.top=r(o.top,t.top),t.right=i(o.right,t.right),t.bottom=i(o.bottom,t.bottom),t.left=r(o.left,t.left),t}),S(e,a,c));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=a(n),r=R(n);if(n===r)return e;let l={scrollLeft:0,scrollTop:0},c={x:1,y:1};const f={x:0,y:0};if((i||!i&&\"fixed\"!==o)&&((\"body\"!==s(n)||g(r))&&(l=T(n)),a(n))){const t=E(n);c=L(n),f.x=t.x+n.clientLeft,f.y=t.y+n.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+f.x,y:e.y*c.y-l.scrollTop*c.y+f.y}},isElement:d,getDimensions:function(t){return a(t)?c(t):t.getBoundingClientRect()},getOffsetParent:H,getDocumentElement:R,getScale:L,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const i=this.getOffsetParent||H,r=this.getDimensions;return{reference:V(e,await i(n),o),floating:{x:0,y:0,...await r(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>\"rtl\"===o(t).direction};function P(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:c=!1}=o,s=i&&!c,f=s||r?[...d(t)?D(t):t.contextElement?D(t.contextElement):[],...D(e)]:[];f.forEach((t=>{s&&t.addEventListener(\"scroll\",n,{passive:!0}),r&&t.addEventListener(\"resize\",n)}));let u,a=null;if(l){let o=!0;a=new ResizeObserver((()=>{o||n(),o=!1})),d(t)&&!c&&a.observe(t),d(t)||!t.contextElement||c||a.observe(t.contextElement),a.observe(e)}let h=c?E(t):null;return c&&function e(){const o=E(t);!h||o.x===h.x&&o.y===h.y&&o.width===h.width&&o.height===h.height||n();h=o,u=requestAnimationFrame(e)}(),n(),()=>{var t;f.forEach((t=>{s&&t.removeEventListener(\"scroll\",n),r&&t.removeEventListener(\"resize\",n)})),null==(t=a)||t.disconnect(),a=null,c&&cancelAnimationFrame(u)}}const z=(t,n,o)=>{const i=new Map,r={platform:O,...o},l={...r.platform,_c:i};return e(t,n,{...r,platform:l})};export{P as autoUpdate,z as computePosition,D as getOverflowAncestors,O as platform};\n","import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\n/**\n * A data provider that provides data to position an inner element of the\n * floating element (usually a triangle or caret) so that it is centered to the\n * reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => {\n const {\n element,\n padding\n } = options;\n function isRef(value) {\n return Object.prototype.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(args) {\n if (isRef(element)) {\n if (element.current != null) {\n return arrow$1({\n element: element.current,\n padding\n }).fn(args);\n }\n return {};\n } else if (element) {\n return arrow$1({\n element,\n padding\n }).fn(args);\n }\n return {};\n }\n };\n};\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length, i, keys;\n if (a && b && typeof a == 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/react\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: null,\n y: null,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const [reference, _setReference] = React.useState(null);\n const [floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (referenceRef.current !== node) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (floatingRef.current !== node) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n isPositioned: true\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (reference && floating) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(reference, floating, update);\n } else {\n update();\n }\n }\n }, [reference, floating, update, whileElementsMountedRef]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference,\n floating\n }), [reference, floating]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n reference: setReference,\n floating: setFloating\n }), [data, update, refs, elements, setReference, setFloating]);\n}\n\nexport { arrow, useFloating };\n","import { getOverflowAncestors, offset, detectOverflow, useFloating as useFloating$1 } from '@floating-ui/react-dom';\nexport * from '@floating-ui/react-dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect, useRef } from 'react';\nimport { hideOthers } from 'aria-hidden';\nimport { tabbable } from 'tabbable';\nimport { createPortal, flushSync } from 'react-dom';\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\nlet serverHandoffComplete = false;\nlet count = 0;\nconst genId = () => \"floating-ui-\" + count++;\nfunction useFloatingId() {\n const [id, setId] = React.useState(() => serverHandoffComplete ? genId() : undefined);\n index(() => {\n if (id == null) {\n setId(genId());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(() => {\n if (!serverHandoffComplete) {\n serverHandoffComplete = true;\n }\n }, []);\n return id;\n}\n\n// `toString()` prevents bundlers from trying to `import { useId } from 'react'`\nconst useReactId = React[/*#__PURE__*/'useId'.toString()];\n\n/**\n * Uses React 18's built-in `useId()` when available, or falls back to a\n * slightly less performant (requiring a double render) implementation for\n * earlier React versions.\n * @see https://floating-ui.com/docs/useId\n */\nconst useId = useReactId || useFloatingId;\n\nfunction createPubSub() {\n const map = new Map();\n return {\n emit(event, data) {\n var _map$get;\n (_map$get = map.get(event)) == null ? void 0 : _map$get.forEach(handler => handler(data));\n },\n on(event, listener) {\n map.set(event, [...(map.get(event) || []), listener]);\n },\n off(event, listener) {\n map.set(event, (map.get(event) || []).filter(l => l !== listener));\n }\n };\n}\n\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\nconst useFloatingParentNodeId = () => {\n var _React$useContext;\n return ((_React$useContext = React.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;\n};\nconst useFloatingTree = () => React.useContext(FloatingTreeContext);\n\n/**\n * Registers a node into the floating tree, returning its id.\n */\nconst useFloatingNodeId = customParentId => {\n const id = useId();\n const tree = useFloatingTree();\n const reactParentId = useFloatingParentNodeId();\n const parentId = customParentId || reactParentId;\n index(() => {\n const node = {\n id,\n parentId\n };\n tree == null ? void 0 : tree.addNode(node);\n return () => {\n tree == null ? void 0 : tree.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n};\n\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nconst FloatingNode = _ref => {\n let {\n children,\n id\n } = _ref;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/React.createElement(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId])\n }, children);\n};\n\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM (i.e. portalled to a common node, rather than their\n * respective parent).\n * @see https://floating-ui.com/docs/FloatingTree\n */\nconst FloatingTree = _ref2 => {\n let {\n children\n } = _ref2;\n const nodesRef = React.useRef([]);\n const addNode = React.useCallback(node => {\n nodesRef.current = [...nodesRef.current, node];\n }, []);\n const removeNode = React.useCallback(node => {\n nodesRef.current = nodesRef.current.filter(n => n !== node);\n }, []);\n const events = React.useState(() => createPubSub())[0];\n return /*#__PURE__*/React.createElement(FloatingTreeContext.Provider, {\n value: React.useMemo(() => ({\n nodesRef,\n addNode,\n removeNode,\n events\n }), [nodesRef, addNode, removeNode, events])\n }, children);\n};\n\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\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\nfunction getWindow(value) {\n return getDocument(value).defaultView || window;\n}\nfunction isElement(value) {\n return value ? value instanceof getWindow(value).Element : false;\n}\nfunction isHTMLElement(value) {\n return value ? value instanceof getWindow(value).HTMLElement : false;\n}\nfunction isShadowRoot(node) {\n // Browsers without `ShadowRoot` support\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n const OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\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}\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 // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n do {\n if (next && parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n } while (next);\n }\n\n // Give up, the result is false\n return false;\n}\n\nfunction getChildren(nodes, id) {\n let allChildren = nodes.filter(node => {\n var _node$context;\n return node.parentId === id && ((_node$context = node.context) == null ? void 0 : _node$context.open);\n }) || [];\n let currentChildren = allChildren;\n while (currentChildren.length) {\n currentChildren = nodes.filter(node => {\n var _currentChildren;\n return (_currentChildren = currentChildren) == null ? void 0 : _currentChildren.some(n => {\n var _node$context2;\n return node.parentId === n.id && ((_node$context2 = node.context) == null ? void 0 : _node$context2.open);\n });\n }) || [];\n allChildren = allChildren.concat(currentChildren);\n }\n return allChildren;\n}\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}\n\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInside = false;\n const length = polygon.length;\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] || [0, 0];\n const [xj, yj] = polygon[j] || [0, 0];\n const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\nconst svgNs = 'http://www.w3.org/2000/svg';\nfunction createPolygonElement(points, doc, isRect) {\n var _win$visualViewport, _win$visualViewport2;\n const addVisualOffsets = isSafari();\n const win = doc.defaultView || window;\n const svg = doc.createElementNS(svgNs, 'svg');\n Object.assign(svg.style, {\n position: 'fixed',\n left: (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0) + \"px\",\n top: (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0) + \"px\",\n width: '100%',\n height: '100%',\n pointerEvents: 'none',\n zIndex: 2147483647\n });\n svg.setAttribute('data-type', isRect ? 'rect' : 'triangle');\n const polygon = doc.createElementNS(svgNs, 'polygon');\n polygon.setAttribute('points', points.map(_ref => {\n let [x, y] = _ref;\n return x + \",\" + y;\n }).join(' '));\n Object.assign(polygon.style, {\n pointerEvents: 'auto',\n fill: 'transparent',\n opacity: 0\n });\n svg.appendChild(polygon);\n return svg;\n}\nfunction destroyPolygon(ref) {\n if (ref.current) {\n ref.current.remove();\n ref.current = null;\n }\n}\nfunction safePolygon(_temp) {\n let {\n restMs = 0,\n buffer = 0.5,\n blockPointerEvents = true\n } = _temp === void 0 ? {} : _temp;\n let timeoutId;\n let isInsideRect = false;\n let hasLanded = false;\n const fn = _ref2 => {\n let {\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree,\n polygonRef\n } = _ref2;\n return function onMouseMove(event) {\n var _polygonRef$current;\n function close() {\n destroyPolygon(polygonRef);\n clearTimeout(timeoutId);\n onClose();\n }\n clearTimeout(timeoutId);\n if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n return;\n }\n const {\n clientX,\n clientY\n } = event;\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverReference = contains(elements.domReference, target);\n const isOverFloating = contains(elements.floating, target);\n if (!isLeave && isOverReference) {\n destroyPolygon(polygonRef);\n return;\n }\n if (!isLeave && (isOverReference || isInsideRect && contains(polygonRef.current, target))) {\n return;\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n return;\n }\n\n // If any nested child is open, abort.\n if (tree && getChildren(tree.nodesRef.current, nodeId).some(_ref3 => {\n let {\n context\n } = _ref3;\n return context == null ? void 0 : context.open;\n })) {\n return;\n }\n if (isOverFloating) {\n hasLanded = true;\n }\n\n // The cursor landed, so we destroy the polygon logic\n if (isOverFloating && !isLeave && ((_polygonRef$current = polygonRef.current) == null ? void 0 : _polygonRef$current.dataset.type) !== 'rect') {\n destroyPolygon(polygonRef);\n return;\n }\n const refRect = elements.domReference.getBoundingClientRect();\n const rect = elements.floating.getBoundingClientRect();\n const side = placement.split('-')[0];\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n return close();\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let rectPoly = [];\n switch (side) {\n case 'top':\n rectPoly = [[rect.left, refRect.top + 1], [rect.left, rect.bottom - 1], [rect.right, rect.bottom - 1], [rect.right, refRect.top + 1]];\n isInsideRect = clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= refRect.top + 1;\n break;\n case 'bottom':\n rectPoly = [[rect.left, rect.top + 1], [rect.left, refRect.bottom - 1], [rect.right, refRect.bottom - 1], [rect.right, rect.top + 1]];\n isInsideRect = clientX >= rect.left && clientX <= rect.right && clientY >= refRect.bottom - 1 && clientY <= rect.bottom;\n break;\n case 'left':\n rectPoly = [[rect.right - 1, rect.bottom], [rect.right - 1, rect.top], [refRect.left + 1, rect.top], [refRect.left + 1, rect.bottom]];\n isInsideRect = clientX >= rect.left && clientX <= refRect.left + 1 && clientY >= rect.top && clientY <= rect.bottom;\n break;\n case 'right':\n rectPoly = [[refRect.right - 1, rect.bottom], [refRect.right - 1, rect.top], [rect.left + 1, rect.top], [rect.left + 1, rect.bottom]];\n isInsideRect = clientX >= refRect.right - 1 && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom;\n break;\n }\n function getPolygon(_ref4) {\n let [x, y] = _ref4;\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n switch (side) {\n case 'top':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'bottom':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'left':\n {\n const cursorPointOne = [x + buffer + 1, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x + buffer + 1, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n return [...commonPoints, cursorPointOne, cursorPointTwo];\n }\n case 'right':\n {\n const cursorPointOne = [x - buffer, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x - buffer, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n }\n }\n const poly = isInsideRect ? rectPoly : getPolygon([x, y]);\n if (!polygonRef.current && blockPointerEvents && isLeave) {\n const doc = getDocument(elements.floating);\n polygonRef.current = createPolygonElement(poly, doc, isInsideRect);\n doc.body.appendChild(polygonRef.current);\n }\n if (isInsideRect) {\n return;\n }\n if (!isPointInPolygon([clientX, clientY], poly)) {\n close();\n } else if (restMs && !hasLanded) {\n timeoutId = setTimeout(onClose, restMs);\n }\n };\n };\n return fn;\n}\n\nfunction useLatestRef(value) {\n const ref = useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\nfunction getDelay(value, prop, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n return value == null ? void 0 : value[prop];\n}\n/**\n * Adds hover event listeners that change the open state, like CSS :hover.\n * @see https://floating-ui.com/docs/useHover\n */\nconst useHover = function (context, _temp) {\n let {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true\n } = _temp === void 0 ? {} : _temp;\n const {\n open,\n onOpenChange,\n dataRef,\n events,\n elements: {\n domReference,\n floating\n }\n } = context;\n const tree = useFloatingTree();\n const handleCloseRef = useLatestRef(handleClose);\n const delayRef = useLatestRef(delay);\n const pointerTypeRef = React.useRef();\n const timeoutRef = React.useRef();\n const handlerRef = React.useRef();\n const restTimeoutRef = React.useRef();\n const blockMouseMoveRef = React.useRef(true);\n const polygonRef = React.useRef(null);\n const isHoverOpen = React.useCallback(() => {\n var _dataRef$current$open;\n const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;\n return (type == null ? void 0 : type.includes('mouse')) && type !== 'mousedown';\n }, [dataRef]);\n\n // When dismissing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n function onDismiss() {\n clearTimeout(timeoutRef.current);\n clearTimeout(restTimeoutRef.current);\n blockMouseMoveRef.current = true;\n }\n events.on('dismiss', onDismiss);\n return () => {\n events.off('dismiss', onDismiss);\n };\n }, [enabled, events]);\n React.useEffect(() => {\n if (!enabled || !handleCloseRef.current || !open) {\n return;\n }\n function onLeave() {\n if (isHoverOpen()) {\n onOpenChange(false);\n }\n }\n const html = getDocument(floating).documentElement;\n html.addEventListener('mouseleave', onLeave);\n return () => {\n html.removeEventListener('mouseleave', onLeave);\n };\n }, [floating, open, onOpenChange, enabled, handleCloseRef, dataRef, isHoverOpen]);\n const closeWithDelay = React.useCallback(function (runElseBranch) {\n if (runElseBranch === void 0) {\n runElseBranch = true;\n }\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => onOpenChange(false), closeDelay);\n } else if (runElseBranch) {\n clearTimeout(timeoutRef.current);\n onOpenChange(false);\n }\n }, [delayRef, onOpenChange]);\n const cleanupMouseMoveHandler = React.useCallback(() => {\n if (handlerRef.current) {\n getDocument(floating).removeEventListener('mousemove', handlerRef.current);\n handlerRef.current = undefined;\n }\n }, [floating]);\n\n // Registering the mouse events on the reference directly to bypass React's\n // delegation system. If the cursor was on a disabled element and then entered\n // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n function isClickLikeOpenEvent() {\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n }\n function onMouseEnter(event) {\n clearTimeout(timeoutRef.current);\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || restMs > 0 && getDelay(delayRef.current, 'open') === 0) {\n return;\n }\n dataRef.current.openEvent = event;\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n if (openDelay) {\n timeoutRef.current = setTimeout(() => {\n onOpenChange(true);\n }, openDelay);\n } else {\n onOpenChange(true);\n }\n }\n function onMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n const doc = getDocument(floating);\n clearTimeout(restTimeoutRef.current);\n if (handleCloseRef.current) {\n clearTimeout(timeoutRef.current);\n handlerRef.current && doc.removeEventListener('mousemove', handlerRef.current);\n handlerRef.current = handleCloseRef.current({\n ...context,\n tree,\n polygonRef,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n cleanupMouseMoveHandler();\n closeWithDelay();\n }\n });\n doc.addEventListener('mousemove', handlerRef.current);\n return;\n }\n closeWithDelay();\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n return;\n }\n handleCloseRef.current == null ? void 0 : handleCloseRef.current({\n ...context,\n tree,\n polygonRef,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n cleanupMouseMoveHandler();\n closeWithDelay();\n }\n })(event);\n }\n if (isElement(domReference)) {\n const ref = domReference;\n open && ref.addEventListener('mouseleave', onScrollMouseLeave);\n floating == null ? void 0 : floating.addEventListener('mouseleave', onScrollMouseLeave);\n move && ref.addEventListener('mousemove', onMouseEnter, {\n once: true\n });\n ref.addEventListener('mouseenter', onMouseEnter);\n ref.addEventListener('mouseleave', onMouseLeave);\n return () => {\n open && ref.removeEventListener('mouseleave', onScrollMouseLeave);\n floating == null ? void 0 : floating.removeEventListener('mouseleave', onScrollMouseLeave);\n move && ref.removeEventListener('mousemove', onMouseEnter);\n ref.removeEventListener('mouseenter', onMouseEnter);\n ref.removeEventListener('mouseleave', onMouseLeave);\n };\n }\n }, [domReference, floating, enabled, context, mouseOnly, restMs, move, closeWithDelay, cleanupMouseMoveHandler, onOpenChange, open, tree, delayRef, handleCloseRef, dataRef]);\n index(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n cleanupMouseMoveHandler();\n destroyPolygon(polygonRef);\n }\n }, [open, cleanupMouseMoveHandler]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n clearTimeout(timeoutRef.current);\n clearTimeout(restTimeoutRef.current);\n destroyPolygon(polygonRef);\n };\n }, [enabled, cleanupMouseMoveHandler]);\n return React.useMemo(() => {\n if (!enabled) {\n return {};\n }\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n reference: {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove() {\n if (open || restMs === 0) {\n return;\n }\n clearTimeout(restTimeoutRef.current);\n restTimeoutRef.current = setTimeout(() => {\n if (!blockMouseMoveRef.current) {\n onOpenChange(true);\n }\n }, restMs);\n }\n },\n floating: {\n onMouseEnter() {\n clearTimeout(timeoutRef.current);\n },\n onMouseLeave() {\n events.emit('dismiss', {\n type: 'mouseLeave',\n data: {\n returnFocus: false\n }\n });\n closeWithDelay(false);\n }\n }\n };\n }, [events, enabled, restMs, open, onOpenChange, closeWithDelay]);\n};\n\nconst FloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n delay: 0,\n initialDelay: 0,\n timeoutMs: 0,\n currentId: null,\n setCurrentId: () => {},\n setState: () => {}\n});\nconst useDelayGroupContext = () => React.useContext(FloatingDelayGroupContext);\n\n/**\n * Provides context for a group of floating elements that should share a\n * `delay`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nconst FloatingDelayGroup = _ref => {\n let {\n children,\n delay,\n timeoutMs = 0\n } = _ref;\n const [state, setState] = React.useState({\n delay,\n timeoutMs,\n initialDelay: delay,\n currentId: null\n });\n const setCurrentId = React.useCallback(currentId => {\n setState(state => ({\n ...state,\n currentId\n }));\n }, []);\n return /*#__PURE__*/React.createElement(FloatingDelayGroupContext.Provider, {\n value: React.useMemo(() => ({\n ...state,\n setState,\n setCurrentId\n }), [state, setState, setCurrentId])\n }, children);\n};\nconst useDelayGroup = (_ref2, _ref3) => {\n let {\n open,\n onOpenChange\n } = _ref2;\n let {\n id\n } = _ref3;\n const {\n currentId,\n initialDelay,\n setState,\n timeoutMs\n } = useDelayGroupContext();\n const timeoutIdRef = React.useRef();\n React.useEffect(() => {\n if (currentId) {\n clearTimeout(timeoutIdRef.current);\n setState(state => ({\n ...state,\n delay: {\n open: 1,\n close: getDelay(initialDelay, 'close')\n }\n }));\n if (currentId !== id) {\n onOpenChange(false);\n }\n }\n }, [id, onOpenChange, setState, currentId, initialDelay]);\n React.useEffect(() => {\n function unset() {\n onOpenChange(false);\n setState(state => ({\n ...state,\n delay: initialDelay,\n currentId: null\n }));\n }\n clearTimeout(timeoutIdRef.current);\n if (!open && currentId === id) {\n if (timeoutMs) {\n timeoutIdRef.current = window.setTimeout(unset, timeoutMs);\n } else {\n unset();\n }\n }\n }, [open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]);\n React.useEffect(() => {\n return () => {\n clearTimeout(timeoutIdRef.current);\n };\n }, []);\n};\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n/**\n * Find the real active element. Traverses into shadowRoots.\n */\nfunction activeElement$1(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}\n\nlet rafId = 0;\nfunction enqueueFocus(el, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n cancelPrevious && cancelAnimationFrame(rafId);\n const exec = () => el == null ? void 0 : el.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}\n\nfunction getAncestors(nodes, id) {\n var _nodes$find;\n let allAncestors = [];\n let currentParentId = (_nodes$find = nodes.find(node => node.id === id)) == null ? void 0 : _nodes$find.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode == null ? void 0 : currentNode.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}\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}\n\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, direction) {\n const allTabbable = tabbable(container, getTabbableOptions());\n if (direction === 'prev') {\n allTabbable.reverse();\n }\n const activeIndex = allTabbable.indexOf(activeElement$1(getDocument(container)));\n const nextTabbableElements = allTabbable.slice(activeIndex + 1);\n return nextTabbableElements[0];\n}\nfunction getNextTabbable() {\n return getTabbableIn(document.body, 'next');\n}\nfunction getPreviousTabbable() {\n return getTabbableIn(document.body, 'prev');\n}\nfunction isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nfunction enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}\n\n// `toString()` prevents bundlers from trying to `import { useInsertionEffect } from 'react'`\nconst useInsertionEffect = React[/*#__PURE__*/'useInsertionEffect'.toString()];\nconst useSafeInsertionEffect = useInsertionEffect || (fn => fn());\nfunction useEvent(callback) {\n const ref = React.useRef(() => {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error('Cannot call an event handler while rendering.');\n }\n });\n useSafeInsertionEffect(() => {\n ref.current = callback;\n });\n return React.useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return ref.current == null ? void 0 : ref.current(...args);\n }, []);\n}\n\n// See Diego Haz's Sandbox for making this logic work well on Safari/iOS:\n// https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/FocusTrap.tsx\n\nconst HIDDEN_STYLES = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'fixed',\n whiteSpace: 'nowrap',\n width: '1px',\n top: 0,\n left: 0\n};\nlet activeElement;\nlet timeoutId;\nfunction setActiveElementOnTab(event) {\n if (event.key === 'Tab') {\n activeElement = event.target;\n clearTimeout(timeoutId);\n }\n}\nfunction isTabFocus(event) {\n const result = activeElement === event.relatedTarget;\n activeElement = event.relatedTarget;\n clearTimeout(timeoutId);\n return result;\n}\nconst FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const onFocus = useEvent(props.onFocus);\n const [role, setRole] = React.useState();\n index(() => {\n if (isSafari()) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n // NB: \"group\" role in the Sandbox no longer appears to work, must be a\n // button role.\n setRole('button');\n }\n document.addEventListener('keydown', setActiveElementOnTab);\n return () => {\n document.removeEventListener('keydown', setActiveElementOnTab);\n };\n }, []);\n return /*#__PURE__*/React.createElement(\"span\", _extends({}, props, {\n ref: ref,\n tabIndex: 0\n // Role is only for VoiceOver\n ,\n role: role,\n \"aria-hidden\": role ? undefined : true,\n \"data-floating-ui-focus-guard\": \"\",\n style: HIDDEN_STYLES,\n onFocus: event => {\n if (isSafari() && isMac() && !isTabFocus(event)) {\n // On macOS we need to wait a little bit before moving\n // focus again.\n event.persist();\n timeoutId = window.setTimeout(() => {\n onFocus(event);\n }, 50);\n } else {\n onFocus(event);\n }\n }\n }));\n});\n\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nconst useFloatingPortalNode = function (_temp) {\n let {\n id,\n enabled = true\n } = _temp === void 0 ? {} : _temp;\n const [portalEl, setPortalEl] = React.useState(null);\n const uniqueId = useId();\n const portalContext = usePortalContext();\n index(() => {\n if (!enabled) {\n return;\n }\n const rootNode = id ? document.getElementById(id) : null;\n if (rootNode) {\n rootNode.setAttribute('data-floating-ui-portal', '');\n setPortalEl(rootNode);\n } else {\n const newPortalEl = document.createElement('div');\n newPortalEl.id = id || uniqueId;\n newPortalEl.setAttribute('data-floating-ui-portal', '');\n setPortalEl(newPortalEl);\n const container = (portalContext == null ? void 0 : portalContext.portalNode) || document.body;\n container.appendChild(newPortalEl);\n return () => {\n container.removeChild(newPortalEl);\n };\n }\n }, [id, portalContext, uniqueId, enabled]);\n return portalEl;\n};\n\n/**\n * Portals your floating element outside of the main app node.\n * @see https://floating-ui.com/docs/FloatingPortal\n */\nconst FloatingPortal = _ref => {\n let {\n children,\n id,\n root = null,\n preserveTabOrder = true\n } = _ref;\n const portalNode = useFloatingPortalNode({\n id,\n enabled: !root\n });\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const shouldRenderGuards =\n // The FocusManager and therefore floating element are currently open/\n // rendered.\n !!focusManagerState &&\n // Guards are only for non-modal focus management.\n !focusManagerState.modal && !!(root || portalNode) && preserveTabOrder;\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || !preserveTabOrder || focusManagerState != null && focusManagerState.modal) {\n return;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, preserveTabOrder, focusManagerState == null ? void 0 : focusManagerState.modal]);\n return /*#__PURE__*/React.createElement(PortalContext.Provider, {\n value: React.useMemo(() => ({\n preserveTabOrder,\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [preserveTabOrder, portalNode])\n }, shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _beforeInsideRef$curr;\n (_beforeInsideRef$curr = beforeInsideRef.current) == null ? void 0 : _beforeInsideRef$curr.focus();\n } else {\n const prevTabbable = getPreviousTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n prevTabbable == null ? void 0 : prevTabbable.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(\"span\", {\n \"aria-owns\": portalNode.id,\n style: HIDDEN_STYLES\n }), root ? /*#__PURE__*/createPortal(children, root) : portalNode ? /*#__PURE__*/createPortal(children, portalNode) : null, shouldRenderGuards && portalNode && /*#__PURE__*/React.createElement(FocusGuard, {\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _afterInsideRef$curre;\n (_afterInsideRef$curre = afterInsideRef.current) == null ? void 0 : _afterInsideRef$curre.focus();\n } else {\n const nextTabbable = getNextTabbable() || (focusManagerState == null ? void 0 : focusManagerState.refs.domReference.current);\n nextTabbable == null ? void 0 : nextTabbable.focus();\n (focusManagerState == null ? void 0 : focusManagerState.closeOnFocusOut) && (focusManagerState == null ? void 0 : focusManagerState.onOpenChange(false));\n }\n }\n }));\n};\nconst usePortalContext = () => React.useContext(PortalContext);\n\nconst VisuallyHiddenDismiss = /*#__PURE__*/React.forwardRef(function VisuallyHiddenDismiss(props, ref) {\n return /*#__PURE__*/React.createElement(\"button\", _extends({}, props, {\n ref: ref,\n tabIndex: -1,\n style: HIDDEN_STYLES\n }));\n});\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n */\nfunction FloatingFocusManager(_ref) {\n let {\n context,\n children,\n order = ['content'],\n guards = true,\n initialFocus = 0,\n returnFocus = true,\n modal = true,\n visuallyHiddenDismiss = false,\n closeOnFocusOut = true\n } = _ref;\n const {\n refs,\n nodeId,\n onOpenChange,\n events,\n dataRef,\n elements: {\n domReference,\n floating\n }\n } = context;\n const orderRef = useLatestRef(order);\n const tree = useFloatingTree();\n const portalContext = usePortalContext();\n const [tabbableContentLength, setTabbableContentLength] = React.useState(null);\n\n // Controlled by `useListNavigation`.\n const ignoreInitialFocus = typeof initialFocus === 'number' && initialFocus < 0;\n const startDismissButtonRef = React.useRef(null);\n const endDismissButtonRef = React.useRef(null);\n const preventReturnFocusRef = React.useRef(false);\n const previouslyFocusedElementRef = React.useRef(null);\n const isPointerDownRef = React.useRef(false);\n const isInsidePortal = portalContext != null;\n\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isTypeableCombobox = domReference && domReference.getAttribute('role') === 'combobox' && isTypeableElement(domReference);\n const getTabbableContent = React.useCallback(function (container) {\n if (container === void 0) {\n container = floating;\n }\n return container ? tabbable(container, getTabbableOptions()) : [];\n }, [floating]);\n const getTabbableElements = React.useCallback(container => {\n const content = getTabbableContent(container);\n return orderRef.current.map(type => {\n if (domReference && type === 'reference') {\n return domReference;\n }\n if (floating && type === 'floating') {\n return floating;\n }\n return content;\n }).filter(Boolean).flat();\n }, [domReference, floating, orderRef, getTabbableContent]);\n React.useEffect(() => {\n if (!modal) {\n return;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (getTabbableContent().length === 0 && !isTypeableCombobox) {\n stopEvent(event);\n }\n const els = getTabbableElements();\n const target = getTarget(event);\n if (orderRef.current[0] === 'reference' && target === domReference) {\n stopEvent(event);\n if (event.shiftKey) {\n enqueueFocus(els[els.length - 1]);\n } else {\n enqueueFocus(els[1]);\n }\n }\n if (orderRef.current[1] === 'floating' && target === floating && event.shiftKey) {\n stopEvent(event);\n enqueueFocus(els[0]);\n }\n }\n }\n const doc = getDocument(floating);\n doc.addEventListener('keydown', onKeyDown);\n return () => {\n doc.removeEventListener('keydown', onKeyDown);\n };\n }, [domReference, floating, modal, orderRef, refs, isTypeableCombobox, getTabbableContent, getTabbableElements]);\n React.useEffect(() => {\n if (!closeOnFocusOut) {\n return;\n }\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n setTimeout(() => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext == null ? void 0 : portalContext.portalNode, relatedTarget) || relatedTarget != null && relatedTarget.hasAttribute('data-floating-ui-focus-guard') || tree && (getChildren(tree.nodesRef.current, nodeId).find(node => {\n var _node$context, _node$context2;\n return contains((_node$context = node.context) == null ? void 0 : _node$context.elements.floating, relatedTarget) || contains((_node$context2 = node.context) == null ? void 0 : _node$context2.elements.domReference, relatedTarget);\n }) || getAncestors(tree.nodesRef.current, nodeId).find(node => {\n var _node$context3, _node$context4;\n return ((_node$context3 = node.context) == null ? void 0 : _node$context3.elements.floating) === relatedTarget || ((_node$context4 = node.context) == null ? void 0 : _node$context4.elements.domReference) === relatedTarget;\n })));\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if (relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current &&\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n relatedTarget !== previouslyFocusedElementRef.current) {\n preventReturnFocusRef.current = true;\n // On iOS VoiceOver, dismissing the nested submenu will cause the\n // first item of the list to receive focus. Delaying it appears to fix\n // the issue.\n setTimeout(() => onOpenChange(false));\n }\n }\n if (floating && isHTMLElement(domReference)) {\n domReference.addEventListener('focusout', handleFocusOutside);\n domReference.addEventListener('pointerdown', handlePointerDown);\n !modal && floating.addEventListener('focusout', handleFocusOutside);\n return () => {\n domReference.removeEventListener('focusout', handleFocusOutside);\n domReference.removeEventListener('pointerdown', handlePointerDown);\n !modal && floating.removeEventListener('focusout', handleFocusOutside);\n };\n }\n }, [domReference, floating, modal, nodeId, tree, portalContext, onOpenChange, closeOnFocusOut]);\n React.useEffect(() => {\n var _portalContext$portal;\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from((portalContext == null ? void 0 : (_portalContext$portal = portalContext.portalNode) == null ? void 0 : _portalContext$portal.querySelectorAll('[data-floating-ui-portal]')) || []);\n function getDismissButtons() {\n return [startDismissButtonRef.current, endDismissButtonRef.current].filter(Boolean);\n }\n if (floating && modal) {\n const insideNodes = [floating, ...portalNodes, ...getDismissButtons()];\n const cleanup = hideOthers(orderRef.current.includes('reference') || isTypeableCombobox ? insideNodes.concat(domReference || []) : insideNodes);\n return () => {\n cleanup();\n };\n }\n }, [domReference, floating, modal, orderRef, portalContext, isTypeableCombobox]);\n React.useEffect(() => {\n if (modal && !guards && floating) {\n const tabIndexValues = [];\n const options = getTabbableOptions();\n const allTabbable = tabbable(getDocument(floating).body, options);\n const floatingTabbable = getTabbableElements();\n\n // Exclude all tabbable elements that are part of the order\n const elements = allTabbable.filter(el => !floatingTabbable.includes(el));\n elements.forEach((el, i) => {\n tabIndexValues[i] = el.getAttribute('tabindex');\n el.setAttribute('tabindex', '-1');\n });\n return () => {\n elements.forEach((el, i) => {\n const value = tabIndexValues[i];\n if (value == null) {\n el.removeAttribute('tabindex');\n } else {\n el.setAttribute('tabindex', value);\n }\n });\n };\n }\n }, [floating, modal, guards, getTabbableElements]);\n index(() => {\n if (!floating) return;\n const doc = getDocument(floating);\n let returnFocusValue = returnFocus;\n let preventReturnFocusScroll = false;\n const previouslyFocusedElement = activeElement$1(doc);\n const contextData = dataRef.current;\n previouslyFocusedElementRef.current = previouslyFocusedElement;\n const focusableElements = getTabbableElements(floating);\n const elToFocus = (typeof initialFocus === 'number' ? focusableElements[initialFocus] : initialFocus.current) || floating;\n\n // If the `useListNavigation` hook is active, always ignore `initialFocus`\n // because it has its own handling of the initial focus.\n !ignoreInitialFocus && enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floating\n });\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onDismiss(payload) {\n if (payload.type === 'escapeKey' && refs.domReference.current) {\n previouslyFocusedElementRef.current = refs.domReference.current;\n }\n if (['referencePress', 'escapeKey'].includes(payload.type)) {\n return;\n }\n const returnFocus = payload.data.returnFocus;\n if (typeof returnFocus === 'object') {\n returnFocusValue = true;\n preventReturnFocusScroll = returnFocus.preventScroll;\n } else {\n returnFocusValue = returnFocus;\n }\n }\n events.on('dismiss', onDismiss);\n return () => {\n events.off('dismiss', onDismiss);\n if (contains(floating, activeElement$1(doc)) && refs.domReference.current) {\n previouslyFocusedElementRef.current = refs.domReference.current;\n }\n if (returnFocusValue && isHTMLElement(previouslyFocusedElementRef.current) && !preventReturnFocusRef.current) {\n // `isPointerDownRef.current` to avoid the focus ring from appearing on\n // the reference element when click-toggling it.\n if (!refs.domReference.current || isPointerDownRef.current) {\n enqueueFocus(previouslyFocusedElementRef.current, {\n // When dismissing nested floating elements, by the time the rAF has\n // executed, the menus will all have been unmounted. When they try\n // to get focused, the calls get ignored — leaving the root\n // reference focused as desired.\n cancelPrevious: false,\n preventScroll: preventReturnFocusScroll\n });\n } else {\n var _previouslyFocusedEle;\n // If the user has specified a `keydown` listener that calls\n // setOpen(false) (e.g. selecting an item and closing the floating\n // element), then sync return focus causes `useClick` to immediately\n // re-open it, unless they call `event.preventDefault()` in the\n // `keydown` listener. This helps keep backwards compatibility with\n // older examples.\n contextData.__syncReturnFocus = true;\n\n // In Safari, `useListNavigation` moves focus sync, so making this\n // sync ensures the initial item remains focused despite this being\n // invoked in Strict Mode due to double-invoked useEffects. This also\n // has the positive side effect of closing a modally focus-managed\n //