1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2016],{2779:(e,t,n)=>{"use strict";n.d(t,{W:()=>s});var r=n(4930),i=n(15932),l=n(69021);let a={berlingske:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m21.85 20.98-4.28-4.28a8.823 8.823 0 0 0 2.19-5.82c0-4.9-3.99-8.88-8.88-8.88C5.99 2 2 5.98 2 10.88s3.98 8.88 8.88 8.88c2.22 0 4.24-.82 5.8-2.17l4.28 4.28c.12.12.28.18.44.18.16 0 .32-.06.44-.18.24-.24.24-.64 0-.88l.01-.01Zm-18.6-10.1c0-4.21 3.42-7.63 7.63-7.63s7.63 3.42 7.63 7.63-3.42 7.63-7.63 7.63-7.63-3.43-7.63-7.63Z" fill="currentColor"/></svg>',bt:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m21.98 20.55-4.14-4.14a8.845 8.845 0 0 0 1.94-5.52c0-4.9-3.99-8.89-8.89-8.89S2 5.99 2 10.89s3.99 8.89 8.89 8.89c2.09 0 4-.73 5.52-1.93l4.14 4.14 1.43-1.43v-.01Zm-11.09-2.8c-3.78 0-6.86-3.08-6.86-6.86 0-3.78 3.08-6.86 6.86-6.86 3.78 0 6.86 3.08 6.86 6.86 0 3.78-3.08 6.86-6.86 6.86Z" fill="currentColor"/></svg>',euroinvestor:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m21 21-4.74-4.74m2.28-5.49c0 4.29-3.48 7.77-7.77 7.77-4.29 0-7.77-3.48-7.77-7.77C3 6.48 6.48 3 10.77 3c4.29 0 7.77 3.48 7.77 7.77Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"/></svg>',weekendavisen:'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m21.82 20.93-4.67-4.67a8.59 8.59 0 0 0 2.1-5.64c0-4.75-3.87-8.62-8.63-8.62C5.86 2 2 5.87 2 10.62c0 4.75 3.87 8.63 8.62 8.63 2.15 0 4.13-.79 5.64-2.1l4.67 4.67c.12.12.28.18.45.18.16 0 .32-.06.44-.18a.64.64 0 0 0 0-.89ZM3.25 10.62c0-4.06 3.31-7.37 7.37-7.37 4.06 0 7.38 3.31 7.38 7.37 0 4.06-3.31 7.38-7.38 7.38s-7.37-3.31-7.37-7.38Z" fill="currentColor"/></svg>'},s=e=>{let t=a[(0,i.r)().features.appearance.iconSet]||"<svg />";return(0,r.jsx)(l.I,{svg:t,...e})}},6038:(e,t,n)=>{"use strict";n.d(t,{S:()=>S});var r=n(4930),i=n(70172),l=n(46550),a=n(68905),s=n(94991),o=n(65162),c=n(91383),u=n(44067),d=n.n(u),h=n(64218),m=n(47034),g=n(86006);let v={name:"StockInstrument",elements:{name:{color:g.r.Grey5,font:{family:h.v.SanomatSansWeb,weight:"500",size:(0,m.px)(16),lineHeight:(0,m.px)(22),letterSpacing:(0,m.px)(.16)}},change:{font:{family:h.v.SanomatSansWeb,weight:"400",size:(0,m.px)(16),lineHeight:(0,m.px)(22),letterSpacing:(0,m.px)(.16)}},volume:{color:g.r.Grey4,font:{family:h.v.SanomatSansWeb,weight:"400",size:(0,m.px)(13),lineHeight:(0,m.px)(19),transform:"uppercase",letterSpacing:(0,m.px)(.25)}},value:{color:g.r.Grey4,font:{family:h.v.SanomatSansWeb,weight:"400",size:(0,m.px)(13),lineHeight:(0,m.px)(19),letterSpacing:(0,m.px)(.25)}}}};var x=n(15197);let p={name:"StockInstrument",elements:{name:{color:x.r.Grey2,font:{family:h.v.BTGrotesk,weight:"600",size:(0,m.px)(16),lineHeight:(0,m.px)(22)}},change:{font:{family:h.v.BTGrotesk,weight:"500",size:(0,m.px)(16),lineHeight:(0,m.px)(22)}},volume:{color:x.r.Grey10,font:{family:h.v.BTGrotesk,weight:"500",size:(0,m.px)(13),lineHeight:(0,m.px)(19)}},value:{color:x.r.Grey10,font:{family:h.v.BTGrotesk,weight:"500",size:(0,m.px)(13),lineHeight:(0,m.px)(19)}}}};var f=n(44937);let w={berlingske:v,bt:p,euroinvestor:{name:"StockInstrument",elements:{name:{color:f.u.Grey1,font:{family:h.v.LedgerGrotesk,weight:"700",size:(0,m.px)(16),lineHeight:(0,m.px)(22)}},change:{font:{family:h.v.LedgerGrotesk,weight:"400",size:(0,m.px)(16),lineHeight:(0,m.px)(22)}},volume:{color:f.u.Grey6,font:{family:h.v.LedgerGrotesk,weight:"400",size:(0,m.px)(13),lineHeight:(0,m.px)(19),transform:"uppercase"}},value:{color:f.u.Grey6,font:{family:h.v.LedgerGrotesk,weight:"400",size:(0,m.px)(13),lineHeight:(0,m.px)(19)}}}}};var k=n(84050);let S=o.memo(function(e){let{name:t,price:n,currency:o,changeInPercentage:u,change:h,volume:m,url:g}=e,v=void 0===m?void 0:(0,l.Z)(m,{fractionalDigits:0}),x=`${(0,l.Z)(n)} ${o}`,p=(0,k.F)({price:n,currency:o,changeInPercentage:u,change:h,volume:m});return(0,r.jsx)(s.J,{themes:w,children:(0,r.jsxs)("div",{className:d().instrument,children:[(0,r.jsxs)("div",{className:d().row,children:[g?(0,r.jsx)(i.N,{href:g,className:(0,a.cx)(d().name,d().nameLink),children:t}):(0,r.jsx)("span",{className:d().name,children:t}
1),(0,r.jsx)("span",{className:d().srOnly,children:p}),(0,r.jsx)("div",{className:d().change,"aria-hidden":"true",children:(0,r.jsx)(c.g,{value:u,formatValue:e=>void 0===h?`${(0,l.Z)(e)}%`:`${(0,l.Z)(h)} / ${(0,l.Z)(e)}%`})})]}),(0,r.jsxs)("div",{className:d().row,"aria-hidden":"true",children:[(0,r.jsx)("div",{className:d().volume,children:void 0!==v&&`Vol ${v}`}),(0,r.jsx)("div",{className:d().value,children:x})]})]})})})},12016:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StockWatchListPanel:()=>ei});var r=n(4930),i=n(75983),l=n(47832),a=n(44074),s=n(68905),o=n(65162),c=n(21656),u=n(59948),d=n(30100),h=n(35960),m=n(64627),g=n(30448),v=n(60158),x=n(18088),p=n(39252),f=n.n(p);function w(e){let{onClose:t,onSubmit:n,first:i}=e,l=(0,o.useRef)(null);return(0,o.useEffect)(()=>{l.current?.focus()},[]),(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault();let t=new FormData(e.target),r=t.get("name")?.toString(),l=!!i||t.get("primary")?.toString()==="on";r&&n({name:r,isPrimary:l||!1})},children:(0,r.jsxs)("div",{className:f().content,children:[(0,r.jsx)("div",{children:(0,r.jsx)(g.G,{label:"Navn",name:"name",ref:l,maxLength:50,required:!0})}),!i&&(0,r.jsx)("div",{className:f().primaryCheckboxContainer,children:(0,r.jsx)(v.c,{name:"primary",children:"S\xe6t som prim\xe6r"})}),(0,r.jsxs)("div",{className:f().buttons,children:[(0,r.jsx)(x.J,{text:"Opret liste",width:"100%"}),(0,r.jsx)(m.$,{type:"button",variant:"secondary",width:"100%",onClick:t,children:"Annuller"})]})]})})}var k=n(94991),S=n(62872),_=n.n(S),b=n(64218),y=n(47034);let L={berlingske:{name:"StockWatchListEditPanelContent",elements:{deleteConfirmation:{font:{family:b.v.SanomatSansWeb,weight:"400",size:(0,y.px)(15)}}}},bt:{name:"StockWatchListEditPanelContent",elements:{deleteConfirmation:{font:{family:b.v.BTGrotesk,weight:"500",size:(0,y.px)(15)}}}},euroinvestor:{name:"StockWatchListEditPanelContent",elements:{deleteConfirmation:{font:{family:b.v.LedgerGrotesk,weight:"400",size:(0,y.px)(15)}}}}};function C(e){let{activeWatchList:t,onClose:n,onSubmit:i,onDelete:l}=e,[a,s]=(0,o.useState)(!1),c=(0,o.useRef)(null),u=(0,o.useRef)(null),d=(0,o.useRef)(null),h=(0,o.useRef)(!0);return(0,o.useEffect)(()=>{c.current?.focus()},[]),(0,o.useEffect)(()=>{if(h.current){h.current=!1;return}a?d.current?.focus():u.current?.focus()},[a]),(0,r.jsx)(k.J,{themes:L,children:(0,r.jsx)("div",{className:_().content,children:a?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:_().deleteText,ref:d,tabIndex:-1,children:["Er du sikker p\xe5, at du vil slette denne watchlist?",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),'"',t.name,'"',(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),"Handlingen kan ikke fortrydes."]}),(0,r.jsxs)("div",{className:_().buttons,children:[(0,r.jsx)(m.$,{variant:"tertiary",danger:!0,onClick:l,children:"Slet liste"}),(0,r.jsx)(m.$,{variant:"secondary",width:"100%",onClick:()=>s(!1),children:"Annuller"})]})]}):(0,r.jsxs)("form",{onSubmit:e=>{e.preventDefault();let n=new FormData(e.target),r=n.get("name")?.toString(),l=!!t.isPrimary||n.get("primary")?.toString()==="on";r&&i({name:r,isPrimary:l||!1})},children:[(0,r.jsx)(g.G,{name:"name",label:"Navn",ref:c,defaultValue:t.name,maxLength:50,required:!0}),!t.isPrimary&&(0,r.jsx)("div",{className:_().primaryCheckboxContainer,children:(0,r.jsx)(v.c,{name:"primary",children:"S\xe6t som prim\xe6r"})}),(0,r.jsxs)("div",{className:_().buttons,children:[(0,r.jsx)(x.J,{text:"Gem og luk",width:"100%"}),(0,r.jsx)(m.$,{variant:"secondary",width:"100%",onClick:n,children:"Annuller"})]}),!t.isPrimary&&(0,r.jsx)("div",{className:_().deleteButton,children:(0,r.jsx)(m.$,{ref:u,variant:"tertiary",danger:!0,onClick:()=>s(!0),children:"Slet liste"})})]})})})}var j=n(77674),B=n(33110),W=n.n(B),G=n(86006);let N={name:"StockWatchListOnboardingPanelContent",elements:{heading:{color:G.r.Grey4,font:{family:b.v.SanomatSansWeb,weight:"500",size:(0,y.px)(16),lineHeight:(0,y.px)(22),letterSpacing:(0,y.px)(.16)}},text:{color:G.r.Grey4,font:{family:b.v.SanomatSansWeb,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(22),letterSpacing:(0,y.px)(.16)}}}};var z=n(15197);let I={name:"StockWatchListOnboardingPanelContent",elements:{heading:{color:z.r.Grey10,font:{family:b.v.BTGrotesk,weight:"600",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}},text:{color:z.r.Grey4,font:{family:b.v.BTGrotesk,weight:"500",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}}}};var P=n(44937);let H={berlingske:N,bt:I,euroinvestor:{name:"StockWatchListOnboardingPanelContent",elements:{heading:{color:P.u.Grey6,font:{family:b.v.LedgerGrotesk,weight:"700",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}},text:{color:P.u.Grey6,font:{family:b.v.LedgerGrotesk,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}}}}};function T(e){let{onClick:t,takeFocus:n}=e,i=(0,o.useRef)(null);return(0,o.useEffect)(()=>{n&&i.current?.focus()},[n]),(0,r.jsx)(k.J,{themes:H,children:(0,r.jsxs)("div",{className:W().content,children:[(0,r.jsx)(j.D,{className:W().heading,children:"Ingen watchlist endnu"}),(0,r.jsx)("div",{className:W().text,children:"Opret en watchlist og tilf\xf8j v\xe6rdipapirer for at f\xe5 hurtigt overblik"}),(0,r.jsx)("div",{className:W().buttons,children:(0,r.jsx)(m.$,{ref:i,width:"100%",onClick:t,trackingClass:"sp_stock_watchlist_create",children:"Opret ny watchlist"})})]})})}var M=n(17391),E=n(60714),R=n(12630),F=n(82408),$=n(23167),D=n(15932),Z=n(69021);let O={berlingske:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="4 4 24 24">
1<path fill="currentColor" d="M16 10c-.69 0-1.249.56-1.249 1.249v3.505h-3.502a1.248 1.248 0 1 0 0 2.496h3.502v3.507a1.248 1.248 0 0 0 2.498 0V17.25h3.502a1.248 1.248 0 1 0 0-2.496h-3.502v-3.505c0-.69-.56-1.249-1.249-1.249"/></svg>',bt:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="4 4 24 24"><path fill="currentColor" d="M14.285 14.285H10v3.43h4.285V22h3.43v-4.285H22v-3.43h-4.285V10h-3.43z"/></svg>',euroinvestor:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">\n <path fill="currentColor" d="M5.4 8.1h2.8V5.3h1.5v2.8h2.8v1.4H9.6v2.8H8.1V9.5H5.4V8.1z" />\n</svg>',weekendavisen:"<svg />"},A=e=>{let t=O[(0,D.r)().features.appearance.iconSet]||"<svg />";return(0,r.jsx)(Z.I,{svg:t,...e})};var J=n(6550),K=n(92229),V=n(11115),U=n(6038),q=n(42975),Y=n(77956),Q=n(36448),X=n.n(Q);let ee={berlingske:{name:"StockWatchListPanelContent",elements:{divider:{color:G.r.Divider},text:{color:G.r.Grey5},watchListSelectorToggleButton:{font:{family:b.v.SanomatSansWeb,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(22),letterSpacing:(0,y.px)(.16)}},watchListSelectorItemName:{font:{family:b.v.SanomatSansWeb,weight:"500",size:(0,y.px)(16),lineHeight:(0,y.px)(22),letterSpacing:(0,y.px)(.16)}},watchListSelectorItemDetails:{color:G.r.Grey4,font:{family:b.v.SanomatSansWeb,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(22),letterSpacing:(0,y.px)(.16)}},activeWatchListTitle:{font:{family:b.v.SanomatAlt,weight:"700",size:(0,y.px)(20),lineHeight:(0,y.px)(24)}},instrumentSearchLabel:{font:{family:b.v.SanomatSansWeb,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(22),letterSpacing:(0,y.px)(.16)}},instrumentSearchNoResults:{font:{family:b.v.SanomatSansWeb,weight:"400",size:(0,y.px)(15)}},addInstrumentButton:{color:G.r.White,backgroundColor:G.r.Black},removeInstrumentButton:{color:G.r.Black}}},bt:{name:"StockWatchListPanelContent",elements:{divider:{color:z.r.Divider},text:{color:z.r.Grey2},watchListSelectorToggleButton:{font:{family:b.v.BTGrotesk,weight:"500",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}},watchListSelectorItemName:{font:{family:b.v.BTGrotesk,weight:"600",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}},watchListSelectorItemDetails:{color:z.r.Grey10,font:{family:b.v.BTGrotesk,weight:"500",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}},activeWatchListTitle:{font:{family:b.v.BTGrotesk,weight:"900",size:(0,y.px)(18),lineHeight:(0,y.px)(25)}},instrumentSearchLabel:{font:{family:b.v.BTGrotesk,weight:"500",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}},instrumentSearchNoResults:{font:{family:b.v.BTGrotesk,weight:"500",size:(0,y.px)(15)}},addInstrumentButton:{color:z.r.White,backgroundColor:z.r.Grey2},removeInstrumentButton:{color:z.r.Grey2}}},euroinvestor:{name:"StockWatchListPanelContent",elements:{divider:{color:P.u.Divider},text:{color:P.u.Grey1},watchListSelectorToggleButton:{font:{family:b.v.LedgerGrotesk,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(24)}},watchListSelectorItemName:{font:{family:b.v.LedgerGrotesk,weight:"700",size:(0,y.px)(16),lineHeight:(0,y.px)(24)}},watchListSelectorItemDetails:{color:P.u.Grey6,font:{family:b.v.LedgerGrotesk,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(16)}},activeWatchListTitle:{font:{family:b.v.LedgerGrotesk,weight:"750",size:(0,y.px)(16),lineHeight:(0,y.px)(16)}},instrumentSearchLabel:{font:{family:b.v.LedgerGrotesk,weight:"400",size:(0,y.px)(16),lineHeight:(0,y.px)(22)}},instrumentSearchNoResults:{font:{family:b.v.LedgerGrotesk,weight:"400",size:(0,y.px)(15)}},addInstrumentButton:{color:P.u.White,backgroundColor:P.u.Blue1},removeInstrumentButton:{color:P.u.Grey1}}}};function et(e){let{watchLists:t,activeWatchList:n,instruments:i,searchResults:l,isSearchBusy:a,watchListSelectorOpen:s,onToggleWatchListSelector:c,onSelectWatchList:u,onCreateWatchList:d,onEditWatchList:h,onSearch:g,onAddInstrument:v,onRemoveInstrument:x,focusOnMount:p}=e,f=(0,o.useRef)(null),w=(0,o.useRef)(null),S=(0,o.useRef)(null),_=(0,o.useId)(),b=(0,o.useId)(),y=(0,o.useRef)(null),L=(0,o.useRef)(new Map);(0,o.useEffect)(()=>{"editButton"===p?y.current?.focus():"watchListSelector"===p&&w.current?.focus()},[p]);let C=(0,M._)(e=>{e.preventDefault(),w.current?.focus(),c()});(0,o.useEffect)(()=>{let e=S.current;if(!s||!e)return;let t=t=>{if(t.defaultPrevented)return;if("Escape"===t.key)return void C(t);if("Tab"!==t.key)return;let n=(0,V.Kr)(e);if(0===n.length)return;let r=document.activeElement,i=t.shiftKey&&r===n[0],l=!t.shiftKey&&r===n[n.length-1];(i||l)&&C(t)};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},[s]);let B=(0,M._)((e,t)=>{t?L.current.set(e,t):L.current.delete(e)});return(0,r.jsx)(k.J,{themes:ee,children:(0,r.jsxs)("div",{className:X().container,children:[(0,r.jsxs)("button",{ref:w,className:X().watchListSelectorToggleButton,type:"button",onClick:c,"data-open":s,"aria-expanded":s,"aria-controls":s?_:void 0,children:["Dine lister",(0,r.jsx)("div",{className:X().watchListSelectorToggleButtonIcon,"data-open":s,"aria-hidden":"true",children:(0,r.jsx)(R.z,{size:F.l.Medium})})]}),s&&(0,r.jsxs)("div",{className:X().watchListSelector,ref:S,id:_,children:[(0,r.jsx)("ul",{className:X().watchListSelectorList,children:t.map(e=>{let t;return(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",onClick:(t=e.id,()=>{let e=document.activeElement,n=e===document.body||!!e&&!!S.current?.contains(e);u(t),n&&w.current?.focus()}),className:X().watchListSelectorWatchListButton,"aria-current":e.id===n?.id||void 0,children:[(0,r.jsx)("div",{className:X().watchListSelectorItemName,children:e.name}),e.isPrimary&&(0,r.jsx)(q.T,{}),(0,r.jsxs)("div",{className:X().watchListSelectorItemDetails,children:[e.instrumentIds.length," aktier"]})]})},e.id)})}),(0,r.jsx)(m.$,{width:"100%",onClick:d,trackingClass:"sp_stock_watchlist_create",children:"Opret ny watchlist"})]}),!s&&n&&(0,r.jsxs)("div",{className:X().activeWatchList,children:[(0,r.jsxs)("div",{className:X().activeWatchListHeader,children:[(0,r.jsx)(j.D,{className:X().activeWatchListTitle,children:n.name}),n.isPrimary&&(0,r.jsx)(q.T,{}),(0,r.jsx)("div",{className:X().editWatchListButton,children:(0,r.jsx)(E.Q,{ref:y,label:"Rediger",ariaLabel:"Rediger watchlist",icon:$.q,onClick:h})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:X().instrumentSearchLabel,htmlFor:b,children:"Tilf\xf8j v\xe6rdipapir til listen"}),(0,r.jsx)(Y.F,{id:b,onChange:g,busy:a,placeholder:"S\xf8g efter v\xe6rdipapir",ref:f,trackingClass:"sp_stock_watchlist_search"})]}),l?0===l.length?(0,r.jsx)("div",{className:X().instrumentSearchNoResults,children:"Ingen resultater fundet"}):(0,r.jsx)("ul",{className:X().instrumentList,children:l.map(e=>{let t,i=n.instrumentIds.includes(e.id);return(0,r.jsxs)("li",{className:X().instrumentListItem,"data-added":i,children:[(0,r.jsx)("button",{type:"button",onClick:i?void 0:(t=e.id,e=>{e.preventDefault(),v(t),f.current?.reset(),f.current?.focus()}),className:X().addToWatchListButton,"aria-disabled":i,"aria-label":i?`${e.name} er allerede p\xe5 watchlisten`:`Tilf\xf8j ${e.name} til watchlist`,children:(0,r.jsx)(A,{size:F.l.Medium})}),(0,r.jsx)(U.S,{name:e.name,price:e.last,currency:e.currency,changeInPercentage:e.changeInPercentage,change:e.change,volume:e.volume,url:(0,K.N)(e)},e.id)]},e.id)})}):(0,r.jsx)("ul",{className:X().instrumentList,children:i.map(e=>{let t;return(0,r.jsxs)("li",{className:X().instrumentListItem,children:[(0,r.jsx)("button",{ref:t=>B(e.id,t),type:"button",onClick:(t=e.id,e=>{e.preventDefault();let n=i.findIndex(e=>e.id===t),r=i[n+1]??i[n-1],l=document.activeElement,a=l===document.body||L.current.get(t)===l;if(x(t),a){if(r)return void L.current.get(r.id)?.focus();f.current?.focus()}}),className:X().deleteFromWatchListButton,"aria-label":`Fjern ${e.name} fra watchlist`,children:(0,r.jsx)(J.d,{size:F.l.Medium})}),(0,r.jsx)(U.S,{name:e.name,price:e.last,currency:e.currency,changeInPercentage:e.changeInPercentage,change:e.change,volume:e.volume,url:(0,K.N)(e)},e.id)]},e.id)})})]})]})})}var en=n(62699),er=n.n(en);function ei(e){let{onClose:t,takeFocusOnOpen:n,returnFocusTo:m}=e,[g,v]=(0,o.useState)("list"),[x,p]=(0,o.useState)(null),[f,k]=(0,o.useState)(!1),[S,_]=(0,o.useState)(""),[b,y]=(0,o.useState)(),{watchLists:L,createWatchList:j,updateWatchList:B,deleteWatchList:W,addInstrument:G,removeInstrument:N}
1=(0,h.R)(),z=L?.find(e=>e.isPrimary),I=L?.find(e=>e.id===x)||z,P=!!L&&0===L.length,H=(0,u.K)(I?.instrumentIds),M=(0,c.M)(H),E=(0,d.M)(S),R=!!S&&null===E,F=(0,i.d)(e=>{(!e||e.length>=2)&&_(e)},300),$=e=>{_(""),k(!1),v(e)},D=e=>{v("list"),y(e)},Z=async e=>{let{name:t,isPrimary:n}=e;p((await j(t,n||!1)).id),D("watchListSelector")},O=async e=>{let{name:t,isPrimary:n}=e;t&&I&&(B(I.id,t,n||!1),D("editButton"))},A=async()=>{I&&(W(I.id),p(null),D("watchListSelector"))};return(0,r.jsx)(l.E,{title:{list:"Watchlist",create:"Opret watchlist",edit:"Rediger watchlist"}[g],onClose:()=>{"list"===g?t():D("edit"===g?"editButton":"watchListSelector")},takeFocusOnOpen:n,returnFocusTo:m,children:(0,r.jsxs)("div",{className:(0,s.cx)(er().panelContent,a.y),children:["create"===g&&(0,r.jsx)(w,{first:P,onClose:()=>D("watchListSelector"),onSubmit:Z}),"edit"===g&&I&&(0,r.jsx)(C,{activeWatchList:I,onClose:()=>D("editButton"),onSubmit:O,onDelete:A}),"list"===g&&(P?(0,r.jsx)(T,{takeFocus:void 0!==b,onClick:()=>$("create")}):L&&(0,r.jsx)(et,{watchLists:L,activeWatchList:I,focusOnMount:b,instruments:M,searchResults:E,isSearchBusy:R,watchListSelectorOpen:f,onToggleWatchListSelector:()=>{_(""),k(e=>!e)},onSelectWatchList:e=>{p(e),k(!1)},onCreateWatchList:()=>$("create"),onEditWatchList:()=>$("edit"),onSearch:F,onAddInstrument:e=>{I&&G(I.id,e)},onRemoveInstrument:e=>{I&&N(I.id,e)}}))]})})}},12630:(e,t,n)=>{"use strict";n.d(t,{z:()=>s});var r=n(4930),i=n(15932),l=n(69021);let a={berlingske:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="currentcolor" d="M2.62998 8.00002c.13 0 .27.04.38.13L11.65 14.9c.21.16.5.16.7 0l8.64-6.76999c.27-.21.66-.17.88.11.21.27.17.67-.11.88L13.12 15.88c-.66.52-1.58.52-2.24 0L2.23998 9.12002c-.27-.21-.32-.61-.11-.88.12-.16.31-.24.49-.24h.01Z"/></svg>',bt:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="currentcolor" d="M3.24997 8.15991 11.99 15.3999l8.73-7.23999 1.28 1.55-10.01 8.28999L1.96997 9.70991l1.28-1.55Z"/></svg>',euroinvestor:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="currentcolor" d="M11.6452 17.4544 2.14993 7.96912c-.19991-.1999-.19991-.50975 0-.70965l.70964-.70964c.1999-.1999.50975-.1999.70965 0L11.995 14.9756l8.4358-8.42577c.1999-.1999.5097-.1999.7096 0l.7097.70964c.1999.1999.1999.50975 0 .70965l-9.4953 9.48528c-.1999.1999-.5097.1999-.7096 0Z"/></svg>',weekendavisen:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="currentcolor" fill-rule="evenodd" d="M2.55806 7.05806c.24408-.24408.6398-.24408.88388 0L12 15.6161l8.5581-8.55804c.244-.24408.6398-.24408.8838 0 .2441.24408.2441.6398 0 .88388l-9 8.99996c-.1172.1173-.2761.1831-.4419.1831s-.3247-.0658-.4419-.1831L2.55806 7.94194c-.24408-.24408-.24408-.6398 0-.88388Z" clip-rule="evenodd"/></svg>'},s=e=>{let t=a[(0,i.r)().features.appearance.iconSet]||"<svg />";return(0,r.jsx)(l.I,{svg:t,...e})}},16325:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});var r=n(15262);function i(e){return(0,r.A)(e,{lower:!0})}},18088:(e,t,n)=>{"use strict";n.d(t,{J:()=>c});var r=n(4930),i=n(64627),l=n(80028),a=n(82408),s=n(41797),o=n.n(s);let c=e=>(0,r.jsx)(i.$,{type:"submit",variant:"primary",ariaLabel:e.ariaLabel,disabled:e.disabled,ariaDisabled:e.ariaDisabled,trackingClass:e.trackingClass,width:e.width,children:(0,r.jsx)("div",{className:o().container,children:e.isLoading&&e.withLoadingSpinner?(0,r.jsx)(l.t,{size:a.l.Medium}):e.text})})},21656:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var r=n(65162),i=n(70310);function l(e){let[t,n]=(0,r.useState)(e.map(e=>{let{id:t}=e;return t})),[l,a]=(0,r.useState)(e);(0,r.useEffect)(()=>{n(e.map(e=>{let{id:t}=e;return t})),a(e)},[e]);let s=(0,i._)(t);return(0,r.useEffect)(()=>{a(e=>e.map((e,t)=>{var n;let r;return s[t]&&s[t].updatedAt!==e.updatedAt?(n=e,r=Object.entries(s[t]).reduce((e,t)=>{let[n,r]=t;return null!==r&&""!==r&&(e[n]=r),e},{}),{...n,...r}):e}))},[s]),l}},23167:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var r=n(4930),i=n(15932),l=n(69021);let a={berlingske:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
1<path fill="currentColor" d="M21.376 20.528a.624.624 0 0 1 0 1.248H2.624a.624.624 0 0 1 0-1.248zM14.657 2.727a1.59 1.59 0 0 1 2.121-.188l.124.104 2.425 2.25a1.59 1.59 0 0 1 .082 2.244L8.456 18.957l-.006-.005a.62.62 0 0 1-.447.196l-2.688.02h-.004a1.586 1.586 0 0 1-1.587-1.485l-.184-2.68a.62.62 0 0 1 .155-.457zM4.803 15.186l.167 2.419v.007c.01.162.152.306.34.306l2.422-.017 8.248-8.902-2.925-2.71zM15.999 3.518a.34.34 0 0 0-.426.056l-1.67 1.8 2.926 2.71 1.664-1.795a.343.343 0 0 0-.013-.48l-.002-.001-2.423-2.248z"/></svg>',bt:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" width="25" height="24" fill="none"><path fill="currentcolor" d="M22.997 20.01h-20v2h20z"/><path fill="currentcolor" d="M22.997 20.01h-20v2h20zM16.937 4.1l.72-.68 3.04 3.27-.6.57z"/><path fill="currentcolor" d="m17.697 2-2.19 2.08 4.57 4.57 2.02-1.92zM6.897 16.59l.3-3.24 6.84-6.49 3.16 3.15-6.96 6.6z"/><path fill="currentcolor" d="m14.017 8.25 1.74 1.74-5.92 5.62-1.85-.02.16-1.77 5.86-5.57m.04-2.79-7.82 7.43-.43 4.69 4.83.04 7.99-7.59z"/></svg>',euroinvestor:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none"><path fill="currentcolor" d="M16.15 2.52a.75.75 0 0 1 .52-.21l-.01.01c.2 0 .4.08.55.24l3.38 3.63c.28.3.27.77-.03 1.05l-1.48 1.41-4.57-4.57zM2 20.75a.75.75 0 0 1 .75-.75h18.5a.75.75 0 0 1 .75.75v.5a.75.75 0 0 1-.75.75H2.75a.75.75 0 0 1-.75-.75zM5.43 12.69l7.62-7.23 4.57 4.57-7.99 7.59-4.02-.04c-.44 0-.78-.38-.74-.82l.33-3.59c.02-.19.1-.35.23-.48"/></svg>',weekendavisen:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path stroke="currentcolor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="1.25" d="M2.62 21.38h18.76"/><path stroke="currentcolor" stroke-miterlimit="10" stroke-width="1.25" d="M6.27 18.39H4.651a.5.5 0 0 1-.5-.49l-.061-3.28c0-.07.02-.14.07-.19L15.94 2.67s.08-.07.18-.07c.07 0 .14.03.19.09l3.49 3.49c.11.11.12.28.02.38l-2.15 2.15-9.61 9.61c-.02.02-.04.04-.19.07z" clip-rule="evenodd"/><path stroke="currentcolor" stroke-miterlimit="10" stroke-width="1.25" d="m13.29 5.32 3.89 3.89"/></svg>'},s=e=>{let t=a[(0,i.r)().features.appearance.iconSet]||"<svg />";return(0,r.jsx)(l.I,{svg:t,...e})}},23910:(e,t,n)=>{"use strict";n.d(t,{N:()=>l});var r=n(16325);let i={1:"aktier",2:"Stock & Index Options",3:"certifikater",4:"certifikater",5:"Spots",6:"certifikater",7:"Corporate Bonds",8:"investeringsforeninger",9:"Government Bonds",10:"indeks",11:"Municipal Bonds",12:"Unknown",13:"Strategies & Spreads",14:"Statistic Symbols",15:"Monetary Funds",16:"Unspecified Bonds",17:"Unspecified Funds & Certificates",18:"certifikater",19:"Money Market Symbols",20:"valuta",21:"kryptovaluta"},l=e=>`/markeder/${(0,r.Y)(i[e.instrumentType]||String(e.instrumentType))}/${(0,r.Y)(e.name)}/${e.id||e.instrumentId}`},24923:e=>{e.exports={root:"FormCheckbox_root__oaFf8",group:"FormCheckbox_group__IJsBX",checkbox:"FormCheckbox_checkbox__DrKJq",icon:"FormCheckbox_icon__28m9H",input:"FormCheckbox_input__NDCvb",label:"FormCheckbox_label__3S6c3"}},27228:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(4930),i=n(15932),l=n(69021);let a={berlingske:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" d="M11.103 4.782a.785.785 0 0 1 1.12-.088c.302.264.362.71.156 1.043l-.07.096-4.536 5.385a.785.785 0 0 1-1.09.113l-.086-.079-2.875-3.041a.817.817 0 0 1 .022-1.142.784.784 0 0 1 1.035-.058l.088.08 2.268 2.4 3.968-4.709Z"/></svg>\n',bt:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" fill-rule="evenodd" d="M5.823 9.613 13.311 2 15.5 4.218 5.823 14 .5 8.605l2.164-2.193 3.16 3.201Z" clip-rule="evenodd"/></svg>\n',euroinvestor:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path fill="currentcolor" d="m6.227 12.36-3.47-3.78c-.19-.2-.17-.52.03-.71l.74-.68c.2-.19.52-.17.71.03l2.32 2.53 5.17-6.09c.18-.21.49-.24.7-.06l.77.65c.21.18.24.49.06.7l-6.27 7.39c-.2.23-.55.24-.75.01l-.01.01Z"/></svg>\n',weekendavisen:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16">
1<path fill="currentcolor" fill-rule="evenodd" d="M5.615 12.314 13.722 2.1l.778.618-8.875 11.181L1.5 8.837l.77-.627 3.345 4.105Z" clip-rule="evenodd"/></svg>\n'},s=e=>{let t=a[(0,i.r)().features.appearance.iconSet]||"<svg />";return(0,r.jsx)(l.I,{svg:t,...e})}},30100:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});var r=n(17391),i=n(15932),l=n(36189),a=n(65162);function s(e,t){return fetch(e,t).then(e=>e.json()).then(e=>e)}function o(e){let t=(0,i.r)().features.stocks,n=(0,l.v)();if(!t.enabled)return null;let o=(0,a.useRef)(null),[c,u]=(0,a.useState)(null),d=(0,r._)(async e=>{o.current=new AbortController;let t=o.current.signal;if(!e.trim())return void u(null);try{let r=await s(`${n.BM_STOCK_SEARCH_API}/instruments?q=${e}`,{signal:t});if(!r.length)return void u([]);let i=r.map(e=>e._source.id),l=await s(`${n.BM_STOCK_API_URL}/instruments?ids=${i.join(",")}`,{signal:t});u(l)}catch(e){e instanceof Error&&"AbortError"!==e.name&&u(null)}});return(0,a.useEffect)(()=>(d(e),()=>{o.current?.abort("query has changed")}),[e]),c}},33110:e=>{e.exports={content:"StockWatchListOnboardingPanelContent_content__8fPDk",heading:"StockWatchListOnboardingPanelContent_heading__rewYG",text:"StockWatchListOnboardingPanelContent_text__mkbHu",buttons:"StockWatchListOnboardingPanelContent_buttons__NcBQQ"}},36448:e=>{e.exports={container:"StockWatchListPanelContent_container__KFsZe",watchListSelectorToggleButton:"StockWatchListPanelContent_watchListSelectorToggleButton__h3nBF",watchListSelectorToggleButtonIcon:"StockWatchListPanelContent_watchListSelectorToggleButtonIcon__H46q0",watchListSelector:"StockWatchListPanelContent_watchListSelector__i80k6",watchListSelectorList:"StockWatchListPanelContent_watchListSelectorList__HLpzr",watchListSelectorWatchListButton:"StockWatchListPanelContent_watchListSelectorWatchListButton__rjLPy",watchListSelectorItemName:"StockWatchListPanelContent_watchListSelectorItemName__ir32V",watchListSelectorItemDetails:"StockWatchListPanelContent_watchListSelectorItemDetails__gUHdy",activeWatchList:"StockWatchListPanelContent_activeWatchList__2_1sq",activeWatchListHeader:"StockWatchListPanelContent_activeWatchListHeader__eyE_f",activeWatchListTitle:"StockWatchListPanelContent_activeWatchListTitle__aO8XR",editWatchListButton:"StockWatchListPanelContent_editWatchListButton__RRJ_2",instrumentSearchLabel:"StockWatchListPanelContent_instrumentSearchLabel__I5XPa",instrumentSearchNoResults:"StockWatchListPanelContent_instrumentSearchNoResults__dQUVI",instrumentList:"StockWatchListPanelContent_instrumentList__J7Zzb",instrumentListItem:"StockWatchListPanelContent_instrumentListItem__wn2Xp",addToWatchListButton:"StockWatchListPanelContent_addToWatchListButton__5H0w_",deleteFromWatchListButton:"StockWatchListPanelContent_deleteFromWatchListButton__3fYaP"}},39252:e=>{e.exports={content:"StockWatchListCreatePanelContent_content___ClTl",primaryCheckboxContainer:"StockWatchListCreatePanelContent_primaryCheckboxContainer__N1Jav",buttons:"StockWatchListCreatePanelContent_buttons___sIJK"}},41797:e=>{e.exports={container:"FormSubmitButton_container__COGjp"}},44067:e=>{e.exports={instrument:"StockInstrument_instrument__t0scp",row:"StockInstrument_row__xtZ2j",name:"StockInstrument_name__66GsP",nameLink:"StockInstrument_nameLink__xf8lW",change:"StockInstrument_change__Kbu16",volume:"StockInstrument_volume___cv6I",value:"StockInstrument_value__E2ZvV",srOnly:"StockInstrument_srOnly__chK4x"}},44267:e=>{e.exports={container:"StockPriceChange_container__5cJzq",outgoing:"StockPriceChange_outgoing__y5DV5",incoming:"StockPriceChange_incoming__G4YK_",outgoingUp:"StockPriceChange_outgoingUp__DGSWw",outgoingDown:"StockPriceChange_outgoingDown__wF25K",incomingUp:"StockPriceChange_incomingUp__8K7MU",incomingDown:"StockPriceChange_incomingDown__nBXzD"}},46550:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return"";let{fractionalDigits:n=2}=t||{},r=Math.abs(e);0<r&&r<1&&(n=Math.max(Math.ceil(-Math.log10(r)),n));let i=e.toFixed(n).split(".");return i[0]=i[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),i.join(",")}n.d(t,{Z:()=>r})},47937:e=>{e.exports={container:"StockSearchInput_container__ThQlw",input:"StockSearchInput_input__eBsak",clearButton:"StockSearchInput_clearButton__tFmtm"}}
1,59948:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var r=n(65048),i=n(15932),l=n(36189),a=n(65162);function s(e){let t=(0,i.r)().features.stocks,n=(0,l.v)(),s=e&&t.enabled?`${n.BM_STOCK_API_URL}/instruments?ids=${e.join(",")}`:void 0,o=(0,r.s)({url:s});return(0,a.useMemo)(()=>o.data||[],[o.data])}},60158:(e,t,n)=>{"use strict";n.d(t,{c:()=>S});var r=n(4930),i=n(17391),l=n(27228),a=n(82408),s=n(94991),o=n(65162),c=n(24923),u=n.n(c),d=n(64218),h=n(47034),m=n(86006);let g={name:"FormCheckbox",elements:{input:{borderColor:m.r.Grey5,errorColor:m.r.Red2,selectedBackgroundColor:m.r.Black,selectedBorderColor:m.r.Black},label:{color:m.r.Grey5,font:{family:d.v.SanomatSansWeb,size:(0,h.px)(13),lineHeight:(0,h.px)(19)}}}};var v=n(15197);let x={name:"FormCheckbox",elements:{input:{borderColor:v.r.Grey2,selectedBackgroundColor:v.r.Grey2,selectedBorderColor:v.r.Grey2,errorColor:v.r.Red1},label:{color:v.r.Grey2,font:{family:d.v.BTGrotesk,size:(0,h.px)(13),lineHeight:(0,h.px)(19),weight:"500"}}}};var p=n(44937);let f={name:"FormCheckbox",elements:{input:{borderColor:p.u.Grey1,errorColor:p.u.Red1,selectedBackgroundColor:p.u.Blue1,selectedBorderColor:p.u.Blue1},label:{color:p.u.Grey1,font:{family:d.v.LedgerGrotesk,size:(0,h.px)(13),lineHeight:(0,h.px)(19),weight:"400"}}}};var w=n(3351);let k={berlingske:g,bt:x,euroinvestor:f,weekendavisen:{name:"FormCheckbox",elements:{input:{borderColor:w.G.Black,errorColor:w.G.Red1,selectedBackgroundColor:w.G.Black,selectedBorderColor:w.G.Black},label:{color:w.G.Black,font:{family:d.v.WEASans,size:(0,h.px)(13),lineHeight:(0,h.px)(19)}}}}},S=e=>{let{children:t,name:n,center:c,labelAction:d,...h}=e,[m,g]=(0,o.useState)(!1),v=(0,o.useId)(),x=`${v}-label`,p=`${v}-label-action`,f=(0,i._)(e=>{e.preventDefault(),g(!e.target.validity.valid)}),w=(0,i._)(e=>{e.preventDefault();let t=e.target;g(!!h.required&&!t.checked)});return(0,r.jsx)(s.J,{themes:k,children:(0,r.jsx)("div",{className:u().root,children:(0,r.jsxs)("div",{className:u().group,"data-center":c,children:[(0,r.jsxs)("div",{className:u().checkbox,children:[(0,r.jsx)("div",{className:u().icon,children:(0,r.jsx)(l.l,{size:a.l.Small})}),(0,r.jsx)("input",{type:"checkbox",name:n,id:v,className:u().input,onInvalid:f,onInput:w,"data-has-error":m,"aria-labelledby":d?`${x} ${p}`:void 0,...h})]}),(0,r.jsxs)("span",{children:[(0,r.jsx)("label",{id:x,htmlFor:v,className:u().label,children:t}),d&&(0,r.jsxs)("span",{id:p,children:[" ",d]})]})]})})})}},60714:(e,t,n)=>{"use strict";n.d(t,{Q:()=>w});var r=n(4930),i=n(82408),l=n(68905),a=n(94991),s=n(90053),o=n.n(s),c=n(64218),u=n(47034),d=n(86006);let h={name:"TextButton",elements:{button:{font:{family:c.v.SanomatSansWeb,weight:"400",size:(0,u.px)(16),lineHeight:(0,u.px)(16),letterSpacing:(0,u.px)(.16)},color:d.r.Grey5,darkColor:d.r.White}}};var m=n(15197);let g={name:"TextButton",elements:{button:{font:{family:c.v.BTGrotesk,weight:"500",size:(0,u.px)(16),lineHeight:(0,u.px)(16)},color:m.r.Grey2,darkColor:m.r.White}}};var v=n(44937);let x={name:"TextButton",elements:{button:{font:{family:c.v.LedgerGrotesk,weight:"400",size:(0,u.px)(16),lineHeight:(0,u.px)(16)},color:v.u.Grey1,darkColor:v.u.White}}};var p=n(3351);let f={berlingske:h,bt:g,euroinvestor:x,weekendavisen:{name:"TextButton",elements:{button:{font:{family:c.v.WEASans,weight:"400",size:(0,u.px)(16),lineHeight:(0,u.px)(16)},color:p.G.Grey7,darkColor:p.G.White}}}};function w(e){let{label:t,ariaLabel:n,ariaPressed:s,icon:c,onClick:u,disabled:d,ariaDisabled:h,dark:m,trackingClass:g,ref:v}=e;return(0,r.jsx)(a.J,{themes:f,children:(0,r.jsxs)("button",{ref:v,className:(0,l.cx)(o().button,!h&&g),type:"button",onClick:h?void 0:u,"aria-label":n,"aria-pressed":s,"aria-disabled":h,disabled:d,"data-dark":m,children:[t,c&&(0,r.jsx)("span",{"aria-hidden":"true",children:(0,r.jsx)(c,{size:i.l.Medium})})]})})}},62699:e=>{e.exports={panelContent:"StockWatchListPanel_panelContent__FQ82r"}},62872:e=>{e.exports={content:"StockWatchListEditPanelContent_content__dvER_",primaryCheckboxContainer:"StockWatchListEditPanelContent_primaryCheckboxContainer__V_EDL",buttons:"StockWatchListEditPanelContent_buttons__2CmPS",deleteButton:"StockWatchListEditPanelContent_deleteButton__Cu9F6",deleteText:"StockWatchListEditPanelContent_deleteText__sXYTY"}}
1,65048:(e,t,n)=>{"use strict";n.d(t,{s:()=>l});var r=n(17391),i=n(65162);function l(e){let{url:t,headers:n}=e,l=(0,i.useRef)(!1),[a,s]=(0,i.useState)(),[o,c]=(0,i.useState)(),[u,d]=(0,i.useState)(!1),h=(0,r._)(async(e,t)=>{if(!e)return void s(void 0);try{d(!0);let n=await fetch(e,{headers:t});if(n.ok){let e=await n.json();l.current&&s(e)}else throw Error("Failed fetching data from URL: "+e)}catch(e){l.current&&c(e)}finally{l.current&&d(!1)}});return(0,i.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]),(0,i.useEffect)(()=>{h(t,n)},[t,JSON.stringify(n||null)]),{data:a,error:o,isFetching:u,refetch:(0,r._)(()=>{h(t,n)})}}},68215:e=>{e.exports={throbber:"Throbber_throbber__4Lafg",circle:"Throbber_circle__i_hkJ",spin:"Throbber_spin__kKET7"}},70310:(e,t,n)=>{"use strict";n.d(t,{_:()=>l});var r=n(65162),i=n(5128);function l(e){let{subscribe:t,unsubscribe:n}=(0,r.useContext)(i.W),[l,a]=(0,r.useState)(Array(e.length).fill(null));return(0,r.useEffect)(()=>{a(Array(e.length).fill(null))},[e]),(0,r.useEffect)(()=>{if(0===e.length)return;let r=t=>{a(n=>{let r=e.indexOf(t.id);return n[r]&&n[r].updatedAt>t.updatedAt?n:[...n.slice(0,r),t,...n.slice(r+1)]})};return t(e,r),()=>{0!==e.length&&n(e,r)}},[e,t,n]),l}},75983:(e,t,n)=>{"use strict";n.d(t,{d:()=>i});var r=n(65162);function i(e,t){let n=(0,r.useRef)(null);return(0,r.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),function(){for(var r=arguments.length,i=Array(r),l=0;l<r;l++)i[l]=arguments[l];n.current&&clearTimeout(n.current),n.current=window.setTimeout(()=>{e(...i)},t)}}},77956:(e,t,n)=>{"use strict";n.d(t,{F:()=>S});var r=n(4930),i=n(80028),l=n(2779),a=n(82408),s=n(56047),o=n(68905),c=n(94991),u=n(65162),d=n(47937),h=n.n(d),m=n(64218),g=n(47034),v=n(86006);let x={name:"StockSearchInput",elements:{input:{font:{family:m.v.SanomatSansWeb,weight:"400",size:(0,g.px)(16),lineHeight:(0,g.px)(26)},color:v.r.Grey5,placeholderColor:v.r.Grey3,borderColor:v.r.Grey9,borderFocusColor:v.r.Grey5,borderRadius:(0,g.px)(2)}}};var p=n(15197);let f={name:"StockSearchInput",elements:{input:{font:{family:m.v.BTGrotesk,weight:"500",size:(0,g.px)(16),lineHeight:(0,g.px)(22)},color:p.r.Grey2,borderColor:p.r.Grey14,placeholderColor:p.r.Grey3,borderFocusColor:p.r.Grey2,borderRadius:(0,g.px)(0)}}};var w=n(44937);let k={berlingske:x,bt:f,euroinvestor:{name:"StockSearchInput",elements:{input:{font:{family:m.v.LedgerGrotesk,weight:"400",size:(0,g.px)(16),lineHeight:(0,g.px)(22)},color:w.u.Grey1,placeholderColor:w.u.Grey13,borderColor:w.u.Grey2,borderFocusColor:w.u.Grey1,borderRadius:(0,g.px)(4)}}}};function S(e){let{ref:t,...n}=e,{onChange:d,busy:m,icon:g,placeholder:v,name:x,trackingClass:p,id:f}=n,w=g||l.W,[S,_]=(0,u.useState)(""),b=(0,u.useRef)(null);function y(){_(""),d("")}return(0,u.useImperativeHandle)(t,()=>({reset:y,focus:()=>b.current?.focus()})),(0,r.jsx)(c.J,{themes:k,children:(0,r.jsxs)("div",{className:h().container,children:[(0,r.jsx)("div",{className:h().icon,children:m?(0,r.jsx)(i.t,{size:a.l.Medium}):(0,r.jsx)(w,{size:a.l.Medium})}),(0,r.jsx)("input",{ref:b,className:(0,o.cx)(h().input,`${p}-input-field`),type:"search",id:f,"aria-label":f?void 0:v||"s\xf8geord",name:x,value:S,placeholder:v||"S\xf8g",onChange:function(e){_(e.target.value),d(e.target.value)},autoComplete:"off"}),S&&(0,r.jsx)("button",{className:(0,o.cx)(h().clearButton,`${p}-input-clear`),type:"button",tabIndex:-1,"aria-hidden":!0,onClick:y,children:(0,r.jsx)(s.U,{size:a.l.Small})})]})})}},80028:(e,t,n)=>{"use strict";n.d(t,{t:()=>u});var r=n(4930),i=n(82408),l=n(47034),a=n(68215),s=n.n(a);let o={[i.l.Small]:(0,l.px)(16),[i.l.Medium]:(0,l.px)(24),[i.l.Large]:(0,l.px)(32),[i.l.ExtraLarge]:(0,l.px)(64)},c={[i.l.Small]:(0,l.px)(2),[i.l.Medium]:(0,l.px)(3),[i.l.Large]:(0,l.px)(5),[i.l.ExtraLarge]:(0,l.px)(7)},u=e=>{let t=o[e.size]||o[i.l.Medium],n=c[e.size]||c[i.l.Medium];return(0,r.jsxs)("span",{className:s().throbber,style:{width:t,height:t},children:[(0,r.jsx)("span",{className:s().circle,style:{borderWidth:n},"data-is-background":!0}),(0,r.jsx)("span",{className:s().circle,style:{borderWidth:n},"data-is-partial":!0})]})}},84050:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});var r=n(46550);function i(e){let{price:t,currency:n,changeInPercentage:i,change:l,volume:a}=e,s=[];if(0===i)s.push("U\xe6ndret");else{let e=i<0?"Faldet":"Steget",t=`${(0,r.Z)(Math.abs(i))} procent`;s.push(void 0===l?`${e} ${t}`:`${e} ${(0,r.Z)(Math.abs(l))} ${n}, ${t}`)}return void 0!==a&&s.push(`Volumen ${(0,r.Z)(a,{fractionalDigits:0})}`),s.push(`Kurs ${(0,r.Z)(t)} ${n}`),s.join(", ")}},90053:e=>{e.exports={button:"TextButton_button__3ZNLl"}}
1,91383:(e,t,n)=>{"use strict";n.d(t,{g:()=>g});var r=n(4930),i=n(94991),l=n(65162),a=n(44267),s=n.n(a),o=n(86006);let c={name:"StockPriceChange",elements:{value:{negativeColor:o.r.Red3,positiveColor:o.r.Green}}};var u=n(15197);let d={name:"StockPriceChange",elements:{value:{negativeColor:u.r.Red1,positiveColor:u.r.Green}}};var h=n(44937);let m={berlingske:c,bt:d,euroinvestor:{name:"StockPriceChange",elements:{value:{negativeColor:h.u.Red1,positiveColor:h.u.Green}}}};function g(e){let t,{value:n,formatValue:a}=e,o=a(n),[c,u]=(0,l.useState)({value:n,formattedValue:o});return c.value>n?t="up":c.value<n&&(t="down"),(0,r.jsx)(i.J,{themes:m,children:(0,r.jsxs)("div",{className:s().container,onAnimationEnd:()=>u({value:n,formattedValue:o}),children:[(0,r.jsx)("div",{className:s().outgoing,"data-negative":0>c.value,"data-animation":t,children:c.formattedValue}),(0,r.jsx)("div",{className:s().incoming,"data-negative":0>n,"data-animation":t,children:o})]})})}},92229:(e,t,n)=>{"use strict";n.d(t,{N:()=>r.N});var r=n(23910)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.