PageSourceSearch

https://www.multiregnskab.dk/68800205f3b.js

js multiregnskab.dk collected 2026-09-24 14:02:40 UTC 1,203,010 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkportfoliodesign=self.webpackChunkportfoliodesign||[]).push([[688],{33435(e,t,n){n.d(t,{h:()=>l});var r,o,i=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e){return i.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=i.createElement("path",{fill:"#4eff94",d:"M28.8 16c0-7.069-5.731-12.8-12.8-12.8S3.2 8.931 3.2 16c0 7.069 5.731 12.8 12.8 12.8S28.8 23.069 28.8 16zm3.2 0c0 8.836-7.164 16-16 16S0 24.836 0 16C0 7.163 7.163 0 16 0s16 7.163 16 16z"})),o||(o=i.createElement("path",{fill:"#4eff94",d:"M16 8a1.6 1.6 0 00-1.6 1.6v4.8H9.6a1.6 1.6 0 100 3.2h4.8v4.8a1.6 1.6 0 103.2 0v-4.8h4.8a1.6 1.6 0 100-3.2h-4.8V9.6A1.6 1.6 0 0016 8z"})))}n.p},32992(e,t,n){n.d(t,{h:()=>s});var r,o,i,a=n(96540);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function s(e){return a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 32"},e),r||(r=a.createElement("path",{fill:"#fff",d:"M0 .8A.8.8 0 01.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8z"})),o||(o=a.createElement("path",{fill:"#c1cdd6",d:"M24.8 31.2V8.331L24.469 8H17.6V1.131L17.269.8H.8v30.4h24zm-1.131-24L18.4 1.931V7.2h5.269zM.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8A.8.8 0 01.8 0z"})),i||(i=a.createElement("path",{fill:"#18acff",d:"M5.384 20.004l1.315-2.26h1.255l-1.891 3.102L7.997 24H6.729l-1.345-2.295L4.035 24H2.772l1.938-3.154-1.895-3.102H4.07l1.315 2.26zM9.887 23.132h2.84V24H8.8v-6.256h1.087v5.388zM16.831 22.389c0-.275-.097-.487-.292-.636-.192-.149-.54-.299-1.044-.451s-.905-.321-1.203-.507c-.57-.358-.855-.825-.855-1.401 0-.504.205-.92.614-1.246.412-.327.947-.49 1.603-.49.435 0 .824.08 1.164.241s.609.39.804.688c.195.295.292.623.292.984h-1.083c0-.327-.103-.582-.309-.765-.203-.186-.496-.279-.877-.279-.355 0-.632.076-.829.228-.195.152-.292.364-.292.636 0 .229.106.421.318.576.212.152.561.301 1.048.447.487.143.878.308 1.173.494.295.183.511.395.649.636.138.238.206.517.206.838 0 .521-.201.937-.602 1.246-.398.307-.94.46-1.624.46-.453 0-.869-.083-1.25-.249a2.13 2.13 0 01-.885-.696 1.739 1.739 0 01-.314-1.031h1.087c0 .355.117.63.352.825s.572.292 1.01.292c.378 0 .662-.076.851-.228a.746.746 0 00.288-.61zM21.025 20.004l1.315-2.26h1.255l-1.891 3.102L23.638 24H22.37l-1.345-2.295L19.676 24h-1.263l1.938-3.154-1.895-3.102h1.255l1.315 2.26z"})))}n.p},3012(e,t,n){n.d(t,{h:()=>l});var r,o,i=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e){return i.createElement("svg",a({width:"1em",height:"1em",viewBox:"0 0 26 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("g",{clipPath:"url(#download_ixbrl_svg__clip0_101_21)"},i.createElement("path",{d:"M0 .8A.8.8 0 01.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8z",fill:"#fff"}),i.createElement("path",{d:"M24.8 31.2V8.331L24.469 8H17.6V1.131L17.269.8H.8v30.4h24zm-1.131-24L18.4 1.931V7.2h5.269zM.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8A.8.8 0 01.8 0z",fill:"#C1CDD6"}),i.createElement("path",{d:"M3.313 21.89l1.461 2.39h.048l1.462-2.39H7.35l-1.903 3.055L7.363 28H6.29l-1.467-2.357h-.048L3.307 28H2.233l1.948-3.055-1.936-3.054h1.067zM8.265 28v-6.11h2.237c.433 0 .792.072 1.077.216.284.14.497.333.638.575.141.241.212.512.212.815 0 .254-.047.47-.14.644a1.154 1.154 0 01-.376.418 1.658 1.658 0 01-.513.226v.06c.203.01.4.076.593.197.195.12.356.29.484.51.127.22.19.49.19.805 0 .313-.073.593-.22.842-.145.246-.37.442-.674.587-.305.143-.693.215-1.167.215H8.266zm.921-.79h1.33c.442 0 .758-.086.95-.257a.825.825 0 00.286-.641c0-.193-.049-.37-.146-.531a1.043 1.043 0 00-.418-.385 1.338 1.338 0 00-.638-.143H9.187v1.956zm0-2.676h1.235c.207 0 .393-.04.558-.12.167-.08.3-.19.397-.334.1-.145.15-.316.15-.513a.848.848 0 00-.266-.635c-.177-.171-.449-.257-.815-.257H9.187v1.859zM13.762 28v-6.11h2.177c.474 0 .866.
1082 1.179.245.314.164.549.39.704.678.155.286.232.617.232.993 0 .374-.078.703-.235.987-.155.283-.39.503-.704.66-.313.157-.705.235-1.179.235h-1.65v-.793h1.567c.298 0 .54-.043.728-.128a.849.849 0 00.414-.373c.088-.163.132-.36.132-.588 0-.23-.045-.43-.135-.6a.867.867 0 00-.414-.387c-.187-.092-.433-.138-.737-.138h-1.157V28h-.922zm3.016-2.756L18.287 28h-1.05l-1.48-2.756h1.02zM19.176 28v-6.11h.922v5.316h2.768V28h-3.69zM3.07 14.127V19h-.735v-4.873h.736zm5.004 0V19h-.676l-2.476-3.574h-.046V19h-.735v-4.873h.68l2.48 3.579h.045v-3.579h.728zM9.147 19v-4.873h.735v4.24h2.208V19H9.147zm4.517-4.873V19h-.736v-4.873h.736zm5.003 0V19h-.676l-2.476-3.574h-.046V19h-.735v-4.873h.68l2.48 3.579h.045v-3.579h.728zM19.74 19v-4.873h3.055v.633h-2.32v1.485h2.16v.63h-2.16v1.492h2.348V19H19.74z",fill:"#18ACFF"}))),o||(o=i.createElement("defs",null,i.createElement("clipPath",{id:"download_ixbrl_svg__clip0_101_21"},i.createElement("path",{fill:"#fff",d:"M0 0h26v32H0z"})))))}n.p},76671(e,t,n){n.d(t,{h:()=>c});var r,o,i,a,l=n(96540);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(null,arguments)}function c(e){return l.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 32"},e),r||(r=l.createElement("path",{fill:"#fff",d:"M0 .8A.8.8 0 01.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8z"})),o||(o=l.createElement("path",{fill:"#f25123",d:"M6.815 21.675V24H5.728v-6.256h2.393c.699 0 1.253.182 1.663.546.412.364.619.845.619 1.444 0 .613-.202 1.09-.606 1.431-.401.341-.964.511-1.689.511H6.815zm0-.872h1.306c.387 0 .682-.09.885-.271.203-.183.305-.447.305-.791 0-.338-.103-.607-.309-.808-.206-.203-.49-.308-.851-.314H6.815v2.183zM11.357 24v-6.256h1.848c.553 0 1.043.123 1.47.37.43.246.762.596.997 1.048s.352.971.352 1.556v.314c0 .593-.119 1.114-.357 1.564-.235.45-.571.796-1.01 1.04-.435.243-.935.365-1.5.365h-1.8zm1.087-5.38v4.512h.709c.57 0 1.007-.178 1.311-.533.306-.358.463-.871.468-1.538v-.348c0-.679-.148-1.197-.443-1.555s-.723-.537-1.285-.537h-.761zM20.711 21.349h-2.518V24h-1.087v-6.256h3.975v.877h-2.888v1.861h2.518v.868z"})),i||(i=l.createElement("path",{fill:"#fafafa",d:"M17.6 0l8 8h-8V0z"})),a||(a=l.createElement("path",{fill:"#c1cdd6",d:"M24.8 31.2V8.331L24.469 8H17.6V1.131L17.269.8H.8v30.4h24zm-1.131-24L18.4 1.931V7.2h5.269zM.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8A.8.8 0 01.8 0z"})))}n.p},90458(e,t,n){n.d(t,{h:()=>s});var r,o,i,a=n(96540);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function s(e){return a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 42 32"},e),r||(r=a.createElement("path",{fill:"#f5f6f7",d:"M3.84 2.877h17.92a3.84 3.84 0 013.84 3.84v17.92a3.84 3.84 0 01-3.84 3.84H3.84A3.84 3.84 0 010 24.637V6.717a3.84 3.84 0 013.84-3.84z"})),o||(o=a.createElement("path",{fill:"#aaa",d:"M2.37 28.185l.49-1.182c.3.124.63.194.98.194h1.12v1.28H3.84a3.842 3.842 0 01-1.47-.291zm18.27.292v-1.28h1.12c.349 0 .68-.069.98-.194l.49 1.182a3.824 3.824 0 01-1.47.291h-1.12zm4.96-20.64h-1.28v-1.12c0-.349-.069-.68-.194-.98l1.182-.49c.188.453.291.949.291 1.47v1.12zM4.96 2.877H3.84c-.521 0-1.017.104-1.47.291l.49 1.182c.3-.124.63-.194.98-.194h1.12v-1.28zM0 23.517h1.28v1.12c0 .35.069.68.194.98l-1.182.49a3.824 3.824 0 01-.291-1.47v-1.12zm0-2.24h1.28v-2.24H0v2.24zm0-4.48h1.28v-2.24H0v2.24zm0-4.48h1.28v-2.24H0v2.24zm0-4.48h1.28v-1.12c0-.349.069-.68.194-.98l-1.182-.49a3.824 3.824 0 00-.291 1.47v1.12zm7.2-4.96v1.28h2.24v-1.28H7.2zm4.48 0v1.28h2.24v-1.28h-2.24zm4.48 0v1.28h2.24v-1.28h-2.24zm4.48 0v1.28h1.12c.349 0 .68.069.98.194l.49-1.182a3.824 3.824 0 00-1.47-.291h-1.12zm4.96 7.2h-1.28v2.24h1.28v-2.24zm0 4.48h-1.28v2.24h1.28v-2.24zm0 4.48h-1.28v2.24h1.28v-2.24zm0 4.48h-1.28v1.12c0 .35-.069.68-.194.98l1.182.49c.188-.453.291-.949.291-1.47v-1.12zm-7.2 4.96v-1.28h-2.24v1.28h2.24zm-4.48 0v-1.28h-2.24v1.28h2.24zm-4.48 0v-1.28H7.2v1.28h2.24z"})),i||(i=a.createElement("path",{fill:"#1c9ef6",d:"M20.258.994l17.309 4.638a3.84 3.84 0 012.715 4.703l-4.638 17.309a3.84 3.84 0 01-4.703 2.715l-17.309-4.638a3.84 3.84 0 01-2.715-4.703l4.638-17.309A3.84 3.84 0 0120.258.994z"})))}n.p},47634(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=o.createElement("path",{fill:"#ccc",d:"M0 3.2A3.2 3.2 0 013.2 0h25.6a3.2 3.2 0 010 6.4H3.2A3.2 3.2 0 010 3.2zM0 16a3.2 3.2 0 013.2-3.2h25.6a3.2 3.2 0 010 6.4H3.2A3.2 3.2 0 010 16zm3.2 9.6a3.2 3.2 0 000 6.4h25.6a3.2 3.2 0 000-6.4H3.2z"})))}n.p}
1,10840(e,t,n){n.d(t,{h:()=>s});var r,o,i,a=n(96540);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function s(e){return a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 32"},e),r||(r=a.createElement("path",{fill:"#fff",d:"M0 .8A.8.8 0 01.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8z"})),o||(o=a.createElement("path",{fill:"#c1cdd6",d:"M24.8 31.2V8.331L24.469 8H17.6V1.131L17.269.8H.8v30.4h24zm-1.131-24L18.4 1.931V7.2h5.269zM.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8A.8.8 0 01.8 0z"})),i||(i=a.createElement("path",{fill:"#888",d:"M18.05 14.64a3.718 3.718 0 00-5.253-.005h-.005L7.254 20.16a2.731 2.731 0 003.861 3.862l4.491-4.501v-.005a1.76 1.76 0 00-2.389-2.586.607.607 0 00-.101.096l-2.768 2.763h-.005a.531.531 0 10.747.752l2.763-2.773v-.005a.68.68 0 01.971.021.687.687 0 01-.005.949l-4.501 4.496v-.005a1.674 1.674 0 01-2.368-2.363l5.531-5.541c1.029-1.035 2.709-1.035 3.739-.005s1.029 2.709 0 3.739l-4.155 4.149v-.005a.531.531 0 00-.016.752.537.537 0 00.752.011c0-.005.005-.011.011-.016l4.149-4.155v-.005a3.72 3.72 0 000-5.253l-.005-.005.098.117z"})))}n.p},84500(e,t,n){n.d(t,{h:()=>l});var r,o,i=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e){return i.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 36 32"},e),r||(r=i.createElement("path",{fill:"#dfcc65",d:"M0 2.667A2.667 2.667 0 012.667 0h12.444a2.667 2.667 0 012.667 2.667c0 .491.398.889.889.889h14.222a2.667 2.667 0 012.667 2.667v23.111a2.667 2.667 0 01-2.667 2.667H2.667A2.667 2.667 0 010 29.334V2.667z"})),o||(o=i.createElement("path",{fill:"#fbe98e",d:"M35.556 29.333V8.889a2.667 2.667 0 00-2.667-2.667H2.667A2.667 2.667 0 000 8.889v20.444A2.667 2.667 0 002.667 32h30.222a2.667 2.667 0 002.667-2.667z"})))}n.p},96189(e,t,n){n.d(t,{h:()=>s});var r,o,i,a=n(96540);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}function s(e){return a.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 36 32"},e),r||(r=a.createElement("path",{fill:"#dfcc65",d:"M0 2.667A2.667 2.667 0 012.667 0h12.444a2.667 2.667 0 012.667 2.667c0 .491.398.889.889.889h14.222a2.667 2.667 0 012.667 2.667v23.111a2.667 2.667 0 01-2.667 2.667H2.667A2.667 2.667 0 010 29.334V2.667z"})),o||(o=a.createElement("path",{fill:"#fbe98e",d:"M35.556 29.333V8.889a2.667 2.667 0 00-2.667-2.667H2.667A2.667 2.667 0 000 8.889v20.444A2.667 2.667 0 002.667 32h30.222a2.667 2.667 0 002.667-2.667z"})),i||(i=a.createElement("path",{fill:"#ad9200",d:"M13.854 23.632l-2.299-2.299a1.257 1.257 0 111.778-1.778l1.778 1.778 7.111-7.111A1.257 1.257 0 1124 16l-7.632 7.632a1.778 1.778 0 01-2.514 0z"})))}n.p},23087(e,t,n){n.d(t,{h:()=>l});var r,o,i=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e){return i.createElement("svg",a({width:"1em",height:"1em",viewBox:"0 0 22 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=i.createElement("path",{d:"M6 10h16L14 0 6 10z",fill:"#0061FF"})),o||(o=i.createElement("path",{d:"M9.097 6.129L6 2l-6 8h6l3.097-3.871z",fill:"#1D9EF6"})))}n.p},82756(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=o.createElement("path",{fill:"#007bc2",d:"M16 0C7.168 0 0 7.168 0 16s7.168 16 16 16 16-7.168 16-16S24.832 0 16 0zm1.6 24h-3.2v-9.6h3.2V24zm0-12.8h-3.2V8h3.2v3.2z"})))}n.p},64559(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=o.createElement("path",{fill:"#646473",d:"M16 0a2 2 0 012 2v15.172l4.586-4.586a2 2 0 112.828 2.828l-8 8a2 2 0 01-2.828 0l-8-8a2 2 0 112.828-2.828L14 17.172V2a2 2 0 012-2zM2 28a2 2 0 100 4h28a2 2 0 100-4H2z"})))}n.p},85667(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=o.createElement("path",{fill:"#646473",d:"M18 2a2 2 0 10-4 0v12H2a2 2 0 100 4h12v12a2 2 0 104 0V18h12a2 2 0 100-4H18V2z"})))}n.p},13545(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 128 32"},e),r||(r=o.createElement("path",{fill:"currentColor",stroke:"currentColor",d:"M32 16c0 8.837-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0s16 7.163 16 16zm48 0c0 8.837-7.163 16-16 16s-16-7.163-16-16S55.163 0 64 0s16 7.163 16 16zm32 16c8.837 0 16-7.163 16-16s-7.163-16-16-16-16 7.163-16 16 7.163 16 16 16z"})))}n.p},91308(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=o.createElement("path",{fill:"#aaa",d:"M20.669 23.498l7.916 7.9
116a2 2 0 102.828-2.828l-7.916-7.916a12.943 12.943 0 002.502-7.669c0-7.18-5.82-13-13-13s-13 5.82-13 13 5.82 13 13 13c2.868 0 5.519-.929 7.669-2.502zM22 13c0 4.971-4.029 9-9 9s-9-4.029-9-9 4.029-9 9-9 9 4.029 9 9z"})))}n.p},50369(e,t,n){n.d(t,{h:()=>l});var r,o,i=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e){return i.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=i.createElement("path",{fill:"#eee",d:"M17.6 0a1.6 1.6 0 011.6 1.6v2.003c1.174.302 2.284.767 3.302 1.369l1.417-1.417a1.6 1.6 0 012.263 0l2.263 2.263a1.6 1.6 0 010 2.263l-1.417 1.417a12.72 12.72 0 011.369 3.302H30.4a1.6 1.6 0 011.6 1.6v3.2a1.6 1.6 0 01-1.6 1.6h-2.003a12.706 12.706 0 01-1.369 3.302l1.417 1.417a1.6 1.6 0 010 2.263l-2.263 2.263a1.6 1.6 0 01-2.263 0l-1.417-1.417a12.72 12.72 0 01-3.302 1.369V30.4a1.6 1.6 0 01-1.6 1.6h-3.2a1.6 1.6 0 01-1.6-1.6v-2.003a12.706 12.706 0 01-3.302-1.369l-1.417 1.417a1.6 1.6 0 01-2.263 0l-2.263-2.263a1.6 1.6 0 010-2.263l1.417-1.417A12.72 12.72 0 013.603 19.2H1.6A1.6 1.6 0 010 17.6v-3.2a1.6 1.6 0 011.6-1.6h2.003a12.706 12.706 0 011.369-3.302L3.555 8.081a1.6 1.6 0 010-2.263l2.263-2.263a1.6 1.6 0 012.263 0l1.417 1.417A12.72 12.72 0 0112.8 3.603V1.6A1.6 1.6 0 0114.4 0h3.2zM16 20.8a4.8 4.8 0 100-9.6 4.8 4.8 0 000 9.6z"})),o||(o=i.createElement("path",{fill:"#999",d:"M17.6 4.844l1.201.309c1.026.264 1.996.67 2.887 1.197l1.068.631 2.295-2.295 2.263 2.263-2.295 2.295.631 1.068c.527.891.933 1.861 1.197 2.887l.309 1.201H30.4v3.2h-3.244l-.309 1.201a11.105 11.105 0 01-1.197 2.887l-.631 1.068 2.295 2.295-2.263 2.263-2.295-2.295-1.068.631c-.891.527-1.861.933-2.887 1.197l-1.201.309V30.4h-3.2v-3.244l-1.201-.309a11.105 11.105 0 01-2.887-1.197l-1.068-.631-2.295 2.295-2.263-2.263 2.295-2.295-.631-1.068a11.105 11.105 0 01-1.197-2.887L4.844 17.6H1.6v-3.2h3.244l.309-1.201c.264-1.026.67-1.996 1.197-2.887l.631-1.068-2.295-2.295 2.263-2.263 2.295 2.295 1.068-.631a11.105 11.105 0 012.887-1.197l1.201-.309V1.6h3.2v3.244zm1.6-1.241V1.6A1.6 1.6 0 0017.6 0h-3.2a1.6 1.6 0 00-1.6 1.6v2.003a12.706 12.706 0 00-3.302 1.369L8.081 3.555a1.6 1.6 0 00-2.263 0L3.555 5.818a1.6 1.6 0 000 2.263l1.417 1.417A12.72 12.72 0 003.603 12.8H1.6A1.6 1.6 0 000 14.4v3.2a1.6 1.6 0 001.6 1.6h2.003a12.706 12.706 0 001.369 3.302l-1.417 1.417a1.6 1.6 0 000 2.263l2.263 2.263a1.6 1.6 0 002.263 0l1.417-1.417a12.72 12.72 0 003.302 1.369V30.4a1.6 1.6 0 001.6 1.6h3.2a1.6 1.6 0 001.6-1.6v-2.003a12.706 12.706 0 003.302-1.369l1.417 1.417a1.6 1.6 0 002.263 0l2.263-2.263a1.6 1.6 0 000-2.263l-1.417-1.417a12.72 12.72 0 001.369-3.302H30.4a1.6 1.6 0 001.6-1.6v-3.2a1.6 1.6 0 00-1.6-1.6h-2.003a12.706 12.706 0 00-1.369-3.302l1.417-1.417a1.6 1.6 0 000-2.263l-2.263-2.263a1.6 1.6 0 00-2.263 0l-1.417 1.417A12.72 12.72 0 0019.2 3.603zM22.4 16c0-3.535-2.865-6.4-6.4-6.4S9.6 12.465 9.6 16s2.865 6.4 6.4 6.4 6.4-2.865 6.4-6.4zm-1.6 0a4.8 4.8 0 11-9.6 0 4.8 4.8 0 019.6 0z"})))}n.p},85220(e,t,n){n.d(t,{h:()=>l});var r,o,i=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e){return i.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=i.createElement("path",{fill:"#e4e4e4",d:"M10.435 16a5.565 5.565 0 1111.13 0 5.565 5.565 0 01-11.13 0zM16 0C7.163 0 0 7.163 0 16s7.163 16 16 16 16-7.163 16-16S24.837 0 16 0z"})),o||(o=i.createElement("path",{fill:"#df574c",d:"M20.87.696l-2.783 10.087s-1.272-.348-2.087-.348-2.087.348-2.087.348L11.13.696S14.098 0 16 0s4.87.696 4.87.696zm-2.783 20.521l2.783 10.087S17.902 32 16 32s-4.87-.696-4.87-.696l2.783-10.087s1.272.348 2.087.348 2.087-.348 2.087-.348zM.696 11.13l10.087 2.783s-.348 1.272-.348 2.087.348 2.087.348 2.087L.696 20.87S0 17.902 0 16s.696-4.87.696-4.87zm20.521 2.783l10.087-2.783S32 14.098 32 16s-.696 4.87-.696 4.87l-10.087-2.783s.348-1.272.348-2.087-.348-2.087-.348-2.087z"})))}n.p},25973(e,t,n){n.d(t,{h:()=>l});var r,o,i=n(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(null,arguments)}function l(e){return i.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=i.createElement("path",{fill:"#baf3ff",d:"M0 7.273a2.908 2.908 0 012.909-2.909h26.182A2.908 2.908 0 0132 7.273v17.455a2.908 2.908 0 01-2.909 2.909H2.909A2.908 2.908 0 010 24.728V7.273z"})),o||(o=i.createElement("path",{fill:"#0074c2",d:"M0 4.364h32v1.455L16 18.91 0 5.819V4.3
164z"})))}n.p},91142(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 1a1 1 0 011-1h6a1 1 0 011 1v2h7a1 1 0 011 1v11a1 1 0 01-1 1H1a1 1 0 01-1-1V1zm1 0h6v2H1V1zm0 3v11h14V4H1z",fill:"#fff"})))}n.p},76312(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),r||(r=o.createElement("path",{fill:"#1c9ef6",d:"M30.549 0l-3.636 2.036L23.277 0l2.036 3.636-2.036 3.636 3.636-2.036 3.636 2.036-2.036-3.636L30.549 0zM19.451 7.695a1.45 1.45 0 00-2.051 0L.425 24.67a1.45 1.45 0 000 2.051l3.404 3.404a1.45 1.45 0 002.051 0l16.96-16.96a1.45 1.45 0 000-2.051l-3.389-3.418zm-1.498 7.985l-3.084-3.084 3.549-3.549 3.084 3.084-3.549 3.549z"})))}n.p},83356(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({width:"1em",height:"1em",viewBox:"0 0 22 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M12.785 11H7.123v-.571c.264-.02.574-.066.93-.14.357-.078.535-.173.535-.285a.679.679 0 00-.015-.132.758.758 0 00-.058-.198l-.887-2.153H4.04c-.083.2-.176.435-.279.703-.097.269-.183.508-.256.718a4.184 4.184 0 00-.169.593 2.524 2.524 0 00-.022.256c0 .157.118.291.352.403.24.108.635.186 1.187.235V11H.59v-.571c.161-.01.342-.034.542-.074.205-.043.366-.102.483-.175.2-.117.369-.262.506-.432.141-.171.258-.374.351-.608.567-1.372 1.133-2.747 1.7-4.124L6.06.46h1.465a723.603 723.603 0 012.248 5.582A160.73 160.73 0 0011.16 9.44c.063.146.144.28.241.403a1.605 1.605 0 00.894.512c.18.04.344.064.49.074V11zM7.328 6.796L5.82 3.03 4.333 6.796h2.995zM21.178 10.846a5.523 5.523 0 01-.762.256 3.593 3.593 0 01-.93.118c-.6 0-1.042-.088-1.325-.264a1.356 1.356 0 01-.579-.769h-.044a4.569 4.569 0 01-.483.425 2.644 2.644 0 01-.491.3c-.23.107-.452.186-.666.234-.21.054-.506.081-.887.081-.566 0-1.05-.166-1.45-.498-.4-.337-.6-.781-.6-1.333 0-.317.043-.586.131-.806.088-.224.213-.422.374-.593.146-.156.315-.286.505-.388.195-.103.408-.198.637-.286.44-.16.967-.327 1.582-.498.616-.176 1.065-.332 1.348-.469v-.703c0-.122-.01-.283-.03-.483-.019-.2-.06-.369-.124-.505a.966.966 0 00-.322-.396c-.146-.107-.34-.161-.579-.161-.214 0-.395.032-.542.095-.141.059-.256.12-.344.183.015.098.056.247.125.447.068.2.102.393.102.579 0 .083-.022.188-.066.315a.695.695 0 01-.19.293c-.112.097-.24.173-.381.227-.137.053-.35.08-.637.08-.41 0-.72-.098-.93-.293-.21-.2-.315-.459-.315-.776 0-.274.107-.518.322-.733.22-.22.486-.4.798-.542a4.447 4.447 0 011.062-.337 5.51 5.51 0 011.114-.124c.473 0 .908.03 1.303.088.396.054.752.168 1.07.344.302.171.542.42.717.747.181.322.271.745.271 1.267 0 .552-.012 1.206-.036 1.963a73.47 73.47 0 00-.03 1.494c0 .22.032.393.096.52.068.127.17.223.307.286.083.039.213.063.389.073.18.005.344.008.49.008v.534zm-3.64-3.816c-.273.093-.544.2-.813.323a3.135 3.135 0 00-.66.373c-.18.137-.321.313-.424.527-.102.21-.154.46-.154.747 0 .381.086.657.257.828a.89.89 0 00.644.257c.269 0 .488-.054.66-.162.175-.112.329-.249.46-.41l.03-2.483z",fill:"#999"})))}n.p},51684(e,t,n){n.d(t,{h:()=>a});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 33 32"},e),r||(r=o.createElement("path",{fill:"#f0a92e",d:"M32.333 30.98c.547 0 1-.453 1-1 0-.173-.053-.333-.12-.48L18.2 1.487c-.32-.493-.96-.64-1.44-.333a.963.963 0 00-.333.32l-15 27.987a.993.993 0 00.4 1.347c.133.067.307.107.467.107l30.04.067zm-15-3.667h-.013c-1.107-.013-2-.907-2-2 0-1.107.893-2 2-2 1.093 0 2 .893 2 2V25.3c0 1.093-.907 2-2 2l.013.013zm0-16.333h-.013a1.318 1.318 0 011.333 1.32v7.28c0 .733-.6 1.333-1.333 1.333-.747 0-1.333-.6-1.333-1.333v-7.287a1.321 1.321 0 011.32-1.347l.027.033z"})))}n.p},27951(e,t,n){n.d(t,{$w:()=>s,WO:()=>v,cS:()=>c,cp:()=>a,hG:()=>m,kA:()=>l,qg:()=>p,sA:()=>d,vI:()=>f,wp:()=>u});var r=n(20212),o=n(14670),i=n(51470);function a(e){return(0,r.RD)(i.JhE,{method:"post",queryData:{realName:e}})}function l(e){return(0,r.RD)(i.etn,{method:"post",queryData:{codeValue:e}})}function s(e){var t=e.companyXid,n=e.access,a=e.filesAdd,l=e.filesEdit,s=e.filesView,c=e.username;return(0,r.RD)(i.gcm,{method:"post",ignoreStatus:[o.BR],data:{companyXid:t,access:n,filesAdd:a,filesEdit:l,filesView:s,username:c}})}function c(){return(0,r.RD)(i.PhZ)}function u(e){return(0,r.RD)(i.wcV,{method:"post",data:{userName:e}})}function d(e){return(0,r.RD)(i.IJG,{method:"post",data:{companyXid:e}})}function f(e){return(0,r.RD)(i.Ae3,{method:"post",ignoreStatus:[o.BR],queryD
1ata:{codeValue:e}})}function p(e){return(0,r.RD)(i.tpF,{method:"post",data:{userName:e}})}function m(e){var t=e.companyXid,n=e.oneHour,o=e.oneDay,a=e.oneWeek;return(0,r.RD)(i.MSt,{method:"post",data:{companyXid:t,oneHour:n,oneDay:o,oneWeek:a}})}function v(e){return(0,r.RD)(i.kq3,{method:"post",data:{companyXid:e}})}},39519(e,t,n){n.d(t,{C6:()=>h,DP:()=>b,Gn:()=>O,I1:()=>R,JF:()=>v,JU:()=>c,LC:()=>D,LM:()=>a,MW:()=>l,TV:()=>A,VG:()=>d,VT:()=>x,ZI:()=>k,Zk:()=>S,bc:()=>w,bo:()=>p,df:()=>I,ds:()=>f,iB:()=>g,jL:()=>E,ji:()=>P,kT:()=>s,lS:()=>_,nR:()=>u,o2:()=>y,rW:()=>T,tS:()=>j,vM:()=>m,vh:()=>N,yc:()=>C});var r=n(20212),o=n(14670),i=n(51470);function a(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.tableEditId;return(0,r.RD)(i.v0p,{method:"post",data:{companyXid:t,fiscalYearXid:n,tableEditId:o}})}function l(e){var t=e.companyXid,n=e.nickname,o=e.endOfYearDate;return(0,r.RD)(i.mSt,{method:"post",data:{companyXid:t,nickname:n,endOfYearDate:o}})}function s(e){return(0,r.RD)(i.aTk,{method:"post",data:{companyXid:e}})}function c(e){return(0,r.RD)(i.wjg,{method:"post",data:{companyXid:e}})}function u(e,t){return(0,r.RD)(i.G4W,{method:"post",data:{namespace:e,localName:t}})}function d(e){return(0,r.RD)(i.MBU,{method:"post",data:{localName:e}})}function f(e,t,n){return(0,r.RD)(i.Wl7,{method:"post",data:{xbrlOptionsGroup:e,xbrlOptionsSubGroup:t,companyXid:n}})}function p(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.namespace,a=e.localName,l=e.annualReportSection,s=e.insertOrUpdate,c=void 0!==s&&s,u=e.delete,d=void 0!==u&&u,f=e.header,p=void 0===f?"":f,m=e.value,v=void 0===m?"":m;return(0,r.RD)(i.Qp$,{method:"post",data:{companyXid:t,fiscalYearXid:n,namespace:o,localName:a,insertOrUpdate:c,delete:d,header:p,value:v,annualReportSection:l}})}function m(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.parameterName,a=e.value,l=e.valueArray;return(0,r.RD)(i._sC,{method:"post",data:{companyXid:t,fiscalYearXid:n,parameterName:o,value:a,valueArray:l}})}function v(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.xbrlDef,a=e.xbrlValue;return(0,r.RD)(i.o_j,{method:"post",data:{companyXid:t,fiscalYearXid:n,xbrlDef:o,xbrlValue:a}})}function h(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.xbrlDef,a=e.xbrlValue;return(0,r.RD)(i.Os_,{method:"post",data:{companyXid:t,fiscalYearXid:n,xbrlDef:o,xbrlValue:a}})}function y(e){var t=e.companyXid,n=e.fiscalYearXid;return(0,r.RD)(i._lW,{method:"post",data:{companyXid:t,fiscalYearXid:n}})}function b(e){var t=e.doctype,n=e.finalizeYearId;return(0,r.RD)(i.Rfr,{queryData:{doctype:t,finalizeYearId:n}})}function g(e){var t=e.companyXid,n=e.documentPackageXid,a=e.minutesHtml;return(0,r.RD)(i.zrO,{method:"post",data:{companyXid:t,documentPackageXid:n,minutesHtml:a},ignoreStatus:[o.BR]})}function w(e){var t=e.companyXid,n=e.documentPackageXid,a=e.fiscalYearXid;return(0,r.RD)(i.CTk,{method:"post",data:{companyXid:t,documentPackageXid:n,fiscalYearXid:a},ignoreStatus:[o.BR]})}function S(e){var t=e.companyXid,n=e.minutesHtml;return(0,r.RD)(i.Ma6,{method:"post",data:{companyXid:t,minutesHtml:n}})}function k(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.xbrlDef;return(0,r.RD)(i.TRw,{method:"post",data:{companyXid:t,fiscalYearXid:n,xbrlDef:o}})}function O(e){var t=e.companyXid,n=e.xid;return(0,r.RD)(i.j5v,{method:"post",data:{companyXid:t,xid:n}})}function N(e){var t=e.companyXid,n=e.xid,o=e.id;return(0,r.RD)(i.LDE,{method:"post",data:{companyXid:t,xid:n,id:o}})}function x(e){var t=e.companyXid,n=e.fiscalYearXid;return(0,r.RD)(i.qhM,{method:"post",data:{companyXid:t,fiscalYearXid:n}})}function P(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.action,a=e.xbrlDef;return(0,r.RD)(i.HZM,{method:"post",data:{companyXid:t,fiscalYearXid:n,action:o,xbrlDef:a}})}function I(e){return(0,r.RD)(i.E1Z,{method:"post",data:e})}function A(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.tableIdForEditing,a=e.reference,l=e.cellValues;return(0,r.RD)(i.BxA,{method:"post",data:{companyXid:t,fiscalYearXid:n,tableIdForEditing:o,reference:a,cellValues:l}})}function C(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.detailedSpecElementsType;return(0,r.RD)(i.FtP,{method:"post",data:{companyXid:t,fiscalYearXid:n,detailedSpecElementsType:o}})}function j(e){return(0,r.RD)(i.GC5,{method:"post",data:e})}function D(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.detailedSpecElementsType,a=e.entityXid;return(0,r.RD)(i.$75,{method:"post",data:{companyXid:t,fiscalYearXid:n,detailedSpecElementsType:o,entityXid:a}})}function _(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.noteType,a=e.pageBreakBefore;return(0,r.RD)(i.fmA,{method:"post",data:{companyXid:t,fiscalYearXid:n,noteType:
1o,pageBreakBefore:a}})}function R(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.tableEditId,a=e.rows;return(0,r.RD)(i.xru,{method:"post",data:{companyXid:t,fiscalYearXid:n,tableEditId:o,rows:a}})}function T(e){var t=e.companyXid,n=e.fiscalYearXid,o=e.tableEditId,a=e.selectedColumns;return(0,r.RD)(i.Eyp,{method:"post",data:{companyXid:t,fiscalYearXid:n,tableEditId:o,selectedColumns:a}})}function E(e){var t=e.companyXid,n=e.documentPackageXid;return(0,r.RD)(i._hd,{method:"post",data:{companyXid:t,documentPackageXid:n},ignoreStatus:[o.BR]})}},97721(e,t,n){n.d(t,{G6:()=>h,WL:()=>y,Ws:()=>m,hY:()=>p,i5:()=>v,qD:()=>d,sf:()=>b,uD:()=>f,vG:()=>u});var r=n(20212),o=n(14670),i=n(51470);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return(0,r.RD)(i.M6G,{method:"post"})}function d(){return(0,r.RD)(i.pEx,{method:"post",ignoreStatus:[o.BR]})}function f(e){return(0,r.RD)(i.Ycz,{method:"post",ignoreStatus:[o.BR],data:e})}function p(e){return(0,r.RD)(i.U3O,{method:"post",data:{xid:e}})}function m(){return(0,r.RD)("".concat(i.Xcd,"administrator/fetchlogo"),{method:"get"})}function v(e,t){return(0,r.RD)(i.DtB,{method:"post",data:s({xid:e},t)})}function h(e,t){return(0,r.RD)(i.Fno,{method:"post",data:{xid:e,overwriteWith:t}})}function y(e){return(0,r.RD)(i.LFO,{method:"post",data:{xid:e}})}function b(e){return(0,r.RD)(i.M7g,{method:"post",data:{xid:e}})}},6045(e,t,n){n.d(t,{J7:()=>s,T$:()=>c,Yn:()=>f,_z:()=>u,hD:()=>i,k1:()=>l,lj:()=>a,yh:()=>d});var r=n(20212),o=n(51470);function i(e){return(0,r.RD)(o.bLx,{method:"post",data:{url:e}})}function a(e){return(0,r.RD)(o.xbn,{queryData:{listmode:e}})}function l(e){return(0,r.RD)(o.tnG,{queryData:{messageid:e}})}function s(){return(0,r.RD)(o.jsI)}function c(e){return(0,r.RD)(o.tzb,{method:"post",data:{recipient:e}})}function u(e){var t=e.recipient,n=e.body,i=e.inResponseTo,a=e.companyXid,l={recipient:t,body:n,inResponseTo:i,title:null,address:null};return null!=a&&(l.companyXid=a),(0,r.RD)(o.H$n,{method:"post",data:l})}function d(e){var t=e.phoneNumber,n=e.desiredDate,i=e.desiredTimeFrom,a=e.desiredTimeTo;return(0,r.RD)(o.rhs,{method:"post",data:{phoneNumber:t,desiredDate:n,desiredTimeFrom:i,desiredTimeTo:a}})}function f(){return(0,r.RD)(o.AY8,{method:"post"})}},35067(e,t,n){n.d(t,{Q1:()=>a,iy:()=>i,oS:()=>c,qj:()=>s,s$:()=>l});var r=n(20212),o=n(51470);function i(e){var t=e.companyXid,n=e.fiscalYearXid;return(0,r.RD)(o.WTX,{method:"post",data:{companyXid:t,fiscalYearXid:n}})}function a(e){var t=e.companyXid,n=e.fiscalYearXid,i=e.accountNumber,a=e.markCode,l=e.markIsPrimo,s=e.markIsUltimo,c=e.actualAmount;return(0,r.RD)(o.O9G,{method:"post",data:{companyXid:t,fiscalYearXid:n,accountNumber:i,markCode:a,markIsPrimo:l,markIsUltimo:s,actualAmount:c},genericErrorHandling:!0})}function l(e){var t=e.companyXid,n=e.fiscalYearXid,i=e.accountNumber,a=e.file,l=e.attachPrimo,s=void 0!==l&&l,c=e.attachUltimo,u=void 0===c||c,d=e.actualAmount,f=new FormData;return f.append("companyXid",t),f.append("fiscalYearXid",n),f.append("accountNumber",String(i)),f.append("primo",s?"true":"false"),f.append("ultimo",u?"true":"false"),null!=d&&f.append("actualAmount",String(d)),f.append("file",a,a.name||"file"),function(e){return(0,r.RD)(o.i_x,{method:"post",data:e,genericErrorHandling:!0},!0)}(f)}function s(e){var t=e.companyXid,n=e.id;return(0,r.RD)(o.e42,{method:"post",data:{companyXid:t,id:n},genericErrorHandling:!0})}function c(e){var t=e.companyXid,n=e.fiscalYearXid,i=e.accountNumber,a=e.textNote,l=e.markIsPrimo,s=e.markIsUltimo,c=e.actualAmount;return(0,r.RD)(o.Evf,{method:"post",data:{companyXid:t,fiscalYearXid:n,accountNumber:i,textNote:a,markIsPrimo:l,markIsUltimo:s,actualAmount:c},genericErrorHandling:!0})}},94795(e,t,n){n.d(t,{RP:()=>s,jn:()=>l,mF:()=>i,r$:()=>a,vP:()=>c});var r=n(20212),o=n(51470);function i(e,t){return(0,r.RD)(o.apL,{method:"post",data:{createFromFiscalYear:e,companyXid:t}})}function a(e){var t=e.yearId,n=e.companyXid,i=e.fromDate,a=e.toDate,l=e.buildReportArchive;return(0,r.RD)(o.vDn,{method:"post",data:{yearId:t,companyXid:n,fromDate:i,toDate:a,buildReportArchive:l}})}function l(e,t){return(0,r.RD)(o.I0I,{method:"post",data:{companySelectionXid:e,finalizeYearPeriodId:t}})}function s(e){return(0,r.RD)(o.hNJ,{method:"post",data:e})}function c(e,t){return(0,r.RD)(o.HzY,{method:"post",data:{companyXid:e,showAgain:t}})}},61913(e,t,n){n.d(t,{AD:()=>u,K_:()=>s,Z7:()=>d,ir:()=>l});var r=n(20212),o=n(199),i=n(39781),a=n(51470);function l(e){var t=e.companyXid,n=e.fileXid;return c(i.IM,t,{fileXid:n})}function s(e){return c(i.$_,e)}
1function c(e,t,n){return(0,r.RD)(a.nHb,{method:"post",data:{action:e,companyXid:t,payload:n}})}function u(){return(0,r.RD)(a.O0,{method:"post",data:{phcid:o.U6}})}function d(){return(0,r.RD)(a.HIc,{method:"post",data:{phcid:o.U6}})}},15328(e,t,n){n.d(t,{V:()=>a,k:()=>i});var r=n(70562),o=n(39519);function i(e){return function(t){return t({type:r.un}),(0,o.kT)(e).then(function(e){return t({type:r.IW,data:e.body})}).catch(function(){return t({type:r.IW,data:{}})})}}function a(e){var t=e.companyXid,n=e.fiscalYearXid;return function(e){return e({type:r.yj}),(0,o.VT)({companyXid:t,fiscalYearXid:n}).then(function(t){return e({type:r.cc,data:t.body})}).catch(function(){return e({type:r.cc,data:{}})})}}},69843(e,t,n){n.d(t,{ST:()=>y,Vm:()=>b,uk:()=>h});var r=n(70562),o=n(19504),i=n(61913),a=n(16093),l=n(20212),s=n(48700),c=n(3373),u=n(51470),d=new s.g;function f(e,t){d.registerRequest((0,i.ir)({companyXid:t,fileXid:e})).then(function(){}).catch(function(){})}function p(e,t,n){return d.registerRequest((0,o.Zb)(t,e).then(function(e){return e.body}).catch(function(){return n(b)}))}function m(e,t,n){return d.registerRequest((0,o.uU)({xid:e,companyXid:t}).then(function(e){return e.body.plainText}).catch(function(){return n(b)}))}function v(e,t,n,o){Promise.all([n.emailOnly||n.emailAvailable?p(e,t,o):Promise.resolve(null),n.plainTextAvailable?m(e,t,o):Promise.resolve(null)]).then(function(i){var a,s=i[0],d=i[1];o((a={fileDetails:n,mailDetails:s,plainTextDetails:d,previewUrl:(0,u.i93)(e),previewTabUrl:(0,c.ID)("/preview?".concat((0,l.HQ)({fileXid:e,companyXid:t})))},{type:r.yw,data:a}))}).catch(function(){return o(b)})}function h(e,t,n){return function(t,i){if(i().currentWindow.hasSecondaryWindow)f(e,n);else{if(!e)return;t({type:r.UT}),d.registerRequest((0,o.tI)({fileXid:e,companyXid:n})).then(function(r){var o=r.body;v(e,n,o,t)}).catch(function(){return t(b)})}}}function y(e){return function(t,n){var o=n().currentWindow.hasSecondaryWindow;o||t({type:r.UT}),d.registerRequest((0,a.yU)(e)).then(function(n){if(o)f(n.body.fileXid,e.companyXid);else{var r=n.body.fileXid,i=n.body;v(r,e.companyXid,i,t)}}).catch(function(){return t(b)})}}function b(){return{type:r.BB}}},30488(e,t,n){n.r(t),n.d(t,{v:()=>o});var r=n(70562);function o(e){return{type:r.nT,data:e}}},16445(e,t,n){n.r(t),n.d(t,{O:()=>o});var r=n(70562);function o(e){return{type:r.kU,data:e}}},88354(e,t,n){n.r(t),n.d(t,{OH:()=>i,UB:()=>a,xJ:()=>o});var r=n(70562);function o(e){var t=e.startNoteAboutHelperAndReport,n=e.startNoteAboutBookkeepingGuide,o=e.startNoteAboutMobileNumber,i=e.startNoteNewYear,a=e.invoiceEditConfirmed,l=e.unpaidInvoice,s=e.linkToPayments;return{type:r.Cw,data:{startNoteAboutHelperAndReport:t,startNoteAboutBookkeepingGuide:n,startNoteAboutMobileNumber:o,startNoteNewYear:i,invoiceEditConfirmed:a,unpaidInvoice:l,linkToPayments:s}}}function i(){return{type:r.xz}}function a(e){return{type:r.Fe,data:e}}},99247(e,t,n){n.d(t,{Q:()=>a});var r=n(70562),o=n(20212),i=n(51470);function a(e){return function(t){return t({type:r.ln}),function(e){return(0,o.RD)(i.sF8,{method:"post",data:{companyXid:e}})}(e).then(function(e){return t({type:r.Lo,data:e.body})}).catch(function(){return t({type:r.Lo,data:{}})})}}},24506(e,t,n){var r,o=n(96540),i=n(61225),a=n(75989),l=n(34691),s=n(86671),c=n(5070),u=n(3373),d=n(51470);function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function v(e){var t=e.type,n=e.selected,r=e.onClick;return m("button",{onClick:function(){return r(t)},type:"button",className:"btn btn-sm rounded-0 ".concat(n?"btn-light active default":"btn-white")},void 0,m(c.A,{type:t}))}const h=(0,i.Ng)(function(e){return{isPartOfPortfolio:e.currentUser.user.isPartOfPortfolio}})(function(e){var t=e.fileDetails,n=e.plainTextDetails,r=e.mailDetails,i=e.einvoiceDetails,c=e.comments,p=e.isPartOfPortfolio,h=e.onComment,y=e.loading,b=void 0!==y&&y,g=e.companyXid,w=e.xid,S=e.onAcceptEinvoice,k=e.acceptingEinvoice,O=(0,u.pK)(t,n,r,i),N=f((0,o.useState)(O[0]),2),x=N[0],P=N[1];return(0,o.useEffect)(function(){P(O[0])},[t,r,i,n]),t?m("div",{className:x!==u.yw.EINVOICE?"container":""},void 0,m("div",{className:"app-toolbar__subtitle file-details ".concat(t.emailOnly?"":"with-text")},void 0,m("div",{className:"grid-tabs"},void 0,O.map(function(e){return m(v,{type:e,selected:x===e,onClick:P},e)}),p&&m(v,{type:u.yw.COMMENTS,selected:x===u.yw.COMMENTS,onClick:P},u.yw.COMMENTS))),x===u.yw.TEXT&&m("div",{className:"m-1 text-wrapper"},void 0,n),x===u.yw.MAIL&&m("div",{className:"p-1"},void 0,m("p",{className:"text-wrapper font-bold"},void 0,r.title),m("div",{className:"text-wrapper"},void 0,r.bodyPlainText)),x===u.yw.IMG&&m(s.A,{className:"app-toolbar__image-preview",src:(0,d.vVK)(t.fileXid)},t.fileXid),x===u.yw.EINVOICE&&m("div",{},void 0,m(l.A,{data:i,companyXid:g,xid:w,onAcceptEinvoice:S,acceptingEinvoice:k})),x===u.yw.COMMENTS&&m(a.A,{comments:c,onSubmit:h}),x===u.yw.DOWNLOAD&&m("div",{className:"container d-flex flex-column align-items-center"},void 0,m("div",{className:"text-center mt-2 mb-2"},void 0,I18n.translate(b?"grant.loading":"preview.type.not.supported")),m("div",{},void 0,m("a",{className:"btn btn-primary","aria-label":"Download File",href:(0,d.i93)(t.fileXid),onClick:function(e){return e.stopPropagation()},download:!0},void 0,"Download")))):null});n.d(t,["A",0,h])},95468(e,t,n){n.d(t,{A:()=>be});var r,o,i,a=n(5556),l=n.n(a),s=n(32992),c=n(3012),u=n(76671),d=n(96540);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}function p(e){return d.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 32"},e),r||(r=d.createElement("path",{fill:"#fff",d:"M0 .8A.8.8 0 01.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8z"})),o||(o=d.createElement("path",{fill:"#c1cdd6",d:"M24.8 31.2V8.331L24.469 8H17.6V1.131L17.269.8H.8v30.4h24zm-1.131-24L18.4 1.931V7.2h5.269zM.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8A.8.8 0 01.8 0z"})),i||(i=d.createElement("path",{fill:"#18acff",d:"M5.302 20.004l1.315-2.26h1.255l-1.891 3.102L7.915 24H6.647l-1.345-2.295L3.953 24H2.69l1.938-3.154-1.895-3.102h1.255l1.315 2.26zM8.718 24v-6.256h2.144c.708 0 1.246.142 1.616.425s.554.706.554 1.268c0 .286-.077.544-.232.773s-.381.407-.679.533c.338.092.599.265.782.52.186.252.279.556.279.911 0 .587-.189 1.038-.567 1.354-.375.315-.914.473-1.616.473H8.717zm1.087-2.823v1.955h1.207c.341 0 .607-.084.799-.254s.288-.404.288-.705c0-.65-.332-.983-.997-.997H9.804zm0-.799h1.066c.338 0 .602-.076.791-.228.192-.155.288-.372.288-.653 0-.309-.089-.533-.266-.67-.175-.138-.448-.206-.821-.206H9.806v1.757zM16.569 21.589h-1.212V24H14.27v-6.256h2.2c.722 0 1.279.162 1.672.48
16s.589.792.589 1.405c0 .418-.102.769-.305 1.053-.2.281-.481.497-.842.649l1.405 2.608v.056h-1.164L16.57 21.59zm-1.212-.872h1.117c.367 0 .653-.092.859-.275.206-.186.309-.44.309-.76 0-.335-.096-.594-.288-.778-.189-.183-.473-.278-.851-.284h-1.147v2.097zM20.848 23.132h2.84V24h-3.927v-6.256h1.087v5.388z"})))}n.p;var m,v;function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(null,arguments)}function y(e){return d.createElement("svg",h({width:"1em",height:"1em",viewBox:"0 0 26 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),m||(m=d.createElement("g",{clipPath:"url(#download_zip_svg__clip0_1_2)"},d.createElement("path",{d:"M0 .8A.8.8 0 01.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8z",fill:"#fff"}),d.createElement("path",{d:"M17.6 0l8 8h-8V0z",fill:"#FAFAFA"}),d.createElement("path",{d:"M24.8 31.2V8.331L24.469 8H17.6V1.131L17.269.8H.8v30.4h24zm-1.131-24L18.4 1.931V7.2h5.269zM.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8A.8.8 0 01.8 0z",fill:"#C1CDD6"}),d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.64 24.152v-.912H7.426l3.133-4.56V18H6.013v.917h3.13L6 23.455v.698H10.639zM13.31 18v6.152h-1.3V18h1.3zm3.917 3.909h-1.205v2.244H14.86V18h2.367c.479 0 .887.086 1.225.258.34.169.6.404.778.705.18.3.27.64.27 1.023 0 .397-.09.74-.27 1.027a1.722 1.722 0 01-.778.663c-.338.155-.747.233-1.225.233zm-1.205-2.992v2.079h1.205c.259 0 .469-.042.63-.127a.825.825 0 00.358-.355c.076-.152.114-.325.114-.52 0-.188-.038-.364-.114-.528a.918.918 0 00-.359-.397c-.16-.101-.37-.152-.63-.152h-1.204z",fill:"#6B21A8"}))),v||(v=d.createElement("defs",null,d.createElement("clipPath",{id:"download_zip_svg__clip0_1_2"},d.createElement("path",{fill:"#fff",d:"M0 0h26v32H0z"})))))}n.p;var b,g,w,S,k;function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(null,arguments)}function N(e){return d.createElement("svg",O({width:"1em",height:"1em",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),b||(b=d.createElement("path",{d:"M0 1a1 1 0 011-1h21l5 5 5 5v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1z",fill:"#fff"})),g||(g=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 0h21l10 10v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1a1 1 0 011-1zm30 39H1V1h20.586l.414.414V10h8.586l.414.414V39zM29.586 9L23 2.414V9h6.586z",fill:"#C1CDD6"})),w||(w=d.createElement("path",{d:"M8.641 29.313V35H7.567v-5.688h1.074zm3.414 0l-2.28 2.773-1.306 1.395-.19-1.044.905-1.175 1.555-1.95h1.316zM10.86 35l-1.77-2.664.77-.695L12.137 35H10.86zM13.277 29.313h2.067c.432 0 .803.065 1.113.195.31.13.548.323.715.578.167.255.25.569.25.941 0 .295-.052.55-.156.766a1.49 1.49 0 01-.442.543c-.187.146-.409.26-.664.344l-.336.172H14l-.008-.848h1.364c.22 0 .405-.04.55-.117a.773.773 0 00.329-.325.969.969 0 00.113-.472c0-.19-.037-.354-.11-.492a.741.741 0 00-.332-.325 1.236 1.236 0 00-.562-.113h-.992V35h-1.075v-5.688zM16.488 35l-1.316-2.547 1.137-.004 1.332 2.496V35h-1.153zM22.773 34.156V35H19.75v-.844h3.023zm-2.695-4.843V35h-1.075v-5.688h1.075zm2.3 2.347v.824H19.75v-.824h2.628zm.383-2.348v.848H19.75v-.848h3.011z",fill:"#888"})),S||(S=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.575 21.6a7.632 7.632 0 01-.178-1.25H27c0-1.234-.142-2.309-.425-3.225-.283-.934-.692-1.709-1.225-2.325a4.842 4.842 0 00-2-1.375c-.783-.317-1.7-.475-2.75-.475-1.3 0-2.467.283-3.5.85a6.25 6.25 0 00-2.425 2.325c-.583 1-.875 2.166-.875 3.5 0 1.366.3 2.55.9 3.55.6.983 1.442 1.741 2.525 2.275 1.1.533 2.375.8 3.825.8 1 0 1.858-.134 2.575-.4A5.73 5.73 0 0025.5 24.7a6.86 6.86 0 001.275-1.675l-1.6-1.125a7.625 7.625 0 01-.8 1.1c-.3.35-.667.641-1.1.875-.417.233-.925.35-1.525.35-.567 0-1.067-.1-1.5-.3a2.563 2.563 0 01-1.05-.875c-.267-.4-.475-.884-.625-1.45zm4.15-3.05h-4.311a9.17 9.17 0 01.136-1.05c.117-.6.275-1.092.475-1.475.217-.384.458-.667.725-.85.283-.184.6-.275.95-.275s.65.075.9.225c.25.15.458.391.625.725.167.316.292.758.375 1.325.058.394.1.852.125 1.375z",fill:"#49B1F8"})),k||(k=d.createElement("path",{d:"M10 15h2v2h-2v-2zM8 15H6v2h2v-2zM10 19h2v2h-2v-2zM8 19H6v2h2v-2zM6 23h2v2H6v-2zM12 23h-2v2h2v-2z",fill:"#49B1F8"})))}n.p;var x,P,I,A,C;function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(null,arguments)}function D(e){return d.createElement("svg",j({width:"1em",height:"1em",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"}
1,e),x||(x=d.createElement("path",{d:"M0 1a1 1 0 011-1h21l5 5 5 5v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1z",fill:"#fff"})),P||(P=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 0h21l10 10v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1a1 1 0 011-1zm30 39H1V1h20.586l.414.414V10h8.586l.414.414V39zM29.586 9L23 2.414V9h6.586z",fill:"#C1CDD6"})),I||(I=d.createElement("path",{d:"M11.313 33.129h1.074c-.028.38-.134.717-.316 1.012-.182.291-.436.52-.762.687-.325.167-.72.25-1.183.25-.357 0-.679-.062-.965-.187a2.089 2.089 0 01-.73-.543c-.201-.237-.355-.521-.462-.852a3.665 3.665 0 01-.16-1.121v-.434c0-.414.055-.787.164-1.12.11-.334.266-.618.47-.852.205-.237.451-.42.737-.547.29-.128.612-.192.97-.192.463 0 .855.086 1.175.258.32.17.569.403.746.7.177.296.284.638.32 1.023h-1.074a1.685 1.685 0 00-.156-.61.82.82 0 00-.367-.378c-.162-.089-.377-.133-.645-.133-.208 0-.392.039-.55.117a1.008 1.008 0 00-.391.352 1.678 1.678 0 00-.235.578c-.052.229-.078.494-.078.797v.441c0 .29.024.548.07.777.047.23.12.423.22.582.098.16.226.28.382.364.156.083.343.125.559.125.263 0 .476-.042.64-.125a.849.849 0 00.38-.367c.088-.162.144-.363.167-.602zM13.86 29.313h2.066c.432 0 .803.065 1.113.195.31.13.548.323.715.578.167.255.25.569.25.941 0 .295-.052.55-.156.766a1.491 1.491 0 01-.442.543c-.187.146-.409.26-.664.344l-.336.172h-1.824l-.008-.848h1.364c.221 0 .405-.04.55-.117a.773.773 0 00.329-.325.969.969 0 00.113-.472c0-.19-.037-.354-.11-.492a.741.741 0 00-.332-.325 1.236 1.236 0 00-.562-.113h-.992V35H13.86v-5.688zM17.07 35l-1.316-2.547 1.137-.004 1.332 2.496V35H17.07zM23.355 34.156V35h-3.024v-.844h3.024zm-2.695-4.843V35h-1.075v-5.688h1.075zm2.3 2.347v.824h-2.629v-.824h2.63zm.383-2.348v.848h-3.012v-.848h3.012z",fill:"#888"})),A||(A=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.575 21.6a7.632 7.632 0 01-.178-1.25H27c0-1.234-.142-2.309-.425-3.225-.283-.934-.692-1.709-1.225-2.325a4.842 4.842 0 00-2-1.375c-.783-.317-1.7-.475-2.75-.475-1.3 0-2.467.283-3.5.85a6.25 6.25 0 00-2.425 2.325c-.583 1-.875 2.166-.875 3.5 0 1.366.3 2.55.9 3.55.6.983 1.442 1.741 2.525 2.275 1.1.533 2.375.8 3.825.8 1 0 1.858-.134 2.575-.4A5.73 5.73 0 0025.5 24.7a6.86 6.86 0 001.275-1.675l-1.6-1.125a7.625 7.625 0 01-.8 1.1c-.3.35-.667.641-1.1.875-.417.233-.925.35-1.525.35-.567 0-1.067-.1-1.5-.3a2.563 2.563 0 01-1.05-.875c-.267-.4-.475-.884-.625-1.45zm4.15-3.05h-4.311a9.17 9.17 0 01.136-1.05c.117-.6.275-1.092.475-1.475.217-.384.458-.667.725-.85.283-.184.6-.275.95-.275s.65.075.9.225c.25.15.458.391.625.725.167.316.292.758.375 1.325.058.394.1.852.125 1.375z",fill:"#49B1F8"})),C||(C=d.createElement("path",{d:"M10 15h2v2h-2v-2zM8 15H6v2h2v-2zM10 19h2v2h-2v-2zM8 19H6v2h2v-2zM6 23h2v2H6v-2zM12 23h-2v2h2v-2z",fill:"#49B1F8"})))}n.p;var _,R,T,E;function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(null,arguments)}function F(e){return d.createElement("svg",M({width:"1em",height:"1em",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_||(_=d.createElement("path",{d:"M0 1a1 1 0 011-1h21l5 5 5 5v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1z",fill:"#fff"})),R||(R=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 0h21l10 10v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1a1 1 0 011-1zm30 39H1V1h20.586l.414.414V10h8.586l.414.414V39zM29.586 9L23 2.414V9h6.586z",fill:"#C1CDD6"})),T||(T=d.createElement("path",{d:"M9.927 29.313V35H8.852v-5.688h1.075zm2.293 2.457v.847H9.645v-.847h2.575zm.3-2.457v.847H9.645v-.848h2.875zM15.441 30.176L13.822 35h-1.137l2.125-5.688h.726l-.094.864zM16.797 35l-1.629-4.824-.098-.863h.73L17.939 35h-1.141zm-.074-2.113v.847h-3.051v-.847h3.05zM20.238 29.313V35h-1.075v-5.688h1.075zm3.414 0l-2.281 2.773-1.305 1.395-.191-1.044.906-1.175 1.554-1.95h1.317zM22.456 35l-1.769-2.664.77-.695L23.733 35h-1.278z",fill:"#888"})),E||(E=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.575 21.6a7.632 7.632 0 01-.178-1.25H27c0-1.234-.142-2.309-.425-3.225-.283-.934-.692-1.709-1.225-2.325a4.842 4.842 0 00-2-1.375c-.783-.317-1.7-.475-2.75-.475-1.3 0-2.467.283-3.5.85a6.25 6.25 0 00-2.425 2.325c-.583 1-.875 2.166-.875 3.5 0 1.366.3 2.55.9 3.55.6.983 1.442 1.741 2.525 2.275 1.1.533 2.375.8 3.825.8 1 0 1.858-.134 2.575-.4A5.73 5.73 0 0025.5 24.7a6.86 6.86 0 001.275-1.675l-1.6-1.125a7.625 7.625 0 01-.8 1.1c-.3.35-.667.641-1.1.875-.417.233-.925.35-1.525.35-.567 0-1.067-.1-1.5-.3a2.563 2.563 0 01-1.05-.875c-.267-.4-.475-.884-.625-1.45zm4.15-3.05h-4.311a9.17 9.17 0 01.136-1.05c.117-.6.275-1.092.475-1.475.217-.384.458-.667.725-.85.283-.184.6-.275.95-.275s.65.075.9.225c.25.15.458.391.625.725.167.316.292.758.375 1.325.058.394.1.852.125 1.375zM10 15h2v2h-2v-2zm-2 0H6v2h2v-2zm2 4h2v2h-2v-2zm-2 0H6v2h2v-2zm-2 4h2v2H6v-2zm6 0h-2v2h2v-2z",fill:"#49B1F8"})))}n.p;var z,B,H,L,$;function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X.apply(null,arguments)}function V(e){return d.createElement("svg",X({width:"1em",height:"1em",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"}
1,e),z||(z=d.createElement("path",{d:"M0 1a1 1 0 011-1h21l5 5 5 5v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1z",fill:"#fff"})),B||(B=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 0h21l10 10v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1a1 1 0 011-1zm30 39H1V1h20.586l.414.414V10h8.586l.414.414V39zM29.586 9L23 2.414V9h6.586z",fill:"#C1CDD6"})),H||(H=d.createElement("path",{d:"M9.966 29.313V35H8.89v-5.688h1.075zM16.336 29.313V35h-1.078l-2.418-3.945V35h-1.074v-5.688h1.074l2.426 3.95v-3.95h1.07zM20.07 33.887l1.418-4.575h1.191L20.671 35h-.793l.192-1.113zm-1.309-4.575l1.41 4.575.204 1.113h-.801l-2-5.688h1.187z",fill:"#888"})),L||(L=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.575 21.6a7.632 7.632 0 01-.178-1.25H27c0-1.234-.142-2.309-.425-3.225-.283-.934-.692-1.709-1.225-2.325a4.842 4.842 0 00-2-1.375c-.783-.317-1.7-.475-2.75-.475-1.3 0-2.467.283-3.5.85a6.25 6.25 0 00-2.425 2.325c-.583 1-.875 2.166-.875 3.5 0 1.366.3 2.55.9 3.55.6.983 1.442 1.741 2.525 2.275 1.1.533 2.375.8 3.825.8 1 0 1.858-.134 2.575-.4A5.73 5.73 0 0025.5 24.7a6.86 6.86 0 001.275-1.675l-1.6-1.125a7.625 7.625 0 01-.8 1.1c-.3.35-.667.641-1.1.875-.417.233-.925.35-1.525.35-.567 0-1.067-.1-1.5-.3a2.563 2.563 0 01-1.05-.875c-.267-.4-.475-.884-.625-1.45zm4.15-3.05h-4.311a9.17 9.17 0 01.136-1.05c.117-.6.275-1.092.475-1.475.217-.384.458-.667.725-.85.283-.184.6-.275.95-.275s.65.075.9.225c.25.15.458.391.625.725.167.316.292.758.375 1.325.058.394.1.852.125 1.375z",fill:"#49B1F8"})),$||($=d.createElement("path",{d:"M10 15h2v2h-2v-2zM8 15H6v2h2v-2zM10 19h2v2h-2v-2zM8 19H6v2h2v-2zM6 23h2v2H6v-2zM12 23h-2v2h2v-2z",fill:"#49B1F8"})))}n.p;var q,U,W;function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(null,arguments)}function K(e){return d.createElement("svg",Y({width:"1em",height:"1em",viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),q||(q=d.createElement("path",{d:"M0 1a1 1 0 011-1h21l5 5 5 5v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1z",fill:"#fff"})),U||(U=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 0h21l10 10v29a1 1 0 01-1 1H1a1 1 0 01-1-1V1a1 1 0 011-1zm30 39H1V1h20.586l.414.414V10h8.586l.414.414V39zM29.586 9L23 2.414V9h6.586z",fill:"#C1CDD6"})),W||(W=d.createElement("path",{d:"M16.18 31.617c.741 0 1.441-.056 2.1-.168a11.92 11.92 0 001.847-.42 12.755 12.755 0 001.575-.61l.462 1.534c-.462.224-1.008.427-1.638.609-.63.196-1.316.35-2.058.462a13.65 13.65 0 01-2.289.189c-1.316 0-2.534-.19-3.654-.567-1.106-.364-2.072-.896-2.898-1.596a7.257 7.257 0 01-1.91-2.52c-.463-.994-.694-2.121-.694-3.381 0-1.344.245-2.583.735-3.717a8.83 8.83 0 012.1-2.94 9.797 9.797 0 013.13-1.932c1.19-.462 2.484-.693 3.884-.693 1.232 0 2.345.175 3.34.525.993.35 1.847.84 2.561 1.47a6.187 6.187 0 011.638 2.205c.378.84.567 1.757.567 2.75 0 .967-.14 1.828-.42 2.584-.28.742-.65 1.372-1.113 1.89a4.804 4.804 0 01-1.533 1.197 4.2 4.2 0 01-1.785.399c-.448 0-.84-.05-1.176-.147a2.6 2.6 0 01-.86-.42 2.19 2.19 0 01-.568-.63 2.92 2.92 0 01-.315-.777l-.252-.042.82-4.914.23-.105.735-1.722h2.415l-1.05 6.11c-.056.28-.07.512-.042.694a.61.61 0 00.19.378c.111.07.258.105.44.105.336 0 .693-.175 1.071-.525.378-.364.7-.89.966-1.575.28-.7.42-1.533.42-2.5 0-1.021-.252-1.931-.756-2.73-.49-.811-1.204-1.448-2.142-1.91-.924-.476-2.05-.714-3.38-.714-1.163 0-2.234.196-3.214.588a7.645 7.645 0 00-2.54 1.617 7.672 7.672 0 00-1.68 2.457c-.393.924-.589 1.932-.589 3.024 0 .994.175 1.89.525 2.688a6.135 6.135 0 001.512 2.058c.658.56 1.435.987 2.331 1.28.896.295 1.883.442 2.961.442zm-1.408-2.604c-.672 0-1.28-.14-1.827-.42a3.173 3.173 0 01-1.26-1.281c-.308-.56-.462-1.246-.462-2.058 0-.63.105-1.253.315-1.87a6.05 6.05 0 01.924-1.7c.406-.504.896-.91 1.47-1.218.588-.308 1.246-.462 1.974-.462.546 0 1.008.098 1.386.294.378.196.686.518.924.966.238.448.441 1.057.61 1.827l-.673.819c-.126-.588-.273-1.057-.44-1.407-.169-.364-.358-.623-.568-.777a1.21 1.21 0 00-.735-.231c-.308 0-.595.119-.86.357-.267.224-.49.532-.673.924a6.762 6.762 0 00-.399 1.302 7.271 7.271 0 00-.147 1.47c0 .42.035.784.105 1.092.07.294.182.518.336.672a.95.95 0 00.63.21c.28 0 .56-.12.84-.357.28-.238.56-.581.84-1.03.294-.461.616-1.007.966-1.
1637l.588.945a32.343 32.343 0 01-1.197 1.91c-.364.533-.749.946-1.155 1.24-.406.28-.91.42-1.512.42z",fill:"#888"})))}n.p;var G,Q,Z,J,ee=n(10840);function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},te.apply(null,arguments)}function ne(e){return d.createElement("svg",te({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 32"},e),G||(G=d.createElement("path",{fill:"#fff",d:"M0 .8A.8.8 0 01.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8z"})),Q||(Q=d.createElement("path",{fill:"#c1cdd6",d:"M24.8 31.2V8.331L24.469 8H17.6V1.131L17.269.8H.8v30.4h24zm-1.131-24L18.4 1.931V7.2h5.269zM.8 0h16.8l8 8v23.2a.8.8 0 01-.8.8H.8a.8.8 0 01-.8-.8V.8A.8.8 0 01.8 0z"})),Z||(Z=d.createElement("path",{fill:"#69bff9",d:"M4 24h9.6l-4.8-6.4L4 24z"})),J||(J=d.createElement("path",{fill:"#5c7cff",d:"M8.8 24h12.8l-6.4-8-6.4 8z"})))}n.p;var re=n(13918),oe=n(96540),ie=["electronicInvoice","electronicCreditNote","emailOnly","contentType","className","specialIcon"];function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(null,arguments)}function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ve(r.key),r)}}function ce(e,t,n){return t=fe(t),function(e,t){if(t&&("object"==ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ue()?Reflect.construct(t,n||[],fe(e).constructor):t.apply(e,n))}function ue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ue=function(){return!!e})()}function de(){return de="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=fe(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},de.apply(null,arguments)}function fe(e){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fe(e)}function pe(e,t){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},pe(e,t)}function me(e,t,n){return(t=ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){var t=function(e,t){if("object"!=ae(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ae(t)?t:t+""}var he=function(){return"da"===I18n.lang},ye=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return me(e=ce(this,t,[].concat(r)),"isDkLang",he()),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pe(e,t)}(t,e),n=t,r=[{key:"onLanguageChange",value:function(){var e,n,r,o,i;(e=t,n="onLanguageChange",r=this,i=de(fe(1&(o=3)?e.prototype:e),n,r),2&o&&"function"==typeof i?function(e){return i.apply(r,e)}:i)([]),this.isDkLang=he()}},{key:"render",value:function(){var e=this.props,t=e.electronicInvoice,n=e.electronicCreditNote,r=e.emailOnly,o=e.contentType,i=e.className,a=e.specialIcon,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ie);return"XBRL"===a?oe.createElement(p,le({className:"phi phi-download_pdf ".concat(i),"aria-hidden":"true"},l)):"IXBRL"===a?oe.createElement(c.h,le({className:"phi phi-download_pdf ".concat(i),"aria-hidden":"true"},l)):t?this.isDkLang?oe.createElement(F,le({className:"phi phi-FileIconEInvDk ".concat(i),"aria-hidden":"true"},l)):oe.createElement(V,le({className:"phi phi-FileIconEInvEn ".concat(i),"aria-hidden":"true"},l)):n?this.isDkLang?oe.createElement(N,le({className:"phi phi-FileIconECreDk ".concat(i),"aria-hidden":"true"},l)):oe.createElement(D,le({className:"phi phi-FileIconECreEn ".concat(i),"aria-hidden":"true"},l)):r?oe.createElement(K,le({className:"phi phi-FileIconEmail ".concat(i),"aria-hidden":"true"},l)):/^application\/vnd\.openxmlformats-officedocument\.wordprocessingml\.document/.test(o)&&oe.createElement(ee.h,le({className:"phi phi-file_icon_generic ".concat(i),"aria-hidden":"true"},l))||/^application\/vnd\.openxmlformats/.test(o)&&oe.createElement(s.h,le({className:"phi phi-download_excel ".concat(i),"aria-hidden":"true"},l))||/^application\/zip/.test(o)&&oe.createElement(y,le({className:"phi phi-download_zip ".concat(i),"aria-hidden":"true"},l))||/^application\/pdf/.test(o)&&oe.createElement(u.h,le({className:"phi phi-download_pdf ".concat(i),"aria-hidden":"true"},l))||/^image/.test(o)&&oe.createElement(ne,le({className:"phi phi-image_icon ".concat(i),"aria-hidden":"true"},l))||oe.createElement(ee.h,le({className:"phi phi-file_icon_generic ".concat(i),"aria-hidden":"true"},l))}}],r&&se(n.prototype,r),o&&se(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(re.b);
1me(ye,"propTypes",{contentType:l().string,specialIcon:l().string});const be=ye},97219(e,t,n){var r,o=n(96540),i=n(88482),a=n.n(i),l=n(54739),s=n(36893),c=n(62288),u=n(3373);function d(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const f=function(e){var t=e.title,n=void 0===t?"Logo":t,r=e.hasLogo,i=e.logoUrl,f=e.frontLogoWidth,p=e.nextPagesLogoWidth,m=e.imageName,v=e.showOnReportLabel,h=void 0===v?"Show logo on report":v,y=e.frontWidthLabel,b=void 0===y?"Front page logo width (mm)":y,g=e.nextPagesWidthLabel,w=void 0===g?"Other pages logo width (mm)":g,S=e.imageNameLabel,k=void 0===S?"Image name":S,O=e.frontWidthTooltip,N=void 0===O?"Width of the logo on front page in mm":O,x=e.nextPagesWidthTooltip,P=void 0===x?"Width of the logo on other pages in mm":x,I=e.removeLabel,A=void 0===I?"Remove":I,C=e.acceptedFiles,j=void 0===C?"image/*":C,D=e.disabled,_=void 0!==D&&D,R=e.showWidthInputs,T=void 0===R||R,E=e.showNameInput,M=void 0!==E&&E,F=e.showToggleCheckbox,z=void 0===F||F,B=e.onFileChange,H=e.onFileRemove,L=e.onToggleHasLogo,$=e.onFrontWidthChange,X=e.onNextPagesWidthChange,V=e.onImageNameChange,q=e.onValidationChange,U=e.frontWidthValidators,W=void 0===U?[function(e){return(0,c.A)().validate({value:e,options:{required:!0,forbidDecimals:!0,checkNaN:!0,min:0,max:200}})}]:U,Y=e.nextPagesWidthValidators,K=void 0===Y?[function(e){return(0,c.A)().validate({value:e,options:{required:!0,forbidDecimals:!0,checkNaN:!0,min:0,max:100}})}]:Y,G=e.imageNameValidators,Q=void 0===G?[]:G,Z=(0,o.useRef)(null),J=(0,o.useRef)(null),ee=(0,o.useRef)(null),te=(0,o.useRef)(null);(0,o.useEffect)(function(){T||M?(!T||J.current&&ee.current)&&ne():q&&q(!0)},[f,p,T,m,r,M]);var ne=function(){var e=[];T&&e.push(J.current.validate(f),ee.current.validate(p)),M&&te.current&&e.push(te.current.validate(m)),0!==e.length?Promise.all(e).then(function(e){var t=e.every(function(e){return e});q&&q(t)}).catch(function(){q&&q(!1)}):q&&q(!0)},re=function(){Z.current&&Z.current.removeAllFiles(),H&&H()};return d("div",{className:"logo-upload-setup"},void 0,d("h5",{},void 0,n),o.createElement(s.m,{acceptedFiles:j,ref:Z,onFileAdded:function(e){/^image\//.test(e.type)?(0,u.bB)(e).then(function(e){B&&B(e)}):Z.current.removeFile(e)},onFileRemove:re,useMoreSpacing:!0,disabled:_,disablePreview:!0,className:"mb-2"},r&&i&&d("div",{className:"dz-preview dz-file-preview"},void 0,d("div",{className:"dz-details"},void 0,d("img",{src:i,alt:"Logo preview"})),d("a",{role:"button",className:"cursor-pointer",onClick:re},void 0,A))),z&&d(a(),{checked:r,onChange:function(){L&&L(!r)},disabled:_},void 0,h),M&&o.createElement(l.x,{key:"imageName",value:m,label:k,validators:Q,onChange:function(e){V&&V(e)},disabled:_,ref:te}),T&&d(o.Fragment,{},void 0,o.createElement(l.x,{key:"frontLogoWidth",value:f,validators:W,label:b,tooltip:N,ref:J,onChange:function(e){$&&$(e)},disabled:_}),o.createElement(l.x,{key:"nextPagesLogoWidth",value:p,validators:K,label:w,tooltip:P,ref:ee,onChange:function(e){X&&X(e)},disabled:_})))};n.d(t,["A",0,f])},88613(e,t,n){n.d(t,{Z:()=>p});var r,o=n(96540),i=n(59858),a=n.n(i);function l(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var s,c=function(e){var t=e.title,n=e.show,r=e.onHide,o=e.history,i=void 0===o?[]:o;return l(a(),{show:n,onHide:r},void 0,l(a().Header,{closeButton:!0},void 0,l(a().Title,{className:"d-flex justify-content-between",style:{fontSize:16}},void 0,t)),l(a().Body,{},void 0,i.map(function(e){return l("div",{className:"d-flex flex-column py-2 mr-1",style:{borderTop:"1px solid lightgray"}},e.dateTime,l("div",{className:"d-flex justify-content-between row"},void 0,l("div",{className:"flex-shrink-0 col-sm-3"},void 0,e.dateTime),l("div",{className:"flex-grow-1 text-left col-sm-5"},void 0,e.user),l("div",{className:"flex-shrink-0 text-right col-sm-4"},void 0,e.amount)),l("div",{className:"p mt-1"},void 0,e.note))}),!i.length&&l("div",{className:"text-danger danger"},void 0,"No history here")),l(a().Footer,{},void 0,l("div",{style:{display:"flex",justifyContent:"flex-end"}},void 0,l("button",{className:"btn btn-default",onClick:r},void 0,I18n.translate("button.cancel")))))};function u(e,t,n,r){s||(s="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var c in o)void 0===t[c]&&(t[c]=o[c]);else t||(t=o||{});return{$$typeof:s,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(e){var t=e.primoVal,n=d((0,o.useState)(!1),2),r=n[0],i=n[1],a=function(){return i(!r)};return u("div",{className:"d-flex align-items-center my-1 px-2"},void 0,u("div",{className:"flex-shrink-0",style:{width:40}},void 0,t.accountNumber),u("div",{className:"flex-grow-1 text-left"},void 0,t.accountName),u("div",{className:"flex-shrink-0 text-right"},void 0,t.amount),u("button",{onClick:a,type:"button",className:"btn btn-link p-0"},void 0,u("i",{className:"fa fa-circle fa-2 ml-1 mt-0 text-right text-".concat(function(e){var t=e.markAsError,n=e.markAsVerifiedOk;return t?"danger":n?"success":"muted"}(t)),"aria-hidden":"true"})),u(c,{title:u(o.Fragment,{},void 0,u("span",{},void 0,t.accountNumber),u("span",{},void 0,t.accountName),u("span",{className:"mr-2"},void 0,t.amount)),show:r,onHide:a,history:t.history}))}},94277(e,t,n){var r;function o(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var i=function(e){var t=e.bankInstitutionOption,n=e.onSelect,r=e.isEnglish,i=e.readOnly;return o("div",{className:"d-flex flex-column p-2",style:{border:"1px solid #e4e4e4"}},void 0,o("img",{src:t.logo,alt:t.name,className:"mb-2",style:{height:"25px",width:"auto",objectFit:"contain"}}),o("p",{className:t.commentForUser?"mb-1":"mb-2"},void 0,t.name),t.commentForUser&&o("p",{className:"mb-2",style:{fontSize:"13px",color:"#555"}},void 0,t.commentForUser),!i&&o("div",{className:"mt-auto"},void 0,o("button",{className:"btn btn-primary",onClick:function(){return n(t)}},void 0,r?"Select":"Vælg")))};i.defaultProps={isEnglish:!1,readOnly:!1};const a=i;n.d(t,["A",0,a])},77377(e,t,n){var r,o=n(96540);function i(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var s=function(e){var t=e.bank,n=e.onCancel,r=e.onStartAuth,l=e.isEnglish,s=a((0,o.useState)(t.hasPsuTypePersonal?"personal":t.hasPsuTypeBusiness?"business":null),2),c=s[0],u=s[1];return i("div",{},void 0,i("h5",{},void 0,i("strong",{},void 0,l?"Select a bank":"Vælg en bank")),i("div",{className:"mb-2"},void 0,i("img",{src:t.logo,alt:t.name,className:"mb-2",style:{height:"25px"}}),i("p",{className:"mb-0"},void 0,t.name)),i("div",{className:"mb-2"},void 0,t.hasPsuTypePersonal&&i("div",{className:"d-flex align-items-center mb-2 cursor-pointer",onClick:function(){return u("personal")}},void 0,i("div",{className:"circle flex-shrink-0 mr-2 ".concat("personal"===c?"circle-check":"")}),i("strong",{},void 0,I18n.translate("bankfetch.netbank.private"))),t.hasPsuTypeBusiness&&i("div",{className:"d-flex align-items-center mb-2 cursor-pointer",onClick:function(){return u("business")}},void 0,i("div",{className:"circle flex-shrink-0 mr-2 ".concat("business"===c?"circle-check":"")}),i("strong",{},void 0,I18n.translate("bankfetch.netbank.business")))),i("div",{},void 0,i("button",{className:"btn btn-primary mr-1",onClick:function(){"personal"===c?r(t.id,!0,!1):"business"===c&&r(t.id,!1,!0)},disabled:!c},void 0,I18n.translate("bankfetch.netbank.start")),i("button",{className:"btn btn-secondary",onClick:n},void 0,I18n.translate("button.cancel"))))};s.defaultProps={isEnglish:!1};const c=s;n.d(t,["A",0,c])},94430(e,t,n){var r,o=n(62193),i=n.n(o),a=n(38221),l=n.n(a),s=n(96540),c=n(88482),u=n.n(c),d=n(42845),f=n.n(d),p=n(85176),m=n.n(p),v=n(37995),h=n.n(v),y=n(61225),b=n(18150),g=n(78764),w=n(54739),S=n(25799),k=n(91184),O=n(27545),N=n(73731),x=n(48127),P=n(62288),I=n(32686),A=n(48700),C=n(199),j=n(88939),D=n(44918),_=n(96540);function R(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function T(e){return function(e){if(Array.isArray(e))return F(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){if(e){if("string"==typeof e)return F(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var z=function(e){var t=e.data,n=void 0===t?new N.A:t,r=e.loading,o=void 0!==r&&r,a=e.defaultCountry,c=e.hideAdvancedOptions,d=void 0!==c&&c,p=e.onDataChange,v=e.onValidityChange,M=e.readOnly,F=void 0!==M&&M,z=e.showPhone,B=void 0===z||z,H=e.lockCountry,L=void 0===H?null:H,$=e.eMailRequired,X=void 0!==$&&$,V=e.disableEinvoice,q=void 0!==V&&V,U=e.useMultipleAddressLines,W=void 0!==U&&U,Y=(0,y.d4)(function(e){return e.defaults.countries2}),K=(0,y.d4)(function(e){return e.defaults.currencies}),G=(0,y.d4)(function(e){return e.defaults.paymentTermsType}),Q=(0,y.d4)(function(e){return e.defaults.paymentTermsDays}),Z=(0,s.useRef)(new A.g),J=(0,s.useRef)(null),ee=(0,s.useRef)(null),te=(0,s.useRef)(null),ne=function(){if(W)return{name:n.name||"",address1:n.address1||"",address2:n.address2||"",address3:n.address3||"",zipCode:n.zipCode||"",city:n.city||"",countryCode:L||n.countryCode||a||"",invoiceAtt:n.invoiceAtt||"",invoiceEmail:n.invoiceEmail||"",paymentTermsTypeState:n.paymentTermsType||"",paymentTermsDaysState:"ALREADY_PAID"===n.paymentTermsType?1:n.paymentTermsDays||"",identification:n.identification||"",privatePerson:!d&&!!n.privatePerson,phone:n.phone||"",language:n.language||"DA",currency:n.currency||"DKK",useSystemTerms:null===n.paymentTermsType&&null===n.paymentTermsDays,electronicInvoiceDestinationType:n.electronicInvoiceDestinationType||null,recipient:n.electronicInvoiceAddress||null};var e=function(e){if(!e)return{streetName:"",streetNo:""};var t=e.trim().split(/\s+/);if(t.length>0){var n=t[t.length-1];if(/^\d+[a-zA-Z]?$/.test(n)&&t.length>1)return{streetName:t.slice(0,-1).join(" "),streetNo:n}}return{streetName:e,streetNo:""}}(n.address1||""),t=e.streetName,r=e.streetNo;return{name:n.name||"",streetName:n.streetName||t,streetNo:n.streetNo||r,address2:n.address2||"",address3:n.address3||"",zipCode:n.zipCode||"",city:n.city||"",countryCode:L||n.countryCode||a||"",invoiceAtt:n.invoiceAtt||"",invoiceEmail:n.invoiceEmail||"",paymentTermsTypeState:n.paymentTermsType||"",paymentTermsDaysState:"ALREADY_PAID"===n.paymentTermsType?1:n.paymentTermsDays||"",identification:n.identification||"",privatePerson:!d&&!!n.privatePerson,phone:n.phone||"",language:n.language||"DA",currency:n.currency||"DKK",useSystemTerms:null===n.paymentTermsType&&null===n.paymentTermsDays,electronicInvoiceDestinationType:n.electronicInvoiceDestinationType||null,recipient:n.electronicInvoiceAddress||null}},re=E((0,s.useState)(function(){return ne().name}
1),2),oe=re[0],ie=re[1],ae=E((0,s.useState)(function(){return ne().address1||""}),2),le=ae[0],se=ae[1],ce=E((0,s.useState)(function(){return ne().streetName||""}),2),ue=ce[0],de=ce[1],fe=E((0,s.useState)(function(){return ne().streetNo||""}),2),pe=fe[0],me=fe[1],ve=E((0,s.useState)(function(){return ne().address2}),2),he=ve[0],ye=ve[1],be=E((0,s.useState)(function(){return ne().address3}),2),ge=be[0],we=be[1],Se=E((0,s.useState)(function(){return ne().zipCode}),2),ke=Se[0],Oe=Se[1],Ne=E((0,s.useState)(function(){return ne().city}),2),xe=Ne[0],Pe=Ne[1],Ie=E((0,s.useState)(function(){return ne().countryCode}),2),Ae=Ie[0],Ce=Ie[1],je=E((0,s.useState)(function(){return ne().invoiceAtt}),2),De=je[0],_e=je[1],Re=E((0,s.useState)(function(){return ne().invoiceEmail}),2),Te=Re[0],Ee=Re[1],Me=E((0,s.useState)(function(){return ne().paymentTermsTypeState}),2),Fe=Me[0],ze=Me[1],Be=E((0,s.useState)(function(){return ne().paymentTermsDaysState}),2),He=Be[0],Le=Be[1],$e=E((0,s.useState)(function(){return ne().identification}),2),Xe=$e[0],Ve=$e[1],qe=E((0,s.useState)(function(){return ne().phone}),2),Ue=qe[0],We=qe[1],Ye=E((0,s.useState)(function(){return ne().language}
1),2),Ke=Ye[0],Ge=Ye[1],Qe=E((0,s.useState)(function(){return ne().currency}),2),Ze=Qe[0],Je=Qe[1],et=E((0,s.useState)(function(){return ne().useSystemTerms}),2),tt=et[0],nt=et[1],rt=E((0,s.useState)(function(){return ne().privatePerson}),2),ot=rt[0],it=rt[1],at=E((0,s.useState)(function(){return ne().electronicInvoiceDestinationType}),2),lt=at[0],st=at[1],ct=E((0,s.useState)(function(){return ne().recipient}),2),ut=ct[0],dt=ct[1],ft=E((0,s.useState)(null),2),pt=ft[0],mt=ft[1],vt=E((0,s.useState)({}),2),ht=vt[0],yt=vt[1],bt=E((0,s.useState)([]),2),gt=bt[0],wt=bt[1],St=E((0,s.useState)(!1),2),kt=St[0],Ot=St[1],Nt=E((0,s.useState)(null),2),xt=Nt[0],Pt=Nt[1],It=E((0,s.useState)(null),2),At=It[0],Ct=It[1],jt=(0,s.useRef)(null),Dt=(0,s.useRef)(null),_t=(0,s.useRef)(null),Rt=(0,s.useRef)(null),Tt=(0,s.useRef)(null),Et=(0,s.useRef)(null),Mt=(0,s.useRef)(null),Ft=(0,s.useRef)(null),zt=(0,s.useRef)(null),Bt=(0,s.useRef)(null),Ht=(0,s.useRef)(null),Lt=(0,s.useRef)(null),$t=(0,s.useRef)(null),Xt=(0,s.useRef)(null),Vt=(0,s.useRef)(null),qt=(0,s.useRef)(null),Ut=(0,s.useMemo)(function(){return(0,C.FQ)()},[]),Wt=(0,s.useMemo)(function(){return(0,C.Yy)()},[]),Yt=(0,s.useMemo)(function(){return{name:[x.A,function(e){return{valid:(0,D.A)().validate({value:e,options:{max:150}}).valid,message:I18n.translate("validation.max","150")}}],identification:[function(e){return{valid:(0,D.A)().validate({value:e,options:{max:150}}).valid,message:I18n.translate("validation.max","150")}}],address1:[x.A,function(e){return{valid:(0,D.A)().validate({value:e,options:{max:80}}).valid,message:I18n.translate("validation.max","80")}}],streetName:[x.A,function(e){return{valid:(0,D.A)().validate({value:e,options:{max:80}}).valid,message:I18n.translate("validation.max","80")}}],streetNo:[function(e){return{valid:(0,D.A)().validate({value:e,options:{max:20}}).valid,message:I18n.translate("validation.max","20")}}],address2:[function(e){return{valid:(0,D.A)().validate({value:e,options:{max:80}}).valid,message:I18n.translate("validation.max","80")}}],address3:[function(e){return{valid:(0,D.A)().validate({value:e,options:{max:80}}).valid,message:I18n.translate("validation.max","80")}}],zipCode:[x.A,function(e){return{valid:(0,D.A)().validate({value:e,options:{max:15}}).valid,message:I18n.translate("validation.max","15")}}],city:[x.A,function(e){return{valid:(0,D.A)().validate({value:e,options:{max:80}}).valid,message:I18n.translate("validation.max","80")}}],countryCode:[x.A],invoiceAtt:[function(e){return{valid:(0,D.A)().validate({value:e,options:{max:80}}).valid,message:I18n.translate("validation.max","80")}}],invoiceEmail:[].concat(T(X?[x.A]:[]),[function(e){return{valid:(0,j.A)().validate({value:e}).valid,message:I18n.translate("signin.email.validation.format")}},function(e){return{valid:(0,D.A)().validate({value:e,options:{max:60}}).valid,message:I18n.translate("validation.max","60")}}]),paymentTermsType:[x.A],phone:[function(e){return{valid:(0,D.A)().validate({value:e,options:{max:20}}).valid,message:I18n.translate("validation.max","20")}}],paymentTermsDays:[function(e){return(0,P.A)().validate({value:e,options:{required:!0,forbidNegative:!0,forbidDecimals:!0}})}],recipient:[x.A,(0,I.A)(50)]}},[X]),Kt=(0,s.useCallback)(function(){!ot&&Ae&&Z.current.registerRequest((0,g.tJ)({cvr:Xe||null,country:Ae||null,electronicInvoiceDestinationType:lt||null,electronicInvoiceAddress:ut||null})).then(function(e){var t=(e.body.validEinvoicePartyIdentifierTypes||[]).find(function(e){return e===lt});yt(e.body),wt((e.body.validEinvoicePartyIdentifierTypes||[]).map(function(e){return{label:I18n.translate("einvoice.desttype.".concat(e)),value:e}})),t||(dt(null),st(null))}).catch(function(){})},[ot,Ae,Xe,lt,ut]),Gt=(0,s.useCallback)(function(){Z.current.registerRequest((0,g.Yp)({country:Ae||null,privatePerson:ot,identification:Xe||null})).then(function(e){Ot(e.body.showViesLink),Pt(e.body.errorMsgKey)}).catch(function(){})},[Ae,ot,Xe]),Qt=(0,s.useCallback)(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];
1ot||!e||!t&&e.length<4?Ct(null):Z.current.registerRequest((0,b.i9)({searchExpr:e,explicitSearch:!!t})).then(function(e){e&&e.body&&e.body.searchResults&&1===e.body.searchResults.length?Ct(e.body.searchResults[0]):Ct(null)}).catch(function(e){Ct(null)})},[ot]);(0,s.useEffect)(function(){return J.current=l()(function(){return Kt()},500),ee.current=l()(function(){return Gt()},500),te.current=l()(function(e){return Qt(e,!1)},500),function(){J.current&&J.current.cancel(),ee.current&&ee.current.cancel(),te.current&&te.current.cancel()}},[Kt,Gt,Qt]),(0,s.useEffect)(function(){Ae&&(Kt(),ee.current&&ee.current())},[Ae,Kt]),(0,s.useEffect)(function(){return function(){J.current&&J.current.cancel(),ee.current&&ee.current.cancel(),te.current&&te.current.cancel(),Z.current.abortAll()}},[]);var Zt=(0,s.useCallback)(function(){At&&(At.streetName&&de(At.streetName),At.buildingNumber&&me(At.buildingNumber),At.postalZone&&Oe(At.postalZone),At.cityName&&Pe(At.cityName),At.cvr&&Ve(At.cvr),Ct(null))},[At]),Jt=(0,s.useCallback)(function(e){e!==oe&&(ie(e),!ot&&e&&e.length>=4?te.current&&te.current(e):Ct(null))},[ot,oe]),en=(0,s.useCallback)(function(e){ze(e),"ALREADY_PAID"===e&&Le(1)},[]),tn=(0,s.useCallback)(function(e){st(e),e?Ae&&J.current&&J.current():(dt(null),yt({}))},[Ae]),nn=(0,s.useCallback)(function(e){var t=e.replace(/\s/g,"");t!==ut&&(dt(t),Ae&&t&&J.current&&J.current())},[Ae,ut]),rn=(0,s.useCallback)(function(e){e!==Xe&&(Ve(e),Ae&&!ot&&(J.current&&J.current(),ee.current&&ee.current()))},[Ae,ot,Xe]),on=(0,s.useCallback)(function(e){Ce(e),e&&!ot&&(J.current&&J.current(),ee.current&&ee.current())},[ot]),an=(0,s.useCallback)(function(e){it(e),e?(st(null),dt(null),yt({})):Ae&&(J.current&&J.current(),ee.current&&ee.current())},[Ae]),ln=(0,s.useCallback)(function(){var e=!tt;nt(e),e?(ze(G||null),Le(Q||"")):(ze(null),Le(""))},[tt,G,Q]),sn=(0,s.useCallback)(function(){var e=new N.A(n);return e.name=oe,W?e.address1=le:(e.address1=ue&&pe?"".concat(ue," ").concat(pe).trim():ue||"",e.streetName=ue,e.streetNo=pe),e.address2=he,e.address3=ge,e.zipCode=ke,e.city=xe,e.countryCode=Ae,e.invoiceAtt=De,e.invoiceEmail=Te,e.paymentTermsType=Fe,e.paymentTermsDays=He,e.language=Ke,e.currency=Ze,e.identification=Xe,e.privatePerson=ot,e.phone=Ue,e.electronicInvoiceDestinationType=lt,e.electronicInvoiceAddress=ut,e},[n,oe,le,ue,pe,he,ge,ke,xe,Ae,De,Te,Fe,He,Ke,Ze,Xe,ot,Ue,lt,ut,W]),cn=(0,s.useCallback)(function(){if(v){var e=Yt.name.every(function(e){var t=e(oe);return t&&!0===t.valid}),t=W?Yt.address1.every(function(e){var t=e(le);return t&&!0===t.valid}):Yt.streetName.every(function(e){var t=e(ue);return t&&!0===t.valid})&&Yt.streetNo.every(function(e){var t=e(pe);return t&&!0===t.valid}),n=Yt.zipCode.every(function(e){var t=e(ke);return t&&!0===t.valid}),r=Yt.city.every(function(e){var t=e(xe);return t&&!0===t.valid}),o=Yt.countryCode.every(function(e){var t=e(Ae);return t&&!0===t.valid}),i=Te&&Te.trim()?Yt.invoiceEmail.every(function(e){var t=e(Te);return t&&!0===t.valid}):!X,a=!lt||Yt.recipient.every(function(e){var t=e(ut);return t&&!0===t.valid});v(e&&t&&n&&r&&o&&i&&a)}},[v,Yt,oe,le,ue,pe,ke,xe,Ae,Te,X,lt,ut,W]),un=(0,s.useRef)(null);(0,s.useEffect)(function(){return un.current=l()(function(e){p&&p(e)},300),function(){un.current&&un.current.cancel()}},[p]),(0,s.useEffect)(function(){un.current&&un.current(sn()),cn()},[oe,le,ue,pe,he,ge,ke,xe,Ae,De,Te,Fe,He,Ke,Ze,Xe,ot,Ue,lt,ut,sn,cn]);
1var dn=o||F,fn=ht.foundInNemHandelByGln,pn=ht.foundInNemHandelByCvr,mn=ht.foundInPeppol,vn=ht.madeAttemptNemHandelLookupGln,hn=ht.madeAttemptNemHandelLookupCvr,yn=ht.madeAttemptPeppolLookup,bn=ht.hasSupportedCustomerProfile,gn=ht.companyNameFromNemHandel,wn=ht.companyNameFromPeppol,Sn=ht.noRecipientProvidedForLookup;return R("form",{className:"w-full"},void 0,!d&&R("div",{className:"mb-1"},void 0,R(m(),{checked:!ot,disabled:dn,inline:!0,onChange:function(){return an(!1)}},void 0,I18n.translate("customer.type.company")),R(m(),{checked:ot,disabled:dn,inline:!0,onChange:function(){return an(!0)}},void 0,I18n.translate("customer.type.private"))),R(h(),{},void 0,R(f(),{sm:4},void 0,R("div",{},void 0,_.createElement(w.x,{label:ot?"customer.private.name":"customer.company.name",tooltip:ot?"customer.private.name.balloon":"customer.company.name.balloon",ref:jt,validators:Yt.name,value:oe,autoFocus:!0,disabled:dn,onChange:Jt}),!ot&&At&&R("p",{className:"mb-1 mt-0"},void 0,"Fundet i CVR."," ",R("span",{onClick:Zt,style:{cursor:"pointer",textDecoration:"underline",color:"#007bff"}},void 0,"Anvend oplysninger"))),!ot&&_.createElement(w.x,{label:"create.company.identification",ref:Xt,validators:Yt.identification,value:Xe,onChange:rn,disabled:dn}),!q&&R(S.H,{label:"customer.einvoicing.desttype",value:gt.length?lt:null,tooltip:"customer.einvoicing.desttype.balloon",placeholder:I18n.translate("customer.einvoicing.desttype.none"),options:gt,onChange:tn,disabled:dn||ot}),!q&&lt&&_.createElement(w.x,{label:"customer.einvoicing.recipient",tooltip:"customer.einvoicing.recipient.balloon",ref:qt,value:ut,onChange:nn,validators:Yt.recipient,disabled:dn}),q||i()(ht)||ot?null:R("div",{},void 0,fn&&R(w.x,{label:"customer.einvoicing.glnfound",value:gn,disabled:!0})||pn&&R(w.x,{label:"customer.einvoicing.cvrfound",value:gn,disabled:!0})||mn&&R(w.x,{label:"customer.einvoicing.cvrfound",value:wn,disabled:!0})||Sn&&R("p",{},void 0,I18n.translate("customer.einvoicing.norecipient"))||vn&&R("p",{},void 0,I18n.translate("customer.einvoicing.glnnotfound"))||hn&&R("p",{},void 0,I18n.translate("customer.einvoicing.cvrnotfound"))||yn&&R("p",{},void 0,I18n.translate("customer.einvoicing.peppolnotfound")),(fn||pn)&&!bn&&R("p",{},void 0,I18n.translate("customer.einvoicing.nosupportedprofile"))),(xt||kt)&&R("div",{className:"d-flex flex-column"},void 0,R("label",{className:"font-normal"},void 0,I18n.translate("customer.foreign")),xt&&R("div",{className:"d-flex align-items-center mb-1"},void 0,R("i",{className:"fa fa-warning text-danger space-right pb-1","aria-hidden":"true"}),R("p",{className:"my-0"},void 0,I18n.translate(xt))),kt&&R("a",{href:"https://ec.europa.eu/taxation_customs/vies",target:"_blank",rel:"noreferrer noopener"},void 0,I18n.translate("vatinfo.vies.txt")))),R(f(),{sm:4},void 0,W?R("div",{},void 0,_.createElement(w.x,{label:"customer.address",tooltip:"customer.address.balloon",placeholder:I18n.translate("customer.address.line1"),ref:Dt,validators:Yt.address1,value:le,onChange:se,disabled:dn}),_.createElement(w.x,{placeholder:I18n.translate("customer.address.line2"),ref:Tt,validators:Yt.address2,value:he,onChange:ye,disabled:dn}),_.createElement(w.x,{placeholder:I18n.translate("customer.address.line3"),ref:Et,validators:Yt.address3,value:ge,onChange:we,disabled:dn})):R("div",{},void 0,R("label",{className:"control-label"},void 0,I18n.translate("customer.address"),R(k.$,{icon:"fa fa-info-circle space-left",tooltip:I18n.translate("customer.address.balloon")})),R(h(),{},void 0,R(f(),{sm:8,className:"pr-0"},void 0,_.createElement(w.x,{placeholder:I18n.translate("customer.address.line1"),ref:_t,validators:Yt.streetName,value:ue,onChange:de,disabled:dn})),R(f(),{sm:4},void 0,_.createElement(w.x,{placeholder:"Nr.",ref:Rt,validators:Yt.streetNo,value:pe,onChange:me,disabled:dn})))),R(h(),{},void 0,R(f(),{sm:4,className:"pr-0"},void 0,_.createElement(w.x,{placeholder:I18n.translate("customer.zip"),ref:Mt,validators:Yt.zipCode,value:ke,onChange:Oe,disabled:dn})),R(f(),{sm:8},void 0,_.createElement(w.x,{placeholder:I18n.translate("customer.city"),ref:Ft,validators:Yt.city,value:xe,onChange:Pe,disabled:dn}))),_.createElement(S.H,{placeholder:I18n.translate("customer.country"),ref:zt,validators:Yt.countryCode,value:L||Ae,options:Y,onChange:on,disabled:dn||!!L,noDeselect:!0})),R(f(),{sm:4},void 0,_.createElement(w.x,{label:"customer.invoiceemail",tooltip:"customer.invoiceemail.balloon",ref:Ht,validators:Yt.invoiceEmail,value:Te,onChange:Ee,disabled:dn}),!ot&&_.createElement(w.x,{placeholder:I18n.translate("customer.invoiceatt"),ref:Bt,validators:Yt.invoiceAtt,value:De,onChange:_e,disabled:dn}),B&&_.createElement(w.x,{placeholder:I18n.translate("customer.phone"),label:"customer.phone",ref:Vt,validators:Yt.phone,value:Ue,onChange:We,disabled:dn}))),!d&&R(h(),{style:{borderTop:"1px solid #ccc",paddingTop:"10px"}},void 0,R(f(),{sm:6},void 0,R("div",{className:"form-group"},void 0,R(u(),{style:{marginBottom:tt?114:-7},checked:tt,onChange:ln,disabled:dn},void 0,I18n.translate("customer.standardterms"),R(k.$,{icon:"fa fa-info-circle space-left",tooltip:I18n.translate("customer.standardterms.balloon")}))),!tt&&R(h(),{style:{marginBottom:29}},void 0,R(f(),{sm:6},void 0,_.createElement(S.H,{label:"customer.paymentterms",tooltip:"customer.paymentterms.balloon",ref:Lt,validators:Yt.paymentTermsType,options:Ut,value:Fe,onCh
1ange:en,disabled:dn})),"ALREADY_PAID"!==Fe&&R(f(),{sm:6},void 0,_.createElement(w.x,{label:"customer.paymentdays",tooltip:"customer.paymentdays.balloon",ref:$t,validators:Yt.paymentTermsDays,value:He,onChange:Le,disabled:dn})))),R(f(),{sm:3},void 0,R(S.H,{label:"customer.currency",tooltip:"customer.currency.balloon",value:Ze,labelKey:"text",options:K,onChange:Je,noDeselect:!0,disabled:dn})),R(f(),{sm:3},void 0,R(S.H,{label:"customer.language",tooltip:"customer.language.balloon",value:Ke,options:Wt,onChange:Ge,noDeselect:!0,disabled:dn}))),R("div",{className:"form-group"},void 0,R(O.A,{title:I18n.translate("customer.einvoicing.errtitle"),show:!!pt,submitBtnText:I18n.translate("ok"),noCancelBtn:!0,onHide:function(){return mt(null)},onSubmit:function(){return mt(null)}},void 0,I18n.translate(pt))))};z.defaultProps={data:new N.A};const B=z;n.d(t,["A",0,B])},82397(e,t,n){n.d(t,{$:()=>E});var r,o=n(96540),i=n(22495),a=n.n(i),l=n(87195),s=n.n(l),c=n(58776),u=n.n(c),d=n(13545),f=n(51476),p=n(59858),m=n.n(p);function v(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var b="NEW_BASKET";const g=function(e){var t=e.show,n=e.onHide,r=e.baskets,i=e.sourceBasketXid,a=e.onSelect,l=h((0,o.useState)(null),2),s=l[0],c=l[1],u=r.filter(function(e){return!e.confirmedAndLocked&&String(e.xid)!==String(i)}),d=function(){c(null),n&&n()};return v(m(),{show:t,onHide:d},void 0,v(m().Header,{closeButton:!0},void 0,v(m().Title,{},void 0,"Vælg destination indkøbskurv")),v(m().Body,{},void 0,0===u.length?v("div",{},void 0,v("div",{className:"alert alert-info"},void 0,"Ingen tilgængelige indkøbskurve. Alle kurve er enten låste eller bekræftet lukket."),v("ul",{className:"list-group"},void 0,v("li",{className:"list-group-item ".concat(s===b?"active":""),style:{cursor:"pointer"},onClick:function(){return c(b)}},b,"Flyt til ny indkøbskurv"))):v("div",{},void 0,v("p",{},void 0,"Vælg den indkøbskurv, du vil flytte linjen til:"),v("ul",{className:"list-group"},void 0,v("li",{className:"list-group-item ".concat(s===b?"active":""),style:{cursor:"pointer"},onClick:function(){return c(b)}},b,"Flyt til ny indkøbskurv"),u.map(function(e){return v("li",{className:"list-group-item ".concat(s===e.xid?"active":""),style:{cursor:"pointer"},onClick:function(){return c(e.xid)}},e.xid,e.name||"Indkøbskurv")})))),v(m().Footer,{},void 0,v("button",{type:"button",className:"btn btn-default",onClick:d},void 0,I18n.translate("button.cancel")),v("button",{type:"button",className:"btn btn-primary",disabled:!s,onClick:function(){if(a){var e=s===b?null:s;null===e&&s!==b||(a(e),c(null))}}},void 0,"Flyt")))};var w,S=n(27545);function k(e,t,n,r){w||(w="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:w,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const O=function(e){var t=e.show,n=e.onHide,r=e.who,o=e.when;return k(S.A,{show:t,title:I18n.translate("basket.line.details.title"),cancelBtnText:I18n.translate("ok"),onHide:n,noCancelBtn:!1},void 0,k("div",{style:{padding:"10px 0"}},void 0,r&&k("div",{style:{marginBottom:"12px"}},void 0,k("strong",{},void 0,I18n.translate("basket.line.details.changed.who"))," ",r),o&&k("div",{},void 0,k("strong",{},void 0,I18n.translate("basket.line.details.changed.when"))," ",o),!r&&!o&&k("div",{},void 0,I18n.translate("basket.line.details.changed.na"))))};var N,x=n(3429);function P(e,t,n,r){N||(N="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});
1return{$$typeof:N,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var C=function(e){var t=e.show,n=e.onHide,r=e.comment,i=e.onSave,a=e.saving,l=I((0,o.useState)(r||""),2),s=l[0],c=l[1];(0,o.useEffect)(function(){c((r||"").slice(0,100))},[r,t]);return P(S.A,{show:t,title:I18n.translate("basket.line.comment"),cancelBtnText:I18n.translate("button.cancel"),submitBtnText:I18n.translate("button.save"),onHide:n,onSubmit:function(){i&&i(s)},noCancelBtn:!1,disableSubmit:a,processing:a,bsSize:"md"},void 0,P("div",{style:{padding:"10px 0"}},void 0,P(x.R,{id:"basket-line-comment",value:s,onChange:function(e){c(e)},maxLength:100,rows:5,placeholder:I18n.translate("basket.line.comment.placeholder"),autoFocus:!0}),s.length>=100&&P("span",{className:"text-danger",style:{userSelect:"none"}},void 0,"Max 100 karakterer")))};C.defaultProps={comment:"",saving:!1};const j=C;var D;function _(e,t,n,r){D||(D="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:D,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var E=function(e){var t=e.lines,n=e.basketXid,r=e.readOnly,i=e.paid,a=e.onQuantityChange,l=e.onDeleteLine,s=e.isCheckoutPage,c=e.basketLocked,u=e.onMoveLine,d=e.availableBaskets,f=e.onSendToCompany,p=e.onCommentChange,m=e.linesConfirmedForAdministrator,v=e.enableLineFolding,h=e.foldShowsPreviewWhenCollapsed,y=v&&t&&t.length>3,b=R((0,o.useState)(!y),2),g=b[0],w=b[1];if((0,o.useEffect)(function(){w(!v||!t||t.length<=3)},[n,v,t]),!t||0===t.length)return null;var S=v,k=S?"table-st table-st__v2":"table-st table-st__v2 table-st--transparent",O=function(e){return S?_("div",{className:"shopping-basket-table"},void 0,e):_(o.Fragment,{},void 0,e)},N=y&&!g,x=N&&h,P=N?x?t.slice(0,3):[]:t,I=function(){return _("div",{className:"shopping-basket-table__fold-toggle"},void 0,_("button",{type:"button",className:"shopping-basket-table__fold-toggle-btn",onClick:function(){return w(!0)}},void 0,I18n.translate("basket.lines.expand",t.length),_("i",{className:"fa fa-chevron-down ml-1","aria-hidden":"true"})))};return O(N&&!x?I():_(o.Fragment,{},void 0,_("table",{className:k,cellPadding:"0",cellSpacing:"0"},void 0,_("thead",{className:"table-st__head"},void 0,_("tr",{},void 0,_("th",{},void 0,I18n.translate("basket.line.company")),_("th",{},void 0,I18n.translate("basket.line.year")),_("th",{},void 0,I18n.translate("basket.line.product")),_("th",{className:"text-right"},void 0,I18n.translate("basket.line.qty")),_("th",{className:"text-right"},void 0,I18n.translate("basket.line.each")),_("th",{className:"text-right"},void 0,I18n.translate("basket.line.total")),_("th",{width:"5%"}))),_("tbody",{className:"table-st__body"},void 0,P.map(function(e,t){return _(M,{line:e,lineIndex:t,basketXid:n,readOnly:r,paid:i,onQuantityChange:a?function(e){return a(t,e)}:null,onDeleteLine:l?function(){return l(n,e.xid)}:null,isCheckoutPage:s,basketLocked:c,onMoveLine:u,availableBaskets:d,onSendToCompany:f,onCommentChange:p,linesConfirmedForAdministrator:m},t)}))),N&&I(),y&&g&&_("div",{className:"shopping-basket-table__fold-toggle"},void 0,_("button",{type:"button",className:"shopping-basket-table__fold-toggle-btn",onClick:function(){return w(!1)}},void 0,I18n.translate("basket.lines.collapse"),_("i",{className:"fa fa-chevron-up ml-1","aria-hidden":"true"})))))},M=function(e){var t=e.line,n=e.lineIndex,r=e.basketXid,i=e.readOnly,l=e.paid,c=e.onQuantityChange,p=e.onDeleteLine,m=e.isCheckoutPage,v=e.basketLocked,h=e.onMoveLine,y=e.availableBaskets,b=e.onSendToCompany,w=e.onCommentChange,S=e.linesConfirmedForAdministrator,k=R((0,o.useState)(!1),2),N=k[0],x=k[1],P=R((0,o.useState)(!1),2),I=P[0],A=P[1],C=R((0,o.useState)(!1),2),D=C[0],T=C[1],E=R((0,o.useState)(!1),2),M=E[0],F=E[1],z=R((0,o.useState)(t.quantity||""),2),B=z[0],H=z[1];(0,o.useEffect)(function(){H(t.quantity||"")},[t.quantity]);var L=!m&&!v&&h&&!S,$=t.companyName,X=t.fiscalYear,V=t.productName,q=t.priceEach,U=t.priceTotal,W=t.quantity,Y=t.canQuantityAndPriceEach,K=t.who,G=t.when,Q=t.xid,Z=t.userComment,J=Z&&""!==Z.trim(),ee=function(e){e.stopPropagation(),w&&!v&&T(!0)},te=J?_(s(),{placement:"top",overlay:_(u(),{id:"comment-tooltip-".concat(n)},void 0,Z)},void 0,_("span",{className:"shopping-basket-table__comment-icon",style:{color:"#666",cursor:w&&!v?"pointer":"default"},onClick:ee,role:"button",tabIndex:w&&!v?0:-1,onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||!w||v||(e.preventDefault(),ee(e))}},void 0,_("i",{className:"fa fa-pencil fa-fw","aria-hidden":"true"}))):null;return[_("tr",{},"row-".concat(n),_("td",{},void 0,_("span",{className:"shopping-basket-table__company-cell"},void 0,$||"",te)),_("td",{},void 0,X||""),_("td",{},void 0,V),_("td",{className:"text-right"},void 0,Y?i||S?_("span",{},void 0,W||0):_("input",{type:"number",className:"form-control",value:B,onChange:function(e){H(e.target.value)},onBlur:function(e){var t=parseInt(e.target.value,10),n=parseInt(W,10)||0;isNaN(t)||t<0?H(W||""):t!==n&&c&&c(t)},onKeyDown:function(e){"Enter"===e.key&&e.target.blur()},min:"0",style:{maxWidth:"120px",margin:"0 auto",display:"block"}}):null),_("td",{className:"text-right"},void 0,q&&Y?"".concat(q):""),_("td",{className:"text-right"},void 0,_("div",{},void 0,U),i&&!1===l&&_("div",{style:{fontSize:"12px",color:"#d9534f",fontWeight:500}},void 0,"Ikke betalt")),_("td",{onClick:function(e){return e.stopPropagation()},onKeyPress:function(e){return e.stopPropagation()}},void 0,_("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"}},void 0,_(f.A,{id:"".concat(r,"-").concat(Q||n,"-actions"),bsStyle:"default",bsSize:"sm",title:_(d.h,{className:"phi phi-1_6x","aria-label":"Actions"}),className:"btn btn-default",type:"button",noCaret:!0,pullRight:!0,closeOnSelect:!0},void 0,!i&&p&&!S&&_(a(),{onSelect:p},void 0,I18n.translate("myorders.remove")),L&&_(a(),{onSelect:function(){return A(!0)}},void 0,I18n.translate("basket.line.move")),$&&b&&!v&&!S&&_(a(),{onSelect:function(){b&&r&&t.xid&&b(r,t.xid)}},void 0,I18n.translate("basket.line.invoiceto")),w&&!v&&_(a(),{onSelect:function(){return T(!0)}},void 0,I18n.translate("basket.line.comment")),(K||G)&&_(a(),{onSelect:function(){return x(!0)}},void 0,I18n.translate("basket.line.details")))))),_(O,{show:N,onHide:function(){return x(!1)},who:K,when:G},"details-".concat(n)),y?_(g,{show:I,onHide:function(){return A(!1)},baskets:y,sourceBasketXid:r,onSelect:function(e){h&&r&&t.xid&&(h(r,t.xid,e),A(!1))}},"move-".concat(n)):null,w?_(j,{show:D,onHide:function(){return T(!1)},comment:Z,onSave:function(e){w&&r&&t.xid&&(F(!0),w(r,t.xid,e).then(function(){F(!1),T(!1)}).catch(function(){F(!1)}))},saving:M},"comment-".concat(n)):null]};E.defaultProps={readOnly:!1,paid:void 0,onQuantityChange:null,onDeleteLine:null,isCheckoutPage:!1,basketLocked:!1,onMoveLine:null,availableBaskets:null,onSendToCompany:null,onCommentChange:null,linesConfirmedForAdministrator:!1,enableLineFolding:!1,foldShowsPreviewWhenCollapsed:!0}},16001(e,t,n){var r,o=n(95468),i=n(51470);function a(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const c=function(e){var t=e.position,n=void 0===t?"left":t,r=e.onOpen,s=e.attachments,c=void 0===s?[]:s,u=e.count,d=e.onMouseOver,f=void 0===d?function(){}:d,p=l(c,1)[0];return a("div",{className:"transaction-attachments "+n,onMouseOver:f},void 0,p?a(o.A,{className:"phi-3x",contentType:p.contentType}):a("div",{className:"attachment-placeholder"}),c.length>1||u>0?a("div",{className:"badge badge-default"},void 0,c.length||u):null,c.length?a("div",{className:"attachments-container"},void 0,c.map(function(e,t){return a("div",{className:"attachment-icon-container d-flex align-items-center "},t,a(o.A,{className:"phi-3x mx-02",contentType:e.contentType}),r&&a("button",{className:"btn btn-link-dark mx-02",type:"button",onClick:function(n){n.stopPropagation(),r(t+1,e.xid,e.contentType)}},void 0,a("i",{className:"fa fa-search fa-lg","aria-hidden":"true"})),e.xid&&a("a",{className:"btn btn-link-dark mx-02",href:(0,i.i93)(e.xid),onClick:function(e){return e.stopPropagation()},download:!0},void 0,a("i",{className:"fa fa-download fa-lg","aria-hidden":"true"})),a("div",{className:"no-wrap mx-02"},void 0,e.fileName))})):null)};n.d(t,["A",0,c])},22671(e,t,n){n.d(t,{gC:()=>ee,H7:()=>te});var r,o=n(96540),i=n(42845),a=n.n(i),l=n(37995),s=n.n(l),c=n(19504),u=n(16093),d=n(27545),f=n(79955),p=n(22970),m=n(50038),v=n(74218),h=n(48700),y=n(3373),b=n(199),g=n(14670),w=n(83009),S=n(14947),k=n(36893),O=n(6150),N=n(51470),x=n(84262);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function I(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R(r.key),r)}}function C(e,t,n){return t=D(t),function(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,j()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(j=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function R(e){var t=function(e,t){if("object"!=P(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==P(t)?t:t+""}var T,E,M,F=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),C(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(t,e),n=t,(r=[{key:"getStatusClass",value:function(e){switch(e){case this.props.errorStatus:return"text-danger";case this.props.busyStatus:return"text-muted";default:return""}}},{key:"render",value:function(){var e=this;return I("div",{},void 0,!this.props.disabled&&this.props.showDropzone||this.props.attachments.length?I("label",{className:"control-label"},void 0,I18n.translate("work.edit.attached")):null,this.props.attachmentsInCreate.map(function(e){return I("div",{className:"card card-secondary card-sm mb-1"},e.xid,I("a",{className:"card-body d-flex justify-content-between align-items-center",href:(0,N.i93)(e.xid)},void 0,e.name))}),this.props.newAttachments.map(function(t){return I("div",{className:"card card-secondary card-sm mb-1"},t.id,I("div",{className:"card-body d-flex justify-content-between align-items-center ".concat(e.getStatusClass(t.status))},void 0,t.name,I("span",{},void 0,I("button",{type:"button",className:"btn btn-link-dark py-0",onClick:function(){return e.props.onRemoveNewAttachment(t.id)},style:{marginRight:-10}}
1,void 0,I("i",{className:"fa fa-trash cursor-pointer","aria-label":"Remove attachment"})))))}),this.props.attachments.map(function(t){return I(S.A,{archiveXid:t.xid,fileName:t.fileName,nameForEdit:t.fileName,editable:e.props.editable,onPreviewAttachment:e.props.onPreviewAttachment,onRemoveAttachment:e.props.onRemoveAttachment,onSaveName:e.props.editable&&"function"==typeof e.props.onRenameAttachment?e.props.onRenameAttachment:void 0},t.xid)}),this.props.showDropzone&&I("div",{className:"card card-sm",style:{background:"transparent"}},void 0,I(O.A,{as:"div",accept:["inboxFile","bankFile"],id:this.props.sourceDocumentLineId,collect:x.z.handleCollect,drop:this.props.onDrop},void 0,function(t){var n=t.isOver,r=t.canDrop;return e.props.disabled?I("p",{className:"text-center mt-2"},void 0,I18n.translate("work.edit.attachmax")):I(o.Fragment,{},void 0,I("div",{style:{display:n||r?"none":void 0}},void 0,I(k.m,{className:"transparent card-body",placeholder:I18n.translate("work.edit.attach"),onFileAdded:e.props.onFileAdded,disablePreview:!0})),(n||r)&&I("div",{className:"card card-sm",style:{background:"transparent"}},void 0,I("div",{className:"filepicker dropzone transparent card-body dz-clickable"},void 0,I("div",{className:"dz-default dz-message"},void 0,"Drop files here"))))}))||null)}}])&&A(n.prototype,r),i&&A(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(o.Component);T=F,M={attachments:[],disabled:!1,showDropzone:!1,editable:!1,onFileAdded:function(){},onRemoveAttachment:function(){},onRemoveNewAttachment:function(){},onRenameAttachment:null,onDrop:function(){},sourceDocumentLineId:""},(E=R(E="defaultProps"))in T?Object.defineProperty(T,E,{value:M,enumerable:!0,configurable:!0,writable:!0}):T[E]=M;var z,B=n(52356),H=n(59499);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function $(e,t,n,r){z||(z="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:z,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function X(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return V(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach(function(t){Z(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,J(r.key),r)}}function Y(e,t,n){return t=G(t),function(e,t){if(t&&("object"==L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}
1(e,K()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(K=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Q(e,t){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Q(e,t)}function Z(e,t,n){return(t=J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L(t)?t:t+""}var ee=1,te=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Z(n=Y(this,t,[e]),"requestHelper",new h.g),Z(n,"formRef",null),Z(n,"formOptions",{}),Z(n,"methods",{}),Z(n,"state",{removeAttachment:null,attachments:[],oldAttachments:[],errors:[],saveDisabled:!1});var r=n.props.transaction.transactionTypeId,o=(0,w.Ay)().find(function(e){return Array.isArray(e.transactionTypeId)?-1!==e.transactionTypeId.indexOf(r):e.transactionTypeId===r});return n.formOptions=U(U({},(0,w.lp)()),o),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q(e,t)}(t,e),function(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){this.setState({oldAttachments:this.props.transaction.attachments.slice()})}},{key:"addAttachment",value:function(e){var t=this,n=e.name,r=Date.now();return new Promise(function(o){t.setState({attachments:[].concat(X(t.state.attachments),[{id:r,name:n,status:2,message:""}])},o),t.requestHelper.registerRequest((0,u.ur)({file:e,sourceId:t.props.transaction.sourceDocumentLineId,sourceVersion:t.props.transaction.sourceDocumentLineVersion,companyXid:t.props.companySelectionXid})).then(function(e){return{status:3,identifier:e.body.fileUploadIdentifier,message:e.body.errorText||""}}).catch(function(e){return{status:1,identifier:null,message:e.message}}).then(function(e){var n=e.status,o=e.identifier,i=e.message;return t.setState({attachments:t.state.attachments.map(function(e){return e.id===r?U(U({},e),{},{status:n,identifier:o,message:i}):e})})})})}},{key:"getFileUploadIdentifiers",value:function(){return this.state.attachments.filter(function(e){return e.identifier}).map(function(e){return e.identifier})}},{key:"submit",value:function(e){var t=this.getFileUploadIdentifiers();return e.fileUploadIdentifiers=t.length?t:null,this.props.onSubmit(e)}},{key:"canSubmit",value:function(){var e=this.props,t=e.disabled,n=e.formOptions,r=e.transaction;return!(null===this.formOptions.saveMethod||!this.formRef||t||this.state.saving||this.state.saveDisabled||r.readOnlyBecauseClosedFiscalYear||this.formOptions.saveButtonDisabled(n))}},{key:"handleSubmit",value:function(e){var t=this;e&&(e.preventDefault(),e.stopPropagation()),this.canSubmit()&&(this.setState({saving:!0,failed:!1,saved:!1}),this.formRef.validate().then(function(e){return!!e&&t.formRef.getData()}).then(function(e){!1!==e?(e.keptAttachments=t.state.oldAttachments.map(function(e){return e.xid}),t[t.formOptions.saveMethod](e).then(function(){return t.setState({saving:!1,saved:!0})}).catch(function(){return t.setState({saving:!1,failed:!0})})):t.setState({saving:!1,failed:!0})}).catch(function(e){t.setState({saving:!1,failed:!0}),H.captureError(e,{code:g.gV})}))}},{key:"pushError",value:function(e){var t=this;return new Promise(function(n){return t.setState({errors:[].concat(X(t.state.errors),[{message:e,id:Math.random().toString()}])},n)})}},{key:"removeError",value:function(e){this.setState({errors:this.state.errors.filter(function(t){return t.id!==e})})}},{key:"removeAttachment",value:function(e){this.setState({removeAttachment:e})}},{key:"confirmRemove",value:function(){var e=this,t=this.state.removeAttachment;this.setState({removeAttachment:null,oldAttachments:this.state.oldAttachments.filter(function(e){return e.xid!==t})},function(){return e.props.onRemoveAttachment(t)})}},{key:"renameAttachment",value:function(e,t){var n=this;return this.requestHelper.registerRequest((0,c.lU)({id:e,fileName:t})).then(function(){n.setState({oldAttachments:n.state.oldAttachments.map(function(n){return n.xid==e?new m.z({xid:n.xid,fileName:t,contentType:n.contentType,emailAvailable:n.emailAvailable,emailOnly:n.emailOnly}):n})})})}},{key:"pipeUpload",value:function(e){var t=this,n=Array.from(e).slice(0,3-(this.state.attachments.filter(function(e){return 3===e.status}).length+this.state.oldAttachments.length));n.length&&(0,y.Cr)(function(e){return e<n.length?t.addAttachment(n[e]):null})}},{key:"renderSuggestionTransactionDetails",value:function(e){if(e){var t=e.integrationSystem,n=e.suggestionType;if(null!==t||null!==n)return $("p",{className:"my-3 font-bold well well__sm"},void 0,t&&"".concat(I18n.translate("work.suggestionsystem.".concat(t)),", "),n&&I18n.translate("work.suggestiontype.".concat(n)))}}},{key:"renderForm",value:function(e,t,n,r){var o=this,i=this.props,l=i.showEntries,c=i.formOptions,u=i.disabled,d=i.transaction,p=i.companySelection,m=i.companySelectionXid,v=i.onCancel,h=i.onPreviewAttachment,g=this.props.type===ee;return $("div",{className:"sub-menu"},void 0,$("div",{className:"d-flex justify-content-between"},void 0,$("h2",{className:"work-page__form-title"},void 0,$("span",{},void 0,g?I18n.translate(u||w.Cw.includes(d.transactionTypeId)?"work.edit.viewexisting":"work.edit.editexisting"):I18n.translate("work.edit.createnew")," "),$("span",{},void 0,this.formOptions.title(this.props.transaction,{magicItems:this.props.magicItems}))),g&&d.serialNo&&$("div",{className:"font-bold work-page__serialNo"}
1,void 0,d.serialNo)),this.renderSuggestionTransactionDetails(d.suggestionTransactionDetails),this.state.errors.map(function(e){return $("h5",{className:"alert alert-danger",onClick:function(){return o.removeError(e.id)}},e.id,e.message,$("i",{className:"close"}))}),$("form",{className:"ManualForm"===this.formOptions.componentName?"transaction-form--manual":void 0,onKeyDown:(0,y._s)(this.methods,7,function(e){"Enter"!==e.key&&13!==(e.which||e.keyCode)||("TEXTAREA"===(e.target.tagName||"").toUpperCase()||e.target.isContentEditable||e.target.getAttribute&&"true"===e.target.getAttribute("aria-expanded")||o.canSubmit()&&(e.preventDefault(),o.handleSubmit(e)))})},void 0,$(B.A,{componentName:this.formOptions.componentName,moduleProvider:this.formOptions.moduleProvider,formOptions:U(U({},c),{},{magicItems:this.props.magicItems}),modeEdit:g,showEntries:l,disabled:u,transaction:d,typeId:d.transactionTypeId,companySelection:p,companySelectionXid:m,options:this.formOptions,componentRef:(0,y._s)(this.methods,8,function(e){o.formRef=e}),onDisableSave:(0,y._s)(this.methods,9,function(e){return o.setState({saveDisabled:e})})})),$(s(),{},void 0,e&&$(a(),{xs:4,className:"m-t-20"},void 0,$(F,{newAttachments:this.state.attachments,attachmentsInCreate:d.attachmentsInCreate,attachments:r?this.state.oldAttachments:void 0,showDropzone:t&&!u&&null!==this.formOptions.saveMethod&&!d.readOnlyBecauseClosedFiscalYear,editable:n&&!u&&!d.readOnlyBecauseClosedFiscalYear,errorStatus:1,busyStatus:2,successStatus:3,onFileAdded:(0,y._s)(this.methods,4,this.addAttachment.bind(this)),onRemoveNewAttachment:(0,y._s)(this.methods,5,function(e){return o.setState({attachments:o.state.attachments.filter(function(t){return t.id!==e})})}),onRemoveAttachment:(0,y._s)(this.methods,6,this.removeAttachment.bind(this)),onRenameAttachment:this.renameAttachment.bind(this),disabled:this.state.attachments.filter(function(e){return 3===e.status}).length+this.state.oldAttachments.length>=b.qQ,onPreviewAttachment:h,sourceDocumentLineId:d.sourceDocumentLineId,onDrop:this.props.onDrop})),d.bankPostings.length?$(a(),{xs:4,className:"m-t-20"},void 0,$("label",{className:"control-label"},void 0,I18n.translate("work.edit.matchedinbank")),d.bankPostings.map(function(e){return $("div",{className:"card card-secondary card-sm mb-1"},e.id,$("div",{className:"card-body"},void 0,e.accountName," ",e.bankDate," ",e.bankAmount," ",e.text," ",e.userNote))})):null),$("div",{style:{display:"flex",justifyContent:"center",flexDirection:"column",rowGap:"20px"}},void 0,$("div",{className:"mt-2 d-flex align-items-center justify-content-center"},void 0,$("button",{type:"button",className:"btn btn-default btn-block",style:{maxWidth:200},onClick:v},void 0,I18n.translate("button.cancel")),!u&&this.formOptions.saveMethod?$(f.A,{className:"btn-block my-0 ml-2",style:{maxWidth:200},defaultMessage:this.props.saveBtnText,busy:this.state.saving,saved:this.state.saved,failed:this.state.failed,disabled:this.formOptions.saveButtonDisabled(c)||this.state.saveDisabled||d.readOnlyBecauseClosedFiscalYear,onClick:this.handleSubmit.bind(this),title:d.suggestionTransactionDetails?I18n.translate("button.approvebook"):void 0}):null),d.readOnlyBecauseClosedFiscalYear?$("div",{className:"alert alert-danger"},void 0,I18n.translate("work.edit.in.closed.fiscal.year")):null))}},{key:"render",value:function(){var e=this;return $("div",{className:"transaction-form"},void 0,$("button",{type:"button",className:"close",onClick:this.props.onCancel},void 0,$("span",{"aria-hidden":"true"},void 0,"×"),$("span",{className:"sr-only"},void 0,"Close")),null!==this.formOptions.saveMethod&&!this.props.disabled&&this.formOptions.attachmentsAllowed&&this.props.filesAdd&&$(p.B,{onFilesDrop:(0,y._s)(this.methods,3,this.pipeUpload.bind(this))},void 0,this.renderForm(this.formOptions.attachmentsAllowed,this.props.filesAdd,this.props.filesEdit,this.props.filesView))||this.renderForm(this.formOptions.attachmentsAllowed,this.props.filesAdd,this.props.filesEdit,this.props.filesView),$(d.A,{title:I18n.translate("work.attachment.remove.title"),show:null!==this.state.removeAttachment,btnClassName:"btn btn-danger",onHide:(0,y._s)(this.methods,1,function(){return e.setState({removeAttachment:null})}),onSubmit:(0,y._s)(this.methods,2,this.confirmRemove.bind(this))},void 0,I18n.translate("work.attachment.remove.explain",this.state.removeAttachment&&(this.props.transaction.attachments.find(function(t){return t.xid===e.state.removeAttachment})||{}).fileName)))}}])}(o.Component);Z(te,"defaultProps",{transaction:new v.A,type:2,disabled:!1,filesAdd:!1,filesEdit:!1,filesView:!1,showEntries:!1,onRemoveAttachment:function(){},onSubmit:function(){},onCancel:function(){},onDrop:function(){}})},3429(e,t,n){n.d(t,{R:()=>S});var r,o=n(5556),i=n.n(o),a=n(91184),l=n(3373),s=n(21886),c=n(96540);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?u(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w(r.key),r)}}function v(e,t,n){return t=y(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function g(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}var S=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return g(e=v(this,t,[].concat(r)),"inp",null),g(e,"methods",{}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(t,e),n=t,r=[{key:"select",value:function(){this.inp&&this.inp.select()}},{key:"render",value:function(){var e,t=this;if(this.props.customLabel)e=this.props.customLabel;else if(this.props.label){var n=I18n.translate(this.props.tooltip);e=p("label",{className:"control-label",htmlFor:this.props.id},void 0,I18n.translate(this.props.label),!!n&&p(a.$,{icon:"fa fa-info-circle space-left",tooltip:n}))}return this.renderWithValidation(c.createElement("textarea",{id:this.props.id,key:"input",ref:(0,l._s)(this.methods,1,function(e){t.inp=e}),className:"form-control",style:this.props.style,value:this.state.value,placeholder:this.props.placeholder,onChange:(0,l._s)(this.methods,2,function(e){return t.handleChange(e.target.value)}),onBlur:this.props.onBlur,onKeyPress:this.props.onKeyPress,autoFocus:this.props.autoFocus,disabled:this.props.disabled,rows:this.props.rows,cols:this.props.cols,maxLength:this.props.maxLength}),this.props.inputWrapper,this.props.labelWrapper(e))}}],r&&m(n.prototype,r),o&&m(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(s.c);g(S,"propTypes",{id:i().string,label:i().string,customLabel:i().element,tooltip:i().string,placeholder:i().string,disabled:i().bool,value:i().string,autoFocus:i().bool,validators:i().arrayOf(i().func),onKeyPress:i().func,inputWrapper:i().func,labelWrapper:i().func,onChange:i().func,onBlur:i().func,rows:i().number,cols:i().number,maxLength:i().number}),g(S,"defaultProps",d(d({},s.c.defaultProps),{},{onChange:function(){},autoFocus:!1,validators:[],inputWrapper:function(e){return e},labelWrapper:function(e){return e}}))},32322(e,t,n){var r,o=n(96540),i=n(61225),a=n(17375),l=n(20219),s=n(16093),c=n(69843),u=n(83735),d=n(48700),f=n(22671),p={};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?h(Object(n),!0).forEach(function(t){b(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function b(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=m(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==m(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.r(p),n.d(p,{clearAllSuggestedTransactions:()=>u.nj,createTransaction:()=>u.zS,fetchErrors:()=>u.GS,fetchMagicMenuItems:()=>u.F$,fetchTransactionDetails:()=>u.T7,fetchTransactions:()=>u.mh,hideTransactionError:()=>u.b8,loadData:()=>u.Ze,removeTransaction:()=>u.z8,removeTransactions:()=>u._U,resetTransaction:()=>u.Yz,showTransactionError:()=>u.SV,storeFiltersPreferences:()=>u.Tr,takeOverTransaction:()=>u.Ix,updateErrorFilterPreference:()=>u.VQ,updateTransaction:()=>u.AF,updateTransactionFilters:()=>u.Bp});const S=(0,i.Ng)(function(e){return{companyStore:e.companies,transactionStore:e.transactions,defaultStore:e.defaults}},function(e){return{actions:(0,a.zH)(y(y({},p),{},{showAttachmanetPreview:c.ST,showArchiveFilePreview:c.uk}),e)}})(function(e){var t=e.companyStore,n=e.transactionStore,r=e.defaultStore,i=e.onCancel,a=e.actions,c=e.transaction,u=new d.g,p=t.currentCompany,m=t.finalize,h=t.current,b=t.currentXid,w=p.isReadOnlyUnlessFullAccess()||null!==m.finalizeYearId,S=g((0,o.useState)({}),2),k=S[0],O=S[1];(0,o.useEffect)(function(){O(y(y({},r),{},{currentlySelectedYear:parseInt(n.fiscalYear)||n.filterFiscalYearOptions.length&&parseInt(n.filterFiscalYearOptions[0].value)||null}))},[]);return v("div",{className:"transaction-custom-form-wrapper"},void 0,v(f.H7,{type:f.gC,disabled:w,companySelection:h,companySelectionXid:b,magicItems:n.magicItems,filesAdd:p.filesAdd,filesEdit:p.filesEdit,filesView:p.filesView,showEntries:!0,formOptions:k,transaction:c,onRemoveAttachment:function(e){return function(e,t){u.registerRequest((0,s.NT)(e,t))}(c.sourceDocumentLineId,e)},onSubmit:function(e){return e?new Promise(function(n,r){a.updateTransaction(e,t.currentXid).then(n).catch(function(e){412===e.status&&a.showTransactionError(e.response.body),r()}),i()}):Promise.resolve()},onCancel:i,onPreviewAttachment:function(e,n){a.showArchiveFilePreview(e,n,t.currentXid)},onDrop:function(e){"inboxFile"===e.type&&function(e,n){u.registerRequest((0,s.W9)({sourceId:e.sourceDocumentLineId,sourceVersion:e.sourceDocumentLineVersion,companyXid:t.currentXid,fileXid:n}))}(c,e.item.id),"bankFile"===e.type&&function(e,n){var r=n.bankAccountXid,o=n.bankPostingId;u.registerRequest((0,l.ny)({companyXid:t.currentXid,bankAccountXid:r,bankPostingIds:[o],bookTransactions:[{sourceIdType:e.sourceIdType,sourceXid:e.sourceXid}]}))}(c,{bankPostingId:e.item.id,bankAccountXid:e.item.bankaccountxid})}},"transaction"))});n.d(t,["A",0,S])},52356(e,t,n){var r,o=n(96540),i=n(61225),a=n(14670),l=n(59499),s=n(96540);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(null,arguments)}function d(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function p(e,t,n){return t=v(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}
1function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==c(t)?t:t+""}var g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return y(e=p(this,t,[].concat(r)),"_isMounted",!1),y(e,"state",{Form:null,crashed:!1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this;this.props.moduleProvider().then(function(t){e._isMounted&&e.setState({Form:t[e.props.componentName]})}).catch(function(t){l.captureError(t,{componentName:e.props.componentName,code:a.V6}),e._isMounted&&e.setState({crashed:!0})}),this._isMounted=!0}},{key:"componentDidCatch",value:function(e){l.captureError(e,{componentName:this.props.componentName}),this.setState({crashed:!0})}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"render",value:function(){if(this.state.crashed)return d("div",{},void 0,d("h4",{className:"text-center text-danger"},void 0,d("i",{className:"fa fa-warning fa-lg mr-2","aria-hidden":"true"}),this.props.status.online?I18n.translate("error.ui"):I18n.translate("error.connection.lost")));var e=this.state.Form;return e?s.createElement(e,u({ref:this.props.componentRef},this.props.formOptions,{typeId:this.props.typeId,modeEdit:this.props.modeEdit,showEntries:this.props.showEntries,disabled:this.props.disabled,transaction:this.props.transaction,companySelection:this.props.companySelection,companySelectionXid:this.props.companySelectionXid,options:this.props.options,onDisableSave:this.props.onDisableSave})):d("h5",{className:"text-center"},void 0,I18n.translate("work.edit.working"))}}])&&f(n.prototype,r),o&&f(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(o.PureComponent);const w=(0,i.Ng)(function(e){return{status:e.status}})(g);n.d(t,["A",0,w])},18098(e,t,n){n.d(t,{o:()=>I});var r,o=n(5556),i=n.n(o),a=n(59858),l=n.n(a),s=n(13918),c=n(86882),u=n(83009),d=n(96540);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){x(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function v(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function g(e,t,n){return t=O(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(w=function(){return!!e})()}function S(e,t,n,r){var o=k(O(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=O(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},k.apply(null,arguments)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}
1function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function x(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:t+""}var I=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),x(n=g(this,t,[e]),"state",{focused:null,focusedChild:null,maxHeight:0}),x(n,"listRef",d.createRef()),n.handleKeyDown=n.handleKeyDown.bind(n),n.toggle=n.toggle.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(t,e),n=t,r=[{key:"onLanguageChange",value:function(){S(t,"onLanguageChange",this,3)([]),this.handleKeyDown=this.handleKeyDown.bind(this)}},{key:"componentDidMount",value:function(){var e=this;S(t,"componentDidMount",this,3)([]),this.keyBoardHandler=function(t){-1!==["INPUT","TEXTAREA","SELECT"].indexOf(t.target.tagName.toUpperCase())||t.target.isContentEditable||"+"!==t.key&&"NumpadAdd"!==t.code||t.metaKey||t.ctrlKey||t.altKey||t.shiftKey||e.props.withoutPlus||(t.preventDefault(),e.toggle())},window.addEventListener("keydown",this.keyBoardHandler)}},{key:"componentDidUpdate",value:function(){this.listRef.current&&this.state.maxHeight!==this.listRef.current.clientHeight&&this.setState({maxHeight:this.listRef.current.clientHeight})}},{key:"componentWillUnmount",value:function(){S(t,"componentWillUnmount",this,3)([]),window.removeEventListener("keydown",this.keyBoardHandler),this.unRegisterEvents()}},{key:"toggle",value:function(){this.state.show?this.unRegisterEvents():this.registerEvents(),this.setState({show:!this.state.show,focused:null,focusedChild:null})}},{key:"registerEvents",value:function(){window.addEventListener("keydown",this.handleKeyDown)}},{key:"unRegisterEvents",value:function(){window.removeEventListener("keydown",this.handleKeyDown)}},{key:"scrollIntoView",value:function(){var e=document.getElementById("".concat(this.state.focused,"-tr-item")),t=document.getElementById("".concat(this.state.focusedChild,"-tr-sub-item"));e&&e.scrollIntoView(!1),t&&t.scrollIntoView(!1)}},{key:"handleKeyDown",value:function(e){var n=this,r=this.props,o=r.magicItems,i=r.excludeTypes,a=this.state,l=a.focused,s=a.focusedChild,c=t.getMenu(o,i),u=l?c.find(function(e){return e.id===l}):null,d=c.findIndex(function(e){return e.id===l}),f=u&&u.children?u.children.findIndex(function(e){return e.id===s}):-1,p=null;switch(e.which||e.keyCode){case 37:s&&(p={focusedChild:null});break;case 38:s&&-1!==f?p={focusedChild:u.children[Math.max(0,f-1)].id}:this.state.focused&&(p={focused:c[Math.max(0,d-1)].id});break;case 39:!s&&u&&u.children&&u.children.length&&(p={focusedChild:u.children[0].id});break;case 40:p=s&&-1!==f?{focusedChild:u.children[Math.min(u.children.length-1,f+1)].id}:this.state.focused?{focused:c[Math.min(c.length-1,d+1)].id}:{focused:c[0].id};break;case 13:case 32:this.state.focusedChild?(this.props.onClick(u.children.find(function(e){return e.id===n.state.focusedChild}).value),e.preventDefault(),this.toggle()):this.state.focused&&u&&u.value&&(this.props.onClick(u.value),e.preventDefault(),this.toggle());break;default:var m=String.fromCharCode(e.which||e.keyCode).toUpperCase();if(this.state.focusedChild){var v=u.children.find(function(e){return e.shortcut===m});v&&(this.props.onClick(v.value),e.preventDefault(),this.toggle())}else{var h=c.find(function(e){return e.shortcut===m});h&&(h.children?p={focused:h.id,focusedChild:h.children&&h.children.length?h.children[0].id:null}:(this.props.onClick(h.value),e.preventDefault(),this.toggle()))}}p&&(e.preventDefault(),this.setState(p,function(){return n.scrollIntoView()}))}},{key:"render",value:function(){var e=this,n=this.props,r=n.magicItems,o=n.excludeTypes,i=n.footer,a=this.state,s=a.show,u=a.focused,f=a.focusedChild,p=a.maxHeight,m=t.getMenu(r,o),v=u?m.find(function(e){return e.id===u}):null;return y(d.Fragment,{},void 0,y("button",{type:"button",className:this.props.className,onClick:this.toggle},this.state.key,this.props.children||y(c.A,{})),y(l(),{show:s,onHide:this.toggle,autoFocus:!1,restoreFocus:!1},void 0,y(l().Header,{className:"transaction-menu__header",closeButton:!0},void 0,y(l().Title,{},void 0,I18n.translate("work.edit.add.new"))),y(l().Body,{className:"transaction-menu"},void 0,d.createElement("ul",{ref:this.listRef},m.map(function(t){return y("li",{},t.id,y("button",{id:"".concat(t.id,"-tr-item"),className:"btn btn-default ".concat(u===t.id?"highlight":""),onFocus:function(){return e.setState({focused:t.id,focusedChild:null},function(){return e.scrollIntoView()})},onMouseMove:function(){return e.state.focused!==t.id&&e.setState({focused:t.id,focusedChild:null})},onClick:function(){t.value&&(e.props.onClick(t.value),e.toggle(
1))}},void 0,y("div",{},void 0,t.title," ",y("span",{className:"transaction-menu__shortcut"},void 0,t.shortcut)),t.children&&t.children.length?y("i",{className:"fa fa-chevron-right fa-fw","aria-hidden":"true"}):null))})),y("ul",{style:{maxHeight:p}},void 0,((v||{}).children||[]).map(function(t){return y("li",{},t.id,y("button",{id:"".concat(t.id,"-tr-sub-item"),className:"btn btn-default ".concat(f===t.id?"highlight":""),onFocus:function(){return e.setState({focusedChild:t.id},function(){return e.scrollIntoView()})},onMouseMove:function(){return e.state.focusedChild!==t.id&&e.setState({focusedChild:t.id})},onClick:function(){t.value&&(e.props.onClick(t.value),e.toggle())}},void 0,y("div",{},void 0,t.title," ",y("span",{className:"transaction-menu__shortcut"},void 0,t.shortcut))))}))),i?y(l().Footer,{className:"transaction-menu__footer"},void 0,y("div",{},void 0,i)):null))}}],o=[{key:"getSubLevelTranslation",value:function(e){return I18n.translate("work.edit.newtransactionitem.".concat(e,".text"))}},{key:"getTopLevelTranslation",value:function(e){return I18n.translate("work.edit.newtransactionmenu.".concat(e,".text"))}},{key:"getShortcutTranslation",value:function(e){return I18n.translate("work.edit.newtransactionitem.".concat(e,".shortcut")).toUpperCase()}},{key:"getMenuShortcutTranslation",value:function(e){return I18n.translate("work.edit.newtransactionmenu.".concat(e,".shortcut")).toUpperCase()}},{key:"getMenu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[e.length?{id:"13",title:I18n.translate("work.edit.newtransactionmenu.mytypes"),shortcut:null,children:e.map(function(e,t){return{id:"13.".concat(t+1),title:e.name,shortcut:null,value:e.xid}})}:null,{id:"7",title:t.getSubLevelTranslation("other.manual"),shortcut:t.getShortcutTranslation("other.manual"),value:u.Ub},{id:"14",title:t.getSubLevelTranslation("other.supplierinvoice"),shortcut:t.getShortcutTranslation("other.supplierinvoice"),value:u.i1},{id:"11",title:t.getTopLevelTranslation("sales"),shortcut:t.getMenuShortcutTranslation("sales"),children:[{id:"11.1",title:t.getSubLevelTranslation("sales.revenue"),shortcut:t.getShortcutTranslation("sales.revenue"),value:u.Ij},{id:"11.2",title:t.getSubLevelTranslation("sales.payment"),shortcut:t.getShortcutTranslation("sales.payment"),value:u.uZ}]},{id:"1",title:t.getTopLevelTranslation("expenses"),shortcut:t.getMenuShortcutTranslation("expenses"),children:[{id:"1.1",title:t.getSubLevelTranslation("expenses.bankinterest"),shortcut:t.getShortcutTranslation("expenses.bankinterest"),value:u.SZ},{id:"1.2",title:t.getSubLevelTranslation("expenses.cashinterestreceived"),shortcut:t.getShortcutTranslation("expenses.cashinterestreceived"),value:u.Tn},{id:"1.3",title:t.getSubLevelTranslation("expenses.depositoryexpense"),shortcut:t.getShortcutTranslation("expenses.depositoryexpense"),value:u.td},{id:"1.4",title:t.getSubLevelTranslation("other.transfercash"),shortcut:t.getShortcutTranslation("other.transfercash"),value:u.JG}].concat(v((0,u.wY)().map(function(e,t){return{id:"1.".concat(t+5),title:e.text,shortcut:e.shortcut,value:e.id}}))).sort(function(e,t){return e.title.toLowerCase()>t.title.toLowerCase()?1:-1})},{id:"12",title:t.getTopLevelTranslation("payroll"),shortcut:t.getMenuShortcutTranslation("payroll"),children:[{id:"12.3",title:t.getSubLevelTranslation("payroll.taxes"),shortcut:t.getShortcutTranslation("payroll.taxes"),value:u.Es},{id:"12.4",title:t.getSubLevelTranslation("payroll.atp"),shortcut:t.getShortcutTranslation("payroll.atp"),value:u.Aw},{id:"12.5",title:t.getSubLevelTranslation("payroll.pension"),shortcut:t.getShortcutTranslation("payroll.pension"),value:u.P8}]},{id:"10",title:t.getTopLevelTranslation("privatemoney"),shortcut:t.getMenuShortcutTranslation("privatemoney"),children:[{id:"10.1",title:t.getSubLevelTranslation("privatemoney.to"),shortcut:t.getShortcutTranslation("privatemoney.to"),value:u.Ts},{id:"10.2",title:t.getSubLevelTranslation("privatemoney.from"),shortcut:t.getShortcutTranslation("privatemoney.from"),value:u.Oc},{id:"10.3",title:t.getSubLevelTranslation("group.contribution"),shortcut:t.getShortcutTranslation("group.contribution"),value:u.Gs}]},{id:"2",title:t.getTopLevelTranslation("stocks"),shortcut:t.getMenuShortcutTranslation("stocks"),children:[{id:"2.1",title:t.getSubLevelTranslation("stocks.buy"),shortcut:t.getShortcutTranslation("stocks.buy"),value:u.TP},{id:"2.2",title:t.getSubLevelTranslation("stocks.sell"),shortcut:t.getShortcutTranslation("stocks.sell"),value:u.VA},{id:"2.3",title:t.getSubLevelTranslation("stocks.dividend"),shortcut:t.getShortcutTranslation("stocks.dividend"),value:u.VN},{id:"2.4",title:t.getSubLevelTranslation("stocks.split"),shortcut:t.getShortcutTranslation("stocks.split"),value:u.de},{id:"2.5",title:t.getSubLevelTranslation("stocks.transfer"),shortcut:t.getShortcutTranslation("stocks.transfer"),value:u.K6}]},{id:"3",title:t.getTopLevelTranslation("bonds"),shortcut:t.getMenuShortcutTranslation("bonds"),children:[{id:"3.1",title:t.getSubLevelTranslation("bonds.buy"),shortcut:t.getShortcutTranslation("bonds.buy"),value:u.In},{id:"3.2",title:t.getSubLevelTranslation("bonds.sell"),shortcut:t.getShortcutTranslation("bonds.sell"),value:u.Gz},{id:"3.3",title:t.getSubLevelTranslation("bonds.interest"),shortcut:t.getShortcutTranslation("bonds.interest"),value:u.CQ},{id:"3.4",title:t.getSubLevelTranslation("bonds.earned"),shortcut:t.getShortcutTranslation("bonds.earned"),value:u.oS},{id:"3.5",title:t.getSubLevelTranslation("bonds.extract"),shortcut:t.getShortcutTranslation("bonds.extract"),value:u.pr}]},{id:"4",title:t.getTopLevelTranslation("pe"),shortcut:t.getMenuShortcutTranslation("pe"),children:[{id:"4.1",title:t.getSubLevelTranslation("pe.buy"),shortcut:t.getShortcutTranslation("pe.buy"),value:u.qr},{id:"4.2",title:t.getSubLevelTranslation("pe.sell"),shortcut:t.getShortcutTranslation("pe.sell"),value:u.Mx},{id:"4.3",title:t.getSubLevelTranslation("pe.yearend"),shortcut:t.getShortcutTranslation("pe.yearend"),value:u.Pu},{id:"4.5",title:t.getSubLevelTranslation("pe.setvalue"),shortcut:t.getShortcutTranslation("pe.setvalue"),value:u.I7}
1,{id:"4.4",title:t.getSubLevelTranslation("pe.dividend"),shortcut:t.getShortcutTranslation("pe.dividend"),value:u.X},{id:"4.6",title:t.getSubLevelTranslation("pe.revaluation"),shortcut:t.getShortcutTranslation("pe.revaluation"),value:u.Fl}]},{id:"6",title:t.getTopLevelTranslation("period"),shortcut:t.getMenuShortcutTranslation("period"),children:[{id:"6.1",title:t.getSubLevelTranslation("period.valueregulation"),shortcut:t.getShortcutTranslation("period.valueregulation"),value:u.WY},{id:"6.2",title:t.getSubLevelTranslation("period.currencyregulation"),shortcut:t.getShortcutTranslation("period.currencyregulation"),value:u.Wy},{id:"6.3",title:t.getSubLevelTranslation("period.distribution"),shortcut:t.getShortcutTranslation("period.distribution"),value:u.CG},{id:"6.4",title:t.getSubLevelTranslation("period.vatsettlement"),shortcut:t.getShortcutTranslation("period.vatsettlement"),value:u.Bm},{id:"6.6",title:t.getSubLevelTranslation("period.foundationdistribution"),shortcut:t.getShortcutTranslation("period.foundationdistribution"),value:u.Iz},{id:"6.7",title:t.getSubLevelTranslation("period.singlepersondistribution"),shortcut:t.getShortcutTranslation("period.singlepersondistribution"),value:u.LJ}]},{id:"8",title:t.getTopLevelTranslation("tax"),shortcut:t.getMenuShortcutTranslation("tax"),children:[{id:"8.1",title:t.getSubLevelTranslation("tax.year"),shortcut:t.getShortcutTranslation("tax.year"),value:u.Xv},{id:"8.2",title:t.getSubLevelTranslation("tax.paid"),shortcut:t.getShortcutTranslation("tax.paid"),value:u.aL},{id:"8.3",title:t.getSubLevelTranslation("tax.fromsubsidiary"),shortcut:t.getShortcutTranslation("tax.fromsubsidiary"),value:u.Rs}]},{id:"9",title:t.getTopLevelTranslation("ownerdividend"),shortcut:t.getMenuShortcutTranslation("ownerdividend"),children:[{id:"9.1",title:t.getSubLevelTranslation("ownerdividend.ownerdividend"),shortcut:t.getShortcutTranslation("ownerdividend.ownerdividend"),value:u.rh},{id:"9.2",title:t.getSubLevelTranslation("ownerdividend.ownerdividendpaid"),shortcut:t.getShortcutTranslation("ownerdividend.ownerdividendpaid"),value:u.mz},{id:"9.3",title:t.getSubLevelTranslation("ownerdividend.ownerdividendtaxpaid"),shortcut:t.getShortcutTranslation("ownerdividend.ownerdividendtaxpaid"),value:u.ac}]},{id:"15",title:t.getTopLevelTranslation("asset"),shortcut:t.getMenuShortcutTranslation("asset"),children:[{id:"15.1",title:t.getSubLevelTranslation("asset.buy"),shortcut:t.getShortcutTranslation("asset.buy"),value:u.fO},{id:"15.3",title:t.getSubLevelTranslation("asset.sell"),shortcut:t.getShortcutTranslation("asset.sell"),value:u.zO},{id:"15.2",title:t.getSubLevelTranslation("asset.depreciation"),shortcut:t.getShortcutTranslation("asset.depreciation"),value:u.rH},{id:"15.4",title:t.getSubLevelTranslation("asset.dailyvaluerevaluation"),shortcut:t.getShortcutTranslation("asset.dailyvaluerevaluation"),value:u.YP},{id:"15.5",title:t.getSubLevelTranslation("asset.tax"),shortcut:t.getShortcutTranslation("asset.tax"),value:u.of}]}].map(function(e){return e&&e.children?m(m({},e),{},{children:e.children.filter(function(e){return!n.includes(String(e.value))})}):e}).filter(function(e){return e&&(!e.children||e.children.length)})}},{key:"underscoreChar",value:function(e,t){var n=new RegExp("(".concat(t,")"),"i").exec(e);return n&&n[1]?e.replace(new RegExp(t,"i"),"<u>".concat(n[1],"</u>")):"".concat(e).concat(t?"(<u>".concat(t,"</u>)"):"")}}],r&&b(n.prototype,r),o&&b(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(s.b);x(I,"propTypes",{magicItems:i().arrayOf(i().shape({name:i().string})),excludeTypes:i().arrayOf(i().string),withoutPlus:i().bool,className:i().string,footer:i().any,onClick:i().func}),x(I,"defaultProps",{magicItems:[],className:"table-st__but",onClick:function(){}})},84262(e,t,n){n.d(t,{z:()=>H});var r,o,i=n(5556),a=n.n(i),l=n(96540),s=n(35766),c=n.n(s),u=n(22495),d=n.n(u),f=n(54625);function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(null,arguments)}function m(e){return l.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 36 32"},e),r||(r=l.createElement("path",{fill:"#40b452",d:"M11.294 24.471l5.647-5.534a17.658 17.658 0 00-1.882-.113C10.033 18.824 0 21.346 0 26.353v3.765h16.941l-5.647-5.647zm3.765-9.412c4.16 0 7.529-3.369 7.529-7.529S19.219.001 15.059.001 7.53 3.37 7.53 7.53s3.369 7.529 7.529 7.529z"})),o||(o=l.createElement("path",{fill:"#40b452",d:"M23.473 31.059l-6.532-6.588 2.635-2.654 3.896 3.915L33.128 16l2.635 2.654-12.292 12.405z"})))}n.p;var v,h=n(13545),y=n(16093),b=n(13918),g=n(16001),w=n(91184),S=n(27545),k=n(6150),O=n(74218),N=n(48700),x=n(3373),P=n(83009),I=n(51470),A=n(22671);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function j(e,t,n,r){v||(v="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:v,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,z(r.key),r)}}function _(e,t,n){return t=E(t),function(e,t){if(t&&("object"==C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(R=function(){return!!e})()}function T(){return T="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=E(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},T.apply(null,arguments)}
1function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}function F(e,t,n){return(t=z(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){var t=function(e,t){if("object"!=C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==C(t)?t:t+""}function B(e){return e.transactionTypeId===P.io||"OUTSIDE_BOOKKEEPING"===e.transactionType}var H=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),F(n=_(this,t,[e]),"requestHelper",new N.g),F(n,"state",{remove:!1,takeOver:!1,draggingOver:!1}),F(n,"methods",{}),n.handleDrop=n.handleDrop.bind(n),n.openAttachment=n.openAttachment.bind(n),n.isChecked=n.isChecked.bind(n),n.loadDetails=function(){return!n.props.loaded&&!n.props.loading&&n.props.onLoadDetails(n.props.transaction)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){var e,n,r,o,i;(e=t,n="componentDidMount",r=this,i=T(E(1&(o=3)?e.prototype:e),n,r),2&o&&"function"==typeof i?function(e){return i.apply(r,e)}:i)([]),!this.props.shouldCheckNavigation||this.props.hash!==String(this.props.transaction.sourceDocumentLineId)||this.props.open||B(this.props.transaction)||this.props.onOpen(this.props.transaction)}},{key:"componentDidUpdate",value:function(e){if(!this.props.shouldCheckNavigation||this.props.hash!==String(this.props.transaction.sourceDocumentLineId)||this.props.open||B(this.props.transaction)||this.props.onOpen(this.props.transaction),!this.props.loaded&&e.loaded&&this.props.open&&!this.props.loading&&this.props.onOpen(this.props.transaction),this.props.loaded&&!e.loaded){var t=document.getElementById(this.props.transaction.sourceDocumentLineId);t&&t.scrollIntoView()}}},{key:"toggle",value:function(){this.props.open?this.props.onClose(this.props.transaction):this.props.onOpen(this.props.transaction)}},{key:"openAttachment",value:function(e,t,n){this.props.onPreviewAttachment(this.props.transaction,e,t,n)}},{key:"handleDrop",value:function(e){"inboxFile"===e.type&&this.props.onUploadAttachment(this.props.transaction,e.item.id,e.item.keepInInbox),"bankFile"===e.type&&this.props.onBankCompare(this.props.transaction,{bankPostingId:e.item.id,bankAccountXid:e.item.bankaccountxid}),this.setState({draggingOver:!1})}},{key:"handleCheckWhetherTransactionIsDeletable",value:function(e){var t=this;this.setState({checkingWhetherCanDelete:!0}),this.requestHelper.registerRequest((0,y.YW)(e,this.props.companySelectionXid)).then(function(e){t.setState({canDelete:e.body.canDelete,explainText:e.body.explainText})}).finally(function(){t.setState({checkingWhetherCanDelete:!1})})}},{key:"isChecked",value:function(e){return this.props.selectedDeletedTransactions.some(function(t){return t.sourceDocumentLineId===e.sourceDocumentLineId})}},{key:"render",value:function(){var e,n=this,r=this.props.transaction,o=(0,x._s)(this.methods,1,this.toggle.bind(this)),i=(0,x._s)(this.methods,5,function(){n.state.remove||n.handleCheckWhetherTransactionIsDeletable(r),n.setState({remove:!n.state.remove})}),a=(0,x._s)(this.methods,8,function(){return n.setState({takeOver:!n.state.takeOver})}),s=this.props.auditorTransactionsAllowed&&r.auditorTransaction,u=this.props.disabled&&!s||!this.props.disabled&&r.auditorTransaction,p=B(r),v=p?(0,x.ID)("/work/load-from-outside/".concat(null!==(e=r.sourceXid)&&void 0!==e?e:r.sourceDocumentLineId)):null;return this.props.open&&j("tr",{},void 0,j("td",{colSpan:"9",className:"transaction-form-wrapper"},void 0,this.props.loading&&j("h5",{className:"text-center"},void 0,I18n.translate("work.edit.working"))||j(A.H7,{type:A.gC,disabled:u,companySelection:this.props.companySelection,companySelectionXid:this.props.companySelectionXid,magicItems:this.props.magicItems,filesAdd:this.props.filesAdd,filesEdit:this.props.filesEdit,filesView:this.props.filesView,showEntries:this.props.showEntries,formOptions:this.props.formOptions,transaction:r,onRemoveAttachment:(0,x._s)(this.methods,7,function(e){return n.props.onRemoveAttachment(n.props.transaction.sourceDocumentLineId,e)}),onSubmit:this.props.onUpdate,onCancel:o,onPreviewAttachment:this.props.onPreviewAttachmentWithAttachmentId,onDrop:this.handleDrop.bind(this)},"transaction")))||j(l.Fragment,{},void 0,j(k.A,{as:"tr",accept:["inboxFile","bankFile"],id:r.sourceDocumentLineId,className:"transaction-row ".concat(r.auditorTransaction?"auditor-row":""),collect:t.handleCollect,drop:this.handleDrop,onClick:p?void 0:o},void 0,function(e){var t=e.isOver,s=e.canDrop;return j(l.Fragment,{},void 0,n.props.isDeleteMultiple?j("td",{onClick:function(e){return e.stopPropagation()}},void 0,j("button",{className:"custom-checkbox ".concat(n.isChecked(r)?"active":""),onClick:function(){return n.props.handleDelSelectTransactionChange(r,!n.isChecked(r))}}
1,void 0,j("i",{className:"fa fa-trash","aria-hidden":"true"}))):j("td",{className:"".concat(t?"table-st__highlight-col":""," ").concat(s?"table-st__drop-col":""),onMouseEnter:p?void 0:n.loadDetails},void 0,j(g.A,{attachments:r.attachments,onOpen:n.openAttachment})),j("td",{className:"no-wrap"},void 0,r.formattedDate),j("td",{align:"left",className:"no-wrap"},void 0,r.serialNo||""),j("td",{className:"no-wrap"},void 0,I18n.translate("ttype.".concat(r.transactionType))),j("td",{className:"no-wrap"},void 0,r.errorText&&j(w.$,{icon:"fa fa-warning fa-lg fa-fw mx-1 text-warning",tooltip:r.errorText}),r.notifyText&&j(w.$,{icon:"phi phi-pin phi-lg phi-fw mx-1",tooltip:r.notifyText})," ",r.auditorTransaction&&j(m,{className:"phi phi-accountant phi-lg phi-fw mx-1","aria-hidden":"true"})),j("td",{},void 0,r.title),j("td",{},void 0,r.detail),j("td",{}),j("td",{align:"right",onClick:function(e){return e.stopPropagation()}},void 0,j(c(),{id:"transaction-dropdown-".concat(r.sourceDocumentLineId),pullRight:!0,open:n.props.actionsMenuOpen,onToggle:function(e,t){"select"!==(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).source&&n.props.onActionsMenuToggle&&n.props.onActionsMenuToggle(e)},onClick:function(e){return e.stopPropagation()}},void 0,j(c().Toggle,{className:"btn-action__square",noCaret:!0},void 0,j(h.h,{className:"phi phi-1_6x","aria-label":"Actions"})),j(c().Menu,{},void 0,p?j(d(),{componentClass:f.Link,to:v,href:v},void 0,j("i",{className:"fa fa-pencil fa-fw mr-1","aria-hidden":"true"}),I18n.translate("work.edit.edit")):j(l.Fragment,{},void 0,!n.props.disabled&&r.auditorTransaction&&j(d(),{onSelect:a},void 0,j("i",{className:"fa fa-handshake-o mr-1","aria-hidden":"true"}),I18n.translate("work.edit.takeoverauditor.short")),j(d(),{onClick:o},void 0,j("i",{className:"fa fa-pencil fa-fw mr-1","aria-hidden":"true"}),I18n.translate("work.edit.edit")),j(d(),{href:(0,I.eRT)(r.sourceDocumentLineId,r.sourceDocumentLineVersion),rel:"noreferrer noopener",download:!0},void 0,j("i",{className:"fa fa-file-pdf-o fa-fw mr-1","aria-hidden":"true"}),I18n.translate("work.edit.details.as.pdf")),r.allowCopy&&!u&&!P.Cw.includes(r.transactionTypeId)&&j(d(),{onClick:function(){return n.props.onCopy(r)}},void 0,j("i",{className:"fa fa-copy fa-fw mr-1","aria-hidden":"true"}),I18n.translate("work.edit.copy")),j(d(),{onClick:function(){return n.props.onTransactionHistory(r)}},void 0,j("i",{className:"fa fa-history fa-fw mr-1","aria-hidden":"true"}),I18n.translate("work.edit.history")),u||P.Cw.includes(r.transactionTypeId)||j(d(),{onClick:i}
1,void 0,j("i",{className:"fa fa-trash fa-fw mr-1","aria-hidden":"true"}),I18n.translate("button.delete")))))))}),u||P.Cw.includes(r.transactionTypeId)||j(S.A,{show:this.state.remove,title:I18n.translate(this.state.canDelete||this.state.checkingWhetherCanDelete?"work.edit.delete.title":"work.edit.delete.nodelete.title"),submitBtnText:this.state.canDelete||this.state.checkingWhetherCanDelete?I18n.translate("work.edit.delete.confirm"):I18n.translate("ok"),btnClassName:this.state.canDelete||this.state.checkingWhetherCanDelete?"btn btn-danger":"btn btn-primary",onSubmit:(0,x._s)(this.methods,6,function(){return n.setState({remove:!1},function(){n.state.canDelete&&n.props.onRemove(n.props.transaction)})}),onHide:i,noCancelBtn:!this.state.canDelete&&!this.state.checkingWhetherCanDelete,disableSubmit:this.state.checkingWhetherCanDelete},void 0,j("p",{},void 0,I18n.translate(this.state.canDelete||this.state.checkingWhetherCanDelete?"work.edit.delete.question":"work.edit.delete.nodelete.body")),j("p",{},void 0,j("label",{className:"space-right"},void 0,I18n.translate("work.col.date")),j("span",{},void 0,r.formattedDate)),j("p",{},void 0,j("label",{className:"space-right"},void 0,I18n.translate("work.col.type")),j("span",{},void 0,I18n.translate("ttype.".concat(r.transactionType)))),j("p",{},void 0,j("label",{className:"space-right"},void 0,I18n.translate("work.col.title")),j("span",{},void 0,r.title)),!this.state.canDelete&&!this.state.checkingWhetherCanDelete&&j("p",{},void 0,this.state.explainText?this.state.explainText:I18n.translate("work.edit.delete.nodelete.title"))),!this.props.disabled&&r.auditorTransaction&&j(S.A,{show:this.state.takeOver,title:I18n.translate("work.edit.takeoverauditor.title"),submitBtnText:I18n.translate("work.edit.takeoverauditor.confirm"),onSubmit:(0,x._s)(this.methods,9,function(){return n.setState({takeOver:!1},function(){return n.props.onTakeOver(n.props.transaction)})}),onHide:a},void 0,j("p",{},void 0,I18n.translate("work.edit.takeoverauditor.question")),j("p",{},void 0,j("label",{className:"space-right"},void 0,I18n.translate("work.col.date")),j("span",{},void 0,r.formattedDate)),j("p",{},void 0,j("label",{className:"space-right"},void 0,I18n.translate("work.col.type")),j("span",{},void 0,I18n.translate("ttype.".concat(r.transactionType)))),j("p",{},void 0,j("label",{className:"space-right"},void 0,I18n.translate("work.col.title")),j("span",{},void 0,r.title))))}}],o=[{key:"handleCollect",value:function(e){return{canDrop:e.canDrop(),isOver:e.isOver()}}}],r&&D(n.prototype,r),o&&D(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(b.b);F(H,"propTypes",{open:a().bool,loading:a().bool,loaded:a().bool,disabled:a().bool,auditorTransactionsAllowed:a().bool,hash:a().string,companySelection:a().number.isRequired,companySelectionXid:a().number.isRequired,transaction:a().instanceOf(O.A).isRequired,formOptions:a().object,filesAdd:a().bool,filesEdit:a().bool,filesView:a().bool,showEntries:a().bool,shouldCheckNavigation:a().bool,onPreviewAttachment:a().func.isRequired,onPreviewAttachmentWithAttachmentId:a().func.isRequired,onUploadSuggested:a().func.isRequired,onUploadAttachment:a().func.isRequired,onBankCompare:a().func.isRequired,onRemoveAttachment:a().func.isRequired,onUpdate:a().func.isRequired,onRemove:a().func.isRequired,onClose:a().func.isRequired,onOpen:a().func.isRequired,onLoadDetails:a().func.isRequired,onCopy:a().func.isRequired,onTakeOver:a().func.isRequired,isPartOfPortfolio:a().bool,isDeleteMultiple:a().bool,actionsMenuOpen:a().bool,onActionsMenuToggle:a().func}),F(H,"defaultProps",{open:!1,loading:!1,loaded:!1,disabled:!1,showEntries:!1,shouldCheckNavigation:!1,hash:"",actionsMenuOpen:!1})},14947(e,t,n){n.d(t,{A:()=>u,f:()=>d});var r,o=n(96540),i=n(51470),a=n(96540);function l(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=e.archiveXid,n=e.fileName,r=e.nameForEdit,c=e.editable,u=e.onPreviewAttachment,d=e.onRemoveAttachment,f=e.onSaveName,p=(0,o.useRef)(null),m=s((0,o.useState)(!1),2),v=m[0],h=m[1],y=null!=r?String(r):n,b=s((0,o.useState)(y),2),g=b[0],w=b[1],S=s((0,o.useState)(!1),2),k=S[0],O=S[1],N="function"==typeof f;(0,o.useEffect)(function(){v||w(null!=r?String(r):n)},[r,n,v]),(0,o.useEffect)(function(){v&&p.current&&(p.current.focus(),p.current.select())},[v]);var x=function(){w(null!=r?String(r):n),h(!1)};return v?l("div",{className:"card card-secondary card-sm mb-1 attachment-archive-card attachment-archive-card--renaming",style:{width:"100%",maxWidth:"100%",boxSizing:"border-box"}},void 0,l("div",{className:"card-body py-2 px-3"},void 0,a.createElement("input",{ref:p,type:"text",className:"form-control input-sm",style:{display:"block",width:"100%",maxWidth:"100%",boxSizing:"border-box"},value:g,disabled:k,onChange:function(e){return w(e.target.value)},onBlur:function(){if(N&&!k){var e=(g||"").trim();e!==(y||"").trim()&&""!==e?(O(!0),f(t,e).then(function(){h(!1)}).catch(function(){x()}).finally(function(){return O(!1)})):x()}},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),p.current&&p.current.blur()),"Escape"===e.key&&(e.preventDefault(),x())}}))):l("div",{className:"card card-secondary card-sm mb-1",style:{width:"100%",maxWidth:"100%",boxSizing:"border-box"}},void 0,l("a",{className:"card-body d-flex justify-content-between align-items-center",style:{width:"100%",boxSizing:"border-box"},href:(0,i.i93)(t)},void 0,n,l("span",{},void 0,l("button",{type:"button",className:"btn btn-link-dark py-0",style:{marginRight:-10},onClick:function(e){e.preventDefault(),e.stopPropagation(),u(t)}},void 0,l("i",{className:"fa fa-search cursor-pointer","aria-label":"Preview attachment"})),N?l("button",{type:"button",className:"btn btn-link-dark py-0",style:{marginRight:-10},onClick:function(e){e.preventDefault(),e.stopPropagation(),N&&!k&&(w(null!=r?String(r):n),h(!0))},"aria-label":"Omdøb bilag"},void 0,l("i",{className:"fa fa-pencil cursor-pointer","aria-hidden":"true"})):null,c?l("button",{type:"button",className:"btn btn-link-dark py-0",style:{marginRight:-10},onClick:function(e){e.preventDefault(),e.stopPropagation(),d(t)}}
1,void 0,l("i",{className:"fa fa-trash cursor-pointer","aria-label":"Remove attachment"})):null)))}function d(e){return l("div",{className:"card card-secondary card-sm mb-1"},void 0,l("div",{className:"card-body d-flex justify-content-between align-items-center text-muted"},void 0,e.fileName))}u.defaultProps={nameForEdit:void 0,editable:!1,onRemoveAttachment:function(){},onSaveName:void 0}},36669(e,t,n){var r,o=n(54625);function i(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const a=function(e){var t=e.customClassName,n=void 0===t?"btn-bordered-gray mr-2":t,r=e.to,a=e.text,l=void 0===a?I18n.translate("button.back"):a;return i(o.Link,{className:"btn ".concat(n),to:r},void 0,i("i",{className:"fa fa-chevron-left mr-1","aria-hidden":"true"}),l)};n.d(t,["A",0,a])},75989(e,t,n){var r,o=n(96540),i=n(3429),a=n(32686),l=n(3373),s=n(96540),c=n(95093);function u(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=[(0,a.A)(280)];const m=function(e){var t=e.comments,n=e.onSubmit,r=d((0,o.useState)(""),2),a=r[0],f=r[1],m=(0,o.useRef)(null);return u(o.Fragment,{},void 0,u("form",{className:"d-flex flex-column mb-2",onSubmit:function(e){e.preventDefault(),m.current.validate(a).then(l.el).then(function(e){e&&(n(a),f(""))})}},void 0,s.createElement(i.R,{ref:m,key:"comment",value:a,onChange:f,placeholder:"Type a comment",validators:p}),u("button",{className:"btn btn-primary d-flex align-items-center",style:{width:"fit-content",alignSelf:"end"},disabled:!a},void 0,"Add comment",u("i",{className:"fa fa-paper-plane-o ml-1 text-white","aria-hidden":"true"}))),t&&t.map(function(e){var t=e.userInitials,n=e.realName,r=e.comment,i=e.dateTime;return u(o.Fragment,{},r,u("div",{className:"comment"},void 0,u("div",{className:"d-flex"},void 0,u("div",{className:"comment__initials"},void 0,t),u("div",{className:"comment__content"},void 0,u("span",{},void 0,n),u("span",{},void 0,r))),u("span",{className:"comment__date"},void 0,c(i).format("MMM DD, YYYY"))),u("div",{className:"separator"}))}))};n.d(t,["A",0,m])},3927(e,t,n){var r,o=n(87195),i=n.n(o),a=n(58776),l=n.n(a);function s(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const c=function(e){var t=e.textToCopyOnClick;return s(i(),{placement:"top",overlay:s(l(),{id:"copy-tooltip"},void 0,I18n.translate("einvoice.copyclipboard",t))},void 0,s("div",{className:"btn btn-link-dark p-0",role:"button",onClick:function(){return navigator.clipboard.writeText(t)}
1},void 0,s("i",{className:"fa fa-copy ml-1","aria-hidden":"true"})))};n.d(t,["A",0,c])},11148(e,t,n){n.d(t,{n:()=>h});n(75199),n(67741),n(9595),n(16075),n(71627),n(34586),n(53847),n(99311),n(55775),n(11310),n(91694),n(49204);var r,o=n(78002);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function u(e,t,n){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function m(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var h=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return m(e=u(this,t,[].concat(r)),"state",{focused:!1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return a("div",{className:"code-mirror-".concat(this.props.size)},void 0,a(o.K,{value:this.props.value,init:s(s(s({},t.defaultProps.init),this.props.init),{},{content_css:!1,skin:!1,license_key:"gpl",statusbar:!1,lineheight:1.3,content_style:"body, p, ol, ul, li { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; }",promotion:!1}),disabled:this.props.disabled,onEditorChange:this.props.onChange,onInit:this.props.onInit}))}}])&&c(n.prototype,r),i&&c(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(n(96540).PureComponent);m(h,"defaultProps",{value:null,init:{height:240,menubar:!1,branding:!1,entity_encoding:"raw",plugins:["advlist","autolink","lists","searchreplace","visualblocks","code","fullscreen","table"],toolbar:"undo redo | formatselect | bold italic backcolor | alignleft aligncenter alignright al
1ignjustify | bullist numlist outdent indent | removeformat"},size:"tall",onChange:function(){}})},36893(e,t,n){n.d(t,{m:()=>k});var r,o=n(96540),i=n(36614),a=n.n(i),l=n(90458),s=n(57207),c=n(96540);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function p(e,t,n){return t=v(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(m=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var b,g,w,S={postUrl:"no-url"},k=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=p(this,t,[e])).dropzone=null,n.eventHandlers={addedfile:function(e){return n.handleFileAdd(e)},removedfile:function(){var e;return n.props.onFileRemove&&(e=n.props).onFileRemove.apply(e,arguments)}},n.setDropzoneRef=function(e){n.dropzone=e},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),n=t,r=[{key:"getDropzoneInstance",value:function(){var e=this.dropzone&&this.dropzone.dropzone;return e&&"function"==typeof e.on?e:null}},{key:"canRemoveFiles",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getDropzoneInstance();return e&&e.hiddenFileInput}},{key:"componentDidMount",value:function(){var e=this.getDropzoneInstance();e&&this.props.disabled&&e.disable()}},{key:"componentDidUpdate",value:function(e){var t=this.getDropzoneInstance();t&&(e.disabled&&!this.props.disabled&&t.enable(),!e.disabled&&this.props.disabled&&t.disable())}},{key:"handleFileAdd",value:function(e){var t=this.getDropzoneInstance();t&&(!this.props.multiple&&this.canRemoveFiles(t)&&t.files.forEach(function(n){n.upload.uuid!==e.upload.uuid&&t.removeFile(n)}),this.props.onFileAdded(e),this.props.disablePreview&&this.canRemoveFiles(t)&&t.removeFile(e))}},{key:"removeFile",value:function(e){var t=this.getDropzoneInstance();this.canRemoveFiles(t)&&t.removeFile(e)}},{key:"removeAllFiles",value:function(){var e=this.getDropzoneInstance();this.canRemoveFiles(e)&&e.removeAllFiles()}},{key:"render",value:function(){return c.createElement(a(),{className:this.props.className,config:S,djsConfig:(e=this.props,t=e.maxFilesize,n=e.multiple,{autoProcessQueue:!1,autoQueue:!1,maxFiles:n?void 0:1,parallelUploads:n?5:1,addRemoveLinks:!1,maxFilesize:t,acceptedFiles:e.acceptedFiles,previewTemplate:'<div class="dz-preview dz-file-preview">\n      <div class="dz-details">\n        <div class="dz-filename"><span data-dz-name="true"></span></div>\n        <img data-dz-thumbnail="true" />\n      </div>\n      <a data-dz-remove>Remove</a>\n    </div>'}),eventHandlers:this.eventHandlers,ref:this.setDropzoneRef},this.props.children,d(l.h,{className:"phi phi-drag-and-drop-icon phi-2x ".concat(this.props.useMoreSpacing?"dropzone-more-spacing-icon":""),"aria-hidden":"true"}),d("div",{className:"dz-default dz-message ".concat(this.props.useMoreSpacing?"dropzone-more-spacing-text":"")}
1,void 0,this.props.placeholder||I18n.translate("dropzone.drophere")),this.props.busy&&d(s.A,{}));var e,t,n}}],r&&f(n.prototype,r),o&&f(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(o.Component);b=k,w={disabled:!1,disablePreview:!1,maxFilesize:1/0,multiple:!1,acceptedFiles:null,placeholder:"",onFileAdded:function(){},useMoreSpacing:!1},(g=y(g="defaultProps"))in b?Object.defineProperty(b,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):b[g]=w},34691(e,t,n){n.d(t,{A:()=>F});var r,o,i,a=n(86663),l=n(96540),s=n(54625);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}function u(e){return l.createElement("svg",c({"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 749.35 62.09",width:"1em",height:"1em"},e),r||(r=l.createElement("path",{d:"M95.99.65H59.1a.96.96 0 00-.96.96v3.43c0 .53.43.96.96.96h28.72l-29.4 29.4c-.37.37-.37.98 0 1.36l2.43 2.43c.37.37.98.37 1.36 0l29.4-29.4v28.72c0 .53.43.96.96.96H96c.53 0 .96-.43.96-.96V1.61A.96.96 0 0096 .65z",fill:"#05aa6b"})),o||(o=l.createElement("path",{d:"M38.41 6.07H6.5c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H6.5c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H.87c-.58 0-.87-.29-.87-.87V1.56C0 .98.29.69.87.69h37.55c.58 0 .87.29.87.87V5.2c0 .58-.29.87-.87.87z"})),i||(i=l.createElement("g",null,l.createElement("path",{d:"M128.15 60.52V1.56c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v29.4c0 .12.06.2.17.26.12.06.2.03.26-.09l27.4-30c.23-.29.58-.43 1.04-.43h5.03c.35 0 .56.12.65.35.09.23.01.46-.22.69L147.4 25.76c-.12.12-.12.29 0 .52l23.07 34.08.17.43c0 .41-.26.61-.78.61h-5.03c-.46 0-.81-.17-1.04-.52L143.24 30.7c-.06-.11-.15-.17-.26-.17s-.2.03-.26.09l-8.24 8.76c-.12.12-.17.26-.17.43v20.72c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87zM230.21 60.78L217.46 33.9c-.06-.17-.17-.26-.35-.26h-14.74c-.23 0-.35.12-.35.35v26.53c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h22.46c4.97 0 8.99 1.55 12.05 4.64 3.06 3.09 4.6 7.13 4.6 12.1 0 4.05-1.1 7.49-3.29 10.32-2.2 2.83-5.17 4.65-8.93 5.46-.23.12-.29.26-.17.43l13.01 26.71c.06.12.09.26.09.43 0 .41-.23.61-.69.61h-4.6c-.52 0-.87-.2-1.04-.61zM202.03 6.41v21.94c0 .23.12.35.35.35h16.13c3.35 0 6.07-1.04 8.15-3.12s3.12-4.8 3.12-8.15-1.04-6.08-3.12-8.19c-2.08-2.11-4.8-3.17-8.15-3.17h-16.13c-.23 0-.35.12-.35.35zM303.83 6.07h-31.91c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-22.37c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-37.55c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h37.55c.58 0 .87.29.87.87V5.2c0 .58-.29.87-.87.87zM335.22 60.52V1.56c0-.58.29-.87.87-.87h20.46c5.72 0 10.28 1.5 13.66 4.51 3.38 3.01 5.07 7.08 5.07 12.23v27.23c0 5.15-1.69 9.22-5.07 12.23s-7.93 4.51-13.66 4.51h-20.46c-.58 0-.87-.29-.87-.87zm6.5-4.51h15.09c3.76 0 6.75-1.1 8.97-3.3 2.22-2.2 3.34-5.14 3.34-8.84V18.29c0-3.76-1.1-6.73-3.29-8.93-2.2-2.2-5.2-3.29-9.02-3.29h-15.09c-.23 0-.35.12-.35.35v49.25c0 .23.12.35.35.35zM405.28 60.52V1.56c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v58.96c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87zM481.67 1.56v3.73c0 .58-.29.87-.87.87h-16.99c-.23 0-.35.12-.35.35v54.02c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V6.5c0-.23-.12-.35-.35-.35h-16.3c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h40.15c.58 0 .87.29.87.87zM547.05.69h4.42c.58 0 .87.29.87.87v58.96c0 .58-.29.87-.87.87h-4.34c-.41 0-.75-.2-1.04-.61l-29.57-48.12c-.06-.17-.14-.25-.26-.22s-.17.13-.17.3l.09 47.78c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h4.34c.4 0 .75.2 1.04.61l29.57 48.12c.06.17.14.25.26.22s.17-.13.17-.3l-.09-47.78c0-.58.29-.87.87-.87zM590.41 59.57c-3.12-1.68-5.54-4.03-7.24-7.07-1.71-3.03-2.56-6.55-2.56-10.54V20.11c0-3.99.85-7.5 2.56-10.54 1.7-3.03 4.12-5.39 7.24-7.07 3.12-1.68 6.73-2.51 10.84-2.51s7.73.84 10.88 2.51c3.15 1.68 5.58 4.03 7.28 7.07 1.71 3.04 2.56 6.55 2.56 10.54v21.85c0 3.99-.85 7.5-2.56 10.54-1.71 3.04-4.13 5.39-7.28 7.07-3.15 1.68-6.78 2.51-10.88 2.51s-7.72-.84-10.84-2.51zm21.42-6.76c2.66-2.66 3.99-6.18 3.99-10.58v-22.2c0-4.39-1.33-7.93-3.99-10.62-2.66-2.69-6.19-4.03-10.58-4.03s-7.83 1.34-10.49 4.03c-2.66 2.69-3.99 6.23-3.99 10.62v22.2c0 4.39 1.33 7.92 3.99 10.58s6.16 3.99 10.49 3.99 7.92-1.33 10.58-3.99zM686.14 1.56v3.73c0 .58-.29.87-.87.87
1h-17c-.23 0-.35.12-.35.35v54.02c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V6.5c0-.23-.12-.35-.35-.35h-16.3c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h40.15c.58 0 .87.29.87.87zM742.85 60.7l-3.47-10.93c-.06-.17-.17-.26-.35-.26H713.1c-.17 0-.29.09-.35.26l-3.47 10.93c-.17.46-.52.69-1.04.69h-4.68c-.64 0-.87-.32-.69-.95l19.16-59.05c.17-.46.52-.69 1.04-.69h5.9c.52 0 .87.23 1.04.69l19.25 59.05.09.35c0 .41-.26.61-.78.61h-4.68c-.52 0-.87-.23-1.04-.69zm-28.31-16.34c.09.09.19.13.3.13h22.37c.12 0 .22-.04.3-.13s.1-.19.04-.3L726.28 8.68c-.06-.11-.15-.17-.26-.17s-.2.06-.26.17l-11.27 35.38c-.06.12-.04.22.04.3z"}))))}n.p;var d,f,p;function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(null,arguments)}function v(e){return l.createElement("svg",m({"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 752.71 62.17",width:"1em",height:"1em"},e),d||(d=l.createElement("path",{d:"M95.99.65H59.1a.96.96 0 00-.96.96v3.43c0 .53.43.96.96.96h28.72l-29.4 29.4c-.37.37-.37.98 0 1.36l2.43 2.43c.37.37.98.37 1.36 0l29.4-29.4v28.72c0 .53.43.96.96.96H96c.53 0 .96-.43.96-.96V1.61A.96.96 0 0096 .65z",fill:"#05aa6b"})),f||(f=l.createElement("path",{d:"M38.41 6.07H6.5c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H6.5c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H.87c-.58 0-.87-.29-.87-.87V1.56C0 .98.29.69.87.69h37.55c.58 0 .87.29.87.87V5.2c0 .58-.29.87-.87.87z"})),p||(p=l.createElement("g",null,l.createElement("path",{d:"M137.84 59.79c-3.06-1.59-5.45-3.84-7.15-6.76-1.71-2.92-2.56-6.29-2.56-10.1V19.08c0-3.76.85-7.08 2.56-9.97 1.7-2.89 4.09-5.13 7.15-6.72C140.9.8 144.46.01 148.51.01s7.6.78 10.67 2.34c3.06 1.56 5.45 3.76 7.15 6.59 1.7 2.83 2.56 6.1 2.56 9.8 0 .29-.09.52-.26.69-.17.17-.38.26-.61.26l-4.42.26c-.58 0-.87-.26-.87-.78v-.26c0-4.1-1.3-7.38-3.9-9.84-2.6-2.46-6.04-3.69-10.32-3.69s-7.72 1.24-10.32 3.73c-2.6 2.49-3.9 5.75-3.9 9.8v24.28c0 4.05 1.3 7.31 3.9 9.8 2.6 2.49 6.04 3.73 10.32 3.73s7.72-1.23 10.32-3.69c2.6-2.46 3.9-5.74 3.9-9.84v-.17c0-.52.29-.78.87-.78l4.42.26c.58 0 .87.26.87.78 0 3.76-.85 7.07-2.56 9.93-1.71 2.86-4.09 5.07-7.15 6.63-3.06 1.56-6.62 2.34-10.67 2.34s-7.6-.79-10.67-2.38zM231.75 60.78L219 33.9c-.06-.17-.17-.26-.35-.26h-14.74c-.23 0-.35.12-.35.35v26.53c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h22.46c4.97 0 8.99 1.55 12.05 4.64 3.06 3.09 4.6 7.13 4.6 12.1 0 4.05-1.1 7.49-3.29 10.32-2.2 2.83-5.17 4.65-8.93 5.46-.23.12-.29.26-.17.43L238 60.35c.06.12.09.26.09.43 0 .41-.23.61-.69.61h-4.6c-.52 0-.87-.2-1.04-.61zM203.57 6.41v21.94c0 .23.12.35.35.35h16.13c3.35 0 6.07-1.04 8.15-3.12s3.12-4.8 3.12-8.15-1.04-6.08-3.12-8.19c-2.08-2.11-4.8-3.17-8.15-3.17h-16.13c-.23 0-.35.12-.35.35zM305.37 6.07h-31.91c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-22.37c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-37.55c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h37.55c.58 0 .87.29.87.87V5.2c0 .58-.29.87-.87.87zM336.76 60.52V1.56c0-.58.29-.87.87-.87h20.46c5.72 0 10.28 1.5 13.66 4.51 3.38 3.01 5.07 7.08 5.07 12.23v27.23c0 5.15-1.69 9.22-5.07 12.23s-7.93 4.51-13.66 4.51h-20.46c-.58 0-.87-.29-.87-.87zm6.5-4.51h15.09c3.76 0 6.75-1.1 8.97-3.3 2.22-2.2 3.34-5.14 3.34-8.84V18.29c0-3.76-1.1-6.73-3.29-8.93-2.2-2.2-5.2-3.29-9.02-3.29h-15.09c-.23 0-.35.12-.35.35v49.25c0 .23.12.35.35.35zM406.82 60.52V1.56c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v58.96c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87zM483.21 1.56v3.73c0 .58-.29.87-.87.87h-17c-.23 0-.35.12-.35.35v54.02c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V6.5c0-.23-.12-.35-.35-.35h-16.3c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h40.15c.58 0 .87.29.87.87zM548.59.69h4.42c.58 0 .87.29.87.87v58.96c0 .58-.29.87-.87.87h-4.34c-.41 0-.75-.2-1.04-.61l-29.57-48.12c-.06-.17-.14-.25-.26-.22s-.17.13-.17.3l.09 47.78c0 .58-.29.87-.87.87
1h-4.42c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h4.34c.4 0 .75.2 1.04.61l29.57 48.12c.06.17.14.25.26.22.11-.03.17-.13.17-.3l-.09-47.78c0-.58.29-.87.87-.87zM591.95 59.57c-3.12-1.68-5.54-4.03-7.24-7.07-1.71-3.03-2.56-6.55-2.56-10.54V20.11c0-3.99.85-7.5 2.56-10.54 1.7-3.03 4.12-5.39 7.24-7.07 3.12-1.68 6.73-2.51 10.84-2.51s7.73.84 10.88 2.51c3.15 1.68 5.58 4.03 7.28 7.07 1.7 3.04 2.56 6.55 2.56 10.54v21.85c0 3.99-.85 7.5-2.56 10.54-1.71 3.04-4.13 5.39-7.28 7.07-3.15 1.68-6.78 2.51-10.88 2.51s-7.72-.84-10.84-2.51zm21.42-6.76c2.66-2.66 3.99-6.18 3.99-10.58v-22.2c0-4.39-1.33-7.93-3.99-10.62-2.66-2.69-6.19-4.03-10.58-4.03s-7.83 1.34-10.49 4.03c-2.66 2.69-3.99 6.23-3.99 10.62v22.2c0 4.39 1.33 7.92 3.99 10.58s6.16 3.99 10.49 3.99 7.92-1.33 10.58-3.99zM687.68 1.56v3.73c0 .58-.29.87-.87.87h-17c-.23 0-.35.12-.35.35v54.02c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V6.5c0-.23-.12-.35-.35-.35h-16.3c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h40.15c.58 0 .87.29.87.87zM751.84 6.07h-31.91c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-22.37c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-37.55c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h37.55c.58 0 .87.29.87.87V5.2c0 .58-.29.87-.87.87z"}))))}n.p;var h,y;function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(null,arguments)}function g(e){return l.createElement("svg",b({"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 580.26 61.44",width:"1em",height:"1em"},e),h||(h=l.createElement("path",{d:"M166.47 5.42h-31.82c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.29c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-22.29c-.23 0-.35.12-.35.35v26.62c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V.91c0-.58.29-.87.87-.87h37.46c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87zM225.35 60.05l-3.47-10.93c-.06-.17-.17-.26-.35-.26H195.6c-.17 0-.29.09-.35.26l-3.47 10.93c-.17.46-.52.69-1.04.69h-4.68c-.64 0-.87-.32-.69-.95L204.54.74c.17-.46.52-.69 1.04-.69h5.9c.52 0 .87.23 1.04.69l19.25 59.05.09.35c0 .41-.26.61-.78.61h-4.68c-.52 0-.87-.23-1.04-.69zM197.04 43.7c.09.09.19.13.3.13h22.37c.12 0 .22-.04.3-.13.09-.09.1-.19.04-.3L208.78 8.02c-.06-.11-.15-.17-.26-.17s-.2.06-.26.17L196.99 43.4c-.06.12-.04.22.04.3zM258.65 59.88V.91c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v29.4c0 .12.06.2.17.26.12.06.2.03.26-.09l27.4-30c.23-.29.58-.43 1.04-.43h5.03c.35 0 .56.12.65.35.09.23.01.46-.22.69L277.9 25.11c-.12.12-.12.29 0 .52l23.07 34.08.17.43c0 .41-.26.61-.78.61h-5.03c-.46 0-.81-.17-1.04-.52l-20.55-30.18c-.06-.11-.15-.17-.26-.17s-.2.03-.26.09l-8.24 8.76c-.12.12-.17.26-.17.43v20.72c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87zM367.3.91v3.73c0 .58-.29.87-.87.87h-16.99c-.23 0-.35.12-.35.35v54.02c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V5.86c0-.23-.12-.35-.35-.35h-16.3c-.58 0-.87-.29-.87-.87V.91c0-.58.29-.87.87-.87h40.15c.58 0 .87.29.87.87zM403.46 59.01c-3.12-1.62-5.55-3.89-7.28-6.81-1.73-2.92-2.6-6.32-2.6-10.19V.91c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v41.27c0 4.11 1.33 7.44 3.99 10.02 2.66 2.57 6.16 3.86 10.49 3.86s7.83-1.29 10.49-3.86 3.99-5.91 3.99-10.02V.91c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v41.1c0 3.87-.85 7.27-2.56 10.19s-4.12 5.19-7.24 6.81c-3.12 1.62-6.74 2.43-10.84 2.43s-7.63-.81-10.75-2.43zM500.4 60.14l-12.75-26.88c-.06-.17-.17-.26-.35-.26h-14.74c-.23 0-.35.12-.35.35v26.53c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V.91c0-.58.29-.87.87-.87h22.46c4.97 0 8.99 1.55 12.05 4.64 3.06 3.09 4.6 7.13 4.6 12.1 0 4.05-1.1 7.49-3.29 10.32-2.2 2.83-5.17 4.65-8.93 5.46-.23.12-.29.26-.17.43l13.01 26.71c.06.12.09.26.09.43 0 .41-.23.61-.7.61h-4.6c-.52 0-.87-.2-1.04-.61zM472.22 5.77v21.94c0 .23.12.35.35.35h16.13c3.35 0 6.07-1.04 8.15-3.12s3.12-4.8 3.12-8.15-1.04-6.08-3.12-8.19c-2.08-2.11-4.8-3.17-8.15-3.17h-16.13c-.23 0-.35.12-.35.35zM573.76 60.05l-3.47-10.93c-.06-.17-.17-.26-.35-.26h-25.93c-.17 0-.29.09-.35.26l-3.47 10.93c-.17.46-.52.69-1.
104.69h-4.68c-.64 0-.87-.32-.69-.95L552.95.74c.17-.46.52-.69 1.04-.69h5.9c.52 0 .87.23 1.04.69l19.25 59.05.09.35c0 .41-.26.61-.78.61h-4.68c-.52 0-.87-.23-1.04-.69zM545.45 43.7c.09.09.19.13.3.13h22.37c.12 0 .22-.04.3-.13.09-.09.1-.19.04-.3L557.19 8.02c-.06-.11-.15-.17-.26-.17s-.2.06-.26.17L545.4 43.4c-.06.12-.04.22.04.3z"})),y||(y=l.createElement("g",null,l.createElement("path",{d:"M95.99 0H59.1a.96.96 0 00-.96.96v3.43c0 .53.43.96.96.96h28.72l-29.4 29.4c-.37.37-.37.98 0 1.36l2.43 2.43c.37.37.98.37 1.36 0l29.4-29.4v28.72c0 .53.43.96.96.96H96c.53 0 .96-.43.96-.96V.96A.96.96 0 0096 0z",fill:"#05aa6b"}),l.createElement("path",{d:"M38.41 5.42H6.5c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H6.5c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H.87c-.58 0-.87-.29-.87-.87V.91C0 .33.29.04.87.04h37.55c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87z"}))))}n.p;var w,S,k;function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O.apply(null,arguments)}function N(e){return l.createElement("svg",O({"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 522.95 62.17",width:"1em",height:"1em"},e),w||(w=l.createElement("path",{d:"M95.99.65H59.1a.96.96 0 00-.96.96v3.43c0 .53.43.96.96.96h28.72l-29.4 29.4c-.37.37-.37.98 0 1.36l2.43 2.43c.37.37.98.37 1.36 0l29.4-29.4v28.72c0 .53.43.96.96.96H96c.53 0 .96-.43.96-.96V1.61A.96.96 0 0096 .65z",fill:"#05aa6b"})),S||(S=l.createElement("path",{d:"M38.41 6.07H6.5c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H6.5c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H.87c-.58 0-.87-.29-.87-.87V1.56C0 .98.29.69.87.69h37.55c.58 0 .87.29.87.87V5.2c0 .58-.29.87-.87.87z"})),k||(k=l.createElement("g",null,l.createElement("path",{d:"M128.15 60.52V1.56c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v58.96c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87zM204.11.69h4.42c.58 0 .87.29.87.87v58.96c0 .58-.29.87-.87.87h-4.34c-.41 0-.75-.2-1.04-.61l-29.57-48.12c-.06-.17-.14-.25-.26-.22s-.17.13-.17.3l.09 47.78c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h4.34c.4 0 .75.2 1.04.61l29.57 48.12c.06.17.14.25.26.22.11-.03.17-.13.17-.3l-.09-47.78c0-.58.29-.87.87-.87zM254.32 60.7L235.41 1.65l-.09-.35c0-.4.26-.61.78-.61h4.68c.52 0 .87.23 1.04.69l15.78 50.81c.06.12.14.17.26.17s.2-.06.26-.17L273.9 1.38c.17-.46.52-.69 1.04-.69h4.6c.64 0 .87.32.69.95l-19.08 59.05c-.17.46-.52.69-1.04.69h-4.77c-.52 0-.87-.23-1.04-.69zM313.98 59.57c-3.12-1.68-5.54-4.03-7.24-7.07-1.71-3.03-2.56-6.55-2.56-10.54V20.11c0-3.99.85-7.5 2.56-10.54 1.7-3.03 4.12-5.39 7.24-7.07 3.12-1.68 6.73-2.51 10.84-2.51s7.73.84 10.88 2.51c3.15 1.68 5.58 4.03 7.28 7.07 1.71 3.04 2.56 6.55 2.56 10.54v21.85c0 3.99-.85 7.5-2.56 10.54-1.71 3.04-4.13 5.39-7.28 7.07-3.15 1.68-6.78 2.51-10.88 2.51s-7.72-.84-10.84-2.51zm21.42-6.76c2.66-2.66 3.99-6.18 3.99-10.58v-22.2c0-4.39-1.33-7.93-3.99-10.62-2.66-2.69-6.19-4.03-10.58-4.03s-7.83 1.34-10.49 4.03c-2.66 2.69-3.99 6.23-3.99 10.62v22.2c0 4.39 1.33 7.92 3.99 10.58s6.16 3.99 10.49 3.99 7.92-1.33 10.58-3.99zM376.49 60.52V1.56c0-.58.29-.87.87-.87h4.42c.58 0 .87.29.87.87v58.96c0 .58-.29.87-.87.87h-4.42c-.58 0-.87-.29-.87-.87zM423.23 59.79c-3.06-1.59-5.45-3.84-7.15-6.76-1.71-2.92-2.56-6.29-2.56-10.1V19.08c0-3.76.85-7.08 2.56-9.97 1.71-2.89 4.09-5.13 7.15-6.72C426.29.8 429.85.01 433.9.01s7.6.78 10.66 2.34c3.06 1.56 5.45 3.76 7.15 6.59 1.71 2.83 2.56 6.1 2.56 9.8 0 .29-.09.52-.26.69-.17.17-.38.26-.61.26l-4.42.26c-.58 0-.87-.26-.87-.78v-.26c0-4.1-1.3-7.38-3.9-9.84-2.6-2.46-6.04-3.69-10.32-3.69s-7.72 1.24-10.32 3.73c-2.6 2.49-3.9 5.75-3.9 9.8v24.28c0 4.05 1.3 7.31 3.9 9.8 2.6 2.49 6.04 3.73 10.32 3.73s7.72-1.23 10.32-3.69c2.6-2.46 3.9-5.74 3.9-9.84v-.17c0-.52.29-.78.87-.78l4.42.26c.58 0 .87.26.87.78 0 3.76-.85 7.07-2.56 9.93s-4.09 5.07-7.15 6.63c-3.06 1.56-6.62 2.34-10.66 2.34s-7.6-.79-10.67-2.38zM522.08 6.07h-31.91c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35h22.37c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87
1h-22.37c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87h-37.55c-.58 0-.87-.29-.87-.87V1.56c0-.58.29-.87.87-.87h37.55c.58 0 .87.29.87.87V5.2c0 .58-.29.87-.87.87z"}))))}n.p;var x,P=n(3373),I=n(51470),A=n(3927);function C(e,t,n,r){x||(x="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:x,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const _=function(e){var t=e.children,n=e.title,r=e.size,o=void 0===r?"small":r,i=e.customClassName,a=void 0===i?"":i,s=j((0,l.useState)(!1),2),c=s[0],u=s[1];return C("div",{className:"d-flex flex-column ".concat(a)},void 0,C("div",{role:"button",className:"d-flex p-".concat("small"===o?"1":"2"),onClick:function(){return u(!c)}},void 0,C("i",{className:"fa fa-chevron-down text-lightgray mr-1 animate ".concat(c?"animate-down":""),"aria-hidden":"true"}),C("div",{className:"w-full"},void 0,n)),C("div",{className:"expandable pl-2 ".concat(c?"open":"")},void 0,t))};var R;function T(e,t,n,r){R||(R="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:R,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var E=function(e){var t=e.contact,n=e.streetName,r=e.buildingNumber,o=e.countryCode,i=e.postalZone,a=e.cityName,l=e.legalEntityIdentifier,s=e.endpointScheme,c=e.endpointId;return T("div",{className:"container pl-2 text-lightgray"},void 0,T("p",{},void 0,t),T("p",{},void 0,n," ",r),T("p",{},void 0,o," ",i," ",a),T("p",{},void 0,l," (",s,": ",c,")"))},M=function(e){var t=e.foundMultiple,n=e.foundNone,r=e.supplierXid,o=e.suggestName,i=e.suggestCompanyIdentifier;if(null!==r)return T("i",{},void 0,I18n.translate("einvoice.supplier.found"));if(t)return T("i",{},void 0,I18n.translate("einvoice.supplier.multiple"));if(n){var l=(0,a.As)({suggestCompanyIdentifier:i,suggestName:o});return T(s.Link,{to:(0,P.ID)("/work/suppliers?".concat(l))},void 0,T("i",{},void 0,I18n.translate("einvoice.supplier.none")))}};const F=function(e){var t=e.data,n=e.companyXid,r=e.xid,o=e.onAcceptEinvoice,i=e.acceptingEinvoice,a=t.accountingCustomer,s=t.accountingSupplier,c=t.additionalDocuments,d=t.creditNote,f=t.number,p=t.documentDate,m=t.deliveryDate,h=t.orderReferenceId,y=t.currency,b=t.note,w=t.vatAmount,S=t.vatBasisAmount,k=t.exclVatAmount,O=t.inclVatAmount,x=t.lines,P=t.paymentMeans,C=t.supplierLookup,j=t.usesApplicationResponse,D=t.acceptedApplicationResponseSent,R=t.rejectedApplicationResponseSent;return T("div",{className:"d-flex flex-column"},void 0,T("div",{className:"container"},void 0,d?"da"===I18n.lang?T(u,{style:{width:"100%",height:70}}):T(v,{style:{width:"100%",height:70}}):"da"===I18n.lang?T(g,{style:{width:"100%",height:70}}):T(N,{style:{width:"100%",height:70}})),T("div",{className:"container mb-1"},void 0,T("div",{style:{backgroundColor:"#D8ECFD"},className:"p-1"},void 0,T("div",{className:"d-flex justify-content-between font-bold mb-1",style:{fontSize:18}},void 0,T("span",{},void 0,I18n.translate("einvoice.invoicenumber")),T("span",{},void 0,f)),T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.invoicedate"),":"),T("span",{},void 0,p)),h&&T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.orderref"),":"),T("span",{},void 0,h)),b&&T("div",{className:"d-flex justify-content-between"},void 0,T("span",{},void 0,I18n.translate("einvoice.note"),":"),T("span",{},void 0,b)),m&&T("div",{className:"d-flex justify-content-between mt-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.deliverydate"),":"),T("span",{},void 0,m)))),j&&T(l.Fragment,{},void 0,T("div",{className:"app-toolbar__subtitle"},void 0,T("span",{},void 0,I18n.translate("einvoice.response"))),D?T("div",{className:"container mb-1 p-1"},void 0,T("span",{}
1,void 0,I18n.translate("einvoice.response.accepted"))):R?T("div",{className:"container mb-1 p-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.response.rejected"))):T("div",{className:"d-flex justify-content-between mb-1 p-1"},void 0,T("button",{className:"btn btn-primary",onClick:function(){return o(n,r,!0,!1)},disabled:i},void 0,I18n.translate("einvoice.response.accept")),T("button",{className:"btn btn-primary",onClick:function(){return o(n,r,!1,!0)},disabled:i},void 0,I18n.translate("einvoice.response.reject")))),s&&T(l.Fragment,{},void 0,T("div",{className:"app-toolbar__subtitle"},void 0,T("span",{},void 0,I18n.translate("einvoice.supplier"))),T(_,{title:T("div",{className:"d-flex justify-content-between"},void 0,T("span",{},void 0,s.name),l.createElement(M,C)),size:"large"},void 0,l.createElement(E,s))),a&&T(l.Fragment,{},void 0,T("div",{className:"app-toolbar__subtitle"},void 0,T("span",{},void 0,I18n.translate("einvoice.customer"))),T(_,{title:a.name,size:"large"},void 0,l.createElement(E,a))),T("div",{className:"app-toolbar__subtitle d-flex justify-content-between"},void 0,T("span",{},void 0,I18n.translate("einvoice.amounts")),T("span",{},void 0,y)),T("div",{className:"container mb-1 p-1"},void 0,T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.exclvat")),T("span",{},void 0,k)),T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.vatbasis")),T("span",{},void 0,S)),T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.vat")),T("span",{},void 0,w)),T("div",{className:"d-flex justify-content-between font-bold"},void 0,T("span",{},void 0,I18n.translate("einvoice.inclvat")),T("span",{},void 0,O))),P&&!!P.length&&T(l.Fragment,{},void 0,T("div",{className:"app-toolbar__subtitle"},void 0,T("span",{},void 0,I18n.translate("einvoice.payment"))),P.map(function(e){var t=e.paymentChannelDescription,n=e.branchNumber,r=e.accountNumber,o=e.paymentDueDate,i=e.paymentNote,a=e.paymentChannelType,s=e.paymentId,c=e.instructionId,u=e.creditAccountAccountId;return T(_,{title:T("span",{},void 0,t),size:"large"},t,T("div",{className:"container mb-1 text-lightgray"},void 0,T("div",{className:"mb-1"},void 0,"DK_FIK"===a?T(l.Fragment,{},void 0,T("span",{},void 0,"+",s," <",c," +",u),T(A.A,{textToCopyOnClick:c}),T(A.A,{textToCopyOnClick:u})):T(l.Fragment,{},void 0,T("span",{},void 0,n)," - ",T("span",{},void 0,r),T(A.A,{textToCopyOnClick:n}),T(A.A,{textToCopyOnClick:r}))),T("div",{className:"mb-1"},void 0,T("label",{className:"mr-2 font-normal"},void 0,I18n.translate("einvoice.paymentdue")),T("span",{},void 0,o)),i&&T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.paymentnote")),T("span",{},void 0,i))))})),x&&!!x.length&&T(l.Fragment,{},void 0,T("div",{className:"app-toolbar__subtitle d-flex justify-content-between"},void 0,T("span",{},void 0,I18n.translate("einvoice.lines")),T("span",{},void 0,y)),x.map(function(e){var t=e.itemName,n=e.lineExtensionAmount,r=e.id,o=e.unitCode,i=e.quantity,a=e.itemPrice,l=e.taxSchemeName,s=e.note;return T(_,{title:T("div",{className:"d-flex justify-content-between w-full"},void 0,T("span",{},void 0,t),T("span",{},void 0,n)),size:"large"},t,T("div",{className:"container mb-1 text-lightgray"},void 0,s&&T("p",{className:"mb-2",style:{whiteSpace:"pre-line"}},void 0,s),T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.lineid")),T("span",{},void 0,r)),T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.unit")),T("span",{},void 0,o)),T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.quantity")),T("span",{},void 0,i)),T("div",{className:"d-flex justify-content-between mb-1"},void 0,T("span",{},void 0,I18n.translate("einvoice.item.price")),T("span",{},void 0,a)),T("div",{className:"d-flex justify-content-between"},void 0,T("span",{},void 0,I18n.translate("einvoice.linevat")),T("span",{},void 0,l))))})),c&&!!c.length&&T(l.Fragment,{},void 0,T("div",{className:"app-toolbar__subtitle"},void 0,T("span",{},void 0,I18n.translate("einvoice.additionaldocs"))),T("div",{className:"p-2 d-flex flex-column"},void 0,c.map(function(e){var t=e.index,o=e.name;return T("a",{className:"mb-1","aria-label":"Download File",href:(0,I.dmP)({companyXid:n,xid:r,index:t}),onClick:function(e){return e.stopPropagation()},download:!0,target:"_blank",rel:"noreferrer noopener"},t,o)}))))}},51476(e,t,n){var r,o=n(96540),i=n(40961);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?s(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var p=function(e){var t=e.id,n=e.open,r=e.noCaret,a=e.pullRight,s=e.title,u=e.className,f=e.onToggle,p=e.disabled,m=e.children,v=e.bsStyle,h=void 0===v?"default":v,y=e.bsSize,b=e.closeOnSelect,g=void 0!==b&&b,w=e.transparent,S=void 0!==w&&w,k=d((0,o.useState)(n||!1),2),O=k[0],N=k[1],x=d((0,o.useState)(-1),2),P=x[0],I=x[1],A=(0,o.useRef)(null),C=(0,o.useRef)(null),j=(0,o.useRef)([]),D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!O;p||(N(e),f&&f(e),e||I(-1))},_=function(e){O&&C.current&&!C.current.contains(e.target)&&A.current&&!A.current.contains(e.target)&&D(!1)};(0,o.useEffect)(function(){return document.addEventListener("mousedown",_),function(){document.removeEventListener("mousedown",_)}},[O]),(0,o.useEffect)(function(){N(n||!1)},[n]),(0,o.useEffect)(function(){O&&-1!==P&&j.current[P]&&"function"==typeof j.current[P].focus&&j.current[P].focus()},[O,P]);var R=function(e){if(!p)switch(e.key){case"Enter":case" ":if(e.preventDefault(),O){if(-1!==P&&j.current[P]){var t=o.Children.toArray(m)[P];t.props.onClick&&t.props.onClick(e),t.props.onSelect&&t.props.onSelect(t.props.eventKey,e),(t.props.href||t.props.to)&&(window.location.href=t.props.href||t.props.to),g&&D(!1)}}else D(!0),I(0);break;case"Escape":D(!1);break;case"ArrowDown":e.preventDefault(),O?I(function(e){return(e+1)%o.Children.toArray(m).length}):(D(!0),I(0));break;case"ArrowUp":e.preventDefault(),O?I(function(e){var t=o.Children.toArray(m).length;return(e-1+t)%t}):(D(!0),I(0));break;case"Tab":O&&e.preventDefault()}},T=(0,o.useRef)(function(){if(A.current&&C.current){var e=A.current.getBoundingClientRect(),t=C.current;t.style.position="fixed",t.style.zIndex="9999",t.style.display="block";var n=15,r=window.innerHeight,o=Math.min(window.innerWidth,document.documentElement.clientWidth),i=r-e.bottom,a=e.top,l=i<100&&a>i;t.style.top="".concat(l?e.top-t.offsetHeight:e.bottom,"px"),t.style.left="".concat(e.left,"px");var s=l?a-n:i-n;t.style.maxHeight="".concat(s,"px"),t.style.overflowY="auto",requestAnimationFrame(function(){var r=t.getBoundingClientRect(),i=Math.min(o-30,450),a=Math.max(e.width,t.scrollWidth),s=Math.min(a,i);t.style.minWidth="".concat(s,"px");var c=r.right>o-n,u=r.left<n;c&&(t.style.left="".concat(Math.max(n,e.right-r.width),"px")),u&&(t.style.left="".concat(n,"px")),t.style.transformOrigin=l?"bottom center"
1:"top center"})}});(0,o.useLayoutEffect)(function(){O&&A.current&&C.current&&T.current()},[O,m]),(0,o.useEffect)(function(){if(O){var e=function(){return T.current()};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),function(){window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[O]);var E,M,F=["btn","btn-".concat(h),y&&"btn-".concat(y),u,O&&!S&&"active"].filter(Boolean).join(" ");return l("div",{className:"btn-group ".concat(O?"open":""),style:{position:"relative",backgroundColor:S?"transparent":void 0}},void 0,o.createElement("button",{ref:A,id:"".concat(t,"-toggle"),className:F,onClick:function(e){e.preventDefault(),D(!O)},onKeyDown:R,"aria-haspopup":"true","aria-expanded":O,disabled:p,type:"button",style:{backgroundColor:S?"transparent":void 0}},s,!r&&l("span",{className:"caret"})),O&&(0,i.createPortal)(o.createElement("ul",{id:t,ref:C,className:"dropdown-menu".concat(a?" dropdown-menu-right":""),role:"menu",style:{margin:0,padding:"5px 0",backgroundColor:"#fff",border:"1px solid rgba(0,0,0,.15)",borderRadius:"4px",boxShadow:"0 6px 12px rgba(0,0,0,.175)",width:"fit-content"}},(E=m,M=o.Children.toArray(E).filter(Boolean),j.current=[],M.map(function(e,t){var n=P===t;return(0,o.cloneElement)(e,{key:t,ref:function(e){j.current[t]=e},tabIndex:-1,onKeyDown:function(t){e.props.onKeyDown&&e.props.onKeyDown(t),R(t)},onClick:function(t){e.props.onClick&&e.props.onClick(t),!e.props.href&&!e.props.to||e.props.to||(window.location.href=e.props.href||e.props.to),g&&D(!1)},role:"menuitem","aria-selected":n,style:c(c({},e.props.style),{},{backgroundColor:n?"#f5f5f5":void 0,outline:"none"}),className:"".concat(e.props.className||""," ").concat(n?"active":"")})}))),document.body))};p.defaultProps={noCaret:!0,disabled:!1,bsStyle:"default",closeOnSelect:!1};const m=p;n.d(t,["A",0,m])},59257(e,t,n){n.d(t,{A:()=>E});var r,o=n(5338),i=n(20212),a=n(48700),l=n(51470);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}function f(e,t,n){return t=m(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var h=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),f(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this;return c("button",{type:"button",className:"btn btn-link btn-default-padding",onClick:function(){return e.props.onNavigate(e.props.url)}},void 0,this.props.children)}}])&&u(n.prototype,r),o&&u(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(n(96540).PureComponent);const y=h;var b,g=n(80057),w=n(96540);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function k(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t,n,r){b||(b="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:b,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R(r.key),r)}}function P(e,t,n){return t=A(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],A(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(I=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}
1function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==S(t)?t:t+""}var T=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),_(n=P(this,t,[e]),"state",{history:[],texts:{},Converter:null}),_(n,"timer",void 0),_(n,"requestHelper",new a.g),_(n,"helpTextRoots",new Map),n.handleNavigation=n.handleNavigation.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),r=t,s=[{key:"componentDidMount",value:function(){var e=this;Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187)]).then(n.bind(n,8360)).then(function(t){e.setState({Converter:t.QuillDeltaToHtmlConverter})}),this.props.xid&&this.loadText("".concat(l.ace,"?xid=").concat(this.props.xid)),this.update()}},{key:"componentDidUpdate",value:function(e,t){e.message===this.props.message&&e.firstLine===this.props.firstLine&&this.state.history===t.history&&this.state.texts===t.texts||this.update()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),this.requestHelper.abortAll(),this.helpTextRoots.forEach(function(e){return e.unmount()}),this.helpTextRoots.clear()}},{key:"update",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout(function(){for(var t=document.querySelectorAll("*[data-help-link]"),n=0;n<t.length;n++){var r=t[n],i=e.helpTextRoots.get(r);i||(i=(0,o.createRoot)(r),e.helpTextRoots.set(r,i)),i.render(N(y,{url:r.dataset.helpLink,onNavigate:e.handleNavigation},void 0,r.dataset.helpText))}},300)}},{key:"handleNavigation",value:function(e){this.setState({history:[e].concat(k(this.state.history))}),this.loadText(e)}},{key:"loadText",value:function(e){var t=this;this.state.texts[e]||this.requestHelper.registerRequest((0,i.RD)(e)).then(function(n){return t.setState({texts:D(_({},e,n.body),t.state.texts)})})}},{key:"render",value:function(){var e=this,t=this.state.Converter,n=this.props,r=n.message,o=n.xid,i=this.state.texts["".concat(l.ace,"?xid=").concat(o)];if(!t||!r&&!i)return N("p",{},void 0,N(g.A,{}));var a=this.state.history.length&&this.state.texts[this.state.history[0]]||r||i,s=new t(a.ops.map(function(e){return e.attributes&&e.attributes.helpText?D(D({},e),{},{insert:{helpText:e.insert}}):e}
1),{inlineStyles:!0,linkRel:"noopener noreferrer",linkTarget:"_blank"});return s.renderCustomWith(function(e){if("helpText"===e.insert.type)return'<span data-help-link="'.concat(e.attributes.helpText,'" data-help-text="').concat(e.insert.value,'"></span>')}),N(w.Fragment,{},void 0,this.state.history.length>0&&N("button",{type:"button",className:"btn btn-link px-0",onClick:function(){return e.setState({history:e.state.history.slice(1)})}},void 0,N("i",{className:"fa fa-chevron-left mr-1","aria-hidden":"true"}),"Back"),N("div",{className:"formatted-message",dangerouslySetInnerHTML:{__html:s.convert()}}))}}],s&&x(r.prototype,s),c&&x(r,c),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,s,c}(w.PureComponent);_(T,"defaultProps",{isParent:!0});const E=T},86671(e,t,n){var r,o=n(38221),i=n.n(o),a=n(96540),l=n(63275),s=n.n(l),c=n(80057);function u(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const p=function(e){var t=e.src,n=e.className,r=d((0,a.useState)(null),2),o=r[0],l=r[1],f=d((0,a.useState)(0),2),p=f[0],m=f[1],v=d((0,a.useState)(0),2),h=v[0],y=v[1],b=d((0,a.useState)(0),2),g=b[0],w=b[1],S=d((0,a.useState)(0),2),k=S[0],O=S[1],N=d((0,a.useState)("initial"),2),x=N[0],P=N[1],I=d((0,a.useState)(!0),2),A=I[0],C=I[1],j=d((0,a.useState)(!1),2),D=j[0],_=j[1],R=d((0,a.useState)(null),2),T=R[0],E=R[1],M=d((0,a.useState)(1),2),F=M[0],z=M[1],B=d((0,a.useState)(0),2),H=B[0],L=B[1],$=(0,a.useRef)(null),X=(0,a.useRef)(!1),V=i()(function(){return q()},200);(0,a.useEffect)(function(){C(!0),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t?"".concat(e,"&page=").concat(t):e;return fetch(n).then(function(e){if(406===e.status)throw{status:406};var t=parseInt(e.headers.get("x-multiregnskab-nopages"));return e.blob().then(function(e){return{blob:e,pagesCount:t}})}).then(function(e){var t=e.blob,n=e.pagesCount;return new Promise(function(e){var r=new FileReader;r.onload=function(){var t=new Image;t.onload=function(){e({base64:r.result,width:t.width,height:t.height,pagesCount:n})},t.onerror=function(){e({error:I18n.translate("archive.file.fetchfailed")})},t.src=r.result},r.onerror=function(){e({error:I18n.translate("archive.file.fetchfailed")})},r.readAsDataURL(t)})}).catch(function(e){return 406===e.status?{notAcceptableError:!0}:{error:I18n.translate("archive.file.fetchfailed")}})}(t,H).then(function(e){var t=e.base64,n=e.width,r=e.height,o=e.pagesCount,i=e.error;e.notAcceptableError?_(!0):i?E(i):(l(t),m(n),y(r),z(o)),C(!1)}).catch(function(e){406===e.status?_(!0):E(I18n.translate("archive.file.fetchfailed")),C(!1)})},[t,H]),(0,a.useEffect)(function(){X.current||(V(),X.current=!0)},[x]),(0,a.useEffect)(function(){V()},[o]),(0,a.useEffect)(function(){V()},[h,p]);var q=function(){if($.current){var e=p/h,t=Math.min($.current.clientWidth,p),n=t/e;w(t),O(n),P(Math.random().toString())}};return D?u("div",{className:n+" mt-2 text-center",style:{fontSize:"18px"}},void 0,I18n.translate("archive.file.typenotsupported")):T?u("div",{className:n+" mt-2 text-center",style:{fontSize:"18px"}},void 0,T):A?u("div",{className:n+" mt-2 text-center",style:{fontSize:"36px"}},void 0,u(c.A,{})):a.createElement("div",{className:n,ref:$,onresize:V,style:{position:"relative"}}
1,F>1&&u("div",{style:{position:"absolute",top:0,right:0,transform:"translate(0, -100%)",cursor:"auto"}},void 0,u("button",{className:"btn btn-white",disabled:H-1<0,onClick:function(){return L(H-1)}},void 0,u("i",{className:"fa fa-chevron-left","aria-hidden":"true"})),u("span",{},void 0,H+1," / ",F),u("button",{className:"btn btn-white",disabled:H+1===F,onClick:function(){return L(H+1)}},void 0,u("i",{className:"fa fa-chevron-right","aria-hidden":"true"}))),s()&&o&&u(s(),{img:o,zoomScale:3,width:g,height:k},x))};n.d(t,["A",0,p])},12710(e,t,n){n.d(t,{L:()=>h});var r,o=n(96540),i=n(54625),a=n(3373);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function u(e,t,n){return t=f(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function m(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var h=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return m(e=u(this,t,[].concat(r)),"handleHelpLinkClick",function(){var t=e.props,n=t.helpArticleKey,r=t.onHelpLinkClick;n&&r&&r(n)}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props,t=e.link,n=e.helpArticleKey;return s("div",{className:"card user-note"},void 0,s("div",{className:"card-body d-flex align-items-center justify-content-between"},void 0,s("div",{className:"d-flex align-items-center"},void 0,s("div",{className:"mr-2"},void 0,this.props.icon),s("div",{className:"mr-2"},void 0,this.props.message),n?s("button",{type:"button",className:"btn btn-default ml-2",style:{paddingTop:1,paddingBottom:1},onClick:this.handleHelpLinkClick},void 0,this.props.linkText):t?s(i.Link,{className:"btn btn-default ml-2",style:{paddingTop:1,paddingBottom:1},to:"object"===l(t)?t:(0,a.ID)(t)},void 0,this.props.linkText||("object"===l(t)?t.pathname:t)):null),this.props.onDismiss?this.props.buttonText&&s("button",{type:"button",className:"btn btn-default ml-2",style:{paddingTop:3,paddingBottom:3},onClick:this.props.onDismiss},void 0,this.props.buttonText)||s("button",{type:"button",className:"btn btn-link-dark",style:{paddingTop:3,paddingBottom:3,marginRight:-15},onClick:this.props.onDismiss},void 0,s("i",{className:"fa fa-remove fa-fw","aria-label":I18n.translate("startnote.dismiss")})):null))}}])&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}
1(o.PureComponent);m(h,"defaultProps",{icon:s("i",{className:"fa fa-info-circle text-info fa-lg fa-fw","aria-hidden":"true"})})},53114(e,t,n){n.d(t,{A:()=>i});var r;n(96540);function o(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function i(e){var t=e.title,n=void 0===t?"":t,r=e.children,i=e.style,a=e.topRightText,l=e.className;return o("div",{className:"card position-relative ".concat(l),style:i},void 0,a&&o("h4",{style:{right:"20px",position:"absolute"}},void 0,a),n&&o("div",{className:"card-header"},void 0,o("div",{className:"card-title"},void 0,n)),o("div",{className:"card-body"},void 0,r))}},5070(e,t,n){n.d(t,{A:()=>h});var r,o=n(96540);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(null,arguments)}function a(e){return o.createElement("svg",i({width:"1em",height:"1em",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M9.625 3.579h1.569L10.13 7.18c-.083.293-.144.512-.182.656a1.59 1.59 0 00-.05.365c0 .166.055.324.166.473.11.144.288.216.531.216.476 0 .952-.31 1.428-.93.481-.625.722-1.452.722-2.482 0-1.521-.653-2.614-1.959-3.278-.819-.42-1.74-.631-2.764-.631-1.882 0-3.392.575-4.532 1.726-1.03 1.04-1.544 2.289-1.544 3.744 0 1.616.603 2.897 1.81 3.843 1.067.836 2.37 1.254 3.909 1.254a7.467 7.467 0 002.947-.581 7.884 7.884 0 001.544-.872l.199-.141.606.93a9 9 0 01-2.557 1.394 8.66 8.66 0 01-2.847.473c-2.296 0-4.076-.713-5.337-2.141C1.175 10.015.65 8.612.65 6.99c0-1.815.654-3.353 1.96-4.615 1.372-1.334 3.13-2 5.27-2 1.744 0 3.188.456 4.334 1.37 1.206.962 1.81 2.24 1.81 3.834 0 1.256-.382 2.335-1.146 3.237-.764.897-1.635 1.345-2.615 1.345-.509 0-.902-.144-1.179-.432-.27-.287-.406-.583-.406-.888v-.124l.016-.158a3.48 3.48 0 01-.705.955c-.47.426-1.035.639-1.694.639-.67 0-1.228-.24-1.676-.722-.443-.482-.664-1.154-.664-2.017 0-1.002.34-1.94 1.02-2.814.681-.875 1.517-1.312 2.507-1.312.581 0 1.032.16 1.353.482.244.249.407.534.49.855l.299-1.046zm-3.578 4.98c.183.25.443.374.78.374.593 0 1.077-.449 1.453-1.345.382-.902.573-1.61.573-2.125 0-.293-.089-.54-.266-.739-.177-.2-.415-.299-.713-.299-.576 0-1.071.36-1.486 1.08-.415.713-.623 1.405-.623 2.075 0 .404.094.73.282.98z",fill:"#999"})))}n.p;var l,s;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(null,arguments)}function u(e){return o.createElement("svg",c({"data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 144 96",width:"1em",height:"1em"},e),l||(l=o.createElement("path",{d:"M119.52 17.63H82.63a.96.96 0 00-.96.96v3.43c0 .53.43.96.96.96h28.72l-29.4 29.4c-.37.37-.37.98 0 1.36l2.43 2.43c.37.37.98.37 1.36 0l29.4-29.4v28.72c0 .53.43.96.96.96h3.43c.53 0 .96-.43.96-.96v-36.9a.96.96 0 00-.96-.96z",fill:"#05aa6b"})),s||(s=o.createElement("path",{d:"M61.94 23.05H30.03c-.23 0-.35.12-.35.35v21.42c0 .23.12.35.35.35H52.4c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H30.03c-.23 0-.35.12-.35.35v21.76c0 .23.12.35.35.35h31.91c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87H24.39c-.58 0-.87-.29-.87-.87V18.54c0-.58.29-.87.87-.87h37.55c.58 0 .87.29.87.87v3.64c0 .58-.29.87-.87.87z"})))}n.p;var d,f=n(23087),p=n(83356),m=n(3373);function v(e,t,n,r){d||(d="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:d,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const h=function(e){var t=e.type;return t===m.yw.IMG?v(f.h,{fontSize:28}):t===m.yw.TEXT?v(p.h,{fontSize:28}):t===m.yw.MAIL?v(a,{fontSize:28}):t===m.yw.COMMENTS?v("i",{className:"fa fa-comments-o","aria-hidden":"true",style:{fontSize:28}}
1):t===m.yw.EINVOICE?v(u,{fontSize:28}):t===m.yw.DOWNLOAD?v("i",{className:"fa fa-paperclip","aria-hidden":"true",style:{fontSize:28,width:28}}):null}},79955(e,t,n){var r,o=n(5556),i=n.n(o),a=n(13918),l=n(80057);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function d(e,t,n){return t=v(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e,t,n,r){var o=m(v(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function m(){return m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},m.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var g=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return y(e=d(this,t,[].concat(r)),"state",{saved:!1,failed:!1}),y(e,"timer",void 0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){p(t,"componentDidMount",this,3)([]),this.refresh(this.props)}},{key:"componentDidUpdate",value:function(e){this.props.busy===e.busy&&this.props.saved===e.saved&&this.props.failed===e.failed||this.refresh(this.props)}},{key:"componentWillUnmount",value:function(){p(t,"componentWillUnmount",this,3)([]),clearTimeout(this.timer)}},{key:"refresh",value:function(e){var t=this,n=e.saved;e.failed?this.setState({failed:!0}):n&&this.setState({saved:!0}),clearTimeout(this.timer),this.timer=setTimeout(function(){return t.setState({failed:!1,saved:!1})},2e3)}},{key:"render",value:function(){return c("button",{type:this.props.type,style:this.props.style,className:"btn btn-".concat(this.props.variant," ").concat(this.props.className),disabled:this.props.disabled||this.props.busy,onClick:this.props.onClick},void 0,this.props.children||this.props.busy&&c("span",{},void 0,I18n.translate("button.save.saving")," ",c(l.A,{}))||this.state.saved&&I18n.translate("button.save.saved")||this.state.failed&&I18n.translate("button.save.failed")||this.props.defaultMessage||this.props.title||I18n.translate("button.save"))}}])&&u(n.prototype,r),o&&u(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(a.b);y(g,"propTypes",{busy:i().bool,saved:i().bool,failed:i().bool,disabled:i().bool,type:i().string,variant:i().string,className:i().string,
1style:i().object,defaultMessage:i().string,onClick:i().func,title:i().string}),y(g,"defaultProps",{type:"button",variant:"primary"});const w=g;n.d(t,["A",0,w])},22970(e,t,n){n.d(t,{B:()=>h});var r,o=n(96540),i=n(14670),a=n(59499);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function u(e,t,n){return t=f(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function m(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var h=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return m(e=u(this,t,[].concat(r)),"_isMounted",!1),m(e,"state",{DropzoneComponent:null,crushed:!1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,(o=[{key:"componentDidMount",value:function(){var e=this;Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187)]).then(n.bind(n,83973)).then(function(t){return e._isMounted&&e.setState({DropzoneComponent:t.default})}).catch(function(t){a.captureError(t,{code:i.V6,message:"Ultimate Dropzone"}),e._isMounted&&e.setState({crushed:!0})}),this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"render",value:function(){var e=this.state,t=e.DropzoneComponent,n=e.crushed;return!t||n?null:s(t,{className:this.props.className,onDrop:this.props.onFilesDrop,onFrameDragEnter:this.props.onDragStart,onFrameDragLeave:this.props.onDragStop,onFrameDrop:this.props.onDragStop},void 0,this.props.children)}}])&&c(r.prototype,o),l&&c(r,l),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,l}(o.Component);m(h,"defaultProps",{className:"ultimate-file-drop",onFilesDrop:function(){}})},86882(e,t,n){var r;function o(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const i=function(){return o("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,o("path",{d:"M24 12C24 5.38336 18.6166 0 12 0C5.38336 0 0 5.38336 0 12C0 18.6166 5.38336 24 12 24C18.6166 24 24 18.6166 24 12ZM1.19902 12C1.19902 6.04405 6.04405 1.19902 12 1.19902C1
17.956 1.19902 22.801 6.04405 22.801 12C22.801 17.956 17.956 22.801 12 22.801C6.04405 22.801 1.19902 17.956 1.19902 12Z",transform:"translate(17 0.0294189) rotate(45)",fill:"#27D477"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(24.9727 16.3322) rotate(90)",fill:"#27D477"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(9.1582 17.5363) rotate(-90)",fill:"#27D477"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(16.4746 9.03927)",fill:"#27D477"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(17.6797 24.853) rotate(-180)",fill:"#27D477"}))};n.d(t,["A",0,i])},8688(e,t,n){var r;function o(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const i=function(){return o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,o("path",{d:"M24 12C24 5.38336 18.6166 0 12 0C5.38336 0 0 5.38336 0 12C0 18.6166 5.38336 24 12 24C18.6166 24 24 18.6166 24 12ZM1.19902 12C1.19902 6.04405 6.04405 1.19902 12 1.19902C17.956 1.19902 22.801 6.04405 22.801 12C22.801 17.956 17.956 22.801 12 22.801C6.04405 22.801 1.19902 17.956 1.19902 12Z",fill:"#E35D5D"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(17.166 5.8902) rotate(45)",fill:"#E35D5D"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(6.83398 17.9239) rotate(-135)",fill:"#E35D5D"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(6 6.74185) rotate(-45)",fill:"#E35D5D"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.2041 8V0.706726C1.2041 0.316012 0.934814 0 0.602051 0C0.269287 0 0 0.316012 0 0.706726V8H1.2041Z",transform:"translate(18.0332 17.0724) rotate(135)",fill:"#E35D5D"}))};n.d(t,["A",0,i])},29386(e,t,n){var r;function o(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const i=function(){return o("svg",{width:"19",height:"17",viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,o("path",{d:"M0.976436 -4.35785e-07C0.445255 -4.35785e-07 2.38388e-07 0.432951 2.38388e-07 0.949454C2.38388e-07 1.46596 0.445255 1.89891 0.976436 1.89891C1.48809 1.89891 1.95287 1.46596 1.92944 0.972241C1.95287 0.429153 1.51152 -4.35785e-07 0.976436 -4.35785e-07Z",transform:"translate(8.52344 11.8682)",fill:"#FF6565"}),o("path",{d:"M18.5376 15.233C19.1508 14.2038 19.1548 12.9771 18.5455 11.9517L12.4291 1.65205C11.8237 0.615246 10.7301 -1.159e-09 9.50366 -1.159e-09C8.27726 -1.159e-09 7.18365 0.619044 6.57826 1.64825L0.454061 11.9593C-0.155235 12.9961 -0.151329 14.2304 0.465778 15.2596C1.07507 16.2774 2.16478 16.8889 3.38337 16.8889H15.6005C16.823 16.8889 17.9205 16.2698 18.5376 15.233ZM17.2097 14.4887C16.8699 15.0583 16.2684 
115.3963 15.5966 15.3963H3.37946C2.71549 15.3963 2.11791 15.0659 1.78592 14.5077C1.45003 13.9418 1.44612 13.2658 1.78201 12.6961L7.90622 2.38883C8.2382 1.82295 8.83188 1.48874 9.50366 1.48874C10.1715 1.48874 10.7691 1.82675 11.1011 2.39262L17.2214 12.6999C17.5495 13.2544 17.5456 13.9228 17.2097 14.4887Z",fill:"#FF6565"}),o("path",{d:"M0.753808 0.0268048C0.289025 0.155931 2.38388e-07 0.566095 2.38388e-07 1.06361C0.0234347 1.36364 0.0429633 1.66746 0.0663977 1.96749C0.132795 3.11063 0.199193 4.23099 0.26559 5.37413C0.289025 5.76151 0.597579 6.04255 0.995964 6.04255C1.39435 6.04255 1.70681 5.74252 1.72634 5.35134C1.72634 5.11588 1.72634 4.8994 1.74977 4.66014C1.79274 3.92716 1.8396 3.19418 1.88257 2.4612C1.906 1.98648 1.94897 1.51175 1.9724 1.03702C1.9724 0.866122 1.94896 0.714209 1.88257 0.562297C1.68337 0.136941 1.21859 -0.0795341 0.753808 0.0268048Z",transform:"translate(8.50391 5.17621)",fill:"#FF6565"}))};n.d(t,["A",0,i])},81358(e,t,n){var r;function o(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const i=function(){return o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},void 0,o("path",{d:"M5.9375 18.5938V6.40626C5.9375 6.14736 6.14736 5.93751 6.40625 5.93751H13L12.9688 8.0625C12.9688 8.58026 13.3885 9 13.9063 9H16.2188L16.25 10.1563H17.1875V8.28127C17.1883 8.15667 17.1393 8.0369 17.0516 7.94845L14.2391 5.13595C14.1506 5.0482 14.0309 4.9993 13.9063 5.00001H6.40625C5.62959 5.00001 5 5.62963 5 6.40626V18.5938C5 19.3705 5.62959 20.0001 6.40625 20.0001H9.68752V19.0626H6.40625C6.14739 19.0626 5.9375 18.8527 5.9375 18.5938Z",fill:"#FE9738"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.59091 12H10.9546C11.6072 12 12.1364 12.5373 12.1364 13.2V15C12.1364 15.6627 11.6072 16.2 10.9546 16.2H9.18182V18H8V12.6C8 12.2686 8.26454 12 8.59091 12ZM9.18182 15H10.0546C10.5516 15 10.9546 14.5971 10.9546 14.1C10.9546 13.6029 10.5516 13.2 10.0546 13.2H9.18182V15Z",fill:"#FE9738"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 12H13.3182C12.9918 12 12.7273 12.2686 12.7273 12.6V17.4C12.7273 17.7314 12.9918 18 13.3182 18H15C16 18 16.8636 16.8 16.8636 16V14C16.8636 13 16 12 15 12ZM15.6818 15.8C15.6818 16.3523 15.2341 16.8 14.6818 16.8H13.9091V13.2H14.6818C15.2341 13.2 15.6818 13.6477 15.6818 14.2V15.8Z",fill:"#FE9738"}),o("path",{d:"M21 12H18.0454C17.7191 12 17.4545 12.2686 17.4545 12.6V18H18.6364V15.6H21V14.4H18.6364V13.2H21V12Z",fill:"#FE9738"}))};n.d(t,["A",0,i])},52376(e,t,n){n.d(t,{M:()=>C});var r,o=n(96540),i=n(61225),a=n(17375),l=n(19504),s=n(69843),c=n(5070),u=n(48700),d=n(3373),f=n(75989),p=n(51470),m=n(34691),v=n(86671);function h(e,t,n,o){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=o;else if(a>1){for(var l=Array(a),s=0;s<a;s++)l[s]=arguments[s+3];t.children=l}if(t&&i)for(var c in i)void 0===t[c]&&(t[c]=i[c]);else t||(t=i||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function y(e){var t=e.fileDetails,n=e.plainTextDetails,r=e.mailDetails,o=e.detailsMode,i=e.notSupported,a=e.comments,l=e.onComment,s=e.einvoiceDetails,c=e.companyXid,u=e.onAcceptEinvoice,y=e.acceptingEinvoice;return h("div",{className:"container"},void 0,o===d.yw.TEXT&&h("div",{className:"m-1 text-wrapper"},void 0,n),o===d.yw.MAIL&&h("div",{className:"p-1"},void 0,h("p",{className:"text-wrapper font-bold"},void 0,r.title),h("div",{className:"text-wrapper"},void 0,r.bodyPlainText)),o===d.yw.IMG&&h(v.A,{className:"app-toolbar__image-preview mt-2",src:(0,p.vVK)(t.fileXid)},t.fileXid),o===d.yw.COMMENTS&&h("div",{className:"container px-4"},void 0,h(f.A,{comments:a,onSubmit:l})),o===d.yw.EINVOICE&&h("div",{},void 0,h(m.A,{data:s,companyXid:c,xid:String(t.fileXid),onAcceptEinvoice:u,acceptingEinvoice:y}
1)),o===d.yw.DOWNLOAD&&h("div",{className:"container d-flex flex-column align-items-center"},void 0,h("div",{className:"text-center mt-2 mb-2"},void 0,I18n.translate("preview.type.not.supported")),h("div",{},void 0,h("a",{className:"btn btn-primary","aria-label":"Download File",href:(0,p.i93)(t.fileXid),onClick:function(e){return e.stopPropagation()},download:!0},void 0,"Download"))),i&&h("div",{className:"container"},void 0,h("div",{className:"text-center mt-2"},void 0,I18n.translate("preview.type.not.supported"))))}var b,g=n(27545);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach(function(t){O(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==w(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t,n,r){b||(b="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:b,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function I(e){var t=e.type,n=e.selected,r=e.onClick;return P("button",{onClick:function(){return r(t)},type:"button",className:"btn btn-sm rounded-0 ".concat(n?"btn-light active default":"btn-white")},void 0,P(c.A,{type:t}))}function A(e){var t=e.show,n=e.newTabUrl,r=e.onHide,i=e.loading,a=e.actions,s=e.fileDetails,c=e.plainTextDetails,f=e.mailDetails,p=e.isPartOfPortfolio,m=e.companyXid,v=N((0,o.useState)(null),2),h=v[0],b=v[1],w=(0,d.pK)(s,c,f,h),S=N((0,o.useState)(!1),2),k=S[0],O=S[1],x=N((0,o.useState)(!1),2),A=x[0],C=x[1],j=N((0,o.useState)(w[0]),2),D=j[0],_=j[1],R=N((0,o.useState)([]),2),T=R[0],E=R[1],M=new u.g;(0,o.useEffect)(function(){_(w[0]),z(),s&&s.electronicInvoice?B(String(s.fileXid)):b(null)},[s]),(0,o.useEffect)(function(){w=(0,d.pK)(s,c,f,h),_(w[0])},[s,f,h,c]);var F=function(e){return M.registerRequest((0,l.ux)({companyXid:m,fileXid:s.fileXid,comment:e})).then(function(){return z()})}
1,z=function(){s&&M.registerRequest((0,l.h1)({fileXid:s.fileXid,companyXid:m})).then(function(e){return E(e.body.comments||[])})},B=function(e){O(!0),M.registerRequest((0,l.AO)(m,e)).then(function(e){b(e.body),O(!1)}).catch(function(){b(null),O(!1)})},H=function(e,t,n,r){C(!0),M.registerRequest((0,l.Vz)({companyXid:e,archiveFileXid:t,accepted:n,rejected:r})).then(function(){return B(t)}).finally(function(){return C(!1)})};var L=(0,o.useMemo)(function(){return s?s.fileName:I18n.translate("preview.title")},[s]);return P(g.A,{show:t,bsSize:"lg",class:"pdf-modal",title:P("div",{className:"app-toolbar__title-actions"},void 0,P("div",{className:"file-name ".concat(L.includes(" ")?"":"no-space")},void 0,L),P("div",{className:"file-details ".concat(s&&s.emailOnly?"":"with-text")},void 0,P("div",{className:"grid-tabs"},void 0,w.map(function(e){return P(I,{type:e,selected:D===e,onClick:_},e)}),p&&P(I,{type:d.yw.COMMENTS,selected:D===d.yw.COMMENTS,onClick:_},d.yw.COMMENTS)))),cancelBtnText:I18n.translate("button.close"),cancelBtnClassName:"btn btn-primary",btnClassName:"btn btn-default",submitBtnText:I18n.translate("preview.open.new.window"),onHide:function(){a&&a.hideFilePreview?a.hideFilePreview():r()},disableSubmit:!s||s.electronicInvoice,onSubmit:n&&function(){window.open(n,"_blank").focus()}},void 0,i||k?P("div",{className:"pdf-preview"},void 0,I18n.translate("preview.loading")):s?P(y,{fileDetails:s,plainTextDetails:c,mailDetails:f,notSupported:0==w.length,detailsMode:D,comments:T,onComment:F,onAcceptEinvoice:H,acceptingEinvoice:A,companyXid:m,einvoiceDetails:h}):null)}A.defaultProps={show:!1,loading:!1,url:"",newTabUrl:"",mimeType:"",onHide:function(){}};var C=(0,i.Ng)(function(e){return k(k({},e.filePreview),{},{isPartOfPortfolio:e.currentUser.user.isPartOfPortfolio,companyXid:e.companies.currentXid})},function(e){return{actions:(0,a.zH)({hideFilePreview:s.Vm},e)}})(A)},72914(e,t,n){var r=n(96540);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function a(e,t,n){return t=s(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}
1function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var d=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return e=a(this,t,[].concat(l)),n=e,o={Draggable:null},(r=u(r="state"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),o=t,(l=[{key:"componentDidMount",value:function(){var e=this;Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(4656)]).then(n.bind(n,84656)).then(function(t){return e.setState({Draggable:t.default})})}},{key:"render",value:function(){var e=this.state.Draggable;return e?r.createElement(e,this.props):null}}])&&i(o.prototype,l),s&&i(o,s),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,l,s}(r.PureComponent);const f=d;n.d(t,["A",0,f])},6150(e,t,n){var r=n(96540);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function a(e,t,n){return t=s(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}
1function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var d=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,l=new Array(i),s=0;s<i;s++)l[s]=arguments[s];return e=a(this,t,[].concat(l)),n=e,o={Droppable:null},(r=u(r="state"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),o=t,(l=[{key:"componentDidMount",value:function(){var e=this;Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(4128)]).then(n.bind(n,14128)).then(function(t){return e.setState({Droppable:t.default})})}},{key:"render",value:function(){var e=this.state.Droppable;return e?r.createElement(e,this.props):null}}])&&i(o.prototype,l),s&&i(o,s),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,l,s}(r.PureComponent);const f=d;n.d(t,["A",0,f])},23493(e,t,n){n.d(t,{AD:()=>l,Em:()=>i,Pv:()=>o,WI:()=>r,aC:()=>a});var r=500,o=r-140,i=1130,a=900,l=1207},54735(e,t,n){n.d(t,{G:()=>o,y:()=>i});var r=n(96540),o=(0,r.createContext)({windowWidth:null,showToolbar:!1,navBurger:!1,navCompact:!1});function i(){return(0,r.useContext)(o)}},92104(e,t,n){n.d(t,{C:()=>g});var r=n(96540);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){var e=d(),t=e.m(i),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===n||"GeneratorFunction"===(t.displayName||t.name))}var o={throw:1,return:2,break:3,continue:3};function f(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,o[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,a(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(i=function(){return{wrap:function(t,n,r,o){return e.w(f(t),n,r,o&&o.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(e,t){return new p(e,t)},AsyncIterator:u,async:function(e,t,n,o,i){return(r(t)?c:s)(f(e),t,n,o,i)},keys:l,values:a}})()}function a(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(o(e)+" is not iterable")}function l(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}}function s(e,t,n,r,o){var i=c(e,t,n,r,o);return i.next().then(function(e){return e.done?e.value:i.next()})}function c(e,t,n,r,o){return new u(d().w(e,t,n,r),o||Promise)}function u(e,t){function n(r,o,i,a){try{var l=e[r](o),s=l.value;return s instanceof p?t.resolve(s.v).then(function(e){n("next",e,i,a)},function(e){n("throw",e,i,a)}):t.resolve(s).then(function(e){l.value=e,i(l)},function(e){return n("throw",e,i,a)})}catch(e){a(e)}}var r;this.next||(f(u.prototype),f(u.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),f(this,"_invoke",function(e,o,i){function a(){return new t(function(t,r){n(e,i,t,r)})}return r=r?r.then(a,a):a()},!0)}function d(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var s=r&&r.prototype instanceof l?r:l,c=Object.create(s.prototype);return f(c,"_invoke",function(n,r,o){var i,l,s,c=0,u=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,l=0,s=e,f.n=n,a}};function p(n,r){for(l=n,s=r,t=0;!d&&c&&!o&&t<u.length;t++){var o,i=u[t],p=f.p,m=i[2];n>3?(o=m===r)&&(s=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(l=0,f.v=r,f.n=i[1]):p<m&&(
1o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,f.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,u,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,m),l=u,s=m;(t=l<2?e:s)||!d;){i||(l?l<3?(l>1&&(f.n=-1),p(l,s)):f.n=s:f.v=s);try{if(c=2,i){if(l||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,l<2&&(l=0)}else 1===l&&(t=i.return)&&t.call(i),l<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=e}else if((t=(d=f.n<0)?s:n.call(r,f))!==a)break}catch(t){i=e,l=1,s=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(f(t={},r,function(){return this}),t),p=c.prototype=l.prototype=Object.create(u);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,f(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=c,f(p,"constructor",c),f(c,"constructor",s),s.displayName="GeneratorFunction",f(c,o,"GeneratorFunction"),f(p),f(p,o,"Generator"),f(p,r,function(){return this}),f(p,"toString",function(){return"[object Generator]"}),(d=function(){return{w:i,m}})()}function f(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}f=function(e,t,n,r){function i(t,n){f(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},f(e,t,n,r)}function p(e,t){this.v=e,this.k=t}function m(e,t,n,r,o,i,a){try{var l=e[i](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var y="__single__",b=function(e){return new Promise(function(t){return setTimeout(t,e)})};function g(){var e=(0,r.useRef)(!1),t=(0,r.useRef)(new Set),n=v((0,r.useState)(null),2),o=n[0],a=n[1],l=(0,r.useCallback)(function(){var n,r=(n=i().mark(function n(r,o){var l,s,c,u;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(s="function"==typeof r?r:o,(l="function"==typeof r?y:r)!==y){n.next=8;break}if(!e.current){n.next=5;break}return n.abrupt("return");case 5:e.current=!0,n.next=13;break;case 8:if(!t.current.has(l)){n.next=12;break}return n.abrupt("return");case 12:t.current.add(l);case 13:return a(l),c=Date.now(),n.prev=15,n.next=18,s();case 18:return n.abrupt("return",n.sent);case 19:if(n.prev=19,!((u=400-(Date.now()-c))>0)){n.next=24;break}return n.next=24,b(u);case 24:return l===y?e.current=!1:t.current.delete(l),a(function(e){return e===l?null:e}),n.finish(19);case 27:case"end":return n.stop()}},n,null,[[15,,19,27]])}),function(){var e=this,t=arguments;return new Promise(function(r,o){var i=n.apply(e,t);function a(e){m(i,r,o,a,l,"next",e)}function l(e){m(i,r,o,a,l,"throw",e)}a(void 0)})});return function(e,t){return r.apply(this,arguments)}}(),[]),s=(0,r.useCallback)(function(e){return o===e},[o]);return{run:l,isPending:o===y,isPendingKey:s,isAnyPending:null!==o,pendingKey:o}}},38212(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function i(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{x:()=>f});var l=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"_matchId",null),i(this,"bookTransactionType",null),i(this,"bookTransactionId",null),i(this,"bookSourceIdType",null),i(this,"bookSourceXid",null),t){var n=t instanceof e;(n||t.hasOwnProperty("matchId"))&&(this._matchId=n?t._matchId:t.matchId),(n||t.hasOwnProperty("bookTransactionType"))&&(this.bookTransactionType=t.bookTransactionType),(n||t.hasOwnProperty("bookTransactionId"))&&(this.bookTransactionId=t.bookTransactionId),(n||t.hasOwnProperty("bookSourceIdType"))&&(this.bookSourceIdType=t.bookSourceIdType),(n||t.hasOwnProperty("bookSourceXid"))&&(this.bookSourceXid=t.bookSourceXid)}},(t=[{key:"matchId",get:function(){return"".concat(this.bookSourceIdType,"-").concat(this.bookSourceXid)}}])&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}();function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function u(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var f=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,"id",null),u(this,"bankAmount",null),u(this,"bankDate",null),u(this,"bankText",null),u(this,"matches",[]),u(this,"userNote",null),u(this,"hasDetail
1s",null),u(this,"subtractedBankFee",null),u(this,"amountBeforeFee",null),u(this,"mark",null),u(this,"entered",null),t){var n=t instanceof e;(n||t.hasOwnProperty("id"))&&(this.id=t.id),(n||t.hasOwnProperty("bankAmount"))&&(this.bankAmount=t.bankAmount),(n||t.hasOwnProperty("bankDate"))&&(this.bankDate=t.bankDate),(n||t.hasOwnProperty("bankText"))&&(this.bankText=t.bankText),(n||t.hasOwnProperty("matches"))&&(this.matches=(t.matches||[]).map(function(e){return new l(e)})),(n||t.hasOwnProperty("userNote"))&&(this.userNote=t.userNote),(n||t.hasOwnProperty("hasDetails"))&&(this.hasDetails=t.hasDetails),(n||t.hasOwnProperty("subtractedBankFee"))&&(this.subtractedBankFee=t.subtractedBankFee),(n||t.hasOwnProperty("amountBeforeFee"))&&(this.amountBeforeFee=t.amountBeforeFee),(n||t.hasOwnProperty("mark"))&&(this.mark=t.mark),(n||t.hasOwnProperty("entered"))&&(this.entered=t.entered)}},(t=[{key:"contains",value:function(e){var t=e.toLowerCase();return(this.bankDate||"").toLowerCase().includes(t)||(this.bankText||"").toLowerCase().includes(t)||(this.bankAmount||"").toLowerCase().includes(t)}},{key:"requestObject",get:function(){return{id:this.id,bankAmount:this.bankAmount,bankDate:this.bankDate,bankText:this.bankText,matches:this.matches,userNote:this.userNote,subtractedBankFee:this.subtractedBankFee,amountBeforeFee:this.amountBeforeFee}}}])&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}()},73731(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function i(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}const s=i(function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"id",null),a(this,"xid",null),a(this,"name",null),a(this,"source",null),a(this,"created",null),a(this,"address1",null),a(this,"address2",null),a(this,"address3",null),a(this,"streetName",null),a(this,"streetNo",null),a(this,"zipCode",null),a(this,"city",null),a(this,"countryCode",null),a(this,"invoiceAtt",null),a(this,"invoiceEmail",null),a(this,"paymentTermsType",null),a(this,"paymentTermsDays",null),a(this,"currency",null),a(this,"language",null),a(this,"identification",null),a(this,"privatePerson",!1),a(this,"phone",null),a(this,"electronicInvoiceDestinationType",null),a(this,"electronicInvoiceAddress",null),a(this,"invoiceFirst",!1),a(this,"fikFirst",!1),a(this,"onlineFirst",!1),t){var n=t instanceof e;(n||t.hasOwnProperty("id"))&&(this.id=t.id),(n||t.hasOwnProperty("xid"))&&(this.xid=t.xid),(n||t.hasOwnProperty("name"))&&(this.name=t.name),(n||t.hasOwnProperty("source"))&&(this.source=t.source),(n||t.hasOwnProperty("created"))&&(this.created=t.created),(n||t.hasOwnProperty("address1"))&&(this.address1=t.address1),(n||t.hasOwnProperty("address2"))&&(this.address2=t.address2),(n||t.hasOwnProperty("address3"))&&(this.address3=t.address3),(n||t.hasOwnProperty("streetName"))&&(this.streetName=t.streetName),(n||t.hasOwnProperty("streetNo"))&&(this.streetNo=t.streetNo),(n||t.hasOwnProperty("zipCode"))&&(this.zipCode=t.zipCode),(n||t.hasOwnProperty("city"))&&(this.city=t.city),(n||t.hasOwnProperty("countryCode"))&&(this.countryCode=t.countryCode),(n||t.hasOwnProperty("invoiceAtt"))&&(this.invoiceAtt=t.invoiceAtt),(n||t.hasOwnProperty("invoiceEmail"))&&(this.invoiceEmail=t.invoiceEmail),(n||t.hasOwnProperty("paymentTermsType"))&&(this.paymentTermsType=t.paymentTermsType),(n||t.hasOwnProperty("paymentTermsDays"))&&(this.paymentTermsDays=t.paymentTermsDays),(n||t.hasOwnProperty("currency"))&&(this.currency=t.currency),(n||t.hasOwnProperty("language"))&&(this.language=t.language),(n||t.hasOwnProperty("identification"))&&(this.identification=t.identification),(n||t.hasOwnProperty("privatePerson"))&&(this.privatePerson=t.privatePerson),(n||t.hasOwnProperty("phone"))&&(this.phone=t.phone),(n||t.hasOwnProperty("electronicInvoiceDestinationType"))&&(this.electronicInvoiceDestinationType=t.electronicInvoiceDestinationType),(n||t.hasOwnProperty("electronicInvoiceAddress"))&&(this.electronicInvoiceAddress=t.electronicInvoiceAddress),(n||t.hasOwnProperty("invoiceFirst"))&&(this.invoiceFirst=t.invoiceFirst),(n||t.hasOwnProperty("fikFirst"))&&(this.fikFirst=t.fikFirst),(n||t.hasOwnProperty("onlineFirst"))&&(this.onlineFirst=t.onlineFirst)}});n.d(t,["A",0,s])},20688(e,t,n){n.r(t),n.d(t,{AppPage:()=>mT});n(24684);var r=n(96540),o=n(24180),i=n(21241),a=n(20212),l=n(51470);var s=n(19504),c=n(61913),u=n(7237),d=n(10162),f=n.n(d),p=n(199),m=n(64286),v=n(59499);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g(r.key),r)}}function b(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}function w(){var e=window[p.ZA];return e?b({},e,window[p.$0]):{}}var S=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),b(this,"_client",null),b(this,"_connected",!1),b(this,"_subscribeContainers",{}),b(this,"_subscribedHandlers",{}),b(this,"onReceiveMessage",function(){}),b(this,"onConnected",null),b(this,"onDisconnect",null)},t=[{key:"connect",value:function(){var e=this;if(!this._client){var t=new u.Client({webSocketFactory:function(){return new(f())(l.Wtl)},connectHeaders:w(),reconnectDelay:1e4,heartbeatIncoming:1e4,heartbeatOutgoing:1e4,heartbeatStrategy:u.TickerStrategy.Worker,debug:m.wsListenerDebug?function(e){}:function(){},beforeConnect:function(){v.addDebugHistory({type:"websocket",status:"connecting"})}});this._client=t,t.onConnect=function(){if(e._client===t){e._connected=!0,e._subscribeContainers={},v.addDebugHistory({type:"websocket",status:"connected"});for(var n=0,r=Object.keys(e._subscribedHandlers);n<r.length;n++){var o=r[n];e._installSubscription(t,o,e._subscribedHandlers[o])}e.onConnected&&e.onConnected()}},t.onStompError=function(n){e._client===t&&v.addDebugHistory({type:"websocket",status:"connection_fail",error:n.headers&&n.headers.message||"STOMP error"})},t.onWebSocketClose=function(n){if(e._client===t){var r=e._connected;e._connected=!1,e._subscribeContainers={},r&&e.onDisconnect&&e.onDisconnect(n)}},t.activate()}}},{key:"_installSubscription",value:function(e,t,n){var r=this;v.addDebugHistory({type:"websocket",status:"subscribe",topic:t}
1),this._subscribeContainers[t]=e.subscribe(t,function(o){if(r._client===e){v.addDebugHistory({type:"websocket",status:"message_received",websocketMessage:o.body});try{r.onReceiveMessage(o)}catch(e){v.captureError(e,{componentName:"WSListener.onReceiveMessage",topic:t,websocketMessage:o.body},!1)}try{n(o)}catch(e){v.captureError(e,{componentName:"WSListener.subscriptionHandler",topic:t,websocketMessage:o.body},!1)}}},w())}},{key:"subscribe",value:function(e,t){this._subscribedHandlers[e]||(this._subscribedHandlers[e]=t,this._connected&&this._installSubscription(this._client,e,t))}},{key:"unsubscribe",value:function(e){v.addDebugHistory({type:"websocket",status:"unsubscribe",topic:e}),delete this._subscribedHandlers[e];var t=this._subscribeContainers[e];if(t){try{t.unsubscribe()}catch(e){v.captureError(e,{componentName:"WSListener.unsubscribe"},!1)}delete this._subscribeContainers[e]}}},{key:"disconnect",value:function(){v.addDebugHistory({type:"websocket",status:"disconnect"});var e=this._client;return this._client=null,this._connected=!1,this._subscribedHandlers={},this._subscribeContainers={},e?e.deactivate().catch(function(e){v.captureError(e,{componentName:"WSListener.disconnect"},!1)}):Promise.resolve()}}],t&&y(e.prototype,t),n&&y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),k=new S;function O(e,t){k.subscribe(e,t)}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function P(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e){var t=function(e,t){if("object"!=N(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==N(t)?t:t+""}var A,C=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),P(this,"_cvr",""),P(this,"_name",""),P(this,"_founded",""),P(this,"_adProtected",!1),P(this,"_zipDistrict",""),P(this,"_businessCode",""),P(this,"_businessCodeText",""),t){var n=t instanceof e;(n||t.hasOwnProperty("cvr"))&&(this.cvr=t.cvr),(n||t.hasOwnProperty("name"))&&(this.name=t.name),(n||t.hasOwnProperty("founded"))&&(this.founded=t.founded),(n||t.hasOwnProperty("adProtected"))&&(this.adProtected=t.adProtected),(n||t.hasOwnProperty("zipDistrict"))&&(this.zipDistrict=t.zipDistrict),(n||t.hasOwnProperty("businessCode"))&&(this.businessCode=t.businessCode),(n||t.hasOwnProperty("businessCodeText"))&&(this.businessCodeText=t.businessCodeText)}},(t=[{key:"cvr",get:function(){return this._cvr},set:function(e){this._cvr=e}},{key:"name",get:function(){return this._name},set:function(e){this._name=e}},{key:"founded",get:function(){return this._founded},set:function(e){this._founded=e}},{key:"adProtected",get:function(){return this._adProtected},set:function(e){this._adProtected=e}},{key:"zipDistrict",get:function(){return this._zipDistrict},set:function(e){this._zipDistrict=e}},{key:"businessCode",get:function(){return this._businessCode},set:function(e){this._businessCode=e}},{key:"businessCodeText",get:function(){return this._businessCodeText},set:function(e){this._businessCodeText=e}}])&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),j=n(48700),D=n(49665);function _(e,t,n,r){A||(A="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:A,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function E(){var e=R((0,r.useState)([]),2),t=e[0],n=e[1],o=R((0,r.useState)(!0),2),i=o[0],s=o[1],c=new j.g;(0,r.useEffect)(function(){return u(),function(){return c.abortAll()}},[]);var u=function(){c.registerRequest((0,a.RD)(l.Tv8)).then(function(e){n(e.body.crmCvrs.map(function(e){return new C(e)})),s(!1)}).catch(function(){return s(!1)})};return _(D.A,{title:I18n.translate("menu.account.our.partnercrm"),loadScreen:i},void 0,_("div",{className:"page-header"},void 0,_("h4",{className:"my-0"},void 0,I18n.translate("menu.account.our.partnercrm"))),_("div",{className:"container"},void 0,_("table",{className:"table-st"},void 0,_("thead",{className:"table-st__head"},void 0,_("tr",{},void 0,_("th",{width:"10%"},void 0,"CVR"),_("th",{},void 0,"Navn"),_("th",{width:"10%"},void 0,"Stiftet"),_("th",{width:"8%"},void 0,"Postnr"),_("th",{},void 0,"Branche"),_("th",{width:"8%"},void 0,"Reklamebeskyttet"))),_("tbody",{className:"table-st__body"},void 0,t.map(function(e){return _("tr",{},e.cvr,_("td",{},void 0,e.cvr),_("td",{},void 0,e.name),_("td",{},void 0,e.founded),_("td",{},void 0,e.zipDistrict),_("td",{},void 0,e.businessCodeText),_("td",{},void 0,e.adProtected?"Ja":"Nej"))})))))}var M,F=n(35766),z=n.n(F),B=n(22495),H=n.n(B),L=n(50369),$=n(97721),X=n(97219),V=n(5556),q=n.n(V),U=n(38221),W=n.n(U),Y=n(26864),K=n.n(Y),G=n(40961),Q=n(3373),Z=n(14670),J=n(96540),ee=n(59499);function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function ne(e,t,n,r){M||(M="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:M,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ce(r.key),r)}}function oe(e,t,n){return t=ae(t),function(e,t){if(t&&("object"==te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ie()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ie=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function le(e,t){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},le(e,t)}function se(e,t,n){return(t=ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e){var t=function(e,t){if("object"!=te(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=te(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==te(t)?t:t+""}var ue=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),se(n=oe(this,t,[e]),"state",{Picker:null,focused:!1,top:void 0,left:void 0,right:void 0}),se(n,"btnRef",J.createRef()),se(n,"insideElem",!1),se(n,"touched",!1),n.scrollHandler=W()(function(){if(n.inp){var e=(0,Q.NO)(n.inp),t=e.y,r=e.x,o=e.width,i=e.he
1ight;n.setState({top:t+i,left:r,right:document.body.clientWidth-r-o})}},100),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&le(e,t)}(t,e),r=t,o=[{key:"componentDidMount",value:function(){var e=this;Promise.all([n.e(2671),n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187)]).then(n.bind(n,30679)).then(function(t){return e.setState({Picker:t.CompactPicker})}).catch(function(t){ee.captureError(t,{code:Z.V6,message:"ColorPicker"}),e.setState({crushed:!0})})}},{key:"componentWillUnmount",value:function(){window.removeEventListener(p.ld,this.languageChangeHandler),window.removeEventListener("scroll",this.scrollHandler)}},{key:"handleClickOutside",value:function(){this.state.focused&&!this.insideElem&&this.setState({focused:!1})}},{key:"handleOpen",value:function(){var e=this;window.addEventListener("scroll",this.scrollHandler,!0),this.setState({focused:!0},function(){var t=(0,Q.NO)(e.btnRef.current),n=t.y,r=t.x,o=t.width,i=t.height;e.setState({top:n+i,left:r,right:document.body.clientWidth-r-o})})}},{key:"handleChange",value:function(e){var t=e.hex;this.props.onChange(t)}},{key:"handleClear",value:function(e){e.stopPropagation(),this.props.onChange("")}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.clearable,o=t.placeholder,i=t.pullRight,a=t.disabled,l=this.state,s=l.Picker,c=l.top,u=l.left,d=l.right,f=l.focused;return J.createElement("button",{ref:this.btnRef,type:"button",className:"form-control color-picker",onClick:this.handleOpen.bind(this),disabled:a},ne("div",{className:"square",style:{background:n}}),n||o,r&&n?ne("button",{className:"btn btn-link-dark p-0 ml-2",type:"button",onClick:this.handleClear.bind(this)},void 0,ne("i",{className:"fa fa-remove fa-lg","aria-hidden":"true"})):null,f&&G.createPortal(ne("div",{className:"DayPicker-portal-wrapper",style:{top:c,left:i?"":u,right:i?d:""},onMouseDown:function(){e.insideElem=!0},onMouseLeave:function(){e.insideElem=!1}},void 0,s&&ne(s,{color:n,onChangeComplete:this.handleChange.bind(this)})||"Loading ..."),document.body)||null)}}],o&&re(r.prototype,o),i&&re(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o,i}(J.PureComponent);const de=K()(ue);var fe,pe=n(91184),me=n(21886);function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function he(e,t,n,r){fe||(fe="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:fe,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ye(e){return function(e){if(Array.isArray(e))return be(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return be(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?be(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ge(Object(n),!0).forEach(function(t){Pe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ie(r.key),r)}}function ke(e,t,n){return t=Ne(t),function(e,t){if(t&&("object"==ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oe()?Reflect.construct(t,n||[],Ne(e).constructor):t.apply(e,n))}function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}function Ne(e){return Ne=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ne(e)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}function Pe(e,t,n){return(t=Ie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e){var t=function(e,t){if("object"!=ve(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ve(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ve(t)?t:t+""}var Ae=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Pe(e=ke(this,t,[].concat(r)),"methods",{}),Pe(e,"state",we(we({},me.c.initialState),{},{id:"".concat(Date.now(),"-").concat(Math.random())})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e;if(this.props.customLabel)e=this.props.customLabel;else if(this.props.label){var t,n=this.props.tooltip&&(Array.isArray(this.props.tooltip)?(t=I18n).translate.apply(t,ye(this.props.tooltip)):I18n.translate(this.props.tooltip));e=he("label",{className:"control-label ".concat(this.props.labelClassName||""),htmlFor:this.props.id||this.state.id},void 0,I18n.translate(this.props.label),!!n&&he(pe.$,{icon:"fa fa-info-circle space-left",tooltip:n}))}return this.renderWithValidation(he(de,{value:this.state.value,placeholder:this.props.placeholder,pullRight:this.props.pullRight,disabled:this.props.disabled,clearable:this.props.clearable,onChange:this.handleChange}),this.props.inputWrapper,this.props.labelWrapper(e),"color-picker-wrapper")}}])&&Se(n.prototype,r),o&&Se(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(me.c);Pe(Ae,"propTypes",{id:q().string,label:q().string,customLabel:q().element,tooltip:q().oneOfType([q().string,q().array]),placeholder:q().string,disabled:q().bool,clearable:q().bool,value:q().string,labelClassName:q().string,inputWrapperClassName:q().string,validators:q().arrayOf(q().func),inputWrapper:q().func,labelWrapper:q().func,onChange:q().func}),Pe(Ae,"defaultProps",we(we({},me.c.defaultProps),{},{onChange:function(){},validators:[],inputWrapper:function(e){return e},labelWrapper:function(e){return e}}));var Ce,je=n(54739);function De(e,t,n,r){Ce||(Ce="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ce,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const _e=function(e){var t=e.elementOptions,n=e.selectedImageId,r=e.onImageSelect,o=e.onImageDeselect,i=e.showCheckboxes,a=void 0===i||i,s=e.gridColumns,c=void 0===s?3:s,u=e.thumbnailHeight,d=void 0===u?60:u,f=function(e){n===e.id?o&&o(e.id):r&&r(e)},p=t.filter(function(e){return e.image});return De("div",{className:"image-selection"},void 0,De("div",{className:"image-grid",style:{gridTemplateColumns:"repeat(".concat(c,", 1fr)")}},void 0,p.map(function(e){var t=n===e.id,r=e.id?"".concat(l.Xcd,"administrator/fetchlogo?id=").concat(e.id):null;return De("div",{className:"image-item"},e.id,a&&De("div",{className:"image-checkbox"},void 0,De("input",{type:"checkbox",checked:t,onChange:function(){return f(e)}})),De("div",{className:"image-thumbnail",style:{height:"".concat(d,"px")},onClick:function(){return!a&&f(e)}},void 0,r?De("img",{src:r,alt:e.name}):De("div",{className:"image-placeholder"},void 0,De("i",{className:"fa fa-image"}))),De("div",{className:"image-label"},void 0,e.name))})),De("style",{jsx:!0},void 0,"\n        .image-selection {\n          margin-top: 8px;\n        }\n\n        .image-grid {\n          display: grid;\n          gap: 8px;\n          margin-bottom: 12px;\n        }\n\n        .image-item {\n          position: relative;\n          border: 1px solid #ddd;\n          border-radius: 4px;\n          padding: 4px;\n          text-align: center;\n          cursor: ".concat(a?"default":"pointer",";\n        }\n\n        .image-item:hover {\n          border-color: ").concat(a?"#ddd":"#007bff",";\n        }\n\n        .image-checkbox {\n          position: absolute;\n          top: 4px;\n          left: 4px;\n          z-index: 1;\n        }\n\n        .image-checkbox input {\n          width: 16px;\n          height: 16px;\n        }\n\n        .image-thumbnail {\n          width: 100%;\n          background: #f8f9fa;\n          border-radius: 2px;\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          margin-bottom: 4px;\n        }\n\n        .image-thumbnail img {\n          max-width: 100%;\n          max-height: 100%;\n          object-fit: contain;\n        }\n\n        .image-placeholder {\n          width: 100%;\n          height: 100%;\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          color: #ccc;\n          font-size: 24px;\n        }\n\n        .image-label {\n          font-size: 10px;\n          color: #666;\n          word-break: break-all;\n        }\n      ")))};var Re;function Te(e,t,n,r){Re||(Re="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Re,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const Ee=function(e){var t=e.option,n=e.onToggleClick,r=e.isUpDisabled,o=e.isDownDisabled,i=e.onReorder,a=e.isSelected,l=function(e,t){return function(n){n.stopPropagation(),t||i(e)}},s=function(e){return{background:e?"#f5f5f5":"none",border:e?"1px solid #e0e0e0":"none",cursor:e?"not-allowed":"pointer",color:e?"#ccc":"#666",padding:"4px 6px",fontSize:"12px",borderRadius:"3px",transition:"all 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"24px",height:"24px",opacity:e?.5:1}},c=function(e){return function(t){e||(t.currentTarget.style.backgroundColor="mou
1seenter"===t.type?"#e0e0e0":"transparent",t.currentTarget.style.color="mouseenter"===t.type?"#333":"#666")}};return Te("div",{className:"text-preview",onClick:n,style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"4px 0"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="transparent"}},void 0,Te("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},void 0,a&&Te(L.h,{className:"phi phi-settings_wheel_icon phi-lg","aria-label":"Settings"}),Te("span",{},void 0,t.name)),a&&Te("div",{className:"reorder-buttons",style:{display:"flex",gap:"2px"}},void 0,Te("button",{type:"button",onClick:l("up",r),disabled:r,style:s(r),onMouseEnter:c(r),onMouseLeave:c(r),title:"Flyt op"},void 0,Te("i",{className:"fa fa-chevron-up"})),Te("button",{type:"button",onClick:l("down",o),disabled:o,style:s(o),onMouseEnter:c(o),onMouseLeave:c(o),title:"Flyt ned"},void 0,Te("i",{className:"fa fa-chevron-down"}))))};var Me,Fe=n(25799),ze=n(62288),Be=function(e){switch(Number(e)){case 100:return"Thin";case 200:return"Extra Light";case 300:return"Light";case 400:default:return"Regular";case 500:return"Medium";case 600:return"Semibold";case 700:return"Bold";case 800:return"Extra Bold";case 900:return"Black"}};function He(e){return He="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(e)}function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach(function(t){Xe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xe(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=He(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==He(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ve(e,t,n,r){Me||(Me="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Me,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var qe={fontSize:[function(e){return(0,ze.A)().validate({value:e,options:{required:!0,min:5,max:72}})}]};const Ue=function(e){var t=e.fontFamily,n=e.fontSize,r=e.fontVariant,o=e.marginBottom,i=e.color,a=e.supportedFonts,l=void 0===a?[]:a,s=e.fontVariants,c=void 0===s?[]:s,u=e.fontFamilyLabel,d=void 0===u?"Skrifttype":u,f=e.fontSizeLabel,p=void 0===f?"Størrelse (px)":f,m=e.fontVariantLabel,v=void 0===m?"Variant":m,h=e.marginBottomLabel,y=void 0===h?"Afstand under (mm)":h,b=e.colorLabel,g=void 0===b?"Farve":b,w=e.onFontFamilyChange,S=e.onFontSizeChange,k=e.onFontVariantChange,O=e.onMarginBottomChange,N=e.onColorChange,x=e.disabled,P=void 0!==x&&x,I=e.readOnly,A=void 0!==I&&I,C=e.required,j=void 0!==C&&C,D=e.showLabels,_=void 0===D||D,R=e.showMarginBottom,T=void 0!==R&&R,E=e.showColor,M=void 0!==E&&E,F=e.layout,z=void 0===F?"horizontal":F,B=e.gridColumns,H=void 0===B?"2fr 1fr 1fr":B,L=e.width,$=void 0===L?"auto":L,X=e.className,V=void 0===X?"":X,q=e.style,U=void 0===q?{}:q,W=function(e){if(w){var t=l.find(function(t){return t.familyName===e}),n=t?t.variants:[],r=n.length>0?n[0].fid:null;w({fontFamilyName:e,fontVariants:n,fontVariant:r})}},Y=function(){return l.map(function(e){return{value:e.familyName,label:e.familyName}})},K=function(){return c.map(function(e){return{value:e.fid,label:"".concat(Be(e.fontWeight)).concat(e.italic?" Italic":"")}})},G=function(){return P||A||!t||0===c.length},Q=function(){return P||A||0===l.length},Z=function(){return P||A},J=function(){return P||A};return"vertical"===z?Ve("div",{className:"settings-section ".concat(V),style:U},void 0,Ve("div",{className:"settings-row",style:{gridTemplateColumns:"1fr 1fr",gap:"8px",marginBottom:"8px"}},void 0,Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,d),Ve(Fe.H,{value:t,options:Y(),onChange:W,disabled:Q(),required:j,noDeselect:!0})),Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,v),Ve(Fe.H,{value:r,options:K(),onChange:k,disabled:G(),required:j,noDeselect:!0}))),Ve("div",{className:"settings-row",style:{gridTemplateColumns:"1fr 1fr",gap:"8px",marginBottom:"8px"}},void 0,Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,p),Ve(je.x,{value:n,onChange:S,type:"number",disabled:Z(),required:j,validators:qe.fontSize})),M&&Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,g),Ve(Ae,{value:i||"#000000",onChange:N}))),T&&Ve("div",{className:"settings-row",style:{gridTemplateColumns:"1fr",gap:"8px"}},void 0,Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,y),Ve(je.x,{value:o,onChange:O,type:"number",disabled:J(),required:j})))):Ve("div",{className:"settings-row ".concat(V),style:$e({gridTemplateColumns:H,width:$},U)},void 0,Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,d),Ve(Fe.H,{value:t,options:Y(),onChange:W,disabled:Q(),required:j,noDeselect:!0})),Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,p),Ve(je.x,{value:n,onChange:S,type:"number",disabled:Z(),required:j,validators:qe.fontSize})),Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,v),Ve(Fe.H,{value:r,options:K(),onChange:k,disabled:G(),required:j,noDeselect:!0})),M&&Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,g),Ve(Ae,{value:i||"#000000",onChange:N})),T&&Ve("div",{className:"setting-item"},void 0,_&&Ve("label",{},void 0,y),Ve(je.x,{value:o,onChange:O,type:"number",disabled:J(),required:j})))};var We;function Ye(e,t,n,r){We||(We="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:We,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const Ke=function(e){var t=e.textContent,n=e.fontVariant,r=e.fontFamily,o=e.data,i=e.onFontFamilyChange,a=e.onFontVariantChange,l=e.onFontSizeChange,s=e.onColorChange,c=e.onMarginChange;return Ye("div",{className:"text-properties"},void 0,Ye(Ue,{fontFamily:n&&n.familyName?n.familyName:null,fontSize:t.fontChoice&&void 0!==t.fontChoice.fontSize&&null!==t.fontChoice.fontSize?t.fontChoice.fontSize:"",fontVariant:t.fontChoice&&t.fontChoice.fontId?t.fontChoice.fontId:null,color:t.textColor||"#000000",supportedFonts:o.supportedFonts||[],fontVariants:r&&r.variants?r.variants:[],onFontFamilyChange:function(e){e&&e.fontFamilyName&&i(e.fontFamilyName)},onFontSizeChange:l,onFontVariantChange:a,onColorChange:s,disabled:!o.supportedFonts||0===o.supportedFonts.length,layout:"vertical",showColor:!0,showMarginBottom:!0,onMarginBottomChange:function(e){var t="string"==typeof e?parseFloat(e):e;c(t)},marginBottom:t.textMarginBottom}))};var Ge;function Qe(e,t,n,r){Ge||(Ge="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ge,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Je(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Je(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const et=function(e){var t=e.option,n=e.isSelected,o=e.textContent,i=e.fontVariant,a=e.fontFamily,l=e.data,s=e.onToggleSelection,c=e.onFontFamilyChange,u=e.onFontVariantChange,d=e.onFontSizeChange,f=e.onColorChange,p=e.onMarginChange,m=e.isUpDisabled,v=e.isDownDisabled,h=e.onReorder,y=Ze((0,r.useState)(!1),2),b=y[0],g=y[1],w=function(e){e.stopPropagation(),n?s():(s(),g(!0))};return Qe("div",{className:"text-item",style:{transition:"background-color 0.2s ease",borderRadius:"4px",padding:"8px",marginBottom:"4px",position:"relative",zIndex:1}},void 0,Qe("div",{className:"text-checkbox",onClick:w},void 0,Qe("input",{type:"checkbox",checked:n,onChange:w})),Qe("div",{className:"text-content"},void 0,Qe(Ee,{option:t,onToggleClick:function(){n?g(!b):(s(),g(!0))},isUpDisabled:m,isDownDisabled:v,onReorder:h,isSelected:n}),n&&o&&b&&Qe(Ke,{textContent:o,fontVariant:i,fontFamily:a,data:l,onFontFamilyChange:c,onFontVariantChange:u,onFontSizeChange:d,onColorChange:f,onMarginChange:p})))};var tt;function nt(e,t,n,r){tt||(tt="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:tt,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const rt=function(e){var t=e.elementOptions,n=e.currentCell,r=e.data,o=e.handleTextSelection,i=e.handleRemoveContent,a=e.handleTextContentFontFamilyChange,l=e.handleTextContentFontVariantChange,s=e.handleTextContentFontSizeChange,c=e.handleTextContentColorChange,u=e.handleTextContentMarginChange,d=e.handleTextContentReorder,f=e.findVariantByFid;return nt("div",{className:"text-selection",style:{overflow:"visible",height:"auto",minHeight:"auto"}},void 0,nt("div",{className:"text-list",style:{overflow:"visible",height:"auto",minHeight:"auto"}},void 0,t.filter(function(e){return e.textBlock}).sort(function(e,t){var r=n.contents?n.contents.filter(function(e){return e.textElementId}).map(function(e){return e.textElementId}):[],o=r.indexOf(e.id),i=r.indexOf(t.id);return o>=0&&i>=0?o-i:o>=0?-1:i>=0?1:0}).map(function(e){var t=function(e){var t=n.contents&&n.contents.some(function(t){return t.textElementId===e.id}),o=t&&n.contents.find(function(t){return t.textElementId===e.id}),i=o&&o.fontChoice&&o.fontChoice.fontId?f(r.supportedFonts||[],o.fontChoice.fontId):null,a=r.supportedFonts&&r.supportedFonts.find(function(e){return e.familyName===(i&&i.familyName)}),l=!1,s=!1;if(t){var c=n.contents?n.contents.filter(function(e){return e.textElementId}):[],u=c.findIndex(function(t){return t.textElementId===e.id});l=0===u,s=u===c.length-1}return{isSelected:t,textContent:o,fontVariant:i,fontFamily:a,isUpDisabled:l,isDownDisabled:s}}(e),p=t.isSelected,m=t.textContent,v=t.fontVariant,h=t.fontFamily,y=t.isUpDisabled,b=t.isDownDisabled;return nt(et,{option:e,isSelected:p,textContent:m,fontVariant:v,fontFamily:h,data:r,onToggleSelection:function(){return p?i(e.id,"text"):o(e)},onFontFamilyChange:function(e){return a(m.textElementId,e)},onFontVariantChange:function(e){return l(m.textElementId,e)},onFontSizeChange:function(e){return s(m.textElementId,e)},onColorChange:function(e){return c(m.textElementId,e)},onMarginChange:function(e){return u(m.textElementId,e)},findVariantByFid:f,isUpDisabled:y,isDownDisabled:b,onReorder:function(t){return d(e.id,t)}},e.id)})))};function ot(e){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(e)}var it;function at(e,t,n,r){it||(it="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:it,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?lt(Object(n),!0).forEach(function(t){ct(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ct(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ot(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ot(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ut(e){return function(e){if(Array.isArray(e))return pt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ft(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||ft(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(e,t){if(e){if("string"==typeof e)return pt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(e,t):void 0}}function pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const mt=function(e){var t=e.selectedCell,n=e.data,o=e.onFrontPageDesignChange,i=function(){if(!t||!n.frontPageDesign)return"image";var e=n.frontPageDesign.rows.find(function(e){return e.rowNumber===t.rowNumber}),r=e&&e.cells&&e.cells[t.cellIndex];return r&&r.contents&&r.contents.some(function(e){return e.imageElementId})?"image":"text"},a=dt((0,r.useState)(i()),2),l=a[0],s=a[1];(0,r.useEffect)(function(){s(i())},[t]);var c=function(e){s(e)},u=function(e){if(t&&n.frontPageDesign){var r=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.map(function(t){if(t.rowNumber===r){var n=ut(t.cells);return n[i]=st(st({},n[i]),{},{contents:e}),st(st({},t),{},{cells:n})}return t});o(st(st({},n.frontPageDesign),{},{rows:a}))}},d=function(e,r){if(t&&n.frontPageDesign){var i=t.rowNumber,a=t.cellIndex;if("height"===e){for(var l=ut(n.frontPageDesign.rowHeights||[]);l.length<=i;)l.push(20);return l[i]=parseInt(r)||20,void o(st(st({},n.frontPageDesign),{},{rowHeights:l}))}if("width"===e){var s=n.frontPageDesign.rows.find(function(e){return e.rowNumber===i}),c=s&&s.cells&&s.cells[a];if(c&&c.colSpan&&c.colSpan>1)return;for(var u=s?v(s,a):a,d=ut(n.frontPageDesign.columnWidths||[]);d.length<=u;)d.push(20);return d[u]=parseInt(r)||20,void o(st(st({},n.frontPageDesign),{},{columnWidths:d}))}if(!e.startsWith("margin")||""!==r&&0!==r){var f=n.frontPageDesign.rows.map(function(t){if(t.rowNumber===i){var n=ut(t.cells);return n[a]=st(st({},n[a]),{},ct({},e,r)),st(st({},t),{},{cells:n})}return t});o(st(st({},n.frontPageDesign),{},{rows:f}))}else{var p=n.frontPageDesign.rows.map(function(t){if(t.rowNumber===i){var n=ut(t.cells);return n[a]=st(st({},n[a]),{},ct({},e,r)),st(st({},t),{},{cells:n})}return t});o(st(st({},n.frontPageDesign),{},{rows:p}))}}},f=function(e){if(t&&n.frontPageDesign){var r=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.map(function(t){if(t.rowNumber===r){var n=ut(t.cells),o=!1,a=!1;return"center"===e&&(o=!0),"right"===e&&(a=!0),n[i]=st(st({},n[i]),{},{alignCenter:o,alignRight:a}),st(st({},t),{},{cells:n})}return t});o(st(st({},n.frontPageDesign),{},{rows:a}))}},p=function(e,r){if(t&&n.frontPageDesign){var o=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.find(function(e){return e.rowNumber===o});if(a){var l=a.cells[i];if(l&&l.contents){var s=l.contents.filter(function(t){return"image"===r?t.imageElementId!==e
1:t.textElementId!==e});u(s)}}}},m=function(e,r){if(t&&n.frontPageDesign){var o=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.find(function(e){return e.rowNumber===o});if(a){var l=a.cells[i];if(l&&l.contents){var s=l.contents.find(function(e){return e.imageElementId});if(s){var c=r.replace(/[^0-9,]/g,""),d=parseFloat(c.replace(",","."));if(!(""===c||d<=0||isNaN(d))){var f=l.contents.map(function(t){return t.imageElementId===s.imageElementId?st(st({},t),{},ct({},e,c)):t});u(f)}}}}}};function v(e,t){for(var n=0,r=0;r<e.cells.length&&r!==t;r++)n+=e.cells[r].colSpan||1;return n}var h=function(e){return function(t){if(window.justSetToZero!==e){var n=t.replace(/\./g,",").replace(/[^0-9,]/g,""),r=n.split(",");if(!(r.length>2||2===r.length&&r[1].length>1))if(""!==n&&""!==t){if(!isNaN(parseFloat(n.replace(",",".")))){var o=parseFloat(n.replace(",","."));d(e,o)}}else d(e,"")}else window.justSetToZero=null}},y=function(e){return function(t,n){var r=n?n.state.value:"",o=String(r),i=o.replace(/\./g,",").replace(/[^0-9,]/g,"");if(""===i||""===o)window.justSetToZero=e,d(e,0);else if(!isNaN(parseFloat(i.replace(",",".")))){var a=parseFloat(i.replace(",","."));d(e,a)}}},b=function(e){return null!=e&&""!==e?String(e).replace(".",","):""};if(!t||!n.frontPageDesign)return at("div",{className:"properties-panel-empty"},void 0,at("p",{},void 0,"Tryk på et felt til venstre for at se/ændre indhold og design af indholdet."));var g,w,S=n.frontPageDesign.rows&&n.frontPageDesign.rows.find(function(e){return e.rowNumber===t.rowNumber}),k=S&&S.cells&&S.cells[t.cellIndex],O=n.elementOptions||n.frontPageDesign&&n.frontPageDesign.elementOptions||[];return k?at("div",{className:"properties-panel-content",style:{height:"auto",minHeight:"auto",overflow:"visible",maxHeight:"none"}},void 0,at("div",{className:"property-section"},void 0,at("h6",{},void 0,"Celle størrelse"),at("div",{className:"property-row"},void 0,at("div",{className:"property-item"},void 0,at("label",{},void 0,"Bredde (mm)"),at(je.x,{type:"number",value:function(){var e=S?v(S,t.cellIndex):t.cellIndex,r=n.frontPageDesign.columnWidths||[],o=k.colSpan||1;if(o>1){for(var i=0,a=0;a<o;a++)i+=Number(r[e+a]||0);return String(i)}return void 0!==r[e]&&null!==r[e]?String(r[e]):"20"}(),onChange:function(e){return d("width",e)},inputClassName:"compact-input",disabled:k.colSpan>1})),at("div",{className:"property-item"},void 0,at("label",{},void 0,"Højde (mm)"),at(je.x,{type:"number",value:(w=n.frontPageDesign.rowHeights||[],void 0!==w[t.rowNumber]&&null!==w[t.rowNumber]?String(w[t.rowNumber]):"20"),onChange:function(e){return d("height",e)},inputClassName:"compact-input"})))),at("div",{className:"property-section"},void 0,at("h6",{},void 0,"Margin"),at("div",{style:{display:"flex",gap:12,marginBottom:8}},void 0,at("div",{style:{flex:1,minWidth:0}},void 0,at("label",{style:{fontSize:12,fontWeight:500,color:"#666"}},void 0,"Venstre"),at(je.x,{type:"text",value:b(k.marginLeft),onChange:h("marginLeft"),onBlur:y("marginLeft"),inputClassName:"compact-input"})),at("div",{style:{flex:1,minWidth:0}},void 0,at("label",{style:{fontSize:12,fontWeight:500,color:"#666"}},void 0,"Højre"),at(je.x,{type:"text",value:b(k.marginRight),onChange:h("marginRight"),onBlur:y("marginRight"),inputClassName:"compact-input"})),at("div",{style:{flex:1,minWidth:0}},void 0,at("label",{style:{fontSize:12,fontWeight:500,color:"#666"}},void 0,"Op"),at(je.x,{type:"text",value:b(k.marginTop),onChange:h("marginTop"),onBlur:y("marginTop"),inputClassName:"compact-input"})),at("div",{style:{flex:1,minWidth:0}},void 0,at("label",{style:{fontSize:12,fontWeight:500,color:"#666"}},void 0,"Ned"),at(je.x,{type:"text",value:b(k.marginBottom),onChange:h("marginBottom"),onBlur:y("marginBottom"),inputClassName:"compact-input"}))),at("style",{jsx:!0},void 0,"\n          .compact-input {\n            padding: 6px 8px;\n            font-size: 15px;\n            height: 32px;\n            width: 100%;\n            min-width: 0;\n            box-sizing: border-box;\n          }\n        ")),at("div",{className:"property-section"},void 0,at("h6",{},void 0,"Justering"),at("div",{className:"alignment-buttons"},void 0,at("button",{className:"btn btn-sm ".concat(k.alignCenter||k.alignRight?"btn-default":"btn-primary"),onClick:function(){return f("left")},title:"Venstre"},void 0,at("i",{className:"fa fa-align-left"})),at("button",{className:"btn btn-sm ".concat(k.alignCenter?"btn-primary":"btn-default"),onClick:function(){return f("center")},title:"Centreret"},void 0,at("i",{className:"fa fa-align-center"})),at("button",{className:"btn btn-sm ".concat(k.alignRight?"btn-primary":"btn-default"),onClick:function(){return f("right")},title:"Højre"},void 0,at("i",{className:"fa fa-align-right"})))),at("div",{className:"property-section"},void 0,at("h6",{},void 0,"Baggrund"),at("div",{className:"alignment-buttons"},void 0,at(Ae,{value:k.backgroundColor||"#FFFFFF",onChange:function(e){if(t&&n.frontPageDesign){var r=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.map(function(t){if(t.rowNumber===r){var n=ut(t.cells);return n[i]=st(st({},n[i]),{},{backgroundColor:e}),st(st({},t),{},{cells:n})}return t});o(st(st({},n.frontPageDesign),{},{rows:a}))}}}))),at("div",{className:"property-section"},void 0,at("div",{className:"content-tabs"},void 0,at("button",{className:"tab-button ".concat("image"===l?"active":""),onClick:function(){return c("image")}},void 0,at("i",{className:"fa fa-image"}),"Billeder"),at("button",{className:"tab-button ".concat("text"===l?"active":""),onClick:function(){return c("text")}},void 0,at("i",{className:"fa fa-font"}),"Tekst")),"image"===l&&at("div",{className:"tab-content"},void 0,at("h6",{},void 0,"Vælg ét billede til denne celle"),at(_e,{elementOptions:O,selectedImageId:function(){if(!k.contents)return null;var e=k.contents.find(function(e){return e.imageElementId});return e?e.imageElementId:null}(),onImageSelect:function(e){if(t&&n.frontPageDesign){var r=t.rowNumber,o=t.cellIndex,i=n.frontPageDesign.rows.find(function(e){return e.rowNumber===r});if(i){var a=i.cells[o];if(a)if(!(a.contents&&a.contents.find(function(t){return t.imageElementId===e.id}))){var l={imageElementId:e.id,imageMaxWidth:"20",imageMaxHeight:"20",textElementId:null,textColor:null,textMarginBottom:null};u([l])}}}},onImageDeselect:function(e){return p(e,"image")},showCheckboxes:!0,gridColumns:3,thumbnailHeight:60}),(g=k.contents&&k.contents.find(function(e){return e.imageElementId}))?at("div",{className:"image-settings"},void 0,at("div",{className:"property-section"},void 0,at("label",{},void 0,"Maksimal bredde (mm)"),at(je.x,{type:"number",value:void 0!==g.imageMaxWidth&&null!==g.imageMaxWidth?g.imageMaxWidth:"",onCh
1ange:function(e){return m("imageMaxWidth",e)},required:!0})),at("div",{className:"property-section"},void 0,at("label",{},void 0,"Maksimal højde (mm)"),at(je.x,{type:"number",value:void 0!==g.imageMaxHeight&&null!==g.imageMaxHeight?g.imageMaxHeight:"",onChange:function(e){return m("imageMaxHeight",e)},required:!0}))):null),"text"===l&&at("div",{className:"tab-content",style:{height:"auto",minHeight:"auto",overflow:"visible",maxHeight:"none"}},void 0,at("h6",{},void 0,"Vælg de tekster du ønsker til denne celle"),at(rt,{elementOptions:O,currentCell:k,data:n,handleTextSelection:function(e){if(t&&n.frontPageDesign){var r=t.rowNumber,o=t.cellIndex,i=n.frontPageDesign.rows.find(function(e){return e.rowNumber===r});if(i){var a=i.cells[o];if(a){var l=(a.contents||[]).filter(function(e){return!e.imageElementId});if(!l.find(function(t){return t.textElementId===e.id})){var s={imageElementId:null,imageMaxWidth:"0",imageMaxHeight:"0",textElementId:e.id,textColor:"#000000",textMarginBottom:"4,5",fontChoice:{fontId:n.supportedFonts&&n.supportedFonts.length>0&&n.supportedFonts[0].variants&&n.supportedFonts[0].variants.length>0?n.supportedFonts[0].variants[0].fid:null,fontSize:"12"}};l=[].concat(ut(l),[s]),u(l)}}}}},handleRemoveContent:p,handleTextContentFontFamilyChange:function(e,r){if(t&&n.frontPageDesign){var o=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.find(function(e){return e.rowNumber===o});if(a){var l=a.cells[i];if(l&&l.contents){var s=n.supportedFonts&&n.supportedFonts.find(function(e){return e.familyName===r}),c=s&&s.variants&&s.variants.length>0?s.variants[0].fid:null,d=l.contents.map(function(t){return t.textElementId===e?st(st({},t),{},{fontChoice:{fontId:c,fontSize:t.fontChoice&&t.fontChoice.fontSize?t.fontChoice.fontSize:"12"}}):t});u(d)}}}},handleTextContentFontVariantChange:function(e,r){if(t&&n.frontPageDesign){var o=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.find(function(e){return e.rowNumber===o});if(a){var l=a.cells[i];if(l&&l.contents){var s=l.contents.map(function(t){return t.textElementId===e?st(st({},t),{},{fontChoice:{fontId:r,fontSize:t.fontChoice&&t.fontChoice.fontSize?t.fontChoice.fontSize:"12"}}):t});u(s)}}}},handleTextContentFontSizeChange:function(e,r){if(t&&n.frontPageDesign){var o=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.find(function(e){return e.rowNumber===o});if(a){var l=a.cells[i];if(l&&l.contents){var s=l.contents.map(function(t){return t.textElementId===e?st(st({},t),{},{fontChoice:{fontId:t.fontChoice&&t.fontChoice.fontId?t.fontChoice.fontId:null,fontSize:r}}):t});u(s)}}}},handleTextContentColorChange:function(e,r){if(t&&n.frontPageDesign){var o=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.find(function(e){return e.rowNumber===o});if(a){var l=a.cells[i];if(l&&l.contents){var s=l.contents.map(function(t){return t.textElementId===e?st(st({},t),{},{textColor:r}):t});u(s)}}}},handleTextContentMarginChange:function(e,r){if(t&&n.frontPageDesign){var o=t.rowNumber,i=t.cellIndex,a=n.frontPageDesign.rows.find(function(e){return e.rowNumber===o});if(a){var l=a.cells[i];if(l&&l.contents)if(0!==r&&""!==r){if(!(r<0||isNaN(r))){var s=l.contents.map(function(t){return t.textElementId===e?st(st({},t),{},{textMarginBottom:r}):t});u(s)}}else{var c=l.contents.map(function(t){return t.textElementId===e?st(st({},t),{},{textMarginBottom:""}):t});u(c)}}}},handleTextContentReorder:function(e,r){if(t&&void 0!==t.rowNumber&&n.frontPageDesign){var o=n.frontPageDesign.rows.find(function(e){return e.rowNumber===t.rowNumber}),i=o&&o.cells&&o.cells[t.cellIndex];if(i&&i.contents){var a=i.contents.filter(function(e){return e.textElementId});if(!(a.length<=1)){var l=a.findIndex(function(t){return t.textElementId===e});if(-1!==l&&!("up"===r&&0===l||"down"===r&&l===a.length-1)){var s=ut(a),c="up"===r?l-1:l+1,d=[s[c],s[l]];s[l]=d[0],s[c]=d[1];var f=i.contents.filter(function(e){return e.imageElementId});u([].concat(ut(f),ut(s)))}}}}},findVariantByFid:function(e,t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ft(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(e);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=o.variants.find(function(e){return e.fid===t});if(i)return st(st({},i),{},{familyName:o.familyName})}}catch(e){r.e(e)}finally{r.f()}return null}})))):at("div",{className:"properties-panel-empty"},void 0,at("p",{},void 0,"Kunne ikke finde den valgte celle"))};var vt,ht=n(23087),yt=n(13545),bt=n(83356),gt=n(51684),wt=n(86882);function St(){return St=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},St.apply(null,arguments)}function kt(e){return r.createElement("svg",St({xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"#e3e3e3"},e),vt||(vt=r.createElement("path",{d:"M120-120v-80h720v80H120zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm160 320v-80h80v80h-80zm0-320v-80h80v80h-80zm160 480v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm160 320v-80h80v80h-80zm0-320v-80h80v80h-80zm160 480v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80z"})))}n.p;var Ot;function Nt(){return Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nt.apply(null,arguments)}function xt(e){return r.createElement("svg",Nt({xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"#e3e3e3"},e),Ot||(Ot=r.createElement("path",{d:"M120-120v-720h80v720h-80zm160 0v-80h80v80h-80zm0-320v-80h80v80h-80zm0-320v-80h80v80h-80zm160 640v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm160 640v-80h80v80h-80zm0-320v-80h80v80h-80zm0-320v-80h80v80h-80zm160 640v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80z"})))}n.p;var Pt;function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(null,arguments)}function At(e){return r.createElement("svg",It({xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"#e3e3e3"},e),Pt||(Pt=r.createElement("path",{d:"M120-120v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm160 640v-80h80v80h-80zm0-320v-80h80v80h-80zm0-320v-80h80v80h-80zm160 640v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm160 640v-80h80v80h-80zm0-320v-80h80v80h-80zm0-320v-80h80v80h-80zm160 640v-720h80v720h-80z"})))}n.p;var Ct;function jt(){return jt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jt.apply(null,arguments)}function Dt(e){return r.createElement("svg",jt({xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"#e3e3e3"},e),Ct||(Ct=r.createElement("path",{d:"M120-120v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h720v80H120zm160 640v-80h80v80h-80zm0-320v-80h80v80h-80zm160 320v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm160 480v-80h80v80h-80zm0-320v-80h80v80h-80zm160 320v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80zm0-160v-80h80v80h-80z"})))}n.p;var _t;function Rt(){return Rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rt.apply(null,arguments)}function Tt(e){return r.createElement("svg",Rt({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),_t||(_t=r.createElement("path",{fill:"#000",d:"M3 3h18v2H3zM19 5h2v16h-2zM3 19h16v2H3zM3 12l4-4v8l-4-4z"})))}n.p;var Et;function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mt.apply(null,arguments)}function Ft(e){return r.createElement("svg",Mt({width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Et||(Et=r.createElement("path",{fill:"#000",d:"M3 3h2v18H3zM5 3h16v2H5zM5 19h16v2H5zM21 12l-4 4V8l4 4z"})))}n.p;var zt;function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bt.apply(null,arguments)}function Ht(e){return r.createElement("svg",Bt({xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",fill:"#e3e3e3"},e),zt||(zt=r.createElement("path",{d:"M200-160q-33 0-56.5-23.5T120-240v-480q0-33 23.5-56.5T200-800h160v80H200v480h160v80H200zm240 80v-800h80v80h240q33 0 56.5 23.5T840-720v480q0 33-23.5 56.5T760-160H520v80h-80zm80-160h240v-480H520v480zm-320 0v-480 480zm560 0v-480 480z"})))}n.p;function Lt(e){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lt(e)}function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?$t(Object(n),!0).forEach(function(t){Vt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Lt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qt;function Ut(e,t,n,r){qt||(qt="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:qt,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Wt=function(e){var t=e.isOpen,n=e.onToggle,o=e.children,i=e.trigger,a=e.position,l=void 0===a?"bottom-right":a,s=(0,r.useRef)(null);(0,r.useEffect)(function(){var e=function(e){s.current&&!s.current.contains(e.target)&&n(!1)};return t&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[t,n]);return r.createElement("div",{style:{position:"relative",display:"inline-block"},ref:s},Ut("div",{onClick:function(){return n(!t)},style:{cursor:"pointer"}},void 0,i),t&&Ut("div",{style:Xt(Xt({position:"absolute"},function(){switch(l){case"bottom-right":default:return{top:"100%",right:0};case"bottom-left":return{top:"100%",left:0};case"top-right":return{bottom:"100%",right:0};case"top-left":return{bottom:"100%",left:0}}}()),{},{backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",border:"1px solid #e0e0e0",minWidth:"250px",zIndex:1e3,padding:"8px 0",marginTop:"4px"})},void 0,o))},Yt=function(e){var t=e.icon,n=e.text,r=e.onClick,o=e.disabled,i=void 0!==o&&o;return Ut("div",{onClick:i?void 0:r,style:{display:"flex",alignItems:"center",padding:"8px 16px",cursor:i?"default":"pointer",color:i?"#999":"#333",fontSize:"14px",gap:"12px",transition:"background-color 0.2s ease",":hover":{backgroundColor:i?"transparent":"#f5f5f5"}},onMouseEnter:function(e){i||(e.target.style.backgroundColor="#f5f5f5")},onMouseLeave:function(e){i||(e.target.style.backgroundColor="transparent")}},void 0,Ut("div",{style:{width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}},void 0,t),Ut("span",{style:{flex:1}},void 0,n))},Kt=function(){return Ut("div",{style:{height:"1px",backgroundColor:"#e0e0e0",margin:"4px 0"}})},Gt=function(){return Ut(Dt,{style:{width:"24px",height:"24px"},fill:"#333"})},Qt=function(){return Ut(kt,{style:{width:"24px",height:"24px"},fill:"#333"})},Zt=function(){return Ut(xt,{style:{width:"24px",height:"24px"},fill:"#333"})},Jt=function(){return Ut(At,{style:{width:"24px",height:"24px"},fill:"#333"})}
1,en=function(){return Ut("i",{className:"fa fa-trash",style:{fontSize:"20px",color:"#333"},"aria-hidden":"true"})},tn=function(){return Ut(Tt,{style:{width:"24px",height:"24px"},fill:"#333"})},nn=function(){return Ut(Ft,{style:{width:"24px",height:"24px"},fill:"#333"})},rn=function(){return Ut(Ht,{style:{width:"24px",height:"24px"},fill:"#333"})};const on=function(e){var t=e.trigger,n=e.isOpen,r=e.onToggle,o=e.onAddRow,i=e.onAddColumn,a=e.onDeleteContent,l=e.onDeleteRow,s=e.onDeleteColumn,c=e.onMergeLeft,u=e.onMergeRight,d=e.onSplitCell,f=e.canAddRow,p=e.canAddColumnLeft,m=e.canAddColumnRight,v=e.canDeleteContent,h=e.canDeleteRow,y=e.canDeleteColumn,b=e.canMergeLeft,g=e.canMergeRight,w=f||p||m,S=v||h||y,k=b||g,O=e.canSplitCell;return Ut(Wt,{trigger:t,isOpen:n,onToggle:r,position:"bottom-right"},void 0,w&&Ut("div",{},void 0,f&&Ut("div",{},void 0,Ut(Yt,{icon:Ut(Gt,{}),text:"Tilføj række over",onClick:function(){o("above"),r(!1)}}),Ut(Yt,{icon:Ut(Qt,{}),text:"Tilføj række under",onClick:function(){o("below"),r(!1)}})),p&&Ut(Yt,{icon:Ut(Zt,{}),text:"Tilføj kolonne venstre",onClick:function(){i("left"),r(!1)}}),m&&Ut(Yt,{icon:Ut(Jt,{}),text:"Tilføj kolonne højre",onClick:function(){i("right"),r(!1)}})),w&&k&&Ut(Kt,{}),k&&Ut("div",{},void 0,b&&Ut(Yt,{icon:Ut(tn,{}),text:"Foren med celle til venstre",onClick:function(){c(),r(!1)}}),g&&Ut(Yt,{icon:Ut(nn,{}),text:"Foren med celle til højre",onClick:function(){u(),r(!1)}})),O&&(w||k)&&Ut(Kt,{}),O&&Ut("div",{},void 0,Ut(Yt,{icon:Ut(rn,{}),text:"Opdel celle",onClick:function(){d(),r(!1)}})),S&&(w||k||O)&&Ut(Kt,{}),S&&Ut("div",{},void 0,h&&Ut(Yt,{icon:Ut(en,{}),text:"Slet række",onClick:function(){l(),r(!1)}}),y&&Ut(Yt,{icon:Ut(en,{}),text:"Slet kolonne",onClick:function(){s(),r(!1)}}),v&&Ut(Yt,{icon:Ut(en,{}),text:"Slet indhold",onClick:function(){a(),r(!1)}})))};function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}var ln;function sn(e,t,n,r){ln||(ln="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ln,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach(function(t){dn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=an(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=an(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==an(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e){return function(e){if(Array.isArray(e))return vn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||mn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||mn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mn(e,t){if(e){if("string"==typeof e)return vn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vn(e,t):void 0}}function vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const hn=function(e){var t=e.data,n=e.minRows,o=void 0===n?1:n,i=e.maxRows,a=void 0===i?10:i,l=e.minColumns,s=void 0===l?1:l,c=e.maxColumns,u=void 0===c?10:c,d=e.onChange,f=e.onCellSelect,p=e.selectedCell,m=t,v=pn((0,r.useState)(null),2),h=v[0],y=v[1],b=function(e){d&&d(e)};if(!m||!m.rows)return null;if(!m.numberOfRows||!m.numberOfColumns)return null;var g,w,S=function(e,t,n,r){var i,a=m.rows.find(function(e){return e.rowNumber===n}),l=a.cells[r];switch(e){case"delete-content":i=m.rows.map(function(e){if(e.rowNumber===n){var t=fn(e.cells);return t[r]=un(un({},t[r]),{},{contents:[]}),un(un({},e),{},{cells:t})}return e}),b(un(un({},m),{},{rows:i}));break;case"merge-left":if(r>0){var c=a.cells[r-1],u=fn(a.cells);if(c.contents&&c.contents.length>0&&l.contents&&l.contents.length>0)return;var d=c.contents&&c.contents.length>0?c.contents:l.contents;u[r-1]=un(un({},c),{},{colSpan:c.colSpan+l.colSpan,contents:d}),u.splice(r,1),i=m.rows.map(function(e){return e.rowNumber===n?un(un({},e),{},{cells:u}):e}),b(un(un({},m),{},{rows:i}))}break;case"merge-right":if(r<a.cells.length-1){var f=a.cells[r+1],p=fn(a.cells);if(l.contents&&l.contents.length>0&&f.contents&&f.contents.length>0)return;var v=l.contents&&l.contents.length>0?l.contents:f.contents;p[r]=un(un({},l),{},{colSpan:l.colSpan+f.colSpan,contents:v}),p.splice(r+1,1),i=m.rows.map(function(e){return e.rowNumber===n?un(un({},e),{},{cells:p}):e}),b(un(un({},m),{},{rows:i}))}break;case"split":if(l.colSpan>1){var h=fn(a.cells),y=Math.floor(l.colSpan/2);h.splice(r,1,un(un({},l),{},{colSpan:y}),un(un({},l),{},{id:0,colSpan:l.colSpan-y,contents:[]})),i=m.rows.map(function(e){return e.rowNumber===n?un(un({},e),{},{cells:h}):e}),b(un(un({},m),{},{rows:i}))}break;case"delete-row":if(m.rows.length<=o)return;i=m.rows.filter(function(e){return e.rowNumber!==n}).map(function(e){return un(un({},e),{},{rowNumber:e.rowNumber>n?e.rowNumber-1:e.rowNumber})});var g=(m.rowHeights||[]).filter(function(e,t){return t!==n});b(un(un({},m),{},{numberOfRows:m.numberOfRows-1,rows:i,rowHeights:g}));break;case"delete-column":if(m.numberOfColumns<=s)return;i=m.rows.map(function(e){for(var t=fn(e.cells),n=0,o=-1,i=0;i<t.length;i++){var a=t[i],l=n,s=n+a.colSpan-1;if(l<=r&&s>=r){a.colSpan>1?t[i]=un(un({},a),{},{colSpan:a.colSpan-1}):o=i;break}n+=a.colSpan}return-1!==o&&t.splice(o,1),un(un({},e),{},{cells:t})});var w=(m.columnWidths||[]).filter(function(e,t){return t!==r});b(un(un({},m),{},{numberOfColumns:m.numberOfColumns-1,rows:i,columnWidths:w}))}},k=function(e){if(!e.contents||0===e.contents.length)return"empty";var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=mn(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(e.contents);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.imageElementId||r.imageMaxWidth&&"0"!==r.imageMaxWidth||r.imageMaxHeight&&"0"!==r.imageMaxHeight)return"image";if(r.textElementId||r.textColor||r.textMarginBottom)return"text"}}catch(e){n.e(e)}finally{n.f()}return"empty"},O=(g=function(){var e={};
1return m.rows.forEach(function(t){t.cells.forEach(function(n,r){(n.contents||[]).forEach(function(n){null!=n.imageElementId&&(e[n.imageElementId]||(e[n.imageElementId]=[]),e[n.imageElementId].push({row:t.rowNumber,cell:r})),null!=n.textElementId&&(e[n.textElementId]||(e[n.textElementId]=[]),e[n.textElementId].push({row:t.rowNumber,cell:r}))})})}),e}(),w=[],(m.elementOptions||m.frontPageDesign&&m.frontPageDesign.elementOptions||[]).forEach(function(e){if(!e.requiredUse||g[e.id]&&0!==g[e.id].length||w.push("Element '".concat(e.name,"' skal bruges mindst én gang, men bruges ikke.")),e.maxOneUsage&&g[e.id]&&g[e.id].length>1){var t=g[e.id].map(function(e){return"række ".concat(e.row+1,", celle ").concat(e.cell+1)}).join("; ");w.push("Element '".concat(e.name,"' må kun bruges én gang, men bruges flere steder: ").concat(t))}}),w),N=function(){var e=[],t=(m.rowHeights||m.frontPageDesign&&m.frontPageDesign.rowHeights||[]).reduce(function(e,t){return e+(t||0)},0),n=(m.columnWidths||m.frontPageDesign&&m.frontPageDesign.columnWidths||[]).reduce(function(e,t){return e+(t||0)},0);if(297!==t){var r=297-t,o=r>0?"tilføjes":"fjernes",i=Math.abs(r);e.push("Rækkerne skal have en samlet højde på ".concat(297,"mm (svarende til et A4 papir). Den nuværende højde er ").concat(t,"mm. Der skal ").concat(o," ").concat(i,"mm"))}if(210!==n){var a=210-n,l=a>0?"tilføjes":"fjernes",s=Math.abs(a);e.push("Kolonnerne skal have en samlet bredde på ".concat(210,"mm (svarende til et A4 papir). Den nuværende bredde er ").concat(n,"mm. Der skal ").concat(l," ").concat(s,"mm"))}return e}(),x=[].concat(fn(O),fn(N));return sn("div",{className:"table-based-page-designer"},void 0,sn("div",{className:"grid-container",style:{display:"grid",gridTemplateAreas:"\n        'table'\n      ",gridTemplateColumns:"1fr",gridTemplateRows:"auto",gap:"8px",height:"fit-content"}},void 0,sn("div",{style:{gridArea:"table",height:"fit-content"}},void 0,sn("table",{className:"table table-bordered",style:{marginBottom:0}},void 0,sn("tbody",{},void 0,m.rows.map(function(e){return sn("tr",{},e.rowNumber,e.cells.map(function(t,n){var r=p&&p.rowNumber===e.rowNumber&&p.cellIndex===n;return sn("td",{colSpan:t.colSpan,className:"cell".concat(r?" selected-cell":""),style:{width:"".concat(t.colSpan/m.numberOfColumns*100,"%"),border:"1px solid #dee2e6",backgroundColor:r?"#e6f0ff":"#f8f9fa",position:"relative",cursor:"pointer",boxShadow:r?"0 0 0 2px #007bff":void 0},onClick:function(t){return function(e,t,n){if(!n.target.closest(".dropdown")){var r=m.rows.find(function(t){return t.rowNumber===e}).cells[t];f&&f({rowNumber:e,cellIndex:t,cell:r,cellId:r.id})}}(e.rowNumber,n,t)}},"".concat(e.rowNumber,"-").concat(n),"empty"===k(t)&&sn("div",{className:"add-element-icon",style:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",color:"#28a745",cursor:"pointer",gap:"8px",zIndex:1,pointerEvents:"none"}},void 0,sn(wt.A,{className:"phi phi-2x","aria-label":"Add element",style:{color:"#28a745"}}),sn("span",{style:{color:"#666",fontWeight:"500"}},void 0,"Tilpas felt")),("empty"!==k(t)||t.contents&&t.contents.length>0)&&sn("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"flex-start",width:"100%",padding:"8px",position:"relative"}},void 0,t.contents.map(function(e,t){var n=(m.elementOptions||m.frontPageDesign&&m.frontPageDesign.elementOptions||[]).find(function(t){return t.id===e.imageElementId||t.id===e.textElementId}),r=e.imageElementId||e.imageMaxWidth&&"0"!==e.imageMaxWidth||e.imageMaxHeight&&"0"!==e.imageMaxHeight,o=e.textElementId||e.textColor||e.textMarginBottom,i=!r&&!o;return sn("div",{style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",marginBottom:"4px"}},t,sn("div",{style:{border:"1px solid #dee2e6",borderRadius:"4px",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},void 0,r&&sn(ht.h,{className:"phi phi-1_6x","aria-hidden":"true"}),o&&sn(bt.h,{className:"phi phi-1_6x","aria-hidden":"true"}),i&&sn("span",{style:{fontSize:"12px",color:"#666"}},void 0,"?")),sn("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},void 0,n?n.name:r?"Billede":o?"Tekst":"Indhold"))}
1)),sn("div",{style:{position:"absolute",top:"5px",right:"5px"}},void 0,sn(on,{trigger:sn(yt.h,{className:"phi phi-1_6x","aria-label":"Actions"}),isOpen:h==="".concat(e.rowNumber,"-").concat(n),onToggle:function(t){y(t?"".concat(e.rowNumber,"-").concat(n):null)},onAddRow:function(t){return function(e,t){if(!(m.rows.length>=a)){for(var n,r,o=[],i=0;i<m.numberOfColumns;i++)o.push({id:0,colSpan:1,contents:[]});"above"===e?(n=t,r=m.rows.map(function(e){return un(un({},e),{},{rowNumber:e.rowNumber>=t?e.rowNumber+1:e.rowNumber})})):(n=t+1,r=m.rows.map(function(e){return un(un({},e),{},{rowNumber:e.rowNumber>t?e.rowNumber+1:e.rowNumber})}));var l={rowNumber:n,cells:o},s=fn(m.rowHeights||[]);"above"===e?s.splice(t,0,20):s.splice(t+1,0,20),b(un(un({},m),{},{numberOfRows:m.numberOfRows+1,rows:[].concat(fn(r),[l]).sort(function(e,t){return e.rowNumber-t.rowNumber}),rowHeights:s}))}}(t,e.rowNumber)},onAddColumn:function(e){return function(e,t){if(!(m.numberOfColumns>=u)){for(var n=m.rows.map(function(n){var r=fn(n.cells),o={id:0,colSpan:1,contents:[]};return"left"===e?r.splice(t,0,o):r.push(o),un(un({},n),{},{cells:r})}),r=m.numberOfColumns+1,o=Math.floor(210/r),i=210-r*o,a=[],l=0;l<r;l++)0===l?a.push(o+i):a.push(o);b(un(un({},m),{},{numberOfColumns:m.numberOfColumns+1,rows:n,columnWidths:a}))}}(e,n)},onDeleteContent:function(){return S("delete-content",t.id,e.rowNumber,n)},onDeleteRow:function(){return S("delete-row",t.id,e.rowNumber,n)},onDeleteColumn:function(){return S("delete-column",t.id,e.rowNumber,n)},onMergeLeft:function(){return S("merge-left",t.id,e.rowNumber,n)},onMergeRight:function(){return S("merge-right",t.id,e.rowNumber,n)},onSplitCell:function(){return S("split",t.id,e.rowNumber,n)},canAddRow:m.rows.length<a,canAddColumnLeft:m.numberOfColumns<u&&0===n,canAddColumnRight:m.numberOfColumns<u&&n===e.cells.length-1,canDeleteContent:"empty"!==k(t),canDeleteRow:m.rows.length>o,canDeleteColumn:m.numberOfColumns>s&&1===t.colSpan,canMergeLeft:n>0&&!("empty"!==k(t)&&"empty"!==k(e.cells[n-1])),canMergeRight:n<e.cells.length-1&&!("empty"!==k(t)&&"empty"!==k(e.cells[n+1])),canSplitCell:t.colSpan>1})))}))}))))),x.length>0&&sn("div",{style:{color:"#d32f2f",marginTop:16,padding:12,backgroundColor:"#ffebee",border:"1px solid #ffcdd2",borderRadius:4,display:"flex",alignItems:"flex-start",gap:8}},void 0,sn(gt.h,{style:{width:20,height:20,flexShrink:0,marginTop:1}}),sn("div",{},void 0,sn("div",{style:{fontWeight:"bold",marginBottom:4}},void 0,"Advarsler:"),x.map(function(e,t){return sn("div",{style:{marginBottom:2}},t,"• ",e)}))),sn("style",{jsx:!0},void 0,"\n        .cell {\n          transition: background-color 0.2s ease;\n        }\n        .cell:hover {\n          background-color: #e9ecef !important;\n        }\n        .selected-cell {\n          border: 2px solid #007bff !important;\n          background-color: #e6f0ff !important;\n          box-shadow: 0 0 0 2px #007bff33;\n          z-index: 2;\n        }\n        .table tbody td {\n          height: 65px;\n        }\n      "))};var yn,bn=n(36669),gn=n(27545),wn=n(79955);function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}function kn(e,t,n,r){yn||(yn="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:yn,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function On(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?On(Object(n),!0).forEach(function(t){xn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):On(Object(n)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Sn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||In(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function In(e,t){if(e){if("string"==typeof e)return An(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(e,t):void 0}}function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Cn=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],jn=[1,2,3,4,5],Dn=function(){var e,t,n=(0,o.g)().xid,i=Pn((0,r.useState)(!0),2),a=i[0],s=i[1],c=Pn((0,r.useState)(null),2),u=c[0],d=c[1],f=Pn((0,r.useState)(!1),2),p=f[0],m=f[1],v=Pn((0,r.useState)(!1),2),h=v[0],y=v[1],b=Pn((0,r.useState)(!1),2),g=b[0],w=b[1],S=Pn((0,r.useState)(!0),2),k=S[0],O=S[1],N=Pn((0,r.useState)(!0),2),x=N[0],P=N[1],I=Pn((0,r.useState)([]),2),A=I[0],C=I[1],_=Pn((0,r.useState)([]),2),R=_[0],T=_[1],E=Pn((0,r.useState)([]),2),M=E[0],F=E[1],B=Pn((0,r.useState)([]),2),V=B[0],q=B[1],U=Pn((0,r.useState)(null),2),W=U[0],Y=U[1],K=Pn((0,r.useState)(!0),2),G=K[0],Z=K[1],J=Pn((0,r.useState)(!1),2),ee=J[0],te=J[1],ne=Pn((0,r.useState)(!1),2),re=ne[0],oe=ne[1],ie=Pn((0,r.useState)(!1),2),ae=ie[0],le=ie[1],se=Pn((0,r.useState)(null),2),ce=se[0],ue=se[1],de=new j.g;(0,r.useEffect)(function(){n&&ve()},[n]),(0,r.useEffect)(function(){u&&0!==u.length&&fe().then(function(e){O(e&&x&&G)})},[u&&u.frontLogoWidth,u&&u.nextPagesLogoWidth,u&&u.bodyFontVariant,u&&u.bodyFontSize,u&&u.signatureTitleMneFontVariant,u&&u.signatureTitleMneFontSize,u&&u.subtitlesFontVariant,u&&u.subtitlesFontSize,u&&u.headerFontVariant,u&&u.headerFontSize,u&&u.headerWrapperBorderBottomWidth,x,G]),(0,r.useEffect)(function(){u&&u.hasIxbrlLogo&&me()},[u&&u.hasIxbrlLogo]);var fe=function(){return Promise.resolve(!!(u&&u.headerFontVariant&&u&&u.bodyFontVariant&&u&&u.subtitlesFontVariant&&u&&u.signatureTitleMneFontVariant))},pe=function(e){if(!e||""===e)return!0;var t=String(e).replace(/,/g,".");if(t.endsWith(".")){var n=t.slice(0,-1);if(/^\d+$/.test(n))return!0}var r=parseFloat(t);return/^\d+(\.\d{1})?$/.test(t)&&!isNaN(r)&&r>=0},me=function(){de.registerRequest((0,$.Ws)()).then(function(e){var t=new FileReader;t.onloadend=function(){d(function(e){return Nn(Nn({},e),{},{accountantLogo:t.result})})},t.readAsDataURL(e.body)}).catch(function(e){})},ve=function(){n?(s(!0),de.registerRequest((0,$.hY)(n)).then(function(e){var t,n,r,o=e.body,i=Nn({hasIxbrlLogo:!1,frontLogoWidth:0,nextPagesLogoWidth:0,tablePadding:3,headerFontFamily:null,bodyFontFamily:null,signatureTitleMneFontFamily:null,subtitlesFontFamily:null,headerFontVariant:null,bodyFontVariant:null,signatureTitleMneFontVariant:null,subtitlesFontVariant:null,headerFontSize:null,bodyFontSize:null,signatureTitleMneFontSize:null,subtitlesFontSize:null,frontPageDesign:null,supportedFonts:[],images:[],noteColumnLeft:!1},o),a=he(i.supportedFonts,i.bodyFont&&i.bodyFont.fontId),l=he(i.supportedFonts,i.signatureTitleMneFont&&i.signatureTitleMneFont.fontId),c=he(i.supportedFonts,i.subtitlesFont&&i.subtitlesFont.fontId),u=he(i.supportedFonts,i.headerFont&&i.headerFont.fontId);if(a){var f=i.supportedFonts.find(function(e){return e.familyName===a.familyName});C(f?f.variants:[])}if(l){var p=i.supportedFonts.find(function(e){return e.familyName===l.familyName});T(p?p.variants:[])}if(c){var m=i.supportedFonts.find(function(e){return e.familyName===c.familyName});q(m?m.variants:[])}if(u){var v=i.supportedFonts.find(function(e){return e.familyName===u.familyName});F(v?v.variants:[])}var h=void 0===i.headerWrapperBorderBottomWidth||null===i.headerWrapperBorderBottomWidth||""===i.headerWrapperBorderBottomWidth?0:String(i.headerWrapperBorderBottomWidth);d(Nn(Nn({},i),{},{tablePadding:(0,Q.RI)(null==o?void 0:o.tablePadding,null!==(t=i.tablePadding)&&void 0!==t?t:3),bodyMarginBottom:(0,Q.RI)(null==o?void 0:o.bodyMarginBottom,null!==(n=i.bodyMarginBottom)&&void 0!==n?n:13),bodyBoldMarginBottom:(0,Q.RI)(null==o?void 0:o.bodyBoldMarginBottom,null!==(r=i.bodyBoldMarginBottom)&&void 0!==r?r:5),headerFontFamily:u?u.familyName:null,bodyFontFamily:a?a.familyName:null,signatureTitleMneFontFamily:l?l.familyName:null,subtitlesFontFamily:c?c.familyName:null,headerFontVariant:i.headerFont&&i.headerFont.fontId,bodyFontVariant:i.bodyFont&&i.bodyFont.fontId,signatureTitleMneFontVariant:i.signatureTitleMneFont&&i.signatureTitleMneFont.fontId,subtitlesFontVariant:i.subtitlesFont&&i.subtitlesFont.fontId,headerFontSize:i.headerFont&&i.headerFont.fontSize,bodyFontSize:i.bodyFont&&i.bodyFont.fontSize,signatureTitleMneFontSize:i.signatureTitleMneFont&&i.signatureTitleMneFont.fontSize,subtitlesFontSize:i.subtitlesFont&&i.subtitlesFont.fontSize,headerWrapperBorderBottomWidth:h})),Z(pe(h)),s(!1)}).catch(function(e){s(!1)})):s(!1)},he=function(e,t){var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=In(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw i}}}}(e);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=o.variants.find(function(e){return e.fid===t});if(i)return Nn(Nn({},i),{},{familyName:o.familyName})}}catch(e){r.e(e)}finally{r.f()}return null},ye=function(e){d(Nn(Nn({},u),{},{footerLogo:e}))},be=function(e){d(function(t){return Nn(Nn({},t),{},{frontPageDesign:e})})},ge=function(e,t){e&&e.preventDefault(),s(!0),de.registerRequest((0,$.G6)(n,t)).then(ve).finally(function(){te(!1),s(!1)})};return kn(D.A,{title:"Design",loadScreen:a},void 0,kn("div",{className:"page-header"},void 0,kn("div",{className:"d-flex align-items-center"},void 0,kn(bn.A,{to:(0,Q.ID)("/account/arsetup"),text:I18n.translate("setup.fiscalyear.back.to.list")}),kn("h4",{},void 0,"Tilpasning af design")),kn("div",{},void 0,kn("a",{href:"https://static.multiregnskab.dk/fonts/reportfonts/fontsample.html",target:"_blank",rel:"noopener noreferrer",className:"btn btn-default mr-1"},void 0,"Se mulige skrifttyper"),kn(z(),{className:"mr-1",open:ee,onToggle:function(e,t,n){return"select"!==n.source&&te(e)},pullRight:!0},void 0,kn(z().Toggle,{bsStyle:"action-primary btn-action__square",noCaret:!0},void 0,kn(L.h,{className:"phi phi-settings_wheel_icon phi-lg fullstroke","aria-label":"Settings"})),kn(z().Menu,{},void 0,kn(H(),{},void 0,kn("button",{type:"button",className:"btn btn-danger",onClick:function(){return ue(1),oe(!0),void te(!1)}},void 0,kn("span",{className:"ml-1"},void 0,"Overskriv med standard design"))),kn(H(),{},void 0,kn("button",{type:"button",className:"btn btn-danger",onClick:function(){return le(!0),void te(!1)}},void 0,kn("span",{className:"ml-1"},void 0,"Fjern alt indhold i forside-design"))))),kn(wn.A,{saved:h,busy:p,failed:g,onClick:function(e){e&&e.preventDefault(),fe().then(function(e){if(e&&x&&G){m(!0),y(!1),w(!1);var t={xid:n,designName:u.designName,frontPageDesign:u.frontPageDesign,headerFont:{fontId:u.headerFontVariant,fontSize:u.headerFontSize},bodyFont:{fontId:u.bodyFontVariant,fontSize:u.bodyFontSize},signatureTitleMneFont:{fontId:u.signatureTitleMneFontVariant,fontSize:u.signatureTitleMneFontSize},subtitlesFont:{fontId:u.subtitlesFontVariant,fontSize:u.subtitlesFontSize},footerLogo:u.footerLogo,footerImageWidth:u.footerImageWidth||u.nextPagesLogoWidth||0,tablePadding:(0,Q.RI)(u.tablePadding),bodyMarginBottom:(0,Q.RI)(u.bodyMarginBottom),bodyBoldMarginBottom:(0,Q.RI)(u.bodyBoldMarginBottom),headerWrapperMarginBottom:u.headerWrapperMarginBottom,headerWrapperBorderStyle:u.headerWrapperBorderStyle,headerWrapperBorderBottomWidth:u.headerWrapperBorderBottomWidth,headerWrapperBorderBottomColor:u.headerWrapperBorderBottomColor};de.registerRequest((0,$.i5)(n,t)).then(function(){y(!0),m(!1),ve()}).catch(function(){w(!0),m(!1)})}})},disabled:!k}))),u&&kn("div",{className:"design-layout"},void 0,kn("div",{className:"design-main-content"},void 0,kn("div",{className:"card mb-3"},void 0,kn("div",{className:"card-title"},void 0,"Navn på design"),kn("div",{className:"card-body"},void 0,kn(je.x,{value:u.designName,onChange:function(e){d(Nn(Nn({},u),{},{designName:e}))}}))),kn("div",{className:"card mb-3"},void 0,kn("div",{className:"card-title"},void 0,"Opbygning af forside"),kn("div",{className:"card-body"},void 0,kn("div",{className:"front-page-preview"},void 0,kn(hn,{data:u.frontPageDesign,minRows:1,minColumns:1,onChange:be,onCellSelect:function(e){Y(e)},selectedCell:W})))),kn("div",{className:"card mb-3"},void 0,kn("div",{className:"card-title"},void 0,"Efterfølgende sider"),kn("div",{className:"card-body"},void 0,kn("div",{className:"settings-grid"},void 0,kn("div",{className:"settings-section"},void 0,kn("h6",{},void 0,"Overskrifter"),kn("div",{className:"settings-row",style:{gridTemplateColumns:"1fr"}},void 0,kn(Ue,{fontFamily:u.headerFontFamily,fontSize:u.headerFontSize,fontVariant:u.headerFontVariant,marginBottom:u.headerWrapperMarginBottom,supportedFonts:u.supportedFonts||[],fontVariants:M,onFontFamilyChange:function(e){var t=e.fontFamilyName,n=e.fontVariants,r=e.fontVariant;F(n),d(Nn(Nn({},u),{},{headerFontFamily:t,headerFontVariant:r}))},onFontSizeChange:function(e){d(Nn(Nn({},u),{},{headerFontSize:e}))},onFontVariantChange:function(e){d(Nn(Nn({},u),{},{headerFontVariant:e}))},onMarginBottomChange:function(e){d(Nn(Nn({},u),{},{headerWrapperMarginBottom:e}))},showMarginBottom:!0,gridColumns:"2fr 1fr 1fr 1fr",width:"645px"})),kn("div",{className:"settings-row",style:{gridTemplateColumns:"1fr 1fr 1fr 1fr"}},void 0,kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"Streg under"),kn(Fe.H,{value:u.headerWrapperBorderStyle,options:[{value:"none",label:"Ingen"},{value:"solid",label:"Solid"},{value:"dashed",label:"Stiplet"},{value:"dotted",label:"Prikket"}],onChange:function(e){d(Nn(Nn({},u),{},{headerWrapperBorderStyle:e}))},noDeselect:!0})),kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"Tykkelse (mm)"),kn("div",{style:{position:"relative"}}
1,void 0,kn(je.x,{value:void 0===u.headerWrapperBorderBottomWidth||null===u.headerWrapperBorderBottomWidth||""===u.headerWrapperBorderBottomWidth?0:u.headerWrapperBorderBottomWidth.replace(/,/g,"."),onChange:function(e){var t="string"==typeof e?e:String(e);t=(t=t.replace(/\./g,",")).replace(/[^0-9,]/g,""),parseFloat(t.replace(/,/g,"."))<0&&(t="0");var n=pe(t);Z(n),d(Nn(Nn({},u),{},{headerWrapperBorderBottomWidth:t}))},type:"number",min:"0",step:"0.1",className:G?"":"border-error"}),!G&&kn("div",{className:"error-message",style:{position:"absolute",left:0,top:"100%"}},void 0,"Ugyldig værdi. Brug kun hele tal eller tal med én decimal (f.eks. 0, 1, 0.5)"))),kn("div",{className:"setting-item",style:{display:"flex",flexDirection:"row",alignItems:"center",marginTop:"22px"}},void 0,kn(Ae,{value:u.headerWrapperBorderBottomColor,onChange:function(e){d(Nn(Nn({},u),{},{headerWrapperBorderBottomColor:e}))}})),kn("div",{}))),kn("div",{className:"settings-section"},void 0,kn("h6",{},void 0,"Brødtekst"),kn(Ue,{fontFamily:u.bodyFontFamily,fontSize:u.bodyFontSize,fontVariant:u.bodyFontVariant,supportedFonts:u.supportedFonts||[],fontVariants:A,onFontFamilyChange:function(e){var t=e.fontFamilyName,n=e.fontVariants,r=e.fontVariant;C(n),d(Nn(Nn({},u),{},{bodyFontFamily:t,bodyFontVariant:r}))},onFontSizeChange:function(e){d(Nn(Nn({},u),{},{bodyFontSize:e}))},onFontVariantChange:function(e){d(Nn(Nn({},u),{},{bodyFontVariant:e}))},width:"500px"})),kn("div",{className:"settings-section"},void 0,kn("h6",{},void 0,"Titel/mne-nummer under underskriftsnavne"),kn(Ue,{fontFamily:u.signatureTitleMneFontFamily,fontSize:u.signatureTitleMneFontSize,fontVariant:u.signatureTitleMneFontVariant,supportedFonts:u.supportedFonts||[],fontVariants:R,onFontFamilyChange:function(e){var t=e.fontFamilyName,n=e.fontVariants,r=e.fontVariant;T(n),d(Nn(Nn({},u),{},{signatureTitleMneFontFamily:t,signatureTitleMneFontVariant:r}))},onFontSizeChange:function(e){d(Nn(Nn({},u),{},{signatureTitleMneFontSize:e}))},onFontVariantChange:function(e){d(Nn(Nn({},u),{},{signatureTitleMneFontVariant:e}))},width:"500px"})),kn("div",{className:"settings-section"},void 0,kn("h6",{},void 0,"Under-overskrifter (Aktiver/Passiver)"),kn(Ue,{fontFamily:u.subtitlesFontFamily,fontSize:u.subtitlesFontSize,fontVariant:u.subtitlesFontVariant,supportedFonts:u.supportedFonts||[],fontVariants:V,onFontFamilyChange:function(e){var t=e.fontFamilyName,n=e.fontVariants,r=e.fontVariant;q(n),d(Nn(Nn({},u),{},{subtitlesFontFamily:t,subtitlesFontVariant:r}))},onFontSizeChange:function(e){d(Nn(Nn({},u),{},{subtitlesFontSize:e}))},onFontVariantChange:function(e){d(Nn(Nn({},u),{},{subtitlesFontVariant:e}))},width:"500px"})),kn("div",{className:"settings-section"},void 0,kn("h6",{},void 0,"Logo i footer"),kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"Vælg billede"),kn(_e,{elementOptions:u.images||[],selectedImageId:u.footerLogo,onImageSelect:function(e){return ye(e.id)},onImageDeselect:function(){return ye(null)},showCheckboxes:!0,gridColumns:8,thumbnailHeight:50})),kn("div",{className:"settings-row",style:{gridTemplateColumns:"1fr 1fr 1fr",marginTop:"16px"}},void 0,kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"Bredde (mm)"),kn(je.x,{value:u.footerImageWidth||u.nextPagesLogoWidth||"",onChange:function(e){return d(Nn(Nn({},u),{},{footerImageWidth:e,nextPagesLogoWidth:e}))},type:"number"})),kn("div",{}),kn("div",{}))),kn("div",{className:"settings-section"},void 0,kn("h6",{},void 0,"Resultatopgørelse, aktiver, passiver"),kn("div",{className:"settings-row",style:{gridTemplateColumns:"1fr 1fr 1fr"}},void 0,kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"note-henvisning"),kn("p",{},void 0,u.noteColumnLeft?"Til venstre for tekst":"Til højre for tekst")),kn("div",{}),kn("div",{}))),kn("div",{className:"settings-section"},void 0,kn("h6",{},void 0,"Tabeller"),kn("div",{className:"settings-row",style:{gridTemplateColumns:"1fr 1fr 1fr"}},void 0,kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"Luft i tabeller (1-5)"),kn(Fe.H,{value:u.tablePadding||3,options:jn.map(function(e){return{value:e,label:String(e)}}),onChange:function(e){var t=(0,Q.RI)(e);void 0!==t&&d(Nn(Nn({},u),{},{tablePadding:t}))},noDeselect:!0})),kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"Luft mellem afsnit (0-20)"),kn(Fe.H,{value:null!==(e=u.bodyMarginBottom)&&void 0!==e?e:13,options:Cn.map(function(e){return{value:e,label:String(e)}}),onChange:function(e){var t=(0,Q.RI)(e);void 0!==t&&d(Nn(Nn({},u),{},{bodyMarginBottom:t}))},noDeselect:!0})),kn("div",{className:"setting-item"},void 0,kn("label",{},void 0,"Luft under under-overskrifter (0-20)"),kn(Fe.H,{value:null!==(t=u.bodyBoldMarginBottom)&&void 0!==t?t:5,options:Cn.map(function(e){return{value:e,label:String(e)}}),onChange:function(e){var t=(0,Q.RI)(e);void 0!==t&&d(Nn(Nn({},u),{},{bodyBoldMarginBottom:t}))},noDeselect:!0}))))))),kn("div",{style:{display:"none"}},void 0,kn(X.A,{title:"Revisors logo",hasLogo:u.hasIxbrlLogo||!1,logoUrl:u.hasIxbrlLogo?u.accountantLogo:"".concat(l.Xcd,"administrator/fetchlogo"),frontLogoWidth:u.frontLogoWidth||0,nextPagesLogoWidth:u.nextPagesLogoWidth||0,showOnReportLabel:"Vis logo på årsrapporten",frontWidthLabel:"Logo på forsidens bredde (mm) - udgår",nextPagesWidthLabel:"Logo på andre siders bredde (mm)",frontWidthTooltip:"Bredden af logoet på forsidens i mm - udgår",nextPagesWidthTooltip:"Bredden af logoet på andre sider i mm",removeLabel:I18n.translate("basicsettings.companylogo.remove"),onFileChange:function(e){d(Nn(Nn({},u),{},{accountantLogo:e,hasIxbrlLogo:!0}
1))},onFileRemove:function(){d(Nn(Nn({},u),{},{accountantLogo:null,hasIxbrlLogo:!1}))},onToggleHasLogo:function(e){d(Nn(Nn({},u),{},{hasIxbrlLogo:e}))},onFrontWidthChange:function(e){d(Nn(Nn({},u),{},{frontLogoWidth:e}))},onNextPagesWidthChange:function(e){d(Nn(Nn({},u),{},{nextPagesLogoWidth:e}))},onValidationChange:function(e){P(e)},disabled:!1}))),kn("div",{className:"design-properties-panel"},void 0,kn("div",{className:"card"},void 0,kn("div",{className:"card-title"},void 0,"Tilpasning af felt på forside"),kn("div",{className:"card-body"},void 0,kn(mt,{selectedCell:W,data:u,onFrontPageDesignChange:be}))))),kn(gn.A,{show:re,title:"Bekræft overskrivning",submitBtnText:"Overskriv",cancelBtnText:"Annuller",btnClassName:"btn btn-danger",onHide:function(){return oe(!1)},onSubmit:function(){null!==ce&&(ge(null,ce),ue(null)),oe(!1)}},void 0,kn("p",{},void 0,"Er du sikker på, at du vil overskrive det nuværende design med standard designet?")),kn(gn.A,{show:ae,title:"Bekræft fjernelse af indhold",submitBtnText:"Fjern indhold",cancelBtnText:"Annuller",btnClassName:"btn btn-danger",onHide:function(){return le(!1)},onSubmit:function(){ge(null,0),le(!1)}},void 0,kn("p",{},void 0,"Er du sikker på, at du vil fjerne alt indhold i forside-designet?")),kn("style",{jsx:!0},void 0,"\n        .design-layout {\n          display: flex;\n          gap: 20px;\n          min-height: calc(100vh - 200px);\n          padding-left: 20px;\n          padding-right: 20px;\n          padding-bottom: 30px;\n          flex-direction: row !important;\n          overflow-x: auto;\n        }\n\n        .design-main-content {\n          flex: 1;\n        }\n\n        .design-properties-panel {\n          width: 400px;\n          flex-shrink: 0;\n          min-width: 340px;\n          height: auto;\n          min-height: auto;\n        }\n\n        .design-properties-panel .card-body {\n          height: auto;\n          min-height: auto;\n          overflow: visible;\n          max-height: none;\n        }\n\n        .design-properties-panel .card {\n          height: auto;\n          min-height: auto;\n          max-height: none;\n        }\n\n        .front-page-preview {\n          min-height: 200px;\n        }\n\n        .preview-area {\n          border: 1px solid #e0e0e0;\n          border-radius: 6px;\n          background: white;\n          min-height: 200px;\n          position: relative;\n          display: flex;\n          align-items: center;\n          justify-content: center;\n        }\n\n        .preview-content {\n          display: flex;\n          flex-direction: column;\n          align-items: center;\n          gap: 8px;\n          color: #666;\n        }\n\n        .preview-content i {\n          font-size: 24px;\n          color: #28a745;\n        }\n\n        .preview-actions {\n          position: absolute;\n          top: 10px;\n          right: 10px;\n          display: flex;\n          gap: 8px;\n        }\n\n        .settings-grid {\n          display: flex;\n          flex-direction: column;\n          gap: 24px;\n        }\n\n        .settings-section h6 {\n          font-weight: 600;\n          margin-bottom: 12px;\n          color: #333;\n        }\n\n        .settings-row {\n          display: grid;\n          grid-template-columns: 1fr 1fr 1fr;\n          gap: 16px;\n        }\n\n        .setting-item {\n          display: flex;\n          flex-direction: column;\n          gap: 4px;\n        }\n\n        .setting-item label {\n          font-size: 12px;\n          font-weight: 500;\n          color: #666;\n          margin-bottom: 0;\n        }\n\n        .properties-panel-empty {\n          text-align: center;\n          color: #666;\n          font-style: italic;\n        }\n\n        .properties-panel-content h5 {\n          margin-bottom: 16px;\n          font-weight: 600;\n        }\n\n        .property-section {\n          margin-bottom: 20px;\n        }\n\n        .property-section h6 {\n          font-weight: 600;\n          margin-bottom: 8px;\n          color: #333;\n          font-size: 14px;\n        }\n\n        .property-row {\n          display: grid;\n          grid-template-columns: 1fr 1fr;\n          gap: 8px;\n          margin-bottom: 8px;\n        }\n\n        .property-item {\n          display: flex;\n          flex-direction: column;\n          gap: 4px;\n        }\n\n        .property-item label {\n          font-size: 12px;\n          font-weight: 500;\n          color: #666;\n        }\n\n        .alignment-buttons {\n          display: flex;\n          gap: 4px;\n        }\n\n        .alignment-buttons .btn {\n          width: 40px;\n          height: 32px;\n          padding: 0;\n          display: flex;\n          align-items: center;\n          justify-content: center;\n        }\n\n        .content-tabs {\n          display: flex;\n          gap: 4px;\n          margin-bottom: 16px;\n        }\n\n        .tab-button {\n          flex: 1;\n          padding: 8px 12px;\n          border: 1px solid #ddd;\n          background: #f8f9fa;\n          color: #666;\n          cursor: pointer;\n          border-radius: 4px;\n          font-size: 12px;\n          display: flex;\n          align-items: center;\n          justify-content: center;\n          gap: 4px;\n        }\n\n        .tab-button.active {\n          background: #007bff;\n          color: white;\n          border-color: #007bff;\n        }\n\n        .tab-button i {\n          font-size: 14px;\n        }\n\n        .tab-content h6 {\n          margin-bottom: 12px;\n          color: #333;\n        }\n\n        .image-settings {\n          margin-top: 16px;\n          padding-top: 16px;\n          border-top: 1px solid #eee;\n        }\n\n        .text-selection {\n          margin-top: 8px;\n        }\n\n        .text-list {\n          display: flex;\n          flex-direction: column;\n          gap: 8px;\n          height: auto;\n          min-height: auto;\n          max-height: none;\n          overflow: visible;\n        }\n\n        .text-item {\n          display: flex;\n          align-items: flex-start;\n          gap: 12px;\n          padding: 12px;\n          border: 1px solid #ddd;\n          border-radius: 4px;\n          background: white;\n          position: relative;\n        }\n\n        .text-checkbox {\n          flex-shrink: 0;\n          margin-top: 2px;\n        }\n\n        .text-checkbox input {\n          width: 16px;\n          height: 16px;\n        }\n\n        .text-content {\n          flex-grow: 1;\n          min-width: 0;\n        }\n\n        .text-preview {\n          font-weight: 500;\n          color: #333;\n          margin-bottom: 4px;\n          font-size: 14px;\n        }\n\n        .text-description {\n          color: #666;\n          font-size: 12px;\n          line-height: 1.4;\n          word-break: break-word;\n        }\n\n        .text-actions {\n          flex-shrink: 0;\n          margin-top: 2px;\n        }\n\n        .text-actions .btn {\n          padding: 4px 8px;\n          font-size: 12px;\n        }\n\n        .text-actions .btn-link {\n          color: #dc3545;\n          text-decoration: none;\n        }\n\n        .text-actions .btn-link:hover {\n          color: #c82333;\n          text-decoration: none;\n        }\n\n        .text-settings {\n          margin-top: 16px;\n          padding-top: 16px;\n          border-top: 1px solid #eee;\n        }\n\n        .upload-section {\n          margin-top: 8px;\n        }\n\n        .upload-box {\n          border: 2px dashed #ddd;\n          border-radius: 4px;\n          padding: 16px;\n          text-align: center;\n          color: #666;\n          cursor: pointer;\n          transition: border-color 0.2s;\n        }
1\n\n        .upload-box:hover {\n          border-color: #007bff;\n          color: #007bff;\n        }\n\n        .upload-box i {\n          font-size: 24px;\n          margin-bottom: 4px;\n          display: block;\n        }\n\n        .upload-box span {\n          font-size: 12px;\n        }\n\n        /* Remove stacking on small screens: always keep panel on right */\n        .border-error {\n          border-color: #dc3545;\n          border-width: 1px;\n        }\n\n        .error-message {\n          color: #dc3545;\n          font-size: 12px;\n          margin-top: 4px;\n        }\n      "))},_n=n(42845),Rn=n.n(_n),Tn=n(85176),En=n.n(Tn),Mn=n(37995),Fn=n.n(Mn),zn=n(61225);function Bn(e){var t=e.companyXid,n=e.fiscalYearXid,r=e.lineXid,o=e.accountNumber,i=e.reallyCreateAccount,s=e.xbrlDef,c=e.accountName,u={companyXid:t,fiscalYearXid:n,lineXid:r,accountNumber:o,reallyCreateAccount:i};return i&&(null!=s&&""!==String(s).trim()&&(u.xbrlDef=s),null!=c&&(u.accountName=c)),(0,a.RD)(l.VYS,{method:"post",ignoreStatus:[Z.BR],data:u})}var Hn,Ln=n(16093),$n=n(36893),Xn=n(29386),Vn=n(12710),qn=n(80057),Un=n(31408),Wn=n(83331),Yn=n(44918);function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(e)}function Gn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gn(Object(n),!0).forEach(function(t){Zn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return er(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?er(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tr(e,t,n,r){Hn||(Hn="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Hn,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var nr=["primoAmount","periodAmount"],rr=new Set(["results","distributions"]),or=new Set(["distributions"]);function ir(e){if(null==e||""===String(e).trim())return!1;try{return 0!==Wn.j.stringToNumber(String(e).trim())}catch(e){return!1}}function ar(e,t){return null!=e&&""!==String(e).trim()?String(e).trim():null!=t&&""!==String(t).trim()?I18n.translate(String(t).trim()):null}function lr(e){var t=e.title,n=e.messageKey;return tr(r.Fragment,{},void 0,tr("div",{className:"migrate-outside-import-layout__divider"}),tr("div",{className:"migrate-outside-import-layout__result-title"},void 0,t),tr("p",{className:"migrate-outside-import-layout__bottom-text"},void 0,I18n.translate(n)))}function sr(e){var t=e.lineXid,n=e.amountKey,r=e.warning;return r?tr("div",{className:"migrate-outside-book-table__amount-warning-below"},void 0,tr(pe.$,{tooltipId:"outside-".concat(n,"-warning-").concat(t),icon:"fa fa-warning fa-fw text-warning",tooltip:r})):null}function cr(e,t){return"".concat(e,":").concat(t)}function ur(e){var t=null!=e?String(e).trim():"";return t.endsWith(",")?"".concat(t,"00"):t}function dr(e){var t=ur(e),n=(0,ze.A)().validate({value:t,options:{required:!0}});return n.valid?(0,Un.A)(t):n}function fr(e){return null!=e?String(e).trim().toLowerCase():""}function pr(e,t){var n=function(e,t){if(!t||!Array.isArray(e))return null;var n=String(t).trim();if(!n)return null;for(var r=0;r<e.length;r+=1){var o=e[r];if(o&&Array.isArray(o.options))for(var i=0;i<o.options.length;i+=1){var a=o.options[i];if(a&&String(a.value).trim()===n)return null!=a.label&&""!==String(a.label).trim()?String(a.label).trim():n}}return null}(e,t);return n||t}const mr=(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultsLoaded:e.defaults.loaded,groupedAccounts:e.defaults.groupedFinanceAccounts}})(function(e){var t=e.companyStore,n=e.defaultsLoaded,o=e.groupedAccounts,i=e.history,s=e.match,c=s&&s.params&&s.params.fiscalYearXid?parseInt(s.params.fiscalYearXid,10):null,u=t&&t.currentXid,d=Jn((0,r.useState)(null),2),f=d[0],p=d[1],m=Jn((0,r.useState)([]),2),v=m[0],h=m[1],y=Jn((0,r.useState)({}),2),b=y[0],g=y[1],w=Jn((0,r.useState)({}),2),S=w[0],k=w[1],O=Jn((0,r.useState)({}),2),N=O[0],x=O[1],P=Jn((0,r.useState)(null),2),I=P[0],A=P[1],C=J
1n((0,r.useState)(!1),2),_=C[0],R=C[1],T=Jn((0,r.useState)(!1),2),E=T[0],M=T[1],F=Jn((0,r.useState)(!1),2),z=F[0],B=F[1],H=Jn((0,r.useState)(!1),2),L=H[0],$=H[1],X=Jn((0,r.useState)(""),2),V=X[0],q=X[1],U=Jn((0,r.useState)(null),2),W=U[0],Y=U[1],K=Jn((0,r.useState)(null),2),G=K[0],J=K[1],ee=Jn((0,r.useState)(null),2),te=ee[0],ne=ee[1],re=Jn((0,r.useState)(!1),2),oe=re[0],ie=re[1],ae=Jn((0,r.useState)(null),2),le=ae[0],se=ae[1],ce=Jn((0,r.useState)(!1),2),ue=ce[0],de=ce[1],fe=Jn((0,r.useState)({}),2),pe=fe[0],me=fe[1],ve=Jn((0,r.useState)(null),2),he=ve[0],ye=ve[1],be=Jn((0,r.useState)(null),2),ge=be[0],we=be[1],Se=Jn((0,r.useState)(null),2),ke=Se[0],Oe=Se[1],Ne=Jn((0,r.useState)({}),2),xe=Ne[0],Pe=Ne[1],Ie=Jn((0,r.useState)(""),2),Ae=Ie[0],Ce=Ie[1],De=Jn((0,r.useState)([]),2),_e=De[0],Re=De[1],Te=(0,r.useMemo)(function(){return function(e){var t=new Map;return Array.isArray(e)?(e.forEach(function(e){if(e){var n=null!=e.mapToAccountNumber?String(e.mapToAccountNumber).trim():"";if(n){var r=e.sourceAccountNames;Array.isArray(r)&&r.forEach(function(e){var r=fr(e);r&&!t.has(r)&&t.set(r,n)})}}}),t):t}(_e)},[_e]),Ee=(0,r.useRef)({}),Me=(0,r.useRef)({}),Be=(0,r.useRef)({}),He=(0,r.useRef)({}),Le=(0,r.useRef)({}),$e=(0,r.useRef)({}),Xe=(0,r.useRef)({}),Ve=(0,r.useRef)(new j.g),qe=(0,r.useRef)(null),Ue=[function(e){return(0,ze.A)().validate({value:e,options:{required:!0,forbidNegative:!0,forbidDecimals:!0}})}],We=(0,r.useCallback)(function(){i.push((0,Q.ID)("/work/ui"))},[i]),Ye=function(){u&&c?(M(!0),de(!1),se(null),Ve.current.registerRequest(function(e){var t=e.companyXid,n=e.fiscalYearXid;return(0,a.RD)(l._SE,{method:"post",data:{companyXid:t,fiscalYearXid:n}})}({companyXid:u,fiscalYearXid:c})).then(function(e){ne(e.body&&null!=e.body.fiscalYearName?e.body.fiscalYearName:null);var t=!(!e.body||!e.body.yearClosed);ie(t),e.body&&"boolean"==typeof e.body.usesOutsideForPrimo&&ye(e.body.usesOutsideForPrimo),Re(e.body&&Array.isArray(e.body.accountNameMatches)?e.body.accountNameMatches:[]);var n=e.body&&e.body.outsideBookLines?e.body.outsideBookLines:[];if(n.length>0){Be.current=n.reduce(function(e,t){return e["".concat(t.xid,":primoAmount")]=null!=t.primoAmount?String(t.primoAmount):"",e["".concat(t.xid,":periodAmount")]=null!=t.periodAmount?String(t.periodAmount):"",e},{}),Pe({}),h(n),g(n.reduce(function(e,t){return e[t.accountNumber]=null,e},{}));var r=new Set(n.map(function(e){return e.accountNumber}));me(function(e){var t={};return Object.keys(e).forEach(function(n){r.has(n)&&(t[n]=e[n])}),t}),Object.keys($e.current).forEach(function(e){r.has(e)||delete $e.current[e]}),we(e.body.primoDiff),Oe(e.body.periodDiff)}else h([]),g({}),me({}),we(null),Oe(null),Pe({}),Re([]),$e.current={},Be.current={};return k({}),x({}),Ve.current.registerRequest((0,Ln.t8)(u))}).then(function(e){A(e.body.nameOfStandard),R(e.body.usingStandardAccounts),M(!1)}).catch(function(e){M(!1),se(e&&e.message||"Kunne ikke hente data")})):se("Mangler selskab eller regnskabsår")},Ke=function(){Ye()};(0,r.useEffect)(function(){if(t.loaded&&n)if(u&&c){var e="".concat(u,"-").concat(c);qe.current!==e&&(qe.current=e,Ye())}else se("Mangler selskab eller regnskabsår")},[t.loaded,n,u,c]),(0,r.useEffect)(function(){var e=Ve.current;return function(){e.abortAll()}},[]);var Ge=(0,r.useCallback)(function(e){oe||(ye(e),Ve.current.registerRequest(function(e){var t=e.companyXid,n=e.fiscalYearXid,r=e.usesOutsideForPrimo;return(0,a.RD)(l.G_G,{method:"post",ignoreStatus:[Z.BR],data:{companyXid:t,fiscalYearXid:n,usesOutsideForPrimo:r}})}({companyXid:u,fiscalYearXid:c,usesOutsideForPrimo:e})))},[u,oe,c]),Qe=function(e){var t=e.lineXid,n=e.mappedToAccountNumber;oe||(M(!0),Ve.current.registerRequest(function(e){var t=e.companyXid,n=e.fiscalYearXid,r=e.lineXid,o=e.mappedToAccountNumber;return(0,a.RD)(l.mqE,{method:"post",ignoreStatus:[Z.BR],data:{companyXid:t,fiscalYearXid:n,lineXid:r,mappedToAccountNumber:o}})}({companyXid:u,fiscalYearXid:c,lineXid:t,mappedToAccountNumber:n})).then(function(){M(!1),Ke()}).catch(function(e){e.status===Z.BR&&(q(e.response.body.messageKey),$(!0))}).finally(function(){return M(!1)}))},Ze=function(e,t,n){if(!oe){var r=cr(e,t);h(function(r){return r.map(function(r){return r.xid===e?Qn(Qn({},r),{},Zn({},t,null!=n?String(n):"")):r})}),Pe(function(e){var t=Qn({},e),o=dr(n);return o.valid?delete t[r]:t[r]=o.message,t})}},Je=function(e,t,n){if(!oe){var r=ur(n),o=cr(e,t),i=dr(r);if(i.valid){if(h(function(n){return n.map(function(n){return n.xid===e?Qn(Qn({},n),{},Zn({},t,r)):n})}),Pe(function(e){if(!e[o])return e;var t=Qn({},e);return delete t[o],t}),Be.current[o]!==r){var s=Be.current[o];
1Be.current[o]=r,Ve.current.registerRequest(function(e){var t=e.companyXid,n=e.fiscalYearXid,r=e.lineXid,o=e.primoAmount,i=e.periodAmount,s={companyXid:t,fiscalYearXid:n,lineXid:r};return void 0!==o&&(s.primoAmount=o),void 0!==i&&(s.periodAmount=i),(0,a.RD)(l.X2$,{method:"post",ignoreStatus:[Z.BR],data:s})}(Zn({companyXid:u,fiscalYearXid:c,lineXid:e},t,r))).then(function(){Ke()}).catch(function(e){Be.current[o]=s,e.status===Z.BR&&e.response&&e.response.body&&e.response.body.messageKey?q(e.response.body.messageKey):q("didnotwork"),$(!0)})}}else Pe(function(e){return Qn(Qn({},e),{},Zn({},o,i.message))})}},et=(0,r.useCallback)(function(e){delete Xe.current[e],He.current[e]&&(clearTimeout(He.current[e]),He.current[e]=null),Le.current[e]=(Le.current[e]||0)+1,delete $e.current[e],me(function(t){var n=Qn({},t);return delete n[e],n})},[]),tt=function(e,t,n){oe||(He.current[e]&&clearTimeout(He.current[e]),He.current[e]=setTimeout(function(){He.current[e]=null,function(e,t,n){if(!oe){var r=(0,ze.A)().validate({value:t,options:{required:!0,forbidNegative:!0,forbidDecimals:!0}}),o=(0,Yn.A)().validate({value:t,options:{min:2,max:20}});if(r.valid&&o.valid){if($e.current[e]){var i=(Le.current[e]||0)+1;Le.current[e]=i,me(function(t){var n=t[e];return n?Qn(Qn({},t),{},Zn({},e,Qn(Qn({},n),{},{verifying:!0,errorKey:null,verified:!1,verifiedAccountName:"",groupName:""}))):t}),$e.current[e]&&Ve.current.registerRequest(Bn({companyXid:u,fiscalYearXid:c,lineXid:n,accountNumber:t,reallyCreateAccount:!1})).then(function(t){if(Le.current[e]===i&&$e.current[e]){var n=t.body||{};me(function(t){var r=t[e];if(!r)return t;if(n.rejectedReasonMessageKey)return Qn(Qn({},t),{},Zn({},e,Qn(Qn({},r),{},{verifying:!1,verified:!1,errorKey:n.rejectedReasonMessageKey,xbrlDef:"",verifiedAccountName:"",groupName:""})));var o=null!=n.accountName&&""!==String(n.accountName).trim()?String(n.accountName).trim():"",i=null!=n.groupName&&""!==String(n.groupName).trim()?String(n.groupName).trim():"";return Qn(Qn({},t),{},Zn({},e,Qn(Qn({},r),{},{verifying:!1,verified:!0,errorKey:null,xbrlDef:null!=n.xbrlDef?n.xbrlDef:"",verifiedAccountName:o,groupName:i})))})}}).catch(function(t){if(Le.current[e]===i&&$e.current[e]){var n=t.status===Z.BR&&t.response&&t.response.body&&t.response.body.messageKey?t.response.body.messageKey:"didnotwork";me(function(t){var r=t[e];return r?Qn(Qn({},t),{},Zn({},e,Qn(Qn({},r),{},{verifying:!1,verified:!1,errorKey:n,groupName:""}))):t})}})}}else me(function(t){var n=t[e];return n?Qn(Qn({},t),{},Zn({},e,Qn(Qn({},n),{},{verifying:!1,verified:!1,errorKey:null,xbrlDef:"",verifiedAccountName:"",groupName:""}))):t})}}
1(e,t,n)},450))},nt=(0,r.useCallback)(function(e){oe||(M(!0),Ve.current.registerRequest(function(e){var t=e.file,n=e.companyXid,r=e.fiscalYearXid,o=e.mappingXid;return(0,a.RD)(l.CSI,{method:"post",ignoreStatus:[Z.BR],data:{file:t,companyXid:n,fiscalYearXid:r,mappingXid:o},csrf:!0},!0)}({file:e,companyXid:t.currentXid,fiscalYearXid:c,mappingXid:0})).then(function(){M(!1),Ke()}).catch(function(e){M(!1),e.status===Z.BR&&e.response&&e.response.body&&"MIGRATE_FILE_NOT_RECOGNISED"===e.response.body.errorType&&B(!0)}))},[t.currentXid,oe,c]),rt=function(){var e;if(!oe)return e={},v.forEach(function(t){nr.forEach(function(n){var r=dr(t[n]);r.valid||(e[cr(t.xid,n)]=r.message)})}),Pe(e),0!==Object.keys(e).length?(Ce(I18n.translate("outside.invalid.amounts")),void $(!0)):void Promise.all(Object.keys(Ee.current).map(function(e){return Ee.current[e]&&Ee.current[e].reValidate()})).then(Q.el).then(function(e){e&&(M(!0),Ve.current.registerRequest((0,Ln.GE)(G,t.currentXid,Object.keys(b).map(function(e){return{externalAccountNumber:e,mappedToInternalAccountNumber:b[e],createNewAccount:N[e]}}).filter(function(e){return e.mappedToInternalAccountNumber}),"0")).then(function(e){M(!1),p(null),h([]),g({}),k({}),J(null),Y(e.body.importedBalances)}).catch(function(){return M(!1)}))})},ot=function(){B(function(e){return!e})},it=function(){Y(null)},at=function(){$(!1),Ce("")},lt=!v.some(function(e){return!b[e.accountNumber]}),st=oe;return le?tr(D.A,{title:I18n.translate("outside.page.title")},void 0,tr("div",{className:"page-header",style:{background:"#f5f5f5",padding:"12px 16px",marginBottom:0}},void 0,tr("div",{style:{display:"flex",alignItems:"center"}},void 0,tr("button",{type:"button",onClick:We,className:"btn btn-default mr-2"},void 0,tr("i",{className:"fa fa-chevron-left","aria-hidden":"true"})," ",I18n.translate("button.back")),tr("h4",{className:"my-0"},void 0,I18n.translate("outside.page.title")))),tr("div",{className:"container-fluid"},void 0,tr("p",{className:"text-danger"},void 0,le))):tr(D.A,{title:I18n.translate("outside.page.title"),loadScreen:E},void 0,tr("div",{className:"page-header"},void 0,tr("div",{className:"d-flex align-items-center"},void 0,tr("button",{type:"button",onClick:We,className:"btn btn-default mr-2"},void 0,tr("i",{className:"fa fa-chevron-left","aria-hidden":"true"})," ",I18n.translate("button.back")),tr("h4",{className:"my-0"},void 0,I18n.translate("outside.page.title"),te?" – ".concat(te):"")),tr("div",{className:"d-flex align-items-center"},void 0,0!==v.length&&!st&&tr("button",{className:"btn btn-danger btn-action__square",onClick:function(){return de(!0)}},void 0,I18n.translate("button.delete")))),tr("div",{},void 0,G&&tr("div",{},void 0,tr("button",{className:"btn btn-danger",type:"button",onClick:function(){p(null),h([]),g({}),k({}),J(null)}},void 0,I18n.translate("button.cancel")),v.length?tr(r.Fragment,{},void 0,tr("button",{className:"btn btn-primary mr-2 ml-2",type:"button",onClick:function(){return function(){if(!oe){var e={},t=Object.entries(b).reduce(function(t,n){var r=Jn(n,2),o=r[0],i=r[1],a=!i;return(a||N[o])&&(e[o]=!0),Qn(Qn({},t),{},Zn({},o,a?o:i))},{});g(t),x(e)}}()},disabled:st},void 0,I18n.translate("migrate.undecided.as.new")),tr("button",{className:"btn btn-primary",type:"button",onClick:function(){return rt()},disabled:!lt||st},void 0,I18n.translate("migrate.button"))):null)),tr("div",{className:"container-fluid"},void 0,G&&v.length&&!lt?tr("p",{className:"text-danger",style:{float:"right"}},void 0,tr("i",{className:"fa fa-warning mr-1","aria-hidden":"true"}),I18n.translate("migrate.mapall")):null,v.length>0?tr("div",{className:"migrate-outside-loaded-layout"},void 0,tr(Fn(),{className:"migrate-outside-loaded-layout__top"},void 0,tr(Rn(),{xs:12,md:4,className:"migrate-outside-loaded-layout__top-col"},void 0,tr("div",{className:"migrate-outside-loaded-layout__card"},void 0,tr("h6",{className:"migrate-outside-loaded-layout__card-title"},void 0,I18n.translate("outside.accounts")),tr("p",{className:"migrate-outside-loaded-layout__card-text mb-0"},void 0,_?I18n.translate("migrate.accounts.std",t.currentCompany.name,I):I18n.translate("migrate.accounts.custom",t.currentCompany.name)))),tr(Rn(),{xs:12,md:4,className:"migrate-outside-loaded-layout__top-col"}),tr(Rn(),{xs:12,md:4,className:"migrate-outside-loaded-layout__top-col"},void 0,tr("div",{className:"migrate-outside-loaded-layout__card"},void 0,tr("h6",{className:"migrate-outside-loaded-layout__card-title"},void 0,I18n.translate("setup.fiscalyears.edit.primovalues")),tr("p",{className:"migrate-outside-loaded-layout__radio-row"},void 0,tr(En(),{checked:!!he,inline:!0,disabled:st,onChange:function(){return Ge(!0)}},void 0,I18n.translate("outside.use.imported.primo"))),tr("p",{className:"migrate-outside-loaded-layout__radio-row mb-0"},void 0,tr(En(),{checked:!1===he,inline:!0,disabled:st,onChange:function(){return Ge(!1)}},void 0,I18n.translate("outside.use.typed.primo"))))))):null,v.length>0&&ge&&tr(Vn.L,{message:I18n.translate("outside.primo.diff",ge),icon:tr(Xn.A,{}),hideCaret:!0}),v.length>0&&ke&&tr(Vn.L,{message:I18n.translate("outside.period.diff",ke),icon:tr(Xn.A,{}),hideCaret:!0}),0===v.length&&tr("div",{className:"migrate-outside-import-layout"},void 0,tr("div",{className:"migrate-outside-import-layout__header"},void 0,tr("h5",{className:"mb-2"},void 0,I18n.translate("import.from.file"))),tr(Fn(),{className:"migrate-outside-import-layout__row"},void 0,tr(Rn(),{xs:12,md:8,className:"migrate-outside-import-layout__main"},void 0,G?null:tr("div",{className:"migrate-outside-import-layout__upload-card"},void 0,tr("div",{className:"migrate-outside-import-layout__drop-inner"},void 0,st?tr("div",{style:{padding:"16px 8px"}},void 0,I18n.translate("outside.year.closed")):tr($n.m,{className:"transparent",placeholder:I18n.translate("migrate.drop.text"),onFileAdded:function(e){return nt(e)},disablePreview:!0,useMoreSpacing:!0})))),tr(Rn(),{xs:12,md:4,className:"migrate-outside-import-layout__aside"},void 0,tr("div",{className:"import-file-form__info migrate-outside-import-layout__info-card mb-3"},void 0,tr("div",{className:"migrate-outside-import-layout__result-title"},void 0,I18n.translate("outside.intro.title")),tr("ul",{className:"migrate-outside-import-layout__bullets"},void 0,tr("li",{},void 0,I18n.translate("outside.intro.1")),tr("li",{},void 0,I18n.translate("outside.intro.2")),tr("li",{},void 0,I18n.translate("outside.intro.3"))),tr("div",{className:"migrate-outside-import-layout__divider"}),tr("div",{className:"migrate-outside-import-layout__result-title"},void 0,I18n.translate("outside.result.title")),tr("ul",{className:"migrate-outside-import-layout__bullets mb-0"},void 0,tr("li",{},void 0,I18n.translate("outside.result.1")),tr("li",{},void 0,I18n.translate("outside.result.2"))),tr(lr,{title:"E-conomic",messageKey:"outside.import.economic"}),tr(lr,{title:"Dinero",messageKey:"outside.import.dinero"}),tr(lr,{title:"Billy",messageKey:"outside.import.billy"}),tr(lr,{title:"Uniconta",messageKey:"outside.import.uniconta"}),tr("div",{className:"migrate-outside-import-layout__divider"}),tr("div",{className:"migrate-outside-import-layout__result-title"},void 0,I18n.translate("outside.import.generic.title")),tr("a",{href:"/documents/multiregnskab-balance-import.xlsx",download:!0},void 0,I18n.translate("outside.import.generic.linktext")),tr("p",{className:"mt-1"},void 0,I18n.translate("outside.import.generic.explain")))))),G?tr("div",{className:"my-1 h4"},void 0,f):null,v.length>0?tr("table",{className:"table-st table-st__v2 migrate-outside-book-table"},void 0,tr("thead",{className:"table-st__head"},void 0,tr("tr",{},void 0,tr("th",{className:"text-right"},void 0,I18n.translate("migrate.accountnumber")),tr("th",{},void 0,I18n.translate("migrate.accountname")),tr("th",{className:"text-right"},void 0,I18n.translate("migrate.primoamount")),tr("th",{className:"text-right"},void 0,I18n.translate("migrate.periodamount")),tr("th",{className:"text-right"},void 0,I18n.translate("migrate.ultimoamount")),tr("th",{className:"migrate-table__mapped-col"},void 0,I18n.translate("migrate.mappedto")),tr("th",{className:"migrate-table__placement-col migrate-table__placement-col--head"},void 0,I18n.translate("migrate.placement")))),tr("tbody",{className:"table-st__body"},void 0,v.map(function(e,n){var i=pe[e.accountNumber],a=null!==e.mappedToAccountNumber&&void 0!==e.mappedToAccountNumber&&""!==e.mappedToAccountNumber,l=N[e.accountNumber]&&null!=b[e.accountNumber]&&""!==String(b[e.accountNumber]).trim()?b[e.accountNumber]:null,s=i&&i.verified&&null!=i.value&&""!==String(i.value).trim()?String(i.value).trim():null,d=l||(a?e.mappedToAccountNumber:null),f=a||i||N[e.accountNumber]?null:function(e,t){if(!e||!t||0===t.size)return null;var n=fr(e.accountName);return n&&t.get(n)||null}(e,Te),p=f?pr(o,f):null,m=xe[cr(e.xid,"primoAmount")],v=xe[cr(e.xid,"periodAmount")],h=!!m,y=!!v,w="outside-primo-amount-error-".concat(e.xid),k="outside-period-amount-error-".concat(e.xid),O=function(e){var t,n,r=ar(null!==(t=e.primoWarning)&&void 0!==t?t:e.primoAmountWarning,null!==(n=e.primoWarningMessageKey)&&void 0!==n?n:e.primoAmountWarningMessageKey);if(r)return r;var o=e.mappedToAccountGroupPlacement;return o&&rr.has(String(o))&&ir(e.primoAmount)?"Der er primoværdi på en konto i resultatopgørelsen eller resultatdisponering.":null}(e),x=function(e){var t,n,r=ar(null!==(t=e.periodWarning)&&void 0!==t?t:e.periodAmountWarning,null!==(n=e.periodWarningMessageKey)&&void 0!==n?n:e.periodAmountWarningMessageKey);if(r)return r;var o=e.mappedToAccountGroupPlacement;return o&&or.has(String(o))&&ir(e.periodAmount)?"Der er bevægelse i perioden på en resultatdisponeringskonto.":null}(e),P=null!=e.mappedToAccountGroup?String(e.mappedToAccountGroup):"",I=null!=e.mappedToAccount
1Xbrl?String(e.mappedToAccountXbrl):"",A=null!=e.mappedToAccountType?String(e.mappedToAccountType):"",C="",j="",D="",_=null;i?i.verified&&s&&(C=null!=i.groupName&&""!==String(i.groupName).trim()?String(i.groupName).trim():"",j="",D="",_=null):d&&(C=P,j=I,D=A,_=S[e.accountNumber]||null);var R=!!(C||j||D),T=null;return(R||_)&&(T=!R&&_?tr("div",{className:"migrate-placement-details"},void 0,_):tr("div",{className:"migrate-placement-details"},void 0,C?tr("div",{className:"migrate-placement-details__row"},void 0,tr("span",{className:"migrate-placement-details__value"},void 0,C)):null,j?tr("div",{className:"migrate-placement-details__row"},void 0,tr("span",{className:"migrate-placement-details__value"},void 0,tr("i",{},void 0,j))):null,D?tr("div",{className:"migrate-placement-details__row"},void 0,tr("span",{className:"migrate-placement-details__value"},void 0,"[",D,"]")):null,_?tr("div",{className:"migrate-placement-details__extra"},void 0,_):null)),tr("tr",{className:i?"migrate-outside-book-table__row--finance-flow":void 0},n,tr("td",{className:"text-right text-nowrap"},void 0,e.accountNumber),tr("td",{},void 0,e.accountName),tr("td",{className:"text-right migrate-outside-book-table__amount-cell"},void 0,st?tr("div",{className:"migrate-outside-book-table__amount-cell-stack"},void 0,tr("span",{},void 0,e.primoAmount),tr(sr,{lineXid:e.xid,amountKey:"primoAmount",warning:O})):tr("div",{className:"form-group mb-0".concat(h?" has-error":"")},void 0,tr("input",{type:"text",className:"form-control text-right migrate-outside-book-table__amount-input",value:null!=e.primoAmount?String(e.primoAmount):"","aria-label":"Primo","aria-invalid":h,"aria-describedby":h?w:void 0,onChange:function(t){return Ze(e.xid,"primoAmount",t.target.value)},onBlur:function(t){return Je(e.xid,"primoAmount",t.target.value)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}}),h?tr("span",{id:w,className:"help-block"},void 0,m):null,tr(sr,{lineXid:e.xid,amountKey:"primoAmount",warning:O}))),tr("td",{className:"text-right migrate-outside-book-table__amount-cell"},void 0,st?tr("div",{className:"migrate-outside-book-table__amount-cell-stack"},void 0,tr("span",{},void 0,e.periodAmount),tr(sr,{lineXid:e.xid,amountKey:"periodAmount",warning:x})):tr("div",{className:"form-group mb-0".concat(y?" has-error":"")},void 0,tr("input",{type:"text",className:"form-control text-right migrate-outside-book-table__amount-input",value:null!=e.periodAmount?String(e.periodAmount):"","aria-label":"Perioden","aria-invalid":y,"aria-describedby":y?k:void 0,onChange:function(t){return Ze(e.xid,"periodAmount",t.target.value)},onBlur:function(t){return Je(e.xid,"periodAmount",t.target.value)},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),e.currentTarget.blur())}}),y?tr("span",{id:k,className:"help-block"},void 0,v):null,tr(sr,{lineXid:e.xid,amountKey:"periodAmount",warning:x}))),tr("td",{className:"text-right text-nowrap"},void 0,e.ultimoAmountStr),tr("td",{className:"migrate-table__mapped-col"},void 0,tr("div",{className:"migrate-table__mapped-inner",onClick:function(e){return e.stopPropagation()}},void 0,i?tr(r.Fragment,{},void 0,tr("div",{className:"migrate-finance-cell"},void 0,tr("label",{className:"sr-only",htmlFor:"migrate-fc-input-".concat(e.accountNumber)},void 0,I18n.translate("outside.account.number")),tr("div",{className:"migrate-finance-inline-field"},void 0,r.createElement(je.x,{ref:(0,Q.qP)(Me.current,Ee.current,"fc-".concat(e.accountNumber)),id:"migrate-fc-input-".concat(e.accountNumber),className:"mb-0".concat(i.errorKey?" has-error":""),hideRemove:!0,busy:i.verifying,value:i.value,placeholder:I18n.translate("outside.account.number"),ariaLabel:I18n.translate("outside.account.number"),autoFocus:!0,disabled:i.creating||st,onChange:function(t){if(!st){var n=e.accountNumber;He.current[n]&&(clearTimeout(He.current[n]),He.current[n]=null);var r="string"==typeof t?t.trim():"";if(!r)return Le.current[n]=(Le.current[n]||0)+1,void me(function(e){var r=e[n];return r?Qn(Qn({},e),{},Zn({},n,Qn(Qn({},r),{},{value:"string"==typeof t?t:"",verified:!1,errorKey:null,verifying:!1,xbrlDef:"",verifiedAccountName:"",groupName:""}))):e});me(function(o){var i=o[n];if(!i)return o;var a=(null!=i.value?String(i.value):"").trim()===r;return a||queueMicrotask(function(){return tt(n,r,e.xid)}),Qn(Qn({},o),{},Zn({},n,Qn(Qn({},i),{},{value:"string"==typeof t?t:"",verified:!!a&&i.verified,errorKey:a?i.errorKey:null,verifying:!!a&&i.verifying,xbrlDef:a?i.xbrlDef:"",verifiedAccountName:a?i.verifiedAccountName:"",groupName:a?i.groupName:""})))})}}}),tr("button",{type:"button",className:"migrate-finance-inline-field__clear",disabled:st,onClick:function(t){t.preventDefault(),t.stopPropagation(),et(e.accountNumber)},"aria-label":I18n.translate("button.cancel")},void 0,tr("i",{className:"fa fa-remove","aria-hidden":"true"}))),tr("div",{className:"migrate-finance-cell__messages","aria-live":"polite"},void 0,i.verified&&i.verifiedAccountName?tr("div",{className:"migrate-finance-cell__verified-account"},void 0,i.verifiedAccountName):null,i.errorKey?tr("div",{className:"migrate-finance-cell__meta text-danger"},void 0,I18n.translate(i.errorKey)):null))):N[e.accountNumber]?r.createElement(je.x,{ref:(0,Q.qP)(Me.current,Ee.current,e.accountNumber),className:"mb-0",value:b[e.accountNumber]||"",validators:Ue,disabled:st,onChange:function(t){g(function(n){return Qn(Qn({},n),{},Zn({},e.accountNumber,t))})},onBlur:function(){var n;n={externalAccountNumber:e.accountNumber,internalAccountNumber:b[e.accountNumber],createIfNeeded:void 0===S[e.accountNumber]},oe||(0,Ln.Ow)({companyXid:t.currentXid,migrateImportAccountMapping:n})}}):tr(Fe.H,{className:"mb-0",value:e.mappedToAccountNumber,groupedOptions:o,disabled:st,onChange:function(t){Qe({lineXid:e.xid,mappedToAccountNumber:t})}}))),tr("td",{className:"migrate-table__placement-col"+(i||d?"":" migrate-table__placement-col--create-new-link"),onClick:function(e){return e.stopPropagation()}},void 0,i&&i.creating?tr("span",{className:"migrate-finance-placement-spinner",role:"status","aria-live":"polite","aria-label":I18n.translate("inbox.loading")},void 0,tr(qn.A,{})):i?tr("div",{className:"migrate-placement-finance"},void 0,tr("button",{type:"button",className:"btn btn-primary btn-sm migrate-placement-finance__btn",disabled:!i.verified||st,onMouseDown:function(e){i.verified&&e.preventDefault()},onClick:function(t){t.preventDefault(),t.stopPropagation(),function(e,t){if(!oe){var n=e.accountNumber;if(!Xe.current[n]&&t&&t.verified&&!t.creating){var r=Ee.current["fc-".concat(n)],o=r&&null!=r.state&&"string"==typeof r.state.value?r.state.value.trim():"",i=(null!=t.value?String(t.value):"").trim(),a=o||i;a&&(Xe.current[n]=!0,me(function(e){return Qn(Qn({},e),{},Zn({},n,Qn(Qn({},e[n]),{},{creating:!0})))}
1),Ve.current.registerRequest(Bn({companyXid:u,fiscalYearXid:c,lineXid:e.xid,accountNumber:a,reallyCreateAccount:!0,xbrlDef:t.xbrlDef,accountName:null!=e.accountName?e.accountName:""})).then(function(e){var t=e.body||{};if(t.rejectedReasonMessageKey)return q(t.rejectedReasonMessageKey),$(!0),void me(function(e){return Qn(Qn({},e),{},Zn({},n,Qn(Qn({},e[n]),{},{creating:!1})))});et(n),Ke()}).catch(function(e){me(function(e){return Qn(Qn({},e),{},Zn({},n,Qn(Qn({},e[n]),{},{creating:!1})))}),e.status===Z.BR&&e.response&&e.response.body&&e.response.body.messageKey?q(e.response.body.messageKey):q("didnotwork"),$(!0)}).finally(function(){delete Xe.current[n]}))}}}(e,i)}},void 0,"Opret"),i.verified&&s?tr("div",{className:"migrate-placement-finance__meta"},void 0,T):null):d?T:!st&&tr("div",{className:"migrate-placement-create-new"},void 0,tr("a",{href:"#",role:"button",onClick:function(t){return function(e,t){if(oe)return e.preventDefault(),void e.stopPropagation();e.preventDefault(),e.stopPropagation();var n=t.accountNumber;$e.current[n]=!0,me(function(e){return Qn(Qn({},e),{},Zn({},n,{value:"",verifying:!1,creating:!1,verified:!1,xbrlDef:"",verifiedAccountName:"",groupName:"",errorKey:null}))})}(t,e)}},void 0,I18n.translate("outside.create.new")),f?tr("span",{className:"mt-1"},void 0,I18n.translate("outside.use.existing")," ",tr("a",{href:"#",role:"button",onClick:function(t){t.preventDefault(),t.stopPropagation(),Qe({lineXid:e.xid,mappedToAccountNumber:f})}},void 0,p)):null)))}))):null),tr(gn.A,{show:ue,title:I18n.translate("outside.delete.title"),submitBtnText:I18n.translate("yes.delete"),onSubmit:function(){oe?de(!1):(M(!0),Ve.current.registerRequest(function(e){var t=e.companyXid,n=e.fiscalYearXid;return(0,a.RD)(l.gn4,{method:"post",data:{companyXid:t,fiscalYearXid:n}})}({companyXid:u,fiscalYearXid:c})).then(function(){M(!1),Ke()}).finally(function(){return M(!1)}))},onHide:function(){return de(!1)}},void 0,tr("p",{},void 0,I18n.translate("outside.delete.body")),tr("p",{},void 0,I18n.translate("outside.delete.body.2"))),tr(gn.A,{show:L,title:Ae?"Fejl i beløb":I18n.translate("didnotwork"),submitBtnText:I18n.translate("ok"),onSubmit:at,onHide:at,noCancelBtn:!0},void 0,tr("p",{},void 0,Ae||I18n.translate(V))),tr(gn.A,{show:z,title:I18n.translate("failed"),submitBtnText:I18n.translate("ok"),onSubmit:ot,onHide:ot,noCancelBtn:!0},void 0,I18n.translate("migrate.file.unknown")),tr(gn.A,{show:null!==W,title:I18n.translate("migrate.resultdialog.title"),submitBtnText:I18n.translate("ok"),onSubmit:it,onHide:it,noCancelBtn:!0},void 0,I18n.translate("migrate.resultdialog.body",W)))});var vr,hr=n(20219),yr=n(28903),br=n(30732),gr=n(94277),wr=n(77377);function Sr(e,t,n,r){vr||(vr="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:vr,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const kr=function(e){var t=e.authMailTextDa,n=e.authMailTextEn,r=!!t,o=!!n,a=function(e){e&&navigator.clipboard.writeText(e).then(function(){i.oR.success("Kopieret!",{position:"top-center",autoClose:2e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0})},function(){i.oR.error("Kunne ikke kopiere",{position:"top-center",autoClose:2e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0})})};return!(!t&&!n)?Sr("div",{style:{flex:"1",minWidth:"300px"}},void 0,Sr("p",{className:"mb-2"},void 0,Sr("strong",{},void 0,"Instruktioner til brug i e-mail")),Sr("div",{className:"d-flex flex-column",style:{gap:"8px"}},void 0,r&&Sr("button",{type:"button",className:"btn btn-light d-flex align-items-center",onClick:function(){return a(t)},style:{padding:"8px 12px",fontSize:"14px",border:"1px solid #dee2e6",backgroundColor:"#fff",boxShadow:"0 1px 2px rgba(0,0,0,0.1)",justifyContent:"flex-start",gap:"8px"}},void 0,Sr("img",{src:"/images/DA.png",alt:"Danish",width:20,height:15,style:{objectFit:"cover"}}),Sr("i",{className:"fa fa-copy","aria-hidden":"true"}),Sr("span",{},void 0,"Til klippebord")),o&&Sr("button",{type:"button",className:"btn btn-light d-flex align-items-center",onClick:function(){return a(n)},style:{padding:"8px 12px",fontSize:"14px",border:"1px solid #dee2e6",backgroundColor:"#fff",boxShadow:"0 1px 2px rgba(0,0,0,0.1)",justifyContent:"flex-start",ga
1p:"8px"}},void 0,Sr("img",{src:"/images/GB.png",alt:"English",width:20,height:15,style:{objectFit:"cover"}}),Sr("i",{className:"fa fa-copy","aria-hidden":"true"}),Sr("span",{},void 0,"Til klippebord")))):null};var Or;function Nr(e,t,n,r){Or||(Or="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Or,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function xr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Ir=function(e){var t=e.connRequest,n=e.onDelete,o=e.onInfo,i=e.bankOptions,a=e.onMapAccount,l=e.onRemoveAccount,s=xr((0,r.useState)(null),2),c=s[0],u=s[1],d=t.authMailTextDa||t.authMailTextEn;return Nr("div",{className:"card mb-2"},void 0,Nr("div",{className:"card-body"},void 0,Nr("div",{className:"card-title"},void 0,I18n.translate("bankfetch.conn.title",t.aspspName)),Nr("div",{className:"d-flex align-items-start flex-wrap",style:{gap:"12px",marginBottom:"12px"}},void 0,Nr("div",{style:{flex:"1",minWidth:"200px"}},void 0,t.authorized&&Nr("p",{className:"mb-1",style:{fontSize:"14px"}},void 0,I18n.translate("bankfetch.conn.connected",t.entered)),!t.authorized&&Nr("p",{className:"mb-1",style:{fontSize:"14px"}},void 0,I18n.translate("bankfetch.conn.pending")),t.validUntil&&Nr("p",{className:"mb-1",style:{fontSize:"14px",color:"#666"}},void 0,I18n.translate("bankfetch.conn.expires",t.validUntil),t.connectionNoLongerValid&&Nr("span",{},void 0,"",I18n.translate("bankfetch.conn.expired"))),t.validUntil&&t.connectionNoLongerValid&&Nr("p",{className:"mb-1",style:{fontSize:"14px",color:"#666"}},void 0,I18n.translate("bankfetch.conn.expired.explain")),t.authUrl&&Nr("div",{className:"mt-2 mb-2"},void 0,Nr("a",{href:t.authUrl,target:"_blank",rel:"noreferrer",className:"btn btn-link p-0"},void 0,I18n.translate("bankfetch.conn.link"))),Nr("div",{className:"mt-2 mb-2"},void 0,Nr("a",{href:"#",onClick:function(){return n(t.id)}},void 0,I18n.translate("bankfetch.conn.remove"))),Nr("div",{className:"mt-2 mb-2"},void 0,t.authorized&&!(t.validUntil&&t.connectionNoLongerValid)&&Nr("a",{href:"#",onClick:function(){return o(t.id)}},void 0,I18n.translate("bankfetch.conn.test")))),d&&Nr(kr,{authMailTextDa:t.authMailTextDa,authMailTextEn:t.authMailTextEn})),t.accounts&&t.accounts.length>0&&Nr("div",{className:"mb-2"},void 0,Nr("strong",{style:{fontSize:"14px"}},void 0,I18n.translate("bankfetch.conn.accounts")),Nr("p",{style:{fontSize:"14px",color:"#666"}},void 0,I18n.translate("bankfetch.conn.accounts.explained")),Nr("ul",{style:{marginTop:"8px",marginBottom:"0",listStyle:"none",paddingLeft:"0"}},void 0,t.accounts.map(function(e){var n=function(e,t){if(!e)return null;var n=t.find(function(t){return t.value==e});return n?n.label:null}
1(e.suggestBankAccountXid,i),r=n&&e.mappedToBankAccountXid!=e.suggestBankAccountXid;return Nr("li",{className:"mb-2"},e.internalAccountId,Nr("div",{className:"d-flex align-items-center flex-wrap",style:{gap:"12px"}},void 0,Nr("div",{className:"d-flex align-items-center mr-3",style:{flex:"1",minWidth:"200px",minHeight:"38px"}},void 0,Nr("span",{},void 0,e.accountName," (",e.currency,") - ",e.accountDescription,e.mappedToBankAccountXid?null:Nr("a",{href:"#",className:"ml-3",onClick:function(n){n.preventDefault(),u({connectionRequestId:t.id,integrationInternalAccountId:e.internalAccountId})}},void 0,I18n.translate("bankfetch.conn.account.remove")))),r?Nr("div",{className:"d-flex align-items-center",style:{minHeight:"38px"}},void 0,Nr("a",{href:"#",style:{whiteSpace:"nowrap"},onClick:function(n){n.preventDefault(),a({connectionRequestId:t.id,integrationInternalAccountId:e.internalAccountId,bankAccountXid:e.suggestBankAccountXid,map:!0,unmap:!1})}},void 0,"Tilknyt '".concat(n,"'"))):null,Nr("div",{style:{width:"316px",minWidth:"250px"}},void 0,Nr(Fe.H,{className:"mb-0",clearFix:!1,placeholder:I18n.translate("bankcompare.account"),options:i,value:e.mappedToBankAccountXid||null,noDeselect:!0,onChange:function(n){a({connectionRequestId:t.id,integrationInternalAccountId:e.internalAccountId,bankAccountXid:n,map:!!n,unmap:!n})}}))))})))),Nr(gn.A,{show:!!c,title:I18n.translate("bankfetch.conn.account.remove"),onSubmit:function(){c&&(l(c),u(null))},onHide:function(){return u(null)},submitBtnText:I18n.translate("confirmmodal.confirm")},void 0,"Er du sikker på, at du vil fjerne denne bankkontoforbindelse?"))};var Ar;function Cr(e,t,n,r){Ar||(Ar="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ar,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const jr=function(e){var t=e.preConnectionRequest;return Cr("div",{className:"card mb-2"},void 0,Cr("div",{className:"card-body"},void 0,Cr("div",{className:"d-flex align-items-start flex-wrap",style:{gap:"12px",marginBottom:"12px"}},void 0,Cr("div",{style:{flex:"1",minWidth:"200px"}},void 0,Cr("p",{className:"mb-1"},void 0,Cr("strong",{},void 0,I18n.translate("bankfetch.pre.header"))),t.entered&&t.enteredBy&&Cr(r.Fragment,{},void 0,Cr("p",{className:"mb-1"},void 0,I18n.translate("bankfetch.pre.details",t.entered,t.enteredBy)),Cr("p",{},void 0,I18n.translate("bankfetch.pre.explain")))),Cr(kr,{authMailTextDa:t.authMailTextDa,authMailTextEn:t.authMailTextEn}))))};var Dr,_r=n(59499),Rr=n(92104);function Tr(e){return function(e){if(Array.isArray(e))return Fr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Mr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Er(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||Mr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mr(e,t){if(e){if("string"==typeof e)return Fr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fr(e,t):void 0}}function Fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zr(e,t,n,r){Dr||(Dr="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Dr,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Br,Hr=function(e){var t=e.number,n=e.textKey,r=e.alwaysShow;return null!==t&&0!==t||r?zr("div",{className:"mb-2 d-flex align-items-center"},void 0,zr("span",{style:{fontSize:"24px",fontWeight:"bold",marginRight:"8px"}},void 0,t||0),zr("span",{},void 0,I18n.translate(n))):null},Lr=function(){var e=Er((0,r.useState)(""),2),t=e[0],n=e[1],o=Er((0,r.useState)(!1),2),i=o[0],a=o[1],l=Er((0,r.useState)(!1),2),s=l[0],c=l[1],u=Er((0,r.useState)(!1),2),d=u[0],f=u[1],m=Er((0,r.useState)(null),2),v=m[0],h=m[1],y=Er((0,r.useState)(!1),2),b=y[0],g=y[1],w=Er((0,r.useState)(""),2),S=w[0],k=w[1],O=Er((0,r.useState)(!1),2),N=O[0],x=O[1],P=Er((0,r.useState)(""),2),I=P[0],A=P[1],C=Er((0,r.useState)("default"),2),_=C[0],R=C[1],T=(0,r.useRef)(null),E=Er((0,r.useState)(!1),2),M=E[0],F=E[1],z=Er((0,r.useState)(null),2),B=z[0],H=z[1],L=new j.g,$=(0,Rr.C)(),X=$.run,V=$.isPending,q=(0,zn.wA)(),U=(0,zn.d4)(function(e){return e.companies.currentXid}),W=(0,zn.d4)(function(e){return e.bankCompare.fiscalYear}),Y=(0,zn.d4)(function(e){return e.bankCompare.bankIntegrationSetup}),K=(0,zn.d4)(function(e){return e.defaults}),G=K.fiscalYearsByXid||[],J=[{label:"Ingen tilknytning",value:null}].concat(Tr((K.bankAccounts||[]).map(function(e){return{label:e.text,value:e.bankAccount
1Xid}}))),ee=W||(G.length>0?String(G[G.length-1]?G[G.length-1].value:""):null),te=Y&&Y.companyXid===U&&Y.fiscalYearXid===parseInt(ee),ne=ee&&U&&!te,re=Y&&Y.data?Y.data:null,oe=re&&re.addOptions&&(re.addOptions.allowedToAddToShoppingBasketForCompany||re.addOptions.canAddToShoppingBasketConfirmedForAdministrator||re.addOptions.canAddToShoppingBasketForCompanyAsAdministrator);(0,r.useEffect)(function(){ee&&!W&&q((0,br.Te)(ee))},[ee,W,q]),(0,r.useEffect)(function(){return ee&&U&&!te&&q((0,br.MW)({companyXid:U,fiscalYearXid:parseInt(ee)})),function(){L.abortAll()}},[U,ee,q,te]);var ie=(0,r.useCallback)(function(){ee&&U&&q((0,br.MW)({companyXid:U,fiscalYearXid:parseInt(ee)}))},[U,ee,q]);(0,r.useEffect)(function(){var e=function(){ie()};return window.addEventListener(p.m8,e),function(){window.removeEventListener(p.m8,e)}},[ie]),(0,r.useEffect)(function(){if(re&&re.addOptions){var e=re.addOptions,t=JSON.stringify({hasOptionsArray:!!(e.options&&Array.isArray(e.options)&&e.options.length>0),canAddToShoppingBasketForCompanyAsAdministrator:e.canAddToShoppingBasketForCompanyAsAdministrator||!1,canAddToShoppingBasketConfirmedForAdministrator:e.canAddToShoppingBasketConfirmedForAdministrator||!1,fiscalYear:ee});T.current!==t&&(T.current=t,R("default"))}},[re,ee]);var ae=(0,r.useCallback)(function(e,t,n){f(!0),L.registerRequest((0,hr.Bt)({companyXid:U,bankOptionId:e,psuTypePersonal:t,psuTypeBusiness:n})).then(function(){ie(),h(null)}).finally(function(){f(!1),a(!1)})},[U,ie]),le=(0,r.useCallback)(function(e){f(!0),L.registerRequest((0,hr.uZ)({companyXid:U,sessionId:e})).then(function(){ie()}).finally(function(){f(!1)})},[U,ie]),se=(0,r.useCallback)(function(e){f(!0),L.registerRequest((0,hr.dt)({companyXid:U,sessionId:e})).then(function(e){k(e.body.status),g(!0)}).finally(function(){f(!1)})},[U]),ce=(0,r.useCallback)(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];X(function(){return L.registerRequest((0,yr.x7)({companyXid:U,fiscalYearXid:parseInt(ee),productKey:"YEAR_BANK",numberOfUnits:1,invoiceToAdministratorsCustomer:e,confirmedForAdministrator:t})).then(function(){ie()})})},[U,ee,ie,X]),ue=(0,r.useCallback)(function(e){q((0,br.Te)(e))},[q]),de=(0,r.useCallback)(function(e){var t=e.connectionRequestId,n=e.integrationInternalAccountId,r=e.bankAccountXid,o=e.map,i=e.unmap;f(!0),L.registerRequest((0,hr.S1)({companyXid:U,connectionRequestId:t,integrationInternalAccountId:n,bankAccountXid:r||null,map:o,unmap:i})).then(function(){ie()}).catch(function(e){e.status===Z.BR?(H(e.response.body.messageKey),F(!0)):_r.captureError(e,{componentName:"BankIntegrationSetupPage"})}).finally(function(){f(!1)})},[U,ie]),fe=(0,r.useCallback)(function(e){var t=e.connectionRequestId,n=e.integrationInternalAccountId;f(!0),L.registerRequest((0,hr.gS)({companyXid:U,connectionRequestId:t,integrationInternalAccountId:n})).then(function(){ie()}).finally(function(){f(!1)})},[U,ie]);return zr(D.A,{title:I18n.translate("bankintegration.page.title"),loadScreen:ne||d},void 0,zr("div",{className:"container-fluid"},void 0,zr("div",{className:"page-header"},void 0,zr("div",{className:"d-flex align-items-center"},void 0,zr(bn.A,{to:(0,Q.ID)("/work/bank-compare")}),zr("h4",{className:"my-0"},void 0,I18n.translate("bankintegration.page.title"))),zr("div",{className:"d-flex gap-5"},void 0,re&&zr("button",{className:"btn btn-primary",onClick:function(){return c(!0)},disabled:d||i||s||(re.numberOfCreditsInFiscalYearAvailableToUse||0)<=0},void 0,I18n.translate("bankfetch.conn.add")))),re&&zr("div",{className:"mb-2",style:{display:"grid",gridTemplateColumns:"2fr 1fr",gap:"15px"}},void 0,zr("div",{className:"card",style:{display:"flex",flexDirection:"column"}},void 0,zr("div",{className:"card-title"},void 0,"Købt og anvendt"),zr("div",{className:"card-body",style:{flex:"1",display:"flex",alignItems:"center"}},void 0,zr("div",{className:"row",style:{width:"100%"}},void 0,zr("div",{className:"col-md-6 d-flex align-items-center justify-content-center"},void 0,zr("div",{style:{fontSize:"14px",width:"100%"}},void 0,zr(Hr,{number:re.numberOfCreditsInFiscalYearPurchased,textKey:"bankfetch.purchased",alwaysShow:!0}
1),zr(Hr,{number:re.numberOfCreditsInFiscalYearInShoppingBasket,textKey:"bankfetch.in.basket",alwaysShow:!1}),zr(Hr,{number:re.numberOfCreditsInFiscalYearCommitted,textKey:"bankfetch.in.basket.confirmed",alwaysShow:!1}),zr(Hr,{number:re.numberOfCreditsInFiscalYearInUse,textKey:"bankfetch.in.use",alwaysShow:!1}))),zr("div",{className:"col-md-6 d-flex align-items-center"},void 0,zr("div",{style:{width:"100%"}},void 0,zr("div",{className:"mb-2"},void 0,zr("label",{className:"mb-2",style:{fontSize:"14px",fontWeight:500,display:"block"}},void 0,I18n.translate("bankfetch.fiscal.year")),zr("div",{style:{width:"200px"}},void 0,zr(Fe.H,{value:ee,labelKey:"text",options:G,onChange:ue,disabled:ne||!oe,noDeselect:!0},"year-select-inline"))),oe&&function(){var e=re.addOptions||{},t=[];e.options&&Array.isArray(e.options)&&e.options.length>0?t=e.options:(t=[{value:"default",label:I18n.translate("agreementdetails.payoption.us"),invoiceToAdministratorsCustomer:!1,confirmedForAdministrator:!1}],e.canAddToShoppingBasketForCompanyAsAdministrator&&t.push({value:"customer",label:I18n.translate("agreementdetails.payoption.us.confirmed"),invoiceToAdministratorsCustomer:!0,confirmedForAdministrator:!1}),e.canAddToShoppingBasketConfirmedForAdministrator&&t.push({value:"confirmed",label:I18n.translate("agreementdetails.payoption.customer"),invoiceToAdministratorsCustomer:!1,confirmedForAdministrator:!0}));var n=t.length>1,r=t.find(function(e){return e.value===_})||t[0];return zr("div",{},void 0,n&&zr("div",{className:"mb-3",style:{fontSize:"14px"}},void 0,t.map(function(e){return zr("div",{className:"radio mb-2"},e.value,zr("label",{},void 0,zr("input",{type:"radio",name:"basket-option",value:e.value,checked:_===e.value,onChange:function(e){return R(e.target.value)}}),zr("span",{className:"space-left"},void 0,e.label)))})),zr("button",{className:"btn btn-primary mb-2",onClick:function(){r&&ce(r.invoiceToAdministratorsCustomer||!1,r.confirmedForAdministrator||!1)},disabled:V},void 0,I18n.translate("bankfetch.add.to.basket")," ",V&&zr(qn.A,{})))}(),!oe&&zr("p",{},void 0,I18n.translate("bankfetch.no.access"))))))),zr("div",{className:"card",style:{display:"flex",flexDirection:"column"}},void 0,zr("div",{className:"card-body",style:{flex:"1"}},void 0,zr("p",{className:"mb-2",style:{fontSize:"14px",lineHeight:"1.6"}},void 0,I18n.translate("bankfetch.explain.buy.1")),zr("p",{className:"mb-2",style:{fontSize:"14px",lineHeight:"1.6"}},void 0,I18n.translate("bankfetch.explain.buy.2")),zr("p",{className:"mb-2",style:{fontSize:"14px",lineHeight:"1.6"}},void 0,I18n.translate("bankfetch.explain.buy.3")),zr("p",{style:{fontSize:"14px",lineHeight:"1.6",marginBottom:"0"}},void 0,I18n.translate("bankfetch.explain.buy.4"))))),re&&!N&&zr("div",{className:"card mb-2"},void 0,zr("div",{className:"card-body"},void 0,zr("button",{className:"btn btn-link",onClick:function(){return x(!0)},style:{padding:0,textDecoration:"none"}},void 0,I18n.translate("bankfetch.see.bank.options")))),re&&N&&zr("div",{className:"card mb-2",style:{position:"relative"}},void 0,zr("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",fontSize:"20px",fontWeight:"bold",color:"#666",zIndex:10},onClick:function(){return x(!1)}},void 0,"×"),zr("div",{className:"card-title"},void 0,I18n.translate("bankfetch.see.bank.options")),zr("div",{className:"card-body"},void 0,zr("input",{type:"text",className:"form-control mb-1",placeholder:"Søg efter bank...",value:I,onChange:function(e){return A(e.target.value)},style:{maxWidth:"400px"}}),zr("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"15px",alignItems:"start"}},void 0,re.bankInstitutionOptions.filter(function(e){return e.name.toLowerCase().includes(I.toLowerCase())}).map(function(e){return zr(gr.A,{bankInstitutionOption:e,readOnly:!0},e.name)})))),re&&re.numberOfCreditsInFiscalYearInShoppingBasket>0&&0===re.numberOfCreditsInFiscalYearPurchased&&zr("div",{className:"card mb-2"},void 0,zr("div",{className:"card-body"},void 0,zr("div",{className:"d-flex align-items-center flex-wrap",style:{width:"100%",gap:"12px",marginBottom:i?"20px":"0"}},void 0,re.numberOfCreditsInFiscalYearInShoppingBasket>0&&0===re.numberOfCreditsInFiscalYearPurchased&&zr("div",{className:"d-flex align-items-center flex-grow-1",style:{minWidth:"300px"}},void 0,zr("span",{},void 0,I18n.translate("bankfetch.conn.must.buy.1")+" ",zr("a",{href:(0,Q.ID)("/account/shoppingbasket"),style:{color:"#007bff"}},void 0,I18n.translate("bankfetch.conn.must.buy.2"))," "+I18n.translate("bankfetch.conn.must.buy.3")))))),re&&s&&zr("div",{className:"card mb-2"},void 0,zr("div",{className:"card-body"},void 0,zr("p",{},void 0,"Egen bank konto eller andens."),zr("button",{className:"btn btn-primary mr-2",onClick:function(){return a(!0),void c(!1)}},void 0,"Godkendes i bank med det samme"),zr("button",{className:"btn btn-primary",onClick:function(){return c(!1),f(!0),void L.registerRequest
1((0,hr.U2)(U)).then(function(){ie()}).finally(function(){f(!1)})}},void 0,"Godkendes senere"))),re&&i&&zr("div",{className:"card mb-2",style:{position:"relative"}},void 0,zr("div",{style:{position:"absolute",top:"10px",right:"10px",cursor:"pointer",fontSize:"20px",fontWeight:"bold",color:"#666",zIndex:10},onClick:function(){a(!1),h(null),n("")}},void 0,"×"),zr("div",{className:"card-body"},void 0,zr("div",{className:"d-flex align-items-center flex-wrap",style:{width:"100%",gap:"12px",marginBottom:i?"20px":"0"}},void 0,zr("i",{className:"fa fa-university",style:{fontSize:"32px"},"aria-hidden":"true"}),zr("strong",{},void 0,I18n.translate("bankfetch.conn.add"))),zr("div",{className:"mt-3"},void 0,v?zr(wr.A,{bank:v,onCancel:function(){return h(null)},onStartAuth:ae}):zr(r.Fragment,{},void 0,zr("h5",{},void 0,zr("strong",{},void 0,I18n.translate("bankfetch.choose.bank"))),re&&zr(r.Fragment,{},void 0,zr("input",{type:"text",className:"form-control mb-1",placeholder:"Søg efter bank...",value:t,onChange:function(e){return n(e.target.value)},style:{maxWidth:"400px"}}),zr("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"15px",alignItems:"start"}},void 0,re.bankInstitutionOptions.filter(function(e){return e.name.toLowerCase().includes(t.toLowerCase())}).map(function(e){return zr(gr.A,{bankInstitutionOption:e,onSelect:h},e.name)}))))))),re&&re.preRequests.length>0&&zr("div",{},void 0,re.preRequests.map(function(e){return zr(jr,{preConnectionRequest:e},e.uuid)})),re&&re.connectionRequests.length>0&&zr("div",{},void 0,re.connectionRequests.map(function(e){return zr(Ir,{connRequest:e,onDelete:le,onInfo:se,bankOptions:J,onMapAccount:de,onRemoveAccount:fe},e.id)})),re&&0===re.connectionRequests.length&&0===re.preRequests.length&&zr("div",{className:"card mb-2"},void 0,zr("div",{className:"card-body"},void 0,zr("p",{className:"mb-0",style:{fontSize:"14px"}},void 0,I18n.translate("bankfetch.conn.empty"))))),zr(gn.A,{show:b,title:I18n.translate("bankfetch.conn.test"),submitBtnText:I18n.translate("ok"),noCancelBtn:!0,onSubmit:function(){return g(!1)},onHide:function(){return g(!1)}},void 0,zr("p",{},void 0,I18n.translate("bankfetch.conn.test.body",S))),zr(gn.A,{show:M,title:I18n.translate("didnotwork"),submitBtnText:I18n.translate("ok"),onSubmit:function(){return F(!1)},onHide:function(){return F(!1)},noCancelBtn:!0},void 0,zr("p",{},void 0,I18n.translate(B))))};function $r(e){return $r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$r(e)}function Xr(e,t,n,r){Br||(Br="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Br,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Vr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qr(r.key),r)}}function qr(e){var t=function(e,t){if("object"!=$r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$r(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$r(t)?t:t+""}function Ur(e,t,n){return t=Yr(t),function(e,t){if(t&&("object"==$r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wr()?Reflect.construct(t,n||[],Yr(e).constructor):t.apply(e,n))}function Wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wr=function(){return!!e})()}function Yr(e){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yr(e)}function Kr(e,t){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kr(e,t)}var Gr=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ur(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kr(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return Xr("footer",{className:"app-footer"},void 0,Xr("img",{src:(0,Q.O4)().logo,alt:"logo"}),Xr("p",{className:"app-copyright"},void 0,"© Multi-Regnskab ApS 2026"))}}])&&Vr(n.prototype,r),o&&Vr(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}
1(r.PureComponent),Qr=n(71990),Zr=n.n(Qr),Jr=n(82005),eo=n.n(Jr),to=n(49049),no=n.n(to),ro=n(54625),oo=n(17375),io=n(85220),ao=n(94795),lo=n(87454),so=n(2762),co=n(13918),uo=n(12116),fo=n(74166),po=n(51790),mo=n(3207);const vo=JSON.parse('{"zE":"ctrl+h","wl":"shift+f1","K1":"shift+f2","Ar":"shift+f3","vm":"shift+f4","$3":"shift+f5","mr":"shift+f6"}');var ho,yo=n(54735);function bo(e,t,n,r){ho||(ho="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ho,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function go(e){return function(e){if(Array.isArray(e))return ko(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||So(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||So(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function So(e,t){if(e){if("string"==typeof e)return ko(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ko(e,t):void 0}}function ko(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Oo=function(e){var t=e.id,n=e.open,i=e.active,a=e.noCaret,l=e.pullRight,s=e.title,c=e.className,u=e.onToggle,d=e.disabled,f=e.children,p=(0,o.zy)(),m=wo((0,r.useState)(n||!1),2),v=m[0],h=m[1],y=(0,r.useRef)(null),b=(0,r.useRef)(null);(0,r.useEffect)(function(){h(!1)},[p]);var g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!v;d||(h(e),u&&u(e))},w=function(e){v&&b.current&&!b.current.contains(e.target)&&y.current&&!y.current.contains(e.target)&&g(!1)};(0,r.useEffect)(function(){return document.addEventListener("mousedown",w),function(){document.removeEventListener("mousedown",w)}},[v]),(0,r.useEffect)(function(){h(n||!1)},[n]);return(0,r.useLayoutEffect)(function(){if(v&&y.current&&b.current){var e=y.current.getBoundingClientRect(),t=b.current;t.style.position="fixed",t.style.zIndex="9999",t.style.display="block",t.style.top="".concat(e.bottom,"px"),t.style.left="".concat(e.left,"px");var n=15,r=window.innerHeight-e.bottom-n;t.style.position="fixed",t.style.top="".concat(e.bottom,"px"),t.style.left="".concat(e.left,"px"),t.style.maxHeight="".concat(r,"px"),t.style.overflowY="auto",requestAnimationFrame(function(){var r=t.children,o=Array.from(r).flatMap(function(e){return e.children?Array.from(e.children):e}),i=Math.max.apply(Math,go(o.map(function(e){return e.scrollWidth}))),a=t.getBoundingClientRect(),l=Math.min(window.innerWidth,document.documentElement.clientWidth),s=Math.min(l-30,450),c=Math.min(i+40,s);t.style.minWidth="".concat(c,"px"),t.style.width="".concat(c,"px");var u=a.right>l-n,d=a.left<n;if(u){var f=e.right-Math.min(a.width,s);f>=n?(t.style.left="".concat(f,"px"),t.style.width="".concat(Math.min(a.width,s),"px")):(t.style.left="".concat(n,"px"),t.style.width="".concat(s,"px"))}d&&(t.style.left="".concat(n,"px"),t.style.width="".concat(s,"px"));var p=t.getBoundingClientRect();(p.right>l-n||p.left<n)&&(t.style.width="".concat(s,"px"),t.style.left="".concat(n,"px"))})}},[v]),bo("li",{className:"dropdown ".concat(v?"open":""," ").concat(i?"active":""," ").concat(c||"")},void 0,r.createElement("a",{href:"#",ref:y,id:"".concat(t,"-toggle"),className:"dropdown-toggle",onClick:function(e){e.preventDefault(),g()},onKeyDown:function(e){if(!d)switch(e.key){case"Enter":case" ":e.preventDefault(),g();break;case"Escape":g(!1)}},"aria-haspopup":"true","aria-expanded":v,disabled:d},s,!a&&bo("span",{className:"caret"})),v&&(0,G.createPortal)(r.createElement("ul",{id:t,ref:b,className:"dropdown-menu".concat(l?" dropdown-menu-right":""),role:"menu"},f),document.body))};Oo.defaultProps={noCaret:!0,disabled:!1};const No=Oo;var xo;function Po(e,t,n,r){xo||(xo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:xo,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Io(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ao(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ao(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ao(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Co,jo=(0,r.forwardRef)(function(e,t){var n=e.administratorName,o=e.userName,i=e.userInitials,a=e.allowMyCompany,l=void 0!==a&&a,s=e.allowUsers,c=void 0!==s&&s,u=e.allowOfferings,d=void 0!==u&&u,f=e.allowCrmFeatures,p=void 0!==f&&f,m=e.allowOtherSettings,v=void 0!==m&&m,h=e.pullRight,y=e.onboarding,b=e.onLogout,g=Io((0,r.useState)(!1),2),w=g[0],S=g[1];return(0,r.useImperativeHandle)(t,function(){return{open:function(){return S(!0)},toggle:function(){return S(function(e){return!e})},close:function(){return S(!1)}}}),y?Po(No,{id:"help-dropdown-navigation",noCaret:!0,pullRight:h,open:w,active:(0,Q.wz)((0,Q.ID)("/account")),onToggle:function(e){return S(e)},title:i,className:"account-nav rounded"},void 0,Po(H(),{header:!0},"header",o),Po(H(),{id:"da-lang",componentClass:ro.Link,rel:"alternate",hrefLang:"da",href:"/da".concat((0,Q.$_)(window.location.pathname)),to:"/da".concat((0,Q.$_)(window.location.pathname))},void 0,w&&Po("img",{width:28,height:20,className:"mr-1",src:"/images/DA.png",alt:"DA"}),"Danish","da"===I18n.lang?Po("i",{className:"fa fa-check pull-right","aria-hidden":"true"}):null),Po(H(),{id:"en-lang",componentClass:ro.Link,rel:"alternate",hrefLang:"en",href:"/en".concat((0,Q.$_)(window.location.pathname)),to:"/en".concat((0,Q.$_)(window.location.pathname))},void 0,w&&Po("img",{width:28,height:20,className:"mr-1",src:"/images/GB.png",alt:"EN"}),"English","en"===I18n.lang?Po("i",{className:"fa fa-check pull-right","aria-hidden":"true"}):null),Po(H(),{divider:!0}),Po(H(),{id:"sign-out-btn",className:"sign-out",onClick:function(){return b()}},void 0,I18n.translate("menu.signout"))):Po(No,{id:"help-dropdown-navigation",noCaret:!0,pullRight:h,open:w,active:(0,Q.wz)((0,Q.ID)("/account")),onToggle:function(e){return S(e)},title:i,className:"account-nav rounded"},void 0,Po(H(),{header:!0},"header",o),Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/profile")),href:(0,Q.ID)("/account/profile"),to:(0,Q.ID)("/account/profile")},void 0,I18n.translate("menu.account.profile")),Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/password")),href:(0,Q.ID)("/account/password"),to:(0,Q.ID)("/account/password")},void 0,I18n.translate("menu.account.password")),Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/shoppingbasket")),href:(0,Q.ID)("/account/shoppingbasket"),to:(0,Q.ID)("/account/shoppingbasket")},void 0,I18n.translate("menu.account.myorders")),Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/messages")),href:(0,Q.ID)("/account/messages"),to:(0,Q.ID)("/account/messages")},void 0,I18n.translate("menu.account.messages")),Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/dpa")),href:(0,Q.ID)("/account/dpa"),to:(0,Q.ID)("/account/dpa")},void 0,I18n.translate("menu.account.dpa")),Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/goodbye")),href:(0,Q.ID)("/account/goodbye"),to:(0,Q.ID)("/account/goodbye")},void 0,I18n.translate("menu.goodbye")),(l||d||p)&&[Po(H(),{divider:!0},"divider"),Po(H(),{header:!0},"header",n),l&&Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/my-company")),href:(0,Q.ID)("/account/my-company"),to:(0,Q.ID)("/account/my-company")},"my-company",I18n.translate("menu.administrator.setup"))||null,d&&Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/offerings")),href:(0,Q.ID)("/account/offerings"),to:(0,Q.ID)("/account/offerings")},"offerings",I18n.translate("menu.account.offerings"))||null,c&&Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/users")),href:(0,Q.ID)("/account/users"),to:(0,Q.ID)("/account/users")},"users",I18n.translate("menu.account.our.users"))||null,v&&Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/templates")),href:(0,Q.ID)("/account/templates"),to:(0,Q.ID)("/account/templates")}
1,"templates",I18n.translate("menu.account.our.settings"))||null,c&&Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/chart-of-accounts")),href:(0,Q.ID)("/account/chart-of-accounts"),to:(0,Q.ID)("/account/chart-of-accounts")},"chartOfAccounts",I18n.translate("menu.account.our.chartofaccounts"))||null,c&&Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/arsetup")),href:(0,Q.ID)("/account/arsetup"),to:(0,Q.ID)("/account/arsetup")},"arsetup",I18n.translate("menu.account.arsetup"))||null,p&&Po(H(),{componentClass:ro.Link,active:(0,Q.wz)((0,Q.ID)("/account/partnercrm")),href:(0,Q.ID)("/account/partnercrm"),to:(0,Q.ID)("/account/partnercrm")},"crm",I18n.translate("menu.account.our.partnercrm"))||null]||null,Po(H(),{divider:!0}),Po(H(),{id:"da-lang",componentClass:ro.Link,rel:"alternate",hrefLang:"da",href:"/da".concat((0,Q.$_)(window.location.pathname)),to:"/da".concat((0,Q.$_)(window.location.pathname))},void 0,w&&Po("img",{width:28,height:20,className:"mr-1",src:"/images/DA.png",alt:"DA"}),"Danish","da"===I18n.lang?Po("i",{className:"fa fa-check pull-right","aria-hidden":"true"}):null),Po(H(),{id:"en-lang",componentClass:ro.Link,rel:"alternate",hrefLang:"en",href:"/en".concat((0,Q.$_)(window.location.pathname)),to:"/en".concat((0,Q.$_)(window.location.pathname))},void 0,w&&Po("img",{width:28,height:20,className:"mr-1",src:"/images/GB.png",alt:"EN"}),"English","en"===I18n.lang?Po("i",{className:"fa fa-check pull-right","aria-hidden":"true"}):null),Po(H(),{divider:!0}),Po(H(),{id:"sign-out-btn",className:"sign-out",onClick:function(){return b()}},void 0,I18n.translate("menu.signout")))}),Do=n(22970),_o=n(76513);function Ro(e,t,n,r){Co||(Co="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Co,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const To=function(){return Ro(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(9351)]).then(n.bind(n,59351))},componentName:"annualReportEditorPage"})};var Eo;function Mo(e,t,n,r){Eo||(Eo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Eo,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(To);const Fo=function(){return Mo(_o.A,{moduleProvider:function(){return n.e(83).then(n.bind(n,90083))},title:I18n.translate("menu.mymagic")})};var zo;function Bo(e,t,n,r){zo||(zo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:zo,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Fo);const Ho=function(){return Bo(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(2252)]).then(n.bind(n,32252))}})};var Lo;function $o(e,t,n,r){Lo||(Lo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Lo,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ho);const Xo=function(){return $o(_o.A,{moduleProvider:function(){return n.e(3982).then(n.bind(n,33982))},componentName:"bookControlPage",title:"Afstemning og kontrol"})};var Vo;function qo(e,t,n,r){Vo||(Vo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Vo,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Xo);const Uo=function(){return qo(_o.A,{moduleProvider:function(){return n.e(6038).then(n.bind(n,6038))},componentName:"CategorySetsPage",title:"Category Sets",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults}})(e)}})};n.dn(Uo);var Wo,Yo=n(94697),Ko={};function Go(e,t,n,r){Wo||(Wo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Wo,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.r(Ko),n.d(Ko,{changeFiscalYear:()=>Yo.Aq,fetchAssets:()=>Yo.ES,fetchFiscalYears:()=>Yo.Lp,fetchPrivateEquities:()=>Yo.z1});const Qo=function(){return Go(_o.A,{moduleProvider:function(){return n.e(8460).then(n.bind(n,98460))},componentName:"AssetPage",title:I18n.translate("menu.assets"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,setupStore:e.setup,defaultStore:e.defaults}},function(e){return{actions:(0,oo.zH)(Ko,e)}})(e)}})};var Zo;function Jo(e,t,n,r){Zo||(Zo="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Zo,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Qo);const ei=function(){return Jo(_o.A,{moduleProvider:function(){return n.e(8821).then(n.bind(n,8821))},componentName:"AssetsPage",title:I18n.translate("menu.assets"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,setupStore:e.setup}},function(e){return{actions:(0,oo.zH)(Ko,e)}})(e)}})};var ti;function ni(e,t,n,r){ti||(ti="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ti,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(ei);const ri=function(){return ni(_o.A,{moduleProvider:function(){return n.e(7431).then(n.bind(n,37431))},componentName:"CompanyAuditorPage",title:I18n.translate("menu.setup.assistance"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};n.dn(ri);var oi,ii=n(15590),ai={};function li(e){return li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},li(e)}function si(e,t,n,r){oi||(oi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:oi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?ci(Object(n),!0).forEach(function(t){di(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function di(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=li(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=li(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==li(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(ai),n.d(ai,{fetchCompanies:()=>ii._N,selectCompany:()=>ii.Ip,setCompany:()=>ii.A2});const fi=function(){return si(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(5615)]).then(n.bind(n,55615))},componentName:"CompanyDataPage",title:"Company Data",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,userStore:e.currentUser,defaultStore:e.defaults}},function(e){return{actions:(0,oo.zH)(ui({},ai),e)}})(e)}})};var pi;function mi(e,t,n,r){pi||(pi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:pi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(fi);const vi=function(){return mi(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(8671)]).then(n.bind(n,8671))},componentName:"fiscalYearPage",title:"Fiscal Year"})};n.dn(vi);var hi=n(83735),yi={};n.r(yi),n.d(yi,{clearAllSuggestedTransactions:()=>hi.nj,createTransaction:()=>hi.zS,fetchErrors:()=>hi.GS,fetchMagicMenuItems:()=>hi.F$,fetchTransactionDetails:()=>hi.T7,fetchTransactions:()=>hi.mh,hideTransactionError:()=>hi.b8,loadData:()=>hi.Ze,removeTransaction:()=>hi.z8,removeTransactions:()=>hi._U,resetTransaction:()=>hi.Yz,showTransactionError:()=>hi.SV,storeFiltersPreferences:()=>hi.Tr,takeOverTransaction:()=>hi.Ix,updateErrorFilterPreference:()=>hi.VQ,updateTransaction:()=>hi.AF,updateTransactionFilters:()=>hi.Bp});var bi,gi=n(88354),wi={};function Si(e,t,n,r){bi||(bi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:bi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.r(wi),n.d(wi,{dismissNote:()=>gi.xJ,setShouldAskBeforeDownloadFinalize:()=>gi.UB,toggleSettled:()=>gi.OH});const ki=function(){return Si(_o.A,{moduleProvider:function(){return n.e(9726).then(n.bind(n,59726))},componentName:"FiscalYearsPage",title:"Fiscal Years",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults,setupStore:e.setup,userStore:e.currentUser}},function(e){return{actions:(0,oo.zH)({fetchCompanies:ii._N,dismissNote:gi.xJ,loadData:hi.Ze,fetchFiscalYears:Yo.Lp,fetchPrivateEquities:Yo.z1,fetchAssets:Yo.ES,changeFiscalYear:Yo.Aq},e)}})(e)}})};var Oi;function Ni(e,t,n,r){Oi||(Oi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Oi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(ki);const xi=function(){return Ni(_o.A,{moduleProvider:function(){return n.e(8686).then(n.bind(n,8686))},componentName:"loanPage"})};var Pi;function Ii(e,t,n,r){Pi||(Pi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Pi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(xi);const Ai=function(){return Ii(_o.A,{moduleProvider:function(){return n.e(9187).then(n.bind(n,49187))},componentName:"loansPage"})};var Ci;function ji(e,t,n,r){Ci||(Ci="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ci,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ai);const Di=function(){return ji(_o.A,{moduleProvider:function(){return n.e(6068).then(n.bind(n,16068))},componentName:"PrivateEquityPage",title:"Private Equity",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults,setupStore:e.setup}},function(e){return{actions:(0,oo.zH)(Ko,e)}})(e)}})};var _i;function Ri(e,t,n,r){_i||(_i="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:_i,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Di);const Ti=function(){return Ri(_o.A,{moduleProvider:function(){return n.e(9981).then(n.bind(n,9981))},componentName:"PrivateEquitiesPage",title:"Private Equities",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,setupStore:e.setup}},function(e){return{actions:(0,oo.zH)(Ko,e)}})(e)}})};var Ei;function Mi(e,t,n,r){Ei||(Ei="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ei,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ti);const Fi=function(){return Mi(_o.A,{moduleProvider:function(){return n.e(6678).then(n.bind(n,16678))},componentName:"productTypesPage"})};var zi;function Bi(e,t,n,r){zi||(zi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:zi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Fi);const Hi=function(e){var t=e.canEditCustomers;return Bi(_o.A,{moduleProvider:function(){return Promise.all([n.e(7375),n.e(4391)]).then(n.bind(n,34391))},componentName:"customersPage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{defaultStore:e.defaults,canEditCustomers:t}})(e)}})};var Li;function $i(e,t,n,r){Li||(Li="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Li,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Hi);const Xi=function(){return $i(_o.A,{moduleProvider:function(){return n.e(520).then(n.bind(n,80520))},componentName:"ExchangeRatesPage",title:I18n.translate("exchangerates.title")})};var Vi;function qi(e,t,n,r){Vi||(Vi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Vi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Xi);const Ui=function(){return qi(_o.A,{moduleProvider:function(){return n.e(3811).then(n.bind(n,23811))},componentName:"sentMailsPage",title:I18n.translate("menu.sentmails")})};var Wi;function Yi(e,t,n,r){Wi||(Wi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Wi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ui);const Ki=function(){return Yi(_o.A,{moduleProvider:function(){return n.e(1495).then(n.bind(n,31495))},componentName:"AnnualReportsPage",title:I18n.translate("menu.archive.annualreports"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var Gi;function Qi(e,t,n,r){Gi||(Gi="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Gi,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ki);const Zi=function(){return Qi(_o.A,{moduleProvider:function(){return n.e(3322).then(n.bind(n,13322))},componentName:"archivePage"})};var Ji;function ea(e,t,n,r){Ji||(Ji="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ji,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Zi);const ta=function(){return ea(_o.A,{moduleProvider:function(){return n.e(3782).then(n.bind(n,13782))},componentName:"ArchiveBuilderPage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var na;function ra(e,t,n,r){na||(na="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:na,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(ta);const oa=function(){return ra(_o.A,{moduleProvider:function(){return Promise.all([n.e(221),n.e(8353)]).then(n.bind(n,78353))},componentName:"DocumentPackagePage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var ia;function aa(e,t,n,r){ia||(ia="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ia,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(oa);const la=function(){return aa(_o.A,{moduleProvider:function(){return n.e(2574).then(n.bind(n,92574))},componentName:"DocumentPackagesPage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var sa;function ca(e,t,n,r){sa||(sa="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:sa,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(la);const ua=function(){return ca(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(2621)]).then(n.bind(n,2621))},componentName:"UniversalDocumentPage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var da;function fa(e,t,n,r){da||(da="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:da,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(ua);const pa=function(){return fa(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(2259)]).then(n.bind(n,72259))},componentName:"UniversalDocumentsPage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var ma;function va(e,t,n,r){ma||(ma="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ma,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(pa);const ha=function(){return va(_o.A,{moduleProvider:function(){return n.e(7686).then(n.bind(n,87686))},componentName:"finalizePeriodPage",title:I18n.translate("menu.submit.periodfinal")})};var ya;function ba(e,t,n,r){ya||(ya="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ya,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(ha);const ga=function(){return ba(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(8751)]).then(n.bind(n,8751))},componentName:"FinanceAccountsPage",title:"Finance Accounts",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults}})(e)}})};var wa;function Sa(e,t,n,r){wa||(wa="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:wa,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(ga);const ka=function(){return Sa(_o.A,{moduleProvider:function(){return n.e(2748).then(n.bind(n,22748))},title:I18n.translate("grantcategories.title")})};var Oa;function Na(e,t,n,r){Oa||(Oa="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Oa,type:e,key:void 0===n?nul
1l:""+n,ref:null,props:t,_owner:null}}n.dn(ka);const xa=function(){return Na(_o.A,{moduleProvider:function(){return n.e(299).then(n.bind(n,50299))},componentName:"integrationsPage",title:I18n.translate("menu.setup.integrations")})};var Pa;function Ia(e,t,n,r){Pa||(Pa="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Pa,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(xa);const Aa=function(){return Ia(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(6155)]).then(n.bind(n,26155))}})};var Ca;function ja(e,t,n,r){Ca||(Ca="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ca,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Aa);const Da=function(){return ja(_o.A,{moduleProvider:function(){return n.e(2699).then(n.bind(n,22699))},componentName:"migrateFromOtherSystemPage",title:I18n.translate("menu.setup.financeimport")})};var _a;function Ra(e,t,n,r){_a||(_a="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:_a,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Da);const Ta=function(){return Ra(_o.A,{moduleProvider:function(){return n.e(5310).then(n.bind(n,65310))},componentName:"PrivateSecuritiesPage",title:"Private Securities",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults}})(e)}})};var Ea;function Ma(e,t,n,r){Ea||(Ea="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ea,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ta);const Fa=function(){return Ma(_o.A,{moduleProvider:function(){return n.e(2828).then(n.bind(n,22828))},componentName:"PrivateSecurityPage",title:"Private Securities",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults}})(e)}})};var za;function Ba(e,t,n,r){za||(za="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:za,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Fa);const Ha=function(){return Ba(_o.A,{moduleProvider:function(){return n.e(2376).then(n.bind(n,82376))},componentName:"SecuritySuggestionPage",title:"Security suggestion",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults}})(e)}})};n.dn(Ha);var La,$a=n(28809),Xa={};function Va(e,t,n,r){La||(La="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:La,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.r(Xa),n.d(Xa,{addDecisionReference:()=>$a.Hc,fetchDefaults:()=>$a.h8,modelChanged:()=>$a.Ay,setDefaultDecisionReference:()=>$a.HY});const qa=function(){return Va(_o.A,{moduleProvider:function(){return n.e(6961).then(n.bind(n,76961))},componentName:"ProcedurePage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}},function(e){return{actions:(0,oo.zH)({fetchDefaults:$a.h8},e)}})(e)}})};var Ua;function Wa(e,t,n,r){Ua||(Ua="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ua,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(qa);const Ya=function(){return Wa(_o.A,{moduleProvider:function(){return n.e(8820).then(n.bind(n,78820))},componentName:"productsPage"})};var Ka;function Ga(e,t,n,r){Ka||(Ka="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ka,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ya);const Qa=function(){return Ga(_o.A,{moduleProvider:function(){return n.e(4590).then(n.bind(n,14590))},componentName:"SAFTFilesPage",title:I18n.translate("menu.automation.exportfiles")})};var Za;function Ja(e,t,n,r){Za||(Za="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Za,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Qa);const el=function(){return Ja(_o.A,{moduleProvider:function(){return n.e(4152).then(n.bind(n,4152))},componentName:"SAFTIncomingPage",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var tl;function nl(e,t,n,r){tl||(tl="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:tl,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(el);const rl=function(){return nl(_o.A,{moduleProvider:function(){return n.e(5867).then(n.bind(n,25867))},componentName:"suppliersPage"})};var ol;function il(e,t,n,r){ol||(ol="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ol,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(rl);const al=function(){return il(_o.A,{moduleProvider:function(){return n.e(9259).then(n.bind(n,29259))},title:I18n.translate("first.header"),componentName:"welcomePage"})};n.dn(al);var ll,sl=n(69843);function cl(e){return cl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cl(e)}function ul(e,t,n,r){ll||(ll="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ll,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function dl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?dl(Object(n),!0).forEach(function(t){pl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pl(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=cl(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cl(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ml=function(){return ul(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(7574),n.e(3044)]).then(n.bind(n,13044))},title:I18n.translate("menu.work.bankcompare"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{defaultStore:e.defaults,bankOptions:e.defaults.bankAccounts.map(function(e){return{label:e.text,value:e.bankAccountXid}}),companyStore:e.companies,transactionStore:e.transactions,bankXid:e.bankCompare.bankXid||(e.defaults.bankAccounts[0]||{bankAccountXid:null}).bankAccountXid,filePreview:e.filePreview,savedFiscalYear:e.bankCompare.fiscalYear}},function(e){return{actions:(0,oo.zH)(fl({loadData:hi.Ze,setBankCompareBank:br.eD,setBankCompareFiscalYear:br.Te,createTransaction:hi.zS,showArchiveFilePreview:sl.uk},yi),e)}})(e)}})};var vl;function hl(e,t,n,r){vl||(vl="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:vl,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(ml);const yl=function(){return hl(_o.A,{moduleProvider:function(){return Promise.all([n.e(5569),n.e(3700)]).then(n.bind(n,93700))},title:I18n.translate("grants.title")})};function bl(e){return bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bl(e)}var gl;function wl(e,t,n,r){gl||(gl="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:gl,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sl(Object(n),!0).forEach(function(t){Ol(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ol(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=bl(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bl(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.dn(yl);const Nl=function(){return wl(_o.A,{moduleProvider:function(){return n.e(3009).then(n.bind(n,3009))},componentName:"WorkInfoPage",title:I18n.translate("menu.reports"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults}},function(e){return{actions:(0,oo.zH)(kl({},ai),e)}})(e)}})};n.dn(Nl);var xl,Pl=n(70562);function Il(e){return{type:Pl.vR,data:e}}function Al(e){return{type:Pl.xe,data:e}}function Cl(e,t,n,r){xl||(xl="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:xl,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function jl(e){return function(e){if(Array.isArray(e))return Dl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Dl(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dl(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const _l=function(){return Cl(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(2790),n.e(3532)]).then(n.bind(n,93532))},componentName:"InvoicingPage",title:I18n.translate("userinvoicing.title"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{customers:e.defaults.customers,companyStore:e.companies,defaultStore:e.defaults,user:e.currentUser.user,setup:e.invoicingSetup,yearOptions:[{label:I18n.translate("userinvoicing.allyears"),value:null}].concat(jl((e.defaults.fiscalYearsByXid||[]).map(function(e){return{label:e.text,value:e.value}}).reverse()))}},function(e){return{actions:(0,oo.zH)({toggleToolbar:so.Ib,goBack:so.OE,push:so.VC,replace:so.HC,updateInvoicingSetup:Al,updateAccountStatementReport:Il},e)}})(e)}})};var Rl;function Tl(e,t,n,r){Rl||(Rl="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Rl,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(_l);const El=function(){return Tl(_o.A,{moduleProvider:function(){return n.e(2209).then(n.bind(n,24590))},componentName:"NotebookPage",title:I18n.translate("menu.notebook"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var Ml;function Fl(e,t,n,r){Ml||(Ml="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ml,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(El);const zl=function(){return Fl(_o.A,{moduleProvider:function(){return n.e(9721).then(n.bind(n,59721))},componentName:"rawAnnualReportPage",title:I18n.translate("menu.work.ui")})};var Bl;function Hl(e,t,n,r){Bl||(Bl="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Bl,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(zl);const Ll=function(){return Hl(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(9234)]).then(n.bind(n,99234))},componentName:"rawEquityPage",title:I18n.translate("menu.work.equity")})};var $l;function Xl(e,t,n,r){$l||($l="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:$l,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Ll);const Vl=function(){return Xl(_o.A,{moduleProvider:function(){return n.e(162).then(n.bind(n,70162))},componentName:"SecuritiesPricesPage",title:I18n.translate("valuations.title"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,defaultStore:e.defaults}})(e)}})};n.dn(Vl);var ql,Ul=n(58877),Wl={};function Yl(e){return Yl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yl(e)}function Kl(e,t,n,r){ql||(ql="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ql,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Gl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ql(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Gl(Object(n),!0).forEach(function(t){Zl(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zl(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Yl(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yl(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(Wl),n.d(Wl,{setAssistantUrl:()=>Ul.a});const Jl=function(){return Kl(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(7574),n.e(1066)]).then(n.bind(n,61066))},componentName:"WorkPage",title:I18n.translate("menu.work.ui"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{userStore:e.currentUser,companyStore:e.companies,transactionStore:e.transactions,defaultStore:e.defaults,setupStore:e.setup,filePreview:e.filePreview,finalize:e.companies.finalize}},function(e){return{actions:(0,oo.zH)(Ql(Ql(Ql(Ql(Ql(Ql(Ql({},yi),Xa),Wl),ai),wi),Ko),{},{showAttachmanetPreview:sl.ST,showArchiveFilePreview:sl.uk}),e)}})(e)}})};function es(e){return es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},es(e)}var ts;function ns(e,t,n,r){ts||(ts="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ts,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function rs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,os(r.key),r)}}function os(e){var t=function(e,t){if("object"!=es(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=es(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==es(t)?t:t+""}n.dn(Jl);var is,as,ls=function(){return e=function e(t){var n=t.title,r=t.path,o=t.component,i=t.accessFunc,a=t.getTitle;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.title=n,this.path=r,this.component=o,this.accessFunc=i,this.getTitle=a},t=[{key:"getRoute",value:function(e){return e&&this.accessFunc&&this.accessFunc(e)?ns(o.qh,{exact:!0,path:"/:lang"+this.path,component:this.component}):null}},{key:"getMenuItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e||!this.accessFunc||!this.accessFunc(e))return null;var n=(0,Q.ID)(this.path);return ns(H(),{componentClass:ro.Link,href:n,to:n,disabled:t},void 0,I18n.translate(this.getTitle?this.getTitle(e):this.title))}},{key:"getDropdownOption",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&this.accessFunc&&this.accessFunc(e)?{key:(this.getTitle?this.getTitle(e):this.title)+this.path,label:I18n.translate(this.getTitle?this.getTitle(e):this.title),href:(0,Q.ID)(this.path),disabled:t}:null}}],t&&rs(e.prototype,t),n&&rs(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),ss={SetupCompany:new ls({title:"menu.setup.company",path:"/setup/company",component:fi,accessFunc:function(){return!0}}),BasicSettings:new ls({title:"menu.basicsetting",path:"/setup/basic-settings",component:Ho,accessFunc:function(){return!0}}),InvoiceSettings:new ls({title:"menu.invoicesetting",path:"/setup/invoice-settings",component:Aa,accessFunc:function(e){return!e.isUsageTypeAnnualReportOnly()}}),ProductTypes:new ls({title:"menu.producttypes",path:"/setup/producttypes",component:Fi,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),FiscalYears:new ls({title:"menu.setup.fiscalyears",path:"/setup/fiscal-years",component:ki,accessFunc:function(){return!0}}),FiscalYear:new ls({title:"",path:"/setup/fiscal-year/:xid?",component:vi,access
1Func:function(){return!0}}),SetupAsset:new ls({title:"",path:"/setup/asset/:id?",component:Qo,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),SetupAssets:new ls({title:"menu.assets",path:"/setup/assets",component:ei,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),SetupLoan:new ls({title:"",path:"/setup/loan/:id?",component:xi,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()&&e.isPartOfPortfolio}}),SetupLoans:new ls({title:"menu.loans",path:"/setup/loans",component:Ai,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()&&e.isPartOfPortfolio}}),CategorySets:new ls({title:"menu.setup.categorysets",path:"/setup/category-sets",component:Uo,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()&&!e.accessModeViewDetails}}),FinanceAccounts:new ls({title:"menu.setup.financeaccounts",path:"/setup/finance-accounts",component:ga,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),PrivateSecurities:new ls({title:"privatesecurities.title",path:"/setup/private-securities",component:Ta,accessFunc:function(e){var t=e.securitiesSelectOptions||{},n=t.companyPrivate,r=t.sharedWithinAdministrator,o=t.securitiesEnabled;return(n||r)&&e.isBookkeepingCompanyEditDetailsOrInvoicing()&&(!e.companyTypeIsSinglePersonOrIS||o)}}),PrivateSecurity:new ls({title:"privatesecurity.title",path:"/setup/private-security/:xid?",component:Fa,accessFunc:function(e){var t=e.securitiesSelectOptions||{},n=t.companyPrivate,r=t.sharedWithinAdministrator,o=t.securitiesEnabled;return(n||r)&&e.isBookkeepingCompanyEditDetailsOrInvoicing()&&(!e.companyTypeIsSinglePersonOrIS||o)}}),SuggestedSecurity:new ls({title:"privatesecurity.title",path:"/setup/suggested-security/:xid?",component:Ha,accessFunc:function(e){var t=e.securitiesSelectOptions||{},n=t.companyPrivate,r=t.sharedWithinAdministrator;return(n||r)&&e.isBookkeepingCompanyEditDetailsOrInvoicing()&&!e.companyTypeIsSinglePersonOrIS}}),GrantCategories:new ls({title:"grantcategories.title",path:"/setup/grant-categories",component:ka,accessFunc:function(e){return!e.usageTypeAnnualReportOnly&&e.companyTypeIsFoundation}}),PrivateEquities:new ls({title:"menu.setup.privateequity",path:"/setup/private-equities",component:Ti,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()&&!e.companyTypeIsSinglePersonOrIS}}),PrivateEquity:new ls({title:"",path:"/setup/private-equity/:id?",component:Di,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()&&!e.companyTypeIsSinglePersonOrIS}}),CompanyAuditor:new ls({title:"menu.setup.assistance",path:"/setup/auditor",component:ri,accessFunc:function(e){return!e.isUsageTypeAnnualReportOnly()&&!e.accessModeViewDetails&&!e.isSuperUserOrAdministrator()}}),Procedure:new ls({title:"menu.setup.procedure",path:"/setup/procedure",component:qa,accessFunc:function(){return!0}}),MagicList:new ls({title:"menu.mymagic",path:"/mymagic/types",component:Fo,accessFunc:function(e){return e.bookkeepingCompanyAllAccess()}}),ExchangeRates:new ls({title:"menu.exchangerates",path:"/automation/exchange-rates",component:Xi,accessFunc:function(){return!0}}),SentMails:new ls({title:"menu.sentmails",path:"/automation/sent-mails",component:Ui,accessFunc:function(e){return e.bookkeepingCompanyAllAccess()}}),Integrations:new ls({title:"menu.setup.integrations",path:"/automation/integrations",component:xa,accessFunc:function(e){return e.bookkeepingCompanyAllAccess()}}),MigrateFromOtherSystem:new ls({title:"menu.setup.financeimport",path:"/automation/migrate-from-other-system",component:Da,accessFunc:function(e){return e.bookkeepingCompanyAllAccess()}}),SAFTFiles:new ls({title:"menu.automation.saftfiles",path:"/automation/saft-files",component:Qa,accessFunc:function(e){return e.bookkeepingCompanyAllAccess()}}),ExportFiles:new ls({title:"menu.automation.export",path:"/automation/export",component:Qa,accessFunc:function(e){return e.bookkeepingCompanyAllAccess()}}),Archive:new ls({title:"archive.browser",path:"/archive/browse",component:Zi,accessFunc:function(e){return e.hasAccessToFiles}}),AnnualReports:new ls({title:"menu.archive.annualreports",path:"/archive/annual-reports",component:Ki,accessFunc:function(e){return!e.companyTypeIsSinglePersonOrIS}}),UniversalDocuments:new ls({title:"ud.menu",path:"/archive/universal-documents",component:pa,access
1Func:function(e){return e.userHasBetaAccess()}}),UniversalDocument:new ls({title:"ud.menu",path:"/archive/universal-documents/:id?",component:ua,accessFunc:function(e){return e.userHasBetaAccess()}}),DocumentPackages:new ls({title:"docpack.list.title",path:"/archive/document-packages",component:la,accessFunc:function(e){return!e.companyTypeIsSinglePersonOrIS}}),DocumentPackage:new ls({title:"Document Package (beta)",path:"/archive/document-packages/:xid?",component:oa,accessFunc:function(e){return e.userHasBetaAccess()}}),ArchiveBuilder:new ls({title:"Archive Builder (beta)",path:"/archive/archive-builder",component:ta,accessFunc:function(e){return e.userHasBetaAccess()}}),SAFTncoming:new ls({title:"SAF-T file data",path:"/automation/saft-incoming/:id?",component:el,accessFunc:function(e){return e.userHasBetaAccess()}}),BookControl:new ls({title:"Afstemning og kontrol",path:"/finalize/book-control",component:Xo,accessFunc:function(e){return(e.bookkeepingCompanyAllAccess()||e.isSuperUserOrAdministrator())&&e.userHasBetaAccess()}}),AnnualReportEditor:new ls({title:"menu.submit.annualreport",path:"/finalize/submit",component:To,accessFunc:function(e){return e.administrator||!e.companyTypeIsSinglePersonOrIS}}),FinalizePeriod:new ls({title:"menu.submit.periodfinal",path:"/finalize/period",component:ha,accessFunc:function(e){return!e.isUsageTypeAnnualReportOnly()}}),WorkPage:new ls({title:"menu.work.ui",path:"/work/ui",renderComponent:function(e){return e.usageTypeAnnualReportOnly?zl:e.accessModeViewInfo?Nl:e.isNormalWork()?Jl:al},getTitle:function(e){return e.isUsageTypeAnnualReportOnly()?"menu.work.ui.raw":"menu.work.ui"},accessFunc:function(){return!0}}),RawEquity:new ls({title:"menu.work.equity",path:"/work/raw-equity",component:Ll,accessFunc:function(e){return e.isUsageTypeAnnualReportOnly()}}),Invoicing:new ls({title:"userinvoicing.title",path:"/work/invoicing",component:_l,accessFunc:function(e){return e.allowInvoicing&&e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),Grants:new ls({title:"grants.title",path:"/work/grants",component:yl,accessFunc:function(e){return e.companyTypeIsFoundation}}),BankCompare:new ls({title:"menu.work.bankcompare",path:"/work/bank-compare",component:ml,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),Customers:new ls({title:"menu.customers",path:"/work/customers",component:Hi,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),Suppliers:new ls({title:"menu.supplier",path:"/work/suppliers",component:rl,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),Products:new ls({title:"menu.products",path:"/work/products",component:Ya,accessFunc:function(e){return e.isBookkeepingCompanyEditDetailsOrInvoicing()}}),SecuritiesPrices:new ls({title:"menu.work.prices",path:"/work/securities-prices",component:Vl,accessFunc:function(e){return e.hasSecurities()}}),Notebook:new ls({title:"menu.notebook",path:"/work/notebook",component:El,accessFunc:function(){return!0}})};function cs(e,t,n,r){is||(is="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:is,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function us(e){var t=e.full,n=e.compact;return cs(r.Fragment,{},void 0,cs("span",{className:"app-header__label app-header__label--full"},void 0,t),cs("span",{className:"app-header__label app-header__label--compact"},void 0,n))}function ds(e,t,n,r){as||(as="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:as,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function fs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ps(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ps(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ms,vs,hs=(0,r.forwardRef)(function(e,t){var n=e.accessObj,o=e.onArchiveUpload,i=fs((0,r.useState)(!1),2),a=i[0],l=i[1];return(0,r.useImperativeHandle)(t,function(){return{open:function(){return l(!0)},toggle:function(){return l(function(e){return!e})},close:function(){return l(!1)}}}),ds(No,{id:"archive-dropdown-navigation",className:"dz-nav-dropdown",open:a,onToggle:function(e){return l(e)},noCaret:!0,title:ds(Do.B,{onFilesDrop:o},void 0,ds(us,{full:I18n.translate("menu.archive"),compact:I18n.translate("menu.archive.compact")}))},void 0,ss.Archive.getMenuItem(n),ss.AnnualReports.getMenuItem(n),ss.UniversalDocuments.getMenuItem(n),ss.ArchiveBuilder.getMenuItem(n),ss.DocumentPackages.getMenuItem(n))}),ys=n(786),bs=n.n(ys);function gs(e,t,n,r){ms||(ms="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ms,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ws(){return gs("svg",{className:"loading-spinner nofill",viewBox:"0 0 66 66"},void 0,gs("circle",{className:"circle-loading-spinner nofill",cx:"33",cy:"33",r:"30"}))}function Ss(e,t,n,r){vs||(vs="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:vs,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ks(e){var t=e.backgroundTasks;return Ss(bs(),{id:"background-task-dropdown",title:Ss("span",{style:{display:"flex",alignItems:"center",flexWrap:"nowrap",columnGap:"8px"}},void 0,Ss(ws,{}),I18n.translate("work.background.working")),className:"btn",style:{backgroundColor:"rgba(255, 255, 255, 0.2",color:"white",marginRight:"5px",display:"flex",alignItems:"center",flexWrap:"nowrap",columnGap:"8px"}},void 0,t.map(function(e){return Ss(H(),{},e.id,e.description)}))}var Os,Ns=n(33435);function xs(){return xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xs.apply(null,arguments)}function Ps(e){return r.createElement("svg",xs({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 64 32"},e),Os||(Os=r.createElement("path",{fill:"#5b7282",d:"M0 12.8v6.4C0 26.269 5.731 32 12.8 32s12.8-5.731 12.8-12.8h16v9.6a3.2 3.2 0 006.4 0v-9.6h6.4v9.6a3.2 3.2 0 006.4 0v-9.6a3.2 3.2 0 000-6.4H25.6C25.6 5.731 19.869 0 12.8 0S0 5.731 0 12.8zm6.4 0c0-3.535 2.865-6.4 6.4-6.4s6.4 2.865 6.4 6.4v6.4c0 3.535-2.865 6.4-6.4 6.4s-6.4-2.865-6.4-6.4v-6.4z"})))}n.p;var Is,As,Cs;function js(){return js=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},js.apply(null,arguments)}function Ds(e){return r.createElement("svg",js({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),Is||(Is=r.createElement("path",{fill:"#5b7282",d:"M4.8 12.8h22.4a4.8 4.8 0 014.8 4.8v9.6a4.8 4.8 0 01-4.8 4.8H4.8A4.8 4.8 0 010 27.2v-9.6a4.8 4.8 0 014.8-4.8zm0 3.2a1.6 1.6 0 00-1.6 1.6v9.6a1.6 1.6 0 001.
16 1.6h22.4a1.6 1.6 0 001.6-1.6v-9.6a1.6 1.6 0 00-1.6-1.6H4.8z"})),As||(As=r.createElement("path",{fill:"none",stroke:"#5b7282",strokeWidth:1.6,d:"M16 20a.8.8 0 01.8.8V24a.8.8 0 11-1.6 0v-3.2a.8.8 0 01.8-.8z"})),Cs||(Cs=r.createElement("path",{fill:"#5b7282",d:"M12.8 0h6.4A4.8 4.8 0 0124 4.8V16H8V4.8A4.8 4.8 0 0112.8 0zm0 3.2a1.6 1.6 0 00-1.6 1.6v8h9.6v-8a1.6 1.6 0 00-1.6-1.6h-6.4z"})))}n.p;var _s,Rs=n(96540);function Ts(e){return Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ts(e)}function Es(e){return function(e){if(Array.isArray(e))return Ms(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ms(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ms(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ms(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fs(e,t,n,r){_s||(_s="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:_s,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function zs(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xs(r.key),r)}}function Bs(e,t,n){return t=Ls(t),function(e,t){if(t&&("object"==Ts(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hs()?Reflect.construct(t,n||[],Ls(e).constructor):t.apply(e,n))}function Hs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hs=function(){return!!e})()}function Ls(e){return Ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ls(e)}function $s(e,t){return $s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$s(e,t)}function Xs(e){var t=function(e,t){if("object"!=Ts(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ts(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ts(t)?t:t+""}var Vs=function(e){function t(e){var n,r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=Bs(this,t,[e]),r=n,i={showAll:!1,search:""},(o=Xs(o="state"))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,n.handleSearchChange=function(e){return n.setState({search:e})},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$s(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){this.setState({showAll:this.props.autoFocus})}},{key:"renderDefaultMenu",value:function(){return Fs(Rs.Fragment,{},void 0,(this.props.allowCreateCompany||this.props.requestAccess||this.props.grantAccess)&&Fs("p",{className:"companies-menu__text mb-0"},void 0,I18n.translate("menu.actions")),this.props.allowCreateCompany&&Fs("p",{className:"mb-0"},void 0,Fs(ro.Link,{to:(0,Q.ID)("/company/create"),onClick:this.props.onHide},void 0,Fs(Ns.h,{className:"mr-1 phi-fw","aria-hidden":"true"}),I18n.translate("menu.createcompany"))),this.props.requestAccess&&Fs("p",{className:"mb-0"},void 0,Fs(ro.Link,{to:(0,Q.ID)("/company/request-access"),onClick:this.props.onHide},void 0,Fs(Ds,{className:"mr-1 phi-fw","aria-hidden":"true"}),I18n.translate("menu.request.access"))),this.props.grantAccess&&Fs("p",{className:"my-0"},void 0,Fs(ro.Link,{to:(0,Q.ID)("/company/grant-access"),onClick:this.props.onHide},void 0,Fs(Ps,{className:"mr-1 phi-fw","aria-hidden":"true"}),I18n.translate("menu.grant.access"))))}},{key:"renderCompany",value:function(e){var t=this,n=(0,Q.wz)((0,Q.ID)("/dashboard"));return Fs(En(),{checked:this.props.selected===e.xid&&!n,onChange:function(){return t.props.onSelectCompany(e.xid)},onClick:function(){n&&t.props.history.push((0,Q.ID)())}},e.xid,e.name)}},{key:"handleBack",value:function(){this.setState({showAll:!1,search:""})}},{key:"render",value:function(){var e=this,t=this.state,n=t.showAll,r=t.search,o=this.props,i=o.selected,a=o.lastCompanies,l=!(!n&&!r),s=this.props.companies.find(function(e){return e.xid===i}),c=l?this.props.companies:[s].concat(Es(a.filter(function(e){return e!==i}).map(function(t){return e.props.companies.find(function(e){return e.xid===t})}
1).filter(Boolean)),Es(this.props.companies.filter(function(e){return e.xid!==i&&!a.includes(e.xid)}))),u=r?c.filter(function(e){return e.name.toLowerCase().includes(r.toLowerCase())}):c;return Fs("div",{className:"companies-menu"},void 0,Fs(je.x,{className:"my-0",placeholder:I18n.translate("typefind"),value:r,onChange:this.handleSearchChange,autoFocus:this.props.autoFocus,clearable:!0}),!!r&&Fs("p",{className:"companies-menu__text text-right my-1"},void 0,1===u.length?I18n.translate("menu.companiesfound.1"):I18n.translate("menu.companiesfound",u.length)),Fs("div",{className:"companies-menu__list"},void 0,(l?u:u.slice(0,3)).map(function(t){return e.renderCompany(t)}),!l&&u.length>3&&Fs("p",{},void 0,Fs("button",{type:"button",className:"btn btn-link",onClick:function(){return e.setState({showAll:!0})}},void 0,Fs("i",{className:"fa fa-bars fa-lg mr-1","aria-hidden":"true"}),I18n.translate("menu.companies.showall",this.props.companies.length)))),this.props.allowMyCompany&&Fs(Rs.Fragment,{},void 0,Fs("p",{className:"companies-menu__text mb-0"},void 0,I18n.translate("menu.administrator.group")),Fs("p",{},void 0,Fs(ro.Link,{to:(0,Q.ID)("/dashboard"),onClick:this.props.onHide,style:{fontSize:14}},void 0,Fs("i",{className:"fa fa-home fa-lg",style:{marginRight:8},"aria-hidden":"true"}),I18n.translate("menu.dashboard")))),l?Fs(Rs.Fragment,{},void 0,Fs("div",{className:"divider mt-0"}),Fs("button",{type:"button",className:"btn btn-link",onClick:function(){return e.handleBack()}},void 0,I18n.translate("back"))):this.renderDefaultMenu())}}],r&&zs(n.prototype,r),o&&zs(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(Rs.Component);const qs=Vs;var Us;function Ws(e,t,n,r){Us||(Us="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Us,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Ys(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ks(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ks(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ks(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Gs,Qs=(0,r.forwardRef)(function(e,t){var n=e.selected,o=e.companies,i=void 0===o?[]:o,a=e.allowCreateCompany,l=void 0!==a&&a,s=e.requestAccess,c=void 0!==s&&s,u=e.grantAccess,d=void 0!==u&&u,f=e.defaultOpen,p=e.onSelectCompany,m=e.onHide,v=e.history,h=e.disabled,y=e.allowMyCompany,b=e.lastCompanies,g=function(){return!!f&&!window.location.pathname.includes("2nd-window")},w=Ys((0,r.useState)(g),2),S=w[0],k=w[1],O=Ys((0,r.useState)(g),2),N=O[0],x=O[1],P=function(){k(!1),x(!1)},I=function(){S?P():k(!0)};(0,r.useImperativeHandle)(t,function(){return{open:function(){return k(!0)},toggle:I,close:P}});var A=i.find(function(e){return e.xid===n}),C=1!==i.length||l||c||d;return Ws(No,{id:"companies-dropdown-navigation",open:S&&C,onToggle:function(){return I()},noCaret:!C,className:"btn-bordered-blue mr-2",title:(0,Q.wz)((0,Q.ID)("/dashboard"))?Ws("span",{className:"companies-menu__name"},void 0,I18n.translate("menu.dashboard")):A?Ws("span",{className:"companies-menu__name companies-menu__name--selected"},void 0,A.name):I18n.translate("menu.companies"),disabled:h},void 0,1===i.length&&Ws(r.Fragment,{},void 0,y&&((0,Q.wz)((0,Q.ID)("/dashboard"))?Ws("div",{className:"companies-menu"},void 0,Ws("div",{className:"companies-menu__list"},void 0,Ws(En(),{onClick:function(){v.push((0,Q.ID)())}},void 0,Ws("span",{className:"text-white"},void 0,A.name)))):Ws(r.Fragment,{},void 0,Ws("p",{className:"companies-menu__text mb-0"},void 0,I18n.translate("menu.administrator.group")),Ws("p",{},void 0,Ws(ro.Link,{to:(0,Q.ID)("/dashboard"),onClick:m,style:{fontSize:14,display:"block"}},void 0,Ws("i",{className:"fa fa-home fa-lg",style:{marginRight:8},"aria-hidden":"true"}),I18n.translate("menu.dashboard"))))),(l||c||d)&&Ws(H(),{header:!0},void 0,I18n.translate("menu.actions")),l&&Ws(H(),{componentClass:ro.Link,href:(0,Q.ID)("/company/create"),to:(0,Q.ID)("/company/create")},void 0,Ws(Ns.h,{className:"mr-1 phi-fw","aria-hidden":"true"}),I18n.translate("menu.createcompany")),c&&Ws(H(),{componentClass:ro.Link,href:(0,Q.ID)("/company/request-access"),to:(0,Q.ID)("/company/request-access")},void 0,Ws(Ds,{className:"mr-1 mb-1 phi-fw","aria-hidden":"true"}),I18n.translate("menu.request.access")),d&&Ws(H(),{componentClass:ro.Link,href:(0,Q.ID)("/company/grant-access"),to:(0,Q.ID)("/company/grant-access")},void 0,Ws(Ps,{className:"mr-1 phi-fw","aria-hidden":"true"}),I18n.translate("menu.grant.access"))),!S||1!==i.length&&Ws(qs,{companies:i,autoFocus:N,lastCompanies:b,selected:n,allowCreateCompany:l,requestAccess:c,grantAccess:d,onSelectCompany:
1p,onHide:P,history:v,allowMyCompany:y}))});function Zs(e,t,n,r){Gs||(Gs="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Gs,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Js(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ec(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ec(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tc(e){var t=e.companyTypeIsSinglePerson,n=e.isAdmin,r={"menu.submit.periodfinal":I18n.translate("shortcut.finalize.period")[0]};return t&&!n||(r["menu.submit.annualreport"]=I18n.translate("shortcut.finalize.annualreport")[0]),r}var nc,rc=(0,r.forwardRef)(function(e,t){var n=e.accessObj,o=e.busy,i=void 0!==o&&o,a=e.history,l=e.companyTypeIsSinglePerson,s=e.isAdmin,c=Js((0,r.useState)(!1),2),u=c[0],d=c[1];return(0,r.useImperativeHandle)(t,function(){return{open:function(){return d(!0)},toggle:function(){return d(function(e){return!e})},close:function(){return d(!1)}}}),(0,r.useEffect)(function(){if(u){var e=function(e){a.push(e),d(!1)},t=tc({companyTypeIsSinglePerson:l,isAdmin:s}),n=new mo.F([t["menu.submit.annualreport"]&&{keys:t["menu.submit.annualreport"],handler:function(){return e((0,Q.ID)("/finalize/submit"))}},{keys:t["menu.submit.periodfinal"],handler:function(){return e((0,Q.ID)("/finalize/period"))}}].filter(Boolean));return function(){return n.destroy()}}},[u,a,l,s]),Zs(No,{id:"finalize-dropdown-navigation",open:u,onToggle:function(e){return d(e)},title:Zs(us,{full:I18n.translate("menu.finalize"),compact:I18n.translate("menu.finalize.compact")})},void 0,ss.BookControl.getMenuItem(n,i),ss.AnnualReportEditor.getMenuItem(n,i),ss.FinalizePeriod.getMenuItem(n,i))});function oc(e,t,n,r){nc||(nc="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:nc,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ic(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ac(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ac(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ac(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}rc.getShortcuts=tc;var lc,sc=(0,r.forwardRef)(function(e,t){var n=e.accessObj,o=ic((0,r.useState)(!1),2),i=o[0],a=o[1];return(0,r.useImperativeHandle)(t,function(){return{open:function(){return a(!0)},toggle:function(){return a(function(e){return!e})},close:function(){return a(!1)}}}),oc(No,{id:"magics-dropdown-navigation",noCaret:!0,open:i,onToggle:function(e){return a(e)},active:(0,Q.wz)((0,Q.ID)("/automation")),title:oc(us,{full:I18n.translate("menu.magic"),compact:I18n.translate("menu.magic.compact")})},void 0,ss.MagicList.getMenuItem(n),ss.Integrations.getMenuItem(n),ss.ExportFiles.getMenuItem(n),ss.ExchangeRates.getMenuItem(n),ss.SentMails.getMenuItem(n),ss.MigrateFromOtherSystem.getMenuItem(n),ss.SAFTFiles.getMenuItem(n))});function cc(e,t,n,r){lc||(lc="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:lc,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function uc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return dc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var fc,pc=function(e){var t=e.hasSecondaryWindow,n=e.className,o=uc((0,r.useState)(!1),2),i=o[0],a=o[1],l=function(){return a(!1)};return cc(No,{id:"second-window",noCaret:!0,open:i,onToggle:a,className:n,title:cc("i",{className:"fa fa-window-restore fa-lg ".concat(t?"active":""),"aria-hidden":"true"})},void 0,cc("li",{className:"second-window-nav",role:"presentation"},void 0,cc("i",{className:"fa fa-window-restore fa-lg","aria-hidden":"true"}),cc("div",{className:"content"},void 0,cc("p",{},void 0,I18n.translate("secondscreen.explain")),cc("div",{className:"action-wrapper btn-group"},void 0,cc(no(),{onClick:l,componentClass:ro.Link,to:(0,Q.ID)("/2nd-window"),href:(0,Q.ID)("/2nd-window")},void 0,I18n.translate("secondscreen.use.as.extra")),cc(no(),{onClick:l,componentClass:ro.Link,to:(0,Q.ID)("/2nd-window"),href:(0,Q.ID)("/2nd-window"),target:"_blank"},void 0,I18n.translate("secondscreen.open.new.as.extra"))))))};function mc(e,t,n,r){fc||(fc="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:fc,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function vc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var yc,bc=(0,r.forwardRef)(function(e,t){var n=e.accessObj,o=vc((0,r.useState)(!1),2),i=o[0],a=o[1];return(0,r.useImperativeHandle)(t,function(){return{open:function(){return a(!0)},toggle:function(){return a(function(e){return!e})},close:function(){return a(!1)}}}),mc(No,{id:"setup-dropdown-navigation",open:i,onToggle:function(e){return a(e)},title:mc(us,{full:I18n.translate("menu.setup"),compact:I18n.translate("menu.setup.compact")})},void 0,ss.SetupCompany.getMenuItem(n),ss.BasicSettings.getMenuItem(n),ss.InvoiceSettings.getMenuItem(n),ss.FiscalYears.getMenuItem(n),ss.FinanceAccounts.getMenuItem(n),ss.PrivateSecurities.getMenuItem(n),ss.PrivateEquities.getMenuItem(n),ss.ProductTypes.getMenuItem(n),ss.SetupAssets.getMenuItem(n),ss.SetupLoans.getMenuItem(n),ss.CategorySets.getMenuItem(n),ss.GrantCategories.getMenuItem(n),ss.CompanyAuditor.getMenuItem(n),ss.Procedure.getMenuItem(n))});function gc(e,t,n,r){yc||(yc="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:yc,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function wc(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Sc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sc(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kc(e){var t=e.allowInvoicing,n=e.usageTypeAnnualReportOnly,r={};return t&&!n&&(r["userinvoicing.title"]=I18n.translate("shortcut.work.invoice")[0]),n||(r["menu.work.bankcompare"]=I18n.translate("shortcut.work.reconcilebank")[0],r["menu.customers"]=I18n.translate("shortcut.work.customers")[0],r["menu.supplier"]=I18n.translate("shortcut.work.suppliers")[0]),r}var Oc=(0,r.forwardRef)(function(e,t){var n=e.accessObj,o=e.history,i=e.allowInvoicing,a=void 0!==i&&i,l=e.usageTypeAnnualReportOnly,s=wc((0,r.useState)(!1),2),c=s[0],u=s[1];return(0,r.useImperativeHandle)(t,function(){return{open:function(){return u(!0)},toggle:function(){return u(function(e){return!e})},close:function(){return u(!1)}}}),(0,r.useEffect)(function(){if(c){var e=function(e){o.push(e),u(!1)},t=kc({allowInvoicing:a,usageTypeAnnualReportOnly:l}),n=new mo.F([t["userinvoicing.title"]&&{keys:t["userinvoicing.title"],handler:function(){return e((0,Q.ID)("/work/invoicing"))}},t["menu.work.bankcompare"]&&{keys:t["menu.work.bankcompare"],handler:function(){return e((0,Q.ID)("/work/bank-compare"))}},t["menu.customers"]&&{keys:t["menu.customers"],handler:function(){return e((0,Q.ID)("/work/customers"))}},t["menu.supplier"]&&{keys:t["menu.supplier"],handler:function(){return e((0,Q.ID)("/work/suppliers"))}}].filter(Boolean));return function(){return n.destroy()}}},[c,o,a,l]),gc(No,{id:"work-dropdown-navigation",open:c,onToggle:function(e){return u(e)},title:gc(us,{full:I18n.translate(n.isUsageTypeAnnualReportOnly()?"menu.work.raw":"menu.work"),compact:I18n.translate("menu.work.compact")})},void 0,ss.WorkPage.getMenuItem(n),ss.RawEquity.getMenuItem(n),ss.Invoicing.getMenuItem(n),ss.Grants.getMenuItem(n),ss.BankCompare.getMenuItem(n),ss.Customers.getMenuItem(n),ss.Suppliers.getMenuItem(n),ss.Products.getMenuItem(n),ss.SecuritiesPrices.getMenuItem(n),ss.Notebook.getMenuItem(n))});Oc.getShortcuts=kc;var Nc,xc=n(96540);function Pc(e){return Pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pc(e)}function Ic(e,t,n,r){Nc||(Nc="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Nc,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Ac(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mc(r.key),r)}}function Cc(e,t,n){return t=Rc(t),function(e,t){if(t&&("object"==Pc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jc()?Reflect.construct(t,n||[],Rc(e).constructor):t.apply(e,n))}function jc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jc=function(){return!!e})()}function Dc(e,t,n,r){var o=_c(Rc(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function _c(){return _c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rc(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},_c.apply(null,arguments)}
1function Rc(e){return Rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rc(e)}function Tc(e,t){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tc(e,t)}function Ec(e,t,n){return(t=Mc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mc(e){var t=function(e,t){if("object"!=Pc(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pc(t)?t:t+""}var Fc=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ec(n=Cc(this,t,[e]),"state",{creatingFinalize:!1,isNavbarOpen:!1}),Ec(n,"requestHelper",new j.g),Ec(n,"companiesNav",null),Ec(n,"workNav",null),Ec(n,"setupNav",null),Ec(n,"finalizeNav",null),n.shortCutHelper=new mo.F(n.getShortCuts()),n.openCompanyMenuHandler=function(){return n.companiesNav&&n.companiesNav.open()},n.openSetupMenuHandler=function(){return n.setupNav&&n.setupNav.open()},n.openWorkMenuHandler=function(){return n.workNav&&n.workNav.open()},n.openFinalizeMenuHandler=function(){return n.finalizeNav&&n.finalizeNav.open()},n.openArchiveMenuHandler=function(){return n.archiveNav&&n.archiveNav.open()},n.openMagicsMenuHandler=function(){return n.magicsNav&&n.magicsNav.open()},n.openAccountMenuHandler=function(){return n.accountNav&&n.accountNav.open()},n.logout=n.logout.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tc(e,t)}(t,e),n=t,o=[{key:"componentDidMount",value:function(){Dc(t,"componentDidMount",this,3)([]),window.addEventListener(p.q7,this.openCompanyMenuHandler),window.addEventListener(p.m2,this.openSetupMenuHandler),window.addEventListener(p.yW,this.openWorkMenuHandler),window.addEventListener(p.rr,this.openFinalizeMenuHandler),window.addEventListener(p.fB,this.openArchiveMenuHandler),window.addEventListener(p.ml,this.openMagicsMenuHandler),window.addEventListener(p.a$,this.openAccountMenuHandler)}},{key:"componentDidUpdate",value:function(){this.state.isNavbarOpen&&!this.context.navBurger&&this.setState({isNavbarOpen:!1})}},{key:"componentWillUnmount",value:function(){Dc(t,"componentWillUnmount",this,3)([]),this.shortCutHelper&&this.shortCutHelper.destroy(),window.removeEventListener(p.q7,this.openCompanyMenuHandler),window.removeEventListener(p.m2,this.openSetupMenuHandler),window.removeEventListener(p.yW,this.openWorkMenuHandler),window.removeEventListener(p.rr,this.openFinalizeMenuHandler),window.removeEventListener(p.fB,this.openArchiveMenuHandler),window.removeEventListener(p.ml,this.openMagicsMenuHandler),window.removeEventListener(p.a$,this.openAccountMenuHandler)}},{key:"getShortCuts",value:function(){var e=this;return[{keys:vo.wl,handler:function(){e.companiesNav&&(e.closeNavs("companiesNav"),e.companiesNav.toggle())}},{keys:vo.Ar,handler:function(){e.workNav&&(e.closeNavs("workNav"),e.workNav.toggle())}},{keys:vo.K1,handler:function(){e.setupNav&&(e.closeNavs("setupNav"),e.setupNav.toggle())}},{keys:vo.vm,handler:function(){e.finalizeNav&&(e.closeNavs("finalizeNav"),e.finalizeNav.toggle())}},{keys:vo.$3,handler:function(){e.archiveNav&&(e.closeNavs("archiveNav"),e.archiveNav.toggle())}},{keys:vo.mr,handler:function(){return e.props.actions.toggleToolbar(!e.props.toolbarOpened)}}]}},{key:"preventDefault",value:function(e){e.preventDefault(),e.stopPropagation()}},{key:"closeNavs",value:function(e){"companiesNav"!==e&&this.companiesNav&&this.companiesNav.close(),"workNav"!==e&&this.workNav&&this.workNav.close(),"setupNav"!==e&&this.setupNav&&this.setupNav.close(),"finalizeNav"!==e&&this.finalizeNav&&this.finalizeNav.close()}},{key:"logout",value:function(){this.requestHelper.registerRequest
1((0,lo.r)()).then(function(){window.location=(0,Q.ID)()})}},{key:"closeSecondScreen",value:function(){this.requestHelper.registerRequest((0,c.Z7)()),this.props.history.push((0,Q.ID)())}},{key:"handleCreateFinalize",value:function(e){var t=this;this.requestHelper.has(e)||(this.setState({creatingFinalize:!0}),this.requestHelper.registerRequest((0,ao.mF)(e,this.props.selectedCompany),e).then(function(e){return t.setState({creatingFinalize:!1},function(){return t.props.history.push((0,Q.ID)("/finalize/".concat(e.body.id)))})}).then(function(){return t.props.refreshStateInfo()}).catch(function(){return t.setState({creatingFinalize:!1})}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.user,o=t.companies,i=t.foundationTypeCompany,a=t.allowCreateCompany,l=t.requestAccess,s=t.grantAccess,c=t.selectedCompany,u=t.location,d=t.history,f=t.onSelectCompany,p=t.info,m=t.onboarding,v=t.allowSetup,h=t.details,y=t.showReports,b=t.allowSecurities,g=t.allowInvoicing,w=t.showDocumentArchive,S=t.onArchiveUpload,k=t.finalize,O=t.showDefaultMenu,N=t.usageTypeAnnualReportOnly,x=t.companyTypeIsSinglePersonOrIS,P=t.toolbarOpened,I=t.administratorName,A=t.allowMyCompany,C=t.allowUsers,j=t.allowPayments,D=t.allowOfferings,_=t.allowCrmFeatures,R=t.lastCompanies,T=t.hasSecondaryWindow,E=t.accessObj,M=t.backgroundTasks,F=u.pathname!==(0,Q.ID)("/company/create"),z=M.length>0;return(0,Q.wz)((0,Q.ID)("/dashboard"))?Ic(eo(),{className:"app-header",fluid:!0},void 0,Ic(Zr(),{},void 0,xc.createElement(Qs,{companies:o,lastCompanies:R,ref:function(t){e.companiesNav=t},allowCreateCompany:a,requestAccess:l,grantAccess:s,selected:c,location:u,defaultOpen:n.selectCompanyAtLogin,onSelectCompany:f,history:d,allowMyCompany:A||D||_})),Ic(Zr(),{pullRight:!0},void 0,!c&&xc.createElement(jo,{ref:function(t){e.accountNav=t},location:u,administratorName:I,userName:n.formattedName,userInitials:n.userInitials,onboarding:!0,pullRight:!0,onLogout:this.logout}),O&&c&&xc.createElement(jo,{ref:function(t){e.accountNav=t},location:u,administratorName:I,userName:n.formattedName,allowMyCompany:A,userInitials:n.userInitials,allowUsers:C,allowPayments:j,allowOfferings:D,allowCrmFeatures:_,allowOtherSettings:n.isBetaTesting,allowShoppingBasket:n.isOrdinaryUserOrAdministratorSuperUser,pullRight:!m&&F,onLogout:this.logout}),O&&!P&&Ic(no(),{className:c?"btn-bordered-blue":"btn-white",onClick:function(){return e.props.actions.toggleToolbar(!0)}},void 0,c?Ic(xc.Fragment,{},void 0,Ic("i",{className:"fa fa-plus mr-1","aria-hidden":"true"}),I18n.translate("toolpanel.title")):Ic(xc.Fragment,{},void 0,Ic(io.h,{className:"mr-1","aria-hidden":"true"}),I18n.translate("menu.help"))))):(0,Q.wz)((0,Q.ID)("/2nd-window"))?Ic(eo(),{className:"app-header",fluid:!0},void 0,Ic(Zr(),{},void 0,xc.createElement(Qs,{companies:o,lastCompanies:R,ref:function(t){e.companiesNav=t},allowCreateCompany:a,requestAccess:l,grantAccess:s,selected:c,location:u,defaultOpen:n.selectCompanyAtLogin,onSelectCompany:f,history:d,allowMyCompany:A,disabled:!0})),Ic(Zr(),{pullRight:!0},void 0,Ic(no(),{onClick:function(){return e.closeSecondScreen()}},void 0,I18n.translate("secondscreen.exit")),Ic(no(),{onClick:this.logout},void 0,I18n.translate("menu.signout")))):Ic(eo(),{className:"app-header ".concat(this.state.isNavbarOpen?"open":""),fluid:!0,expanded:this.state.isNavbarOpen,onToggle:function(t){return e.setState({isNavbarOpen:t})}},void 0,Ic(eo().Header,{},void 0,Ic(eo().Brand,{className:"app-header-logo ".concat(this.state.isNavbarOpen?"open":"")},void 0,Ic("span",{className:"app-header-logo__mark cursor-pointer",onClick:function(){return d.push((0,Q.ID)("/"))}},void 0,Ic("img",{src:"/images/logo-wh.png",alt:"logo",width:88,height:32}))),Ic(eo().Toggle,{"aria-controls":"responsive-navbar-nav"})),Ic(eo().Collapse,{id:"responsive-navbar-nav"},void 0,!O&&Ic(Zr(),{id:"header-portal-container"}),O?Ic(Zr(),{className:"app-header-menu"},void 0,c?Ic(r.Fragment,{},void 0,xc.createElement(Qs,{companies:o,lastCompanies:R,ref:function(t){e.companiesNav=t},allowCreateCompany:a,requestAccess:l,grantAccess:s,selected:c,location:u,defaultOpen:n.selectCompanyAtLogin,history:d,onSelectCompany:f,allowMyCompany:A||D||_}),F&&(p||m)&&!E.filesOnlyAccess&&Ic(no(),{componentClass:ro.Link,to:(0,Q.ID)("/work"),href:(0,Q.ID)("/work")},void 0,I18n.translate(y?"menu.reports":"onboarding.gettingstarted")),(!p&&!m&&v&&F||h||i)&&xc.createElement(bc,{accessObj:E,location:u,details:h,user:n,usageTypeAnnualReportOnly:N,companyTypeIsSinglePerson:x,ref:function(t){e.setupNav=t}}),!m&&F&&Ic(r.Fragment,{},void 0,!p&&xc.createElement(Oc,{key:"work",accessObj:E,location:u,history:d,allowSecurities:b,allowInvoicing:g,usageTypeAnnualReportOnly:N,foundationTypeCompany:i,ref:function(t){e.workNav=t}}),!p&&!E.isLimitedToInvoicingAndDocuments()&&xc.createElement(rc,{key:"finalize",location:u,history:d,ref:function(t){e.finalizeNav=t},readOnly:h,finalize:k,isPartOfPortfolio:n.isBetaTesting,isAdmin:n.administrator,companyTypeIsSinglePerson:x,busy:this.state.creatingFinalize,onCreate:this.handleCreateFinalize.bind(this),accessObj:E}
1),w&&xc.createElement(hs,{key:"archive",ref:function(t){e.archiveNav=t},showArchive:w,companyTypeIsSinglePerson:x,location:u,accessObj:E,onArchiveUpload:S}),!p&&xc.createElement(sc,{key:"magics",ref:function(t){e.magicsNav=t},allowSecurities:b,usageTypeAnnualReportOnly:N,location:u,accessObj:E})),Ic("li",{className:"app-header-menu__push","aria-hidden":"true"}),Ic("li",{className:"app-header-menu__actions"},void 0,Ic("ul",{className:"app-header-menu__actions-list"},void 0,Ic(pc,{hasSecondaryWindow:T,className:"app-header-second-window-dropdown"}),Ic(no(),{componentClass:ro.Link,to:(0,Q.ID)("/account/shoppingbasket"),href:(0,Q.ID)("/account/shoppingbasket")},void 0,Ic("i",{className:"fa fa-shopping-basket fa-lg","aria-hidden":"true"})),z?Ic(ks,{backgroundTasks:M}):null,xc.createElement(jo,{ref:function(t){e.accountNav=t},location:u,administratorName:I,userName:n.formattedName,allowMyCompany:A,userInitials:n.userInitials,allowUsers:C,allowPayments:j,allowOfferings:D,allowCrmFeatures:_,allowOtherSettings:n.isBetaTesting,onLogout:this.logout}),!P&&Ic(no(),{id:"show-toolbar-btn",className:c?"btn-bordered-blue":"btn-white",onClick:function(){return e.props.actions.toggleToolbar(!0)}},void 0,Ic(xc.Fragment,{},void 0,Ic("i",{className:"fa fa-plus mr-1","aria-hidden":"true"}),I18n.translate("toolpanel.title")))))):Ic(r.Fragment,{},void 0,xc.createElement(jo,{ref:function(t){e.accountNav=t},location:u,administratorName:I,userName:n.formattedName,userInitials:n.userInitials,onboarding:!0,onLogout:this.logout}),!P&&Ic(no(),{id:"show-toolbar-btn",className:"btn-white",onClick:function(){return e.props.actions.toggleToolbar(!0)}},void 0,Ic(xc.Fragment,{},void 0,Ic(io.h,{className:"mr-1","aria-hidden":"true"}),I18n.translate("menu.help"))))):null))}}],o&&Ac(n.prototype,o),i&&Ac(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o,i}(co.b);Ec(Fc,"contextType",yo.G),Ec(Fc,"propTypes",{location:q().object.isRequired,history:q().object.isRequired,companies:q().arrayOf(q().instanceOf(uo.V)),lastCompanies:q().arrayOf(q().number),finalize:q().instanceOf(fo.E),administratorName:q().string,allowCreateCompany:q().bool,allowUsers:q().bool,allowPayments:q().bool,allowMyCompany:q().bool,allowInvoicing:q().bool,grantAccess:q().bool,requestAccess:q().bool,allowOfferings:q().bool,allowCrmFeatures:q().bool,selectedCompany:q().number,allowSecurities:q().bool,allowSetup:q().bool,onboarding:q().bool,details:q().bool,info:q().bool,showDefaultMenu:q().bool,showDocumentArchive:q().bool,showReports:q().bool,foundationTypeCompany:q().bool,usageTypeAnnualReportOnly:q().bool,companyTypeIsSinglePersonOrIS:q().bool,toolbarOpened:q().bool,user:q().instanceOf(po.F),onSelectCompany:q().func,refreshStateInfo:q().func,onArchiveUpload:q().func.isRequired,accessObj:q().object.isRequired}),Ec(Fc,"defaultProps",{administratorName:"",allowCreateCompany:!1,showDefaultMenu:!0,allowUsers:!1,allowPayments:!1,allowOfferings:!1,allowCrmFeatures:!1,grantAccess:!1,requestAccess:!1,allowMyCompany:!1,allowSecurities:!1,allowSetup:!1,allowInvoicing:!1,onboarding:!1,details:!1,info:!1,showDocumentArchive:!1,showReports:!1,foundationTypeCompany:!1,companies:[],finalize:new fo.E,refreshStateInfo:function(){},onSelectCompany:function(){}});const zc=(0,zn.Ng)(function(e){return{showDefaultMenu:e.menu.show,toolbarOpened:e.menu.showToolbar,hasSecondaryWindow:e.currentWindow.hasSecondaryWindow,backgroundTasks:e.backgroundTasksReducer.backgroundTasks}},function(e){return{actions:(0,oo.zH)({toggleToolbar:so.Ib},e)}},null,{forwardRef:!0})(Fc);var Bc=n(86663),Hc=n(62193),Lc=n.n(Hc),$c=n(95093),Xc=n.n($c),Vc=n(59858),qc=n.n(Vc),Uc=["type"];function Wc(e){return function(e){if(Array.isArray(e))return Yc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yc(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yc(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Kc(e){var t=e.type,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Uc);return function(e){return e({type:Pl.Ws,data:t}),(0,a.RD)(l.B1M,{method:"post",data:{parameters:[{name:"type",value:t}].concat(Wc(Object.keys(n).map(function(e){return{name:e,value:n[e]}})))}}).then(function(n){return e({type:Pl.sN,data:{type:t,data:n.body}})}).catch(function(){return e({type:Pl.sN,data:{type:t,data:{}}})})}}var Gc,Qc,Zc,Jc,eu,tu=n(35689),nu=n(32992),ru=n(76671);function ou(){return ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ou.apply(null,arguments)}function iu(e){return r.createElement("svg",ou({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),Gc||(Gc=r.createElement("path",{fill:"#fff",d:"M1.6 0h28.8A1.6 1.6 0 0132 1.6v28.8a1.6 1.6 0 01-1.6 1.6H1.6A1.6 1.6 0 010 30.4V1.6A1.6 1.6 0 011.6 0z"})),Qc||(Qc=r.createElement("path",{fill:"#c1cdd6",d:"M31.2 5.6H.8v24.8a.8.8 0 00.8.8h28.8a.8.8 0 00.8-.8V5.6zM0 5.6v-4A1.6 1.6 0 011.6 0h28.8A1.6 1.6 0 0132 1.6v28.8a1.6 1.6 0 01-1.6 1.6H1.6A1.6 1.6 0 010 30.4V5.6z"})),Zc||(Zc=r.createElement("path",{fill:"#fff",d:"M1.6 2.8a1.2 1.2 0 112.4 0 1.2 1.2 0 01-2.4 0zm4 0a1.2 1.2 0 112.4 0 1.2 1.2 0 01-2.4 0zm5.2-1.2a1.2 1.2 0 100 2.4 1.2 1.2 0 000-2.4z"})),Jc||(Jc=r.createElement("path",{fill:"#c8eeff",d:"M25.6 18.4c0 5.302-4.298 9.6-9.6 9.6s-9.6-4.298-9.6-9.6 4.298-9.6 9.6-9.6 9.6 4.298 9.6 9.6z"})),eu||(eu=r.createElement("path",{fill:"#60c6f2",d:"M16.946 27.15l.139-.085a11.132 11.132 0 001.997-1.582 10.201 10.201 0 001.49-1.883h2.527a8.795 8.795 0 01-6.154 3.55zm7.845-8.35a8.75 8.75 0 01-1.168 4h-2.61a9.805 9.805 0 00.98-4h2.798zM23.623 14a8.75 8.75 0 011.168 4h-2.798a9.805 9.805 0 00-.98-4h2.61zm-.523-.8h-2.527a10.201 10.201 0 00-1.49-1.883 11.132 11.132 0 00-2.136-1.667 8.794 8.794 0 016.154 3.55zm-3.481 0H16.4v-2.943a10.365 10.365 0 012.117 1.626 9.52 9.52 0 011.102 1.317zM16.4 14h3.713c.59 1.081 1.018 2.403 1.08 4h-4.792v-4zm-.8 0v4h-4.792c.062-1.597.49-2.919 1.08-4h3.713zm0-.8h-3.219c.347-.502.724-.94 1.102-1.317a10.365 10.365 0 012.117-1.626V13.2zm0 5.6v4h-3.713c-.59-1.081-1.018-2.403-1.08-4h4.792zm.8 0h4.792c-.062 1.597-.49 2.919-1.08 4h-3.713v-4zm-.8 4.8v2.943a10.365 10.365 0 01-2.117-1.626 9.52 9.52 0 01-1.102-1.317H15.6zm.8 2.943V23.6h3.219c-.347.502-.724.94-1.102 1.317a10.365 10.365 0 01-2.117 1.626zM10.987 14a9.805 9.805 0 00-.98 4H7.209a8.75 8.75 0 011.168-4h2.61zm.44-.8H8.9a8.795 8.795 0 016.154-3.55 11.132 11.132 0 00-2.136 1.667 10.201 10.201 0 00-1.49 1.883zm1.49 12.283a11.132 11.132 0 002.136 1.667 8.794 8.794 0 01-6.154-3.55h2.527c.453.74.972 1.365 1.49 1.883zM8.377 22.8a8.75 8.75 0 01-1.168-4h2.798a9.805 9.805 0 00.98 4h-2.61zM16 28c5.302 0 9.6-4.298 9.6-9.6S21.302 8.8 16 8.8s-9.6 4.298-9.6 9.6S10.698 28 16 28z"})))}n.p;var au;function lu(e,t,n,r){au||(au="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:au,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const su=function(e){var t=e.mode,n=void 0===t?"":t,o=e.onClick,i=void 0===o?function(){}:o,a=e.type,l=void 0===a?"button":a,s=e.beta,c=void 0!==s&&s;return lu("button",{className:"btn icon-button",type:l,onClick:function(){return i(n)}},void 0,lu((0,r.useMemo)(function(){switch(n){case"PDF":return ru.h;case"EXCEL":return nu.h;default:return iu}},[n]),{"aria-hidden":"true",className:"phi-3x"}),lu("div",{className:"mt-1"},void 0,I18n.translate("report.".concat(n?n.toLowerCase():"open"))),c&&lu("div",{className:"mt-1"},void 0,"(beta)"))};function cu(e){return cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cu(e)}function uu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hu(r.key),r)}}function du(e,t,n){return t=pu(t),function(e,t){if(t&&("object"==cu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fu()?Reflect.construct(t,n||[],pu(e).constructor):t.apply(e,n))}function fu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fu=function(){return!!e})()}function pu(e){return pu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pu(e)}function mu(e,t){return mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mu(e,t)}function vu(e,t,n){return(t=hu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hu(e){var t=function(e,t){if("object"!=cu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cu(t)?t:t+""}var yu=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return vu(e=du(this,t,[].concat(r)),"state",{text:""}),vu(e,"interval",void 0),vu(e,"timer",void 0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mu(e,t)}(t,e),n=t,o=[{key:"getText",value:function(e){return e<=1e3?I18n.translate("data.updated"):e<=4e3?I18n.translate("data.updated.seconds"):e<6e4?I18n.translate("data.updated..less.minute"):e<12e4?I18n.translate("data.updated..1"):I18n.translate("data.updated..minute",parseInt(e/6e4))}}],(r=[{key:"componentDidMount",value:function(){this.triggerSequence()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer),clearInterval(this.interval)}},{key:"componentDidUpdate",value:function(e){this.props.start!==e.start&&this.triggerSequence()}},{key:"triggerSequence",value:function(){var e=this,n=Date.now()-this.props.start;clearTimeout(this.timer),clearInterval(this.interval),this.setState({text:t.getText(n)}),n>=6e4?this.interval=setInterval(function(){e.setState({text:t.getText(n)}),n+=6e4},6e4):this.timer=setTimeout(function(){n+=3e3,e.setState({text:t.getText(n)}),e.timer=setTimeout(function(){n+=5e3,e.setState({text:t.getText(n)}),e.interval=setInterval(function(){n+=6e4,e.setState({text:t.getText(n)})},52e3)},5e3)},3e3)}},{key:"render",value:function(){return this.state.text}}])&&uu(n.prototype,r),o&&uu(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(n(96540).PureComponent);const bu=yu;var gu;function wu(e,t,n,r){gu||(gu="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:gu,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const Su=function(e){var t=e.onClick;return wu("div",{role:"button",className:"pull-right",type:"button",onClick:function(e){e.preventDefault(),t(null,!0)}},void 0,wu(pe.$,{icon:"fa fa-lg fa-info-circle text-info p-1",tooltip:I18n.translate("report.explain"),textWrap:!0,className:"tooltip__nowrap"}))};function ku(e){return ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ku(e)}function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ou.apply(null,arguments)}function Nu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ju(r.key),r)}}function xu(e,t,n){return t=Iu(t),function(e,t){if(t&&("object"==ku(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pu()?Reflect.construct(t,n||[],Iu(e).constructor):t.apply(e,n))}function Pu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pu=function(){return!!e})()}function Iu(e){return Iu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Iu(e)}function Au(e,t){return Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Au(e,t)}function Cu(e,t,n){return(t=ju(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ju(e){var t=function(e,t){if("object"!=ku(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ku(t)?t:t+""}var Du=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Cu(e=xu(this,t,[].concat(o)),"state",{Table:null}),Cu(e,"container",r.createRef()),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Au(e,t)}(t,e),o=t,(i=[{key:"componentDidMount",value:function(){var e=this;Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187)]).then(n.bind(n,96405)
1).then(function(t){return e.setState({Table:t.default})}),this.timer=setTimeout(function(){return e.forceUpdate()},2e3)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){var e=this.state.Table;if(!e)return null;var t=document.querySelector(".rc-table-thead");return r.createElement("div",{ref:this.container,style:{width:"100%",height:"100%"},className:this.props.withoutHeader?"sticky-table__without-header":""},r.createElement(e,Ou({},this.props,{emptyText:I18n.translate("report.empty"),scroll:{x:this.props.width,y:Math.max(this.container.current&&this.container.current.clientHeight-(t&&t.clientHeight||31),0)},useFixedHeader:!0})))}}])&&Nu(o.prototype,i),a&&Nu(o,a),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,a}(r.PureComponent);const _u=Du;var Ru,Tu=n(74218),Eu=n(45021),Mu=n(48127),Fu=n(34158),zu=n(54661),Bu=n(32322);function Hu(e){return Hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hu(e)}function Lu(e,t,n,r){Ru||(Ru="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ru,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wu(r.key),r)}}function Xu(e,t,n){return t=qu(t),function(e,t){if(t&&("object"==Hu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vu()?Reflect.construct(t,n||[],qu(e).constructor):t.apply(e,n))}function Vu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vu=function(){return!!e})()}function qu(e){return qu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qu(e)}function Uu(e,t){return Uu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uu(e,t)}function Wu(e){var t=function(e,t){if("object"!=Hu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Hu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hu(t)?t:t+""}var Yu=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e=Xu(this,t,[].concat(a)),n=e,o={animate:!1},(r=Wu(r="state"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uu(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){var e=this;this.timer=setTimeout(function(){return e.setState({animate:!0})},100)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"render",value:function(){return Lu("div",{className:"app-toolbar__body ".concat(this.state.animate&&!this.props.animate?"transition":"")},void 0,this.props.children)}}])&&$u(n.prototype,r),o&&$u(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(n(96540).PureComponent);const Ku=Yu;var Gu,Qu=n(96540);function Zu(e){return Zu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zu(e)}function Ju(e,t,n,r){Gu||(Gu="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Gu,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ed(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||nd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function td(e){return function(e){if(Array.isArray(e))return rd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||nd(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nd(e,t){if(e){if("string"==typeof e)return rd(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rd(e,t):void 0}}function rd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function od(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function id(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?od(Object(n),!0).forEach(function(t){pd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):od(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ad(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,md(r.key),r)}}function ld(e,t,n){return t=dd(t),function(e,t){if(t&&("object"==Zu(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sd()?Reflect.construct(t,n||[],dd(e).constructor):t.apply(e,n))}function sd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sd=function(){return!!e})()}function cd(e,t,n,r){var o=ud(dd(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function ud(){return ud="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=dd(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ud.apply(null,arguments)}function dd(e){return dd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},dd(e)}function fd(e,t){return fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fd(e,t)}function pd(e,t,n){return(t=md(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function md(e){var t=function(e,t){if("object"!=Zu(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Zu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zu(t)?t:t+""}var vd=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),pd(n=ld(this,t,[e]),"state",{accounts:[],customers:[],suppliers:[],accountOptions:[],openedTransaction:null}),pd(n,"methods",{}),pd(n,"inputRefs",{}),pd(n,"requestHelper",new j.g),n.validators=n.getValidators(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fd(e,t)}(t,e),n=t,r=[{key:"onLanguageChange",value:function(){cd(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators()}},{key:"componentDidMount",value:function(){cd(t,"componentDidMount",this,3)([]),this.setData(id(id({},this.props),{},{accounts:this.state.accountOptions})),Lc()(this.props.queryData)||this.setSearchData(id(id({},this.props.queryData),{},{actions:this.props.actions})),this.setOptions(),this.load(),this.props.transactionStore.loaded||this.props.transactionStore.loading||this.props.actions.loadData({companyXid:this.props.companyStore.currentXid})}},{key:"componentDidUpdate",value:function(e,t){this.props.accounts===e.accounts&&this.props.customers===e.customers&&this.props.suppliers===e.suppliers||this.setOptions(),this.props.accountStatementReport===e.accountStatementReport&&this.state.accountOptions===t.accountOptions&&this.props.fromDate===e.fromDate&&this.props.toDate===e.toDate||this.setData(id(id({},this.props),{},{accounts:this.state.accountOptions})),this.props.queryData!==e.queryData&&this.setSearchData(id(id({},this.props.queryData),{},{actions:this.props.actions})),this.load()}},{key:"load",value:function(){var e=this;this.props.accountStatementReport.loading||this.props.accountStatementReport.loaded||this.validate().then(function(t){if(t){var n=e.props.accountStatementReport,r=n.debitor,o=n.creditor;e.props.actions.fetchLiveReport({type:p.vq,financeaccount:e.props.accountStatementReport.account,fromdate:Xc()(e.props.accountStatementReport.fromDate,p.D2).format(p.D2),todate:Xc()(e.props.accountStatementReport.toDate,p.D2).format(p.D2),debitorXid:"all"===o?r:null,creditorXid:"all"===r?o:null})}})}},{key:"setOptions",value:function(){this.setState({accountOptions:[{label:I18n.translate("parameters.financeaccount.topgroup"),options:[{label:I18n.translate("parameters.financeaccount.all"),value:"all"},{label:I18n.translate("parameters.financeaccount.allvat"),value:"vataccounts"}]}].concat(td(this.props.accounts)),customers:[{label:I18n.translate("parameters.any"),value:"all"}].concat(td(this.props.customers)),suppliers:[{label:I18n.translate("parameters.any"),value:"all"}].concat(td(this.props.suppliers))})}},{key:"setSearchData",value:function(e){var t=e.financeAccount,n=e.creditorXid,r=e.debitorXid,o=e.searchDate,i=e.actions,a=e.fromDate,l=e.toDate;if(a&&l&&i.updateAccountStatementReport({fromDate:a,toDate:l}),!t||(n||r)&&o){if(t&&(n||r)&&o){var s,c=Xc()(o,p.D2),u=this.props.fiscalYears.find((s=c,function(e){return!!e&&s.isBetween(Xc()(e.fromDate,p.D2),Xc()(e.toDate,p.D2))})),d={account:t,creditor:n?Number(n):"all",debitor:r?Number(r):"all"};u&&(d.fromDate=u.fromDate||"",d.toDate=u.toDate||""),i.updateAccountStatementReport(d)}}else i.updateAccountStatementReport({account:t})}},{key:"setData",value:function(e){var t=e.accountStatementReport,n=e.account,r=e.accounts,o=e.actions,i=e.toDate,a=e.fromDate,l=null;!t.account&&r.length&&r[0].options.length&&(l={account:n||r[0].options[0].value,creditor:"all"}),t.fromDate||(l=id(id({},l),{},{fromDate:a||""})),t.toDate||(l=id(id({},l),{},{toDate:i||""})),l&&o.updateAccountStatementReport(l)}},{key:"validate",value:function(){return Promise.all([this.inputRefs[2].validate(this.props.accountStatementReport.account),this.inputRefs[4].validate(this.props.accountStatementReport.fromDate),this.inputRefs[6].validate(this.props.accountStatementReport.toDate)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o=n.props.accountStatementReport,i=o.debitor,s=o.creditor,c={type:p.vq,output:e,financeaccount:n.props.accountStatementReport.account,fromdate:n.props.accountStatementReport.fromDate,todate:n.props.accountStatementReport.toDate,debitorXid:"all"===s?i:null,creditorXid:"all"===i?
1s:null};t&&(c.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(c)),"_blank")}})}},{key:"getValidators",value:function(){var e=this;return{account:[Mu.A],fromDate:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=Xc()(t,p.D2),o=Xc()(e.props.accountStatementReport.toDate,p.D2);return r.isAfter(o)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:e.props.fiscalYears.some(function(e){return r.isBetween(Xc()(e.fromDate,p.D2),Xc()(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}],toDate:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=Xc()(t,p.D2),o=Xc()(e.props.accountStatementReport.fromDate,p.D2);return r.isBefore(o)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:e.props.fiscalYears.some(function(e){return r.isBetween(Xc()(e.fromDate,p.D2),Xc()(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}]}}},{key:"onRowClick",value:function(e){var t=this;Promise.all([(0,Ln.T7)({companyXid:this.props.companyStore.currentXid,sourceIdType:e.sourceIdType,sourceXid:e.sourceXid}),(0,Ln.aU)({companyXid:this.props.companyStore.currentXid,sourceIdType:e.sourceIdType,sourceXid:e.sourceXid})]).then(function(e){var n=ed(e,2),r=n[0],o=n[1],i=new Tu.A(r.body);i.entryValues=r.body.entryValues,i.attachments=r.body.attachments,i.bankPostings=o.body.bankPostings,i.debitorXid=r.body.debitorXid,i.creditorXid=r.body.creditorXid,i.userInvoiceLines=r.body.userInvoiceLines,i.taxDepreciationLines=r.body.taxDepreciationLines,i.suggestionTransactionDetails=r.body.suggestionTransactionDetails,i.magicXid=r.body.magicXid,i.securityXid=r.body.securityXid,i.transactionDetails=(0,zu.A)(i.transactionTypeId,(0,Q.ZD)(r.body.formValues)),t.setState({openedTransaction:i})})}},{key:"render",value:function(){var e,t,n,r,o,i,a,l=this,s=this.state.openedTransaction;return Ju(Ku,{animate:this.props.animate},void 0,Ju("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,Ju("div",{className:"container-fluid"},void 0,Qu.createElement(Fe.H,{id:"asr-account",key:"asr-account",label:"parameters.financeaccount",ref:(0,Q.qP)(this.methods,this.inputRefs,2),value:this.props.accountStatementReport.account,groupedOptions:this.state.accountOptions,validators:this.validators.account,noDeselect:!0,onChange:(0,Q._s)(this.methods,3,function(e){return l.props.actions.updateAccountStatementReport({account:e,creditor:"all",debitor:"all"})})}),this.state.accountOptions.some(function(e){return e.options.some(function(e){return e.showCreditorChoice&&l.props.accountStatementReport.account===e.value})})&&this.state.suppliers.length>1&&Ju(Fe.H,{label:"parameters.creditor",value:this.props.accountStatementReport.creditor,onChange:(0,Q._s)(this.methods,8,function(e){return l.props.actions.updateAccountStatementReport({creditor:e,debitor:"all"})}),options:this.state.suppliers}),this.state.accountOptions.some(function(e){return e.options.some(function(e){return e.showDebitorChoice&&l.props.accountStatementReport.account===e.value})})&&this.state.customers.length>1&&Ju(Fe.H,{label:"parameters.debitor",value:this.props.accountStatementReport.debitor,onChange:(0,Q._s)(this.methods,9,function(e){return l.props.actions.updateAccountStatementReport({debitor:e,creditor:"all"})}),options:this.state.customers}),Qu.createElement(tu.$,{id:"asr-fromdate",key:"asr-fromdate",label:"parameters.fromdate",className:"mr-2",value:this.props.accountStatementReport.fromDate,ref:(0,Q.qP)(this.methods,this.inputRefs,4),validators:this.validators.fromDate,pullRight:!0,onChange:(0,Q._s)(this.methods,5,function(e){return l.props.actions.updateAccountStatementReport({fromDate:e})})}),Qu.createElement(tu.$,{id:"asr-todate",key:"asr-todate",label:"parameters.todate",value:this.props.accountStatementReport.toDate,ref:(0,Q.qP)(this.methods,this.inputRefs,6),val
1idators:this.validators.toDate,pullRight:!0,onChange:(0,Q._s)(this.methods,7,function(e){return l.props.actions.updateAccountStatementReport({toDate:e})})})),Ju("div",{className:"separator"}),Ju("div",{className:"container-fluid"},void 0,Ju("div",{className:"form-group"},void 0,Ju(su,{mode:"PDF",onClick:this.showReport.bind(this)}),Ju(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),Ju(su,{type:"submit"}),Ju(Su,{onClick:this.showReport.bind(this)})))),Ju("div",{className:"separator mt-0"}),Ju("div",{className:"app-toolbar__report-title"},void 0,Ju("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),Ju("span",{className:"mr-1"},void 0,I18n.translate("menu.accountstatement.short")),Ju("span",{},void 0,I18n.translate("report.miniversion"))),Ju("div",{className:"app-toolbar__report-container"},void 0,Ju(_u,{columns:(e={dateWidth:Math.max(80,(0,Q.k7)(this.props.accountStatementReport.liveData,"dateAsText")+25),entryNumberWidth:Math.max(25,(0,Q.k7)(this.props.accountStatementReport.liveData,"entryNumber")+10),debitWidth:Math.max(80,(0,Q.k7)(this.props.accountStatementReport.liveData,"debitKreditAsText")),creditWidth:(i=l.props.accountStatementReport.liveData,a=i.length&&null!=i[0].primoAsText?[{balanceAsText:i[0].primoAsText}].concat(td(i)):i,Math.max(80,(0,Q.k7)(a,"balanceAsText")+30))},t=e.dateWidth,n=e.debitWidth,r=e.creditWidth,o=e.entryNumberWidth,[{key:"date",dataIndex:"dateAsText",title:I18n.translate("date"),width:t},{key:"entryNumber",dataIndex:"entryNumber",title:"#",width:o},{key:"text",dataIndex:"lineText",title:I18n.translate("text")},{key:"debit",dataIndex:"debitKreditAsText",title:I18n.translate("debitkredit"),width:n,className:"text-right"},{key:"credit",dataIndex:"balanceAsText",title:I18n.translate("balance"),width:r,className:"text-right"}]),data:[].concat(td(this.props.accountStatementReport.liveData.length&&[{balanceAsText:this.props.accountStatementReport.liveData[0].primoAsText}]||[]),td(this.props.accountStatementReport.liveData)),onRow:function(e,t){return{onClick:l.onRowClick.bind(l,e,t)}},rowClassName:"cursor-pointer"})),this.props.accountStatementReport.lastUpdate?Ju("div",{className:"text-gray my-1 px-2"},void 0,Ju(bu,{start:this.props.accountStatementReport.lastUpdate})):null,s&&Ju(qc(),{show:!!s,onHide:function(){return l.setState({openedTransaction:null})},bsSize:"large",className:"bank-compare__edit-modal"},void 0,Ju(Bu.A,{onCancel:function(){return l.setState({openedTransaction:null})},transaction:s})))}}],r&&ad(n.prototype,r),o&&ad(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(co.b);pd(vd,"propTypes",{accounts:q().array,customers:q().array,suppliers:q().array,fromDate:q().string,toDate:q().string,fiscalYears:q().array,animate:q().bool,queryData:q().object}),pd(vd,"defaultProps",{accounts:[],fiscalYears:[],fromDate:"",toDate:"",queryData:{}});const hd=(0,zn.Ng)(function(e){var t=e.defaults,n=t.groupedFinanceAccounts,r=t.customers,o=t.suppliers,i=t.fiscalYears,a=t.reportParameterDefaults,l=e.companies.finalize;return{accounts:n,customers:r,suppliers:o,fiscalYears:i,fromDate:l.reportParamFiscalYearStartDate||(0,Fu.H_)(a,Fu.tw),toDate:l.reportParamFiscalYearEndDate||(0,Fu.H_)(a,Fu.mi),account:(0,Fu.H_)(a,Fu.qN),accountStatementReport:e.accountStatementReport,transactionStore:e.transactions,companyStore:e.companies}},function(e){return{actions:(0,oo.zH)({updateAccountStatementReport:Il,fetchLiveReport:Kc,loadData:hi.Ze},e)}})(vd);var yd,bd,gd,wd,Sd,kd;function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Od.apply(null,arguments)}function Nd(e){return r.createElement("svg",Od({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 32"},e),yd||(yd=r.createElement("path",{fill:"#fff",d:"M2.909.727c0-.402.326-.727.727-.727h15.273l7.273 7.273v21.091a.727.727 0 01-.727.727H3.637a.727.727 0 01-.727-.727V.728z"})),bd||(bd=r.createElement("path",{fill:"#c1cdd6",d:"M25.455 28.364V7.574l-.301-.301H18.91V1.029l-.301-.301H3.637v27.636h21.818zM24.426 6.545l-4.79-4.79v4.79h4.79zM3.636 0h15.273l7.273 7.273v21.091a.727.727 0 01-.727.727H3.637a.727.727 0 01-.727-.727V.728c0-.402.326-.727.727-.727z"})),gd||(gd=r.createElement("path",{fill:"#f25123",d:"M9.104 19.705v2.113h-.988V16.13h2.176c.635 0 1.139.165 1.512.496.375.331.562.768.562 1.313 0 .557-.184.991-.551 1.301-.365.31-.876.465-1.535.465H9.104zm0-.793h1.188c.352 0 .62-.082.805-.246.185-.167.277-.406.277-.719 0-.307-.094-.552-.281-.734-.188-.185-.445-.28-.773-.285H9.105v1.984zM13.233 21.818V16.13h1.68c.503 0 .948.112 1.336.336.391.224.693.542.906.953s.32.883.32 1.414v.285c0 .539-.108 1.013-.324 1.422a2.25 2.25 0 01-.918.945c-.396.221-.85.332-1.363.332h-1.637zm.989-4.89v4.102h.645c.518 0 .915-.161 1.191-.484.279-.326.421-.792.426-1.398v-.316c0-.617-.134-1.088-.402-1.414s-.658-.488-1.168-.488h-.691zM21.737 19.408h-2.289v2.41h-.988V16.13h3.613v.797h-2.625v1.691h2.289v.789z"}
1)),wd||(wd=r.createElement("path",{fill:"#fff",d:"M0 23.273h8.727V32H0v-8.727z"})),Sd||(Sd=r.createElement("path",{fill:"#1c9ef6",d:"M8 24v7.273H.727V24H8zm-8-.727V32h8.727v-8.727H0z"})),kd||(kd=r.createElement("path",{fill:"#1c9ef6",d:"M6.545 29.091v-4.364H2.181l1.455 1.455-.727.727c-.364.362-.727.849-.727 1.455-.033 1.502 2.181 2.182 2.181 2.182s-1.454-.728 0-2.182l.728-.727 1.455 1.455z"})))}n.p;var xd,Pd,Id,Ad,Cd,jd,Dd=n(3012);function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(null,arguments)}function Rd(e){return r.createElement("svg",_d({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 26 32"},e),xd||(xd=r.createElement("path",{fill:"#fff",d:"M2.909.727c0-.402.326-.727.727-.727h15.273l7.273 7.273v21.091a.727.727 0 01-.727.727H3.637a.727.727 0 01-.727-.727V.728z"})),Pd||(Pd=r.createElement("path",{fill:"#c1cdd6",d:"M25.455 28.364V7.574l-.301-.301H18.91V1.029l-.301-.301H3.637v27.636h21.818zM24.426 6.545l-4.79-4.79v4.79h4.79zM3.636 0h15.273l7.273 7.273v21.091a.727.727 0 01-.727.727H3.637a.727.727 0 01-.727-.727V.728c0-.402.326-.727.727-.727z"})),Id||(Id=r.createElement("path",{fill:"#c1cdd6",d:"M9.104 19.705v2.113h-.988V16.13h2.176c.635 0 1.139.165 1.512.496.375.331.562.768.562 1.313 0 .557-.184.991-.551 1.301-.365.31-.876.465-1.535.465H9.104zm0-.793h1.188c.352 0 .62-.082.805-.246.185-.167.277-.406.277-.719 0-.307-.094-.552-.281-.734-.188-.185-.445-.28-.773-.285H9.105v1.984zM13.233 21.818V16.13h1.68c.503 0 .948.112 1.336.336.391.224.693.542.906.953s.32.883.32 1.414v.285c0 .539-.108 1.013-.324 1.422a2.25 2.25 0 01-.918.945c-.396.221-.85.332-1.363.332h-1.637zm.989-4.89v4.102h.645c.518 0 .915-.161 1.191-.484.279-.326.421-.792.426-1.398v-.316c0-.617-.134-1.088-.402-1.414s-.658-.488-1.168-.488h-.691zM21.737 19.408h-2.289v2.41h-.988V16.13h3.613v.797h-2.625v1.691h2.289v.789z"})),Ad||(Ad=r.createElement("path",{fill:"#fff",d:"M0 23.273h8.727V32H0v-8.727z"})),Cd||(Cd=r.createElement("path",{fill:"#1c9ef6",d:"M8 24v7.273H.727V24H8zm-8-.727V32h8.727v-8.727H0z"})),jd||(jd=r.createElement("path",{fill:"#1c9ef6",d:"M6.545 29.091v-4.364H2.181l1.455 1.455-.727.727c-.364.362-.727.849-.727 1.455-.033 1.502 2.181 2.182 2.181 2.182s-1.454-.728 0-2.182l.728-.727 1.455 1.455z"})))}n.p;var Td,Ed=n(15328);function Md(e){return Md="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Md(e)}function Fd(e,t,n,r){Td||(Td="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Td,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function zd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vd(r.key),r)}}function Bd(e,t,n){return t=$d(t),function(e,t){if(t&&("object"==Md(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hd()?Reflect.construct(t,n||[],$d(e).constructor):t.apply(e,n))}function Hd(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hd=function(){return!!e})()}function Ld(){return Ld="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$d(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Ld.apply(null,arguments)}
1function $d(e){return $d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$d(e)}function Xd(e,t){return Xd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xd(e,t)}function Vd(e){var t=function(e,t){if("object"!=Md(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Md(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Md(t)?t:t+""}var qd,Ud,Wd,Yd=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=Bd(this,t,[e])).handleYearChange=function(e){return n.props.actions.changeFiscalYear(n.props.companyXid,e)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xd(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){var e,n,r,o,i;(e=t,n="componentDidMount",r=this,i=Ld($d(1&(o=3)?e.prototype:e),n,r),2&o&&"function"==typeof i?function(e){return i.apply(r,e)}:i)([]),this.props.annualReport.loading||this.props.annualReport.loaded||this.props.actions.fetchAnnualLiveReport(this.props.companyXid)}},{key:"componentDidUpdate",value:function(){this.props.annualReport.loading||this.props.annualReport.loaded||this.props.actions.fetchAnnualLiveReport(this.props.companyXid)}},{key:"render",value:function(){var e=this.props,t=e.paid,n=e.animate,r=e.fiscalYearSpecialIdentifier,o=e.fiscalYearOptions,i=e.loading,a=e.annualReport;return Fd(Ku,{animate:n},void 0,Fd("div",{className:"report-form"},void 0,Fd("div",{className:"container-fluid"},void 0,Fd(Fe.H,{id:"report-fiscalyear",label:"annualreport.current.fiscalyear",tooltip:"annualreport.current.fiscalyear.balloon",value:r,options:o,onChange:this.handleYearChange,noDeselect:!0,isLoading:i,disabled:i})),Fd("div",{className:"separator"}),Fd("div",{className:"container-fluid"},void 0,Fd("div",{className:"form-group"},void 0,Fd("a",{className:"btn icon-button",href:l.Rfr,target:"_blank",rel:"noreferrer noopener"},void 0,a.pdf?Fd(ru.h,{"aria-hidden":"true",className:"phi-3x"}):a.ixbrl&&Fd(Dd.h,{"aria-hidden":"true",className:"phi-3x"}),Fd("div",{className:"mt-1"},void 0,I18n.translate(a.ixbrl?"menu.annualreport.draft.ixbrl":"menu.annualreport.draft"))),!a.pdf&&a.ixbrl?Fd("a",{className:"btn icon-button",href:l.u3E,target:"_blank",rel:"noreferrer noopener"},void 0,Fd(ru.h,{"aria-hidden":"true",className:"phi-3x"}),Fd("div",{className:"mt-1"},void 0,I18n.translate("menu.annualreport.draft.pdf"))):null,Fd(ro.Link,{className:"btn icon-button",to:(0,Q.ID)("/finalize/submit")},void 0,Fd(t?Nd:Rd,{"aria-hidden":"true",className:"phi-3x"}),Fd("div",{className:"mt-1"},void 0,I18n.translate("menu.annualreport.finalized")))),a.warnings.length?Fd("div",{className:"well"},void 0,a.warnings.map(function(e,t,n){return Fd("p",{className:"text-gray ".concat(t===n.length-1?"mb-0":""," d-flex")},t,Fd("i",{className:"fa fa-info-circle fa-lg text-primary mr-1",style:{marginTop:3},"aria-hidden":"true"}),e.text)})):null)),Fd("div",{className:"separator mt-0"}),Fd("div",{className:"app-toolbar__report-title"},void 0,Fd("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),Fd("span",{className:"mr-1"},void 0,I18n.translate("menu.annualreport")),Fd("span",{},void 0,I18n.translate("report.miniversion"))),Fd("div",{className:"app-toolbar__report-container"},void 0,Fd("div",{style:{maxHeight:"100%",overflow:"auto"}},void 0,Fd("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("xbrl.PROFITLOSS_GROUP")),Fd("div",{className:"px-2 py-1"},void 0,a.resultLines.map(function(e,t){return Fd(Fn(),{className:"my-1"},"resultLines-".concat(t),Fd(Rn(),{xs:8},void 0,e.text),Fd(Rn(),{xs:4,className:"text-right"},void 0,e.amount))})),Fd("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("xbrl.DISTRIBUTION_GROUP")),Fd("div",{className:"px-2 py-1"},void 0,a.distributionLines.map(function(e,t){return Fd(Fn(),{className:"my-1"},"distributionLines-".concat(t),Fd(Rn(),{xs:8},void 0,e.text),Fd(Rn(),{xs:4,className:"text-right"},void 0,e.amount))})),Fd("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("xbrl.ASSET_GROUP")),Fd("div",{className:"px-2 py-1"},void 0,a.assetLines.map(function(e,t){return Fd(Fn(),{className:"my-1"},"assetLines-".concat(t),Fd(Rn(),{xs:8},void 0,e.text),Fd(Rn(),{xs:4,className:"text-right"},void 0,e.amount))})),Fd("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("xbrl.LIABILITIES_GROUP")),Fd("div",{className:"px-2 py-1"},void 0,a.liabilityLines.map(function(e,t){return Fd(Fn(),{className:"my-1"},"liabilityLines-".concat(t),Fd(Rn(),{xs:8},void 0,e.text),Fd(Rn(),{xs:4,className:"text-right"},void 0,e.amount))})))),this.props.annualReport.lastUpdate?Fd("div",{className:"text-gray my-1 px-2"},void 0,Fd(bu,{start:this.props.annualReport.lastUpdate})):null)}}],r&&zd(n.prototype,r),o&&zd(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(co.b);qd=Yd,Ud="propTypes",Wd={animate:q().bool,paid:q().bool,companyXid:q().number,onNavigate:q().func.isRequired,onHide:q().func,onBack:q().func},(Ud=Vd(Ud))in qd?Object.defineProperty(qd,Ud,{value:Wd,enumerable:!0,configurable:!0,writable:!0}):qd[Ud]=Wd;const Kd=(0,zn.Ng)(function(e){return{paid:e.defaults.isPaid,companyXid:e.companies.currentXid,annualReport:e.annualReport,fiscalYearSpecialIdentifier:e.defaults.fiscalYearSpecialIdentifier,fiscalYearOptions:e.defaults.fiscalYears.map(function(e){return{label:"".concat(e.fromDate," - ").concat(e.toDate),value:e.fiscalYearIdentifier}}),loading:e.defaults.changingFiscalYear}},function(e){return{actions:(0,oo.zH)({fetchAnnualLiveReport:Ed.k,changeFiscalYear:Yo.Aq},e)}})((0,o.y)(Yd));var Gd,Qd=n(47634),Zd=n(45215),Jd=n(72914),ef=n(38212),tf=n(96540);function nf(e){return nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nf(e)}function rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function of(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?rf(Object(n),!0).forEach(function(t){af(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function af(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=nf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nf(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lf(e,t,n,r){Gd||(Gd="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Gd,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function sf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cf(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cf(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const uf=(0,zn.Ng)(function(e){return{companyXid:e.companies.currentXid,bankXid:e.bankCompare.bankXid,bankAccounts:e.defaults.bankAccounts,fiscalYear:e.transactions.fiscalYear}},function(e){return{actions:(0,oo.zH)({setBankCompareBank:br.eD},e)}})(function(e){var t=e.animate,n=e.companyXid,o=e.bankXid,i=e.bankAccounts,l=void 0===i?[]:i,s=e.fiscalYear,c=e.actions,u=sf((0,r.useState)(!1),2),d=u[0],f=u[1],p=sf((0,r.useState)([]),2),m=p[0],v=p[1],h=new j.g;(0,r.useEffect)(function(){return y(),function(){return h.abortAll()}},[]);var y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;e&&s&&(h.abortAll(),f(!0),h.registerRequest((0,hr.PV)({companyXid:n,fiscalYearXid:s,bankAccountXid:e})).then(function(e){v((e.body.bankPostings||[]).map(function(e){return new ef.x(e)})),f(!1)}).catch(function(){return f(!1)}))};return lf(Ku,{animate:t},void 0,lf("div",{className:"report-form"},void 0,lf("div",{className:"container-fluid"},void 0,lf(Zd.X,{value:o,label:"bankcompare.account",options:l.map(function(e){return{text:e.text,value:e.bankAccountXid}}),onChange:function(e){c.setBankCompareBank(+e),y(e)}})),lf("div",{className:"separator my-0"})),d&&lf("div",{className:"text-center"},void 0,lf(qn.A,{className:"mr-1"}),I18n.translate("inbox.loading"))||lf(tf.Fragment,{},void 0,lf("ul",{className:"list-group"},void 0,m.map(function(e){return lf(Jd.A,{as:"li",className:"list-group-item bank-compare-list-item",item:{item:of(of({},e.requestObject),{},{bankaccountxid:o}),type:"bankFile"}},e.id,function(){return lf(tf.Fragment,{},void 0,lf(Qd.h,{className:"inbox-link__handle","aria-hidden":"true"}),lf(ro.Link,{className:"bank-compare-list-item__text",to:(0,Q.ID)("/work/bank-compare?".concat((0,a.HQ)({bank:o,year:s})))},void 0,lf("span",{},void 0,e.bankDate," - ",e.bankText),lf("span",{},void 0,e.bankAmount)))})})),!m.length&&!d&&lf("p",{className:"text-center"},void 0,I18n.translate("popup.bankcompany.empty"))))});function df(e){return{type:Pl.j$,data:e}}var ff,pf=n(95093),mf=n(96540);function vf(e){return vf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vf(e)}function hf(e,t,n,r){ff||(ff="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ff,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function yf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?yf(Object(n),!0).forEach(function(t){xf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Pf(r.key),r)}}function wf(e,t,n){return t=Of(t),function(e,t){if(t&&("object"==vf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Sf()?Reflect.construct(t,n||[],Of(e).constructor):t.apply(e,n))}function Sf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sf=function(){return!!e})()}function kf(){return kf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Of(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},kf.apply(null,arguments)}function Of(e){return Of=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Of(e)}function Nf(e,t){return Nf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nf(e,t)}function xf(e,t,n){return(t=Pf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pf(e){var t=function(e,t){if("object"!=vf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=vf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==vf(t)?t:t+""}var If=[{key:"securityName",dataIndex:"securityName",title:I18n.translate("security")},{key:"valuationDateUltimoAsText",dataIndex:"itemId",title:I18n.translate("valuedate"),width:85}],Af=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),xf(n=wf(this,t,[e]),"methods",{}),xf(n,"inputRefs",{}),n.validators=n.getValidators(),n.styles=n.getStyles(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nf(e,t)}(t,e),function(e,t,n){return t&&gf(e.prototype,t),n&&gf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=kf(Of(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators(),this.styles=this.getStyles()}},{key:"componentDidMount",value:function(){this.setData(this.props),this.load()}},{key:"componentDidUpdate",value:function(e){this.props.checkBalancesReport===e.checkBalancesReport&&this.props.date===e.date&&this.props.depositories===e.depositories||this.setData(this.props),this.load()}},{key:"load",value:function(){var e=this;this.props.checkBalancesReport.loading||this.props.checkBalancesReport.loaded||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport({type:p.We,date:pf(e.props.checkBalancesReport.date,p.D2).format(p.D2),details:e.props.checkBalancesReport.style,depository:e.props.checkBalancesReport.depository})})}},{key:"setData",value:function(e){var t=e.checkBalancesReport,n=e.depositories,r=e.date,o=e.actions,i=null;t.date||(i={date:r||""}),!t.depository&&n.length&&(i=bf(bf({},i),{},{depository:n[0].value})),t.style||(i=bf(bf({},i),{},{style:this.styles[0].value})),i&&o.updateCheckBalancesReport(i)}},{key:"getStyles",value:function(){return[{value:"assetsimpact",label:I18n.translate("parameters.reportstyle.bondassets")}]}},{key:"getValidators",value:function(){var e=this;return{date:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=pf(t,p.D2);return{valid:e.props.fiscalYears.some(function(e){return r.isBetween(pf(e.fromDate,p.D2),pf(e.toDate,p.D2),null,"[]")}
1),message:I18n.translate("work.edit.validate.insideyears")}}],depository:[Mu.A],style:[Mu.A]}}},{key:"validate",value:function(){return Promise.all([this.inputRefs[4].validate(this.props.checkBalancesReport.date),this.inputRefs[6].validate(this.props.checkBalancesReport.style),this.inputRefs[2].validate(this.props.checkBalancesReport.depository)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.We,date:n.props.checkBalancesReport.date,details:n.props.checkBalancesReport.style,depository:n.props.checkBalancesReport.depository,output:e};t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"render",value:function(){var e=this;return hf(Ku,{animate:this.props.animate},void 0,hf("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,hf("div",{className:"container-fluid"},void 0,mf.createElement(Fe.H,{id:"cbr-depository",key:"cbr-depository",label:"parameters.depository",ref:(0,Q.qP)(this.methods,this.inputRefs,2),value:this.props.checkBalancesReport.depository,labelKey:"text",validators:this.validators.depository,options:this.props.depositories,onChange:(0,Q._s)(this.methods,3,function(t){return e.props.actions.updateCheckBalancesReport({depository:t})}),noDeselect:!0}),mf.createElement(Fe.H,{id:"cbr-style",key:"cbr-style",label:"parameters.reportstyle",ref:(0,Q.qP)(this.methods,this.inputRefs,6),value:this.props.checkBalancesReport.style,validators:this.validators.style,options:this.styles,onChange:(0,Q._s)(this.methods,7,function(t){return e.props.actions.updateCheckBalancesReport({style:t})}),noDeselect:!0}),mf.createElement(tu.$,{id:"cbr-date",key:"cbr-date",label:"parameters.date",ref:(0,Q.qP)(this.methods,this.inputRefs,4),value:this.props.checkBalancesReport.date,validators:this.validators.date,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updateCheckBalancesReport({date:t})}),pullRight:!0})),hf("div",{className:"separator"}),hf("div",{className:"container-fluid"},void 0,hf("div",{className:"form-group"},void 0,hf(su,{mode:"PDF",onClick:this.showReport.bind(this)}),hf(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),hf(su,{type:"submit"}),hf(Su,{onClick:this.showReport.bind(this)})))),hf("div",{className:"separator mt-0"}),hf("div",{className:"app-toolbar__report-title"},void 0,hf("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),hf("span",{className:"mr-1"},void 0,I18n.translate("menu.bondinterests")),hf("span",{},void 0,I18n.translate("report.miniversion"))),hf("div",{className:"app-toolbar__report-container"},void 0,hf(_u,{columns:If,data:this.props.checkBalancesReport.liveData})),this.props.checkBalancesReport.lastUpdate?hf("div",{className:"text-gray my-1 px-2"},void 0,hf(bu,{start:this.props.checkBalancesReport.lastUpdate})):null)}}])}(co.b);xf(Af,"propTypes",{depositories:q().arrayOf(q().shape({text:q().string,value:q().string})),fiscalYears:q().array,date:q().string,animate:q().bool}),xf(Af,"defaultProps",{depositories:[],fiscalYears:[],date:""});const Cf=(0,zn.Ng)(function(e){return{checkBalancesReport:e.checkBalancesReport,depositories:e.defaults.depositories,fiscalYears:e.defaults.fiscalYears,date:e.companies.finalize.reportParamFiscalYearEndDate||(0,Fu.H_)(e.defaults.reportParameterDefaults,Fu.mi)}},function(e){return{actions:(0,oo.zH)({updateCheckBalancesReport:df,fetchLiveReport:Kc},e)}})(Af);function jf(e){return{type:Pl.b1,data:e}}var Df,_f=n(95093),Rf=n(96540);function Tf(e){return Tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tf(e)}function Ef(e,t,n,r){Df||(Df="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Df,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Mf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ff(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Mf(Object(n),!0).forEach(function(t){Vf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qf(r.key),r)}}function Bf(e,t,n){return t=$f(t),function(e,t){if(t&&("object"==Tf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hf()?Reflect.construct(t,n||[],$f(e).constructor):t.apply(e,n))}function Hf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hf=function(){return!!e})()}function Lf(){return Lf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=$f(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Lf.apply(null,arguments)}function $f(e){return $f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$f(e)}function Xf(e,t){return Xf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xf(e,t)}function Vf(e,t,n){return(t=qf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qf(e){var t=function(e,t){if("object"!=Tf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Tf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Tf(t)?t:t+""}var Uf=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Vf(n=Bf(this,t,[e]),"state",{}),Vf(n,"methods",{}),Vf(n,"inputRefs",{}),n.validators=n.getValidators(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xf(e,t)}(t,e),function(e,t,n){return t&&zf(e.prototype,t),n&&zf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=Lf($f(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators()}},{key:"componentDidMount",value:function(){this.setData(this.props),!this.props.changesReport.year&&this.props.years.length&&this.props.actions.updateChangesReport({year:this.props.years[0].value})}},{key:"componentDidUpdate",value:function(e){var t=this;this.props.changesReport===e.changesReport&&this.props.fromDate===e.fromDate&&this.props.toDate===e.toDate&&this.props.years===e.years||(!this.props.changesReport.year&&this.props.years.length&&this.props.actions.updateChangesReport({year:this.props.years[0].value}),this.setData(this.props)),this.props.changesReport.loading||this.props.changesReport.loaded||this.validate().then(function(e){return e&&t.props.actions.fetchLiveReport({type:p.af,fromdate:_f(t.props.changesReport.fromDate).format(p.D2),todate:_f(t.props.changesReport.toDate).format(p.D2),year:t.props.changesReport.year})})}},{key:"setData",value:function(e){var t=e.changesReport,n=e.actions,r=e.toDate,o=e.fromDate,i=null;t.fromDate||(i=Ff(Ff({},i),{},{fromDate:o||""})),t.toDate||(i=Ff(Ff({},i),{},{toDate:r||""})),i&&n.updateChangesReport(i)}},{key:"validate",value:function(){return Promise.all([this.inputRefs[2].validate(this.props.changesReport.year),this.inputRefs[4].validate(this.props.changesReport.fromDate),this.inputRefs[6].validate(this.props.changesReport.toDate)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.af,fromdate:n.props.changesReport.fromDate,todate:n.props.changesReport.toDate,year:n.props.changesReport.year,output:e};
1t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"getValidators",value:function(){var e=this;return{account:[Mu.A],year:[Mu.A],fromDate:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=_f(t,p.D2),o=_f(e.props.changesReport.toDate,p.D2);return r.isAfter(o)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:!0}}],toDate:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=_f(t,p.D2),o=_f(e.props.changesReport.fromDate,p.D2);return r.isBefore(o)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:!0}}]}}},{key:"render",value:function(){var e=this;return Ef(Ku,{animate:this.props.animate},void 0,Ef("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,Ef("div",{className:"container-fluid"},void 0,Rf.createElement(Zd.X,{key:"inp",id:"trf-year",label:"parameters.changesyear",value:this.props.changesReport.year,ref:(0,Q._s)(this.methods,2,function(t){e.inputRefs[2]=t}),options:this.props.years,validators:this.validators.year,onChange:(0,Q._s)(this.methods,8,function(t){return e.props.actions.updateChangesReport({year:t})})})),Ef("div",{className:"container-fluid"},void 0,Rf.createElement(tu.$,{id:"changes-fromdate",key:"changes-fromdate",label:"parameters.changesfromdate",className:"mr-2",value:this.props.changesReport.fromDate,ref:(0,Q.qP)(this.methods,this.inputRefs,4),validators:this.validators.fromDate,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updateChangesReport({fromDate:t})}),pullRight:!0}),Rf.createElement(tu.$,{id:"changes-todate",key:"changes-todate",label:"parameters.changestodate",value:this.props.changesReport.toDate,ref:(0,Q.qP)(this.methods,this.inputRefs,6),val
1idators:this.validators.toDate,onChange:(0,Q._s)(this.methods,7,function(t){return e.props.actions.updateChangesReport({toDate:t})}),pullRight:!0})),Ef("div",{className:"separator"}),Ef("div",{className:"container-fluid"},void 0,Ef("div",{className:"form-group"},void 0,Ef(su,{mode:"PDF",onClick:this.showReport.bind(this)}),Ef(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),Ef(su,{type:"submit"}),Ef(Su,{onClick:this.showReport.bind(this)})))))}}])}(co.b);Vf(Uf,"propTypes",{fromDate:q().string,toDate:q().string,fiscalYears:q().array,animate:q().bool}),Vf(Uf,"defaultProps",{fiscalYears:[],fromDate:"",toDate:""});const Wf=(0,zn.Ng)(function(e){return{changesReport:e.changesReport,accounts:e.defaults.groupedFinanceAccounts,fiscalYears:e.defaults.fiscalYears,fromDate:e.companies.finalize.reportParamFiscalYearStartDate||(0,Fu.H_)(e.defaults.reportParameterDefaults,Fu.tw),toDate:e.companies.finalize.reportParamFiscalYearEndDate||(0,Fu.H_)(e.defaults.reportParameterDefaults,Fu.mi),years:e.defaults.fiscalYearReportParams}},function(e){return{actions:(0,oo.zH)({updateChangesReport:jf,fetchLiveReport:Kc},e)}})(Uf);function Yf(e){return Yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yf(e)}var Kf;function Gf(e,t,n,r){Kf||(Kf="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Kf,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Qf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ip(r.key),r)}}function Zf(e,t,n){return t=np(t),function(e,t){if(t&&("object"==Yf(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jf()?Reflect.construct(t,n||[],np(e).constructor):t.apply(e,n))}function Jf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jf=function(){return!!e})()}function ep(e,t,n,r){var o=tp(np(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function tp(){return tp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=np(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},tp.apply(null,arguments)}function np(e){return np=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},np(e)}function rp(e,t){return rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rp(e,t)}function op(e,t,n){return(t=ip(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ip(e){var t=function(e,t){if("object"!=Yf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yf(t)?t:t+""}var ap=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),op(n=Zf(this,t,[e]),"state",{rows:[],reportStyleSelection:""}),op(n,"methods",{}),op(n,"inputRefs",{}),n.styles=[{text:I18n.translate("report.coa.basic"),value:""},{text:I18n.translate("report.coa.depobanks"),value:"depobanks"}],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rp(e,t)}(t,e),function(e,t,n){return t&&Qf(e.prototype,t),n&&Qf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){ep(t,"onLanguageChange",this,3)([]),this.styles=[{text:I18n.translate("report.coa.basic"),value:""},{text:I18n.translate("report.coa.depobanks"),value:"depobanks"}]}},{key:"componentDidMount",value:function(){var e=this;ep(t,"componentDidMount",this,3)([]),this.props.actions.fetchLiveReport({type:p.GG}).then(function(t){var n=t.data.data;if(n&&n.rows){var r=n.rows;e.setState({rows:r})}})}},{key:"getSectionLabel",value:function(e){switch(e){case"results":return I18n.translate("xbrl.PROFITLOSS_GROUP");case"distributions":return I18n.translate("xbrl.DISTRIBUTION_GROUP");case"assets":return I18n.translate("xbrl.ASSET_GROUP");case"liabilities":return I18n.translate("xbrl.LIABILITIES_GROUP");default:return""}}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n={type:p.GG,style:this.state.reportStyleSelection,output:e};t&&(n.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(n)),"_blank")}},{key:"render",value:function(){var e=this,t=[],n=[];return Gf(Ku,{animate:this.props.animate},void 0,Gf("div",{className:"report-form"},void 0,Gf("div",{className:"container-fluid"},void 0,r.createElement(Fe.H,{id:"trf-style",key:"trf-style",label:"parameters.reportstyle",labelKey:"text",ref:(0,Q.qP)(this.methods,this.inputRefs,1),value:this.state.reportStyleSelection,options:this.styles,onChange:(0,Q._s)(this.methods,2,function(t){return e.setState({reportStyleSelection:t})}),noDeselect:!0}),Gf("div",{className:"form-group"},void 0,Gf(su,{mode:"PDF",onClick:this.showReport.bind(this)}),Gf(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),Gf(su,{onClick:this.showReport.bind(this)}),Gf(Su,{onClick:this.showReport.bind(this)})))),Gf("div",{className:"app-toolbar__report-title"},void 0,Gf("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),Gf("span",{className:"mr-1"},void 0,I18n.translate("menu.chartofaccounts")),Gf("span",{},void 0,I18n.translate("report.miniversion"))),Gf("div",{className:"app-toolbar__report-container",style:{overflow:"auto"}},void 0,this.state.rows.map(function(o,i){return Gf(r.Fragment,{},i,!n.includes(o.sectionName)&&n.push(o.sectionName)&&Gf("div",{className:"font-bold text-center",style:{padding:"5px 0"}},void 0,e.getSectionLabel(o.sectionName)),!t.includes(o.groupName)&&t.push(o.groupName)&&Gf("div",{className:"app-toolbar__subtitle"},void 0,o.groupName),Gf("div",{className:"d-flex align-items-center my-1 px-2"},"".concat(i),Gf("div",{className:"flex-shrink-0",style:{width:40}},void 0,o.accountNumber),Gf("div",{className:"flex-grow-1"},void 0,o.accountName),Gf("div",{className:"flex-shrink-0 text-left"},void 0,o.vat)))})))}}])}(co.b);op(ap,"propTypes",{animate:q().bool});const lp=(0,zn.Ng)(null,function(e){return{actions:(0,oo.zH)({fetchLiveReport:Kc},e)}})(ap);var sp,cp=n(95093),up=n(96540);function dp(e){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dp(e)}function fp(e,t,n,r){sp||(sp="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:sp,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?pp(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kp(r.key),r)}}function hp(e,t,n){return t=gp(t),function(e,t){if(t&&("object"==dp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yp()?Reflect.construct(t,n||[],gp(e).constructor):t.apply(e,n))}function yp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yp=function(){return!!e})()}function bp(){return bp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=gp(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},bp.apply(null,arguments)}function gp(e){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gp(e)}function wp(e,t){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wp(e,t)}function Sp(e,t,n){return(t=kp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kp(e){var t=function(e,t){if("object"!=dp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=dp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dp(t)?t:t+""}var Op=[{key:"securityName",dataIndex:"securityName",title:I18n.translate("security")},{key:"valuationDateUltimoAsText",dataIndex:"valuationUltimoDateAsText",title:I18n.translate("valuedate"),width:85},{key:"numberOwnedUltimoAsText",dataIndex:"numberOwnedUltimoAsText",title:I18n.translate("number"),className:"text-right",width:85},{key:"valuationUltimoAsText",dataIndex:"valuationUltimoAsText",title:I18n.translate("value"),className:"text-right",width:85}],Np=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Sp(n=hp(this,t,[e]),"methods",{}),Sp(n,"inputRefs",{}),n.validators=n.getValidators(),n.styles=n.getStyles(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wp(e,t)}(t,e),function(e,t,n){return t&&vp(e.prototype,t),n&&vp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=bp(gp(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators(),this.styles=this.getStyles()}},{key:"componentDidMount",value:function(){this.setData(this.props),this.load()}},{key:"componentDidUpdate",value:function(e){this.props.checkBalancesReport===e.checkBalancesReport&&this.props.date===e.date&&this.props.depositories===e.depositories||this.setData(this.props),this.load()}},{key:"load",value:function(){var e=this;this.props.checkBalancesReport.loading||this.props.checkBalancesReport.loaded||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport({type:p.V8,date:cp(e.props.checkBalancesReport.date,p.D2).format(p.D2),details:e.props.checkBalancesReport.style,depository:e.props.checkBalancesReport.depository})})}},{key:"setData",value:function(e){var t=e.checkBalancesReport,n=e.depositories,r=e.date,o=e.actions,i=null;t.date||(i={date:r||""}),!t.depository&&n.length&&(i=mp(mp({},i),{},{depository:n[0].value})),t.style||(i=mp(mp({},i),{},{style:this.styles[0].value})),i&&o.updateCheckBalancesReport(i)}},{key:"getStyles",value:function(){return[{value:"prices",label:I18n.translate("parameters.reportstyle.checkprices")},{value:"values",label:I18n.translate("parameters.reportstyle.checkvalues")},{value:"securitiestransactions",label:I18n.translate("parameters.reportstyle.securitiestransactions")},{value:"checkbonds",label:I18n.translate("parameters.reportstyle.checkbonds")}]}},{key:"getValidators",value:function(){var e=this;return{date:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=cp(t,p.D2);return{valid:e.props.fiscalYears.some(function(e){return r.isBetween(cp(e.fromDate,p.D2),cp(e.toDate,p.D2),null,"[]")}
1),message:I18n.translate("work.edit.validate.insideyears")}}],depository:[Mu.A],style:[Mu.A]}}},{key:"validate",value:function(){return Promise.all([this.inputRefs[4].validate(this.props.checkBalancesReport.date),this.inputRefs[6].validate(this.props.checkBalancesReport.style),this.inputRefs[2].validate(this.props.checkBalancesReport.depository)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.V8,date:n.props.checkBalancesReport.date,details:n.props.checkBalancesReport.style,depository:n.props.checkBalancesReport.depository,output:e};t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"render",value:function(){var e=this;return fp(Ku,{animate:this.props.animate},void 0,fp("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,fp("div",{className:"container-fluid"},void 0,up.createElement(Fe.H,{id:"cbr-depository",key:"cbr-depository",label:"parameters.depository",ref:(0,Q.qP)(this.methods,this.inputRefs,2),value:this.props.checkBalancesReport.depository,labelKey:"text",validators:this.validators.depository,options:this.props.depositories,onChange:(0,Q._s)(this.methods,3,function(t){return e.props.actions.updateCheckBalancesReport({depository:t})}),noDeselect:!0}),up.createElement(Fe.H,{id:"cbr-style",key:"cbr-style",label:"parameters.reportstyle",ref:(0,Q.qP)(this.methods,this.inputRefs,6),value:this.props.checkBalancesReport.style,validators:this.validators.style,options:this.styles,onChange:(0,Q._s)(this.methods,7,function(t){return e.props.actions.updateCheckBalancesReport({style:t})}),noDeselect:!0}),up.createElement(tu.$,{id:"cbr-date",key:"cbr-date",label:"parameters.date",ref:(0,Q.qP)(this.methods,this.inputRefs,4),value:this.props.checkBalancesReport.date,validators:this.validators.date,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updateCheckBalancesReport({date:t})}),pullRight:!0})),fp("div",{className:"separator"}),fp("div",{className:"container-fluid"},void 0,fp("div",{className:"form-group"},void 0,fp(su,{mode:"PDF",onClick:this.showReport.bind(this)}),fp(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),fp(su,{type:"submit"}),fp(Su,{onClick:this.showReport.bind(this)})))),fp("div",{className:"separator mt-0"}),fp("div",{className:"app-toolbar__report-title"},void 0,fp("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),fp("span",{className:"mr-1"},void 0,I18n.translate("menu.securitiesbalance")),fp("span",{},void 0,I18n.translate("report.miniversion"))),fp("div",{className:"app-toolbar__report-container"},void 0,fp(_u,{columns:Op,data:this.props.checkBalancesReport.liveData})),this.props.checkBalancesReport.lastUpdate?fp("div",{className:"text-gray my-1 px-2"},void 0,fp(bu,{start:this.props.checkBalancesReport.lastUpdate})):null)}}])}(co.b);Sp(Np,"propTypes",{depositories:q().arrayOf(q().shape({text:q().string,value:q().string})),fiscalYears:q().array,date:q().string,animate:q().bool}),Sp(Np,"defaultProps",{depositories:[],fiscalYears:[],date:""});const xp=(0,zn.Ng)(function(e){return{checkBalancesReport:e.checkBalancesReport,depositories:e.defaults.depositories,fiscalYears:e.defaults.fiscalYears,date:e.companies.finalize.reportParamFiscalYearEndDate||(0,Fu.H_)(e.defaults.reportParameterDefaults,Fu.mi)}},function(e){return{actions:(0,oo.zH)({updateCheckBalancesReport:df,fetchLiveReport:Kc},e)}})(Np);var Pp,Ip=n(99247),Ap=n(81358),Cp=n(88613);function jp(e,t,n,r){Pp||(Pp="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Pp,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Dp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_p(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Rp=(0,zn.Ng)(function(e){return{companyXid:e.companies.currentXid}},function(e){return{actions:(0,oo.zH)({fetchVerificationReport:Ip.Q},e)}})((0,o.y)(function(e){var t=e.animate,n=e.companyXid,o=e.actions,i=e.companyTypeIsSinglePersonOrIS,a=void 0!==i&&i,s=Dp((0,r.useState)([]),2),c=s[0],u=s[1];(0,r.useEffect)(function(){d()},[]);var d=function(){return o.fetchVerificationReport(n).then(function(e){var t=e.data;return u(t.primoAmounts||[])})};return jp(Ku,{animate:t},void 0,jp("div",{className:"px-2 mt-2"}),jp("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("verification.checknotes.accounts")),jp("div",{className:"px-2 mt-2 text-center"},void 0,jp("p",{className:"text-left"},void 0,I18n.translate("verification.checknotes.how"))),jp("a",{className:"btn btn-link",href:"".concat(l.Vy5,"?type=checknotes&output=PDF"),target:"_blank",rel:"noreferrer noopener"},void 0,jp("div",{"aria-hidden":"true",className:"d-inline-block mr-1",style:{verticalAlign:"middle"}},void 0,jp(Ap.A,{})),I18n.translate("verification.checknotes.accounts")),c.map(function(e,t){return jp(Cp.Z,{primoVal:e},t)}),!a&&jp(r.Fragment,{},void 0,jp("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("verification.other")),jp("a",{className:"btn btn-link",href:"".concat(l.gQ_,"&output=PDF"),target:"_blank",rel:"noreferrer noopener"},void 0,jp("div",{"aria-hidden":"true",className:"d-inline-block mr-1",style:{verticalAlign:"middle"}},void 0,jp(Ap.A,{})),I18n.translate("menu.annualreport.checkguide"))))}));var Tp=n(6045),Ep=n(38838);function Mp(e){return Mp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mp(e)}function Fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bp(r.key),r)}}function zp(e,t,n){return(t=Bp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bp(e){var t=function(e,t){if("object"!=Mp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mp(t)?t:t+""}var Hp,Lp=function(){return function(e,t,n){return t&&Fp(e.prototype,t),n&&Fp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zp(this,"_messageId",null),zp(this,"_dateTime",null),zp(this,"_title",null),zp(this,"_content",null),zp(this,"_from",null),zp(this,"_fromMe",!1),zp(this,"_markDownFormat",!1),zp(this,"_markRead",null),t){var n=t instanceof e;(n||t.hasOwnProperty("messageId"))&&(this.messageId=t.messageId),(n||t.hasOwnProperty("dateTime"))&&(this.dateTime=t.dateTime),(n||t.hasOwnProperty("title"))&&(this.title=t.title),(n||t.hasOwnProperty("content"))&&(this.content=t.content),(n||t.hasOwnProperty("from"))&&(this.from=t.from),(n||t.hasOwnProperty("markRead"))&&(this.markRead=t.markRead),(n||t.hasOwnProperty("fromMe"))&&(this.fromMe=t.fromMe),(n||t.hasOwnProperty("markDownFormat"))&&(this.markDownFormat=t.markDownFormat)}},[{key:"messageId",get:function(){return this._messageId},set:function(e){this._messageId=e}},{key:"dateTime",get:function(){return this._dateTime},set:function(e){this._dateTime=e}},{key:"title",get:function(){return this._title},set:function(e){this._title=e}},{key:"content",get:function(){return this._content},set:function(e){this._content=e}},{key:"from",get:function(){return this._from},set:function(e){this._from=e}},{key:"markRead",get:function(){return this._markRead},set:function(e){this._markRead=e}},{key:"fromMe",get:function(){return this._fromMe},set:function(e){this._fromMe=e}},{key:"markDownFormat",get:function(){return this._markDownFormat},set:function(e){this._markDownFormat=e}}])}(),$p=n(96540);function Xp(e,t,n,r){Hp||(Hp="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Hp,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Vp,qp=(0,r.forwardRef)(function(e,t){var n=e.messages,o=void 0===n?[]:n,i=e.note,a=e.waiting,l=void 0!==a&&a,s=e.moreWaiting,c=void 0!==s&&s,u=e.finished,d=void 0!==u&&u,f=e.loading,p=void 0!==f&&f,m=(0,r.useRef)(null),v=function(){m.current&&m.current.scrollTo(0,m.current.scrollHeight)};return(0,r.useImperativeHandle)(t,function(){return{scrollToBottom:v}}),$p.createElement("div",{className:"chat-messages-box",ref:m},o.map(function(e){return Xp("div",{className:"message-container ".concat(e.fromMe?"message-mine":"")},e.messageId,Xp("div",{className:"message-date"},void 0,e.dateTime),Xp("div",{className:"message"},void 0,e.content.split(/(\r\n|\r|\n)/).map(function(t,n){return Xp("p",{},"".concat(e.messageId,"-").concat(n),t)})))}),d&&Xp("div",{className:"message-container"},void 0,Xp("div",{className:"message"},void 0,I18n.translate("assist.chat.finished")))||p&&Xp("div",{className:"message-container"},void 0,Xp("div",{className:"message"},void 0,I18n.translate("assist.chat.loading")))||l&&Xp("div",{className:"message-container"},void 0,Xp("div",{className:"message"},void 0,i||I18n.translate("assist.chat.wait1")))||c&&Xp("div",{className:"message-container"},void 0,Xp("div",{className:"message"},void 0,i||I18n.translate("assist.chat.wait2")))||null)}),Up=n(96540);function Wp(e){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wp(e)}function Yp(e,t,n,r){Vp||(Vp="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Vp,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Kp(e){return function(e){if(Array.isArray(e))return Gp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Gp(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gp(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rm(r.key),r)}}function Zp(e,t,n){return t=em(t),function(e,t){if(t&&("object"==Wp(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Jp()?Reflect.construct(t,n||[],em(e).constructor):t.apply(e,n))}function Jp(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jp=function(){return!!e})()}function em(e){return em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},em(e)}function tm(e,t){return tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tm(e,t)}function nm(e,t,n){return(t=rm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rm(e){var t=function(e,t){if("object"!=Wp(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Wp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wp(t)?t:t+""}var om=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return nm(e=Zp(this,t,[].concat(r)),"state",{recipient:null,message:"",waitingText:"",recipients:[],messages:[],loading:!0,finished:!1,waiting:!1,showWarning:!1,moreWaiting:!1}),nm(e,"requestHelper",new j.g),nm(e,"list",null),nm(e,"methods",{}),nm(e,"timer",null),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tm(e,t)}(t,e),function(e,t,n){return t&&Qp(e.prototype,t),n&&Qp(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){var e=this;this.requestHelper.registerRequest((0,Tp.J7)()).then(function(t){return new Promise(function(n){return e.setState({recipients:t.body.recipientOptions.map(function(e){return{label:e,value:e}}),recipient:t.body.recipientOptions[0]},n)})}).then(function(){return e.loadMessages()}),this.updateHandler=this.loadMessages.bind(this),window.addEventListener(p.fe,this.updateHandler)}},{key:"componentWillUnmount",value:function(){window.removeEventListener(p.fe,this.updateHandler)}},{key:"loadMessages",value:function(){var e=this;this.requestHelper.abort("1"),this.state.recipient&&this.requestHelper.registerRequest((0,Tp.T$)(this.state.recipient),"1").then(function(t){var n=t.body.messages.map(function(e){return new Lp(e)}),r=n.length?n[n.length-1]:null,o=!0;r&&!r.fromMe&&(clearTimeout(e.timer),o=!1),e.setState({messages:n,waitingText:o?e.state.waitingText:"",waiting:e.state.waiting&&o,moreWaiting:e.state.moreWaiting&&o,loading:!1},function(){return e.list.scrollToBottom()})})}},{key:"handleRecipientChange",value:function(e){var t=this;this.setState({recipient:e&&e.value||null,messages:[],finished:!1,loading:!!e},function(){return t.loadMessages()})}},{key:"sendMessage",value:function(){var e=this,t=this.state,n=t.message,r=t.messages,o=t.recipient,i=this.props.companyXid,a=r.length?r[r.length-1].messageId:null;clearTimeout(this.timer),this.setState({finished:!1,loading:!0,message:"",messages:[].concat(Kp(r),[new Lp({messageId:"".concat(Math.random(),"-").concat(Date.now()),fromMe:!0,content:this.state.message})])},function(){return e.list.scrollToBottom()});var l={body:n,recipient:o,inResponseTo:a};null!=i&&(l.companyXid=i),this.requestHelper.registerRequest((0,Tp._z)(l)).then(function(t){var n=!t.body.chatIsClosed;clearTimeout(e.timer),e.setState({waiting:!0,waitingText:t.body.messageDk}),e.timer=setTimeout(function(){e.setState({waiting:!1,moreWaiting:!0}),e.timer=setTimeout(function(){e.setState({moreWaiting:!1,showWarning:n})},3e4)},3e4)}).then(function(){return e.loadMessages()})}},{key:"render",value:function(){var e=this,t=(0,Q._s)(this.methods,6,function(){return e.setState({showWarning:!1})});return Yp("div",{className:"chat"},void 0,Yp("p",{className:"chat-head"},void 0,Yp("span",{className:"mr-1"},void 0,I18n.translate("assist.chat.header")),this.state.recipients.length>1?Yp(Ep.l,{value:this.state.recipient,options:this.state.recipients,onChange:(0,Q._s)(this.methods,1,this.handleRecipientChange.bind(this))},"select"):"(".concat(this.state.recipient,")")),Up.createElement(qp,{key:"chat-box",messages:this.state.messages,ref:(0,Q._s)(this.methods,5,function(t){e.list=t}),loading:this.state.loading,finished:this.state.finished,note:this.state.waitingText,waiting:this.state.waiting,moreWaiting:this.state.moreWaiting}),Yp("div",{className:"chat-actions"},void 0,Yp("textarea",{className:"form-control",value:this.state.message,onChange:(0,Q._s)(this.methods,2,function(t){return e.setState({message:t.target.value})})}),Yp("button",{className:"btn btn-primary",disabled:!this.state.message.trim().length,onClick:(0,Q._s)(this.methods,3,this.sendMessage.bind(this))},void 0,"Send")),Yp(gn.A,{show:this.state.showWarning,title:I18n.translate("assist.chat.nosupport.title"),submitBtnText:I18n.translate("ok"),noCancelBtn:!0,onSubmit:t,onHide:t},void 0,I18n.translate("assist.chat.nosupport.msg",this.props.username)))}}])}(co.b);nm(om,"propTypes",{username:q().string,hasCompany:q().bool,companyXid:q().string}),nm(om,"defaultProps",{hasCompany:!1});const im=(0,zn.Ng)(function(e){return{username:e.currentUser.user.userName,hasCompany:!!e.companies.current,companyXid:e.companies.currentXid}})(om);var am,lm=n(95093),sm=n(96540);function cm(e,t,n,r){am||(am="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:am,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function um(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return dm(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var fm,pm={phone:[Mu.A],date:[(0,Eu.A)({required:!0})],timeFrom:[(0,Eu.A)({required:!0,format:p.Bp,emptyMessage:I18n.translate("work.edit.validate.required"),formatMessage:I18n.translate("work.edit.validate.timeformat")})],timeTo:[(0,Eu.A)({required:!0,format:p.Bp,emptyMessage:I18n.translate("work.edit.validate.required"),formatMessage:I18n.translate("work.edit.validate.timeformat")})]},mm=function(){var e=um((0,r.useState)(""),2),t=e[0],n=e[1],o=um((0,r.useState)(lm().format(p.D2)),2),i=o[0],a=o[1],l=um((0,r.useState)(""),2),s=l[0],c=l[1],u=um((0,r.useState)(""),2),d=u[0],f=u[1],m=um((0,r.useState)(!1),2),v=m[0],h=m[1],y=um((0,r.useState)(!1),2),b=y[0],g=y[1],w=um((0,r.useState)(!1),2),S=w[0],k=w[1],O=new j.g,N=(0,r.useRef)(null),x=(0,r.useRef)(null),P=(0,r.useRef)(null),I=(0,r.useRef)(null),A=function(){return Promise.all([N.current.validate(t),x.current.validate(i),P.current.validate(s),I.current.validate(d)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})};return cm("form",{className:"px-2",onSubmit:function(e){e.preventDefault(),A().then(function(e){e&&(h(!0),g(!1),k(!1),O.registerRequest((0,Tp.yh)({desiredDate:i,desiredTimeFrom:s,desiredTimeTo:d,phoneNumber:t})).then(function(e){h(!1),g(e.body.failed),k(e.body.registered)}).catch(function(){h(!1),g(!0)}))})}},void 0,b&&cm("p",{className:"text-danger"},void 0,I18n.translate("assist.callme.failed"))||null,cm("div",{className:"d-inline-block mr-1",style:{width:130,verticalAlign:"top"}},void 0,sm.createElement(je.x,{key:"number",label:"assist.callme.number",value:t,validators:pm.phone,disabled:v,ref:N,onChange:n})),cm("div",{className:"d-inline-block mr-1",style:{width:140,verticalAlign:"top"}},void 0,sm.createElement(tu.$,{key:"date",label:"assist.callme.when.date",className:"mr-1",value:i,validators:pm.date,disabled:v,pullRight:!0,ref:x,onChange:a})),cm("div",{className:"time-picker d-inline-block"},void 0,cm("label",{className:"control-label"},void 0,I18n.translate("assist.callme.when.time")),cm("div",{},void 0,cm("div",{className:"d-inline-block mr-1",style:{width:70,verticalAlign:"top"}},void 0,sm.createElement(tu.$,{key:"time-from",value:s,validators:pm.timeFrom,disabled:v,dateFormat:p.Bp,noCalendar:!0,ref:P,onChange:c})),cm("div",{className:"d-inline-block",style:{width:70,verticalAlign:"top"}},void 0,sm.createElement(tu.$,{key:"time-to",value:d,validators:pm.timeTo,disabled:v,dateFormat:p.Bp,noCalendar:!0,ref:I,onChange:f})))),cm("div",{className:"form-group"},void 0,cm("button",{className:"btn btn-primary",disabled:v},void 0,v&&cm(qn.A,{className:"mr-1"}),I18n.translate("assist.callme.submit"))),cm(gn.A,{title:I18n.translate("assist.callme.confirm.title"),show:S,submitBtnText:"Ok",onSubmit:function(){},onHide:function(){},noCancelBtn:!0},void 0,I18n.translate("assist.callme.confirm.body")))};function vm(e,t,n,r){fm||(fm="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:fm,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const hm=function(e){var t=e.animate;return vm(Ku,{animate:t},void 0,vm("p",{className:"app-toolbar__subtitle"},void 0,I18n.translate("assist.callme.header")),vm(mm,{}),vm(im,{}))};function ym(e){return{type:Pl._d,data:e}}var bm;function gm(e,t,n,r){bm||(bm="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:bm,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var wm={toDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);return!!t.valid||t},Mu.A]};const Sm=(0,zn.Ng)(function(e){var t=e.defaults.reportParameterDefaults;return{toDate:e.creditorStatementReport.toDate||(0,Fu.H_)(t,Fu.cO)||Xc()().format(p.D2),liveData:e.creditorStatementReport.liveData,loading:e.creditorStatementReport.loading,loaded:e.creditorStatementReport.loaded}},function(e){return{actions:(0,oo.zH)({updateCreditorStatementReport:ym,fetchLiveReport:Kc},e)}})(function(e){var t=e.animate,n=e.actions,o=e.toDate,i=e.liveData,s=e.loading,c=e.loaded,u=(0,r.useRef)(null),d=(0,r.useCallback)(function(){!u.current||s||c||u.current.validate(o).then(function(e){e.every(function(e){return e.valid})&&n.fetchLiveReport({type:p.BA,todate:Xc()(o,p.D2).format(p.D2)})})},[o,s,c]);(0,r.useEffect)(function(){return window.addEventListener(p.c_,d),function(){return window.removeEventListener(p.c_,d)}},[d]),(0,r.useEffect)(function(){d()},[d]);var f=i||[],m=function(e,t){var n={type:p.BA,todate:Xc()(o,p.D2).format(p.D2),output:e};t&&(n.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(n)),"_blank")};return gm(Ku,{animate:t},void 0,gm("form",{className:"report-form"},void 0,gm("div",{className:"container-fluid"},void 0,r.createElement(tu.$,{id:"debitor-todate",key:"debitor-todate",label:"parameters.todate",value:o,ref:u,validators:wm.toDate,pullRight:!0,onChange:function(e){return n.updateCreditorStatementReport({toDate:e})}})),gm("div",{className:"separator"}),gm("div",{className:"container-fluid"},void 0,gm("div",{className:"form-group"},void 0,gm(su,{mode:"PDF",onClick:m}),gm(su,{mode:"EXCEL",onClick:m}),gm(su,{onClick:m}),gm(Su,{onClick:m}
1)))),gm("div",{className:"separator mt-0"}),gm("div",{className:"app-toolbar__report-title"},void 0,gm("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),gm("span",{className:"mr-1"},void 0,I18n.translate("menu.creditorstatement")),gm("span",{},void 0,I18n.translate("report.miniversion"))),gm("div",{className:"rc-table-header d-flex align-items-center"},void 0,gm("div",{className:"rc-table-cell flex-grow-1 flex-shrink-1 pl-2 pr-1"},void 0,I18n.translate("creditorstatement.supplier")),gm("div",{className:"rc-table-cell text-right flex-shrink-0 px-1"},void 0,I18n.translate("debitorstatement.balance"))),gm("div",{className:"app-toolbar__report-container",style:{overflow:"auto"}},void 0,f.map(function(e){var t=e.balanceAsText,n=e.supplierName;return gm(r.Fragment,{},n+t,gm("div",{className:"d-flex align-items-center my-1 px-2"},void 0,gm("div",{className:"flex-grow-1"},void 0,n),gm("div",{className:"flex-shrink-0 text-left"},void 0,t)))})))});function km(e){return{type:Pl.Pp,data:e}}var Om,Nm=n(96540);function xm(e){return xm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xm(e)}function Pm(e,t,n,r){Om||(Om="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Om,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Im(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Am(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Im(Object(n),!0).forEach(function(t){Em(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Im(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Cm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mm(r.key),r)}}function jm(e,t,n){return t=Rm(t),function(e,t){if(t&&("object"==xm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dm()?Reflect.construct(t,n||[],Rm(e).constructor):t.apply(e,n))}function Dm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dm=function(){return!!e})()}function _m(){return _m="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rm(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},_m.apply(null,arguments)}function Rm(e){return Rm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rm(e)}function Tm(e,t){return Tm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tm(e,t)}function Em(e,t,n){return(t=Mm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mm(e){var t=function(e,t){if("object"!=xm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xm(t)?t:t+""}var Fm=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Em(n=jm(this,t,[e]),"methods",{}),Em(n,"inputRefs",{}),n.validators=n.getValidators(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tm(e,t)}(t,e),function(e,t,n){return t&&Cm(e.prototype,t),n&&Cm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=_m(Rm(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators()}},{key:"componentDidMount",value:function(){this.setData(this.props)}},{key:"componentDidUpdate",value:function(){var e=this;this.props.currencyReport.loading||this.props.currencyReport.loaded||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport({type:p.Ks,depository:e.props.currencyReport.depository,currency:e.props.currencyReport.currency,year:e.props.currencyReport.year})})}},{key:"setData",value:function(e){var t=e.currencyReport,n=e.depositories,r=e.years,o=e.currencies,i=e.actions,a=null;!t.depository&&n.length&&(a={depository:n[0].value}),!t.currency&&o.length&&(a=Am(Am({},a),{},{currency:o[0].value})),!t.year&&r.length&&(a=Am(Am({},a),{},{year:r[0].value})),a&&i.updateCurrencyReport(a)}},{key:"validate",value:function(){return Promise.all([this.inputRefs[4].validate(this.props.currencyReport.depository),this.inputRefs[6].validate(this.props.currencyReport.currency),this.inputRefs[2].validate(this.props.currencyReport.year)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.Ks,depository:n.props.currencyReport.depository,currency:n.props.currencyReport.currency,year:n.props.currencyReport.year,output:e};
1t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"getValidators",value:function(){return{depository:[Mu.A],currency:[Mu.A],year:[Mu.A]}}},{key:"render",value:function(){var e=this;return Pm(Ku,{animate:this.props.animate},void 0,Pm("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,Pm("div",{className:"container-fluid"},void 0,Nm.createElement(Fe.H,{id:"currency-report-year",key:"currency-report-year",label:"parameters.year",labelKey:"text",value:this.props.currencyReport.year,ref:(0,Q.qP)(this.methods,this.inputRefs,2),options:this.props.years,validators:this.validators.year,onChange:(0,Q._s)(this.methods,3,function(t){return e.props.actions.updateCurrencyReport({year:t})}),noDeselect:!0}),Pm(Fn(),{},void 0,Pm(Rn(),{xs:6},void 0,Nm.createElement(Fe.H,{id:"currency-report-depository",key:"currency-report-depository",label:"parameters.depository",labelKey:"text",value:this.props.currencyReport.depository,ref:(0,Q.qP)(this.methods,this.inputRefs,4),options:this.props.depositories,validators:this.validators.depository,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updateCurrencyReport({depository:t})}),noDeselect:!0})),Pm(Rn(),{xs:6},void 0,Nm.createElement(Fe.H,{id:"currency-report-currency",key:"currency-report-currency",label:"parameters.currency",labelKey:"text",value:this.props.currencyReport.currency,ref:(0,Q.qP)(this.methods,this.inputRefs,6),options:this.props.currencies,validators:this.validators.year,onChange:(0,Q._s)(this.methods,7,function(t){return e.props.actions.updateCurrencyReport({currency:t})}),noDeselect:!0})))),Pm("div",{className:"separator"}),Pm("div",{className:"container-fluid"},void 0,Pm("div",{className:"form-group"},void 0,Pm(su,{mode:"PDF",onClick:this.showReport.bind(this)}),Pm(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),Pm(su,{type:"submit"}),Pm(Su,{onClick:this.showReport.bind(this)})))))}}])}(co.b);Em(Fm,"propTypes",{depositories:q().arrayOf(q().shape({text:q().string,value:q().string})),currencies:q().arrayOf(q().shape({text:q().string,value:q().string})),years:q().arrayOf(q().shape({text:q().string,value:q().string})),animate:q().bool}),Em(Fm,"defaultProps",{depositories:[],currencies:[],years:[]});const zm=(0,zn.Ng)(function(e){return{currencyReport:e.currencyReport,years:e.defaults.fiscalYearReportParams,depositories:e.defaults.depositories,currencies:e.defaults.currencies}},function(e){return{actions:(0,oo.zH)({updateCurrencyReport:km,fetchLiveReport:Kc},e)}})(Fm);function Bm(e){return{type:Pl.xq,data:e}}var Hm,Lm;function $m(e,t,n,r){Hm||(Hm="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Hm,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Xm(e){var t=e.toDate,n=e.onToDateChange,o=e.toDateRef,i=e.validators,a=e.onDownloadCallbackFunction;return $m("form",{className:"report-form"},void 0,$m("div",{className:"container-fluid"},void 0,r.createElement(tu.$,{id:"debitor-todate",key:"debitor-todate",label:"parameters.todate",value:t,ref:o,validators:i,pullRight:!0,onChange:n})),$m("div",{className:"separator"}),$m("div",{className:"container-fluid"},void 0,$m("div",{className:"form-group"},void 0,$m(su,{mode:"PDF",onClick:a}),$m(su,{mode:"EXCEL",onClick:a}),$m(su,{onClick:a}),$m(Su,{onClick:a}))))}function Vm(e,t,n,r){Lm||(Lm="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Lm,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var qm={toDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);return!!t.valid||t},Mu.A]};const Um=(0,zn.Ng)(function(e){var t=e.defaults.reportParameterDefaults;return{toDate:e.debitorStatementReport.toDate||(0,Fu.H_)(t,Fu.V$)||Xc()().format(p.D2),liveData:e.debitorStatementReport.liveData,loading:e.debitorStatementReport.loading,loaded:e.debitorStatementReport.loaded}},function(e){return{actions:(0,oo.zH)({updateDebitorStatementReport:Bm,fetchLiveReport:Kc},e)}})(function(e){var t=e.animate,n=e.actions,o=e.toDate,i=e.liveData,s=e.loading,c=e.loaded,u=(0,r.useRef)(null),d=(0,r.useCallback)(function(){!u.current||s||c||u.current.validate(o).then(function(e){e.every(function(e){return e.valid})&&n.fetchLiveReport({type:p.Oe,todate:Xc()(o,p.D2).format(p.D2)})})},[o,s,c]);(0,r.useEffect)(function(){return window.addEventListener(p.c_,d),function(){return window.removeEventListener(p.c_,d)}},[d]),(0,r.useEffect)(function(){d()},[d]);var f=i||[];return Vm(Ku,{animate:t},void 0,Vm(Xm,{toDate:o,onToDateChange:function(e){return n.updateDebitorStatementReport({toDate:e})},toDateRef:u,validators:qm.toDate,onDownloadCallbackFunction:function(e,t){var n={type:p.Oe,todate:Xc()(o,p.D2).format(p.D2),output:e};t&&(n.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(n)),"_blank")}}
1),Vm("div",{className:"separator mt-0"}),Vm("div",{className:"app-toolbar__report-title"},void 0,Vm("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),Vm("span",{className:"mr-1"},void 0,I18n.translate("menu.debitorstatement")),Vm("span",{},void 0,I18n.translate("report.miniversion"))),Vm("div",{className:"rc-table-header d-flex align-items-center"},void 0,Vm("div",{className:"rc-table-cell flex-grow-1 flex-shrink-1 pl-2 pr-1"},void 0,I18n.translate("debitorstatement.customer")),Vm("div",{className:"rc-table-cell text-right flex-shrink-0 px-1"},void 0,I18n.translate("debitorstatement.balance"))),Vm("div",{className:"app-toolbar__report-container",style:{overflow:"auto"}},void 0,f.map(function(e){var t=e.balanceAsText,n=e.customerName;return Vm(r.Fragment,{},n+t,Vm("div",{className:"d-flex align-items-center my-1 px-2"},void 0,Vm("div",{className:"flex-grow-1"},void 0,n),Vm("div",{className:"flex-shrink-0 text-left"},void 0,t)))})))});var Wm,Ym,Km,Gm;function Qm(){return Qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qm.apply(null,arguments)}function Zm(e){return r.createElement("svg",Qm({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),Wm||(Wm=r.createElement("path",{fill:"#c3d4df",d:"M2.783 16A2.783 2.783 0 000 18.783v6.957a2.782 2.782 0 002.554 2.773l-1.163 3.488 5.217-3.478h12.87a2.783 2.783 0 002.783-2.783v-6.957A2.783 2.783 0 0019.478 16H2.782z"})),Ym||(Ym=r.createElement("path",{fill:"#bcceda",d:"M3.494 27.891l-.802 2.405 3.706-2.47h13.08a2.087 2.087 0 002.087-2.087v-6.957a2.087 2.087 0 00-2.087-2.087H2.782a2.087 2.087 0 00-2.087 2.087v6.957c0 1.094.843 1.993 1.915 2.08l.884.072zM1.391 32l1.163-3.488A2.783 2.783 0 010 25.739v-6.957a2.783 2.783 0 012.783-2.783h16.696a2.783 2.783 0 012.783 2.783v6.957a2.783 2.783 0 01-2.783 2.783H6.609L1.392 32z"})),Km||(Km=r.createElement("path",{fill:"#1d9ef6",d:"M12.522 0a2.783 2.783 0 00-2.783 2.783V9.74a2.783 2.783 0 002.783 2.783h12.87l5.217 3.478-1.163-3.488A2.783 2.783 0 0032 9.74V2.783A2.783 2.783 0 0029.217 0H12.521z"})),Gm||(Gm=r.createElement("path",{fill:"#1a96ea",d:"M25.602 11.826l3.706 2.47-.802-2.405.884-.072a2.087 2.087 0 001.915-2.08V2.782A2.087 2.087 0 0029.218.695H12.522a2.087 2.087 0 00-2.087 2.087v6.957c0 1.153.934 2.087 2.087 2.087h13.08zM30.609 16l-5.217-3.478h-12.87a2.783 2.783 0 01-2.783-2.783V2.782a2.783 2.783 0 012.783-2.783h16.696a2.783 2.783 0 012.783 2.783v6.957a2.783 2.783 0 01-2.554 2.773L30.61 16z"})))}n.p;var Jm,ev,tv;function nv(){return nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nv.apply(null,arguments)}function rv(e){return r.createElement("svg",nv({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),Jm||(Jm=r.createElement("path",{fill:"#52abf1",d:"M1.6 0h9.6a1.6 1.6 0 011.6 1.6v9.6a1.6 1.6 0 01-1.6 1.6H1.6A1.6 1.6 0 010 11.2V1.6A1.6 1.6 0 011.6 0z"})),ev||(ev=r.createElement("path",{fill:"#ddd",d:"M20.8 0h9.6A1.6 1.6 0 0132 1.6v9.6a1.6 1.6 0 01-1.6 1.6h-9.6a1.6 1.6 0 01-1.6-1.6V1.6A1.6 1.6 0 0120.8 0zM20.8 19.2h9.6a1.6 1.6 0 011.6 1.6v9.6a1.6 1.6 0 01-1.6 1.6h-9.6a1.6 1.6 0 01-1.6-1.6v-9.6a1.6 1.6 0 011.6-1.6zM1.6 19.2h9.6a1.6 1.6 0 011.6 1.6v9.6a1.6 1.6 0 01-1.6 1.6H1.6A1.6 1.6 0 010 30.4v-9.6a1.6 1.6 0 011.6-1.6z"})),tv||(tv=r.createElement("path",{fill:"#f5f6f7",d:"M10.166 3.434a.8.8 0 010 1.131l-4.8 4.8a.8.8 0 01-1.131 0l-1.6-1.6a.8.8 0 011.131-1.131L4.8 7.668l4.234-4.234a.8.8 0 011.131 0z"})))}n.p;var ov,iv,av,lv;function sv(){return sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sv.apply(null,arguments)}function cv(e){return r.createElement("svg",sv({width:"1em",height:"1em",viewBox:"0 0 44 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),ov||(ov=r.createElement("path",{d:"M0 6h34v40a2 2 0 01-2 2H2a2 2 0 01-2-2V6z",f
vendor: 8,502 bytes, line 1
1ill:"#EAEAEA"})),iv||(iv=r.createElement("path",{d:"M6 19a1 1 0 100 2h10a1 1 0 100-2H6zM6 29a1 1 0 100 2h10a1 1 0 100-2H6zM5 25a1 1 0 011-1h6a1 1 0 110 2H6a1 1 0 01-1-1zM25 24a1 1 0 100 2h3a1 1 0 100-2h-3zM5 35a1 1 0 011-1h6a1 1 0 110 2H6a1 1 0 01-1-1zM25 34a1 1 0 100 2h3a1 1 0 100-2h-3z",fill:"#7295A9"})),av||(av=r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.5 0h1v1.9h2v.95h-2v1.454c1.141.132 2 .707 2 1.396 0 .584-.617 1.087-1.5 1.306v.53A3.981 3.981 0 0137 7c1.022 0 1.955.383 2.662 1.014A4 4 0 0141 15.874V17H27v-1.126a4.002 4.002 0 011.338-7.86A3.985 3.985 0 0131 7c.729 0 1.412.195 2 .535v-.529c-.883-.22-1.5-.722-1.5-1.306 0-.69.859-1.264 2-1.396V2.85h-2V1.9h2V0zM31 13.311V15h2v-4a2 2 0 10-2.998 1.734l.998.577zM35 15h2v-1.689l.998-.577A2 2 0 1035 11v4zm5-1c-.11 0-.22-.009-.325-.026a3.99 3.99 0 001.25-3.748A2 2 0 0140 14zm-12.925-3.774a2 2 0 001.25 3.748 3.99 3.99 0 01-1.25-3.748z",fill:"#286081"})),lv||(lv=r.createElement("path",{d:"M41 18H27v2h14v-2z",fill:"#286081"})))}n.p;var uv,dv,fv,pv;function mv(){return mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mv.apply(null,arguments)}function vv(e){return r.createElement("svg",mv({width:"1em",height:"1em",viewBox:"0 0 44 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),uv||(uv=r.createElement("path",{d:"M0 6h34v40a2 2 0 01-2 2H2a2 2 0 01-2-2V6z",fill:"#EAEAEA"})),dv||(dv=r.createElement("path",{d:"M5 20a1 1 0 011-1h10a1 1 0 110 2H6a1 1 0 01-1-1zM5 30a1 1 0 011-1h10a1 1 0 110 2H6a1 1 0 01-1-1zM25 19a1 1 0 100 2h3a1 1 0 100-2h-3zM5 25a1 1 0 011-1h6a1 1 0 110 2H6a1 1 0 01-1-1zM25 24a1 1 0 100 2h3a1 1 0 100-2h-3zM5 35a1 1 0 011-1h6a1 1 0 110 2H6a1 1 0 01-1-1zM25 34a1 1 0 100 2h3a1 1 0 100-2h-3z",fill:"#7295A9"})),fv||(fv=r.createElement("rect",{x:20,width:24,height:12,rx:2,fill:"#286081"})),pv||(pv=r.createElement("path",{d:"M27.21 9h-4.386v-.87l2.07-2.206c.284-.31.494-.582.629-.813.137-.232.206-.451.206-.66 0-.284-.072-.506-.215-.667-.144-.164-.349-.246-.616-.246-.287 0-.514.1-.68.298-.165.197-.247.456-.247.778h-1.274c0-.39.092-.745.277-1.068.187-.322.45-.574.79-.755.34-.185.726-.277 1.156-.277.66 0 1.17.158 1.534.474.366.317.55.763.55 1.34 0 .317-.083.64-.247.967-.164.329-.445.71-.843 1.147l-1.455 1.534h2.751V9zM32.378 9h-4.386v-.87l2.07-2.206c.284-.31.494-.582.628-.813.138-.232.207-.451.207-.66 0-.284-.072-.506-.215-.667-.144-.164-.349-.246-.616-.246-.287 0-.514.1-.68.298-.165.197-.247.456-.247.778h-1.274c0-.39.092-.745.277-1.068.187-.322.45-.574.79-.755.34-.185.726-.277 1.156-.277.66 0 1.17.158 1.534.474.366.317.55.763.55 1.34 0 .317-.083.64-.247.967-.164.329-.445.71-.844 1.147l-1.454 1.534h2.75V9zM35.384 3.832c0-.393.127-.71.382-.954.255-.246.589-.369 1.002-.369.419 0 .756.122 1.01.365.256.24.383.567.383.98v.316c0 .396-.127.714-.382.954s-.59.36-1.002.36c-.416 0-.753-.12-1.01-.36-.256-.243-.383-.57-.383-.98v-.312zm.843.338c0 .176.05.318.15.427a.533.533 0 00.4.158.498.498 0 00.391-.163.63.63 0 00.145-.435v-.325a.617.617 0 00-.145-.426.508.508 0 00-.4-.163.506.506 0 00-.391.163c-.1.105-.15.253-.15.444v.32zm2.215 3.261c0-.395.13-.713.387-.953.258-.244.592-.365 1.002-.365.416 0 .752.12 1.006.36.258.237.387.566.387.985v.316c0 .392-.126.71-.378.954-.252.24-.587.36-1.006.36-.422 0-.76-.122-1.015-.365-.255-.243-.383-.565-.383-.967v-.325zm.844.343c0 .161.053.299.158.413a.516.516 0 00.396.171c.357 0 .536-.197.536-.593v-.334a.59.59 0 00-.15-.422.512.512 0 00-.395-.162.512.512 0 00-.396.162c-.1.106-.149.25-.149.435v.33zm-2.259.747l-.62-.334 3.125-5.001.62.334-3.125 5.001z",fill:"#fff"})))}n.p;var hv,yv,bv,gv;function wv(){return wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wv.apply(null,arguments)}function Sv(e){return r.createElement("svg",wv({id:"MP_Logo_Symbol-digital_Blue_RGB_svg__Layer_1","data-name":"Layer 1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 58.21 63.11",width:"1em",height:"1em"},e),hv||(hv=r.createElement("defs",null,r.createElement("style",null,".MP_Logo_Symbol-digital_Blue_RGB_svg__cls-2{fill:#5a78ff;fill-rule:evenodd}"))),yv||(yv=r.createElement("path",{className:"MP_Logo_Symbol-digital_Blue_RGB_svg__cls-2",d:"M28.21 41.82s8.31-2.53 14.06-2.55c9.51-.02 15.94 3.77 15.94 3.77V24.63s-6.47-3.35-14.61-3.58c-8.15-.23-15.39 3.32-15.39 3.32v17.44z"})),bv||(bv=r.createElement("path",{className:"MP_Logo_Symbol-digital_Blue_RGB_svg__cls-2",d:"M19.21 21.78l6.84 16.27v-15.6s5.4-2.89 11.44-3.71c6.04-.82 13.72.26 13.72.26l-3.72-8.88s-8.08-.52-15.39 2.6c-7.31 3.13-12.89 9.05-12.89 9.05z"})),gv||(gv=r.createElement("path",{d:"M32.73 10.25c-.9-2.18-2.69-6.53-2.69-6.53C28.78.66 25.3-.8 22.26.45L3.67 8.11C.64 9.36-.8 12.85.46 15.91l17.92 43.48c1.26 3.06 4.74 4.52 7.78 3.27L44.75 55c3.04-1.25 4.48-4.74 3.22-7.8l-2.22-5.39s-1.52-.09-2.22-.11c-.74-.02-2.12 0-2.12 0 .67 1.62 2.89 7.01 2.89 7.01a1.99 1.99 0 01-1.07 2.6l-18.59 7.66c-1.01.42-2.17-.07-2.59-1.09L4.12 14.4a1.99 1.99 0 011.07-2.6l18.59-7.66c1.01-.42 2.17.07 2.59 1.09l2.72 6.6s1.26-.61 1.94-.89c.68-.27 1.7-.7 1.7-.7z",fill:"#5a78ff"})))}n.p;var kv,Ov,Nv,xv,Pv,Iv;function Av(){return Av=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Av.apply(null,arguments)}function Cv(e){return r.createElement("svg",Av({width:"1em",height:"1em",viewBox:"0 0 34 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),kv||(kv=r.createElement("path",{d:"M0 0h34v40H0V0z",fill:"#BAF3FF"})),Ov||(Ov=r.createElement("path",{d:"M4 5a1 1 0 011-1h24a1 1 0 011 1v8a1 1 0 01-1 1H5a1 1 0 01-1-1V5z",fill:"#fff"})),Nv||(Nv=r.createElement("path",{d:"M4 19a1 1 0 011-1h9a1 1 0 110 2H5a1 1 0 01-1-1zM4 23a1 1 0 011-1h9a1 1 0 110 2H5a1 1 0 01-1-1zM4 27a1 1 0 011-1h9a1 1 0 110 2H5a1 1 0 01-1-1z",fill:"#52ABF1"})),xv||(xv=r.createElement("path",{d:"M19 27a1 1 0 011-1h9a1 1 0 011 1v4a1 1 0 01-1 1h-9a1 1 0 01-1-1v-4z",fill:"#fff"})),Pv||(Pv=r.createElement("path",{d:"M19 19a1 1 0 011-1h9a1 1 0 110 2h-9a1 1 0 01-1-1zM19 23a1 1 0 011-1h9a1 1 0 110 2h-9a1 1 0 01-1-1zM4 31a1 1 0 011-1h9a1 1 0 110 2H5a1 1 0 01-1-1zM10.598 6.313V12H9.426L7.14 8.187V12H5.969V6.312H7.14L9.43 10.13V6.313h1.168zM15.434 11.086V12h-3.028v-.914h3.028zm-2.645-4.774V12h-1.172V6.312h1.172zm2.25 2.317v.89h-2.633v-.89h2.633zm.39-2.316v.917h-3.023v-.918h3.024zM17.488 11.098l1.133-4.786h.633l.144.797L18.191 12h-.68l-.023-.902zm-.582-4.786l.938 4.786-.078.902h-.758l-1.262-5.688h1.16zm3.489 4.766l.925-4.765h1.16L21.223 12h-.758l-.07-.922zm-.786-4.765l1.141 4.804-.031.883h-.68l-1.215-4.895.156-.793h.63zM26.078 10.512a.752.752 0 00-.047-.274.516.516 0 00-.164-.226c-.08-.07-.194-.14-.34-.207a4.8 4.8 0 00-.566-.211 7.16 7.16 0 01-.734-.281 3.017 3.017 0 01-.61-.364 1.638 1.638 0 01-.414-.488 1.346 1.346 0 01-.148-.645c0-.237.052-.451.156-.644.104-.195.25-.362.437-.5.188-.14.41-.249.665-.324.257-.076.54-.114.847-.114.42 0 .785.076 1.098.227.312.151.555.358.726.621.175.263.262.564.262.902h-1.164a.878.878 0 00-.105-.437.714.714 0 00-.313-.3 1.114 1.114 0 00-.523-.11c-.203 0-.373.031-.508.093a.677.677 0 00-.305.247.606.606 0 00-.101.343c0 .097.023.184.07.262.05.078.122.151.219.219.096.067.215.131.355.191.14.06.303.119.488.176.31.094.582.2.817.316.237.118.435.25.594.395.158.146.278.311.359.496.08.185.121.395.121.629 0 .247-.048.469-.145.664-.096.195-.235.36-.418.496-.182.136-.4.238-.652.309a3.16 3.16 0 01-.848.105c-.28 0-.558-.036-.832-.11a2.529 2.529 0 01-.746-.34 1.712 1.712 0 01-.53-.577 1.66 1.66 0 01-.2-.832h1.176c0 .177.027.327.082.449a.75.75 0 00.23.297c.102.075.221.13.36.164.14.034.294.05.46.05.204 0 .37-.028.5-.085a.618.618 0 00.391-.582zM24 29l4 3h-7l3-3z",fill:"#52ABF1"})),Iv||(Iv=r.createElement("circle",{cx:27,cy:28,r:1,fill:"#52ABF1"})))}n.p;var jv,Dv,_v,Rv;function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tv.apply(null,arguments)}function Ev(e){return r.createElement("svg",Tv({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 31 32"},e),jv||(jv=r.createElement("path",{fill:"#eaeaea",d:"M0 4h22.667v26.667c0 .736-.597 1.333-1.333 1.333h-20a1.333 1.333 0 01-1.333-1.333V4z"})),Dv||(Dv=r.createElement("path",{fill:"#7295a9",d:"M3.333 13.333c0-.368.298-.667.667-.
1667h6.667a.667.667 0 110 1.334H4a.667.667 0 01-.667-.667zm0 6.667c0-.368.298-.667.667-.667h6.667a.667.667 0 110 1.334H4A.667.667 0 013.333 20zm13.334-7.333a.667.667 0 100 1.334h2a.667.667 0 100-1.334h-2zm-13.334 4c0-.368.298-.667.667-.667h4a.667.667 0 110 1.334H4a.667.667 0 01-.667-.667zM16.667 16a.667.667 0 100 1.334h2a.667.667 0 100-1.334h-2zM3.333 23.333c0-.368.298-.667.667-.667h4A.667.667 0 118 24H4a.667.667 0 01-.667-.667zm13.334-.666a.667.667 0 100 1.334h2a.667.667 0 100-1.334h-2z"})),_v||(_v=r.createElement("path",{fill:"#54e56b",d:"M14.667 0h16v8h-16V0z"})),Rv||(Rv=r.createElement("path",{fill:"#3c9e4c",d:"M25.333 4a2.667 2.667 0 11-5.334 0 2.667 2.667 0 015.334 0zm3.334 0a.667.667 0 11-1.334 0 .667.667 0 011.334 0zm-11.334-.667a.667.667 0 110 1.334.667.667 0 010-1.334z"})))}n.p;var Mv,Fv,zv;function Bv(){return Bv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bv.apply(null,arguments)}function Hv(e){return r.createElement("svg",Bv({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 34 32"},e),Mv||(Mv=r.createElement("path",{fill:"#20a464",d:"M0 30.737c0-.698.566-1.263 1.263-1.263h31.158a1.263 1.263 0 010 2.526H1.263A1.262 1.262 0 010 30.737z"})),Fv||(Fv=r.createElement("path",{fill:"#8ed1b1",d:"M20.632 10.105c.698 0 1.263.566 1.263 1.263v14.316a1.263 1.263 0 01-2.526 0V11.368c0-.698.566-1.263 1.263-1.263zM13.053 10.105c.698 0 1.263.566 1.263 1.263v14.316a1.263 1.263 0 01-2.526 0V11.368c0-.698.566-1.263 1.263-1.263zM5.474 10.105c.698 0 1.263.566 1.263 1.263v14.316a1.263 1.263 0 01-2.526 0V11.368c0-.698.566-1.263 1.263-1.263zM28.211 10.105c.698 0 1.263.566 1.263 1.263v14.316a1.263 1.263 0 01-2.526 0V11.368c0-.698.566-1.263 1.263-1.263z"})),zv||(zv=r.createElement("path",{fill:"#20a464",d:"M1.032 4.743L16.358.145a1.68 1.68 0 01.968 0l15.326 4.598a1.448 1.448 0 01-.417 2.836H1.448a1.45 1.45 0 01-.417-2.836zm15.81 1.152a1.684 1.684 0 100-3.368 1.684 1.684 0 000 3.368z"})))}n.p;var Lv,$v,Xv=n(25973);function Vv(){return Vv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vv.apply(null,arguments)}function qv(e){return r.createElement("svg",Vv({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 27 32"},e),Lv||(Lv=r.createElement("path",{fill:"#eaeaea",d:"M0 1.6A1.6 1.6 0 011.6 0h24a1.6 1.6 0 011.6 1.6v28.8a1.6 1.6 0 01-1.6 1.6h-24A1.6 1.6 0 010 30.4V1.6z"})),$v||($v=r.createElement("path",{fill:"#7295a9",d:"M4.8 10.4a.8.8 0 100 1.6h8a.8.8 0 100-1.6h-8zm15.2 0a.8.8 0 100 1.6h2.4a.8.8 0 100-1.6H20zM4 15.2a.8.8 0 01.8-.8h4a.8.8 0 110 1.6h-4a.8.8 0 01-.8-.8zm16-.8a.8.8 0 100 1.6h2.4a.8.8 0 100-1.6H20zM4 19.2a.8.8 0 01.8-.8h8a.8.8 0 110 1.6h-8a.8.8 0 01-.8-.8zm16-.8a.8.8 0 100 1.6h2.4a.8.8 0 100-1.6H20zM4 23.2a.8.8 0 01.8-.8h4a.8.8 0 110 1.6h-4a.8.8 0 01-.8-.8zm16-.8a.8.8 0 100 1.6h2.4a.8.8 0 100-1.6H20z"})))}n.p;var Uv;function Wv(e,t,n,r){Uv||(Uv="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Uv,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const Yv=function(e){var t=e.count;return 0===t?null:Wv("span",{className:"attention-badge attention-badge animate-wiggle"},void 0,t)};var Kv,Gv=n(96540);function Qv(e){return Qv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qv(e)}function Zv(e,t,n,r){Kv||(Kv="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Kv,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Jv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ih(r.key),r)}}function eh(e,t,n){return t=nh(t),function(e,t){if(t&&("object"==Qv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,th()?Reflect.construct(t,n||[],nh(e).constructor):t.apply(e,n))}function th(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(th=function(){return!!e})()}
1function nh(e){return nh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nh(e)}function rh(e,t){return rh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rh(e,t)}function oh(e,t,n){return(t=ih(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ih(e){var t=function(e,t){if("object"!=Qv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qv(t)?t:t+""}var ah=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return oh(e=eh(this,t,[].concat(r)),"checkDashboard",function(){return(0,Q.wz)((0,Q.ID)("/dashboard"))}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rh(e,t)}(t,e),function(e,t,n){return t&&Jv(e.prototype,t),n&&Jv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this,t=this.checkDashboard();return Zv("div",{className:"app-toolbar__body transition"},void 0,!t&&Zv(Gv.Fragment,{},void 0,Zv("p",{className:"app-toolbar__subtitle mb-3"},void 0,I18n.translate("menu.reports.basic")),Zv("div",{className:"px-2"},void 0,Zv(Fn(),{},void 0,Zv(Rn(),{xs:10,xsOffset:1},void 0,Zv(Fn(),{className:"text-center"},void 0,!this.props.usageTypeAnnualReportOnly&&Zv(Rn(),{xs:4},void 0,Zv("button",{type:"button",className:"btn icon-button app-toolbar__reports-btn",onClick:function(){return e.props.onNavigate("reports")}},void 0,Zv(qv,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("menu.reports")))),Zv(Rn(),{xs:4},void 0,Zv("button",{type:"button",className:"btn icon-button app-toolbar__inbox-btn",onClick:function(){return e.props.onNavigate("inbox")}},void 0,Zv(Xv.h,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("menu.inbox")))),!this.props.usageTypeAnnualReportOnly&&Zv(Rn(),{xs:4},void 0,Zv("button",{type:"button",className:"btn icon-button app-toolbar__bank-btn",onClick:function(){return e.props.onNavigate("bank")}},void 0,Zv(Hv,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("popup.bankcompany")))),!this.props.usageTypeAnnualReportOnly&&Zv(Rn(),{xs:4},void 0,Zv("button",{type:"button",className:"btn icon-button app-toolbar__reports-btn",onClick:function(){return e.props.onNavigate("sales")}},void 0,Zv(Ev,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("salestool.title")))),this.props.extraTools.includes("REVIFLOW_TAX_ACCOUNT")&&Zv(Rn(),{xs:4},void 0,Zv("button",{type:"button",className:"btn icon-button app-toolbar__reports-btn",onClick:function(){return e.props.onNavigate("taxaccount")}},void 0,Zv(cv,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("menu.taxaccount")))),this.props.extraTools.includes("MOBILEPAY")&&Zv(Rn(),{xs:4},void 0,Zv("button",{type:"button",className:"btn icon-button app-toolbar__reports-btn",onClick:function(){return e.props.onNavigate("mobilepay")}},void 0,Zv(Sv,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("menu.mobilepay"))))))))),!t&&(!this.props.companyTypeIsSinglePersonOrIS||this.props.user.administrator)&&!this.props.accessObj.isLimitedToInvoicingAndDocuments()&&!this.props.accessObj.filesOnlyAccess&&Zv(Gv.Fragment,{},void 0,Zv("p",{className:"app-toolbar__subtitle mt-5 mb-3"},void 0,I18n.translate("toolpanel.yearend")),Zv("div",{className:"px-2"},void 0,Zv(Fn(),{},void 0,Zv(Rn(),{xs:10,xsOffset:1},void 0,Zv(Fn(),{className:"text-center"},void 0,!this.props.usageTypeAnnualReportOnly&&Zv(Rn(),{xs:4},void 0,Zv("button",{className:"btn icon-button app-toolbar__verification-btn",type:"button",onClick:function(){return e.props.onNavigate("annualreport.checkguide")}},void 0,Zv(rv,{className:"phi-3x"}),Zv("div",{className:"mt-1 d-flex justify-content-center text-nowrap"},void 0,I18n.translate("menu.annualreport.checkguide.short")))),Zv(Rn(),{xs:4},void 0,Zv("button",{className:"btn icon-button app-toolbar__annual-report-btn",type:"button",onClick:function(){return e.props.onNavigate("annualreport.pdf")}},void 0,Zv(cv,{className:"phi-3x"}),Zv("div",{className:"mt-1 d-flex justify-content-center text-nowrap"},void 0,I18n.translate("menu.annualreport")))),!this.props.usageTypeAnnualReportOnly&&Zv(Rn(),{xs:4},void 0,Zv("button",{className:"btn icon-button app-toolbar__specifications-btn",type:"button",onClick:function(){return e.props.onNavigate("annualreport.specifications")}},void 0,Zv(vv,{className:"phi-3x"}),Zv("div",{className:"mt-1 d-flex justify-content-center text-nowrap"},void 0,I18n.translate("menu.annualreport.specs"))))))))),Zv("p",{className:"app-toolbar__subtitle mb-3 ".concat(t?"":"mt-5 ")},void 0,I18n.translate("toolpanel.help")),Zv("div",{className:"px-2"},void 0,Zv(Fn(),{},void 0,Zv(Rn(),{xs:10,xsOffset:1},void 0,Zv(Fn(),{className:"text-center"},void 0,Zv(Rn(),{xs:4},void 0,Zv("button",{className:"btn icon-button app-toolbar__chat-btn",type:"button",onClick:function(){return e.props.onNavigate("news")}},void 0,Zv(Cv,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("news")," ",Zv(Yv,{count:this.props.user.numberOfNews})))),Zv(Rn(),{xs:4},void 0,Zv("button",{className:"btn icon-button app-toolbar__help-btn",type:"button",onClick:function(){return e.props.onNavigate("help")}},void 0,Zv(io.h,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("menu.help")))),Zv(Rn(),{xs:4},void 0,Zv("button",{className:"btn icon-button app-toolbar__chat-btn",type:"button",onClick:function(){return e.props.onNavigate("contact")}},void 0,Zv(Zm,{className:"phi-3x"}),Zv("div",{className:"mt-1"},void 0,I18n.translate("assist.chat")))))))))}}])}(co.b);oh(ah,"propTypes",{onNavigate:q().func.isRequired,onHide:q().func,accessObj:q().object.isRequired});const lh=(0,zn.Ng)(function(e){return{user:e.currentUser.user,companyTypeIsSinglePerson:e.defaults.companyTypeIsSinglePerson,companyTypeIsSinglePersonOrIS:e.defaults.companyTypeIsSinglePersonOrIS,usageTypeAnnualReportOnly:e.companies.currentCompany.usageTypeAnnualReportOnly,extraTools:e.defaults.extraTools}})(ah);function sh(e){return{type:Pl.Js,data:e}}var ch,uh=n(96540);function dh(e,t,n,r){ch||(ch="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ch,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var fh=[{key:"dateAsText",dataIndex:"dateAsText",title:I18n.translate("date"),width:110},{key:"securityName",dataIndex:"securityName",title:I18n.translate("security")},{key:"pctAsText",dataIndex:"pctAsText",title:I18n.translate("report.dividends.pct"),width:85},{key:"withheldtax",dataIndex:"withheldtax",title:I18n.translate("report.dividends.withheldtax"),className:"text-right no-wrap",width:120}],ph=[Mu.A];const mh=(0,zn.Ng)(function(e){return{dividendReport:e.dividendReport,years:e.defaults.fiscalYearReportParams}},function(e){return{actions:(0,oo.zH)({updateDividendReport:sh,fetchLiveReport:Kc},e)}})(function(e){var t=e.years,n=void 0===t?[]:t,o=e.animate,i=e.dividendReport,s=e.actions,c=(0,r.useRef)();(0,r.useEffect)(function(){return window.addEventListener(p.c_,u),function(){return window.removeEventListener(p.c_,u)}},[]),(0,r.useEffect)(function(){!i.year&&n.length&&s.updateDividendReport(n[0].value),u()},[n]),(0,r.useEffect)(function(){u()},[i.year]);var u=(0,r.useCallback)(function(){i.loading||i.loaded||d().then(function(e){return e&&s.fetchLiveReport({type:p.Vd,year:i.year})})},[i.year,c.current]),d=function(){return c.current.validate(i.year).then(function(e){return e.every(function(e){return e.valid})})},f=function(e,t){d().then(function(n){if(n){var r={type:p.Vd,year:i.year,output:e};t&&(r.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(r)),"_blank")}})},m=i.liveData;return dh(Ku,{animate:o},void 0,dh("form",{className:"report-form",onSubmit:function(e){e.preventDefault(),f()}},void 0,dh("div",{className:"container-fluid"},void 0,uh.createElement(Fe.H,{id:"dividends-report-year",key:"dividends-report-year",label:"parameters.year",labelKey:"text",value:i.year,ref:c,validators:ph,options:n,onChange:s.updateDividendReport,n
1oDeselect:!0})),dh("div",{className:"separator"}),dh("div",{className:"container-fluid"},void 0,dh("div",{className:"form-group"},void 0,dh(su,{mode:"PDF",onClick:f}),dh(su,{mode:"EXCEL",onClick:f}),dh(su,{type:"submit"}),dh(Su,{onClick:f})))),dh("div",{className:"separator mt-0"}),dh("div",{className:"app-toolbar__report-title"},void 0,dh("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),dh("span",{className:"mr-1"},void 0,I18n.translate("menu.dividends")),dh("span",{},void 0,I18n.translate("report.miniversion"))),dh("div",{className:"app-toolbar__report-container",style:{overflowY:"auto"}},void 0,dh("div",{className:"rc-table rc-table-fixed-header"},void 0,dh("div",{className:"rc-table-container"},void 0,dh("div",{className:"rc-table-header",style:{overflow:"hidden"}},void 0,dh("table",{style:{tableLayout:"fixed"}},void 0,dh("colgroup",{},void 0,fh.map(function(e){var t=e.width;return dh("col",{style:{width:t||"auto",minWidth:t||"auto"}},e.key)}),dh("col",{style:{width:8,minWidth:8}})),dh("thead",{className:"rc-table-thead"},void 0,dh("tr",{},void 0,fh.map(function(e){var t=e.key,n=e.className,r=e.title;return dh("th",{className:"rc-table-cell ".concat(n||"")},t,r)}),dh("th",{className:"rc-table-cell rc-table-cell-scrollbar"}))))),dh("div",{className:"rc-table-body"},void 0,dh("table",{style:{tableLayout:"fixed"}},void 0,dh("colgroup",{},void 0,fh.map(function(e){var t=e.width;return dh("col",{style:{width:t||"auto",minWidth:t||"auto"}},e.key)}),dh("col",{style:{width:8,minWidth:8}})),dh("tbody",{className:"rc-table-tbody"},void 0,dh("tr",{"aria-hidden":"true",className:"rc-table-measure-row",style:{height:"0px",fontSize:"0px"}},void 0,fh.map(function(e){return dh("td",{style:{padding:"0px",border:"0px",height:"0px"}},e.key,dh("div",{style:{height:"0px",overflow:"hidden"}},void 0," "))}),dh("td",{style:{padding:"0px",border:"0px",height:"0px"}},void 0,dh("div",{style:{height:"0px",overflow:"hidden"}},void 0," "))),m?m.map(function(e,t){return dh(uh.Fragment,{},e.securityName+e.dateAsText,(!t||e.country!==m[t-1].country)&&dh("tr",{className:"rc-table-row rc-table-row-level-0"},void 0,dh("td",{colSpan:fh.length+1,className:"rc-table-cell text-center font-bold"},void 0,e.country)),dh("tr",{className:"rc-table-row rc-table-row-level-0"},void 0,fh.map(function(t){var n=t.key,r=t.dataIndex,o=t.className;return dh("td",{className:"rc-table-cell ".concat(o||"")},n,e[r])})))}):null)))))))});var vh,hh,yh=n(23777),bh=n.n(yh),gh=n(87195),wh=n.n(gh),Sh=n(58776),kh=n.n(Sh),Oh=n(84500),Nh=n(96189),xh=n(64559);function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ph.apply(null,arguments)}function Ih(e){return r.createElement("svg",Ph({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 35 32"},e),vh||(vh=r.createElement("path",{fill:"#e46a66",d:"M16.198 2.549c.608-1.105 2.196-1.105 2.804 0l14.894 27.08A1.6 1.6 0 0132.494 32H2.706a1.6 1.6 0 01-1.402-2.371l14.894-27.08z"})),hh||(hh=r.createElement("path",{fill:"#fff",d:"M19.2 11.2H16v9.6h3.2v-9.6zM19.2 24H16v3.2h3.2V24z"})))}n.p;var Ah,Ch=n(91308),jh=n(91142),Dh=n(76312);function _h(e,t,n,r){Ah||(Ah="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ah,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Rh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Th(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Th(e,t):void 0}}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Th(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const Eh=function(e){var t=e.show,n=e.activeFolder,o=e.folders,i=e.onSubmit,a=e.onHide,l=e.file,s=Rh((0,r.useState)(n),2),c=s[0],u=s[1],d=function(){u(n),a()};return _h(qc(),{show:t,onHide:d},void 0,_h(qc().Header,{closeButton:!0},void 0,_h(qc().Title,{},void 0,I18n.translate("archive.file.move")),_h("p",{className:"mb-0"},void 0,l.fileDate," — ",l.fileName)),_h(qc().Body,{},void 0,_h("ul",{className:"file-move__list"},void 0,o.map(function(e){return _h("li",{onClick:function(){return u(e.value)},className:"".concat(e.value===c?"active":"")},e.value,_h("span",{className:"file-move__icon mr-2"},void 0,e.typeInBox&&_h(Xv.h,{className:"phi","aria-hidden":"true"})||!e.deletable&&_h(Nh.h,{className:"phi","aria-hidden":"true"})||_h(Oh.h,{className:"phi","aria-hidden":"true"})),_h("span",{className:"file-move__title"},void 0,e.label))}))),_h(qc().Footer,{},void 0,_h("button",{type:"button",className:"btn btn-default",onClick:d},void 0,I18n.translate("button.cancel")),_h("button",{type:"button",className:"btn btn-primary",onClick:function(e){e.preventDefault(),c&&i(c)}},void 0,I18n.translate("archive.file.movetoselected"))))};function Mh(e){return Mh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mh(e)}function Fh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bh(r.key),r)}}function zh(e,t,n){return(t=Bh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bh(e){var t=function(e,t){if("object"!=Mh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mh(t)?t:t+""}var Hh,Lh=function(){return function(e,t,n){return t&&Fh(e.prototype,t),n&&Fh(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zh(this,"contentType",null),zh(this,"createdBy",null),zh(this,"createdTime",null),zh(this,"fileName",null),zh(this,"fileXid",null),zh(this,"folderXid",null),zh(this,"matchedMagicXid",null),zh(this,"matchedMagicName",null),zh(this,"matchedMagicGuideText",null),t){var n=t instanceof e;(n||t.hasOwnProperty("contentType"))&&(this.contentType=t.contentType),(n||t.hasOwnProperty("createdBy"))&&(this.createdBy=t.createdBy),(n||t.hasOwnProperty("createdTime"))&&(this.createdTime=t.createdTime),(n||t.hasOwnProperty("fileName"))&&(this.fileName=t.fileName),(n||t.hasOwnProperty("fileXid"))&&(this.fileXid=t.fileXid),(n||t.hasOwnProperty("folderXid"))&&(this.folderXid=t.folderXid),(n||t.hasOwnProperty("matchedMagicXid"))&&(this.matchedMagicXid=t.matchedMagicXid),(n||t.hasOwnProperty("matchedMagicName"))&&(this.matchedMagicName=t.matchedMagicName),(n||t.hasOwnProperty("matchedMagicGuideText"))&&(this.matchedMagicGuideText=t.matchedMagicGuideText)}},[{key:"requestObject",get:function(){return{contentType:this.contentType,createdBy:this.createdBy,createdTime:this.createdTime,fileName:this.fileName,fileXid:this.fileXid,folderXid:this.folderXid,matchedMagicXid:this.matchedMagicXid,matchedMagicName:this.matchedMagicName,matchedMagicGuideText:this.matchedMagicGuideText}}}])}(),$h=n(83009);function Xh(e,t,n,r){Hh||(Hh="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Hh,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const Vh=function(e){var t=e.checked,n=e.className;return Xh("span",{className:"visual-radio".concat(t?" checked":"").concat(n?" ".concat(n):"")})};var qh,Uh=n(24506),Wh=n(18098);function Yh(e){return Yh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yh(e)}function Kh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Kh(Object(n),!0).forEach(function(t){cy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qh(e){return function(e){if(Array.isArray(e))return ey(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Jh(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||Jh(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jh(e,t){if(e){if("string"==typeof e)return ey(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ey(e,t):void 0}}function ey(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ty(e,t,n,r){qh||(qh="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:qh,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ny(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uy(r.key),r)}}function ry(e,t,n){return t=ly(t),function(e,t){if(t&&("object"==Yh(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,oy()?Reflect.construct(t,n||[],ly(e).constructor):t.apply(e,n))}function oy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oy=function(){return!!e})()}function iy(e,t,n,r){var o=ay(ly(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function ay(){return ay="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ly(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ay.apply(null,arguments)}function ly(e){return ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ly(e)}function sy(e,t){return sy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sy(e,t)}function cy(e,t,n){return(t=uy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uy(e){var t=function(e,t){if("object"!=Yh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yh(t)?t:t+""}var dy=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cy(n=ry(this,t,[e]),"state",{folders:[],file:new Lh,notFound:!1,loading:!0,loadingFolders:!0,saving:!1,saved:!1,failed:!1,cannotDelete:!1,name:"",date:"",folder:"",totalAmount:"",index:null,move:!1,comments:[],electronicInvoice:!1,loadingContent:!1,deleteFromInboxUponDrop:!0,showConfigureDndDropdown:!1,draggingDocument:!1,makeMagicResponse:null,makeMagicFeedbackModal:!1,bankMatchResult:null}),cy(n,"requestHelper",new j.g),cy(n,"inputRefs",{name:r.createRef(),date:r.createRef(),folder:r.createRef()}),cy(n,"handleMatchedMagicClick",function(){n.state.file.matchedMagicXid&&n.handleTransaction(n.state.file.matchedMagicXid)}),cy(n,"submitForm",function(){n.formRef.dispatchEvent(new Event("submit",{bubbles:!0,cancelable:!0}))}),n.labelWrapper=function(e){return ty("div",{className:"mt-1"},void 0,e)},n.inputWrapper=function(e){return ty("div",{},void 0,e)},n.handleNameChange=function(e){return n.setState({name:e})},n.handleDateChange=function(e){n.setState({date:e},function(){Promise.all([n.inputRefs.date.current.validate(n.state.date)]).then(Q.el).then(function(e){e&&n.submitForm(
1)})})},n.handleFolderChange=function(e){return n.setState({folder:e},function(){return n.submitForm()})},n.handleSubmit=n.handleSubmit.bind(n),n.handleComment=n.handleComment.bind(n),n.validators=n.getValidators(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sy(e,t)}(t,e),function(e,t,n){return t&&ny(e.prototype,t),n&&ny(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){iy(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators()}},{key:"getValidators",value:function(){return{name:[Mu.A],date:[(0,Eu.A)({required:!0,format:"DD.MM.YYYY"})],folder:[Mu.A]}}},{key:"handleDetails",value:function(e){var t=this;this.setState({loadingContent:!0}),this.requestHelper.registerRequest((0,s.Zb)(this.props.companyXid,e)).then(function(e){return t.setState({mailDetails:e.body,loadingContent:!1})}).catch(function(){return t.setState({mailDetails:null,loadingContent:!1})})}},{key:"handleEinvoice",value:function(e){var t=this;this.setState({loadingContent:!0}),this.requestHelper.registerRequest((0,s.AO)(this.props.companyXid,e)).then(function(e){return t.setState({einvoiceDetails:e.body,loadingContent:!1})}).catch(function(){return t.setState({einvoiceDetails:null,loadingContent:!1})})}},{key:"sendEinvoiceAcceptance",value:function(e,t,n,r){var o=this;this.setState({acceptingEinvoice:!0}),this.requestHelper.registerRequest((0,s.Vz)({companyXid:e,archiveFileXid:t,accepted:n,rejected:r})).then(function(){return o.handleEinvoice(t)}).finally(function(){return o.setState({acceptingEinvoice:!1})})}},{key:"load",value:function(){var e=this;if(this.props.fileXid)if(Promise.all([this.requestHelper.registerRequest((0,s.Ul)(this.props.fileXid)),this.requestHelper.registerRequest((0,s.tI)({fileXid:this.props.fileXid,companyXid:this.props.companyXid})),this.requestHelper.registerRequest((0,c.ir)({fileXid:this.props.fileXid,companyXid:this.props.companyXid}))]).then(function(t){var n=Zh(t,2),r=n[0],o=n[1];e.setState({loading:!1,cannotDelete:!!r.body.uses.length,file:o.body,name:o.body.fileName,date:o.body.fileDate,folder:o.body.folderXid,totalAmount:o.body.totalAmount||"",emailOnly:o.body.emailOnly,emailAvailable:o.body.emailAvailable,plainTextAvailable:o.body.plainTextAvailable,electronicInvoice:o.body.electronicInvoice}),o.body.emailOnly&&e.handleDetails(e.props.fileXid),o.body.electronicInvoice?e.handleEinvoice(e.props.fileXid):(o.body.plainTextAvailable&&e.handleFileAsPlainText(),o.body.emailAvailable&&e.handleDetails(e.props.fileXid))}).catch(function(t){e.setState({loading:!1,notFound:!0,errorModal:412===t.status?t.response.body:null})}),this.requestHelper.registerRequest((0,s.WU)(this.props.companyXid)).then(function(t){return new Promise(function(n){return e.setState({loadingFolders:!1,folders:t.body.folders.map(function(e){return{label:e.name,value:e.folderXid,typeInBox:e.typeInBox,deletable:e.deletable}})},function(){return n()})})}).catch(function(){return e.setState({loadingFolders:!1,folders:[]})}),this.props.magicItems.length||this.props.actions.fetchMagicMenuItems(this.props.companyXid),this.props.inbox.loaded||this.props.inbox.loading){var t=null===this.state.index?this.props.inbox.files.findIndex(function(t){return t.id===+e.props.fileXid}):this.state.index;this.setState({index:t})}else this.props.actions.fetchInbox(this.props.companyXid)}},{key:"handleComment",value:function(e){var t=this;return this.requestHelper.registerRequest((0,s.ux)({companyXid:this.props.companyXid,fileXid:this.props.fileXid,comment:e})).then(function(){return t.loadFileComments()})}},{key:"loadFileComments",value:function(){var e=this;this.requestHelper.registerRequest((0,s.h1)({fileXid:this.props.fileXid,companyXid:this.props.companyXid})).then(function(t){return e.setState({comments:t.body.comments||[]})}).catch(function(){return e.setState({loading:!1})})}},{key:"componentDidMount",value:function(){iy(t,"componentDidMount",this,3)([]),this.load(),this.loadFileComments()}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.props.inbox.files!==e.inbox.files){var n=this.props.inbox.files.findIndex(function(e){return e.id===+t.props.fileXid}),r=null===this.state.index?n:this.state.index;null===this.state.index&&this.setState({index:r}),-1===n&&(this.props.inbox.files.length&&r>=0?this.props.onNavigate("fileDetails/".concat(this.props.inbox.files[Math.min(this.props.inbox.files.length-1,r)].id),{replace:!0}):this.props.onBack())}}},{key:"handleTransaction",value:function(e){var t=this.props.magicItems.find(function(t){return t.xid===e});this.props.history.push({pathname:(0,Q.ID)("/work/ui"),state:{suggestion:{transactionTypeId:t?$h.QF:e,magic:t,attachmentsInCreate:[{name:this.state.file.fileName,xid:this.state.file.fileXid}],formValues:[{inputName:"transactiondate",value:this.state.file.fileDate},{inputName:"description",value:this.state.file.fileName}].concat(Qh(this.state.totalAmount?[{inputName:"amount",value:this.state.totalAmount}]:[]))}}})}},{key:"validate",value:function(){return Promise.all([this.inputRefs.name.current.validate(this.state.name),this.inputRefs.date.current.validate(this.state.date)]).then(Q.el)}},{key:"handleSubmit",value:function(e){var t=this;e.preventDefault(),!this.state.saving&&this.props.company.filesEdit&&(this.validate().then(function(e){e&&(t.setState({saving:!0,saved:!1,failed:!1}),Promise.all([(t.state.date!==t.state.file.fileDate||t.state.name!==t.state.file.fileName)&&t.requestHelper.registerRequest
1((0,s.lU)({id:t.props.fileXid,fileDate:t.state.date,fileName:t.state.name})),t.state.folder!==t.state.file.folderXid&&t.requestHelper.registerRequest((0,s.mV)(t.props.fileXid,t.state.folder,t.props.companyXid))]).then(function(){return t.setState({saving:!1,saved:!0,file:Gh(Gh({},t.state.file),{},{fileDate:t.state.date,fileName:t.state.name,folderXid:t.state.folder})})}).catch(function(){return t.setState({saving:!0,failed:!0})}))}),setTimeout(function(){return t.setState({saving:!1,saved:!1,failed:!1})},3e3))}},{key:"handleRemove",value:function(){var e=this;this.setState({remove:!1,loading:!0}),this.requestHelper.registerRequest((0,s.Nn)(this.props.fileXid)).then(function(){return e.props.onBack()}).catch(function(){return e.setState({loading:!1})})}},{key:"handleFileAsPlainText",value:function(){var e=this;this.setState({loadingContent:!0}),this.requestHelper.registerRequest((0,s.uU)({xid:this.props.fileXid,companyXid:this.props.companyXid})).then(function(t){return e.setState({plainTextDetails:t.body.plainText,loadingContent:!1})}).catch(function(){return e.setState({loadingContent:!1})})}},{key:"handleMagic",value:function(){var e=this;this.requestHelper.registerRequest((0,s.be)({xid:this.props.fileXid,companyXid:this.props.companyXid})).then(function(t){return e.setState({makeMagicResponse:t.body,makeMagicFeedbackModal:!0})})}},{key:"handleBlockIdentical",value:function(){var e=this;this.requestHelper.registerRequest((0,s.hn)({xid:this.props.fileXid,companyXid:this.props.companyXid})).then(function(){return e.setState({blockIdenticalConfirmed:!0})})}},{key:"handleBankMatch",value:function(){var e=this;this.requestHelper.registerRequest((0,s.IH)({companyXid:this.props.companyXid,fileXid:this.props.fileXid})).then(function(t){return e.setState({bankMatchResult:t.body})}).catch(function(){return e.setState({bankMatchResult:{error:!0}})})}},{key:"toggleErrorModal",value:function(){this.setState({errorModal:null})}},{key:"getDndModeTooltipText",value:function(){var e=this.state,t=e.draggingDocument,n=e.deleteFromInboxUponDrop;return t?n?"Upon dragging the file will be removed from the inbox":"Upon dragging the file will be kept in the inbox":I18n.translate("tool.filedetails.dnd.tooltip.mode")}},{key:"render",value:function(){var e,t=this,n=this.state,o=n.file,i=n.notFound,a=n.loading,s=n.folders,c=n.remove,u=n.saving,d=n.failed,f=n.saved,p=n.cannotDelete,m=n.index,v=n.mailDetails,h=n.plainTextDetails,y=n.comments,b=n.move,g=n.einvoiceDetails,w=n.loadingContent,S=n.acceptingEinvoice,k=n.errorModal,O=n.deleteFromInboxUponDrop,N=n.showConfigureDndDropdown,x=n.makeMagicFeedbackModal,P=n.makeMagicResponse,I=this.state.name!==o.fileName||this.state.date!==o.fileDate||this.state.folder!==o.folderXid,A=this.props.company,C=A.filesEdit,j=A.accessModeEdit,D=m>=0?this.props.inbox.files[m+1]:null,_=m>=0?this.props.inbox.files[m-1]:null;return ty(Ku,{animate:this.props.animate},void 0,ty(gn.A,{show:k,title:I18n.translate("problem"),submitBtnText:I18n.translate("ok"),onSubmit:this.toggleErrorModal.bind(this),onHide:this.toggleErrorModal.bind(this),noCancelBtn:!0},void 0,k&&ty("p",{},void 0,(e=I18n).translate.apply(e,[this.state.errorModal.messageKey].concat(Qh(this.state.errorModal.messageParams))))),a&&ty("p",{className:"mt-2 text-center"},void 0,"Loading ",ty(qn.A,{}))||i&&ty("p",{className:"text-center"},void 0,I18n.translate("tool.filedetails.err"))||ty("div",{},void 0,r.createElement("form",{key:"file-details-from",className:"pt-2 px-2 form-white",onSubmit:this.handleSubmit,ref:function(e){return t.formRef=e}},ty("div",{className:"file-details-header"},void 0,ty("div",{className:"file-details-header__row"},void 0,ty("div",{className:"file-details-header__field file-details-header__field--name"},void 0,ty(Jd.A,{as:"div",item:{item:Gh(Gh({},o),{},{id:o.fileXid,xid:o.fileXid,keepInInbox:!O}),type:"inboxFile"},className:"file-details-header__draggable-field",begin:function(){return t.setState({showConfigureDndDropdown:!1,draggingDocument:!0})},end:function(){return t.setState({draggingDocument:!1})}},void 0,function(){return ty("div",{className:"file-details-header__field-content"},void 0,j&&ty("div",{className:"file-details-header__drag-handle"},void 0,ty(wh(),{placement:"top",overlay:ty(kh(),{id:"icon-drag-and-drop"},void 0,I18n.translate("tool.filedetails.dnd.tooltip"),ty("br",{}
1),t.getDndModeTooltipText())},void 0,ty(z(),{id:"dnd-options-dropdown",open:N},void 0,ty(z().Toggle,{className:"file-details-header__drag-button",onClick:function(){return t.setState(function(e){return Gh(Gh({},e),{},{showConfigureDndDropdown:!e.showConfigureDndDropdown})})}},void 0,ty(Qd.h,{className:"phi phi-draganddrop_icon","aria-hidden":"true"})),ty(z().Menu,{},void 0,ty(H(),{onSelect:function(){return t.setState({deleteFromInboxUponDrop:!0})}},void 0,ty(Vh,{className:"mr-1",checked:O}),ty("span",{},void 0,I18n.translate("tool.filedetails.dnd.mode.move"))),ty(H(),{onSelect:function(){return t.setState({deleteFromInboxUponDrop:!1})}},void 0,ty(Vh,{className:"mr-1",checked:!O}),ty("span",{},void 0,I18n.translate("tool.filedetails.dnd.mode.keep"))))))),ty("div",{className:"file-details-header__input-wrapper"},void 0,r.createElement(je.x,{key:"name",ref:t.inputRefs.name,value:t.state.name,validators:t.validators.name,onChange:t.handleNameChange,disabled:!C,onBlur:function(){return I&&t.submitForm()}})))})),ty("div",{className:"file-details-header__field file-details-header__field--date"},void 0,r.createElement(tu.$,{key:"date",id:"file-date",ref:this.inputRefs.date,value:this.state.date,validators:this.validators.date,onChange:function(e){return t.setState({date:e})},onBlur:this.handleDateChange,disabled:!C,autocomplete:!1})),(_||D)&&ty("div",{className:"file-details-header__field file-details-header__field--navigation"},void 0,_&&ty("button",{className:"file-details-header__nav-button",type:"button",onClick:function(){return t.props.onNavigate("fileDetails/".concat(_.id),{replace:!0})}},void 0,ty("i",{className:"fa fa-chevron-left"})),D&&ty("button",{className:"file-details-header__nav-button",type:"button",onClick:function(){return t.props.onNavigate("fileDetails/".concat(D.id),{replace:!0})}},void 0,ty("i",{className:"fa fa-chevron-right"}))))),u&&ty("div",{className:"app-toolbar__alert"},void 0,ty(bh(),{bsStyle:"warning"},void 0,ty("span",{},void 0,I18n.translate("button.save.saving")," ",ty(qn.A,{})))),f&&ty("div",{className:"app-toolbar__alert"},void 0,ty(bh(),{bsStyle:"success"},void 0,ty("span",{},void 0,I18n.translate("button.save.saved")))),d&&ty("div",{className:"app-toolbar__alert"},void 0,ty(bh(),{bsStyle:"danger"},void 0,ty("span",{},void 0,I18n.translate("button.save.failed")),")")),ty(Eh,{show:b,activeFolder:this.state.folder,file:o,folders:s,onSubmit:this.handleFolderChange,onHide:function(){return t.setState({move:!1})}}),ty("div",{className:"file-details-actions"},void 0,ty("div",{className:"file-details-actions__row"},void 0,j&&ty(Wh.o,{className:"btn btn-action-primary btn-action__square text-blue",magicItems:this.props.magicItems,excludeTypes:this.props.excludeTypes,onClick:function(e){return t.handleTransaction(e)},footer:ty("div",{},void 0,"Attachment: ",ty("b",{},void 0,o.fileName)),withoutPlus:!0},void 0,I18n.translate("tool.filedetails.use")),ty("div",{className:"file-details-actions__field file-details-actions__field--total-amount"},void 0,ty(je.x,{value:this.state.totalAmount,disabled:!0},"totalAmount")),C&&(p?ty(wh(),{placement:"top",overlay:ty(kh(),{id:"delete-disabled-tooltip"},void 0,"Du kan ikke slette filen når den er i brug i dit regnskab.")},void 0,ty("button",{className:"btn btn-action-primary btn-action__square",type:"button",disabled:!0},void 0,I18n.translate("button.delete"))):ty("button",{className:"btn btn-action-primary btn-action__square",type:"button",onClick:function(){return t.setState({remove:!0})}},void 0,I18n.translate("button.delete"))),j?ty(z(),{id:"file-details-actions",pullRight:!0},void 0,ty(z().Toggle,{className:"btn-action__square nofill",noCaret:!0},void 0,ty(yt.h,{fontSize:"1.3em","aria-label":"Actions"})),ty(z().Menu,{},void 0,ty(H(),{disabled:!C,onSelect:function(){return t.setState({move:!0})}},void 0,ty(jh.h,{className:"mr-1",fontSize:14}),I18n.translate("archive.file.move")),ty(H(),{"aria-label":"Download File",href:(0,l.i93)(o.fileXid),onClick:function(e){return e.stopPropagation()},download:!0},void 0,ty(xh.h,{className:"mr-1 fullstroke",fontSize:14,"aria-hidden":"true"}),I18n.translate("download")),ty(H(),{disabled:!C,onSelect:function(){return t.handleMagic(o.fileXid)}},void 0,ty(Dh.h,{className:"mr-1",fontSize:14}),I18n.translate("archive.magic.try")),this.state.totalAmount?ty(H(),{onSelect:function(){return t.handleBankMatch()}},void 0,ty(Ch.h,{className:"mr-1",fontSize:14}
1),I18n.translate("archive.search.from.amount")):null,ty(H(),{disabled:!C,onSelect:function(){return t.handleBlockIdentical(o.fileXid)}},void 0,ty(pe.$,{icon:"fa fa-1x fa-thumbs-down"}),ty("span",{className:"ml-1"},void 0,I18n.translate("archive.block.identical"))))):ty("a",{className:"btn btn-primary","aria-label":"Download File",href:(0,l.i93)(o.fileXid),onClick:function(e){return e.stopPropagation()},download:!0},void 0,"Download")))),ty(gn.A,{show:c,title:I18n.translate("archive.confirm.title"),onHide:function(){return t.setState({remove:!1})},onSubmit:function(){return t.handleRemove()}},void 0,"'",o.fileName,"'"),null!=o.matchedMagicXid?ty("div",{className:"mx-2",style:{background:"#f9f9f9",padding:"0 0 12px"}},void 0,ty("p",{style:{padding:"5px 18px",fontWeight:"bold"}},void 0,"Bilagstype:"," ",j&&o.matchedMagicName?ty("a",{href:"#",onClick:function(e){e.preventDefault(),t.handleMatchedMagicClick()},style:{cursor:"pointer",textDecoration:"underline",color:"#337ab7"}},void 0,o.matchedMagicName):o.matchedMagicName||""),o.matchedMagicGuideText&&(o.matchedMagicGuideText||"").split("\\n").map(function(e,t){return ty("p",{style:{padding:"0 18px 0px",margin:"0"}},t,e)})):null,this.state.bankMatchResult?ty("div",{className:"mx-2",style:{background:"#f9f9f9",padding:"5px 20px 5px 20px"}},void 0,ty("div",{style:{padding:"0 0 0 0"}},void 0,(this.state.bankMatchResult.matches||[]).length>0?ty("div",{},void 0,ty("div",{style:{display:"flex",fontWeight:500,padding:"4px 0"}},void 0,ty("div",{},void 0,I18n.translate("archive.bankmatch.found"))),(this.state.bankMatchResult.matches||[]).map(function(e,t){var n=e.bankDate||"",r=e.bankText||"",o=e.bankAccountName||"";return ty("div",{style:{display:"flex",padding:"2px 0",borderTop:"1px solid #eee"}},t,ty("div",{style:{width:"85px"}},void 0,n),ty("div",{},void 0,o," : ",r))})):ty("div",{style:{fontStyle:"italic"}},void 0,I18n.translate("archive.bankmatch.not.found")))):null,ty(gn.A,{show:x,title:I18n.translate("archive.magic.result.title"),onHide:function(){return t.setState({makeMagicFeedbackModal:!1})},onSubmit:function(){return t.setState({makeMagicFeedbackModal:!1})},noCancelBtn:!0,submitBtnText:"Ok"},void 0,P&&!!P.successCount&&ty("span",{className:"d-flex align-items-center"},void 0,ty(Dh.h,{style:{fontSize:"21px",marginRight:"5px"},"aria-hidden":"true"}),ty("b",{},void 0,I18n.translate("archive.magic.result.success",P.successCount))),P&&P.noMagic&&ty("span",{className:"d-flex align-items-center"},void 0,ty("b",{},void 0,I18n.translate("archive.magic.result.nothing"))),P&&!P.magicFailed&&!P.noMagic&&0===P.successCount&&ty("span",{className:"d-flex align-items-center"},void 0,ty("b",{},void 0,I18n.translate("archive.magic.result.nothing"))),P&&P.magicFailed&&ty("div",{},void 0,ty("span",{className:"d-flex align-items-center"},void 0,ty(Ih,{style:{fontSize:"21px",marginRight:"5px"},"aria-hidden":"true"}),ty("b",{},void 0,I18n.translate("archive.magic.result.failed"))),ty("p",{style:{marginTop:"10px"}},void 0,P.failedMessage))),ty(Uh.A,{fileDetails:o,plainTextDetails:h,mailDetails:v,einvoiceDetails:g,comments:y,onComment:this.handleComment,onAcceptEinvoice:this.sendEinvoiceAcceptance.bind(this),acceptingEinvoice:S,loading:w,companyXid:this.props.companyXid,xid:this.props.fileXid})))}}],[{key:"formatFolder",value:function(e){return ty(r.Fragment,{},void 0,e.typeInBox&&ty(Xv.h,{className:"phi","aria-hidden":"true"})||!e.deletable&&ty(Nh.h,{className:"phi","aria-hidden":"true"})||ty(Oh.h,{className:"phi","aria-hidden":"true"}),ty("span",{className:"ml-1"},void 0,e.label))}}])}(co.b);cy(dy,"propTypes",{fileXid:q().string.isRequired,companyXid:q().number.isRequired,animate:q().bool,magicItems:q().array,onBack:q().func.isRequired});const fy=(0,zn.Ng)(function(e){return{companyXid:e.companies.currentXid,company:e.companies.currentCompany,magicItems:e.transactions.magicItems,excludeTypes:e.defaults.excludeTransactionTypeIds,inbox:e.inbox}}
1,function(e){return{actions:(0,oo.zH)({fetchMagicMenuItems:hi.F$,fetchInbox:s.D1},e)}})((0,o.y)(dy));function py(e){return{type:Pl.qJ,data:e}}var my,vy=n(59257),hy=n(33910);function yy(e){return yy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yy(e)}function by(e,t,n,r){my||(my="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:my,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function gy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gy(Object(n),!0).forEach(function(t){Ay(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cy(r.key),r)}}function ky(e,t,n){return t=Py(t),function(e,t){if(t&&("object"==yy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Oy()?Reflect.construct(t,n||[],Py(e).constructor):t.apply(e,n))}function Oy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oy=function(){return!!e})()}function Ny(e,t,n,r){var o=xy(Py(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function xy(){return xy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Py(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},xy.apply(null,arguments)}
1function Py(e){return Py=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Py(e)}function Iy(e,t){return Iy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Iy(e,t)}function Ay(e,t,n){return(t=Cy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cy(e){var t=function(e,t){if("object"!=yy(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yy(t)?t:t+""}var jy=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ay(e=ky(this,t,[].concat(r)),"state",{converter:null,showText:null,cache:{},loading:!1}),Ay(e,"timer",null),Ay(e,"requestHelper",new j.g),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Iy(e,t)}(t,e),function(e,t,n){return t&&Sy(e.prototype,t),n&&Sy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){var e=this;Ny(t,"componentDidMount",this,3)([]),this.loadHelp(this.props.url),(0,hy.S)().then(function(t){return e._isMounted&&e.setState({converter:t})})}},{key:"componentWillUnmount",value:function(){Ny(t,"componentWillUnmount",this,3)([]),this.requestHelper.abortAll(),clearTimeout(this.timer)}},{key:"componentDidUpdate",value:function(e){e.url!==this.props.url&&this.loadHelp(this.props.url)}},{key:"loadHelp",value:function(e){var t=this;this.state.cache[e]||(clearTimeout(this.timer),this.requestHelper.abortAll(),this.setState({loading:!0}),this.timer=setTimeout(function(){t.requestHelper.registerRequest((0,Tp.hD)(e)).then(function(n){return t.setState({loading:!1,cache:wy(wy({},t.state.cache),{},Ay({},e,{helpText:n.body.helpText,title:n.body.pageTitle,extraTextId:n.body.extraHelpFileXid}))})}).catch(function(){return t.setState({loading:!1,helpText:null,title:""})})},500))}},{key:"render",value:function(){var e=this;return this.state.loading||!this.state.converter?by("p",{className:"text-center"},void 0,by(qn.A,{style:{fontSize:"2rem"}})):by("div",{className:"help-text-form"},void 0,by("p",{className:"help-text-form__title"},void 0,this.state.cache[this.props.url]&&this.state.cache[this.props.url].title),this.state.cache[this.props.url]?by("div",{},void 0,by("div",{className:"help-text-form__body",dangerouslySetInnerHTML:{__html:this.state.converter.makeHtml(this.state.cache[this.props.url].helpText)}}),this.state.cache[this.props.url].extraTextId&&by("button",{type:"button",className:"btn btn-link",onClick:function(){return e.setState({showText:e.state.cache[e.props.url].extraTextId})}},void 0,I18n.translate("assist.pagehelp.more")),by(gn.A,{show:null!==this.state.showText,class:"help-text-modal",bsSize:"lg",cancelBtnText:I18n.translate("button.close"),onHide:function(){return e.setState({showText:null})}},void 0,null!==this.state.showText&&by(vy.A,{xid:this.state.showText}))):null)}}])}(co.b);Ay(jy,"propTypes",{url:q().string});const Dy=(0,zn.Ng)(function(e){return{url:e.assistant.url}})(jy);function _y(e){return _y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_y(e)}var Ry;function Ty(e,t,n,r){Ry||(Ry="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ry,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Ey(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hy(r.key),r)}}function My(e,t,n){return t=zy(t),function(e,t){if(t&&("object"==_y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fy()?Reflect.construct(t,n||[],zy(e).constructor):t.apply(e,n))}function Fy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fy=function(){return!!e})()}function zy(e){return zy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},zy(e)}function By(e,t){return By=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},By(e,t)}function Hy(e){var t=function(e,t){if("object"!=_y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_y(t)?t:t+""}var Ly=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=My(this,t,[e])).handleGuideFinish=n.handleGuideFinish.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&By(e,t)}(t,e),function(e,t,n){return t&&Ey(e.prototype,t),n&&Ey(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"handleGuideFinish",value:function(){this.setState({runGuide:!1})}},{key:"render",value:function(){return Ty(Ku,{animate:this.props.animate},void 0,Ty("p",{className:"app-toolbar__subtitle"},void 0,I18n.translate("help.pagehelp")),Ty(Dy,{}),Ty("p",{className:"app-toolbar__subtitle"},void 0,I18n.translate("help.generichelp")),Ty("div",{className:"my-1 px-2"},void 0,Ty("div",{className:"pr-2 d-inline-block"},void 0,Ty(ro.Link,{to:{pathname:"https://www.youtube.com/channel/UC0PYJX38c37PY_qACW8g26A"},target:"_blank"},void 0,Ty("img",{src:"/images/regular_video.svg",width:"100%",alt:"Youtube channel"}))),Ty("div",{className:"d-inline-block",style:{width:270,verticalAlign:"top"}},void 0,Ty("p",{className:"h4"},void 0,I18n.translate("help.youtube.simple")),Ty("p",{},void 0,I18n.translate("help.youtube.simple.explain")))),Ty("p",{className:"app-toolbar__subtitle"},void 0,I18n.translate("assist.callme.header")),Ty(mm,{}),Ty(im,{}))}}])}(co.b);!function(e,t,n){(t=Hy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}
1(Ly,"propTypes",{animate:q().bool,onNavigate:q().func.isRequired,onHide:q().func,onBack:q().func});const $y=(0,zn.Ng)(function(e){return{runGuide:e.guide.run}},function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(Ly);function Xy(e){return{type:Pl.GS,data:e}}var Vy,qy=n(96540);function Uy(e){return Uy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uy(e)}function Wy(e,t,n,r){Vy||(Vy="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Vy,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Yy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ky(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yy(Object(n),!0).forEach(function(t){nb(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rb(r.key),r)}}function Qy(e,t,n){return t=eb(t),function(e,t){if(t&&("object"==Uy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Zy()?Reflect.construct(t,n||[],eb(e).constructor):t.apply(e,n))}function Zy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zy=function(){return!!e})()}function Jy(){return Jy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=eb(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Jy.apply(null,arguments)}function eb(e){return eb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},eb(e)}function tb(e,t){return tb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},tb(e,t)}function nb(e,t,n){return(t=rb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rb(e){var t=function(e,t){if("object"!=Uy(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Uy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Uy(t)?t:t+""}var ob=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),nb(n=Qy(this,t,[e]),"methods",{}),nb(n,"inputRefs",{}),n.validators=n.getValidators(),n.styles=[{text:I18n.translate("report.grants.singleyear"),value:""},{text:I18n.translate("report.grants.singleyear.short"),value:"yearshort"},{text:I18n.translate("report.grants.allyears"),value:"all"},{text:I18n.translate("report.grants.allyears.current"),value:"allpending"},{text:I18n.translate("report.grants.taxdeductions"),value:"taxdeductions"}],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tb(e,t)}(t,e),function(e,t,n){return t&&Gy(e.prototype,t),n&&Gy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=Jy(eb(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators(),this.styles=[{text:I18n.translate("report.grants.singleyear"),value:""},{text:I18n.translate("report.grants.singleyear.short"),value:"yearshort"},{text:I18n.translate("report.grants.allyears"),value:"all"},{text:I18n.translate("report.grants.allyears.current"),value:"allpending"},{text:I18n.translate("report.grants.taxdeductions"),value:"taxdeductions"}]}},{key:"getValidators",value:function(){return{fiscalYear:[Mu.A]}}},{key:"componentDidMount",value:function(){var e=null;!this.props.grantReport.fiscalYear&&this.props.years.length&&(e=Ky(Ky({},e),{},{fiscalYear:this.props.years[0].value})),e&&this.props.actions.updateGrantsReport(e),this.load()}},{key:"componentDidUpdate",value:function(e){if(this.props.grantReport!==e.grantReport||this.props.privateEquities!==e.privateEquities||this.props.years!==e.years){var t=null;!this.props.grantReport.fiscalYear&&this.props.years.length&&(t=Ky(Ky({},t),{},{fiscalYear:this.props.years[0].value})),t&&this.props.actions.updateGrantsReport(t)}this.load()}},{key:"load",value:function(){var e=this;this.props.grantReport.loading||this.props.grantReport.loaded||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport({type:p.qv,style:e.props.grantReport.style,year:e.props.grantReport.fiscalYear})})}},{key:"validate",value:function(){return this.inputRefs[2]?this.inputRefs[2].validate(this.props.grantReport.fiscalYear).then(function(e){return e.every(function(e){return e.valid})}):Promise.resolve(!0)}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e){var t=this;this.validate().then(function(n){if(n){var r={type:p.qv,style:t.props.grantReport.style,year:t.props.grantReport.fiscalYear,output:e};window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(r)),"_blank")}})}},{key:"render",value:function(){var e=this;return Wy(Ku,{animate:this.props.animate},void 0,Wy("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,Wy("div",{className:"container-fluid"},void 0,qy.createElement(Fe.H,{id:"trf-style",key:"trf-style",label:"parameters.reportstyle",labelKey:"text",ref:(0,Q.qP)(this.methods,this.inputRefs,4),value:this.props.grantReport.style,options:this.styles,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updateGrantsReport({style:t})}),noDeselect:!0}),(!this.props.grantReport.style||"yearshort"===this.props.grantReport.style||"taxdeductions"===this.props.grantReport.style)&&qy.createElement(Fe.H,{key:"inp",id:"trf-year",label:"parameters.year",labelKey:"text",value:this.props.grantReport.fiscalYear,ref:(0,Q.qP)(this.methods,this.inputRefs,2),options:this.props.years,validators:this.validators.fiscalYear,onChange:(0,Q._s)(this.methods,3,function(t){return e.props.actions.updateGrantsReport({fiscalYear:t})}),noDeselect:!0})),Wy("div",{className:"separator"}),Wy("div",{className:"container-fluid"},void 0,Wy("div",{className:"form-group"},void 0,Wy(su,{mode:"PDF",onClick:this.showReport.bind(this)}),Wy(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),Wy(su,{type:"submit"})))))}}])}(co.b);nb(ob,"propTypes",{years:q().arrayOf(q().shape({text:q().string,value:q().string})),animate:q().bool}),nb(ob,"defaultProps",{years:[]});const ib=(0,zn.Ng)(function(e){return{grantReport:e.grantReport,years:e.defaults.fiscalYearReportParams}},function(e){return{actions:(0,oo.zH)({updateGrantsReport:Xy,fetchLiveReport:Kc},e)}})(ob);var ab;function lb(e,t,n,r){ab||(ab="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ab,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var sb=[{helpName:"Giv adgang til ekstra bruger",navigateToCmsArticle:"docs_ekstra_bruger"},{helpName:"Giv adgang til revisor/bogholder",navigateToCmsArticle:"docs_giv_revisor_adgang"}];const cb=function(e){var t=e.animate,n=e.onNavigate;return lb(Ku,{animate:t},void 0,lb("p",{className:"app-toolbar__subtitle"},void 0,"/FAKTURERING"),lb("ul",{className:"reports-list"},void 0,sb.map(function(e){return lb("li",{},e.helpName,lb("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKe
1y=".concat(t))})},void 0,lb("div",{},void 0,lb(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),lb("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))};var ub;function db(e,t,n,r){ub||(ub="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ub,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var fb=[{helpName:"Introduktion",navigateToCmsArticle:"docs_ar_intro"},{helpName:"Enkeltmands/forening",navigateToCmsArticle:"docs_ar_enk"},{helpName:"Sammenligningstal",navigateToCmsArticle:"docs_ar_lastyear"},{helpName:"Sprog og design",navigateToCmsArticle:"docs_ar_lang_design"},{helpName:"Korrektion af primo egenkapital",navigateToCmsArticle:"docs_ek_primo"},{helpName:"iXBRL kan redigeres",navigateToCmsArticle:"docs_ar_edit_html"}];const pb=(0,zn.Ng)(function(e){return{runGuide:e.guide.run}},function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(function(e){var t=e.animate,n=e.onNavigate;return db(Ku,{animate:t},void 0,db("p",{className:"app-toolbar__subtitle"},void 0,"/OPSTILLING AF ÅRSRAPPORT"),db("ul",{className:"reports-list"},void 0,fb.map(function(e){return db("li",{},e.helpName,db("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,db("div",{},void 0,db(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),db("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))});function mb(e){return mb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mb(e)}var vb;function hb(e,t,n,r){vb||(vb="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:vb,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function yb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ob(r.key),r)}}function bb(e,t,n){return t=wb(t),function(e,t){if(t&&("object"==mb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gb()?Reflect.construct(t,n||[],wb(e).constructor):t.apply(e,n))}function gb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(gb=function(){return!!e})()}function wb(e){return wb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wb(e)}function Sb(e,t){return Sb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Sb(e,t)}function kb(e,t,n){return(t=Ob(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ob(e){var t=function(e,t){if("object"!=mb(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=mb(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mb(t)?t:t+""}var Nb=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),kb(n=bb(this,t,[e]),"state",{Zoom:null,base64:null,originalWidth:0,originalHeight:0,width:0,height:0,key:"initial",loading:!0,error:null}),kb(n,"container",r.createRef()),kb(n,"adjusted",!1),n.resizeHandler=W()(function(){return n.handleResize()},200),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sb(e,t)}(t,e),function(e,t,n){return t&&yb(e.prototype,t),n&&yb(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){var e=this;Promise.resolve().then(n.t.bind(n,63275,23)).then(function(t){return e.setState({Zoom:t.default})}),(0,Q.hs)(this.props.src).then(function(t){var n=t.base64,r=t.width,o=t.height,i=t.error;return e.setState({base64:n,originalWidth:r,originalHeight:o,loading:!1,error:i},function(){return e.resizeHandler()})})}},{key:"componentDidUpdate",value:function(e,t){t.key===this.state.key||this.adjusted||(this.resizeHandler(),this.adjusted=!0)}},{key:"handleResize",value:function(){if(this.container.current){var e=this.state.originalWidth/this.state.originalHeight,t=Math.min(this.container.current.clientWidth,this.state.originalWidth),n=t/e;this.setState({width:t,height:n,key:Math.random().toString()})}}},{key:"render",value:function(){var e=this.state,t=e.Zoom,n=e.base64,o=e.width,i=e.height,a=e.key,l=e.loading,s=e.error;return s?hb("div",{className:this.props.className+" mt-2 text-center",style:{fontSize:"18px"}},void 0,s):l?hb("div",{className:this.props.className+" mt-2 text-center",style:{fontSize:"36px"}},void 0,hb(qn.A,{})):r.createElement("div",{className:this.props.className,ref:this.container,onresize:this.resizeHandler},t&&n&&hb(t,{img:n,zoomScale:3,width:o,height:i},a))}}])}(r.PureComponent);const xb=Nb;var Pb,Ib=n(96540);function Ab(e,t,n,r){Pb||(Pb="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Pb,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Cb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return jb(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jb(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Db=function(e){var t=e.children,n=(0,r.useRef)(null),o=Cb((0,r.useState)(null),2),i=o[0],a=o[1];return(0,r.useEffect)(function(){n.current&&n.current.querySelectorAll("img").forEach(function(e){var t=e.src.split("=").pop().slice(0,-1);t<400&&e.classList.add("size-".concat(t,"x")),e.addEventListener("click",function(){return a(e.src)}),e.classList.add("cursor-pointer")})},[t]),Ib.createElement("div",{ref:n},t,Ab(gn.A,{title:"Zoom",bsSize:"lg",show:!!i,submitBtnText:I18n.translate("ok"),noCancelBtn:!0,onHide:function(){return a(null)},onSubmit:function(){return a(null)}},void 0,Ab(xb,{className:"app-toolbar__image-preview",src:i},i)))};const _b=function(e){var t=e.animate,n=e.articleKey,o=e.noPdf,i=void 0!==o&&o,s=new j.g,c=Cb((0,r.useState)(""),2),u=c[0],d=c[1],f=Cb((0,r.useState)(""),2)[1],p=Cb((0,r.useState)(""),2),m=p[0],v=p[1],h=function(e){s.registerRequest(function(e){return(0,a.RD)(l.v1B,{method:"get",queryData:{key:e}})}(e)).then(function(e){d(e.body.title),f(e.body.subtitle);var t=String(e.body.articleBody).replaceAll(/!\[(.*?)\]\((.*?)\)/g,function(e,t,n){return"![".concat(t,"](").concat((0,l.c43)(n),")")});v(t)})};return(0,r.useEffect)(function(){h(n)},[]),Ab(Ku,{animate:t},void 0,Ab("p",{className:"app-toolbar__subtitle"},void 0,u),!i&&Ab("a",{href:(0,l.sRL)(n),target:"_blank",rel:"noreferrer noopener"},void 0,Ab(su,{mode:"PDF"})),Ab("div",{className:"p-1 app-toolbar__md-editor"},void 0,Ab(Db,{},void 0,Ab(hy.z,{value:m,disabled:!0}))))};var Rb;function Tb(e,t,n,r){Rb||(Rb="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Rb,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Eb=[{helpName:I18n.translate("guide.bankreconcile"),navigateToCmsArticle:"docs_bankafstemning"},{helpName:"CSV-fil fra Nykredit",navigateToCmsArticle:"docs_bankreconcile_nykredit"},{helpName:"CSV-fil fra Danske Bank",navigateToCmsArticle:"docs_bankreconcile_danskebank"},{helpName:"CSV-fil fra Jyske Bank Erhverv",navigateToCmsArticle:"docs_bankreconcile_jyskebankerhverv"}];const Mb=function(e){var t=e.animate,n=e.onNavigate;return Tb(Ku,{animate:t},void 0,Tb("p",{className:"app-toolbar__subtitle"},void 0,"/Bankafstemning"),Tb("ul",{className:"reports-list"},void 0,Eb.map(function(e){return Tb("li",{},e.helpName,Tb("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKe
1y=".concat(t))})},void 0,Tb("div",{},void 0,Tb(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),Tb("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))};var Fb,zb,Bb,Hb;function Lb(){return Lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lb.apply(null,arguments)}function $b(e){return r.createElement("svg",Lb({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 27 32"},e),Fb||(Fb=r.createElement("path",{fill:"#dcccb9",d:"M12 0h3.2v32H12V0z"})),zb||(zb=r.createElement("path",{fill:"#c9b69f",d:"M14.4.8v30.4h-1.6V.8h1.6zM12 0v32h3.2V0H12z"})),Bb||(Bb=r.createElement("path",{fill:"#fff",d:"M0 3.2h24L27.2 8 24 12.8H0L3.2 8 0 3.2z"})),Hb||(Hb=r.createElement("path",{fill:"#c1cdd6",d:"M3.2 8L0 3.2h24L27.2 8 24 12.8H0L3.2 8zM1.495 4l2.667 4-2.667 4h22.077l2.667-4-2.667-4H1.495z"})))}n.p;var Xb,Vb;function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qb.apply(null,arguments)}function Ub(e){return r.createElement("svg",qb({width:"1em",height:"1em",viewBox:"0 0 40 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Xb||(Xb=r.createElement("path",{d:"M.322 6.903C.598 2.93 3.957 0 7.938 0h24.124c3.98 0 7.34 2.931 7.616 6.903C39.856 9.467 40 12.59 40 16c0 3.41-.144 6.533-.322 9.097C39.402 29.07 36.043 32 32.062 32H7.938c-3.98 0-7.34-2.931-7.616-6.903A132.092 132.092 0 010 16c0-3.41.144-6.533.322-9.097z",fill:"red"})),Vb||(Vb=r.createElement("path",{d:"M15 21.326V10.674a1 1 0 011.474-.88l9.89 5.325a1 1 0 010 1.762l-9.89 5.325a1 1 0 01-1.474-.88z",fill:"#fff"})))}n.p;var Wb;function Yb(e,t,n,r){Wb||(Wb="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Wb,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Kb=[{helpName:"For begyndere - introduktion",navigateToCmsArticle:"docs_begyndere_introduktion"},{helpName:"For begyndere - bogføring",navigateToCmsArticle:"docs_begyndere_bogføring"},{helpName:"For begyndere - rapporter",navigateToCmsArticle:"docs_begyndere_rapporter"},{helpName:"For begyndere - skat og resultat",navigateToCmsArticle:"docs_begyndere_skat_resultat"},{helpName:"For begyndere - afstemning",navigateToCmsArticle:"docs_begyndere_afstemning"},{helpName:I18n.translate("guide.bookkeeping.oper"),navigateToCmsArticle:"docs_bogfoering_driftsselskab"},{helpName:I18n.translate("guide.bookkeeping.holding"),navigateToCmsArticle:"docs_bogfoering_holdingselskab"},{helpName:I18n.translate("guide.bankreconcile"),navigateToCmsArticle:"docs_bankafstemning"},{helpName:I18n.translate("guide.inbox"),navigateToCmsArticle:"docs_inbox"}];const Gb=(0,zn.Ng)(function(e){return{runGuide:e.guide.run}},function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(function(e){var t=e.animate,n=e.onNavigate,r=e.runGuide,o=e.actions;return Yb(Ku,{animate:t},void 0,Yb("p",{className:"app-toolbar__subtitle"},void 0,"/KOM GODT I GANG"),Yb("ul",{className:"reports-list"},void 0,Yb("li",{},void 0,Yb("button",{className:"btn icon-button btn-block",type:"button",onClick:function(){return o.toggleGuide(!r)}},void 0,Yb($b,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),I18n.translate("tour.basic.title"))),Yb("li",{},void 0,Yb(ro.Link,{to:{pathname:"https://www.youtube.com/channel/UC0PYJX38c37PY_qACW8g26A"},target:"_blank"},void 0,Yb("div",{className:"btn icon-button btn-block",type:"button"},void 0,Yb(Ub,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),I18n.translate("help.youtube.simple")))),Kb.map(function(e){return Yb("li",{},e.helpName,Yb("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKe
1y=".concat(t))})},void 0,Yb("div",{},void 0,Yb(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),Yb("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))});var Qb;function Zb(e,t,n,r){Qb||(Qb="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Qb,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Jb=[{helpName:"Årets skat og resultatdisponering",navigateToCmsArticle:"docs_skat_resultatdisponering"},{helpName:"Sambeskatning",navigateToCmsArticle:"docs_sambeskatning"}];const eg=function(e){var t=e.animate,n=e.onNavigate;return Zb(Ku,{animate:t},void 0,Zb("p",{className:"app-toolbar__subtitle"},void 0,"/SELSKABSSKAT"),Zb("ul",{className:"reports-list"},void 0,Jb.map(function(e){return Zb("li",{},e.helpName,Zb("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,Zb("div",{},void 0,Zb(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),Zb("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))};var tg;function ng(e,t,n,r){tg||(tg="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:tg,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var rg=[{helpName:I18n.translate("guide.sales"),navigateToCmsArticle:"docs_salg_fakturering"},{helpName:"Varetyper",navigateToCmsArticle:"docs_varetyper"},{helpName:"Tilpasning af mails til kunder",navigateToCmsArticle:"invoice_text_replace"},{helpName:"Tilgodehavender ved opstart",navigateToCmsArticle:"docs_sales_startup"},{helpName:"Registrere modtagne betalinger",navigateToCmsArticle:"docs_indbetaling_udstedt_faktura"},{helpName:"Registrere modtagne betalinger (valuta)",navigateToCmsArticle:"docs_indbetaling_valuta"},{helpName:"Registrere modtagne betalinger (kontanter)",navigateToCmsArticle:"docs_indbetaling_kontant"},{helpName:"Registrere modtagne betalinger (gebyr)",navigateToCmsArticle:"docs_indbetaling_gebyr"},{helpName:"Afregning af udstedt kreditnota",navigateToCmsArticle:"docs_udbetale_kreditnota"},{helpName:"Introduktion til e-fakturaer",navigateToCmsArticle:"docs_efaktura_intro"},{helpName:"Gavekort",navigateToCmsArticle:"docs_giftcards"},{helpName:"Udlejning/ejendomme",navigateToCmsArticle:"docs_faktura_udlejning"},{helpName:"E-fakturaer i Multi-Regnskab",navigateToCmsArticle:"docs_efaktura_multiregnskab"},{helpName:"Betaling via MobilePay",navigateToCmsArticle:"docs_mobilepay"},{helpName:"Fakturaer der allerede er betalt",navigateToCmsArticle:"docs_sales_alreadypaid"}];const og=function(e){var t=e.animate,n=e.onNavigate;return ng(Ku,{animate:t},void 0,ng("p",{className:"app-toolbar__subtitle"},void 0,"/FAKTURERING"),ng("ul",{className:"reports-list"},void 0,rg.map(function(e){return ng("li",{},e.helpName,ng("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,ng("div",{},void 0,ng(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),ng("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))};var ig;function ag(e,t,n,r){ig||(ig="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ig,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var lg=[{helpName:"Flyt fra e-conomic",navigateToCmsArticle:"docs_flytning_economic"},{helpName:"Flyt fra Dinero",navigateToCmsArticle:"docs_flytning_dinero"},{helpName:"Arkivér e-conomic filer",navigateToCmsArticle:"docs_economic_eksport"},{helpName:"Indlæs kontoplan",navigateToCmsArticle:"docs_accounts_scratch"},{helpName:"Kontoplan fra Excel-ark",navigateToCmsArticle:"docs_kontoplan_indlaesning"}];const sg=(0,zn.Ng)(function(e){return{runGuide:e.guide.run}},function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(function(e){var t=e.animate,n=e.onNavigate;return ag(Ku,{animate:t},void 0,ag("p",{className:"app-toolbar__subtitle"}
1,void 0,"/FLYT FRA ANDET SYSTEM"),ag("ul",{className:"reports-list"},void 0,lg.map(function(e){return ag("li",{},e.helpName,ag("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,ag("div",{},void 0,ag(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),ag("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))});var cg;function ug(e,t,n,r){cg||(cg="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:cg,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var dg=[{helpName:"Danløn",navigateToCmsArticle:"docs_danloen"},{helpName:"Salary",navigateToCmsArticle:"docs_salary"}];const fg=function(e){var t=e.animate,n=e.onNavigate;return ug(Ku,{animate:t},void 0,ug("p",{className:"app-toolbar__subtitle"},void 0,"/LØNNINGER"),ug("ul",{className:"reports-list"},void 0,dg.map(function(e){return ug("li",{},e.helpName,ug("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,ug("div",{},void 0,ug(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),ug("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))};var pg;function mg(e,t,n,r){pg||(pg="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:pg,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var vg=[{helpName:"Introduktion til ejerandele",navigateToCmsArticle:"docs_introduktion_ejerandele"},{helpName:"Almindeligt udbytte",navigateToCmsArticle:"docs_udbytte_ejerandel"},{helpName:"Skævt udbytte",navigateToCmsArticle:"docs_skævt_udbytte"}];const hg=(0,zn.Ng)(function(e){return{runGuide:e.guide.run}},function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(function(e){var t=e.animate,n=e.onNavigate;return mg(Ku,{animate:t},void 0,mg("p",{className:"app-toolbar__subtitle"},void 0,"/UNOTEREDE EJERANDELE"),mg("ul",{className:"reports-list"},void 0,vg.map(function(e){return mg("li",{},e.helpName,mg("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,mg("div",{},void 0,mg(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),mg("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))});var yg,bg,gg,wg;function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sg.apply(null,arguments)}function kg(e){return r.createElement("svg",Sg({width:"1em",height:"1em",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),yg||(yg=r.createElement("path",{d:"M8 0h31a1 1 0 011 1v38a1 1 0 01-1 1H8V0z",fill:"#0087E3"})),bg||(bg=r.createElement("path",{fill:"#DDD",d:"M6 2h32v36H6z"})),gg||(gg=r.createElement("path",{fill:"#fff",d:"M3 2h32v36H3z"})),wg||(wg=r.createElement("path",{d:"M0 1a1 1 0 011-1h31v40H1a1 1 0 01-1-1V1z",fill:"#1C9EF6"})))}n.p;var Og;function Ng(e,t,n,r){Og||(Og="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Og,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var xg=Ng(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),Pg=[{helpName:"Kom godt i gang",navigateToFolderName:"help-begin"},{helpName:"Arbejd smart",navigateToFolderName:"help-smart"},{helpName:"Fakturering",navigateToFolderName:"help-invoicing"},{helpName:"Adgangsstyring",navigateToFolderName:"help-accesscontrol"},{helpName:"Moms",navigateToFolderName:"help-vat"},{helpName:"Bankafstemning",navigateToFolderName:"help-bankreconcile"},{helpName:"Flyt fra andet system",navigateToFolderName:"help-migrate"},{helpName:"Aktier og obligationer",navigateToFolderName:"help-stocks"},{helpName:"Unoterede ejerandele",navigateToFolderName:"help-privatelyheld"},{helpName:"Lønninger",navigateToFolderName:"help-payroll"},{helpName:"Selskabsskat",navigateToFolderName:"help-company-tax"},{helpName:"Opstilling af årsrapport",navigateToFolderName:"help-annual-report"},{helpName:"Anlægsaktiver",navigateToCmsArticle:"docs_anlaegsaktiver"},{helpName:"Mobil-apps",navigateToCmsArticle:"docs_apps"},{helpName:"Penge til selskabet",navigateToCmsArticle:"docs_penge_til_selskabet"},{helpName:"Indkøbskurve, bestil og betal",navigateToCmsArticle:"docs_main_buy_pay"},{helpName:"Indkøbskurve for revisorer/bogholdere",navigateToCmsArticle:"docs_admins_buy_pay"}];const Ig=function(e){var t=e.animate,n=e.onNavigate;return Ng(Ku,{animate:t},void 0,Ng("p",{className:"app-toolbar__subtitle"},void 0,I18n.translate("help.pagehelp")),Ng(Dy,{}),Ng("div",{className:"separator mb-0"}),Ng("p",{className:"app-toolbar__subtitle"},void 0,I18n.translate("help.subjects")),Ng("ul",{className:"reports-list"},void 0,Pg.map(function(e){return Ng("li",{},e.helpName,Ng("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:function(){return e.navigateToFolderName?n(e.navigateToFolderName):(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKe
1y=".concat(t))})();var t}},void 0,Ng("div",{},void 0,e.navigateToCmsArticle?xg:Ng(kg,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),Ng("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})))})))};var Ag;function Cg(e,t,n,r){Ag||(Ag="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ag,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var jg=[{helpName:"Bogfør fra bankafstemning",navigateToCmsArticle:"docs_bank_book"},{helpName:"Videresend bilag automatisk",navigateToCmsArticle:"docs_mail_forward"},{helpName:"Tastatur-genveje",navigateToCmsArticle:"docs_smart_shortcuts"},{helpName:"Indlæs debet/kredit fra fil",navigateToCmsArticle:"docs_import_from_file"},{helpName:"Indlæs fra MobilePay",navigateToCmsArticle:"docs_smart_mobilepay"},{helpName:"Mine bilagstyper",navigateToCmsArticle:"docs_bilagstyper"}];const Dg=(0,zn.Ng)(function(e){return{runGuide:e.guide.run}},function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(function(e){var t=e.animate,n=e.onNavigate;return Cg(Ku,{animate:t},void 0,Cg("p",{className:"app-toolbar__subtitle"},void 0,"/ARBEJD SMART"),Cg("ul",{className:"reports-list"},void 0,jg.map(function(e){return Cg("li",{},e.helpName,Cg("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,Cg("div",{},void 0,Cg(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),Cg("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))});var _g;function Rg(e,t,n,r){_g||(_g="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:_g,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Tg=[{helpName:I18n.translate("guide.securitiesgeneric"),navigateToCmsArticle:"docs_aktier_selskab"},{helpName:"Aktier i Multi-Regnskab, introduktion",navigateToCmsArticle:"docs_aktiermr"},{helpName:"Værdipapirer, automatik",navigateToCmsArticle:"docs_vaerdipapirer_automatik"},{helpName:"Nordnet specifikt",navigateToCmsArticle:"docs_nordnet"},{helpName:"Saxo Bank specifikt",navigateToCmsArticle:"docs_saxo"},{helpName:"Danske Bank specifikt",navigateToCmsArticle:"docs_danskebank"},{helpName:"Nordea specifikt",navigateToCmsArticle:"docs_nordea"},{helpName:"Nykredit specifikt",navigateToCmsArticle:"docs_nykredit"},{helpName:"Jyske Bank specifikt",navigateToCmsArticle:"docs_jyskebank"},{helpName:"Sydbank specifikt",navigateToCmsArticle:"docs_sydbank"},{helpName:"Sparekassen Kronjylland specifikt",navigateToCmsArticle:"docs_kronjylland"},{helpName:"Carnegie specifikt",navigateToCmsArticle:"docs_carnegie"},{helpName:"HSBC specifikt",navigateToCmsArticle:"docs_hsbc"}];const Eg=(0,zn.Ng)(function(e){return{runGuide:e.guide.run}},function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(function(e){var t=e.animate,n=e.onNavigate;return Rg(Ku,{animate:t},void 0,Rg("p",{className:"app-toolbar__subtitle"},void 0,"/AKTIER"),Rg("ul",{className:"reports-list"},void 0,Tg.map(function(e){return Rg("li",{},e.helpName,Rg("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKey=".concat(t))})},void 0,Rg("div",{},void 0,Rg(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),Rg("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))});var Mg;function Fg(e,t,n,r){Mg||(Mg="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Mg,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var zg=[{helpName:I18n.translate("guide.vat"),navigateToCmsArticle:"docs_moms_mr"},{helpName:"Delvist momsfradrag",navigateToCmsArticle:"docs_delvist_momsfradrag"},{helpName:"Momskoder",navigateToCmsArticle:"docs_momskoder"}];const Bg=function(e){var t=e.animate,n=e.onNavigate;return Fg(Ku,{animate:t},void 0,Fg("p",{className:"app-toolbar__subtitle"},void 0,"/MOMS"),Fg("ul",{className:"reports-list"},void 0,zg.map(function(e){return Fg("li",{},e.helpName,Fg("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between",onClick:(t=e.navigateToCmsArticle,function(){return n("helpArticle?articleKe
1y=".concat(t))})},void 0,Fg("div",{},void 0,Fg(ru.h,{"aria-hidden":"true",className:"phi phi-fw mr-1"}),e.helpName),Fg("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})));var t})))};var Hg,Lg,$g,Xg=n(88482),Vg=n.n(Xg),qg=n(35451),Ug=n.n(qg),Wg=n(85667);function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yg.apply(null,arguments)}function Kg(e){return r.createElement("svg",Yg({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),Hg||(Hg=r.createElement("path",{fill:"#ddd",d:"M0 20.8h32V24a8 8 0 01-8 8H8a8 8 0 01-8-8v-3.2z"})),Lg||(Lg=r.createElement("path",{fill:"#7ac59e",d:"M10.396 11.2c-1.201-2.833.805-6.4 2.401-8s3.2-3.2 3.2-3.2l3.2 3.2c1.601 1.6 3.6 5.167 2.399 8-.781 1.842-3.503 4-5.599 4s-4.82-2.158-5.601-4z"})),$g||($g=r.createElement("path",{fill:"#59a48f",d:"M15.2 8.8L16 8l.8.8v12h-1.6v-12z"})))}n.p;function Gg(e){var t=e.companyXid,n=e.careful;return(0,a.RD)(l.sCS,{method:"post",data:{companyXid:t,careful:n}})}function Qg(e){return{type:"SET_INBOX_SEARCH_TEXT",payload:e}}var Zg,Jg=function(e){return{type:"UPDATE_INBOX_FILES",payload:e}};function ew(e){return ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ew(e)}function tw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tw(Object(n),!0).forEach(function(t){rw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ew(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ew(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ew(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ow(e,t,n,r){Zg||(Zg="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Zg,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function iw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return aw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aw(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const lw=function(e){var t=e.options,n=e.onSelect,o=e.disabled,i=e.buttonContent,a=e.closeOnSelect,l=void 0===a||a,s=e.buttonStyling,c=iw((0,r.useState)(!1),2),u=c[0],d=c[1],f=iw((0,r.useState)(-1),2),p=f[0],m=f[1],v=(0,r.useRef)(null),h=(0,r.useRef)(null),y=(0,r.useRef)([]),b=function(e){n(e),l&&(d(!1),v.current.focus())},g=function(e){if(!o)switch(e.key){case" ":e.preventDefault(),d(function(e){return!e});break;case"Escape":d(!1);break;case"ArrowDown":u?(e.preventDefault(),m(function(e){return e<2?e+1:0})):(e.preventDefault(),d(!0));break;case"ArrowUp":u?(e.preventDefault(),m(function(e){return e>0?e-1:2})):d(!0);break;case"Tab":u&&e.preventDefault()}};(0,r.useEffect)(function(){u&&-1!==p&&y.current[p]&&y.current[p].focus()},[u,p]),(0,r.useEffect)(function(){var e=function(e){!h.current||h.current.contains(e.target)||v.current.contains(e.target)||d(!1)};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[]),(0,r.useLayoutEffect)(function(){if(u&&v.current&&h.current){var e=v.current.getBoundingClientRect(),t=h.current;t.style.position="fixed",t.style.top="".concat(e.bottom,"px"),t.style.left="".concat(e.left,"px"),requestAnimationFrame(function(){var e=t.getBoundingClientRect(),n=e.left+e.width>window.innerWidth,r=e.left<0;if(n){var o=window.innerWidth-e.width-10;t.style.left="".concat(o,"px")}r&&(t.style.left="10px")})}},[u]);var w=u&&r.createElement("ul",{ref:h,className:"common-dropdown-button btn-group dropdown-menu",role:"menu"},t.map(function(e,t){return e.divider?ow("div",{className:"divider"},e.key):r.createElement("li",{key:e.key,role:"menuitem",tabIndex:0,ref:function(e){return y.current[t]=e},onClick:function(t){"INPUT"!==t.target.tagName&&(t.preventDefault(),t.stopPropagation()),b(e.key)},onKeyDown:function(t){"Enter"===t.key||" "===t.key||"Tab"===t.key?(t.preventDefault(),t.stopPropagation(),b(e.key)):g(t)}},e.icon,e.label)}));return ow("div",{className:"btn-group"},void 0,r.createElement("button",{className:"btn btn-action-primary btn-action__square",ref:function(e){v.current=e},onClick:function(e){e.preventDefault(),d(!u)},onKeyDown:g,style:nw({marginTop:"0px",width:"38px",height:"38px",paddingRight:"10px",paddingLeft:"10px",cursor:o?"not-allowed":"pointer"},s),disabled:"DKK"===o,"aria-haspopup":"true","aria-expanded":u},i),G.createPortal(w,document.body))};var sw;function cw(e,t,n,r){sw||(sw="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:sw,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const uw=function(e){var t=e.isLoading,n=e.loadingText,r=e.children,o=e.disabled,i=e.onClick,a=e.type,l=void 0===a?"button":a,s=e.variant,c=void 0===s?"primary":s,u=e.className,d=void 0===u?"":u;return cw("button",{type:l,style:e.style,className:"btn btn-".concat(c," ").concat(d),disabled:o||t,onClick:i},void 0,t?cw("span",{},void 0,n," ",cw(qn.A,{})):r)};var dw,fw,pw=n(95468);function mw(e,t,n,r){dw||(dw="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:dw,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function vw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hw(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yw(e){var t=e.item,n=e.companyXid,o=vw((0,r.useState)(null),2),i=o[0],s=o[1],c=vw((0,r.useState)(!1),2),u=c[0],d=c[1],f=vw((0,r.useState)(null),2),p=f[0],m=f[1];if(!t.indicatorType)return null;var v=t.indicatorType,h=new j.g,y=function(){d(!0),h.registerRequest(function(e){var t=e.companyXid,n=e.xid;return(0,a.RD)(l.uGi,{method:"post",data:{companyXid:t,xid:n}})}({companyXid:n,xid:t.xid})).then(function(e){return s(e.body)}).catch(function(){return m("Kunne ikke hente fejlbeskrivelsen. Prøv igen senere.")}).finally(function(){return d(!1)})},b=mw("i","MAGIC_INFO"===v?{className:"fa fa-info-circle text-info fa-lg fa-fw","aria-hidden":"true"}:{className:"fa fa-fw fa-warning text-warning","aria-hidden":"true"}),g="MAGIC_INFO"===v?"Info om magikørsel ":"Magi lykkedes ikke ";return mw("div",{onClick:function(e){return e.stopPropagation()}},void 0,i?mw(gn.A,{title:g+i.dateTime,show:Boolean(i),onHide:function(){return s(null)},cancelBtnText:I18n.translate("button.close")},void 0,mw("div",{style:{whiteSpace:"pre-line"}},void 0,i.textMessage)):null,p?mw(gn.A,{title:"Fejl ved hentning af fejlbeskrivelsen",show:Boolean(p),onHide:function(){return m(null)},cancelBtnText:I18n.translate("button.close")},void 0,mw("div",{},void 0,p)):null,mw("a",{className:"btn btn-action-primary mr-1","aria-label":"See error details",onClick:function(e){e.stopPropagation(),y()}},void 0,u?mw(qn.A,{}):b))}function bw(e,t,n,r){fw||(fw="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:fw,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function gw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ww(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ww(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ww(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Sw(e){var t=e.item,n=e.companyXid,o=e.onMarkNotDuplicate,i=gw((0,r.useState)(null),2),s=i[0],c=i[1],u=gw((0,r.useState)(!1),2),d=u[0],f=u[1],p=gw((0,r.useState)(!0),2),m=p[0],v=p[1];if(!t.suspectedDuplicate)return null;var h=new j.g,y=function(){f(!0),h.registerRequest(function(e){var t=e.companyXid,n=e.xid;return(0,a.RD)(l.Gor,{method:"post",data:{companyXid:t,xid:n}})}({companyXid:n,xid:t.xid})).then(function(e){return c(e.body)}).finally(function(){return f(!1)})},b=bw(kh(),{id:"duplicate-tooltip"},void 0,I18n.translate("archive.duplicate.tooltip"));return bw("div",{onClick:function(e){return e.stopPropagation()}},void 0,bw(gn.A,{title:I18n.translate("archive.duplicate.dialog.title"),show:Boolean(s),onHide:function(){c(null),v(!0)},cancelBtnText:I18n.translate("button.close"),submitBtnText:I18n.translate("archive.duplicate.not"),onSubmit:function(){f(!0),o(t.xid),c(null),f(!1)}},void 0,s&&bw("div",{style:{whiteSpace:"pre-line"}},void 0,s.details)),d?bw("button",{className:"btn btn-action-primary mr-1"},void 0,bw(qn.A,{})):bw(wh(),{placement:"top",overlay:b,show:m},void 0,bw("button",{type:"button",className:"btn btn-action-primary mr-1","aria-label":"Se dublet detal
1jer",onClick:function(){v(!1),y()}},void 0,bw("span",{className:"fa fa-warning text-warning","aria-hidden":"true"}))))}var kw,Ow=n(96540);function Nw(e){return Nw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nw(e)}function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xw.apply(null,arguments)}function Pw(e,t,n,r){kw||(kw="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:kw,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Iw(e){return function(e){if(Array.isArray(e))return Aw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Aw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Aw(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Aw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Cw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cw(Object(n),!0).forEach(function(t){Mw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Dw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fw(r.key),r)}}function _w(e,t,n){return t=Tw(t),function(e,t){if(t&&("object"==Nw(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rw()?Reflect.construct(t,n||[],Tw(e).constructor):t.apply(e,n))}function Rw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rw=function(){return!!e})()}function Tw(e){return Tw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tw(e)}function Ew(e,t){return Ew=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ew(e,t)}function Mw(e,t,n){return(t=Fw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fw(e){var t=function(e,t){if("object"!=Nw(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Nw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nw(t)?t:t+""}var zw=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Mw(n=_w(this,t,[e]),"state",{files:[],uploadQueue:[],uploadedToServer:0,crashedFiles:0,createTransactions:!0,unzip:!1,split:!1,showMagicFeedbackModal:!1,makeMagicResponse:null,loadingMagicResponse:!1,loadingTestMagicResponse:!1,localSearchText:void 0}),Mw(n,"requestHelper",new j.g),Mw(n,"handleSearchInputChange",function(e){n.setState({localSearchText:e}),n.updateSearchTextDebounced(e)}),Mw(n,"updateSearchTextDebounced",W()(function(e){n.props.actions.setInboxSearchText(e),n.props.actions.fetchInbox(n.props.companyXid,e)},500)),Mw(n,"handleMarkNotDuplicate",function(e){var t,r,o,i=n.props.inbox.files.map(function(t){return t.id===e?jw(jw({},t),{},{suspectedDuplicate:!1}):t});n.props.actions.updateInboxFiles(i),n.requestHelper.registerRequest
1((t={companyXid:n.props.companyXid,xid:e},r=t.companyXid,o=t.xid,(0,a.RD)(l.GVy,{method:"post",data:{companyXid:r,xid:o}}))).catch(function(t){var r=n.props.inbox.files.map(function(t){return t.id===e?jw(jw({},t),{},{suspectedDuplicate:!0}):t});n.props.actions.updateInboxFiles(r)})}),n.handleTransaction=n.handleTransaction.bind(n),n.processUploadQueue=n.processUploadQueue.bind(n),n.uploadFile=n.uploadFile.bind(n),n.processingQueue=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ew(e,t)}(t,e),function(e,t,n){return t&&Dw(e.prototype,t),n&&Dw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){this.props.magicItems.length||this.props.actions.fetchMagicMenuItems(this.props.companyXid),this.props.inbox.loaded||this.props.inbox.loading||this.props.actions.fetchInbox(this.props.companyXid)}},{key:"handleMagic",value:function(){var e=this;this.setState({loadingMagicResponse:!0}),this.requestHelper.registerRequest(Gg({companyXid:this.props.companyXid,careful:!1})).then(function(t){return e.setState({makeMagicResponse:t.body,showMagicFeedbackModal:!0})}).finally(function(){return e.setState({loadingMagicResponse:!1})})}},{key:"handleCarefulMagic",value:function(){var e=this;this.setState({loadingMagicResponse:!0}),this.requestHelper.registerRequest(Gg({companyXid:this.props.companyXid,careful:!0})).then(function(t){return e.setState({makeMagicResponse:t.body,showMagicFeedbackModal:!0})}).finally(function(){return e.setState({loadingMagicResponse:!1})})}},{key:"handleTryMagic",value:function(){var e=this;this.setState({loadingTestMagicResponse:!0}),new Promise(function(e){return setTimeout(e,3e3)}).then(function(){}).finally(function(){return e.setState({loadingTestMagicResponse:!1})})}},{key:"handleTransaction",value:function(e,t){var n=this.props.magicItems.find(function(t){return t.xid===e});this.props.history.push({pathname:(0,Q.ID)("/work/ui"),state:{suggestion:{transactionTypeId:n?$h.QF:e,magic:n,attachmentsInCreate:[{name:t.fileName,xid:t.id}],formValues:[{inputName:"transactiondate",value:t.fileDate},{inputName:"description",value:t.fileName}].concat(Iw(t.totalAmount?[{inputName:"amount",value:t.totalAmount}]:[]))}}})}},{key:"updateProgress",value:function(e,t){var n=this;this.setState({files:this.state.files.map(function(r){if(r.id===t){var o=void 0===e.percent?100:e.percent;return 100===o&&100!==r.progress&&setTimeout(function(){n.setState(function(e){return{files:e.files.map(function(e){return e.id===t?jw(jw({},e),{},{hideProgress:!0}):e})}})},2e3),jw(jw({},r),{},{progress:o})}return r})})}},{key:"handleDrop",value:function(e){var t=this,n=Array.from(e).filter(function(e){return!t.state.files.some(function(t){return t.name===e.name})});if(0!==n.length){var r=n.map(function(e){return{file:e,name:e.name,id:"".concat(Date.now(),"-").concat(Math.random()),progress:0,status:"queued"}});this.setState(function(e){return{files:[].concat(Iw(e.files),Iw(r)),uploadQueue:[].concat(Iw(e.uploadQueue||[]),Iw(r))}},function(){t.processingQueue||t.processUploadQueue()})}}},{key:"processUploadQueue",value:function(){var e=this;if(!this.processingQueue){this.processingQueue=!0;var t=this.state.uploadQueue,n=void 0===t?[]:t;if(0!==n.length){var r=1-this.state.files.filter(function(e){return"uploading"===e.status}).length;if(r<=0)this.processingQueue=!1;else{var o=n.slice(0,r);this.setState(function(e){return{uploadQueue:e.uploadQueue.slice(r)}},function(){o.forEach(function(t){e.setState(function(e){return{files:e.files.map(function(e){return e.id===t.id?jw(jw({},e),{},{status:"uploading"}):e})}},function(){e.uploadFile(t)})}),e.processingQueue=!1})}}else this.processingQueue=!1}}},{key:"uploadFile",value:function(e){var t=this;this.requestHelper.registerRequest((0,s.QM)({file:e.file,folderXid:1,companyXid:this.props.companyXid,splitIntoIndividualPages:this.state.split,unzipZips:this.state.unzip,createTransactions:this.state.createTransactions},function(n){return t.updateProgress(n,e.id)})).then(function(n){t.setState(function(t){return{uploadedFiles:(t.uploadedFiles||0)+1,uploadedToServer:t.uploadedToServer+n.body.archiveFiles.length,files:t.files.map(function(t){return t.id===e.id?jw(jw({},t),{},{completed:!0,status:"completed"}):t})}},function(){t.processUploadQueue(),t.scheduleCleanup()})}).catch(function(){t.setState(function(t){return{crashedFiles:t.crashedFiles+1,files:t.files.map(function(t){return t.id===e.id?jw(jw({},t),{},{crushed:!0,status:"error"}):t})}},function(){t.processUploadQueue(),t.scheduleCleanup()})})}},{key:"scheduleCleanup",value:function(){var e=this;this.cleanupTimer&&clearTimeout(this.cleanupTimer),this.cleanupTimer=setTimeout(function(){e.state.files.every(function(e){return e.completed||e.crushed})?e.setState({files:[],uploadedToServer:0,crashedFiles:0}):e.setState(function(e){return{files:e.files.filter(function(e){return!e.completed&&!e.crushed})}})},5e3)}},{key:"render",value:function(){var e=this,t=this.state,n=t.files,r=t.uploadedToServer,o=t.crashedFiles,i=t.createTransactions,a=t.unzip,s=t.split,c=t.localSearchText,u=this.props.inbox,d=u.loading,f=u.files,p=u.lastUpdate,m=this.props.company.accessModeEdit,v=!this.props.accessObj.isLimitedToInvoicingAndDocuments(),h=function(e,t){return Pw("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"}},void 0,e,t?Pw("i",{className:"fa fa-check pull-right","aria-hidden":"true"}):null)},y=Pw(Vg(),{checked:i,onChange:function(){return e.setState({createTransactions:!i})}},void 0,I18n.translate("archive.create.transactions")),b=h(I18n.translate("archive.create.transactions"),i),g=Pw(Vg(),{checked:s,onChange:function(){return e.setState({split:!s})}}
1,void 0,I18n.translate("archive.split.into.individual.pages")),w=h(I18n.translate("archive.split.into.individual.pages"),s),S=Pw(Vg(),{checked:a,onChange:function(){return e.setState({unzip:!a})}},void 0,I18n.translate("archive.unzip.zips")),k=h(I18n.translate("archive.unzip.zips"),a),O=c||this.props.inbox.searchText;return Pw(Ku,{animate:this.props.animate},void 0,this.props.canAddFiles&&Pw("div",{className:"pt-2 pr-2 pl-2"},void 0,n.map(function(e){return!e.hideProgress&&Pw(Ug(),{bsStyle:(e.crushed?"danger":100===e.progress&&"success")||"",active:!e.crushed&&100!==e.progress,label:e.name,min:0,max:100,now:e.progress},e.id)}),r?Pw("p",{},void 0,I18n.translate("upload.uploaded",r)):null,o?Pw("p",{},void 0,I18n.translate("upload.failed",o)):null,Pw("div",{className:"mb-2"},void 0,Pw($n.m,{placeholder:I18n.translate("dropzone.dropinboxtool","Inbox"),onFileAdded:function(t){return e.handleDrop([t])},disablePreview:!0,useMoreSpacing:!0,multiple:!0})),Pw("div",{className:"d-flex mb-2",style:{columnGap:"8px"}},void 0,Pw("div",{className:"flex-grow-1",style:{maxHeight:"38px"}},void 0,Pw(je.x,{className:"inbox-search",placeholder:I18n.translate("work.filter.search"),value:void 0!==c?c:this.props.inbox.searchText||"",onChange:this.handleSearchInputChange})),Pw("div",{style:{display:"flex",columnGap:"8px",maxHeight:"38px"}},void 0,Pw(uw,{isLoading:this.state.loadingMagicResponse,onClick:function(){return e.handleMagic()},variant:"action-primary",className:"btn-action__square nofill"},void 0,Pw(Dh.h,{className:"mr-1",fontSize:14})," ",Pw("span",{},void 0,I18n.translate("archive.magic.try"))),Pw(lw,{options:[{key:"createTransactions",label:b},{key:"split",label:w},{key:"unzip",label:k},{key:"divider1",divider:!0},{key:"testMagic",label:Pw(uw,{isLoading:this.state.loadingTestMagicResponse,className:"gear-btn nofill",onClick:function(){return e.handleCarefulMagic()},variant:"default"},void 0,Pw(Dh.h,{className:"mr-1",fontSize:14}),Pw("span",{},void 0,"Forsigtig magi"))}],closeOnSelect:!1,onSelect:function(t){"testMagic"===t?e.handleTryMagic():e.setState(Mw({},t,!e.state[t]))},buttonContent:Pw(L.h,{className:"phi phi-settings_wheel_icon phi-lg fullstroke","aria-label":"Settings"})}))),Pw("div",{className:"mb-2"},void 0,this.state.createTransactions&&y,this.state.split&&g,this.state.unzip&&S),Pw(gn.A,{show:this.state.showMagicFeedbackModal,title:Pw("span",{className:"d-flex align-items-center"},void 0,I18n.translate("archive.magic.result.title")," "),onHide:function(){return e.setState({showMagicFeedbackModal:!1})},onSubmit:function(){return e.setState({showMagicFeedbackModal:!1})},noCancelBtn:!0,submitBtnText:"Ok"},void 0,this.state.makeMagicResponse&&this.state.makeMagicResponse.finishedWithoutBackgroundTask&&Pw("span",{className:"d-flex align-items-center"},void 0,Pw(Dh.h,{style:{fontSize:"21px",marginRight:"5px"},"aria-hidden":"true"}),Pw("b",{},void 0,I18n.translate("inbox.magic.result.nowaitfinish"))),this.state.makeMagicResponse&&this.state.makeMagicResponse.backgroundTaskStarted&&Pw("span",{className:"d-flex align-items-center"},void 0,Pw(Dh.h,{style:{fontSize:"21px",marginRight:"5px"},"aria-hidden":"true"}),Pw("b",{},void 0,I18n.translate("inbox.magic.result.background"))),this.state.makeMagicResponse&&this.state.makeMagicResponse.backgroundTaskBlockedByPending&&Pw("span",{className:"d-flex align-items-center"},void 0,Pw(Ih,{style:{fontSize:"21px",marginRight:"5px"},"aria-hidden":"true"}),Pw("b",{},void 0,I18n.translate("inbox.magic.result.blocked"))))),Pw("div",{className:"app-toolbar__report-container"},void 0,Pw("div",{style:{maxHeight:"100%",overflow:"auto"}},void 0,d&&Pw("div",{className:"text-center"},void 0,Pw(qn.A,{className:"mr-1"}),I18n.translate("inbox.loading"))||f.length&&Pw("ul",{className:"list-group my-0"},void 0,f.map(function(t){return Pw(Jd.A,{as:"li",className:"list-group-item inbox-link",item:{item:t,type:"inboxFile"},onClick:function(){return e.props.onNavigate("fileDetails/".concat(t.id))},canDrag:function(){return v}},t.id,function(){return Pw(Ow.Fragment,{},void 0,v&&Pw(Qd.h,{className:"phi phi-draganddrop_icon inbox-link__handle","aria-hidden":"true"}),Ow.createElement(pw.A,xw({},t,{className:"phi-3x"})),Pw("span",{className:"inbox-link__text"}
1,void 0,t.fileName," (",t.fileDate,")"),Pw(Sw,{item:t,companyXid:e.props.companyXid,onMarkNotDuplicate:e.handleMarkNotDuplicate}),Pw(yw,{item:t,companyXid:e.props.companyXid}),Pw("a",{className:"btn btn-action-primary mr-1","aria-label":"Download File",href:(0,l.i93)(t.id),onClick:function(e){return e.stopPropagation()},download:!0},void 0,Pw(xh.h,{className:"phi phi-list_actions_download no-fill","aria-hidden":"true"})),m&&Pw("div",{className:"d-inline-block",onClick:function(e){return e.stopPropagation()}},void 0,Pw(Wh.o,{className:"btn btn-action-primary",magicItems:e.props.magicItems,excludeTypes:e.props.excludeTypes,onClick:function(n){return e.handleTransaction(n,t)},footer:Pw("div",{},void 0,"Attachment: ",Pw("b",{},void 0,t.fileName)),withoutPlus:!0},void 0,Pw(Wg.h,{className:"phi phi-list_actions_plus no-fill","aria-hidden":"true"}))),null!=t.matchedMagicXid?Pw("div",{className:"mt-1",style:{background:"#f5f5f5",padding:"6px 8px",borderRadius:"4px",color:"#555"},onClick:function(e){return e.stopPropagation()}},void 0,t.matchedMagicName?Pw("div",{},void 0,Pw("b",{},void 0,t.matchedMagicName)):null,t.matchedMagicGuideText?Pw("div",{style:{whiteSpace:"pre-line"}},void 0,t.matchedMagicGuideText):null):null)})}))||Pw(Ow.Fragment,{},void 0,Pw("div",{className:"separator my-0"}),Pw("div",{className:"text-center mt-10"},void 0,Pw(Kg,{className:"phi phi-plant_empty_lists phi-3x","aria-hidden":"true"}),Pw("p",{className:"mt-2 font-md text-gray"},void 0,I18n.translate(O?"inbox.search.empty":"inbox.empty")))))),p?Pw("div",{className:"text-gray my-1 px-2"},void 0,Pw(bu,{start:p})):null)}}])}(Ow.PureComponent);const Bw=(0,zn.Ng)(function(e){return{companyXid:e.companies.currentXid,canAddFiles:e.companies.currentCompany.filesAdd,magicItems:e.transactions.magicItems,company:e.companies.currentCompany,excludeTypes:e.defaults.excludeTransactionTypeIds,inbox:e.inbox,currentScreen:e.menu.screens[e.menu.screens.length-1]}}
1,function(e){return{actions:(0,oo.zH)({fetchMagicMenuItems:hi.F$,fetchInbox:s.D1,setInboxSearchText:Qg,updateInboxFiles:Jg},e)}})((0,o.y)(zw));var Hw,Lw=n(35067),$w=n(48128),Xw=n(98541),Vw=n(98864),qw=n.n(Vw),Uw=n(14947),Ww=n(11148);function Yw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Kw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kw(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Gw(e,t,n,r){Hw||(Hw="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Hw,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Qw={value:[function(e){return e?(0,ze.A)().validate({value:e,options:{required:!1,forbidDecimals:!1}}):{valid:!0}}]},Zw={menubar:!1,branding:!1,entity_encoding:"raw",plugins:["advlist","autolink","lists","searchreplace","visualblocks","code","fullscreen","table"],toolbar:"bold italic backcolor | bullist numlist | removeformat"};var Jw=function(e){var t=e.show,n=e.onHide,o=e.data,i=e.onSave,a=e.onPreviewDocument,l=e.onDeleteDocument,s=e.onRenameDocument,c=Yw((0,r.useState)(null),2),u=c[0],d=c[1],f=Yw((0,r.useState)(""),2),p=f[0],m=f[1],v=Yw((0,r.useState)(!1),2),h=v[0],y=v[1],b=Yw((0,r.useState)(!1),2),g=b[0],w=b[1],S=Yw((0,r.useState)(null),2),k=S[0],O=S[1],N=Yw((0,r.useState)(!1),2),x=N[0],P=N[1],I=Yw((0,r.useState)(null),2),A=I[0],C=I[1],j=Yw((0,r.useState)(!1),2),D=j[0],_=j[1],R="function"==typeof l,T="function"==typeof s;(0,r.useEffect)(function(){o&&o.initialValue&&d(o.initialValue)},[o]);var E=function(){d(null),m(""),y(!1),w(!1),O(null),P(!1),C(null),_(!1)},M=function(e,t){P(!1),y(e),w(t)},F=(0,Q.Dg)(p),z=(0,r.useRef)(null),B=(0,r.useRef)(null);return Gw(qc(),{show:t,onHide:n,bsSize:"lg",className:"check-notes-modal"},void 0,Gw(qc().Header,{closeButton:!0},void 0,Gw(qc().Title,{className:"d-flex flex-wrap"},void 0,Gw("span",{className:"mr-5"},void 0,I18n.translate("checknote.dialog.title")),o&&Gw("div",{className:"ml-5"},void 0,!!o.msgOneParams.length&&Gw("span",{},void 0,I18n.translate(o.msgOneKey,o.msgOneParams[0])," ",!!o.msgTwoParams.length&&", "),!!o.msgTwoParams.length&&Gw("span",{},void 0,I18n.translate(o.msgTwoKey,o.msgTwoParams[0]))))),Gw(r.Fragment,{},void 0,Gw("form",{onSubmit:function(e){e.preventDefault();var t=o&&o.useMarkOptions;(t?k:h||g)?Promise.all([z.current.validate(u),{valid:F}]).then(Q.el).then(function(e){e&&F&&i(t?{checkedValue:u,textNote:p,controlMarkCode:k}:{checkedValue:u,textNote:p,valueNeedsAttention:h,valueValidatedOk:g}).then(E)}):P(!0)}},void 0,o&&Gw(qc().Body,{style:{maxHeight:600},className:"d-flex check-notes-modal__body"},void 0,Gw("div",{className:"d-flex flex-column check-notes-modal__column",style:{width:"50%"}},void 0,Gw("h5",{},void 0,I18n.translate("checknote.existing")),o.checkNoteEntries.length?Gw("div",{className:"d-flex flex-column pr-2",style:{maxHeight:"100%",overflowY:"auto"}},void 0,o.checkNoteEntries.map(function(e,t){var n=e.checkedValue,i=e.enteredWhen,l=e.enteredWho,c=e.textNote,u=e.valueNeedsAttention,d=e.controlMarkCode,f=e.documents;return Gw("div",{className:"mt-2",style:{position:"relative"}}
1,"".concat(i,"-").concat(t),Gw("p",{className:"my-0"},void 0,n),Gw("p",{className:"my-0"},void 0,i),Gw("p",{className:"my-0"},void 0,l),!o.useMarkOptions&&Gw("div",{dangerouslySetInnerHTML:{__html:c}}),Array.isArray(f)&&f.length>0?Gw("div",{className:"mt-2"},void 0,f.map(function(e){var t=e.docId;if(null==t||""===t)return null;var n=function(e){return e.enteredInitials?"".concat(e.name," (").concat(e.enteredInitials,")"):e.name}(e);return Gw(Uw.A,{archiveXid:t,fileName:n,nameForEdit:e.name,editable:R,onPreviewAttachment:function(e){"function"==typeof a&&a(e)},onRemoveAttachment:function(e){return C({docId:e,label:n})},onSaveName:T?s:void 0},t)})):null,o.useMarkOptions?Gw("div",{className:"mt-1"},void 0,function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).showDescription,r=void 0!==n&&n,o=function(e,t){return e&&t&&e.find(function(e){return e.markCode===t})||null}(t,e);return e?Gw("div",{className:"d-flex align-items-center"},void 0,Gw("span",{className:"book-control-balance-cell__mark",style:o&&o.markColor?{borderColor:o.markColor,color:o.markColor}:void 0},void 0,e),r&&Gw("span",{className:"ml-2"},void 0,o?o.markDescription:e)):null}(function(e){return e.controlMarkCode?e.controlMarkCode:e.valueValidatedOk?"OK":e.valueNeedsAttention?"OP":null}({controlMarkCode:d,valueNeedsAttention:u}),o.markOptions,{showDescription:!0})):Gw(r.Fragment,{},void 0,Gw("div",{className:"separator"}),Gw("div",{style:{width:20,height:20,borderRadius:6,backgroundColor:u?"red":"green",top:0,right:0,position:"absolute"}})))})):Gw("p",{},void 0,I18n.translate("checknote.none"))),Gw("div",{className:"check-notes-modal__divider","aria-hidden":"true"}),Gw("div",{className:"d-flex flex-column pl-2 check-notes-modal__column",style:{width:"50%"}},void 0,Gw("h5",{},void 0,I18n.translate("checknote.new")),Gw(Fn(),{},void 0,Gw(Rn(),{sm:4},void 0,r.createElement(je.x,{key:"value",label:I18n.translate("checknote.value"),ref:z,value:u,validators:Qw.value,onChange:d})),Gw(Rn(),{sm:8,className:x?"has-error":""},void 0,o.useMarkOptions?(o.markOptions||[]).map(function(e){var t="check-note-mark-".concat(e.markCode);return Gw("label",{htmlFor:t,className:"check-note-mark-radio"},e.markCode,Gw("input",{id:t,type:"radio",name:"checkNoteControlMark",className:"check-note-mark-radio__input",checked:k===e.markCode,onChange:function(){return t=e.markCode,P(!1),void O(t);var t}}),Gw("span",{className:"book-control-balance-cell__mark",style:e.markColor?{borderColor:e.markColor,color:e.markColor}:void 0},void 0,e.markCode),Gw("span",{className:"check-note-mark-radio__description"},void 0,e.markDescription))}):Gw(r.Fragment,{},void 0,Gw(En(),{checked:h,onChange:function(){return M(!0,!1)}},void 0,I18n.translate("checknote.needsattention")),Gw(En(),{checked:g,onChange:function(){return M(!1,!0)}},void 0,I18n.translate("checknote.validatedok"))),x&&Gw(qw(),{className:"text-danger"},void 0,I18n.translate("checknote.statusrequired")))),r.createElement(Ww.n,{size:"short",value:p||"",init:Zw,onChange:m,ref:B}),!F&&Gw("span",{className:"text-danger",style:{userSelect:"none"}},void 0,"Maksimum 900 tegn"))),Gw(qc().Footer,{},void 0,Gw("button",{className:"btn btn-default",type:"button",onClick:function(){E(),n()}},void 0,I18n.translate("button.close")),Gw("button",{className:"btn btn-primary ml-2"},void 0,I18n.translate("button.save"))))),Gw(gn.A,{show:null!=A,title:"Slet bilag?",submitBtnText:"Slet",btnClassName:"btn btn-danger",cancelBtnClassName:"btn btn-default",onSubmit:function(){A&&R&&(_(!0),l(A.docId).catch(function(){}).finally(function(){_(!1),C(null)}))},onHide:function(){D||C(null)},disableSubmit:D,processing:D},void 0,Gw("p",{className:"mb-0"},void 0,A?Gw(r.Fragment,{},void 0,"Vil du slette bilaget ",Gw("strong",{},void 0,A.label),"?"):null)))};Jw.defaultProps={show:!1,data:null,onPreviewDocument:null,onDeleteDocument:null,onRenameDocument:null};const eS=Jw;var tS,nS=n(52376),rS=n(95093),oS=n(96540);function iS(e){return iS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iS(e)}function aS(e,t,n,r){tS||(tS="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:tS,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function lS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?lS(Object(n),!0).forEach(function(t){vS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hS(r.key),r)}}function uS(e,t,n){return t=pS(t),function(e,t){if(t&&("object"==iS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dS()?Reflect.construct(t,n||[],pS(e).constructor):t.apply(e,n))}function dS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dS=function(){return!!e})()}function fS(){return fS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pS(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},fS.apply(null,arguments)}function pS(e){return pS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pS(e)}function mS(e,t){return mS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mS(e,t)}function vS(e,t,n){return(t=hS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hS(e){var t=function(e,t){if("object"!=iS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=iS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==iS(t)?t:t+""}var yS=function(e){return function(t){return e.isBetween(rS(t.fromDate,p.D2),rS(t.toDate,p.D2),null,"[]")}},bS=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),vS(n=uS(this,t,[e]),"state",{checkNote:null,errorMessageKey:null,errorModal:!1}),vS(n,"methods",{}),vS(n,"inputRefs",{}),vS(n,"requestHelper",new j.g),n.validators=n.getValidators(),n.isReportStyleWithFromAndToDates=n.props.sabReport.style===p.BH||n.props.sabReport.style===p.fI||n.props.sabReport.style===p.D0,n.styles=[{text:I18n.translate("resultandbalance.reportstyle.normal"),value:"resultandbalance"},{text:I18n.translate("resultandbalance.reportstyle.nice"),value:p.D0},{text:I18n.translate("resultandbalance.reportstyle.compare1"),value:"resultandbalancecompare1"},{text:I18n.translate("resultandbalance.reportstyle.xbrl"),value:"xbrlresultandbalance"}],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mS(e,t)}(t,e),function(e,t,n){return t&&cS(e.prototype,t),n&&cS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=fS(pS(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators()}},{key:"componentDidMount",value:function(){this.applySABDefaults()||this.load()}},{key:"componentDidUpdate",value:function(e){this.isReportStyleWithFromAndToDates=this.props.sabReport.style===p.BH||this.props.sabReport.style===p.fI||this.props.sabReport.style===p.D0,this.props.sabReport===e.sabReport&&this.props.date===e.date&&this.props.years===e.years&&this.props.fromDate===e.fromDate&&this.props.toDate===e.toDate||this.applySABDefaults()||this.load()}},{key:"applySABDefaults",value:function(){var e={};return this.props.sabReport.fromDate||(e.fromDate=this.props.fromDate||""),this.props.sabReport.toDate||(e.toDate=this.props.toDate||""),!this.props.sabReport.year&&this.props.years.length&&(e.year=this.props.years[0].value),!!Object.keys(e).length&&(this.props.actions.updateSABReport(e),!0)}},{key:"load",value:function(){var e=this;this.props.sabReport.loading||this.props.sabReport.loaded||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport(sS({},e.isReportStyleWithFromAndToDates?{type:e.props.sabReport.style,fromdate:rS(e.props.sabReport.fromDate,p.D2).format(p.D2),todate:rS(e.props.sabReport.toDate,p.D2).format(p.D2)}:{type:e.props.sabReport.style,year:e.props.sabReport.year}))})}},{key:"validate",value:function(){return Promise.all([this.inputRefs[8]?this.inputRefs[8].validate(this.props.sabReport.fromDate):Promise.resolve([{valid:!0}]),this.inputRefs[10]?this.inputRefs[10].validate(this.props.sabReport.toDate):Promise.resolve([{valid:!0}]),this.inputRefs[6]?this.inputRefs[6].validate(this.props.sabReport.year):Prom
1ise.resolve([{valid:!0}])]).then(Q.el)}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o=n.isReportStyleWithFromAndToDates?{fromdate:n.props.sabReport.fromDate,todate:n.props.sabReport.toDate}:{year:n.props.sabReport.year};o=sS(sS({},o),{},{output:e,type:n.props.sabReport.style}),t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"getValidators",value:function(){var e=this;return{year:[Mu.A],fromDate:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=rS(t,p.D2),o=rS(e.props.sabReport.toDate,p.D2);if(r.isAfter(o))return{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")};var i=e.props.fiscalYears.find(yS(r));return o&&i?{valid:yS(o)(i),message:I18n.translate("dates.same.fiscal.year")}:{valid:!!i,message:I18n.translate("work.edit.validate.insideyears")}}],toDate:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=rS(t,p.D2),o=rS(e.props.sabReport.fromDate,p.D2);if(r.isBefore(o))return{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")};var i=e.props.fiscalYears.find(yS(r));
1return o&&i?{valid:yS(o)(i),message:I18n.translate("dates.same.fiscal.year")}:{valid:!!i,message:I18n.translate("work.edit.validate.insideyears")}}]}}},{key:"navigateToDetails",value:function(e){var t=this;if(e){this.props.onBack();var n={financeAccount:e};this.isReportStyleWithFromAndToDates&&(n.fromDate=this.props.sabReport.fromDate,n.toDate=this.props.sabReport.toDate);var r=(0,Bc.As)(n);setTimeout(function(){return t.props.onNavigate("accountStatement?".concat(r))},300)}}},{key:"renderAnnualReportSums",value:function(){var e={PROFITLOSS_GROUP:"Results",DISTRIBUTION_GROUP:"Distribution",ASSET_GROUP:"Assets",LIABILITIES_GROUP:"Liabilities"},t=[],n=Math.max(80,(0,Q.k7)(this.props.sabReport.liveData,"primo")+20),r=Math.max(80,(0,Q.k7)(this.props.sabReport.liveData,"ultimo")+30);return this.props.sabReport.liveData.forEach(function(o,i,a){i&&a[i-1].xbrlGroup===o.xbrlGroup||t.push(aS("div",{className:"font-bold text-center",style:{padding:"5px 0"}},"".concat(i,"-header"),e[o.xbrlGroup])),t.push(aS("div",{className:"d-flex align-items-center"},i,aS("div",{className:"flex-grow-1 flex-shrink-1 pl-2 pr-1"},void 0,o.accountNumber," - ",o.accountName),aS("div",{className:"text-right flex-shrink-0 px-1",style:{width:n}},void 0,o.primo),aS("div",{className:"text-right flex-shrink-0 pr-2 pl-1",style:{width:r}},void 0,o.ultimo))),i+1<a.length&&a[i+1].xbrlName!==o.xbrlName&&t.push(aS("div",{className:"d-flex align-items-center font-bold mb-1"},i,aS("div",{className:"flex-grow-1 flex-shrink-1 pl-2 pr-1"},void 0,o.xbrlName),aS("div",{className:"text-right flex-shrink-0 pr-2 pl-1"},void 0,o.xbrlSum)))}),t}},{key:"handleCheckNote",value:function(e,t,n){var r=this,o=e.includes("_ULTIMO")?this.props.sabReport.toDate:this.props.sabReport.fromDate;this.requestHelper.registerRequest((0,$w.T6)({companyXid:this.props.companyXid,checkNoteType:e,whichDate:o,whichFinanceAccount:t})).then(function(i){r.setState({checkNote:sS(sS({},i.body),{},{checkNoteType:e,whichDate:o,whichFinanceAccount:t,initialValue:n})})}).catch(function(e){e.status===Z.BR&&r.setState({errorMessageKey:e.response.body.messageKey,errorModal:!0}),r.setState({checkNote:null})})}},{key:"handleAddCheckNote",value:function(e){var t=this,n=e.checkedValue,r=e.textNote,o=e.valueNeedsAttention,i=e.valueValidatedOk,a=e.controlMarkCode;return this.requestHelper.registerRequest((0,$w.gd)(sS(sS({},this.state.checkNote),{},{companyXid:this.props.companyXid,checkedValue:n,textNote:r,valueNeedsAttention:o,valueValidatedOk:i,controlMarkCode:a}))).then(function(){t.setState({checkNote:null})})}},{key:"refreshCheckNoteLookup",value:function(){var e=this,t=this.state.checkNote,n=this.props.companyXid;return t&&n?this.requestHelper.registerRequest((0,$w.T6)({companyXid:n,checkNoteType:t.checkNoteType,whichDate:t.whichDate,whichFinanceAccount:t.whichFinanceAccount})).then(function(n){e.setState({checkNote:sS(sS({},n.body),{},{checkNoteType:t.checkNoteType,whichDate:t.whichDate,whichFinanceAccount:t.whichFinanceAccount,initialValue:t.initialValue})})}):Promise.resolve()}},{key:"handlePreviewCheckNoteDocument",value:function(e){var t=this.props.companyXid;t&&null!=e&&this.props.actions.showArchiveFilePreview(e,null,t)}},{key:"handleDeleteCheckNoteDocument",value:function(e){var t=this,n=this.props.companyXid;return n&&null!=e?this.requestHelper.registerRequest((0,Lw.qj)({companyXid:n,id:e})).then(function(){return t.refreshCheckNoteLookup()}):Promise.resolve()}},{key:"handleRenameCheckNoteDocument",value:function(e,t){var n=this;return null==e?Promise.resolve():this.requestHelper.registerRequest((0,s.lU)({id:e,fileName:t})).then(function(){return n.refreshCheckNoteLookup()})}},{key:"render",value:function(){var e=this,t=Math.max(80,(0,Q.k7)(this.props.sabReport.liveData,"primoAsText")+20),n=Math.max(80,(0,Q.k7)(this.props.sabReport.liveData,"ultimoAsText")+30),o=!!this.props.sabReport.variables.find(function(e){var t=e.key,n=e.value;return"primochecknotes"===t&&"true"===n}),i=!!this.props.sabReport.variables.find(function(e){var t=e.key,n=e.value;return"ultimochecknotes"===t&&"true"===n}
1),a=this.state,l=a.checkNote,s=a.errorModal,c=a.errorMessageKey;return aS(Ku,{animate:this.props.animate},void 0,aS("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,2,this.handleSubmit.bind(this))},void 0,aS("div",{className:"container-fluid"},void 0,aS(Fn(),{},void 0,aS(Rn(),{xs:12},void 0,this.isReportStyleWithFromAndToDates?aS("div",{className:"d-flex"},void 0,aS("div",{style:{maxWidth:160}},void 0,oS.createElement(tu.$,{id:"asr-fromdate",key:"asr-fromdate",label:"parameters.fromdate",className:"mr-2",value:this.props.sabReport.fromDate,ref:(0,Q.qP)(this.methods,this.inputRefs,8),validators:this.validators.fromDate,pullRight:!0,onChange:(0,Q._s)(this.methods,9,function(t){return e.props.actions.updateSABReport({fromDate:t})})})),aS("div",{style:{maxWidth:160}},void 0,oS.createElement(tu.$,{id:"asr-todate",key:"asr-todate",label:"parameters.todate",value:this.props.sabReport.toDate,ref:(0,Q.qP)(this.methods,this.inputRefs,10),validators:this.validators.toDate,pullRight:!0,onChange:(0,Q._s)(this.methods,11,function(t){return e.props.actions.updateSABReport({toDate:t})})}))):oS.createElement(Zd.X,{id:"dividends-report-year",key:"dividends-report-year",label:"parameters.year",value:this.props.sabReport.year,ref:(0,Q.qP)(this.methods,this.inputRefs,6),val
1idators:this.validators.year,options:this.props.years,onChange:(0,Q._s)(this.methods,7,function(t){return e.props.actions.updateSABReport({year:t})})}))),aS(Fn(),{},void 0,aS(Rn(),{xs:6},void 0,oS.createElement(Zd.X,{id:"isabr-style",key:"isabr-style",label:"parameters.reportstyle",ref:(0,Q.qP)(this.methods,this.inputRefs,3),value:this.props.sabReport.style,options:this.styles,onChange:(0,Q._s)(this.methods,4,function(t){return e.props.actions.updateSABReport({style:t})})})))),aS("div",{className:"separator"}),aS("div",{className:"container-fluid"},void 0,aS("div",{className:"form-group"},void 0,aS(su,{mode:"PDF",onClick:this.showReport.bind(this)}),this.props.sabReport.style!==p.D0&&aS(r.Fragment,{},void 0,aS(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),aS(su,{type:"submit"})),aS(Su,{onClick:this.showReport.bind(this)})))),aS("div",{className:"separator mt-0"}),aS("div",{className:"app-toolbar__report-title"},void 0,aS("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),aS("span",{className:"mr-1"},void 0,I18n.translate("menu.resultandbalance")),aS("span",{},void 0,I18n.translate("report.miniversion"))),aS("div",{className:"rc-table-header d-flex align-items-center"},void 0,aS("div",{className:"rc-table-cell flex-grow-1 flex-shrink-1 pl-2 pr-1"},void 0,I18n.translate("text")),aS("div",{className:"rc-table-cell text-right flex-shrink-0 px-1",style:{width:t}},void 0,"resultandbalance"===this.props.sabReport.style?I18n.translate("primo"):I18n.translate("ultimo")),aS("div",{className:"rc-table-cell text-right flex-shrink-0 pr-2 pl-1",style:{width:n}},void 0,"resultandbalance"===this.props.sabReport.style?I18n.translate("ultimo"):"Sidste")),aS("div",{className:"app-toolbar__report-container",style:{overflow:"auto"}},this.props.sabReport.style,this.isReportStyleWithFromAndToDates?this.props.sabReport.liveData&&this.props.sabReport.liveData.map(function(r,a){var l="resultandbalancecompare1"===e.props.sabReport.style,s=r.accountNumber&&!r.sum?"app-toolbar__report_editable":"cursor-default",c=e.props.isPartOfPortfolio?s:"",u=l?r.ultimoAsText:r.primoAsText,d=l?r.compareUltimoAsText:r.ultimoAsText;return r.heading&&("1"===r.level&&aS("div",{className:"font-bold text-center",style:{padding:"5px 0"}},a,r.financeAccountText)||"2"===r.level&&aS("div",{className:"py-1"},a))||aS("div",{className:"d-flex align-items-center ".concat(r.sum?"font-bold":""," ").concat(r.subSum?"pt-2":"")},a,aS("div",{className:"flex-grow-1 flex-shrink-1 pl-2 pr-1 ".concat(s),tabIndex:0,onKeyPress:function(){return e.navigateToDetails(r.accountNumber)},onClick:function(){return e.navigateToDetails(r.accountNumber)}},void 0,r.financeAccountText),aS("div",{className:"text-right flex-shrink-0 px-1 ".concat(o?c:"cursor-default"," ").concat(r.primoAttentionNeeded?"app-toolbar__needs-attention":""," ").concat(r.primoValidatedOk?"app-toolbar__validated_ok":""),style:{width:t},role:"button",onClick:function(){o&&!r.sum&&e.handleCheckNote("FINANCE_ACCOUNT_PRIMO",r.accountNumber,u)}},void 0,u),aS("div",{className:"text-right flex-shrink-0 pr-2 pl-1 ".concat(i?c:"cursor-default"," ").concat(r.ultimoAttentionNeeded?"app-toolbar__needs-attention":""," ").concat(r.ultimoValidatedOk?"app-toolbar__validated_ok":""),style:{width:n},role:"button",onClick:function(){i&&!r.sum&&e.handleCheckNote("FINANCE_ACCOUNT_ULTIMO",r.accountNumber,d)}},void 0,d))}):aS("div",{},void 0,this.renderAnnualReportSums())),this.props.sabReport.lastUpdate?aS("div",{className:"text-gray my-1 px-2"},void 0,aS(bu,{start:this.props.sabReport.lastUpdate})):null,aS(eS,{show:!!l,onHide:function(){return e.setState({checkNote:null})},data:l,onSave:this.handleAddCheckNote.bind(this),onPreviewDocument:this.handlePreviewCheckNoteDocument.bind(this),onDeleteDocument:this.handleDeleteCheckNoteDocument.bind(this),onRenameDocument:this.handleRenameCheckNoteDocument.bind(this)}),aS(nS.M,{}),aS(gn.A,{show:s,title:I18n.translate("didnotwork"),submitBtnText:I18n.translate("ok"),onSubmit:function(){return e.setState({errorModal:!1})},onHide:function(){return e.setState({errorModal:!1})},noCancelBtn:!0},void 0,aS("p",{},void 0,I18n.translate(c))))}}])}(co.b);vS(bS,"propTypes",{fromDate:q().string,toDate:q().string,years:q().array,fiscalYears:q().array,onBack:q().func,onNavigate:q().func.isRequired,animate:q().bool,isPartOfPortfolio:q().bool.isRequired}),vS(bS,"defaultProps",{fromDate:"",toDate:"",years:[],fiscalYears:[]});const gS=(0,zn.Ng)(function(e){var t=e.defaults,n=t.groupedFinanceAccounts,r=t.fiscalYears,o=t.reportParameterDefaults,i=t.fiscalYearReportParams,a=e.companies.finalize;return{accounts:n,fiscalYears:r,fromDate:a.reportParamFiscalYearStartDate||(0,Fu.H_)(o,Fu.tw),toDate:a.reportParamFiscalYearEndDate||(0,Fu.H_)(o,Fu.mi),years:i,isPartOfPortfolio:e.currentUser.user.isPartOfPortfolio,sabReport:e.sabReport,companyXid:e.companies.currentXid}},function(e){return{actions:(0,oo.zH)({updateSABReport:Xw.w,fetchLiveReport:Kc,showArchiveFilePreview:sl.uk},e)}})(bS);function wS(e){return{type:Pl.W4,data:e}}var SS,kS=n(95093);function OS(e){return OS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OS(e)}function NS(e,t,n,r){SS||(SS="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:SS,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function xS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?xS(Object(n),!0).forEach(function(t){IS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IS(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=OS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=OS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==OS(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const AS=(0,zn.Ng)(function(e){var t=e.defaults,n=t.fiscalYears,r=t.reportParameterDefaults,o=e.companies.finalize;return{fiscalYears:n,fromDate:o.reportParamFiscalYearStartDate||(0,Fu.H_)(r,Fu.tw),toDate:o.reportParamFiscalYearEndDate||(0,Fu.H_)(r,Fu.mi),issuedInvoicesReport:e.issuedInvoicesReport}},function(e){return{actions:(0,oo.zH)({updateIssuedInvoicesReport:wS,fetchLiveReport:Kc},e)}})(function(e){var t=e.fromDate,n=void 0===t?"":t,o=e.toDate,i=void 0===o?"":o,s=e.fiscalYears,c=void 0===s?[]:s,u=e.animate,d=e.issuedInvoicesReport,f=e.actions,m=(0,r.useRef)({FROM_DATE_REF_METHOD:(0,r.createRef)(null),TO_DATE_REF_METHOD:(0,r.createRef)(null),STYLE_REF_METHOD:(0,r.createRef)(null)});(0,r.useEffect)(function(){y({fromDate:n,toDate:i,issuedInvoicesReport:d,actions:f})},[n,i,f]),(0,r.useEffect)(function(){b()},[d.fromDate,d.toDate,d.style]);var v=(0,r.useMemo)(function(){return{fromDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=kS(e,p.D2),r=kS(d.toDate,p.D2);return n.isAfter(r)?{valid:!1,message:I18n.translate("report.from.date.not.after.to")}:{valid:!0,message:null}}],toDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=kS(e,p.D2),r=kS(d.fromDate,p.D2);return n.isBefore(r)?{valid:!1,message:I18n.translate("report.to.date.not.before.from")}:{valid:!0,message:null}}]}},[c,d]),h=(0,r.useMemo)(function(){return[{text:"Standard",value:"standard"}]},[]),y=function(e){var t=e.issuedInvoicesReport,n=e.actions,r=e.toDate,o=e.fromDate,i=null;t.fromDate||(i=PS(PS({},i),{},{fromDate:o||""})),t.toDate||(i=PS(PS({},i),{},{toDate:r||""})),t.style||(i=PS(PS({},i),{},{style:"standard"})),i&&n.updateIssuedInvoicesReport(i)},b=(0,r.useCallback)(function(){d.loading||x().then(function(e){e&&f.fetchLiveReport({type:p.TD,fromdate:kS(d.fromDate,p.D2).format(p.D2),todate:kS(d.toDate,p.D2).format(p.D2),style:d.style})})},[d]);(0,r.useEffect)(function(){return window.addEventListener(p.c_,b),function(){return window.removeEventListener(p.c_,b)}},[b]);var g,w,S,k,O,N,x=function(){return Promise.all([m.current.FROM_DATE_REF_METHOD.current?m.current.FROM_DATE_REF_METHOD.current.validate(d.fromDate):Promise.resolve([{valid:!0}]),m.current.TO_DATE_REF_METHOD.current?m.current.TO_DATE_REF_METHOD.current.validate(d.toDate):Promise.resolve([{valid:!0}])]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})},P=function(e,t){x().then(function(n){if(n){var r={fromdate:d.fromDate,todate:d.toDate,type:p.TD,style:d.style,output:e};t&&(r.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(r)),"_blank")}})};return NS(Ku,{animate:u},void 0,NS("form",{className:"report-form",onSubmit:function(e){e.preventDefault(),P()}},void 0,NS("div",{className:"container-fluid"},void 0,NS(Fn(),{},void 0,NS(Rn(),{xs:12},void 0,NS("div",{className:"d-flex"},void 0,NS("div",{style:{maxWidth:160}},void 0,r.createElement(tu.$,{id:"iir-fromdate",key:"iir-fromdate",label:"Fra dato:",className:"mr-2",value:d.fromDate,ref:m.current.FROM_DATE_REF_METHOD,validators:v.fromDate,pullRight:!0,onChange:function(e){return f.updateIssuedInvoicesReport({fromDate:e})}})),NS("div",{style:{maxWidth:160}},void 0,r.createElement(tu.$,{id:"iir-todate",key:"iir-todate",label:"Til dato:",value:d.toDate,ref:m.current.TO_DATE_REF_METHOD,validators:v.toDate,pullRight:!0,onChange:function(e){return f.updateIssuedInvoicesReport({toDate:e})}}))))),NS(Fn(),{},void 0,NS(Rn(),{xs:6},void 0,r.createElement(Fe.H,{id:"iir-style",key:"iir-style",label:"Visning:",labelKey:"text",ref:m.current.STYLE_REF_METHOD,value:d.style,options:h,noDeselect:!0,onChange:function(e){return f.updateIssuedInvoicesReport({style:e})}})))),NS("div",{className:"separator"}),NS("div",{className:"container-fluid"},void 0,NS("div",{className:"form-group"},void 0,NS(su,{mode:"PDF",onClick:P}),NS(su,{mode:"EXCEL",onClick:P}),NS(su,{type:"submit"}),NS(Su,{onClick:P})))),d.liveData&&d.liveData.length>0&&NS(r.Fragment,{}
1,void 0,NS("div",{className:"separator mt-0"}),NS("div",{className:"app-toolbar__report-title"},void 0,NS("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),NS("span",{className:"mr-1"},void 0,I18n.translate("menu.issuedinvoices")),NS("span",{},void 0,I18n.translate("menu.issuedinvoices.explain"))),NS("div",{className:"app-toolbar__report-container"},void 0,NS(_u,{columns:(g={invoiceNumberWidth:Math.max(60,(0,Q.k7)(d.liveData,"invoiceNumber")+10),invoiceDateWidth:Math.max(80,(0,Q.k7)(d.liveData,"invoiceDate")+10),customerNameWidth:Math.max(140,(0,Q.k7)(d.liveData,"customerName")+10),amountWidth:Math.max(77,(0,Q.k7)(d.liveData,"amountExclVatAsText")+10),currencyWidth:55},w=g.invoiceNumberWidth,S=g.invoiceDateWidth,k=g.customerNameWidth,O=g.amountWidth,N=g.currencyWidth,[{key:"invoiceNumber",dataIndex:"invoiceNumber",title:"#",width:w},{key:"invoiceDate",dataIndex:"invoiceDate",title:I18n.translate("date"),width:S},{key:"customerName",dataIndex:"customerName",title:I18n.translate("report.ii.recipient"),width:k},{key:"amount",dataIndex:"amountExclVatAsText",title:I18n.translate("report.ii.amount"),width:O,className:"text-right"},{key:"currency",dataIndex:"currency",title:"",width:N,className:"text-right"}]),data:d.liveData,rowKey:"invoiceNumber"})),d.lastUpdate&&NS("div",{className:"text-gray my-1 px-2"},void 0,NS(bu,{start:d.lastUpdate}))))});function CS(e){return CS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},CS(e)}function jS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jS(Object(n),!0).forEach(function(t){_S(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _S(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=CS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=CS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==CS(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RS,TS=n(96540);function ES(e,t,n,r){RS||(RS="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:RS,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function MS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return FS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FS(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function FS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var zS=function(e){return(0,Eu.A)({required:!0,checkFormat:!0})(e).valid},BS=function(e){var t=e.animate,n=e.toDate,o=e.companyXid,i=MS((0,r.useState)(n||""),2),s=i[0],c=i[1],u=MS((0,r.useState)(""),2),d=u[0],f=u[1],p=MS((0,r.useState)([]),2),m=p[0],v=p[1],h=MS((0,r.useState)([]),2),y=h[0],b=h[1],g=MS((0,r.useState)(!1),2),w=g[0],S=g[1],k=MS((0,r.useState)(!1),2),O=k[0],N=k[1],x=(0,r.useRef)(new j.g),P=(0,r.useRef)(""),I=(0,r.useRef)({}),A=(0,r.useRef)({}),C={toDate:[function(e){return(0,Eu.A)({required:!0,checkFormat:!0})(e)}]},D=o&&zS(s),_=function(e){if(o&&zS(s)){var t=null!=e&&""!==e?String(e):void 0;
1N(!1),S(!0),x.current.registerRequest(function(e){var t=e.companyXid,n=e.toDate,r=e.ledgerId;return(0,a.RD)(l.WKt,{method:"post",data:DS({companyXid:t,toDate:n},r?{ledgerId:r}:{}),ignoreStatus:[Z.BR]})}({companyXid:parseInt(o),toDate:s,ledgerId:t})).then(function(e){var n=(e.body.lines||[]).map(function(e,t){return{key:"".concat(e.date,"-").concat(e.text,"-").concat(t),dateAsText:e.date,text:e.text,amountAsText:e.amount,balanceAsText:e.balance}});v(e.body.ledgers||[]);var r=t||String(e.body.ledgerId||"");P.current=r,f(r),b(n)}).catch(function(e){N(!0)}).finally(function(){S(!1)})}};(0,r.useEffect)(function(){if(!D)return x.current.abortAll(),void S(!1);var e=setTimeout(function(){_(P.current||void 0)},1e3);return function(){clearTimeout(e),x.current.abortAll()}},[s,o]);var R,T,E,M,F;return ES(Ku,{animate:t},void 0,ES("form",{className:"report-form",style:{display:"flex",flexDirection:"column",height:"100%"}},void 0,ES("div",{className:"container-fluid",style:{marginLeft:0}},void 0,ES("div",{className:"row"},void 0,ES("div",{className:"col-sm-6"},void 0,TS.createElement(tu.$,{id:"tar-todate",key:"tar-todate",label:"parameters.todate",value:s,ref:(0,Q.qP)(A.current,I.current,1),validators:C.toDate,pullRight:!0,onChange:(0,Q._s)(A.current,2,c)})),ES("div",{className:"col-sm-6"},void 0,ES(Zd.X,{id:"mobilepay-ledger",customLabel:ES("label",{className:"control-label"},void 0,"Ledger"),value:d,options:m.map(function(e){return{value:String(e.id),text:e.name}}),onChange:function(e){var t=String(e);P.current=t,f(t),D&&(x.current.abortAll(),_(t))},checkExistence:!1,allowDeselect:!1},"mobilepay-ledger")))),ES("div",{className:"separator"}),ES("div",{className:"app-toolbar__report-title"},void 0,ES("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),ES("span",{className:"mr-1"},void 0,I18n.translate("report.mobilepay")),ES("span",{},void 0,"Viser en måned tilbage")),ES("div",{className:"app-toolbar__report-container",style:{flex:"1"}},void 0,O?ES("div",{className:"text-center"},void 0,ES("i",{className:"fa fa-exclamation-triangle mr-1","aria-hidden":"true"}),"Beklager, men det lykkedes ikke at hente MobilePay oplysninger."):w?ES("div",{className:"text-center"},void 0,ES(qn.A,{className:"mr-1"}),I18n.translate("inbox.loading")):ES(_u,{columns:(R={dateWidth:Math.max(80,(0,Q.k7)(y,"dateAsText")+25),textWidth:Math.min(140,(0,Q.k7)(y,"text")+25),amountWidth:Math.max(77,(0,Q.k7)(y,"amountAsText")+25),balanceWidth:Math.max(77,(0,Q.k7)(y,"balanceAsText")+25)},T=R.dateWidth,E=R.textWidth,M=R.amountWidth,F=R.balanceWidth,[{key:"date",dataIndex:"dateAsText",title:I18n.translate("date"),width:T},{key:"text",dataIndex:"text",title:I18n.translate("text"),width:E},{key:"amount",dataIndex:"amountAsText",title:I18n.translate("amount"),width:M,className:"text-right"},{key:"balance",dataIndex:"balanceAsText",title:I18n.translate("balance"),width:F,className:"text-right"}]),data:y,rowKey:"key"}))))};BS.defaultProps={fiscalYears:[],toDate:""};const HS=(0,zn.Ng)(function(e){var t=e.defaults,n=t.fiscalYears,r=t.reportParameterDefaults,o=e.companies,i=o.finalize,a=o.currentXid;return{fiscalYears:n,toDate:i.reportParamFiscalYearEndDate||(0,Fu.H_)(r,Fu.mi),companyXid:a}})(BS);var LS;function $S(e,t,n,r){LS||(LS="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:LS,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function XS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return VS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VS(e,t):void 0}}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const qS=(0,zn.Ng)(function(e){return{user:e.currentUser.user}})(function(e){var t=e.animate,n=e.onNavigate,o=e.dispatch,i=new j.g,a=XS((0,r.useState)([]),2),l=a[0],s=a[1],c=XS((0,r.useState)(!0),2),u=c[0],d=c[1],f=function(e){return function(){return n("helpArticle?articleKey=".concat(e,"&noPdf=true"))}};return(0,r.useEffect)(function(){o({type:Pl.jP}),i.registerRequest((0,Tp.Yn)()).then(function(e){s(e.body.newsEntries),d(!1)})},[]),$S(Ku,{animate:t},void 0,$S("p",{className:"app-toolbar__subtitle my-0"},void 0,I18n.translate("news")),$S("ul",{className:"reports-list"},void 0,u?$S("li",{style:{textAlign:"center",padding:"1rem"}},void 0,$S(qn.A,{style:{fontSize:"2rem"}})):l.map(function(e){var t=e.date,n=e.key,r=e.title;return $S("li",{},n,$S("div",{className:"btn icon-button btn-block d-flex align-items-center justify-content-between p-2",onClick:f(n)},void 0,$S("div",{},void 0,$S("span",{},void 0,t," "),$S("span",{},void 0,r)),$S("i",{className:"fa fa-chevron-right text-lightgray","aria-hidden":"true"})))})))});function US(e){return{type:Pl.wW,data:e}}var WS,YS=n(95093),KS=n(96540);function GS(e){return GS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GS(e)}function QS(){return QS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QS.apply(null,arguments)}function ZS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZS(Object(n),!0).forEach(function(t){ek(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ek(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=GS(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=GS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==GS(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tk(e,t,n,r){WS||(WS="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:WS,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var nk=function(e){var t=e.amountAsText,n=e.dateAsText,r=e.lineText;return tk("div",{className:"d-flex flex-column mb-1"},t+n,tk("div",{className:"flex-grow-1 flex-shrink-1 d-flex pr-2 pl-1 justify-content-between"},void 0,tk("span",{},void 0,n),tk("span",{},void 0,t)),tk("div",{className:"text-left flex-shrink-0 pr-2 pl-1"},void 0,r))};const rk=(0,zn.Ng)(function(e){var t=e.defaults,n=t.bankAccounts,r=t.fiscalYears,o=t.reportParameterDefaults,i=e.companies.finalize;return{banks:n,fiscalYears:r,fromDate:i.reportParamFiscalYearStartDate||(0,Fu.H_)(o,Fu.tw),toDate:i.reportParamFiscalYearEndDate||(0,Fu.H_)(o,Fu.mi),notSettledBankReport:e.notSettledBankReport}},function(e){return{actions:(0,oo.zH)({updateNotSettledBankReport:US,fetchLiveReport:Kc},e)}})(function(e){var t=e.fromDate,n=void 0===t?"":t,o=e.toDate,i=void 0===o?"":o,s=e.fiscalYears,c=void 0===s?[]:s,u=e.animate,d=e.notSettledBankReport,f=e.actions,m=e.banks,v=void 0===m?[]:m,h=(0,r.useRef)({FROM_DATE_REF_METHOD:(0,r.createRef)(null),TO_DATE_REF_METHOD:(0,r.createRef)(null),BANK_REF_METHOD:(0,r.createRef)(null)});(0,r.useEffect)(function(){b({fromDate:n,toDate:i,notSettledBankReport:d,actions:f,banks:v})},[n,i,f]),(0,r.useEffect)(function(){g()},[d.fromDate,d.toDate,d.bank]);var y=(0,r.useMemo)(function(){return{fromDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=YS(e,p.D2),r=YS(d.toDate,p.D2);return n.isAfter(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:c.some(function(e){return n.isBetween(YS(e.fromDate,p.D2),YS(e.toDate,p.D2),null,"[]")}
1),message:I18n.translate("work.edit.validate.insideyears")}}],toDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=YS(e,p.D2),r=YS(d.fromDate,p.D2);return n.isBefore(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:c.some(function(e){return n.isBetween(YS(e.fromDate,p.D2),YS(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}],bank:[Mu.A]}},[c,d]),b=function(e){var t=e.notSettledBankReport,n=e.actions,r=e.toDate,o=e.fromDate,i=e.banks,a=null;t.fromDate||(a=JS(JS({},a),{},{fromDate:o||""})),t.toDate||(a=JS(JS({},a),{},{toDate:r||""})),!t.bank&&i.length&&(a=JS(JS({},a),{},{bank:i[0].value})),a&&n.updateNotSettledBankReport(a)},g=function(){d.loading||w().then(function(e){e&&f.fetchLiveReport({type:p.pd,bankAccountXid:d.bank,fromdate:d.fromDate,todate:d.toDate})})},w=function(){return Promise.all([h.current.FROM_DATE_REF_METHOD.current.validate(d.fromDate),h.current.TO_DATE_REF_METHOD.current.validate(d.toDate),h.current.BANK_REF_METHOD.current.validate(d.bank)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})},S=function(e,t){w().then(function(n){if(n){var r={type:p.pd,output:e,bankAccountXid:d.bank,fromdate:d.fromDate,todate:d.toDate};t&&(r.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(r)),"_blank")}})};return tk(Ku,{animate:u},void 0,tk("form",{className:"report-form",onSubmit:function(e){e.preventDefault(),S()}},void 0,tk("div",{className:"container-fluid"},void 0,KS.createElement(Fe.H,{id:"ntb-bank",key:"ntb-bank",label:"popup.bankcompany",ref:h.current.BANK_REF_METHOD,value:d.bank,labelKey:"text",options:v,validators:y.bank,noDeselect:!0,onChange:function(e){return f.updateNotSettledBankReport({bank:e})}}),KS.createElement(tu.$,{id:"ntb-fromdate",key:"ntb-fromdate",label:"parameters.fromdate",className:"mr-2",value:d.fromDate,ref:h.current.FROM_DATE_REF_METHOD,validators:y.fromDate,pullRight:!0,onChange:function(e){return f.updateNotSettledBankReport({fromDate:e})}}),KS.createElement(tu.$,{id:"ntb-todate",key:"ntb-todate",label:"parameters.todate",value:d.toDate,ref:h.current.TO_DATE_REF_METHOD,validators:y.toDate,pullRight:!0,onChange:function(e){return f.updateNotSettledBankReport({toDate:e})}})),tk("div",{className:"separator"}),tk("div",{className:"container-fluid"},void 0,tk("div",{className:"form-group"},void 0,tk(su,{mode:"PDF",onClick:S}),tk(su,{mode:"EXCEL",onClick:S}),tk(su,{type:"submit"}),tk(Su,{onClick:S}))),tk("div",{className:"separator"}),d.liveData.map(function(e){return KS.createElement(nk,QS({},e,{key:e.dateAsText+e.lineText}))})))});function ok(e){return{type:Pl.pi,data:e}}var ik,ak=n(95093),lk=n(96540);function sk(e){return sk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sk(e)}function ck(e,t,n,r){ik||(ik="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ik,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uk(Object(n),!0).forEach(function(t){bk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gk(r.key),r)}}function pk(e,t,n){return t=hk(t),function(e,t){if(t&&("object"==sk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mk()?Reflect.construct(t,n||[],hk(e).constructor):t.apply(e,n))}function mk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mk=function(){return!!e})()}function vk(){return vk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=hk(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},vk.apply(null,arguments)}
1function hk(e){return hk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hk(e)}function yk(e,t){return yk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},yk(e,t)}function bk(e,t,n){return(t=gk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gk(e){var t=function(e,t){if("object"!=sk(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=sk(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==sk(t)?t:t+""}var wk=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),bk(n=pk(this,t,[e]),"methods",{}),bk(n,"inputRefs",{}),bk(n,"state",{category:n.props.categorySets[0].xid}),n.types=n.getTypes(),n.validators=n.getValidators(),n.categories=n.props.categorySets.map(function(e){return{label:e.name,value:e.xid}}),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yk(e,t)}(t,e),function(e,t,n){return t&&fk(e.prototype,t),n&&fk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=vk(hk(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.types=this.getTypes(),this.validators=this.getValidators()}},{key:"componentDidMount",value:function(){this.setData(this.props),this.load()}},{key:"componentDidUpdate",value:function(e){e.overviewReport===this.props.overviewReport&&this.props.date===e.date||this.setData(this.props),this.load()}},{key:"load",value:function(){var e=this;this.props.overviewReport.loading||this.props.overviewReport.loaded||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport({type:p.wS,date:e.props.overviewReport.date,details:e.props.overviewReport.style})})}},{key:"setData",value:function(e){var t=e.overviewReport,n=e.date,r=e.actions,o=null;t.date||(o={date:n}),t.style||(o=dk(dk({},o),{},{style:this.types[0].value})),o&&r.updateOverviewReport(o)}},{key:"getTypes",value:function(){return[{value:"standard",label:I18n.translate("parameters.reportstyle.standard")},{value:"standardnocash",label:I18n.translate("parameters.reportstyle.standardnocash")},{value:"details",label:I18n.translate("parameters.reportstyle.details")},{value:"list",label:I18n.translate("parameters.reportstyle.list")}]}},{key:"validate",value:function(){return Promise.all([this.inputRefs[2].validate(this.props.overviewReport.date),this.inputRefs[4].validate(this.props.overviewReport.style)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.wS,date:ak(n.props.overviewReport.date,p.D2).format(p.D2),details:n.props.overviewReport.style,output:e,categoryset:n.state.category};t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"getValidators",value:function(){var e=this;return{date:[function(t){var n=(0,Eu.A)({required:!0,checkFormat:!0})(t);if(!n.valid)return n;var r=ak(t,p.D2);return{valid:e.props.fiscalYears.some(function(e){return r.isBetween(ak(e.fromDate,p.D2),ak(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}],style:[Mu.A],category:[Mu.A]}}},{key:"render",value:function(){var e=this;return ck(Ku,{animate:this.props.animate},void 0,ck("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,ck("div",{className:"container-fluid"},void 0,lk.createElement(Fe.H,{id:"or-style",key:"style",label:"parameters.reportstyle",ref:(0,Q.qP)(this.methods,this.inputRefs,4),value:this.props.overviewReport.style,validators:this.validators.style,options:this.types,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updateOverviewReport({style:t})}),noDeselect:!0}),this.props.categorySets.length>1&&lk.createElement(Fe.H,{id:"cat-style",key:"cat-style",label:"parameters.categoryset",ref:(0,Q.qP)(this.methods,this.inputRefs,6),value:this.state.category,validators:this.validators.category,options:this.categories,onChange:(0,Q._s)(this.methods,7,function(t){return e.setState({category:t})}),noDeselect:!0}),lk.createElement(tu.$,{id:"or-date",key:"date",label:"parameters.date",ref:(0,Q.qP)(this.methods,this.inputRefs,2),value:this.props.overviewReport.date,validators:this.validators.date,onChange:(0,Q._s)(this.methods,3,function(t){return e.props.actions.updateOverviewReport({date:t})}),pullRight:!0})),ck("div",{className:"separator"}),ck("div",{className:"container-fluid"},void 0,ck("div",{className:"form-group"},void 0,ck(su,{mode:"PDF",onClick:this.showReport.bind(this)}),ck(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),ck(su,{type:"submit"}),ck(Su,{onClick:this.showReport.bind(this)})))))}}])}(co.b);
1bk(wk,"propTypes",{date:q().string,fiscalYears:q().array}),bk(wk,"defaultProps",{date:"",fiscalYears:[],categorySets:[]});const Sk=(0,zn.Ng)(function(e){return{overviewReport:e.overviewReport,date:e.companies.finalize.reportParamFiscalYearEndDate||(0,Fu.H_)(e.defaults.reportParameterDefaults,Fu.mi),fiscalYears:e.defaults.fiscalYears,categorySets:e.defaults.categorySets}},function(e){return{actions:(0,oo.zH)({updateOverviewReport:ok,fetchLiveReport:Kc},e)}})(wk);var kk,Ok=n(30488),Nk=n(96540);function xk(e){return xk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xk(e)}function Pk(e,t,n,r){kk||(kk="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:kk,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Ik(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ak(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ik(Object(n),!0).forEach(function(t){Ek(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ik(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ck(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mk(r.key),r)}}function jk(e,t,n){return t=Rk(t),function(e,t){if(t&&("object"==xk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dk()?Reflect.construct(t,n||[],Rk(e).constructor):t.apply(e,n))}function Dk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Dk=function(){return!!e})()}function _k(){return _k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Rk(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},_k.apply(null,arguments)}function Rk(e){return Rk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rk(e)}
1function Tk(e,t){return Tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tk(e,t)}function Ek(e,t,n){return(t=Mk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mk(e){var t=function(e,t){if("object"!=xk(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=xk(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xk(t)?t:t+""}var Fk=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ek(n=jk(this,t,[e]),"methods",{}),Ek(n,"inputRefs",{}),Ek(n,"peStyleOptions",[]),n.validators=n.getValidators(),n.peStyleOptions=(0,p.Pb)(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tk(e,t)}(t,e),function(e,t,n){return t&&Ck(e.prototype,t),n&&Ck(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=_k(Rk(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=this.getValidators(),this.peStyleOptions=(0,p.Pb)()}},{key:"getValidators",value:function(){return{pe:[Mu.A],fiscalYear:[Mu.A],style:[Mu.A]}}},{key:"componentDidMount",value:function(){var e=null;!this.props.peReport.pe&&this.props.privateEquities.length&&(e={pe:this.props.privateEquities[0].value}),this.props.peReport.style||(e=Ak(Ak({},e),{},{style:this.peStyleOptions[0].value})),!this.props.peReport.fiscalYear&&this.props.years.length&&(e=Ak(Ak({},e),{},{fiscalYear:this.props.years[0].value})),e&&this.props.actions.updatePEReport(e),this.load()}},{key:"componentDidUpdate",value:function(e){if(this.props.peReport!==e.peReport||this.props.privateEquities!==e.privateEquities||this.props.years!==e.years){var t=null;!this.props.peReport.pe&&this.props.privateEquities.length&&(t={pe:this.props.privateEquities[0].value}),this.props.peReport.style||(t=Ak(Ak({},t),{},{style:this.peStyleOptions[0].value})),!this.props.peReport.fiscalYear&&this.props.years.length&&(t=Ak(Ak({},t),{},{fiscalYear:this.props.years[0].value})),t&&this.props.actions.updatePEReport(t)}this.load()}},{key:"load",value:function(){var e=this;this.props.peReport.loading||this.props.peReport.loaded||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport(Ak({type:p.og},e.props.peReport.style===e.peStyleOptions[0].value?{year:e.props.peReport.fiscalYear}:{privateequity:e.props.peReport.pe}))})}},{key:"validate",value:function(){return Promise.all([this.inputRefs[3].validate(this.props.peReport.style),this.props.peReport.style===this.peStyleOptions[0].value?this.inputRefs[6].validate(this.props.peReport.fiscalYear):this.inputRefs[2].validate(this.props.peReport.pe)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e){var t=this;this.validate().then(function(n){if(n){var r={type:p.og,output:e};t.props.peReport.style===t.peStyleOptions[0].value?r.year=t.props.peReport.fiscalYear:r.privateequity=t.props.peReport.pe,window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(r)),"_blank")}})}},{key:"render",value:function(){var e=this;return Pk(Ku,{animate:this.props.animate},void 0,Pk("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,Pk("div",{className:"container-fluid"},void 0,Nk.createElement(Fe.H,{id:"pe-report-style",key:"pe-report-style",label:"parameters.reportstyle",labelKey:"text",value:this.props.peReport.style,ref:(0,Q.qP)(this.methods,this.inputRefs,3),options:this.peStyleOptions,validators:this.validators.style,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updatePEReport({style:t})}),noDeselect:!0}),this.props.peReport.style===this.peStyleOptions[0].value&&Nk.createElement(Fe.H,{key:"inp",id:"trf-year",label:"parameters.year",labelKey:"text",value:this.props.peReport.fiscalYear,ref:(0,Q.qP)(this.methods,this.inputRefs,6),options:this.props.years,validators:this.validators.fiscalYear,onChange:(0,Q._s)(this.methods,7,function(t){return e.props.actions.updatePEReport({fiscalYear:t})}),noDeselect:!0})||Nk.createElement(Fe.H,{id:"pe-report-pe",key:"pe-report-pe",label:"parameters.privateequity",labelKey:"text",value:this.props.peReport.pe,ref:(0,Q.qP)(this.methods,this.inputRefs,2),options:this.props.privateEquities,validators:this.validators.fiscalYear,onChange:(0,Q._s)(this.methods,4,function(t){return e.props.actions.updatePEReport({pe:t})}),noDeselect:!0})),Pk("div",{className:"separator"}),Pk("div",{className:"container-fluid"},void 0,Pk("div",{className:"form-group"},void 0,Pk(su,{mode:"PDF",onClick:this.showReport.bind(this)}),Pk(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),Pk(su,{type:"submit"})))))}}])}(co.b);
1Ek(Fk,"propTypes",{privateEquities:q().arrayOf(q().shape({text:q().string,value:q().string})),years:q().arrayOf(q().shape({text:q().string,value:q().string}))}),Ek(Fk,"defaultProps",{privateEquities:[]});const zk=(0,zn.Ng)(function(e){return{peReport:e.peReport,privateEquities:e.defaults.privateEquities,years:e.defaults.fiscalYearReportParams}},function(e){return{actions:(0,oo.zH)({updatePEReport:Ok.v,fetchLiveReport:Kc},e)}})(Fk);var Bk,Hk=n(96540);function Lk(e){return Lk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lk(e)}function $k(e,t,n,r){Bk||(Bk="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Bk,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Xk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qk(r.key),r)}}function Vk(e,t,n){return t=Yk(t),function(e,t){if(t&&("object"==Lk(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,qk()?Reflect.construct(t,n||[],Yk(e).constructor):t.apply(e,n))}function qk(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qk=function(){return!!e})()}function Uk(e,t,n,r){var o=Wk(Yk(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function Wk(){return Wk="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Yk(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Wk.apply(null,arguments)}function Yk(e){return Yk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yk(e)}function Kk(e,t){return Kk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kk(e,t)}function Gk(e,t,n){return(t=Qk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qk(e){var t=function(e,t){if("object"!=Lk(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Lk(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lk(t)?t:t+""}var Zk=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Gk(e=Vk(this,t,[].concat(r)),"shortcutHelper",void 0),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kk(e,t)}(t,e),function(e,t,n){return t&&Xk(e.prototype,t),n&&Xk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){Uk(t,"componentDidMount",this,3)([]),this.setShortcuts()}},{key:"componentDidUpdate",value:function(e){this.props.active&&!e.active&&this.setShortcuts(),!this.props.active&&e.active&&this.shortcutHelper&&this.shortcutHelper.destroy()}},{key:"componentWillUnmount",value:function(){Uk(t,"componentWillUnmount",this,3)([]),this.shortcutHelper&&this.shortcutHelper.destroy()}},{key:"setShortcuts",value:function(){var e=this,n=t.getShortcuts();this.shortcutHelper=new mo.F([{keys:n["menu.accountstatement"],handler:function(){return e.props.onNavigate("accountStatement")}},{keys:n["menu.resultandbalance"],handler:function(){return e.props.onNavigate("incomeStateAndBalance")}}])}},{key:"render",value:function(){var e=this,t=$k(qv,{className:"phi phi-fw mr-1","aria-hidden":"true"});return $k(Ku,{animate:this.props.animate},void 0,$k("p",{className:"app-toolbar__subtitle mb-1"},void 0,I18n.translate("menu.reports.basic")),$k("ul",{className:"reports-list"},void 0,$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("accountStatement")}},void 0,t,I18n.translate("menu.accountstatement"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("incomeStateAndBalance")}},void 0,t,I18n.translate("menu.resultandbalance"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("issuedInvoices")}},void 0,t,I18n.translate("menu.issuedinvoices"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("notsettledbank")}},void 0,t,I18n.translate("menu.notsettledbank"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("transactions")}},void 0,t,I18n.translate("menu.transactions"))),this.props.withVat&&this.props.isSuperUserOrAdministrator&&$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("vatcheck")}},void 0,t,I18n.translate("menu.vatcheck"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("chartOfAccounts")}},void 0,t,I18n.translate("menu.chartofaccounts"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("debitorStatement")}},void 0,t,I18n.translate("menu.debitorstatement"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("creditorStatement")}},void 0,t,I18n.translate("menu.creditorstatement"))),this.props.isFoundation&&$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("grants")}},void 0,t,I18n.translate("menu.grants")))),!this.props.hideSecuritiesUi&&$k(Hk.Fragment,{},void 0,$k("p",{className:"app-toolbar__subtitle my-1"},void 0,I18n.translate("menu.reports.depositories")),$k("ul",{className:"reports-list"},void 0,$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("securitiesBalance")}},void 0,t,I18n.translate("menu.securitiesbalance"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("dividends")}},void 0,t,I18n.translate("menu.dividends"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("bondinterests")}},void 0,t,I18n.translate("menu.bondinterests"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("cashAccountCurrency")}},void 0,t,I18n.translate("menu.cashaccountcurrency"))))),$k("p",{className:"app-toolbar__subtitle my-1"},void 0,I18n.translate("menu.reports.investments")),$k("ul",{className:"reports-list"},void 0,!this.props.hideSecuritiesUi&&$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("securities")}},void 0,t,I18n.translate("menu.securityreport"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("roi")}},void 0,t,I18n.translate("menu.roireport"))),$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("overview")}},void 0,t,I18n.translate("menu.overview"))),this.props.hasPEs&&$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("privateEquity")}},void 0,t,I18n.translate("menu.privateequity")))),$k(Hk.Fragment,{},void 0,$k("p",{className:"app-toolbar__subtitle my-1"},void 0,I18n.translate("menu.reports.other")),$k("ul",{className:"reports-list"},void 0,$k("li",{},void 0,$k("button",{className:"btn icon-button btn-block",onClick:function(){return e.props.onNavigate("changes")}
1},void 0,t,I18n.translate("menu.changes"))))))}}],[{key:"getShortcuts",value:function(){return{"menu.accountstatement":"shift+".concat(I18n.translate("shortcut.report.accountstatement")[0]),"menu.resultandbalance":"shift+".concat(I18n.translate("shortcut.report.incomestatement")[0])}}}])}(co.b);Gk(Zk,"propTypes",{animate:q().bool,active:q().bool,onNavigate:q().func.isRequired,onHide:q().func,onBack:q().func});const Jk=(0,zn.Ng)(function(e){return{hideSecuritiesUi:e.defaults.hideSecuritiesUi,hasPEs:e.defaults.privateEquities.length>0,isFoundation:e.defaults.companyTypeIsFoundation,isSuperUserOrAdministrator:e.currentUser.user.isSuperUser||e.currentUser.user.administrator,withVat:e.defaults.companyVatType!==(0,p.Aq)()[0].value}})(Zk);function eO(e){return{type:Pl.o7,data:e}}var tO,nO=n(1477),rO=n(95093),oO=n(96540);function iO(e){return iO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iO(e)}function aO(e,t,n,r){tO||(tO="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:tO,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function lO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lO(Object(n),!0).forEach(function(t){vO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hO(r.key),r)}}function uO(e,t,n){return t=pO(t),function(e,t){if(t&&("object"==iO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dO()?Reflect.construct(t,n||[],pO(e).constructor):t.apply(e,n))}function dO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dO=function(){return!!e})()}function fO(){return fO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=pO(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},fO.apply(null,arguments)}function pO(e){return pO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pO(e)}function mO(e,t){return mO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mO(e,t)}function vO(e,t,n){return(t=hO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hO(e){var t=function(e,t){if("object"!=iO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=iO(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==iO(t)?t:t+""}var yO="allsecurities",bO="singlesecurity",gO="allinexcel",wO="bydepository",SO=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),vO(n=uO(this,t,[e]),"state",{securities:[],show:!1}),vO(n,"methods",{}),vO(n,"inputRefs",{}),n.styles=n.getStyles(),n.validators=n.getValidators(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mO(e,t)}(t,e),function(e,t,n){return t&&cO(e.prototype,t),n&&cO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=fO(pO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.styles=this.getStyles(),this.validators=this.getValidators()}},{key:"componentDidMount",value:function(){this.setData(this.props),this.setState({show:this.props.roiReport.style===bO,securities:this.props.securities.map(function(e){return{label:e.text,value:e.value}})})}},{key:"componentDidUpdate",value:function(e){var t=this,n=this.props.roiReport.style===bO,r=null;n!==this.state.show&&(r={show:n}),this.props.securities!==e.securities&&(r=sO(sO({},r),{},{securities:this.props.securities.map(function(e){return{label:e.text,value:e.value}})})),r&&this.setState(r),this.props.securities===e.securities&&this.props.roiReport===e.roiReport&&this.props.date===e.date||(this.setData(this.props),this.props.roiReport.style!==e.roiReport.style&&this.props.roiReport.style===wO&&(this.props.roiReport.depository||this.props.actions.updateROIReport({depository:this.props.depositories[0].value}))),this.props.roiReport.loading||this.props.roiReport.loaded||this.validate().then(function(e){return e&&t.props.actions.fetchLiveReport({type:p.Ji,date:rO(t.props.roiReport.date,p.D2).format(p.D2),style:t.props.roiReport.style,security:t.props.roiReport.security,depository:t.props.roiReport.depository})})}},{key:"setData",value:function(e){var t=e.roiReport,n=e.securities,r=e.actions,o=e.date,i=null;t.date||(i={date:o||""}),t.style||(i={style:yO}),!t.security&&t.style===bO&&n.length&&(i={security:n[0].value}),i&&r.updateROIReport(i)}},{key:"validate",value:function(){return Promise.all([this.inputRefs[7].validate(this.props.roiReport.date),this.inputRefs[2].validate(this.props.roiReport.style),this.state.show&&this.inputRefs[4].validate(this.props.roiReport.security)||[{valid:!0}]]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.Ji,date:n.props.roiReport.date,style:n.props.roiReport.style,security:n.props.roiReport.security,output:e};n.props.roiReport.depository&&(o.depository=n.props.roiReport.depository),t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"getStyles",value:function(){return[{text:I18n.translate("parameters.reportstyle.allsecurities"),value:yO},{text:I18n.translate("parameters.reportstyle.allsecuritiesmonth"),value:"allsecuritiesmonthly"},{text:I18n.translate("parameters.reportstyle.singlesecurity"),value:bO},{text:I18n.translate("parameters.reportstyle.allinexcel"),value:gO},{text:I18n.translate("parameters.reportstyle.categories"),value:"categories"},{text:I18n.translate("parameters.reportstyle.depositories"),value:wO}]}},{key:"getValidators",value:function(){var e=this;return{date:[(0,nO.A)({required:!0,checkFormat:!0},function(){return e.props.fiscalYears})],style:[Mu.A],security:[Mu.A],depository:[]}}},{key:"render",value:function(){var e=this;return aO(Ku,{animate:this.props.animate},void 0,aO("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,aO("div",{className:"container-fluid"},void 0,oO.createElement(Fe.H,{id:"roi-style",key:"roi-style",label:"parameters.reportstyle",labelKey:"text",value:this.props.roiReport.style,ref:(0,Q.qP)(this.methods,this.inputRefs,2),options:this.styles,validators:this.validators.style,onChange:(0,Q._s)(this.methods,3,function(t){return e.props.actions.updateROIReport({style:t,security:t===bO&&e.props.securities.length?e.props.securities[0].value:""})}),noDeselect:!0}),this.state.show&&oO.createElement(Fe.H,{key:"security",id:"roi-security",label:"parameters.security",ref:(0,Q.qP)(this.methods,this.inputRefs,4),value:this.props.roiReport.security,options:this.state.securities,validators:this.validators.security,onChange:(0,Q._s)(this.methods,5,function(t){return e.props.actions.updateROIReport({security:t})}),noDeselect:!0}),this.props.roiReport.style===wO&&oO.createElement(Fe.H,{id:"roi-depository",key:"roi-depository",label:"parameters.depository",ref:(0,Q.qP)(this.methods,this.inputRefs,8),value:this.props.roiReport.depository,labelKey:"text",validators:this.validators.depository,options:this.props.depositories,onChange:(0,Q._s)(this.methods,9,function(t){return e.props.actions.updateROIReport({depository:t})}),noDeselect:!0}),oO.createElement(tu.$,{id:"or-date",key:"date",label:"parameters.untildate",ref:(0,Q.qP)(this.methods,this.inputRefs,7),value:this.props.roiReport.date,validators:this.validators.date,onChange:(0,Q._s)(this.methods,6,function(t){return e.props.actions.updateROIReport({date:t})}),pullRight:!0})),aO("div",{className:"separator"}),aO("div",{className:"container-fluid"},void 0,aO("div",{className:"form-group"},void 0,this.props.roiReport.style!==gO&&aO(su,{mode:"PDF",onClick:this.showReport.bind(this)}),aO(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),this.props.roiReport.style!==gO&&aO(su,{type:"submit"}),aO(Su,{onClick:this.showReport.bind(this)})))))}}])}(co.b);vO(SO,"propTypes",{securities:q().arrayOf(q().shape({text:q().string,value:q().string})),fiscalYears:q().array}),vO(SO,"defaultProps",{securities:[]});const kO=(0,zn.Ng)(function(e){return{roiReport:e.roiReport,securities:e.defaults.securitiesInUse,depositories:e.defaults.depositories,fiscalYears:e.defaults.fiscalYears,date:e.companies.finalize.reportParamFiscalYearEndDate||(0,Fu.H_)(e.defaults.reportParameterDefaults,Fu.mi)}},function(e){return{actions:(0,oo.zH)({updateROIReport:eO,fetchLiveReport:Kc},e)}})(SO);function OO(e){return{type:Pl.cm,data:e}}function NO(e){return function(t){return t({type:Pl.IV}),(n=e,r=n.companyXid,o=n.fromDateIncl,i=n.toDateIncl,s=n.onlyUnpaid,c=n.onlyOverdue,(0,a.RD)(l.OSS,{method:"post",data:{companyXid:r,fromDateIncl:o,toDateIncl:i,onlyUnpaid:s,onlyOverdue:c}})).then(function(e){return t({type:Pl.Yp,data:e.body})}).catch(function(){return t({type:Pl.Yp,data:[]})});var n,r,o,i,s,c}}var xO,PO=n(95093);function IO(e){return IO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IO(e)}function AO(e,t,n,r){xO||(xO="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:xO,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function CO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?CO(Object(n),!0).forEach(function(t){DO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DO(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=IO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=IO(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==IO(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _O=(0,zn.Ng)(function(e){var t=e.defaults,n=t.reportParameterDefaults,r=t.fiscalYears,o=e.companies,i=o.finalize;return{companyXid:o.currentXid,fromDate:i.reportParamFiscalYearStartDate||(0,Fu.H_)(n,Fu.tw),toDate:i.reportParamFiscalYearEndDate||(0,Fu.H_)(n,Fu.mi),fiscalYears:r,salesReport:e.salesReport,user:e.currentUser.user}},function(e){return{actions:(0,oo.zH)({updateSalesReport:OO,fetchSalesReport:NO},e)}})(function(e){var t=e.fromDate,n=void 0===t?"":t,o=e.toDate,i=void 0===o?"":o,s=e.animate,c=e.salesReport,u=e.fiscalYears,d=e.actions,f=e.companyXid,m=(0,r.useRef)(null),v=(0,r.useRef)(null);(0,r.useEffect)(function(){y({salesReport:c,actions:d,toDate:i,fromDate:n})},[]),(0,r.useEffect)(function(){y({salesReport:c,actions:d,toDate:i,fromDate:n}),c.loaded||c.loading||h()},[c,n,i]);var h=function(){b().then(function(e){return e&&d.fetchSalesReport({companyXid:f,fromDateIncl:PO(c.fromDate,p.D2).format(p.D2),toDateIncl:PO(c.toDate,p.D2).format(p.D2)})})},y=function(e){var t=e.salesReport,n=e.actions,r=e.toDate,o=e.fromDate,i=null;t.fromDate||(i={fromDate:o||""}),t.toDate||(i=jO(jO({},i),{},{toDate:r||""})),i&&n.updateSalesReport(i)},b=function(){return Promise.all([m.current.validate(c.fromDate),v.current.validate(c.toDate)]).then(Q.el)},g=(0,r.useMemo)(function(){return{fromDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=PO(e,p.D2),r=PO(c.toDate,p.D2);return n.isAfter(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:u.some(function(e){return n.isBetween(PO(e.fromDate,p.D2),PO(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}],toDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=PO(e,p.D2),r=PO(c.fromDate,p.D2);return n.isBefore(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:u.some(function(e){return n.isBetween(PO(e.fromDate,p.D2),PO(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}]}},[c,u]),w=c.salesToolLines;return AO(Ku,{animate:s},void 0,AO("div",{className:"report-form"},void 0,AO("div",{className:"container-fluid"},void 0,AO("div",{className:"row"},void 0,AO("div",{className:"col-sm-6"},void 0,r.createElement(tu.$,{id:"asr-fromdate",key:"asr-fromdate",label:"parameters.fromdate",className:"mr-2",value:c.fromDate,ref:m,validators:g.fromDate,pullRight:!0,onChange:function(e){return d.updateSalesReport({fromDate:e})},onBlur:function(e){return d.updateSalesReport({fromDate:e,loaded:!1})}})),AO("div",{className:"col-sm-6"},void 0,r.createElement(tu.$,{id:"asr-todate",key:"asr-todate",label:"parameters.todate",value:c.toDate,ref:v,validators:g.toDate,pullRight:!0,onChange:function(e){return d.updateSalesReport({toDate:e})},onBlur:function(e){return d.updateSalesReport({toDate:e,loaded:!1})}}))),AO("div",{className:"separator"}),AO("div",{className:"row"},void 0,AO("div",{className:"col-sm-6"},void 0,AO("div",{className:"container-fluid"},void 0,AO("div",{className:"form-group"},void 0,AO(su,{mode:"EXCEL",onClick:function(e){b().then(function(t){if(t){var n={output:e,type:"issuedinvoiceswithlines",fromdate:PO(c.fromDate,p.D2).format(p.D2),todate:PO(c.toDate,p.D2).format(p.D2)};window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(n)),"_blank")}})},beta:!0})))),AO("div",{className:"col-sm-6"},void 0,AO("div",{className:"d-flex align-items-end justify-content-between"},void 0,AO("div",{className:"text-right  mt-2"},void 0,AO("span",{className:"text-gray font-bold"},void 0,I18n.translate("salestool.exclvat")),AO("div",{className:"h3 mt-0 mb-1"},void 0,c.sumAmountExclVat))))))),AO("div",{className:"separator mt
1-0"}),AO("div",{className:"app-toolbar__report-container"},void 0,AO("ul",{className:"reports-list",style:{maxHeight:"100%",overflow:"auto"}},void 0,w&&w.map(function(e,t){return AO("li",{className:"d-flex align-items-center px-2 py-1"},t,AO(wh(),{placement:"top",overlay:AO(kh(),{id:e.invoiceXid,className:"tooltip__compact"},void 0,AO("p",{},void 0,e.details))},void 0,AO("div",{className:"d-flex align-items-center",style:{justifyContent:"space-between",width:"100%"}},void 0,AO(ru.h,{className:"phi phi-3x mr-2","aria-hidden":"true"}),AO("div",{className:"flex-grow-1"},void 0,AO("div",{className:"d-flex align-items-center"},void 0,AO("div",{className:"mr-2"},void 0,e.invoiceNumber),AO("div",{className:"mr-2"},void 0,e.transactionDate),AO("div",{className:"flex-grow-1"},void 0,e.creditNote?I18n.translate("salestool.creditnote"):e.dueDate),AO("div",{},void 0,e.amountExclVat)),AO("div",{className:"d-flex align-items-center"},void 0,AO("div",{className:"flex-grow-1"},void 0,e.description),AO("div",{},void 0,e.amountInclVat))))))}))))});var RO,TO=n(16445);function EO(e){return EO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EO(e)}function MO(e,t,n,r){RO||(RO="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:RO,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function FO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,VO(r.key),r)}}function zO(e,t,n){return t=LO(t),function(e,t){if(t&&("object"==EO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,BO()?Reflect.construct(t,n||[],LO(e).constructor):t.apply(e,n))}function BO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(BO=function(){return!!e})()}function HO(){return HO="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=LO(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},HO.apply(null,arguments)}function LO(e){return LO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},LO(e)}function $O(e,t){return $O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$O(e,t)}function XO(e,t,n){return(t=VO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VO(e){var t=function(e,t){if("object"!=EO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=EO(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==EO(t)?t:t+""}var qO=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),XO(n=zO(this,t,[e]),"state",{securities:[]}),XO(n,"methods",{}),XO(n,"inputRefs",{}),n.validators=[Mu.A],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$O(e,t)}(t,e),function(e,t,n){return t&&FO(e.prototype,t),n&&FO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"onLanguageChange",value:function(){!function(e,t,n,r){var o=HO(LO(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"onLanguageChange",this,3)([]),this.validators=[Mu.A]}},{key:"componentDidMount",value:function(){!this.props.securityReport.security&&this.props.securities.length&&this.props.actions.updateSecurityReport(this.props.securities[0].value),this.setState({securities:this.props.securities.map(function(e){return{label:e.text,value:e.value}})})}},{key:"componentDidUpdate",value:function(e){var t=this;e.securities!==this.props.securities&&this.setState({securities:this.props.securities.map(function(e){return{label:e.text,value:e.value}})}),this.props.securityReport===e.securityReport&&e.securities===this.props.securities||!this.props.securityReport.security&&this.props.securities.length&&this.props.actions.updateSecurityReport(this.props.securities[0].value),this.props.securityReport.loading||this.props.securityReport.loaded||this.validate().then(function(e){return e&&t.props.actions.fetchLiveReport({type:p.VB,security:t.props.securityReport.security})})}},{key:"validate",value:function(){return this.inputRefs[2].validate(this.props.securityReport.security).then(function(e){return e.every(function(e){return e.valid})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.VB,security:n.props.securityReport.security,output:e};
1t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"render",value:function(){var e=this,t=this.props.securityReport,n=t.liveData,o=t.security,i=this.state.securities,a=Math.max(77,(0,Q.k7)(n||[],"amountAsText")+25);return MO(Ku,{animate:this.props.animate},void 0,MO("form",{className:"report-form",onSubmit:(0,Q._s)(this.methods,1,this.handleSubmit.bind(this))},void 0,MO("div",{className:"container-fluid"},void 0,r.createElement(Fe.H,{id:"security-report-security",key:"security-report-security",label:"parameters.security",ref:(0,Q.qP)(this.methods,this.inputRefs,2),value:o,options:i,validators:this.validators,noDeselect:!0,onChange:(0,Q._s)(this.methods,3,function(t){return e.props.actions.updateSecurityReport(t)})})),MO("div",{className:"separator"}),MO("div",{className:"container-fluid"},void 0,MO("div",{className:"form-group"},void 0,MO(su,{mode:"PDF",onClick:this.showReport.bind(this)}),MO(su,{mode:"EXCEL",onClick:this.showReport.bind(this)}),MO(su,{type:"submit"}),MO(Su,{onClick:this.showReport.bind(this)})))),MO("div",{className:"app-toolbar__report-container",style:{overflow:"auto"}},void 0,n&&n.map(function(e,t,n){var o=e.financeTransactionId,i=e.financePostingDateAsText,l=e.financeAccountText,s=e.amountAsText,c=e.transactionType,u=e.description,d=e.expandedInfo;return MO(r.Fragment,{},l+s,o!==(n[t-1]||{}).financeTransactionId&&MO("div",{className:"font-bold px-2 py-1"},void 0,c,MO("br",{}),u,d&&MO(r.Fragment,{},void 0,MO("br",{}),d)),MO("div",{className:"d-flex align-items-center px-2"},void 0,MO("div",{className:"flex-shrink-0",style:{width:90}},void 0,i),MO("div",{className:"flex-grow-1"},void 0,l),MO("div",{className:"flex-shrink-0 text-right",style:{width:a}},void 0,s)))})))}}])}(co.b);XO(qO,"propTypes",{securities:q().arrayOf(q().shape({text:q().string,value:q().string}))}),XO(qO,"defaultProps",{securities:[]});const UO=(0,zn.Ng)(function(e){return{securityReport:e.securityReport,securities:e.defaults.securitiesInUse}},function(e){return{actions:(0,oo.zH)({updateSecurityReport:TO.O,fetchLiveReport:Kc},e)}})(qO);function WO(e){return function(t){return t({type:Pl.RX}),function(e){return(0,a.RD)(l.lhT,{method:"post",data:{companyXid:e}})}(e).then(function(e){return t({type:Pl.BH,data:e.body})}).catch(function(){return t({type:Pl.BH,data:{}})})}}var YO,KO=n(51476);function GO(e){return GO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GO(e)}function QO(e,t,n,r){YO||(YO="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:YO,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ZO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oN(r.key),r)}}function JO(e,t,n){return t=nN(t),function(e,t){if(t&&("object"==GO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,eN()?Reflect.construct(t,n||[],nN(e).constructor):t.apply(e,n))}function eN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(eN=function(){return!!e})()}function tN(){return tN="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=nN(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},tN.apply(null,arguments)}function nN(e){return nN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nN(e)}
1function rN(e,t){return rN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rN(e,t)}function oN(e){var t=function(e,t){if("object"!=GO(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=GO(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==GO(t)?t:t+""}var iN="".concat(l.Rfr,"?doctype=").concat(p.dI),aN="".concat(l.d9b),lN="".concat(l.btg),sN="".concat(l.jZX),cN=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),JO(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rN(e,t)}(t,e),function(e,t,n){return t&&ZO(e.prototype,t),n&&ZO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){!function(e,t,n,r){var o=tN(nN(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"componentDidMount",this,3)([]),this.props.specificationsReport.loading||this.props.specificationsReport.loaded||this.props.actions.fetchSpecificationsLiveReport(this.props.companyXid)}},{key:"componentDidUpdate",value:function(){this.props.specificationsReport.loading||this.props.specificationsReport.loaded||this.props.actions.fetchSpecificationsLiveReport(this.props.companyXid)}},{key:"render",value:function(){return QO(Ku,{animate:this.props.animate},void 0,QO("div",{className:"report-form"},void 0,QO("div",{className:"container-fluid"},void 0,QO("div",{className:"form-group"},void 0,QO(KO.A,{title:QO("a",{className:"btn icon-button",href:iN,target:"_blank",rel:"noreferrer noopener"},void 0,QO(ru.h,{className:"phi phi-3x","aria-hidden":"true"}),QO("div",{className:"mt-1"},void 0,I18n.translate("report.newgenspecifications.menu",this.props.specificationsReport.periodName))),className:"nofill",bsStyle:"zzz",transparent:!0},void 0,QO("li",{},void 0,QO("a",{href:sN,target:"_blank",rel:"noreferrer noopener"},void 0,I18n.translate("report.newgenspecifications.html"))),QO("li",{},void 0,QO("a",{href:lN,target:"_blank",rel:"noreferrer noopener"},void 0,I18n.translate("report.newgenspecifications.pdf"))),QO("li",{},void 0,QO("a",{href:aN,target:"_blank",rel:"noreferrer noopener"},void 0,I18n.translate("report.newgenspecifications.word"))))),this.props.specificationsReport.warnings.length?QO("div",{className:"well"},void 0,this.props.specificationsReport.warnings.map(function(e,t,n){return QO("p",{className:"text-gray ".concat(t===n.length-1?"mb-0":""," d-flex")},t,QO("i",{className:"fa fa-info-circle fa-lg text-primary mr-1",style:{marginTop:3},"aria-hidden":"true"}),e.text)})):null)),QO("div",{className:"separator mt-0"}),QO("div",{},void 0,QO("div",{className:"app-toolbar__report-title"},void 0,QO("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),QO("span",{className:"mr-1"},void 0,I18n.translate("menu.annualreport.specs")),QO("span",{},void 0,I18n.translate("report.miniversion")))),QO("div",{className:"app-toolbar__report-container",style:{overflowY:"auto"}},void 0,QO("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("report.specifications.taxable")),QO("div",{className:"px-2 py-1"},void 0,this.props.specificationsReport.taxableIncomeLines.map(function(e,t){return QO(Fn(),{className:"my-1 ".concat("BOLD"===e.style?"font-bold":"")},"taxableLines-".concat(t),QO(Rn(),{xs:8},void 0,e.text),QO(Rn(),{xs:4,className:"text-right"},void 0,e.amount))}),!this.props.specificationsReport.taxableIncomeLines.length&&QO("p",{className:"text-center text-gray"},void 0,I18n.translate("nothing"))),QO("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("report.specifications.credits")),QO("div",{className:"px-2 py-1"},void 0,this.props.specificationsReport.creditCompensationLines.map(function(e,t){return QO(Fn(),{className:"my-1 ".concat("BOLD"===e.style?"font-bold":"")},"compensationLines-".concat(t),QO(Rn(),{xs:8},void 0,e.text),QO(Rn(),{xs:4,className:"text-right"},void 0,e.amount))}),!this.props.specificationsReport.creditCompensationLines.length&&QO("p",{className:"text-center text-gray"},void 0,I18n.translate("nothing"))),QO("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("report.specifications.dkwithheld")),QO("div",{className:"px-2 py-1"},void 0,this.props.specificationsReport.denmarkTaxLines.map(function(e,t){return QO(Fn(),{className:"my-1 ".concat("BOLD"===e.style?"font-bold":"")},"denmarkTaxLines-".concat(t),QO(Rn(),{xs:8},void 0,e.text),QO(Rn(),{xs:4,className:"text-right"},void 0,e.amount))}),!this.props.specificationsReport.denmarkTaxLines.length&&QO("p",{className:"text-center text-gray"},void 0,I18n.translate("nothing"))),QO("div",{className:"app-toolbar__subtitle"},void 0,I18n.translate("report.specifications.taxdepreciations")),QO("div",{className:"px-2 py-1"}
1,void 0,this.props.specificationsReport.depreciationLines.map(function(e,t){return QO(Fn(),{className:"my-1 ".concat("BOLD"===e.style?"font-bold":"")},"depreciationLines-".concat(t),QO(Rn(),{xs:8},void 0,e.text),QO(Rn(),{xs:4,className:"text-right"},void 0,e.amount))}),!this.props.specificationsReport.depreciationLines.length&&QO("p",{className:"text-center text-gray"},void 0,I18n.translate("nothing")))),this.props.specificationsReport.lastUpdate?QO("div",{className:"text-gray my-1 px-2"},void 0,QO(bu,{start:this.props.specificationsReport.lastUpdate})):null)}}],[{key:"rowClassName",value:function(e){return/^bold$/i.test(e.style)?"font-bold":""}}])}(co.b);!function(e,t,n){(t=oN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(cN,"propTypes",{animate:q().bool,onNavigate:q().func.isRequired,onHide:q().func,onBack:q().func});const uN=(0,zn.Ng)(function(e){return{companyXid:e.companies.currentXid,specificationsReport:e.specificationsReport}},function(e){return{actions:(0,oo.zH)({fetchSpecificationsLiveReport:WO},e)}})(cN);var dN,fN=n(96540);function pN(e,t,n,r){dN||(dN="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:dN,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function mN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vN(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var hN=function(e){var t=e.animate,n=e.fromDate,o=e.toDate,i=e.companyXid,s=mN((0,r.useState)(n||""),2),c=s[0],u=s[1],d=mN((0,r.useState)(o||""),2),f=d[0],m=d[1],v=mN((0,r.useState)([]),2),h=v[0],y=v[1],b=mN((0,r.useState)(!1),2),g=b[0],w=b[1],S=mN((0,r.useState)(!1),2),k=S[0],O=S[1],N=(0,r.useRef)(new j.g),x=(0,r.useRef)({}),P=(0,r.useRef)({}),I={fromDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=Xc()(e,p.D2),r=Xc()(f,p.D2);return n.isAfter(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:!0}}],toDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=Xc()(e,p.D2),r=Xc()(c,p.D2);return n.isBefore(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:!0}}]},A=function(){c&&f&&i&&(w(!0),N.current.registerRequest(function(e){var t=e.companyXid,n=e.fromDate,r=e.toDate;return(0,a.RD)(l.wzq,{method:"post",data:{companyXid:t,fromDate:n,toDate:r},ignoreStatus:[500]})}({companyXid:parseInt(i),fromDate:Xc()(c,p.D2).format(p.D2),toDate:Xc()(f,p.D2).format(p.D2)})).then(function(e){var t=(e.body.taxAccountLines||[]).map(function(e,t){return{key:"".concat(e.date,"-").concat(e.text,"-").concat(t),dateAsText:e.date,text:e.text,amountAsText:e.amount,balanceAsText:e.balance}});y(t)}).catch(function(e){O(!0)}).finally(function(){w(!1)}))};(0,r.useEffect)(function(){return A(),function(){N.current.abortAll()}},[c,f,i]);var C,D,_,R,T,E=function(e){return function(t){"fromDate"===e?u(t):m(t)}};return pN(Ku,{animate:t},void 0,pN("form",{className:"report-form",style:{display:"flex",flexDirection:"column",height:"100%"}},void 0,pN("div",{className:"container-fluid",style:{marginLeft:0}},void 0,fN.createElement(tu.$,{id:"tar-fromdate",key:"tar-fromdate",label:"parameters.fromdate",className:"mr-2",value:c,ref:(0,Q.qP)(P.current,x.current,1),validators:I.fromDate,pullRight:!0,onChange:(0,Q._s)(P.current,2,E("fromDate"))}),fN.createElement(tu.$,{id:"tar-todate",key:"tar-todate",label:"parameters.todate",value:f,ref:(0,Q.qP)(P.current,x.current,3),validators:I.toDate,pullRight:!0,onChange:(0,Q._s)(P.current,4,E("toDate"))})),pN("div",{className:"separator"}),pN("div",{className:"app-toolbar__report-title"},void 0,pN("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),pN("span",{className:"mr-1"},void 0,I18n.translate("report.taxaccount"))),pN("div",{className:"app-toolbar__report-container",style:{flex:"1"}},void 0,k?pN("div",{className:"text-center"},void 0,pN("i",{className:"fa fa-exclamation-triangle mr-1","aria-hidden":"true"}),"Beklager, men der skete en fejl. Prøv igen senere eller tjek evt. om din API-nøgle er gyldig."):g?pN("div",{className:"text-center"},void 0,pN(qn.A,{className:"mr-1"}
1),I18n.translate("inbox.loading")):pN(_u,{columns:(C={dateWidth:Math.max(80,(0,Q.k7)(h,"dateAsText")+25),textWidth:Math.min(140,(0,Q.k7)(h,"text")+25),amountWidth:Math.max(77,(0,Q.k7)(h,"amountAsText")+25),balanceWidth:Math.max(77,(0,Q.k7)(h,"balanceAsText")+25)},D=C.dateWidth,_=C.textWidth,R=C.amountWidth,T=C.balanceWidth,[{key:"date",dataIndex:"dateAsText",title:I18n.translate("date"),width:D},{key:"text",dataIndex:"text",title:I18n.translate("text"),width:_},{key:"amount",dataIndex:"amountAsText",title:I18n.translate("amount"),width:R,className:"text-right"},{key:"balance",dataIndex:"balanceAsText",title:I18n.translate("balance"),width:T,className:"text-right"}]),data:h,rowKey:"key"}))))};hN.defaultProps={fiscalYears:[],fromDate:"",toDate:""};const yN=(0,zn.Ng)(function(e){var t=e.defaults,n=t.fiscalYears,r=t.reportParameterDefaults,o=e.companies,i=o.finalize,a=o.currentXid;return{fiscalYears:n,fromDate:i.reportParamFiscalYearStartDate||(0,Fu.H_)(r,Fu.tw),toDate:i.reportParamFiscalYearEndDate||(0,Fu.H_)(r,Fu.mi),companyXid:a}})(hN);function bN(e){return{type:Pl.Oz,data:e}}var gN;function wN(e,t,n,r){gN||(gN="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:gN,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function SN(e){var t=e.years,n=e.selectedYear,o=e.onYearChange,i=e.onSubmit,a=e.showReport,l=e.validators,s=void 0===l?[Mu.A]:l,c=e.showDownloadButtons,u=void 0===c||c,d=e.inpRefBindingPoint;return wN("form",{className:"report-form",onSubmit:(0,Q._s)({},2,i)},void 0,wN("div",{className:"container-fluid"},void 0,r.createElement(Zd.X,{key:"inp",id:"trf-year",label:"parameters.year",value:n,ref:(0,Q._s)({},1,function(e){d&&(d.inp=e)}),options:t,validators:s,onChange:o})),u?wN("div",{},void 0,wN("div",{className:"separator"}),wN("div",{className:"container-fluid"},void 0,wN("div",{className:"form-group"},void 0,wN(su,{mode:"PDF",onClick:a}),wN(su,{mode:"EXCEL",onClick:a}),wN(su,{type:"submit"}),wN(Su,{onClick:a})))):null)}var kN,ON=n(96540);function NN(e){return NN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NN(e)}function xN(e,t,n,r){kN||(kN="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:kN,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function PN(e){return function(e){if(Array.isArray(e))return IN(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return IN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IN(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function AN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MN(r.key),r)}}function CN(e,t,n){return t=RN(t),function(e,t){if(t&&("object"==NN(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jN()?Reflect.construct(t,n||[],RN(e).constructor):t.apply(e,n))}function jN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jN=function(){return!!e})()}function DN(e,t,n,r){var o=_N(RN(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function _N(){return _N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=RN(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},_N.apply(null,arguments)}
1function RN(e){return RN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RN(e)}function TN(e,t){return TN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},TN(e,t)}function EN(e,t,n){return(t=MN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MN(e){var t=function(e,t){if("object"!=NN(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=NN(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==NN(t)?t:t+""}var FN=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),EN(n=CN(this,t,[e]),"methods",{}),n.validators=[Mu.A],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TN(e,t)}(t,e),function(e,t,n){return t&&AN(e.prototype,t),n&&AN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){DN(t,"componentDidMount",this,3)([]),!this.props.transactionsReport.year&&this.props.years.length&&this.props.actions.updateTransactionsReport(this.props.years[0].value),this.load()}},{key:"componentDidUpdate",value:function(e){this.props.transactionsReport===e.transactionsReport&&this.props.years===e.years||!this.props.transactionsReport.year&&this.props.years.length&&this.props.actions.updateTransactionsReport(this.props.years[0].value),this.load()}},{key:"load",value:function(){var e=this;this.props.transactionsReport.loading||this.props.transactionsReport.loaded||!this.props.transactionsReport.year||this.validate().then(function(t){return t&&e.props.actions.fetchLiveReport({type:p.a_,year:e.props.transactionsReport.year})})}},{key:"onLanguageChange",value:function(){DN(t,"onLanguageChange",this,3)([]),this.validators=[Mu.A]}},{key:"validate",value:function(){return this.inp.validate(this.props.transactionsReport.year).then(function(e){return e.every(function(e){return e.valid})})}},{key:"handleSubmit",value:function(e){e.preventDefault(),this.showReport()}},{key:"showReport",value:function(e,t){var n=this;this.validate().then(function(r){if(r){var o={type:p.a_,year:n.props.transactionsReport.year,output:e};t&&(o.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(o)),"_blank")}})}},{key:"render",value:function(){var e=Math.max.apply(Math,PN(this.props.transactionsReport.liveData.map(function(e){return(0,Q.k7)(e.items,"amountAsText")})));return xN(Ku,{animate:this.props.animate},void 0,xN(SN,{years:this.props.years,selectedYear:this.props.transactionsReport.year,onYearChange:this.props.actions.updateTransactionsReport,onSubmit:this.handleSubmit.bind(this),showReport:this.showReport.bind(this),showDownloadButtons:!0,validators:this.validators,inpRefBindingPoint:this}),xN("div",{className:"separator mt-0"}),xN("div",{className:"app-toolbar__report-title"},void 0,xN("i",{className:"fa fa-circle mr-1","aria-hidden":"true"}),xN("span",{className:"mr-1"},void 0,I18n.translate("menu.transactions")),xN("span",{},void 0,I18n.translate("report.miniversion"))),xN("div",{className:"app-toolbar__report-container",style:{overflow:"auto"}},void 0,this.props.transactionsReport.liveData.map(function(t,n){return xN(ON.Fragment,{},n,xN("div",{className:"app-toolbar__subtitle"},void 0,t.title),xN("div",{className:"px-2 py-1"},void 0,t.items.map(function(t,r){return xN("div",{className:"d-flex align-items-center my-1"},"".concat(n,"-").concat(r),xN("div",{className:"flex-shrink-0",style:{width:90}},void 0,t.financePostingDateAsText),xN("div",{className:"flex-grow-1"},void 0,t.financeAccountText),xN("div",{className:"flex-shrink-0 text-right",style:{width:e}},void 0,t.amountAsText))})))})),this.props.transactionsReport.lastUpdate?xN("div",{className:"text-gray my-1 px-2"},void 0,xN(bu,{start:this.props.transactionsReport.lastUpdate})):null)}}])}(co.b);EN(FN,"propTypes",{animate:q().bool,years:q().arrayOf(q().shape({text:q().string,value:q().string}))}),EN(FN,"defaultProps",{type:"",years:[]});const zN=(0,zn.Ng)(function(e){return{years:e.defaults.fiscalYearReportParams,transactionsReport:e.transactionsReport}},function(e){return{actions:(0,oo.zH)({updateTransactionsReport:bN,fetchLiveReport:Kc},e)}})(FN);function BN(e){return{type:Pl.oC,data:e}}var HN,LN=n(95093),$N=n(96540);function XN(e){return XN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XN(e)}function VN(){return VN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VN.apply(null,arguments)}function qN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function UN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?qN(Object(n),!0).forEach(function(t){WN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function WN(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=XN(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=XN(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==XN(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YN(e,t,n,r){HN||(HN="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:HN,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var KN=function(e){var t=e.accountNumber,n=e.accountName,r=e.differenceAsText,o=e.sectionSum;return YN("div",{className:"d-flex align-items-center ".concat(o?"font-bold":"")},t+n,YN("div",{className:"flex-grow-1 flex-shrink-1 pl-2 pr-1"},void 0,o?"Sum":"".concat(t," ").concat(n)),YN("div",{className:"text-right flex-shrink-0 pr-2 pl-1"},void 0,r))};const GN=(0,zn.Ng)(function(e){var t=e.defaults,n=t.fiscalYears,r=t.reportParameterDefaults,o=e.companies.finalize;return{fiscalYears:n,fromDate:o.reportParamFiscalYearStartDate||(0,Fu.H_)(r,Fu.tw),toDate:o.reportParamFiscalYearEndDate||(0,Fu.H_)(r,Fu.mi),vatCheckReport:e.vatCheckReport}},function(e){return{actions:(0,oo.zH)({updateVatCheckReport:BN,fetchLiveReport:Kc},e)}})(function(e){var t=e.fromDate,n=void 0===t?"":t,o=e.toDate,i=void 0===o?"":o,s=e.fiscalYears,c=void 0===s?[]:s,u=e.animate,d=e.vatCheckReport,f=e.actions,m=(0,r.useRef)({FROM_DATE_REF_METHOD:(0,r.createRef)(null),TO_DATE_REF_METHOD:(0,r.createRef)(null)});(0,r.useEffect)(function(){h({fromDate:n,toDate:i,vatCheckReport:d,actions:f})},[n,i,f]),(0,r.useEffect)(function(){y()},[d.fromDate,d.toDate]);var v=(0,r.useMemo)(function(){return{fromDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=LN(e,p.D2),r=LN(d.toDate,p.D2);return n.isAfter(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:c.some(function(e){return n.isBetween(LN(e.fromDate,p.D2),LN(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}],toDate:[function(e){var t=(0,Eu.A)({required:!0,checkFormat:!0})(e);if(!t.valid)return t;var n=LN(e,p.D2),r=LN(d.fromDate,p.D2);return n.isBefore(r)?{valid:!1,message:I18n.translate("work.edit.validate.from.before.to")}:{valid:c.some(function(e){return n.isBetween(LN(e.fromDate,p.D2),LN(e.toDate,p.D2),null,"[]")}),message:I18n.translate("work.edit.validate.insideyears")}}]}},[c,d]),h=function(e){var t=e.vatCheckReport,n=e.actions,r=e.toDate,o=e.fromDate,i=null;t.fromDate||(i=UN(UN({},i),{},{fromDate:o||""})),t.toDate||(i=UN(UN({},i),{},{toDate:r||""})),i&&n.updateVatCheckReport(i)},y=function(){d.loading||b().then(function(e){e&&f.fetchLiveReport({type:p.VF,fromdate:d.fromDate,todate:d.toDate})})},b=function(){return Promise.all([m.current.FROM_DATE_REF_METHOD.current.validate(d.fromDate),m.current.TO_DATE_REF_METHOD.current.validate(d.toDate)]).then(function(e){return e.every(function(e){return e.every(function(e){return e.valid})})})},g=function(e,t){b().then(function(n){if(n){var r={type:p.VF,output:e,fromdate:d.fromDate,todate:d.toDate};t&&(r.explain=!0),window.open("".concat(l.Vy5,"?").concat((0,a.HQ)(r)),"_blank")}})},w=(0,r.useMemo)(function(){return{outgoing:d.liveData.filter(function(e){return"OUTGOING"===e.vatSection}),incoming:d.liveData.filter(function(e){return"INCOMING"===e.vatSection})}},[d.liveData]),S=w.outgoing,k=w.incoming;return YN(Ku,{animate:u},void 0,YN("form",{className:"report-form",onSubmit:function(e){e.preventDefault(),g()}},void 0,YN("div",{className:"container-fluid"},void 0,YN(Fn(),{},void 0,YN(Rn(),{sm:5},void 0,$N.createElement(tu.$,{id:"ntb-fromdate",key:"ntb-fromdate",label:"parameters.fromdate",className:"mr-2",value:d.fromDate,ref:m.current.FROM_DATE_REF_METHOD,validators:v.fromDate,pullRight:!0,onChange:function(e){return f.updateVatCheckReport({fromDate:e})}})),YN(Rn(),{sm:5},void 0,$N.createElement(tu.$,{id:"ntb-todate",key:"ntb-todate",label:"parameters.todate",value:d.toDate,ref:m.current.TO_DATE_REF_METHOD,validators:v.toDate,pullRight:!0,onChange:function(e){return f.updateVatCheckReport({toDate:e})}})))),YN("div",{className:"separator"}),YN("div",{className:"container-fluid"},void 0,YN("div",{className:"form-group"},void 0,YN(su,{mode:"PDF",onClick:g}),YN(su,{mode:"EXCEL",onClick:g}),YN(su,{type:"submit"}),YN(Su,{onClick:g}
1)))),YN("div",{className:"rc-table-header d-flex align-items-center"},void 0,YN("div",{className:"rc-table-cell flex-grow-1 flex-shrink-1 pl-2 pr-1"},void 0," "),YN("div",{className:"rc-table-cell text-right flex-shrink-0 px-1"},void 0,I18n.translate("vatcheck.difference"))),YN("div",{className:"app-toolbar__report-container",style:{overflow:"auto"}},void 0,YN("div",{className:"font-bold text-center",style:{padding:"5px 0"}},void 0,I18n.translate("vatcheck.OUTGOING")),S.map(function(e,t){return $N.createElement(KN,VN({},e,{key:e.accountNumber+t}))}),YN("div",{className:"font-bold text-center",style:{padding:"5px 0"}},void 0,I18n.translate("vatcheck.INCOMING")),k.map(function(e,t){return $N.createElement(KN,VN({},e,{key:e.accountNumber+t}))})))});var QN,ZN=n(96540),JN=n(59499);function ex(e){return ex="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ex(e)}function tx(e,t,n,r){QN||(QN="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:QN,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nx.apply(null,arguments)}function rx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ux(r.key),r)}}function ox(e,t,n){return t=lx(t),function(e,t){if(t&&("object"==ex(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ix()?Reflect.construct(t,n||[],lx(e).constructor):t.apply(e,n))}function ix(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ix=function(){return!!e})()}function ax(){return ax="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=lx(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},ax.apply(null,arguments)}function lx(e){return lx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lx(e)}function sx(e,t){return sx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sx(e,t)}function cx(e,t,n){return(t=ux(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ux(e){var t=function(e,t){if("object"!=ex(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ex(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ex(t)?t:t+""}var dx=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),cx(n=ox(this,t,[e]),"shortcutHelper",void 0),cx(n,"state",{animate:!1,crashed:!1,replace:null}),n.handleNavigation=n.handleNavigation.bind(n),n.handleBack=n.handleBack.bind(n),n.handleHide=function(){return n.props.actions.toggleToolbar(!1)},n.props.show&&n.setShortcuts(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sx(e,t)}(t,e),function(e,t,n){return t&&rx(e.prototype,t),n&&rx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidUpdate",value:function(e,t){var n=this;!this.props.show&&e.show&&(this.shortcutHelper&&this.shortcutHelper.destroy(),setTimeout(function(){return window.dispatchEvent(new CustomEvent(p.gJ))},250)),this.props.show&&!e.show&&(this.setShortcuts(),setTimeout(function(){return window.dispatchEvent(new CustomEvent(p.ZS,{detail:JSON.stringify({activeScreen:n.props.screens[n.props.screens.length-1]})}))},250)),!t.animate&&this.state.animate&&(this.timer=setTimeout(function(){n.state.replace?n.props.actions.replace(n.state.replace):n.props.actions.goBack(),n.setState({animate:!1,replace:null})},250)),this.props.screens!==e.screens&&(this.shortcutHelper&&this.shortcutHelper.destroy(),this.setShortcuts())}},{key:"componentWillUnmount",value:function(){!function(e,t,n,r){var o=ax(lx(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}(t,"componentWillUnmount",this,3)([]),clearTimeout(this.timer),clearTimeout(this.shortcutsTimer),this.shortcutHelper&&this.shortcutHelper.destroy()}},{key:"setShortcuts",value:function(){var e=this;clearTimeout(this.shortcutsTimer),this.shortcutsTimer=setTimeout(function(){var n=t.getShortcuts(e.props),r=[{keys:n.inbox,handler:function(){return e.handleNavigation("inbox")}},n.reports&&{keys:n.reports,handler:function(){return e.handleNavigation("reports")}},n["annualreport.pdf"]&&{keys:n["annualreport.pdf"],handler:function(){return e.handleNavigation("annualreport.pdf")}},n["annualreport.specifications"]&&{keys:n["annualreport.specifications"],handler:function(){return e.handleNavigation("annualreport.specifications")}}].filter(Boolean);e.shortcutHelper?e.shortcutHelper.setShortCuts(r):e.shortcutHelper=new mo.F(r)},300)}},{key:"handleNavigation",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).replace,n=void 0!==t&&t;this.props.navigationLocked||(n?this.setState({animate:!0,replace:e}):this.props.actions.push(e))}},{key:"handleBack",value:function(){this.state.navigationLocked||this.setState({animate:!0})}},{key:"renderScreen",value:function(e){var t={key:e,active:e===this.props.screens[this.props.screens.length-1],animate:e===this.props.screens[this.props.screens.length-1]&&this.state.animate,onNavigate:this.handleNavigation,onBack:this.handleBack,companyTypeIsSinglePersonOrIS:this.props.companyTypeIsSinglePersonOrIS};if(/^fileDetails\/[0-9]+$/.test(e))return ZN.createElement(fy,nx({},t,{fileXid:e.split("/")[1]}));if(/^accountStatement\?.*$/.test(e)){var n=(0,Bc.Dl)(e,{ignoreQueryPrefix:!0}).query;return ZN.createElement(hd,nx({},t,{queryData:n}))}if(/^helpArticle\?.*$/.test(e)){var r=(0,Bc.Dl)(e,{ignoreQueryPrefix:!0}).query;return ZN.createElement(_b,nx({},t,{key:"helpArticle"},r))}switch(e){case"accountStatement":return ZN.createElement(hd,t);case"incomeStateAndBalance":return ZN.createElement(gS,t);case"issuedInvoices":return ZN.createElement(AS,t);case"notsettledbank":return ZN.createElement(rk,t);case"vatcheck":return ZN.createElement(GN,t);case"transactions":return ZN.createElement(zN,t);case"chartOfAccounts":return ZN.createElement(lp,t);case"debitorStatement":return ZN.createElement(Um,t);case"creditorStatement":return ZN.createElement(Sm,t);case"securitiesBalance":return ZN.createElement(xp,t);case"dividends":return ZN.createElement(mh,t);case"bondinterests":return ZN.createElement(Cf,t);case"cashAccountCurrency":return ZN.createElement(zm,t);case"roi":return ZN.createElement(kO,t);case"overview":return ZN.createElement(Sk,t);case"privateEquity":return ZN.createElement(zk,t);case"reports":return ZN.createElement(Jk,t);case"bank":return ZN.createElement(uf,t);case"inbox":return ZN.createElement(Bw,nx({},t,{accessObj:this.props.accessObj}));case"help":return ZN.createElement(Ig,t);case"help-begin":return ZN.createElement(Gb,t);case"help-smart":return ZN.createElement(Dg,t);case"help-stocks":return ZN.createElement(Eg,t);case"help-privatelyheld":return ZN.createElement(hg,t);case"help-migrate":return ZN.createElement(sg,t);case"help-annual-report":return ZN.createElement(pb,t);case"help-invoicing":return ZN.createElement(og,t);case"help-accesscontrol":return ZN.createElement(cb,t);case"help-company-tax":return ZN.createElement(eg,t);case"help-payroll":return ZN.createElement(fg,t);case"help-bankreconcile":return ZN.createElement(Mb,t);case"help-vat":return ZN.createElement(Bg,t);case"annualreport.checkguide":return ZN.createElement(Rp,t);case"annualreport.pdf":return ZN.createElement(Kd,t);case"annualreport.specifications":return ZN.createElement(uN,t);case"contact":return ZN.createElement(hm,t);case"news":return ZN.createElement(qS,t);case"securities":return ZN.createElement(UO,t);case"grants":return ZN.createElement(ib,t);case"changes":return ZN.createElement(Wf,t);case"gettingStarted":return ZN.createElement($y,t);case"sales":return ZN.createElement(_O,t);case"taxaccount":return ZN.createElement(yN,t);case"mobilepay":return ZN.createElement(HS,t);default:return ZN.createElement(lh,nx({},t,{accessObj:this.props.accessObj}))}}},{key:"componentDidCatch",value:function(e){this.setState({crashed:!0}),JN.captureError(e,{componentName:"AppToolbar",history:this.props.screens.slice()})}},{key:"render",value:function(){var e=this,n=this.props,r=n.show,o=n.screens,i=n.displayLocked,a=this.state.crashed;return tx("div",{className:"app-toolbar ".concat(r?"open":"")},void 0,tx("div",{className:"app-toolbar__header clearfix"},void 0,o.length>1&&tx("button",{type:"button",className:"btn btn-default btn-bordered-dark-blue app-toolbar__back-btn",onClick:this.handleBack},void 0,tx("i",{className:"fa fa-chevron-left mr-1","aria-hidden":"true"}),t.getTitle(o[o.length-2])),tx("span",{},void 0,t.getTitle(o[o.length-1])),tx("button",{type:"button",className:"btn btn-default btn-bordered-dark-blue app-toolbar__hide-btn",onClick:!i&&this.handleHide},void 0,tx("i",{className:"fa fa-minus mr-1","aria-hidden":"true"}),I18n.translate("toolpanel.hide"))),tx("div",{className:"app-toolbar__screen"},void 0,a&&tx("p",{className:"mt-5 text-center text-danger px-2"},void 0,tx("i",{className:"fa fa-warning fa-5x mb-2","aria-hidden":"true"}),tx("br",{}
1),I18n.translate("error.generic.message")),r&&!a&&o&&o.map(function(t){return e.renderScreen(t)})))}}],[{key:"getShortcuts",value:function(e){var t=e.usageTypeAnnualReportOnly,n=e.companyTypeIsSinglePerson,r={inbox:"shift+".concat(I18n.translate("shortcut.tool.inbox")[0])};return t||(r.reports="shift+".concat(I18n.translate("shortcut.tool.reports")[0]),n||(r["annualreport.specifications"]="shift+".concat(I18n.translate("shortcut.tool.spec")[0]),r["annualreport.pdf"]="shift+".concat(I18n.translate("shortcut.tool.annualreport")[0]))),r}},{key:"getTitle",value:function(e){if(/^fileDetails\/[0-9]+$/.test(e))return I18n.translate("tool.filedetails.title");if(/^accountStatement\?.*$/.test(e))return I18n.translate("menu.accountstatement.short");switch(e){case"accountStatement":return I18n.translate("menu.accountstatement.short");case"incomeStateAndBalance":return I18n.translate("menu.resultandbalance");case"issuedInvoices":return I18n.translate("menu.issuedinvoices");case"notsettledbank":return I18n.translate("menu.notsettledbank");case"vatcheck":return I18n.translate("menu.vatcheck");case"transactions":return I18n.translate("menu.transactions");case"chartOfAccounts":return I18n.translate("menu.chartofaccounts");case"debitorStatement":return I18n.translate("menu.debitorstatement");case"creditorStatement":return I18n.translate("menu.creditorstatement");case"securitiesBalance":return I18n.translate("menu.securitiesbalance");case"bondinterests":return I18n.translate("menu.bondinterests");case"dividends":return I18n.translate("menu.dividends");case"cashAccountCurrency":return I18n.translate("menu.cashaccountcurrency");case"roi":return I18n.translate("menu.roireport");case"overview":return I18n.translate("menu.overview");case"privateEquity":return I18n.translate("menu.privateequity");case"reports":return I18n.translate("menu.reports");case"inbox":return I18n.translate("menu.inbox");case"bank":return I18n.translate("popup.bankcompany");case"help":case"gettingStarted":return I18n.translate("menu.help");case"annualreport.checkguide":return I18n.translate("menu.annualreport.checkguide.short");case"annualreport.pdf":return I18n.translate("menu.annualreport");case"annualreport.specifications":return I18n.translate("menu.annualreport.specs");case"contact":return I18n.translate("assist.chat");case"news":return I18n.translate("news");case"securities":return I18n.translate("menu.securityreport");case"grants":return I18n.translate("menu.grants");case"changes":return I18n.translate("menu.changes");case"sales":return I18n.translate("salestool.title");case"taxaccount":return I18n.translate("menu.taxaccount");default:return I18n.translate("toolpanel.title")}}}])}(co.b);cx(dx,"propTypes",{show:q().bool,navigationLocked:q().bool,displayLocked:q().bool,screens:q().arrayOf(q().string),accessObj:q().object.isRequired});const fx=(0,zn.Ng)(function(e){return{show:e.menu.showToolbar,navigationLocked:e.menu.navigationLocked,displayLocked:e.menu.displayLocked,screens:e.menu.screens}},function(e){return{actions:(0,oo.zH)({toggleToolbar:so.Ib,goBack:so.OE,push:so.VC,replace:so.HC},e)}})(dx);var px,mx=n(23493);function vx(e,t,n,r){px||(px="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:px,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function hx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yx(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yx(e,t):void 0}}
1(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bx(e){var t=e.showToolbar,n=e.children,o=hx((0,r.useState)(null),2),i=o[0],a=o[1];(0,r.useEffect)(function(){var e=function(){a(window.innerWidth)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[]);var l=t?mx.aC+mx.Pv:mx.aC,s=t?mx.Em+mx.Pv:mx.Em,c=null!=i&&i<=l,u=null!=i&&i>l&&i<=s;return vx(yo.G.Provider,{value:{windowWidth:i,showToolbar:t,navBurger:c,navCompact:u}},void 0,vx("div",{className:"app ".concat(t?"toolbar-open":""," ").concat(u?"nav-compact":""," ").concat(c?"nav-burger":"")},void 0,n))}var gx,wx=n(96540),Sx=["onHide","closeBtn","children","btnClassName","onSubmit","submitBtnText","title"];function kx(e){return kx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kx(e)}function Ox(){return Ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ox.apply(null,arguments)}function Nx(e,t,n,r){gx||(gx="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:gx,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function xx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dx(r.key),r)}}function Px(e,t,n){return t=Ax(t),function(e,t){if(t&&("object"==kx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ix()?Reflect.construct(t,n||[],Ax(e).constructor):t.apply(e,n))}function Ix(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ix=function(){return!!e})()}function Ax(e){return Ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ax(e)}function Cx(e,t){return Cx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cx(e,t)}function jx(e,t,n){return(t=Dx(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dx(e){var t=function(e,t){if("object"!=kx(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kx(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kx(t)?t:t+""}var _x,Rx=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return jx(e=Px(this,t,[].concat(r)),"state",{show:!1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cx(e,t)}(t,e),function(e,t,n){return t&&xx(e.prototype,t),n&&xx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){this.setState({show:!0})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"hide",value:function(e){var t=this;this.setState({show:!1},function(){t.timer=setTimeout(e,200)})}},{key:"render",value:function(){var e=this,t=this.props,n=t.onHide,r=t.closeBtn,o=t.children,i=t.btnClassName,a=t.onSubmit,l=t.submitBtnText,s=t.title,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,Sx);return wx.createElement(qc(),Ox({},c,{show:this.state.show,onHide:function(){return e.hide(n)}}),Nx(qc().Header,{closeButton:r},void 0,Nx(qc().Title,{},void 0,s)),Nx(qc().Body,{},void 0,o),Nx(qc().Footer,{},void 0,Nx("button",{type:"button",className:i,onClick:function(){return e.hide(a)}},void 0,l||I18n.translate("tour.next"))))}}])}(r.Component);function Tx(e){return Tx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tx(e)}function Ex(e,t,n,r){_x||(_x="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:_x,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Mx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fx(r.key),r)}}function Fx(e){var t=function(e,t){if("object"!=Tx(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Tx(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Tx(t)?t:t+""}function zx(e,t,n){return t=Hx(t),function(e,t){if(t&&("object"==Tx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bx()?Reflect.construct(t,n||[],Hx(e).constructor):t.apply(e,n))}function Bx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bx=function(){return!!e})()}function Hx(e){return Hx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hx(e)}function Lx(e,t){return Lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Lx(e,t)}jx(Rx,"defaultProps",{title:"",btnClassName:"btn btn-primary"});var $x=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),zx(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lx(e,t)}(t,e),function(e,t,n){return t&&Mx(e.prototype,t),n&&Mx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return Ex(Rx,{title:I18n.translate("tour.basic.title"),onHide:this.props.onNext,onSubmit:this.props.onNext},void 0,I18n.translate("tour.stop"))}}])}(r.Component);const Xx=$x;var Vx,qx=n(50942),Ux=n.n(qx);function Wx(e){return Wx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wx(e)}function Yx(e,t,n,r){Vx||(Vx="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Vx,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Kx(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tP(r.key),r)}}function Gx(e,t,n){return t=Zx(t),function(e,t){if(t&&("object"==Wx(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Qx()?Reflect.construct(t,n||[],Zx(e).constructor):t.apply(e,n))}function Qx(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qx=function(){return!!e})()}
1function Zx(e){return Zx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Zx(e)}function Jx(e,t){return Jx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jx(e,t)}function eP(e,t,n){return(t=tP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tP(e){var t=function(e,t){if("object"!=Wx(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Wx(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wx(t)?t:t+""}var nP,rP=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),eP(n=Gx(this,t,[e]),"state",{top:0,right:0,left:0,bottom:0}),n.scrollHandler=W()(function(){return n.setupElement(n.props.selector)},100),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Jx(e,t)}(t,e),function(e,t,n){return t&&Kx(e.prototype,t),n&&Kx(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){this.shouldScrollIntoView=!0,this.setupElement(this.props.selector)}},{key:"componentWillUnmount",value:function(){this.clearListeners(this.props.selector)}},{key:"setUpListeners",value:function(e){var t=document.querySelector(e),n=(0,Q.mH)(t);t&&(n.addEventListener("scroll",this.scrollHandler),(t.parentNode||t).addEventListener("resize",this.scrollHandler))}},{key:"clearListeners",value:function(e){var t=document.querySelector(e),n=(0,Q.mH)(t);t&&(n.addEventListener("scroll",this.scrollHandler),(t.parentNode||t).addEventListener("resize",this.scrollHandler))}},{key:"componentDidUpdate",value:function(e){if(e.position===this.props.position&&this.props.selector===e.selector||(this.props.selector!==e.selector&&this.clearListeners(e.selector),this.setupElement(this.props.selector),this.shouldScrollIntoView=!0),this.shouldScrollIntoView){var t=document.querySelector(e.selector);t&&(t.scrollIntoView(),(0,Q.mH)(t).scrollBy(0,-20),this.shouldScrollIntoView=!1)}}},{key:"setupElement",value:function(e){var t=document.querySelector(e);if(t){this.setUpListeners(e);var n=(0,Q.NO)(t),r=n.y,o=n.x,i=n.width,a=n.height;"top"===this.props.position&&this.setState({top:"auto",bottom:document.body.clientHeight-r,left:o+i/2-138,right:"auto"}),"bottom"===this.props.position&&this.setState({top:r+a/2+20,left:i/2-138,right:"auto",bottom:"auto"}),"left"===this.props.position&&this.setState({top:r+a/2-20,right:document.body.clientWidth-o+10,left:"auto",bottom:"auto"}),"right"===this.props.position&&this.setState({top:r+a/2-20,right:"auto",bottom:"auto",left:o+i})}}},{key:"render",value:function(){return G.createPortal(Yx(Ux(),{placement:this.props.position,className:"beacon",arrowOffsetTop:["left","right"].includes(this.props.position)?20:void 0,style:{top:this.state.top,right:this.state.right,left:this.state.left,bottom:this.state.bottom}},void 0,this.props.children),document.body)}}])}(r.PureComponent);function oP(e){return oP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oP(e)}function iP(e,t,n,r){nP||(nP="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:nP,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function aP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dP(r.key),r)}}function lP(e,t,n){return t=cP(t),function(e,t){if(t&&("object"==oP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sP()?Reflect.construct(t,n||[],cP(e).constructor):t.apply(e,n))}function sP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(sP=function(){return!!e})()}function cP(e){return cP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cP(e)}function uP(e,t){return uP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uP(e,t)}function dP(e){var t=function(e,t){if("object"!=oP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=oP(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==oP(t)?t:t+""}eP(rP,"defaultProps",{position:"left"});var fP=[{selector:".work-page > .table-st",position:"top",text:I18n.translate("tour.basic.1")},{selector:"#companies-dropdown-navigation.dropdown-menu",text:I18n.translate("tour.basic.2a"),event:p.q7},{selector:"#setup-dropdown-navigation.dropdown-menu",text:I18n.translate("tour.basic.2b"),event:p.m2},{selector:"#work-dropdown-navigation.dropdown-menu",text:I18n.translate("tour.basic.2c"),event:p.yW},{selector:"#finalize-dropdown-navigation.dropdown-menu",text:I18n.translate("tour.basic.2d"),event:p.rr},{selector:"#archive-dropdown-navigation.dropdown-menu",text:I18n.translate("tour.basic.2e"),event:p.fB},{selector:"#magics-dropdown-navigation.dropdown-menu",text:I18n.translate("tour.basic.2f"),event:p.ml},{selector:"#help-dropdown-navigation.dropdown-menu",text:I18n.translate("tour.basic.2g"),event:p.a$}],pP=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){(t=dP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(e=lP(this,t,[].concat(r)),"state",{start:!1,step:0}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uP(e,t)}(t,e),function(e,t,n){return t&&aP(e.prototype,t),n&&aP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){var e=this;(0,Q.wz)((0,Q.ID)("/work/ui"))?this.setState({start:!0}):(this.props.history.push((0,Q.ID)("/work/ui")),this.timer=setTimeout(function(){return e.setState({start:!0})},1e3))}},{key:"componentDidUpdate",value:function(){(0,Q.wz)((0,Q.ID)("/work/ui"))||this.state.step||this.setState({step:1})}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timer)}},{key:"handleNext",value:function(){var e=this;this.state.step+1<fP.length?(fP[this.state.step+1].event&&window.dispatchEvent(new CustomEvent(fP[this.state.step+1].event)),setTimeout(function(){e.setState({step:e.state.step+1})},100)):this.props.onNext()}},{key:"render",value:function(){var e=this;if(!this.state.start)return null;var t=fP[this.state.step],n=t.selector,r=t.text,o=t.position;return iP(rP,{position:void 0===o?"right":o,selector:n},void 0,iP("p",{},void 0,r),iP("div",{className:"text-right"},void 0,iP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.handleNext()}},void 0,I18n.translate("tour.next"))))}}])}(r.Component);const mP=(0,o.y)(pP);var vP,hP=n(96540);function yP(e){return yP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yP(e)}function bP(e,t,n,r){vP||(vP="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:vP,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function gP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xP(r.key),r)}}function wP(e,t,n){return t=kP(t),function(e,t){if(t&&("object"==yP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,SP()?Reflect.construct(t,n||[],kP(e).constructor):t.apply(e,n))}function SP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(SP=function(){return!!e})()}function kP(e){return kP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},kP(e)}function OP(e,t){return OP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OP(e,t)}function NP(e,t,n){return(t=xP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xP(e){var t=function(e,t){if("object"!=yP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=yP(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yP(t)?t:t+""}var PP=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),NP(n=wP(this,t,[e]),"state",{hidMenu:!1,openedMenu:!1,navigated:!1,inbox:!1,bank:!1,verification:!1,annualReport:!1,specifications:!1,help:!1,chat:!1,start:!1}),n.handleOpened=function(e){if(n.state.hidMenu){var t=(0,Q.Ol)(e.detail),r={openedMenu:!0};t&&"main"===t.activeScreen&&(r.navigated=!0),n.setState(r),n.props.actions.toggleDisplay(!0)}},n.handleClose=function(){return n.setState({hidMenu:!0})},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OP(e,t)}(t,e),function(e,t,n){return t&&gP(e.prototype,t),n&&gP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){var e=this;window.addEventListener(p.ZS,this.handleOpened),window.addEventListener(p.gJ,this.handleClose),this.props.toolbarOpened?this.setState({start:!0}):(this.props.actions.toggleToolbar(!0),this.timer=setTimeout(function(){return e.setState({start:!0})},250))}},{key:"componentDidUpdate",value:function(){"main"!==this.props.screen||this.state.navigated||(this.setState({navigated:!0}),this.props.actions.toggleNavigation(!0),this.navigate("reports"))}},{key:"componentWillUnmount",value:function(){window.removeEventListener(p.ZS,this.handleOpened),window.removeEventListener(p.gJ,this.handleClose),clearTimeout(this.timer)}},{key:"navigate",value:function(e){this.setState(NP({},e,!0))}},{key:"render",value:function(){var e=this,t=".app-toolbar__hide-btn",n=I18n.translate("tour.basic.3a");return this.state.start?(this.state.hidMenu&&(t="#show-toolbar-btn",n=I18n.translate("tour.basic.3b")),this.state.openedMenu&&(t=".app-toolbar__back-btn",n=I18n.translate("tour.basic.3c")),this.state.navigated&&(t=".app-toolbar__reports-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3d")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.navigate("inbox")}},void 0,I18n.translate("tour.next"))))),this.state.inbox&&(t=".app-toolbar__inbox-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3e")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.navigate("bank")}},void 0,I18n.translate("tour.next"))))),this.state.bank&&(t=".app-toolbar__bank-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3f")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.navigate("annualreport.checkguide")}},void 0,I18n.translate("tour.next"))))),this.state["annualreport.checkguide"]&&(t=".app-toolbar__verification-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3g")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.navigate("annualreport.pdf")}},void 0,I18n.translate("tour.next"))))),this.state["annualreport.pdf"]&&(t=".app-toolbar__annual-report-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3h")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.navigate("annualreport.specifications")}},void 0,I18n.translate("tour.next"))))),this.state["annualreport.specifications"]&&(t=".app-toolbar__specifications-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3i")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.navigate("help")}},void 0,I18n.translate("tour.next"))))),this.state.help&&(t=".app-toolbar__help-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3j")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:function(){return e.navigate("contact")}},void 0,I18n.translate("tour.next"))))),this.state.contact&&(t=".app-toolbar__chat-btn",n=bP(hP.Fragment,{},void 0,bP("p",{},void 0,I18n.translate("tour.basic.3k")),bP("div",{className:"text-right"},void 0,bP("button",{type:"button",className:"btn btn-primary",onClick:this.props.onNext},void 0,I18n.translate("tour.next"))))),bP(rP,{position:"left",selector:t},void 0,n)):null}}])}(r.Component);const IP=(0,zn.Ng)(function(e){return{toolbarOpened:e.menu.showToolbar,screen:e.menu.screens[e.menu.screens.length-1]}},function(e){return{actions:(0,oo.zH)({toggleToolbar:so.Ib,toggleNavigation:so.DI,toggleDisplay:so.BM,push:so.VC,goBack:so.OE},e)}})(PP);function AP(e){return AP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},AP(e)}var CP;function jP(e,t,n,r){CP||(CP="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:CP,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function DP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_P(r.key),r)}}function _P(e){var t=function(e,t){if("object"!=AP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=AP(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==AP(t)?t:t+""}function RP(e,t,n){return t=EP(t),function(e,t){if(t&&("object"==AP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,TP()?Reflect.construct(t,n||[],EP(e).constructor):t.apply(e,n))}function TP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(TP=function(){return!!e})()}function EP(e){return EP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},EP(e)}function MP(e,t){return MP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},MP(e,t)}var FP=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),RP(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MP(e,t)}(t,e),function(e,t,n){return t&&DP(e.prototype,t),n&&DP(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return jP(Rx,{title:I18n.translate("tour.basic.title"),submitBtnText:I18n.translate("tour.finish"),onHide:this.props.onNext,onSubmit:this.props.onNext},void 0,I18n.translate("tour.end"))}}])}(r.Component);const zP=FP;function BP(e){return BP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BP(e)}var HP;function LP(e,t,n,r){HP||(HP="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:HP,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WP(r.key),r)}}function XP(e,t,n){return t=qP(t),function(e,t){if(t&&("object"==BP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}
1(e,VP()?Reflect.construct(t,n||[],qP(e).constructor):t.apply(e,n))}function VP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(VP=function(){return!!e})()}function qP(e){return qP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qP(e)}function UP(e,t){return UP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},UP(e,t)}function WP(e){var t=function(e,t){if("object"!=BP(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=BP(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==BP(t)?t:t+""}var YP=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){(t=WP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(n=XP(this,t,[e]),"state",{activeStep:0}),n.escHandler=function(e){return 27===(e.which||e.keyCode)&&n.props.actions.toggleGuide(!1)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UP(e,t)}(t,e),function(e,t,n){return t&&$P(e.prototype,t),n&&$P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){window.addEventListener("keyup",this.escHandler)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keyup",this.escHandler)}},{key:"render",value:function(){var e=this;switch(this.state.activeStep){case 0:return LP(Xx,{onNext:function(){return e.setState({activeStep:1})}});case 1:return LP(mP,{onNext:function(){return e.setState({activeStep:2})}});case 2:return LP(IP,{onNext:function(){return e.setState({activeStep:3})}});case 3:return LP(zP,{onNext:function(){return e.props.actions.toggleGuide(!1)}})}}}])}(r.Component);const KP=(0,zn.Ng)(null,function(e){return{actions:(0,oo.zH)({toggleGuide:py},e)}})(YP);var GP=n(99384),QP=n.n(GP),ZP=n(25667),JP=n.n(ZP),eI=n(96540);function tI(e){return tI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tI(e)}function nI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lI(r.key),r)}}function rI(e,t,n){return t=iI(t),function(e,t){if(t&&("object"==tI(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,oI()?Reflect.construct(t,n||[],iI(e).constructor):t.apply(e,n))}function oI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(oI=function(){return!!e})()}function iI(e){return iI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iI(e)}function aI(e,t){return aI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},aI(e,t)}function lI(e){var t=function(e,t){if("object"!=tI(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tI(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tI(t)?t:t+""}var sI,cI=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return function(e,t,n){(t=lI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(e=rI(this,t,[].concat(r)),"state",{JsonView:null,err:null}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aI(e,t)}(t,e),function(e,t,n){return t&&nI(e.prototype,t),n&&nI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){var e=this;Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187)]).then(n.t.bind(n,8785,23)).then(function(t){return e.setState({JsonView:t.default})}).catch(function(t){return e.setState({err:t})})}},{key:"render",value:function(){var e=this.state,t=e.JsonView,n=e.err;if(n)throw n;return t?eI.createElement(t,this.props):null}}])}(eI.PureComponent),uI=n(59499);function dI(e){return dI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dI(e)}function fI(e,t,n,r){sI||(sI="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:sI,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function pI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pI(Object(n),!0).forEach(function(t){wI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,SI(r.key),r)}}function hI(e,t,n){return t=bI(t),function(e,t){if(t&&("object"==dI(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yI()?Reflect.construct(t,n||[],bI(e).constructor):t.apply(e,n))}function yI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yI=function(){return!!e})()}function bI(e){return bI=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bI(e)}function gI(e,t){return gI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gI(e,t)}function wI(e,t,n){return(t=SI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SI(e){var t=function(e,t){if("object"!=dI(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=dI(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dI(t)?t:t+""}var kI=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),wI(n=hI(this,t,[e]),"state",{details:null,history:[]}),n.historyListener=function(e){return n.setState({history:e.map(function(e){return mI(mI({},e),{},{id:Math.random()})})})},n.hideDetails=function(){return n.setState({details:null})},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gI(e,t)}(t,e),function(e,t,n){return t&&vI(e.prototype,t),n&&vI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){this.setState({history:uI.getDebugHistory()}),uI.addDebugHistoryListener(this.historyListener)}},{key:"componentWillUnmount",value:function(){uI.removeDebugHistoryListener(this.historyListener)}},{key:"formatUrl",value:function(e){return 0===e.indexOf(window.location.origin)?e.slice(window.location.origin.length):e}},{key:"render",value:function(){var e=this,n=this.state,r=n.history,o=n.details;return fI("div",{className:"floating-container floating-container__right"},void 0,fI("div",{className:"floating-container__header"},void 0,fI("div",{},void 0,fI("button",{className:"btn btn-default mr-2",type:"button",onClick:function(){return e.setState({details:r})}},void 0,"View Raw"),fI("button",{className:"btn btn-action-danger btn-action__square",type:"button",onClick:function(){return uI.clearDebugHistory()}},void 0,"Clear")),fI("button",{className:"btn btn-link-dark pull-right",onClick:this.props.onHide},void 0,fI("i",{className:"fa fa-close","aria-hidden":"true"}))),fI(QP(),{className:"floating-container__body"},void 0,r.map(function(n){return fI(JP(),{className:"d-flex align-items-center ".concat(t.getStatusClass(n.status)),onClick:function(){return e.setState({details:n})}},n.id,t.getTypeIcon(n.type),"websocket"===n.type&&["subscribe","unsubscribe"].includes(n.status)&&fI("div",{className:"logs-text"},void 0,[n.type,n.status,n.topic].filter(Boolean).join(" - "))||fI("div",{className:"logs-text"},void 0,n.url&&e.formatUrl(n.url)||n.message||[n.type,n.status].filter(Boolean).join(" - ")))})),fI(gn.A,{show:null!==o,bsSize:"lg",class:"logs-modal",title:"Log Details",cancelBtnText:I18n.translate("ok"),onHide:this.hideDetails,enforceFocus:!1},void 0,o&&fI(cI,{name:"JSON",theme:"chalk",src:o})))}}],[{key:"getStatusClass",value:function(e){return["connected","message_received"].includes(e)||e<400?"log-status__ok":"disconnected"===e||e>400?"log-status__fail":["pending","connecting"].includes(e)?"log-status__pending":""}},{key:"getTypeIcon",value:function(e){return"shortcut"===e?fI("i",{className:"fa fa-keyboard-o fa-fw mr-2","aria-hidden":"true"}):"websocket"===e?fI("i",{className:"fa fa-long-arrow-up request-in fa-fw mr-2","aria-hidden":"true"}):"request"===e?fI("i",{className:"fa fa-long-arrow-up request-out fa-fw mr-2","aria-hidden":"true"}):"annual_report_change_detected"===e?fI(qv,{className:"mr-2 phi-fw "}):"bank-compare"===e?fI(Hv,{className:"mr-2 phi-fw "}):null}}])}(n(96540).PureComponent);const OI=kI;var NI,xI=n(3429),PI=n(96540);function II(e){return II="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},II(e)}function AI(e,t,n,r){NI||(NI="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:NI,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function CI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EI(r.key),r)}}function jI(e,t,n){return t=_I(t),function(e,t){if(t&&("object"==II(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,DI()?Reflect.construct(t,n||[],_I(e).constructor):t.apply(e,n))}function DI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(DI=function(){return!!e})()}function _I(e){return _I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_I(e)}function RI(e,t){return RI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RI(e,t)}function TI(e,t,n){return(t=EI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EI(e){var t=function(e,t){if("object"!=II(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=II(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==II(t)?t:t+""}var MI=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return TI(e=jI(this,t,[].concat(r)),"methods",{}),TI(e,"inputRefs",{}),TI(e,"state",{trace:""}),TI(e,"validators",[Mu.A,function(e){return{valid:(0,Yn.A)().validate({value:e,options:{max:100}}).valid,message:I18n.translate("validation.max","100")}}]),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RI(e,t)}(t,e),function(e,t,n){return t&&CI(e.prototype,t),n&&CI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidUpdate",value:function(e){this.props.show&&!e.show&&this.setState({trace:""})}},{key:"handleSubmit",value:function(){var e=this;this.inputRefs[1].validate(this.state.trace).then(function(e){return e.every(function(e){return e.valid})}).then(function(t){return t&&e.props.onSubmit(e.state.trace)})}},{key:"render",value:function(){var e=this;return AI(qc(),{show:this.props.show,onHide:this.props.onHide},void 0,AI(qc().Header,{closeButton:!0},void 0,AI(qc().Title,{},void 0,"Report issue")),AI(qc().Body,{},void 0,PI.createElement(xI.R,{key:"inp",id:"bug-report-inp",ref:(0,Q.qP)(this.methods,this.inputRefs,1),value:this.state.trace,autoFocus:!0,validators:this.validators,onKeyPress:(0,Q._s)(this.methods,3,function(t){return 13===t.which&&e.handleSubmit()}),onChange:(0,Q._s)(this.methods,2,function(t){return e.setState({trace:t})})})),AI(qc().Footer,{},void 0,AI("button",{type:"button",className:"btn btn-default",onClick:this.props.onHide},void 0,I18n.translate("confirmmodal.cancel")),AI("button",{type:"button",className:"btn btn-primary",onClick:this.handleSubmit.bind(this)},void 0,"Send Report")))}}])}(co.b);function FI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zI(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zI(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}TI(MI,"propTypes",{show:q().bool,onSubmit:q().func,onHide:q().func}),TI(MI,"defaultProps",{show:!1,onSubmit:function(){},onHide:function(){}});var BI;function HI(e){var t=e.companyXid,n=e.lastRequestSent,r=e.lastWebSocketMessageReceived;(function(e){var t=e.companyXid,n=e.transactionRequestSentAt,r=e.lastWebSocketMessageReceivedAt,o=e.timestampDiffMs;return(0,a.RD)(l.wxK,{method:"post",data:{companyXid:t,transactionRequestSentAt:n,lastWebSocketMessageReceivedAt:r,timestampDiffMs:o},ignoreStatus:[400,401,402,403,404,412,500,501,502,503,504,512]})})({companyXid:t,transactionRequestSentAt:n,lastWebSocketMessageReceivedAt:r,timestampDiffMs:null!=r?r-n:null}).catch(function(){})}function LI(e){var t=e.companyXid,n=e.lastRequestSent,o=e.lastWebSocketMessageReceived,i=FI((0,r.useState)(!1),2),a=i[0],l=i[1],s=(0,r.useRef)(null);return(0,r.useEffect)(function(){if(s.current=null,null!=n){var e=function(){var e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return null!=e&&!(null!=t&&t>=e)&&n-e>=6e4}(n,o);return l(e),e&&null!=t&&s.current!==n&&(s.current=n,HI({companyXid:t,lastRequestSent:n,lastWebSocketMessageReceived:o})),e};if(!e()){var r=6e4-(Date.now()-n),i=setTimeout(e,r);return function(){return clearTimeout(i)}}}else l(!1)},[t,n,o]),a}function $I(e,t,n,r){BI||(BI="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:BI,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var XI,VI=(0,r.createContext)(!1);function qI(){return(0,r.useContext)(VI)}function UI(e){var t=e.children,n=LI({companyXid:e.companyXid,lastRequestSent:e.lastRequestSent,lastWebSocketMessageReceived:e.lastWebSocketMessageReceived});return $I(VI.Provider,{value:n},void 0,t)}function WI(){return qI()?$I(bh(),{bsStyle:"warning",className:"ws-disconnected-alert"},void 0,$I("i",{className:"fa fa-warning fa-lg mr-2","aria-hidden":"true"}),I18n.translate("wsdisconnected")):null}function YI(e,t,n,r){XI||(XI="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:XI,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var KI,GI,QI=function(e){var t=e.busy,n=void 0!==t&&t,r=e.disconnected;return YI("div",{className:"ws-indicator ".concat((void 0!==r&&r?"inactive":n&&"active")||"")})},ZI=(0,r.memo)(QI);function JI(e,t,n,r){KI||(KI="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:KI,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function eA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return tA(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tA(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nA(e){var t=e.busy,n=void 0!==t&&t,o=e.disconnected,i=void 0!==o&&o,a=e.onReport,l=void 0===a?function(){}:a,s=e.serverId,c=e.lastWebSocketMessageReceived,u=e.lastRequestSent,d=eA((0,r.useState)(!1),2),f=d[0],m=d[1],v=eA((0,r.useState)(!1),2),h=v[0],y=v[1],b=qI();return JI(r.Fragment,{},void 0,JI(z(),{id:"floating-toolbar",className:"floating-toolbar",dropup:!0},void 0,JI(z().Toggle,{noCaret:!0},void 0,JI("div",{className:"ws-indicator-container"},void 0,JI(ZI,{busy:n,disconnected:i}),b&&JI("div",{className:"ws-indicator ws-indicator-timeout"}))),JI(z().Menu,{},void 0,JI(H(),{onSelect:function(){return m(function(e){return!e})}},void 0,JI("i",{className:"fa fa-bug fa-fw space-right","aria-hidden":"true"}),"Report"),JI(H(),{onSelect:function(){return y(function(e){return!e})}},void 0,JI("i",{className:"fa fa-file-text fa-fw space-right","aria-hidden":"true"}),"Logs"),JI(H(),{header:!0,className:"text-center text-transform-none"},void 0,"CID: ",p.U6),JI(H(),{header:!0,className:"text-center text-transform-none"},void 0,"Server ID: ",s),null!=u&&JI(H(),{header:!0,className:"text-center text-transform-none"},void 0,"Request sent: ",u),null!=c&&JI(H(),{header:!0,className:"text-center text-transform-none"},void 0,"WS received: ",c))),h&&JI(OI,{onHide:function(){return y(!1)}}),JI(MI,{show:f,onHide:function(){return m(!1)},onSubmit:function(e){m(!1),l(e)}}))}function rA(e){return rA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rA(e)}function oA(e,t,n,r){GI||(GI="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:GI,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function iA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dA(r.key),r)}}function aA(e,t,n){return t=sA(t),function(e,t){if(t&&("object"==rA(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lA()?Reflect.construct(t,n||[],sA(e).constructor):t.apply(e,n))}function lA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lA=function(){return!!e})()}function sA(e){return sA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sA(e)}function cA(e,t){return cA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cA(e,t)}function uA(e,t,n){return(t=dA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dA(e){var t=function(e,t){if("object"!=rA(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rA(t)?t:t+""}var fA,pA=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return uA(e=aA(this,t,[].concat(r)),"audio",null),uA(e,"notification",null),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cA(e,t)}(t,e),function(e,t,n){return t&&iA(e.prototype,t),n&&iA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1(t,[{key:"componentDidMount",value:function(){this.props.notify&&this.notify()}},{key:"componentDidUpdate",value:function(e){this.props.notify&&!e.notify&&this.notify(),!this.props.notify&&e.notify&&this.stop()}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"notify",value:function(){var e=this;this.audio?this.audio.play():Audio&&(this.audio=new Audio("/notify.mp3"),this.audio.loop=!0,this.audio.play()),Notification&&Notification.requestPermission(function(t){"granted"===t&&(e.notification=new Notification("Incoming message"))})}},{key:"stop",value:function(){this.audio&&this.audio.pause()}},{key:"render",value:function(){return this.props.notify?oA("div",{}):null}}])}(r.PureComponent);function mA(e,t,n,r){fA||(fA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:fA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function vA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hA(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hA(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}uA(pA,"defaultProps",{notify:!1});var yA=function(e){var t=e.label,n=e.children;return mA(Fn(),{className:"space-bottom"},void 0,mA(Rn(),{sm:6},void 0,t),mA(Rn(),{sm:6,className:"text-right"},void 0,n))},bA=function(e){var t,n=e.show,o=void 0!==n&&n,i=e.haveCompanies,a=void 0!==i&&i,l=e.haveSetup,s=void 0!==l&&l,c=e.haveWork,u=void 0!==c&&c,d=e.haveFinalize,f=void 0!==d&&d,m=e.haveArchive,v=void 0!==m&&m,h=e.showTransactionsShortCuts,y=void 0!==h&&h,b=e.excludeTypes,g=e.onHide,w=void 0===g?function(){}:g;t=vA((0,r.useReducer)(function(e){return e+1},0),2)[1],(0,r.useEffect)(function(){return window.addEventListener(p.ld,t),function(){return window.removeEventListener(p.ld,t)}},[]);var S=fx.getShortcuts(e),k=Oc.getShortcuts(e),O=rc.getShortcuts(e),N=Jk.getShortcuts();return mA(qc(),{show:o,onHide:w},void 0,mA(qc().Header,{closeButton:!0},void 0,mA(qc().Title,{},void 0,I18n.translate("shortcuts.title"))),mA(qc().Body,{},void 0,mA("div",{className:"container-fluid"},void 0,mA("h4",{},void 0,I18n.translate("shortcuts.globals")),a&&mA(yA,{label:mA("label",{},void 0,I18n.translate("shortcuts.companies"))},void 0,mA("code",{},void 0,(0,Q.re)(vo.wl))),s&&mA(yA,{label:mA("label",{},void 0,I18n.translate("shortcuts.setup"))},void 0,mA("code",{},void 0,(0,Q.re)(vo.K1))),u&&mA(r.Fragment,{},void 0,mA(yA,{label:mA("label",{},void 0,I18n.translate("shortcuts.work"))},void 0,mA("code",{},void 0,(0,Q.re)(vo.Ar))),Object.keys(k).map(function(e){return mA(yA,{label:mA("span",{},void 0,"- ",I18n.translate(e))},e,mA("code",{},void 0,(0,Q.re)(k[e])))})),f&&mA(r.Fragment,{},void 0,mA(yA,{label:mA("label",{},void 0,I18n.translate("shortcuts.finalize"))},void 0,mA("code",{},void 0,(0,Q.re)(vo.vm))),Object.keys(O).map(function(e){return mA(yA,{label:mA("span",{},void 0,"- ",I18n.translate(e))},e,mA("code",{},void 0,(0,Q.re)(O[e])))})),v&&mA(yA,{label:mA("label",{},void 0,I18n.translate("shortcuts.archive"))},void 0,mA("code",{},void 0,(0,Q.re)(vo.$3))),mA(yA,{label:mA("label",{},void 0,I18n.translate("toolpanel.title"))},void 0,mA("code",{},void 0,(0,Q.re)(vo.mr))),Object.keys(S).map(function(e){return mA(r.Fragment,{},e,mA(yA,{label:mA("span",{},void 0,"- ",fx.getTitle(e))},void 0,mA("code",{},void 0,(0,Q.re)(S[e]))),"reports"===e&&Object.keys(N).map(function(e){return mA(yA,{label:mA("span",{},void 0,"--- ",I18n.translate(e))},e,mA("code",{},void 0,(0,Q.re)(N[e])))}))}),y&&mA(r.Fragment,{},void 0,mA("h4",{},void 0,I18n.translate("shortcuts.locals")),mA(yA,{label:mA("label",{},void 0,I18n.translate("shortcuts.transactions.esc"))},void 0,mA("code",{},void 0,"ESC")),Wh.o.getMenu([],b).map(function(e,t){return e.children?mA(r.Fragment,{},t,mA("div",{},void 0,mA("label",{},void 0,e.title)),e.children.map(function(n,r){return mA(yA,{label:mA("span",{},void 0,"- ",n.title)},"".concat(t,"-").concat(r),mA("code",{className:"space-right"},void 0,"+"),mA("code",{className:"space-right"},void 0,e.shortcut),mA("code",{},void 0,n.shortcut))})):mA(yA,{label:mA("label",{},void 0,e.title)},t,mA("code",{className:"space-right"},void 0,"+"),mA("code",{},void 0,e.shortcut))})))),mA(qc().Footer,{},void 0,mA("button",{type:"button",className:"btn btn-default",onClick:w},void 0,I18n.translate("ok"))))};const gA=(0,r.memo)(bA);var wA,SA=n(11463),kA=atob("cGhhZG1pbg==");function OA(){return"/:".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lang","/").concat(kA)}function NA(e,t,n,r){wA||(wA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:wA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const xA=function(){return NA(_o.A,{moduleProvider:function(){return Promise.all([n.e(4063),n.e(7927)]).then(n.bind(n,89904))},componentName:"admin"})};var PA;function IA(e,t,n,r){PA||(PA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:PA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(xA);const AA=function(){return IA(_o.A,{moduleProvider:function(){return n.e(9753).then(n.bind(n,79753))},componentName:"ARSetupPage",title:I18n.translate("menu.account.arsetup"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,user:e.currentUser.user}})(e)}})};
1var CA;function jA(e,t,n,r){CA||(CA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:CA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(AA);const DA=function(){return jA(_o.A,{moduleProvider:function(){return n.e(3452).then(n.bind(n,53452))},componentName:"ChartOfAccountsPage",title:I18n.translate("menu.account.our.chartofaccounts")})};n.dn(DA);var _A,RA=n(18150),TA=n(32686),EA=n(96540);function MA(e,t,n,r){_A||(_A="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:_A,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var FA=EA.forwardRef(function(e,t){var n=e.validators,o=e.auditorCompanyName,i=e.setAuditorCompanyName,a=e.auditorStreet,l=e.setAuditorStreet,s=e.auditorBuilding,c=e.setAuditorBuilding,u=e.auditorPostcode,d=e.setAuditorPostcode,f=e.auditorDistrict,p=e.setAuditorDistrict,m=e.auditorCountry,v=e.setAuditorCountry,h=e.auditorName,y=e.setAuditorName,b=e.auditorEmail,g=e.setAuditorEmail,w=e.auditorDescription,S=e.setAuditorDescription,k=e.auditorDescriptionEn,O=e.setAuditorDescriptionEn,N=e.auditorIdentification,x=e.setAuditorIdentification,P=e.auditorCompanyIdentifier,I=e.setAuditorCompanyIdentifier,A=(0,r.useRef)(null),C=(0,r.useRef)(null),j=(0,r.useRef)(null),D=(0,r.useRef)(null),_=(0,r.useRef)(null),R=(0,r.useRef)(null),T=(0,r.useRef)(null),E=(0,r.useRef)(null),M=(0,r.useRef)(null),F=(0,r.useRef)(null),z=(0,r.useRef)(null),B=(0,r.useRef)(null);return(0,r.useImperativeHandle)(t,function(){return{validate:function(){return Promise.all([A.current.validate(o),C.current.validate(P),j.current.validate(a),D.current.validate(s),_.current.validate(u),R.current.validate(f),T.current.validate(m),E.current.validate(b),M.current.validate(h),F.
1current.validate(w),z.current.validate(k),B.current.validate(N)])}}}),MA("div",{className:"form"},void 0,MA(Fn(),{},void 0,MA(Rn(),{md:6},void 0,MA("div",{className:"card"},void 0,MA("div",{className:"card-title"},void 0,I18n.translate("extauditor.group.address")),MA("div",{className:"card-body"},void 0,EA.createElement(je.x,{key:"name",label:"administrator.auditor.name",tooltip:"administrator.auditor.name.balloon",ref:A,validators:n.auditorCompanyName,value:o,onChange:i}),EA.createElement(je.x,{key:"companyIdentifier",label:"CVR-nummer",tooltip:"Dette er det CVR-nummer, som revisoren er registreret under i Danmark.",ref:C,validators:n.auditorCompanyIdentifier,value:P,onChange:I}),EA.createElement(je.x,{key:"street",label:"administrator.auditor.street",tooltip:"administrator.auditor.street.balloon",ref:j,validators:n.auditorStreet,value:a,onChange:l}),EA.createElement(je.x,{key:"building",label:"administrator.auditor.building",tooltip:"administrator.auditor.building.balloon",ref:D,validators:n.auditorBuilding,value:s,onChange:c}),EA.createElement(je.x,{key:"postcode",label:"administrator.auditor.postcode",tooltip:"administrator.auditor.postcode.balloon",ref:_,validators:n.auditorPostcode,value:u,onChange:d}),EA.createElement(je.x,{key:"district",label:"administrator.auditor.district",tooltip:"administrator.auditor.district.balloon",ref:R,validators:n.auditorDistrict,value:f,onChange:p}),EA.createElement(je.x,{key:"country",label:"administrator.auditor.country",tooltip:"administrator.auditor.country.balloon",ref:T,validators:n.auditorCountry,value:m,onChange:v})))),MA(Rn(),{md:6},void 0,MA("div",{className:"card"},void 0,MA("div",{className:"card-title"},void 0,I18n.translate("administrator.auditor.group")),MA("div",{className:"card-body"},void 0,EA.createElement(je.x,{key:"auditor-name",label:"extauditor.auditor.name",tooltip:"extauditor.auditor.name.balloon",ref:E,validators:n.auditorName,value:h,onChange:y}),EA.createElement(je.x,{key:"email",label:"extauditor.auditor.email",tooltip:"extauditor.auditor.email.balloon",ref:M,validators:n.auditorEmail,value:b,onChange:g}),EA.createElement(je.x,{key:"description",label:"account.profile.auditor.description.da",tooltip:"account.profile.auditor.description.da.balloon",ref:F,validators:n.auditorDescription,value:w,onChange:S}),EA.createElement(je.x,{key:"descriptionEn",label:"account.profile.auditor.description.en",tooltip:"account.profile.auditor.description.en.balloon",ref:z,validators:n.auditorDescriptionEn,value:k,onChange:O}),EA.createElement(je.x,{key:"identification",label:"extauditor.auditor.identification",tooltip:"extauditor.auditor.identification.balloon",ref:B,validators:n.auditorIdentification,value:N,onChange:x}))))))});const zA=FA;var BA,HA=n(96540);function LA(e,t,n,r){BA||(BA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:BA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function $A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return XA(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?XA(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const VA=function(){var e=(0,o.zy)(),t=(0,Q.nI)(new URLSearchParams(e.search)),n=t.descriptionOfAuditor,i=t.descriptionOfAuditorEn,a=t.country,l=t.email,s=t.districtName,c=t.identificationNumberOfAuditor,u=t.nameOfAuditFirm,d=t.postCodeIdentifier,f=t.streetName,p=t.name,m=t.
1streetBuildingIdentifier,v=t.xid,h=t.companyIdentifier,y=$A((0,r.useState)(u||""),2),b=y[0],g=y[1],w=$A((0,r.useState)(h||""),2),S=w[0],k=w[1],O=$A((0,r.useState)(f||""),2),N=O[0],x=O[1],P=$A((0,r.useState)(m||""),2),I=P[0],A=P[1],C=$A((0,r.useState)(d||""),2),_=C[0],R=C[1],T=$A((0,r.useState)(s||""),2),E=T[0],M=T[1],F=$A((0,r.useState)(a||""),2),z=F[0],B=F[1],H=$A((0,r.useState)(p||""),2),L=H[0],$=H[1],X=$A((0,r.useState)(l||""),2),V=X[0],q=X[1],U=$A((0,r.useState)(n||""),2),W=U[0],Y=U[1],K=$A((0,r.useState)(i||""),2),G=K[0],Z=K[1],J=$A((0,r.useState)(c||""),2),ee=J[0],te=J[1],ne=(0,r.useRef)(null),re=new j.g,oe=$A((0,r.useState)(!1),2),ie=oe[0],ae=oe[1],le=function(e){return(0,Mu.A)(e)},se={auditorCompanyName:[le,(0,TA.A)(100)],auditorStreet:[le,(0,TA.A)(60)],auditorBuilding:[le,(0,TA.A)(20)],auditorPostcode:[le,(0,TA.A)(20)],auditorDistrict:[le,(0,TA.A)(50)],auditorCountry:[le,(0,TA.A)(50)],auditorName:[Mu.A,(0,TA.A)(100)],auditorEmail:[Mu.A,(0,TA.A)(100)],auditorDescription:[Mu.A,(0,TA.A)(50)],auditorDescriptionEn:[(0,TA.A)(50)],auditorIdentification:[Mu.A,(0,TA.A)(29)],auditorCompanyIdentifier:[Mu.A,function(e){return{valid:(0,Yn.A)().validate({value:e,options:{max:20}}).valid,message:I18n.translate("validation.max","20")}}]};return LA(D.A,{},void 0,LA("div",{className:"page-header"},void 0,LA("div",{className:"d-flex align-items-center justify-content-between",style:{width:"100%"}},void 0,LA("div",{className:"d-flex align-items-center"},void 0,LA(bn.A,{to:(0,Q.ID)("/account/users"),text:I18n.translate("setup.fiscalyear.back.to.list")}),LA("h4",{},void 0,I18n.translate("menu.account.users.external"))),LA("div",{className:"d-flex gap-3"},void 0,LA("button",{className:"btn btn-primary",type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),ne.current.validate().then(function(e){if(e.reduce(function(e,t){return e&&t.reduce(function(e,t){return e&&t.valid},!0)},!0)){var t=(S||"").replace(/\s/g,"");k(t),ae(!0),re.registerRequest((0,RA.ft)({descriptionOfAuditor:W,descriptionOfAuditorEn:G,country:z,email:V,districtName:E,identificationNumberOfAuditor:ee,nameOfAuditFirm:b,postCodeIdentifier:_,streetName:N,name:L,streetBuildingIdentifier:I,xid:v,companyIdentifier:t})).then(function(){return re.registerRequest((0,RA.hU)()).then(function(e){var n=e.body&&e.body.extAuditors||[];!function(e){if(e){var t=function(e){return null!=e?e:""};g(t(e.nameOfAuditFirm)),k(t(e.companyIdentifier)),x(t(e.streetName)),A(t(e.streetBuildingIdentifier)),R(t(e.postCodeIdentifier)),M(t(e.districtName)),B(t(e.country)),$(t(e.name)),q(t(e.email)),Y(t(e.descriptionOfAuditor)),Z(t(e.descriptionOfAuditorEn)),te(t(e.identificationNumberOfAuditor))}}(n.find(function(e){return e.xid===v})||n.find(function(e){return e.companyIdentifier===t}))})}).finally(function(){return ae(!1)})}})},disabled:ie},void 0,I18n.translate("button.save"))))),LA("div",{className:"container"},void 0,HA.createElement(zA,{ref:ne,validators:se,auditorCompanyName:b,setAuditorCompanyName:g,auditorStreet:N,setAuditorStreet:x,auditorBuilding:I,setAuditorBuilding:A,auditorPostcode:_,setAuditorPostcode:R,auditorDistrict:E,setAuditorDistrict:M,auditorCountry:z,setAuditorCountry:B,auditorName:L,setAuditorName:$,auditorEmail:V,setAuditorEmail:q,auditorDescription:W,setAuditorDescription:Y,auditorDescriptionEn:G,setAuditorDescriptionEn:Z,auditorIdentification:ee,setAuditorIdentification:te,auditorCompanyIdentifier:S,setAuditorCompanyIdentifier:k})))};var qA;function UA(e,t,n,r){qA||(qA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:qA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const WA=function(){return UA(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(4602),n.e(4649)]).then(n.bind(n,74649))},componentName:"AccountCustomersPage",title:I18n.translate("menu.account.our.customers")})};var YA;function KA(e,t,n,r){YA||(YA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:YA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(WA);const GA=function(){return KA(_o.A,{moduleProvider:function(){return n.e(6411).then(n.bind(n,16411))},componentName:"DeleteAccountPage",title:I18n.translate("menu.goodbye")})};var QA;function ZA(e,t,n,r){QA||(QA="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:QA,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(GA);const JA=function(){return ZA(_o.A,{moduleProvider:function(){return n.e(6682).then(n.bind(n,16682))},componentName:"DPAPage",title:I18n.translate("menu.account.dpa"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,user:e.currentUser.user}})(e)}})};var eC;function tC(e,t,n,r){eC||(eC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:eC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(JA);const nC=function(){return tC(_o.A,{moduleProvider:function(){return n.e(6030).then(n.bind(n,86030))},componentName:"MessagesPage",title:I18n.translate("menu.account.messages")})};var rC;function oC(e,t,n,r){rC||(rC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:rC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(nC);const iC=function(){return oC(_o.A,{moduleProvider:function(){return n.e(9445).then(n.bind(n,39445))},componentName:"MyCompanyPage",title:I18n.translate("menu.administrator.setup")})};var aC;function lC(e,t,n,r){aC||(aC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:aC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(iC);const sC=function(){return lC(_o.A,{moduleProvider:function(){return n.e(1697).then(n.bind(n,71697))},componentName:"OfferingsPage",title:I18n.translate("menu.account.offerings"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{userStore:e.currentUser,defaultStore:e.defaults}})(e)}})};var cC;function uC(e,t,n,r){cC||(cC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:cC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(sC);const dC=function(){return uC(_o.A,{moduleProvider:function(){return n.e(7074).then(n.bind(n,17074))},componentName:"PasswordPage",title:"Change Password",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{userStore:e.currentUser}})(e)}})};var fC;function pC(e,t,n,r){fC||(fC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:fC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(dC);const mC=function(){return pC(_o.A,{moduleProvider:function(){return n.e(5052).then(n.bind(n,12671))},componentName:"profilePage",title:"Profile"})};n.dn(mC);var vC,hC=n(86119),yC={};function bC(e){return bC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bC(e)}function gC(e,t,n,r){vC||(vC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:vC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function wC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?wC(Object(n),!0).forEach(function(t){kC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=bC(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bC(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bC(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(yC),n.d(yC,{fetchShoppingBasketContents:()=>hC.p});const OC=function(){return gC(_o.A,{moduleProvider:function(){return n.e(1032).then(n.bind(n,91032))},componentName:"ShoppingBasketPage",title:"Indkøbskurv",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{shoppingBasketStore:e.shoppingBasket,userStore:e.currentUser,toolbarOpened:e.menu.toolbarOpened}},function(e){return{actions:(0,oo.zH)(SC(SC({},yC),{},{toggleToolbar:so.Ib,push:so.VC}),e)}})(e)}})};n.dn(OC);var NC,xC=n(94430),PC=n(82397),IC=n(3927);function AC(e,t,n,r){NC||(NC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:NC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const CC=function(e){var t=e.moneyTransferCode,n=e.moneyTransferAmountInclVat;return AC("div",{className:"d-flex flex-column gap-10 p-2 mb-2"},void 0,AC("div",{className:"font-semibold d-flex justify-content-between"},void 0,AC("p",{},void 0,I18n.translate("account.payments.fik.card")),AC("div",{className:"d-flex gap-2"},void 0,AC("p",{className:"font-camera"},void 0,"+71<",t," +82032169<"),AC("div",{},void 0,AC(IC.A,{textToCopyOnClick:t}),AC(IC.A,{textToCopyOnClick:"82032169"})))),AC("div",{className:"font-semibold d-flex justify-content-between"},void 0,AC("p",{},void 0,I18n.translate("account.payments.fik.amount")),AC("div",{className:"d-flex gap-2"},void 0,AC("p",{},void 0,n," kr ",I18n.translate("account.payments.fik.isinclvat")),AC(IC.A,{textToCopyOnClick:n}))))};var jC,DC=n(73731);function _C(e){return _C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_C(e)}function RC(e,t,n,r){jC||(jC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:jC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function TC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TC(Object(n),!0).forEach(function(t){MC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=_C(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_C(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return zC(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zC(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var BC,HC=function(){var e="INVOICEFIRST",t="CARD",n="BANK",i="3409",a="12539940",s=(0,o.g)().basketXid,c=FC((0,r.useState)(null),2),u=c[0],d=c[1],f=FC((0,r.useState)(!1),2),p=f[0],m=f[1],v=FC((0,r.useState)(null),2),h=v[0],y=v[1],b=FC((0,r.useState)(null),2),g=b[0],w=b[1],S=FC((0,r.useState)(!0),2),k=S[0],O=S[1],N=FC((0,r.useState)(!1),2),x=N[0],P=N[1],I=FC((0,r.useState)(null),2),A=I[0],C=I[1],_=FC((0,r.useState)(!1),2),R=_[0],T=_[1],E=FC((0,r.useState)(null),2),M=E[0],F=E[1],z=FC((0,r.useState)(new DC.A),2),B=z[0],H=z[1],L=FC((0,r.useState)(!1),2),$=L[0],X=L[1],V=FC((0,r.useState)(!1),2),q=V[0],U=V[1],W=FC((0,r.useState)(!1),2),Y=W[0],K=W[1],G=FC((0,r.useState)(!1),2),J=G[0],ee=G[1],te=FC((0,r.useState)(!1),2),ne=te[0],re=te[1],oe=FC((0,r.useState)(!1),2),ie=oe[0],ae=oe[1],le=FC((0,r.useState)(null),2),se=le[0],ce=le[1],ue=(0,r.useRef)({}),de=(0,r.useRef)(null),fe=FC((0,r.useState)(null),2),pe=fe[0],me=fe[1],ve=FC((0,r.useState)(!1),2),he=ve[0],ye=ve[1],be=(0,zn.d4)(function(e){return e.defaults}),ge=(0,zn.d4)(function(e){return e.currentUser.user}),we=(0,r.useRef)(new j.g),Se=(0,r.useCallback)(function(){if(!s)return C("Manglende basketXid"),void O(!1);O(!0),we.current.registerRequest((0,yr.oL)({basketXid:s})).then(function(e){if(e&&e.body){if(T(e.body.confirmedAndLocked),e.body.basket&&d(e.body.basket),F(e.body.afterConfirmed),e.body.invoiceRecipient){m(!0),ue.current={invoiceByEmail:e.body.invoiceRecipient.invoiceByEmail,einvoiceAddress:e.body.invoiceRecipient.einvoiceAddress,einvoiceByGln:e.body.invoiceRecipient.einvoiceByGln,einvoiceByCvr:e.body.invoiceRecipient.einvoiceByCvr,ref:e.body.invoiceRecipient.ref};var t=e.body.invoiceRecipient.email||e.body.invoiceRecipient.companyIdentifier||"recipient-".concat(Date.now());de.current!==t&&(de.current=t);var n=new DC.A({name:e.body.invoiceRecipient.companyName,identification:e.body.invoiceRecipient.companyIdentifier,streetName:e.body.invoiceRecipient.streetName||"",streetNo:e.body.invoiceRecipient.streetNo||"",zipCode:e.body.invoiceRecipient.zipCode,city:e.body.invoiceRecipient.city,invoiceEmail:e.body.invoiceRecipient.email,invoiceAtt:e.body.invoiceRecipient.invoiceAtt,invoiceRef:e.body.invoiceRecipient.invoiceRef,electronicInvoiceDestinationType:e.body.invoiceRecipient.electronicInvoiceDestinationType,electronicInvoiceAddress:e.body.invoiceRecipient.electronicInvoiceAddress});H(n),ce(new DC.A(n))}if(e.body.paymentOptions){var r={invoiceFirst:!0===e.body.paymentOptions.invoiceFirst,fikFirst:!0===e.body.paymentOptions.fikFirst,bankFirst:!0===e.body.paymentOptions.bankFirst,onlineFirst:!0===e.body.paymentOptions.onlineFirst,defaultPaymentOption:!0===e.body.paymentOptions.onlineFirst,canApplyForInvoiceFirst:!0===e.body.paymentOptions.canApplyForInvoiceFirst};y(r),w(e.body.paymentOptions.defaultPaymentOption)}else y({invoiceFirst:!1,fikFirst:!1,bankFirst:!1,onlineFirst:!1,canApplyForInvoiceFirst:!1})}O(!1)}).catch(function(e){C(e),O(!1)})},[s]),ke=(0,r.useCallback)(function(){s&&we.current.registerRequest((0,yr.sw)({basketXid:s})).then(function(e){if(e&&e.body){ue.current={invoiceByEmail:e.body.invoiceByEmail,einvoiceAddress:e.body.einvoiceAddress,einvoiceByGln:e.body.einvoiceByGln,einvoiceByCvr:e.body.einvoiceByCvr,ref:e.body.ref};var t=new DC.A({name:e.body.companyName,identification:e.body.companyIdentifier,streetName:e.body.streetName||"",streetNo:e.body.streetNo||"",zipCode:e.body.zipCode,city:e.body.city,invoiceEmail:e.body.email,electronicInvoiceDestinationType:e.body.electronicInvoiceDestinationType,electronicInvoiceAddress:e.body.electronicInvoiceAddress});H(t),ce(new DC.A(t));var n=EC({companyName:e.body.companyName,companyIdentifier:e.body.companyIdentifier,email:e.body.email,zipCode:e.body.zipCode,city:e.body.city,streetName:e.body.streetName||null,streetNo:e.body.streetNo||null,invoiceAtt:e.body.invoiceAtt||null,electronicInvoiceDestinationType:e.body.electronicInvoiceDestinationType,electronicInvoiceAddress:e.body.electronicInvoiceAddress},ue.current);
1return we.current.registerRequest((0,yr.f5)({basketXid:s,customerInfo:n})).then(function(){Se()})}Se()}).catch(function(e){e.status===Z.BR&&(me(e.response.body.messageKey),ye(!0))})},[s,Se]);(0,r.useEffect)(function(){return de.current=null,Se(),function(){we.current.abortAll()}},[s,Se]);var Oe=(0,r.useCallback)(function(){if(!p||!B||!se)return!1;return["name","identification","invoiceEmail","zipCode","city","streetName","streetNo","invoiceAtt","electronicInvoiceDestinationType","electronicInvoiceAddress"].some(function(e){return(B[e]||"")!==(se[e]||"")})},[p,B,se]),Ne=(0,r.useCallback)(function(){P(!1),O(!0),we.current.registerRequest((0,yr.Yz)({basketXid:s})).then(function(){O(!1),Se()}).catch(function(e){e.status===Z.BR?(me(e.response.body.messageKey),ye(!0)):C(e)}).finally(function(){O(!1)})},[s,Se]),xe=(0,r.useCallback)(function(e){H(e)},[]),Pe=(0,r.useCallback)(function(e){w(e),O(!0),we.current.registerRequest((0,yr.y5)({basketXid:s,paymentOption:e})).finally(function(){O(!1)})},[s]),Ie=(0,r.useCallback)(function(e,t){we.current.registerRequest((0,yr.lp)({basketXid:e,lineXid:t})).then(function(){Se()}).catch(function(e){e.status===Z.BR?(me(e.response.body.messageKey),ye(!0)):C(e)})},[Se]),Ae=(0,r.useCallback)(function(e,t,n){var r="string"==typeof e?parseInt(e,10):e,o="string"==typeof t?parseInt(t,10):t;return isNaN(r)||isNaN(o)?Promise.reject(new Error("Invalid basketXid or lineXid")):we.current.registerRequest((0,yr.wR)({basketXid:r,lineXid:o,comment:n})).then(function(){Se()}).catch(function(e){throw C(e),e})},[Se]),Ce=(0,r.useCallback)(function(){s&&!q&&(U(!0),we.current.registerRequest((0,yr.jb)({basketXid:s})).then(function(){Se()}).catch(function(e){C(e)}).finally(function(){U(!1)}))},[s,q,Se]),je=(0,r.useCallback)(function(){ee(!1),re(!1),Ce()},[Ce]),De=(0,r.useCallback)(function(){if(B&&!$&&Y){X(!0);var e=EC({companyName:B.name,companyIdentifier:B.identification,email:B.invoiceEmail,zipCode:B.zipCode,city:B.city,streetName:B.streetName||null,streetNo:B.streetNo||null,invoiceAtt:B.invoiceAtt||null,electronicInvoiceDestinationType:B.electronicInvoiceDestinationType,electronicInvoiceAddress:B.electronicInvoiceAddress},ue.current);we.current.registerRequest((0,yr.f5)({basketXid:s,customerInfo:e})).then(function(){X(!1),Se()}).catch(function(e){C(e),X(!1)})}},[s,B,$,Se]),_e=function(){return M&&M.invoiceLink?RC("p",{},void 0,"Der er udstedt faktura. Se"," ",RC("a",{href:(0,l.Ihp)(M.invoiceLink)},void 0,"faktura ",M.invoiceNumber)):null},Re=function(){return M&&M.customerPayments?M.customerPayments.map(function(e,t){return RC("p",{},t,"Modtaget betaling: ",e.bankDate," ",e.amount)}):null},Te=function(e,t){return RC(r.Fragment,{},void 0,RC("strong",{},void 0,I18n.translate(e))," ",I18n.translate(t))},Ee=M&&(null!=M.userSaysPaidWhen||null!=M.userSaysPaidWho),Me=M&&"INVOICEFIRST"===M.paymentOption,Fe=M&&M.invoiceNumber;return RC(D.A,{title:I18n.translate("myorders.order.and.pay"),loadScreen:k},void 0,RC("div",{className:"container-fluid"},void 0,RC("div",{className:"page-header"},void 0,RC("div",{className:"d-flex align-items-center"},void 0,RC(bn.A,{to:(0,Q.ID)("/account/shoppingbasket")}),RC("h4",{className:"my-0 ml-2"},void 0,u&&u.name)),!R&&!Fe&&RC("div",{},void 0,RC(wn.A,{disabled:R,busy:k,onClick:function(){Oe()?ae(!0):P(!0)},title:I18n.translate(u&&u.linesConfirmedForAdministrator?"myorders.buy.invoice":"myorders.buy.button")}))),A&&RC("div",{className:"alert alert-danger"},void 0,RC("strong",{},void 0,"Fejl:")," Kunne ikke hente oplysninger om indkøbskurven."),u&&u.linesConfirmedForAdministrator&&RC("div",{className:"mb-3"},void 0,RC("div",{className:"card mb-3"},void 0,RC("div",{className:"card-title"},void 0,"Denne kurv"),RC("div",{className:"card-body"},void 0,RC("p",{},void 0,"Denne indkøbskurv indeholder bekræftede køb med din/jeres virksomhed som køber og faktura-modtager."),Fe?null:RC("p",{},void 0,"Bekræftede køb er låste, men er der fejl, så brug prik-prik-prik på linjerne nederst til at kontakte os.")))
1),R&&M&&M.paid&&RC("div",{className:"card mb-3"},void 0,RC("div",{className:"card-title"},void 0,I18n.translate("myorders.confirmed.and.paid")),RC("div",{className:"card-body"},void 0,_e(),Re())),R&&M&&M.pendingPayment&&RC("div",{className:"card mb-3"},void 0,RC("div",{className:"card-title"},void 0,I18n.translate("myorders.confirmed.pending.payment")),RC("div",{className:"card-body"},void 0,_e(),Re(),Me&&M.invoiceNumber&&RC("div",{},void 0,RC("p",{},void 0,I18n.translate("myorders.payment.see.invoice"))),"BANK"===M.paymentOption&&M.paymentCode&&RC("div",{},void 0,RC("p",{},void 0,I18n.translate("myorders.payment.instructions.subtitle")),RC("p",{style:{marginTop:"20px",marginLeft:"20px"}},void 0,RC("b",{},void 0,I18n.translate("myorders.bank.pay.transfer.1",M.totalAmountInclVat),RC(IC.A,{textToCopyOnClick:M.totalAmountInclVat})," ",I18n.translate("myorders.bank.pay.transfer.2")," ",i," ",a,RC(IC.A,{textToCopyOnClick:i}),RC(IC.A,{textToCopyOnClick:a}))),RC("p",{style:{marginLeft:"20px",marginTop:"18px",marginBottom:"18px"}},void 0,RC("b",{},void 0,I18n.translate("myorders.bank.pay.code",M.paymentCode)),RC(IC.A,{textToCopyOnClick:M.paymentCode})),RC("p",{},void 0,I18n.translate("myorders.bank.pay.the.day.after"))),"FIK"===M.paymentOption&&M.paymentCode&&RC("div",{},void 0,RC("p",{},void 0,I18n.translate("myorders.payment.instructions.subtitle")),RC(CC,{moneyTransferCode:M.paymentCode,moneyTransferAmountInclVat:M.totalAmountInclVat}),RC("p",{},void 0,I18n.translate("checkout.fik.payment"))),Ee||Me?null:RC("p",{className:"mt-3"},void 0,I18n.translate("checkout.explain.user.says.paid")),Ee||Me?null:RC("div",{className:"form-check mb-2"},void 0,RC("label",{className:"form-check-label"},void 0,RC("input",{type:"checkbox",className:"form-check-input",checked:ne,disabled:q,onCh
1ange:function(e){re(e.target.checked),e.target.checked&&ee(!0)}})," ","Jeg har lagt ".concat(M.totalAmountInclVat," kr til betaling efter ovenstående instruktioner med overførsel snarest muligt."))),Ee&&Me&&RC("p",{className:"mt-3"},void 0,"Betalingen er markeret som lagt til betaling",null!=M.userSaysPaidWhen&&" ".concat(M.userSaysPaidWhen),null!=M.userSaysPaidWho&&" af ".concat(M.userSaysPaidWho),"."),!Me&&RC("p",{className:"mt-3"},void 0,"Er der brug for et bilag til godkendelse inden overførsel af betaling eller skal overførsel foretages af en anden person, så"," ",s?RC("a",{href:(0,l.Dun)(s),target:"_blank",rel:"noreferrer noopener",onClick:function(e){return e.stopPropagation()},style:{textDecoration:"underline",color:"#007bff",cursor:"pointer"}},void 0,"klik her"):RC("span",{style:{color:"#6c757d",cursor:"not-allowed"}},void 0,"klik her")))),h&&!R&&RC("div",{className:"card mb-3"},void 0,RC("div",{className:"card-title"},void 0,"Valg af betalingsmetode"),RC("div",{className:"card-body"},void 0,h.invoiceFirst&&RC("p",{},void 0,RC(En(),{checked:g===e,inline:!0,onChange:function(){return Pe(e)}},void 0,Te("basket.payment.invoicefirst.name","basket.payment.invoicefirst.explain"))),h.canApplyForInvoiceFirst&&RC("p",{},void 0,RC(En(),{checked:!1,disabled:!0,inline:!0,onChange:function(){}},void 0,Te("basket.payment.invoicefirst.name","basket.payment.invoicefirst.can.apply"))),h.fikFirst&&RC("p",{},void 0,RC(En(),{checked:"FIK"===g,inline:!0,onChange:function(){return Pe("FIK")}},void 0,Te("basket.payment.fikfirst.name","basket.payment.fikfirst.explain"))),h.bankFirst&&RC("p",{},void 0,RC(En(),{checked:g===n,inline:!0,onChange:function(){return Pe(n)}},void 0,Te("basket.payment.bankfirst.name","basket.payment.bankfirst.explain"))),h.onlineFirst&&RC("p",{},void 0,RC(En(),{checked:g===t,disabled:!1,inline:!0,onChange:function(){return Pe(t)}},void 0,Te("basket.payment.onlinefirst.name","basket.payment.onlinefirst.explain"))))),p&&RC("div",{className:"mb-3"},void 0,RC("div",{className:"card mb-3"},void 0,RC("div",{className:"card-title d-flex justify-content-between align-items-center"},void 0,RC("span",{},void 0,I18n.translate("checkout.invoice.recipient")),!Fe&&(u&&u.linesConfirmedForAdministrator?RC("button",{type:"button",className:"btn btn-default btn-default-padding",onClick:ke},void 0,I18n.translate("checkout.administrator.from.account")):RC(wn.A,{disabled:$||k||R||!Y,busy:$,onClick:De,title:I18n.translate("button.save")}))),RC("div",{className:"card-body"},void 0,RC(xC.A,{data:B,loading:k,defaultCountry:be.defaultCountry,hideAdvancedOptions:!0,onDataChange:xe,onValidityChange:K,readOnly:R||Fe||u&&u.linesConfirmedForAdministrator,showPhone:!1,lockCountry:"DK",disableEinvoice:!0,eMailRequired:!1},"customer-form-".concat(de.current||"","-").concat(s||"")))),ge&&ge.administrator&&ge.administratorName&&!R&&!(u&&u.linesConfirmedForAdministrator)&&RC("div",{className:"card mb-3"},void 0,RC("div",{className:"card-body"},void 0,RC("p",{className:"mb-0"},void 0,"Anvend '",RC("span",{onClick:ke,style:{cursor:"pointer",textDecoration:"underline",color:"#007bff"}},void 0,ge.administratorName),"' som modtager. Oplysninger"," ",RC(ro.Link,{to:(0,Q.ID)("/account/my-company"),style:{cursor:"pointer",textDecoration:"underline",color:"#007bff"}},void 0,"rettes her"),".")))),u&&RC("div",{},void 0,u.lines&&u.lines.length>0?RC("div",{},void 0,RC("div",{className:"card mb-3"},void 0,RC("div",{className:"card-body"},void 0,RC("div",{className:"d-flex justify-content-between align-items-start flex-wrap mb-2"},void 0,RC("div",{},void 0,RC("h5",{className:"mb-1"},void 0,u.name||I18n.translate("shoppingbasket.defaultname")),p&&B&&B.name&&RC("p",{className:"mb-0"},void 0,I18n.translate("checkout.invoiced.to",B.name)))),RC("div",{className:"d-flex justify-content-end align-items-center flex-wrap",style:{gap:"20px"}},void 0,u.discountPct&&RC("div",{},void 0,RC("span",{},void 0,I18n.translate("basket.sum.discount",u.discountPct),": "),RC("strong",{},void 0,u.discountAmount)),RC("div",{},void 0,RC("span",{},void 0,I18n.translate("basket.sum.excl"),": "),RC("strong",{},void 0,u.totalAmountExclVat)),RC("div",{},void 0,RC("span",{},void 0,I18n.translate("basket.sum.incl",u.vatAmount),": "),RC("strong",{},void 0,u.totalAmountInclVat))))),RC(PC.$,{lines:u.lines,basketXid:u.xid,totalAmountExclVat:u.totalAmountExclVat,vatAmount:u.vatAmount,totalAmountInclVat:u.totalAmountInclVat,readOnly:!0,paid:u.paid,isCheckoutPage:!0,basketLocked:u.confirmedAndLocked,onSendToCompany:Ie,onCommentChange:R?null:Ae,linesConfirmedForAdministrator:u.linesConfirmedForAdministrator})):RC("div",{className:"alert alert-info"},void 0,"Indkøbskurven er tom."),RC("p",{},void 0,I18n.translate("")))),RC(gn.A,{show:x,title:I18n.translate("myorder.confirm.title"),submitBtnText:I18n.translate("myorder.confirm.title"),onSubmit:function(){return Ne()},onHide:function(){return P(!1)}},void 0,RC("p",{},void 0,I18n.translate("myorders.confirm.1",u&&u.totalAmountInclVat)),RC("p",{},void 0,I18n.translate("myorders.confirm.2"))),RC(gn.A,{show:J,title:I18n.translate("prepaid.title"),submitBtnText:I18n.translate("prepaid.button"),onSubmit:je,onHide:function(){ee(!1),re(!1)}},void 0,RC("p",{},void 0,I18n.translate("prepaid.body.1")),M&&M.totalAmountInclVat&&RC("p",{},void 0,I18n.translate("prepaid.body.2",M.totalAmountInclVat))),RC(gn.A,{show:ie,title:"Gem ændringer",submitBtnText:I18n.translate("ok"),noCancelBtn:!0,onSubmit:function(){return ae(!1)},onHide:function(){return ae(!1)}},void 0,RC("p",{},void 0,"Gem ændringer til fakturamodtager først")),RC(gn.A,{show:he,title:I18n.translate("didnotwork"),submitBtnText:I18n.translate("ok"),onSubmit:function(){return ye(!1)},onHide:function(){return ye(!1)},noCancelBtn:!0},void 0,RC("p",{},void 0,I18n.translate(pe))))};function LC(e,t,n,r){BC||(BC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:BC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const $C=function(){return LC(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(4864)]
1).then(n.bind(n,44864))},componentName:"TemplatesPage",title:I18n.translate("menu.account.our.settings")})};n.dn($C);var XC,VC=n(53114);function qC(e){return qC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qC(e)}function UC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UC(Object(n),!0).forEach(function(t){YC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=qC(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qC(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qC(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KC(e,t,n,r){XC||(XC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:XC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function GC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return QC(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QC(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ZC,JC=function(){var e=(0,o.g)().xid,t=GC((0,r.useState)(!0),2),n=t[0],i=t[1],a=GC((0,r.useState)(null),2),l=a[0],s=a[1],c=GC((0,r.useState)(),2),u=c[0],d=c[1],f=GC((0,r.useState)(!1),2),p=f[0],m=f[1],v=GC((0,r.useState)(!1),2),h=v[0],y=v[1],b=GC((0,r.useState)(!1),2),g=b[0],w=b[1],S=new j.g;(0,r.useEffect)(function(){i(!0),S.registerRequest((0,RA.$P)(e)).then(function(e){return s(e.body)}).finally(function(){return i(!1)}),S.registerRequest((0,RA.QK)()).then(function(e){d(e.body.typeOptions)}).finally(function(){i(!1)})},[]);return KC(D.A,{title:I18n.translate("template.details"),loadScreen:n},void 0,KC("div",{className:"page-header"},void 0,KC("div",{className:"d-flex align-items-center"},void 0,KC(bn.A,{to:(0,Q.ID)("/account/templates"),text:I18n.translate("setup.fiscalyear.back.to.list")}),KC("h4",{},void 0,l?l.name:"")),KC("div",{style:{display:"flex",gap:"10px"}},void 0,KC(lw,{options:[{key:"showExample",label:"Vis eksempel"}],closeOnSelect:!0,onSelect:function(t){"showExample"===t&&S.registerRequest((0,RA.Ef)(e)).then(function(){})},buttonContent:KC(L.h,{className:"phi phi-settings_wheel_icon phi-lg fullstroke","aria-label":"Settings"}),buttonStyling:{height:"39px",width:"39px",display:"flex",justifyContent:"center",alignItems:"center"}}),KC(wn.A,{saved:p,busy:h,failed:g,onClick:function(){y(!0),m(!1),w(!1),S.registerRequest
1((0,RA.ub)(e,l.plainText)).then(function(){w(!1),m(!0)}).catch(function(){w(!0)}).finally(function(){y(!1)})},disabled:n}))),l&&u&&KC("div",{className:"container",style:{display:"flex",flexDirection:"column"}},void 0,KC(Fn(),{},void 0,KC(Rn(),{md:12},void 0,KC(VC.A,{title:"Detaljer"},void 0,KC("div",{className:"row mb-3"},void 0,KC("div",{className:"col-md-4"},void 0,KC("label",{},void 0,"Navn"),KC("div",{},void 0,l.name)),KC("div",{className:"col-md-4"},void 0,KC("label",{},void 0,"Type"),KC("div",{},void 0,u.find(function(e){return e.typeKey===l.typeKey}).typeName||l.typeKey)),KC("div",{className:"col-md-4"},void 0,KC("label",{},void 0,"Version"),KC("div",{},void 0,l.version))),KC("div",{className:"row mb-3"},void 0,KC("div",{className:"col-md-4"},void 0,KC("label",{},void 0,"Aktiv?"),KC("div",{},void 0,l.current?"Ja":"Nej")))))),l.plainText&&KC(Fn(),{style:{marginTop:"20px"}},void 0,KC(Rn(),{md:12},void 0,KC(VC.A,{title:"Indhold"},void 0,KC(xI.R,{value:l.plainText,onChange:function(e){s(WC(WC({},l),{},{plainText:e})),m(!1),w(!1)},disabled:n}))))))};function ej(e,t,n,r){ZC||(ZC="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ZC,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const tj=function(){return ej(_o.A,{moduleProvider:function(){return n.e(3026).then(n.bind(n,93026))},componentName:"UsersPage",title:I18n.translate("menu.account.our.users")})};n.dn(tj);var nj,rj=n(27951),oj=n(8688);function ij(e,t,n,r){nj||(nj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:nj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function aj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lj(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var sj=function(e){var t=e.text,n=e.targetRect,o=(0,r.useRef)(null),i=aj((0,r.useState)({top:0,left:0}),2),a=i[0],l=i[1],s=aj((0,r.useState)(!1),2),c=s[0],u=s[1];return(0,r.useEffect)(function(){if(o.current&&n){var e=o.current.getBoundingClientRect(),t=n.top-e.height-10,r=n.left+(n.width-e.width)/2;t<10&&(t=n.bottom+10),r<10&&(r=10),r+e.width>window.innerWidth-10&&(r=window.innerWidth-e.width-10),l({top:t,left:r}),u(!0)}},[n]),(0,G.createPortal)(r.createElement("div",{ref:o,className:"fade in generic-tooltip top",role:"tooltip",style:{position:"fixed",top:"".concat(a.top,"px"),left:"".concat(a.left,"px"),zIndex:9999,opacity:c?1:0,transition:"opacity 0.15s"}},ij("div",{className:"generic-tooltip-arrow",style:{left:"50%"}}),ij("div",{className:"generic-tooltip-inner"},void 0,t)),document.body)};const cj=function(e){var t=e.text,n=e.children,o=aj((0,r.useState)(!1),2),i=o[0],a=o[1],l=aj((0,r.useState)(null),2),s=l[0],c=l[1],u=(0,r.useRef)(null);if(!t)return n;return ij(r.Fragment,{},void 0,r.createElement("span",{ref:u,style:{display:"inline-block"},onMouseEnter:function(){var e=u.current.getBoundingClientRect();c(e),a(!0)},onMouseLeave:function(){a(!1)}},n),i&&ij(sj,{text:t,targetRect:s}))};var uj,dj;function fj(e,t,n,r){uj||(uj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:uj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function pj(e){var t=e.companies;return fj("div",{className:"app-toolbar__report-container sticky-table__without-header",style:{overflow:"visible"}},void 0,fj("table",{className:"table-st table-st__v2",cellPadding:"0",cellSpacing:"0"},void 0,fj("thead",{className:"table-st__head"},void 0,fj("tr",{},void 0,fj("th",{style:{minWidth:"100px",maxWidth:"100px"}},void 0,"CVR-nummer"),fj("th",{style:{minWidth:"100px",maxWidth:"300px"}},void 0,"Virksomhedsnavn"))),fj("tbody",{className:"table-st__body"},void 0,t.map(function(e){return fj("tr",{},e.companyIdentifier+e.companyName,fj("td",{},void 0,e.companyIdentifier),fj("td",{},void 0,e.companyName))}))))}function mj(e,t,n,r){dj||(dj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:dj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function vj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hj(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var yj,bj=function(e){var t=e.history,n=(0,o.g)().xid,i=vj((0,r.useState)(!0),2),a=i[0],l=i[1],s=vj((0,r.useState)(null),2),c=s[0],u=s[1],d=vj((0,r.useState)(!1),2),f=d[0],p=d[1],m=vj((0,r.useState)(null),2),v=m[0],h=m[1],y=vj((0,r.useState)(!1),2),b=y[0],g=y[1],w=new j.g;(0,r.useEffect)(function(){return S(),function(){return w.abortAll()}},[]);var S=function(){l(!0),w.registerRequest((0,RA.CX)(n)).then(function(e){return u(e.body)}).finally(function(){return l(!1)})};return mj(D.A,{title:I18n.translate("administrator.user.details"),loadScreen:a},void 0,mj("div",{className:"page-header"},void 0,mj("div",{className:"d-flex align-items-center"},void 0,mj(bn.A,{to:(0,Q.ID)("/account/users"),text:I18n.translate("setup.fiscalyear.back.to.list")}),mj("h4",{},void 0,c?c.userName:""," / ",c?c.realName:"")),mj(z(),{className:"mr-1",open:f,onToggle:function(e,t,n){return"select"!==n.source&&p(e)},pullRight:!0},void 0,mj(z().Toggle,{bsStyle:"action-primary btn-action__square",noCaret:!0},void 0,mj(L.h,{className:"phi phi-settings_wheel_icon phi-lg fullstroke","aria-label":"Settings"})),mj(z().Menu,{},void 0,mj(cj,{text:c?c.nonDeletableBecause:null},void 0,mj(H(),{},void 0,mj("button",{disabled:!c||c&&c.nonDeletableBecause,type:"button",className:"btn btn-danger",onClick:function(){return h(c.userName)}},void 0,mj(oj.A,{}),mj("span",{className:"ml-1"},void 0,I18n.translate("grant.remove.admin.title")))))))),c&&mj("div",{className:"container",style:{display:"flex",flexDirection:"column"}},void 0,mj(Fn(),{},void 0,mj(Rn(),{md:c.canSignAsAuditor?6:12},void 0,mj(VC.A,{title:I18n.translate("administrator.user.details")},void 0,mj("div",{className:"row mb-3"},void 0,mj("div",{className:"col-md-4"},void 0,mj("label",{},void 0,I18n.translate(I18n.translate("administrator.realname"))),mj("div",{},void 0,c.realName)),mj("div",{className:"col-md-4"},void 0,mj("label",{},void 0,I18n.translate("administrator.email")),mj("div",{},void 0,c.userName)),mj("div",{className:"col-md-4"},void 0,mj("label",{},void 0,I18n.translate("administrator.mobile")),mj("div",{},void 0,c.mobile||"-"))),mj("div",{className:"row mb-3"},void 0,mj("div",{className:"col-md-4"},void 0,mj("label",{},void 0,I18n.translate("administrator.lastused")),mj("div",{},void 0,c.lastUsedTime)),mj("div",{className:"col-md-4"},void 0,mj("label",{},void 0,I18n.translate("administrator.admintype")),mj("div",{},void 0,I18n.translate(c.superUser?"administrator.admintype.super":"administrator.admintype.normal")))))),c.canSignAsAuditor&&mj(Rn(),{md:6},void 0,mj(VC.A,{title:I18n.translate("account.profile.auditor.group")},void 0,mj("div",{className:"row mb-3"},void 0,mj("div",{className:"col-md-12"},void 0,mj("label",{},void 0,I18n.translate("account.profile.auditor.description.da")),mj("div",{},void 0,c.descriptionOfAuditor))),mj("div",{className:"row mb-3"},void 0,mj("div",{className:"col-md-12"},void 0,mj("label",{},void 0,I18n.translate("account.profile.auditor.description.en")),mj("div",{},void 0,c.descriptionOfAuditorEn))),mj("div",{className:"row mb-3"},void 0,mj("div",{className:"col-md-12"},void 0,mj("label",{},void 0,I18n.translate("account.profile.auditor.identification")),mj("div",{},void 0,c.identificationNumberOfAuditor)))))),c.companiesOwned&&c.companiesOwned.length>0&&mj(Fn(),{style:{padding:"10px",paddingTop:"20px"}},void 0,mj("h3",{},void 0,I18n.translate("administrator.owned")),mj(pj,{companies:c.companiesOwned}))),mj(gn.A,{show:null!==v,title:I18n.translate("grant.remove.admin.title"),onSubmit:function(){g(!0),w.registerRequest
1((0,rj.qg)(v)).then(function(){t.push((0,Q.ID)("/account/users"))}).finally(function(){h(null),g(!1)})},onHide:function(){return h(null)},submitBtnText:b?mj(qn.A,{}):void 0,disableSubmit:b},void 0,mj("p",{},void 0,I18n.translate("grant.remove.admin.confirm")),c&&c.companiesOwned&&c.companiesOwned.length>0&&mj("p",{className:"text-danger"},void 0,I18n.translate("administrator.remove.to.you"))))};function gj(e,t,n,r){yj||(yj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:yj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const wj=function(){return gj(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(2621),n.e(6430)]).then(n.bind(n,76430))},componentName:"specsAnnualReportPage",title:I18n.translate("annualreport.nav.specs")})};var Sj;function kj(e,t,n,r){Sj||(Sj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Sj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(wj);const Oj=function(){return kj(_o.A,{moduleProvider:function(){return n.e(711).then(n.bind(n,30711))}})};var Nj;function xj(e,t,n,r){Nj||(Nj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Nj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Oj);const Pj=function(){return xj(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(9375)]).then(n.bind(n,79375))},componentName:"GrantAccessPage",title:"Grant Access",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{currentUser:e.currentUser}})(e)}})};var Ij;function Aj(e,t,n,r){Ij||(Ij="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Ij,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Pj);const Cj=function(){return Aj(_o.A,{moduleProvider:function(){return n.e(9729).then(n.bind(n,79729))},componentName:"RequestAccessPage",title:"Request Access",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies,currentUser:e.currentUser}})(e)}})};var jj;function Dj(e,t,n,r){jj||(jj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:jj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(Cj);const _j=function(){return Dj(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(4602),n.e(422)]).then(n.bind(n,30422))},title:"Dashboard",componentName:"DashboardPage"})};var Rj;function Tj(e,t,n,r){Rj||(Rj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Rj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(_j);const Ej=function(){return Tj(_o.A,{moduleProvider:function(){return n.e(9091).then(n.bind(n,19091))},title:I18n.translate("grants.decisionreference.add")})};var Mj,Fj;function zj(e){return zj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zj(e)}function Bj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Hj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Bj(Object(n),!0).forEach(function(t){Lj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=zj(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=zj(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zj(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $j(){return $j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$j.apply(null,arguments)}function Xj(e){return r.createElement("svg",$j({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 32 32"},e),Mj||(Mj=r.createElement("path",{fill:"#54e56b",d:"M16 0c8.837 0 16 7.163 16 16s-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0z"})),Fj||(Fj=r.createElement("path",{fill:"#fff",d:"M22.522 11.763c.446.446.446 1.17 0 1.616l-8 8a1.143 1.143 0 01-1.616 0L9.477 17.95a1.143 1.143 0 011.616-1.616l2.62 2.62 7.192-7.192a1.143 1.143 0 011.616 0z"})))}n.dn(Ej);n.p;var Vj,qj=n(82756);function Uj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wj(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wj(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yj(e,t,n,r){Vj||(Vj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Vj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var Kj=function(e,t){return Yj("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",paddingLeft:"5px"}},void 0,Yj(wh(),{placement:"top",overlay:Yj(kh(),{id:"tooltip"},void 0,t)},void 0,e))},Gj=function(e){var t=e.item,n=e.setShowRemoveDialogForId,o=Uj((0,r.useState)(!1),2),i=o[0],a=o[1],s=Uj((0,r.useState)(null),2),c=s[0],u=s[1];return Yj("tr",{},void 0,Yj("td",{},void 0,t.createdDateTime),Yj("td",{},void 0,t.exportName),Yj("td",{},void 0,t.automaticDeleteDate),Yj("td",{onClick:function(e){return e.stopPropagation()}},void 0,Yj("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},void 0,Yj("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",columnGap:"2px",width:"110px"}},void 0,(t.hasErrors||t.hasWarnings||t.hasInfos)&&Yj("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",columnGap:"2px"}},void 0,t.hasErrors&&Yj("div",{onClick:function(){u("error"),a(!0)}},void 0,Kj(Yj(Ih,{width:"1.6em",height:"1.6em"}),I18n.translate("export.has.errors"))),t.hasWarnings&&Yj("div",{onClick:function(){u("warning"),a(!0)}},void 0,Kj(Yj(gt.h,{width:"1.6em",height:"1.6em"}),I18n.translate("export.has.warnings"))),t.hasInfos&&Yj("div",{onClick:function(){u("info"),a(!0)}},void 0,Kj(Yj(qj.h,{width:"1.6em",height:"1.6em"}
1),I18n.translate("export.has.info")))),!t.pending&&!t.hasErrors&&!t.hasWarnings&&!t.hasInfos&&Kj(Yj(Xj,{width:"1.6em",height:"1.6em"}),I18n.translate("export.no.logs"))),!t.pending&&Yj("div",{style:{cursor:t.hasErrors?"not-allowed":"pointer",opacity:t.hasErrors?.5:1,display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",paddingLeft:"5px"},onClick:function(){return!t.hasErrors&&(e=t.id,n=t.downloadViaCloudfront,r=t.cloudfrontUrl,o=encodeURI(e),void(n?window.open(r):window.open("".concat(l.Gko).concat(o))));var e,n,r,o}},void 0,Kj(Yj(xh.h,{width:"1.6em",height:"1.6em"}),t.hasErrors?I18n.translate("export.no.download"):I18n.translate("export.download"))),!t.pending&&Yj(bs(),{id:"".concat(t.id,"-actions"),bsStyle:"default",bsSize:"sm",title:Yj(yt.h,{className:"phi phi-1_6x","aria-label":"Actions"}),className:"btn btn-default",type:"button",noCaret:!0,pullRight:!0},void 0,Yj(H(),{onClick:function(){return n(t.id)}},void 0,I18n.translate("button.delete"))))),t.logData?Yj(gn.A,{show:i,title:"Information om eksporten: ".concat(t.exportName),cancelBtnText:I18n.translate("ok"),onHide:function(){a(!1),u(null)}},void 0,i&&Yj("table",{className:"table-st"},void 0,Yj("thead",{className:"table-st__head"},void 0,Yj("tr",{},void 0,Yj("th",{style:{width:"20%"}},void 0,I18n.translate("export.log.type")),Yj("th",{},void 0,I18n.translate("export.log.message")))),Yj("tbody",{className:"table-st__body"},void 0,t.logData.logLines.filter(function(e){return"error"===c&&e.error||"warning"===c&&e.warning||"info"===c&&e.info}).map(function(e,t){return Yj("tr",{},t,Yj("td",{},void 0,e.error?I18n.translate("export.error"):e.warning?I18n.translate("export.warning"):I18n.translate("export.info")),Yj("td",{},void 0,e.message))})))):null)};const Qj=(0,zn.Ng)(function(e){return{companyStore:e.companies}})(function(e){var t=e.currentExports,n=e.companyStore,o=e.fetchCurrentExports,i=Uj((0,r.useState)(null),2),s=i[0],c=i[1],u=Uj((0,r.useState)(null),2),d=u[0],f=u[1],p=new j.g,m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;p.registerRequest(function(e){var t=e.companyXid,n=e.id;return(0,a.RD)(l.H2q,{method:"post",data:{companyXid:t,id:n}})}({companyXid:n.currentXid,id:e})).then(function(){o(),c(null),f(null)}).catch(function(){f("Der opstod en fejl under sletningen. Prøv venligst igen.")})};return Yj("div",{className:"app-toolbar__report-container sticky-table__without-header",style:{overflow:"visible"}},void 0,Yj("table",{className:"table-st table-st__v2",cellPadding:"0",cellSpacing:"0"},void 0,Yj("thead",{className:"table-st__head"},void 0,Yj("tr",{},void 0,Yj("th",{style:{minWidth:"100px",width:"20%"}},void 0,I18n.translate("export.exported")),Yj("th",{style:{minWidth:"100px",width:"40%"}},void 0,I18n.translate("export.name")),Yj("th",{style:{minWidth:"100px",width:"25%"}},void 0,I18n.translate("export.deletedate")),Yj("th",{}))),Yj("tbody",{className:"table-st__body"},void 0,t.map(function(e){return Yj(Gj,{item:e,setShowRemoveDialogForId:c},e.id)}),0==t.length?Yj("tr",{},void 0,Yj("td",{colSpan:4,className:"text-center"},void 0,I18n.translate("export.list.empty"))):null)),Yj(gn.A,{show:Number.isInteger(s),title:I18n.translate("export.delete"),btnClassName:"btn btn-primary",onSubmit:function(){return m()},onHide:function(){return c(null)}},void 0,I18n.translate("export.delete.confirm"),d&&Yj("div",{},void 0,Yj("br",{}),Yj("div",{className:"text-danger"},void 0,d))))});var Zj,Jj={mrattached:{type:"mrattached",title:I18n.translate("export.mrattached"),exportStartData:["fiscalYearXid"]},mrinbox:{type:"mrinbox",title:I18n.translate("export.mrinbox"),exportStartData:[]},mrinvoices:{type:"mrinvoices",title:I18n.translate("export.mrinvoices"),exportStartData:["fiscalYearXid"]},linconomyassets:{type:"linconomyassets",title:I18n.translate("export.linconomyassets"),exportStartData:["fiscalYearXid"]},mrsecuritiesforprimo:{type:"mrsecuritiesforprimo",title:I18n.translate("export.mrsecuritiesforprimo"),exportStartData:["fiscalYearXid"]},mrproducts:{type:"mrproducts",title:I18n.translate("export.mrproducts"),exportStartData:[]}};function eD(e,t,n,r){Zj||(Zj="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Zj,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var tD;function nD(e){var t=e.years,n=e.selectedYear,r=e.onYearChange,o=e.onSubmit,i=e.validators,a=void 0===i?[Mu.A]:i;return eD("form",{className:"report-form",onSubmit:(0,Q._s)({},2,o)},void 0,eD("div",{style:{maxWidth:"300px"}},void 0,eD(Zd.X,{id:"trf-year",label:"parameters.year",value:n,options:t,validators:a,onChange:r},"inp")))}function rD(e){return rD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rD(e)}function oD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?oD(Object(n),!0).forEach(function(t){aD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=rD(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rD(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rD(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lD(e,t,n,r){tD||(tD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:tD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const sD=(0,zn.Ng)(function(e){return{fiscalYearOptions:e.defaults.fiscalYears.sort(function(e,t){return new Date(t.fromDate)-new Date(e.fromDate)}).map(function(t){return{text:e.defaults.fiscalYearReportParams.find(function(e){return e.value===t.fromDate}).text,value:t._xid}}),companyStore:e.companies}})(function(e){var t=e.exportType,n=e.fiscalYearOptions,r=e.formData,o=e.setFormData;if(!Object.keys(Jj).includes(t))return lD("div",{},void 0,"Der er sket en fejl. Kontakt os, hvis problemet fortsætter.");var i=null;return"mrattached"!==t&&"mrinvoices"!==t&&"linconomyassets"!==t&&"mrsecuritiesforprimo"!==t||(i=lD(nD,{years:n,selectedYear:r.fiscalYearXid,onYearChange:function(e){return o(iD(iD({},r),{},{fiscalYearXid:e}))}})),"mrproducts"===t&&(i=lD("div",{},void 0,"Kan downloades direkte")),lD("div",{style:{display:"flex",flexDirection:"column",rowGap:"12px",minWidth:"250px"}},void 0,i)});function cD(e){return cD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cD(e)}var uD;function dD(e,t,n,r){uD||(uD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:uD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function fD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fD(Object(n),!0).forEach(function(t){mD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=cD(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cD(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cD(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return hD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hD(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var yD=[{type:"mrattached",label:I18n.translate("export.mrattached")},{type:"mrinbox",label:I18n.translate("export.mrinbox")},{type:"mrinvoices",label:I18n.translate("export.mrinvoices")},{type:"mrsecuritiesforprimo",label:I18n.translate("export.mrsecuritiesforprimo")},{type:"linconomyassets",label:I18n.translate("export.linconomyassets")},{type:"mrproducts",label:I18n.translate("export.products")}];const bD=(0,zn.Ng)(function(e){return{fiscalYearOptions:e.defaults.fiscalYears.sort(function(e,t){return new Date(t.fromDate)-new Date(e.fromDate)}).map(function(t){return{text:e.defaults.fiscalYearReportParams.find(function(e){return e.value===t.fromDate}).text,value:t._xid}}),companyStore:e.companies}})(function(e){var t=e.fiscalYearOptions,n=e.companyStore,o=e.isNewExportShown,i=e.setIsNewExportShown,s=e.setSaveSuccess,c=vD((0,r.useState)(null),2),u=c[0],d=c[1],f=vD((0,r.useState)(!1),2),p=f[0],m=f[1],v=vD((0,r.useState)(!1),2),h=v[0],y=v[1],b=vD((0,r.useState)({fiscalYearXid:t[0]?t[0].value:null}),2),g=b[0],w=b[1],S=new j.g;return o?dD("div",{className:"paper-container-with-shadow",style:{position:"relative"}},void 0,dD("button",{type:"button",className:"close",onClick:function(){d(null),i(!1)}},void 0,dD("span",{"aria-hidden":"true"},void 0,"×"),dD("span",{className:"sr-only"},void 0,"Close")),dD("h2",{className:"work-page__form-title"},void 0,dD("span",{},void 0,I18n.translate("export.select"))),dD("div",{style:{marginBottom:"24px",display:"flex",flexDirection:"row",columnGap:"12px"}},void 0,dD("div",{},void 0,dD("div",{style:{display:"flex",justifyContent:"flex-start",flexDirection:"column"}},void 0,dD("span",{style:{color:"#9C9CA3"}},void 0,"Vælg type"),yD.map(function(e){return dD("button",{className:"btn icon-button icon-button-radio-horizontal",onClick:function(){return d(e.type)}},e.type,dD(En(),{readOnly:!0,checked:u===e.type,style:{display:"flex",justifyContent:"center",alignItems:"center"}}),dD(qv,{className:"phi-3x"}),dD("div",{},void 0,e.label))}))),u?dD(sD,{exportType:u,formData:g,setFormData:w}):null),dD("div",{style:{columnGap:"10px",display:"flex",flexDirection:"row",justifyContent:"center"}},void 0,u?dD(uw,{isLoading:p,loadingText:I18n.translate("export.working"),onClick:function(){var e=Jj[u],t=e.exportStartData,r=e.type;m(!0),s(!1),y(!1);var o=Object.fromEntries(Object.entries(g).filter(function(e){var n=vD(e,1)[0];return t.includes(n)}));S.registerRequest(function(e){return(0,a.RD)(l.krk,{method:"post",data:Hj({},e)})}(pD(pD({companyXid:n.currentXid},o),{},{type:r}))).then(function(){m(!1),s(!0),i(!1)}).catch(function(){m(!1),y(!0)})},variant:"primary"},void 0,I18n.translate("export.start")):null,h&&dD(bh(),{variant:"danger"},void 0,I18n.translate("export.start.failed")))):null});function gD(e){return gD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gD(e)}var wD;function SD(e,t,n,r){wD||(wD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:wD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function kD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?kD(Object(n),!0).forEach(function(t){ND(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ND(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=gD(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=gD(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gD(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return PD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?PD(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ID,AD=(0,zn.Ng)(function(e){return{companyStore:e.companies}})(function(e){var t=e.companyStore,n=xD((0,r.useState)(!1),2),o=n[0],i=n[1],s=xD((0,r.useState)(!1),2),c=s[0],u=s[1],d=xD((0,r.useState)(!1),2),f=d[0],m=d[1],v=xD((0,r.useState)([]),2),h=v[0],y=v[1],b=new j.g,g=function(){var e,n,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r||u(!0),b.registerRequest((e={companyXid:t.currentXid},n=e.companyXid,(0,a.RD)(l.ZdI,{method:"post",data:{companyXid:n}}))).then(function(e){var t=e.body.files.map(function(e){return e.hasInfos||e.hasWarnings||e.hasErrors?w(e.id).then(function(t){return OD(OD({},e),{},{logData:t})}):Promise.resolve(e)});Promise.all(t).then(function(e){y(e)}).finally(function(){r?m(!1):u(!1)})}).catch(function(){r||u(!1)})},w=function(e){return b.registerRequest(function(e){var t=e.companyXid,n=e.id;return(0,a.RD)(l.bHN,{method:"post",data:{companyXid:t,id:n}})}({companyXid:t.currentXid,id:e})).then(function(e){return e.body})};return(0,r.useEffect)(function(){g();var e=function(){g(!0)};return window.addEventListener(p.M9,e),function(){b.abortAll(),window.removeEventListener(p.M9,e)}},[]),SD(D.A,{title:I18n.translate("menu.automation.export"),loadScreen:c},void 0,SD("div",{className:"page-header"},void 0,SD("h4",{className:"my-0"},void 0,I18n.translate("menu.automation.export")),SD("div",{className:"d-flex"},void 0,SD("button",{className:"btn btn-primary ml-2",disabled:o,onClick:function(){return i(!0)}},void 0,I18n.translate("export.new")))),SD("div",{className:"container"},void 0,SD(bD,{isNewExportShown:o,setIsNewExportShown:i,setSaveSuccess:m}),f&&SD(bh(),{variant:"success"},void 0,I18n.translate("export.started"))),SD("div",{className:"container"},void 0,SD(Qj,{currentExports:h,fetchCurrentExports:g})))});function CD(e,t,n,r){ID||(ID="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ID,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const jD=function(){return CD(_o.A,{moduleProvider:function(){return n.e(4811).then(n.bind(n,4811))},componentName:"finalizeAnnualReportPage",title:I18n.translate("annualreport.nav.finalize")})};var DD;function _D(e,t,n,r){DD||(DD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:DD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(jD);const RD=function(){return _D(_o.A,{moduleProvider:function(){return n.e(1754).then(n.bind(n,61754))},componentName:"CloseYearPage",title:I18n.translate("annualreport.nav.close")})};var TD;function ED(e,t,n,r){TD||(TD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:TD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(RD);const MD=function(){return ED(_o.A,{moduleProvider:function(){return Promise.all([n.e(221),n.e(123)]).then(n.bind(n,60123))},componentName:"generalAssemblyPage",title:I18n.translate("annualreport.nav.ga")})};var FD;function zD(e,t,n,r){FD||(FD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:FD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(MD);const BD=function(){return zD(_o.A,{moduleProvider:function(){return n.e(8106).then(n.bind(n,35725))},componentName:"SubmitPage",title:I18n.translate("annualreport.nav.submit")})};var HD;function LD(e,t,n,r){HD||(HD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:HD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(BD);const $D=function(){return LD(_o.A,{moduleProvider:function(){return n.e(2587).then(n.bind(n,62587))},componentName:"ArticlesPage",title:"Articles",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{currentUserStore:e.currentUser}})(e)}})};var XD;function VD(e,t,n,r){XD||(XD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:XD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn($D);const qD=function(){return VD(_o.A,{moduleProvider:function(){return n.e(6978).then(n.bind(n,66978))},componentName:"ArticlePage",title:"Article",componentWrapper:function(e){return(0,zn.Ng)(function(e){return{currentUserStore:e.currentUser}})(e)}})};var UD;function WD(e,t,n,r){UD||(UD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:UD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function YD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return KD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KD(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function KD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}n.dn(qD);const GD=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyStore,i=e.onLeave,a=YD((0,r.useState)(!1),2),l=a[0],s=a[1],c=YD((0,r.useState)(null),2),u=c[0],d=c[1],f=YD((0,r.useState)(!1),2),p=f[0],m=f[1],v=new j.g,h=function(){n().then(function(){return s(!1)})},y=function(){return s(!0),v.registerRequest((0,$w.V8)({companyXid:o.currentXid,partnerKey:"DANLON"})).then(function(e){s(!1),d(e.body.apiKey)}).catch(function(){return s(!1)})};return WD("div",{className:"integration"},void 0,WD("div",{className:"integration-main"},void 0,WD("div",{className:"integration__img-container"},void 0,WD("img",{src:"/images/integrations/logo_danlon.png",alt:"logo"})),WD("div",{className:"integration-main__content"},void 0,WD("h2",{},void 0,I18n.translate("integrations.danlon.header")),t&&WD("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),WD("p",{},void 0,I18n.translate("integrations.danlon.intro")),t&&WD("p",{},void 0,I18n.translate("integrations.danlon.done.earlier")))),WD("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){s(!0),t?i():y().then(h)}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&WD(qn.A,{})),WD(gn.A,{show:!!u,title:I18n.translate("integrations.apikey.title"),submitBtnText:I18n.translate("ok"),onHide:function(){return d(null)},onSubmit:function(){return d(null)},noCancelBtn:!0},void 0,WD("p",{},void 0,I18n.translate("integrations.apikey.body","Danløn")),WD("div",{className:"btn btn-link-dark mt-2 p-0",role:"button",onClick:function(){navigator.clipboard.writeText(u),m(!0),setTimeout(function(){return m(!1)},3e3)}},void 0,u,WD("i",{className:"fa fa-copy ml-1","aria-hidden":"true"}))),p&&WD("div",{className:"app-toolbar__alert",style:{zIndex:1100}},void 0,WD(bh(),{variant:"primary",onDismiss:function(){return m(!1)}},void 0,WD("span",{},void 0,I18n.translate("copied.to.clipboard")))))};var QD;function ZD(e,t,n,r){QD||(QD="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:QD,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function JD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return e_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const t_=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyStore,i=e.onLeave,a=JD((0,r.useState)(!1),2),l=a[0],s=a[1],c=JD((0,r.useState)(null),2),u=c[0],d=c[1],f=JD((0,r.useState)(!1),2),p=f[0],m=f[1],v=new j.g,h=function(){n().then(function(){return s(!1)})}
1,y=function(){return s(!0),v.registerRequest((0,$w.V8)({companyXid:o.currentXid,partnerKey:"EBOKS"})).then(function(e){s(!1),d(e.body.apiKey)}).catch(function(){return s(!1)})};return ZD("div",{className:"integration"},void 0,ZD("div",{className:"integration-main"},void 0,ZD("div",{className:"integration__img-container"},void 0,ZD("img",{src:"/images/integrations/logo_eboks.png",alt:"logo"})),ZD("div",{className:"integration-main__content"},void 0,ZD("h2",{},void 0,I18n.translate("integrations.eboks.header")),t&&ZD("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),ZD("p",{},void 0,I18n.translate("integrations.eboks.intro")),ZD("p",{},void 0,I18n.translate("integrations.eboks.intro.2")),t&&ZD("p",{},void 0,I18n.translate("integrations.eboks.done.earlier")))),ZD("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){s(!0),t?i():y().then(h)}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&ZD(qn.A,{})),ZD(gn.A,{show:!!u,bsSize:"large",title:I18n.translate("integrations.eboks.endpoint"),submitBtnText:I18n.translate("ok"),onHide:function(){return d(null)},onSubmit:function(){return d(null)},noCancelBtn:!0},void 0,ZD("p",{},void 0,I18n.translate("integrations.eboks.done.now")),ZD("div",{className:"btn btn-link-dark mt-2 mb-2 p-0",role:"button",onClick:function(){navigator.clipboard.writeText("https://www.multiregnskab.dk/eboks?boks="+u),m(!0),setTimeout(function(){return m(!1)},3e3)}},void 0,"https://www.multiregnskab.dk/eboks?boks="+u,ZD("i",{className:"fa fa-copy ml-1","aria-hidden":"true"})),ZD("ul",{},void 0,ZD("li",{},void 0,"I e-Boks åbner du 'Menu' og vælger 'Systemintegration'"),ZD("li",{},void 0,"Vælg så den røde knap 'Opsæt integration via XML'"),ZD("li",{},void 0,"I den dialog som dukker op indsættes ovenstående i feltet 'Url'"),ZD("li",{},void 0,"Udfyld kontaktoplysninger og tryk 'Opret'"))),p&&ZD("div",{className:"app-toolbar__alert",style:{zIndex:1100}},void 0,ZD(bh(),{variant:"primary",onDismiss:function(){return m(!1)}},void 0,ZD("span",{},void 0,I18n.translate("copied.to.clipboard")))))};var n_;function r_(e,t,n,r){n_||(n_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:n_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function o_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const a_=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyStore,i=e.onLeave,a=o_((0,r.useState)(!1),2),l=a[0],s=a[1],c=o_((0,r.useState)(null),2),u=c[0],d=c[1],f=o_((0,r.useState)(!1),2),p=f[0],m=f[1],v=new j.g,h=function(){n().then(function(){return s(!1)})},y=function(){return s(!0),v.registerRequest((0,$w.V8)({companyXid:o.currentXid,partnerKey:"MINFORENING"})).then(function(e){s(!1),d(e.body.apiKey)}).catch(function(){return s(!1)})};return r_("div",{className:"integration"},void 0,r_("div",{className:"integration-main"},void 0,r_("div",{className:"integration__img-container"},void 0,r_("img",{src:"/images/integrations/logo_minforening.png",alt:"logo"}
1)),r_("div",{className:"integration-main__content"},void 0,r_("h2",{},void 0,I18n.translate("integrations.minforening.header")),t&&r_("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),r_("p",{},void 0,I18n.translate("integrations.minforening.intro")),t&&r_("p",{},void 0,I18n.translate("integrations.minforening.done.earlier")))),r_("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){s(!0),t?i():y().then(h)}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&r_(qn.A,{})),r_(gn.A,{show:!!u,title:I18n.translate("integrations.apikey.title"),submitBtnText:I18n.translate("ok"),onHide:function(){return d(null)},onSubmit:function(){return d(null)},noCancelBtn:!0},void 0,r_("p",{},void 0,I18n.translate("integrations.apikey.body","MinForening")),r_("div",{className:"btn btn-link-dark mt-2 p-0",role:"button",onClick:function(){navigator.clipboard.writeText(u),m(!0),setTimeout(function(){return m(!1)},3e3)}},void 0,u,r_("i",{className:"fa fa-copy ml-1","aria-hidden":"true"}))),p&&r_("div",{className:"app-toolbar__alert",style:{zIndex:1100}},void 0,r_(bh(),{variant:"primary",onDismiss:function(){return m(!1)}},void 0,r_("span",{},void 0,I18n.translate("copied.to.clipboard")))))};var l_;function s_(e,t,n,r){l_||(l_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:l_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function c_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const d_=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyXid,i=e.onLeave,a=c_((0,r.useState)(!1),2),l=a[0],s=a[1],c=c_((0,r.useState)(""),2),u=c[0],d=c[1],f=new j.g,p=function(){s(!0),f.registerRequest((0,$w.uN)({companyXid:o,apiKey:u,integration:"REVIFLOWS"})).then(function(){n(),s(!1)}).catch(function(){return s(!1)})};return s_("div",{className:"integration"},void 0,s_("div",{className:"integration-main"},void 0,s_("div",{className:"integration__img-container"},void 0,s_("img",{src:"/images/integrations/logo_reviflows.png",alt:"logo"})),s_("div",{className:"integration-main__content"},void 0,s_("h2",{},void 0,I18n.translate("integrations.reviflows.header")),t&&s_("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),s_("p",{},void 0,I18n.translate("integrations.reviflows.intro")),s_("p",{},void 0,I18n.translate("integrations.reviflows.intro.2")),s_("p",{},void 0,I18n.translate("integrations.reviflows.contact")," ",s_("a",{href:"https://flows.systems"},void 0,"https://flows.systems")),s_("p",{}),!t&&s_(je.x,{value:u,label:"integrations.reviflows.apikey",tooltip:"integrations.reviflows.apikey.balloon",onChange:d},"apiKey"),t&&s_("p",{},void 0,I18n.translate("integrations.reviflows.done.earlier")))),s_("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){s(!0),t?i():p()}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&s_(qn.A,{})))};var f_;function p_(e,t,n,r){f_||(f_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:f_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function m_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const h_=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyXid,i=e.onLeave,a=m_((0,r.useState)(!1),2),l=a[0],s=a[1],c=m_((0,r.useState)(""),2),u=c[0],d=c[1],f=new j.g,p=function(){s(!0),f.registerRequest((0,$w.uN)({companyXid:o,apiKey:u,integration:"STRIPE"})).then(function(){n(),s(!1)}).catch(function(){return s(!1)})};return p_("div",{className:"integration"},void 0,p_("div",{className:"integration-main"},void 0,p_("div",{className:"integration__img-container"},void 0,p_("img",{src:"/images/integrations/logo_stripe.png",alt:"logo"})),p_("div",{className:"integration-main__content"},void 0,p_("h2",{},void 0,I18n.translate("integrations.stripe.header")),t&&p_("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),p_("p",{},void 0,I18n.translate("integrations.stripe.intro")),p_("p",{},void 0,I18n.translate("integrations.stripe.intro.2")),p_("p",{}),!t&&p_(r.Fragment,{},void 0,p_(je.x,{value:u,label:"integrations.stripe.apikey",tooltip:"integrations.stripe.apikey.balloon",onChange:d},"apiKey"),p_("p",{},void 0,p_("strong",{},void 0,I18n.translate("integrations.stripe.apikey.how.title"))),p_("ol",{},void 0,p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.1")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.2")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.3")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.4")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.5")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.6")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.7")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.8")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.9")),p_("li",{},void 0,I18n.translate("integrations.stripe.apikey.how.10")))),t&&p_("p",{},void 0,I18n.translate("integrations.stripe.done.earlier")))),p_("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){s(!0),t?i():p()}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&p_(qn.A,{})))};function y_(e){return y_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y_(e)}var b_;function g_(e,t,n,r){b_||(b_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:b_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function w_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S_(r.key),r)}}function S_(e){var t=function(e,t){if("object"!=y_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=y_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==y_(t)?t:t+""}function k_(e,t,n){return t=N_(t),function(e,t){if(t&&("object"==y_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}
1(e,O_()?Reflect.construct(t,n||[],N_(e).constructor):t.apply(e,n))}function O_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O_=function(){return!!e})()}function N_(e){return N_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N_(e)}function x_(e,t){return x_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x_(e,t)}var P_=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),k_(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x_(e,t)}(t,e),function(e,t,n){return t&&w_(e.prototype,t),n&&w_(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return g_("div",{className:"integration"},void 0,g_("div",{className:"integration-main"},void 0,g_("div",{className:"integration__img-container integration__img-container--padded"},void 0,g_("img",{src:"/svgs/MP_Logo_Vertical-digital_Blue_RGB.svg",alt:"MobilePay"})),g_("div",{className:"integration-main__content"},void 0,g_("h2",{},void 0,I18n.translate("integrations.mobilepaymyshop.header")),g_("p",{},void 0,I18n.translate("integrations.mobilepaymyshop.intro.long1")),g_("ul",{},void 0,g_("li",{className:"mb-1"},void 0,I18n.translate("integrations.mobilepaymyshop.intro.long2")),g_("li",{className:"mb-1"},void 0,I18n.translate("integrations.mobilepaymyshop.intro.long3")),g_("li",{},void 0,I18n.translate("integrations.mobilepaymyshop.intro.long4"))))))}}])}(co.b);const I_=P_;var A_;function C_(e,t,n,r){A_||(A_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:A_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const j_=function(){return C_("div",{className:"integration"},void 0,C_("div",{className:"integration-main"},void 0,C_("div",{className:"integration__img-container"},void 0,C_("img",{src:"/images/integrations/logo_bank.png",alt:"logo"})),C_("div",{className:"integration-main__content"},void 0,C_("h2",{},void 0,I18n.translate("integrations.bankkonti.header")),C_("p",{},void 0,I18n.translate("integrations.bankkonti.intro")),C_("p",{},void 0,I18n.translate("integrations.bankkonti.intro.2")))))};var D_;function __(e,t,n,r){D_||(D_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:D_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function R_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const E_=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyStore,i=e.onLeave,a=R_((0,r.useState)(!1),2),l=a[0],s=a[1],c=R_((0,r.useState)(null),2),u=c[0],d=c[1],f=R_((0,r.useState)(!1),2),p=f[0],m=f[1],v=new j.g,h=function(){navigator.clipboard.writeText(u),m(!0),setTimeout(function(){return m(!1)},3e3)},y=function(){n().then(function(){return s(!1)})};return __("div",{className:"integration"},void 0,__("div",{className:"integration-main"},void 0,__("div",{className:"integration__img-container"},void 0,__("img",{src:"/images/integrations/logo_flexlon.png",alt:"logo"})),__("div",{className:"integration-main__content"},void 0,__("h2",{},void 0,I18n.translate("integrations.flexlon.header")),t&&__("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),__("p",{},void 0,I18n.translate("integrations.flexlon.intro")),t&&__("p",{},void 0,I18n.translate("integrations.flexlon.done.earlier")))),__("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){s(!0),t?i():(s(!0),v.registerRequest
1((0,$w.V8)({companyXid:o.currentXid,partnerKey:"FLEXLON"})).then(function(e){s(!1),d(e.body.apiKey)}).catch(function(){return s(!1)})).then(y)}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&__(qn.A,{})),__(gn.A,{show:!!u,title:I18n.translate("integrations.apikey.title"),submitBtnText:I18n.translate("ok"),onHide:function(){return d(null)},onSubmit:function(){h(),d(null)},noCancelBtn:!0},void 0,__("p",{},void 0,I18n.translate("integrations.apikey.body","FlexLøn")),__("div",{className:"btn btn-link-dark mt-2 p-0",role:"button",onClick:h},void 0,u,__("i",{className:"fa fa-copy ml-1","aria-hidden":"true"}))),p&&__("div",{className:"app-toolbar__alert",style:{zIndex:1100}},void 0,__(bh(),{variant:"primary",onDismiss:function(){return m(!1)}},void 0,__("span",{},void 0,I18n.translate("copied.to.clipboard")))))};var M_;function F_(e,t,n,r){M_||(M_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:M_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function z_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H_(e){var t=e.enabled,n=e.companyStore,o=z_((0,r.useState)(!0),2),i=o[0],a=o[1],l=z_((0,r.useState)(null),2),s=l[0],c=l[1],u=z_((0,r.useState)(null),2),d=u[0],f=u[1],p=z_((0,r.useState)(null),2),m=p[0],v=p[1],h=new j.g,y=function(){a(!0),h.registerRequest((0,$w.a5)(n.currentXid)).then(function(e){c(e.body)})};(0,r.useEffect)(function(){y()},[]),(0,r.useEffect)(function(){s&&s.userHasKontolinkAccess&&b()},[s]);var b=function(){a(!0),h.registerRequest((0,$w.MJ)(n.currentXid)).then(function(e){a(!1),f(e.body)})};return F_("div",{className:"integration"},void 0,F_("div",{className:"integration-main"},void 0,F_("div",{className:"integration__img-container"},void 0,F_("img",{src:"/images/integrations/kontolink_logo.jpeg",alt:"logo"})),F_("div",{className:"integration-main__content"},void 0,F_("h2",{},void 0,I18n.translate("integrations.kontolink.header")),t&&F_("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),s&&F_("div",{},void 0,F_("p",{},void 0,F_("b",{},void 0,I18n.translate("integrations.kontolink.workinprogress"))),s.userHasKontolinkAccess&&F_("div",{},void 0,F_("p",{},void 0,I18n.translate("integrations.kontolink.userconnected")),d&&d.userNameInKontolink&&F_("p",{},void 0,I18n.translate("integrations.kontolink.username",d.userNameInKontolink))),!s.userHasKontolinkAccess&&F_("div",{},void 0,F_("p",{},void 0,I18n.translate("integrations.kontolink.explainlink")),F_("p",{},void 0,F_("a",{href:"https://app.kontolink.com/#?mode=authorizeAppPartnerClient&clientId=673df78fc9586eac9b037248&redirectURI=https://www.multiregnskab.dk/open/kontolink/redirectfromauth",rel:"noreferrer"},void 0,I18n.translate("integrations.kontolink.link")))),s.companyIsConnected&&s.userHasKontolinkAccess&&d&&F_(r.Fragment,{},void 0,F_("p",{},void 0,I18n.translate("integrations.kontolink.connectedas",d.nameOfConnectedCompanyInKontolink)),F_("p",{},void 0,F_("b",{},void 0,I18n.translate("integrations.kontolink.bankaccounts"))),(d.kontolinkBankAccounts||[]).map(function(e){return F_("div",{},e.id,F_("p",{},void 0,"Kontolink: ",e.name," (",e.currency,") ",e.bban),F_("p",{},void 0,"Multi-Regnskab"," ",F_("div",{style:{width:220}}
1,void 0,F_(Fe.H,{value:e.connectedToUserBankAccountXid,options:d.optionsForBankAccountMapping,onChange:function(t){return function(e,t){a(!0),h.registerRequest((0,$w.Vl)(n.currentXid,t.id,e)).then(function(){b()})}(t,e)},disabled:i}))))})),d&&!s.companyIsConnected&&s.userHasKontolinkAccess&&F_(r.Fragment,{},void 0,F_("p",{},void 0,I18n.translate("integrations.kontolink.notconnected")),F_("p",{},void 0,F_("b",{},void 0,I18n.translate("integrations.kontolink.connecttowhat"))),F_(Fe.H,{value:m,options:(d.organizationOptions||[]).map(function(e){return{label:e.name,value:e.id}}),onChange:function(e){v(e)}}),F_("button",{onClick:function(){a(!0),h.registerRequest((0,$w.Ne)(n.currentXid,m)).then(function(){y()})},disabled:i||!m,className:"btn btn-primary"},void 0,i?I18n.translate("integrations.kontolink.connecting"):I18n.translate("integrations.kontolink.connect")))))))}var L_;(0,zn.Ng)(function(e){return{companyStore:e.companies}})(H_);function $_(e,t,n,r){L_||(L_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:L_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function X_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return V_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const q_=function(e){var t=e.sendEinvoiceEnabled,n=e.sendAndReceiveEinvoiceEnabled,o=e.companyXid,i=e.onUpdate,a=e.sendAndReceiveEinvoicePendingApproval,l=e.sendEinvoicePendingApproval,s=e.einvoiceDisabledBecause,c=e.einvoicePartyIdentifierType,u=e.einvoicePartyIdentifier,d=X_((0,r.useState)(!1),2),f=d[0],p=d[1],m=X_((0,r.useState)(!1),2),v=m[0],h=m[1],y=X_((0,r.useState)(!1),2),b=y[0],g=y[1],w=X_((0,r.useState)(null),2),S=w[0],k=w[1],O=X_((0,r.useState)(null),2),N=O[0],x=O[1],P=new j.g,I=function(){return h(!v)};(0,r.useEffect)(function(){!function(){if(!o)return x(null),void g(!1);g(!0),k(null),x(null),P.registerRequest((0,$w.FR)({companyXid:o})).then(function(e){x(e.body||null)}).catch(function(e){e.status===Z.BR?k(I18n.translate(e.response.body.messageKey)):k(I18n.translate("internal.api.nemhandel.lookup.failed"))}).then(function(){g(!1)})}()},[o]);var A=(0,r.useMemo)(function(){return t||n},[t,n]),C=function(){s?h(!0):(p(!0),P.registerRequest((0,$w.v0)({companyXid:o,signUpForSendOnly:!1,signUpForSendAndReceive:!0})).then(function(){i(),p(!1)}).catch(function(){return p(!1)}))};return $_("div",{className:"integration"},void 0,$_("div",{className:"integration-main"},void 0,$_("div",{className:"integration__img-container"},void 0,$_("img",{src:"/images/integrations/nemhandel.png",alt:"logo"})),$_("div",{className:"integration-main__content"},void 0,$_("h2",{},void 0,I18n.translate("integrations.nemhandel.header")),$_("div",{className:"d-flex mb-1"},void 0,n&&$_("div",{className:"integration-card__enabled mr-2"},void 0,"✓ ",I18n.translate("integrations.inuse.sendandreceive"))||t&&$_("div",{className:"integration-card__enabled mr-2"},void 0,"✓ ",I18n.translate("integrations.inuse.send")),(a||l)&&$_("div",{className:"integration-card__warning"},void 0,I18n.translate("integrations.einvoice.pending"))),$_("div",{},void 0,I18n.translate("integrations.nemhandel.intro.long")),$_("div",{className:"mt-1"},void 0,I18n.translate("integrations.nemhandel.intro.long.2")),$_("div",{className:"mt-2"},void 0,$_("b",{},void 0,"Registrering")),$_("div",{className:"mt-1"},void 0,"Identifikation i Nemhandel ",$_("b",{},void 0,"DK_CVR"===c&&"CVR-nummer","DK_SENUMMER"===c&&"SE-nummer",": "," ",u)),$_("div",{className:"mt-1 mb-2"},void 0,I18n.translate("integrations.nemhandel.intro.long.3")),$_("span",{},void 0,$_("b",{},void 0,"Nuværende registrering i Nemhandel"),$_("br",{}),function(){if(b)return $_(qn.A,{});if(S)return $_("p",{},void 0,S);if(!N)return $_("p",{},void 0,"Venter på NemHandel-opslag.");var e=Array.isArray(N.participants)?N.participants:[],t=N.cvr||"ukendt CVR",o=N.name||"";return e.length?r.createElement(r.Fragment,null,$_("div",{className:"mt-1"},void 0,"CVR-nummer ",t," (",o,") er allerede oprettet som modtager i Nemhandelsregistret."),$_("div",{className:"mt-1"},void 0,e.map(function(e){return $_("div",{},e.key,$_("div",{},void 0,e.keyType,":",e.key," (senest ændret ",e.lastModified,")"))})),!n&&$_("div",{className:"mt-1"},void 0,"Hvis virksomheden er registreret i Nemhandel via et andet system, så skal den registrering nedlægges inden vi i Multi-Regnskab kan foretage en registrering.")):$_("p",{},void 0,"Der er lige nu ingen registreringer for CVR-nummer ",t," (",o,") i Nemhandelsregistret.")}()),$_("div",{className:"mt-2"},void 0,$_("b",{},void 0,"Bemærk"),$_("br",{})),$_("div",{className:"mt-1"},void 0,I18n.translate("integrations.nemhandel.pricing")))),A?t&&!n&&$_("button",{className:"btn btn-primary integration-switch",disabled:f,onClick:C},void 0,I18n.translate("integrations.nemhandel.button.toreceive")," ",f&&$_(qn.A,{})):$_("div",{className:"integration-switch"},void 0,$_("button",{className:"btn btn-primary mr-1",disabled:f,onClick:function(){s?h(!0):(p(!0),P.registerRequest
1((0,$w.v0)({companyXid:o,signUpForSendOnly:!0,signUpForSendAndReceive:!1})).then(function(){i(),p(!1)}).catch(function(){return p(!1)}))}},void 0,I18n.translate("integrations.nemhandel.button.tosend")," ",f&&$_(qn.A,{})),$_("button",{className:"btn btn-primary",disabled:f,onClick:C},void 0,I18n.translate("integrations.nemhandel.button.toreceive")," ",f&&$_(qn.A,{}))),$_(gn.A,{show:v,title:s?I18n.translate("integrations.nemhandel.disabled.title"):"Work in progress",submitBtnText:I18n.translate("ok"),onHide:I,onSubmit:I,noCancelBtn:!0},void 0,$_("p",{},void 0,s||"Please contact support")))};var U_;function W_(e,t,n,r){U_||(U_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:U_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Y_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K_(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K_(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const G_=(0,zn.Ng)(function(e){return{accounts:e.defaults.groupedFinanceAccounts}})(function(e){var t=e.enabled,n=e.onUpdate,o=e.companyXid,i=e.onLeave,a=void 0===i?function(){}:i,l=e.osAgreementNumber,s=e.osVatNumber,c=e.osCompanyName,u=e.accounts,d=e.osDefaultSupplierFinanceAccountNumber,f=e.osSalesFinanceAccount,p=Y_((0,r.useState)(!1),2),m=p[0],v=p[1],h=Y_((0,r.useState)(""),2),y=h[0],b=h[1],g=Y_((0,r.useState)(f||u[0].options[0].value),2),w=g[0],S=g[1],k=Y_((0,r.useState)(d||u[0].options[0].value),2),O=k[0],N=k[1];(0,r.useEffect)(function(){f&&S(f),d&&N(d)},[f,d]);var x=new j.g,P=function(){v(!0),x.registerRequest((0,$w.rY)({companyXid:o,osApiKey:y,osDefaultSupplierFinanceAccountNumber:O,osSalesFinanceAccount:w})).then(function(){n(),v(!1)}).catch(function(){return v(!1)})};return W_("div",{className:"integration"},void 0,W_("div",{className:"integration-main"},void 0,W_("div",{className:"integration__img-container p-1"},void 0,W_("img",{src:"/images/integrations/logo_ordrestyring.png",alt:"logo"})),W_("div",{className:"integration-main__content"},void 0,W_("h4",{},void 0,I18n.translate("integrations.ordrestyring.header")),t?W_("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")):W_("p",{},void 0,I18n.translate("integrations.ordrestyring.intro.long")),t&&W_("p",{},void 0,I18n.translate("integrations.ordrestyring.info",l,s,c)),W_(je.x,{value:y,label:"integrations.ordrestyring.apikey",tooltip:"integrations.ordrestyring.apikey.balloon",onChange:b},"apikey"),W_(Fe.H,{value:w,label:"integrations.ordrestyring.salesaccount",tooltip:"integrations.ordrestyring.salesaccount.balloon",placeholder:I18n.translate("financeaccount.select"),groupedOptions:u,onChange:S,noDeselect:!0}),W_(Fe.H,{value:O,label:"integrations.ordrestyring.expenseaccount",tooltip:"integrations.ordrestyring.expenseaccount.balloon",placeholder:I18n.translate("financeaccount.select"),groupedOptions:u,onChange:N,noDeselect:!0}))),W_("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:m||!t&&!y,onClick:function(){v(!0),t?a():P()}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",m&&W_(qn.A,{})))});var Q_;function Z_(e,t,n,r){Q_||(Q_="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:Q_,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function J_(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}
1finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return eR(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eR(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const tR=function(e){var t=e.enabled,n=e.onUpdate,o=e.onLeave,i=J_((0,r.useState)(!1),2),a=i[0],l=i[1];return Z_("div",{className:"integration"},void 0,Z_("div",{className:"integration-main"},void 0,Z_("div",{className:"integration__img-container"},void 0,Z_("img",{src:"/images/integrations/corpay_logo.png",alt:"logo"})),Z_("div",{className:"integration-main__content"},void 0,Z_("h2",{},void 0,I18n.translate("integrations.roger.header")),t&&Z_("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),Z_("p",{},void 0,"Multi-Regnskab kan forbindes til Corpay således at bilag kan overføres fra Corpay til Multi-Regnskab."))),Z_("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:a,onClick:function(){l(!0),t?o():n().then(function(){return l(!1)})}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",a&&Z_(qn.A,{})))};var nR;function rR(e,t,n,r){nR||(nR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:nR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function oR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return iR(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iR(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const aR=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyStore,i=e.onLeave,a=oR((0,r.useState)(!1),2),l=a[0],s=a[1],c=oR((0,r.useState)(null),2),u=c[0],d=c[1],f=oR((0,r.useState)(!1),2),p=f[0],m=f[1],v=new j.g,h=function(){n().then(function(){return s(!1)})},y=function(){return s(!0),v.registerRequest((0,$w.V8)({companyXid:o.currentXid,partnerKey:"SALARY"})).then(function(e){s(!1),d(e.body.apiKey)}).catch(function(){return s(!1)})};return rR("div",{className:"integration"},void 0,rR("div",{className:"integration-main"},void 0,rR("div",{className:"integration__img-container"},void 0,rR("img",{src:"/images/integrations/logo_salary.png",alt:"logo"})),rR("div",{className:"integration-main__content"},void 0,rR("h2",{},void 0,I18n.translate("integrations.salary.header")),t&&rR("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),rR("p",{},void 0,I18n.translate("integrations.salary.intro")),t&&rR("p",{},void 0,I18n.translate("integrations.salary.done.earlier")))),rR("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){s(!0),t?i():y().then(h)}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&rR(qn.A,{})),rR(gn.A,{show:!!u,title:I18n.translate("integrations.apikey.title"),submitBtnText:I18n.translate("ok"),onHide:function(){return d(null)},onSubmit:function(){return d(null)},noCancelBtn:!0},void 0,rR("p",{},void 0,I18n.translate("integrations.apikey.body","Salary")),rR("div",{className:"btn btn-link-dark mt-2 p-0",role:"button",onClick:function(){navigator.clipboard.writeText(u),m(!0),setTimeout(function(){return m(!1)},3e3)}},void 0,u,rR("i",{className:"fa fa-copy ml-1","aria-hidden":"true"}))),p&&rR("div",{className:"app-toolbar__alert",style:{zIndex:1100}},void 0,rR(bh(),{variant:"primary",onDismiss:function(){return m(!1)}},void 0,rR("span",{},void 0,I18n.translate("copied.to.clipboard")))))};var lR,sR=n(96540);function cR(e){return cR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cR(e)}function uR(e,t,n,r){lR||(lR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:lR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function dR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hR(r.key),r)}}function fR(e,t,n){return t=mR(t),function(e,t){if(t&&("object"==cR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,pR()?Reflect.construct(t,n||[],mR(e).constructor):t.apply(e,n))}function pR(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(pR=function(){return!!e})()}
1function mR(e){return mR=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},mR(e)}function vR(e,t){return vR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vR(e,t)}function hR(e){var t=function(e,t){if("object"!=cR(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=cR(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==cR(t)?t:t+""}var yR=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),fR(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vR(e,t)}(t,e),function(e,t,n){return t&&dR(e.prototype,t),n&&dR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,t=e.skatRsuEnabled,n=e.accessOk,r=e.nextDeadline,o=e.frequencyTypeText,i=e.currentCompany,a=e.handleTestAccess;return uR(sR.Fragment,{},void 0,t&&!n?uR("div",{},void 0,uR("p",{},void 0,I18n.translate("integrations.skatrsu.shouldbeok",i.name)),uR("button",{type:"button",className:"btn btn-primary",onClick:a},void 0,I18n.translate("integrations.skatrsu.button.test"))):null,t&&n?uR("div",{},void 0,uR("p",{},void 0,I18n.translate("integrations.skatrsu.firsttimeok",r,o))):null,t||n?null:uR("div",{},void 0,uR("p",{},void 0,I18n.translate("integrations.skatrsu.nottested.intro")),uR("p",{},void 0,I18n.translate("integrations.skatrsu.nottested.howto")," ",uR("a",{href:"https://skat.dk/erhverv/moms/moms-saadan-goer-du/saadan-indberetter-du-moms",target:"_blank",rel:"noreferrer noopener"},void 0,I18n.translate("integrations.skatrsu.nottested.howto.linktext"))," ",I18n.translate("integrations.skatrsu.nottested.howto.suppl")),uR("p",{},void 0,I18n.translate("integrations.skatrsu.nottested.howto.beforeimage")),uR("div",{className:"responsive-img space-bottom-lg"},void 0,uR("img",{src:"/images/skatrsu-sample-ok.png","aria-hidden":"true"}))),!t&&n?uR("div",{},void 0,uR("p",{},void 0,I18n.translate("integrations.skatrsu.firsttimeok",r,o))):null)}}])}(co.b);!function(e,t,n){(t=hR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(yR,"propTypes",{skatRsuEnabled:q().bool,accessOk:q().bool,nextDeadline:q().string,frequencyTypeText:q().string,currentCompany:q().instanceOf(uo.V),handleTestAccess:q().func});const bR=yR;var gR;function wR(e,t,n,r){gR||(gR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:gR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function SR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kR(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kR(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const OR=function(e){var t=e.enabled,n=e.onUpdate,o=e.companyStore,i=e.onLeave,a=SR((0,r.useState)(!1),2),l=a[0],s=a[1],c=SR((0,r.useState)(!1),2),u=c[0],d=c[1],f=SR((0,r.useState)(null),2),p=f[0],m=f[1],v=SR((0,r.useState)(null),2),h=v[0],y=v[1],b=SR((0,r.useState)(null),2),g=b[0],w=b[1],S=SR((0,r.useState)(null),2),k=S[0],O=S[1],N=SR((0,r.useState)(!1),2),x=N[0],P=N[1],I=SR((0,r.useState)(!1),2),A=I[0],C=I[1],D=SR((0,r.useState)(null),2)[1],_=new j.g,R=function(){return C(!A)}
1,T=function(){s(!0),C(!1),_.registerRequest((0,$w.OD)(o.currentXid)).then(function(e){P(!e.body.accessOk),m(e.body.errorCode),y(e.body.errorText),d(e.body.accessOk),w(e.body.nextDeadline),D(e.body.frequencyType),O(e.body.frequencyTypeText)}).finally(function(){return n().then(function(){return s(!1)})})};return wR("div",{className:"integration"},void 0,wR("div",{className:"integration-main"},void 0,wR("div",{className:"integration__img-container"},void 0,wR("img",{src:"/images/integrations/skat_logo.png",alt:"logo"})),wR("div",{className:"integration-main__content"},void 0,wR("h2",{},void 0,I18n.translate("integrations.skatrsu.header")),t&&wR("div",{className:"integration-card__enabled"},void 0,"✓ ",I18n.translate("integrations.inuse")),wR("p",{},void 0,I18n.translate("integrations.skatrsu.intro")))),wR("button",{className:"btn btn-".concat(t?"danger":"primary"," integration-switch"),disabled:l,onClick:function(){t?i():R()}},void 0,I18n.translate(t?"integrations.leave":"integrations.use")," ",l&&wR(qn.A,{})),wR(bR,{currentCompany:o.currentCompany,accessOk:u,nextDeadline:g,frequencyTypeText:k,skatRsuEnabled:t,handleTestAccess:T}),wR(gn.A,{show:x,noCancelBtn:!0,submitBtnText:I18n.translate("ok"),title:I18n.translate("integrations.skatrsu.firsttimefail.title"),onHide:function(){return P(!1)}},void 0,wR("p",{},void 0,I18n.translate("integrations.skatrsu.firsttimefail.contents")),p&&wR("p",{},void 0,I18n.translate("integrations.skatrsu.err",p,h)),wR("p",{},void 0,I18n.translate("integrations.skatrsu.expires"))),wR(gn.A,{show:A,submitBtnText:I18n.translate("integrations.skatrsu.button.shouldbeready"),title:I18n.translate("integrations.skatrsu.ready.title"),onHide:R,onSubmit:T},void 0,wR("p",{},void 0,I18n.translate("integrations.skatrsu.ready.question"))))};function NR(){return NR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NR.apply(null,arguments)}var xR;function PR(e,t,n,r){xR||(xR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:xR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function IR(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,l=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return AR(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AR(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AR(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var CR,jR="/:lang/automation/integration",DR=(0,zn.Ng)(function(e){return{companyStore:e.companies,currentUser:e.currentUser}})(function(e){var t=e.companyStore,n=(0,o.g)().integration,i=new j.g,a=IR((0,r.useState)(!0),2),l=a[0],s=a[1],c=IR((0,r.useState)(!1),2),u=c[0],d=c[1],f=IR((0,r.useState)(!1),2),p=f[0],m=f[1],v=IR((0,r.useState)(!1),2),h=v[0],y=v[1],b=IR((0,r.useState)(!1),2),g=b[0],w=b[1],S=IR((0,r.useState)(!1),2),k=S[0],O=S[1],N=IR((0,r.useState)(!1),2),x=N[0],P=N[1],I=IR((0,r.useState)(!1),2),A=I[0],C=I[1],_=IR((0,r.useState)(!1),2),R=_[0],T=_[1],E=IR((0,r.useState)(!1),2),M=E[0],F=E[1],z=IR((0,r.useState)(!1),2),B=z[0],H=z[1],L=IR((0,r.useState)(!1),2),$=L[0],X=L[1],V=IR((0,r.useState)(!1),2),q=V[0],U=V[1],W=IR((0,r.useState)(!1),2),Y=W[0],K=W[1],G=IR((0,r.useState)(!1),2),Z=G[0],J=G[1],ee=IR((0,r.useState)({}),2),te=ee[0],ne=ee[1],re=IR((0,r.useState)(null),2),oe=re[0],ie=re[1],ae=IR((0,r.useState)(null),2),le=ae[0],se=ae[1],ce=IR((0,r.useState)(null),2),ue=ce[0],de=ce[1],fe=(0,o.W6)(),pe=function(){return i.registerRequest
1((0,$w._Q)(t.currentXid)).then(function(e){s(!1),d(e.body.skatRsuEnabled),T(e.body.salaryEnabled),m(e.body.danlonEnabled),y(e.body.minForeningEnabled),P(e.body.bankkontiEnabled),C(e.body.eboksEnabled),w(e.body.reviflowsEnabled),O(e.body.stripeEnabled),F(e.body.ordrestyringEnabled),H(e.body.flexLonEnabled),X(e.body.sendEinvoiceEnabled),U(e.body.sendAndReceiveEinvoiceEnabled),K(e.body.sendAndReceiveEinvoicePendingApproval),J(e.body.sendEinvoicePendingApproval),ne({osAgreementNumber:e.body.osAgreementNumber,osCompanyName:e.body.osCompanyName,osVatNumber:e.body.osVatNumber,osDefaultSupplierFinanceAccountNumber:e.body.osDefaultSupplierFinanceAccountNumber,osSalesFinanceAccount:e.body.osSalesFinanceAccount}),ie(e.body.einvoiceDisabledBecause||null),se(e.body.einvoicePartyIdentifierType||null),de(e.body.einvoicePartyIdentifier||null)}).catch(function(){return s(!1)})},me=function(e){return function(){return i.registerRequest((0,$w.Ue)(t.currentXid,e)).then(function(e){200===e.status&&fe.push((0,Q.ID)("/automation/integrations"))})}};return(0,r.useEffect)(function(){pe()},[]),PR(D.A,{title:"".concat(I18n.translate("menu.setup.integrations")," > "),loadScreen:l},void 0,PR("h4",{className:"page-header"},void 0,"".concat(I18n.translate("menu.setup.integrations")," > ").concat(I18n.translate("integrations.".concat(n,".header")))),PR("div",{className:"container-fluid"},void 0,PR(bn.A,{to:(0,Q.ID)("/automation/integrations"),text:I18n.translate("back")}),PR("div",{className:"card mt-2 p-3"},void 0,!l&&PR(o.dO,{},void 0,PR(o.qh,{path:"".concat(jR,"/skatrsu"),render:function(){return PR(OR,{enabled:u,onUpdate:pe,companyStore:t,onLeave:me("SKATRSU")})}}),PR(o.qh,{path:"".concat(jR,"/salary"),render:function(){return PR(aR,{enabled:R,onUpdate:pe,companyStore:t,onLeave:me("SALARY")})}}),PR(o.qh,{path:"".concat(jR,"/danlon"),render:function(){return PR(GD,{enabled:p,onUpdate:pe,companyStore:t,onLeave:me("DANLON")})}}),PR(o.qh,{path:"".concat(jR,"/minforening"),render:function(){return PR(a_,{enabled:h,onUpdate:pe,companyStore:t,onLeave:me("MINFORENING")})}}),PR(o.qh,{path:"".concat(jR,"/reviflows"),render:function(){return PR(d_,{enabled:g,onUpdate:pe,companyXid:t.currentXid,onLeave:me("REVIFLOWS")})}}),PR(o.qh,{path:"".concat(jR,"/stripe"),render:function(){return PR(h_,{enabled:k,onUpdate:pe,companyXid:t.currentXid,onLeave:me("STRIPE")})}}),PR(o.qh,{path:"".concat(jR,"/kontolink"),render:function(){return PR(H_,{enabled:!1,onUpdate:pe,companyStore:t,onLeave:me("KONTOLINK")})}}),PR(o.qh,{path:"".concat(jR,"/roger"),render:function(){return PR(tR,{enabled:!1,onUpdate:pe,companyStore:t,onLeave:me("CORPAY")})}}),PR(o.qh,{path:"".concat(jR,"/flexlon"),render:function(){return PR(E_,{enabled:B,onUpdate:pe,companyStore:t,onLeave:me("FLEXLON")})}}),PR(o.qh,{path:"".concat(jR,"/bankkonti"),render:function(){return PR(j_,{enabled:x,onUpdate:pe,companyStore:t,onLeave:me("BANKKONTI")})}}),PR(o.qh,{path:"".concat(jR,"/eboks"),render:function(){return PR(t_,{enabled:A,onUpdate:pe,companyStore:t,onLeave:me("EBOKS")})}}),PR(o.qh,{path:"".concat(jR,"/nemhandel"),render:function(){return PR(q_,{companyXid:t.currentXid,onUpdate:pe,sendEinvoiceEnabled:$,sendAndReceiveEinvoiceEnabled:q,sendAndReceiveEinvoicePendingApproval:Y,sendEinvoicePendingApproval:Z,einvoiceDisabledBecause:oe,einvoicePartyIdentifierType:le,einvoicePartyIdentifier:ue})}}),PR(o.qh,{path:"".concat(jR,"/mobilepaymyshop"),render:function(){return PR(I_,{enabled:!1,companyStore:t})}}),PR(o.qh,{path:"".concat(jR,"/ordrestyring"),render:function(){return r.createElement(G_,NR({enabled:M,companyXid:t.currentXid,onUpdate:pe,onLeave:me("ORDRESTYRING")},te))}})))))});function _R(e,t,n,r){CR||(CR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:CR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const RR=function(){return _R(D.A,{},void 0,_R("h2",{className:"text-center text-muted"},void 0,"#404 Not Found!"))};var TR;function ER(e,t,n,r){TR||(TR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:TR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const MR=function(){return ER(_o.A,{moduleProvider:function(){return n.e(5463).then(n.bind(n,65463))},componentName:"secondScreenPage",title:"Second window"})};var FR;function zR(e,t,n,r){FR||(FR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:FR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(MR);const BR=function(){return zR(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(8814)]).then(n.bind(n,48814))},title:I18n.translate("menu.work.bankcompare")})};var HR;function LR(e,t,n,r){HR||(HR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:HR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(BR);const $R=function(){return LR(_o.A,{moduleProvider:function(){return Promise.all([n.e(3439),n.e(9176),n.e(3662),n.e(4214),n.e(3304),n.e(9373),n.e(143),n.e(2965),n.e(6526),n.e(5217),n.e(8187),n.e(5569),n.e(2860)]).then(n.bind(n,12860))},title:I18n.translate("grants.title")})};var XR;function VR(e,t,n,r){XR||(XR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:XR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn($R);const qR=function(){return VR(_o.A,{moduleProvider:function(){return Promise.all([n.e(7375),n.e(2790),n.e(6350)]).then(n.bind(n,56350))},componentName:"invoicePage",title:I18n.translate("userinvoicing.title")})};var UR;function WR(e,t,n,r){UR||(UR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:UR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}n.dn(qR);const YR=function(){return WR(_o.A,{moduleProvider:function(){return n.e(7418).then(n.bind(n,77418))},componentName:"XBRLViewerPage",title:I18n.translate("xbrlviewer.title"),componentWrapper:function(e){return(0,zn.Ng)(function(e){return{companyStore:e.companies}})(e)}})};var KR;function GR(e,t,n,r){KR||(KR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:KR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}
1function QR(){var e=new j.g,t=function(){e.registerRequest((0,a.RD)(l.wZd,{method:"post"})).then(function(e){e.body.bulletins.forEach(function(e){i.oR.info(GR("div",{dangerouslySetInnerHTML:{__html:e.message}}))})})};return(0,r.useEffect)(function(){return window.addEventListener(p.vf,t),function(){window.removeEventListener(p.vf,t)}},[]),null}n.dn(YR);var ZR,JR=n(64286),eT=n(59499),tT=n(96540);function nT(e){return nT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nT(e)}function rT(){return rT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rT.apply(null,arguments)}function oT(e){return function(e){if(Array.isArray(e))return iT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return iT(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iT(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function aT(e,t,n,r){ZR||(ZR="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,i=arguments.length-3;if(t||0===i||(t={children:void 0}),1===i)t.children=r;else if(i>1){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+3];t.children=a}if(t&&o)for(var s in o)void 0===t[s]&&(t[s]=o[s]);else t||(t=o||{});return{$$typeof:ZR,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function lT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pT(r.key),r)}}function sT(e,t,n){return t=uT(t),function(e,t){if(t&&("object"==nT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cT()?Reflect.construct(t,n||[],uT(e).constructor):t.apply(e,n))}function cT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cT=function(){return!!e})()}function uT(e){return uT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},uT(e)}function dT(e,t){return dT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dT(e,t)}function fT(e,t,n){return(t=pT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pT(e){var t=function(e,t){if("object"!=nT(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nT(t)?t:t+""}var mT=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),fT(n=sT(this,t,[e]),"state",{errorLogged:!1,notify:!1,accessRightsChanged:!1,accessChanged:!1,entityChanged:!1,companyChanged:!1,wsBusy:!1,showShortCuts:!1,listOfActiveScreenIds:[]}),fT(n,"timer",null),fT(n,"wsActivityTimer",null),fT(n,"_isMounted",!1),fT(n,"_modelUpdates",[]),fT(n,"methods",{}),fT(n,"requestHelper",new j.g),n.shortCutHelper=new mo.F([{keys:vo.zE,handler:n.toggleShortCuts.bind(n)}]),n.entityChangedHandler=function(){return n.setState({entityChanged:!0})},n.accessChangedHandler=function(){return n.setState({accessRightsChanged:!0})}
1,n.companyChangedHandler=function(){return n.setState({companyChanged:!0})},n.props.actions.setAssistantUrl(n.props.location.pathname),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dT(e,t)}(t,e),function(e,t,n){return t&&lT(e.prototype,t),n&&lT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){var e;this._isMounted=!0,this.props.actions.fetchCompanies(),this.setState({showAssistant:this.props.currentUserStore.user.startWithAssistantOpen}),window.addEventListener(p.IR,this.entityChangedHandler),window.addEventListener(p.L0,this.accessChangedHandler),window.addEventListener(p.Aj,this.companyChangedHandler),JR.wsListener&&(e=this.handleDisconnect.bind(this),k.onDisconnect=e),(0,Q.wz)((0,Q.ID)("/welcome"))&&this.props.actions.toggleToolbar(!1)}},{key:"componentDidCatch",value:function(e){eT.captureError(e),this.forceUpdate()}},{key:"componentDidUpdate",value:function(e){var t;this.props.location.pathname!==e.location.pathname&&this.props.actions.setAssistantUrl(this.props.location.pathname),this.props.companiesStore.currentXid!==e.companiesStore.currentXid&&e.companiesStore.currentXid&&(t=(0,l.MJm)(e.companiesStore.currentXid),k.unsubscribe(t)),JR.wsListener&&!this.props.companiesStore.loading&&e.companiesStore.loading&&(this.props.shouldReconnectWs?this.initializeWs(this.props.currentUserStore.user.userName,this.props.currentUserStore.user.helper):this.props.companiesStore.currentXid!==e.companiesStore.currentXid&&O((0,l.MJm)(this.props.companiesStore.currentXid),this.handleCompanyWSMessage.bind(this))),this.props.companiesStore.currentXid!==e.companiesStore.currentXid&&null!==this.props.companiesStore.currentXid&&this.props.actions.fetchDefaults(this.props.companiesStore.currentXid),this.updateRoute(this.props,e)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.shortCutHelper&&this.shortCutHelper.destroy(),clearTimeout(this.timer),clearTimeout(this.wsActivityTimer),this.requestHelper.abortAll(),window.removeEventListener(p.IR,this.entityChangedHandler),window.removeEventListener(p.L0,this.accessChangedHandler),window.removeEventListener(p.Aj,this.companyChangedHandler),k.disconnect()}},{key:"updateRoute",value:function(e,t){t.companiesStore.currentXid&&e.companiesStore.currentXid!==t.companiesStore.currentXid&&!(0,Q.wz)((0,Q.ID)("/2nd-window"))&&e.history.push((0,Q.ID)()),(0,Q.wz)((0,Q.ID)("/welcome"))&&!(0,Q.wz)((0,Q.ID)("/welcome"),t.location)&&this.props.actions.toggleToolbar(!1)}},{key:"initializeWs",value:function(e,t){var n,r=this;n=function(){r.props.actions.setShouldReconnectWs(!1)},k.onConnected=n,function(e){k.onReceiveMessage=e}(this.activityHandler.bind(this)),k.connect(),O((0,l.MJm)(this.props.companiesStore.currentXid),this.handleCompanyWSMessage.bind(this)),O((0,l.WH3)(e),this.handleUserWSMessage.bind(this)),O(l.MGV,function(){window.dispatchEvent(new CustomEvent(p.vf))}),O((0,l.pIc)(),this.props.actions.handleWindowTopic),t&&O(l.Tre,this.handleHelperWSMessage.bind(this))}},{key:"activityHandler",value:function(){var e=this;clearTimeout(this.wsActivityTimer),this.setState({wsBusy:!0}),this.wsActivityTimer=setTimeout(function(){return e.setState({wsBusy:!1})},2e3)}},{key:"handleDisconnect",value:function(e){if(this._isMounted){eT.addDebugHistory({type:"websocket",status:"disconnected"});var t=e&&(1e3===e.code||1001===e.code),n=e&&1002===e.code,r=e&&1006===e.code;t||n||r||document.hidden||eT.captureError(null,{message:"WS disconnected, SESSION_ID = ".concat((0,Q.Ri)("JSESSIONID"),"; ").concat(JSON.stringify((0,a.m5)()),"; Code: ").concat(e.code,"; Reason: ").concat(e.reason)},!1),this.props.actions.setShouldReconnectWs(!0)}}},{key:"toggleReports",value:function(){var e=this.props.companiesStore.currentCompany,t=!1,n=!1,r=!1;e&&(t=e.accessModeEdit,n=e.accessModeViewDetails,r=e.accessModeViewInfo),r||n||"/company/create"===this.props.location.pathname||!e||/\/work\/ui$/.test(this.props.location.pathname)&&(!/\/work\/ui$/.test(this.props.location.pathname)||!r&&!t)||this.setState({showReports:!this.state.showReports})}},{key:"toggleShortCuts",value:function(){this.setState({showShortCuts:!this.state.showShortCuts})}},{key:"handleCompanyWSMessage",value:function(e){var n,r,o=this,s=e&&e.body;try{var c=t.parseMessage(s),u=!1;if(!c||c.companyXid!==this.props.companiesStore.currentXid)return;if(this.props.actions.setWebSocketMessageReceivedTimestamp(),"EXPORT_FILES_UPDATED"===c.specialChangeType&&window.dispatchEvent(new CustomEvent(p.M9,{bubbles:!0,cancelable:!0})),"BACKGROUND_TASK_FAILED"===c.specialChangeType&&i.oR.info(I18n.translate("work.background.failed"),{toastId:"backgroundFailed",position:i.oR.POSITION.TOP_CENTER,hideProgressBar:!0,progress:void 0}),"UPDATE_BACKGROUND_TASKS"===c.specialChangeType&&this.requestHelper.registerRequest
1((n={companyXid:this.props.companiesStore.currentXid},r=n.companyXid,(0,a.RD)(l.yRw,{method:"post",data:{companyXid:r}}))).then(function(e){o.props.actions.setBackgroundTasks({backgroundTasks:e.body.backgroundTasks})}),"SHOPPING_CHANGE"===c.specialChangeType&&(this.props.companiesStore.currentXid&&this.props.actions.fetchFiscalYears(this.props.companiesStore.currentXid),(0,Q.wz)((0,Q.ID)("/account/shoppingbasket"))&&this.props.actions.fetchShoppingBasketContents()),"BACKGROUND_TASK_COMPLETED"===c.specialChangeType&&i.oR.info(aT("div",{dangerouslySetInnerHTML:{__html:c.htmlMessageToUser}})),"UPDATE_SUGGESTIONS"===c.specialChangeType&&(this.props.transactionStore.loaded&&this.props.actions.fetchTransactions({companyXid:this.props.companiesStore.currentXid,fiscalYear:this.props.transactionStore.fiscalYear}),this.props.actions.modelChanged(),window.dispatchEvent(new CustomEvent(p.c_))),"CHECK_NOTES"===c.specialChangeType&&0!==c.specialChange)return void this.props.actions.updateSABReport({shouldUpdate:"".concat(Date.now(),"-").concat(Math.random())});0!==c.pleaseRequestModelUpdate&&(c.ignoreRequestModelUpdateIfClientId===p.U6?eT.addDebugHistory({type:"websocket",status:"ignore-model-request-update"}):10===this._modelUpdates.length&&Date.now()-this._modelUpdates[0]<6e3?eT.captureError(null,{componentName:"websocket",message:"Too many model updates"},!1):(this._modelUpdates.push(Date.now()),this._modelUpdates.length>10&&(this._modelUpdates=this._modelUpdates.slice(1)),this.requestHelper.registerRequest(function(e){return(0,a.RD)(l.yQz,{queryData:{companyXid:e}})}(this.props.companiesStore.currentXid)),u=!0)),0===c.modelChange||u||null!=c.ignoreModelChangeUnlessClient&&c.ignoreModelChangeUnlessClient!==p.U6?0!==c.modelChange&&c.ignoreModelChangeUnlessClient!==p.U6&&eT.addDebugHistory({type:"websocket",status:"ignore-model-update"}):(this.props.defaultStore.loading||this.props.actions.fetchDefaults(this.props.companiesStore.currentXid),this.props.transactionStore.loading||(this.props.actions.fetchErrors({companyXid:this.props.companiesStore.currentXid}),this.props.transactionStore.loaded&&this.props.actions.fetchTransactions({companyXid:this.props.companiesStore.currentXid,fiscalYear:this.props.transactionStore.fiscalYear}),this.props.actions.modelChanged(),window.dispatchEvent(new CustomEvent(p.c_)))),c.optionsChange&&(this.props.actions.fetchCompanies(),this.props.actions.fetchMagicMenuItems(this.props.companiesStore.currentXid),this.props.defaultStore.loading||this.props.actions.fetchDefaults(this.props.companiesStore.currentXid)),(c.documentArchiveChange||"DOCUMENT_ARCHIVE_CHANGE"===c.specialChangeType)&&(window.dispatchEvent(new CustomEvent(p.F6)),(this.props.inbox.loaded||this.props.menuStore.screens.some(function(e){return/^fileDetails\/[0-9]+$/.test(e)||"inbox"===e}))&&this.props.actions.fetchInbox(this.props.companiesStore.currentXid,this.props.inbox.searchText)),"BANK_INTEGRATION"===c.specialChangeType&&(window.dispatchEvent(new CustomEvent(p.m8,{bubbles:!0,cancelable:!0})),(0,Q.wz)((0,Q.ID)("/work/bank-compare"),window.location,!0)&&window.dispatchEvent(new CustomEvent(p.c_))),"FINALIZE_YEAR"===c.specialChangeType&&window.dispatchEvent(new CustomEvent(p.c_))}catch(e){eT.captureError(e,{componentName:"handleCompanyWSMessage",messageBody:s,errorText:e&&e.message},!0,!1),window.dispatchEvent(new CustomEvent(p.mq,{detail:{errorText:e&&e.message}}))}}},{key:"handleUserWSMessage",value:function(e){var n=this,r=e&&e.body;try{var o=t.parseMessage(r);if(!o)return;if("userIntraMessage"in o&&0!==o.userIntraMessage)return void window.dispatchEvent(new CustomEvent(p.fe));if(o.secondScreenChange){var a=o.secondScreenChange;return a.secondScreenPresenceClientId&&a.secondScreenPresenceClientId!==p.U6&&!this.state.listOfActiveScreenIds.includes(a.secondScreenPresenceClientId)&&(i.oR.info(I18n.translate("secondscreen.toast.enter"),{toastId:"secondScreen",autoClose:p.jL,position:i.oR.POSITION.TOP_CENTER,hideProgressBar:!0,progress:void 0}),this.setState({listOfActiveScreenIds:[].concat(oT(this.state.listOfActiveScreenIds),[a.secondScreenPresenceClientId])}),this.props.actions.setPrimaryWindowMode(!0)),void(a.secondScreenCloseClientId&&a.secondScreenCloseClientId!==p.U6&&this.state.listOfActiveScreenIds.includes(a.secondScreenCloseClientId)&&(i.oR.info(I18n.translate("secondscreen.toast.exit"),{toastId:"secondScreen",autoClose:p.jL,position:i.oR.POSITION.TOP_CENTER,hideProgressBar:!0,progress:void 0}),this.setState({listOfActiveScreenIds:this.state.listOfActiveScreenIds.filter(function(e){return e!==a.secondScreenCloseClientId})},function(){n.state.listOfActiveScreenIds.length||n.props.actions.setPrimaryWindowMode(!1)})))}if(o.userAccessChange)return void this.setState({accessRightsChanged:!0});if("REQUEST_DEBUG"===o.userNotification)return void eT.captureError(null,{message:"REQUEST_DEBUG"},!1,!0);eT.captureError(new Error("Unhandled user WebSocket message"),{componentName:"handleUserWSMessage",messageBody:r,message:"User topic message did n
1ot match any known type",errorText:"Unhandled user WebSocket message"},!0,!1),window.dispatchEvent(new CustomEvent(p.mq,{detail:{errorText:"Unhandled user WebSocket message"}}))}catch(e){eT.captureError(e,{componentName:"handleUserWSMessage",messageBody:r,errorText:e&&e.message},!0,!1),window.dispatchEvent(new CustomEvent(p.mq,{detail:{errorText:e&&e.message}}))}}},{key:"handleHelperWSMessage",value:function(e){var n=this,r=t.parseMessage(e.body);r.conversationId&&(clearTimeout(this.timer),window.dispatchEvent(new CustomEvent(p.C8,{detail:r.conversationId})),this.setState({notify:!0}),this.timer=setTimeout(function(){return n.setState({notify:!1})},2e4))}},{key:"selectCompany",value:function(e){e!==this.props.companiesStore.currentXid&&(window.dispatchEvent(new CustomEvent(p.CO,{bubbles:!0,cancelable:!0}))&&(this.props.actions.selectCompany(e,this.props.companiesStore),this.props.hasSecondaryWindow&&(0,c.K_)(e)))}},{key:"refreshState",value:function(){var e=this;this.setState({accessRightsChanged:!1}),Promise.all([this.props.actions.fetchCompanies(),this.props.actions.fetchAuth()]).then(function(){return e.props.history.push((0,Q.ID)())})}},{key:"handleUpload",value:function(e){var t=this;i.oR.info(I18n.translate("upload.started"),{toastId:"upload",autoClose:p.jL,position:i.oR.POSITION.TOP_CENTER,hideProgressBar:!0,progress:void 0}),Promise.all(Array.from(e).map(function(e){return t.requestHelper.registerRequest((0,s.QM)({file:e,folderXid:0,companyXid:t.props.companiesStore.currentXid,splitIntoIndividualPages:!1,unzipZips:!1,createTransactions:!0}))})).then(function(){return i.oR.update("upload",{type:i.oR.TYPE.SUCCESS,render:I18n.translate("upload.uploaded",e.length)})}).catch(function(){return i.oR.update("upload",{type:i.oR.TYPE.ERROR,render:I18n.translate("upload.failed",e.length)})})}},{key:"handleReport",value:function(e){var t=this;eT.captureError(null,{debugLog:e},!1,!0).then(function(){return t._isMounted&&t.setState({errorLogged:!0})})}},{key:"render",value:function(){var e=this;if(!this.props.companiesStore.currentXid&&this.props.companiesStore.loading||this.props.defaultStore.loading&&!this.props.defaultStore.loaded)return aT(bx,{showToolbar:this.props.menuStore.showToolbar},void 0,aT(D.A,{loadScreen:!0}));var t=(0,Q._s)(this.methods,13,function(){return e.setState({errorLogged:!1})}),n=this.props.currentUserStore.user,r=this.props.defaultStore,a=r.hideSecuritiesUi,l=r.companyTypeIsFoundation,s=r.companyTypeIsSinglePerson,c=r.companyTypeIsSinglePersonOrIS,u=r.securitiesSelectOptions,d=this.props.companiesStore,f=d.currentCompany,p=d.companies,m=d.currentXid,v=d.finalize,h=p.some(function(e){return e.canGrantAccessToOthers}),y=f&&(f.filesAdd||f.filesView)||!1,b=n.administrator&&n.isUser,g=n.allowOfferingsAdminPage,w=n.allowCrmFeatures,S=this.props.location.pathname!==(0,Q.ID)("/company/create"),k=!1,O=!1,N=!1,x=!1,P="",I=this.state,A=I.accessRightsChanged,C=I.companyChanged,j=I.entityChanged,_=I.errorLogged,R=I.showShortCuts,T=I.wsBusy,M=I.notify,F=this.props.shouldReconnectWs;f&&(P=f.accessMode,k=f.accessModeEdit,O=f.accessModeViewDetails,N=f.accessModeViewInfo,x=f.usageTypeAnnualReportOnly);var z=!f||"INFO"===f.accessMode,B=!a&&k,H=!(O||N)&&k,L={accessMode:P,CAN_EDIT:H,accessModeViewDetails:O,companyTypeIsFoundation:l,companyTypeIsSinglePerson:s,companyTypeIsSinglePersonOrIS:c,allowSecuritiesPrices:B,isSuperUser:n.isSuperUser,administrator:n.administrator,isPartOfPortfolio:n.isPartOfPortfolio,hasAccessToFiles:y,allowInvoicing:!0,accessModeViewInfo:N,securitiesSelectOptions:u,filesOnlyAccess:z,hasSecurities:function(){return this.allowSecuritiesPrices},isNormalWork:function(){return O||k||"INVOICING"===P},isLimitedToInvoicingAndDocuments:function(){return"INVOICING"===P},isSuperUserOrAdministrator:function(){return this.isSuperUser||this.administrator},bookkeepingCompanyEditOrDetails:function(){return!x&&(H||O)},bookkeepingCompanyAllAccess:function(){return!x&&H},isUsageTypeAnnualReportOnly:function(){return x},isBookkeepingCompanyEditDetailsOrInvoicing:function(){return!x&&(H||O||"INVOICING"===P)},isBookkeepingCompanyEditOrInvoicing:function(){return!x&&(H||"INVOICING"===P)},userHasBetaAccess:function(){return this.isPartOfPortfolio}};return aT(bx,{showToolbar:this.props.menuStore.showToolbar},void 0,aT("div",{className:"app-container"},void 0,aT(QR,{}),aT(UI,{companyXid:this.props.companiesStore.currentXid,lastRequestSent:this.props.websocketStore.lastRequestSent,lastWebSocketMessageReceived:this.props.websocketStore.lastWebSocketMessageReceived},void 0,aT(zc,{location:this.props.location,history:this.props.history,allowOfferings:g,allowCrmFeatures:w,companies:p,lastCompanies:v.lastCompanies,finalize:v,grantAccess:h,requestAccess:!b,allowCreateCompany:!b,allowUsers:n.isSuperUser,allowPayments:!b,allowMyCompany:n.isSuperUser,allowSecurities:B,allowSetup:H,allowInvoicing:!0,usageTypeAnnualReportOnly:x,companyTypeIsSinglePersonOrIS:c,details:O,info:N,showDocumentArchive:y,showReports:N,user:n,foundationTypeCompany:l,administratorName:n.administratorName,selectedCompany:m,onArchiveUpload:(0,Q._s)(this.methods,9,this.handleUpload.bind(this)),onSelectCompany:(0,Q._s)(this.methods,1,this.selectCompany.bind(this)),refreshStateInfo:(0,Q._s)(this.methods,2,function(){return e.props.actions.fetchCompanies()}),accessObj:L}),aT(WI,{}),aT("div",{className:"app-content-container"},void 0,aT("div",{className:"app-content"},void 0,aT(SA.A,{}),aT(pA,{notify:M}),aT(o.dO,{},void 0,aT(o.qh,{path:"/:lang/2nd-window",component:MR}),!b&&aT(o.qh,{path:"/:lang/company"},void 0,aT(o.dO,{},void 0,!b&&aT(o.qh,{exact:!0,path:"/:lang/company/create",component:al}),!b&&aT(o.qh,{exact:!0,path:"/:lang/company/request-access",component:Cj}),h&&aT(o.qh,{path:"/:lang/company/grant-access",component:Pj}),!b&&aT(o.rd,{to:(0,Q.ID)("/company/create")})||aT(o.rd,{to:(0,Q.ID)()})))||null,!f&&aT(o.dO,{},void 0,aT(o.qh,{exact:!0,path:"/:lang/welcome",component:al}),aT(o.rd,{to:(0,Q.ID)("/welcome")})),aT(o.qh,{path:"/:lang/work"},void 0,aT(o.dO,{},void 0,!x&&aT(o.qh,{exact:!0,path:"/:lang/work/bank-compare",component:ml}),!x&&aT(o.qh,{exact:!0,path:"/:lang/work/bank-compare/proposals",component:BR}),!x&&aT(o.qh,{exact:!0,path:"/:lang/work/bank-compare/integration-setup",component:Lr}),aT(o.qh,{exact:!0,path:"/:lang/work/notebook",component:El}),!x&&aT(o.qh,{exact:!0,path:"/:lang/work/customers",render:function(e){return tT.createElement(Hi,rT({},e,{canEditCustomers:L.isBookkeepingCompanyEditOrInvoicing()}))}}),!x&&aT(o.qh,{exact:!0,path:"/:lang/work/suppliers",component:rl}),!x&&aT(o.qh,{exact:!0,path:"/:lang/work/products",component:Ya}),!x&&aT(o.qh,{exact:!0,path:"/:lang/work/invoicing/:xid",component:qR}),!x&&aT(o.qh,{exact:!0,path:"/:lang/work/invoicing",component:_l}),l&&aT(o.qh,{exact:!0,path:"/:lang/work/grants",component:yl}),l&&aT(o.qh,{exact:!0,path:"/:lang/work/grant/:xid?",component:$R}),l&&aT(o.qh,{exact:!0,path:"/:lang/work/decision-reference",component:Ej}),aT(o.qh,{path:"/:lang/work/ui"},void 0,z?aT(o.rd,{to:(0,Q.ID)("/archive/browse")}):aT(o.dO,{},void 0,x&&aT(o.qh,{exact:!0,path:"/:lang/work/ui",component:zl})||N&&aT(o.qh,{exact:!0,path:"/:lang/work/ui",component:Nl})||(O||k||"INVOICING"===P)&&aT(o.qh,{exact:!0,path:"/:lang/work/ui",component:Jl})||aT(o.qh,{component:al}),aT(o.qh,{},void 0,aT(o.rd,{to:(0,Q.ID)("/work/ui")})))),x&&aT(o.qh,{exact:!0,path:"/:lang/work/raw-equity",component:Ll}),B&&aT(o.qh,{exact:!0,path:"/:lang/work/securities-prices",component:Vl}),aT(o.qh,{exact:!0,path:"/:lang/work/load-from-outside/:fiscalYearXid",component:mr}
1),aT(o.rd,{to:(0,Q.ID)("INVOICING"===P?"/work/invoicing":"/work/ui")}))),aT(o.qh,{path:"/:lang/setup"},void 0,aT(o.dO,{},void 0,ss.SetupCompany.getRoute(L),ss.SetupAsset.getRoute(L),ss.SetupAssets.getRoute(L),ss.SetupLoan.getRoute(L),ss.SetupLoans.getRoute(L),ss.ProductTypes.getRoute(L),ss.FiscalYear.getRoute(L),ss.FiscalYears.getRoute(L),ss.PrivateEquities.getRoute(L),ss.PrivateEquity.getRoute(L),ss.FinanceAccounts.getRoute(L),ss.PrivateSecurities.getRoute(L),ss.PrivateSecurity.getRoute(L),ss.SuggestedSecurity.getRoute(L),ss.BasicSettings.getRoute(L),ss.InvoiceSettings.getRoute(L),ss.CategorySets.getRoute(L),ss.GrantCategories.getRoute(L),ss.CompanyAuditor.getRoute(L),ss.Procedure.getRoute(L),!H&&aT(o.rd,{to:(0,Q.ID)("/work")}),aT(o.qh,{exact:!0,path:"/:lang/setup"},void 0,aT(o.rd,{to:(0,Q.ID)("/setup/company")})),aT(o.qh,{component:RR}))),(n.administrator||!c)&&aT(o.qh,{path:"/:lang/finalize"},void 0,aT(o.dO,{},void 0,aT(o.qh,{exact:!0,path:"/:lang/finalize/specs",component:wj}),aT(o.qh,{exact:!0,path:"/:lang/finalize/finalize",component:jD}),aT(o.qh,{exact:!0,path:"/:lang/finalize/submit",component:To}),aT(o.qh,{exact:!0,path:"/:lang/finalize/ga",component:MD}),aT(o.qh,{path:"/:lang/finalize/sbmt/",component:BD}),aT(o.qh,{exact:!0,path:"/:lang/finalize/close",component:RD}),ss.BookControl.getRoute(L),aT(o.qh,{exact:!0,path:"/:lang/finalize/period",component:ha}),aT(o.qh,{component:RR}))),aT(o.qh,{path:"/:lang/archive"},void 0,aT(o.dO,{},void 0,!c&&aT(o.qh,{exact:!0,path:"/:lang/archive/annual-reports",component:Ki}),!y&&aT(o.rd,{to:(0,Q.ID)("/work")}),aT(o.qh,{exact:!0,path:"/:lang/archive/browse",component:Zi}),n.isPartOfPortfolio&&aT(o.qh,{exact:!0,path:"/:lang/archive/universal-documents",component:pa}),n.isPartOfPortfolio&&aT(o.qh,{exact:!0,path:"/:lang/archive/universal-documents/:xid",component:ua}),n.isPartOfPortfolio&&aT(o.qh,{exact:!0,path:"/:lang/archive/archive-builder",component:ta}),aT(o.qh,{exact:!0,path:"/:lang/archive/document-packages",component:la}),aT(o.qh,{exact:!0,path:"/:lang/archive/document-packages/:xid",component:oa}),aT(o.rd,{to:(0,Q.ID)("/archive/browse")}))),aT(o.qh,{exact:!0,path:"/:lang/xbrl-viewer",component:YR}),aT(o.qh,{path:"/:lang/articles"},void 0,aT(o.dO,{},void 0,aT(o.qh,{exact:!0,path:"/:lang/articles/:articleKey",component:qD}),aT(o.qh,{exact:!0,path:"/:lang/articles",component:$D}))),aT(o.qh,{path:"/:lang/account"},void 0,aT(o.dO,{},void 0,aT(o.qh,{exact:!0,path:"/:lang/account/profile",component:mC}),aT(o.qh,{exact:!0,path:"/:lang/account/password",component:dC}),aT(o.qh,{exact:!0,path:"/:lang/account/messages",component:nC}),aT(o.qh,{exact:!0,path:"/:lang/account/dpa",component:JA}),aT(o.qh,{exact:!0,path:"/:lang/account/goodbye",component:GA}),n.isSuperUser&&aT(o.qh,{exact:!0,path:"/:lang/account/my-company",component:iC}),aT(o.qh,{exact:!0,path:"/:lang/account/offerings"},void 0,g&&aT(o.qh,{component:sC})||aT(o.rd,{to:(0,Q.ID)()})),aT(o.qh,{exact:!0,path:"/:lang/account/partnercrm"},void 0,w&&aT(o.qh,{component:E})||aT(o.rd,{to:(0,Q.ID)()})),aT(o.qh,{exact:!0,path:"/:lang/account/shoppingbasket",component:OC}),aT(o.qh,{exact:!0,path:"/:lang/account/shoppingbasket/checkout/:basketXid",component:HC}),n.isSuperUser&&aT(o.qh,{exact:!0,path:"/:lang/account/users",component:tj}),n.isSuperUser&&aT(o.qh,{exact:!0,path:"/:lang/account/templates",component:$C}),n.isSuperUser&&aT(o.qh,{exact:!0,path:"/:lang/account/templates/:xid?",component:JC}),n.isSuperUser&&aT(o.qh,{exact:!0,path:"/:lang/account/users/createoreditauditor",component:VA})," ",n.isSuperUser&&aT(o.qh,{exact:!0,path:"/:lang/account/users/:xid?",component:bj}),n.isSuperUser&&aT(o.qh,{exact:!0,path:"/:lang/account/customers",component:WA}),(n.isSuperUser||n.isPartOfPortfolio)&&aT(o.qh,{exact:!0,path:"/:lang/account/chart-of-accounts",component:DA}),(n.isSuperUser||n.isPartOfPortfolio)&&aT(o.qh,{exact:!0,path:"/:lang/account/arsetup",component:AA}),aT(o.rd,{to:(0,Q.ID)("/account/profile")}))),aT(o.qh,{path:"/:lang/design"},void 0,aT(o.dO,{},void 0,aT(o.qh,{exact:!0,path:"/:lang/design/:xid?",component:Dn}))),aT(o.qh,{path:"/:lang/automation"},void 0,aT(o.dO,{},void 0,aT(o.qh,{exact:!0,path:"/:lang/automation/exchange-rates",component:Xi}),!x&&aT(o.qh,{exact:!0,path:"/:lang/automation/sent-mails",component:Ui}),aT(o.qh,{exact:!0,path:"/:lang/automation/integrations",component:xa}),aT(o.qh,{path:"/:lang/automation/integration/:integration",component:DR}
1),aT(o.qh,{exact:!0,path:"/:lang/automation/migrate-from-other-system",component:Da}),aT(o.qh,{exact:!0,path:"/:lang/automation/export",component:AD}),aT(o.qh,{exact:!0,path:"/:lang/automation/saft-files",component:Qa}),ss.SAFTncoming.getRoute(L),aT(o.rd,{to:(0,Q.ID)("/mymagic/types")}))),aT(o.qh,{path:"/:lang/mymagic"},void 0,aT(o.dO,{},void 0,!x&&aT(o.qh,{exact:!0,path:"/:lang/mymagic/types",component:Fo}),!x&&aT(o.qh,{exact:!0,path:"/:lang/mymagic/type/:id?/:xid?",component:Oj}),aT(o.rd,{to:(0,Q.ID)("/mymagic/types")}))),aT(o.qh,{path:OA("lang"),component:xA}),(n.isSuperUser||g||w)&&aT(o.qh,{path:"/:lang/dashboard",component:_j}),aT(o.rd,{to:(0,Q.ID)("INVOICING"===P?"/work/invoicing":"/work/ui")})),aT(nA,{busy:T,disconnected:F,isPortfolioUser:n.isPartOfPortfolio,serverId:n.serverRunningId,lastWebSocketMessageReceived:this.props.websocketStore.lastWebSocketMessageReceived,lastRequestSent:this.props.websocketStore.lastRequestSent,onReport:(0,Q._s)(this.methods,12,this.handleReport.bind(this))}),aT(Gr,{}),aT(gn.A,{show:A,title:I18n.translate("access.change.title"),noCancelBtn:!0,submitBtnText:I18n.translate("ok"),onSubmit:(0,Q._s)(this.methods,5,this.refreshState.bind(this)),onHide:(0,Q._s)(this.methods,5,this.refreshState.bind(this))},void 0,I18n.translate("access.change.info")),aT(gn.A,{title:I18n.translate("error.conflict.title"),show:j,submitBtnText:I18n.translate("ok"),noCancelBtn:!0,onHide:(0,Q._s)(this.methods,6,function(){return e.setState({entityChanged:!1})}),onSubmit:(0,Q._s)(this.methods,6,function(){return e.setState({entityChanged:!1})})},void 0,I18n.translate("error.conflict.message")),aT(gn.A,{title:I18n.translate("error.selection.changed.title"),show:C,submitBtnText:I18n.translate("ok"),noCancelBtn:!0,onHide:(0,Q._s)(this.methods,7,function(){return e.setState({companyChanged:!1},e.props.actions.fetchCompanies)}),onSubmit:(0,Q._s)(this.methods,7,function(){return e.setState({companyChanged:!1},e.props.actions.fetchCompanies)})},void 0,I18n.translate("error.selection.changed.message")),aT(gn.A,{show:_,submitBtnText:I18n.translate("ok"),onHide:t,onSubmit:t,noCancelBtn:!0},void 0,"Thanks for reporting an issue, report was successfully sent!"),aT(gA,{show:R,showTransactionsShortCuts:/\/work\/ui$/.test(this.props.location.pathname)&&(!(O||N)||f.auditorTransactionsAllowed),allowInvoicing:!0,usageTypeAnnualReportOnly:x,excludeTypes:this.props.defaultStore.excludeTransactionTypeIds,haveCompanies:S,haveSetup:H,haveWork:H,haveFinalize:!(O||N)&&S,haveArchive:y,onHide:(0,Q._s)(this.methods,11,function(){return e.setState({showShortCuts:!1})})})),aT(i.N9,{position:"top-center",autoClose:!1,newestOnTop:!1,closeOnSelect:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!1,transition:i.q7,bodyStyle:{color:"black"}})))),!(0,Q.wz)(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=""===e?"":e.startsWith("/")?e:"/".concat(e);return(0,Q.ID)("/".concat(kA).concat(t))}())&&!(0,Q.wz)((0,Q.ID)("/2nd-window"))&&aT(fx,{usageTypeAnnualReportOnly:x,companyTypeIsSinglePerson:s,companyTypeIsSinglePersonOrIS:c,accessObj:L}),this.props.runGuide&&aT(KP,{}))}}],[{key:"parseMessage",value:function(e){try{return JSON.parse(e)}catch(e){eT.captureError(e,{code:Z.qL})}return null}}])}(r.Component)},31408(e,t,n){var r=/^-?\d*\.?\d{0,2}$/,o=/^-?\d{1,3}(\.\d{3})*,\d{0,2}$/,i=/^-?\d{1,3}(\.\d{3})*$/,a=/^-?\d+,\d{1,2}$/;const l=function(e){var t=e.toString(),n=r.test(t),l=o.test(t),s=i.test(t),c=a.test(t);return{valid:n||l||""===t||s||c,message:I18n.translate("work.edit.validate.numeric.max2decimals")}};n.d(t,["A",0,l])},62288(e,t,n){var r=n(91505),o=n(68388),i=n(44918),a=n(83331);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}const d=function(){var e={thousandsSeparator:".",decimalSeparator:","},t={enabled:!0,inclusive:!1,min:0,message:I18n.translate("work.edit.validate.numeric.negative")},n={enabled:!0,inclusive:!1,max:0,message:I18n.translate("work.edit.validate.numeric.positive")},l={enabled:!0,message:I18n.translate("work.edit.validate.numeric.missing")},c={enabled:!0,trim:!0,max:25,message:I18n.translate("work.edit.validate.numeric.strlength")};return{validate:function(d){var f=d.value,p=d.options,m=void 0===p?{}:p,v=m.forbidNegative,h=m.forbidPositive,y=m.forbidDecimals,b=m.max,g=void 0===b?1/0:b,w=m.maxMessage,S=m.min,k=void 0===S?-1/0:S,O=m.minMessage,N=m.required,x=m.stringLength,P=m.message,I=m.noZero,A=void 0!==I&&I,C=m.checkNaN,j=void 0!==C&&C,D=v&&("object"===u(v)&&s(s({},t),v)||t)||null,_=h&&("object"===u(h)&&s(s({},n),h)||n)||null,R=N&&("object"===u(N)&&s(s({}
1,l),N)||l)||null,T=x&&("object"===u(x)&&s(s({},c),x)||c)||null,E=[],M=a.j.stringToNumber(f),F="string"==typeof g?a.j.stringToNumber(g):g,z="string"==typeof k?a.j.stringToNumber(k):k,B=s(s({},e),y?{decimalSeparator:""}:{}),H=(0,o.A)().validate({value:f,options:B}),L=(0,o.A)().validate({value:f,options:s(s({},B),{},{thousandsSeparator:""})});return E.push({valid:H.valid||L.valid,message:P||I18n.translate(y?"work.edit.validate.numeric.int":"work.edit.validate.numeric.format")}),isFinite(F)&&isFinite(z)&&(M>F||M<z)?E.push({valid:!1,message:I18n.translate("work.edit.validate.numeric.range",z,F)}):M>F?E.push({valid:!1,message:I18n.translate(w||"work.edit.validate.numeric.max",F)}):M<z&&E.push({valid:!1,message:I18n.translate(O||"work.edit.validate.numeric.min",z)}),R&&R.enabled&&E.push(s(s({},(0,r.A)().validate({value:f,options:R})),{},{message:R.message})),j&&E.push({valid:!isNaN(f),message:I18n.translate("work.edit.validate.numeric.int")}),A&&E.push({valid:0!==M,message:I18n.translate("work.edit.validate.numeric.noZero")}),D&&D.enabled&&E.push({valid:void 0===M||M>=0,message:D.message}),_&&_.enabled&&E.push({valid:void 0===M||M<=0,message:_.message}),T&&T.enabled&&E.push(s(s({},(0,i.A)().validate({value:String(f||""),options:T})),{},{message:T.message})),E.find(function(e){return!e.valid})||{valid:!0}}}};n.dn(d),n.d(t,["A",0,d])},32686(e,t,n){var r=n(44918);const o=function(e){return function(t){return{valid:!t||(0,r.A)().validate({value:t,options:{max:e}}).valid,message:I18n.translate("validation.max",e)}}};n.dn(o),n.d(t,["A",0,o])}}]);

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.