var TimePayment=function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=3)}([function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.isLocalhost=function(e){return void 0!==e&&0<=e.indexOf("localhost")},n.getUserAgent=function(){return navigator.userAgent},n.setFSPaths=function(){n.appBasePath="../app/"},n.setDebugPaths=function(){n.appBasePath=n.debugBasePath+"/button-apps/"+n.version+"/app/"},n.setLocalhostPaths=function(e){if(void 0===e||"string"!=typeof e)return n.appBasePath;n.appBasePath=e+"/button-apps/dist/button-apps/"+n.version+"/app/"},n.vendorCodeAllowsTracking=function(e){return!1===String.prototype.containsAnyElementsFromArray(e,n.trackIgnore)},n.basePath=function(e){var t="";return void 0!==e&&"string"==typeof e&&(t=e.replace(/[^a-zA-Z]/gi,"").toLowerCase()+"/"),n.appBasePath+t},n.getQueryStringParameterByName=function(e,t){if(void 0===t||"string"!=typeof e||"string"!=typeof t)return"";var o=(t.match(new RegExp(e+"=(.*?)($|&)","i"))||[])[1]||"";return decodeURIComponent(o.replace(/\+/g," "))},n.fragmentIsInCurrentUrl=function(e,t){var o=!1;return!!(e instanceof Array&&"string"==typeof t&&(e.forEach(function(e){void 0!==e&&0<=t.toLowerCase().indexOf(e.toLowerCase())&&(o=!0)}),o))},n.version="1.0.0",n.minimumFundingAmount=500,n.maximumFundingAmount=5e5,n.cartApplyAssetsBasePath=(n.appBasePath="https://cdn.timepayment.com/button-apps/"+n.version+"/app/")+"cartapply/assets/",n.easyApplyAssetsBasePath=n.appBasePath+"easyapply/assets/",n.smartApplyAssetsBasePath=n.appBasePath+"smartapply/assets/",n.interstitialDefaultPathDev="https://applydev.timepayment.com/about-financing/",n.interstitialDefaultPath="https://apply.timepayment.com/about-financing/",n.leaseApplicationBasePathDev="http://192.168.66.36:8080/default.aspx",n.leaseApplicationBasePath="https://apply.timepayment.com/ldaweb/default.aspx",n.debugBasePath="https://s3.amazonaws.com/cdn.timepayment.com",n.trackPath="https://timepayment.net/v1/track",n.trackIgnore=["TEST-"],n);function n(){}t.Core=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=(a.getAsLowAsPrice=function(e){var t,o;return t=String.prototype.simpleCurrency(e),o=(.025*Number(t)).toFixed(2),console.log("As Low As Price: "+t+" --\x3e "+o),o},a.getObjectProperty=function(e,t,o){return void 0===o&&(o="struct"),"string"===o?void 0!==e&&e.hasOwnProperty(t)?e[t]:"":void 0!==e&&e.hasOwnProperty(t)?e[t]:{}},a.isNumeric=function(e){return!isNaN(Number(e))},a.filterEnabledElements=function(e){var t=e.enabled,o=a.getObjectProperty(e,"excludedUrls"),n=!1===r.Core.fragmentIsInCurrentUrl(o,window.location.pathname);return t&&n},a);function a(){}t.Utils=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=function(){var e=this;this.get=function(t,o){var r={appType:"",payeeCode:"",dealerReference:"",formAction:"",formClasses:"",formId:"",interstitialDisplay:!0,interstitialPath:"",leaseApplicationPath:"",submitElement:{imgSrc:"",text:""}};return e.build(r,t,o)},this.build=function(t,o,r){try{var n=[],a=r.interstitial.show,s=r.destination.appType,p=r.interstitial.path,l=r.destination.path;window.TPC_JQUERY.isArray(s)&&"boolean"===window.TPC_JQUERY.type(a)&&(1===(n=Array.prototype.slice.call(window.TPC_JQUERY(s).filter(e.supportedAppTypes),0)).length?(t.appType=n[0],t.interstitialDisplay=a):1'),window.TPC_JQUERY("body").append(i)),void 0!==a.VCModules&&a.VCModules.hasOwnProperty(e)?u=a.VCModules[e].modules:console.error("vendor code missing from VCModules"),u.forEach(function(n){n.toLowerCase()===p.toLowerCase()?(o=[r.Core.basePath(n)+"config/"+e+".js"],t=c(p)):n.toLowerCase()===l.toLowerCase()?(o=[r.Core.basePath(n)+"config/"+e+".js"],t=c(l)):n.toLowerCase()===s.toLowerCase()&&(o=[r.Core.basePath(n)+"config/"+e+".js"],t=c(s)),window.TPC_JQUERY.isArray(o)&&(new d).loadEach(o,t)})},d.prototype.loadScript=function(e,t){var o,r,n,a,s,p;try{(o=document.createElement("script")).src=e,(r=document.getElementsByTagName("head")[0]).appendChild(o),a=o,s=r,n=function(){a.readyState&&"loaded"!==a.readyState&&"complete"!==a.readyState||(console.info("Finished loading "+a.src),a.onload=a.onreadystatechange=null,s&&a.parentNode&&s.removeChild(a),p())},"function"==typeof(p=t)&&o&&o.addEventListener("load",n,!1)}catch(e){console.error(e.stack)}},d);function d(){}t.ScriptLoader=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(7),n=o(13),a=o(18),s=(p.createModule=function(e){if("easyapply"===e.toLowerCase())return new n.EasyApply(window.EasyApplyConfig);if("smartapply"===e.toLowerCase())return new a.SmartApply(window.SmartApplyConfig);if("cartapply"===e.toLowerCase())return new r.CartApply(window.CartApplyConfig);throw new TypeError("Cannot create module for "+e)},p);function p(){}t.ModuleFactory=s},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),n=o(1),a=o(8),s=o(12),p=(l.prototype.build=function(){var e=this;try{var t=n.Utils.getObjectProperty(this.config,"id"),o=n.Utils.getObjectProperty(this.config,"vendorCode"),p=n.Utils.getObjectProperty(this.config,"payeeCode"),l=n.Utils.getObjectProperty(this.config,"officeCode","string"),i=n.Utils.getObjectProperty(this.config,"identityExtension"),d=void 0,u=void 0,y=window.TPC_JQUERY('script[data-r="t"]').attr("src");0'),f=n.Utils.getObjectProperty(g,"js"),window.TPC_JQUERY.isArray(f)&&window.TPC_JQUERY.each(f,function(e,t){console.debug("Adding custom script "+e,t),t()}),m=n.Utils.getObjectProperty(g,"css"),u.remove(),window.TPC_JQUERY.isArray(m)&&0'),window.TPC_JQUERY("body").append(u))}catch(d){console.error(d.stack)}},l.prototype.setFlagForTracking=function(){this.addTracking=!0},l.prototype.shouldAddTracking=function(){return this.addTracking},l);function l(e){this.addTracking=!1,this.config=e}t.CartApply=p},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(9),n=(a.createElement=function(e,t,o,n,a,s,p){if("button"===e.toLowerCase())return new r.Button(t,o,n,a,s,p);throw new TypeError("Cannot create element for "+e)},a);function a(){}t.ElementFactory=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(10),n=o(11),a=(s.prototype.elementsWillBeEmbeddedOnPage=function(){return this.buttonWillAppearOnPage},s.prototype.form=function(){return this.formHtml},s.prototype.embed=function(){for(var e=0,t=this.buttonFormCollection;e"),this.buttonFormCollection=[],console.group("CartApply Button"),this.fetcher=e,this.vendorCode=t,this.payeeCode=o,this.officeCode=a,this.identityExtension=s,this.buttonConfiguration=p.configuration,this.cartTotal=String.prototype.simpleCurrency(e.cartTotal()),l=this.fetcher.containers(),console.log("All Containers: ",l),console.log("Vendor: "+this.vendorCode),console.log("Cart Total: "+this.cartTotal),console.group("Products");for(var d=0,u=l;d=r.Core.minimumFundingAmount&&Number(this.cartTotal)<=r.Core.maximumFundingAmount)return console.debug("CartApply ButtonForm is valid"),!0;console.debug("Cart total of "+this.cartTotal+" does not meet requirements")}}catch(e){console.error(e.stack)}return console.debug("CartApply ButtonForm is not valid"),!1},s.prototype.embed=function(){var e,t,o;if(e=this.form(),t=window.TPC_JQUERY('.ca[data-r="t"][data-id="'+this.elementId+'"]'),o=window.TPC_JQUERY('.ca[data-r="t"]:not([data-id])'),console.group("CartApply Embedding Details"),t.length)0: ",t);else if(o.length){var r;0: ",o)}else console.info("Form not embedded. Unable to find required HTML elements in source");console.log(this.target,"MY TARGET"),void 0!==this.target&&(0===this.target().length?console.error("Config target for CartApply button placement not found"):(console.info("Config target for CartApply button placement found successfully"),this.target().after(e),(r=document.createElement("div")).className="cartapply-wrapper",e.parentNode&&(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e)),r.append(e))),console.groupEnd()},s.prototype.createForm=function(e,t,o,n,a,s,p){var l,i=this.buttonConfiguration.interstitial.show,d=this.buttonConfiguration.destination.path,u=this.buttonConfiguration.interstitial.path,y=[],c=this.buttonConfiguration.destination.appType;console.group("CartApply ButtonForm Details"),console.log("Vendor Code: ",e),console.log("Payee Code: ",t),console.log("Office Code: ",o),console.log("Dealer Reference: ",n),console.log("Identity Extension: ",a),console.log("Cart Total: ",s),console.log("Products: ",p),console.log("Show Interstitial: ",i),console.groupEnd();var m="";window.TPC_JQUERY.isArray(c)&&"boolean"===window.TPC_JQUERY.type(i)&&(1===(y=Array.prototype.slice.call(window.TPC_JQUERY(c).filter(this.supportedAppTypes),0)).length?m=y[0]:1';h.innerHTML=A;var g=document.createElement("button");g.setAttribute("type","submit"),g.classList.add("timepaymentsubmit"),this.buttonConfiguration.classes.length&&(l=g.classList).add.apply(l,this.buttonConfiguration.classes);for(var E=0,C=Object.keys(this.buttonConfiguration.css);E';console.log("Either id-specific or generic EasyApply element(s) found on page so dropping tracking pixel "+T),A=window.TPC_JQUERY(''),window.TPC_JQUERY("body").append(A),E=!1}}else console.log("Tracking code for "+e+" is empty in configuration so not tracking pixel dropped");else console.log("Vendor code "+e+" does not allow dropping a tracking code");console.groupEnd(),C=window.TPC_JQUERY(".easyapply-custom-css"),w=window.TPC_JQUERY('