{"version":3,"sources":["webpack:///./cartridges/app_rna_core/cartridge/client/default/js/price/index.js"],"names":["subscribe","params","formEl","formData","salesforceWebCase","actionURL","getAttribute","topicValue","dataToSend","orgid","recordType","RICSC_Maison__c","dwfrm_requestprice_customer_email","dwfrm_requestprice_customer_salutations_salutation","toUpperCase","substr","toLowerCase","dwfrm_requestprice_customer_firstname","dwfrm_requestprice_customer_lastname","dwfrm_requestprice_customer_phone","dwfrm_requestprice_customer_yourmessage","RICCRC_Language__c","RICCRC_CountryOfInteraction__c","window","SFRA","SitePreferences","contactUsMarketingConsent","dwfrm_requestprice_customer_consectacceptance","RICCRC_MarketingConsent__c","$","ajax","url","type","data"],"mappings":";;;;;;;;;;AAAA;AAAA;AAA4C;AAC7B,2EAAW;EACtB;EACAA,iEAAS,CAAC,yBAAyB,EAAE,UAASC,MAAM,EAAE;IAClD,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACC,MAAM,IAAI,CAACD,MAAM,CAACE,QAAQ,IAAI,CAACF,MAAM,CAACE,QAAQ,CAACC,iBAAiB,EAAE;MACrF;IACJ;IACA,IAAIC,SAAS,GAAGJ,MAAM,CAACC,MAAM,CAACI,YAAY,CAAC,mBAAmB,CAAC;IAC/D,IAAIC,UAAU,GAAG,SAAS;IAC1B,IAAIC,UAAU,GAAG;MACb;MACA;MACA,OAAO,EAAEP,MAAM,CAACE,QAAQ,CAACM,KAAK;MAC9B,YAAY,EAAER,MAAM,CAACE,QAAQ,CAACO,UAAU;MACxC,iBAAiB,EAAET,MAAM,CAACE,QAAQ,CAACQ,eAAe;MAClD,OAAO,EAAEV,MAAM,CAACE,QAAQ,CAACS,iCAAiC,IAAI,EAAE;MAChE,MAAM,EAAEX,MAAM,CAACE,QAAQ,CAACU,kDAAkD,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAGb,MAAM,CAACE,QAAQ,CAACU,kDAAkD,CAACE,MAAM,CAAC,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,GAAG,GAAG,GAAGf,MAAM,CAACE,QAAQ,CAACc,qCAAqC,GAAG,GAAG,GAAGhB,MAAM,CAACE,QAAQ,CAACe,oCAAoC;MACnT,OAAO,EAAEjB,MAAM,CAACE,QAAQ,CAACgB,iCAAiC,IAAI,EAAE;MAChE,iBAAiB,EAAEZ,UAAU;MAC7B,aAAa,EAAEN,MAAM,CAACE,QAAQ,CAACiB,uCAAuC;MACtE,oBAAoB,EAAEnB,MAAM,CAACE,QAAQ,CAACkB,kBAAkB;MACxD,gCAAgC,EAAEpB,MAAM,CAACE,QAAQ,CAACmB;IACtD,CAAC;IACD,IAAIC,MAAM,CAACC,IAAI,CAACC,eAAe,CAACC,yBAAyB,EAAE;MACvDlB,UAAU,CAACkB,yBAAyB,GAAGzB,MAAM,CAACE,QAAQ,CAACwB,6CAA6C;IACxG,CAAC,MAAM;MACHnB,UAAU,CAACoB,0BAA0B,GAAG3B,MAAM,CAACE,QAAQ,CAACwB,6CAA6C;IACzG;IAEA,IAAItB,SAAS,EAAE;MACXwB,CAAC,CAACC,IAAI,CAAC;QACHC,GAAG,EAAE1B,SAAS;QACd2B,IAAI,EAAE,MAAM;QACZC,IAAI,EAAEzB;MACV,CAAC,CAAC;IACN;EACJ,CAAC,CAAC;AAEN,C","file":"page-requestprice.js","sourcesContent":["import {subscribe} from '../helpers/pubSub';\nexport default function() {\n // Override for Denali\n subscribe('requestPriceForm:submit', function(params) {\n if (!params || !params.formEl || !params.formData || !params.formData.salesforceWebCase) {\n return;\n }\n let actionURL = params.formEl.getAttribute('data-web-case-url');\n let topicValue = 'Product';\n var dataToSend = {\n //'debug': 1, // Only enable this during debugging mode\n //'debugEmail': 'test@mail.com', // Only enable this during debugging mode\n 'orgid': params.formData.orgid,\n 'recordType': params.formData.recordType,\n 'RICSC_Maison__c': params.formData.RICSC_Maison__c,\n 'email': params.formData.dwfrm_requestprice_customer_email || '',\n 'name': params.formData.dwfrm_requestprice_customer_salutations_salutation[0].toUpperCase() + params.formData.dwfrm_requestprice_customer_salutations_salutation.substr(1).toLowerCase() + ' ' + params.formData.dwfrm_requestprice_customer_firstname + ' ' + params.formData.dwfrm_requestprice_customer_lastname,\n 'phone': params.formData.dwfrm_requestprice_customer_phone || '',\n 'RICCRC_Topic__c': topicValue,\n 'description': params.formData.dwfrm_requestprice_customer_yourmessage,\n 'RICCRC_Language__c': params.formData.RICCRC_Language__c,\n 'RICCRC_CountryOfInteraction__c': params.formData.RICCRC_CountryOfInteraction__c\n };\n if (window.SFRA.SitePreferences.contactUsMarketingConsent) {\n dataToSend.contactUsMarketingConsent = params.formData.dwfrm_requestprice_customer_consectacceptance;\n } else {\n dataToSend.RICCRC_MarketingConsent__c = params.formData.dwfrm_requestprice_customer_consectacceptance;\n }\n\n if (actionURL) {\n $.ajax({\n url: actionURL,\n type: 'POST',\n data: dataToSend\n });\n }\n });\n\n}\n"],"sourceRoot":""}