https://www.ecampusnews.com/wp-content/plugins/gp-easy-passthrough/js/vendor/js.cookie.js?ver=1.10.2
vendor: 3,746 bytes, lines 1-157
1/*! 2 * JavaScript Cookie v2.1.3 3 * https://github.com/js-cookie/js-cookie 4 * 5 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 6 * Released under the MIT license 7 */ 8;(function (factory) { 9 var registeredInModuleLoader = false; 10 if (typeof define === 'function' && define.amd) { 11 define(factory); 12 registeredInModuleLoader = true; 13 } 14 if (typeof exports === 'object') { 15 module.exports = factory(); 16 registeredInModuleLoader = true; 17 } 18 if (!registeredInModuleLoader) { 19 var OldCookies = window.Cookies; 20 var api = window.Cookies = factory(); 21 api.noConflict = function () { 22 window.Cookies = OldCookies; 23 return api; 24 }; 25 } 26}(function () { 27 function extend () { 28 var i = 0; 29 var result = {}; 30 for (; i < arguments.length; i++) { 31 var attributes = arguments[ i ]; 32 for (var key in attributes) { 33 result[key] = attributes[key]; 34 } 35 } 36 return result; 37 } 38 39 function init (converter) { 40 function api (key, value, attributes) { 41 var result; 42 if (typeof document === 'undefined') { 43 return; 44 } 45 46 // Write 47 48 if (arguments.length > 1) { 49 attributes = extend({ 50 path: '/' 51 }, api.defaults, attributes); 52 53 if (typeof attributes.expires === 'number') { 54 var expires = new Date(); 55 expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); 56 attributes.expires = expires; 57 } 58 59 try { 60 result = JSON.stringify(value); 61 if (/^[\{\[]/.test(result)) { 62 value = result; 63 } 64 } catch (e) {} 65 66 if (!converter.write) { 67 value = encodeURIComponent(String(value)) 68 .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 69 } else { 70 value = converter.write(value, key); 71 } 72 73 key = encodeURIComponent(String(key)); 74 key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); 75 key = key.replace(/[\(\)]/g, escape); 76 77 return (document.cookie = [ 78 key, '=', value, 79 attributes.expires ? '; expires=' + attributes.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 80 attributes.path ? '; path=' + attributes.path : '', 81 attributes.domain ? '; domain=' + attributes.domain : '', 82 attributes.SameSite ? '; SameSite=' + attributes.SameSite : '', 83 attributes.secure ? '; secure' : '' 84 ].join('')); 85 } 86 87 // Read 88 89 if (!key) { 90 result = {}; 91 } 92 93 // To prevent the for loop in the first place assign an empty array 94 // in case there are no cookies at all. Also prevents odd result when 95 // calling "get()" 96 var cookies = document.cookie ? document.cookie.split('; ') : []; 97 var rdecode = /(%[0-9A-Z]{2})+/g; 98 var i = 0; 99 100 for (; i < cookies.length; i++) { 101 var parts = cookies[i].split('='); 102 var cookie = parts.slice(1).join('='); 103 104 if (cookie.charAt(0) === '"') { 105 cookie = cookie.slice(1, -1); 106 } 107 108 try { 109 var name = parts[0].replace(rdecode, decodeURIComponent); 110 cookie = converter.read ? 111 converter.read(cookie, name) : converter(cookie, name) || 112 cookie.replace(rdecode, decodeURIComponent); 113 114 if (this.json) { 115 try { 116 cookie = JSON.parse(cookie); 117 } catch (e) {} 118 } 119 120 if (key === name) { 121 result = cookie; 122 break; 123 } 124 125 if (!key) { 126 result[name] = cookie; 127 } 128 } catch (e) {} 129 } 130 131 return result; 132 } 133 134 api.set = api; 135 api.get = function (key) { 136 return api.call(api, key); 137 }; 138 api.getJSON = function () { 139 return api.apply({ 140 json: true 141 }, [].slice.call(arguments)); 142 }; 143 api.defaults = {}; 144 145 api.remove = function (key, attributes) { 146 api(key, '', extend(attributes, { 147 expires: -1 148 })); 149 }; 150 151 api.withConverter = init; 152 153 return api; 154 } 155 156 return init(function () {}); 157}));
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.