1import{a as se}from"./chunk-527WOCEM.js";import{a as Ke}from"./chunk-LS7EJ35E.js";import"./chunk-EJATZZZI.js";import{$ as W,Aa as K,Ac as ye,Ba as Q,Bb as Se,Ca as m,Da as ne,E as M,Ea as ie,F as C,G as D,Ga as g,Gd as Ge,H as w,Hd as Ve,I as z,Ia as d,Id as Je,Jd as Ye,La as Te,Lc as Ie,Ma as pe,Mc as ve,Md as Xe,Na as Me,Nc as $e,Oc as Fe,Qa as L,Sa as t,Ta as R,Tb as Oe,Tc as ke,Ua as N,V as B,Va as Ce,Vc as ee,W as s,Xa as oe,Ya as ae,Yb as re,Z as O,Za as le,_ as H,ac as Ne,ba as q,bc as Ae,ca as P,cc as Y,dc as Z,ec as Pe,gd as te,ha as u,ib as fe,ic as _e,ja as T,jb as Ee,jc as Re,kc as De,ma as V,na as J,nc as Le,oa as h,ob as he,pa as a,qa as l,qc as be,ra as p,rc as we,sd as Ue,td as je,xb as xe,ya as x,z as X}from"./chunk-CVG7FT2Q.js";import{a as b,b as ge,h as qe,i as ue}from"./chunk-6MNQWVC2.js";var ze=(n,_)=>_.id;function et(n,_){if(n&1&&(t(0,` 2 `),a(1,"div",32),t(2,` 3 `),a(3,"p",33),m(4,2),l(),t(5,` 4 `),a(6,"p",34),t(7),l(),t(8,` 5 `),l(),t(9,` 6 `)),n&2){let e=d();s(7),R(e.data==null||e.data.file==null?null:e.data.file.name)}}function tt(n,_){n&1&&(t(0,` 7 `),a(1,"span"),m(2,3),l(),t(3,` 8 `))}function nt(n,_){n&1&&(t(0,` 9 `),a(1,"span"),m(2,4),l(),t(3,` 10 `))}function it(n,_){if(n&1&&(t(0,` 11 `),a(1,"p",35),t(2),l(),t(3,` 12 `)),n&2){let e=d();s(2),R(e.getErrorMessage("tm_name"))}}function ot(n,_){if(n&1&&(t(0,` 13 `),a(1,"div"),t(2,` 14 `),a(3,"label",25),m(4,5),l(),t(5,` 15 `),a(6,"p",36),t(7),l(),t(8,` 16 `),l(),t(9,` 17 `)),n&2){let e=d();s(7),N(` 18 `,e.addTmForm.controls.tm_source_lng.value==null?null:e.addTmForm.controls.tm_source_lng.value.language,` 19 `)}}function at(n,_){if(n&1&&t(0),n&2){let e=d(2);N(` 20 `,e.getSelectedSourceLanguageLabel(),` 21 `)}}function lt(n,_){n&1&&(t(0,` 22 `),a(1,"span"),m(2,7),l(),t(3,` 23 `))}function rt(n,_){n&1&&(t(0,` 24 `),a(1,"span"),m(2,8),l(),t(3,` 25 `))}function _t(n,_){if(n&1){let e=x();t(0,` 26 `),a(1,"li"),t(2,` 27 `),a(3,"button",42),g("click",function(){let i=M(e).$implicit,r=d(3);return C(r.selectSourceLanguage(i))}),t(4),l(),t(5,` 28 `),l(),t(6,` 29 `)}if(n&2){let e=_.$implicit,o=d(3);s(3),L("bg-gray-100",o.addTmForm.value.tm_source_lng===e.id),h("disabled",o.addTmForm.value.tm_target_lng===e.id),s(),N(` 30 `,e.language,` 31 `)}}function st(n,_){n&1&&(t(0,` 32 `),a(1,"li",43),m(2,9),l(),t(3,` 33 `))}function dt(n,_){if(n&1&&(t(0,` 34 `),a(1,"div",38),g("click",function(o){return o.stopPropagation()}),t(2,` 35 `),a(3,"div",39),t(4,` 36 `),p(5,"input",40),t(6,` 37 `),l(),t(7,` 38 `),a(8,"ul",41),t(9,` 39 `),V(10,_t,7,4,null,null,ze,!1,st,4,0),l(),t(13,` 40 `),l(),t(14,` 41 `)),n&2){let e=d(2);s(5),h("formControl",e.searchSourceLng),s(5),J(e.filteredSourceLanguages)}}function ct(n,_){if(n&1&&(t(0,` 42 `),a(1,"p",35),t(2),l(),t(3,` 43 `)),n&2){let e=d(2);s(2),R(e.getErrorMessage("tm_source_lng"))}}function mt(n,_){if(n&1){let e=x();t(0,` 44 `),a(1,"div",37),t(2,` 45 `),a(3,"label",25),K(4,6),p(5,"span",22),Q(),l(),t(6,` 46 `),a(7,"div",26),g("click",function(i){return i.stopPropagation()}),t(8,` 47 `),a(9,"button",27),g("click",function(i){M(e);let r=d();return C(r.toggleSourceDropdown(i))}),t(10,` 48 `),a(11,"span",28),t(12,` 49 `),u(13,at,1,1)(14,lt,4,0)(15,rt,4,0),l(),t(16,` 50 `),p(17,"img",29),t(18,` 51 `),l(),t(19,` 52 53 `),u(20,dt,15,2),l(),t(21,` 54 `),u(22,ct,4,1),l(),t(23,` 55 `)}if(n&2){let e=d();s(9),L("text-gray-400",!e.addTmForm.value.tm_source_lng),h("disabled",e.languagesLoading),s(4),T(e.addTmForm.value.tm_source_lng?13:e.languagesLoading?14:15),s(7),T(e.showSourceDropdown?20:-1),s(2),T((e.addTmForm.controls.tm_source_lng.touched||e.submitted)&&e.addTmForm.controls.tm_source_lng.errors?22:-1)}}function gt(n,_){if(n&1&&t(0),n&2){let e=d();N(` 56 `,e.getSelectedTargetLanguageLabel(),` 57 `)}}function ut(n,_){n&1&&(t(0,` 58 `),a(1,"span"),m(2,10),l(),t(3,` 59 `))}function Tt(n,_){n&1&&(t(0,` 60 `),a(1,"span"),m(2,11),l(),t(3,` 61 `))}function pt(n,_){if(n&1){let e=x();t(0,` 62 `),a(1,"li"),t(2,` 63 `),a(3,"button",42),g("click",function(){let i=M(e).$implicit,r=d(2);return C(r.selectTargetLanguage(i))}),t(4),l(),t(5,`
64 `),l(),t(6,` 65 `)}if(n&2){let e=_.$implicit,o=d(2);s(3),L("bg-gray-100",o.addTmForm.value.tm_target_lng===e.id),h("disabled",o.isTargetLanguageDisabled(e)),s(),N(` 66 `,e.language,` 67 `)}}function Mt(n,_){n&1&&(t(0,` 68 `),a(1,"li",43),m(2,12),l(),t(3,` 69 `))}function Ct(n,_){if(n&1&&(t(0,` 70 `),a(1,"div",38),g("click",function(o){return o.stopPropagation()}),t(2,` 71 `),a(3,"div",39),t(4,` 72 `),p(5,"input",44),t(6,` 73 `),l(),t(7,` 74 `),a(8,"ul",41),t(9,` 75 `),V(10,pt,7,4,null,null,ze,!1,Mt,4,0),l(),t(13,` 76 `),l(),t(14,` 77 `)),n&2){let e=d();s(5),h("formControl",e.searchTargetLng),s(5),J(e.filteredTargetLanguages)}}function ft(n,_){if(n&1&&(t(0,` 78 `),a(1,"p",35),t(2),l(),t(3,` 79 `)),n&2){let e=d();s(2),R(e.getErrorMessage("tm_target_lng"))}}function Et(n,_){n&1&&m(0,1,1)}function ht(n,_){n&1&&m(0,1,2)}var Be=(()=>{class n extends te{constructor(e,o,i,r,c){super(e),this.dialogRef=o,this.fb=i,this.cdr=r,this.data=c,this.isLoading=!1,this.languagesLoading=!0,this.searchSourceLng=new _e(""),this.searchTargetLng=new _e(""),this.langs=[],this.filteredSourceLanguages=[],this.filteredTargetLanguages=[],this.showSourceDropdown=!1,this.showTargetDropdown=!1,this.submitted=!1,this.fileToUpload=null}ngOnInit(){this.fileToUpload=this.data?.file,this.addTmForm=this.fb.group({tm_name:["",[Y.required,Y.maxLength(200)]],tm_source_lng:[this.data?.isGlobal?"":this._project.project.proj_source_language,[Y.required]],tm_target_lng:["",[Y.required]]}),this.searchSourceLng.valueChanges.subscribe(e=>{this.filterSourceLangs(e??""),this.cdr.markForCheck()}),this.searchTargetLng.valueChanges.subscribe(e=>{this.filterTargetLangs(e??""),this.cdr.markForCheck()}),this.loadLanguages()}onDocumentClick(){this.showSourceDropdown&&(this.showSourceDropdown=!1,this.searchSourceLng.setValue("",{emitEvent:!1}),this.filteredSourceLanguages=[...this.langs]),this.showTargetDropdown&&(this.showTargetDropdown=!1,this.searchTargetLng.setValue("",{emitEvent:!1}),this.filteredTargetLanguages=[...this.langs]),this.cdr.markForCheck()}loadLanguages(){return ue(this,null,function*(){if(this.languagesLoading=!0,this._lng.allLanguages?.length>0){this.setLanguages(this._lng.allLanguages);return}try{let e=yield this._lng.getAllLanguages();this.setLanguages(e?.length?e:this._lng.allLanguages??[])}catch(e){this.setLanguages(this._lng.allLanguages??[])}})}setLanguages(e){this.langs=Array.isArray(e)?e:[],this.filteredSourceLanguages=[...this.langs],this.filteredTargetLanguages=[...this.langs],this.languagesLoading=!1,this.cdr.markForCheck()}toggleSourceDropdown(e){e.stopPropagation(),this.showTargetDropdown=!1,this.showSourceDropdown=!this.showSourceDropdown,this.showSourceDropdown&&(this.searchSourceLng.setValue("",{emitEvent:!1}),this.filteredSourceLanguages=[...this.langs]),this.cdr.markForCheck()}toggleTargetDropdown(e){e.stopPropagation(),this.showSourceDropdown=!1,this.showTargetDropdown=!this.showTargetDropdown,this.showTargetDropdown&&(this.searchTargetLng.setValue("",{emitEvent:!1}),this.filteredTargetLanguages=[...this.langs]),this.cdr.markForCheck()}selectSourceLanguage(e){this.addTmForm.patchValue({tm_source_lng:e.id}),this.addTmForm.controls.tm_source_lng.markAsTouched(),this.showSourceDropdown=!1,this.searchSourceLng.setValue("",{emitEvent:!1}),this.filteredSourceLanguages=[...this.langs],this.cdr.markForCheck()}selectTargetLanguage(e){this.addTmForm.patchValue({tm_target_lng:e.id}),this.addTmForm.controls.tm_target_lng.markAsTouched(),this.showTargetDropdown=!1,this.searchTargetLng.setValue("",{emitEvent:!1}),this.filteredTargetLanguages=[...this.langs],this.cdr.markForCheck()}getSelectedSourceLanguageLabel(){let e=this.addTmForm.value.tm_source_lng;return this.langs.find(o=>o.id===e)?.language??""}getSelectedTargetLanguageLabel(){let e=this.addTmForm.value.tm_target_lng;return this.langs.find(o=>o.id===e)?.language??""}isTargetLanguageDisabled(e){return this.data?.isGlobal?this.addTmForm.value.tm_source_lng===e.id:this.addTmForm.controls.tm_source_lng.value?.id===e.id}filterSourceLangs(e){if(!e.trim()){this.filteredSourceLanguages=[...this.langs];return}let o=e.toLowerCase();this.filteredSourceLanguages=this.langs.filter(i=>i.language?.toLowerCase().includes(o))}filterTargetLangs(e){if(!e.trim()){this.filteredTargetLanguages=[...this.langs];return}let o=e.toLowerCase();this.filteredTargetLanguages=this.langs.filter(i=>i.language?.toLowerCase().includes(o))}getErrorMessage(e){return this._com.formErrors("tm",this.addTmForm.controls[e],e)}addNewTM(e){if(this.submitted=!0,!this.addTmForm.valid)return;this.isLoading=!0;let o={name:this.addTmForm.value.tm_name,source_language:e?.isGlobal?this.addTmForm.value.tm_source_lng:this.addTmForm.value.tm_source_lng.id,target_language:this.addTmForm.value.tm_target_lng,proj_id:!e?.isGlobal||e?.from==="integration"?this._project.projectId:void 0,org_id:this._org.orgId};if(e?.type==="upload_tm"){o.filename=this.fileToUpload,this.fileToUpload&&this._file.fileList.push(this.fileToUpload),this.onStartUploadFiles(o);return}this._tm.addNewProjectTm(o).subscribe(i=>{this.isLoading=!1,i?.success&&(this._msg.success(i.message),this.dialogRef.close(!0))})}onStartUploadFiles(e){this._file.fileList.forEach(o=>{this._file.fileProgress[o.lastModified]={progress:0},this._file.onFileUpload(e,"tm").then(c=>{c.success||this._msg.error(c.message)}).finally(()=>{this.isLoading=!1});let r={source_language:this._lng.allLanguages.filter(c=>c.id===e.source_language).map(c=>c),target_language:this._lng.allLanguages.filter(c=>c.id===e.target_language).map(c=>c),file:this.fileToUpload,name:e.name};this.dialogRef.close(r)})}static{this.\u0275fac=function(o){return new(o||n)(O(z),O(Ie),O(ye),O(he),O(ve))}}static{this.\u0275cmp=H({type:n,selectors:[["app-add-tm"]],hostBindings:function(o,i){o&1&&g("click",function(){return i.onDocumentClick()},B)},standalone:!1,features:[q],decls:71,vars:15,consts:()=>{let e;e=$localize`Close`;let o;o=$localize` 80 Target Language${"\uFFFD#41\uFFFD"}:START_TAG_SPAN:*${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SPAN: 81 `;let i;i=$localize` 82 ${"\uFFFD*64:1\uFFFD"}:START_BLOCK_IF: 83 Saving... 84 ${"\uFFFD/*64:1\uFFFD"}:CLOSE_BLOCK_IF: ${"\uFFFD*65:2\uFFFD"}:START_BLOCK_ELSE: 85 Save TM 86 ${"\uFFFD/*65:2\uFFFD"}:CLOSE_BLOCK_ELSE: 87 `;let r;r=$localize`File name`;
87let c;c=$localize`TM Name`;let S;S=$localize`Name`;let A;A=$localize`Source Language`;let y;y=$localize` 88 Source Language${"\uFFFD#5\uFFFD"}:START_TAG_SPAN:*${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPAN: 89 `;let I;I=$localize`Loading languages...`;let v;v=$localize`Select source language`;let $;$=$localize`Search language`;let F;F=$localize`No languages found`;let k;k=$localize`Loading languages...`;let U;U=$localize`Select target language`;let j;j=$localize`Search language`;let G;return G=$localize`No languages found`,[o,i,r,c,S,A,y,I,v,F,k,U,G,[1,"flex","max-h-[85vh]","w-full","flex-col"],[1,"flex","shrink-0","items-center","justify-between","gap-4","border-b","border-gray-200","px-6","py-4"],[1,"font-dm-sans","text-base","font-medium","text-gray-900"],["type","button","mat-dialog-close","","aria-label",e,1,"flex","size-8","shrink-0","items-center","justify-center","rounded-lg","text-gray-600","transition-colors","hover:bg-gray-100","hover:text-gray-900"],["viewBox","0 0 20 20","fill","none","aria-hidden","true",1,"size-5"],["d","M5 5l10 10M15 5 5 15","stroke","currentColor","stroke-width","1.5","stroke-linecap","round"],[1,"min-h-0","flex-1","overflow-y-auto","px-6","py-5"],[1,"flex","flex-col","gap-5",3,"ngSubmit","formGroup"],["for","tm-name",1,"mb-2","block","font-dm-sans","text-sm","font-medium","text-gray-900"],[1,"text-red-500"],["id","tm-name","type","text","formControlName","tm_name",1,"w-full","rounded-lg","border","border-gray-200","bg-white","px-3","py-2","font-dm-sans","text-sm","text-gray-900","placeholder:text-gray-400","focus:border-gray-300","focus:outline-none",3,"placeholder"],[1,"relative","z-10"],[1,"mb-2","block","font-dm-sans","text-sm","font-medium","text-gray-900"],[1,"relative",3,"click"],["type","button",1,"flex","w-full","items-center","justify-between","gap-2","rounded-lg","border","border-gray-200","bg-white","px-3","py-2","font-dm-sans","text-sm","text-gray-900","hover:border-gray-300",3,"click","disabled"],[1,"truncate","text-left"],["src","assets/images/icons/chevron-up-down.svg","alt","",1,"size-4","shrink-0"],[1,"flex","justify-end","border-t","border-gray-200","pt-4"],["type","submit",1,"btn","h-9","min-w-[120px]",3,"disabled"],[1,"rounded-lg","border","border-gray-200","bg-gray-50","px-3","py-2.5"],[1,"mb-0","font-dm-sans","text-xs","text-gray-550"],[1,"mb-0","truncate","font-dm-sans","text-sm","text-gray-900"],[1,"mt-1","font-dm-sans","text-xs","text-red-500"],[1,"mb-0","inline-flex","rounded-full","bg-yellow-200","px-3","py-1","font-dm-sans","text-sm","text-gray-900"],[1,"relative","z-20"],[1,"absolute","left-0","top-full","z-100","mt-1","w-full","overflow-hidden","rounded-lg","border","border-gray-200","bg-white","shadow-lg",3,"click"],[1,"border-b","border-gray-100","p-2"],["type","search","placeholder",$,1,"w-full","rounded-lg","border","border-gray-200","bg-white","px-3","py-2","font-dm-sans","text-sm","text-gray-900","placeholder:text-gray-400","focus:border-gray-300","focus:outline-none",3,"formControl"],[1,"max-h-48","overflow-y-auto","py-1"],["type","button",1,"block","w-full","px-3","py-2","text-left","font-dm-sans","text-sm","text-gray-900","hover:bg-gray-50","disabled:cursor-not-allowed","disabled:text-gray-400",3,"click","disabled"],[1,"px-3","py-4","text-center","font-dm-sans","text-sm","text-gray-550"],["type","search","placeholder",j,1,"w-full","rounded-lg","border","border-gray-200","bg-white","px-3","py-2","font-dm-sans","text-sm","text-gray-900","placeholder:text-gray-400","focus:border-gray-300","focus:outline-none",3,"formControl"]]},template:function(o,i){o&1&&(a(0,"div",13),t(1,` 90 `),a(2,"div",14),t(3,` 91 `),a(4,"h2",15),t(5),l(),t(6,` 92 `),a(7,"button",16),t(8,` 93 `),D(),a(9,"svg",17),t(10,` 94 `),p(11,"path",18),t(12,` 95 `),l(),t(13,` 96 `),l(),t(14,` 97 `),l(),t(15,` 98 99 `),w(),a(16,"div",19),t(17,` 100 `),a(18,"form",20),g("ngSubmit",function(){return i.addNewTM(i.data)}),t(19,` 101 `),u(20,et,10,1),a(21,"div"),t(22,` 102 `),a(23,"label",21),t(24,` 103 `),u(25,tt,4,0)(26,nt,4,0),a(27,"span",22),t(28,"*"),l(),t(29,`
104 `),l(),t(30,` 105 `),p(31,"input",23),t(32,` 106 `),u(33,it,4,1),l(),t(34,` 107 108 `),u(35,ot,10,1)(36,mt,24,6),a(37,"div",24),t(38,` 109 `),a(39,"label",25),K(40,0),p(41,"span",22),Q(),l(),t(42,` 110 `),a(43,"div",26),g("click",function(c){return c.stopPropagation()}),t(44,` 111 `),a(45,"button",27),g("click",function(c){return i.toggleTargetDropdown(c)}),t(46,` 112 `),a(47,"span",28),t(48,` 113 `),u(49,gt,1,1)(50,ut,4,0)(51,Tt,4,0),l(),t(52,` 114 `),p(53,"img",29),t(54,` 115 `),l(),t(55,` 116 117 `),u(56,Ct,15,2),l(),t(57,` 118 `),u(58,ft,4,1),l(),t(59,` 119 120 `),a(60,"div",30),t(61,` 121 `),a(62,"button",31),K(63,1),u(64,Et,1,0)(65,ht,1,0),Q(),l(),t(66,` 122 `),l(),t(67,` 123 `),l(),t(68,` 124 `),l(),t(69,` 125`),l(),t(70,` 126`)),o&2&&(s(5),N(` 127 `,(i.data==null?null:i.data.title)||"Add TM",` 128 `),s(13),h("formGroup",i.addTmForm),s(2),T((i.data==null?null:i.data.type)==="upload_tm"?20:-1),s(5),T((i.data==null?null:i.data.type)==="upload_tm"?25:26),s(6),h("placeholder",(i.data==null?null:i.data.type)==="upload_tm"?"TM Name":"Name"),s(2),T((i.addTmForm.controls.tm_name.touched||i.submitted)&&i.addTmForm.controls.tm_name.errors?33:-1),s(2),T(i.data!=null&&i.data.isGlobal?36:35),s(10),L("text-gray-400",!i.addTmForm.value.tm_target_lng),h("disabled",i.languagesLoading),s(4),T(i.addTmForm.value.tm_target_lng?49:i.languagesLoading?50:51),s(7),T(i.showTargetDropdown?56:-1),s(2),T((i.addTmForm.controls.tm_target_lng.touched||i.submitted)&&i.addTmForm.controls.tm_target_lng.errors?58:-1),s(4),h("disabled",i.isLoading),s(2),T(i.isLoading?64:65))},dependencies:[Fe,De,Ae,Z,Pe,Le,we,be],encapsulation:2})}}return n})();var He=qe(Ke());var xt=["uploadTmFiles"],St=(n,_)=>_.id;function Ot(n,_){if(n&1&&(t(0,` 129 `),a(1,"span",22),t(2,` 130 `),a(3,"span"),m(4,2),l(),t(5,` 131 `),l(),t(6,` 132 `)),n&2){let e=d();s(4),ne(e._project.project.proj_source_language.language),ie(4)}}function Nt(n,_){if(n&1){let e=x();t(0,` 133 `),a(1,"app-search-bar",23),g("searchChange",function(i){M(e);let r=d();return C(r.onSearchChange(i))}),l(),t(2,` 134 `)}if(n&2){let e=d();s(),h("value",e.searchString)}}function At(n,_){if(n&1){let e=x();t(0,` 135 `),a(1,"div",26),g("click",function(i){return i.stopPropagation()}),t(2,` 136 `),a(3,"button",27),g("click",function(){M(e);let i=d(2);return i.addNewTM("create_tm"),C(i.showAddMenu=!1)}),m(4,4),l(),t(5,` 137 `),a(6,"button",27),g("click",function(){M(e);let i=d(2);return i.uploadNewTm(),C(i.showAddMenu=!1)}),m(7,5),l(),t(8,` 138 `),l(),t(9,` 139 `)}}function Pt(n,_){if(n&1){let e=x();t(0,` 140 `),a(1,"div",24),t(2,` 141 `),a(3,"button",25),g("click",function(i){M(e);let r=d();return C(r.toggleAddMenu(i))}),m(4,3),l(),t(5,` 142 `),u(6,At,10,0),l(),t(7,` 143 `)}if(n&2){let e=d();s(6),T(e.showAddMenu?6:-1)}}function Rt(n,_){n&1&&(t(0,` 144 `),p(1,"app-loader",28),t(2,` 145 `)),n&2&&(s(),h("fullScreen",!0))}function Dt(n,_){if(n&1){let e=x();t(0,` 146 `),a(1,"div",33),t(2,` 147 `),a(3,"button",25),g("click",function(){M(e);let i=d(2);return C(i.addNewTM("create_tm"))}),m(4,7),l(),t(5,` 148 `),a(6,"button",34),g("click",function(){M(e);let i=d(2);return C(i.uploadNewTm())}),m(7,8),l(),t(8,` 149 `),l(),t(9,` 150 `)}}function Lt(n,_){if(n&1&&(t(0,` 151 `),a(1,"div",29),t(2,` 152 `),a(3,"div",30),t(4,` 153 `),p(5,"img",31),t(6,` 154 `),a(7,"p",32),m(8,6),l(),t(9,` 155 `),u(10,Dt,10,0),l(),t(11,` 156 `),l(),t(12,` 157 `)),n&2){let e=d();s(10),T(e.canAddTm()?10:-1)}}function bt(n,_){n&1&&(t(0,` 158 `),a(1,"div",29),t(2,` 159 `),p(3,"app-no-result"),t(4,` 160 `),l(),t(5,` 161 `))}function wt(n,_){if(n&1&&(t(0,` 162 `),a(1,"div",45),t(2,` 163 `),a(3,"span",46),t(4),l(),t(5,` 164 `),l(),t(6,` 165 `)),n&2){let e=_.$implicit;s(),L("text-red-500",e.status==="error"),s(3),R(e.name)}}function yt(n,_){if(n&1&&(t(0,` 166 `),a(1,"span",47),t(2),l(),t(3,` 167 `)),n&2){let e=_.$implicit;s(2),R(e.target_language==null?null:e.target_language.language)}}function It(n,_){if(n&1&&(t(0,` 168 `),a(1,"p",47),t(2),l(),t(3,` 169 `),a(4,"p",48),t(5),fe(6,"date"),l(),t(7,` 170 `)),n&2){let e=_.$implicit;s(2),Ce(` 171 `,e.created_by==null?null:e.created_by.first_name," ",e.created_by==null?null:e.created_by.last_name,` 172 `),s(3),R(Ee(6,3,e.created_at))}}function vt(n,_){n&1&&(t(0,` 173 `),a(1,"span",49),t(2,` 174 `),a(3,"span"),m(4,9),l(),t(5,` 175 `),a(6,"span",50),t(7,` 176 `),a(8,"button",51),t(9,` 177 `),D(),a(10,"svg",52),t(11,` 178 `),p(12,"circle",53),t(13,` 179 `),p(14,"path",54),t(15,`
180 `),l(),t(16,` 181 `),l(),t(17,` 182 `),w(),a(18,"span",55),m(19,10),l(),t(20,` 183 `),l(),t(21,` 184 `),l(),t(22,` 185 `))}function $t(n,_){n&1&&(t(0,` 186 `),a(1,"span",49),t(2,` 187 `),a(3,"span"),m(4,11),l(),t(5,` 188 `),a(6,"span",50),t(7,` 189 `),a(8,"button",56),t(9,` 190 `),D(),a(10,"svg",52),t(11,` 191 `),p(12,"circle",53),t(13,` 192 `),p(14,"path",54),t(15,` 193 `),l(),t(16,` 194 `),l(),t(17,` 195 `),w(),a(18,"span",57),m(19,12),l(),t(20,` 196 `),l(),t(21,` 197 `),l(),t(22,` 198 `))}function Ft(n,_){if(n&1){let e=x();t(0,` 199 `),a(1,"input",58),le("ngModelChange",function(i){M(e);let r=d().$implicit;return ae(r.is_enabled,i)||(r.is_enabled=i),C(i)}),g("change",function(i){M(e);let r=d().$implicit,c=d(2);return C(i.target.checked?c.enableTM(i.target.checked,r):c.onDisableTmData(r))})("click",function(i){return i.stopPropagation()}),l(),t(2,` 200 `)}if(n&2){let e=d().$implicit;s(),oe("ngModel",e.is_enabled)}}function kt(n,_){if(n&1&&(t(0,` 201 `),u(1,Ft,3,1)),n&2){let e=_.$implicit;s(),T(e.status==="success"?1:-1)}}function Ut(n,_){if(n&1){let e=x();t(0,` 202 `),a(1,"input",59),le("ngModelChange",function(i){M(e);let r=d().$implicit;return ae(r.is_auto_update,i)||(r.is_auto_update=i),C(i)}),g("change",function(i){M(e);let r=d().$implicit,c=d(2);return C(i.target.checked?c.updateTM(i.target.checked,r):c.onEnabledOrUpdateTmData({is_auto_update:i.target.checked},r))})("click",function(i){return i.stopPropagation()}),l(),t(2,` 203 `)}if(n&2){let e=d().$implicit;s(),oe("ngModel",e.is_auto_update),h("disabled",!e.is_enabled)}}function jt(n,_){if(n&1&&(t(0,` 204 `),u(1,Ut,3,2)),n&2){let e=_.$implicit;s(),T(e.status==="success"?1:-1)}}function Gt(n,_){n&1&&(t(0,` 205 `),a(1,"span",61),m(2,13),l(),t(3,` 206 `))}function Vt(n,_){if(n&1&&(t(0,` 207 `),a(1,"span",61),m(2,14),l(),t(3,` 208 `)),n&2){let e=d().$implicit,o=d(2);s(2),ne(o.getRowUploadProgress(e)),ie(2)}}function Jt(n,_){if(n&1&&(t(0,` 209 `),a(1,"span",68),t(2),l(),t(3,` 210 `)),n&2){let e=d(2).$implicit;s(2),N(` 211 `,e.error_message,` 212 `)}}function Yt(n,_){if(n&1){let e=x();t(0,` 213 `),a(1,"span",62),t(2,` 214 `),D(),a(3,"svg",63),t(4,` 215 `),p(5,"circle",64),t(6,` 216 `),p(7,"path",65),t(8,` 217 `),l(),t(9,` 218 `),u(10,Jt,4,1),l(),t(11,` 219 `),w(),a(12,"button",66),g("click",function(i){M(e);let r=d().$implicit;return d(2).deleteTM(r.id),C(i.stopPropagation())}),t(13,` 220 `),D(),a(14,"svg",63),t(15,` 221 `),p(16,"path",67),t(17,` 222 `),l(),t(18,` 223 `),l(),t(19,` 224 `)}if(n&2){let e=d().$implicit;s(),h("title",e.error_message),s(9),T(e.error_message?10:-1)}}function Xt(n,_){if(n&1){let e=x();t(0,` 225 `),a(1,"button",75),g("click",function(){let i=M(e).$implicit,r=d(3).$implicit,c=d(2);return C(c.onRowAction(i.id,r))}),t(2),l(),t(3,` 226 `)}if(n&2){let e=_.$implicit;s(2),N(` 227 `,e.label,` 228 `)}}function zt(n,_){if(n&1&&(t(0,` 229 `),a(1,"div",74),g("click",function(o){return o.stopPropagation()}),t(2,` 230 `),V(3,Xt,4,1,null,null,St),l(),t(5,` 231 `)),n&2){let e=d(2).$implicit,o=d(2);s(3),J(o.getVisibleRowActions(e))}}function Bt(n,_){if(n&1){let e=x();t(0,` 232 `),a(1,"div",24),t(2,` 233 `),a(3,"button",69),g("click",function(i){M(e);let r=d().$implicit,c=d(2);return C(c.toggleActionMenu(i,r))}),t(4,` 234 `),D(),a(5,"svg",70),t(6,` 235 `),p(7,"circle",71),t(8,` 236 `),p(9,"circle",72),t(10,` 237 `),p(11,"circle",73),t(12,` 238 `),l(),t(13,` 239 `),l(),t(14,` 240 `),u(15,zt,6,0),l(),t(16,` 241 `)}if(n&2){let e=d().$implicit,o=d(2);s(15),T(o.isActionMenuOpen(e)?15:-1)}}function Ht(n,_){if(n&1&&(t(0,` 242 `),a(1,"div",60),t(2,` 243 `),u(3,Gt,4,0)(4,Vt,4,1)(5,Yt,20,2)(6,Bt,17,1),l(),t(7,` 244 `)),n&2){let e=_.$implicit,o=d(2);s(3),T(e.status==="processing"?3:o.isRowUploading(e)?4:e.status==="error"?5:e.status==="success"&&o.hasRowActions(e)?6:-1)}}function Wt(n,_){if(n&1){let e=x();t(0,` 245 `),a(1,"div",35),t(2,` 246 `),a(3,"app-data-table",36),g("pageChange",function(i){M(e);let r=d();return C(r.onPageChange(i))}),t(4,` 247 `),P(5,wt,7,3,"ng-template",37),t(6,` 248 249 `),P(7,yt,4,1,"ng-template",38),t(8,` 250 251 `),P(9,It,8,5,"ng-template",39),t(10,` 252 253 `),P(11,vt,23,0,"ng-template",40),t(12,` 254 255 `),P(13,$t,23,0,"ng-template",41),t(14,` 256 257 `),P(15,kt,2,1,"ng-template",42),t(16,` 258 259 `),P(17,jt,2,1,"ng-template",43),t(18,` 260 261 `),P(19,Ht,8,1,"ng-template",44),t(20,` 262
263 `),l(),t(21,` 264 `),l(),t(22,` 265 `)}if(n&2){let e=d();s(),L("opacity-60",e.isLoading),s(2),h("rows",e.tableRows)("commonCellClass","py-2!")("columns",e.tableColumns)("selectable",!1)("serverSide",!0)("totalCount",e.totalCount)("page",e.currentPage)("pageSize",e.pageLimit)("pageSizeOptions",e.pageSizeOptions)}}var ce=(()=>{class n extends te{constructor(e,o,i){super(e),this.activatedRoute=o,this.dialog=i,this.isLoading=!1,this.hasLoadedOnce=!1,this.pageLimit=12,this.pageSizeOptions=[12,25,50,100],this.currentPage=0,this.totalCount=0,this.rows=[],this.pendingUploadRows=[],this.routeParams={},this.searchString="",this.fileToUpload=null,this.isIntegrationRoute=!1,this.loadRequestId=0,this.projectColumns=[{key:"name",label:"TM Name",cellClass:""},{key:"targetLanguage",label:"Target Language"},{key:"createdBy",label:"Created By",cellClass:""},{key:"use",label:"Use",headerClass:"max-w-25",cellClass:"pl-5 max-w-25"},{key:"autoUpdate",label:"Auto-update",headerClass:"max-w-25",cellClass:"pl-10 max-w-25"},{key:"rowActions",label:"",headerClass:"w-12",cellClass:"w-12 text-right"}],this.tableActions=[],this.openActionMenuId=null,this.showAddMenu=!1,this.typeOfData={create_tm:{isGlobal:!1,type:"create_tm",title:this._com.translateMessage("tm","headline_create_tm")},upload_tm:{isGlobal:!1,type:"upload_tm",title:this._com.translateMessage("tm","headline_upload_tm"),file:null}},this.resetFileSelection=()=>{this._file.resetFiles(),this.fileToUpload=null,this.uploadFileInput?.nativeElement&&(this.uploadFileInput.nativeElement.value="")},this.isIntegrationRoute=this.resolveIntegrationRoute(),this.isIntegrationRoute&&this.applyIntegrationTypeOfData()}get isIntegrationView(){return this.isIntegrationRoute}get tableColumns(){return this.projectColumns}get tableRows(){if(this.currentPage===0&&this.pendingUploadRows.length>0){let e=new Set(this.pendingUploadRows.map(i=>String(i.id))),o=this.rows.filter(i=>!e.has(String(i.id)));return[...this.pendingUploadRows,...o]}return this.rows}get hasTableData(){return this.totalCount>0||this.pendingUploadRows.length>0}ngOnInit(){this.buildTableActions(),this.activatedRoute.params.subscribe(e=>{this.isIntegrationRoute=this.resolveIntegrationRoute(),this.isIntegrationRoute&&this.applyIntegrationTypeOfData(),this.buildTableActions(),this.routeParams=e,this._project.getSelectionData(e),this.currentPage=0,this.searchString="",this.pendingUploadRows=[],this.loadTmData(0)}),this._file.fileUploaded.subscribe(e=>{e?.response&&this.updateRowById(String(e.id),{id:String(e.response.id),status:e.response.status})}),this._socket.tmUpload.subscribe(e=>{e?.type==="tm_upload_success"?this._msg.success(e.message):e?.type==="tm_upload_fail"&&this._msg.error(e.message)}),this._socket.tmProcessed.subscribe(e=>{e?.tm_id&&(this.updateRowById(String(e.tm_id),{status:e.status,error_message:e.status==="error"?e.error_message:void 0}),e.status==="success"&&(this.pendingUploadRows=this.pendingUploadRows.filter(o=>String(o.id)!==String(e.tm_id)),this.loadTmData(this.currentPage)))})}updateRowById(e,o){let i=String(e),r=this.pendingUploadRows.findIndex(S=>String(S.id)===i);if(r!==-1){this.pendingUploadRows[r]=b(b({},this.pendingUploadRows[r]),o),this.pendingUploadRows=[...this.pendingUploadRows];return}let c=this.rows.findIndex(S=>String(S.id)===i);c!==-1&&(this.rows[c]=b(b({},this.rows[c]),o),this.rows=[...this.rows])}buildTableActions(){if(this.isIntegrationView){this.tableActions=[{id:"upload",label:"Upload TM",hidden:e=>e.status!=="success"},{id:"download",label:"Download as .tmx",hidden:e=>e.status!=="success"},{id:"clear",label:"Delete TM",hidden:e=>e.status!=="success"}];return}this.tableActions=[{id:"download",label:"Download as .tmx",hidden:e=>e.status!=="success"},{id:"delete",label:"Delete",hidden:e=>e.status!=="success"}]}canAddTm(){return!0}onSearchChange(e){this.searchString=e?.trim()??"",this.currentPage=0,this.loadTmData(0)}onPageChange(e){this.currentPage=e.page,this.pageLimit=e.pageSize,this.loadTmData(e.page)}onDocumentClick(){this.openActionMenuId=null,this.showAddMenu=!1}toggleAddMenu(e){e.stopPropagation(),this.showAddMenu=!this.showAddMenu,this.openActionMenuId=null}onRowAction(e,o){switch(this.openActionMenuId=null,e){case"upload":this.uploadNewTm();break;case"download":this.downloadTm(o);break;case"clear":case"delete":this.deleteTM(o.id);break}}
265toggleActionMenu(e,o){e.stopPropagation(),this.showAddMenu=!1,this.openActionMenuId=this.openActionMenuId===o.id?null:o.id}isActionMenuOpen(e){return this.openActionMenuId===e.id}getVisibleRowActions(e){return this.tableActions.filter(o=>!o.hidden?.(e))}hasRowActions(e){return this.getVisibleRowActions(e).length>0}isRowUploading(e){return e.status==="uploading"||!!e.isLocal&&!!this.fileToUpload?.lastModified&&this._file.fileProgress[this.fileToUpload.lastModified]?.status==="uploading"}getRowUploadProgress(e){return this.fileToUpload?.lastModified?this._file.fileProgress[this.fileToUpload.lastModified]?.progress??0:0}deleteTM(e){this.dialog.open(ee,{data:{title:this.isIntegrationView?"Delete TM":"Confirm",message:this.isIntegrationView?"You are about to delete the TM and you cannot undo this action. Are you sure you want to delete it?":this._com.translateMessage("tm","project_tm_confirm_delete"),cancel:this.isIntegrationView?"Cancel":this._com.translateMessage("common","confirm_cancel"),confirm:"Delete"},panelClass:"mat-modal",role:"dialog",width:"430px"}).afterClosed().subscribe(i=>{i==="confirm"&&this.deleteTmData(e)})}deleteTmData(e){this._tm.deleteProjectTm({proj_id:this._project.projectId},e).subscribe(o=>{o.success&&(this._msg.success(`${o?.message}`),this.loadTmData(this.currentPage))})}enableTM(e,o){this.dialog.open(ee,{data:{cancel:this._com.translateMessage("common","confirm_cancel"),confirm:this._com.translateMessage("common","confirm_enable"),message:this._com.translateMessage("tm","project_tm_confirm_enable")},panelClass:"mat-modal",role:"dialog",width:"430px"}).afterClosed().subscribe(r=>{r==="confirm"?this.onEnabledOrUpdateTmData({is_enabled:e},o):o.is_enabled=!e})}onDisableTmData(e){this.onEnabledOrUpdateTmData({is_enabled:!1},e),e?.is_auto_update&&(this.onEnabledOrUpdateTmData({is_auto_update:!1},e),e.is_auto_update=!1)}onEnabledOrUpdateTmData(e,o){this._tm.updateProjectTm(e,o?.id,this._project.projectId).subscribe(i=>{i.success&&this._msg.success(`${i?.message}`)})}updateTM(e,o){this.dialog.open(ee,{data:{cancel:"No, use translations only once",confirm:"Yes, update TM",message:this._com.translateMessage("tm","project_tm_confirm_update")},panelClass:"mat-modal",role:"dialog",width:"430px"}).afterClosed().subscribe(r=>{r==="confirm"?this.onEnabledOrUpdateTmData({is_auto_update:e},o):o.is_auto_update=!e})}loadTmData(e=this.currentPage){let o=++this.loadRequestId;this.isLoading=!0,this.currentPage=e;let i={proj_id:this.routeParams.projectId,limit:this.pageLimit,offset:e*this.pageLimit};this.searchString&&(i.search=this.searchString),this._tm.getProjectTmData(i,this._org.orgId).subscribe(r=>{if(o!==this.loadRequestId)return;if(this.isLoading=!1,this.hasLoadedOnce=!0,this.resetFileSelection(),!r?.success){this.rows=[],this.totalCount=0;return}if(this.totalCount=r.data?.count??0,this.rows=r.data?.results?.map(S=>ge(b({},S),{id:String(S.id)}))??[],this.pendingUploadRows.length>0){let S=new Set(this.rows.map(A=>String(A.id)));this.pendingUploadRows=this.pendingUploadRows.filter(A=>!S.has(String(A.id)))}let c=Math.max(0,Math.ceil(this.totalCount/this.pageLimit)-1);this.currentPage>c&&this.totalCount>0&&this.loadTmData(c)})}resolveIntegrationRoute(){return this.activatedRoute.snapshot.pathFromRoot.some(e=>(e.routeConfig?.path??"").startsWith("integration"))}applyIntegrationTypeOfData(){this.typeOfData={create_tm:{isGlobal:!0,type:"create_tm",title:this._com.translateMessage("tm","headline_create_tm"),from:"integration"},upload_tm:{isGlobal:!0,type:"upload_tm",title:this._com.translateMessage("tm","headline_upload_tm"),file:null,from:"integration"}}}handleFileInput(e){this._file.resetFiles();let o=e.target;if(this.fileToUpload=o.files?.item(0)??null,this.fileToUpload){let i=this.fileToUpload.name,r=i.substr(i.lastIndexOf(".")+1);r&&r==="tmx"?(this.typeOfData.upload_tm.file=this.fileToUpload,this.addNewTM("upload_tm")):(this.resetFileSelection(),this._msg.error(this._com.translateMessage("tm","file_type_only_tmx")))}}addNewTM(e){this.dialog.open(Be,{data:this.typeOfData[e],panelClass:"mat-modal",role:"dialog",width:"480px",maxWidth:"95vw",maxHeight:"90vh"}).afterClosed().subscribe(o=>{if(e==="upload_tm"){if(this._user?.userData&&o&&typeof o=="object"){let i=[{isLocal:!0,file:o.file,error_message:void 0,created_by:this._user.userData,id:String(o.file?.lastModified),created_at:new Date().toISOString(),updated_at:new Date().toISOString(),is_auto_update:!0,is_enabled:!0,is_global:!1,is_org_global:!1,name:o.name,source_language:o.source_language?.[0],target_language:o.target_language?.[0],status:"uploading"}];this.pendingUploadRows=i.concat(this.pendingUploadRows),this.currentPage=0}return}o&&(this.currentPage=0,this.loadTmData(0))})}uploadNewTm(){this.uploadFileInput.nativeElement.accept=".tmx",this.uploadFileInput.nativeElement.click()}downloadTm(e){this._tm.downloadTmFile(e?.id).subscribe(o=>{let i=new Blob([o.body]);He.saveAs(i,`${e?.name}.tmx`)})}static{this.\u0275fac=function(o){return new(o||n)(O(z),O(Oe),O($e))}}static{this.\u0275cmp=H({type:n,selectors:[["app-project-tm"]],viewQuery:function(o,i){if(o&1&&Te(xt,5),o&2){let r;pe(r=Me())&&(i.uploadFileInput=r.first)}},hostBindings:function(o,i){o&1&&g("click",function(){return i.onDocumentClick()},B)},standalone:!1,features:[q],decls:33,vars:4,consts:()=>{let e;e=$localize`Translation memory (TM)`;let o;o=$localize`Source language: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize`Add TM`;let r;r=$localize` 266 Create a new TM 267 `;let c;c=$localize` 268 Upload TM from desktop 269 `;let S;S=$localize` 270 Turn your translations into resources by creating Translation Memories (TMs), so you don't pay twice for the 271 exact same translation. 272 `;let A;A=$localize`Create a new TM`;let y;y=$localize`Upload TM`;let I;I=$localize`Use TM info`;let v;v=$localize`Use`;let $;$=$localize` 273 Click the checkbox to Enable your TM, which will allow Lingpad and your team members to use approved 274 translated segments before AI translation. 275 `;let F;F=$localize`Auto-update info`;let k;k=$localize`Auto-update`;let U;U=$localize` 276 Click the checkbox to add translated segments to TM
276while working in the Editor. You can only update TM 277 after you have enabled it. 278 `;let j;j=$localize`processing...`;let G;G=$localize` 279 Uploading ${"\uFFFD0\uFFFD"}:INTERPOLATION:% 280 `;let f;f=$localize`Remove failed TM`;let me;return me=$localize`Actions`,[["uploadTmFiles",""],e,o,i,r,c,S,A,y,v,$,k,U,j,G,[1,"page-with-sidebar"],[1,"sidebar-container"],[1,"main-container","flex","min-h-0","flex-1","flex-col","overflow-hidden"],[1,"mb-6","flex","shrink-0","flex-wrap","items-center","justify-between","gap-4"],[1,"flex","flex-wrap","items-center","gap-3"],[1,"mb-0","font-dm-sans","text-base","text-gray-600"],["type","file","hidden","",3,"change"],[1,"inline-flex","items-center","whitespace-nowrap","rounded-full","bg-yellow-200","px-3","py-1","font-dm-sans","text-xs","text-gray-900"],[3,"searchChange","value"],[1,"relative"],["type","button",1,"btn","h-9",3,"click"],[1,"absolute","right-0","z-20","mt-2","min-w-[240px]","overflow-hidden","rounded-lg","border","border-gray-200","bg-white","py-1","shadow-lg",3,"click"],["type","button",1,"flex","w-full","items-center","gap-2","px-4","py-2.5","text-left","font-dm-sans","text-sm","text-gray-900","hover:bg-gray-50",3,"click"],[3,"fullScreen"],[1,"flex","flex-1","items-center","justify-center","py-16"],[1,"flex","max-w-2xl","flex-col","items-center","text-center"],["src","/assets/images/illustrations/empty-translation.svg","alt","","aria-hidden","true",1,"mb-6","h-60","w-auto"],[1,"mb-6","font-dm-sans","text-sm","leading-6","text-gray-600"],[1,"flex","flex-wrap","items-center","justify-center","gap-3"],["type","button",1,"btn-outline","h-9",3,"click"],[1,"flex","min-h-0","flex-1","flex-col"],[1,"min-h-0","flex-1",3,"pageChange","rows","commonCellClass","columns","selectable","serverSide","totalCount","page","pageSize","pageSizeOptions"],["appDataTableCellDef","name"],["appDataTableCellDef","targetLanguage"],["appDataTableCellDef","createdBy"],["appDataTableHeaderDef","use"],["appDataTableHeaderDef","autoUpdate"],["appDataTableCellDef","use"],["appDataTableCellDef","autoUpdate"],["appDataTableCellDef","rowActions"],[1,"flex","items-center"],[1,"truncate","font-dm-sans","text-sm","text-gray-900"],[1,"font-dm-sans","text-sm","text-gray-900"],[1,"pt-0.5","font-dm-sans","text-xs","text-gray-550"],[1,"inline-flex","items-center","gap-1","font-dm-sans","text-sm","font-normal","text-gray-600"],[1,"group/info","relative","inline-flex","shrink-0"],["type","button","aria-label",I,1,"inline-flex","text-gray-500"],["viewBox","0 0 16 16","fill","none","aria-hidden","true",1,"size-4"],["cx","8","cy","8","r","6.5","stroke","currentColor"],["d","M8 7v4M8 5.5v.5","stroke","currentColor","stroke-linecap","round"],["role","tooltip",1,"pointer-events-none","absolute","left-0","top-full","z-50","mt-2","hidden","w-72","rounded-lg","border","border-gray-200","bg-white","px-3","py-2","text-left","font-dm-sans","text-xs","leading-5","text-gray-700","shadow-md","group-hover/info:block"],["type","button","aria-label",F,1,"inline-flex","text-gray-500"],["role","tooltip",1,"pointer-events-none","absolute","top-full","z-50","mt-2","hidden","w-72","left-full","-translate-x-full","rounded-lg","border","border-gray-200","bg-white","px-3","py-2","text-left","font-dm-sans","text-xs","leading-5","text-gray-700","shadow-md","group-hover/info:block"],["type","checkbox",1,"size-4","rounded","border-gray-300","accent-gray-900",3,"ngModelChange","change","click","ngModel"],["type","checkbox",1,"size-4","rounded","border-gray-300","accent-gray-900",3,"ngModelChange","change","click","ngModel","disabled"],[1,"flex","items-center","justify-end","gap-2"],[1,"font-dm-sans","text-xs","text-gray-500"],[1,"group/error","relative","inline-flex","text-red-500",3,"title"],["viewBox","0 0 20 20","fill","none","aria-hidden","true",1,"size-5"],["cx","10","cy","10","r","8","stroke","currentColor","stroke-width","1.5"],["d","M10 6.5v4M10 13.5v.5","stroke","currentColor","stroke-width","1.5","stroke-linecap","round"],["type","button","aria-label",f,1,"rounded","p-1","text-gray-500","hover:bg-gray-100","hover:text-gray-900",3,"click"],["d","M5 5l10 10M15 5 5 15","stroke","currentColor","stroke-width","1.5","stroke-linecap","round"],["role","tooltip",1,"pointer-events-none","absolute","right-0","top-full","z-50","mt-2","hidden","w-64","rounded-lg","border","border-gray-200","bg-white","px-3","py-2","text-left","font-dm-sans","text-xs","text-gray-700","shadow-md","group-hover/error:block"],["type","button","aria-label",me,1,"rounded","p-1","text-gray-500","hover:bg-gray-100","hover:text-gray-900",3,"click"],["viewBox","0 0 20 20","fill","currentColor","aria-hidden","true",1,"size-5"],["cx","10","cy","4","r","1.5"],["cx","10","cy","10","r","1.5"],["cx","10","cy","16","r","1.5"],[1,"absolute","right-0","top-full","z-10","min-w-[160px]","rounded-md","border","border-gray-200","bg-white","py-1","shadow-lg",3,"click"],["type","button",1,"block","w-full","px-4","py-2","text-left","font-dm-sans","text-sm","text-gray-900","hover:bg-gray-50",3,"click"]]},template:function(o,i){o&1&&(a(0,"div",15),t(1,` 281 `),p(2,"app-side-bar"),t(3,` 282 `),a(4,"div",16),t(5,` 283 `),a(6,"div",17),t(7,` 284 `),a(8,"div",18),t(9,` 285 `),a(10,"div",19),t(11,` 286 `),a(12,"h1",20),m(13,1),l(),t(14,`
287 `),u(15,Ot,7,1),l(),t(16,` 288 289 `),a(17,"div",19),t(18,` 290 `),u(19,Nt,3,1),u(20,Pt,8,1),l(),t(21,` 291 `),l(),t(22,` 292 293 `),u(23,Rt,3,1)(24,Lt,13,1)(25,bt,6,0)(26,Wt,23,11),l(),t(27,` 294 `),l(),t(28,` 295`),l(),t(29,` 296 297`),a(30,"input",21,0),g("change",function(c){return i.handleFileInput(c)}),l(),t(32,` 298`)),o&2&&(s(15),T(!(i._project.project==null||i._project.project.proj_source_language==null)&&i._project.project.proj_source_language.language?15:-1),s(4),T(i.hasLoadedOnce&&(i.hasTableData||i.searchString.length>0)?19:-1),s(),T(i.canAddTm()&&i.hasLoadedOnce&&i.hasTableData?20:-1),s(3),T(!i.hasLoadedOnce&&i.isLoading?23:i.hasLoadedOnce&&i.totalCount===0&&i.pendingUploadRows.length===0&&!i.searchString&&!i.isLoading?24:i.hasLoadedOnce&&i.totalCount===0&&i.pendingUploadRows.length===0&&i.searchString?25:i.hasLoadedOnce?26:-1))},dependencies:[ke,Ue,Ge,je,Ye,Ve,Je,Ne,Z,Re,xe],encapsulation:2})}}return n})();var qt=[{path:"tm",redirectTo:"",pathMatch:"full"},{path:"",children:[{path:"",redirectTo:"/organization",pathMatch:"full"},{path:"project/:orgId/:spaceId/:projectId",canActivate:[se],data:{name:"ProjectTmComponent",group:"project",access:["Admin","Member"]},component:ce},{path:"integration/:orgId/:spaceId/:projectId",canActivate:[se],data:{name:"ProjectTmComponent",group:"integration-project",access:["Admin","Member"]},component:ce}]}],We=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=W({type:n})}static{this.\u0275inj=X({imports:[re.forChild(qt),re]})}}return n})();var Rn=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=W({type:n})}static{this.\u0275inj=X({imports:[Se,We,Xe]})}}return n})();export{Rn as TranslationMemoryModule};
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.