PageSourceSearch

https://svmn.dk/_next/static/chunks/7438.a28a69fde1112e9d.js

js svmn.dk collected 2026-10-09 04:57:23 UTC 15,622 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7438],{32986:function(e,n,r){"use strict";r.d(n,{l:function(){return i}});var t=r(85893),a=r(80148);r(67294);let i=e=>{let{enableBackground:n,noTopMargin:r,children:i}=e;return n?(0,t.jsx)(a.H,{noTopMargin:r,children:i}):i}},47438:function(e,n,r){"use strict";r.r(n),r.d(n,{PermitHoldersTableFeature:function(){return m}});var t=r(85893),a=r(16740),i=r(4406),o=r(56229),l=r(18154),_=r(67294),s=r(86072),c=r(39177),u=r.n(c);let d=e=>{var n;let{tableData:r,tableHeaders:a,categoryFilter:c,handleFilters:d,handleSearch:g,pageSizeOptions:p,pageSizeOptionsDefaultValueIndex:h,paginationTexts:m,listFilterTexts:C}=e,{filterLabel:x,removeFilterText:b,searchPlaceholder:k,searchActionAriaLabel:B}=C,{paginationGeneralTexts:S,paginationAriaLabels:v,paginationErrorText:f}=m,[y,L]=(0,_.useState)(p[1]),[N,F]=(0,_.useState)("1"),[P,w]=(0,_.useState)(1),[j,T]=(0,_.useState)(null),[A,I]=(0,_.useState)({header:"name",direction:o.Sr.Ascending}),E=e=>{I({header:e,direction:A?-1*A.direction:o.Sr.Ascending})},M=e=>{F(e.toString()),w(e),T(null),setTimeout(function(){window.scrollTo(0,200)},2)},D=e=>{if("onKeyDown"===e._reactName&&"Enter"!==e.key)return;let n=(0,s.I)(y,r);!Number.isNaN(Number(e.target.value))&&Number(e.target.value)>=1&&Number(e.target.value)<=Math.ceil(r.length/n)?(F(e.target.value),T(null),""!==e.target.value.toString()&&("Enter"===e.key||"onBlur"===e._reactName)&&(w(e.target.value),setTimeout(function(){window.scrollTo(0,200)},200))):(""===e.target.value&&F(e.target.value),T(f))},O=A?r.sort((e,n)=>A.direction===o.Sr.Ascending?e[A.header]>n[A.header]?1:n[A.header]>e[A.header]?-1:0:e[A.header]<n[A.header]?1:n[A.header]<e[A.header]?-1:0):r,R=null===(n=(0,s.h)(O,P,(0,s.I)(y,r)))||void 0===n?void 0:n.map(e=>{var n,r;return[{text:e.name},{text:null===(n=e.number)||void 0===n?void 0:n.toString()},{text:null===(r=e.category)||void 0===r?void 0:r.toString()}]});return(0,t.jsxs)("div",{children:[(0,t.jsx)(i.u,{filters:[{groupId:"category",label:x,options:c}],removeFilter:b,searchWord:g,choosenDropdownFilters:d,texts:{searchPlaceholder:k,searchActionAriaLabel:B}}),(0,t.jsx)(l.i,{simple:!1,tableData:[{tableHeaders:a,tableRows:R}],sortableTableHeaders:[{headerIndex:0,sortFunction:()=>E("name"),sorted:(null==A?void 0:A.header)==="name",sortDirection:null==A?void 0:A.direction},{headerIndex:1,sortFunction:()=>E("number"),sorted:(null==A?void 0:A.header)==="number",sortDirection:null==A?void 0:A.direction}]}),(0,t.jsx)(o.tl,{className:u().PermitHoldersTable_pagination,numberOfItemsTotal:r.length,numberOfPages:Math.ceil(r.length/(0,s.I)(y,r)),pageSizeOptions:p,defaultValueIndex:h,currentPageNumber:N,errorText:j,paginationTexts:S,paginationAriaLabels:v,onNextPageBtnClick:()=>M(Number(N)+1),onPrevPageBtnClick:()=>M(Number(N)-1),onPageSizeChange:e=>{L(Number(e.target.value))},onCurrentPageNumberChange:e=>D(e),onCurrentPageKeyDown:e=>D(e),onCurrentPageBlur:e=>D(e)})]})};var g=r(58300),p=r(73413),h=r(32986);let m=e=>{let{noBackground:n=!1}=e,r=(0,a.S)(),[i,o]=(0,_.useState)(null),[l,s]=(0,_.useState)(null),[c,u]=(0,_.useState)(null),[m,C]=(0,_.useState)([]),[x,b]=(0,_.useState)(null),k=async e=>p.b.get(e).then(e=>e.data).catch(e=>[{error:e}]),B=async e=>{let n=await k(e);if(Object.hasOwn(n[0],"error"))return;o(n);let r=[...new Set(n.map(e=>{var n;return null===(n=e.category)||void 0===n?void 0:n.toString()}))].sort();r.every(e=>void 0===e)||u(r)};return(0,_.useEffect)(()=>{i||B("https://rofusweb.spillemyndigheden.dk/public/omniscient/charitablelotteries")},[]),(0,_.useEffect)(()=>{if(i){let e=i;m.length>0&&(e=e.filter(e=>m.some(n=>Number(n.value)===e.category))),x&&"*"!==x&&(e=e.filter(e=>e.name.toLocaleLowerCase().includes(x.toLocaleLowerCase())||e.number.toString().includes(x.toLocaleLowerCase()))),s(e)}},[m,x,i]),(0,t.jsx)(h.l,{enableBackground:!n,children:l?(0,t.jsx)(d,{tableData:l,tableHeaders:[r.getLabel("NameOfPermitHolder"),r.getLabel("CvrPNumber"),r.getLabel("PermitHolderCategory")],categoryFilter:c,handleFilters:e=>C(e),handleSearch:b,pageSizeOptions:[10,20,30],pageSizeOptionsDefaultValueIndex:1,paginationTexts:{paginationGeneralTexts:{totalResultsText:r.getLabel("TotalResults"),showText:r.getAction("Show").toLowerCase(),resultsPerPageText:r.getLabel("ResultsPerPage").toLowerCase(),pageText:r.getLabel("Page"),outOfText:r.getLabel("OutOf").toLowerCase(),pagesText:r.getLabel("Pages").toLowerCase()},paginationAriaLabels:{selectInputAriaLabel:r.getLabel("NumberOfResultsPerPage"),textInputAriaLabel:r.getLabel("CurrentPage"),prevButtonAriaLabel:r.getLabel("PreviousPage"),nextButtonAriaLabel:r.getLabel("NextPage")},paginationErrorText:r.getError("CatalogPagination")},listFilterTexts:{filterLabel:r.getLabel("Category"),removeFilterText:r.getAction("RemoveFilter"),searchPlaceholder:r.getSearch("Placeholder"),searchActionAriaLabel:r.getSearch("Search")}}):(0,t.jsx)(g.$,{text:r.getServiceInfo("FetchingData")})})}},80148:function(e,n,r){"use strict";r.d(n,{U:function(){return a},H:function(){return c}});
1var t,a,i=r(85893),o=r(94184),l=r.n(o);r(67294);var _=r(25273),s=r.n(_);(t=a||(a={})).primaryAccent="primaryAcccent",t.primary20="primary20",t.primary40="primary40",t.sand100="sand100",t.sand50="sand50",t.grey="grey",t.whiteBorder="whiteBorder",t.default="default",t.spilPrimary30="spilPrimary30",t.spilPrimary50="spilPrimary50";let c=e=>{let{className:n,id:r,colorSquare:t=!1,children:a,noTopMargin:o,noTopPadding:_,noWrapperMargin:c,marginTop:u,backgroundColor:d="default",centerChildren:g,rightAlignChildren:p}=e;return(0,i.jsx)("div",{className:l()(s().BackgroundContainer,{[s().BackgroundContainer___colorSquare]:t,[s().BackgroundContainer___noTopMargin]:o,[s().BackgroundContainer___noTopPadding]:_,[s()["BackgroundContainer___".concat(u,"Margin")]]:u,[s().BackgroundContainer___centerChildren]:g,[s().BackgroundContainer___rightAlignChildren]:p},s()["BackgroundContainer___".concat(d)],n),id:r,children:(0,i.jsx)("div",{className:l()(s().BackgroundContainer_wrapper,{[s().BackgroundContainer_wrapper___noWrapperMargin]:c}),children:a})})}},82988:function(e,n,r){"use strict";r.d(n,{X:function(){return d}});var t=r(85893),a=r(94184),i=r.n(a),o=r(11319),l=r(67294),_=r(23082),s=r(94594),c=r(54834),u=r.n(c);let d=e=>{let{className:n,id:r,label:a,checked:c,inline:d,name:g,value:p,formRegister:h,disabled:m,hasError:C,helpText:x,helpCtaAriaLabel:b,...k}=e,[B,S]=(0,l.useState)(!1);return(0,t.jsxs)("div",{className:i()(n,u().Checkbox,{[u().Checkbox___inline]:d},{[u().Checkbox___hasError]:C},{[u().Checkbox___disabled]:m}),children:[(0,t.jsx)("input",{type:"checkbox",className:u().Checkbox_input,id:r,disabled:m,defaultChecked:c,value:p,name:g,...h&&{...h.register(h.fieldName,h.options)},...k}),(0,t.jsxs)("label",{className:u().Checkbox_label,htmlFor:r,children:[a,x&&(0,t.jsx)(_.M,{describedById:r+"-help",helpText:x,onClick:()=>{S(!0)},ariaLabel:b,margined:!0})]}),x&&(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(o.u,{show:B,onClose:()=>S(!1),"aria-hidden":!B,children:(0,t.jsx)(s.H,{content:x})})})]})}},4406:function(e,n,r){"use strict";r.d(n,{u:function(){return p}});var t=r(85893),a=r(94184),i=r.n(a),o=r(82988),l=r(75911),_=r(67294),s=r(47933),c=r(89944),u=r(56229),d=r(85008),g=r.n(d);let p=e=>{let{choosenDropdownFilters:n=null,choosenFilters:r=[],choosenWord:a="*",className:d,dateRange:p,filters:h,historicCheckboxLabel:m,onShowHistoricChange:C,removeFilter:x,searchWord:b,texts:k}=e,[B,S]=(0,_.useState)(r),[v,f]=(0,_.useState)(a),[y,L]=(0,_.useState)(null),[N,F]=(0,_.useState)(null),[P,w]=(0,_.useState)(null),[j,T]=(0,_.useState)(""),{searchActionAriaLabel:A,searchPlaceholder:I,nextMonth:E,previousMonth:M,dateRangePlaceholder:D}=null!=k?k:{},O=e=>{(null==B||!B.find(n=>(null==n?void 0:n.value)===e.value))&&(S([...B,e]),n&&n([...B,e]))},R=e=>{let r=B.filter(n=>(n.value!==e.value||n.groupId!==e.groupId)&&n);S(r),n&&n(r)},H=e=>{f(e),b&&b(e)},W=e=>{let[n,r]=null!=e?e:[];if(F(n),n!==N&&w(null),w(r),!e||!n||!r){L(null),p&&p(null);return}let t=n?(0,s.p)(String(n),"dd-mm-yyyy"):"",a=r?(0,s.p)(String(r),"dd-mm-yyyy"):"";L("".concat(t," - ").concat(a)),p&&p(e)};return(0,t.jsxs)("div",{className:i()(g().ListFilters,d),children:[h&&h.length>0&&(0,t.jsx)("div",{className:i()(g().ListFilters_wrapper,"listFilters_wrapper--global"),children:(0,t.jsxs)("div",{className:g().ListFilters_inputs,children:[h.map((e,n)=>{var r,a;return e.label&&(null==e?void 0:null===(r=e.options)||void 0===r?void 0:r.length)>0?(0,t.jsx)("div",{className:g().ListFilters_input,children:(0,t.jsx)(u.zI,{title:e.label,id:"filter_".concat(n),options:e.options,onSelect:n=>{O({groupId:e.groupId,value:"string"==typeof n?n:n.value,title:"string"==typeof n?n:n.title})},disabled:(null==e?void 0:null===(a=e.options)||void 0===a?void 0:a.length)===0})},n):null}),p&&(0,t.jsx)("div",{className:g().ListFilters_dateRange,children:(0,t.jsx)(l.Dw,{ariaLabels:{nextBtnAriaLabel:E,prevBtnAriaLabel:M},id:"listfilter",placeholder:D,enableMonthSelect:!0,enableYearSelect:!0,yearOptions:{startYear:1996,endYear:new Date().getFullYear()},startDate:N,endDate:P,callBack:W})}),b&&(0,t.jsx)("div",{className:g().ListFilters_search,children:(0,t.jsx)(c.R,{id:"searchbox",searchActionAriaLabel:A,searchPlaceholder:I,query:j,searchWord:H,handleChangeCallback:e=>T(e)})})]})}),null==B?void 0:B.map((e,n)=>(0,t.jsx)(u.R7,{className:g().ListFilters_tag,id:"selectedDropDownFilter".concat(n),text:null==e?void 0:e.title,removeFilterText:x,onElementRemoved:()=>{R(e)}}
1,n)),(null==v?void 0:v.length)>0&&"*"!=v&&(0,t.jsx)(u.R7,{className:g().ListFilters_tag,id:"selectedFilterSearch",text:"*"!=v&&v,removeFilterText:x,onElementRemoved:()=>{H("*"),T("")}}),y&&(0,t.jsx)(u.R7,{className:g().ListFilters_tag,id:"selectedFilterDate",text:y,removeFilterText:x,onElementRemoved:()=>{W(null)}}),C&&m&&(0,t.jsx)(o.X,{id:"historicCheckbox",label:m,onChange:e=>C(e.target.checked)})]})}},89944:function(e,n,r){"use strict";r.d(n,{R:function(){return u}});var t=r(85893),a=r(94184),i=r.n(a),o=r(67294),l=r(22634),_=r(58300),s=r(71726),c=r.n(s);let u=e=>{let{className:n,id:r,searchActionAriaLabel:a,searchPlaceholder:s,searchWord:u,width:d="fullWidth",query:g,handleChangeCallback:p,showSpinner:h}=e;return(0,o.useEffect)(()=>{let e=e=>{"Enter"===e.key&&(e.preventDefault(),u(g))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[a,s,u,g]),(0,t.jsxs)("div",{className:i()(c().SearchBox,c()["SearchBox___".concat(d)],n),children:[h&&(0,t.jsx)(_.$,{className:c().SearchBox_spinner}),(0,t.jsx)(l.I,{id:r,type:"search",placeholder:s,textLeft:!0,button:{icon:"soeg",ariaLabel:a,onClick:()=>u(g),type:"button"},autoComplete:"off",value:g,onChange:e=>p(e.target.value)})]})}},58300:function(e,n,r){"use strict";r.d(n,{A:function(){return c},$:function(){return s}});var t=r(85893),a=r(67294),i=r(94184),o=r.n(i),l=r(79737),_=r.n(l);let s=e=>{let{text:n,light:r=!1,centered:a=!1,className:i}=e;return(0,t.jsxs)("div",{className:o()(_().Spinner,a&&_().Spinner___centered,i),children:[(0,t.jsx)("div",{className:o()(_().Spinner_icon,r&&_().Spinner_icon___light,!r&&_().Spinner_icon___dark)}),n&&(0,t.jsx)("p",{className:o()(_().Spinner_text,r&&_().Spinner_text___light),children:n})]})},c=e=>{let{text:n,hidden:r=!1}=e,[i,o]=(0,a.useState)("");return(0,a.useEffect)(()=>(document.body.setAttribute("aria-busy",(!r).toString()),document.body.classList[r?"remove":"add"]("modal-open"),o(r?"":"show"),()=>{document.body.setAttribute("aria-busy","false"),document.body.classList.remove("modal-open")}),[r]),r?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fade modal ".concat(i," d-flex align-items-center"),tabIndex:-1,role:"dialog",children:(0,t.jsx)("div",{className:"modal-dialog",children:(0,t.jsx)(s,{text:n})})}),(0,t.jsx)("div",{className:"modal-backdrop fade ".concat(i)})]})}},86072:function(e,n,r){"use strict";r.d(n,{I:function(){return a},h:function(){return t}});let t=(e,n,r)=>{let t=(n-1)*r;return e.length<=r&&(t=0),e.slice(t,t+r)},a=(e,n)=>Number.isNaN(e)?n.length:Number(e)},47933:function(e,n,r){"use strict";r.d(n,{p:function(){return i}});let t=e=>e<10?"0".concat(e):e,a=e=>new Date(e),i=(e,n)=>{let r=n,i=a(e),o=t(i.getDate()).toString(),l=t(i.getMonth()+1).toString(),_=i.getFullYear().toString();return(r=(r=r.replace("dd",o)).replace("mm",l)).replace("yyyy",_)}},39177:function(e){e.exports={PermitHoldersTable_pagination:"PermitHoldersTable_PermitHoldersTable_pagination__QbXQO"}},25273:function(e){e.exports={BackgroundContainer:"BackgroundContainer_BackgroundContainer__bmvSn",BackgroundContainer___xsMargin:"BackgroundContainer_BackgroundContainer___xsMargin__m1rz5",BackgroundContainer___smMargin:"BackgroundContainer_BackgroundContainer___smMargin__AkBRb",BackgroundContainer___noTopMargin:"BackgroundContainer_BackgroundContainer___noTopMargin__15_GS",BackgroundContainer___colorSquare:"BackgroundContainer_BackgroundContainer___colorSquare__CrfiI",BackgroundContainer___noTopPadding:"BackgroundContainer_BackgroundContainer___noTopPadding__VbCMH",BackgroundContainer___default:"BackgroundContainer_BackgroundContainer___default__tvz2Y",BackgroundContainer___primaryAccent:"BackgroundContainer_BackgroundContainer___primaryAccent__ME5is",BackgroundContainer___grey:"Backgroun
1dContainer_BackgroundContainer___grey__iTAo9",BackgroundContainer___whiteBorder:"BackgroundContainer_BackgroundContainer___whiteBorder__zWWaa",BackgroundContainer___primary20:"BackgroundContainer_BackgroundContainer___primary20__XDp9t",BackgroundContainer___primary40:"BackgroundContainer_BackgroundContainer___primary40__SF_EG",BackgroundContainer___sand50:"BackgroundContainer_BackgroundContainer___sand50__A3Y2I",BackgroundContainer___sand100:"BackgroundContainer_BackgroundContainer___sand100__EtUFj",BackgroundContainer___spilPrimary30:"BackgroundContainer_BackgroundContainer___spilPrimary30__2hqpN",BackgroundContainer___spilPrimary50:"BackgroundContainer_BackgroundContainer___spilPrimary50__OMebM",BackgroundContainer___centerChildren:"BackgroundContainer_BackgroundContainer___centerChildren__MCyWP",BackgroundContainer___rightAlignChildren:"BackgroundContainer_BackgroundContainer___rightAlignChildren__5mk3P",BackgroundContainer_wrapper:"BackgroundContainer_BackgroundContainer_wrapper__vnZ3P",BackgroundContainer_wrapper___noWrapperMargin:"BackgroundContainer_BackgroundContainer_wrapper___noWrapperMargin__rabNd"}},54834:function(e){e.exports={Checkbox:"Checkbox_Checkbox__pfFDO",Checkbox___inline:"Checkbox_Checkbox___inline__39WQ9",Checkbox_input:"Checkbox_Checkbox_input__F0n_E",Checkbox_label:"Checkbox_Checkbox_label__xudua",Checkbox___hasError:"Checkbox_Checkbox___hasError__pmG9r",Checkbox___disabled:"Checkbox_Checkbox___disabled__fqqGc"}},85008:function(e){e.exports={ListFilters:"ListFilters_ListFilters__kTAus",ListFilters_wrapper:"ListFilters_ListFilters_wrapper__E_eqF",ListFilters_inputs:"ListFilters_ListFilters_inputs__Yn8NU",ListFilters_search:"ListFilters_ListFilters_search__9OXtq",ListFilters_dateRange:"ListFilters_ListFilters_dateRange___uUNi"}},71726:function(e){e.exports={SearchBox:"SearchBox_SearchBox__kxCzi",SearchBox___fullWidth:"SearchBox_SearchBox___fullWidth__NIi
1Qc",SearchBox_spinner:"SearchBox_SearchBox_spinner__WOJeX"}},79737:function(e){e.exports={Spinner:"Spinner_Spinner__wPWuR",Spinner___centered:"Spinner_Spinner___centered__wbHX7",Spinner_text:"Spinner_Spinner_text__HLfR7",Spinner_text___light:"Spinner_Spinner_text___light__Ys0fm",Spinner_icon:"Spinner_Spinner_icon__aVoGe",rotating:"Spinner_rotating__j1XIS",Spinner_icon___light:"Spinner_Spinner_icon___light__4IOwe",Spinner_icon___dark:"Spinner_Spinner_icon___dark___P83L"}}}]);

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.