1(this.webpackJsonpsynclodgeclient=this.webpackJsonpsynclodgeclient||[]).push([[19],{1078:function(e,t,n){"use strict";n.r(t);var s=n(1),c=n(722),a=n(21),o=n(33),r=n(893),i=n(10),l=n(9),d=n(38),u=n(0);const j=Object(l.b)(Object(i.b)((()=>{var e,t,n,j;const{t:b}=Object(d.a)(),m=Object(i.a)(),{setError:p}=Object(l.a)(),h=Object(a.b)(),O=Object(o.h)(),[x,g]=Object(s.useState)([]),[y,f]=Object(s.useState)([]),[v,R]=Object(s.useState)(!1),[C,q]=Object(s.useState)("NEW"),[N,w]=Object(s.useState)(""),{spotId:E,projectId:F,spotSongId:T}=Object(o.i)(),S=(e,t,n)=>{var s;h("project_id",F),h("spot_id",E),h("spot_song_id",T),h("project_name",e),h("spot_name",t),h("spot_song_name",n),w(null===O||void 0===O||null===(s=O.state)||void 0===s?void 0:s.songContractRequestId)};return Object(s.useEffect)((()=>{(async()=>{try{if(m(!0),null!==O&&void 0!==O&&O.state){var e,t,n,s,a,o,r;let i;i=O.state.songContractRequestId?await Object(c.j)(O.state.songContractRequestId):await Object(c.i)(O.state.quoteRequestId,O.state.copyrightHolderId),S(null===(e=i)||void 0===e||null===(t=e.quoteRequest)||void 0===t||null===(n=t.projectInfo)||void 0===n?void 0:n.projectName,null===(s=i)||void 0===s||null===(a=s.quoteRequest)||void 0===a?void 0:a.spotTitle,null===(o=i)||void 0===o||null===(r=o.quoteRequest)||void 0===r?void 0:r.songTitle),i&&i.id&&(f(i.contractRequestNotes),q(i.status),g(i.contracts),w(i.id))}}catch(i){p("getSongRequest.error",b("errorLoadingSongReq"))}finally{m(!1)}})()}),[v]),Object(u.jsx)("div",{className:"syn-contract-request-panel syn-general-panel",children:Object(u.jsx)(r.a,{refreshContracts:()=>{R(!v)},contracts:x,setContracts:g,notes:y,setNotes:f,songContractRequestStatus:C,spotSongTitle:null===O||void 0===O||null===(e=O.state)||void 0===e?void 0:e.spotSongTitle,spotSongArtist:null===O||void 0===O||null===(t=O.state)||void 0===t?void 0:t.spotSongArtist,projectId:F,copyrightHolderId:null===O||void 0===O||null===(n=O.state)||void 0===n?void 0:n.copyrightHolderId,quoteRequestId:null===O||void 0===O||null===(j=O.state)||void 0===j?void 0:j.quoteRequestId,songContractRequestId:N,isMessage:!1})})})));t.default=j},684:function(e,t,n){"use strict";n(1);var s=n(177),c=n(704),a=(n(437),n(0));t.a=e=>{let{name:t,placeholder:n,label:o,value:r,componentRef:i,validationErrors:l,suffix:d,id:u,format:j,className:b,onChange:m,onFocus:p,onBlur:h,readOnly:O,formId:x}=e;return Object(a.jsxs)("div",{className:"syn-general-input-with-label-wrapper",children:[o&&Object(a.jsx)(s.a.Label,{children:o}),Object(a.jsx)("div",{className:"syn-general-input-wrapper syn-general-formated-input",children:Object(a.jsx)(c.a,{id:u,name:t,getInputRef:i,placeholder:n,className:b,format:j,onChange:m,value:r,suffix:d,onFocus:p,onBlur:h,readOnly:O,validationErrors:l,formId:x})})]})}},694:function(e,t,n){"use strict";var s=n(3),c=(n(1),n(655)),a=n(155),o=n(90),r=n(43),i=n(38),l=n(685),d=n(700),u=n(697),j=n(698),b=n(0);t.a=e=>{let{company:t,companyType:n,refreshData:m,paymentMethod:p,setPaymentMethod:h,showSaveForFutureUse:O=!0,showEditAddress:x=!0,formId:g}=e;const{t:y}=Object(i.a)();return Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)("div",{className:"w-100 text-center",children:[Object(b.jsx)("p",{children:y("paymentMethod")}),Object(b.jsxs)(c.a,{className:"mt-3 mb-4",children:[Object(b.jsx)(a.a,{variant:"primary",id:"syn-accept-quote-request-bank-payment-method",onClick:()=>{h(Object(s.a)(Object(s.a)({},p),{},{type:"BANK"}))},className:"BANK"===(null===p||void 0===p?void 0:p.type)&&"active",children:y("unionFeeBankTransfer")}),Object(b.jsx)(a.a,{variant:"primary",id:"syn-accept-quote-request-postedcheque-payment-method",onClick:()=>{h(Object(s.a)(Object(s.a)({},p),{},{type:"POSTEDCHEQUE"}))},className:"POSTEDCHEQUE"===(null===p||void 0===p?void 0:p.type)&&"active",children:y("unionFeeCheque")}),Object(b.jsx)(a.a,{id:"syn-accept-quote-request-other-payment-method",variant:"primary",onClick:()=>{h(Object(s.a)(Object(s.a)({},p),{},{type:"OTHER"}))},className:"OTHER"===(null===p||void 0===p?void 0:p.type)&&"active",children:y("unionFeeOther")})]})]}),"BANK"===(null===p||void 0===p?void 0:p.type)&&Object(b.jsx)(d.a,{paymentMethod:p,setPaymentMethod:h}),"POSTEDCHEQUE"===(null===p||void 0===p?void 0:p.type)&&Object(b.jsx)(j.a,{companyType:n,refreshData:m,paymentMethod:p,setPaymentMethod:h,c
1ompany:t,companyAddress:null===t||void 0===t?void 0:t.address,formId:g,showEditAddress:x}),"OTHER"===(null===p||void 0===p?void 0:p.type)&&Object(b.jsx)(u.a,{paymentMethod:p,setPaymentMethod:h}),O&&"OTHER"!==(null===p||void 0===p?void 0:p.type)&&Object(b.jsx)("div",{className:"m-3",children:Object(b.jsxs)(o.a,{children:[Object(b.jsx)(r.a,{xs:"auto",children:Object(b.jsx)(l.a,{checked:!p||(null===p||void 0===p?void 0:p.saveForFutureUse),onChange:()=>h(Object(s.a)(Object(s.a)({},p),{},{saveForFutureUse:!(null!==p&&void 0!==p&&p.saveForFutureUse)}))})}),Object(b.jsx)(r.a,{className:"pl-0",children:Object(b.jsx)("p",{children:y("quoteReqMsgPaymentInfo")})})]})})]})}},704:function(e,t,n){"use strict";n(1);var s=n(104),c=n(288),a=n(29),o=n(0);t.a=e=>{let{name:t,placeholder:n,label:r,value:i,componentRef:l,validationErrors:d,suffix:u,id:j,format:b,className:m,onChange:p,onFocus:h,onBlur:O,readOnly:x,formId:g}=e;const{markDirty:y}=Object(a.b)();return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(c.a,{format:b,id:j,placeholder:n,className:"".concat(m," w-100"),onValueChange:(e,t)=>
1((e,t)=>{p&&"prop"!==(null===t||void 0===t?void 0:t.source)&&(p(e),y(g))})(e.floatValue,t),getInputRef:l,name:t,defaultValue:i,value:i,suffix:u,onFocus:h,onBlur:O,readOnly:x}),d&&d.length>0&&Object(o.jsx)(s.a,{validationError:d[0]})]})}},707:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n(1),n(734);var s=n(0);const c={pending:"pending",accepted:"accepted",rejected:"rejected"};t.b=e=>{let{text:t,status:n}=e;return Object(s.jsx)("div",{children:Object(s.jsx)("span",{className:"syn-general-status ".concat((()=>{switch(n){case c.accepted:return"syn-status-accepted";case c.rejected:return"syn-status-rejected";case c.pending:default:return"syn-status-pending"}})()),children:t})})}},722:function(e,t,n){"use strict";n.d(t,"m",(function(){return c})),n.d(t,"j",(function(){return a})),n.d(t,"i",(function(){return o})),n.d(t,"g",(function(){return r})),n.d(t,"l",(function(){return i})),n.d(t,"c",(function(){return l})),n.d(t,"k",(function(){return d})),n.d(t,"f",(function(){return u})),n.d(t,"o",(function(){return j})),n.d(t,"e",(function(){return b})),n.d(t,"n",(function(){return m})),n.d(t,"d",(function(){return p})),n.d(t,"h",(function(){return h})),n.d(t,"b",(function(){return O})),n.d(t,"a",(function(){return x}));var s=n(2);const c=async(e,t,n)=>await Object(s.c)("/api/copyrightHolder/sendContracts",{quoteRequestId:e,contractRequestNote:t,copyrightHolderId:n}),a=async e=>await Object(s.b)("/api/copyrightHolder/getSongContractRequest?songContractRequestId=".concat(e)),o=async(e,t)=>await Object(s.b)("/api/copyrightHolder/getSongContractContentRequest?quoteRequestId=".concat(e,"©rightHolderId=").concat(t)),r=async e=>await Object(s.c)("/api/contractRequest/msgInfo?messageId=".concat(e)),i=async(e,t)=>await Object(s.c)("/api/contractRequest/reply?songContractRequestId=".concat(e),{contractRequestNote:t}),l=async(e,t)=>await Object(s.c)("/api/contractRequest/confirmContracts?songContractRequestId=".concat(e),{contractRequestNote:t}),d=async(e,t)=>await Object(s.c)("/api/contractRequest/reopenContracts?songContractRequestId=".concat(e),{contractRequestNote:t}),u=async(e,t)=>{let n="/api/contractRequest/deleteContracts?songContractRequestId=".concat(e);return await Object(s.c)(n,{contractRequestNote:t})},j=async e=>await Object(s.c)("/api/contract/uploadNewContractVersion",e),b=async e=>{let t="/api/contractVersion/delete?versionId=".concat(e);return await Object(s.c)(t)},m=async(e,t)=>{let n="/api/contractVersion/setCurrentVersion?contractId=".concat(e,"&versionId=").concat(t);return await Object(s.c)(n)},p=async e=>{let t="/api/contract/delete?contractId=".concat(e);return await Object(s.c)(t)},h=async e=>await Object(s.b)("/api/contractVersion/downloadFile?versionId=".concat(e),{responseType:"blob"}),O=async(e,t)=>await Object(s.c)("/api/copyrightHolder/sendContractsOffline",{quoteRequestId:e,copyrightHolderId:t}),x=async e=>await Object(s.c)("/api/contract/addContracts",e)},729:function(e,t,n){"use strict";var s=n(3),c=n(1),a=n(90),o=n(43),r=n(253),i=n(38),l=n(16),d=n(71),u=n(157),j=n(674),b=n(91),m=n(17),p=n(33),h=n(685),O=n(32),x=n(294),g=n(745),y=n(30),f=n(28),v=n(684),R=n(39),C=n(9),q=(n(759),n(10)),N=n(26),w=n(733),E=n(694),F=n(53),T=n(36),S=n(0);const k=Object(C.b)(Object(q.b)((e=>{let{quoteRequestId:t,copyrightHolderId:n}=e;const{t:k}=Object(i.a)(),I=Object(q.a)(),{loginSession:A}=Object(c.useContext)(O.a),{setError:_}=Object(C.a)(),{sendEvent:D,currentlanguageOption:M}=Object(N.a)(),[B,L]=Object(c.useState)(!1),P=Object(p.g)(),[H,U]=Object(c.useState)(),[V,W]=Object(c.useState)(!1),[z,Q]=Object(c.useState)(!1),[G,Y]=Object(c.useState)(!1),[Z,X]=Object(c.useState)(""),[J,K]=Object(c.useState)(!1),[$,ee]=Object(c.useState)(!1),[te,ne]=Object(c.useState)(!1),[se,ce]=Object(c.useState)(!1),[ae,oe]=Object(c.useState)(),[re,ie]=Object(c.useState)(!1),[le,de]=Object(c.useState)(!0);Object(c.useEffect)((()=>{(async()=>{try{var e,c;I(!0);const a=await Object(u.o)(t,n);U(a),oe(null!==a&&void 0!==a&&null!==(e=a.copyrightCompany)&&void 0!==e&&e.paymentMethod?Object(s.a)(Object(s.a)({},null===a||void 0===a||null===(c=a.copyrightCompany)||void 0===c?void 0:c.paymentMethod),{},{saveForFutureUse:!0}):null)}catch(o){var a;403===(null===o||void 0===o||null===(a=o.response)||void 0===a?void 0:a.status)?de(!1):_("syn-spot-song-remove-error",k("quoteRequestError"),!0)}finally{I(!1)}})()}),[G]);const ue=()=>{Y(!G)};return Object(S.jsx)(a.a,{className:"syn-qoute-request-message-data-wrapper",children:Object(S.jsx)(o.a,{xs:12,children:le?Object(S.jsx)(S.Fragment,{children:H&&H.deleted?Object(S.jsxs)("div",{className:"syn-qoute-request-message-deleted-ownership-message-wrapper",children:[Object(S.jsx)("div",{className:"syn-qoute-request-message-deleted-ownership-message-image-wrapper",children:Object(S.jsx)(r.a,{src:x.a})}),Object(S.jsx)("div",{className:"syn-qoute-request-message-deleted-ownership-message",children:k("quoteMsgDeleted")})]}):Object(S.jsx)(S.Fragment,{children:H&&"DENIED_OWNERSHIP"===H.quoteRequestStatus?Object(S.jsxs)("div",{className:"syn-qoute-request-message-denied-ownership-message-wrapper",children:[Object(S.jsx)("div",{className:"syn-qoute-request-message-denied-ownership-message-image-wrapper",children:Object(S.jsx)(r.a,{src:x.a})}),Object(S.jsx)("div",{className:"syn-qoute-request-message-denied-ownership-message",children:"".concat(k("quoteRequestMsgText")," ").concat(H&&H.songArtist," - ").concat(H&&H.songTitle," ").concat(k("quoteRequestMsgText2"))})]}):Object(S.jsxs)("div",{children:[H&&H.canAcceptReject&&"ACCEPTED"!==H.quoteRequestStatus&&"REJECTED"!==H.quoteRequestStatus&&"PAID"!==H.quoteRequestStatus&&"PAYMENT_RECEIVED"!==H.quoteRequestStatus&&"Copyright Owner"===A.user.role?Object(S.jsxs)("div",{className:"syn-qoute-request-message-deny-ownership-message-wrapper",children:[Object(S.jsxs)("div",{className:"syn-qoute-request-message-deny-ownership-message pt-3",children:["".concat(k("quoteReqMsgText")," ").concat(Object(l.e)(H&&H.confirmedOwnershipOn,null===M||void 0===M?void 0:M.dateFormat,!1,k)," ").concat(Object(l.e)(H&&H.confirmedOwnershipOn,null===M||void 0===M?void 0:M.dateFormat,!0,k).time)," ".concat(k("for")," ").concat(H&&H.percent,"%"),Object(S.jsx)("a",{onClick:()=>K(!0),children:k("quoteReqMsgDeny")}),Object(S.jsx)("a",{onClick:()=>ie(!0),children:k("quoteReqMsgChange")})]}),Object(S.jsx)(m.a,{show:re,className:"syn-quote-request-copyright",modalTitle:k("quoteReqMsgChange"),onHide:()=>ie(!1),modalBodyContent:Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(a.a,{className:"pb-2",children:Object(S.jsx)(o.a,{xs:6,children:Object(S.jsx)(v.a,{suffix:" %",value:H&&H.percent&&H.percent>=0&&H.percent<=100?H.percent:"",label:k("percent"),onChange:e=>{U(Object(s.a)(Object(s.a)({},H),{},{percent:e.toFixed(2)}))}})})}),Object(S.jsxs)(a.a,{children:[Object(S.jsx)(o.a,{children:Object(S.jsx)(R.a,{text:k("cancelModalButton"),onClick:()=>ie(!1)})}),Object(S.jsx)(o.a,{className:"text-right",children:Object(S.jsx)(f.a,{text:k("quoteReqMsgChange"),onClick:async()=>{try{I(!0),await Object(j.k)(H.copyrightId,H.percent,H.quoteRequestCopyrightHolderId),ie(!1),ue(),D("refreshQuoteRequests")}catch(e){_("syn-spot-song-remove-error",k("changeOwnershipError"),!0)}finally{I(!1)}}})})]})]})}),Object(S.jsx)(m.a,{show:J,className:"syn-quote-request-message-deny-modal",modalTitle:k("quoteReqMsgDeny"),onHide:()=>K(!1),modalBodyContent:Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(a.a,{className:"pb-2",children:Object(S.jsx)(o.a,{md:1,className:"syn-accept-or-reject-qoute-request-modal-toggle-collumn"})}),Object(S.jsx)(d.a,{onChange:e=>ee(e.target.value),placeholder:k("quoteReqMsgInfo"),rows:"4",cols:"80"}
1),Object(S.jsxs)(a.a,{children:[Object(S.jsx)(o.a,{children:Object(S.jsx)(R.a,{text:k("cancelModalButton"),onClick:()=>K(!1)})}),Object(S.jsx)(o.a,{children:Object(S.jsx)(y.a,{text:k("quoteReqMsgDeny"),onClick:async()=>{try{I(!0),await Object(u.k)(H.quoteRequestId,$,n),K(!1),ue(),D("refreshQuoteRequests")}catch(e){_("syn-spot-song-remove-error",k("denyOwnershipError"),!0)}finally{I(!1)}},className:"syn-proceed-to-deny-ownership"})})]})]})})]}):Object(S.jsx)(S.Fragment,{children:"Copyright Owner"===A.user.role&&H&&("ACCEPTED"===H.quoteRequestStatus||"PAID"===H.quoteRequestStatus||"PAYMENT_RECEIVED"===H.quoteRequestStatus)&&Object(S.jsx)("div",{children:Object(S.jsx)(a.a,{children:Object(S.jsxs)(o.a,{xs:5,children:[Object(S.jsx)("div",{className:"d-inline-block",children:Object(S.jsx)(h.a,{checked:!(!H||!H.licenseOwnerReceiveCueSheetAtFinish)&&H.licenseOwnerReceiveCueSheetAtFinish,onChange:async()=>{U(Object(s.a)(Object(s.a)({},H),{},{licenseOwnerReceiveCueSheetAtFinish:!H.licenseOwnerReceiveCueSheetAtFinish}));try{I(!0),await Object(u.M)(H.quoteRequestId,!H.licenseOwnerReceiveCueSheetAtFinish,n)}catch(e){_("syn-spot-song-remove-error",k("cueSheetError"),!0)}finally{I(!1)}}})}),Object(S.jsx)("div",{className:"d-inline-block",children:k("quoteReqMsgCueSheetCopy")})]})})})}),Object(S.jsx)("div",{className:"syn-qoute-request-panel-wrapper",children:Object(S.jsx)(g.a,{quoteRequest:H,setQuoteRequest:U,isMessage:!0,copyrightId:n,refreshQuoteRequest:ue})}),H&&"ACCEPTED"!==H.quoteRequestStatus&&"REJECTED"!==H.quoteRequestStatus&&"DENIED_OWNERSHIP"!==H.quoteRequestStatus&&"PAID"!==H.quoteRequestStatus&&"PENDING"!==H.quoteRequestStatus&&"PAYMENT_RECEIVED"!==H.quoteRequestStatus&&Object(S.jsxs)(S.Fragment,{children:[H&&H.canAcceptReject&&"Copyright Owner"===A.user.role&&Object(S.jsxs)(S.Fragment,{children:[Object(S.jsx)(b.a,{buttonIsPressed:V,yesPressAction:async()=>{try{I(!0),await Object(u.D)(!1,t,Z,H.licenseOwnerReceiveCueSheetAtFinish,H.licenseOwnerSendInvoiceInformation,n),ue(),P.push({pathname:"/quoteRequests"}),D("refreshQuoteRequests")}catch(e){_("syn-spot-song-remove-error",k("quoteRequestRefuseError"),!0)}finally{I(!1)}},yesButtontext:k("quoteReqMsgRejectConfirm"),noPressAction:()=>W(!1),actionTitle:k("quoteRequest"),text:k("quoteReqMsgRejectConfirmText"),showButtons:!te,className:"syn-accept-or-reject-qoute-request-modal",content:Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)(a.a,{className:"pb-5",children:[Object(S.jsx)(o.a,{md:2,className:"syn-accept-or-reject-qoute-request-modal-toggle-collumn",children:Object(S.jsx)(h.a,{checked:te,onChange:async()=>{ne(!te),te&&await Object(j.n)(H.copyrightId)}})}),Object(S.jsx)(o.a,{className:"pl-0",children:Object(S.jsx)("p",{children:"".concat(k("quoteReqMsgRejectConfirmCopyright")," ").concat(H&&H.copyrightType," ").concat(k("quoteReqMsgRejectConfirmCopyright2")," ").concat(H&&H.songArtist," - ").concat(H&&H.songTitle," ").concat(k("quoteReqMsgRejectConfirmCopyright3")," ").concat(Object(l.e)(H&&H.confirmedOwnershipOn,null===M||void 0===M?void 0:M.dateFormat,!1,k)," ").concat(Object(l.e)(H&&H.confirmedOwnershipOn,null===M||void 0===M?void 0:M.dateFormat,!0,k).time)})})]}),!te&&Object(S.jsx)(y.a,{onClick:()=>K(!0),text:k("quoteReqMsgDeny"),className:"syn-accept-or-reject-qoute-request-modal-button"}),te&&Object(S.jsx)(d.a,{onChange:e=>X(e.target.value),placeholder:k("quoteReqMsgOptional"),rows:"4",cols:"80"})]})}),Object(S.jsx)(R.a,{icon:"fa fa-close",text:k("quoteReqMsgRejectConfirm"),onClick:()=>{W(!V)},className:"syn-qoute-request-message-button"})]}),H&&H.canAcceptReject&&"ACCEPTED"!==H.quoteRequestStatus&&"REJECTED"!==H.quoteRequestStatus&&"DENIED_OWNERSHIP"!==H.quoteRequestStatus&&"PAID"!==H.quoteRequestStatus&&"PAYMENT_RECEIVED"!==H.quoteRequestStatus&&"PENDING"!==H.quoteRequestStatus&&"Copyright Owner"===A.user.role&&Object(S.jsxs)("div",{className:"float-right",children:[Object(S.jsx)(b.a,{buttonIsPressed:z,yesPressAction:async()=>{try{I(!0),await Object(u.D)(!0,t,Z,H.licenseOwnerReceiveCueSheetAtFinish,H.licenseOwnerSendInvoiceInformation,n,ae),ue(),P.push({pathname:"/quoteRequests"}),D("refreshQuoteRequests")}catch(e){_("syn-spot-song-remove-error",k("quoteRequestAcceptError"),!0)}finally{I(!1)}},yesButtontext:k("quoteReqMsgAccept"),noPressAction:()=>Q(!1),actionTitle:k("quoteRequest"),text:k("quoteReqMsgAcceptConfirm"),className:"syn-accept-or-reject-qoute-request-modal",showButtons:!se,content:Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)(a.a,{className:"pb-3",children:[Object(S.jsx)(o.a,{md:2,className:"syn-accept-or-reject-qoute-request-modal-toggle-collumn",children:Object(S.jsx)(h.a,{id:"syn-accept-quote-request-confirm-ownership",checked:se,onChange:async()=>{ce(!se),se&&await Object(j.n)(H.copyrightId)}})}),Object(S.jsx)(o.a,{className:"pl-0",children:Object(S.jsx)("p",{children:"".concat(k("quoteReqMsgRejectConfirmCopyright")," ").concat(H&&H.songArtist," - ").concat(H&&H.songTitle," ").concat(k("quoteReqMsgRejectConfirmCopyright2")," ").concat(Object(l.e)(H&&H.confirmedOwnershipOn,null===M||void 0===M?void 0:M.dateFormat,!1,k)," ").concat(Object(l.e)(H&&H.confirmedOwnershipOn,null===M||void 0===M?void 0:M.dateFormat,!0,k).time)})})]}),!se&&Object(S.jsx)(y.a,{className:"syn-accept-or-reject-qoute-request-modal-button",text:k("quoteReqMsgDeny"),onClick:()=>K(!0)}),se&&Object(S.jsxs)(S.Fragment,{children:[Object(S.jsxs)(a.a,{className:"pb-3",children:[Object(S.jsx)(o.a,{md:2,className:"syn-accept-or-reject-qoute-request-modal-toggle-collumn",children:Object(S.jsx)(h.a,{checked:H&&H.licenseOwnerReceiveCueSheetAtFinis
1h,onChange:()=>U(Object(s.a)(Object(s.a)({},H),{},{licenseOwnerReceiveCueSheetAtFinish:!H.licenseOwnerReceiveCueSheetAtFinish}))})}),Object(S.jsx)(o.a,{className:"pl-0",children:Object(S.jsx)("p",{children:k("quoteReqMsgCueSheetCopy")})})]}),Object(S.jsx)(a.a,{className:"pb-3",children:Object(S.jsx)(o.a,{children:Object(S.jsx)(E.a,{company:null===H||void 0===H?void 0:H.copyrightCompany,companyType:"copyright",refreshData:ue,paymentMethod:ae,setPaymentMethod:oe,showSaveForFutureUse:!0})})})]})]})}),Object(S.jsx)(F.a,{id:"syn-accept-quote-request-button",className:"syn-qoute-request-message-button",icon:"fa fa-check",text:k("quoteReqMsgAccept"),onClick:()=>{Q(!z)},companyPermission:!0,permission:T.a.CONFIRM_ACCEPTANCE_OF_PRE_CLEARANCE_TERMS,confirmButton:!0})]})]}),H&&!H.assignedProcessor&&"OFFLINE"!==H.quoteRequestStatus&&"PENDING"!==H.quoteRequestStatus&&"Copyright Owner"===A.user.role&&Object(S.jsx)(a.a,{children:Object(S.jsx)(o.a,{className:"text-right",children:Object(S.jsx)(f.a,{id:"syn-quote-request-assign-button",text:k("assignQuote"),onClick:()=>{L(!0)}})})}),Object(S.jsx)(m.a,{show:B,onHide:()=>L(!1),modalTitle:k("dashboardQuoteRequestAssign"),modalBodyContent:Object(S.jsx)(w.a,{closeModal:()=>L(!1),quoteRequestCopyrightHolderId:null===H||void 0===H?void 0:H.quoteRequestCopyrightHolderId,refreshQuoteRequestMessageData:ue})}),H&&"PAID"===H.quoteRequestStatus&&H.canAcceptReject&&"Copyright Owner"===A.user.role&&Object(S.jsx)(a.a,{children:Object(S.jsx)(o.a,{className:"text-right",children:Object(S.jsx)(f.a,{id:"syn-quote-request-mark-paymend-received",className:"syn-qoute-request-message-button-receive-paid-button",icon:"fa fa-check",text:k("paymentReceived"),onClick:async()=>{try{I(!0),await Object(u.x)(H.quoteRequestId,H.copyrightId),ue(),P.push({pathname:"/quoteRequests"}),D("refreshQuoteRequests")}catch(e){_("syn-quote-request-mark-as-payment-received",k("paymentMarkError"),!0)}finally{I(!1)}}})})})]})})}):Object(S.jsxs)("div",{className:"syn-qoute-request-message-deleted-ownership-message-wrapper",children:[Object(S.jsx)("div",{className:"syn-qoute-request-message-deleted-ownership-message-image-wrapper",children:Object(S.jsx)(r.a,{src:x.a})}),Object(S.jsxs)("div",{className:"syn-qoute-request-message-deleted-ownership-message",children:[k("quoteMsgNotAuthorizedText1")," "]})]})})})})));t.a=Object(C.b)(k)},733:function(e,t,n){"use strict";var s=n(1),c=n(90),a=n(43),o=n(38),r=n(157),i=n(289),l=n(47),d=n(9),u=n(10),j=n(44),b=n(18),m=n(0);t.a=e=>{let{closeModal:t,quoteRequestCopyrightHolderId:n,dashboardItemId:p,refreshQuoteRequestMessageData:h}=e;const{t:O}=Object(o.a)(),x=Object(u.a)(),{setError:g}=Object(d.a)(),[y,f]=Object(s.useState)([]),[v,R]=Object(s.useState)(),{removeItem:C}=Object(s.useContext)(i.a);Object(s.useEffect)((()=>{(async()=>{try{x(!0);const e=await Object(r.s)(n);f(e.map((e=>({key:e.id,value:e.id,name:e.name}))))}catch(e){g("getReceiveQtUsers.error",O("errorReceivingQuoteUsers"))}finally{x(!1)}})()}),[]);return Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)(c.a,{children:Object(m.jsx)(a.a,{xs:6,children:Object(m.jsx)(l.a,{id:"syn-select-quote-request-asign-user",showSearch:!0,label:O("assignUser"),data:y,value:v,onChange:e=>R(e)})})}),Object(m.jsxs)(c.a,{className:"mt-3",children:[Object(m.jsx)(a.a,{children:Object(m.jsx)(j.a,{onClick:t,text:O("cancelModalButton")})}),Object(m.jsx)(a.a,{className:"text-right",children:Object(m.jsx)(b.a,{text:O("assign"),onClick:async()=>{try{x(!0),await Object(r.d)(n,v),p&&C(p),h&&h(),t()}catch(e){g("assignUser.error",O("errorAssingingUser"))}finally{x(!1)}}})})]})]})}},734:function(e,t,n){},759:function(e,t,n){},882:function(e,t,n){var s;window,e.exports=(s=n(1),function(e){var t={};function n(s){if(t[s])return t[s].exports;var c=t[s]={i:s,l:!1,exports:{}};return e[s].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(s,c,function(t){return e[t]}.bind(null,c));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=3)}([function(e,t){e.exports=s},function(e,t,n){e.exports=n(4)()},function(e,t,n){var s=n(6);"string"==typeof s&&(s=[[e.i,s,""]]);var c={insert:"head",singleton:!1};n(8)(s,c),s.locals&&(e.exports=s.locals)},function(e,t,n){"use strict";n.r(t),n.d(t,"RibbonContainer",(function(){return l})),n.d(t,"RightCornerRibbon",(function(){return d})),n.d(t,"RightCornerLargeRibbon",(function(){return u})),n.d(t,"LeftCornerRibbon",(function(){return j})),n.d(t,"LeftCornerLargeRibbon",(function(){return b})),n.d(t,"RightRibbon",(function(){return m})),n.d(t,"RightLargeRibbon",(function(){return p})),n.d(t,"LeftRibbon",(function(){return h})),n.d(t,"LeftLargeRibbon",(function(){return O}));var s=n(0),c=n.n(s),a=n(1),o=n.n(a),r=n(2),i=n.n(r),l=function(e){var t=e.children,n=e.className;return c.a.createElement("div",{className:"".concat(i.a.ribbonContainer," ").concat(n||"")},t)};l.propTypes={children:o.a.any.isRequired,className:o.a.string},l.defaultProps={className:void 0};var d=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.rightCornerRibbon},c.a.createElement("svg",{height:"70",width:"70"},c.a.createElement("polygon",{points:"0 0, 0 10, 10 10",fill:"".concat(n,"77"),strokeWidth:"0"}),c.a.createElement("polygon",{points:"0 0, 70 70, 70 40, 30 0",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"60 60, 60 70, 70 70",fill:"".concat(n,"77"),strokeWidth:"0"})),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.rightCornerRibbonText},t))};d.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},d.defaultProps={fontFamily:"Arial"};var u=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.rightCornerLargeRibbon},c.a.createElement("svg",{height:"84",width:"84"},c.a.createElement("polygon",{points:"0 0, 0 12, 12 12",fill:"".concat(n,"77"),strokeWidth:"0"}),c.a.createElement("polygon",{points:"0 0, 84 84, 84 48, 36 0",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"72 72, 72 84, 84 84",fill:"".concat(n,"77"),strokeWidth:"0"})),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.rightCornerLargeRibbonText},t))};u.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},u.defaultProps={fontFamily:"Arial"};var j=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.leftCornerRibbon},c.a.createElement("svg",{height:"70",width:"70"},c.a.createElement("g",{transform:"rotate(-90, 35, 35)"},c.a.createElement("polygon",{points:"0 0, 0 10, 10 10",fill:"".concat(n,"77"),strokeWidth:"0"}),c.a.createElement("polygon",{points:"0 0, 70 70, 70 40, 30 0",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"60 60, 60 70, 70 70",fill:"".concat(n,"77"),strokeWidth:"0"}))),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.leftCornerRibbonText},t))};j.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},j.defaultProps={fontFamily:"Arial"};var b=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.leftCornerLargeRibbon},c.a.createElement("svg",{height:"84",width:"84"},c.a.createElement("g",{transform:"rotate(-90, 42, 42)"},c.a.createElement("polygon",{points:"0 0, 0 12, 12 12",fill:"".concat(n,"77"),strokeWidth:"0"}),c.a.createElement("polygon",{points:"0 0, 84 84, 84 48, 36 0",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"72 72, 72 84, 84 84",fill:"".concat(n,"77"),strokeWidth:"0"}))),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.leftCornerLargeRibbonText},t))};b.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},b.defaultProps={fontFamily:"Arial"};var m=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.rightRibbon},c.a.createElement("svg",{height:"40",width:"70"},c.a.createElement("polygon",{points:"0 10, 10 20, 0 30, 70 30, 70 10",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"60 40, 60 30, 70 30",fill:"".concat(n,"77"),strokeWidth:"0"})),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.rightRibbonText},t))};m.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},m.defaultProps={fontFamily:"Arial"};var p=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.rightLargeRibbon},c.a.createElement("svg",{height:"60",width:"90"},c.a.createElement("polygon",{points:"0 15, 15 30, 0 45, 90 45, 90 15",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"75 60, 75 40, 90 45",fill:"".concat(n,"77"),strokeWidth:"0"})),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.rightLargeRibbonText},t))};p.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},p.defaultProps={fontFamily:"Arial"};var h=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.leftRibbon},c.a.createElement("svg",{height:"40",width:"70"},c.a.createElement("g",{transform:"scale(-1,1) translate(-70, 0)"},c.a.createElement("polygon",{points:"0 10, 10 20, 0 30, 70 30, 70 10",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"60 40, 60 30, 70 30",fill:"".concat(n,"77"),strokeWidth:"0"}))),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.leftRibbonText},t))};h.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},h.defaultProps={fontFamily:"Arial"};var O=function(e){var t=e.children,n=e.backgroundColor,s=e.color,a=e.fontFamily;return c.a.createElement("div",{className:i.a.leftLargeRibbon},c.a.createElement("svg",{height:"60",width:"90"},c.a.createElement("g",{transform:"scale(-1,1) translate(-90, 0)"},c.a.createElement("polygon",{points:"0 15, 15 30, 0 45, 90 45, 90 15",fill:n,strokeWidth:"0"}),c.a.createElement("polygon",{points:"75 60, 75 40, 90 45",fill:"".concat(n,"77"),strokeWidth:"0"}))),c.a.createElement("span",{style:{color:s,fontFamily:a},className:i.a.leftLargeRibbonText},t))};
1O.propTypes={children:o.a.any.isRequired,backgroundColor:o.a.string.isRequired,color:o.a.string.isRequired,fontFamily:o.a.string},O.defaultProps={fontFamily:"Arial"}},function(e,t,n){"use strict";var s=n(5);function c(){}function a(){}a.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,a,o){if(o!==s){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:c};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(t=e.exports=n(7)(!1)).push([e.i,".ReactRibbons_ribbonContainer_3Zi1le5BXstWhvxMbxE3QQ{position:relative;min-height:100px}.ReactRibbons_rightCornerRibbon_1-P96PNPfVooTf7iAd8ts4{position:absolute;top:-10px;right:-10px}.ReactRibbons_rightCornerRibbonText_lAUhrhctW69RCvQMzXCAj{position:absolute;transform:rotate(45deg);font-size:0.8em;display:flex;align-items:center;justify-content:center;width:100%;height:100%;top:-8px;right:-8px}.ReactRibbons_rightCornerLargeRibbon_2Iq3FJ4ppvHaWBuB2ELV4y{position:absolute;top:-12px;right:-12px}.ReactRibbons_rightCornerLargeRibbonText_1WZuhM5iMjMsIZmZzSn15R{position:absolute;transform:rotate(45deg);font-size:0.9em;display:flex;align-items:center;justify-content:center;width:100%;height:100%;top:-10px;right:-10px}.ReactRibbons_leftCornerRibbon_2L1X3PRpoW_Cbx04HKYerO{position:absolute;top:-10px;left:-10px}.ReactRibbons_leftCornerRibbonText_5DsxRgO9L2R7yhdWr5MWZ{position:absolute;transform:rotate(-45deg);font-size:0.8em;display:flex;align-items:center;justify-content:center;width:100%;height:100%;top:-8px;left:-8px}.ReactRibbons_leftCornerLargeRibbon_2k55QxRrtg-UM6V8xbnbKL{position:absolute;top:-12px;left:-12px}.ReactRibbons_leftCornerLargeRibbonText_1vPBHBrNbo1_T7ApSNGFBz{position:absolute;transform:rotate(-45deg);font-size:0.9em;display:flex;align-items:center;justify-content:center;width:100%;height:100%;top:-10px;left:-10px}.ReactRibbons_rightRibbon_1U_hyaQbXrjGdr5diDkP4J{position:absolute;top:0;right:-10px}.ReactRibbons_rightRibbonText_3oO5W55LjrYkBS1zXIqGFo{position:absolute;font-size:0.8em;top:12px;right:7px}.ReactRibbons_rightLargeRibbon_3kFosVYSxjkNLiIlgAau5-{position:absolute;top:0;right:-15px}.ReactRibbons_rightLargeRibbonText_2Qt8aGFwCEOMXDh3gE7LPt{position:absolute;font-size:0.9em;top:21px;right:9px}.ReactRibbons_leftRibbon_3GNEv0eSmq2XZPFgY3OdU4{position:absolute;top:0;left:-10px}.ReactRibbons_leftRibbonText_aBRlvzZrqntSZwv1D7Bjt{position:absolute;font-size:0.8em;top:12px;left:7px}.ReactRibbons_leftLargeRibbon__DwM5zy9iBDjj17ph6pUf{position:absolute;top:0;left:-15px}.ReactRibbons_leftLargeRibbonText_1SAojwHIrk8Rz0e2pG0aF_{position:absolute;font-size:0.9em;top:21px;left:9px}\n",""]),t.locals={ribbonContainer:"ReactRibbons_ribbonContainer_3Zi1le5BXstWhvxMbxE3QQ",rightCornerRibbon:"ReactRibbons_rightCornerRibbon_1-P96PNPfVooTf7iAd8ts4",rightCornerRibbonText:"ReactRibbons_rightCornerRibbonText_lAUhrhctW69RCvQMzXCAj",rightCornerLargeRibbon:"ReactRibbons_rightCornerLargeRibbon_2Iq3FJ4ppvHaWBuB2ELV4y",rightCornerLargeRibbonText:"ReactRibbons_rightCornerLargeRibbonText_1WZuhM5iMjMsIZmZzSn15R",leftCornerRibbon:"ReactRibbons_leftCornerRibbon_2L1X3PRpoW_Cbx04HKYerO",leftCornerRibbonText:"ReactRibbons_leftCornerRibbonText_5DsxRgO9L2R7yhdWr5MWZ",leftCornerLargeRibbon:"ReactRibbons_leftCornerLargeRibbon_2k55QxRrtg-UM6V8xbnbKL",leftCornerLargeRibbonText:"ReactRibbons_leftCornerLargeRibbonText_1vPBHBrNbo1_T7ApSNGFBz",rightRibbon:"ReactRibbons_rightRibbon_1U_hyaQbXrjGdr5diDkP4J",rightRibbonText:"ReactRibbons_rightRibbonText_3oO5W55LjrYkBS1zXIqGFo",rightLargeRibbon:"ReactRibbons_rightLargeRibbon_3kFosVYSxjkNLiIlgAau5-",rightLargeRibbonText:"ReactRibbons_rightLargeRibbonText_2Qt8aGFwCEOMXDh3gE7LPt",leftRibbon:"ReactRibbons_leftRibbon_3GNEv0eSmq2XZPFgY3OdU4",leftRibbonText:"ReactRibbons_leftRibbonText_aBRlvzZrqntSZwv1D7Bjt",leftLargeRibbon:"ReactRibbons_leftLargeRibbon__DwM5zy9iBDjj17ph6pUf",leftLargeRibbonText:"ReactRibbons_leftLargeRibbonText_1SAojwHIrk8Rz0e2pG0aF_"}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,s,c,a=e[1]||"",o=e[3];
1if(!o)return a;if(t&&"function"==typeof btoa){var r=(n=o,s=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),i=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot).concat(e," */")}));return[a].concat(i).concat([r]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var s={},c=0;c<this.length;c++){var a=this[c][0];null!=a&&(s[a]=!0)}for(var o=0;o<e.length;o++){var r=e[o];null!=r[0]&&s[r[0]]||(n&&!r[2]?r[2]=n:n&&(r[2]="(".concat(r[2],") and (").concat(n,")")),t.push(r))}},t}},function(e,t,n){"use strict";var s,c={},a=function(){return void 0===s&&(s=Boolean(window&&document&&document.all&&!window.atob)),s},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}();function r(e,t){for(var n=[],s={},c=0;c<e.length;c++){var a=e[c],o=t.base?a[0]+t.base:a[0],r={css:a[1],media:a[2],sourceMap:a[3]};s[o]?s[o].parts.push(r):n.push(s[o]={id:o,parts:[r]})}return n}function i(e,t){for(var n=0;n<e.length;n++){var s=e[n],a=c[s.id],o=0;if(a){for(a.refs++;o<a.parts.length;o++)a.parts[o](s.parts[o]);for(;o<s.parts.length;o++)a.parts.push(h(s.parts[o],t))}else{for(var r=[];o<s.parts.length;o++)r.push(h(s.parts[o],t));c[s.id]={id:s.id,refs:1,parts:r}}}}function l(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var s=n.nc;s&&(e.attributes.nonce=s)}if(Object.keys(e.attributes).forEach((function(n){t.setAttribute(n,e.attributes[n])})),"function"==typeof e.insert)e.insert(t);else{var c=o(e.insert||"head");if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");c.appendChild(t)}return t}var d,u=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function j(e,t,n,s){var c=n?"":s.css;if(e.styleSheet)e.styleSheet.cssText=u(t,c);else{var a=document.createTextNode(c),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function b(e,t,n){var s=n.css,c=n.media,a=n.sourceMap;if(c&&e.setAttribute("media",c),a&&btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=s;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(s))}}var m=null,p=0;function h(e,t){var n,s,c;if(t.singleton){var a=p++;n=m||(m=l(t)),s=j.bind(null,n,a,!1),c=j.bind(null,n,a,!0)}else n=l(t),s=b.bind(null,n,t),c=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return s(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;s(e=t)}else c()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a());var n=r(e,t);return i(n,t),function(e){for(var s=[],a=0;a<n.length;a++){var o=n[a],l=c[o.id];l&&(l.refs--,s.push(l))}e&&i(r(e,t),t);for(var d=0;d<s.length;d++){var u=s[d];if(0===u.refs){for(var j=0;j<u.parts.length;j++)u.parts[j]();delete c[u.id]}}}}}]))},893:function(e,t,n){"use strict";var s=n(1),c=n(90),a=n(43),o=n(33),r=n(17),i=n(28),l=n(729),d=n(38),u=n(39),j=n(18),b=n(16),m=n(722),p=n(91),h=n(53),O=n(48),x=n(10),g=n(9),y=n(26),f=n(32),v=n(0);var R=e=>{var t,n;let{version:o,contract:r,setContract:i,refreshContracts:l,getFileContent:u}=e;const{t:R}=Object(d.a)(),{isCopyrightOwner:C}=Object(s.useContext)(f.a),{currentlanguageOption:q}=Object(y.a)(),[N,w]=Object(s.useState)(!1),E=Object(x.a)(),{setError:F}=Object(g.a)();return Object(v.jsx)("div",{className:"p-2",children:Object(v.jsxs)(c.a,{className:"syn-project-info-panel contracts mt-3",children:[Object(v.jsxs)(a.a,{xs:3,className:"syn-project-info-panel-column",children:[Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[R("signatures"),":"]}),Object(v.jsx)("div",{className:"d-inline-block mr-2 ".concat((()=>
1{if(o.signedByLicenseHolder)return"syn-contract-signed-copyright-owner"})()),children:R("CO")}),Object(v.jsx)("div",{className:"d-inline-block ".concat((()=>{if(o.signedByLicenseUser)return"syn-contract-signed-license-user"})()),children:R("CU")})]}),Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[R("fileName"),":"]}),Object(v.jsx)("h6",{id:"syn-contracts-current-version",className:"syn-contracts-info-panel-link",onClick:()=>u(o),children:Object(b.u)(null===o||void 0===o||null===(t=o.synclodgeFile)||void 0===t?void 0:t.name,25)})]})]}),Object(v.jsxs)(a.a,{xs:3,className:"d-flex flex-column justify-content-around",children:[Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[R("projectFileDescription"),":"]}),Object(v.jsx)("h6",{id:"syn-contracts-current-version",className:"syn-contracts-info-panel-link",onClick:()=>u(o),children:Object(b.u)(null===o||void 0===o||null===(n=o.synclodgeFile)||void 0===n?void 0:n.description,25)})]}),Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[R("catalogueVersion"),":"]}),Object(v.jsx)("h6",{children:null===o||void 0===o?void 0:o.fileVersion})]})]}),Object(v.jsxs)(a.a,{xs:2,children:[Object(v.jsx)("div",{children:Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[R("user"),":"]})}),Object(v.jsx)("h6",{children:null===o||void 0===o?void 0:o.createUser}),Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[R("uploadDate"),":"]}),Object(v.jsx)("h6",{children:Object(b.e)(new Date(o.createDate),null===q||void 0===q?void 0:q.dateFormat,!1,R)})]})]}),Object(v.jsx)(a.a,{xs:2,className:"m-0 p-0",children:o.fileVersion===r.currentVersion.fileVersion?Object(v.jsx)("div",{className:"d-inline-block text-center ml-3",children:R("currentVersion")}):Object(v.jsx)(j.a,{id:"syn-contracts-contract-version-set-curent",text:R("setCurrent"),icon:"fa fa-check",onClick:async()=>{try{E(!0),await Object(m.n)(r.id,o.id),l()}catch(e){F("setCurrentVersion.error",R("errorSettingCurentVersion"))}finally{E(!1)}}})}),Object(v.jsxs)(a.a,{xs:2,children:[Object(v.jsx)(h.a,{permission:C()?null:O.a.READ_CONTRACTS,small:!0,id:"syn-contracts-contract-version-view-file",text:R("viewFile"),icon:"fa fa-eye",className:"w-100 mb-2",onClick:()=>u(o)}),Object(v.jsx)(j.a,{id:"syn-contracts-contract-version-delete",text:R("deleteButton"),icon:"fa fa-trash",className:"w-100",disabled:o.fileVersion===r.currentVersion.fileVersion,onClick:()=>w(!0)}),Object(v.jsx)(p.a,{buttonIsPressed:N,yesPressAction:async()=>{try{E(!0),await Object(m.e)(o.id),l()}catch(e){F("deleteVersion.error",R("errorDeletingVersion"))}finally{E(!1)}},noPressAction:()=>w(!1),actionTitle:R("deleteAction"),text:"".concat(R("areYouSureText")," ").concat(R("thisContractversion"),"?")})]})]})})},C=n(3),q=n(180),N=n(287),w=n(122);var E=e=>{let{contract:t,closeUploadNewVersionModal:n,projectId:o,refreshContracts:l}=e;const{loginSession:j}=Object(s.useContext)(f.a),{t:b}=Object(d.a)(),[p,h]=Object(s.useState)(!1),O=Object(x.a)(),{setError:y}=Object(g.a)(),[R,E]=Object(s.useState)({}),F=()=>Math.max.apply(Math,null===t||void 0===t?void 0:t.versions.map((function(e){return e.fileVersion})));return Object(v.jsx)(c.a,{children:Object(v.jsxs)(a.a,{children:[Object(v.jsx)(c.a,{className:"text-center mb-2",children:Object(v.jsxs)(a.a,{children:[R&&R.fileName?Object(v.jsx)("p",{children:R.fileName}):Object(v.jsx)(i.a,{id:"syn-add-new-synclodge-file-contract-version",icon:"fa fa-plus-circle",text:b("addNewButton"),onClick:()=>h(!0)}),Object(v.jsx)(r.a,{size:"xl",show:p,modalTitle:b("projectFileNewFile"),onHide:()=>h(!1),modalBodyContent:Object(v.jsx)(N.default,{fromProjectFile:!0,selectFileAction:e=>{F(),E(Object(C.a)(Object(C.a)({},R),{},{synclodgeFile:e,fileName:e.name,contractFileDescriptor:e.fileStorageDescriptorId,fileVersion:F()+1,createDate:new Date,createUser:"".concat(j.user.firstName," ").concat(j.user.lastName)})),h(!1)},projectFileTypes:[w.a.CONTRACT_BLANK,w.a.CONTRACT_COMPLETED,w.a.CONTRACT_SIGNED,w.a.OTHER]})})]})}),Object(v.jsx)(c.a,{children:Object(v.jsxs)(a.a,{xs:6,children:[Object(v.jsx)(q.a,{id:"syn-contracts-upload-new-contract-version-license-user",onChange:()=>E(Object(C.a)(Object(C.a)({},R),{},{signedByLicenseUser:!R.signedByLicenseUser})),checked:!(!R||!R.signedByLicenseUser)&&R.signedByLicenseUser,text:b("signedByLicenceUser")}),Object(v.jsx)(q.a,{id:"syn-contracts-upload-new-contract-version-license-copyright-holder",onChange:()=>E(Object(C.a)(Object(C.a)({},R),{},{signedByLicenseHolder:!R.signedByLicenseHolder})),checked:!(!R||!R.signedByLicenseHolder)&&R.signedByLicenseHolder,text:b("signedByLicenceCopyrightHolder")})]})}),Object(v.jsxs)(c.a,{className:"mt-3",children:[Object(v.jsx)(a.a,{children:Object(v.jsx)(u.a,{id:"syn-contracts-upload-new-contract-version-modal-cancel",text:b("cancelModalButton"),onClick:n})}),Object(v.jsx)(a.a,{className:"text-right",children:Object(v.jsx)(i.a,{text:b("finishUpload"),onClick:async()=>{try{O(!0),await Object(m.o)(Object(C.a)(Object(C.a)({},R),{},{spotSongContractId:t.id})),l(),n()}catch(e){y("finishVersion.error",b("errorUploadingNewFile"))}finally{O(!1)}},id:"syn-contracts-upload-new-contract-version-finish-upload"})})]})]})})},F=n(882),T=n(707);var S=e=>{let{children:t,text:n,status:s,right:c,className:a}=e;const o=()=>{switch(s){case T.a.accepted:return"#4C9A2A ";case T.a.pending:return" goldenrod";default:return"goldenrod"}};return Object(v.jsx)("div",{children:Object(v.jsxs)(F.RibbonContainer,{className:a,children:[c?Object(v.jsx)(F.RightCornerRibbon,{backgroundColor:o(),color:"#f0f0f0",fontFamily:"Arial",children:n}):Object(v.jsx)(F.LeftCornerLargeRibbon,{backgroundColor:o(),color:"#f0f0f0",fontFamily:"Arial",children:n}),t]})})},k=n(190),I=n(183),A=n(187);var _=e=>{var t,n,o,i,l,u,C;
1let{contract:q,setContract:N,refreshContracts:w,projectId:F}=e;const{t:_}=Object(d.a)(),{currentlanguageOption:D}=Object(y.a)(),[M,B]=Object(s.useState)(!1),[L,P]=Object(s.useState)(!1),[H,U]=Object(s.useState)(!1),{isCopyrightOwner:V}=Object(s.useContext)(f.a),W=Object(x.a)(),{setError:z}=Object(g.a)(),[Q,G]=Object(s.useState)(!1),[Y,Z]=Object(s.useState)(!1),X=()=>{if(q.currentVersion.signedByLicenseHolder)return"syn-contract-signed-copyright-owner"},J=()=>{if(q.currentVersion.signedByLicenseUser)return"syn-contract-signed-license-user"},K=async e=>{try{var t;if(null!==e&&void 0!==e&&null!==(t=e.synclodgeFile)&&void 0!==t&&t.deleted)G(!0);else{var n,s;W(!0);const t=await Object(m.h)(e.id);Object(b.h)(null===e||void 0===e||null===(n=e.synclodgeFile)||void 0===n?void 0:n.name,t,Object(b.m)(null===e||void 0===e||null===(s=e.synclodgeFile)||void 0===s?void 0:s.name))}}catch(c){z("syn-get-contract-file-error",_("unexpectedError"),!0)}finally{W(!1)}};return Object(v.jsx)(S,{text:_("signatures"),status:X()&&J()?T.a.accepted:T.a.pending,children:Object(v.jsxs)("div",{className:"syn-contract-request-contracts-data-contract-item ",children:[Object(v.jsxs)(c.a,{className:"syn-project-info-panel contracts mt-3",children:[Object(v.jsxs)(a.a,{xs:3,className:"syn-project-info-panel-column justify-content-end",children:[Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[_("fileName"),":"]}),Object(v.jsx)("h6",{id:"syn-contracts-current-version",className:"syn-contracts-info-panel-link",onClick:()=>{var e,t,n,s,c,a;"Audio"===(null===(e=q.currentVersion)||void 0===e||null===(t=e.synclodgeFile)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.key)||"Video"===(null===(s=q.currentVersion)||void 0===s||null===(c=s.synclodgeFile)||void 0===c||null===(a=c.type)||void 0===a?void 0:a.key)?Z(!0):K(q.currentVersion)},children:Object(b.u)(null===q||void 0===q||null===(t=q.currentVersion)||void 0===t||null===(n=t.synclodgeFile)||void 0===n?void 0:n.name,50)}),Object(v.jsx)(r.a,{size:"xl",show:Y,modalTitle:_("file"),onHide:()=>Z(!1),modalBodyContent:Object(v.jsx)(A.a,{closeModal:()=>Z(!1),synclodgeFile:null===q||void 0===q||null===(o=q.currentVersion)||void 0===o?void 0:o.synclodgeFile})})]}),Object(v.jsxs)("div",{children:[Object(v.jsx)("div",{className:"d-inline-block mx-2 ".concat(X()),children:Object(v.jsx)(k.a,{text:"Signature of Copyright Owner",children:Object(v.jsx)("span",{children:_("CO")})})}),Object(v.jsx)("div",{className:"d-inline-block ".concat(J()),children:Object(v.jsx)(k.a,{text:"Signature of Current User",children:Object(v.jsx)("span",{children:_("CU")})})})]})]}),Object(v.jsxs)(a.a,{xs:3,className:"d-flex flex-column justify-content-around",children:[Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[_("projectFileDescription"),":"]}),Object(v.jsx)("h6",{id:"syn-contracts-current-version",className:"syn-contracts-info-panel-link",onClick:()=>K(q.currentVersion),children:Object(b.u)(null===q||void 0===q||null===(i=q.currentVersion)||void 0===i||null===(l=i.synclodgeFile)||void 0===l?void 0:l.description,50)})]}),Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[_("catalogueVersion"),":"]}),Object(v.jsx)("h6",{children:null===q||void 0===q||null===(u=q.currentVersion)||void 0===u?void 0:u.fileVersion})]})]}),Object(v.jsxs)(a.a,{xs:1,children:[Object(v.jsx)("div",{children:Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[_("user"),":"]})}),Object(v.jsx)("h6",{children:null===q||void 0===q||null===(C=q.currentVersion)||void 0===C?void 0:C.createUser}),Object(v.jsxs)("div",{children:[Object(v.jsxs)("p",{className:"syn-project-info-panel-label",children:[_("uploadDate"),":"]}),Object(v.jsx)("h6",{children:Object(b.e)(new Date(q.currentVersion.createDate),null===D||void 0===D?void 0:D.dateFormat,!1,_)})]})]}),Object(v.jsxs)(a.a,{className:"d-flex justify-content-around flex-column",children:[Object(v.jsxs)(c.a,{className:"d-flex ",children:[Object(v.jsx)(a.a,{xs:4,children:null===q.currentVersion.projectFile&&!V()&&Object(v.jsx)("div",{className:"syn-project-info-panel-action-button",children:Object(v.jsx)(j.a,{className:"d-flex justify-content-center",id:"syn-contracts-add-to-project-files",text:_("addToProject"),icon:"fa fa-plus"})})}),Object(v.jsx)(a.a,{xs:4,children:Object(v.jsx)("div",{className:"syn-project-info-panel-action-button",children:Object(v.jsx)(h.a,{permission:V()?null:O.a.READ_CONTRACTS,small:!0,className:"d-flex justify-content-center",id:"syn-contracts-open-history",text:_("openHistory"),icon:"fa fa-history",onClick:()=>B(!0)})})}),Object(v.jsx)(a.a,{xs:4,children:Object(v.jsx)("div",{className:"syn-project-info-panel-action-button",children:Object(v.jsx)(h.a,{permission:V()?null:O.a.UPDATE_CONTRACTS,small:!0,className:"d-flex justify-content-center",id:"syn-contracts-upload-new-file",text:_("uploadNewFileVersion"),icon:"fa fa-cloud-upload",onClick:()=>P(!0),confirmButton:!0})})})]}),Object(v.jsxs)(c.a,{children:[Object(v.jsx)(a.a,{xs:4,className:"d-flex flex-column justify-content-around "}),Object(v.jsx)(a.a,{xs:4,children:Object(v.jsx)("div",{className:"syn-project-info-panel-action-button",children:Object(v.jsx)(h.a,{permission:V()?null:O.a.READ_CONTRACTS,small:!0,className:"d-flex justify-content-center",id:"syn-contracts-upload-view-file",text:_("viewFile"),icon:"fa fa-eye",onClick:()=>K(q.currentVersion)})})}),Object(v.jsxs)(a.a,{xs:4,children:[Object(v.jsx)("div",{className:"syn-project-info-panel-action-button",children:Object(v.jsx)(h.a,{permission:V()?null:O.a.UPDATE_CONTRACTS,small:!0,className:"d-flex justify-content-center",id:"syn-contracts-delete-contract",text:_("deleteDocument"),icon:"fa fa-tras
1h",onClick:()=>U(!0)})}),Object(v.jsx)(p.a,{buttonIsPressed:H,yesPressAction:async()=>{try{W(!0),await Object(m.d)(q.id),w()}catch(e){z("deleteContract.error",_("errorDeletingDocument"))}finally{W(!1)}},noPressAction:()=>U(!1),actionTitle:_("deleteAction"),text:"".concat(_("areYouSureText")," ").concat(_("thisContract")," ?")})]})]})]})]}),Object(v.jsx)(r.a,{size:"xl",onHide:()=>B(!1),show:M,modalTitle:_("history"),className:"syn-contracts-history-modal",modalBodyContent:Object(v.jsx)(v.Fragment,{children:q.versions.sort(((e,t)=>t.fileVersion-e.fileVersion)).map(((e,t)=>Object(v.jsx)(R,{version:e,contract:q,setContract:N,refreshContracts:w,getFileContent:K},t)))})}),Object(v.jsx)(r.a,{size:"xl",onHide:()=>P(!1),show:L,modalTitle:_("catalogueUploadNewVersion"),className:"syn-contracts-upload-version-modal",modalBodyContent:Object(v.jsx)(E,{contract:q,closeUploadNewVersionModal:()=>{P(!1)},projectId:F,refreshContracts:w})}),Object(v.jsx)(I.a,{fileAvailableModal:Q,setFileAvailableModal:G})]})})},D=n(71),M=n(314),B=n(680),L=n(685);var P=e=>{var t,n,o;let{projectFile:i,selected:l,onSelection:u,showToggle:m=!0,showActionButtons:h=!1,addDeletedFiles:O,contract:y,quoteRequestId:f,showSign:R=!1,onSignedByLicenseUser:C,onSignedByLicenseHolder:N}=e;const{t:E}=Object(d.a)(),[F,T]=Object(s.useState)(l),[S,k]=Object(s.useState)(!1),[_,D]=Object(s.useState)(!1),M=Object(x.a)(),{setError:B}=Object(g.a)(),[P,H]=Object(s.useState)(!1);return Object(v.jsxs)(v.Fragment,{children:[Object(v.jsxs)(c.a,{children:[m&&Object(v.jsx)(a.a,{md:1,lg:1,children:Object(v.jsx)(L.a,{onChange:()=>{T(!F),u(!F,i)},checked:F})}),Object(v.jsx)(a.a,{xs:5,children:null===i||void 0===i||null===(t=i.synclodgeFile)||void 0===t?void 0:t.name}),Object(v.jsx)(a.a,{xs:4,children:null===i||void 0===i||null===(n=i.synclodgeFile)||void 0===n?void 0:n.description}),Object(v.jsxs)(a.a,{xs:m?2:3,children:[Object(v.jsxs)("div",{className:"d-inline-block mr-1",children:[Object(v.jsx)(j.a,{onClick:()=>{var e,t,n,s,c;null!==i&&void 0!==i&&null!==(e=i.synclodgeFile)&&void 0!==e&&e.deleted?D(!0):"Audio"===(null===i||void 0===i||null===(t=i.synclodgeFile)||void 0===t||null===(n=t.type)||void 0===n?void 0:n.key)||"Video"===(null===i||void 0===i||null===(s=i.synclodgeFile)||void 0===s||null===(c=s.type)||void 0===c?void 0:c.key)?H(!0):(async()=>{try{var e;if(null!==i&&void 0!==i&&null!==(e=i.synclodgeFile)&&void 0!==e&&e.deleted)D(!0);else{var t,n;M(!0);const e=await Object(w.d)(null===i||void 0===i?void 0:i.id);Object(b.h)(null===i||void 0===i||null===(t=i.synclodgeFile)||void 0===t?void 0:t.name,e,Object(b.m)(null===i||void 0===i||null===(n=i.synclodgeFile)||void 0===n?void 0:n.name))}}catch(s){B("syn-get-project-file-error",E("unexpectedError"),!0)}finally{M(!1)}})()},text:E("viewButton")}),Object(v.jsx)(I.a,{fileAvailableModal:_,setFileAvailableModal:D})]}),Object(v.jsx)(r.a,{size:"xl",show:P,modalTitle:E("file"),onHide:()=>H(!1),modalBodyContent:Object(v.jsx)(A.a,{closeModal:()=>H(!1),synclodgeFile:null===i||void 0===i?void 0:i.synclodgeFile})}),h&&Object(v.jsx)(v.Fragment,{children:Object(v.jsxs)("div",{className:"d-inline-block",children:[Object(v.jsx)(j.a,{onClick:()=>k(!0),text:E("deleteButton")}),Object(v.jsx)(p.a,{buttonIsPressed:S,yesPressAction:async()=>{if(y)try{await Object(w.g)(i.id),y.signedContractFile=null}catch(e){console.error(e)}else O(i)},noPressAction:()=>k(!1),actionTitle:E("deleteAction"),text:"".concat(E("areYouSureText")," ").concat(Object(b.u)(null===i||void 0===i||null===(o=i.synclodgeFile)||void 0===o?void 0:o.name,25)," ?")})]})})]})]}),F&&R&&Object(v.jsx)(c.a,{className:"mt-2 ml-5",children:Object(v.jsxs)(a.a,{xs:7,children:[Object(v.jsx)("div",{className:"mb-2",children:Object(v.jsx)(q.a,{onChange:e=>C(e.currentTarget.checked,i),text:"Signed By License User"})}),Object(v.jsx)(q.a,{onChange:e=>N(e.currentTarget.checked,i),text:"Signed By License Copyright Holder"})]})})]})},H=n(253),U=n(297);var V=e=>{let{projectFileTypes:t,headingText:n,selectedProjectFiles:o,handleFinish:l,closeModal:j,projectId:b,showSign:m=!1}=e;const{t:p}=Object(d.a)(),[h,O]=Object(s.useState)([]),[y,f]=Object(s.useState)([]),[R,C]=Object(s.useState)(!1),[q,E]=Object(s.useState)(!1),F=Object(x.a)(),{setError:T}=Object(g.a)();Object(s.useEffect)((()=>{(async()=>{try{let e=(await Object(w.e)(t,b)).filter((e=>!o.some((t=>
1t.id===e.id))));O(e)}catch(e){console.error(e)}})()}),[q]);const S=e=>y.find((t=>t.id===e.id));return Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)("div",{className:"pt-1",children:h.length>0?Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)("h2",{children:n}),Object(v.jsx)("div",{className:"syn-contracts-wrapper",children:h.map(((e,t)=>Object(v.jsx)("div",{className:"syn-contract-wrapper",children:Object(v.jsx)(P,{showSign:m,onSignedByLicenseUser:(e,t)=>{S(t).signedByLicenseUser=e},onSignedByLicenseHolder:(e,t)=>{S(t).signedByLicenseHolder=e},projectFile:e,selected:y.some((t=>t.id===e.id)),onSelection:(e,t)=>{f(e?[...y,t]:y.filter((e=>e.id!==t.id)))}})},t)))})]}):Object(v.jsx)("div",{className:"syn-no-file-wrapper",children:Object(v.jsxs)("div",{className:"syn-no-file",children:[Object(v.jsx)("div",{className:"syn-no-file-image-wrapper",children:Object(v.jsx)(H.a,{src:U.a})}),Object(v.jsxs)("div",{className:"syn-no-file-text-wrapper",children:[Object(v.jsx)("h1",{children:p("noContractFilesAssigned")}),Object(v.jsx)("h2",{children:p("asignNewFilesText")})]})]})})}),Object(v.jsxs)(c.a,{className:"pt-3 syn-general-buttons-area",children:[Object(v.jsx)(a.a,{className:"text-left",children:Object(v.jsx)(u.a,{id:"syn-multiple-project-chooser-cancel-button",text:p("cancelModalButton"),onClick:j})}),Object(v.jsxs)(a.a,{className:"text-center",children:[Object(v.jsx)(i.a,{id:"syn-multiple-project-chooser-open-upload-contracts-modal",icon:"fa fa-plus-circle",text:p("addNewButton"),onClick:()=>C(!0)}),Object(v.jsx)(r.a,{size:"xl",show:R,modalTitle:p("projectFileNewFile"),onHide:()=>C(!1),className:"syn-upload-project-files-modal",modalBodyContent:Object(v.jsx)(N.default,{fromProjectFile:!0,selectFileAction:async e=>{try{F(!0);let t={synclodgeFile:e,projectId:b};const n=await Object(w.b)(t);C(!1),O([...h,n])}catch(n){var t;C(!1),409===(null===n||void 0===n||null===(t=n.response)||void 0===t?void 0:t.status)?T("syn-add-project-file-error",p("projectFileAlreadyExists"),!0):T("syn-add-project-file-error",p("unexpectedError"),!0)}finally{F(!1)}},projectFileTypes:t})})]}),Object(v.jsx)(a.a,{className:"text-right",children:Object(v.jsx)(i.a,{id:"syn-multiple-project-chooser-add-contract",text:p("addDocument"),onClick:()=>l(y)})})]})]})};var W=e=>{let{projectId:t,closeModal:n,handleFinish:o}=e;const{t:l}=Object(d.a)(),[j,b]=Object(s.useState)({}),[m,p]=Object(s.useState)(!1);return Object(v.jsx)(c.a,{children:Object(v.jsxs)(a.a,{children:[Object(v.jsx)(c.a,{className:"text-center mb-2",children:Object(v.jsxs)(a.a,{children:[j&&j.fileName?Object(v.jsx)("p",{children:j.fileName}):Object(v.jsx)(i.a,{id:"syn-add-new-synclodge-file-contract",icon:"fa fa-plus-circle",text:l("addNewButton"),onClick:()=>p(!0)}),Object(v.jsx)(r.a,{size:"xl",show:m,modalTitle:l("projectFileNewFile"),onHide:()=>p(!1),modalBodyContent:Object(v.jsx)(N.default,{fromProjectFile:!0,selectFileAction:e=>{b(Object(C.a)(Object(C.a)({},j),{},{synclodgeFile:e,fileName:null===e||void 0===e?void 0:e.name,fileStorageDescriptorId:e.fileStorageDescriptorId,projectId:t})),p(!1)},projectFileTypes:[w.a.CONTRACT_BLANK,w.a.CONTRACT_COMPLETED,w.a.CONTRACT_SIGNED,w.a.OTHER]})})]})}),Object(v.jsx)(c.a,{children:Object(v.jsxs)(a.a,{xs:7,children:[Object(v.jsx)(q.a,{onChange:()=>b(Object(C.a)(Object(C.a)({},j),{},{signedByLicenseUser:!j.signedByLicenseUser})),checked:!(!j||!j.signedByLicenseUser)&&j.signedByLicenseUser,text:l("signedByLicenceUser")}),Object(v.jsx)(q.a,{onChange:()=>b(Object(C.a)(Object(C.a)({},j),{},{signedByLicenseHolder:!j.signedByLicenseHolder})),checked:!(!j||!j.signedByLicenseHolder)&&j.signedByLicenseHolder,text:l("signedByLicenceCopyrightHolder")})]})}),Object(v.jsxs)(c.a,{className:"mt-3",children:[Object(v.jsx)(a.a,{children:Object(v.jsx)(u.a,{text:l("cancelModalButton"),onClick:n,id:"syn-contracts-upload-new-contract-modal-cancel-button"})}),Object(v.jsx)(a.a,{className:"text-right",children:Object(v.jsx)(i.a,{text:l("finishUpload"),onClick:()=>{o([j])},id:"syn-contracts-upload-new-contract-modal-finish-upload"})})]})]})})};var z=e=>{let{projectFileTypes:t,headingText:n,selectedProjectFiles:c,handleFinish:a,closeModal:o,projectId:r}=e;const{loginSession:i}=Object(s.useContext)(f.a),{t:l}=Object(d.a)(),u=[{id:"uploadFile",label:l("uploadContract"),content:Object(v.jsx)(W,{projectId:r,closeModal:o,handleFinish:a}),isVisible:!0},{default:!0,id:"chooseFiles",label:l("chooseProjectFiles"),content:Object(v.jsx)("div",{className:"pt-3",children:Object(v.jsx)(V,{showSign:!0,projectFileTypes:t,headingText:n,selectedProjectFiles:c,handleFinish:a,closeModal:o,projectId:r})}),isVisible:!0}];return Object(v.jsx)(v.Fragment,{children:"Copyright Owner"===i.user.role?Object(v.jsx)(W,{projectId:r,closeModal:o,handleFinish:a}):Object(v.jsx)(B.a,{tabs:u,id:"syn-contract-files-chooser",isModal:!0})})},Q=n(295),G=n(22);var Y=e=>{let{comments:t,setComments:n,songContractRequestId:o}=e;const{t:i}=Object(d.a)(),{currentlanguageOption:l}=Object(y.a)(),{loginSession:u}
1=Object(s.useContext)(f.a),[p,h]=Object(s.useState)(!1),O=Object(x.a)(),{setError:R}=Object(g.a)(),C=()=>{let e=t.filter((e=>e.createUserName!==u.user.firstName+" "+u.user.lastName)).pop();return e?Object(v.jsxs)("div",{className:"syn-qoute-request-data-comments-last-comment-wrapper",children:[Object(v.jsxs)("div",{className:"syn-qoute-request-data-comments-last-comment-information",children:[i("from"),Object(v.jsx)("strong",{children:e.createUserName}),i("on"),Object(v.jsx)("strong",{children:Object(b.g)(e.createDate,null===l||void 0===l?void 0:l.dateFormat,!0,i)})]}),Object(v.jsx)("div",{className:"syn-qoute-request-data-comments-last-comment-text",children:e.text})]}):Object(v.jsxs)("div",{className:"syn-quote-request-no-comments-wrapper",children:[Object(v.jsx)("div",{className:"syn-quote-request-no-comments-image-wrapper",children:Object(v.jsx)("i",{className:"fa fa-comments-o"})}),Object(v.jsx)("div",{className:"syn-quote-request-no-comments-text-wrapper",children:i("noCommentsReceived")})]})};return Object(v.jsx)("div",{className:"syn-qoute-request-data-comments-wrapper mt-2",children:Object(v.jsxs)(c.a,{children:[Object(v.jsx)(a.a,{className:"syn-qoute-request-data-comments-col",children:t.length>0&&t.filter((e=>e.createUserName!==u.user.firstName+" "+u.user.lastName)).pop()?Object(v.jsxs)("div",{className:"syn-qoute-request-data-comments-last-comment-wrapper",children:[Object(v.jsx)("div",{className:"syn-qoute-request-data-comments-last-comment-label",children:Object(v.jsx)(G.a,{label:i("lastComment")})}),Object(v.jsx)("div",{className:"syn-qoute-request-data-comments-last-comment-value",children:C()})]}):Object(v.jsxs)("div",{className:"syn-quote-request-no-comments-wrapper",children:[Object(v.jsx)("div",{className:"syn-quote-request-no-comments-image-wrapper",children:Object(v.jsx)("i",{className:"fa fa-comments-o"})}),Object(v.jsx)("div",{className:"syn-quote-request-no-comments-text-wrapper",children:i("noContractReqComments")})]})}),Object(v.jsx)(a.a,{xs:3,className:"syn-qoute-request-data-comments-buttons-col",children:Object(v.jsxs)("div",{className:"syn-qoute-request-data-comments-buttons-wrapper",children:[Object(v.jsx)(j.a,{id:"syn-quote-request-comment-view-all",text:i("viewAllComments"),icon:"fa fa-eye",onClick:()=>h(!p)}),Object(v.jsx)(j.a,{id:"syn-quote-request-comment-new",text:i("newComment"),icon:"fa fa-comments",onClick:()=>h(!p)}),Object(v.jsx)(r.a,{size:"xl",className:"syn-general-modal syn-quote-request-all-comments-modal",show:p,onHide:()=>h(!p),modalBodyContent:Object(v.jsx)(Q.a,{messages:t,sendNewMessageAction:async e=>{try{O(!0);const t=await Object(m.l)(o,e);n(t)}catch(t){R("replyContractRequest.error",i("errorReplyToDocumentReq"))}finally{O(!1)}}})})]})})]})})},Z=n(69);t.a=Object(g.b)(Object(x.b)((e=>{var t;let{refreshContracts:n,contracts:j,setContracts:b,notes:p,setNotes:R,songContractRequestStatus:C,spotSongTitle:q,spotSongArtist:N,projectId:E,spotId:F,spotSongId:S,copyrightHolderId:k,quoteRequestId:I,songContractRequestId:A,isMessage:B,projectCategory:L}=e;const{t:P}=Object(d.a)(),{sendEvent:H}=Object(y.a)(),U=Object(o.h)(),{loginSession:V,isCopyrightOwner:W}=Object(s.useContext)(f.a),[Q,X]=Object(s.useState)(!1),[J,K]=Object(s.useState)(!1),[$,ee]=Object(s.useState)(!1),[te,ne]=Object(s.useState)(""),[se,ce]=Object(s.useState)(!1),[ae,oe]=Object(s.useState)(!1),[re,ie]=Object(s.useState)(!1),le=Object(x.a)(),{setError:de,setSuccess:ue}=Object(g.a)(),je=Object(o.g)(),{setOpenProjectType:be,setMemberPermissions:me,setFilePermissions:pe}=Object(s.useContext)(Z.a),he=()=>{b([...j])},Oe=async e=>{let t=(e=>{let t=e.map((e=>{var t,n,s;const c={fileVersion:1,description:null===e||void 0===e||null===(t=e.synclodgeFile)||void 0===t?void 0:t.description,fileName:null===e||void 0===e||null===(n=e.synclodgeFile)||void 0===n?void 0:n.name,contractFileDescriptor:null===e||void 0===e||null===(s=e.synclodgeFile)||void 0===s?void 0:s.fileStorageDescriptorId,createUser:"".concat(V.user.firstName," ").concat(V.user.lastName),createDate:new Date,signedByLicenseUser:e.signedByLicenseUser,signedByLicenseHolder:e.signedByLicenseHolder,synclodgeFile:null===e||void 0===e?void 0:e.synclodgeFile};
1return{id:null,songContractRequestId:A,currentVersion:c,versions:[c]}}));return b([...j,...t]),X(!1),t})(e);try{le(!0),await Object(m.a)({quoteRequestId:I,copyrightHolderId:k,contrats:t}),n()}catch(s){de("syn-add-contracts-error",P("documentsAddError"),!0)}finally{le(!1)}};return Object(v.jsxs)("div",{className:"syn-contract-panel-data-wrapper",children:[Object(v.jsxs)(c.a,{className:"syn-contract-request-data-of-song-wrapper",children:[Object(v.jsxs)(a.a,{xs:5,className:"text-left d-flex",children:[Object(v.jsx)("span",{className:"mr-2",children:(()=>{switch(C){case"NEW":return Object(v.jsx)(T.b,{text:P("new"),status:T.a.pending});case"SENT":return Object(v.jsx)(T.b,{text:P("sent"),status:T.a.pending});case"CONFIRMED_RECEIVED":return Object(v.jsx)(T.b,{text:P("confirmedReceived"),status:T.a.accepted});case"REOPEN":return Object(v.jsx)(T.b,{text:P("reopen"),status:T.a.accepted});default:return""}})()}),Object(v.jsx)(G.a,{label:P("documentsFor")}),' "',q,'" ',P("by")," ",N,"."]}),Object(v.jsx)(a.a,{xs:4,className:"text-left d-flex",children:Object(v.jsx)("span",{className:"mr-2",style:{fontSize:20},children:P("sendingReceivingDocumentManagementSystem")})}),Object(v.jsxs)(a.a,{xs:3,className:"text-right",children:[B&&!W()&&Object(v.jsx)(h.a,{permission:W()?null:O.a.READ_QUOTE_REQUEST,small:!0,text:P("goToSpotSongButton"),id:"contract-request-go-to-spot-song-button",className:"mr-3",icon:"fa fa-paper-plane",onClick:()=>{be(L),je.push("/project/".concat(E,"/spot/").concat(F,"/spotSong/").concat(S))}}),Object(v.jsx)(h.a,{permission:W()?null:O.a.READ_QUOTE_REQUEST,small:!0,id:"syn-master-rights-show-quote-request-modal",onClick:()=>K(!0),text:P("viewQuoteRequest"),icon:"fa fa-eye"}),Object(v.jsx)(r.a,{size:"xl",show:J,className:"syn-quote-request-generation-modal",modalTitle:P("quoteRequest"),onHide:()=>K(!1),modalBodyContent:Object(v.jsx)(l.a,{copyrightHolderId:k,quoteRequestId:I})})]})]}),Object(v.jsx)(Y,{comments:p,setComments:R,songContractRequestId:A,refreshContracts:n}),Object(v.jsx)(c.a,{children:Object(v.jsxs)(a.a,{className:"p-3",children:[Object(v.jsx)("div",{className:"d-inline-block mr-2"}),Object(v.jsx)("div",{className:"d-inline-block",children:Object(v.jsx)(r.a,{show:Q,modalTitle:P("documents"),onHide:()=>X(!1),modalBodyContent:Object(v.jsx)(z,{projectFileTypes:[w.a.CONTRACT_BLANK,w.a.CONTRACT_COMPLETED,w.a.OTHER],projectId:E,headingText:P("chooseContractsToSend"),closeModal:()=>X(!1),selectedProjectFiles:[],handleFinish:e=>{Oe(e)}})})}),0===j.length?Object(v.jsx)("div",{className:"text-center",children:P("noDocumentsAdded")}):Object(v.jsx)(v.Fragment,{children:j.map(((e,t)=>Object(v.jsx)(_,{contract:e,setContract:he,refreshContracts:n,projectId:E},t)))})]})}),Object(v.jsxs)(c.a,{className:"py-3",children:[Object(v.jsxs)(a.a,{xs:12,className:"text-right",children:[Object(v.jsx)("div",{className:"mr-1 d-inline-block",children:Object(v.jsx)(h.a,{permission:W()?null:O.a.UPDATE_CONTRACTS,id:"syn-contracts-panel-add-contract",icon:"fa fa-plus",text:0===j.length?P("addDocument"):P("addAdditionalDocument"),onClick:()=>X(!0)})}),"OFFLINE"!==(null===U||void 0===U||null===(t=U.state)||void 0===t?void 0:t.quoteRequestStatus)||W()?Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)("div",{className:"mr-1 d-inline-block",children:Object(v.jsx)(h.a,{permission:W()?null:O.a.UPDATE_CONTRACTS,id:"syn-contracts-panel-send-current-version-contract",icon:"fa fa-paper-plane",text:P(A?"sendCurentVersionDocuments":"sendDocumentReq"),onClick:()=>ee(!0)})}),!W()&&A&&Object(v.jsxs)(v.Fragment,{children:["CONFIRMED_RECEIVED"===C&&Object(v.jsxs)("div",{className:"d-inline-block mr-1",children:[Object(v.jsx)(h.a,{permission:W()?null:O.a.UPDATE_CONTRACTS,id:"syn-contracts-panel-reopen-contracts-modal",text:P("reopen"),onClick:()=>oe(!0)}),Object(v.jsx)(r.a,{show:ae,modalTitle:P("reopenDocuments"),onHide:()=>oe(!1),modalBodyContent:Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)(c.a,{children:Object(v.jsx)(a.a,{children:Object(v.jsx)(D.a,{id:"syn-contracts-panel-reopen-contracts-modal-text-area-message-note",className:"w-100 mb-3",onChange:e=>ne(e.target.value),label:P("documentMessage"),rows:"4",cols:"71"})})}),Object(v.jsxs)(c.a,{className:"mt-2",children:[Object(v.jsx)(a.a,{className:"text-left",children:Object(v.jsx)(u.a,{id:"syn-contracts-panel-reopen-contracts-modal-cancel-button",text:P("cancelModalButton"),onClick:()=>oe(!1)})}),Object(v.jsx)(a.a,{className:"text-right",children:Object(v.jsx)(M.a,{id:"syn-contracts-panel-reopen-contracts",text:P("reopenDocuments"),onClick:async()=>{try{le(!0),await Object(m.k)(A,te),n(),oe(!1),ue("syn-reopen-contracts-success",P("reopenDocumentsSuccess"),!0)}catch(e){de("syn-reopen-contracts-error",P("reopenDocumentsError"),!0)}finally{le(!1)}}})})]})]})})]}),"CONFIRMED_RECEIVED"!==C&&Object(v.jsxs)("div",{className:"d-inline-block",children:[Object(v.jsx)(h.a,{permission:W()?null:O.a.UPDATE_CONTRACTS,id:"syn-contracts-confirm-contracts",icon:"fa fa-check",text:P("confirmDocumentsComplete"),onClick:()=>ce(!0)}),Object(v.jsx)(r.a,{show:se,header:P("confirmDocuments"),onHide:()=>ce(!1),modalBodyContent:Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)(c.a,{children:Object(v.jsx)(a.a,{children:Object(v.jsx)(D.a,{id:"syn-contracts-confirm-contracts-modal-text-area-request-note",className:"w-100 mb-3",onChange:e=>ne(e.target.value),label:P("documentMessage"),rows:"4",cols:"71"})})}),Object(v.jsxs)(c.a,{className:"mt-2",children:[Object(v.jsx)(a.a,{className:"text-left",children:Object(v.jsx)(u.a,{id:"syn-contracts-confirm-contracts-modal-cancel-button",text:P("cancelModalButton"),onClick:()=>ce(!1)})}),Object(v.jsx)(a.a,{className:"text-right",children:Object(v.jsx)(M.a,{id:"syn-contracts-confirm-contracts-modal",text:P("confirmDocuments"),onClick:async()=>{try{le(!0),await Object(m.c)(A,te),n(),H("refreshCopyrightColor"),ce(!1),ue("syn-confirm-contracts-success",P("confirmDocumentsSuccess"),!0)}catch(e){de("syn-confirm-contracts-error",P("confirmDocumentsError"),!0)}finally{le(!1)}}})})]})]})})]})]})]}):Object(v.jsx)("div",{className:"mr-1 d-inline-block",children:"CONFIRMED_RECEIVED"!==C&&Object(v.jsx)(h.a,{permission:W()?null:O.a.UPDATE_CONTRACTS,id:"syn-contracts-panel-confirm-contract",text:P("confirmDocumentsComplete"),onClick:async()=>{try{le(!0),await Object(m.b)(I,k),n(),H("refreshCopyrightColor"),ce(!1)}catch(e){de("syn-confirm-offline-contracts-error",P("confirmDocumentsOfflineError"),!0)}finally{le(!1)}}})})]}),A&&("NEW"===C||"REOPEN"===C)&&!W()&&Object(v.jsx)(a.a,{children:Object(v.jsx)(v.Fragment,{children:j.length>0?Object(v.jsx)(r.a,{show:re,modalTitle:P("deleteDocuments"),onHide:()=>ie(!1),modalBodyContent:Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)(c.a,{children:Object(v.jsx)(a.a,{children:P("deleteDocumentsAndReq")})}),Object(v.jsx)(c.a,{children:Object(v.jsx)(a.a,{children:Object(v.jsx)(u.a,{id:"syn-contracts-delete-contracts-modal",text:P("cancelModalButton"),onClick:()=>ie(!1)})})})]})}):Object(v.jsx)(r.a,{show:re,modalTitle:P("deleteDocuments"),onHide:()=>ie(!1),modalBodyContent:Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)(c.a,{children:Object(v.jsx)(a.a,{children:Object(v.jsx)(D.a,{id:"syn-contracts-modal-text-area-contract-message-note",className:"",onChange:e=>ne(e.target.value),label:P("documentMessage"),rows:"4",cols:"71"})})}),Object(v.jsxs)(c.a,{className:"mt-2",children:[Object(v.jsx)(a.a,{children:Object(v.jsx)(u.a,{id:"syn-contracts-modal-text-area-contract-message-note-cancel",text:P("cancelModalButton"),onClick:()=>ie(!1)})}),Object(v.jsx)(a.a,{children:Object(v.jsx)(u.a,{id:"syn-contracts-modal-text-area-contract-message-note-delete",text:P("deleteDocuments"),onClick:async()=>{try{le(!0),await Object(m.f)(A,te),n(),ie(!1)}catch(e){de("syn-delete-contracts-error",P("deleteDocumentsError"),!0)}finally{le(!1)}}})})]})]})})})}),Object(v.jsx)(r.a,{show:$,modalTitle:P(A?"sendCurentVersionDocuments":"sendDocumentReq"),onHide:()=>ee(!1),modalBodyContent:Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)(c.a,{children:Object(v.jsx)(a.a,{children:Object(v.jsx)(D.a,{id:"syn-contracts-modal-text-area-send-current-version",onChange:e=>ne(e.target.value),label:P("documentMessage"),rows:"4",cols:"71"})})}),Object(v.jsxs)(c.a,{className:"mt-2",children:[Object(v.jsx)(a.a,{children:Object(v.jsx)(u.a,{id:"syn-contracts-modal-text-area-send-current-version-cancel",text:P("cancelModalButton"),onClick:()=>ee(!1)})}),Object(v.jsx)(a.a,{className:"text-right",children:Object(v.jsx)(i.a,{id:"syn-contracts-modal-text-area-send-current-version-of-contracts",text:P(A?"sendCurentVersionDocuments":"sendDocumentReq"),onClick:async()=>{try{le(!0),await Object(m.m)(I,te,k),n(),ee(!1),ue("syn-send-contracts-success",P("sendDocumentsSuccess"),!0)}catch(e){de("syn-send-contracts-error",P("sendDocumentsError"),!0)}finally{le(!1)}}})})]})]})})]})]})})))}}]);
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.