(function(ns){ ns.DependencyLoaderSettings = { scripts: function() { return [ CF.Unified.CFDocumentLoader.scripts.main ] } }; })(extend('CF.Unified.CFDocumentLoader')); (function (ns) { ns.DependencyLoader = function () { var settings = CF.Unified.CFDocumentLoader.DependencyLoaderSettings || {}; if (typeof jQuery === 'undefined') { throw new Error('JQuery not found! Required version >= 2.2.4'); } $.ajaxPrefilter(function (options) { if (window.location.hostname !== 'portal.avafin.pl') { options.crossDomain ={ crossDomain: true }; options.xhrFields = { withCredentials: true }; } }); $.ajaxSetup({ cache: true }); function worker(scripts, finishCb) { if (scripts.length <= 0 || !scripts) { finishCb(); return; } var script = scripts.shift(); $.getScript(script, function () { worker(scripts, finishCb); }); } this.load = function (finishCb) { if (typeof settings.beforeLoad == 'function') { settings.beforeLoad(); } var scripts = typeof settings.scripts == 'function' ? settings.scripts() : settings.scripts; worker(scripts, () => { if (typeof settings.afterLoad == 'function') { settings.afterLoad(); } finishCb(); } ); }; } })(extend('CF.Unified.CFDocumentLoader')); function extend(ns_string) { window.CF = window.CF || {}; var parts = ns_string.split('.'), parent = window.CF, pl, i; if (parts[0] == "CF") { parts = parts.slice(1); } pl = parts.length; for (i = 0; i < pl; i++) { //create a property if it doesnt exist if (typeof parent[parts[i]] == 'undefined') { parent[parts[i]] = {}; } parent = parent[parts[i]]; } return parent; }(function (ns) { ns.scripts = { main: "https://portal.avafin.pl/generated/js/script.js?6ed7d1fc07f9842083609d542d4566ee993b9ad1ca77a26324b197f30529cee6_7a9ea943e0d064d26db52cdd6a60fc03f724eccb5df437e33af9a4394ca6373a", }; ns.loadUrl = "https://portal.avafin.pl/cf-document" + '/content'; }) (extend('CF.Unified.CFDocumentLoader'));