PageSourceSearch

https://shoclifestyle.no/2379.741871c75c81cee4.js

js shoclifestyle.no collected 2026-10-08 11:39:05 UTC 59,021 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkeSusoft=self.webpackChunkeSusoft||[]).push([[2379],{2800:(U,j,u)=>{u.d(j,{K:()=>t});let t=(()=>{var k;class e{static shouldForceAttributeValueSelection(v){let S=!1;return S=!((null==v?void 0:v.length)<2)&&(null==v?void 0:v.map(C=>C.values.length)).reduce((C,M)=>C*M,1)>=100,S}static toggleSelectAllAttributeValues(v,S){var E;null!==(E=v.values)&&void 0!==E&&E.length&&this.shouldForceAttributeValueSelection&&(v.isSelected=S,v.values=v.values.map(g=>({...g,isSelected:S})))}static toggleAttributeValueSelection(v,S){S.isSelected=!S.isSelected,v.isSelected=v.values.every(E=>E.isSelected)}static getFilteredAttributesByValuesSelected(v,S){return S?v.map(E=>({...E,values:E.values.filter(g=>g.isSelected)})):v}}return(k=e).maxAttributeValuesForProductAllowed=500,k.maxAttributeValuesAllowedForAdditionAtOnce=200,e})()},32968:(U,j,u)=>{u.d(j,{U:()=>v});var t=u(44437),k=u(96354),e=u(17705),G=u(51548);let v=(()=>{var S;class E{constructor(C){this.networkRepository=C}execute(C,M){return(0,t.y)(...C.map(y=>this.networkRepository.addVariant(y,M))).pipe((0,k.T)(()=>{}))}}return(S=E).\u0275fac=function(C){return new(C||S)(e.KVO(G.m))},S.\u0275prov=e.jDH({token:S,factory:S.\u0275fac}),E})()},99332:(U,j,u)=>{u.d(j,{w:()=>it});var t=u(84135),k=u(2800),e=u(17705),G=u(70521),v=u(60177),S=u(82765),E=u(9183),g=u(85956),C=u(99213),M=u(44613),y=u(89417),N=u(41780);const w=["cell","cell2","cell3"];function P(m,A){if(1&m){const b=e.RV6();e.j41(0,"span",11,12),e.bIt("click",function(){const c=e.eBV(b).index,d=e.XpG(2);return e.Njj(d.selectCell(d.attributesMatrix.cells[c],!d.attributesMatrix.cells[c].isSelected))}),e.EFF(2),e.k0s()}if(2&m){const b=A.$implicit,r=A.index,n=e.sdS(1),c=e.XpG(2);e.AVh("selected",null==c.attributesMatrix.cells[r]?null:c.attributesMatrix.cells[r].isSelected)("disabled",null==c.attributesMatrix.cells[r]?null:c.attributesMatrix.cells[r].isDisabled)("last",r===(null==c.attributes[0].values?null:c.attributes[0].values.length)-1)("hasError",c.checkCellForErrors(n,c.attributesMatrix.cells[r])),e.R7$(2),e.JRh(b.name)}}function X(m,A){if(1&m&&(e.j41(0,"div",9),e.DNE(1,P,3,9,"span",10),e.k0s()),2&m){const b=e.XpG();e.R7$(1),e.Y8G("ngForOf",b.attributes[0].values)}}function T(m,A){if(1&m){const b=e.RV6();e.j41(0,"th",16,17)(2,"mat-checkbox",18,2),e.bIt("change",function(){const n=e.eBV(b),c=n.$implicit,d=n.index,h=e.sdS(3),_=e.XpG(2);return e.Njj(_.selectColumnClick(h,c.code,h.checked,d))}),e.k0s()()}if(2&m){const b=A.index,r=e.XpG(2);e.R7$(2),e.Y8G("checked",r.selectAllColumnsDim2[b])}}function K(m,A){if(1&m){const b=e.RV6();e.j41(0,"td",24,25),e.bIt("click",function(){const c=e.eBV(b).index,d=e.XpG().index,h=e.XpG(2);return e.Njj(h.selectCell(h.attributesMatrix.cells[h.getIndex(d,c)],!h.attributesMatrix.cells[h.getIndex(d,c)].isSelected))}),e.EFF(2),e.k0s()}if(2&m){const b=A.$implicit,r=A.index,n=e.sdS(1),c=e.XpG(),d=c.index,h=c.$implicit,_=e.XpG(2);e.AVh("last",d===_.attributes[0].values.length-1)("selected",null==_.attributesMatrix.cells[_.getIndex(d,r)]?null:_.attributesMatrix.cells[_.getIndex(d,r)].isSelected)("disabled",null==_.attributesMatrix.cells[_.getIndex(d,r)]?null:_.attributesMatrix.cells[_.getIndex(d,r)].isDisabled)("b-l",0===r)("hasError",_.checkCellForErrors(n,_.attributesMatrix.cells[_.getIndex(d,r)])),e.R7$(2),e.Lme(" ",b.name," + ",h.name," ")}}function O(m,A){if(1&m){const b=e.RV6();e.j41(0,"tr",19,20)(2,"td",21)(3,"mat-checkbox",18,22),e.bIt("change",function(){const n=e.eBV(b),c=n.$implicit,d=n.index,h=e.sdS(4),_=e.XpG(2);return e.Njj(_.selectRowClick(h,c.code,h.checked,d))}),e.k0s()(),e.DNE(5,K,3,12,"td",23),e.k0s()}if(2&m){const b=A.index,r=e.XpG(2);e.R7$(2),e.AVh("last",b===r.attributes[0].values.length-1),e.R7$(1),e.Y8G("checked",r.selectAllRowsDim2[b]),e.R7$(2),e.Y8G("ngForOf",r.attributes[1].values)}}function Y(m,A){if(1&m&&(e.j41(0,"div",13)(1,"table")(2,"thead")(3,"tr"),e.nrm(4,"th"),e.DNE(5,T,4,1,"th",14),e.k0s()(),e.j41(6,"tbody"),e.DNE(7,O,6,4,"tr",15),e.k0s()()()),2&m){const b=e.XpG();e.R7$(5),e.Y8G("ngForOf",b.attributes[1].values),e.R7$(2),e.Y8G("ngForOf",b.attributes[0].values)}}function W(m,A){if(1&m){const b=e.RV6();e.j41(0,"th",16,28)(2,"mat-checkbox",18,2),e.bIt("change",function(){const n=e.eBV(b),c=n.$implicit,d=n.index,h=e.sdS(3),_=e.XpG().$implicit,f=e.XpG(2);return e.Njj(f.selectColumnClick(h,c.code,h.checked,d,_.code))}),e.k0s()()}if(2&m){const b=A.index,r=e.XpG().$implicit,n=e.XpG(2);e.R7$(2),e.Y8G("checked",null==n.selectedAllRowsColsDim3[r.code]?null:n.selectedAllRowsColsDim3[r.code].selectAllColumns[b])}}function z(m,A){if(1&m){const b=e.RV6();e.j41(0,"td",24,31),e.bIt("click",function(){const c=e.eBV(b).index,d=e.XpG().index,h=e.XpG().index,_=e.XpG(2);return e.Njj(_.selectCell(_.attributesMatrix.cells[_.getIndex(h,d,c)],!_.attributesMatrix.cells[_.getIndex(h,d,c)].isSelected))}),e.EFF(2),e.k0s()}if(2&m){const b=A.$implicit,r=A.index,n=e.sdS(1),c=e.XpG(),d=c.index,h=c.$implicit,_=e.XpG().index,f=e.XpG(2);e.AVh("selected",null==f.attributesMatrix.cells[f.getIndex(_,d,r)]?null:f.attributesMatrix.cells[f.getIndex(_,d,r)].isSelected)("disabled",null==f.attributesMatrix.cells[f.getIndex(_,d,r)]?null:f.attributesMatrix.cells[f.getIndex(_,d,r)].isDisabled)("b-l",0===r)("last",d===f.attributes[1].values.length-1)("hasError",f.checkCellForErrors(n,f.attributesMatrix.cells[f.getIndex(_,d,r)])),e.R7$(2),e.Lme(" ",h.name," + ",b.name," ")}}function H(m,A){if(1&m){const b=e.RV6();e.j41(0,"tr",19,29)(2,"td",21)(3,"mat-checkbox",18,22),e.bIt("change",function(){const n=e.eBV(b),c=n.$implicit,d=n.index,h=e.sdS(4),_=e.XpG().$implicit,f=e.XpG(2);return e.Njj(f.selectRowClick(h,c.code,h.checked,d,_.code))}),e.k0s()(),e.DNE(5,z,3,12,"td",30),e.k0s()}if(2&m){const b=A.index,r=e.XpG().$implicit,n=e.XpG(2);e.R7$(2),e.AVh("last",b===n.attributes[1].values.length-1),e.R7$(1),e.Y8G("checked",null==n.selectedAllRowsColsDim3[r.code]?null:n.selectedAllRowsColsDim3[r.code].selectAllRows[b]),e.R7$(2),e.Y8G("ngForOf",n.attributes[2].values)}}function J(m,A){if(1&m&&(e.j41(0,"div",13)(1,"h5",27),e.EFF(2),e.k0s(),e.j41(3,"table")(4,"thead")(5,"tr"),e.nrm(6,"th"),e.DNE(7,W,4,1,"th",14),e.k0s()(),e.j41(8,"tbody"),e.DNE(9,H,6,4,"tr",15),e.k0s()()()),2&m){const b=A.$implicit,r=e.XpG(2);e.R7$(2),e.SpI("",b.name," +"),e.R7$(5),e.Y8G("ngForOf",r.attributes[2].values),e.R7$(2),e.Y8G("ngForOf",r.attributes[1].values)}}function I(m,A){if(1&m&&(e.qex(0),e.DNE(1,J,10,3,"div",26),e.bVm()),2&m){const b=e.XpG();e.R7$(1),e.Y8G("ngForOf",b.attributes[0].values)}}function $(m,A){1&m&&(e.j41(0,"mat-error",32),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&m&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"variants_generator.select_name_pattern_error"),"\n"))}function L(m,A){1&m&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"translate"),e.k0s()),2&m&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"variants_generator.name_pattern_error")," "))}const B=function(m){return{attrName:m}};function tt(m,A){if(1&m){const b=e.RV6();e.j41(0,"div")(1,"div",33,34)(3,"form",35),e.bIt("submit",function(n){e.eBV(b);const c=e.sdS(5),d=e.XpG().$implicit,h=e.XpG();return n.preventDefault(),e.Njj(h.addAttributeClick(c,d))}),e.j41(4,"input",36,37),e.bIt("input",function(){e.eBV(b);const n=e.sdS(5),c=e.sdS(2),d=e.XpG(2);return e.Njj(d.validateVariant(n,c))}),e.nI1(6,"translate"),e.k0s(),e.j41(7,"button",38)(8,"mat-icon"),e.EFF(9,"add"),e.k0s()()()(),e.DNE(10,L,3,3,"mat-error",5),e.k0s()}if(2&m){const b=e.sdS(5),r=e.XpG().$implicit,n=e.XpG();e.R7$(4),e.Y8G("placeholder",e.i5U(6,3,"variants_generator.value_input_placeholder_with_name",e.eq3(6,B,r.name)))("pattern",n.namePattern),e.R7$(6),e.Y8G("ngIf",b.value&&b.validity.patternMismatch)}}function et(m,A){if(1&m&&(e.qex(0),e.DNE(1,tt,11,8,"div",5),e.bVm()),2&m){const b=e.XpG();e.R7$(1),e.Y8G("ngIf",b.showCreateNewAttributeValue)}}function Z(m,A){1&m&&(e.j41(0,"div",39),e.nrm(1,"mat-spinner",40),e.k0s())}let it=(()=>{var m;class A extends t.${constructor(r,n,c){super(r),this.cdk=r,this.snackbarService=n,this.variantManagerService=c,this.attributes=[],this.innerProducts=[],this.initImmediate=!0,this.defaultValue=!1,this.showCreateNewAttributeValue=!1,this.productName="",this.attributesMatrix={cells:[]},this.dim=0,this.selectAllColumnsDim2=[],this.selectAllRowsDim2=[],this.selectedAllRowsColsDim3={},this.namePattern="^.{1,30}$",this.selectedCellsWithErrors=[]}ngOnInit(){this.initImmediate&&(this.fillCells(),this.disableCells(),this.updateErroredCells()),this.updateAllSelected()}ngAfterViewChecked(){this.allSelected&&this.updateErroredCells()}
1selectCell(r,n=!r.isSelected){if(!r.isDisabled){if(n&&this.getSelected().length>k.K.maxAttributeValuesAllowedForAdditionAtOnce&&!r.isSelected)return void this.snackbarService.error("variants_generator.max_variants_allowed");r.isSelected=n}this.updateRowAndColumnSelections(r,n)}updateRowAndColumnSelections(r,n){if(2===this.dim){const c=this.attributes[0].values.findIndex(f=>f.code===r.attribute1Value),d=this.attributes[1].values.findIndex(f=>f.code===r.attribute2Value),h=n&&!this.attributesMatrix.cells.find(f=>f.attribute1Value===r.attribute1Value&&!f.isSelected),_=n&&!this.attributesMatrix.cells.find(f=>f.attribute2Value===r.attribute2Value&&!f.isSelected);this.selectAllRowsDim2[c]=h,this.selectAllColumnsDim2[d]=_,this.markForCheck()}if(3===this.dim){const c=this.attributes[1].values.findIndex(f=>f.code===r.attribute2Value),d=this.attributes[2].values.findIndex(f=>f.code===r.attribute3Value),h=n&&!this.attributesMatrix.cells.find(f=>f.attribute1Value===r.attribute1Value&&f.attribute2Value===r.attribute2Value&&!f.isSelected),_=n&&!this.attributesMatrix.cells.find(f=>f.attribute1Value===r.attribute1Value&&f.attribute3Value===r.attribute3Value&&!f.isSelected);this.selectedAllRowsColsDim3[r.attribute1Value].selectAllRows[c]=h,this.selectedAllRowsColsDim3[r.attribute1Value].selectAllColumns[d]=_,this.markForCheck()}this.updateErroredCells(),this.updateAllSelected()}getIndex(r,n,c){let d;return d=void 0!==c?r*this.attributes[1].values.length*this.attributes[2].values.length+n*this.attributes[2].values.length+c:r*this.attributes[1].values.length+n,d}selectRowClick(r,n,c,d,h){if(2===this.dim){var _;const F=this.attributesMatrix.cells.map(V=>({...V,isSelected:V.isDisabled||n!==V.attribute1Value?V.isSelected:c}));if((null===(_=F.filter(V=>!V.isDisabled&&V.isSelected))||void 0===_?void 0:_.length)>k.K.maxAttributeValuesAllowedForAdditionAtOnce&&c)return this.snackbarService.error("variants_generator.max_variants_allowed"),this.selectAllRowsDim2[d]=!1,r.checked=!1,void this.markForCheck();this.attributesMatrix.cells=F,this.selectAllRowsDim2[d]=c,this.attributesMatrix.cells.filter(R=>n===R.attribute1Value).forEach(R=>{this.updateRowAndColumnSelections(R,c)})}if(3===this.dim){var f;const F=this.attributesMatrix.cells.map(V=>({...V,isSelected:V.isDisabled||h!==V.attribute1Value||n!==V.attribute2Value?V.isSelected:c}));if((null===(f=F.filter(V=>!V.isDisabled&&V.isSelected))||void 0===f?void 0:f.length)>k.K.maxAttributeValuesAllowedForAdditionAtOnce&&c)return this.snackbarService.error("variants_generator.max_variants_allowed"),this.selectedAllRowsColsDim3[h].selectAllRows[d]=!1,r.checked=!1,void this.markForCheck();this.attributesMatrix.cells=F,this.selectedAllRowsColsDim3[h].selectAllRows[d]=c,this.attributesMatrix.cells.filter(R=>h===R.attribute1Value&&n===R.attribute2Value).forEach(R=>{this.updateRowAndColumnSelections(R,c)})}this.markForCheck()}selectColumnClick(r,n,c,d,h){if(2===this.dim){var _;const F=this.attributesMatrix.cells.map(V=>({...V,isSelected:V.isDisabled||n!==V.attribute2Value?V.isSelected:c}));if((null===(_=F.filter(V=>!V.isDisabled&&V.isSelected))||void 0===_?void 0:_.length)>k.K.maxAttributeValuesAllowedForAdditionAtOnce&&c)return this.snackbarService.error("variants_generator.max_variants_allowed"),this.selectAllColumnsDim2[d]=!1,void(r.checked=!1);this.selectAllColumnsDim2[d]=c,this.attributesMatrix.cells=F,this.attributesMatrix.cells.filter(R=>n===R.attribute2Value).forEach(R=>{this.updateRowAndColumnSelections(R,c)})}if(3===this.dim){var f;const F=this.attributesMatrix.cells.map(V=>({...V,isSelected:V.isDisabled||h!==V.attribute1Value||n!==V.attribute3Value?V.isSelected:c}));if((null===(f=F.filter(V=>!V.isDisabled&&V.isSelected))||void 0===f?void 0:f.length)>k.K.maxAttributeValuesAllowedForAdditionAtOnce&&c)return this.snackbarService.error("variants_generator.max_variants_allowed"),this.selectedAllRowsColsDim3[h].selectAllColumns[d]=!1,void(r.checked=!1);this.selectedAllRowsColsDim3[h].selectAllColumns[d]=c,this.attributesMatrix.cells=F,this.attributesMatrix.cells.filter(R=>h===R.attribute1Value&&n===R.attribute3Value).forEach(R=>
1{this.updateRowAndColumnSelections(R,c)})}this.markForCheck()}updateAllSelected(){var r;this.allSelected=!(null!==(r=this.attributesMatrix.cells.filter(n=>!n.isSelected&&!n.isDisabled))&&void 0!==r&&r.length),this.markForCheck()}selectAllClicked(r){r&&this.attributesMatrix.cells.filter(c=>!c.isDisabled).length>k.K.maxAttributeValuesAllowedForAdditionAtOnce?this.snackbarService.error("variants_generator.max_variants_allowed"):(this.attributesMatrix.cells.filter(n=>!n.isDisabled).forEach(n=>n.isSelected=r),2===this.dim&&(this.selectAllRowsDim2.forEach((n,c)=>{this.selectAllRowsDim2[c]=r}),this.selectAllColumnsDim2.forEach((n,c)=>{this.selectAllColumnsDim2[c]=r})),3===this.dim&&Object.keys(this.selectedAllRowsColsDim3).forEach(n=>{this.selectedAllRowsColsDim3[n].selectAllRows.forEach((c,d)=>{this.selectedAllRowsColsDim3[n].selectAllRows[d]=r}),this.selectedAllRowsColsDim3[n].selectAllColumns.forEach((c,d)=>{this.selectedAllRowsColsDim3[n].selectAllColumns[d]=r})}),this.markForCheck(),this.updateErroredCells(),this.updateAllSelected())}getSelected(){return this.attributesMatrix.cells.filter(r=>r.isSelected)}init(){this.fillCells(),this.disableCells()}addAttributeClick(r,n){const c=r.value;((c+this.productName).length>59||c.match(this.namePattern))&&(c.length&&!n.values.find(d=>d.name.toLowerCase()===c.toLowerCase())?(this.isLoading=!0,this.markForCheck(),this.addSubscription(this.variantManagerService.addValueToAttribute(n.id,c,n.values.length+1).subscribe(d=>{n.values.push(d),this.fillCells(),this.disableCells(),this.updateAllSelected(),this.isLoading=!1,this.markForCheck(),r.value=""}))):this.snackbarService.error("variants_generator.add_attr_name_error"))}fillCells(){this.attributesMatrix.cells=[];const r=this.attributes[0],n=this.attributes[1]||{values:[]},c=this.attributes[2]||{values:[]};if(this.dim=0,this.selectAllRowsDim2=[],this.selectAllColumnsDim2=[],this.selectedAllRowsColsDim3={},r.values.length&&this.dim++,n.values.length&&this.dim++,c.values.length&&this.dim++,2===this.dim){for(let d=0;d<r.values.length;d++)this.selectAllRowsDim2.push(this.defaultValue);for(let d=0;d<n.values.length;d++)this.selectAllColumnsDim2.push(this.defaultValue)}if(3===this.dim){const d=[],h=[];for(let _=0;_<n.values.length;_++)d.push(this.defaultValue);for(let _=0;_<c.values.length;_++)h.push(this.defaultValue);for(let _=0;_<r.values.length;_++)this.selectedAllRowsColsDim3[r.values[_].code]={selectAllRows:[...d],selectAllColumns:[...h]}}for(let d=0;d<r.values.length;d++){const h=r.values[d].code;for(let _=0;_<n.values.length;_++){const f=n.values[_].code;for(let F=0;F<c.values.length;F++)this.attributesMatrix.cells.push({isSelected:!0,attribute1Value:h,attribute2Value:f,attribute3Value:c.values[F].code});c.values.length||this.attributesMatrix.cells.push({isSelected:!0,attribute1Value:h,attribute2Value:f})}n.values.length||this.attributesMatrix.cells.push({isSelected:!0,attribute1Value:h})}this.updateAllSelected()}disableCells(){var r;null!==(r=this.innerProducts)&&void 0!==r&&r.length&&this.innerProducts.forEach(n=>{const c=this.attributesMatrix.cells.find(d=>d.attribute1Value===n.product.attributes[this.attributes[0].id].code&&(this.attributes.length<2||d.attribute2Value===n.product.attributes[this.attributes[1].id].code)&&(this.attributes.length<3||d.attribute3Value===n.product.attributes[this.attributes[2].id].code));c&&(c.isDisabled=!0)}),this.attributesMatrix.cells.forEach(n=>n.isSelected=!n.isDisabled&&this.defaultValue)}validateVariant(r,n){r.value.trim()&&!r.value.match(this.namePattern)?(n.classList.remove("border"),n.classList.add("error-border"),this.markForCheck()):(n.classList.remove("error-border"),n.classList.add("border"))}checkCellForErrors(r,n){return!(!this.selectedCellsWithErrors.find(c=>c.trim()===r.innerText.trim())||null==n||!n.isSelected)}updateErroredCells(){this.selectedCellsWithErrors=[],this.markForCheck(),this.attributesMatrix.cells.forEach((r,n)=>{var c;const d=null===(c=this.cells)||void 0===c||null===(c=c.toArray()[n])||void 0===c?void 0:c.nativeElement,h=d?d.innerText.trim():null;!r.isDisabled&&r.isSelected&&null!=h&&((h+this.productName).length>59||!h.match(this.namePattern))&&this.selectedCellsWithErrors.push(h)}),this.markForCheck()}}return(m=A).\u0275fac=function(r){return new(r||m)(e.rXU(e.gRc),e.rXU(G.z),e.rXU("VariantManagerService"))},m.\u0275cmp=e.VBU({type:m,selectors:[["webshop-add-variant"]],viewQuery:function(r,n){if(1&r&&e.GBs(w,5),2&r){let c;e.mGM(c=e.lsd())&&(n.cells=c)}},inputs:{attributes:"attributes",innerProducts:"innerProducts",initImmediate:"initImmediate",defaultValue:"defaultValue",showCreateNewAttributeValue:"showCreateNewAttributeValue",productName:"productName"},features:[e.Vt3],decls:11,vars:10,consts:[[1,"mx-2"],["color","primary",1,"mb-2",3,"checked","change"],["colBox",""],["class","attributes-matrix d-flex flex-column min-w-100 align-with-row",4,"ngIf"],["class","overflow-auto min-w-100 p-3",4,"ngIf"],[4,"ngIf"],["class","px-3 py-3",4,"ngIf"],[4,"ngFor","ngForOf"],["class","loading-overlay",4,"ngIf"],[1,"attributes-matrix","d-flex","flex-column","min-w-100","align-with-row"],["class","b-l",3,"selected","disabled","last","hasError","click",4,"ngFor","ngForOf"],[1,"b-l",3,"click"],["cell",""],[1,"overflow-auto","min-w-100","p-3"],["class","text-center",4,"ngFor","ngForOf"],["class","attributes-matrix",4,"ngFor","ngForOf"],[1,"text-center"],["column2Header",""],["color","primary",3,"checked","change"],[1,"attributes-matrix"],["row2",""],[2,"padding","8px 12px 4px 0"],["rowBox",""],[3,"last","selected","disabled","b-l","hasError","click",4,"ngFor","ngForOf"],[3,"click"],["cell2",""],["class","overflow-auto min-w-100 p-3",4,"ngFor","ngForOf"],[1,"mt-4","mb-1","position-sticky",2,"left","0"],["column3Header",""],["row3",""],[3,"selected","disabled","b-l","last","hasError","click",4,"ngFor","ngForOf"],["cell3",""],[1,"px-3","py-3"],[1,"my-3","mx-2","border","border-radius-5",2,"max-width","300px"],["variantFormWrapper",""],[1,"w-100","d-flex","px-2",3,"submit"],["type","text",1,"border-0","flex-grow-1","outline-none",3,"placeholder","pattern","input"],["input",""],["type","submit","mat-icon-button","","matSuffix",""],[1,"loading-overlay"],["color","accent"]],template:function(r,n){if(1&r){const c=e.RV6();e.j41(0,"div",0)(1,"mat-checkbox",1,2),e.bIt("change",function(){e.eBV(c);const h=e.sdS(2);return e.Njj(n.selectAllClicked(h.checked))}),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.DNE(5,X,2,1,"div",3),e.DNE(6,Y,8,2,"div",4),e.DNE(7,I,2,1,"ng-container",5),e.DNE(8,$,3,3,"mat-error",6),e.DNE(9,et,2,1,"ng-container",7),e.DNE(10,Z,2,0,"div",8)}2&r&&(e.R7$(1),e.Y8G("checked",n.allSelected),e.R7$(2),e.SpI(" ",e.bMT(4,8,"admin.products.manager.select_all")," "),e.R7$(2),e.Y8G("ngIf",1===n.attributes.length),e.R7$(1),e.Y8G("ngIf",2===n.attributes.length),e.R7$(1),e.Y8G("ngIf",3===n.attributes.length),e.R7$(1),e.Y8G("ngIf",n.selectedCellsWithErrors.length>0),e.R7$(1),e.Y8G("ngForOf",n.attributes),e.R7$(1),e.Y8G("ngIf",n.isLoading))},dependencies:[v.Sq,v.bT,S.So,E.LG,g.iV,C.An,M.k5,M.xZ,y.qT,y.cb,y.cV,N.D9],styles:[".attributes-matrix[_ngcontent-%COMP%]:not(tr){width:100%;display:flex;justify-content:space-between}.attributes-matrix[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid var(--bs-border-color);border-right:1px solid var(--bs-border-color);text-align:center;cursor:pointer;font-size:14px;padding:5px;white-space:nowrap}.attributes-matrix[_ngcontent-%COMP%] > span.last[_ngcontent-%COMP%], .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child).last{border-bottom:1px solid var(--bs-border-color)}.attributes-matrix[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:first-of-type, .attributes-matrix[_ngcontent-%COMP%] > span.b-l[_ngcontent-%COMP%], .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child):first-of-type, .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child).b-l{border-left:1px solid var(--bs-border-color)}.attributes-matrix[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(td), .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child):not(td){display:flex;align-items:center;justify-content:center;flex:1}.attributes-matrix[_ngcontent-%COMP%] > span.selected[_ngcontent-%COMP%], .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child).selected{background-color:var(--admin-primary-light);color:var(--admin-primary-text-color)}.attributes-matrix[_ngcontent-%COMP%] > span.disabled[_ngcontent-%COMP%], .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child).disabled{background-color:#f3f3f3;color:var(--bs-gray-500)}.attributes-matrix[_ngcontent-%COMP%] > span.hasError[_ngcontent-%COMP%], .attributes-matrix[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child).hasError{background-color:var(--default-danger);color:var(--admin-primary-text-color)}.error-border[_ngcontent-%COMP%]{border:2px solid red}"]}),A})()},32387:(U,j,u)=>{u.d(j,{N:()=>K});var t=u(60177),k=u(82765),e=u(9183),G=u(85956),v=u(41780),S=u(32968),E=u(74995),g=u(34006),C=u(99213),M=u(224),y=u(51276),N=u(89417),w=u(76233),P=u(83269),X=u(88588),T=u(17705);let K=(()=>{var O;class Y{}return(O=Y).\u0275fac=function(z){return new(z||O)},O.\u0275mod=T.$C({type:O}),O.\u0275inj=T.G2t({providers:[S.U,{provide:"VariantManagerService",useClass:y.P}],imports:[t.MD,k.g7,e.D6,G.wG,v.h,E.s,g.hM,C.m_,M.mz,N.YN,w.aP,P.zI,X.kg]}
1),Y})()},51276:(U,j,u)=>{u.d(j,{P:()=>G});var t=u(214),k=u(17705),e=u(21626);let G=(()=>{var v;class S{constructor(g){this.httpClient=g}convertProduct(g,C,M){return this.httpClient.post("admin/product/convert",C,{params:(0,t.$I)({attributeSetId:g,productId:M})})}addAttributeToSet(g,C,M){return this.httpClient.put("admin/product/attribute/attach",void 0,{params:(0,t.$I)({attributeId:g,setId:C,sortOrder:M})})}createAttribute(g){return this.httpClient.post("admin/product/attribute",g)}updateAttribute(g){return this.httpClient.put("admin/product/attribute",g)}createAttributeSet(g){return this.httpClient.post("admin/product/attribute/set",void 0,{params:(0,t.$I)({name:g})})}getAttribute(g,C){return this.httpClient.get("admin/product/attribute",{params:(0,t.$I)({attributeId:g,setId:C})})}getAttributeSet(g){return this.httpClient.get("admin/product/attribute/set",{params:(0,t.$I)({id:g})})}getAttributes(g){return this.httpClient.get("admin/product/attribute/list/set",{params:(0,t.$I)({setId:g})})}getAllAttributes(){return this.httpClient.get("admin/product/attribute/list")}updateAttributeSet(g,C){return this.httpClient.put("admin/product/attribute/set",void 0,{params:(0,t.$I)({id:g,name:C})})}addValueToAttribute(g,C,M){return this.httpClient.post("admin/product/attribute/value",void 0,{params:(0,t.$I)({attributeId:g,label:C,sortOrder:M})})}updateAttributeValue(g,C,M,y){return this.httpClient.put("admin/product/attribute/value",void 0,{params:(0,t.$I)({attributeId:g,label:C,code:M,sortOrder:y})})}getStructures(){return this.httpClient.get("admin/product/attribute/set/list")}getAttributeValues(g){return this.httpClient.get("admin/product/attribute/value/list",{params:(0,t.$I)({attributeId:g})})}}return(v=S).\u0275fac=function(g){return new(g||v)(k.KVO(e.Qq))},v.\u0275prov=k.jDH({token:v,factory:v.\u0275fac}),S})()},93737:(U,j,u)=>{u.d(j,{N:()=>At});var t=u(17705),k=u(84135),e=u(44437),G=u(41584),v=u(73028),S=u(96354),E=u(84572),g=u(7673),C=u(89417),M=u(34006),y=u(60177),N=u(85956),w=u(99213),P=u(44613),X=u(224),T=u(41780);function K(o,x){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R
17$(1),t.SpI(" ",t.bMT(2,1,"structure_dialog.name_error_required"),""))}const O=function(o){return{limit:50,amount:o}};function Y(o,x){if(1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const s=t.XpG();t.R7$(1),t.SpI("",t.i5U(2,1,"input_error_maxlength",t.eq3(4,O,s.nameFormControl.value.length-50))," ")}}let W=(()=>{var o;class x{constructor(a){this.dialogRef=a,this.nameFormControl=new C.hs("",[C.k0.required,C.k0.maxLength(50)])}ngOnInit(){}save(){this.nameFormControl.valid&&this.dialogRef.close(this.nameFormControl.value)}}return(o=x).\u0275fac=function(a){return new(a||o)(t.rXU(M.CP))},o.\u0275cmp=t.VBU({type:o,selectors:[["webshop-attribute-set-name-dialog"]],decls:24,vars:15,consts:[[1,"dialog-header"],[1,"m-0"],["color","accent","mat-icon-button","",3,"click"],[1,"col-12","mt-3","position-relative"],[1,"row"],["appearance","outline","color","accent",1,"col-12"],["autocomplete","off","matInput","","placeholder","E.x John Doe","required","",3,"formControl"],[4,"ngIf"],["align","end"],["color","warn","mat-stroked-button","","type","button",3,"click"],["color","accent","type","submit","mat-flat-button","",3,"click"]],template:function(a,i){1&a&&(t.j41(0,"mat-dialog-content")(1,"div",0)(2,"h5",1),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"button",2),t.bIt("click",function(){return i.dialogRef.close()}),t.j41(6,"mat-icon"),t.EFF(7,"close"),t.k0s()()(),t.j41(8,"form",3)(9,"div",4)(10,"mat-form-field",5)(11,"mat-label"),t.EFF(12),t.nI1(13,"translate"),t.k0s(),t.nrm(14,"input",6),t.DNE(15,K,3,3,"mat-error",7),t.DNE(16,Y,3,6,"mat-error",7),t.k0s()()()(),t.j41(17,"mat-dialog-actions",8)(18,"button",9),t.bIt("click",function(){return i.dialogRef.close()}),t.EFF(19),t.nI1(20,"translate"),t.k0s(),t.j41(21,"button",10),t.bIt("click",function(){return i.save()}),t.EFF(22),t.nI1(23,"translate"),t.k0s()()),2&a&&(t.R7$(3),t.JRh(t.bMT(4,7,"structure_dialog.title")),t.R7$(9),t.JRh(t.bMT(13,9,"structure_dialog.name_input_label")),t.R7$(2),t.Y8G("formControl",i.nameFormControl),t.R7$(1),t.Y8G("ngIf",null==i.nameFormControl.errors?null:i.nameFormControl.errors.required),t.R7$(1),t.Y8G("ngIf",null==i.nameFormControl.errors?null:i.nameFormControl.errors.maxlength),t.R7$(3),t.SpI(" ",t.bMT(20,11,"structure_dialog.cancel_btn_label"),""),t.R7$(3),t.SpI(" ",t.bMT(23,13,"structure_dialog.proceed_btn_label"),""))},dependencies:[y.bT,C.qT,C.me,C.BC,C.cb,C.YS,C.l_,C.cV,M.Yi,M.E7,N.iV,w.An,P.k5,P.Ky,P.aw,X.aL,T.D9],styles:["[_nghost-%COMP%]  webshop-phone-input .mat-form-field-outline-start{width:100px!important}"],changeDetection:0}),x})();var z=u(270);let H=(()=>{var o;class x{constructor(a){this.dialogRef=a}ngOnInit(){}}return(o=x).\u0275fac=function(a){return new(a||o)(t.rXU(M.CP))},o.\u0275cmp=t.VBU({type:o,selectors:[["webshop-save-set-dialog"]],decls:15,vars:9,consts:[[1,"dialog-header"],[1,"m-0"],["color","accent","mat-icon-button","",3,"click"],["align","end"],["color","primary","mat-stroked-button","",1,"ws-normal","button",3,"click"],["color","primary","mat-flat-button","",1,"button",3,"click"]],template:function(a,i){1&a&&(t.j41(0,"mat-dialog-content")(1,"div",0)(2,"h5",1),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"button",2),t.bIt("click",function(){return i.dialogRef.close()}),t.j41(6,"mat-icon"),t.EFF(7,"close"),t.k0s()()()(),t.j41(8,"mat-dialog-actions",3)(9,"button",4),t.bIt("click",function(){return i.dialogRef.close(!0)}),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.j41(12,"button",5),t.bIt("click",function(){return i.dialogRef.close(!1)}),t.EFF(13),t.nI1(14,"translate"),t.k0s()()),2&a&&(t.R7$(3),t.JRh(t.bMT(4,3,"variants_generator.save_set_dialog_title")),t.R7$(7),t.SpI(" ",t.bMT(11,5,"variants_generator.save_as_new_set"),""),t.R7$(3),t.SpI(" ",t.bMT(14,7,"variants_generator.update_current_set"),""))},dependencies:[M.Yi,M.E7,N.iV,w.An,T.D9],changeDetection:0}),x})();var J=u(16414),I=u(2800),$=u(70521),L=u(59459),B=u(52168),tt=u(82765),et=u(9183),Z=u(76233),it=u(99332),m=u(97754);const A=["matStepper"],b=["addVariantComponent"];function r(o,x){1&o&&(t.j41(0,"mat-icon"),t.EFF(1,"done"),t.k0s())}function n(o,x){1&o&&(t.j41(0,"mat-icon"),t.EFF(1,"done_all"),t.k0s())}function c(o,x){if(1&o){const s=t.RV6();t.j41(0,"mat-step",15),t.nI1(1,"translate"),t.j41(2,"form",7)(3,"su-search-select",16),t.bIt("selectedItemChange",function(i){t.eBV(s);const l=t.XpG();return t.Njj(l.selectedSet=i)})("selectedItemChange",function(){t.eBV(s);const i=t.XpG();return t.Njj(i.setChanged())}),t.nI1(4,"translate"),t.k0s(),t.j41(5,"div",17)(6,"button",18),t.EFF(7),t.nI1(8,"translate"),t.k0s()()()()}if(2&o){const s=t.XpG();t.Y8G("label",t.bMT(1,8,"variants_generator.step_1_label")),t.R7$(3),t.FS9("label",t.bMT(4,10,"variants_generator.structure_select_label")),t.Y8G("displayField","displayName")("valueProperty","id")("items",s.availableSets)("selectedItem",s.selectedSet)("showNoneOption",!1),t.R7$(4),t.SpI("",t.bMT(8,12,"next_btn_label")," ")}}function d(o,x){if(1&o){const s=t.RV6();t.j41(0,"mat-form-field",24)(1,"mat-label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nrm(4,"input",25,26),t.j41(6,"button",27),t.bIt("click",function(){t.eBV(s);const i=t.sdS(5);return t.XpG(3).addAttributeSetClick(i.value),t.Njj(i.value="")}
1),t.j41(7,"mat-icon"),t.EFF(8,"add"),t.k0s()()()}2&o&&(t.R7$(2),t.JRh(t.bMT(3,1,"variants_generator.attribute_input_label")))}function h(o,x){if(1&o){const s=t.RV6();t.qex(0),t.j41(1,"su-search-select",22),t.bIt("selectedItemChange",function(i){t.eBV(s);const l=t.XpG(2);return t.Njj(l.attributeSelected(i))}),t.nI1(2,"translate"),t.k0s(),t.DNE(3,d,9,3,"mat-form-field",23),t.bVm()}if(2&o){const s=t.XpG(2);t.R7$(1),t.FS9("label",t.bMT(2,5,"variants_generator.select_attribute_label")),t.Y8G("displayField","displayName")("items",s.allAttributes)("showNoneOption",!1),t.R7$(2),t.Y8G("ngIf",!s.selectedSet||void 0===s.selectedSet.usedCount||!s.selectedSet.usedCount)}}function _(o,x){1&o&&(t.j41(0,"mat-hint",32),t.EFF(1,"No attributes found. Please add a new attribute."),t.k0s())}function f(o,x){if(1&o){const s=t.RV6();t.j41(0,"mat-form-field",28)(1,"mat-label"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.nrm(4,"input",29,26),t.j41(6,"button",30),t.bIt("click",function(){t.eBV(s);const i=t.sdS(5);return t.XpG(2).addAttributeSetClick(i.value),t.Njj(i.value="")}),t.j41(7,"mat-icon"),t.EFF(8,"add"),t.k0s()(),t.DNE(9,_,2,0,"mat-hint",31),t.k0s()}if(2&o){const s=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,2,"variants_generator.attribute_input_label")),t.R7$(7),t.Y8G("ngIf",!s.isSetValid())}}function F(o,x){if(1&o&&(t.j41(0,"form",19),t.DNE(1,h,4,7,"ng-container",20),t.DNE(2,f,10,4,"mat-form-field",21),t.k0s()),2&o){const s=t.XpG();t.R7$(1),t.Y8G("ngIf",null==s.allAttributes?null:s.allAttributes.length),t.R7$(1),t.Y8G("ngIf",!(s.selectedSet&&void 0!==s.selectedSet.usedCount&&s.selectedSet.usedCount||null!=s.allAttributes&&s.allAttributes.length))}}function Q(o,x){if(1&o){const s=t.RV6();t.j41(0,"mat-checkbox",48),t.bIt("change",function(i){t.eBV(s);const l=t.XpG().$implicit,p=t.XpG();return t.Njj(p.toggleSelectAllValues(l,i.checked))}),t.k0s()}if(2&o){const s=t.XpG().$implicit;t.Y8G("checked",s.isSelected)}}function V(o,x){if(1&o&&(t.j41(0,"span",49),t.EFF(1),t.k0s()),2&o){const s=t.XpG().$implicit;t.R7$(1),t.SpI("(",s.id,")")}}function R(o,x){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R
17$(1),t.SpI(" ",t.bMT(2,1,"variants_generator.name_pattern_error")," "))}function at(o,x){if(1&o){const s=t.RV6();t.j41(0,"mat-checkbox",56),t.bIt("change",function(){t.eBV(s);const i=t.XpG().$implicit,l=t.XpG().$implicit,p=t.XpG();return t.Njj(p.toggleValueSelection(l,i))}),t.k0s()}if(2&o){const s=t.XpG().$implicit;t.Y8G("checked",s.isSelected)}}function rt(o,x){if(1&o&&(t.qex(0),t.EFF(1),t.bVm()),2&o){const s=t.XpG(2).$implicit;t.R7$(1),t.SpI(" ","("+s.code+")"," ")}}function nt(o,x){if(1&o&&(t.j41(0,"div",57),t.DNE(1,rt,2,1,"ng-container",20),t.EFF(2),t.k0s()),2&o){const s=t.XpG().$implicit;t.R7$(1),t.Y8G("ngIf",!(null==s.code||!s.code.length)),t.R7$(1),t.SpI(" ",s.name," ")}}function st(o,x){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"variants_generator.name_pattern_error")," "))}function ot(o,x){if(1&o){const s=t.RV6();t.j41(0,"form")(1,"mat-form-field",58)(2,"input",59,60),t.bIt("change",function(){t.eBV(s);const i=t.sdS(3),l=t.XpG().$implicit,p=t.XpG().$implicit,D=t.XpG();return t.Njj(D.attributeValueNameChanged(i,l,p.id))})("focusin",function(i){return i.target.select()})("focusout",function(){t.eBV(s);const i=t.XpG().$implicit;return t.Njj(i.isEdit=!1)}),t.k0s()(),t.DNE(4,st,3,3,"mat-error",20),t.k0s()}if(2&o){const s=t.sdS(3),a=t.XpG().$implicit,i=t.XpG(2);t.R7$(2),t.AVh("ms-2",a.code),t.Y8G("value",a.name)("pattern",i.namePattern),t.R7$(2),t.Y8G("ngIf",s.value&&s.validity.patternMismatch)}}function lt(o,x){if(1&o){const s=t.RV6();t.j41(0,"mat-icon",64),t.bIt("click",function(){t.eBV(s);const i=t.XpG(2).index,l=t.XpG().$implicit,p=t.XpG();return t.Njj(p.removeAttributeValueClick(i,l))}),t.EFF(1," clear "),t.k0s()}}function ct(o,x){if(1&o){const s=t.RV6();t.j41(0,"div",61)(1,"mat-icon",62),t.bIt("click",function(){t.eBV(s);const i=t.XpG().$implicit,l=t.XpG(2);return t.Njj(l.editAttributeClicked(i))}),t.EFF(2,"edit"),t.k0s(),t.j41(3,"mat-icon",62),t.bIt("click",function(){t.eBV(s);const i=t.XpG(),l=i.$implicit,p=i.index,D=t.XpG().$implicit,q=t.XpG();return t.Njj(q.startMoveAttributeValue(D,l,p))}),t.EFF(4,"swap_vert"),t.k0s(),t.DNE(5,lt,2,0,"mat-icon",63),t.k0s()}if(2&o){const s=t.XpG().$implicit;t.R7$(5),t.Y8G("ngIf",!s.code)}}function ut(o,x){if(1&o){const s=t.RV6();t.j41(0,"div",65)(1,"mat-icon",64),t.bIt("click",function(){t.eBV(s);const i=t.XpG(3);return t.Njj(i.resetAttributeValueMove())}),t.EFF(2," clear "),t.k0s()()}}function dt(o,x){if(1&o){const s=t.RV6();t.j41(0,"div",65)(1,"mat-icon",62),t.bIt("click",function(){t.eBV(s);const i=t.XpG().index,l=t.XpG(2);return t.Njj(l.dropAttributeValue(i))}),t.EFF(2," keyboard_arrow_up "),t.k0s(),t.j41(3,"mat-icon",62),t.bIt("click",function(){t.eBV(s);const i=t.XpG().index,l=t.XpG(2);return t.Njj(l.dropAttributeValue(i+1))}),t.EFF(4," keyboard_arrow_down "),t.k0s()()}}function _t(o,x){if(1&o&&(t.j41(0,"div",50),t.DNE(1,at,1,1,"mat-checkbox",51),t.j41(2,"div",52),t.DNE(3,nt,3,2,"div",53),t.DNE(4,ot,5,5,"form",20),t.DNE(5,ct,6,1,"div",54),t.DNE(6,ut,3,0,"div",55),t.DNE(7,dt,5,0,"div",55),t.k0s()()),2&o){const s=x.$implicit,a=t.XpG().$implicit,i=t.XpG();t.R7$(1),t.Y8G("ngIf",i.shouldForceAttributeValueSelection),t.R7$(2),t.Y8G("ngIf",!s.isEdit),t.R7$(1),t.Y8G("ngIf",s.isEdit),t.R7$(1),t.Y8G("ngIf",!s.isEdit&&!i.selectedAttributeValueForMove),t.R7$(1),t.Y8G("ngIf",!!i.selectedAttributeValueForMove&&i.selectedAttributeForMove.id===a.id&&i.selectedAttributeValueForMove.name===s.name),t.R7$(1),t.Y8G("ngIf",!!i.selectedAttributeValueForMove&&i.selectedAttributeForMove.id===a.id&&i.selectedAttributeValueForMove.name!==s.name)}}function mt(o,x){if(1&o){const s=t.RV6();t.j41(0,"div",33)(1,"div",34),t.DNE(2,Q,1,1,"mat-checkbox",35),t.j41(3,"form",36),t.DNE(4,V,2,1,"span",37),t.j41(5,"span",38)(6,"input",39,40),t.bIt("change",function(){const l=t.eBV(s).$implicit,p=t.sdS(7),D=t.XpG();return t.Njj(D.attributeNameChanged(p,l))})("focusin",function(i){return i.target.select()}),t.k0s()()(),t.j41(8,"div",41)(9,"mat-icon",42),t.bIt("click",function(){const l=t.eBV(s).index,p=t.XpG();return t.Njj(p.removeAttributeClicked(l))}),t.EFF(10,"clear"),t.k0s()()(),t.j41(11,"div",43)(12,"form",44)(13,"div",45)(14,"input",46,26),t.bIt("input",function(){t.eBV(s);const i=t.sdS(15),l=t.XpG();return t.Njj(l.addAttributeInputChange(i))}),t.nI1(16,"translate"),t.k0s(),t.j41(17,"button",27),t.bIt("click",function(){const l=t.eBV(s).$implicit,p=t.sdS(15),D=t.XpG();return t.Njj(D.addAttributeClick(p.value,l,p))}),t.j41(18,"mat-icon"),t.EFF(19,"add"),t.k0s()()(),t.DNE(20,R,3,3,"mat-error",20),t.k0s(),t.DNE(21,_t,8,6,"div",47),t.k0s()()}if(2&o){const s=x.$implicit,a=t.sdS(15),i=t.XpG();t.AVh("border-danger",!(null!=s.values&&s.values.length)),t.R7$(2),t.Y8G("ngIf",i.shouldForceAttributeValueSelection),t.R7$(2),t.Y8G("ngIf",!!s.id),t.R7$(2),t.Y8G("value",s.name)("pattern",
1i.namePattern),t.R7$(8),t.Y8G("placeholder",t.bMT(16,10,"variants_generator.value_input_placeholder"))("pattern",i.namePattern),t.R7$(6),t.Y8G("ngIf",a.value&&a.validity.patternMismatch),t.R7$(1),t.Y8G("ngForOf",s.values)}}function ht(o,x){if(1&o){const s=t.RV6();t.j41(0,"button",66),t.bIt("click",function(){t.eBV(s);const i=t.XpG();return t.Njj(i.saveSetClick())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&o){const s=t.XpG();t.Y8G("disabled",!s.isGroupStepValid()),t.R7$(1),t.SpI("",t.bMT(2,2,"next_btn_label")," ")}}function pt(o,x){if(1&o){const s=t.RV6();t.j41(0,"button",69),t.bIt("click",function(){t.eBV(s);const i=t.XpG(2);return t.Njj(i.updateCurrentSet())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&o){const s=t.XpG(2);t.Y8G("disabled",!s.isSetValid()),t.R7$(1),t.SpI(" ",t.bMT(2,2,"variants_generator.update_current_set"),"")}}function bt(o,x){if(1&o){const s=t.RV6();t.j41(0,"button",67),t.bIt("click",function(){t.eBV(s);const i=t.XpG();return t.Njj(i.promptStructureNameDialog())}),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.DNE(3,pt,3,4,"button",68)}if(2&o){const s=t.XpG();t.Y8G("disabled",!s.isSetValid()),t.R7$(1),t.SpI(" ",t.bMT(2,3,"variants_generator.save_as_new_set"),""),t.R7$(2),t.Y8G("ngIf",!s.hasDeletes&&"-1"!==s.selectedSetId)}}function ft(o,x){1&o&&(t.j41(0,"span",70),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R
17$(1),t.JRh(t.bMT(2,1,"variants_generator.group_step_error")))}const vt=function(o){return{max:o}};function gt(o,x){if(1&o&&(t.j41(0,"span",70),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o){const s=t.XpG();t.R7$(1),t.JRh(t.i5U(2,1,"variants_generator.max_attribute_values_error",t.eq3(4,vt,s.maxAttributeValuesAllowed)))}}function Ct(o,x){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&o&&(t.R7$(1),t.JRh(t.bMT(2,1,"variants_generator.max_variants_allowed")))}function xt(o,x){if(1&o){const s=t.RV6();t.qex(0),t.nrm(1,"webshop-add-variant",71,72),t.j41(3,"div",73)(4,"button",66,74),t.bIt("click",function(){t.eBV(s);const i=t.XpG(2);return t.Njj(i.finishClick())}),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.DNE(8,Ct,3,3,"mat-error",20),t.k0s(),t.bVm()}if(2&o){const s=t.sdS(2),a=t.XpG(2);let i;t.R7$(1),t.Y8G("productName",a.product.name)("attributes",a.getFilteredAttributes())("initImmediate",!0),t.R7$(3),t.Y8G("disabled",!(null!=(i=s.getSelected())&&i.length)||(null==(i=s.getSelected())?null:i.length)>200||s.selectedCellsWithErrors.length>0),t.R7$(2),t.SpI("",t.bMT(7,6,"next_btn_label")," "),t.R7$(2),t.Y8G("ngIf",s.getSelected().length>200)}}function Vt(o,x){if(1&o&&(t.j41(0,"mat-step",15),t.nI1(1,"translate"),t.j41(2,"form",7),t.DNE(3,xt,9,8,"ng-container",20),t.k0s()()),2&o){t.XpG();const s=t.sdS(2);t.Y8G("label",t.bMT(1,2,"variants_generator.step_3_label")),t.R7$(3),t.Y8G("ngIf",2===s.selectedIndex)}}function St(o,x){1&o&&(t.j41(0,"div",75),t.nrm(1,"mat-spinner",76),t.k0s())}let At=(()=>{var o;class x extends k.${constructor(a,i,l,p,D,q,It,Mt){super(a),this.cdk=a,this.snackbarService=i,this.translateService=l,this.deviceInfoService=p,this.matDialog=D,this.router=q,this.shopService=It,this.variantManagerService=Mt,this.onVariantsCreate=new t.bkB,this.attributes=[],this.availableSets=[],this.selectedSetId="-1",this.maxAttributeValuesAllowed=I.K.maxAttributeValuesForProductAllowed,this.shouldForceAttributeValueSelection=!1,this.isNewSet=!1,this.hasChanged=!1,this.hasDeletes=!1,this.namePattern="^.{1,30}$",this.lastSelectedAttributeId=null,this.isLoading=!0}ngOnInit(){this.addSubscription((0,e.y)(this.variantManagerService.getStructures(),this.variantManagerService.getAllAttributes()).subscribe(([a,i])=>{this.availableSets=[{id:"-1",name:this.translateService.instant("variants_generator.new_structure")},...a],this.allAttributes=i,this.availableSets.map(l=>{l.displayName="-1"==l.id?l.name:"("+(null==l?void 0:l.id)+") "+l.name}),this.allAttributes.map(l=>{l.displayName="("+(null==l?void 0:l.id)+") "+l.name}),this.stopLoading(),(0,G.O)(0).subscribe(()=>this.stepper.selectionChange.subscribe(l=>{var p;this.updateShouldForceAttributeValueSelection(),l.selectedStep.label===this.stepper.steps.last.label&&(null===(p=this.addVariantComponentRef)||void 0===p||p.init())}))},()=>{this.stopLoading()}))}addAttributeClick(a,i,l){a.match(this.namePattern)&&a.length&&!i.values.find(p=>p.name.toLowerCase()===a.toLowerCase())&&(i.values.push({name:a}),this.hasChanged=!0,l.value="",this.updateShouldForceAttributeValueSelection())}addAttributeSetClick(a){a.length&&!this.attributes.find(i=>i.name.toLowerCase()===a.toLowerCase())&&(this.attributes.push({name:a,sortOrder:"USER_DEFINED",values:[]}),this.hasChanged=!0,this.updateShouldForceAttributeValueSelection())}removeAttributeValueClick(a,i){i.values.splice(a,1),this.hasChanged=!0,this.markForCheck()}removeAttributeClicked(a){this.attributes.splice(a,1),this.hasChanged=!0,this.hasDeletes=!0,this.markForCheck()}startMoveAttributeValue(a,i,l){this.snackbarService.warning("variants_generator.move_attribute_value",{name:i.name},null,5e3),this.previousAttributeValueIndex=l,this.selectedAttributeValueForMove=i,this.selectedAttributeForMove=a,this.markForCheck()}dropAttributeValue(a){a!==this.previousAttributeValueIndex&&(this.selectedAttributeValueForMove.code?(this.startLoading(),this.addSubscription(this.variantManagerService.updateAttributeValue(this.selectedAttributeForMove.id,this.selectedAttributeValueForMove.name,this.selectedAttributeValueForMove.code,a+1).subscribe(()=>{J.l.moveItemInArray(this.selectedAttributeForMove.values,this.previousAttributeValueIndex,a),this.resetAttributeValueMove(),this.stopLoading()},i=>{this.handleRequestError(i,this.snackbarService,()=>this.snackbarService.error("variants_generator.error_updating_value")),this.stopLoading()}))):(J.l.moveItemInArray(this.selectedAttributeForMove.values,this.previousAttributeValueIndex,a),this.resetAttributeValueMove()))}resetAttributeValueMove(){this.selectedAttributeForMove=void 0,this.previousAttributeValueIndex=void 0,this.selectedAttributeValueForMove=void 0,this.markForCheck()}attributeValueNameChanged(a,i,l){a.classList.add("border-0"),i.name=a.value,i.name.match(this.namePattern)?i.code&&(this.startLoading(),i.isEdit=!1,this.addSubscription(this.variantManagerService.updateAttributeValue(l,i.name,i.code,i.sortOrder).subscribe(()=>{this.stopLoading()},p=>{this.handleRequestError(p,this.snackbarService,()=>this.snackbarService.error("variants_generator.error_updating_value")),this.stopLoading()}))):(a.classList.remove("border-0"),this.markForCheck())}attributeNameChanged(a,i){a.classList.add("border-0"),i.name=a.value,i.name.match(this.namePattern)?i.id&&this.updateAttribute(i):(a.classList.remove("border-0"),this.markForCheck())}saveSetClick(){"-1"===this.selectedSetId||this.isNewSet||this.hasDeletes||!this.hasChanged?this.hasDeletes||"-1"===this.selectedSetId?this.promptStructureNameDialog():this.updateCurrentSet():this.matDialog.open(H,{disableClose:!0,minWidth:320,width:"480px",maxWidth:"100%"}).afterClosed().subscribe(a=>{a?this.promptStructureNameDialog():!1===a&&this.updateCurrentSet()})}setChanged(){var a;this.selectedSetId=(null===(a=this.selectedSet)||void 0===a?void 0:a.id)||"-1",this.attributes=[],"-1"!==this.selectedSetId?(this.selectedSet=this.availableSets.find(i=>i.id===this.selectedSetId),this.attributes=new Array(...this.selectedSet.attributes),this.afterStructureChange(),this.isNewSet=!1,this.stepper.next()):(this.selectedSet=void 0,this.isNewSet=!0),this.updateShouldForceAttributeValueSelection(),this.markForCheck()}finishClick(){var a;this.maxProductsAllowed&&this.totalProductsCount+(null===(a=this.addVariantComponentRef.getSelected())||void 0===a?void 0:a.length)>=this.maxProductsAllowed?this.snackbarService.error("admin.products.max_products_reached_message",null,null,1e4):(this.startLoading(),this.addSubscription(this.variantManagerService.convertProduct(this.selectedSetId,{cells:this.addVariantComponentRef.getSelected()},this.product.id).subscribe(i=>{this.snackbarService.success("Mother product and the Variants generated successfully"),this.onVariantsCreate.emit(i.id)},i=>{this.handleRequestError(i,this.snackbarService,()=>this.snackbarService.error("Creating variants failed")),this.stopLoading()})))}isSetValid(){return!!this.attributes.length&&this.isAllAttributesHaveValues()&&this.isAllAttributesValuesValid()&&this.isALLAttributesNamesValid()}isGroupStepValid(){return this.isSetValid()&&(this.hasSelectedValues()||
1!this.shouldForceAttributeValueSelection)&&!this.hasTooManyAttributeValues()}hasSelectedValues(){return this.attributes.some(a=>a.values.some(i=>i.isSelected))}isGroupStepCompleted(){return!!this.attributes.length&&this.isAllAttributesHaveValues()&&this.isAllAttributesValuesValid()&&this.isALLAttributesNamesValid()&&"-1"!==this.selectedSetId&&!this.hasChanged}getIndex(a,i,l){let p;return p=void 0!==l?a*this.attributes[1].values.length*this.attributes[2].values.length+i*this.attributes[2].values.length+l:a*this.attributes[1].values.length+i,p}attributeSelected(a){!a||a.id===this.lastSelectedAttributeId||(this.lastSelectedAttributeId=a.id,this.attributes.find(i=>a.id===i.id)?this.snackbarService.error("Attribute already exists"):(this.startLoading(),this.addSubscription(this.variantManagerService.getAttributeValues(a.id).subscribe(i=>{this.attributes.push({...a,values:i}),this.hasChanged=!0,this.updateShouldForceAttributeValueSelection(),this.stopLoading()},i=>{this.handleRequestError(i,this.snackbarService,()=>this.snackbarService.error("Cannot load attribute")),this.stopLoading()}))))}promptStructureNameDialog(){this.matDialog.open(W,{disableClose:!0,minWidth:320,width:"480px",maxWidth:"100%"}).afterClosed().subscribe(a=>{a&&this.saveSet(a)})}updateCurrentSet(){this.startLoading();const a={};this.attributes.forEach(i=>{a[i.id||i.name]={...i,values:i.values.filter(l=>l.isSelected)}}),this.addSubscription(this.createAttributesAndValues().pipe((0,v.Z)(i=>this.variantManagerService.getAttributeSet(this.selectedSetId).pipe((0,v.Z)(l=>this.attachAttributesToSet(i,l).pipe((0,v.Z)(()=>this.variantManagerService.getAttributeSet(this.selectedSetId))))))).subscribe(i=>{this.attributes=i.attributes,this.restorePreviouslySelectedValuesForAttributes(a),this.selectedSetId=i.id,this.onStepCreated()},i=>{this.handleRequestError(i,this.snackbarService,()=>this.snackbarService.error("variants_generator.update_set_error")),this.stopLoading()}))}restorePreviouslySelectedValuesForAttributes(a){this.attributes.forEach(i=>{const l=a[i.id]||a[i.name];l&&(i.isSelected=l.isSelected,i.values.forEach(p=>{p.isSelected=!!l.values.find(D=>D.code===p.code||!D.code&&D.name===p.name)}))})}updateAttribute(a){this.startLoading(),this.addSubscription(this.variantManagerService.updateAttribute(a).subscribe(()=>{this.attributes.filter(i=>i.id===a.id).forEach(i=>i.name=a.name),this.allAttributes.filter(i=>i.id===a.id).forEach(i=>i.name=a.name),this.availableSets.map(i=>i.attributes).reduce((i,l)=>i.concat(l),[]).filter(i=>i.id===a.id).forEach(i=>i.name=a.name),this.stopLoading()},i=>{this.handleRequestError(i,this.snackbarService,()=>this.snackbarService.error("variants_generator.update_attribute_error")),this.stopLoading()}))}isAllAttributesHaveValues(){return!this.attributes.find(a=>!a.values||0===a.values.length)}isAllAttributesValuesValid(){return!this.attributes.find(a=>{var i;return!(null===(i=a.values)||void 0===i||!i.find(l=>!l.name.match(this.namePattern)))})}isALLAttributesNamesValid(){return!this.attributes.find(a=>!a.name.match(this.namePattern))}startLoading(){this.isLoading=!0,this.markForCheck()}stopLoading(){this.isLoading=!1,this.markForCheck()}afterStructureChange(){this.hasChanged=!1}saveSet(a){const i={};this.attributes.forEach(l=>{i[l.id||l.name]={...l,values:l.values.filter(p=>p.isSelected)}}),this.startLoading(),this.addSubscription((0,e.y)(this.createAttributesAndValues(),this.variantManagerService.createAttributeSet(a).pipe((0,S.T)(l=>(this.availableSets.push(l),this.selectedSetId=l.id,this.hasChanged=!1,this.hasDeletes=!1,l)))).pipe((0,v.Z)(([l,p])=>this.attachAttributesToSet(l,p))).subscribe(l=>{this.restorePreviouslySelectedValuesForAttributes(i),this.availableSets[this.availableSets.length-1].attributes=new Array(...this.attributes),this.onStepCreated()},l=>{this.handleRequestError(l,this.snackbarService,()=>this.snackbarService.error("Error creating set, please try again later")),this.stopLoading()}))}attachAttributesToSet(a,i){return this.attributes=a,(0,E.z)(a.map((l,p)=>i.attributes.find(D=>D.id===l.id)?(0,g.of)(l):this.variantManagerService.addAttributeToSet(l.id,i.id,p+1))).pipe((0,S.T)(l=>i.id))}createAttributesAndValues(){return(0,E.z)(this.attributes.map((a,i)=>a.id?(0,g.of)(a).pipe((0,v.Z)(l=>(0,E.z)(l.values.map((p,D)=>p.code?(0,g.of)(p):this.variantManagerService.addValueToAttribute(l.id,p.name,D+1).pipe((0,S.T)(q=>p={...q}))))),(0,S.T)(l=>(a.values=l,a))):this.variantManagerService.createAttribute(a).pipe((0,S.T)(l=>(a={...l},l)))))}onStepCreated(){this.afterStructureChange(),this.stopLoading(),(0,G.O)(0).subscribe(()=>this.stepper.next())}addAttributeInputChange(a){a.value&&!a.value.match(this.namePattern)?(a.classList.remove("border-0"),this.markForCheck()):a.classList.add("border-0")}
1hasTooManyAttributeValues(){return this.attributes.map(l=>{var p;return null===(p=l.values)||void 0===p?void 0:p.filter(D=>D.isSelected).length}).reduce((l,p)=>l*p,1)>this.maxAttributeValuesAllowed}updateShouldForceAttributeValueSelection(){this.shouldForceAttributeValueSelection=!this.disableMatrix&&I.K.shouldForceAttributeValueSelection(this.attributes),this.markForCheck()}getFilteredAttributes(){return I.K.getFilteredAttributesByValuesSelected(this.attributes,this.shouldForceAttributeValueSelection)}toggleValueSelection(a,i){I.K.toggleAttributeValueSelection(a,i),this.markForCheck()}toggleSelectAllValues(a,i){I.K.toggleSelectAllAttributeValues(a,i),this.markForCheck()}editAttributeClicked(a){a.isEdit=!a.isEdit,this.markForCheck()}}return(o=x).\u0275fac=function(a){return new(a||o)(t.rXU(t.gRc),t.rXU($.z),t.rXU(T.c$),t.rXU(L.E),t.rXU(M.bZ),t.rXU(B.Ix),t.rXU(z.L),t.rXU("VariantManagerService"))},o.\u0275cmp=t.VBU({type:o,selectors:[["webshop-variants-generator"]],viewQuery:function(a,i){if(1&a&&(t.GBs(A,5),t.GBs(b,5)),2&a){let l;t.mGM(l=t.lsd())&&(i.stepper=l.first),t.mGM(l=t.lsd())&&(i.addVariantComponentRef=l.first)}},inputs:{product:"product",disableMatrix:"disableMatrix",maxProductsAllowed:"maxProductsAllowed",totalProductsCount:"totalProductsCount"},outputs:{onVariantsCreate:"onVariantsCreate"},features:[t.Vt3],decls:19,vars:14,consts:[[1,"col-12","px-0","d-flex","flex-column","position-relative","pt-4"],["orientation","vertical",1,"w-100",3,"linear"],["matStepper",""],["matStepperIcon","edit"],["matStepperIcon","done"],[3,"label",4,"ngIf"],[3,"completed","label"],[1,"col-12","mt-3","row","mx-0","px-0"],["class","row col-12 px-0 mx-0",4,"ngIf"],["class","attribute-container mt-3 ms-3",3,"border-danger",4,"ngFor","ngForOf"],[1,"col-12","row","mx-0","mt-5","d-flex","justify-content-end"],["mat-flat-button","","class","button","color","primary","style","min-width: 150px","type","submit",3,"disabled","click",4,"ngIf","ngIfElse"],["structureManagementButtons",""],["class","step-error col-12 text-end",4,"ngIf"],["class","loading-overlay",4,"ngIf"],[3,"label"],[1,"col","my-1",3,"label","displayField","valueProperty","items","selectedItem","showNoneOption","selectedItemChange"],[1,"col-12","mt-5","d-flex","align-items-center","justify-content-end"],["matStepperNext","","mat-flat-button","","color","primary","type","submit",1,"button",2,"min-width","150px"],[1,"row","col-12","px-0","mx-0"],[4,"ngIf"],["appearance","outline","class","col my-1","color","accent",4,"ngIf"],[1,"col","my-1",3,"label","displayField","items","showNoneOption","selectedItemChange"],["appearance","outline","class","col-12 col-md-6","color","accent",4,"ngIf"],["appearance","outline","color","accent",1,"col-12","col-md-6"],["matInput","","type","text","placeholder","E.x Color, Size ...etc"],["input",""],["mat-icon-button","","matSuffix","",3,"click"],["appearance","outline","color","accent",1,"col","my-1"],["matInput","","type","text","placeholder","E.x Color, Size ...etc",1,"text-center"],["mat-flat-button","","color","primary","matSuffix","",3,"click"],["class","w-100 text-center mt-2 text-primary",4,"ngIf"],[1,"w-100","text-center","mt-2","text-primary"],[1,"attribute-container","mt-3","ms-3"],[1,"font-medium-3","position-relative","d-flex","align-content-center","justify-content-between","w-100"],["class","align-self-center","color","primary",3,"checked","change",4,"ngIf"],[1,"flex-grow-1","d-flex"],["class","d-flex align-items-center flex-shrink-0",4,"ngIf"],[1,"d-flex","align-items-center"],["type","text",1,"error-border","focus-border","border-0","outline-none","w-100","cursor-type",3,"value","pattern","change","focusin"],["setNameInput",""],[1,"cursor-pointer","d-flex","align-items-start","justify-content-center"],[1,"font-medium-1","text-center","text-danger",3,"click"],[1,"attribute-list"],[1,"w-100","d-flex","flex-column","px-2"],[1,"w-100","d-flex"],["type","text",1,"error-border","border-0","flex-grow-1","outline-none",3,"placeholder","pattern","input"],["class","attribute-value-box d-flex align-items-center",4,"ngFor","ngForOf"],["color","primary",1,"align-self-center",3,"checked","change"],[1,"d-flex","align-items-center","flex-shrink-0"],[1,"attribute-value-box","d-flex","align-items-center"],["color","primary",3,"checked","change",4,"ngIf"],[1,"d-flex","w-100","justify-content-between","align-items-center"],["class","text-wrap me-1 flex-grow-1",4,"ngIf"],["class","d-flex align-items-center justify-content-center flex-shrink-0",4,"ngIf"],["class","d-flex flex-column align-items-center justify-content-center flex-shrink-0",4,"ngIf"],["color","primary",3,"checked","change"],[1,"text-wrap","me-1","flex-grow-1"],["appearance","outline",1,"flex-grow-1"],["matInput","","type","text",1,"error-border","border-0","outline-none","cursor-pointer",3,"value","pattern","change","focusin","focusout"],["nameInput",""],[1,"d-flex","align-items-center","justify-content-center","flex-shrink-0"],[1,"curs
1or-pointer",3,"click"],["class","font-medium-1 cursor-pointer","color","warn",3,"click",4,"ngIf"],["color","warn",1,"font-medium-1","cursor-pointer",3,"click"],[1,"d-flex","flex-column","align-items-center","justify-content-center","flex-shrink-0"],["mat-flat-button","","color","primary","type","submit",1,"button",2,"min-width","150px",3,"disabled","click"],["color","primary","type","button","mat-stroked-button","",1,"col-6","button","ws-normal",3,"disabled","click"],["class","col-6 ws-normal button mt-md-0 mt-2 ms-0 ms-md-2","color","primary","type","button","mat-flat-button","",3,"disabled","click",4,"ngIf"],["color","primary","type","button","mat-flat-button","",1,"col-6","ws-normal","button","mt-md-0","mt-2","ms-0","ms-md-2",3,"disabled","click"],[1,"step-error","col-12","text-end"],[1,"w-100",3,"productName","attributes","initImmediate"],["addVariantComponent",""],[1,"col-12","mt-5","d-flex","flex-column","align-items-end","justify-content-center"],["btn",""],[1,"loading-overlay"],["color","accent","mode","indeterminate"]],template:function(a,i){if(1&a&&(t.j41(0,"form",0)(1,"mat-stepper",1,2),t.DNE(3,r,2,0,"ng-template",3),t.DNE(4,n,2,0,"ng-template",4),t.DNE(5,c,9,14,"mat-step",5),t.j41(6,"mat-step",6),t.nI1(7,"translate"),t.j41(8,"div",7),t.DNE(9,F,3,2,"form",8),t.DNE(10,mt,22,12,"div",9),t.j41(11,"div",10),t.DNE(12,ht,3,4,"button",11),t.DNE(13,bt,4,5,"ng-template",null,12,t.C5r),t.DNE(15,ft,3,3,"span",13),t.DNE(16,gt,3,6,"span",13),t.k0s()()(),t.DNE(17,Vt,4,4,"mat-step",5),t.k0s(),t.DNE(18,St,2,0,"div",14),t.k0s()),2&a){const l=t.sdS(14);t.R7$(1),t.Y8G("linear",!0),t.R7$(4),t.Y8G("ngIf",null==i.availableSets?null:i.availableSets.length),t.R7$(1),t.Y8G("completed",i.isGroupStepCompleted())("label",t.bMT(7,12,"variants_generator.step_2_label")),t.R7$(3),t.Y8G("ngIf",i.attributes.length<3),t.R7$(1),t.Y8G("ngForOf",i.attributes),t.R7$(2),t.Y8G("ngIf",!i.disableMatrix)("ngIfElse",l),t.R7$(3),t.Y8G("ngIf",!i.isGroupStepValid()),t.R7$(1),t.Y8G("ngIf",i.hasTooManyAttributeValues()),t.R7$(1),t.Y8G("ngIf",!i.disableMatrix),t.R7$(1),t.Y8G("ngIf",i.isLoading)}},dependencies:[y.Sq,y.bT,N.iV,tt.So,C.qT,C.cb,C.cV,et.LG,P.k5,P.Ky,P.V3,P.aw,P.xZ,X.aL,Z.V5,Z.M6,Z.F7,Z.xJ,w.An,it.w,m.ys,T.D9],styles:["span.delete-overlay[_ngcontent-%COMP%]{animation:background-color,opacity .15s linear;background-color:#0000;opacity:0;display:flex;align-items:center;justify-content:center;top:0;right:0;left:0;bottom:0;position:absolute;cursor:pointer}span.delete-overlay[_ngcontent-%COMP%]:hover{background-color:#e5e5e5d9;opacity:1;z-index:2}.attribute-container[_ngcontent-%COMP%]{width:300px;max-width:100%;display:flex;flex-direction:column}.attribute-list[_ngcontent-%COMP%]{border:solid 1px #ccc;min-height:40px;background:white;border-radius:4px;overflow:hidden;display:block;white-space:normal;word-break:break-word}.attribute-value-box[_ngcontent-%COMP%]{padding:5px;border-top:solid 1px #ccc;color:#000000de;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;background:white;font-size:14px}span.step-error[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:var(--theme-warn);margin-top:4px}.focus-border[_ngcontent-%COMP%]:focus{border:1px solid var(--admin-primary)!important}.error-border[_ngcontent-%COMP%]{border:2px solid red}"],changeDetection:0}),x})()},39987:(U,j,u)=>{u.d(j,{C:()=>J});var t=u(26015),k=u(51276),e=u(85956),G=u(82765),v=u(224),S=u(9183),E=u(88588),g=u(9159),C=u(89417),M=u(76233),y=u(44613),N=u(99213),w=u(60177),P=u(41780),X=u(34006),T=u(17705);let K=(()=>{var I;class ${}return(I=$).\u0275fac=function(B){return new(B||I)},I.\u0275mod=T.$C({type:I}),I.\u0275inj=T.G2t({imports:[w.MD,C.X1,C.YN,X.hM,e.wG,N.m_,P.h,v.mz]}),$})(),O=(()=>{var I;class ${}return(I=$).\u0275fac=function(B){return new(B||I)},I.\u0275mod=T.$C({type:I}),I.\u0275inj=T.G2t({imports:[w.MD,X.hM,e.wG,N.m_,P.h]}),$})();var Y=u(74995),W=u(96850),z=u(32387),H=u(97754);let J=(()=>{var I;class ${}return(I=$).\u0275fac=function(B){return new(B||I)},I.\u0275mod=T.$C({type:I}),I.\u0275inj=T.G2t({providers:[{provide:"VariantManagerService",useClass:k.P}],imports:[t.G,e.wG,g.tP,G.g7,C.YN,S.D6,y.C,v.mz,C.X1,E.kg,M.aP,N.m_,K,O,Y.s,W.RI,z.N,H.VA]}),$})()},16414:(U,j,u)=>{u.d(j,{l:()=>t});class t{static hasCommon(e,G){const v=new Set(G);return e.every(S=>v.has(S))}static moveItemInArray(e,G,v){if(G===v)return;const S=e[G];e.splice(G,1),G<v&&v--,e.splice(v,0,S)}}}}]);

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.