1(function ($) { 2 if (!$) { 3 console.error('jQuery and $ are missing'); 4 return; 5 } 6 7 // Init blocks 8 $(function () { 9 window.atc_cargo_server = new AtcCargoServer({}); 10 window.atc_cargo_more = new AtcCargoMore({}); 11 window.atc_cargo = new AtcCargo({}); 12 window.atc_cargo.textarea(); 13 }); 14 15 var $atc_cargo = $('.atc-cargo'); 16 17 function atc_cargo_loading_start(param) { 18 if ($atc_cargo.length) { 19 $atc_cargo.addClass('atc-cargo--loading'); 20 if (param) { 21 $atc_cargo.addClass('atc-cargo--loading-1'); 22 } 23 } 24 } 25 function atc_cargo_loading_stop() { 26 if ($atc_cargo.length) { 27 $atc_cargo.removeClass('atc-cargo--loading').removeClass('atc-cargo--loading-1'); 28 } 29 } 30 31 // Return true if variable exist and not empty 32 function atc_cargo_is_exist(data) { 33 switch (true) { 34 case (typeof data === "object") : 35 return !!(data !== void 0 && Object.keys(data).length); 36 default: 37 return !!(data !== void 0 && data); 38 } 39 } 40 41 function atc_cargo_check_response(response) { 42 if (response.status === void 0 || response.status.type === void 0 || response.status.type === 'error') { 43 console.error(response.status.cause); 44 return true; 45 } 46 return false; 47 } 48 49 window.atc_cargo_loading_start = atc_cargo_loading_start; 50 window.atc_cargo_loading_stop = atc_cargo_loading_stop; 51 window.atc_cargo_is_exist = atc_cargo_is_exist; 52 window.atc_cargo_check_response = atc_cargo_check_response; 53}($ || window.jQuery)); 54// end of file
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.