Liferay.Loader.define("data-engine-js-components-web@1.0.89/js/utils/repeatable.es",["module","exports","require"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.parseName=parseName,a.generateName=function generateName(e,a={}){const t=parseName(e),{editingLanguageId:d=t.editingLanguageId,fieldName:n=t.fieldName,instanceId:r=t.instanceId,portletNamespace:s=t.portletNamespace,repeatedIndex:i=t.repeatedIndex}=a;return"".concat(s,"ddm$$").concat(n,"$").concat(r,"$").concat(i,"$$").concat(d)},a.parseNestedFieldName=parseNestedFieldName,a.generateNestedFieldName=function generateNestedFieldName(e,a){const t=parseName(a);let d=parseNestedFieldName(e);d.fieldName||(d=parseName(e));const{fieldName:n,instanceId:r,portletNamespace:s,repeatedIndex:i}=d;return[s,"ddm$$",t.fieldName,"$",t.instanceId,"$",t.repeatedIndex,"#",n,"$",r,"$",i,"$$",d.locale||d.editingLanguageId].join("")},a.getRepeatedIndex=function getRepeatedIndex(e){let a;a=t.test(e)?parseNestedFieldName(e):parseName(e);return a.repeatedIndex};const e=/(_\w+_)ddm\$\$(.+)\$(\w+)\$(\d+)\$\$(\w+)/,t=/(_\w+_)ddm\$\$(.+)\$(\w+)\$(\d+)#(.+)\$(\w+)\$(\d+)\$\$(\w+)/;function parseName(a){const t=e.exec(a);return t?{editingLanguageId:t[5],fieldName:t[2],instanceId:t[3],portletNamespace:t[1],repeatedIndex:Number(t[4])}:{}}function parseNestedFieldName(e){let a={};const d=t.exec(e);return d&&(a={fieldName:d[5],instanceId:d[6],locale:d[8],parentFieldName:d[2],parentInstanceId:d[3],parentRepeatedIndex:Number(d[4]),portletNamespace:d[1],repeatedIndex:Number(d[7])}),a}}}));
//# sourceMappingURL=repeatable.es.js.map