1"use strict";(self.webpackChunkportfoliodesign=self.webpackChunkportfoliodesign||[]).push([[5310],{4441(e,t,n){n.d(t,{Io:()=>u,Um:()=>a,W9:()=>d,nT:()=>s,t:()=>l,tf:()=>o,vr:()=>c});var r=n(20212),i=n(51470);function o(e){return(0,r.RD)(i.tIU,{method:"post",data:{companyXid:e}})}function a(e){var t=e.companyXid,n=e.xid;return(0,r.RD)(i.R1n,{method:"post",data:{companyXid:t,xid:n}})}function u(e){var t=e.companyXid,n=e.xid;return(0,r.RD)(i.xT9,{method:"post",data:{companyXid:t,xid:n}})}function s(e){var t=e.companyXid,n=e.securityDataList;return(0,r.RD)(i.xx$,{method:"post",data:{companyXid:t,securityDataList:n}})}function c(e){var t=e.companyXid,n=e.securityDataList;return(0,r.RD)(i.Rzu,{method:"post",data:{companyXid:t,securityDataList:n}})}function l(e,t,n){return(0,r.RD)(i.miW,{method:"post",ignoreStatus:[412],data:{xid:t,companyXid:e,reallyDelete:n}})}function d(e){var t=e.file,n=e.companyXid;return(0,r.RD)(i.FFx,{method:"post",data:{file:t,companyXid:n},genericErrorHandling:!0},!0)}},20427(e,t,n){n.d(t,{Hb:()=>a,WW:()=>d,do:()=>o,m4:()=>l,qk:()=>u,rB:()=>s,rv:()=>c});var r=n(20212),i=n(51470);function o(e){var t=e.term,n=e.securityXid;return(0,r.RD)(i.PMO,{method:"post",data:{term:t,securityXid:n}})}function a(e){var t=e.xid,n=e.id;return(0,r.RD)(i.Lkw,{method:"post",data:{xid:t,id:n}})}function u(e){return(0,r.RD)(i.i6m,{method:"post",data:e})}function s(e){return(0,r.RD)(i.aSv,{method:"post",data:{companyXid:e}})}function c(e,t){return(0,r.RD)(i.DHj,{method:"post",data:{companyXid:e,acceptSecurityFixesNeeded:t}})}function l(e,t){return(0,r.RD)(i.jtC,{method:"post",data:{companyXid:e,fixNeeded:t}})}function d(e,t,n,o,a){return(0,r.RD)(i.Xtu,{method:"post",data:{companyXid:e,fixNeededId:t,securityMatch:n,fixImproveOtherSecurityXid:o,fixImproveType:a}})}},17168(e,t,n){n.d(t,{EJ:()=>v,FZ:()=>u,Fx:()=>y,Gj:()=>l,VE:()=>m,VG:()=>c,Yx:()=>a,c_:()=>h,jr:()=>p,ld:()=>d,q1:()=>f,y6:()=>s});var r=n(20212),i=n(14670),o=n(51470);function a(e){var t=e.date,n=e.companyXid;return(0,r.RD)(o.Nai,{method:"post",data:{date:t,companyXid:n}})}function u(e,t,n){return(0,r.RD)(o.kHJ,{method:"post",data:{file:e,depositoryXid:t,companyXid:n},ignoreStatus:[i.BR]},!0)}function s(e){var t=e.date,n=e.prices,a=e.companyXid;return(0,r.RD)(o.EfV,{method:"post",queryData:{date:t,companyXid:a},data:{prices:n},ignoreStatus:[i.BR]})}function c(e){return(0,r.RD)(o.Cqi,{method:"post",data:{companyXid:e}})}function l(e){var t=e.date,n=e.prices,i=e.companyXid;return(0,r.RD)(o.RmY,{method:"post",queryData:{date:t,companyXid:i},data:{prices:n}})}function d(e,t,n){return(0,r.RD)(o.LLs,{method:"post",data:{term:e,securityType:t,securityXid:n}})}function f(e,t){return(0,r.RD)(o.QfZ,{method:"post",queryData:{companyXid:e,securityCreateId:t}})}function y(e){var t=e.companyXid,n=e.createSecurityId,i=e.type,a=e.name,u=e.isin,s=e.symbol,c=e.country,l=e.currency;return(0,r.RD)(o.yRK,{method:"post",data:{companyXid:t,createSecurityId:n,type:i,name:a,isin:u,symbol:s,country:c,currency:l}})}function m(e){var t=e.companyXid,n=e.depositoryName,i=e.lookupDate;return(0,r.RD)(o.MdW,{method:"post",data:{companyXid:t,depositoryName:n,lookupDate:i}})}function p(e){var t=e.companyXid,n=e.securityXid,i=e.nameToAddAsAlternative,a=e.securityToDoXid;return(0,r.RD)(o.Z2c,{method:"post",data:{companyXid:t,securityXid:n,nameToAddAsAlternative:i,securityToDoXid:a}})}function v(e){var t=e.companyXid,n=e.securityXid,i=e.comment;return(0,r.RD)(o._Q5,{method:"post",data:{companyXid:t,securityXid:n,comment:i}})}function h(e){var t=e.companyXid,n=e.suggestSymbol,i=e.suggestIsin,a=e.suggestTaxCountry,u=e.suggestNameFromIsin;return(0,r.RD)(o.Cp6,{method:"post",data:{companyXid:t,suggestSymbol:n,suggestIsin:i,suggestTaxCountry:a,suggestNameFromIsin:u}})}}
1,58446(e,t,n){var r,i=n(96540),o=n(42845),a=n.n(o),u=n(37995),s=n.n(u),c=n(36893);function l(e,t,n,i){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=i;else if(a>1){for(var u=Array(a),s=0;s<a;s++)u[s]=arguments[s+3];t.children=u}if(t&&o)for(var c in o)void 0===t[c]&&(t[c]=o[c]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const d=function(e){var t=e.dropzoneOpen,n=e.uploadFile,r=e.dropzonePlaceholderKey,o=e.explainTextKey,u=e.sampleFiles;return t&&l(i.Fragment,{},void 0,l("h5",{className:"mb-2"},void 0,I18n.translate("import.from.file")),l(s(),{},void 0,l(a(),{sm:8},void 0,l("div",{className:"card mb-2"},void 0,l("div",{className:"card-body"},void 0,l(c.m,{className:"transparent import-file-module-dropzone",placeholder:I18n.translate(r),onFileAdded:function(e){return n(e)},disablePreview:!0,useMoreSpacing:!0})))),l(a(),{sm:4},void 0,l("div",{className:"import-file-form__info mb-2 p-1"},void 0,l("h6",{},void 0,I18n.translate("work.edit.import.explain.title")),l("ul",{},void 0,l("li",{},void 0,I18n.translate(o)))),l("div",{className:"import-file-form__info p-1"},void 0,l("h6",{},void 0,I18n.translate("work.edit.import.samples.title")),l("ul",{},void 0,u.map(function(e){return l("li",{className:"mb-1"},e.uri,l("a",{href:e.uri,download:!0},void 0,I18n.translate(e.translationKey)))}))))))};n.d(t,["A",0,d])},37942(e,t,n){n(96540);var r,i=n(80057);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 a(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?a(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(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"!=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+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t,n,i){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=i;else if(a>1){for(var u=Array(a),s=0;s<a;s++)u[s]=arguments[s+3];t.children=u}if(t&&o)for(var c in o)void 0===t[c]&&(t[c]=o[c]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}const l=function(e){var t=e.columns,n=e.data,r=e.loading,o=void 0!==r&&r,a=e.emptyMessage,s=void 0===a?I18n.translate("securities.no.filter"):a;return c("table",{className:"compact-table"},void 0,c("thead",{},void 0,c("tr",{},void 0,t.map(function(e){return c("th",{style:{flex:e.size||1,minWidth:e.minWidth},className:"compact-table-head-cell"},e.accessorKey,e.header)}))),c("tbody",{},void 0,o&&c("tr",{},void 0,c("td",{colSpan:t.length,className:"text-center"},void 0,c(i.A,{}))),!o&&!n.length&&c("tr",{},void 0,c("td",{colSpan:t.length,className:"text-center"},void 0,s)),n.map(function(e){return c("tr",{},e.uuid,t.map(function(t){var n=!1;return"function"==typeof t.locked?n=t.locked(e):"boolean"==typeof t.locked&&(n=t.locked),c("td",{style:u(u({},t.customStyles||{}),{},{flex:t.size||1,minWidth:t.minWidth}),className:"compact-table-cell ".concat(n?"locked":"")},t.accessorKey,t.Cell?t.Cell(e):c("span",{},void 0,e[t.accessorKey]))}))})))};n.d(t,["A",0,l])},65310(e,t,n){n.r(t),n.d(t,{PrivateSecuritiesPage:()=>Xe,default:()=>je});var r,i=n(38221),o=n.n(i),a=n(96540),u=n(4441),s=n(20427),c=n(17168),l=n(80057),d=n(42845),f=n.n(d),y=n(786),m=n.n(y),p=n(22495),v=n.n(p),h=n(87195),b=n.n(h),g=n(37995),S=n.n(g),x=n(58776),w=n.n(x),I=n(13545),O=n(27545),C=n(199);function k(e,t,n,i){r||(r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var o=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),1===a)t.children=i;else if(a>1){for(var u=Array(a),s=0;s<a;s++)u[s]=arguments[s+3];t.children=u}if(t&&o)for(var c in o)void 0===t[c]&&(t[c]=o[c]);else t||(t=o||{});return{$$typeof:r,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;
1!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(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 A=function(e){var t=e.item,n=e.alternativeName,r=e.onAddAlternative,i=e.onSendMessage,o=e.onNavigate,u=e.onDelete,s=e.isPrivate,c=e.withoutDropdownMenu,l=N((0,a.useState)(!1),2),d=l[0],y=l[1],p=N((0,a.useState)(""),2),h=p[0],g=p[1],x=N((0,a.useState)(!1),2),P=x[0],A=x[1],T=function(){y(function(e){return!e}),s&&o(t)},D=(0,C.zj)(),X=t.name2&&t.name3?"".concat(t.name2,", ").concat(t.name3):t.name2||t.name3||"",j=k(w(),{id:"tooltip".concat(t.id)},void 0,X),F=!c;return k(a.Fragment,{},void 0,k("tr",{className:"cursor-pointer",tabIndex:0,onClick:T},t.id,t.name2||t.name3?k(b(),{placement:"top",overlay:j},void 0,k("td",{},void 0,t.name)):k("td",{},void 0,t.name),k("td",{},void 0,(D.find(function(e){return e.value===t.type})||{}).text),k("td",{},void 0,t.country),k("td",{},void 0,t.currency),k("td",{},void 0,t.symbol),k("td",{},void 0,t.interest),k("td",{},void 0,t.isin),k("td",{onClick:function(e){return e.stopPropagation()},onKeyPress:function(e){return e.stopPropagation()}},void 0,F?k(m(),{id:"".concat(t.xid,"-actions"),bsStyle:"default",bsSize:"sm",title:k(I.h,{className:"phi phi-1_6x","aria-label":"Actions"}),className:"btn btn-default",type:"button",noCaret:!0,pullRight:!0},void 0,k(v(),{onClick:T},void 0,I18n.translate("editview")),F&&k(v(),{onSelect:function(){u({securityXid:t.xid,reallyDelete:!1,onSuccess:function(){A(function(e){return!e})}})}},void 0,I18n.translate("button.delete.dialog"))):k("div",{style:{width:28}}))),d&&k("tr",{},void 0,k("td",{colSpan:8},void 0,k(S(),{},void 0,k(f(),{sm:4},void 0,X.length?k("p",{},void 0,k("label",{},void 0,I18n.translate("securities.alternatives"),": "),X):null,n?k("button",{className:"btn btn-link space-bottom",onClick:function(){return r(t)}},void 0,I18n.translate("securities.add.alternative",n)):null),k(f(),{sm:4},void 0,k("label",{htmlFor:"".concat(t.id,"-chat")},void 0,I18n.translate("securities.send.header")),k("div",{className:"chat"},void 0,k("div",{className:"chat-actions"},void 0,k("textarea",{id:"".concat(t.id,"-chat"),className:"form-control",value:h,onChange:function(e){g(e.target.value)}}),k("button",{className:"btn btn-primary",disabled:!h.trim().length,onClick:function(){i(t,h),g("")}},void 0,k("i",{className:"fa fa-send-o space-right","aria-hidden":"true"}),I18n.translate("securities.send.comment")))))))),k(O.A,{show:P,title:I18n.translate("security.delete"),onSubmit:function(){A(function(e){return!e}),u({securityXid:t.xid,reallyDelete:!0})},onHide:function(){return A(!1)},submitBtnText:I18n.translate("yes.delete"),noCancelBtn:!1},void 0,k("span",{},void 0,I18n.translate("security.delete.confirm"))))};var T,D=["loading","data","isPrivate","hasAnySecurities","onNavigate","onDelete","withoutDropdownMenu"];function X(e,t,n,r){T||(T="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+3];t.children=a}if(t&&i)for(var s in i)void 0===t[s]&&(t[s]=i[s]);else t||(t=i||{});return{$$typeof:T,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}var j=function(e){var t=e.loading,n=void 0!==t&&t,r=e.data,i=void 0===r?[]:r,o=e.isPrivate,a=void 0!==o&&o,u=e.hasAnySecurities,s=void 0!==u&&u,c=e.onNavigate,d=void 0===c?function(){}:c,f=e.onDelete,y=void 0===f?function(){}:f,m=e.withoutDropdownMenu,p=void 0!==m&&m,v=function(e,t){if(null==e)return{};var n,r,i=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 o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,D),h=v.alternativeName,b=v.onAddAlternative,g=v.onSendMessage;return X("table",{className:"table-st table-st__v2",cellPadding:"0",cellSpacing:"0"},void 0,X("thead",{className:"table-st__head"},void 0,X("tr",{},void 0,X("th",{width:"23%"},void 0,I18n.translate("securities.name")),X("th",{width:"12%"},void 0,I18n.translate("securities.type")),X("th",{width:"12%"},void 0,I18n.translate("securities.taxcountry")),X("th",{width:"12%"},void 0,I18n.translate("securities.currency")),X("th",{width:"12%"},void 0,I18n.translate("securities.symbol")),X("th",{width:"12%"},void 0,I18n.translate("securities.interest")),X("th",{width:"14%"},void 0,I18n.translate("valuations.isin")),X("th",{width:"3%"}))),X("tbody",{className:"table-st__body"},void 0,n&&X("tr",{},void 0,X("td",{colSpan:8,className:"text-center"},void 0,X(l.A,{}
1))),!n&&!i.length&&X("tr",{},void 0,X("td",{colSpan:8,className:"text-center"},void 0,I18n.translate(s?"securities.no.filter":"securities.none"))),i.map(function(e){return X(A,{item:e,alternativeName:h,onAddAlternative:b,onSendMessage:g,onNavigate:d,isPrivate:a,onDelete:y,withoutDropdownMenu:p},e.id)})))},F=n(54739),R=n(45215),E=n(58446);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 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,_(r.key),r)}}function K(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function L(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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+""}var z=K(function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),L(this,"id",null),L(this,"xid",null),L(this,"country",null),L(this,"currency",null),L(this,"interest",null),L(this,"name",null),L(this,"name2",null),L(this,"name3",null),L(this,"name4",null),L(this,"name5",null),L(this,"name6",null),L(this,"name7",null),L(this,"symbol",null),L(this,"type",null),L(this,"isin",null),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("country"))&&(this.country=t.country),(n||t.hasOwnProperty("currency"))&&(this.currency=t.currency),(n||t.hasOwnProperty("interest"))&&(this.interest=t.interest),(n||t.hasOwnProperty("name"))&&(this.name=t.name),(n||t.hasOwnProperty("name2"))&&(this.name2=t.name2),(n||t.hasOwnProperty("name3"))&&(this.name3=t.name3),(n||t.hasOwnProperty("name4"))&&(this.name3=t.name3),(n||t.hasOwnProperty("name5"))&&(this.name3=t.name3),(n||t.hasOwnProperty("name6"))&&(this.name3=t.name3),(n||t.hasOwnProperty("name7"))&&(this.name3=t.name3),(n||t.hasOwnProperty("symbol"))&&(this.symbol=t.symbol),(n||t.hasOwnProperty("type"))&&(this.type=t.type),(n||t.hasOwnProperty("isin"))&&(this.isin=t.isin)}});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 q(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 $(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e,t,n){return(t=U(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(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+""}var V,G,J=$(function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),H(this,"id",""),H(this,"securityMatch",""),H(this,"securityName",""),H(this,"isin",""),H(this,"symbol",""),H(this,"dkFondskode",""),H(this,"securityTypeCode",""),H(this,"countryCode",""),H(this,"currencyCode",""),H(this,"nonPublic",!1),H(this,"interest",""),H(this,"usesIndexFaktor",!1),H(this,"fixImproveType",null),H(this,"fixImproveMessage",null),H(this,"fixImproveOtherSecurityXid",0),H(this,"fixImproveModalOpen",!1),t&&(t.hasOwnProperty("id")&&(this.id=t.id),t.hasOwnProperty("securityMatch")&&(this.securityMatch=t.securityMatch),t.hasOwnProperty("securityName")&&(this.securityName=t.securityName),t.hasOwnProperty("isin")&&(this.isin=t.isin),t.hasOwnProperty("symbol")&&(this.symbol=t.symbol),t.hasOwnProperty("dkFondskode")&&(this.dkFondskode=t.dkFondskode),t.hasOwnProperty("securityTypeCode")&&(this.securityTypeCode=t.securityTypeCode),t.hasOwnProperty("countryCode")&&(this.countryCode=t.countryCode),t.hasOwnProperty("currencyCode")&&(this.currencyCode=t.currencyCode),t.hasOwnProperty("nonPublic")&&(this.nonPublic=t.nonPublic),t.hasOwnProperty("interest")&&(this.interest=t.interest),t.hasOwnProperty("usesIndexFaktor")&&(this.usesIndexFaktor=t.usesIndexFaktor),t.hasOwnProperty("fixImproveType")&&(this.fixImproveType=t.fixImproveType),t.hasOwnProperty("fixImproveMessage")&&(this.fixImproveMessage=t.fixImproveMessage),t.hasOwnProperty("fixImproveOtherSecurityXid")&&(this.fixImproveOtherSecurityXid=t.fixImproveOtherSecurityXid),t.hasOwnProperty("fixImproveModalOpen")&&(this.fixImproveModalOpen=t.fixImproveModalOpen))}),Z=n(48127),Q=n(62288),Y=n(48700),ee=n(3373),te=n(44918),ne=n(88482),re=n.n(ne),ie=n(37942),oe=n(76312);function ae(e,t,n,r){V||(V="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+3];t.children=a}if(t&&i)for(var s in i)void 0===t[s]&&(t[s]=i[s]);else t||(t=i||{});return{$$typeof:V,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ue(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;
1!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return se(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)?se(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 se(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 ce(e){var t=e.row,n=e.filteredSecurities,r=e.companyStore,i=e.loadFixesNeeded,o=e.defaultStore,u=ue((0,a.useState)(!1),2),c=u[0],d=u[1],f=ue((0,a.useState)(!1),2),y=f[0],m=f[1],p=ue((0,a.useState)(null),2),v=p[0],h=p[1],b=function(){m(!1),d(!1),h(null)},g=n.find(function(e){return e.xid===t.fixImproveOtherSecurityXid});return t.fixImproveType?ae("div",{},void 0,ae("button",{onClick:function(){m(!0)},className:"btn btn-action-primary nofill",style:{marginLeft:"auto",marginRight:"auto",display:"flex",justifyContent:"center",alignItems:"center"}},void 0,ae(oe.h,{fontSize:14})),ae(O.A,{title:ae("span",{},void 0,I18n.translate("improve.".concat(t.fixImproveType))," ",ae(oe.h,{fontSize:14})),show:y,onHide:function(){return b()},cancelBtnText:I18n.translate("button.close"),submitBtnText:c?ae(l.A,{}):"Fix",onSubmit:function(){d(!0),(0,s.WW)(r.currentXid,t.id,t.securityMatch,t.fixImproveOtherSecurityXid,t.fixImproveType).then(function(){b(),h(null),i()}).catch(function(){h("Kunne ikke udføre opgaven. Kontakt venligst Multi-Regnskab support.")}).finally(function(){d(!1)})}},void 0,ae("div",{style:{whiteSpace:"pre-line",marginBottom:"10px"}},void 0,t.fixImproveMessage),g?ae("div",{style:{marginBottom:"10px"}},void 0,ae("div",{},void 0,I18n.translate("securities.type"),":",ae("b",{},void 0," ","BOND"===g.securityTypeCode?I18n.translate("create.security.label.type.BOND"):I18n.translate("create.security.label.type.STOCK"))),ae("div",{},void 0,I18n.translate("security.names"),": ",ae("b",{},void 0,g.name),ae("b",{},void 0,[g.name2,g.name3,g.name4,g.name5,g.name6,g.name7].filter(Boolean).map(function(e){return ae("div",{style:{marginLeft:"57px"}},e,e,ae("br",{}))}))),ae("div",{},void 0,"ISIN:",ae("b",{},void 0," ",g.isin)),ae("div",{},void 0,I18n.translate("securities.taxcountry"),":",ae("b",{},void 0," ",o.countries[g.country])),ae("div",{},void 0,I18n.translate("securities.currency"),":",ae("b",{},void 0," ",g.currency)),ae("div",{},void 0,I18n.translate("securities.symbol"),":",ae("b",{},void 0," ",g.symbol))):null,"ADD_MATCH_TO_EXISTING"===t.fixImproveType&&ae("div",{},void 0,ae("div",{},void 0,"Hvis der er tale om samme papir så skal navnet '",t.securityName,"' tilføjes som alternativt navn til det allerede oprettede papir. Dette kan gøres med 'Fix' knappen nedenfor.")),v&&ae("div",{className:"text-danger"},void 0,v))):null}function le(e,t,n,r){G||(G="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+3];t.children=a}if(t&&i)for(var s in i)void 0===t[s]&&(t[s]=i[s]);else t||(t=i||{});return{$$typeof:G,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function de(e){var t=e.fixesNeeded,n=e.selectedFixesNeeded,r=e.allFixesNeededSelected,i=e.handleCheckFixesNeeded,o=e.handleCheckAllFixesNeeded,u=e.handleUpdateFixesNeeded,s=e.defaultStore,c=e.disabled,l=void 0!==c&&c,d=e.validators,f=e.loading,y=void 0!==f&&f,m=e.filteredSecurities,p=void 0===m?[]:m,v=e.companyStore,h=e.loadFixesNeeded,b=void 0===h?function(){}:h,g=(0,a.useRef)({}),S=(0,a.useRef)({}),x=[{value:"BOND",text:I18n.translate("create.security.label.type.BOND")},{value:"STOCK",text:I18n.translate("create.security.label.type.STOCK")}],w=(0,a.useMemo)(function(){return[{accessorKey:"selected",header:le("div",{className:"fix-needed-checkbox"},void 0,le(re(),{checked:r,onChange:function(e){return o(e.target.checked)},disabled:y||0===t.length})),size:45,minWidth:"50px",Cell:function(e){return le("div",{className:"fix-needed-checkbox"},void 0,le(re(),{checked:(t=e,!!n&&n.has(t.id)),onChange:function(t){return i(e,t.target.checked)},disabled:y}));var t}},{accessorKey:"fixImproveType",header:"",size:45,minWidth:"50px",Cell:function(e){return le(ce,{row:e,filteredSecurities:p,c
1ompanyStore:v,defaultStore:s,loadFixesNeeded:b})}},{accessorKey:"securityMatch",header:"Match",size:70,minWidth:"100px",customStyles:{padding:"4px"},locked:!0},{accessorKey:"securityName",header:I18n.translate("securities.name"),size:100,minWidth:"100px",Cell:function(e){return a.createElement(F.x,{id:"security-name-".concat(e.uuid),key:"security-name-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-1"),value:e.securityName,validators:d.securityName,disabled:l,onChange:function(t){return u(e.uuid,"securityName",t)},hideLoading:!0})}},{accessorKey:"securityTypeCode",header:I18n.translate("securities.type"),size:100,minWidth:"118px",Cell:function(e){return a.createElement(R.X,{id:"security-type-".concat(e.uuid),key:"security-type-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-2"),value:e.securityTypeCode,options:x,validators:d.securityTypeCode,disabled:l,onChange:function(t){"BOND"===t?u(e.uuid,"nonPublic",!1):(u(e.uuid,"interest","0"),u(e.uuid,"usesIndexFaktor",!1)),u(e.uuid,"securityTypeCode",t)},customStyles:{marginLeft:"7px"},hideLoading:!0})}},{accessorKey:"countryCode",header:I18n.translate("securities.taxcountry"),size:70,minWidth:"107px",Cell:function(e){return a.createElement(R.X,{id:"security-taxcountry-".concat(e.uuid),key:"security-taxcountry-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-3"),value:e.countryCode,options:s.countries,validators:d.countryCode,disabled:l,onChange:function(t){return u(e.uuid,"countryCode",t)},customStyles:{marginLeft:"7px"},hideLoading:!0})}},{accessorKey:"currencyCode",header:I18n.translate("securities.currency"),size:50,minWidth:"81px",Cell:function(e){return a.createElement(R.X,{id:"security-currency-".concat(e.uuid),key:"security-currency-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-4"),value:e.currencyCode,options:s.currencies,validators:d.currencyCode,disabled:l,onChange:function(t){return u(e.uuid,"currencyCode",t)},customStyles:{marginLeft:"7px"},hideLoading:!0})}},{accessorKey:"symbol",header:I18n.translate("securities.symbol"),size:70,minWidth:"80px",Cell:function(e){return a.createElement(F.x,{id:"security-symbol-".concat(e.uuid),key:"security-symbol-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-5"),value:e.symbol,validators:d.symbol,disabled:l,onChange:function(t){return u(e.uuid,"symbol",t)},hideLoading:!0})}},{accessorKey:"interest",header:I18n.translate("securities.interest"),size:60,minWidth:"65px",Cell:function(e){return"BOND"!=e.securityTypeCode?le("span",{}):a.createElement(F.x,{id:"security-interest-".concat(e.uuid),key:"security-interest-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-8"),value:e.interest,validators:d.interest,disabled:"BOND"!=e.securityTypeCode,onChange:function(t){return u(e.uuid,"interest",t)},customStyles:{maxWidth:"65px"},hideLoading:!0})},locked:function(e){return"BOND"!=e.securityTypeCode}},{accessorKey:"usesIndexFaktor",header:"Bruger indeksfaktor",size:50,minWidth:"60px",Cell:function(e){return le(re(),{className:"center",style:{display:"flex",justifyContent:"center"},checked:e.usesIndexFaktor,disabled:"BOND"!=e.securityTypeCode,onChange:function(t){return u(e.uuid,"usesIndexFaktor",t.target.checked)}})},locked:function(e){return"BOND"!=e.securityTypeCode}},{accessorKey:"nonPublic",header:"Unoteret",size:50,minWidth:"60px",Cell:function(e){return le(re(),{className:"center",style:{display:"flex",justifyContent:"center"},checked:e.nonPublic,disabled:"STOCK"!=e.securityTypeCode,onChange:function(t){return u(e.uuid,"nonPublic",t.target.checked)}})},locked:function(e){return"STOCK"!=e.securityTypeCode}},{accessorKey:"isin",header:I18n.translate("valuations.isin"),size:100,minWidth:"100px",Cell:function(e){return a.createElement(F.x,{id:"security-isin-".concat(e.uuid),key:"security-isin-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-6"),value:e.isin,validators:d.isin,disabled:l,onChange:function(t){return u(e.uuid,"isin",t)},hideLoading:!0})}},{accessorKey:"dkFondskode",header:I18n.translate("create.security.label.fondskode"),size:100,minWidth:"80px",Cell:function(e){return a.createElement(F.x,{id:"security-dkFondskode-".concat(e.uuid),key:"security-dkFondskode-".concat(e.uuid),ref:(0,ee.qP)(S.current,g.current,e.id+"-7"),value:e.dkFondskode,validators:d.dkFondskode,disabled:l,onChange:function(t){return u(e.uuid,"dkFondskode",t)},hideLoading:!0})}}]},[s.countries,s.currencies,t.length,r,i,o,u,n,l,y]);return(0,a.useEffect)(function(){var e=setTimeout(function(){t.forEach(function(e){var t=g.current[e.id+"-1"];t&&t.reValidate&&t.reValidate()})},0);return function(){return clearTimeout(e)}},[t]),le(ie.A,{columns:w,data:t,loading:y})}var fe,ye,me=n(49665),pe=n(35766),ve=n.n(pe),he=n(50369);function be(e,t,n,r){fe||(fe="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+3];t.children=a}if(t&&i)for(var s in i)void 0===t[s]&&(t[s]=i[s]);else t||(t=i||{});return{$$typeof:fe,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function ge(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;
1!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Se(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)?Se(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 Se(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 xe(e){var t=e.loadTodos,n=e.setLoading,r=e.companyStore,i=ge((0,a.useState)(!1),2),o=i[0],u=i[1],s=ge((0,a.useState)(null),2),l=s[0],d=s[1],f=ge((0,a.useState)(""),2),y=f[0],m=f[1],p=ge((0,a.useState)(""),2),h=p[0],b=p[1],g=new Y.g,S=function(e,i,o,a){n(!0),x(),g.registerRequest((0,c.c_)({companyXid:r.currentXid,suggestSymbol:e,suggestIsin:i,suggestTaxCountry:o,suggestNameFromIsin:a})).finally(function(){t()})},x=function(){d(null),m(""),b("")};return be("div",{},void 0,be(O.A,{title:h,show:Boolean(y),onHide:x,cancelBtnText:I18n.translate("button.close"),onSubmit:l,submitBtnText:I18n.translate("finalize.knowing.title")},void 0,be("div",{style:{whiteSpace:"pre-line"}},void 0,y)),be(ve(),{open:o,onToggle:function(e,t,n){return"select"!==n.source&&u(function(e){return!e})},pullRight:!0,className:"ml-1",id:"gear-menu"},void 0,be(ve().Toggle,{bsStyle:"action-primary btn-action__square",noCaret:!0},void 0,be(he.h,{className:"phi phi-settings_wheel_icon phi-lg fullstroke","aria-label":"Settings"})),be(ve().Menu,{},void 0,be(v(),{},void 0,be("button",{className:"btn btn-default gear-btn",onClick:function(){d(function(){return function(){return S(!0,!1,!1,!1)}}),m(I18n.translate("securities.fixes.symbols.from.name")),b(I18n.translate("securities.suggest.symbols.from.name")),u(!1)}},void 0,be("span",{},void 0,I18n.translate("securities.suggest.symbols.from.name")))),be(v(),{},void 0,be("button",{className:"btn btn-default gear-btn",onClick:function(){d(function(){return function(){return S(!1,!1,!0,!1)}}),m(I18n.translate("securities.fixes.country.from.name")),b(I18n.translate("securities.suggest.taxcountry.from.name")),u(!1)}},void 0,be("span",{},void 0,I18n.translate("securities.suggest.taxcountry.from.name")))),be(v(),{},void 0,be("button",{className:"btn btn-default gear-btn",onClick:function(){d(function(){return function(){return S(!1,!0,!1,!1)}}),m(I18n.translate("securities.fixes.isin.from.name")),b(I18n.translate("securities.suggest.isin.from.name")),u(!1)}},void 0,be("span",{},void 0,I18n.translate("securities.suggest.isin.from.name")))),be(v(),{},void 0,be("button",{className:"btn btn-default gear-btn",onClick:function(){d(function(){return function(){return S(!1,!0,!1,!0)}}),m(I18n.translate("securities.fixes.name.from.isin")),b(I18n.translate("securities.suggest.name.from.isin")),u(!1)}},void 0,be("span",{},void 0,I18n.translate("securities.suggest.name.from.isin")))))))}function we(e){return we="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},we(e)}function Ie(e,t,n,r){ye||(ye="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),1===o)t.children=r;else if(o>1){for(var a=Array(o),u=0;u<o;u++)a[u]=arguments[u+3];t.children=a}if(t&&i)for(var s in i)void 0===t[s]&&(t[s]=i[s]);else t||(t=i||{});return{$$typeof:ye,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function Oe(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ae(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 Ce(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 ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?Ce(Object(n),!0).forEach(function(t){Ne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ne(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=we(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=we(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==we(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pe(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,i,o,a,u=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return u}}(e,t)||Ae(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 Ae(e,t){if(e){if("string"==typeof e)return Te(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)?Te(e,t):void 0}}function Te(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 De={securityTypeCode:[Z.A],securityName:[Z.A,function(e){return{valid:null===e||(0,te.A)().validate({value:e,options:{max:130}}).valid,message:I18n.translate("validation.max","130")}}],interest:[function(e){return null===e?{valid:!0}:(0,Q.A)().validate({value:e,options:{forbidNegative:!0,max:100}})}],isin:[function(e){return{valid:null===e||(0,te.A)().validate({value:e,options:{max:40}}).valid,message:I18n.translate("validation.max","40")}}],dkFondskode:[function(e){return{valid:null===e||(0,te.A)().validate({value:e,options:{max:12}}).valid,message:I18n.translate("validation.max","12")}}],symbol:[function(e){return{valid:null===e||(0,te.A)().validate({value:e,options:{max:20}}).valid,message:I18n.translate("validation.max","20")}}],countryCode:[Z.A],currencyCode:[Z.A]},Xe=function(e){var t=e.defaultStore,n=e.companyStore,r=e.history,i=Pe((0,a.useState)([]),2),l=i[0],d=i[1],f=Pe((0,a.useState)(new Set),2),y=f[0],m=f[1],p=Pe((0,a.useState)([]),2),v=p[0],h=p[1],b=Pe((0,a.useState)((0,C.zj)()),2),g=b[0],S=b[1],x=Pe((0,a.useState)(""),2),w=x[0],I=x[1],k=Pe((0,a.useState)(""),2),N=k[0],P=k[1],A=Pe((0,a.useState)(""),2),T=A[0],D=A[1],X=Pe((0,a.useState)(""),2),M=X[0],B=X[1],K=Pe((0,a.useState)(""),2),L=K[0],_=K[1],W=Pe((0,a.useState)(""),2),q=W[0],$=W[1],H=Pe((0,a.useState)(""),2),U=H[0],V=H[1],G=Pe((0,a.useState)(null),2),Z=G[0],Q=G[1],te=Pe((0,a.useState)(!0),2),ne=te[0],re=te[1],ie=Pe((0,a.useState)(!1),2),oe=ie[0],ae=ie[1],ue=Pe((0,a.useState)(""),2),se=ue[0],ce=ue[1],le=Pe((0,a.useState)(!1),2),fe=le[0],ye=le[1],pe=Pe((0,a.useState)(!1),2),ve=pe[0],he=pe[1],be=Pe((0,a.useState)(),2),ge=be[0],Se=be[1],we=Pe((0,a.useState)(!1),2),Ce=we[0],Ae=we[1],Te=Pe((0,a.useState)(null),2),Xe=Te[0],je=Te[1],Fe=Pe((0,a.useState)(!1),2),Re=Fe[0],Ee=Fe[1],Me=new Y.g,Be=(0,a.useRef)({}),Ke=(0,a.useRef)({}),Le=(0,a.useRef)(),_e=function(){return ye(!1)},ze=(0,a.useMemo)(function(){return v.filter(function(e){var t=[e.name,e.name2,e.name3,e.name4,e.name5,e.name6,e.name7].join(" ").toLowerCase()||"";return!(w&&!t.includes(w.toLowerCase()))&&((!N||e.type===N)&&((!T||e.country===T)&&((!M||e.currency===M)&&(!(L&&!(e.symbol||"").toLowerCase().includes(L.toLowerCase()))&&!(q&&!(e.isin||"").toLowerCase().includes(q.toLowerCase()))))))})},[w,N,T,M,L,q,v]);(0,a.useEffect)(function(){return qe(),Ue(),window.addEventListener(C.ld,We),function(){Me.abortAll(),window.removeEventListener(C.ld,We)}},[]);var We=function(){S((0,C.zj)())},qe=function(){re(!0),He().then(function(e){var t=e.fixesNeeded;d(t.map(function(e){return ke(ke({},e),{},{uuid:"".concat(Date.now(),"-").concat(Math.random())})})),$e(),re(!1)}).catch(function(){return re(!1)})},$e=function(){m(new Set)}
1,He=function(){return Me.registerRequest((0,s.rB)(n.currentXid)).then(function(e){return{fixesNeeded:e.body.securityFixesNeeded.map(function(e){return new J(e)})}})},Ue=function(){Me.registerRequest((0,u.tf)(n.currentXid)).then(function(e){return{securities:(e.body.securities||[]).map(function(e){return new z(e)})}}).then(function(e){var t=e.securities;h(t),re(!1)}).catch(function(){return re(!1)})},Ve=function(){Ue()},Ge=function(e){Be.current[e]||(Be.current[e]=o()(function(e){var t=Le.current.find(function(t){return t.id===e}),r=Ke.current[e];if(t&&r){if(Array.from(r).some(function(e){return(De[e]||[]).some(function(n){return!n(t[e]).valid})}))return;Me.registerRequest((0,s.m4)(n.currentXid,t)).catch(function(){ae(!0),ce(I18n.translate("securities.fix.update.failed"))}).finally(function(){delete Ke.current[e]})}},1e3,{maxWait:3e4})),Be.current[e](e)};(0,a.useEffect)(function(){Le.current=l},[l]),(0,a.useEffect)(function(){return function(){Object.values(Be.current).forEach(function(e){e.cancel()})}},[]);var Je=function(){re(!0),Ue(),qe()};(0,a.useEffect)(function(){return window.addEventListener(C.c_,Je),function(){return window.removeEventListener(C.c_,Je)}},[]);var Ze=y.size,Qe=l.length>0&&l.every(function(e){return y.has(e.id)});return Ie(me.A,{title:I18n.translate("privatesecurities.title"),className:"securities-page",loadScreen:ne},void 0,Ie("div",{className:"page-header"},void 0,Ie("h4",{},void 0,I18n.translate("privatesecurities.title")),Ie("div",{className:"d-flex align-items-center"},void 0,Ie("button",{className:"btn btn-default mr-1",onClick:function(){return Ae(function(e){return!e})},disabled:ne},void 0,I18n.translate("customer.import")),l.length>0&&Ie("div",{style:{display:"flex",alignItems:"center",flexDirection:"column"}},void 0,Ie("button",{className:"btn btn-primary mr-1",onClick:function(){return function(){if(0===Ze)return ce(I18n.translate("securities.no.fixes.selected")),void ae(!0);he(!0),re(!0);var e=Object.entries(De).reduce(function(e,t){var n=Pe(t,2),r=n[0],i=n[1];if(e)return e;var o=null;return i.forEach(function(e){l.filter(function(e){return y.has(e.id)}).forEach(function(t){if("STOCK"===t.securityTypeCode&&"interest"===r||"STOCK"===t.securityTypeCode&&"usesIndexFaktor"===r||"BOND"===t.securityTypeCode&&"nonPublic"===r)return o;var n=e(t[r]);n.valid||(o={field:r,message:n.message})})}),o},null);if(e)return Se(e),he(!1),void re(!1);Me.registerRequest((0,s.rv)(n.currentXid,Array.from(y))).then(function(){he(!1),$e(),re(!1)}).catch(function(){he(!1),re(!1)})}()},disabled:ve},void 0,I18n.translate("securities.fixesneeded.button")," (",Ze,")"),ge?Ie("div",{className:"text-danger mt-2"},void 0,"Fix alle fejl i de valgte rækker."):null),l.length>0&&Ie(xe,{loadTodos:qe,setLoading:re,companyStore:n}))),Ie("div",{className:"container-fluid"},void 0,Ie(E.A,{dropzoneOpen:Ce,uploadFile:function(e){re(!0),Me.registerRequest((0,u.W9)({file:e,companyXid:n.currentXid})).then(function(e){je(e.body),qe(),Ue()}).catch(function(){}).finally(function(){re(!1)})},dropzonePlaceholderKey:"import.dropzone.securities",explainTextKey:"work.edit.import.securities.explain",sampleFiles:[{translationKey:"work.edit.import.securities.sample.mr",uri:"/documents/multiregnskab-securities-sample.xlsx"}]}),l.length?Ie("div",{},void 0,Ie("h4",{},void 0,I18n.translate("fixes.needed")),Ie("div",{className:"card",style:{width:"100%",padding:"10px",marginBottom:"30px",overflowX:"auto"}},void 0,Ie(de,{fixesNeeded:l,handleCheckFixesNeeded:function(e,t){m(t?function(t){return new Set([].concat(Oe(t),[e.id]))}:function(t){var n=new Set(t);return n.delete(e.id),n})},handleCheckAllFixesNeeded:function(e){e?Ee(!0):$e()},handleUpdateFixesNeeded:function(e,t,n){d(function(r){return r.map(function(r){return r.uuid===e?ke(ke({},r),{},Ne({},t,n)):r})});var r=Le.current.find(function(t){return t.uuid===e});r&&(Ke.current[r.id]||(Ke.current[r.id]=new Set),Ke.current[r.id].add(t),Ge(r.id))},defaultStore:t,selectedFixesNeeded:y,allFixesNeededSelected:Qe,validators:De,loading:ne||ve,filteredSecurities:ze,companyStore:n,loadFixesNeeded:qe}))):null,Ie("div",{style:{width:"100%",marginTop:"20px",marginBottom:"20px",height:"1px"}}),l.length>0&&Ie("h4",{className:"mt-4"},void 0,I18n.translate("securities.created")),v.length>0&&Ie("table",{className:"table-filters"},void 0,Ie("thead",{},void 0,Ie("tr",{},void 0,Ie("th",{width:"23%"},void 0,Ie(F.x,{value:w,placeholder:I18n.translate("securities.search.name"),onChange:function(e){I(e)}})),Ie("th",{width:"12%"},void 0,Ie(R.X,{value:N,placeholder:I18n.translate("securities.any.type"),allowDeselect:!0,options:g,onChange:function(e){P(e)}})),Ie("th",{width:"12%"},void 0,Ie(R.X,{value:T,placeholder:I18n.translate("securities.any.country"),allowDeselect:!0,options:t.countries,onChange:function(e){D(e)}})),Ie("th",{width:"12%"},void 0,Ie(R.X,{value:M,placeholder:I18n.translate("securities.any.currency"),allowDeselect:!0,options:t.currencies,onChange:function(e){B(e)}})),Ie("th",{width:"12%"},void 0,Ie(F.x,{value:L,placeholder:I18n.translate("securities.search.symbol"),onChange:function(e){_(e)}})),Ie("th",{width:"12%"}),Ie("th",{width:"17%"},void 0,Ie(F.x,{value:q,placeholder:I18n.translate("securities.search.isin"),onChange:function(e){$(e)}}))))),Ie(j,{loading:ne,data:ze,hasAnySecurities:v.length>0,alternativeName:U,onAddAlternative:function(e){var t=U,r=Z;
1re(!0),V(""),Q(null),Me.registerRequest((0,c.jr)({companyXid:n.currentXid,securityXid:e.xid,nameToAddAsAlternative:t,securityToDoXid:r})).then(function(){return Ve()}).catch(function(){return re(!1)})},onSendMessage:function(e,t){re(!0),Me.registerRequest((0,c.EJ)({companyXid:n.currentXid,securityXid:e.xid,comment:t})).then(function(){re(!1),ye(!0)}).catch(function(){return re(!1)})},onNavigate:function(e){r.push((0,ee.ID)("/setup/private-security/".concat(e.xid)))},onDelete:function(e){var t=e.securityXid,r=e.reallyDelete,i=e.onSuccess;re(!0),Me.registerRequest((0,u.t)(n.currentXid,t,r)).then(function(){Ve(),i&&i()}).catch(function(e){412===e.status&&(ce(e.response.body.messageKey),ae(!0))}).finally(function(){return re(!1)})},isPrivate:!0}),Ie(O.A,{show:null!==Xe,title:I18n.translate("import.from.file"),noCancelBtn:!0,submitBtnText:I18n.translate("ok"),onHide:function(){return je(null)},onSubmit:function(){return je(null)}},void 0,Xe&&Ie("div",{},void 0,Ie("p",{},void 0,I18n.translate("securities.import.inserted",Xe.countInserted)),Ie("p",{},void 0,I18n.translate("securities.import.updated",Xe.countUpdated)),Ie("p",{},void 0,I18n.translate("securities.import.total",Xe.countTotalInFile)))),Ie(O.A,{show:fe,noCancelBtn:!0,submitBtnText:I18n.translate("ok"),onHide:_e,onSubmit:_e},void 0,I18n.translate("securities.confirm.comment")),Ie(O.A,{show:oe,title:I18n.translate("didnotwork"),submitBtnText:I18n.translate("ok"),onSubmit:function(){return ae(!1)},onHide:function(){return ae(!1)},noCancelBtn:!0},void 0,Ie("p",{},void 0,I18n.translate(se))),Ie(O.A,{show:Re,title:"Vælg alle værdipapirer",submitBtnText:"Vælg alle",onSubmit:function(){m(new Set(l.map(function(e){return e.id}))),Ee(!1)},onHide:function(){return Ee(!1)}},void 0,Ie("p",{},void 0,"Det er ret vigtigt at der ikke oprettes papirer som allerede eksisterer med et andet navn."),Ie("p",{},void 0,"Vil du vælge alle værdipapirer i tabellen for at oprette nu?"))))};const je=Xe}}]);
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.