1"use strict";(globalThis.webpackChunkomc_ui_2_0||=[]).push([[1978,8942],{71978(e,l,i){var a,s=i(9950);function t(){return t=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var i=arguments[l];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},t.apply(null,arguments)}function o(e,l){let{title:i,titleId:o,...r}=e;return s.createElement("svg",t({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l,"aria-labelledby":o},r),i?s.createElement("title",{id:o},i):null,a||(a=s.createElement("g",{id:"Info / fill"},s.createElement("path",{id:"Vector",d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM13 17H11V11H13V17ZM13 9H11V7H13V9Z",fill:"#063369"}))))}const r=s.forwardRef(o);i.p;i.d(l,["h",0,r])},81525(e,l,i){i.d(l,["K",0,{reg_sedar:{regFilingTypeId:1,specialInstructions:"",methodOfFilingEng:!1,methodOfFilingFR:!1},reg_cansec:{regFilingTypeId:2,specialInstructions:"",methodOfFilingEng:!1,methodOfFilingFR:!1},reg_sec:{regFilingTypeId:3,specialInstructions:"",methodOfFilingEng:!1,methodOfFilingFR:!1},reg_nordic:{regFilingTypeId:4,specialInstructions:"",methodOfFilingEng:!1,methodOfFilingFR:!1}},"i",0,{reg_sedar:{key:"createRelease:regSEDAR",value:"SEDAR+",capitalizedKey:"Reg_SEDAR"},reg_cansec:{key:"createRelease:regCanadianSec",value:"Canadian Securities Exchange",capitalizedKey:"Reg_CANSEC"},reg_sec:{key:"createRelease:regForm",value:"Form 8-K or 6-K with SEC",capitalizedKey:"Reg_SEC"},reg_nordic:{key:"createRelease:regNORDIC",value:"NORDIC Disclosure",capitalizedKey:"Reg_NORDIC"}}])},84508(e,l,i){var a=i(7717);const s={[a.l.SEDAR]:{title:"createRelease:regFileWithSEDAR",description1:"createRelease:regQuickFilSEDARDESC1",description2:"createRelease:regQuickFilSEDARDESC2"},[a.l.CANADIAN_SECURITIES]:{title:"createRelease:regFileWithCanadian",description1:"createRelease:regQuickFilCanadianDESC1"},[a.l.FORM8K]:{title:"createRelease:regFileWithFORM",description1:"createRelease:regQuickFilFORMDESC1"},[a.l.NORDIC_DISCLOSURE]:{title:"createRelease:regFileWithNORDIC",de
1scription1:"createRelease:regQuickFilNORDICDESC1"}},t={[a.l.SEDAR]:1,[a.l.CANADIAN_SECURITIES]:2,[a.l.FORM8K]:3,[a.l.NORDIC_DISCLOSURE]:4},o={[a._.WIRE_VERSION]:"1",[a._.BRANDED_VERSION]:"2"};i.d(l,["EV",0,{isUploading:!1,startUpload:!1,fileCount:0,areFilesValidAndUploaded:!1,shouldValidateFiles:!1,isUploadInterupted:!1,attachedValidDocIds:[]},"T9",0,{fillingMethod:!0,documents:!0,languageSelected:!0},"i5",0,s,"rl",0,o,"wc",0,t,"xL",0,{isMethodPristine:!0,isDocumentPristine:!0}])},3165(e,l,i){var a=i(41397),s=i(48661),t=i(42087),o=i(92526),r=i(50659),n=i(11961),c=i(56943),d=i(71316),m=i(32328),p=i(38843),g=i(64552),u=i(5418),x=i(73178),h=i(78503),v=i(82804);i.d(l,["r",0,()=>{const[e]=(0,s.B)(),l=(0,t.jL)(),i=(0,t.GV)(p.XJ),f=(0,t.GV)(o.tE),y=(0,t.GV)(g.xy),b=(0,t.GV)(h.H4),{addNotification:F}=(0,u.y)(x.V),[R,{loading:j}]=(0,v.X)(m.l),[N,{loading:C}]=(0,v.X)(n.Me),S=l=>F({type:"error",title:e("general:errorTitle"),subtitle:(0,c.oL)(e("general:errorFallbackHeading"),l),dismissTime:d.wN});return{filingTypes:y,savingRFTypes:j,deletingDocs:C,saveRegulatoryFilings:e=>new Promise(async(a,s)=>{try{var t,o;const n=await R({variables:{accountNumber:f,draftOrderId:i,regFilings:e}}),d=(0,c.cx)(n);if(d)return S(d),void s(!1);const m=null===n||void 0===n||null===(t=n.data)||void 0===t||null===(o=t.saveRegFilingTypes)||void 0===o?void 0:o.filingTypes;l((0,r.ok)({path:"filingTypes",value:m})),a(!0)}catch(n){const e=(0,c.cx)(n);e&&(S(e),s(!1))}}),deleteFilingDocFiles:e=>new Promise(async(s,t)=>{if(e.length)try{var o;const n=await N({variables:{accountNumber:f,draftOrderId:i,documentIds:e,emailId:b}}),d=(0,c.cx)(n);d&&(S(d),t(!1));const m=(null!==(o=(0,a.get)(n,"data.deleteContentFromDraftOrder.orderDocuments",[]))&&void 0!==o?o:[]).filter(e=>!e.isDeleted);l((0,r.ok)({path:"orderDocuments",value:m})),s(!0)}catch(n){const e=(0,c.cx)(n);e&&S(e),t(!1)}else s(!0)})}}])},7717(e,l,i){i.d(l,{_:()=>s,l:()=>a});let a=function(e){return e.SEDAR="Reg_SEDAR",e.CANADIAN_SECURITIES="Reg_CANSEC",e.FORM8K="Reg_SEC",e.NORDIC_DISCLOSURE="Reg_NORDIC",e}({}),s=function(e){return e.WIRE_VERSION="Wire",e.BRANDED_VERSION="Branded",e}({})},98942(e,l,i){i.r(l),i.d(l,{default:()=>De});var a=i(9950),s=i(48661),t=i(45358),o=i(5418),r=i(42087),n=i(64552),c=i(64847);const d=(0,a.createContext)({});d.displayName="RegFilingContext";var m,p=i(7717),g=i(60290),u=i(78813),x=i(90246),h=i(35657),v=i(37634);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var i=arguments[l];for(var a in i)({}).hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e},f.apply(null,arguments)}function y(e,l){let{title:i,titleId:s,...t}=e;return a.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",ref:l,"aria-labelledby":s},t),i?a.createElement("title",{id:s},i):null,m||(m=a.createElement("path",{d:"M7 10L12 15L17 10L7 10Z",fill:"#677078"})))}const b=a.forwardRef(y);i.p;var F=i(71316),R=i(72004),j=i(44414);const N=e=>{var l,i;let{title:t,fileType:c,filingType:m,responseKey:p,className:g,children:f}=e;const[y]=(0,s.B)(),[N,C]=(0,a.useState)(!1),{filingTypes:S,setFormPristine:E,handleRegFilingTypeChange:I,handleEditFiling:D,handleDeleteModalVisibility:O}=(0,o.y)(d),w=(0,r.GV)(e=>(0,n.uN)(e,c)),k=Object.keys(w).length>0,A=!(null===(l=S[p])||void 0===l||!l.methodOfFiling),T=!(null===(i=S[p])||void 0===i||!i.specialInstructions),_=k||A||T,U=k||A,V=e=>{e.preventDefault(),e.stopPropagation(),F.x0.includes(e.code)&&e.currentTarget.click()};return(0,a.useEffect)(()=>{k&&A&&T||!N||C(!1)},[k,A]),(0,j.jsxs)(h.OK,{expanded:N,id:"toggle",onClick:()=>{U&&C(!N)},onKeyUp:V,tabIndex:U?0:-1,className:(0,R.A)(U?"":"omc-cursor-default",g,"omc-border-solid omc-border-s-0 omc-border-e-0 omc-border-border-dashed"),"data-testid":"expansion-wrapper",children:[(0,j.jsx)(h.OK.Header,{className:(0,R.A)("omc-typo-lg1-primary omc-py-3 omc-flex omc-mr-1",U?"":"omc-cursor-default"),expandIcon:k||A||T?(0,j.jsx)(b,{tabIndex:0}):null,children:(0,j.jsxs)("div",{className:"omc-flex omc-justify-between omc-w-full omc-gap-1 omc-truncate",children:[(0,j.jsx)(u.A,{placement:"bottom",trigger:["hover","click","focus"],overlay:(0,j.jsx)(x.A,{className:"tooltip-body body-text",id:"uniq",children:(0,j.jsx)("div",{children:t})}),children:(0,j.jsx)("div",{className:"omc-truncate",children:t})}),(0,j.jsxs)("div",{className:"omc-flex omc-items-center omc-gap-2",children:[k&&(0,j.jsxs)("div",{className:"omc-flex flex-1",children:[(0,j.jsx)(v.h,{className:"fill-success omc-mr-1.5"}),(0,j.jsx)("span",{className:"omc-typo-lg1-primary",children:y("createRelease:regUploaded","Uploaded")})]}),(k||A||T)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{children:(0,j.jsx)("span",{className:"omc-typo-lg1-primary file-text omc-pointer-events-auto",tabIndex:0,onKeyUp:V,onClick:e=>{e.stopPropagation(),D(m)},"data-testid":"edit-btn",children:y("createRelease:regEdit","Edit")})}),(0,j.jsx)("div",{children:(0,j.jsx)("span",{className:"omc-typo-lg1-primary file-text omc-pointer-events-auto omc-mr-1",tabIndex:0,onKeyUp:V,onClick:e=>{e.stopPropagation(),O(!0,m)},"data-testid":"delete-btn",children:y("createRelease:regDelete","Delete")})})]}),!_&&(0,j.jsx)("span",{className:"omc-typo-lg1-primary !omc-text-primary-400 omc-underline omc-cursor-pointer omc-pointer-events-auto",onClick:e=>{e.stopPropagation(),E(e=>({...e,isMethodPristine:!1})),I(m)},tabIndex:0,onKeyUp:V,"data-testid":"file-btn",children:y("regFiling:addFile","Add File")})]})]})}),(0,j.jsx)(h.OK.Body,{onClick:e=>e.stopPropagation(),children:f})]})};
1var C=i(80331),S=i(37809);const E=()=>{var e,l,i,a,t,m,u,x,h,v,f;const[y]=(0,s.B)(),[b]=(0,C.b)([g.P.isSedarFilingFilesUploaded],!0,!1),{filingTypes:F}=(0,o.y)(d),R=(0,r.GV)(e=>(0,n.uN)(e,c.pt.Reg_SEDAR)),E=Object.keys(R).length>0,I=!(null===(e=F.reg_sedar)||void 0===e||!e.methodOfFiling);return(0,j.jsx)(N,{title:y("createRelease:regSEDAR","SEDAR+"),fileType:c.pt.Reg_SEDAR,filingType:p.l.SEDAR,responseKey:"reg_sedar",className:"omc-border-b-[1px] omc-border-t-0 overflow-hidden "+(b?"":"border-danger"),children:(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2.5",children:[I&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regMethodOfFiling","Method of Filing")}),(0,j.jsx)("span",{className:"body-14",children:"wire"===(null===F||void 0===F||null===(l=F.reg_sedar)||void 0===l||null===(i=l.methodOfFiling)||void 0===i?void 0:i.toLowerCase())?y("createRelease:regQuickFilWireType","Wire Version"):y("createRelease:regQuickFilBrandedType","Branded Version")})]}),((null===F||void 0===F||null===(a=F.reg_sedar)||void 0===a?void 0:a.methodOfFilingEng)||(null===F||void 0===F||null===(t=F.reg_sedar)||void 0===t?void 0:t.methodOfFilingFR))&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regLanguageOfFiling","Language of Filing")}),(0,j.jsxs)("span",{className:"body-14",children:[(null===F||void 0===F||null===(m=F.reg_sedar)||void 0===m?void 0:m.methodOfFilingEng)&&y("createRelease:regQuickFilEng","English"),(null===F||void 0===F||null===(u=F.reg_sedar)||void 0===u?void 0:u.methodOfFilingEng)&&(null===F||void 0===F||null===(x=F.reg_sedar)||void 0===x?void 0:x.methodOfFilingFR)&&", ",(null===F||void 0===F||null===(h=F.reg_sedar)||void 0===h?void 0:h.methodOfFilingFR)&&y("createRelease:regQuickFilFR","French")]})]}),E&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regFilesIncluded","Files included")}),Object.keys(R).map(e=>(0,j.jsxs)("span",{className:"body-14",children:[(0,j.jsx)(S.U,{})," ",R[e].name]},e))]}),(null===F||void 0===F||null===(v=F.reg_sedar)||void 0===v?void 0:v.specialInstructions)&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regSpecialIns","Special Instructions")}),(0,j.jsx)("span",{className:"body-14 text-break",children:null===F||void 0===F||null===(f=F.reg_sedar)||void 0===f?void 0:f.specialInstructions})]})]})})},I=()=>{var e,l;const[i]=(0,s.B)(),[a]=(0,C.b)([g.P.isCanadianFilingFilesUploaded],!0,!1),{filingTypes:t}=(0,o.y)(d),m=(0,r.GV)(e=>(0,n.uN)(e,c.pt.Reg_CANSEC)),u=Object.keys(m).length>0,x=!(null===(e=t.reg_cansec)||void 0===e||!e.specialInstructions);return(0,j.jsx)(N,{title:i("createRelease:regCanadianSec","Canadian Securities Exchange"),fileType:c.pt.Reg_CANSEC,filingType:p.l.CANADIAN_SECURITIES,responseKey:"reg_cansec",className:"omc-border-0 overflow-hidden "+(a?"":"border-danger"),children:(0,j.jsxs)("div",{className:"body-wrapper",children:[u&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:i("createRelease:regFilesIncluded","Files included")}),Object.keys(m).map(e=>(0,j.jsxs)("span",{className:"body-14",children:[(0,j.jsx)(h.In,{name:"paper"})," ",m[e].name]},e))]}),x&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:i("createRelease:regSpecialIns","Special Instructions")}),(0,j.jsx)("span",{className:"body-14 text-break",children:null===t||void 0===t||null===(l=t.reg_cansec)||void 0===l?void 0:l.specialInstructions})]})]})})},D=()=>{var e,l,i,a,t,m,u,x,h,v,f;const[y]=(0,s.B)(),[b]=(0,C.b)([g.P.isSecFilingFilesUploaded],!0,!1),{filingTypes:F}=(0,o.y)(d),R=(0,r.GV)(e=>(0,n.uN)(e,c.pt.Reg_SEC)),E=Object.keys(R).length>0,I=!(null===F||void 0===F||null===(e=F.reg_sec)||void 0===e||!e.methodOfFiling);return(0,j.jsx)(N,{title:y("createRelease:regForm","Form 8-K or 6-K with SEC"),fileType:c.pt.Reg_SEC,filingType:p.l.FORM8K,responseKey:"reg_sec",className:"omc-border-t-[1px] omc-border-b-0 overflow-hidden "+(b?"":"border-danger"),children:(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2.5",children:[I&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regMethodOfFiling","Method of Filing")}),(0,j.jsx)("span",{className:"body-14",children:"wire"===(null===F||void 0===F||null===(l=F.reg_sec)||void 0===l||null===(i=l.methodOfFiling)||void 0===i?void 0:i.toLowerCase())?y("createRelease:regQuickFilWireType","Wire Version"):y("createRelease:regQuickFilBrandedType","Branded Version")})]}),((null===F||void 0===F||null===(a=F.reg_sec)||void 0===a?void 0:a.methodOfFilingEng)||(null===F||void 0===F||null===(t=F.reg_sec)||void 0===t?void 0:t.methodOfFilingFR))&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regLanguageOfFiling","Language of Filing")}),(0,j.jsxs)("span",{className:"body-14",children:[(null===F||void 0===F||null===(m=F.reg_sec)||void 0===m?void 0:m.methodOfFilingEng)&&y("createRelease:regQuickFilEng","English"),(null===F||void 0===F||null===(u=F.reg_sec)||void 0===u?void 0:u.methodOfFilingEng)&&(null===F||void 0===F||null===(x=F.reg_sec)||void 0===x?void 0:x.methodOfFilingFR)&&", ",(null===F||void 0===F||null===(h=F.reg_sec)||void 0===h?void 0:h.methodOfFilingFR)&&y("createRelease:regQuickFilFR","French")]})]}),E&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regFilesIncluded","Files included")}),Object.keys(R).map(e=>(0,j.jsxs)("span",{className:"body-14",children:[(0,j.jsx)(S.U,{})," ",R[e].name]},e))]}),(null===F||void 0===F||null===(v=F.reg_sec)||void 0===v?void 0:v.specialInstructions)&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2.5",children:[(0,j.jsx)("span",{className:"headline-small",children:y("createRelease:regSpecialIns","Special Instructions")}),(0,j.jsx)("span",{className:"body-14 text-break",children:null===F||void 0===F||null===(f=F.reg_sec)||void 0===f?void 0:f.specialInstructions})]})]})})},O=e=>{var l,i;const[a]=(0,s.B)(),[t]=(0,C.b)([g.P.isNordicFilingFilesUploaded],!0,!1),{filingTypes:m}=(0,o.y)(d),u=(0,r.GV)(e=>(0,n.uN)(e,c.pt.Reg_NORDIC)),x=Object.keys(u).length>0;return(0,j.jsx)(N,{title:a("createRelease:regNORDIC","NORDIC Disclosure"),fileType:c.pt.Reg_NORDIC,filingType:p.l.NORDIC_DISCLOSURE,responseKey:"reg_nordic",className:"omc-border-y-[1px] overflow-hidden "+(t?"":"border-danger"),children:(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2.5",children:[x&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2 omc-px-[11px] omc-py-2.5 omc-bg-gray-10",children:[(0,j.jsx)("span",{className:"headline-small",children:a("createRelease:regFilesIncluded","Files included")}),Object.keys(u).map(e=>(0,j.jsxs)("span",{className:"body-14",children:[(0,j.jsx)(S.U,{})," ",u[e].name]},e))]}),(null===m||void 0===m||null===(l=m.reg_nordic)||void 0===l?void 0:l.specialInstructions)&&(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-2.5",children:[(0,j.jsx)("span",{className:"headline-small",children:a("createRelease:regSpecialIns","Special Instructions")}),(0,j.jsx)("span",{className:"body-14 text-break",children:null===m||void 0===m||null===(i=m.reg_nordic)||void 0===i?void 0:i.specialInstructions})]})]})})};var w=i(95912),k=i(22776),A=i(38843);const T=()=>{var e;const[l]=(0,s.B)(),{releaseLanguage:i}=(0,r.GV)(A.KW),{filingType:t,filingMethod:n,selectedLanguage:c,isModalBlocked:m,setSelectedLanguage:g,setFormPristine:u}=(0,o.y)(d),x=e=>{e.stopPropagation(),m||(u(e=>({...e,isMethodPristine:!1})),g({...c,[e.target.id]:e.target.checked}))},h=n&&t===p.l.SEDAR&&i&&(null===i||void 0===i||null===(e=i.languageCodes)||void 0===e?void 0:e.length)>1;return(0,a.useEffect)(()=>{var e;i&&1===(null===i||void 0===i||null===(e=i.languageCodes)||void 0===e?void 0:e.length)&&g({[`${i.languageCodes[0]}-REG`]:!0})},[i]),h?(0,j.jsxs)("div",{className:"lang-wrap",children:[(0,j.jsxs)("span",{className:"body-14 bold",children:[l("createRelease:regQuickFilSelectLanguage","Select Language"),"*"]}),(null===i||void 0===i?void 0:i.languageCodes.includes("en-CA"))&&(0,j.jsx)(k.A.Check,{type:"checkbox",id:"en-CA-REG",checked:c["en-CA-REG"]||!1,className:"selection-list-item omc-mt-1.5",label:l("createRelease:regQuickFilEng","English"),onChange:x,"data-testid":"en-btn"}),(null===i||void 0===i?void 0:i.languageCodes.includes("fr-CA"))&&(0,j.jsx)(k.A.Check,{type:"checkbox",id:"fr-CA-REG",checked:c["fr-CA-REG"]||!1,className:"selection-list-item omc-mt-1.5",label:l("createRelease:regQuickFilFR","French"),onChange:x,"data-testid":"fr-btn"})]}):null},_=(0,a.memo)(T),U=(p.l.SEDAR,[{id:0,code:"Wire",name:"Wire Version",locizeKey:"regQuickFilWireType"},{id:1,code:"Branded",name:"Branded Version",locizeKey:"regQuickFilBrandedType"}]),V=()=>{const[e]=(0,s.B)(),{filingType:l,filingMethod:i,setFilingMethod:a,validation:t,isModalBlocked:r,setFormPristine:n}=(0,o.y)(d);return l&&[p.l.SEDAR,p.l.FORM8K].includes(l)?(0,j.jsxs)("div",{className:(0,R.A)("filling-method-wrap omc-bg-white",t.fillingMethod&&t.languageSelected?"":"invalid"),children:[(0,j.jsx)("span",{className:"omc-typo-lg1-primary",children:e("createRelease:regQuickFilChooseMethod","Choose filing method")}),(0,j.jsx)("div",{className:"omc-mt-1.5",children:(0,j.jsx)(w.xIz,{"data-testid":"radio-group",name:"fillingMethods",value:i,onValueChange:e=>{r||(n(e=>({...e,isMethodPristine:!1})),a(e))},className:"omc-mt-1",children:U.map(l=>(0,j.jsxs)("div",{className:"omc-flex omc-items-center",children:[(0,j.jsx)(w.Kh6,{value:l.code,id:l.code,"data-testid":`${l.code}-btn`,className:"omc-bg-transparent"}),(0,j.jsx)("label",{htmlFor:l.code,className:"omc-ml-2 omc-typo-lg1-primary omc-cursor-pointer",children:e(`createRelease:${l.locizeKey}`,l.name)})]},l.code))})}),(0,j.jsx)(_,{})]}):null},M=(0,a.memo)(V);var B=i(95252),P=i(14491);const L=P.Ay.div` 2 display: flex; 3 flex-direction: column; 4 gap: 16px; 5 padding: 24px; 6 .cursor-pointer { 7 cursor: pointer; 8 } 9 10 h3 { 11 margin-bottom: 0; 12 } 13
14 .invalid:not(label) { 15 padding: 16px; 16 border: 1px solid var(--danger-color) !important; 17 box-shadow: 0 0 4px var(--danger-color) !important; 18 border-radius: 10px; 19 } 20 21 .filling-method-wrap { 22 .method-options { 23 margin-top: 6px; 24 25 input { 26 position: relative !important; 27 left: 0 !important; 28 29 width: 18px; 30 height: 18px; 31 32 accent-color: var(--primary-color-blue); 33 cursor: pointer; 34 35 &[aria-invalid='true'] { 36 &:not(:checked) { 37 appearance: none; 38 border: 2px solid var(--danger-color); 39 border-radius: 50%; 40 } 41 &:checked { 42 appearance: auto; 43 accent-color: var(--danger-color); 44 } 45 } 46 47 :not(:checked) { 48 border-color: var(--gray-60-color); 49 } 50 &:focus-visible { 51 outline: none !important; 52 } 53 } 54 55 label { 56 margin-left: 4px; 57 padding: 0; 58 59 &.invalid { 60 color: var(--danger-color) !important; 61 } 62 63 &::before, 64 &::after { 65 display: none; 66 } 67 } 68 } 69 70 .lang-wrap { 71 margin-top: 29px; 72 } 73 } 74 75 .nordic-info-sec { 76 padding: 16px; 77 } 78`,K=(0,P.Ay)(B.A)` 79 height: 18px; 80 width: 18px; 81`;var Q=i(41397),z=i(68092),G=i(11961),W=i(43762),$=i(92526),H=i(50659);const q=e=>(0,Q.get)(e,`data.addFileToDraftOrder.orderDocuments[${e.data.addFileToDraftOrder.orderDocuments.length-1}]`,null),Z=()=>{const e=(0,r.jL)(),{filingType:l,uploadStates:i,isFormSubmitted:s,setUploadStates:t,setIsFormSubmitted:m,setFormPristine:p,handleAddToOrder:g}=(0,o.y)(d),u=(0,r.GV)($.tE),x=(0,r.GV)(A.XJ),h=(0,r.GV)(e=>(0,n.uN)(e,c.pt[l||1])),v=(0,a.useCallback)(e=>({accountNumber:u,draftOrderId:x,file:e,fileType:l?c.pt[l]:W.db.RELEASE_DOCUMENT}),[u,x,l]),f=(0,a.useCallback)((l,i)=>{const a=(0,Q.get)(l,"data.addFileToDraftOrder.orderDocuments",[]);e((0,H.ok)({path:"orderDocuments",value:a}))},[e]),{fileStates:y,fileCount:b,errorStatus:F,removeFile:R,attachFiles:j,startUpload:N,isUploading:C,processFilesValidation:S,attachedFiles:E}=(0,z.l)(G.Il,v,q,f,{fileLimit:c.UR.releaseFiles.fileLimit,fileUploadConcurrency:c.UR.releaseFiles.uploadConcurrency,preloadedFilesData:h,constraints:{validateType:!0,allowedFileTypes:c.UR.releaseFiles.validMimeTypes,fileTypeRegex:c.UR.releaseFiles.fileTypeRegex,fileTypeMessagei18Params:["errorCodes:FILE_TYPE","File type is not supported."],validateSize:!0,allowedFileSizeKB:c.UR.releaseFiles.maxSizeKB,fileSizeMessagei18Params:["errorCodes:FILE_SIZE",{size:c.UR.releaseFiles.maxSizeKB/1e3+"MB"}],validateSpecialCharactersInName:!0,blacklistedSpecialCharactersInName:c.UR.releaseFiles.blacklistedSpecCharsPattern,autoUpload:!1}}),I=(0,a.useCallback)(e=>j(e),[j,t,p]);return(0,r.w5)(()=>{i.shouldValidateFiles&&((async()=>{const{isAllFilesValid:e}=await S();e?(await g(),N()):m(!1)})(),t(e=>({...e,shouldValidateFiles:!1})))},[i.shouldValidateFiles]),(0,a.useEffect)(()=>t(e=>({...e,fileCount:b})),[b]),(0,r.w5)(()=>{const e=b>0&&!C&&Object.values(y).every(e=>null===e||void 0===e?void 0:e.isValid);!e&&s&&(m(!1),p(e=>({...e,isDocumentPristine:!0}))),t(l=>({...l,isUploadInterupted:Object.keys(F).length>0,isUploading:C,areFilesValidAndUploaded:e}))},[C]),(0,r.w5)(()=>{const e=Object.keys(E).filter(e=>((e,l)=>e[l].isAttached&&e[l].isValid&&e[l].isUploadInitialized&&e[l].documentId)(E,e));e.length&&t(l=>({...l,attachedValidDocIds:e.map(e=>{var l;return(null===(l=E[e])||void 0===l?void 0:l.documentId)||0})})),p(e=>({...e,isDocumentPristine:!1}))},[JSON.stringify(E)]),{fileCount:b,fileStates:y,handleAttachFiles:I,removeFile:R}},X=P.Ay.div` 82 background-color: var(--white-color); 83 overflow: hidden; 84 min-height: 55px; 85 border: 1px solid var(--white-color); 86 cursor: pointer; 87 88 &.selected { 89 background-color: var(--active-file-item-bg-color) !important; 90 border: 1px solid var(--active-file-item-border-color) !important; 91 } 92 93 .action { 94 width: 30px; 95 margin: 0px 5px; 96 97 &.valid svg { 98 fill: var(--gray-80-color); 99 } 100 } 101 102 button[disabled] > svg { 103 fill: var(--gray-60-color) !important; 104 } 105 106 .file-icon-wrapper { 107 svg path { 108 fill: var(--gray-60-color); 109 } 110 111 &.valid svg path { 112 fill: var(--gray-80-color); 113 } 114 } 115 116 .file-name-wrapper { 117 flex: 1; 118 padding-left: 8px; 119 padding-right: 15px; 120 overflow: hidden; 121 } 122 123 .file-action-wrapper { 124 display: flex; 125 align-items: center; 126 justify-content: end; 127 128 button.action { 129 border: none; 130 background-color: transparent; 131 } 132 } 133`;var J=i(11249),Y=i(56943),ee=i(83119),le=i(20909);const ie=e=>{let{tooltipMessage:l,invalidityType:i}=e;const[a]=(0,s.B)(),[t,o]=l;return(0,j.jsx)(u.A,{placement:"bottom",trigger:["hover","click","focus"],overlay:(0,j.jsx)(x.A,{className:"tooltip-body body-text",id:"uniq","data-testid":"tooltip",children:a(t,o)}),children:(0,j.jsx)("button",{className:"status-indicator action",type:"button","aria-label":"status","data-testid":"status-button",children:Object.keys(W.ty).includes(i||"")?(0,j.jsx)(h.In,{name:"warning",fill:"#DE4543","data-testid":"warning-icon"}):(0,j.jsx)(le.h,{"data-testid":"warning-wcag-icon"})})})};var ae=i(73178),se=i(64687),te=i(13531);const oe=e=>
133{let{fileKey:l,fileInfo:{isUploading:i,isValid:t,invalidityType:r,isUploadInitialized:n,name:c,documentId:m,message:p},onRemove:g}=e;const[u]=(0,s.B)(),x=(0,Y.gm)(c||""),{addNotification:h,removeNotification:v}=(0,o.y)(ae.V),{isFormSubmitted:f,isModalBlocked:y,uploadStates:b,setToBeDeletedDocIds:F,setFormPristine:N}=(0,a.useContext)(d),C=e=>{e.preventDefault(),e.stopPropagation(),y&&1===b.fileCount||g&&!i&&(t&&m?(g(l),N(e=>({...e,isDocumentPristine:!1})),F(e=>[...e,m||0])):g(l))},E=()=>{const[e,l]=p||[];return f?`${u(e,l)}. ${u("createRelease:regDeleteFilesBeforeUploading","Please delete before uploading new file.")}`:u(e,l)};return(0,a.useEffect)(()=>{!t&&f&&(r===W.ty.CORRUPT&&h({type:"error",subtitle:E(),id:ee.Od.cprErrorCorrupt}),r===W.zu.SIZE&&h({type:"warning",subtitle:E(),id:ee.Od.cprWarningFileSize}),r===W.zu.TYPE&&h({type:"warning",subtitle:E(),id:ee.Od.cprWarningFileType}))},[t,r,p,f]),(0,a.useEffect)(()=>()=>{v(ee.Od.cprErrorCorrupt),v(ee.Od.cprWarningFileSize),v(ee.Od.cprWarningFileType)},[v]),(0,j.jsxs)(X,{"data-testid":"file-item",className:"omc-flex omc-items-center",children:[(0,j.jsx)("div",{className:"omc-w-[80%] omc-p-4",children:(0,j.jsxs)("div",{className:"omc-flex",children:[(0,j.jsx)("div",{className:(0,R.A)(t?"valid":"","file-icon-wrapper"),children:(0,j.jsx)(S.U,{})}),(0,j.jsxs)("div",{className:(0,R.A)(t?" omc-text-neutral-800":"omc-text-gray-60","file-name-wrapper","omc-flex","omc-text-xl omc-font-medium"),children:[(0,j.jsx)("div",{"data-testid":"file-name ",className:"ellipsify-1 file-name omc-max-w-[350px]",children:x.name||"Untitled"}),(0,j.jsx)("span",{"data-testid":"file-ext",className:"file-extension",children:x.ext})]})]})}),(0,j.jsx)("div",{className:"file-action-wrapper w-20",children:n?(0,j.jsx)(j.Fragment,{children:i?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("button",{"data-testid":"upload-loader",className:"omc-border-none omc-bg-transparent omc-p-0",type:"button","aria-label":"loader",children:(0,j.jsx)(J.h,{className:"spinner"})}),(0,j.jsx)("button",{className:"omc-border-none omc-bg-transparent omc-pr-4",disabled:!0,type:"button","aria-label":"close",children:(0,j.jsx)(te.U,{})})]}):t?(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("button",{"data-testid":"delete-btn",className:"omc-border-none omc-bg-white omc-pr-4",disabled:y,onClick:C,type:"button","aria-label":"delete",children:(0,j.jsx)(se.A,{className:"omc-text-black"})})}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("button",{"data-testid":"del-invalid-file-btn",className:"omc-border-none omc-bg-white omc-pr-4",onClick:C,type:"button","aria-label":"delete",children:(0,j.jsx)(se.A,{className:"omc-text-black"})}),r&&p?(0,j.jsx)(ie,{invalidityType:r,tooltipMessage:p}):null]})}):(0,j.jsxs)(j.Fragment,{children:[!t&&r&&p?(0,j.jsx)(ie,{invalidityType:r,tooltipMessage:p}):null,(0,j.jsx)("button",{"data-testid":"del",className:"omc-border-none omc-bg-transparent omc-pr-4",onClick:C,type:"button","aria-label":"close",children:(0,j.jsx)(te.U,{})})]})})]})},re=(0,a.memo)(oe),ne=e=>{let{fileStates:l,onRemove:i}=e;const[t]=(0,s.B)(),o=(0,a.useMemo)(()=>Object.keys(l),[l]);return(0,j.jsx)("div",{className:"omc-max-h-[111px] omc-overflow-y-auto","data-testid":"file-table",children:(0,j.jsxs)("div",{className:"omc-w-full omc-bg-white",children:[(0,j.jsxs)("div",{className:"omc-flex omc-border-bottom-dashed omc-pt-3 omc-pr-[18px] omc-pb-4 omc-pl-4",children:[(0,j.jsx)("div",{className:"omc-w-[80%]",children:(0,j.jsx)("p",{className:"omc-mb-0 omc-text-sm omc-font-normal omc-text-gray-80 omc-uppercase",children:t("createRelease:fileName","File Name")})}),(0,j.jsx)("div",{className:"omc-w-[20%]",children:(0,j.jsx)("p",{className:"omc-mb-0 omc-text-sm omc-font-normal omc-text-gray-80 omc-uppercase omc-text-end",children:t("general:actions","Actions")})})]}),(0,j.jsx)("div",{className:"files-wrapper",children:o.map(e=>(0,j.jsx)("div",{"data-testid":"remove-button",className:"omc-border-solid omc-border-b-[1px] omc-border-x-0 omc-border-t-0 omc-border-b-border-dashed last:omc-border-b-0",children:(0,j.jsx)(re,{fileKey:e,fileInfo:l[e],onRemove:i})},e))})]})})},ce=(0,a.memo)(ne),de=e=>{let{fileStates:l,onRemove:i}=e;return(0,j.jsx)("div",{"data-testid":"file-list",onClick:e=>{e.stopPropagation(),e.preventDefault()}
133,children:(0,j.jsx)(ce,{"data-testid":"file-table",fileStates:l,onRemove:i})})};var me=i(56156);const pe=()=>{const[e]=(0,s.B)(),l=(0,a.useRef)(null),{validation:i}=(0,o.y)(d),{fileCount:t,fileStates:r,handleAttachFiles:n,removeFile:m}=Z();return(0,j.jsxs)("div",{className:(0,R.A)("omc-bg-white ",null!==i&&void 0!==i&&i.documents?"":"invalid"),children:[(0,j.jsx)("div",{className:"omc-flex omc-justify-between omc-items-center",children:(0,j.jsx)("span",{className:"omc-typo-lg1-primary",children:e("createRelease:regQuickFilUploadDocs","Upload documents")})}),(0,j.jsx)(me.A,{isBtnDisabled:t>=c.UR.emailOrFaxFiles.fileLimit,onUploadBtnClick:()=>{l.current&&l.current.click()},isZeroFileUploadValidation:!1,className:"drag-drop-zone omc-mt-2",onAttach:n,ref:l,secondLineText:e("createRelease:releaseFileTypeSupported","Supported file types: .doc, .docx, .txt, .pdf, .xls, .xlsx, .csv, .pptx, .ppt, .html, .htm"),uploadBtnText:e("createRelease:uploadDocument","Upload Document")}),0!==t?(0,j.jsx)("div",{className:"file-list-wrapper omc-w-full omc-border omc-border-solid omc-border-border-dashed omc-mt-3 ",children:(0,j.jsx)(de,{fileStates:r,onRemove:m})}):null]})},ge=(0,a.memo)(pe),ue=()=>{const{filingType:e,filingMethod:l}=(0,o.y)(d);return(0,a.useMemo)(()=>{const i=l===p._.BRANDED_VERSION;return!e||e!==p.l.SEDAR||i},[e,l])?(0,j.jsx)(ge,{}):null},xe=(0,a.memo)(ue),he=()=>{const[e]=(0,s.B)(),{specialInsTxt:l,isModalBlocked:i,formPristine:a,setSpecialInsTxt:t,setFormPristine:r}=(0,o.y)(d);return(0,j.jsxs)("div",{className:"special-instruction-wrap bg-white",children:[(0,j.jsx)("span",{className:"omc-typo-lg1-primary",children:e("regFiling:splInsOptional","Special instructions (optional)")}),(0,j.jsx)(k.A,{children:(0,j.jsx)(k.A.Group,{className:"omc-mb-2",children:(0,j.jsx)(k.A.Control,{className:"omc-text-lg1 omc-font-medium omc-border omc-border-solid omc-border-border-dashed omc-mt-2 !omc-min-h-[80px]",as:"textarea",disabled:i,placeholder:e("createRelease:enterSpecialInstructions","Enter special instructions"),name:"specialInstruction",value:l,onChange:e=>{a.isMethodPristine&&r(e=>({...e,isMethodPristine:!1})),t(e.target.value)},maxLength:F.P5,"data-testid":"splIns-textArea"})})}),(0,j.jsx)("div",{className:"omc-flex omc-justify-between",children:(0,j.jsx)("span",{className:"omc-text-sm omc-font-medium omc-text-neutral-400",children:e("regFiling:splInsEnteredCharacter",{count:(l||"").length,limit:F.P5})})})]})},ve=(0,a.memo)(he);var fe=i(84508);const ye=()=>{const{isFormSubmitted:e,filingMethod:l,filingType:i,uploadStates:a,formPristine:s,addToOrderClickCount:t,setUploadStates:n,setValidation:c,setIsFormSubmitted:m,setAddToOrderClickCount:g,handleAddToOrder:u,handleToBeDeletedDocs:x,handleReset:h,selectedLanguage:v}=(0,o.y)(d),f=i===p.l.CANADIAN_SECURITIES||i===p.l.NORDIC_DISCLOSURE,y=()=>{const e=(()=>{const e=f||void 0!==l,s=i===p.l.SEDAR;return{fillingMethod:e,documents:i===p.l.SEDAR&&l===p._.WIRE_VERSION||a.fileCount>0,languageSelected:!s||v["en-CA-REG"]||v["fr-CA-REG"]}})();return c(e),Object.values(e).every(e=>e)},b=()=>{const{isMethodPristine:e,isDocumentPristine:a}=s;e&&a?h():(async()=>{f||i===p.l.FORM8K||l===p._.BRANDED_VERSION?n(e=>({...e,shouldValidateFiles:!0})):(await u(),h())})()};(0,r.bN)(()=>{t>0&&y()},[l,a,t,v]),(0,r.w5)(()=>{e&&(g(e=>e+1),y()?b():m(!1))},[e]),(0,r.bN)(()=>{!a.isUploadInterupted&&a.areFilesValidAndUploaded&&(x(),h())},[a.areFilesValidAndUploaded],100)};var be=i(71978);const Fe=()=>{const[e]=(0,s.B)(),{navigateTo:l}=(0,r.Zp)(),{isModalBlocked:i,filingType:a}=(0,o.y)(d),t=()=>{i||l(F.ut.regFilingBase)},n=e=>{e.preventDefault(),F.x0.includes(e.code)&&e.currentTarget.click()};return(0,j.jsx)("div",{className:"omc-bg-primary-100 omc-rounded omc-p-4 omc-w-full",children:(0,j.jsxs)("div",{className:"omc-flex omc-items-center omc-typo-lg1-primary",children:[(0,j.jsx)(be.h,{className:"omc-min-w-6"}),(0,j.jsx)("div",{className:"omc-ml-3",children:(()=>{switch(a){case p.l.SEDAR:return(0,j.jsxs)("ul",{className:"omc-typo-lg1-primary omc-list-disc",children:[(0,j.jsx)("li",{children:e("createRelease:regQuickFilSEDARNOTE1","Requests received after 11:00 PM will be processed the following business day.")}),(0,j.jsx)("li",{children:e("createRelease:regQuickFilSEDARNOTE2","Press releases referencing an NCIB (Normal-Course Issuer Bid) require an extra level of confirmation. You will receive an email from our Regulatory Filing team to go over the information needed to file on SEDAR+")}),(0,j.jsxs)("li",{children:[e("createRelease:regQuickFilSEDARDESC2","SEDAR+ Requests with no news release can be uploaded")," ",(0,j.jsx)("u",{tabIndex:0,onKeyUp:n,onClick:t,className:"cursor-pointer","data-testid":"redirect-btn",children:e("createRelease:here."," here.")})]})]});case p.l.CANADIAN_SECURITIES:return(0,j.jsx)("p",{className:"omc-mb-0 omc-typo-lg1-primary",children:e("createRelease:regQuickFilSEDARNOTE1","Requests received after 11:00 PM will be processed the following business day.")});case p.l.NORDIC_DISCLOSURE:return(0,j.jsx)("p",{className:"omc-mb-0 omc-typo-lg1-primary",children:e("regFiling:nordicDisclosureInfoContent2","As Nordic Disclosure and wire dissemination must go out simultaneously, please ensure you give both departments enough time to process the release and any changes you may submit.")});default:return(0,j.jsx)(j.Fragment,{})}})()})]})})},Re=()=>{const[e]=(0,s.B)();ye();const{editFiling:l,openQuickView:i,filingType:t=p.l.SEDAR,isModalBlocked:r,setIsFormSubmitted:n,handleCancelFiling:c}=(0,o.y)(d),m=fe.i5[t].title,g=fe.i5[t].description1,u=(0,a.useMemo)(()=>r?l?e("createRelease:regQuickFilUpdating","Updating..."):e("createRelease:regQuickFilAddingToOrder","Adding..."):l?e("createRelease:regQuickFilUpdate","Updating"):e("createRelease:regQuickFilAddToOrder","Add to Order"),[r,l,e]);return(0,j.jsx)(w.Jlq,{open:i,onOpenChange:c,children:(0,j.jsxs)(w._cd,{className:"!omc-p-0 !omc-gap-0 !omc-max-w-[600px] omc-overflow-y-scroll omc-max-h-screen",children:[(0,j.jsx)(w.wMf,{className:"omc-px-4 omc-py-3 omc-border omc-border-solid omc-border-b omc-border-w omc-border-x-0 omc-border-t-0 omc-border-neutral-300",children:(0,j.jsxs)("div",{className:"omc-flex omc-items-center omc-justify-between",children:[(0,j.jsx)(w.fCQ,{className:"omc-mb-0 omc-tracking-normal",children:(0,j.jsx)("span",{className:"omc-text-xl omc-font-medium omc-text-neutral-800",children:e("createRelease:regFilings","Regulatory Compliance Filings")})}),(0,j.jsx)(w.Xhe,{children:(0,j.jsx)(w.t2X,{asChild:!0,children:(0,j.jsx)(w.U8o,{variant:"tertiary",size:"sm",className:"!omc-text-neutral-600",children:(0,j.jsx)(w.Gn1,{name:"close",className:"!omc-size-5"})})})})]})}),(0,j.jsxs)(L,{children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"omc-typo-1xl-primary !omc-text-black omc-mb-2",children:e(m)}),(0,j.jsx)("p",{className:"omc-typo-lg1-secondary",children:e(g)})]}),(0,j.jsx)(M,{}),(0,j.jsx)(xe,{}),(0,j.jsx)(ve,{}),t!==p.l.FORM8K&&(0,j.jsx)(Fe,{})]}),(0,j.jsx)(w.s$1,{className:"omc-border-t-[1px] omc-border-x-0 omc-border-b-0 omc-border-solid omc-border-neutral-300 omc-flex omc-justify-end omc-p-3",children:(0,j.jsxs)(w.Xhe,{children:[(0,j.jsx)(w.ben,{size:"md",variant:"tertiary",className:"!omc-text-[14px] !omc-border-none
133!omc-text-omc-blue !omc-bg-white",onClick:c,children:e("createRelease:cancel","Cancel")}),(0,j.jsxs)(w.ben,{size:"md",variant:"primary",className:"!omc-text-[14px]",onClick:r?void 0:()=>n(!0),"data-testid":"submit-btn",children:[r&&(0,j.jsx)(K,{className:"spinner omc-mr-1.5","data-testid":"loader-icon-white"}),u]})]})})]})})},je=(0,a.memo)(Re);var Ne=i(81525),Ce=i(3165);P.Ay.div` 134 .body-wrapper { 135 display: flex; 136 flex-direction: column; 137 gap: 10px; 138 139 .gray-container-wrapper { 140 display: flex; 141 flex-direction: column; 142 gap: 8px; 143 144 padding: 10px 11px; 145 border-radius: 4px; 146 147 background-color: var(--gray-10-color); 148 149 svg { 150 path { 151 fill: var(--gray-80-color); 152 } 153 } 154 } 155 } 156 157 .fillings-options { 158 .file-text { 159 color: var(--primary-color-blue); 160 } 161 162 .cursor-default { 163 cursor: default !important; 164 } 165 166 .cursor-pointer { 167 cursor: pointer; 168 } 169 } 170 171 .special-instruction-wrap { 172 form { 173 textarea { 174 resize: none !important; 175 } 176 } 177 } 178`;const Se=(0,P.Ay)(h.aF)` 179 .rvr-Header__1pt { 180 display: flex; 181 align-items: center; 182 justify-content: space-between; 183 background-color: var(--danger-light-color); 184 border-bottom: 1px solid var(--danger-color); 185 186 .title { 187 display: flex; 188 align-items: center; 189 font-size: 16px; 190 font-weight: 400; 191 line-height: 24px; 192 color: var(--gray-90-color); 193 194 svg { 195 margin-right: 9px; 196 fill: var(--danger-color); 197 } 198 } 199 } 200 .rvr-Body__1Bf { 201 padding: 24px 16px; 202 font-size: 14px; 203 font-weight: 400; 204 line-height: 24px; 205 } 206 .rvr-Footer__29t { 207 display: flex; 208 justify-content: flex-end; 209 padding: 8px; 210 } 211`,Ee=()=>{var e,l;const[i]=(0,s.B)(),{filingType:t="Reg_Sedar",openDeleteModal:o,isModalBlocked:r,handleDeleteModalVisibility:n,handleDeleteFiling:c}=(0,a.useContext)(d),m=()=>n(!1,void 0);return(0,j.jsxs)(Se,{isOpen:o,onClose:r?void 0:m,children:[(0,j.jsxs)(Se.Header,{children:[(0,j.jsx)("span",{className:"body-16",children:i("createRelease:regDeleteFiling","Delete Filing")}),(0,j.jsx)(h.$n,{"aria-label":"close",onClick:()=>n(!1,void 0),level:"tertiary",size:"sm",className:"bg-transparent border-0 text-gray-80 p-0","data-testid":"close-btn",children:(0,j.jsx)(te.U,{})})]}),(0,j.jsxs)(Se.Body,{className:"d-flex flex-column",children:[(0,j.jsx)("h3",{children:i("createRelease:regDeleteFilInfo","You are deleting a regulatory compliance filing")}),(0,j.jsxs)("span",{className:"body-14",children:[i("createRelease:regDeleteFileDescPart1","Delete the "),i(null===(e=Ne.i[null===t||void 0===t?void 0:t.toLowerCase()])||void 0===e?void 0:e.key,null===(l=Ne.i[null===t||void 0===t?void 0:t.toLowerCase()])||void 0===l?void 0:l.value)," ",i("createRelase:regDeleteFileDescPart2","filing")]})]}),(0,j.jsxs)(Se.Footer,{children:[(0,j.jsx)(h.$n,{level:"tertiary",disabled:r,onClick:m,"data-testid":"cancel-btn",children:i("createRelease:regQuickFilCancel","Cancel")}),(0,j.jsxs)(h.$n,{level:"danger",className:"ms-3",onClick:r?void 0:c,children:[r&&(0,j.jsx)(K,{className:"spinner omc-mr-1.5","data-testid":"loader-icon-white"}),r?i("createRelease:regDeletingFil","Deleting..."):i("createRelease:regDeleteFil","Delete")]})]})]})},Ie=()=>{const[e]=(0,s.B)(),l=(()=>{const{filingTypes:e,saveRegulatoryFilings:l,deleteFilingDocFiles:i,...s}=(0,Ce.r)(),[t,o]=(0,a.useState)(void 0),[d,m]=(0,a.useState)({}),[g,u]=(0,a.useState)(void 0),[x,h]=(0,a.useState)(""),[v,f]=(0,a.useState)({}),[y,b]=(0,a.useState)(0),[F,R]=(0,a.useState)(!1),[j,N]=(0,a.useState)(!1),[C,S]=(0,a.useState)(fe.T9),[E,I]=(0,a.useState)(!1),[D,O]=(0,a.useState)([]),[w,k]=(0,a.useState)(!1),[A,T]=(0,a.useState)(fe.xL),[_,U]=(0,a.useState)(fe.EV),V=(0,r.GV)(e=>(0,n.uN)(e,c.pt[t||""])),M=(0,a.useMemo)(()=>s.savingRFTypes||s.deletingDocs||_.isUploading,[s.savingRFTypes,_.isUploading,s.deletingDocs]),B=function(){let l=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const a=(t||"").toLowerCase();if(i)return Object.keys(d).map(e=>d[e]);const s=l?(0,Q.omit)(e,a):{...e,[a]:{...l?Ne.K[a]:e[a],regFilingTypeId:fe.wc[t||p.l.SEDAR]||null,...g?{methodOfFilingTypeId:fe.rl[g]}:{},methodOfFilingEng:v["en-CA-REG"],methodOfFilingFR:v["fr-CA-REG"],specialInstructions:x}};return Object.keys(s).map(e=>s[e])},P=async()=>{try{await l(B(!0)),await i(Object.keys(V).map(e=>{var l;return(null===(l=V[e])||void 0===l?void 0:l.documentId)||0})||[]),K()}catch(e){}},L=(0,Q.debounce)(()=>{o(void 0),u(void 0),f({}),S(fe.T9),h(""),O([]),I(!1),N(!1),k(!1),T(fe.xL),U(fe.EV),m({}),b(0)},300),K=()=>{R(!1),L()};return(0,r.w5)(()=>{F&&m(e)},[F]),{isModalBlocked:M,filingType:t,filingTypes:e,filingMethod:g,isFormSubmitted:w,formPristine:A,openQuickView:F,editFiling:E,openDeleteModal:j,uploadStates:_,validation:C,selectedLanguage:v,specialInsTxt:x,addToOrderClickCount:y,setFilingMethod:u,setIsFormSubmitted:k,setFormPristine:T,setFilingType:
211o,setOpenQuickView:R,setSelectedLanguage:f,setSpecialInsTxt:h,setToBeDeletedDocIds:O,setUploadStates:U,setValidation:S,setAddToOrderClickCount:b,handleRegFilingTypeChange:e=>{o(e),R(!0)},handleReset:K,handleAddToOrder:()=>new Promise(async e=>{if(A.isMethodPristine)e(!0);else{if(await l(B(!1)),e(!0),Object.keys(V).length!==_.fileCount)return;const a=Object.keys(V).length>0,s=t===p.l.SEDAR&&g===p._.WIRE_VERSION&&a?Object.keys(V).map(e=>{var l;return(null===(l=V[e])||void 0===l?void 0:l.documentId)||0}):[];await i(s)}}),handleEditFiling:l=>{var i,a,s,t;o(l),R(!0),I(!0);const r=(l||"").toLowerCase();u(null===(i=e[r])||void 0===i?void 0:i.methodOfFiling),f({"en-CA-REG":null===(a=e[r])||void 0===a?void 0:a.methodOfFilingEng,"fr-CA-REG":null===(s=e[r])||void 0===s?void 0:s.methodOfFilingFR}),h((null===(t=e[r])||void 0===t?void 0:t.specialInstructions)||"")},handleDeleteFiling:P,handleDeleteModalVisibility:(e,l)=>{o(l),N(e)},handleCancelFiling:()=>{var e,a;const{isUploadInterupted:s,attachedValidDocIds:o}=_,r=(t||"").toLowerCase();return!s||null!==(e=d[r])&&void 0!==e&&e.regFilingTypeId?s&&(null===(a=d[r])||void 0===a?void 0:a.methodOfFiling)!==g?(l(B(!1,!0)),i(_.attachedValidDocIds),void K()):s&&o.length?(i(_.attachedValidDocIds),void K()):void K():(P(),void K())},handleToBeDeletedDocs:async()=>{await i(D),O([])},...s}})();return(0,j.jsx)(t.A,{fluid:!0,className:"!omc-p-0",children:(0,j.jsxs)("div",{className:"omc-bg-white omc-flex omc-flex-col ",children:[(0,j.jsxs)("div",{className:"omc-flex omc-flex-col omc-gap-1",children:[(0,j.jsx)("p",{className:"omc-typo-1xl-primary omc-mb-0",children:e("regFiling:regulatoryFilingOptional","Regulatory filing (optional)")}),(0,j.jsxs)("span",{className:"omc-typo-lg1-secondary ",children:[e("createRelease:regContactInfo","If you have any questions regarding Regulatory Filing, please call 1-800-825-6133 or e-mail"),"\xa0",(0,j.jsx)("a",{className:"text-gray-90",href:"mailto:[email protected]",children:"[email protected]"})]})]}),(0,j.jsxs)(d.Provider,{value:l,children:[(0,j.jsxs)("div",{className:"fillings-options",children:[(0,j.jsx)(E,{}),(0,j.jsx)(I,{}),(0,j.jsx)(D,{}),(0,j.jsx)(O,{})]}),(0,j.jsx)(je,{}),(0,j.jsx)(Ee,{})]})]})})},De=(0,a.memo)(Ie)}}]);
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.