docs: add page with basic rpcd info
[web.git] / js / vendor / jquery.cookie.js
1 /*!
2 * jQuery Cookie Plugin v1.4.1
3 * https://github.com/carhartl/jquery-cookie
4 *
5 * Copyright 2013 Klaus Hartl
6 * Released under the MIT license
7 */
8 !function (a) {
9 "function" == typeof define && define.amd ? define(["jquery"], a) : a("object" == typeof exports ? require("jquery") : jQuery)
10 }(function (a) {
11 function b(a) {
12 return h.raw ? a : encodeURIComponent(a)
13 }
14
15 function c(a) {
16 return h.raw ? a : decodeURIComponent(a)
17 }
18
19 function d(a) {
20 return b(h.json ? JSON.stringify(a) : String(a))
21 }
22
23 function e(a) {
24 0 === a.indexOf('"') && (a = a.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\"));
25 try {
26 return a = decodeURIComponent(a.replace(g, " ")), h.json ? JSON.parse(a) : a
27 } catch (b) {
28 }
29 }
30
31 function f(b, c) {
32 var d = h.raw ? b : e(b);
33 return a.isFunction(c) ? c(d) : d
34 }
35
36 var g = /\+/g, h = a.cookie = function (e, g, i) {
37 if (void 0 !== g && !a.isFunction(g)) {
38 if (i = a.extend({}, h.defaults, i), "number" == typeof i.expires) {
39 var j = i.expires, k = i.expires = new Date;
40 k.setTime(+k + 864e5 * j)
41 }
42 return document.cookie = [b(e), "=", d(g), i.expires ? "; expires=" + i.expires.toUTCString() : "", i.path ? "; path=" + i.path : "", i.domain ? "; domain=" + i.domain : "", i.secure ? "; secure" : ""].join("")
43 }
44 for (var l = e ? void 0 : {}, m = document.cookie ? document.cookie.split("; ") : [], n = 0, o = m.length; o > n; n++) {
45 var p = m[n].split("="), q = c(p.shift()), r = p.join("=");
46 if (e && e === q) {
47 l = f(r, g);
48 break
49 }
50 e || void 0 === (r = f(r)) || (l[q] = r)
51 }
52 return l
53 };
54 h.defaults = {}, a.removeCookie = function (b, c) {
55 return void 0 === a.cookie(b) ? !1 : (a.cookie(b, "", a.extend({}, c, {expires: -1})), !a.cookie(b))
56 }
57 });