(function(){"use strict";u8.Crm.SignatureParser=function(e){$.extend(this,u8.Crm.SignatureParser.defaults,e)};u8.Crm.SignatureParser.defaults={};$.extend(u8.Crm.SignatureParser.prototype,{getParserModes:function(e){var a=new u8.Base.DataSource({requests:{items:"WEBCONFIG;Expand.SignatureParsingModes"},onCreate:function(){e({modes:a.data&&a.data.get("items")||[],defaultModus:u8.session.webConfigValues.get("Expand.SignatureParsingModes")})}})},parseSignature:function(e,a){$error("The abstract class SignatureParser does not provide an implementation for the parseSignature method.")},interpretSignature:function(e,a){var r=e.fieldControl,t=e.signature,i=[];r.eachField(function(e){var a=e["function"];if(!(a in t)){return}var r={field:e,originalValue:t[a],failed:false};var n=u8.services.schema.getField(e.infoAreaId,e.fieldId);if(n.isCatalogField()){var s=u8.services.catalogs.textToCode(n,r.originalValue);if(s==-1){r.failed=true}r.value=s}else{r.value=r.originalValue}i.push(r)});a({values:i})}});u8.Crm.SignatureParser.makeClass({name:"SignatureParser"})})();